query_id
stringlengths
32
32
query
stringlengths
7
29.6k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
f4d58c2bd19c3cef41cf68cebb0694e3
when the loading is complete, this function will be called
[ { "docid": "ea96423068231ff11a5813a840e279ed", "score": "0.0", "text": "function complete(){\n\t\t\t\n\t\t\t// set up event handlers\n\t\t\twindow.onblur = function(){\n\t\t\t\tapp.paused = true;\n\t\t\t\tcancelAnimationFrame(app.animationID);\n\t\t\t\tapp.keydown = []; // clear key daemon\n\t\t\t\t// call update() so that our paused screen gets drawn\n\t\t\t\tapp.test.update();\n\t\t\t};\n\t\t\t\n\t\t\twindow.onfocus = function(){\n\t\t\t\tapp.paused = false;\n\t\t\t\tcancelAnimationFrame(app.animationID);\n\t\t\t\t// start the animation back up\n\t\t\t\tapp.test.update();\n\t\t\t};\n\t\t\t\n\t\t\t// event listeners\n\t\t\twindow.addEventListener(\"keydown\",function(e){\n\t\t\t\tconsole.log(\"keydown=\" + e.keyCode);\n\t\t\t\tapp.keydown[e.keyCode] = true;\n\t\t\t});\n\t\t\t\t\n\t\t\twindow.addEventListener(\"keyup\",function(e){\n\t\t\t\tconsole.log(\"keyup=\" + e.keyCode);\n\t\t\t\tapp.keydown[e.keyCode] = false;\n\t\t\t});\n\t\t\t\n\t\t\t\n\t\t\t// start game\n\t\t\tapp.test.init();\n\t\t}", "title": "" } ]
[ { "docid": "23b6e3bddc0ee59e3b967851fd977db5", "score": "0.8123926", "text": "function finishedLoad() {\n console.log('finishedLoad()');\n if (externalIsLoaded()) {\n init();\n }\n }", "title": "" }, { "docid": "7889973fb99c4ec2f30ca81c2fc7e989", "score": "0.78656983", "text": "function loadComplete() {\n\thasLoaded = true;\n}", "title": "" }, { "docid": "5a5b9e9a7910f89e80fb806ce6dad4bc", "score": "0.7825747", "text": "function onLoadComplete()\n {\n this.loaded = true;\n }", "title": "" }, { "docid": "03d790fd043dc5b6e9455923267f92c5", "score": "0.78015894", "text": "loadComplete() {\n // Nothing\n }", "title": "" }, { "docid": "6464a92d0094c6c38f8bcffc906cad28", "score": "0.7694036", "text": "complete() {\n this.trigger('load_complete');\n }", "title": "" }, { "docid": "7f100618a86efde3eac0efccc7c0b7fb", "score": "0.7511251", "text": "function loaded() {\n $loading.fadeOut( 'fast', function() {\n $( this ).remove();\n });\n\t\talreadyLoaded = true;\n }", "title": "" }, { "docid": "299a60d1f20df49fdbabfe83b05daea4", "score": "0.7504845", "text": "function afterLoading(){\n\t\t\tupdatePageInfo();\n\t\t}", "title": "" }, { "docid": "b21595c6882f1871cd8156a6fd27720f", "score": "0.7474959", "text": "function load() {\n if (!loaded) {\n loaded = true;\n\n callback();\n }\n }", "title": "" }, { "docid": "3c26de9f269c547bc7c9242d5a7576b5", "score": "0.7442015", "text": "_loadingComplete() {\n this._loaded = true;\n this._registry.off(\"load\", this._onLoad, this);\n this._registry.off(\"error\", this._onError, this);\n\n if (this._failed && this._failed.length) {\n if (this._callback) {\n this._callback.call(this._scope, \"Failed to load some assets\", this._failed);\n }\n this.fire(\"error\", this._failed);\n } else {\n if (this._callback) {\n this._callback.call(this._scope);\n }\n this.fire(\"load\", this._assets);\n }\n }", "title": "" }, { "docid": "f7b39b3b1d6b9bc2f400e87425bc34af", "score": "0.74375856", "text": "function loaded() {\n ut.assert(true);\n ut.async(false);\n }", "title": "" }, { "docid": "8102e12d516a0120ffb20cd1de53ae5e", "score": "0.73556095", "text": "function loading() {\n}", "title": "" }, { "docid": "f0a509fcc3516ee411cf0c77664a19b9", "score": "0.7337522", "text": "async afterLoad () {\n }", "title": "" }, { "docid": "4f379361ad9cb48e35f848fc32174846", "score": "0.7312636", "text": "loaded() {}", "title": "" }, { "docid": "049dc994c7d6da8f56a8aebd46a1cd78", "score": "0.72982645", "text": "function graphsLoadCompleteHandler(){\n $engine.log('DASHBOARD > LOADER: '+objloadedArr.length + ' / ' + loadCount)\n if(objloadedArr.length == loadCount){\n $engine.toggleViewLoader(false);\n $('.drilldown-button').show();\n loadCount=0;\n objloadedArr.length = null;\n }\n }", "title": "" }, { "docid": "7e5ab434a40e70fc34c4331dea1e6dab", "score": "0.72918975", "text": "function loadComplete() {\n cnt--;\n if (!cnt) {\n execComplete();\n }\n }", "title": "" }, { "docid": "4062c16b5bdf8449de300449be9323e4", "score": "0.726945", "text": "_loading() {\n }", "title": "" }, { "docid": "b52e6c7f532e828e8288b8106fe74aa7", "score": "0.7238076", "text": "function loadDone() {\n return true;\n }", "title": "" }, { "docid": "ca59f694949a85b8a77838f67987971b", "score": "0.7216724", "text": "function onLoadComplete() {\n}", "title": "" }, { "docid": "d196cf964ad293fe2d60f655e7afed18", "score": "0.7205082", "text": "function loadComplete() {\n if ($('#abAutoRefresh:checked').length) {\n window.clearTimeout(refreshTimer);\n refreshTimer = window.setTimeout(loadData, config.interval * 1000);\n }\n // Update last update status\n $('#ab_update img').hide();\n $('#abLastUpdate').text((new Date()).toLocaleTimeString());\n }", "title": "" }, { "docid": "1d0cbccd323669e085fdcc717fbf2606", "score": "0.7108916", "text": "function _complete() {\n\t\t\tif (_errorState) {\n\t\t\t\t_eventDispatcher.sendEvent(events.ERROR, {message: _errorMessage});\n\t\t\t} else if (!_iscomplete) {\n\t\t\t\t_iscomplete = true;\n\t\t\t\t_status = utils.loaderstatus.COMPLETE;\n\t\t\t\t_eventDispatcher.sendEvent(events.COMPLETE);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "eb7037532f955366401630f136970ef7", "score": "0.7104192", "text": "loadingData() {}", "title": "" }, { "docid": "eb7037532f955366401630f136970ef7", "score": "0.7104192", "text": "loadingData() {}", "title": "" }, { "docid": "755c85a0f0a8931edcb95463e6ed3c69", "score": "0.71024686", "text": "function pageFullyLoaded () {}", "title": "" }, { "docid": "0407d6a64cfde313552e1c2c7b8aa224", "score": "0.70909345", "text": "function loaded(){\n\t\tipcRenderer.send('asynchronous-message', {\"tag\":\"loaded\"});\n\t\t$( document ).tooltip();\n\t}", "title": "" }, { "docid": "77c7bdff103090891d73c99047b7e588", "score": "0.70878553", "text": "function LoadSuccess() {\n // Image: set properties\n that.Properties($i);\n // Image: all image loaded\n SetupAfterAllLoaded();\n }", "title": "" }, { "docid": "0c633b2718f8872b92e90d7fedd1ff44", "score": "0.7012468", "text": "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}", "title": "" }, { "docid": "526ff0b52217d73120ceedab320fe4f4", "score": "0.70077103", "text": "function _complete() {\n\t if (!_iscomplete) {\n\t _iscomplete = true;\n\t _status = scriptloader.loaderstatus.COMPLETE;\n\t _this.trigger(events.COMPLETE);\n\t }\n\t }", "title": "" }, { "docid": "a169cb0ca15d537f9033575b72b68f65", "score": "0.6983645", "text": "load() {\r\n\r\n }", "title": "" }, { "docid": "a38d1b098fb932d49ca7a91490b4382d", "score": "0.6967553", "text": "function load(){\r\n\r\n}", "title": "" }, { "docid": "b07fd64245de1ec8659ce560211eaebc", "score": "0.69560444", "text": "function loaded() {\r\n\t\t\t$timeout(function() {\r\n\t\t\t\tvm.loading = false;\r\n\t\t\t}, 400);\r\n\t\t}", "title": "" }, { "docid": "a67ce2b0f484a77e313f22e42034c683", "score": "0.6953598", "text": "loadComplete(event)\n {\n // Do something when loading is complete, for instance, switch the game state\n app.gotoScreen(\"menus\");\n\n // Start the music\n\t\tif(polishSettings.menuMusic)\n\t\t{\n\t\t\taudio.startMenuMusic();\n\t\t}\n }", "title": "" }, { "docid": "4631f5b0cd0a18b0fe711c0a21151cf2", "score": "0.69304043", "text": "async onLoad() {}", "title": "" }, { "docid": "c5ba3d7e2b3052aa9f665635f2743658", "score": "0.69234294", "text": "onPageLoaded() {\n window.clearTimeout(this.animationTimeout_);\n window.clearTimeout(this.loadingTimeout_);\n this.setUIStep(AssistantLoadingUIState.LOADED);\n }", "title": "" }, { "docid": "05eb0f38d4b182d598d17c76cc4466d0", "score": "0.69204956", "text": "function preLoad() {\n // load something and continue on only when finished\n}", "title": "" }, { "docid": "4fd7b0fd219fdfa94e028615959ef4e6", "score": "0.69131225", "text": "function _finishedLoading() {\n if ( that.lastFunction ){\n that.lastFunction();\n that.lastFunction = false;\n }\n that.ajaxBusy = false;\n\n // make sure the search menu is completed in error cases\n if ( that.currentControl === \"SEARCH_COLUMN\" && that.searchMenuCallback ) {\n that.searchMenuCallback( false );\n that.searchMenuCallback = null;\n that.searchMenu = null;\n }\n } // _finishedLoading", "title": "" }, { "docid": "55d7bbe91b8679c4a59d295638b4dbf5", "score": "0.68658346", "text": "function load(){\n\n //Display an optional loading bar\n // g.loadingBar();\n}", "title": "" }, { "docid": "363b40cfa125173893c86f7a00854561", "score": "0.68085533", "text": "function load(){\n\t//Display the loading progress bar while the game\n\tprogressBar.create(g.canvas, assets);\n\tprogressBar.update();\n}", "title": "" }, { "docid": "f57546fb9d06f52c41a3313a50fc3813", "score": "0.67847896", "text": "function onLoad()\n{}", "title": "" }, { "docid": "13959a3d6b796950c553491045c236d4", "score": "0.6768694", "text": "setLoadCompleteCallback(funct) {\n this.loadCompleteCallback = funct;\n // in case all loading are done\n this._checkForAllLoadCompleted();\n }", "title": "" }, { "docid": "00dd3430bf0c21b780ed5a667b36b5ff", "score": "0.67554885", "text": "onChildrenLoadEnd() {\n if (this._childrenLoadEnd) {\n this._childrenLoadEnd.raise();\n }\n }", "title": "" }, { "docid": "7a0bba6cff377423c9606230bf4d9531", "score": "0.67424375", "text": "function load() {\r\n\r\n //Display the file currently being loaded\r\n console.log(`loading: ${g.loadingFile}`);\r\n\r\n //Display the percentage of files currently loaded\r\n console.log(`progress: ${g.loadingProgress}`);\r\n\r\n //Add an optional loading bar.\r\n g.loadingBar();\r\n\r\n //This built-in loading bar is fine for prototyping, but I\r\n //encourage to to create your own custom loading bar using Hexi's\r\n //`loadingFile` and `loadingProgress` values. See the `loadingBar`\r\n //and `makeProgressBar` methods in Hexi's `core.js` file for ideas\r\n}", "title": "" }, { "docid": "a21e92f989b15ceb9d53213aa88a7859", "score": "0.6718513", "text": "function loading() {\n push();\n textSize(32);\n textStyle(BOLD);\n textAlign(CENTER, CENTER);\n text(`Loading ${modelName}...`, width / 2, height / 2);\n pop();\n}", "title": "" }, { "docid": "22f7d40eda4980c76e4911b410606122", "score": "0.67175394", "text": "function startLoading() {\n //TODO\n}", "title": "" }, { "docid": "1347349313c76b8ccbaf332d5a6e39b1", "score": "0.67173475", "text": "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 }", "title": "" }, { "docid": "4aea8fe2d9b32aeadcd6d453dff9b582", "score": "0.6704386", "text": "load() {\n\n }", "title": "" }, { "docid": "a5fb3f3a429f6b5fc9c25f2be9ec1e08", "score": "0.6691955", "text": "function tabLoad() {\n // Tab load safety check\n if (tabHasLoaded) {\n return;\n }\n tabHasLoaded = true;\n\n setupPage();\n\n getAlerts();\n }", "title": "" }, { "docid": "c706cfe88bd8d972cc2648d818516996", "score": "0.6690866", "text": "function loadAnimationComplete() {\n circleLoader.hide();\n\n // Fade out the black background\n TweenMax.to(preloadBg, 0.3, { opacity : 0, onComplete : bgAnimationComplete } );\n }", "title": "" }, { "docid": "0dcaef5b1a17b3b4aceb6eb8a2a5f38f", "score": "0.66868544", "text": "function load() {\n\n //Display the file currently being loaded\n console.log(`loading: ${g.loadingFile}`);\n\n //Display the percentage of files currently loaded\n console.log(`progress: ${g.loadingProgress}`);\n\n //Add an optional loading bar.\n g.loadingBar();\n\n //This built-in loading bar is fine for prototyping, but I\n //encourage to to create your own custom loading bar using Hexi's\n //`loadingFile` and `loadingProgress` values. See the `loadingBar`\n //and `makeProgressBar` methods in Hexi's `core.js` file for ideas\n}", "title": "" }, { "docid": "69c079693fe7b19552d2e97d5d072cf1", "score": "0.6682794", "text": "loadingComplete() {\n // Show the canvas or something\n $('body').removeClass('loading');\n }", "title": "" }, { "docid": "c8baa899d3fedea9f86d54da8174a44e", "score": "0.66800433", "text": "function tabLoad() {\n // Tab load safety check\n if (tabHasLoaded) {\n return;\n }\n tabHasLoaded = true;\n\n setupPage();\n\n getTaskStatuses();\n getTasks();\n }", "title": "" }, { "docid": "f136817eadd12f71869c0fa8558e633f", "score": "0.6677505", "text": "function loadComplete() {\n if (++docsLoaded == 1) {\n setUpPageStatus = 'complete';\n }\n}", "title": "" }, { "docid": "f136817eadd12f71869c0fa8558e633f", "score": "0.6677505", "text": "function loadComplete() {\n if (++docsLoaded == 1) {\n setUpPageStatus = 'complete';\n }\n}", "title": "" }, { "docid": "f136817eadd12f71869c0fa8558e633f", "score": "0.6677505", "text": "function loadComplete() {\n if (++docsLoaded == 1) {\n setUpPageStatus = 'complete';\n }\n}", "title": "" }, { "docid": "f136817eadd12f71869c0fa8558e633f", "score": "0.6677505", "text": "function loadComplete() {\n if (++docsLoaded == 1) {\n setUpPageStatus = 'complete';\n }\n}", "title": "" }, { "docid": "71bb3e0626bf5f8c84bf996713cc6bd4", "score": "0.66670716", "text": "function onload() {\r\n\tload();\r\n}", "title": "" }, { "docid": "84577e4c7eaf408aac4bfadabf9c61be", "score": "0.6652563", "text": "function onLoadHook() {\n g_finished_loading = true;\n initialUpdate();\n g_initial_collapsed = {};\n g_prev_entries = [];\n}", "title": "" }, { "docid": "4cbb7cf7e211c4a5469a2edba29caa9a", "score": "0.66482717", "text": "function loading(alreadyLoaded) {\n\t\tif(alreadyLoaded == false){\n\t\t\t$loading.prependTo( 'body' ).fadeIn();\n\t\t}\n }", "title": "" }, { "docid": "938671f7f9ef9c5af50145006853abc1", "score": "0.6619394", "text": "load () {\n\t\tthis.instanciable = false;\n\t\tconsole.log(this.name + \" loaded\");\n\t}", "title": "" }, { "docid": "e7683c1e49836efb1f79efeefc4de95d", "score": "0.661369", "text": "loaded () {\n this.page.loader.remove()\n }", "title": "" }, { "docid": "17bd536ac7c599328e1c58d8b3c181c5", "score": "0.66116303", "text": "function load(){\n game.loadingBar();\n}", "title": "" }, { "docid": "3986032e087541a158cd10100e192c87", "score": "0.65919805", "text": "function mainComplete() {\n console.log('it is all loaded up');\n MyGame.game.initialize();\n\n }", "title": "" }, { "docid": "39125b1c6cc5205a9e05029136c96d43", "score": "0.6579463", "text": "function Loader() {\n\n}", "title": "" }, { "docid": "54e2b0d911b6e19aa03155d0306cda2e", "score": "0.65778196", "text": "function handleLoadSync() {\n\t\t\t\t\tlogWithPhase( \"handleLoad - Sync\" );\n\t\t\t\t\t$scope.$eval( attributes.bnLoad );\n\t\t\t\t}", "title": "" }, { "docid": "8c7e546ed9868224c136cd1dac4916fc", "score": "0.6572923", "text": "function _load() {\r\n document.getElementById(\"loading-icon\").style.visibility = \"hidden\";\r\n document.getElementById(\"body\").style.visibility = \"visible\";\r\n }", "title": "" }, { "docid": "3e26d5aeca4c67bbaf9eec4cbdacc3b8", "score": "0.657179", "text": "function resourceLoaded() {\n\n numeroRecursoCargados += 1;\n if(numeroRecursoCargados === totalPartes) {\n setInterval(redraw, 1000 / fps);\n }\n }", "title": "" }, { "docid": "7e64c375f219156ee55fc1241c30aeba", "score": "0.6569983", "text": "function mainComplete() {\n\t\tconsole.log('it is all loaded up');\n\t\t//Demo.main.initialize();\n\t}", "title": "" }, { "docid": "a3752eebebf820a7265229e0ae189e77", "score": "0.6557341", "text": "function onLoadComplete () {\n // ready = true;\n}", "title": "" }, { "docid": "dd3057472841b0fab6518e7a7fc0ae25", "score": "0.654889", "text": "function continueLoad(){\n\td3.selectAll(\".loadHide\").classed(\"loadHide\", false)\n\td3.select(\"#loadingGif\")\n\t\t.transition()\n\t\t.style(\"display\", \"none\")\n\t\t.on(\"end\", function(){\n\t\t\tsetActiveDistrict(MILWAUKEE_ID, DEFAULT_LEVEL, TAMARACK_ID, \"load\")\t\t\n\t\t\tsetActiveSchool()\n\t\t})\n}", "title": "" }, { "docid": "9b9c875882c510ed8e3d7f9010cc44b4", "score": "0.6548262", "text": "function DoLoad()\n{\n for (var i = 0; i < _g_onload_functions.length; ++i)\n {\n if (\"function\" == typeof(_g_onload_functions[i]))\n {\n _g_onload_functions[i]();\n }\n }\n _g_is_loaded = true;\n}", "title": "" }, { "docid": "06b97de3b0f0b29a067f10babaaa90aa", "score": "0.65480626", "text": "function bgAnimationComplete() {\n preloadBg.hide();\n\n site = new Site();\n site.init();\n }", "title": "" }, { "docid": "1421737a5396544c759e6e61d8d62b77", "score": "0.65417683", "text": "function loader() {\n loaded += 1;\n if(loaded === toLoad) {\n spinner.stop();\n process.stdout.write('\\r ' + url);\n console.log('');\n }\n }", "title": "" }, { "docid": "79561a53d374b227a87adab68f58d747", "score": "0.6540416", "text": "function bewaesserung_load_complete(device) {\n bewaesserungDevice = device;\n load();\n}", "title": "" }, { "docid": "71758f8c70e055872e2befb6c313e19a", "score": "0.65351796", "text": "async function pageLoaded() {\n loadRegisteData();\n prepareHandles();\n}", "title": "" }, { "docid": "f6beaccb8708d81097eed7ea2c43058b", "score": "0.65339684", "text": "function loadSuccess(data) {\n amplify.publish(events.LoadSuccess, data);\n }", "title": "" }, { "docid": "98153e6bcfbf12756b3d1839d0865f30", "score": "0.65313584", "text": "function resourceLoaded()\n{\n\tif(++curLoadResNum >= totalLoadResources){\n\t\tredraw();\n\t}\n}", "title": "" }, { "docid": "8f55ed62787a7df347c7f0dc7a61ffaa", "score": "0.6526647", "text": "onload() {}", "title": "" }, { "docid": "b135cab06085e43af3eb1df085e24144", "score": "0.6514297", "text": "load(cb){\r\n\r\n\t\tconsole.log('Loading assets (difficulty: 1)');\r\n\r\n\t\t// Chiama il metodo load della classe parent\r\n\t\tsuper.load(cb, 1);\r\n\t}", "title": "" }, { "docid": "6e5f4e0059f18a88fb9560644b3c5c59", "score": "0.6502235", "text": "function onAllLoaded() {\n console.log('all loaded');\n}", "title": "" }, { "docid": "7bd2b30fe68140adaebb92b587286845", "score": "0.65016294", "text": "init() {\n\t\tthis.#activateNew('Loading');\n\t}", "title": "" }, { "docid": "142c037afa9a40365da79263e2ee84cb", "score": "0.6500133", "text": "function loadFunction(){\n\tvalidateLogin();\n\tgetImg();\n\tgetTags();\n\tgetUploader()\n\tgetComments();\n\tupdateViewCount();\n\t\n}", "title": "" }, { "docid": "7cd4d71d044b2975a5b525018d85f4ff", "score": "0.649714", "text": "onLoaderLoading() {\n\n if (this._setState) {\n\n this._setState({\n ...this.state, // Keep previous loaded data\n loading: true,\n loadingError: null\n });\n }\n\n if (this.onLoading) {\n\n this.onLoading();\n }\n }", "title": "" }, { "docid": "12f43dee3ed7e5fb99c7aa2fc345aca3", "score": "0.6495706", "text": "onload() {\n this.init();\n }", "title": "" }, { "docid": "fdb9661f9d1918a10a6cce8facff8c1e", "score": "0.6493926", "text": "function setLoading(loaded = false) {\n uploader.setLoader(loaded);\n metadata.setLoader(loaded);\n}", "title": "" }, { "docid": "7da7148331c53e85a723387250c53c4d", "score": "0.64905965", "text": "function loadingComplete() {\n\t\tloader.classList.add('smoothness');\n\t}", "title": "" }, { "docid": "311b6680ba807ad220ad4a4e3fac5604", "score": "0.6486397", "text": "handleDoneLoading()\n {\n this.isLoading = false;\n }", "title": "" }, { "docid": "01db0c260fd1291b9fa7815db850b43e", "score": "0.6479311", "text": "function onloadHandler(){\n console.info(\"Nick Cage is ready!\");\n // where the magic happens\n replaceAllElements();\n }", "title": "" }, { "docid": "eb7b74b70711c445f6d99b3c880d5f2b", "score": "0.6478608", "text": "function _finishLoading() {\n loadsToFinish--;\n if (loadsToFinish <= 0) {\n loading = false;\n viewModel.set(\"loading\", loading);\n }\n}", "title": "" }, { "docid": "0760be4853a2f0e06a4e21199bf1ec73", "score": "0.64745224", "text": "function SetupAfterAllLoaded() {\n /**\n * CHECK IMAGE LOADED -> IF LOADED COMPLETE THEN EXECUTE 'SLIDE-END'\n */\n slData.nImage = slData.nImage + 1;\n if (slData.nImage == slData.imageLen\n && (!slData.isVideoback || (slData.isVideoback && slData.isVideobackLoaded))) {\n setTimeout(function () {\n VariableModule(that);\n (slData['id'] == 'home') ? M.Module('LAYER').LoadHomeEnd()\n : that.LOAD.SlideEnd($slCur);\n }, 10);\n }\n }", "title": "" }, { "docid": "00f062da8b1f5bea4452e0a488158b9c", "score": "0.6469427", "text": "function RDonload(){\n\n /* RD stand for result design */\n RDVariableInitialize();\n RDCoverLoading();\n RDAnimationInitialize();\n RDArtworkOnClickInitialize();\n AOS.init();\n}", "title": "" }, { "docid": "2a4aa1bb620a556fd885350684eaee0e", "score": "0.64681864", "text": "function watchAsyncLoad() {\n if (opts.loadingAsync && !opts.isRemoved) {\n scope.$$loadingAsyncDone = false;\n\n $q.when(opts.loadingAsync)\n .then(function() {\n scope.$$loadingAsyncDone = true;\n delete opts.loadingAsync;\n }).then(function() {\n $$rAF(positionAndFocusMenu);\n });\n }\n }", "title": "" }, { "docid": "9754a10b24ccc9f0706f7ee78de3500e", "score": "0.64584476", "text": "function loading_done() {\n console.log(\"RiveScript has finished loading file\");\n\n // rivescript replies must be sorted!\n riveScriptBot.sortReplies()\n}", "title": "" }, { "docid": "bd8b6bad76c6d305eae73ba67535b1de", "score": "0.64584005", "text": "function watchAsyncLoad() {\n if (opts.loadingAsync && !opts.isRemoved) {\n scope.$$loadingAsyncDone = false;\n\n $q.when(opts.loadingAsync)\n .then(function() {\n scope.$$loadingAsyncDone = true;\n delete opts.loadingAsync;\n }).then(function() {\n $$rAF(positionAndFocusMenu);\n });\n }\n }", "title": "" }, { "docid": "bd8b6bad76c6d305eae73ba67535b1de", "score": "0.64584005", "text": "function watchAsyncLoad() {\n if (opts.loadingAsync && !opts.isRemoved) {\n scope.$$loadingAsyncDone = false;\n\n $q.when(opts.loadingAsync)\n .then(function() {\n scope.$$loadingAsyncDone = true;\n delete opts.loadingAsync;\n }).then(function() {\n $$rAF(positionAndFocusMenu);\n });\n }\n }", "title": "" }, { "docid": "af4b6b14d706365b842aa213641b3fe6", "score": "0.6456238", "text": "function contentLoading() {\n hide(topSearch);\n hide(clearSearchIcon);\n //show(loadingContentElement);\n show(\".es-progress-indicator\");\n hide(resultsElement);\n hide(articleDisplay);\n }", "title": "" }, { "docid": "e5181c59dc6f7113725c8e1f085926c9", "score": "0.64526373", "text": "function oncePreloaded() {\n\t\t\tself.afterLoaded(); //callback\n\t\t\tif(self.settings.hideFramesUntilPreloaded && self.settings.preloader !== undefined && self.settings.preloader !== false) {\n\t\t\t\tself.frames.show();\n\t\t\t}\n\t\t\tif(self.settings.preloader !== undefined && self.settings.preloader !== false){\n\t\t\t\tif(self.settings.hidePreloaderUsingCSS && self.transitionsSupported) {\n\t\t\t\t\tself.prependPreloadingCompleteTo = (self.settings.prependPreloadingComplete === true) ? self.settings.preloader : $(self.settings.prependPreloadingComplete);\n\t\t\t\t\tself.prependPreloadingCompleteTo.addClass(\"preloading-complete\");\n\t\t\t\t\tsetTimeout(init, self.settings.hidePreloaderDelay);\n\t\t\t\t}else{\n\t\t\t\t\tself.settings.preloader.fadeOut(self.settings.hidePreloaderDelay, function() {\n\t\t\t\t\t\tclearInterval(self.defaultPreloader);\n\t\t\t\t\t\tinit();\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tinit();\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "8e9d601636b1560ce411affc417355ee", "score": "0.6449967", "text": "function doSomethingAfterRendering(){\n displayLoading() // 로딩화면 보여주기\n fetchServer(); // 서버에서 데이터 가져오기\n }", "title": "" }, { "docid": "f6f1b1469247112f3cd40ef48ea1bab3", "score": "0.6449149", "text": "function mPageLoaded(){\n\t\t\n\t\tconsole.log(\"got to page Loaded\");\n\t\t\n\t\t//load the google visualization library \n\t\t//added the callback - want the name of the callback function to be gLoaded\n\t\t\n\t\tgoogle.load(\"visualization\", \"1\", {packages:[\"corechart\"], callback: \"gLoaded\"});\n\n\t\t\n\t}", "title": "" }, { "docid": "4b48b136c50a8520a67816bb63b5731f", "score": "0.6445039", "text": "function handleLoadAsync() {\n\t\t\t\t\tlogWithPhase( \"handleLoad - Async\" );\n\t\t\t\t\t$scope.$apply(\n\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\thandleLoadSync();\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t}", "title": "" }, { "docid": "0e62ae6117e8ad62a5407d08950977d1", "score": "0.64365923", "text": "onXMLReady() {\n\t\tthis.log(\"XML Loading finished.\");\n\t\tvar rootElement = this.reader.xmlDoc.documentElement;\n\n\t\t// Here should go the calls for different functions to parse the various blocks\n\t\tvar error = this.parseXMLFile(rootElement);\n\n\t\tif (error != null) {\n\t\t\tthis.onXMLError(error);\n\t\t\treturn;\n\t\t}\n\n\t\tthis.loadedOk = true;\n\n\t\t// As the graph loaded ok, signal the scene so that any additional initialization depending on the graph can take place\n\t\tthis.scene.onGraphLoaded();\n\t}", "title": "" }, { "docid": "ec4395c407017b071d5398b1ad5edc10", "score": "0.64232385", "text": "initLoading() {\n this.error = this.response = null;\n this.loading = true;\n\n // the code line below is needed for tests.\n current_view.initLoading();\n }", "title": "" }, { "docid": "f53b37c7b82def595603aee2069d038a", "score": "0.641974", "text": "onloadend() {}", "title": "" } ]
f093ea84a1d0d4d098d7708d837a711f
Quick object check this is primarily used to tell Objects from primitive values when we know the value is a JSONcompliant type.
[ { "docid": "1bdd74e0a3c4358617464fac9f9dacc0", "score": "0.0", "text": "function isObject (obj) {\n return obj !== null && typeof obj === 'object'\n}", "title": "" } ]
[ { "docid": "9d2ae619048b48b8f15900d1dda7b114", "score": "0.7022066", "text": "type(value) {\n if (typeof(value) == 'object') {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "70b256160ff016f449f8c83792f7a830", "score": "0.6974483", "text": "function _isObject(v){return Object.prototype.toString.call(v)==='[object Object]';}", "title": "" }, { "docid": "9fbcac0b52d4269397fe4de2f89a73db", "score": "0.69106764", "text": "function isPrimitiveType (obj) {\n return ( typeof obj === 'boolean' ||\n typeof obj === 'number' ||\n typeof obj === 'string' ||\n obj === null ||\n util.isDate(obj) ||\n util.isArray(obj));\n}", "title": "" }, { "docid": "9fbcac0b52d4269397fe4de2f89a73db", "score": "0.69106764", "text": "function isPrimitiveType (obj) {\n return ( typeof obj === 'boolean' ||\n typeof obj === 'number' ||\n typeof obj === 'string' ||\n obj === null ||\n util.isDate(obj) ||\n util.isArray(obj));\n}", "title": "" }, { "docid": "9fbcac0b52d4269397fe4de2f89a73db", "score": "0.69106764", "text": "function isPrimitiveType (obj) {\n return ( typeof obj === 'boolean' ||\n typeof obj === 'number' ||\n typeof obj === 'string' ||\n obj === null ||\n util.isDate(obj) ||\n util.isArray(obj));\n}", "title": "" }, { "docid": "53169c001ecb7c72f696a892ee0b0426", "score": "0.68740064", "text": "function isObject(val) { return val && toString.call(val) === '[object Object]'; }", "title": "" }, { "docid": "6606aca71a50f691472dea6f0c24f5e5", "score": "0.6837466", "text": "function is_primitive(data){\n if (data === null) { return true }\n return primitive_types.includes(typeof(data))\n}", "title": "" }, { "docid": "2cb7f2d6d19b51ff0c1c6a6094843a30", "score": "0.678362", "text": "function isObject(value) {\n if (_typeof(value) === 'object' && value !== null && !(value instanceof Boolean) && !(value instanceof Date) && !(value instanceof Number) && !(value instanceof RegExp) && !(value instanceof String)) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "a1965c784003e813d550848228f330d9", "score": "0.67004734", "text": "function isObject(value) {\n\n if (typeof value === 'object' && value !== null &&\n !(value instanceof Boolean) &&\n !(value instanceof Date) &&\n !(value instanceof Number) &&\n !(value instanceof RegExp) &&\n !(value instanceof String)) {\n\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "a1965c784003e813d550848228f330d9", "score": "0.67004734", "text": "function isObject(value) {\n\n if (typeof value === 'object' && value !== null &&\n !(value instanceof Boolean) &&\n !(value instanceof Date) &&\n !(value instanceof Number) &&\n !(value instanceof RegExp) &&\n !(value instanceof String)) {\n\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "a1965c784003e813d550848228f330d9", "score": "0.67004734", "text": "function isObject(value) {\n\n if (typeof value === 'object' && value !== null &&\n !(value instanceof Boolean) &&\n !(value instanceof Date) &&\n !(value instanceof Number) &&\n !(value instanceof RegExp) &&\n !(value instanceof String)) {\n\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "a1965c784003e813d550848228f330d9", "score": "0.67004734", "text": "function isObject(value) {\n\n if (typeof value === 'object' && value !== null &&\n !(value instanceof Boolean) &&\n !(value instanceof Date) &&\n !(value instanceof Number) &&\n !(value instanceof RegExp) &&\n !(value instanceof String)) {\n\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "a1965c784003e813d550848228f330d9", "score": "0.67004734", "text": "function isObject(value) {\n\n if (typeof value === 'object' && value !== null &&\n !(value instanceof Boolean) &&\n !(value instanceof Date) &&\n !(value instanceof Number) &&\n !(value instanceof RegExp) &&\n !(value instanceof String)) {\n\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "ab2f7d453821b033fe0cf540059be7cf", "score": "0.66949666", "text": "function isPrimitive(value) {\n return typeof value !== \"object\" || value === null;\n}", "title": "" }, { "docid": "29cfb4260facc59ee6586fa2ed0db17e", "score": "0.6644164", "text": "static object(value) {\n var type = typeof value;\n return type === 'function' || type === 'object' && !!value;\n }", "title": "" }, { "docid": "f466b8c063e6427106de4885137a630b", "score": "0.6631128", "text": "function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n }", "title": "" }, { "docid": "0ec2b61b31605b8bb3d7dda1c9627281", "score": "0.6548984", "text": "isPlainObject(value) {\n const objectProto = value !== null && typeof value === \"object\" && Object.getPrototypeOf(value);\n return value !== null && typeof value === \"object\" &&\n ((value.constructor && value.constructor.name === \"Object\") || (objectProto && objectProto.constructor && objectProto.constructor.name === \"Object\"));\n }", "title": "" }, { "docid": "f4baa80587f07ddee67809792324a4f2", "score": "0.6534518", "text": "isObject(obj) {\n if (typeof obj == \"object\") {\n return obj;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "27a12393ece4234c804967b0c2960605", "score": "0.65255284", "text": "function isObject(t){return Object.prototype.toString.call(t)===\"[object Object]\"}", "title": "" }, { "docid": "20a82a8b30581032cd684e733a52d638", "score": "0.65223354", "text": "function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n }", "title": "" }, { "docid": "0b4fb90f629a939f05d430456f46eb85", "score": "0.6507737", "text": "isObject(obj) {\n return obj != null && obj.constructor.name === \"Object\";\n }", "title": "" }, { "docid": "a9565a0ff668d75422b0931bc253bbf4", "score": "0.6496335", "text": "function isObject(v) {\n return \"[object Object]\" === Object.prototype.toString.call(v);\n }", "title": "" }, { "docid": "a446b1a87c8f5f5e0b59cba92d2015ee", "score": "0.6470822", "text": "function is(value) {\n var candidate = value;\n return Is.objectLiteral(candidate) && Is.uinteger(candidate.line) && Is.uinteger(candidate.character);\n }", "title": "" }, { "docid": "91f15e90186a68e6dcc3109955c0e409", "score": "0.64616805", "text": "function _isObject(v) {\n return (Object.prototype.toString.call(v) === '[object Object]');\n}", "title": "" }, { "docid": "91f15e90186a68e6dcc3109955c0e409", "score": "0.64616805", "text": "function _isObject(v) {\n return (Object.prototype.toString.call(v) === '[object Object]');\n}", "title": "" }, { "docid": "91f15e90186a68e6dcc3109955c0e409", "score": "0.64616805", "text": "function _isObject(v) {\n return (Object.prototype.toString.call(v) === '[object Object]');\n}", "title": "" }, { "docid": "22ae02185d6712f0016fb64b68e72213", "score": "0.64575905", "text": "function isObject(obj){return obj!==null&&typeof obj==='object';}", "title": "" }, { "docid": "aab1bf8d14ea76fd25e4d0d62f093244", "score": "0.64572823", "text": "function primitive(value) {\n\t var type = typeof value;\n\t return type === 'number' ||\n\t type === 'boolean' ||\n\t type === 'string' ||\n\t type === 'symbol';\n\t }", "title": "" }, { "docid": "fef54ef55225b331f6904e0781b871d9", "score": "0.6449843", "text": "function object (thing) {\n return typeof thing === 'object' && !nulled(thing) && !array(thing) && !date(thing);\n }", "title": "" }, { "docid": "20513b19a328ba4a9e4c9ca041c7c5f6", "score": "0.6426317", "text": "function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n }", "title": "" }, { "docid": "39a26a6c0a2bfcd3c30ffcb50aa6f8f3", "score": "0.64244944", "text": "function isPrimitive(value){return typeof value === 'string' || typeof value === 'number';}", "title": "" }, { "docid": "f2e4b4ce7bfe8f252ca52dd9231f46b0", "score": "0.64185315", "text": "function isObject(val){return null!=val&&\"object\"==typeof val&&!1===Array.isArray(val)}", "title": "" }, { "docid": "f2e4b4ce7bfe8f252ca52dd9231f46b0", "score": "0.64185315", "text": "function isObject(val){return null!=val&&\"object\"==typeof val&&!1===Array.isArray(val)}", "title": "" }, { "docid": "d2f2d077275c6e25ebafbff7fe8394da", "score": "0.64148384", "text": "function isPrimitive(value){return typeof value==='string'||typeof value==='number';}", "title": "" }, { "docid": "ebde621974d1b35f12f5296b700094a2", "score": "0.6410599", "text": "function isStrictObject(value) {\n return (Object.prototype.toString.call(value) === '[object Object]');\n}", "title": "" }, { "docid": "0ad035f0e3e210205c9888e54c8f4036", "score": "0.6399566", "text": "function isObject(obj){return obj !== null && typeof obj === 'object';}", "title": "" }, { "docid": "0ad035f0e3e210205c9888e54c8f4036", "score": "0.6399566", "text": "function isObject(obj){return obj !== null && typeof obj === 'object';}", "title": "" }, { "docid": "8a850d92208928dcd485ef30caca2df3", "score": "0.63796943", "text": "function isObject(val) {\n return val.constructor === Object;\n}", "title": "" }, { "docid": "b4ada0a91b08208bdc84c79615b15aff", "score": "0.63714546", "text": "function is(value) {\n var candidate = value;\n return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end);\n }", "title": "" }, { "docid": "df2a880b9ed5a22e79b7b25a54731c6d", "score": "0.63700587", "text": "function isObjectObject(t){return isObject(t)===true&&Object.prototype.toString.call(t)===\"[object Object]\"}", "title": "" }, { "docid": "db66bf713436377dbc51e18bcab5e269", "score": "0.6369347", "text": "function isObject(v) {\n return v instanceof Object;\n }", "title": "" }, { "docid": "44f7f0ce05637a986be0e774a8b963b4", "score": "0.63683504", "text": "function isPrimitive(value) {\n // Using switch fallthrough because it's simple to read and is\n // generally fast: http://jsperf.com/testing-value-is-primitive/5\n switch (typeof value) {\n case \"string\":\n case \"number\":\n case \"boolean\":\n return true;\n }\n\n return value == null;\n }", "title": "" }, { "docid": "44f7f0ce05637a986be0e774a8b963b4", "score": "0.63683504", "text": "function isPrimitive(value) {\n // Using switch fallthrough because it's simple to read and is\n // generally fast: http://jsperf.com/testing-value-is-primitive/5\n switch (typeof value) {\n case \"string\":\n case \"number\":\n case \"boolean\":\n return true;\n }\n\n return value == null;\n }", "title": "" }, { "docid": "9b021e09cc4ee0ec23dc42d1ab404105", "score": "0.6368181", "text": "function isPrimitiveBody(value, mapperTypeName) {\n return (mapperTypeName !== \"Composite\" &&\n mapperTypeName !== \"Dictionary\" &&\n (typeof value === \"string\" ||\n typeof value === \"number\" ||\n typeof value === \"boolean\" ||\n (mapperTypeName === null || mapperTypeName === void 0 ? void 0 : mapperTypeName.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i)) !==\n null ||\n value === undefined ||\n value === null));\n}", "title": "" }, { "docid": "fab8503c57f65ed51992abbc8a49fdf2", "score": "0.63673735", "text": "function isPrimitive(value) {\n if (value == null) return true;\n\n if (value instanceof Array) {\n for (let item of value) {\n if (!isPrimitive(item)) return false;\n }\n }\n else if (typeof value == 'object') return false;\n else if (typeof value == 'function') return false;\n\n return true;\n }", "title": "" }, { "docid": "ce82c3008875be3871abd0102709d3a5", "score": "0.63603663", "text": "function is(value) {\r\n var candidate = value;\r\n return Is.objectLiteral(candidate) && Is.number(candidate.line) && Is.number(candidate.character);\r\n }", "title": "" }, { "docid": "ce82c3008875be3871abd0102709d3a5", "score": "0.63603663", "text": "function is(value) {\r\n var candidate = value;\r\n return Is.objectLiteral(candidate) && Is.number(candidate.line) && Is.number(candidate.character);\r\n }", "title": "" }, { "docid": "ce82c3008875be3871abd0102709d3a5", "score": "0.63603663", "text": "function is(value) {\r\n var candidate = value;\r\n return Is.objectLiteral(candidate) && Is.number(candidate.line) && Is.number(candidate.character);\r\n }", "title": "" }, { "docid": "ce82c3008875be3871abd0102709d3a5", "score": "0.63603663", "text": "function is(value) {\r\n var candidate = value;\r\n return Is.objectLiteral(candidate) && Is.number(candidate.line) && Is.number(candidate.character);\r\n }", "title": "" }, { "docid": "ce82c3008875be3871abd0102709d3a5", "score": "0.63603663", "text": "function is(value) {\r\n var candidate = value;\r\n return Is.objectLiteral(candidate) && Is.number(candidate.line) && Is.number(candidate.character);\r\n }", "title": "" }, { "docid": "089a4bfeeb01719a97f4c55d056c898e", "score": "0.63592595", "text": "function isObjectLike(value) {\n return _typeof$4(value) == 'object' && value !== null;\n }", "title": "" }, { "docid": "2b2ca531e42377b2ef617bd806ff8e04", "score": "0.6356438", "text": "function isPrimitive(value) {\n return value === null || typeof value !== 'object' && typeof value !== 'function';\n}", "title": "" }, { "docid": "2b2ca531e42377b2ef617bd806ff8e04", "score": "0.6356438", "text": "function isPrimitive(value) {\n return value === null || typeof value !== 'object' && typeof value !== 'function';\n}", "title": "" }, { "docid": "2c2dd1b552c7a686137108d36aba851a", "score": "0.6353145", "text": "function isPrimitiveType(value) {\n return (typeof value !== \"object\" && typeof value !== \"function\") || value === null;\n}", "title": "" }, { "docid": "2c2dd1b552c7a686137108d36aba851a", "score": "0.6353145", "text": "function isPrimitiveType(value) {\n return (typeof value !== \"object\" && typeof value !== \"function\") || value === null;\n}", "title": "" }, { "docid": "2d8813157e8845c43cf3a60cfe3c4e66", "score": "0.63339186", "text": "function isObject(obj){return obj!==null&&(typeof obj===\"undefined\"?\"undefined\":_typeof(obj))==='object';}", "title": "" }, { "docid": "b178e4f43e2a2e92e68a30bc2fb52974", "score": "0.6330235", "text": "function is(value) {\r\n var candidate = value;\r\n return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end);\r\n }", "title": "" }, { "docid": "b178e4f43e2a2e92e68a30bc2fb52974", "score": "0.6330235", "text": "function is(value) {\r\n var candidate = value;\r\n return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end);\r\n }", "title": "" }, { "docid": "b178e4f43e2a2e92e68a30bc2fb52974", "score": "0.6330235", "text": "function is(value) {\r\n var candidate = value;\r\n return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end);\r\n }", "title": "" }, { "docid": "b178e4f43e2a2e92e68a30bc2fb52974", "score": "0.6330235", "text": "function is(value) {\r\n var candidate = value;\r\n return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end);\r\n }", "title": "" }, { "docid": "b178e4f43e2a2e92e68a30bc2fb52974", "score": "0.6330235", "text": "function is(value) {\r\n var candidate = value;\r\n return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end);\r\n }", "title": "" }, { "docid": "fb218e0c1a12cfee8efcfa62b1a0aa0a", "score": "0.6328739", "text": "function isObject(obj){return obj!==null&&(typeof obj==='undefined'?'undefined':_typeof(obj))==='object';}", "title": "" }, { "docid": "d30c130063e0d998bff2ce21a098f992", "score": "0.63176", "text": "function isPrimitive(value) {\n return (value === null ||\n (typeof value !== 'object' && typeof value !== 'function'));\n}", "title": "" }, { "docid": "d30c130063e0d998bff2ce21a098f992", "score": "0.63176", "text": "function isPrimitive(value) {\n return (value === null ||\n (typeof value !== 'object' && typeof value !== 'function'));\n}", "title": "" }, { "docid": "ecbdbdb31e20cc48a2f11491badbd6ec", "score": "0.6305395", "text": "function is(value) {\n var candidate = value;\n return Is.objectLiteral(candidate) && Is.number(candidate.line) && Is.number(candidate.character);\n }", "title": "" }, { "docid": "1194e53e7a3939c522cff9bdf967e7b5", "score": "0.6294739", "text": "function is(value) {\n var candidate = value;\n return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end);\n }", "title": "" }, { "docid": "ba0ecec46b8ac07927c3a05e6bac25f8", "score": "0.62911487", "text": "function isObject(e){return Object.prototype.toString.call(e)===\"[object Object]\"}", "title": "" }, { "docid": "ba0ecec46b8ac07927c3a05e6bac25f8", "score": "0.62911487", "text": "function isObject(e){return Object.prototype.toString.call(e)===\"[object Object]\"}", "title": "" }, { "docid": "cb5eb9611c09029090363054edc1cb7f", "score": "0.62810177", "text": "function isObject(value) {\r\n return value != null && typeof value === 'object' && !Array.isArray(value);\r\n }", "title": "" }, { "docid": "294903fbb611774e80b66f787955408d", "score": "0.6278635", "text": "function coercePrimitiveToObject(obj) {\n if(isPrimitiveType(obj)) {\n obj = object(obj);\n }\n if(noKeysInStringObjects && isString(obj)) {\n forceStringCoercion(obj);\n }\n return obj;\n }", "title": "" }, { "docid": "a95fa46c5fcad9b21ba5f807da619800", "score": "0.6277189", "text": "function isPrimitive(value) {\n if (value === null) {\n return true;\n }\n if (value === undefined) {\n return false;\n }\n if (typeof value === 'function') {\n return false;\n }\n if (['boolean', 'number', 'string'].indexOf(typeof value === 'undefined' ? 'undefined' : (0, _typeof3.default)(value)) !== -1) {\n return true;\n }\n if (value instanceof Date || value instanceof ArrayBuffer) {\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "750979dde8797564ad81f56d1276b751", "score": "0.6265903", "text": "function isPrimitive (value) {\n return typeof value === 'string' || typeof value === 'number'\n }", "title": "" }, { "docid": "5a6838de30c5a0bcdb9145dd7e221a37", "score": "0.6257528", "text": "function is(value) {\n var candidate = value;\n return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value);\n }", "title": "" }, { "docid": "4e2a4c4bad31c0d632b0f7f38da75117", "score": "0.62531334", "text": "function isObject(value) {\r\n return typeof value === \"object\" && value != null;\r\n}", "title": "" }, { "docid": "c5233d337c356a36878cf163d0779fa9", "score": "0.6251485", "text": "_type(v) {\n if (typeof v === 'number') {\n return 1;\n }\n\n if (typeof v === 'string') {\n return 2;\n }\n\n if (typeof v === 'boolean') {\n return 8;\n }\n\n if (Array.isArray(v)) {\n return 4;\n }\n\n if (v === null) {\n return 10;\n }\n\n // note that typeof(/x/) === \"object\"\n if (v instanceof RegExp) {\n return 11;\n }\n\n if (typeof v === 'function') {\n return 13;\n }\n\n if (v instanceof Date) {\n return 9;\n }\n\n if (EJSON.isBinary(v)) {\n return 5;\n }\n\n if (v instanceof MongoID.ObjectID) {\n return 7;\n }\n\n if (v instanceof Decimal) {\n return 1;\n }\n\n // object\n return 3;\n\n // XXX support some/all of these:\n // 14, symbol\n // 15, javascript code with scope\n // 16, 18: 32-bit/64-bit integer\n // 17, timestamp\n // 255, minkey\n // 127, maxkey\n }", "title": "" }, { "docid": "1d04c9138450e4890ad0dd7f57183f56", "score": "0.624055", "text": "function is(value) {\r\n var candidate = value;\r\n return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value);\r\n }", "title": "" }, { "docid": "1d04c9138450e4890ad0dd7f57183f56", "score": "0.624055", "text": "function is(value) {\r\n var candidate = value;\r\n return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value);\r\n }", "title": "" }, { "docid": "1d04c9138450e4890ad0dd7f57183f56", "score": "0.624055", "text": "function is(value) {\r\n var candidate = value;\r\n return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value);\r\n }", "title": "" }, { "docid": "1d04c9138450e4890ad0dd7f57183f56", "score": "0.624055", "text": "function is(value) {\r\n var candidate = value;\r\n return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value);\r\n }", "title": "" }, { "docid": "1d04c9138450e4890ad0dd7f57183f56", "score": "0.624055", "text": "function is(value) {\r\n var candidate = value;\r\n return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value);\r\n }", "title": "" }, { "docid": "09be042fdc218b8e6e476e8728a484dd", "score": "0.62384427", "text": "function isNumberObject(obj){\n\treturn obj && typeof obj === \"object\"\n\t\t&& Function.prototype.toString.call(obj.constructor) === \"function Number() { [native code] }\";\n}", "title": "" }, { "docid": "c0c89ab3b04a8f1d1dfb097994ec7952", "score": "0.6229067", "text": "function isPlainObject(obj){return _toString.call(obj) === '[object Object]';}", "title": "" }, { "docid": "135428d468f1593b4d0d9c0e25cbc99f", "score": "0.62239397", "text": "function isObject(val) {\n return kindOf$3(val) === 'object';\n}", "title": "" }, { "docid": "8d3b39cf60acc2e86c1fb8cac98cffbf", "score": "0.6222806", "text": "function isObject(value) {\n return value != null && typeof value === 'object' && !Array.isArray(value);\n }", "title": "" }, { "docid": "20cf5fa0916d23d6cb2925e485671f96", "score": "0.6222238", "text": "function filterPrimitive(obj) {\n return (\n obj instanceof Boolean ||\n obj instanceof Number ||\n obj instanceof String\n ) ?\n obj.valueOf() :\n obj\n }", "title": "" }, { "docid": "cdb3d202f1cd70f42349c45d0c907c5f", "score": "0.62201244", "text": "function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n}", "title": "" }, { "docid": "cdb3d202f1cd70f42349c45d0c907c5f", "score": "0.62201244", "text": "function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n}", "title": "" }, { "docid": "cdb3d202f1cd70f42349c45d0c907c5f", "score": "0.62201244", "text": "function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n}", "title": "" }, { "docid": "cdb3d202f1cd70f42349c45d0c907c5f", "score": "0.62201244", "text": "function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n}", "title": "" }, { "docid": "cdb3d202f1cd70f42349c45d0c907c5f", "score": "0.62201244", "text": "function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n}", "title": "" }, { "docid": "cdb3d202f1cd70f42349c45d0c907c5f", "score": "0.62201244", "text": "function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n}", "title": "" }, { "docid": "cdb3d202f1cd70f42349c45d0c907c5f", "score": "0.62201244", "text": "function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n}", "title": "" }, { "docid": "cdb3d202f1cd70f42349c45d0c907c5f", "score": "0.62201244", "text": "function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n}", "title": "" }, { "docid": "3b7ed893e82a757a3979ea47b48ae39e", "score": "0.6216077", "text": "function isObject (value) {\n if(value && typeof value === 'object' && value.constructor === Object){\n return true;\n }\n schemaTypeValidationError.message = `${value} is not of type Object`\n throw schemaTypeValidationError\n return\n}", "title": "" }, { "docid": "f77a1dbf6f86c397c194f3ad8aa3e60f", "score": "0.6211152", "text": "function isPrimitive(value) {\n return typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean';\n }", "title": "" }, { "docid": "f77a1dbf6f86c397c194f3ad8aa3e60f", "score": "0.6211152", "text": "function isPrimitive(value) {\n return typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean';\n }", "title": "" }, { "docid": "581f3fe12ff188c4e1d0d6b42ee44721", "score": "0.62094045", "text": "function isPrimitive (value) {\n\t return typeof value === 'string' || typeof value === 'number'\n\t}", "title": "" }, { "docid": "581f3fe12ff188c4e1d0d6b42ee44721", "score": "0.62094045", "text": "function isPrimitive (value) {\n\t return typeof value === 'string' || typeof value === 'number'\n\t}", "title": "" }, { "docid": "dd3bab6e5868c364539edfa5847d0ff7", "score": "0.6208176", "text": "function isPrimitive(value) {\n return (\n typeof value === \"string\" ||\n typeof value === \"number\" ||\n // $flow-disable-line\n typeof value === \"symbol\" ||\n typeof value === \"boolean\"\n );\n }", "title": "" }, { "docid": "5147c23c0845f27324c5cf5286e47a83", "score": "0.6206386", "text": "function isPrimitive(value) {\n\t return typeof value === 'string' || typeof value === 'number';\n\t}", "title": "" }, { "docid": "bc07287a090b08e724a4ee6371f707a4", "score": "0.62044543", "text": "function isObjectObject(o){return!0===function isObject(val){return null!=val&&\"object\"==typeof val&&!1===Array.isArray(val)}(o)&&\"[object Object]\"===Object.prototype.toString.call(o)}", "title": "" } ]
5e62ca075e48882d8917d710b47db237
preload() Load our two images into their variables for later
[ { "docid": "ae0f0fd44e85424f6a4d7c168ed30a5d", "score": "0.7521753", "text": "function preload() {\n userImage = loadImage(`assets/images/user.png`);\n evilTwinImage = loadImage(`assets/images/evil-twin.png`);\n}", "title": "" } ]
[ { "docid": "ab32c7f28deb9f8e2dc7284ea07902e1", "score": "0.83288765", "text": "function preload(){\n\n dogimg1 = loadImage(\"images/dogImg.png\");\n dogimg2 = loadImage(\"images/dogImg1.png\");\n\n}", "title": "" }, { "docid": "497c540a7771a990878320ffaf2fe392", "score": "0.8001546", "text": "function preload() {\n ir = loadImage(\"images/infrared.jpg\");\n vis = loadImage(\"images/visible.jpg\");\n}", "title": "" }, { "docid": "08cf4199471d4060a3fe10da2d5f6f43", "score": "0.79153526", "text": "function preload(){\n ads1 = loadImage(\"images/adsOne.png\");\n ads2 = loadImage(\"images/adsTwo.png\");\n\n}", "title": "" }, { "docid": "b73d1d019885eec55abcd6d11252708e", "score": "0.7902215", "text": "function preload() {\n\nim[0] = loadImage(imFile[0]); \nim[1] = loadImage(imFile[1]);\n\n}", "title": "" }, { "docid": "90eb1bbb4941b26a168ffc3e123a9a3d", "score": "0.78751236", "text": "function preload() {\n img = loadImage(\"../assets/blurSkyline.png\");\n img2 = loadImage(\"../assets/fragSkyline.png\");\n}", "title": "" }, { "docid": "59d0688e51d5c7c617a998dcac8b9ca7", "score": "0.78224266", "text": "function preload()\n{\n\t//boyimg = loadImage('Plucking mangoes/boy.png');\n\t//treeimg = loadImage('plucking mangoes/tree.png');\n}", "title": "" }, { "docid": "53e79b8c6569feb72d048bbd6a9caf18", "score": "0.7812722", "text": "function preload() {\n clientPosition = getCurrentPosition();\n crossImg = loadImage(\"./assets/cross_red.png\")\n}", "title": "" }, { "docid": "0944e3aa92f57dd40f7e14bb48d91b37", "score": "0.7760177", "text": "function preload() {\n couchImage = loadImage('images/couch.png');\n radioImage = loadImage('images/radio.png');\n boxImage = loadImage('images/donut_box.png');\n drbenImage = loadImage('images/drben-clap.png');\n bubbleImage = loadImage('images/bubble.png');\n spillImage = loadImage('images/radio_spill.png');\n picImage = loadImage('images/drben_pic.png');\n boozyImage = loadImage('images/boozy.png');\n boozyImage2 = loadImage('images/boozy-center.png');\n boozyImage3 = loadImage('images/boozy-roar.png');\n}", "title": "" }, { "docid": "4d96e6570f94707ac343cca0c3424ff9", "score": "0.77529055", "text": "function preload(){\r\n img=loadImage('https://upload.wikimedia.org/wikipedia/commons/thumb/a/a6/Pterocnemia_pennat_%28zoo_Zurich%29.jpg/1200px-Pterocnemia_pennat_%28zoo_Zurich%29.jpg')\r\n\r\n img1=loadImage('https://upload.wikimedia.org/wikipedia/commons/0/0d/Loriculus_vernalis_-Ganeshgudi%2C_Karnataka%2C_India_-male-8-1c.jpg')\r\n\r\n img2=loadImage('https://upload.wikimedia.org/wikipedia/commons/thumb/8/8d/Bubo_bubo_winter_1.jpg/220px-Bubo_bubo_winter_1.jpg')\r\n\r\n img3=loadImage('https://upload.wikimedia.org/wikipedia/commons/9/92/%E2%99%82_Common_Kingfisher_%28Alcedo_atthis%29_Photograph_By_Shantanu_Kuveskar%2C_Mangaon%2C_Maharashtra%2C_India.jpg')\r\n}", "title": "" }, { "docid": "ec0ffba40f6839a46f17dce6910bdf6c", "score": "0.7733856", "text": "preload () {\n\t\tthis.load.image('sky', 'assets/sky.png');\n\t this.load.image('ground', 'assets/platform.png');\n\t this.load.image('star', 'assets/star.png');\n\t this.load.image('main', 'assets/main.png');\n\t console.log('preloading');\n\t}", "title": "" }, { "docid": "d0ccf1c2f6d4c23d3778044b35261953", "score": "0.77300215", "text": "function preload(){\n\n\tbackgroundImg = loadImage(\"bg1.png\");\n\n\tboy = loadImage(\"boy.png\");\n\n}", "title": "" }, { "docid": "1aab122b6b098ee22a07ba5f86f58912", "score": "0.77180624", "text": "function preload() {\n imgPink = loadImage(\"assets/images/pinkDonut.PNG\");\n imgBrown = loadImage(\"assets/images/brownDonut.PNG\");\n imgWhite = loadImage(\"assets/images/whiteDonut.PNG\");\n}", "title": "" }, { "docid": "df8e908c0fe8cad1731544eeb8477b9c", "score": "0.7716033", "text": "function preload(){\n\tcowimg = loadImage('assets/cow.png');\n\tpigimg = loadImage('assets/pig.png');\n}", "title": "" }, { "docid": "8308d8d2337b03138bad9c8dd201a291", "score": "0.7710876", "text": "function preload() {\n fire = loadImage(\"assets/fire.png\");\n water = loadImage(\"assets/water.png\");\n}", "title": "" }, { "docid": "93be0b3318d3bcc37894d411c8ab70a3", "score": "0.7706804", "text": "function preload() {\n backgroundImage = loadImage(\"images/background.jpg\");\n alienImage = loadImage(\"images/alien.png\");\n\n}", "title": "" }, { "docid": "0688da03a12fb0d32892aaa93c466272", "score": "0.7673526", "text": "function preload() {\n var bigImage1 = loadImage(\"big_image1.png\");\n var bigImage2 = loadImage(\"big_image2.png\");\n var bigImage3 = loadImage(\"big_image3.png\");\n var bigImage4 = loadImage(\"big_image4.png\");\n var bigImage5 = loadImage(\"big_image5.png\");\n var bigImage6 = loadImage(\"big_image6.png\");\n}", "title": "" }, { "docid": "f31985bdb2ab5f446d6dc5f4e69a35e8", "score": "0.76723015", "text": "function preload() {\n\tmrlair = loadImage('mr.lair1.png');\n llama = loadImage('llama.gif');\n\tground = loadImage('ground.png');\n\tclouds =loadImage('clouds.png');\n \n\t\n}", "title": "" }, { "docid": "9f8ffde11b89d408c358f76baa462185", "score": "0.766901", "text": "function preload(){\n watch = loadImage('images/watching.png')\n netflix = loadImage('images/netflix.jpg')\n onbutton = loadImage ('images/onbutton.png')\n}", "title": "" }, { "docid": "f5a5fd216ee41949eb2f533b7cc36ebd", "score": "0.7627179", "text": "function preload() {\n\tjerry = loadImage('jerry.png');\n\tjenny = loadImage('jenny.png');\n lake = loadImage('lake.png');\n tree = loadImage('tree.png');\n mta = loadImage('mta.png'); \n build = loadImage('build.png');\n taxi = loadImage('taxi.png')\n walk = loadImage('walk.png');\n boat = loadImage('boat.png');\n bird = loadImage('bird.png');\n}", "title": "" }, { "docid": "03fefa4f7fb17505307d340f23e072ae", "score": "0.76222956", "text": "function preload()\n{\n playerIMG = loadImage('image.png');\n largeLog = loadImage('logBig.png');\n smallLog = loadImage('logSmall.png');\n carLeft = loadImage('carLeft.png');\n carRight = loadImage('carRight.png');\n truck = loadImage('truck.png');\n}", "title": "" }, { "docid": "30c9055462228e27d9fe1de5ac3cc4eb", "score": "0.7618862", "text": "function preload() {\r\n splitPath=loadImage('dungeon/split path.jpg')\r\n hallway=loadImage('dungeon/longhall.jpg')\r\n treasure=loadImage('dungeon/treasure room.jpg')\r\n door=loadImage('dungeon/dooor.jpg')\r\n library=loadImage('dungeon/library.jpg')\r\n\r\n}", "title": "" }, { "docid": "4cba577c9652faa35032f635d0cff9f4", "score": "0.7591226", "text": "function preload() {\n loadImage(\"data/pic1.jpg\", setImage);\n}", "title": "" }, { "docid": "a9eed16fff84fcc452c5be5467f7598b", "score": "0.7584901", "text": "function preload(){\n track = loadImage(\"../images/track.jpg\");\n car1_img = loadImage(\"../images/car1.png\");\n car2_img = loadImage(\"../images/car2.png\");\n car3_img = loadImage(\"../images/car3.png\");\n car4_img = loadImage(\"../images/car4.png\");\n ground = loadImage(\"../images/ground.png\");\n}", "title": "" }, { "docid": "50307a3d4149233dbccdc250da060f21", "score": "0.75818515", "text": "function preload() {\n avatarImage = loadImage(\"assets/images/avatar.png\");\n enemyImage = loadImage(\"assets/images/enemy.png\");\n backgroundImage = loadImage(\"assets/images/background.png\");\n winImage = loadImage(\"assets/images/win.png\");\n}", "title": "" }, { "docid": "b7a22688b4739d6c397bfa1c3334721c", "score": "0.7575945", "text": "function preload() {\npisces = loadImage('pisces.png');\naries = loadImage('aries.png');\naquarius = loadImage('aquarius.png');\ngemini = loadImage('gemini.png');\ncancer = loadImage('cancer.png');\nleo = loadImage('leo.png');\ncapricorn = loadImage('capricorn.png');\nsagittarius = loadImage('sagittarius.png');\nlibra = loadImage('libra.png');\nscorpio = loadImage('Scorpio.png');\ntaurus = loadImage('taurus.png');\nvirgo = loadImage('virgo.png');\n}", "title": "" }, { "docid": "86eb9e513813798377275fa6033c84df", "score": "0.7575806", "text": "function preload(){\r\n bg =loadImage(\"cityImage.png\");\r\n balloonImg = loadImage(\"hotairballoon1.png\");\r\n }", "title": "" }, { "docid": "f12e555fd8c8aab670fdb4f9e13c5af5", "score": "0.75583833", "text": "function preload() {\n tigerImage = loadImage(\"assets/images/Tiger.png\");\n lionImage = loadImage(\"assets/images/Lion.png\");\n boarImage = loadImage(\"assets/images/Boar.png\");\n antelopeImage = loadImage(\"assets/images/Antelope.png\");\n zebraImage = loadImage(\"assets/images/Zebra.png\");\n beeImage = loadImage(\"assets/images/Bee.png\");\n bgGrass = loadImage(\"assets/images/Grass.png\");\n}", "title": "" }, { "docid": "942dabbff8ca3568266de489017077b9", "score": "0.75396955", "text": "function preload(){\n // load all images\n lizardImg = loadImage('stimuli/drawing_small.png');\n mouthOpenImg = loadImage('stimuli/mouthOpen_small.png');\n mouthClosedImg = loadImage('stimuli/mouthClosed_small.png');\n}", "title": "" }, { "docid": "f1b8e33d2fc7dbb3aa77f85b53e653e4", "score": "0.7525942", "text": "preload() {\r\n\r\n // loading pin image\r\n this.load.image(\"pin\", \"pin.png\");\r\n this.load.image(\"back\", \"back.png\");\r\n }", "title": "" }, { "docid": "9c0c0d94b7e24f8be27e66b0a0bee8ba", "score": "0.75251746", "text": "function preload() {\n clownImage = loadImage(\"assets/images/sadClown.png\");\n clownImageLeftRight = loadImage(\"assets/images/clownLeftRight.png\");\n feltTextureImage = loadImage(\"assets/images/black-felt-texture.png\");\n}", "title": "" }, { "docid": "09fb5003d95a0bc3be27d38469187db9", "score": "0.7512721", "text": "function preload()\n{\n\tphotoBoard = loadImage('photoBoard.png');\n\tbonesKarpinskiImg = loadImage(\"karpinskiDog.png\");\n\tcecilKarpinskiImg = loadImage(\"karpinskiBros1.png\");\n\trobbieKrayImg = loadImage(\"krayBrothers2.png\");\n\tlinaLovelaceImg = loadImage(\"lina.png\");\n\tpawelKarpinskiImg = loadImage(\"karpinskiBros2.png\");\n\tannaKarpinskiImg = loadImage(\"karpinskiWoman.png\");\n\n}", "title": "" }, { "docid": "f746921d3eea91f1ead8d352ee652ab7", "score": "0.7512721", "text": "function preload () {\n // this preloads before the rest\n // img = loadImage('cat.jpg');\n}", "title": "" }, { "docid": "10a647b4fe9ab83935cc3abaa282b928", "score": "0.74974597", "text": "function preload(){\n xd = loadImage('images/alpha.jpg');\n playbutton = loadImage('images/sixfive.jpg');\n}", "title": "" }, { "docid": "163e1983d0ff751146573ee5820f6e1f", "score": "0.7497448", "text": "function preload() { // preload() runs once\n catImg = loadImage('cat.png');\n}", "title": "" }, { "docid": "f1d9750c98fa4259ccf59108ad77befd", "score": "0.7491801", "text": "function preload() {\n bgImage = loadImage(\"./assets/wide.jpg\");\n theDude = loadImage(\"./assets/character-right.png\");\n}", "title": "" }, { "docid": "3409ee997e6944dd6d288e2284906486", "score": "0.7456885", "text": "function preload(){\nplayerImg = loadImage(\"pictures/striker.png\");\t\ncoinImg1 = loadImage(\"pictures/redcoin.png\")\ncoinImg2 = loadImage(\"pictures/whitecoin.png\");\ncoinImg3 = loadImage(\"pictures/blackcoin.png\");\n}", "title": "" }, { "docid": "03caddedb39b3285a8ee46ee0bf0f27f", "score": "0.7451373", "text": "function preload() {\n\n kilz = loadImage(\"assets/images/kilz.png\");\n graff = loadImage(\"assets/images/ofsy.png\");\n bg = loadImage(\"assets/images/bg.jpg\");\n cops = loadImage(\"assets/images/cops3.png\");\n bart = loadImage(\"assets/images/simpzin.png\");\n lou = loadImage(\"assets/images/lou.png\");\n lambo = loadImage(\"assets/images/lambo.png\");\n rari = loadImage(\"assets/images/rari2.png\");\n porsche = loadImage(\"assets/images/porsche.png\")\n\n graffImages = [graff,lou];\n carImages = [cops,lambo,rari,porsche];\n\n\n\n}", "title": "" }, { "docid": "1c72c43a16360c59d9c198223ba706ea", "score": "0.7446133", "text": "function preload() {\n//Linking to bird, orange, money pics that are hosted in my files\n// Note :ask in class what the deal is with having to disable web security to access pics\n birdImage = loadImage(\"assets/images/bird.png\");\n orangeImage = loadImage(\"assets/images/orange.png\");\n moneyImage = loadImage(\"assets/images/money.png\");\n clownImage = loadImage(\"assets/images/clown.png\");\n}", "title": "" }, { "docid": "979afc62729fca29f82f0543cc2fcaa5", "score": "0.7445788", "text": "function preload(){\nimage4 = loadImage(\"skyline.jpg\");\n}", "title": "" }, { "docid": "c5c11cf6b335f0e2e3127551524ecbf5", "score": "0.7438941", "text": "function preload() {\n\n tlaloc = loadImage(\"img/tlaloc.svg\");\n tloquenahuaque = loadImage(\"img/tloquenahuaque.svg\");\n ocelotl_rev = loadImage(\"img/ocelotl_rev.svg\");\n ocelotl = loadImage(\"img/ocelotl.svg\");\n xolotl_rev = loadImage(\"img/xolotl_rev.svg\");\n xolotl = loadImage(\"img/xolotl.svg\");\n xochitl = loadImage(\"img/xochitl.svg\")\n\n}", "title": "" }, { "docid": "7b3031c466cdb5e29f0943e89ad153c4", "score": "0.74320555", "text": "function preload() {\n //loading images\n backgroundImg = loadImage(\"images/bg.jpg\");\n imImage = loadImage(\"images/iron.png\");\n stoneImg = loadImage(\"images/stone.png\");\n diamondImage = loadImage(\"images/diamond.png\");\n spikeImg = loadImage(\"images/spikes.png\");\n restartImg = loadImage(\"images/restart.png\")\n}", "title": "" }, { "docid": "6da8b8e7c2b169cfc38adff667fffeaf", "score": "0.74310726", "text": "function preload() { // preload() runs once\n\tcatImg = loadImage(\"cat.png\");\n}", "title": "" }, { "docid": "1b0ea509385251322f8a3853b09ee69b", "score": "0.7429711", "text": "function preload() {\n\n intro = loadImage('01-whisker.png');\n ready = loadImage('01-whisk.gif');\n learn = loadImage('dough.gif');\n fan = loadImage('res-fan.gif');\n thorn = loadImage('thorn.gif');\n\n}//end function preload()", "title": "" }, { "docid": "064ad3b43505268d42f415dbb1eea3fc", "score": "0.74249345", "text": "function preload() {\n \n\n g2 = loadImage(\"galax2.jpg\");\n g3 = loadImage(\"galax3.jpg\");\n g4 = loadImage(\"galax4.jpg\");\n g5 = loadImage(\"galax5.jpg\");\n g6 = loadImage(\"galax6.jpg\");\n g7 = loadImage(\"galax7.jpg\");\n}", "title": "" }, { "docid": "0cedefee51a45d3384c9f46fb339d497", "score": "0.74241686", "text": "function preload () {\n \n \n \n backgroundImg = loadImage(\"jungle.png\");\n monkey2=loadAnimation(\"Monkey_01.png\",\"Monkey_02.png\",\"Monkey_03.png\",\"Monkey_04.png\",\"Monkey_05.png\",\"Monkey_06.png\",\"Monkey_07.png\",\"Monkey_08.png\",\"Monkey_09.png\",\"Monkey_10.png\");\n \n bananaImg = loadImage(\"banana.png\");\n \n obstacleImg = loadImage(\"stone.png\");\n \n invland = loadImage(\"banana.png\");\n}", "title": "" }, { "docid": "2f4315cfeea9ec3481d2f65cd11511a3", "score": "0.7409327", "text": "function preload(){\n\n images[0] = loadImage('Assets/BedOne.png');\n images[1] = loadImage('Assets/Hall.png');\n images[2] = loadImage('Assets/BedThree.png');\n images[3] = loadImage('Assets/Master.png');\n images[4] = loadImage('Assets/BedTwo.png');\n images[5] = loadImage('Assets/bonus.png')\n\n}", "title": "" }, { "docid": "af511815fb2f14d333af0bce4bcf41fc", "score": "0.7405438", "text": "function preload() {\n clownImage = loadImage(\"assets/images/clown.png\");\n feltTextureImage = loadImage(\"assets/images/black-felt-texture.png\");\n dabImage = loadImage(\"assets/images/dabemo.jpeg\");\n rainbowImage = loadImage(\"assets/images/rainbow.png\");\n peachImage = loadImage(\"assets/images/peach.jpeg\");\n}", "title": "" }, { "docid": "60d442545609acdcfbf9e5140949097a", "score": "0.73905087", "text": "function preload() {\r\n backgroundImg = loadImage(\"./assets/background.gif\");\r\n towerImage = loadImage(\"./assets/tower.png\");\r\n \r\n //Step-2 loading of json and image\r\n boatSpriteSheet = loadImage(\"assets/boat/boat.png\");\r\n boatSpriteData = loadJSON(\"assets/boat/boat.json\");\r\n}", "title": "" }, { "docid": "4300a1e3b6c8c99b3b2ef7c0167fa8df", "score": "0.73869914", "text": "function preload(){\n\n img_red = loadImage('user_icons/user_icon_red.png');\n img_blue = loadImage('user_icons/user_icon_blue.png');\n img_green = loadImage('user_icons/user_icon_green.png');\n img_yellow = loadImage('user_icons/user_icon_yellow.png');\n\n Rbird = loadImage('bird_icons/scarlet_tanager.png');\n Bbird = loadImage('bird_icons/bluejay.png');\n Gbird = loadImage('bird_icons/tree_swallow.png');\n Ybird = loadImage('bird_icons/meadowlark.png');\n\n bg = loadImage('other/bg3.png');\n\n instructions = loadImage('bird_icons/instructions.png');\n\n}", "title": "" }, { "docid": "88eb92dcf18604a6dd1621f4c1e07aa1", "score": "0.7382799", "text": "function preload() {\n bedroom = loadImage(\"assets/bedroom.png\");\n enter = loadImage('assets/enter.png');\n door = loadImage('assets/door.png');\n\n knife = loadImage('assets/knife.png');\n news = loadImage('assets/news.png');\n phone = loadImage('assets/phone.png');\n search = loadImage('assets/search.png');\n tel = loadImage('assets/tel.png');\n blood = loadImage(\"assets/blood.png\");\n wakeup = loadImage(\"assets/wakeup.png\");\n text1 = loadImage(\"assets/text1.png\");\n text2 = loadImage(\"assets/text2.png\");\n\n\n body = loadImage('assets/body.png');\n bottom = loadImage('assets/bottom.png');\n mirror = loadImage('assets/mirror.png' );\n you = loadImage('assets/you.png');\n\n}", "title": "" }, { "docid": "141da57b3f8565785e219d8fcf207543", "score": "0.73761827", "text": "function preload () {\n this.load.image('sky', 'assets/sky.png')\n this.load.image('bird', 'assets/bird.png')\n this.load.image('pipe', 'assets/pipe.png')\n}", "title": "" }, { "docid": "7df7296b7ed608507cc421e8bc75c73e", "score": "0.73695564", "text": "function preload() {\n clownImage = loadImage(\"assets/images/clown.png\");\n feltTextureImage = loadImage(\"assets/images/black-felt-texture.png\");\n zigzagImage = loadImage(\"assets/images/zigzag.png\");\n laughImage = loadImage(\"assets/images/laugh.png\");\n cryImage = loadImage(\"assets/images/cry.png\");\n}", "title": "" }, { "docid": "47e36799529200a8fe74e63756a64342", "score": "0.7365835", "text": "function preload() {\n clownImage = loadImage(\"assets/images/clown.png\");\n feltTextureImage = loadImage(\"assets/images/black-felt-texture.png\");\n ghostImage = loadImage(\"assets/images/ghost.png\");\n emojiImage = loadImage(\"assets/images/emoji.png\");\n flowerImage = loadImage(\"assets/images/flower.png\");\n}", "title": "" }, { "docid": "5bdb829a19d9fe5f212a94cb7b293ef7", "score": "0.7364321", "text": "function preload() {\n \n ship1=loadAnimation(\"ship-1.png\", \"ship-2.png\",\"ship-3.png\", \"ship-4.png\");\n seaImage=loadImage(\"sea.png\") \n\n}", "title": "" }, { "docid": "ae384cb54c7af9f254ecf889dd66cdee", "score": "0.73621446", "text": "function preload() {\n this.load.image('ship', 'images/hero.png');\n this.load.image('ball', 'images/shinyball.png');\n this.load.image('sky', 'images/sunset.png');\n}", "title": "" }, { "docid": "11dd72ed01a827db961f78833d7ecbe5", "score": "0.7355237", "text": "function preload() {\n\n\tgame.load.image(\"gray\",\t\t\t\"asset/gray.jpg\");\n\tgame.load.image(\"platform\",\t\t\"asset/platform.jpg\");\n\tgame.load.image(\"player\", \t\t\"asset/man.gif\");\n\n\tgame.load.image(\"red\",\t\t\t\"asset/red.png\");\n\n}", "title": "" }, { "docid": "31d4cc40f32bb52c9c05ee04f4d45a87", "score": "0.7352442", "text": "function preload() {\n enemyImage = loadImage(\"assets/images/enemy.png\");\n backImage = loadImage(\"assets/images/background.jpg\");\n}", "title": "" }, { "docid": "bca5b3816668793c0e42ae506e898cec", "score": "0.7350574", "text": "function preload(){\n\tcatImage = loadImage(\"CAT.jpg\");\n}", "title": "" }, { "docid": "4e388ee63a1ced7498c4a5840865e7d7", "score": "0.7345967", "text": "function preload(){\n girl = loadImage('assets/startinggirl.png');\n smalltown1 = loadImage('assets/smalltown1.png');\n smalltown2 = loadImage('assets/smalltown2.png');\n speechbubble = loadImage('assets/speechbubble.png');\n windmill = loadImage('assets/Windmill.png');\n house = loadImage('assets/house.png');\n hospital = loadImage('assets/hospital.png');\n school = loadImage('assets/school.png');\n officetower = loadImage('assets/officetower.png');\n park = loadImage('assets/park.png');\n uparrow = loadImage('assets/uparrow.png');\n downarrow = loadImage('assets/downarrow.png');\n city1 = loadImage('assets/city1.png');\n city2 = loadImage('assets/city2.png');\n}", "title": "" }, { "docid": "dc5e2e3896e3fb1cded22c27bab0f241", "score": "0.7336216", "text": "function preload(){\n sun = loadImage('assets/sun.png');\n moon = loadImage ('assets/moon.png');\n}", "title": "" }, { "docid": "e54225231c3f28e22aa04843e42547bf", "score": "0.73181534", "text": "function preload() {\n imageList[0] = loadImage('assets/positano.jpg'); \t\t\t\n imageList[1] = loadImage('assets/oldcar.jpg');\n imageList[2] = loadImage('assets/hannah.jpg');\n imageList[3] = loadImage('assets/sunset.jpg');\n imageList[4] = loadImage('assets/sanfran.jpg');\n imageList[5] = loadImage('assets/victoria.jpg');\n imageList[6] = loadImage('assets/park.jpg');\n}", "title": "" }, { "docid": "c59d0455447dcaa04b7bc65742429fbd", "score": "0.7310072", "text": "function preload(){\r\n root = loadImage(\"tree.png\");\r\n boy = loadImage(\"boy.png\");\r\n}", "title": "" }, { "docid": "6d5d147510653eff3cb421e4673f2bbb", "score": "0.73034906", "text": "function preload() {\n titleScreen = loadImage(\"assets/images/TitlePlaceholder.png\");\n gameOverScreen = loadImage(\"assets/images/GameOverPlaceholder.png\");\n\n}", "title": "" }, { "docid": "aff37625f4ab6aa26a1374c7eb78e18e", "score": "0.7297774", "text": "function preload() {\n user.image = loadImage(\"assets/images/user.png\");\n // rubbish.image = loadImage(\"assets/images/star.png\");\n trashImg = loadImage(\"assets/images/trash.png\");\n bgImg = loadImage(\"assets/images/bg.png\")\n titleImg = loadImage(\"assets/images/title.png\")\n winImg = loadImage(\"assets/images/win.png\")\n gameOverImg = loadImage(\"assets/images/gameOver.png\")\n}", "title": "" }, { "docid": "f1e090fd2074e8554b77132ee2c9c94c", "score": "0.7296604", "text": "preloadLargeImages() {\n\t\tvar images1 = [];\n\t\tvar images2 = [];\n\t\tvar largeImages = this.rewardImageSets;\n\t\tlargeImages.forEach((set, i) => {\n\t\t\timages1[i] = new Image();\n\t\t\timages1[i].src = set.bg;\n\t\t\timages2[i] = new Image();\n\t\t\timages2[i].src = set.bottle;\n\t\t});\n\t}", "title": "" }, { "docid": "2bf4e74d05aa1250417af0314af6a42a", "score": "0.7281213", "text": "function preload() {\n img = loadImage('../images/pic1.jpg');\n}", "title": "" }, { "docid": "30fa0d297d3243fed9e664381f77b756", "score": "0.7277916", "text": "preload () {\n this.load.image('sky', 'assets/skies/space3.png')\n this.load.image('logo', 'assets/sprites/phaser3-logo.png')\n this.load.image('red', 'assets/particles/red.png')\n }", "title": "" }, { "docid": "1eb314cd50d39eabe9d31c525ecbe1da", "score": "0.72774637", "text": "function preload(){\n glass= loadImage('Glass_Bottle.png');\n}", "title": "" }, { "docid": "5883744d56cf93e00b9112f4a42c3ae5", "score": "0.72673273", "text": "function preload() {\n oscars = loadImage(\"oscars.png\");\n logo = loadImage(\"oscarslogo.png\");\n}", "title": "" }, { "docid": "9b6777e187cd8622186a90a0ca0db43c", "score": "0.7263928", "text": "function preload(){\n clickImg = loadImage('assets/rocket1.jpg');\n}", "title": "" }, { "docid": "1db504e2f9029c17636b00b4f1c5626d", "score": "0.7261948", "text": "function preload(){\n happyDog = loadImage('happy doggo.png');\n \n}", "title": "" }, { "docid": "53cd8d74f9ea4153ee2dd335c17c71b0", "score": "0.7257998", "text": "function preload(){\r\n bouquet = loadImage(\"bouquet.jpg\");\r\n chocolates=loadImage(\"chocolates.jpg\");\r\n loveLetter=loadImage(\"loveLetter.jpg\");\r\n movie=loadImage(\"movie.jpg\");\r\n shoppingBags=loadImage(\"shoppingbags.jpg\");\r\n dinner=loadImage(\"dinner.jpg\");\r\n compliment=loadImage(\"compliment.jpg\");\r\n picnic=loadImage(\"picnic.jpg\");\r\n car=loadImage(\"car.jpg\");\r\n boardwalk=loadImage(\"boardwalk.jpg\");\r\n origami=loadImage(\"origami.jpg\");\r\n games=loadImage(\"games.jpg\");\r\n mug=loadImage(\"mug.jpg\");\r\n jar=loadImage(\"jar.jpg\");\r\n teddy=loadImage(\"teddy.jpg\");\r\n listen=loadImage(\"listen.jpg\");\r\n hug=loadImage(\"hug.jpg\");\r\n iou=loadImage(\"iou.jpg\");\r\n\r\n}", "title": "" }, { "docid": "04362e6ecbb31b8ef658ea8bb844a233", "score": "0.72500235", "text": "preload() {\n this.load.image('plane', 'assets/plane.png');\n this.load.image('topPlane', 'assets/topPlane.png');\n for ( this.i = 1; this.i < 16; this.i++) {\n this.load.image(''+this.i, 'assets/luggage/'+this.i+'.png');\n }\n this.load.image('blryCld1', 'assets/clouds/bluryCloud1.png');\n this.load.image('blryCld2', 'assets/clouds/bluryCloud2.png');\n this.load.image('blryCld3', 'assets/clouds/bluryCloud3.png');\n this.load.image('blryCld4', 'assets/clouds/bluryCloud4.png');\n this.load.image('blryCld5', 'assets/clouds/bluryCloud5.png');\n this.load.image('blryCld6', 'assets/clouds/bluryCloud6.png');\n this.load.image('cld1', 'assets/clouds/cloud1.png');\n this.load.image('cld2', 'assets/clouds/cloud2.png');\n this.load.image('cld3', 'assets/clouds/cloud3.png');\n this.load.image('cld4', 'assets/clouds/cloud4.png');\n this.load.image('cld5', 'assets/clouds/cloud5.png');\n this.load.image('cld6', 'assets/clouds/cloud6.png');\n this.load.image('luggageIcon', 'assets/luggageIcon.png');\n this.load.image('startButton', 'assets/startButton.png');\n this.load.image('X', 'assets/X.png');\n }", "title": "" }, { "docid": "0176b89f18534ef9a85a5f5ce62640be", "score": "0.72408545", "text": "function preload() {\n \n //background\n background = loadImage(\"vaporwave.png\");\n \n //sun\n sun = loadGif(\"sun2.gif\");\n \n //grid horizontal\n lineh = loadImage(\"lineh.png\");\n \n //grid vertical\n gridImg = loadImage(\"grid.png\");\n \n //sky\n sky = loadImage(\"sky.png\");\n \n //city\n city = loadImage(\"city.png\");\n \n //characters\n /*eltonJohn = loadImage(\"../../elton-john.png\");\n FJM = loadImage(\"../../father john misty.png\")*/\n \n}//end preload", "title": "" }, { "docid": "f10a77c0ff99d8ae65390b3615b8e613", "score": "0.7217219", "text": "function preload(){\n faces = loadImage('images/happyface.png');\n\n}", "title": "" }, { "docid": "7e73d40e05c658aaf08e583ee096176c", "score": "0.7216117", "text": "function preload(imgOrder){\n var img = images[loadedCount];\n if (typeof(img) === \"undefined\") {\n img = images[loadedCount] = new Image();\n }\n img.onload = imgLoaded();\n img.src = imgPath + imgList[loadedCount];\n images[loadedCount] = img;\n }", "title": "" }, { "docid": "562e4007802e588675402f10f8c49def", "score": "0.72080165", "text": "function preload(){\r\n\tlet img = loadImage(\"Assets/alien.jpg\");\r\n\tlet img2 = loadImage (\"Assets/candy.jpg\");\r\n\tlet img3 = loadImage(\"Assets/human.jpg\");\r\n\tlet img4 = loadImage (\"Assets/heart.jpg\");\r\n\tmusic = loadSound(\"Assets/muzik.mp3\");\r\n\t//let img5 = loadImage(\"Assets/fence.jpg\");\r\n}", "title": "" }, { "docid": "9e19c8d496b7c9ea1857628d8d8550e6", "score": "0.7207155", "text": "function preload() {\n achtergrond = loadImage(\"images/backgrounds/lucht_2.jpg\");\n}", "title": "" }, { "docid": "8479b71399e80aaebe66aee488a093a5", "score": "0.72014403", "text": "function preload(){\n\tim = loadImage(\"assets/chdm_big.jpg\");\t\n}", "title": "" }, { "docid": "251be89cb0d6c40a68635bbdc0e3cb66", "score": "0.72004044", "text": "function preload() {\n $bg = loadImage('space/spacebg.jpg');\n for (let i = 0; i < 4; i++) {\n cats[i] = loadImage('cats/cat' + i + '.png');\n }\n\n}", "title": "" }, { "docid": "812805f1688a3edaa314e0bd7ec52e01", "score": "0.7186477", "text": "function preload() {\n scenarioImage = loadImage(\"imagens/cenario/floresta.png\");\n character = loadImage(\"imagens/personagem/correndo.png\");\n gameSound = loadSound(\"sons/trilha_jogo.mp3\");\n}", "title": "" }, { "docid": "1cbf02ea9683afafc049d7b303c91f49", "score": "0.7185261", "text": "function preload() {\n img = loadImage(\"img/hedge.jpg\")\n}", "title": "" }, { "docid": "5d88b33fa4be48db56a2177870048db1", "score": "0.7175099", "text": "function preload(){\n images = imagesSrc.map(i=>loadImage(i));\n}", "title": "" }, { "docid": "9556fa6722d43f375fa6e89cbd7617f7", "score": "0.7173695", "text": "function preload() {\n\twater = loadImage(\"img/face.jpg\");\n\tnoLoop();\n}", "title": "" }, { "docid": "12e5052cd4f3dd944a25ef18bfec5efa", "score": "0.71700895", "text": "function preload() {\r\n //arona\r\n img_arona_1 = loadImage('_assets/car_models/arona/arona-1-big.png');\r\n img_arona_2 = loadImage('_assets/car_models/arona/arona-2-big.png');\r\n img_arona_3 = loadImage('_assets/car_models/arona/arona-3-big.png');\r\n img_arona_4 = loadImage('_assets/car_models/arona/arona-4-big.png');\r\n}", "title": "" }, { "docid": "712cb268ec99e4866ed164cdd6204122", "score": "0.71652627", "text": "function preload() {\n targetImage = loadImage(\"assets/images/animals-target.png\");\n\n winningImage = loadImage(\"assets/images/winning-image.png\")\n\n decoyImage1 = loadImage(\"assets/images/animals-01.png\");\n decoyImage2 = loadImage(\"assets/images/animals-02.png\");\n decoyImage3 = loadImage(\"assets/images/animals-03.png\");\n decoyImage4 = loadImage(\"assets/images/animals-04.png\");\n decoyImage5 = loadImage(\"assets/images/animals-05.png\");\n decoyImage6 = loadImage(\"assets/images/animals-06.png\");\n decoyImage7 = loadImage(\"assets/images/animals-07.png\");\n decoyImage8 = loadImage(\"assets/images/animals-08.png\");\n decoyImage9 = loadImage(\"assets/images/animals-09.png\");\n decoyImage10 = loadImage(\"assets/images/animals-10.png\");\n}", "title": "" }, { "docid": "f92fe12de2c49d134aed6d9eab97e13e", "score": "0.71596766", "text": "function preload() {\n tear = loadModel('raindrop.obj');\n //img = loadImage(\"Assets/Water.jpg\");\n //drop = loadModel('raindrop.obj');\n //metal = loadImage('metal.jpg')\n\n}", "title": "" }, { "docid": "47e68d36b2513cf5483b9d9a9219ca89", "score": "0.7155166", "text": "function preload() {\n targetImage = loadImage(\"assets/images/animals-target.png\");\n\n decoyImage1 = loadImage(\"assets/images/animals-01.png\");\n decoyImage2 = loadImage(\"assets/images/animals-02.png\");\n decoyImage3 = loadImage(\"assets/images/animals-03.png\");\n decoyImage4 = loadImage(\"assets/images/animals-04.png\");\n decoyImage5 = loadImage(\"assets/images/animals-05.png\");\n decoyImage6 = loadImage(\"assets/images/animals-06.png\");\n decoyImage7 = loadImage(\"assets/images/animals-07.png\");\n decoyImage8 = loadImage(\"assets/images/animals-08.png\");\n decoyImage9 = loadImage(\"assets/images/animals-09.png\");\n decoyImage10 = loadImage(\"assets/images/animals-10.png\");\n}", "title": "" }, { "docid": "47e68d36b2513cf5483b9d9a9219ca89", "score": "0.7155166", "text": "function preload() {\n targetImage = loadImage(\"assets/images/animals-target.png\");\n\n decoyImage1 = loadImage(\"assets/images/animals-01.png\");\n decoyImage2 = loadImage(\"assets/images/animals-02.png\");\n decoyImage3 = loadImage(\"assets/images/animals-03.png\");\n decoyImage4 = loadImage(\"assets/images/animals-04.png\");\n decoyImage5 = loadImage(\"assets/images/animals-05.png\");\n decoyImage6 = loadImage(\"assets/images/animals-06.png\");\n decoyImage7 = loadImage(\"assets/images/animals-07.png\");\n decoyImage8 = loadImage(\"assets/images/animals-08.png\");\n decoyImage9 = loadImage(\"assets/images/animals-09.png\");\n decoyImage10 = loadImage(\"assets/images/animals-10.png\");\n}", "title": "" }, { "docid": "03bc86a9bb268c872f1ffca32fcaa060", "score": "0.7131618", "text": "function preload() {\n img = loadImage('RedBurns_close.png');\n}", "title": "" }, { "docid": "02142e7e6743a69c8bff377343742f83", "score": "0.7129804", "text": "function preload() {\n // Great place to load images\n}", "title": "" }, { "docid": "9fd2929b6167d66f0b9db300334fce5f", "score": "0.71291685", "text": "function preload() {\n targetImage = loadImage(\"assets/images/animals-target.png\");\n\n decoyImage1 = loadImage(\"assets/images/animals-01.png\");\n decoyImage2 = loadImage(\"assets/images/animals-02.png\");\n decoyImage3 = loadImage(\"assets/images/animals-03.png\");\n decoyImage4 = loadImage(\"assets/images/animals-04.png\");\n decoyImage5 = loadImage(\"assets/images/animals-05.png\");\n decoyImage6 = loadImage(\"assets/images/animals-06.png\");\n decoyImage7 = loadImage(\"assets/images/animals-07.png\");\n decoyImage8 = loadImage(\"assets/images/animals-08.png\");\n decoyImage9 = loadImage(\"assets/images/animals-09.png\");\n decoyImage10 = loadImage(\"assets/images/animals-10.png\");\n\n\n}", "title": "" }, { "docid": "5d2d40f03849294342a809dbbbd45fef", "score": "0.71275973", "text": "function preload(){\n\tbook = loadAnimation(\"assets/a.png\",\"assets/b.png\",\"assets/c.png\",\"assets/d.png\");\n\ttable = loadImage(\"table.png\");\n}", "title": "" }, { "docid": "d7f9c1b4340996bd06f0a67ee619e01d", "score": "0.7127565", "text": "preload(){\n\n //this.load.image() loads the images into Scene\n this.load.image('background', 'Assets/!!!ASSETSINUSE!!!/bg9.png');\n\n this.load.image('player', 'Assets/!!!ASSETSINUSE!!!/player.png',{\n frameWidth: 100,\n frameHeight: 100\n });\n\n this.load.image(\"earth\", \"Assets/!!!ASSETSINUSE!!!/Earth.png\",{\n frameWidth: 100,\n frameHeight: 100\n });\n this.load.image(\"meteor1\", \"Assets/!!!ASSETSINUSE!!!/Stone1.png\",{\n frameWidth: 100,\n frameHeight: 100\n });\n this.load.image(\"meteor2\", \"Assets/!!!ASSETSINUSE!!!/Stone2.png\",{\n frameWidth: 100,\n frameHeight: 100\n });\n this.load.image(\"meteor3\", \"Assets/!!!ASSETSINUSE!!!/Stone3.png\",{\n frameWidth: 100,\n frameHeight: 100\n });\n this.load.image(\"meteor4\", \"Assets/!!!ASSETSINUSE!!!/Stone4.png\",{\n frameWidth: 100,\n frameHeight: 100\n });\n\n }", "title": "" }, { "docid": "42a3e1a9ed35242efc87f674bf36877c", "score": "0.7120964", "text": "function preload() {\n LBCLogoImg = loadImage(\n \"https://raw.githubusercontent.com/17177/HousePointsSystem/main/LBC-logo.png\"\n );\n data = loadJSON(\n \"https://raw.githubusercontent.com/17177/HousePointsSystem/main/data.json\"\n );\n birdImgStr = [\n \"https://raw.githubusercontent.com/17177/HousePointsSystem/main/takehe.png\",\n \"https://raw.githubusercontent.com/17177/HousePointsSystem/main/tieke.png\",\n \"https://raw.githubusercontent.com/17177/HousePointsSystem/main/tara%20iti.png\",\n \"https://raw.githubusercontent.com/17177/HousePointsSystem/main/kea.png\",\n \"https://raw.githubusercontent.com/17177/HousePointsSystem/main/kokako.png\",\n ];\n\n for (i = 0; i < 5; i++) {\n birdImg[i] = loadImage(birdImgStr[i]);\n }\n}", "title": "" }, { "docid": "3517e009312c06e0b2a724d0aa675b89", "score": "0.71183336", "text": "function preload(){\n img = loadImage(\"data/hand.jpg\");\n}", "title": "" }, { "docid": "587372b4412e16bd40855c43d3b87bd0", "score": "0.71043783", "text": "function preload() {\n achtergrond = loadImage(\"images/backgrounds/boom_mist.jpg\");\n}", "title": "" }, { "docid": "9eab7b9ed34911b53b6c48f1605f12f3", "score": "0.71027744", "text": "function preload(){\r\nimage1 = loadImage(\"image1.png\")//blue\r\nimage2 = loadImage(\"image2.png\")//red\r\nimage3 = loadImage(\"image3.png\")//green\r\nimage4 = loadImage(\"image4.png\")//yellow\r\nsound1 = loadSound('song1.mp3')\r\nsound2 = loadSound('song2.mp3')\r\n}", "title": "" }, { "docid": "542e788d38b1672629cd8c92927200ee", "score": "0.70920616", "text": "function preload() {\n // loads the tile sprite sheets\n for (let i = 0; i < Tiles.length; i++) {\n if (Tiles[i] && Tiles[i][2]) {\n console.log(`Loaded sprites for: ${Tiles[i][2]}`)\n Tiles[i][2] = loadImage(assetsPath+Tiles[i][2]+'.png')\n }\n }\n // loads the logo tile sprite sheets\n for (let i = 0; i < Logos.length; i++) {\n if (Logos[i]) {\n console.log(`Loaded sprites for: ${Logos[i]}`)\n Logos[i] = loadImage(assetsPath+Logos[i]+'.png')\n }\n }\n // loads the connection sprite sheets\n for (let i = 0; i < Connections.length; i++) {\n if (Connections[i] && Connections[i][2]) {\n console.log(`Loaded sprites for: ${Connections[i][2]}`)\n Connections[i][2] = Connections[i][2].map(value => loadImage(assetsPath+value+'.png'))\n }\n }\n}", "title": "" }, { "docid": "14044565b9cba6566c3e91fbc40d485a", "score": "0.7087246", "text": "function preload() {\n loadImages();\n loadAnimations();\n }", "title": "" } ]
5ba0241372260708c666297f96f7007b
Calculates the focal length from the current .fov and .filmGauge.
[ { "docid": "83bc4b0457794d794013df2e0efa005b", "score": "0.8157715", "text": "getFocalLength() {\n\n\t\tconst vExtentSlope = Math.tan( DEG2RAD * 0.5 * this.fov );\n\n\t\treturn 0.5 * this.getFilmHeight() / vExtentSlope;\n\n\t}", "title": "" } ]
[ { "docid": "09d93c2bf4b06bd0b5e42da8e0798788", "score": "0.71487635", "text": "setFocalLength( focalLength ) {\n\n\t\t/** see {@link http://www.bobatkins.com/photography/technical/field_of_view.html} */\n\t\tconst vExtentSlope = 0.5 * this.getFilmHeight() / focalLength;\n\n\t\tthis.fov = RAD2DEG * 2 * Math.atan( vExtentSlope );\n\t\tthis.updateProjectionMatrix();\n\n\t}", "title": "" }, { "docid": "09d93c2bf4b06bd0b5e42da8e0798788", "score": "0.71487635", "text": "setFocalLength( focalLength ) {\n\n\t\t/** see {@link http://www.bobatkins.com/photography/technical/field_of_view.html} */\n\t\tconst vExtentSlope = 0.5 * this.getFilmHeight() / focalLength;\n\n\t\tthis.fov = RAD2DEG * 2 * Math.atan( vExtentSlope );\n\t\tthis.updateProjectionMatrix();\n\n\t}", "title": "" }, { "docid": "bd91b9b8a74fb32cdea2642d1b8d443c", "score": "0.6427844", "text": "function find_focal_length()\n{\n for (var i = 0; i < telescope_info.length; i++) {\n if (current_telescope_name.indexOf(telescope_info[i][0]) != -1) {\n return telescope_info[i][1];\n }\n }\n return 0;\n}", "title": "" }, { "docid": "1125a563068b9d8a780edb8deb9071f4", "score": "0.63155574", "text": "get focal() {\n\t\treturn this.__focal;\n\t}", "title": "" }, { "docid": "78ff2270603ebe330634186d6cb9f921", "score": "0.5847027", "text": "getFieldOfView() {\n return this.camera.fov;\n }", "title": "" }, { "docid": "91bb0d39d2e7be250f7a853255082219", "score": "0.56387895", "text": "function flameLength(fli) {\n return fli <= 0 ? 0 : 0.45 * Math.pow(fli, 0.46);\n}", "title": "" }, { "docid": "b3c6ad3d6092d4dc5f5a81bc6d95f7af", "score": "0.5635796", "text": "function updateFov(view, newFov) {\n // Calculate camera constraints so volume isn't offscreen\n if(view == '#view-x') { // X camera\n var halfFrustumHeight = camXPos[2] * Math.tan(0.5 * newFov);\n var halfFrustumWidth = halfFrustumHeight * Y_SIZE / Z_SIZE;\n maxPanX[0] = Y_SIZE * 0.5 - halfFrustumWidth;\n maxPanX[1] = Z_SIZE * 0.5 - halfFrustumHeight;\n \n applyMaxPan('x');\n $('#view-x').attr('position', camXPos[0] + ',' + camXPos[1] + ',' + camXPos[2]);\n } else if(view == '#view-y') { // Y camera\n var halfFrustumHeight = camYPos[2] * Math.tan(0.5 * newFov);\n var halfFrustumWidth = halfFrustumHeight * X_SIZE / Z_SIZE;\n maxPanY[0] = X_SIZE * 0.5 - halfFrustumWidth;\n maxPanY[1] = Z_SIZE * 0.5 - halfFrustumHeight;\n \n applyMaxPan('y');\n $('#view-y').attr('position', camYPos[0] + ',' + camYPos[1] + ',' + camYPos[2]);\n } else { // Z camera\n var halfFrustumHeight = camZPos[2] * Math.tan(0.5 * newFov);\n var halfFrustumWidth = halfFrustumHeight * X_SIZE / Y_SIZE;\n maxPanZ[0] = X_SIZE * 0.5 - halfFrustumWidth;\n maxPanZ[1] = Y_SIZE * 0.5 - halfFrustumHeight;\n \n applyMaxPan('z');\n $('#view-z').attr('position', camZPos[0] + ',' + camZPos[1] + ',' + camZPos[2]);\n }\n \n $(view).attr('fieldOfView', newFov);\n \n // Zoomed all the way out\n if(newFov > MAX_FOV) {\n if(view == '#view-x') {\n resetZoom('x');\n } else if(view == '#view-y') {\n resetZoom('y');\n } else {\n resetZoom('z');\n }\n }\n \n // Update blue selection lines (see windows.js)\n updateLines();\n \n // Update brown projection markers (see maxProj.js)\n updateProjMarkers();\n \n // Disable spatial search if not fully-zoomed out\n if(!checkZoomedOut()) {\n $('#ss-start-btn').prop('disabled', true);\n $('#ss-zoom-warning').css('display', 'block');\n }\n}", "title": "" }, { "docid": "08b4194e0d54d90f05e3931d7c50f6fb", "score": "0.55682164", "text": "setFieldOfView(fov) {\n const { minimumFieldOfView, maximumFieldOfView } = this[$options];\n fov = clamp(fov, minimumFieldOfView, maximumFieldOfView);\n this[$goalLogFov] = Math.log(fov);\n }", "title": "" }, { "docid": "9c50cb77562277a7380a277e2bb59caa", "score": "0.5552754", "text": "function updateFOV(event, ui) {\r\n cameraFOV = (ui.value);\r\n FOV = cameraFOV;\r\n}", "title": "" }, { "docid": "e5e270cbac3ac08c19c85e7d40658735", "score": "0.547939", "text": "function lightboxGetFocalPoint() {\n \n var focalstr = '';\n \n var canvas = document.querySelector('#canvas');\n\n if (!canvas)\n return null;\n \n // normalize focalpoint\n var xorigin = canvas.width / 2;\n var yorigin = canvas.height / 2;\n \n var x = canvas.focalpoint.x - xorigin;\n var y = canvas.focalpoint.y - yorigin;\n \n x = x / (canvas.width / 2);\n y = y / (canvas.height / 2);\n y = y * -1.0;\n \n print('focal ' + x + ', ' + y);\n \n focalstr += x + ',' + y;\n \n return focalstr;\n \n}", "title": "" }, { "docid": "9a032112288c9151744aca5300077599", "score": "0.5360919", "text": "function set_fov (theta) {\r\n fov = radians(theta);\r\n}", "title": "" }, { "docid": "7909e7f1289fabd7da41a79629244f37", "score": "0.5319159", "text": "function flameLengthThomas$1(fli) {\n return fli <= 0 ? 0 : 0.2 * Math.pow(fli, 2 / 3);\n} // Active crown fire heat per unit area,", "title": "" }, { "docid": "4e5140498352ee5a93b932837b3b9af2", "score": "0.5247472", "text": "getProjectionRectangle() {\n let tanFov = Math.tan(Math.PI * this.fieldOfView / 360); // Half of the angle, to calculate dimension from the center -> right angle\n let tanHorizontal = 0;\n let tanVertical = 0;\n if (this.direction == FIELD_OF_VIEW.DIAGONAL) {\n let aspect = Math.sqrt(this.aspectRatio);\n tanHorizontal = tanFov * aspect;\n tanVertical = tanFov / aspect;\n }\n else if (this.direction == FIELD_OF_VIEW.VERTICAL) {\n tanVertical = tanFov;\n tanHorizontal = tanVertical * this.aspectRatio;\n }\n else { //FOV_DIRECTION.HORIZONTAL\n tanHorizontal = tanFov;\n tanVertical = tanHorizontal / this.aspectRatio;\n }\n return FudgeCore.Rectangle.GET(0, 0, tanHorizontal * 2, tanVertical * 2);\n }", "title": "" }, { "docid": "04383d3980cd6ee20fea782f370b972d", "score": "0.5223929", "text": "function foco(campo) {focaliza(campo,'');}", "title": "" }, { "docid": "0a0b78df5be201c81689f429829655cd", "score": "0.52038455", "text": "function adjustFocalRect(focalPoint) {\n\tvar fr = $('#focalRect');\n\tvar img = $('previewImg');\n\tif (focalPoint) {\n\t\tvar left = focalPoint.left * img.width() - fr.width()/2,\n\t\ttop = focalPoint.top * img.height() - fr.height()/2;\n\n\t\tleft = left < 0 ? 0 : left > img.width() ? img.width() - fr.width()/2 : left;\n\t\ttop = top < 0 ? 0 : top > img.height() ? img.height() - fr.height()/2 : top;\n\n\t\tfr.css('left', left)\n\t\t.css('top', top);\n\t} else {\n\t\teditedFileData.fileData.focalPoint = {\n\t\t\tleft: ((fp.position().left + fp.width()/2)/img.width()),\n\t\t\ttop: ((fp.position().top + fp.height()/2)/img.height())\n\t\t};\n\t}\n}", "title": "" }, { "docid": "d3ca2db8135562eb0a5179db46483142", "score": "0.5198514", "text": "getCurrentViewingDistance() {\n\n const width = this.viewer.container.clientWidth;\n const height = this.viewer.container.clientHeight;\n\n const ray = this.viewer.camera.getPickRay(new Cesium.Cartesian2(width / 2, height / 2));\n const position = this.viewer.scene.globe.pick(ray, this.viewer.scene);\n\n if (position !== undefined)\n return Cesium.Cartesian3.distance(this.viewer.camera.positionWC, position);\n\n return 5000.0;\n }", "title": "" }, { "docid": "eea6bcd1308fc728d0a31446ff8555e4", "score": "0.5192182", "text": "function calculateLength(v) {\n return Math.sqrt(v.x * v.x + v.y * v.y);\n}", "title": "" }, { "docid": "cfc2a03dc5918440f16c428a283859db", "score": "0.5147797", "text": "calcLength(){\n return Math.sqrt(Math.pow(this.calcWidth(), 2) + Math.pow(this.calcHeight(), 2)); \n }", "title": "" }, { "docid": "d3400ae142bace55ab0fd2d818efad7b", "score": "0.51127553", "text": "function calculateViewportWidth()\n{\n let verticalFOV = THREE.MathUtils.degToRad( camera.fov ); // convert vertical fov to radians\n threeHeight = 2 * Math.tan( verticalFOV / 2 ) * cameraDist; // visible height\n threeWidth = threeHeight * camera.aspect; // visible width\n}", "title": "" }, { "docid": "076d191f6dc4a8d74ab96eb4ed1dec33", "score": "0.510846", "text": "function calculateWaveLength() {\n\t\tif(game.gameStatus != 'started') return false;\n\t\twaveSpeed = (oneSecInPx / oneMtInPx);\n\t\twaveLength = waveSpeed / game.frequency;\n\t\tgame.dashBoardTxtArr[1].setText(parseFloat(waveLength).toFixed(2));\n\t}", "title": "" }, { "docid": "1c5c4a7ba2e566c7727202742897033d", "score": "0.50697154", "text": "get length() {\n return Math.sqrt(this.dx ** 2 + this.dy ** 2);\n }", "title": "" }, { "docid": "c99a4535dfcf538a7c02d70b878f2628", "score": "0.49928126", "text": "function setFov (fov_theta) {\n var aspect = window.innerHeight / window.innerWidth;\n var fov_phi = 2 * Math.atan(aspect * Math.tan(fov_theta / 2));\n var params = { theta: fov_theta, phi: fov_phi };\n TAGGER.orientation.setFov(params);\n TAGGER.graphics.setFov(params);\n }", "title": "" }, { "docid": "964e06e68eaa0fc8e061a5893c978e57", "score": "0.49511996", "text": "setLength() {\n this.totallength = 0;\n\n for (var i = 0; i < this.controlPoints.length - 1; i++) {\n var dv = vec3.create();\n vec3.subtract(dv, this.controlPoints[i], this.controlPoints[i + 1]);\n this.totallength += Math.sqrt(Math.pow(dv[0], 2) + Math.pow(dv[1], 2) + Math.pow(dv[2], 2));\n }\n }", "title": "" }, { "docid": "6df13f6024daf01a386b39cc6938389e", "score": "0.49494714", "text": "function fctnReduceGravity() {\n fltGravity = fltGravity/2;\n}", "title": "" }, { "docid": "58d0938e25da082dac2e764c170e155d", "score": "0.49402112", "text": "function vLength(p) {\n return Math.sqrt(p.x * p.x + p.y * p.y);\n}", "title": "" }, { "docid": "c3907adace7b07f8ee132a4b1b0ab712", "score": "0.49198818", "text": "get length() {\n return Math.sqrt(Math.pow(this.x, 2) + Math.pow(this.y, 2));\n }", "title": "" }, { "docid": "b749c04905bcd255e83c480cbfd283fd", "score": "0.49184763", "text": "function get_length(v) {\n return Math.sqrt(v.x * v.x + v.y * v.y)\n}", "title": "" }, { "docid": "6f5aef25efd4fca032c1481ba3e7c457", "score": "0.49167055", "text": "function lengthToWidthRatio$1(wspd20) {\n return 1 + 0.125 * (wspd20 / 88); // Wind speed must be in miles per hour\n}", "title": "" }, { "docid": "da875d6aeb3183731cdbe1af9d727e95", "score": "0.4911674", "text": "calculateForces() {\n\t\t//console.log(`fy:${this.fy}`);\n\t\tif (this.y == this.maxY) {\n\t\t\t//if (Math.abs(this.fx) > this.fXDeadzone)\n\t\t\t//\tthis.fx *= (.7/*1 - this.frictionFactor*/);\n\t\t\t//else\n\t\t\t//\tthis.fx = 0;\n\t\t}\n\t\telse\n\t\t\tthis.fy += this.fg;\n\t\t//console.log(`fy:${this.fy}`);\n\t}", "title": "" }, { "docid": "c6bb76db0628d76f27ab8ebe749abbb2", "score": "0.48690072", "text": "function OnLengthSliderChange ()\r\n {\r\n _dLengthPct = document.getElementById ('lengthSlider').value;\r\n document.getElementById ('lengthOutput').value = _dLengthPct;\r\n\r\n _dPendLength = _dMaxPendLength * _dLengthPct * 0.01;\r\n\r\n drawScreen ();\r\n }", "title": "" }, { "docid": "80dc913571cbfbf0eb0598571a77450d", "score": "0.48602965", "text": "function adjustFocalPoint(focalPoint) {\n\tvar fp = $('#focalPoint');\n\tvar img = $('#previewImg');\n\tif (focalPoint) {\n\t\tvar left = focalPoint.left * img.width() - fp.width()/2,\n\t\ttop = focalPoint.top * img.height() - fp.height()/2;\n\n\t\tleft = left === 0 ? '50%' : left;\n\t\ttop = top === 0 ? '50%' : top;\n\t\tfp.css('left', left).css('top', top);\n\n\t} else {\n\t\teditedFileData.fileData.focalPoint = {\n\t\t\tleft: ((fp.position().left + fp.width()/2)/img.width()),\n\t\t\ttop: ((fp.position().top + fp.height()/2)/img.height())\n\t\t};\n\t}\n\tfp.css('position', 'absolute');\n\n}", "title": "" }, { "docid": "44be0c8b98aca7f3e2e5787e3a45694b", "score": "0.48440996", "text": "function tine_length(frequency) { return Math.sqrt(0.162 * thick / frequency * Math.sqrt(Y/density));}", "title": "" }, { "docid": "0a55a9c3fa87b2b17e74ac0821778385", "score": "0.4830162", "text": "function getLength(foods, f){\n return f(foods.length);\n}", "title": "" }, { "docid": "650ab2ee399bf65309f5fafd29ec8f77", "score": "0.48266566", "text": "get length(){\n return Math.sqrt(Math.pow(this.x,2)+Math.pow(this.y,2));\n }", "title": "" }, { "docid": "650ab2ee399bf65309f5fafd29ec8f77", "score": "0.48266566", "text": "get length(){\n return Math.sqrt(Math.pow(this.x,2)+Math.pow(this.y,2));\n }", "title": "" }, { "docid": "ad20588a9e486a2e37e359137f2d4655", "score": "0.48244035", "text": "function Calculate( h, day, lat, lon, timeZone, len ) {\n var result = Planetcalc.Calculate318( {\n \"day\" : day, \"plat\" : lat, \"plon\" : lon, \"gmtdiff\" : timeZone\n }\n );\n if ( result.altitude > 0 && result.altitude != 90 ) {\n len.SetValue( h / Math.tan( result.altitude / 180 * Math.PI ) );\n } else {\n len.SetValue( 0 );\n }\n}", "title": "" }, { "docid": "a02ec55c103b77b18db05850ba8422e7", "score": "0.48242104", "text": "length() {\r\n\t return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w);\r\n\t }", "title": "" }, { "docid": "a02ec55c103b77b18db05850ba8422e7", "score": "0.48242104", "text": "length() {\r\n\t return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w);\r\n\t }", "title": "" }, { "docid": "d877bdd96e1a6a684923c6d080ce1a3c", "score": "0.48110947", "text": "get length() {\n return Math.sqrt((this.x * this.x) + (this.y * this.y));\n }", "title": "" }, { "docid": "9a3a9643117491f2b0a7ef42bf705276", "score": "0.48020348", "text": "leng() { return this._leng = Math.sqrt(this.x * this.x + this.y * this.y) }", "title": "" }, { "docid": "285af8e8e9332dd80dbbc50dd7349ab8", "score": "0.47866514", "text": "get floorsCount() {\n return this._floorsCount;\n }", "title": "" }, { "docid": "cf54e7266f5a1da08ca0f38c1a3e0afe", "score": "0.47855592", "text": "length() {\n return Math.sqrt((this.x * this.x) + (this.y * this.y) + (this.z * this.z) + (this.w * this.w));\n }", "title": "" }, { "docid": "046ad984d052ac435f337ddc3657b26e", "score": "0.47807637", "text": "function getFrequencyTriggerWindowLength () {\n\n return GOERTZEL_FILTER_WINDOW_LENGTHS[getSelectedRadioValue('goertzel-filter-window-radio')];\n\n}", "title": "" }, { "docid": "2bb64aefafe88088c0eefd7cc1367836", "score": "0.47797444", "text": "static get MAX_VELOCITY() { return 3; }", "title": "" }, { "docid": "3d40a1f31f3f8b388aee58d47aae49fa", "score": "0.47787386", "text": "Mercury()\n {\n return parseFloat ( (this.Age() * .24).toFixed() );\n }", "title": "" }, { "docid": "4f6f3e9e58aafd219ee9f6d631b82470", "score": "0.47753313", "text": "updateProjection() {\n\n var fov = uon_math.toDegrees(2 * Math.atan(Math.tan(uon_math.toRadians(this._fov) * 0.5) / this._zoom));\n\n this._projection.makePerspective(fov, this._aspect, this._near, this._far);\n }", "title": "" }, { "docid": "a1ee6d16c3c3211f448bab498ced5529", "score": "0.47732246", "text": "get cameraHeight() {\n // ### Sync with the way geoviz is computing the zoom level.\n return this.mapView.camera.position.z;\n }", "title": "" }, { "docid": "7f011847563fe866d3ef0f7714c4765c", "score": "0.475667", "text": "function vLength(v) {\n return Math.sqrt(v.x * v.x + v.y * v.y + v.z * v.z);\n}", "title": "" }, { "docid": "89a617f18fea58434854345a88f5ff6b", "score": "0.47556868", "text": "get shapeFilterResolution() {\r\n return this.i.mp;\r\n }", "title": "" }, { "docid": "c08a8ca85def639da212e538bd57c62e", "score": "0.47472906", "text": "get length(){\r\n return Math.sqrt(this.x * this.x + this.y * this.y);\r\n }", "title": "" }, { "docid": "b1ae364b51a35e32a9faef8405e1b14c", "score": "0.4746669", "text": "getDrawerWidth(){return this.drawer_base_face_dimensions_axes[0];}", "title": "" }, { "docid": "46ebf08073bdb894635fe0073796a686", "score": "0.47445142", "text": "get area() {\n\n // Calculate the sum of face area\n const value = this.reduce((sum, { area }) => add(sum, Number(area)), 0);\n\n // Return as a unit in meters\n return toMeters(value);\n }", "title": "" }, { "docid": "89b3e64ef15eba7f329f7f19cc5db0e7", "score": "0.47399148", "text": "lensq() {\n return Math.pow(this.x, 2) + Math.pow(this.y, 2);\n }", "title": "" }, { "docid": "6ea2ed75824b83244fdb87f57a2e053a", "score": "0.47380158", "text": "updateViews()\n\t{\n\t\tif (this.graph.views[this.defaultView][0] == \"perspective\") \t\n\t\t{\n\t\t\tvar near = this.graph.views[this.defaultView][1];\n\t\t\tvar far = this.graph.views[this.defaultView][2];\t\n\t\t\tvar fov = this.graph.views[this.defaultView][3];\n\t\t\tvar from = this.graph.views[this.defaultView][4];\n\t\t\tvar to = this.graph.views[this.defaultView][5];\n\t\t\tthis.camera = new CGFcamera (fov, near, far, from, to);\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\tvar near = this.graph.views[this.defaultView][1];\n\t\t\tvar far = this.graph.views[this.defaultView][2];\n\t\t\tvar left = this.graph.views[this.defaultView][3];\n\t\t\tvar right = this.graph.views[this.defaultView][4];\n\t\t\tvar top = this.graph.views[this.defaultView][5];\n\t\t\tvar bottom = this.graph.views[this.defaultView][6];\n\t\t\tvar from = this.graph.views[this.defaultView][7];\n\t\t\tvar to = this.graph.views[this.defaultView][8];\n\t\t\tthis.camera = new CGFcameraOrtho (left, right, bottom, top, near, far, from, to, [0,1,0]);\n\t\t}\t\t\n\t\t\n\t\tthis.interface.setActiveCamera(this.camera);\n\t}", "title": "" }, { "docid": "9d4a712b5ac1ada2b7f2dbcc9d9a6871", "score": "0.473404", "text": "get averageFPS() {\n return 1000.0 / this._rollingFrameTime.average;\n }", "title": "" }, { "docid": "4b39f4426d110737cee0d5fb95de17c8", "score": "0.4731841", "text": "length() {\n return Math.sqrt((this._x * this._x) + (this._y * this._y) + (this._z * this._z) + (this._w * this._w));\n }", "title": "" }, { "docid": "25acc0bbc4aa65317b9185b2b2557281", "score": "0.47054482", "text": "getMaxLength() {\n var maxLength = (this.maxLengthPercent/100) * windowHeight;\n return maxLength;\n }", "title": "" }, { "docid": "42770892e78ce8fb6179e96a9e065b29", "score": "0.46880582", "text": "length() {\n return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w);\n }", "title": "" }, { "docid": "f200f28cb18d405537ae13087233362e", "score": "0.4681576", "text": "function calcDist(val){\n\t//Convert time (\"m:(s)s\") to seconds\n\tvar secs = timeToSec(val.time);\n\t//Grab duration of video\n\tvar dur = Popcorn(\"#video\").duration();\n\t//Calculate ratio of time/duration\n\tvar ratio = secs / dur;\n\t//Grab width of timeline in pixels\n\tvar wdth = document.getElementById(\"visualPoints\").style.width;\n\t//Trim for calculations\n\twdth = wdth.substr(0,wdth.length - 2);\n\t//alert(\"Secs: \" + secs + \" Dur: \" + dur + \" Ratio: \" + ratio + \" Width: \" + wdth);\n\t//Return offset value in pixels calculated using ratio\n\treturn (ratio * wdth);\n}", "title": "" }, { "docid": "28ace9db7f4019f884cd9c9c3b2c80d6", "score": "0.46738115", "text": "Fs(){\n if(this.Fy == 60){\n return 32000;\n }\n else{\n return 20000;\n }\n }", "title": "" }, { "docid": "430220624fe8a230a7fb0cc37f8ba286", "score": "0.46697196", "text": "length() {\n return (Math.sqrt(Math.pow(this.__x), 2) + (Math.pow(this.__y), 2));\n }", "title": "" }, { "docid": "5b9a8834a927a4196b6ae02ba5e2e2ba", "score": "0.46613684", "text": "findDistToCamera(){\n\t\treturn distance3(this.p3,cameras[camera].P);\n\t}", "title": "" }, { "docid": "1d50bb58c221d0d1056d891026f3563e", "score": "0.4658502", "text": "get getMagnitude() {\n return Math.sqrt(this.x * this.x + this.y * this.y);\n }", "title": "" }, { "docid": "b7ca4d08596aeb5189b19341cb2ed516", "score": "0.46559653", "text": "function getUvExposure() {\n\ttry {\n\t\taddvaluesToArray(\"UV EXPOSURE\", \"NA\", \"\", \"\", 0, []);\n\t\tloadHealthDatas();\n\t} catch(ex) {\n\t\tcommonFunctions.closeActivityIndicator();\n\t\tcommonFunctions.handleException(\"healthdatas\", \"getUvExposure\", ex);\n\t}\n}", "title": "" }, { "docid": "46514a3922b82b795d14cc6b64656379", "score": "0.46542418", "text": "function getCameraSize() {\n const vFOV = (obj.camera.fov * Math.PI) / 180;\n const h = 2 * Math.tan(vFOV / 2) * Math.abs(obj.camera.position.z);\n const w = h * obj.camera.aspect;\n return [w, h];\n }", "title": "" }, { "docid": "414e52383edecc3eaa0022919bcf3584", "score": "0.4653561", "text": "len() {\n return Math.sqrt(this.x * this.x + this.y * this.y);\n }", "title": "" }, { "docid": "d5f8c648c7abf27887abd6fb8d2843eb", "score": "0.46355507", "text": "getFps() {\n return this._fps;\n }", "title": "" }, { "docid": "6de39fc6657182403068618a8d38a7a2", "score": "0.46342897", "text": "length() {\n return Math.sqrt((this.x) * (this.x) + (this.y) * (this.y));\n }", "title": "" }, { "docid": "c963a94ab2a1fda16aa827858fa31f79", "score": "0.46326256", "text": "getWidth(data){\n const mapper = {pts: 24, min: 6, reb: 18, ast: 19, stl: 20, blk: 21, to: 22, fgm: 7, fga: 8, _3pm: 10, _3pa: 11, ftm: 13, fta: 14}; // position in data where those values can be found\n const deviceWidth = Dimensions.get('window').width;\n const maxWidth = 350;\n const indicators = ['pts', 'ast', 'reb', 'stl', 'blk', 'to', 'min', 'fgm', 'fga', '_3pm', '_3pa', 'ftm', 'fta'];\n const unit = {\n ptsUnit: Math.floor(maxWidth / 45),\n astUnit: Math.floor(maxWidth / 15),\n rebUnit: Math.floor(maxWidth / 20),\n stlUnit: Math.floor(maxWidth / 6),\n blkUnit: Math.floor(maxWidth / 7),\n toUnit: Math.floor(maxWidth / 10),\n minUnit: Math.floor(maxWidth / 60),\n fgmUnit: Math.floor(maxWidth / 55),\n fgaUnit: Math.floor(maxWidth / 55),\n _3pmUnit: Math.floor(maxWidth / 55),\n _3paUnit: Math.floor(maxWidth / 55),\n ftmUnit: Math.floor(maxWidth / 55),\n ftaUnit: Math.floor(maxWidth / 55)\n };\n let width = {};\n let widthCap; // Give with a max cap\n indicators.forEach(item => {\n widthCap = data[mapper[item]] * unit[`${item}Unit`] || 0; // nothing is displayed if value is 0\n width[item] = widthCap <= (deviceWidth - 50) ? widthCap : (deviceWidth - 50);\n });\n return width\n }", "title": "" }, { "docid": "aaa780e3936e56276eb31e78c4574f22", "score": "0.46305436", "text": "function getCameraSize() {\n const vFOV = (obj.camera.fov * Math.PI) / 180;\n const h = 2 * Math.tan(vFOV / 2) * Math.abs(obj.camera.position.z);\n const w = h * obj.camera.aspect;\n return [w, h];\n }", "title": "" }, { "docid": "ea2517012f31b150f900f05876a207f6", "score": "0.4618046", "text": "anguloFlama() {\r\n if (velocidadVientoMSEG <= 0.0) {\r\n return 0.0;\r\n }\r\n //Calculo de la viscosidad cinematica del aire (m2/s) tAmb en C\r\n let v = 1.555E-14 * Math.pow((tAmbK), 3) + 9.5728E-11 * Math.pow(tAmbK, 2 + 3.7604E-8 * tAmbK + 3.4484E-6);\r\n //Froude \r\n let Fr = Math.pow(velocidadVientoMSEG, 2.0) / (G * this.poolDiameter());\r\n //Reynolds \r\n let Re = velocidadVientoMSEG * this.poolDiameter() / v;\r\n let c = 0.666 * Math.pow(Fr, 0.333) * Math.pow(Re, 0.117);\r\n //CALCULO DEL ANGULO DE LA FLAMA\r\n let tiltAngle = Math.sin((Math.sqrt((4 * Math.pow(c, 2) + 1.0)) - 1.0) / (2.0 * c));\r\n return tiltAngle;\r\n }", "title": "" }, { "docid": "b0433d7c7b80fd1fc6096ab97ff912f5", "score": "0.46177408", "text": "getStemLength() {\n return _stem__WEBPACK_IMPORTED_MODULE_2__.Stem.HEIGHT + this.getStemExtension();\n }", "title": "" }, { "docid": "1faa5b6aaa4c68fd96a8934f36dafb47", "score": "0.46091428", "text": "function volumeFrustum(smallRad, bigRad, height) {\n return Math.PI * ((smallRad ** 2) + (smallRad * bigRad) + (bigRad ** 2)) * height / 3;\n}", "title": "" }, { "docid": "9e2defc863b5db4a863559130ee3b884", "score": "0.45986298", "text": "function fringePaperY(p) {\n var index = global.visibleFringe.indexOf(p);\n // Hackery: if p is not found, we'll make it's Y really big so that\n // it's most certainly outside the screen.\n // TODO: fix this properly\n if (index < 0) {\n return 999999999;\n }\n \n // compute the sum of the height of the papers that are above the current one in the fringe\n var offset = global.scrollOffset;\n for(var i=0; i<index; i++){\n offset += global.visibleFringe[i].h;\n }\n\n return offset + parameters.paperMaxRadius;\n}", "title": "" }, { "docid": "ff777d1e54c4a5028107815007ac07b2", "score": "0.45958516", "text": "function showFloors(evt) {\n\n // retrieve the query stored in the selected value\n var floorQuery = evt.target.value;\n\n // update the definition expression of all layers except the wireframe layer\n webScene.layers.forEach(function(layer) {\n if (layer.title !== \"Building Wireframe\") {\n layer.definitionExpression = buildingQuery[layer.title] +\n \" AND \" + floorQuery;\n }\n });\n\n // after the layers were filtered recalculate the counts of each office type\n displayOfficeTypes();\n }", "title": "" }, { "docid": "01420fb8ee708e289ecd9a626adb9b2b", "score": "0.45950788", "text": "length() {\n return Math.sqrt(this.x * this.x + this.y * this.y);\n }", "title": "" }, { "docid": "01420fb8ee708e289ecd9a626adb9b2b", "score": "0.45950788", "text": "length() {\n return Math.sqrt(this.x * this.x + this.y * this.y);\n }", "title": "" }, { "docid": "51d00e45b4edd61f6ba89fafa53d35f7", "score": "0.45915192", "text": "getPvapEarth(){\n\n var temf = this.getTemfEarth();\n var rlhum = 0.0;\n var pvap = rlhum*(2.685+.00354*Math.pow(temf,2.245))/100.;\n\n return pvap;\n }", "title": "" }, { "docid": "163c904250d9de0bfbf27ebbe003401f", "score": "0.4589987", "text": "get maxFPS() {\n return this._maxFPS;\n }", "title": "" }, { "docid": "c49588cc3c9c13d35f8a31518e0584d3", "score": "0.45854387", "text": "function firelineIntensityFromFlameLength(flame) {\n return flame <= 0 ? 0 : Math.pow(flame / 0.45, 1 / 0.46);\n}", "title": "" }, { "docid": "84873967f88f20a05e0b1a756a2b42d9", "score": "0.4582729", "text": "getHighresVelocity() {\n return this.data[this.elevation][this.scan].record.velocity\n }", "title": "" }, { "docid": "214c2038b46b442c1a2f9f8b8be7f854", "score": "0.45811945", "text": "update() {\n this.velo.posx/=this.vdecayx\n this.velo.posy/=this.vdecayy\n\n this.velo.add(this.accel);\n this.pos.add(this.velo);\n\n // enfore velocity cap\n if (this.velo.posx > this.max_horiz_velocity) {\n this.velo.posx = this.max_horiz_velocity\n } else if (this.velo.posx < -this.max_horiz_velocity) {\n this.velo.posx = -this.max_horiz_velocity\n }\n if (this.velo.posy > this.max_vert_velocity) {\n this.velo.posy = this.max_vert_velocity\n } else if (this.velo.posy < -this.max_vert_velocity) {\n this.velo.posy = -this.max_vert_velocity\n }\n\n if (this.lifetime > 0) {\n this.lifetime -= 1; \n }\n }", "title": "" }, { "docid": "54305e7d71d4ae9ab93519d9de77b46d", "score": "0.45746464", "text": "get magnitude() {}", "title": "" }, { "docid": "a1b18f48e9b52f35a22ce9a877d05ea5", "score": "0.4573144", "text": "calcBounds() {\n this.bounds = {\n el: this.DOM.el.getBoundingClientRect(),\n reveal: this.DOM.reveal.getBoundingClientRect()\n };\n }", "title": "" }, { "docid": "b3d4d25b36c34733f965a44d22820a5e", "score": "0.45617536", "text": "function surfaceFireFirebrandHeight(firelineIntensity, u20) {\n if (u20 > 0 && firelineIntensity > 0) {\n // f is a function relating thermal energy to windspeed.\n const f = 322 * Math.pow(0.474 * (u20 / 88), -1.01); // Initial firebrand height (ft).\n\n return 1.055 * Math.sqrt(f * firelineIntensity);\n }\n\n return 0;\n}", "title": "" }, { "docid": "1745c49389447fa3907705d12798e9c6", "score": "0.45570064", "text": "constructor() {\n super('FireFlameLength', ['ft', 'm']);\n }", "title": "" }, { "docid": "bf169caa19819067c419ca935fb70011", "score": "0.45515573", "text": "getStemMinimumLength() {\n const frac = _tables__WEBPACK_IMPORTED_MODULE_3__.Tables.durationToFraction(this.duration);\n let length = frac.value() <= 1 ? 0 : 20;\n // if note is flagged, cannot shorten beam\n switch (this.duration) {\n case '8':\n if (this.beam == undefined)\n length = 35;\n break;\n case '16':\n length = this.beam == undefined ? 35 : 25;\n break;\n case '32':\n length = this.beam == undefined ? 45 : 35;\n break;\n case '64':\n length = this.beam == undefined ? 50 : 40;\n break;\n case '128':\n length = this.beam == undefined ? 55 : 45;\n break;\n default:\n break;\n }\n return length;\n }", "title": "" }, { "docid": "90e692d53bd3fddbb7b18dbc7ce2f1b4", "score": "0.45467368", "text": "function getRefraction(){\n\tif(isMobile || window.innerWidth <= 820){\n\t\trefractionRatio = 0.96;\n\t}else{\n\t\trefractionRatio = 0.9;\n\t}\n\treturn refractionRatio;\n}", "title": "" }, { "docid": "cfb1257a74e73bece3dab9379b69bd40", "score": "0.45390108", "text": "velocitySum(){\r\n let vSum = 0\r\n this.caps.forEach(caps => {\r\n vSum += caps.vel.mag()\r\n })\r\n return vSum\r\n }", "title": "" }, { "docid": "69b10180b11a8f42f009a6c929610228", "score": "0.45321828", "text": "function OnLengthSliderChange ()\r\n {\r\n var dLengthPercent = document.getElementById ('lengthSlider').value;\r\n _dLength = _dMaxLength * dLengthPercent * 0.01;\r\n\r\n document.getElementById ('lengthTextBox').value = dLengthPercent;\r\n\r\n _dCurrXPos = (_dLength + _dSpringLength) * Math.sin (_dTheta);\r\n _dCurrYPos = (_dLength + _dSpringLength) * Math.cos (_dTheta);\r\n\r\n var nPrevTrailState = _DrawTrail;\r\n _DrawTrail = false;\r\n _TrailPoints = [];\r\n\r\n drawScreen ();\r\n\r\n _DrawTrail = nPrevTrailState;\r\n }", "title": "" }, { "docid": "437959d7dbd94d32a490cc3f33a6233f", "score": "0.45248395", "text": "get electrospheresLength() {\n const result = []\n\n this.electronicLayers.forEach((layer) => {\n const total = layer.reduce((a, b) => a + b)\n\n result.push(total)\n })\n\n return result\n }", "title": "" }, { "docid": "2ce26c809c2fc76530e8f5b84692e9b3", "score": "0.45223892", "text": "farFollowing() {\n this.scene.cameraControl.followZoom(\n new THREE.Vector3(0, 0, 24),\n TWEEN.Easing.Quadratic.InOut,\n 1000,\n );\n }", "title": "" }, { "docid": "32fb37a8165d3f18b32061f88486d9e8", "score": "0.45176747", "text": "get_altitude()\n {\n return this.liveFunc._altitude;\n }", "title": "" }, { "docid": "b509bca30abc9a7894db095214107654", "score": "0.45157385", "text": "function lengthToWidthRatio(effectiveWindSpeed) {\n // Wind speed MUST be in miles per hour\n return 1 + 0.25 * (effectiveWindSpeed / 88);\n}", "title": "" }, { "docid": "678a6ea3a35eaf050f7e827b755ad6ec", "score": "0.45130295", "text": "function onAfterCreate() {\r\n\tFire.onCalculateFireSize = function(rclim, fire_size) {\r\n\r\n\t\tif (rclim <= 1.0) {\r\n\t\t\tdraw = drawLower(200000, 100000);\r\n\t\t\tprint(\"drawing from lower: \" + draw);\r\n\t\t\treturn draw;\r\n\t\t}\r\n\r\n\t\tif (rclim > 1.7) {\r\n\t\t\tdrawu = drawUpper(12000000, 4000000);\r\n\t\t\tprint(\"drawing from upper: \" + drawu);\r\n\t\t\treturn drawu;\r\n\t\t// drawn from distribution, applied min/max range\r\n\t\t}\r\n\r\n\t\tprint(\"retaining original draw: \" + fire_size);\r\n\r\n\t\treturn fire_size;\r\n\r\n\t}\r\n\r\n}", "title": "" }, { "docid": "fbd12c334e9d42dbb8b36830d05a11e2", "score": "0.4509082", "text": "function getFov(_ref8) {\n var height = _ref8.height,\n altitude = _ref8.altitude;\n\n return 2 * Math.atan(height / 2 / altitude);\n}", "title": "" }, { "docid": "ef3e549c5b06931137c248ab2a5e27e7", "score": "0.450846", "text": "getMaxWidth() {\n\t\tlet maxRight = -1\n\t\tfor (let i in this._rows) {\n\t\t\tthis._rows[i].tracks.map(t => {\n\t\t\t\t// --console.log(t)\n\t\t\t\tif (t.element._windowRight > maxRight) {\n\t\t\t\t\tmaxRight = t.element._windowRight\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t\treturn parseInt(maxRight + 20)\n\t}", "title": "" }, { "docid": "366b1f4cd8558c48619fab6aadb885c5", "score": "0.45082915", "text": "updateMagnitude(){\n this.magnitude = Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);\n return this;\n }", "title": "" }, { "docid": "05e6161d9d8153cccd6344d66b6a1ca5", "score": "0.45076376", "text": "mag() { return this.pos_.mag(this.orbiting_.pos()); }", "title": "" } ]
8aadbd4f8e80142bb163b121a84047b8
Looks for data input by user in tables and outputs data to result screen
[ { "docid": "710805214cfdf87b1ea615d9fc2311e5", "score": "0.0", "text": "function extract() {\nvar resultarray = Array();\nvar cellarray = new Array();\nvar founditems = '';\nvar found = 0;\nvar weblink = '';\nvar webbase = '';\n\nswitch (search) {\n\tcase \"snomed\":\n\t\tfounditems = searchMarkedUpCodes(snomed);\n\t\tpastresults[userinput] = founditems;\n\t\treturn founditems;\n\t\tbreak;\n\tcase \"external\":\n\t\tfounditems = searchMarkedUpCodes(external);\n\t\tfounditems = prependedCodes(founditems);\n\t\tpastresults[userinput] = founditems;\n\t\treturn founditems;\n\t\tbreak;\n\tcase \"mesh\":\n\t\tfounditems = searchMarkedUpCodes(mesh);\n\t\tfounditems = suffixedCodes(founditems);\n\t\tpastresults[userinput] = founditems;\n\t\treturn founditems;\n\t\tbreak;\n\tcase \"nlm\":\n\t\tfounditems = searchMarkedUpCodes(nlm);\n\t\tfounditems = founditems.replace(/(<c>[^<]*<\\/c>)/gi, \" -- $1\"); \n\t\tpastresults[userinput] = founditems;\n\t\treturn founditems;\n\t\tbreak;\n\tcase \"pcs\":\n\t\t{\n\t\tfounditems = searchMarkedUpCodes(pcs);\n\t\tfounditems = prependedCodes(founditems);\n\t\tpastresults[userinput] = founditems;\n\t\treturn founditems\n\t\tbreak;\n\t\t}\n\tcase \"diseases_and_injuries\":\n\t\t{\n\t\tfounditems = searchMarkedUpCodes(diseases_and_injuries);\n\t\tfounditems = prependedCodes(founditems);\n\t\tpastresults[userinput] = founditems;\n\t\treturn founditems;\n\t\tbreak;\n\t\t}\n\tcase \"drugs\":\n\t\t{\n\t\tresultarray = drugs.split(\"\\@\");\n\t\tfounditems += '<table><tr><th class=\"left\">Substance</th><th class=\"plain\">Poisoning, Accidental</th><th class=\"plain\">Poisoning, Intentional</th><th class=\"plain\">Poisoning, Assault</th><th class=\"plain\">Poisoning, Undetermined</th><th class=\"plain\">Adverse effect</th><th class=\"right\">Underdosing</th></tr>\\n';\n\n\t\tfor (x=0; x<=resultarray.length-1; x++) {\n\t\t\tif (searchEntry(userinput, resultarray[x]) == 1) {\n\t\t\t\tfound += 1;\n\t\t\t\tentries = resultarray[x];\t\n\t\t\t\tsplitentries = entries.split(\"^\");\n\n\t\t\t\tfor (s = 0; s < splitentries.length; s++) {\n\t\t\t\t\tfounditems += extractRow(found, splitentries[s]);\t\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\tfounditems += '<tr><td colspan=\"6\"><br /><center><b>Click on any link above for detailed information from Medline</b></center></td></tr></table>';\n\n if (found == 0) {\n\t\t\tfounditems = notfound();\n\t\t\t}\n\t\tpastresults[userinput] = founditems;\n\t\treturn founditems;\n\t\tbreak;\n\t\t}\n\tcase \"neoplasms\":\n\t\t{\n\t\tresultarray = neoplasms.split(\"\\@\");\n\t\tfounditems += '<table><tr><th class=\"left\">Neoplasm, neoplastic</th><th class=\"plain\">Malignant Primary</th><th class=\"plain\">Malignant Secondary</th><th class=\"plain\">Ca in situ</th><th class=\"plain\">Benign</th><th class=\"plain\">Uncertain Behavior</th><th class=\"right\">Unspecified Behavior</th></tr>\\n';\n\n\t\tfor (x=0; x<=resultarray.length-1; x++) {\n\t\t\tif (searchEntry(userinput, resultarray[x]) == 1) {\n\t\t\t\tfound += 1;\n\t\t\t\tentries = resultarray[x];\t\n\t\t\t\tsplitentries = entries.split(\"^\");\n\n\t\t\t\tfor (s = 0; s < splitentries.length; s++) {\n\t\t\t\t\tfounditems += extractRow(found, splitentries[s]);\t\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\tfounditems += '<tr><td colspan=\"6\"><br /><center><b>Click on any link above for detailed information from Medline</b></center></td></tr></table>';\n\n if (found == 0) {\n\t\t\tfounditems = notfound();\n\t\t\t}\n\t\tpastresults[userinput] = founditems;\n\t\treturn founditems;\n\t\tbreak;\n\t\t}\n\t}\n}", "title": "" } ]
[ { "docid": "6430763b1f2a32a038063c65834d055d", "score": "0.6687048", "text": "function viewData() {\n // Ask which table the user wants to see\n inquirer.prompt({\n name: \"table\",\n type: \"list\",\n message: \"Which data would you like to see?\",\n choices: [\"Departments\", \"Jobs\", \"Employees\", \"Everything\", \"Exit\"]\n })\n // Switch uses the helper functions and enters in the answer to return the table the user wants\n .then(function (answer) {\n switch (answer.table) {\n case \"Departments\":\n tableInfo(\"department\");\n break;\n case \"Jobs\":\n tableInfo(\"job\");\n break;\n case \"Employees\":\n tableInfo(\"employee\");\n break;\n case \"Everything\":\n allInfo();\n break;\n case \"Exit\":\n connection.end();\n break;\n default:\n console.log(\"\\n \\n Something went wrong, try again\");\n connection.end();\n }\n });\n}", "title": "" }, { "docid": "d6997774520badec68fd56e053fb07ae", "score": "0.64872676", "text": "function displayData(err) {\n if (err) throw err;\n\n // empty the table before filling it again\n table.length = 0;\n // Create a table from all the information in the response for the sql table. \n connection.query(\"Select * FROM product\",\n function (err, res) {\n // use cli table to display the product by pushing the information to the defined array\n for (let i in res) {\n let item_id = res[i].item_id;\n let product_name = res[i].product_name;\n let department_name = res[i].department_name;\n let product_sales = res[i].product_sales\n let price = res[i].price;\n let stock = res[i].stock_quantity;\n\n table.push([item_id.toString().red, product_name.blue, department_name.yellow, \"$\".cyan+product_sales.toString().cyan + \".00\".cyan, \"$\".green+price.toString().green + \".00\".green, stock.toString().blue]);\n }\n console.log(table.toString());\n promptUser();\n });\n\n}", "title": "" }, { "docid": "4642cfa2225c1651b27ba61e611f4c7b", "score": "0.6169578", "text": "function runEnter() {\n // Prevent the page from refreshing\n d3.event.preventDefault();\n \n // Select the input element and get the raw HTML node\n var inputElement = d3.select(\"#datetime\");\n \n // Get the value property of the input element\n var userInput = inputElement.property(\"value\"); \n \n //checking userInput, it worked, so pass to next step\n //console.log(userInput);\n\n // Use the form input to filter the data by date\n var matchingCase = tableData.filter(record => record.datetime == userInput);\n \n //checking search records, worked, pass to next step\n //console.log(matchingCase); \n // Show filtered results only in main table\n if (matchingCase.length == 0) {\n // Check where there are 0 matches\n // console.log(`No results for date ${userInput}`);\n tbody.html(\"\");\n tbody.text(`There are no results for the date you entered - ${userInput}`);\n} \nelse {\n tbody.html(\"\");\n matchingCase.forEach((report) => {\n var row = tbody.append('tr');\n\n Object.entries(report).forEach(([key, value]) => {\n // Check entries\n // console.log(key, value);\n var cell = row.append('td');\n cell.text(value);\n });\n });\n}; \n}", "title": "" }, { "docid": "614dad34e1e1da3ebbb18d737df435e8", "score": "0.61344266", "text": "function readProducts() {\n console.log(\"\\n\\nSelecting all products...\\n\");\n connection.query(\"SELECT * FROM products\", function(err, res) {\n if (err) throw err;\n let table = new Tablefy()\n var storeInfo = res\n // Log all results of the SELECT statement\n console.log(\"\\n------------------------------------------------------------\\n\")\n console.log(\" The following are now for sale.\")\n console.log(\"\\n------------------------------------------------------------\\n\\n\")\n table.draw(res)\n\n //alternate method of outputting datbase\n // for(var i=0;i<res.length;i++){\n // console.log(\"\\n ITEM: \"+res[i].item_id)\n // productIds.push(res[i].item_id)\n // console.log(\"\\n Product: \"+res[i].product_name)\n // console.log(\"\\n Department: \"+res[i].department_name)\n // console.log(\"\\n Price($): \"+res[i].price)\n // console.log(\"\\n Qty: \"+res[i].stock_quantity)\n // console.log(\"\\n----------------------------------\")\n // }\n\n console.log(\"\\n\\n\\n\")\n //call function to prompt user for input\n UserEntry(productIds, storeInfo)\n });\n}", "title": "" }, { "docid": "5c04a47a091746c8cfc731359d39f205", "score": "0.6127518", "text": "function processText(){\n // remove previous data from the table\n tbody.html(\"\");\n // save the user inputted value\n let inputValue = form.property('value');\n // test to make sure input value is being recorded\n console.log(inputValue);\n // filter data that only matches the date the user inputted\n let newData = tableData.filter(item => item.datetime === inputValue);\n // select the rows and input each data point that matches the user's date\n tbody.selectAll('tr').data(newData).enter().append('tr').html(function(item) {\n return `<td>${item.datetime}</td>\n <td>${item.city}</td>\n <td>${item.state}</td>\n <td>${item.country}</td>\n <td>${item.shape}</td>\n <td>${item.durationMinutes}</td>\n <td>${item.comments}</td>`})}", "title": "" }, { "docid": "78361cc5e8e4af648488c6175b73907a", "score": "0.6096229", "text": "function displayProductTable() {\n // Create array to hold data\n var data = [];\n\n // Header row\n data.push([\"--- Item Id ---\", \"--- Product Name ---\", \"--- Department ---\", \"--- Price ---\", \"--- Stock ---\"]);\n\n // Fill the data array from the database\n connection.query(\"SELECT item_id, product_name, department_name, price, stock_quantity FROM PRODUCTS\", function (err, res) {\n if (err) {\n throw err;\n }\n\n // Loop through the results and append to the data array\n for (var i = 0; i < res.length; i++) {\n data.push([res[i].item_id, res[i].product_name, res[i].department_name, res[i].price.toFixed(2), res[i].stock_quantity]);\n }\n\n // Output the data in a nicely formatted layout\n var output = formattable.table(data);\n console.log(\"\\n\" + output + \"\\n\");\n userPrompt();\n })\n}", "title": "" }, { "docid": "950136fa7182f8d159073f98d3e052f4", "score": "0.60743207", "text": "function displayTable(callback){\n\t// Here, I am creating a query for the connection to mysql, and consoling the data that is in the table. \n\tconnection.query('Select * FROM products', function(err, res){\n\t\t// I am utilizing the npm package for a cleaner looking response by integrating the console.table package.\n\t\tconsole.table(res);\n\t\tconsole.log(\"-----------------\");\n\n\t\t// If there is a callback, run the callback. \n\t\tif(callback){\n\t\t\tcallback();\n\t\t}\n\t\t// If not, then run the promptContinue function.\n\t\telse{\n\t\t\tpromptContinue();\n\t\t}\n\t});\n}", "title": "" }, { "docid": "9a68910ae2a0068f2368e2190a725a41", "score": "0.607033", "text": "function search() {\n\n\tvar value = document.getElementById(\"typehere\").value;\n\tconsole.log(\"document.getElementById(typehere): \" + value); //print statement \n\n\tsearchEngine.lookup(value, function(resultset) { // result set is a list of everything they found that matches our value \n\t\tif (resultset && resultset.getSize()) {\n\t\t\tvar rsize = resultset.getSize();\n\t\t\tvar result = \"<br>Found \" + rsize + \" result\" + (rsize>1?\"s\":\"\") + \" matching your request.\"; // create a html tag \n\n\t\t\t// Creating the table format in html.\n\t\t\tresult += '<br><table style=\"width:100%\">';\n\n\t\t\t// Creating the table headings.\n\t\t\tresult += \"<tr>\";\n\t\t\tresult += \"<th>Equipment</th>\"; // table heading \n\t\t\tresult += \"<th>Model</th>\";\n\t\t\t//result += \"<th>Serial Number</th>\";\n\t\t\tresult += \"<th>Manufacturer</th>\";\n\t\t\tresult += \"<th>Download Service Manual</th>\";\n\t\t\tresult += \"<th>Download Operation Manual </th>\";\n\t\t\tresult += \"</tr>\";\n\n\t\t\t// Inserting the search results into the table.\n\t\t\tresultset.forEach(function (e) {\n\t\t\t\tvar c = variableData[e];\n\n\t\t\t\tconsole.log(\"c.getManualName: \" + c.getManualName());\n\n\t\t\t\tresult += \"<tr>\"; //tr is table row, defined in css \n\t\t\t\tresult += \"<td>\" + c.getEquipment() + \"</td>\"; // cell in a table \n\t\t\t\tresult += \"<td>\" + c.getModel() + \"</td>\";\n\t\t\t\t//result += \"<td>\" + c.getSerialNumber() + \"</td>\";\n\t\t\t\tresult += \"<td>\" + c.getManufacturer() + \"</td>\";\n\n\t\t\t\tif (c.getDownloadLink() == '-') {\n\t\t\t\t\tresult += \"<td> Currently Unavailable </td>\";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tresult += \"<td>\" + '<a href=\"' + c.getDownloadLink() + '\">' + c.getManualName() +\"</a>\" + \"</td>\"; // define the info as a link, displayed as manual name \n\t\t\t\t}\n\n\t\t\t\tif (c.getOperationDownloadLink() == '-') {\n\t\t\t\t\tresult += \"<td> Currently Unavailable </td>\";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tresult += \"<td>\" + '<a href=\"' + c.getOperationDownloadLink() + '\">' + c.getOperationManualName() +\"</a>\" + \"</td>\"; // define the info as a link, displayed as manual name \n\t\t\t\t}\n\n\t\t\t\tresult += \"</tr>\";\n\t\t\t});\n\n\t\t\tresult += \"</table>\";\n\n\n\t\t} else {\n\t\t\tresult = \"<h2>No result found</h2>\";\n\t\t}\n\t\tdocument.getElementById(\"results\").innerHTML = result;\n\t});\n\t\n}", "title": "" }, { "docid": "4184321f8eeecedbc8eb3373b96081fa", "score": "0.6065462", "text": "function runEnter(tableData) {\n tbody.html(\"\")\n //Display table\n tableData.forEach((sighting) => {\n var row = tbody.append(\"tr\")\n Object.entries(sighting).forEach(([key, value]) => {\n var cell = row.append(\"td\")\n cell.text(value)\n })\n })\n}", "title": "" }, { "docid": "71b3e13793a74e5a725de18dcb873a57", "score": "0.60527384", "text": "function showTable() {\n // select * from products will select everything in the table products\n connection.query(\"SELECT * FROM products\", function(err, res) {\n if (err) throw err;\n console.table(res);\n promptUser();\n });\n}", "title": "" }, { "docid": "ed69c3fdc8c83d393ffa9dca03af9f84", "score": "0.60508054", "text": "function displayTable() {\n connection.query(\"Select * FROM products\", function(error, results) { \n if (error) throw error;\n \n \n var t = new Table\n\n //creating columns and quering data and inputting data into table (info retrieved from easy-table npm documentation)\n // this data will be displayed in a table on the command line\n //forEach is the way to loop through info in mySQL\n results.forEach(function(product) {\n t.cell(\"Item\", product.id);\n t.cell(\"Product\", product.productName);\n t.cell(\"Department\", product.departmentName);\n t.cell(\"Price\", product.price, Table.number(2));\n t.cell(\"Quantity\", product.stockQuantity)\n t.newRow();\n });\n console.log(t.toString());\n\n pickProduct();\n })\n}", "title": "" }, { "docid": "2655e7aff42854d685935e3e6c724647", "score": "0.60161304", "text": "function addData() {\n inquire\n .prompt([\n {\n type: 'list',\n name: 'table',\n message: 'Which table would you like to add to?',\n choices: [\"department table\", \"role table\", \"employee table\", \"exit\"]\n }\n ])\n .then(answers => {\n if (answers.table == \"department table\") {\n connection.query(\"SELECT department FROM department_table;\", function (err, res) {\n if (err) throw err;\n let departments = []\n\n res.forEach(e => {\n departments.push(e.department)\n });\n // var departments = res;\n // console.log(departments.name)\n inquire\n .prompt([\n {\n type: 'input',\n name: 'department',\n message: 'currently the following departments exist(' + departments + '). what would you like to add?',\n validate: function (value) {\n if (departments.indexOf(value) == -1) {\n return true;\n }\n console.log(\"....this already exists\")\n return false;\n }\n }\n ])\n .then(answers => {\n connection.query(\n \"INSERT INTO department_table SET ?\",\n {\n department: answers.department\n },\n function (err, res) {\n if (err) throw err;\n viewDepartments();\n }\n );\n })\n .catch(error => {\n if (error.isTtyError) {\n // Prompt couldn't be rendered in the current environment\n } else {\n // Something else when wrong\n }\n });\n })\n\n\n } else if (answers.table == \"role table\") {\n connection.query(\"SELECT title FROM role_table;\", function (err, res) {\n\n if (err) throw err;\n let roles = []\n\n res.forEach(e => {\n roles.push(e.title)\n });\n\n connection.query(\"SELECT * FROM department_table;\", function (err, res_departments) {\n if (err) throw err;\n let departments = []\n\n res_departments.forEach(e => {\n departments.push(e.department)\n });\n\n departments.push(\"none of the above\")\n\n inquire\n .prompt([\n {\n type: 'input',\n name: 'role',\n message: 'currently the following roles exist(' + roles + '). what would you like to add?',\n validate: function (value) {\n if (roles.indexOf(value) == -1) {\n return true;\n }\n console.log(\"....this already exists\")\n return false;\n }\n },\n {\n type: 'input',\n name: 'salary',\n message: 'what is the salary of this position?',\n validate: function (value) {\n if (isNaN(value) === false && value != '') {\n return true;\n }\n console.log(\"....please enter a salary\")\n return false;\n }\n },\n {\n type: 'list',\n name: 'department',\n message: 'what department is this in?',\n choices: departments\n\n }\n ])\n .then(answers => {\n if (answers.department != \"none of the above\") {\n connection.query(\n \"INSERT INTO role_table SET ?\",\n {\n title: answers.role,\n salary: answers.salary,\n department_id: res_departments[departments.indexOf(answers.department)].id\n },\n function (err, res) {\n if (err) throw err;\n viewRoles()\n }\n );\n }\n else {\n console.log(\"you must add the department\")\n start();\n }\n })\n .catch(error => {\n if (error.isTtyError) {\n // Prompt couldn't be rendered in the current environment\n } else {\n // Something else when wrong\n }\n });\n })\n })\n } else if (answers.table == \"employee table\") {\n connection.query(\"SELECT * FROM employee_table;\", function (err, res) {\n\n if (err) throw err;\n\n connection.query(\"SELECT * FROM role_table;\", function (err, res_roles) {\n if (err) throw err;\n let roles = []\n\n res_roles.forEach(e => {\n roles.push(e.title)\n });\n\n roles.push(\"none of the above\")\n\n inquire\n .prompt([\n {\n type: 'input',\n name: 'first_name',\n message: 'what is the employees first name?',\n validate: function (value) {\n if (value != '') {\n return true;\n }\n console.log(\"....please enter a valid first name\")\n return false;\n }\n },\n {\n type: 'input',\n name: 'last_name',\n message: 'what is the employees last name?',\n validate: function (value) {\n if (value != '') {\n return true;\n }\n console.log(\"....please enter a valid last name\")\n return false;\n }\n },\n {\n type: 'list',\n name: 'role',\n message: 'what is the employees role',\n choices: roles\n\n }\n ])\n .then(answers => {\n if (answers.department != \"none of the above\") {\n connection.query(\n \"INSERT INTO employee_table SET ?\",\n {\n first_name: answers.first_name,\n last_name: answers.last_name,\n role_id: res_roles[roles.indexOf(answers.role)].id\n },\n function (err, res) {\n if (err) throw err;\n viewEmployees()\n }\n );\n }\n else {\n console.log(\"you must add the role\")\n start();\n }\n })\n .catch(error => {\n if (error.isTtyError) {\n // Prompt couldn't be rendered in the current environment\n } else {\n // Something else when wrong\n }\n });\n })\n })\n } else {\n console.log(\"goodbye\")\n connection.end();\n }\n })\n .catch(error => {\n if (error.isTtyError) {\n // Prompt couldn't be rendered in the current environment\n } else {\n // Something else when wrong\n }\n });\n}", "title": "" }, { "docid": "d38e614e54eebdd86f0f27d4a0793819", "score": "0.599235", "text": "function getQueryType(){\n inquirer.prompt([\n {\n type: \"list\",\n name: \"querytype\",\n message: \"Which type of query do you want to run?\",\n choices: [\n \"1. Add data to the StaffTracker database\",\n \"2. View data in the StaffTracker database\",\n \"3. Update staff roles\",\n // \"4. Update an staff's manager\", //Not yet defined\n \"5. View staff by manager\",\n //\"6. Delete data\", //Not yet defined\n \"7. View the total staff salaries overhead\", \n \"8. Exit\"\n ]\n } \n ]).then(response => {\n let action = response.querytype.substring(0,1); \n let qry_text='';\n //console.log(action);\n switch(action) {\n case \"1\":\n getTable('add');\n return ;\n\n case \"2\":\n getTableToShow();\n return ;\n\n case \"3\":\n getInputsForEditStaff();\n return ;\n\n case \"4\":\n //Not yet implemented - Update an staff's manager\n //Similar to case 3 but change different data\n return ; \n \n case \"5\":\n getStaffByManager(con);\n return ;\n \n case \"6\":\n //Not yet implemented\n //Delete data from one of the tables\n //getTable('delete');\n \n return ;\n \n case \"7\":\n getSalaries(con); \n return;\n\n case \"8\":\n //Close the connection and quit the program.\n con.end(response=>{\n console.log(\"Bye!\")\n })\n return;\n default:\n return ;\n }\n }); \n}", "title": "" }, { "docid": "a7e6953a0ea215f04fd5e724cfa1e59b", "score": "0.5983094", "text": "function runEnter() {\n // Clear anything in the table\n tbody.html(\"\");\n \n// Read user input and save it as variable\n var DateValue = inputDate.property(\"value\");\n var cityValue = inputCity.property(\"value\");\n var stateValue = inputState.property(\"value\");\n var countryValue = inputCountry.property(\"value\");\n var shapeValue = inputShape.property(\"value\"); \n\n// If a user has entered a value in the field this will filter our data based on user input\n var filteredData = tableData.filter((userinput) => {\n\n // By default set the match to false\n var matchesDate = false;\n var matchesCity = false;\n var matchesState = false;\n var matchesCountry = false;\n var matchesShape = false;\n \n // If a user has entered a value into this field ensure that it match our dataset\n if (DateValue != \"\" && userinput.datetime === DateValue) {\n matchesDate = true;\n }\n \n // If the user didn't enter anything in this field, we will set match to true by default\n if (DateValue == \"\") {\n matchesDate = true;\n }\n\n // If a user has entered a value into this field ensure that it match our dataset\n if (cityValue != \"\" && userinput.city === cityValue) {\n matchesCity = true;\n }\n\n // If the user didn't enter anything in this field, we will set match to true by default\n if (cityValue == \"\") {\n matchesCity = true;\n }\n\n // If a user has entered a value into this field ensure that it match our dataset\n if (stateValue != \"\" && userinput.state === stateValue) {\n matchesState = true;\n }\n\n // If the user didn't enter anything in this field, we will set match to true by default\n if (stateValue == \"\") {\n matchesState = true;\n }\n\n // If a user has entered a value into this field ensure that it match our dataset\n if (countryValue != \"\" && userinput.country === countryValue) {\n matchesCountry = true;\n }\n\n // If the user didn't enter anything in this field, we will set match to true by default\n if (countryValue == \"\") {\n matchesCountry = true;\n }\n\n // If a user has entered a value into this field ensure that it match our dataset\n if (shapeValue != \"\" && userinput.shape === shapeValue) {\n matchesShape = true;\n }\n\n // If the user didn't enter anything in this field, we will set match to true by default\n if (shapeValue == \"\") {\n matchesShape = true;\n }\n\n // Will return true if all fields are matched or is true\n return matchesDate && matchesCity && matchesState && matchesCountry && matchesShape; \n\n });\n \n // Display the filtered sitings\n filteredData.forEach(function(filteredData) {\n console.log(filteredData);\n var row = tbody.append(\"tr\");\n\n // Iterate through the object and add the values to the table\n Object.entries(filteredData).forEach(function([key, value]) {\n var cell = row.append(\"td\");\n cell.text(value);\n });\n });\n}", "title": "" }, { "docid": "364465999d9d1a1a403402cf56da0df8", "score": "0.5980456", "text": "function main() {\n //Display the registered and suspended users tables and the registered owners table\n get_table(users_url,users_id,users_empty_msg);\n get_table(suspended_url,suspended_id,suspended_empty_msg);\n get_table(owners_url,owners_id,owners_empty_msg);\n dataTable(\"admin-hostels\",\"No hostels have been registered in the system\");\n }", "title": "" }, { "docid": "454487d94b49823cdb57d691fa217c26", "score": "0.59701234", "text": "function displayTable(sql, end) {\n\n connection.query(sql, (err, res) => {\n if (err) throw err;\n \n // loop through the rows and fill the table\n res.forEach(makeTable);\n console.log(\"\\n\\n\");\n console.log(table.toString());\n console.log(\"\\n\\n\");\n\n // we need to reinitialize the table or we get duplicates\n // when we display it again\n table = new Table({\n head: [ 'Item ID', 'Product Name', \n 'Price', 'Dept.','Quantity'], \n colWidths: [10, 30, 10, 22, 10]\n });\n\n // after the table is displayed, we prompt\n // the user for action if this is not the\n // end of the program \n \n if (!end) {\n action();\n }\n else {\n connection.end();\n }\n });\n}", "title": "" }, { "docid": "44ae171127337b0af9b17c62b0fbf4fe", "score": "0.59628785", "text": "function runTableQuery(){\n\n\t\t// Here we get the location of the root page.\n\t\t// We use this instead of explicitly saying the URL is localhost:3001 because the url will change when we deploy.\n\t\tvar currentURL = window.location.origin;\n\n\t\t// The AJAX function uses the URL of our API to GET the data associated with it (initially set to localhost)\n\t\t$.ajax({url: currentURL + \"/api/tables\", method: \"GET\"})\n\t\t\t.done(function(tableData) {\n\n\t\t\t\t// Here we are logging the URL so we have access to it for troubleshooting\n\t\t\t\tconsole.log(\"------------------------------------\");\n\t\t\t\tconsole.log(\"URL: \" + currentURL + \"/api/tables\");\n\t\t\t\tconsole.log(\"------------------------------------\");\n\n\t\t\t\t// Here we then log the NYTData to console, where it will show up as an object.\n\t\t\t\tconsole.log(tableData);\n\t\t\t\tconsole.log(\"------------------------------------\")\n\n\t\t\t\t// Loop through and display each of the customers\n\t\t\t\tfor (var i=0; i<tableData.length; i++){\n\n\t\t\t\t\t// Create the HTML Well (Section) and Add the table content for each reserved table\n\t\t\t\t\tvar tableSection = $(\"<div>\");\n\t\t\t\t\ttableSection.addClass('well');\n\t\t\t\t\ttableSection.attr('id', 'tableWell-' + i+1)\n\t\t\t\t\t$('#tableSection').append(tableSection);\n\n\t\t\t\t\tvar tableNumber = i + 1;\n\n\n\t\t\t\t\t// Then display the remaining fields in the HTML (Section Name, Date, URL)\n\t\t\t\t\t$(\"#tableWell-\"+ i+1).append('<h2><span class=\"label label-primary\">' + tableNumber + \"</span> | \" + tableData[i].customerID + \"</h2>\");\n\t\t\t\t}\n\t\t\t});\n\t}", "title": "" }, { "docid": "954d8b6547dc2b1e1825b2ec395ac47d", "score": "0.59503525", "text": "function displayTable() {\n\tconnection.query(\"SELECT * FROM products\",function(err, res){\n\t\tif (err) throw err;\n\t\tdataResult = res;\n\t\tres.forEach(function(row){//passing argument 'row' simplifies\n\t\t\tconsole.log(row.id + \" | \" + row.product_name + \" | \" + row.price + \" | \" + row.stock_quantity + \" | \" + row.department_name);\n })\n\t});\n}", "title": "" }, { "docid": "8c469f38ea5c6139b5ffc128af1d72c5", "score": "0.5937799", "text": "function displayTable() {\n\tconnection.query(\"SELECT * FROM products\", function(err, res) {\n\t\tif (err) throw err;\n\t\tfor (var i = 0; i < res.length; i++) {\n\t\t\tproducts.push(\n\t\t\t\t[res[i].item_id, res[i].product_name, res[i].price]);\n\t\t}\n\t\tconsole.log(products.toString());\n\t\tinquirer.prompt([\n {\n name: \"idChoice\",\n type: \"input\",\n message: \"\\nWhat is the id of the product that you would like to purchase?\"\n }, \n {\n name: \"unitQuantity\",\n type: \"input\",\n message: \"How many units would you like to buy?\"\n }\n ]).then(function(answer) {\n choiceQuantity = parseInt(answer.unitQuantity);\n choiceId = parseInt(answer.idChoice);\n itemId = parseInt(answer.idChoice);\n //need to loop through to get the correct index of item in case the item_id is not the same as the res (index - 1)\n for (var i = 0; i < res.length; i++) {\n if (choiceId === res[i].item_id) {\n choiceId = i;\n }\n }\n quantityTotal = res[choiceId].stock_quantity - choiceQuantity;\n itemPrice = res[choiceId].price;\n totalCostUnrounded = choiceQuantity * itemPrice;\n totalCost = Math.floor(totalCostUnrounded * 100) / 100;\n totalSales = res[choiceId].product_sales + totalCost;\n userTransaction(itemId);\n });\n });\n}", "title": "" }, { "docid": "2c2a3ec0ba197fadbd7f8e683a9b1782", "score": "0.5933926", "text": "function showAllResults(){\n tableData.forEach(d=>{\n let row = tbody.append(\"tr\");\n for(x in d){\n row.append(\"td\").text(d[x]);\n }\n })\n recordCnt.text(`Records found: ${tableData.length}`);\n}", "title": "" }, { "docid": "3c326ec6b9818c58fd67923f2e44304c", "score": "0.5932412", "text": "function viewWhat() {\n inquirer\n .prompt([\n {\n name: \"choice\",\n type: \"list\",\n message: \"Choose what to view\",\n choices: [\"All Departments\", \"All Roles\", \"All Employees\"]\n }\n ])\n .then (viewOption => {\n let query = \"\";\n if (viewOption.choice === \"All Departments\") {\n query = \"SELECT * FROM department\";\n } else if (viewOption.choice === \"All Roles\") {\n query = \"SELECT title, salary, name as department FROM emp_role INNER JOIN department ON dept_id = department.id\";\n } else {\n query = \"SELECT CONCAT(a.first_name, \\\" \\\", a.last_name) AS fullname, title, salary, name AS department, \";\n query += \"CONCAT(b.first_name, \\\" \\\", b.last_name) AS manager FROM employee a LEFT JOIN employee b ON a.manager_id = b.id \";\n query += \"INNER JOIN emp_role ON a.role_id = emp_role.id INNER JOIN department ON dept_id = department.id\";\n }\n connection.query(query, function(err, res) {\n if (err) throw err;\n // Log all results of the SELECT statement\n console.log(\"\\n--------------------------------------------------\");\n const table = cTable.getTable(res);\n console.log(table);\n // Go back to prompt user \n init();\n });\n })\n}", "title": "" }, { "docid": "291b59e7d44e141557846bcf17da7dc1", "score": "0.59294564", "text": "function displayProducts() {\n\n //first we need to read from the database and store the data locally\n var t = new Table;\n \n var query = \"SELECT * FROM products\";\n connection.query(query, function(err, res) {\n for (var i = 0; i < res.length; i++) {\n t.cell('Product Id', res[i].item_id);\n t.cell('Description', res[i].product_name);\n t.cell('Department', res[i].department_name);\n t.cell('Price, USD', res[i].price);\n t.cell('Quantity', res[i].stock_quantity);\n t.newRow();\n }\n \n //then we need to print to the screen.\n console.log(t.toString());\n\n //now send the user to the prompts section\n displayChoices();\n }); \n\n}", "title": "" }, { "docid": "ac5148e320032bb513f8c4bd9a9e21d7", "score": "0.5919737", "text": "function displayProducts() {\n var query = \"SELECT id, product_name, department_name, customer_cost, stock_qty FROM products\";\n connection.query(query, function(err, res) {\n var displayTable = new Table({\n style: {head: ['green']},\n head: ['id','Product', 'Department', 'Price', 'In stock'],\n \n colWidths: [10, 25, 25, 10, 10]\n });\n \n for (var i = 0; i < res.length; i++) {\n displayTable.push(\n [res[i].id, res[i].product_name, res[i].department_name, res[i].customer_cost, res[i].stock_qty]\n );\n }\n console.log(displayTable.toString());\n \n // connection.end();\n promptAction();\n });\n }", "title": "" }, { "docid": "662c74273d2c9c02718ff9966131bada", "score": "0.59118044", "text": "function showTable(data) {\n var output = table(data);\n console.log(output);\n //Resets table to headings\n restart();\n}", "title": "" }, { "docid": "3f413ab103d0efa835a6ae8a49ded4eb", "score": "0.5898565", "text": "function searchByPTName(a)//a = PT Name\n{\n var s = SpreadsheetApp.getActiveSpreadsheet();\n var main = s.getSheetByName(\"Main Screen\");\n var db = s.getSheetByName(\"Database\");\n var lastActionBox = main.getRange(12,9);\n \n var results = []\n var numRows = db.getLastRow();\n var names = db.getRange(2, 4, numRows).getValues();\n for(n=1;n<names.length;n++)\n {\n if(a == names[n].toString())\n {\n var startRow = n;\n for(i=1;i<8;i++)\n {\n var tester = db.getRange(n+i, 1).getValue();\n if(tester == \"\"){continue;}\n else\n {\n var numOfRows = i-1;\n results.push(db.getRange(n, 1, numOfRows, 16).getValues());\n continue;\n }\n }\n \n }\n else{continue;}\n if(results.length > 1)\n {\n //starts a loop to pull some info from the arrays, which will be promtped on a Browser.prompt\n //so that we'll have the ability to quiz the user as to which result they want to paste\n \n }\n if(results.length == 1)\n {\n //Skip the prompt, since it's just one result, we will paste it to main screen with no confrimation needed.\n }\n if(results.length == 0)\n {\n Browser.msgBox(\"There were no results for \"+\". Verify that you typed the name correctly. We always try to make the names <FirstName> <LastName> with no commas\");\n resetMainScreenButtons();\n lastActionBox.setValue(\"Tried to search for\"+a+\" and no results were found\");\n return false;\n }\n }\n}", "title": "" }, { "docid": "c188fcf4639054caf350ea6c196d8a2e", "score": "0.5889539", "text": "function viewDB() {\n let sqlString=\"\";\n //Do they want to add to departments, roles, or employees?\n inquirer.prompt({\n name: \"whatToView\",\n type: \"list\",\n message: \"What do you want to view?\",\n choices: [\"departments\", \"roles\", \"employees\", \"GO BACK\"]\n })\n .then(function (answer) {\n if (answer.whatToView == \"departments\") {\n sqlString = `SELECT*FROM department`;\n printTable(sqlString);\n startPage();\n }\n else if (answer.whatToView == \"roles\") {\n sqlString = \"SELECT*FROM role\";\n printTable(sqlString);\n startPage();\n }\n else if (answer.whatToView == \"employees\") {\n sqlString = \"SELECT*FROM employee\";\n printTable(sqlString);\n startPage();\n }\n else {\n startPage();\n }\n })\n}", "title": "" }, { "docid": "79c4437e8903bb794155b9e5af1838cf", "score": "0.58889955", "text": "function displayProducts() {\n var query = \"SELECT item_id, product_name, price, stock_quantity FROM products\";\n connection.query(query, function (err, res) {\n if (err) throw err;\n\n //Table formatting using Cli-table package\n // Creates table for the information from the mysql database \n var table = new Table({\n head: ['ITEM ID', 'PRODUCT NAME', 'PRICE', 'Quantity'],\n style: {\n colWidths: [100, 400],\n head: ['blue'],\n compact: true,\n colAligns: ['center'],\n \"padding-left\": 2,\n \"padding-right\": 10\n }\n });\n for (var i = 0; i < res.length; i++) {\n table.push([res[i].item_id, res[i].product_name, \"$\" + res[i].price, res[i].stock_quantity]);\n }\n console.log(table.toString());\n promptsCustomer();\n })\n}", "title": "" }, { "docid": "babdd6b65c20dcc6085af3d545bd0918", "score": "0.5875723", "text": "function runEnter() {\n\n // Get the value property of the input elements\n var input0 = filter_bar_0.property(\"value\");\n var input1 = filter_bar_1.property(\"value\");\n var input2 = filter_bar_2.property(\"value\");\n var input3 = filter_bar_3.property(\"value\");\n var input4 = filter_bar_4.property(\"value\");\n\n var filteredData = tableData;\n\n // Define conditions for filteredData\n\n if (input0) {\n filteredData = filteredData.filter(data => data.datetime === input0);\n }\n\n if (input1) {\n filteredData = filteredData.filter(data => data.city === input1);\n }\n\n if (input2) {\n filteredData = filteredData.filter(data => data.state === input2);\n }\n\n if (input3) {\n filteredData = filteredData.filter(data => data.country === input3);\n }\n\n if (input4) {\n filteredData = filteredData.filter(data => data.shape === input4);\n }\n\n if (filteredData != tableData) {\n tbody.selectAll('tr').remove();\n tbody.selectAll('td').remove();\n\n filteredData.forEach((search) => {\n var new_tr = tbody.append(\"tr\");\n for (key in search) {\n new_tr.append(\"td\").text(search[key]);\n }\n })\n } else {\n // Revert to displaying all the ufo sightings in a table format\n table(tableData);\n }\n}", "title": "" }, { "docid": "fecc2d919fb178e7ca82c9c2bc25cd2a", "score": "0.58546335", "text": "function getTable(which_task='add'){\n inquirer.prompt([\n {\n type: \"list\",\n message: \"What data do you want to add or edit:\",\n name: \"what_data\",\n choices: ['Departments','Roles','Staff'] \n }\n ]).then(response => {\n \n switch(response.what_data){\n case \"Departments\":\n if (which_task==='add') getInputsForAddDept()\n else if (which_task='edit') console.log('edit')\n else if (which_task='delete') console.log('delete');\n return 'department';\n case \"Roles\":\n if (which_task==='add') getInputsForAddRoles()\n else if (which_task='edit') console.log('edit')\n else if (which_task='delete') console.log('delete');\n return 'role';\n case \"Staff\":\n if (which_task==='add') getInputsForAddStaff()\n else if (which_task='edit') console.log('edit')\n else if (which_task='delete') console.log('delete');\n return 'staff';\n default:\n return;\n }\n }).then(response=> {\n //console.log(response);\n })\n}", "title": "" }, { "docid": "1b3df2d4e8e099ef6404229ddc94a2e2", "score": "0.5845764", "text": "function output_table(res,results) {\n if(results.COST === -1) {\n results.COST = 'No Data';\n }\n\tres.render('olympics.jade',\n\t\t { results: results }\n\t );\n}", "title": "" }, { "docid": "56f438e42ad6a1003a6f9370fd561b47", "score": "0.584472", "text": "function print_table_profile_1()\n{\n\tvar rows_descr = [\"STARTING\", \"ADVANCE\" , \"CURRENT\"];\n\tvar num_rows = rows_descr.length;\n\tvar num_col = skills_mk1.length;\n\tvar string_table = \"\";\n\tvar c=0;\n\n\t// header\n\tvar tr = \"<tr><th></th>\";\n\tfor(c=0; c < num_col; c++)\n\t{\n\t\ttr += \"<th>\"+skills_mk1[c]+\"</th>\";\n\t}\n\ttr += \"</tr>\";\n\tstring_table += tr;\n\n\t//content\n\tvar skills_mk1_values = get_mk1_values();\n\tfor(var r=0; r < num_rows; r++)\n\t{\n\t\ttr = \"<tr>\";\n\t\ttr += \"<td>\"+rows_descr[r]+\"</td>\";\n\t\tfor(c=0; c < num_col; c++)\n\t\t{\n\t\t\tvar input_name =\"skill_\"+skills_mk1[c]+\"_\"+r;\n\t\t\ttr += \"<td> <input type=\\\"text\\\" id=\\\"\"+input_name+\"\\\" name=\\\"\"+input_name+\"\\\" value=\\\"\"+skills_mk1_values[r][c]+\"\\\" ></td>\";\n\t\t}\n\t\ttr += \"</tr>\";\n\t\tstring_table += tr;\n\t}\n\n\tdocument.getElementById(\"table_profile_1\").innerHTML = string_table;\n}", "title": "" }, { "docid": "24c6b1c22e22710059dfe8777a998d46", "score": "0.5833096", "text": "function viewEmployeesByDepartment() {\n // SELECT ALL FROM department; we will need to ACCESS the results(listOfDepartments) of the callback function\n connection.query(\"SELECT * FROM department\", (error, listOfDepartments) => {\n if (error) {\n console.log(error);\n connection.end();\n } else {\n // create an array to hold department names\n const departmentNames = listOfDepartments.map((department) => department.name);\n\n inquirer.prompt([\n // prompt user for department to view\n {\n type: \"list\",\n message: \"Which department would you like to view?\",\n choices: departmentNames,\n name: \"departmentName\"\n },\n ]).then((response) => {\n // JOIN employee, role, AND department TABLES TO COMBINE DATA AND RETURN employee ID, first and last names, and title DATA for the department chosen by user\n connection.query(`SELECT employee.id, employee.first_name, employee.last_name, role.title FROM employee \n INNER JOIN role ON role.id = employee.role_id \n INNER JOIN department ON department.id = role.department_id\n WHERE ?`, { name: response.departmentName }, (error, results) => {\n console.log(\"\\n\");\n // DISPLAY results for user\n console.table(results);\n console.log(\"\\n\");\n promptUser();\n });\n });\n }\n });\n}", "title": "" }, { "docid": "9e8410b182c7514065af58e30e31f434", "score": "0.58266515", "text": "function newResults(info) {\n ufo_data.forEach((info) => {\n // console.log(info);\n // Create rows to tbody with .append with tr tag\n var row = tbody.append(\"tr\");\n \n // with Object create entries to get key an value for each on to then append value\n Object.entries(info).forEach(([key, value]) => {\n // console.log(key, value);\n // .append <td> to table for data\n var cell = tbody.append(\"td\");\n // Enter data as text into cell variable (<td>)\n cell.text(value);\n });\n });\n }", "title": "" }, { "docid": "049b89e7378b58632bd38a93365405d4", "score": "0.5826622", "text": "checkInputForTableAssistent() {\n }", "title": "" }, { "docid": "eefffa74944055fe13ed113121357bcf", "score": "0.58238626", "text": "function viewEmployeesByDept() {\n inquirer\n .prompt([\n {\n name: \"dept\",\n type: \"input\",\n message: \"What is the department you would like to search by\",\n },\n ])\n .then(function (data, err) {\n if (err) throw err;\n let query = `SELECT employee.id, employee.firstName, employee.lastName, role.role, role.salary, dept.dept FROM dept INNER JOIN role ON role.dept_id = dept.id INNER JOIN employee ON role.id = employee.role_id WHERE dept.dept = \"${data.dept}\";`;\n connection.query(query, function (err, res) {\n if (err) throw err;\n console.table(res);\n startApp();\n });\n });\n}", "title": "" }, { "docid": "3a8d6b5c953cbf77d96711265bcff613", "score": "0.5820451", "text": "function displayTable(search, where) {\n\n\t\tconnection.query(\"SELECT * FROM products\", function(error, response) {\n\n\t\t\tif (error) {\n\t\t\t\tconsole.log (\"Error MySQL Connection: Display Table: \" + error);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\t// npm package to create & display product table\n\t\t\t\tvar productTable = new table({\n\t\t\t\t\thead: [\"ID\", \"NAME\", \"DEPARTMENT\", \"Price ($)\", \"Quantity in Stock\"],\n\t\t\t\t\tcolWidths: [5, 20, 20, 20, 20]\n\t\t\t\t});\n\n\n\t\t\t}// close else statment\n\n\t\t\t// pull response for every product item in SQL into Table\n\t\t\tfor (var i = 0; i < response.length; i++) {\n\t\t\t\tproductList.push([response[i].item_id,response[i].product_name,response[i].department_name,response[i].price,response[i].inventory_quantity,response[i].product_sales]);\n\t \tproductTable.push([response[i].item_id,response[i].product_name,response[i].department_name,response[i].price.toFixed(2),response[i].inventory_quantity]); \n\n\t\t\t}// close for loop\n\n\t\t\tconsole.log(productTable.toString());\n\n\t\t}) // close SQL query request\t\n\n\t}// close displayTable Funct", "title": "" }, { "docid": "ed8b4cc2d972108f76fc3f0dbc8b406d", "score": "0.5820424", "text": "function bamazon(){\n connection.query('SELECT * FROM products', function(error,table){\n if (error) throw error;\n console.table(table);\n custInput(table);\n })\n}", "title": "" }, { "docid": "c3007366d20fde606e082c8e8c6e6e29", "score": "0.581131", "text": "function runEnter() {\n // Select the input element and get the raw HTML node\n var inputNameElement = d3.select(\"#name\");\n var inputGradeElement = d3.select(\"#grade\");\n var inputCityElement = d3.select(\"#city\");\n var inputStateElement = d3.select(\"#state\");\n\n // Get the value property of the input element\n // if there is no input for particular element, then return all the possible values in the tableData\n // put the result in an array\n if (inputNameElement.property(\"value\")) {\n var inputName = [inputNameElement.property(\"value\")];\n } else {\n inputName = nameAll;\n }\n if (inputGradeElement.property(\"value\")) {\n var inputGrade = [inputGradeElement.property(\"value\")];\n } else {\n inputGrade = gradeAll;\n }\n if (inputCityElement.property(\"value\")) {\n var inputCity = [inputCityElement.property(\"value\")];\n } else {\n inputCity = cityAll;\n }\n if (inputStateElement.property(\"value\")) {\n var inputState = [inputStateElement.property(\"value\")];\n } else {\n inputState = stateAll;\n }\n\n // Use the form input to filter the data\n // use includes function to return true or false in an array\n var matches = tableData.filter(function(college){\n return (inputName.includes(college.name) && inputGrade.includes(college.niche_grade) && inputCity.includes(college.city) && inputState.includes(college.state) );\n });\n\n // Finally, display the matches ufo sightings\n\n tbody.html(\"\"); //clear out the output before doing new\n matches.forEach(\n function(college) {\n var row = tbody.append(\"tr\");\n var values = Object.values(college);\n values.forEach(\n function(val){\n row.append(\"td\").text(val);\n }\n )\n }\n)}", "title": "" }, { "docid": "4a4a9256501a0a74b9b52566f9e4075d", "score": "0.5802638", "text": "function Action(){\n // Prevent the page from refreshing\n d3.event.preventDefault();\n\n // Get the value of the input element in the form\n let inputDate = d3.select(\"#datetime\").property(\"value\");\n\t\n\t// Filter data on matching date\n let filteredData = tableData.filter(sightings => sightings.datetime == inputDate);\n\n // Clearing table before appending filterd data rows\n\ttbody.selectAll(\"tr\").remove();\n\n // Checking if matching rows are found\n if(filteredData.length != 0) {\n displayTable(filteredData);\n }\n else {\n displayTable(notFound);\n }\n}", "title": "" }, { "docid": "605ec90cb3b18730658fc2508aa7561c", "score": "0.57957596", "text": "function populateResults() {\n var x = document.getElementById(\"results\");\n if (x.style.display == \"none\") {\n x.style.display = \"block\";\n }\n document.getElementById(\"results\").innerHTML = \"\";\n var val = document.getElementById(\"search\").value.toLowerCase().trim();\n var res = val.slice(-1);\n var lengt = val.length;\n if (lengt <= 1) {\n var y = document.createElement(\"H1\");\n var count = document.createTextNode(\"Please enter at least 2 characters to search\");\n y.appendChild(count);\n document.getElementById(\"results\").appendChild(y);\n\n }\n if (res != 0) {\n // if condition to check if the result is in the excel sheet and to print it in the table\n if (val != \"\" && lengt > 1) {\n var counter = 1;\n var pcounter = 1;\n var dpcounter = 1;\n var ppcounter = 1;\n var table = document.createElement('table');\n var tr = document.createElement('tr');\n var td2 = document.createElement('th');\n var td3 = document.createElement('th');\n var td4 = document.createElement('th');\n var td5 = document.createElement('th');\n var text1 = document.createTextNode('Donor Name');\n var text2 = document.createTextNode('Personalization');\n var text3 = document.createTextNode('Zone');\n var text4 = document.createTextNode('view');\n td2.appendChild(text1);\n td3.appendChild(text2);\n td4.appendChild(text3);\n td5.appendChild(text4);\n tr.appendChild(td2);\n tr.appendChild(td3);\n tr.appendChild(td4);\n tr.appendChild(td5);\n table.appendChild(tr);\n\n for (var x in bricksJSON) {\n var toCheck = bricksJSON[x].DonorName.toLowerCase();\n var descriptioncheck = bricksJSON[x].Personalization.toLowerCase();\n if (toCheck.includes(val)) {\n var text1 = document.createTextNode(bricksJSON[x].DonorName);\n var text2 = document.createTextNode(bricksJSON[x].Personalization);\n var text3 = document.createTextNode(bricksJSON[x].Zone);\n console.log(\"in bricks don\");\n printmap();\n counter++;\n } else if (descriptioncheck.includes(val)) {\n var text1 = document.createTextNode(bricksJSON[x].DonorName);\n var text2 = document.createTextNode(bricksJSON[x].Personalization);\n var text3 = document.createTextNode(bricksJSON[x].Zone);\n console.log(\"in bricks person\");\n printmap();\n counter++;\n }\n var donorcount = counter;\n }\n\n for (var x in paversJSON) {\n var toCheck = paversJSON[x].DonorName.toLowerCase();\n var descriptioncheck = paversJSON[x].Personalization.toLowerCase();\n if (toCheck.includes(val)) {\n var text1 = document.createTextNode(paversJSON[x].DonorName);\n var text2 = document.createTextNode(paversJSON[x].Personalization);\n var text3 = document.createTextNode(paversJSON[x].Zone);\n console.log(\"in pavers don\");\n printmap();\n pcounter++;\n } else if (descriptioncheck.includes(val)) {\n var text1 = document.createTextNode(paversJSON[x].DonorName);\n var text2 = document.createTextNode(paversJSON[x].Personalization);\n var text3 = document.createTextNode(paversJSON[x].Zone);\n console.log(\"in pavers person\");\n printmap();\n pcounter++;\n\n }\n var pavercount = pcounter;\n }\n\n\n for (var x in bricksJSON) {\n var toCheck = bricksJSON[x].DonorName.toLowerCase();\n var descriptioncheck = bricksJSON[x].Personalization.toLowerCase();\n console.log(donorcount);\n if (donorcount === 1 && pavercount == 1) {\n var word1 = \"null\";\n var searchword = val.split(\" \");\n for (i = 0; i < searchword.length; i++) {\n if (!searchword[i].includes(\"&\") && searchword[i].trim() != \"\") {\n if (toCheck.includes(searchword[i].trim()) && bricksJSON[x].Personalization != word1) {\n word1 = bricksJSON[x].Personalization;\n var text1 = document.createTextNode(bricksJSON[x].DonorName);\n var text2 = document.createTextNode(bricksJSON[x].Personalization);\n var text3 = document.createTextNode(bricksJSON[x].Zone);\n console.log(\"in bricks don+array\");\n printmap();\n dpcounter++;\n\n } else if (descriptioncheck.includes(searchword[i]) && bricksJSON[x].Personalization != word1) {\n word1 = bricksJSON[x].Personalization;\n var text1 = document.createTextNode(bricksJSON[x].DonorName);\n var text2 = document.createTextNode(bricksJSON[x].Personalization);\n var text3 = document.createTextNode(bricksJSON[x].Zone);\n console.log(\"in bricks don+array\");\n printmap();\n dpcounter++;\n\n }\n }\n var totaldonorcount = dpcounter;\n }\n\n }\n }\n // if condition to check if the result is in the excel sheet and to print it in the table for the pavers\n for (var x in paversJSON) {\n var toCheck = paversJSON[x].DonorName.toLowerCase();\n var descriptioncheck = paversJSON[x].Personalization.toLowerCase();\n console.log(donorcount);\n if (donorcount === 1 && pavercount == 1) {\n var word1 = \"null\";\n var searchword = val.split(\" \");\n for (i = 0; i < searchword.length; i++) {\n if (!searchword[i].includes(\"&\") && searchword[i].trim() != \"\") {\n if (toCheck.includes(searchword[i].trim()) && paversJSON[x].Personalization != word1) {\n word1 = paversJSON[x].Personalization;\n var text1 = document.createTextNode(paversJSON[x].DonorName);\n var text2 = document.createTextNode(paversJSON[x].Personalization);\n var text3 = document.createTextNode(paversJSON[x].Zone);\n console.log(\"in bricks don+array\");\n printmap();\n ppcounter++;\n\n } else if (descriptioncheck.includes(searchword[i]) && paversJSON[x].Personalization != word1) {\n word1 = paversJSON[x].Personalization;\n var text1 = document.createTextNode(paversJSON[x].DonorName);\n var text2 = document.createTextNode(paversJSON[x].Personalization);\n var text3 = document.createTextNode(paversJSON[x].Zone);\n console.log(\"in pavers don+array\");\n printmap();\n ppcounter++;\n }\n }\n var totalpavercount = ppcounter;\n }\n\n }\n }\n\n var x = document.createElement(\"H1\");\n if (totaldonorcount === 1 && totalpavercount === 1) {\n var count = document.createTextNode(\"No results found for \" + val + \". Please check your search terms and try again. \");\n x.appendChild(count);\n document.getElementById(\"results\").appendChild(x);\n }\n //Function to print the map with respect to their zone numbers\n function printmap() {\n\n var tr = document.createElement('tr');\n var td2 = document.createElement('td');\n var td3 = document.createElement('td');\n var td4 = document.createElement('td');\n var td5 = document.createElement('td');\n var text4 = document.createTextNode(\"👁\");\n td2.appendChild(text1);\n td3.appendChild(text2);\n td4.appendChild(text3);\n td5.appendChild(text4);\n tr.appendChild(td2);\n tr.appendChild(td3);\n tr.appendChild(td4);\n tr.appendChild(td5);\n\n table.appendChild(tr);\n var node = document.createElement(\"p\");\n node.appendChild(table);\n document.getElementById(\"results\").appendChild(node);\n var w = text3.textContent.replace(\" \", \"\") + \",\" + text2.textContent.replace(/\\n|\\r/g, \"\").replace(/\\\"/g, \" \");\n tr.setAttribute(\"onclick\", 'showImage(\\\"' + w + '\")');\n }\n\n }\n }\n}", "title": "" }, { "docid": "5d45787736806779ae603690aab847f6", "score": "0.57861143", "text": "function displayAll() {\n \n var query = connection.query(\"SELECT ID, Product_Name, Dept_Name, Price, Stock_Qty FROM products;\", function(err, res) {\n console.table(res);\n console.log(\"\");\n customerAsk();\n });\n \n }", "title": "" }, { "docid": "1f0b39fc283df8ccf5922a3b9da05d2a", "score": "0.57843274", "text": "function runEnter() {\r\n // Get the value property of the input element\r\n var input0 = filter_bar_0.property(\"value\");\r\n console.log(input0)\r\n\r\n var filteredData = tableData;\r\n\r\n // Define conditions for filtering\r\n if (input0) {\r\n filteredData = filteredData.filter(data => data.datetime === input0);\r\n }\r\n\r\n if (filteredData != tableData) {\r\n tbody.selectAll('tr').remove();\r\n tbody.selectAll('td').remove();\r\n\r\n filteredData.forEach((search) => {\r\n var new_tr = tbody.append(\"tr\");\r\n for (key in search) {\r\n new_tr.append(\"td\").text(search[key]);\r\n }\r\n })\r\n } else {\r\n // Display all UFO sightings as a table\r\n table(tableData);\r\n }\r\n}", "title": "" }, { "docid": "4d76baff184337030d3d620074d489ed", "score": "0.5773802", "text": "function displayTable() {\n $tbody.innerHTML = \"\";\n for (var r = 0; r < filterdata.length; r++) {\n // Get get the current siting object and its fields\n var siting = filterdata[r];\n var fields = Object.keys(siting);\n // Insert a new row\n var $row = $tbody.insertRow(r);\n for (var c = 0; c < fields.length; c++) {\n // Create a new cell for each siting field\n var field = fields[c];\n var $cell = $row.insertCell(c);\n $cell.innerText = siting[field];\n }\n }\n}", "title": "" }, { "docid": "90858b17e4beb187287175e772e4f781", "score": "0.57709694", "text": "function table(dataOutput) {\n dataOutput.forEach((ufos) => {\n var row = tbody.append(\"tr\");\n Object.entries(ufos).forEach(([key, value]) => {\n row.append(\"td\").text(value);\n });\n });\n }", "title": "" }, { "docid": "846e7154a9bc30d9bf37250367687638", "score": "0.5768424", "text": "gatherTableInfo() {\n const prompts = [{\n type: 'input',\n name: 'tableName',\n message: 'Table name?',\n default: 'lambda_data_store'\n }, {\n type: 'input',\n name: 'tableReadCapacity',\n message: 'Table read capacity?',\n default: 5\n }, {\n type: 'input',\n name: 'tableWriteCapacity',\n message: 'Table write capacity?',\n default: 5\n }, {\n type: 'input',\n name: 'tableHashKey',\n message: 'Table hash key?',\n default: 'hashKey'\n }, {\n type: 'list',\n choices: [ 'N', 'S', 'B' ],\n name: 'tableHashKeyType',\n message: 'Table hash key type?',\n default: 'S'\n }, {\n type: 'input',\n name: 'tableRangeKey',\n message: 'Table range key? (leave empty if not required)'\n }, {\n type: 'list',\n choices: [ 'N', 'S', 'B' ],\n name: 'tableRangeKeyType',\n message: 'Table range key type?',\n default: 'S',\n when: (answers) => !!answers.tableRangeKey\n }, {\n type: 'list',\n choices: ['NONE', 'KEYS_ONLY', 'NEW_IMAGE', 'OLD_IMAGE', 'NEW_AND_OLD_IMAGES'],\n name: 'tableStreamViewType',\n message: 'Streaming data type (event triggers)?',\n default: 'NONE'\n }];\n\n return _prompts.getProjectInfo(this, false)\n .then(() => {\n return this.prompt(prompts).then((props) => {\n this.props = Object.assign(this.props || {}, props);\n this.log(_consts.SEPARATOR);\n });\n });\n }", "title": "" }, { "docid": "3d7f874adf8ca453473cacf6ccd0bfe8", "score": "0.5767046", "text": "function viewAllEmpByDept(){\n // Array to department names\n let deptArr = [];\n // Trying new connection using mysql\n mysql.createConnection(connectionProperties\n ).then((conn) => {\n // Query to see names of departments\n return conn.query('SELECT name FROM department');\n }).then(function(value){\n // All names within deptArr\n deptQuery = value;\n for (i=0; i < value.length; i++){\n deptArr.push(value[i].name);\n \n }\n\n }).then(() => {\n // Prompt user to select department from the array of departments\n inquirer.prompt({\n name: \"department\",\n type: \"list\",\n message: \"Which department would you like to search?\",\n choices: deptArr\n }) \n .then((answer) => { \n // Query all employees depending on selected department\n const query = `SELECT e.id AS ID, e.first_name AS 'First Name', e.last_name AS 'Last Name', role.title AS Title, department.name AS Department, role.salary AS Salary, concat(m.first_name, ' ' , m.last_name) AS Manager FROM employee e LEFT JOIN employee m ON e.manager_id = m.id INNER JOIN role ON e.role_id = role.id INNER JOIN department ON role.department_id = department.id WHERE department.name = '${answer.department}' ORDER BY ID ASC`;\n connection.query(query, (err, res) => {\n if(err) return err;\n \n // Show results in console.table\n console.log(\"\\n\");\n console.table(res);\n\n // Back to main menu\n mainMenu();\n });\n });\n });\n}", "title": "" }, { "docid": "4fe96345003ac65dc30a15df83ebc754", "score": "0.57610637", "text": "function populateTable() {\n // Initialize\n window.sessionStorage.setItem(\"formOpen\", \"false\");\n var pidTableDiv = '#command-table';\n\n var search1 = new SearchManager({\n \"id\": \"search1\",\n \"cancelOnUnload\": true,\n \"status_buckets\": 0,\n \"earliest_time\": \"-24h@h\",\n \"latest_time\": \"now\",\n \"sample_ratio\": 1,\n \"search\": searchQuery + NUM_JOBS,\n \"app\": utils.getCurrentApp(),\n \"auto_cancel\": 90,\n \"preview\": true,\n \"tokenDependencies\": {\n },\n \"runWhenTimeIsUndefined\": false\n }, {tokens: true, tokenNamespace: \"submitted\"});\n\n var mainSearch = splunkjs.mvc.Components.getInstance(\"search1\");\n var myResults = mainSearch.data('results', { output_mode:'json', count:0 });\n //mainSearch.startSearch();\n\n mainSearch.on('search:progress', function(properties) {\n Messages.render(\"waiting\", $(pidTableDiv));\n });\n\n mainSearch.on('search:done', function(properties) {\n document.getElementById(\"command-table\").innerHTML = \"\";\n\n if(properties.content.resultCount == 0) {\n var noData = null;\n createTable(pidTableDiv, noData);\n }\n });\n\n myResults.on(\"data\", function() {\n var data = myResults.data().results;\n createTable(pidTableDiv, data);\n });\n }", "title": "" }, { "docid": "b57f94b01f53f9a20978d78242768237", "score": "0.5758552", "text": "function viewAllDepartments() {\n // SELECT ALL FROM department\n connection.query(`SELECT * FROM department`, function (error, results) {\n if (error) {\n console.log(error);\n connection.end();\n } else {\n console.log(\"\\n\");\n // DISPLAY results for user\n console.table(results);\n console.log(\"\\n\");\n promptUser();\n }\n });\n}", "title": "" }, { "docid": "5a1d1f7779d6d3ed3c546bd5b6c118c1", "score": "0.57575226", "text": "function fetchData(inputValue){\n var filteredData = tableData.filter(data => data.datetime === inputValue);\n if(filteredData.length>0){\n updateTable(filteredData);\n } else {\n // alert(`There are no UFO sightings data on ${inputValue}.`);\n tbody.html(`<tr><h3>There are no UFO sightings data on ${inputValue}.</h3></tbody>`);\n\n }\n}", "title": "" }, { "docid": "e4bbfc9609ecf390eaa71243f2486877", "score": "0.5753938", "text": "function viewAllEmployees() {\n db.readAllEmployees()\n .then(res => {\n console.log('\\n');\n console.table(res);\n })\n .then(() => askUser())\n .catch(err => console.log(err));\n}", "title": "" }, { "docid": "be1236731296fe8a1cb946179becf39d", "score": "0.5751728", "text": "async function searchEmps() {\n try {\n const action = await inquirer.prompt(questions.searchEmp);\n let data;\n let array;\n let obj;\n // TODO: refactor into if/else?????\n switch (action.viewEmp) {\n case 'manager_id':\n data = await db.viewEmp();\n array = data.map((manager) => ({\n name: `${manager.first_name} ${manager.last_name}`,\n value: manager.id,\n }));\n break;\n case 'role_id':\n data = await db.viewRoles();\n array = data.map((role) => ({ name: role.title, value: role.id }));\n break;\n case 'dept_id':\n data = await db.viewRoles();\n array = data.map((dept) => ({\n name: dept.department,\n value: dept.dept_id,\n }));\n break;\n default:\n menu();\n break;\n }\n // present the obj choices\n const search = await inquirer.prompt([\n {\n type: 'list',\n name: 'id',\n message: `Which ${by}?`,\n choices: array,\n },\n ]);\n\n obj[action.viewEmp] = search.id;\n console.log(obj);\n\n const result = await db.viewEmpBy(obj);\n \n console.log('Displaying Search Results: \\n');\n console.table(result);\n menu();\n } catch (err) {\n console.log(err);\n }\n}", "title": "" }, { "docid": "560b4a1e8393217d5ba864805ddca2ca", "score": "0.57514083", "text": "function managerInput(){\n\tinquirer.prompt([{\n\t\ttype: 'list',\n\t\tname: 'input',\n\t\tmessage: 'What would you like to do today?',\n\t\tchoices: ['1) View Products for sale', '2) View low inventory', '3) Add to inventory', '4) Add new product']\n\t}]).then(function(answer){\n\t\tif(answer.input === '1) View Products for sale'){\n\t\t\tconnection.query('SELECT * FROM products', function(err, data){\n\t\t\tif (err) throw err;\n\t\t\tconsole.log('');\n\t\t\tconsole.log('========================ITEMS IN STORE=======================');\n // instantiate \n var table = new Table({\n head: ['Item ID', 'Product Name', 'Department', 'Price'],\n style: {\n head: ['red'],\n compact: false,\n colAligns: ['center'],\n }\n });\n for(i=0;i<data.length;i++){\n table.push(\n [data[i].item_id, data[i].product_name, data[i].department_name, '$ ' + data[i].price]\n );\n \n }\n console.log(table.toString());\n\t\t\tconsole.log('');\n\t\t\tnewTransaction();\n\t\t\t})\n\t\t}\n\t\telse if(answer.input === '2) View low inventory'){\n\t\t\tconnection.query('SELECT * FROM products WHERE stock_quantity < 5', function(err, res){\n\t\t\t\tif (err) throw err;\n\t\t\t\tconsole.log('')\n\t\t\t\tconsole.log('========================LOW INVENTORY=======================');\n\t\t\t\tfor(i=0;i<res.length;i++){\n console.log(`\n Name: ${res[i].product_name}\n Prodcut ID: ${res[i].item_id}\n Quantity in stock: ${res[i].stock_quantity}\n `);\n\t\t\t\t\tconsole.log('---------------------');\n\t\t\t\t}\n\t\t\t\tnewTransaction();\n\t\t\t})\n\t\t}\n\t\telse if(answer.input === '3) Add to inventory'){\n\t\t\tinquirer.prompt([{\n\t\t\t\tname: 'item',\n\t\t\t\tmessage: 'Enter the ID of the item you wish to update:',\n\t\t\t\tvalidate: function(value){\n\t\t\t\t\tvar valid = value.match(/^[0-9]+$/)\n\t\t\t\t\tif(valid){\n\t\t\t\t\t\treturn true\n\t\t\t\t\t}\n\t\t\t\t\t\treturn 'Please enter a numerical value'\n\t\t\t\t\t}\n\t\t\t},{\n\t\t\t\tname: 'number',\n\t\t\t\tmessage: 'How many items would you like to add to the current supply?',\n\t\t\t\tvalidate: function(value){\n\t\t\t\t\tvar valid = value.match(/^[0-9]+$/)\n\t\t\t\t\tif(valid){\n\t\t\t\t\t\treturn true\n\t\t\t\t\t}\n\t\t\t\t\t\treturn 'Please enter a numerical value'\n\t\t\t\t\t}\n\t\t\t}]).then(function(answer){\n\t\t\t\tconnection.query('SELECT * FROM products WHERE item_id = ?', [answer.item], function(err, res){\n\t\t\t\t\t\tconnection.query('UPDATE products SET ? Where ?', [{\n\t\t\t\t\t\t\tstock_quantity: res[0].stock_quantity + parseInt(answer.number)\n\t\t\t\t\t\t},{\n\t\t\t\t\t\t\titem_id: answer.item\n\t\t\t\t\t\t}], function(err, res){});\n\t\t\t\t})\n\t\t\t\tconsole.log('Inventory updated');\n\t\t\t\tnewTransaction();\n\t\t\t})\n\t\t}\n\t\telse if(answer.input === '4) Add new product'){\n\t\t\tinquirer.prompt([{\n\t\t\t\tname: 'product',\n\t\t\t\tmessage: 'Enter name of product:'\n\t\t\t},{\n\t\t\t\tname: 'department',\n\t\t\t\tmessage: 'Enter a department for this product'\n\t\t\t},{\n\t\t\t\tname: 'price',\n\t\t\t\tmessage: 'Enter a price for this product',\n\t\t\t\tvalidate: function(value){\n\t\t\t\t\tvar valid = value.match(/^[0-9]+$/)\n\t\t\t\t\tif(valid){\n\t\t\t\t\t\treturn true\n\t\t\t\t\t}\n\t\t\t\t\t\treturn 'Please enter a numerical value'\n\t\t\t\t\t}\n\t\t\t},{\n\t\t\t\tname: 'stock',\n\t\t\t\tmessage: 'Please enter a stock quantity for this product',\n\t\t\t\tvalidate: function(value){\n\t\t\t\t\tvar valid = value.match(/^[0-9]+$/)\n\t\t\t\t\tif(valid){\n\t\t\t\t\t\treturn true\n\t\t\t\t\t}\n\t\t\t\t\t\treturn 'Please enter a numerical value'\n\t\t\t\t\t}\n\t\t\t}]).then(function(answer){\n\t\t\t\tconnection.query('INSERT into products SET ?', {\n\t\t\t\t\tproduct_name: answer.product,\n\t\t\t\t\tdepartment_name: answer.department,\n\t\t\t\t\tprice: answer.price,\n\t\t\t\t\tstock_quantity: answer.stock\n\t\t\t\t}, function(err, res){});\n\t\t\t\tconsole.log('Product Added');\n\t\t\t\tnewTransaction();\n\t\t\t})\n\t\t}\n\t})\n}", "title": "" }, { "docid": "f02051ebe16bda837ba7a15e7b3b8b12", "score": "0.57404685", "text": "function handelFind(){\n var date_input = input_dt.property(\"value\");\n\n filtered = tableData.filter(filterDate).filter(filterCountry).filter(filterState).filter(filterCity).filter(filterShape);\n tbody.text(\"\")\n showData(filtered);\n}", "title": "" }, { "docid": "1c9e676997ba694b4b447134af357ef7", "score": "0.5739218", "text": "function recordTableView() {\n inquirer\n .prompt({\n name: \"music\",\n type: \"list\",\n message: \"Like to take a look at the vinyls?\",\n choices: [\"Yes\", \"No\"]\n\n }).then(function (choose) {\n if (choose.music === \"Yes\") {\n displayRecords();\n }\n else if (choose.music === \"No\") {\n connection.end();\n }\n });\n\n}", "title": "" }, { "docid": "1a48d458022dface34eabe6d63edc34d", "score": "0.57336324", "text": "function showInventoryTable(data) {\n var output = table(data);\n console.log(output);\n //Resets table to headings\n addInventory();\n}", "title": "" }, { "docid": "6c3dbbb485b791f51708f5e2cd676cb5", "score": "0.57261455", "text": "function byDepartment() {\n //show all available departments\n connection.query(\"SELECT * FROM department\", function (err, results) {\n if (err) throw err;\n inquirer\n .prompt([\n {\n type: \"list\",\n name: \"department\",\n choices: function () {\n let choiceArray = [];\n for (var i = 0; i < results.length; i++) {\n choiceArray.push(results[i].name);\n }\n return choiceArray;\n },\n message: \"What department would you like to search by\",\n },\n ])\n .then(({ department }) => {\n console.log(department);\n connection.query(\n `\n SELECT employee.id, employee.first_name, employee.last_name, role.title, role.salary, department.name AS department, e2.first_name AS manager\n FROM employee\n LEFT JOIN employee as e2 ON e2.id = employee.manager_id\n JOIN role ON employee.role_id = role.id\n JOIN department ON role.department_id = department.id\n WHERE department.name = ?\n ORDER BY employee.id;\n `,\n [department],\n (err, data) => {\n if (err) throw err;\n console.table(data);\n init();\n }\n );\n });\n });\n}", "title": "" }, { "docid": "39d1856c4609ba8a2b5ab2bb28559dfe", "score": "0.5725181", "text": "function updateTable() {\n\n // User date input\n // var inputData = d3.select('#datetime').property('value')\n \n // Prevent default behavior \n d3.event.preventDefault();\n \n // Filter dataset based on user input\n // var result = tableData.filter(date => date.datetime === inputData)\n var result = advancedSearch()\n \n // Select table body tag\n var tbody = d3.select('tbody')\n \n // Clear previous results\n tbody.html('');\n \n // Append data filtered into the table\n if (result.length !== 0) {\n result.forEach(value => {\n var rows = tbody.append('tr')\n Object.entries(value).forEach(([key, value]) => {\n var data = rows.append('td');\n data.text(value);\n }) \n })\n }\n // If array is empty due to out of range user input then insert a message\n // else if (result === 'outofrange') {\n // tbody.append('tr')\n // .append('td')\n // .attr('colspan', '7')\n // .text(dateRange())\n // .style('text-align', 'center');\n // }\n else if (result.length === 0) {\n tbody.append('tr')\n .append('td')\n .attr('colspan', '7')\n .text('No UFO records found; remove some filters and try again!')\n .style('text-align', 'center');\n }\n // Empty forms after table is generated with filtered data\n d3.selectAll('input').property('value', \"\");\n}", "title": "" }, { "docid": "965cf36941c480953153de2f7127d07e", "score": "0.57193536", "text": "function setup(){\n document.getElementById('studyTerms').value = '8';\n document.getElementById('offTerms').value = '6';\n createTable(8,6,[2,5,7,9,11,12],[]);\n}", "title": "" }, { "docid": "7a91f12d57fc5cacf5a22e96c0b17e6f", "score": "0.57093453", "text": "all(tableInput, cb) {\n\n const queryString = `SELECT * FROM ${tableInput};`;\n connection.query(queryString, (err, result) => {\n if (err) {\n throw err;\n }\n cb(result);\n });\n }", "title": "" }, { "docid": "789d9a4eaeb421d50002a9d8f11471f4", "score": "0.5707204", "text": "async function viewEmployees(){\r\n //Iniitalize string for sql\r\n let sql = '';\r\n\r\n const getFilter = await inquirer.prompt(\r\n [\r\n {\r\n type: 'list',\r\n name: 'filter',\r\n message: 'Choose a filter to view Employees?',\r\n choices: [\r\n 'All',\r\n 'Only Managers',\r\n 'Non-Managers',\r\n 'By Department',\r\n 'By Role',\r\n 'Go Back'\r\n ]\r\n }\r\n ])\r\n //Depending User choice create a SQL statement\r\n switch(getFilter.filter){\r\n case 'Non-Managers':\r\n sql = 'SELECT e.id AS \"Employee No.\", CONCAT(e.last_name, \", \", e.first_name) AS \"Employee Name\", r.title AS \"Position\", d.name AS \"Department\", r.salary AS \"Salary\", CONCAT(m.last_name, \", \", m.first_name) AS \"Manager Name\" FROM employee AS e INNER JOIN role AS r ON r.id = e.role_id INNER JOIN department AS d ON d.id = r.department_id INNER JOIN manager AS m ON m.id = e.manager_id';\r\n break;\r\n case 'Only Managers':\r\n sql = 'SELECT m.id AS \"Employee No.\", CONCAT(m.last_name, \", \", m.first_name) AS \"Manager Name\", r.title AS \"Position\", d.name AS \"Department\", r.salary AS \"Salary\" FROM manager AS m INNER JOIN role AS r ON r.id = m.role_id INNER JOIN department AS d ON d.id = r.department_id';\r\n break;\r\n case 'All':\r\n //Union of tables with unequal collumns can be solved by casting the extra columns as NULL\r\n sql = 'SELECT * FROM (SELECT m.id AS \"Employee No.\", CONCAT(m.last_name, \", \", m.first_name) AS \"Employee Name\", r.title AS \"Position\", d.name AS \"Department\", r.salary AS \"Salary\", NULL AS \"Manager Name\" FROM manager AS m INNER JOIN role AS r ON r.id = m.role_id INNER JOIN department AS d ON d.id = r.department_id UNION ALL SELECT e.id AS \"Employee No.\", CONCAT(e.last_name, \", \", e.first_name) AS \"Employee Name\", r.title AS \"Position\", d.name AS \"Department\", r.salary AS \"Salary\", CONCAT(m.last_name, \", \", m.first_name) AS \"Manager Name\" FROM employee AS e INNER JOIN role AS r ON r.id = e.role_id INNER JOIN department AS d ON d.id = r.department_id INNER JOIN manager AS m ON m.id = e.manager_id ) AS union_result';\r\n break;\r\n case 'By Department':\r\n let departmentNames = [];\r\n \r\n for(let i = 0; i < depObjArray.length; i++){\r\n departmentNames.push(depObjArray[i].name);\r\n };\r\n const depChoice = await inquirer.prompt([\r\n {\r\n type: 'list',\r\n name: 'department',\r\n message: 'Which department?',\r\n choices: departmentNames\r\n }\r\n ]);\r\n sql = `SELECT * FROM (SELECT m.id AS \"Employee No.\", CONCAT(m.last_name, \", \", m.first_name) AS \"Employee Name\", r.title AS \"Position\", d.name AS \"Department\", r.salary AS \"Salary\", NULL AS \"Manager Name\" FROM manager AS m INNER JOIN role AS r ON r.id = m.role_id INNER JOIN department AS d ON d.id = r.department_id UNION ALL SELECT e.id AS \"Employee No.\", CONCAT(e.last_name, \", \", e.first_name) AS \"Employee Name\", r.title AS \"Position\", d.name AS \"Department\", r.salary AS \"Salary\", CONCAT(m.last_name, \", \", m.first_name) AS \"Manager Name\" FROM employee AS e INNER JOIN role AS r ON r.id = e.role_id INNER JOIN department AS d ON d.id = r.department_id INNER JOIN manager AS m ON m.id = e.manager_id ) AS union_result WHERE Department = '${depChoice.department}'`\r\n break;\r\n case 'By Role':\r\n let roleNames = [];\r\n const [roleResults, fields] = await db.promise().query('SELECT DISTINCT title FROM role')\r\n for(let i = 0; i < roleResults.length; i++){\r\n roleNames.push(roleResults[i].title);\r\n };\r\n const roleChoice = await inquirer.prompt([\r\n {\r\n type: 'list',\r\n name: 'role',\r\n message: 'Which department?',\r\n choices: roleNames\r\n }\r\n ])\r\n sql = `SELECT * FROM (SELECT m.id AS \"Employee No.\", CONCAT(m.last_name, \", \", m.first_name) AS \"Employee Name\", r.title AS \"Position\", d.name AS \"Department\", r.salary AS \"Salary\", NULL AS \"Manager Name\" FROM manager AS m INNER JOIN role AS r ON r.id = m.role_id INNER JOIN department AS d ON d.id = r.department_id UNION ALL SELECT e.id AS \"Employee No.\", CONCAT(e.last_name, \", \", e.first_name) AS \"Employee Name\", r.title AS \"Position\", d.name AS \"Department\", r.salary AS \"Salary\", CONCAT(m.last_name, \", \", m.first_name) AS \"Manager Name\" FROM employee AS e INNER JOIN role AS r ON r.id = e.role_id INNER JOIN department AS d ON d.id = r.department_id INNER JOIN manager AS m ON m.id = e.manager_id ) AS union_result WHERE Position = '${roleChoice.role}'`\r\n break;\r\n case 'Go Back':\r\n MainMenu();\r\n break; \r\n default:\r\n console.log(\"An error has occurred. Returning to main menu.\");\r\n MainMenu();\r\n break; \r\n }\r\n if(typeof sql !== 'undefined'){\r\n displayTableQuery(sql);\r\n } \r\n}", "title": "" }, { "docid": "10b0fd44c142c9806e6a1af61e043f7f", "score": "0.57071406", "text": "function employeeByDept() {\n inquirer\n .prompt([\n {\n name: 'dept',\n type: 'list',\n message: 'Which dept would you like to see?',\n choices: [\n 'Sales',\n 'Engineering',\n 'Finance',\n 'Legal'\n ]\n }\n ]).then(answers => {\n const query = 'SELECT department.name, employee.role_id, employee.first_name, employee.last_name FROM employee INNER JOIN department ON (employee.role_id = department.id) WHERE (department.name = ?)';\n let employeeTable = []\n connection.query(query, [answers.dept], function (err, res) {\n console.log('There are ' + res.length + ' employees in this dept!')\n for (let i = 0; i < res.length; i++) {\n employeeTable.push({\n first_name: res[i].first_name, last_name: res[i].last_name, Department: res[i].name\n })\n }\n console.table(employeeTable)\n })\n startProgram();\n })\n}", "title": "" }, { "docid": "180b74676770bf03d51085391cea4f63", "score": "0.5701744", "text": "function displayTable(datafortable) {\n datafortable.forEach((tableData) => {\n var row = tbody.append(\"tr\");\n Object.entries(tableData).forEach(([key, value]) => {\n var cell = row.append(\"td\");\n cell.text(value);\n });\n })\n}", "title": "" }, { "docid": "ad400c7919557c8eafac982ad44f78f4", "score": "0.57007265", "text": "function populate(inputData) {\n inputData.forEach(sighting => {\n var row = tbody.append(\"tr\");\n keys.forEach(key => row.append(\"td\").text(sighting[key]));\n });\n}", "title": "" }, { "docid": "6460378fc2a86db54b0289321ed9d021", "score": "0.56842446", "text": "function viewEmployee() {\n connection.query(\"SELECT * FROM Employee\", function(err, data) {\n if (err) throw err;\n //bang (err) slang err; \n console.log(`\\n`);\n console.table(data);\n userData(); \n })\n}", "title": "" }, { "docid": "54b1251149568ac00a97e517e49aadd0", "score": "0.5676617", "text": "async byDepartment() {\n // selecting department data from database\n const departments = \"SELECT * FROM department\";\n // connecting to database to get department data\n const deptData = await connection.query(departments);\n // setting dept names into an array\n const deptList = deptData.map((row) => row.name);\n\n // inquirer prompt to determin what dept to view\n const runPrompt = await inquirer.prompt([\n {\n type: \"list\",\n name: \"dept\",\n message: \"What department would you like to view?\",\n // passing through deptList as choices\n choices: deptList,\n },\n ]);\n // declaring dept from runPrompt\n const { dept } = runPrompt;\n // view employee by department\n const deptEmployees = `SELECT e.id, e.first_name, e.last_name, r.title AS role, r.salary, d.name AS department FROM employee e JOIN role r\tON e.role_id = r.id JOIN department d\tON r.department_id = d.id\tWHERE d.name = '${dept}'`;\n\n // connecting to database to get employee by department data\n const viewEmployees = await connection.query(deptEmployees);\n\n console.log(\n `\\n================ EMPLOYEES BY DEPARTMENT (${dept}) ================\\n`\n );\n // logging employees by department table\n tLog(viewEmployees);\n }", "title": "" }, { "docid": "5017f9cae9e48eb6c57e091012a4d8f5", "score": "0.56729805", "text": "function managerView()\n{\n\tconsole.log(\"Please enter your choice:\");\n\tinquirer.prompt(\n\t [{\n\t \ttype: \"list\",\n\t \tmessage: \"Enter your choice: \",\n\t \tchoices: [\"View Products for Sale\",\"View Low Inventory\",\"Add to Inventory\",\n \"Add New Product\",\"Quit\"],\n\t \tname: \"action\"\n\t }]).then(function (answers) {\n\t\tswitch (answers.action)\n\t \t{\n\t case \"View Products for Sale\":\n\t productSale();\n\t break;\n\n\t case \"View Low Inventory\":\n\t lowInventory();\n\t break;\n\n\t case \"Add to Inventory\":\n\t addInventory();\n\t break;\n\n\t case \"Add New Product\":\n\t addProduct();\n\t break;\n\t case \"Quit\":\n\t var table = new Table({head:['Exiting Manager View. Thank you!']});\n\t\t\t console.log(\" \");\n\t\t\t console.log(\" \");\n\t\t\t console.log(table.toString());\n\t\t\t console.log(\" \");\n\t\t\t console.log(\" \");\n\t break;\n\t }\n });//End function(answers)\n} //End getProductInput()", "title": "" }, { "docid": "b9a3b0b690f0e9832badbf1b1713a7d0", "score": "0.5664616", "text": "function viewEmployeesByDepartment() {\r\n connection.query('SELECT * FROM department', (err, departments) => {\r\n if (err) throw err;\r\n let deptArr = [];\r\n for (const department of departments) {\r\n let dept = department.name;\r\n deptArr.push(dept)\r\n }\r\n inquirer.prompt(\r\n {\r\n type: 'list',\r\n name: 'depts',\r\n message: 'Which department would like to see employees for?',\r\n choices: deptArr\r\n }\r\n )\r\n .then(res => {\r\n let query = `SELECT employee.id, employee.first_name, employee.last_name, role.title FROM employee LEFT JOIN role ON employee.role_id = role.id LEFT JOIN department ON role.department_id = department.id WHERE department.name = ? ORDER BY department.name`;\r\n connection.query(query, [res.depts], (err, empByDept) => {\r\n if (err) throw err;\r\n console.log(chalk.hex('#23C552')(`Displaying ${res.depts} department's employees in a table`));\r\n console.log(chalk.hex('#F84F31')('----------------------------------------------------------------'));\r\n console.table(empByDept)\r\n console.log(chalk.hex('#F84F31')('----------------------------------------------------------------'));\r\n runSearch();\r\n })\r\n })\r\n })\r\n}", "title": "" }, { "docid": "cb2b2f4a5440f001424c96df49562e21", "score": "0.5662994", "text": "function drawResults() {\n const outDiv = document.getElementById('output');\n\n const n1 = parseInt(document.getElementById('num1').value);\n const n2 = parseInt(document.getElementById('num2').value);\n if (isNaN(n1) || isNaN(n2)) {\n outDiv.innerText = 'Please enter a number for \"Number 1\" and \"Number 2\".';\n return;\n }\n\n const addChecked = document.getElementById('add').checked;\n const subChecked = document.getElementById('subtract').checked;\n const mulChecked = document.getElementById('multiply').checked;\n const divChecked = document.getElementById('divide').checked;\n if (!addChecked && !subChecked && !mulChecked && !divChecked) {\n outDiv.innerText = 'Please check at least one operation to perform.';\n return;\n }\n\n const table = generateTable(n1, n2, addChecked, subChecked, mulChecked, divChecked);\n outDiv.innerHTML = '';\n outDiv.appendChild(table);\n}", "title": "" }, { "docid": "77c354377ac7d9f991febc380d7f48a5", "score": "0.56500757", "text": "function login() {\n let command = `SELECT * FROM products`;\n connection.query(command, function(err, res) {\n if (err) throw err;\n var welcome = figlet.textSync(\"Welcome to \\nBamazon!\", {\n font: \"colossal\",\n horizontalLayout: \"default\",\n verticalLayout: \"default\"\n });\n console.log(welcome);\n //console.log(res);\n var table = new Table({ head: [\"Item ID\", \"Product\", \"Price\", \"Units\"] });\n\n //unfortunately you can't just loop because a new table row won't be created with each entry\n //however, when people add new things, because they're adding one at a time, this is fine\n table.push(\n [res[0].item_id, res[0].product_name, `$${res[0].price}`, res[0].units],\n [res[1].item_id, res[1].product_name, `$${res[1].price}`, res[1].units],\n [res[2].item_id, res[2].product_name, `$${res[2].price}`, res[2].units],\n [res[3].item_id, res[3].product_name, `$${res[3].price}`, res[3].units],\n [res[4].item_id, res[4].product_name, `$${res[4].price}`, res[4].units],\n [res[5].item_id, res[5].product_name, `$${res[5].price}`, res[5].units],\n [res[6].item_id, res[6].product_name, `$${res[6].price}`, res[6].units],\n [res[7].item_id, res[7].product_name, `$${res[7].price}`, res[7].units],\n [res[8].item_id, res[8].product_name, `$${res[8].price}`, res[8].units],\n [res[9].item_id, res[9].product_name, `$${res[9].price}`, res[9].units]\n );\n\n console.log(table.toString());\n\n prompt1();\n });\n}", "title": "" }, { "docid": "90f124dba3bc91df8cad64928b620415", "score": "0.56493956", "text": "function getResults() {\n \n // Fetch user input and convert to integer\n userInput = parseInt((document.getElementById(\"numberOfRows\").value), 10);\n console.log(\"Reported user input: \" + userInput);\n \n // Sanitize...\n if (userInput <= 0 || userInput > 30) {\n console.log(\"This is not going to work.\");\n document.getElementById(\"formWarning\").innerHTML = \"For the sake of sanity, please limit your entry to a positive integer between 1 and 30.\";\n return;\n \n } else {\n\n clearWarning(); // Clear any existing warning on the webpage \n \n /* \n const numberOfRows = userInput;\n \n console.log(\"Number of rows: \" + numberOfRows);\n const totalNumberOfSeats = numberOfRows * 10; // Total number of seats (given ten seats per row)\n const numberOfReservations = getRandomInt(1, totalNumberOfSeats); // Randomly generate the total number of reservations\n const reservedSeats = seatReservationBuilder(numberOfRows, numberOfReservations); // Create randomized list of reserved seats\n console.log(\"List of reserved seats: \" + reservedSeats);\n \n // Build a visual schematic of the seats using createSeatReservationData()\n \n const seatReservationData = createSeatReservationData(reservedSeats, numberOfRows); // Create magic Sloth version of reserved seats\n const seatingTable = buildTable(seatReservationData); // Create HTML for seating table\n // Insert table HTML into the DOM\n document.getElementById(\"schematic\").innerHTML = seatingTable;\n\n const numberOfValidLocations = validLocations(reservedSeats, numberOfRows);\n \n */\n \n // Update the \"global\" numberOfRows variable with the sanitized user input...\n numberOfRows = userInput;\n \n // Build the interactive table\n const seatingTable = buildTable2(numberOfRows);\n\n // Insert table HTML into the DOM\n document.getElementById(\"schematic\").innerHTML = seatingTable;\n \n // Clear any current results and create a prompt...\n seatReservationData = [];\n document.getElementById(\"reserved-seats\").innerHTML = \"\";\n document.getElementById(\"resultText\").innerHTML = \"\";\n document.getElementById(\"prompt\").innerHTML = \"Okay! Click on some seats and let's run the requested function. Or you can change the number of rows, re-build the table, and try again.\";\n \n /*\n \n // Dump the \"global\" seat array into the validLocations function along with the number of rows...\n const numberOfValidLocations = validLocations(seatReservationData, numberOfRows);\n \n const responseText = \"Given \" + numberOfRows + \" rows of seats and the current seat reservations, the number of valid locations where we may fit a family of three will be \" + numberOfValidLocations + \".\";\n console.log(responseText);\n // Insert response text into the DOM and remove the user prompt\n document.getElementById(\"resultText\").innerHTML = responseText;\n document.getElementById(\"prompt\").innerHTML = \"\";\n \n */\n\n \t}\n \n}", "title": "" }, { "docid": "a72550d708398a563daf8e6dfbc0841a", "score": "0.56487", "text": "function viewEmpByMgr() {\n //console.log(\"viewEmpByDept\");\n // Go back to prompt user\n let query = \"SELECT employee.id AS id, first_name, last_name FROM employee INNER JOIN emp_role ON role_id = emp_role.id WHERE title = ?\";\n connection.query(query, [\"Manager\"], function (err, results) {\n if (err) throw err;\n // once you have the items, prompt the user for which they'd like to bid on\n inquirer\n .prompt([\n {\n name: \"choice\",\n type: \"rawlist\",\n choices: function() {\n const choiceArray = [];\n for (let i = 0; i < results.length; i++) {\n choiceArray.push(results[i].first_name + \" \" + results[i].last_name);\n }\n return choiceArray;\n },\n message: \"Choose a Manager\"\n }\n ])\n .then((answer) => { \n\n let manager_id;\n for (let i = 0; i < results.length; i++) {\n if (answer.choice === results[i].first_name + \" \" + results[i].last_name) {\n manager_id = results[i].id;\n }\n }\n query = \"SELECT CONCAT(first_name, \\\" \\\", last_name) AS fullname, title FROM employee \";\n query += \"INNER JOIN emp_role ON role_id = emp_role.id INNER JOIN department ON dept_id = department.id \"\n query += \"WHERE manager_id = ?\";\n //console.log(manager_id);\n connection.query(query, [manager_id], (err, res) => {\n if (err) throw err;\n //console.log(query);\n console.log(\"\\n--------------------------------------------------\");\n const table = cTable.getTable(res);\n console.log(table);\n init();\n })\n })\n });\n}", "title": "" }, { "docid": "da80d360b8b92cda3727366d92b73482", "score": "0.5647621", "text": "function renderTable() {\n $tbody.innerHTML = \"\";\n for (var i = 0; i < allData.length; i++) {\n var aliens = allData[i];\n var areReal = Object.keys(aliens);\n var $row = $tbody.insertRow(i);\n for (var j = 0; j < areReal.length; j++) {\n var varInput = areReal[j];\n var $cell = $row.insertCell(j);\n $cell.innerText = aliens[varInput];\n }\n }\n}", "title": "" }, { "docid": "3a42f6fe162388c877df82b68790bf96", "score": "0.5647232", "text": "function renderTable() {\n \n //input data\n $tbody.innerHTML = \"\";\n \n for (var i = 0; i < filteredData.length; i++) {\n // Get get the current data object and its fields\n var sighting = filteredData[i];\n var fields = Object.keys(sighting);\n // Create a new row in the tbody, set the index to be i + startingIndex\n var $row = $tbody.insertRow(i);\n for (var j = 0; j < fields.length; j++) {\n // For every field in the dataset object, create a new cell at set its inner text to be the current value at the current data field\n var field = fields[j];\n var $cell = $row.insertCell(j);\n $cell.innerText = sighting[field];\n }\n }\n}", "title": "" }, { "docid": "59d9595fe3dbb6354648f72b4e1519bd", "score": "0.5642194", "text": "function runTableQuery() {\n // The AJAX function uses the URL of our API to GET the data associated with it (initially set to localhost)\n $.ajax({ url: \"/api/tables\", method: \"GET\" })\n .then(function(tableData) {\n\n // Here we then log the tableData to console, where it will show up as an object.\n console.log(tableData);\n console.log(\"------------------------------------\");\n\n // Loop through and display each of the customers\n for (var i = 0; i < tableData.length; i++) {\n\n // Get a reference to the tableList element and populate it with tables\n var tableList = $(\"#tableList\");\n\n // Then display the fields in the HTML (Section Name, Date, URL)\n var listItem = $(\"<li class='list-group-item mt-4'>\");\n\n listItem.append(\n $(\"<h3>\").text(\"Table #\" + (i + 1)),\n $(\"<hr>\"),\n $(\"<h4>\").text(\"Task: \" + tableData[i].taskName),\n // $(\"<h4>\").text(\"Name: \" + tableData[i].personToPerform)\n $(\"<h4>\").text(\"Name: \" + tableData[i].user_id)\n\n );\n\n tableList.append(listItem);\n }\n });\n }", "title": "" }, { "docid": "bb5d15f683f8546cbeb82bb06945cec3", "score": "0.5639766", "text": "function printProducts() { \n //connect to database. \n connectToDB();\n //get number of items in database\n connection.create.query(\"SELECT item_id, product_name, price, stock_quantity FROM products\", function (err, res) {\n if (err) throw err;\n //create new table using cli-table\n var table = new Table({\n head: [\"Item ID\", \"Product\", \"Price\", \"Stock\"]\n });\n //push each query into the cli-table\n for (var i = 0; i < res.length; i++) {\n table.push(\n [res[i].item_id, res[i].product_name, res[i].price, res[i].stock_quantity]\n );\n }\n //console log the table for the user to see\n console.log(table.toString());\n //end the connection\n connection.create.end();\n promptManager();\n });\n}", "title": "" }, { "docid": "ac5cfbde313ac9481af6585199912e22", "score": "0.5638963", "text": "function displayDeptSales() {\n // create new cli table\n var salesTable = new Table({\n head: [\n \"Department ID\",\n \"Department Name\",\n \"Overhead Cost\",\n \"Product Sales\",\n \"Total Profit\"\n ],\n colWidths: [5, 25, 15, 15, 15]\n });\n // construct the db query string\n queryStr =\n \"SELECT departments.department_id, departments.department_name, departments.over_head_costs, products.product_sales \" +\n \"FROM departments \" +\n \"INNER JOIN products \" +\n \"ON departments.department_name=products.department_name \" +\n \"GROUP BY departments.department_name \" +\n \"ORDER BY departments.department_id\";\n\n // make the db query\n connection.query(queryStr, function(err, data) {\n if (err) throw err;\n\n for (var i = 0; i < data.length; i++) {\n // variables to store column data\n var deptId = data[i].department_id;\n var deptName = data[i].department_name;\n var overhead = data[i].over_head_costs;\n var productSales = data[i].product_sales;\n var totalProfit = productSales - overhead;\n // push column data into table for each department\n salesTable.push([deptId, deptName, overhead, productSales, totalProfit]);\n }\n // print table to console\n console.log(salesTable.toString());\n\n // End the database connection\n connection.end();\n });\n}", "title": "" }, { "docid": "de887e4f2afb62370b4b015b09a1e3e3", "score": "0.56346947", "text": "function runEnter() {\n \n d3.select('tbody').html('');\n\n // Prevent the page from refreshing \n \n d3.event.preventDefault();\n // Select the input element and get the raw HTML node\n \n // var inputElement = d3.select(\"#Month\");\n // Get the value property of the input element\n \n var minputElement = d3.select(\"#Month\").property('value');\n var countyinputElement = d3.select(\"#County\").property('value');\n var burnedinputElement = d3.select(\"#AcesBurned\").property('value');\n\n // console.log(inputValue);\n console.log(tableData2);\n var filteredData = tableData2\n\n // var filteredData = tableData2.filter(time => time.mName === inputValue);\n\n if (minputElement !== \"\") {\n filteredData = filteredData.filter(fire => fire.Month === minputElement)\n\n }\n\n if (countyinputElement !== \"\") {\n filteredData = filteredData.filter(fire => fire.Counties === countyinputElement);\n }\n\n if (burnedinputElement !== \"\") {\n filteredData = filteredData.filter(fire => fire.AcesBurned === burnedinputElement);\n }\n if (filteredData.length === 0) {\n // If no data found, display \"No fires found. Try again!\"\n // tbody.append(\"tr\").text(\"No fires found. Try again!\");\n alert(\"No fires found, please try again\");\n };\n \n console.log(filteredData);\n \n filteredData.forEach((selections) => {\n\n console.log(selections);\n\n var row = tbody.append(\"tr\");\n Object.entries(selections).forEach(([key, value]) => {\n console.log(key, value);\n var cell = row.append(\"td\");\n cell.text(value);\n });\n});\n}", "title": "" }, { "docid": "fafa73fde0fa67fce987f11a7fcdad6a", "score": "0.5628171", "text": "function createTable(UFOdata){\n // clear table of all previous searches\n tbody.html(\"\")\n // Loop through each data entry to create a table row for each entry\n UFOdata.forEach((sighting) => {\n console.log(sighting);\n var row=tbody.append('tr');\n // Add table columns for each key value pair in each entry\n Object.values(sighting).forEach((value) =>{\n console.log(value);\n var cell = row.append(\"td\");\n cell.text(value);\n });\n });\n}", "title": "" }, { "docid": "3a6237e08f52f85ba78076de3efbf5c0", "score": "0.5627318", "text": "function itemList() {\n\n connection.query('SELECT * FROM products', function(err, response){\n\n var displayTable = new Table({\n head: ['Item ID', 'Product Name', 'Department', 'Price', 'Quantity'],\n //make widths to create table\n colWidths: [10, 25, 25, 10, 15]\n });\n \n\n for (var i = 0; i<response.length; i++) {\n displayTable.push(\n [response[i].item_id, response[i].product_name, response[i].department_name, response[i].price, response[i].stock_quantity]\n );\n }\n\n //display table in console\n console.log(displayTable.toString());\n customerChoice();\n });\n\n}", "title": "" }, { "docid": "86bfe2610873d92efcde6608607f5ff1", "score": "0.5622619", "text": "function runEnter(){\n console.log('test');\n d3.event.preventDefault();\n removeTable();\n var tbody = d3.select('tbody');\n var inputId = document.getElementsByClassName('form-control'); // => array returns a collection of all elements in the document \n \n console.log(inputId);\n var filteredData = dataY; \n // var idName = inputId[i].id; // return to city,state ...\n var x = d3.select(\"#\" + 'city').property(\"value\");\n var inputValue = x.toLowerCase().trim();\n console.log(inputValue);\n\n for (var i = 0; i < 3; i++){\n var filteredData = dataY.filter(table => table[listName[i]].toLowerCase().trim() === inputValue);\n if (filteredData.length > 0) { //return to array\n filteredData.forEach(x=>{\n table(x, tbody);\n });\n break; // ?? no break will show ‘not found’ , with break can not find ca\n }\n else {continue;} // with or without this function same result\n };\n\n if(inputValue ===''){\n filteredData.forEach(x=>{\n table(x, tbody);\n console.log(x);\n });\n }\n else // !==''\n if (filteredData.length == 0){ // remember filteredData ????\n d3.select('tbody')\n .append('tr')\n .append('td')\n .attr('colspan', 7)\n .html('<h3>No Records Found</h3>');\n }\n\n }", "title": "" }, { "docid": "f6fd1da332d58e95947fdc97e3d392b7", "score": "0.562067", "text": "function searchByParms(someArray) {\n // Grabbing the values from our nameForm form and inputs.\n let firstNameInput = someArray[0];\n let lastNameInput = someArray[1];\n let genderInput = someArray[2];\n let eyeColorInput = someArray[3];\n let occupationInput = someArray[4];\n\n\n // \"people\" is coming from the data.js file. We have access to it within this JavaScript file.\n let filteredPeople = people.filter(function (person) {\n if (firstNameInput !== \"\" && person.firstName !== firstNameInput) {\n return false\n } else if (lastNameInput !== \"\" && person.lastName !== lastNameInput) {\n return false\n } else if (genderInput !== \"\" && person.gender !== genderInput) {\n return false\n } else if (eyeColorInput !== \"\" && person.eyeColor !== eyeColorInput) {\n return false\n } else if (occupationInput !== \"\" && person.occupation !== occupationInput) {\n return false\n }\n return true\n\n }\n );\n\n // Rather than console logging, you need to append the filteredPeople to a table.\n if (filteredPeople.length > 0) {\n console.log(filteredPeople);\n deleteTable();\n loadTable(filteredPeople);\n } else {\n alert('Sorry, looks like there is no one with that search criteria.');\n console.log('Sorry, looks like there is no one with that search criteria.');\n }\n}", "title": "" }, { "docid": "27bcbb46fc2433f274aa324e8211d885", "score": "0.5617867", "text": "function viewAllByDep() {\n let depArray = [];\n\n promisemysql.createConnection(connectionProperties) .then((connect) => {\n return connect.query('SELECT name FROM department');\n }) .then(function(value) {\n depQuery = value;\n for(i=0; i < value.length; i++) {\n depArray.push(value[i].name);\n }\n }) .then (() => {\n inquirer.prompt({\n name: \"department\",\n type: \"list\",\n message: \"Which department would you like to search?\",\n choices: depArray\n }) .then((answer) => {\n const query = `SELECT e.id AS ID, e.first_name AS 'First Name', e.last_name AS 'Last Name', role.title AS Title, department.name AS Department, role.salary AS Salary, concat(m.first_name, ' ' , m.last_name) AS Manager FROM employee e LEFT JOIN employee m ON e.manager_id = m.id INNER JOIN role ON e.role_id = role.id INNER JOIN department ON role.department_id = department.id WHERE department.name = '${answer.department}' ORDER BY ID ASC`;\n connection.query(query, (err, res) => {\n if(err) return err;\n console.log(\"\\n\");\n\n console.table(res);\n\n mainMenu();\n });\n });\n });\n}", "title": "" }, { "docid": "ca7112fa1460be86511e31589af71dfb", "score": "0.5615533", "text": "function view() {\n console.log('Now viewing information')\n inquirer.prompt([{\n type: 'list',\n name: 'action',\n message: 'Which table would you like to view?',\n choices: [\n 'Department',\n 'Role',\n 'Employee'\n ]\n }]).then(function(response) {\n switch (response.action) {\n case 'Department':\n return viewDep();\n case 'Role':\n return viewRole();\n case 'Employee':\n return viewEmp();\n default:\n console.log('Gotta pick something');\n }\n });\n}", "title": "" }, { "docid": "55725901f2a99a7b85ffcc26580e5e11", "score": "0.5606631", "text": "function selectedfood() {\n lovecats.json(`/print2`).then((data) => {\n // select the reference ID to input the data\n var PANEL = lovecats.select(\"#searchedfood\");\n // console.log(data);\n // Clear any existing metadata\n PANEL.html(\"\");\n // Create the table and input the data \n data.forEach((sample) => {\n PANEL\n .append(\"tr\");\n PANEL\n .append('td')\n .text(sample.group);\n PANEL\n .append('td')\n .text(sample.name);\n PANEL\n .append('td')\n .text(sample.calories);\n \n })\n });\n}", "title": "" }, { "docid": "34c351b78469c250e130b35a88170d0e", "score": "0.5605861", "text": "function runEnter() {\n \n // select the input box and get the raw html node\n let inputBox = d3.select(\"#datetime\");\n\n // select the value of the input box, giving you the text inside the box\n let inputValue = inputBox.property(\"value\");\n\n // use the form input to filter the data by date\n let newData = tableData.filter((item) => item.datetime === inputValue);\n console.log(newData)\n\n // clear any previous data from the table body\n tbody.html(\"\")\n\n // loop through the filtered data and add each report to the table\n newData.forEach((item) => {\n let row = tbody.append(\"tr\");\n row.append(\"td\").text(item.datetime);\n row.append(\"td\").text(item.city);\n row.append(\"td\").text(item.state);\n row.append(\"td\").text(item.country);\n row.append(\"td\").text(item.shape);\n row.append(\"td\").text(item.durationMinutes);\n row.append(\"td\").text(item.comments);\n });\n}", "title": "" }, { "docid": "a4e8483fb71703819700b0df055dacf5", "score": "0.5597125", "text": "function viewAllEmployees() {\n db.findAllEmployees().then(([data]) => {\n console.log('\\n')\n console.table(data)\n }).then(() => initialPrompt());\n}", "title": "" }, { "docid": "f2ced0d0e9b15366379b2a1cc03aff34", "score": "0.5592646", "text": "function changes(){\n d3.event.preventDefault();\n let inputElement = d3.select(this);\n let inputValue = inputElement.property(\"value\").toLowerCase();\n let filter = tableData.filter(row => row[inputElement.property(\"id\")] === inputValue);\n\n\n// reset/rebuild html with filter results\n tbody.html(\"\")\n\n filter.forEach(function(findSighting){\n var row = tbody.append(\"tr\");\n Object.values(findSighting).forEach(function(value){\n row.append(\"td\").text(value);\n });\n });\n}", "title": "" }, { "docid": "46703980cfbd223af07064a7a4c5f4df", "score": "0.55833054", "text": "function display() {\n connection.query(\"SELECT * FROM products\", function(err, res) {\n console.log(\"---------------------\");\n console.log(\"Teams for Sale\");\n console.log(\"---------------------\");\n console.log(\"\");\n // creates a table\n console.table(res);\n welcome();\n });\n}", "title": "" }, { "docid": "c679228f5683d09149d2fcd36be14c39", "score": "0.5582264", "text": "function displayUfoData() \n {\n ufoData.forEach((rowData) => {\n let row = tbody.append(\"tr\");\n Object.values(rowData).forEach((value) => {\n let cell = row.append(\"td\");\n cell.text(value);\n })\n })\n // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n // Check if user entered a 'Date'; if empty notify user to enter a date.\n // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n // if (!datetime) {\n // alert (\"Please enter a date.\");\n // return;\n // };\n \n}", "title": "" }, { "docid": "facff624dc7467355ddc1fa67e3ede75", "score": "0.55791295", "text": "function runAction() {\n\n inquirer.prompt({\n name: \"Options\",\n type: \"list\",\n choices: [\"View Products for Sale\", \"View Low Inventory\", \"Add to Inventory\", \"Add New Product\"]\n\n }).then(function (answer) {\n switch (answer.Options) {\n //if the choice is to view products, display all the products by calling the ufnction displayProducts()\n case \"View Products for Sale\":\n displayProducts();\n break;\n //If the choice is to view Low inventory, call the function lowInventory\n case \"View Low Inventory\":\n lowInventory();\n break;\n //If the choice is to Add inventory, call the function addInventory\n case \"Add to Inventory\":\n addInventory();\n break;\n //If the choice is to add a new product , call the function addNewProduct()\n case \"Add New Product\":\n addNewProduct();\n break;\n }\n });\n\n\n\n // Function to display products available for sale\n\n function displayProducts() {\n var table = new Table({\n head: ['item_id', 'Product_Name', 'Department', 'Price', 'Stock']\n , colWidths: [10, 20, 20, 10, 10]\n });\n var query = \"SELECT * from products\";\n connection.query(query, function (err, res) {\n\n for (var i = 0; i < res.length; i++) {\n table.push([res[i].item_id, res[i].product_name, res[i].department_name, res[i].price, res[i].stock_quantity]);\n }\n\n //Display the table on the console\n console.log(table.toString());\n\n });\n\n }\n\n // Funtion to display low inventory items\n function lowInventory() {\n //initialize the query as all products less than quantity as 5\n var query = \"SELECT * from products where stock_quantity < 5\";\n //Declare a CLI table to push the low stock items\n var lowStock = new Table({\n head: ['item_id', 'Product_Name', 'Department', 'Price', 'Stock']\n , colWidths: [10, 20, 20, 10, 10]\n });\n connection.query(query, function (err, res) {\n //For each record in the product table, push to the CLI lowStock table\n for (var i = 0; i < res.length; i++) {\n lowStock.push([res[i].item_id, res[i].product_name, res[i].department_name, res[i].price, res[i].stock_quantity]);\n }\n\n //Display the lowStock table to the console.\n console.log(lowStock.toString());\n\n });\n\n }\n // Function to add Inventory \n function addInventory() {\n // // PRompt the user to enter the id and quantity to increase for the chosen product\n inquirer.prompt([\n {\n name: \"enterID\",\n type: \"input\",\n message: \"Enter the id of the item you want to add Inventory for:\"\n },\n {\n name: \"enterQuant\",\n type: \"input\",\n mesage: \"Enter the qunatity you want to increase for the product:\"\n },\n ]).then(function (resp) {\n // Select the product chosen and get the current stock of the product\n connection.query(\"Select stock_quantity from products where item_id = \" + resp.enterID, function (err, data) {\n var curStock = data[0].stock_quantity;\n if (err) {\n console.log(err);\n }\n // Declare a variable to add the current stock and the stock increase requested\n var stockToSet = parseInt(curStock) + parseInt(resp.enterQuant);\n // Update the products tbale wiht the stockToSet variable which is sum of current and the desired increase \n var query = \"update products set stock_quantity = \" + stockToSet + \" where item_id = \" + resp.enterID + \";\"\n\n connection.query(query, function (err, res) {\n // if error, display error else display the products table reflecting increased stock\n if (err) {\n console.log(err);\n\n } else {\n\n console.log(\"Inventory Updated successfully:\");\n displayProducts();\n }\n\n });\n });\n });\n }\n\n\n //Function to add new Products\n\n function addNewProduct() {\n //Provide prompts to enter new product details\n inquirer.prompt([\n {\n name: \"prodName\",\n type: \"input\",\n message: \"Enter the new Product Name:\"\n },\n\n {\n name: \"deptName\",\n type: \"input\",\n message: \"Enter the Department Name of the new product:\"\n },\n {\n name: \"price\",\n type: \"input\",\n message: \"Enter the price of the new product:\"\n },\n {\n name: \"stock\",\n type: \"input\",\n message: \"Enter the stock of the new product:\"\n },\n\n ]).then(function (newProd) {\n\n var newProdName = newProd.prodName;\n var newDeptName = newProd.deptName;\n var newPrice = newProd.price;\n var newStock = newProd.stock;\n //Insert the new product into the products table.if error, display error, else display product added successfully\n var query = \"insert into products(product_name,department_name,price,stock_quantity) values( '\" + newProdName + \"','\" + newDeptName + \"','\" + newPrice + \"',\" + newStock + \");\"\n console.log(\"Query is:\" + query);\n connection.query(query, function (err, res) {\n if (err) {\n console.log(err);\n }\n else {\n\n console.log(\"New Product added successfully\");\n //Display the products tabel with the added product\n displayProducts();\n\n }\n });\n\n\n });\n }\n\n}", "title": "" }, { "docid": "aeceb84240c83037c13b79ead2ae63d0", "score": "0.55737644", "text": "function displayTable() {\n\n\tconnection.query(\"SELECT * FROM products\", function(error, response) {\n\n\t\tif (error) {\n\t\t\tconsole.log (\"Error MySQL Connection: Display Table: \" + error);\n\t\t\treturn;\n\t\t}\n\n\t\telse {\n\t\t\t// npm package to create & display product table\n\t\t\tvar productTable = new table({\n\t\t\t\thead: [\"ID\", \"NAME\", \"DEPARTMENT\", \"Price ($)\", \"Quantity in Stock\"],\n\t\t\t\tcolWidths: [5, 20, 20, 20, 20]\n\t\t\t});\n\n\n\t\t}// close else statment\n\n\t\t// pull response for every product item in SQL into Table\n\t\tfor (var i = 0; i < response.length; i++) {\n\t\t\tproductList.push([response[i].item_id,response[i].product_name,response[i].department_name,response[i].price,response[i].inventory_quantity,response[i].product_sales]);\n \tproductTable.push([response[i].item_id,response[i].product_name,response[i].department_name,response[i].price.toFixed(2),response[i].inventory_quantity]); \n\n\t\t}// close for loop\n\n\t\tconsole.log(productTable.toString());\n\n\t}) // close SQL query request\t\n\n}// close displayTable Funct", "title": "" }, { "docid": "74f555f26f8421df8b5cd65f10765ae4", "score": "0.55669457", "text": "function runEnter() {\n\n // Prevent the page from refreshing\n d3.event.preventDefault();\n\n // Get the value property of the input element\n var inputValue = form.property(\"value\");\n var matchcount = 0\n\n // console.log(inputValue);\n\n if (inputValue === \"\") {\n ufo_data.forEach(function(ufoSighting) {\n var row = tbody.append(\"tr\");\n \n Object.entries(ufoSighting).forEach(function([key, value]) {\n // console.log(key, value);\n var cell = row.append(\"td\");\n cell.text(value);\n });\n });\n }\n \n else {\n // Filter data based on inputValue\n var filteredData = ufo_data.filter(ufo => ufo.datetime === inputValue.trim());\n console.log(filteredData);\n tbody.html(\"\");\n\n // Loop through filteredData and append each object to the table\n filteredData.forEach(function(ufoSighting) {\n matchcount += matchcount;\n // console.log(matchcount);\n \n var row = tbody.append(\"tr\");\n\n Object.entries(ufoSighting).forEach(function([key, value]) {\n // console.log(key, value);\n var cell = row.append(\"td\");\n cell.text(value);\n });\n if (filteredData===[]){\n window.alert(\"There's no matching data :(\")\n }\n \n \n });\n }\n \n}", "title": "" }, { "docid": "7e856fef74eff5b50dfec7183d100a9d", "score": "0.55625254", "text": "function runEnter(){\n // clear table so filtered data will show up\n tbody.text(\"\");\n\n // Prevent the page from refreshing\n d3.event.preventDefault();\n\n // select input element\n var inputElement = d3.select(\"input\");\n\n // Get the value property of the input element\n var inputValue = inputElement.property(\"value\");\n\n // create a filtered data variable\n var filterSearch = tableData.filter(sighting => sighting.datetime === inputValue);\n\n // append filtered data to the table\n filterSearch.forEach(filterData => {\n console.log(filterData);\n var row = tbody.append(\"tr\");\n\n Object.entries(filterData).forEach(([key, value]) => {\n var cell = row.append(\"td\");\n cell.text(value);\n });\n });\n}", "title": "" }, { "docid": "0002da56da4c575f94cf3c692be9b8b5", "score": "0.5561776", "text": "function loadTable() {\n connection.query(\"SELECT * FROM products\", function (error, result) {\n if (error) throw (error);\n // Display \"prettified\" table formatting via the console.table module\n console.log(\"\\==============================================================================\");\n console.table(result);\n promptItemId(result);\n })\n}", "title": "" }, { "docid": "79940cf556aef8f7cf47da29223ee85d", "score": "0.555832", "text": "function handleClick() {\n\n // Grab the #datetime value from the filter with d3.select().property()\n // passing form inputs to lowercase to match data\n \n const date = d3.select(\"#datetime\").property(\"value\");\n const city = d3.select(\"#city\").property(\"value\").toLowerCase();\n const state = d3.select(\"#state\").property(\"value\").toLowerCase();\n const country = d3.select(\"#country\").property(\"value\").toLowerCase();\n\n // store the tableData into a local variable called filteredData\n // running through multiple else if conditionals to determine which tables to pull in based on filters\n \n if (date && city && state && country) {\n var filteredDataDate = tableData.filter(d => d.datetime === date);\n var filteredDataCity = filteredDataDate.filter(d => d.city === city);\n var filteredDataState = filteredDataCity.filter(d => d.state === state);\n var filteredDataCountry = filteredDataState.filter(d => d.country === country);\n buildTable(filteredDataCountry);\n } else if (date && state && country) {\n var filteredDataDate = tableData.filter(d => d.datetime === date);\n var filteredDataState = filteredDataDate.filter(d => d.state === state);\n var filteredDataCountry = filteredDataState.filter(d => d.country === country);\n buildTable(filteredDataCountry);\n } else if (city && state && country) {\n var filteredDataCity = tableData.filter(d => d.city === city);\n var filteredDataState = filteredDataCity.filter(d => d.state === state);\n var filteredDataCountry = filteredDataState.filter(d => d.country === country);\n buildTable(filteredDataCountry); \n } else if (date && city && state) {\n var filteredDataDate = tableData.filter(d => d.datetime === date);\n var filteredDataCity = filteredDataDate.filter(d => d.city === city);\n var filteredDataState = filteredDataCity.filter(d => d.state === state);\n buildTable(filteredDataState);\n } else if (state && country) {\n var filteredDataState = tableData.filter(d => d.state === state);\n var filteredDataCountry = filteredDataState.filter(d => d.country === country);\n buildTable(filteredDataCountry);\n } else if (city && state) {\n var filteredDataCity = tableData.filter(d => d.city === city);\n var filteredDataState = filteredDataCity.filter(d => d.state === state);\n buildTable(filteredDataState);\n } else if (date && city) {\n var filteredDataDate = tableData.filter(d => d.datetime === date);\n var filteredDataCity = filteredDataDate.filter(d => d.city === city);\n buildTable(filteredDataCity);\n } else if (date) {\n var filteredDataDate = tableData.filter(d => d.datetime === date);\n buildTable(filteredDataDate);\n } else if (city) {\n var filteredDataCity = tableData.filter(d => d.city === city);\n buildTable(filteredDataCity);\n } else if (state) {\n var filteredDataState = tableData.filter(d => d.state === state);\n buildTable(filteredDataState);\n } else if (country) {\n var filteredDataCountry = tableData.filter(d => d.country === country);\n buildTable(filteredDataCountry);\n } else {\n buildTable(tableData);\n };\n\n}", "title": "" }, { "docid": "4dc2b123dc43340533a933234ba47634", "score": "0.55552787", "text": "function displayItems() {\n console.log(\"Loading items...\");\n connection.query(\"SELECT * FROM products\", function(error, response) {\n if(error) throw error;\n var data = [[\"ID\", \"Product Name\", \"Department Name\", \"Price(USD)\", \"# In Stock\"]];\n var output;\n for (var i = 0; i < response.length; i++) {\n var product = [response[i].item_id.toString(), response[i].product_name.toString(), response[i].department_name.toString(), response[i].price.toString(), response[i].stock_quantity.toString()];\n data.push(product);\n };\n output = table(data);\n console.log(output + \"\\n\");\n inquirer.prompt({\n name: \"shop\",\n type: \"list\",\n message: \"Would you like to buy something?\",\n choices: [\"Yes\", \"No\"]\n }).then(function(answer) {\n if (answer.shop === \"Yes\") {\n shop();\n } else {\n connection.end();\n }\n });\n });\n}", "title": "" }, { "docid": "9819852a587cf107fb92bb543238fe7b", "score": "0.55447644", "text": "function viewEmployee() {\n db.connection.query(\"SELECT * FROM employee\", function(err, res) {\n if (err) throw err;\n const empArr = []\n for (var i = 0; i < res.length; i++) {\n empArr.push(res[i]);\n }\n console.table(empArr);\n continueOption();\n });\n}", "title": "" }, { "docid": "f2b20c1e4d8b7d332f5f8fc7bc7e0e4a", "score": "0.5541826", "text": "function read(tableName){\n let datarow = getDatarowFromMyForm();\n if(datarow===undefined){document.querySelector('main').innerHTML = 'Datarow does not have an ID';return;}\n \n //~ open an idb connection\n idb.open(dbName).onsuccess = dbEvent => {\n //~ request to get something from a table\n let getRequest = dbEvent.target.result.transaction([tableName]).objectStore(tableName).get(datarow.id);\n \n //~ if getRequest succesful...\n getRequest.onsuccess = getEvent => {\n tableDatarow = getEvent.target.result;\n \n //~ check if returned datarow exists \n if(tableDatarow!==undefined)\n //~ if exists print datarow\n {document.querySelector('main').innerHTML = JSON.stringify(tableDatarow);}\n else\n //~ else print error message\n {document.querySelector('main').innerHTML = `The datarow with id of '${datarow.id}' doesn't exist`;}\n }\n }\n}", "title": "" }, { "docid": "d34f2c2debc2c8c3983c9729b4691d53", "score": "0.55410373", "text": "function showTable(data){\n //clear tbody\n tbody.html(\"\");\n //define counter to store data len\n count=0;\n // displays all rows\n data.forEach((record) => {\n //add tr\n var row = tbody.append(\"tr\");\n //increment count\n count+=1;\n //get key values for each record\n Object.entries(record).forEach(([key, value]) => {\n //add value to each cell\n var cell = row.append(\"td\");\n cell.text(value);\n });\n });\n if(count==0){\n tbody.append(\"h1\").text(\"No recods in the selected date found\")\n }\n}", "title": "" }, { "docid": "38a2631b9d926b4f7b06fbc8570382df", "score": "0.55317867", "text": "function gotData_4(data) {\n\n remove_Table_4();\n createTable_4();\n\n table = document.getElementById('lampsINPUT_T');\n\n let array = new Array();\n\n var lamps = data.val();\n var keys = Object.keys(lamps);\n\n for (var i = 0; i < keys.length; i++) {\n var k = keys[i];\n\n array[0] = k;\n array[1] = lamps[k].lampID;\n array[2] = lamps[k].lampName;\n array[3] = lamps[k].partNumber;\n array[4] = lamps[k].fixture;\n array[5] = lamps[k].lifeTime;\n array[6] = lamps[k].power;\n array[7] = lamps[k].qty;\n array[8] = lamps[k].location;\n\n // create a new row\n var newRow = table.insertRow(i + 1);\n\n for (var j = 0; j < 9; j++) {\n\n // create a new cell\n var cell = newRow.insertCell(j);\n\n // add value to the cell\n cell.innerHTML = array[j];\n }\n }\n // Hide first column of the table (with database keys)\n for (var i = 0; i <= keys.length; i++) {\n table.rows[i].cells[0].style.display = 'none';\n }\n for (var i = 1; i <= keys.length; i++) {\n table.rows[i].cells[2].id = 'colName';\n table.rows[i].cells[4].id = 'colFxt';\n table.rows[i].cells[7].id = 'colQty';\n }\n\n}", "title": "" }, { "docid": "4a988048db8aa7e1ad2884ba7a9b5d5f", "score": "0.5526555", "text": "function viewDepartment() {\n connection.query(\"SELECT * FROM Department\", function(err, data) {\n if (err) throw err;\n //bang (err) slang err; \n console.log(`\\n`);\n console.table(data);\n userData(); \n })\n}", "title": "" } ]
e90ebea714755ab2189127e25f1064c3
validates all fields under the NFPA, HMIS, pH, Physical State, Density, Flashpoint, Boiling Point, Solids, Specific Gravity, Vapor Pressure, VOC, and VOC Less Water and Exempt sections
[ { "docid": "65afa248c2cdff3fcffb9675a116b1ff", "score": "0.6102341", "text": "function validateSections(msdsNotRequired, idOnly, requireFields, isCo) {\n\t\tvar message = \"\";\n\n\t\t// Validate Material Description\n\t\tif ( ! isCo) {\n\t\t\tmessage = validateMaterialDesc(message, requireFields);\n\t\t}\n\n\t\t// Validate Physical State\n\t\tvar physicalState = msdsIndex.getMSDSfieldValue(\"physicalState\",isCo);\n\t\tif (physicalState == '') {\n\t\t\tif(requireFields && ! isCo && ! idOnly)\n\t\t\t\tmessage += messagesData.pleaseselect.replace('{0}',messagesData.physicalState) + '\\n';\n\t\t\t// if no CO physical state, use global\n\t\t\telse if(isCo)\n\t\t\t\tphysicalState = msdsIndex.getMSDSfieldValue(\"physicalState\");\n\t\t}\n\n\t\t// Validate NFPA and HMIS\n\t\tmessage += checkInteger(\"health\", messagesData.nfpaHealth,0,4,null,isCo);\n\t\tmessage += checkInteger(\"flammability\", messagesData.nfpaFlammability,0,4,null,isCo);\n\t\tmessage += checkInteger(\"reactivity\", messagesData.nfpaReactivity,0,4,null,isCo);\n\n\t\tmessage += checkInteger(\"hmisHealth\", messagesData.hmisHealth,0,4,'*',isCo);\n\t\tmessage += checkInteger(\"hmisFlammability\", messagesData.hmisFlammability,0,4,null,isCo);\n\t\tmessage += checkInteger(\"hmisReactivity\", messagesData.hmisReactivity,0,4,null,isCo);\n\n\t\t// Validate Specific Gravity\n\t\tif(msdsNotRequired && msdsIndex.getMSDSfieldValue(\"specificGravityLower\").trim().length == 0) {\n\t\t\tmsdsIndex.getMSDSfield(\"specificGravityLower\").value = \"1\";\n\t\t\tmsdsIndex.getMSDSfield(\"specificGravityLower\").disabled = false;\n\t\t\tmsdsIndex.getMSDSfield(\"specificGravitySource\").value = \"estimate\";\n\t\t\tif (msdsIndex.getMSDSfieldValue(\"specificGravityDetect\").trim().length == 0) {\n\t\t\t\tmsdsIndex.getMSDSfield(\"specificGravityDetect\").value = \"=\";\n\t\t\t\tmsdsIndex.getMSDSfield(\"specificGravityBasisWater\").checked = true;\n\t\t\t}\n\t\t}\n\t\tvar specificGravityBasis = j$(\"input[name$='specificGravityBasis']:checked\");\n\t\tvar specificGravityBasisVal = null;\n\t\tif (specificGravityBasis != null && specificGravityBasis.length > 0) {\n\t\t\tvar specificGravityBasisCo = null;\n\t\t\tif (isCo)\n\t\t\t\tspecificGravityBasisCo = specificGravityBasis.filter(\"input[name^='co']\").eq(0);\n\t\t\tif (specificGravityBasisCo == null || specificGravityBasisCo.length == 0)\n\t\t\t\tspecificGravityBasis = specificGravityBasis.filter(\"input[name^='msds']\").eq(0);\n\t\t\telse\n\t\t\t\tspecificGravityBasis = specificGravityBasisCo;\n\t\t\tif (specificGravityBasis != null && specificGravityBasis.length > 0)\n\t\t\t\tspecificGravityBasisVal = specificGravityBasis.eq(0).val();\n\t\t}\n\n\t\tif (requireFields && ! isCo && ! msdsNotRequired && ! idOnly && ! msdsIndex.getMSDSfield(\"specificGravityLower\").disabled &&\n\t\t\t(specificGravityBasis == null || specificGravityBasis.length == 0))\n\t\t\tmessage += messagesData.pleaseselect.replace('{0}',messagesData.specificGravityBasis) + '\\n';\n\n\t\tif( ! msdsIndex.getMSDSfield('specificGravityLower',isCo).disabled) {\n\t\t\tmessage += checkPositiveFloat(\"specificGravityLower\", messagesData.specificGravity,isCo,false);\n\t\t\tif(specificGravityBasisVal == \"W\") {\n\t\t\t\tif(physicalState == \"gas\") {\n\t\t\t\t\tvar msg = checkFloat(\"specificGravityLower\", messagesData.specificGravity, 0.0, 0.1,isCo);\n\t\t\t\t\tif (msg.length > 0) {\n\t\t\t\t\t\tif (isCo)\n\t\t\t\t\t\t\tmsg = messagesData.customerOverride + \" - \" + msg;\n\t\t\t\t\t\tvar confirmSpecGrav = confirm(msg+\"\\n\"+messagesData.wanttocontinue);\n\t\t\t\t\t\tif( ! confirmSpecGrav)\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(physicalState == \"liquid\") {\n\t\t\t\t\tvar msg = checkFloat(\"specificGravityLower\", messagesData.specificGravity, 0.5, Number.POSITIVE_INFINITY,isCo);\n\t\t\t\t\tif (msg.length > 0) {\n\t\t\t\t\t\tif (isCo)\n\t\t\t\t\t\t\tmsg = messagesData.customerOverride + \" - \" + msg;\n\t\t\t\t\t\tvar confirmSpecGrav = confirm(msg+\"\\n\"+messagesData.wanttocontinue);\n\t\t\t\t\t\tif ( ! confirmSpecGrav)\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(physicalState == \"solid\") {\n\t\t\t\tvar msg = checkFloat(\"specificGravityLower\", messagesData.specificGravity, 0.0, 14.0,isCo);\n\t\t\t\tif (msg.length > 0) {\n\t\t\t\t\tif (isCo)\n\t\t\t\t\t\tmsg = messagesData.customerOverride + \" - \" + msg;\n\t\t\t\t\tvar confirmSpecGrav = confirm(msg+\"\\n\"+messagesData.wanttocontinue);\n\t\t\t\t\tif( ! confirmSpecGrav)\n\t\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif( ! msdsIndex.getMSDSfield('specificGravityUpper',isCo).disabled)\n\t\t\tmessage += checkPositiveFloat(\"specificGravityUpper\", messagesData.specificGravity,isCo,false);\n\t\tif(validateRange('specificGravity',isCo))\n\t\t\tmessage += messagesData.range.replace('{0}',messagesData.specificGravity) + '\\n';\n\n\t\t// Validate Density\n\t\tif( ! msdsIndex.getMSDSfield('density',isCo).disabled)\n\t\t\tmessage += checkPositiveFloat(\"density\", messagesData.density,isCo,false);\n\t\tif( ! msdsIndex.getMSDSfield('densityUpper',isCo).disabled)\n\t\t\tmessage += checkPositiveFloat(\"densityUpper\", messagesData.density,isCo,false);\n\t\tif(validateRange('density',isCo))\n\t\t\tmessage += messagesData.range.replace('{0}',messagesData.density) + '\\n';\n\t\tif(validateUnits('density',isCo))\n\t\t\tmessage += messagesData.nounit.replace('{0}',messagesData.density) + '\\n';\n\t\tvar densityUnits = msdsIndex.getMSDSfieldValue(\"densityUnit\",isCo);\n\t\tif (densityUnits != \"\") {\n\t\t\tvar msg = checkFloat(\"density\", messagesData.density,0.0,22.65/densityUnitConversion[densityUnits],isCo);\n\t\t\tif (msg.length > 0) {\n\t\t\t\tif (isCo)\n\t\t\t\t\tmsg = messagesData.customerOverride + \" - \" + msg;\n\t\t\t\tvar conf = confirm(msg+\"\\n\"+messagesData.wanttocontinue);\n\t\t\t\tif ( ! conf)\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// Validate Flash Point\n\t\tif(requireFields && ! isCo && ! msdsNotRequired && !idOnly && msdsIndex.getMSDSfieldValue(\"flashPointDetect\") == '')\n\t\t\tmessage += messagesData.pleaseselectfor.replace('{0}',messagesData.detect).replace('{1}',messagesData.flashPoint) + '\\n';\n\t\telse {\n\t\t\tif( ! msdsIndex.getMSDSfield('flashPointLower',isCo).disabled)\n\t\t\t\tmessage += checkSignedFloat(\"flashPointLower\", messagesData.flashPoint);\n\t\t\tif( ! msdsIndex.getMSDSfield('flashPointUpper',isCo).disabled)\n\t\t\t\tmessage += checkSignedFloat(\"flashPointUpper\", messagesData.flashPoint);\n\t\t\tif(validateRange('flashPoint',isCo))\n\t\t\t\tmessage += messagesData.range.replace('{0}',messagesData.flashPoint) + '\\n';\n\t\t\tif(validateUnits('flashPoint',isCo))\n\t\t\t\tmessage += messagesData.nounit.replace('{0}',messagesData.flashPoint) + '\\n';\n\t\t}\n\n\t\t// Validate Boiling Point\n\t\tif( ! msdsIndex.getMSDSfield('boilingPointLower',isCo).disabled)\n\t\t\tmessage += checkSignedFloat(\"boilingPointLower\", messagesData.boilingPoint);\n\t\tif( ! msdsIndex.getMSDSfield('boilingPointUpper',isCo).disabled)\n\t\t\tmessage += checkSignedFloat(\"boilingPointUpper\", messagesData.boilingPoint);\n\t\tif(validateRange('boilingPoint',isCo))\n\t\t\tmessage += messagesData.range.replace('{0}',messagesData.boilingPoint) + '\\n';\n\t\tif(validateUnits('boilingPoint',isCo))\n\t\t\tmessage += messagesData.nounit.replace('{0}',messagesData.boilingPoint) + '\\n';\n\n\t\t// Validate pH\n\t\tvar ph = msdsIndex.getMSDSfield('ph',isCo);\n\t\tvar phUpper = msdsIndex.getMSDSfield('phUpper',isCo);\n\t\tif( ! ph.disabled) {\n\t\t\tmessage += checkFloat(\"ph\", messagesData.ph,0,14,isCo);\n\t\t}\n\t\tif( ! phUpper.disabled) {\n\t\t\tmessage += checkFloat(\"phUpper\", messagesData.ph,0,14,isCo);\n\t\t}\n\t\tif(validateRange('ph',isCo))\n\t\t\tmessage += messagesData.range.replace('{0}',messagesData.ph) + '\\n';\n\t\tif(encodeURI(msdsIndex.getMSDSfieldValue(\"phDetail\",isCo).replace(/%[A-F\\d]{2,6}/g, 'U')).length > 50)\n\t\t\tmessage += messagesData.maxinputlength + ': ' + messagesData.ph + ' ' + messagesData.detail + '\\n';\n\n\t\t// Validate Vapor Pressure\n\t\tif(requireFields && ! isCo && ! msdsNotRequired && ! idOnly && msdsIndex.getMSDSfieldValue(\"vaporPressureDetect\",isCo) == '')\n\t\t\tmessage += messagesData.pleaseselectfor.replace('{0}',messagesData.detect).replace('{1}',messagesData.vaporPressure) + '\\n';\n\t\telse {\n\t\t\tif( ! msdsIndex.getMSDSfield('vaporPressure',isCo).disabled)\n\t\t\t\tmessage += checkPositiveFloat(\"vaporPressure\", messagesData.vaporPressure,isCo,true);\n\t\t\tif( ! msdsIndex.getMSDSfield('vaporPressureUpper',isCo).disabled)\n\t\t\t\tmessage += checkPositiveFloat(\"vaporPressureUpper\", messagesData.vaporPressure,isCo,true);\n\t\t\tif( ! msdsIndex.getMSDSfield('vaporPressureTemp',isCo).disabled)\n\t\t\t\tmessage += checkFloat(\"vaporPressureTemp\", messagesData.vaporPressureTemp,null,null,isCo);\n\t\t\tif(validateRange('vaporPressure',isCo))\n\t\t\t\tmessage += messagesData.range.replace('{0}',messagesData.vaporPressure) + '\\n';\n\t\t\tif(validateUnits('vaporPressure',isCo))\n\t\t\t\tmessage += messagesData.nounit.replace('{0}',messagesData.vaporPressure) + '\\n';\n\t\t\tif(validateUnits('vaporPressureTemp',isCo))\n\t\t\t\tmessage += messagesData.nounit.replace('{0}',messagesData.vaporPressureTemp) + '\\n';\n\t\t}\n\n\t\t// Validate VOC\n\t\tif ((physicalState == \"solid\" || msdsNotRequired) &&\n\t\t\tmsdsIndex.getMSDSfieldValue(\"voc\").trim().length == 0 &&\n\t\t\tmsdsIndex.getMSDSfieldValue(\"vocLessH2oExempt\").trim().length == 0) {\n\t\t\tmsdsIndex.getMSDSfield(\"voc\",isCo).value = \"0\";\n\t\t\tmsdsIndex.getMSDSfield(\"vocUnit\",isCo).value = \"g/L\";\n\t\t\tmsdsIndex.getMSDSfield(\"vocSource\",isCo).value = \"composition\";\n\t\t\tmsdsIndex.getMSDSfield(\"vocLessH2oExempt\",isCo).value = \"0\";\n\t\t\tmsdsIndex.getMSDSfield(\"vocLessH2oExemptUnit\",isCo).value = \"g/L\";\n\t\t\tmsdsIndex.getMSDSfield(\"vocLessH2oExemptSource\",isCo).value = \"composition\";\n\t\t}\n\n\t\tvar coCompare = false;\n\t\tvar voclwes = msdsIndex.getMSDSfieldValue(\"vocLessH2oExempt\",isCo);\n\t\tvar voclwesUnit = msdsIndex.getMSDSfieldValue(\"vocLessH2oExemptUnit\",isCo);\n\t\tif (isCo && (voclwes == null || voclwes.trim().length == 0)) {\n\t\t\tvoclwes = msdsIndex.getMSDSfieldValue(\"vocLessH2oExempt\");\n\t\t\tvoclwesUnit = msdsIndex.getMSDSfieldValue(\"vocLessH2oExemptUnit\");\n\t\t}\n\t\telse {\n\t\t\tcoCompare = true;\n\t\t}\n\t\tvar vocVal = msdsIndex.getMSDSfieldValue(\"voc\", isCo);\n\t\tvar vocUnit = msdsIndex.getMSDSfieldValue(\"vocUnit\", isCo);\n\t\tvar vocDensity = msdsIndex.getMSDSfieldValue(\"density\", isCo);\n\t\tvar vocDensityUnit = msdsIndex.getMSDSfieldValue(\"densityUnit\",isCo);\n\t\tvar vocSpecificGrav = msdsIndex.getMSDSfieldValue(\"specificGravityLower\",isCo);\n\t\tif (isCo && (vocVal == null || vocVal.trim().length == 0)) {\n\t\t\tvocVal = msdsIndex.getMSDSfieldValue(\"voc\");\n\t\t\tvocUnit = msdsIndex.getMSDSfieldValue(\"vocUnit\");\n\t\t\tvocDensity = msdsIndex.getMSDSfieldValue(\"density\");\n\t\t\tvocDensityUnit = msdsIndex.getMSDSfieldValue(\"densityUnit\");\n\t\t\tvocSpecificGrav = msdsIndex.getMSDSfieldValue(\"specificGravityLower\");\n\t\t}\n\t\telse {\n\t\t\tcoCompare = true;\n\t\t}\n\n\t\tmessage += checkFloat(\"vocLower\", messagesData.vocLower,null,null,isCo);\n\t\tmessage += checkFloat(\"vocUpper\", messagesData.vocUpper,null,null,isCo);\n\t\tif(validateRange('voc',isCo))\n\t\t\tmessage += messagesData.range.replace('{0}',messagesData.voc) + '\\n';\n\t\tif(validateUnits('voc',isCo))\n\t\t\tmessage += messagesData.nounit.replace('{0}',messagesData.voc) + '\\n';\n\t\tif (vocUnit == \"%(w/w)\")\n\t\t\tmessage += checkFloat(\"voc\", messagesData.voc,0.0,100.0,isCo);\n\n\t\tmessage += checkFloat(\"vocLessH2oExempt\", messagesData.vocLessH2oExempt,null,null,isCo);\n\t\tmessage += checkFloat(\"vocLessH2oExemptLower\", messagesData.vocLessH2oExemptLower,null,null,isCo);\n\t\tmessage += checkFloat(\"vocLessH2oExemptUpper\", messagesData.vocLessH2oExemptUpper,null,null,isCo);\n\t\tif(validateRange('vocLessH2oExempt',isCo))\n\t\t\tmessage += messagesData.range.replace('{0}',messagesData.vocLessH2oExempt) + '\\n';\n\t\tif(validateUnits('vocLessH2oExempt',isCo))\n\t\t\tmessage += messagesData.nounit.replace('{0}',messagesData.vocLessH2oExempt) + '\\n';\n\n\t\tif (vocVal != null && vocVal.trim().length > 0 &&\n\t\t\tvoclwes != null && voclwes.trim().length > 0 &&\n\t\t\tvocUnit.trim().length > 0 && voclwesUnit.trim().length > 0 &&\n\t\t\t(coCompare || ! isCo)) {\n\t\t\tif (vocUnit == voclwesUnit) {\n\t\t\t\tif (parseFloat(vocVal) > parseFloat(voclwes))\n\t\t\t\t\tmessage += formatMessage(messagesData.rangeError, messagesData.voc, 0.0, messagesData.vocLessH2oExempt) + '\\n';\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmessage = validateVOCUnits(vocVal, vocUnit, voclwes, voclwesUnit, vocDensity, vocDensityUnit, vocSpecificGrav, message);\n\t\t\t}\n\t\t}\n\n\t\tmessage = validateVOCVLessDensity(message,isCo);\n\n\t\t// Validate Solids\n\t\tmessage += checkFloat(\"solids\", messagesData.solids,null,null,isCo);\n\t\tmessage += checkFloat(\"solidsLower\", messagesData.solidsLower,null,null,isCo);\n\t\tmessage += checkFloat(\"solidsUpper\", messagesData.solidsUpper,null,null,isCo);\n\t\tif(validateRange('solids',isCo))\n\t\t\tmessage += messagesData.range.replace('{0}',messagesData.solids) + '\\n';\n\t\tif(validateUnits('solids',isCo))\n\t\t\tmessage += messagesData.nounit.replace('{0}',messagesData.solids) + '\\n';\n\t\tvar solidsUnits = msdsIndex.getMSDSfieldValue(\"solidsUnit\",isCo);\n\t\tif (solidsUnits == \"%(w/w)\")\n\t\t\tmessage += checkFloat(\"solids\", messagesData.solids,0.0,100.0,isCo);\n\n\t\treturn message;\n\t}", "title": "" } ]
[ { "docid": "f2c2d55757fe5541e94ada92209392ab", "score": "0.6889119", "text": "function validateFields() {\n const requiredFields = ['passenger_name', 'pnr_number', 'flight_info', 'logo_image_url', 'above_bar_code_image_url'];\n requiredFields.forEach(field => {\n if(!this.details[field]) throw new Error(`Required field ${field} missing in details`);\n });\n}", "title": "" }, { "docid": "3e6d58df00e13dd086da92bc95144d68", "score": "0.65514004", "text": "function validation(fields){\n let fieldCounter = 0\n for(let i = 0; i < fields.length; i++){\n let keyValue = fields[i].split(':')\n if(keyValue[0] === 'byr'){\n console.log(keyValue[1])\n parseInt(keyValue[1]) >= 1920 && parseInt(keyValue[1]) <= 2002 && keyValue[1].length === 4 ? fieldCounter++ : null\n }\n\n if(keyValue[0] === 'iyr')\n (parseInt(keyValue[1]) >= 2010 && parseInt(keyValue[1]) <= 2020) && keyValue[1].length === 4 ? fieldCounter++ : null\n\n if(keyValue[0] === 'eyr')\n (parseInt(keyValue[1]) >= 2020 && parseInt(keyValue[1]) <= 2030) && keyValue[1].length === 4 ? fieldCounter++ : null\n if(keyValue[0] === 'hgt'){\n let height = keyValue[1].match(/([0-9]*)(cm|in)/)\n if(height){\n let heightValue = height[1]\n let measurement = height[2]\n if(measurement === 'cm'){\n parseInt(heightValue) >= 150 && parseInt(heightValue) <= 193 ? fieldCounter++ : null\n }\n if(measurement === 'in'){\n parseInt(heightValue) >= 59 && parseInt(heightValue) <= 76 ? fieldCounter++ : null\n }\n }\n \n }\n if(keyValue[0] === 'hcl'){\n keyValue[1].match(/#[0-9a-fA-F]{6}/) ? fieldCounter++ : null\n }\n if(keyValue[0] === 'ecl') {\n keyValue[1] === 'amb' || \n keyValue[1] === 'blu' || \n keyValue[1] === 'brn' || \n keyValue[1] === 'gry' ||\n keyValue[1] === 'grn' ||\n keyValue[1] === 'hzl' ||\n keyValue[1] === 'oth' ? fieldCounter++ : null\n }\n if(keyValue[0] === 'pid'){\n keyValue[1].length === 9 && Number(keyValue[1]) ? fieldCounter++ : null\n }\n keyValue[0] === 'cid' ? fieldCounter++ : null\n }\n return fieldCounter === fields.length\n}", "title": "" }, { "docid": "71e9c66576e8b3f38d9b42c396ce5232", "score": "0.6487428", "text": "function verifyFields(){\n if(project_name && brief_description && color_choice\n && inside_outside && sign_location && sign_portable\n && sign_dimensions && sign_quantity && budget_amount){\n return true\n }\n else{\n return false\n }\n }", "title": "" }, { "docid": "904800015886912229a80f9793db8af8", "score": "0.634124", "text": "function validate() {\r\n \r\n // Personal fileds of section one.\r\n if(!validateField(\"fName\") || !validateField(\"mName\") || !validateField(\"surname\") || !validateField(\"gender\") \r\n || !validateField(\"bDay\") || !validateField(\"age\") || !validateField(\"occupation\") || !validateField(\"interests\")) {\r\n return;\r\n }\r\n\r\n // Partner fields of section one.\r\n if($(\"#hasPartner\").is(\":checked\")) {\r\n if(!validateField(\"partnerFName\") || !validateField(\"partnerMName\") || !validateField(\"partnerSurname\") || !validateField(\"partnerGender\")\r\n || !validateField(\"partnerBDay\") || !validateField(\"partnerAge\") || !validateField(\"partnerOccupation\")) {\r\n return;\r\n }\r\n }\r\n\r\n // Children fields of section one.\r\n if($(\"#hasChildren\").is(\":checked\")) {\r\n if(!validateField(\"numOfChildren\")) {\r\n return;\r\n }\r\n }\r\n\r\n // Contact fields of section two.\r\n // Only validates if section exists.\r\n if($(\"#questionaire2\").length) {\r\n if(!validateField(\"streetNum\") || !validateField(\"streetName\") || !validateField(\"streetType\") || !validateField(\"suburb\") \r\n || !validateField(\"city\") || !validateField(\"state\") || !validateField(\"postCode\") || !validateField(\"country\") \r\n || !validateField(\"email\") || !validateField(\"phone\")) {\r\n return;\r\n }\r\n }\r\n\r\n // Destination fields of section three.\r\n // Only validates if section exists.\r\n if($(\"#questionaire3\").length) {\r\n if(!validateField(\"environment\") || !validateField(\"prefRegion\") || !validateField(\"prefAccomodation\") || !validateField(\"howActive\")) {\r\n return;\r\n }\r\n }\r\n\r\n // Travel specifics fields of section four.\r\n // Only validates if section exists.\r\n if($(\"#questionaire4\").length) {\r\n if(!validateField(\"prefTravelMode\") || !validateField(\"budgetValue\") || !validateField(\"startDate\") || !validateField(\"endDate\")) {\r\n return;\r\n }\r\n\r\n // Validation for radio buttons.\r\n if(!$(\"#numOfPeople1\").is(\":checked\") && !$(\"#numOfPeople2\").is(\":checked\") && !$(\"#numOfPeople3\").is(\":checked\") \r\n && !$(\"#numOfPeople4\").is(\":checked\")) {\r\n pageValid = false;\r\n $(\"#travellingCompanionsError\").removeClass(\"hide\");\r\n $(\"#travellingCompanionsError\").addClass(\"notValidText\");\r\n return;\r\n } else {\r\n pageValid = true;\r\n $(\"#travellingCompanionsError\").addClass(\"hide\");\r\n $(\"#travellingCompanionsError\").removeClass(\"notValidText\");\r\n $(\"#travellingCompanionsError\").removeClass(\"inlineDisplay\");\r\n }\r\n }\r\n}", "title": "" }, { "docid": "ae13b2508b32b966b15a38c58760819c", "score": "0.6228957", "text": "function detectEmptyRequiredFields(funding) {\n /// dataset info\n var dsContent = emptyDSInfoEntries();\n var dsSatisfied = dsContent[0];\n var dsEmptyField = dsContent[1];\n\n /// protocol info check\n var protocolSatisfied = emptyLinkInfo();\n\n /// contributor info\n var conEmptyField = [];\n var conSatisfied = true;\n var fundingSatisfied = emptyInfoEntries(funding);\n var contactPersonExists = checkAtLeastOneContactPerson();\n var contributorNumber = document.getElementById(\"contributor-table-dd\").rows\n .length;\n if (!fundingSatisfied) {\n conEmptyField.push(\"SPARC Award\");\n }\n if (!contactPersonExists) {\n conEmptyField.push(\"One Corresponding Author\");\n }\n if (contributorNumber <= 1) {\n conEmptyField.push(\"At least one contributor\");\n }\n if (conEmptyField.length !== 0) {\n conSatisfied = false;\n }\n\n /// detect empty required fields and raise a warning\n var emptyArray = [dsSatisfied, conSatisfied, protocolSatisfied];\n var emptyMessageArray = [\n \"- Missing required fields under Dataset Info section: \" +\n dsEmptyField.join(\", \"),\n \"- Missing required fields under Contributor Info section: \" +\n conEmptyField.join(\", \"),\n \"- Missing required item under Article(s) and Protocol(s) Info section: At least one protocol url\",\n ];\n var allFieldsSatisfied = true;\n errorMessage = [];\n for (var i = 0; i < emptyArray.length; i++) {\n if (!emptyArray[i]) {\n errorMessage.push(emptyMessageArray[i]);\n allFieldsSatisfied = false;\n }\n }\n return [allFieldsSatisfied, errorMessage];\n}", "title": "" }, { "docid": "f437f4fad4cd8878745602de4457229f", "score": "0.62070477", "text": "function validate() {\n validatePostalCodeField();\n if (getFirstName() == '') {\n showError($.first_name, $.first_name_error, errorMsgs.required_field_error, true);\n }\n if (getLastName() == '') {\n showError($.last_name, $.last_name_error, errorMsgs.required_field_error, true);\n }\n if (getAddress1() == '') {\n showError($.address1, $.address1_error, errorMsgs.required_field_error, true);\n }\n if (getCity() == '') {\n showError($.city, $.city_error, errorMsgs.required_field_error, true);\n }\n if (viewLayoutData.hasState && getState() == null) {\n showError($.state_picker_container, $.state_error, errorMsgs.required_field_error, true);\n }\n validatePhoneField();\n}", "title": "" }, { "docid": "3b0d2a8672ba4a9055eeab4021172250", "score": "0.620147", "text": "function fieldValidator(value){\n\n\tvar razaoSocial = true;\n\tvar telefone = true;\n\tvar cpf = true;\n\tvar descricao = true;\n\tvar email = true;\n\tvar empresaType = true;\n\tvar endereco = true;\n\tvar enderecoNumber = true;\n\tvar postcode = true;\n\tvar state = true;\n\tvar street1 = true;\n\tvar street2 = true;\n\tvar suburb = true;\n\tvar result = {};\n\n//Valida Nome Fatasia\n\tif(value.razaoSocial){\n\t\tif(value.razaoSocial.length == \"\") {razaoSocial = false; console.log(\"Nome Fantasia Failed\")};\n\t}else{\n\t\trazaoSocial = false;\n\t};\n\n\n// Valida Telefone\n\tif(value.telefone){\n\t\tvalue.telefone = value.telefone.replace(/\\D+/g,'');\n\t\tif(value.telefone.length != 10 && value.telefone.length != 11 && value.telefone.length != \"\") {telefone = false; console.log(\"Telefone Failed\")};\n\t};\n// Valida CPF\n\tif(value.cpf){\n\t\tvalue.cpf = value.cpf.replace(/[^\\d]+/g,'');\n\t\tif(value.cpf == '') {cpf = false; console.log(\"CPF Failed\")}\n\t\tif (value.cpf.length != 11 ||\n\t\t\tvalue.cpf == \"00000000000\" ||\n\t\t\tvalue.cpf == \"11111111111\" ||\n\t\t\tvalue.cpf == \"22222222222\" ||\n\t\t\tvalue.cpf == \"33333333333\" ||\n\t\t\tvalue.cpf == \"44444444444\" ||\n\t\t\tvalue.cpf == \"55555555555\" ||\n\t\t\tvalue.cpf == \"66666666666\" ||\n\t\t\tvalue.cpf == \"77777777777\" ||\n\t\t\tvalue.cpf == \"88888888888\" ||\n\t\t\tvalue.cpf == \"99999999999\")\n\t\t\t{cpf = false; console.log(\"CPF Failed\")}\n\n\t\tadd = 0;\n\t\tfor (i=0; i < 9; i ++){\n\t\t\tadd += parseInt(value.cpf.charAt(i)) * (10 - i);\n\t\t};\n\t\t\trev = 11 - (add % 11);\n\t\t\tif (rev == 10 || rev == 11){ rev = 0; };\n\t\t\tif (rev != parseInt(value.cpf.charAt(9))){ cpf = false; console.log(\"CPF Failed\")};\n\n\t\tadd = 0;\n\t\tfor (i = 0; i < 10; i ++){\n\t\t\tadd += parseInt(value.cpf.charAt(i)) * (11 - i);\n\t\t};\n\t\trev = 11 - (add % 11);\n\t\tif (rev == 10 || rev == 11) { rev = 0;};\n\t\tif (rev != parseInt(value.cpf.charAt(10))){ cpf = false; console.log(\"CPF Failed\")};\n\t}\n\n//Valida CEP - Se contem apenas 8 numeros\n\tif(value[\"endereco.postcode\"]){\n\t\tvalue[\"endereco.postcode\"] = value[\"endereco.postcode\"].replace(/\\D+/g,'');\n\t\tif(value[\"endereco.postcode\"].length != 8 || isNaN(value[\"endereco.postcode\"])) {postcode = false;};\n\t}\n//Valida numero de endereco - Se contem apenas numeros no campo\n\tif(value[\"endereco.number\"]){\n\t\tif(isNaN(value[\"endereco.number\"])){enderecoNumber = false; console.log(\"Endereco Failed\")};\n\t}\n//Valida email\n\tif(value.email){\n\t\tvar filter = /^([\\w-]+(?:\\.[\\w-]+)*)@((?:[\\w-]+\\.)*\\w[\\w-]{0,66})\\.([a-z]{2,6}(?:\\.[a-z]{2})?)$/i;\n\t\tif(!filter.test(value.email)){email = false; console.log(\"Email Failed\")};\n\t}else{\n\t\temail = false;\n\t};\n\n//Return results of the checks\n\tresult = {\n\t\t'razaoSocial':razaoSocial,\n\t\t'telefone':telefone,\n\t\t'cpf':cpf,\n\t\t'postcode':postcode,\n\t\t\"enderecoNumber\":enderecoNumber,\n\t\t\"email\":email,\n\t};\n\treturn result;\n\n\n}", "title": "" }, { "docid": "4bcc4d0e6c5471714635e6a07e0bc955", "score": "0.6180301", "text": "function formFieldAllElementsValidation() {\n userFirstNameCheck();\n userLastNameCheck();\n userEmailCheck();\n userBirthdateCheck();\n numberOfTournamentParticipatedCheck();\n locationBoxCheck();\n termsOfUsecheck();\n}", "title": "" }, { "docid": "785f4716d53c0ef87329977e627ce91f", "score": "0.6176179", "text": "function pageValidate() {\n\tvar txtFieldIdArr = new Array();\t\n\ttxtFieldIdArr[0] = \"tf1_pvid, \"+LANG_LOCALE['12349'];\n \n if (txtFieldArrayCheck(txtFieldIdArr) == false)\n\t return false; \n\t \n\tif (isProblemCharArrayCheck(txtFieldIdArr, \"'\\\" \", NOT_SUPPORTED) == false) \n return false;\n\t \n\tvar pvidObj = document.getElementById('tf1_pvid');\n if (pvidObj&& !pvidObj.disabled) {\n var unitName = $('#hdUnitName').val();\n if (unitName == \"DSR-150\" || unitName == \"DSR-150N\") {\n if (numericValueRangeCheck(pvidObj, 1, '', 1, 15, true, LANG_LOCALE['11327']+': ', \"\") == false) \n return false;\n } else {\n if (numericValueRangeCheck(pvidObj, 1, '', 1, 4093, true, LANG_LOCALE['11327']+': ', \"\") == false) \n return false;\n }\n }\n\n if ($(\"#tf1_mode\").val() != \"1\") {\n if (!$(\"#tf1_vlanMembers option:selected\").length) {\n alert(\"Please select atleast one VLAN Membership\");\n return false;\n\t }\n }\n\n return true;\n}", "title": "" }, { "docid": "b325db05cc8fda6aa96de5ffeafefc6d", "score": "0.61667514", "text": "function validateForm() {\n return email.length > 0 && name.length > 0 && latitude.length > 0 && longitude.length > 0 && phone.length && equipment.length && shifts.length;\n }", "title": "" }, { "docid": "254f0499c66e4bc07c064531ac9e0d57", "score": "0.61333215", "text": "function validate()\n{\n field = \"\";\n var df = document.forms[0]\n var errortext = \"\";\n var invalid_input = \"false\";\n var validBatch = false;\n var validFile = false;\n var validEmail = false;\n var validGLB = false;\n\n if (df.FIELD_COUNT) {\n // first figure out which fields are defined\n var field_last_name = 0;\n var field_first_name = 0;\n var field_ssn = 0;\n var field_dob = 0;\n var field_address_1 = 0;\n var field_city = 0;\n var field_state = 0;\n var field_zip = 0;\n var field_license_num = 0;\n var field_license_state = 0;\n var field_vin = 0;\n\n\n for (var i = 1; i <= df.FIELD_COUNT.value; i++) {\n var field_value = eval (\"df.FIELD_NAME_\"+i+\".value\");\n //alert (\"i = \"+i+\" field_value = \"+field_value);\n if (field_value == 'name-first') {\n field_first_name = 1;\n }\n if (field_value == 'name-last') {\n field_last_name = 1;\n }\n if (field_value == 'ssn') {\n field_ssn = 1;\n }\n if (field_value == 'dob1' || field_value == 'dob2' || field_value == 'dob3' || field_value == 'dob4') {\n field_dob = 1;\n }\n if (field_value == 'address-1') {\n field_address_1 = 1;\n }\n if (field_value == 'city') {\n field_city = 1;\n }\n if (field_value == 'state') {\n field_state = 1;\n }\n if (field_value == 'zip') {\n field_zip = 1;\n }\n if (field_value == 'license-num') {\n field_license_num = 1;\n }\n if (field_value == 'license-state') {\n field_license_state = 1;\n }\n if (field_value == 'vin1' || field_value == 'vin2' || field_value == 'vin3' || field_value == 'vin4' || field_value == 'vin5' || field_value == 'vin6' || field_value == 'vin7' || field_value == 'vin8') {\n field_vin = 1;\n }\n\n }\n\n // second check for each report that the fields each report requires have been defined\n if (field_first_name == 0) {\n errortext = errortext + \"First Name is a required field\\n\";\n invalid_input = true;\n }\n if (field_last_name == 0) {\n errortext = errortext + \"Last Name is a required field\\n\";\n invalid_input = true;\n }\n if (field_address_1 == 0) {\n errortext = errortext + \"Address is a required field\\n\";\n invalid_input = true;\n }\n if (field_zip == 1 || (field_city == 1 && field_state == 1)) {\n } else {\n errortext = errortext + \"Zip or (City and State) is a required field\\n\";\n invalid_input = true;\n }\n //do not require DL number\n //if (df.RESOPTION5.value == 1) {\n // // DL Report\n // if (field_license_num == 0) {\n // errortext = errortext + \"Driver's License Number is Required to run the Driver License option\\n\";\n // invalid_input = true;\n // }\n // if (field_license_state == 0) {\n // errortext = errortext + \"Driver's License State is Required to run the Driver License option\\n\";\n // invalid_input = true;\n // }\n //}\n //change to remove Branded Title option also do not require VIN data\n //if (df.RESOPTION6.value == 1 || df.RESOPTION7.value == 1) {\n // // DL Report\n // if (field_vin == 0) {\n // errortext = errortext + \"At least one VIN field is required to run either Motor Vehicle Registrations or Branded Titles option\\n\";\n // invalid_input = true;\n // }\n //}\n }\n \n if (df.BATCH_NAME) {\n if(!df.BATCH_TYPE || (df.BATCH_TYPE && df.BATCH_TYPE.length && !df.BATCH_TYPE[2].checked && !df.BATCH_TYPE[3].checked)) {\n if (df.BATCH_NAME.value.length > 0) {\n validBatch = true;\n } else {\n errortext = errortext + \"Please Input: BATCH NAME\\n\";\n\t\t\t invalid_input = true;\n\t\t\t if (field == \"\") field = df.BATCH_NAME;\n }\n } else {\n validBatch = true;\n }\n }\n\n // Index report is always run, this check isn't needed\n// if (df.BATCH_REPORT_OPTIONS && df.BATCH_REPORT_OPTIONS.value == 1) {\n// var no_report_checked = 1;\n// if (df.resoption1 && df.resoption1.checked) {\n// no_report_checked = 0;\n// }\n// if (df.resoption2 && df.resoption2.checked) {\n// no_report_checked = 0;\n// }\n// if (df.resoption3 && df.resoption3.checked) {\n// no_report_checked = 0;\n// }\n// if (df.resoption4 && df.resoption4.checked) {\n// no_report_checked = 0;\n// }\n// if (df.resoption5 && df.resoption5.checked) {\n// no_report_checked = 0;\n// }\n// if (df.resoption6 && df.resoption6.checked) {\n// no_report_checked = 0;\n// }\n// if (df.resoption7 && df.resoption7.checked) {\n// no_report_checked = 0;\n// }\n// if (df.resoption8 && df.resoption8.checked) {\n// no_report_checked = 0;\n// }\n// if (df.resoption9 && df.resoption9.checked) {\n// no_report_checked = 0;\n// }\n// if (no_report_checked == 1) {\n// errortext = errortext + \"Please select at least 1 Report\\n\";\n// invalid_input = true;\n// }\n// }\n\n if (df.BATCH_FILE) {\n if (df.BATCH_FILE.value.length > 0 || (df.FILE_UPLOADED && df.FILE_UPLOADED.value == 1)) {\n validFile = true;\n } else {\n errortext = errortext + \"Please Input: BATCH FILENAME\\n\";\n\t\t invalid_input = true;\n\t\t if (field == \"\") field = df.BATCH_FILE;\n }\n }\n \n if (df.BATCH_EMAIL_TO) {\n if (df.BATCH_EMAIL_TO.value.length > 0) {\n var full_email = df.BATCH_EMAIL_TO.value;\n if (isEmail(full_email)) {\n validEmail = true;\n } else {\n errortext = errortext + \"Please Input: EMAIL FORMAT - [email protected]\\n\";\n invalid_input = true;\n if (field == \"\") field = df.BATCH_EMAIL_TO;\n }\n } else {\n if (df.IS_PHONE_BATCH) {\n if(typeof(df.IS_PHONE_BATCH == 'undefined') && !df.IS_PHONE_BATCH.value==1) {\n errortext = errortext + \"Please Input: EMAIL ADDRESS\\n\";\n invalid_input = true;\n if (field == \"\") field = df.BATCH_EMAIL_TO;\n }\n } else {\n errortext = errortext + \"Please Input: EMAIL ADDRESS\\n\";\n invalid_input = true;\n if (field == \"\") field = df.BATCH_EMAIL_TO;\n }\n }\n }\n\n if (df.TEST_BATCH_COMPANYID) {\n if (df.TEST_BATCH_COMPANYID.value.length > 0) {\n var test_companyid = df.TEST_BATCH_COMPANYID.value;\n if (isNumber(test_companyid)) {\n } else {\n errortext = errortext + \"Company ID must be a number\\n\";\n invalid_input = true;\n if (field == \"\") field = df.TEST_BATCH_COMPANYID;\n }\n }\n }\n\n if (df.GLB) {\n if ((df.GLB[0].checked == true) || (df.GLB[1].checked == true) ||(df.GLB[2].checked == true) ||(df.GLB[3].checked == true) ||(df.GLB[4].checked == true) ||(df.GLB[5].checked == true) ||(df.GLB[6].checked == true)) {\n validGLB = true;\n } else {\n errortext = errortext + \"Please Input: PERMITTED USE\\n\";\n invalid_input = true;\n }\n }\n\n if (df.OUTPUT_TYPE) {\n if ((df.OUTPUT_TYPE[0].checked == true) || (df.OUTPUT_TYPE[1].checked == true) ||(df.OUTPUT_TYPE[2].checked == true) ||(df.OUTPUT_TYPE[3].checked == true)) {\n validGLB = true;\n } else if(df.OUTPUT_TYPE[4] && (df.OUTPUT_TYPE[4].checked == true)){\n if(df.OUTPUT_LAYOUT && df.OUTPUT_LAYOUT.value !='') {\n validGLB = true;\n } else {\n errortext = errortext + \"Please Select: OUTPUT LAYOUT\\n\";\n invalid_input = true;\n }\n } else {\n errortext = errortext + \"Please Input: OUTPUT TYPE\\n\";\n invalid_input = true;\n }\n }\n\n if (invalid_input == true) {\n alert('We have encountered a problem. Please see the explanation below and \\ncorrect the problem to continue.\\n\\n' + errortext + '\\n');\n return false;\n } else {\n return true;\n }\n}", "title": "" }, { "docid": "5b85dcb4d437d8cb3f9b7eb8ff8c4951", "score": "0.61061305", "text": "function validateFieldOfficeAssignments() {\n return true;//($(field_Regional_VP + \"_ID\").val() && $(field_Country_Manager + \"_ID\").val() && $(field_Assistant_Manager + \"_ID\").val() && $(field_Field_Office_Admin + \"_ID\").val()); \n}", "title": "" }, { "docid": "0bd9f610844a3cb910a4957ec04b1b4f", "score": "0.61004955", "text": "function validateData() {\n if (fields.firstname == true &&\n fields.lastname == true &&\n fields.email == true &&\n fields.birthdate == true &&\n fields.numberOfParticipations == true &&\n atLeastOneCityChecked() == true &&\n fields.checkboxGCU == true) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "9bfc0f5e335fb7f34d85c9d3b34d8a04", "score": "0.60798514", "text": "function validateFields() {\n var response = checkEmptyFields(formFields);\n var emptyFields = response.empty;\n var filledFields = response.filled;\n unsetFields(filledFields);\n setFields(emptyFields);\n}", "title": "" }, { "docid": "45b73900296e9ba28028e63396935f3d", "score": "0.60479724", "text": "function check_fields (e,fv)\n{\n // set variable for select object from input in form.\n var optionlist = e;\n var error_text = \"\";\n // get actual option name selected in form.\n var selectvalue = (optionlist[optionlist.selectedIndex].value);\n \n // value of the corresponding field on the batch input screen to check.\n var fieldvalue = fv.value;\n \n if (((fv.value == '') || (fv.value == ' ')) && (selectvalue != 'unknown')) {\n return; // let'er through\n } else if (selectvalue == '') {\n error_text += 'You must select a Field Label for each Field.\\n';\n\n } else if (document.forms[0].FIRST_ROW_NAMES.checked == true) { // don't validate if first row of data is field row names.\n return;\n \n } else {\n if (selectvalue == 'state') {\n if (!isState(fieldvalue)) {\n error_text += 'A valid state must contain at least TWO TEXT characters.\\n';\n optionlist.options[0].selected = true;\n }\n }\n\n if (selectvalue == 'zip') {\n if (!isZip(fieldvalue)) {\n error_text += 'Zip format - Digits:\\n\\n \"xxxxx\"\\n';\n optionlist.options[0].selected = true;\n }\n }\n\n if (selectvalue == 'ssn') {\n if (!isSSN(fieldvalue)) {\n error_text += 'SSN format (hyphens optional) - Digits:\\n\\n \"xxx-xx-xxxx\"\\n';\n optionlist.options[0].selected = true;\n }\n }\n\t\n if (selectvalue == 'dob1') {\n if (!isDOBraw(fieldvalue)) {\n error_text += 'DOB format - Digits:\\n\\n \"MMDDYYYY\"\\n';\n optionlist.options[0].selected = true;\n }\n }\n\n if (selectvalue == 'dob2') {\n if (!isDOBslashYYYYMMDD(fieldvalue)) {\n error_text += 'DOB format - Digits:\\n\\n \"YYYY/MM/DD\"\\n';\n optionlist.options[0].selected = true;\n }\n }\n if (selectvalue == 'dob4') {\n if (!isDOBslashMMDDYYYY(fieldvalue)) {\n error_text += 'DOB format - Digits:\\n\\n \"MM/DD/YYYY\"\\n';\n optionlist.options[0].selected = true;\n }\n }\n\n }\n if (error_text.length > 0) {\n alert('We have encountered a problem. Please see the explanation below and \\ncorrect the problem to continue.\\n\\n' + error_text + '\\n');\n }\n}", "title": "" }, { "docid": "5cdd89e44d3e9847dc6edf80e112b808", "score": "0.6042326", "text": "function validatePCS() {\r\n\t\r\n\tvar hasErrors = false;\r\n\tclearErrStatements();\r\n\t\r\n\tfor (var i in formElements) {\r\n\t\tif (!formHasValidContent(formElements[i])) {\r\n\t\t\thasErrors = true;\r\n\t\t\tbuildErrStatement(formElements[i]);\r\n\t\t}\r\n\t}\r\n\t\r\n\tif (hasErrors) focusOnFirstError();\r\n}", "title": "" }, { "docid": "1e03ad296641c709c89dc6bddf2a61c3", "score": "0.60131127", "text": "function isPresidentFormValid(){\n return(FirstNameField.isValid() && LastNameField.isValid() && EnteringOfficeField.isValid() && LeavingOfficeField.isValid() && IncomeField.isValid() && PartyField.isValid());\n }", "title": "" }, { "docid": "cbe7fe17841558b5ef309e997132f62d", "score": "0.59890157", "text": "function areAllFieldsFull()\r\n\t\t{\r\n\t\t\t\r\n\t\t\tvar wfc = document.getElementsByClassName('wFilter')\r\n\t\t\tfor (var i = 0; i < wfc.length; i++)\r\n\t\t\t{\r\n\t\t\t\tif ((wfc[i].value.length == 0) && (wfc[i].offsetWidth > 0))\r\n\t\t\t\t{\r\n\t\t\t\t\tsomethingMissing = true;\r\n\t\t\t\t}\r\n\t\t\t}\t\t\t\r\n\t\t\tvar nqc = document.getElementsByClassName('noQuotes')\r\n\t\t\tfor (var i = 0; i < nqc.length; i++)\r\n\t\t\t{\r\n\t\t\t\tif ((nqc[i].value.length == 0) && (nqc[i].offsetWidth > 0))\r\n\t\t\t\t{\r\n\t\t\t\t\tsomethingMissing = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar jnc = document.getElementsByClassName('justNums')\r\n\t\t\tfor (var i = 0; i < jnc.length; i++)\r\n\t\t\t{\r\n\t\t\t\tif ((jnc[i].value.length == 0) && (jnc[i].offsetWidth > 0))\r\n\t\t\t\t{\r\n\t\t\t\t\tsomethingMissing = true;\r\n\t\t\t\t}\r\n\t\t\t}\t\t\r\n\t\t\tvar rc = document.getElementsByClassName('required')\r\n\t\t\tfor (var i = 0; i < rc.length; i++)\r\n\t\t\t{\r\n\t\t\t\tif ((rc[i].value.length == 0) && (rc[i].offsetWidth > 0))\r\n\t\t\t\t{\r\n\t\t\t\t\tsomethingMissing = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (somethingMissing == true)\r\n\t\t\t{\r\n\t\t\t\tdocument.getElementById('setVals').disabled = true;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tdocument.getElementById('setVals').disabled = false;\r\n\t\t\t}\t\t\r\n\t\t\tsomethingMissing = false;\t\t\t\r\n\t\t}", "title": "" }, { "docid": "b8f1b525dc7e22ea47fd311fa9393e59", "score": "0.5979044", "text": "function forAllFieldsValidation() {\n checkFirstName()\n checkLastName()\n checkEmail()\n checkBirthdate()\n checkTournamentsQuantity()\n checkLocations()\n checkCheckBox()\n}", "title": "" }, { "docid": "f907f572adaccae89cd35242ece7e365", "score": "0.59565884", "text": "function verify_inputs(){\n if(document.getElementById(\"Split_By\").value == ''){\n return false;\n }\n if(document.getElementById(\"Strength\").value == ''){\n return false;\n }\n if(document.getElementById(\"Venue\").value == ''){\n return false;\n }\n if(document.getElementById(\"season_type\").value == ''){\n return false;\n }\n if(document.getElementById(\"adjustmentButton\").value == ''){\n return false;\n }\n if(document.getElementById(\"stats_view\").value == ''){\n return false;\n }\n\n return true\n }", "title": "" }, { "docid": "54bd6b45c99571b6ddf9ebd1f9066998", "score": "0.59479743", "text": "validate(){\n\t\t\tlet populationSize = this.settings[1].subSettings[0].value;\n\t\t\tif(populationSize === undefined || populationSize === \"\"){populationSize = this.settings[1].subSettings[0].placeholder;}\n\t\t\t{\n\t\t\t\tlet reduction = this.settings[1].subSettings[3].subSettings[0].value;\n\t\t\t\tlet period = this.settings[1].subSettings[3].subSettings[1].value;\n\t\t\t\tif(reduction === undefined || reduction === \"\"){reduction = this.settings[1].subSettings[3].subSettings[0].placeholder;}\n\t\t\t\tif(period === undefined || period === \"\"){period = this.settings[1].subSettings[3].subSettings[1].placeholder;}\n\t\t\t\tif(period * reduction >= Number(populationSize) && this.settings[1].subSettings[3].value){this.valid = false;}\n\t\t\t}\n\t\t\t{\n\t\t\t\tlet tournamentParticipents = this.settings[5].subSettings[0].subSettings[0].value;\n\t\t\t\tif(tournamentParticipents === undefined || tournamentParticipents === \"\"){tournamentParticipents = this.settings[5].subSettings[0].subSettings[0].placeholder;}\n\t\t\t\tif(Number(tournamentParticipents) >= Number(populationSize) && this.settings[5].subSettings[0].value){this.valid = false;}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "30fd686f9ebd6038dd82898732eb4dd6", "score": "0.5921671", "text": "validateForm(){\n\t\n\t \tvar err = \"\";\n\t\n\t \tif(this.state.rockfallLandslide != 'rockfall' \n\t \t\t&& this.state.rockfallLandslide != 'landslide'){\n\t \t\t\terr += rockfall_landslide_checkbox_format_S+'\\n';//.concat(\"<br/>\");\n\t \t}\n\t\t\n\t \tif(this.state.selectedAgency.match(umbrella_agency_regex) === null){\n\t \t\terr += umbrella_agency_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#umbrella_agency\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.selectedRegion.match(regional_admin_regex) === null){\n\t \t\terr += regional_admin_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#regional_admin\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.selectedLocal.match(local_admin_regex) === null){\n\t \t\terr += local_admin_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#local_admin\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.date.match(date_regex) === null){\n\t\t\talert(this.state.date);\n\t \t\terr += date_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#date\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.rtNo.match(road_trail_number_regex) === null){\n\t \t\terr += road_trail_number_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#road_trail_number\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.roadOrTrail.match(road_or_trail_regex) === null){\n\t \t\terr += road_or_trail_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#road_or_trail\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.rtClass.match(road_trail_class_regex) === null){\n\t \t\terr += road_trail_class_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#road_trail_class\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.rater.match(rater_regex) === null){\n\t \t\terr += rater_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#rater\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.beginMileMarker.match(begin_mile_marker_regex) === null){\n\t \t\terr += begin_mile_marker_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#begin_mile_marker\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.endMileMarker.match(end_mile_marker_regex) === null){\n\t \t\terr += end_mile_marker_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#end_mile_marker\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.side.match(side_regex) === null){\n\t \t\terr += side_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#side\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.weather.match(weather_regex) === null){\n\t \t\terr += weather_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#weather\").css(\"background-color\", \"red\");\n\t \t}\n\t\t\t\n\t \tif(this.state.hazardType.length == 0){\n\t \t\terr += hazard_type_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#hazard_type\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.beginCoordinateLatitude.match(begin_coordinate_latitude_regex) === null){\n\t \t\terr += begin_coordinate_latitude_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#begin_coordinate_latitude\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.beginCoordinateLongitude.match(begin_coordinate_longitude_regex) === null){\n\t \t\terr += begin_coordinate_longitude_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#begin_coordinate_longitude\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.endCoordinateLatitude.match(end_coordinate_latitude_regex) === null){\n\t \t\terr += end_coordinate_latitude_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#end_coordinate_latitude\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.endCoordinateLongitude.match(end_coordinate_longitude_regex) === null){\n\t \t\terr += end_coordinate_longitude_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#end_coordinate_longitude\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.aadt.match(aadt_regex) === null){\n\t \t\terr += aadt_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#aadt\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.lengthAffected.match(length_affected_regex) === null){\n\t \t\terr += length_affected_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#length_affected\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.slopeHeightAxialLength.match(slope_height_axial_length_regex) === null){\n\t \t\terr += slope_height_axial_length_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#slope_height_axial_length\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.slopeAngle.match(slope_angle_regex) === null){\n\t \t\terr += slope_angle_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#slope_angle\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.sightDistance.match(sight_distance_regex) === null){\n\t \t\terr += sight_distance_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#sight_distance\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.roadTrailWidth.match(road_trail_width_regex) === null){\n\t \t\terr += road_trail_width_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#road_trail_width\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.speedLimit.match(speed_limit_regex) === null){\n\t \t\terr += speed_limit_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#speed_limit\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.minimumDitchWidth.match(minimum_ditch_width_regex) === null){\n\t \t\terr += minimum_ditch_width_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#minimum_ditch_width\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.maximumDitchWidth.match(maximum_ditch_width_regex) === null){\n\t \t\terr += maximum_ditch_width_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#maximum_ditch_width\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.minimumDitchDepth.match(minimum_ditch_depth_regex) === null){\n\t \t\terr += minimum_ditch_depth_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#minimum_ditch_depth\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.maximumDitchDepth.match(maximum_ditch_depth_regex) === null){\n\t \t\terr += maximum_ditch_depth_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#maximum_ditch_depth\").css(\"background-color\", \"red\");\n\t \t}\n\t\t\t\n\t \tif(this.state.firstBeginDitchSlope.match(first_begin_ditch_slope_regex) === null){\n\t \t\terr += first_begin_ditch_slope_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#first_begin_ditch_slope\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.firstEndDitchSlope.match(first_end_ditch_slope_regex) === null){\n\t \t\terr += first_end_ditch_slope_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#first_end_ditch_slope\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.secondBeginDitchSlope.match(second_begin_ditch_slope_regex) === null){\n\t \t\terr += second_begin_ditch_slope_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#second_begin_ditch_slope\").css(\"background-color\", \"red\");\n\t \t}\n\t\n\t \tif(this.state.secondEndDitchSlope.match(second_end_ditch_slope_regex) === null){\n\t \t\terr += second_end_ditch_slope_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#second_end_ditch_slope\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.blkSize.match(blk_size_regex) === null){\n\t \t\terr += blk_size_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#blk_size\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.volume.match(volume_regex) === null){\n\t \t\terr += volume_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#volume\").css(\"background-color\", \"red\");\n\t \t}\n\t\n\t \tif(this.state.startAnnualRainfall.match(start_annual_rainfall_regex) === null){\n\t \t\terr += start_annual_rainfall_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#start_annual_rainfall\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.endAnnualRainfall.match(end_annual_rainfall_regex) === null){\n\t \t\terr += end_annual_rainfall_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#end_annual_rainfall\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.soleAccessRoute.match(sole_access_route_regex) === null){\n\t \t\terr += sole_access_route_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#sole_access_route\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.fixesPresent.match(fixes_present_regex) === null){\n\t \t\terr += fixes_present_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#fixes_present\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.prelimLandslideRoadWidthAffected.match(prelim_landslide_road_width_affected_regex) === null){\n\t \t\terr += prelim_landslide_road_width_affected_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#prelim_landslide_road_width_affected\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.prelimLandslideSlideErosionEffects.match(prelim_landslide_slide_erosion_effects_regex) === null){\n\t \t\terr += prelim_landslide_slide_erosion_effects_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#prelim_landslide_slide_erosion_effects\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.prelimLandslideLengthAffected.match(prelim_landslide_length_affected_regex) === null){\n\t \t\terr += prelim_landslide_length_affected_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#prelim_landslide_length_affected\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.prelimRockfallDitchEff.match(prelim_rockfall_ditch_eff_regex) === null){\n\t \t\terr += prelim_rockfall_ditch_eff_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#prelim_rockfall_ditch_eff\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.prelimRockfallRockfallHistory.match(prelim_rockfall_rockfall_history_regex) === null){\n\t \t\terr += prelim_rockfall_rockfall_history_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#prelim_rockfall_rockfall_history\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.prelimRockfallBlockSizeEventVol.match(prelim_rockfall_block_size_event_vol_regex) === null){\n\t \t\terr += prelim_rockfall_block_size_event_vol_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#prelim_rockfall_block_size_event_vol\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.impactOnUse.match(impact_on_use_regex) === null){\n\t \t\terr += impact_on_use_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#impact_on_use\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.aadtUsage.match(aadt_usage_regex) === null){\n\t \t\terr += aadt_usage_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#aadt_usage\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.slopeDrainage.match(slope_drainage_regex) === null){\n\t \t\terr += slope_drainage_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#slope_drainage\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.hazardRatingAnnualRainfall.match(hazard_rating_annual_rainfall_regex) === null){\n\t \t\terr += hazard_rating_annual_rainfall_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#hazard_rating_annual_rainfall\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.hazardRatingSlopeHeightAxialLength.match(hazard_rating_slope_height_axial_length_regex) === null){\n\t \t\terr += hazard_rating_slope_height_axial_length_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#hazard_rating_slope_height_axial_length\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.hazardLandslideThawStability.match(hazard_landslide_thaw_stability_regex) === null){\n\t \t\terr += hazard_landslide_thaw_stability_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#hazard_landslide_thaw_stability\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.hazardLandslideMaintFrequency.match(hazard_landslide_maint_frequency_regex) === null){\n\t \t\terr += hazard_landslide_maint_frequency_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#hazard_landslide_maint_frequency\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.hazardLandslideMovementHistory.match(hazard_landslide_movement_history_regex) === null){\n\t \t\terr += hazard_landslide_movement_history_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#hazard_landslide_movement_history\").css(\"background-color\", \"red\");\n\t \t}\n\t\t\n\t \tif(this.state.hazardRockfallMaintFrequency.match(hazard_rockfall_maint_frequency_regex) === null){\n\t \t\terr += hazard_rockfall_maint_frequency_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#hazard_rockfall_maint_frequency\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.caseOneStrucCond.match(case_one_struc_cond_regex) === null){\n\t \t\terr += case_one_struc_cond_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#case_one_struc_cond\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.caseOneRockFriction.match(case_one_rock_friction_regex) === null){\n\t \t\terr += case_one_rock_friction_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#case_one_rock_friction\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.caseTwoStrucCondition.match(case_two_struc_condition_regex) === null){\n\t \t\terr += case_two_struc_condition_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#case_two_struc_condition\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.caseTwoDiffErosion.match(case_two_diff_erosion_regex) === null){\n\t \t\terr += case_two_diff_erosion_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#case_two_diff_erosion\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.routeTrailWidth.match(route_trail_width_regex) === null){\n\t \t\terr += route_trail_width_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#route_trail_width\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.humanExFactor.match(human_ex_factor_regex) === null){\n\t \t\terr += human_ex_factor_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#human_ex_factor\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.percentDsd.match(percent_dsd_regex) === null){\n\t \t\terr += percent_dsd_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#percent_dsd\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.rWImpacts.match(r_w_impacts_regex) === null){\n\t \t\terr += r_w_impacts_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#r_w_impacts\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.enviroCultImpacts.match(enviro_cult_impacts_regex) === null){\n\t \t\terr += enviro_cult_impacts_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#enviro_cult_impacts\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.maintComplexity.match(maint_complexity_regex) === null){\n\t \t\terr += maint_complexity_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#maint_complexity\").css(\"background-color\", \"red\");\n\t \t}\n\n\t \tif(this.state.eventCost.match(event_cost_regex) === null){\n\t \t\terr += event_cost_format_S+'\\n';//.concat(\"<br/>\");\n\t \t\t//$(\"#event_cost\").css(\"background-color\", \"red\");\n\t \t}\n\n\t\n\t \treturn err;\n\t\n\t }", "title": "" }, { "docid": "e30dda95e2042e6cdb21a714412caff1", "score": "0.59195954", "text": "function validateFields(firstNm, lastNm, npiNo, phone, email)\r\n{\r\n isFirstNm(firstNm);\r\n isLastNm(lastNm);\r\n isNpiNo(npiNo);\r\n isPhoneNo(phone);\r\n isEmail(email);\r\n\r\n return errors.length == 0;\r\n}", "title": "" }, { "docid": "17863d568e9d6676b383f73d7f4e2529", "score": "0.58942956", "text": "function validate()\n{\n if($scope.medicene.name&&$scope.medicene.Pcost&&$scope.medicene.Ccost&&$scope.medicene.units&&$scope.medicene.discount&&$scope.medicene.gst)\n {\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "a18fb9a54ddf2bad66b4db6fc81d8928", "score": "0.58897394", "text": "validateForm()\r\n {\r\n return this.state.name > 0 && this.state.carNo > 0;\r\n // return this.state.email.length > 0 && this.state.password.length > 0 && this.state.cnp.length>0 && this.state.phoneno.length>0 && this.state.name.length > 0 && this.state.from.length > 0 && this.state.To.length > 0 && this.state.cost.length > 0;\r\n }", "title": "" }, { "docid": "1e0ccc8b41c12d400864aa0e3a9e8d5d", "score": "0.58694226", "text": "function validateInput() {\n if (\n smoke &&\n partner &&\n gender &&\n income.value !== \"\" &&\n income.value >= 0 &&\n dependent.value >= 0 &&\n dependent.value <= 9 &&\n dependent.value !== \"\" &&\n youngestDepn >= 0 &&\n youngestDepn <= 25 &&\n assests.value >= 0 &&\n assests.value !== \"\" &&\n liabilities.value >= 0 &&\n liabilities.value !== 0 &&\n validateYoungestDepn(youngestDepn, dependent.value) &&\n firstName.value &&\n surname.value &&\n contact.value &&\n email.value\n ) {\n return true;\n } else return false;\n }", "title": "" }, { "docid": "1f45cbbf20254e6ae4f095212da246aa", "score": "0.5865404", "text": "function fnPropertiesValidation() {\n /*create a trigger to check if the form is valid*/\n /*if any of the validation fields fail, switch the trigger to true;*/\n var bFormIsValid = 0;\n /*create placeholders for the form being validated*/\n var bUploadedImages = fnValidateImages();\n var bRooms = fnValidateTotalRooms();\n var bSize = fnValidatePropertySize();\n var bPrice = fnValidatePrice();\n var bAddress = fnValidateAddress();\n var bCity = fnValidateCity();\n var bPostal = fnValidatePostalCode();\n /*if the validation fails*/\n if (bPostal == false ||\n bCity == false ||\n bAddress == false ||\n bPrice == false ||\n bSize == false ||\n bRooms == false ||\n bUploadedImages == false) {\n /*set the trigger to false*/\n bFormIsValid = 0;\n }\n\n /*if the validation passes*/\n if (bPostal == true &&\n bCity == true &&\n bAddress == true &&\n bPrice == true &&\n bSize == true &&\n bRooms == true &&\n bUploadedImages == true) {\n /*set the trigger to true*/\n bFormIsValid = 1;\n }\n\n return bFormIsValid;\n}", "title": "" }, { "docid": "bbaf1af7e9ea71d1d2c2cd3dafae54a0", "score": "0.5857829", "text": "validateAddSchemesFields() {\n let notValidFields = '';\n let validData = true;\n let validationObj = {};\n if(this.state.addSchemes.exchangeValue){\n let exchangeValue = this.state.addSchemes.exchangeData ? parseFloat(this.state.addSchemes.exchangeData, 10) : 0;\n if(exchangeValue > 0){\n validData = true;\n }else{\n if(this.Exchange_Value_editable){\n notValidFields += ' Exchange Value, ';\n validData = false;\n }else{\n validData = true;\n }\n }\n }\n\n if(this.state.addSchemes.otherDiscountValue){\n let otherDisValue = this.state.addSchemes.otherDiscountData ? parseFloat(this.state.addSchemes.otherDiscountData, 10) : 0;\n if(otherDisValue > 0){\n validData = true;\n }else{\n notValidFields += 'Other Discount, ';\n validData = false;\n }\n }\n\n if (notValidFields.length > 0){\n notValidFields = notValidFields.slice(0, -1);\n }else {\n validData = true;\n }\n validationObj.isDataValid = validData;\n validationObj.errorFields = notValidFields;\n return validationObj;\n }", "title": "" }, { "docid": "eae8bb6085012065787f4e336519b5fa", "score": "0.5836539", "text": "function ValidData(e) {\n\n // A variable to check for any error in the input fields\n\n let validationPassed = true;\n // customerId specificayion\n const customerId = document.getElementById(\"customer_id\");\n const checkId = /^[0-9]+$/\n\n if (!checkId.test(customerId.value)) {\n document.getElementById(\"spanID\").innerHTML = \"ID is Required\";\n validationPassed = false;\n } else {\n document.getElementById(\"spanID\").innerHTML = \"\";\n customerId.style.border = \"1px solid green\";\n }\n\n // validating name and providing appropiate input type\n const nameInput = document.getElementById(\"name_id\");\n const forName = /^[A-Za-z\\s]+$/;\n\n if (!forName.test(nameInput.value)) {\n document.getElementById(\"span_name\").innerHTML = 'Name Cannot be missing';\n nameInput.style.border = '1px solid red';\n validationPassed = false;\n\n } else {\n document.getElementById(\"span_name\").innerHTML = '';\n nameInput.style.border = '1px solid green';\n }\n\n // state specification\n const stateInput = document.getElementById(\"state\");\n const checkState = /^[A-Za-z\\s]+$/;\n\n if (!checkState.test(stateInput.value) || stateInput.value.length >= 4 || stateInput.value.length <= 2) {\n document.getElementById(\"span_state\").innerHTML = \"Enter three characters\";\n stateInput.style.border = \"1px solid red\";\n validationPassed = false;\n\n } else {\n document.getElementById(\"span_state\").innerHTML = \"\";\n stateInput.style.border = \"1px solid green\";\n }\n\n // part number validation\n const partNumber = document.getElementById(\"partNumber\");\n const checkNumber = /^[0-9\\s]+$/;\n\n if (!checkNumber.test(partNumber.value)) {\n document.getElementById(\"partSpan\").innerHTML = \"Part Number is Required\";\n partNumber.style.border = \"1px solid red\";\n validationPassed = false;\n\n } else {\n document.getElementById(\"partSpan\").innerHTML = \"\";\n partNumber.style.border = \"1px solid green\";\n };\n\n // validation for description according to the input type\n const description = document.getElementById(\"describe\");\n const checkDesc = /^[A-Za-z\\s]+$/;\n\n if (!checkDesc.test(description.value)) {\n document.getElementById(\"descSpan\").innerHTML = \"Description cannot be missing\";\n description.style.border = '1px solid red';\n validationPassed = false;\n\n } else {\n document.getElementById(\"descSpan\").innerHTML = \"\";\n description.style.border = \"1px solid green\";\n }\n\n // price Per Part validation\n const pricePerPart = document.getElementById(\"price\");\n const checkPrice = /^[0-9\\.\\s]+$/;\n\n if (!checkPrice.test(pricePerPart.value)) {\n document.getElementById(\"priceSpan\").innerHTML = \"Atleast one digit\";\n pricePerPart.style.border = \"1px solid red\";\n validationPassed = false;\n\n } else {\n document.getElementById(\"priceSpan\").innerHTML = \"\";\n pricePerPart.style.border = \"1px solid green\";\n }\n\n // Quantity input validation\n const quantityInput = document.getElementById(\"quantity\");\n const checkQty = /^[0-9\\s]+$/;\n\n if (!checkQty.test(quantityInput.value) || quantityInput.value.length <= 0) {\n document.getElementById(\"qtySpan\").innerHTML = \"Must be greater 0\";\n quantity.style.border = \"1px solid red\";\n validationPassed = false;\n\n } else {\n document.getElementById(\"qtySpan\").innerHTML = \"\";\n quantityInput.style.border = \"1px solid green\";\n }\n\n /*A condition for checking if all the conditions above are passed then the cost,saleTax,\n shipping and handling and total should be displayed. And setting their values in to localStorage*/\n\n\n if (validationPassed) {\n const price = document.querySelector(\".price\").value;\n const quantity = document.querySelector(\".quantity\").value;\n let cost = price * quantity;\n const costField = document.querySelector(\".cost\");\n if (document.querySelector(\".oversize\").checked) {\n cost = cost + 5;\n }\n costField.value = `$ ${cost}`;\n const taxValue = saleTax(cost);\n const shippingCost = shippingHandling();\n const totalCost = (cost + taxValue + shippingCost).toFixed(2);\n document.querySelector(\".total-cost\").value = `$ ${totalCost}`;\n\n }\n return true\n}", "title": "" }, { "docid": "a12ebccd570d05848a5acb60395be03c", "score": "0.58298516", "text": "function validateFormData() {\n dateInput = document.getElementById(\"datepicker\").value; \n mealCategory = document.getElementById(\"calorieEntryPage-mealCategory\").value;\n mealNameCaloriesPerSingleQuantity = document.getElementById(\"calorieEntryPage-mealNameCaloriesPerSingleQuantity\").value;\n mealQuantity = parseFloat(document.getElementById(\"calorieEntryPage-mealQuantity\").value.trim());\n drinkNameCaloriesPerGlass = document.getElementById(\"calorieEntryPage-drinkNameCaloriesPerGlass\").value.trim();\n drinkQuantity = parseFloat(document.getElementById(\"calorieEntryPage-drinkQuantity\").value.trim());\n ingredientNameCaloriesPerGram = document.getElementById(\"calorieEntryPage-ingredientNameCaloriesPerGram\").value;\n ingredientGrams = parseFloat(document.getElementById(\"calorieEntryPage-ingredientGrams\").value.trim());\n manualEntryName = document.getElementById(\"calorieEntryPage-manualEntryName\").value.trim();\n manualEntryCalories = parseFloat(document.getElementById(\"calorieEntryPage-manualEntryCalories\").value.trim());\n notesInput = document.getElementById(\"calorieEntryPage-notes\").value.trim();\n \n // Validation - Section 2\n if (mealCategory === \"0\") {\n document.getElementById(\"calorieEntryPage-errorMessage\").innerText = \"Please select meal category.\";\n return;\n }\n // Validation - Section 3\n // Section 3 - checking to see that question 1 for Part A, B, C, D are not all empty\n else if ((mealNameCaloriesPerSingleQuantity === \"0\") && (drinkNameCaloriesPerGlass === \"0\") && (ingredientNameCaloriesPerGram === \"0\") && (manualEntryName === \"\")) {\n document.getElementById(\"calorieEntryPage-errorMessage\").innerText = \"Please fill out section 3.\";\n return;\n }\n // Section 3 - checking to see if question 1 has been filled out for other parts besides Part A\n else if ((mealNameCaloriesPerSingleQuantity !== \"0\") && (drinkNameCaloriesPerGlass !== \"0\")) {\n document.getElementById(\"calorieEntryPage-errorMessage\").innerText = \"Please fill out only ONE part of section 3. Fill out either part A, B, C or D only.\";\n return;\n }\n else if ((mealNameCaloriesPerSingleQuantity !== \"0\") && (ingredientNameCaloriesPerGram !== \"0\")) {\n document.getElementById(\"calorieEntryPage-errorMessage\").innerText = \"Please fill out only ONE part of section 3. Fill out either part A, B, C or D only.\";\n return;\n }\n else if ((mealNameCaloriesPerSingleQuantity !== \"0\") && (manualEntryName !== \"\")) {\n document.getElementById(\"calorieEntryPage-errorMessage\").innerText = \"Please fill out only ONE part of section 3. Fill out either part A, B, C or D only.\";\n return;\n }\n // Section 3 - checking to see if question 1 has been filled out for other parts besides Part B \n else if ((drinkNameCaloriesPerGlass !== \"0\") && (ingredientNameCaloriesPerGram !== \"0\")) {\n document.getElementById(\"calorieEntryPage-errorMessage\").innerText = \"Please fill out only ONE part of section 3. Fill out either part A, B, C or D only.\";\n return;\n }\n else if ((drinkNameCaloriesPerGlass !== \"0\") && (manualEntryName !== \"\")) {\n document.getElementById(\"calorieEntryPage-errorMessage\").innerText = \"Please fill out only ONE part of section 3. Fill out either part A, B, C or D only.\";\n return;\n }\n // Section 3 - checking to see if question 1 has been filled out for other parts besides Part C\n else if ((ingredientNameCaloriesPerGram !== \"0\") && (manualEntryName !== \"\")) {\n document.getElementById(\"calorieEntryPage-errorMessage\").innerText = \"Please fill out only ONE part of section 3. Fill out either part A, B, C or D only.\";\n return;\n }\n // Validation - Section 3 \n // Section 3 - checking to see if Part A question 2 is a number\n else if ( \n (mealNameCaloriesPerSingleQuantity !== \"0\") && \n (drinkNameCaloriesPerGlass === \"0\") && (ingredientNameCaloriesPerGram === \"0\") && (manualEntryName === \"\") &&\n (isNaN(mealQuantity))\n ) {\n document.getElementById(\"calorieEntryPage-errorMessage\").innerText = \"Please fill out quantity for section 3 part A. Check you have entered numbers.\";\n return;\n }\n // Section 3 - checking to see if Part B question 2 is a number\n else if ( \n (drinkNameCaloriesPerGlass !== \"0\") && \n (mealNameCaloriesPerSingleQuantity === \"0\") && (ingredientNameCaloriesPerGram === \"0\") && (manualEntryName === \"\") &&\n (isNaN(drinkQuantity))\n ) {\n document.getElementById(\"calorieEntryPage-errorMessage\").innerText = \"Please fill out quantity for section 3 part B. Check you have entered numbers.\";\n return;\n }\n // Section 3 - checking to see if Part C question 2 is a number\n else if ( \n (ingredientNameCaloriesPerGram !== \"0\") && \n (mealNameCaloriesPerSingleQuantity === \"0\") && (drinkNameCaloriesPerGlass === \"0\") && (manualEntryName === \"\") &&\n (isNaN(ingredientGrams))\n ) {\n document.getElementById(\"calorieEntryPage-errorMessage\").innerText = \"Please fill out number of grams for section 3 part C. Check you have entered numbers.\";\n return;\n }\n // Section 3 - checking to see if Part D question 2 is a number\n else if ( \n (manualEntryName !== \"\") && \n (mealNameCaloriesPerSingleQuantity === \"0\") && (drinkNameCaloriesPerGlass === \"0\") && (ingredientNameCaloriesPerGram === \"0\") &&\n (isNaN(manualEntryCalories))\n ) {\n document.getElementById(\"calorieEntryPage-errorMessage\").innerText = \"Please fill out number of calories for section 3 part D. Check you have entered numbers.\";\n return;\n }\n // The following else statement is creating a data object and empties the error-message field once it passes all validation\n else {\n //section #, mealname, qty, cal\n document.getElementById(\"calorieEntryPage-errorMessage\").innerText = \"\";\n var strMealName;\n var strQty;\n var strCal;\n\n // Section A information\n if (mealNameCaloriesPerSingleQuantity.trim()!=\"\" && mealNameCaloriesPerSingleQuantity.trim()!=0){\n sectionNumber = \"A\";\n strMealName = mealNameCaloriesPerSingleQuantity;\n strQty = mealQuantity;\n strCal = parseCalorie(strMealName);\n // Section B information\n } else if (drinkNameCaloriesPerGlass.trim()!=\"\" && drinkNameCaloriesPerGlass.trim()!=0){\n sectionNumber = \"B\";\n strMealName = drinkNameCaloriesPerGlass;\n strQty = drinkQuantity;\n strCal = parseCalorie(strMealName);\n // Section C information\n } else if (ingredientNameCaloriesPerGram.trim()!=\"\" && ingredientNameCaloriesPerGram.trim()!=0){\n sectionNumber = \"C\";\n strMealName = ingredientNameCaloriesPerGram;\n strQty = ingredientGrams;\n strCal = parseCalorie(strMealName);\n // Section D information\n } else if (manualEntryName.trim()!=\"\"){\n sectionNumber = \"D\";\n strMealName = manualEntryName;\n strQty = 1;\n strCal = manualEntryCalories;\n }\n\n var data = { \n username: userName,\n date: dateInput,\n mealtype: mealCategory,\n sectionno: sectionNumber,\n mealname: strMealName,\n qty:parseFloat(strQty),\n unitcal: parseFloat(strCal),\n comments: notesInput\n };\n return data\n }\n}", "title": "" }, { "docid": "697f06e1e0df2ad313bb56be71ddc6c1", "score": "0.5817892", "text": "function validate_fields() {\n // Check that mandatory fields are filled in.\n var mandatory_fields = ['first_name', 'last_name', 'text', 'author_name'];\n for (var i = 0; i < mandatory_fields.length; i++) {\n field = $(mandatory_fields[i]);\n if (field != null && field.value.length == 0) {\n $('mandatory_field_missing').setAttribute('style', '');\n field.focus();\n return false;\n }\n }\n $('mandatory_field_missing').setAttribute('style', 'display: none');\n\n // Check that the status and found values are not inconsistent.\n if ($('status').value == 'is_note_author' && $('found_no').checked) {\n $('status_inconsistent_with_found').setAttribute('style', '');\n return false;\n }\n \n $('status_inconsistent_with_found').setAttribute('style', 'display: none');\n return true;\n}", "title": "" }, { "docid": "5c5328068f5ad11f9a7c5dc580fe9829", "score": "0.5816991", "text": "function FormValidation() {\r\n\t\t\r\n\t\t// check if each function has an error, return false\r\n\t\tif (!field01Validation()){\r\n\t\t\treturn false;}\r\n\t\tif (!field02Validation()){\r\n\t\t\treturn false;}\r\n\t\tif (!field03Validation()){\r\n\t\t\treturn false;}\r\n\t\tif (!field02AndField03()){\r\n\t\t\treturn false;}\r\n\t\tif (!field04Validation()){\r\n\t\t\treturn false;}\r\n\t\tif (!field05Validation()){\r\n\t\t\treturn false;}\r\n\t\tif (!field09Validation()){\r\n\t\t\treturn false;}\r\n\t\tif (!field10Validation()){\r\n\t\t\treturn false;}\r\n\t\t\t\r\n\t\t// no Errors then..\r\n\t\tvar input01Value = document.pizza.field01.value;\r\n\t\tdocument.pizza.field01.value = input01Value.substr(0,1).toUpperCase() + input01Value.substr(1,input01Value.length-1).toLowerCase();\r\n\t\t\t\r\n\t\tdocument.pizza.field13.value = 'Y';\r\n\t\t\r\n\t\tdocument.pizza.field07.disabled = false;\r\n\t\t\r\n\t\treturn true;\r\n\t\t}", "title": "" }, { "docid": "32efd5c32f413597e9f5cc6b04869e5d", "score": "0.5785136", "text": "function validateNumFields() {\t\n\tcheckSpellingErrorAnswer();\n\tcheckRiddleAnswer();\n\tcheckSudokuSolution();\n\tcheckBejeweledAnswer();\n}", "title": "" }, { "docid": "21b3cd71e91271ed49ac2e63d1dd1dd5", "score": "0.57849336", "text": "function PromotionHeaderValidation() {\n //Check the user clicked twice or not.\n if (!isNotDoubleClick())\n return false;\n ClearErrorMsg();\n RevertFields();\n var Validation = true;\n var vRxPromoName = new RegExp(document.getElementById(\"regPromoName\").value, \"ig\");\n var vRXDurationValue = new RegExp(\"^[0-9]{1,3}$\", \"ig\");\n\n var ddlplanningMde = document.getElementById(\"ddlPlanningMode\");\n if (ddlplanningMde != null && ddlplanningMde.value == \"-1\") {\n HighlightHeaderErrorFields(document.getElementById(\"divPlanningMode\")); //CR 118 \n document.getElementById(\"liPlanningEntityMandatory\").className = \"showText\";\n Validation = false;\n }\n else {\n\n var allowBackDatedPromotion = document.getElementById(\"hfAllowBackDatedPromotion\").value;\n var allowCrossYearPromotion = document.getElementById(\"hfAllowCrossYearPromotion\").value;\n var isChecked = $('#chkBundlePromotion').is(':checked');\n if (isChecked == \"true\") { allowCrossYearPromotion = \"false\"; }\n\n var currentDate = document.getElementById(\"hfCurrenDate\").value.GetDatePart();\n if ((allowBackDatedPromotion == \"false\" || (allowCrossYearPromotion == \"true\" && $find(wdpPromStartDateCID).get_value().getFullYear() != $find(wdpPromEndDateCID).get_value().getFullYear())) && currentDate.setHours(0, 0, 0, 0) > $find(wdpPromStartDateCID).get_value().toString().GetDatePart().setHours(0, 0, 0, 0)) {\n\n HighlightHeaderErrorFields(document.getElementById(\"divStartDate\")); //CR 118 \n if (allowBackDatedPromotion == \"false\") {\n document.getElementById(\"liPromotionStartDate\").className = \"showText\";\n }\n else {\n document.getElementById(\"liInvalidCrossYearPromotionStartDate\").className = \"showText\";\n }\n Validation = false;\n }\n\n //Validate PromotionName Textbox\n if (document.getElementById(\"txtPromotionName\").value.trim() == \"\") {\n HighlightHeaderErrorFields(document.getElementById(\"txtPromotionName\")); //CR 118 \n document.getElementById(\"liPromotionName\").className = \"showText\";\n Validation = false;\n }\n else if (document.getElementById(\"txtPromotionName\").value.trim() != \"\") {\n\n if ((vRxPromoName.test(document.getElementById(\"txtPromotionName\").value.trim()))) {\n HighlightHeaderErrorFields(document.getElementById(\"txtPromotionName\")); //CR 118 \n document.getElementById(\"liPromotionNameReg\").className = \"showText\";\n Validation = false;\n }\n }\n\n //Validate Duration Textbox\n if (!(vRXDurationValue.test(document.getElementById(\"txtDurationValue\").value))) {\n HighlightHeaderErrorFields(document.getElementById(\"txtDurationValue\")); // CR 118\n document.getElementById(\"liDuration\").className = \"showText\";\n Validation = false;\n }\n\n //Added as part of PT-ULHD00010513433,The issue was with the promotion End date was planning lesser than promotion start date.\n if ($find(wdpPromEndDateCID).get_value().toString().GetDatePart().setHours(0, 0, 0, 0) <\n $find(wdpPromStartDateCID).get_value().toString().GetDatePart().setHours(0, 0, 0, 0)) {\n document.getElementById(\"liPromotionEndDate\").className = \"showText\";\n Validation = false;\n }\n\n\n //Validate whether user selected the Qualification.\n if (document.getElementById(\"ddlPromotionQualification\")) {\n if (document.getElementById(\"ddlPromotionQualification\").value == \"-1\") {\n HighlightHeaderErrorFields(document.getElementById(\"divPromoQualification\")); //CR 118 \n document.getElementById(\"liPromotionQualification\").className = \"showText\";\n Validation = false;\n }\n\n }\n\n //Validate whether user selects a bundle\n if ($('#chkBundlePromotion').is(\":visible\") && $('#ddlBundle').is(\":visible\")) {\n if ($('#chkBundlePromotion').is(':checked') && document.getElementById(\"ddlBundle\").value == \"-1\") {\n HighlightHeaderErrorFields(document.getElementById(\"divBundleName\")); //CR 118 \n document.getElementById(\"liSelectBundle\").className = \"showText\";\n Validation = false;\n }\n }\n\n //Check whether User had selected atleast one sales Org or not.\n if (document.getElementById(\"chkbSalesOrg\") != null) {\n var checked = false;\n var chkBoxList = document.getElementById(\"chkbSalesOrg\");\n var chkBoxCount = chkBoxList.getElementsByTagName(\"input\");\n for (var i = 0; i < chkBoxCount.length; i++) {\n if (chkBoxCount[i].checked)\n checked = true;\n }\n if (!checked) {\n HighlightHeaderErrorFields(document.getElementById(\"divSalesOrg\")); //CR 118 \n document.getElementById(\"liSalesOrg\").className = \"showText\";\n Validation = false;\n }\n }\n else {\n HighlightHeaderErrorFields(document.getElementById(\"divSalesOrg\")); //CR 118\n document.getElementById(\"liSalesOrg\").className = \"showText\";\n Validation = false;\n }\n\n //check whether user had selected marketing objective or not.\n if (document.getElementById(\"ddlMarketingObjectives\").value == \"-1\") {\n HighlightHeaderErrorFields(document.getElementById(\"divMarketObj\")); //CR 118\n document.getElementById(\"liMarketingObjectives\").className = \"showText\";\n Validation = false;\n }\n\n //check whether user had selected Promotion objective or not.\n if (document.getElementById(\"ddlPromotionObjectives\").value == \"-1\") {\n HighlightHeaderErrorFields(document.getElementById(\"divPromoObj\")); //CR 118\n document.getElementById(\"liPromotionObjectives\").className = \"showText\";\n Validation = false;\n }\n\n //check whether user had selected atleast one PromotionMechanic or not.\n if (document.getElementById(\"chkbPromotionMechanics\") != null) {\n var checked = false;\n var chkBoxList = document.getElementById(\"chkbPromotionMechanics\");\n var chkBoxCount = chkBoxList.getElementsByTagName(\"input\");\n for (var i = 0; i < chkBoxCount.length; i++) {\n if (chkBoxCount[i].checked)\n checked = true;\n }\n if (!checked) {\n HighlightHeaderErrorFields(document.getElementById(\"divMechCheckbox\")); //CR 118\n document.getElementById(\"liPromotionMechanics\").className = \"showText\";\n Validation = false;\n }\n }\n else {\n HighlightHeaderErrorFields(document.getElementById(\"divMechCheckbox\")); //CR 118\n document.getElementById(\"liPromotionMechanics\").className = \"showText\";\n Validation = false;\n }\n\n //Textbox length\n if ((document.getElementById('txtNotes').value.replace(/^\\s*/, \"\").replace(/\\s*$/, \"\")).length > 2000) {\n HighlightHeaderErrorFields(document.getElementById(\"txtNotes\")); //CR 118\n document.getElementById(\"liTxtNoteExceed\").className = \"showText\";\n Validation = false;\n\n }\n //Incase Note is mandatory\n if (document.getElementById(\"hfNoteMandatory\").value == \"1\") {\n if (document.getElementById(\"txtNotes\").value == \"\") {\n HighlightHeaderErrorFields(document.getElementById(\"txtNotes\")); //CR 118\n document.getElementById(\"liNote\").className = \"showText\";\n Validation = false;\n }\n }\n\n //Incase FileAttachment is mandatory\n if (document.getElementById(\"hfAttchemntMandatory\").value == \"1\") {\n if (document.getElementById(\"dlFilesList\") == null || document.getElementById(\"dlFilesList\").children.length == 0) {\n HighlightHeaderErrorFields(document.getElementById(\"divCheckboxArea\")); //CR 118\n document.getElementById(\"liAttachments\").className = \"showText\";\n Validation = false;\n }\n }\n\n //Validate if TokenCode is linked for PayoutCode\n\n if (document.getElementById(\"ddlTknCdeType\") != null) {\n\n var ddlTknCdeType = document.getElementById(\"ddlTknCdeType\");\n if (ddlTknCdeType.value == \"PayoutCode\") {\n // if (!document.getElementById(\".lblSelectedPayoutCode\").val())\n // var tknlbl = $('.lblSelectedPayoutCode').val();\n //var actualPrice = document.getElementById(\"<%=lblSelectedPayoutCode.ClientID %>\").value;\n var tknlbl = $('.lblSelectedPayoutCode').val();\n var tknlbl = document.getElementById(\"lblSelectedPayoutCode\").innerHTML;\n // var s = document.getElementsByTagName('lblSelectedPayoutCode')[0].firstChild.data\n if (!tknlbl) {\n HighlightHeaderErrorFields(document.getElementById(\"divTokenCode\"));\n document.getElementById(\"liTokenCodeSelection\").className = \"showText\";\n Validation = false;\n }\n }\n }\n }\n\n\n if (Validation)\n return true;\n else {\n document.getElementById(\"plErrorMessages\").className = \"showText\";\n window.scrollTo(0, 0);\n return false;\n }\n\n}", "title": "" }, { "docid": "9d0150d8de2f47ab9c9c0c06076be0c2", "score": "0.5775913", "text": "function hasValidProperties(req, res, next) {\n const { data = {} } = req.body;\n //console.log(\"data\", data);\n const invalid = [];\n if (!data.first_name || data.first_name === \"\") {\n invalid.push(\"first_name\");\n }\n if (!data.last_name || data.last_name === \"\") {\n invalid.push(\"last_name\");\n }\n if (!data.mobile_number || data.mobile_number === \"\") {\n invalid.push(\"mobile_number\");\n }\n if (!data.reservation_date || data.reservation_date === \"\") {\n invalid.push(\"reservation_date\");\n }\n if (!data.reservation_time || data.reservation_time === \"\") {\n invalid.push(\"reservation_time\");\n }\n if (!data.people || data.people === \"\") {\n invalid.push(\"people\");\n }\n //return invalid fields if any \n if (invalid.length) {\n return next({\n status: 400,\n message: `Invalid fields: ${invalid.join(\", \")}`\n })\n } next();\n}", "title": "" }, { "docid": "659fe742bdaf71204e2d29003dcdf6ba", "score": "0.57704055", "text": "function validate(e) {\n e.preventDefault();\n checkForEmptyFields();\n checkIfWholeNumber();\n addErrors();\n addDynamicErrors();\n emptyFields = [];\n notWholeNumbers = [];\n }", "title": "" }, { "docid": "db0c98ea874374d23a65b6de10ebe76f", "score": "0.5764224", "text": "function getFieldsAndCheckManual() {\n //calculate and show error messages\n getFieldsAndCheck(true);\n}", "title": "" }, { "docid": "813b9dbdc414810bccb68f8d809484ce", "score": "0.57612926", "text": "function validatepage() {\n var i, catcount, itmcount, category, product;\n\n // If a new address is entered, make sure we have a complete address\n if (!(ValidateAddr())) return false;\n\n // make sure we have one category specified at least\n catcount = 0;\n for (i = 1; i <= linecount; i++) {\n if (document.getElementById(\"quantity\" + i).value == \"0\") ClearDetails(i);\n category = document.getElementById(\"cat\" + i).value;\n if ((category != \"0\") && (category != \"\")) {\n catcount++;\n }\n }\n if (catcount == 0) {\n SetError(\"Please select a category.\");\n document.orderForm.cat1.focus();\n return false;\n }\n\n // make sure we have one product specified at least\n itmcount = 0;\n for (i = 1; i <= linecount; i++) {\n if (document.getElementById(\"quantity\" + i).value == \"0\") ClearDetails(i);\n product = document.getElementById(\"pr\" + i).value;\n if ((product != \"0\") && (product != \"\")) {\n itmcount++;\n if (!(valLineItem(i))) {\n return false;\n }\n }\n }\n if (itmcount == 0) {\n SetError(\"Please select a product.\");\n document.orderForm.pr1.focus();\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "d3c666106bf99ddaef18f448cb7ede85", "score": "0.57605326", "text": "function validatePswd() {\n // Validate uppercase characters\n if (pswdInput.value.match(validators.upperCaseLetters)) {\n abstractTag.removeClass(upLetter, \"invalid\");\n abstractTag.addClass(upLetter, \"valid\");\n bUpperCaseChar = true;\n } else {\n abstractTag.removeClass(upLetter, \"valid\");\n abstractTag.addClass(upLetter, \"invalid\");\n bUpperCaseChar = false;\n }\n\n // Validate lowercase characters\n if (pswdInput.value.match(validators.lowerCaseLetters)) {\n abstractTag.removeClass(lowLetter, \"invalid\");\n abstractTag.addClass(lowLetter, \"valid\");\n bSmallCaseChar = true;\n } else {\n abstractTag.removeClass(lowLetter, \"valid\");\n abstractTag.addClass(lowLetter, \"invalid\");\n bSmallCaseChar = false;\n }\n\n // Validate numbers\n if (pswdInput.value.match(validators.numbers)) {\n abstractTag.removeClass(number, \"invalid\");\n abstractTag.addClass(number, \"valid\");\n bDigit = true;\n } else {\n abstractTag.removeClass(number, \"valid\");\n abstractTag.addClass(number, \"invalid\");\n bDigit = false;\n }\n\n // Validate length\n if (pswdInput.value.length >= validators.length) {\n abstractTag.removeClass(length, \"invalid\");\n abstractTag.addClass(length, \"valid\");\n bLength = true;\n } else {\n abstractTag.removeClass(length, \"valid\");\n abstractTag.addClass(length, \"invalid\");\n bLength = false;\n }\n }", "title": "" }, { "docid": "e2a21f092429b1fb59cd452ebe727145", "score": "0.57575434", "text": "function APSValidation(tabNum) {\n var valid = 0;\n var apsValid = 1;\n if (tabNum == 1) {\n var apsAppTxtName = [\"txtAppFname\", \"txtAppLname\", \"txtAppssn\", \"txtAppBirthDay\", \"txtAppAddressFirst\", \"txtAppCity\", \"ddAppState\", \"txtAppZip\", \"txtAppHomePhone\"];\n var apsAppLblName = [\"First Name\", \"Last Name\", \"SSN\", \"Birth Date\", \"Address\", \"City\", \"State\", \"Zip\", \"Home Phone\"];\n if (controlsName.length != 0) {\n for (var k = 0; k < controlsName.length; k++) {\n for (var r = 0; r < filterFields.length; r++) {\n if (controlsName[k] == filterFields[r]) {\n filterFields = jQuery.grep(filterFields, function (value) {\n return value != filterFields[r];\n });\n }\n }\n }\n for (var k = 0; k < filterFields.length; k++) {\n for (var r = 0; r < apsAppTxtName.length; r++) {\n if (filterFields[k] == apsAppTxtName[r]) {\n apsAppTxtName = jQuery.grep(apsAppTxtName, function (value) {\n return value != apsAppTxtName[r];\n });\n apsAppLblName = jQuery.grep(apsAppLblName, function (value) {\n return value != apsAppLblName[r];\n });\n }\n }\n }\n }\n\n for (var i = 0; i < apsAppTxtName.length; ++i) {\n if (apsAppTxtName[i] == \"ddAppState\") {\n if (dropdownValidation(apsAppTxtName[i], apsAppLblName[i])) {\n valid = 1;\n break;\n }\n } else\n if (RequireFields(apsAppTxtName[i], apsAppLblName[i])) {\n valid = 1;\n break;\n }\n if (apsAppTxtName[i] == \"txtAppssn\") {\n if ($('#txtAppssn').val().length != 11) {\n AlertBox(\"Please enter correct SSN format\", \"txtAppssn\");\n valid = 1;\n break;\n }\n }\n }\n\n if (valid == 0) {\n apsTab1 = 1; //1 is APS applicant tab valid\n apsValid = 0;\n }\n else {\n apsTab1 = 0;\n apsValid = 1;\n }\n }\n if (tabNum == 2) {\n var conTxtName = [\"txtConRequestorName\", \"txtConRequestorPhone\", \"txtConRequestorEmail\"];\n var conLblName = [\"Requestor Full Name\", \"Requestor Phone Number\", \"Requestor Email\"];\n for (var i = 0; i < conTxtName.length; i++) {\n if (RequireFields(conTxtName[i], conLblName[i])) {\n valid = 1;\n break;\n }\n }\n if (valid == 0) {\n apsTab2 = 1; //1 is APS Contact tab valid\n apsValid = 0;\n }\n else {\n apsTab2 = 0;\n apsValid = 1;\n }\n }\n if (tabNum == 3) {\n var apsDocTxtName = [\"txtDocLastName\", \"txtDocCity\"];\n var apsADocLblName = [\"Doctor's Last Name\", \"City\"];\n for (var i = 0; i < apsDocTxtName.length; ++i) {\n if (RequireFields(apsDocTxtName[i], apsADocLblName[i])) {\n valid = 1;\n break;\n }\n }\n if (valid == 0)\n if (dropdownValidation(\"ddDocState\", \"State\"))\n valid = 1;\n\n if (valid == 0) {\n apsTab3 = 1; //1 is APS Doctor tab valid\n apsValid = 0;\n }\n else {\n apsTab3 = 0;\n apsValid = 1;\n }\n }\n return apsValid; //0 is valid, 1 is not valid\n }", "title": "" }, { "docid": "1151506a307f14dc4082b192b862ebd2", "score": "0.5743939", "text": "function stdDiagnosisRelatedFields() \n{\n //see if case diagnosis is present\n var elementId = 'NBS136';\n var diagElement = getElementByIdOrByName(elementId);\n if (diagElement == null || typeof(diagElement) == 'undefined') {\n return;\n }\n var curSelection = $j('#' + elementId + ' :selected').text();\n var curVal = $j('#' + elementId + ' :selected').val();\n //per requirements... diagnosis not defaulted on condition\n // also STD*MIS says 000 is Not Infected and 999 is Unknown\n if (curVal == null || curVal == \"\" || curVal == \"000\" || curVal == \"999\")\n curVal = stdConditionToDiagnosis();\n if (curVal == null || curVal == \"\")\n return;\n\n\n var dgFirstChar = curVal.charAt(0);\n if (curVal != null & dgFirstChar == \"7\") { //any Syphillis\n $j(\"#NBS151 option[value='NPP']\").remove(); //Not Program Priority\n } else {\n $j(\"#NBS151 option[value='90213003']\").remove(); //BFP\n }\n return;\n}", "title": "" }, { "docid": "476be106df0408860dba8ffb1b1cdd30", "score": "0.57383734", "text": "function validateSpecial() {\n var f1 = validateString('name','Name');\n var f2 = validateString('proximity','Proximity');\n var f3 = validateString('store','Store');\n var f4 = validateString('beacon','Beacon');\n var f5 = validateString('name','Name');\n var f6 = validateURL('url','Image URL',true);\n var f7 = validateString('end','End');\n \n return f1 && f2 && f3 && f4 && f5 && f6 && f7;\n}", "title": "" }, { "docid": "d7f2ba34f9b99bb803243bf0983bb289", "score": "0.57377356", "text": "function verifyFields(){\n if ($scope.character.name == \"\")\n return \"Character requires a name\";\n if ($scope.character.class == \"\") {\n return \"Character requires a class\";\n }\n }", "title": "" }, { "docid": "4c301a4430c23cf9f2932d47b37c2b85", "score": "0.57362217", "text": "function checkWarnings () {\n\t// the check min/max age for each spouse\n\tvar spouses = ['spouse 1','spouse 2'];\n \n\tfor (var i in spouses) {\n if (!spouses.hasOwnProperty(i)) { \n continue; \n }\n \n\t\tvar spouse = spouses[i];\n\t\tvar spouse_name = (spouse == 'spouse 1') ? 'investor' : 'spouse';\n\t\t// minimum age 60\n \n\t\tif (FormCells['pi,client information,'+spouse+',age'].value < 60) {\n\t\t\taddError('Minimum age for '+spouse_name+' is 60.');\n\t\t} // max age 75\n\t\telse if (FormCells['pi,client information,'+spouse+',age'].value > 75) {\n\t\t\taddError('Pre-loaded lifetime annuity data is not available for investors over 75. You must enter a custom lifetime annuity quote in the advanced settings section before proceeding.');\n\t\t}\n\t}\n}", "title": "" }, { "docid": "84e25dbe0684742a533fdea148a8915e", "score": "0.57335544", "text": "function field_validation()\n{\t\n\tvar root_cat_id = document.getElementById(\"root_cat_id\").value;\n\tif(root_cat_id == \"\") {\talert(\"Please Select Root Category.\"); return false;\t}\n\t\n\t//var cat_id = document.getElementById(\"cat_id\").value;\n\t//if(cat_id == \"\") {\talert(\"Please Select Category.\"); return false;\t}\n\t\n\t//var submenu_id = document.getElementById(\"submenu_id\").value;\n\t//if(submenu_id == \"\") {\talert(\"Please Select Sub Category.\"); return false;\t}\n\t\n\t//var product_type = document.getElementById(\"product_type\").value;\n\t//if(product_type == \"\") {\talert(\"Please Select Product Type.\"); return false;\t}\n\t\n\tvar product_name = document.getElementById(\"product_name\").value;\n\tif(product_name == \"\") {\talert(\"Please Enter Product Name.\"); return false;\t}\n\t\n\tvar price = document.getElementById(\"price\").value;\n\tif(price == \"\") {\talert(\"Please Enter Item Price.\"); return false;\t}\n\t\n\tvar size = document.getElementById(\"size\").value;\n\tif(size == \"\") {\talert(\"Please Enter Size.\"); return false;\t}\n\t\n\tvar brand = document.getElementById(\"brand\").value;\n\tif(brand == \"\") {\talert(\"Please Select Brand.\"); return false;\t}\n\t\n\tvar fabrics = document.getElementById(\"fabrics\").value;\n\tif(fabrics == \"\") {\talert(\"Please Enter Fabrics.\"); return false;\t}\n\t\n\tvar fabrication = document.getElementById(\"fabrication\").value;\n\tif(fabrication == \"\") {\talert(\"Please Enter Fabrication.\"); return false;\t}\n\t\n\tvar quantity = document.getElementById(\"quantity\").value;\n\tif(quantity == \"\") {\talert(\"Please Enter Product Quantity.\"); return false;\t}\n\t\t\n\tvar description = document.getElementById(\"description\").value;\n\tif(description == \"\") {\talert(\"Please Enter Description.\"); return false;\t}\n\t\n}", "title": "" }, { "docid": "7143a39aaeab48143509d9859dbd5205", "score": "0.5724117", "text": "function initValidateHandlers() {\n // For setup\n var setupNode = $('#section_setup');\n addChangeHandler(setupNode, () => {\n ord.setups.validateSetup(setupNode);\n });\n\n // For conditions\n var conditionNode = $('#section_conditions');\n addChangeHandler(conditionNode, () => {\n ord.conditions.validateConditions(conditionNode);\n });\n\n // For temperature\n var temperatureNode = $('#section_conditions_temperature');\n addChangeHandler(temperatureNode, () => {\n ord.temperature.validateTemperature(temperatureNode);\n });\n\n // For pressure\n var pressureNode = $('#section_conditions_pressure');\n addChangeHandler(pressureNode, () => {\n ord.pressure.validatePressure(pressureNode);\n });\n\n // For stirring\n var stirringNode = $('#section_conditions_stirring');\n addChangeHandler(stirringNode, () => {\n ord.stirring.validateStirring(stirringNode);\n });\n\n // For illumination\n var illuminationNode = $('#section_conditions_illumination');\n addChangeHandler(illuminationNode, () => {\n ord.illumination.validateIllumination(illuminationNode);\n });\n\n // For electro\n var electroNode = $('#section_conditions_electro');\n addChangeHandler(electroNode, () => {\n ord.electro.validateElectro(electroNode);\n });\n\n // For flow\n var flowNode = $('#section_conditions_flow');\n addChangeHandler(flowNode, () => {\n ord.flows.validateFlow(flowNode);\n });\n\n // For notes\n var notesNode = $('#section_notes');\n addChangeHandler(notesNode, () => {\n ord.notes.validateNotes(notesNode);\n });\n\n // For provenance\n var provenanceNode = $('#section_provenance');\n addChangeHandler(provenanceNode, () => {\n ord.provenance.validateProvenance(provenanceNode);\n });\n}", "title": "" }, { "docid": "417f09f1309594f238a387b3b5289acf", "score": "0.5716455", "text": "function validData() {\n var regex1 = /\\s/;\n var regex2 = /[^0-9]/;\n\n if (!customerId || customerId.match(regex1)) {\n document.getElementById(\"customerId\").innerHTML =\n \"Customer ID is required and must be correct.\";\n return false;\n } else if (!name) {\n document.getElementById(\"name\").innerHTML = \"Customer Name is required.\";\n return false;\n } else if (town.length != 3) {\n document.getElementById(\"town\").innerHTML =\n \"Must be 3 letters\";\n return false;\n } else if (!partNumber) {\n document.getElementById(\"partNumber\").innerHTML =\n \"Part Number is required.\";\n return false;\n } else if (!description) {\n document.getElementById(\"description\").innerHTML =\n \"Description is required.\";\n return false;\n } else if (isNaN(pricePerPart) || pricePerPart <= 0) {\n document.getElementById(\"pricePerPart\").innerHTML = \"Invalid price\";\n return false;\n } else if (regex2.test(quantity) || quantity <= 0) {\n document.getElementById(\"quantity\").innerHTML = \"Invalid quantity\";\n return false;\n } else {\n return salesTax(cost);\n }\n }", "title": "" }, { "docid": "0e2d776f1e9ae18a23603bcf8ffbeed9", "score": "0.57133174", "text": "function adhocIncomeRecordValidate(){\n\t\tvar validated = false;\n\t\tvar floatRex= /^\\s*(\\+|-)?((\\d+(\\.\\d+)?)|(\\.\\d+))\\s*$/;\n\t\t\n\t\tvar netTotal = invoiceNetText.value;\n\t\tvar vatValue = vatText.value;\n\t\tif (categoryText.value == undefined || categoryText.value == 0) {\n\t\t\tvar dialog1 = Ti.UI.createAlertDialog({\n\t\t\t\ttitle : 'Alert',\n\t\t\t\tmessage : 'Please Select Category',\n\t\t\t\tok : 'OK',\n\t\t\t});\n\t\t\tdialog1.show();\n\t\t} else if (subCategoryText.value == undefined || subCategoryText.value == 0) {\n\t\t\tvar dialog2 = Ti.UI.createAlertDialog({\n\t\t\t\ttitle : 'Alert',\n\t\t\t\tmessage : 'Please Select Sub Category',\n\t\t\t\tok : 'Ok',\n\t\t\t});\n\t\t\tdialog2.show();\n\t\t} else if (selectAccountText.value == undefined || selectAccountText.value == '') {\n\t\t\tvar dialog3 = Ti.UI.createAlertDialog({\n\t\t\t\ttitle : 'Alert',\n\t\t\t\tmessage : 'Please Select Account',\n\t\t\t\tok : 'Ok',\n\t\t\t});\n\t\t\tdialog3.show();\n\t\t// } else if (selectProjectText.value == undefined || selectProjectText.value == '') {\n\t\t\t// var dialog4 = Ti.UI.createAlertDialog({\n\t\t\t\t// title : 'Alert',\n\t\t\t\t// message : 'Please Select Project',\n\t\t\t\t// ok : 'Ok',\n\t\t\t// });\n\t\t\t// dialog4.show();\n\t\t} else if (invoiceNetText.value == '') {\n\t\t\tvar dialog5 = Ti.UI.createAlertDialog({\n\t\t\t\ttitle : 'Alert',\n\t\t\t\tmessage : 'Please Add Invoice Net',\n\t\t\t\tok : 'Ok',\n\t\t\t});\n\t\t\tdialog5.show();\n\t\t} else if(!floatRex.test(invoiceNetText.value)){\n\t\t\tvar dialog6 = Ti.UI.createAlertDialog({\n\t\t\t\ttitle : 'Alert',\n\t\t\t\tmessage : 'Invoice Net is Invalid',\n\t\t\t\tok : 'Ok',\n\t\t\t});\n\t\t\tdialog6.show();\n\t\t} else{\n\t\t\tvalidated = true;\n\t\t}\n\t\t\n\t\treturn validated;\n\t}", "title": "" }, { "docid": "df8338a81363f5d2372d4dbb5174d67e", "score": "0.57066387", "text": "function onValidate(Data){\n if(Data.fullname && Data.lastname && Data.Address && Data.Gender && Data.ChoiceOfFood && Data.State && Data.Country)\n {\n \n return true;\n }\n else{\n alert(\"Enter all details and select minimum 2 Foods recipe\");\n return false;\n }\n}", "title": "" }, { "docid": "6ead0d4cb4ff4a5074103c06b23a2f59", "score": "0.5703022", "text": "validateVacancyPayload(form_data){\n let hasValidationError = false;\n let payloadObj = Object.assign({}, form_data);\n\n payloadObj.end_date = payloadObj.end_date ? payloadObj.end_date : this.prepareDate(payloadObj.end_date_picker);\n payloadObj.company_uuid = payloadObj.selectedCompany ? payloadObj.selectedCompany.uuid : null;\n\n if(!payloadObj.end_date){\n hasValidationError = true;\n this.addVacancyErrorMessage = this.filter('translate')('INVALID_INPUT');\n this.errors['end_date'] = this.filter('translate')('REQUIRED_FIELD_VALIDATION_TEXT');\n }else{\n this.errors['end_date'] = null;\n }\n\n if(!payloadObj.title){\n hasValidationError = true;\n this.addVacancyErrorMessage = this.filter('translate')('INVALID_INPUT');\n this.errors['title'] = this.filter('translate')('REQUIRED_FIELD_VALIDATION_TEXT');\n }else if(payloadObj.title && payloadObj.title.length > 128){\n hasValidationError = true;\n this.addVacancyErrorMessage = this.filter('translate')('INVALID_INPUT');\n this.errors['title'] = this.filter('translate')('MAX_LIMIT')+ \" : 128 chars\";\n }else{\n this.errors['title'] = null;\n }\n\n if(!payloadObj.address){\n hasValidationError = true;\n this.addVacancyErrorMessage = this.filter('translate')('INVALID_INPUT');\n this.errors['address'] = this.filter('translate')('REQUIRED_FIELD_VALIDATION_TEXT');\n }else if(payloadObj.address && payloadObj.address.length > 512){\n hasValidationError = true;\n this.addVacancyErrorMessage = this.filter('translate')('INVALID_INPUT');\n this.errors['address'] = this.filter('translate')('MAX_LIMIT')+ \" : 512 chars\";\n }else{\n this.errors['address'] = null;\n }\n\n if(!payloadObj.company_uuid){\n hasValidationError = true;\n this.addVacancyErrorMessage = this.filter('translate')('INVALID_INPUT');\n this.errors['company_uuid'] = this.filter('translate')('REQUIRED_FIELD_VALIDATION_TEXT');\n }else{\n this.errors['company_uuid'] = null;\n }\n\n if(payloadObj.salary && payloadObj.salary.length > 64){\n hasValidationError = true;\n this.addVacancyErrorMessage = this.filter('translate')('INVALID_INPUT');\n this.errors['salary'] = this.filter('translate')('MAX_LIMIT');\n }else{\n this.errors['salary'] = null;\n }\n if(payloadObj.selectedCategoryItems){\n Object.keys(payloadObj.selectedCategoryItems).forEach((key)=> {\n if (payloadObj.selectedCategoryItems[key] === undefined) {\n hasValidationError = true;\n this.addVacancyErrorMessage = this.filter('translate')('INVALID_INPUT');\n }\n });\n }\n return hasValidationError;\n }", "title": "" }, { "docid": "840cb1e48668a047118825d59c55925b", "score": "0.5702515", "text": "function validateForm(){\n var rent = validateRent(); \n var day = validateDay(); \n var month = validateMonth();\n var year = validateYear(); \n var address = validateAddress(); \n var postcode = validatePostCode(); \n var title = validateTitle(); \n var description = validateDescription(); \n \n if(rent && day && month && year && address && postcode && title && description){\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "39de9e56767990ea9fb9a2e84a59b845", "score": "0.5701631", "text": "function VehiclCompleteValidation( ) {\n\n\n $(obj).find(\"input[name *=vc_veh_type]\").each(function() {\n\n $(this).rules(\"add\", {\n required: true,\n messages: {\n required: 'Required'\n\n\n\n }});\n\n });\n\n /* */\n $(obj).find(\"input[name *=vc_reg_no]\").each(function() {\n\n $(this).rules(\"add\", {\n required: true,\n maxlength: 15,\n alphanumeric: true,\n messages: {\n required: 'Required',\n maxlength: 'Maximum accept 15 character',\n alphanumeric: 'Alpha-<br>numeric<br> only'\n\n }});\n\n });\n\n $(obj).find(\"input[name *=vc_type_no]\").each(function() {\n\n $(this).rules(\"add\", {\n required: true,\n maxlength: 15,\n messages: {\n required: 'Required',\n maxlength: 'Maximum 15 characters accepted'\n\n }});\n\n\n\n });\n\n $(obj).find(\"input[name *=vc_make]\").each(function() {\n\n $(this).rules(\"add\", {\n required: true,\n maxlength: 15,\n messages: {\n required: 'Required',\n maxlength: 'Maximum 15 characters accepted'\n\n }});\n\n\n\n });\n\n\n $(obj).find(\"input[name *=vc_axle_type]\").each(function() {\n\n $(this).rules(\"add\", {\n required: true,\n maxlength: 15,\n messages: {\n required: 'Required',\n maxlength: 'Maximum 15 characters accepted'\n\n }});\n\n\n\n });\n\n\n $(obj).find(\" input[name *=vc_series_name]\").each(function() {\n\n $(this).rules(\"add\", {\n required: true,\n alphanumeric: true,\n messages: {\n required: 'Required',\n alphanumeric: 'Alpha-<br>numeric<br> only'\n\n\n\n }});\n\n });\n\n\n $(obj).find(\"input[name *=vc_engine_no]\").each(function() {\n\n $(this).rules(\"add\", {\n required: true,\n alphanumeric: true,\n messages: {\n required: 'Required',\n alphanumeric: 'Alpha-<br>numeric<br> only'\n\n\n }});\n\n\n\n\n });\n\n $(obj).find(\"input[name *=vc_chasis_no]\").each(function() {\n\n $(this).rules(\"add\", {\n required: true,\n alphanumeric: true,\n messages: {\n required: 'Required',\n alphanumeric: 'Alpha-<br>numeric<br> only'\n\n\n\n }});\n\n });\n\n $(obj).find(\"input[name *=nu_v_rating]\").each(function() {\n\n $(this).rules(\"add\", {\n positiveNumber: true,\n messages: {\n positiveNumber: 'Numbers<br> only'\n }});\n\n });\n\n $(obj).find(\"input[name *=nu_d_rating]\").each(function() {\n\n $(this).rules(\"add\", {\n positiveNumber: true,\n messages: {\n positiveNumber: 'Numbers<br> only'\n }});\n\n });\n\t\t\n }", "title": "" }, { "docid": "56707a056027ebd7aad4d907b4cd5c75", "score": "0.56950516", "text": "function validate() {\n var error = false;\n //Required\n if ($(this).prop('required') && $(this).val() === '') {\n error = true;\n }\n\n //Numeric\n if ($(this).attr('numeric') != undefined && isNaN($(this).val())) {\n error = true;\n }\n\n //Match\n if ($(this).attr('tvt-match-name') != undefined) {\n var name = $(this).attr('tvt-match-name');\n if ($(this).val() != $(\"[name='\" + name + \"']\").val() || $(this).val() == \"\") {\n error = true;\n }\n }\n\n //Duct Percentage\n if ($(this).attr('tvt-percent') != undefined) {\n var systemNumber = $(this).attr('tvt-percent');\n var locOne = $(\" [name='DuctSysPerc\" + systemNumber + \"_1\" + \"']\")[0];\n var locTwo = $(\" [name='DuctSysPerc\" + systemNumber + \"_2\" + \"']\")[0];\n var locThree = $(\" [name='DuctSysPerc\" + systemNumber + \"_3\" + \"']\")[0];\n var numOne = locOne.value === '' ? 0 : parseInt(locOne.value);\n var numTwo = locTwo.value === '' ? 0 : parseInt(locTwo.value);\n var numThree = locThree.value === '' ? 0 : parseInt(locThree.value);\n\n var locTotal = numOne + numTwo + numThree;\n\n if (locTotal != 100) {\n error = true;\n }\n }\n\n if (!this.validity.valid) {\n error = true;\n }\n\n var colorblind = document.getElementById('ColorBlindMode').checked;\n\n if (error) {\n if (colorblind) {\n $(this).addClass('errorColorBlind');\n } else {\n $(this).addClass('error');\n }\n $(this).prop({'tvt-invalid': true}).removeClass('saved').removeClass('saving');\n } else {\n $(this).removeClass('errorColorBlind').removeClass('error').removeAttr('tvt-invalid');\n saveField(this);\n }\n\n}", "title": "" }, { "docid": "7d6b3389fde0621579bc76e8307eba2f", "score": "0.5694567", "text": "function CheckFields()\n\n\n\n{\n\n\n\n var i = Validate();\n\n\n\n \n\n\n\n if(i==0)\n\n\n\n return false;\n\n\n\n return true;\n\n\n\n}", "title": "" }, { "docid": "0b5f6500d1ebb9a88339ee0b3d7bfa5f", "score": "0.56869674", "text": "validateForm() {\n const validity = {};\n validity.isValidEmail = isValidEmailList(this.state.recipients);\n validity.isAmountLessThanOneBillion = isAmountLessThanOneBillion(this.state.giftAmount);\n validity.isAmountMoreThanOneDollor = isAmountMoreThanOneDollor(this.state.giftAmount);\n validity.isValidPositiveNumber = isValidPositiveNumber(this.state.giftAmount);\n validity.isNoteToSelfValid = isInputLengthLessThanOneThousand(this.state.noteToSelf);\n validity.isMessageForRecipientsValid = isInputLengthLessThanOneThousand(this.state.messageForRecipients);\n validity.isAmountBlank = isInputBlank(this.state.giftAmount);\n this.setState({ validity });\n }", "title": "" }, { "docid": "bd71e153e52c994735feb5d3326ffd4b", "score": "0.56848013", "text": "validateOtherChargeRemarks() {\n let notValidFields = '';\n let validData = true;\n let validationObj = {};\n\n if(this.state.otherCharge.UnitPrice && this.state.otherCharge.UnitPrice > 0 && !this.state.otherCharge.Description){\n notValidFields += 'Other Charges Remarks ,';\n validData = false;\n }\n\n if (notValidFields.length > 0){\n notValidFields = notValidFields.slice(0, -1);\n }else {\n validData = true;\n }\n validationObj.isDataValid = validData;\n validationObj.errorFields = notValidFields;\n return validationObj;\n }", "title": "" }, { "docid": "42a1fc1a89110b2e59f6d6e417c9e5ba", "score": "0.5680949", "text": "function validData() {\n\n if (customerId ==\"\") {\n document.getElementById(\"customerId\").innerHTML = \"Customer ID is missing*\";\n }else if(customerId.match(spacePattern)) {\n document.getElementById(\"customerId\").innerHTML = \"Customer ID must not contain blank spaces*\";\n }else{\n document.getElementById(\"customerId\").innerHTML = \"\";\n }\n \n if (name ==\"\") {\n document.getElementById(\"name\").innerHTML = \"Customer Name is missing*\";\n }else{\n document.getElementById(\"name\").innerHTML = \"\";\n }\n \n if (town==\"\") {\n document.getElementById(\"town\").innerHTML = \"Town Code is missing*\";\n }else if (town.length != 3) {\n document.getElementById(\"town\").innerHTML = \"Town code must be 3 characters*\";\n }else{\n document.getElementById(\"town\").innerHTML = \"\";\n }\n \n if (partNumber==\"\") {\n document.getElementById(\"partNumber\").innerHTML = \"Part Number is missing*\";\n }else{\n document.getElementById(\"partNumber\").innerHTML = \"\";\n }\n\n if (description==\"\") {\n document.getElementById(\"description\").innerHTML = \" Description is missing*\";\n }else{\n document.getElementById(\"description\").innerHTML = \"\";\n }\n\n if (isNaN(pricePerPart) || pricePerPart <= 0) {\n document.getElementById(\"pricePerPart\").innerHTML = \"Price is missing*\"; \n }else{\n document.getElementById(\"pricePerPart\").innerHTML = \"\";\n }\n\n if (numPattern.test(quantity) || quantity <= 0) {\n document.getElementById(\"quantity\").innerHTML = \"Quantity is missing*\";\n }else{\n document.getElementById(\"quantity\").innerHTML = \"\";\n } \n return salesTax(cost);\n }", "title": "" }, { "docid": "c6e90c98c3fd0c68776f3045998b85f7", "score": "0.56761676", "text": "function additionalValidations(){\n\t\n\tif($(\"#WorkPhone\").val() == $(\"#PrimaryPhone\").val()){\n\t\t$(\"#PrimaryPhone\").addClass(\"verror\");\n\t\t$(\"#WorkPhone\").addClass(\"verror\");\n\t\tvfields[71] = false;\t\n\t}else{\n\t\t$(\"#PrimaryPhone\").removeClass(\"verror\");\n\t\t$(\"#WorkPhone\").removeClass(\"verror\");\n\t\tvfields[71] = true;\t\t\n\t}\n}", "title": "" }, { "docid": "c8570a1ad65cd7d6f331451499da0ce0", "score": "0.5675653", "text": "function validateBillingForm()\n{\n\tvar r1 = validateAccordianField('bill_fname','err_bill_fname');\n\tvar r2 = validateAccordianField('bill_lname','err_bill_lname');\n\tvalidateEmail('bill_email');\n\tvar r3 = checkResultEmail('err_bill_email');\n\tvar r4 = validateAccordianField('bill_addr1','err_bill_addr1');\n\tvar r5 = validateAccordianField('bill_addr2','err_bill_addr2');\n\tvar r6 = validateAccordianField('bill_city','err_bill_city');\n\tvar r7 = validateAccordianField('bill_zip','err_bill_zip');\n\tvar r8 = validateAccordianField('bill_phone','err_bill_phone');\n\tvar r9 = validateAccordianField('bill_state','err_bill_state');\n\tvar r10 = validateAccordianField('bill_country','err_bill_country');\n\t\n\tif(r1 == 0 || r2 == 0 || r3 == 0 || r4 == 0 || r5 == 0 || r6 == 0 || r7 == 0 || r8 == 0 || r9 == 0 || r10 == 0)\n\t{\n\t\treturn 0;\n\t}\n\telse\n\t{\n\t\treturn 1;\n\t}\n}", "title": "" }, { "docid": "8dce509529d18aea1b63a2ee7bf84019", "score": "0.5658066", "text": "function formCheck(){\n clearErr();\n FldAlertCID569(\"0A0001F003A\", false);\n FldAlertCID570(\"0A0001F002A\", false);\n FldAlertCID571(\"0A0001D004A\", false);\n FldAlertCID573(\"0A0001C005A\", false);\n FldAlertCID574(\"0A0001C004A\", false);\n FldAlertCID577(\"0A0001E007A\", false);\n FldAlertCID582(\"0A0001E013A\", false);\n FldAlertCID587(\"0A0001C011A\", false);\n FldAlertCID588(\"0A0001C011A\", false);\n FldAlertCID641(\"0CXXXXB0001BA\", false);\n FldAlertCID646(\"0CXXXXB0001BA\", false);\n FldAlertCID647(\"0CXXXXB0001BA\", false);\n FldAlertCID648(\"0CXXXXB0001BA\", false);\n FldAlertCID649(\"0CXXXXB0001BA\", false);\n FldAlertCID650(\"0CXXXXB0003BA\", false);\n FldAlertCID655(\"0CXXXXB0003BA\", false);\n FldAlertCID656(\"0CXXXXB0003BA\", false);\n FldAlertCID657(\"0CXXXXB0003BA\", false);\n FldAlertCID658(\"0CXXXXB0003BA\", false);\n FldAlertCID659(\"0CXXXXB0005BA\", false);\n FldAlertCID664(\"0CXXXXB0005BA\", false);\n FldAlertCID665(\"0CXXXXB0005BA\", false);\n FldAlertCID666(\"0CXXXXB0005BA\", false);\n FldAlertCID667(\"0CXXXXB0005BA\", false);\n FldAlertCID668(\"0CXXXXB0007BA\", false);\n FldAlertCID673(\"0CXXXXB0007BA\", false);\n FldAlertCID674(\"0CXXXXB0007BA\", false);\n FldAlertCID675(\"0CXXXXB0007BA\", false);\n FldAlertCID676(\"0CXXXXB0007BA\", false);\n FldAlertCID677(\"0CXXXXB0009BA\", false);\n FldAlertCID682(\"0CXXXXB0009BA\", false);\n FldAlertCID683(\"0CXXXXB0009BA\", false);\n FldAlertCID684(\"0CXXXXB0009BA\", false);\n FldAlertCID685(\"0CXXXXB0009BA\", false);\n FldAlertCID686(\"0CXXXXB0001CA\", false);\n FldAlertCID687(\"0CXXXXB0001CA\", false);\n FldAlertCID688(\"0CXXXXB0003CA\", false);\n FldAlertCID689(\"0CXXXXB0003CA\", false);\n FldAlertCID690(\"0CXXXXB0005CA\", false);\n FldAlertCID691(\"0CXXXXB0005CA\", false);\n FldAlertCID692(\"0CXXXXB0007CA\", false);\n FldAlertCID693(\"0CXXXXB0007CA\", false);\n FldAlertCID694(\"0CXXXXB0009CA\", false);\n FldAlertCID695(\"0CXXXXB0009CA\", false);\n FldAlertCID696(\"0CXXXXB0002BA\", false);\n FldAlertCID701(\"0CXXXXB0002BA\", false);\n FldAlertCID702(\"0CXXXXB0002BA\", false);\n FldAlertCID703(\"0CXXXXB0002BA\", false);\n FldAlertCID704(\"0CXXXXB0002BA\", false);\n FldAlertCID705(\"0CXXXXB0006BA\", false);\n FldAlertCID710(\"0CXXXXB0006BA\", false);\n FldAlertCID711(\"0CXXXXB0006BA\", false);\n FldAlertCID712(\"0CXXXXB0006BA\", false);\n FldAlertCID713(\"0CXXXXB0006BA\", false);\n FldAlertCID714(\"0CXXXXB0010BA\", false);\n FldAlertCID719(\"0CXXXXB0010BA\", false);\n FldAlertCID720(\"0CXXXXB0010BA\", false);\n FldAlertCID721(\"0CXXXXB0010BA\", false);\n FldAlertCID722(\"0CXXXXB0010BA\", false);\n FldAlertCID723(\"0CXXXXB0002CA\", false);\n FldAlertCID724(\"0CXXXXB0002CA\", false);\n FldAlertCID725(\"0CXXXXB0006CA\", false);\n FldAlertCID726(\"0CXXXXB0006CA\", false);\n FldAlertCID727(\"0CXXXXB0010CA\", false);\n FldAlertCID728(\"0CXXXXB0010CA\", false);\n FldAlertCID729(\"0CXXXXB0004BA\", false);\n FldAlertCID734(\"0CXXXXB0004BA\", false);\n FldAlertCID735(\"0CXXXXB0004BA\", false);\n FldAlertCID736(\"0CXXXXB0004BA\", false);\n FldAlertCID737(\"0CXXXXB0004BA\", false);\n FldAlertCID738(\"0CXXXXB0004CA\", false);\n FldAlertCID739(\"0CXXXXB0004CA\", false);\n FldAlertCID740(\"0CXXXXB0008BA\", false);\n FldAlertCID745(\"0CXXXXB0008BA\", false);\n FldAlertCID746(\"0CXXXXB0008BA\", false);\n FldAlertCID747(\"0CXXXXB0008BA\", false);\n FldAlertCID748(\"0CXXXXB0008BA\", false);\n FldAlertCID749(\"0CXXXXB0008CA\", false);\n FldAlertCID750(\"0CXXXXB0008CA\", false);\n FldAlertCID751(\"0CXXXXB0011BA\", false);\n FldAlertCID756(\"0CXXXXB0011BA\", false);\n FldAlertCID757(\"0CXXXXB0011BA\", false);\n FldAlertCID758(\"0CXXXXB0011BA\", false);\n FldAlertCID759(\"0CXXXXB0011BA\", false);\n FldAlertCID760(\"0CXXXXB0012BA\", false);\n FldAlertCID765(\"0CXXXXB0012BA\", false);\n FldAlertCID766(\"0CXXXXB0012BA\", false);\n FldAlertCID767(\"0CXXXXB0012BA\", false);\n FldAlertCID768(\"0CXXXXB0012BA\", false);\n FldAlertCID770(\"0CXXXXB0001AA\", false);\n FldAlertCID771(\"0CXXXXB0001AA\", false);\n FldAlertCID772(\"0CXXXXB0001AA\", false);\n FldAlertCID774(\"0CXXXXB0002AA\", false);\n FldAlertCID775(\"0CXXXXB0002AA\", false);\n FldAlertCID776(\"0CXXXXB0002AA\", false);\n FldAlertCID778(\"0CXXXXB0003AA\", false);\n FldAlertCID779(\"0CXXXXB0003AA\", false);\n FldAlertCID780(\"0CXXXXB0003AA\", false);\n FldAlertCID782(\"0CXXXXB0004AA\", false);\n FldAlertCID783(\"0CXXXXB0004AA\", false);\n FldAlertCID784(\"0CXXXXB0004AA\", false);\n FldAlertCID786(\"0CXXXXB0005AA\", false);\n FldAlertCID787(\"0CXXXXB0005AA\", false);\n FldAlertCID788(\"0CXXXXB0005AA\", false);\n FldAlertCID790(\"0CXXXXB0006AA\", false);\n FldAlertCID791(\"0CXXXXB0006AA\", false);\n FldAlertCID792(\"0CXXXXB0006AA\", false);\n FldAlertCID794(\"0CXXXXB0007AA\", false);\n FldAlertCID795(\"0CXXXXB0007AA\", false);\n FldAlertCID796(\"0CXXXXB0007AA\", false);\n FldAlertCID798(\"0CXXXXB0008AA\", false);\n FldAlertCID799(\"0CXXXXB0008AA\", false);\n FldAlertCID800(\"0CXXXXB0008AA\", false);\n FldAlertCID802(\"0CXXXXB0009AA\", false);\n FldAlertCID803(\"0CXXXXB0009AA\", false);\n FldAlertCID804(\"0CXXXXB0009AA\", false);\n FldAlertCID806(\"0CXXXXB0010AA\", false);\n FldAlertCID807(\"0CXXXXB0010AA\", false);\n FldAlertCID808(\"0CXXXXB0010AA\", false);\n FldAlertCID810(\"0CXXXXB0011AA\", false);\n FldAlertCID811(\"0CXXXXB0011AA\", false);\n FldAlertCID812(\"0CXXXXB0011AA\", false);\n FldAlertCID814(\"0CXXXXB0012AA\", false);\n FldAlertCID815(\"0CXXXXB0012AA\", false);\n FldAlertCID816(\"0CXXXXB0012AA\", false);\n FldAlertCID822(\"0K0001C001A\", false);\n FldAlertCID900(\"0CXXXXB0001IA\", false);\n FldAlertCID901(\"0CXXXXB0001IA\", false);\n FldAlertCID902(\"0CXXXXB0001IA\", false);\n FldAlertCID903(\"0CXXXXB0001IA\", false);\n FldAlertCID904(\"0CXXXXB0001IA\", false);\n FldAlertCID905(\"0CXXXXB0001IA\", false);\n FldAlertCID906(\"0CXXXXB0001IA\", false);\n FldAlertCID907(\"0CXXXXB0001IA\", false);\n FldAlertCID908(\"0CXXXXB0002IA\", false);\n FldAlertCID909(\"0CXXXXB0002IA\", false);\n FldAlertCID910(\"0CXXXXB0002IA\", false);\n FldAlertCID911(\"0CXXXXB0002IA\", false);\n FldAlertCID912(\"0CXXXXB0002IA\", false);\n FldAlertCID913(\"0CXXXXB0002IA\", false);\n FldAlertCID914(\"0CXXXXB0002IA\", false);\n FldAlertCID915(\"0CXXXXB0002IA\", false);\n FldAlertCID916(\"0CXXXXB0003IA\", false);\n FldAlertCID917(\"0CXXXXB0003IA\", false);\n FldAlertCID918(\"0CXXXXB0003IA\", false);\n FldAlertCID919(\"0CXXXXB0003IA\", false);\n FldAlertCID920(\"0CXXXXB0003IA\", false);\n FldAlertCID921(\"0CXXXXB0003IA\", false);\n FldAlertCID922(\"0CXXXXB0003IA\", false);\n FldAlertCID923(\"0CXXXXB0003IA\", false);\n FldAlertCID924(\"0CXXXXB0004IA\", false);\n FldAlertCID925(\"0CXXXXB0004IA\", false);\n FldAlertCID926(\"0CXXXXB0004IA\", false);\n FldAlertCID927(\"0CXXXXB0004IA\", false);\n FldAlertCID928(\"0CXXXXB0004IA\", false);\n FldAlertCID929(\"0CXXXXB0004IA\", false);\n FldAlertCID930(\"0CXXXXB0004IA\", false);\n FldAlertCID931(\"0CXXXXB0004IA\", false);\n FldAlertCID932(\"0CXXXXB0005IA\", false);\n FldAlertCID933(\"0CXXXXB0005IA\", false);\n FldAlertCID934(\"0CXXXXB0005IA\", false);\n FldAlertCID935(\"0CXXXXB0005IA\", false);\n FldAlertCID936(\"0CXXXXB0005IA\", false);\n FldAlertCID937(\"0CXXXXB0005IA\", false);\n FldAlertCID938(\"0CXXXXB0005IA\", false);\n FldAlertCID939(\"0CXXXXB0005IA\", false);\n FldAlertCID940(\"0CXXXXB0006IA\", false);\n FldAlertCID941(\"0CXXXXB0006IA\", false);\n FldAlertCID942(\"0CXXXXB0006IA\", false);\n FldAlertCID943(\"0CXXXXB0006IA\", false);\n FldAlertCID944(\"0CXXXXB0006IA\", false);\n FldAlertCID945(\"0CXXXXB0006IA\", false);\n FldAlertCID946(\"0CXXXXB0006IA\", false);\n FldAlertCID947(\"0CXXXXB0006IA\", false);\n FldAlertCID948(\"0CXXXXB0007IA\", false);\n FldAlertCID949(\"0CXXXXB0007IA\", false);\n FldAlertCID950(\"0CXXXXB0007IA\", false);\n FldAlertCID951(\"0CXXXXB0007IA\", false);\n FldAlertCID952(\"0CXXXXB0007IA\", false);\n FldAlertCID953(\"0CXXXXB0007IA\", false);\n FldAlertCID954(\"0CXXXXB0007IA\", false);\n FldAlertCID955(\"0CXXXXB0007IA\", false);\n FldAlertCID956(\"0CXXXXB0008IA\", false);\n FldAlertCID957(\"0CXXXXB0008IA\", false);\n FldAlertCID958(\"0CXXXXB0008IA\", false);\n FldAlertCID959(\"0CXXXXB0008IA\", false);\n FldAlertCID960(\"0CXXXXB0008IA\", false);\n FldAlertCID961(\"0CXXXXB0008IA\", false);\n FldAlertCID962(\"0CXXXXB0008IA\", false);\n FldAlertCID963(\"0CXXXXB0008IA\", false);\n FldAlertCID964(\"0CXXXXB0009IA\", false);\n FldAlertCID965(\"0CXXXXB0009IA\", false);\n FldAlertCID966(\"0CXXXXB0009IA\", false);\n FldAlertCID967(\"0CXXXXB0009IA\", false);\n FldAlertCID968(\"0CXXXXB0009IA\", false);\n FldAlertCID969(\"0CXXXXB0009IA\", false);\n FldAlertCID970(\"0CXXXXB0009IA\", false);\n FldAlertCID971(\"0CXXXXB0009IA\", false);\n FldAlertCID972(\"0CXXXXB0010IA\", false);\n FldAlertCID973(\"0CXXXXB0010IA\", false);\n FldAlertCID974(\"0CXXXXB0010IA\", false);\n FldAlertCID975(\"0CXXXXB0010IA\", false);\n FldAlertCID976(\"0CXXXXB0010IA\", false);\n FldAlertCID977(\"0CXXXXB0010IA\", false);\n FldAlertCID978(\"0CXXXXB0010IA\", false);\n FldAlertCID979(\"0CXXXXB0010IA\", false);\n FldAlertCID980(\"0CXXXXB0011IA\", false);\n FldAlertCID981(\"0CXXXXB0011IA\", false);\n FldAlertCID982(\"0CXXXXB0011IA\", false);\n FldAlertCID983(\"0CXXXXB0011IA\", false);\n FldAlertCID984(\"0CXXXXB0011IA\", false);\n FldAlertCID985(\"0CXXXXB0011IA\", false);\n FldAlertCID986(\"0CXXXXB0011IA\", false);\n FldAlertCID987(\"0CXXXXB0011IA\", false);\n FldAlertCID988(\"0CXXXXB0012IA\", false);\n FldAlertCID989(\"0CXXXXB0012IA\", false);\n FldAlertCID990(\"0CXXXXB0012IA\", false);\n FldAlertCID991(\"0CXXXXB0012IA\", false);\n FldAlertCID992(\"0CXXXXB0012IA\", false);\n FldAlertCID993(\"0CXXXXB0012IA\", false);\n FldAlertCID994(\"0CXXXXB0012IA\", false);\n FldAlertCID995(\"0CXXXXB0012IA\", false);\n FldAlertCID996(\"0CXXXXB0011CA\", false);\n FldAlertCID997(\"0CXXXXB0012CA\", false);\n FldAlertCID998(\"0DXXXXB0001AA\", false);\n FldAlertCID999(\"0DXXXXB0002AA\", false);\n FldAlertCID1000(\"0DXXXXB0003AA\", false);\n FldAlertCID1001(\"0DXXXXB0004AA\", false);\n FldAlertCID1002(\"0DXXXXB0005AA\", false);\n FldAlertCID1003(\"0DXXXXB0006AA\", false);\n FldAlertCID1004(\"0DXXXXB0007AA\", false);\n FldAlertCID1005(\"0DXXXXB0008AA\", false);\n FldAlertCID1006(\"0DXXXXB0009AA\", false);\n FldAlertCID1007(\"0DXXXXB0010AA\", false);\n FldAlertCID1008(\"0DXXXXB0011AA\", false);\n FldAlertCID1009(\"0DXXXXB0012AA\", false);\n FldAlertCID1010(\"0DXXXXB0013AA\", false);\n FldAlertCID1011(\"0DXXXXB0014AA\", false);\n FldAlertCID1012(\"0DXXXXB0001CA\", false);\n FldAlertCID1013(\"0DXXXXB0002CA\", false);\n FldAlertCID1014(\"0DXXXXB0003CA\", false);\n FldAlertCID1015(\"0DXXXXB0004CA\", false);\n FldAlertCID1016(\"0DXXXXB0005CA\", false);\n FldAlertCID1017(\"0DXXXXB0006CA\", false);\n FldAlertCID1018(\"0DXXXXB0007CA\", false);\n FldAlertCID1019(\"0DXXXXB0008CA\", false);\n FldAlertCID1020(\"0DXXXXB0009CA\", false);\n FldAlertCID1021(\"0DXXXXB0010CA\", false);\n FldAlertCID1022(\"0DXXXXB0011CA\", false);\n FldAlertCID1023(\"0DXXXXB0012CA\", false);\n FldAlertCID1024(\"0DXXXXB0013CA\", false);\n FldAlertCID1025(\"0DXXXXB0014CA\", false);\n FldAlertCID1026(\"0FXXXXB0001AA\", false);\n FldAlertCID1027(\"0FXXXXB0002AA\", false);\n FldAlertCID1028(\"0FXXXXB0003AA\", false);\n FldAlertCID1029(\"0FXXXXB0004AA\", false);\n FldAlertCID1030(\"0FXXXXB0005AA\", false);\n FldAlertCID1031(\"0FXXXXB0006AA\", false);\n FldAlertCID1032(\"0FXXXXB0007AA\", false);\n FldAlertCID1033(\"0FXXXXB0008AA\", false);\n FldAlertCID1034(\"0FXXXXB0009AA\", false);\n FldAlertCID1035(\"0FXXXXB0010AA\", false);\n FldAlertCID1036(\"0FXXXXB0001BA\", false);\n FldAlertCID1037(\"0FXXXXB0002BA\", false);\n FldAlertCID1038(\"0FXXXXB0003BA\", false);\n FldAlertCID1039(\"0FXXXXB0004BA\", false);\n FldAlertCID1040(\"0FXXXXB0005BA\", false);\n FldAlertCID1041(\"0FXXXXB0006BA\", false);\n FldAlertCID1042(\"0FXXXXB0007BA\", false);\n FldAlertCID1043(\"0FXXXXB0008BA\", false);\n FldAlertCID1044(\"0FXXXXB0009BA\", false);\n FldAlertCID1045(\"0FXXXXB0010BA\", false);\n FldAlertCID1046(\"0GXXXXC0001AA\", false);\n FldAlertCID1047(\"0GXXXXC0002AA\", false);\n FldAlertCID1048(\"0GXXXXC0003AA\", false);\n FldAlertCID1049(\"0GXXXXC0004AA\", false);\n FldAlertCID1050(\"0GXXXXC0005AA\", false);\n FldAlertCID1051(\"0GXXXXC0006AA\", false);\n FldAlertCID1052(\"0GXXXXC0007AA\", false);\n FldAlertCID1053(\"0GXXXXC0008AA\", false);\n FldAlertCID1054(\"0GXXXXC0009AA\", false);\n FldAlertCID1055(\"0GXXXXC0010AA\", false);\n FldAlertCID1056(\"0GXXXXC0001BA\", false);\n FldAlertCID1057(\"0GXXXXC0002BA\", false);\n FldAlertCID1058(\"0GXXXXC0003BA\", false);\n FldAlertCID1059(\"0GXXXXC0004BA\", false);\n FldAlertCID1060(\"0GXXXXC0005BA\", false);\n FldAlertCID1061(\"0GXXXXC0006BA\", false);\n FldAlertCID1062(\"0GXXXXC0007BA\", false);\n FldAlertCID1063(\"0GXXXXC0008BA\", false);\n FldAlertCID1064(\"0GXXXXC0009BA\", false);\n FldAlertCID1065(\"0GXXXXC0010BA\", false);\n FldAlertCID1066(\"0HXXXXC0001DA\", false);\n FldAlertCID1067(\"0HXXXXC0002DA\", false);\n FldAlertCID1068(\"0HXXXXC0003DA\", false);\n FldAlertCID1069(\"0HXXXXC0004DA\", false);\n FldAlertCID1070(\"0HXXXXC0005DA\", false);\n FldAlertCID1071(\"0HXXXXC0006DA\", false);\n FldAlertCID1072(\"0HXXXXC0007DA\", false);\n FldAlertCID1073(\"0HXXXXC0008DA\", false);\n FldAlertCID1074(\"0HXXXXC0009DA\", false);\n FldAlertCID1075(\"0HXXXXC0010DA\", false);\n FldAlertCID1076(\"0HXXXXC0011DA\", false);\n FldAlertCID1077(\"0HXXXXC0012DA\", false);\n FldAlertCID1078(\"0HXXXXC0013DA\", false);\n FldAlertCID1079(\"0HXXXXC0014DA\", false);\n FldAlertCID1080(\"0HXXXXC0015DA\", false);\n FldAlertCID1081(\"0HXXXXC0016DA\", false);\n FldAlertCID1082(\"0HXXXXC0017DA\", false);\n FldAlertCID1083(\"0HXXXXC0018DA\", false);\n FldAlertCID1084(\"0HXXXXC0019DA\", false);\n FldAlertCID1085(\"0HXXXXC0020DA\", false);\n FldAlertCID1086(\"0HXXXXC0021DA\", false);\n FldAlertCID1087(\"0HXXXXC0022DA\", false);\n FldAlertCID1088(\"0HXXXXC0023DA\", false);\n FldAlertCID1089(\"0HXXXXC0024DA\", false);\n FldAlertCID1090(\"0HXXXXC0025DA\", false);\n FldAlertCID1091(\"0HXXXXC0026DA\", false);\n FldAlertCID1092(\"0HXXXXC0027DA\", false);\n FldAlertCID1093(\"0HXXXXC0028DA\", false);\n FldAlertCID1094(\"0HXXXXC0029DA\", false);\n FldAlertCID1095(\"0HXXXXC0030DA\", false);\n FldAlertCID1096(\"0HXXXXC0031DA\", false);\n FldAlertCID1097(\"0A0001C001A\", false);\n FldAlertCID1098(\"0A0001C002A\", false);\n FldAlertCID1099(\"0A0001C003A\", false);\n FldAlertCID1100(\"0A0001C031A\", false);\n FldAlertCID1101(\"0A0001F003A\", false);\n FldAlertCID1102(\"0A0001C032A\", false);\n FldAlertCID1103(\"0A0001F001A\", false);\n FldAlertCID1104(\"0A0001C007A\", false);\n FldAlertCID1105(\"0A0001C008A\", false);\n FldAlertCID1106(\"0A0001C009A\", false);\n FldAlertCID1107(\"0A0001F002A\", false);\n FldAlertCID1108(\"0A0001C013A\", false);\n FldAlertCID1109(\"0B0001B005A\", false);\n FldAlertCID1110(\"0CXXXXB003A\", false);\n FldAlertCID1111(\"0FXXXXB002A\", false);\n FldAlertCID1112(\"0HXXXXC003A\", false);\n FldAlertCID1113(\"0IXXXXB004A\", false);\n FldAlertCID1114(\"0EXXXXB002A\", false);\n FldAlertCID1115(\"0DXXXXB002A\", false);\n FldAlertCID1116(\"0GXXXXB003A\", false);\n FldAlertCID1117(\"0JXXXXB003A\", false);\n if(!CID1()) {\n showErr(null, '[Nyomtatvány] Bevallás időszakának kezdő dátuma nem lehet #13nagyobb az időszak vége dátumnál! (Hibakód=<330/>)', false);\n }\n if(!CID2()) {\n showErr(null, '[Nyomtatvány] A keltezés dátuma nem lehet kisebb, mint a #13bevallás időszakának a vége! (Hibakód=<331/>)', false);\n }\n if(!CID3()) {\n showErr(null, '[Nyomtatvány] Vagy az adószámot, vagy az adóazonosítót meg #13kell adni! (Hibakód=<332/>)', false);\n }\n if(!CID4()) {\n showErr(null, '[Nyomtatvány] Adószámot, vagy adóazonosítót meg kell adni! #13(Hibakód=<339/>)', false);\n }\n if(!CID5()) {\n showErr(null, '[Nyomtatvány] Kitöltötte a KNY lapon az intézet kódját, ki #13kell tölteni a többi adatot is! (Hibakód=<532/>)', false);\n }\n if(!CID6()) {\n showErr(null, '[Nyomtatvány] Kitöltötte a KNY lapon az intézet kódját, ki #13kell tölteni a többi adatot is! (Hibakód=<532/>)', false);\n }\n if(!CID7()) {\n showErr(null, '[Nyomtatvány] Kitöltötte a KNY lapon az intézet kódját, ki #13kell tölteni a többi adatot is! (Hibakód=<532/>)', false);\n }\n if(!CID8()) {\n showErr(null, '[Nyomtatvány] Kitöltötte a KNY lapon az intézet kódját, ki #13kell tölteni a többi adatot is! (Hibakód=<532/>)', false);\n }\n if(!CID9()) {\n showErr(null, '[Nyomtatvány] Kitöltötte a KNY lapon az intézet kódját, ki #13kell tölteni a többi adatot is! (Hibakód=<532/>)', false);\n }\n if(!CID10()) {\n showErr(null, '[Nyomtatvány] Kitöltötte a KNY lapon az intézet kódját, ki #13kell tölteni a többi adatot is! (Hibakód=<532/>)', false);\n }\n if(!CID11()) {\n showErr(null, '[Nyomtatvány] Kitöltötte a KNY lapon az intézet kódját, ki #13kell tölteni a többi adatot is! (Hibakód=<532/>)', false);\n }\n if(!CID12()) {\n showErr(null, '[Nyomtatvány] Kitöltötte a KNY lapon az intézet kódját, ki #13kell tölteni a többi adatot is! (Hibakód=<532/>)', false);\n }\n if(!CID13()) {\n showErr(null, '[Nyomtatvány] Kitöltötte a KNY lapon az intézet kódját, ki #13kell tölteni a többi adatot is! (Hibakód=<532/>)', false);\n }\n if(!CID14()) {\n showErr(null, '[Nyomtatvány] Kitöltötte a KNY lapon az intézet kódját, ki #13kell tölteni a többi adatot is! (Hibakód=<532/>)', false);\n }\n if(!CID15()) {\n showErr(null, '[Nyomtatvány] Kitöltötte a KNY lapon az intézet kódját, ki #13kell tölteni a többi adatot is! (Hibakód=<532/>)', false);\n }\n if(!CID16()) {\n showErr(null, '[Nyomtatvány] Kitöltötte a KNY lapon a Számlavezető #13pénzintézet nevét, ki kell tölteni a többi adatot is! #13(Hibakód=<533/>)', false);\n }\n if(!CID17()) {\n showErr(null, '[Nyomtatvány] Kitöltötte a KNY lapon a Számlavezető #13pénzintézet nevét, ki kell tölteni a többi adatot is! #13(Hibakód=<533/>)', false);\n }\n if(!CID18()) {\n showErr(null, '[Nyomtatvány] Kitöltötte a KNY lapon a Számlavezető #13pénzintézet nevét, ki kell tölteni a többi adatot is! #13(Hibakód=<533/>)', false);\n }\n if(!CID19()) {\n showErr(null, '[Nyomtatvány] Kitöltötte a KNY lapon a Számlavezető #13pénzintézet nevét, ki kell tölteni a többi adatot is! #13(Hibakód=<533/>)', false);\n }\n if(!CID20()) {\n showErr(null, '[Nyomtatvány] Kitöltötte a KNY lapon a Számlavezető #13pénzintézet nevét, ki kell tölteni a többi adatot is! #13(Hibakód=<533/>)', false);\n }\n if(!CID21()) {\n showErr(null, '[Nyomtatvány] Kitöltötte a KNY lapon a Számlavezető #13pénzintézet nevét, ki kell tölteni a többi adatot is! #13(Hibakód=<533/>)', false);\n }\n if(!CID22()) {\n showErr(null, '[Nyomtatvány] Kitöltötte a KNY lapon a Számlavezető #13pénzintézet nevét, ki kell tölteni a többi adatot is! #13(Hibakód=<533/>)', false);\n }\n if(!CID23()) {\n showErr(null, '[Nyomtatvány] Kitöltötte a KNY lapon a Számlavezető #13pénzintézet nevét, ki kell tölteni a többi adatot is! #13(Hibakód=<533/>)', false);\n }\n if(!CID24()) {\n showErr(null, '[Nyomtatvány] Kitöltötte a KNY lapon a Számlavezető #13pénzintézet nevét, ki kell tölteni a többi adatot is! #13(Hibakód=<533/>)', false);\n }\n if(!CID25()) {\n showErr(null, '[Nyomtatvány] Kitöltötte a KNY lapon a Számlavezető #13pénzintézet nevét, ki kell tölteni a többi adatot is! #13(Hibakód=<533/>)', false);\n }\n if(!CID26()) {\n showErr(null, '[Nyomtatvány] Kitöltötte a KNY lapon a Számlavezető #13pénzintézet nevét, ki kell tölteni a többi adatot is! #13(Hibakód=<533/>)', false);\n }\n if(!CID27()) {\n showErr(null, '[Nyomtatvány] Kitöltötte a KNY lapon a forint összeget, ki #13kell tölteni a többi adatot is! (Hibakód=<534/>)', false);\n }\n if(!CID28()) {\n showErr(null, '[Nyomtatvány] Kitöltötte a KNY lapon a forint összeget, ki #13kell tölteni a többi adatot is! (Hibakód=<534/>)', false);\n }\n if(!CID29()) {\n showErr(null, '[Nyomtatvány] Kitöltötte a KNY lapon a forint összeget, ki #13kell tölteni a többi adatot is! (Hibakód=<534/>)', false);\n }\n if(!CID30()) {\n showErr(null, '[Nyomtatvány] Kitöltötte a KNY lapon a forint összeget, ki #13kell tölteni a többi adatot is! (Hibakód=<534/>)', false);\n }\n if(!CID31()) {\n showErr(null, '[Nyomtatvány] Kitöltötte a KNY lapon a forint összeget, ki #13kell tölteni a többi adatot is! (Hibakód=<534/>)', false);\n }\n if(!CID32()) {\n showErr(null, '[Nyomtatvány] Kitöltötte a KNY lapon a forint összeget, ki #13kell tölteni a többi adatot is! (Hibakód=<534/>)', false);\n }\n if(!CID33()) {\n showErr(null, '[Nyomtatvány] Kitöltötte a KNY lapon a forint összeget, ki #13kell tölteni a többi adatot is! (Hibakód=<534/>)', false);\n }\n if(!CID34()) {\n showErr(null, '[Nyomtatvány] Kitöltötte a KNY lapon a forint összeget, ki #13kell tölteni a többi adatot is! (Hibakód=<534/>)', false);\n }\n if(!CID35()) {\n showErr(null, '[Nyomtatvány] Kitöltötte a KNY lapon a forint összeget, ki #13kell tölteni a többi adatot is! (Hibakód=<534/>)', false);\n }\n if(!CID36()) {\n showErr(null, '[Nyomtatvány] Kitöltötte a KNY lapon a forint összeget, ki #13kell tölteni a többi adatot is! (Hibakód=<534/>)', false);\n }\n if(!CID37()) {\n showErr(null, '[Nyomtatvány] Kitöltötte a KNY lapon a forint összeget, ki #13kell tölteni a többi adatot is! (Hibakód=<534/>)', false);\n }\n if(!CID38()) {\n showErr(null, '[Nyomtatvány] Kitöltötte a KNY lapon a bankszámla #13pénzforgalmi jelzőszámát, ki kell tölteni a többi adatot #13is! (Hibakód=<535/>)', false);\n }\n if(!CID39()) {\n showErr(null, '[Nyomtatvány] Kitöltötte a KNY lapon a bankszámla #13pénzforgalmi jelzőszámát, ki kell tölteni a többi adatot #13is! (Hibakód=<535/>)', false);\n }\n if(!CID40()) {\n showErr(null, '[Nyomtatvány] Kitöltötte a KNY lapon a bankszámla #13pénzforgalmi jelzőszámát, ki kell tölteni a többi adatot #13is! (Hibakód=<535/>)', false);\n }\n if(!CID41()) {\n showErr(null, '[Nyomtatvány] Kitöltötte a KNY lapon a bankszámla #13pénzforgalmi jelzőszámát, ki kell tölteni a többi adatot #13is! (Hibakód=<535/>)', false);\n }\n if(!CID42()) {\n showErr(null, '[Nyomtatvány] Kitöltötte a KNY lapon a bankszámla #13pénzforgalmi jelzőszámát, ki kell tölteni a többi adatot #13is! (Hibakód=<535/>)', false);\n }\n if(!CID43()) {\n showErr(null, '[Nyomtatvány] Kitöltötte a KNY lapon a bankszámla #13pénzforgalmi jelzőszámát, ki kell tölteni a többi adatot #13is! (Hibakód=<535/>)', false);\n }\n if(!CID44()) {\n showErr(null, '[Nyomtatvány] Kitöltötte a KNY lapon a bankszámla #13pénzforgalmi jelzőszámát, ki kell tölteni a többi adatot #13is! (Hibakód=<535/>)', false);\n }\n if(!CID45()) {\n showErr(null, '[Nyomtatvány] Kitöltötte a KNY lapon a bankszámla #13pénzforgalmi jelzőszámát, ki kell tölteni a többi adatot #13is! (Hibakód=<535/>)', false);\n }\n if(!CID46()) {\n showErr(null, '[Nyomtatvány] Kitöltötte a KNY lapon a bankszámla #13pénzforgalmi jelzőszámát, ki kell tölteni a többi adatot #13is! (Hibakód=<535/>)', false);\n }\n if(!CID47()) {\n showErr(null, '[Nyomtatvány] Kitöltötte a KNY lapon a bankszámla #13pénzforgalmi jelzőszámát, ki kell tölteni a többi adatot #13is! (Hibakód=<535/>)', false);\n }\n if(!CID48()) {\n showErr(null, '[Nyomtatvány] Kitöltötte a KNY lapon a bankszámla #13pénzforgalmi jelzőszámát, ki kell tölteni a többi adatot #13is! (Hibakód=<535/>)', false);\n }\n if(!CID51()) {\n showErr(null, '[Nyomtatvány] A Bevallás időszaka ki lett kitöltve. Ki kell #13tölteni a Bevallás kezdő és befejező dátumát is! #13(Hibakód=<1304/>)', false);\n }\n if(!CID52()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( ÁTV lapon hiányos a kitöltés ) #13(Hibakód=<1070/>)', false);\n }\n if(!CID53()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( ÁTV lapon hiányos a kitöltés ) #13(Hibakód=<1070/>)', false);\n }\n if(!CID54()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( ÁTV lapon hiányos a kitöltés ) #13(Hibakód=<1070/>)', false);\n }\n if(!CID55()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( ÁTV lapon hiányos a kitöltés ) #13(Hibakód=<1070/>)', false);\n }\n if(!CID56()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( ÁTV lapon hiányos a kitöltés ) #13(Hibakód=<1070/>)', false);\n }\n if(!CID57()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( ÁTV lapon hiányos a kitöltés ) #13(Hibakód=<1070/>)', false);\n }\n if(!CID58()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( ÁTV lapon hiányos a kitöltés ) #13(Hibakód=<1070/>)', false);\n }\n if(!CID59()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( ÁTV lapon hiányos a kitöltés ) #13(Hibakód=<1070/>)', false);\n }\n if(!CID60()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( ÁTV lapon hiányos a kitöltés ) #13(Hibakód=<1070/>)', false);\n }\n if(!CID61()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( ÁTV lapon hiányos a kitöltés ) #13(Hibakód=<1070/>)', false);\n }\n if(!CID62()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( ÁTV lapon hiányos a kitöltés ) #13(Hibakód=<1071/>)', false);\n }\n if(!CID63()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( ÁTV lapon hiányos a kitöltés ) #13(Hibakód=<1071/>)', false);\n }\n if(!CID64()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( ÁTV lapon hiányos a kitöltés ) #13(Hibakód=<1071/>)', false);\n }\n if(!CID65()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( ÁTV lapon hiányos a kitöltés ) #13(Hibakód=<1071/>)', false);\n }\n if(!CID66()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( ÁTV lapon hiányos a kitöltés ) #13(Hibakód=<1071/>)', false);\n }\n if(!CID67()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( ÁTV lapon hiányos a kitöltés ) #13(Hibakód=<1071/>)', false);\n }\n if(!CID68()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( ÁTV lapon hiányos a kitöltés ) #13(Hibakód=<1071/>)', false);\n }\n if(!CID69()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( ÁTV lapon hiányos a kitöltés ) #13(Hibakód=<1071/>)', false);\n }\n if(!CID70()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( ÁTV lapon hiányos a kitöltés ) #13(Hibakód=<1071/>)', false);\n }\n if(!CID71()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( ÁTV lapon hiányos a kitöltés ) #13(Hibakód=<1071/>)', false);\n }\n if(!CID72()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( ÁTV lapon hiányos a kitöltés ) #13(Hibakód=<1072/>)', false);\n }\n if(!CID73()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( ÁTV lapon hiányos a kitöltés ) #13(Hibakód=<1072/>)', false);\n }\n if(!CID74()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( ÁTV lapon hiányos a kitöltés ) #13(Hibakód=<1072/>)', false);\n }\n if(!CID75()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( ÁTV lapon hiányos a kitöltés ) #13(Hibakód=<1072/>)', false);\n }\n if(!CID76()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( ÁTV lapon hiányos a kitöltés ) #13(Hibakód=<1072/>)', false);\n }\n if(!CID77()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( ÁTV lapon hiányos a kitöltés ) #13(Hibakód=<1072/>)', false);\n }\n if(!CID78()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( ÁTV lapon hiányos a kitöltés ) #13(Hibakód=<1072/>)', false);\n }\n if(!CID79()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( ÁTV lapon hiányos a kitöltés ) #13(Hibakód=<1072/>)', false);\n }\n if(!CID80()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( ÁTV lapon hiányos a kitöltés ) #13(Hibakód=<1072/>)', false);\n }\n if(!CID81()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( ÁTV lapon hiányos a kitöltés ) #13(Hibakód=<1072/>)', false);\n }\n if(!CID82()) {\n showErr(null, '[Nyomtatvány] A kötelezett alapadatai nem egyezhetnek meg a #13képviselő alapadataival (VPID)! (Hibakód=<1086/>)', false);\n }\n if(!CID83()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( BEV lapon hiányos a kitöltés ) #13(Hibakód=<1064/>)', false);\n }\n if(!CID84()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( BEV lapon hiányos a kitöltés ) #13(Hibakód=<1064/>)', false);\n }\n if(!CID85()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( BEV lapon hiányos a kitöltés ) #13(Hibakód=<1064/>)', false);\n }\n if(!CID86()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( BEV lapon hiányos a kitöltés ) #13(Hibakód=<1064/>)', false);\n }\n if(!CID87()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( BEV lapon hiányos a kitöltés ) #13(Hibakód=<1064/>)', false);\n }\n if(!CID88()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( BEV lapon hiányos a kitöltés ) #13(Hibakód=<1064/>)', false);\n }\n if(!CID89()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( BEV lapon hiányos a kitöltés ) #13(Hibakód=<1064/>)', false);\n }\n if(!CID90()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( BEV lapon hiányos a kitöltés ) #13(Hibakód=<1064/>)', false);\n }\n if(!CID91()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( BEV lapon hiányos a kitöltés ) #13(Hibakód=<1064/>)', false);\n }\n if(!CID92()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( BEV lapon hiányos a kitöltés ) #13(Hibakód=<1064/>)', false);\n }\n if(!CID93()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( BEV lapon hiányos a kitöltés ) #13(Hibakód=<1064/>)', false);\n }\n if(!CID94()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( BEV lapon hiányos a kitöltés ) #13(Hibakód=<1064/>)', false);\n }\n if(!CID95()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( BEV lapon hiányos a kitöltés ) #13(Hibakód=<1065/>)', false);\n }\n if(!CID96()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( BEV lapon hiányos a kitöltés ) #13(Hibakód=<1065/>)', false);\n }\n if(!CID97()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( BEV lapon hiányos a kitöltés ) #13(Hibakód=<1065/>)', false);\n }\n if(!CID98()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( BEV lapon hiányos a kitöltés ) #13(Hibakód=<1065/>)', false);\n }\n if(!CID99()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( BEV lapon hiányos a kitöltés ) #13(Hibakód=<1065/>)', false);\n }\n if(!CID100()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( BEV lapon hiányos a kitöltés ) #13(Hibakód=<1065/>)', false);\n }\n if(!CID101()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( BEV lapon hiányos a kitöltés ) #13(Hibakód=<1065/>)', false);\n }\n if(!CID102()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( BEV lapon hiányos a kitöltés ) #13(Hibakód=<1065/>)', false);\n }\n if(!CID103()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( BEV lapon hiányos a kitöltés ) #13(Hibakód=<1065/>)', false);\n }\n if(!CID104()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( BEV lapon hiányos a kitöltés ) #13(Hibakód=<1065/>)', false);\n }\n if(!CID105()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( BEV lapon hiányos a kitöltés ) #13(Hibakód=<1065/>)', false);\n }\n if(!CID106()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( BEV lapon hiányos a kitöltés ) #13(Hibakód=<1065/>)', false);\n }\n if(!CID107()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( BEV lapon hiányos a kitöltés ) #13(Hibakód=<1066/>)', false);\n }\n if(!CID108()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( BEV lapon hiányos a kitöltés ) #13(Hibakód=<1066/>)', false);\n }\n if(!CID109()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( BEV lapon hiányos a kitöltés ) #13(Hibakód=<1066/>)', false);\n }\n if(!CID110()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( BEV lapon hiányos a kitöltés ) #13(Hibakód=<1066/>)', false);\n }\n if(!CID111()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( BEV lapon hiányos a kitöltés ) #13(Hibakód=<1066/>)', false);\n }\n if(!CID112()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( BEV lapon hiányos a kitöltés ) #13(Hibakód=<1066/>)', false);\n }\n if(!CID113()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( BEV lapon hiányos a kitöltés ) #13(Hibakód=<1066/>)', false);\n }\n if(!CID114()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( BEV lapon hiányos a kitöltés ) #13(Hibakód=<1066/>)', false);\n }\n if(!CID115()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( BEV lapon hiányos a kitöltés ) #13(Hibakód=<1066/>)', false);\n }\n if(!CID116()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( BEV lapon hiányos a kitöltés ) #13(Hibakód=<1066/>)', false);\n }\n if(!CID117()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( BEV lapon hiányos a kitöltés ) #13(Hibakód=<1066/>)', false);\n }\n if(!CID118()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( BEV lapon hiányos a kitöltés ) #13(Hibakód=<1066/>)', false);\n }\n if(!CID119()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( VIS lapon hiányos a kitöltés ) #13(Hibakód=<1277/>)', false);\n }\n if(!CID120()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( VIS lapon hiányos a kitöltés ) #13(Hibakód=<1277/>)', false);\n }\n if(!CID121()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( VIS lapon hiányos a kitöltés ) #13(Hibakód=<1277/>)', false);\n }\n if(!CID122()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( VIS lapon hiányos a kitöltés ) #13(Hibakód=<1277/>)', false);\n }\n if(!CID123()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( VIS lapon hiányos a kitöltés ) #13(Hibakód=<1277/>)', false);\n }\n if(!CID124()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( VIS lapon hiányos a kitöltés ) #13(Hibakód=<1277/>)', false);\n }\n if(!CID125()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( VIS lapon hiányos a kitöltés ) #13(Hibakód=<1277/>)', false);\n }\n if(!CID126()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( VIS lapon hiányos a kitöltés ) #13(Hibakód=<1277/>)', false);\n }\n if(!CID127()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( VIS lapon hiányos a kitöltés ) #13(Hibakód=<1277/>)', false);\n }\n if(!CID128()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( VIS lapon hiányos a kitöltés ) #13(Hibakód=<1277/>)', false);\n }\n if(!CID129()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( VIS lapon hiányos a kitöltés ) #13(Hibakód=<1277/>)', false);\n }\n if(!CID130()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( VIS lapon hiányos a kitöltés ) #13(Hibakód=<1277/>)', false);\n }\n if(!CID131()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( VIS lapon hiányos a kitöltés ) #13(Hibakód=<1277/>)', false);\n }\n if(!CID132()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( VIS lapon hiányos a kitöltés ) #13(Hibakód=<1277/>)', false);\n }\n if(!CID133()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( VIS lapon hiányos a kitöltés ) #13(Hibakód=<1278/>)', false);\n }\n if(!CID134()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( VIS lapon hiányos a kitöltés ) #13(Hibakód=<1278/>)', false);\n }\n if(!CID135()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( VIS lapon hiányos a kitöltés ) #13(Hibakód=<1278/>)', false);\n }\n if(!CID136()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( VIS lapon hiányos a kitöltés ) #13(Hibakód=<1278/>)', false);\n }\n if(!CID137()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( VIS lapon hiányos a kitöltés ) #13(Hibakód=<1278/>)', false);\n }\n if(!CID138()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( VIS lapon hiányos a kitöltés ) #13(Hibakód=<1278/>)', false);\n }\n if(!CID139()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( VIS lapon hiányos a kitöltés ) #13(Hibakód=<1278/>)', false);\n }\n if(!CID140()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( VIS lapon hiányos a kitöltés ) #13(Hibakód=<1278/>)', false);\n }\n if(!CID141()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( VIS lapon hiányos a kitöltés ) #13(Hibakód=<1278/>)', false);\n }\n if(!CID142()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( VIS lapon hiányos a kitöltés ) #13(Hibakód=<1278/>)', false);\n }\n if(!CID143()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( VIS lapon hiányos a kitöltés ) #13(Hibakód=<1278/>)', false);\n }\n if(!CID144()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( VIS lapon hiányos a kitöltés ) #13(Hibakód=<1278/>)', false);\n }\n if(!CID145()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( VIS lapon hiányos a kitöltés ) #13(Hibakód=<1278/>)', false);\n }\n if(!CID146()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( VIS lapon hiányos a kitöltés ) #13(Hibakód=<1278/>)', false);\n }\n if(!CID147()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( VIS lapon hiányos a kitöltés ) #13(Hibakód=<1279/>)', false);\n }\n if(!CID148()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( VIS lapon hiányos a kitöltés ) #13(Hibakód=<1279/>)', false);\n }\n if(!CID149()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( VIS lapon hiányos a kitöltés ) #13(Hibakód=<1279/>)', false);\n }\n if(!CID150()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( VIS lapon hiányos a kitöltés ) #13(Hibakód=<1279/>)', false);\n }\n if(!CID151()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( VIS lapon hiányos a kitöltés ) #13(Hibakód=<1279/>)', false);\n }\n if(!CID152()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( VIS lapon hiányos a kitöltés ) #13(Hibakód=<1279/>)', false);\n }\n if(!CID153()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( VIS lapon hiányos a kitöltés ) #13(Hibakód=<1279/>)', false);\n }\n if(!CID154()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( VIS lapon hiányos a kitöltés ) #13(Hibakód=<1279/>)', false);\n }\n if(!CID155()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( VIS lapon hiányos a kitöltés ) #13(Hibakód=<1279/>)', false);\n }\n if(!CID156()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( VIS lapon hiányos a kitöltés ) #13(Hibakód=<1279/>)', false);\n }\n if(!CID157()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( VIS lapon hiányos a kitöltés ) #13(Hibakód=<1279/>)', false);\n }\n if(!CID158()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( VIS lapon hiányos a kitöltés ) #13(Hibakód=<1279/>)', false);\n }\n if(!CID159()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( VIS lapon hiányos a kitöltés ) #13(Hibakód=<1279/>)', false);\n }\n if(!CID160()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( VIS lapon hiányos a kitöltés ) #13(Hibakód=<1279/>)', false);\n }\n if(!CID161()) {\n showErr(null, '[Nyomtatvány] A HKT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HAS lapon hiányos a kitöltés ) #13(Hibakód=<1318/>)', false);\n }\n if(!CID162()) {\n showErr(null, '[Nyomtatvány] A HKT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HAS lapon hiányos a kitöltés ) #13(Hibakód=<1318/>)', false);\n }\n if(!CID163()) {\n showErr(null, '[Nyomtatvány] A HKT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HAS lapon hiányos a kitöltés ) #13(Hibakód=<1318/>)', false);\n }\n if(!CID164()) {\n showErr(null, '[Nyomtatvány] A HKT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HAS lapon hiányos a kitöltés ) #13(Hibakód=<1318/>)', false);\n }\n if(!CID165()) {\n showErr(null, '[Nyomtatvány] A HKT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HAS lapon hiányos a kitöltés ) #13(Hibakód=<1318/>)', false);\n }\n if(!CID166()) {\n showErr(null, '[Nyomtatvány] A HKT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HAS lapon hiányos a kitöltés ) #13(Hibakód=<1318/>)', false);\n }\n if(!CID167()) {\n showErr(null, '[Nyomtatvány] A HKT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HAS lapon hiányos a kitöltés ) #13(Hibakód=<1318/>)', false);\n }\n if(!CID168()) {\n showErr(null, '[Nyomtatvány] A HKT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HAS lapon hiányos a kitöltés ) #13(Hibakód=<1318/>)', false);\n }\n if(!CID169()) {\n showErr(null, '[Nyomtatvány] A HKT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HAS lapon hiányos a kitöltés ) #13(Hibakód=<1318/>)', false);\n }\n if(!CID170()) {\n showErr(null, '[Nyomtatvány] A HKT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HAS lapon hiányos a kitöltés ) #13(Hibakód=<1318/>)', false);\n }\n if(!CID171()) {\n showErr(null, '[Nyomtatvány] A HKT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HAS lapon hiányos a kitöltés ) #13(Hibakód=<1318/>)', false);\n }\n if(!CID172()) {\n showErr(null, '[Nyomtatvány] A HKT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HAS lapon hiányos a kitöltés ) #13(Hibakód=<1318/>)', false);\n }\n if(!CID173()) {\n showErr(null, '[Nyomtatvány] A HKT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HAS lapon hiányos a kitöltés ) #13(Hibakód=<1318/>)', false);\n }\n if(!CID174()) {\n showErr(null, '[Nyomtatvány] A HKT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HAS lapon hiányos a kitöltés ) #13(Hibakód=<1318/>)', false);\n }\n if(!CID175()) {\n showErr(null, '[Nyomtatvány] A HKT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HAS lapon hiányos a kitöltés ) #13(Hibakód=<1318/>)', false);\n }\n if(!CID176()) {\n showErr(null, '[Nyomtatvány] A HKT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HAS lapon hiányos a kitöltés ) #13(Hibakód=<1319/>)', false);\n }\n if(!CID177()) {\n showErr(null, '[Nyomtatvány] A HKT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HAS lapon hiányos a kitöltés ) #13(Hibakód=<1319/>)', false);\n }\n if(!CID178()) {\n showErr(null, '[Nyomtatvány] A HKT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HAS lapon hiányos a kitöltés ) #13(Hibakód=<1319/>)', false);\n }\n if(!CID179()) {\n showErr(null, '[Nyomtatvány] A HKT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HAS lapon hiányos a kitöltés ) #13(Hibakód=<1319/>)', false);\n }\n if(!CID180()) {\n showErr(null, '[Nyomtatvány] A HKT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HAS lapon hiányos a kitöltés ) #13(Hibakód=<1319/>)', false);\n }\n if(!CID181()) {\n showErr(null, '[Nyomtatvány] A HKT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HAS lapon hiányos a kitöltés ) #13(Hibakód=<1319/>)', false);\n }\n if(!CID182()) {\n showErr(null, '[Nyomtatvány] A HKT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HAS lapon hiányos a kitöltés ) #13(Hibakód=<1319/>)', false);\n }\n if(!CID183()) {\n showErr(null, '[Nyomtatvány] A HKT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HAS lapon hiányos a kitöltés ) #13(Hibakód=<1319/>)', false);\n }\n if(!CID184()) {\n showErr(null, '[Nyomtatvány] A HKT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HAS lapon hiányos a kitöltés ) #13(Hibakód=<1319/>)', false);\n }\n if(!CID185()) {\n showErr(null, '[Nyomtatvány] A HKT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HAS lapon hiányos a kitöltés ) #13(Hibakód=<1319/>)', false);\n }\n if(!CID186()) {\n showErr(null, '[Nyomtatvány] A HKT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HAS lapon hiányos a kitöltés ) #13(Hibakód=<1319/>)', false);\n }\n if(!CID187()) {\n showErr(null, '[Nyomtatvány] A HKT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HAS lapon hiányos a kitöltés ) #13(Hibakód=<1319/>)', false);\n }\n if(!CID188()) {\n showErr(null, '[Nyomtatvány] A HKT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HAS lapon hiányos a kitöltés ) #13(Hibakód=<1319/>)', false);\n }\n if(!CID189()) {\n showErr(null, '[Nyomtatvány] A HKT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HAS lapon hiányos a kitöltés ) #13(Hibakód=<1319/>)', false);\n }\n if(!CID190()) {\n showErr(null, '[Nyomtatvány] A HKT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HAS lapon hiányos a kitöltés ) #13(Hibakód=<1319/>)', false);\n }\n if(!CID191()) {\n showErr(null, '[Nyomtatvány] A HKT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HAS lapon hiányos a kitöltés ) #13(Hibakód=<1320/>)', false);\n }\n if(!CID192()) {\n showErr(null, '[Nyomtatvány] A HKT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HAS lapon hiányos a kitöltés ) #13(Hibakód=<1320/>)', false);\n }\n if(!CID193()) {\n showErr(null, '[Nyomtatvány] A HKT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HAS lapon hiányos a kitöltés ) #13(Hibakód=<1320/>)', false);\n }\n if(!CID194()) {\n showErr(null, '[Nyomtatvány] A HKT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HAS lapon hiányos a kitöltés ) #13(Hibakód=<1320/>)', false);\n }\n if(!CID195()) {\n showErr(null, '[Nyomtatvány] A HKT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HAS lapon hiányos a kitöltés ) #13(Hibakód=<1320/>)', false);\n }\n if(!CID196()) {\n showErr(null, '[Nyomtatvány] A HKT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HAS lapon hiányos a kitöltés ) #13(Hibakód=<1320/>)', false);\n }\n if(!CID197()) {\n showErr(null, '[Nyomtatvány] A HKT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HAS lapon hiányos a kitöltés ) #13(Hibakód=<1320/>)', false);\n }\n if(!CID198()) {\n showErr(null, '[Nyomtatvány] A HKT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HAS lapon hiányos a kitöltés ) #13(Hibakód=<1320/>)', false);\n }\n if(!CID199()) {\n showErr(null, '[Nyomtatvány] A HKT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HAS lapon hiányos a kitöltés ) #13(Hibakód=<1320/>)', false);\n }\n if(!CID200()) {\n showErr(null, '[Nyomtatvány] A HKT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HAS lapon hiányos a kitöltés ) #13(Hibakód=<1320/>)', false);\n }\n if(!CID201()) {\n showErr(null, '[Nyomtatvány] A HKT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HAS lapon hiányos a kitöltés ) #13(Hibakód=<1320/>)', false);\n }\n if(!CID202()) {\n showErr(null, '[Nyomtatvány] A HKT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HAS lapon hiányos a kitöltés ) #13(Hibakód=<1320/>)', false);\n }\n if(!CID203()) {\n showErr(null, '[Nyomtatvány] A HKT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HAS lapon hiányos a kitöltés ) #13(Hibakód=<1320/>)', false);\n }\n if(!CID204()) {\n showErr(null, '[Nyomtatvány] A HKT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HAS lapon hiányos a kitöltés ) #13(Hibakód=<1320/>)', false);\n }\n if(!CID205()) {\n showErr(null, '[Nyomtatvány] A HKT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HAS lapon hiányos a kitöltés ) #13(Hibakód=<1320/>)', false);\n }\n if(!CID206()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1335/>)', false);\n }\n if(!CID207()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1335/>)', false);\n }\n if(!CID208()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1335/>)', false);\n }\n if(!CID209()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1335/>)', false);\n }\n if(!CID210()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1335/>)', false);\n }\n if(!CID211()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1335/>)', false);\n }\n if(!CID212()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1335/>)', false);\n }\n if(!CID213()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1335/>)', false);\n }\n if(!CID214()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1335/>)', false);\n }\n if(!CID215()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1335/>)', false);\n }\n if(!CID216()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1335/>)', false);\n }\n if(!CID217()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1335/>)', false);\n }\n if(!CID218()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1335/>)', false);\n }\n if(!CID219()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1335/>)', false);\n }\n if(!CID220()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1335/>)', false);\n }\n if(!CID221()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1335/>)', false);\n }\n if(!CID222()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1335/>)', false);\n }\n if(!CID223()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1335/>)', false);\n }\n if(!CID224()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1335/>)', false);\n }\n if(!CID225()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1335/>)', false);\n }\n if(!CID226()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1335/>)', false);\n }\n if(!CID227()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1335/>)', false);\n }\n if(!CID228()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1335/>)', false);\n }\n if(!CID229()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1335/>)', false);\n }\n if(!CID230()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1335/>)', false);\n }\n if(!CID231()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1335/>)', false);\n }\n if(!CID232()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1335/>)', false);\n }\n if(!CID233()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1335/>)', false);\n }\n if(!CID234()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1335/>)', false);\n }\n if(!CID235()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1335/>)', false);\n }\n if(!CID236()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1336/>)', false);\n }\n if(!CID237()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1336/>)', false);\n }\n if(!CID238()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1336/>)', false);\n }\n if(!CID239()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1336/>)', false);\n }\n if(!CID240()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1336/>)', false);\n }\n if(!CID241()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1336/>)', false);\n }\n if(!CID242()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1336/>)', false);\n }\n if(!CID243()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1336/>)', false);\n }\n if(!CID244()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1336/>)', false);\n }\n if(!CID245()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1336/>)', false);\n }\n if(!CID246()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1336/>)', false);\n }\n if(!CID247()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1336/>)', false);\n }\n if(!CID248()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1336/>)', false);\n }\n if(!CID249()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1336/>)', false);\n }\n if(!CID250()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1336/>)', false);\n }\n if(!CID251()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1336/>)', false);\n }\n if(!CID252()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1336/>)', false);\n }\n if(!CID253()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1336/>)', false);\n }\n if(!CID254()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1336/>)', false);\n }\n if(!CID255()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1336/>)', false);\n }\n if(!CID256()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1336/>)', false);\n }\n if(!CID257()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1336/>)', false);\n }\n if(!CID258()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1336/>)', false);\n }\n if(!CID259()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1336/>)', false);\n }\n if(!CID260()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1336/>)', false);\n }\n if(!CID261()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1336/>)', false);\n }\n if(!CID262()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1336/>)', false);\n }\n if(!CID263()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1336/>)', false);\n }\n if(!CID264()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1336/>)', false);\n }\n if(!CID265()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1336/>)', false);\n }\n if(!CID266()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1337/>)', false);\n }\n if(!CID267()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1337/>)', false);\n }\n if(!CID268()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1337/>)', false);\n }\n if(!CID269()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1337/>)', false);\n }\n if(!CID270()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1337/>)', false);\n }\n if(!CID271()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1337/>)', false);\n }\n if(!CID272()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1337/>)', false);\n }\n if(!CID273()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1337/>)', false);\n }\n if(!CID274()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1337/>)', false);\n }\n if(!CID275()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1337/>)', false);\n }\n if(!CID276()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1337/>)', false);\n }\n if(!CID277()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1337/>)', false);\n }\n if(!CID278()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1337/>)', false);\n }\n if(!CID279()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1337/>)', false);\n }\n if(!CID280()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1337/>)', false);\n }\n if(!CID281()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1337/>)', false);\n }\n if(!CID282()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1337/>)', false);\n }\n if(!CID283()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1337/>)', false);\n }\n if(!CID284()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1337/>)', false);\n }\n if(!CID285()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1337/>)', false);\n }\n if(!CID286()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1337/>)', false);\n }\n if(!CID287()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1337/>)', false);\n }\n if(!CID288()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1337/>)', false);\n }\n if(!CID289()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1337/>)', false);\n }\n if(!CID290()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1337/>)', false);\n }\n if(!CID291()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1337/>)', false);\n }\n if(!CID292()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1337/>)', false);\n }\n if(!CID293()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1337/>)', false);\n }\n if(!CID294()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1337/>)', false);\n }\n if(!CID295()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1337/>)', false);\n }\n if(!CID296()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1338/>)', false);\n }\n if(!CID297()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1338/>)', false);\n }\n if(!CID298()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1338/>)', false);\n }\n if(!CID299()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1338/>)', false);\n }\n if(!CID300()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1338/>)', false);\n }\n if(!CID301()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1338/>)', false);\n }\n if(!CID302()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1338/>)', false);\n }\n if(!CID303()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1338/>)', false);\n }\n if(!CID304()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1338/>)', false);\n }\n if(!CID305()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1338/>)', false);\n }\n if(!CID306()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1338/>)', false);\n }\n if(!CID307()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1338/>)', false);\n }\n if(!CID308()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1338/>)', false);\n }\n if(!CID309()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1338/>)', false);\n }\n if(!CID310()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1338/>)', false);\n }\n if(!CID311()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1338/>)', false);\n }\n if(!CID312()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1338/>)', false);\n }\n if(!CID313()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1338/>)', false);\n }\n if(!CID314()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1338/>)', false);\n }\n if(!CID315()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1338/>)', false);\n }\n if(!CID316()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1338/>)', false);\n }\n if(!CID317()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1338/>)', false);\n }\n if(!CID318()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1338/>)', false);\n }\n if(!CID319()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1338/>)', false);\n }\n if(!CID320()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1338/>)', false);\n }\n if(!CID321()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1338/>)', false);\n }\n if(!CID322()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1338/>)', false);\n }\n if(!CID323()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1338/>)', false);\n }\n if(!CID324()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1338/>)', false);\n }\n if(!CID325()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1338/>)', false);\n }\n if(!CID326()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1339/>)', false);\n }\n if(!CID327()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1339/>)', false);\n }\n if(!CID328()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1339/>)', false);\n }\n if(!CID329()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1339/>)', false);\n }\n if(!CID330()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1339/>)', false);\n }\n if(!CID331()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1339/>)', false);\n }\n if(!CID332()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1339/>)', false);\n }\n if(!CID333()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1339/>)', false);\n }\n if(!CID334()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1339/>)', false);\n }\n if(!CID335()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1339/>)', false);\n }\n if(!CID336()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1339/>)', false);\n }\n if(!CID337()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1339/>)', false);\n }\n if(!CID338()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1339/>)', false);\n }\n if(!CID339()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1339/>)', false);\n }\n if(!CID340()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1339/>)', false);\n }\n if(!CID341()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1339/>)', false);\n }\n if(!CID342()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1339/>)', false);\n }\n if(!CID343()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1339/>)', false);\n }\n if(!CID344()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1339/>)', false);\n }\n if(!CID345()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1339/>)', false);\n }\n if(!CID346()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1339/>)', false);\n }\n if(!CID347()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1339/>)', false);\n }\n if(!CID348()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1339/>)', false);\n }\n if(!CID349()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1339/>)', false);\n }\n if(!CID350()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1339/>)', false);\n }\n if(!CID351()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1339/>)', false);\n }\n if(!CID352()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1339/>)', false);\n }\n if(!CID353()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1339/>)', false);\n }\n if(!CID354()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1339/>)', false);\n }\n if(!CID355()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1339/>)', false);\n }\n if(!CID356()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1340/>)', false);\n }\n if(!CID357()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1340/>)', false);\n }\n if(!CID358()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1340/>)', false);\n }\n if(!CID359()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1340/>)', false);\n }\n if(!CID360()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1340/>)', false);\n }\n if(!CID361()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1340/>)', false);\n }\n if(!CID362()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1340/>)', false);\n }\n if(!CID363()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1340/>)', false);\n }\n if(!CID364()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1340/>)', false);\n }\n if(!CID365()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1340/>)', false);\n }\n if(!CID366()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1340/>)', false);\n }\n if(!CID367()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1340/>)', false);\n }\n if(!CID368()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1340/>)', false);\n }\n if(!CID369()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1340/>)', false);\n }\n if(!CID370()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1340/>)', false);\n }\n if(!CID371()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1340/>)', false);\n }\n if(!CID372()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1340/>)', false);\n }\n if(!CID373()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1340/>)', false);\n }\n if(!CID374()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1340/>)', false);\n }\n if(!CID375()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1340/>)', false);\n }\n if(!CID376()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1340/>)', false);\n }\n if(!CID377()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1340/>)', false);\n }\n if(!CID378()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1340/>)', false);\n }\n if(!CID379()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1340/>)', false);\n }\n if(!CID380()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1340/>)', false);\n }\n if(!CID381()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1340/>)', false);\n }\n if(!CID382()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1340/>)', false);\n }\n if(!CID383()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1340/>)', false);\n }\n if(!CID384()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1340/>)', false);\n }\n if(!CID385()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1340/>)', false);\n }\n if(!CID386()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1341/>)', false);\n }\n if(!CID387()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1341/>)', false);\n }\n if(!CID388()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1341/>)', false);\n }\n if(!CID389()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1341/>)', false);\n }\n if(!CID390()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1341/>)', false);\n }\n if(!CID391()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1341/>)', false);\n }\n if(!CID392()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1341/>)', false);\n }\n if(!CID393()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1341/>)', false);\n }\n if(!CID394()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1341/>)', false);\n }\n if(!CID395()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1341/>)', false);\n }\n if(!CID396()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1341/>)', false);\n }\n if(!CID397()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1341/>)', false);\n }\n if(!CID398()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1341/>)', false);\n }\n if(!CID399()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1341/>)', false);\n }\n if(!CID400()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1341/>)', false);\n }\n if(!CID401()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1341/>)', false);\n }\n if(!CID402()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1341/>)', false);\n }\n if(!CID403()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1341/>)', false);\n }\n if(!CID404()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1341/>)', false);\n }\n if(!CID405()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1341/>)', false);\n }\n if(!CID406()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1341/>)', false);\n }\n if(!CID407()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1341/>)', false);\n }\n if(!CID408()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1341/>)', false);\n }\n if(!CID409()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1341/>)', false);\n }\n if(!CID410()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1341/>)', false);\n }\n if(!CID411()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1341/>)', false);\n }\n if(!CID412()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1341/>)', false);\n }\n if(!CID413()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1341/>)', false);\n }\n if(!CID414()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1341/>)', false);\n }\n if(!CID415()) {\n showErr(null, '[Nyomtatvány] A HKT kód 9 jegyű, mind a négy oszlopa #13kitöltendő! ( UHB lapon hiányos a kitöltés ) #13(Hibakód=<1341/>)', false);\n }\n if(!CID416()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1343/>)', false);\n }\n if(!CID417()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1343/>)', false);\n }\n if(!CID418()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1343/>)', false);\n }\n if(!CID419()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1343/>)', false);\n }\n if(!CID420()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1343/>)', false);\n }\n if(!CID421()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1343/>)', false);\n }\n if(!CID422()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1343/>)', false);\n }\n if(!CID423()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1343/>)', false);\n }\n if(!CID424()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1343/>)', false);\n }\n if(!CID425()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1343/>)', false);\n }\n if(!CID426()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1343/>)', false);\n }\n if(!CID427()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1343/>)', false);\n }\n if(!CID428()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1343/>)', false);\n }\n if(!CID429()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1343/>)', false);\n }\n if(!CID430()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1343/>)', false);\n }\n if(!CID431()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1343/>)', false);\n }\n if(!CID432()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1343/>)', false);\n }\n if(!CID433()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1343/>)', false);\n }\n if(!CID434()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1343/>)', false);\n }\n if(!CID435()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1343/>)', false);\n }\n if(!CID436()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1343/>)', false);\n }\n if(!CID437()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1343/>)', false);\n }\n if(!CID438()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1343/>)', false);\n }\n if(!CID439()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1343/>)', false);\n }\n if(!CID440()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1343/>)', false);\n }\n if(!CID441()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1343/>)', false);\n }\n if(!CID442()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1343/>)', false);\n }\n if(!CID443()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1343/>)', false);\n }\n if(!CID444()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1343/>)', false);\n }\n if(!CID445()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1343/>)', false);\n }\n if(!CID446()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1343/>)', false);\n }\n if(!CID447()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1344/>)', false);\n }\n if(!CID448()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1344/>)', false);\n }\n if(!CID449()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1344/>)', false);\n }\n if(!CID450()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1344/>)', false);\n }\n if(!CID451()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1344/>)', false);\n }\n if(!CID452()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1344/>)', false);\n }\n if(!CID453()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1344/>)', false);\n }\n if(!CID454()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1344/>)', false);\n }\n if(!CID455()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1344/>)', false);\n }\n if(!CID456()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1344/>)', false);\n }\n if(!CID457()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1344/>)', false);\n }\n if(!CID458()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1344/>)', false);\n }\n if(!CID459()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1344/>)', false);\n }\n if(!CID460()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1344/>)', false);\n }\n if(!CID461()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1344/>)', false);\n }\n if(!CID462()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1344/>)', false);\n }\n if(!CID463()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1344/>)', false);\n }\n if(!CID464()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1344/>)', false);\n }\n if(!CID465()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1344/>)', false);\n }\n if(!CID466()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1344/>)', false);\n }\n if(!CID467()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1344/>)', false);\n }\n if(!CID468()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1344/>)', false);\n }\n if(!CID469()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1344/>)', false);\n }\n if(!CID470()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1344/>)', false);\n }\n if(!CID471()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1344/>)', false);\n }\n if(!CID472()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1344/>)', false);\n }\n if(!CID473()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1344/>)', false);\n }\n if(!CID474()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1344/>)', false);\n }\n if(!CID475()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1344/>)', false);\n }\n if(!CID476()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1344/>)', false);\n }\n if(!CID477()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1344/>)', false);\n }\n if(!CID478()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1345/>)', false);\n }\n if(!CID479()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1345/>)', false);\n }\n if(!CID480()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1345/>)', false);\n }\n if(!CID481()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1345/>)', false);\n }\n if(!CID482()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1345/>)', false);\n }\n if(!CID483()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1345/>)', false);\n }\n if(!CID484()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1345/>)', false);\n }\n if(!CID485()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1345/>)', false);\n }\n if(!CID486()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1345/>)', false);\n }\n if(!CID487()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1345/>)', false);\n }\n if(!CID488()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1345/>)', false);\n }\n if(!CID489()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1345/>)', false);\n }\n if(!CID490()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1345/>)', false);\n }\n if(!CID491()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1345/>)', false);\n }\n if(!CID492()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1345/>)', false);\n }\n if(!CID493()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1345/>)', false);\n }\n if(!CID494()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1345/>)', false);\n }\n if(!CID495()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1345/>)', false);\n }\n if(!CID496()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1345/>)', false);\n }\n if(!CID497()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1345/>)', false);\n }\n if(!CID498()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1345/>)', false);\n }\n if(!CID499()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1345/>)', false);\n }\n if(!CID500()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1345/>)', false);\n }\n if(!CID501()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1345/>)', false);\n }\n if(!CID502()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1345/>)', false);\n }\n if(!CID503()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1345/>)', false);\n }\n if(!CID504()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1345/>)', false);\n }\n if(!CID505()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1345/>)', false);\n }\n if(!CID506()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1345/>)', false);\n }\n if(!CID507()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1345/>)', false);\n }\n if(!CID508()) {\n showErr(null, '[Nyomtatvány] A KT kód 7 jegyű, mind a három oszlopa #13kitöltendő! ( HKS lapon hiányos a kitöltés ) #13(Hibakód=<1345/>)', false);\n }\n if(!CID509()) {\n showErr(null, '[Nyomtatvány] \\\"Átvezetés VPSZP számlák között\\\" #13választotta, akkor az Átvezetési kód és számlaszám rovaton #13kívűl más nem tölthető ki! (Hibakód=<1377/>)', false);\n }\n if(!CID510()) {\n showErr(null, '[Nyomtatvány] \\\"Átvezetés VPSZP számlák között\\\" #13választotta, akkor az Összeg valamint az Átvezetési kód és #13számlaszám kötelezően kitöltendő! (Hibakód=<1379/>)', false);\n }\n if(!CID511()) {\n showErr(null, '[Nyomtatvány] \\\"APEH számlaszámra átutalás\\\" #13választotta, akkor az APEH átutalás kód és számlaszám #13rovaton kívűl más nem tölthető ki! (Hibakód=<1378/>)', false);\n }\n if(!CID512()) {\n showErr(null, '[Nyomtatvány] \\\"APEH számlaszámra átutalás\\\" #13választotta, akkor az Összeg valamint az Átvezetési kód és #13számlaszám kötelezően kitöltendő! (Hibakód=<1380/>)', false);\n }\n if(!CID513()) {\n showErr(null, '[Nyomtatvány] \\\"Visszautalás postacímre\\\" #13választotta, akkor az Összeg rovaton kívül más rovat nem #13tölhető ki! (Hibakód=<1382/>)', false);\n }\n if(!CID514()) {\n showErr(null, '[Nyomtatvány] \\\"Visszautalás postacímre\\\" #13választotta, akkor az Összeg kötelezően kitöltendő! #13(Hibakód=<1383/>)', false);\n }\n if(!CID515()) {\n showErr(null, '[Nyomtatvány] \\\"Visszautalás ügyfélnek #13bankszámlára\\\" (belföldre) választotta, akkor az Összeg #13valamint a Bank neve rovaton és a Számlaszám rovaton kívül #13más rovat nem tölhető ki! (Hibakód=<1384/>)', false);\n }\n if(!CID516()) {\n showErr(null, '[Nyomtatvány] \\\"Visszautalás ügyfélnek #13bankszámlára\\\" (belföldre) választotta, akkor az Összeg #13valamint a Bank neve és Számlaszáma kötelezően kitöltendő! #13(Hibakód=<1385/>)', false);\n }\n if(!CID517()) {\n showErr(null, '[Nyomtatvány] \\\"Visszautalás ügyfélnek #13bankszámlára\\\" (külföldre) választotta, akkor az Összeg #13valamint a Bank neve rovaton és a Számlaszám rovaton kívül #13más rovat nem tölhető ki! (Hibakód=<1386/>)', false);\n }\n if(!CID518()) {\n showErr(null, '[Nyomtatvány] \\\"Visszautalás ügyfélnek #13bankszámlára\\\" (külföldre) választotta, akkor az Összeg #13valamint a Bank neve és Számlaszáma a Cím, Swift kód, #13Deviza nem és költségviselés kötelezően kitöltendő! #13(Hibakód=<1407/>)', false);\n }\n if(!CID519()) {\n showErr(null, '[Nyomtatvány] \\\"Köztartozás átutalás\\\" #13választotta, akkor az Összeg rovaton kívül más rovat nem #13tölhető ki! (Hibakód=<1408/>)', false);\n }\n if(!CID520()) {\n showErr(null, '[Nyomtatvány] \\\"Köztartozás átutalás\\\" #13választotta, akkor az Összeg kötelezően kitöltendő! #13(Hibakód=<1410/>)', false);\n }\n if(!CID521()) {\n showErr(null, '[Nyomtatvány] \\\"Átvezetés VPSZP számlák között\\\" #13választotta, akkor az Átvezetési kód és számlaszám rovaton #13kívűl más nem tölthető ki! (Hibakód=<1387/>)', false);\n }\n if(!CID522()) {\n showErr(null, '[Nyomtatvány] \\\"Átvezetés VPSZP számlák között\\\" #13választotta, akkor az Összeg valamint az Átvezetési kód és #13számlaszám kötelezően kitöltendő! (Hibakód=<1388/>)', false);\n }\n if(!CID523()) {\n showErr(null, '[Nyomtatvány] \\\"APEH számlaszámra átutalás\\\" #13választotta, akkor az APEH átutalás kód és számlaszám #13rovaton kívűl más nem tölthető ki! (Hibakód=<1389/>)', false);\n }\n if(!CID524()) {\n showErr(null, '[Nyomtatvány] \\\"APEH számlaszámra átutalás\\\" #13választotta, akkor az Összeg valamint az Átvezetési kód és #13számlaszám kötelezően kitöltendő! (Hibakód=<1390/>)', false);\n }\n if(!CID525()) {\n showErr(null, '[Nyomtatvány] \\\"Visszautalás postacímre\\\" #13választotta, akkor az Összeg rovaton kívül más rovat nem #13tölhető ki! (Hibakód=<1391/>)', false);\n }\n if(!CID526()) {\n showErr(null, '[Nyomtatvány] \\\"Visszautalás postacímre\\\" #13választotta, akkor az Összeg kötelezően kitöltendő! #13(Hibakód=<1392/>)', false);\n }\n if(!CID527()) {\n showErr(null, '[Nyomtatvány] \\\"Visszautalás ügyfélnek #13bankszámlára\\\" (belföldre) választotta, akkor az Összeg #13valamint a Bank neve rovaton és a Számlaszám rovaton kívül #13más rovat nem tölhető ki! (Hibakód=<1393/>)', false);\n }\n if(!CID528()) {\n showErr(null, '[Nyomtatvány] \\\"Visszautalás ügyfélnek #13bankszámlára\\\" (belföldre) választotta, akkor az Összeg #13valamint a Bank neve és Számlaszáma kötelezően kitöltendő! #13(Hibakód=<1394/>)', false);\n }\n if(!CID529()) {\n showErr(null, '[Nyomtatvány] \\\"Visszautalás ügyfélnek #13bankszámlára\\\" (külföldre) választotta, akkor az Összeg #13valamint a Bank neve rovaton és a Számlaszám rovaton kívül #13más rovat nem tölhető ki! (Hibakód=<1395/>)', false);\n }\n if(!CID530()) {\n showErr(null, '[Nyomtatvány] \\\"Visszautalás ügyfélnek #13bankszámlára\\\" (külföldre) választotta, akkor az Összeg #13valamint a Bank neve és Számlaszáma a Cím, Swift kód, #13Deviza nem és költségviselés kötelezően kitöltendő! #13(Hibakód=<1396/>)', false);\n }\n if(!CID531()) {\n showErr(null, '[Nyomtatvány] \\\"Köztartozás átutalás\\\" #13választotta, akkor az Összeg rovaton kívül más rovat nem #13tölhető ki! (Hibakód=<1409/>)', false);\n }\n if(!CID532()) {\n showErr(null, '[Nyomtatvány] \\\"Köztartozás átutalás\\\" #13választotta, akkor az Összeg kötelezően kitöltendő! #13(Hibakód=<1411/>)', false);\n }\n if(!CID533()) {\n showErr(null, '[Nyomtatvány] \\\"Átvezetés VPSZP számlák között\\\" #13választotta, akkor az Átvezetési kód és számlaszám rovaton #13kívűl más nem tölthető ki! (Hibakód=<1397/>)', false);\n }\n if(!CID534()) {\n showErr(null, '[Nyomtatvány] \\\"Átvezetés VPSZP számlák között\\\" #13választotta, akkor az Összeg valamint az Átvezetési kód és #13számlaszám kötelezően kitöltendő! (Hibakód=<1398/>)', false);\n }\n if(!CID535()) {\n showErr(null, '[Nyomtatvány] \\\"APEH számlaszámra átutalás\\\" #13választotta, akkor az APEH átutalás kód és számlaszám #13rovaton kívűl más nem tölthető ki! (Hibakód=<1399/>)', false);\n }\n if(!CID536()) {\n showErr(null, '[Nyomtatvány] \\\"APEH számlaszámra átutalás\\\" #13választotta, akkor az Összeg valamint az Átvezetési kód és #13számlaszám kötelezően kitöltendő! (Hibakód=<1400/>)', false);\n }\n if(!CID537()) {\n showErr(null, '[Nyomtatvány] \\\"Visszautalás postacímre\\\" #13választotta, akkor az Összeg rovaton kívül más rovat nem #13tölhető ki! (Hibakód=<1401/>)', false);\n }\n if(!CID538()) {\n showErr(null, '[Nyomtatvány] \\\"Visszautalás postacímre\\\" #13választotta, akkor az Összeg kötelezően kitöltendő! #13(Hibakód=<1402/>)', false);\n }\n if(!CID539()) {\n showErr(null, '[Nyomtatvány] \\\"Visszautalás ügyfélnek #13bankszámlára\\\" (belföldre) választotta, akkor az Összeg #13valamint a Bank neve rovaton és a Számlaszám rovaton kívül #13más rovat nem tölhető ki! (Hibakód=<1403/>)', false);\n }\n if(!CID540()) {\n showErr(null, '[Nyomtatvány] \\\"Visszautalás ügyfélnek #13bankszámlára\\\" (belföldre) választotta, akkor az Összeg #13valamint a Bank neve és Számlaszáma kötelezően kitöltendő! #13(Hibakód=<1404/>)', false);\n }\n if(!CID541()) {\n showErr(null, '[Nyomtatvány] \\\"Visszautalás ügyfélnek #13bankszámlára\\\" (külföldre) választotta, akkor az Összeg #13valamint a Bank neve rovaton és a Számlaszám rovaton kívül #13más rovat nem tölhető ki! (Hibakód=<1405/>)', false);\n }\n if(!CID542()) {\n showErr(null, '[Nyomtatvány] \\\"Visszautalás ügyfélnek #13bankszámlára\\\" (külföldre) választotta, akkor az Összeg #13valamint a Bank neve és Számlaszáma a Cím, Swift kód, #13Deviza nem és költségviselés kötelezően kitöltendő! #13(Hibakód=<1406/>)', false);\n }\n if(!CID543()) {\n showErr(null, '[Nyomtatvány] \\\"Köztartozás átutalás\\\" #13választotta, akkor az Összeg rovaton kívül más rovat nem #13tölhető ki! (Hibakód=<1412/>)', false);\n }\n if(!CID544()) {\n showErr(null, '[Nyomtatvány] \\\"Köztartozás átutalás\\\" #13választotta, akkor az Összeg kötelezően kitöltendő! #13(Hibakód=<1413/>)', false);\n }\n if(!CID545()) {\n showErr(null, '[Nyomtatvány] Negyedéves bevallást választott, ki kell #13tölteni a Bevallás időszaka és Bevallás dátuma mezőket! #13(Hibakód=<1469/>)', false);\n }\n if(!CID546()) {\n showErr(null, '[Nyomtatvány] kitöltött([BEV]_A,[BEV]_B,[BEV]_C) => #13kitöltött([BEV]_E) or kitöltött([BEV]_F) or #13kitöltött([BEV]_G) (Hibakód=<1494/>)', false);\n }\n if(!CID547()) {\n showErr(null, '[Nyomtatvány] kitöltött([BEV]_A,[BEV]_B,[BEV]_C) => #13kitöltött([BEV]_E) or kitöltött([BEV]_F) or #13kitöltött([BEV]_G) (Hibakód=<1494/>)', false);\n }\n if(!CID548()) {\n showErr(null, '[Nyomtatvány] kitöltött([BEV]_A,[BEV]_B,[BEV]_C) => #13kitöltött([BEV]_E) or kitöltött([BEV]_F) or #13kitöltött([BEV]_G) (Hibakód=<1494/>)', false);\n }\n if(!CID549()) {\n showErr(null, '[Nyomtatvány] kitöltött([BEV]_A,[BEV]_B,[BEV]_C) => #13kitöltött([BEV]_E) or kitöltött([BEV]_F) or #13kitöltött([BEV]_G) (Hibakód=<1494/>)', false);\n }\n if(!CID550()) {\n showErr(null, '[Nyomtatvány] kitöltött([BEV]_A,[BEV]_B,[BEV]_C) => #13kitöltött([BEV]_E) or kitöltött([BEV]_F) or #13kitöltött([BEV]_G) (Hibakód=<1494/>)', false);\n }\n if(!CID551()) {\n showErr(null, '[Nyomtatvány] kitöltött([BEV]_A,[BEV]_B,[BEV]_C) => #13kitöltött([BEV]_E) or kitöltött([BEV]_F) or #13kitöltött([BEV]_G) (Hibakód=<1494/>)', false);\n }\n if(!CID552()) {\n showErr(null, '[Nyomtatvány] kitöltött([BEV]_A,[BEV]_B,[BEV]_C) => #13kitöltött([BEV]_E) or kitöltött([BEV]_F) or #13kitöltött([BEV]_G) (Hibakód=<1494/>)', false);\n }\n if(!CID553()) {\n showErr(null, '[Nyomtatvány] kitöltött([BEV]_A,[BEV]_B,[BEV]_C) => #13kitöltött([BEV]_E) or kitöltött([BEV]_F) or #13kitöltött([BEV]_G) (Hibakód=<1494/>)', false);\n }\n if(!CID554()) {\n showErr(null, '[Nyomtatvány] kitöltött([BEV]_A,[BEV]_B,[BEV]_C) => #13kitöltött([BEV]_E) or kitöltött([BEV]_F) or #13kitöltött([BEV]_G) (Hibakód=<1494/>)', false);\n }\n if(!CID555()) {\n showErr(null, '[Nyomtatvány] kitöltött([BEV]_A,[BEV]_B,[BEV]_C) => #13kitöltött([BEV]_E) or kitöltött([BEV]_F) or #13kitöltött([BEV]_G) (Hibakód=<1494/>)', false);\n }\n if(!CID556()) {\n showErr(null, '[Nyomtatvány] kitöltött([BEV]_A,[BEV]_B,[BEV]_C) => #13kitöltött([BEV]_E) or kitöltött([BEV]_F) or #13kitöltött([BEV]_G) (Hibakód=<1494/>)', false);\n }\n if(!CID557()) {\n showErr(null, '[Nyomtatvány] kitöltött([BEV]_A,[BEV]_B,[BEV]_C) => #13kitöltött([BEV]_E) or kitöltött([BEV]_F) or #13kitöltött([BEV]_G) (Hibakód=<1494/>)', false);\n }\n showErrorDlg();\n}", "title": "" }, { "docid": "51a41df2118d40d38812ddc7632257d8", "score": "0.5656663", "text": "function checkInfo() {\n\n // No attorney chosen if blank\n if (street1 === \"\" || city === \"\" || twoLetterState === \"\" || zipcode === \"\" || ssn === \"\") {\n setIsError2(true);\n }\n else {\n // Make the Post call\n getDocFile();\n }\n }", "title": "" }, { "docid": "9f6b8b3fbc005966cc0959b8fc89d55d", "score": "0.5646463", "text": "@api\n handleFormValues() {\n const allInputValid = [...this.template.querySelectorAll('lightning-input')]\n .reduce((validSoFar, inputCmp) => {\n inputCmp.reportValidity();\n return validSoFar && inputCmp.checkValidity();\n }, true);\n\n const allComboxValid = [...this.template.querySelectorAll('lightning-combobox')]\n .reduce((validSoFar, inputCmp) => {\n inputCmp.reportValidity();\n return validSoFar && inputCmp.checkValidity();\n }, true);\n\n const allRadioValid = [...this.template.querySelectorAll('lightning-radio-group')]\n .reduce((validSoFar, inputCmp) => {\n inputCmp.reportValidity();\n return validSoFar && inputCmp.checkValidity();\n }, true);\n this.checkForErrorsManytoMany();\n this.checkForErrorsLookup();\n this.checkForErrorsRadio();\n if (allInputValid && allComboxValid && allRadioValid && this.errorsLoockup && this.errorsMany && this.radioReq) {\n this.createVisita();\n } else {\n console.log('error ');\n }\n }", "title": "" }, { "docid": "657833a31d3dba0ace270ef5dcb9eb80", "score": "0.56435037", "text": "function isECourseFormValid(){\r\n return(ECourseNameEngField.isValid() && ECourseCodeField.isValid() && ECourseDaysField.isValid());\r\n }", "title": "" }, { "docid": "b54bf3a1f0648b8857acb94028f3cec6", "score": "0.56419855", "text": "function validateShippingForm()\n{\n\tvar r1 = validateAccordianField('ship_fname','err_ship_fname');\n\tvar r2 = validateAccordianField('ship_lname','err_ship_lname');\n\tvalidateEmail('ship_email');\n\tvar r3 = checkResultEmail('err_ship_email');\n\tvar r4 = validateAccordianField('ship_addr1','err_ship_addr1');\n\tvar r5 = validateAccordianField('ship_addr2','err_ship_addr2');\n\tvar r6 = validateAccordianField('ship_city','err_ship_city');\n\tvar r7 = validateAccordianField('ship_zip','err_ship_zip');\n\tvar r8 = validateAccordianField('ship_phone','err_ship_phone');\n\tvar r9 = validateAccordianField('ship_state','err_ship_state');\n\tvar r10 = validateAccordianField('ship_country','err_ship_country');\n\t\n\tif(r1 == 0 || r2 == 0 || r3 == 0 || r4 == 0 || r5 == 0 || r6 == 0 || r7 == 0 || r8 == 0 || r9 == 0 || r10 == 0)\n\t{\n\t\treturn 0;\n\t}\n\telse\n\t{\n\t\treturn 1;\n\t}\n}", "title": "" }, { "docid": "6c6596747c350c2d9c8caabb2f123e12", "score": "0.563248", "text": "function tabOneValidation() {\n var valid = 0;\n if (valid == 0)\n if (ChkMVR == 1) {\n if ($(\"#txtPolicyNo\").val() == null || $(\"#txtPolicyNo\").val() == '') {\n valid = 1;\n AlertBox('Require field is not completed <b>*PolicyNo</b>', Null); \n }\n }\n if (valid == 0)\n if (ChkIR == 1 ) {\n var policyAmount;\n if ($(\"#chkIRcoverSheet\").prop('checked') == true) {\n policyAmount = $(\"#txtPolicyAmount\").val();\n if (policyAmount == null || policyAmount == '') {\n valid = 1;\n AlertBox('Required field is not completed <b>*Policy Amount.</b>', 'txtPolicyAmount');\n }\n }\n else {\n valid = 1;\n AlertBox('Kindly acknowledge that you have checked coversheet and proceed.', 'chkIRcoverSheet')\n }\n }\n if (valid == 0)\n if (ChkIRYoungerAges == 1) {\n var pAmount = $(\"#txtPolicyAmount\").val();\n if (pAmount == null || pAmount == '') {\n valid = 1;\n AlertBox('Required field is not completed <b>*Policy Amount.</b>', 'txtPolicyAmount');\n }\n }\n if (valid == 0)\n if (rtCreditRpt == 1 || rtEsearch == 1) {\n var policyAmount;\n policyAmount = $(\"#txtPolicyAmount\").val();\n if (policyAmount == null || policyAmount == '') {\n valid = 1;\n AlertBox('Required field is not completed <b>*Policy Amount</b>', 'txtPolicyAmount');\n }\n }\n if (valid == 0)\n if (ChkAPS == 1) {\n var AgentNumber = $(\"#txtAgentNumber\");\n if ($(\"#chkAPSdbSheet\").prop('checked') != true) {\n valid = 1;\n AlertBox('Kindly acknowledge that you have checked coversheet and or Domino database and proceed.', 'chkAPSdbSheet')\n }\n else\n if ($(\"#chkAPSAgentError\").prop('checked') != true) {\n valid = 1;\n AlertBox('Check case for Agent error.', 'chkAPSAgentError')\n }\n else\n if (gAgencyCode == 0 || gAgencyCode == null) {\n valid = 1;\n AlertBox('Check Agency Number - Order can not be placed.', 'txtAgentNumber');\n }\n }\n return valid; // 0 is valid otherwise not valid\n }", "title": "" }, { "docid": "cfed92b50dba25cae6f8a5f463dafd92", "score": "0.5627837", "text": "stripeValidateFields() {\n const { card_number, exp_month, exp_year, cvc } = this.state;\n\n var card_errs = {};\n\n var num_err = Stripe.card.validateCardNumber(card_number);\n var expiry_err = Stripe.card.validateExpiry(exp_month, exp_year);\n var cvc_err = Stripe.card.validateCVC(cvc);\n\n card_errs.cardholder_name = [this.state.cardholder_name, \"Can't be blank\"];\n card_errs.stripe_address = [this.state.stripe_address, \"Can't be blank\"];\n card_errs.stripe_city = [this.state.stripe_city, \"Can't be blank\"];\n card_errs.stripe_state = [this.state.stripe_state, \"Can't be blank\"];\n card_errs.stripe_zipcode = [this.state.stripe_zipcode, \"Can't be blank\"];\n card_errs.card_number = [num_err, \"Please enter a valid card number\"];\n card_errs.exp_month = [expiry_err, \"Please enter a valid expiration date\"];\n card_errs.cvc = [cvc_err, \"Please enter a valid cvc number\"];\n return card_errs;\n }", "title": "" }, { "docid": "7608007a50318f9266a1ee3c56be57cd", "score": "0.5627272", "text": "function apProfilesSsidValidate(frmId){\n\n var txtFieldIdArr = new Array();\n txtFieldIdArr[0] = \"tf1_ssid, Please enter a valid SSID\";\n txtFieldIdArr[1] = \"tf1_VLANId, Please enter a valid VLAN\";\n txtFieldIdArr[2] = \"tf1_redirectUrl, Please enter a valid Redirect URL\";\n txtFieldIdArr[3] = \"tf1_radiusAuthServerIP, Please enter a valid RADIUS Authentication Server IP Address\";\n txtFieldIdArr[4] = \"tf1_WPAKey, Please enter a valid WPA Key\";\n txtFieldIdArr[5] = \"tf1_preAuthLimit, Please enter a valid Pre-Authentication Limit\";\n\ttxtFieldIdArr[6] = \"tf1_keyCachingHoldTime, Please enter a valid Key Caching Hold Time\";\n\ttxtFieldIdArr[7] = \"tf1_bcastKeyRefreshRate, Please enter a valid Bcast Key Refresh Rate\";\n\ttxtFieldIdArr[8] = \"tf1_sessionKeyRefreshRate, Please enter a valid Session Key Refresh Rate\"; \t\n\ttxtFieldIdArr[9] = \"tf1_WEPKeyCharValue1, Please enter a valid WEP Key1\"; \n\ttxtFieldIdArr[10] = \"tf1_WEPKeyCharValue2, Please enter a valid WEP Key2\"; \n\ttxtFieldIdArr[11] = \"tf1_WEPKeyCharValue3, Please enter a valid WEP Key3\"; \n\ttxtFieldIdArr[12] = \"tf1_WEPKeyCharValue4, Please enter a valid WEP Key4\"; \n \n if (txtFieldArrayCheck(txtFieldIdArr) == false) \n return false;\n \n /**var ssidobj = document.getElementById('tf1_ssid');\n if (ssidobj && !ssidobj.disabled) {\n if (numericValueRangeCheck(ssidobj, '', '', 1, 4096, true, '', '') == false) \n return false; \n }*/\n\n \n if (isProblemCharArrayCheck(txtFieldIdArr, \"'\\\" \", NOT_SUPPORTED) == false) \n return false;\n \n var vlanobj = document.getElementById('tf1_VLANId');\n if (vlanobj && !vlanobj.disabled) {\n if (numericValueRangeCheck(vlanobj, '', '', 1, 4093, true, '', '') == false) \n return false; \n }\n \n if (ipv4Validate('tf1_radiusAuthServerIP', 'IP', false, true, \"Invalid IP Address\", \"For Octect\", true) == false) \n return false;\n \n var preAuthLimit= document.getElementById('tf1_preAuthLimit');\n if (preAuthLimit && !preAuthLimit.disabled) {\n if (numericValueRangeCheck(preAuthLimit, '', '', 0, 192, true, 'Invalid Pre-Authentication Limit', '') == false) \n return false; \n }\n\n\tvar keyCachingHoldTime = document.getElementById('tf1_keyCachingHoldTime');\n if (keyCachingHoldTime && !keyCachingHoldTime.disabled) {\n if (numericValueRangeCheck(keyCachingHoldTime, '', '', 0, 1440, true, 'Invalid Key Caching Hold Time', '') == false) \n return false; \n }\n\n\tvar bcastKeyRefreshRate = document.getElementById('tf1_bcastKeyRefreshRate');\n if (bcastKeyRefreshRate && !bcastKeyRefreshRate.disabled) {\n if (numericValueRangeCheck(bcastKeyRefreshRate, '', '', 0, 86400, true, 'Invalid Bcast Key Refresh Rate', '') == false) \n return false; \n }\n \n\tvar sessionKeyRefreshRate= document.getElementById('tf1_sessionKeyRefreshRate');\n if (sessionKeyRefreshRate&& !sessionKeyRefreshRate.disabled) {\n if (numericValueRangeCheck(sessionKeyRefreshRate, '', '', 0, 86400, true, 'Invalid Session Key Refresh Rate', '') == false) \n return false; \n } \n setHiddenChks(frmId);\n\treturn true;\n}", "title": "" }, { "docid": "7b14de08a07993b7ad9c081f0291212e", "score": "0.5626396", "text": "validate() {\n var issues = [];\n this.validateId(this.id);\n this.validateForm(this.form);\n // multiword tokens (elements with range IDs) are (locally) valid\n // iff all remaining fields (3-10) contain just an underscore.\n if (this.isMultiword) {\n if (this.lemma != '_' ||\n this.upostag != '_' ||\n this.xpostag != '_' ||\n this.feats != '_' ||\n this.head != '_' ||\n this.deprel != '_' ||\n this.deps != '_' //||\n // this.misc != '_'\n ) {\n this.issues.push('non-underscore field for multiword token');\n }\n return issues;\n }\n // if we're here, not a multiword token.\n this.validateLemma(this.lemma);\n this.validateUpostag(this.upostag);\n this.validateXpostag(this.xpostag);\n this.validateFeats(this.feats);\n this.validateHead(this.head);\n this.validateDeprel(this.deprel);\n this.validateDeps(this.deps);\n this.validateMisc(this.misc);\n return issues;\n }", "title": "" }, { "docid": "a0b22c7ef7338dbaeaf04b5264a383fb", "score": "0.56240433", "text": "function verification_nouvelle_plainte(liste_validation){\n verification_champs_vides(); // Parce que tous les champs doivent être remplis\n\n if (champ_etablissement.options.selectedIndex == 0) {\n liste_validation['champ_etablissement_vide'] = true;\n }\n\n if (champ_no_civique.value == \"\") {\n liste_validation['champ_numero_vide'] = true;\n } else if (isNaN(champ_no_civique.value)){\n\t liste_validation['champ_numero_inv'] = true;\n\t}\n\n if (champ_nom_rue_plainte.value == \"\") {\n liste_validation['champ_rue_vide'] = true;\n } else if (!(pattern_rue.test(champ_nom_rue_plainte.value))){\n\t liste_validation['champ_rue_inv'] = true;\n }\n\n if (champ_nom_ville.value == \"\") {\n liste_validation['champ_ville_vide'] = true;\n } else if (!(pattern_rue.test())){\n\t liste_validation['champ_ville_inv'] = true;\n }\n\n if (champ_code_postal.value == \"\") {\n liste_validation['champ_code_vide'] = true;\n } else if (!(pattern_code.test(champ_code_postal.value.toUpperCase()))){\n\t liste_validation['champ_code_inv'] = true;\n }\n\n if (champ_date_visite.value == \"\") {\n liste_validation['champ_date_vide'] = true;\n } else if (!(pattern_date.test(champ_date_visite.value))){\n\t liste_validation['champ_date_inv'] = true;\n }\n\n if (champ_prenom_plaignant.value == \"\") {\n liste_validation['champ_prenom_vide'] = true;\n } else if (!(pattern_prenom_nom.test(champ_prenom_plaignant.value))){\n\t liste_validation['champ_prenom_inv'] = true;\n }\n\n if (champ_nom_plaignant.value == \"\") {\n liste_validation['champ_nom_vide'] = true;\n } else if (!(pattern_prenom_nom.test(champ_nom_plaignant.value))){\n\t liste_validation['champ_nom_inv'] = true;\n }\n\n if (champ_description.value == \"\") {\n liste_validation['champ_description_vide'] = true;\n }\n\n return liste_validation;\n}", "title": "" }, { "docid": "2f2d3902ce1f54bd5e453e4f51030ea8", "score": "0.5621467", "text": "function checkInput() {\r\n const title_value = title_p.value.trim();\r\n const discription_value = discription_p.value.trim();\r\n const location_value = location_p.value.trim();\r\n const phone_number_value = phone_number_p.value.trim();\r\n const gateFee_value = gateFee_p.value.trim();\r\n\r\n if(title_value == '') {\r\n //show error\r\n //add error class\r\n setError(title_p, \"Title of party is required\");\r\n return false;\r\n }else{\r\n\r\n setSuccess(title_p);\r\n }\r\n\r\n if(discription_value == ''){\r\n //show error\r\n //add error class\r\n setError(discription_p, \"Discription of party is required\");\r\n return false;\r\n }else{\r\n \r\n setSuccess(discription_p);\r\n \r\n }\r\n\r\n if(location_value == ''){\r\n //show error\r\n //add error class\r\n setError(location_p, \"Location of party is required\");\r\n return false;\r\n }else{\r\n \r\n setSuccess(location_p);\r\n\r\n }\r\n\r\n if(phone_number_value == ''){\r\n //show error\r\n //add error class\r\n setError(phone_number_p, \"Phone number is required\");\r\n return false;\r\n }else{\r\n if(mobileValidation(phone_number_value) == true){\r\n\r\n setSuccess(phone_number_p);\r\n\r\n }else{\r\n\r\n setError(phone_number_p, \"Phone number not correct\");\r\n return false;\r\n } \r\n \r\n }\r\n\r\n if(gateFee_value == ''){\r\n //show error\r\n //add error class\r\n setError(gateFee_p, \"Gate fee is required\");\r\n return false;\r\n }else{\r\n \r\n setSuccess(gateFee_p);\r\n \r\n }\r\n\r\n return true;\r\n\r\n}", "title": "" }, { "docid": "59f63afee3415d1ddcbaaee99a9945ef", "score": "0.56192285", "text": "function valid(){\n $scope.irVldtn = $scope.orVldtn = $scope.thkVldtn = $scope.nameVldtn = $scope.hrVldtn = $scope.hlVldtn = $scope.srVldtn = $scope.slVldtn = [];\n $scope.nameVldtn = validationClass($scope.name, false);\n if ($scope.typeSelected == 'washer'){\n $scope.orVldtn = validationClass($scope.outerRadius, true);\n $scope.irVldtn = validationClass($scope.innerRadius, true);\n $scope.thkVldtn = validationClass($scope.thickness, true);\n }\n if ($scope.typeSelected == 'hex_bolt'){\n $scope.srVldtn = validationClass($scope.shaftRadius, true);\n $scope.slVldtn = validationClass($scope.shaftLength, true);\n $scope.hlVldtn = validationClass($scope.headLength, true);\n $scope.hrVldtn = validationClass($scope.headRadius, true);\n }\n var combined = $scope.irVldtn.concat($scope.orVldtn, $scope.irVldtn, $scope.thkVldtn, $scope.nameVldtn, $scope.srVldin, $scope.slVldin, $scope.hlVldin, $scope.hrVldtn);\n return !combined.includes('invalid');\n }", "title": "" }, { "docid": "107de77a89ea4e96b0cc4848b55f06f4", "score": "0.56144476", "text": "function checkFields() {\n if(document.getElementById(\"usern\").checkValidity() && \n document.getElementById(\"userp\").checkValidity()&&\n document.getElementById(\"email\").checkValidity() && \n document.getElementById(\"fname\").checkValidity()&&\n document.getElementById(\"lname\").checkValidity() && \n document.getElementById(\"town\").checkValidity()&&\n document.getElementById(\"country\").checkValidity() && \n document.getElementById(\"bdate\").checkValidity()) {\n registerPOST();\n }\n}", "title": "" }, { "docid": "8d1827cd87761a98e5fc1ad2ae122e68", "score": "0.560944", "text": "function validate(inst, validation)\n{\n const ccfg = system.modules[\"/ti/devices/CCFG\"];\n\n // Get current 15.4 transmit power config\n const isSub1BandSet = (inst.freqBand === \"freqBandSub1\");\n let txPower154CfgName;\n if(isSub1BandSet)\n {\n txPower154CfgName = \"transmitPowerSubG\";\n }\n else\n {\n txPower154CfgName = \"transmitPower24G\";\n }\n\n // Get params that map current 15.4 tx power config value to radio config\n // tx power config\n const rfTxPowerValObj = mapCurrTxPowerToRFConfig(inst);\n\n // Force VDDR only applicable to non-high PA\n if(!rfTxPowerValObj.cfgName.includes(\"Hi\"))\n {\n let key = null;\n for(key in boardToForceVddrTxPower)\n {\n // Verify that at force VDDR on at required level\n if((Common.BOARD.includes(key))\n && (rfTxPowerValObj.txPower === boardToForceVddrTxPower[key])\n && (ccfg.$static.forceVddr === false))\n {\n validation.logWarning(\"The selected RF TX Power requires Force \"\n + \"VDDR to be enabled in the Device Configuration module\",\n inst, txPower154CfgName);\n break;\n }\n }\n }\n else\n {\n validation.logInfo(\"The selected RF TX Power enables high PA \",\n inst, txPower154CfgName);\n }\n}", "title": "" }, { "docid": "48c120fc82bf3259063c77d5cd734266", "score": "0.5604977", "text": "function validatePhase1(){\n\tfname = _(\"firstName\").value;\n\tlname = _(\"lastName\").value;\n\tgender = _(\"gender\").value;\n\t\n\t//Conditional Statement\n\tif(fname.length > 2 && lname.length > 2 && gender.length > 0){\n\t\t//validated , hide phase1\n\t\t_(\"phase1\").style.display = \"none\";\n\t\t\n\t\t//display , show phase2\n\t\t_(\"phase2\").style.display = \"block\"\n\t\t\n\t\t//update progress bar value\n\t\t_(\"progressBar\").value = \"20\";\n\t\t\n\t\t//update phase number status\n\t\t_(\"status\").innerHTML = \"Phase 2 of 3\";\n\t}else{\n\t\t//display error\n\t\t_(\"error1\").innerHTML = \"<h3>Please complete the fields</h3>\";\n\t}\n}//End of validatePhase1()", "title": "" }, { "docid": "7fae66487d19a437738bff17d459d261", "score": "0.5592292", "text": "function validate(inst, vo)\n{\n if (inst.enablePolicy) {\n if (inst.policyInitFunction === 'Custom') {\n if (!isCName(inst.policyInitCustomFunction)) {\n logError(vo, inst, \"policyInitCustomFunction\",\n \"Not a valid C identifier\");\n }\n if (inst.policyInitCustomFunction === '') {\n logError(vo, inst, \"policyInitCustomFunction\",\n \"Must contain a valid function name if the \" +\n \"Policy Init Function field == 'Custom'\");\n }\n }\n if (inst.policyFunction === 'Custom') {\n if (!isCName(inst.policyCustomFunction)) {\n logError(vo, inst, \"policyCustomFunction\",\n \"is not a valid C identifier\");\n }\n if (inst.policyCustomFunction === '') {\n logError(vo, inst, \"policyCustomFunction\",\n \"Must contain a valid function name if the \" +\n \"Policy Function field == 'Custom'\");\n }\n }\n }\n if ((inst.enableHFXTClock)) {\n if ((inst.hfxtFrequency == '0')) {\n if (inst.bypassHFXT) {\n logError(vo, inst, 'hfxtFrequency',\n 'If HFXT is enabled in bypass mode, please specify ' +\n 'the external crystal square wave frequency.');\n } else {\n logError(vo, inst, 'hfxtFrequency',\n 'Specify the desired HFXT oscillator frequency.');\n }\n }\n }\n\n if ((inst.initialPerformanceLevel - inst.customPerformanceLevels) > 3) {\n logError(vo, inst, ['initialPerformanceLevel', 'customPerformanceLevels'],\n 'The initial performance level refers to an undefined custom ' +\n 'performance level.');\n }\n\n if (!isCName(inst.resumeShutdownHookFunction)) {\n logError(vo, inst, \"resumeShutdownHookFunction\", 'Not a valid C identifier');\n }\n\n if (inst.advancedConfiguration) {\n if (!isCName(inst.clockSystemCallback)) {\n logError(vo, inst, \"clockSystemCallback\", 'Not a valid C identifier');\n }\n }\n}", "title": "" }, { "docid": "5848d4cab12bc1859e7bcd0d3a1b0894", "score": "0.5591495", "text": "function run_all_validations(e){\n console.log(\"Running validations\");\n // function validate($elem, non_blank, number_format){\n var error = false;\n if (!validate($(\".validatable #tag\"), true, false)){ error = true;}\n // Elements form //\n if (!validate($(\".validatable #element_tag\"), true, false)){ error = true;}\n if (!validate($(\".validatable #element_product_type_id\"), true, false)){ error = true;}\n // TODO validar kgs\n // if (!validate($(\".validatable #element_weight\"), true, \"integer\")){ error = true;}\n //// HUumidity samples //////////\n if (!validate($(\".validatable #humidity_sample_humidity\"), true, \"integer\")){ error = true;}\n ////Sorbate samples //////////\n if (!validate($(\".validatable #sorbate_sample_sorbate\"), true, \"integer\")){ error = true;}\n ////Caliber samples //////////\n if (!validate($(\".validatable #caliber_sample_sample_weight\"), true, \"integer\")){ error = true;}\n if (!validate($(\".validatable #caliber_sample_fruits_in_sample\"), true, \"integer\")){ error = true;}\n if (!validate($(\".validatable #big_fruits_in_sample\"), true, \"integer\")){ error = true;}\n if (!validate($(\".validatable #small_fruits_in_sample\"), true, \"integer\")){ error = true;}\n if (!validate($(\".validatable #caliber_sample_is_ex_caliber\"), true, false)){ error = true;}\n //// Damage Samples //////////\n // if (!validate($(\".validatable #process_order\"), true, false)){ error = true;}\n if (!validate($(\".validatable #lot\"), true, false)){ error = true;}\n if (!validate($(\".validatable #drying_method_id\"), true, false)){ error = true;}\n if (!validate($(\".validatable #damage_sample_sample_weight\"), true, \"integer\")){ error = true;}\n\n //// Carozo Samples //////////\n if (!validate($(\".validatable #carozo_sample_sample_weight\"), true, \"integer\")){ error = true;}\n if (!validate($(\".validatable #carozo_sample_carozo_weight\"), true, \"integer\")){ error = true;}\n\n //// Descarte Samples //////////\n if (!validate($(\".validatable #product_type\"), true, false)){ error = true;}\n\n //// Group Samples and Group creation //////////\n if (!validate($(\".validatable #humidity_sample_elements_group_id\"), true, false)){ error = true;}\n if (!validate($(\".validatable #caliber_sample_elements_group_id\"), true, false)){ error = true;}\n if (!validate($(\".validatable #damage_sample_elements_group_id\"), true, false)){ error = true;}\n\n if (!validate($(\".validatable #elements_group_first_tag\"), true, false)){ error = true;}\n if (!validate($(\".validatable #elements_group_last_tag\"), true, false)){ error = true;}\n if (!validate($(\".validatable #elements_group_lot\"), true, false)){ error = true;}\n if (!validate($(\".validatable #elements_group_provider\"), true, false)){ error = true;}\n return error;\n}", "title": "" }, { "docid": "bc80b7a5ba57f46798fe2f9718568e62", "score": "0.55857164", "text": "function personalPropertiesValidation(personalProperties) {\n\n var isValid = personalProperties &&\n fieldValidation(personalProperties.university_degree, \"university_degree\") &&\n fieldValidation(personalProperties.degree_graduation_with_honors, \"degree_graduation_with_honors\") &&\n fieldValidation(personalProperties.above_two_years_experience, \"above_two_years_experience\") &&\n fieldValidation(personalProperties.psychometric_above_680, \"psychometric_above_680\") &&\n fieldValidation(personalProperties.multilingual, \"multilingual\") &&\n fieldValidation(personalProperties.volunteering, \"volunteering\") &&\n fieldValidation(personalProperties.full_army_service, \"full_army_service\") &&\n fieldValidation(personalProperties.officer_in_the_military, \"officer_in_the_military\") &&\n fieldValidation(personalProperties.high_school_graduation_with_honors, \"high_school_graduation_with_honors\") &&\n fieldValidation(personalProperties.youth_movements, \"youth_movements\");\n\n if (isValid) {\n for (var property in personalProperties) {\n if (typeof(personalProperties[property]) !== \"boolean\" && property != \"_id\") {\n isValid = false;\n break;\n }\n }\n }\n\n if (!isValid) {\n console.log(\"error in validate personalPropertiesValidation\");\n }\n return isValid;\n}", "title": "" }, { "docid": "3dd323d834270e2858fe8c56cae22812", "score": "0.558257", "text": "function validate1()\n\n { \n var valid=true;\n \n \n var letters = /^[a-zA-Z ]+$/; \n\t\t var address=/^[a-zA-Z0-9.,;/ :]+$/;\n\t\t var alphanum_space=/^[a-zA-Z-0-9\\ ]+$/;\n var alphanum=/^[a-zA-Z0-9]+$/; \n\t\t\t\t \n\t\t var number=/^[0-9]+$/;\n\t\t\t\t var dat2=/^\\d\\d\\/\\d\\d\\/\\d\\d\\d\\d$/;\n\t\t\t\t var path_type=/^(?:[\\w]\\:|\\\\)(\\\\[a-z_\\-\\s0-9\\.]+)+\\.(gpeg|gif|png|jpg)$/\n\t\t \n\t\t\t\t var name=document.form1.full_name.value.trim();\n\t\t var pob=document.form1.place_of_birth.value.trim().toUpperCase();\n\t\t var hadd=document.form1.home_address.value;\n\t\t\t var son_of=document.form1.son_of.value.trim().toUpperCase();\n\t\t var pn=document.form1.passport_no.value.trim().toUpperCase();\n\t\t\t var pois=document.form1.place_of_issue.value.trim().toUpperCase();\n\t\t\t var cname=document.form1.carriers_name.value.trim().toUpperCase();\n\t\t\t var prv_n=document.form1.previous_nationality.value.trim().toUpperCase();\n\t\t\t var dest=document.form1.destination.value.trim();\n\t\t\t var pr_n=document.form1.present_nationality.value.trim().toUpperCase();\n\t\t\t var relgn=document.form1.religion.value.trim().toUpperCase();\n\t\t\t var sect=document.form1.sect.value.trim().toUpperCase();\n\t\t\t\t var profession=document.form1.profession.value.trim();\n\t\t\t\t var hadd=document.form1.home_address.value.trim().toUpperCase();\n\t\t\t\t var tn=document.form1.telephone_no .value.trim().toUpperCase();\n\t\t\t\t var rel=document.form1.relationship.value.toUpperCase();\n\t\t\t\t var dosik=document.form1.duration_of_stay_in_kindom.value.trim().toUpperCase();\n\t\t\t\t var visa_no=document.form1.visa_no.value.trim().toUpperCase();\n\t\t\t\t var dop=document.form1.date_of_passport.value.trim();\n\t\t\t\t var status=document.form1.status.value;\n\t\t\t\t var sex=document.form1.sex.value.trim();\n\t\t\t\t var mst=document.form1.marital_status.value.trim();\n\t\t\t\t var qlf=document.form1.qualification.value;\n\t\t\t\t var pot=document.form1.purpose_of_travel.value.trim();\n\t\t\t\t var pexp=document.form1.date_of_passport_expiry.value.trim();\n\t\t\t\t var doa=document.form1.date_of_arrival.value.trim();\n\t\t\t\t var dod=document.form1.date_of_departure.value.trim();\n\t\t var mop=document.form1.mode_of_payment.value.trim();\n\t\t\t\t var dob=document.form1.date_of_birth.value.trim();\n\t\t\t\n\t\t\n \n\t\t \n\t\t\t if(name==\"\" || name.match(letters)==null )\n\t\t\t {\n\t\t\t\t\n\t\t\t\talert(\"Name is not valid\");\n\t\t\t\tvalid=false;\n\t\t\t\n\t\t\t }\n \n\t\t\telse if(son_of==\"\" || son_of.match(letters)==null )\n\t\t\t {\n\t\t\t\talert(\"Father Name Is Not Valid\");\n\t\t\t\tvalid=false;\n\t\t\t }\n\t\t\telse if(status==\"-1\")\n\t\t\t {\n\t\t\t\talert(\"enter status\");\n\t\t\t\tvalid=false;\n\t\t\t }\n\t\t\telse if(dob=\"\"|| dob!=dob.match(dat2))\n\t\t\t\t{\n\t\t\t\t\talert(\"enter valid Date Of Birth\");\n\t\t\t\t\tvalid=false;\n\t\t\t\t}\n\t\t\t\telse if(pob==\"\" || pob!=pob.match(letters) )\n\t\t\t {\n\t\t\t\talert(\"Place Of Birth Is Not Valid\");\n\t\t\t\tvalid=false;\n\t\t\t }\n\t\t\t\telse if(prv_n==\"\" || prv_n!=prv_n.match(letters) )\n\t\t\t {\n\t\t\t\talert(\"Please Enter a Valid Name For Prevois Nationality\");\n\t\t\t\tvalid=false;\n\t\t\t }\n\t\t\t\n\t\t\telse if(pr_n==\"\" || pr_n!=pr_n.match(letters) )\n\t\t\t{\n\t\t\t\talert(\"Please Enter a Valid Name For Present Nationality\");\n\t\t\t\tvalid=false;\n\t\t\t}\n\t\t\telse if(sex==\"-1\")\n\t\t\t\t{\n\t\t\t\t\talert(\"enter gender\");\n\t\t\t\t\tvalid=false;\n\t\t\t\t}\n\t\t\telse if(mst==\"-1\")\n\t\t\t\t{\n\t\t\t\t\talert(\"enter valid marital status\");\n\t\t\t\t\tvalid=false;\n\t\t\t\t}\n\t\t\t\telse if(sect==\"\" || sect!=sect.match(letters) )\n\t\t\t{\n\t\t\t\talert(\"Please Enter Your Sect\");\n\t\t\t\tvalid=false;\n\t\t\t}\n\t\t\telse if(relgn==\"\" || relgn!=relgn.match(letters) )\n\t\t\t{\n\t\t\t\talert(\"Please Enter Your Relegion\");\n\t\t\t\tvalid=false;\n\t\t\t}\n\t\t\telse if(pois==\"\" || pois!=pois.match(letters) )\n\t\t\t{\n\t\t\t\talert(\"Place Of Issue Is Not Valid\");\n\t\t\t\tvalid=false;\n\t\t\t}\n\t\t\telse if(qlf==\"-1\")\n\t\t\t\t{\n\t\t\t\t\talert(\"enter qualification\");\n\t\t\t\t\tvalid=false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if(profession==\"\" || profession.match(letters)==null)\n\t\t\t\t{\n\t\t\t\t\talert(\"enter profession\");\n\t\t\t\t\tvalid=false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if(hadd==\"\" || hadd!=hadd.match(address) )\n\t\t\t{\n\t\t\t\talert(\"Please Enter Home Address\");\n\t\t\t\tvalid=false;\n\t\t\t}\n\t\t\telse if(tn==\"\" || tn!=tn.match(number) )\n\t\t\t{\n\t\t\t\talert(\"Enter Valid Phone Number\");\n\t\t\t\tvalid=false;\n\t\t\t}\n\t\t\telse if(pot==\"-1\")\n\t\t\t\t{\n\t\t\t\t\talert(\"enter purpose of travel\");\n\t\t\t\t\tvalid=false;\n\t\t\t\t}\n\t\t\t\telse if(dop=\"\"|| dop!=dop.match(dat2))\n\t\t\t\t{\n\t\t\t\t\talert(\"enter valid date for passport\");\n\t\t\t\t\tvalid=false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\telse if(pn!=pn.match(alphanum))\n\t\t\t{\n\t\t\t\talert(\"Passport Number Is Not Valid\");\n\t\t\t\tvalid=false;\n\t\t\t}\n\t\t\telse if(pexp=\"\"|| pexp!=pexp.match(dat2))\n\t\t\t\t{\n\t\t\t\t\talert(\"enter valid date for passport expiry\");\n\t\t\t\t\tvalid=false;\n\t\t\t\t}\n\t\t\t\telse if(dosik==\"\" || dosik!=dosik.match(alphanum_space) )\n\t\t\t{\n\t\t\t\talert(\"Please Enter Duration Of Stay In Kindom\");\n\t\t\t\tvalid=false;\n\t\t\t}\n\t\t\telse if(doa=\"\"|| doa!=doa.match(dat2))\n\t\t\t\t{\n\t\t\t\t\talert(\"enter valid date for arrival\");\n\t\t\t\t\tvalid=false;\n\t\t\t\t}\n\t\t\t\telse if(dod=\"\"|| dod!=dod.match(dat2))\n\t\t\t\t{\n\t\t\t\t\talert(\"enter valid date for departure\");\n\t\t\t\t\tvalid=false;\n\t\t\t\t}\n\t\t\t\t\telse if( mop!=mop.match(letters) )\n\t\t\t{\n\t\t\t\talert(\"Enter Valid Mode of Payment\");\n\t\t\t\tvalid=false;\n\t\t\t}\n\t\t\telse if( rel!=rel.match(letters) )//relationship may be null\n\t\t\t{\n\t\t\t\talert(\"Enter Valid Name For Relationship\");\n\t\t\t\tvalid=false;\n\t\t\t}\n\t\t\telse if(dest==\"\" || dest!=dest.match(letters) )\n\t\t\t{\n\t\t\t\talert(\"Destination Name Is Not Valid\");\n\t\t\t\tvalid=false;\n\t\t\t}\n\t\t\t\n\t\t\telse if(cname==\"\" || cname!=cname.match(letters) )\n\t\t\t{\n\t\t\t\talert(\"Carrier's Name Is Not Valid\");\n\t\t\t\tvalid=false;\n\t\t\t}\n\t\t\telse \n\t\t\t\n\t\t\t{\n\t\t\tif(visa_no==\"\" || visa_no!=visa_no.match(alphanum) )\n\t\t\t{\n\t\t\t\talert(\"Please Enter Valid Visa Number\");\n\t\t\t\tvalid=false;\n\t\t\t}\n\t\t\t}\n\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t \n\t\treturn valid;\t\t\t\t\t\t \n }", "title": "" }, { "docid": "3fd08e082baba7d3dfc2ba1cd55efa33", "score": "0.5580588", "text": "function workThroughForm() {\n getValues();\n if (name.length >= 2 && name.length <= 30) {\n if (age >= 18 && age <= 120 && !isNaN(age)) {\n if (hpower >= 40 && hpower <= 1100 && !isNaN(age)) {\n grabSelection();\n if (b == 0) {\n alert(\"Please choose your country.\");\n } else {\n genderSelection();\n \n if (x == 0) {\n alert(\"Please choose your sex.\");\n } else {\n actualDate();\n calculateInsurance();\n print(); \n }\n }\n } else {\n alert(\"Please enter the valid Horse Power value between 40 and 1200 HP\");\n }\n } else {\n alert(\"Please enter valid age between 18 and 120 years\");\n }\n } else {\n alert(\"Please enter valid name\");\n }\n\n }", "title": "" }, { "docid": "65aee7941c32c39909771f5f3e243a81", "score": "0.5580442", "text": "static centerValidations() {\n return [\n body('name')\n .exists()\n .withMessage('missing center name field')\n .trim()\n .isLength({ min: 1, max: 100 })\n .withMessage('center name must be between 1 and 100 characters long'),\n body('description')\n .exists()\n .withMessage('missing center description field')\n .trim()\n .isLength({ min: 1 })\n .withMessage('empty center description not allowed'),\n body('facilities')\n .exists()\n .withMessage('missing center facilities field')\n .trim()\n .isLength({ min: 1, max: 300 })\n .withMessage('center facilities must be between 1 and 300 characters long'),\n body('address')\n .exists()\n .withMessage('missing center address field')\n .trim()\n .isLength({ min: 1, max: 100 })\n .withMessage('center address must be between 1 and 100 characters long'),\n body('capacity')\n .exists()\n .withMessage('missing center capacity field'),\n body('cost')\n .exists()\n .withMessage('missing center cost field'),\n sanitize('capacity').toInt(),\n sanitize('cost').toInt(),\n ];\n }", "title": "" }, { "docid": "67e47b15daa31c0189f881998ca3cc8c", "score": "0.55614007", "text": "function validateForm() {\n\tvar mybills = document.forms[\"myForm\"][\"mybills\"].value;\n\t\tif(!mybills){\n\t\t document.getElementById('widget_uniidsettings_60').innerHTML=\"<span style='color:red'>*This field is Required.</span>\";\n\t\t \tdocument.getElementById('widget_uniidsettings_60').focus();\n\t\t return false;\n\t\t}else{\n \tdocument.getElementById(\"widget_uniidsettings_60\").innerHTML=\"\";\n }\n\t\t\n\t\tvar largerFamily = document.forms[\"myForm\"][\"largerFamily\"].value;\n\t\tif(!largerFamily){\n\t\t document.getElementById('widget_settings_61').innerHTML=\"<span style='color:red'>*This field is Required.</span>\";\n\t\t \tdocument.getElementById('widget_settings_61').focus();\n\t\t return false;\n\t\t}else{\n \tdocument.getElementById(\"widget_settings_61\").innerHTML=\"\";\n }\n\t\t\n\t\tvar buyNewVehicle = document.forms[\"myForm\"][\"buyNewVehicle\"].value;\n\t\tif(!buyNewVehicle){\n\t\t document.getElementById('widget_settings_62').innerHTML=\"<span style='color:red'>*This field is Required.</span>\";\n\t\t \tdocument.getElementById('widget_settings_62').focus();\n\t\t return false;\n\t\t}else{\n \tdocument.getElementById(\"widget_settings_62\").innerHTML=\"\";\n }\n\t\t\n\t\tvar recreatStoreHome = document.forms[\"myForm\"][\"recreatStoreHome\"].value;\n\t\tif(!recreatStoreHome){\n\t\t document.getElementById('widget_settings_63').innerHTML=\"<span style='color:red'>*This field is Required.</span>\";\n\t\t \tdocument.getElementById('widget_settings_63').focus();\n\t\t return false;\n\t\t}else{\n \tdocument.getElementById(\"widget_settings_63\").innerHTML=\"\";\n }\n\t\t\n\t\tvar riskTaker = document.forms[\"myForm\"][\"riskTaker\"].value;\n\t\tif(!riskTaker){\n\t\t document.getElementById('widget_settings_64').innerHTML=\"<span style='color:red'>*This field is Required.</span>\";\n\t\t \tdocument.getElementById('widget_settings_64').focus();\n\t\t return false;\n\t\t}else{\n \tdocument.getElementById(\"widget_settings_64\").innerHTML=\"\";\n }\n\t\t\n\t\treturn true;\n}", "title": "" }, { "docid": "cb999d9e0c375e784dda8c501faf450d", "score": "0.555842", "text": "function validate(o) {\n // We're going to check every field except cid\n // The first 3 are numeric. Easy city...\n if(o==undefined) return;\n field=\"byr\";\n var x=parseInt(o[field]);\n if(x<1920||x>2002) return;\n\n field=\"iyr\";\n x=parseInt(o[field]);\n if(x<2010||x>2020) return;\n\n field=\"eyr\";\n x=parseInt(o[field]);\n if(x<2020||x>2030) return;\n\n field=\"hgt\";\n x=parseInt(o[field]);\n // parseInt will ignore cm/in\n var min,max;\n if(o.hgt.substr(-2)==\"cm\") {\n min=150; max=193;\n } else if(o.hgt.substr(-2)==\"in\") {\n min=59; max=76;\n } else return;\n if(x<min||x>max) return;\n\n field=\"hcl\";\n var r=RegExp(/^#[0-9a-f]{6}$/);\n // regex at the rescue as usual...\n if(!r.test(o[field])) return;\n\n field=\"ecl\";\n r=RegExp(/^(amb|blu|brn|gry|grn|hzl|oth)$/);\n // can't be simpler...\n if(!r.test(o[field])) return;\n\n field=\"pid\";\n r=RegExp(/^\\d\\d\\d\\d\\d\\d\\d\\d\\d$/);\n // nuff said?\n if(!r.test(o[field])) return;\n valid+=1;\n}", "title": "" }, { "docid": "28e42564e1c89bf400db30b22448bdb8", "score": "0.55575645", "text": "fieldValid (data) {\n let result = {};\n for (let fieldName in data) {\n if (typeof this.state.fieldValid[fieldName] !== 'undefined') {\n result[fieldName] = this.isFieldValid(fieldName, data[fieldName]);\n }\n }\n return result;\n }", "title": "" }, { "docid": "96c7b2fd9f26aea13fc2a20c2f205167", "score": "0.5557515", "text": "stripeValidateFields() {\n const { card_number, exp_month, exp_year, cvc } = this.state;\n\n var card_errs = {};\n\n var num_err = Stripe.card.validateCardNumber(card_number);\n var expiry_err = Stripe.card.validateExpiry(exp_month, exp_year);\n var cvc_err = Stripe.card.validateCVC(cvc);\n\n card_errs.stripe_address = [this.state.stripe_address, \"Can't be blank\"];\n card_errs.stripe_city = [this.state.stripe_city, \"Can't be blank\"];\n card_errs.stripe_state = [this.state.stripe_state, \"Can't be blank\"];\n card_errs.stripe_zipcode = [this.state.stripe_zipcode, \"Can't be blank\"];\n card_errs.card_number = [num_err, \"Please enter a valid card number\"];\n card_errs.exp_month = [expiry_err, \"Please enter a valid expiration date\"];\n card_errs.cvc = [cvc_err, \"Please enter a valid cvc number\"];\n\n var validated = true;\n var error_info = {};\n for (var err_type in card_errs) {\n if (!card_errs[err_type][0]) {\n validated = false;\n error_info[err_type] = card_errs[err_type][1];\n }\n }\n this.setState({errors: error_info});\n return validated;\n }", "title": "" }, { "docid": "7e0969fba59eccce73dc30020f31aa4e", "score": "0.5557239", "text": "function checkDeliveryAddressFields() {\t// Check the delivery details filelds in the 1st panel of the accordion.\n /* v1 */\n /*\n var checkOk = true;\n\n //checkOk = checkOk && (/^[\\wА-Яа-я\\.,\\-\\(\\) ]+$/i.test( document.getElementById(\"client_fullname\").value ));\n checkOk = checkOk && (document.getElementById(\"client_fullname\").value);\n //checkOk = checkOk && (/^[\\wА-Яа-я\\.,\\-\\(\\) ]+$/i.test( document.getElementById(\"delivery_address\").value ));\n checkOk = checkOk && (document.getElementById(\"delivery_address\").value);\n checkOk = checkOk && (/^(\\+\\d)?[0-9\\-\\(\\) ]{5,}$/i.test( document.getElementById(\"client_phone\").value ));\n checkOk = checkOk && (/^[\\w\\.\\-]+@[\\w\\.\\-]+.[\\w\\.\\-]+$/i.test( document.getElementById(\"client_email\").value ));\n\n return checkOk; \n */\n /* /v1 */\n\n /* v2 */\n var checkMsg = \"\";\n\n var clientFullname = document.getElementById(\"client_fullname\");\n var deliveryAddress = document.getElementById(\"delivery_address\");\n var clientPhone = document.getElementById(\"client_phone\");\n var clientEmail = document.getElementById(\"client_email\");\n\n !(/^[\\w\\.\\-]+@[\\w\\.\\-]+\\.[\\w\\.\\-]+$/i.test( clientEmail.value )) && ( checkMsg = \"Введите правильный E-mail\\n\"+checkMsg, clientEmail.focus() );\n !(/^(\\+\\d)?[0-9\\-\\(\\) ]{5,}$/i.test( clientPhone.value )) && ( checkMsg = \"Введите правильный номер телефона\\n\"+checkMsg, clientPhone.focus() );\n !(deliveryAddress.value) && ( checkMsg = \"Введите населенный пункт\\n\"+checkMsg, deliveryAddress.focus() );\n !(clientFullname.value) && ( checkMsg = \"Введите ФИО\\n\"+checkMsg, clientFullname.focus() );\n\n return checkMsg; \n /* /v2 */\n }", "title": "" }, { "docid": "3bf206c8a61758d511feebf882acb18f", "score": "0.55511516", "text": "function validateBillingAddress() {\n var result = { success: true };\n var firstName =(session.forms.billing.addressFields.firstName.value); \n\tvar lastName =(session.forms.billing.addressFields.lastName.value);\n\tvar city = (session.forms.billing.addressFields.city.value);\n\tvar country = (session.forms.billing.addressFields.country.value);\n\tvar email = (session.forms.billing.creditCardFields.email.value);\n\tvar phoneNumber = (session.forms.billing.creditCardFields.phone.value);\n\tvar postalCode = (session.forms.billing.addressFields.postalCode.value);\n\tvar state = (session.forms.billing.addressFields.states.stateCode.value);\n\tvar street1 = (session.forms.billing.addressFields.address1.value);\n var errorMsg = [];\n var Resource = require('dw/web/Resource');\n if (!validFieldData(firstName, 0, 50)) {\n errorMsg.push(Resource.msg('address.firstname.missing', 'forms', null));\n }\n if (!validFieldData(lastName, 0, 50)) {\n errorMsg.push(Resource.msg('address.lastname.missing', 'forms', null));\n }\n if (!validFieldData(street1, 0, 50)) {\n errorMsg.push(Resource.msg('resource.addresserror', 'forms', null));\n }\n if (!validFieldData(city, 2, 50)) {\n errorMsg.push(Resource.msg('address.city.missing', 'forms', null));\n }\n if (!validFieldData(postalCode, 5, 10)) {\n errorMsg.push(Resource.msg('resource.errorzip', 'forms', null));\n } else {\n var postalCodeVal = '';\n switch (country.toLowerCase()) {\n case 'us':\n postalCodeVal = postalCode.match(/(^\\d{5}(-\\d{4})?$)|(^[abceghjklmnprstvxyABCEGHJKLMNPRSTVXY]{1}\\d{1}[A-Za-z]{1} *\\d{1}[A-Za-z]{1}\\d{1}$)/gi);\n break;\n case 'gb':\n postalCodeVal = postalCode.match(/(^([A-PR-UWYZ0-9][A-HK-Y0-9][AEHMNPRTVXY0-9]?[ABEHMNPRVWXY0-9]? {1,2}[0-9][ABD-HJLN-UW-Z]{2}|GIR 0AA)$)/gi);\n break;\n case 'fr':\n postalCodeVal = postalCode.match(/(^(F-)?((2[A|B])|[0-9]{2})[0-9]{3}$)/gi);\n break;\n case 'it':\n postalCodeVal = postalCode.match(/(^([0-9]){5}$)/gi);\n break;\n case 'jp':\n postalCodeVal = postalCode.match(/(^([0-9]){3}[-]([0-9]){4}$)/gi);\n break;\n case 'cn':\n postalCodeVal = postalCode;\n break;\n default:\n postalCodeVal = postalCode;\n break;\n }\n if (empty(postalCodeVal) || postalCodeVal === '') {\n errorMsg.push(Resource.msg('resource.errorzip', 'forms', null));\n }\n }\n if (!validFieldData(country, 0, 100)) {\n errorMsg.push(Resource.msg('address.country.missing', 'forms', null));\n }\n if (!validFieldData(phoneNumber, 0, 20)) {\n errorMsg.push(Resource.msg('address.phone.missing', 'forms', null));\n }\n if (validFieldData(email, 0, 50)) {\n var emailVal = email.match(/^[\\w.%+-]+@[\\w.-]+\\.[\\w]{2,6}$/gi);\n if (empty(emailVal) || emailVal === '') {\n errorMsg.push(Resource.msg('address.email.invalid', 'forms', null));\n }\n } else {\n errorMsg.push(Resource.msg('address.email.invalid', 'forms', null));\n }\n if (errorMsg.length > 0) {\n var errormsg = errorMsg.join();\n result = { error: true, errorMsg: errormsg };\n }\n return result;\n}", "title": "" }, { "docid": "175ce3dbe025a864155b277cb6c4e64c", "score": "0.554864", "text": "function validate_fen(fen) {\n var errors = {\n 0: 'No errors.',\n 1: 'FEN string must contain six space-delimited fields.',\n 2: '6th field (move number) must be a positive integer.',\n 3: '5th field (half move counter) must be a non-negative integer.',\n 4: '4th field (en-passant square) is invalid.',\n 5: '3rd field (castling availability) is invalid.',\n 6: '2nd field (side to move) is invalid.',\n 7: '1st field (piece positions) does not contain 8 \\'/\\'-delimited rows.',\n 8: '1st field (piece positions) is invalid [consecutive numbers].',\n 9: '1st field (piece positions) is invalid [invalid piece].',\n 10: '1st field (piece positions) is invalid [row too large].',\n 11: 'Illegal en-passant square',\n };\n\n /* 1st criterion: 6 space-seperated fields? */\n var tokens = fen.split(/\\s+/);\n if (tokens.length !== 6) {\n return {valid: false, error_number: 1, error: errors[1]};\n }\n\n /* 2nd criterion: move number field is a integer value > 0? */\n if (isNaN(tokens[5]) || (parseInt(tokens[5], 10) <= 0)) {\n return {valid: false, error_number: 2, error: errors[2]};\n }\n\n /* 3rd criterion: half move counter is an integer >= 0? */\n if (isNaN(tokens[4]) || (parseInt(tokens[4], 10) < 0)) {\n return {valid: false, error_number: 3, error: errors[3]};\n }\n\n /* 4th criterion: 4th field is a valid e.p.-string? */\n if (!/^(-|[abcdefgh][36])$/.test(tokens[3])) {\n return {valid: false, error_number: 4, error: errors[4]};\n }\n\n /* 5th criterion: 3th field is a valid castle-string? */\n if( !/^(KQ?k?q?|Qk?q?|kq?|q|-)$/.test(tokens[2])) {\n return {valid: false, error_number: 5, error: errors[5]};\n }\n\n /* 6th criterion: 2nd field is \"w\" (white) or \"b\" (black)? */\n if (!/^(w|b)$/.test(tokens[1])) {\n return {valid: false, error_number: 6, error: errors[6]};\n }\n\n /* 7th criterion: 1st field contains 8 rows? */\n var rows = tokens[0].split('/');\n if (rows.length !== 8) {\n return {valid: false, error_number: 7, error: errors[7]};\n }\n\n /* 8th criterion: every row is valid? */\n for (var i = 0; i < rows.length; i++) {\n /* check for right sum of fields AND not two numbers in succession */\n var sum_fields = 0;\n var previous_was_number = false;\n\n for (var k = 0; k < rows[i].length; k++) {\n if (!isNaN(rows[i][k])) {\n if (previous_was_number) {\n return {valid: false, error_number: 8, error: errors[8]};\n }\n sum_fields += parseInt(rows[i][k], 10);\n previous_was_number = true;\n } else {\n if (!/^[prnbqkPRNBQK]$/.test(rows[i][k])) {\n return {valid: false, error_number: 9, error: errors[9]};\n }\n sum_fields += 1;\n previous_was_number = false;\n }\n }\n if (sum_fields !== 8) {\n return {valid: false, error_number: 10, error: errors[10]};\n }\n }\n\n if ((tokens[3][1] == '3' && tokens[1] == 'w') ||\n (tokens[3][1] == '6' && tokens[1] == 'b')) {\n return {valid: false, error_number: 11, error: errors[11]};\n }\n\n /* everything's okay! */\n return {valid: true, error_number: 0, error: errors[0]};\n }", "title": "" }, { "docid": "ceb3c258e0eead1e481dad0ea99b0095", "score": "0.5547275", "text": "function validateForm(form){\n\n //contains form errors\n var errors = [];\n //contains form errors\n\n\n //Check validity for name\n if (form.confused_philosopher.value == \"\") {\n\n errors.push(\"1. Name is empty! - Please type your name.\");\n\n }\n //Check validity for name\n\n\n //Check validity for email \n var mailformat = /^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,3})+$/;\n\n if(!form.address.value.match(mailformat)){\n \n errors.push(\"2. Please check your email format!\");\n\n } \n //Check validity for email \n\n\n //Check validity for postal code \n var postal_code_format = /^\\s*[a-ceghj-npr-tvxy]\\d[a-ceghj-npr-tv-z](\\s)?\\d[a-ceghj-npr-tv-z]\\d\\s*$/i;\n\n if(!form.postal.value.match(postal_code_format)){\n\n errors.push(\"3. Please check your postal code again!\");\n }\n //Check validity for postal code \n\n\n //Check validity for selected options\n if(form.origin.selectedIndex==\"\"){\n\n errors.push(\"4. Please give us your opinion!\");\n }\n //Check validity for selected options\n\n\n //Check validity for checkbox\n var itemsChecked = checkArray(form, \"composition[]\");\n\n if(itemsChecked.length == 0) {\n\n errors.push(\"5. Please select at least one! \");\n } \n //Check validity for checkbox\n\n\n //Check validity for number of planets\n var number=document.forms[\"UniverseForm\"][\"howmany\"].value;\n\n var numberFormat=/^[0-9]+$/;\n\n if (!number.match(numberFormat)){\n \n errors.push(\"6. Please tell us how many planets are there!\");\n\n } \n //Check validity for number of planets\n\n\n //Check validity for radio\n var radio1 = document.getElementById('r').checked;\n var radio2 = document.getElementById('y').checked;\n var radio3 = document.getElementById('g').checked;\n var radio4 = document.getElementById('b').checked;\n var radio5 = document.getElementById('p').checked;\n\n if((radio1==\"\")&&(radio2==\"\")&(radio3==\"\")&(radio4==\"\")&(radio5==\"\")){\n\n errors.push(\"7. Please tell us what's the color of Mars!\");\n\n }\n //Check validity for radio\n\n\n //Check validity for pi\n var decimal=document.forms[\"UniverseForm\"][\"pi\"].value;\n\n var decimalFormat=/^\\d+\\.?\\d*$/;\n \n if (!decimal.match(decimalFormat)){\n \n errors.push(\"8. Please enter a decimal number!\");\n \n } \n //Check validity for pi\n\n\n\n //display error messages\n if (errors.length > 0) {\n\n var msg = \"ERRORS:\\n\\n\";\n\n for(var i=0; i < errors.length; i++){\n\n msg+=errors[i] + \"\\n\";\n }\n\n alert(msg);\n\n return false;\n }\n //display error messages\n \n}", "title": "" }, { "docid": "350c6bec1bd2d71fd7f7a3aa60215c6d", "score": "0.5534108", "text": "function MVRRequireFields(searchValue) {\n RequireOff(\"lblAppFname\");\n RequireOff(\"lblAppMiddlename\");\n RequireOff(\"lblAppLname\"); \n RequireOff(\"lblAppBirthDay\");\n RequireOff(\"lblAppssn\");\n RequireOff(\"lblAppGender\");\n var j = 0;\n var array;\n controlsName.length = 0;\n lableName.length = 0;\n var myXML = $(loadedXML).find(\"MVRstate\").filter(function () {\n return $(this).find('id').text() == searchValue;\n });\n var display = myXML.children().map(function () {\n return $(this).text();\n }).get();\n if (display[1] !== null || display[1] != \"\") {\n array = display[1].split(';');\n }\n else\n AlertBox('novalue');\n if (array[0] != \"NA\") {\n for (var i = 0; i < array.length; ++i) {\n var result = $(loadedXML).find(\"field\").filter(function () {\n return $(this).find('id').text() == array[i];\n });\n var controlName = result.children().map(function () {\n return $(this).text();\n }).get();\n RequireOn(controlName[1]);\n lableName[j] = controlName[3];\n controlsName[j] = controlName[2];\n j++;\n }\n }\n lableName[j] = \"Driver's License Number\";\n controlsName[j] = \"txtAppDriverLicNo\";\n }", "title": "" }, { "docid": "01e7ed9ae5406160f5f3f0fa257a3fde", "score": "0.5517139", "text": "function validateData(mode,snvtType, field, valueStr) {\r\n\r\n\t/* **** Begin -- *** Custom Web page #6 *** -Change code below ***** */\r\n\tvar bResult = false;\r\n\tvar sErrMsg = \"\";\r\n\tvar json;\r\n\tvar value;\r\n\tvar x;\r\n\ttry\r\n\t{\r\n\t\tjson = JSON.parse(valueStr);\r\n\t\tif(snvtType == \"SNVT_switch\")\r\n\t\t{\r\n\t\t\t\r\n\t\t\tfor (x in json) \r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\tif(x == \"state\")\r\n\t\t\t\t{\r\n\t\t\t\t\tbResult = true;\r\n\t\t\t\t\tvalue = json[x];\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(!((value >= 0) && (value <= 1))) {\t\r\n\t\t\t\t\t\tbResult = false;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse if(x == \"value\")\r\n\t\t\t\t{\r\n\t\t\t\t\tbResult = true;\r\n\t\t\t\t\tvalue = json[x];\r\n\t\t\t\t\tif(!((value >= 0) && (value <= 100))) {\r\n\t\t\t\t\t\tbResult = false;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tbResult = false;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(!bResult)\r\n\t\t\t{\r\n\t\t\t\tif(field == \"\")\r\n\t\t\t\t\tsErrMsg = \"state: 0 - 1, value = 0 - 100\"; \r\n\t\t\t\telse if (field == \"state\")\r\n\t\t\t\t\tsErrMsg = \"valid values: 0 or 1\"; \r\n\t\t\t\telse if (field == \"value\")\r\n\t\t\t\t\tsErrMsg = \"valid values: 0-100\"; \r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tcatch (err) {}\r\n\tif(!bResult && (mode == 1))\r\n\t{\r\n\t\talert(\"value is incorrect:\\n \" + valueStr + \"\\n\\nValid value:\\n \" + sErrMsg + \"\\n\\nPlease try again\");\r\n\t}\r\n\r\n\t/* **** End -- *** Custom Web page #6 *** - Change code above ***** */\r\n\treturn bResult;\r\n}", "title": "" }, { "docid": "43e79078bbb949ef549a1deeb0086667", "score": "0.55124724", "text": "function validateForm() {\n\n\tvar likelyProperty = document.forms[\"myForm\"][\"likelyProperty\"].value;\n\t\tif(!likelyProperty){\n\t\t document.getElementById('widget_settings_65').innerHTML=\"<span style='color:red'>*This field is Required.</span>\";\n\t\t return false;\n\t\t}else{\n \tdocument.getElementById(\"widget_settings_65\").innerHTML=\"\";\n }\n\t\t\n\t\tvar sameJob = document.forms[\"myForm\"][\"sameJob\"].value;\n\t\tif(!sameJob){\n\t\t document.getElementById('widget_settings_66').innerHTML=\"<span style='color:red'>*This field is Required.</span>\";\n\t\t return false;\n\t\t}else{\n \tdocument.getElementById(\"widget_settings_66\").innerHTML=\"\";\n }\n\t\t\n\t\tvar incomeGoing = document.forms[\"myForm\"][\"incomeGoing\"].value;\n\t\tif(!incomeGoing){\n\t\t document.getElementById('widget_settings_67').innerHTML=\"<span style='color:red'>*This field is Required.</span>\";\n\t\t return false;\n\t\t}else{\n \tdocument.getElementById(\"widget_settings_67\").innerHTML=\"\";\n }\n\t\t\n\t\tvar OneMoreProp = document.forms[\"myForm\"][\"OneMoreProp\"].value;\n\t\tif(!OneMoreProp){\n\t\t document.getElementById('widget_settings_68').innerHTML=\"<span style='color:red'>*This field is Required.</span>\";\n\t\t return false;\n\t\t}else{\n \tdocument.getElementById(\"widget_settings_68\").innerHTML=\"\";\n }\n\t\t\n\t\treturn true;\n}", "title": "" }, { "docid": "84c3c6317574b1e7650ee47a99d5866d", "score": "0.55073017", "text": "function validate()\r\n\t\t{\r\n\t\t\tvar NAME = document.getElementById(\"regName\").value;\r\n\t\t\tvar STREET = document.getElementById(\"streetName\").value;\r\n\t\t\tvar CITY = document.getElementById(\"cityName\").value;\r\n\t\t\tvar POSTALCODE = document.getElementById(\"pc\").value;\r\n\t\t\tvar nameMatch = NAME.match(/\\b[^\\d\\s]+\\b/g);\r\n\t\t\tvar streetMatch = /^[0-9]+[\\s]+[a-zA-Z\\s]+$/;\t//street has to start with a number followed by a space and then the words\r\n\t\t\tvar cityMatch = /^[a-zA-Z\\s]+$/;\t\t\t\t//city name has to be alphabetical characters\r\n\t\t\tvar pcMatch = /^[A-Za-z]+[0-9]+[A-Za-z]+[0-9]+[A-Za-z]+[0-9]/;\t//postal code should be in this syntax:(alpha+numeric+alpha+numeric+alpha+numeric)\r\n\t\t\tvar valid = true;\r\n\t\t\tif((NAME.length == 0) || (STREET.length == 0) || (CITY.length==0) || (POSTALCODE.length==0))\r\n\t\t\t{\r\n\t\t\t\tif (NAME.length == 0) {document.getElementById(\"nameError\").innerHTML = \"Please enter your First and Last name\";}\r\n\t\t\t\tif (STREET.length == 0) {document.getElementById(\"streetError\").innerHTML = \"Please enter your Street Address\";}\r\n\t\t\t\tif (CITY.length == 0) {document.getElementById(\"cityError\").innerHTML = \"Please enter your City Address\";}\r\n\t\t\t\tif (POSTALCODE.length==0) {document.getElementById(\"pcError\").innerHTML = \"Please enter your Postal code\";}\r\n\t\t\t\tif (document.registration.selectProvince.value == \"0\") {document.getElementById(\"provinceError\").innerHTML = \"Please select a province\";}\r\n\t\t\t\tvalid = false;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t//name validation \r\n\t\t\t\tif (nameMatch && nameMatch.length != 2) \t//first name and last name can only be 2 words\r\n\t\t\t\t{\r\n\t\t\t\t\tdocument.getElementById(\"nameError\").innerHTML = \"Please write only your First Name and Last Name with a space in between and use only alphabetic characters\";\r\n\t\t\t\t\tvalid = false;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t\tvar re = /^[A-Za-z\\s]+$/;\r\n\t\t\t\t\t\tif(re.test(NAME))\r\n\t\t\t\t\t\t{document.getElementById(\"nameError\").innerHTML = \"\";}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tdocument.getElementById(\"nameError\").innerHTML = \"Please enter only alphabetic characters\";\r\n\t\t\t\t\t\t\tvalid = false;\r\n\t\t\t\t\t\t} \r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//Street validation\r\n\t\t\t\tif (STREET.match(streetMatch))\t\r\n\t\t\t\t{\r\n\t\t\t\t\tdocument.getElementById(\"streetError\").innerHTML = \"\";\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tdocument.getElementById(\"streetError\").innerHTML = \"Please enter the street number first followed by a space and the street name\";\r\n\t\t\t\t\tvalid = false;\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//city validation\r\n\t\t\t\tif(CITY.match(cityMatch))\r\n\t\t\t\t{\r\n\t\t\t\t\tdocument.getElementById(\"cityError\").innerHTML = \"\";\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tdocument.getElementById(\"cityError\").innerHTML = \"Please enter only alphabetic characters\";\r\n\t\t\t\t\tvalid = false;\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//province validation\r\n\t\t\t\tif(document.registration.selectProvince.value == \"0\")\r\n\t\t\t\t{\r\n\t\t\t\t\tdocument.getElementById(\"provinceError\").innerHTML = \"Please select a province\";\r\n\t\t\t\t\tvalid = false;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tdocument.getElementById(\"provinceError\").innerHTML = \"\";\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//postal code validation\r\n\t\t\t\tif(POSTALCODE.match(pcMatch))\r\n\t\t\t\t{\r\n\t\t\t\t\t//Alberta\r\n\t\t\t\t\tif(document.registration.selectProvince.value==\"AB\")\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(POSTALCODE.match(/^[tT]+[0-9A-Za-z]/))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tdocument.getElementById(\"pcError\").innerHTML = \"\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tdocument.getElementById(\"pcError\").innerHTML = \"Please enter a valid postal code for Alberta\";\r\n\t\t\t\t\t\t\tvalid = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//British Columbia\r\n\t\t\t\t\telse if(document.registration.selectProvince.value==\"BC\")\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(POSTALCODE.match(/^[vV]+[0-9A-Za-z]/))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tdocument.getElementById(\"pcError\").innerHTML = \"\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tdocument.getElementById(\"pcError\").innerHTML = \"Please enter a valid postal code for British Columbia\";\r\n\t\t\t\t\t\t\tvalid = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//Manitoba\r\n\t\t\t\t\telse if(document.registration.selectProvince.value==\"MB\")\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(POSTALCODE.match(/^[rR]+[0-9A-Za-z]/))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tdocument.getElementById(\"pcError\").innerHTML = \"\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tdocument.getElementById(\"pcError\").innerHTML = \"Please enter a valid postal code for Manitoba\";\r\n\t\t\t\t\t\t\tvalid = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//New Brunswick\r\n\t\t\t\t\telse if(document.registration.selectProvince.value==\"NB\")\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(POSTALCODE.match(/^[eE]+[0-9A-Za-z]/))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tdocument.getElementById(\"pcError\").innerHTML = \"\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tdocument.getElementById(\"pcError\").innerHTML = \"Please enter a valid postal code for New Brunswick\";\r\n\t\t\t\t\t\t\tvalid = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//NewFoundland and Labrador\r\n\t\t\t\t\telse if(document.registration.selectProvince.value==\"NL\")\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(POSTALCODE.match(/^[aA]+[0-9A-Za-z]/))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tdocument.getElementById(\"pcError\").innerHTML = \"\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tdocument.getElementById(\"pcError\").innerHTML = \"Please enter a valid postal code for NewFoundland and Labrador\";\r\n\t\t\t\t\t\t\tvalid = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//Nova Scotia\r\n\t\t\t\t\telse if(document.registration.selectProvince.value==\"NS\")\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(POSTALCODE.match(/^[bB]+[0-9A-Za-z]/))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tdocument.getElementById(\"pcError\").innerHTML = \"\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tdocument.getElementById(\"pcError\").innerHTML = \"Please enter a valid postal code for Nova Scotia\";\r\n\t\t\t\t\t\t\tvalid = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//Northwest Territories\r\n\t\t\t\t\telse if(document.registration.selectProvince.value==\"NT\")\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(POSTALCODE.match(/^[xX]+[0-9A-Za-z]/))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tdocument.getElementById(\"pcError\").innerHTML = \"\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tdocument.getElementById(\"pcError\").innerHTML = \"Please enter a valid postal code for Northwest Territories\";\r\n\t\t\t\t\t\t\tvalid = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//Nunavut\r\n\t\t\t\t\telse if(document.registration.selectProvince.value==\"NU\")\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(POSTALCODE.match(/^[xX]+[0-9A-Za-z]/))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tdocument.getElementById(\"pcError\").innerHTML = \"\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tdocument.getElementById(\"pcError\").innerHTML = \"Please enter a valid postal code for Nunavut\";\r\n\t\t\t\t\t\t\tvalid = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//Ontario\r\n\t\t\t\t\telse if(document.registration.selectProvince.value==\"ON\")\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(POSTALCODE.match(/^[kKlLmMnNpP]+[0-9A-Za-z]/))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tdocument.getElementById(\"pcError\").innerHTML = \"\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tdocument.getElementById(\"pcError\").innerHTML = \"Please enter a valid postal code for Ontario\";\r\n\t\t\t\t\t\t\tvalid = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//Prince Edward Island\r\n\t\t\t\t\telse if(document.registration.selectProvince.value==\"PE\")\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(POSTALCODE.match(/^[cC]+[0-9A-Za-z]/))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tdocument.getElementById(\"pcError\").innerHTML = \"\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tdocument.getElementById(\"pcError\").innerHTML = \"Please enter a valid postal code for Prince Edward Island\";\r\n\t\t\t\t\t\t\tvalid = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//Quebec\r\n\t\t\t\t\telse if(document.registration.selectProvince.value==\"QC\")\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(POSTALCODE.match(/^[gGhHjJ]+[0-9A-Za-z]/))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tdocument.getElementById(\"pcError\").innerHTML = \"\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tdocument.getElementById(\"pcError\").innerHTML = \"Please enter a valid postal code for Quebec\";\r\n\t\t\t\t\t\t\tvalid = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//Saskatchewan\r\n\t\t\t\t\telse if(document.registration.selectProvince.value==\"SK\")\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(POSTALCODE.match(/^[sS]+[0-9A-Za-z]/))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tdocument.getElementById(\"pcError\").innerHTML = \"\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tdocument.getElementById(\"pcError\").innerHTML = \"Please enter a valid postal code for Saskatchewan\";\r\n\t\t\t\t\t\t\tvalid = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//Yukon\r\n\t\t\t\t\telse if(document.registration.selectProvince.value==\"YT\")\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(POSTALCODE.match(/^[yY]+[0-9A-Za-z]/))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tdocument.getElementById(\"pcError\").innerHTML = \"\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tdocument.getElementById(\"pcError\").innerHTML = \"Please enter a valid postal code for Yukon\";\r\n\t\t\t\t\t\t\tvalid = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdocument.getElementById(\"pcError\").innerHTML = \"Please enter your province first\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tdocument.getElementById(\"pcError\").innerHTML = \"Please enter the postal code using this syntax:(alpha+numeric+alpha+numeric+alpha+numeric)\";\t\r\n\t\t\t\t\tvalid = false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//member validation\r\n\t\t\t\tif(document.getElementById('Student').checked) \r\n\t\t\t\t{\r\n\t\t\t\t\tdocument.getElementById('memberError').innerHTML= \"\";\r\n\t\t\t\t}else if(document.getElementById('Faculty').checked) \r\n\t\t\t\t{\r\n\t\t\t\t\tdocument.getElementById('memberError').innerHTML= \"\";\r\n\t\t\t\t}\t\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tdocument.getElementById('memberError').innerHTML= \"Please select your membership.\";\r\n\t\t\t\t\tvalid = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\treturn valid;\r\n\t\t}", "title": "" }, { "docid": "fc919d1d89defbaa0a5e33ef9a2a6db3", "score": "0.5505823", "text": "function validateForm1() {\n\n\t// Retrieving the values of form elements\n\tvar name = document.checkoutForm1.ten.value;\n\tvar mobile = document.checkoutForm1.sdt.value;\n\tvar address = document.checkoutForm1.diaChi.value;\n\tvar province = document.checkoutForm1.province.value;\n\tvar district = document.checkoutForm1.district.value;\n\tvar ward = document.checkoutForm1.ward.value;\n\n\t// Defining error variables with a default value\n\tvar nameErr = mobileErr = addressErr = provinceErr = districtErr = wardErr = true;\n\n\t// Validate name\n\tif (name == \"\") {\n\t\tprintError(\"nameErr\", \"*Vui lòng nhập họ tên!\");\n\t} else {\n\t\tprintError(\"nameErr\", \" \");\n\t\tnameErr = false;\n\t}\n\n\t// Validate mobile number\n\tif (mobile == \"\") {\n\t\tprintError(\"mobileErr\", \"*Vui lòng nhập số điện thoại!\");\n\t} else {\n\t\tvar regex = /^[0-9]\\d{9}$/;\n\t\tif (regex.test(mobile) === false) {\n\t\t\tprintError(\"mobileErr\", \"*Vui lòng nhập đúng định dạng số điện thoại!\");\n\t\t} else {\n\t\t\tprintError(\"mobileErr\", \" \");\n\t\t\tmobileErr = false;\n\t\t}\n\t}\n\n\t// Validate address\n\tif (address == \"\") {\n\t\tprintError(\"addressErr\", \"*Vui lòng nhập địa chỉ!\");\n\t} else {\n\t\tprintError(\"addressErr\", \" \");\n\t\taddressErr = false;\n\t}\n\n\t// Validate province\n\tif (province == \"\") {\n\t\tprintError(\"provinceErr\", \"*Vui lòng chọn Tỉnh / Thành phố!\");\n\t} else {\n\t\tprintError(\"provinceErr\", \" \");\n\t\tprovinceErr = false;\n\t}\n\n\t// Validate district\n\tif (district == \"\") {\n\t\tprintError(\"districtErr\", \"*Vui lòng chọn Quận / Huyện!\");\n\t} else {\n\t\tprintError(\"districtErr\", \" \");\n\t\tdistrictErr = false;\n\t}\n\n\t// Validate ward\n\tif (ward == \"\") {\n\t\tprintError(\"wardErr\", \"*Vui lòng chọn Xã / Phường!\");\n\t} else {\n\t\tprintError(\"wardErr\", \" \");\n\t\twardErr = false;\n\t}\n\n\t// Prevent the form from being submitted if there are any errors\n\tif ((nameErr || mobileErr || addressErr || provinceErr || districtErr || wardErr) == true) {\n\t\treturn false;\n\t}\n\n}", "title": "" }, { "docid": "29899f555cb1fa80a041b66e98ae932d", "score": "0.5500901", "text": "function validate(data){\r\n let error = ''\r\n //----------- capitalizing the values----------------\r\n data.owner.value = capitalizeNames(data.owner.value)\r\n \r\n data.shopName.value = capitalizeNames(data.shopName.value)\r\n \r\n data.address1.value = capitalizeNames(data.address1.value)\r\n \r\n data.area.value = capitalizeNames(data.area.value)\r\n \r\n data.city.value = capitalizeNames(data.city.value)\r\n \r\n data.state.value = capitalizeNames(data.state.value)\r\n \r\n if(data.address2){\r\n data.address2.value = capitalizeNames(data.address2.value)\r\n }\r\n //------------- converting to uppercase ----------\r\n data.gstNo.value = convUppercase(data.gstNo.value)\r\n \r\n data.dlNo.value = convUppercase(data.dlNo.value)\r\n \r\n //-------------validations--------------------\r\n if(validatePhoneno(data.phoneno.value)){\r\n data.phoneno.value = parseInt(data.phoneno.value)\r\n }else{\r\n error = 'enter a valid phone number'\r\n return error\r\n }\r\n \r\n if(!validateEmail(data.email.value)){\r\n error = 'enter a valid email id'\r\n return error\r\n }\r\n \r\n \r\n\r\n}", "title": "" }, { "docid": "0d5b013f58bd1d5801469feff89dbafb", "score": "0.5495721", "text": "function hasValidFields(req, res, next) {\n const { reservation_date, reservation_time, people, status } = req.body.data;\n const partySize = Number.isInteger(people);\n const presentTime = Date.now(moment().tz('America/Chicago').format());\n const requestedTime = new Date(`${reservation_date} ${reservation_time}`);\n\n //validate that reservation time is in the future\n if (requestedTime < presentTime) {\n return next({\n status: 400,\n message: \"reservation_time must be in the future. Reservations are in CST.\",\n });\n }\n //is status is seated do not allow edit or update\n if (status === \"seated\") {\n return next({\n status: 400,\n message: \"seated\",\n });\n }\n //is status is finished do not allow edit or update\n if (status === \"finished\") {\n return next({\n status: 400,\n message: \"finished\",\n });\n }\n //validate date is in correct format\n if (!dateIsValid(reservation_date)) {\n return next({\n status: 400,\n message: \"reservation_date format must be YYYY-MM-DD.\",\n });\n }\n //validate that reservation is made during business hours\n if (!businessHours(reservation_time)) {\n return next({\n status: 400,\n message: \"reservation_time must be between 10:30 AM and 9:30 PM\",\n });\n }\n //do not allow reservations on Tuesdays when restaurant is closed\n if (!dateNotTuesday(reservation_date)) {\n return next({\n status: 400,\n message: \"The restaurant is closed on Tuesdays\",\n });\n }\n //validate that party size is greater than zero\n if (people < 1 || !partySize) {\n return next({\n status: 400,\n message: \"Please enter number of people.\",\n });\n }\n next();\n}", "title": "" }, { "docid": "d136e77657884ce121eb085eaf8dedf8", "score": "0.54901415", "text": "function formValid() {\n return drugNameValid() &&\n doctorValid() &&\n pharmacyValid() &&\n lengthValid() &&\n refillsValid() &&\n startDateValid() &&\n doseSizeValid() &&\n scheduledDosesValid();\n}", "title": "" }, { "docid": "1c1447cc5e55e7d340900f1f55f12b14", "score": "0.54864305", "text": "setupValidations() {}", "title": "" }, { "docid": "f3ac6e7057c6dd70d80fc32cd0580fea", "score": "0.5485998", "text": "function validateVendor()\n{\n var focusOn = false;\n var isNoError = true;\n\n // document.getElementById('myForm').submit();\n if(!isNumber(\"vendorNumber\"))\n {\n isNoError = false;\n if(!focusOn){\n document.getElementById(\"vendorNumber\").focus();\n focusOn = true;\n }\n }\n \n if (isEmpty(\"vendorName\"))\n {\n isNoError = false;\n if(!focusOn){\n document.getElementById(\"vendorName\").focus();\n focusOn = true;\n }\n }\n else if (!checkLength(\"vendorName\", 30))\n {\n isNoError = false;\n if(!focusOn){\n document.getElementById(\"vendorName\").focus();\n focusOn = true;\n }\n }\n \n if (isEmpty(\"address1\"))\n {\n isNoError = false;\n if(!focusOn){\n document.getElementById(\"address1\").focus();\n focusOn = true;\n }\n }\n else if (!checkLength(\"address1\", 30))\n {\n isNoError = false;\n if(!focusOn){\n document.getElementById(\"address1\").focus();\n focusOn = true;\n }\n }\n\n if (!checkLength(\"address2\", 30))\n {\n isNoError = false;\n if(!focusOn){\n document.getElementById(\"address2\").focus();\n focusOn = true;\n }\n }\n\n if (isEmpty(\"city\"))\n {\n isNoError = false;\n if(!focusOn){\n document.getElementById(\"city\").focus();\n focusOn = true;\n }\n }\n else if (!checkLength(\"city\", 20))\n {\n isNoError = false;\n if(!focusOn){\n document.getElementById(\"city\").focus();\n focusOn = true;\n }\n }\n\n if (isEmpty(\"province\"))\n {\n isNoError = false;\n if(!focusOn){\n document.getElementById(\"province\").focus();\n focusOn = true;\n }\n }\n else if (!checkLength(\"province\", 2))\n {\n isNoError = false;\n if(!focusOn){\n document.getElementById(\"province\").focus();\n focusOn = true;\n }\n }\n\n // Post Code\n if (!isAvaliablePC())\n {\n isNoError = false;\n if(!focusOn){\n document.getElementById(\"postCode\").focus();\n focusOn = true;\n }\n }\n\n if (!isAvaliableCountryCode())\n {\n isNoError = false;\n if(!focusOn){\n document.getElementById(\"country\").focus();\n focusOn = true;\n }\n }\n\n if (!phoneValidate())\n {\n isNoError = false;\n if(!focusOn){\n document.getElementById(\"phone\").focus();\n focusOn = true;\n }\n }\n\n if (!faxValidate())\n {\n isNoError = false;\n if(!focusOn){\n document.getElementById(\"fax\").focus();\n focusOn = true;\n }\n }\n\n if(isNoError){ \n // alert('submit');\n document.getElementById('myForm').submit();\n } \n}", "title": "" }, { "docid": "e808700953918f34b964904158ffc380", "score": "0.54840237", "text": "function checkFieldsPost(req, res, next) {\n // const { title, content, tags } = req.body\n const { _id, id, name, nb_issues, issues, image, publisher, start_year, date, active } = req.body\n\n //if (_id & id & name & nb_issues & issues & image & publisher & start_year & added & updated & active) {\n if (_id & id & name & nb_issues & issues & image & publisher & start_year & date & active) {\n next()\n } else {\n res.status(400).json({ message: 'fields are not good' })\n }\n}", "title": "" }, { "docid": "4b223b7c992c9c422e2b22399d7730cf", "score": "0.54837066", "text": "taxonFieldsAreEmpty() {\n\n const values = {\n family: document.getElementById('new-individual-family').value,\n genus: document.getElementById('new-individual-genus').value,\n species: document.getElementById('new-individual-species').value,\n subspecies: document.getElementById('new-individual-subspecies').value,\n variety: document.getElementById('new-individual-variety').value,\n origin: document.getElementById('new-individual-origin').value,\n commonName: document.getElementById('new-individual-common-name').value,\n };\n for (const index in values) {\n\n if (values[index]) return false;\n }\n return true;\n }", "title": "" } ]
35134fec9c9b09ec6c138f22cc250955
Applies a document modification to the document tree and the document map. Returns the DocumentChange event for successful modifications.
[ { "docid": "8e6afb872f85ce85ce9a42a8c296c7da", "score": "0.6392937", "text": "modifyDoc(newDocument) {\n const name = newDocument.ref.path;\n assert(this.docMap.has(name), 'Document to modify does not exist');\n const oldDocument = this.docMap.get(name);\n if (!oldDocument.updateTime.isEqual(newDocument.updateTime)) {\n const removeChange = this.deleteDoc(name);\n const addChange = this.addDoc(newDocument);\n return new document_change_1.DocumentChange(ChangeType.modified, newDocument, removeChange.oldIndex, addChange.newIndex);\n }\n return null;\n }", "title": "" } ]
[ { "docid": "d2f111282cd04f501e707ca0e1672238", "score": "0.5830285", "text": "apply(doc) {\n if (this.length != doc.length)\n throw new RangeError(\"Applying change set to a document with the wrong length\");\n iterChanges(this, (fromA, toA, fromB, _toB, text) => doc = doc.replace(fromB, fromB + (toA - fromA), text), false);\n return doc;\n }", "title": "" }, { "docid": "765a22a50221c7ba6b71a622cec17826", "score": "0.5823906", "text": "apply(doc) {\n if (this.length != doc.length)\n throw new RangeError(\"Applying change set to a document with the wrong length\");\n iterChanges(this, (fromA, toA, fromB, _toB, text) => doc = doc.replace(fromB, fromB + (toA - fromA), text), false);\n return doc;\n }", "title": "" }, { "docid": "de362dbebe6272da26351f5c82c9776c", "score": "0.52666706", "text": "function applyReducer(document, operation) {\r\n var operationResult = applyOperation(document, operation);\r\n if (operationResult.test === false) {\r\n throw new exports.JsonPatchError(\"Test operation failed\", 'TEST_OPERATION_FAILED', 0, operation, document);\r\n }\r\n return operationResult.newDocument;\r\n}", "title": "" }, { "docid": "70385199227bf1ed88998bbc6509de7d", "score": "0.5238306", "text": "_onDocumentChange(change) {\n // HACK: do not react on node state updates\n if (change.info.action === 'node-state-update') return;\n\n const ops = change.ops;\n for (var i = 0; i < ops.length; i++) {\n let op = ops[i];\n if (op.isNOP()) continue;\n // 1. xref has been added or removed\n // 2. citable has been add or removed\n if (this._detectAddRemoveAffiliation(op) || this._detectAddRemoveAuthor(op, change)) {\n return this._updateLabels();\n // 3. xref targets have been changed\n // 4. refType of an xref has been changed (TODO: do we really need this?)\n } else if (this._detectChangeAuthor(op) || this._detectRearrangeAuthors(op)) {\n return this._updateLabels();\n }\n }\n }", "title": "" }, { "docid": "c9e3ec38c77e5106a43de01ead3c720f", "score": "0.52133507", "text": "function applyReducer(document, operation, index) {\r\n var operationResult = applyOperation(document, operation);\r\n if (operationResult.test === false) {\r\n throw new exports.JsonPatchError(\"Test operation failed\", 'TEST_OPERATION_FAILED', index, operation, document);\r\n }\r\n return operationResult.newDocument;\r\n}", "title": "" }, { "docid": "37e9fd2c1e4f5bbd94df1d87867bd137", "score": "0.51628846", "text": "function onChangeDocument(event) {\n\n initDocEventsForFile();\n //keep the local asciidoc up to date\n if (that.fileRevision) {\n that.fileRevision.asciidoc = that.getValue();\n that.syncFileRevision.$loaded().then(\n function(data){\n that.syncFileRevision.asciidoc = that.getValue();\n if (that.syncFileRevision.fileId && that.syncFileRevision.projectId){\n that.syncFileRevision.$save().then(function(data){\n var fileRevToStore = {\n $id : that.syncFileRevision.$id,\n asciidoc : that.syncFileRevision.asciidoc,\n fileId: that.syncFileRevision.fileId,\n projectId: that.syncFileRevision.projectId\n }\n Storage.save(\"fileRevision\", fileRevToStore);\n //console.log(\"update asciidoc on firebase\");\n });\n\n }\n }\n );\n }\n\n //synchronize event on firebase if the user is connected\n //and if this event is not send by the server\n if (editor && editor.curOp && editor.curOp.command.name){\n //User change\n if (that.user != null){\n //Try with a push\n that.refFileRevisionEvent = SyncCollaborative.syncFileRevisionEvent(that.syncFileRevision.projectId, that.syncFileRevision.fileId, that.syncFileRevision.$id);\n that.refFileRevisionEvent.push({\n \"user\": that.user,\n \"event\": event\n }).setPriority(Firebase.ServerValue.TIMESTAMP);\n }\n } else {\n //API Change\n //console.log(\"doc : API change (don't fire event to firebase)\");\n if (editor){\n editor.getSession().setAnnotations([{\n row: event.data.range.start.row,\n column: event.data.range.end.column,\n text: \"a user is typing...\",\n type: \"warning\" // also warning and information\n }]);\n }\n }\n\n }", "title": "" }, { "docid": "1dca1c4a4b5a70d978099dbcee161f5c", "score": "0.5144691", "text": "_onDocumentChange(change) {\n if (change.hasUpdated(this.props.node.id) ||\n change.hasUpdated(this.props.node.imageFile)) {\n this.rerender()\n }\n }", "title": "" }, { "docid": "e012b565e0263eb9188b2ec0660471c7", "score": "0.50879043", "text": "function applyReducer(document, operation, index) {\n var operationResult = applyOperation(document, operation);\n if (operationResult.test === false) { // failed test\n throw new JsonPatchError(\"Test operation failed\", 'TEST_OPERATION_FAILED', index, operation, document);\n }\n return operationResult.newDocument;\n}", "title": "" }, { "docid": "e012b565e0263eb9188b2ec0660471c7", "score": "0.50879043", "text": "function applyReducer(document, operation, index) {\n var operationResult = applyOperation(document, operation);\n if (operationResult.test === false) { // failed test\n throw new JsonPatchError(\"Test operation failed\", 'TEST_OPERATION_FAILED', index, operation, document);\n }\n return operationResult.newDocument;\n}", "title": "" }, { "docid": "886b7d0f79367324db8f52aeca08a9ae", "score": "0.5037556", "text": "addDoc(newDocument) {\n const name = newDocument.ref.path;\n assert(!this.docMap.has(name), 'Document to add already exists');\n this.docTree = this.docTree.insert(newDocument, null);\n const newIndex = this.docTree.find(newDocument).index;\n this.docMap.set(name, newDocument);\n return new document_change_1.DocumentChange(ChangeType.added, newDocument, -1, newIndex);\n }", "title": "" }, { "docid": "600746dd8d955f06f55519486a64be86", "score": "0.5011274", "text": "function applyDocumentEdit(oldContents, edit) {\n\t if (edit.range.end == 0)\n\t return edit.text + oldContents;\n\t if (edit.range.start >= oldContents.length)\n\t return oldContents + edit.text;\n\t if (edit.range.start < 0 || edit.range.end > oldContents.length) {\n\t throw new Error(\"Range of [\" + edit.range.start + \":\" + edit.range.end\n\t + \"] is not applicable to document of length \" + oldContents.length);\n\t }\n\t if (edit.range.start >= edit.range.end) {\n\t throw new Error(\"Range of [\" + edit.range.start + \":\" + edit.range.end\n\t + \"] should have end greater than start\");\n\t }\n\t var beginning = \"\";\n\t if (edit.range.start > 0) {\n\t beginning = oldContents.substring(0, edit.range.start - 1);\n\t }\n\t var end = \"\";\n\t if (edit.range.end < oldContents.length) {\n\t end = oldContents.substring(edit.range.end);\n\t }\n\t return beginning + edit.text + end;\n\t}", "title": "" }, { "docid": "b594758ca879e329d2e5643ede7859f3", "score": "0.49529734", "text": "function updateDocument(t){\n}", "title": "" }, { "docid": "fac18a1f23f40de9694bf2d1ca321de1", "score": "0.49043992", "text": "function update(document, changes, version) {\n if (document instanceof FullTextDocument) {\n document.update(changes, version);\n return document;\n }\n else {\n throw new Error('TextDocument.update: document must be created by TextDocument.create');\n }\n }", "title": "" }, { "docid": "ad24f583cb10057c7bb2113e3ba922fb", "score": "0.4902912", "text": "function modify() {\r\n\t$('*').bind('DOMSubtreeModified.event1',DOMModificationHandler);\r\n}", "title": "" }, { "docid": "b5e1b222c6e77433d58b601a531a8fd4", "score": "0.4825133", "text": "function updateDocument() {\n const Firestore = require('@google-cloud/firestore');\n const firestore = new Firestore({\n projectId: 'ventrips-214422',\n keyFilename: './../ventrips-214422-firebase-adminsdk-w9d9x-fa4567e61b.json',\n });\n const settings = { timestampsInSnapshots: true};\n firestore.settings(settings);\n\n const document = firestore.doc('items/PTQEG3gGwXXm4mgs0Z3Z')\n document.update({\n title: 'Welcome to Firestore 12 Update',\n }).then(() => {\n // Document updated successfully.\n });\n}", "title": "" }, { "docid": "b69c514d4001c5b08932fbcb8226bd7d", "score": "0.48113894", "text": "function map(doc) {\n if (doc.common === true) {\n emit(doc._id, doc.rev);\n }\n }", "title": "" }, { "docid": "99518e0b234bbbaf3953b9a8d97677e3", "score": "0.48090777", "text": "computeSnapshot(readTime) {\n const changeSet = this.extractCurrentChanges(readTime);\n const appliedChanges = [];\n // Process the sorted changes in the order that is expected by our clients\n // (removals, additions, and then modifications). We also need to sort the\n // individual changes to assure that oldIndex/newIndex keep incrementing.\n changeSet.deletes.sort((name1, name2) => {\n // Deletes are sorted based on the order of the existing document.\n return this.getComparator()(this.docMap.get(name1), this.docMap.get(name2));\n });\n changeSet.deletes.forEach(name => {\n const change = this.deleteDoc(name);\n appliedChanges.push(change);\n });\n changeSet.adds.sort(this.getComparator());\n changeSet.adds.forEach(snapshot => {\n const change = this.addDoc(snapshot);\n appliedChanges.push(change);\n });\n changeSet.updates.sort(this.getComparator());\n changeSet.updates.forEach(snapshot => {\n const change = this.modifyDoc(snapshot);\n if (change) {\n appliedChanges.push(change);\n }\n });\n assert(this.docTree.length === this.docMap.size, 'The update document ' +\n 'tree and document map should have the same number of entries.');\n return appliedChanges;\n }", "title": "" }, { "docid": "d450d2e8d689e3a82ee0a6d75ae0bb97", "score": "0.47943473", "text": "document_update(collection, r, then){\n\t\tvar doc = r.data;\n\t\tif(!doc){r.server.endWithError(r,\"data is undefined\"); return;}\n\t\t// Verify doc id\n\t\tif(!doc.id){r.server.endWithError(r,\"id is undefined\");return;}\n\t\t// Set modified stamps\n\t\tdoc._mt = new Date().getTime();\t\t\n\t\tdoc._mu = r.session.user_id;\t\t\n\t\t// Update/insert\n\t\tr._database.collection(collection).update( { id : doc.id }, doc, { upsert : true }, function(err,commandResult) {\n\t\t\tif(err)\t{r.server.endWithError(r,\"Database error in collection.updateOne() \"+err); return;}\n\t\t\t// Go next or send OK\n\t\t\tif(then){\n\t\t\t\tthen();\n\t\t\t}else{\n\t\t\t\tvar result = commandResult.result; // !!! see CommandResult\n\t\t\t\tresult._mt = doc._mt;\n\t\t\t\tr.server.endWithSuccess(r, result);\n\t\t\t}\n\t\t});\n\t}", "title": "" }, { "docid": "30acc27c53f0d301fb2f6c9751b4ec1f", "score": "0.47775105", "text": "function doSaveThesaurusDoc(map) {\n var uri = map[\"uri\"];\n var doc = map[\"doc\"];\n\n thsr.insert(uri, doc);\n\n xdmp.commit();\n}", "title": "" }, { "docid": "46d32c9cfa6026000cb455298b8ef9c3", "score": "0.4770449", "text": "function modify (obj, updateQuery) {\n\t var keys = Object.keys(updateQuery)\n\t , firstChars = _.map(keys, function (item) { return item[0]; })\n\t , dollarFirstChars = _.filter(firstChars, function (c) { return c === '$'; })\n\t , newDoc, modifiers\n\t ;\n\t\n\t if (keys.indexOf('_id') !== -1 && updateQuery._id !== obj._id) { throw new Error(\"You cannot change a document's _id\"); }\n\t\n\t if (dollarFirstChars.length !== 0 && dollarFirstChars.length !== firstChars.length) {\n\t throw new Error(\"You cannot mix modifiers and normal fields\");\n\t }\n\t\n\t if (dollarFirstChars.length === 0) {\n\t // Simply replace the object with the update query contents\n\t newDoc = deepCopy(updateQuery);\n\t newDoc._id = obj._id;\n\t } else {\n\t // Apply modifiers\n\t modifiers = _.uniq(keys);\n\t newDoc = deepCopy(obj);\n\t modifiers.forEach(function (m) {\n\t var keys;\n\t\n\t if (!modifierFunctions[m]) { throw new Error(\"Unknown modifier \" + m); }\n\t\n\t // Can't rely on Object.keys throwing on non objects since ES6\n\t // Not 100% satisfying as non objects can be interpreted as objects but no false negatives so we can live with it\n\t if (typeof updateQuery[m] !== 'object') {\n\t throw new Error(\"Modifier \" + m + \"'s argument must be an object\");\n\t }\n\t\n\t keys = Object.keys(updateQuery[m]);\n\t keys.forEach(function (k) {\n\t modifierFunctions[m](newDoc, k, updateQuery[m][k]);\n\t });\n\t });\n\t }\n\t\n\t // Check result is valid and return it\n\t checkObject(newDoc);\n\t\n\t if (obj._id !== newDoc._id) { throw new Error(\"You can't change a document's _id\"); }\n\t return newDoc;\n\t}", "title": "" }, { "docid": "43f8f61763d2cbebb4813ef2a22b9e7b", "score": "0.47037205", "text": "function didChangeTextDocument (change) {\n\tconst document = change.document;\n\tif (isMarkdownDocument(document) && (getRun(document) === \"onType\")) {\n\t\trequestLint(document);\n\t}\n}", "title": "" }, { "docid": "43f8f61763d2cbebb4813ef2a22b9e7b", "score": "0.47037205", "text": "function didChangeTextDocument (change) {\n\tconst document = change.document;\n\tif (isMarkdownDocument(document) && (getRun(document) === \"onType\")) {\n\t\trequestLint(document);\n\t}\n}", "title": "" }, { "docid": "d2ff16ba7ecf9fce0a6d38e763f3ed5d", "score": "0.47001103", "text": "function onReMapped(err) {\n if (err) {\n Y.log( 'Could not map new selection into form: ' + JSON.stringify(err), 'warn', NAME );\n return;\n }\n\n context.attachments.updateFormDoc( context, template, onUpdatedFormData );\n template.raise( 'mapcomplete', template.unmap() );\n }", "title": "" }, { "docid": "8783a0cb8547163b582e1d02df252409", "score": "0.46765655", "text": "function addMappedDataToDocumentResults (mapping, results) {\n for (const d of results) {\n d._mapping = mapping[getDocumentId(d)] || {}\n }\n}", "title": "" }, { "docid": "a07378296193d13cd793388c0f97a716", "score": "0.46371645", "text": "function onUpdatedOrInserted(newDoc) {\n var index = binarySearch(docs, newDoc._id);\n var doc = docs[index];\n if (!!doc && doc._id === newDoc._id) { // update\n console.log('%%% on change update: ', doc._id, ' ',newDoc._id);\n docs[index] = newDoc;\n } else { // insert newDoc\n console.log('%%% on change adding: ', newDoc);\n docs.splice(index, 0, newDoc);\n }\n }", "title": "" }, { "docid": "fb7b02ffa65739e65a633ac00d2516d2", "score": "0.46369585", "text": "get newDoc() {\n return this._doc || (this._doc = this.changes.apply(this.startState.doc));\n }", "title": "" }, { "docid": "b3d256c4f535d031cd271b53910630e0", "score": "0.46366748", "text": "async update(document) {\n\t\t\tthis._addToPool(document);\n\t\t\treturn this._token.data.update(document);\n\t\t}", "title": "" }, { "docid": "b63472f67680c21360fba7c1596b6e09", "score": "0.4635937", "text": "function modify (obj, updateQuery) {\n var keys = Object.keys(updateQuery)\n , firstChars = _.map(keys, function (item) { return item[0]; })\n , dollarFirstChars = _.filter(firstChars, function (c) { return c === '$'; })\n , newDoc, modifiers\n ;\n\n if (keys.indexOf('_id') !== -1 && updateQuery._id !== obj._id) { throw new Error(\"You cannot change a document's _id\"); }\n\n if (dollarFirstChars.length !== 0 && dollarFirstChars.length !== firstChars.length) {\n throw new Error(\"You cannot mix modifiers and normal fields\");\n }\n\n if (dollarFirstChars.length === 0) {\n // Simply replace the object with the update query contents\n newDoc = deepCopy(updateQuery);\n newDoc._id = obj._id;\n } else {\n // Apply modifiers\n modifiers = _.uniq(keys);\n newDoc = deepCopy(obj);\n modifiers.forEach(function (m) {\n var keys;\n\n if (!modifierFunctions[m]) { throw new Error(\"Unknown modifier \" + m); }\n\n // Can't rely on Object.keys throwing on non objects since ES6\n // Not 100% satisfying as non objects can be interpreted as objects but no false negatives so we can live with it\n if (typeof updateQuery[m] !== 'object') {\n throw new Error(\"Modifier \" + m + \"'s argument must be an object\");\n }\n\n keys = Object.keys(updateQuery[m]);\n keys.forEach(function (k) {\n modifierFunctions[m](newDoc, k, updateQuery[m][k]);\n });\n });\n }\n\n // Check result is valid and return it\n checkObject(newDoc);\n\n if (obj._id !== newDoc._id) { throw new Error(\"You can't change a document's _id\"); }\n return newDoc;\n}", "title": "" }, { "docid": "48dff56d7081d8a17ef1983f6dd5a83d", "score": "0.4623197", "text": "get newDoc() {\n return this._doc || (this._doc = this.changes.apply(this.startState.doc));\n }", "title": "" }, { "docid": "534c2a3c453a9d432faf23ce149eb9cd", "score": "0.4616007", "text": "addChange(documentId, change, cb) {\n if (!documentId || !change) {\n throw new Error('Invalid arguments')\n }\n this._addChange(documentId, change)\n let newVersion = this._getVersion(documentId)\n cb(null, newVersion)\n }", "title": "" }, { "docid": "6ac9c759109a6d5763db621be00ba59e", "score": "0.4593149", "text": "deleteDoc(name) {\n assert(this.docMap.has(name), 'Document to delete does not exist');\n const oldDocument = this.docMap.get(name);\n const existing = this.docTree.find(oldDocument);\n const oldIndex = existing.index;\n this.docTree = existing.remove();\n this.docMap.delete(name);\n return new document_change_1.DocumentChange(ChangeType.removed, oldDocument, oldIndex, -1);\n }", "title": "" }, { "docid": "a607a02ed05eb46a206612578ca9446f", "score": "0.4586189", "text": "function makeChange(doc,change,ignoreReadOnly){if(doc.cm){if(!doc.cm.curOp)return operation(doc.cm,makeChange)(doc,change,ignoreReadOnly);if(doc.cm.state.suppressEdits)return;}if(hasHandler(doc,\"beforeChange\")||doc.cm&&hasHandler(doc.cm,\"beforeChange\")){change=filterChange(doc,change,true);if(!change)return;} // Possibly split or suppress the update based on the presence\n// of read-only spans in its range.\nvar split=sawReadOnlySpans&&!ignoreReadOnly&&removeReadOnlyRanges(doc,change.from,change.to);if(split){for(var i=split.length-1;i>=0;--i){makeChangeInner(doc,{from:split[i].from,to:split[i].to,text:i?[\"\"]:change.text});}}else {makeChangeInner(doc,change);}}", "title": "" }, { "docid": "393fecbdc20120d1973421c9dcb0739b", "score": "0.4582645", "text": "function writeDocument(collection, changedDocument) {\n var id = changedDocument._id;\n if (id === undefined) {\n throw new Error(`You cannot write a document to the database without an _id! Use AddDocument if this is a new object.`);\n }\n // Store a copy of the object into the database. Models a database's behavior.\n data[collection][id] = JSONClone(changedDocument);\n // Update our 'database'.\n updated = true;\n}", "title": "" }, { "docid": "1b5a88b68c8a639f9107e2b07f488255", "score": "0.45736837", "text": "function updateDocument(databaseName,object,res){\n\tcouchdb.update(databaseName,object).then(function(response){\n\t\tres.send(response);\n\t},function(err){\n\t\tres.send(err);\n\t});\n}", "title": "" }, { "docid": "9cdf3b62104b70dcd1475c40a16ac478", "score": "0.45624813", "text": "async update (modelName, input, changes, _options) {\n\t\tsuper.update(modelName, input, changes, _options);\n\n\t\tconst options = extender.defaults({\n\t\t\tupsert: false,\n\t\t\tuseConditions: false,\n\t\t}, _options);\n\n\t\tconst Model = this.getModel(modelName);\n\t\tconst documentId = this.__getDocumentId(input);\n\t\tconst conditions = (options.useConditions ? input : { _id: documentId });\n\n\t\t// Perform the update operation.\n\t\tconst newDocument = await Model.findOneAndUpdate(conditions, changes, {\n\t\t\tnew: true,\n\t\t\tupsert: options.upsert,\n\t\t\tsetDefaultsOnInsert: true,\n\t\t});\n\t\tif (!newDocument) { throw this.__error(`UPDATE_MISSING_DOCUMENT`, { modelName, documentId }); }\n\n\t\treturn newDocument.toObject(); // Returned object must be lean!\n\n\t}", "title": "" }, { "docid": "df3083fad39f3b548b704d661b04719f", "score": "0.4555563", "text": "function writeDocument(collection, changedDocument) {\n var id = changedDocument._id;\n if (id === undefined) {\n throw new Error(`You cannot write a document to the database without an _id! Use AddDocument if this is a new object.`);\n }\n // Store a copy of the object into the database. Models a database's behavior.\n data[collection][id] = JSONClone(changedDocument);\n // Update our 'database'.\n updated = true;\n}", "title": "" }, { "docid": "df3083fad39f3b548b704d661b04719f", "score": "0.4555563", "text": "function writeDocument(collection, changedDocument) {\n var id = changedDocument._id;\n if (id === undefined) {\n throw new Error(`You cannot write a document to the database without an _id! Use AddDocument if this is a new object.`);\n }\n // Store a copy of the object into the database. Models a database's behavior.\n data[collection][id] = JSONClone(changedDocument);\n // Update our 'database'.\n updated = true;\n}", "title": "" }, { "docid": "fbcaf3d9b1b6d45f7b4dc75f8e95ff42", "score": "0.45265916", "text": "function MapCollection(collection, mapFunction)\n{\n return collection.get()\n .then(qrySnapshot=>{\n const promises = [];\n qrySnapshot.forEach(doc=>{\n const data = doc.data();\n const mapResult = mapFunction(data);\n if(mapResult.include)\n {\n promises.push(collection.doc(doc.id).update(mapResult.data));\n }\n });\n return Promise.all(promises);\n });\n}", "title": "" }, { "docid": "b6dba631b23a32de468fd8a54c5ddd99", "score": "0.45220876", "text": "map(mapping) {\n var from = mapping.mapResult(this.from, 1),\n to = mapping.mapResult(this.to, -1);\n\n if (from.deleted && to.deleted) {\n return null;\n }\n\n return new SetDocAttrStep(this.key, this.value, 'SetDocAttr');\n }", "title": "" }, { "docid": "c6352b2671ab44b7118dcc252d57061f", "score": "0.4518695", "text": "function viewApplyOperation(view, operation, writesCache, completeServerCache) {\r\n if (operation.type === OperationType.MERGE &&\r\n operation.source.queryId !== null) {\r\n util.assert(viewCacheGetCompleteServerSnap(view.viewCache_), 'We should always have a full cache before handling merges');\r\n util.assert(viewCacheGetCompleteEventSnap(view.viewCache_), 'Missing event cache, even though we have a server cache');\r\n }\r\n var oldViewCache = view.viewCache_;\r\n var result = viewProcessorApplyOperation(view.processor_, oldViewCache, operation, writesCache, completeServerCache);\r\n viewProcessorAssertIndexed(view.processor_, result.viewCache);\r\n util.assert(result.viewCache.serverCache.isFullyInitialized() ||\r\n !oldViewCache.serverCache.isFullyInitialized(), 'Once a server snap is complete, it should never go back');\r\n view.viewCache_ = result.viewCache;\r\n return viewGenerateEventsForChanges_(view, result.changes, result.viewCache.eventCache.getNode(), null);\r\n}", "title": "" }, { "docid": "9f8ad60d2d4e22bb2b7a64acb699e23b", "score": "0.44870403", "text": "function document_adopt(node, document) {\n var e_1, _a;\n // Optimize for common case of inserting a fresh node\n if (node._nodeDocument === document && node._parent === null) {\n return;\n }\n /**\n * 1. Let oldDocument be node’s node document.\n * 2. If node’s parent is not null, remove node from its parent.\n */\n var oldDocument = node._nodeDocument;\n if (node._parent)\n MutationAlgorithm_1.mutation_remove(node, node._parent);\n /**\n * 3. If document is not oldDocument, then:\n */\n if (document !== oldDocument) {\n /**\n * 3.1. For each inclusiveDescendant in node’s shadow-including inclusive\n * descendants:\n */\n var inclusiveDescendant = TreeAlgorithm_1.tree_getFirstDescendantNode(node, true, true);\n while (inclusiveDescendant !== null) {\n /**\n * 3.1.1. Set inclusiveDescendant’s node document to document.\n * 3.1.2. If inclusiveDescendant is an element, then set the node\n * document of each attribute in inclusiveDescendant’s attribute list\n * to document.\n */\n inclusiveDescendant._nodeDocument = document;\n if (util_1.Guard.isElementNode(inclusiveDescendant)) {\n try {\n for (var _b = (e_1 = void 0, __values(inclusiveDescendant._attributeList._asArray())), _c = _b.next(); !_c.done; _c = _b.next()) {\n var attr = _c.value;\n attr._nodeDocument = document;\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n /**\n * 3.2. For each inclusiveDescendant in node's shadow-including\n * inclusive descendants that is custom, enqueue a custom\n * element callback reaction with inclusiveDescendant,\n * callback name \"adoptedCallback\", and an argument list\n * containing oldDocument and document.\n */\n if (DOMImpl_1.dom.features.customElements) {\n if (util_1.Guard.isElementNode(inclusiveDescendant) &&\n inclusiveDescendant._customElementState === \"custom\") {\n CustomElementAlgorithm_1.customElement_enqueueACustomElementCallbackReaction(inclusiveDescendant, \"adoptedCallback\", [oldDocument, document]);\n }\n }\n /**\n * 3.3. For each inclusiveDescendant in node’s shadow-including\n * inclusive descendants, in shadow-including tree order, run the\n * adopting steps with inclusiveDescendant and oldDocument.\n */\n if (DOMImpl_1.dom.features.steps) {\n DOMAlgorithm_1.dom_runAdoptingSteps(inclusiveDescendant, oldDocument);\n }\n inclusiveDescendant = TreeAlgorithm_1.tree_getNextDescendantNode(node, inclusiveDescendant, true, true);\n }\n }\n}", "title": "" }, { "docid": "1929856bf331c6d43b333bff75c2f484", "score": "0.44790092", "text": "function filterChange(doc, change, update) {\n var obj = {\n canceled: false,\n from: change.from,\n to: change.to,\n text: change.text,\n origin: change.origin,\n cancel: function () {\n return obj.canceled = true;\n }\n };\n\n if (update) {\n obj.update = function (from, to, text, origin) {\n if (from) {\n obj.from = clipPos(doc, from);\n }\n\n if (to) {\n obj.to = clipPos(doc, to);\n }\n\n if (text) {\n obj.text = text;\n }\n\n if (origin !== undefined) {\n obj.origin = origin;\n }\n };\n }\n\n signal(doc, \"beforeChange\", doc, obj);\n\n if (doc.cm) {\n signal(doc.cm, \"beforeChange\", doc.cm, obj);\n }\n\n if (obj.canceled) {\n if (doc.cm) {\n doc.cm.curOp.updateInput = 2;\n }\n\n return null;\n }\n\n return {\n from: obj.from,\n to: obj.to,\n text: obj.text,\n origin: obj.origin\n };\n } // Apply a change to a document, and add it to the document's", "title": "" }, { "docid": "1929856bf331c6d43b333bff75c2f484", "score": "0.44790092", "text": "function filterChange(doc, change, update) {\n var obj = {\n canceled: false,\n from: change.from,\n to: change.to,\n text: change.text,\n origin: change.origin,\n cancel: function () {\n return obj.canceled = true;\n }\n };\n\n if (update) {\n obj.update = function (from, to, text, origin) {\n if (from) {\n obj.from = clipPos(doc, from);\n }\n\n if (to) {\n obj.to = clipPos(doc, to);\n }\n\n if (text) {\n obj.text = text;\n }\n\n if (origin !== undefined) {\n obj.origin = origin;\n }\n };\n }\n\n signal(doc, \"beforeChange\", doc, obj);\n\n if (doc.cm) {\n signal(doc.cm, \"beforeChange\", doc.cm, obj);\n }\n\n if (obj.canceled) {\n if (doc.cm) {\n doc.cm.curOp.updateInput = 2;\n }\n\n return null;\n }\n\n return {\n from: obj.from,\n to: obj.to,\n text: obj.text,\n origin: obj.origin\n };\n } // Apply a change to a document, and add it to the document's", "title": "" }, { "docid": "1929856bf331c6d43b333bff75c2f484", "score": "0.44790092", "text": "function filterChange(doc, change, update) {\n var obj = {\n canceled: false,\n from: change.from,\n to: change.to,\n text: change.text,\n origin: change.origin,\n cancel: function () {\n return obj.canceled = true;\n }\n };\n\n if (update) {\n obj.update = function (from, to, text, origin) {\n if (from) {\n obj.from = clipPos(doc, from);\n }\n\n if (to) {\n obj.to = clipPos(doc, to);\n }\n\n if (text) {\n obj.text = text;\n }\n\n if (origin !== undefined) {\n obj.origin = origin;\n }\n };\n }\n\n signal(doc, \"beforeChange\", doc, obj);\n\n if (doc.cm) {\n signal(doc.cm, \"beforeChange\", doc.cm, obj);\n }\n\n if (obj.canceled) {\n if (doc.cm) {\n doc.cm.curOp.updateInput = 2;\n }\n\n return null;\n }\n\n return {\n from: obj.from,\n to: obj.to,\n text: obj.text,\n origin: obj.origin\n };\n } // Apply a change to a document, and add it to the document's", "title": "" }, { "docid": "8ed2b155888f24481848d40f55904079", "score": "0.44597495", "text": "updateTextDocument(document, json) {\n const edit = new vscode.WorkspaceEdit();\n // Just replace the entire document every time for this example extension.\n // A more complete extension should compute minimal edits instead.\n edit.replace(document.uri, new vscode.Range(0, 0, document.lineCount, 0), JSON.stringify(json, null, 2));\n return vscode.workspace.applyEdit(edit);\n }", "title": "" }, { "docid": "1990b48603c952bd78d815ea00864bc2", "score": "0.44308245", "text": "function filterChange(doc, change, update) {\n var obj = {\n canceled: false,\n from: change.from,\n to: change.to,\n text: change.text,\n origin: change.origin,\n cancel: function cancel() {\n return obj.canceled = true;\n }\n };\n\n if (update) {\n obj.update = function (from, to, text, origin) {\n if (from) {\n obj.from = _clipPos(doc, from);\n }\n\n if (to) {\n obj.to = _clipPos(doc, to);\n }\n\n if (text) {\n obj.text = text;\n }\n\n if (origin !== undefined) {\n obj.origin = origin;\n }\n };\n }\n\n signal(doc, \"beforeChange\", doc, obj);\n\n if (doc.cm) {\n signal(doc.cm, \"beforeChange\", doc.cm, obj);\n }\n\n if (obj.canceled) {\n if (doc.cm) {\n doc.cm.curOp.updateInput = 2;\n }\n\n return null;\n }\n\n return {\n from: obj.from,\n to: obj.to,\n text: obj.text,\n origin: obj.origin\n };\n } // Apply a change to a document, and add it to the document's", "title": "" }, { "docid": "3d6550aa73b0ede856324d61def693d1", "score": "0.44299772", "text": "function update(updateObj) {\n var oldDocData = this._data;\n var newDocData = (0, _modifyjs[\"default\"])(oldDocData, updateObj);\n return this._saveData(newDocData, oldDocData);\n}", "title": "" }, { "docid": "a55f1ef24c42aecd27d3c90e2d476284", "score": "0.4411611", "text": "function updateDocument(contentHtml) {\n //$(\"#content\").html(contentHtml);\n var self = this;\n documentService.getTerms(documentModel.documentId).then(function(terms) {\n LHSModel.setTerms(terms);\n console.log(\"Terms return by API\");\n console.log(terms);\n documentModel.viewState.isProcessing = false;\n //fetch score\n trainerService.updateBenchmark();\n trainerService.fetchProbabilities(documentModel.documentId, terms);\n }, function(data, status) {\n console.log(status);\n });\n\n }", "title": "" }, { "docid": "0ddac31b253a1a09c52fcf16c36473cf", "score": "0.44109026", "text": "function updateDocs(coll_name, query, fn) {\n return db.eval(\n function (collection, query, fn) {\n db[collection].find(query).forEach(function (doc) {\n if (fn.apply(doc)) {\n db[collection].save(doc);\n }\n });\n },\n coll_name,\n query,\n fn\n );\n}", "title": "" }, { "docid": "ee35b83c3651a9976dbfdb7ba81b444b", "score": "0.43970758", "text": "function filterChange(doc, change, update) {\n let obj = {\n canceled: false,\n from: change.from,\n to: change.to,\n text: change.text,\n origin: change.origin,\n cancel: () => obj.canceled = true\n };\n if (update) obj.update = (from, to, text, origin) => {\n if (from) obj.from = Object(_line_pos_js__WEBPACK_IMPORTED_MODULE_4__[\"clipPos\"])(doc, from);\n if (to) obj.to = Object(_line_pos_js__WEBPACK_IMPORTED_MODULE_4__[\"clipPos\"])(doc, to);\n if (text) obj.text = text;\n if (origin !== undefined) obj.origin = origin;\n };\n Object(_util_event_js__WEBPACK_IMPORTED_MODULE_9__[\"signal\"])(doc, \"beforeChange\", doc, obj);\n if (doc.cm) Object(_util_event_js__WEBPACK_IMPORTED_MODULE_9__[\"signal\"])(doc.cm, \"beforeChange\", doc.cm, obj);\n\n if (obj.canceled) {\n if (doc.cm) doc.cm.curOp.updateInput = 2;\n return null;\n }\n\n return {\n from: obj.from,\n to: obj.to,\n text: obj.text,\n origin: obj.origin\n };\n} // Apply a change to a document, and add it to the document's", "title": "" }, { "docid": "3dd9e39c280cfbeb1c37e2c478a07b83", "score": "0.43838805", "text": "function process() {\n if ( !processed ) {\n var editor = EditorManager.getCurrentFullEditor(),\n currentDocument = editor.document,\n originalText = currentDocument.getText(),\n processedText = Processor.process( originalText ),\n cursorPos = editor.getCursorPos(),\n scrollPos = editor.getScrollPos();\n\n // Bail if processing was unsuccessful.\n if ( processedText === false ) {\n return;\n }\n\n // Replace text.\n currentDocument.setText( processedText );\n\n // Restore cursor and scroll positons.\n editor.setCursorPos( cursorPos );\n editor.setScrollPos( scrollPos.x, scrollPos.y );\n\n // Save file.\n CommandManager.execute( Commands.FILE_SAVE );\n\n // Prevent file from being processed multiple times.\n processed = true;\n } else {\n processed = false;\n }\n }", "title": "" }, { "docid": "6ee6a9e1949efaf01bd364bd84843409", "score": "0.43474764", "text": "function viewApplyOperation(view, operation, writesCache, completeServerCache) {\n if (operation.type === OperationType.MERGE &&\n operation.source.queryId !== null) {\n (0,_firebase_util__WEBPACK_IMPORTED_MODULE_2__.assert)(viewCacheGetCompleteServerSnap(view.viewCache_), 'We should always have a full cache before handling merges');\n (0,_firebase_util__WEBPACK_IMPORTED_MODULE_2__.assert)(viewCacheGetCompleteEventSnap(view.viewCache_), 'Missing event cache, even though we have a server cache');\n }\n var oldViewCache = view.viewCache_;\n var result = viewProcessorApplyOperation(view.processor_, oldViewCache, operation, writesCache, completeServerCache);\n viewProcessorAssertIndexed(view.processor_, result.viewCache);\n (0,_firebase_util__WEBPACK_IMPORTED_MODULE_2__.assert)(result.viewCache.serverCache.isFullyInitialized() ||\n !oldViewCache.serverCache.isFullyInitialized(), 'Once a server snap is complete, it should never go back');\n view.viewCache_ = result.viewCache;\n return viewGenerateEventsForChanges_(view, result.changes, result.viewCache.eventCache.getNode(), null);\n}", "title": "" }, { "docid": "ff4159867c9dce7f75c106c40647d3f4", "score": "0.4337513", "text": "function onDocumentClick(currentDocument) {\n onUpdate(currentDocument.documentId);\n closeModal();\n }", "title": "" }, { "docid": "94db35ab797c02807ffa217e0770b21e", "score": "0.43352315", "text": "function emailStaffOnDocUpdate()\n{\n\tlogDebug(\"Script 31 Email Staff on Document Update - Begin\");\n\n\tif (appMatch(\"Building/*/*/*\"))\n\t{\n\t\tactivateTask(\"Plans Distribution\");\n\t\tupdateTask(\"Plans Distribution\",\"Revisions Received\",\"auto updated by script\",\"auto updated by script\");\n\t}\n\t\n\thandleNotificationEmail();\n\n\tlogDebug(\"Script 31 Email Staff on Document Update - End\");\n}", "title": "" }, { "docid": "ed392f8d281071fed6c40bcd811dbadf", "score": "0.43231428", "text": "function viewApplyOperation(view, operation, writesCache, completeServerCache) {\n if (operation.type === OperationType.MERGE &&\n operation.source.queryId !== null) {\n Object(_firebase_util__WEBPACK_IMPORTED_MODULE_2__[\"assert\"])(viewCacheGetCompleteServerSnap(view.viewCache_), 'We should always have a full cache before handling merges');\n Object(_firebase_util__WEBPACK_IMPORTED_MODULE_2__[\"assert\"])(viewCacheGetCompleteEventSnap(view.viewCache_), 'Missing event cache, even though we have a server cache');\n }\n var oldViewCache = view.viewCache_;\n var result = viewProcessorApplyOperation(view.processor_, oldViewCache, operation, writesCache, completeServerCache);\n viewProcessorAssertIndexed(view.processor_, result.viewCache);\n Object(_firebase_util__WEBPACK_IMPORTED_MODULE_2__[\"assert\"])(result.viewCache.serverCache.isFullyInitialized() ||\n !oldViewCache.serverCache.isFullyInitialized(), 'Once a server snap is complete, it should never go back');\n view.viewCache_ = result.viewCache;\n return viewGenerateEventsForChanges_(view, result.changes, result.viewCache.eventCache.getNode(), null);\n}", "title": "" }, { "docid": "ace9338750c42debbcea4df15dc5774c", "score": "0.43106624", "text": "function makeChange(doc, change, ignoreReadOnly) {\n\t if (doc.cm) {\n\t if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }\n\t if (doc.cm.state.suppressEdits) { return }\n\t }\n\t\n\t if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n\t change = filterChange(doc, change, true);\n\t if (!change) { return }\n\t }\n\t\n\t // Possibly split or suppress the update based on the presence\n\t // of read-only spans in its range.\n\t var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n\t if (split) {\n\t for (var i = split.length - 1; i >= 0; --i)\n\t { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text}); }\n\t } else {\n\t makeChangeInner(doc, change);\n\t }\n\t}", "title": "" }, { "docid": "ace9338750c42debbcea4df15dc5774c", "score": "0.43106624", "text": "function makeChange(doc, change, ignoreReadOnly) {\n\t if (doc.cm) {\n\t if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }\n\t if (doc.cm.state.suppressEdits) { return }\n\t }\n\t\n\t if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n\t change = filterChange(doc, change, true);\n\t if (!change) { return }\n\t }\n\t\n\t // Possibly split or suppress the update based on the presence\n\t // of read-only spans in its range.\n\t var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n\t if (split) {\n\t for (var i = split.length - 1; i >= 0; --i)\n\t { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text}); }\n\t } else {\n\t makeChangeInner(doc, change);\n\t }\n\t}", "title": "" }, { "docid": "1aee093081f76f1bb372104d9b391674", "score": "0.430432", "text": "function _modifyBase(self, collectionName, _idOrSearch, changes, multiple, upsert, callback) {\n\n if (self.safe_id && (changes.$set && changes.$set._id || changes.$unset && changes.$unset._id)) {\n return callback(new Error('Attempt to modify _id with safe_id enabled'));\n }\n\n if (self.safeModify && Object.keys(changes).some(change => change[0] !== '$')) {\n return callback(new Error('Attempt to modify whole document with safeModify enabled'));\n }\n\n self.collection(collectionName, async (err, collection) => {\n\n const optionsObj = {\n writeConcern: _writeConcernForCallback(self, callback),\n upsert: upsert\n };\n\n const searchObj = _searchObj(self, _idOrSearch);\n let updateResult = null;\n\n if (!err) {\n try {\n if (multiple) {\n updateResult = await collection.updateMany(searchObj, changes, optionsObj);\n } else {\n updateResult = await collection.updateOne(searchObj, changes, optionsObj);\n }\n } catch (e) {\n err = e;\n }\n }\n\n let numberAffected = updateResult && updateResult.modifiedCount || 0;\n if (upsert) {\n numberAffected += updateResult && updateResult.upsertedCount || 0;\n }\n _callbackOrError(callback, err, numberAffected);\n });\n}", "title": "" }, { "docid": "0f589aa376254dad9d74739228ad4b0a", "score": "0.43002516", "text": "function onFormMapped(err) {\n if (err) {\n // form event with empty response prevents server zombie on error\n Y.log( 'Could not map the form from current activity: ' + err, 'warn', NAME );\n template.raise( 'mapcomplete', {} );\n callback(err);\n return;\n }\n\n //alert('update formDoc after map: ' + JSON.stringify(template.toDict()));\n\n context.attachments.updateFormDoc( context, template, onFormRestored );\n }", "title": "" }, { "docid": "debaaa8ea8584d587aefda51f01536f9", "score": "0.42995667", "text": "function updateDoc(dbCollection, documentId, dataToUpdate) {\n console.log(\" ==> actualizando un documento...\"); \n const queryResult$ = new Rx.Subject();\n db.collection(dbCollection).doc(documentId)\n .update(dataToUpdate)\n .then(result => {\n return queryResult$.next(result);\n })\n .catch(error => {\n console.log(error);\n return queryResult$.next(error);\n });\n return queryResult$;\n \n}", "title": "" }, { "docid": "eaaf8abb8aa510b434280f96b20bc3c8", "score": "0.42994678", "text": "function didSaveTextDocument (document) {\n\tif (isMarkdownDocument(document) && (getRun(document) === \"onSave\")) {\n\t\tlint(document);\n\t\tsuppressLint(document);\n\t}\n}", "title": "" }, { "docid": "eaaf8abb8aa510b434280f96b20bc3c8", "score": "0.42994678", "text": "function didSaveTextDocument (document) {\n\tif (isMarkdownDocument(document) && (getRun(document) === \"onSave\")) {\n\t\tlint(document);\n\t\tsuppressLint(document);\n\t}\n}", "title": "" }, { "docid": "6e26736afc76b2fbd38d3fa067c3fe17", "score": "0.42780316", "text": "function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }\n if (doc.cm.state.suppressEdits) { return }\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) { return }\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text}); }\n } else {\n makeChangeInner(doc, change);\n }\n}", "title": "" }, { "docid": "6e26736afc76b2fbd38d3fa067c3fe17", "score": "0.42780316", "text": "function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }\n if (doc.cm.state.suppressEdits) { return }\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) { return }\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text}); }\n } else {\n makeChangeInner(doc, change);\n }\n}", "title": "" }, { "docid": "09fb0300da40519d9c8905961c9bafe6", "score": "0.42747492", "text": "function onDocumentChanged() {\n // Stop animating because we may not have a new file.\n stopAnimating();\n \n // Reset all the animation variables.\n force = 0.0;\n velocity = 0.0;\n lastScroll = 0;\n lastUpdate = 0;\n \n // And of course, get rid of the listeners to prevent leaks.\n removeListeners();\n \n $scroller = null;\n scrollerElement = null;\n \n // Get the editor for the new file and start everything again: listeners, animation, etc.\n var editor = EditorManager.getCurrentFullEditor();\n if (editor) {\n // This tells code mirror to render a larger part of the document. Having a larger\n // part of the document rendered means there will be less flickering while scrolling\n // at the expense of some extra load time for the file and maybe some pauses once in\n // a while when codemirror has to render other parts of the file. This could be set to\n // infinity in order to have the whole file rendered at once. For small files that\n // provides the smoothest scrolling experince, but for larger files, the performance\n // starts to take a big hit.\n editor._codeMirror.setOption('viewportMargin', 80); \n \n scrollerElement = editor._codeMirror.display.scroller;\n $scroller = $(scrollerElement); \n \n addListeners();\n startAnimating();\n }\n }", "title": "" }, { "docid": "9fd4770a36c694d9dfc232076fd91869", "score": "0.42668962", "text": "function compoundWriteApply(compoundWrite, node) {\n return applySubtreeWrite(newEmptyPath(), compoundWrite.writeTree_, node);\n}", "title": "" }, { "docid": "9fd4770a36c694d9dfc232076fd91869", "score": "0.42668962", "text": "function compoundWriteApply(compoundWrite, node) {\n return applySubtreeWrite(newEmptyPath(), compoundWrite.writeTree_, node);\n}", "title": "" }, { "docid": "448e8969bbd6fef543f1da5dd1024157", "score": "0.42666948", "text": "function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }\n if (doc.cm.state.suppressEdits) { return }\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true)\n if (!change) { return }\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to)\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text}) }\n } else {\n makeChangeInner(doc, change)\n }\n}", "title": "" }, { "docid": "448e8969bbd6fef543f1da5dd1024157", "score": "0.42666948", "text": "function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }\n if (doc.cm.state.suppressEdits) { return }\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true)\n if (!change) { return }\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to)\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text}) }\n } else {\n makeChangeInner(doc, change)\n }\n}", "title": "" }, { "docid": "b4a04bbccb41782d03b2d130cb8a6c1a", "score": "0.42585167", "text": "function makeChange(doc, change, ignoreReadOnly) {\n\t if (doc.cm) {\n\t if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }\n\t if (doc.cm.state.suppressEdits) { return }\n\t }\n\n\t if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n\t change = filterChange(doc, change, true)\n\t if (!change) { return }\n\t }\n\n\t // Possibly split or suppress the update based on the presence\n\t // of read-only spans in its range.\n\t var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to)\n\t if (split) {\n\t for (var i = split.length - 1; i >= 0; --i)\n\t { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text}) }\n\t } else {\n\t makeChangeInner(doc, change)\n\t }\n\t}", "title": "" }, { "docid": "0dac42e46b8f6510ede94e0afea5ebbd", "score": "0.42507002", "text": "static fromUpdateMap(ref, data) {\n const transforms = new Map();\n function encode_(val, path, allowTransforms) {\n if (val instanceof field_value_1.FieldTransform && val.includeInDocumentTransform) {\n if (allowTransforms) {\n transforms.set(path, val);\n }\n else {\n throw new Error(`${val.methodName}() is not supported inside of array values.`);\n }\n }\n else if (Array.isArray(val)) {\n for (let i = 0; i < val.length; ++i) {\n // We need to verify that no array value contains a document transform\n encode_(val[i], path.append(String(i)), false);\n }\n }\n else if (util_1.isPlainObject(val)) {\n for (const prop of Object.keys(val)) {\n encode_(val[prop], path.append(new path_1.FieldPath(prop)), allowTransforms);\n }\n }\n }\n data.forEach((value, key) => {\n encode_(value, path_1.FieldPath.fromArgument(key), true);\n });\n return new DocumentTransform(ref, transforms);\n }", "title": "" }, { "docid": "5b31f1b0a4af4f3ef1cd7cc9c891b864", "score": "0.4249546", "text": "function compoundWriteApply(compoundWrite, node) {\r\n return applySubtreeWrite(newEmptyPath(), compoundWrite.writeTree_, node);\r\n}", "title": "" }, { "docid": "5a45211ad2c0009586637adc55e0d157", "score": "0.42432767", "text": "function makeChange(doc, change, ignoreReadOnly) {\n\t if (doc.cm) {\n\t if (!doc.cm.curOp) return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly);\n\t if (doc.cm.state.suppressEdits) return;\n\t }\n\n\t if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n\t change = filterChange(doc, change, true);\n\t if (!change) return;\n\t }\n\n\t // Possibly split or suppress the update based on the presence\n\t // of read-only spans in its range.\n\t var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n\t if (split) {\n\t for (var i = split.length - 1; i >= 0; --i)\n\t makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text});\n\t } else {\n\t makeChangeInner(doc, change);\n\t }\n\t }", "title": "" }, { "docid": "5211d6254c57bed25ed350b4be4af96e", "score": "0.42404467", "text": "function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }\n if (doc.cm.state.suppressEdits) { return }\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) { return }\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text}); }\n } else {\n makeChangeInner(doc, change);\n }\n }", "title": "" }, { "docid": "b66f6896226fbe04e85030ffdab040ac", "score": "0.42382035", "text": "function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }\n if (doc.cm.state.suppressEdits) { return }\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) { return }\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text, origin: change.origin}); }\n } else {\n makeChangeInner(doc, change);\n }\n}", "title": "" }, { "docid": "b66f6896226fbe04e85030ffdab040ac", "score": "0.42382035", "text": "function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }\n if (doc.cm.state.suppressEdits) { return }\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) { return }\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text, origin: change.origin}); }\n } else {\n makeChangeInner(doc, change);\n }\n}", "title": "" }, { "docid": "b66f6896226fbe04e85030ffdab040ac", "score": "0.42382035", "text": "function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }\n if (doc.cm.state.suppressEdits) { return }\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) { return }\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text, origin: change.origin}); }\n } else {\n makeChangeInner(doc, change);\n }\n}", "title": "" }, { "docid": "b66f6896226fbe04e85030ffdab040ac", "score": "0.42382035", "text": "function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }\n if (doc.cm.state.suppressEdits) { return }\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) { return }\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text, origin: change.origin}); }\n } else {\n makeChangeInner(doc, change);\n }\n}", "title": "" }, { "docid": "b66f6896226fbe04e85030ffdab040ac", "score": "0.42382035", "text": "function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }\n if (doc.cm.state.suppressEdits) { return }\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) { return }\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text, origin: change.origin}); }\n } else {\n makeChangeInner(doc, change);\n }\n}", "title": "" }, { "docid": "b66f6896226fbe04e85030ffdab040ac", "score": "0.42382035", "text": "function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }\n if (doc.cm.state.suppressEdits) { return }\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) { return }\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text, origin: change.origin}); }\n } else {\n makeChangeInner(doc, change);\n }\n}", "title": "" }, { "docid": "b66f6896226fbe04e85030ffdab040ac", "score": "0.42382035", "text": "function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }\n if (doc.cm.state.suppressEdits) { return }\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) { return }\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text, origin: change.origin}); }\n } else {\n makeChangeInner(doc, change);\n }\n}", "title": "" }, { "docid": "b66f6896226fbe04e85030ffdab040ac", "score": "0.42382035", "text": "function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }\n if (doc.cm.state.suppressEdits) { return }\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) { return }\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text, origin: change.origin}); }\n } else {\n makeChangeInner(doc, change);\n }\n}", "title": "" }, { "docid": "b66f6896226fbe04e85030ffdab040ac", "score": "0.42382035", "text": "function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }\n if (doc.cm.state.suppressEdits) { return }\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) { return }\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text, origin: change.origin}); }\n } else {\n makeChangeInner(doc, change);\n }\n}", "title": "" }, { "docid": "b66f6896226fbe04e85030ffdab040ac", "score": "0.42382035", "text": "function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }\n if (doc.cm.state.suppressEdits) { return }\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) { return }\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text, origin: change.origin}); }\n } else {\n makeChangeInner(doc, change);\n }\n}", "title": "" }, { "docid": "b66f6896226fbe04e85030ffdab040ac", "score": "0.42382035", "text": "function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }\n if (doc.cm.state.suppressEdits) { return }\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) { return }\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text, origin: change.origin}); }\n } else {\n makeChangeInner(doc, change);\n }\n}", "title": "" }, { "docid": "b66f6896226fbe04e85030ffdab040ac", "score": "0.42382035", "text": "function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }\n if (doc.cm.state.suppressEdits) { return }\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) { return }\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text, origin: change.origin}); }\n } else {\n makeChangeInner(doc, change);\n }\n}", "title": "" }, { "docid": "c61ee9d71a016c92924f18381cb7b836", "score": "0.42368895", "text": "function updateMetadata(document)\r\n {\r\n rootWidth = document.bounds.right - document.bounds.left;\r\n rootHeight = document.bounds.bottom - document.bounds.top;\r\n\r\n var metadata = {\r\n root_width: rootWidth,\r\n root_height: rootHeight,\r\n coordinate_system: coordinateSystem,\r\n children: convertLayersToChildren(document.layers, null)\r\n }\r\n\r\n //we only write the metadata for spritekit & native_ui, but\r\n //this process also collects all images that need rendering for\r\n //the other two!\r\n if(exportMetadata)\r\n {\r\n // console.log(\"******************************************\");\r\n // console.log(JSON.stringify(metadata));\r\n // printSceneGraph(metadata,0);\r\n // console.log(\"******************************************\");\r\n\r\n var metadata_path = activeDocumentRoot + \"/\" + activeDocumentName + \".txt\";\r\n\r\n console.log(\"WRITING FILE: \" + activeDocumentName + \".txt\");\r\n fs.writeFile(metadata_path, JSON.stringify(metadata)); \r\n } \r\n }", "title": "" }, { "docid": "5b3b3df5a600d856fc582041731717b0", "score": "0.42334396", "text": "onAfterUpdate(req, doc, next) {\n next(null, doc);\n }", "title": "" }, { "docid": "d002131ffaf4109c34c8248c7c5a70d4", "score": "0.42316628", "text": "function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) {\n return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly);\n }\n if (doc.cm.state.suppressEdits) {\n return;\n }\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) {\n return;\n }\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i) {\n makeChangeInner(doc, { from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text });\n }\n } else {\n makeChangeInner(doc, change);\n }\n }", "title": "" }, { "docid": "09b677af235c0c50d4257640d098229f", "score": "0.4221225", "text": "function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly);\n if (doc.cm.state.suppressEdits) return;\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) return;\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text});\n } else {\n makeChangeInner(doc, change);\n }\n }", "title": "" }, { "docid": "09b677af235c0c50d4257640d098229f", "score": "0.4221225", "text": "function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly);\n if (doc.cm.state.suppressEdits) return;\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) return;\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text});\n } else {\n makeChangeInner(doc, change);\n }\n }", "title": "" }, { "docid": "09b677af235c0c50d4257640d098229f", "score": "0.4221225", "text": "function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly);\n if (doc.cm.state.suppressEdits) return;\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) return;\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text});\n } else {\n makeChangeInner(doc, change);\n }\n }", "title": "" }, { "docid": "09b677af235c0c50d4257640d098229f", "score": "0.4221225", "text": "function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly);\n if (doc.cm.state.suppressEdits) return;\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) return;\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text});\n } else {\n makeChangeInner(doc, change);\n }\n }", "title": "" }, { "docid": "09b677af235c0c50d4257640d098229f", "score": "0.4221225", "text": "function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly);\n if (doc.cm.state.suppressEdits) return;\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) return;\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text});\n } else {\n makeChangeInner(doc, change);\n }\n }", "title": "" }, { "docid": "09b677af235c0c50d4257640d098229f", "score": "0.4221225", "text": "function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly);\n if (doc.cm.state.suppressEdits) return;\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) return;\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text});\n } else {\n makeChangeInner(doc, change);\n }\n }", "title": "" }, { "docid": "09b677af235c0c50d4257640d098229f", "score": "0.4221225", "text": "function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly);\n if (doc.cm.state.suppressEdits) return;\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) return;\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text});\n } else {\n makeChangeInner(doc, change);\n }\n }", "title": "" }, { "docid": "09b677af235c0c50d4257640d098229f", "score": "0.4221225", "text": "function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly);\n if (doc.cm.state.suppressEdits) return;\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) return;\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text});\n } else {\n makeChangeInner(doc, change);\n }\n }", "title": "" }, { "docid": "09b677af235c0c50d4257640d098229f", "score": "0.4221225", "text": "function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly);\n if (doc.cm.state.suppressEdits) return;\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) return;\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text});\n } else {\n makeChangeInner(doc, change);\n }\n }", "title": "" }, { "docid": "09b677af235c0c50d4257640d098229f", "score": "0.4221225", "text": "function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly);\n if (doc.cm.state.suppressEdits) return;\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) return;\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text});\n } else {\n makeChangeInner(doc, change);\n }\n }", "title": "" }, { "docid": "09b677af235c0c50d4257640d098229f", "score": "0.4221225", "text": "function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly);\n if (doc.cm.state.suppressEdits) return;\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) return;\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text});\n } else {\n makeChangeInner(doc, change);\n }\n }", "title": "" } ]
398e3d2573a9b2c5d822d49339763cd7
Crea una card per i film / serie tv
[ { "docid": "b8aad86df5446ef979c8ae695e11a567", "score": "0.6148617", "text": "function getMovieCard(imgURL, title) {\n const cardWrap = document.createElement(\"div\");\n const coverImg = document.createElement(\"img\");\n\n const textWrap = document.createElement(\"div\");\n const text = document.createElement(\"h3\");\n\n cardWrap.classList.add(\"card\");\n textWrap.classList.add(\"card__title_wrap\");\n\n text.textContent = title;\n coverImg.src = imgURL;\n\n textWrap.appendChild(text);\n cardWrap.append(coverImg, textWrap);\n\n return cardWrap;\n}", "title": "" } ]
[ { "docid": "deef7149adeb9ed908b4c0717583b3bd", "score": "0.7281212", "text": "function createMovieDisplayCard(result) {\n let card = document.createElement(\"div\");\n card.setAttribute(\"class\", \"card\");\n card.setAttribute(\"style\", \"width:18rem\");\n\n let img = document.createElement(\"img\");\n img.setAttribute(\"src\", result.Poster);\n img.setAttribute(\"class\", \"card-img-top\");\n img.setAttribute(\"alt\", result.Title);\n\n let cardBody = document.createElement(\"div\");\n cardBody.setAttribute(\"class\", \"card-body\");\n\n let cardTitle = document.createElement(\"h5\");\n cardTitle.setAttribute(\"class\", \"card-title\");\n cardTitle.innerHTML = result.Title;\n\n let cardText = document.createElement(\"p\");\n cardText.setAttribute(\"class\", \"card-text\");\n cardText.innerHTML = result.Type + \" \" + result.Year;\n\n cardBody.append(cardTitle, cardText);\n card.append(img, cardBody);\n\n return card;\n}", "title": "" }, { "docid": "be9715d6527a357d54db99bddeae597e", "score": "0.70681894", "text": "createVideoCard() {\n return CardFactory.videoCard(\n 'Bienvenido al Tribunal',\n [{ url: 'https://www.youtube.com/watch?v=7mYgtd2rifY' }],\n \n \n );\n }", "title": "" }, { "docid": "10935fefa56b9b3db35849a972bbf51e", "score": "0.67066616", "text": "function movieCard(donnees){\n\t\n\t_donnees = donnees;\n\tseances = donnees.scr[0];\n\tdonnees = donnees.onShow.movie;\n\t\n\tdocument.getElementById('movieTitle').innerHTML = donnees.title;\n\t\n\t// If there is no rate, show a ligne\n\tdocument.getElementById('pressRate').className = \"note-presse note-\"+rateClass(donnees.statistics.pressRating);\n\tdocument.getElementById('userRate').className = \"note-spectateurs note-\"+rateClass(donnees.statistics.userRating);\n\t\n\t\n\tif (donnees.trailer.href != undefined){\n\t\tdocument.getElementById('movieTrailer').href = donnees.trailer.href;\n\t} else document.getElementById('movieTrailer').visibility = \"hidden\";\n\t\n\tif (donnees.castingShort != undefined){\n\t\tif (donnees.castingShort.directors != undefined){\n\t\t\tdocument.getElementById('director').innerHTML = donnees.castingShort.directors;\n\t\t} else document.getElementById('director').innerHTML = \"Non Renseigné\";\n\t\n\t\tif (donnees.castingShort.actors != undefined){\n\t\t\tdocument.getElementById('actors').innerHTML = donnees.castingShort.actors;\n\t\t} else document.getElementById('actors').innerHTML = \"Non Renseigné\";\n\t} else {\n\t\tdocument.getElementById('director').innerHTML = \"Non Renseigné\";\n\t\tdocument.getElementById('actors').innerHTML = \"Non Renseigné\";\n\t}\n\t\n\tif (donnees.poster.href != undefined){\n\t\tposter = donnees.poster.href;\n\t} else poster = \"static/img/affiches/nan.png\";\n\tdocument.getElementById('moviePicture').src = poster;\n\tdocument.getElementById('movieVersion').innerHTML = _donnees.screenFormat.$;\n\tdocument.getElementById('movieFormat').innerHTML = VOVF(_donnees.version);\n\t\n\tvar allocine_api_recherche = \"http://api.allocine.fr/rest/v3/movie?partner=\"+key_allocine+\"&code=\"+donnees.code+\"&profile=medium&format=json\";\n\t$.getJSON(allocine_api_recherche, showSynopsis);\n\t\n\t// Collect showtime's informations\n\ttab_seances = [];\n\tfor (s=0; s<seances.t.length; s++){\n\t\t$(\"#showtimesList\").append(template_showtimes(seances.t[s].code, seances.t[s].$));\n\t\ttab_seances.push(seances.t[s].code);\n\t\t\n\t\t(function(id, title, showtime, poster){\n\t\t\tdocument.getElementById('showtime-'+id).addEventListener('click', function(){\n\t\t\t\tdocument.getElementById('chatroom').style.display=\"block\";\n var messages = document.getElementById(\"zone_chat\");\n\n\t\t\t\tif (!firstGeneration){\n\t\t\t\t\tvar numrooms = tab_seances.length;\n\t\t\t\t\tsocket.emit('generaterooms', numrooms);\n\t\t\t\t\tsocket.emit('adduser', prompt(\"Quel est votre nom ?\"));\n\t\t\t\t\tsocket.emit('roomchoice', id);\n\t\t\t\t\tfirstGeneration = true;\n\t\t\t\t} else {\n numrooms = tab_seances.length;\n socket.emit('generaterooms', numrooms);\n messages.innerHTML = '';\n\t\t\t\t\tsocket.emit('switchRoom', id);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdocument.getElementById('chat-movie-title').innerHTML = title;\n\t\t\t\tdocument.getElementById('chat-movie-schedule').innerHTML = \"<span class=\"+\"icon-schedule-pin\"+\"></span> \"+showtime;\n\t\t\t\tdocument.getElementById('chat-movie-poster').src = poster;\n\t\t\t\tdocument.getElementById('chat-movie-poster').alt = title;\n\t\t\t\t\n\t\t\t});\n\t\t})(seances.t[s].code, donnees.title, seances.t[s].$, poster)\n\t}\n}", "title": "" }, { "docid": "e4c59065c1f970d63967bee466486deb", "score": "0.66375285", "text": "function disegna_card(dati, tipologia) {\n // controllo se si tratta di un film o di una serie\n // in modo da leggere i dati con le chiavi corrette\n if(tipologia == 'film') {\n // si tratta di un film => leggo title e original_title\n var titolo_card = dati.title;\n var titolo_originale_card = dati.original_title;\n } else {\n // si tratta di una serie => leggo name e original_name\n var titolo_card = dati.name;\n var titolo_originale_card = dati.original_name;\n }\n\n // preparo i dati per il template\n var placeholder = {\n 'titolo': titolo_card,\n 'titolo_originale': titolo_originale_card,\n 'lingua': bandiera_lingua(dati.original_language),\n 'voto': stelline(normalizza_voto(dati.vote_average)),\n 'tipo': tipologia\n };\n var html_card = template(placeholder);\n // appendo la card con i dati del risultato corrente\n $('#risultati').append(html_card);\n }", "title": "" }, { "docid": "235fd976e0cb26bbecd7b4786d8f8565", "score": "0.6597371", "text": "function createCards(){\n\t\t\t// spades\n\t\t\tfor(var i=0;i<8;i++){ cardsArray[i]=new card(i+1+\".png\", i+7, 2, 0); }\n\t\t\t// hearts\n\t\t\tfor(var i=8;i<16;i++){ cardsArray[i]=new card(i+1+\".png\", i-1, 1, 0); }\n\t\t\t// diamonds\n\t\t\tfor(var i=16;i<24;i++){ cardsArray[i]=new card(i+1+\".png\", i-9, 0, 0); }\n\t\t\t// clubs\n\t\t\tfor(var i=24;i<32;i++){ cardsArray[i]=new card(i+1+\".png\", i-17, 3, 0); }\n\t\t}", "title": "" }, { "docid": "87f4dc27759fef97a5e2759745c7e663", "score": "0.6518772", "text": "function createNewCard() {\n clear(); // Resets the canvas\n // Resets the properties of the card\n card.swipeable = false;\n card.swiped = false;\n card.swipeAmount = 0;\n avi.createRandomAvatar();\n card.name = random(names.names);\n card.quest = random(quests.quests);\n card.distance = random(distances);\n setTimeout(function () {\n card.swipeable = true;\n }, 100);\n displayCard();\n}", "title": "" }, { "docid": "36e2cdcbcb538e8ec0c4b9077258e544", "score": "0.64639693", "text": "function renderMovie(movie){\n var $card = $(\"<div class='card'>\");\n var $cardImg = $(\"<div class='card-image'>\");\n var $cardContent = $(\"<div class='card-content'>\");\n var $img = $(\"<img>\");\n\n $img.attr(\"src\",movie.Poster);\n $img.attr(\"data-cardid\",movie.imdbID);\n $img.click(renderMovieDetails);\n \n $cardImg.append($img);\n $cardImg.append(getWatchedActionButton(movie.imdbID));\n \n $cardContent.append($(\"<span class='card-title'>\").text(movie.Title));\n $cardContent.append($(\"<p>\").text(movie.Plot));\n\n $card.attr(\"id\",movie.imdbID);\n $card.append($cardImg);\n $card.append($cardContent);\n\n $movies.append($card);\n \n}", "title": "" }, { "docid": "d864cd8d7c71e183d926ba3dc7847f30", "score": "0.64536625", "text": "function createCard(data) {\n let title = data[\"media\"][\"title\"][\"userPreferred\"]; // Need to figure out when to use let, var, const\n let anilistId = data[\"media\"][\"id\"];\n let currentEpisode = data[\"progress\"] + 1;\n let link = \"https://aniwatch.me/anime/\" + idList[anilistId] + \"/\" + currentEpisode;\n let imgLink = data[\"media\"][\"coverImage\"][\"extraLarge\"];\n let airing = false;\n if (data[\"media\"][\"status\"] === \"RELEASING\") {\n airing = true;\n }\n let airingString = \"Currently airing\"\n if (!airing) {\n airingString = \"Finished airing\"\n }\n\n let divCol1 = document.createElement('div'); // Scuffed\n divCol1.classList.add(\"col-md-6\"); // Scuffed\n divCol1.innerHTML = `\n <div class=\"card text-white bg-dark mb-4\" style=\"max-width: 500px;\">\n <div class=\"row no-gutters\">\n <div class=\"col-md-3\"><img\n src=\"${imgLink}\"\n class=\"card-img-top\"></div>\n <div class=\"col-md-8\">\n <div class=\"card-body\">\n <h5 class=\"card-title\">${title}</h5>\n <p class=\"card-text\">${airingString}</p>\n <a type=\"button\" class=\"btn btn-primary\" data-bs-toggle=\"tooltip\" data-bs-placement=\"top\" title=\"Play episode ${currentEpisode}\" href=\"${link}\">Next Episode</a>\n </div>\n </div>\n </div>\n </div>` // Need to rewrite this HTML\n\n document.getElementById(\"bruh\").appendChild(divCol1); // Scuffed\n}", "title": "" }, { "docid": "a3a4b221f3a4b7b7c7d38beb0a64040e", "score": "0.63783884", "text": "function buildCard(eventoID, titulo, imagen, ciudad, fecha, categoria) {\n var template =\n '<article class=\"animate__animated animate__fadeIn card\">' +\n '<div class=\"card-title\">' +\n titulo +\n \"</div>\" +\n '<div class=\"card-image\">' +\n '<img src=\"' +\n imagen +\n '\">' +\n \"</div>\" +\n '<div class=\"card-description-container\">' +\n '<div class=\"card-description\">' +\n '<div class=\"card-info1\"><div class=\"card-info-title\">Ciudad</div><div class=\"card-info-data\">' +\n ciudad +\n \"</div></div>\" +\n '<div class=\"card-info2\"><div class=\"card-info-title\">Fecha</div><div class=\"card-info-data\">' +\n fecha +\n \"</div></div>\" +\n '<div class=\"card-info3\"><div class=\"card-info-title\">Categoria</div><div class=\"card-info-data\">' +\n categoria +\n \"</div></div>\" +\n \"</div>\" +\n '<div class=\"card-share-detail\">' +\n '<button class=\"card-share-button\" role=\"link\" onclick=\"openDetail(\\'' +\n eventoID +\n '\\')\"><i class=\"fas fa-info-circle\"></i></button>' +\n '<button class=\"card-detail-button\" role=\"link\" onclick=\"window.location=\\'./share.html?eventid=' +\n eventoID +\n '\\'\"><i class=\"fas fa-share-alt-square\"></i></button>' +\n \"</div>\" +\n \"</div>\" +\n \"</article>\";\n return template;\n}", "title": "" }, { "docid": "97d29880e4320fed42aef3038afcebe3", "score": "0.63409436", "text": "function createCards() {\n cardsData.forEach((data, index) => createCard(data, index));\n}", "title": "" }, { "docid": "9d2870dfdb9a93a31259381eb98ab38f", "score": "0.6302348", "text": "function movie(card, ticket, perc) {\n \n\n\n}", "title": "" }, { "docid": "79a5f6de01189945568b422e9a7b78b4", "score": "0.6293391", "text": "function create_tab_nation(nb_card)\n{\n\tvar tab_card = [nb_card];\n\tvar id = [\"vatican\", \"liban\", \"dubai\", \"kosovo\"];\n\tvar img = [\"image1\", \"image2\", \"image3\", \"image4\"];\n\tvar text = [\"JE SAIS PAS\", \"JE SAIS PAS\", \"JE SAIS PAS\", \"JE SAIS PAS\"];\n\tvar prob = [1, 1, 1, 1];\n\tfor (let i = 0; i < nb_card; i++)\n\t{\n\t\tvar card = new Object();\n\t\tcard.id = id[i];\n\t\tcard.img = img[i];\n\t\tcard.text = text[i];\n\t\tcard.prob = prob[i];\n\t\ttab_card[i] = card;\n\t}\n\treturn (tab_card);\n}", "title": "" }, { "docid": "8a71c9f0d7f927e42a23ff385cfe5745", "score": "0.62749743", "text": "function createCards () {\n\t\tvar valueCard = 1;\n\n\t\t// counts the number of cards defined by the user\n\t\tfor(var i = 1; i <= nCards; i++) {\n\t\t\t// use 3 variables to define card front and back\n\t\t\tvar newCard, frontCard, backCard;\n\n\t\t\t// create the element of the card\n\t\t\tnewCard = document.createElement('div');\n\t\t\tnewCard.className = 'card';\n\t\t\tnewCard.setAttribute('data-card', Math.floor(valueCard));\n\t\t\t// adds an event listener to the click of the card\n\t\t\tnewCard.addEventListener('click', cardClick);\n\n\t\t\t// create the element front of the card\n\t\t\tfrontCard = document.createElement('div');\n\t\t\tfrontCard.className = 'face front';\n\t\t\tfrontCard.innerHTML = Math.floor(valueCard);\n\n\t\t\t// create the element back of the card\n\t\t\tbackCard = document.createElement('div');\n\t\t\tbackCard.className = 'face back';\n\n\t\t\t// append the front and back of the card to the newCard variable\n\t\t\tnewCard.appendChild(frontCard);\n\t\t\tnewCard.appendChild(backCard);\n\n\t\t\t// adds the new card to the array of cards\n\t\t\tcards.push(newCard);\n\n\t\t\t// increase the value of card by half, os when using the Math.floor function it \n\t\t\t// will get always 2 cards of each\n\t\t\tvalueCard = valueCard + 0.5;\n\t\t}\n\n\t\tshuffle();\n\t}", "title": "" }, { "docid": "4b291be07ad4dc7385cbd7be7a0e51ef", "score": "0.6267247", "text": "function makeMovieCards(results) {\n for (let i = 0; i < results.length; i++) {\n let card = document.createElement(\"div\");\n let img = document.createElement(\"img\");\n card.appendChild(img);\n\n let body = document.createElement(\"div\");\n card.appendChild(body);\n\n card.classList.add(\"card\");\n\n makeMovieGrid(card);\n\n let header = document.createElement(\"h5\");\n body.appendChild(header);\n\n let description = document.createElement(\"p\");\n body.appendChild(description);\n body.classList.add(\"card-body\");\n\n if (results[i].poster_path) {\n img.src = IMG_BASE + results[i].poster_path;\n } else if (results[i].backdrop_path) {\n img.src = IMG_BASE + results[i].backdrop_path;\n } else {\n img.src = \"img/imageNA.jpg\";\n }\n img.classList.add(\"card-img-top\");\n\n header.textContent = results[i].title;\n header.classList.add(\"card-title\");\n\n description.textContent = results[i].overview;\n description.classList.add(\"card-text\");\n\n // Add event listener for more detailed info about movie\n card.addEventListener(\"click\", function() {\n movieSpecImg.src = \"\";\n pageNav.classList.add(\"d-none\");\n searchPage.classList.add(\"d-none\");\n singleMoviePage.classList.remove(\"d-none\");\n fetch(BASE + \"movie/\" + results[i].id + \"?api_key=\" + API_KEY)\n .then(handleResponse)\n .then(displayMovieSpecs)\n .catch(handleError);\n });\n\n MOVIE_DISPLAY.appendChild(card);\n }\n}", "title": "" }, { "docid": "5911045c41f7f55650eb11c68d5a336a", "score": "0.626635", "text": "function createCards() {\r\n for (let i = 0; i < STARTING_CARDS; i++) {\r\n let card = new Card(i);\r\n cards.push(card);\r\n }\r\n}", "title": "" }, { "docid": "e320ebef3fe121a6e9ae23cf138565cf", "score": "0.62551755", "text": "function createCard(i) {\n const newCard = document.createElement(\"div\");\n newCard.className = \"grid\";\n newCard.classList.add(\"card\");\n newCard.id = i;\n // create divs for the card information\n const photoDiv = document.createElement(\"div\");\n photoDiv.className = \"photo\";\n const photoImg = document.createElement(\"img\");\n photoImg.className = \"cardPhoto\";\n const nameDiv = document.createElement(\"div\");\n nameDiv.className = \"name\";\n const emailDiv = document.createElement(\"div\");\n emailDiv.className = \"email\";\n const locationDiv = document.createElement(\"div\");\n locationDiv.className = \"location\";\n // insert the four elements into the 'newCard' element\n newCard.appendChild(photoDiv);\n photoDiv.appendChild(photoImg);\n newCard.appendChild(nameDiv);\n newCard.appendChild(emailDiv);\n newCard.appendChild(locationDiv);\n return newCard;\n}", "title": "" }, { "docid": "a7adbaa0af6e2d9194ed009ab60ea7a7", "score": "0.6244764", "text": "function createCards(){\n\tconst cardSelector=document.querySelector('ul.deck');\t\n\tfor(let i=0;i<=15;i++){\n\t\tconst card =document.createElement('li');\n\t\tcard.classList=\"card\";\n\t\tcard.id=\"card\"+i;\n\t\tcardSelector.appendChild(card);\n\t}\n}", "title": "" }, { "docid": "15959eecc98729966e7b326ced7701f6", "score": "0.6231691", "text": "function createCards() {\n cardsData.forEach( (data, index) => createCard(data, index) )\n}", "title": "" }, { "docid": "69f684d14255b1d49ebd47a84aa12113", "score": "0.62151504", "text": "function createCardsFigma() {\n const projetos = [{\n title: 'LightNote',\n description: 'O LightNote é uma aplicação criada para fazer anotações rápidas.',\n image: './assets/img/lightnote.svg',\n urlDesktop: '',\n urlMobile: 'https://www.figma.com/file/CgNH1xlUjqmDYB1IIsMVqr/LightNote?node-id=0%3A1',\n urlProtoDesktop: '',\n urlProtoMobile: 'https://www.figma.com/proto/CgNH1xlUjqmDYB1IIsMVqr/LightNote?node-id=1%3A2&scaling=scale-down&page-id=0%3A1&starting-point-node-id=1%3A2'\n },\n {\n title: 'SaúdeTracking',\n description: 'A aplicação do SaúdeTracking tem como objetivo detectar possíveis surtos de doenças em cidades, regiões e estados.',\n image: './assets/img/saude-tracking.svg',\n urlDesktop: 'https://www.figma.com/file/F7Xytbop4wXtgkVop8fdIM/Projeto---Sa%C3%BAdeTracking',\n urlMobile: 'https://www.figma.com/file/2kqNfJiAjvAyrcxw6iEctk/Sa%C3%BAdeTracking-(Mobile)',\n urlProtoDesktop: 'https://www.figma.com/proto/F7Xytbop4wXtgkVop8fdIM/Projeto---Sa%C3%BAdeTracking?scaling=min-zoom&page-id=0%3A1&starting-point-node-id=1%3A4',\n urlProtoMobile: 'https://www.figma.com/proto/2kqNfJiAjvAyrcxw6iEctk/Sa%C3%BAdeTracking-(Mobile)?scaling=scale-down&page-id=0%3A1&starting-point-node-id=226%3A13'\n },\n {\n title: 'Mão de Vaca',\n description: 'O aplicativo Mão de Vaca é um gerenciador de custos doméstico.',\n image: './assets/img/mao-de-vaca.svg',\n urlDesktop: '',\n urlMobile: 'https://www.figma.com/file/rh8judqBVaF2EX3W6l2BfW/M%C3%A3o-de-Vaca',\n urlProtoDesktop: '',\n urlProtoMobile: 'https://www.figma.com/proto/rh8judqBVaF2EX3W6l2BfW/M%C3%A3o-de-Vaca?node-id=15%3A7&scaling=scale-down&page-id=0%3A1&starting-point-node-id=5%3A2'\n },\n {\n title: 'Netflix Clone',\n description: 'Cópia do layout da Netflix feito com o intuito de aprendizado.',\n image: './assets/img/netflix-clone.svg',\n urlDesktop: '',\n urlMobile: 'https://www.figma.com/file/vTbxcSpKVKxWpWNizdcWdF/Netflix---Clone?node-id=0%3A1',\n urlProtoDesktop: '',\n urlProtoMobile: 'https://www.figma.com/proto/vTbxcSpKVKxWpWNizdcWdF/Netflix---Clone?node-id=0%3A1&scaling=scale-down&page-id=0%3A1&starting-point-node-id=1%3A4'\n }\n ]\n const cards = []\n\n projetos.forEach(proj => {\n const section = document.createElement('section')\n section.classList.add('card')\n\n const img = document.createElement('img')\n img.setAttribute('src', proj.image)\n section.appendChild(img)\n\n const h2 = document.createElement('h2')\n h2.textContent = proj.title\n section.appendChild(h2)\n\n const p1 = document.createElement('p')\n p1.textContent = proj.description\n section.appendChild(p1)\n\n\n const p2 = document.createElement('p')\n p2.textContent = 'Acessar Figma: '\n\n if (proj.urlDesktop !== '') {\n const linkDesktop = document.createElement('a')\n linkDesktop.setAttribute('href', proj.urlDesktop)\n linkDesktop.setAttribute('target', '_blank')\n linkDesktop.textContent = 'Desktop'\n p2.appendChild(linkDesktop)\n if (proj.urlMobile !== '') {\n p2.innerHTML = p2.innerHTML + ' e '\n }\n }\n\n if (proj.urlMobile !== '') {\n const linkMobile = document.createElement('a')\n linkMobile.setAttribute('href', proj.urlMobile)\n linkMobile.setAttribute('target', '_blank')\n linkMobile.textContent = 'Mobile'\n p2.appendChild(linkMobile)\n }\n\n section.appendChild(p2)\n\n if (proj.urlProtoDesktop !== '') {\n const aDesktop = document.createElement('a')\n aDesktop.setAttribute('href', proj.urlProtoDesktop)\n aDesktop.setAttribute('target', '_blank')\n aDesktop.textContent = 'Protótipo Desktop'\n section.appendChild(aDesktop)\n }\n\n if (proj.urlProtoMobile !== '') {\n const aMobile = document.createElement('a')\n aMobile.setAttribute('href', proj.urlProtoMobile)\n aMobile.setAttribute('target', '_blank')\n aMobile.textContent = 'Protótipo Mobile'\n section.appendChild(aMobile)\n }\n\n cards.push(section)\n })\n return cards\n}", "title": "" }, { "docid": "e43fa6a0d8bc31dcfc287e1c81ef6b48", "score": "0.62129164", "text": "function createCards(cards) {\n cards.forEach(card => {\n const elem = createCard(card.image, card.found);\n gameField.appendChild(stringToHTML(elem));\n });\n}", "title": "" }, { "docid": "0fa3cb92280f6275b3d7c82a4726c1a3", "score": "0.62116134", "text": "function makeCard(logo, description, type, title, howToApply) {\n console.log(\"we made it to makeCard\");\n let card = document.createElement(\"div\");\n card.innerHTML = `\n <h1>${title}</h1>\n <img width=\"300px\" src=${logo} alt=\"company logo\" />\n <h3>${type}</h3>\n <div class=\"details\" style=\"display: none\">\n <p>${description}</p>\n <p>${howToApply}</p>\n </div>\n <button class=\"description_button\">Job Description</button>\n `;\n\n document.getElementById(\"cards_container\").appendChild(card);\n}", "title": "" }, { "docid": "26645f970ecab4121ed10e94d3989c22", "score": "0.6197177", "text": "function InsertCards() {\r\n //Initiate variable for sorted array after movie titles in alphabetical order\r\n let moviesSorted = jsonData.movies.sort(function(a, b) {\r\n let titleA = a.title.toUpperCase(); // ignore upper and lowercase\r\n let titleB = b.title.toUpperCase(); // ignore upper and lowercase\r\n if (titleA < titleB) {\r\n return -1;\r\n }\r\n if (titleA > titleB) {\r\n return 1;\r\n }\r\n //Equal\r\n return 0;\r\n });\r\n\r\n //Going through each movie in the sorted array, create a div element with a header and attach it to the div \"box-content\" element\r\n moviesSorted.forEach(function (movie) {\r\n let appContent = document.getElementById(\"main-content\");\r\n\r\n let card = document.createElement(\"div\");\r\n card.setAttribute(\"class\", \"card\");\r\n card.setAttribute(\"id\", \"\" + movie.title);\r\n\r\n let title = document.createElement(\"h2\");\r\n title.innerText = movie.title;\r\n\r\n card.appendChild(title);\r\n appContent.appendChild(card);\r\n });\r\n}", "title": "" }, { "docid": "e9b71f366c85fc82b06211dbd7f95cbd", "score": "0.61927456", "text": "function createCard (){\n\tcount++;\n\tlet newDiv = document.createElement(\"div\"); //create new card\n\tnewDiv.className = \"newcard\";\n\tlet newH2 = document.createElement(\"h2\"); //create new header\n\tlet newH2Text = document.createTextNode(\"Card\" + \" \" + count); //text for header\n\tlet fullH2 = newH2.appendChild(newH2Text); //full header\n\n\tlet btnAddBefore = document.createElement(\"button\"); //creating add before button and text\n\tbtnAddBefore.textContent = \"Add Before\";\n\tlet btnAddAfter = document.createElement(\"button\"); //creating add after button and text\n\tbtnAddAfter.textContent = \"Add After\";\n\tlet btnDelete = document.createElement(\"button\"); //create delete button and text\n\tbtnDelete.textContent = \"Delete\";\n\n\tnewDiv.appendChild(fullH2); \t\t\t\t\t\t//append full H2 to the new card\n\tnewDiv.appendChild(btnAddBefore); \t\t\t\t\t//append buttons to new card (newDiv)\n\tnewDiv.appendChild(btnAddAfter);\n\tnewDiv.appendChild(btnDelete);\n\n\tbtnAddBefore.addEventListener(\"click\", onAddBefore);\n\tbtnAddAfter.addEventListener(\"click\", onAddAfter);\n\tbtnDelete.addEventListener(\"click\", onDelete);\n\treturn newDiv;\n}", "title": "" }, { "docid": "eb6d7059b538440f6f81ebbabd57fdca", "score": "0.6190752", "text": "function createVisualCards(){\n let computerBoard = document.querySelector('#computerCard');\n let computerCard = document.createElement('div')\n computerCard.innerText = `${computerHand[0].Value} ${computerHand[0].Suit}`\n computerBoard.appendChild(computerCard);\n}", "title": "" }, { "docid": "371ba801f366ff8d843e9616d9748189", "score": "0.61863303", "text": "function createOneCard(c) { \n\n var coldiv = document.createElement(\"div\");\n coldiv.setAttribute(\"class\", \"col-md-3\");\n var carddiv = document.createElement(\"div\");\n carddiv.setAttribute(\"class\", \"card\");\n var img = document.createElement(\"img\");\n img.setAttribute(\"class\", \"card-img-top\");\n img.setAttribute(\"src\", \"images/logo_nobg_small.png\");\n var cardbodydiv = document.createElement(\"div\");\n cardbodydiv.setAttribute(\"class\", \"card-body\");\n var h4 = document.createElement(\"h4\");\n h4.setAttribute(\"class\", \"card-title\");\n var text = document.createTextNode(c.data().title);\n h4.appendChild(text);\n var p = document.createElement(\"p\");\n p.setAttribute(\"class\", \"card-text\");\n var text = document.createTextNode(c.data().description);\n p.appendChild(text);\n var a = document.createElement(\"a\");\n a.setAttribute(\"href\",\"recipe.html?\" + c.id);\n a.setAttribute(\"class\", \"btn btn-outline-warning\");\n var text = document.createTextNode(\"View Recipe\");\n a.appendChild(text);\n cardbodydiv.appendChild(h4);\n cardbodydiv.appendChild(p);\n cardbodydiv.appendChild(a);\n img.appendChild(cardbodydiv);\n carddiv.appendChild(img);\n carddiv.appendChild(cardbodydiv);\n coldiv.appendChild(carddiv);\n document.getElementById(\"cards\").appendChild(coldiv);\n}", "title": "" }, { "docid": "8f770195a18e5028e8b92dd7e11b4885", "score": "0.61780816", "text": "function createCards(board) {\n for (var i = 0; i < cards.length; i++) {\n var card = document.createElement('div');\n\n // Assign attributes and event handlers\n card.className = 'card';\n card.setAttribute('data-card', cards[i]);\n card.addEventListener('click', isTwoCards);\n\n // Add card to DOM\n board.appendChild(card);\n }\n}", "title": "" }, { "docid": "12baebe79f1f3420abb531cad1accc9a", "score": "0.6176168", "text": "function createCard() {\n var cardElement = document.createElement('div'),\n cardContainerElement = document.createElement('div');\n\n cardElement.setAttribute('id', 'card-preview');\n cardElement.setAttribute('class', 'card');\n\n cardContainerElement.setAttribute('class', 'card-container');\n cardElement.appendChild(cardContainerElement);\n\n return cardElement;\n }", "title": "" }, { "docid": "b482baa7ed297e4020321d3850212140", "score": "0.61723703", "text": "function createCards() {\n cardsData.forEach((data, index) => createCard(data, index));\n}", "title": "" }, { "docid": "21194b82cf2f75deb7bd709704be6b30", "score": "0.61682045", "text": "function displayMovieCards(movies) { \n cardsEl.innerHTML ='';\n\n movies.forEach((movie) => {\n\n const { title, poster_path, vote_average, overview, release_date, backdrop_path } = movie;\n const movieCard = document.createElement('div');\n movieCard.classList.add('cards');\n\n\n movieCard.innerHTML = `\n <button class=\"card\">\n <span class=\"cardRating\"><i class=\"fas fa-star\"></i>${vote_average}</span>\n <div class=\"cardTitle\" />\n <h3>${title}</h3>\n </div>\n <img src=\"${ poster_path == null? noPreviewTnSrc : IMGPATH + poster_path }\" alt=\"${title}\" class=\"cardImg\">\n \n </button> \n `;\n \n cardsEl.appendChild(movieCard); \n\n const cardBtn = movieCard.querySelector('.card');\n\n cardBtn.addEventListener('click', ()=>{\n \n cardsEl.classList.add('WM');\n overviewEl.classList.add('WM');\n\n overviewEl.innerHTML = `\n <img src=\"${ backdrop_path == null? noPreviewBdSrc : IMGPATH + backdrop_path}\" alt=\"${title}\">\n <div class=\"headData\"><h2>${title}</h2> <p>release date : ${release_date}</p></div>\n <div class=\"overviewTxt\">${overview}\n </div>\n `\n })\n \n });\n }", "title": "" }, { "docid": "a0d374039a5d7c358ee1d508a6cd1860", "score": "0.6159029", "text": "function createCard(name, image_src, data, id, description) {\n this.name = name;\n this.img = image_src;\n this.data = data;\n this.id = id;\n this.description = description;\n }", "title": "" }, { "docid": "44a0f4f945f795596232b3ed394b3513", "score": "0.6158778", "text": "function createCard(data, imgUrl) {\n console.log(data);\n let newCard = $(\"<div>\");\n newCard.addClass(\"card text-center\");\n newCard.attr(\"id\", \"custom-card\");\n\n let newImg = $(\"<img>\");\n newImg.attr(\"src\", imgUrl);\n newImg.addClass(\"card-img-top\");\n newCard.append(newImg);\n\n let newBody = $(\"<div>\");\n newBody.addClass(\"card-body\");\n newCard.append(newBody);\n\n let query = $(\"<h5>\");\n query.addClass(\"card-title\");\n query.text(\"Where to watch \" + data[0].Query);\n newBody.append(query);\n\n let list = $(\"<ul>\");\n list.addClass(\"list-group\");\n newBody.append(list);\n\n //loops through and creates a list item for every place to watch\n for (let i = 0; i < data.length; i++) {\n let listItem = $(\"<li>\");\n listItem.addClass(\"list-group-item\");\n listItem.attr(\"id\", \"custom-card\");\n list.append(listItem);\n\n let cardText = $(\"<p>\");\n cardText.addClass(\"card-text\");\n cardText.text(data[i].Watch);\n listItem.append(cardText);\n\n let button = $(\"<a>\");\n button.addClass(\"btn btn-outline-dark\");\n button.text(\"Click here to stream!\");\n button.attr(\"href\", data[i].WatchUrl);\n listItem.append(button);\n }\n whereToWatchContainer.append(newCard);\n}", "title": "" }, { "docid": "a604fe0c9d2f0da801015a305d38fa23", "score": "0.61583954", "text": "function createCardList(array) {\n var cardList = document.getElementById(\"card-list\")\n cardList.innerHTML = \"\"\n for (let i = 0; i < array.length; i++) {\n // console.log('array[i]', array[i])\n if (array[i].title.includes(\"Supernova\")) {\n const card = document.createElement(\"div\")\n card.className = \"card col-sm-4 col-md-3 col-lg-2\"\n\n const image = document.createElement(\"img\")\n image.src = array[i].url\n image.className = \"card-img-top\"\n\n const title = document.createElement(\"h5\")\n title.innerHTML = array[i].title\n title.className = \"card-title\"\n\n card.appendChild(image)\n card.appendChild(title)\n cardList.appendChild(card)\n }\n\n\n }\n}", "title": "" }, { "docid": "02e7a058a0a28e8b5fe1099b6612c33f", "score": "0.6157566", "text": "function createArticleCard() {\n var image = response[i].image;\n var title = response[i].title;\n var articleURL = response[i].url;\n // var description = response[i].text;\n // var publishedDate = response[i].publishedDate.slice(0, 10);\n\n // creating new card and its' elements to hold each article\n var addMainArticleCard = $(\"<div>\").addClass(\"card mb-3\").attr(\"style\", \"max-width: 540px;\");\n var addImageAndTextRow = $(\"<div>\").addClass(\"row no-gutters\");\n var addImageColumn = $(\"<div>\").addClass(\"col-md-4\");\n var addImage = $(\"<a>\").attr(\"href\", articleURL).attr(\"target\", \"_blank\").html('<img src=\"' + image + '\" class=\"card-img newsImg\"></img>');\n var addTextColumn = $(\"<div>\").addClass(\"col-md-8\");\n var addTextCard = $(\"<div>\").addClass(\"card-body\");\n var addTitle = $(\"<div>\").addClass(\"card-title newsTitle\").html('<a href=\"' + articleURL + '\" target=\"_blank\">' + title + '</img>');\n // var addDescription = $(\"<p>\").addClass(\"card-text\").text(description);\n // var addPublishedDate = $(\"<p>\").addClass(\"card-text\").html('<small class=\"text-muted\">' + publishedDate + '</small>');\n\n // appending elements to the html\n $(\"#newsResults\").append(addMainArticleCard);\n addMainArticleCard.append(addImageAndTextRow);\n addImageAndTextRow.append(addImageColumn);\n addImageColumn.append(addImage);\n addImageAndTextRow.append(addTextColumn);\n addTextColumn.append(addTextCard);\n addTextCard.append(addTitle);\n // addTextCard.append(addDescription);\n // addTextCard.append(addPublishedDate);\n }", "title": "" }, { "docid": "bb7e01a3907ae57721b29203cbcfb8c6", "score": "0.6147426", "text": "function createHeroCard(session) {\n return new builder.HeroCard(session)\n .title(\"Hi I'm IT Support Bot!\")\n .subtitle('Your personalized digital asistant')\n .text(\"Hi I'm here to support, please ask any question you want, If you need assistant please type 'I need help' for to be guided for your issue\")\n .images([\n builder.CardImage.create(session, 'https://blog.freshdesk.com/wp-content/uploads/2016/11/ML_Blog.jpg')\n ]);\n}", "title": "" }, { "docid": "bc83a4afe1bf5e7206a2ac2460e0aa02", "score": "0.61279714", "text": "function view(filmInfo, viewFilms) {\n let block = document.createElement(\"div\");\n block.className = \"anyFilm\";\n block.id = filmInfo.imdbID;\n let blockDiv = document.createElement(\"div\");\n blockDiv.className = \"title\";\n let spanTitle = document.createElement(\"span\");\n spanTitle.innerHTML = filmInfo.Title;\n let spanYear = document.createElement(\"span\");\n spanYear.className = \"year\";\n spanYear.innerHTML = filmInfo.Year;\n let newBlock = document.createElement(\"div\");\n newBlock.className = \"readMore\";\n let spanText = document.createElement(\"span\");\n spanText.innerHTML = \"Feel free to click read more and learn more about this movie\";\n let button = document.createElement(\"button\");\n button.className = \"read\";\n button.innerHTML = \"read more\";\n button.dataset.filmId = filmInfo.imdbID;\n button.onclick = requestId;\n block.appendChild(blockDiv);\n block.appendChild(newBlock);\n blockDiv.appendChild(spanTitle);\n blockDiv.appendChild(spanYear);\n newBlock.appendChild(spanText);\n newBlock.appendChild(button);\n viewFilms.appendChild(block);\n}", "title": "" }, { "docid": "bed47d5c5b50ce259ae38b5844d3c294", "score": "0.6127454", "text": "function createCardElement(id,name,imageUrl,description) {\n let colonneCard = createHtmlElement(\"div\",\"col-12 col-lg-4 mb-4\"); \n let card = createHtmlElement(\"div\",\"card h-100 text-center px-auto border-primary shadow\");\n colonneCard.appendChild(card);\n let imageCard = createImageElement(\"card-img-top\",name,imageUrl);\n card.appendChild(imageCard);\n let bodyCard = createHtmlElement(\"div\",\"card-body\");\n card.appendChild(bodyCard);\n let cardTitle = createElementWithValue(\"h5\",\"card-title\",name);\n bodyCard.appendChild(cardTitle);\n let cardText = createElementWithValue(\"p\",\"card-text\",description);\n bodyCard.appendChild(cardText);\n let buttonHref = \"produit.html?id=\"+id;\n let cardButton = createLinkElement(\"btn btn-primary stretched-link\",\"button\",buttonHref,\"Détails du produit\");\n bodyCard.appendChild(cardButton);\n return colonneCard;\n}", "title": "" }, { "docid": "92224952274df55794ae4c84b8e4c800", "score": "0.6126796", "text": "function createNewCard(n_card) {\n var newCard = document.querySelector(\"#card-data\");\n newCard.appendChild(n_card);\n}", "title": "" }, { "docid": "4ce9a465f4cb3c03d35afe5f72d412a9", "score": "0.61054444", "text": "function MovieCard({id, poster, title, genre, plot, rating}) {\n const formId = `movie-form-${id}`\n\n const editMovie = debounce(edit);\n // the function handleInput takes in the data from the form Id\n // calls edit movie with the id of the movie and the data from the form\n function handleInput() {\n const data = getFormData(document.forms[formId])\n // editMovie is debounced so that it is only called once within a set time\n editMovie(id, data)\n }\n return $('<form class=\"movie\"/>').data('title', title).attr({id: formId}).append(\n // the ?? is null coalescing\n // meaning it uses what comes after ?? if no value is present\n $('<img alt=\"coming soon\"/>').attr({src: poster ?? './comingsoon.jpg'}),\n $('<div class=\"field\"/>').append(\n $('<label/>').text('Rating: '),\n Radio({\n name: 'rating',\n icon: 'fa-star',\n defaultValue: rating,\n length: 5\n }).change(handleInput),\n ),\n $('<div class=\"field\"/>').append(\n $('<label/>').text('Title: '),\n $('<input name=\"title\"/>').val(title).keyup(handleInput)\n ),\n $('<div class=\"field\"/>').append(\n $('<label/>').text('Genre: '),\n $('<input name=\"genre\"/>').val(genre).keyup(handleInput)\n ),\n $('<label/>').text('Plot: '),\n $('<textarea name=\"plot\"/>').val(plot).keyup(handleInput),\n $('<div class=\"footer\"/>').append(\n $('<i class=\"fa fa-trash fa-2x\"/>').click(() => deleteMovie(id))\n ),\n )\n }", "title": "" }, { "docid": "76181f994cf708f764500fc745aa1b97", "score": "0.60968536", "text": "function criar(posts){\r\n const local = document.querySelector('#local');\r\n for(c = Object.keys(posts).length - 1; c >= 0; c--){\r\n //card\r\n const projeto = document.createElement(\"DIV\");\r\n projeto.id = \"projeto\" + c;\r\n \r\n projeto.className = \"demo-card-wide mdl-card mdl-shadow--2dp card\";\r\n\r\n //titulo\r\n const title = document.createElement(\"h3\");\r\n title.className = \"mdl-card__title\";\r\n title.innerHTML = posts[Object.keys(posts)[c]].titulo;\r\n \r\n //autor\r\n const a = document.createElement(\"DIV\");\r\n a.className = \"mdl-card__supporting-text\";\r\n \r\n const a1 = document.createElement(\"h4\");\r\n a1.className = \"mdl-card__title-text\";\r\n a1.innerHTML = \"Autor: \" + posts[Object.keys(posts)[c]].autor;\r\n\r\n //texto\r\n const tx = document.createElement(\"DIV\");\r\n tx.className = \"mdl-card__supporting-text\";\r\n tx.innerHTML = posts[Object.keys(posts)[c]].texto;\r\n\r\n a.appendChild(a1);\r\n a.appendChild(tx);\r\n\r\n const buttons = document.createElement(\"DIV\");\r\n buttons.className = \"mdl-card__actions mdl-card--border\";\r\n \r\n //Bbotao like\r\n const btt1 = document.createElement(\"a\");\r\n btt1.innerHTML = \"<button class='mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent bt btt btlike' onclick='aprovo.call(this)' > Aprovo </button>\";\r\n btt1.id = \"aprovo\" + c;\r\n //n de likes\r\n const nlikes = document.createElement(\"span\");\r\n nlikes.innerHTML = posts[Object.keys(posts)[c]].likes;\r\n nlikes.id = \"count\" + c;\r\n nlikes.className = \"likes\"; \r\n\r\n //botao deslike\r\n const btt2 = document.createElement(\"a\");\r\n btt2.innerHTML = \"<button class='mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect bt btdeslike' onclick='desaprovo.call(this)' > Desaprovo </button>\";\r\n btt2.id = \"desaprovo\" + c;\r\n \r\n //n de deslikes\r\n const ndeslikes = document.createElement(\"span\");\r\n ndeslikes.innerHTML = posts[Object.keys(posts)[c]].deslikes;\r\n ndeslikes.id = \"count\" + c;\r\n ndeslikes.className = \"deslikes\";\r\n \r\n\r\n buttons.appendChild(btt1);\r\n buttons.appendChild(nlikes); \r\n buttons.appendChild(btt2);\r\n buttons.appendChild(ndeslikes); \r\n \r\n //juntar td\r\n projeto.appendChild(title);\r\n projeto.appendChild(a);\r\n projeto.appendChild(buttons);\r\n\r\n //postar\r\n const br = document.createElement(\"br\");\r\n\r\n local.appendChild(projeto);\r\n local.appendChild(br);\r\n }\r\n document.querySelector('.carregando').style.display = 'none';\r\n logado();\r\n document.querySelector('.carregado').style.display = 'block';\r\n}", "title": "" }, { "docid": "61056fc55d44e6e6fa17996640d51c47", "score": "0.609519", "text": "function render(movies) {\r\n\r\n /* \r\n movies = [{movie},{movie}]\r\n */\r\n\r\n let $section = document.querySelector(\"#movie-list\")\r\n $section.innerHTML = \"\"\r\n\r\n movies.forEach(movie => {\r\n\r\n // creating div element to hold movie info\r\n let $div = document.createElement(\"div\")\r\n $div.classList = `movie-card ${movie.id}`\r\n\r\n // movie title\r\n let $h2 = document.createElement(\"h2\")\r\n $h2.appendChild(document.createTextNode(movie.title))\r\n $div.appendChild($h2)\r\n\r\n // movie release date\r\n let $date = document.createElement(\"p\")\r\n $date.appendChild(document.createTextNode(`Released: ${movie.release_date}`))\r\n $div.appendChild($date)\r\n\r\n // movie image\r\n let $img = document.createElement(\"img\")\r\n\r\n let imageUrl = `https://image.tmdb.org/t/p/w500/${movie.poster_path}`\r\n $img.setAttribute(\"src\", imageUrl)\r\n $img.setAttribute(\"alt\", `${movie.title} Image`)\r\n $div.appendChild($img)\r\n\r\n let $iconDiv = document.createElement(\"div\")\r\n $iconDiv.classList = \"meta\"\r\n\r\n // movie votes\r\n let $voteCount = document.createElement(\"p\")\r\n $voteCount.setAttribute(\"id\", \"vote-count\")\r\n let $heart = document.createElement(\"i\")\r\n $heart.classList = \"fa fa-heart\"\r\n $heart.setAttribute(\"area-hidden\", \"true\")\r\n $voteCount.appendChild($heart)\r\n $voteCount.appendChild(document.createTextNode(`${movie.vote_count}`))\r\n\r\n\r\n // movie popularity\r\n let $popularity = document.createElement(\"p\")\r\n $popularity.setAttribute(\"id\", \"popularity\")\r\n let $eye = document.createElement(\"i\")\r\n $eye.classList = \"fa fa-eye\"\r\n $eye.setAttribute(\"area-hidden\", \"true\")\r\n $popularity.appendChild($eye)\r\n $popularity.appendChild(document.createTextNode(`${movie.popularity}`))\r\n\r\n\r\n $iconDiv.appendChild($voteCount)\r\n $iconDiv.appendChild($popularity)\r\n $div.appendChild($iconDiv)\r\n\r\n // adding movie card inside section\r\n $section.appendChild($div)\r\n });\r\n}", "title": "" }, { "docid": "669760e2ebfa50270367df6099074dc1", "score": "0.60942775", "text": "function createDeck (){\n shuffle(cards);\n for (const card of cards){\n const newCard = document.createElement('li');\n newCard.className = 'card';\n const icon = document.createElement('i');\n icon.className = card;\n newCard.appendChild(icon);\n fragment.appendChild(newCard);\n }\n deck.appendChild(fragment);\n}", "title": "" }, { "docid": "6796ab27abc9d1808afca35c490fcabd", "score": "0.60857064", "text": "function createCard(style, shape, color, count){\n if(mode === \"easy\"){\n style = \"solid\";\n }\n let attribute = style + \"-\" + shape + \"-\" + color;\n let id = attribute + \"-\" + count;\n while(ifRepeat(id)){\n if(mode === \"standard\"){\n style = randomStyle();\n }\n shape = randomShape();\n color = randomColor();\n count = randomCount();\n attribute = style + \"-\" + shape + \"-\" + color;\n id = attribute + \"-\" + count;\n }\n let game = document.getElementById('game');\n let card = document.createElement(\"div\");\n card.classList.add(\"card\");\n for(let i = 0; i < count; i++){\n let img = document.createElement(\"img\");\n img.setAttribute(\"src\", \"img/\" + attribute + \".png\");\n img.setAttribute(\"alt\", attribute);\n card.appendChild(img);\n card.setAttribute(\"id\", id);\n same.push(id);\n }\n card.addEventListener(\"click\", selectCard);\n game.appendChild(card);\n }", "title": "" }, { "docid": "a77ee63580ffc20d200a8e51c612e84e", "score": "0.60853857", "text": "function createCard(id) {\n var newCard = {};\n newCard.id = id;\n newCard.uid = uniqueID();\n return newCard;\n}", "title": "" }, { "docid": "128c157f8897df98afd8c8c028d34566", "score": "0.6080518", "text": "function displayMovie() {\n //clears out previous information displayed in the movie card\n $(\"#movie-card\").html(\"\");\n\n //creates a card section div\n var cardSection = $(\"<div>\");\n cardSection.addClass(\"card-section\");\n $(\"#movie-card\").append(cardSection);\n\n //adds the movie title to the movie div\n var cardHead = $(\"<p>\");\n cardHead.addClass(\"card-head\");\n cardHead.text(movieRec.title);\n cardSection.append(cardHead);\n\n //adds an image of the movie poster\n var moviePoster = $(\"<img>\");\n moviePoster.attr(\"src\", \"https://image.tmdb.org/t/p/w500\" + movieRec.poster_path);\n cardSection.append(moviePoster);\n\n //creates a div for the summery\n var movieHead = $(\"<div>\");\n movieHead.addClass(\"card-section\");\n movieHead.attr(\"id\", \"movie-head\")\n $(\"#movie-card\").append(movieHead);\n\n //adds the movie summery to the page\n var movieSummery = $(\"<p>\")\n movieSummery.text(movieRec.overview);\n movieHead.append(movieSummery)\n}", "title": "" }, { "docid": "78c6d182206b91b865c24aa729be689a", "score": "0.6075465", "text": "function createCard() {\n const cardText = document.querySelector('.text-input').value;\n\n if (cardText !== \"\" ) {\n const card = {\n id: Math.random().toString(16).slice(2, 8),\n cardText: cardText,\n position: 'todo'\n }\n\n createCards(card);\n saveCards();\n clearInput();\n }\n}", "title": "" }, { "docid": "0037dc3b99eb6cfacfafce6cc844424f", "score": "0.6064175", "text": "create() {\n let suits = [\"Karo\", \"Herz\", \"Pik\", \"Kreuz\"];\n let rank = ['10', 'Q', 'K', 'A', 'B'];\n let values = [1, 2, 3, 4, 5];\n\n for (let i = 0; i < suits.length; i++) {\n for (let j = 0; j < rank.length; j++) {\n this.cards.push(new Card(suits[i], rank[j], values[j]));\n }\n }\n }", "title": "" }, { "docid": "efb0aac59a2eead0a65c830dfb1e9a4f", "score": "0.605753", "text": "function createCards () {\n let num = 0;\n\n for(let i=0; i<CARDSNUM; i++){\n if(i%2 === 0){\n num++;\n }\n cardsArray[i] = new Cards(num-1);\n }\n}", "title": "" }, { "docid": "f07763843f4ca5aab1c20cee3dec1433", "score": "0.6029454", "text": "function createNewCard(resource) {\n // Get the date and format it\n // var formattedDate = new Date(resource.createdAt);\n // formattedDate = moment(formattedDate).format(\"MMMM Do YYYY, h:mm:ss a\");\n // Create the divs\n var newResourceCard = $(\"<div>\").addClass(\n \"resource-card uk-overflow-hidden\"\n );\n var resourceCardWrapper = $(\"<div>\").addClass(\"uk-card uk-card-default\");\n var cardImageDiv = $(\"<div>\").addClass(\n \"uk-card-media-top uk-flex uk-flex-center uk-flex-middle card-image-container\"\n );\n var cardImage = $(\"<img>\")\n .attr({\n src: resource.imageUrl,\n alt: resource.title + \" thumbnail.\"\n })\n .addClass(\"card-image uk-width-expand\");\n var bodyDiv = $(\"<div>\").addClass(\n \"uk-card-body uk-flex uk-flex-column card-body\"\n );\n var cardTitle = $(\"<h3>\")\n .addClass(\"card-title uk-card-title uk-text-break\")\n .text(resource.title);\n var description = $(\"<p>\")\n .addClass(\"card-description uk-overflow-hidden uk-text-break\")\n .text(resource.description);\n var linkUrl = $(\"<a>\").attr({ href: resource.link, target: \"_blank\" });\n var resourceButton = $(\"<button>\").addClass(\n \"go-button uk-flex uk-flex-center uk-flex-middle uk-align-right\"\n );\n var buttonIcon = $(\"<span>\").attr(\"uk-icon\", \"icon: chevron-right\");\n // Append to each other\n bodyDiv\n .append(cardTitle)\n .append(description)\n .append(linkUrl.append(resourceButton.append(buttonIcon)));\n newResourceCard.append(\n resourceCardWrapper\n .append(cardImageDiv.append(cardImage))\n .append(bodyDiv)\n );\n // Return the new resource card\n return newResourceCard;\n }", "title": "" }, { "docid": "a21d3749de05dd56e789505f9d3748a8", "score": "0.6023761", "text": "function createMissionCards() {\n missionData.forEach(item => {\n\n /** removes loader */\n $(\"#loader\").addClass(\"hide-loader\");\n\n /** create elements */\n let info = document.createElement(\"div\"),\n cardHead = document.createElement(\"div\"),\n headLink = document.createElement(\"a\"),\n cardBody = document.createElement(\"div\");\n\n /** Set Attributes on elements just created */\n info.setAttribute(\"class\", \"card\");\n cardHead.setAttribute(\"class\", \"card-header\");\n headLink.setAttribute(\"href\", item.website);\n headLink.setAttribute(\"target\", \"_blank\");\n cardBody.setAttribute(\"class\", \"card-body\");\n\n /** Append all elements created */\n MAINCONTENT.appendChild(info);\n info.appendChild(cardHead);\n cardHead.appendChild(headLink);\n info.appendChild(cardBody);\n\n /** once all cards are created call function to add data */\n missionInfo(item, headLink, cardBody);\n });\n}", "title": "" }, { "docid": "1c42d7baf46efefa805d180e58f6b44e", "score": "0.60099155", "text": "function makeDOMCard(cardContent) {\n // Make card elements\n let scene = document.createElement(\"div\");\n let card = document.createElement(\"div\");\n let frontFace = document.createElement(\"div\");\n let backFace;\n\n // Make back of card and give appropriate content\n if(game.cardType === \"numbers\") {\n backFace = document.createElement(\"div\");\n backFace.innerText = cardContent;\n } else {\n backFace = document.createElement(\"img\");\n backFace.src = cardContent;\n }\n\n\n\n // Assign each element its appropriate CSS class(es)\n scene.classList.add(\"scene\");\n card.classList.add(\"card\");\n frontFace.classList.add(\"card__face\", \"card__face--front\");\n backFace.classList.add(\"card__face\", \"card__face--back\")\n\n //Add click event listener to card\n card.addEventListener(\"click\", cardClickHandler);\n\n //Give card srcID as data-* attribute\n card.dataset.cardId = cardContent;\n\n // Combine elements together\n scene.appendChild(card);\n card.appendChild(frontFace);\n card.appendChild(backFace);\n\n // Return card as a whole in its scene\n return scene;\n }", "title": "" }, { "docid": "e7f2e8d700cf1d9742c1051a863a971e", "score": "0.6007484", "text": "createCard(){\n\n\t}", "title": "" }, { "docid": "bcf88e392278b360d249e04b66b87c78", "score": "0.6002517", "text": "function createCard(div){\n const cardObject = addNewRandomCard(); // Nytt random kort\n const cardImage = document.createElement('img');\n cardImage.src = `images/${cardObject.file}`;\n cardImage.width = '200';\n cardImage.height = '290';\n document.querySelector(div).appendChild(cardImage);\n return cardObject;\n}", "title": "" }, { "docid": "bf6e241ba46a2d20ac4e118a168e06ce", "score": "0.60024494", "text": "function createCard(input) {\n let card = document.createElement(\"div\");\n card.setAttribute(\"class\", \"card\");\n card.setAttribute(\"style\", \"width:18rem\");\n\n let cardBody = document.createElement(\"div\");\n cardBody.setAttribute(\"class\", \"card-body\");\n cardBody.setAttribute(\"style\", \"text-align:center\");\n\n let cardTitle = document.createElement(\"h5\");\n cardTitle.setAttribute(\"class\", \"card-title\");\n cardTitle.innerHTML = input;\n\n let btnContainer = document.createElement(\"div\");\n btnContainer.setAttribute(\"class\", \"button-container\");\n\n let movieBtn = document.createElement(\"button\");\n movieBtn.setAttribute(\"class\", \"btn btn-primary\");\n movieBtn.innerText = \"movies\";\n movieBtn.addEventListener(\"click\", (event) => {\n let content = document.getElementById(\"display-section\");\n content.innerHTML = \"\";\n searchMovies(event.target.parentNode.parentNode.firstChild.innerText);\n });\n\n let gifBtn = document.createElement(\"button\");\n gifBtn.setAttribute(\"class\", \"btn btn-primary\");\n gifBtn.innerText = \"gifs\";\n gifBtn.addEventListener(\"click\", (event) => {\n let content = document.getElementById(\"display-section\");\n content.innerHTML = \"\";\n searchGifs(event.target.parentNode.parentNode.firstChild.innerText);\n });\n\n let rmvBtn = document.createElement(\"button\");\n rmvBtn.setAttribute(\"class\", \"btn btn-danger\");\n rmvBtn.innerText = \"Remove\";\n rmvBtn.addEventListener(\"click\", (event) => {\n event.target.parentNode.parentNode.parentNode.remove();\n });\n\n btnContainer.append(movieBtn, gifBtn, rmvBtn);\n cardBody.append(cardTitle, btnContainer);\n card.appendChild(cardBody);\n\n return card;\n}", "title": "" }, { "docid": "1e4a83d9747612bff8ff30f5c31ad472", "score": "0.5995533", "text": "function genCard() {\n // a loop to define the number of articles, reformat each publish date, and build a card for each article\n for (var i = 0; i < filteredResults.length; i++) {\n\n // number of results\n var numResults = filteredResults.length;\n // vars for the title, abstract, URL, and article number\n var title = filteredResults[i].title;\n var abstract = filteredResults[i].abstract;\n var articleURL = filteredResults[i].short_url;\n var numArticle = i + 1;\n // ##############################################################\n // this is where the date is reformatted using moment.js\n // get the published_date from article in default timezone\n var published = filteredResults[i].published_date;\n // pull the date and time from the published string and stick the date and time together in a format that works with moment.js in est variable\n var est = (published.slice(0, 10)) + ' ' + (published.slice(11, 16));\n // convert the EST date/time to UTC\n var utcFull = moment.tz(est, 'America/Toronto').utc().format();\n // pull the date and time from the string again and stick together in utc variable\n var utc = (utcFull.slice(0, 10)) + ' ' + (utcFull.slice(11, 16));\n // use Moment.js to convert timezone to fiji time and format \n var fiji = moment.tz(utc, 'Pacific/Fiji').format('M/D/YYYY h:mm A FJT');\n // var fiji is the new date variable\n // ##############################################################\n\n // if statement for showing first 10 articles\n if (numArticle <= 10) {\n // now take the extracted information from the results and push them into cards \n // create a div and add the class col s12 m6 l4\n var articleCard = $('<div>');\n articleCard.addClass('col s12 l6');\n // appends the article card to the Results section of the page\n $('#Results').append(articleCard);\n\n // add div content to a new variable beginning with the title\n var cardContent = $('<div class = \"card horizontal z-depth-5\"> \\n <div class=\"card-stacked\"> \\n <div class =\"card-content\"> \\n <h5 class = \"header\">' +\n title + '</h5>\\n <p class =\"abstract\">' +\n abstract +\n '</p> \\n <div class =\"card-action artLink\"> \\n <a class = \"btn-floating halfway-fab waves-effect waves-yellow deep-orange z-depth-4\" href =\"' +\n articleURL +\n '\" target=\"_blank\"> <i class = \"material-icons\">link</i> </a> \\n </div> \\n <p>' +\n fiji +\n '</p> </div>\\n </div> \\n </div> \\n </div>');\n\n // append card content to the articleCard\n articleCard.append(cardContent);\n }\n\n // an on click listener waiting for the moreBtn to be clicked, pushing the rest of the results to the page\n $('#moreBtn').on('click', function () {\n // now take the extracted information from the results and push them into cards \n // create a div and add the class col s12 m6 l4\n var articleCard = $('<div>');\n articleCard.addClass('col s12 l6');\n\n $('#Results').append(articleCard);\n\n // add div content to a new variable beginning with the title\n var cardContent = $('<div class = \"card horizontal z-depth-5\"> \\n <div class=\"card-stacked\"> \\n <div class =\"card-content\"> \\n <h5 class = \"header\">' +\n title + '</h5>\\n <p class =\"abstract\">' +\n abstract +\n '</p> \\n <div class =\"card-action artLink\"> \\n <a class = \"btn-floating halfway-fab waves-effect waves-yellow deep-orange z-depth-4\" href =\"' +\n articleURL +\n '\" target=\"_blank\"> <i class = \"material-icons\">link</i> </a> \\n </div> \\n <p>' +\n fiji +\n '</p> </div>\\n </div> \\n </div> \\n </div>');\n\n // append card content to the articleCard\n articleCard.append(cardContent);\n // update the textCenter\n $('#textCenter').empty();\n $('#textCenter').append('<h4>Here are all ' + numResults + ' results.</h4>')\n })\n }\n}", "title": "" }, { "docid": "3acebe5a26c6c256c5ce2e13bd53ac6b", "score": "0.5995391", "text": "function showPlayerHand(){\n for(let i = 0; i<playerHand.length; i++){ \n //Create a card div and give it an ID.\n var newSpace = document.createElement(\"div\"),\n idNum=i+1;\n id=\"PlayerCard \" + idNum;\n newSpace.setAttribute('id', id);\n newSpace.classList.add('cardDesign');\n var card = playerHand[i];\n //Add in the card text\n newSpace.appendChild(createCardText(card));\n //Add in the card picture\n newSpace.appendChild(createCardImg(card));\n //Add our newly created card to the DOM\n playerCards.appendChild(newSpace);\n }\n}", "title": "" }, { "docid": "cf1fc782b792e2449e428e2ea959b53d", "score": "0.59868336", "text": "function creaCast(filmId, type) {\r\n if (type == 'Film') {\r\n //se la proprietà type è uguale a film (e quindi è un Film)\r\n var apiMovCredits = '/movie/'; //API per un film\r\n } else {\r\n //altrimenti non è un film, ma è una SerieTV)\r\n var apiMovCredits = '/tv/'; //API per una serietv\r\n }\r\n var urlMDb = 'https://api.themoviedb.org/3';\r\n $.ajax({\r\n url: urlMDb + apiMovCredits + filmId + '/credits?api_key=' + API_KEY,\r\n method: 'get',\r\n success: function (data) {\r\n var actorResults = data.cast; //variabile che definisce l'array contenente i nomi degli attori\r\n var actors = []; //array che andrà a contenere tutti gli attori del film/serie\r\n if (actorResults.length == 0) {\r\n //se non ci sono risultati nel cast\r\n $('.searchReaults[data-id=\"' + filmId + '\"]')\r\n .find('.cast')\r\n .append(' Cast non disponibile/not available'); //appendo un testo\r\n } else {\r\n //altrimenti se ci sono risultati nel cast\r\n for (var j = 0; j < actorResults.length && j < 10; j++) {\r\n //la parte del cast sarà un array contenente tutti i nomi degli attori e quindi lo ciclo\r\n actors.push(actorResults[j].name); //dal ciclo prendo gli attori e vado ad inserirli nell'array vuoto per 5 volte poichè mi servono solo i primi 5 (oppure potevo usare .slice(0,5) sulla var actors)\r\n }\r\n console.log(actors);\r\n }\r\n $('.searchReaults[data-id=\"' + filmId + '\"]')\r\n .find('.cast')\r\n .append(actors.join(', ')); //in fine vado a cercare la classe cast (nel div .searchReaults con l'id del film corrispondente) e vado ad appendere l'array contenente i 5 attori\r\n },\r\n error: function () {\r\n //alert('cast error');\r\n },\r\n });\r\n} //FINE funzione creaCast.", "title": "" }, { "docid": "50bf0678ffc5d300fe55c125e969fdac", "score": "0.5985303", "text": "function createCard(data, idx) {\r\n\tconst card = document.createElement('div')\r\n\tcard.innerHTML = `\r\n\t\t<h2 class=\"card-title\">${data.title}<h2>\r\n\t\t<img\r\n\t\t\tsrc=\"${data.poster_url}\" \r\n\t\t\talt=\"${data.title} Poster\"\r\n\t\t\tclass=\"card-image\"\r\n\t\t/>\r\n\t\t<div class=\"card-wrapper\">\r\n\t\t\t<span>${data.release_date}</span>\r\n\t\t\t<span>${data.type}</span>\r\n\t\t</div>\r\n\t\t<h3 class=\"card-days_until\">Just ${data.days_until} days!</h3>\r\n\t\t<span\r\n\t\t\tclass=\"${idx == 1 ? 'right-arrow arrow' : 'left-arrow arrow'}\"\r\n\t\t\tid=\"arrow\"\r\n\t\t>\r\n\t\t${idx == 1 ? '→' : '←'}\r\n\t\t</span>\r\n\t\t`\r\n\treturn card\r\n\r\n}", "title": "" }, { "docid": "45037e1fa7883ad177b519c4935b309c", "score": "0.59812707", "text": "function createCard(){\n let leftColumn = document.getElementById(\"leftcolumn\");\n\n let div = document.createElement(\"div\");\n let imgDiv = document.createElement(\"div\");\n let para = document.createElement(\"p\");\n let paraDots = document.createElement(\"span\");\n let para2 = document.createElement(\"p\");\n let h2 = document.createElement(\"h2\");\n let h5 = document.createElement(\"h5\");\n let button = document.createElement(\"button\");\n\n let node = document.createTextNode(\"Filler text\");\n\n div.classList.add(\"card\");\n imgDiv.classList.add(\"blogImg\");\n h2.classList.add(\"text\", \"title\");\n para.classList.add(\"text\");\n paraDots.classList.add(\"text\",\"dots\");\n para2.classList.add(\"text\", \"moreText\");\n para2.setAttribute(\"id\", \"more\");\n button.classList.add(\"text\");\n button.setAttribute(\"id\", \"button\");\n// h2.innerHTML=adjective+food;\n div.appendChild(h2);\n div.appendChild(imgDiv);\n para.innerHTML=\"This is a recipe\";\n div.appendChild(para);\n paraDots.innerHTML=\"...\";\n para.appendChild(paraDots);\n // para2.innerHTML=\"This is more text <br>\";\n div.appendChild(para2);\n button.innerHTML=\"Read more\";\n div.appendChild(button);\n\n leftColumn.appendChild(div);\n $('#more').css(\"display\", \"none\");\n\n speak();\n $.getJSON('data/data.json', gotData);\n generateParagraph();\n}", "title": "" }, { "docid": "5df4a9c690b20744022ca7f653ee2286", "score": "0.5980626", "text": "function makePostCard(title, published, url) {\n // Whole card\n const card = document.createElement(\"a\");\n card.classList.add(\"card\");\n card.classList.add(\"social\");\n card.setAttribute(\"target\", \"_blank\");\n card.setAttribute(\"href\", url);\n card.setAttribute(\"rel\", \"noreferrer\");\n // Dev logo\n const img = document.createElement(\"img\");\n img.setAttribute(\"src\", \"./images/devto.png\");\n img.setAttribute(\"alt\", \"Blog's logo\");\n // Post title\n const head = document.createElement(\"h3\");\n head.classList.add(\"center\");\n head.appendChild(document.createTextNode(title));\n const date = document.createElement(\"p\");\n date.classList.add(\"date\");\n date.classList.add(\"center\");\n date.appendChild(document.createTextNode(published));\n card.appendChild(img);\n card.appendChild(head);\n card.appendChild(date);\n\n return card;\n}", "title": "" }, { "docid": "95be81c17032329bd7a4f9b223890615", "score": "0.59802073", "text": "function createShowCard(rootElem, showInList) {\n let cardDiv1 = cardDiv(rootElem, showInList); \n // Create a div with class of container for styling later.\n let containerDiv1 = containerDiv(cardDiv1);\n // Create the heading1 for the card.\n headerElement(containerDiv1, showInList);\n // Create the image for the card.\n imageElement(containerDiv1, showInList);\n // Create the paragraph for the card.\n paragraphElement(containerDiv1, showInList);\n}", "title": "" }, { "docid": "3a02e1d62d6ea47ef1878aa7691fca09", "score": "0.5972577", "text": "function createBoard() {\r\n \r\n //Loop reading each of the cards \r\n for (var i = 0; i < cards.length; i++) {\r\n \r\n //Creating a card with its unique properties for every card in the loop\r\n let cardElement = document.createElement('img');\r\n cardElement.setAttribute('src', \"images/back.png\");\r\n cardElement.setAttribute('data-id', i);\r\n cardElement.addEventListener('click', flipCard);\r\n document.getElementById('game-board').appendChild(cardElement);\r\n }\r\n \r\n }", "title": "" }, { "docid": "48ebf2bb3220305d070506c5a57bfbad", "score": "0.59693253", "text": "function createToyCard(name, image, likes, id) {\n let card = document.createElement(\"div\");\n let h2 = document.createElement(\"H2\");\n let img = document.createElement(\"IMG\")\n let p = document.createElement(\"p\")\n let button = document.createElement(\"button\")\n card.className = \"card\"\n img.className = \"toy-avatar\"\n img.src = image\n h2.textContent = name //assign h2 value of name\n p.className = \"likes\"\n p.textContent = likes\n button.className = \"like-btn\"\n card.appendChild(h2) //assing h2 to card div\n card.appendChild(img) //add img to card div\n card.appendChild(p) //add likes to card div\n card.appendChild(button)//add like button to card div\n\n toyCollection.appendChild(card)//adds new div to toycollection div\n//make sure that only adding evetn listener for each click\n button.addEventListener(\"click\", event => {\n addLike(id)\n })\n }//end of createToyCard function", "title": "" }, { "docid": "91cd3410260746595a8ef4c4ed791cd9", "score": "0.59577715", "text": "function getDetails(card) {\r\n //Verifico se è un film o una serie\r\n var card_type = card.attr(\"data-card-type\");\r\n var current_card_id = card.attr(\"data-card-id\");\r\n\r\n if (card_type == \"movie\") {\r\n var detail_url = \"https://api.themoviedb.org/3/movie/\" + current_card_id;\r\n //Faccio chiamata ajax via id per film\r\n $.ajax({\r\n url : detail_url,\r\n method : \"GET\",\r\n data : {\r\n api_key : \"fc16baf9f9f37096b14c800ebf114a8a\",\r\n language : \"it\"\r\n },\r\n success: function(data) {\r\n var cast_array = [];\r\n var cast_url = \"https://api.themoviedb.org/3/movie/\" + current_card_id + \"/credits\"\r\n var detail_data = data;\r\n\r\n $.ajax({\r\n url : cast_url,\r\n method : \"GET\",\r\n data : {\r\n api_key : \"fc16baf9f9f37096b14c800ebf114a8a\",\r\n language : \"it\"\r\n },\r\n success: function(data) {\r\n for (var i = 0; (i < data.cast.length) && (i < 5); i++) {\r\n cast_array.push(data.cast[i].name);\r\n }\r\n\r\n console.log(cast_array);\r\n\r\n\r\n //Salvo gli elementi che mi interessano in specifiche variabili\r\n var new_title = detail_data.title;\r\n if (detail_data.overview == \"\") {\r\n var new_preview = \"Nessuna descrizione\";\r\n } else {\r\n var new_preview = detail_data.overview;\r\n }\r\n if (detail_data.poster_path == null) {\r\n var new_poster = \"img/cinema.jpg\";\r\n } else {\r\n var new_poster = \"https://image.tmdb.org/t/p/w342\" + detail_data.poster_path;\r\n }\r\n var new_original_title = detail_data.original_title;\r\n var new_language = detail_data.original_language;\r\n var new_year = detail_data.release_date;\r\n var new_genre = [];\r\n for (var i = 0; i < detail_data.genres.length; i++) {\r\n new_genre.push(detail_data.genres[i].name);\r\n }\r\n var new_cast = cast_array;\r\n\r\n //Genero l'overlay con handlebars\r\n var html_element = {\r\n title : new_title,\r\n preview: new_preview,\r\n original_title: new_original_title,\r\n original_language : new_language,\r\n poster_url : new_poster,\r\n genre : new_genre.join(\", \"),\r\n year : new_year,\r\n cast : new_cast.join(\", \")\r\n };\r\n\r\n var template_html = $(\"#detail-template\").html();\r\n var template_function = Handlebars.compile(template_html);\r\n var html_finale = template_function(html_element);\r\n $(\"main\").append(html_finale);\r\n },\r\n error : function() {\r\n alert(\"Error: Genres\");\r\n }\r\n })\r\n\r\n },\r\n error : function() {\r\n alert(\"Error: Genres\");\r\n }\r\n })\r\n } else {\r\n var detail_url = \"https://api.themoviedb.org/3/tv/\" + current_card_id;\r\n //Faccio chiamata ajax via id per film\r\n $.ajax({\r\n url : detail_url,\r\n method : \"GET\",\r\n data : {\r\n api_key : \"fc16baf9f9f37096b14c800ebf114a8a\",\r\n language : \"it\"\r\n },\r\n success: function(data) {\r\n var cast_array = [];\r\n var cast_url = \"https://api.themoviedb.org/3/tv/\" + current_card_id + \"/credits\"\r\n var detail_data = data;\r\n\r\n $.ajax({\r\n url : cast_url,\r\n method : \"GET\",\r\n data : {\r\n api_key : \"fc16baf9f9f37096b14c800ebf114a8a\",\r\n language : \"it\"\r\n },\r\n success: function(data) {\r\n for (var i = 0; (i < data.cast.length) && (i < 5); i++) {\r\n cast_array.push(data.cast[i].name);\r\n }\r\n\r\n console.log(cast_array);\r\n\r\n\r\n //Salvo gli elementi che mi interessano in specifiche variabili\r\n var new_title = detail_data.name;\r\n if (detail_data.overview == \"\") {\r\n var new_preview = \"Nessuna descrizione\";\r\n } else {\r\n var new_preview = detail_data.overview;\r\n }\r\n if (detail_data.poster_path == null) {\r\n var new_poster = \"img/cinema.jpg\";\r\n } else {\r\n var new_poster = \"https://image.tmdb.org/t/p/w342\" + detail_data.poster_path;\r\n }\r\n var new_original_title = detail_data.original_name;\r\n var new_language = detail_data.original_language;\r\n var new_year = detail_data.first_air_date;\r\n var new_genre = [];\r\n for (var i = 0; i < detail_data.genres.length; i++) {\r\n new_genre.push(detail_data.genres[i].name);\r\n }\r\n var new_cast = cast_array;\r\n\r\n //Genero l'overlay con handlebars\r\n var html_element = {\r\n title : new_title,\r\n preview: new_preview,\r\n original_title: new_original_title,\r\n original_language : new_language,\r\n poster_url : new_poster,\r\n genre : new_genre.join(\", \"),\r\n year : new_year,\r\n cast : new_cast.join(\", \")\r\n };\r\n\r\n var template_html = $(\"#detail-template\").html();\r\n var template_function = Handlebars.compile(template_html);\r\n var html_finale = template_function(html_element);\r\n $(\"main\").append(html_finale);\r\n },\r\n error : function() {\r\n alert(\"Error: Genres\");\r\n }\r\n })\r\n\r\n },\r\n error : function() {\r\n alert(\"Error: Genres\");\r\n }\r\n })\r\n }\r\n}", "title": "" }, { "docid": "1c0ca2ad8bca9aa7b70f2de4457bc36f", "score": "0.59572834", "text": "function createCards () {\n shuffle(list);\n for (let i = 0; i < list.length; i++) {\n let newCard = document.createElement('li');\n newCard.className = 'card';\n newCard.classList.add('fa');\n newCard.classList.add(list[i]);\n deck.appendChild(newCard);\n }\n}", "title": "" }, { "docid": "7bac5fad3bd879c38084549967d5993e", "score": "0.5950241", "text": "function createCard() {\n cards.forEach((card, i) => {\n const positionFromLeft = i * 25;\n const cardElement = document.createElement('div');\n cardElement.setAttribute('data-value', card.value);\n cardElement.classList.add('card', `${card.suit}-${card.value}`);\n cardElement.style.left = `${positionFromLeft}px`;\n cardsWrapper.append(cardElement);\n });\n}", "title": "" }, { "docid": "9cf04d664987a8bdd0d15e1b81d5f74b", "score": "0.59502375", "text": "function newCard(loc, name) {\n let button = document.createElement(\"button\");\n button.setAttribute(\"type\", \"button\");\n button.classList.add(\"card\");\n button.classList.add(\"border\");\n button.classList.add(loc + \"Card\");\n\n let divTag = document.createElement(\"div\");\n divTag.classList.add(\"card-body\");\n\n let h5Tag = document.createElement(\"h5\");\n h5Tag.classList.add(\"card-title\");\n h5Tag.innerHTML = name;\n\n divTag.appendChild(h5Tag);\n button.appendChild(divTag);\n $(\"#\" + loc + \"-div\").append(button);\n return button;\n}", "title": "" }, { "docid": "51fea3516c6391e684dc92fc22e21898", "score": "0.5948541", "text": "function populateCard(movie) {\n $(\"#mediaContainer\").html(\"\").append(\n '<div class=\"card\" style=\"width: 18rem;\">' +\n '<img src=\"' + movie.Poster + '\" class=\"card-img-top\" alt=\"' + movie.Title + '\"/>' +\n '<div class=\"card-body pt-0\">' +\n '<div class=\"row\">' +\n '<a href=\"#\" class=\"col-12 text-right mr-0 mt-0 pt-0 pr-0\">More Info</a>' +\n '</div>' +\n '<h5 class=\"card-title text-center\">' + movie.Title + '</h5>' +\n '<div class=\"row\">' +\n '<p class=\"col-6 card-text text-center\">Rated: </p>' +\n `<p class=\"col-6 card-text text-center\">${movie.Rated}</p>` +\n '</div>' +\n '<div class=\"row\">' +\n '<p class=\"col-6 card-text text-center\">Released: ' + '</p>' +\n `<p class=\"col-6 card-text text-center\">${movie.Released}</p>` +\n '</div>' +\n '<div class=\"row\">' +\n '<p class=\"col-6 card-text text-center\">Runtime: ' + '</p>' +\n `<p class=\"col-6 card-text text-center\">${movie.Runtime}</p>` +\n '</div>' +\n '</div>' +\n '</div>'\n )\n }", "title": "" }, { "docid": "c67ad2da9c38629bdca183a61f979a5a", "score": "0.5945949", "text": "function renderOneCard(card) {\n const name = card.name;\n const image = card.imageUrl;\n if (image && image.length < 1) {\n console.log('ERROR no image!!! ',card);\n return;\n }\n const multiverseId = card.multiverseid;\n if (!multiverseId) {\n console.log(name,' no multiverse id!');\n return;\n }\n const artist = card.artist;\n const setName = card.setName;\n const set = card.set;\n const lb = '&#13;';\n const title = 'Name: '+name+lb+'Artist: '+artist+lb+'Set: '+setName;\n\n // in future open in modal window -- set param does not work for all cards ex: 7ED deskmaster dropps D\n const largeCardImage = 'https://deckmaster.info/images/cards/'+set+'/'+multiverseId.toString()+'-hr.jpg';\n // copy template\n $('.cardContainerTemplate' ).clone()\n .appendTo( '.cards' )\n .addClass(multiverseId.toString())\n .removeClass('cardContainerTemplate')\n .addClass('cardContainer');\n $('.' + multiverseId + ' .cardImage').html('<a href=\"'+largeCardImage+'\" target=\"_blank\"><img src=\"'+image+'\" title=\"'+title+'\"/></a>');\n $('.' + multiverseId + ' .name').text(name);\n $('.' + multiverseId + ' .artist').text(artist);\n $('.' + multiverseId + ' .set').text(set);\n $('.' + multiverseId).show();\n}", "title": "" }, { "docid": "cfeefc856347757c0f8c4a30b5247e33", "score": "0.59444374", "text": "function create(currentCard) {\n var selectedCard = document.querySelector('.deck');\n var li = document.createElement('li');\n var i = document.createElement('i');\n li.setAttribute('class', \"card\");\n i.setAttribute('class', `fa ${currentCard}`);\n i.setAttribute('id', `${ind}`);\n ind++;\n li.append(i);\n selectedCard.append(li);\n\n}", "title": "" }, { "docid": "ad5ee427defda484e410fee2023158a0", "score": "0.5939127", "text": "function showDealerHand(){\n for(let i=0; i<dealerHand.length; i++){\n var newSpace = document.createElement(\"div\");\n idNum = i+1;\n id = \"DealersCard \" + idNum;\n newSpace.setAttribute('id', id);\n newSpace.classList.add('cardDesign');\n var card = dealerHand[i];\n //Add in the card text\n newSpace.appendChild(createCardText(card));\n //Add in the card picture\n newSpace.appendChild(createCardImg(card));\n //Add our newly created card to the DOM\n dealerCards.appendChild(newSpace);\n }\n}", "title": "" }, { "docid": "356856609000ba5b476c77c31e60d88f", "score": "0.5936998", "text": "function makeThroneRoom(){\n\t\tvar throneRoomDescription = \"Choose an action card in your hand. \"+\n\t\t\t\t\t\t\t\t\t\"Play it twice.\";\n\t\tvar throneRoom = new Card(\"throne room\", 4, throneRoomDescription, \n\t\t\t\t\t\t\t\t \"img/throneroom.jpg\");\n\t\treturn throneRoom;\n\t}", "title": "" }, { "docid": "10c276b7b529726a05e745ff118c5f72", "score": "0.5915163", "text": "function chooseDirect() {\r\n // if director is Miyazaki\r\n if (option.value == \"miyazaki\") {\r\n results.innerHTML = \"\";\r\n fetch(\"https://ghibliapi.herokuapp.com/films\")\r\n .then((response) => {\r\n return response.text();\r\n })\r\n .then((data) => {\r\n var movie = JSON.parse(data);\r\n for (var i = 0; i < movie.length; i++) {\r\n if (movie[i].director === \"Hayao Miyazaki\") {\r\n var card = document.createElement(\"div\");\r\n card.classList.add(\"card\");\r\n // Title 1\r\n var header = document.createElement(\"H2\");\r\n var headerText = document.createTextNode(movie[i].title);\r\n card.appendChild(header);\r\n header.appendChild(headerText);\r\n // Title 2\r\n var headerTwo = document.createElement(\"H4\");\r\n var headerTextTwo = document.createTextNode(\r\n movie[i].original_title\r\n );\r\n card.appendChild(headerTwo);\r\n headerTwo.appendChild(headerTextTwo);\r\n // Director\r\n var direct = document.createElement(\"P\");\r\n direct.innerHTML =\r\n \"<strong>Director:</strong> \" + movie[i].director;\r\n card.appendChild(direct);\r\n //Year\r\n var year = document.createElement(\"P\");\r\n year.innerHTML = \"<strong>Year:</strong> \" + movie[i].release_date;\r\n card.appendChild(year);\r\n //Score\r\n var score = document.createElement(\"P\");\r\n score.innerHTML =\r\n \"<strong>Review Score:</strong> \" + movie[i].rt_score;\r\n card.appendChild(score);\r\n // card is appended to resultsContainer Div\r\n results.appendChild(card);\r\n }\r\n }\r\n });\r\n //if director is Takahata\r\n } else if (option.value == \"takahata\") {\r\n results.innerHTML = \"\";\r\n fetch(\"https://ghibliapi.herokuapp.com/films\")\r\n .then((response) => {\r\n return response.text();\r\n })\r\n .then((data) => {\r\n var movie = JSON.parse(data);\r\n for (var i = 0; i < movie.length; i++) {\r\n if (movie[i].director === \"Isao Takahata\") {\r\n var card = document.createElement(\"div\");\r\n card.classList.add(\"card\");\r\n // Title 1\r\n var header = document.createElement(\"H2\");\r\n var headerText = document.createTextNode(movie[i].title);\r\n card.appendChild(header);\r\n header.appendChild(headerText);\r\n // Title 2\r\n var headerTwo = document.createElement(\"H4\");\r\n var headerTextTwo = document.createTextNode(\r\n movie[i].original_title\r\n );\r\n card.appendChild(headerTwo);\r\n headerTwo.appendChild(headerTextTwo);\r\n // Director\r\n var direct = document.createElement(\"P\");\r\n direct.innerHTML =\r\n \"<strong>Director:</strong> \" + movie[i].director;\r\n card.appendChild(direct);\r\n //Year\r\n var year = document.createElement(\"P\");\r\n year.innerHTML = \"<strong>Year:</strong> \" + movie[i].release_date;\r\n card.appendChild(year);\r\n //Score\r\n var score = document.createElement(\"P\");\r\n score.innerHTML =\r\n \"<strong>Review Score:</strong> \" + movie[i].rt_score;\r\n card.appendChild(score);\r\n // card is appended to resultsContainer Div\r\n results.appendChild(card);\r\n }\r\n }\r\n });\r\n }\r\n}", "title": "" }, { "docid": "02b96e33dd98e709d06875ee6e0ca754", "score": "0.5908546", "text": "function movieGenre(genreId) {\n var $tmdbTop = `https://api.themoviedb.org/3/discover/movie?api_key=${$apiKey}&with_genres=${genreId}&language=en-US&vote_count.gte=750&sort_by=popularity.desc`;\n\n fetch($tmdbTop)\n .then(function (response) {\n return response.json();\n })\n .then(function (data) {\n console.log(data);\n\n document.getElementById(\"movie-list\").innerHTML = \"\";\n\n var $movie = document.getElementById(\"movie-list\");\n\n var $row = document.createElement(\"div\");\n $row.setAttribute(\"class\", \"row\");\n\n for (i = 0; i < 12; i++) {\n var $size = document.createElement(\"div\");\n $size.setAttribute(\"class\", \"col s12 m3 l12\");\n\n var $card = document.createElement(\"div\");\n $card.setAttribute(\"class\", \"card\")\n $card.setAttribute(\"data-movie\", data.results[i].title)\n\n var $img = document.createElement(\"div\");\n $img.setAttribute(\"class\", \"card-image\");\n\n var $content = document.createElement(\"div\");\n $content.setAttribute(\"class\", \"card-content\");\n\n var $poster = document.createElement(\"img\");\n $poster.setAttribute(\"src\", \"https://image.tmdb.org/t/p/w300\" + data.results[i].poster_path);\n\n $img.appendChild($poster);\n $card.appendChild($img);\n $size.appendChild($card);\n $row.appendChild($size);\n $movie.appendChild($row);\n }\n })\n}", "title": "" }, { "docid": "24559a8d130e6538d2a7bc067fc9431e", "score": "0.5907493", "text": "function createCard(pokemon) {\n const col1 = document.createElement('div');\n const card = document.createElement('div');\n const anc = document.createElement('a');\n\n //set attributes\n //add url to anchor element\n anc.setAttribute('href', pokemon.url)\n\n //console.log(pokemon.url);\n col1.setAttribute('class', 'col-1');\n card.setAttribute('class', 'card card-name');\n\n //add pokemon name to card\n card.textContent = pokemon.name;\n\n //append to main-container\n main.appendChild(anc);\n anc.appendChild(col1);\n col1.appendChild(card)\n }", "title": "" }, { "docid": "158c366073bbcd926aff64856fc24e80", "score": "0.59007686", "text": "function ShowDirectors() {\n\n\tmenuPopulate();\n\t\n\tvar show = document.getElementById(\"Nombre\");\n\tshow.innerHTML = \"Directores\";\n\n\tvar contentP = document.getElementById(\"principal\");\n\n\twhile (contentP.firstChild) {\n\tcontentP.removeChild(contentP.firstChild);\n\t}\n\n\tvar video = VideoSystem.getInstance();\n\tvar directors = video.directors;\n\tvar director = directors.next();\n\twhile (director.done !== true){\n\n\t\tvar colum = document.createElement(\"div\");\n\t\tcolum.setAttribute(\"class\",\"col-6 col-md-4 mb-4\");\n\t\tvar content = document.createElement(\"div\");\n\t\tcontent.setAttribute(\"class\",\"card\");\n\t\tvar image = document.createElement(\"img\");\n\t\timage.setAttribute(\"class\",\"card-img-top\");\n\n\t\timage.setAttribute(\"src\",director.value.picture);\n\t\timage.setAttribute(\"alt\",director.value.name);\n\n\t\tvar body = document.createElement(\"div\");\n\t\tbody.setAttribute(\"class\",\"card-body\");\n\t\tvar paragraph = document.createElement(\"p\");\n\t\tparagraph.setAttribute(\"class\",\"card-text\");\n\t\tvar text = document.createTextNode(director.value.name+\" \"+director.value.lastName1);\n\t\tparagraph.appendChild(text);\n\n\t\tvar button = document.createElement(\"button\");\n\t\tbutton.setAttribute(\"class\",\"btn btn-primary\");\n\t\tbutton.setAttribute(\"id\",\"buttonC\");\n\t\tbutton.setAttribute(\"type\",\"button\");\n\t\tbutton.setAttribute(\"value\",director.value.name);\n\t\tvar textB = document.createTextNode(\"Biografia\");\n\t\tbutton.appendChild(textB);\n\t\t\n\t\tcontentP.appendChild(colum);\n\t\tcolum.appendChild(content);\n\t\tcontent.appendChild(body);\n\t\tbody.appendChild(image);\n\t\tbody.appendChild(paragraph);\n\t\tbody.appendChild(button);\n\n\t\tbutton.addEventListener(\"click\",showDirectorAlone);\n\n\t\tdirector = directors.next();\n\t}\n}", "title": "" }, { "docid": "35ab313d25bc2a0fc97a453de9e2cf7d", "score": "0.5896637", "text": "function createToyCard(toyObj){\n // create the div the card will live in (stored in a variable)\n const toyCardDiv = document.createElement('div')\n // adds class name to Div... calls it 'card'.. reference readme step 3\n toyCardDiv.className = 'card'\n //storing the id as toyid\n toyCardDiv.dataset.toyId = toyObj.id\n // create all the elements inside the div\n // create h2 tag for the toy name\n const h2Tag = document.createElement('h2')\n // apply info we need to pass into h2 tag\n h2Tag.innerText = toyObj.name;\n // create img tag for the picture of each toy... we need the name of the object\n const imgTag = document.createElement('img')\n // apply url for picture of toy.. image has src attribute ... we need the image of the object\n imgTag.src = toyObj.image\n // add class to image tag.. refer to readme step 3\n imgTag.className = 'toy-avatar'\n // create ptage for paragraph\n const pTag = document.createElement('p')\n // apply text to the p tag use back ticks since the likes will change\n pTag.innerText = `${toyObj.likes} Likes`\n // applies dataset to ptag to keep count of likes\n pTag.dataset.likes = toyObj.likes\n // creates button for like\n const buttonTag = document.createElement('button')\n // add class name to button refer to readme step 3\n buttonTag.className = 'like-btn'\n // add inner text\n buttonTag.innerText = 'Like <3'\n\n // append all the elements we just made into div parent\n toyCardDiv.append(h2Tag,imgTag, pTag,buttonTag)\n\n return toyCardDiv;\n\n}", "title": "" }, { "docid": "b50124ec4d405bda433eaa0b5ff4546d", "score": "0.58962977", "text": "function cardMaker(info) {\n\t// creating new DOM elements\n\tconst card = document.createElement(\"div\");\n\tconst cardImg = document.createElement(\"img\");\n\tconst cardInfo = document.createElement(\"div\");\n\tconst cardName = document.createElement(\"h3\");\n\tconst cardUsername = document.createElement(\"p\");\n\tconst cardInfoLocation = document.createElement(\"p\");\n\tconst cardInfoProfile = document.createElement(\"p\");\n\tconst profileURL = document.createElement(\"a\");\n\tconst cardInfoFollowers = document.createElement(\"p\");\n\tconst cardInfoFollowing = document.createElement(\"p\");\n\tconst cardInfoBio = document.createElement(\"p\");\n\n\t// adding the classes\n\tcard.classList.add(\"card\");\n\tcardInfo.classList.add(\"card-info\");\n\tcardName.classList.add(\"name\");\n\tcardUsername.classList.add(\"username\");\n\n\t// supplying content\n\tcardImg.setAttribute(\"src\", info.data[\"avatar_url\"]);\n\tcardName.textContent = info.data.name;\n\tcardUsername.textContent = info.data.login;\n\tcardInfoLocation.textContent = \"Location: \" + info.data.location;\n\tprofileURL.setAttribute(\"href\", info.data[\"html_url\"]);\n\tprofileURL.innerHTML = \"Profile: \" + info.data[\"html_url\"];\n\tcardInfoFollowers.textContent = \"Followers: \" + info.data.followers;\n\tcardInfoFollowing.textContent = \"Following: \" + info.data.following;\n\tcardInfoBio.textContent = \"Bio: \" + info.data.bio;\n\n\t// building the structure / appending elements\n\tcard.appendChild(cardImg);\n\tcard.appendChild(cardInfo);\n\tcardInfo.appendChild(cardName);\n\tcardInfo.appendChild(cardUsername);\n\tcardInfo.appendChild(cardInfoLocation);\n\tcardInfo.appendChild(cardInfoProfile);\n\tcardInfoProfile.appendChild(profileURL);\n\tcardInfo.appendChild(cardInfoFollowers);\n\tcardInfo.appendChild(cardInfoFollowing);\n\tcardInfo.appendChild(cardInfoBio);\n\n\t// Stretch\n\t// adding chart inside the card\n\tconst chart = document.createElement(\"img\");\n\tchart.setAttribute(\"src\", `http://ghchart.rshah.org/${info.data.login}`);\n\tchart.classList.add(\"calendar\");\n\tcardInfo.appendChild(chart);\n\n\treturn card;\n}", "title": "" }, { "docid": "0bc9c9d11427f80eb699da41eb8e26b6", "score": "0.5862905", "text": "function createCard({ id, name, types, base_experience: exp }) {\n const card = document.createElement('div');\n card.classList.add('card');\n\n const cardBg = document.createElement('div');\n cardBg.classList.add('card__bg');\n\n const cardTitle = document.createElement('h1');\n cardTitle.classList.add('card__title');\n cardTitle.innerText = `# ${id} ${name}`;\n\n const cardImage = document.createElement('img');\n cardImage.classList.add('card__image');\n cardImage.src = getPokemonImageSrc(id);\n cardImage.alt = name;\n\n const cardType = document.createElement('div');\n cardType.classList.add('card__data');\n cardType.innerText = `Types: ${types\n .map(({ type }) => type.name)\n .join(', ')}`;\n\n const cardExp = document.createElement('div');\n cardExp.classList.add('card__data');\n cardExp.innerText = `Exp: ${exp}`;\n\n [cardBg, cardTitle, cardImage, cardType, cardExp].forEach((elem) => {\n card.appendChild(elem);\n });\n\n return card;\n}", "title": "" }, { "docid": "602b6f76f5d40dbd8e0528a5f7c0dd4d", "score": "0.58628523", "text": "function makeThief(){\n\t\tvar thiefDescription = \"Each other player reveals the top two cards. \"+\n\t\t\t\t\t\t\t \"If they revealed any treasure cards, they \"+\n\t\t\t\t\t\t\t \"trash one of them that you choose. You may \"+\n\t\t\t\t\t\t\t \"gain any or all of these trashed cards. \"+\n\t\t\t\t\t\t\t \"they discard the other revealed cards.\"\n\t\tvar thief = new Card(\"thief\", 4, thiefDescription, \"img/thief.jpg\");\n\t\treturn thief;\n\t}", "title": "" }, { "docid": "30c237f18f92f09d57768852e2ad9126", "score": "0.5847854", "text": "function crearTablero() {\n for (let i = 0; i < cardArray.length; i++) {\n //Colocamos las imagenes que simularan ser la carta volteada\n var carta = document.createElement('img')\n carta.setAttribute('class', 'imagenMemorama')\n carta.setAttribute('src', 'imagenes/cartaVolteada.png')\n carta.setAttribute('data-id', i)\n carta.addEventListener('click', voltearCarta)\n grid.appendChild(carta)\n }\n }", "title": "" }, { "docid": "7da822b74c42930a8eb2b3e2da07d26c", "score": "0.582848", "text": "function createCard(title, content) {\n let newContent = \"<div><button class=\\\"collapsible\\\">\" + title + \"</button>\";\n newContent += \"<div class=\\\"content\\\">\" + content + \"</div></div>\";\n let cardBody = $(\"<div></div>\").html(newContent);\n let card = $(\"<div class='w3-card w3-white'></div>\").append(cardBody);\n return card;\n}", "title": "" }, { "docid": "4fc5dacd71afb16713196ff7ce49642c", "score": "0.58281684", "text": "function createCards(){\n cardsData.forEach( (data,index) => createCard(data,index));\n}", "title": "" }, { "docid": "e3217fcc26ea7a90588626d3b479801d", "score": "0.58210194", "text": "function createCard(data, index) {\n const card = document.createElement('div');\n card.classList.add('card');\n\n if (index === 0) {\n card.classList.add('active');\n }\n\n card.innerHTML = `\n <div class=\"inner-card\">\n <div class=\"inner-card-front\">\n <p>${data.question}</p>\n </div>\n <div class=\"inner-card-back\">\n <p>${data.answer}</p>\n </div>\n </div>\n </div>\n `;\n\n card.addEventListener('click', () => card.classList.toggle('show-answer'));\n\n // Add to DOM cards\n cardsEl.push(card);\n\n cardsContainer.appendChild(card);\n\n updateCurrentText();\n}", "title": "" }, { "docid": "7663ebf9235384702483a988cb7c9388", "score": "0.5817757", "text": "function renderCastCards(cast) {\n for (let i = 0; i < 5; i++) {\n $(\".credits-cast-wrapper\").append(`\n <div class=\"credits-cast-card\">\n <img class=\"credits-cast-card-profile\" src=\"https://image.tmdb.org/t/p/w500${cast[i].profile_path}\" alt=\"${cast[i].name}\">\n <p class=\"credits-cast-card-name\"><strong>${cast[i].name}</strong></p>\n <p class=\"credits-cast-card-character\">${cast[i].character}</p>\n </div>\n `);\n }\n}", "title": "" }, { "docid": "afd6e15fb66af815f3238ce365a1cb35", "score": "0.5815988", "text": "function createBoard() {\n\tfor (var i=0; i<cards.length; i++) {\n\tvar cardElement = document.createElement('div');\n\tcardElement.className = 'card';\n\tcardElement.setAttribute('data-card', cards[i]);\n\tcardElement.addEventListener('click', isTwoCards);\n\tboard.appendChild(cardElement);\n\tboard.appendChild(cardElement);\n\t}\t\n}", "title": "" }, { "docid": "3770ffa2201198a8df400cbb2024da6c", "score": "0.58158773", "text": "function createCards(forecastInfo) {\n var foreData = []\n var createLi;\n var createUl;\n for (i = 0; i < forecastInfo.length; i++) {\n foreData.push(forecastInfo[i].dt_txt)\n foreData.push(forecastInfo[i].main.temp)\n foreData.push(forecastInfo[i].main.humidity)\n foreData.push(forecastInfo[i].wind.speed)\n }\n for (j = 0; j < foreData.length; j+=4) {\n createUl = document.createElement('ul')\n cards.appendChild(createUl)\n for (k = 0; k < 4; k++) {\n createLi = document.createElement(\"li\")\n createLi.textContent = foreData[j+k]\n createUl.appendChild(createLi)\n }\n\n }\n\n}", "title": "" }, { "docid": "d290ad94705cde96782457baaeeb7e33", "score": "0.5812982", "text": "createCard(){\n\t\tvar collectionCard = $('<div></div>')\n\t\t\t\t.addClass(\"col-8 col-md-3 col-lg-2 col-sm-5 mx-auto py-3\")\n\t\t\t\t.html(`\n\t\t\t\t\t<div class=\"card\">\n\t\t\t\t\t\t<div class=\"card-title px-2\">\n\t\t\t\t\t\t\t<span class=\"text-muted\">Type:</span><strong>${this.type}</strong>\n\t\t\t\t\t\t</div>\n\t\t\t \t<img src=${this.imageUrl} alt=\"Image\" style=\"object-fit:contain\">\n\t\t\t \t\t<h5 class=\"px-2\"><strong>${this.title}</strong></h5>\n\t\t\t \t<p class=\"px-2\"><span class=\"text-muted \">Author:</span> <strong>${this.author}</strong></p>\n\t\t\t <p class=\"px-2\"><span class=\"text-muted\">Published by:</span> <strong>${this.publisher}</strong></p>\n\t\t\t <p class=\"px-2\"><span class=\"text-muted\">Genre:</span> <strong>${this.genre}</strong></p>\n\t\t\t <p class=\"px-2\"><span class=\"text-muted\">Rating:</span> <strong>${stars(this.rating)}</strong></p>\n\t\t\t </div> \n\t\t\t `);\n\n \t$('#mainContent').append(collectionCard);\n }", "title": "" }, { "docid": "f995606a9d350001cdc64a49a6b15f76", "score": "0.58021384", "text": "placeCard(idSlot, card){\r\n //creates a blank card\r\n var div = document.createElement(\"span\");\r\n div.className = \"textCard\";\r\n if(card.show == true){\r\n div.innerText =(cardList[card.parsedCard >> 4].split(\" \")[card.parsedCard & 15]);\r\n //will show the card if this.player[][].show == true; true by default\r\n //deck.showCard(div, idSlot,card);\r\n }else{div.innerText = \"🂠\"};\r\n if(this.riverCount!=0)setTimeout(function(){idSlot.appendChild(div);}, time+=1000,)\r\n else idSlot.appendChild(div);\r\n\r\n }", "title": "" }, { "docid": "646f0fb4fe55e63960bbe208d29916e9", "score": "0.5793916", "text": "function addItem() {\r\n results.innerHTML = \"\";\r\n fetch(\"https://ghibliapi.herokuapp.com/films\")\r\n .then((response) => {\r\n return response.text();\r\n })\r\n .then((data) => {\r\n var movie = JSON.parse(data);\r\n for (var i = 0; i < movie.length; i++) {\r\n var card = document.createElement(\"div\");\r\n card.classList.add(\"card\");\r\n // Title 1\r\n var header = document.createElement(\"H2\");\r\n var headerText = document.createTextNode(movie[i].title);\r\n card.appendChild(header);\r\n header.appendChild(headerText);\r\n // Title 2\r\n var headerTwo = document.createElement(\"H4\");\r\n var headerTextTwo = document.createTextNode(movie[i].original_title);\r\n card.appendChild(headerTwo);\r\n headerTwo.appendChild(headerTextTwo);\r\n // Director\r\n var direct = document.createElement(\"P\");\r\n direct.innerHTML = \"<strong>Director:</strong> \" + movie[i].director;\r\n card.appendChild(direct);\r\n //Year\r\n var year = document.createElement(\"P\");\r\n year.innerHTML = \"<strong>Year:</strong> \" + movie[i].release_date;\r\n card.appendChild(year);\r\n //Score\r\n var score = document.createElement(\"P\");\r\n score.innerHTML = \"<strong>Review Score:</strong> \" + movie[i].rt_score;\r\n card.appendChild(score);\r\n // card is appended to resultsContainer Div\r\n results.appendChild(card);\r\n }\r\n });\r\n}", "title": "" }, { "docid": "76e5b5511afd4705d209bb5ea6cb7f4d", "score": "0.5793476", "text": "function createCardForDeck(name, description, id, cardsNum) {\n return (\n <Fragment key={id}>\n <li className=\"list-group-item\">\n <div className=\"card border-0\">\n <div className=\"card-body\" id={id}>\n <h5 className=\"card-title\">{name}</h5>\n <p>{`${cardsNum} cards`}</p>\n <p className=\"card-text\">{description}</p>\n <button\n to=\"/\"\n className=\"btn btn-secondary mr-1\"\n id=\"viewDeck\"\n onClick={OnClick}\n >\n View\n </button>\n <button\n to=\"/\"\n className=\"btn btn-primary mr-1\"\n id=\"studyDeck\"\n onClick={OnClick}\n >\n Study\n </button>\n <button\n to=\"/\"\n className=\"btn btn-danger\"\n id=\"deleteDeck\"\n onClick={deleteDeck}\n >\n Delete\n </button>\n </div>\n </div>\n </li>\n </Fragment>\n );\n }", "title": "" }, { "docid": "19d98594f3584156dc33e198e53798fe", "score": "0.5793361", "text": "function trendNow(){\r\n\tfunction moviePosters(film){\r\n\t\treturn film.map(filmlist => {\r\n\t\t\treturn `\r\n\t\t\t<div class=\"cardList\">\r\n\t\t\t<section>\r\n\t\t\t<img src=\"${imgAPI+filmlist.poster_path}\" alt=\"\">\r\n\t\t\t</section>\r\n\t\t\t<section class=\"ditel\">\r\n\t\t\t<p class=\"judul\">${filmlist.title}</p>\r\n\t\t\t<p class=\"rate\"> <i class=\"fa fa-star\" aria-hidden=\"true\"></i> ${filmlist.vote_average}</p>\r\n\t\t\t</section>\r\n\t\t</div>\r\n\t\t\t`\r\n\t\t})\r\n\t}\r\n\tfunction cards(film){\r\n\tconst filmEl = document.createElement('div');\r\n\tfilmEl.setAttribute('class', 'cards');\r\n\tconst filmTemplate = moviePosters(film);\r\n\tfilmEl.innerHTML += filmTemplate;\r\n\treturn filmEl;\r\n\t}\r\n\r\n\tfetch(trendMovie)\r\n\t\t.then(res => res.json())\r\n\t\t.then(data => {\r\n\t\t\tconst film = data.results;\r\n\t\t\tconsole.log(film);\r\n\t\t\tconst filmCards = cards(film);\r\n\t\t\theader.appendChild(filmCards);\r\n\t})\r\n}", "title": "" }, { "docid": "6691277d75248f1b12478f698334a055", "score": "0.5791753", "text": "function createBoard() {\n \tfor (var i = 0; i < cards.length; i++) {\n\n \t\tvar cardElement = document.createElement('div');\n\n \t\tcardElement.className = 'card';\n\n \t\tcardElement.setAttribute('data-card', cards[i]);\n\n \t\tcardElement.addEventListener('click', isTwoCards);\n \t\t\n \t\tboard.appendChild(cardElement);\n\n\n \t}\n }", "title": "" }, { "docid": "28ef70b5e44fc748bcccbe8337e3878a", "score": "0.57897687", "text": "function placeCards() {\n\n // Gets JSON to make 12 Person Objects and make cards for each one\n $.getJSON('https://randomuser.me/api/?nat=gb,us&results=12', function (data) {\n for (let index = 0; index < 12; index++) {\n listOfPeople.push(new Person(data.results[index], index));\n $('#gallery').append(listOfPeople[index].createPerson());\n }\n });\n\n }", "title": "" }, { "docid": "d9eefff6b55a16b1d38f2e6971bcb198", "score": "0.57862985", "text": "function card(i, v) {\r\n\tthis.image = i;\r\n\tthis.value = v;\r\n}", "title": "" }, { "docid": "ad197f6867ab89196b52834170f087d6", "score": "0.5782822", "text": "function createFileCard() {\n var div = document.createElement(\"div\");\n div.className = \"card m-3 p-3\";\n return div;\n }", "title": "" }, { "docid": "0f0cd01ae89a1630747cae5681de3466", "score": "0.5781651", "text": "function printFilms(listPelis){\r\n\r\n $('#listPelis').html(\"\");\r\n\r\n $.each( listPelis, function( key, oFilm){\r\n let card = `\r\n <div class=\"col-md-3 col-sm-6\">\r\n <div class=\"card text-center\">\r\n <div class=\"card-block\">\r\n <img src=\"${oFilm.cover}\" alt=\"\" width=\"600\" class=\"img-fluid\">\r\n\r\n\r\n <div class=\"card-body\">\r\n\r\n <h4 class=\"card-title\">${oFilm.name}</h4>\r\n\r\n <p class=\"card-text\">Precio: ${oFilm.price}</p>\r\n <button class=\"btn btn-primary\" data-toggle=\"modal\" data-target=\"#cantidades\" onclick=\"modalVideo(${oFilm.id}, '${oFilm.name}','${oFilm.price}')\">pedir</button>\r\n </div>\r\n </div>\r\n </div>\r\n <br>`;\r\n $('#listPelis').append(card);\r\n });\r\n}", "title": "" }, { "docid": "9598f4d4ef35e7beae818ff0e8546bfb", "score": "0.5780331", "text": "function createCard(data, index) {\n // Create the div for a card\n const card = document.createElement('div');\n // Assign the class of the card\n card.classList.add('card');\n // Check for first card assign active class\n if (index === 0 ) {\n card.classList.add('active');\n }\n // Create the inner HTML for a card\n card.innerHTML = `\n <div class=\"inner-card\">\n <div class=\"card-front\">\n <p>${data.question}</p>\n </div>\n <div class=\"card-back\">\n <p>${data.answer}</p>\n </div>\n </div>`;\n\n // Event listener to flip the card on click\n card.addEventListener('click', () => card.classList.toggle('show-answer'));\n\n // Add the newely created card to the collection of card DOM\n cardElements.push(card);\n // Add the Card to DOM\n cardContainer.appendChild(card);\n\n // Display the current card number / total card number\n updateCurrentCardText();\n}", "title": "" }, { "docid": "b00035cf6559b8e25a2f1cddea0fd4f7", "score": "0.577776", "text": "function createCard(id, book, index) {\n var xhttp = new XMLHttpRequest();\n \n /* GeoGebra Website API call */\n xhttp.open(\"GET\", \"https://api.geogebra.org/v1.0/materials/\" + id + \"?scope=basic&embed=creator\", true);\n xhttp.send();\n \n xhttp.onreadystatechange = function() {\n\t if (this.readyState == 4 && this.status == 200) {\n\t var response = xhttp.responseText;\n\t \n\t if (response) {\n\t\tresponse = JSON.parse(response);\n\t\tvar filename = response.title;\n\t\t\n\t if(response.thumbUrl){\n\t\t\tvar previewUrl = response.thumbUrl;\n\t\t\tvar previewImg;\n\t\t\t// api seems to return various thumb links, some of them not correct?\n\t\t\tif(previewUrl.includes(\"thumb.png\")){\n\t\t\t\tpreviewImg = previewUrl;\n\t\t\t} else {\n\t\t\t\tif(previewUrl.includes(\"thumb$1.png\")){\n\t\t\t\t\tpreviewImg = previewUrl.substr(0,previewUrl.length-6) + '.png';\n\t\t\t\t} else {\n\t\t\t\t\tpreviewImg = previewUrl.substr(0,previewUrl.length-6) + 'mb.png';\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t\tpreviewImg = '';\n\t\t}\n\t\tvar type = response.type;\n\t\tvar author = response.creator.displayname;\n\t\t\n\t }\n\t var typeText = type=='ws'? \"Activity\" : \"Book\";\n\t var aLink = book == 0 ? 'https://www.geogebra.org/m/'+ id : 'https://www.geogebra.org/m/'+ book+'#material/'+ id;\n\t \n\t var card = \n\t\t\t'<div class=\"card\"><a class=\"card-link\" title=\"'+ filename +'\" href=\"'+ aLink +'\" target=\"_blank\">'+\n\t\t\t\t'<div class=\"card-image\" id=\"card-image\"><img alt=\"\" src=\"' + previewImg +'\" ></div>'+\n\t\t\t\t'<div class=\"card-content\">'+\n\t\t\t\t\t'<h3 class=\"card-title\" id=\"card-title\">'+ filename +'</h3>'+\n\t\t\t\t\t'<div class=\"card-type\" id=\"card-type\">'+ typeText +'</div>'+\n\t\t\t\t\t'<p class=\"card-author\" id==\"card-author\">'+ author +'</p>'+\n\t\t\t\t'</div></a></div>';\n\t\t\t\t\n\t document.getElementById(\"cardList\").childNodes[index].innerHTML = card;\n\t }\n\t}; \n}", "title": "" }, { "docid": "a14cc50a384f1d5936743ff8823eb9cf", "score": "0.5775368", "text": "function generarCards() {\n\n $(\"#cardsRow\").empty();\n\n var restXcategoria = new Array();\n var imgXcategoria = new Array();\n\n\n var cardDeck = document.createElement(\"div\");\n cardDeck.setAttribute(\"id\", \"card-deck1\");\n cardDeck.setAttribute(\"class\", \"card-deck\");\n\n\n //obtener rest x categoria\n for (let i = 0; i < Restaurantes.length; i++) {\n\n if (Restaurantes[i].Categoria == categoria && Restaurantes[i].CedulaJuridica == ImgRestaurantes[i].IdRestaurante) {\n restXcategoria.push(Restaurantes[i]);\n imgXcategoria.push(ImgRestaurantes[i]);\n }\n }\n\n for (let i = 0; i < restXcategoria.length; i++) {\n\n //crear cards\n var imgFluid = document.createElement(\"div\");\n imgFluid.setAttribute(\"id\", \"imgFluid\" + restXcategoria[i].CedulaJuridica);\n imgFluid.setAttribute(\"class\", \"col-sm-4\");\n\n var innercard = document.createElement(\"div\");\n innercard.setAttribute(\"id\", \"innercard\" + restXcategoria[i].CedulaJuridica);\n innercard.setAttribute(\"class\", \"card my-4\");\n\n var imgLink = document.createElement(\"a\");\n imgLink.setAttribute(\"id\", \"imgLink\" + restXcategoria[i].CedulaJuridica);\n imgLink.setAttribute(\"href\", \"/Home/RestauranteCliente/\" + restXcategoria[i].CedulaJuridica); //AQUI ES REST CLIENTE, cambiar despues de hacer debug\n\n var imgRest = document.createElement(\"img\");\n imgRest.setAttribute(\"id\", \"imgRest\" + restXcategoria[i].CedulaJuridica);\n\n if (imgXcategoria[i].IdRestaurante == restXcategoria[i].CedulaJuridica) {\n imgRest.setAttribute(\"src\", imgXcategoria[i].Logo); //aqui va la imagen de cloudinary del logo.\n imgRest.setAttribute(\"style\", \"width: 195px; padding: 10px;\");\n }\n\n var bodyCard = document.createElement(\"div\");\n bodyCard.setAttribute(\"id\", \"body\" + restXcategoria[i].CedulaJuridica);\n bodyCard.setAttribute(\"class\", \"card-body\");\n\n var restName = document.createElement(\"h4\");\n restName.setAttribute(\"id\", \"nombreRest\" + restXcategoria[i].CedulaJuridica);\n restName.setAttribute(\"class\", \"card-title\");\n restName.innerHTML = restXcategoria[i].NombreComercial; //aqui va el nombre del restaurante.\n\n //jerarquizar\n document.querySelector(\"#cardsRow\").appendChild(imgFluid);\n document.querySelector(\"#imgFluid\" + restXcategoria[i].CedulaJuridica).appendChild(innercard);\n document.querySelector(\"#innercard\" + restXcategoria[i].CedulaJuridica).appendChild(imgLink);\n document.querySelector(\"#imgLink\" + restXcategoria[i].CedulaJuridica).appendChild(imgRest);\n document.querySelector(\"#innercard\" + restXcategoria[i].CedulaJuridica).appendChild(bodyCard);\n document.querySelector(\"#body\" + restXcategoria[i].CedulaJuridica).appendChild(restName);\n }\n}", "title": "" }, { "docid": "a494889fab2a4439a2735e079796c417", "score": "0.5773473", "text": "function filmsToevoegen(deFilms) {\n for (let i = 0; i < deFilms.length; i++) {\n let theFilm = document.createElement(\"article\"); //Element article aangemaakt: Films worden in articles weergegeven\n let theTitle = document.createElement(\"h2\"); //Element h2 aangemaakt: Title komt tevoorschijn in de h2\n let theSimplePlot = document.createElement(\"p\"); //Element p aangemaakt: Korte uitleg 'simple plot' wordt zichtbaar in de p 'alinea'.\n let theCover = document.createElement(\"img\"); //Element img aangemaakt: Afbeelding van de film wordt weergegeven in de img van de html.\n let theDate = document.createElement(\"p\"); //Element p aangemaakt: Release datum wordt weergegeven in de p\n let theGenres = document.createElement(\"li\"); //Element 'li' aangemaakt: Genres worden weergegeven als een opsomming\n let theTrailer = document.createElement(\"video\"); //Element 'video' aangemaakt: Trailer wordt weergegeven als een video\n let theTrailerSource = document.createElement(\"source\"); //Element voor video: een video heeft een of meer source elementen\n\n //informatie uit de JSON wordt gestopt in de elementen.\n theTitle.innerHTML = deFilms[i].title;\n theSimplePlot.innerHTML = deFilms[i].simple_plot;\n theCover.src = deFilms[i].cover;\n theDate.innerHTML = deFilms[i].release_date;\n theGenres.innerHTML = deFilms[i].genres;\n\n //een video heeft source elementen nodig. //Bron: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video // en uitleg: Sanne 't Hooft\n theTrailerSource.src = deFilms[i].trailer; //src uit de JSON, dus 'trailer' in de source stoppen\n theTrailerSource.setAttribute(\"type\", \"video/mp4\"); //in de src komt er ook een type --> video/mp4 zodat de website weet om wat voor soort videobestand het gaat.\n theTrailer.appendChild(theTrailerSource);\n theTrailer.setAttribute(\"controls\", \"true\"); //controls toevoegen aan de video // voor de knopjes.\n\n theFilm.appendChild(theTitle); // titel toevoegen aan de article\n theFilm.appendChild(theCover); // afbeelding toevoegen aan de article\n theFilm.appendChild(theSimplePlot); // korte beschrijving van de film toevoegen aan de article\n theFilm.appendChild(theDate); // datum toevoegen aan de article\n theFilm.appendChild(theTrailer); // trailer toevoegen aan de article\n theFilm.appendChild(theGenres); // genres toevoegen aan de article\n\n filmContainer.appendChild(theFilm); // article toevoegen aan de film container 'in de film container komt alles zichtbaar op html'\n }\n}", "title": "" } ]
a7c64d18c6c6a694729ce9f299a2895e
GET request that takes in a username and a category to sort by and returns all appplications by the given user sorted by the given sort
[ { "docid": "f209e43a101cf7d9da509cbe1ff218a6", "score": "0.6226998", "text": "function getApplicationData(_username, _sort) {\n $('.application-error').text('');\n $('.event-error').text('');\n const params = {\n method: 'GET',\n url: `${applicationsUrl}/${_username}/${_sort}`,\n success: displayUserApplications\n }\n $.ajax(params);\n }", "title": "" } ]
[ { "docid": "bbcbe8440a1eb286340a79e5ddc5744c", "score": "0.61071885", "text": "async function getapi(url, searchText) {\r\n \r\n // Storing response\r\n const response = await fetch(url);\r\n \r\n // Storing users data in form of JSON\r\n let users = await response.json();\r\n if (response) {\r\n statusLoading();\r\n }\r\n // Categorizing and adding prop category\r\n users.forEach(user => {\r\n if(user[\"id\"]%3==0&&user[\"id\"]%5==0)\r\n user.category =\"Magic\";\r\n else if(user[\"id\"]%3==0&&user[\"id\"]%5!=0)\r\n user.category = \"Third\";\r\n else \r\n user.category = \"Fifth\";\r\n }); \r\n // Listing in Tab\r\n raw = users;\r\n show(users, searchText);\r\n}", "title": "" }, { "docid": "2d3ff8afa44007f2dbc39c7df0bad416", "score": "0.5722896", "text": "async index ({ request, response, view }) {\n\n let params = request.only(['page','offset', 'filter', 'sort', 'search'])\n\n\n let options= {}\n\n if (params.filter) {\n let filters = JSON.parse(params.filter)\n\n options = { ...options, ...filters}\n }\n\n let sorts = {}\n if(params.sort) {\n let sort_parsed = JSON.parse(params.sort)\n\n sorts.column = sort_parsed.column\n sorts.direction = sort_parsed.direction\n } else {\n sorts.column = \"id\"\n sorts.direction = \"ASC\"\n }\n\n return User\n .query()\n .where(options)\n .orderBy(sorts.column, sorts.direction)\n .paginate((params.page == undefined ? 1 : params.page), (params.offset == undefined ? 15 : params.offset))\n }", "title": "" }, { "docid": "69ff2cb249eafa7bb2377f9469fb6b24", "score": "0.57024217", "text": "getAll(pageNumber, email, sortByDate) {\n return http.get(`/api/users/logs?page=${pageNumber}&sortby=${sortByDate}&email=${email}`);\n }", "title": "" }, { "docid": "87dd42f7b7c9bf772582d2c676113725", "score": "0.5628192", "text": "_getData({\n category,\n page = 1,\n query,\n verified = null,\n language,\n }, date) {\n let err\n if (category && !this._category[category]) {\n err = new Error(`'${category}' is not a valid value for category`)\n }\n\n if (err) {\n return Promise.reject(err)\n }\n\n const args = {\n fuv: verified === null || verified ? 'yes' : 'no',\n q: query,\n sort: 'seeders',\n }\n\n if (category) {\n args.category = this._category[category]\n }\n\n if (page > 1) {\n args.skip = (page - 1) * 20\n }\n\n return this._get('search', args)\n .then(res => this._formatResponse(\n res,\n page,\n { verified },\n Date.now() - date,\n ),\n )\n\n }", "title": "" }, { "docid": "b3a8d47c5240b63bd56e2963388348cd", "score": "0.5555056", "text": "function get(userName, sort, offset, limit) {\n \n var configs = getByUser(userName);\n \n //\n // These are reasonable defaults.\n //\n var offset = offset || 0;\n var limit = limit || 20;\n \n return paginate(sortConfigs(sort, configs), offset, limit);\n}", "title": "" }, { "docid": "95ccbd2d021bd96ae2d478d72c043e98", "score": "0.5494205", "text": "async index ({ request, response, auth }) {\n const result = await CategoryService.getAll(request, auth);\n return response.status(result.status).send(result.data);\n }", "title": "" }, { "docid": "fe2f707386a1b0e64dac98c0ff1ca0a5", "score": "0.54863393", "text": "queryUPCs({ filter, include, top, skip, orderBy } = {}) {\n var path = this.buildUrl({\n url: `/api/v2/upcs`,\n parameters: {\n $filter: filter,\n $include: include,\n $top: top,\n $skip: skip,\n $orderBy: orderBy\n }\n });\n return this.restCall({ url: path, verb: 'get', payload: null });\n }", "title": "" }, { "docid": "d296670a925901fd9a9047fd81db05f1", "score": "0.5452791", "text": "async getCategories({ commit }) {\n await client\n .getEntries({\n content_type: 'category',\n order: '-sys.createdAt',\n })\n .then((res) => commit('setCategories', res.items))\n .catch(console.error)\n }", "title": "" }, { "docid": "9ed78793d2f11fbe23254fa519be8d08", "score": "0.5433206", "text": "getAllCategory(category) {\n return fetch(`${URL}${category}`)\n .then(entries => entries.json())\n }", "title": "" }, { "docid": "93ad109e88746c92830dd28e42e97203", "score": "0.54265326", "text": "function getSortedCharacters(req, res, mysql, context, complete){\n var query = \"SELECT characters.characterID, characterName, actorName1, actorName2, races.raceName AS characterRace, locations.locationName AS characterOrigin, weaponDetails FROM characters LEFT JOIN races ON characters.characterRace = races.raceID LEFT JOIN locations ON characters.characterOrigin = locations.locationID\";\n console.log(req.params);\n if(req.params.sortBy == \"1\"){\n query += \" ORDER BY characters.characterName ASC\";\n }else if(req.params.sortBy == \"2\"){\n query += \" ORDER BY characters.characterName DESC\";\n }else if(req.params.sortBy == \"3\"){\n query += \" ORDER BY characterRace, characterName ASC\";\n }else if(req.params.sortBy == \"4\"){\n query += \" ORDER BY characterOrigin, characterName ASC\";\n }\n mysql.pool.query(query, function(error, results, fields){\n if(error){\n res.write(JSON.stringify(error));\n res.end();\n }\n context.characters = results;\n complete();\n });\n }", "title": "" }, { "docid": "763ebe335c76529c040f0e48654b782f", "score": "0.5404444", "text": "function categorySort(catName) {\r\n\tvar xmlhttp = new XMLHttpRequest();\r\n\txmlhttp.onreadystatechange = function() {\r\n if (this.readyState == 4 && this.status == 200) {\r\n document.getElementById(\"sortedResources\").innerHTML = this.responseText;\r\n }\r\n };\r\n\txmlhttp.open(\"GET\", \"../../php/includes/categoryGet.php?categoryname=\" + catName, true);\r\n xmlhttp.send();\r\n}", "title": "" }, { "docid": "fc06e9310e24d1c56e8b0af75e096f99", "score": "0.5357287", "text": "async terminal_customer_listing_by_name(req, res) {\n try {\n const required = {\n security_key: req.headers.security_key,\n main_category_id: req.query.main_category_id,\n terminal_id: req.query.terminal_id,\n table_name: 'venues',\n checkexit: 2\n };\n const non_required = {\n q: req.query.q,\n };\n let requestdata = await helpers.vaildObject(required, non_required, res);\n if (requestdata != \"\") {\n var conditons = {};\n var user = {};\n conditons.terminal_id = requestdata.terminal_id;\n conditons.main_category_id = requestdata.main_category_id;\n conditons.status = 4;\n if (requestdata.q) {\n user.name = {\n [Op.like]: '%' + requestdata.q + '%'\n };\n }\n var Orders = await Order.findAll({\n // include :[{\n\n // model : User,\n // as: 'userDetails',\n // attributes :[\n // 'id','name','image'\n // ]\n // }\n // ],\n attributes: ['user_id'],\n group: ['user_id'],\n order: [\n ['id']\n ],\n where: conditons\n });\n let user_ids = [];\n if (Orders && Orders.length > 0) {\n for (var val of Orders) {\n user_ids.push(val.dataValues.user_id)\n }\n }\n\n // console.log(Orders);\n user.id = { $in: user_ids };\n var Users = await User.findAll({\n attributes: [\n 'id', 'name', 'image'\n ],\n where: user\n })\n return responseHelper.get(res, Users);\n }\n } catch (err) {\n return responseHelper.onError(res, err, err);\n }\n }", "title": "" }, { "docid": "52a09aed3e4bc4d317fd76c73bb8aaae", "score": "0.5343969", "text": "queryUsers({ include, filter, top, skip, orderBy } = {}) {\n var path = this.buildUrl({\n url: `/api/v2/users`,\n parameters: {\n $include: include,\n $filter: filter,\n $top: top,\n $skip: skip,\n $orderBy: orderBy\n }\n });\n return this.restCall({ url: path, verb: 'get', payload: null });\n }", "title": "" }, { "docid": "88e7bce0660f9f98aea8b9f49a92d934", "score": "0.5330879", "text": "getUserCategories(user,handler) {\n const options = { 'account' : user }\n this.requestApi('get_user_categories',options,(data) => {\n handler(data)\n })\n }", "title": "" }, { "docid": "563cb9829e83ac60e9605cde260efce0", "score": "0.53124315", "text": "filterApplicants() {\n const { sort_by } = this.state.filters;\n\n let applicantData = this.state.applicantData.slice();\n if (sort_by.value !== \"None\") {\n const sort_type = sort_by.type === \"Asc\" ? 1 : -1;\n\n if (sort_by.value === \"name\" || sort_by.value === \"rating\") {\n applicantData.sort(\n (a, b) =>\n sort_type *\n (a.personal_data[sort_by.value] >= b.personal_data[sort_by.value]\n ? 1\n : -1)\n );\n } else if (sort_by.value === \"date_of_application\") {\n applicantData.sort(\n (a, b) =>\n sort_type *\n (new Date(a[sort_by.value]) - new Date(b[sort_by.value]))\n );\n }\n }\n\n return applicantData.filter((appl) => appl.status !== \"Rejected\");\n }", "title": "" }, { "docid": "9d1aec4ed5e4ce9bfcc5adc641bba74a", "score": "0.530397", "text": "async getList(username) {\n let userData = (await this.api.get('users', {\n fields: { users: 'id' },\n filter: { name: username },\n })).data;\n\n if (userData.length === 0) throw new Error('User not found');\n\n let userId = userData[0].id;\n let fetchPage = async (offset = 0) => {\n let res = await this.api.get('library-entries', {\n page: { limit: 50, offset: offset },\n filter: { userId: userId, kind: 'anime' },\n include: 'anime.mappings'\n });\n if (res.links.next) {\n let [s, off] = res.links.next.match(/^.*page%5Boffset%5D=(\\d+)$/);\n return fetchPage(off).then(nextData => res.data.concat(nextData));\n }\n return res.data;\n };\n\n return await fetchPage();\n }", "title": "" }, { "docid": "8e4fc527a8b2fc8d555af4ba26f787d1", "score": "0.5291298", "text": "function getAllCategories() {\n Api.get('/categories')\n .then(function (json) {\n json.forEach(cat => categoryNames.push(cat))\n return unique(categoryNames)\n })\n .then(function(categories) {\n makeDropDownListOfCategories(categories)\n })\n .catch(errors => console.log(errors));\n}", "title": "" }, { "docid": "908453df304b7cb81982feb9fc0b2e30", "score": "0.52731836", "text": "function getCityData(req,res){\r\n var city=req.body.city;\r\n var params=req.body.userId;\r\n console.log(params)\r\n Weather.find({\"userId\":params,\"city\":city}, function (err, data){\r\n\r\n if(err){\r\n console.log(err)\r\n }else{\r\n console.log(data)\r\n return res.status(200).send(data);\r\n \r\n }\r\n\r\n }).sort({date: 1});\r\n}", "title": "" }, { "docid": "9b37519238b0bf9ecc30643ebe03045e", "score": "0.5262083", "text": "userSort(context,payload){\n context.commit(\"userSort\",payload);\n }", "title": "" }, { "docid": "1ad55f17b0cbe5f63c7af40ff2c5c33e", "score": "0.52577424", "text": "function getInformation(websiteUrl) {\n var orderedCategories = [];\n var options = {\n url: API_SERVICE_URL + \"?url=\" + websiteUrl,\n headers: {\n \"X-AYLIEN-TextAPI-Application-ID\": \"3259bf68\",\n \"X-AYLIEN-TextAPI-Application-Key\": \"9d0ed44eae4e237cc9a1bafd5e59ce71\"\n },\n json: true\n };\n request(options, function (error, response, body) {\n if(error) {\n console.log(\"error encountered:\", error);\n }\n if (error === null && response.statusCode == 200)\n orderedCategories = body.categories.sort(compareByScore);\n resultedObject = findCategory(orderedCategories, websiteUrl);\n console.log(resultedObject);\n })\n}", "title": "" }, { "docid": "682c40e483a6ccd86549a24946273a21", "score": "0.5255351", "text": "function GetAlarmGroupView(filters, sort, asc) {\n return $.ajax({\n type: \"POST\",\n url: apiHomePath + \"api/SPCTools/AlarmGroupView/SearchableList\",\n contentType: \"application/json; charset=utf-8\",\n dataType: 'json',\n data: JSON.stringify({ Searches: filters, OrderBy: sort, Ascending: asc }),\n cache: false,\n async: true\n });\n}", "title": "" }, { "docid": "397d4d58f2aeb1d6e2e3bba8e61fcd2e", "score": "0.5255225", "text": "function getActivitiesGroupedAndSortedByDay(user_id){\n\t\t$.get('/api/user/'+user_id+'/allactivitiesbyday/', function(data){\n\t\t\tloadGroupedSortedDay(data, function(){\n\t\t\t\tloadGSDGraph();\n\t\t\t});\n\t\t});\n\t}", "title": "" }, { "docid": "8d5e85d39a9b2bd22898f0aea0fbfeb9", "score": "0.5249933", "text": "function getTopicsSorted(req, res) {\n req.query.pageNumber = req.query.pageNumber || 0;\n req.query.limit = req.query.limit || 20;\n\n var start = req.query.pageNumber * req.query.limit;\n var end = start + req.query.limit;\n\n res.send({\n message: 'Topics fetched',\n status: true,\n data: topics.sort(function(a, b) {\n return b.upVotes - a.upVotes;\n }).slice(start, end)\n });\n}", "title": "" }, { "docid": "e6f2089a3336ad9fabd95f657d1d3a88", "score": "0.5222391", "text": "function App() {\n const [users, setUsers] = useState(()=>localStorage.getItem('users') ? JSON.parse(localStorage.getItem('users')) : []);\n const [filter, setFilter] = useState(\"\");\n const [gender, setGender] = useState(\"\");\n const [sort, setSort] = useState({ key: \"\", asc: true });\n\n useEffect(() => {\n localStorage.setItem('users', JSON.stringify(users));\n //const initUsers = async() => setUsers(await handleClick(5));\n //fetchClick(5).then((response) => setUsers(oldValues => [...oldValues, ...response]));\n //fetchClick(5).then((response) => setUsers(oldValues => [...oldValues, ...response]));\n }, [users]);\n\n const handleClick = async () => {\n const usersFetch = await fetchClick(10);\n setUsers((oldUser) => [...oldUser, ...usersFetch]);\n };\n\n const usersFiltered = users\n .filter((user) => {\n if (filter === \"\") {\n return true;\n }\n return (\n user.firstName.toLowerCase().startsWith(filter.toLowerCase()) ||\n user.lastName.toLowerCase().startsWith(filter.toLowerCase())\n );\n })\n .filter((user) => {\n if (gender === \"\") {\n return true;\n }\n\n return user.gender.toLowerCase() === gender;\n })\n .sort((item1, item2) => {\n if (sort.key === \"\") {\n return 0;\n }\n const nameA = item1[sort.key];\n const nameB = item2[sort.key];\n if (nameA < nameB) {\n return sort.asc ? -1 : 1;\n }\n return sort.asc ? 1 : -1;\n });\n\n return (\n <Router>\n <UserContext.Provider value={[users]}>\n <Switch>\n <Route path=\"/userDetails/:email\" component={UserDetails} />\n <Route path=\"/\">\n <div className=\"container-fluid\">\n <div id=\"app\">\n <div>users : {users.length}</div>\n <div>input : {filter}</div>\n <div>gender : {gender}</div>\n <div>sort : {sort.key}</div>\n <div>order : {sort.key ? (sort.asc ? 'en montant' : 'en descendant') : ''}</div>\n <div style={{ display: \"flex\" }}>\n <Header\n searchFilter={filter}\n onSearchChange={setFilter}\n genderFilter={gender}\n onGenderChange={setGender}\n onFetchClick={handleClick}\n />\n </div>\n {usersFiltered.length ? (\n <UsersTable users={usersFiltered} onSortChanged={setSort} />\n ) : (\n <p className=\"alert alert-warning my-3\">\n {\" \"}\n Pas d'utilisateurs\n </p>\n )}\n </div>\n </div>\n </Route>\n </Switch>\n </UserContext.Provider>\n </Router>\n );\n}", "title": "" }, { "docid": "0eca3f742c7fbd05caff3f5f9ccc9c20", "score": "0.52092993", "text": "async getLaunches(sort = \"launch_date_local\", order = \"asc\") {\n const requestOptions = {\n method: \"GET\",\n redirect: \"follow\",\n };\n\n try {\n const response = await fetch(\n `${rootApiUrl}/launches?sort=${sort}&order=${order}`,\n requestOptions\n );\n return response.json();\n } catch (error) {\n console.log(\"error\", error);\n }\n }", "title": "" }, { "docid": "b6ab6158b8e54b7159015a004f989623", "score": "0.5195054", "text": "list(req, res) {\n Category.findAll({ where : { display: true } })\n .then((categories) => {\n let payload = { status: true, categories };\n res.status(200).json(payload);\n })\n .catch((err) => {\n console.error(error);\n res.status(500).json(InternalServerErrorPayload);\n });\n }", "title": "" }, { "docid": "684ad249ca9c589411b10472813b7610", "score": "0.5190004", "text": "getCategories() {\n return fetch(this.baseUrl).then(resp => {\n return resp.json()\n }).then(data => {\n return data\n }).catch(err => {\n alert(err)\n })\n }", "title": "" }, { "docid": "01f7e120c05ef2d6d535edf9b4275a1a", "score": "0.5159309", "text": "getCategoryList(userId) {\n let obj = this;\n let url = config.categoryListUrl + '?user=' + userId;\n return fetch(url).then((data) => {\n obj.set('categoryData', data);\n return data;\n });\n }", "title": "" }, { "docid": "13ef2b09913cad791762be29b2355f0d", "score": "0.5153238", "text": "async GetThreads({ commit, dispatch }, category) {\n try {\n commit(\"SET_LOADER\", true);\n const response = await axios.get(`/api/thread/${category}`);\n\n if (response) {\n commit(\"SET_LOADER\", false);\n commit(\"SET_THREADS\", response.data);\n }\n\n if (this.state.sortBy) {\n dispatch(\"setSortOption\", this.state.sortBy);\n }\n } catch (e) {\n console.log(\"oppsies ---> Get Threads Error: \" + e);\n }\n }", "title": "" }, { "docid": "664ddf22d1d5ecae4669eabf450340a6", "score": "0.5150198", "text": "sortPosts(order, sort) {\n return Axios.get(`/api/posts/sort/${order}/${sort}`);\n }", "title": "" }, { "docid": "6c051cdc5ef9d285e6c05bbb35477624", "score": "0.51361275", "text": "function getUsersSorted(sortBy, limit, meId, done) {\n\tlimit = Math.min(limit, config.businessLogic.maxCustomSortedLimit);\n\n\tcypherQuery = \"MATCH (u:User) \";\n \n \t/*\n\t\tPRIORITY is WEIGHTED BASED ON THE BELOW RULES:\n\n\t\tOverall Popularity = (Number of Followers x 5) + (Number of Challenges Posted x 4) + (Number of Entries Posted x 3) + (Number of Comments Posted)\n\t*/\n\tcypherQuery += \" WHERE (u.id <> '\" + meId + \"') \" +\n\t\t\" WITH u \" +\n\t\t\" OPTIONAL MATCH (u)<-[:FOLLOWING]-(follower:User) \" +\n \t\t\" WITH u, COUNT(follower) AS numFollowers \" +\n \t\t\" OPTIONAL MATCH (u)<-[:POSTED_BY]-(c:Challenge) \" +\n \t\t\" WITH u, numFollowers, COUNT(c) AS numChallenges \" +\n \t\t\" OPTIONAL MATCH (u)<-[:POSTED_BY]-(e:Entry) \" +\n \t\t\" WITH u, numFollowers, numChallenges, COUNT(e) AS numEntries \" +\n \t\t\" OPTIONAL MATCH (u)<-[:POSTED_BY]-(comment:Comment) \" +\n \t\t\" WITH u, 5 * numFollowers + 4 * numChallenges + 3 * numEntries + COUNT(comment) AS popularity_count \" +\n \t\t\" RETURN u, popularity_count \" +\n \t\t\" ORDER BY popularity_count DESC LIMIT \" + limit + \";\";\n\n\tdbUtils.runQuery(cypherQuery, function(err, result) {\n\t\tif (err) {\n\t\t\treturn done(err, 0);\n\t\t}\n\n\t\tvar output = [];\n\t\tfor (var i = 0; i < result.records.length; i++) {\n\t\t\tvar record = result.records[i];\n\t\t\tvar data = {};\n\n\t\t\tvar user = dbUtils.recordGetField(record, \"u\");\n\n\t\t\tvar data = {\n\t\t\t\ttype: \"user\",\n\t \tid: user.id,\n\t \timage: user.image,\n\t \tdisplayName: user.display_name,\n\t \tcaption: user.display_name, //used as caption in some cases\n\t \tlink: config.url.user + user.id\n\t }\n\n\t output.activity = {lastSeen: user.activity_last_seen};\n\n\t\t\toutput.push(data);\n\t\t}\n\n\t\treturn done(null, output);\n\t});\n}", "title": "" }, { "docid": "6ebc9824d238b1615f9d1d920b3b0842", "score": "0.5120732", "text": "function getEventData(_username, _sort) {\n $('.application-error').text('');\n $('.event-error').text('');\n const params ={\n method: 'GET',\n url: `${meetupUrl}/${_username}/${_sort}`,\n success: displayUserEvents\n }\n $.ajax(params);\n }", "title": "" }, { "docid": "24d38b3a21d71578462a570b970150be", "score": "0.51112723", "text": "function build_sorted_qs(sort_key, inst_count)\n{\n return \"?sort=-\" + sort_key + \"&limit=\" + inst_count + \"&\";\n}", "title": "" }, { "docid": "5ba71409a93262303d26f9a9244b7432", "score": "0.5111244", "text": "function getSkillReviewsSorted(api, callback, sortFunc) {\n axios.get(api + '/skillreviews/')\n .then(res => {\n callback(res.data.sort(sortFunc));\n console.log(res.data)\n })\n .catch(err => {\n console.error(err)\n });\n}", "title": "" }, { "docid": "8e61b0b0f269e4392e7d23c3c6de4602", "score": "0.51077217", "text": "listUPCsByCompany({ companyId, filter, include, top, skip, orderBy } = {}) {\n var path = this.buildUrl({\n url: `/api/v2/companies/${companyId}/upcs`,\n parameters: {\n $filter: filter,\n $include: include,\n $top: top,\n $skip: skip,\n $orderBy: orderBy\n }\n });\n return this.restCall({ url: path, verb: 'get', payload: null });\n }", "title": "" }, { "docid": "5bdce96297d1e8e44fb11e3d4ee97f83", "score": "0.5078582", "text": "weapSort(sortVal) {\n console.log(sortVal);\n axios.post('http://localhost:4000/weapons/search/sort',\n {\n pgt: this.props.query.pgt,\n plt: this.props.query.plt,\n egt: this.props.query.egt,\n elt: this.props.query.elt,\n m2ne: this.props.query.m2ne,\n type: this.props.query.type,\n name: this.props.query.name,\n m_type: this.props.query.m_type,\n mgt: this.props.query.mgt,\n mlt: this.props.query.mlt,\n sort_by: sortVal\n })\n .then(res => store.dispatch(addWeapons(res.data)))\n .then(store.dispatch(weaponsHaveLoaded(true)));\n}", "title": "" }, { "docid": "bf46d65691976d52a5564ab8c0309184", "score": "0.50781804", "text": "function get_food_list(username, item, callback) {\n\tUser.findMany({username: username}, (err, response) => {\n\t\tif (response != null) {\n\t\t\tCard.findMany({\n\t\t\t\titem: item,\n\t\t\t\tuser: username\n\t\t\t}, (err, foods)).sort({$natural:-1})\n\t\t\tif (foods != null) {\n\t\t\t\tcallback({status: \"success\", food_list: foods});\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcallback({status: \"failure\"})\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tcallback({status: \"failure\"});\n\t\t}\n\t});\n}", "title": "" }, { "docid": "07ec633311ea2336d9efe7318682b1d3", "score": "0.50590813", "text": "async function retrieveMyArticlesBySort(id, sortBy) {\n const db = await dbPromise; \n return await db.all(`\n SELECT * FROM articles \n WHERE userID = ${id}\n ORDER BY ${sortBy}\n `); \n}", "title": "" }, { "docid": "fff4cf3d88a3f7d33a9477d020a39f1e", "score": "0.5041147", "text": "function searchRequest() {\n userAge = getUserAge();\n userGender = getUserGender();\n\n sortedShelters = sortShelters();\n // console.log(sortedShelters);\n showShelter();\n }", "title": "" }, { "docid": "d6c33be193d31e4b051d9335f291d416", "score": "0.50393325", "text": "function getUsergiftCardsByCategory(category){\n \t return applicationState.getSecurityToken().then(function(securityToken){\n \t\t\t var httpConfig = {\n \t headers: {\n \t \"Lq_auth_key\": securityToken\n \t }\n \t };\n \t\t\t return lqEcommerceEndpoint.getRewardOptionsLoggedIn(category, httpConfig).then(function(giftCardslist){\n \t\t\t\t return giftCardslist.data;\n \t\t\t });\n \t\t });\n }", "title": "" }, { "docid": "e1a81bce43ebde8c73502ada3083adce", "score": "0.5028966", "text": "function sort_by_user(sortOrderChosen) {\n dataTable\n .sortBy(function(d) {\n return d[sortOrderChosen];\n })\n .order(d3.descending);\n dc.renderAll();\n }", "title": "" }, { "docid": "0d2945cceeb039be7d14892a7289348b", "score": "0.50270057", "text": "async function findCategories (filter = '') {\n let url = '/api/v1/databases/categories/'\n let result = await axios.get(`${url}${filter}`)\n .then(async (response) => {\n return await response.data\n })\n .catch(err => {\n throw err\n })\n return {\n key: result._id,\n id: result._id,\n name: result.name,\n };\n}", "title": "" }, { "docid": "05039c288ce6ed0316027f7a24d1d882", "score": "0.5026467", "text": "function loadCategories(){\n var xhttp = new XMLHttpRequest();\n xhttp.onreadystatechange = function() {\n if (this.readyState === 4 && this.status === 200) {\n importCategoryOptions(this);\n }\n };\n xhttp.open(\"GET\", url+user+\"/categories\", true);\n xhttp.send();\n}", "title": "" }, { "docid": "728091d7f423d6c7747377dd3d546112", "score": "0.5025435", "text": "function RenderListContainer(){\nconst [searchName, SetSearchName]=useState(\"\")\nconst [results, SetResults]=useState([])\n\n// on page load call directoryRequest function to get users from random user API and display on page\nuseEffect( () =>{\n directoryRequest();\n}, []);\n\n// get value typed in search field\n const handleInput = event => {\n const value =event.target.value\n SetSearchName(value)\n }\n \n// get filtered array with users names matching value of search field\nconst filteredSearch=results.filter(users => {\n const fullName=users.name.first+\" \"+users.name.last\n return fullName.toLowerCase().includes(searchName.toLowerCase())\n })\n\n// function that calls to random user API\nconst directoryRequest=(() => {\n API.search().then(res =>{\n const results = res.data.results\n SetResults(results)\n })\n});\n\n// function to sort age by ascending\nconst sortAgeAscend=(() => {\n var sortAge= results.sort(function(a,b){\n return a.dob.age-b.dob.age\n })\n const sortAgeAscend=sortAge.map(function(users){\n return(users)\n })\n SetResults(sortAgeAscend)\n})\n\n// function to sort age by descending\nconst sortAgeDescend = (() =>{\n var sortAge= results.sort(function(a,b){\n return b.dob.age-a.dob.age\n })\n const sortAgeDescend=sortAge.map(function(users){\n return(users)\n })\n SetResults(sortAgeDescend)\n})\n\n// function to sort name by ascending\nconst sortNameAscend =(()=>{\n var sortName = results.sort(function(a, b){\n if(a.name.first < b.name.first) { return -1; }\n if(a.name.first > b.name.first) { return 1; }\n return 0;\n\n });\n const sortNameAscend=sortName.map(function(users){\n return(users)\n})\n SetResults(sortNameAscend)\n})\n\n// function to sort name by descending\nconst sortNameDescend =(()=>{\n var sortName = results.sort(function(a, b){\n if(a.name.first > b.name.first) { return -1; }\n if(a.name.first < b.name.first) { return 1; }\n return 0;\n\n });\n const sortNameDescend=sortName.map(function(users){\n return(users)\n})\n SetResults(sortNameDescend)\n})\n\n\n\n\n// render form and render list component with props\nreturn (\n <div>\n <Form handleInput={handleInput}\n searchName={searchName}\n />\n\n <RenderList users={filteredSearch}\n searchName={searchName}\n sortAgeAscend={sortAgeAscend}\n sortAgeDescend={sortAgeDescend}\n sortNameAscend={sortNameAscend}\n sortNameDescend={sortNameDescend}\n />\n </div>\n )\n\n\n\n\n\n\n\n\n\n\n\n\n\n}", "title": "" }, { "docid": "9b7df6a0a16269f35ebcea3163cf8ede", "score": "0.5024115", "text": "function CallAPI(category) {\r\n return \"./api/viewPR/\" + category;\r\n}", "title": "" }, { "docid": "e0e7b2cab39a96a0eab9a92a87c5836f", "score": "0.5021966", "text": "getalluserGnl(req, res){\n console.log(\"getting stock history/controller\")\n DailyGnL.distinct(\"symbol\",{userid: req.session.userid})\n .then(allgnls => res.json(allgnls))\n .catch(console.log);\n \n }", "title": "" }, { "docid": "60a7bc8c712309ca5b13651b27dbe61a", "score": "0.50202495", "text": "function getAdzunaJobSearch(userInputCountry, userInputCity, jobCategory) {\n const AdzunaJobSearchResponse = ADZUNA_BASE_URL \n + `jobs/${userInputCountry}/search/1?app_id=${ADZUNA_APP_ID}&app_key=${ADZUNA_KEY}&where=${userInputCity}&category=${jobCategory}&content-type=application/json`;\n\n console.log('The Job Search Response URL is:', AdzunaJobSearchResponse);\n\n return fetch (AdzunaJobSearchResponse, {\n headers: {\n Accept: 'application/json',\n }\n })\n .then (response => response.json())\n .catch(err => console.error(err));\n }", "title": "" }, { "docid": "ddc408ec189a0f5ea3c91b7d480e47c0", "score": "0.5020125", "text": "function getMangaByCategory(category, page = 1) {\n if (category === \"popular\") {\n return fetch(`https://mangamint.kaedenoki.net/api/manga/${category}/${page}`)\n .then((res) => res.json())\n .then((res) => res.manga_list)\n .catch(err => { console.log(err) });\n }\n if (category === \"recommended\") {\n return fetch(`https://mangamint.kaedenoki.net/api/${category}`)\n .then((res) => res.json())\n .then((res) => res.manga_list)\n .catch((err) => console.log(err));\n }\n}", "title": "" }, { "docid": "634fa5684f48e5b8a0a7383ea3e08a4a", "score": "0.50188094", "text": "function searchUser(searchCriteria) {\n\n const multipleheaders = new Headers();\n multipleheaders.append('Content-Type', 'application/json');\n multipleheaders.append('Authorization', authHeader());\n const requestOptions = {\n method: 'POST',\n headers: multipleheaders,\n body: JSON.stringify(searchCriteria)\n };\n\n return fetch('api/user/search', requestOptions)\n .then(handleResponse);\n\n\n}", "title": "" }, { "docid": "25ef2a291a22db6e42b4e417c45ef5fb", "score": "0.50063217", "text": "static async get(request, reply) {\n\n let filters = {};\n\n //\n // IMPORTANT:\n // Only authenticated Admins can see all orders.\n // >>> If user is not Admin, we should force User ID filtering! <<<\n //\n let isAdmin = request.auth.credentials && request.auth.credentials.scope && request.auth.credentials.scope.indexOf('admin') !== -1;\n if (!isAdmin) {\n filters.userId = request.auth.credentials.id;\n }\n\n //\n // Find and filter Orders collection\n //\n\n // IMPORTANT:\n // Only filter by userID if there isn't already one \"locked\" in the filter\n // >>> The user is NOT admin, thus, only his orders should be returned <<<\n if (!filters.userId && request.query.userId) {\n filters.userId = request.query.userId;\n } else if (request.query.userId && request.query.userId !== filters.userId) {\n return reply(BadRequest.invalidParameters('query', {userId: 'Invalid'})).code(400);\n }\n\n // Filter by opened/closed status\n let open = request.query.open;\n if (open) {\n open = open.toLowerCase();\n if (open !== 'true' && open !== 'false') {\n return reply(BadRequest.invalidParameters('query', {open: 'Must be a boolean'})).code(400);\n } else {\n filters.open = open === 'true';\n }\n }\n\n // Fetch orders\n let results = await Order.find(filters);\n\n // Serialize items\n let serializedItems = await * results.items.map(order => new OrderSerializer(order).serialize({}));\n\n //\n // Return\n //\n return reply({\n items: serializedItems,\n filters: filters,\n pagination: {\n totalItems: results.count,\n totalPages: null,\n perPage: null,\n page: null\n }\n });\n }", "title": "" }, { "docid": "30e79bfc44da01440f880d553cba84af", "score": "0.50038636", "text": "function get_categories() {\n console.log(\"getting category...\");\n let trivia = fetch(\"http://jservice.io/api/categories?count=6&offset=\" + Math.floor(Math.random()*500)).then(response => { \n if(!response.ok){\n throw Error(response.statusText);\n }\n return response;\n }).then(j_response => {\n return j_response.json();\n }).catch(error => {\n console.log(error);\n })\n return trivia;\n;}", "title": "" }, { "docid": "2b4d406d143d91e3783d22ee0f9247d5", "score": "0.49994874", "text": "addSort() {\n if ('sort' in this.params && this.params.sort instanceof Array) {\n const sorts = []\n this.params.sort.forEach((sort) => {\n const { field, dir } = sort\n switch (field) {\n case 'title':\n sorts.push({ sort_title: dir || 'ASC' })\n break\n case 'author':\n sorts.push({\n 'agents.sort_name': {\n order: dir || 'ASC',\n nested: {\n path: 'agents',\n filter: { terms: { 'agents.roles': ['author'] } },\n max_children: 1,\n },\n },\n })\n break\n case 'date':\n // eslint-disable-next-line no-case-declarations\n const sortField = dir === 'DESC' ? 'instances.pub_date_sort_desc' : 'instances.pub_date_sort'\n sorts.push({\n [sortField]: {\n order: dir || 'ASC',\n nested: {\n path: 'instances',\n },\n },\n })\n break\n default:\n sorts.push({ [field]: dir || 'ASC' })\n }\n })\n\n // Add a tiebreaker sort to ensure consistent paging\n sorts.push({ uuid: 'asc' })\n this.query.sort(sorts)\n } else {\n // Adding a default sort is necessary to enable deep pagination\n this.query.sort([\n { _score: 'desc' },\n { uuid: 'asc' },\n ])\n }\n }", "title": "" }, { "docid": "7b70bb67df252d5893c0f0db1490d3e6", "score": "0.49962717", "text": "function displayBooks() {\n\t\t\n\t\tvar request = new XMLHttpRequest();\n\t\tvar data ='field=category&';\n\t\tvar category = getCategory();\n\t\t\n\t\t// create the query string\n\t\tif (category == null){\n\t\t\tdata += \"value=\";\n\t\t} else {\n\t\t\tdata += \"value=\" + category;\n\t\t}\n\t\t\n\t\trequest.open(\"GET\", (\"rest/book/read\" + \"?\" + data), true);\n\t\trequest.onreadystatechange = () => {\n\t\t\thandler(request);\n\t\t};\n\t\trequest.send();\n}", "title": "" }, { "docid": "71e2fb56d92f219936a30d167d73b0a6", "score": "0.49953094", "text": "function search(category) {\n //append the name of argument to the '/notes/category'\n\turl = '/notes/category/' + category;\n\t//receives JSON objects from the url \n $.getJSON(url, function(json) {\n\t//call display function to display json object in html\n display(json);\n\t});\n}", "title": "" }, { "docid": "c07a4e92766818a10f1a7e8e473ba05f", "score": "0.49860218", "text": "getTransactionsOfUserForCategory(user,category,handler) {\n const options = {\n 'category' : category,\n 'account' : user\n }\n this.requestApi('get_transactions_of_user_for_category',options,(data) => {\n handler(this.transformDataInTransactions(data))\n })\n }", "title": "" }, { "docid": "5fe94989de72e60323e37f494d3bb8eb", "score": "0.49857357", "text": "async function Filter(page, sort) {\n const [panelBody] = document.getElementsByClassName('panel-body');\n const [genreId, countryId, searchString, producerName, from, to] = document.getElementsByClassName('searchClass');\n const loader = '<div class=\"text-center\"><div class=\"spinner-border text-secondary\" role=\"status\"><span class=\"sr-only\">Loading...</span></div></div>';\n panelBody.innerHTML = loader;\n const response = await fetch(\n '/Order/Search?searchString=' + searchString.value +\n '&genre=' + genreId.value + '&country=' + countryId.value +\n '&producer=' + producerName.value + '&yearFrom=' + from.value + '&yearTo=' + to.value +\n '&page=' + page + '&sortOrder=' + sort + '&returnUrl=' + window.location.pathname);\n let res;\n if (response.ok) {\n res = await response.text();\n panelBody.innerHTML = res;\n } else {\n res = response.status;\n console.log(res);\n }\n}", "title": "" }, { "docid": "6aabde44b9627186e499f7a0738b7775", "score": "0.49841166", "text": "function getAdzunaJobSearch(userInputCountry, userInputCity, jobCategory) {\n const AdzunaJobSearchResponse = `${ADZUNA_BASE_URL\n }jobs/${userInputCountry}/search/1?app_id=${ADZUNA_APP_ID}&app_key=${ADZUNA_KEY}&where=${userInputCity}&category=${jobCategory}&content-type=application/json`;\n\n console.log('The Job Search Response URL is:', AdzunaJobSearchResponse);\n\n return fetch(AdzunaJobSearchResponse, {\n headers: {\n Accept: 'application/json',\n },\n })\n .then(response => response.json())\n .catch(err => console.error(err));\n }", "title": "" }, { "docid": "ef2a732d9317ecc4e3e5807c3156b3ab", "score": "0.49665704", "text": "function getCategories (req, res, next){\n category.find((err, categories) => {\n if (err) return res.status(500).send(err); \n\n return res.status(200).send(categories);\n })\n}", "title": "" }, { "docid": "dd1f3f2edf0b3aff18035a1829d3d962", "score": "0.4965967", "text": "function getCategory() {\n fetch(`https://opentdb.com/api_category.php`)\n .then(response => response.json())\n .then(data => {\n category(data.trivia_categories)\n });\n}", "title": "" }, { "docid": "e0de3fc595b9de44dcac4448dd8a9864", "score": "0.49618024", "text": "function categories() {\n F.functions.log(\"\\n[/api/collection/] collection\");\n let self = this;\n try {\n if (self.body) {\n let params = {};\n if (self.body.category) {\n params.filterSlugCategory = self.body.category;\n params.limitProducts = 2;\n } else {\n params.limitCategories = 1;\n params.limitProducts = 6;\n }\n\n if (self.body.pointSale) {\n params.pointSale = self.body.pointSale;\n }\n\n let query = 'select getProducts(' + JSON.stringify(params) + ') as result;';\n\n F.functions.query(query)\n .then(function (response) {\n F.functions.json_response(self, 200, response);\n }\n ).catch(function (error) {\n F.functions.sendCrash(error);\n error = F.functions.handleError(error);\n F.functions.json_response(self, 400, error);\n });\n\n } else {\n F.functions.json_response(self, 400, {msg: \"Mandatory parameters\"});\n }\n } catch (e) {\n F.functions.sendCrash(e);\n F.functions.json_response(self, 500, {msg: \"Ups! Lo sentimos, algo salió mal. Intenta nuevamente.\"});\n }\n}", "title": "" }, { "docid": "117ffd8a0162e58e8e4a9417743abb97", "score": "0.4955091", "text": "function getByStoreOrUser () {\n if (!req.query.userid && !req.query.storeid) return res.sendStatus(400);\n queryDoc = {};\n if (req.query.userid) queryDoc.userID = parseInt(req.query.userid);\n if (req.query.storeid) queryDoc.storeID = parseInt(req.query.storeid);\n var result = { reviews:[] };\n mongo.getDB().collection('Reviews').find(\n queryDoc\n ).sort({ _id:1 }).toArray(\n function (err, reviews) {\n result.reviews = reviews;\n return res.send(result);\n }\n );\n }", "title": "" }, { "docid": "efc28f7725325f896e1f72d8561e8d47", "score": "0.49508741", "text": "getAnnouncements(req, res) {\n const keywords = req.query.q;\n const index = req.query.page;\n let limit = req.query.limit;\n const last = req.query.last;\n let sortType = -1;\n\n User.findUserById(req.tokenUserId)\n .then((userInfo) => {\n if (keywords === undefined || keywords.length == 0 || index === undefined || last === true) {\n if (last != undefined && last) {\n /* istanbul ignore next */\n limit = parseInt('1');\n sortType = -1;\n }\n Announcement.getAnnouncements(sortType, limit, Roles.isAdministrator(userInfo.role))\n .then((announcements) => {\n res.contentType('application/json');\n res.status(201).send(JSON.stringify(announcements));\n }).catch((err) => {\n /* istanbul ignore next */\n return res.status(422).send(JSON.stringify({\n 'error': err.message\n }));\n });\n } else {\n sortType = -1;\n Announcement.findAnnouncements(keywords, index, sortType, Roles.isAdministrator(userInfo.role))\n .then((announcements) => {\n res.contentType('application/json');\n res.status(201).send(JSON.stringify(announcements));\n }).catch((err) => {\n /* istanbul ignore next */\n return res.status(422).send(JSON.stringify({\n 'error': err.message\n }));\n });\n }\n })\n .catch( (err) => {\n /* istanbul ignore next */\n return res.status(500).send(err);\n });\n }", "title": "" }, { "docid": "6becc20119a5904884561e35cffda7f5", "score": "0.4943027", "text": "queryItems({ filter, include, top, skip, orderBy } = {}) {\n var path = this.buildUrl({\n url: `/api/v2/items`,\n parameters: {\n $filter: filter,\n $include: include,\n $top: top,\n $skip: skip,\n $orderBy: orderBy\n }\n });\n return this.restCall({ url: path, verb: 'get', payload: null });\n }", "title": "" }, { "docid": "16f7e962a794c658800bc9658d568173", "score": "0.4942431", "text": "static getRepoByUsername(req,res){\n const options = {\n url: `https://api.github.com/users/${req.body.username}/repos`,\n headers : {\n 'User-Agent' : 'request',\n Authorization : 'token '+process.env.TOKEN \n }\n }\n request.get(options,(err,response,body)=>{\n if(err){\n res.status(500).json({msg : err})\n }else{\n let data = JSON.parse(body);\n let sortedArr = []\n let regex = new RegExp(`${req.body.username}`,'i');\n\n data.forEach(repo => {\n // console.log('TEST',regex.test(repo['owner']['login']))\n if(regex.test(repo['owner']['login'])){\n sortedArr.push(repo)\n }\n });\n\n res.status(200).json({\n msg : `Search repository with username: ${req.body.username}`,\n data : sortedArr\n })\n }\n })\n }", "title": "" }, { "docid": "290abf46e56f2250997f775633d9ada4", "score": "0.49412936", "text": "categorySort(sort) { this.sortFilter = sort }", "title": "" }, { "docid": "6a1953e2aa48a62c9a30cad98d1b81a3", "score": "0.4934365", "text": "async function getCategories(req, res, next) {\n await db.execute(\"SELECT * FROM category\", (err, categories) => {\n if (err) throw err;\n req.categoriesList = categories;\n next();\n });\n}", "title": "" }, { "docid": "3a77a9644b9a7ee36aeba29925c1799e", "score": "0.4933965", "text": "reSortReviews(filter = 'date') {\n const parsedUrl = new URL(window.location.href);\n const host = parsedUrl.hostname;\n const productId = parsedUrl.searchParams.get('');\n\n $.ajax({\n method: 'GET',\n url: 'http://' + host + ':2000/reviews/' + productId + '/' + filter,\n //url: 'http://18.219.106.183:2000/reviews/' + productId + '/' + filter,\n success: (data) => {\n this.setState({\n reviews: data.reviews,\n visible: 10\n })\n },\n error: (error) => console.log(error)\n })\n }", "title": "" }, { "docid": "2540a0124fa3efb203836d773cc32731", "score": "0.493052", "text": "async getAllByCategoryId(categoryId) {\n const result = await db(TABLE_NAME).where(\n \"academy_category_id\",\n categoryId\n );\n\n return result;\n }", "title": "" }, { "docid": "7ec79e5dfe2516516b047d794ad482de", "score": "0.49242833", "text": "function getAllUsers(req, res) {\n\n console.log(\"Inside user controller -> GET '/api/allusers' -> getAllUsers\");\n\n User.find({})\n .sort({ nickName: 1 })\n .then(dbUserData => {\n console.log(\"dbUserData --> \");\n console.log(dbUserData);\n res.status(200).json(dbUserData);\n })\n .catch(err => {\n console.log(err);\n res.status(500).json(err);\n });\n}", "title": "" }, { "docid": "d65faa4e1afe4bfd5388fbe1cb1c010e", "score": "0.49219412", "text": "function sort_movies(route) {\n document.getElementById('showFilterText').className = 'setFilterTextHidden'\n document.getElementById('showSearchText').className = 'setSearchTextHidden'\n\n async function getMovies_sort() {\n const movies = await fetchMovies_sort();\n\n setMovies(movies)\n\n \n}\ngetMovies_sort();\n\n async function fetchMovies_sort() {\n\n const requestOptions = {\n method: 'GET',\n credentials: 'include',\n }\n\n const res = await fetch(base + '/webshop/movies/sort/' + route, requestOptions);\n const data = await res.json()\n\n return data\n }\n}", "title": "" }, { "docid": "14ce9e4a082e70c95b3edabde28a9aff", "score": "0.49210113", "text": "async orderByCreationDate(req, res) {\n try {\n if(req.params.order == 'ASC'){\n const movies = await Movie.findAll({\n order: [ ['creationDate', 'ASC'] ]\n })\n res.status(201).send(movies)\n }\n if(req.params.order == 'DESC'){\n const movies = await Movie.findAll({\n order: [ ['creationDate', 'DESC'] ]\n })\n res.status(201).send(movies)\n }else {\n res.status(404).send(\"Only ASC or DESC order are permitted\")\n }\n const movies = await Movie.findAll({\n order: [ ['creationDate', 'ASC'] ]\n })\n res.status(201).send(req.params.order)\n } catch (e) {\n console.log(e)\n res.status(500).send(e)\n }\n }", "title": "" }, { "docid": "4de3443dda15ca0d4e1135f4d9faa7d5", "score": "0.49192664", "text": "async index ({ auth }) {\n return await Categoria\n .query()\n .where('user_id', '=', auth.user.id)\n .fetch()\n }", "title": "" }, { "docid": "79a2c3c9905b487bc9f13e5392686241", "score": "0.4918652", "text": "getUsers(){\n return API.get(\"user\", \"/user\")\n }", "title": "" }, { "docid": "74881f072008f200af5435265de2d3d5", "score": "0.49112645", "text": "function sortCategory(sectionDiv, sortBy, direction) {\r\n\t'use strict';\r\n\tvar rows = $(sectionDiv).children('div').not('.header').remove();\r\n\tvar secondSortProperty, thirdSortProperty;\r\n\tswitch (sortBy) {\r\n\t\tcase 'Rating':\r\n\t\t\tsecondSortProperty = 'Votes';\r\n\t\t\tthirdSortProperty = 'Year';\r\n\t\t\tbreak;\r\n\t\tcase 'Votes':\r\n\t\t\tsecondSortProperty = 'Rating';\r\n\t\t\tthirdSortProperty = 'Year';\r\n\t\t\tbreak;\r\n\t\tcase 'Year':\r\n\t\t\tsecondSortProperty = 'Rating';\r\n\t\t\tthirdSortProperty = 'Votes';\r\n\t\t\tbreak;\r\n\t}\r\n\t\r\n\tvar s = firstBy(function (a, b) {return calcSort(a, b, sortBy, direction);})\r\n\t\t.thenBy(function (a, b) {return calcSort(a, b, secondSortProperty, direction);})\r\n\t\t.thenBy(function (a, b) {return calcSort(a, b, thirdSortProperty, direction);});\r\n\trows.sort(s);\r\n\t\r\n // add class odd or even\r\n\trows.each(function(index) {\r\n\t\t$(this).removeClass('odd even');\r\n\t\tif (index % 2 === 0) {$(this).addClass('odd');}\r\n\t\telse {$(this).addClass('even');}\r\n\t});\r\n\t$(sectionDiv).append(rows);\r\n}", "title": "" }, { "docid": "0f5b79eeade6bde4d04366ca3765762e", "score": "0.4896259", "text": "function findUsers(req, res, next) {\n var profession = req.query.profession;\n var citysort = req.query.citysort || '1';\n\n // validate profession\n if(!profession) {\n res.send(400, {error: 'query `profession` must be supplied.'});\n return next();\n }\n\n // validate citysort\n if(citysort !== '1' && citysort !== '-1') {\n res.send(400, {error: 'query `citysort` must be either 1 or -1.'});\n return next();\n }\n\n // execute query\n users\n .findByProfession(profession, parseInt(citysort))\n .then(function (users) {\n res.send({users: users});\n })\n .nodeify(next);\n }", "title": "" }, { "docid": "d0bfb5597223f755a082bf1a8c67de0e", "score": "0.48954147", "text": "async function retrieveArticlesBySort(sortBy) {\n const db = await dbPromise; \n return await db.all(`\n SELECT * FROM articles \n ORDER BY ${sortBy}\n `); \n}", "title": "" }, { "docid": "7bb430b2c756fd026742283fb414c432", "score": "0.4894468", "text": "function index(req, res) {\n var query = getQuerySearchByName(req.query);\n\n return _user2.default.find(query).sort({ name: 1 }).exec().then(respondWithBasicProfileResultList(res)).catch(handleError(res));\n}", "title": "" }, { "docid": "2f01dcb5b9d97cca64f85b8b0a565c01", "score": "0.48934767", "text": "get(id) {\r\n let request = this.reqUrl.query;\r\n let keys = Object.keys(request);\r\n let res = this.bookmarksRepository.getAll();\r\n console.log(request)\r\n console.log(keys)\r\n if (!isNaN(id))\r\n this.response.JSON(this.bookmarksRepository.get(id));\r\n else if (request == null)\r\n this.response.JSON(res)\r\n else if (keys.length == 0)\r\n this.response.JSON({\"Message\": \"Utilisez sort, name ou category\"});\r\n if (\"sort\" in request)\r\n if (request.sort == \"name\" || request.sort == \"category\")\r\n res = utilities.sortBy(request.sort, res);\r\n if (\"name\"in request){\r\n if ((request.name).endsWith('*'))\r\n res = utilities.allNamelike(request.name, res);\r\n else\r\n res = this.bookmarksRepository.get(utilities.getIdByName(request.name, res));\r\n }\r\n if (\"category\"in request)\r\n res = utilities.allWhereCategoryIs(request.category, res);\r\n this.response.JSON(res);\r\n }", "title": "" }, { "docid": "d7920836e497b0ee4d7515369e1fb770", "score": "0.48921588", "text": "function getCategories(request, response, callback) {\n var options = {};\n //get playlist from spotify\n spotifyApi.getPlaylistsForCategory(request.query.category, options, function(err, data) {\n if (err) {\n if (tries < 3) {//only try 3 total times\n tries++;//increment tries\n getCategories(request, response, callback, results);//recursive call\n } else {\n callback(err, null);\n }\n }\n //filter list\n var filteredCategories = data.body.playlists.items.filter(function(item) {\n if (item.tracks.total > 50) //minimum number of songs needed for quiz with space for null values\n return item;\n }) //return object with needed data\n .map(function(obj) {\n //creates object with name and list id's\n var temp = {\n playlistName: obj.name,\n playlistid: obj.id\n };\n return temp;\n });\n callback(null, filteredCategories);\n });\n}", "title": "" }, { "docid": "05f7db0984738646c763b3292166bf34", "score": "0.48919126", "text": "async getDrinksByCategory(category){\n const apiResponse = await fetch(`https://www.thecocktaildb.com/api/json/v1/1/filter.php?c=${category}`);\n\n const cocktails = await apiResponse.json();\n\n return{\n cocktails\n }\n }", "title": "" }, { "docid": "80dbd2af5f17fdf176a9bf9cb4726e8e", "score": "0.48901904", "text": "function getFilterCategories() {\n $.ajax({\n url: categoryPath,\n cache: false,\n success: function (data) {\n var tempfilterCategories = data;\n for (var f = 0; f < data.length; f++) {\n filterCategories[f] = tempfilterCategories[f].Name;\n includedCategories[f] = filterCategories[f];\n }\n getCategories(function () { getProviders(localCook) });\n\n }\n\n });\n }", "title": "" }, { "docid": "0e1094695fa3483914ddddf6cf231c72", "score": "0.48884782", "text": "function fetchSort(data){\n users = new Array();\n for (var i = 0; i < 10; i++){\n users.push(\"<br>\" + data[i].username)\n }\n//sort by length\n users.sort(function(a, b){\n return a.length - b.length;\n });\n//writes output\n document.write(\"<br><br><br>Usernames from fetch request: <br>\");\n document.write(users);\n}", "title": "" }, { "docid": "64e5b84549af3a25e6470319470c4fc9", "score": "0.48840976", "text": "function view_category(category) {\n $.ajax({\n type: \"GET\",\n url: 'http://mezz.ir/phoenix/app/api/App/view_categories.php?q=' + category,\n dataType: 'json',\n\n success: function (data) {\n\n var i, j, result, chunk = 4;\n var counter = 0;\n for (i = 0, j = data.length; i < j; i += chunk) {\n result = data.slice(i, i + chunk);\n counter++;\n let row = '<div class=\"sec3 \">';\n $.each(result, function (i) {\n\n if (result[i].name.length > 20) {\n result[i].name = result[i].name.substring(0, 20);\n result[i].name = result[i].name.concat(\" ...\");\n }\n\n row += '<div class=\"card-1\">' +\n ' <div class=\"up\">' +\n ' <p class=\"app-name\"><a href=\"single.html?q=' + result[i].id + '\">' + result[i].name + ' </p></a> ' +\n ' </div>' +\n ' <div class=\"down\">' +\n ' <div class=\"left\">' +\n ' <div class=\"up-1\">' +\n ' <p class=\"downloads-c\">' + result[i].installs + '</p>' +\n ' </div>' +\n ' <div class=\"down-1\">' +\n ' <p class=\"downloads\">Downloads</p>' +\n ' </div>' +\n ' </div>' +\n ' <div class=\"right\">' +\n ' <div class=\"up-1 row\">' +\n ' <i class=\"las la-star\"></i>' +\n ' <p class=\"downloads-c\">' + result[i].rating + '</p>' +\n ' </div>' +\n ' <div class=\"down-1\">' +\n ' <p class=\"downloads\">Rating</p>' +\n ' </div>' +\n ' </div>' +\n ' </div>' +\n ' </div>';\n })\n $('#result').append(row);\n\n }\n },\n error: function (data, status, error) {\n\n console.log(\"error\");\n }\n });\n\n }", "title": "" }, { "docid": "647f9581013286456d82418607e71cf8", "score": "0.48813", "text": "function getCategory() {\n $.get(\"/api/category\", renderCategoryList);\n}", "title": "" }, { "docid": "9c59f65f029945803b93b72b3f2425cf", "score": "0.48793048", "text": "function order (category, session, list){\n // if the user wants to order by distance\n if(category === \"distance\"){\n // calculates the distance for each restaurant from the user position\n list.forEach(function(item){\n // stores the distance in the session in the distance field\n item[\"distance\"] = calculateDistance(item.latitude, item.longitude, session.lat, session.long);\n console.log(item.name + \":\" + item.distance );\n })\n }\n var ordered = [];\n // sorts the objects\n list.forEach(function(item){\n var added = false;\n if (ordered.length === 0){\n ordered.push(item);\n added = true;\n }\n else{\n for(var i=0; i<ordered.length; i++){\n // if the user selects ratings, orders from higher to lower ratings\n if(category === \"rating\"){\n if(item[category] > ordered[i][category]){\n ordered.splice(i, 0, item);\n added = true;\n break;\n }\n }\n // if the user selects distance, orders from closer to farther\n else if(category === \"distance\"){\n if(item[category] < ordered[i][category]){\n ordered.splice(i, 0, item);\n added = true;\n break;\n }\n }\n }\n if(!added){\n ordered.push(item);\n }\n }\n })\n return ordered\n}", "title": "" }, { "docid": "f70d041fd179e943d79c35d377fb9774", "score": "0.48768857", "text": "function getAllCategories() {\r\n\tit('Get all categories', function(done) {\r\n\t\toptions.method = 'get';\r\n\t\toptions.path = '/category';\r\n\t\tvar req = http.request(options, function(res) {\r\n\t\t\tres.on('data', function(chunk) {\r\n\t\t\t\tassert.equal('application/json', res.headers[\"content-type\"]);\r\n\t\t\t\tassert.equal(200, res.statusCode);\r\n\t\t\t\tdone();\r\n\t\t\t});\r\n\t\t});\r\n\t\treq.on('error', function(e) {\r\n\t\t\tconsole.log('problem with request: ' + e.message);\r\n\t\t});\r\n\t\treq.end();\r\n\t});\r\n}", "title": "" }, { "docid": "83fb1937b7fc50bba987d3461c3758e8", "score": "0.48721263", "text": "function getStoresList(url, sortBy) {\n var xmlHttp = new XMLHttpRequest();\n xmlHttp.onreadystatechange = function() {\n if (this.readyState==4 && this.status==200) {\n storesList = JSON.parse(this.responseText);\n storesList = sortStoresList(storesList, sortBy);\n clearAllStoreCards();\n for(var i=0; i<storesList.length; i++) {\n insertStoreIntoHTML(storesList[i], i);\n }\n setStoreAmountElement(storesList.length);\n }\n };\n xmlHttp.open(\"GET\", url, true);\n xmlHttp.send();\n}", "title": "" }, { "docid": "17b0f7ec43ef2ec34ca90c17d4d74637", "score": "0.48659804", "text": "getalluserStocksym(req, res){\n console.log(\"getting stock symbols history/controller\")\n Stocks.distinct(\"symbol\",{userid: req.session.userid})\n .then(symbols => res.json(symbols))\n .catch(console.log);\n \n }", "title": "" }, { "docid": "b4e82d54e90f35061af0fa8a80238917", "score": "0.48595616", "text": "function bucketGetAll(request, response) {\n Bucket.find({})\n .sort(\"bOrder\")\n .then(bucketData => {\n response.render(\"bucket-index\", {\n bucket: bucketData\n });\n })\n .catch(err => {\n console.log(err);\n });\n}", "title": "" }, { "docid": "36081c99eddf5fe0156f014863fbaa4e", "score": "0.48537126", "text": "sortApiByDateDeCroissant()\n {\n let url = \"?dataset=que-faire-a-paris-&q=&sort=date_start\";\n fetch(config.openDataURL+url)\n .then(response => response.json()).then(data => {\n this.dataApi(data);\n console.log(data);\n });\n }", "title": "" }, { "docid": "c6ca36c2bc7a14bfd6d1e951ba3290e8", "score": "0.4852399", "text": "listTaxAuthorities({ filter, top, skip, orderBy } = {}) {\n var path = this.buildUrl({\n url: `/api/v2/definitions/taxauthorities`,\n parameters: {\n $filter: filter,\n $top: top,\n $skip: skip,\n $orderBy: orderBy\n }\n });\n return this.restCall({ url: path, verb: 'get', payload: null });\n }", "title": "" }, { "docid": "a48640859c53ecaf89b641d281c8d4bb", "score": "0.48481214", "text": "function getAllMemberships(order_by) {\r\n $.ajax({\r\n type: \"GET\",\r\n url: \"http://localhost:8111/endpoints/getMemberships.php\",\r\n data: {\r\n order_by: order_by,\r\n },\r\n dataType: \"json\",\r\n success: function (memberships) {\r\n memberships = JSON.parse(JSON.stringify(memberships));\r\n showAllMemberships(memberships);\r\n },\r\n });\r\n }", "title": "" }, { "docid": "f0d7cfc2ba82d6ceba7c990de4490ce3", "score": "0.4846923", "text": "function listAuthorsCategories() {\n var xhttp = new XMLHttpRequest();\n xhttp.onreadystatechange = function () {\n if (this.readyState == 4 && this.status == 200) {\n let response = JSON.parse(this.response)\n fillMenues(\"newBookForm\", response)\n fillMenues(\"editBookForm\", response)\n // listRows(this.response,\"booksTable\")\n }\n };\n xhttp.open(\"GET\", \"http://127.0.0.1:5000/admin/data\");\n xhttp.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");\n xhttp.send()\n}", "title": "" }, { "docid": "a66ab1cc97be7ed2e1bff676e0286957", "score": "0.48441333", "text": "queryCompanies({ include, filter, top, skip, orderBy } = {}) {\n var path = this.buildUrl({\n url: `/api/v2/companies`,\n parameters: {\n $include: include,\n $filter: filter,\n $top: top,\n $skip: skip,\n $orderBy: orderBy\n }\n });\n return this.restCall({ url: path, verb: 'get', payload: null });\n }", "title": "" }, { "docid": "789cd07ec45525e2f04b200edbdc631a", "score": "0.4843997", "text": "sort() {\n // expecting a comma separated string: ?sort=duration,price\n // if client sends ?sort=duration&sort=price we get an array. hpp middleware fixes so we don't get\n // an error, but will only sort on the last item\n if(this.queryString.sort) {\n // how to sort on more than one field: .sort('price ratingsAverage')\n const sortBy = this.queryString.sort.split(',').join(' ');\n this.query = this.query.sort(sortBy);\n } else {\n // default sort if none is specified\n this.query = this.query.sort('-createdAt');\n }\n return this;\n }", "title": "" }, { "docid": "63c5c18b0c210135815e2cd0339cc8f7", "score": "0.48389214", "text": "function getRecentApplicationData(username) {\n const params = {\n method: 'GET',\n url: `${applicationsUrl}/${username}`,\n success: displayRecentUserApplications\n }\n $.ajax(params);\n }", "title": "" }, { "docid": "8845e1c9368cb2df0e4febdbbb806410", "score": "0.48377007", "text": "getContactsSorted(sort) {\n\t\tlet ret = {\"contacts\": []};\n\t\tlet that = this;\n\n\t\tlet res = new Promise(function(resolve, reject) {\n\t\t\tfetch(`${that._apiUrl}/Contacts?_sort=${sort}`,\n\t\t\t\t{\n\t\t\t\t\tcredentials: 'same-origin',\n\t\t\t\t\tmethod: 'GET' //optional for get\n\t\t\t })\n\t\t\t\t.then(that.checkStatus)\n\t\t\t\t.then(that.parseJSON)\n\t\t\t\t.then((data) => {\n\t\t\t\t\tret.contacts = data;\n\t\t\t\t\tresolve(ret);\n\t\t\t\t})\n\t\t\t\t.catch((err) => {\n\t\t\t\t\tdebugger;\n\t\t\t\t\tconsole.log(err);\n\t\t\t\t\treject(err);\n\t\t\t\t});\n\t\t});\n\n\t\treturn res;\n\t}", "title": "" }, { "docid": "e4b044f2a724e063cf3d88dfc8296653", "score": "0.4833774", "text": "getFilteredSortedData(searchTerm, sortBy, isAscending) {\n const data = this.state.customers.filtered(\n 'name BEGINSWITH[c] $0 OR code BEGINSWITH[c] $0',\n searchTerm\n );\n\n let sortDataType;\n switch (sortBy) {\n case 'numberOfTransactions':\n sortDataType = 'number';\n break;\n default:\n sortDataType = 'realm';\n }\n return sortDataBy(data, sortBy, sortDataType, isAscending);\n }", "title": "" }, { "docid": "09cddc8c806ffb8bccc76dc8ef5d020b", "score": "0.48320767", "text": "async function query(filterBy = {}) {\n const criteria = _buildCriteria(filterBy)\n// const criteria = {}\n const skip = filterBy.pageIdx * filterBy.pageSize\n const limit = +filterBy.pageSize\n try {\n const collection = await dbService.getCollection('cars')\n if (filterBy.sortBy === 'ending-soon'){\n var sortBy = { 'auction.createdAt' : 1 } \n } else if (filterBy.sortBy === 'newly-listed') {\n sortBy = { 'auction.createdAt' : -1 } \n } else if (filterBy.sortBy === 'lowest-mileage') {\n sortBy = { 'mileage' : 1 }\n }\n var cars = await collection.find(criteria).sort(sortBy).skip(skip).limit(limit).toArray()\n var count = await collection.count()\n return [cars, count]\n } catch (err) {\n logger.error('Cannot find cars', err)\n throw err\n }\n}", "title": "" }, { "docid": "b95848e005615742d8fa8fb854d97c8e", "score": "0.48317438", "text": "queryAccounts({ include, filter, top, skip, orderBy } = {}) {\n var path = this.buildUrl({\n url: `/api/v2/accounts`,\n parameters: {\n $include: include,\n $filter: filter,\n $top: top,\n $skip: skip,\n $orderBy: orderBy\n }\n });\n return this.restCall({ url: path, verb: 'get', payload: null });\n }", "title": "" } ]
7c2dc90e04e628ddc0728c7618aaa5f2
Return a moment from input, that is local/utc/zone equivalent to model.
[ { "docid": "fee20e251083bbf8958a86a719542de3", "score": "0.0", "text": "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n}", "title": "" } ]
[ { "docid": "0a15e8039907ad7ad4fa2d3991ea1a96", "score": "0.8500792", "text": "function makeAs(input, model) {\n\t return model._isUTC ? moment(input).zone(model._offset || 0) :\n\t moment(input).local();\n\t }", "title": "" }, { "docid": "0a15e8039907ad7ad4fa2d3991ea1a96", "score": "0.8500792", "text": "function makeAs(input, model) {\n\t return model._isUTC ? moment(input).zone(model._offset || 0) :\n\t moment(input).local();\n\t }", "title": "" }, { "docid": "fdc389c0b12900146ea472a222f3e0c4", "score": "0.84280777", "text": "function makeAs(input, model) {\r\n return model._isUTC ? moment(input).zone(model._offset || 0) :\r\n moment(input).local();\r\n }", "title": "" }, { "docid": "c74aa8d5880fbdd7e6cde5fc3411debc", "score": "0.84180975", "text": "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "title": "" }, { "docid": "c74aa8d5880fbdd7e6cde5fc3411debc", "score": "0.84180975", "text": "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "title": "" }, { "docid": "c74aa8d5880fbdd7e6cde5fc3411debc", "score": "0.84180975", "text": "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "title": "" }, { "docid": "c74aa8d5880fbdd7e6cde5fc3411debc", "score": "0.84180975", "text": "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "title": "" }, { "docid": "c74aa8d5880fbdd7e6cde5fc3411debc", "score": "0.84180975", "text": "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "title": "" }, { "docid": "c74aa8d5880fbdd7e6cde5fc3411debc", "score": "0.84180975", "text": "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "title": "" }, { "docid": "c74aa8d5880fbdd7e6cde5fc3411debc", "score": "0.84180975", "text": "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "title": "" }, { "docid": "c74aa8d5880fbdd7e6cde5fc3411debc", "score": "0.84180975", "text": "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "title": "" }, { "docid": "c74aa8d5880fbdd7e6cde5fc3411debc", "score": "0.84180975", "text": "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "title": "" }, { "docid": "c74aa8d5880fbdd7e6cde5fc3411debc", "score": "0.84180975", "text": "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "title": "" }, { "docid": "c74aa8d5880fbdd7e6cde5fc3411debc", "score": "0.84180975", "text": "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "title": "" }, { "docid": "c74aa8d5880fbdd7e6cde5fc3411debc", "score": "0.84180975", "text": "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "title": "" }, { "docid": "c74aa8d5880fbdd7e6cde5fc3411debc", "score": "0.84180975", "text": "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "title": "" }, { "docid": "c74aa8d5880fbdd7e6cde5fc3411debc", "score": "0.84180975", "text": "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "title": "" }, { "docid": "c74aa8d5880fbdd7e6cde5fc3411debc", "score": "0.84180975", "text": "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "title": "" }, { "docid": "c74aa8d5880fbdd7e6cde5fc3411debc", "score": "0.84180975", "text": "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "title": "" }, { "docid": "c74aa8d5880fbdd7e6cde5fc3411debc", "score": "0.84180975", "text": "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "title": "" }, { "docid": "c74aa8d5880fbdd7e6cde5fc3411debc", "score": "0.84180975", "text": "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "title": "" }, { "docid": "c74aa8d5880fbdd7e6cde5fc3411debc", "score": "0.84180975", "text": "function makeAs(input, model) {\n return model._isUTC ? moment(input).zone(model._offset || 0) :\n moment(input).local();\n }", "title": "" }, { "docid": "8c55c41f07b4f3afa6a39434b3ba1099", "score": "0.78867173", "text": "function makeAs(input, model) {\n\t var res, diff;\n\t if (model._isUTC) {\n\t res = model.clone();\n\t diff = (moment.isMoment(input) || isDate(input) ?\n\t +input : +moment(input)) - (+res);\n\t // Use low-level api, because this fn is low-level api.\n\t res._d.setTime(+res._d + diff);\n\t moment.updateOffset(res, false);\n\t return res;\n\t } else {\n\t return moment(input).local();\n\t }\n\t }", "title": "" }, { "docid": "9526fc172f7d76ec892bf6bd12fa69da", "score": "0.78576285", "text": "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "title": "" }, { "docid": "3cc3707736eb5fbecdbc17e4b1130a13", "score": "0.7850577", "text": "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "title": "" }, { "docid": "3cc3707736eb5fbecdbc17e4b1130a13", "score": "0.7850577", "text": "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "title": "" }, { "docid": "3cc3707736eb5fbecdbc17e4b1130a13", "score": "0.7850577", "text": "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "title": "" }, { "docid": "3cc3707736eb5fbecdbc17e4b1130a13", "score": "0.7850577", "text": "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "title": "" }, { "docid": "3cc3707736eb5fbecdbc17e4b1130a13", "score": "0.7850577", "text": "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "title": "" }, { "docid": "3cc3707736eb5fbecdbc17e4b1130a13", "score": "0.7850577", "text": "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "title": "" }, { "docid": "3cc3707736eb5fbecdbc17e4b1130a13", "score": "0.7850577", "text": "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "title": "" }, { "docid": "3cc3707736eb5fbecdbc17e4b1130a13", "score": "0.7850577", "text": "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "title": "" }, { "docid": "3cc3707736eb5fbecdbc17e4b1130a13", "score": "0.7850577", "text": "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "title": "" }, { "docid": "3cc3707736eb5fbecdbc17e4b1130a13", "score": "0.7850577", "text": "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "title": "" }, { "docid": "3cc3707736eb5fbecdbc17e4b1130a13", "score": "0.7850577", "text": "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "title": "" }, { "docid": "3cc3707736eb5fbecdbc17e4b1130a13", "score": "0.7850577", "text": "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "title": "" }, { "docid": "3cc3707736eb5fbecdbc17e4b1130a13", "score": "0.7850577", "text": "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "title": "" }, { "docid": "3cc3707736eb5fbecdbc17e4b1130a13", "score": "0.7850577", "text": "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "title": "" }, { "docid": "3cc3707736eb5fbecdbc17e4b1130a13", "score": "0.7850577", "text": "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "title": "" }, { "docid": "3cc3707736eb5fbecdbc17e4b1130a13", "score": "0.7850577", "text": "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "title": "" }, { "docid": "3cc3707736eb5fbecdbc17e4b1130a13", "score": "0.7850577", "text": "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "title": "" }, { "docid": "62c49198330d6aad530d4c6ffe174604", "score": "0.7849492", "text": "function makeAs(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (moment.isMoment(input) || isDate(input) ?\n +input : +moment(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return moment(input).local();\n }\n }", "title": "" }, { "docid": "ac1307d2316da055ffcc46afea8ddda7", "score": "0.6545423", "text": "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff =\n\t (isMoment(input) || isDate(input)\n\t ? input.valueOf()\n\t : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n moment.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n}", "title": "" }, { "docid": "e6d387754edabe90aa5b33f5595e9c6f", "score": "0.6515401", "text": "function makeMoment(args, parseAsUTC, parseZone) {\n\t\tvar input = args[0];\n\t\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\t\tvar isAmbigTime;\n\t\tvar isAmbigZone;\n\t\tvar ambigMatch;\n\t\tvar mom;\n\n\t\tif (moment.isMoment(input) || isNativeDate(input) || input === undefined) {\n\t\t\tmom = moment.apply(null, args);\n\t\t}\n\t\telse { // \"parsing\" is required\n\t\t\tisAmbigTime = false;\n\t\t\tisAmbigZone = false;\n\n\t\t\tif (isSingleString) {\n\t\t\t\tif (ambigDateOfMonthRegex.test(input)) {\n\t\t\t\t\t// accept strings like '2014-05', but convert to the first of the month\n\t\t\t\t\tinput += '-01';\n\t\t\t\t\targs = [ input ]; // for when we pass it on to moment's constructor\n\t\t\t\t\tisAmbigTime = true;\n\t\t\t\t\tisAmbigZone = true;\n\t\t\t\t}\n\t\t\t\telse if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n\t\t\t\t\tisAmbigTime = !ambigMatch[5]; // no time part?\n\t\t\t\t\tisAmbigZone = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ($.isArray(input)) {\n\t\t\t\t// arrays have no timezone information, so assume ambiguous zone\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t\t// otherwise, probably a string with a format\n\n\t\t\tif (parseAsUTC || isAmbigTime) {\n\t\t\t\tmom = moment.utc.apply(moment, args);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmom = moment.apply(null, args);\n\t\t\t}\n\n\t\t\tif (isAmbigTime) {\n\t\t\t\tmom._ambigTime = true;\n\t\t\t\tmom._ambigZone = true; // ambiguous time always means ambiguous zone\n\t\t\t}\n\t\t\telse if (parseZone) { // let's record the inputted zone somehow\n\t\t\t\tif (isAmbigZone) {\n\t\t\t\t\tmom._ambigZone = true;\n\t\t\t\t}\n\t\t\t\telse if (isSingleString) {\n\t\t\t\t\tmom.utcOffset(input); // if not a valid zone, will assign UTC\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tmom._fullCalendar = true; // flag for extended functionality\n\n\t\treturn mom;\n\t}", "title": "" }, { "docid": "5f1cb6218f93e52777e76bd0733c0481", "score": "0.65118587", "text": "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "title": "" }, { "docid": "5f1cb6218f93e52777e76bd0733c0481", "score": "0.65118587", "text": "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "title": "" }, { "docid": "5f1cb6218f93e52777e76bd0733c0481", "score": "0.65118587", "text": "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "title": "" }, { "docid": "5f1cb6218f93e52777e76bd0733c0481", "score": "0.65118587", "text": "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "title": "" }, { "docid": "5f1cb6218f93e52777e76bd0733c0481", "score": "0.65118587", "text": "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "title": "" }, { "docid": "5f1cb6218f93e52777e76bd0733c0481", "score": "0.65118587", "text": "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "title": "" }, { "docid": "5f1cb6218f93e52777e76bd0733c0481", "score": "0.65118587", "text": "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "title": "" }, { "docid": "5f1cb6218f93e52777e76bd0733c0481", "score": "0.65118587", "text": "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "title": "" }, { "docid": "5f1cb6218f93e52777e76bd0733c0481", "score": "0.65118587", "text": "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "title": "" }, { "docid": "5f1cb6218f93e52777e76bd0733c0481", "score": "0.65118587", "text": "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "title": "" }, { "docid": "5f1cb6218f93e52777e76bd0733c0481", "score": "0.65118587", "text": "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "title": "" }, { "docid": "5f1cb6218f93e52777e76bd0733c0481", "score": "0.65118587", "text": "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "title": "" }, { "docid": "5f1cb6218f93e52777e76bd0733c0481", "score": "0.65118587", "text": "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(+res._d + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local();\n }", "title": "" }, { "docid": "c54fa953d9d9b47026f0d02198e1a254", "score": "0.64756083", "text": "function makeMoment(args, parseAsUTC, parseZone) {\n\tvar input = args[0];\n\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\tvar isAmbigTime;\n\tvar isAmbigZone;\n\tvar ambigMatch;\n\tvar mom;\n\n\tif (moment.isMoment(input) || isNativeDate(input) || input === undefined) {\n\t\tmom = moment.apply(null, args);\n\t}\n\telse { // \"parsing\" is required\n\t\tisAmbigTime = false;\n\t\tisAmbigZone = false;\n\n\t\tif (isSingleString) {\n\t\t\tif (ambigDateOfMonthRegex.test(input)) {\n\t\t\t\t// accept strings like '2014-05', but convert to the first of the month\n\t\t\t\tinput += '-01';\n\t\t\t\targs = [ input ]; // for when we pass it on to moment's constructor\n\t\t\t\tisAmbigTime = true;\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t\telse if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n\t\t\t\tisAmbigTime = !ambigMatch[5]; // no time part?\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t}\n\t\telse if ($.isArray(input)) {\n\t\t\t// arrays have no timezone information, so assume ambiguous zone\n\t\t\tisAmbigZone = true;\n\t\t}\n\t\t// otherwise, probably a string with a format\n\n\t\tif (parseAsUTC || isAmbigTime) {\n\t\t\tmom = moment.utc.apply(moment, args);\n\t\t}\n\t\telse {\n\t\t\tmom = moment.apply(null, args);\n\t\t}\n\n\t\tif (isAmbigTime) {\n\t\t\tmom._ambigTime = true;\n\t\t\tmom._ambigZone = true; // ambiguous time always means ambiguous zone\n\t\t}\n\t\telse if (parseZone) { // let's record the inputted zone somehow\n\t\t\tif (isAmbigZone) {\n\t\t\t\tmom._ambigZone = true;\n\t\t\t}\n\t\t\telse if (isSingleString) {\n\t\t\t\tmom.utcOffset(input); // if not a valid zone, will assign UTC\n\t\t\t}\n\t\t}\n\t}\n\n\tmom._fullCalendar = true; // flag for extended functionality\n\n\treturn mom;\n}", "title": "" }, { "docid": "c54fa953d9d9b47026f0d02198e1a254", "score": "0.64756083", "text": "function makeMoment(args, parseAsUTC, parseZone) {\n\tvar input = args[0];\n\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\tvar isAmbigTime;\n\tvar isAmbigZone;\n\tvar ambigMatch;\n\tvar mom;\n\n\tif (moment.isMoment(input) || isNativeDate(input) || input === undefined) {\n\t\tmom = moment.apply(null, args);\n\t}\n\telse { // \"parsing\" is required\n\t\tisAmbigTime = false;\n\t\tisAmbigZone = false;\n\n\t\tif (isSingleString) {\n\t\t\tif (ambigDateOfMonthRegex.test(input)) {\n\t\t\t\t// accept strings like '2014-05', but convert to the first of the month\n\t\t\t\tinput += '-01';\n\t\t\t\targs = [ input ]; // for when we pass it on to moment's constructor\n\t\t\t\tisAmbigTime = true;\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t\telse if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n\t\t\t\tisAmbigTime = !ambigMatch[5]; // no time part?\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t}\n\t\telse if ($.isArray(input)) {\n\t\t\t// arrays have no timezone information, so assume ambiguous zone\n\t\t\tisAmbigZone = true;\n\t\t}\n\t\t// otherwise, probably a string with a format\n\n\t\tif (parseAsUTC || isAmbigTime) {\n\t\t\tmom = moment.utc.apply(moment, args);\n\t\t}\n\t\telse {\n\t\t\tmom = moment.apply(null, args);\n\t\t}\n\n\t\tif (isAmbigTime) {\n\t\t\tmom._ambigTime = true;\n\t\t\tmom._ambigZone = true; // ambiguous time always means ambiguous zone\n\t\t}\n\t\telse if (parseZone) { // let's record the inputted zone somehow\n\t\t\tif (isAmbigZone) {\n\t\t\t\tmom._ambigZone = true;\n\t\t\t}\n\t\t\telse if (isSingleString) {\n\t\t\t\tmom.utcOffset(input); // if not a valid zone, will assign UTC\n\t\t\t}\n\t\t}\n\t}\n\n\tmom._fullCalendar = true; // flag for extended functionality\n\n\treturn mom;\n}", "title": "" }, { "docid": "c54fa953d9d9b47026f0d02198e1a254", "score": "0.64756083", "text": "function makeMoment(args, parseAsUTC, parseZone) {\n\tvar input = args[0];\n\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\tvar isAmbigTime;\n\tvar isAmbigZone;\n\tvar ambigMatch;\n\tvar mom;\n\n\tif (moment.isMoment(input) || isNativeDate(input) || input === undefined) {\n\t\tmom = moment.apply(null, args);\n\t}\n\telse { // \"parsing\" is required\n\t\tisAmbigTime = false;\n\t\tisAmbigZone = false;\n\n\t\tif (isSingleString) {\n\t\t\tif (ambigDateOfMonthRegex.test(input)) {\n\t\t\t\t// accept strings like '2014-05', but convert to the first of the month\n\t\t\t\tinput += '-01';\n\t\t\t\targs = [ input ]; // for when we pass it on to moment's constructor\n\t\t\t\tisAmbigTime = true;\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t\telse if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n\t\t\t\tisAmbigTime = !ambigMatch[5]; // no time part?\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t}\n\t\telse if ($.isArray(input)) {\n\t\t\t// arrays have no timezone information, so assume ambiguous zone\n\t\t\tisAmbigZone = true;\n\t\t}\n\t\t// otherwise, probably a string with a format\n\n\t\tif (parseAsUTC || isAmbigTime) {\n\t\t\tmom = moment.utc.apply(moment, args);\n\t\t}\n\t\telse {\n\t\t\tmom = moment.apply(null, args);\n\t\t}\n\n\t\tif (isAmbigTime) {\n\t\t\tmom._ambigTime = true;\n\t\t\tmom._ambigZone = true; // ambiguous time always means ambiguous zone\n\t\t}\n\t\telse if (parseZone) { // let's record the inputted zone somehow\n\t\t\tif (isAmbigZone) {\n\t\t\t\tmom._ambigZone = true;\n\t\t\t}\n\t\t\telse if (isSingleString) {\n\t\t\t\tmom.utcOffset(input); // if not a valid zone, will assign UTC\n\t\t\t}\n\t\t}\n\t}\n\n\tmom._fullCalendar = true; // flag for extended functionality\n\n\treturn mom;\n}", "title": "" }, { "docid": "c54fa953d9d9b47026f0d02198e1a254", "score": "0.64756083", "text": "function makeMoment(args, parseAsUTC, parseZone) {\n\tvar input = args[0];\n\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\tvar isAmbigTime;\n\tvar isAmbigZone;\n\tvar ambigMatch;\n\tvar mom;\n\n\tif (moment.isMoment(input) || isNativeDate(input) || input === undefined) {\n\t\tmom = moment.apply(null, args);\n\t}\n\telse { // \"parsing\" is required\n\t\tisAmbigTime = false;\n\t\tisAmbigZone = false;\n\n\t\tif (isSingleString) {\n\t\t\tif (ambigDateOfMonthRegex.test(input)) {\n\t\t\t\t// accept strings like '2014-05', but convert to the first of the month\n\t\t\t\tinput += '-01';\n\t\t\t\targs = [ input ]; // for when we pass it on to moment's constructor\n\t\t\t\tisAmbigTime = true;\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t\telse if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n\t\t\t\tisAmbigTime = !ambigMatch[5]; // no time part?\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t}\n\t\telse if ($.isArray(input)) {\n\t\t\t// arrays have no timezone information, so assume ambiguous zone\n\t\t\tisAmbigZone = true;\n\t\t}\n\t\t// otherwise, probably a string with a format\n\n\t\tif (parseAsUTC || isAmbigTime) {\n\t\t\tmom = moment.utc.apply(moment, args);\n\t\t}\n\t\telse {\n\t\t\tmom = moment.apply(null, args);\n\t\t}\n\n\t\tif (isAmbigTime) {\n\t\t\tmom._ambigTime = true;\n\t\t\tmom._ambigZone = true; // ambiguous time always means ambiguous zone\n\t\t}\n\t\telse if (parseZone) { // let's record the inputted zone somehow\n\t\t\tif (isAmbigZone) {\n\t\t\t\tmom._ambigZone = true;\n\t\t\t}\n\t\t\telse if (isSingleString) {\n\t\t\t\tmom.utcOffset(input); // if not a valid zone, will assign UTC\n\t\t\t}\n\t\t}\n\t}\n\n\tmom._fullCalendar = true; // flag for extended functionality\n\n\treturn mom;\n}", "title": "" }, { "docid": "c54fa953d9d9b47026f0d02198e1a254", "score": "0.64756083", "text": "function makeMoment(args, parseAsUTC, parseZone) {\n\tvar input = args[0];\n\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\tvar isAmbigTime;\n\tvar isAmbigZone;\n\tvar ambigMatch;\n\tvar mom;\n\n\tif (moment.isMoment(input) || isNativeDate(input) || input === undefined) {\n\t\tmom = moment.apply(null, args);\n\t}\n\telse { // \"parsing\" is required\n\t\tisAmbigTime = false;\n\t\tisAmbigZone = false;\n\n\t\tif (isSingleString) {\n\t\t\tif (ambigDateOfMonthRegex.test(input)) {\n\t\t\t\t// accept strings like '2014-05', but convert to the first of the month\n\t\t\t\tinput += '-01';\n\t\t\t\targs = [ input ]; // for when we pass it on to moment's constructor\n\t\t\t\tisAmbigTime = true;\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t\telse if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n\t\t\t\tisAmbigTime = !ambigMatch[5]; // no time part?\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t}\n\t\telse if ($.isArray(input)) {\n\t\t\t// arrays have no timezone information, so assume ambiguous zone\n\t\t\tisAmbigZone = true;\n\t\t}\n\t\t// otherwise, probably a string with a format\n\n\t\tif (parseAsUTC || isAmbigTime) {\n\t\t\tmom = moment.utc.apply(moment, args);\n\t\t}\n\t\telse {\n\t\t\tmom = moment.apply(null, args);\n\t\t}\n\n\t\tif (isAmbigTime) {\n\t\t\tmom._ambigTime = true;\n\t\t\tmom._ambigZone = true; // ambiguous time always means ambiguous zone\n\t\t}\n\t\telse if (parseZone) { // let's record the inputted zone somehow\n\t\t\tif (isAmbigZone) {\n\t\t\t\tmom._ambigZone = true;\n\t\t\t}\n\t\t\telse if (isSingleString) {\n\t\t\t\tmom.utcOffset(input); // if not a valid zone, will assign UTC\n\t\t\t}\n\t\t}\n\t}\n\n\tmom._fullCalendar = true; // flag for extended functionality\n\n\treturn mom;\n}", "title": "" }, { "docid": "de2981160c2608a3be123db966883743", "score": "0.6384391", "text": "function makeMoment(args, parseAsUTC, parseZone) {\n\tvar input = args[0];\n\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\tvar isAmbigTime;\n\tvar isAmbigZone;\n\tvar ambigMatch;\n\tvar mom;\n\n\tif (moment.isMoment(input)) {\n\t\tmom = moment.apply(null, args); // clone it\n\t\ttransferAmbigs(input, mom); // the ambig flags weren't transfered with the clone\n\t}\n\telse if (isNativeDate(input) || input === undefined) {\n\t\tmom = moment.apply(null, args); // will be local\n\t}\n\telse { // \"parsing\" is required\n\t\tisAmbigTime = false;\n\t\tisAmbigZone = false;\n\n\t\tif (isSingleString) {\n\t\t\tif (ambigDateOfMonthRegex.test(input)) {\n\t\t\t\t// accept strings like '2014-05', but convert to the first of the month\n\t\t\t\tinput += '-01';\n\t\t\t\targs = [ input ]; // for when we pass it on to moment's constructor\n\t\t\t\tisAmbigTime = true;\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t\telse if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n\t\t\t\tisAmbigTime = !ambigMatch[5]; // no time part?\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t}\n\t\telse if ($.isArray(input)) {\n\t\t\t// arrays have no timezone information, so assume ambiguous zone\n\t\t\tisAmbigZone = true;\n\t\t}\n\t\t// otherwise, probably a string with a format\n\n\t\tif (parseAsUTC || isAmbigTime) {\n\t\t\tmom = moment.utc.apply(moment, args);\n\t\t}\n\t\telse {\n\t\t\tmom = moment.apply(null, args);\n\t\t}\n\n\t\tif (isAmbigTime) {\n\t\t\tmom._ambigTime = true;\n\t\t\tmom._ambigZone = true; // ambiguous time always means ambiguous zone\n\t\t}\n\t\telse if (parseZone) { // let's record the inputted zone somehow\n\t\t\tif (isAmbigZone) {\n\t\t\t\tmom._ambigZone = true;\n\t\t\t}\n\t\t\telse if (isSingleString) {\n\t\t\t\tif (mom.utcOffset) {\n\t\t\t\t\tmom.utcOffset(input); // if not a valid zone, will assign UTC\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmom.zone(input); // for moment-pre-2.9\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tmom._fullCalendar = true; // flag for extended functionality\n\n\treturn mom;\n}", "title": "" }, { "docid": "de2981160c2608a3be123db966883743", "score": "0.6384391", "text": "function makeMoment(args, parseAsUTC, parseZone) {\n\tvar input = args[0];\n\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\tvar isAmbigTime;\n\tvar isAmbigZone;\n\tvar ambigMatch;\n\tvar mom;\n\n\tif (moment.isMoment(input)) {\n\t\tmom = moment.apply(null, args); // clone it\n\t\ttransferAmbigs(input, mom); // the ambig flags weren't transfered with the clone\n\t}\n\telse if (isNativeDate(input) || input === undefined) {\n\t\tmom = moment.apply(null, args); // will be local\n\t}\n\telse { // \"parsing\" is required\n\t\tisAmbigTime = false;\n\t\tisAmbigZone = false;\n\n\t\tif (isSingleString) {\n\t\t\tif (ambigDateOfMonthRegex.test(input)) {\n\t\t\t\t// accept strings like '2014-05', but convert to the first of the month\n\t\t\t\tinput += '-01';\n\t\t\t\targs = [ input ]; // for when we pass it on to moment's constructor\n\t\t\t\tisAmbigTime = true;\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t\telse if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n\t\t\t\tisAmbigTime = !ambigMatch[5]; // no time part?\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t}\n\t\telse if ($.isArray(input)) {\n\t\t\t// arrays have no timezone information, so assume ambiguous zone\n\t\t\tisAmbigZone = true;\n\t\t}\n\t\t// otherwise, probably a string with a format\n\n\t\tif (parseAsUTC || isAmbigTime) {\n\t\t\tmom = moment.utc.apply(moment, args);\n\t\t}\n\t\telse {\n\t\t\tmom = moment.apply(null, args);\n\t\t}\n\n\t\tif (isAmbigTime) {\n\t\t\tmom._ambigTime = true;\n\t\t\tmom._ambigZone = true; // ambiguous time always means ambiguous zone\n\t\t}\n\t\telse if (parseZone) { // let's record the inputted zone somehow\n\t\t\tif (isAmbigZone) {\n\t\t\t\tmom._ambigZone = true;\n\t\t\t}\n\t\t\telse if (isSingleString) {\n\t\t\t\tif (mom.utcOffset) {\n\t\t\t\t\tmom.utcOffset(input); // if not a valid zone, will assign UTC\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmom.zone(input); // for moment-pre-2.9\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tmom._fullCalendar = true; // flag for extended functionality\n\n\treturn mom;\n}", "title": "" }, { "docid": "de2981160c2608a3be123db966883743", "score": "0.6384391", "text": "function makeMoment(args, parseAsUTC, parseZone) {\n\tvar input = args[0];\n\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\tvar isAmbigTime;\n\tvar isAmbigZone;\n\tvar ambigMatch;\n\tvar mom;\n\n\tif (moment.isMoment(input)) {\n\t\tmom = moment.apply(null, args); // clone it\n\t\ttransferAmbigs(input, mom); // the ambig flags weren't transfered with the clone\n\t}\n\telse if (isNativeDate(input) || input === undefined) {\n\t\tmom = moment.apply(null, args); // will be local\n\t}\n\telse { // \"parsing\" is required\n\t\tisAmbigTime = false;\n\t\tisAmbigZone = false;\n\n\t\tif (isSingleString) {\n\t\t\tif (ambigDateOfMonthRegex.test(input)) {\n\t\t\t\t// accept strings like '2014-05', but convert to the first of the month\n\t\t\t\tinput += '-01';\n\t\t\t\targs = [ input ]; // for when we pass it on to moment's constructor\n\t\t\t\tisAmbigTime = true;\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t\telse if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n\t\t\t\tisAmbigTime = !ambigMatch[5]; // no time part?\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t}\n\t\telse if ($.isArray(input)) {\n\t\t\t// arrays have no timezone information, so assume ambiguous zone\n\t\t\tisAmbigZone = true;\n\t\t}\n\t\t// otherwise, probably a string with a format\n\n\t\tif (parseAsUTC || isAmbigTime) {\n\t\t\tmom = moment.utc.apply(moment, args);\n\t\t}\n\t\telse {\n\t\t\tmom = moment.apply(null, args);\n\t\t}\n\n\t\tif (isAmbigTime) {\n\t\t\tmom._ambigTime = true;\n\t\t\tmom._ambigZone = true; // ambiguous time always means ambiguous zone\n\t\t}\n\t\telse if (parseZone) { // let's record the inputted zone somehow\n\t\t\tif (isAmbigZone) {\n\t\t\t\tmom._ambigZone = true;\n\t\t\t}\n\t\t\telse if (isSingleString) {\n\t\t\t\tif (mom.utcOffset) {\n\t\t\t\t\tmom.utcOffset(input); // if not a valid zone, will assign UTC\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmom.zone(input); // for moment-pre-2.9\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tmom._fullCalendar = true; // flag for extended functionality\n\n\treturn mom;\n}", "title": "" }, { "docid": "de2981160c2608a3be123db966883743", "score": "0.6384391", "text": "function makeMoment(args, parseAsUTC, parseZone) {\n\tvar input = args[0];\n\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\tvar isAmbigTime;\n\tvar isAmbigZone;\n\tvar ambigMatch;\n\tvar mom;\n\n\tif (moment.isMoment(input)) {\n\t\tmom = moment.apply(null, args); // clone it\n\t\ttransferAmbigs(input, mom); // the ambig flags weren't transfered with the clone\n\t}\n\telse if (isNativeDate(input) || input === undefined) {\n\t\tmom = moment.apply(null, args); // will be local\n\t}\n\telse { // \"parsing\" is required\n\t\tisAmbigTime = false;\n\t\tisAmbigZone = false;\n\n\t\tif (isSingleString) {\n\t\t\tif (ambigDateOfMonthRegex.test(input)) {\n\t\t\t\t// accept strings like '2014-05', but convert to the first of the month\n\t\t\t\tinput += '-01';\n\t\t\t\targs = [ input ]; // for when we pass it on to moment's constructor\n\t\t\t\tisAmbigTime = true;\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t\telse if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n\t\t\t\tisAmbigTime = !ambigMatch[5]; // no time part?\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t}\n\t\telse if ($.isArray(input)) {\n\t\t\t// arrays have no timezone information, so assume ambiguous zone\n\t\t\tisAmbigZone = true;\n\t\t}\n\t\t// otherwise, probably a string with a format\n\n\t\tif (parseAsUTC || isAmbigTime) {\n\t\t\tmom = moment.utc.apply(moment, args);\n\t\t}\n\t\telse {\n\t\t\tmom = moment.apply(null, args);\n\t\t}\n\n\t\tif (isAmbigTime) {\n\t\t\tmom._ambigTime = true;\n\t\t\tmom._ambigZone = true; // ambiguous time always means ambiguous zone\n\t\t}\n\t\telse if (parseZone) { // let's record the inputted zone somehow\n\t\t\tif (isAmbigZone) {\n\t\t\t\tmom._ambigZone = true;\n\t\t\t}\n\t\t\telse if (isSingleString) {\n\t\t\t\tif (mom.utcOffset) {\n\t\t\t\t\tmom.utcOffset(input); // if not a valid zone, will assign UTC\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmom.zone(input); // for moment-pre-2.9\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tmom._fullCalendar = true; // flag for extended functionality\n\n\treturn mom;\n}", "title": "" }, { "docid": "de2981160c2608a3be123db966883743", "score": "0.6384391", "text": "function makeMoment(args, parseAsUTC, parseZone) {\n\tvar input = args[0];\n\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\tvar isAmbigTime;\n\tvar isAmbigZone;\n\tvar ambigMatch;\n\tvar mom;\n\n\tif (moment.isMoment(input)) {\n\t\tmom = moment.apply(null, args); // clone it\n\t\ttransferAmbigs(input, mom); // the ambig flags weren't transfered with the clone\n\t}\n\telse if (isNativeDate(input) || input === undefined) {\n\t\tmom = moment.apply(null, args); // will be local\n\t}\n\telse { // \"parsing\" is required\n\t\tisAmbigTime = false;\n\t\tisAmbigZone = false;\n\n\t\tif (isSingleString) {\n\t\t\tif (ambigDateOfMonthRegex.test(input)) {\n\t\t\t\t// accept strings like '2014-05', but convert to the first of the month\n\t\t\t\tinput += '-01';\n\t\t\t\targs = [ input ]; // for when we pass it on to moment's constructor\n\t\t\t\tisAmbigTime = true;\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t\telse if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n\t\t\t\tisAmbigTime = !ambigMatch[5]; // no time part?\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t}\n\t\telse if ($.isArray(input)) {\n\t\t\t// arrays have no timezone information, so assume ambiguous zone\n\t\t\tisAmbigZone = true;\n\t\t}\n\t\t// otherwise, probably a string with a format\n\n\t\tif (parseAsUTC || isAmbigTime) {\n\t\t\tmom = moment.utc.apply(moment, args);\n\t\t}\n\t\telse {\n\t\t\tmom = moment.apply(null, args);\n\t\t}\n\n\t\tif (isAmbigTime) {\n\t\t\tmom._ambigTime = true;\n\t\t\tmom._ambigZone = true; // ambiguous time always means ambiguous zone\n\t\t}\n\t\telse if (parseZone) { // let's record the inputted zone somehow\n\t\t\tif (isAmbigZone) {\n\t\t\t\tmom._ambigZone = true;\n\t\t\t}\n\t\t\telse if (isSingleString) {\n\t\t\t\tif (mom.utcOffset) {\n\t\t\t\t\tmom.utcOffset(input); // if not a valid zone, will assign UTC\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmom.zone(input); // for moment-pre-2.9\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tmom._fullCalendar = true; // flag for extended functionality\n\n\treturn mom;\n}", "title": "" }, { "docid": "de2981160c2608a3be123db966883743", "score": "0.6384391", "text": "function makeMoment(args, parseAsUTC, parseZone) {\n\tvar input = args[0];\n\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\tvar isAmbigTime;\n\tvar isAmbigZone;\n\tvar ambigMatch;\n\tvar mom;\n\n\tif (moment.isMoment(input)) {\n\t\tmom = moment.apply(null, args); // clone it\n\t\ttransferAmbigs(input, mom); // the ambig flags weren't transfered with the clone\n\t}\n\telse if (isNativeDate(input) || input === undefined) {\n\t\tmom = moment.apply(null, args); // will be local\n\t}\n\telse { // \"parsing\" is required\n\t\tisAmbigTime = false;\n\t\tisAmbigZone = false;\n\n\t\tif (isSingleString) {\n\t\t\tif (ambigDateOfMonthRegex.test(input)) {\n\t\t\t\t// accept strings like '2014-05', but convert to the first of the month\n\t\t\t\tinput += '-01';\n\t\t\t\targs = [ input ]; // for when we pass it on to moment's constructor\n\t\t\t\tisAmbigTime = true;\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t\telse if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n\t\t\t\tisAmbigTime = !ambigMatch[5]; // no time part?\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t}\n\t\telse if ($.isArray(input)) {\n\t\t\t// arrays have no timezone information, so assume ambiguous zone\n\t\t\tisAmbigZone = true;\n\t\t}\n\t\t// otherwise, probably a string with a format\n\n\t\tif (parseAsUTC || isAmbigTime) {\n\t\t\tmom = moment.utc.apply(moment, args);\n\t\t}\n\t\telse {\n\t\t\tmom = moment.apply(null, args);\n\t\t}\n\n\t\tif (isAmbigTime) {\n\t\t\tmom._ambigTime = true;\n\t\t\tmom._ambigZone = true; // ambiguous time always means ambiguous zone\n\t\t}\n\t\telse if (parseZone) { // let's record the inputted zone somehow\n\t\t\tif (isAmbigZone) {\n\t\t\t\tmom._ambigZone = true;\n\t\t\t}\n\t\t\telse if (isSingleString) {\n\t\t\t\tif (mom.utcOffset) {\n\t\t\t\t\tmom.utcOffset(input); // if not a valid zone, will assign UTC\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmom.zone(input); // for moment-pre-2.9\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tmom._fullCalendar = true; // flag for extended functionality\n\n\treturn mom;\n}", "title": "" }, { "docid": "0936bf228ab181da0bc69d868eb618ee", "score": "0.6382338", "text": "function makeMoment(args, parseAsUTC, parseZone) {\n\tvar input = args[0];\n\tvar isSingleString = args.length == 1 && typeof input === 'string';\n\tvar isAmbigTime;\n\tvar isAmbigZone;\n\tvar ambigMatch;\n\tvar mom;\n\n\tif (moment.isMoment(input)) {\n\t\tmom = moment.apply(null, args); // clone it\n\t\ttransferAmbigs(input, mom); // the ambig flags weren't transfered with the clone\n\t}\n\telse if (isNativeDate(input) || input === undefined) {\n\t\tmom = moment.apply(null, args); // will be local\n\t}\n\telse { // \"parsing\" is required\n\t\tisAmbigTime = false;\n\t\tisAmbigZone = false;\n\n\t\tif (isSingleString) {\n\t\t\tif (ambigDateOfMonthRegex.test(input)) {\n\t\t\t\t// accept strings like '2014-05', but convert to the first of the month\n\t\t\t\tinput += '-01';\n\t\t\t\targs = [ input ]; // for when we pass it on to moment's constructor\n\t\t\t\tisAmbigTime = true;\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t\telse if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n\t\t\t\tisAmbigTime = !ambigMatch[5]; // no time part?\n\t\t\t\tisAmbigZone = true;\n\t\t\t}\n\t\t}\n\t\telse if ($.isArray(input)) {\n\t\t\t// arrays have no timezone information, so assume ambiguous zone\n\t\t\tisAmbigZone = true;\n\t\t}\n\t\t// otherwise, probably a string with a format\n\n\t\tif (parseAsUTC) {\n\t\t\tmom = moment.utc.apply(moment, args);\n\t\t}\n\t\telse {\n\t\t\tmom = moment.apply(null, args);\n\t\t}\n\n\t\tif (isAmbigTime) {\n\t\t\tmom._ambigTime = true;\n\t\t\tmom._ambigZone = true; // ambiguous time always means ambiguous zone\n\t\t}\n\t\telse if (parseZone) { // let's record the inputted zone somehow\n\t\t\tif (isAmbigZone) {\n\t\t\t\tmom._ambigZone = true;\n\t\t\t}\n\t\t\telse if (isSingleString) {\n\t\t\t\tmom.zone(input); // if not a valid zone, will assign UTC\n\t\t\t}\n\t\t}\n\t}\n\n\tmom._fullCalendar = true; // flag for extended functionality\n\n\treturn mom;\n}", "title": "" }, { "docid": "cef36e8220f0c561971024aee9068992", "score": "0.6365682", "text": "function makeMoment(args, parseAsUTC, parseZone) {\n if (parseAsUTC === void 0) { parseAsUTC = false; }\n if (parseZone === void 0) { parseZone = false; }\n var input = args[0];\n var isSingleString = args.length === 1 && typeof input === 'string';\n var isAmbigTime;\n var isAmbigZone;\n var ambigMatch;\n var mom;\n if (moment.isMoment(input) || util_1.isNativeDate(input) || input === undefined) {\n mom = moment.apply(null, args);\n }\n else { // \"parsing\" is required\n isAmbigTime = false;\n isAmbigZone = false;\n if (isSingleString) {\n if (ambigDateOfMonthRegex.test(input)) {\n // accept strings like '2014-05', but convert to the first of the month\n input += '-01';\n args = [input]; // for when we pass it on to moment's constructor\n isAmbigTime = true;\n isAmbigZone = true;\n }\n else if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n isAmbigTime = !ambigMatch[5]; // no time part?\n isAmbigZone = true;\n }\n }\n else if ($.isArray(input)) {\n // arrays have no timezone information, so assume ambiguous zone\n isAmbigZone = true;\n }\n // otherwise, probably a string with a format\n if (parseAsUTC || isAmbigTime) {\n mom = moment.utc.apply(moment, args);\n }\n else {\n mom = moment.apply(null, args);\n }\n if (isAmbigTime) {\n mom._ambigTime = true;\n mom._ambigZone = true; // ambiguous time always means ambiguous zone\n }\n else if (parseZone) { // let's record the inputted zone somehow\n if (isAmbigZone) {\n mom._ambigZone = true;\n }\n else if (isSingleString) {\n mom.utcOffset(input); // if not a valid zone, will assign UTC\n }\n }\n }\n mom._fullCalendar = true; // flag for extended functionality\n return mom;\n}", "title": "" }, { "docid": "cef36e8220f0c561971024aee9068992", "score": "0.6365682", "text": "function makeMoment(args, parseAsUTC, parseZone) {\n if (parseAsUTC === void 0) { parseAsUTC = false; }\n if (parseZone === void 0) { parseZone = false; }\n var input = args[0];\n var isSingleString = args.length === 1 && typeof input === 'string';\n var isAmbigTime;\n var isAmbigZone;\n var ambigMatch;\n var mom;\n if (moment.isMoment(input) || util_1.isNativeDate(input) || input === undefined) {\n mom = moment.apply(null, args);\n }\n else { // \"parsing\" is required\n isAmbigTime = false;\n isAmbigZone = false;\n if (isSingleString) {\n if (ambigDateOfMonthRegex.test(input)) {\n // accept strings like '2014-05', but convert to the first of the month\n input += '-01';\n args = [input]; // for when we pass it on to moment's constructor\n isAmbigTime = true;\n isAmbigZone = true;\n }\n else if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n isAmbigTime = !ambigMatch[5]; // no time part?\n isAmbigZone = true;\n }\n }\n else if ($.isArray(input)) {\n // arrays have no timezone information, so assume ambiguous zone\n isAmbigZone = true;\n }\n // otherwise, probably a string with a format\n if (parseAsUTC || isAmbigTime) {\n mom = moment.utc.apply(moment, args);\n }\n else {\n mom = moment.apply(null, args);\n }\n if (isAmbigTime) {\n mom._ambigTime = true;\n mom._ambigZone = true; // ambiguous time always means ambiguous zone\n }\n else if (parseZone) { // let's record the inputted zone somehow\n if (isAmbigZone) {\n mom._ambigZone = true;\n }\n else if (isSingleString) {\n mom.utcOffset(input); // if not a valid zone, will assign UTC\n }\n }\n }\n mom._fullCalendar = true; // flag for extended functionality\n return mom;\n}", "title": "" }, { "docid": "880c8f9beacb76a9d4306aabde5a95b5", "score": "0.6364875", "text": "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "title": "" }, { "docid": "b2ea4dafba4a9785c314ac55cfbdf147", "score": "0.6345072", "text": "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "title": "" }, { "docid": "b2ea4dafba4a9785c314ac55cfbdf147", "score": "0.6345072", "text": "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "title": "" }, { "docid": "9eeb70d95105af333ac87228d0767e2b", "score": "0.6342639", "text": "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : local__createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n utils_hooks__hooks.updateOffset(res, false);\n return res;\n } else {\n return local__createLocal(input).local();\n }\n }", "title": "" }, { "docid": "53a18b19489427efb99b92be6a279ad8", "score": "0.63376", "text": "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "title": "" }, { "docid": "d69787f0d3678f576cce6988a842b9cc", "score": "0.6329096", "text": "function makeMoment(args, parseAsUTC, parseZone) {\n if (parseAsUTC === void 0) { parseAsUTC = false; }\n if (parseZone === void 0) { parseZone = false; }\n var input = args[0];\n var isSingleString = args.length === 1 && typeof input === 'string';\n var isAmbigTime;\n var isAmbigZone;\n var ambigMatch;\n var mom;\n if (moment.isMoment(input) || util_1.isNativeDate(input) || input === undefined) {\n mom = moment.apply(null, args);\n }\n else {\n isAmbigTime = false;\n isAmbigZone = false;\n if (isSingleString) {\n if (ambigDateOfMonthRegex.test(input)) {\n // accept strings like '2014-05', but convert to the first of the month\n input += '-01';\n args = [input]; // for when we pass it on to moment's constructor\n isAmbigTime = true;\n isAmbigZone = true;\n }\n else if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n isAmbigTime = !ambigMatch[5]; // no time part?\n isAmbigZone = true;\n }\n }\n else if ($.isArray(input)) {\n // arrays have no timezone information, so assume ambiguous zone\n isAmbigZone = true;\n }\n // otherwise, probably a string with a format\n if (parseAsUTC || isAmbigTime) {\n mom = moment.utc.apply(moment, args);\n }\n else {\n mom = moment.apply(null, args);\n }\n if (isAmbigTime) {\n mom._ambigTime = true;\n mom._ambigZone = true; // ambiguous time always means ambiguous zone\n }\n else if (parseZone) {\n if (isAmbigZone) {\n mom._ambigZone = true;\n }\n else if (isSingleString) {\n mom.utcOffset(input); // if not a valid zone, will assign UTC\n }\n }\n }\n mom._fullCalendar = true; // flag for extended functionality\n return mom;\n}", "title": "" }, { "docid": "d69787f0d3678f576cce6988a842b9cc", "score": "0.6329096", "text": "function makeMoment(args, parseAsUTC, parseZone) {\n if (parseAsUTC === void 0) { parseAsUTC = false; }\n if (parseZone === void 0) { parseZone = false; }\n var input = args[0];\n var isSingleString = args.length === 1 && typeof input === 'string';\n var isAmbigTime;\n var isAmbigZone;\n var ambigMatch;\n var mom;\n if (moment.isMoment(input) || util_1.isNativeDate(input) || input === undefined) {\n mom = moment.apply(null, args);\n }\n else {\n isAmbigTime = false;\n isAmbigZone = false;\n if (isSingleString) {\n if (ambigDateOfMonthRegex.test(input)) {\n // accept strings like '2014-05', but convert to the first of the month\n input += '-01';\n args = [input]; // for when we pass it on to moment's constructor\n isAmbigTime = true;\n isAmbigZone = true;\n }\n else if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n isAmbigTime = !ambigMatch[5]; // no time part?\n isAmbigZone = true;\n }\n }\n else if ($.isArray(input)) {\n // arrays have no timezone information, so assume ambiguous zone\n isAmbigZone = true;\n }\n // otherwise, probably a string with a format\n if (parseAsUTC || isAmbigTime) {\n mom = moment.utc.apply(moment, args);\n }\n else {\n mom = moment.apply(null, args);\n }\n if (isAmbigTime) {\n mom._ambigTime = true;\n mom._ambigZone = true; // ambiguous time always means ambiguous zone\n }\n else if (parseZone) {\n if (isAmbigZone) {\n mom._ambigZone = true;\n }\n else if (isSingleString) {\n mom.utcOffset(input); // if not a valid zone, will assign UTC\n }\n }\n }\n mom._fullCalendar = true; // flag for extended functionality\n return mom;\n}", "title": "" }, { "docid": "d69787f0d3678f576cce6988a842b9cc", "score": "0.6329096", "text": "function makeMoment(args, parseAsUTC, parseZone) {\n if (parseAsUTC === void 0) { parseAsUTC = false; }\n if (parseZone === void 0) { parseZone = false; }\n var input = args[0];\n var isSingleString = args.length === 1 && typeof input === 'string';\n var isAmbigTime;\n var isAmbigZone;\n var ambigMatch;\n var mom;\n if (moment.isMoment(input) || util_1.isNativeDate(input) || input === undefined) {\n mom = moment.apply(null, args);\n }\n else {\n isAmbigTime = false;\n isAmbigZone = false;\n if (isSingleString) {\n if (ambigDateOfMonthRegex.test(input)) {\n // accept strings like '2014-05', but convert to the first of the month\n input += '-01';\n args = [input]; // for when we pass it on to moment's constructor\n isAmbigTime = true;\n isAmbigZone = true;\n }\n else if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n isAmbigTime = !ambigMatch[5]; // no time part?\n isAmbigZone = true;\n }\n }\n else if ($.isArray(input)) {\n // arrays have no timezone information, so assume ambiguous zone\n isAmbigZone = true;\n }\n // otherwise, probably a string with a format\n if (parseAsUTC || isAmbigTime) {\n mom = moment.utc.apply(moment, args);\n }\n else {\n mom = moment.apply(null, args);\n }\n if (isAmbigTime) {\n mom._ambigTime = true;\n mom._ambigZone = true; // ambiguous time always means ambiguous zone\n }\n else if (parseZone) {\n if (isAmbigZone) {\n mom._ambigZone = true;\n }\n else if (isSingleString) {\n mom.utcOffset(input); // if not a valid zone, will assign UTC\n }\n }\n }\n mom._fullCalendar = true; // flag for extended functionality\n return mom;\n}", "title": "" }, { "docid": "d69787f0d3678f576cce6988a842b9cc", "score": "0.6329096", "text": "function makeMoment(args, parseAsUTC, parseZone) {\n if (parseAsUTC === void 0) { parseAsUTC = false; }\n if (parseZone === void 0) { parseZone = false; }\n var input = args[0];\n var isSingleString = args.length === 1 && typeof input === 'string';\n var isAmbigTime;\n var isAmbigZone;\n var ambigMatch;\n var mom;\n if (moment.isMoment(input) || util_1.isNativeDate(input) || input === undefined) {\n mom = moment.apply(null, args);\n }\n else {\n isAmbigTime = false;\n isAmbigZone = false;\n if (isSingleString) {\n if (ambigDateOfMonthRegex.test(input)) {\n // accept strings like '2014-05', but convert to the first of the month\n input += '-01';\n args = [input]; // for when we pass it on to moment's constructor\n isAmbigTime = true;\n isAmbigZone = true;\n }\n else if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\n isAmbigTime = !ambigMatch[5]; // no time part?\n isAmbigZone = true;\n }\n }\n else if ($.isArray(input)) {\n // arrays have no timezone information, so assume ambiguous zone\n isAmbigZone = true;\n }\n // otherwise, probably a string with a format\n if (parseAsUTC || isAmbigTime) {\n mom = moment.utc.apply(moment, args);\n }\n else {\n mom = moment.apply(null, args);\n }\n if (isAmbigTime) {\n mom._ambigTime = true;\n mom._ambigZone = true; // ambiguous time always means ambiguous zone\n }\n else if (parseZone) {\n if (isAmbigZone) {\n mom._ambigZone = true;\n }\n else if (isSingleString) {\n mom.utcOffset(input); // if not a valid zone, will assign UTC\n }\n }\n }\n mom._fullCalendar = true; // flag for extended functionality\n return mom;\n}", "title": "" }, { "docid": "0a1b3ad5665bd807eb9faf1b025b1181", "score": "0.6322999", "text": "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "title": "" }, { "docid": "0a1b3ad5665bd807eb9faf1b025b1181", "score": "0.6322999", "text": "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "title": "" }, { "docid": "0a1b3ad5665bd807eb9faf1b025b1181", "score": "0.6322999", "text": "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "title": "" }, { "docid": "0a1b3ad5665bd807eb9faf1b025b1181", "score": "0.6322999", "text": "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "title": "" }, { "docid": "0a1b3ad5665bd807eb9faf1b025b1181", "score": "0.6322999", "text": "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "title": "" }, { "docid": "0a1b3ad5665bd807eb9faf1b025b1181", "score": "0.6322999", "text": "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "title": "" }, { "docid": "0a1b3ad5665bd807eb9faf1b025b1181", "score": "0.6322999", "text": "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "title": "" }, { "docid": "0a1b3ad5665bd807eb9faf1b025b1181", "score": "0.6322999", "text": "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "title": "" }, { "docid": "0a1b3ad5665bd807eb9faf1b025b1181", "score": "0.6322999", "text": "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "title": "" }, { "docid": "0a1b3ad5665bd807eb9faf1b025b1181", "score": "0.6322999", "text": "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "title": "" }, { "docid": "0a1b3ad5665bd807eb9faf1b025b1181", "score": "0.6322999", "text": "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "title": "" }, { "docid": "0a1b3ad5665bd807eb9faf1b025b1181", "score": "0.6322999", "text": "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "title": "" }, { "docid": "0a1b3ad5665bd807eb9faf1b025b1181", "score": "0.6322999", "text": "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "title": "" }, { "docid": "0a1b3ad5665bd807eb9faf1b025b1181", "score": "0.6322999", "text": "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "title": "" }, { "docid": "0a1b3ad5665bd807eb9faf1b025b1181", "score": "0.6322999", "text": "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "title": "" }, { "docid": "0a1b3ad5665bd807eb9faf1b025b1181", "score": "0.6322999", "text": "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "title": "" }, { "docid": "0a1b3ad5665bd807eb9faf1b025b1181", "score": "0.6322999", "text": "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "title": "" }, { "docid": "0a1b3ad5665bd807eb9faf1b025b1181", "score": "0.6322999", "text": "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "title": "" }, { "docid": "0a1b3ad5665bd807eb9faf1b025b1181", "score": "0.6322999", "text": "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "title": "" }, { "docid": "0a1b3ad5665bd807eb9faf1b025b1181", "score": "0.6322999", "text": "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "title": "" }, { "docid": "0a1b3ad5665bd807eb9faf1b025b1181", "score": "0.6322999", "text": "function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }", "title": "" } ]
4e509e5fdb7a34ee242654eb34b354c8
get description for school from text table
[ { "docid": "1378d12734450cca694ed09bf2579e19", "score": "0.0", "text": "getSchoolDesc({}, lang) {\n if (lang === undefined) {\n lang = \"PL\"\n }\n return axios({\n method: 'GET',\n url: `SchoolDesc?$filter=Language eq '${lang}'`,\n headers: {\n \"Content-type\": \"application/x-www-form-urlencoded; charset=utf-8\"\n }\n })\n }", "title": "" } ]
[ { "docid": "46b6a186f901be1a2d9d4964a32737a5", "score": "0.57870185", "text": "getDescriptionFromPage(page) {\r\n\t\tlet descriptionLabelIndex = page.indexOf(\"<td class=\\\"vndesc\\\"\");\r\n\t\tif(descriptionLabelIndex > -1) {\r\n\t\t\tlet elementWithDesc = page.substring(descriptionLabelIndex, page.length);\r\n\t\t\tlet description = elementWithDesc.substring(elementWithDesc.indexOf(\"<p>\") + 3, elementWithDesc.indexOf(\"</p>\"));\r\n\t\t\t\r\n\t\t\tif(description == \"-\") {\r\n\t\t\t\treturn \"Description unavailable.\";\r\n\t\t\t} else {\r\n\t\t\t\treturn description;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\treturn \"Description unavailable.\";\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "1191c7a59eb1b131a9ac2d686d29d8e1", "score": "0.5653182", "text": "function getRecord(school) {\n const records = isMen ? mensRecords : womensRecords;\n return `${records[school].wins}-${records[school].losses}`;\n}", "title": "" }, { "docid": "66e88ec5bf7bc759d7266be16d115761", "score": "0.55229664", "text": "function get_text(d) {\n if (showHumanReadable) {\n if (d.doc['prov:type'] === undefined) {\n if (d.prov_type === undefined)\n var t = d.concept;\n else\n var t = 'prov:' + d.prov_type.charAt(0).toUpperCase() + d.prov_type.slice(1);\n }else {\n if (d.doc['prov:type']['$'] === undefined) var t = d.doc['prov:type'];\n else var t = d.doc['prov:type']['$'];\n }\n if (d.prov_type == \"agent\") {\n if (t == \"prov:SoftwareAgent\")\n return '(prov:SoftwareAgent) ' + d.doc['hysds:host'] + '/' + d.doc['hysds:pid'];\n else if (t === undefined) t = 'prov:Agent'\n }\n if (d.type == \"e2e_related\" || d.type == \"a2e_related\" || d.type == \"associated\" \n || d.type == \"delegated\" || d.type == \"used\" || d.type == \"wasGeneratedBy\" ) var label = \"\";\n else {\n var label = d.doc['prov:label'] !== undefined ? d.doc['prov:label'] :\n d.doc['dcterms:title'] !== undefined ? d.doc['dcterms:title'] : d.id;\n }\n return '(' + t + ') ' + label;\n }else\n return d.id;\n}", "title": "" }, { "docid": "84fba227bd555327735c6e9a08b52640", "score": "0.5498885", "text": "function loadDesc() {\n let desc = this.nextSibling.nextSibling;\n let cTitle = this.previousSibling.previousSibling;\n if(desc.style.color != \"black\") {\n if(cTitle.innerHTML == \"INFO 343\") {\n desc.innerHTML = \"Introduction to client-side web development including markup, programming, protocols, libraries, frameworks, and techniques for creating effective, usable, dynamic, and responsive applications that meet user needs. Includes an introduction to web development roles within organizations, content management systems, and other tools to build and manage websites and applications.\";\n } else if(cTitle.innerHTML == \"INFO 340\") {\n desc.innerHTML = \"Introduction to relational database management systems, focused on relational theory and the application of conceptual, logical, and physical database modeling. Key topics include the relational model, SQL, entity-relationship modeling, three-tier architectures, implementation of database applications, and related topics in information systems.\";\n } else if(cTitle.innerHTML == \"CSE 154\") {\n desc.innerHTML = \"Covers languages, tools, and techniques for developing interactive and dynamic web pages. Topics include page styling, design, and layout; client and server side scripting; web security; and interacting with data sources such as databases.\";\n } else if(cTitle.innerHTML == \"CSE 373\") {\n desc.innerHTML = \"Fundamental algorithms and data structures for implementation. Techniques for solving problems by programming. Linked lists, stacks, queues, directed graphs. Trees: representations, traversals. Searching (hashing, binary search trees, multiway trees). Garbage collection, memory management. Internal and external sorting.\";\n } else if(cTitle.innerHTML == \"CSE 142\") {\n desc.innerHTML = \"Basic programming-in-the-small abilities and concepts including procedural programming (methods, parameters, return, values), basic control structures (sequence, if/else, for loop, while loop), file processing, arrays, and an introduction to defining objects.\";\n } else if(cTitle.innerHTML == \"CSE 143\") {\n desc.innerHTML = \"Concepts of data abstraction and encapsulation including stacks, queues, linked lists, binary trees, recursion, instruction to complexity and use of predefined collection classes.\";\n } else if(cTitle.innerHTML == \"INFO 201\") {\n desc.innerHTML = \"Introduces fundamental tools and technologies necessary to transform data into knowledge. Covers the full information lifecycle, including the collection, storage, analysis and visualization of data. Core competencies underlying this process, including functional programming, use of databases, data wrangling, version control, and command line proficiency, are acquired through real-world data-driven challenges.\";\n }\n desc.style.color = \"black\";\n } else {\n desc.innerHTML = \"Click above for description\";\n desc.style.color = \"grey\";\n }\n }", "title": "" }, { "docid": "c6823371939db1bc4ea852f8cae1dc48", "score": "0.54861295", "text": "static getSchool() { return \"NMCT in HOWEST\"; }", "title": "" }, { "docid": "8426841e478c6fca09dc35e7174572c4", "score": "0.5462868", "text": "function extractDescription (d) {\n if (!d) return;\n if (d === \"ERROR: No README data found!\") return;\n // the first block of text before the first heading\n // that isn't the first line heading\n d = d.trim().split('\\n')\n for (var s = 0; d[s] && d[s].trim().match(/^(#|$)/); s ++);\n var l = d.length\n for (var e = s + 1; e < l && d[e].trim(); e ++);\n return d.slice(s, e).join(' ').trim()\n}", "title": "" }, { "docid": "8426841e478c6fca09dc35e7174572c4", "score": "0.5462868", "text": "function extractDescription (d) {\n if (!d) return;\n if (d === \"ERROR: No README data found!\") return;\n // the first block of text before the first heading\n // that isn't the first line heading\n d = d.trim().split('\\n')\n for (var s = 0; d[s] && d[s].trim().match(/^(#|$)/); s ++);\n var l = d.length\n for (var e = s + 1; e < l && d[e].trim(); e ++);\n return d.slice(s, e).join(' ').trim()\n}", "title": "" }, { "docid": "82e3c7a83f8889906b3d7f2bb571bbfc", "score": "0.5415246", "text": "function teacherAsTable(res) {\n let str;\n\n str = \"+-----------+---------------------+-----------+----------+-----------+------------+\\n\";\n str += \"| Akronym | Namn | Avdelning | Lön | Kompetens | Född |\\n\";\n str += \"|-----------|---------------------|-----------|----------|-----------|------------|\\n\";\n for (const row of res) {\n str += \"| \";\n str += row.akronym.padEnd(10);\n str += \"| \";\n str += (row.fornamn + \" \" + row.efternamn).padEnd(20);\n str += \"| \";\n str += row.avdelning.padEnd(10);\n str += \"| \";\n str += row.lon.toString().padStart(9);\n str += \"| \";\n str += row.kompetens.toString().padStart(10);\n str += \"| \";\n str += row.fodd.toString().padStart(8);\n str += \" |\\n\";\n }\n str += \"+-----------+---------------------+-----------+----------+-----------+------------+\\n\";\n\n return str;\n}", "title": "" }, { "docid": "322847982f2ce43361d27afaac412160", "score": "0.5383876", "text": "function pertDescrIname(meta_obj) {\n\tif (meta_obj.pert_iname !== \"NA\") {\n\t\treturn meta_obj.pert_iname;\n\t} else {\n\t\treturn meta_obj.pert_desc;\n\t}\n}", "title": "" }, { "docid": "991a9abea50b5a8dfc4471a81f332fa8", "score": "0.5377155", "text": "function getSchoolTranslation(school) {\n\n return SpellListService.getSpellSchoolTranslation(school);\n }", "title": "" }, { "docid": "6b61f4bb113311ab2e7abb676a93b74e", "score": "0.53233975", "text": "function splitSchool(school) {\n\t// Get the school of the spell\n\t// Remove ';' and ' ' and text in parentheses and brackets.\n\tschoolJSON = {\"school\": school.replace(/;|\\(.*\\)|\\[.*\\]| /g,'') };\n\t\n\tif (school.match(\"\\( | \\)| \\[ | \\]\")) {\n\t\t// Retrieve the subschool\n\t\tvar subschool = splitContainer(school, '(', ')', '');\n\t\t// Retrieve the descriptor\n\t\tvar descriptor = splitContainer(school, '[', ']', '');\n\t\t// Merge the final result\n\t\tschoolJSON = JSONConcat(schoolJSON, [\n\t\t\t{\"subschool\": subschool}, \n\t\t\t{\"descriptor\": descriptor}\n\t\t]);\n\t}\n\treturn schoolJSON;\n}", "title": "" }, { "docid": "eeb3e7ae79dbbda99421a0fa83e41004", "score": "0.52956873", "text": "function extractDescInfo(textChunks) {\n let endPos = 0\n for (let i = 1; i < textChunks.length; i++) {\n const isDeliminator = COLON_DELIMITER_REGEX.test(extractText(textChunks[i]))\n\n if (isDeliminator && isSubTitleStyle(textChunks[i])) {\n const shouldOmit = shouldOmitSubtitle(extractText(textChunks[i]))\n\n if (shouldOmit) continue\n\n endPos = i - 1\n\n break\n }\n }\n\n // Now we can compose content for description.\n const descChunks = textChunks.slice(1, endPos)\n const content = composeContentFromTextChunks(descChunks)\n\n return {\n rel_end_pod: endPos,\n content,\n }\n}", "title": "" }, { "docid": "3705fe0e6f672557c09c983d2af333e9", "score": "0.5277909", "text": "_describe() {\n let here = this.lookText ? `${this.lookText}\\n` : '';\n if (this.doors.length) {\n here += '*doors*:\\n';\n for (const doorID of this.doors) {\n const door = this.entityManager.get(doorID);\n here += ` ${door.describe()}\\n`;\n }\n }\n if (this.inventory) {\n here += this.inventory.describe();\n }\n if (this.dialogue.isBattle()) {\n here += this.dialogue.describeBattle();\n }\n return here || strings.nothingHere;\n }", "title": "" }, { "docid": "f5fd010a76386b4489cfd844c93f9bea", "score": "0.5249663", "text": "async function getDesc(term) // Ben\n{\n let response;\n term = term.toLowerCase();\n\n const params = {\n TableName: termTable,\n Key: {\n LowerName: term\n },\n AttributesToGet: [\n \"Desc\"\n ]\n };\n\n // Try-catch block to make sure database function works correctly.\n try {\n let result = await db.get(params).promise();\n\n // Check to see if the result is just an 'empty set', which means we got nothing back\n if (JSON.stringify(result) != \"{}\")\n {\n // Found the term\n response = result.Item.Desc;\n } else {\n // Found nothing\n response = null;\n }\n } catch (error) {\n // There was an error\n console.error(\"There was an error: \", error);\n response = -1;\n }\n\n return response;\n}", "title": "" }, { "docid": "6fe1214ba23b4fd1205f2ca4dbbb1b5a", "score": "0.5237651", "text": "function textSnippet(books){\n if(books.searchInfo){\n return books.searchInfo.textSnippet\n } else {\n return 'No description for this book in this API'\n }\n}", "title": "" }, { "docid": "313a6c1f8d44525146bf7c43234da939", "score": "0.5229246", "text": "function getStudiedAt(fbdata) {\n var ret = '';\n\n if (fbdata.education && fbdata.education.length > 0) {\n var university = fbdata.education.filter(function(d) {\n var e = false;\n if (d.school.type === 'College') {\n e = true;\n }\n return e;\n });\n\n if (university.length > 0) {\n ret = university[0].school.name;\n }\n else {\n ret = fbdata.education[0].school.name;\n }\n }\n\n return ret;\n }", "title": "" }, { "docid": "07efd19bbcaca81e7c594c64a411229b", "score": "0.52132195", "text": "function display_course_info(course_id, course_title) {\n let desc = document.getElementById(\"desc\");\n\n // Clear out old description\n desc.innerHTML = \"\";\n\n let title = document.createElement(\"div\");\n title.classList.add(\"course_title\");\n desc.appendChild(title);\n\n let title_link = document.createElement(\"a\");\n title_link.innerText = course_title;\n title_link.href = course_page_url(course_id);\n title_link.target = course_id;\n title.appendChild(title_link);\n\n let course_info = merge_course_info(course_id);\n if (course_info == undefined) { // No info available\n desc.appendChild(document.createTextNode(\"No info available...\"));\n return;\n }\n\n let profs = document.createElement(\"div\");\n profs.classList.add(\"professors\");\n desc.appendChild(profs);\n\n for (let [prof_name, prof_url] of course_info[\"professors\"]) {\n let prof_link = document.createElement(\"a\");\n prof_link.setAttribute(\"href\", prof_url);\n prof_link.setAttribute(\"target\", prof_name);\n prof_link.innerText = prof_name;\n profs.appendChild(prof_link);\n profs.appendChild(document.createTextNode(\" \"));\n }\n\n // Add standard info to the description\n for (\n let info_piece of [\n \"distributions\",\n \"prereqs\",\n \"description\",\n ]\n ) {\n let piece = document.createElement(\"div\");\n piece.classList.add(info_piece);\n if (course_info.hasOwnProperty(info_piece)) {\n piece.innerText = course_info[info_piece];\n } else {\n piece.innerText = \"Unknown \" + info_piece;\n }\n desc.appendChild(piece);\n }\n\n // Add any notes and extra info\n /* TODO: This if we're getting accurate data...\n if (course_info.notes || course_info.extra_info) {\n let note_pieces = [];\n if (course_info.notes) {\n note_pieces.push(course_info.notes);\n }\n note_pieces = note_pieces.concat(course_info.extra_info);\n let notes = document.createElement(\"div\");\n notes.classList.add(\"notes\");\n notes.innerHTML = note_pieces.join(\"<br>\\n\");\n desc.appendChild(notes);\n }\n */\n}", "title": "" }, { "docid": "52583248612509708bc43c946455ad29", "score": "0.52095187", "text": "function p(at){ return $('#_'+at).text() } //entire description", "title": "" }, { "docid": "7dcdd0d100e508d17a5319b73ba2aa7b", "score": "0.51973", "text": "function getNameDescription(name, desc) {\n var n = \"\";\n var d = \"\";\n if (name)\n n = andiUtility.normalizeOutput(name);\n if (desc) {\n d = andiUtility.normalizeOutput(desc);\n if (n === d) { //matchingTest\n d = \"\";\n } else {\n d = \" \" + d; //add space\n }\n\n }\n return n + d;\n }", "title": "" }, { "docid": "748d8ab45ce51bb1639cc50760ca5db6", "score": "0.5183664", "text": "function getDescription(temp) {\n for (var i = 0; i < descriptions.length; i++) {\n if (temp >= descriptions[i].min) {\n return descriptions[i].text;\n }\n }\n }", "title": "" }, { "docid": "310fa9d2c8c7a6a4b41dff83cb9fcda7", "score": "0.5182153", "text": "function getDescription(data) {\n indicator = _.find(indicatorDescWithoutHeader, item => item.id === data.indicatorId);\n return indicator.desc\n}", "title": "" }, { "docid": "bb0c33cbe54025c7aff4d0612b8c34a3", "score": "0.517546", "text": "function Description() {\n //Public Functions\n this.writeDescription = function (ctx, text) {\n drawDescription(ctx, text,\n config.text_position.x + 20, config.text_position.y + 40,\n config.text_position.width - 40, config.text_position.height - 40);\n }\n\n //Private Functions\n function drawDescription(ctx, text, x, y, width, height) {\n if (text) {\n ctx.textAlign = \"left\";\n ctx.font = config.fonts.description_size + ' ' + config.fonts.description;\n ctx.fillStyle = \"#000\";\n wrapText(ctx, text, x, y, width, 36);\n }\n }\n\n function wrapText(context, text, x, y, maxWidth, lineHeight) {\n var words = text.split(' ');\n var line = '';\n for (var n = 0; n < words.length; n++) {\n var testLine = line + words[n] + ' ';\n var metrics = context.measureText(testLine);\n var testWidth = metrics.width;\n if (testWidth > maxWidth && n > 0) {\n context.fillText(line, x, y);\n line = words[n] + ' ';\n y += lineHeight;\n }\n else {\n line = testLine;\n }\n }\n context.fillText(line, x, y);\n }\n}", "title": "" }, { "docid": "7848b630ed79e24826e6619fbd8d7668", "score": "0.5159288", "text": "function get_emp_descr(eeType){\n var eeData = get_emp_type_info(eeType)\n if (typeof eeData[\"eeTypePlr\"] != \"undefined\")\n return eeData[\"eeTypePlr\"];\n else\n return \"unknown(\" +eeType+ \")\";\n}", "title": "" }, { "docid": "6ef59df2fcf5815a936067edf37e16d9", "score": "0.5121883", "text": "function getSynopsisDescription(slideIndex) {\n\n\t\t\tvar entityDetails = $scope.entityDetails[$scope.picks.data[slideIndex].uri];\n\t\t\tif (angular.isDefined(entityDetails) &&\n\t\t\t\tangular.isDefined(entityDetails.data) &&\n\t\t\t\tangular.isDefined(entityDetails.data.description))\n\t\t\t{\n\t\t\t\treturn entityDetails.data.description;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn $scope.picks.data[slideIndex].short_description;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "61b2df5726a21c3c5deb688c71af0efa", "score": "0.5102006", "text": "getText() {\n // Take the array of text snippets and transform them into <p>'s\n return this.props.data.text.map((snippet, i) => {\n // Since we're returning an array of JSX elements, we should give them a key;\n // let's have that be i, the index of the snippet\n return <p key={ i }>{ snippet }</p>\n });\n }", "title": "" }, { "docid": "470ebbe94bf08fa6e42e3798274f017f", "score": "0.5097834", "text": "function _setup_row_for_detail_description_section(db) {\n\t\t\ttry {\n\t\t\t\tvar description_text = '';\n\t\t\t\t// job detail section\n\t\t\t\tvar rows = db.execute('SELECT * from my_' + _type + ' WHERE id=?', _selected_job_id);\n\t\t\t\tdescription_text = rows.fieldByName('description');\n\t\t\t\trows.close();\n\t\t\t\tif ((description_text != null) && (self.trim(description_text).length > 0)) {\n\t\t\t\t\tself.data[_section_no].headerView.children[1].title = 'Edit';\n\t\t\t\t\tvar row = Ti.UI.createTableViewRow({\n\t\t\t\t\t\tfilter_class : 'detail_description',\n\t\t\t\t\t\tclassName : 'detail_description',\n\t\t\t\t\t\theader : 'Description',\n\t\t\t\t\t\theight : 'auto',\n\t\t\t\t\t\thasChild : true\n\t\t\t\t\t});\n\t\t\t\t\tvar description_label = Ti.UI.createLabel({\n\t\t\t\t\t\tleft : 10,\n\t\t\t\t\t\ttop : 5,\n\t\t\t\t\t\tbottom : 5,\n\t\t\t\t\t\twidth : (self.is_ipad()) ? self.screen_width - 100 : self.screen_width - 40,\n\t\t\t\t\t\theight : 'auto',\n\t\t\t\t\t\ttext : description_text,\n\t\t\t\t\t\tfont : {\n\t\t\t\t\t\t\tfontSize : _header_view_font_size,\n\t\t\t\t\t\t\tfontWeight : 'bold'\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\trow.add(description_label);\n\t\t\t\t\tself.data[_section_no].add(row);\n\t\t\t\t}\n\t\t\t\t_section_no++;\n\t\t\t\t\n\t\t\t} catch (err) {\n\t\t\t\tself.process_simple_error_message(err, window_source + ' - _setup_row_for_detail_description_section');\n\t\t\t\treturn;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "9be22e528bc1ff186aa69b81b3627799", "score": "0.5091343", "text": "function getCourseType() {\r\n let heading = document.querySelector(\"div.container>div.row:nth-child(2)>h4\").textContent;\r\n let type = heading.substr(4, heading.length - 5).toLowerCase();\r\n return type;\r\n}", "title": "" }, { "docid": "b86599687ef4d2fb761703b474ed2c62", "score": "0.5085237", "text": "function school_info(school) {\n // Format the school's address.\n var address1 = (school.address1) ? school.address1+'<br/>' : \"\";\n var address2 = (school.address2) ? school.address2+'<br/>' : \"\";\n var city_state = (school.address1 || school.address1) ? school.city_state+'<br/>' : \"\";\n\n // Set up the school's information to display.\n var school_content = \n '<div class=\"scrollme\">'+ \n school.school_name+'<br/>'+\n address1+\n address2+\n city_state+\n school.phone+'<br/><br/>'+\n 'Principal: '+school.principal+'<br/><br/>'+ \n 'Grade Levels: '+school.grade_levels+'<br/>'+\n 'Enrollment: '+school.enrollment+\n '<br/><br/><hr>'+\n '<center>'+\n '<h4>2011/12 Arts Education Service Level</h4>'+\n '<img src=\"'+school.icon+'\"></center>'+\n '</div>';\n\n return school_content;\n}", "title": "" }, { "docid": "4e70dea47b56e0a16700b103fbcd8281", "score": "0.50836694", "text": "function getInfowindowFeaturedData(description) {\n let ret = \"\", schoolAddress, schoolUrl;\n let descriptionParts = description.split('<br>');\n if (descriptionParts.length > 0) {\n schoolAddress = getInfoFromInfowindow(descriptionParts, schools_and_map_filter_ajax_obj.strSchoolAddress, schools_and_map_filter_ajax_obj.strSchoolAddress);\n schoolUrl = getInfoFromInfowindow(descriptionParts, '<a', schools_and_map_filter_ajax_obj.strSchoolUrl);\n\n ret += wrapInHTML(schools_and_map_filter_ajax_obj.strSchoolAddress, schoolAddress);\n if (schoolUrl !== \"\") {\n schoolUrl = removeTrailingSlashFromURL(schoolUrl);\n ret += wrapInHTML(schools_and_map_filter_ajax_obj.strSchoolUrl, schoolUrl);\n }\n\n }\n return ret;\n }", "title": "" }, { "docid": "7b1c76f83604289d6827206cb7ee6d0c", "score": "0.50827485", "text": "function P_ResearchDescription() {\n this.Level = '';\n this.UC = 0;\n this.Update = '';\n}", "title": "" }, { "docid": "f5dfd466dc7a2f937620d125ab827aff", "score": "0.50797623", "text": "function getDescription(first, second) {\n var result = '';\n\tif (first == second) {\n\t\tresult = 'draw';\n\t} else {\n\t\tvar regex = new RegExp('(?=.*' + first + '.*)(?=.*' + second + '.*)','i');\n\t\tfor (var i = 0, len = descriptions.length; i < len; i++) {\n\t\t\tif(regex.test(descriptions[i])) {\n\t\t\t\tresult = descriptions[i];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\tcommentator.innerText = result;\n}", "title": "" }, { "docid": "5e693ecb4d5e4e2cd3deff9e7e6d0bdf", "score": "0.5070376", "text": "function getSftSummaryHtml(doc, sftDocName) {\n let summary = findDocumentText(doc, sftDocName ? sftDocName : \"sftPrediction\");\n if (summary) {\n let lines = summary.split(\"\\n\");\n let html = \"<h3>SFT Summary</h3>\\n\";\n for (let origLine of lines) {\n let line = origLine;\n if (line.startsWith(\"relationship \")) {\n line = line.replace(/^(relationship) /, \"<span class='sft-relationship'>$1</span> \");\n line = line.replace(/ (pe[0-9]+)/g, \" <span class='sft-person'>$1</span>\");\n }\n else if (line.startsWith(\"pe\")) {\n line = line.replace(/^(pe[0-9]*) /, \"<span class='sft-person'>$1</span> \")\n }\n line = line.replace(/ (_[^ ]*)/g, \" <span class='sft-tag'>$1</span>\");\n html += \"<p class='hanging-indent'>\" + line + \"</p>\";\n }\n return html;\n }\n return null;\n}", "title": "" }, { "docid": "7fa09ea4954db99389f728cd469f9a41", "score": "0.5066584", "text": "description() {\n return `“${this.title}”, ${this.ref} (${this.year})`;\n }", "title": "" }, { "docid": "a25d6ad4986f2cee2278d765040c347d", "score": "0.50402105", "text": "get description(){ // instead of directly accessing, use this function\r\n return this._description\r\n }", "title": "" }, { "docid": "d0447140435fc92bbd67a61aec6d6a25", "score": "0.5039863", "text": "getDescription(s) {\r\n return (\r\n <Card containerStyle={Styles.cardContainer}>\r\n <Card.Title style={Styles.inputSearch}>{s.name}</Card.Title>\r\n <Card.Divider />\r\n <Text style={Styles.textInfo}>\r\n <Text style={{fontWeight:'bold'}}>Responsable </Text> <Text style={Styles.textInfo}>{s.respo}{\"\\n\"}</Text>\r\n <Text style={{fontWeight:'bold'}}>Heure de début </Text> <Text style={Styles.textInfo}>{s.starthour}{\"\\n\"}</Text>\r\n <Text style={{fontWeight:'bold'}}>Heure de fin </Text> <Text style={Styles.textInfo}>{s.endhour}{\"\\n\"}</Text>\r\n <Text style={{fontWeight:'bold'}}>Mots-clés </Text>\r\n {\r\n s.keywords.map((l, i) => (\r\n <Text key={i} style={Styles.textInfo}>\r\n {\" \"}{l.name}{\" \"}\r\n </Text>\r\n ))\r\n }{\"\\n\"}\r\n </Text>\r\n <Card.Divider />\r\n <Text style={Styles.paragraph}> \r\n {s.resume}\r\n </Text>\r\n <Button\r\n buttonStyle={Styles.backButton}\r\n title='Back'\r\n titleStyle={Styles.inputSearch}\r\n onPress={this.buttonBackClickListener} />\r\n </Card>);\r\n }", "title": "" }, { "docid": "db8ff31de9d7530feb2158de679750f4", "score": "0.5038308", "text": "function cleanDescription(text) {\n\tif(text) {\n\t\treturn utilities.toTitleCase(text.substring(0, text.indexOf('\\n\\n ')));\n\t}\n\treturn 'No description.';\n}", "title": "" }, { "docid": "97ba1da84a5f35c769a0e3eda9a1b034", "score": "0.5025535", "text": "getDescription() {\n\t\treturn this.name + (this.description?\": \"+ this.extra + this.escapeString(this.description):\"\");\n\t}", "title": "" }, { "docid": "1af471cdbe52465fc773f7bd3519a9c6", "score": "0.5024984", "text": "function getDescriptionTooltip(template) {\n if (!template.description) return \"\";\n\n return bodyFont(template.description);\n}", "title": "" }, { "docid": "585c10732bd6076d948a8061b817f7be", "score": "0.5017617", "text": "function getEducation() {\n eduEl.innerHTML = '';\n fetch('http://studenter.miun.se/~maso1905/dt173g/rest/miun_courses/education.php')\n .then(response => response.json())\n .then(data => {\n data.forEach(edu => {\n eduEl.innerHTML +=\n ` \n <table id=\"edutable\">\n <tr>\n <td><h5>${edu.school}</h5></td>\n <td><h5>${edu.program}</h5></td>\n <td><h5>${edu.start}</h5></td>\n <td><h5>${edu.end}</h5></td>\n </tr>\n </table> \n `\n })\n })\n}", "title": "" }, { "docid": "7f277394416f5c76d8007611bd3c79b9", "score": "0.50141937", "text": "function createDescriptionString(values) {\n var counts = getFrequencyArray(values);\n\n var descriptions = [];\n for (var i = 0; i < counts.length; ++i) {\n if (counts[i] != 0) {\n descriptions.push((counts[i] * 100.0 / values.length).toFixed(0) + \"% of scores were \" + i + \"<br/>\");\n }\n }\n\n if (currentProblem.randomiseFilter['description']) {\n shuffle(descriptions);\n }\n\n var str = \"\";\n while (descriptions.length != 0) {\n str += descriptions.shift();\n }\n \n return str;\n\n}", "title": "" }, { "docid": "36006bf4ed02073c1749409653b29e4b", "score": "0.5008852", "text": "function receiveText(resultsArray){\r\n var title = resultsArray[0].split(\".\");\r\n var problem_number = parseInt(title[0]);\r\n var problem_name = title[1].trim();\r\n var problem_url = \"https://leetcode.com/problems/\" + problem_name.toLowerCase().replace(/\\s+/g, '-');\r\n console.log(problem_number);\r\n console.log(problem_name);\r\n console.log(problem_url);\r\n create_row(problem_number, problem_name, problem_url);\r\n alert(\"Create row for this problem !!\");\r\n}", "title": "" }, { "docid": "b9ee9c961d72a611feebad8f07b01b82", "score": "0.50070274", "text": "function tableOfContentsGeneration(data) {\nreturn data.map((item) => {\n return `\n* [${item}](#${item})\n\n`\n}).join(\" \");\n}", "title": "" }, { "docid": "c32ba880cfc09788fa91705be6c1e842", "score": "0.50026965", "text": "static async getSchool(school_name) {\n let result = await db.query(\n `SELECT school_name\n FROM companies\n WHERE handle = $1`,\n [school_name]\n )\n return result.rows[0];\n }", "title": "" }, { "docid": "4c3a9a6fdced808c0ae6789363dce2d9", "score": "0.5001617", "text": "function appendDescription(tooltip, data) {\n return data.datasets[1].data[tooltip[0].index].toUpperCase();\n}", "title": "" }, { "docid": "6d2475d0b630b862b8ad0740b8957b84", "score": "0.49916285", "text": "function getDescription(){\n\t\tvar str = \"Layout \" + layoutIndex + \" containing \" + furniture.length + \" pieces of furniture.\";\n\n\t\treturn str;\n\t}", "title": "" }, { "docid": "5c3c209f7f0eab0b0c46bc4c2c439c79", "score": "0.49909943", "text": "function descriptionMode(book) {\n // open the book and folder directories, then the \"description.txt\" file\n let fileContents = fs.readFileSync(\"books/\"+book+\"/description.txt\",\"utf8\");\n return fileContents.trim(\"\\n\").trim(\"\\r\");\n}", "title": "" }, { "docid": "b3d9aaa8075d0ef676e2cb171b77da97", "score": "0.4978637", "text": "getWeatherDescription(data) {\n var descriptionSet = new Set();\n data.forEach(item => {\n descriptionSet.add(item.weather[0].description);\n });\n return Array.from(descriptionSet).join(\" to \");\n }", "title": "" }, { "docid": "a70c262346b1a10ccbf0cbaedfa958ae", "score": "0.49769258", "text": "getText(result, blocksMap) {\n let text = [];\n let Ids = [];\n let confidences = [];\n if (Object.prototype.hasOwnProperty.call(result, 'Relationships')) {\n _.forEach(result.Relationships, (relationship) => {\n if (relationship.Type === 'CHILD') {\n _.forEach(relationship.Ids, (childId) => {\n let word = blocksMap[childId];\n if (word.BlockType === 'WORD') {\n text.push(word.Text);\n Ids.push(word.Id);\n confidences.push(word.Confidence);\n }\n if (word.BlockType === 'SELECTION_ELEMENT') {\n if (word.SelectionStatus === 'SELECTED') {\n text.push('X ');\n Ids.push(word.Id);\n confidences.push(word.Confidence);\n }\n }\n });\n }\n });\n }\n return { ids: Ids, Text: text, Confidences: confidences };\n }", "title": "" }, { "docid": "5391d99aad6e23683086534ee9296583", "score": "0.4973899", "text": "addDescription(score) {\n if ( Number(score) <= 49)\n return \"Minimal bike infrastructure.\";\n else if ( Number(score) <= 69)\n return \"Some bike infrastructure.\";\n else if ( Number(score) <= 89)\n return \"Biking is convenient for most trips.\";\n else if ( Number(score) <= 100)\n return \"Daily errands can be accomplished on a bike.\";\n else\n return \"Not yet decided.\";\n }", "title": "" }, { "docid": "6fbb9e5ff51be642a249dc9f8cb1ad82", "score": "0.49728838", "text": "function getHonorific(title, street) {\n return title + \"of \" + street;\n}", "title": "" }, { "docid": "baa4359b20e35ce70490971ac5b0bcb2", "score": "0.496424", "text": "function getTableOfContents(response) {\n //return string \n let contents = \"\"; \n\n //check to see if user entered value - if they did, add it to the table by adding to the string \n if(response.description !== \"\") {\n contents += \"\\n* [Description](#description)\"; \n }\n if(response.installation !== \"\") {\n contents += \"\\n* [Installation](#installation)\"; \n }\n if(response.usage !== \"\") {\n contents += \"\\n* [Usage](#usage)\"; \n }\n if(response.credits !== \"\") {\n contents += \"\\n* [Credits](#credits)\"; \n }\n if(response.license !== \"\") {\n contents += \"\\n* [License](#license)\"; \n }\n if(response.contributing !== \"\") {\n contents += \"\\n* [Contributing](#contributing)\"; \n }\n if(response.tests !== \"\") {\n contents += \"\\n* [Tests](#tests)\"; \n }\n if(response.questions !== \"\") {\n contents += \"\\n* [Questions](#questions)\"; \n }\n //return the entire string \n return contents; \n}", "title": "" }, { "docid": "898bfd630aebab5a4321399d8a7c80aa", "score": "0.49519438", "text": "function displayDescription(x) {\n document.getElementById(\"desc\").innerHTML = x.getElementsByTagName(\"description\")[0].innerHTML; \n }", "title": "" }, { "docid": "54cd1852b7e99135f0fbd8c911f2dcd6", "score": "0.49496293", "text": "function getCondDescription(clink){\n\t\t// Data retrieved from RDF_META table\n\t\tvar speedType=clink.SPEED_LIMIT_TYPE;\n\t\tvar dependendType=clink.DEPENDEND_SPEED_TYPE;\n\t\tvar description=\"\";\n\t\tswitch(speedType){\n\t\t\tcase \"1\" : description=\"Advisory\"; break;\n\t\t\tcase \"2\":\n\t\t\t\tswitch (dependendType){\n\t\t\t\t\tcase \"1\" : description=\"School\"; break;\n\t\t\t\t\tcase \"2\" : description=\"Rain\"; break;\n\t\t\t\t\tcase \"3\" : description=\"Snow\"; break;\n\t\t\t\t\tcase \"4\" : description=\"Time-Dependednt\"; break;\n\t\t\t\t\tcase \"5\" : description=\"Approximate Seasonal Time\"; break;\n\t\t\t\t\tcase \"6\" : description=\"Lane Dependent\"; break;\n\t\t\t\t\tcase \"7\" : description=\"Fog\"; break;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"3\": description=\"Speed bumps present\"; break;\n\t\t}\n\t\treturn description;\n\t}", "title": "" }, { "docid": "2a4ad7d30910fc09c4c4cbcc522a300a", "score": "0.49483705", "text": "function FindLineDesc(sLine)\r\n{\r\n\t//FIX FIX FIX\r\n\tvar sLineDesc = \"\";\r\n\tvar iBeg = sLine.search(/\\[\\[desc .*\\]\\]/); //find line Desc\r\n\tvar iEnd = sLine.search(/\\]\\]/);\r\n\tif (iBeg > 0) {\r\n\t\tvar sLineDesc = sLine.substring(iBeg+7, iEnd);\r\n\t\tvar sLineNew = sLine.substring(0,iBeg);\r\n\t\tsLine = sLineNew;\r\n\t\talert(sLine);\r\n\t\talert(sLineNew);\r\n\t}\r\n\t\t\r\n\treturn sLineDesc;\r\n}", "title": "" }, { "docid": "e70a479cde87afcb7913b9c07ed9f15e", "score": "0.49446896", "text": "function tooltipTextConverter(node) {\n //var str = \"right\";\n //str += \"Born: \" + person.birthYear;\n //if (person.deathYear !== undefined) str += \"\\nDied: \" + person.deathYear;\n //if (person.reign !== undefined) str += \"\\nReign: \" + person.reign;\n return query_list[parseInt(node.key)];\n }", "title": "" }, { "docid": "62aab705c2e69959f2b72217a1146627", "score": "0.49443308", "text": "function extractData (text) {\n text = patt1.exec(text)[0]\n let parts = []\n let r = true\n while (r) {\n parts.push(r)\n r = patt2.exec(text)\n }\n parts.splice(0, 1)\n return parts.map(p => ({\n id: p[1],\n name: p[2],\n gender: p[3],\n university: p[4],\n major: p[5],\n elementary: p[6],\n junior: p[7]\n }))\n}", "title": "" }, { "docid": "b05dc341396560b8a559b0c4a1f3cab4", "score": "0.49424678", "text": "schedDetail(detail, ctr){\n\n return detail.split(\";\")[ctr];\n\n }", "title": "" }, { "docid": "b76657f7df0ccb7e85695e585815b6d2", "score": "0.49420258", "text": "get introtext(): string {\n if (this.contributions.texts) {\n const text = this.contributions.texts.find(\n (item) => item.type === \"master\"\n );\n\n if (text) {\n return text.text;\n }\n }\n\n return \"\";\n }", "title": "" }, { "docid": "83006073e2b05de79c393bc232a08175", "score": "0.49377775", "text": "sideDescription(bannerRow) {\n return this.editor.lineTextForBufferRow(bannerRow).match(/^[<|>]{7} (.*)$/)[1];\n }", "title": "" }, { "docid": "280264cdd2c71e70774e6078abadb3c9", "score": "0.4935868", "text": "applyDescription(description, id) {\r\n\t\t\r\n\t\tif (description == null || description.trim().length == 0)\r\n\t\t\tdescription = \"Description unavailable.\";\r\n\r\n\t\t//Parse Query Method Description\r\n\t\twhile(description.indexOf(\"\\n\") >= 0)\r\n\t\t\tdescription = description.replace(\"\\n\", \"<br />\");\r\n\r\n\t\twhile (description.indexOf(\"[\") >= 0) {\r\n\t\t\tvar TagPos = description.indexOf(\"[\");\r\n\t\t\tvar Begin = description.substr(0, TagPos);\r\n\t\t\tvar TagEndPos = description.indexOf(\"]\", TagPos) + 1;\r\n\t\t\tvar End = description.substr(TagEndPos);\r\n\t\t\tif (End.indexOf(\"]\") == 0)\r\n\t\t\t\tEnd = End.substr(1);\r\n\t\t\tdescription = Begin + End;\r\n\t\t}\r\n\r\n\r\n\t\tlet descriptionParts = description.indexOf(\"<br />\") > -1 ? description.split(\"<br />\") : description.split(\"<br>\"),\r\n\t\t\tlimit = descriptionParts.length > 5 ? 5 : descriptionParts.length;\r\n\t\t\r\n\t\tfor(var i = 0; i < limit; i++) {\r\n\t\t\tif(descriptionParts[i] == null || descriptionParts[i].length < 1 || (descriptionParts[i].indexOf(\"<\") > -1 && descriptionParts[i].indexOf(\">\") > -1)) {\r\n\t\t\t\t// Part contains HTML or is empty, skip it\r\n\t\t\t} else {\r\n\t\t\t\tlet paragraph = document.createElement(\"P\"),\r\n\t\t\t\t\tdesc = document.createTextNode(descriptionParts[i]);\r\n\t\t\t\t\r\n\t\t\t\tparagraph.appendChild(desc);\r\n\t\t\t\tdocument.getElementById(\"Vnext-tooltip-\" + id).getElementsByClassName(\"vnext-tooltip-description\")[0].appendChild(paragraph);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(limit < descriptionParts.length) {\r\n\t\t\tlet paragraph = document.createElement(\"P\"),\r\n\t\t\t\t\tdesc = document.createTextNode(\"[ Read more... ]\");\r\n\t\t\t\t\r\n\t\t\t\tparagraph.appendChild(desc);\r\n\t\t\t\tdocument.getElementById(\"Vnext-tooltip-\" + id).getElementsByClassName(\"vnext-tooltip-description\")[0].appendChild(paragraph);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "4f5c484bfe07a665858bbf03ad6b5d2e", "score": "0.4905444", "text": "_parseTableTextToBasisString(basisTextInTable) {\n const basisLines = basisTextInTable.split(\";\");\n return basisLines.join(\"\\n\");\n }", "title": "" }, { "docid": "a36c27c59612e990e497578121910d6e", "score": "0.4897925", "text": "function getCourseData(course) {\n const splitStr = course.split(\" \");\n const dept = splitStr[0].toLowerCase();\n const courseNum = splitStr[1];\n\n return [dept, courseNum];\n}", "title": "" }, { "docid": "357f70628f7e1055b21fd93007993cf3", "score": "0.48857552", "text": "function getDescription(folderName) {\n\t\tvar request = new XMLHttpRequest();\n\t\trequest.onload = displayDescription;\n\t\trequest.open(\"GET\",URL + \"bestreads.php?mode=description&title=\" + folderName, true);\n\t\trequest.send();\n\t}", "title": "" }, { "docid": "c881f82e271cca6731ae7fb9e45bf213", "score": "0.48763138", "text": "function explainerSection(vennIndex,n){\n \n //TOOD get Heading from data structure\n var heading='Heading';\n //TODO get description from data structure\n var desc='Lorem ipsum dolor sit amet, ius no movet epicuri temporibus, solum graeco albucius nec cu. Percipitur cotidieque mei in, eu sit illud augue tamquam. Quo complectitur comprehensam ut. Id ancillae inimicus complectitur per, vis partem postea in.';\n \n var explainer=`\n <div class=\"explainer\" \nstyle=\"\nwidth:25%;\nposition:absolute;\n\">\n <h3>`+heading+`</h3>\n <p>`+desc+`</p>\n </div>\n `;\n return explainer;\n}", "title": "" }, { "docid": "60156f6aa19d50dba60ebc54c371ae61", "score": "0.48760918", "text": "function format ( l ) {\n // `l' is the original data object for the row\n return '<table cellpadding=\"5\" cellspacing=\"0\" border=\"0\" style=\"padding-left:50px;\">'+\n '<tr>'+\n '<td><b>Description:</b><div class=\"well well-sm scroll-vert\">'+l.desc+'</div></td>'+\n '</tr>'+\n '</table>';\n}", "title": "" }, { "docid": "f932fff21c5d6cb9383fddb65cedf37c", "score": "0.48736024", "text": "function getCourses(html, res) {\n\tif (!html) {html = '';}\n\t\n\t// Split by year\n\tvar years = html.split(/<\\/a>Year /i), out = '';\n\tfor (var i = 1; i < years.length; i ++) {\n\t\tvar d = years[i].replace(/&#160;/g, ' ').replace(/&#8211;/g, '-');\n\t\t\t\n\t\t// Get the year\n\t\tout = out + '<th>Year ' + d.split('<', 2)[0] + '</th>\\n';\n\t\t\n\t\t// Get the text from the HTML\n\t\tvar txt = ('<' + d.slice(d.indexOf('<'))).replace(/<[^>]+>/g, '\\n');\n\t\ttxt = txt.replace(/\\n{2,}/g, '\\n');\n\n\t\t// Trim the string to only necessary content\n\t\tvar lines = txt.split('\\n'), n = lines.length, lastAdd = 0;\n\t\tvar exp = /(Elective|^or|^one of|^Semester|^[a-z]{3,4} [0-9]{4})/i;\n\t\ttxt = '';\n\t\tfor (var j = 0; j < n && (j - lastAdd) < 7; j ++) {\n\t\t\tif (exp.test(lines[j])) {\n\t\t\t\ttxt += lines[j] + '\\n';\n\t\t\t\tlastAdd = j;\n\t\t\t}\n\t\t}\n\t\ttxt = txt.replace(/(^\\n+|\\n+$)/g, '');\n\t\t\n\t\tout += txt + '\\n';\n\t}\n\t\n\t// Send the response to the client\n\tres.writeHead(200, {'Content-Type': 'text/plain'});\n\tres.write(out);\n\tres.end();\n}", "title": "" }, { "docid": "11333600b0401dba979f9728538040d1", "score": "0.48731333", "text": "function createDescription() {\n const words = [];\n let word = null;\n while (true) {\n const successors = bigrams.get(word);\n word = successors[Math.floor(successors.length * Math.random())];\n if (word === null) {\n break;\n }\n words.push(word);\n }\n return words.join(\" \");\n}", "title": "" }, { "docid": "acd0f63191050685235e015029c6d56f", "score": "0.4866662", "text": "function getText(index, numCols, cells) {\n var exampleText = {};\n\n exampleText.text = getCell(index, cells);\n exampleText.image = getCell(++index, cells);\n\n\n return exampleText;\n }", "title": "" }, { "docid": "0e4225cfbb015ac14e7ca9d07631eaed", "score": "0.48657298", "text": "@computed\n get workDescription() {\n const desc = this.desc || fallbackDesk\n if (this.energy) return desc.energy.workDescription\n return desc[this.type].workDescription\n }", "title": "" }, { "docid": "850974d3bb12e625aebcb8ded8c83e4a", "score": "0.48579586", "text": "function getDescription(master) {\n if (master != null && master.description != null) {\n return master.description;\n }\n return undefined;\n }", "title": "" }, { "docid": "423212c34b3aa2f0fae8bb80e31dfcc5", "score": "0.4853531", "text": "function getLookupText() {\n // Get a selected text.\n var selection = DocumentApp.getActiveDocument().getSelection();\n if (selection) {\n var text = [];\n var elements = selection.getSelectedElements();\n for (var i = 0; i < elements.length; i++) {\n if (elements[i].isPartial()) {\n var element = elements[i].getElement().asText();\n var startIndex = elements[i].getStartOffset();\n var endIndex = elements[i].getEndOffsetInclusive();\n\n text.push(element.getText().substring(startIndex, endIndex + 1));\n } else {\n var element = elements[i].getElement();\n // Only translate elements that can be edited as text; skip images and other non-text elements.\n if (element.editAsText) {\n var elementText = element.asText().getText();\n // This check is necessary to exclude images, which return a blank text element.\n if (elementText != '') {\n text.push(elementText);\n }\n }\n }\n }\n if (text.length > 0) {\n return text.join('\\n');\n }\n }\n // Or get a word under the cursor.\n var cursor = DocumentApp.getActiveDocument().getCursor();\n if (cursor) {\n return getWordAt(cursor.getSurroundingText().getText(), cursor.getSurroundingTextOffset());\n }\n return '';\n}", "title": "" }, { "docid": "f6ab8aeeaed5bb635adad1385cc9bbc1", "score": "0.48401934", "text": "function shortDescription() {\n\tconst metas = document.getElementsByTagName('meta');\n\tconst scripts = document.getElementsByTagName('script');\n\t// Check if description was protected\n\tfor (var i = 0; i < scripts.length; i++) {\n\t\tif (scripts[i].innerHTML.indexOf(\"key: 'ds:5', isError: false\") > 0) {\n\t\t\tvar scriptBlock = scripts[i].innerHTML.split(',[null,');\n\t\t\treturn scriptBlock[1].substring(1, scriptBlock[1].indexOf('\"]'));\n\t\t}\n\t}\n\t// Get description if was on metas\n\tfor (let i = 0; i < metas.length; i++) {\n\t\tif (metas[i].getAttribute('name') == 'description') {\n\t\t\treturn metas[i].getAttribute('content');\n\t\t}\n\t}\n}", "title": "" }, { "docid": "fa5d676e8aed11618417f1a2fc4ab65a", "score": "0.48383462", "text": "function descriptionTrustHtml(list) {\n return _.map(list, function(el) {\n\n if (el.description && el.description.length > 80) {\n el.description = el.description.substring(0, 80) + '...';\n }\n\n el.description = $sce.trustAsHtml(el.description);\n if (el.criteriaCompliancePercentage) el.criteriaCompliancePercentage = _.floor(el.criteriaCompliancePercentage, 2);\n return el;\n });\n }", "title": "" }, { "docid": "c4efdd85175aad60a00c1c356fc47e9f", "score": "0.48361814", "text": "function getAuthorTitle(){\r\n var char = '\\n';\r\n var i = j = 0;\r\n var count =0;\r\n while ((j = text.indexOf(char, i)) !== -1 && count<=1) {\r\n //if count is 0 then it is still on first line so this is assumed to be title\r\n if(count == 0){\r\n title = text.substring(i, j);\r\n }\r\n //if count =1 this is first line after title with text and is assumed to be author(s)\r\n if(count==1){\r\n author = text.substring(i, j).replace(/[0-9]/g, '');\r\n \r\n }\r\n //In testing some times after title they have some blank lines, so I only increase count if line is not empty line\r\n var newText = text.substring(i,j).replace(/^\\s+/, '').replace(/\\s+$/, '');\r\n if (newText !== '') {\r\n count++;\r\n }\r\n\r\n i = j + 1;\r\n\r\n }\r\n}", "title": "" }, { "docid": "d092087e436332d263207f55278a7212", "score": "0.48272666", "text": "function fixDescription(rsData) {\n let cleanData = rsData.map((data) => {\n if (data.description === undefined) { // if description is undefined, change description to P+R + cityname\n return {\n description: 'P+R ' + data.city,\n city: data.city,\n capacity: data.capacity\n }\n } else return { // if description is valid, return object as normal.\n description: data.description,\n city: data.city,\n capacity: data.capacity\n }\n });\n return cleanData;\n\n }", "title": "" }, { "docid": "24f2a75e47924128391cc75dfaa32861", "score": "0.4826166", "text": "getDescription() {\n //but methods from the parent class can still be accessed using super\n let description = super.getDescription();\n if (this.hasMajor()) {\n description += ` Their major is ${this.major}`\n }\n return description\n }", "title": "" }, { "docid": "ec423abec7dd08bbbc23d2911e5b97f4", "score": "0.48252574", "text": "get description(){\n return \"```\"\n + (this.mistakes > 0 ? \"|‾‾‾‾‾‾| \\n| \" : \" \")\n + (this.mistakes > 1 ? \" |\" : \" \")\n + \" \\n| \"\n + (this.mistakes > 2 ? \" O\" : \" \")\n + \" \\n| \"\n + (this.mistakes > 3 ? \"/|\\\\\" : \" \")\n + \" \\n| \"\n + (this.mistakes > 4 ? \"/ \\\\\" : \" \")\n + \" \\n| \\n|__________\"\n + (this.options.hint ? `\\n\\n${this.hint.join(' ')}` : '')\n + \"```\\n\"\n }", "title": "" }, { "docid": "b503efeda6a19900d1a0817aab798e39", "score": "0.48242593", "text": "getSchool() { return this.school }", "title": "" }, { "docid": "878b2531e1f7aef2a48aab811d0e9a4b", "score": "0.48235357", "text": "function GetItemExtraDetails(text, row) {\n if (typeof text[row + 1] !== 'undefined') {\n if (!text[row + 1].includes(\"Τροποποίηση Παραγγελίας\")) {\n if (isNumeric(text[row + 2])) {\n return {detailRows: 1, detailsText: text[row]};\n }\n }\n }\n if (typeof text[row + 1] === 'undefined' || text[row + 1].includes(\"Τροποποίηση Παραγγελίας\")) {\n if (typeof text[row] !== 'undefined' && !text[row].includes(\"Τροποποίηση Παραγγελίας\")) {\n return {detailRows: 1, detailsText: text[row]};\n }\n }\n //if efood adds an extra detail row so the user's extra details add a second one\n if (typeof text[row + 2] === 'undefined' || text[row + 2].includes(\"Τροποποίηση Παραγγελίας\")) {//last item\n return {detailRows: 2, detailsText: (text[row] + \" \" + text[row + 1])};\n }\n\n if (typeof text[row + 1] !== 'undefined' && text[row + 2] !== 'undefined' && text[row + 3] !== 'undefined' && text[row + 4] !== 'undefined') {//item between others\n if (isNumeric(text[row + 3]) && text[row + 4].includes(\"€\")) {\n return {detailRows: 2, detailsText: (text[row] + \" \" + text[row + 1])};\n }\n }\n //\n\n return {detailRows: 0, detailsText: \"\"};\n}", "title": "" }, { "docid": "bdb276152368bc5904bfe49077bd843f", "score": "0.48161596", "text": "function getCollegeData(url) {\n request((prefixURL + url), function(error, response, body) {\n if (!error && response.statusCode == 200) {\n let $ = cheerio.load(body);\n let collegeDataArr = [];\n $('table').last().find('tr td[colspan=\"3\"]').parent().nextUntil('tr[style=\"height:10px\"]').each(function(i, elem) {\n let temp = [];\n\n if (!($(this).html().includes('h3') || $(this).text() === '')) {\n temp.push($(this).children().first().text()); // SJSU classes\n\n // Formatting\n let collegeEquivalent = $(this).children().last().text();\n if (collegeEquivalent.includes('AND')) {\n collegeEquivalent = collegeEquivalent.replace('AND', 'AND ');\n } else if (collegeEquivalent.includes('OR')) {\n //console.log('true');\n collegeEquivalent = collegeEquivalent.replace('OR', 'OR ');\n }\n\n temp.push(collegeEquivalent);\n\n collegeDataArr.push(temp);\n }\n });\n //console.log(collegeDataArr);\n createIndividualCollegeTable(collegeDataArr);\n }\n\n });\n } // end getCollegeData(url)", "title": "" }, { "docid": "93f0d6e93d22d2fa28e58389d33e22a2", "score": "0.48121613", "text": "function description(){\r\n\t\tvar data = this.responseText;\r\n\t\tdocument.getElementById(\"description\").innerHTML = data;\r\n\t}", "title": "" }, { "docid": "15765c867af2b8683d2959a9d055747d", "score": "0.48073566", "text": "function showDesc(data, topicID, idx) {\n const text_box = document.querySelector('.hero__text-box');\n const { name, overview, structure, geology} = data[idx];\n\n text_box.innerHTML = '';\n\n const boxEl = document.createElement('div');\n\n let topic = overview;\n if (topicID === \"structure\") {\n topic = structure;\n } else if (topicID === \"geology\") {\n topic = geology;\n }\n\n boxEl.innerHTML = `\n <h1 class=\"hero__title\">${name === 'index' ? 'Mercury' : name}</h1>\n <p class=\"hero__desc\">${topic.content}</p>\n <p class=\"hero__source\">Source : <a class=\"hero__link\" href=\"${topic.source}\" target=\"_blank\" rel=\"noopener noreferrer\">Wikipedia <img class=\"hero__icon\" src=\"./assets/icon-source.svg\" alt=\"source\"></a></p>\n `\n text_box.appendChild(boxEl);\n}", "title": "" }, { "docid": "534685d00cd01d89df13cfc89ade0c2a", "score": "0.48057026", "text": "toString(){\n\t\tvar results = this.description + \"\\n----\\n\";\n\t\tfor(var i = 0; i < this.content.length; i++){\n\t\t\tresults+=this.content[i];\n\t\t}\t\t\t\n\t\treturn results;\n\t}", "title": "" }, { "docid": "936ff03296317ec2248acc6f0ff7de22", "score": "0.48050013", "text": "function determineChartDescription(fullSimType) {\n fullSimType = fullSimType.replaceAll(\"_\", \"-\");\n var descr = configData[\"sims\"][fullSimType][\"description\"];\n return descr;\n}", "title": "" }, { "docid": "7ca8c093a0e10aa5b7b4485a52d8108c", "score": "0.48018035", "text": "function fetchSkillDesc(type){\n \t gapi.client.sheets.spreadsheets.values.get({\n spreadsheetId: sheetId,\n majorDimension: \"ROWS\",\n range: 'Skills!A2:E',\n }).then(function(response) {\n \t skillDescriptions = response.result.values;\n \t \tupdateProgressBar(); //update progress bar\n \tfetchPlayerImageData(type);\n });\n }", "title": "" }, { "docid": "4939de565f45e004cf46ce4a276cce98", "score": "0.47984305", "text": "function getLabDetails(course_code, semester, callback) {\n // var DateTime = getCurrentDateAndTime()\n // var DateTime = '2008-12-19 16:00:00'\n var DateTime = '2020-01-23 15:40:00'\n\n var sql = \"SELECT LabCode, LabNum from labs where DateTime = '\" + DateTime + \"' and CourseCode = \" + course_code + \" and Semester = \" + semester + \";\"\n console.log('sql: ', sql)\n var query = db.query(sql, (err, result) => {\n // check result \n console.log('result: ', result)\n if (err)\n callback(err)\n if (result === undefined) {//if something went wrong while fetching\n console.log(\"return_lab_code- failed..\")\n callback('Failed')\n }\n if (result.length === 0)\n callback(-1)\n else {\n console.log('lab code: ', result)\n callback(result[0])\n }\n });\n}", "title": "" }, { "docid": "0182f893ea44eb38924e84e04a64babc", "score": "0.4795665", "text": "getDescription() {\n let description = super.getDescription(); //Super pour appeler la fn parent : ben is 40 year(s) old.\n\n if (this.hasMajor()) { //this.major retourne true ou false\n description += ` Their major is ${this.major}.`; //on joint les deux string\n }\n\n return description; //retourne le string : ben is 40 year(s) old. Their major is Dev.\n}", "title": "" }, { "docid": "313d252a7d863cae252bf75c727eb17b", "score": "0.4789317", "text": "function findSynopsis(arr) {\n\tfor (var i = 0; i < arr.length - 1; i++) {\n\t\tif (arr[i].volumeInfo.description) {\n\t\t\t// console.log(\"inside the function found: \", arr[i].volumeInfo.description);\n\t\t\treturn arr[i].volumeInfo.description;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "ebe9fdea52ef83403859300c854fbd84", "score": "0.4781352", "text": "function getDetails(t) {\n console.log('getDetails', t)\n // title content for mouseover\n\n var _dbotype = t.dbotype || \"\";\n var _group = t.group || \"\";\n var _name = t.name || \"\";\n var _label = t.label || _name;\n var _description = t.description || \"\";\n // var _startdate = t.startdate || \"\";\n // var _status = t.status || \"\";\n //var _colour = t.colour || \"\";\n var _color = t.color || \"\";\n var _id = t.id || \"\";\n\n var _preview = \"<h3>\" + _label + \"</h3>\" + \"\\n\\n<p>\" + _description + _color + \"</p>\\n\\n\";\n //console.log('_preview', _preview)\n return _preview\n }", "title": "" }, { "docid": "d702ccdb5e770f473edba9c9d2d8e12d", "score": "0.4777141", "text": "function getSchool(profile) {\n\t //get the education object from the profile\n\t var schools = profile._json.education;\n\t //create the education object\n\t var education = {};\n\t //check through all the schools\n\t if (schools != null) {\n\t\t for (var i = 0; i < schools.length; i++) {\n\t\t\t //if we stumble upon the user's college\n\t\t\t if (schools[i].type == \"College\") {\n\t\t\t\t//fill in the information, if its there\n\t\t\t\teducation.school = schools[i].school.name;\n\t\t\t\tif (schools[i].year !== undefined) {\n\t\t\t\t education.gradDate = schools[i].year.name;\n\t\t\t\t}\n\t\t\t\tif (schools[i].concentration !== undefined) {\n\t\t\t\t education.major = schools[i].concentration[0].name;\n\t\t\t\t}\n\t\t\t }\n\t\t }\n\t }\n\t return education;\n\t}", "title": "" }, { "docid": "5f4a0df7b3be783dfd56b3492ec720e1", "score": "0.47741404", "text": "function subtitel(datum, align) {\n let subtitel = \"\";\n\n let feiertag = isFeiertag(datum);\n let ferientag = isFerientag(datum);\n\n if (feiertag) {\n subtitel += feiertag.titel;\n }\n\n if (ferientag) {\n if (feiertag) subtitel += \" \";\n subtitel += \"(\" + ferientag.titel + \")\";\n }\n\n doc.fontSize(17).text(subtitel, {align});\n }", "title": "" }, { "docid": "ec65a15bfed0a76d13f865b0575afd2d", "score": "0.4772818", "text": "formatDetailText(detailTextArray){\n let detailText=\"\";\n if(detailTextArray[0]===\"None\"||detailTextArray[0][0]===\"~\"){\n detailText=\"Enjoy this amazing product!\"\n }else{\n for(let index in detailTextArray){\n if(detailTextArray[index]!==\"\"){\n let line = detailTextArray[index];\n line = line.trim();\n detailText += \"●\"+\" \"+line+'\\n';\n console.log(detailText)\n }\n }\n }\n return detailText\n }", "title": "" }, { "docid": "3ce6b579f453c8ee53b6530f27617006", "score": "0.4768452", "text": "function displayStudentInfo(colName, info, type) {\n\n var parent = document.getElementById(\"demographics\");\n var node = document.createElement(\"p\");\n var displayName = makeHeaderReadable(colName);\n //console.log(type);\n if (info == null) {\n var text = document.createTextNode(displayName + \": \");\n } else if ((type == \"varchar\") || (type == \"varchar(500)\")) {\n //console.log(\"var\");\n var text = document.createTextNode(displayName + \": \" + info);\n } else if (type == \"int\") {\n //console.log(\"int\");\n var text = document.createTextNode(displayName + \": \" + info.toString());\n } else if (type == \"date\") {\n //console.log(\"date\");\n var text = document.createTextNode(displayName + \": \" + makeDateReadable(info));\n } else if (type == \"boolean\") {\n //console.log(\"bool\");\n if (info) {\n var text = document.createTextNode(displayName + \": yes\");\n } else {\n var text = document.createTextNode(displayName + \": no\");\n }\n }\n node.appendChild(text);\n parent.appendChild(node);\n}", "title": "" }, { "docid": "11c4676519f09d896abb7482b4e70af4", "score": "0.47593504", "text": "function cutDescription(obj, i) {\n var initDescription = obj.collection.items[i].data[0].description;\n var finalDescription = \"No description found.\";\n if (initDescription != undefined) {\n if (initDescription.length > 300){\n finalDescription = initDescription.substr(0,300) + ' ...more';\n } else {\n finalDescription = initDescription;\n }\n }\n return finalDescription;\n\n}", "title": "" }, { "docid": "2c7be730d8622f1a108df81ec8c15b56", "score": "0.47567326", "text": "function fetchDescription(pageData){\n //fetch description\n pageData.descriptionLocation=extractURL(pageData[\"description\"]);\n var responseFunction=function(responseText,arrayArg){\n //after fetching description\n arrayArg.description=responseText;\n renderPageObject.addPageToList(arrayArg);\n }\n loadDoc(pageData[\"descriptionLocation\"],responseFunction,pageData)\n\n }", "title": "" }, { "docid": "521534f6005551194375ec8bdcc54584", "score": "0.47510082", "text": "getObjectDescription(id) {\n var searchId = id.trim();\n for (var i = 0; i < this.reportStructure.length; i++) {\n if (this.reportStructure[i][\"id\"] === searchId) {\n return this.reportStructure[i][\"description\"];\n }\n }\n this.banDoc.addMessage(\"Couldn't find object with id: \" + id);\n }", "title": "" }, { "docid": "521534f6005551194375ec8bdcc54584", "score": "0.47510082", "text": "getObjectDescription(id) {\n var searchId = id.trim();\n for (var i = 0; i < this.reportStructure.length; i++) {\n if (this.reportStructure[i][\"id\"] === searchId) {\n return this.reportStructure[i][\"description\"];\n }\n }\n this.banDoc.addMessage(\"Couldn't find object with id: \" + id);\n }", "title": "" }, { "docid": "3adc8e94ed69eab334b6f5998487c32a", "score": "0.47497398", "text": "getDescription() {\n\t return this.description;\n\t }", "title": "" }, { "docid": "6b1f9f591c50f62313b06141092fbc77", "score": "0.47471803", "text": "function getDateDescription2() {\n\tvar date = new Date();\n\tvar week = new Array(\"\\u661f\\u671f\\u65e5\", \"\\u661f\\u671f\\u4e00\", \"\\u661f\\u671f\\u4e8c\", \"\\u661f\\u671f\\u4e09\", \"\\u661f\\u671f\\u56db\", \"\\u661f\\u671f\\u4e94\", \"\\u661f\\u671f\\u516d\");\n\tvar time = date.getYear() + \"-\" + (date.getMonth() + 1) + \"-\" + date.getDate() + \" \" + week[date.getDay()];\n\treturn time;\n}", "title": "" }, { "docid": "e954d53d13ee76de99d6f5954a2f6ffb", "score": "0.47459483", "text": "function getTypeOfSchool(age) {\n if (age < 6) {\n return \"kindergarten\";\n } else if (age >= 6 && age < 11) {\n return \"elementary school\";\n } else if (age >= 11 && age < 15) {\n return \"junior high school\";\n } else if (age >= 15 && age < 18) {\n return \"high school\";\n }\n else {\n return \"after high school\";\n }\n}", "title": "" }, { "docid": "9b04f44999a9e5a816c94ef2be841574", "score": "0.4736081", "text": "function _generateSearchText() {\n resource_table.Activities.map(function(activity) {\n var search_text_arr = [];\n var keywords = [];\n // value.map(function(field) { \n Object.keys(activity).map(function(key) {\n if(Array.isArray(activity[key]))\n keywords = activity[key];\n else if(activity[key] !== null)\n keywords = activity[key].split(\", \");\n keywords.map(item => search_text_arr.push(item.toUpperCase()));\n });\n search_text.push(search_text_arr);\n });\n}", "title": "" } ]
364a00209e35f7c547cf0817cdfe2d63
Set the default headers and user properties.
[ { "docid": "21b23e602727831f0045a8a12a98472b", "score": "0.0", "text": "function processAuth() {\n\n // let the authProvider access the access token\n authToken = localStorage.token;\n\n if (localStorage.getItem('user') === null) {\n\n // Get the profile of the current user.\n GraphHelper.me().then(function(user) {\n \n // Save the user to localStorage.\n localStorage.setItem('user', angular.toJson(user));\n\n vm.displayName = user.displayName;\n vm.emailAddress = user.mail || user.userPrincipalName;\n });\n } else {\n let user = angular.fromJson(localStorage.user);\n \n vm.displayName = user.displayName;\n vm.emailAddress = user.mail || user.userPrincipalName;\n }\n\n }", "title": "" } ]
[ { "docid": "75cd064b13c3f2c0ebb144fb1bd535a1", "score": "0.710441", "text": "setHeaders() { }", "title": "" }, { "docid": "374977aa9ec617b0f75904fe47a5ef9c", "score": "0.6937154", "text": "setupHeaders() {\n //This here sets the Authorization: Bearer header and other constant headers needed by the\n // Application\n this.setHeaders(apiHeaders());\n for (const i in this._headers) {\n //If its a no auth request, then don't send authorization header\n if (this._headers[i][0] === \"Authorization\" && !this.useAuth) {\n continue;\n }\n this.http.defaults.headers.common[this._headers[i][0]] = this._headers[\n i\n ][1];\n }\n }", "title": "" }, { "docid": "aac2d0759f1a4ec3b622850a9a74792b", "score": "0.6874983", "text": "function setDefaults ({ headers={}, overrideHeaders=false, ...rest }) {\n return {\n ...DEFAULTS,\n headers: overrideHeaders ? headers : { ...DEFAULT_HEADERS, ...headers },\n ...rest,\n }\n}", "title": "" }, { "docid": "714c3f03388de35527cbadddb9af3e2c", "score": "0.64464515", "text": "set headers(val) {\n this.req.headers = val;\n }", "title": "" }, { "docid": "714c3f03388de35527cbadddb9af3e2c", "score": "0.64464515", "text": "set headers(val) {\n this.req.headers = val;\n }", "title": "" }, { "docid": "b6467927f48e2a43bc06d9871122099e", "score": "0.6347442", "text": "setAuthHeader() {\n window.axios.defaults.headers.common['Authorization'] = this.getAuthHeader().Authorization\n }", "title": "" }, { "docid": "a464e15bdd40ed51d3c570e7775d037d", "score": "0.6266065", "text": "addDefaultHeader(key, value) {\n this.defaultHeaders[key] = value;\n }", "title": "" }, { "docid": "9da520d4acbda2a70d6612cf59c34672", "score": "0.6098191", "text": "function setStandardHeaders(req, callerId) {\n req.setRequestHeader(\"Accept\", \"application/json\");\n req.setRequestHeader(\"Content-Type\", \"application/json; charset=utf-8\");\n req.setRequestHeader(\"OData-MaxVersion\", \"4.0\");\n req.setRequestHeader(\"OData-Version\", \"4.0\");\n if (callerId) {\n req.setRequestHeader(\"MSCRMCallerID\", callerId);\n }\n\n }", "title": "" }, { "docid": "2cb09843c491edb66f98ee36fa19085f", "score": "0.6065129", "text": "function setHeaders(http, kwArgs){\n\t\tif(kwArgs[\"headers\"]) {\n\t\t\tfor(var header in kwArgs[\"headers\"]) {\n\t\t\t\tif(header.toLowerCase() == \"content-type\" && !kwArgs[\"contentType\"]) {\n\t\t\t\t\tkwArgs[\"contentType\"] = kwArgs[\"headers\"][header];\n\t\t\t\t} else {\n\t\t\t\t\thttp.setRequestHeader(header, kwArgs[\"headers\"][header]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "027cbad65bca394ee1d714dc53dd9f4e", "score": "0.60400146", "text": "setExtraHTTPHeaders(params) {\n //\n }", "title": "" }, { "docid": "9f017f91c6cf39af911c3dd61b1a2aa3", "score": "0.6028835", "text": "setHeaders(headers) {\n for (const i in headers) {\n if (\n headers[i].hasOwnProperty(\"key\") &&\n headers[i].hasOwnProperty(\"value\")\n ) {\n let insert = [headers[i].key, headers[i].value];\n // this.http.configure(client => {\n // client.withHeader(headers[i].key, headers[i].value);\n // });\n this._headers.push(insert);\n }\n }\n return this;\n }", "title": "" }, { "docid": "5a30f79f40381c3b3720a5a8f1ef45fd", "score": "0.60273916", "text": "function getRequestDefaults(agent) {\n return agent\n .set(getRequestHeaders(config.user, config.password))\n .on('error', handleRequestError);\n }", "title": "" }, { "docid": "9ad246576e276fc43d74914b846b6ce6", "score": "0.6022019", "text": "function setStandardHeaders(req, callerId) {\r\n req.setRequestHeader(\"Accept\", \"application/json\");\r\n req.setRequestHeader(\"Content-Type\", \"application/json; charset=utf-8\");\r\n req.setRequestHeader(\"OData-MaxVersion\", \"4.0\");\r\n req.setRequestHeader(\"OData-Version\", \"4.0\");\r\n if (callerId) {\r\n req.setRequestHeader(\"MSCRMCallerID\", callerId);\r\n }\r\n\r\n }", "title": "" }, { "docid": "0e5608772c5132f91ad17751a91e13b5", "score": "0.60027826", "text": "function _setHeaders() {\n // if no headers specified, we will use the fields as headers.\n _headers = (_headers == null || _headers.length < 1) ? _fields : _headers; \n var h = _buildRowColumns(_headers);\n if (_table.children('thead').length < 1) _table.prepend('<thead></thead>');\n _table.children('thead').html(h);\n }", "title": "" }, { "docid": "eb8fc1ea1a557b134fd22c1c02ec7605", "score": "0.5972222", "text": "function _setHeaders(_xhrObj, _headersDataObj) {\n\n // Setting Dreamfactory Headers\n _xhrObj.setRequestHeader(\"X-DreamFactory-API-Key\", APP_API_KEY);\n var currentUser = UserDataService.getCurrentUser();\n if (currentUser && currentUser.session_tpken) {\n xhrObj.setRequestHeader(\"X-DreamFactory-Session-Token\", currentUser.session_token);\n }\n\n // Set additional headers\n for (var _key in _headersDataObj) {\n\n _xhrObj.setRequestHeader(_key, _headersDataObj[_key]);\n }\n }", "title": "" }, { "docid": "9a5d67df44ef4098554390228b7e615c", "score": "0.59219104", "text": "function setHeaders(httpReq) {\n if (!!request.headers) {\n Object.keys(request.headers).forEach(function (key) {\n httpReq.setRequestHeader(key, request.headers[key]);\n });\n }\n }", "title": "" }, { "docid": "f7201cf0c7300808dccb0a0e3c00e97e", "score": "0.5878243", "text": "setupDefaults() {\n precondition.ensureNotNull('this.ctxPtr', this.ctxPtr);\n const proxyResult = Module._vsce_phe_client_setup_defaults(this.ctxPtr);\n modules.PheError.handleStatusCode(proxyResult);\n }", "title": "" }, { "docid": "0de9424ebce419369f4a848690db11fc", "score": "0.58191144", "text": "function setAuth(authData) {\n authHeaders['X-Auth-Token'] = authData.authToken;\n authHeaders['X-User-Id'] = authData.userId;\n}", "title": "" }, { "docid": "99547f16e1a04673c205e9c2675c5435", "score": "0.5760563", "text": "function setHeader(pair) {\n\t\t\t\treq.setRequestHeader(pair._0, pair._1);\n\t\t\t}", "title": "" }, { "docid": "6ffc53f2c012bb736450b61ea2d76a3b", "score": "0.57466406", "text": "static headers() {\n const headerSet = {\n Accept: 'application/json',\n 'Content-Type': 'application/json',\n 'X-Site-Code': this.siteCode,\n 'X-Correlation-Token': uuid.v4(),\n }\n\n if (this.clientName) {\n headerSet['X-Spine-Client'] = this.clientName\n }\n\n return headerSet\n }", "title": "" }, { "docid": "3f0141235064f9d4aa5a4b4732385ebf", "score": "0.5729206", "text": "function setHeader(pair) {\n\t\t\treq.setRequestHeader(pair._0, pair._1);\n\t\t}", "title": "" }, { "docid": "01650409c7bd2a20588ccd53306152fc", "score": "0.5727106", "text": "setHeader(name, value){\n this.headers[name] = value;\n }", "title": "" }, { "docid": "67b7c3399c31711d6d12160d1c2c086e", "score": "0.5665718", "text": "function getDefaultHeader() {\n return {'Authorization': APP_CONSTANTS.STRATAGIES.BEARER + ' ' + AppStorage.getJwtToken()};\n }", "title": "" }, { "docid": "abdedca0b847dc4d7c2a0efe65cc8171", "score": "0.56532955", "text": "setHeaders(headers, target, request) {\n headers.forEach((header) => {\n const isSetCookie = header.key.toLowerCase() === 'set-cookie';\n const parsedHeaderValue = this.parseHeader(header, request);\n if (parsedHeaderValue === null) {\n return;\n }\n if (target.set) {\n // for express.Response\n if (isSetCookie) {\n target.append(header.key, parsedHeaderValue);\n }\n else {\n target.set(header.key, parsedHeaderValue);\n }\n }\n else if (target.setHeader) {\n // for proxy http.OutgoingMessage | ClientRequest\n target.setHeader(header.key, parsedHeaderValue);\n }\n else {\n // for http.IncomingMessage\n if (isSetCookie) {\n target.headers[header.key] = this.appendHeaderValue(target.headers[header.key], parsedHeaderValue);\n }\n else {\n target.headers[header.key] = parsedHeaderValue;\n }\n }\n });\n }", "title": "" }, { "docid": "1dd5d5e938ac8d60a81fe4b0ee9cfb8b", "score": "0.56532735", "text": "function setAuthHeader() {\n $http.defaults.headers.common['authorization']= window.localStorage['authToken'];\n }", "title": "" }, { "docid": "47039ee60a7bc91ef746ef936adff20a", "score": "0.56371546", "text": "function defaultProperties(req) {\n return {\n title: \"Unknown\", // Default title in case the developer doesn't set one\n user: req.user\n };\n}", "title": "" }, { "docid": "319cbe9eccb1177f29dc26879595d0f0", "score": "0.56277996", "text": "function setHeader(xhr) {\n xhr.setRequestHeader('Auth', tableau.connectionData);\n}", "title": "" }, { "docid": "498a390fcc5f05c26265210ff572d773", "score": "0.56249994", "text": "defaults () {\n return {\n userId: '',\n userFirstname: '',\n userName: '',\n userDateInscription: '',\n userPass: '',\n userToken: 'onestlahein',\n userMail: '',\n userPhone: '',\n userPseudo: '',\n userDescription: '',\n userVisibility: 'public',\n userPicture: '',\n userAccountState: '',\n userNumberParty: 0\n }\n }", "title": "" }, { "docid": "918650862edc761dd31df855531632ff", "score": "0.55920684", "text": "headers({ key }) {\n this.headersSet = {\n ...this.headersSet,\n [this.authKey]: key\n }\n }", "title": "" }, { "docid": "1b616be4e2623222df9278e443e70e52", "score": "0.55747247", "text": "get _headers () {\n const headers = {\n 'Content-Type': 'application/json',\n }\n\n if ( this.authToken ) {\n headers.Authorization = 'Bearer ' + this.authToken;\n } else if ( window.OpAuthHelper?.jwtToken ) {\n headers.Authorization = 'Bearer ' + window.OpAuthHelper.jwtToken;\n }\n\n return headers;\n }", "title": "" }, { "docid": "4730f3f5f938adcbaff7575c59b700b2", "score": "0.556619", "text": "setupDefaults() {\n precondition.ensureNotNull('this.ctxPtr', this.ctxPtr);\n const proxyResult = Module._vsce_phe_server_setup_defaults(this.ctxPtr);\n modules.PheError.handleStatusCode(proxyResult);\n }", "title": "" }, { "docid": "ed8d079010a1ba35cd50bc7648548ff0", "score": "0.55285877", "text": "function setRequestHeaders(httpRequest) {\n\tvar headerTextarea = document.REQUEST.reqHead.value;\n\tvar headerArray = new Array();\n\tvar componentsArray = new Array();\n\t\n\tif (headerTextarea != '') {\n\t\theaderArray = headerTextarea.split('\\n');\n\t\tvar headLen = headerArray.length;\n\n\t\tfor (var i=0;i<headLen;i++) {\n\t\t\tif (headerArray[i] != '') {\n\t\t\t\tcomponentsArray = headerArray[i].split(': ');\n\t\t\t\tif (componentsArray.length > 1) {\n\t\t\t\t\thttpRequest.setRequestHeader(componentsArray[0],componentsArray[1]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "be4a7e18f5a9d4ea483125919ec3ec11", "score": "0.55256015", "text": "headers(object) {\n this._headers = {...this._headers, ...object};\n return this;\n }", "title": "" }, { "docid": "48e0f2428902933dd8b8c384abd270aa", "score": "0.551334", "text": "onStartHeaders() {}", "title": "" }, { "docid": "a093b205d1f122081750283ae019a7c0", "score": "0.55118793", "text": "function setAxiosHeaders (token) {\n axios.defaults.headers.common.Authorization = token\n }", "title": "" }, { "docid": "4aa4e30fbe884fb54fb97c6114ed109f", "score": "0.5488975", "text": "function setDefaults() {}", "title": "" }, { "docid": "ede10beeb0f19155f6a84858afbe6eeb", "score": "0.5448872", "text": "initialize(state) {\n axios.defaults.headers.common[\"auth-token\"] = state.token;\n }", "title": "" }, { "docid": "1565b524a1e5cec1a128d14c6af7ab5b", "score": "0.54454213", "text": "function setHeaders(res, headers) {\n var keys = Object.keys(headers);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n res.setHeader(key, headers[key]);\n }\n}", "title": "" }, { "docid": "7a67d098287be53da2244ff444d3590b", "score": "0.543687", "text": "constructor(config, headers) {\n this.config = config;\n this._headers = headers || {};\n if (config.basicauthenabled) {\n this._headers = Object.assign(Object.assign({}, this.headers), { 'Authorization': 'Basic ' + Buffer.from(config.basicauthuser + ':' + config.decryptedsecurejsondataMap[0][1]).toString('base64') });\n }\n logger.debug(\"Headers\", this._headers);\n }", "title": "" }, { "docid": "c6f306bf02c9c34314eaa230940ef9e3", "score": "0.54324967", "text": "_populateHeaderInfo () {\n this._headerChannelP.textContent = 'Channel: ' + this._channel\n this._headerUserP.textContent = 'User: ' + this._userName\n }", "title": "" }, { "docid": "7d47354afa9afd8efb4d724cc06bfb57", "score": "0.5363148", "text": "prepareRequest(options) {\n if (!options.headers) {\n throw Error(\"The request has no headers\");\n }\n options.headers[\"Authorization\"] = `Bearer ${this.token}`;\n }", "title": "" }, { "docid": "19ad4c9d5e373e8d53af383cb5141fd2", "score": "0.5338425", "text": "procesarHeaders(){\n var headers = {\n \"Accept\": \"*/*\",\n \"User-Agent\":\"Cliente de nodejs\"\n }\n if(this.basicAuth != undefined){\n headers.Autorization = \"Basic \"+this.basicAuth;\n }\n return headers;\n }", "title": "" }, { "docid": "b06439eeced54c7d56a240abb497b6cb", "score": "0.53374785", "text": "function setHeader(xhr) {\n xhr.setRequestHeader('Authorization', 'Token 03ed2d25c17b7a9adf9e3ed3b5ac424c');\n\n }", "title": "" }, { "docid": "3af500b449dd0becd7669787bd1be7a6", "score": "0.531824", "text": "function mTSetHeader(headerName)\n{\n mTHeader = headerName;\n}", "title": "" }, { "docid": "9453a206536634c57383c0ed8c57a5be", "score": "0.5317758", "text": "function _setBasicAuthHeader(xhr, user) {\n\txhr.setRequestHeader('Authorization', 'Basic ' + btoa(user.name + \":\" + user.password))\n}", "title": "" }, { "docid": "da033ffe2a0d196038211ac6d6154f5a", "score": "0.5314632", "text": "static getDefaultOptions() {\n\t\treturn {\n\t\t\tbaseURL: '',\n\t\t\t// headers: {\n\t\t\t// \t'Content-Type': 'application/json; charset=utf-8',\n\t\t\t// \t'Accept': 'application/json, text/plain, */*'\n\t\t\t// },\n\t\t\tmethod: 'GET'\n\t\t};\n\t}", "title": "" }, { "docid": "0e64e812bdff1e67e29e7201dd186614", "score": "0.5302786", "text": "function tokenSettings() {\n const token = localStorage.getItem('userToken')\n if (token) {\n axios.defaults.headers.common['Authorization'] = `Bearer ${token}`\n }\n}", "title": "" }, { "docid": "61de47cf462a9b492fc3afd945cfa91d", "score": "0.5302028", "text": "_prepHeaders() {\n if (this.requestType === \"POST\") this.xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');\n if (this.requestType === \"GET\") {\n var str = Object.keys(this.data).map((key)=>`${key}=${this.data[key]}`\n ).join(\"&\");\n this.url = `${this.url}?${str}`;\n }\n }", "title": "" }, { "docid": "07ba97833386e523518b172ef4003da5", "score": "0.529998", "text": "prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Bearer ${this.token}`;\n }", "title": "" }, { "docid": "07ba97833386e523518b172ef4003da5", "score": "0.529998", "text": "prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Bearer ${this.token}`;\n }", "title": "" }, { "docid": "07ba97833386e523518b172ef4003da5", "score": "0.529998", "text": "prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Bearer ${this.token}`;\n }", "title": "" }, { "docid": "07ba97833386e523518b172ef4003da5", "score": "0.529998", "text": "prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Bearer ${this.token}`;\n }", "title": "" }, { "docid": "07ba97833386e523518b172ef4003da5", "score": "0.529998", "text": "prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Bearer ${this.token}`;\n }", "title": "" }, { "docid": "07ba97833386e523518b172ef4003da5", "score": "0.529998", "text": "prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Bearer ${this.token}`;\n }", "title": "" }, { "docid": "07ba97833386e523518b172ef4003da5", "score": "0.529998", "text": "prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Bearer ${this.token}`;\n }", "title": "" }, { "docid": "23fa45381ae22ca73158ad463dc3ac11", "score": "0.5295335", "text": "function setMe(newMe) {\n\tme = newMe;\n\n\t// Set the team as an HTML attribute for CSS\n\tif(me.team === BLUE)\n\t\t$('body').attr('user-team', 'blue');\n\telse if(me.team === RED)\n\t\t$('body').attr('user-team', 'red');\n\n\t// Update name in header\n\t$('header .name').html(me.name);\n\n\t// Update role in header\n\tif(me.role == SPY) {\n\t\t$('body').attr('user-role', 'spymaster');\n\t\t$('header .role').text('Spymaster');\n\t}\n\telse if(me.role == OP) {\n\t\t$('body').attr('user-role', 'operative');\n\t\t$('header .role').text('Operative');\n\t}\n}", "title": "" }, { "docid": "32ef3601c8a8f7ec3c6789ae1ab38f80", "score": "0.52831036", "text": "willSendRequest({ request, context }) {\n\t\trequest.http.headers.set(\n\t\t\t'hsb-user-json',\n\t\t\tcontext.auth && context.auth.user ? JSON.stringify(context.auth.user) : null\n\t\t)\n\t}", "title": "" }, { "docid": "c8fc08e7a03a3da8455f16404712f527", "score": "0.5278365", "text": "function addAuthHeaders ({ \n auth,\n bearerToken, \n headers, \n overrideHeaders=false, \n}) {\n if (overrideHeaders) return\n if (bearerToken) return { \n headers: { ...headers, Authorization: `Bearer ${ bearerToken }` } \n }\n if (auth) {\n const username = auth.username || ''\n const password = auth.password || ''\n const encodedToken = Base64.btoa(`${ username }:${ password }`)\n return {\n headers: { ...headers, Authorization: `Basic ${ encodedToken }` }\n }\n }\n}", "title": "" }, { "docid": "e7cf87a4edc191439ef6d5fa0b7ccae5", "score": "0.52623", "text": "function headers() {\n return {\n \"Content-Type\": \"application/json\",\n Accept: \"application/json\",\n Authorization: localStorage.getItem(\"token\")\n };\n}", "title": "" }, { "docid": "7837f8cea009152d10a464964b046235", "score": "0.52336687", "text": "setHeader () {\n // eslint-disable-next-line camelcase\n var access_token = Vue.cookie.get('access_token')\n // eslint-disable-next-line standard/computed-property-even-spacing\n Vue.axios.defaults.headers.common[\n 'token'\n // eslint-disable-next-line camelcase\n ] = `${access_token}`\n }", "title": "" }, { "docid": "13f8535e44f3bcb61438b0fcf16625f5", "score": "0.5216561", "text": "assignDefaults() {\n ['sort', 'source', 'direction', 'outputData', 'hadFailure', 'total', 'view', 'subjectpage'].forEach(defaultKey => {\n this[defaultKey] = this.config.defaults[defaultKey];\n });\n }", "title": "" }, { "docid": "10b3a51bd7769f21709c499b396018f3", "score": "0.52141625", "text": "constructor(init = {}) {\n super(init);\n this.type = HttpEventType.ResponseHeader;\n }", "title": "" }, { "docid": "10b3a51bd7769f21709c499b396018f3", "score": "0.52141625", "text": "constructor(init = {}) {\n super(init);\n this.type = HttpEventType.ResponseHeader;\n }", "title": "" }, { "docid": "10b3a51bd7769f21709c499b396018f3", "score": "0.52141625", "text": "constructor(init = {}) {\n super(init);\n this.type = HttpEventType.ResponseHeader;\n }", "title": "" }, { "docid": "10b3a51bd7769f21709c499b396018f3", "score": "0.52141625", "text": "constructor(init = {}) {\n super(init);\n this.type = HttpEventType.ResponseHeader;\n }", "title": "" }, { "docid": "327a575755823503e14e69a6aa57c428", "score": "0.5212909", "text": "setToken(token = null) {\n this.token = token;\n\n\n //this.instance.defaults.headers.common['Authorization'] = _.get(token, '_id');\n }", "title": "" }, { "docid": "068a3b7757816abe95fa8eb1f33b4df3", "score": "0.5212066", "text": "defaults() {\n return {\n id: null,\n username: '',\n email: '',\n role: '',\n firstname: '',\n lastname: '',\n }\n }", "title": "" }, { "docid": "43a6220eb7e6cb5e88f90c46e282b6a1", "score": "0.5207131", "text": "async function initialize() {\n await Config.get(Parse.applicationId).schemaCache.clear();\n\n user1 = await createUser('user1');\n user1 = await logIn(user1);\n\n // await user1.fetch();\n obj = new Parse.Object(className);\n\n obj.set('owner', user1);\n obj.set('field', 'field');\n obj.set('test', 'test');\n\n await Parse.Object.saveAll([obj], { useMasterKey: true });\n\n headers = {\n 'X-Parse-Application-Id': Parse.applicationId,\n 'X-Parse-Rest-API-Key': 'rest',\n 'Content-Type': 'application/json',\n 'X-Parse-Session-Token': user1.getSessionToken(),\n };\n }", "title": "" }, { "docid": "4c3f8dcce2e03b15fc63cbab5f808d12", "score": "0.5204172", "text": "setHeaders(headersValue = {}) {\n const accessToken = localStorage.getItem(\"token\");\n\n const config = {\n headers: {\n Authorization: `Bearer ${accessToken}`,\n ...headersValue\n }\n };\n\n return (accessToken && config) || \"\";\n }", "title": "" }, { "docid": "437d0446b8b3f5520489ccba1eed9a92", "score": "0.5203519", "text": "boostrapRequest() {\n this.setupHeaders();\n this.setupBaseUrl();\n }", "title": "" }, { "docid": "8491c6aba837e09d1eea0b25965d2388", "score": "0.5200211", "text": "function setHeaders(type){\n var _headers = {\n \"Access-Control-Allow-Origin\": \"*\",\n \"Access-Control-Allow-Methods\": \"GET\",\n \"Access-Control-Allow-Headers\": \"Origin, X-Requested-With, Content-Type, Accept\"\n };\n\n switch (type) {\n case \"json\":\n _headers[\"Content-Type\"] = \"application/json\";\n return _headers;\n case \"yaml\":\n _headers[\"Content-Type\"] = \"text/yaml\";\n return _headers;\n default:\n // Do not expose headers\n return {};\n }\n }", "title": "" }, { "docid": "18ff6f85af236beb53da477c23bcba98", "score": "0.5178805", "text": "setHeaders(headersValue = {}, responseType = {}) {\n const accessToken = localStorage.getItem(\"token\");\n\n const config = {\n ...responseType,\n headers: {\n Authorization: `Bearer ${accessToken}`,\n ...headersValue\n }\n };\n\n return (accessToken && config) || \"\";\n }", "title": "" }, { "docid": "f51d34e68d871f0008eeb9afce5c107f", "score": "0.5167077", "text": "static initialize(obj, headerId, digest, fields) { \n obj['headerId'] = headerId;\n obj['digest'] = digest;\n obj['fields'] = fields;\n }", "title": "" }, { "docid": "4d4cb0267fc55c5421774ad6e197f5c1", "score": "0.5166904", "text": "setDefaultUser(user) {\n this.defaultUser = user;\n }", "title": "" }, { "docid": "16f5ac6c9066f4e390f6a5d9fbf38837", "score": "0.51585966", "text": "function extendRequestHeaders(req, res) {\n req.headers = req.headers || {};\n req.headers.cookie = req.headers.cookie || '';\n \n var host = parseUri(req.url).host;\n var requestCookies = cookie.parse(req.headers.cookie);\n \n eachFilteredCookies(host, function (value, name) {\n requestCookies[name] = value;\n });\n \n req.headers.cookie = Object.keys(requestCookies).map(function (name) {\n return name + '=' + requestCookies[name];\n }).join('; ');\n }", "title": "" }, { "docid": "0212aca2b74e96549b9706c820521dcc", "score": "0.5152257", "text": "function setHeader(appcid, user, password) { \n \n $.ajaxPrefilter(function( options, originalOptions, jqXHR ) {\n \n options.crossDomain = true;\n // jqXHR.setRequestHeader(\"X-SUP-SC\", context.securityConfig);\n // jqXHR.setRequestHeader(\"X-SUP-DOMAIN\", context.domain);\n // jqXHR.setRequestHeader(\"X-SUP-APPCID\", appcid);\n\n if (appcid) {\n jqXHR.setRequestHeader(\"X-SMP-APPCID\", appcid);\n }\n if (user && password) {\n jqXHR.setRequestHeader(\"Authorization\", \"Basic \" + btoa(user + \":\" + password));\n } \n }); \n}", "title": "" }, { "docid": "d80f7614dff34ea9edad25ef1c1eb269", "score": "0.515186", "text": "procesarHeaders(){\n\n var headers = {\n \"Accept\": \"*/*\",\n //muy importante para los permisos del server\n //en GitHub, sin este header no funciona.\n \"User-Agent\": \"Cliente Node.js\"\n }\n //laautenticacion se guarda en los headers\n\n //si el metodo de basicAuth no esta definido\n if (this.basicAuth != undefined) {\n headers.Authorization = \"Basic \"+this.basicAuth;\n console.log(\"Autenticando por header: \"+headers.Authorization);\n }else{\n console.log(\"No se ha especificado autenticación.\");\n }\n\n return headers;\n }", "title": "" }, { "docid": "9ab576d236d626f0023831cb0c69703a", "score": "0.514484", "text": "getHeaders() {\n return {\n 'Accept': 'application/json; odata=verbose',\n 'Content-Type': 'application/json; charset=utf-8',\n 'Authorization': `Bearer ${this.token}` || ''\n };\n }", "title": "" }, { "docid": "63dd1c5383d9cc6c05e822fb21cd3038", "score": "0.51354367", "text": "function setJwt(jwt) {\n axios.defaults.headers.common['x-auth-token'] = jwt;\n}", "title": "" }, { "docid": "7dc9c66b4be39bcb66bc127a459f94d3", "score": "0.51352155", "text": "function setCommonHeader ($http) {\n $http.defaults.headers.common.Accept = 'application/json';\n }", "title": "" }, { "docid": "9196c4e5e3f469830277284cf6dea971", "score": "0.51332694", "text": "prepareRequest(options) {\n options.headers['Authorization'] = 'Bearer ' + this.token;\n }", "title": "" }, { "docid": "65fc8973a8e7ea4f7caa8982de0e68a5", "score": "0.5132865", "text": "setHeader(name, value) { }", "title": "" }, { "docid": "dd2ecbbc0a9c41e89d0c9b192582ef18", "score": "0.512996", "text": "static get properties() {\n return {\n header: {type:Object},\n body:{type:Object},\n footer: {type:Object},\n displayMenu:{type:Boolean},\n menuList: {type:String},\n newTileFlag:{type:Boolean},\n displayNewTile:{type:String},\n user:{type:Object}\n };\n }", "title": "" }, { "docid": "5d00138a76e68e3ec7856fba6ee58d7c", "score": "0.51286644", "text": "function createHeaderForRequest(request)\n{\n\trequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=utf-8');\n\trequest.setRequestHeader('username', CurrentUser.getUsername());\n\trequest.setRequestHeader('jid', CurrentUser.getJid());\n\trequest.setRequestHeader('country', 'tw');\n\trequest.setRequestHeader('timezone', '8');\t\n}", "title": "" }, { "docid": "7e098b0e877b4e999b0fd2fa90240642", "score": "0.51256293", "text": "static getNoTokenRequestDefaultHeader() {\n return new _angular_common_http__WEBPACK_IMPORTED_MODULE_0__[\"HttpHeaders\"]({\n 'Content-Type': 'application/json',\n Accept: 'application/json',\n 'Access-Control-Allow-Origin': '*',\n });\n }", "title": "" }, { "docid": "1955a08f70eafae16df4687a6fc0e9a7", "score": "0.5124298", "text": "function handler_header(k, v) {\n\tk = helpers.formatHeaderKey(k);\n\t// Convert mime if needed\n\tif (k == 'Accept' || k == 'ContentType') {\n\t\tv = contentTypes.lookup(v);\n\t}\n\tthis.__headers__[k] = v;\n}", "title": "" }, { "docid": "50f57bd0197e844a3e62bdd619d9a4f1", "score": "0.51225513", "text": "function setJwt(jwt) {\n Axios.defaults.headers.common[\"x-auth-token\"] = jwt;\n}", "title": "" }, { "docid": "e41709f64ad282f614a0efc78ec682ea", "score": "0.51208127", "text": "function addHeaderOption(name, value) {\n let header = {};\n header[name] = value;\n _parameters.options['headers'] = header;\n return this;\n }", "title": "" }, { "docid": "ed9d6973b25634ebb961aff435b0b660", "score": "0.51068735", "text": "function addHeaderToConfig(config) {\n config = config || {};\n config.headers = config.headers || {};\n\n // Add the header unless user asked to handle errors himself\n if (!specificallyHandleInProgress) {\n config.headers[HEADER_NAME] = true;\n }\n\n return config;\n }", "title": "" }, { "docid": "7f86f9596034dabb4ff41b9d1713e506", "score": "0.50864947", "text": "reset () {\n\t\tfor (const header in this.headers) {\n\t\t\tif (!this.headers.hasOwnProperty(header)) continue;\n\t\t\tthis._reset(header);\n\t\t}\n\t\tthis._fireValChangeEvent();\n\t}", "title": "" }, { "docid": "a4c1ac749e7a68c74a00d7c4cde9f29c", "score": "0.5085947", "text": "setHttpHeaders(options) {\n const operationArguments = {\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, setHttpHeadersOperationSpec);\n }", "title": "" }, { "docid": "f9c6fb2f74b18a897b2d6d5f7bb3a932", "score": "0.5084946", "text": "setHeader(name, value) {\n this.headers[headerize(name)] = [{ raw: value }];\n }", "title": "" }, { "docid": "cfb3b2b6091ab61168f29fddd31407b7", "score": "0.5083561", "text": "clearHeaders() {\n this.headers = null\n }", "title": "" }, { "docid": "5b3c651b1251b2492d70ecf3daa3b75c", "score": "0.5083091", "text": "setAuthHeader(token) {\n if (token) {\n apiAxios.defaults.headers.common['Authorization'] = `Bearer ${token}`;\n } else {\n delete apiAxios.defaults.headers.common['Authorization'];\n }\n }", "title": "" }, { "docid": "1ae7d306dee9f9752c63f53863eb6413", "score": "0.50782824", "text": "header(field,value) {\n this._headers[field] = value\n return this\n }", "title": "" }, { "docid": "2c21f2b51ba22b46caca67b5c5b64eb5", "score": "0.50727004", "text": "get headers() {\n if (this.isDefined) {\n return _cx().attributes().getOrElseUpdate(\"requestHeaders\",\n scalaF0(_enumeratorMap(_req(), \"getHeaderNames\", \"getHeaders\")));\n }\n}", "title": "" }, { "docid": "36591ee58c6d0e2856e237975e0d11b1", "score": "0.5035077", "text": "_setDefaults() {\n super._setDefaults();\n\n this.prompt = null;\n this.blankStim = null;\n this.durationPreStim = 500;\n this.durationStim = 500;\n this.durationPostStim = 100;\n this.durationResponse = null;\n this.displayFeedback = null;\n this.responseWidget = document.querySelector(\"esm-response-widget\");\n\n this.data = {\n timestampStart: null,\n timeStimOn: null,\n timeStimOff: null,\n timeResponseOpen: null,\n timeResponseClose: null,\n timeFeedbackOn: null,\n timeFeedbackOff: null,\n timeEnd: null\n };\n }", "title": "" }, { "docid": "8037a2005da4302f5f7d45c0c45467fd", "score": "0.50344026", "text": "function Headers(headers) {\n this._headers = {};\n this._index = {};\n this.setObject(headers);\n}", "title": "" }, { "docid": "cf4a6b2deab048a8415bf66220642cf2", "score": "0.50304157", "text": "setHeader(header) {\n if (header.key && header.value) {\n let insert = [header.key, header.value];\n this._headers.push(insert);\n }\n return this;\n }", "title": "" }, { "docid": "64d26b6b055185a86390ca888305f837", "score": "0.50300986", "text": "reconfigure(config) {\n // clear the cached headers\n const me = this;\n\n me.headers = null;\n\n // Ensure correct ordering\n me.setConfig(config);\n\n me.trigger('reconfigure');\n }", "title": "" }, { "docid": "e464ea7db03db9ffaf8dce2e088240f7", "score": "0.50153357", "text": "function setRequestHeaders(req, options, interceptor) {\n // If a filtered scope is being used we have to use scope's host\n // in the header, otherwise 'host' header won't match.\n // NOTE: We use lower-case header field names throughout Nock.\n const HOST_HEADER = 'host'\n if (interceptor.__nock_filteredScope && interceptor.__nock_scopeHost) {\n options.headers[HOST_HEADER] = interceptor.__nock_scopeHost\n setHeader(req, HOST_HEADER, interceptor.__nock_scopeHost)\n } else {\n // For all other cases, we always add host header equal to the\n // requested host unless it was already defined.\n if (options.host && !getHeader(req, HOST_HEADER)) {\n let hostHeader = options.host\n\n if (options.port === 80 || options.port === 443) {\n hostHeader = hostHeader.split(':')[0]\n }\n\n setHeader(req, HOST_HEADER, hostHeader)\n }\n }\n}", "title": "" } ]
b37b6523d7b5e8d294aae00aa4a147c2
Will trigger the submit button. Line 41: will create an object containing the values that will be used on the fetch. Line 47: Will create options that goes along with the fetch function line 55: Will post everything to the API, adding whatever we wrote on the form to be sent to the API, along to adding to the List already created
[ { "docid": "194f17d87dcb717f86e7006189a70093", "score": "0.0", "text": "function renderPosts() {\n let html = '';\n for (let posts of postsArrays) {\n html += `<h3>${posts.title} </h3> \n <p>${posts.body}</p>\n <hr />`\n }\n div.innerHTML = html;\n}", "title": "" } ]
[ { "docid": "67f362125686d943eca2509cc51da127", "score": "0.6914547", "text": "function submitNewList() {\n //Grabbing the values entered into the form and setting them to the listData const\n const listData = {\n title: $(\"#listName\").val(),\n cardColor: $(\".colorSquare.selected\").css('background-color')\n }\n //sending the data as an HTTP POST request\n $.ajax({\n type: \"POST\",\n url: '/api/lists',\n data: JSON.stringify(listData),\n dataType: 'json',\n contentType: 'application/json'\n })\n //When the request is finished refresh the list buttons, clear the form, and hide the add list form\n .done(function(response){\n refreshButtons();\n $('#listName').val('')\n $(\"#newListForm\").toggle();\n })\n}", "title": "" }, { "docid": "f8ccf8aec8d6a27cade5685eca0192e2", "score": "0.67976385", "text": "function submit_future_activity_onclick() {\n /* Connect to Future Activity Sections */\n let fActAdd = document.getElementById(\"fAct-Add\");\n let fActForm = document.getElementById(\"fAct-Form\");\n \n /* Activity Data to Send to Server */\n let data = {\n date: document.getElementById('fAct-date').value,\n activity: document.getElementById('fAct-activity').value\n }\n \n /* Form Validation */\n if (!future_activity_form_is_valid(data)) { \n alert(\"Invalid Future Plan. Please fill in the entire form.\");\n return\n }\n\n /* Hide Form, Show 'Add New Activity' Button */\n fActAdd.classList.remove(\"hide\");\n fActForm.classList.add(\"hide\");\n\n /* Add 'p' tag above 'Add New Activity' Button */\n let newActivity = create_submission_success_element(\n \"Sounds good! Don't forget to come back to update your session for \",\n `${data.activity} on ${reformat_date(data.date)}`,\n \"!\"\n )\n insert_latest_response(fActAdd, newActivity)\n\n console.log('Future Plans Sending:', data);\n\n /* Post Activity Data to Server */\n fetch(`/store`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(data), // post body\n })\n .then(response => response.json())\n .then(data => {\n console.log('Future Plans Success:', data);\n })\n .catch((error) => {\n console.error('Future Plans Error:', error);\n });\n\n /* Reset Form */\n document.getElementById('fAct-date').valueAsDate = newUTCDate()\n document.getElementById('fAct-activity').value = \"Walk\"\n}", "title": "" }, { "docid": "b66cdbd72682cf696b53936e4646fdfe", "score": "0.6711578", "text": "function submit_past_activity_onclick() {\n /* Connect to Past Activity Sections */\n let pActAdd = document.getElementById(\"pAct-Add\");\n let pActForm = document.getElementById(\"pAct-Form\");\n \n /* Activity Data to Send to Server */\n let data = {\n date: document.getElementById('pAct-date').value,\n activity: document.getElementById('pAct-activity').value,\n scalar: document.getElementById('pAct-scalar').value,\n units: document.getElementById('pAct-unit').value\n }\n\n if (!past_activity_form_is_valid(data)) { \n alert(\"Invalid Past Activity. Please fill in the entire form.\");\n return\n }\n\n /* Hide Form, Show 'Add New Activity' Button */\n pActAdd.classList.remove(\"hide\");\n pActForm.classList.add(\"hide\");\n \n /* Add 'p' tag above 'Add New Activity' Button */\n let newActivity = create_submission_success_element( \n \"Got it! \",\n `${data.activity} for ${data.scalar} ${data.units}. `,\n \"Keep it up!\"\n )\n insert_latest_response(pActAdd, newActivity)\n\n console.log('Past Activity Sending:', data);\n\n /* Post Activity Data to Server */\n fetch(`/store`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(data), // post body\n })\n .then(response => response.json())\n .then(data => {\n console.log('Past Activity Success:', data);\n })\n .catch((error) => {\n console.error('Past Activity Error:', error);\n });\n \n /* Reset Form */\n document.getElementById('pAct-date').valueAsDate = newUTCDate()\n document.getElementById('pAct-activity').value = \"Walk\"\n document.getElementById('pAct-scalar').value = \"\"\n document.getElementById('pAct-unit').value = \"km\"\n}", "title": "" }, { "docid": "7b1d97c4c3689b4968aecdf32f5ced00", "score": "0.66874665", "text": "function submitMeme() {\n // Capturing form inputs entered by the user\n const name = document.getElementById(\"owner-name\").value;\n const caption = document.getElementById(\"meme-caption\").value;\n const url = document.getElementById(\"meme-url\").value;\n\n // Creating an object to send to the backend\n let data = {\n name: name,\n caption: caption,\n url: url,\n };\n\n // Send a post request to the backend\n fetch(API_URL, {\n method: \"POST\",\n body: JSON.stringify(data),\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n })\n .then((res) => res.json())\n .then(() => {\n setTimeout(() => {\n window.location.href = \"index.html\";\n }, 0);\n console.log(\"Added in DB\");\n });\n}", "title": "" }, { "docid": "8633f9e339bfbe5ecfa970a083841c76", "score": "0.6665786", "text": "handleSubmit(){\n // data object to submit to Hubspot;\n let data = {};\n\n // data for data submission\n data.submittedAt = Date.now(); // unix timestamp\n\n // user information to be submitted: note that these 'name' values must be created in a form in hubspot for this to work, and the\n // form should have the GUID set in config object (see env.js)\n data.fields = [\n {\n 'name': 'email',\n 'value': this.email.current.value\n },\n {\n 'name': 'firstname',\n 'value': this.name.current.value\n },\n {\n 'name': 'lastname',\n 'value': this.surname.current.value\n },\n {\n 'name': 'company',\n 'value': this.company.current.value\n },\n {\n 'name': 'phone',\n 'value': this.phone.current.value\n }\n ];\n\n // additional information about where the data is coming from\n data.context = {\n 'pageUri': 'localhost',\n 'pageName': 'Test Form',\n //'hutk': '' // include this parameter and set it to the hubspotutk cookie value to enable cookie tracking on your submission\n };\n\n // build URL for the api endpoint to post to.\n let postUrl = config.hubspotEndpoint + config.hubspotAccountId + '/' + config.hubspotFormId;\n\n // build package to submit\n let req = {\n method: 'POST',\n headers: {'Content-Type': 'application/json'},\n body: JSON.stringify(data)\n }\n\n console.info(\"Sending POST to '\"+ postUrl +\"'.\");\n\n fetch(postUrl, req).then(async response => {\n const resp = await response.json();\n\n if(!response.ok) {\n const error = (resp && resp.message) || response.status;\n \n return Promise.reject(error);\n } else {\n this.setState({\n message: 'Submitted successfully',\n error: false\n });\n }\n\n }).catch(error => {\n console.warn(\"Error!!!! POST failed.\");\n console.warn(error.toString());\n\n this.setState({\n message: 'Failed to submit. See dev console.',\n error: true\n });\n });\n }", "title": "" }, { "docid": "c9e80caf01efbf21edabebaa1ecf2d08", "score": "0.6622116", "text": "function Submit() {\n\t\tlet text = document.getElementById(\"textinput\").value;\n\t\tlet image = document.getElementById(\"imageinput\").value;\n\t\t\n\t\tif(text !== \"\") {\n\t\t\tconst paragraph = {map: gMap, civilization: gCiv, text: text,\n\t\t\t\t\timage: image};\n\t\t\tconst fetchOptions = {\n\t\t\t\tmethod : 'POST',\n\t\t\t\theaders : {\n\t\t\t\t\t'Accept': 'application/json',\n\t\t\t\t\t'Content-Type' : 'application/json'\n\t\t\t\t},\n\t\t\t\tbody : JSON.stringify(paragraph)\n\t\t\t};\n\n\t\t\tconsole.log(paragraph);\n\n\t\t\tlet url = \"https://worldhistory-jm.herokuapp.com:\";\n\t\t\tfetch(url, fetchOptions)\n\t\t\t\t.then(checkStatus)\n\t\t\t\t.then(function(responseText) {\n\t\t\t\t\tif(responseText){\n\t\t\t\t\t\tCreateCivInfo();\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.catch(function(error) {\n\t\t\t\t\tconsole.log(error);\n\t\t\t\t});\n\t\t}\t\n\t}", "title": "" }, { "docid": "1372d43a85173843fc13e4b7b67a6838", "score": "0.66187507", "text": "async function handleSubmitButtonClickEvent() {\n const formEl = document.forms[\"Association\"],\n selectAssoEl = formEl.selectAssociation,\n assoId = selectAssoEl.value,\n supAssosListEl = supAssosUpWidget.querySelector(\"ul\");\n\n if (!assoId) return;\n const slots = {\n assoId: formEl.assoId.value,\n name: formEl.name.value\n };\n // set error messages in case of constraint violations\n formEl.name.setCustomValidity( FootballAssociation.checkName( slots.name).message);\n\n // construct supAssociationIdRefs-ToAdd/ToRemove lists\n const supAssociationIdRefsToAdd = [], supAssociationIdRefsToRemove = [];\n for (const supAssoItemEl of supAssosListEl.children) {\n if (supAssoItemEl.classList.contains(\"removed\")) {\n supAssociationIdRefsToRemove.push(supAssoItemEl.getAttribute(\"data-value\"));\n }\n if (supAssoItemEl.classList.contains(\"added\")) {\n supAssociationIdRefsToAdd.push(supAssoItemEl.getAttribute(\"data-value\"));\n }\n }\n // if the add/remove list is non-empty, create a corresponding slot\n if (supAssociationIdRefsToRemove.length > 0) {\n slots.supAssociationIdRefsToRemove = supAssociationIdRefsToRemove;\n }\n if (supAssociationIdRefsToAdd.length > 0) {\n slots.supAssociationIdRefsToAdd = supAssociationIdRefsToAdd;\n }\n if (slots.supAssociationIdRefsToAdd) {\n for (const sa of slots.supAssociationIdRefsToAdd) {\n let responseValidation = await FootballAssociation.checkSupAssociation( sa);\n if (responseValidation.message !== \"\") {\n formEl[\"upSupAssos\"].setCustomValidity( responseValidation.message);\n break;\n } else formEl[\"upSupAssos\"].setCustomValidity(\"\");\n }\n }\n\n if (formEl.checkValidity()) {\n await FootballAssociation.update(slots);\n // update the selection list option\n supAssosListEl.innerHTML = \"\";\n selectAssoEl.options[selectAssoEl.selectedIndex].text = slots.name;\n\n formEl.reset();\n }\n}", "title": "" }, { "docid": "6f79c2bdcaf4c67e705ee914b6b3c814", "score": "0.6609727", "text": "function submit() {\n const body = {\n \"title\": title,\n \"description\": description,\n \"type\": type,\n \"price\": price\n };\n\n toggleShow();\n\n axiosInstance.post('/listings', body)\n .then((res) => {\n console.log(res.data)\n console.log(res.data.password)\n setPassword(res.data.password)\n //setBasicModal(true)\n })\n .catch((e) => {\n console.log(e)\n })\n }", "title": "" }, { "docid": "b0d845fa31046d6a5de199f25dcf9f29", "score": "0.66023463", "text": "function bookCreationForm () {\n let form = document.querySelector('.form-div .form');\n let h3 = document.querySelector('.form-div h3');\n // let spinner = document.querySelector('.form-div .form .spinner');\n\n // start process\n let url = '/api/books/';\n buildHtml(url);\n\n // attach name attri to data when form is submitted\n form.addEventListener('submit', function(e) {\n e.preventDefault();\n let traded = document.querySelector('input[name=traded]').value;\n let book1 = document.querySelectorAll('select')[0].value;\n let book2 = document.querySelectorAll('select')[1].value;\n\n if (book1 != book2) {\n let data = {\n book1: `/api/books/${book1}/`,\n book2: `/api/books/${book2}/`,\n traded: traded,\n };\n postData(url='/api/trades/', data=data);\n }\n });\n\n // utitliy functions\n // get books\n function getListOfBooks(url = '') {\n return fetch(url).then(response => response.text())\n .then(books => {\n return JSON.parse(books);\n });\n }\n\n // build the home page\n function buildHtml() {\n let books = getListOfBooks(url);\n books.then(books => {\n let selectOne = createSelectInput(books, 'book1');\n let selectTwo = createSelectInput(books, 'book2');\n let submit = document.createElement('button');\n\n submit.type = 'submit';\n submit.textContent = 'Submit';\n\n spinners[0].style.display = 'none';\n h3.textContent = 'Make Exchange';\n form.appendChild(selectOne);\n form.appendChild(selectTwo);\n form.appendChild(submit);\n\n }, error => {\n console.log(error.message);\n });\n }\n\n // create select Input & add options\n function createSelectInput(books = [], name = '') {\n let select = document.createElement('select');\n select.name = name;\n books.forEach(book => {\n let option = document.createElement('option');\n option.value = book['id'];\n option.textContent = book['title'];\n select.appendChild(option);\n });\n return select;\n }\n\n }", "title": "" }, { "docid": "86735290332a2fdbdd2cf422e4eb4076", "score": "0.66001546", "text": "function submitClub(e) {\n e.preventDefault()\n let name = document.getElementById('name').value;\n let code = document.getElementById('code').value;\n let description = document.getElementById('description').value;\n // retrieves the selected tags\n let tags = Array.from(document.getElementById('tags').querySelectorAll(\"option:checked\"), e => e.value);\n if (name.trim() === '') {\n alert('Not a valid name!')\n } else {\n fetch(\"/api/clubs\", {\n credentials: 'include',\n method: 'POST',\n headers: {\"Content-Type\": \"application/json\"},\n body: JSON.stringify({\n name: name,\n code: code,\n description: description,\n tags: tags\n })\n }).then(res => {\n if (res.status === 200) {\n window.location.href = '/'\n } else if (res.status === 401) {\n alert('Please login to create a club')\n } else if (res.status === 400) {\n alert('Club create failed. There is a duplicate field')\n } else {\n alert('Club create failed')\n }\n })\n }\n }", "title": "" }, { "docid": "42891dd38d272dff36be486074542db5", "score": "0.65795267", "text": "function submitForm() {\n //check that form is valid before sending\n if (document.getElementById(\"ProfileForm\").checkValidity() == false) {\n console.log(\"Form Invalid.\");\n return;\n }\n //serialize form to JSON\n var dataObject = serializeProfile(document.getElementById(\"ProfileForm\"));\n var jsonData = JSON.stringify(dataObject);\n //find endpoint to use based on if userBaseline data exists\n var apiEndpoint = \"userInfo\";\n if (isNewUser(userData) == true) {\n console.log(\"generating User Baseline...\");\n apiEndpoint = \"generateUserBaseline\";\n }\n //POST JSON to api\n fetch(\"http://localhost:8888/\" + apiEndpoint, {\n method: \"post\",\n body: jsonData,\n }).then(function (response) {\n console.log(\"Server response: \" + response);\n document.getElementById(\"SaveConfirmationText\").innerHTML =\n \"Saved! Go to <a href=/daily-update>Daily-Update</a>\";\n });\n}", "title": "" }, { "docid": "bc31f8dbdb07067b1860b430ff25cf26", "score": "0.657151", "text": "function handleFormSubmit(){\n $('#regist-section').submit('.form-create', event => {\n event.preventDefault()\n const title = $(event.currentTarget).find('.form-title').val()\n const url = $(event.currentTarget).find('.form-url').val()\n const rating = Number($(event.currentTarget).find('.form-rating').val())\n const desc = $(event.currentTarget).find('.form-desc-textarea').val()\n const item = {title,url,rating,desc}\n if(store.create){\n api.addItem(item, (newItem) => {\n store.addItem(newItem)\n store.create = false;\n $('.form-create')[0].reset()\n renderSideBar();\n renderDetail();\n renderForm();\n })\n }else{\n const id = store.getCurrentItem().id\n store.edit = false;\n api.editItem(id, item,(res)=> {\n const foundItem = store.getItem(id)\n Object.assign(foundItem, res)\n renderSideBar();\n renderDetail();\n renderForm();\n })\n }\n })\n $('#regist-section').on('click','.cancel-btn', e=> {\n store.create = false\n store.edit = false\n $('.form-create')[0].reset()\n renderForm();\n })\n }", "title": "" }, { "docid": "e16f235c746a9e3296d707134b031bc8", "score": "0.655676", "text": "function submit_past_activity_onclick() {\n /* Connect to Past Activity Sections */\n let pActAdd = document.getElementById(\"pAct-Add\");\n let pActForm = document.getElementById(\"pAct-Form\");\n \n /* Activity Data to Send to Server */\n let data = {\n date: document.getElementById('pAct-date').value,\n activity: document.getElementById('pAct-activity').value,\n scalar: document.getElementById('pAct-scalar').value,\n units: document.getElementById('pAct-unit').value\n }\n let time = reformat_date(data.date);\n data.date = time;\n\n if (!past_activity_form_is_valid(data)) { \n alert(\"Invalid Past Activity. Please fill in the entire form.\");\n return\n }\n\n /* Hide Form, Show 'Add New Activity' Button */\n pActAdd.classList.remove(\"hide\");\n pActForm.classList.add(\"hide\");\n \n /* Add 'p' tag above 'Add New Activity' Button */\n let newActivity = create_submission_success_element( \n \"Got it! \",\n `${data.activity} for ${data.scalar} ${data.units}. `,\n \"Keep it up!\"\n )\n insert_latest_response(pActAdd, newActivity)\n\n console.log('Past Activity Sending:', data);\n /* Post Activity Data to Server */\n fetch(`/store_past`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(data), // post body\n })\n .then(response => response.json())\n .then(data => {\n console.log('Past Activity Success:', data);\n })\n .catch((error) => {\n console.error('Past Activity Error:', error);\n });\n \n /* Reset Form */\n document.getElementById('pAct-date').valueAsDate = newUTCDate()\n document.getElementById('pAct-activity').value = \"Walk\"\n document.getElementById('pAct-scalar').value = \"\"\n document.getElementById('pAct-unit').value = \"km\"\n}", "title": "" }, { "docid": "00885ce391b09a9ca4c4819c981a6e6c", "score": "0.6527171", "text": "async function submitRequest() {\n\n // Variable for the type id of the reimbursement\n let typeId;\n\n // Variable for the type name\n let typeName = document.getElementById('reimbursement-type').value;\n\n // Get the select input value\n switch (typeName) {\n\n case 'Lodging':\n typeId = 1;\n break;\n\n case 'Travel':\n typeId = 2;\n break;\n\n case 'Food':\n typeId = 3;\n break;\n\n case 'Other':\n typeId = 4;\n break;\n }\n\n // Gather the input fields\n let fieldsArr = [\n document.getElementById('reimbursement-amount').value,\n document.getElementById('reimbursement-description').value,\n ];\n\n if (checkForEmptyFields(fieldsArr)) {\n\n // Create the reimbursement status\n let reimbursementStatus = {\n id: 1,\n status: 'PENDING'\n }\n\n // Create the reimbursement type\n let reimbursementType = {\n id: typeId,\n type: typeName\n }\n\n // Create a reimbursement\n let reimbursement = {\n id: 0,\n amount: fieldsArr[0],\n dateSubmitted: Date.now(),\n dateResolved: null, // Date Resolved will be set when the reimbursement is resolved\n description: fieldsArr[1],\n authorId: localStorage.getItem('userId'),\n resolverId: 1, // All reimbursements need a default value for resolver ( Due to database constraints )\n reimbursementStatus: reimbursementStatus,\n reimbursementType: reimbursementType\n }\n\n // Perform our POST request\n let request = await fetch('submit', {\n method: 'POST',\n headers: {\n 'Accept': 'application/json',\n 'Content-Type': 'application/json',\n 'Authorization': localStorage.getItem('jwt')\n },\n body: JSON.stringify(reimbursement)\n });\n\n if (request.status == 200) {\n\n // Display the alert message\n alertMessage(DASHBOARD_ALERT_ID, SUCCESS_ALERT_CLASS, 'Submission Successful!', false);\n\n // After 2 seconds, turn off the message\n setTimeout(() => {\n alertMessage(DASHBOARD_ALERT_ID, '', '', true);\n }, 2000);\n\n // Clear our request form\n clearRequestForm();\n\n } else {\n\n // Display the alert message\n alertMessage(DASHBOARD_ALERT_ID, DANGER_ALERT_CLASS, 'Unable to process request!', false);\n }\n } else {\n\n // Display the alert message\n alertMessage(DASHBOARD_ALERT_ID, DANGER_ALERT_CLASS, 'Invalid Fields!', false);\n }\n}", "title": "" }, { "docid": "e994f00fd567ec13f9542b59238873a1", "score": "0.6522665", "text": "function Submit(e) {\n const feel = document.getElementById(\"feelings\").value;\n const zipCode = document.getElementById(\"zip\").value;\n\n // submit function was called by the event listenr, and it will take the zip and feeling values, both enterd by the user.\n\n getInfo(urlBase, zipCode, key)\n // getInfo function is the function that will be excuted from calling the submit from the event listener.\n\n .then(function (data) {\n console.log(data);\n post(\"/ADD\", { date: newDate, temp: data.main.temp, feeling: feel });\n })\n // here using promiese (then) to call anthore async function\n .then(function () {\n updateUI();\n });\n //\n}", "title": "" }, { "docid": "50924609aad4451e3d09ff2d38c53f73", "score": "0.65196675", "text": "function submit_barrel(){\n document.querySelector('#edit-barrel-view').style.display = 'block';\n document.querySelector('#submit-barrel-button').style.display= 'block';\n document.querySelector('#save-changes-button').style.display = 'none';\n document.querySelector('#edit-account-view').style.display = 'none';\n document.querySelector('#single-barrel-view').style.display = 'none';\n document.querySelector('#account-view').style.display = 'none';\n document.querySelector('#barrels-view').style.display = 'none'; \n document.querySelector('#filter-view').style.display = 'none';\n document.querySelector('#add-note-view').style.display = 'none';\n document.querySelector('#alerts-view').style.display = 'none';\n\n const title = document.querySelector('#edit-barrel-title').value;\n const estimated_ABV = document.querySelector('#edit-barrel-estimated-ABV').value;\n const beer_style = document.querySelector('#edit-beer-style').value;\n const barrel_category = document.querySelector('#edit-barrel-type').value;\n const fill_date = document.querySelector('#edit-barrel-fill-date').value;\n const pull_date = document.querySelector('#edit-barrel-pull-date').value;\n const description = document.querySelector('#edit-barrel-description').value;\n\n fetch(`/submit_barrel`, {\n method: 'POST',\n body: JSON.stringify({\n title: title,\n estimated_ABV: estimated_ABV,\n beer_style: beer_style,\n barrel_category: barrel_category,\n fill_date: fill_date,\n pull_date: pull_date,\n description: description\n })\n }) \n // .then( () => {\n // alert(\"You've added a barrel to the database.\")\n // })\n .catch(error => {\n console.log('Error:', error)\n })\n .then( () => {\n build_barrels('home');\n })\n}", "title": "" }, { "docid": "23b8e0503a0651edec76a11d177da378", "score": "0.6502863", "text": "async handleSubmit() {\n try {\n const res = await fetch('http://127.0.0.1:8000/api/groceries', {\n body: JSON.stringify(this.state.newItem),\n method: 'POST',\n headers: { 'Authorization': \"Token \" + localStorage.getItem('id_token'), 'Content-Type': 'application/json' },\n });\n if (res.ok) {\n await this._fetchGroceries();\n await this._fetchList(window.location.pathname.match(/\\d+/)[0]);\n await this._fetchUsers(window.location.pathname.match(/\\d+/)[0]);\n this.groceryID();\n this.foreignKey(this.state.lists.slice(-1)[0].id);\n }\n document.getElementById(\"NewGrocery\").value = \"\"\n document.getElementById(\"Description\").value = \"\"\n } catch (e) {\n console.log(e);\n }\n\n }", "title": "" }, { "docid": "b214190bc976357049940a7c0a65ebba", "score": "0.648705", "text": "function submitForm() {\n const appNumber = $('#appt-number').val();\n const appTime = $('#appt-time').val();\n const appDate = $('#appt-date').val();\n const d = grabFormElements();\n console.log(d);\n updateApptList(d);\n appts = getAppts();\n appts = initializeAppts(appts);\n $('#appt-list').html(template(appts));\n document.getElementById('appt-form').reset(); \n }", "title": "" }, { "docid": "a4d225df5eaeb1c72dc4bf0feb3e3d82", "score": "0.64860684", "text": "function submitTodoForm(e){\n e.preventDefault()\n const data = {\n \"content\": document.getElementById('content').value\n };\n\n fetch(BASE_URL, {\n method: 'POST', // or 'PUT'\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(data),\n })\n .then(response => response.json())\n .then(data => {\n // data is the todo object \n const newElement = createNewElement(data)\n document.querySelector('#todos-container').append(newElement)\n document.getElementById('new-todo').reset()\n })\n .catch((error) => {\n console.error('Error:', error);\n });\n\n}", "title": "" }, { "docid": "26eba306522a87bf0683aaef90cb1c4e", "score": "0.6481388", "text": "function createSubmit() {\n $().SPServices({\n operation: \"UpdateListItems\",\n webURL: siteUrl,\n aync: false,\n batchCmd: \"Update\",\n listName: \"ccRequestTracker\",\n ID: qId,\n valuepairs: [[\"REQUEST_STATUS\", \"SUBMITTED\"]],\n completefunc: function(xData, Status) {\n console.log(\"submitRequest: change request status to SUBMITTED\");\n }\n });\n}", "title": "" }, { "docid": "019af23d68ba46ab4a5d11ed0603ff9c", "score": "0.6479371", "text": "function submit_future_activity_onclick() {\n /* Connect to Future Activity Sections */\n let fActAdd = document.getElementById(\"fAct-Add\");\n let fActForm = document.getElementById(\"fAct-Form\");\n \n let date = document.getElementById('fAct-date').value;\n let activity = document.getElementById('fAct-activity').value;\n let date_formated = reformat_date(date);\n let month = get_month(date_formated);\n let day = date_formated[3].toString() + date_formated[4].toString();\n let year = \"20\"+date_formated[6].toString()+date_formated[7].toString();\n let future_time = new Date(month+\" \"+day+\", \"+year+\" 00:00:00 GMT+00:00\");\n\n /* Activity Data to Send to Server */\n let data = {\"date\" : date_formated, \"activity\" : activity, \"epoch\" : future_time.getTime()};\n\n /* Form Validation */\n if (!future_activity_form_is_valid(data)) { \n alert(\"Invalid Future Plan. Please fill in the entire form.\");\n return\n }\n\n /* Hide Form, Show 'Add New Activity' Button */\n fActAdd.classList.remove(\"hide\");\n fActForm.classList.add(\"hide\");\n\n /* Add 'p' tag above 'Add New Activity' Button */\n let newActivity = create_submission_success_element(\n \"Sounds good! Don't forget to come back to update your session for \",\n `${activity} on ${reformat_date(date)}`,\n \"!\"\n )\n insert_latest_response(fActAdd, newActivity)\n\n console.log('Future Plans Sending:', data);\n\n /* Post Activity Data to Server */\n fetch('/store_future', {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(data), // post body\n })\n .then(function (response){\n return(response.json());\n })\n .then(data => {\n console.log(data.msg);\n })\n .catch((error) => {\n console.error('Future Plans Error:', error);\n });\n\n /* Reset Form */\n document.getElementById('fAct-date').valueAsDate = newUTCDate()\n document.getElementById('fAct-activity').value = \"Walk\"\n}", "title": "" }, { "docid": "64f02e071b3a63347dcaa97de18c7f6e", "score": "0.6454453", "text": "function handleListBuildButton() {\n $('.listBuildForm').on('submit', function(event) {\n event.preventDefault();\n const listInput = $('#myInput').val();\n $('#myList').html('');\n\n const settings = {\n url: '/api/users/list/build',\n data: JSON.stringify({\n val: listInput,\n userId: userId,\n listTitle: localStorage.getItem('listTitle'),\n listId: listId\n }),\n dataType: 'json',\n contentType: 'application/json',\n type: 'POST',\n error: function(error) {\n console.log(error);\n },\n success: function(response) {\n const desList = response.lists.find(list => {\n return list.listId === listId;\n })\n\n desList.items.forEach(obj => {\n let inputValue = renderListInput(obj);\n $(\"#myList\").append(inputValue);\n $('.listBuildForm')[0].reset(); \n }) \n }\n }\n\n $.ajax(settings);\n });\n}", "title": "" }, { "docid": "6aaab54b3ddc77648d7243c358f95b59", "score": "0.6452632", "text": "function addContent() {\n //get form content\n //convert form to object\n const formData = {\n title: document.forms[\"newContent\"].elements[\"title\"].value,\n subject: document.forms[\"newContent\"].elements[\"subject\"].value,\n unit: \"5\",\n videoLink: document.forms[\"newContent\"].elements[\"videoLink\"].value,\n markdownLink: document.forms[\"newContent\"].elements[\"markdownLink\"].value,\n resourceLink: document.forms[\"newContent\"].elements[\"resourceLinks\"].value,\n tags: document.forms[\"newContent\"].elements[\"tags\"].value\n }\n // console.log(formData);\n \n\n fetch(\"https://sei-resource-manager.herokuapp.com/lessons\",\n {method: \"POST\",\n mode: \"cors\",\n headers: {\"Content-type\": \"Application/json\"},\n body: JSON.stringify({\n title: document.forms[\"newContent\"].elements[\"title\"].value,\n subject: document.forms[\"newContent\"].elements[\"subject\"].value,\n unit: \"5\",\n videoLink: document.forms[\"newContent\"].elements[\"videoLink\"].value,\n markdownLink: document.forms[\"newContent\"].elements[\"markdownLink\"].value,\n resourceLinks: document.forms[\"newContent\"].elements[\"resourceLinks\"].value,\n tags: document.forms[\"newContent\"].elements[\"tags\"].value\n })\n }); \n \n //send JSON to back end\n}", "title": "" }, { "docid": "8c8db243b44e6341028cf691129baac2", "score": "0.6437467", "text": "buildNewInterestForm() {\n let formDiv = document.createElement(\"div\");\n formDiv.classList = \"card split-div\";\n formDiv.id = \"new-interest-form\";\n let headerDiv = document.createElement(\"div\");\n headerDiv.classList = \"card-header form-header\";\n headerDiv.textContent = \"CREATE NEW POINT OF INTEREST\";\n formDiv.appendChild(headerDiv);\n let bodyDiv = document.createElement(\"div\");\n bodyDiv.classList = \"card-body form-body\";\n let newInterestForm = document.createElement(\"form\");\n newInterestForm.appendChild(_htmlFactory.default.buildRequiredFieldset(\"Name:\", \"Please enter name\", \"name-input\"));\n newInterestForm.appendChild(_htmlFactory.default.buildRequiredFieldset(\"Description:\", \"Please enter description\", \"description-input\"));\n newInterestForm.appendChild(_htmlFactory.default.buildFieldset(\"Cost:\", \"Please enter cost\", \"cost-input\"));\n newInterestForm.appendChild(_htmlFactory.default.buildFieldset(\"Review:\", \"Please enter your review\", \"review-input\"));\n let dropdownFieldset = document.createElement(\"fieldset\");\n let dropdownLabel = document.createElement(\"label\");\n dropdownLabel.textContent = \"Choose location\";\n dropdownFieldset.appendChild(dropdownLabel);\n let dropdown = document.createElement(\"select\");\n dropdown.id = \"dropdown\";\n dropdown.name = \"location\";\n\n _apiManager.default.getPlaces().then(places => {\n places.forEach(place => {\n return dropdown.appendChild(_htmlFactory.default.buildOption(place.name, place.id));\n });\n }).then(() => {\n dropdownFieldset.appendChild(dropdown);\n newInterestForm.appendChild(dropdownFieldset);\n newInterestForm.appendChild(document.createElement(\"hr\"));\n let saveButton = document.createElement(\"button\");\n saveButton.classList = \"btn btn-primary\";\n saveButton.textContent = \"Save Point Of Interest\";\n saveButton.addEventListener(\"click\", _eventHandlers.default.handleSaveInterest);\n newInterestForm.appendChild(saveButton);\n bodyDiv.appendChild(newInterestForm);\n formDiv.appendChild(bodyDiv);\n displayContainer.appendChild(formDiv);\n return newInterestForm;\n });\n }", "title": "" }, { "docid": "3c777622ccf7944ebea2f298c62e5e3e", "score": "0.64330965", "text": "function submitRobot(e){\n e.preventDefault()\n const form = e.target.elements\n const robotName = form.robotName.value\n const robotType = form.robotType.value\n const bodyColour = form.bodyColour.value\n const faceColour = form.faceColour.value\n const highlightColour = form.highlightColour.value\n const personality = form.personality.value\n const message = form.message.value\n \n const robot = {\n robotName, \n robotType,\n bodyColour,\n faceColour,\n highlightColour,\n personality,\n message\n }\n const url = 'http://localhost:3000/robots'\n const options = {\n method: 'POST',\n headers: {'Content-Type': 'application/json'},\n body: JSON.stringify(robot)\n }\n // post robot\n fetch(url, options)\n .then(robot => {\n \n // const newRobot = robot.json()\n // console.log(newRobot)\n // tip: reset form if successfull\n e.target.reset()\n })\n .catch(err => console.error(err))\n}", "title": "" }, { "docid": "d2c0f694582056d2ba4216097214e90e", "score": "0.6431258", "text": "function handelSubmit (e){\n e.preventDefault();\n \n data = {\n \"firstName\": document.getElementById('firstName').value,\n \"lastName\": document.getElementById('lastName').value,\n \"sapId\": document.getElementById('sapId').value,\n \"email\": document.getElementById('email').value,\n \"contactNumber\": document.getElementById('contactNumber').value,\n \"location\": document.getElementById('location').value,\n \"gender\": document.querySelector('input[name = \"gender\"]:checked').value,\n \"language\": languageCheckBox(),\n }\n\n var hiddenUserId = document.getElementById('uid').value;\n if(hiddenUserId == \"\"){\n var URL = 'http://localhost:8090/users';\n var formMethod = \"POST\";\n }else{\n var URL = 'http://localhost:8090/users/'+hiddenUserId;\n var formMethod = \"PUT\";\n }\n\n //Fetch data from backend\n\tfetch(URL, {\n\t\tmethod: formMethod,\n\t\tbody: JSON.stringify(data),\n\t\theaders: {\n\t\t\t'Content-type': 'application/json'\n\t\t}\n\t}).then(function (response) {\n\t\tif (response.ok) {\n //console.log(response.json());\n window.location.href=\"index.html\";\n }\n\t}).then(function (data) {\n console.log(data);\n\t}).catch(function (error) {\n console.warn(error);\n });\n}", "title": "" }, { "docid": "8abb48c43b3c94ae2a673b3a4fdaecfa", "score": "0.6430538", "text": "function submitForm(){\n\n // This event listener is listening onto the form that was inserted inside the div from the rendForm function.\n /* The event listener is listening upon the submit action which is connected to the submit button we created \n inside the innerHTML within the renderForm function. So when the user clicks submit it will perform the logic\n inside the event listener. */\n createMonster.addEventListener(\"submit\", function(event){\n // This prevents the webpage from refreshing after the submit executes\n event.preventDefault()\n \n // This is targeting the form created within the innerHTML inside the renderForm function.\n const form = event.target \n \n /* This is targeting the name, age, and desciprtion that were \n created within the innerHTML inside the renderForm function. */\n const name = form.name.value \n const age = form.age.value \n const description = form.description.value \n\n /* This value, newMonster, is assigned to the values we just created and inserts it inside a hash. This hash\n will be used to post the data to the database. */\n newMonster = {name, age, description}\n \n // This fetches the data URL and assigns it's limit.\n fetch(url(page), {\n /* Fetch is normally assigned to a GET request so in order to post the data we have to overwrite the method to \n POST. */\n /* What's also needed is the headers and the body, and within the body, the JSON that was fetched will be \n formatted in a string format and passed in is the value we just created up top, newMonster. */\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\"\n },\n body: JSON.stringify(newMonster)\n }) \n .then(response => response.json())\n /* After we get our response we render the new monsters inside of the function, renderMonsters, which will then be\n displayed onto the page. */\n .then(newMonster => renderMonsters(newMonster))\n\n // resets the form so the user's previous inputs are not still on the page.\n form.reset();\n })\n}", "title": "" }, { "docid": "9adf3160e53077650b21b917601d4c3b", "score": "0.64274955", "text": "handleSubmit(e) {\r\n // Prevent legacy form post\r\n e.preventDefault();\r\n\r\n // Show the spinner\r\n this.toggleSpinner();\r\n\r\n // Set the form data to be submitted\r\n let formdata = {\r\n sbe: this.state.data.sbe,\r\n sbeId: this.state.data.sbeId,\r\n sbe1: this.state.data.sbe1,\r\n sbe1Id: this.state.data.sbe1Id,\r\n sbe2: this.state.data.sbe2,\r\n sbe2Id: this.state.data.sbe2Id,\r\n ccbId: this.state.data.ccbId\r\n };\r\n fetch(sbeURL,\r\n {\r\n method: 'POST',\r\n body: JSON.stringify(formdata),\r\n headers: new Headers({\r\n 'Content-Type': 'application/json',\r\n Accept: 'application/json',\r\n 'Pragma': 'no-cache',\r\n 'Cache-Control': 'no-cache'\r\n }),\r\n credentials: 'include',\r\n })\r\n .then(FetchUtilities.checkStatusWithSecurity)\r\n .then((response) => {\r\n this.toggleSpinner();\r\n if (response.status === 200) {\r\n this.confirmAlert('SBE Mapped added.', true);\r\n }\r\n })\r\n .catch((error) => {\r\n this.toggleSpinner();\r\n this.confirmAlert(error);\r\n });\r\n }", "title": "" }, { "docid": "98bda8474d5f3d8d5aef42566404a34f", "score": "0.6394916", "text": "submitCreateList(data) {\n\t\tvar url = \"https://www.nicksdevenv.com/api/user_list/\"\n\n\t\tfetch(url, {\n\t\t\tmethod:'post',\n\t\t\theaders: {\n\t\t\t\t\"content-type\":\"application/json\",\n\t\t\t\tAuthorization: `JWT ${localStorage.getItem('token')}`,\n\t\t\t},\n\t\t\tbody: JSON.stringify(data)\n\t\t})\n\t\t.then(response => {\n\t\t\tif (response.ok) {\n\t\t\t\tthis.props.verifyToken();\n\t\t\t}\n\t\t})\n\t}", "title": "" }, { "docid": "7722d262827fb42eb1a50b62c93ecc91", "score": "0.63920915", "text": "async function submitEntry(e) {\n e.preventDefault();\n\n const button = e.target.querySelector('BUTTON')\n button.setAttribute('disabled', true);\n button.innerText = button.dataset.progressLabel;\n\n let payload = new FormData(e.target)\n\n const response = await fetch(e.target.getAttribute('action'), {\n headers: {'Accept': 'application/json'},\n method: 'POST',\n mode: 'same-origin',\n body: payload\n })\n\n if (response.ok) {\n response.json().then((payload) => {\n window.location.href = payload.redirect;\n });\n } else {\n MEDLEY.setErrorMessage('The entry could not be saved.');\n }\n\n button.removeAttribute('disabled')\n button.innerText = button.dataset.defaultLabel;\n }", "title": "" }, { "docid": "d557c6f764ed18468b532f9e6b1680dd", "score": "0.6373333", "text": "async function submitMoon(event){\n event.preventDefault();\n const name = document.getElementById(\"inputName\").value;\n const position = document.getElementById(\"inputPosition\").value;\n const size = document.getElementById(\"inputSize\").value;\n const color = document.getElementById(\"inputColor\").value;\n const parentSystem = document.getElementById(\"inputSolarSystem\").value;\n const parentPlanetsSelect = document.getElementById(\"inputParentPlanet\");\n\n const parentPlanets = [...parentPlanetsSelect.options].filter(option => option.selected).map(option => option.value);\n\n const inputs = {\n name: name,\n position: position,\n size: size,\n color: color,\n parentSystem: parentSystem,\n parentPlanets: parentPlanets\n }\n\n const response = await fetch(\"http://localhost:8080\", {\n method: \"POST\",\n mode: \"cors\",\n headers: {\n \"Content-Type\": \"application/json\"\n },\n body: JSON.stringify(inputs)\n });\n\n return response.json();\n}", "title": "" }, { "docid": "7e5fe54c7e955cb680d0cf8f09999e57", "score": "0.63706934", "text": "function addNewList(e) {\n e.preventDefault()\n\n const listname = document.getElementById('new-list').value;\n\n const addListUrl = `https://api.trello.com/1/lists?name=${listname}&idBoard=${idBoard}&pos=bottom&key=${api}&token=${token}`;\n\n return fetch(addListUrl, {\n method: \"POST\"\n }).then(res => {\n if (res.ok) {\n get();\n return res.json();\n }\n })\n}", "title": "" }, { "docid": "bfcc7343988b3da0c4b3a06a60f75254", "score": "0.63611865", "text": "async function newFormHandler(event) {\r\n event.preventDefault();\r\n\r\n //Await the response to create a company\r\n const response = await fetch(`/api/company`, {\r\n method: 'POST',\r\n body: JSON.stringify(setNewCompanyObject()),\r\n headers: {'Content-Type': 'application/json'}\r\n });\r\n\r\n //Await the response to create new hours\r\n const responseHours = await fetch(`/api/hours`, {\r\n method: 'POST',\r\n body: JSON.stringify(setNewHoursObject()),\r\n headers: {'Content-Type': 'application/json'}\r\n });\r\n\r\n //if both create responses are ok then reload the page to show update dashboard\r\n if (response.ok && responseHours.ok) {\r\n document.location.reload();\r\n } \r\n else {\r\n alert(response.statusText + responseHours.statusText);\r\n }\r\n}", "title": "" }, { "docid": "5ded0066ae9e5543dda5e6b03d04c505", "score": "0.63582754", "text": "function submit() {\n console.log(\"submit\");\n var today = new Date();\n var dd = String(today.getDate()).padStart(2, \"0\");\n var mm = String(today.getMonth() + 1).padStart(2, \"0\");\n var yyyy = today.getFullYear();\n\n today = mm + \".\" + dd + \".\" + yyyy;\n addBook({\n bookcode: values.bookID,\n name: values.name,\n author: values.author,\n description: values.description,\n addeddate: today,\n issuestatus: \"false\",\n });\n\n setShow(false);\n handleChangeDefault();\n }", "title": "" }, { "docid": "489f53550c948912d7249b8bf4a756e9", "score": "0.63567936", "text": "async doSubmit() {\n const { categoryValues, subcategoryValues, topicValues } = this.state;\n if (\n categoryValues.length === 0 ||\n subcategoryValues.length === 0 ||\n topicValues.length === 0\n ) {\n return;\n }\n this.setState({\n buttonDisabled: true,\n });\n try {\n let res = await fetch(\"http://18.220.240.163:8080/rest/admin/matches\", {\n method: \"post\",\n headers: {\n \"Content-Type\": \"application/json\",\n Authorization: UserStore.token, // fetching JWT from UserStore\n },\n body: JSON.stringify({ // fields to be passed in body \n name: \"Friend match2\",\n imageUrl: \"newurl\",\n categoryId: this.state.categoryId,\n subCategoryId: this.state.subcategoryId,\n topicId: this.topicId,\n startDate: \"2020-08-07T18:30:00.000Z\",\n endDate: \"2021-08-25T18:30:00.000Z\",\n }),\n });\n let result = await res.json();\n if (result && result.success) {\n alert(`Success: ${result.success}`);\n } else if (result && result.success === false) {\n alert(`Success: ${result.success}`);\n }\n this.setState({ buttonDisabled: false });\n } catch (e) {\n console.log(e);\n }\n }", "title": "" }, { "docid": "a42cfe3ec26890d307188fb69cd9881b", "score": "0.63354033", "text": "async handleSubmit(e){\n e.preventDefault();\n let pairs = [];\n let form = document.getElementById('form');\n for(let i=0;i<form.elements.length;i++){\n let e = form.elements[i];\n console.log(e);\n console.log(e.name);\n console.log(e.value);\n if(e.value){\n if(e.value !== \"0\"){\n pairs.push(encodeURIComponent(e.name) + '=' + encodeURIComponent(e.value));\n } \n }\n }\n\n let queryString = pairs.join('&');\n let fetchableUrl = form.getAttribute('action') + queryString;\n console.log(fetchableUrl);\n\n this.setState({loadingAdvSearch:true});\n let response = await fetch(fetchableUrl);\n let data = await response.json();\n this.setState({fetchedBeers:data});\n this.setState({loadingAdvSearch:false});\n\n }", "title": "" }, { "docid": "a8a3bd4ca554636a2992b7d3189c8e7e", "score": "0.63251066", "text": "function submitListNameChange(){\n //Grab the form data values and assign them as properties of listData const\n const listData = {\n title: $(\"#changeOfList\").val(),\n _id: $(\"#list-id\").val(),\n cardColor: $(\".editColorSquare.selected\").css(\"background-color\")\n };\n //send the changes as an HTTP PUT request\n $.ajax ({\n method:\"PUT\",\n url: '/api/lists/' + listData._id,\n data: JSON.stringify(listData),\n dataType: 'json',\n contentType: 'application/json'\n })\n /*when the request is finished clear out the form, refresh the index.html list\n buttons, and hide the edit list modal*/\n .done(function(response){\n clearForm();\n refreshButtons();\n $('.editListModal').hide();\n })\n .fail(function(error){\n console.log(\"Oh NO!!! Editing FAIL\", error);\n })\n}", "title": "" }, { "docid": "09a213618942e529d5d675b2af3d4371", "score": "0.6315391", "text": "function postData(e){\n e.preventDefault()\n fetch(\"https://student-challenge-api.herokuapp.com/student\", \n {\n method:\"POST\",\n headers: {\n 'Content-Type': 'application/json',\n 'Accept': 'application/json'\n },\n body: JSON.stringify({name:\"Sinan\",last_name:\"Cengiz\"})\n }\n )\n .then(response => response.json())\n .then(data => console.log(data));\n\n handle_students_function(students_list)\n var new_student_form = document.getElementById(\"form\");\n new_student_form.style.display = \"block\";\n}", "title": "" }, { "docid": "f0d685e4af18dd3771ea4d064eb18ffb", "score": "0.6314202", "text": "function submit(e) {\n e.preventDefault(); // Submit Function\n\n const user_data = {\n foodname: FOOD_NAME,\n ingredient_image: INGREDIENTS_IMAGE,\n ingredient_type: INGREDIENT_TYPE,\n unit: UNIT,\n quantity: QUANTITY,\n fat: FAT,\n carbs: CARBS,\n protein: PROTEIN,\n food_type: FOOD_TYPE,\n vegan: VEGAN,\n eggiterian: EGGITARIAN,\n non_vegiterian: NON_VEGETARIAN,\n vegiterian: VEGETARIAN,\n calories: CALORIES\n };\n\n create_ingredients_api(user_data).then((res) => {\n\n if (res.data !== undefined && res.data.RET_CODE === 200) {\n alert(\"Ingredients created successfully.\");\n window.location.reload();\n } else {\n alert(`${res.data.message}`);\n }\n });\n }", "title": "" }, { "docid": "dc767dab845a68a54c04d4b474b4a44d", "score": "0.63095766", "text": "function submitData(){\n\tvar id = Math.floor(Math.random()*5551212);\n\t\n// Gathering data in an object. Object has array with form label and input label\n\tgetRadio();\n\tvar item ={};\n\t\titem.newUsed =[\"New or Used: \", newUsedValue];\n\t\titem.make =[\"Make: \", gid(\"makes\").value];\n\t\titem.model =[\"Model: \", gid(\"models\").value];\n\t\titem.year =[\"Year: \", gid(\"year\").value];\n\t\titem.mileage =[\"Mileage: \", gid(\"mileage\").value];\n\t\titem.condition =[\"Condition: \", gid(\"condition\").value];\t\n\t\titem.date =[\"Date: \", gid(\"date\").value];\n\t\titem.notes =[\"Notes: \", gid(\"notes\").value];\n\t\t\n// Use stringify to convert object to string and save data to local storage\n\tlocalStorage.setItem(id, JSON.stringify(item));\n\talert(\"Vehicle added!\")\n\t\t\n}", "title": "" }, { "docid": "8c790529f0cd8eecc47988ff98076907", "score": "0.63077253", "text": "function main(){\n populateCountrySelect();\n setNameInput();\n setCountriesSelect();\n setExpensesInput();\n setCurrencyInput();\n setBudgetInput();\n setSubmitButton();\n}", "title": "" }, { "docid": "54407867fce5e97ba675d2780f62aaf4", "score": "0.6301242", "text": "function checkSubmit() {\n // let options = document.querySelector('input[name=cRadio]:checked').value\n // console.log(options)\n let submitContent = {\n \"line\": lineName,\n \"equipment\": equipment,\n \"checkName\": checkName,\n \"beaconId\": beaconId,\n \"properBeaconId\": properBeaconId,\n \"userId\": userId,\n }\n console.log(submitContent);\n\n fetch(\"http://k4b101.p.ssafy.io/api/checksheet/\", {\n method: \"POST\",\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(submitContent),\n })\n .then((res) => res.json())\n .then((result) => {\n console.log(result.status)\n if (result.status) {\n // alert(`${checkName} 제출이 완료되었습니다.`)\n const modal = document.createElement(\"div\")\n const modal__background = document.createElement(\"div\")\n const modal__yes = document.createElement(\"div\")\n \n modal.className = 'modal'\n modal__background.className = 'modal__background'\n modal__yes.className = 'modal__yes'\n \n modal.innerHTML = `${checkName} 제출이 완료되었습니다.`\n modal__yes.innerHTML = '확인'\n modal.appendChild(modal__yes)\n\n const checklist__body = document.querySelector('body')\n\n checklist__body.appendChild(modal)\n checklist__body.appendChild(modal__background)\n // window.history.back()\n }\n })\n .catch((err) => console.log(err))\n}", "title": "" }, { "docid": "912c19a88c68257e69334f47cdda7dac", "score": "0.6299462", "text": "handleSubmit(key) {\n\n let url = '';\n\n if (this.state.dropDown === 'Delete') {\n url = '/goal/delete'\n } else if (this.state.dropDown === 'Complete') {\n url = '/goal/complete';\n } else {\n url = '/goal/update'\n }\n\n fetch(url, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n id: this.state.id,\n goalTitle: this.state.modalTitle,\n goalDescription: this.state.modalDescription,\n goalImage: this.state.modalImage,\n starred: this.state.starred,\n completed: this.state.completed\n }),\n });\n\n window.location.reload();\n }", "title": "" }, { "docid": "b1c8c523fd5c1c0a693cb34d3b41b8ed", "score": "0.629841", "text": "function submitActions(){\n //this method is used to create new business\n $('.send_data').live(\"click\",function(e) {\n // j=1;\n e.preventDefault();\n var item={};\n var hist=$(\"input.fieldhists\").val();\n var splited=splitFieldNames(hist);\n \n var lengths=splited.length;\n item[\"action\"]=\"senddata\";\n item[\"fieldname\"]=createListArray(hist,\",\");\n item[\"transacc\"]=createFormArray(\"transacc\");\n for(var i=0; i<lengths; i++){\n item[$.trim(splited[i])]=createFormArray($.trim(splited[i]));\n }\n console.log(item);\n comasajax(url,item,\"post\",\"json\");\n resetFields(\"accountdata\"); //reset the fields\n});\n\n //this method is used to create new business\n $('.create_biz').live(\"click\",function(e) {\n j=1;\n e.preventDefault();\n var out0=createFormArray(\"bizname\");\n var out=createFormArray(\"location\");\n var out1=createFormArray(\"biztype\");\n var out2=createFormArray(\"totalaccs\");\n var out3=createFormArray(\"currency\");\n totalacc=out2[0];\n k=1;\n comasajax(url,{\"action\":\"createbiz\",\"bizname\":out0,\"location\":out,\"biztype\":out1,\"totalaccs\":out2,\"currency\":out3},\"post\",\"json\");\n resetFields(\"newbusines\"); //reset the fields\n progress=\"40%\";\n});\n\n //this method is used to create book of account\n $('.create_book').live(\"click\",function(e) {\n j=0;\n \n e.preventDefault();\n var out0=createFormArray(\"bookname\");\n var out=createFormArray(\"fieldname\");\n var out1=createFormArray(\"datatype\");\n var out2=createFormArray(\"acctype\");\n comasajax(url,{\"action\":\"createacc\",\"bookname\":out0,\"fieldname\":out,\"datatype\":out1,\"acctype\":out2},\"post\",\"json\");\n acc_created++;\n resetFields(\"accbooks\"); //clear the fields\n $(\"div.more_fields\").html(\"\"); //remove the extra fields\n k=1;\n if(k!=0){\n $(\"div.myaccounts\").html(\"<strong>created accounts \"+acc_created+\"/\"+totalacc+\"</strong>\");\n }\n if(acc_created==totalacc){\n $(\"div.myaccounts\").html(\"\");\n console.log(totalacc);\n acc_created=0;\n totalacc=1;\n k=0;\n j=1;\n }\n progress=\"60%\";\n});\n\n//this method is used to create book of account\n $('.create_rel').live(\"click\",function(e) {\n j=0;\n e.preventDefault();\n var out0=createFormArray(\"sourceacc\");\n var out=createFormArray(\"sourcefield\");\n var out1=createFormArray(\"destacc\");\n var out2=createFormArray(\"destfield\");\n var out3=createFormArray(\"relation\");\n comasajax(url,{\"action\":\"createrel\",\"sourceacc\":out0,\"sourcefield\":out,\"destacc\":out1,\"destfield\":out2,\"relation\":out3},\"post\",\"json\");\n \n resetFields(\"accountsrelate\"); //clear the fields\n $(\"div.addrelation\").html(\"\"); //remove the extra fields added\n j=1;\nprogress=\"80%\";\n});\n\n//this method is used to save relations\n $('.create_rel').live(\"click\",function(e) {\n j=1;\n e.preventDefault();\n var out0=createFormArray(\"sourceacc\");\n var out=createFormArray(\"sourcefield\");\n var out1=createFormArray(\"destacc\");\n var out2=createFormArray(\"destfield\");\n var out3=createFormArray(\"relation\");\n\n comasajax(url,{\"action\":\"saverelation\",\"sourceacc\":out0,\"sourcefield\":out,\"destacc\":out1,\"destfield\":out2,\"relation\":out3},\"post\",\"json\");\n resetFields(\"accountsrelate\"); //reset the fields input.\n $(\"div.addrelation\").html(\"\"); //remove the extra field addedd\n progress=\"86%\";\n});\n\n//this method is used to Add Bank Accounts\n $('.create_bank').live(\"click\",function(e) {\n j=1;\n e.preventDefault();\n var out0=createFormArray(\"bankname\");\n var out=createFormArray(\"accname\");\n var out1=createFormArray(\"accnumber\");\n var out2=createFormArray(\"currency\");\n var out3=createFormArray(\"currbalance\");\n console.log(out0+out+out1+out2+out3);\n comasajax(url,{\"action\":\"createbank\",\"bankname\":out0,\"accname\":out,\"accnumber\":out1,\"currency\":out2,\"currbalance\":out3},\"post\",\"json\");\n resetFields(\"newbank\"); //reset the fields\n progress=\"95%\";\n});\n}", "title": "" }, { "docid": "0e090a80eea3e0cc2f183be7293fd744", "score": "0.6285493", "text": "function addQnA() {\n\n let category = document.getElementById(\"category\").value;\n\tlet newQuestion = document.getElementById('question').value;\n\tlet newAnswer = document.getElementById('answer').value;\n const qAnda = {\n table: category,\n question: newQuestion,\n answer: newAnswer\n }\n console.log(JSON.stringify(qAnda))\n if(qAnda.table && newQuestion && newAnswer){\n\n console.log(\"starting post\")\n // POST\n fetch(`${window.origin}/api/add`, {\n\n // Declare what type of data we're sending\n headers: new Headers({\n 'Content-Type': 'application/json'\n }),\n\n // Specify the method\n method: 'POST',\n\n // A JSON payload\n body: JSON.stringify(qAnda)\n }).then(function (response) { // At this point, Flask has printed our JSON\n if(response.status !== 200) {\n console.log(`Response status was not 200: ${response.status}`);\n }\n btnMessage(\"Added\", \"greenyellow\")\n })\n } else if(!qAnda.table) {\n \n btnMessage(\"Failed\", \"red\", \"Choose a category.\")\n \n } else {\n btnMessage(\"Failed\", \"red\", \"Missing question or answer.\")\n }\n clearInput()\n}", "title": "" }, { "docid": "b56ced7dc287a4413bd02c495da29757", "score": "0.6279575", "text": "function post_request(event) {\r\n\r\n //Prevents the browser from doing the normal submission\r\n event.preventDefault();\r\n \r\n // The form was the one that triggered the even after the\r\n // user clicked the submit button (see the evenHandler)\r\n // at the end of this page. Therefore, event.target returns \r\n // the element that triggered the event\r\n const form = event.target;\r\n\r\n //We use the reference to the form to obtain \r\n //the values entered by the user\r\n const firstname = form.firstname_post.value;\r\n const lastname = form.lastname_post.value;\r\n\r\n //URL for the request to be sent\r\n let url = new URL(resource);\r\n\r\n // Data to be included in the request\r\n let params = {\r\n firstname_post: firstname, \r\n lastname_post: lastname\r\n };\r\n\r\n // Here we create the request\r\n fetch(url, \r\n {\r\n method: 'POST',\r\n headers: {\r\n \"Content-Type\": \r\n \"application/json; charset=utf-8\",\r\n },\r\n body: JSON.stringify(params)\r\n }\r\n )\r\n .then(\r\n function (response) {\r\n return response.json();\r\n }\r\n )\r\n .then(\r\n function (json) {\r\n // json is a string. JSON.parse(json) returns an object that\r\n // lets us to easily access all the data in such string.\r\n const obj = JSON.parse(json); \r\n\r\n //This paints new HTML in the web page\r\n const output = document.querySelector(\"#result-post\");\r\n output.innerHTML = \r\n '<h3>Output</h3>' +\r\n 'Firstname ' + obj.first_name + \r\n ' - Lastname:' + obj.last_name + \r\n ' - Message:' + obj.message;\r\n }\r\n )\r\n .catch(\r\n function (err) {\r\n alert(err);\r\n }\r\n )\r\n\r\n}", "title": "" }, { "docid": "45b94f723b9339019c8dfc08fa8c8f41", "score": "0.6273204", "text": "submit() {\n this.loading = true;\n\n //get tags\n if (this.tagger) {\n this.model.tags = this.tagger.getTags().values;\n }\n\n if (this.update) {\n //update\n this.client\n .put(`/project/id/${this.model._id}`, this.model)\n .then(data => {\n this.loading = false;\n if (data && data.message) {\n Materialize.toast(data.message, 5000);\n //go to the list\n window.location.hash = '#/project-list';\n }\n });\n } else {\n //create\n this.client.post('/project/', this.model).then(data => {\n this.loading = false;\n if (data && data.message) {\n Materialize.toast(data.message, 5000);\n //go to the list\n window.location.hash = '#/project-list';\n }\n });\n }\n }", "title": "" }, { "docid": "55022a2a179910c5663b53121952c41e", "score": "0.625646", "text": "createDictionaryData(event) {\n event.preventDefault();\n\n //handleCreateSubmit(topic, title, explanation, example, reference)\n var token = localOrSessionToken();\n let createData = {\n topic: this.refs.topic.value,\n title: this.refs.title.value,\n explanation: this.refs.explanation.value,\n example: this.refs.example.value,\n reference: this.refs.reference.value,\n auth: {\n \"token\": token\n }\n }\n // Need to store the auth token.\n\n // First we do some simple checking of the input.\n if (createData.title === \"\") {\n alert(\"Sorry for alert, but you must write a title!\");\n }\n else if (createData.explanation.length < 10 ||\n createData.explanation.length > 500) {\n alert(\"The explanation must be longer than 10 chars and no longer than 500 chars!\");\n }\n else if (createData.example.length > 200 ||\n createData.reference.length > 150) {\n alert(\"Example or reference is to long!\")\n }\n else {\n // We are good to go, lets uppload.\n const url = \"/api/dictionary/create\";\n\n fetch(url, {\n method: 'POST',\n body: JSON.stringify(createData),\n headers: new Headers({\n 'Content-type': 'application/json'\n })\n }).then(res => res.json())\n .catch(error => console.error('Error:', error))\n .then((response) => {\n // On success we cast a function that creates a success page\n if (response.successMessage) {\n this.props.handleCreateSubmit(true);\n\n console.log(response.successMessage);\n }\n else {\n this.props.handleCreateSubmit(false);\n console.log(response.failMessage);\n }\n });\n }\n }", "title": "" }, { "docid": "5fb9ab1901aa2bb17ce79c21c13fd0dc", "score": "0.62529486", "text": "async function submit() {\n var shopName = document.getElementById(\"newShopName\");\n var caption = document.getElementById(\"newCaption\");\n\n if ((shopName.value.length !== 0) && (caption.value.length !== 0)) {\n const url = (`/save?shopName=${shopName.value}&caption=${caption.value}`);\n window.location.href = \"index.html\";\n const response = await fetch(url);\n } else {\n //validation\n alert(\"All input boxes must be filled.\");\n };\n}", "title": "" }, { "docid": "680ca823573241eabb9704e83c2a4d09", "score": "0.6252074", "text": "function handleSubmitBtnClick(e) {\n e.preventDefault();\n // object to capture product info before saving to database\n const ProductInfo =\n {\n name: name.current.value,\n description: description.current.value,\n packaging: [{\n size: packagingSize1.current.value,\n price: packagingPrice1.current.value,\n quantity: packagingQuantity1.current.value\n },\n {\n size: packagingSize2.current.value,\n price: packagingPrice2.current.value,\n quantity: packagingQuantity2.current.value\n }],\n healthBenefit: healthBenefit.current.value,\n picLink: picURLInput,\n historyDetails: historyDetails.current.value,\n family: {\n baking: family.baking,\n grilling: family.grilling,\n seasoning: family.seasoning,\n extracts: family.extract,\n teas: family.tea\n },\n region: {\n india: region.india,\n asia: region.asia,\n carribean: region.carribean,\n middleEast: region.middleEast,\n african: region.africa,\n latinAmerica: region.latinAmerica,\n europe: region.europe\n },\n productID: productID.current.value,\n }\n\n console.log(ProductInfo);\n // api call to save new product to db\n API.saveProducts(ProductInfo)\n .then(res => {\n // check if successful save\n if(res.status === 200) {\n }\n })\n .catch(err => console.log(err));\n }", "title": "" }, { "docid": "a1500c759dee0eb3d89ffed65daf0bfd", "score": "0.62456214", "text": "autoSubmit() {\n }", "title": "" }, { "docid": "50750f880aff745b5540649b23c23d0b", "score": "0.6238553", "text": "submit() {\n // TODO: maybe a new data type? or submit remotely?\n }", "title": "" }, { "docid": "bdc69d5975e52205db9218b1d76cb7ec", "score": "0.6234356", "text": "submit_form(e) {\n e.preventDefault()\n let body_fields = {\n content_type: 'singular_lower',\n fields,\n }\n fields.forEach(f => body_fields[f] = this.state.form[f])\n\n fetch('/singular_lower/', {\n method: 'POST',\n credentials: 'include',\n headers: {\n 'Accept': 'application/json',\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(body_fields)\n })\n .then(blob => blob.json())\n .then(res => {\n if (res.status === 200){\n Router.push(\n `/singular_lower?id=${res.data.pk}`,\n `/singular_lower/${res.data.pk}`\n )\n } else {\n let field_errors = {}\n Object.keys(res.data).forEach(field => {\n field_errors[field] = res.data[field].join('. ')\n })\n let errors = Object.assign({}, this.state.errors, field_errors)\n this.setState({ errors })\n }\n\n })\n .catch(e => {\n console.error(e)\n let errors = Object.assign({}, this.state.errors, {\n message: 'Sorry, we had trouble communicating with the database.'\n })\n this.setState({ errors })\n })\n }", "title": "" }, { "docid": "cca1d5ae83d53ad6eac7fbfe22dcb226", "score": "0.62327385", "text": "function onFormSubmit() {\n\t\tvar action = $(this).text(),\n\t\t\tinput = dom.form.find('input[name=\"list_name\"]'),\n\t\t\ttitle = input.val(),\n\t\t\tid = this.dataset.id;\n\n\t\thideForm();\n\n\t\t/* Skip if no list name was entered */\n\t\tif (title.trim() != '') {\n\t\t\tif (action === labels.LBL_CREATE) {\n\t\t\t\tList.createList(title);\n\t\t\t}\n\t\t\tif (action === labels.LBL_UPDATE && actionChooserList.title != title) {\n\t\t\t\tList.renameList(id, title);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "04bcc6fd2d989499a9eb467b222b1317", "score": "0.6225546", "text": "submitDetails() {}", "title": "" }, { "docid": "9a9ac62452d1e0e6b50c75cedc575e94", "score": "0.6223041", "text": "function formSubmission(doc, list, pilot, copilot, fuelLevel, cargoLevel) {\n let submitReady = true;\n if (validateInput(pilot) === \"Empty\" || validateInput(copilot) === \"Empty\" || validateInput(fuelLevel) === \"Empty\" || validateInput(cargoLevel) === \"Empty\") {\n alert(\"Please enter data for all fields.\");\n submitReady = false;\n event.preventDefault();\n }\n if (validateInput(pilot) === \"Is a Number\") {\n alert(\"Invalid pilot input!\");\n submitReady = false;\n event.preventDefault();\n }\n if (validateInput(copilot) === \"Is a Number\") {\n alert(\"Invalid copilot input!\");\n submitReady = false;\n event.preventDefault(); \n }\n if (validateInput(fuelLevel) === \"Not a Number\") {\n alert(\"Invalid fuel level input!\");\n submitReady = false;\n event.preventDefault(); \n }\n if (validateInput(cargoLevel) === \"Not a Number\") {\n alert(\"Invalid cargo level input!\");\n submitReady = false;\n event.preventDefault(); \n }\n if (submitReady === true) {\n list.style.visibility = \"visible\";\n document.getElementById(\"pilotStatus\").innerHTML = `Pilot ${pilot.value} is ready for launch`;\n document.getElementById(\"copilotStatus\").innerHTML = `Copilot ${copilot.value} is ready for launch`;\n if (fuelLevel.value < 10000) {\n document.getElementById(\"fuelStatus\").innerHTML = `Not enough fuel`;\n document.getElementById(\"launchStatus\").innerHTML = `Shuttle Not Ready For Launch`;\n document.getElementById(\"launchStatus\").style.color = \"red\";\n }\n if (cargoLevel.value > 10000) {\n document.getElementById(\"cargoStatus\").innerHTML = `Too much cargo for liftoff`;\n document.getElementById(\"launchStatus\").innerHTML = `Shuttle Not Ready For Launch`;\n document.getElementById(\"launchStatus\").style.color = \"red\";\n }\n if (cargoLevel.value <= 10000 && fuelLevel.value >= 10000) {\n document.getElementById(\"launchStatus\").innerHTML = `Shuttle Ready For Launch`;\n document.getElementById(\"launchStatus\").style.color = \"green\";\n }\n }\n}", "title": "" }, { "docid": "092f509d368e1abc47937dd228654b19", "score": "0.6214999", "text": "function performAction(e){\n // Select the actual value of an HTML input to include in POST\n const feelings = document.getElementById('feelings').value;\n\n // an API call\n const newZip = document.getElementById('zip').value;\n getZip(baseURL, newZip, apiKey)\n // New Syntax!\n .then(function(data){\n console.log(data)\n // Add data to POST request\n postData('/add', {temp:data.main.temp, date:newDate, input:feelings});\n // Update UI\n updateUI()\n })\n}", "title": "" }, { "docid": "1cc8f54ade9e792656ecc851e221c7cc", "score": "0.619925", "text": "function handleSubmit(e) {\n\t\te.preventDefault();\n\t\tgetList();\n\t}", "title": "" }, { "docid": "c7c8ef803d91b2c3eb0dfcca65d192bc", "score": "0.6193007", "text": "function newReimbursementSubmit(event) {\n event.preventDefault(); // stop page from refreshing\n console.log('submitted');\n \n const reimbs = getReimbFromInputs();\n console.log(reimbs);\n\n fetch('http://localhost:8080/ERS/reimbursements/view-reimbursement', {\n method: 'POST',\n body: JSON.stringify(reimbs),\n headers: {\n 'content-type': 'application/json'\n },\n mode: 'cors',\n })\n .then(res => res.json())\n .then(data => {\n addReimbursementToTableSafe(data);\n console.log(data);\n })\n .catch(err => console.log(err));\n}", "title": "" }, { "docid": "7e23cac2fcb313bd5c48a3b7aa68fec5", "score": "0.6182427", "text": "function main() {\n var form = $(\"#js-shopping-list-form\");\n form.submit(function(e) {\n var input = $(\"#shopping-list-entry\").val();\n $(\".shopping-list\").append('<li><span class=\"shopping-item\">' + input + '</span>' + buttonWrapper + checkedButton + \" \" + deleteButton + '</div></li>');\n e.preventDefault();\n });\n }", "title": "" }, { "docid": "dc5bb9e78fa480cb73e2c8cf8196d9c5", "score": "0.61822337", "text": "function submit() {\n console.log($('#toDoNameInput').val());\n console.log($('#toDoNotesInput').val());\n console.log($('#toDoDoneSelect option:selected').text());\n \n \n $.post({\n url: `${Airtable.API}/To%20Do`,\n headers: {\n authorization: `Bearer ${Airtable.API_KEY}`,\n contentType: \"application/json\"\n \n },\n \n data: {\n \"fields\": {\n \"Name\": $(`#toDoNameInput`).val(),\n \"Notes\": $(`#toDoNotesInput`).val(),\n \"Done\": $(`#toDoDoneSelect option:selected`).text(),\n \n },\n }\n \n \n })\n .fail(() => {\n console.error(\"You failed\");\n })\n .done ((response) =>{\n console.log(response);\n \n })\n \n \n // Start your $.post here\n // on fail, console.error out the error you recieve\n // on done, log out the response\n }", "title": "" }, { "docid": "41d3745f17619db2fd8235925b7bdb9b", "score": "0.61806166", "text": "function submitForm() {\n const taskData = {\n lang: valueOf('scriptLang'),\n name: valueOf('scriptName'),\n code: valueOf('scriptCode')\n };\n postData('/api/tasks', taskData).then(response => {\n formAlert('Task #' + response.id + ' created');\n console.log(JSON.stringify(response));\n document.getElementsByTagName('form')[0].reset();\n });\n}", "title": "" }, { "docid": "0d45d0af68114ad059d3479e1bb0f00c", "score": "0.6171985", "text": "function main() {\n //Load the corresponding items to the passed get parameter.\n let list_id = getQueryParam(\"list_id\");\n\n addHiddenToForm(list_id)\n\n // Load the unpurchased List\n itemsAPI.getByListUnpurchased(list_id)\n .then(items => {\n console.log(items)\n let list = itemRenderer.asList(items, true);\n shoppingList.appendChild(list);\n })\n .catch(error => messageRenderer.showErrorAsAlert(error));\n\n // Load the purchased List\n itemsAPI.getByListPurchased(list_id)\n .then(items => {\n console.log(items)\n let list = itemRenderer.asList(items, false);\n removedList.appendChild(list);\n })\n .catch(error => messageRenderer.showErrorAsAlert(error));\n\n // Handle the form's submit event\n itemForm.addEventListener(\"submit\", function (event) {\n handleSendList(event);\n });\n}", "title": "" }, { "docid": "e0495af26363ed264bb25db7323c0a2d", "score": "0.61633116", "text": "async function submitForm(event) {\n event.preventDefault(); \n\n setIsLoading(true);\n\n // Change variable declaration to match API request keys\n const name = restaurantName; \n const description = restaurantCategory;\n const songLink = \"\"; \n const cold = (restaurantColdness ? \"Y\" : \"N\");\n const hot = (restaurantHotness ? \"Y\" : \"N\");\n const temperate = (restaurantTemperateness ? \"Y\" : \"N\");\n const precip = (restaurantRainyness ? \"Y\" : \"N\"); \n\n try {\n const fileName = suggestionFile.current ? await s3Upload(suggestionFile.current) : null; \n await postRestaurantEntry(\n {name,\n fileName,\n description,\n songLink, \n cold, \n hot,\n temperate,\n \"tableName\" : TABLE_NAME,\n precip \n }); \n history.push(\"/suggestion/another\")\n }\n\n catch (e) {\n onError(e);\n setIsLoading(false); \n }\n }", "title": "" }, { "docid": "07856be693675205f81dafce2b6aa944", "score": "0.61500335", "text": "async handleSubmit() {\n const bandClient = await BandProtocolClient.make({\n provider: window.BandWallet.ref.current.state.provider,\n })\n\n const kvs = { ...this.state.kvs }\n // delete keys that won't use convertToChain\n delete kvs['info:logo']\n delete kvs['info:banner']\n\n // create keys, values array\n const keys = []\n const values = []\n for (var k in kvs) {\n keys.push(k)\n values.push(kvs[k].toString())\n }\n\n await bandClient.deployCommunity(\n this.state.name,\n this.state.symbol,\n this.state.kvs['info:logo'],\n this.state.kvs['info:banner'],\n this.state.description,\n this.state.url,\n this.state.organization,\n '0x6E9ea65099fC2948884Fb768B09E6559Af84Afe4', // this.state.voting,\n keys,\n values,\n this.state.curve.collateral,\n )\n\n this.props.history.push('/')\n }", "title": "" }, { "docid": "93f6944bbf85d3938732c77c6e9c3686", "score": "0.61412436", "text": "async function onSubmit(event){\r\n event.preventDefault();\r\n const form = document.querySelector('.new-topic-border form');\r\n const d = new Date;\r\n const formData = new FormData(form);\r\n const comment = {\r\n topicName: formData.get('topicName'),\r\n username: formData.get('username'),\r\n postText: formData.get('postText'),\r\n date: d\r\n };\r\n if(comment.topicName == ''|| comment.username == ''|| comment.postText == ''){\r\n return alert('All fields are required!');\r\n }\r\n const response = await fetch('http://localhost:3030/jsonstore/collections/myboard/posts', {\r\n method:'post',\r\n headers:{\r\n 'Content-Type': 'apllication/json'\r\n },\r\n body:JSON.stringify(comment)\r\n });\r\n if (response.ok) { \r\n const data = await response.json();\r\n postFirstComment(data._id, comment);\r\n form.reset();\r\n getPosts();\r\n }else{\r\n const error = response.json();\r\n alert (error.message);\r\n }\r\n}", "title": "" }, { "docid": "95bff5d7838937b57820e9be2848a581", "score": "0.6138952", "text": "function submitAnswers() {\n\n let allAnswers = document.getElementsByClassName('selectBox');\n\n let response = {\"answers\": []};\n\n for (i = 0; i < allAnswers.length; i++) {\n response.answers.push({\n \"questionId\": Number(allAnswers[i].id),\n \"answerId\": Number(allAnswers[i].value)\n });\n }\n\n fetch('/api/v1/question', {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(\n response\n )\n }).then(res => {\n if (res.status === 200) {\n res.json().then(json => {\n window.localStorage.setItem('ecocalculator.results', JSON.stringify(json));\n window.location.assign('./results.html');\n });\n } else {\n const errorDisplay = document.getElementById('errorDisplay');\n errorDisplay.innerText = \"Please answer all of the questions\";\n errorDisplay.style.margin = \"1em 0 1em 0\";\n }\n })\n}", "title": "" }, { "docid": "3431cb5ff8a3c8b13f34033e6b578452", "score": "0.61263484", "text": "async function mySubmit(e) {\n\n e.preventDefault();\n\n if (!update) {\n\n // cadastrar o dev\n\n await handleAddDev({\n github_username,\n techs,\n latitude,\n longitude,\n });\n\n setGithubUsername('');\n setTechs('');\n\n } else {\n\n // editar o DEV\n\n await handleUpdateDev({\n github_username,\n techs,\n latitude,\n longitude,\n });\n\n setGithubUsername('');\n setTechs('');\n }\n\n }", "title": "" }, { "docid": "968cb7c9ae0fd3f20b7b2ecfd73e3aac", "score": "0.6120899", "text": "async function addBurger(){\n\n if(document.querySelector(\"#burgerName\").value === \"\"){\n alert(`Enter the burger name`)\n }\n else{\n console.log( `[submitQuote] create button pressed` )\n \n const burgerData = {\n burger_name: document.querySelector(\"#burgerName\").value\n }\n const result = await fetchJSON( `/api/add`, 'POST', burgerData )\n // Reload the page to get the updated list\n location.reload()}\n }", "title": "" }, { "docid": "58cef6baee16ca196e0a6bb642561785", "score": "0.6118716", "text": "function functionToExecuteWhenFormSubmits(event) {\n // PREVENT PAGE FROM REFRESHING (a method function provided by browser/event)\n event.preventDefault();\n\n // Extract our input value from event\n const taskFromInputValue = event.target[0].value;\n\n // create a list element to be added to our page\n const listItem = document.createElement('li');\n //add our extracted value to this new element we made\n listItem.innerHTML = taskFromInputValue;\n\n // add click event listener to our list ITEM\n listItem.addEventListener('click', listClickEvent);\n\n //add it to our page list\n list.appendChild(listItem);\n\n event.target[0].value = '';\n}", "title": "" }, { "docid": "e9c5cefefb306cd20c5a4ef66d69f673", "score": "0.6115042", "text": "function sendFormToAPI(e) {\n e.preventDefault();\n\n var token;\n chrome.storage.local.get('token_', (res)=>{\n if (res['token_']) {\n token=res['token_'];\n } else {\n alert('Token not set!');\n }\n\n });\n\n\n const formData = new FormData(e.target)\n\n const request_init = {\n method: 'POST',\n mode: 'cors',\n headers: {\n 'Accept': 'application/json',\n 'Content-Type': 'application/json',\n 'Authorization': 'Bearer ' + token\n },\n body: JSON.stringify(Object.fromEntries(formData))\n };\n\n fetch(api_posts_url, request_init)\n .then((response)=>{\n if (!response.ok) {\n throw new Error('HTTP error! status: '+response.status+'\\n'+response.body);\n }\n return response;\n })\n .then((response) => {\n alert('Sent!');\n });\n}", "title": "" }, { "docid": "9f9a237d143b5e04e7724ba36097b325", "score": "0.6097971", "text": "async function handleClickButtonSubmit (event) {\n event.preventDefault();\n setAPIKeyValue(apiKey);\n setViewType(ViewType.MAIN);\n }", "title": "" }, { "docid": "b90486a05672b4d33409a67008868cba", "score": "0.6094831", "text": "function addWork(){\n //Create the html to add a work\n\n //Create the html to add a work\n\n form_string = \"\"\n form_string +='<div class=\"container\">'\n form_string += addInputRow(\"Title\")\n form_string += addInputRow(\"Rating\")\n form_string += addInputRow(\"Notes\")\n form_string +='</div>'\n\n form_string+= nameSection(\"Link\")\n form_string+= checkSectionStyled(\"\", short_siteList,\"btn-success\")\n form_string+= \"<br>\"\n form_string +='<div class=\"container\">'\n form_string += addInputRow(\"Other\")\n form_string +='</div>'\n\n for (t of typesList){\n form_string+= nameSection(t[0])\n form_string+= checkSectionStyled(t[0], t[1],\"btn-success\")\n }\n form_string += '<br><div><button type=\"button\" class=\"btn btn-info\" onclick = \"addTitle()\">Submit</button></div><br>'\n\n document.getElementById('choiceDisplay').innerHTML = form_string\n}", "title": "" }, { "docid": "81513224870731da1fa53f0774bd98e9", "score": "0.60910183", "text": "function buildSubmit(){\n expData.interaction = \"RANK\";\n var url = getRanking();\n expData.model = url.substr(url.indexOf('=')+1);\n experimentr.addData(expData);\n experimentr.endTimer('build');\n experimentr.save();\n expData.interaction = \"\";\n expData.model = \"\";\n experimentr.next_json(url); \n}", "title": "" }, { "docid": "8b01e2af4787e331f3aa782f79272c5a", "score": "0.6087357", "text": "handleAddNewFood(event) {\n // 1. Get user input that user entered\n let inputFoodName = document.querySelector(\"#food__name\").value\n let inputFoodExpiration = document.querySelector(\"#food__expiration\").value\n let inputFoodType = document.querySelector(\"#food__type\").value\n\n // 2. Create a new object with the same structure we have been using throughout the application to represent a food item:\n // {\n // name: \"user input name\",\n // expiration: \"user input expiration\",\n // type: \"user input type\"\n // }\n\n let newFood = {\n name: inputFoodName,\n expiration: inputFoodExpiration,\n type: inputFoodType\n }\n\n // 3. Call the method(postNewFood) with the fetch request to POST to the API and pass it the object we created in the previous step\n\n // Notice the import statement at the top of the module so I can call a method in the foodCollection module.\n\n // *****IMPORTANT*****\n // You will notice at this point that while a new food item is being added to our API, unless you refresh the application, the newly added item will not show up on the DOM. We definitely do not want our user to have to hit refresh every time they add new food to their refrigerator.\n\n // We also do NOT want to manually add our new food item to the list of food on the DOM. Instead, we want our data to be our point of truth. Our DOM should always use the data from our API to render the DOM. Logically, here are the steps we want to take place.\n // 1. Add new food item to the API using a POST HTTP request.\n // We are already doing this. We are using the fetch defined in the foodCollection module to add a new food item to the API.\n // 2. After the new item has been added, we want to get a list of all the food items (using a GET HTTP request) and render them to the DOM.\n // Because we want to make sure we only do this after the first step is done, we will return the fetch call that is doing the POST and chain a .then to the call (just like we do with the GET). This means we are doing the POST and then waiting until a response comes back before doing this step. The reason we want to wait is because we want to be sure that when we ask our API for the list of food items, the newly added item is on that list. So we wait until it has been added before using a GET request to get a list of all food items and rendering them to the DOM.\n\n // But that sounds awfully familiar: make a GET HTTP request to the API for a list of all food items, iterate over that list and build the HTML for each item, append the HTML to the DOM. This is exactly what our fridgify method in our foodList module is already doing. Which means I can simply call that method from here. Once again, note that I am importing the appropriate module at the top of this file.\n // To summarize, we are adding a new item to the API, then getting an updated list of items from the API and rerendering the DOM.\n // *******************\n foodCollection.postNewFood(newFood)\n .then(response => {\n foodList.fridgify()\n })\n document.querySelector(\"#food__name\").value = \"\";\n document.querySelector(\"#food__expiration\").value = \"\";\n document.querySelector(\"#food__type\").value = \"\";\n }", "title": "" }, { "docid": "99cc805ddedf5db0f73d2693e819eb0b", "score": "0.6077646", "text": "function handleSubmit(e) {\n e.preventDefault()\n if (validateForm()) {\n setLoading(true)\n createAPIEndpoint(ENDPIONTS.POSTEMPLOYEES3).create(values)\n .then(res => {\n console.log(res)\n // setLoading(false)\n // history.push(`/Army/${match.params.id}/${match.params.type}`)\n // notify()\n\n })\n .then(res => {\n handlehistory( action.ADD , 'بيانات الترشيح' , \"تعديل واضافه بيانات الترشيح\")\n })\n .then(res => {\n notify();\n setLoading(false)\n history.push(`/Army/${match.params.id}/${match.params.type}`)\n })\n .catch(function (response) {\n //handle error\n notifyErr()\n setLoading(false)\n // history.push(`/GetPrison/${match.params.id}/${match.params.type}`)\n\n console.log(response);\n });\n console.log(values);\n \n \n } \n }", "title": "" }, { "docid": "cfaea7cf2db508bd37dc7a0d0afb7985", "score": "0.60774386", "text": "submitFunc(event){\n event.preventDefault();\n console.log('state: ', this.state)\n return fetch('/form', {\n method : \"POST\",\n body : JSON.stringify(this.state),\n headers: new Headers({\n \t\t'Content-Type': 'application/json'\n \t\t})\n })\n }", "title": "" }, { "docid": "df4ad539dbef21532847caf172e0a2e0", "score": "0.607398", "text": "function handleSubmit(e) {\n // Prevent the default refresh behavior\n e.preventDefault();\n\n // If the passwords don't match, alert the user\n if (passwordRef.current.value !== confirmPasswordRef.current.value)\n {\n return alert('Passwords must match!');\n }\n\n // Get selected activities\n let selectedActivities = [];\n activities.forEach(activity => {\n if (activity.selected) {\n selectedActivities.push(activity);\n }\n });\n\n // POST activity and host information to the server for storage in memory\n fetch('/api/create', {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ roomId: roomIdRef.current.value, hostName: nameRef.current.value, hostEmail: emailRef.current.value, hostPassword: passwordRef.current.value, selectedActivities: selectedActivities })\n })\n .then(response => response.json())\n .then(data => {\n // If there was an error POSTing the data, alert the user\n if (data.error) {\n return alert(data.error);\n }\n\n // Update the alert with the activity details\n setPageContent({\n color: 'success',\n title: 'Activity Details:',\n body: \n <>\n <p>Host name: {nameRef.current.value}</p>\n <p>Host email: {emailRef.current.value}</p>\n <p>Host password: {passwordRef.current.value}</p>\n <p>Event Room Id: {roomIdRef.current.value}</p>\n {selectedActivities.length > 0 ?\n <>\n <p>Event Activities: </p>\n <ul>\n {selectedActivities.map((activity, index) => { return <li key={index}>{activity.title}</li> })}\n </ul>\n </> \n : <></>\n }\n <hr />\n <p>Share the Event Room Id with your guests (up to 3 guests allowed) so they can use it to join at the time of the event! Do NOT share your host password!</p>\n </>\n });\n\n // TODO: Send email to host with meeting information\n })\n .catch(error => {\n return alert('Server error. Please try again.');\n });\n }", "title": "" }, { "docid": "b1f2e6cdce99bb15535b529f570fa0eb", "score": "0.6070922", "text": "function userSubmit() {\n $('button').on('click', function(event) {\n event.preventDefault();\n let dogBreed = $('.js-query').val();\n if (dogBreed === '') {\n alert('Please Enter Dog Breed');\n }\n getAPIData(dogBreed, displayResults);\n });\n }", "title": "" }, { "docid": "4d1a6c91566e60c628847fdcf0b00229", "score": "0.6067829", "text": "submitClicked() {\n console.log('Submit Clicked!');\n createProduct(ipcRenderer.sendSync('fetch-access'), this.state.name);\n }", "title": "" }, { "docid": "6aa65cfaac66e9dae2ee736be4ebbd12", "score": "0.60657865", "text": "doSubmit() {\n // let finaldata = this.state.data;\n // finaldata.services = getSelectedServices();\n // this.setState({ data: finaldata })\n\n // let url = 'https://jsonplaceholder.typicode.com/posts'\n // fetch(url, {\n // method: 'POST',\n // headers: {\n // 'Content-type': 'application/json'\n // },\n // body: JSON.stringify(this.state.data)\n // }).catch(function (error) {\n // console.log('ERROR : ', error)\n // })\n this.props.parentCallback();\n // this.setState({\n // data: {\n // fullName: '', foundationName: '', phone: '', email: '',\n // commercialRegister: '', priority: '', orderDes: '', hasBranding: '', services: []\n // }\n // })\n console.log(\"submited\")\n }", "title": "" }, { "docid": "6a181ac40f2118bc77d4d7cbd9d328bf", "score": "0.60650635", "text": "function handleSubmit(e) {\n e.preventDefault();\n const postData = {\n taskName,\n taskPriority,\n datevalue,\n taskStatus,\n };\n\n console.log(postData);\n\n // // Connect With Firebase Database and Send All the Data in Firebase\n set(ref(db, \"TaskList/\" + datevalue), postData);\n }", "title": "" }, { "docid": "2a77c0276c76a791a1cd648e253758e6", "score": "0.60625464", "text": "createNewTask() {\n new comp.btn(\"Add Task\").render(\"#new--task\")\n new comp.input({ id: \"input--task\", type: \"text\", placeholder: \"type new task here\" }).render(\"#new--task\")\n new comp.input({ id: \"input--date\", type: \"date\" }).render(\"#new--task\")\n\n const button = document.querySelector(\"button\")\n const input_task = document.querySelector(\"#input--task\")\n const input_date = document.querySelector(\"#input--date\")\n\n //button click posts new task to database and resets new task input strings\n button.addEventListener(\"click\", (e) => {\n if (input_task.value === \"\" || input_date.value === \"\") {\n return\n } else {\n let taskItem = {\n task: input_task.value,\n complete: false,\n dueDate: input_date.value,\n userId: activeUser.info().id,\n }\n API.saveItem(\"tasks\", taskItem).then(() => this.buildContainers())\n }\n })\n }", "title": "" }, { "docid": "49703024a989186ab7ef5529521f2466", "score": "0.6060765", "text": "function addItemSubmit() {\n event.preventDefault();\n\n sendItemToServer(state.addItemInput, state.listName)\n}", "title": "" }, { "docid": "7564c9443e02bb66973ac77b1da77562", "score": "0.60582507", "text": "handleFormSubmit(name){\n console.log(this.state.authors);\n\n let body = JSON.stringify({\"author\": {\"full_name\": name } });\n \n \n fetch('http://localhost:3000/authors', {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: body,\n })\n .then((response) => {return response.json()})\n .then((author)=>{\n this.addNewAuthor(author);\n \n }).catch(err => { alert(err) })\n \n }", "title": "" }, { "docid": "07e7942e68fc6c5874f3cffeea61dbcf", "score": "0.60527384", "text": "function ClimateMigrationUseForm() {\n const [values, setValues] = useState({\n region: '',\n country: '',\n location: '',\n title: '',\n story: '',\n picture: '',\n email: '',\n nickname: ''\n });\n\n const [errors, setErrors] = useState({});\n\n const handleChange = e => {\n const { name, value } = e.target;\n setValues({ \n ...values,\n [name]: value\n });\n };\n\n const handleSubmit = e => {\n e.preventDefault();\n }\n\n const submitData = async () => {\n try {\n const result = await fetch('http://localhost:5000/posts', {\n method: 'post',\n mdoe: 'no-cors',\n headers: {\n 'Accept': 'application/json',\n 'Content-type': 'application/json'\n },\n body: JSON.stringify({\n region: '',\n country: '',\n location: '',\n title: '',\n story: '',\n image: '',\n email: '',\n nickname: ''\n })\n })\n console.log(result)\n } catch(err) {\n console.log(err)\n }\n };\n\n return { handleChange, handleSubmit, values, submitData }\n}", "title": "" }, { "docid": "9018272f996c6187dfc97e8b83a6a0f3", "score": "0.6049848", "text": "function buildHtml() {\n let books = getListOfBooks(url);\n books.then(books => {\n let selectOne = createSelectInput(books, 'book1');\n let selectTwo = createSelectInput(books, 'book2');\n let submit = document.createElement('button');\n\n submit.type = 'submit';\n submit.textContent = 'Submit';\n\n spinners[0].style.display = 'none';\n h3.textContent = 'Make Exchange';\n form.appendChild(selectOne);\n form.appendChild(selectTwo);\n form.appendChild(submit);\n\n }, error => {\n console.log(error.message);\n });\n }", "title": "" }, { "docid": "3d715d2654e92957a98910de3bfe5fda", "score": "0.604954", "text": "function createFormHandler(e) {\n e.preventDefault()\n const nameInput = document.querySelector('#input-name').value\n const descInput = document.querySelector('#input-description').value\n const locationInput = document.querySelector('#input-location').value\n postFetchGyms(nameInput, descInput, locationInput)\n}", "title": "" }, { "docid": "44f47f936dc1a38029a4b56c8613d63c", "score": "0.60422784", "text": "function handleSubmit(e) {\n e.preventDefault()\n if (validateForm()) {\n setLoading(true)\n\n createAPIEndpoint(ENDPIONTS.POSTEMPLOYEES7).createPrison( customers.EmployeeFormID, \"0\" ,values)\n .then(res => {\n setLoading(false)\n notify()\n resetFormControls()\n SetCustomers(res.data.data)\n })\n .then(res => {\n handlehistory( action.ADD , 'بيانات الجنسيه ' , \" اضافه بيانات الجنسيه \")\n })\n .catch(function (response) {\n //handle error\n notifyErr()\n setLoading(false)\n\n console.log(response);\n }); \n \n } \n console.log(values);\n }", "title": "" }, { "docid": "eeef19d0845db2d6fb7679d765c06fa0", "score": "0.6041299", "text": "async function handleFormSubmit(values, actions) {\n setSubmitted(true);\n\n if (!provider) {\n const acct = await connectWallet();\n if (!acct) {\n return;\n }\n }\n if (!account) {\n await connectWallet();\n }\n\n // transform the allocations for submission\n // Format allocations\n const chosenAllocations = categories.map(c => {\n const cid = c.categoryID;\n let points = percentages[cid];\n if (points === '') {\n points = 0;\n }\n return {\n categoryID: cid,\n points: parseInt(points),\n };\n });\n\n // console.log('allocations:', allocations);\n\n // Update allocations for display after voting\n await setAllocations(chosenAllocations);\n\n // post form\n await sendPollData(chosenAllocations);\n\n actions.setSubmitting(false);\n }", "title": "" }, { "docid": "b273c507f3c7a9055aae0a83ac1800e8", "score": "0.6037893", "text": "function addTask(){\nvar taskTitle=taskTitleInputElement.value;\nvar taskDescription=taskDescriptionInputElement.value;\nvar taskDeadline=taskDeadlineInputElement.value;\n\nvar newTask={\n username: uni.uniuser,\n title: taskTitle,\n description: taskDescription,\n deadline: taskDeadline,\n completed: false\n};\nvar url1=\"http://localhost:8080/todo/create?username=\"+newTask.username+\"&title=\"+newTask.title+\"&description=\"+newTask.description+\"&deadline=\"+newTask.deadline+\"&completed=\"+newTask.completed;\nvar promise= fetch(url1);\n promise.then(response=>{\n if (response.status == 200) {\n var promiseOfData = response.json();\n promiseOfData.then(jsonData => {\n todoItems= jsonData;\n render();\n });\n }\n });\n\n\ntaskTitleInputElement.value=\"\";\ntaskDescriptionInputElement.value=\"\";\ntaskDeadlineInputElement.value=\"\";\n}", "title": "" }, { "docid": "415bc8b6c6369c9d4471d7bf649ed805", "score": "0.60365164", "text": "createRepositoryForm() {\n // Container object\n const repositoryContainer = {\n repositories: [],\n };\n\n // Retrieve repositories information from the DOM\n $(`${this.options.containerSelector} ${this.options.listItemSelector}`).each(function retrieveRepositoryFromDOM() {\n const repositoryValues =\n RepositorySelector.getRepositoryInfoFromUrl($(this).attr('data-repository-url'));\n\n repositoryContainer.repositories.push(repositoryValues);\n });\n\n // If there are any repositories in the selection, send the form\n if (repositoryContainer.repositories.length > 0) {\n // Populate the form\n $(`${this.options.containerSelector} .compare-json`).val(JSON.stringify(repositoryContainer));\n\n // Send the form\n $(`${this.options.containerSelector} .compare-form`).submit();\n }\n }", "title": "" }, { "docid": "eac220781bdb07695bb5073bcfd8468a", "score": "0.6030817", "text": "submitHandler(e) {\n e.preventDefault();\n console.log(this.state);\n //Alerts the user with the informaiton they have inputted\n alert(\n \"A new Sprint was added with the following details:\\nSprint ID: \" +\n this.state.sprintId +\n \"\\nSprint Description: \" +\n this.state.sprintDescription +\n \"\\nStart Date: \" +\n this.state.startDate +\n \"\\nSprint Length: \" +\n this.state.sprintLength +\n \"\\nPoints Planned: \" +\n this.state.pointsPlanned +\n \"\\nPoints Completed: \" +\n this.state.pointsCompleted +\n \"\\nTeam ID: \" +\n this.state.teamID\n );\n let URL = \"http://localhost:8080\";\n //Parse integers such as eid and teamId into accepted types\n this.state.sprintLength = parseInt(this.state.sprintLength)\n this.state.sprintId = parseInt(this.state.sprintId)\n this.state.startDate = parseInt(this.state.startDate)\n this.state.pointsPlanned = parseInt(this.state.pointsPlanned)\n this.state.pointsCompleted = parseInt(this.state.pointsCompleted)\n this.state.teamId = parseInt(this.state.teamId)\n\n\n \n // post request method \n let POST_REQUEST_BODY = {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify(this.state)\n };\n\n //fetch response from server, to check if the holiday has been added. \n fetch(`${URL}/sprints`, POST_REQUEST_BODY).then(async response => {\n var resp = await response;\n alert (resp.status)\n if (resp.status === 201) {\n alert(\"New Sprint Added!\");\n\n // var data = resp.json();\n } else if (resp.status === 400) {\n } else {\n \n }\n });\n }", "title": "" }, { "docid": "6fdfdedb6b475802e6fdfac3adf68a62", "score": "0.6029448", "text": "handleCreateChoiceClick(e){\n var form = document.createForm;\n var data = {};\n data[\"name\"] = form.choiceName.value;\n data[\"choiceID\"] = form.choiceID.value;\n //Flag if a choice is completed here\n if (form.isFinalized.checked) { \n data[\"isFinalized\"] = true;\n data[\"completionDate\"] = form.completionDate.value;\n } else {\n //If choice is not complete, flag completion date as open\n data[\"isFinalized\"] = false;\n data[\"completionDate\"] = \"Open\";\n }\n //What do for lists?\n var alternativeList = {}\n //for each alternative\n //get info and push it into the array\n \n\n\n var js = JSON.stringify(data);\n console.log(\"JS:\" + js);\n var xhr = new XMLHttpRequest();\n xhr.open(\"POST\", create_url, true);\n\n // send the collected data as JSON\n xhr.send(js);\n\n // This will process results and update HTML as appropriate. \n xhr.onloadend = function () {\n console.log(xhr);\n console.log(xhr.request);\n if (xhr.readyState == XMLHttpRequest.DONE) {\n if (xhr.status == 200) {\n console.log (\"XHR:\" + xhr.responseText);\n processCreateResponse(xhr.responseText);\n } else {\n console.log(\"actual:\" + xhr.responseText)\n var js = JSON.parse(xhr.responseText);\n var err = js[\"response\"];\n alert (err);\n }\n } else {\n processCreateResponse(\"N/A\");\n }\n };\n }", "title": "" }, { "docid": "eb543a72341f35d90ced601741c6762e", "score": "0.6029147", "text": "function formPOST() {\n\n let title = $('#title').val();\n let url = $('#url').val();\n let desc = $('#description').val();\n let rating = $('input[type=\"radio\"]:checked').val();\n\n return fetch(`${BASE_URL}`, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\"\n },\n body: JSON.stringify({\n \"title\":title, \n \"url\":url,\n \"desc\":desc,\n \"rating\":rating\n })\n })\n .then(response => response.json())\n .then(responseJson => {\n store.store.bookmarks.push(responseJson);\n console.log(store.store.bookmarks)\n console.log(responseJson)\n \n })\n}", "title": "" }, { "docid": "d0218dc0356542973f76dc87cd129113", "score": "0.60288423", "text": "addList(event){\r\n event.preventDefault();\r\n let form = event.target;\r\n let rawList = {\r\n title: form.title.value\r\n };\r\n ListService.addList(rawList);\r\n_drawLists();\r\n }", "title": "" }, { "docid": "5c2df0936a09ff9a5d7641331dec1f54", "score": "0.60282576", "text": "function submitData(key){\n\tif(!key){\n\t\tvar id = Math.floor(Math.random()*5551212);\n\t}\n\telse{\n\t\tid=key;\n\t}\n\t\n\t\n// Gathering data in an object. Object has array with form label and input label\n\tgetRadio();\n\tvar item ={};\n\t\titem.newUsed =[\"New or Used: \", newUsedValue];\n\t\titem.make =[\"Make: \", gid(\"makes\").value];\n\t\titem.model =[\"Model: \", gid(\"models\").value];\n\t\titem.year =[\"Year: \", gid(\"year\").value];\n\t\titem.mileage =[\"Mileage: \", gid(\"mileage\").value];\n\t\titem.condition =[\"Condition: \", gid(\"condition\").value];\t\n\t\titem.date =[\"Date: \", gid(\"date\").value];\n\t\titem.notes =[\"Notes: \", gid(\"notes\").value];\n\t\t\n// Use stringify to convert object to string and save data to local storage\n\tlocalStorage.setItem(id, JSON.stringify(item));\n\talert(\"Vehicle added!\");\n\twindow.location.reload();\t\n}", "title": "" }, { "docid": "71bc794cf7f0ce9aed059b42f52f037a", "score": "0.60280013", "text": "handleFormSubmit(e) {\n e.preventDefault();\n let trainingData = this.state.newTraining;\n window.alert(JSON.stringify(trainingData, 0, 2))\n fetch('/addtraining',{\n method: \"POST\",\n body: JSON.stringify(trainingData),\n headers: {\n 'Accept': 'application/json',\n 'Content-Type': 'application/json'\n },\n }).then(response => {\n response.json().then(data =>{\n console.log(\"Successful\" + data);\n })\n })\n }", "title": "" }, { "docid": "25d56f14481b605dd4f86a201e4c8d37", "score": "0.6016305", "text": "function setCreateButton(modelName) {\n let createButton = document.getElementById(\"creation-form-button\");\n\n // If the create button is clicked, read the non-empty fields from the form\n // and try to create a new row in the DB.\n createButton.onclick = function() {\n let formElements = document.getElementById(\"creation-form\").elements;\n let modelInstance = {};\n\n // Read all the form fields into modelInstance.\n for (let i = 0; i < formElements.length; i++) {\n let item = formElements.item(i);\n\n // Do not include empty values.\n if (item.value === \"\") continue;\n\n modelInstance[item.name] = item.value;\n }\n\n // Create the model instance and after that refresh the table and close the modal.\n API.graphql(graphqlOperation(models[modelName].createFunction, { input: modelInstance })).then((evt) => {\n document.getElementById(\"creation-form-close\").click();\n refreshTable(modelName);\n }).catch((error) => {\n console.log(error);\n alert(error.errors[0].message);\n });\n };\n}", "title": "" }, { "docid": "be32ca945047e7a24a3b29a397aeafaa", "score": "0.60041326", "text": "function addMilestone() {\r\n const companyField = document.querySelector('#company-name');\r\n company = companyField.value;\r\n\r\n if(company == \"\") {\r\n return;\r\n }\r\n\r\n const typeField = document.querySelector('#milestone-type');\r\n type = typeField.value;\r\n\r\n const visField = document.querySelector('#vis-type');\r\n vis = visField.value;\r\n\r\n user_id = sessionStorage.getItem('id');\r\n\r\n companyField.value = \"\";\r\n\r\n fetch(url + '/insertMilestone', {\r\n headers: {\r\n 'Content-type': 'application/json'\r\n },\r\n method: 'POST',\r\n body: JSON.stringify({company: company, type: type, user_id: user_id, visibility: vis})\r\n })\r\n .then(response => location.reload());\r\n}", "title": "" }, { "docid": "ae171438768e5dde816f190ff6d3b836", "score": "0.6004124", "text": "function handle_submit_list(event){\n var data = $(this).serialize();\n var site = $(this).attr('action');\n\n console.log(data);\n console.log(site);\n $.ajax({\n type: \"POST\",\n url: site,\n data: data,\n dataType: 'json',\n success: function(response){\n console.log(data);\n console.log('got it'+response);\n name = response['list']['name'];\n list_num = response['list']['id'];\n var new_row = $('<tr><td><a data-list-id=\"'+list_num+'\" href= \"#\" class=\"btn\" id=\"list-btn-'+list_num+'\">'+name+'</a></td></tr>');\n $('#list-table tbody').append(new_row);\n $('#list_name').val(\"\");\n // complete_button_listener(); // - Resets the listener all buttons again since a new button was added to the page\n }\n });\n event.preventDefault();\n}", "title": "" } ]
61a9039007c15944adf134be6f1092a3
in Webpack 2, require.ensure now also returns a Promise so the resolve/reject functions may get called an extra time if the user uses an arrow function shorthand that happens to return that Promise.
[ { "docid": "114e0b229586cf0cba301f44502c0abb", "score": "0.0", "text": "function once (fn) {\n var called = false;\n return function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n if (called) { return }\n called = true;\n return fn.apply(this, args)\n }\n}", "title": "" } ]
[ { "docid": "a022f55d40359a2c579b0d8f916c2b12", "score": "0.6026434", "text": "function lazyRequire(path) {\n let tmp = null;\n return ()=> {\n if (!tmp) tmp = require(path);\n return tmp;\n }\n}", "title": "" }, { "docid": "9fb2071e4b3f0691e1d906ee26478b02", "score": "0.5993396", "text": "function f(){throw new Error(\"Dynamic requires are not currently supported by rollup-plugin-commonjs\")}", "title": "" }, { "docid": "0e811bc9516afb09c72827438ccc0b52", "score": "0.5950278", "text": "function requirePromise(modules, fun) {\n return Q.Promise(function (resolve) {\n require(modules, function () {\n fun.apply(null, arguments);\n resolve();\n });\n });\n }", "title": "" }, { "docid": "eb53f853aa6a5bbb4cb91ba208b9d68c", "score": "0.5707212", "text": "MemberExpression (path, state) {\r\n if (state.inserting)\r\n return;\r\n if (t.isIdentifier(path.node.object, { name: 'require' }) && !path.scope.hasBinding('require')) {\r\n let name = path.node.computed ? path.node.property.value : path.node.property.name;\r\n if (name)\r\n switch (name) {\r\n case 'resolve':\r\n if (t.isCallExpression(path.parent) && path.parent.callee === path.node &&\r\n path.parent.arguments.length === 1) {\r\n state.requireResolve = true;\r\n const expr = path.parent.arguments[0];\r\n const arg = resolvePartialWildcardString(expr, false, []);\r\n // browser resolve wildcards not currently supported\r\n let resolved = arg.indexOf('*') !== -1 ? null : state.opts.resolve(arg, { browserResolve: true });\r\n if (resolved === undefined)\r\n resolved = arg;\r\n const requireBinding = getNodeRequireBinding(path, state);\r\n if (state.opts.browserOnly) {\r\n if (resolved === null) {\r\n // _nodeRequire(expr)\r\n path.replaceWith(t.callExpression(requireBinding), [expr]);\r\n }\r\n else {\r\n // './browser-string';\r\n path.replaceWith(t.stringLiteral(resolved));\r\n }\r\n }\r\n else {\r\n if (resolved === null) {\r\n // (_nodeRequire.resolve || _nodeRequire)(expr) \r\n path.parentPath.replaceWith(t.callExpression(t.logicalExpression('||',\r\n t.memberExpression(requireBinding, t.identifier('resolve')),\r\n requireBinding\r\n ), [expr]));\r\n }\r\n else {\r\n // _nodeRequire.resolve ? _nodeRequire.resolve(expr) : './browser-string';\r\n path.parentPath.replaceWith(t.conditionalExpression(\r\n t.memberExpression(requireBinding, t.identifier('resolve')),\r\n t.callExpression(t.memberExpression(requireBinding, t.identifier('resolve')), [expr]),\r\n t.stringLiteral(resolved)\r\n ));\r\n }\r\n }\r\n }\r\n // non-call of require.resolve -> support only in Node.js case\r\n else {\r\n state.requireResolve = true;\r\n path.get('object').replaceWith(getNodeRequireBinding(path, state));\r\n }\r\n break;\r\n // TODO: require.main === module -> import.meta.main\r\n case 'main':\r\n path.replaceWith(t.identifier('undefined'));\r\n break;\r\n case 'extensions':\r\n case 'cache':\r\n path.replaceWith(t.objectExpression([]));\r\n break;\r\n default:\r\n path.replaceWith(t.identifier('undefined'));\r\n }\r\n }\r\n }", "title": "" }, { "docid": "959266ea2b7480f8192d0bc4706aae12", "score": "0.5690163", "text": "function n(){return o||(o=Object(_core_promiseUtils_js__WEBPACK_IMPORTED_MODULE_0__[\"create\"])((t=>__webpack_require__.e(/*! import() | chunks-i3s-js */ \"chunks-i3s-js\").then(__webpack_require__.bind(null, /*! ../../chunks/i3s.js */ \"ilXH\")).then((function(t){return t.i})).then((({default:e})=>{const i=e({locateFile:r,onRuntimeInitialized:()=>t(i)});delete i.then})))).catch((t=>Object(_core_promiseUtils_js__WEBPACK_IMPORTED_MODULE_0__[\"reject\"])(t)))),o}", "title": "" }, { "docid": "612f9c8b976cd1fcde4e1ed65de274bd", "score": "0.56758326", "text": "function t(){return i||(i=new Promise((e=>__webpack_require__.e(/*! import() */ 167).then(__webpack_require__.bind(null, /*! ../../chunks/i3s.js */ \"../../node_modules/@arcgis/core/chunks/i3s.js\")).then((function(e){return e.i})).then((({default:t})=>{const i=t({locateFile:n,onRuntimeInitialized:()=>e(i)});delete i.then})))).catch((e=>Promise.reject(e)))),i}", "title": "" }, { "docid": "ff340b80a9c34610966608ceaa5ef5ff", "score": "0.56525385", "text": "require(mod) { // don't deprecate\n return require(mod);\n }", "title": "" }, { "docid": "43c8000af412d20ddf783c369f63fa00", "score": "0.5645005", "text": "let loadingPromise = null;\n if (entryPoint.root.getModuleIfRequired() == null) {\n loadingPromise = entryPoint.root.load();\n }", "title": "" }, { "docid": "ab9833f56313fbd05277010bf4e3dd20", "score": "0.5598342", "text": "function dynamicRequire(path) {\r\n\t\t\t\t\t// @ts-ignore\r\n\t\t\t\t\tif (typeof require !== \"undefined\") {\r\n\t\t\t\t\t\t// @ts-ignore\r\n\t\t\t\t\t\treturn require(path);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\treturn __webpack_require__(169)(path);\r\n\t\t\t\t\t}\r\n\t\t\t\t}", "title": "" }, { "docid": "fb2131f0e89b047a4e50a3f622b46fcc", "score": "0.55587476", "text": "function defer() {\n\t let resolve = null;\n\t let reject = null;\n\t const p = new Promise((res, rej) => [resolve, reject] = [res, rej]);\n\t return Object.assign(p, { resolve, reject });\n\t}", "title": "" }, { "docid": "8b388b1dd3586271ffef86d9b6e6738d", "score": "0.5556354", "text": "resolve(path) {\n if (path === 'babel-preset-foo-rollup') {\n return path;\n } else {\n throw new Error(`intentionally failing to resolve: ${path}`);\n }\n }", "title": "" }, { "docid": "aa5dc66163889318a4763bfd8f982d10", "score": "0.55515933", "text": "function localRequire(path) { // 173\n var resolved = localRequire.resolve(path); // 174\n return require(resolved, parent, path); // 175\n } // 176", "title": "" }, { "docid": "92ccb928932b7ab39bbb05755d370abf", "score": "0.5542718", "text": "function createWebpack1ResolveSync(webpackRequire, resolveConfig, plugins) {\n const Resolver = webpackRequire('enhanced-resolve/lib/Resolver');\n const SyncNodeJsInputFileSystem = webpackRequire('enhanced-resolve/lib/SyncNodeJsInputFileSystem');\n\n const ModuleAliasPlugin = webpackRequire('enhanced-resolve/lib/ModuleAliasPlugin');\n const ModulesInDirectoriesPlugin = webpackRequire('enhanced-resolve/lib/ModulesInDirectoriesPlugin');\n const ModulesInRootPlugin = webpackRequire('enhanced-resolve/lib/ModulesInRootPlugin');\n const ModuleAsFilePlugin = webpackRequire('enhanced-resolve/lib/ModuleAsFilePlugin');\n const ModuleAsDirectoryPlugin = webpackRequire('enhanced-resolve/lib/ModuleAsDirectoryPlugin');\n const DirectoryDescriptionFilePlugin = webpackRequire('enhanced-resolve/lib/DirectoryDescriptionFilePlugin');\n const DirectoryDefaultFilePlugin = webpackRequire('enhanced-resolve/lib/DirectoryDefaultFilePlugin');\n const FileAppendPlugin = webpackRequire('enhanced-resolve/lib/FileAppendPlugin');\n const ResultSymlinkPlugin = webpackRequire('enhanced-resolve/lib/ResultSymlinkPlugin');\n const DirectoryDescriptionFileFieldAliasPlugin = webpackRequire('enhanced-resolve/lib/DirectoryDescriptionFileFieldAliasPlugin');\n\n const resolver = new Resolver(new SyncNodeJsInputFileSystem());\n\n resolver.apply(\n resolveConfig.packageAlias\n ? new DirectoryDescriptionFileFieldAliasPlugin('package.json', resolveConfig.packageAlias)\n : function () {},\n new ModuleAliasPlugin(resolveConfig.alias || {}),\n makeRootPlugin(ModulesInRootPlugin, 'module', resolveConfig.root),\n new ModulesInDirectoriesPlugin(\n 'module',\n resolveConfig.modulesDirectories || resolveConfig.modules || ['web_modules', 'node_modules']\n ),\n makeRootPlugin(ModulesInRootPlugin, 'module', resolveConfig.fallback),\n new ModuleAsFilePlugin('module'),\n new ModuleAsDirectoryPlugin('module'),\n new DirectoryDescriptionFilePlugin(\n 'package.json',\n ['module', 'jsnext:main'].concat(resolveConfig.packageMains || webpack1DefaultMains)\n ),\n new DirectoryDefaultFilePlugin(['index']),\n new FileAppendPlugin(resolveConfig.extensions || ['', '.webpack.js', '.web.js', '.js']),\n new ResultSymlinkPlugin()\n );\n\n const resolvePlugins = [];\n\n // support webpack.ResolverPlugin\n if (plugins) {\n plugins.forEach(function (plugin) {\n if (\n plugin.constructor\n && plugin.constructor.name === 'ResolverPlugin'\n && Array.isArray(plugin.plugins)\n ) {\n resolvePlugins.push.apply(resolvePlugins, plugin.plugins);\n }\n });\n }\n\n resolver.apply.apply(resolver, resolvePlugins);\n\n return function () {\n return resolver.resolveSync.apply(resolver, arguments);\n };\n}", "title": "" }, { "docid": "a9d2073ca39f67780cf332db2dd5317e", "score": "0.55401057", "text": "async function usingPromiseCath() {\n\tlet resolveValue = await asyncFunction('thing that will fail');\n}", "title": "" }, { "docid": "29bf59d5e6ad574f9a64d333ba40d615", "score": "0.5511202", "text": "loadPromise() {\n return new Promise((resolve, reject) => {\n this.loadCallback((err) => {\n if (!err) {\n resolve();\n }\n else {\n reject(err);\n }\n });\n });\n }", "title": "" }, { "docid": "a2fcb9f26bcf14b2fcb69bfca367dcdf", "score": "0.5509061", "text": "if('production' !== process.env.NODE_ENV) {\n if(!isFunction(handle)) {\n throw new Error(\n `[withMount] require handle function, but got \"${typeof handle}\"`\n )\n }\n }", "title": "" }, { "docid": "6d266d21c599462e45a8edadf01fb72f", "score": "0.549435", "text": "function cs(){throw new Error(\"Dynamic requires are not currently supported by rollup-plugin-commonjs\")}", "title": "" }, { "docid": "aeab44297ed768ba93674b64c2c7d18a", "score": "0.5493501", "text": "function resolve(module) {\n\n var optionsDependencies = options.dependencies[module.id];\n\n if (false === module.define) { /* For css and js scripts that hasn't called define */\n require(optionsDependencies, function () {\n finish(module);\n });\n return;\n }\n\n var basePath = module.basePath;\n var define = module.define;\n var factory = define.factory;\n var dependencies = (define.dependencies || []).concat(optionsDependencies || []);\n\n require.bind({ basePath: basePath })(dependencies, function () {\n\n var cache;\n\n if ('function' === typeof factory) {\n if (define.commonJs) {\n var commonJsExports = {};\n var commonJsModule = { exports: commonJsExports }; /* Configure CommonJS module */\n\n cache = factory.call( /* Get the response from the return value or... */\n factory,\n require.bind({ basePath: basePath }),\n commonJsModule.exports,\n commonJsModule\n );\n\n if ( /* ...if module.exports was altered or exports has keys, get it from module */\n (commonJsModule || {}).exports !== commonJsExports ||\n Object.keys(commonJsExports || {}).length\n ) {\n cache = commonJsModule.exports;\n }\n } else { /* Just apply the arguments if it is in AMD format */\n cache = factory.apply(factory, arguments);\n }\n } else {\n cache = factory;\n }\n\n module.cache = cache;\n\n finish(module);\n\n });\n\n }", "title": "" }, { "docid": "67623d2af9037d6ab0ba4beae568e3ee", "score": "0.5409146", "text": "function y(){throw new Error(\"Dynamic requires are not currently supported by rollup-plugin-commonjs\")}", "title": "" }, { "docid": "f5a6f6f404bfda34e6e4435d6da6f799", "score": "0.54066914", "text": "function wrapWithResolve(fn) {\n return function(options, cb) {\n // Wrap the function passed in with a when.resolve so it can\n // return either a promise or a value\n Promise.resolve(fn.call(this, options)).then(function(result) {\n cb(result);\n }).catch(function(err) {\n errors.logAndThrowError(err, 'registerAsyncThemeHelper: ' + fn);\n });\n }\n}", "title": "" }, { "docid": "7f746661cb21a1513d1dd20b3ae7a44d", "score": "0.5353909", "text": "function hotCreateRequire(moduleId) {\n/******/ \t\tvar me = installedModules[moduleId];\n/******/ \t\tif (!me) return __webpack_require__;\n/******/ \t\tvar fn = function(request) {\n/******/ \t\t\tif (me.hot.active) {\n/******/ \t\t\t\tif (installedModules[request]) {\n/******/ \t\t\t\t\tif (installedModules[request].parents.indexOf(moduleId) === -1)\n/******/ \t\t\t\t\t\tinstalledModules[request].parents.push(moduleId);\n/******/ \t\t\t\t} else {\n/******/ \t\t\t\t\thotCurrentParents = [moduleId];\n/******/ \t\t\t\t\thotCurrentChildModule = request;\n/******/ \t\t\t\t}\n/******/ \t\t\t\tif (me.children.indexOf(request) === -1) me.children.push(request);\n/******/ \t\t\t} else {\n/******/ \t\t\t\tconsole.warn(\n/******/ \t\t\t\t\t\"[HMR] unexpected require(\" +\n/******/ \t\t\t\t\t\trequest +\n/******/ \t\t\t\t\t\t\") from disposed module \" +\n/******/ \t\t\t\t\t\tmoduleId\n/******/ \t\t\t\t);\n/******/ \t\t\t\thotCurrentParents = [];\n/******/ \t\t\t}\n/******/ \t\t\treturn __webpack_require__(request);\n/******/ \t\t};\n/******/ \t\tvar ObjectFactory = function ObjectFactory(name) {\n/******/ \t\t\treturn {\n/******/ \t\t\t\tconfigurable: true,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: function() {\n/******/ \t\t\t\t\treturn __webpack_require__[name];\n/******/ \t\t\t\t},\n/******/ \t\t\t\tset: function(value) {\n/******/ \t\t\t\t\t__webpack_require__[name] = value;\n/******/ \t\t\t\t}\n/******/ \t\t\t};\n/******/ \t\t};\n/******/ \t\tfor (var name in __webpack_require__) {\n/******/ \t\t\tif (\n/******/ \t\t\t\tObject.prototype.hasOwnProperty.call(__webpack_require__, name) &&\n/******/ \t\t\t\tname !== \"e\"\n/******/ \t\t\t) {\n/******/ \t\t\t\tObject.defineProperty(fn, name, ObjectFactory(name));\n/******/ \t\t\t}\n/******/ \t\t}\n/******/ \t\tfn.e = function(chunkId) {\n/******/ \t\t\tif (hotStatus === \"ready\") hotSetStatus(\"prepare\");\n/******/ \t\t\thotChunksLoading++;\n/******/ \t\t\treturn __webpack_require__.e(chunkId).then(finishChunkLoading, function(err) {\n/******/ \t\t\t\tfinishChunkLoading();\n/******/ \t\t\t\tthrow err;\n/******/ \t\t\t});\n/******/\n/******/ \t\t\tfunction finishChunkLoading() {\n/******/ \t\t\t\thotChunksLoading--;\n/******/ \t\t\t\tif (hotStatus === \"prepare\") {\n/******/ \t\t\t\t\tif (!hotWaitingFilesMap[chunkId]) {\n/******/ \t\t\t\t\t\thotEnsureUpdateChunk(chunkId);\n/******/ \t\t\t\t\t}\n/******/ \t\t\t\t\tif (hotChunksLoading === 0 && hotWaitingFiles === 0) {\n/******/ \t\t\t\t\t\thotUpdateDownloaded();\n/******/ \t\t\t\t\t}\n/******/ \t\t\t\t}\n/******/ \t\t\t}\n/******/ \t\t};\n/******/ \t\treturn fn;\n/******/ \t}", "title": "" }, { "docid": "7f746661cb21a1513d1dd20b3ae7a44d", "score": "0.5353909", "text": "function hotCreateRequire(moduleId) {\n/******/ \t\tvar me = installedModules[moduleId];\n/******/ \t\tif (!me) return __webpack_require__;\n/******/ \t\tvar fn = function(request) {\n/******/ \t\t\tif (me.hot.active) {\n/******/ \t\t\t\tif (installedModules[request]) {\n/******/ \t\t\t\t\tif (installedModules[request].parents.indexOf(moduleId) === -1)\n/******/ \t\t\t\t\t\tinstalledModules[request].parents.push(moduleId);\n/******/ \t\t\t\t} else {\n/******/ \t\t\t\t\thotCurrentParents = [moduleId];\n/******/ \t\t\t\t\thotCurrentChildModule = request;\n/******/ \t\t\t\t}\n/******/ \t\t\t\tif (me.children.indexOf(request) === -1) me.children.push(request);\n/******/ \t\t\t} else {\n/******/ \t\t\t\tconsole.warn(\n/******/ \t\t\t\t\t\"[HMR] unexpected require(\" +\n/******/ \t\t\t\t\t\trequest +\n/******/ \t\t\t\t\t\t\") from disposed module \" +\n/******/ \t\t\t\t\t\tmoduleId\n/******/ \t\t\t\t);\n/******/ \t\t\t\thotCurrentParents = [];\n/******/ \t\t\t}\n/******/ \t\t\treturn __webpack_require__(request);\n/******/ \t\t};\n/******/ \t\tvar ObjectFactory = function ObjectFactory(name) {\n/******/ \t\t\treturn {\n/******/ \t\t\t\tconfigurable: true,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: function() {\n/******/ \t\t\t\t\treturn __webpack_require__[name];\n/******/ \t\t\t\t},\n/******/ \t\t\t\tset: function(value) {\n/******/ \t\t\t\t\t__webpack_require__[name] = value;\n/******/ \t\t\t\t}\n/******/ \t\t\t};\n/******/ \t\t};\n/******/ \t\tfor (var name in __webpack_require__) {\n/******/ \t\t\tif (\n/******/ \t\t\t\tObject.prototype.hasOwnProperty.call(__webpack_require__, name) &&\n/******/ \t\t\t\tname !== \"e\"\n/******/ \t\t\t) {\n/******/ \t\t\t\tObject.defineProperty(fn, name, ObjectFactory(name));\n/******/ \t\t\t}\n/******/ \t\t}\n/******/ \t\tfn.e = function(chunkId) {\n/******/ \t\t\tif (hotStatus === \"ready\") hotSetStatus(\"prepare\");\n/******/ \t\t\thotChunksLoading++;\n/******/ \t\t\treturn __webpack_require__.e(chunkId).then(finishChunkLoading, function(err) {\n/******/ \t\t\t\tfinishChunkLoading();\n/******/ \t\t\t\tthrow err;\n/******/ \t\t\t});\n/******/\n/******/ \t\t\tfunction finishChunkLoading() {\n/******/ \t\t\t\thotChunksLoading--;\n/******/ \t\t\t\tif (hotStatus === \"prepare\") {\n/******/ \t\t\t\t\tif (!hotWaitingFilesMap[chunkId]) {\n/******/ \t\t\t\t\t\thotEnsureUpdateChunk(chunkId);\n/******/ \t\t\t\t\t}\n/******/ \t\t\t\t\tif (hotChunksLoading === 0 && hotWaitingFiles === 0) {\n/******/ \t\t\t\t\t\thotUpdateDownloaded();\n/******/ \t\t\t\t\t}\n/******/ \t\t\t\t}\n/******/ \t\t\t}\n/******/ \t\t};\n/******/ \t\treturn fn;\n/******/ \t}", "title": "" }, { "docid": "7f746661cb21a1513d1dd20b3ae7a44d", "score": "0.5353909", "text": "function hotCreateRequire(moduleId) {\n/******/ \t\tvar me = installedModules[moduleId];\n/******/ \t\tif (!me) return __webpack_require__;\n/******/ \t\tvar fn = function(request) {\n/******/ \t\t\tif (me.hot.active) {\n/******/ \t\t\t\tif (installedModules[request]) {\n/******/ \t\t\t\t\tif (installedModules[request].parents.indexOf(moduleId) === -1)\n/******/ \t\t\t\t\t\tinstalledModules[request].parents.push(moduleId);\n/******/ \t\t\t\t} else {\n/******/ \t\t\t\t\thotCurrentParents = [moduleId];\n/******/ \t\t\t\t\thotCurrentChildModule = request;\n/******/ \t\t\t\t}\n/******/ \t\t\t\tif (me.children.indexOf(request) === -1) me.children.push(request);\n/******/ \t\t\t} else {\n/******/ \t\t\t\tconsole.warn(\n/******/ \t\t\t\t\t\"[HMR] unexpected require(\" +\n/******/ \t\t\t\t\t\trequest +\n/******/ \t\t\t\t\t\t\") from disposed module \" +\n/******/ \t\t\t\t\t\tmoduleId\n/******/ \t\t\t\t);\n/******/ \t\t\t\thotCurrentParents = [];\n/******/ \t\t\t}\n/******/ \t\t\treturn __webpack_require__(request);\n/******/ \t\t};\n/******/ \t\tvar ObjectFactory = function ObjectFactory(name) {\n/******/ \t\t\treturn {\n/******/ \t\t\t\tconfigurable: true,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: function() {\n/******/ \t\t\t\t\treturn __webpack_require__[name];\n/******/ \t\t\t\t},\n/******/ \t\t\t\tset: function(value) {\n/******/ \t\t\t\t\t__webpack_require__[name] = value;\n/******/ \t\t\t\t}\n/******/ \t\t\t};\n/******/ \t\t};\n/******/ \t\tfor (var name in __webpack_require__) {\n/******/ \t\t\tif (\n/******/ \t\t\t\tObject.prototype.hasOwnProperty.call(__webpack_require__, name) &&\n/******/ \t\t\t\tname !== \"e\"\n/******/ \t\t\t) {\n/******/ \t\t\t\tObject.defineProperty(fn, name, ObjectFactory(name));\n/******/ \t\t\t}\n/******/ \t\t}\n/******/ \t\tfn.e = function(chunkId) {\n/******/ \t\t\tif (hotStatus === \"ready\") hotSetStatus(\"prepare\");\n/******/ \t\t\thotChunksLoading++;\n/******/ \t\t\treturn __webpack_require__.e(chunkId).then(finishChunkLoading, function(err) {\n/******/ \t\t\t\tfinishChunkLoading();\n/******/ \t\t\t\tthrow err;\n/******/ \t\t\t});\n/******/\n/******/ \t\t\tfunction finishChunkLoading() {\n/******/ \t\t\t\thotChunksLoading--;\n/******/ \t\t\t\tif (hotStatus === \"prepare\") {\n/******/ \t\t\t\t\tif (!hotWaitingFilesMap[chunkId]) {\n/******/ \t\t\t\t\t\thotEnsureUpdateChunk(chunkId);\n/******/ \t\t\t\t\t}\n/******/ \t\t\t\t\tif (hotChunksLoading === 0 && hotWaitingFiles === 0) {\n/******/ \t\t\t\t\t\thotUpdateDownloaded();\n/******/ \t\t\t\t\t}\n/******/ \t\t\t\t}\n/******/ \t\t\t}\n/******/ \t\t};\n/******/ \t\treturn fn;\n/******/ \t}", "title": "" }, { "docid": "7f746661cb21a1513d1dd20b3ae7a44d", "score": "0.5353909", "text": "function hotCreateRequire(moduleId) {\n/******/ \t\tvar me = installedModules[moduleId];\n/******/ \t\tif (!me) return __webpack_require__;\n/******/ \t\tvar fn = function(request) {\n/******/ \t\t\tif (me.hot.active) {\n/******/ \t\t\t\tif (installedModules[request]) {\n/******/ \t\t\t\t\tif (installedModules[request].parents.indexOf(moduleId) === -1)\n/******/ \t\t\t\t\t\tinstalledModules[request].parents.push(moduleId);\n/******/ \t\t\t\t} else {\n/******/ \t\t\t\t\thotCurrentParents = [moduleId];\n/******/ \t\t\t\t\thotCurrentChildModule = request;\n/******/ \t\t\t\t}\n/******/ \t\t\t\tif (me.children.indexOf(request) === -1) me.children.push(request);\n/******/ \t\t\t} else {\n/******/ \t\t\t\tconsole.warn(\n/******/ \t\t\t\t\t\"[HMR] unexpected require(\" +\n/******/ \t\t\t\t\t\trequest +\n/******/ \t\t\t\t\t\t\") from disposed module \" +\n/******/ \t\t\t\t\t\tmoduleId\n/******/ \t\t\t\t);\n/******/ \t\t\t\thotCurrentParents = [];\n/******/ \t\t\t}\n/******/ \t\t\treturn __webpack_require__(request);\n/******/ \t\t};\n/******/ \t\tvar ObjectFactory = function ObjectFactory(name) {\n/******/ \t\t\treturn {\n/******/ \t\t\t\tconfigurable: true,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: function() {\n/******/ \t\t\t\t\treturn __webpack_require__[name];\n/******/ \t\t\t\t},\n/******/ \t\t\t\tset: function(value) {\n/******/ \t\t\t\t\t__webpack_require__[name] = value;\n/******/ \t\t\t\t}\n/******/ \t\t\t};\n/******/ \t\t};\n/******/ \t\tfor (var name in __webpack_require__) {\n/******/ \t\t\tif (\n/******/ \t\t\t\tObject.prototype.hasOwnProperty.call(__webpack_require__, name) &&\n/******/ \t\t\t\tname !== \"e\"\n/******/ \t\t\t) {\n/******/ \t\t\t\tObject.defineProperty(fn, name, ObjectFactory(name));\n/******/ \t\t\t}\n/******/ \t\t}\n/******/ \t\tfn.e = function(chunkId) {\n/******/ \t\t\tif (hotStatus === \"ready\") hotSetStatus(\"prepare\");\n/******/ \t\t\thotChunksLoading++;\n/******/ \t\t\treturn __webpack_require__.e(chunkId).then(finishChunkLoading, function(err) {\n/******/ \t\t\t\tfinishChunkLoading();\n/******/ \t\t\t\tthrow err;\n/******/ \t\t\t});\n/******/\n/******/ \t\t\tfunction finishChunkLoading() {\n/******/ \t\t\t\thotChunksLoading--;\n/******/ \t\t\t\tif (hotStatus === \"prepare\") {\n/******/ \t\t\t\t\tif (!hotWaitingFilesMap[chunkId]) {\n/******/ \t\t\t\t\t\thotEnsureUpdateChunk(chunkId);\n/******/ \t\t\t\t\t}\n/******/ \t\t\t\t\tif (hotChunksLoading === 0 && hotWaitingFiles === 0) {\n/******/ \t\t\t\t\t\thotUpdateDownloaded();\n/******/ \t\t\t\t\t}\n/******/ \t\t\t\t}\n/******/ \t\t\t}\n/******/ \t\t};\n/******/ \t\treturn fn;\n/******/ \t}", "title": "" }, { "docid": "7f746661cb21a1513d1dd20b3ae7a44d", "score": "0.5353909", "text": "function hotCreateRequire(moduleId) {\n/******/ \t\tvar me = installedModules[moduleId];\n/******/ \t\tif (!me) return __webpack_require__;\n/******/ \t\tvar fn = function(request) {\n/******/ \t\t\tif (me.hot.active) {\n/******/ \t\t\t\tif (installedModules[request]) {\n/******/ \t\t\t\t\tif (installedModules[request].parents.indexOf(moduleId) === -1)\n/******/ \t\t\t\t\t\tinstalledModules[request].parents.push(moduleId);\n/******/ \t\t\t\t} else {\n/******/ \t\t\t\t\thotCurrentParents = [moduleId];\n/******/ \t\t\t\t\thotCurrentChildModule = request;\n/******/ \t\t\t\t}\n/******/ \t\t\t\tif (me.children.indexOf(request) === -1) me.children.push(request);\n/******/ \t\t\t} else {\n/******/ \t\t\t\tconsole.warn(\n/******/ \t\t\t\t\t\"[HMR] unexpected require(\" +\n/******/ \t\t\t\t\t\trequest +\n/******/ \t\t\t\t\t\t\") from disposed module \" +\n/******/ \t\t\t\t\t\tmoduleId\n/******/ \t\t\t\t);\n/******/ \t\t\t\thotCurrentParents = [];\n/******/ \t\t\t}\n/******/ \t\t\treturn __webpack_require__(request);\n/******/ \t\t};\n/******/ \t\tvar ObjectFactory = function ObjectFactory(name) {\n/******/ \t\t\treturn {\n/******/ \t\t\t\tconfigurable: true,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: function() {\n/******/ \t\t\t\t\treturn __webpack_require__[name];\n/******/ \t\t\t\t},\n/******/ \t\t\t\tset: function(value) {\n/******/ \t\t\t\t\t__webpack_require__[name] = value;\n/******/ \t\t\t\t}\n/******/ \t\t\t};\n/******/ \t\t};\n/******/ \t\tfor (var name in __webpack_require__) {\n/******/ \t\t\tif (\n/******/ \t\t\t\tObject.prototype.hasOwnProperty.call(__webpack_require__, name) &&\n/******/ \t\t\t\tname !== \"e\"\n/******/ \t\t\t) {\n/******/ \t\t\t\tObject.defineProperty(fn, name, ObjectFactory(name));\n/******/ \t\t\t}\n/******/ \t\t}\n/******/ \t\tfn.e = function(chunkId) {\n/******/ \t\t\tif (hotStatus === \"ready\") hotSetStatus(\"prepare\");\n/******/ \t\t\thotChunksLoading++;\n/******/ \t\t\treturn __webpack_require__.e(chunkId).then(finishChunkLoading, function(err) {\n/******/ \t\t\t\tfinishChunkLoading();\n/******/ \t\t\t\tthrow err;\n/******/ \t\t\t});\n/******/\n/******/ \t\t\tfunction finishChunkLoading() {\n/******/ \t\t\t\thotChunksLoading--;\n/******/ \t\t\t\tif (hotStatus === \"prepare\") {\n/******/ \t\t\t\t\tif (!hotWaitingFilesMap[chunkId]) {\n/******/ \t\t\t\t\t\thotEnsureUpdateChunk(chunkId);\n/******/ \t\t\t\t\t}\n/******/ \t\t\t\t\tif (hotChunksLoading === 0 && hotWaitingFiles === 0) {\n/******/ \t\t\t\t\t\thotUpdateDownloaded();\n/******/ \t\t\t\t\t}\n/******/ \t\t\t\t}\n/******/ \t\t\t}\n/******/ \t\t};\n/******/ \t\treturn fn;\n/******/ \t}", "title": "" }, { "docid": "3a5f51fa498c4b4f0f5d9d60dbd6c722", "score": "0.5345535", "text": "function makeRequireFunction() {\n var Module = this.constructor;\n var self = this;\n\n function require(path) {\n try {\n exports.requireDepth += 1;\n return self.require(path);\n } finally {\n exports.requireDepth -= 1;\n }\n }\n\n function resolve(request) {\n return Module._resolveFilename(request, self);\n }\n\n require.resolve = resolve;\n\n // require.main = process.mainModule;\n\n // Enable support to add extra extension types.\n require.extensions = Module._extensions;\n\n require.cache = Module._cache;\n\n return require;\n}", "title": "" }, { "docid": "5a43da6e28963bd8a79d65b4b05766e6", "score": "0.5333945", "text": "function resolveFor() {\n var _args = arguments;\n return {\n deps: ['$ocLazyLoad', '$q', function ($ocLL, $q) {\n // Creates a promise chain for each argument\n var promise = $q.when(1); // empty promise\n for (var i = 0, len = _args.length; i < len; i++) {\n promise = andThen(_args[i]);\n }\n return promise;\n\n // creates promise to chain dynamically\n function andThen(_arg) {\n // also support a function that returns a promise\n if (typeof _arg === 'function')\n return promise.then(_arg);\n else\n return promise.then(function () {\n // if is a module, pass the name. If not, pass the array\n var whatToLoad = getRequired(_arg);\n // simple error check\n if (!whatToLoad) return $.error('Route resolve: Bad resource name [' + _arg + ']');\n // finally, return a promise\n return $ocLL.load(whatToLoad);\n });\n }\n\n // check and returns required data\n // analyze module items with the form [name: '', files: []]\n // and also simple array of script files (for not angular js)\n function getRequired(name) {\n if (APP_REQUIRES.modules)\n for (var m in APP_REQUIRES.modules)\n if (APP_REQUIRES.modules[m].name && APP_REQUIRES.modules[m].name === name)\n return APP_REQUIRES.modules[m];\n return APP_REQUIRES.scripts && APP_REQUIRES.scripts[name];\n }\n\n }]\n };\n }", "title": "" }, { "docid": "bab6239bad2169c00519597b603600ec", "score": "0.5332718", "text": "function getResolvablePromise () {\n let resolveFn\n\n const promise = new Promise(function (resolve, reject) {\n resolveFn = resolve\n })\n\n promise.resolve = resolveFn\n return promise\n}", "title": "" }, { "docid": "e4b05af0f59b4b5e46e82fa39c527800", "score": "0.5330111", "text": "function async(f) {\n return function () {\n var argsToForward = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n argsToForward[_i] = arguments[_i];\n }\n __WEBPACK_IMPORTED_MODULE_0__promise_external__[\"b\" /* resolve */](true).then(function () {\n f.apply(null, argsToForward);\n });\n };\n}", "title": "" }, { "docid": "3d3b234f737bfe3d3413d82160164184", "score": "0.53145254", "text": "function async(f) {\n return function () {\n var argsToForward = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n argsToForward[_i] = arguments[_i];\n }\n __WEBPACK_IMPORTED_MODULE_0__promise_external__[\"c\" /* resolve */](true).then(function () {\n f.apply(null, argsToForward);\n });\n };\n}", "title": "" }, { "docid": "3d3b234f737bfe3d3413d82160164184", "score": "0.53145254", "text": "function async(f) {\n return function () {\n var argsToForward = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n argsToForward[_i] = arguments[_i];\n }\n __WEBPACK_IMPORTED_MODULE_0__promise_external__[\"c\" /* resolve */](true).then(function () {\n f.apply(null, argsToForward);\n });\n };\n}", "title": "" }, { "docid": "3d3b234f737bfe3d3413d82160164184", "score": "0.53145254", "text": "function async(f) {\n return function () {\n var argsToForward = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n argsToForward[_i] = arguments[_i];\n }\n __WEBPACK_IMPORTED_MODULE_0__promise_external__[\"c\" /* resolve */](true).then(function () {\n f.apply(null, argsToForward);\n });\n };\n}", "title": "" }, { "docid": "3d3b234f737bfe3d3413d82160164184", "score": "0.53145254", "text": "function async(f) {\n return function () {\n var argsToForward = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n argsToForward[_i] = arguments[_i];\n }\n __WEBPACK_IMPORTED_MODULE_0__promise_external__[\"c\" /* resolve */](true).then(function () {\n f.apply(null, argsToForward);\n });\n };\n}", "title": "" }, { "docid": "fac00153b15e3b2f067c5aca7e5865e1", "score": "0.5307026", "text": "function hotCreateRequire(moduleId) {\n/******/ \t\tvar me = installedModules[moduleId];\n/******/ \t\tif (!me) return __webpack_require__;\n/******/ \t\tvar fn = function(request) {\n/******/ \t\t\tif (me.hot.active) {\n/******/ \t\t\t\tif (installedModules[request]) {\n/******/ \t\t\t\t\tif (installedModules[request].parents.indexOf(moduleId) === -1) {\n/******/ \t\t\t\t\t\tinstalledModules[request].parents.push(moduleId);\n/******/ \t\t\t\t\t}\n/******/ \t\t\t\t} else {\n/******/ \t\t\t\t\thotCurrentParents = [moduleId];\n/******/ \t\t\t\t\thotCurrentChildModule = request;\n/******/ \t\t\t\t}\n/******/ \t\t\t\tif (me.children.indexOf(request) === -1) {\n/******/ \t\t\t\t\tme.children.push(request);\n/******/ \t\t\t\t}\n/******/ \t\t\t} else {\n/******/ \t\t\t\tconsole.warn(\n/******/ \t\t\t\t\t\"[HMR] unexpected require(\" +\n/******/ \t\t\t\t\t\trequest +\n/******/ \t\t\t\t\t\t\") from disposed module \" +\n/******/ \t\t\t\t\t\tmoduleId\n/******/ \t\t\t\t);\n/******/ \t\t\t\thotCurrentParents = [];\n/******/ \t\t\t}\n/******/ \t\t\treturn __webpack_require__(request);\n/******/ \t\t};\n/******/ \t\tvar ObjectFactory = function ObjectFactory(name) {\n/******/ \t\t\treturn {\n/******/ \t\t\t\tconfigurable: true,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: function() {\n/******/ \t\t\t\t\treturn __webpack_require__[name];\n/******/ \t\t\t\t},\n/******/ \t\t\t\tset: function(value) {\n/******/ \t\t\t\t\t__webpack_require__[name] = value;\n/******/ \t\t\t\t}\n/******/ \t\t\t};\n/******/ \t\t};\n/******/ \t\tfor (var name in __webpack_require__) {\n/******/ \t\t\tif (\n/******/ \t\t\t\tObject.prototype.hasOwnProperty.call(__webpack_require__, name) &&\n/******/ \t\t\t\tname !== \"e\"\n/******/ \t\t\t) {\n/******/ \t\t\t\tObject.defineProperty(fn, name, ObjectFactory(name));\n/******/ \t\t\t}\n/******/ \t\t}\n/******/ \t\tfn.e = function(chunkId) {\n/******/ \t\t\tif (hotStatus === \"ready\") hotSetStatus(\"prepare\");\n/******/ \t\t\thotChunksLoading++;\n/******/ \t\t\treturn __webpack_require__.e(chunkId).then(finishChunkLoading, function(err) {\n/******/ \t\t\t\tfinishChunkLoading();\n/******/ \t\t\t\tthrow err;\n/******/ \t\t\t});\n/******/\n/******/ \t\t\tfunction finishChunkLoading() {\n/******/ \t\t\t\thotChunksLoading--;\n/******/ \t\t\t\tif (hotStatus === \"prepare\") {\n/******/ \t\t\t\t\tif (!hotWaitingFilesMap[chunkId]) {\n/******/ \t\t\t\t\t\thotEnsureUpdateChunk(chunkId);\n/******/ \t\t\t\t\t}\n/******/ \t\t\t\t\tif (hotChunksLoading === 0 && hotWaitingFiles === 0) {\n/******/ \t\t\t\t\t\thotUpdateDownloaded();\n/******/ \t\t\t\t\t}\n/******/ \t\t\t\t}\n/******/ \t\t\t}\n/******/ \t\t};\n/******/ \t\treturn fn;\n/******/ \t}", "title": "" }, { "docid": "3e39e373bb360f22dac709d563853c82", "score": "0.5300285", "text": "function resolveFor() {\r\n var _args = arguments;\r\n return {\r\n deps: ['$ocLazyLoad','$q', function ($ocLL, $q) {\r\n // Creates a promise chain for each argument\r\n var promise = $q.when(1); // empty promise\r\n for(var i=0, len=_args.length; i < len; i ++){\r\n promise = andThen(_args[i]);\r\n }\r\n return promise;\r\n\r\n // creates promise to chain dynamically\r\n function andThen(_arg) {\r\n // also support a function that returns a promise\r\n if(typeof _arg === 'function')\r\n return promise.then(_arg);\r\n else\r\n return promise.then(function() {\r\n // if is a module, pass the name. If not, pass the array\r\n var whatToLoad = getRequired(_arg);\r\n // simple error check\r\n if(!whatToLoad) return $.error('Route resolve: Bad resource name [' + _arg + ']');\r\n // finally, return a promise\r\n return $ocLL.load( whatToLoad );\r\n });\r\n }\r\n // check and returns required data\r\n // analyze module items with the form [name: '', files: []]\r\n // and also simple array of script files (for not angular js)\r\n function getRequired(name) {\r\n if (APP_REQUIRES.modules)\r\n for(var m in APP_REQUIRES.modules)\r\n if(APP_REQUIRES.modules[m].name && APP_REQUIRES.modules[m].name === name)\r\n return APP_REQUIRES.modules[m];\r\n return APP_REQUIRES.scripts && APP_REQUIRES.scripts[name];\r\n }\r\n\r\n }]};\r\n }", "title": "" }, { "docid": "3e39e373bb360f22dac709d563853c82", "score": "0.5300285", "text": "function resolveFor() {\r\n var _args = arguments;\r\n return {\r\n deps: ['$ocLazyLoad','$q', function ($ocLL, $q) {\r\n // Creates a promise chain for each argument\r\n var promise = $q.when(1); // empty promise\r\n for(var i=0, len=_args.length; i < len; i ++){\r\n promise = andThen(_args[i]);\r\n }\r\n return promise;\r\n\r\n // creates promise to chain dynamically\r\n function andThen(_arg) {\r\n // also support a function that returns a promise\r\n if(typeof _arg === 'function')\r\n return promise.then(_arg);\r\n else\r\n return promise.then(function() {\r\n // if is a module, pass the name. If not, pass the array\r\n var whatToLoad = getRequired(_arg);\r\n // simple error check\r\n if(!whatToLoad) return $.error('Route resolve: Bad resource name [' + _arg + ']');\r\n // finally, return a promise\r\n return $ocLL.load( whatToLoad );\r\n });\r\n }\r\n // check and returns required data\r\n // analyze module items with the form [name: '', files: []]\r\n // and also simple array of script files (for not angular js)\r\n function getRequired(name) {\r\n if (APP_REQUIRES.modules)\r\n for(var m in APP_REQUIRES.modules)\r\n if(APP_REQUIRES.modules[m].name && APP_REQUIRES.modules[m].name === name)\r\n return APP_REQUIRES.modules[m];\r\n return APP_REQUIRES.scripts && APP_REQUIRES.scripts[name];\r\n }\r\n\r\n }]};\r\n }", "title": "" }, { "docid": "e9b8892749acad7471a0446052ea140e", "score": "0.52960354", "text": "function resolveFor() {\n var _args = arguments;\n return {\n deps: ['$ocLazyLoad','$q', function ($ocLL, $q) {\n // Creates a promise chain for each argument\n var promise = $q.when(1); // empty promise\n for(var i=0, len=_args.length; i < len; i ++){\n promise = andThen(_args[i]);\n }\n return promise;\n\n // creates promise to chain dynamically\n function andThen(_arg) {\n // also support a function that returns a promise\n if(typeof _arg === 'function')\n return promise.then(_arg);\n else\n return promise.then(function() {\n // if is a module, pass the name. If not, pass the array\n var whatToLoad = getRequired(_arg);\n // simple error check\n if(!whatToLoad) return $.error('Route resolve: Bad resource name [' + _arg + ']');\n // finally, return a promise\n return $ocLL.load( whatToLoad );\n });\n }\n // check and returns required data\n // analyze module items with the form [name: '', files: []]\n // and also simple array of script files (for not angular js)\n function getRequired(name) {\n if (APP_REQUIRES.modules)\n for(var m in APP_REQUIRES.modules)\n if(APP_REQUIRES.modules[m].name && APP_REQUIRES.modules[m].name === name)\n return APP_REQUIRES.modules[m];\n return APP_REQUIRES.scripts && APP_REQUIRES.scripts[name];\n }\n\n }]};\n }", "title": "" }, { "docid": "e9b8892749acad7471a0446052ea140e", "score": "0.52960354", "text": "function resolveFor() {\n var _args = arguments;\n return {\n deps: ['$ocLazyLoad','$q', function ($ocLL, $q) {\n // Creates a promise chain for each argument\n var promise = $q.when(1); // empty promise\n for(var i=0, len=_args.length; i < len; i ++){\n promise = andThen(_args[i]);\n }\n return promise;\n\n // creates promise to chain dynamically\n function andThen(_arg) {\n // also support a function that returns a promise\n if(typeof _arg === 'function')\n return promise.then(_arg);\n else\n return promise.then(function() {\n // if is a module, pass the name. If not, pass the array\n var whatToLoad = getRequired(_arg);\n // simple error check\n if(!whatToLoad) return $.error('Route resolve: Bad resource name [' + _arg + ']');\n // finally, return a promise\n return $ocLL.load( whatToLoad );\n });\n }\n // check and returns required data\n // analyze module items with the form [name: '', files: []]\n // and also simple array of script files (for not angular js)\n function getRequired(name) {\n if (APP_REQUIRES.modules)\n for(var m in APP_REQUIRES.modules)\n if(APP_REQUIRES.modules[m].name && APP_REQUIRES.modules[m].name === name)\n return APP_REQUIRES.modules[m];\n return APP_REQUIRES.scripts && APP_REQUIRES.scripts[name];\n }\n\n }]};\n }", "title": "" }, { "docid": "97164b6cea47546f5ae58076ac5c3b16", "score": "0.5266886", "text": "function resolveFor() {\n\t\t\tvar _args = arguments;\n\t\t\treturn {\n\t\t\t\tdeps: ['$ocLazyLoad', '$q', function ($ocLL, $q) {\n\t\t\t\t\t// Creates a promise chain for each argument\n\t\t\t\t\tvar promise = $q.when(1); // empty promise\n\t\t\t\t\tfor (var i = 0, len = _args.length; i < len; i++) {\n\t\t\t\t\t\tpromise = andThen(_args[i]);\n\t\t\t\t\t}\n\t\t\t\t\treturn promise;\n\n\t\t\t\t\t// creates promise to chain dynamically\n\t\t\t\t\tfunction andThen(_arg) {\n\t\t\t\t\t\t// also support a function that returns a promise\n\t\t\t\t\t\tif (typeof _arg === 'function')\n\t\t\t\t\t\t\treturn promise.then(_arg);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\treturn promise.then(function () {\n\t\t\t\t\t\t\t\t// if is a module, pass the name. If not, pass the array\n\t\t\t\t\t\t\t\tvar whatToLoad = getRequired(_arg);\n\t\t\t\t\t\t\t\t// simple error check\n\t\t\t\t\t\t\t\tif (!whatToLoad) return $.error('Route resolve: Bad resource name [' + _arg + ']');\n\t\t\t\t\t\t\t\t// finally, return a promise\n\t\t\t\t\t\t\t\treturn $ocLL.load(whatToLoad);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\t\t\t\t\t// check and returns required data\n\t\t\t\t\t// analyze module items with the form [name: '', files: []]\n\t\t\t\t\t// and also simple array of script files (for not angular js)\n\t\t\t\t\tfunction getRequired(name) {\n\t\t\t\t\t\tif (APP_REQUIRES.modules)\n\t\t\t\t\t\t\tfor (var m in APP_REQUIRES.modules)\n\t\t\t\t\t\t\t\tif (APP_REQUIRES.modules[m].name && APP_REQUIRES.modules[m].name === name)\n\t\t\t\t\t\t\t\t\treturn APP_REQUIRES.modules[m];\n\t\t\t\t\t\treturn APP_REQUIRES.scripts && APP_REQUIRES.scripts[name];\n\t\t\t\t\t}\n\n\t\t\t\t}]\n\t\t\t};\n\t\t}", "title": "" }, { "docid": "62ade0c0d32c3e66e156d69ef006a1f3", "score": "0.5249353", "text": "function __webpack_require__(_){\n/******/\n/******/ // Check if module is in cache\n/******/if(r[_])\n/******/return r[_].exports;\n/******/\n/******/ // Create a new module (and put it into the cache)\n/******/var t=r[_]={\n/******/i:_,\n/******/l:!1,\n/******/exports:{}\n/******/};\n/******/\n/******/ // Execute the module function\n/******/\n/******/\n/******/ // Return the exports of the module\n/******/return e[_].call(t.exports,t,t.exports,__webpack_require__),\n/******/\n/******/ // Flag the module as loaded\n/******/t.l=!0,t.exports;\n/******/}", "title": "" }, { "docid": "cbd847a69b398a08410004677533d374", "score": "0.52488685", "text": "function lazyThenable(createPromise) {\n return {\n then: getThen(createPromise)\n };\n}", "title": "" }, { "docid": "1dc933ecab9796d9b496c679b230bc29", "score": "0.52458", "text": "function requireDeps() {\n var _args = arguments;\n return {\n deps: ['$ocLazyLoad','$q', function ($ocLL, $q) {\n // Creates a promise chain for each argument\n var promise = $q.when(1); // empty promise\n for(var i=0, len=_args.length; i < len; i ++){\n promise = addThen(_args[i]);\n }\n return promise;\n\n // creates promise to chain dynamically\n function addThen(_arg) {\n // also support a function that returns a promise\n if(typeof _arg == 'function')\n return promise.then(_arg);\n else\n return promise.then(function() {\n // if is a module, pass the name. If not, pass the array\n var whatToLoad = getRequired(_arg);\n // simple error check\n if(!whatToLoad) return $.error('Route resolve: Bad resource name [' + _arg + ']');\n // finally, return a promise\n return $ocLL.load( whatToLoad );\n });\n }\n // check and returns required data\n // analyze module items with the form [name: '', files: []]\n // and also simple array of script files (for not angular js)\n function getRequired(name) {\n if (appDependencies.modules)\n for(var m in appDependencies.modules)\n if(appDependencies.modules[m].name && appDependencies.modules[m].name === name)\n return appDependencies.modules[m];\n return appDependencies.scripts && appDependencies.scripts[name];\n }\n\n }]};\n }", "title": "" }, { "docid": "96d22212b681d855fca1f3ea96606560", "score": "0.52453977", "text": "function assets(cb) {\n return new Promise((resolve, reject) => {\n webpack(webpackConfig, (err, stats) => {\n if (err) {\n return reject(err);\n }\n if (stats.hasErrors()) {\n return reject(new Error(stats.compilation.errors.join(\"\\n\")));\n }\n resolve();\n });\n });\n }", "title": "" }, { "docid": "8551487d4871a5e08efe506e72250f65", "score": "0.52345824", "text": "function loadImplementation(){if(typeof window.Promise==='undefined'){throw new Error(\"any-promise browser requires a polyfill or explicit registration\"+\" e.g: require('any-promise/register/bluebird')\");}return{Promise:window.Promise,implementation:'window.Promise'};}", "title": "" }, { "docid": "5fd9733d81b5d0c8c251e7a1bf5dfc82", "score": "0.52325135", "text": "function myFn() {\n return Promise.resolve(\"Hello\");\n}", "title": "" }, { "docid": "37cc6ebca2f105abe0d3421a7aed2cb0", "score": "0.5223693", "text": "function e(){return n||(n=new Promise((t=>import('./i3s-7ed35c12.js').then((t=>t.i)).then((({default:e})=>{const n=e({locateFile:i$1,onRuntimeInitialized:()=>t(n)});delete n.then;})))).catch((t=>{throw t}))),n}", "title": "" }, { "docid": "be332b87453e82d3bf0bb2f3ea0e857d", "score": "0.5221125", "text": "async function getPromise(){} // will always return a promise using 'async'", "title": "" }, { "docid": "d6bf0e84f5fc57d4ff09c1eb98214982", "score": "0.5211278", "text": "function hotCreateRequire(moduleId) {\n/******/ \t\tvar me = installedModules[moduleId];\n/******/ \t\tif (!me) return __webpack_require__;\n/******/ \t\tvar fn = function(request) {\n/******/ \t\t\tif (me.hot.active) {\n/******/ \t\t\t\tif (installedModules[request]) {\n/******/ \t\t\t\t\tif (installedModules[request].parents.indexOf(moduleId) === -1) {\n/******/ \t\t\t\t\t\tinstalledModules[request].parents.push(moduleId);\n/******/ \t\t\t\t\t}\n/******/ \t\t\t\t} else {\n/******/ \t\t\t\t\thotCurrentParents = [moduleId];\n/******/ \t\t\t\t\thotCurrentChildModule = request;\n/******/ \t\t\t\t}\n/******/ \t\t\t\tif (me.children.indexOf(request) === -1) {\n/******/ \t\t\t\t\tme.children.push(request);\n/******/ \t\t\t\t}\n/******/ \t\t\t} else {\n/******/ \t\t\t\tconsole.warn(\n/******/ \t\t\t\t\t\"[HMR] unexpected require(\" +\n/******/ \t\t\t\t\t\trequest +\n/******/ \t\t\t\t\t\t\") from disposed module \" +\n/******/ \t\t\t\t\t\tmoduleId\n/******/ \t\t\t\t);\n/******/ \t\t\t\thotCurrentParents = [];\n/******/ \t\t\t}\n/******/ \t\t\treturn __webpack_require__(request);\n/******/ \t\t};\n/******/ \t\tvar ObjectFactory = function ObjectFactory(name) {\n/******/ \t\t\treturn {\n/******/ \t\t\t\tconfigurable: true,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: function() {\n/******/ \t\t\t\t\treturn __webpack_require__[name];\n/******/ \t\t\t\t},\n/******/ \t\t\t\tset: function(value) {\n/******/ \t\t\t\t\t__webpack_require__[name] = value;\n/******/ \t\t\t\t}\n/******/ \t\t\t};\n/******/ \t\t};\n/******/ \t\tfor (var name in __webpack_require__) {\n/******/ \t\t\tif (\n/******/ \t\t\t\tObject.prototype.hasOwnProperty.call(__webpack_require__, name) &&\n/******/ \t\t\t\tname !== \"e\" &&\n/******/ \t\t\t\tname !== \"t\"\n/******/ \t\t\t) {\n/******/ \t\t\t\tObject.defineProperty(fn, name, ObjectFactory(name));\n/******/ \t\t\t}\n/******/ \t\t}\n/******/ \t\tfn.e = function(chunkId) {\n/******/ \t\t\tif (hotStatus === \"ready\") hotSetStatus(\"prepare\");\n/******/ \t\t\thotChunksLoading++;\n/******/ \t\t\treturn __webpack_require__.e(chunkId).then(finishChunkLoading, function(err) {\n/******/ \t\t\t\tfinishChunkLoading();\n/******/ \t\t\t\tthrow err;\n/******/ \t\t\t});\n/******/\n/******/ \t\t\tfunction finishChunkLoading() {\n/******/ \t\t\t\thotChunksLoading--;\n/******/ \t\t\t\tif (hotStatus === \"prepare\") {\n/******/ \t\t\t\t\tif (!hotWaitingFilesMap[chunkId]) {\n/******/ \t\t\t\t\t\thotEnsureUpdateChunk(chunkId);\n/******/ \t\t\t\t\t}\n/******/ \t\t\t\t\tif (hotChunksLoading === 0 && hotWaitingFiles === 0) {\n/******/ \t\t\t\t\t\thotUpdateDownloaded();\n/******/ \t\t\t\t\t}\n/******/ \t\t\t\t}\n/******/ \t\t\t}\n/******/ \t\t};\n/******/ \t\tfn.t = function(value, mode) {\n/******/ \t\t\tif (mode & 1) value = fn(value);\n/******/ \t\t\treturn __webpack_require__.t(value, mode & ~1);\n/******/ \t\t};\n/******/ \t\treturn fn;\n/******/ \t}", "title": "" }, { "docid": "d6bf0e84f5fc57d4ff09c1eb98214982", "score": "0.5211278", "text": "function hotCreateRequire(moduleId) {\n/******/ \t\tvar me = installedModules[moduleId];\n/******/ \t\tif (!me) return __webpack_require__;\n/******/ \t\tvar fn = function(request) {\n/******/ \t\t\tif (me.hot.active) {\n/******/ \t\t\t\tif (installedModules[request]) {\n/******/ \t\t\t\t\tif (installedModules[request].parents.indexOf(moduleId) === -1) {\n/******/ \t\t\t\t\t\tinstalledModules[request].parents.push(moduleId);\n/******/ \t\t\t\t\t}\n/******/ \t\t\t\t} else {\n/******/ \t\t\t\t\thotCurrentParents = [moduleId];\n/******/ \t\t\t\t\thotCurrentChildModule = request;\n/******/ \t\t\t\t}\n/******/ \t\t\t\tif (me.children.indexOf(request) === -1) {\n/******/ \t\t\t\t\tme.children.push(request);\n/******/ \t\t\t\t}\n/******/ \t\t\t} else {\n/******/ \t\t\t\tconsole.warn(\n/******/ \t\t\t\t\t\"[HMR] unexpected require(\" +\n/******/ \t\t\t\t\t\trequest +\n/******/ \t\t\t\t\t\t\") from disposed module \" +\n/******/ \t\t\t\t\t\tmoduleId\n/******/ \t\t\t\t);\n/******/ \t\t\t\thotCurrentParents = [];\n/******/ \t\t\t}\n/******/ \t\t\treturn __webpack_require__(request);\n/******/ \t\t};\n/******/ \t\tvar ObjectFactory = function ObjectFactory(name) {\n/******/ \t\t\treturn {\n/******/ \t\t\t\tconfigurable: true,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: function() {\n/******/ \t\t\t\t\treturn __webpack_require__[name];\n/******/ \t\t\t\t},\n/******/ \t\t\t\tset: function(value) {\n/******/ \t\t\t\t\t__webpack_require__[name] = value;\n/******/ \t\t\t\t}\n/******/ \t\t\t};\n/******/ \t\t};\n/******/ \t\tfor (var name in __webpack_require__) {\n/******/ \t\t\tif (\n/******/ \t\t\t\tObject.prototype.hasOwnProperty.call(__webpack_require__, name) &&\n/******/ \t\t\t\tname !== \"e\" &&\n/******/ \t\t\t\tname !== \"t\"\n/******/ \t\t\t) {\n/******/ \t\t\t\tObject.defineProperty(fn, name, ObjectFactory(name));\n/******/ \t\t\t}\n/******/ \t\t}\n/******/ \t\tfn.e = function(chunkId) {\n/******/ \t\t\tif (hotStatus === \"ready\") hotSetStatus(\"prepare\");\n/******/ \t\t\thotChunksLoading++;\n/******/ \t\t\treturn __webpack_require__.e(chunkId).then(finishChunkLoading, function(err) {\n/******/ \t\t\t\tfinishChunkLoading();\n/******/ \t\t\t\tthrow err;\n/******/ \t\t\t});\n/******/\n/******/ \t\t\tfunction finishChunkLoading() {\n/******/ \t\t\t\thotChunksLoading--;\n/******/ \t\t\t\tif (hotStatus === \"prepare\") {\n/******/ \t\t\t\t\tif (!hotWaitingFilesMap[chunkId]) {\n/******/ \t\t\t\t\t\thotEnsureUpdateChunk(chunkId);\n/******/ \t\t\t\t\t}\n/******/ \t\t\t\t\tif (hotChunksLoading === 0 && hotWaitingFiles === 0) {\n/******/ \t\t\t\t\t\thotUpdateDownloaded();\n/******/ \t\t\t\t\t}\n/******/ \t\t\t\t}\n/******/ \t\t\t}\n/******/ \t\t};\n/******/ \t\tfn.t = function(value, mode) {\n/******/ \t\t\tif (mode & 1) value = fn(value);\n/******/ \t\t\treturn __webpack_require__.t(value, mode & ~1);\n/******/ \t\t};\n/******/ \t\treturn fn;\n/******/ \t}", "title": "" }, { "docid": "d6bf0e84f5fc57d4ff09c1eb98214982", "score": "0.5211278", "text": "function hotCreateRequire(moduleId) {\n/******/ \t\tvar me = installedModules[moduleId];\n/******/ \t\tif (!me) return __webpack_require__;\n/******/ \t\tvar fn = function(request) {\n/******/ \t\t\tif (me.hot.active) {\n/******/ \t\t\t\tif (installedModules[request]) {\n/******/ \t\t\t\t\tif (installedModules[request].parents.indexOf(moduleId) === -1) {\n/******/ \t\t\t\t\t\tinstalledModules[request].parents.push(moduleId);\n/******/ \t\t\t\t\t}\n/******/ \t\t\t\t} else {\n/******/ \t\t\t\t\thotCurrentParents = [moduleId];\n/******/ \t\t\t\t\thotCurrentChildModule = request;\n/******/ \t\t\t\t}\n/******/ \t\t\t\tif (me.children.indexOf(request) === -1) {\n/******/ \t\t\t\t\tme.children.push(request);\n/******/ \t\t\t\t}\n/******/ \t\t\t} else {\n/******/ \t\t\t\tconsole.warn(\n/******/ \t\t\t\t\t\"[HMR] unexpected require(\" +\n/******/ \t\t\t\t\t\trequest +\n/******/ \t\t\t\t\t\t\") from disposed module \" +\n/******/ \t\t\t\t\t\tmoduleId\n/******/ \t\t\t\t);\n/******/ \t\t\t\thotCurrentParents = [];\n/******/ \t\t\t}\n/******/ \t\t\treturn __webpack_require__(request);\n/******/ \t\t};\n/******/ \t\tvar ObjectFactory = function ObjectFactory(name) {\n/******/ \t\t\treturn {\n/******/ \t\t\t\tconfigurable: true,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: function() {\n/******/ \t\t\t\t\treturn __webpack_require__[name];\n/******/ \t\t\t\t},\n/******/ \t\t\t\tset: function(value) {\n/******/ \t\t\t\t\t__webpack_require__[name] = value;\n/******/ \t\t\t\t}\n/******/ \t\t\t};\n/******/ \t\t};\n/******/ \t\tfor (var name in __webpack_require__) {\n/******/ \t\t\tif (\n/******/ \t\t\t\tObject.prototype.hasOwnProperty.call(__webpack_require__, name) &&\n/******/ \t\t\t\tname !== \"e\" &&\n/******/ \t\t\t\tname !== \"t\"\n/******/ \t\t\t) {\n/******/ \t\t\t\tObject.defineProperty(fn, name, ObjectFactory(name));\n/******/ \t\t\t}\n/******/ \t\t}\n/******/ \t\tfn.e = function(chunkId) {\n/******/ \t\t\tif (hotStatus === \"ready\") hotSetStatus(\"prepare\");\n/******/ \t\t\thotChunksLoading++;\n/******/ \t\t\treturn __webpack_require__.e(chunkId).then(finishChunkLoading, function(err) {\n/******/ \t\t\t\tfinishChunkLoading();\n/******/ \t\t\t\tthrow err;\n/******/ \t\t\t});\n/******/\n/******/ \t\t\tfunction finishChunkLoading() {\n/******/ \t\t\t\thotChunksLoading--;\n/******/ \t\t\t\tif (hotStatus === \"prepare\") {\n/******/ \t\t\t\t\tif (!hotWaitingFilesMap[chunkId]) {\n/******/ \t\t\t\t\t\thotEnsureUpdateChunk(chunkId);\n/******/ \t\t\t\t\t}\n/******/ \t\t\t\t\tif (hotChunksLoading === 0 && hotWaitingFiles === 0) {\n/******/ \t\t\t\t\t\thotUpdateDownloaded();\n/******/ \t\t\t\t\t}\n/******/ \t\t\t\t}\n/******/ \t\t\t}\n/******/ \t\t};\n/******/ \t\tfn.t = function(value, mode) {\n/******/ \t\t\tif (mode & 1) value = fn(value);\n/******/ \t\t\treturn __webpack_require__.t(value, mode & ~1);\n/******/ \t\t};\n/******/ \t\treturn fn;\n/******/ \t}", "title": "" }, { "docid": "e5379f0ae10fb102dc3e56a7e8a0a4d6", "score": "0.5207248", "text": "function Promise() {}", "title": "" }, { "docid": "8300e011dc86ba56c44d3a0208b8a955", "score": "0.5204044", "text": "function t(){return i$1||(i$1=new Promise((e=>import('./i3s-e9bf6119.js').then((function(e){return e.i})).then((({default:t})=>{const i=t({locateFile:n$1,onRuntimeInitialized:()=>e(i)});delete i.then;})))).catch((e=>Promise.reject(e)))),i$1}", "title": "" }, { "docid": "f567469065762a4f16b0e3dc480abd01", "score": "0.5194725", "text": "function newRequire(o, cb) {\n cb=cb||function(e,r){\n if(e)\n debug(e.stack);\n };\n\n if(!o.module){\n return cb(new Error(\"No module given!\"));\n }\n\n o.moduleName= o.module.split(\"@\")[0];\n\n try {\n o.result = require(o.moduleName);\n debug(\"normal required: \"+ o.module);\n cb(null, o);\n return o.result;\n } catch (e) {\n installModule(o, function (err, resp) {\n try {\n o.result = require(o.moduleName);\n debug(\"success install required: \"+ o.module);\n cb(null, o);\n return o.result;\n } catch (e) {\n debug(\"failed to install require: \"+ o.module);\n //console.log(e.stack);\n o.error=e;\n cb(e, o);\n return null;\n }\n })\n }\n}", "title": "" }, { "docid": "606d25dddc780b38e91ea960a2f1b667", "score": "0.51930654", "text": "function defer() {\n var resolve, reject;\n var promise = new Promise(function() {\n resolve = arguments[0]\n reject = arguments[1]\n });\n return {\n resolve: resolve,\n reject: reject,\n promise: promise\n }\n }", "title": "" }, { "docid": "cd68cabaf49af6b495f71dc323b7174d", "score": "0.517665", "text": "addDependency() {\n let resolver = () => void (0);\n this._deps.push(new Promise((resolve) => {\n resolver = resolve;\n }));\n return resolver;\n }", "title": "" }, { "docid": "cd68cabaf49af6b495f71dc323b7174d", "score": "0.517665", "text": "addDependency() {\n let resolver = () => void (0);\n this._deps.push(new Promise((resolve) => {\n resolver = resolve;\n }));\n return resolver;\n }", "title": "" }, { "docid": "8b1089e87b695b6b17f65d415405b9e5", "score": "0.517147", "text": "function loadImplementation(){\n if(typeof window.Promise === 'undefined'){\n throw new Error(\"any-promise browser requires a polyfill or explicit registration\"+\n \" e.g: require('any-promise/register/bluebird')\")\n }\n return {\n Promise: window.Promise,\n implementation: 'window.Promise'\n }\n}", "title": "" }, { "docid": "8b1089e87b695b6b17f65d415405b9e5", "score": "0.517147", "text": "function loadImplementation(){\n if(typeof window.Promise === 'undefined'){\n throw new Error(\"any-promise browser requires a polyfill or explicit registration\"+\n \" e.g: require('any-promise/register/bluebird')\")\n }\n return {\n Promise: window.Promise,\n implementation: 'window.Promise'\n }\n}", "title": "" }, { "docid": "53239ff7eba4a71999f475719e9a90f6", "score": "0.5169985", "text": "load() {\n return new Promise(resolve => {\n resolve();\n });\n }", "title": "" }, { "docid": "8c2b0e22e31e43d81536f2971313223d", "score": "0.51594865", "text": "function dynamicRequire(path) {\n // @ts-expect-error\n if (typeof require !== `undefined`) {\n // @ts-expect-error\n return eval(\"require\")(path);\n }\n else {\n return require(path);\n }\n}", "title": "" }, { "docid": "338a9d66bb1e9b63ae983593e5aaa083", "score": "0.5150189", "text": "function require(id) {\n\n return resolve(id);\n}", "title": "" }, { "docid": "6b79d08802626338002f9053181a0430", "score": "0.5148079", "text": "get require() {\n }", "title": "" }, { "docid": "4f67fb1c194839929cf0ab6258bf8f37", "score": "0.51395553", "text": "async function foo() {\n return Promise.resolve('yes');\n}", "title": "" }, { "docid": "6cf22c1d262fb9c4a5a148dc7b098721", "score": "0.5134483", "text": "function fn() {\n return Promise.resolve('hello');\n}", "title": "" }, { "docid": "c4c7832e37b50d1f1df2791d55385b23", "score": "0.51329815", "text": "componentDidMount () {\n this.props.loadingPromise\n .then(module => {\n this.component = module.default\n this.setState({ loaded: true })\n })\n }", "title": "" }, { "docid": "e45f9a6ae3898b956dd95aab2c256ccd", "score": "0.51321876", "text": "function extricateLoader(content) {\n var callback = this.async();\n\n var query = loaderUtils.getOptions(this) || {};\n var nodeRequireRegex = query.resolve && new RegExp(query.resolve, 'i');\n\n var dependencies = [];\n // run root module, importing some resources synchronously with node require\n // and returning the placeholder for others\n var moduleWithPlaceholders = runScript(content, this.resourcePath, {\n require: function(resourcePath) {\n if (nodeRequireRegex && nodeRequireRegex.test(resourcePath)) {\n // evaluate the required file with node's require\n var absPath = path.resolve(path.dirname(this.resourcePath), resourcePath);\n return require(absPath);\n } else {\n // evaluate the required file with webpack's require, interpolate the result later\n dependencies.push(new Promise(function(resolve, reject) {\n // load the module with webpack's internal module loader\n this.loadModule(resourcePath, function(err, src) {\n if (err) {\n return reject(err);\n }\n try {\n // run the imported module to get its (string) export\n var result = runScript(src, resourcePath, {\n __webpack_public_path__: this._compilation.options.output.publicPath || ''\n });\n resolve(result);\n } catch (e) {\n reject(e);\n }\n }.bind(this));\n }.bind(this)));\n\n return placeholder;\n }\n }.bind(this)\n });\n\n Promise.all(dependencies)\n .then(function(results) {\n // interpolate the results into the root module's placeholders\n return moduleWithPlaceholders.replace(new RegExp(placeholder, 'g'), function() {\n return results.shift();\n });\n })\n .then(function(content) {\n callback(null, content);\n }, function(err) {\n callback(err);\n });\n}", "title": "" }, { "docid": "4ba8aeb7c40c18f07781e2f5661089d3", "score": "0.5117675", "text": "async installDependencies() {\n }", "title": "" }, { "docid": "c2afbf23752abd3e61c75a33f9a3a9ef", "score": "0.510932", "text": "function es6Promisify(thenable) {\n return new Promise((resolve, reject) => {\n thenable.then(resolve, reject);\n });\n}", "title": "" }, { "docid": "85794d99b44d952056c381ab7dd5148f", "score": "0.5099548", "text": "function myWaitForCall() {\n return new Promise(function (resolve, reject) {\n gResolve = resolve\n gReject = reject\n })\n}", "title": "" }, { "docid": "33f869ad0ab3bd5f1ef54936eba782fc", "score": "0.5086698", "text": "function defer () {\n return new Promise(function (fulfill) {\n return fulfill(\"RESOLVED!\")\n });\n}", "title": "" }, { "docid": "819e7f125e2fb2af4e7cb895d04fb422", "score": "0.50846004", "text": "function asAsync(options) {\n var Async = /** @class */ (function (_super) {\n Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__extends\"])(Async, _super);\n function Async() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.state = {\n Component: _syncModuleCache ? _syncModuleCache.get(options.load) : undefined,\n };\n return _this;\n }\n Async.prototype.render = function () {\n // Typescript issue: the rest can't be pulled without the any cast, as TypeScript fails with rest on generics.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var _a = this.props, forwardedRef = _a.forwardedRef, Placeholder = _a.asyncPlaceholder, rest = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__rest\"])(_a, [\"forwardedRef\", \"asyncPlaceholder\"]);\n var Component = this.state.Component;\n return Component ? (react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](Component, Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__assign\"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__assign\"])({}, rest), { ref: forwardedRef }))) : Placeholder ? (react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](Placeholder, null)) : null;\n };\n Async.prototype.componentDidMount = function () {\n var _this = this;\n var Component = this.state.Component;\n if (!Component) {\n options\n .load()\n .then(function (LoadedComponent) {\n if (LoadedComponent) {\n // Cache component for future reference.\n _syncModuleCache && _syncModuleCache.set(options.load, LoadedComponent);\n // Set state.\n _this.setState({\n Component: LoadedComponent,\n }, options.onLoad);\n }\n })\n .catch(options.onError);\n }\n };\n return Async;\n }(react__WEBPACK_IMPORTED_MODULE_1__[\"Component\"]));\n return react__WEBPACK_IMPORTED_MODULE_1__[\"forwardRef\"](function (props, ref) { return react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](Async, Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__assign\"])({}, props, { forwardedRef: ref })); });\n}", "title": "" }, { "docid": "5f6b16080a5f4b742651d1d122990a32", "score": "0.50805044", "text": "function loadImplementation() {\n if (typeof window.Promise === 'undefined') {\n throw new Error(\"any-promise browser requires a polyfill or explicit registration\" + \" e.g: require('any-promise/register/bluebird')\");\n }\n\n return {\n Promise: window.Promise,\n implementation: 'window.Promise'\n };\n }", "title": "" }, { "docid": "817cc1ba009cb4af4e8a46685161dc4e", "score": "0.5068039", "text": "async function importFSModule() {\n if (!environment_js_1.isNode) {\n throw new Error('Cannot load the fs module API outside of Node.');\n }\n const fs = await Promise.resolve().then(() => __importStar(require('fs')));\n if (fs.promises) {\n return fs;\n }\n return fs.default;\n}", "title": "" }, { "docid": "103cb71718792401000f34b30d2d4446", "score": "0.506043", "text": "async function thenify(fn) {\n return await new Promise((resolve, reject) => {\n function callback(err, res) {\n if (err) return reject(err);\n return resolve(res);\n }\n fn(callback);\n });\n}", "title": "" }, { "docid": "a3f71aa3c638bc0a406157cd9c2382e7", "score": "0.5053729", "text": "function asAsync(options) {\n var Async =\n /** @class */\n function (_super) {\n Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__extends\"])(Async, _super);\n\n function Async() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n\n _this.state = {\n Component: _syncModuleCache ? _syncModuleCache.get(options.load) : undefined\n };\n return _this;\n }\n\n Async.prototype.render = function () {\n // Typescript issue: the rest can't be pulled without the any cast, as TypeScript fails with rest on generics.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var _a = this.props,\n forwardedRef = _a.forwardedRef,\n Placeholder = _a.asyncPlaceholder,\n rest = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__rest\"])(_a, [\"forwardedRef\", \"asyncPlaceholder\"]);\n\n var Component = this.state.Component;\n return Component ? react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](Component, Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__assign\"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__assign\"])({}, rest), {\n ref: forwardedRef\n })) : Placeholder ? react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](Placeholder, null) : null;\n };\n\n Async.prototype.componentDidMount = function () {\n var _this = this;\n\n var Component = this.state.Component;\n\n if (!Component) {\n options.load().then(function (LoadedComponent) {\n if (LoadedComponent) {\n // Cache component for future reference.\n _syncModuleCache && _syncModuleCache.set(options.load, LoadedComponent); // Set state.\n\n _this.setState({\n Component: LoadedComponent\n }, options.onLoad);\n }\n }).catch(options.onError);\n }\n };\n\n return Async;\n }(react__WEBPACK_IMPORTED_MODULE_1__[\"Component\"]);\n\n return react__WEBPACK_IMPORTED_MODULE_1__[\"forwardRef\"](function (props, ref) {\n return react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](Async, Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__assign\"])({}, props, {\n forwardedRef: ref\n }));\n });\n}", "title": "" }, { "docid": "efeb6d2f3fd63b1e82d813434a46022b", "score": "0.5053612", "text": "function loadImplementation() {\n if (typeof window.Promise === 'undefined') {\n throw new Error(\"any-promise browser requires a polyfill or explicit registration\" +\n \" e.g: require('any-promise/register/bluebird')\")\n }\n return {\n Promise: window.Promise,\n implementation: 'window.Promise'\n }\n }", "title": "" }, { "docid": "f99c0b29a6b656612f34573a9c1a3533", "score": "0.5053239", "text": "function diverge(fn) {\n function diverged(actual, ...args) {\n if (isThenable(actual)) {\n return actual.then((resolved) => fn.call(this, resolved, ...args));\n }\n else {\n return fn.call(this, actual, ...args);\n }\n }\n return diverged;\n}", "title": "" }, { "docid": "ca8a8b30ce83cb3a7f23efa94fb01508", "score": "0.5051442", "text": "async function define(...args) {\n\n // defineResult = new Promise((resolve,reject) => {\n\n // });\n\n // defineResult: either what's returned OR exports if using (require,exports,module) format\n usingDefineMethod = true;\n\n const moduleDefine = args.pop(); // always last param\n if (typeof moduleDefine !== 'function') \n throw new ModuleLoadError(`expecting module definition to be a function (was ${typeof moduleDefine})`);\n\n const externals = []; // will become our execution parms\n\n if (args.length > 0) { // remaining args are deps to be pre-loaded\n\n // explicit dependencies\n // check for dependencies, then execute define [our current code]\n // SIMPLE STRATEGY 1: implement as AMD expects (a single array of dependencies)\n \n const depsArray = args.pop() || []; // expect an array or nothing\n if (Array.isArray(depsArray))\n externals.push(...(await loadModulesX(...depsArray)));\n else\n throw new ModuleLoadError(`expecting '[dependencies]' to be an array (was ${typeof externals})`);\n\n // BUT, if one of these is 'require' THEN need to extract anyway\n\n \n }\n\n // now look at function itself: is it based on its deps or using (require,exports,module)\n if (args.length === 0) {\n if (moduleDefine.length === 0) {\n // all good\n }\n else {\n // likely (require,exports,module): worth checking? would do what if not???\n // only time would be an issue is if used other var names for some other purpose\n const [deps, modCode, req, expt, modx] = extractRequireDependencies(srcCode);\n await loadModulesX(...deps);\n externals.push(getModuleByName, exportedItems, moduleX); // the (require,exports,module) parms when calling\n }\n }\n \n try {\n const result = await moduleDefine(...externals); // need to pass either (...deps) or (require,exports,module)\n resolve(exportsUsed ? exportedItems : result);\n }\n catch(err) {\n // just return?\n reject(err);\n }\n }", "title": "" }, { "docid": "e24677226a1086c9b1acbc06bc926660", "score": "0.50499284", "text": "function h(e,t,n,o){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{s(o.next(e))}catch(t){i(t)}}function l(e){try{s(o[\"throw\"](e))}catch(t){i(t)}}function s(e){e.done?n(e.value):r(e.value).then(a,l)}s((o=o.apply(e,t||[])).next())}))}", "title": "" }, { "docid": "3d87cd31bbe1ca7271078672a3e84896", "score": "0.50479865", "text": "init() {\n return Promise.resolve()\n }", "title": "" }, { "docid": "d8d5685d684461f53d4f803d64067e0f", "score": "0.504141", "text": "function onLoad() {\r\n dependencyModule = resolve(name, module.uri);\r\n if (dependencyModule.deps.length === 0) {\r\n ready(dependencyModule)\r\n } else {\r\n dependencyModule.fetch()\r\n }\r\n }", "title": "" }, { "docid": "a392e4684894232bef353174e488a0ac", "score": "0.50376606", "text": "async function asAMDCode(srcCode, privateCtx = {}, globalCtx = window, extractRequiresFirst = false) {\n return new Promise(async (resolve,reject) => {\n if (extractRequiresFirst) {\n // first, extract dependencies from source code\n const [deps, modCode, req, expt, modx] = extractRequireDependencies(srcCode);\n await loadModulesX(...deps); // loads them then makes them available to all\n }\n\n var usingDefineMethod = false; // result of define function (will be async since may need to load dependent modules first)\n\n const exportsUsed = () => Object.keys(exportedItems).length > 0;\n const exportedItems = {},\n moduleX = { exports: exportedItems };\n\n define.amd = {}; // ...use an object (truthy) NOT just 'true'\n async function define(...args) {\n\n // defineResult = new Promise((resolve,reject) => {\n\n // });\n\n // defineResult: either what's returned OR exports if using (require,exports,module) format\n usingDefineMethod = true;\n\n const moduleDefine = args.pop(); // always last param\n if (typeof moduleDefine !== 'function') \n throw new ModuleLoadError(`expecting module definition to be a function (was ${typeof moduleDefine})`);\n\n const externals = []; // will become our execution parms\n\n if (args.length > 0) { // remaining args are deps to be pre-loaded\n\n // explicit dependencies\n // check for dependencies, then execute define [our current code]\n // SIMPLE STRATEGY 1: implement as AMD expects (a single array of dependencies)\n \n const depsArray = args.pop() || []; // expect an array or nothing\n if (Array.isArray(depsArray))\n externals.push(...(await loadModulesX(...depsArray)));\n else\n throw new ModuleLoadError(`expecting '[dependencies]' to be an array (was ${typeof externals})`);\n\n // BUT, if one of these is 'require' THEN need to extract anyway\n\n \n }\n\n // now look at function itself: is it based on its deps or using (require,exports,module)\n if (args.length === 0) {\n if (moduleDefine.length === 0) {\n // all good\n }\n else {\n // likely (require,exports,module): worth checking? would do what if not???\n // only time would be an issue is if used other var names for some other purpose\n const [deps, modCode, req, expt, modx] = extractRequireDependencies(srcCode);\n await loadModulesX(...deps);\n externals.push(getModuleByName, exportedItems, moduleX); // the (require,exports,module) parms when calling\n }\n }\n \n try {\n const result = await moduleDefine(...externals); // need to pass either (...deps) or (require,exports,module)\n resolve(exportsUsed ? exportedItems : result);\n }\n catch(err) {\n // just return?\n reject(err);\n }\n }\n\n function require(...args) {\n\n // could know if executing within 'define': does this matter?\n\n const req = args.pop(); // last or only parm\n if (args.length === 1 && typeof req === 'string') {\n // classic require: if loaded, return it\n // else: fail (later step can load req then try again)\n return getModuleByName(req); // may throw error if module not already loaded\n }\n else if (typeof req === 'function') {\n // treat like a define?\n //return \n define(...args); // await???\n }\n else {\n // unexpected: treat as error?\n throw new Error(`unexpect parms for require`);\n }\n }\n\n try {\n // important: sets this context for AMD modules\n //Object.assign(privateCtx, { define, require, get module() { throw new ModuleLoadError(); } });\n const amdMethods = { define, require, get module() { throw new ModuleLoadError(); } };\n\n const result = await executeCode(srcCode, amdMethods, privateCtx, globalEnv); // have additional context in between...\n // no errors\n usingDefineMethod || resolve(result); // else, expects it to be resolved/rejected from define function\n }\n catch(err) {\n if (err instanceof ModuleNotLoaded) {\n // try to extract requires first, then try again?\n // OR try immediately as CJS or try again after extract/load it and others?\n if (extractRequiresFirst) {\n // already tried, so fail now\n }\n else {\n return await asAMDCode(srcCode, privateCtx, globalCtx, true); // privateCtx now has define/require: delete them 1st?\n }\n }\n }\n\n })\n}", "title": "" }, { "docid": "f6ba8aa12052cefa88eaa350d4711f18", "score": "0.50353557", "text": "function defaultCallback(err, result) {\n // These lines fail jslint :( because it looks like a strict-mode\n // violation. If this function was called directly, that would be\n // true -- but we only call this function with it bound to an\n // appropriate context, so in practice this doesn't happen. But\n // jslint is right -- and if anyone can think of a better way to do\n // it then send me a pull request!\n // https://github.com/twistdigital/es6-promisify/issues\n if (err) {\n return this.reject(err);\n }\n this.resolve(result);\n}", "title": "" }, { "docid": "cef3953f51571b335a6f4175a9822b8e", "score": "0.50306416", "text": "if (this.options.shouldAutoInstall && packageManager) {\n this.options.logger?.warn({\n message: md`Auto installing polyfill for Node builtin module \"${packageName}\"...`,\n codeFrames: options.loc\n ? [\n {\n filePath: options.loc.filePath,\n codeHighlights: options.loc\n ? [\n convertSourceLocationToHighlight(\n options.loc,\n 'used here',\n ),\n ]\n : [],\n },\n ]\n : [],\n documentationURL:\n 'https://parceljs.org/features/node-emulation/#polyfilling-%26-excluding-builtin-node-modules',\n });\n\n await packageManager.resolve(\n packageName,\n this.options.projectRoot + '/index',\n {\n saveDev: true,\n shouldAutoInstall: true,\n range: builtin.range,\n },\n );\n\n // Need to clear the resolver caches after installing the package\n this.resolversByEnv.clear();\n\n // Re-resolve\n return this.resolve({\n ...options,\n filename: builtin.name,\n parent: this.options.projectRoot + '/index',\n });\n }", "title": "" }, { "docid": "7fe1fc222617bf414fa476f63deb85bd", "score": "0.50286543", "text": "function addThen(_arg) {\n // also support a function that returns a promise\n if(typeof _arg == 'function')\n return promise.then(_arg);\n else\n return promise.then(function() {\n // if is a module, pass the name. If not, pass the array\n var whatToLoad = getRequired(_arg);\n // simple error check\n if(!whatToLoad) return $.error('Route resolve: Bad resource name [' + _arg + ']');\n // finally, return a promise\n return $ocLL.load( whatToLoad );\n });\n }", "title": "" }, { "docid": "c577659417c7e763b9b35fce9a7ddb59", "score": "0.5027373", "text": "async function sayHi2(){\n\n // explicitly stating that we're reutnring a promise\n return Promise.resolve('Hi');\n}", "title": "" }, { "docid": "6f9523776f297f4f9a8fd285b1132db9", "score": "0.5025001", "text": "function doResolve( resolve, onComplete ) {\n resolve( window.gapi.client );\n\tif( onComplete ) {\n\t\tonComplete( window.gapi.client );\n }\n}", "title": "" }, { "docid": "f48067f17e9c85ba8409bfc319a76ab9", "score": "0.5023404", "text": "function transformRequireCall(path, state) {\n var calleePath = path.get('callee');\n if (\n !t.isIdentifier(calleePath.node, {name: 'require'}) &&\n !(\n t.isMemberExpression(calleePath.node) &&\n t.isIdentifier(calleePath.node.object, {name: 'require'}) &&\n t.isIdentifier(calleePath.node.property, {name: 'requireActual'})\n )\n ) {\n return;\n }\n\n var args = path.get('arguments');\n if (!args.length) {\n return;\n }\n var moduleArg = args[0];\n if (moduleArg.node.type === 'StringLiteral') {\n var module = mapModule(state, moduleArg.node.value);\n if (module) {\n moduleArg.replaceWith(t.stringLiteral(module));\n }\n }\n }", "title": "" }, { "docid": "360a3f2e1a5033826741f42db03e1c90", "score": "0.49996763", "text": "clientResolveFromComponent(){\n const Component = React.Children.only(this.props.children);\n // Check if method is implemented\n if (Component.type[this.context.method]){\n // Support a promise or standard object by wrapping in Promise.resolve\n return Promise.resolve(Component.type[this.context.method]());\n }else{\n return Promise.resolve(null);\n }\n }", "title": "" }, { "docid": "4a7976256620f9abee774653067645f6", "score": "0.49932966", "text": "prependPolyfills() {\n if ((Utils.isServerSide && !global._babelPolyfill) || (Utils.isBrowserSide && !window._babelPolyfill))\n require('@babel/polyfill')\n }", "title": "" }, { "docid": "8cbfb5dbbb7e769b4e8f7880d28a84a3", "score": "0.49819574", "text": "function fn(path){\n var orig = path;\n path = fn.resolve(path);\n return require(path, parent, orig);\n }", "title": "" }, { "docid": "fd4f518c79eceaa22629e4d12647584a", "score": "0.49709114", "text": "function asAsync(options) {\n var Async = /** @class */ (function (_super) {\n tslib__WEBPACK_IMPORTED_MODULE_0__[\"__extends\"](Async, _super);\n function Async() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.state = {\n Component: _syncModuleCache ? _syncModuleCache.get(options.load) : undefined\n };\n return _this;\n }\n Async.prototype.render = function () {\n // Typescript issue: the rest can't be pulled without the any cast, as TypeScript fails with rest on generics.\n // tslint:disable-next-line:no-any\n var _a = this.props, forwardedRef = _a.forwardedRef, Placeholder = _a.asyncPlaceholder, rest = tslib__WEBPACK_IMPORTED_MODULE_0__[\"__rest\"](_a, [\"forwardedRef\", \"asyncPlaceholder\"]);\n var Component = this.state.Component;\n return Component ? react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](Component, tslib__WEBPACK_IMPORTED_MODULE_0__[\"__assign\"]({}, rest, { ref: forwardedRef })) : Placeholder ? react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](Placeholder, null) : null;\n };\n Async.prototype.componentDidMount = function () {\n var _this = this;\n var Component = this.state.Component;\n if (!Component) {\n options\n .load()\n .then(function (LoadedComponent) {\n if (LoadedComponent) {\n // Cache component for future reference.\n _syncModuleCache && _syncModuleCache.set(options.load, LoadedComponent);\n // Set state.\n _this.setState({\n Component: LoadedComponent\n }, options.onLoad);\n }\n })\n .catch(options.onError);\n }\n };\n return Async;\n }(react__WEBPACK_IMPORTED_MODULE_1__[\"Component\"]));\n return react__WEBPACK_IMPORTED_MODULE_1__[\"forwardRef\"](function (props, ref) { return (react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](Async, tslib__WEBPACK_IMPORTED_MODULE_0__[\"__assign\"]({}, props, { forwardedRef: ref }))); });\n}", "title": "" }, { "docid": "fd4f518c79eceaa22629e4d12647584a", "score": "0.49709114", "text": "function asAsync(options) {\n var Async = /** @class */ (function (_super) {\n tslib__WEBPACK_IMPORTED_MODULE_0__[\"__extends\"](Async, _super);\n function Async() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.state = {\n Component: _syncModuleCache ? _syncModuleCache.get(options.load) : undefined\n };\n return _this;\n }\n Async.prototype.render = function () {\n // Typescript issue: the rest can't be pulled without the any cast, as TypeScript fails with rest on generics.\n // tslint:disable-next-line:no-any\n var _a = this.props, forwardedRef = _a.forwardedRef, Placeholder = _a.asyncPlaceholder, rest = tslib__WEBPACK_IMPORTED_MODULE_0__[\"__rest\"](_a, [\"forwardedRef\", \"asyncPlaceholder\"]);\n var Component = this.state.Component;\n return Component ? react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](Component, tslib__WEBPACK_IMPORTED_MODULE_0__[\"__assign\"]({}, rest, { ref: forwardedRef })) : Placeholder ? react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](Placeholder, null) : null;\n };\n Async.prototype.componentDidMount = function () {\n var _this = this;\n var Component = this.state.Component;\n if (!Component) {\n options\n .load()\n .then(function (LoadedComponent) {\n if (LoadedComponent) {\n // Cache component for future reference.\n _syncModuleCache && _syncModuleCache.set(options.load, LoadedComponent);\n // Set state.\n _this.setState({\n Component: LoadedComponent\n }, options.onLoad);\n }\n })\n .catch(options.onError);\n }\n };\n return Async;\n }(react__WEBPACK_IMPORTED_MODULE_1__[\"Component\"]));\n return react__WEBPACK_IMPORTED_MODULE_1__[\"forwardRef\"](function (props, ref) { return (react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](Async, tslib__WEBPACK_IMPORTED_MODULE_0__[\"__assign\"]({}, props, { forwardedRef: ref }))); });\n}", "title": "" }, { "docid": "3f47ae3361e2f107b3195f0b45f8151f", "score": "0.49676597", "text": "function Deferred () {\n // update 062115 for typeof\n if (typeof (Promise) !== 'undefined' && Promise.defer) {\n // need import of Promise.jsm for example: Cu.import('resource:/gree/modules/Promise.jsm');\n return Promise.defer()\n /* eslint-disable no-undef */\n } else if (typeof (PromiseUtils) !== 'undefined' && PromiseUtils.defer) {\n // need import of PromiseUtils.jsm for example: Cu.import('resource:/gree/modules/PromiseUtils.jsm');\n /* eslint-disable no-undef */\n return PromiseUtils.defer()\n } else {\n /* A method to resolve the associated Promise with the value passed.\n * If the promise is already settled it does nothing.\n *\n * @param {anything} value : This value is used to resolve the promise\n * If the value is a Promise then the associated promise assumes the state\n * of Promise passed as value.\n */\n this.resolve = null\n\n /* A method to reject the assocaited Promise with the value passed.\n * If the promise is already settled it does nothing.\n *\n * @param {anything} reason: The reason for the rejection of the Promise.\n * Generally its an Error object. If however a Promise is passed, then the Promise\n * itself will be the reason for rejection no matter the state of the Promise.\n */\n this.reject = null\n\n /* A newly created Promise object.\n * Initially in pending state.\n */\n this.promise = new Promise(function (resolve, reject) {\n this.resolve = resolve\n this.reject = reject\n }.bind(this))\n Object.freeze(this)\n }\n}", "title": "" }, { "docid": "5a7d49140b52b85ecbd9c0b71d6dc561", "score": "0.49676555", "text": "function asAsync(options) {\n var Async = /** @class */ (function (_super) {\n tslib__WEBPACK_IMPORTED_MODULE_0__[\"__extends\"](Async, _super);\n function Async() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.state = {\n Component: _syncModuleCache ? _syncModuleCache.get(options.load) : undefined\n };\n return _this;\n }\n Async.prototype.render = function () {\n // Typescript issue: the rest can't be pulled without the any cast, as TypeScript fails with rest on generics.\n // tslint:disable-next-line:no-any\n var _a = this.props, forwardedRef = _a.forwardedRef, Placeholder = _a.asyncPlaceholder, rest = tslib__WEBPACK_IMPORTED_MODULE_0__[\"__rest\"](_a, [\"forwardedRef\", \"asyncPlaceholder\"]);\n var Component = this.state.Component;\n return Component ? react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](Component, tslib__WEBPACK_IMPORTED_MODULE_0__[\"__assign\"]({ ref: forwardedRef }, rest)) : Placeholder ? react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](Placeholder, null) : null;\n };\n Async.prototype.componentDidMount = function () {\n var _this = this;\n var Component = this.state.Component;\n if (!Component) {\n options\n .load()\n .then(function (LoadedComponent) {\n if (LoadedComponent) {\n // Cache component for future reference.\n _syncModuleCache && _syncModuleCache.set(options.load, LoadedComponent);\n // Set state.\n _this.setState({\n Component: LoadedComponent\n }, options.onLoad);\n }\n })\n .catch(options.onError);\n }\n };\n return Async;\n }(react__WEBPACK_IMPORTED_MODULE_1__[\"Component\"]));\n return react__WEBPACK_IMPORTED_MODULE_1__[\"forwardRef\"](function (props, ref) { return (react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](Async, tslib__WEBPACK_IMPORTED_MODULE_0__[\"__assign\"]({}, props, { forwardedRef: ref }))); });\n}", "title": "" }, { "docid": "5a7d49140b52b85ecbd9c0b71d6dc561", "score": "0.49676555", "text": "function asAsync(options) {\n var Async = /** @class */ (function (_super) {\n tslib__WEBPACK_IMPORTED_MODULE_0__[\"__extends\"](Async, _super);\n function Async() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.state = {\n Component: _syncModuleCache ? _syncModuleCache.get(options.load) : undefined\n };\n return _this;\n }\n Async.prototype.render = function () {\n // Typescript issue: the rest can't be pulled without the any cast, as TypeScript fails with rest on generics.\n // tslint:disable-next-line:no-any\n var _a = this.props, forwardedRef = _a.forwardedRef, Placeholder = _a.asyncPlaceholder, rest = tslib__WEBPACK_IMPORTED_MODULE_0__[\"__rest\"](_a, [\"forwardedRef\", \"asyncPlaceholder\"]);\n var Component = this.state.Component;\n return Component ? react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](Component, tslib__WEBPACK_IMPORTED_MODULE_0__[\"__assign\"]({ ref: forwardedRef }, rest)) : Placeholder ? react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](Placeholder, null) : null;\n };\n Async.prototype.componentDidMount = function () {\n var _this = this;\n var Component = this.state.Component;\n if (!Component) {\n options\n .load()\n .then(function (LoadedComponent) {\n if (LoadedComponent) {\n // Cache component for future reference.\n _syncModuleCache && _syncModuleCache.set(options.load, LoadedComponent);\n // Set state.\n _this.setState({\n Component: LoadedComponent\n }, options.onLoad);\n }\n })\n .catch(options.onError);\n }\n };\n return Async;\n }(react__WEBPACK_IMPORTED_MODULE_1__[\"Component\"]));\n return react__WEBPACK_IMPORTED_MODULE_1__[\"forwardRef\"](function (props, ref) { return (react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](Async, tslib__WEBPACK_IMPORTED_MODULE_0__[\"__assign\"]({}, props, { forwardedRef: ref }))); });\n}", "title": "" }, { "docid": "d464c5b82eaed3dbe660dce60d2fa89c", "score": "0.49607316", "text": "getComponent (nextState, cb) {\n /* Webpack - use 'require.ensure' to create a split point\n and embed an async module loader (jsonp) when bundling */\n require.ensure([], (require) => {\n /* Webpack - use require callback to define\n dependencies for bundling */\n const Registrar = require('./containers/RegistrarContainer').default\n\n const reducer = require('./modules/registrar').default\n\n const modalsReducer = require('modules/modals').default\n\n injectReducer(store, { key: 'modals', reducer: modalsReducer })\n\n // const modalreducer = require('./modules/modals').default\n\n // injectReducer(store, { key: 'modal', reducer: modalreducer })\n\n const windowReducer = require('modules/window').default\n\n injectReducer(store, { key: 'window', reducer: windowReducer })\n\n const paymentViewReducer = require('modules/paymentview').default\n\n injectReducer(store, { key: 'paymentview', reducer: paymentViewReducer })\n\n const uiReducer = require('modules/ui').default\n\n injectReducer(store, { key: 'ui', reducer: uiReducer })\n\n const chatBoxReducer = require('modules/chatbox').default\n\n const netWorkReducer = require('modules/network').default\n\n injectReducer(store, {key: 'network', reducer: netWorkReducer})\n\n const paymentReducer = require('components/Modals/PaymentModal/modules/payment').default\n\n injectReducer(store, {key: 'registrar_payment', reducer: paymentReducer})\n\n injectReducer(store, { key: 'chatbox', reducer: chatBoxReducer })\n\n const RegistrationPeriodReducer = require('modules/registration_period').default\n\n injectReducer(store, { key: 'registration_period', reducer: RegistrationPeriodReducer })\n\n const uploadProgressReducer = require('modules/upload').default\n\n injectReducer(store, { key: 'uploadProgress', reducer: uploadProgressReducer })\n\n /* Add the reducer to the store on key 'registrar' */\n injectReducer(store, { key: 'registrar', reducer })\n\n store.dispatch(getRegistrationPeriod())\n /* Return getComponent */\n cb(null, Registrar)\n\n /* Webpack named bundle */\n }, 'registrar')\n }", "title": "" }, { "docid": "1e0fbb4120086fe9e3b2d1132caba64d", "score": "0.49493024", "text": "function asyncStartLoadPartwayThrough(stepState) {\n return function(resolve, reject) {\n var loader = stepState.loader;\n var name = stepState.moduleName;\n var step = stepState.step;\n\n if (loader.modules[name])\n throw new TypeError('\"' + name + '\" already exists in the module table');\n\n // adjusted to pick up existing loads\n var existingLoad;\n for (var i = 0, l = loader.loads.length; i < l; i++) {\n if (loader.loads[i].name == name) {\n existingLoad = loader.loads[i];\n\n if(step == 'translate' && !existingLoad.source) {\n existingLoad.address = stepState.moduleAddress;\n proceedToTranslate(loader, existingLoad, Promise.resolve(stepState.moduleSource));\n }\n\n // a primary load -> use that existing linkset\n if (existingLoad.linkSets.length)\n return existingLoad.linkSets[0].done.then(function() {\n resolve(existingLoad);\n });\n }\n }\n\n var load = existingLoad || createLoad(name);\n\n load.metadata = stepState.moduleMetadata;\n\n var linkSet = createLinkSet(loader, load);\n\n loader.loads.push(load);\n\n resolve(linkSet.done);\n\n if (step == 'locate')\n proceedToLocate(loader, load);\n\n else if (step == 'fetch')\n proceedToFetch(loader, load, Promise.resolve(stepState.moduleAddress));\n\n else {\n console.assert(step == 'translate', 'translate step');\n load.address = stepState.moduleAddress;\n proceedToTranslate(loader, load, Promise.resolve(stepState.moduleSource));\n }\n }\n }", "title": "" }, { "docid": "1e0fbb4120086fe9e3b2d1132caba64d", "score": "0.49493024", "text": "function asyncStartLoadPartwayThrough(stepState) {\n return function(resolve, reject) {\n var loader = stepState.loader;\n var name = stepState.moduleName;\n var step = stepState.step;\n\n if (loader.modules[name])\n throw new TypeError('\"' + name + '\" already exists in the module table');\n\n // adjusted to pick up existing loads\n var existingLoad;\n for (var i = 0, l = loader.loads.length; i < l; i++) {\n if (loader.loads[i].name == name) {\n existingLoad = loader.loads[i];\n\n if(step == 'translate' && !existingLoad.source) {\n existingLoad.address = stepState.moduleAddress;\n proceedToTranslate(loader, existingLoad, Promise.resolve(stepState.moduleSource));\n }\n\n // a primary load -> use that existing linkset\n if (existingLoad.linkSets.length)\n return existingLoad.linkSets[0].done.then(function() {\n resolve(existingLoad);\n });\n }\n }\n\n var load = existingLoad || createLoad(name);\n\n load.metadata = stepState.moduleMetadata;\n\n var linkSet = createLinkSet(loader, load);\n\n loader.loads.push(load);\n\n resolve(linkSet.done);\n\n if (step == 'locate')\n proceedToLocate(loader, load);\n\n else if (step == 'fetch')\n proceedToFetch(loader, load, Promise.resolve(stepState.moduleAddress));\n\n else {\n console.assert(step == 'translate', 'translate step');\n load.address = stepState.moduleAddress;\n proceedToTranslate(loader, load, Promise.resolve(stepState.moduleSource));\n }\n }\n }", "title": "" }, { "docid": "d7ad70ceacf5cf9056e0508f02bc4af9", "score": "0.49457267", "text": "function createDeferred () {\n let resolver\n let rejecter\n\n function resolve (...args) {\n resolver(...args)\n }\n\n function reject (...args) {\n rejecter(...args)\n }\n\n const promise = new Promise((resolve, reject) => {\n resolver = resolve\n rejecter = reject\n })\n\n return { promise, resolve, reject }\n}", "title": "" }, { "docid": "fd719f0b56ba224093f4066573b330e0", "score": "0.492371", "text": "function createLoader({ load }) {\n const cache = new Map();\n const graph = new Map();\n async function getModule(importer, imported, urlStack) {\n if (imported[0] === '/' || imported[0] === '.') {\n const pathname = url_1.resolve(importer, imported);\n if (!graph.has(pathname))\n graph.set(pathname, new Set());\n graph.get(pathname).add(importer);\n return _load(pathname, urlStack);\n }\n const mod = await util_1.REQUIRE_OR_IMPORT(imported);\n return {\n exports: mod,\n css: [],\n };\n }\n function invalidateModule(path) {\n cache.delete(path);\n const dependents = graph.get(path);\n graph.delete(path);\n if (dependents)\n dependents.forEach(invalidateModule);\n }\n async function _load(url, urlStack) {\n if (urlStack.includes(url)) {\n console.warn(`Circular dependency: ${urlStack.join(' -> ')} -> ${url}`);\n return {};\n }\n if (cache.has(url)) {\n return cache.get(url);\n }\n const promise = load(url)\n .then((loaded) => initializeModule(url, loaded, urlStack.concat(url)))\n .catch((e) => {\n cache.delete(url);\n throw e;\n });\n cache.set(url, promise);\n return promise;\n }\n async function initializeModule(url, loaded, urlStack) {\n const { code, deps, css, names } = transform_1.transform(loaded.contents);\n const exports = {};\n const allCss = new Set(css.map((relative) => url_1.resolve(url, relative)));\n const args = [\n {\n name: 'global',\n value: global,\n },\n {\n name: 'require',\n value: (id) => {\n // TODO can/should this restriction be relaxed?\n throw new Error(`Use import instead of require (attempted to load '${id}' from '${url}')`);\n },\n },\n {\n name: names.exports,\n value: exports,\n },\n {\n name: names.__export,\n value: (name, get) => {\n Object.defineProperty(exports, name, { get });\n },\n },\n {\n name: names.__export_all,\n value: (mod) => {\n // Copy over all of the descriptors.\n const descriptors = Object.getOwnPropertyDescriptors(mod);\n Object.defineProperties(exports, descriptors);\n },\n },\n {\n name: names.__import,\n value: (source) => getModule(url, source, urlStack).then((mod) => mod.exports),\n },\n {\n name: names.__import_meta,\n value: { url },\n },\n ...(await Promise.all(deps.map(async (dep) => {\n const module = await getModule(url, dep.source, urlStack);\n module.css.forEach((dep) => allCss.add(dep));\n return {\n name: dep.name,\n value: module.exports,\n };\n }))),\n ];\n const fn = new Function(...args.map((d) => d.name), `${code}\\n//# sourceURL=${url}`);\n try {\n fn(...args.map((d) => d.value));\n }\n catch (e) {\n e.stack = await sourcemaps_1.sourcemap_stacktrace(e.stack, async (address) => {\n if (fs_1.existsSync(address)) {\n // it's a filepath\n return fs_1.readFileSync(address, 'utf-8');\n }\n try {\n const { contents } = await load(address);\n return contents;\n }\n catch (_a) {\n // fail gracefully\n }\n });\n throw e;\n }\n return {\n exports,\n css: Array.from(allCss),\n };\n }\n return {\n importModule: async (url) => {\n return _load(url, []);\n },\n invalidateModule: (url) => {\n invalidateModule(url);\n },\n };\n}", "title": "" } ]
5868170224290226c06131bed1e6aae3
Could use `inherits` module, but don't want to move from single file architecture yet.
[ { "docid": "51efbceff58743480cfab8501e4088c9", "score": "0.0", "text": "function inherits (ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }", "title": "" } ]
[ { "docid": "cf62f45df6557a48b5658524bd55a60f", "score": "0.73977566", "text": "function inherit(){}", "title": "" }, { "docid": "7819f50830d8d479119065334d775c1f", "score": "0.7323217", "text": "function inherit() {}", "title": "" }, { "docid": "2f83124dd1e6ffd476e099b77d8f2081", "score": "0.72600657", "text": "function SuperclassBare() {}", "title": "" }, { "docid": "ce4fa4c2599c534c98c763eb94cf1969", "score": "0.643152", "text": "constructor() {\n //super takes the place of util.inherit(1,2);\n super();\n this.greeting = 'This is an inheritance event emit greeteriwth ES6!';\n }", "title": "" }, { "docid": "fecd42c82909bb0f35235c7d8423faea", "score": "0.6343339", "text": "function Super () {}", "title": "" }, { "docid": "fecd42c82909bb0f35235c7d8423faea", "score": "0.6343339", "text": "function Super () {}", "title": "" }, { "docid": "a00ffa5ae9856e7bcb40eb237d902b62", "score": "0.6200214", "text": "function BaseClass(){}", "title": "" }, { "docid": "a00ffa5ae9856e7bcb40eb237d902b62", "score": "0.6200214", "text": "function BaseClass(){}", "title": "" }, { "docid": "5408e4a4de4e5f4b5bfa97220cfdbe11", "score": "0.6098216", "text": "function Parent() {}", "title": "" }, { "docid": "23e21ac21382fb3dd442b224e8764c9b", "score": "0.60909283", "text": "function inheritsFrom(child, parent) {\n\tchild.prototype = Object.create(parent.prototype);\n\tchild.prototype.constructor = child;\n}", "title": "" }, { "docid": "ec8a802766604cff9cbc1bee8dfe37b7", "score": "0.6073483", "text": "function inherits (A, B) {\n var f = function () { };\n f.prototype = B.prototype;\n A.prototype = new f();\n A.super_ = B;\n}", "title": "" }, { "docid": "e255bda7fc83c17721eb5cf27f929e04", "score": "0.6067113", "text": "function inherit(o1, o2){\n\to1.prototype = Object.create(o2.prototype);\n\to1.prototype.consctructor = o1;\n}", "title": "" }, { "docid": "e255bda7fc83c17721eb5cf27f929e04", "score": "0.6067113", "text": "function inherit(o1, o2){\n\to1.prototype = Object.create(o2.prototype);\n\to1.prototype.consctructor = o1;\n}", "title": "" }, { "docid": "18dbdbf119b141aac4498d22346d765c", "score": "0.6066017", "text": "function Base() {\n}", "title": "" }, { "docid": "95ab61947179929379e6ba1529a94a6e", "score": "0.6063663", "text": "function Child() {}", "title": "" }, { "docid": "f9b379cd7cbe2becb184594dbbe3e9c9", "score": "0.6057688", "text": "function peg$subclass(child, parent) {\n // Commented out so file loads if customer enables \"Freeze JavaScript Prototypes\" setting.\n // function ctor() { this.constructor = child; }\n // ctor.prototype = parent.prototype;\n // child.prototype = new ctor();\n}", "title": "" }, { "docid": "dfe83a5ab589a3f26ac4f3c853bdccf1", "score": "0.6007882", "text": "function inherit(C, P) {\n C.prototype = new P();\n}", "title": "" }, { "docid": "5d47a7c6ecb4ac32885c4359ca9a4f7b", "score": "0.5977695", "text": "function inherit(C, P) {\n C.prototype = P.prototype;\n}", "title": "" }, { "docid": "e6ca496bbe94710527d72b59b1a54021", "score": "0.59624565", "text": "function inheritsFrom(child, parent) {\n\tchild.prototype = Object.create(parent.prototype);\n}", "title": "" }, { "docid": "d2ceea55062e3f31d36f9e6c5b45e9b2", "score": "0.5924158", "text": "function BaseElement() {\n}", "title": "" }, { "docid": "d2ceea55062e3f31d36f9e6c5b45e9b2", "score": "0.5924158", "text": "function BaseElement() {\n}", "title": "" }, { "docid": "6933953c4860537f6d054d146dc8efee", "score": "0.5912426", "text": "function i(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Class extends value \"+String(t)+\" is not a constructor or null\");function r(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}", "title": "" }, { "docid": "02becb8dc9b3b9f907e50090013d51cb", "score": "0.5910223", "text": "function inheritsFrom(child, parent) {\n child.prototype = Object.create(parent.prototype);\n}", "title": "" }, { "docid": "5bf5d8344452928d8fcf2ee49485ecd9", "score": "0.5907915", "text": "static included (func) {\n func.call(this, this.prototype)\n }", "title": "" }, { "docid": "8a5a7c30c305f169b24d7964f55b5079", "score": "0.58699465", "text": "constructor() {\n super(); // Error number one - not calling super()\n }", "title": "" }, { "docid": "b4a32bb87357a8a5fb15d80f770e6ada", "score": "0.58627295", "text": "function inherit(C, P) {\n\tvar F = function () {};\n\tF.prototype = P.prototype;\n\tC.prototype = new F();\n\tC.uber = P.prototype;\n\tC.prototype.constructor = C;\n}", "title": "" }, { "docid": "13ae054d44c14279218f0e2cddd11ba9", "score": "0.58605105", "text": "function BaseElement(){}", "title": "" }, { "docid": "a52f7ca7ce3c5730443bcdbf46e89200", "score": "0.5860002", "text": "function inherits(childCtor, parentCtor) {\n /** @constructor */\n function tempCtor() {}\n tempCtor.prototype = parentCtor.prototype;\n childCtor.prototype = new tempCtor();\n childCtor.prototype.constructor = childCtor;\n}", "title": "" }, { "docid": "7e5387e97c0d5c13fda5916f60513453", "score": "0.5856073", "text": "function peg$subclass(child,parent){function ctor(){this.constructor=child}ctor.prototype=parent.prototype;child.prototype=new ctor}", "title": "" }, { "docid": "0f098c4c719f3cea8c462c7825a7bf6c", "score": "0.5855783", "text": "function ParentClass() {\n\t// code goes here\n}", "title": "" }, { "docid": "eb90ef4ac552cb0bd74dd18ffb79f5d8", "score": "0.58400625", "text": "render() {\n console.warn('should be overwrite by sub-class');\n }", "title": "" }, { "docid": "e21e2e73ba55553744d830d16ff72626", "score": "0.58365643", "text": "function inherit () {\n\n if( arguments.length < 2 ) return;\n\n var target = arguments[ 0 ];\n\n var i, name, parent;\n\n for ( i = 1; i < arguments.length; i++ ) {\n\n parent = arguments[ i ];\n\n // If parent is a function, copy\n // from parent.prototype into the target.prototype:\n if( typeof parent === 'function' ) {\n\n for ( name in parent.prototype ) {\n\n if (!parent.prototype.hasOwnProperty(name)) continue;\n\n var property = parent.prototype[ name ];\n\n if ( property !== null && typeof property === 'object' ) {\n\n target.prototype[ name ] = util.copyProperties( property, {}, true );\n }\n else {\n target.prototype[ name ] = property;\n }\n\n }\n\n // copy props from parent into the target\n // ( ie static vars and methods )\n for ( name in parent ) {\n\n if (!parent.hasOwnProperty(name)) continue;\n\n target[ name ] = parent[ name ];\n }\n\n }\n //if it is an object, apply to the prototype\n else if( typeof parent === 'object' ) {\n for ( name in parent ) {\n\n if (!parent.hasOwnProperty(name)) continue;\n\n target.prototype[ name ] = parent[ name ];\n }\n }\n\n }\n\n}", "title": "" }, { "docid": "b7a0a1ecfa7fa436326bb168bd906f4a", "score": "0.58323795", "text": "function ViewBaseClass() {}", "title": "" }, { "docid": "cd31074c525f44f3eacac6e32613f569", "score": "0.5830497", "text": "function peg$subclass(child,parent){function ctor(){this.constructor=child;}ctor.prototype=parent.prototype;child.prototype=new ctor();}", "title": "" }, { "docid": "441b8e35acba12d90d4d6df51c665f13", "score": "0.58283937", "text": "function n(e,t){function n(){}n.prototype=t.prototype,e.superClass_=t.prototype,e.prototype=new n,e.prototype.constructor=e}", "title": "" }, { "docid": "0cfe2d50883b226f985af500c0b3c4f8", "score": "0.5823491", "text": "constructor() { super() }", "title": "" }, { "docid": "d46be2055de672d15f60d5feeff44735", "score": "0.580168", "text": "function ParentEmptyCtor() { }", "title": "" }, { "docid": "f4361fdf94251352b4d7efaadc6cabf2", "score": "0.5782034", "text": "function __os_inheritParent()\n{\n\t__os_call_if_exists(__os__meta_inheritParent, parent);\n\t__os_call_if_exists(__os__process_inheritParent, parent);\n\t__os_call_if_exists(__os__filesystem_inheritParent, parent);\n}", "title": "" }, { "docid": "d9da127357d0c69d0e746e5abac1a620", "score": "0.5766147", "text": "static Super(obj, reader) {\r\n if (warninglvl$1 > 0)\r\n console.warn(\"deprecated\");\r\n\r\n reader(obj);\r\n\r\n function reader2(obj) {\r\n }\r\n\r\n let cls = obj.constructor;\r\n let bad = cls === undefined || cls.prototype === undefined || cls.prototype.__proto__ === undefined;\r\n\r\n if (bad) {\r\n return;\r\n }\r\n\r\n let parent = cls.prototype.__proto__.constructor;\r\n bad = bad || parent === undefined;\r\n\r\n if (!bad && parent.prototype.loadSTRUCT && parent.prototype.loadSTRUCT !== obj.loadSTRUCT) { //parent.prototype.hasOwnProperty(\"loadSTRUCT\")) {\r\n parent.prototype.loadSTRUCT.call(obj, reader2);\r\n }\r\n }", "title": "" }, { "docid": "3fb55c66251bb2823be2ac8a86954f8c", "score": "0.57341826", "text": "constructor() { super(); }", "title": "" }, { "docid": "b81a7f14a23ecf67907147f0984591c4", "score": "0.5722366", "text": "function SuperObject(obj){\n\n}", "title": "" }, { "docid": "9bcad5fa0a98b39e8ab0745b84d3a5a7", "score": "0.570615", "text": "function inherits(subClass, superClass) {\n // if (typeof superClass !== \"function\" && superClass !== null) {\n // throw new TypeError(\n // \"Super expression must either be null or a function, not \" +\n // typeof superClass\n // );\n // }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true,\n },\n });\n // if (superClass)\n // Object.setPrototypeOf\n // ? Object.setPrototypeOf(subClass, superClass)\n // : (subClass.__proto__ = superClass);\n}", "title": "" }, { "docid": "a820a271f78c8eef3ef7c4d55223b637", "score": "0.5701218", "text": "function _extends$1(){return _extends$1=Object.assign||function(C){for(var $=1;$<arguments.length;$++){var T=arguments[$];for(var N in T)Object.prototype.hasOwnProperty.call(T,N)&&(C[N]=T[N])}return C},_extends$1.apply(this,arguments)}", "title": "" }, { "docid": "e5fe06a17b62b8da34815771a7418343", "score": "0.56972945", "text": "constructor () {\n // Run super\n super(...arguments);\n }", "title": "" }, { "docid": "1a3034b5ee67c949bee9c676b9f9f0d5", "score": "0.5678832", "text": "function baseinheritObject(intype) {\n // set up a array of methods that will belong to a base class\n\tvar meth1 = [];\n\n\t// string gets object and string\n if (intype == \"String\") {\n meth1.push(methabort);\n meth1.push(copy);\n meth1.push(type_name);\n\n meth1.push(meconcat);\n meth1.push(melen);\n meth1.push(mesubs);\n\t}\n\t// IO gets Object and IO\n\telse if (intype == \"IO\") {\n meth1.push(methabort);\n meth1.push(copy);\n meth1.push(type_name);\n meth1.push(in_int);\n meth1.push(in_string);\n meth1.push(out_int);\n meth1.push(out_string);\n\n }\n\t// Int, Bool, Object just get object\n\telse {\n meth1.push(methabort);\n meth1.push(copy);\n meth1.push(type_name);\n }\n\n\t// print the length of the method array\n write(meth1.length + \"\\n\");\n for (var i = 0; i < meth1.length; i++) {\n\n\t\t// for sanity, create a vatiable to store the current method\n var internalmeth = meth1[i];\n write(internalmeth.mname.name + \"\\n\");\n write(internalmeth.formals.length + \"\\n\");\n // write formal names, and the length of the formals\n for (var q = 0; q < internalmeth.formals.length; q++) {\n write(internalmeth.formals[q].fname.name + \"\\n\");\n }\n\n\t\t// write where the class was defined, where the body starts, the method name\n\t\t// and internal since these are all base classes\n write(internalmeth.definition + \"\\n\");\n write(internalmeth.mbody.eloc + \"\\n\");\n write(internalmeth.mtype.name + \"\\n\");\n write(\"internal\\n\");\n write(internalmeth.definition + \".\" + internalmeth.mname.name + \"\\n\");\n\n }\n}", "title": "" }, { "docid": "6ca5d2fd9e384afec1bb9a566fd66c81", "score": "0.5677803", "text": "function nope() {\n class Foo extends \"Bar\" {\n constructor() { }\n }\n}", "title": "" }, { "docid": "9093e4865a6b42ee8aef6bb1728b94a3", "score": "0.567471", "text": "function ue(t,e){function i(){this.constructor=t}he(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}", "title": "" }, { "docid": "79c88aea0d2722b625805ef657993224", "score": "0.56662524", "text": "baseMethod() {\n }", "title": "" }, { "docid": "77b7a5844b369f52caa4547883674f7d", "score": "0.5656414", "text": "function c(e,t){if(\"function\"!==typeof t&&null!==t)throw new TypeError(\"Class extends value \"+String(t)+\" is not a constructor or null\");function n(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}", "title": "" }, { "docid": "a3a402686d052e4e4fd75dd99bae5381", "score": "0.5647858", "text": "function _extends$1(){return _extends$1=Object.assign||function(a){for(var o=1;o<arguments.length;o++){var _=arguments[o];for(var _e in _)Object.prototype.hasOwnProperty.call(_,_e)&&(a[_e]=_[_e])}return a},_extends$1.apply(this,arguments)}", "title": "" }, { "docid": "43c982f32446aa0ff2f2ec4a5ca38af2", "score": "0.5643922", "text": "function inherit(p) {\n\tif (p == null) throw TypeError(); // p must be a non-null object\n\tif (Object.create) // If Object.create() is defined...\n\t\treturn Object.create(p); // then just use it.\n\tvar t = typeof p; // Otherwise do some more type checking\n\tif (t !== \"object\" && t !== \"function\") throw TypeError();\n\tfunction f() {}; // Define a dummy constructor function.\n\tf.prototype = p; // Set its prototype property to p.\n\treturn new f(); // Use f() to create an \"heir\" of p.\n}", "title": "" }, { "docid": "c8fdc853a39cd8a99afbc5dca3bdfd2f", "score": "0.5640622", "text": "function nf(e,t){if(\"function\"!==typeof t&&null!==t)throw new TypeError(\"Class extends value \"+String(t)+\" is not a constructor or null\");function n(){this.constructor=e}tf(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}", "title": "" }, { "docid": "f2d8fd01b44a7e35477ab7ef5c6d0ebd", "score": "0.56211716", "text": "function bp(s,e){function t(){this.constructor=s}ig(s,e),s.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}", "title": "" }, { "docid": "32edcb71bd9cfe2c167367506976158f", "score": "0.5616532", "text": "function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}", "title": "" }, { "docid": "32edcb71bd9cfe2c167367506976158f", "score": "0.5616532", "text": "function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}", "title": "" }, { "docid": "a000eebdc182c00c6ff1619354d4ea0a", "score": "0.55972844", "text": "function rA(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Class extends value \"+String(e)+\" is not a constructor or null\");function n(){this.constructor=t}nA(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}", "title": "" }, { "docid": "abdc952d4d25b1aaf30b6fb428ec2485", "score": "0.5591732", "text": "constructor(){super();}", "title": "" }, { "docid": "2bf005280ff6e8e0e19cc3826984864e", "score": "0.55845845", "text": "function o(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Class extends value \"+String(t)+\" is not a constructor or null\");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}", "title": "" }, { "docid": "77676f349dc490da796ee669b7d9a7ac", "score": "0.5581123", "text": "function _inherit(Child, Parent){\n var Ctor, prop\n\n // Copy class properties and methods\n for (prop in Parent)\n oj.copyProperty(Child, Parent, prop)\n\n Ctor = function(){}\n Ctor.prototype = Parent.prototype\n Child.prototype = new Ctor()\n\n // Provide easy access for base class methods\n // Example: Parent.base.methodName(arguments...)\n Child.base = Child.__super__ = Parent.prototype\n }", "title": "" }, { "docid": "23d1d8745ea19be2a496d70caadfc5ce", "score": "0.5578545", "text": "function inherit(Parent, Child) {\n var F = function(){};\n F.prototype = Parent.prototype;\n Child.prototype = new F();\n Child.prototype.constructor = Child;\n Child.prototype.super_ = Parent;\n }", "title": "" }, { "docid": "8c91f55d00abe3ab38db5025ec88b9b1", "score": "0.5575981", "text": "function inherited(args){\n var name,caller, inheritedFrom;\n caller = inherited.caller || arguments.callee.caller\n if(typeof(args) === 'string'){\n name = args;\n args = arguments[1];\n } else {\n name = caller.__name__;\n }\n inheritedFrom = caller.__inherited__;\n if(name && inheritedFrom){// maybe we need return statement here?\n inheritedFrom.prototype[name].apply(this, args);\n }\n }", "title": "" }, { "docid": "ef2cb30d5d9792e29c8831bf38c851eb", "score": "0.5574531", "text": "function gn(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Class extends value \"+String(t)+\" is not a constructor or null\");function n(){this.constructor=e}mn(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}", "title": "" }, { "docid": "ba3fc62260e488398fa016111cb86f59", "score": "0.5573262", "text": "function _inherit(Child, Parent){\n var Ctor, prop\n\n // Copy class properties and methods\n for (prop in Parent)\n oj.copyProperty(Child, Parent, prop)\n\n Ctor = function(){};\n Ctor.prototype = Parent.prototype;\n Child.prototype = new Ctor()\n\n // Provide easy access for base class methods\n // Example: Parent.base.methodName(arguments...)\n Child.base = Child.__super__ = Parent.prototype\n }", "title": "" }, { "docid": "cfd32ac6e751ee0594694d45af3208f7", "score": "0.55653673", "text": "function extend2(subClass, superClass)\n{\n\tsubClass.prototype = new superClass();\n\tsubClass.superClass = superClass;\n}", "title": "" }, { "docid": "44cf4a6be6b7fdf8b6589d0868ad7915", "score": "0.5556545", "text": "function u(t,e){function n(){this.constructor=t}s(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}", "title": "" }, { "docid": "6ac72dea88a21c529eb89743b8620736", "score": "0.5538587", "text": "function makeClassInheritence( n, i, a ){\n var o =\"function \"+n+\"(\";\n \n if(a){\n //insere paramentros na funcao\n if( a.length > 1 )\n for( var q=0;q<a.length;q++)\n o+=String.fromCharCode(q); \n else \n o+=String.fromCharCode(65);\n } \n \n o+=\"){\";\n \n if(i){\n if( i.length > 1 )\n for( q=0;q<i.length;q++)\n o+=i[q].name + \".apply(this,arguments);\"; \n\n else \n o+=i.name + \".apply(this,arguments);\";\n }\n\n o+=\"};\";\n window.eval(o);\n}", "title": "" }, { "docid": "04c48b63fd3006ea7e760d4de8f87044", "score": "0.55321234", "text": "function inherit(sub, sup) {\n function F() {}\n // Calling clone on the prototype guarantees that changing properties\n // of instances will not change those properties on the prototype.\n // Clone *will* call the parent constructor, which is undesirable since\n // we don't any initializing logic to take place, we're just interested\n // in having the right prototype class and properties on our subclass.\n // So we hack a bit and set noinit on the constructor, which is tested\n // in the surrogate constructor as defined in Class.extend.\n sup.prototype.constructor.__inherit_noinit = true;\n F.prototype = clone(sup.prototype);\n delete sup.prototype.constructor.__inherit_noinit;\n\n var proto = new F();\n proto.constructor = sub;\n sub.prototype = proto;\n\n // we want to be able to call the constructor via uber, so we create\n // a proxy function\n // So if var B = A.extend(), then A.uber.call(this) calls the constructor.\n sub.uber = function () {\n sup.apply(this, arguments);\n };\n // and we copy over all methods on the super prototype to uber, so\n // A.uber.foo.call(this, ...)\n // We MUST NOT check that sup.prototype.hasOwnProperty(k), otherwise\n // if var B = A.extend(), C = B.extend(), then C.uber will not carry\n // methods from A's prototype.\n for (var k in sup.prototype) {\n if (sup.prototype[k] instanceof Function\n && k !== \"constructor\") {\n sub.uber[k] = sup.prototype[k];\n }\n }\n}", "title": "" }, { "docid": "ce5f1b0aa3d086e432c2dc6959ec8394", "score": "0.5531083", "text": "function inherit(subclass,base){\n\t// If the browser or ECMAScript supports Object.create, use it\n\t// (but don't remember to redirect constructor pointer to subclass)\n\tif(Object.create){\n\t\tsubclass.prototype = Object.create(base.prototype);\n\t}\n\telse{\n\t\tvar sub = function(){};\n\t\tsub.prototype = base.prototype;\n\t\tsubclass.prototype = new sub;\n\t}\n\tsubclass.prototype.constructor = subclass;\n}", "title": "" }, { "docid": "5e4a33ca2ef7ea14124428372f670783", "score": "0.5509288", "text": "function u(t,e){function n(){this.constructor=t}a(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}", "title": "" }, { "docid": "e3e2bb4d0241a12cbb016aa67b1e7dca", "score": "0.5504206", "text": "function Composition() {}", "title": "" }, { "docid": "e3e2bb4d0241a12cbb016aa67b1e7dca", "score": "0.5504206", "text": "function Composition() {}", "title": "" }, { "docid": "e3e2bb4d0241a12cbb016aa67b1e7dca", "score": "0.5504206", "text": "function Composition() {}", "title": "" }, { "docid": "e3e2bb4d0241a12cbb016aa67b1e7dca", "score": "0.5504206", "text": "function Composition() {}", "title": "" }, { "docid": "23c456980a5333ec250339bb791b0946", "score": "0.5503575", "text": "static from() { return undefined; }", "title": "" }, { "docid": "b076a8ead736d9f9291653b756b58b50", "score": "0.55031806", "text": "function u(t,n){function e(){this.constructor=t}i(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}", "title": "" }, { "docid": "229383ed7d1e2e3cb304fd5ec7bb8861", "score": "0.5502402", "text": "function ClassHandle() {\n}", "title": "" }, { "docid": "29c90e3fa5d50757f8ccb257ab1144c3", "score": "0.55017656", "text": "function h(t,e){function r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}", "title": "" }, { "docid": "a09bb1e162d09081f6eab52bd0418825", "score": "0.5501716", "text": "init() {\n // should be overridden\n }", "title": "" }, { "docid": "36f46d46756823d6a858d97595541a34", "score": "0.5497868", "text": "function read_cool_class() {\n var cname = read_id();\n var inherit = \"\";\n var citem = read();\n if (citem == \"inherits\") {\n inherit = read_id();\n }\n //don't read exp of no inherit\n // else if(citem == \"no_inherits\"){\n // }\n // else{\n // \tconsole.log(\"nope!\", citem);\n // }\n\n\n //read methods and attributes for the inherited class\n var features = read_list(read_features, cname.name);\n\n //add class to the possible user classes\n userClasses.push(new CoolClass(cname, inherit, features));\n\n //return the current class\n return new CoolClass(cname, inherit, features);\n}", "title": "" }, { "docid": "355307853fea98c1282b340f5e78a234", "score": "0.54943085", "text": "function SmallDog() {\n Dog.call(this);\n}", "title": "" }, { "docid": "351cca712c73952a91dc846dfe1c40f1", "score": "0.5493241", "text": "function i(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}", "title": "" }, { "docid": "98e6e7d879e12cfc8d369c64e06bfe89", "score": "0.5487604", "text": "function Of(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Class extends value \"+String(t)+\" is not a constructor or null\");function n(){this.constructor=e}kf(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}", "title": "" }, { "docid": "fcafdc8d8a039fef0e09c3753e3c4eca", "score": "0.5487285", "text": "function r(t,e){function r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}", "title": "" }, { "docid": "38f033691aac317c0c391ef9cf13f443", "score": "0.5486981", "text": "function r(e,t){function o(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}", "title": "" }, { "docid": "b287dcdc5f3a53c1dbd8a84336cc2c48", "score": "0.54867667", "text": "constructor(theName) {\n super(theName); // call the constructor of a parent class\n }", "title": "" }, { "docid": "fc50119ff654dc96923a7081fc59a5d7", "score": "0.548567", "text": "function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}", "title": "" }, { "docid": "92b969b703608b6ef9d81ddf6b411e75", "score": "0.5480038", "text": "function legacySuper(destinationSet, sourceSet){\n\n //define the parent method\n if( typeof destinationSet[\"__parent_methods\"] === \"undefined\" ) { \n //create the set of method\n destinationSet[\"__parent_methods\"] = {};\n } \n\n //define the super mechanism\n if( typeof destinationSet[\"_super\"] === \"undefined\" ) { \n //the super\n destinationSet[\"_super\"] = function() { \n //the method name\n var methodName = arguments[0]; \n //parameters\n var parameters = arguments[1]; \n \n //execute\n this[\"__parent_methods\"][methodName].apply(this, parameters); \n } \n }\n\n //copy the methods\n return legacy(destinationSet[\"__parent_methods\"], sourceSet, false);\n}", "title": "" }, { "docid": "5d1d00a95a70bdb88dbf82f17315ab5b", "score": "0.5478937", "text": "function i(t,e){c(t,e),Object.getOwnPropertyNames(e.prototype).forEach(function(n){c(t.prototype,e.prototype,n)}),Object.getOwnPropertyNames(e).forEach(function(n){c(t,e,n)})}", "title": "" }, { "docid": "abb8c7de9026d58bd7098cddce02c52d", "score": "0.5474468", "text": "function o(t,e){if(\"function\"!==typeof e&&null!==e)throw new TypeError(\"Class extends value \"+String(e)+\" is not a constructor or null\");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}", "title": "" }, { "docid": "4f205a21e479f4ac0bfb81773c1ed6d6", "score": "0.5473718", "text": "function n(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}", "title": "" }, { "docid": "9a936670caa7dba82ce4bd1ee5746444", "score": "0.5464059", "text": "function h(t,e){function r(){this.constructor=t}a(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}", "title": "" }, { "docid": "9a936670caa7dba82ce4bd1ee5746444", "score": "0.5464059", "text": "function h(t,e){function r(){this.constructor=t}a(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}", "title": "" }, { "docid": "9a936670caa7dba82ce4bd1ee5746444", "score": "0.5464059", "text": "function h(t,e){function r(){this.constructor=t}a(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}", "title": "" }, { "docid": "9a936670caa7dba82ce4bd1ee5746444", "score": "0.5464059", "text": "function h(t,e){function r(){this.constructor=t}a(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}", "title": "" }, { "docid": "901ba5d13ed35ff4352207e65bfd2a8c", "score": "0.546181", "text": "constructor() {\n\t\tsuper()\n\t}", "title": "" }, { "docid": "7d19ba0ac809680735060dd601ad0fe0", "score": "0.5459414", "text": "function everyone_extends() { everyone_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return everyone_extends.apply(this, arguments); }", "title": "" }, { "docid": "8156bfefd31f103b46e903ab4abb9b58", "score": "0.54547733", "text": "function c(t,n){i(t,n),Object.getOwnPropertyNames(n.prototype).forEach((function(e){i(t.prototype,n.prototype,e)})),Object.getOwnPropertyNames(n).forEach((function(e){i(t,n,e)}))}", "title": "" }, { "docid": "b86e4344e849a0888c35cb1c8fd02803", "score": "0.5450184", "text": "function pb(s,e){function t(){this.constructor=s}fv(s,e),s.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}", "title": "" }, { "docid": "fc212bb36127035ed2873add8760b8f7", "score": "0.54390514", "text": "function inherit(clazz, base, proto) {\n clazz.prototype = Object.create(base.prototype);\n clazz.prototype.constructor = clazz;\n if (proto)\n Object.keys(proto).forEach(\n function (key) {\n clazz.prototype[key] = proto[key];\n }\n );\n }", "title": "" }, { "docid": "433b16bbfa73047e6fa0ce3a245111da", "score": "0.5438743", "text": "function be(t,e){function r(){this.constructor=t}xe(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}", "title": "" }, { "docid": "72020427a54d852529f9a43ff2df9332", "score": "0.5437277", "text": "function BaseRenderer() {}", "title": "" } ]
ff5d00f9e13f21298c63b0ed3295c22c
show order details when 'Dettagli' is clicked
[ { "docid": "86d4c8e7f28a2cdc918eaa42e0e74b77", "score": "0.0", "text": "function showDettagli(id_comanda) {\r\n\r\n // read one record based on given ID\r\n $.getJSON(\"http://localhost/projects/programmazione_web/api/comanda/read_dettagli.php?id_comanda=\" + id_comanda, function (data) {\r\n\r\n // values will be used to fill out the form\r\n var id_tavolo = data.records[0].id_tavolo;\r\n\r\n var dettagli_comanda_html = `\r\n <!-- \"read comanda\" button to go back -->\r\n <div id=\"read-comanda\" class=\"btn btn-primary float-right read-comanda-button mb-2\">\r\n <i class=\"fas fa-arrow-left\"></i> Indietro\r\n </div>\r\n \r\n <!-- we used the 'required' html5 property to prevent empty fields -->\r\n <form id='dettagli-comanda-form' class='w-50' action='#' method='post' border='0'>\r\n <table class='table table-hover table-bordered'>\r\n\r\n <!-- Comanda -->\r\n <tr>\r\n <td>Comanda</td>\r\n <td><input class=\"form-control w-50\" type=\"number\" name=\"id_comanda\" value=\"` + id_comanda + `\" disabled></td>\r\n </tr>\r\n \r\n <!-- Tavolo -->\r\n <tr>\r\n <td>Tavolo</td>\r\n <td><input class=\"form-control w-50\" type=\"number\" name=\"id_tavolo\" value=\"` + id_tavolo + `\" disabled></td>\r\n </tr>\r\n </table>\r\n </form>\r\n `;\r\n\r\n dettagli_comanda_html += `\r\n <h3 class='float-left'>Riepilogo comanda</h3>\r\n <br/><br/>\r\n <table class='table table-hover table-bordered w-50 text-align-center'>\r\n <tr>\r\n <th>Nome</th>\r\n <th>Prezzo</th>\r\n <th>Stato</th>\r\n <th>Azione</th>\r\n </tr>`;\r\n\r\n // prints order content\r\n $.each(data.records, function (key, val) {\r\n\r\n if (val.stato == 0) {\r\n stato = \"In preparazione\";\r\n } else {\r\n stato = \"Pronto\";\r\n }\r\n\r\n dettagli_comanda_html += `\r\n <tr>\r\n <td class=\"d-none\">` + val.id_menu + `</td>\r\n <td>` + val.nome + `</td>\r\n <td>€ ` + val.prezzo + `</td>\r\n <td>` + stato + `</td>\r\n <td>\r\n <a class=\"btn btn-success drop-menuItem-button\"\r\n data-id_dettagli=` + val.id_det_comanda + `\"\r\n data-id_comanda=\"` + id_comanda + `\"\r\n data-id_menu=\"` + val.id_menu + `\">\r\n <i class=\"fas fa-minus\"></i>\r\n </a>\r\n </td>\r\n `;\r\n });\r\n\r\n dettagli_comanda_html += `\r\n </tr>\r\n </table >\r\n `;\r\n\r\n // inject to 'page-content' of our app\r\n $(\"#page-content\").html(dettagli_comanda_html);\r\n\r\n // change page title\r\n changePageTitle(\"Dettagli comanda: \" + id_comanda);\r\n });\r\n\r\n}", "title": "" } ]
[ { "docid": "a15ff861396bef015f8b9f64689252eb", "score": "0.78346694", "text": "function showDetails(e) {\n var singleOrderInfo = e.currentTarget,\n singleId = singleOrderInfo.getAttribute(\"data-id\"),\n orderInfo = orderUtils.getItem(singleId, \"\"),\n orderHolder = document.querySelector(\".js-infoOrder\");\n // clear order list \n orderHolder.innerHTML = \"\";\n document.querySelector(\".js-stepHolder\").style.marginLeft = \"-200%\";\n // add new data to the order list\n [].forEach.call(orderInfo, function(item) {\n if (orderUtils.checkHTML(item)) {\n orderHolder.innerHTML += item;\n }\n });\n }", "title": "" }, { "docid": "afb814d68c63eace0d4331b9de2f59c0", "score": "0.6837223", "text": "function seeOrders() {\n $(\"#orders\").show();\n $(\"#presentacion\").show();\n $(\"#pedidos\").hide();\n\n $(\"#info\").hide();\n $(\"#end\").hide();\n $(\"#btn-float\").hide();\n}", "title": "" }, { "docid": "f133c792625dc6cad4deeb5b403a0306", "score": "0.67234325", "text": "function showDetails(product) {\n // TODO: manipulate the \n}", "title": "" }, { "docid": "b98c12238534bacb19cc368841c5ee1a", "score": "0.6716497", "text": "function gotoOrderDetails(selectedOrder) {\n if (selectedOrder && selectedOrder.orderID()) {\n var url = '#/Supplier_Order_Details/' + selectedOrder.orderID();\n router.navigateTo(url);\n }\n }", "title": "" }, { "docid": "16e2b6d7f772590992b3f5be792c38e7", "score": "0.6598223", "text": "function showDetailView(clickedShoppingList)\n{\n $(clickedShoppingList).parents(\".listEntry\").next(\".detailView\").fadeToggle(250);\n let label = $(clickedShoppingList);\n if (label.text() === \"Details ansehen\")\n {\n label.text(\"Details ausblenden\");\n }\n else\n {\n label.text(\"Details ansehen\");\n }\n}", "title": "" }, { "docid": "0b2f429d1c37ad13c50b425986255d46", "score": "0.65657365", "text": "function showDetails(e) {\n var i = e.target.metadata.id;\n showDescription(i);\n\n }", "title": "" }, { "docid": "94bb4263f65aeca645043b150e19ca21", "score": "0.63523006", "text": "function orderViewFullDetails(orderid){\n\t\n\t$('#cus_myorder').hide();\n $('#order_filter').hide();\n\t$('#cus_fullorder').show();\n\t$('#cus_fullorder').html('<div class=\"addtocartloading\"><span class=\"image\"><img src=\"'+jssitebaseUrl +'/theme/default/images/loader.gif\" border=\"0\" alt=\"Loading\" /></span><span>Please wait...</span></div>').show();\n\t$(\"#cus_fullorder\").load(jssitebaseUrl+\"/ajaxAction.php?action=orderFullDetails&orderid=\"+orderid);\n\t\n\t/*myPopupWindowOpen('#orderViewFullDetailsPop','#maska');\n\n\t//Form\n\t$('#customerOrderFullDetailsList').html('<div class=\"addtocartloading\"><img src=\"'+jssitebaseUrl +'/images/loader.gif\" border=\"0\" alt=\"Loading\" /><span>Please wait...</span></div>').show();\n\t$(\"#customerOrderFullDetailsList\").load(jssitebaseUrl+\"/ajaxAction.php?action=orderFullDetails&orderid=\"+orderid);*/\n}", "title": "" }, { "docid": "8a40874ca632e8594066ba852a440563", "score": "0.6341009", "text": "function display(order){\n // Order details\n var dest = order.dest;\n var currentLocation = order.curr_loc;\n var pickupLocation = order.pickup;\n var weight = order.weight;\n var status = order.status;\n var orderId = order.order_id;\n var recepientName = order.recepient_name;\n var userId = order.userId;\n var receipientNo = order.recepient_no;\n\n var destLocationHtml = `<span id=\"\">${dest}</span>`;\n var currentLocationHtml = `<span class=\"content\">${currentLocation}</span>`;\n var statusHtml = `<span><span id=\"stts-color\" class=\"${status.toLowerCase()}\">${status}</span></span>`;\n var editModeInputLabel = '';\n var editModeInputLabelAdmin = '';\n var statusBtnId = '';\n var statusAction = '';\n \n \n // All view modes\n if (mode == view) {\n singleOrder.classList.add('view-mode')\n }\n // Edit mode\n if (mode == edit) {\n // Client edit mode\n singleOrder.classList.add('edit-mode');\n if(user == client){\n editModeInputLabel = 'edit-input-label'\n destLocationHtml = `<input id=\"dest-input\" class=\"edit-input\" type=\"text\" value=\"${dest}\">`;\n statusBtnId = 'cancel-btn';\n statusAction = 'Cancel'\n }\n // Admin edit mode\n if(user == admin){\n editModeInputLabelAdmin = 'edit-input-label'\n singleOrder.id = 'admin-single-order';\n singleOrder.className = 'single-order'\n currentLocationHtml = `<input id=\"curr-loc-input\" class=\"edit-input\" type=\"text\" value=\"${currentLocation}\">`;\n singleOrder.classList.add('edit-mode');\n statusBtnId = 'deliver-btn';\n statusAction = 'Deliver';\n }\n\n } \n \n // Both edit and view mode and both users \n singleOrder.innerHTML =\n `<span class=\"heading\">Order Number: <span id=\"order-no\">${orderId}</span><span class=\"edit-button invincible\">Edit</span></span>\n <div id=\"delivery-stts\" class=\"detail\">\n <span class=\"label\">Delivery status:</span>\n <span class=\"content split\">${statusHtml}<span><span id=\"${statusBtnId}\" class=\"status-btn invincible\">${statusAction}</span></span></span>\n </div>\n <div id=\"recpnt-name\" class=\"detail\">\n <span class=\"label\">Recepient Name:</span>\n <span class=\"content\">${recepientName}</span>\n </div>\n <div id=\"recpnt-no\" class=\"detail\">\n <span class=\"label\">Recepient Number:</span>\n <span class=\"content\">${receipientNo}</span>\n </div>\n <div id=\"pickup-location\" class=\"detail\">\n <span class=\"label\">Pickup Location:</span>\n <span class=\"content\">${pickupLocation}</span>\n </div>\n <div id=\"current-location\" class=\"detail\">\n <span class=\"label ${editModeInputLabelAdmin}\">Current Locaton:</span>\n <span class=\"content split\">${currentLocationHtml}<span><span id=\"save-curr-loc\" class=\"save-btn invincible\" >Save</span></span></span>\n </div>\n <div id=\"dest-location\" class=\"detail\">\n <span class=\"label ${editModeInputLabel}\">Destination Location:</span>\n <span class=\"content split\">${destLocationHtml}<span><span id=\"save-dest-loc\" class=\"save-btn invincible\">Save</span></span></span>\n </div>\n </div>`\n \n const editButton = singleOrder.querySelector('.edit-button'); \n const saveCurrLocationBtn = singleOrder.querySelector('#save-curr-loc');\n \n // View mode\n if (mode == view){\n const statusText = singleOrder.querySelector('#stts-color').innerHTML \n // If the parcel hasnt been delivered\n if(statusText == inTransit){\n editButton.style.display = 'inline';\n\n if (pageTitle == 'Dashboard'){\n editButton.addEventListener('click', ()=>{\n viewOrder(client, edit, orderId);\n });\n } else if(pageTitle == 'Admin Dashboard'){\n editButton.addEventListener('click', ()=>{\n viewOrder(admin, edit, orderId);\n });\n }\n }\n }\n \n \n // edit mode\n if (mode == edit) {\n // Client edit mode\n if(user == client){\n // Get elements\n const destInputDiv = singleOrder.querySelector('#dest-input');\n const saveDestBtn = singleOrder.querySelector('#save-dest-loc'); \n const cancelBtn = singleOrder.querySelector('#cancel-btn'); \n //show cancel button\n cancelBtn.style.display = 'grid';\n // Add event listeners \n destInputDiv.addEventListener('input', () => {\n saveDestBtn.style.display = 'grid';\n });\n saveDestBtn.addEventListener('click', () => {\n var destLoc = destInputDiv.value;\n saveLocation(user, destLoc, orderId);\n });\n cancelBtn.addEventListener('click', () => {\n changeOrderStatus(true, user,cancel, orderId);\n });\n\n\n }\n \n if (user == admin){\n // Get elements\n const currLocationInput = singleOrder.querySelector('#curr-loc-input');\n const deliverBtn = singleOrder.querySelector('#deliver-btn');\n const saveCurrLocation = singleOrder.querySelector('#save-curr-loc')\n // show deliver button\n deliverBtn.style.display = 'grid'\n // Add event listeners \n currLocationInput.addEventListener('input', ()=>{\n saveCurrLocation.style.display = 'grid';\n });\n saveCurrLocationBtn.addEventListener('click', () => {\n var currentLoc = currLocationInput.value;\n saveLocation(user, currentLoc, orderId);\n });\n deliverBtn.addEventListener('click', () => {\n changeOrderStatus(true, user, deliver, orderId);\n });\n \n }\n \n }\n\n // Add created element to DOM\n allOrdersDiv.appendChild(singleOrder);\n }", "title": "" }, { "docid": "0a49b721be599d1eea9ac7651eab27f6", "score": "0.62358785", "text": "function showOrder(recipientId) {\n console.log(\"Mostrar orden de pedido\");\n var messageText = 'Listo!\\nEsta es tu orden de compra:\\n'+ main.user_name +'\\n';\n messageText += 'COMBO '+ main.user_combo +'\\n x '+ main.user_combo_quantity;\n \n main.sendButtonMessage(recipientId, messageText, \"Pedir\", \"USER_ORDERED\");\n}", "title": "" }, { "docid": "35ef69a0127b6f29b9c352ac4bbec4c5", "score": "0.61103696", "text": "function viewOrder(id, url) {\n\t\t\t\n\t\t\t\n\t\t\t//CHECK IF EMPTY, DONT PROCEED\n\t\t\tif(id === '' || url === ''){\n\t\t\t\t$( \"#load\" ).hide();\n\t\t\t\treturn;\n\t\t\t}\t\n\t\t\t\n\t\t\t$( \"#load\" ).show();\n\n\t\t\tvar dataString = { \n\t\t\t\tid : id\n\t\t\t};\t\t\t\t\n\t\t\t$.ajax({\n\t\t\t\t\n\t\t\t\ttype: \"POST\",\n\t\t\t\turl: baseurl+\"\"+url,\n\t\t\t\tdata: dataString,\n\t\t\t\tdataType: \"json\",\n\t\t\t\tcache : false,\n\t\t\t\tsuccess: function(data){\n\n\t\t\t\t\tif(data.success == true){\n\t\t\t\t\t\t$( \"#load\" ).hide();\n\n\t\t\t\t\t\t$(\"#headerTitle\").html(data.headerTitle);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$(\"#ref\").html(data.reference);\n\t\t\t\t\t\t$(\"#view-order-description\").html(data.order_description);\n\t\t\t\t\t\tif(data.num_of_items == 1){\n\t\t\t\t\t\t\t$(\"#view-num-of-items\").html(data.num_of_items+' item');\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$(\"#view-num-of-items\").html(data.num_of_items+' items');\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$(\"#view-total-price\").html(data.total_price);\n\t\t\t\t\t\t$(\"#view-payment-status\").html(data.payment_status);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(data.edit_payment_status === '1'){\n\t\t\t\t\t\t\t$(\"#view-payment-method\").html(data.view_payment_method);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$(\"#view-shipping-status\").html(data.shipping_status);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$(\"#view-order-date\").html(data.order_date);\n\t\t\t\t\t\t$(\"#orderDate\").html(data.orderDate);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$(\"#view-delivery-date\").html(data.delivery_date);\n\t\t\t\t\t\t \n\t\t\t\t\t}else{\n\t\t\t\t\t\t$( \"#load\" ).hide();\n\t\t\t\t\t\t$(\"#headerTitle\").html('Errors!');\n\t\t\t\t\t} \t \n\t\t\t\t\t\t \n\t\t\t\t},error: function(xhr, status, error) {\n\t\t\t\t\t$( \"#load\" ).hide();\n\t\t\t\t\talert(error);\n\t\t\t\t},\n\n\t\t\t});\t\t\t\t\t\n\t\t}", "title": "" }, { "docid": "7d6947beefd4c01dd0daf41d608436a6", "score": "0.6109666", "text": "function checkupDisplay(order){\n checkupOrderId.innerHTML = order.orderId;\n}", "title": "" }, { "docid": "8125aa94cc1882d9ca34df9ec8f118d2", "score": "0.5994441", "text": "function onDetailsClick() {\n if ($.error_details.getVisible()) {\n // hide the details container\n $.error_details.setHeight(0);\n $.error_details.setVisible(false);\n $.details_button.setTitle(_L('Show Details'));\n } else {\n // show the details container\n $.error_details.setHeight(Ti.UI.SIZE);\n $.error_details.setVisible(true);\n $.details_button.setTitle(_L('Hide Details'));\n }\n}", "title": "" }, { "docid": "00fe81aecbecdb2166d2a6de525ce336", "score": "0.5971617", "text": "function orderPrint(order){\n console.log(' ' + order.id + ' : ' + order.type + ' ' + order.amount + ' ' + order.currency + ' : ' + order.rate);\n}", "title": "" }, { "docid": "5e5f720af2228292d685a9ace5930d2b", "score": "0.59543264", "text": "getOrderDetail() {\n return AXIOS.get('/details')\n }", "title": "" }, { "docid": "78b73a8dcf695bf14044a21d3904bbf4", "score": "0.5902022", "text": "function show(req, res) {\n Order.findById(req.params.id, function (err, order) {\n res.render(\"orders/show\", { order, title: \"Order Details\" });\n });\n}", "title": "" }, { "docid": "66b0d899e636b2469473b642cd1592f4", "score": "0.5901122", "text": "detailClicked(obj){\n let element = obj.path[3];\n let detail = $(element).find(\"div.resource-details-content\");\n if($(detail).css('display')=='none'){\n $(detail).slideDown();\n }else{\n $(detail).slideUp();\n }\n }", "title": "" }, { "docid": "0f134c6f6fc08d70b8577cb0803e324c", "score": "0.588936", "text": "function showEditSymbols(clickedShoppingList)\n{\n $(clickedShoppingList).parents(\".detailView\").find(\".editIcons i\").toggle();\n let clickedListName = $(clickedShoppingList).parents(\".detailView\").prev(\".listEntry\").children(\".nameOfList\").text();\n let shoppingList = shoppingListManagement.getShoppingListByName(clickedListName);\n if (shoppingList && shoppingList.shoppingListIsEditable())\n {\n if ($(clickedShoppingList).text() === \"Liste bearbeiten\")\n {\n $(clickedShoppingList).text(\"Änderungen Speichern\");\n }\n else\n {\n $(clickedShoppingList).text(\"Liste bearbeiten\");\n //Save changes\n saveChanges(clickedShoppingList, shoppingList);\n }\n }\n}", "title": "" }, { "docid": "614d1ec566374d5a23b05650d69dc5be", "score": "0.5886325", "text": "function displayOrder(paramPersonOrder) {\r\n \"use strict\";\r\n let vResultText = document.getElementById(\"text-result\");\r\n let vResutlDiv = document.getElementById(\"div-result\");\r\n vResutlDiv.style.display = \"block\";\r\n let vRuleText = \"--------------------------------------------------------------------------------------------------\";\r\n let vFormResult = \"Họ và Tên: \" + gPersonOrderDetail.personData.fullName\r\n + \"<br>Email: \" + gPersonOrderDetail.personData.email\r\n + \"<br>Điện thoại: \" + gPersonOrderDetail.personData.phoneNumber\r\n + \"<br>Địa chỉ: \" + gPersonOrderDetail.personData.address\r\n + \"<br>Lời nhắn: \" + gPersonOrderDetail.personData.message;\r\n let vMenuResult = \"Kích Cỡ: \" + gPersonOrderDetail.selectedMenu.menuName\r\n + \"<br>Đường Kính: \" + gPersonOrderDetail.selectedMenu.duongKinhCM + \" Cm\"\r\n + \"<br>Sườn Nướng: \" + gPersonOrderDetail.selectedMenu.suongNuong + \" Miếng\"\r\n + \"<br>Salad: \" + gPersonOrderDetail.selectedMenu.saladGr + \" Gram\"\r\n + \"<br>Nước Ngọt: \" + gPersonOrderDetail.selectedMenu.drinkNumber + \" Ly\";\r\n let vTypeAndDiscountResult = \"Loại Pizza: \" + gPersonOrderDetail.selectedPizzaType\r\n + \"<br>Mã Voucher: \" + ((gPersonOrderDetail.personData.voucher === null) ?\r\n \"\" : gPersonOrderDetail.personData.voucher.maVoucher)\r\n + \"<br>Giá VND: \" + gPersonOrderDetail.selectedMenu.priceVND + \" VND\"\r\n + \"<br>Discount: \" + gPersonOrderDetail.getDiscount() + \" %\"\r\n + \"<br>Phải Thanh Toán: \" + gPersonOrderDetail.getPrice();\r\n vResultText.innerHTML = vFormResult + \"<br>\" + vRuleText\r\n + \"<br>\" + vMenuResult + \"<br>\" + vRuleText\r\n + \"<br>\" + vTypeAndDiscountResult;\r\n}", "title": "" }, { "docid": "3e889a62f5c6e5ddf9eeae2fe7412e10", "score": "0.5860932", "text": "function itemOnClick(entry) {\n debug.trace('Entry item onclick event.');\n\n // Is a details view already open?\n if (currentEntry !== null) {\n var previousEntry = currentEntry;\n\n // We explicitly close so we know for sure that \"currentEntry\" is\n // null at this point.\n pluginHelper.closeDetailsView();\n\n // Same entry as before, no need to open it again.\n if (previousEntry == entry) {\n return;\n }\n }\n\n currentEntry = entry;\n\n var htmlDetailsView = new DetailsView();\n htmlDetailsView.html_content = true;\n\n var htmlContent = '<style type=\"text/css\">' + detailsCss + '</style>';\n htmlContent += entry.content;\n\n htmlDetailsView.setContent('', undefined, htmlContent, false, 0);\n\n // Show the details view\n pluginHelper.showDetailsView(htmlDetailsView,\n entry.title,\n gddDetailsViewFlagToolbarOpen,\n function(flags) { detailsViewOnFeedback(flags, entry.link); });\n}", "title": "" }, { "docid": "2cec2d907328f2ec23b12d0c094892da", "score": "0.58581775", "text": "function openDetails(e)\n{\n\ttoppings.close();\n\t\n\tdetails.crust \t\t= e.crust;\n\tdetails.path\t\t= e.path;\n\tdetails.toppings \t= e.toppings;\n\tdetails.url \t\t= 'details.js';\n\t\n\tdetails.open();\n}", "title": "" }, { "docid": "be0fcf60129c8f75804306c3ed591f7c", "score": "0.5851126", "text": "function mostrarDetalle(){\n //this hace referencia al boton q llamo a esta funcion\n var url = $(this).parent().find('.detalle').attr('href'); //Busco la url desde el padre\n window.open(url);\n }", "title": "" }, { "docid": "ac8e02da5c111771ad4eb56a2fccc431", "score": "0.58282864", "text": "function mostrarDetalhes(){\n\t\tvar tituloLogo = this.getAttribute(\"title\").toLowerCase();\n\t\t\t\t\t\t //o titulo nome do é igual o id do detalhe.\t\n\t\tvar idDetalhe = \"#\"+tituloLogo; \n\t\t\t\t\t\t//juntei a cerquilha '#' para pegar os id's dinamicamente.\n\t\t\n\t\tescondeDetalhes();\n\t\tdocument.querySelector(idDetalhe).style.display = \"grid\";\t\t\t\t\n\t}", "title": "" }, { "docid": "2309f51bea088541e277d4bccae318b6", "score": "0.5827781", "text": "function displayDetails(event){\n\t\tif(document.querySelector('li.painting.open')!==null){\n\t\t\tgetInsertBeforeElement()\n\t\t\t// Update which painting we are looking at, this will be used to load the content\n\t\t\tsetSelectedPainting(document.querySelector('li.painting.open').dataset.index)\n\t\t}else{\n\t\t\tdocument.getElementById('painting-details').classList.remove('active')\n\t\t\tsetSelectedPainting(-1)\n\t\t}\n\t}", "title": "" }, { "docid": "e20ae0d356e141eec73f40163a54aa6e", "score": "0.58160746", "text": "function json_order_detail(id) {\n\n\tvar self = this;\n\n\tdatabase.detail('orders', 'order', id, function(err, result) {\n\n\t\tif (err) {\n\t\t\tself.view500(err);\n\t\t\treturn;\n\t\t}\n\n\t\tself.json(result);\n\n\t});\n}", "title": "" }, { "docid": "0d68832fcbc036fe6c724ff91dc2d9de", "score": "0.58010834", "text": "function viewAnOrder(res,mysql,id,complete){\r\n\t\tvar sql = \"SELECT Orders.Order_ID, Phones.SKU, Phones_Infos.Phone_Name, Customers.Cust_Name, ServicePlans.Plan_Name, Orders.Order_Date FROM Orders LEFT JOIN Orders_Products ON Orders_Products.Order_ID = Orders.Order_ID LEFT JOIN Phones ON Orders_Products.IMEI = Phones.IMEI LEFT JOIN Phones_Infos ON Phones.SKU = Phones_Infos.SKU LEFT JOIN Customers ON Orders.Cust_ID = Customers.Cust_ID LEFT JOIN ServicePlans ON Orders_Products.Plan_ID = ServicePlans.Plan_ID WHERE Orders.Order_ID = ?\";\r\n\t\tvar inserts = [id];\r\n\t\tmysql.pool.query(sql, inserts, (error,results,fields)=>{\r\n\t\t\tif(error){\r\n\t\t\t\tres.write(JSON.stringify(error));\r\n\t\t\t\tres.end();\r\n\t\t\t}\r\n\t\t\tcontext.anOrder = results[0];\r\n\t\t\tcomplete();\r\n\t\t});\r\n\t}", "title": "" }, { "docid": "6e402699e6d2417833880f80e3009887", "score": "0.5800948", "text": "function showOrder() {\n var orderArray = JSON.parse(localStorage.getItem('orderArray'));\n for (let i = 0; i < orderArray.length; i++) {\n if (selection.value == orderArray[i].phone) {\n var day = orderArray[i].orderDay;\n var month = orderArray[i].orderMonth;\n var year = orderArray[i].orderYear;\n var timePeriod = orderArray[i].timePeriod;\n var amount1 = orderArray[i].amount1;\n var amount2 = orderArray[i].amount2;\n var amount3 = orderArray[i].amount3;\n var orderPrice = orderArray[i].orderPrice;\n var orderID = orderArray[i].orderId;\n\n\n\n var orderInfo = document.createElement(\"P\");\n orderInfo.innerHTML = \"Dato for udlejning: \" + day + \"/\" + month + \"/\" + year + \"</br></br>\" + \"Tidspunkt for udlejning: kl.\" + timePeriod + \"</br></br>\" + \"Antal Sea Doo Spark: \" + amount1 + \"</br></br>\" + \"Antal Yamaha Waverunner VX: \" + amount2 + \"</br></br>\" + \"Antal Kawasaki STX-15F: \" + amount3 + \"</br></br>\" + \"Samlet pris til betaling ved udlejning: \" + orderPrice + \"</br></br> Ordre ID: \" + orderID + \"<br><br>\";\n\n document.getElementById('orderDetails').appendChild(orderInfo);\n document.getElementById('noOrders').innerHTML = \"\";\n }\n }\n}", "title": "" }, { "docid": "d9fd40d17f269340914e61ca8a143516", "score": "0.57734954", "text": "function showDetails() {\n const details = document.querySelector('details');\n if (details) {\n details.style.display = 'block';\n }\n}", "title": "" }, { "docid": "680c564590634125a61bf4b4362ab5b8", "score": "0.57734925", "text": "function showDetails(el) {\n if (el.innerText == \"\") {\n return;\n }\n\n $(\"#detailRes\").empty();\n var entity = {}\n entity[\"type\"] = el.getAttribute(\"wdType\");\n entity[\"wdName\"] = el.getAttribute(\"wdName\");\n entity[\"name\"] = el.innerText;\n entity[\"description\"] = el.getAttribute(\"description\");\n showSingleEntity(\"detailRes\", entity);\n}", "title": "" }, { "docid": "0eb4930098f6de467bdc48e5dfe99242", "score": "0.574439", "text": "function showDetailRow() {\n if (DETAILCARD.priority === 1) {\n $(detailcard_priority).addClass(\"btn-danger\");\n }\n else {\n $(detailcard_priority).removeClass(\"btn-danger\");\n }\n if (DETAILCARD.status === 1) {\n $(detailcard_done).addClass(\"btn-success\");\n }\n else {\n $(detailcard_done).removeClass(\"btn-success\");\n }\n $(detailcard_title).text(DETAILCARD.title);\n $(detailcard_description).text(DETAILCARD.description);\n $(detailcard_startdate).val(convertDate(DETAILCARD.startdate));\n $(detailcard_duedate).val(convertDate(DETAILCARD.duedate));\n listUserDetailRow();\n listuserNotInDetailRow();\n }", "title": "" }, { "docid": "46954588b2fa84065b7b5ff703c98585", "score": "0.5738669", "text": "function myOrderRowClickEvent (event) {\n var displayOrderID = $(\"#orderItems\").attr(\"orderID\");\n var selectedOrderID = event.currentTarget.attributes['selectedOrderID'].value;\n var display = (displayOrderID === selectedOrderID)? false : true;\n\n //toggle display for orderItems table:\n $(\"#orderItems\").toggle(display);\n if(display === true){\n //show items of selected order:\n $(\"#orderItems\").attr(\"orderID\", selectedOrderID);\n //refreshOrderItemsTable(); refresh items table <------\n }else\n $(\"#orderItems\").attr(\"orderID\", '');\n\n}", "title": "" }, { "docid": "3f95260e19359d313714b12431128718", "score": "0.57289267", "text": "function onClickDetails(){\n \n // $('.op-details.extended').each(function(){ toggleDetails( $(this), TOGGLE.close ); });\n \n toggleDetails($(this).find(\".op-details\"), TOGGLE.toggle);\n}", "title": "" }, { "docid": "a95a80bf00c2383aff4abdaa4c764ca8", "score": "0.572601", "text": "function loadAndDisplayOrders() {\n Ajax.get(Urls.ADMIN_DASHBOARD_ITEMS, /* options */).then((response) => {\n // Display elements\n });\n }", "title": "" }, { "docid": "a1966cfde3d1e2f54da9baa61bdf6cee", "score": "0.57238114", "text": "function onMyOrderTutTap() {\n const frame = getFrameById(\"topframe\");\n frame.navigate(\"views/Intro-myorders/Intro-myorders-page\");\n }", "title": "" }, { "docid": "85d9d2879b453e254fb610a4a5f5af2b", "score": "0.5715396", "text": "function onMoreInfoClick(ev) {\n // hide all venue-details divs\n $('div.venue-details').css('display', 'none');\n // show current venue-details div\n $(ev.target).parent().next().css('display', 'block');\n }", "title": "" }, { "docid": "65d461243a50ea3361d07e00f2b078a0", "score": "0.5705405", "text": "function showLineItemDetailRows() {\n\t$('lineItemDetailRows').style.display = \"\";\n\t$('addChargesList').style.display = \"none\";\n\t\n}", "title": "" }, { "docid": "4094d1366f3e722f9bc4bfc87b891ca1", "score": "0.56841975", "text": "function AddOrder() {\n ToggleOnOff();\n }", "title": "" }, { "docid": "ed68082e0f8881a733dc66cd49f891f7", "score": "0.5679819", "text": "function goToDetails(evt) {\n let detailsUrl = evt.target.id;\n window.location = \"/details/\" + detailsUrl;\n }", "title": "" }, { "docid": "10da0899f181faa56f7b528f961f2406", "score": "0.56787586", "text": "function displayAddOrder() {\n document.getElementById(\"order_item\").disabled=true;\n document.getElementById(\"new_item\").style.display=\"inline\";\n}", "title": "" }, { "docid": "5e78dc04be233c8dd9689711fb8a3849", "score": "0.56726635", "text": "function showInfo(e) {\n const { children: [title, pre] } = document.getElementById(\"info\");\n const data = JSON.stringify(e.data.node.details, null, 2);\n title.innerText = e.data.node.id;\n pre.innerText = data ? data : 'No addition data';\n }", "title": "" }, { "docid": "c39883467037da9ac93fee6fd708fb89", "score": "0.5668905", "text": "function showRewardDetail(id, img, name, note, equalnum) {\n\t\trewardGoodsId = id;\n\t\trewardEqual = equalnum;\n\t\trewardName = name;\n\t\trewardImg = ROUTEFILE + img;\n\t\t$(\"#jcostDetail .bmcostImg\").attr(\"src\", ROUTEFILE + img);\n\t\t$(\"#jcostDetail .bmcostName\").html(name + \"<span>(\" + equalnum + \"播米币)</span>\");\n\t\t$(\"#jcostDetail .bmcostBrief\").text(note);\n\t\t$(\"#jcostDetail input\").attr(\"dataType\", equalnum);\n\t\tgetEqualCost(equalnum);\n\t\tsetCostNum();\n\t}", "title": "" }, { "docid": "2c3bb8e6e19e4564e8b5229cf20f861d", "score": "0.5660427", "text": "function showItemDetails() {\n var itemNr = $(this).data('itemnr');\n\n if (!alertify.itemDetails) {\n // define a new dialog (Alertify factory)\n alertify.dialog('itemDetails', function factory() {\n return {\n main: function(message) {\n this.message = message;\n },\n setup: function() {\n return {\n buttons: [{\n text: \"OK\",\n key: 27 /* Esc */\n }],\n focus: {\n element: 0\n },\n options: {\n title: 'Details'\n }\n };\n },\n prepare: function() {\n this.setContent(this.message);\n }\n }\n });\n }\n \n // get the item object from the backend\n $.getJSON(\"/Items/\" + itemNr, function(data) {\n alertify.itemDetails(data.descr);\n }).fail(function() {\n alertify.error('Items could not be retrieved from server');\n });\n}", "title": "" }, { "docid": "cde5d41b89602821c6fae8b3965ba5d6", "score": "0.56600225", "text": "function switchView() {\n console.log(\"Switchview clicked\");\n var x = document.getElementById(\"confirmorder\");\n var y = document.getElementById(\"store\");\n var z = document.getElementById(\"switchorder\")\n if (x.style.display === \"none\")\n {\n x.style.display= \"block\";\n y.style.display= \"none\";\n z.textContent = \"Ga naar winkel\";\n \n showOrderlist();\n }\n else\n {\n x.style.display = \"none\";\n y.style.display = \"block\";\n z.textContent = \"Ga naar winkelwagen\";\n\n var tmp = document.getElementById(\"cOrder\");\n tmp.removeChild(document.getElementById(\"orderlist\"));\n }\n }", "title": "" }, { "docid": "d31674f361677f145be90ca75cd1fde2", "score": "0.5654246", "text": "function displayOrderInfo(ordersID, contactInfo)\n{\n\n console.log(ordersID);\n console.log(contactInfo);\n}", "title": "" }, { "docid": "91b39ad7408dddf403ccadcfe141d3aa", "score": "0.5646112", "text": "function displayItemInAGOL(listOrItem, evt) {\n var item = (listOrItem.row) ? listOrItem.row(evt).data : listOrItem;\n var detailsUrlTemplate = (item.owner === portalUser.username) ? \"{0}//{1}.{2}/home/item.html?id={3}\" : \"{0}//www.arcgis.com/home/item.html?id={3}\";\n var agsDetailsUrl = lang.replace(detailsUrlTemplate, [document.location.protocol, portalUser.portal.urlKey, portalUser.portal.customBaseUrl, item.id]);\n window.open(agsDetailsUrl);\n }", "title": "" }, { "docid": "f7590c8766e67c033e03f0b649c231d3", "score": "0.56432945", "text": "function clickDetalhePedido(dados) {\n\n $(\"#modalPedido\").modal()\n\n const id = document.getElementById(\"pedidoId\")\n const pedido_dados = document.getElementById(\"pedidoDados\")\n const pedido_pagamento = document.getElementById(\"pedidoPagamento\")\n const pedido_data = document.getElementById(\"pedidoData\")\n\n id.innerHTML = dados.pedido_id\n pedido_dados.innerHTML = dados.pedido_dados\n pedido_pagamento.innerHTML = dados.pedido_forma_pagamento\n pedido_data.innerHTML = dados.pedido_data\n }", "title": "" }, { "docid": "b0c77bb43b8ecad801e0dab32fff33d9", "score": "0.5643078", "text": "function openDetails(e)\n{\n toppings.close();\n \n details.crust = e.crust;\n details.path = e.path;\n details.toppings = e.toppings;\n details.url = 'details.js';\n \n details.open();\n}", "title": "" }, { "docid": "5a677e8c1e44eb1caf795fec750e134b", "score": "0.56413513", "text": "function showBuildingDetails(title,attributes){\n \tvar controller = View.controllers.get(\"abRplmPfadminGpdGisCtrl\");\n\tvar blId = title;\n\tcontroller.openDetailsPopUp(blId);\n}", "title": "" }, { "docid": "4ec9319a1bc6178beb4bff0701193bf2", "score": "0.5633706", "text": "function orderSent() {\n document.getElementById(\"order-sent\").style.display = \"block\";\n document.getElementById(\"send-parcel-form\").style.display = \"none\";\n document.getElementById(\"orders-list-user\").style.display = \"none\";\n document.getElementById(\"welcome-message\").style.display = \"none\";\n }", "title": "" }, { "docid": "bc578e3f948e1802f4c5140470e55029", "score": "0.5629433", "text": "function getItemDetails(event, ui) {\n\n\tvar locationId = $('#order\\\\.locationId').val();\n\tvar supplierId = $('#order\\\\.supplier\\\\.supplierId').val();\n\n\ttargetItemIndex = event.target.id.replace(/[^0-9]/gi, '');\n\n\t$.get(\"/search_order_item\", {\n\t\titemId : ui.item.value,\n\t\tlocationId : locationId,\n\t\tsupplierId : supplierId\n\t}, function(data, status) {\n\n\t\trenderOrderItem(data);\n\t\tcalculateTotals();\n\t});\n}", "title": "" }, { "docid": "318b47703c5a4688a54cf61c6f338449", "score": "0.5620611", "text": "function openDetailView(entry)\n {\n vm.selected = entry;\n }", "title": "" }, { "docid": "b16a94ccfbdf481bba54498dd744df04", "score": "0.5619718", "text": "function adToOrder(productID){\r\n\r\n}", "title": "" }, { "docid": "98bb0b9a2032be19f140898b6a965874", "score": "0.56133205", "text": "function viewOrder(user, mode, orderId) {\n allOrdersDiv.innerHTML = ''\n ordersTitle.style.display = 'none';\n allOrdersDiv.style.marginTop = '30px';\n const singleOrder = document.createElement('div');\n singleOrder.id = 'single-order';\n singleOrder.className = 'single-order'\n var orderUrl = `https://pacific-harbor-80743.herokuapp.com/api/v2/parcels/${orderId}`\n\n fetch(orderUrl, {\n headers: {\n 'Accept': 'application/json, text/plain, */*',\n 'token': token\n }\n } )\n .then(res => {\n if (res.status == 200){\n res.json()\n .then(data => display(data.order));\n } else if (res.status == 401){\n res.json()\n .then(data => showSnackbar(error, data.message))\n window.location.href = 'login.html'; \n } else {\n res.json()\n .then(data => showSnackbar(error, data.message))\n }\n })\n \n\n // Function to display order\n function display(order){\n // Order details\n var dest = order.dest;\n var currentLocation = order.curr_loc;\n var pickupLocation = order.pickup;\n var weight = order.weight;\n var status = order.status;\n var orderId = order.order_id;\n var recepientName = order.recepient_name;\n var userId = order.userId;\n var receipientNo = order.recepient_no;\n\n var destLocationHtml = `<span id=\"\">${dest}</span>`;\n var currentLocationHtml = `<span class=\"content\">${currentLocation}</span>`;\n var statusHtml = `<span><span id=\"stts-color\" class=\"${status.toLowerCase()}\">${status}</span></span>`;\n var editModeInputLabel = '';\n var editModeInputLabelAdmin = '';\n var statusBtnId = '';\n var statusAction = '';\n \n \n // All view modes\n if (mode == view) {\n singleOrder.classList.add('view-mode')\n }\n // Edit mode\n if (mode == edit) {\n // Client edit mode\n singleOrder.classList.add('edit-mode');\n if(user == client){\n editModeInputLabel = 'edit-input-label'\n destLocationHtml = `<input id=\"dest-input\" class=\"edit-input\" type=\"text\" value=\"${dest}\">`;\n statusBtnId = 'cancel-btn';\n statusAction = 'Cancel'\n }\n // Admin edit mode\n if(user == admin){\n editModeInputLabelAdmin = 'edit-input-label'\n singleOrder.id = 'admin-single-order';\n singleOrder.className = 'single-order'\n currentLocationHtml = `<input id=\"curr-loc-input\" class=\"edit-input\" type=\"text\" value=\"${currentLocation}\">`;\n singleOrder.classList.add('edit-mode');\n statusBtnId = 'deliver-btn';\n statusAction = 'Deliver';\n }\n\n } \n \n // Both edit and view mode and both users \n singleOrder.innerHTML =\n `<span class=\"heading\">Order Number: <span id=\"order-no\">${orderId}</span><span class=\"edit-button invincible\">Edit</span></span>\n <div id=\"delivery-stts\" class=\"detail\">\n <span class=\"label\">Delivery status:</span>\n <span class=\"content split\">${statusHtml}<span><span id=\"${statusBtnId}\" class=\"status-btn invincible\">${statusAction}</span></span></span>\n </div>\n <div id=\"recpnt-name\" class=\"detail\">\n <span class=\"label\">Recepient Name:</span>\n <span class=\"content\">${recepientName}</span>\n </div>\n <div id=\"recpnt-no\" class=\"detail\">\n <span class=\"label\">Recepient Number:</span>\n <span class=\"content\">${receipientNo}</span>\n </div>\n <div id=\"pickup-location\" class=\"detail\">\n <span class=\"label\">Pickup Location:</span>\n <span class=\"content\">${pickupLocation}</span>\n </div>\n <div id=\"current-location\" class=\"detail\">\n <span class=\"label ${editModeInputLabelAdmin}\">Current Locaton:</span>\n <span class=\"content split\">${currentLocationHtml}<span><span id=\"save-curr-loc\" class=\"save-btn invincible\" >Save</span></span></span>\n </div>\n <div id=\"dest-location\" class=\"detail\">\n <span class=\"label ${editModeInputLabel}\">Destination Location:</span>\n <span class=\"content split\">${destLocationHtml}<span><span id=\"save-dest-loc\" class=\"save-btn invincible\">Save</span></span></span>\n </div>\n </div>`\n \n const editButton = singleOrder.querySelector('.edit-button'); \n const saveCurrLocationBtn = singleOrder.querySelector('#save-curr-loc');\n \n // View mode\n if (mode == view){\n const statusText = singleOrder.querySelector('#stts-color').innerHTML \n // If the parcel hasnt been delivered\n if(statusText == inTransit){\n editButton.style.display = 'inline';\n\n if (pageTitle == 'Dashboard'){\n editButton.addEventListener('click', ()=>{\n viewOrder(client, edit, orderId);\n });\n } else if(pageTitle == 'Admin Dashboard'){\n editButton.addEventListener('click', ()=>{\n viewOrder(admin, edit, orderId);\n });\n }\n }\n }\n \n \n // edit mode\n if (mode == edit) {\n // Client edit mode\n if(user == client){\n // Get elements\n const destInputDiv = singleOrder.querySelector('#dest-input');\n const saveDestBtn = singleOrder.querySelector('#save-dest-loc'); \n const cancelBtn = singleOrder.querySelector('#cancel-btn'); \n //show cancel button\n cancelBtn.style.display = 'grid';\n // Add event listeners \n destInputDiv.addEventListener('input', () => {\n saveDestBtn.style.display = 'grid';\n });\n saveDestBtn.addEventListener('click', () => {\n var destLoc = destInputDiv.value;\n saveLocation(user, destLoc, orderId);\n });\n cancelBtn.addEventListener('click', () => {\n changeOrderStatus(true, user,cancel, orderId);\n });\n\n\n }\n \n if (user == admin){\n // Get elements\n const currLocationInput = singleOrder.querySelector('#curr-loc-input');\n const deliverBtn = singleOrder.querySelector('#deliver-btn');\n const saveCurrLocation = singleOrder.querySelector('#save-curr-loc')\n // show deliver button\n deliverBtn.style.display = 'grid'\n // Add event listeners \n currLocationInput.addEventListener('input', ()=>{\n saveCurrLocation.style.display = 'grid';\n });\n saveCurrLocationBtn.addEventListener('click', () => {\n var currentLoc = currLocationInput.value;\n saveLocation(user, currentLoc, orderId);\n });\n deliverBtn.addEventListener('click', () => {\n changeOrderStatus(true, user, deliver, orderId);\n });\n \n }\n \n }\n\n // Add created element to DOM\n allOrdersDiv.appendChild(singleOrder);\n }\n\n}", "title": "" }, { "docid": "b11dbd0d25e347fc2f4e06705e5a59fb", "score": "0.56127644", "text": "initDetailView(){\n console.log(liste);\n\n $(\".beschreibung\").text(liste.beschreibung);\n $(\".status\").text(liste.status);\n $(\".amount\").text(liste.amount);\n $(\".erstDat\").text(liste.erstellDatum);\n $(\".erfullDat\").text(liste.erfuellDatum);\n $(\".nametag\").text(liste.name);\n\n if(liste.status == \"übernommen\"){\n $(\".takeover\").hide();\n $(\".detailEdit\").hide();\n $(\".detailDelete\").hide();\n $(\".detailAdd\").hide();\n }\n else if(liste.status == \"abgeschlossen\"){\n $(\".takeover\").hide();\n $(\".detailEdit\").hide();\n $(\".detailDelete\").hide();\n $(\".detailAdd\").hide();\n $(\"#total\").hide();\n $(\".sendIt\").hide();\n $(\".end .bold\").text(\"Gesamtpreis: \" +liste.total +\" Euro\");\n }\n else{\n $(\".takeover\").show();\n $(\".detailEdit\").show();\n $(\".detailDelete\").show();\n $(\".detailAdd\").show();\n $(\"#total\").show();\n $(\".sendIt\").show();\n $(\".end .bold\").text(\"Gesamtpreis: * \");\n $(\".alertError\").addClass(\"hide\");\n $(\".alertErrorStat\").addClass(\"hide\");\n $(\".alertSucc\").addClass(\"hide\");\n $(\".alertSuccTaken\").addClass(\"hide\");\n $(\".alertDetailEdit\").addClass(\"hide\");\n }\n // changing appearance depending on the role\n //change seeker\n if(this.#rolle == \"seeker\"){\n $(\".takeover\").hide();\n $(\".sendIt\").hide();\n $(\"#total\").hide();\n $(\".end .bold\").hide();\n if (liste.status == \"abgeschlossen\") {\n\n }\n }\n // change helper\n if(this.#rolle == \"helper\"){\n $(\".detailEdit\").hide();\n $(\".detailDelete\").hide();\n $(\".detailAdd\").hide();\n $(\".takeover\").show();\n if (liste.status == \"übernommen\"){ $(\".takeover\").hide(); }\n $(\".sendIt\").show();\n $(\"#total\").show();\n if (liste.status == \"abgeschlossen\") {\n $(\".sendIt\").hide();\n $(\"#total\").hide();\n $(\".takeover\").hide();\n if(c){\n let p = $(` <h3> Gesamtpreis: ${liste.total} Euro</h3>` );\n $('#' + liste.id +\".space\").append(p);\n c = false;\n }\n }\n }\n\n this.printArticleList(liste);\n }", "title": "" }, { "docid": "76f47fa862ea06b7c9009391119bc3a5", "score": "0.56118226", "text": "_choseDetail(e) {\n const liPicked = e.target.closest('li')\n if(!liPicked) {\n return;\n }\n\n this._activeTheExactLi(liPicked)\n\n /* Take the description from de li's child's data */\n this._description = liPicked.children[0].dataset.description\n this._changeTheDescription()\n \n this._setLocalStorage(this._description)\n }", "title": "" }, { "docid": "8059a739bbee82ba9622dc1d57e69dd9", "score": "0.56060714", "text": "function show() {\r\n\t\ttID = null;\r\n\t\thelper.show();\r\n\t\tupdate();\r\n\t}", "title": "" }, { "docid": "3c2b2ac22200e98086ef478b4d854498", "score": "0.5603504", "text": "function detailsArrived() {\r\n\t\t\r\n var xml_o, orderDetail, oDetail, \r\n orderNumberElement, orderNumber, orderNumberElement, \r\n shippedDateElement, shippedDate, statusElement, status,\r\n commentsElement, comments,\r\n customerDetail = document.getElementById(\"CustomerDetails\"), orderNumber,\r\n orderDateElement, orderDate;\r\n \r\n if (orderDetailsXHR.readyState === REQUEST_COMPLETE &&\r\n orderDetailsXHR.status === OK && orderDetailsXHR.responseXML !== null) {\r\n\r\n xml_o = orderDetailsXHR.responseXML;\r\n \r\n orderDetail = xml_o.getElementsByTagName(\"order\");\r\n oDetail = orderDetail[0];\r\n \r\n orderNumberElement = oDetail.getElementsByTagName(\"orderNumber\");\r\n\t\t\torderNumber = orderNumberElement[0].childNodes[0].data;\r\n\t\t\tcustomerDetail.rows[1].cells[1].innerHTML = orderNumber;\r\n \r\n orderDateElement = oDetail.getElementsByTagName(\"orderDate\");\r\n\t\t\torderDate = orderDateElement[0].childNodes[0].data;\r\n\t\t\tcustomerDetail.rows[2].cells[1].innerHTML = orderDate;\r\n \r\n shippedDateElement = oDetail.getElementsByTagName(\"shippedDate\");\r\n\t\t\tshippedDate = shippedDateElement[0].childNodes[0].data;\r\n\t\t\tcustomerDetail.rows[3].cells[1].innerHTML = shippedDate;\r\n \r\n statusElement = oDetail.getElementsByTagName(\"status\");\r\n\t\t\tstatus = statusElement[0].childNodes[0].data;\r\n\t\t\tcustomerDetail.rows[4].cells[1].innerHTML = status;\r\n\t\t\t\r\n }\r\n }", "title": "" }, { "docid": "2dc75ec8e0bbc243a38ca0bd0a14d65d", "score": "0.5601795", "text": "function displayRegularOrder(orderAttributes) {\n var modifyOrderId = $(\"#orderToModifyId\").get(0);\n orderModifyState = true;\n modifyOrderId.value = orderAttributes.orderName;\n var orderTypeSelector = $(\"#orderType\").get(0);\n $(\"#qty\").get(0).value = orderAttributes.qty;\n //In proto side starts from 1 --> (orderAttributes.side-1)\n $(\"#side\").get(0).selectedIndex = orderAttributes.side - 1;\n //In proto order_type starts from 1 --> (orderAttributes.order_type-1)\n orderTypeSelector.selectedIndex = orderAttributes.order_type - 1;\n $(\"#execInstruction\").get(0).selectedIndex = orderAttributes.exec_instruction;\n var durationSelector = $(\"#duration\").get(0);\n //In proto duration starts from 1 --> (orderAttributes.duration-1)\n durationSelector.selectedIndex = orderAttributes.duration - 1;\n var orderAccountSelector = $(\"#orderAccounts\").get(0);\n orderAccountSelector.selectedIndex = -1;\n for (var i = 0; i < orderAccountSelector.options.length; ++i) {\n if (orderAccountSelector.options[i].value == orderAttributes.account_id) {\n orderAccountSelector.selectedIndex = i;\n }\n }\n var orderTypeStr = orderTypeSelector.options[orderTypeSelector.selectedIndex].text;\n $(\"#limitPrice\").get(0).value = (orderTypeStr == \"LMT\" || orderTypeStr == \"STL\") ? orderAttributes.limit_price : \"\";\n $(\"#stopPrice\").get(0).value = (orderTypeStr == \"STP\" || orderTypeStr == \"STL\") ? orderAttributes.stop_price : \"\";\n $(\"#trailingPeg\").get(0).value = (orderAttributes.trailing_peg) ? orderAttributes.trailing_peg : \"\";\n $(\"#trailOffset\").get(0).value = (orderAttributes.trail_offset) ? orderAttributes.trail_offset : \"\";\n $(\"#visibleQty\").get(0).value = (orderAttributes.visible_qty) ? orderAttributes.visible_qty : \"\";\n $(\"#minVisibleQty\").get(0).value = (orderAttributes.min_visible_qty) ? orderAttributes.min_visible_qty : \"\";\n $(\"#triggerQty\").get(0).value = (orderAttributes.trigger_qty) ? orderAttributes.trigger_qty : \"\";\n enableOrderControlsForModify();\n orderAccountSelector.disabled = false;\n $(\"#orderInstruments\").get(0).disabled = false;\n orderTypeSelector.disabled = false;\n $(\"#side\").get(0).disabled = false;\n toggleFormView(false);\n}", "title": "" }, { "docid": "9699d569ce1d0bf87fe66468a78a582b", "score": "0.56003845", "text": "function showFullDetails(id) {\n var item = document.getElementById(id); // get list item\n var fullDetails = item.getElementsByClassName('full-details')[0]; // get details section\n\n if(fullDetails != undefined) {\n if(fullDetails.style.display == 'none') {\n fullDetails.style.display = 'block';\n item.title = \"click to hide details\";\n }\n else {\n fullDetails.style.display = 'none';\n item.title = \"click to show details\";\n }\n }\n}", "title": "" }, { "docid": "01e720495a9583a497f5e9ccab59c2f8", "score": "0.55977124", "text": "function showDetails(food) {\n $(document).on('click', '.list-group-item', function() {\n var name = food.name;\n var image = $('<img class=\"food-picture\" width=\"200px\">');\n image.attr('src', food.imageUrl);\n\n $('h5').html(name);\n $('.modal-body').html(image);\n $('.modal').modal('show');\n });\n }", "title": "" }, { "docid": "6a4157cfed07775dfb3659f9d4062588", "score": "0.55973524", "text": "function triggerQuoteAggiornate(flagIvaDisponibile) {\n var li = $(\"a[href='#tabDatiIva']\").parent(\"li\");\n var div =$(\"#tabDatiIva\");\n $(document).trigger(\"quoteAggiornate\");\n if(flagIvaDisponibile) {\n li.removeClass(\"hide\");\n div.removeClass(\"hide\");\n } else {\n li.addClass(\"hide\");\n div.addClass(\"hide\");\n }\n }", "title": "" }, { "docid": "65033eb4a6fede9e0586c5667b6f1e1d", "score": "0.559118", "text": "function detailLinkClick(id){\n console.log(id);\n // call this function to update the studentDetail div\n\t\tgetStudentDetail(id);\n\t\t var studentList = $('#studentDataTable');\n\t\t studentList.css('display','none');\n\n\t}", "title": "" }, { "docid": "c6103cb4abf8e222b594bd349f61d6ee", "score": "0.55891436", "text": "detailClickHandler(){\n\n $(document).on(\"click\", \".detail\" , (e)=> {\n e.stopImmediatePropagation();\n\n let id = $(e.currentTarget).parent().attr('id');\n liste = this.getListById(Number(id));\n\n $(\".normal\").addClass(\"hide\");\n $(\".detailview\").removeClass(\"hide\");\n\n $(\".toggleView\").addClass(\"hide\");\n\n $(\".alertErrorStat\").addClass(\"hide\");\n $(\".alertSucc\").addClass(\"hide\");\n $(\".alertError\").addClass(\"hide\");\n $(\".alertSuccTaken\").addClass(\"hide\");\n $(\".alertDetailEdit\").addClass(\"hide\");\n\n this.initDetailView(liste);\n\n //clickhandler detailview\n this.takeListeDetailClickHandler();\n this.alertDetailClickHandler();\n this.editDetailviewClickHandler();\n\n if(initDetail){\n this.abschickenListeDetailClickHandler();\n this.addArtikelClickhandler();\n this.deleteListeDetailClickHandler();\n this.detailViewBackClickHandler();\n this.deleteArtikelDetailClickHandler();\n initDetail = false;\n }\n\n });\n }", "title": "" }, { "docid": "4cd7eeac41a63b92899d9080a09dccbc", "score": "0.5585742", "text": "function showSteps(e) {\n var showDetail = e.target.getAttribute('data-show-detail');\n if (showDetail == 0) { // hide detail.\n $('#steps').html('');\n } else { // show detail.\n if (recipe.stepsLoaded) {\n $('#steps').html(recipe.stepsHTML);\n } else {\n let recipeId = e.target.getAttribute('data-recipe-id');\n loadSteps(recipeId);\n }\n }\n e.target.setAttribute('data-show-detail', showDetail == 0 ? 1 : 0); // flip the showDetail flag.\n e.preventDefault();\n}", "title": "" }, { "docid": "d18d1ce8ed0c06a37ce6f90bce81b622", "score": "0.558542", "text": "deleteListeDetailClickHandler(){\n $(document).on(\"click\", \".detailDelete\" , (e)=> {\n let id = liste.id;\n\n if (confirm('Möchtest du die Liste wirklich löschen ?')) {\n\n this.removeList(id);\n $(\".normal\").removeClass(\"hide\");\n $(\".detailview\").addClass(\"hide\");\n\n $(\".grid\").empty();\n this.printListList();\n }\n });\n }", "title": "" }, { "docid": "4304b84ed8b6d044bfd92a06dc228b04", "score": "0.55816853", "text": "function previewOrder() {\n processDeliveryInfo(); \n processCookie();\n findTotal();\n document.querySelector(\"section\").style.display = \"block\"; // method returns 1st occurance of section element which is deliver to\n document.getElementById(\"deliverTo\").style.display = \"block\"; // method returns deliverTo div id under Order Information section \n }", "title": "" }, { "docid": "0b2d1b4bd3cec3c3a09b672673079c52", "score": "0.55808055", "text": "function showOrderTable() {\n document.getElementById(\"order_table\").style.display = \"block\";\n}", "title": "" }, { "docid": "7c9fd310e1859fcbda8b4bd5a82212ef", "score": "0.55799097", "text": "showProduto(idProduto){\r\n\r\n\r\n }", "title": "" }, { "docid": "0f038e469100f8d9cbc0094192a91819", "score": "0.55781955", "text": "function goDetail(e) {\n\tvar detailModel = Alloy.Collections.cm_property.get(e.row.propertyId);\n\t\n\tvar propertyDetailController = Alloy.createController('propertyDetail', {\n\t\t$model : detailModel,\n\t\tpropertyId: e.row.propertyId\n\t});\n\t\n\tAlloy.Globals.tabGroup.activeTab.open(propertyDetailController.getView());\n}", "title": "" }, { "docid": "d6b65982315678fcda00c46e09bdb5f0", "score": "0.5575092", "text": "async function display_order_status(orderID) {\n display_new_order_for_washer(orderID);\n document.getElementById(\"overlay_washer_order\").style.display = \"block\";\n}", "title": "" }, { "docid": "6c9f031de2ab50823ddb7e9ff8362e14", "score": "0.55742925", "text": "function doDeleteOrder(element){\n\t //start\n\t var record = element.id.split('@');\n\t var id = record[0];\n\t var id2 = record[1];\n\t id = id.replace(\"id_\",\"\");\n\t id2 = id2.replace(\"id2_\",\"\");\n\t \n\t \t//Start dialog\n\t \tjq('<div></div>').dialog({\n\t modal: true,\n\t title: \"Slett Godsnr. \" + id + \" - Transittnr \" + id2,\n\t width: 500,\n\t buttons: {\n\t\t Fortsett: function() {\n\t \t\tjq( this ).dialog( \"close\" );\n\t\t //do delete\n\t \t\tsetBlockUI();\n\t\t window.location = \"godsno_delete.do?gogn=\" + id + \"&gotrnr=\" + id2;\n\t\t \n\t\t },\n\t\t Avbryt: function() {\n\t\t jq( this ).dialog( \"close\" );\n\t\t }\n\t },\n\t open: function() {\n\t\t \t\t var markup = \"Er du sikker på at du vil slette denne?\";\n\t\t jq(this).html(markup);\n\t\t //make Cancel the default button\n\t\t jq(this).siblings('.ui-dialog-buttonpane').find('button:eq(1)').focus();\n\t\t }\n\t\t}); //end dialog\n }", "title": "" }, { "docid": "18d08060049756625e74d48c3a1dc037", "score": "0.5573732", "text": "function gtm_fsonline_product_detail () {\n // console.log('gtm_fsonline_product_detail');\n\n var $odoo_product_page = $(\"#product_detail\");\n\n if ($odoo_product_page.length) {\n var odoo_product_detail = get_odoo_product_details_for_gtm($odoo_product_page);\n // Measure a view of product details. This example assumes the detail view occurs on pageload,\n // and also tracks a standard pageview of the details page.\n let event_data = {\n 'event': 'fsonline.product_detail',\n 'ecommerce': {\n 'detail': {\n //'actionField': {'list': 'Apparel Gallery'}, // 'detail' actions have an optional list property.\n 'products': [odoo_product_detail]\n }\n }\n };\n push_to_datalayer(event_data)\n }\n}", "title": "" }, { "docid": "f237b0758c895d292801f5e63af5ba48", "score": "0.55685973", "text": "function enableOrderClick(highlight = true) {\n $('.order-id a').click(function() {\n if (highlight) $('tr').removeClass('info');\n\n var tr = $(this).closest('tr');\n var orderId = tr.data('order-id');\n\n if (highlight) tr.addClass('info');\n\n var modal = new bte.OrderInfoModal(orderId);\n modal.show();\n });\n}", "title": "" }, { "docid": "1a042c7bacd06bbee9e59e0e9ead22ed", "score": "0.55623794", "text": "function visDetaljer(detaljer) {\n console.log(\"02-detalje.html\");\n location.href = `upcoming-detaljer.html?id=${detaljer._id}`;\n}", "title": "" }, { "docid": "937edc162cd980378bea0df9d4b494a6", "score": "0.55492127", "text": "function showDesc(){\n\t\t$(\".desc_td\").toggle();\n}", "title": "" }, { "docid": "24e481b28b5afe322423df34df4668e2", "score": "0.5548611", "text": "function getOrderInfo(item) {\n var order = {};\n order.OrderId = item.order_id.S;\n order.Table = item.table.N;\n order.MenuItem = item.menu_item.S;\n order.Fulfill = \"<button type=\\\"button\\\" id=\" + order.OrderId + \" onclick=\\\"fulfillOrder(this.id)\\\">Order Up!</button>\"\n return order;\n}", "title": "" }, { "docid": "766e4d212e9e91de04882a43133d8938", "score": "0.554729", "text": "function showForm() {\n setAddQuote(!addQuote);\n }", "title": "" }, { "docid": "53adb78a6b177b6e226e32f0bdc239d9", "score": "0.5544292", "text": "function showInfo(e) {\n const { children: [title, pre] } = document.getElementById(\"info\");\n const data = JSON.stringify(e.data.node.details, null, 2);\n title.innerText = e.data.node.label;\n pre.innerText = data ? data : 'No addition data';\n }", "title": "" }, { "docid": "d13eb0cbb15578971ae420a62ab00297", "score": "0.55417526", "text": "function handleOpenClick(clickedContact){\n setDetailedContact(clickedContact);\n setRenderDetails(true);\n }", "title": "" }, { "docid": "78e986dddaf4af7cb4949a66074a1574", "score": "0.55352074", "text": "function fill_Details_Modal(order, role) {\n $(\"#budgetholder_list\").empty();\n let details = \"<div class='row'><div class='col-sm-3'><b>Order ID</b></div><div class='col-sm-9'>\" + order.orderId + \"</div></div><hr />\" +\n \"<div class='row'><div class='col-sm-3'><b>Item name</b></div><div class='col-sm-9'>\" + order.item_name + \"</div></div><hr />\" +\n \"<div class='row'><div class='col-sm-3'><b>Insertion Date</b></div><div class='col-sm-9'>\" + order.insertion_date + \"</div></div><hr />\" +\n \"<div class='row'><div class='col-sm-3'><b>Item cost</b></div><div class='col-sm-9'>&#xa3;\" + order.price + \"</div></div><hr />\" +\n \"<div class='row'><div class='col-sm-3'><b>Estimated Days</b></div><div class='col-sm-9'>\" + order.estimated_delivery + \"</div></div><hr />\" +\n \"<div class='row'><div class='col-sm-3'><b>Staff name</b></div><div class='col-sm-9'>\" + order.staff_name + \"</div></div><hr />\" +\n \"<div class='row'><div class='col-sm-3'><b>Rationale</b></div><div class='col-sm-9'>\" + order.rationale + \"</div></div><hr />\" +\n \"<div class='row'><div class='col-sm-3'><b>Status</b></div><div class='col-sm-9'>\" + order.status + \"</div></div><hr />\" +\n \"<div class='row'><div class='col-sm-3'><b>Message</b></div><div class='col-sm-9'>\" + order.message + \"</div></div>\";\n\n if (order.status === \"Processing\") {\n //Displaying Appropriate message based on the dates and count of estimated delivary days (Only need to do this for orders in \"Processing State\"\n let days_count = order.days_count;\n let estimated_delivery = order.estimated_delivery;\n if (days_count > estimated_delivery) {\n details += \"<hr /> <div class='row'><div class='col-sm-3'><b>Remaining Days</b></div><div class='col-sm-9' style='color: red'>Order is over expected delivery date!</div></div>\";\n } else {\n details += \"<hr /> <div class='row'><div class='col-sm-3'><b>Remaining Days</b></div><div class='col-sm-9'>\" + (order.estimated_delivery - order.days_count) + \"</div></div>\";\n }\n }\n\n let footer = \"\";\n\n if (role === \"Requisitioner\") {\n if (order.status === \"Processing\") {\n footer += \"<button class='btn btn-success' id='receiveBtn'>Order Received</button>\";\n if (order.estimated_delivery <= order.days_count) {\n footer += \"<button class='btn btn-primary' id='renewBtn'>Renew Order</button><button class='btn btn-danger' id='cancelBtn'>Cancel Order</button>\";\n }\n }\n } else if (role === \"BudgetHolder\") {\n //details += \"<div class='row'><div class='col-sm-3'><b>Message</b></div><div class='col-sm-9'><textarea rows='4' id='bholder_message' placeholder='Reason to approve/reject'></textarea></div></div><hr />\";\n if (order.status === \"Inserted\") {\n footer += \"<button class='btn btn-success' id='bapproveBtn'>Approve Order</button><button class='btn btn-danger' id='brejectBtn'>Reject Order</button>\";\n }\n } else if (role === \"PurchasingOfficer\") {\n if (order.status === \"Approved\") {\n footer += \"<button class='btn btn-success' id='papproveBtn'>Approve Order</button><button class='btn btn-danger' id='prejectBtn'>Reject Order</button>\";\n }\n }\n\n $(\"#order_details\").empty();\n $(\"#order_details\").html(details);\n $(\"#order_footer\").html(footer);\n $(\"#order_modal\").modal();\n}", "title": "" }, { "docid": "f352b6a0942ae3e76b021e7cc3f98f6a", "score": "0.5529536", "text": "function displayFormaledu() {\n\t\t\tvar selectItem2;\n\t\t\tselectItem2 = $(\".item-box:eq(1)\");\n\n\t\t\tselectItem2.click(function() {\n\t\t\t\tvar basicSelect, selectDisplay2, scrollStart, targetDisplay2;\n\t\t\t\tbasicSelect = $(\"#itemsDisplay\");\n\t\t\t\tselectDisplay2 = basicSelect.children().filter(\":eq(1)\");\n\t\t\t\tscrollStart = $(\"html, body\");\n\t\t\t\ttargetDisplay2 = selectDisplay2.find(\"h1\");\n\n\t\t\t\tselectDisplay2.attr(\"style\", \"display: block\");\n\n\t\t\t\tscrollStart.animate({\n\t\t\t\t\tscrollTop: targetDisplay2.get(0).offsetTop\n\t\t\t\t}, 1200);\n\t\t\t});\n\n\t\t}", "title": "" }, { "docid": "cbdc7f6e1e4025942c25d9954d5a9682", "score": "0.5514425", "text": "function showDetails(lang) {\n $('.exp-show').click(function(e) {\n e.preventDefault();\n\n const hideDetails = $(this).parent().hasClass('timeline-panel-close');\n if(hideDetails) $(this).parent().removeClass('timeline-panel-close');\n else $(this).parent().addClass('timeline-panel-close');\n\n let el = $(this).text();\n if(lang ==='es'){\n el = el === \"Más detalles...\" ? \"Ocultar...\" : \"Más detalles...\";\n }\n else{\n el = el === \"More details...\" ? \"Hide...\" : \"More details...\";\n }\n $(this).html(`<p class=\"exp-show\"><strong>${el}</strong></p>`);\n $(this).prev().toggle();\n });\n}", "title": "" }, { "docid": "c6da7709e65cc64f3b833e72d1bffb11", "score": "0.5508642", "text": "function handleClick() {\n console.log('clicked')\n setOrder((curOrder)=>{\n if(curOrder === 'desc'){\n return 'asc'\n } else {\n return 'desc'\n }\n })\n }", "title": "" }, { "docid": "00326681a9ea2f456882a3ca76ed6e7a", "score": "0.5505093", "text": "function clickDownOnEntity(id, event) {\n if (event.button === \"Primary\") {\n sendTip(hfcAmount, destinationName, message);\n }\n }", "title": "" }, { "docid": "24b0626bd37fa758f83948afba58a34f", "score": "0.5504204", "text": "function doDetallesObra(){\r\n\tif ( $('obraDetails').getStyle('display')=='inline-block' )\r\n\t\t$('obraDetails').setStyle({'display':'none'});\r\n\telse {\r\n\t\t$('obraDetails').setStyle({'display':'inline-block'});\r\n\t\tEffect.Shake($('obraDetails'));\r\n\t}\r\n\treturn false;\r\n}", "title": "" }, { "docid": "1ab5a8c2611ec8805e73bedf464e6666", "score": "0.5487876", "text": "function open_model_info() {\n\t\t$modelInfo.addClass('expanded');\n\t\t$modelInfoDetails.css({ 'height': $modelInfoDetailsContents.outerHeight() });\n\t}", "title": "" }, { "docid": "d437ab3bea39abaeaf1687eab411cbcd", "score": "0.5485884", "text": "function showDetails() {\n\tremoveClass(\".options-sub\", \"show\");\n\tremoveClass(\".details-nav-li\", \"active-li\");\n\tid(\"details-menu\").classList.add(\"active-li\");\n\tid(\"details-box\").classList.add(\"show\");\n}", "title": "" }, { "docid": "022e997985b0ec8251dd1c2ad2ccc951", "score": "0.5481217", "text": "function onItemclick(e) {\n\tlog.args('Ti.UI.ListView:itemclick', e);\n\n\t// The item's special itemId property is the model ID we need\n\t// See pictures.js for the implementation of openDetails()\n\tAlloy.Globals.openDetails(e.itemId);\n}", "title": "" }, { "docid": "dcc95aa5607c8438717ba005cd3a116f", "score": "0.54801714", "text": "function toggleDone(e) {\n console.log('heyy');\n\n if (e.target.matches('.view-btn')) {\n const customerID = e.target.parentElement.id;\n\n customerDesc.innerHTML = '';\n\n customerData.forEach(customer => {\n if (customerID === customer.id) {\n let template = `<div class=\"customer-detail-number\">\n <h2>${customer.id}</h2>\n </div>\n <div class=\"customer-data\">\n <div class=\"customer-name customer\">\n <p>Name </p>\n <p>${customer.firstname} ${customer.lastname}</p>\n </div>\n <hr>\n <div class=\"customer-email customer\">\n <p>Email</p>\n <p>${customer.email}</p>\n </div>\n <hr>\n <div class=\"customer-mobile-number customer\">\n <p>Mobile Number</p>\n <p>${customer.phone}</p>\n </div>\n <hr>\n <div class=\"customer-location customer\">\n <p>Location</p>\n <p>${customer.state}</p>\n </div>\n <hr>\n <div class=\"customer-project customer\">\n <p>Project</p>\n <p>${customer.project}</p>\n </div>\n <hr>\n <div class=\"customer-amount-paid customer\">\n <p>Money paid</p>\n <p>&#8358 ${customer.money}</p>\n </div>\n\n </div>`;\n\n customerDesc.insertAdjacentHTML('beforeend', template);\n }\n });\n customerDetail.style.display = 'flex';\n }\n}", "title": "" }, { "docid": "eebeb639d367e62abc858ae54162638f", "score": "0.547694", "text": "function handleClick(card) {\n setItemDetails(card)\n }", "title": "" }, { "docid": "795022d0931073d7770185e66cc7d971", "score": "0.5465181", "text": "function orderOutput () {\n $('.order-output').show();\n $('.name').text('Name on order ' + pizzaName);\n $('.pizza-size').text('You ordered a ' + pizzaSize);\n $('.pizza-toppings').text('Your toppings include ' + pizzaToppings + ' ');\n if (specialRequest !== '') {\n $('.special-request').text('Your request is: ' + specialRequest);\n } else {\n $('.special-request').css('display', 'none');\n };\n } //End of orderOutput function", "title": "" }, { "docid": "b949b4904e8d99c57b0598c8778d4b84", "score": "0.5450793", "text": "function mock_order_detail(opt) {\n logger.debug('generating mock_order detail...');\n const order = opt.data;\n\n return {\n track_id: '1463392269236/executor/YESBANK',\n order_detail: {\n order_id: order.order_id,\n exchange_order_id: '511220371736111',\n user_id: 'AB0012',\n status: 'COMPLETE',\n tradingsymbol: order.tradingsymbol,\n exchange: 'NSE',\n transaction_type: order.transaction_type,\n average_price: order.ltp,\n price: order.ltp,\n quantity: order.quantity,\n filled_quantity: order.quantity,\n trigger_price: 0,\n status_message: '',\n order_timestamp: (new Date()).toISOString(),\n checksum: '5aa3f8e3c8cc41cff362de9f73212e28',\n },\n };\n}", "title": "" }, { "docid": "572ff81ca699a20463acf6a75da27ecb", "score": "0.5445515", "text": "function showIngredients(e) {\n var showDetail = e.target.getAttribute('data-show-detail');\n if (showDetail == 0) { // hide detail.\n $('#ingredients').html('');\n } else { // show detail.\n if (recipe.ingredientsLoaded) {\n $('#ingredients').html(recipe.ingredientsHTML);\n } else {\n let recipeId = e.target.getAttribute('data-recipe-id');\n loadIngredients(recipeId);\n }\n }\n e.target.setAttribute('data-show-detail', showDetail == 0 ? 1 : 0); // flip the showDetail flag.\n e.preventDefault();\n}", "title": "" }, { "docid": "7f70a6bbd0a291cecc1995a2992d7beb", "score": "0.54363585", "text": "function showHideDetails(group) {\r\n switch (group) {\r\n case \"ef\":\r\n fillEfInfo(1);\r\n break;\r\n case \"cog\":\r\n fillContactInfo();\r\n break;\r\n case \"nni\":\r\n fillNNIInfo();\r\n break;\r\n case \"quote\":\r\n fillQuoteInfo();\r\n break;\r\n }\r\n\r\n raiseDetails(true, group);\r\n}", "title": "" }, { "docid": "30074f1f1db72327615a9784d81983c5", "score": "0.5433592", "text": "function visDetaljer(hvad) {\n location.href = `lande_singleview.html?id=${hvad._id}`;\n}", "title": "" }, { "docid": "be96d4496eaf9278533ca7b96b3a8558", "score": "0.5429711", "text": "function arrangeMoreInfo(details) {\n const moreInfoObj = {\n coinId: details.id,\n coinImage: details.image.thumb,\n coinUsd: details.market_data.current_price.usd,\n coinEur: details.market_data.current_price.eur,\n coinIls: details.market_data.current_price.ils\n };\n printMoreInfo(moreInfoObj);\n saveToLocalStorage(`#moreInfoButton_${moreInfoObj.coinId}`, moreInfoObj);\n setTimerToRemoveData(`#moreInfoButton_${moreInfoObj.coinId}`);\n }", "title": "" }, { "docid": "3459b63ecacf838e9d4cf9bdc264dd8f", "score": "0.5427403", "text": "function moreInfo(which){\n let dataP = dataProducts();\n\n moreInfoDom(which, dataP);\n\n}", "title": "" }, { "docid": "32366d45aeecc61bf59b9bf5238ef0a9", "score": "0.54247093", "text": "function setupOrderPeek() {\n\t// hide template table\n\t$(\".ordertemplate\").hide();\n\t$(\".detailtemplate\").hide();\n\tloadorders();\n}", "title": "" }, { "docid": "bd23165363f3e5db1f108fd66c0ca4b4", "score": "0.5422246", "text": "function openDerRelationDetail(deName, deID, derType)\n {\n document.SearchActionForm.acID.value = deID;\n document.SearchActionForm.searchComp.value = deName; //de Name for DDE\n document.SearchActionForm.itemType.value = derType; //de Name for DDE\n document.SearchActionForm.isValidSearch.value = \"false\";\n if (detailWindow && !detailWindow.closed)\n detailWindow.close();\n var windowW = screen.width - 760;\n detailWindow = window.open(\"jsp/DerivedDEWindow.jsp\", \"DerivedDE\", \"width=750,height=620,top=0,left=\" + windowW + \",resizable=yes,scrollbars=yes\");\n }", "title": "" }, { "docid": "231dbfeb49b46033c2f0481e2154e9ec", "score": "0.54188615", "text": "function getMealDetails(e) {\n\te.preventDefault();\n\tif (e.target.classList.contains('details-btn')) {\n\t\tlet mealItem = e.target.parentElement.parentElement;\n\t\tfetch(\n\t\t\t`https://www.themealdb.com/api/json/v1/1/lookup.php?i=${mealItem.dataset.id}`\n\t\t)\n\t\t\t.then((response) => response.json())\n\t\t\t.then((data) => mealDetailsModal(data.meals));\n\t}\n}", "title": "" }, { "docid": "74e36fe075e790579fded0c5cba6565d", "score": "0.54073066", "text": "function showDetail(){\n document.addEventListener('click', function(e) {\n e = e || window.event;\n var target = e.target || e.srcElement;\n if(target.value){\n plainUrl = target.value.replace('http', 'https');\n } \n getPlanet(plainUrl)\n }, false);\n modal.style.display = 'block';\n}", "title": "" }, { "docid": "3abe63f86471da9c16ecfbe5ab217960", "score": "0.540638", "text": "function viewTransaction(id, url) {\n\t\t\t\n\t\t\t\n\t\t\t//CHECK IF EMPTY, DONT PROCEED\n\t\t\tif(id === '' || url === ''){\n\t\t\t\t$( \"#load\" ).hide();\n\t\t\t\treturn;\n\t\t\t}\t\n\t\t\t\t\t\n\t\t\t$( \"#load\" ).show();\n\n\t\t\tvar dataString = { \n\t\t\t\tid : id\n\t\t\t};\t\t\t\t\n\t\t\t$.ajax({\n\t\t\t\t\n\t\t\t\ttype: \"POST\",\n\t\t\t\turl: baseurl+\"\"+url,\n\t\t\t\tdata: dataString,\n\t\t\t\tdataType: \"json\",\n\t\t\t\tcache : false,\n\t\t\t\tsuccess: function(data){\n\n\t\t\t\t\tif(data.success == true){\n\t\t\t\t\t\t$( \"#load\" ).hide();\n\n\t\t\t\t\t\t$(\"#headerTitle\").html(data.headerTitle);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$(\"#view-details\").html(data.details);\n\t\t\t\t\t\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$( \"#load\" ).hide();\n\t\t\t\t\t\t$(\"#headerTitle\").html('Errors!');\n\t\t\t\t\t} \t \n\t\t\t\t\t\t \n\t\t\t\t},error: function(xhr, status, error) {\n\t\t\t\t\t$( \"#load\" ).hide();\n\t\t\t\t\talert(error);\n\t\t\t\t},\n\n\t\t\t});\t\t\t\t\t\n\t\t}", "title": "" } ]
c4151d9497c421d96aa87eaf68a6aedd
Private functions. Execute named callbacks defined in the global (window) scope.
[ { "docid": "59a0e753b2d6c21f5012d76e9178762f", "score": "0.6058824", "text": "function execCallback(callbackName, arg) {\n // Callback functions are defined in the global scope. Check for\n // the existence of the named callback function on the window object.\n if (!callbackName in window) {\n // The specified callback does not exist.\n return;\n }\n\n // Callback found, execute it.\n window[callbackName](arg);\n }", "title": "" } ]
[ { "docid": "35ed951e384356f4bd3f0bf4d6af4fcf", "score": "0.6584059", "text": "setupCallbacks() {\n var key, fn;\n var callbacks = {\n 'initialize': 'onInitialize',\n 'change': 'onChange',\n 'item_add': 'onItemAdd',\n 'item_remove': 'onItemRemove',\n 'clear': 'onClear',\n 'option_add': 'onOptionAdd',\n 'option_remove': 'onOptionRemove',\n 'option_clear': 'onOptionClear',\n 'optgroup_add': 'onOptionGroupAdd',\n 'optgroup_remove': 'onOptionGroupRemove',\n 'optgroup_clear': 'onOptionGroupClear',\n 'dropdown_open': 'onDropdownOpen',\n 'dropdown_close': 'onDropdownClose',\n 'type': 'onType',\n 'load': 'onLoad',\n 'focus': 'onFocus',\n 'blur': 'onBlur'\n };\n\n for (key in callbacks) {\n fn = this.settings[callbacks[key]];\n if (fn) this.on(key, fn);\n }\n }", "title": "" }, { "docid": "165738e037bd8e66d1f7d91384709084", "score": "0.65661865", "text": "runCallbacks(event, data, requestInfo, additionalData) {\n let callbacksToRun = this.callbacks[event];\n\n if (callbacksToRun) {\n for (let callback of callbacksToRun) {\n callback(data, requestInfo, additionalData);\n }\n }\n }", "title": "" }, { "docid": "8552898cf159b9da049956b9384d06d6", "score": "0.65194595", "text": "runCallbacks(callbacks, args) {\r\n for (let i = 0; i < callbacks.length; i++) {\r\n if (typeof callbacks[i] !== 'function') continue;\r\n callbacks[i].apply(null, args);\r\n }\r\n }", "title": "" }, { "docid": "b9d5e6f547cc3b4b52565f7428a67530", "score": "0.63965374", "text": "function assignCallbacks() {\n $('[class*=\"dlg-callback-\"]').each(function() {\n var control = $(this).context;\n\n // If an onclick attribute is already defined for the element,\n // don't attach a new one.\n // This is the case when the developer wants to call their custom\n // callback, that e.g. sends some form data too.\n // REVIEW: Should perhaps also detect event listeners here?\n if (control.getAttribute('onclick')) return;\n\n var action = control.className.match(/dlg-callback-(\\S+)/)[1];\n var func = sketchup[action];\n if (typeof func === 'function') {\n console.log('Assign SU callback \\''+action+'\\' to control \\''+control+'\\'.')\n // Wrap callback in anonymous method to prevent event from being sent\n // as parameter. This seemed to cause infinite loop as it froze the\n // dialog.\n // TODO: Maybe send hash of data in all named fields? If so, document\n // how to get vars into fields in the first palce.\n $(control).click( { func: func }, function(e) { func() });\n } else {\n console.warn('Missing SU callback \\''+action+'\\'.');\n }\n });\n }", "title": "" }, { "docid": "887c83d8c7212c457c2ae106fd276fec", "score": "0.6386493", "text": "function _fireReadyEventCallbacks() {\n _callbacks.ready.forEach(function(callback) {\n callback();\n });\n }", "title": "" }, { "docid": "db80efac2d274e7ea3c701b7591de49f", "score": "0.63799155", "text": "function executeCallbacks(){\n\t\t\t\t\t\tcallbacks[lib].forEach(function(cb) {\n\t\t\t\t\t\t\tcb();\n\t\t\t\t\t\t});\n\t\t\t\t\t\tloading[lib].status = 1;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}", "title": "" }, { "docid": "c08948b8b7c8f298d13d127a39b4dde2", "score": "0.6346099", "text": "registerCallbacks(callbacks) {\n for (var eventType in callbacks) {\n this.on(eventType, callbacks[eventType]);\n }\n }", "title": "" }, { "docid": "8dba885c1cd4cb1d2aa0ea430fa79788", "score": "0.631933", "text": "function executeCallbacks() {\n while (callbacks.length > 0) {\n var callback = callbacks.shift();\n callback();\n }\n}", "title": "" }, { "docid": "9b70344b6e3da7fc3641fd185a4ade9d", "score": "0.62226933", "text": "static performCallbacks(callbacks) {\n // This is my method of getting all the arguments except for the list of callbacks\n const args = Array.prototype.slice.call(arguments, 1);\n callbacks.forEach((callback) => {\n // To use the arguments I have to use the apply method of the function\n callback(...args);\n });\n }", "title": "" }, { "docid": "dd89ad54f14a758d8992ffa444f17fe7", "score": "0.61754763", "text": "setCallbacks() {\n const that = this;\n // Declare the Interactive Canvas action callbacks.\n const callbacks = {\n onUpdate(data) {\n that.commands[data.state ? data.state.toUpperCase() : 'DEFAULT'](data);\n },\n };\n // Called by the Interactive Canvas web app once web app has loaded to\n // register callbacks.\n this.canvas.ready(callbacks);\n }", "title": "" }, { "docid": "cd96fe41f83d25463e299ac43e3c0437", "score": "0.6166783", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.pop();\n var func = callback.func;\n if (typeof func === 'number') {\n func = FUNCTION_TABLE[func];\n }\n func(callback.arg === undefined ? null : callback.arg);\n }\n}", "title": "" }, { "docid": "cd96fe41f83d25463e299ac43e3c0437", "score": "0.6166783", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.pop();\n var func = callback.func;\n if (typeof func === 'number') {\n func = FUNCTION_TABLE[func];\n }\n func(callback.arg === undefined ? null : callback.arg);\n }\n}", "title": "" }, { "docid": "cd96fe41f83d25463e299ac43e3c0437", "score": "0.6166783", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.pop();\n var func = callback.func;\n if (typeof func === 'number') {\n func = FUNCTION_TABLE[func];\n }\n func(callback.arg === undefined ? null : callback.arg);\n }\n}", "title": "" }, { "docid": "cd96fe41f83d25463e299ac43e3c0437", "score": "0.6166783", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.pop();\n var func = callback.func;\n if (typeof func === 'number') {\n func = FUNCTION_TABLE[func];\n }\n func(callback.arg === undefined ? null : callback.arg);\n }\n}", "title": "" }, { "docid": "cd96fe41f83d25463e299ac43e3c0437", "score": "0.6166783", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.pop();\n var func = callback.func;\n if (typeof func === 'number') {\n func = FUNCTION_TABLE[func];\n }\n func(callback.arg === undefined ? null : callback.arg);\n }\n}", "title": "" }, { "docid": "cd96fe41f83d25463e299ac43e3c0437", "score": "0.6166783", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.pop();\n var func = callback.func;\n if (typeof func === 'number') {\n func = FUNCTION_TABLE[func];\n }\n func(callback.arg === undefined ? null : callback.arg);\n }\n}", "title": "" }, { "docid": "cd96fe41f83d25463e299ac43e3c0437", "score": "0.6166783", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.pop();\n var func = callback.func;\n if (typeof func === 'number') {\n func = FUNCTION_TABLE[func];\n }\n func(callback.arg === undefined ? null : callback.arg);\n }\n}", "title": "" }, { "docid": "cd96fe41f83d25463e299ac43e3c0437", "score": "0.6166783", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.pop();\n var func = callback.func;\n if (typeof func === 'number') {\n func = FUNCTION_TABLE[func];\n }\n func(callback.arg === undefined ? null : callback.arg);\n }\n}", "title": "" }, { "docid": "cd96fe41f83d25463e299ac43e3c0437", "score": "0.6166783", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.pop();\n var func = callback.func;\n if (typeof func === 'number') {\n func = FUNCTION_TABLE[func];\n }\n func(callback.arg === undefined ? null : callback.arg);\n }\n}", "title": "" }, { "docid": "cd96fe41f83d25463e299ac43e3c0437", "score": "0.6166783", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.pop();\n var func = callback.func;\n if (typeof func === 'number') {\n func = FUNCTION_TABLE[func];\n }\n func(callback.arg === undefined ? null : callback.arg);\n }\n}", "title": "" }, { "docid": "cd96fe41f83d25463e299ac43e3c0437", "score": "0.6166783", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.pop();\n var func = callback.func;\n if (typeof func === 'number') {\n func = FUNCTION_TABLE[func];\n }\n func(callback.arg === undefined ? null : callback.arg);\n }\n}", "title": "" }, { "docid": "cd96fe41f83d25463e299ac43e3c0437", "score": "0.6166783", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.pop();\n var func = callback.func;\n if (typeof func === 'number') {\n func = FUNCTION_TABLE[func];\n }\n func(callback.arg === undefined ? null : callback.arg);\n }\n}", "title": "" }, { "docid": "cd96fe41f83d25463e299ac43e3c0437", "score": "0.6166783", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.pop();\n var func = callback.func;\n if (typeof func === 'number') {\n func = FUNCTION_TABLE[func];\n }\n func(callback.arg === undefined ? null : callback.arg);\n }\n}", "title": "" }, { "docid": "cd96fe41f83d25463e299ac43e3c0437", "score": "0.6166783", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.pop();\n var func = callback.func;\n if (typeof func === 'number') {\n func = FUNCTION_TABLE[func];\n }\n func(callback.arg === undefined ? null : callback.arg);\n }\n}", "title": "" }, { "docid": "cd96fe41f83d25463e299ac43e3c0437", "score": "0.6166783", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.pop();\n var func = callback.func;\n if (typeof func === 'number') {\n func = FUNCTION_TABLE[func];\n }\n func(callback.arg === undefined ? null : callback.arg);\n }\n}", "title": "" }, { "docid": "cd96fe41f83d25463e299ac43e3c0437", "score": "0.6166783", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.pop();\n var func = callback.func;\n if (typeof func === 'number') {\n func = FUNCTION_TABLE[func];\n }\n func(callback.arg === undefined ? null : callback.arg);\n }\n}", "title": "" }, { "docid": "cd96fe41f83d25463e299ac43e3c0437", "score": "0.6166783", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.pop();\n var func = callback.func;\n if (typeof func === 'number') {\n func = FUNCTION_TABLE[func];\n }\n func(callback.arg === undefined ? null : callback.arg);\n }\n}", "title": "" }, { "docid": "cd96fe41f83d25463e299ac43e3c0437", "score": "0.6166783", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.pop();\n var func = callback.func;\n if (typeof func === 'number') {\n func = FUNCTION_TABLE[func];\n }\n func(callback.arg === undefined ? null : callback.arg);\n }\n}", "title": "" }, { "docid": "cd96fe41f83d25463e299ac43e3c0437", "score": "0.6166783", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.pop();\n var func = callback.func;\n if (typeof func === 'number') {\n func = FUNCTION_TABLE[func];\n }\n func(callback.arg === undefined ? null : callback.arg);\n }\n}", "title": "" }, { "docid": "cd96fe41f83d25463e299ac43e3c0437", "score": "0.6166783", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.pop();\n var func = callback.func;\n if (typeof func === 'number') {\n func = FUNCTION_TABLE[func];\n }\n func(callback.arg === undefined ? null : callback.arg);\n }\n}", "title": "" }, { "docid": "cd96fe41f83d25463e299ac43e3c0437", "score": "0.6166783", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.pop();\n var func = callback.func;\n if (typeof func === 'number') {\n func = FUNCTION_TABLE[func];\n }\n func(callback.arg === undefined ? null : callback.arg);\n }\n}", "title": "" }, { "docid": "cd96fe41f83d25463e299ac43e3c0437", "score": "0.6166783", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.pop();\n var func = callback.func;\n if (typeof func === 'number') {\n func = FUNCTION_TABLE[func];\n }\n func(callback.arg === undefined ? null : callback.arg);\n }\n}", "title": "" }, { "docid": "cd96fe41f83d25463e299ac43e3c0437", "score": "0.6166783", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.pop();\n var func = callback.func;\n if (typeof func === 'number') {\n func = FUNCTION_TABLE[func];\n }\n func(callback.arg === undefined ? null : callback.arg);\n }\n}", "title": "" }, { "docid": "cd96fe41f83d25463e299ac43e3c0437", "score": "0.6166783", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.pop();\n var func = callback.func;\n if (typeof func === 'number') {\n func = FUNCTION_TABLE[func];\n }\n func(callback.arg === undefined ? null : callback.arg);\n }\n}", "title": "" }, { "docid": "cd96fe41f83d25463e299ac43e3c0437", "score": "0.6166783", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.pop();\n var func = callback.func;\n if (typeof func === 'number') {\n func = FUNCTION_TABLE[func];\n }\n func(callback.arg === undefined ? null : callback.arg);\n }\n}", "title": "" }, { "docid": "cd96fe41f83d25463e299ac43e3c0437", "score": "0.6166783", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.pop();\n var func = callback.func;\n if (typeof func === 'number') {\n func = FUNCTION_TABLE[func];\n }\n func(callback.arg === undefined ? null : callback.arg);\n }\n}", "title": "" }, { "docid": "cd96fe41f83d25463e299ac43e3c0437", "score": "0.6166783", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.pop();\n var func = callback.func;\n if (typeof func === 'number') {\n func = FUNCTION_TABLE[func];\n }\n func(callback.arg === undefined ? null : callback.arg);\n }\n}", "title": "" }, { "docid": "cd96fe41f83d25463e299ac43e3c0437", "score": "0.6166783", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.pop();\n var func = callback.func;\n if (typeof func === 'number') {\n func = FUNCTION_TABLE[func];\n }\n func(callback.arg === undefined ? null : callback.arg);\n }\n}", "title": "" }, { "docid": "cd96fe41f83d25463e299ac43e3c0437", "score": "0.6166783", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.pop();\n var func = callback.func;\n if (typeof func === 'number') {\n func = FUNCTION_TABLE[func];\n }\n func(callback.arg === undefined ? null : callback.arg);\n }\n}", "title": "" }, { "docid": "cd96fe41f83d25463e299ac43e3c0437", "score": "0.6166783", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.pop();\n var func = callback.func;\n if (typeof func === 'number') {\n func = FUNCTION_TABLE[func];\n }\n func(callback.arg === undefined ? null : callback.arg);\n }\n}", "title": "" }, { "docid": "cd96fe41f83d25463e299ac43e3c0437", "score": "0.6166783", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.pop();\n var func = callback.func;\n if (typeof func === 'number') {\n func = FUNCTION_TABLE[func];\n }\n func(callback.arg === undefined ? null : callback.arg);\n }\n}", "title": "" }, { "docid": "cd96fe41f83d25463e299ac43e3c0437", "score": "0.6166783", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.pop();\n var func = callback.func;\n if (typeof func === 'number') {\n func = FUNCTION_TABLE[func];\n }\n func(callback.arg === undefined ? null : callback.arg);\n }\n}", "title": "" }, { "docid": "cd96fe41f83d25463e299ac43e3c0437", "score": "0.6166783", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.pop();\n var func = callback.func;\n if (typeof func === 'number') {\n func = FUNCTION_TABLE[func];\n }\n func(callback.arg === undefined ? null : callback.arg);\n }\n}", "title": "" }, { "docid": "cd96fe41f83d25463e299ac43e3c0437", "score": "0.6166783", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.pop();\n var func = callback.func;\n if (typeof func === 'number') {\n func = FUNCTION_TABLE[func];\n }\n func(callback.arg === undefined ? null : callback.arg);\n }\n}", "title": "" }, { "docid": "cd96fe41f83d25463e299ac43e3c0437", "score": "0.6166783", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.pop();\n var func = callback.func;\n if (typeof func === 'number') {\n func = FUNCTION_TABLE[func];\n }\n func(callback.arg === undefined ? null : callback.arg);\n }\n}", "title": "" }, { "docid": "cd96fe41f83d25463e299ac43e3c0437", "score": "0.6166783", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.pop();\n var func = callback.func;\n if (typeof func === 'number') {\n func = FUNCTION_TABLE[func];\n }\n func(callback.arg === undefined ? null : callback.arg);\n }\n}", "title": "" }, { "docid": "cd96fe41f83d25463e299ac43e3c0437", "score": "0.6166783", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.pop();\n var func = callback.func;\n if (typeof func === 'number') {\n func = FUNCTION_TABLE[func];\n }\n func(callback.arg === undefined ? null : callback.arg);\n }\n}", "title": "" }, { "docid": "cd96fe41f83d25463e299ac43e3c0437", "score": "0.6166783", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.pop();\n var func = callback.func;\n if (typeof func === 'number') {\n func = FUNCTION_TABLE[func];\n }\n func(callback.arg === undefined ? null : callback.arg);\n }\n}", "title": "" }, { "docid": "cd96fe41f83d25463e299ac43e3c0437", "score": "0.6166783", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.pop();\n var func = callback.func;\n if (typeof func === 'number') {\n func = FUNCTION_TABLE[func];\n }\n func(callback.arg === undefined ? null : callback.arg);\n }\n}", "title": "" }, { "docid": "cd96fe41f83d25463e299ac43e3c0437", "score": "0.6166783", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.pop();\n var func = callback.func;\n if (typeof func === 'number') {\n func = FUNCTION_TABLE[func];\n }\n func(callback.arg === undefined ? null : callback.arg);\n }\n}", "title": "" }, { "docid": "cd96fe41f83d25463e299ac43e3c0437", "score": "0.6166783", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.pop();\n var func = callback.func;\n if (typeof func === 'number') {\n func = FUNCTION_TABLE[func];\n }\n func(callback.arg === undefined ? null : callback.arg);\n }\n}", "title": "" }, { "docid": "cd96fe41f83d25463e299ac43e3c0437", "score": "0.6166783", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.pop();\n var func = callback.func;\n if (typeof func === 'number') {\n func = FUNCTION_TABLE[func];\n }\n func(callback.arg === undefined ? null : callback.arg);\n }\n}", "title": "" }, { "docid": "cd96fe41f83d25463e299ac43e3c0437", "score": "0.6166783", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.pop();\n var func = callback.func;\n if (typeof func === 'number') {\n func = FUNCTION_TABLE[func];\n }\n func(callback.arg === undefined ? null : callback.arg);\n }\n}", "title": "" }, { "docid": "cd96fe41f83d25463e299ac43e3c0437", "score": "0.6166783", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.pop();\n var func = callback.func;\n if (typeof func === 'number') {\n func = FUNCTION_TABLE[func];\n }\n func(callback.arg === undefined ? null : callback.arg);\n }\n}", "title": "" }, { "docid": "cd96fe41f83d25463e299ac43e3c0437", "score": "0.6166783", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.pop();\n var func = callback.func;\n if (typeof func === 'number') {\n func = FUNCTION_TABLE[func];\n }\n func(callback.arg === undefined ? null : callback.arg);\n }\n}", "title": "" }, { "docid": "cd96fe41f83d25463e299ac43e3c0437", "score": "0.6166783", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.pop();\n var func = callback.func;\n if (typeof func === 'number') {\n func = FUNCTION_TABLE[func];\n }\n func(callback.arg === undefined ? null : callback.arg);\n }\n}", "title": "" }, { "docid": "cd96fe41f83d25463e299ac43e3c0437", "score": "0.6166783", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.pop();\n var func = callback.func;\n if (typeof func === 'number') {\n func = FUNCTION_TABLE[func];\n }\n func(callback.arg === undefined ? null : callback.arg);\n }\n}", "title": "" }, { "docid": "cd96fe41f83d25463e299ac43e3c0437", "score": "0.6166783", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.pop();\n var func = callback.func;\n if (typeof func === 'number') {\n func = FUNCTION_TABLE[func];\n }\n func(callback.arg === undefined ? null : callback.arg);\n }\n}", "title": "" }, { "docid": "85bffb1517087f2d71fa1db72e2146b4", "score": "0.6154827", "text": "function runCallbacks() {\n\n\t\tcallbacks.forEach(function (callback) {\n\t\t\tcallback();\n\t\t});\n\n\t\trunning = false;\n\t}", "title": "" }, { "docid": "89485cbdaab0259dd78c6ead5f2459a2", "score": "0.6126189", "text": "_generateGlobalCallback(callbackName, num){\n\t\tconst name = 'arkitCallback' + num\n\t\tthis._globalCallbacksMap[callbackName] = name\n\t\tconst self = this\n\t\twindow[name] = function(deviceData){\n\t\t\tself['_' + callbackName](deviceData)\n\t\t}\n\t}", "title": "" }, { "docid": "32e471a6014bd40e7e5452ac0e37d61e", "score": "0.6085934", "text": "function exec_callback(id) { /// Execute callback\n if (!callbacks[id])\n return;\n callbacks[id].call();\n}", "title": "" }, { "docid": "2e306f761c54e3751f7e8a3aa52e50b0", "score": "0.6003897", "text": "function runLoggingCallbacks( key, scope, args ) {\n\t//debugger;\n\tvar i, callbacks;\n\tif ( QUnit.hasOwnProperty( key ) ) {\n\t\tQUnit[ key ].call(scope, args );\n\t} else {\n\t\tcallbacks = config[ key ];\n\t\tfor ( i = 0; i < callbacks.length; i++ ) {\n\t\t\tcallbacks[ i ].call( scope, args );\n\t\t}\n\t}\n}", "title": "" }, { "docid": "9aa72115dec0a0fd44e2c41db6bbc1c2", "score": "0.5997466", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.shift();\n if (typeof callback == 'function') {\n callback();\n continue;\n }\n var func = callback.func;\n if (typeof func === 'number') {\n if (callback.arg === undefined) {\n Module['dynCall_v'](func);\n } else {\n Module['dynCall_vi'](func, callback.arg);\n }\n } else {\n func(callback.arg === undefined ? null : callback.arg);\n }\n }\n}", "title": "" }, { "docid": "9aa72115dec0a0fd44e2c41db6bbc1c2", "score": "0.5997466", "text": "function callRuntimeCallbacks(callbacks) {\n while(callbacks.length > 0) {\n var callback = callbacks.shift();\n if (typeof callback == 'function') {\n callback();\n continue;\n }\n var func = callback.func;\n if (typeof func === 'number') {\n if (callback.arg === undefined) {\n Module['dynCall_v'](func);\n } else {\n Module['dynCall_vi'](func, callback.arg);\n }\n } else {\n func(callback.arg === undefined ? null : callback.arg);\n }\n }\n}", "title": "" }, { "docid": "4846f7442387d0797edb680641658aba", "score": "0.5995285", "text": "function callback(){}", "title": "" }, { "docid": "363044db1f374301781aca4da93ea29e", "score": "0.5988499", "text": "function callCallbacks() {\n console.log('CALLING require() CALLBACKS');\n while(require.pendingCallbacks.length > 0) {\n let cb = require.pendingCallbacks.shift();\n // Call the callback with argument being the\n // content.\n assert(require.content[cb.path] !== undefined,\n 'require.content[\"' + cb.path + '\"] is not defined');\n cb.callback(require.content[cb.path]);\n }\n }", "title": "" }, { "docid": "60f42cdb59d678fdb94f019ec9075d2e", "score": "0.5946083", "text": "function bindCallbacks(o, callbacks, args) {\n var prop = QUnit.objectType(o);\n if (prop) {\n if (QUnit.objectType(callbacks[prop]) === \"function\") {\n return callbacks[prop].apply(callbacks, args);\n } else {\n return callbacks[prop]; // or undefined\n }\n }\n }", "title": "" }, { "docid": "60f42cdb59d678fdb94f019ec9075d2e", "score": "0.5946083", "text": "function bindCallbacks(o, callbacks, args) {\n var prop = QUnit.objectType(o);\n if (prop) {\n if (QUnit.objectType(callbacks[prop]) === \"function\") {\n return callbacks[prop].apply(callbacks, args);\n } else {\n return callbacks[prop]; // or undefined\n }\n }\n }", "title": "" }, { "docid": "c3e711af8939eedf9e55648e072219d8", "score": "0.59117985", "text": "function runCallbacks() {\n callbacks.forEach((callback) => {\n callback();\n });\n\n running = false;\n }", "title": "" }, { "docid": "8bdd53ffb4270260322a26f3834663d5", "score": "0.590713", "text": "function runCallbacks() {\n callbacks.forEach(function(callback) {\n callback();\n });\n\n running = false;\n }", "title": "" }, { "docid": "8ce3418161ade257797020bc65c2baab", "score": "0.59040713", "text": "function runCallbacks() {\n callbacks.forEach(function(callback) {\n callback();\n });\n running = false;\n }", "title": "" }, { "docid": "6e423ce855eff81d86c85896f9efd748", "score": "0.5890126", "text": "function runCallbacks() {\n callbacks.forEach(function (callback) {\n callback();\n });\n\n running = false;\n }", "title": "" }, { "docid": "2bbc643ca50dac1052ec0ec481209d1e", "score": "0.5889", "text": "function fireAjaxCallback(eventName, eventData, callbackName) {\n var a = arguments;\n if (eventName) { $(document).trigger(eventName, eventData); }\n if (callbackName) {\n // Global callback\n if (callbackName in globals) { globals[callbackName](a[3], a[4], a[5], a[6]); }\n // Options callback\n if (options[callbackName]) { options[callbackName](a[3], a[4], a[5], a[6]); }\n }\n }", "title": "" }, { "docid": "19384b1b43e7a8fdd2ca51aaf276ca69", "score": "0.58815765", "text": "function callback() {}", "title": "" }, { "docid": "19384b1b43e7a8fdd2ca51aaf276ca69", "score": "0.58815765", "text": "function callback() {}", "title": "" }, { "docid": "19384b1b43e7a8fdd2ca51aaf276ca69", "score": "0.58815765", "text": "function callback() {}", "title": "" }, { "docid": "19384b1b43e7a8fdd2ca51aaf276ca69", "score": "0.58815765", "text": "function callback() {}", "title": "" }, { "docid": "19384b1b43e7a8fdd2ca51aaf276ca69", "score": "0.58815765", "text": "function callback() {}", "title": "" }, { "docid": "bb678f97ff8d62cc002fb2e34455d8d3", "score": "0.5871782", "text": "function exec_callback(args) {\n if (callback_func && (callback_force || !con || !con.log)) {\n callback_func.apply(window, args);\n }\n }", "title": "" }, { "docid": "a75f51ec166dc92a619d63334b6d4abb", "score": "0.58644325", "text": "function call_user_callbacks() {\n\t\t\t// Call user-defined logic, operate on a copy of the dictionary just in case\n\t\t\t// somebody changed its contents while we're iterating it.\n\t\t\tvar temp_callbacks = [];\n\t\t\tfor(var k in medeactx.tick_callbacks) {\n\t\t\t\ttemp_callbacks.push(medeactx.tick_callbacks[k]);\n\t\t\t}\n\t\t\tfor(var i = 0; i < temp_callbacks.length; ++i) {\n\t\t\t\tif(!temp_callbacks[i](dtime)) {\n\t\t\t\t\tmedeactx.StopNextFrame();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "5749097e9be934730e2744ac17ff8075", "score": "0.5854876", "text": "callback () {\n \n // Loop through the standark callbacks\n for (var i = 0; i < this.callbacks.length; i++) {\n this.callbacks[i]();\n }\n\n // delay and then loop through the delayed callbacks\n if(!this.timeoutID) this.timeoutID = setTimeout(\n window.sambar_ho_delayed_callback,\n 1000\n );\n\n }", "title": "" }, { "docid": "dc5e5ebbed6ce5cfa0f2eb880b2fd8f0", "score": "0.5849292", "text": "function runCallbacks() {\n callbacks.forEach(function (callback) {\n callback();\n });\n running = false;\n } // fired on resize event", "title": "" }, { "docid": "5886248cc2414969c7aeb30ce84c7634", "score": "0.58450586", "text": "callNotifyCallbacks(userId, fullname) {\n for (let i = 0; i < this.loginNotifyCallbacks.length; i++)\n this.loginNotifyCallbacks[i](userId, fullname);\n }", "title": "" }, { "docid": "132d1e618732daf9c20a246ad90750ac", "score": "0.58374953", "text": "function exec_callback( args ) {\n if ( callback_func && (callback_force || !con || !con.log) ) {\n callback_func.apply( window, args );\n }\n }", "title": "" }, { "docid": "9bded93afe26c0ecda7e4e17c088e023", "score": "0.58285034", "text": "function collectFunctions() {\n var keys = Object.keys(window);\n var functions = [];\n\n keys.forEach(function(key) {\n if (window[key] instanceof Function) { // Step (1)\n functions.push(window[key].name || \"<Anonymous function>\"); // anonymous function support does not currently exist\n }\n });\n\n window.postMessage({ // Step (2)\n type: \"FROM_PAGE\",\n text: functions\n }, \"*\");\n}", "title": "" }, { "docid": "19c462d7f3451259760e20c6c0760dde", "score": "0.5816474", "text": "function defaultcallback(){\n} // end defaultcallback()", "title": "" }, { "docid": "34ad19f89e4615322d3387296ec378e8", "score": "0.5803745", "text": "function mycallback() {}", "title": "" }, { "docid": "5e22470d0454732bae88a5b198b7d22d", "score": "0.5780722", "text": "register_callbacks() {\n\t\tthis.$user_list\n\t\t\t.parents( '.collapse' )\n\t\t\t.on( 'shown.bs.collapse hidden.bs.collapse', event => this.user_list_collapse_handler(event) );\n\n\t\t$( document ).on( 'keydown', event => this.key_press_handler(event) );\n\t\t$( '.cancel_auth:not(.alert .cancel_auth)' ).on( 'click', event => this.cancel_authentication(event) );\n\n\t\t$( '.submit_passwd' ).on( 'click', event => this.submit_password(event) );\n\t\t$( '[data-i18n=\"debug_log\"]' ).on( 'click', event => this.show_log_handler(event) );\n\n\t\tlightdm.show_prompt.connect( (prompt, type) => this.show_prompt(prompt, type) );\n\t\tlightdm.show_message.connect( (msg, type) => this.show_message(msg, type) );\n\n\t\twindow.start_authentication = event => this.start_authentication(event);\n\t\twindow.cancel_authentication = event => this.cancel_authentication(event);\n\n\t\tlightdm.authentication_complete.connect( () => this.authentication_complete() );\n\t\tlightdm.autologin_timer_expired.connect( event => this.cancel_authentication(event) );\n\t}", "title": "" }, { "docid": "ff5d0d732a273a3a144a4a6e8065a4c3", "score": "0.57751554", "text": "function JSONPCallback(context, cb) {\n var name = 'GHWidgetLoaded' + ++cid\n window[name] = function (data) {\n cb.call(context, data)\n delete window[name]\n }\n return name\n }", "title": "" }, { "docid": "4616c6eddacd5ea0c5131f1dbcaa6d0f", "score": "0.57363224", "text": "function bindCallbacks( o, callbacks, args ) {\n\t\tvar prop = QUnit.objectType( o );\n\t\tif ( prop ) {\n\t\t\tif ( QUnit.objectType( callbacks[ prop ] ) === \"function\" ) {\n\t\t\t\treturn callbacks[ prop ].apply( callbacks, args );\n\t\t\t} else {\n\t\t\t\treturn callbacks[ prop ]; // or undefined\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "15d8114dc2ab584009f63861060317d4", "score": "0.5701972", "text": "_bindEventListenerCallbacks() {\n\n this._onResizeBound = this._onResize.bind(this);\n\n this._onTabListClickBound = this._onTabListClick.bind(this);\n\n this._onRightClickBound = this._onRightClick.bind(this);\n this._onLeftClickBound = this._onLeftClick.bind(this);\n\n this._onTouchStartBound = this._onTouchStart.bind(this);\n this._onTouchMoveBound = this._onTouchMove.bind(this);\n this._onTouchEndBound = this._onTouchEnd.bind(this);\n\n this._onMouseDownBound = this._onMouseDown.bind(this);\n this._onMouseMoveBound = this._onMouseMove.bind(this);\n this._onMouseUpBound = this._onMouseUp.bind(this);\n\n this._onScrollBound = this._onScroll.bind(this);\n\n this._onFocusBound = this._onFocus.bind(this);\n this._onBlurBound = this._onBlur.bind(this);\n }", "title": "" }, { "docid": "9df3e1f1f2fd24f1acce8538c873da89", "score": "0.56946504", "text": "function invokeTwice(cb) {\n cb(); // now this refers to window\n cb();\n}", "title": "" }, { "docid": "36e0cbc86e2bcf9eeaac13dd429cea88", "score": "0.5693636", "text": "function editorNativeCallbacks(bridge) {\n // listen for cursor and selection position changes\n // editor.selection.on(\"changeCursor\",function() {\n\n // if (preventStateUpdates) {\n // return;\n // }\n \n // if (documentLoadEvent == false) {\n \n // var nativeData = getCursorData();\n\n // if (cursorUpdateTimer != undefined) {\n // window.clearTimeout(cursorUpdateTimer);\n // }\n // cursorUpdateTimer = window.setTimeout(function() {\n // bridge.callHandler(\"changeCursor\",nativeData);\n // }, 100);\n \n // }\n // });\n\n\n // listen for non-programmatic text changes\n editor.on(\"change\", function(changeData) {\n if (editor.curOp && editor.curOp.command.name) {\n // this is a user change\n textChangeEvent(bridge);\n }\n });\n\n editor.on(\"paste\", function() {\n textChangeEvent(bridge);\n });\n\n // window.setInterval(function() {\n // var cursorData = getCursorData();\n // var currentText = editor.getValue();\n\n // var nativeData = {\"text\": currentText, \"cursor\": cursorData};\n\n // bridge.callHandler(\"currentText\", nativeData);\n // },100);\n}", "title": "" }, { "docid": "1e141f4caef2289fdd944af31317dc13", "score": "0.5663099", "text": "function runCallbacks() {\r\n callbacks.forEach(function(callback) {\r\n callback();\r\n });\r\n\r\n delayedCallbacks.forEach(function(dcallback) {\r\n var uid = dcallback.uid;\r\n var ms = dcallback.delay;\r\n if (timers[uid]) {\r\n clearTimeout(timers[uid]);\r\n }\r\n timers[uid] = setTimeout(function(){\r\n dcallback.callback()\r\n }, ms);\r\n });\r\n running = false;\r\n }", "title": "" }, { "docid": "87a29709acb1c94cab6b5bc89b2d1262", "score": "0.5660159", "text": "executeAfterFunction(){\n\t\tif (this._afterFunctionCount > 0){\n\t\t\tlet keys = Object.keys(this._afterFunction);\n\n\t\t\tfor(let key of keys){\n\t\t\t\tthis._afterFunction[key](this);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "9ca930f92c77ee4c8bec02fddb1c9b7f", "score": "0.5658958", "text": "function setCallBacks(){\n var children = parentDIV.childNodes;\n for(var i = 0; i < children.length; i++){\n children[i].onclick = params.callBack || \n function(){alert(\"Default callback\");};\n } \n }", "title": "" }, { "docid": "0f0d474891d3382bf67cf76c92828db1", "score": "0.5644761", "text": "function onAllCallbacksCreated() {\n allCallbacksCreated = true;\n tryOnComplete();\n }", "title": "" }, { "docid": "e2b6fe93f7739ecc88b200c981bd1aac", "score": "0.55924755", "text": "function myCallback(callbackName) {\n console.log(\"this is my name \" + callbackName);\n}", "title": "" }, { "docid": "c53972f03d73bb5c75caca6034877797", "score": "0.55726814", "text": "_initWsCallbacks () {\n this._ws.onopen = () => this._wsOnOpen();\n this._ws.onclose = async (event) => this._wsOnClose(event);\n this._ws.onmessage = (event) => this._wsOnMessage(event);\n this._ws.onerror = async (error) => this._wsOnError(error);\n }", "title": "" }, { "docid": "b394b6df0d853c96730ccde6c004a086", "score": "0.55493355", "text": "function fireAjaxCallback (eventName, eventData, callbackName) {\n var a = arguments;\n if (eventName) $(document).trigger(eventName, eventData);\n if (callbackName) {\n // Global callback\n if (callbackName in globalAjaxOptions) globalAjaxOptions[callbackName](a[3], a[4], a[5], a[6]);\n // Options callback\n if (options[callbackName]) options[callbackName](a[3], a[4], a[5], a[6]);\n }\n }", "title": "" } ]
edbe2f547cae3bfc1a25539ff85f7125
clears the title screen and allows gameplay to start
[ { "docid": "8dbdc1637599c2a3c37249d5287b4a2e", "score": "0.622221", "text": "function clearTitle(){\n\t\t$(\"#messages\").empty();\n\t\t$(\"#messages\").unbind(\"click\");\n\t}", "title": "" } ]
[ { "docid": "68588273b405014fa143aca1a4b8d19c", "score": "0.77751213", "text": "function reset(){\n\tchangeView(title_screen);\n\tload_game();\n}", "title": "" }, { "docid": "d56ae0f71321267e8063dd0c7c6bd4c2", "score": "0.76651216", "text": "function destroyTitleScreen() {\n titleScreenElement.remove();\n spaButtonElement.removeEventListener('click', handleSpaClick);\n engButtonElement.removeEventListener('click', handleEngClick);\n music.pause();\n }", "title": "" }, { "docid": "a54802867e1adaf8b7d2694af9c22f2f", "score": "0.7397024", "text": "function titleScreen()\n{\n mode = \"title\";\n screen.style.backgroundColor = \"black\";\n\n removeResources();\n showImage(\".\\\\graphics\\\\title.fw.png\");\n\t\n\tdemostart = setTimeout(startDemo, 3000);\n}", "title": "" }, { "docid": "12a1ca7413d82a3102a97fb349a299b4", "score": "0.7370619", "text": "function gsmTitle()\n\t{\n\t\tClearScreen(g_backgroundColor);\n\t}", "title": "" }, { "docid": "2902c63b6c2cda47586b4a7eaf176fa4", "score": "0.7356934", "text": "function titleScreen() {\n // Style set up, decorative elements\n textSize(width/15);\n textAlign(CENTER,CENTER);\n background(233,226,255);\n\n // Title screen text, instructions, and prompt to begin game\n text(\"Avoid Everything!\", width/2, height/3);\n textSize(width/40);\n // Instructions\n text(\"Red dots are enemies!\", width/2, height*1/2);\n text(\"The confetti are evil!\", width/2, height*1.15/2);\n textSize(width/35);\n text(\"Press SPACE to shoot!\", width/2, height*1.3/2);\n // Play prompt\n textSize(width/25);\n text(\"Press ENTER to play\", width/2, height*3/4);\n}", "title": "" }, { "docid": "45a8cf7f6b500c9afd714f12d1ac01b8", "score": "0.7251432", "text": "function reset(){\n GAME_STATUS.isRunning = false;\n GAME_STATUS = null;\n\n mainMenu();\n}", "title": "" }, { "docid": "80181dafb2b9331ed3b17c1be7943634", "score": "0.70900744", "text": "function handleStartClick() {\n destroyIntroScreen();\n buildGameScreen(language);\n music.pause();\n }", "title": "" }, { "docid": "634d1c8f07136d09ed3d09ecefceac54", "score": "0.6999498", "text": "function titleTouch() {\n\tif (title.x <= (startGame.x + 32) && startGame.x <= (title.x + 32) && title.y <= (startGame.y) && startGame.y <= (title.y + 40)) {\n\t\t\tgamex.title = false;\n\t\t\tgamex.bgrender = false;\n\t\t}\n}", "title": "" }, { "docid": "ff5274841d0a777fe230c07c8b1156d6", "score": "0.69491076", "text": "function initializeTitleScreen()\n\t{\n\n // Add the buttons for title menu functionality\n\ttitleScreen.addChild( startButton );\n titleScreen.addChild( tutorialButton );\n titleScreen.addChild( creditsButton );\n\n // Create the text that will appear on the start menu\n\tvar titleText = new PIXI.Text( \"Top-Down Shooter\" );\n\ttitleText.position.x = 400;\n\ttitleText.position.y = 200;\n\ttitleText.anchor.x = 0.5;\n\ttitleText.anchor.y = 0.5;\n\n // Add the text to the screen\n\ttitleScreen.addChild( titleText );\n\t}", "title": "" }, { "docid": "884a4af170333d197952f4260a4bf239", "score": "0.69325465", "text": "gameReset() {\r\n this.resetHearts();\r\n this.removePhraseFromScreen();\r\n this.resetKeyboard();\r\n }", "title": "" }, { "docid": "8a6d1f959af4333a2dec85b3fef057ce", "score": "0.6888897", "text": "function destroyGameScreen() {\n game.destroy();\n }", "title": "" }, { "docid": "538611cb148f05ae5f16b0f222ea8b4c", "score": "0.68205553", "text": "clear() {\n this.screen.destroy();\n }", "title": "" }, { "docid": "98aa55e7ce80d3b28d0fc11de8b091e1", "score": "0.68179333", "text": "reset () {\n\t\t\n\t\tif (this.nightmareMode) {\n\t\t\tthis.gameSounds.playNightmare();\n\t\t}\n\t\telse {\n\t\t\tthis.gameSounds.stopNightmare();\n\t\t\tthis.foreground.reset();\n\t\t\tthis.background.reset();\n\t\t\tthis.player.reset();\n\t\t}\n\n\t\tif (!this.firstPlay) {\n\t\t\tthis.player.reset();\n\t\t\tthis.foreground.reset();\n\t\t\tthis.background.reset();\n\t\t\tthis.pipes.reset();\n\t\t\tthis.scoreboard.reset();\n\t\t\tthis.splashScreen.show();\n\t\t\tthis.currentState = this.states.splash;\n\t\t}\n\t\telse {\n\t\t\tthis.firstPlay = false;\n\t\t\t//this.player.reset();\n\t\t\t//this.foreground.reset();\n\t\t\t//this.background.reset();\n\t\t\tthis.pipes.reset();\n\t\t\tthis.scoreboard.reset();\n\t\t\tthis.introScreen.setIntroScreen();\n\t\t\tthis.currentState = this.states.intro;\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "8c86d9ed513c7272f2a23e28b3763dad", "score": "0.6815097", "text": "function resetScreen() {\n currentQuestionIndex++; //helps us iterate through the question index\n $(\"#questionScreen\").empty();\n $(\"#answerScreen\").empty();\n $(\"#questionScreen\").css(\"display\", \"block\");\n $(\"#answerScreen\").css(\"display\", \"none\");\n startGame();\n }", "title": "" }, { "docid": "15b0e0d67aad9ddb33b3b35bcd2b36c1", "score": "0.6801954", "text": "function resetGame() {\n //Has to be \"death\" state to be able to reset\n //Resets everything\n if (state === `death`) {\n player.x = width / 2;\n player.y = height / 2;\n enemyFleet = [];\n fleetLimit = 1;\n resetsDone = 0;\n }\n if (keyIsDown(32)) {\n state = `title`;\n }\n}", "title": "" }, { "docid": "f583b50c344f313a6c2e74666e3f0ade", "score": "0.67971563", "text": "function reset() {\n\tgamex.score = 0;\n\tgamex.pawns.length = 0;\n\tgamex.enemies.length = 0;\n\tgamex.clouds.length = 0;\n\tgamex.frontenemy = 0;\n\tgamex.frontpawn = 0;\n\tgamex.pawnNo = 0;\n\tgamex.monsterTimer = 0;\n\tgamex.monsterNo = 0;\n\tgamex.castle1Health = 500;\n\tgamex.castle2Health = 500;\n\tgamex.cloudTimer = 0;\n\tgamex.cloudNo = 0;\n\ttitle.x = 550;\n\ttitle.y = 150;\n\tcanvas.width = canvas.width;\n\tgamex.title = true;\n}", "title": "" }, { "docid": "731e96156b6510b063d180569d8279bb", "score": "0.6780339", "text": "function titleScreen(){\n\t\t// show the images that make up the title screen\n\t\t$(\"#messages\").append(\"<img id='titleshadow' src='images/blackdot.png'/>\");\n\t\t$(\"#messages\").append(\"<img id='titleimg' src='images/title.png'/>\");\n\t\t$(\"#messages\").append(\"<img id='startmsg' src='images/click to start.png'/>\");\n\t\t$(\"#messages\").append(\"<img id='howtoplay' class='float' src='images/howtoplay.png'/>\");\n\t\t$(\"#messages\").append(\"<img id='credits' class='float' src='images/credits.png'/>\");\n\t\t\n\t\t// make the title screen go away after clicking\n\t\t$(\"#titleshadow\").click(clearTitle);\n\t\t$(\"#titleimg\").click(clearTitle);\n\t\t$(\"#startmsg\").click(clearTitle);\n\n\t\t// add links to credits and help pages, making the buttons float when moused-over\n\t\t$(\"#credits\").click(goToCredits).mouseover(function(){$(\"#credits\").addClass(\"float\"); $(\"#howtoplay\").removeClass(\"float\"); floatup();}).mouseout(floatdown);\n\t\t$(\"#howtoplay\").click(goToHelp).mouseover(function(){$(\"#howtoplay\").addClass(\"float\"); $(\"#credits\").removeClass(\"float\"); floatup();}).mouseout(floatdown);\n\t}", "title": "" }, { "docid": "8828d5c9f89147a6c4eba078e9d96413", "score": "0.677544", "text": "function reset() {\n\n gameStats.life = 3;\n gameStats.countDown = 61;\n gameStats.score = 0;\n gameStats.gems = 0;\n gameStats.special = 0;\n gameStats.keys = 0;\n\n gameMenu.gameOver = 'no';\n gameMenu.active = 'no';\n\n player.active = 'yes';\n\n gameObjectPrize.active = 'yes';\n\n}", "title": "" }, { "docid": "f14a55c1a282bfb7fc026f84b8fbe9c7", "score": "0.6766364", "text": "function UserQuit() {\n //check if score is present\n if (currentUserScore != null) {\n Modal.checkUserScoreOnQuit(currentUserScore);\n }\n //reset champion\n champion = Service.getChampion();\n //flag start screen\n atStartScreen = true;\n //reset time var\n titleTimePrevious = Date.now();\n //start song\n titleThemeSong.play();\n //go to title loop\n showStartScreen();\n}", "title": "" }, { "docid": "96802ad248a807462b637f526afee86b", "score": "0.6762985", "text": "function resetGame() {\n state = { ...defaultState };\n updateBoardSize(state.size);\n clearChild();\n updateMessageTurn(`Player 0${state.currentTurn} Turn`);\n removeActionOverlayListener();\n initialSetupGame();\n}", "title": "" }, { "docid": "e756f9932d70b0e138cd0d4acb21f70d", "score": "0.6761736", "text": "reset() {\r\n this.setupProlog(); //gets the pieces of the board and auxiliary board\r\n this.scoreboard.reset(); //resets the time in the scoreboard\r\n this.gameState = gameStateEnum.MENU;\r\n //makes sure the camera is where it should start\r\n this.setPlayer1View();\r\n this.deselectAll();\r\n }", "title": "" }, { "docid": "9d5841c337c3b527bb050dce6832064e", "score": "0.6750429", "text": "function resetGame() {\n\n player1Name = null;\n player2Name = null;\n\n // Draw the starting snake screen\n drawStartingScreen();\n\n // Make the buttons visible again\n setButtonsVisibility('visible');\n\n updatePointsLabel();\n}", "title": "" }, { "docid": "ee6c62e10d4c945be308b27c576be1f1", "score": "0.6745335", "text": "function reset(){\n if(victory){\n\n //\n cleanGameStuff();\n\n // Music\n if(music) {\n music.stop();\n }\n music = game.add.audio('victory');\n music.loop=true;\n music.play();\n\n // Victory text\n victoryText1 = game.add.text(game.width/2 - 200, 200, \"VICTORY\", titleStyle);\n victoryText2 = game.add.text(game.width/2 - 450, 500, \"PRESS F5 TO IMPROVE YOUR MARK\", titleStyleSmall);\n }\n else if(inMenu) {//if you were in the menu\n\n // Music\n if(music) {\n music.stop();\n }\n music = game.add.audio('escape');\n music.loop = true;\n music.volume = 0.2;\n music.play();\n\n // Destroy the buttons\n for(var i = 0;i < buttons.length; i++) {\n buttons[i].pendingDestroy = true;\n }\n\n // Destroy the texts\n titleText1.pendingDestroy = true;\n titleText2.pendingDestroy = true;\n\n // Reset the counter\n counter = 0;\n\n //\n resetPlatforms();\n }\n else{\n // Music\n if(music) {\n music.stop();\n }\n music = game.add.audio('menu');\n music.loop=true;\n music.play();\n\n //clean screen\n cleanGameStuff();\n // This one goes appart for victory stuff\n boss.resetBoss();\n //update score\n totalScore += currScore;\n currScore = 0;\n\n //\n setTitleAndButtons();\n }\n inMenu = !inMenu;\n}", "title": "" }, { "docid": "7d8022a50bce7e43d4da8b3a6dd0cebf", "score": "0.67422515", "text": "function resetGame() {\n player1.x = width/2;\n player1.y = height-50;\n player1.size = 20;\n player1.color = 255;\n\n // Enemy reset values\n for (var i = 0; i < enemies.length; i++) {\n enemies[i].reset();\n }\n\n // Display title screen\n titleScreen();\n}", "title": "" }, { "docid": "b5ba9f2d2c9c94c92a434e89cb7a79fa", "score": "0.6726777", "text": "function quitGame() {\n\n // Here you should destroy anything you no longer need.\n // Stop music, delete sprites, purge caches, free resources, all that good stuff.\n\n // Then let's go back to the main menu.\n game.state.start('MainMenu');\n\n }", "title": "" }, { "docid": "12df0f0e760e60a1d43968a1cc170f67", "score": "0.67220634", "text": "function gameInit()\n{\n\t// Hides the first start game button and page title\n\tdocument.getElementById(\"playGameButton\").style.visibility = \"hidden\";\n\tdocument.getElementById(\"titleText\").style.visibility = \"hidden\";\n\n\t// Shows the name entry interface\n\tdocument.getElementById(\"nameEntry\").style.visibility = \"visible\";\n}", "title": "" }, { "docid": "414b3d2d25874a01e4c1d3db847e0f9e", "score": "0.67144763", "text": "function reset() {\n $(\"#start-screen\").show();\n $(\"#stats-screen\").hide();\n}", "title": "" }, { "docid": "92a341c0b60a68c6494985324294d505", "score": "0.67103666", "text": "function startGame() {\n //hide start screen\n titleScreen.style.display = \"block\";\n titleScreen.style.display = \"none\"; \n \n //unhide questions section\n questionsScreen.style.display = \"block\";\n\n //start timer\n setTime();\n\n //first question appears\n currentQuest();\n}", "title": "" }, { "docid": "8856f0450fbb4e511d8eefd8691165a8", "score": "0.6681148", "text": "startGame(){\n this.clearGame();\n }", "title": "" }, { "docid": "ffdf94ebab5a07671e5c18be3457d212", "score": "0.6666935", "text": "showTitleScreen() {\n\t\tvar title = document.createElement(\"div\");\n\t\t//title.innerHTML = \"Look at me, I'm a title!\";\n\t\tdocument.body.appendChild(title);\n\n\t\tbutton.innerHTML = \"Start\";\n\t\tthis.buttonClicked = function() {\n\t\t\ttitle.remove();\n\t\t\tthis.setup();\n\t\t}\n\t}", "title": "" }, { "docid": "ecaa45d25fec96550b409c07c2745f78", "score": "0.66532373", "text": "function gameStart(){//game start, hide texts\n}", "title": "" }, { "docid": "e0eedaa7ccbaada9d665f4bfa0363c1d", "score": "0.6651932", "text": "function reset() {\n startGame();\n}", "title": "" }, { "docid": "9910869c6e172ff9e35b420b1bc338e9", "score": "0.6604432", "text": "function reset() {\n document.getElementById('game-over').style.display = 'none';\n document.getElementById('game-over-overlay').style.display = 'none';\n}", "title": "" }, { "docid": "81da3071ff71a72bd8e08ed1278f4f82", "score": "0.6598955", "text": "function reset() {\n player = { ...playerStart }\n gameDisplayOne.style.display = 'block'\n clearEnemiesArr()\n clearGoldArr()\n gameInit()\n}", "title": "" }, { "docid": "c2804153ac142784054456f391a70a1f", "score": "0.65680856", "text": "function resetDisplay() {\n\n // reset everything: buttons are enabled and the colors removed, the selected phrase is removed, the hearts are back, the missed counter is back to 0)\n document.querySelectorAll('.key').forEach(button => button.classList.remove('chosen', 'wrong'));\n document.querySelectorAll('.key').forEach(button => button.disabled = false);\n document.querySelector('#phrase ul').innerHTML = '';\n document.querySelector('#scoreboard ol').innerHTML = heartsInHtml;\n document.querySelector('#overlay').classList.remove('win', 'lose');\n game.missed = 0;\n\n // opacity transition and hides the start screen overlay\n document.querySelector('#overlay').style.opacity = 0;\n setTimeout(removeOverlay, 3000);\n}", "title": "" }, { "docid": "1b7f329cd43c9d6603754067eb5b4012", "score": "0.65333796", "text": "function displayTitle() {\n push();//saves the current style settings.\n noStroke(); // There will be no outline strokes on the elements.\n fill(255,255,255,220); // Have a transparent white fill color.\n rectMode(CENTER); // Set the rectMode to center.\n rect(width/2,height/2, width, height); // Draws the rectangle that covers the screen.\n pop();//restores these settings.\n\n textAlign(CENTER,CENTER);\n textSize(62);\n fill(70);\n stroke(70);\n textFont(chakraPetchFont);\n text(\"SEEK\",width/2,4*height/9); // Display the game name.\n textSize(34);\n // Display the instructions for the controls and start game.\n text(\"Click anywhere to Start\\nUse arrow keys for Control\",width/2,3*height/5);\n\n // Check whether the mouse was pressed to start the game.\n if (mouseIsPressed) {\n // if mouse is pressed, change the state to \"STAGE1\" so the switch\n // statement in draw() will display the stage 1 instead.\n state = \"STAGE1\";\n }\n}", "title": "" }, { "docid": "61a81ba03cdb3c504d94373a7beb4c0b", "score": "0.65177596", "text": "function startGame(){\n //Remove everthing from main screen\n remove(blueRect);\n remove(purpRect);\n stopTimer(changeColor);\n remove(title);\n remove(play);\n \n //Wall\n\tdrawWall();\n\n\t//Ball\n\tdrawBall();\n\tsetTimer(moveBall, 5);\n\n\t//Paddle\n\tdrawPaddle();\n\tmouseMoveMethod(movePad);\n}", "title": "" }, { "docid": "e1624ba705a934219026ce85ed1c88b6", "score": "0.6489429", "text": "function initialScreen() {\r\n //Initial welcome message\r\n ctx.globalAlpha = 0.6;\r\n ctx.fillStyle = \"#004d1a\";\r\n ctx.fillRect(0, 0, width, height);\r\n ctx.globalAlpha = 1;\r\n ctx.font = \"italic 40px Arial Black\";\r\n ctx.fillStyle = \"white\";\r\n ctx.fillText(\"The\", 360, 270);\r\n ctx.font = \"50px Arial Black\";\r\n ctx.fillStyle = \"#000099\";\r\n ctx.fillText(\"SNAKE GAME!\", 220, 330);\r\n }", "title": "" }, { "docid": "e68e5545dfa9b659bdfc5954b40c463b", "score": "0.6485654", "text": "function menuGame() {\n this.input.removeListener('pointerdown', menuGame);\n mAudio.ab.stop();\n mAudio.bg.stop();\n if (!mAudio.intro.isPlaying) { \n mAudio.intro.play({\n loop: true\n });\n }\n \n \n back_txt.visible= false;\n backbt.visible = false;\n aboutbackground.visible = false;\n about_txt.visible = true;\n startb1.visible = true;\n play_txt.visible = true; //VISIBLE AND NOT VISIBLE COMPONENTS \n startb2.visible = true;\n menubackground.visible = true;\n gameover_txt.visible = false; \n score_txt.visible = false;\n \n playing_bool = false;\n\n}", "title": "" }, { "docid": "f172d2eeb90d4d3b6862a877daaab2c4", "score": "0.64553404", "text": "function readyToPlay() {\n startGamePage.style.display = \"none\";\n main();\n}", "title": "" }, { "docid": "41b5ff690ef2a1a64b9d7848f31ba555", "score": "0.64543724", "text": "function menu() {\n background(70, 0, 0);\n displayText(`GIBE`, 120, width / 2, height / 2 - 40, 255);\n displayText(`Enter to Play`, 40, width / 2, height / 2 + 150, 255);\n\n //Display and move sub title \"The Extremely Silly Game\" down.\n title.display();\n title.move();\n // If title is low enough, replace it with new sub-title\n if (title.y + 30 >= height * 2) {\n displayText(`Good Intention, Bad Execution`, 55, width / 2, height / 2 + 50, 255);\n }\n // Check if there are currently any predictions to display\n if (predictions.length > 0) {\n // Get the hand predicted\n let hand = predictions[0];\n // Show fingers coordinates\n highlightHand(hand);\n }\n}", "title": "" }, { "docid": "fd5a658f00404e0601f1a240787643a6", "score": "0.6447786", "text": "function resetGame() {\n\t\n}", "title": "" }, { "docid": "9a655a1019dbb49cefe92cca6f249e49", "score": "0.64316696", "text": "restart() {\n\t\tgame.state.start('menu');\n\t}", "title": "" }, { "docid": "f0ff51d531855a714e0ac829bb6f141f", "score": "0.6427778", "text": "function resetGame() {\n document.querySelector('.highscore').classList.remove('hidden');\n document.querySelector('.highscore').textContent = `Highscore: ${score}`; \n sequence = [];\n playerSequence = [];\n level = 0;\n score = 0;\n startButton.classList.remove('hidden');\n info.classList.add('hidden');\n tileContainer.classList.add('unclick');\n head.classList.remove('hidden');\n tileContainer.classList.add('hidden');\n levelSpan.classList.add('hidden');\n scoreSpan.classList.add('hidden');\n $(\".tile\").removeClass(\"hidden\");\n $(\".nxt\").addClass(\"hidden\");\n tileContainer.classList.remove('no-margin');\n tiles.splice(9, 7);\n}", "title": "" }, { "docid": "01e3c73db35e7abe3d2c3ad3a3461341", "score": "0.64277303", "text": "function onTitleCancel() {\n setShowDrawer(false)\n setTitleText('Title Frame')\n }", "title": "" }, { "docid": "98ade9431f4746f01d829917ee4907f1", "score": "0.6423622", "text": "function gamePlay(){\n //makes title2 smaller once theme dictates title1\n $('#title2').removeClass('title2');\n //jquery and variables for current theme\n defineVariables();\n //backstetch for current theme\n backstretch();\n //displays title for current theme\n displayTitle();\n //plays themesong for current theme\n themeSong();\n //\n muteControl();\n selectDifficulty(runQuestions);\n}", "title": "" }, { "docid": "36c2b7e797cc29c3a93d4b5364d43654", "score": "0.6418989", "text": "function resetInterface() {\n $('.alert').hide();\n document.title = \"Pomodorock\";\n resetTimer();\n}", "title": "" }, { "docid": "934660cf2f41ea7f6f1eeafffdf28e00", "score": "0.6416553", "text": "function destroyIntroScreen() {\n introScreenElement.remove();\n startButtonElement.removeEventListener('click',handleStartClick);\n music.pause();\n }", "title": "" }, { "docid": "f743f3309410aef504354edb5694b7ba", "score": "0.64163107", "text": "function reset() {\n //reset blue force attributes to starting status\n activeBlueForce.imgIndex = 0;\n activeBlueForce.numRounds = activeBlueForce.cannonCap;\n activeBlueForce.numSidewinders = activeBlueForce.sidewinderCap;\n activeBlueForce.numAmraams = activeBlueForce.amraamCap;\n\n //reset red force attributes to starting status\n activeRedForce.imgIndex = 0;\n activeRedForce.health = activeRedForce.lifeExp;\n activeRedForce.evasiveAction = false;\n activeRedForce.flareActive = false;\n activeRedForce.chaffActive = false;\n\n //reset status window\n statusMessage = \"GAME ON!\";\n statusBlock.className = 'text-info';\n\n //enable all buttons\n for (let i = 0; i < btnArray.length; i++) {\n const button = btnArray[i];\n button.disabled = false;\n }\n //redraw user interface\n draw();\n drawButtons();\n}", "title": "" }, { "docid": "a94d50699184300f418a0f9f942c98dc", "score": "0.6410591", "text": "function resetGame() {\n snake = new Snake();\n createFood();\n score = 0;\n textP.html(\"Score: \" + score);\n loop();\n buttonDiv.style(\"display\", \"none\");\n}", "title": "" }, { "docid": "027af0e0a8a1ea7e8436fcee28ce8e89", "score": "0.64020383", "text": "function startGame () {\n console.log(\"click\");\n $(\"#homepage\").hide();\n $(\"#score-keeper\").hide();\n }", "title": "" }, { "docid": "f13d0a33edfcc31854562f5ce13d6de2", "score": "0.6388061", "text": "function startScreen() {\n\n // push() and pop()\n //\n // To keep the text size, text font, and text alignment\n // from spreading trough other text that I might add\n push();\n\n // Adding a new font\n textFont(quantumfont);\n\n // To adjust my font size\n textSize(30);\n\n // text alignment\n textAlign(CENTER, CENTER);\n\n // No stroke\n noStroke();\n\n // Color fill of the title\n text(\"Press a button to start\", width / 2, height / 4);\n\n pop();\n\n // The game starts when a button is pressed\n if (keyIsPressed) {\n state = \"playGame\";\n }\n}", "title": "" }, { "docid": "c0ddeb1426bdb25c68fe067a7b03cf53", "score": "0.6386059", "text": "startGame() {\n this.alertText.destroy();\n this.started = true;\n }", "title": "" }, { "docid": "46a2a398ad3148e9e959630de7ac4112", "score": "0.6382115", "text": "function title() {\n //Title\n displayText(`- SLAMINA+ -\nthe animal guessing game`, width / 2, height / 2, 74, BOLD);\n //Instructions\n displayText(`Press 'any key' to continue`, width / 2, height - 200, 32, NORMAL);\n}", "title": "" }, { "docid": "a3b7dbb95b84fe78deeb3310fa21f1a3", "score": "0.6380029", "text": "function startGame() {\n $('#title').on('click', function(e) {\n //configuration variable before start\n var wfconfig = {\n active: function() {\n $('#wrapper').hide();\n\n $.getScript(\"start\");\n },\n\n \t\tgoogle: {\n \t families: ['Cabin Sketch', 'Cagliostro']\n \t\t}\n };\n\n //configuring the div that'll contain the game so it fits perfectly\n var canvasContent = $('#canvasContent');\n canvasContent.css('position', 'absolute');\n canvasContent.css('margin', '0');\n canvasContent.css('width', '100%');\n canvasContent.css('top', '31px');\n canvasContent.css('bottom', '0');\n\n //actual start\n WebFont.load(wfconfig);\n });\n }", "title": "" }, { "docid": "bd550ec02c9f8fa4a4b6f0c681dda5a7", "score": "0.6377337", "text": "function initialStart(){\n\n\t\t\t// Removes button that begins game\n\t\t\t\tdocument.getElementById(\"main\").removeChild(document.getElementById(\"chooseGameOptions\"));\n\n\t\t\t// Displays game parameters to be chosen.\n\t\t\t\tchooseGameOptions();\n\t\t}", "title": "" }, { "docid": "72f08759168813d1a4b78ffe02f5c5c3", "score": "0.6365902", "text": "function resetGame() {\n revertGame();\n resetTimer();\n resetFlips();\n showStar(3);\n toggleButton();\n}", "title": "" }, { "docid": "d051f51236f6a532a5b52ff3318236f6", "score": "0.63582003", "text": "function reset(){\n\tlet i, j;\n\t//sets first bar imgs target to 0 index\n\tbarImgPlace = 0;\n\t//sets bar imgs opacity to 0\n\tfor(i = 0; i < barImgs.length; i++){\n\t\tbarImgs[i].style.opacity = 0;\t\n\t}\n\t//sets boxes imgs source to redsquares\n\tfor(j = 0; j < boxes.length; j++){\n\t\tboxes[j].src = redsquare;\n\t}\n\t//clears the array of saved characters\n\tsavedCharacters = [];\n\tgamePage.style.display = 'block';\n\t// set gamepage background music to beginning\n\trdmBgM.currentTime = 0;\n\t// reset timergap to 4 seconds for timer function\n\ttimerPage.style.display = 'block';\n}", "title": "" }, { "docid": "45bb41576d961dda3f1189b9745f61a5", "score": "0.63534755", "text": "function clearScreen() {\n FIRST_TIME = 0;\n DOTCOUNT = 0;\n TOTAL = 0;\n LIST_OF_KEYS = [];\n KEYPRESS = \"0\";\n displayOnScreen(KEYPRESS);\n KEYPRESS = \"\";\n // console.log(\"List cleared\");\n}", "title": "" }, { "docid": "335b930be42345f3a0b281bf2ef131d6", "score": "0.6351612", "text": "function resetGame() {\n $(\".gameover-screen\").hide();\n $(\".game-screen\").show();\n $(\".question-answer\").show();\n timer = 30;\n QandAindex = 0;\n timerRunning = false;\n waitTimer = 5;\n waitRunning = false;\n answeredCorrectly = 0;\n answeredWrong = 0;\n startGame();\n }", "title": "" }, { "docid": "6f0e519d84321038c4c638474e252bc7", "score": "0.63415056", "text": "function clearscreen()\n{\n\t\n\tmessnamed(\"mgraphics_msg\",\"clear_surface\");\n\tmessnamed(\"mgraphics_msg\", \"set_source_rgba\", 0., 0., 0., 1.);\n\tmessnamed(\"mgraphics_msg\", \"paint\"); \n messnamed(\"mgraphics_msg\", \"set_source_rgba\", 0., 0., 0., 1.);\n\t//messnamed(\"mgraphics_msg\", \"identity_matrix\");\n //messnamed(\"mgraphics_msg\", \"move_to\", 0., 0.);\n}", "title": "" }, { "docid": "69626858ebcd7d357bf3966203dcfdf8", "score": "0.63406414", "text": "function displayHomeScreen() {\n bonusScreen.style.display = 'none';\n gameScreen.style.display = 'none';\n homeScreen.style.display = 'flex';\n document.getElementsByClassName('controls')[0].style.display = 'none';\n}", "title": "" }, { "docid": "7c581f7e5369b9d2f3fd2483fee88cc6", "score": "0.63359743", "text": "function startgame(){\r\nloadImages();\r\nsetupKeyboardListeners();\r\nmain();\r\ndocument.getElementById(\"startgame\").style.visibility = \"hidden\";\r\n}", "title": "" }, { "docid": "0cdeaaa6a2a28d3e3710d62eff057c5c", "score": "0.6335069", "text": "function reset() {\n\tif (confirm(\"You are about to completely reset the game. Continue?\")) {\n\t \tplayerNames = new Array();\n\t\tgame = new Array();\n\t\tupdateBoard();\n\t\tnamePanel.hidden = false;\n\t\tnameField.disabled = false;\n\t\tnameField.hidden = false;\n\t\tnameField.value = \"\";\n\t\tnameButton.disabled = false;\n\t\tstartButton.disabled = true;\n\t\tscoreField.disabled = false;\n\t\tscoreField.value = \"\";\n\t\trestartButton.disabled = true;\n\t\tscoreButton.disabled = false;\n\t\tgamePanel.hidden = true;\n\t\tplayerCounter = 0;\n\t\tframeCounter = 1;\n\t\tballCounter = 1;\n\t\tplayers_printed.innerHTML = \"None\";\n\t\tinformation.innerHTML = \"The game has been restarted. Welcome to the Virtual Bowling Scoring System!\";\n\t\tnameField.focus();\n\t}\n}", "title": "" }, { "docid": "7b5f36ce766298ab457747b7f6312e60", "score": "0.6318041", "text": "function reset () {\n console.log(\"resetting game --reset\");\n // TODO reset but have leaderboard etc\n\n // clean off board\n $(\".cell\").removeClass(\"hit miss target\");\n $(\".cell\").text('');\n\n setOpening();\n }", "title": "" }, { "docid": "7f38279e7ae4b2454d09905a1e76d074", "score": "0.6314123", "text": "function resetMain() {\n computer = \"\";\n scoreX = 0;\n scoreO = 0;\n \n showElement(\"singlePlayer_button\");\n hideElement(\"playerX_button\");\n hideElement(\"playerO_button\");\n}", "title": "" }, { "docid": "c44ce6d738f34ddff2f6a8c2f37953f2", "score": "0.631372", "text": "function reset() {\n // show start game button and reset all stats\n wins = 0;\n losses = 0;\n unanswered = 0;\n currentQuestion = 0;\n answer=0;\n playingGame = true;\n clearInterval(intervalId);\n $(\"#hideContent\").show();\n $(\"#questions\").show();\n $(\"#results\").hide();\n newSlide();\n }", "title": "" }, { "docid": "32f863777821b63176e57456f3cf6d64", "score": "0.6311793", "text": "function reset() {\n modal.classList.remove('show');\n startMemoryGame();\n}", "title": "" }, { "docid": "d194b0860c28c567555d1256b30c1669", "score": "0.63106036", "text": "function resetGame() {\n if (ableToInteract) {\n ableToInteract = false;\n stopTimer = true;\n resetModalBox();\n removeEventListeners();\n resetScore();\n resetOpenCardArray();\n startNewGame();\n }\n}", "title": "" }, { "docid": "07aff87a2eab789201881dc1e249f620", "score": "0.63094753", "text": "function showTitleScreen() {\n if (TITLE_IMG_EXISTS) {\n //draw the title image, no UI because images haven't finished loading yet\n canvasContext.drawImage(titlePic, 0, 0);\n } else {\n //draw black screen - terrible UI, but shouldn't happen once we have a title image\n drawRect(0, 0, canvas.width, canvas.height, '#000000');\n }\n}", "title": "" }, { "docid": "84af03675ee26c186db9e89eb554059f", "score": "0.63082016", "text": "function gameToBegin() {\n playerEenNaam.value = \"\";\n playerTweeNaam.value = \"\";\n beginScreenBackground.style.display = \"flex\";\n beginScreen.style.display = \"flex\";\n container.style.display = \"none\";\n}", "title": "" }, { "docid": "b7c5edebecb9d7dfd3fda62006b87a8d", "score": "0.63074", "text": "function reset() {\n playGround = [true, true, true, true, true, true, true, true, true];\n $(\"#t0, #t1, #t2, #t3, #t4, #t5, #t6, #t7, #t8\").text(\"\").removeClass(\"unclickable\");\n $(\".show-container\").hide();\n $(\".line\").hide();\n }", "title": "" }, { "docid": "23d36d55b822cf4d4b282f6d66870124", "score": "0.6300188", "text": "function initializeGame() {\n gamePattern = [];\n userClickedPattern = [];\n level = 1;\n $(\"h2\").css(\"visibility\", \"visible\");\n $(\"h1\").text(\"Press [ Enter ] to Start\");\n}", "title": "" }, { "docid": "75d82a2e06d214e82400b7f4cd2ddb9f", "score": "0.6295389", "text": "function resetGame() {\n\n hideAllCards();\n resetMoves();\n stopTimer();\n resetStars();\n hideModal();\n setTimeout(shuffleDeck, 500);\n}", "title": "" }, { "docid": "5d97aee2dada1e99f8778f54d115cce2", "score": "0.62946254", "text": "function showTitle() {\n\t\tif (downMouseX > 0 && downMouseY > 0) {\n\t\t\tresetDownMouse();\n\t\t\tgameState = STATE_MENU;\n\t\t}\n\t\t\n\t\tvar title = \"Simon Says\";\n\t\tcontext.font = \"40px Plaster\";\n\t\tvar titleLen = context.measureText(title).width;\n\t\tvar titleX = theCanvas.width/2-titleLen/2;\n\t\tvar titleY = theCanvas.height*0.4;\n\t\tvar caption = \"Click anywhere to begin!\";\n\t\tcontext.font = \"20px Tahoma\";\n\t\tvar captionLen = context.measureText(caption).width;\n\t\tvar captionX = theCanvas.width/2-captionLen/2;\n\t\tvar captionY = theCanvas.height*0.6;\n\t\t\n\t\t\n\t\tvar bgColor = colorArray[titleColorIndex];\n\t\tvar titleColor = colorArray[(titleColorIndex+1)%4];\n\t\tvar captionColor = colorArray[(titleColorIndex+2)%4];\n\t\t\n\t\tif (titleTimer <= 0) {\n\t\t\ttitleColorIndex = (titleColorIndex+1)%4;\n\t\t\ttitleTimer = titleInterval;\n\t\t}\n\t\telse\n\t\t\t--titleTimer;\n\t\t\n\t\t// Draw background\n\t\tcontext.fillStyle = bgColor;\n\t\tcontext.fillRect(0, 0, theCanvas.width, theCanvas.height);\n\t\t// Draw title\n\t\tcontext.fillStyle = titleColor;\n\t\tcontext.font = \"40px Plaster\";\n\t\tcontext.fillText(title, titleX, titleY);\n\t\t// Draw caption\n\t\tcontext.fillStyle = captionColor;\n\t\tcontext.font = \"20px Tahoma\";\n\t\tcontext.fillText(caption, captionX, captionY);\n\t\t\n\t\t/*** DEBUG ***/\n\t\tif (DEBUG_TITLE) {\n\t\t\tconsole.log(\"bgColor: \"+bgColor);\n\t\t\tconsole.log(\"titleColor: \"+titleColor);\n\t\t\tconsole.log(\"captionColor: \"+captionColor);\n\t\t\tconsole.log(\"titleColorIndex: \"+titleColorIndex);\n\t\t}\n\t}", "title": "" }, { "docid": "fc3eaf0fd321987a0f4ea5b3332225a9", "score": "0.6293455", "text": "function removeWelcomePage () { \n // remove eventListener on Start Button\n buttonStartGame.removeEventListener('click',startNewGame);\n\n // remove HTML elements for pre-launch\n document.querySelector('#game-preview').remove();\n\n \n }", "title": "" }, { "docid": "512f5d436c53eb780f4064d48cf70d7a", "score": "0.6292519", "text": "function gameStart() {\r\n mage.remove();\r\n knight.remove();\r\n demon.remove();\r\n text_1.innerHTML = '';\r\n text_2.innerHTML = '';\r\n text_3.innerHTML = '';\r\n text_4.innerHTML = '';\r\n text_5.innerHTML = '';\r\n text_6.innerHTML = '';\r\n battle_1.innerHTML = '<a href=\"#\">Attack</a>';\r\n battle_2.innerHTML = '<a href=\"#\">Special Attack</a>';\r\n battle_3.innerHTML = '<a href=\"#\">Heal</a>';\r\n battle_4.innerHTML = '<a href=\"#\">Wait</a>';\r\n updateStats();\r\n }", "title": "" }, { "docid": "8ac370449667be8ea21ab9c051f45580", "score": "0.62911516", "text": "function resetGame(){\n resetBoard();\n initializeVariables();\n setScoreBoard();\n }", "title": "" }, { "docid": "fe9eca5c7f27092e002789f079f249f4", "score": "0.6290905", "text": "function endTitleText(){\n var restartGame = document.createElement('div');\n restartGame.style.position = 'absolute';\n restartGame.style.width = 16 + 'em';\n restartGame.innerHTML = 'Reload this screen to try again';\n restartGame.style.bottom = 200 + 'px';\n restartGame.style.left = 15 + 'px';\n restartGame.style.fontSize = 50 + 'px';\n restartGame.style.color = '#ffffff';\n restartGame.id = \"restartGame\";\n document.body.appendChild(restartGame);\n\n var gameOver = document.createElement('div');\n gameOver.style.position = 'absolute';\n gameOver.style.width = 8 + 'em';\n gameOver.innerHTML = 'GAMEOVER';\n gameOver.style.bottom = 250 + 'px';\n gameOver.style.left = 15 + 'px';\n gameOver.style.fontSize = 60 + 'px';\n gameOver.style.color = '#ffffff';\n gameOver.id = \"finit\";\n document.body.insertBefore(gameOver, restartGame);\n}", "title": "" }, { "docid": "fcf2519957849ee432b9a2e8c3d873b2", "score": "0.6285447", "text": "function resetGame() {\n\t//clears cards showing\n\tcardsInPlay = [];\n\tmoves = 0;\n\tmatches = 0;\n\t//Removes all pieces on game board\n\tlocation.reload();\n}", "title": "" }, { "docid": "928d255feace8e274f73950333a44dff", "score": "0.6285008", "text": "function clearScreen() {\n result.textContent = \"\";\n resetScreen = false;\n}", "title": "" }, { "docid": "bb2942ceddd89263bc2c3d50e5e38b0a", "score": "0.6282967", "text": "async restartGame() {\n\t\tgame.categories = [];\n\t\t$(\"#main-div\").remove();\n\t\t$(\"#restart-div\").remove();\n\t\tgame.showLoadingView();\n\t\tgame.hideLoadingView();\n\t\tawait game.setupAndStart();\n\t}", "title": "" }, { "docid": "6cbfd9aea89760b92306e2b30280565b", "score": "0.62755543", "text": "startGame() {\n this.startScreenOverlay.style.display = 'none';\n this.startScreenOverlay.classList = '';\n this.activePhrase = this.getRandomPhrase(this.phrases);\n this.activePhrase.phrase.addPhraseToDisplay();\n }", "title": "" }, { "docid": "afd33f9b3bdd4528295691b7da005b7e", "score": "0.62749094", "text": "function reset(){\n if(keyWentDown(\"space\")&&gamestate===end){\n gamestate =play;\n zombiegroup.destroyEach();\n kill=0;\n }\n}", "title": "" }, { "docid": "0d93792b42b3dbe52ce2849b69450a8e", "score": "0.6266944", "text": "function reset() {\n if(turns > 0 && win === false) {\n if(!confirm(\"Are you sure? You'll lose progress in your current game\")) {\n return;\n }\n }\n $(\"#menu-list\").css(\"display\", \"none\");\n setup(currentDifficulty);\n}", "title": "" }, { "docid": "1e16519a0f40571bf1a73474726f1206", "score": "0.6264666", "text": "function titleClicked() {\n // Tell the currently active version of the game to quit\n chess.quit();\n\n // Slide up all the things we don't want to see on the main menu\n $('.instruction').slideUp();\n $('#message').slideUp();\n $('.info-panel').slideUp();\n $('#fog-message').slideUp();\n\n // Disable the title from \"quitting\" when you're already there\n $('#title').removeClass('active');\n // Hide the info icon if present\n $('.info').stop().css('opacity', 0);\n $('.info').off('click');\n\n // Slide up the game and slide down the menu interface elements\n $('#game').slideUp(() => {\n $('.menu-item').slideDown();\n $('#author').slideDown();\n // Make all menu items active again\n $('.menu-item')\n .addClass('active')\n .on('click', menuClicked);\n });\n}", "title": "" }, { "docid": "ada63fd5b54c64882da7bff52488804b", "score": "0.6262686", "text": "function reset(){\n var fields = document.getElementsByClassName(\"field\");\n for(var i = 0; i < fields.length; i++){\n fields[i].innerHTML = \"\";\n }\n document.getElementById(\"whiteTurnDisplay\").style.display = \"none\";\n document.getElementById(\"blackTurnDisplay\").style.display = \"none\";\n document.getElementById(\"whiteVictoryDisplay\").style.display = \"none\";\n document.getElementById(\"blackVictoryDisplay\").style.display = \"none\";\n \n initGame();\n}", "title": "" }, { "docid": "67e459dc7ab639750cb014bf4154e0a2", "score": "0.62602746", "text": "function clearHandTittle() { \n if(win.style.display === 'block' ){\n TweenMax.set(win,{opacity:1,display:\"block\"});\n gsap.timeline().to(win, 0.3 ,{opacity:0,display:\"none\"});\n }\n else if(loose.style.display === 'block' ){ \n TweenMax.set(loose,{opacity:1,display:\"block\"});\n gsap.timeline().to(loose, 0.3 ,{opacity:0,display:\"none\"});\n }\n else if(tie.style.display === 'block' ){ \n TweenMax.set(tie,{opacity:1,display:\"block\"});\n gsap.timeline().to(tie, 0.3 ,{opacity:0,display:\"none\"});\n }\n}", "title": "" }, { "docid": "db282018a5d20e084174b347c8a63df3", "score": "0.6259887", "text": "resetGame() {\n this.removeOldPhraseBoxes();\n this.resetKeyboard();\n this.resetHearts();\n }", "title": "" }, { "docid": "c4a468be047eb7f7963edbd661b101bb", "score": "0.6250248", "text": "function startGame() {\n theme.play();\n shuffleQuestions();\n displayQuestion();\n }", "title": "" }, { "docid": "f353bc617e250d9056ccdca129ba908b", "score": "0.62494475", "text": "function reset() {\n initialise();\n clear();\n draw();\n}", "title": "" }, { "docid": "217779819021e955ff89cd20bc7e3a32", "score": "0.62381434", "text": "function reset() {\n\n gameState = PLAY;\n\n gameOver.visible = false;\n resetGame.visible = false;\n\n marioRunner.visible = true;\n playerLost.visible = false;\n\n creditScore = 0;\n coinsCollected = 0;\n marioLives = 5;\n\n}", "title": "" }, { "docid": "cf59ea02e1ac289956fe1b32fb14b44c", "score": "0.62345576", "text": "function gameStart() {\n //this line will get rid of the start button when the game starts//\n\n $(\"#start\").remove();\n\n\n getQuestion();\n\n\n}", "title": "" }, { "docid": "65afc04f7d14a0b1df5a2af49514ab0a", "score": "0.6234478", "text": "function homeScreen() {\n if (showHomeText)\n homeText();\n animatePlayBtn();\n if (key === 32 && doneAnim) {\n setTimeout(1000);\n gameScreen = 2;\n }\n key = 0;\n}", "title": "" }, { "docid": "82a94b8cd1cb63bdbb1005cea18adfe9", "score": "0.6230672", "text": "function resetScreen()\n{\n // If on submit highscore screen\n if(backButtonEl.classList.contains(\"hidden\"))\n {\n // Remove highscore screen specific elements\n footerEl.classList.add(\"hidden\");\n userLabelEl.classList.add(\"hidden\");\n userIdEl.classList.add(\"hidden\");\n submitButtonEl.classList.add(\"hidden\");\n skipButtonEl.classList.add(\"hidden\");\n }\n // If on view highscore screen\n else\n {\n // Remove view highscore specific elements\n scoreListEl.classList.add(\"hidden\");\n backButtonEl.classList.add(\"hidden\");\n clearButtonEl.classList.add(\"hidden\");\n\n // Add necessary elements\n introEl.classList.remove(\"hidden\");\n }\n\n // Add necessary elements\n highscoreButtonEl.classList.remove(\"hidden\");\n startButtonEl.classList.remove(\"hidden\");\n\n // Change textcontent to intro\n timerTimeEl.textContent = \"75\";\n questionEl.textContent = \"Coding Quiz Challenge\";\n introEl.textContent = \"Try to answer the following code-related questions within the time limit. Keep in mind that incorrect answers will penalize your score/time by ten seconds!\";\n \n // Change styles on page\n questionEl.setAttribute(\"style\", \"text-align: center\");\n introEl.setAttribute(\"style\", \"text-align: center\");\n mainEl.setAttribute(\"style\", \"text-align: center\");\n}", "title": "" }, { "docid": "50612759fc9ac94b3409f4146f29674b", "score": "0.62254196", "text": "function mainMenu()\n{\n\tgame = game.restart(false);\n\tactivePage = \"menu\";\n\t// Hides upcoming figures portion\n\tnextUps.forEach(x => x.clearRect(0,0,85,85));\n\t$(\"#next-txt\").fadeTo(0, 0);\n\n\t$(\"#score\").hide();\n\t$(\"#speed\").hide();\n\t$(\"#time\").hide();\n\n\tshowMainMenu();\n\t$(\"#start\").focus();\n\n}", "title": "" }, { "docid": "bb14df7fa50d0c9711310dc4577e1ac1", "score": "0.62240905", "text": "function resetGame() {\n letterIndex = 0;\n sentenceIndex = 0;\n displaySent();\n displayChar();\n resetDisp();\n}", "title": "" }, { "docid": "2e1c8d31fa48826462040aa4e7e22c77", "score": "0.62236035", "text": "function reset() {\n\n document.getElementById('game-over').style.display = 'none';\n document.getElementById('game-over-overlay').style.display = 'none';\n isGameOver = false;\n gameTime = 0;\n\n var player = new Player;\n\n level = new Level({\n nr: 1,\n player: player,\n scores: new Scores,\n canvas: canvas\n });\n}", "title": "" }, { "docid": "c28aad4a534ffcc84d3da5fd9e525563", "score": "0.6221101", "text": "function reset( ) {\n container.innerHTML = \"\";\n \n init ( );\n changeTitle ( constellationName );\n createConstellation( constellationData );\n animate( );\n}", "title": "" }, { "docid": "c98baf7e0e5ce688324f65655f8c597a", "score": "0.62185824", "text": "function startScreen() {\n if (start) {\n image(bg, 0, 0, width, height);\n fill(255, 255, 255);\n textSize(15);\n textAlign(CENTER, BASELINE);\n textStyle(BOLD);\n\n if (frameCount % 30 == 0) {\n if (blinkingMenu) {\n blinkingMenu = false;\n } else {\n blinkingMenu = true;\n }\n }\n\n if (blinkingMenu) {\n text('PRESS SPACE TO START', width / 2, 300);\n }\n startGame();\n }\n}", "title": "" } ]
aa19bd054fe7eb9ca57aca2de4c83649
Used to grok the `now` parameter to createClock.
[ { "docid": "58bbf2140c074cdd19e8830f07cf9478", "score": "0.0", "text": "function getEpoch(epoch) {\n if (!epoch) { return 0; }\n if (typeof epoch.getTime === \"function\") { return epoch.getTime(); }\n if (typeof epoch === \"number\") { return epoch; }\n throw new TypeError(\"now should be milliseconds since UNIX epoch\");\n }", "title": "" } ]
[ { "docid": "15988e3aa7b211915826dfe9fadb396d", "score": "0.67242754", "text": "function calGetClockTime(now)\r\n{\r\n var hour = now.getHours();\r\n var minute = now.getMinutes();\r\n var second = now.getSeconds();\r\n var ap = \"AM\";\r\n if (hour > 11) { ap = \"PM\"; }\r\n if (hour > 12) { hour = hour - 12; }\r\n if (hour == 0) { hour = 12; }\r\n if (hour < 10) { hour = \"0\" + hour; }\r\n if (minute < 10) { minute = \"0\" + minute; }\r\n if (second < 10) { second = \"0\" + second; }\r\n var timeString = hour +\r\n\t\t\t\t\t':' +\r\n\t\t\t\t\tminute +\r\n\t\t\t\t\t\" \" +\r\n\t\t\t\t\tap;\r\n return timeString;\r\n}", "title": "" }, { "docid": "5c9c822508594f70bbd03261d6400565", "score": "0.6572803", "text": "function now_macro() {\n var date = new Date();\n return(date.format(\"dd.MM.yyyy, HH:mm'h' zzz\"));\n}", "title": "" }, { "docid": "b49d1a38d2fbfb38ce0d459535a7515c", "score": "0.6507077", "text": "function now() {\n return mt.now();\n}", "title": "" }, { "docid": "63ba0d1da77b1830bc9e69dff4f85f14", "score": "0.64719015", "text": "now() {\n return now();\n }", "title": "" }, { "docid": "db2a23ff5dc718d7b274798d3fca6945", "score": "0.644819", "text": "function now() {\n return new Date();\n }", "title": "" }, { "docid": "13e101dceb8d1bba2afe6262d23706e3", "score": "0.6384524", "text": "function now() {\r\n return new Date();\r\n}", "title": "" }, { "docid": "8e1b432552f99fb9f7e40ba955d79e18", "score": "0.6347825", "text": "now () {\n return this.t;\n }", "title": "" }, { "docid": "305d94f2bb8814a263be5896a949c682", "score": "0.632176", "text": "function now() {\n return new Date();\n}", "title": "" }, { "docid": "305d94f2bb8814a263be5896a949c682", "score": "0.632176", "text": "function now() {\n return new Date();\n}", "title": "" }, { "docid": "6923ec7d2c481cc52533f9a60449d10e", "score": "0.62843454", "text": "static get now() {\n return new this(new Date());\n }", "title": "" }, { "docid": "34d144ec41f15fce0e35de361db13dc3", "score": "0.6257577", "text": "function now() {\r\n\tvar y, m, d, h, i, s, dt;\r\n\r\n\tdt = new Date();\r\n\r\n\ty = String(dt.getFullYear());\r\n\r\n\tm = String(dt.getMonth() + 1);\r\n\tif (m.length === 1) {\r\n\t\tm = '0' + m;\r\n\t}\r\n\r\n\td = String(dt.getDate());\r\n\tif (d.length === 1) {\r\n\t\td = '0' + d.toString();\r\n\t}\r\n\r\n\th = String(dt.getHours() + 1);\r\n\tif (h.length === 1) {\r\n\t\th = '0' + h;\r\n\t}\r\n\r\n\ti = String(dt.getMinutes() + 1);\r\n\tif (i.length === 1) {\r\n\t\ti = '0' + i;\r\n\t}\r\n\r\n\ts = String(dt.getSeconds() + 1);\r\n\tif (s.length === 1) {\r\n\t\ts = '0' + s;\r\n\t}\r\n\treturn y + '-' + m + '-' + d + ' ' + h + ':' + i + ':' + s;\r\n}", "title": "" }, { "docid": "e7d317fd8a1fd35bc1f538e8888bf997", "score": "0.6244204", "text": "function now() {\n var today = new Date();\n var h = today.getHours();\n var m = today.getMinutes();\n if (m < 10) {\n m = \"0\" + m;\n }\n var time_str = h + \":\" + m; \n return time_str;\n}", "title": "" }, { "docid": "fde8652a12ed8900ca886b0c4a49f352", "score": "0.6229787", "text": "function updateClock() {\n var now = new Date();\n clock.innerHTML = now.toLocaleTimeString([], {hour: '2-digit', minute:'2-digit'});\n}", "title": "" }, { "docid": "f316d0039bae51fa4dec7d9d4452d6af", "score": "0.6191748", "text": "function now() {\n var _now = new Date();\n return (_now.getMonth() + 1) + \"/\" +\n _now.getDate() + \"/\" +\n _now.getFullYear() + \" - \" +\n _now.getHours() + \":\" +\n ((_now.getMinutes() < 10) ? \"0\" + _now.getMinutes() : _now.getMinutes()) + \":\" +\n ((_now.getSeconds() < 10) ? \"0\" + _now.getSeconds() : _now.getSeconds());\n}", "title": "" }, { "docid": "867b9a507892d4c5be4c3d0c2febcea5", "score": "0.6178722", "text": "static now() {\n return Date.now();\n }", "title": "" }, { "docid": "a6dc6286c1502118f50a93d3b2f22278", "score": "0.6166376", "text": "function now() { return new Date().getTime() }", "title": "" }, { "docid": "5d053d8a08c6a0518c038a915d7dbe76", "score": "0.615277", "text": "function _get_now_sec(){ return Math.round((new Date()).getTime() / 1000); }", "title": "" }, { "docid": "f9526050a638878204857cd9b404eb08", "score": "0.6147883", "text": "function set_clock(){\n $('.clock').html(standard_time(now).replace(' ', ''));\n }", "title": "" }, { "docid": "256d748ad5f0eb26c4bd67f2134fed5c", "score": "0.61444956", "text": "now () {\n return Date.now()\n }", "title": "" }, { "docid": "48932ca1d595bc6e7f9ee1d74efd6980", "score": "0.6132118", "text": "function now() {\n return formatDateTime(moment());\n }", "title": "" }, { "docid": "5d21c4e5c1f4426de5bf15adb88784f6", "score": "0.6117054", "text": "function getCurrentTime() {\r\n setTimeout( getCurrentTime, 1 * 1000 );\r\n now = new Date();\r\n}", "title": "" }, { "docid": "eb8a112b59d8808e1e07206f5a9a4aa7", "score": "0.61035514", "text": "function now(){\n // yes, we defer the work to another function to allow mocking it\n // during the tests\n return now.get();\n }", "title": "" }, { "docid": "66dad9623d63c7a4000accdf958d236e", "score": "0.60798776", "text": "function set_now(fn) {\n now = fn;\n}", "title": "" }, { "docid": "66dad9623d63c7a4000accdf958d236e", "score": "0.60798776", "text": "function set_now(fn) {\n now = fn;\n}", "title": "" }, { "docid": "99347bb8973dbe4f94b673d635d66ed0", "score": "0.6060497", "text": "updateLiveClock_() {\n this.formattedClock = this.grrTimeService_.formatAsUTC();\n }", "title": "" }, { "docid": "e480cab051a920f1e6f00be7ab017042", "score": "0.60494775", "text": "function getNow() {\n return new Date().toISOString().\n replace(/T/, ' '). // replace T with a space\n replace(/\\..+/, '') // delete the dot and everything after\n}", "title": "" }, { "docid": "d664c66348a3046be82ce97059a335bc", "score": "0.6040547", "text": "function displayClock (timeNow) {\n\n\ttimeNow = Math.abs(timeNow);\n\tminutes = Math.floor(timeNow / 60);\n\tseconds = Math.round(timeNow % 60);\n\n\tif (seconds >= 10) {\n\t\t$timer.empty();\n\t\t$timer.append(minutes + \":\" + seconds);\n\t} else {\n\t\t$timer.empty();\n\t\t$timer.append(minutes + \":0\" + seconds);\n\t}\n}", "title": "" }, { "docid": "60712e91f9abee28bf6a41fa03f2f01e", "score": "0.6037464", "text": "static now() {\n return PerformanceTimer.nowFunc();\n }", "title": "" }, { "docid": "8e5c87e070e99c83406b147512075ce8", "score": "0.60165703", "text": "constructor() {\n this.now = new Date();\n }", "title": "" }, { "docid": "98b16d1732f49e5af800883917279a4b", "score": "0.59946567", "text": "function now() {\n return new Date().getTime();\n }", "title": "" }, { "docid": "c9514049faaa56287d3b80f8993e8b04", "score": "0.5971498", "text": "function nowTime() {\n\treturn moment().format('YYYY-MM-DD HH:mm:ss.SSS')\n}", "title": "" }, { "docid": "71383a1a6f6b0cc671e7cf012e8065d4", "score": "0.5941974", "text": "function now() {\n return new Date().getTime();\n }", "title": "" }, { "docid": "71383a1a6f6b0cc671e7cf012e8065d4", "score": "0.5941974", "text": "function now() {\n return new Date().getTime();\n }", "title": "" }, { "docid": "532aed88cb48ce44f824234ad1ffe9bc", "score": "0.59238136", "text": "function updateClock() {\n\n var now = new Date();\n hours = now.getHours();\n mins = now.getMinutes();\n secs = now.getSeconds();\n date = now.getDate();\n now = null; \n \n hours = hours < 10 ? '0' + hours : hours;\n mins = mins < 10 ? '0' + mins : mins;\n secs = secs < 10 ? '0' + secs : secs;\n \n newTime = hours + \":\" + mins + \":\" + secs;\n \n $('#today span#clock').html(newTime);\n}", "title": "" }, { "docid": "305e6c28375ff39cd7dd6bde6a2c8271", "score": "0.5917907", "text": "function currentTime() {\r\n return new Date().toLocaleTimeString([], {hour: '2-digit', minute:'2-digit'});\r\n }", "title": "" }, { "docid": "6dd2169a687605e379e65299407d5b6e", "score": "0.5908574", "text": "function getNow() {\n\tnow = new Date();\n\tyyyy = now.getFullYear().toString();\n\tmm = now.getMonth().toString();\n\tdd = now.getDate().toString();\n\thh = now.getHours().toString();\n\tmn = now.getMinutes().toString();\n\treturn yyyy + mm + dd + \"_\" + hh + \":\" + mn;\n}", "title": "" }, { "docid": "e56f91a543c96e953e1108e6e71f6cc6", "score": "0.59054095", "text": "function now(){return new Date().getTime();}", "title": "" }, { "docid": "907d8e2c7c98a131fb142263f4af998e", "score": "0.59034836", "text": "function timeFromNow() {\n return function(timestamp) {\n return moment(timestamp).fromNow();\n };\n }", "title": "" }, { "docid": "923c61ac89dbe74e1b1661731434aa51", "score": "0.58886665", "text": "static get nowObj() {\n if (Timer.USE_PERFORMANCE && typeof self !== 'undefined' && self.performance && 'now' in self.performance) {\n return self.performance;\n } else if (Date.now) {\n return Date;\n }\n\n return Timer.legacyDateCode;\n }", "title": "" }, { "docid": "17ac8ac3df9ad077f94bbc3e8a049581", "score": "0.5882894", "text": "function timeNow() {\n var d = new Date();\n var min = d.getMinutes();\n min = (min < 10 ? \"0\" : \"\") + min;\n var sec = d.getSeconds();\n sec = (sec < 10 ? \"0\" : \"\") + sec;\n var hrs = d.getHours();\n hrs = (hrs < 10 ? \"0\" : \"\") + hrs;\n return(hrs + \":\" + min + \":\" + sec);\n}", "title": "" }, { "docid": "80d4f0a569df1f1599699d91e780d24f", "score": "0.58584833", "text": "function setNow() {\n value = new Date();\n }", "title": "" }, { "docid": "0e600d40553a5fcfcef8efceea7efb7f", "score": "0.5848182", "text": "function formatInputDateTime(now) {\n\treturn moment(now).format(PERSONAL_DATE_TIME_FORMAT);\n}", "title": "" }, { "docid": "ddec5d5cab5964f6c989d80f3ee8e6e3", "score": "0.58453494", "text": "function appleTimeNow() {\n return Math.floor(Date.now() / 1000) - DATE_OFFSET\n}", "title": "" }, { "docid": "5966de5dc563f4fcb82dc06c0c372b13", "score": "0.58390224", "text": "tick() {\n this.setState({\n timeNow: moment().unix()\n });\n }", "title": "" }, { "docid": "c97b18f60e33fbb7a1833ce287dcd8c2", "score": "0.58354604", "text": "function now() {\n return Object(_core_Global__WEBPACK_IMPORTED_MODULE_0__[\"getContext\"])().now();\n}", "title": "" }, { "docid": "2d26a0b569ec856d4f18021bb1493461", "score": "0.5832797", "text": "function now() {\n return {\n line: line,\n column: column,\n offset: offset\n }\n }", "title": "" }, { "docid": "3f95ee918e6feb6bbd40dfd2b0769d03", "score": "0.58308935", "text": "function drawNewClock(date) {\r\n drawFace(ctx, radius);\r\n drawNumbers(ctx, radius);\r\n drawTime(ctx, radius, date);\r\n drawTicks(ctx, radius);\r\n}", "title": "" }, { "docid": "85887038232536c4f1aa71c8ef012db7", "score": "0.5825536", "text": "function now() {\n return (new Date()).getTime()\n }", "title": "" }, { "docid": "2fa5eab787a3c5e59a4c062effa35555", "score": "0.5824625", "text": "tick(){\n\n // Add the second\n clock.currentTime.setSeconds( clock.currentTime.getSeconds() + 1 );\n\n // Update the clock\n clock.setClock(clock.currentTime)\n\n }", "title": "" }, { "docid": "942d7e64bbacfe6ac1d326e0365f4223", "score": "0.5823792", "text": "function now() {\n return (new Date().getTime() / 1000);\n}", "title": "" }, { "docid": "cabe06468228de762207f8637075f958", "score": "0.5813004", "text": "function updateClock() {\n Date.getMinutesTwoDigits = function() {\n var retval = now.getMinutes();\n if (retval < 10) return (\"0\" + retval.toString());\n else return retval.toString();\n }\n Date.getHoursModTwelve = function() {\n var retval = now.getHours();\n retval = retval%12;\n if (retval == 0) retval = 12;\n return retval;\n }\n var now = new Date(),\n time = Date.getHoursModTwelve() + ':' + Date.getMinutesTwoDigits();\n\n document.getElementById('time').innerHTML = [\"\", time].join('');\n setTimeout(updateClock, 1000);\n}", "title": "" }, { "docid": "b46776d4a4789abc3df57f2098faa10e", "score": "0.5791449", "text": "function getNow () {\n var d = new Date();\n return JSON.parse(JSON.stringify(d).replace('Z', '000Z'));\n}", "title": "" }, { "docid": "4824533a75f23b1e8814014528b824c1", "score": "0.57851475", "text": "function calcNow() {\n var hr = process.hrtime();\n return hr[0] / SEC_MS + hr[1] * NS_MS;\n }", "title": "" }, { "docid": "6145b303e356b1a1b8b73cea1323fa26", "score": "0.57842386", "text": "function updateClock ( clock ) {\n\t clock.innerHTML = new Date().toLocaleTimeString();\n\t}", "title": "" }, { "docid": "f0b91c5d9fe79ca512b0aeee3cf400dc", "score": "0.5783058", "text": "function today() {\n return now();\n }", "title": "" }, { "docid": "4f1dc37aaed18c9a07feceb28ee185d6", "score": "0.577766", "text": "function handleClock() {\n runMainAndPrintOutput({\n type: 'clock',\n time: +new Date()\n })\n }", "title": "" }, { "docid": "dfb70ca6c325702e935501956bfe2245", "score": "0.5769026", "text": "function getCurrentTime() {\r\n return current;\r\n }", "title": "" }, { "docid": "5b93e7c0a58ccfee88b15e4a9c6282e9", "score": "0.5765773", "text": "function get_now() {\n return (new Date).getTime();\n}", "title": "" }, { "docid": "0eb36e3040e17d1b2beb1b077e0723e8", "score": "0.5756037", "text": "function _updateClock(){\n self.now = (self.duration*1000 - (Date.now() - _start)) / 1000;\n }", "title": "" }, { "docid": "dec5ce00a0e44cb240c2619c47f02909", "score": "0.57470536", "text": "function now() {\n return nowFn();\n}", "title": "" }, { "docid": "2571bf8e2a358190addb66b89540bc5e", "score": "0.57455194", "text": "function getNow() {\n\tvar myDate= new Date(Date.now() - 60000 * new Date().getTimezoneOffset()).toISOString()\n\t\tmyDate = myDate.substring(0, 10) + ' ' + myDate.substring(11, 19)\n\t\treturn myDate\n}", "title": "" }, { "docid": "58d829b72140369a4ffaae56cdc9c177", "score": "0.57445544", "text": "function now() {\n if (global.performance && typeof global.performance.now === 'function') {\n return global.performance.now();\n } else if (typeof Date.now === 'function') {\n return Date.now();\n } else {\n return (new Date()).getTime();\n }\n }", "title": "" }, { "docid": "ad151f7fa569a9bfd707adc3af4cfbb7", "score": "0.5727618", "text": "function Clock({ template }) {\n\n let timer;\n\n function render() {\n let date = new Date();\n\n let hours = date.getHours();\n if (hours < 10) hours = '0' + hours;\n\n let mins = date.getMinutes();\n if (mins < 10) mins = '0' + mins;\n\n let secs = date.getSeconds();\n if (secs < 10) secs = '0' + secs;\n\n let output = template\n .replace('h', hours)\n .replace('m', mins)\n .replace('s', secs);\n\n console.log(output);\n }\n\n this.stop = function () {\n clearInterval(timer);\n };\n this.start = function () {\n render();\n timer = setInterval(render, 1000);\n };\n\n}", "title": "" }, { "docid": "29d7e4d148cc07eeba14d87988c05d1e", "score": "0.5727541", "text": "function updateClock() {\n let today = new Date();\n let hours = today.getHours() % 12;\n let mins = today.getMinutes();\n let secs = today.getSeconds();\n hourHand.groupTransform.rotate.angle = hoursToAngle(hours, mins);\n minHand.groupTransform.rotate.angle = minutesToAngle(mins);\n secHand.groupTransform.rotate.angle = secondsToAngle(secs);\n //---\n if (preferences.clockDisplay === \"12h\") {\n // 12h format\n hours = hours % 12 || 12;\n } else {\n // 24h format\n hours = util.zeroPad(hours);\n }\n let dayOfM = util.zeroPad(today.getDate());\n mins = util.zeroPad(mins);\n secs = util.zeroPad(secs);\n myLabel.text = `${hours}`;\n minsLabel.text = `${mins}`;\n dayLabel.text = `${dayOfM}`;\n}", "title": "" }, { "docid": "7016d58c2a13e65284287e2b761c6f6e", "score": "0.57246006", "text": "function now(unixtime) {\n return unixtime ? Date.now() : new Date();\n }", "title": "" }, { "docid": "02dd40198b4fc0e1b6a1dc240d1076da", "score": "0.5722805", "text": "function updateClock() {\n let today = new Date();\n let hours = \"--\";\n let mins = \"--\";\n let ampm = \"\";\n if (today != null) {\n hours = today.getHours();\n if (preferences.clockDisplay === \"12h\") {\n if (hours < 12) ampm = \"AM\"; else ampm = \"PM\";\n if (hours === 0) hours = 12;\n if (hours > 12) hours -= 12;\n } else {\n hours = util.zeroPad(hours);\n }\n mins = util.zeroPad(today.getMinutes());\n }\n \n lblTime.innerText = `${hours}:${mins}`;\n lblAmPm.innerText = ampm;\n}", "title": "" }, { "docid": "6fa50c089a4bdf7f94b5f013da47d933", "score": "0.5709539", "text": "function updateClock() {\n let time = new Date();\n getTime(time);\n showWeekday(time);\n showCurrentDate(time);\n currentYear(time);\n}", "title": "" }, { "docid": "c7e493fb3301222660fd9d2fa5f19904", "score": "0.57083607", "text": "function BeatTime() {}", "title": "" }, { "docid": "e67ef90b6391375f3d01b1a43df0d36e", "score": "0.5700634", "text": "GetTime() {}", "title": "" }, { "docid": "e0db5bffe6ce981102f48743dc1a79ec", "score": "0.5695494", "text": "function now() {\n return performance ? performance.now() : Date.now();\n}", "title": "" }, { "docid": "258b88b535378d3e3d64564efae06ca4", "score": "0.56943023", "text": "function now_yyyy_mm_dd_hh_mm () {\n now = new Date();\n year = \"\" + now.getFullYear();\n month = \"\" + (now.getMonth() + 1); if (month.length == 1) { month = \"0\" + month; }\n day = \"\" + now.getDate(); if (day.length == 1) { day = \"0\" + day; }\n hour = \"\" + now.getHours(); if (hour.length == 1) { hour = \"0\" + hour; }\n minute = \"\" + now.getMinutes(); if (minute.length == 1) { minute = \"0\" + minute; }\n return year + \"-\" + month + \"-\" + day + \" \" + hour + \":\" + minute;\n}", "title": "" }, { "docid": "a59cd5d14a0ac127174913c8e4802eb9", "score": "0.569078", "text": "drawTime(){\n d=this.date ? this.date : new Date();\n const Y=Bangle.appRect.y+this.DATE_FONT_SIZE()+10;\n\n d=d?d :new Date();\n\n g.setFontAlign(0, -1).setFont(\"Vector\", this.TIME_FONT_SIZE()).setColor(g.theme.fg)\n .clearRect(Bangle.appRect.x, Y, Bangle.appRect.x2, Y+this.TIME_FONT_SIZE()-7)\n .drawString((\"0\" + require(\"locale\").time(d, 1)).slice(-5), this.centerX, Y, true);\n //.drawRect(Bangle.appRect.x, Y, Bangle.appRect.x2, Y+this.TIME_FONT_SIZE()-7); //DEV-Option\n\n setTimeout(this.draw.bind(this), 60000-(d.getSeconds()*1000)-d.getMilliseconds());\n }", "title": "" }, { "docid": "11db5f11609581567debc3dfb5b1f0f8", "score": "0.5689984", "text": "now() {\n return new Date().getTime();\n }", "title": "" }, { "docid": "afd197c3ff7723c5d226522e94214758", "score": "0.568344", "text": "function _drawTime() {\n document.getElementById('clock').innerHTML = _store.State.time.Template\n}", "title": "" }, { "docid": "10899ddc63934aa67fec3114bab8cf0a", "score": "0.5681913", "text": "function updateClock() {\n //console.log(\"Tick\");\n \n let nowDate = new Date();\n let hours = nowDate.getHours();\n let mins = nowDate.getMinutes();\n \n //hours = 13;\n \n if (mins < 10) { mins = `0${mins}`; }\n let ampm = hours < 12 ? \"AM\" : \"PM\"; \n \n if (preferences.clockDisplay === \"12h\"){\n time.text = `${hours%12 ? hours%12 : 12}:${mins} ${ampm}`;\n } else {\n time.text = `${hours}:${mins}`;\n }\n\n steps.text = (today.local.steps || 0);\n \n // Update mins ago\n if (minsAgo > 0) {\n minsAgoText = Math.round((Date.now()-minsAgo)/60000);\n age.text = `${minsAgoText} mins ago`;\n }\n //console.log(`MINS AGO: ${minsAgoText}`);\n\n // Update from file if ...\n \n let nowMoment = nowDate.getTime();\n let timeDelta = nowMoment - lastUpdateTime;\n \n if (timeDelta > (1000*5)) {\n readSGVFile('file.txt');\n }\n \n}", "title": "" }, { "docid": "4ebf869334f70b8797fa0e328824f4fc", "score": "0.56773555", "text": "function updateClock (){\n var currentTime = new Date ( );\n\n var currentHours = currentTime.getHours ( );\n var currentMinutes = currentTime.getMinutes ( );\n var currentSeconds = currentTime.getSeconds ( );\n\n // Pad the minutes and seconds with leading zeros, if required\n currentMinutes = ( currentMinutes < 10 ? \"0\" : \"\" ) + currentMinutes;\n currentSeconds = ( currentSeconds < 10 ? \"0\" : \"\" ) + currentSeconds;\n\n // Compose the string for display\n var currentTimeString = currentHours + \":\" + currentMinutes + \":\" + currentSeconds;\n\n // Update the time display\n document.getElementById(\"clock\").firstChild.nodeValue = currentTimeString;\n}", "title": "" }, { "docid": "03cae78bad4f6a8b1c840fe801c77efa", "score": "0.56754744", "text": "function updateTime(){//function for upadating the time\n var nowMS = now.getTime();//creating an object which holds the current time\n nowMS += 1000;//increasing time by 1 second\n now.setTime(nowMS);//setting the time of the \"now\" object to the incremented time\n var clock = document.getElementById('clock');//getting hold of the element which displays time in the document\n if(clock){//if exists\n clock.innerHTML = now.toLocaleTimeString() + \"<br />\" + now.toDateString();//to update the content of the element with updated time and date\n }\n }", "title": "" }, { "docid": "d32c581d1348d9d2e05fd1d92e8c5d9a", "score": "0.5671432", "text": "function now(x) { return x < 10 ? '0' + x:x}", "title": "" }, { "docid": "f7ae433b23040fba45ad8cfbcde6efbe", "score": "0.5667159", "text": "intNow() {\n return BaseScheduler.intNow(this.dateUtil);\n }", "title": "" }, { "docid": "f79b4a69fe5ffd5bafcd00fc7526b2cb", "score": "0.56562316", "text": "clockify(input) {\n let timeSec = this.state.currentTimeDisp % 60;\n let timeMin = Math.round(this.state.currentTimeDisp / 60 - timeSec / 60);\n return (timeMin < 10 ? '0' + timeMin : timeMin) +\n ':' + (timeSec < 10 ? '0' + timeSec : timeSec);\n }", "title": "" }, { "docid": "d4c460d5e584cca8cb6230e074dadf73", "score": "0.5653649", "text": "function currentTime() {\n let date = new Date();\n let hour = date.getHours();\n let min = date.getMinutes();\n let sec = date.getSeconds();\n let midday = \"AM\";\n midday = (hour >= 12) ? \"PM\" : \"AM\";\n hour = (hour == 0) ? 12 : ((hour > 12) ? (hour - 12) : hour);\n hour = updateTime(hour);\n min = updateTime(min);\n sec = updateTime(sec);\n document.getElementById('clock').textContent = `${hour}:${min}:${sec}`;\n let t = setTimeout(function () {\n currentTime();\n }, 1000);\n}", "title": "" }, { "docid": "e22be86b802e4bed55721c6269170105", "score": "0.5645574", "text": "function showCurrentTime() {\n clock.innerHTML = moment().format(\"ddd, Do MMM, YYYY HH:mm:ss\");\n}", "title": "" }, { "docid": "c70646411010e2e919b3ad151ca06028", "score": "0.56453735", "text": "updateCurrentMSecs() {\n this.currentMSecs = Date.now();\n }", "title": "" }, { "docid": "e58ec74c8bfbb0c75c88f5afdce76c09", "score": "0.5637148", "text": "function updateNow() {\n updateTime();\n updateDate(0);\n updateBatteryState();\n }", "title": "" }, { "docid": "e5e6f8d8023d5f6644f7f9e4c9088d14", "score": "0.5629885", "text": "static setTime() {\n var clockElement = document.getElementById('clock');\n \n var now = new Date;\n var h = this.addZero(now.getHours());\n var m = this.addZero(now.getMinutes());\n var s = this.addZero(now.getSeconds());\n var time = h + ':' + m + ':' + s;\n \n clockElement.innerText = time;\n }", "title": "" }, { "docid": "a1468e9cec092184d914a8d071600472", "score": "0.5621987", "text": "function GetNow() {\n return moment.utc().add(0, 'm');\n}", "title": "" }, { "docid": "d4125ee5cb6dc834b7b120224ac751b7", "score": "0.5617663", "text": "function dateTimeNow() {\n return dateFormat(new Date(), \"dd-mm-yyyy-HH-MM-ss\");\n}", "title": "" }, { "docid": "7ba0785bb77d7c176b9558513a6ab308", "score": "0.56135166", "text": "function GetNowDateString()\n{\n // Yeah, this will be off an hour at DST, but that's OK\n // In Pacific, this should \"roll over\" to the next song at 1:00 AM standard,\n // or 2:00 AM daylight savings, which works fine in different US timezones\n var date = new Date(Date.now() - (3600000 * 10));\n var year = date.getUTCFullYear();\n var month = date.getUTCMonth() + 1;\n var day = date.getUTCDate();\n\n return (year + \"-\" + ((month < 10) ? \"0\" : \"\") + month + \"-\" + ((day < 10) ? \"0\" : \"\") + day);\n}", "title": "" }, { "docid": "bc6b49de92d20e0cb0b279a1cf39e45d", "score": "0.56099033", "text": "SetTime() {}", "title": "" }, { "docid": "4406c740f6de1ccbfec44a64b1fb663c", "score": "0.560545", "text": "drawTime() {\n\t\tthis.ctx.font = '500 40px Noto Sans JP';\n\t\tthis.ctx.fillStyle = '#fb5607';\n\t\tthis.ctx.textAlign = 'center';\n\t\tthis.ctx.fillText(`${this.currentTime}`, TIME_POSITION.x, TIME_POSITION.y);\n\t}", "title": "" }, { "docid": "784481336ce459dce1244212efd472e3", "score": "0.55968106", "text": "function now() {\n return moment().utcOffset(TXP.helpers.getTimezoneString());\n }", "title": "" }, { "docid": "65cefce63b499957c3dde4eb0c7cdf15", "score": "0.55847526", "text": "function currentTime() {\n let date = new Date();\n let hour = date.getHours();\n let min = date.getMinutes();\n let sec = date.getSeconds();\n\n hour = hour > 12 ? hour - 12 : hour;\n hour = twoDigits(hour);\n min = twoDigits(min);\n sec = twoDigits(sec);\n\n document.querySelector(\"#clock\").innerHTML = `${hour} : ${min} : ${sec}`;\n}", "title": "" }, { "docid": "ee55c01bc30ea7d4c2d739a9c3551bc6", "score": "0.5573951", "text": "function getNow() {\r\n return new Date().getTime()\r\n}", "title": "" }, { "docid": "9c06b5036335ec0ed8fac1d0e8cd2532", "score": "0.55648535", "text": "function now(){\n return new Date().getTime();\n}", "title": "" }, { "docid": "b4445d7d243de3cc19d5860445cb23ce", "score": "0.5559145", "text": "now() {\n NotificationManager.notifyNow(this.notification);\n }", "title": "" }, { "docid": "57025fd2787c8fe8e76d097b6dd014f3", "score": "0.55564463", "text": "function nowLegacy() {\n return Date.now() * 1000;\n}", "title": "" }, { "docid": "2e0b6534d9e4b401bcb6d015747c1223", "score": "0.55525684", "text": "render(clock){\n\n\t}", "title": "" }, { "docid": "70e707a35f294bcadf17ef3afb4fdd2b", "score": "0.55505776", "text": "function timefmt(now, last) {\n //letiable to hold the current time, formatted as YYYY-MM-DDTHH:MM:SS.mmmZ\n let nowstr = now.toJSON();\n //letiable to hold the output string, now empty\n let outstr = \"\";\n //letiable to hold the current date as a string. uses regular expression to match everything before the \"T\"\n let datestr = nowstr.match(/([0-9,-]+)T/)[1].cyan;\n //letiable to hold the current time as a string. uses regular expression to match everything between the \"T\" and the \"Z\"\n let timestr = nowstr.match(/T([0-9,\\:,\\.]+)Z/)[1].bold.blue;\n //checks if the dates are different\n if (last && checkDateDiff(last, now)) {\n //assign the date string and a space to the output\n outstr = datestr + \" \";\n }\n //append the time string to the output\n outstr = outstr + timestr;\n //return the output\n return outstr;\n}", "title": "" }, { "docid": "b740c9264c328054c46532daeb2471eb", "score": "0.5542857", "text": "function getNow() {\n var now = new Date();\n\n return {\n hours: now.getHours() + now.getMinutes() / 60,\n minutes: now.getMinutes() * 12 / 60 + now.getSeconds() * 12 / 3600,\n seconds: now.getSeconds() * 12 / 60\n };\n }", "title": "" }, { "docid": "ec5741e2bbb806babd23b1f425306ce6", "score": "0.55419034", "text": "function updateClock ( ) {\n var currentTime = new Date ( );\n var currentHours = currentTime.getHours ( );\n var currentMinutes = currentTime.getMinutes ( );\n var currentSeconds = currentTime.getSeconds ( );\n\n // Pad the minutes and seconds with leading zeros, if required\n currentMinutes = ( currentMinutes < 10 ? \"0\" : \"\" ) + currentMinutes;\n currentSeconds = ( currentSeconds < 10 ? \"0\" : \"\" ) + currentSeconds;\n\n // Choose either \"AM\" or \"PM\" as appropriate\n var timeOfDay = ( currentHours < 12 ) ? \"AM\" : \"PM\";\n\n // Convert the hours component to 12-hour format if needed\n currentHours = ( currentHours > 12 ) ? currentHours - 12 : currentHours;\n\n // Convert an hours component of \"0\" to \"12\"\n currentHours = ( currentHours == 0 ) ? 12 : currentHours;\n\n // Compose the string for display\n var currentTimeString = currentHours + \":\" + currentMinutes + \":\" + currentSeconds + \" \" + timeOfDay;\n \n \n $(\"#trenutno_vrijeme\").html(currentTimeString);\n}", "title": "" }, { "docid": "8ee39de864d7dee56d42384a17f81e4c", "score": "0.55392575", "text": "function currentTime () {\n var nowTime = new Date();\n var hours1 = nowTime.getHours();\n var minutes1 = nowTime.getMinutes();\n var seconds1 = nowTime.getSeconds();\n\n\n // use ternary operator to correct for digits\n\n rawHours = hours1;\n\n hours1 = (hours1 < 12 ? hours1 : hours1 - 12);\n minutes1 = (minutes1 < 10 ? '0' : '') + minutes1;\n seconds1 = (seconds1 < 10 ? '0' : '') + seconds1;\n\n // console.log(hours1);\n // console.log(minutes1);\n // console.log(seconds1);\n\n\n // turn this into a real clock\n var clock1Time = ' ' + hours1 + ':' + minutes1 + ':' + seconds1 + (rawHours <= 12 ? ' AM' : ' PM');\n // console.log(clock1Time);\n\n\n // put the time on the page\n $('#clock1time').html(clock1Time);\n\n}", "title": "" } ]
a4e71aca9b9f922e237c201fe96f2b96
Function for loading the tweets from the database
[ { "docid": "4e7d45086676fccb1ba6a97a453875f1", "score": "0.7385869", "text": "function loadTweets() {\n $.ajax({\n url: '/tweets',\n method: 'GET',\n dataType: 'json'\n })\n .then(function(data){\n renderTweets(data);\n });\n }", "title": "" } ]
[ { "docid": "a5989bcdd00034011c5a99283b95d54b", "score": "0.7729922", "text": "function loadTweets() {\n $.get('/tweets', data => {\n const newData = data.filter(tweet => tweet.created_at > lastFetched);\n lastFetched = Date.now();\n renderTweets(newData);\n });\n }", "title": "" }, { "docid": "b5c7e7812b1c1b1f6810b755f17ed5c3", "score": "0.75982684", "text": "function loadAllTweets() {\n $.getJSON('/tweets', function(data) {\n renderTweets(data);\n });\n }", "title": "" }, { "docid": "6eb9db3de4f59a62982d9c81c4da0dbf", "score": "0.75339955", "text": "function loadTweets() {\n $.ajax(\"/tweets\", {method: \"GET\"})\n .then(function(arrayOfTweets) {\n renderTweets(arrayOfTweets);\n })\n }", "title": "" }, { "docid": "34f4a0b1997176f34ff066b081bbb158", "score": "0.753096", "text": "function loadTweets() {\n $.get(\"/tweets\", function(data) {\n renderTweets(data);\n });\n }", "title": "" }, { "docid": "792cbc9dc18c60d871af1117adbd9168", "score": "0.75282496", "text": "function loadTweets() {\n $.getJSON('/tweets')\n .done((tweets) => {\n renderTweets(tweets);\n });\n }", "title": "" }, { "docid": "cb9b2db46c587262b91fb0bd7ad127d9", "score": "0.75171876", "text": "function loadTweets() {\n $.getJSON(\"/tweets\").done((data) => {\n renderTweets(data);\n });\n }", "title": "" }, { "docid": "0f94eca50d9ed64fc94aa4a98e956040", "score": "0.75086975", "text": "function loadTweets (isSingleTweet) {\n if (isSingleTweet) {\n // passed in from AJAX POST request for single new tweet\n $.ajax('/tweets', { method: 'GET' }).then(function (data) {\n let newTweet = data.slice(data.length - 1)\n renderTweets(newTweet)\n })\n } else {\n // load all tweets from database and render all tweets in data\n $.ajax('/tweets', { method: 'GET' }).then(function (data) {\n renderTweets(data)\n })\n }\n }", "title": "" }, { "docid": "6cde372af0e84cec7802db16781066c5", "score": "0.7464195", "text": "function loadTweets() {\n $.get('/tweets', (tweets) => {\n renderTweets(tweets.reverse());\n });\n }", "title": "" }, { "docid": "764fce822f27fd9abf168fcac6291f0c", "score": "0.7458148", "text": "function loadTweets() {\n $.ajax({\n url: '/tweets/',\n method: 'GET'\n }).done(renderTweets);\n }", "title": "" }, { "docid": "8b9f059affe0f6025c13b703974de4e9", "score": "0.74571407", "text": "function loadTweets() {\n $.ajax('/tweets', { method: 'GET' }) \n .then(function (data) {\n renderTweets(data);\n });\n }", "title": "" }, { "docid": "055267d2c5593bb60547603b7627c5fd", "score": "0.74362856", "text": "function getTweets()\n\t{\n\t\tobjectStore = db.transaction('tweets').objectStore('tweets');\n\n\t\tobjectStore.openCursor(null, 'prev').onsuccess = function(event)\n\t\t//objectStore.openCursor().onsuccess = function(event)\n\t\t{\n\t\t\tvar cursor = event.target.result;\n\n\t\t\tif (cursor) {\n\n\t\t\t\t// Add tweets to an array\n\t\t\t\ttweetsArray.push(cursor.value);\n\n\t\t\t\t//console.log(cursor.value);\n\n\t\t\t\tcursor.continue();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tconsole.log('No more entries!');\n\n\t\t\t\t$scope.$apply(function(){\n\n\t\t\t\t\t$scope.tweets = tweetsArray;\n\n\t\t\t\t});\n\n\t\t\t}\n\n\t\t};\n\n\t}", "title": "" }, { "docid": "52ec3b8f20fed3a102aacfce2170363b", "score": "0.74359334", "text": "function loadTweets() {\n $.ajax({\n url: '/tweets',\n method: 'GET',\n success: function (moreTweets) {\n console.log('Success: ', moreTweets);\n renderTweets(moreTweets)\n }\n });\n }", "title": "" }, { "docid": "dc675ff956096e76f9637980bd950431", "score": "0.74271137", "text": "function loadTweets(){\n $.ajax({\n method: 'GET',\n url: '/tweets',\n success: function(result){\n renderTweets(result);\n },\n error: function(err){\n console.log('error');\n }\n });\n }", "title": "" }, { "docid": "ae695bb6bdf36840164c222fc6da508a", "score": "0.7375115", "text": "function loadTweets() {\n $.ajax({\n type: \"GET\",\n url: \"/tweets\",\n error: err => {\n console.log(err);\n },\n success: data => {\n // Builds the HTML for each tweet then renders it to the page\n renderTweets(data);\n }\n });\n }", "title": "" }, { "docid": "ba529982d02e94a7f7315ab08074bbc2", "score": "0.73746127", "text": "function loadTweets() {\n $.ajax({\n method: 'GET',\n url: '/tweets'\n }).done(function(tweet){\n renderTweets(tweet);\n });\n}", "title": "" }, { "docid": "7ed0c00483f9e3f60159cbdea1fc295e", "score": "0.7274032", "text": "function loadTweets() {\n $.getJSON('/tweets')\n .done((tweets) => {\n renderTweets(tweets);\n })\n}", "title": "" }, { "docid": "c72930f735b60b6f8c5aefe0efabf1c7", "score": "0.7249069", "text": "function loadTweets() {\n $.ajax({\n method: \"GET\",\n url: \"/tweets\"\n })\n .done(tweets => {\n renderTweets(tweets);\n })\n .fail(error => {\n console.log(\"Error\");\n });\n }", "title": "" }, { "docid": "af6409376d2bfe7364ebee8630518c97", "score": "0.720472", "text": "function getTweets(callback) {\n db.collection(\"tweets\").find().toArray(callback);\n }", "title": "" }, { "docid": "8bae600348ff81f246fd407f607f20ad", "score": "0.71924406", "text": "function loadAllTweets(callback)\n{\n\t$.get(\"/api/authenticate\")\n\t.done(function(data){\n\n\t\tif(data != null && data != \"\"){\n\t\t\t$.get(\"/api/tweets\", function(data){\n\t\t\t\tcallback(data);\n\t\t\t});\n\t\t}\n\t})\n\t.fail(function(err){\n\t});\n\t\n}", "title": "" }, { "docid": "8f979091472a78bc73ba0f9260833168", "score": "0.7192436", "text": "function loadTweets() {\n //first clear the container containing the tweets\n $( 'section.tweets' ).empty();\n\n $.ajax({\n url: '/tweets',\n method: 'GET',\n success: (tweets) => {\n extractTweets(tweets);\n }\n })\n .done( (result) => {\n });\n }", "title": "" }, { "docid": "5b57f2cb984d3277ae64e9c738c84504", "score": "0.71905524", "text": "function loadTweets(){\n $.ajax({\n url: '/tweets',\n method: 'GET',\n dataType: 'json',\n success: renderTweets,\n failure: function() {\n console.log(\"error\");\n }\n });\n }", "title": "" }, { "docid": "9e9b4c75ff2650f677364a4fdfd88f39", "score": "0.7181783", "text": "function getTweets() {\n loadJSON(/tweets/ + searchInput.value(), gotTweets);\n}", "title": "" }, { "docid": "3c4548636e4e62c583a61e04b28ec331", "score": "0.7174201", "text": "function loadTweets() {\n $('#tweets-container').empty();\n $.ajax('/tweets', { method: 'GET'})\n .then(function(tweet) {\n renderTweets(tweet);\n });\n}", "title": "" }, { "docid": "fc37e335ab9543eab74ae360b91d02af", "score": "0.716634", "text": "function loadTweets(){\n $.getJSON('/tweets', renderTweets) \n }", "title": "" }, { "docid": "6a07ece73d4813b3ed91d044b74c2de2", "score": "0.71597534", "text": "function loadTweets(){\n $.ajax({\n url: '/tweets',\n type: 'GET'\n }).then(function (jsonContent) {\n renderTweets(jsonContent);\n });\n}", "title": "" }, { "docid": "f01126591a14c31235fcf966cd8b38ae", "score": "0.70759314", "text": "function loadAndRenderTweets() {\n return loadTweets()\n .then(sortTweetsAscending)\n .then(renderTweets)\n .fail(handleError);\n}", "title": "" }, { "docid": "34cab4b15955cf387529c9a868a401ce", "score": "0.70702106", "text": "function populateTweets(){\n $.ajax('/tweets', { method: 'GET' })\n .then(function (tweetFeed) {\n renderTweets(tweetFeed);\n });\n }", "title": "" }, { "docid": "2d75f3a824920648ba37c1c39fba4eed", "score": "0.70565975", "text": "function loadTweets() {\n $.ajax({\n method: 'GET',\n url: '/tweets',\n success: function(result){\n \n renderTweets(result);\n \n //create a function to render tweets\n },\n error: function(error){\n console.log(\"there was an error in making ajax call\");\n console.log(error);\n }\n });\n }", "title": "" }, { "docid": "6dc37e5210b8ef7aaf4609f6fc9cf328", "score": "0.6845419", "text": "function loadTweets(){\n $.ajax({\n url: \"/tweets\",\n method: \"GET\",\n success: function (tweets) {\n renderTweets(tweets);\n //removing the text of the tweet, and resetting counter\n $(\"form\").find(\"textarea\").val(\"\");\n $(\"form\").find(\".counter\").html(140)\n }\n });\n }", "title": "" }, { "docid": "e49198c4006d718ba9c1d19d1d17c418", "score": "0.6838675", "text": "function loadTweets() {\n return $.get('/tweets');\n}", "title": "" }, { "docid": "be40ea4f9aaeccb1ebe70233b7769ff2", "score": "0.68243545", "text": "function getTweetData(){\n\n var tweetdb;\n\n var request = window.indexedDB.open(\"twDatabase\", 1);\n\n request.onerror = function(e) {\n console.log(\"error: \"+ e);\n };\n\n\n request.onsuccess = function(e) {\n tweetdb = e.target.result;\n var transaction = tweetdb.transaction([\"tweetStore\"], \"readonly\");\n var store = transaction.objectStore(\"tweetStore\");\n var query = store.get(\"tweetData\");\n\n query.onsuccess = function(e) {\n\n var result = e.target.result;\n $scope.tweets = result.tweets;\n tweetdb.close();\n }\n query.onerror = function(e) {\n console.log(\"Error\",e.target.error.name);\n //some type of error handler\n }\n\n };\n\n }", "title": "" }, { "docid": "7a4b033201fc790e042914606458c8ee", "score": "0.6779684", "text": "function loadTweets() {\n $.ajax({\n method: \"GET\",\n url: \"/tweets/\",\n })\n .then(function (data) {\n renderTweets(data);\n })\n .catch(function (error) {\n console.log(error);\n });\n}", "title": "" }, { "docid": "9b472f98e9ed6b0be390785b2f57c8b3", "score": "0.6733502", "text": "async function loadTweets(username) {\n var uri = 'https://faculty.washington.edu/joelross/proxy/twitter/timeline/?'+'screen_name='+username+'&count=100';\n tweets = await d3.json(uri);\n var result = analyzeTweets(tweets);\n showEmotionData(result);\n}", "title": "" }, { "docid": "b7448532d544d8be633aa718f1ab1aba", "score": "0.6692354", "text": "function getTweets() {\n\n // Reset our structure\n tweets = [];\n $tweets.html('');\n\n // Make a request to the server\n $.getJSON('/api/tweets', function(response){\n\n if ( 'tweets' in response ) {\n $handle.text(response.user);\n parseTweets(response.tweets);\n } else if ( 'message' in response ) {\n console.log(response.message);\n }\n\n }, function(err){\n console.log('error', arguments);\n });\n }", "title": "" }, { "docid": "23625993f7abc40801a988159badf19c", "score": "0.66249365", "text": "function renderTweets(database) {\n $(\".tweets\").empty();\n for (let id in database) {\n const tweetElement = createTweetElement(database[id]);\n $(\".tweets\").prepend(tweetElement);\n }\n}", "title": "" }, { "docid": "5885bb8141cb48a94180aa5d1d07df00", "score": "0.66112375", "text": "function loadTweets(num) {\n $.ajax('tweets', { method: 'GET' })\n .then((tweets) => {\n if (num === undefined) {\n renderTweets(tweets);\n } else {\n renderTweets(tweets, num);\n }\n });\n }", "title": "" }, { "docid": "de888699e2bbb849db98e593d4ab3656", "score": "0.6564101", "text": "function getTweets(query, callback){\n\tMongoClient.connect(url, function(err, db) {\n \t\tassert.equal(null, err);\n\t\tconsole.log(\"Connected successfully to Mongo\");\n\t\tvar tweets = db.collection(\"tweets\");\n\t\tconsole.log(tweets);\n\n\t\ttweets.find(query).toArray(function(err, docs) {\n\t assert.equal(err, null);\n\t console.log(\"Found the following records\");\n\t console.log(docs);\n\t callback(docs);\n\n\t db.close();\n\t });\n});\t\n}", "title": "" }, { "docid": "b0e70cd833c0c530fbefa1722361f9ec", "score": "0.6549548", "text": "function loadTweets() {\n $.ajax({\n url: '/tweets',\n method: \"GET\",\n success: data => {\n $(\"#tweet-box\").empty()\n renderTweets(data);\n },\n failure: error => {\n console.log(error);\n }\n });\n}", "title": "" }, { "docid": "cedfe1fa8fee3ad68b26e30436e8f276", "score": "0.65360224", "text": "function loadTweets() {\n $.get(\"/tweets\").done(renderTweets)\n $(\"#tweetPost\").val('');\n $(\"span.counter\").text(140);\n $(\".new-tweet p2\").text('')\n\n}", "title": "" }, { "docid": "9d20888a8146be375cde6480664a945c", "score": "0.6500139", "text": "function getTweets() {\n\tclient.get('statuses/user_timeline', login, function(error, tweets, response) {\n\t if (!error) {\n\t for (var i = 0; i < 20; i++) {\n\t \tconsole.log(\"--------------------------------------------\")\n\t \tconsole.log(tweets[i].created_at + \" | \" + tweets[i].text);\n\t }\n\t } else {\n\t \tthrow Error;\n\t }\n\t});\n}", "title": "" }, { "docid": "48314b8c8411fd0a75c97dab1dc91277", "score": "0.64942616", "text": "function tweets() {\n const client = new Twitter(keys.twitter);\n client.get(\"statuses/home_timeline\", (error, tweets) => {\n if (!error) {\n tweets.forEach(tweet => {\n console.log(`User Name: ${tweet.user.name}`);\n console.log(`Tweet Time: ${tweet.created_at}`);\n console.log(`Tweet Content: ${tweet.text}`);\n console.log(`-------------------------------`);\n });\n } else {\n console.log(`No Tweets to Show`);\n };\n });\n}", "title": "" }, { "docid": "9c6693276b539cc7964d282b7826f397", "score": "0.64668506", "text": "function loadTweets(url) {\n fetch(url)\n .then(\n function (response) {\n response.json().then(function (data) {\n showStatistics(analyzeTweets(data));\n });\n })\n}", "title": "" }, { "docid": "bec6c29d5753577bb1f17f2d22c684dc", "score": "0.64645106", "text": "function myTweets() {\n client.get('search/tweets', params, gotData);\n\n function gotData(error, data, response) {\n var tweets = data.statuses;\n for (var i = 0; i < tweets.length; i++) {\n if (error) {\n twittPrint(error);\n } else {\n answersPrint(tweets[i].created_at);\n answersPrint(tweets[i].text);\n }\n }\n }\n}", "title": "" }, { "docid": "2e0465110b6fd545c3e14e16b37196ba", "score": "0.6455153", "text": "function handleTweets() {\n\t\tgetQueryCrypto();\n\t\ttwitterService\n\t\t\t.getRecentTweets(params)\n\t\t\t.then((response) => {\n\t\t\t\t// Showing the first 10 tweets\n\t\t\t\tsetFeed(filterTweetByLang(response.data, \"en\").slice(0, 10));\n\t\t\t\t// Analyzing all retrieved tweets.\n\t\t\t\tlet newSentiment = getSentimentFromTweets(getFilteredTweets(response.data));\n\t\t\t\tsetTweetsSentiment(newSentiment);\n\t\t\t\tsetLoading(false);\n\t\t\t})\n\t\t\t.catch((err) => console.error(err));\n\t}", "title": "" }, { "docid": "4151f616faca4c85984e51bb3e5d63a6", "score": "0.64383554", "text": "function getTweets(){\n logEntry(\"getTweets\", null);\n\n timeLine.get('statuses/user_timeline', userTwitter, function(err, tweets, response){\n if(err) {\n console.log(\"An error has occurred: \" + err);\n } \n if (response.statusCode === 200) {\n for(i = 0; i < tweets.length; i++){\n var text = tweets[i].text;\n var time = tweets[i].created_at;\n var stamp = time.substr(0, 19);\n\n log(`On ${stamp}, you tweeted:`);\n console.log(`\"${text}\"\\n`);\n } \n } \n }); \n} // Twitter", "title": "" }, { "docid": "275c95a905ee32f9430fd3bd92740fc9", "score": "0.64315397", "text": "function getTweets () {\n //Grab last 20 tweets\n var params = {\n q: 'tweets',\n count: 20\n };\n //Get Tweet Data\n client.get('statuses/user_timeline', params, gotTweetData);\n console.log(\"\\n\");\n //Function to console log tweet data\n function gotTweetData(err, data, response) {\n if (err) {\n logToFile('err', 'my-tweets');\n return console.log('Error occurred: ' + err);\n }\n console.log(\"\\n------------- My Latest Tweets -------------\\n\");\n for (var i = 0; i < data.length; i++){\n var displayMyTweets = i+1+\". Created on: \" + data[i].created_at\n + \"\\nTweet: \" + data[i].text\n + \"\\n---------------------------------------------\\n\";\n console.log(displayMyTweets);\n logToFile('noErr', displayMyTweets);\n }\n console.log(\"\\n\");\n }//End of getTweetData\n}//End of getMyTweets", "title": "" }, { "docid": "835b8962e26833b3bcaf1c48a5ab8667", "score": "0.64306015", "text": "function getTweets() {\n var tClient = new Twitter(twitterKeys);\n\n var twitParams = {\n screen_name: '_McShaznasty_'\n };\n\n \n tClient.get('statuses/user_timeline', twitParams, function(err, tweets, response) {\n if (!err) {\n for(i=0; i<tweets.length; i++){\n var allTweets = tweets[i];\n\n var tweetText = allTweets.text;\n var tweetTime = allTweets.created_at;\n\n console.log(tweetText);\n console.log(tweetTime);\n };\n } else {\n throw err\n }\n });\n }", "title": "" }, { "docid": "f8f8b5242833ea28f9ca0cf404a6b8df", "score": "0.6427076", "text": "function getTweets() {\n twitterClient.get('statuses/user_timeline', { count: 20 }, function(error, tweets, response) {\n if (!error) {\n tweets.forEach(function(tweet) {\n console.log('---------------------------------------------- \\n Created: '\n \t+ tweet.created_at + \"\\n\" + \"Tweet: \" + tweet.text);\n });\n } else {\n console.log(error);\n }\n })\n}", "title": "" }, { "docid": "311d2e51c5ce5369add7cc3faaf4ccb8", "score": "0.63978994", "text": "function loadNewTweet() {\n $.getJSON('/tweets', function(data) {\n let $input = createTweetElement(data[data.length - 1]);\n $('.tweet-container').prepend($input);\n });\n }", "title": "" }, { "docid": "b149b4c26929904c966ab87a5ed339f9", "score": "0.6377511", "text": "function initalizeTweets(){\n if(tweets != []){\n setInterval(getTweets, 60100);\n getTweets();\n }\n}", "title": "" }, { "docid": "3bfc282f24080bffc4212ac083dfec08", "score": "0.63657516", "text": "function getTweetsLs() {\n let tweets;\n const tweetsLS = localStorage.getItem(\"tweets\");\n if (tweetsLS === null){\n tweets = [];\n } else {\n tweets = JSON.parse(tweetsLS);\n }\n \n return tweets;\n}", "title": "" }, { "docid": "ad5a9023315e22d190d4c75d156856f4", "score": "0.6364645", "text": "loadPagedTweets(tweets) {\n\n // So meta lol\n var self = this;\n\n // If we still have tweets...\n if (tweets.length > 0) {\n\n // Get current application state\n var updated = this.state.tweets;\n\n // Push them onto the end of the current tweets array\n tweets.forEach(function (tweet) {\n updated.push(tweet);\n });\n\n // This app is so fast, I actually use a timeout for dramatic effect\n // Otherwise you'd never see our super sexy loader svg\n setTimeout(function () {\n\n // Set application state (Not paging, add tweets)\n self.setState({ tweets: updated, paging: false });\n\n }, 1000);\n\n } else {\n\n // Set application state (Not paging, paging complete)\n this.setState({ done: true, paging: false });\n\n }\n }", "title": "" }, { "docid": "4035cd3f0dfa17bfa4f04140ffcf2285", "score": "0.636313", "text": "function showmytweets(email) {\n var base64email = $.base64('encode',email);\n var url = \"/tweets/\" + base64email;\n console.log(url);\n $.ajax({\n url: url,\n type: \"GET\",\n dataType: 'json',\n success: function(data) {\n console.log(data.length);\n var content=\"\";\n for(var i=0;i<data.length;i++) {\n content += '<tr><td type=\"text\"><b>' + data[i].email + '</b><span class=\"pull-right\"><b>' + giveTimeDifference(new Date(data[i].timestamp),new Date()) + '</b></span>' +\n '<br>' + data[i].content + '</td></tr>';\n }\n if(content.length>0) {\n $('#contentTable tbody').html(content);\n $('#contentTitle').html(\"User Tweets\");\n }\n else {\n var content = '<tr><td><b>Not tweeted yet</b></td></tr>'\n $('#contentTable tbody').html(content);\n $('#contentTitle').html(\"User Tweets\");\n\n }\n\n $('#contentTable').find('#getmorerows').remove();\n\n if(data.length==20) {\n var timestamprow = \"<tr style='display: none' id='getmorerows'><td>\" + data[9].timestamp + \"</td></tr>\";\n $('#contentTable').append(timestamprow);\n }\n },\n error:function(data,status,er) {\n console.log(\"error: \"+data+\" status: \"+status+\" er:\"+er);\n }\n })\n //setInterval(checkTweetNotification,10000);\n}", "title": "" }, { "docid": "3a054740aced61a5ee0ac4d139a3b27e", "score": "0.6356409", "text": "function tweets() {\n\n var path = 'https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=kanyewest&count=20';\n var params = { count: 20};\n\n client.get(path, params, function(error, tweets, response) {\n if (!error) {\n for (var i = 0; i < 20; i++) {\n console.log(tweets[i].text);\n\n myTweets = tweets[i].text;\n\n logTweets(myTweets);\n };\n };\n });\n}", "title": "" }, { "docid": "fca938d5a25bbbb939b2554fc8daf032", "score": "0.6352453", "text": "function getTweets() {\n var url = jQuery('.tweets').attr('data-url');\n\n jQuery.ajax({\n method: 'get',\n url: url,\n success: function (response) {\n if (response)\n updateTweets(response);\n }\n })\n}", "title": "" }, { "docid": "611aa604c9e9afdb94cf6a37bd0ea254", "score": "0.6341006", "text": "function searchTweets() {\n console.log(\"Liri is loading your tweets...\");\n //you can also use \\n here\n console.log(\"-----------------------------------------------------------\");\n\n //these lines were taken from Twitter documentation\n var client = new Twitter(keys.twitter);\n\n //changed node.js in the twitter docs to my screen name \n var params = { screen_name: 'ClutchMyPearlz' };\n\n //error, response and tweets values come from api\n client.get('statuses/user_timeline', params, function (error, tweets, response) {\n if (!error) {\n // for loop to loop through 20 tweets that will be shown\n for (i = 0; i < 20; i++) {\n num++;\n\n console.log(num);\n console.log(tweets[i].created_at);\n console.log(tweets[i].text);\n console.log(\"-----------------------------------------------------------\");\n }\n }\n num = 0;\n });\n}", "title": "" }, { "docid": "f6617416ffbb48865754cf88953a6c1a", "score": "0.63219804", "text": "function myTweets() {\n var params = { screen_name: '@devWears6inchHeels', count: tweetLimit};\n twitterKey.get('search/tweets', params, function(error, tweets, response) {\n if (!error) {\n for (var i = 0; i < tweets.length; i++) {\n console.log(tweets[i].text);\n };\n } else {\n console.log(\"error: \" + JSON.stringify(error));\n return;\n };\n });\n}", "title": "" }, { "docid": "d60ea02fd39f2dbb9b46d727cc682e21", "score": "0.63147074", "text": "function myTweets() {\n T.get(\"statuses/user_timeline\", params, function(err, data, responses) {\n if (!err) {\n for ( i = 0; i < 20; i++) {\n console.log(\"Created at: \" + data[i].created_at + \"\\n\" + \"Text: \" + data[i].text + \"\\n\");\n }; \n } else {\n \t console.log(err);\n }\n });\n}", "title": "" }, { "docid": "3afefd32097404d29f2d57c675b1dc8d", "score": "0.63136345", "text": "function getTweets(){\n\t\tvar results = document.getElementById(\"latest_tweet\");\n\t\tresults.innerHTML = \"Loading...\";\n\t\t\n\t\tvar username = 'mccluckie';\n\t\t//Prep the Twitter url so it can be passed as a GET parameter\n\t\tvar twitter_url = escape(\"http://api.twitter.com/1/statuses/user_timeline.json?screen_name=\" + username);\n\t\t\n\t\t//Do the AJAX call\n\t\t$.ajax({\n\t\t\turl: \"stream_open_2.php?url=\" + twitter_url,\n\t\t\t//Callback on success\n\t\t\tsuccess: function(d, status, req){ //d = tweet information\n\t\t\t\t//Convert the JSON result to an array of tweets\n\t\t\t\tvar tweets = eval('(' + d + ')');\n\t\t\t\tshowTweets(tweets);\n\t\t\t}, \n\t\t\t//Error handler\n\t\t\terror: function(){\n\t\t\t\tvar results = document.getElementById(\"latest_tweet\");\n\t\t\t\tresults.innerHTML = 'An error occured. Tweets could not be loaded<br>'+status+ ': ' + err;\n\t\t\t}\n\t\t});\n\t}", "title": "" }, { "docid": "e0de21f297ef2b8735f1446fc8771f5e", "score": "0.62977725", "text": "function getTweets(){\n\tconsole.log(\"Tweets out!\");\n//new variable for instance of twitter, load keys from imported keys.js\n\tvar client = new Twitter(keys.twitter);\n//parameters for twitter function.\n\tvar parameters = { \n\t\tscreen_name: 'Soraia Rdab',\n\t\tcount: 20\n\t};\n//call the get method on our client variable twitter instance\n\tclient.get('statuses/user_timeline', parameters, function(error, tweets, response){\n\t\tif (!error) {\n\t for (i=0; i<tweets.length; i++) {\n\t var returnedData = ('Number: ' + (i+1) + '\\n' + tweets[i].created_at + '\\n' + tweets[i].text + '\\n');\n\t console.log(returnedData);\n\t console.log(\"-------------------------\");\n\t }\n\t };\n\t});\n}", "title": "" }, { "docid": "0260974e6c00dc20e7fc2a985a65f823", "score": "0.62865335", "text": "function getTweets() {\n var client = new Twitter({\n consumer_key: keys.twitterKeys.consumer_key,\n consumer_secret: keys.twitterKeys.consumer_secret,\n access_token_key: keys.twitterKeys.access_token_key,\n access_token_secret: keys.twitterKeys.access_token_secret\n });\n\n var params = { screen_name: 'realDonaldTrump' };\n client.get('statuses/user_timeline', params, function (error, tweets, response) {\n if (!error) {\n for (var i = 0; i < 20; i++) {\n var index = i + 1;\n console.log(\"\\n\" + index + \") \" + tweets[i].text + \"\\nCreated At: \" + tweets[i].created_at);\n }\n }\n else {\n return console.log(error);\n }\n });\n}", "title": "" }, { "docid": "652193dc29fcb1f3a39ceb76c7ac9b77", "score": "0.6266869", "text": "function tweets() {\n twitterclient.get('statuses/user_timeline', {screen_name: process.argv[3]}, function(error, tweets, response){\n if (!error){\n for ( var i = 0; i < 20; i++ ){\n if(tweets[i]){\n console.log(tweets[i].text);\n }\n }\n } else {\n console.log(error.stack);\n }\n })\n}", "title": "" }, { "docid": "d666a935c26b99695a0618db697db5a3", "score": "0.6255728", "text": "function getTweets() {\n var name = {screen_name: 'E_Max_Wheeler'};\n client.get('statuses/user_timeline', name, (err, tweets, resp) => {\n if (err) {\n throw err;\n }\n for (i = 0; i < 20; i++) {\n console.log('===============================')\n console.log(`${tweets[i].text}`);\n console.log(`${tweets[i].created_at}`);\n console.log('===============================')\n }\n })\n}", "title": "" }, { "docid": "18082ecc593721305ec238755dfa5eaf", "score": "0.6236255", "text": "function getTweets(params) {\n\t\n\tvar path = \"https://api.twitter.com/1.1/search/tweets.json\";\n\t\n\t(function callTwitterAPI() {\n\t\t\tclient.get(path, params, function(error, tweets, response) {\n\t\t\n\t\t\tif(!error)\n\t\t\t{\n\t\t\t\tfs.writeFileSync(\"./data/\" + params.count + \"tweets.json\", JSON.stringify(tweets.statuses));\n\t\t\t}\n\t\t\telse\n\t\t\t\tfs.writeFileSync(\"./data/\" + params.count + \"tweets.json\", \"[]\");\n\t\t})\n\t})(); \n}", "title": "" }, { "docid": "7f4b700e50bff2859dc6df76ddb2186a", "score": "0.62268895", "text": "function myTweets() {\n\tvar client = new twitter({\n\t\t\tconsumer_key: keys.twitterKeys.consumer_key,\n\t\t\tconsumer_secret: keys.twitterKeys.consumer_secret,\n\t\t\taccess_token_key: keys.twitterKeys.access_token_key,\n\t\t\taccess_token_secret: keys.twitterKeys.access_token_secret, \n\t\t});\n\t\tparams = {screen_name: \"dtBootCamp\",\n\t\t\t\t\tcount: 20};\n\t\tclient.get(\"statuses/user_timeline/\", params, function(error, data, response){\n\t\t\tif (!error) {\n\t\t\t\tfor(var i = 0; i < data.length; i++) {\n\t\t\t\t\tvar twitterResults = \n\t\t\t\t\t\"@\" + data[i].user.screen_name + \": \" + \n\t\t\t\t\tdata[i].text + \"\\n\" + \n\t\t\t\t\tdata[i].created_at + \"\\n\" + \n\t\t\t\t\t\"------------------------------ \" + (i + 1) + \" ------------------------------\" + \"\\n\";\n\t\t\t\t\tconsole.log(twitterResults);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconsole.log(\"Error :\"+ error);\n\t\t\t\treturn;\n\t\t\t}\n\t\t});\n}", "title": "" }, { "docid": "c86f854245541bcaa7f561db7af5fdd8", "score": "0.62196803", "text": "function tweets(language) {\n const start = counter;\n const end = start + limit -1;\n counter = end +1;\n var months = [\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"];\n const request = new XMLHttpRequest();\n request.open('GET', '/ajax/twitter/'+ end)\n request.onload = () => {\n const data = JSON.parse(request.responseText);\n data.forEach(function(value) {\n if(value.lang == language)\n {\n var startTime = new Date(value.created_at);\n const contents = months[startTime.getMonth()] + ', '+ startTime.getDay() + ' ' + startTime.getFullYear();\n const textvalue = value.text;\n add_tweet(contents, textvalue);\n }\n });\n }\n request.send();\n}", "title": "" }, { "docid": "827d42cb4923f23e435b749d54d6a584", "score": "0.62137735", "text": "function myTweets() {\n var client = new twitter(keys.twitter);\n\n var params = { count: 20 };\n if (command === \"my-tweets\") {\n client.get('statuses/user_timeline', params, function (error, tweets, response) {\n console.log(\"---++++++++++++++++++++++++++++++++++++++++++++++++++++++---\");\n if (!error) {\n for (var i = 0; i < 20; i++) {\n console.log(tweets[i].text + \"\\n\");\n logData = (tweets[i].text);\n addLog();\n }\n }\n console.log(\"----++++++++++++++++++++++++++++++++++++++++++++++++++++++---\");\n });\n }\n}", "title": "" }, { "docid": "1fe1319999ba48a4f6d8734499538307", "score": "0.62129396", "text": "function fetchTweets(rawTerm, position) {\n console.log(\"getting tweets\");\n\tconsole.log(\"position\", position);\n var geocode;\n if(position){\n var lat = position.coords.latitude;\n var long = position.coords.longitude;\n var mile_range = 50;\n geocode = lat+\",\"+long+\",\"+mile_range+\"mi\";\n }\n else{\n geocode = \"\";\n }\n \n\tvar searchTerm = encodeURIComponent(rawTerm.toLowerCase());\n\n /* __keys__ __values__\n <word> corresponding Word object\n */\n var wordData = {};\n \n /* __keys__ __values__\n <id_str> the tweet data object associated with this id_str\n */\n var tweetIdData = {};\n \n // an array of string words in order from most to least common\n var commonWords = [];\n \n var readyPages = 0;\n var maxPages = 4;\n var tweetsPerPage = 100;\n var url;\n for(var page = 1; page <= maxPages; page++){\n url = \"http://search.twitter.com/search.json\"+\n \"?q=\"+searchTerm+\"+exclude:retweets\"+\n \"&geocode=\"+geocode+\n \"&rpp=\"+tweetsPerPage+\n \"&lang=en\"+\n \"&page=\"+page;\n \n $.ajax({\n url: url,\n dataType: \"jsonp\",\n success: function(data) {\n console.log(\"tweet success\", page, data);\n\n readyPages += 1;\n \n $(\"#searching-tweets-message\").find(\".load-percent\")\n .text(getPercentStr(readyPages, maxPages));\n \n wordData = processTweets(data, wordData, tweetIdData);\n\n commonWords.length = 0;\n commonWords = getMostCommonWords(wordData); \n\n var maxWords = getMaxWords(commonWords);\n \n $(\"#common-words-list\").slideUp(function(){\n updateCommonWordsList(commonWords, wordData, tweetIdData, maxWords);\n });\n \n if(readyPages == maxPages){\n finishTweetSearch(commonWords, maxWords);\n }\n },\n error: function(data){\n console.log(\"error while fetching tweets:\", data.responseText);\n readyPages += 1;\n if(readyPages == maxPages){\n finishTweetSearch(commonWords, getMaxWords(commonWords));\n }\n }\n });\n }\n}", "title": "" }, { "docid": "00c2c5b160797273f87bd9b0407c768b", "score": "0.62061024", "text": "function loadFeed(){\r\n\t\t\t$('.twitter-time').each(function() {\r\n\t\t\t\tvar t = $(this);\r\n\t\t\t\tvar d = new Date( t.attr(\"t\") );\r\n\t\t\t\tt.text(jQuery.timeago(d));\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t$.ajax ({\r\n\t\t\t\ttype:'GET',\r\n\t\t\t\turl: _path+\"&since_id=\"+_since,\r\n\t\t\t\tdataType:'jsonp',\r\n\t\t\t\tsuccess: dataLoaded, \r\n\t\t\t\tfail: failSend\r\n\t\t\t}); \r\n\t\t}", "title": "" }, { "docid": "df9b0da30afbce8623972f913288952a", "score": "0.6203911", "text": "function renderTweets(database) {\n database.forEach(dataset => {\n createTweetElement(dataset).insertAfter('.create-tweet')\n })\n }", "title": "" }, { "docid": "ebb455255be72fffd2141db53ced90e6", "score": "0.6203264", "text": "async function loadTweets(username)\n{\n var uri = 'https://faculty.washington.edu/joelross/proxy/twitter/timeline/'+'?'+'screen_name='+username;\n var live_data = await d3.json(uri); //wait for the asynchronous download to finish\n //will now return the data downloaded instead of the Promise\n console.log(live_data);\n var analyze=analyze_tweets(live_data)\n showEmotionData(analyze)\n\n\n // if(username===\"SAMPLE_TWEETS\")\n // {\n // var analyze=analyze_tweets(SAMPLE_TWEETS)\n \n\n // }\n}", "title": "" }, { "docid": "a1613f9c6b0dd6404d4910e1b6530261", "score": "0.6200405", "text": "async function getTweets(search) {\n try {\n setError(false);\n setLoading(true);\n await axios\n .get(`/api/twitter/${search}`)\n .then((response) => {\n apiData = response.data;\n })\n .catch((error) => {\n console.log(\"Err\", error);\n setErrMsg(\"Tweets could not be retrieved.\");\n setError(true);\n });\n if (Object.keys(apiData).length === 0) {\n setErrMsg(\"No tweets matched this query.\");\n setError(true);\n setLoading(false);\n return;\n }\n let recieivedTweets = [];\n apiData.forEach((t) => {\n recieivedTweets.push({\n text: t.text,\n score: t.score,\n scoreText: t.scoreText,\n });\n });\n recieivedTweets.reverse(); // Reverse order as oldest tweets were displaying first in 'Twitter Feed'\n setTweets(recieivedTweets);\n setLoading(false);\n } catch (e) {\n console.error(e.reponse);\n }\n }", "title": "" }, { "docid": "c3709abbb264501d57b53adaa0402d26", "score": "0.6190236", "text": "function getTweets() {\n var params = {\n screen_name: 'moMoneyMoRamen',\n count: 20\n };\n client.get('statuses/user_timeline', params, function (error, tweets, response) {\n if (error) {\n return console.log(error);\n }\n // console.log(tweets);\n for (var i = 0; i < tweets.length; i++) {\n console.log(tweets[i].created_at);\n console.log(tweets[i].text);\n }\n });\n}", "title": "" }, { "docid": "97ec3f82f4abce81b3652231ef814bff", "score": "0.6168618", "text": "getTweets(){\n var lastAdded = this.state.stock;\n if(this.state.tags && this.state.tags.length > 0) {\n lastAdded = this.state.tags[this.state.tags.length - 1].name;\n }\n this.fetchTweets(lastAdded);\n }", "title": "" }, { "docid": "39a5e4e60863c30b2c3cc916ab98a85e", "score": "0.61444706", "text": "function showTweets() {\n twitter.get('statuses/user_timeline.json?screen_name=askimnu87&count=20', function(error, tweets, response) {\n if (error) throw error;\n \n for (let i = 0; i < tweets.length; i++) {\n console.log(tweets[i].text);\n }\n \n });\n}", "title": "" }, { "docid": "6ee043d58399b93c8b9fa1b11f620221", "score": "0.61407894", "text": "function getTweets(req, res, success) {\n\tvar options = {\n\t\tq: \"#\" + req.query.hashtag1 + \" AND #\" + req.query.hashtag2,\n\t\t//geocode: \n\t\tuntil: req.query.date_to,\n\t\tlang: \"en\",\n\t\tcount: 100,\n\t\tresult_type: \"recent\"\n\t};\n\t\n\ttweets = [];\n\t\n\ttwit.get(\"/search/tweets.json\", options, function(data)\n\t{\n\t\tif (data.statuses && data.statuses.length > 0) {\n\t\t\tfor (var i = 0; i < data.statuses.length && tweets.length < 10; i++) {\n\t\t\t\tvar raw = data.statuses[i];\n\t\t\t\t\n\t\t\t\ttweet = {\n\t\t\t\t\tid: raw.id_str,\n\t\t\t\t\ttext: raw.text,\n\t\t\t\t\tscore: sentimental(raw.text).score\n\t\t\t\t};\n\t\t\t\t\n\t\t\t\tif (tweet.score >= req.query.score_min\n\t\t\t\t\t&& tweet.score <= req.query.score_max)\n\t\t\t\t{\n\t\t\t\t\ttweets.push(tweet);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tsuccess(tweets);\n\t});\n}", "title": "" }, { "docid": "a8c42122116f55abde1229a8afa54957", "score": "0.61313957", "text": "function getInitialTweets() {\n var params = {\n 'screen_name' : username,\n 'count' : tweetSpots\n };\n\n $.get(apiUrl, params, placeInitialTweets);\n }", "title": "" }, { "docid": "d6f1c4c50d81625652f2e17e733d4b47", "score": "0.6100785", "text": "function myTweets() {\n log(\" * myTweets * \");\n var client = new Twitter(keys.twitter);\n // Then run a request to the myTweets API\n client.get('statuses/user_timeline', function(error, tweets, response) {\n\n if (error) {log(error)} else {\n var currentTweet,currentDate;\n var tweetLength = tweets.length;\n var init = JSON.stringify(tweets);\n\n for (var i = 0; i < tweetLength; i++) {\n currentTweet = JSON.stringify(tweets[i].text);\n currentDate = JSON.stringify(tweets[i].created_at);\n log('Tweet '+(i+1)+': '+currentTweet+''+currentDate);\n log(\" * -------------------------- * \");\n }\n }\n });\n}", "title": "" }, { "docid": "118a6fbf9199ba378d7468e5dc6538a1", "score": "0.60953176", "text": "function show2Tweets(){\n\tconsole.log(\"it ran\")\n\nvar client = new twitter({\n consumer_key: keys.twitterKeys.consumer_key,\n consumer_secret: keys.twitterKeys.consumer_secret,\n access_token_key: keys.twitterKeys.access_token_key,\n access_token_secret: keys.twitterKeys.access_token_secret\n});\n\nvar params = {screen_name: 'BenjaminTOwens'};\n\n//Ben- need to put in the tweets one by one here.\n\nclient.get('statuses/user_timeline', params, function(error, tweets, response) {\n if (!error) {\n \tconsole.log(\"tweets should come\");\n\n \tfor(var i=0; i<tweets.length; i++){\n \tvar mycreated_at=tweets[i].created_at;\n \tvar mytext=tweets[i].text;\n console.log(mycreated_at);\n console.log(mytext);\n}\n }\n\n else{console.log(\"there was an error\");\nconsole.log(keys.twitterKeys.consumer_key)}\n});}", "title": "" }, { "docid": "9893700fc7b5d94ebe7d600ba2948469", "score": "0.60897094", "text": "function GetTweet() {\nif( tweets.length < 5 && !isDownloadingTweets ) {\nDownloadTweets();\n}\nif (tweets.length > 0) {\nreturn tweets.shift();\n}\n}", "title": "" }, { "docid": "bce338e99c78bb585e7275a0a10f3357", "score": "0.60727984", "text": "function myTweets() {\n\tclient.get(\"statuses/user_timeline\", params, function(error,tweets,response){\n\t\tif (!error){\n\n\t\t\tconsole.log(\"Last 20 tweets\");\n\t\t\tfor (i=0; i < tweets.length; i++) {\n\t\t\t\tvar number = i + 1;\n\t\t\t\tconsole.log(\" \");\n\t\t\t\tconsole.log([i + 1] + \".\" + tweets[i].text);\n\t\t\t\tconsole.log(\"Created on \" + tweets[i].created_at);\n\t\t\t}\n\t\t}\n\t});\n}", "title": "" }, { "docid": "14c8afe3be4fb7f18a2c71d1e79d430e", "score": "0.6067453", "text": "function searching(tweetsAccount) {\n var link = \"https://faculty.washington.edu/joelross/proxy/twitter/timeline/?screen_name=\" + tweetsAccount + \"&count=100\";\n loadTweets(link);\n}", "title": "" }, { "docid": "eb4310f328ec1dd8f1f18811c24a6bab", "score": "0.6064577", "text": "function obtenerTweetsLocalStorage(){\r\n let tweets;\r\n\r\n //revisar valores de local storeage\r\n if(localStorage.getItem('tweets')===null){\r\n //si no existen datos en el localstorgae u¿inicializamos el arregloe n vacio\r\n tweets=[];\r\n }else{\r\n //guardar los tweets en un json \r\n tweets=JSON.parse(localStorage.getItem('tweets'));\r\n }\r\n\r\n //retornamos los tweets\r\n return tweets;\r\n}", "title": "" }, { "docid": "c0d252a781a18919fc0a4d132aa86eda", "score": "0.6057789", "text": "function myTweets() {\n\tvar twitterKeys = new Twitter({\n\t consumer_key: keys.twitter.consumer_key,\n\t consumer_secret: keys.twitter.consumer_secret,\n\t access_token_key: keys.twitter.access_token_key,\n\t access_token_secret: keys.twitter.access_token_secret\n\t});\n\tvar params = {screen_name: 'imaginarysee', count: 20};\n\ttwitterKeys.get('statuses/user_timeline', params, function(error, tweets, response) {\n\t if (!error) {\n\t \tconsole.log(`Tweets from ${params.screen_name}\\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\n`);\n\t \tfor (var i = 0; i < tweets.length; i++) {\n\t \t\tconsole.log(`Time Tweeted: ${moment(tweets[i].created_at, \"ddd MMM DD HH:mm:ss Z YYYY\").utc(-6).format(\"DD MMMM YYYY, h:mma\")}`);\n\t \t\tconsole.log(` ${tweets[i].text}`);\n\t \t\tconsole.log(`----------------------------------\\n`);\n\t \t}\n\t }\n\t});\n}", "title": "" }, { "docid": "4c70d6932fc4dba9daa8ec80917a0537", "score": "0.60559535", "text": "function myTweets() {\n\tclient.get('statuses/user_timeline', params, function(err, tweets, response) {\n\t\tif (!err) {\n\t\t\tconsole.log('------');\n\t\t\tfor (i = 0; i < tweets.length; i++) {\n\t\t\t\tconsole.log(tweets[i].text + '\\n' + tweets[i].created_at + '\\n------');\n\t\t\t}\n\t\t}\n\t});\n}", "title": "" }, { "docid": "6f949644713662468130a8942e76b6c1", "score": "0.6054991", "text": "async function get_timeline(id=0)\n{\n //console.log(user_id);\n try{\n const timeline_query = await fileToStr('sql/timeline.sql')\n const timeline_results = await query(timeline_query, [id,id,id,id]);\n var html = \"\";\n $('#timeline').html(html);\n //console.log(timeline_results);\n //console.log(user)\n timeline_results.forEach(element => {\n var delete_div = \"<button class ='delete' data-del =\" + element.tweet_id + \">\" + \"DELETE\" + \"</button>\";\n var fav_btn = \"<button class ='favorite' data-fav =\" + element.tweet_id + \">\" + (user.favorites.includes(element.tweet_id) ? \"<i class='fas fa-heart favorited'></i>\":\"<i class='far fa-heart favorite'></i>\") + \"</button>\"\n var rt_btn = \"<button class ='retweet' data-rt =\" + element.tweet_id + \">\" + (user.retweets.includes(element.tweet_id) ? \"<i class='fas fa-retweet retweeted'></i>\" :\"<i class='fas fa-retweet retweet'></i>\" ) + \"</button>\"\n if(element.is_rt)\n {\n html = \"<div class='tweet' data='\"\n + element.tweet_id \n + \"'>\"\n + \"<div class='retweeter'><i class='fas fa-retweet retweet'></i> \"\n + element.name + \" retweeted\"\n + \"</div>\"\n + \"<div class='name'>\"\n + element.og_tweeter\n + \"</div>\"\n + \"<div class='tweet_body'>\"\n + element.tweet_body\n + \"</div>\"\n + rt_btn\n + fav_btn\n + \"</div>\"\n }\n else\n {\n html = \"<div class='tweet' data='\"\n + element.tweet_id \n + \"'>\"\n + \"<div class='name'>\"\n + element.name\n + \"</div>\"\n + \"<div class='tweet_body'>\"\n + element.tweet_body\n + \"</div>\"\n + rt_btn\n + fav_btn\n + \"</div>\"\n }\n $('#timeline').append(html)\n });\n }\n catch(err)\n {\n console.error('Error: Timeline()', err)\n }\n \n}", "title": "" }, { "docid": "6576cf149b5d3d18f2475cbcd746e106", "score": "0.6054678", "text": "function getTweetsLS(){\n let tweets;\n //values from the local storage\n if(localStorage.getItem('tweets') === null){\n tweets = [];\n } else {\n tweets = JSON.parse(localStorage.getItem('tweets'));\n }\n return tweets;\n}", "title": "" }, { "docid": "2bb34c3390e240b6c52d009c1159fafe", "score": "0.60537386", "text": "function my_tweets() {\n\tvar limit = 20;\n\t// get request to the Twitter API for my tweets and their createdat values\n\tclient.get('statuses/user_timeline', function (error, tweets, response) {\n\t\tif (!error) {\n\t\t\tfor (var i = 0; i < limit; i++) {\n\t\t\t\tif (tweets[i]) {\n\t\t\t\t\tconsole.log(tweets[i].text);\n\t\t\t\t\tconsole.log(tweets[i].created_at);\n\t\t\t\t\tconsole.log(\"____________________________\");\n\t\t\t\t} else {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tconsole.log('Error occurred: ' + error);\n\t\t\tlogFile.push(error);\n\t\t}\n\t});\n}", "title": "" }, { "docid": "d4d1c9437ef2eca8ab25bcbdb93f2f23", "score": "0.604123", "text": "function getTweets(){\n var client = new Twitter(keys.twitter)\n //Define params\n var params = { screen_name: 'itssunnyout1'}\n\n //Request to get tweet information\n client.get('statuses/user_timeline', params, function(error, tweets, response) {\n //console.log(JSON.stringify(tweets, null, 2));\n if (!error) {\n console.log(\"\\nHere are the tweets for @ItsSunnyOut1\")\n for (var i=0; i < tweets.length; i++){\n console.log(\"\\n\" + i+\":\" + tweets[i].text + \n \"\\nCreated on: \" + tweets[i].created_at + \"\\n\");\n }\n }\n});\n}", "title": "" }, { "docid": "dd8caa94d87cb3b406965915b6174340", "score": "0.60375047", "text": "function obtenerTweetsLocalStorage() {\n let tweets;\n if (localStorage.getItem('tweets') === null) {\n tweets = [];\n } else {\n tweets = JSON.parse(localStorage.getItem('tweets'));\n }\n return tweets;\n}", "title": "" }, { "docid": "feb7704ed6895d465fbd292e9a309398", "score": "0.6029832", "text": "function getTweets(artist, callback) {\n // Do get request to get tweets\n var twitter_id = TWITTER_USER_IDS[artist.toLowerCase()];\n if (!twitter_id) {\n var doesNotExist = {\n error: \"Could not find tweets for this artist\"\n }\n callback(null, doesNotExist);\n return;\n }\n\n var params = \"?screen_name=\"+twitter_id+\"&count=\"+TWEET_COUNT+\"&exclude_replies=true&include_rts=false\";\n twitter.get(\"statuses/user_timeline/\", params, function(error, data) {\n var results = [];\n if (error) {\n console.log(error);\n callback(null, error);\n return;\n }\n if (data) {\n // Cache results if there are some with no err\n data = JSON.parse(data);\n for (var i = 0; i < data.length; i++) {\n var tweet = data[i];\n var filteredTweet = getFilteredTweet(tweet);\n results.push(filteredTweet);\n }\n TWEETS[artist] = results;\n }\n\n // TODO: Handle failed twitter request\n callback(null, results);\n });\n}", "title": "" }, { "docid": "bd62acc2f2f0bba02c3c46a3f651c79c", "score": "0.60296607", "text": "function getTwitter()\n\t{\t\t\n\t\t$.getJSON(\"http://twitter.com/statuses/user_timeline/shapeshed.json?count=1&callback=?\", \n\t\tfunction(json)\n\t\t{\n\t\t\t$('#twitter img').remove();\n\t\t\tvar html = \"<ul>\";\n\t\t\t$(json).each(function(tweet)\n\t\t\t{\t\n\t\t\t\thtml += '<li>' + this.text + '<br /><span>'+ jQuery.timeago(this.created_at) +'</span></li>';\n\t\t\t});\n\n\t\t\t$('#twitter').append(html + \"</ul>\");\n\t\t\tgetLastFm();\n\t\t});\t\n\t}", "title": "" }, { "docid": "5e246e535d7be046fa674795c451d5e5", "score": "0.6027767", "text": "function showTweets() {\n\tclient.get('statuses/user_timeline', function(error, tweets, response) {\n\t\tif (!error) {\n\t\t\tfor (var i = 0; (i < tweets.length) && (i < 20); i++)\n\t\t\tconsole.log(tweets[i].text + \" (\" + moment(tweets[i].created_at, \"ddd MMM D HH:mm:ss ZZ YYYY\").format(\"MMMM D, YYYY; h:mm a\") + \")\");\n\t\t}\n\t\t\telse {\n\t\t\t\tconsole.log(error);\n\t\t\t}\n\t});\n}", "title": "" }, { "docid": "49b179cc6654b03438d8c48934c1b4e4", "score": "0.6021468", "text": "function myTweets() {\n client.get('statuses/user_timeline', params, function(error, tweets, response) {\n \n if (!error && response.statusCode == 200) {\n console.log('=================================');\n console.log('Latest Tweets:');\n \n for (i = 0; i < tweets.length; i++) {\n var number = i + 1;\n console.log('=================================');\n console.log([i + 1] + '. ' + tweets[i].text);\n console.log('Created on: ' + tweets[i].created_at);\n console.log('=================================');\n }\n }\n });\n}", "title": "" }, { "docid": "62f13a6477252e6fd92fc1d718f173c9", "score": "0.6018474", "text": "function gotTweetData(err, data, response) {\n if (err) {\n logToFile('err', 'my-tweets');\n return console.log('Error occurred: ' + err);\n }\n console.log(\"\\n------------- My Latest Tweets -------------\\n\");\n for (var i = 0; i < data.length; i++){\n var displayMyTweets = i+1+\". Created on: \" + data[i].created_at\n + \"\\nTweet: \" + data[i].text\n + \"\\n---------------------------------------------\\n\";\n console.log(displayMyTweets);\n logToFile('noErr', displayMyTweets);\n }\n console.log(\"\\n\");\n }", "title": "" }, { "docid": "e67f51bc6191c8045cef69aec0acb419", "score": "0.6018342", "text": "function getTweets() {\n\n\tvar Twitter = require(\"twitter\");\n\n\tvar client = new Twitter(keys.twitter);\n\n\tvar params = {screen_name: username};\n\n\tclient.get(\"statuses/user_timeline\", params, function(error, tweets, response) {\n\t\tif (!error) {\n\t\t\tconsole.log(\"Here are your 20 most recent tweets: \");\n\t\t\tfor (var i = 0; i < 20; i++) {\n\t\t\t\tconsole.log(\"Tweet #\" + (i+1) + \": \" + tweets[i].text + \" Created at: \" + tweets[i].created_at);\n\t\t\t\tfs.appendFile(\"log.txt\", \"Tweet #\" + (i+1) + \": \" + tweets[i].text + \" Created at: \" + tweets[i].created_at + \"\\n\", function(err) {\n\n\t\t\t\t\tif (err) {\n\t\t\t\t\t\treturn console.log(err);\n\t\t\t\t\t};\n\n\t\t\t\t});\n\t\t\t};\n\t\t};\n\t});\n}", "title": "" }, { "docid": "e694998897d925a4d4d7013911cdb4bd", "score": "0.6016342", "text": "function twitter() {\n var params = { screen_name: 'damdola', count: 20, trim_user: true };\n client.get('statuses/user_timeline', params, function(error, tweets, response) {\n if (!error) {\n \t// runs through the object to grab only the info I need(date & tweet)\n for (var i = 0; i < tweets.length; i++) {\n console.log(tweets[i].created_at + \"\\n\" + tweets[i].text);\n console.log(\"_____________________________\");\n }\n } else {\n console.log(error);\n }\n });\n}", "title": "" }, { "docid": "b21168689a6113b9157483bc35923cd2", "score": "0.6009746", "text": "function fetch_tweets(params) {\n try {\n return T.call(\"statuses/home_timeline\", params);\n }\n catch(e) {\n // Are we still connected? If not, quit the app:\n if (!T.isConnected())\n throw \"Disconnected\";\n // else try again in 10s:\n // XXX should really have a back-off algo here\n // XXX should examine exception object.\n hold(10*1000);\n return fetch_tweets(params);\n }\n}", "title": "" }, { "docid": "99361e292aec3b462a11b4cd4025df5d", "score": "0.59977746", "text": "function run() {\n T.get('search/tweets', {q: 'homedepot', count: 1}, gotData);\n}", "title": "" }, { "docid": "26f971b0af325d1ef7c5f236c569c25b", "score": "0.599559", "text": "function getUserTimeline(userid, cb) {\n getJSON(\"/statuses/user_timeline/\"+userid, {limit:200}, function(tweets) {\n var doc = {\n tweets : tweets,\n userTimeline : userid\n };\n db.saveDoc(doc, {success:cb});\n });\n }", "title": "" } ]
5c204863cfa76ebcbbb91c3e508adf43
Challenge: "Check for Palindromes" Return true if the given string is a palindrome. Otherwise, return false. palindrome("eye") should return a boolean. palindrome("eye") should return true. palindrome("not a palindrome") should return false.
[ { "docid": "a7e9f8215990e1ffe9dae972538515eb", "score": "0.0", "text": "function prepare(str) {\n\n\treturn str.replace(/[:|(|)|_| |,|.|\\/|\\\\|-]/g , \"\")\n\t\t\t .toLowerCase();\n}", "title": "" } ]
[ { "docid": "03668399daf94565715e7552768cc2c6", "score": "0.8470516", "text": "function palindrome(str) {\n return true;\n}", "title": "" }, { "docid": "eed59f71d04fcca65809a0b5d0ecf2f9", "score": "0.8434018", "text": "function palindrome(str) {\n // Good luck!\n return true;\n}", "title": "" }, { "docid": "990002ada973ae2f98e93074a38c493a", "score": "0.80369794", "text": "function isPalindrome(string) {\n var reverse = reverseString(string);\n\n return string === reverse;\n}", "title": "" }, { "docid": "6975de5e6cf2e521e2756f070124129e", "score": "0.8023535", "text": "function Palindrome(string) {\n // Convert toLowerCase and keep only alphabetical & numerical characters\n var cleanedString = string.toLowerCase().match(/[a-z0-9]/g).join(\"\");\n // Create the reversed string\n var reversedString = cleanedString.split(\"\").reverse().join(\"\");\n\n if (cleanedString === reversedString) {\n // Check if the reversed string is equal to the initial string\n return string + \" is a palyndrome.\";\n } else {\n return string + \" is not a palyndrome.\";\n }\n}", "title": "" }, { "docid": "f5b6fc777b92604565881b4885e96770", "score": "0.8007538", "text": "function is_palindrome(str){\n return (str == (str.split('').reverse().join('')));\n}", "title": "" }, { "docid": "29eba76fa4f81f1b09d1dd07f5cde53e", "score": "0.79992044", "text": "function isPalindrome(s){\n // add whatever parameters you deem necessary - good luck!\n return s == s.split(\"\").reverse().join(\"\") ? true : false;\n\n}", "title": "" }, { "docid": "a6122398860898001b5556adac244cb6", "score": "0.799146", "text": "function palindromeTest(str){\n\n\n}", "title": "" }, { "docid": "c9f69bfa7c0011fa9a5815b400cac8a9", "score": "0.79912513", "text": "function is_palidrome( str )\r\n{\r\n\t// variable that is true ig string is pallindrome\r\n\tlet ans = check_palindrome(str);\r\n\t//condition checking ans is true or not\r\n\tif( ans == true )\r\n\t{\r\n\tdocument.write(\"passed string is palindrome \");\r\n\t}\r\n\telse\r\n\t{\r\n\tdocument.write(\"passed string not a palindrome\");\r\n\t}\r\n}", "title": "" }, { "docid": "14faa22a0cc9e6f9cf4227d77bb82ffb", "score": "0.79282504", "text": "function palindrome(pal){\n console.log(\"Testing string for palindrome\")\n for(let i=0; i<pal.length/2; i++){\n if (pal[i] !== pal[pal.length-1-i]){\n return false\n }\n }\n return true\n}", "title": "" }, { "docid": "1c6625b79939ea7a503c8f3e001da643", "score": "0.7915554", "text": "function palindrome1(myString){\n\n /* remove special characters, spaces and make lowercase*/\n var removeChar = myString.replace(/[^A-Z0-9]/ig, \"\").toLowerCase();\n\n /* reverse removeChar for comparison*/\n var checkPalindrome = removeChar.split('').reverse().join('');\n\n /* Check to see if myString is a Palindrome*/\n if(removeChar === checkPalindrome){\n\n console.log(\"it is a palindrome\");\n }else{\n console.log(\"it is NOT a palindrome\");\n }\n}", "title": "" }, { "docid": "76fe5124bcb234a7ca0fabe1326da80a", "score": "0.79032695", "text": "function checkPalindrome (string) {\n if (string === string.split ('').reverse ().join ('')) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "5126fe20cc83f68f0c79d0136af73882", "score": "0.78899556", "text": "function checkPalindrome(str) {\n return reverseStr(str) === str;\n }", "title": "" }, { "docid": "be6de73b89f446255efe34f306c299e0", "score": "0.7889501", "text": "function isPalindrome(str) {\n //take word and remove all punctuation and whitespace\n str = str.replace(/[\\.,-\\/#!$%\\^&\\*;:{}=\\-_`~()\\'\\s]/g, \"\");\n //then split it into an array, reverse it, make it lower case, and compare it\n if (str.split('').reverse().join('').toLowerCase() === str.split('').join('').toLowerCase()) {\n console.log('is true');\n return true;\n } else {\n console.log('is false');\n return false;\n }\n}", "title": "" }, { "docid": "a3b1e885455ae7b8b1488582d4515f2a", "score": "0.78875417", "text": "function palindrome(string){\n if(string.length < 2){\n return true;\n }\n var firstChar = string.charAt(0);\n var lastChar = string.charAt(string.length-1);\n if(firstChar === lastChar){\n newStr = string.slice(1, -1);\n return palindrome(newStr);\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "d3b5022719d7eeaf226b4a6b0d34fe02", "score": "0.7878771", "text": "function isPalindrome(string){\n let processedContent = string.toLowerCase();\n return processedContent === reverse(processedContent);\n}", "title": "" }, { "docid": "c00b5400996aaf4003669be7f9569cf9", "score": "0.78665316", "text": "function palindrome(string){\n\tlet processedContent = string.toLowerCase();\n\treturn processedContent == reverse(processedContent);\n}", "title": "" }, { "docid": "96033cdac79a622ed38a2901eb9d1941", "score": "0.7866178", "text": "function palindrome(input){\n\tlet reverseInput = input.split('').reverse().join('');\n if(input === reverseInput){\n \tconsole.log(\"It is a Palindrome\");\n } else {\n \tconsole.log(\"It is not a Palindrome\");\n }\n}", "title": "" }, { "docid": "a26baff67584911b833bc36fa1441e6f", "score": "0.7857679", "text": "function isPalindrome(someStr) {\n return (someStr === reverseStr(someStr));\n}", "title": "" }, { "docid": "6f42d531eab89c20b59a0254eb845e08", "score": "0.78419065", "text": "function isPalindrome(str){\n var len = str.length;\n for (k = 0 ; k < len/2 ; k +=1){\n if (str[k] !== str[len - 1 - k]) return false;\n }\n console.log(\"String: \" + str + \" is a palindrome!\");\n return true;\n }", "title": "" }, { "docid": "0b386e5ca873d2a7dac5755485d52281", "score": "0.78387326", "text": "function is_palindrome(str){\n if(str.length <=1){\n return true;\n } else if (str[0] == str[str.length - 1]) { \n is_palindrome(str.substring(1,(str.length -1)));\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "0edad4c100625466adc8fe1232f90ad1", "score": "0.78217053", "text": "function isPalindrome(str) {\r\n return str.toLowerCase() === reverseString(str.toLowerCase());\r\n}", "title": "" }, { "docid": "17efb6fde87c34c4bbc5b52d40a9b893", "score": "0.78187084", "text": "function isPalindrome (string) {\n if (string === string.split ('').reverse ().join ('')) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "17efb6fde87c34c4bbc5b52d40a9b893", "score": "0.78187084", "text": "function isPalindrome (string) {\n if (string === string.split ('').reverse ().join ('')) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "17efb6fde87c34c4bbc5b52d40a9b893", "score": "0.78187084", "text": "function isPalindrome (string) {\n if (string === string.split ('').reverse ().join ('')) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "17efb6fde87c34c4bbc5b52d40a9b893", "score": "0.78187084", "text": "function isPalindrome (string) {\n if (string === string.split ('').reverse ().join ('')) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "17efb6fde87c34c4bbc5b52d40a9b893", "score": "0.78187084", "text": "function isPalindrome (string) {\n if (string === string.split ('').reverse ().join ('')) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "69d1196fa509abb439e146682c56d2d9", "score": "0.7814165", "text": "function isPalindrome_1(string) {\n let strReverse = string.toLowerCase().split('').reverse().join('');\n return string === strReverse;\n}", "title": "" }, { "docid": "bc5e91921a5766f19ddd19982e04c59f", "score": "0.781369", "text": "function palindrome(input){\n let reverseInput = input.split('').reverse().join();\n return reverseInput === input ? true : false;\n}", "title": "" }, { "docid": "a3cccd0720d7dfe498461aee28721363", "score": "0.7809285", "text": "function isPalindromeStr(str) {\r\n var rev = reverseString(str);\r\n return str === rev;\r\n}", "title": "" }, { "docid": "37ef58fb52a9988b158f2565e2930e06", "score": "0.77947503", "text": "function checkPalindrome(palStr) {\n\tvar strLen = Math.ceil(palStr.length/2);\n\tvar firstPart = palStr.slice(0,strLen);\n\tvar secondPart = palStr.slice(-strLen);\n\n\tif (firstPart == reverseString(secondPart)) {\n\t\treturn true;\n\t}\n\n\treturn false;\n}", "title": "" }, { "docid": "721207bb8fbdf2ab453b2595d16c5bed", "score": "0.77920276", "text": "function checkPalindrome(inputString) {\n\treturn (inputString == inputString.split('').reverse().join('')) ? true : false\n}", "title": "" }, { "docid": "44430e6956948147ed9361d831f9b108", "score": "0.7789685", "text": "function isPalindrome(string) {\n\tstring = string.toLowerCase();//Registry not important\n\tstring = string.replace(/\\W/g, '');//Drop all except letters\n\tstring1 = string.slice(0, Math.floor(string.length/2));\n\tstring2 = reverseString(string.slice(Math.ceil(string.length/2)));\n\treturn (string1 == string2);\n}", "title": "" }, { "docid": "c989379afa3d814fcc5e04d30347f10d", "score": "0.7785053", "text": "function isPalindrome(myString){\n str = myString.toLowerCase();\n if(str.length === 1){\n return true;//returns 'true' when a string is a palindrome\n }else if(str[0] !== str[str.length-1]){\n return false;//returns 'false' when a string is not a palindrome\n }\n return isPalindrome(str.slice(1,-1));//makes the proper recursive calls\n }", "title": "" }, { "docid": "7889a70844099f3ddf3865f34aad6598", "score": "0.7784218", "text": "function isPalindrome(input) {\n // type check the input to avoid errors from calling string methods\n if (typeof input !== \"string\") return \"please input a string\";\n\n /* this line is optional if you want to represent the english value of Palindrome\n i.e. non letters and capitals aren't counted. toLowerCase() makes any capitals\n small and replace(/\\W/g, '') matches any 'non word character' (not a letter or number)\n and removes it*/\n input = input.toLowerCase().replace(/\\W/g, '');\n // can use input.length/2 since if you make it half way you have a palindrome\n for(var i = 0; i < input.length / 2; i++){\n // compare input current index to it's corresponding distance from the end of string\n // the +1 is to account for count from 0 indexing as length is 1 higher than the final index\n if(input[i] !== input[input.length - (i + 1)]){\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "261b5f5fd11e75884f6f41a0fe27b187", "score": "0.77777374", "text": "function isPalindrome(string) {\n // Write your code here.\n let bool = true;\n for (let i = 0; i < Math.floor(string.length); i++) {\n if (string[i] !== string[string.length - 1 - i]) bool = false;\n }\n return bool;\n}", "title": "" }, { "docid": "d4705943f13eb35c911eca2ab028826e", "score": "0.7756445", "text": "function is_palindrome(s) {\n s = s.toLowerCase().replace(/[^a-zA-Z0-9]/g, \"\");\n // Your code goes here\n for(let i = 0; i < s.length/2; i++) {\n if(s[i] !== s[s.length - 1 - i]) {\n return false\n } \n }\n return true\n}", "title": "" }, { "docid": "df3e10af424ae6481784aac1851e1144", "score": "0.77497596", "text": "function checkPalindrome(inputString) {\n var reverseString = inputString.split(\"\").reverse().join(\"\")\n \n if(inputString === reverseString) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "ee6b11548bd4842e13253b7eede3f25e", "score": "0.7747276", "text": "function isPalindrome(str){\n if(str.length === 1) return true;\n if(str.length === 2) return str[0] === str[1];\n if(str[0] === str.slice(-1)) return isPalindrome(str.slice(1,-1))\n return false;\n}", "title": "" }, { "docid": "905932a4ef982b75097a66de4452fac9", "score": "0.7738341", "text": "function isPalindrome(string){\r\n let strLength = string.length;\r\n\r\n if (strLength < 3){\r\n return false;\r\n }\r\n\r\n return string === reverseStr(string);\r\n }", "title": "" }, { "docid": "289fc67f0c6157056e25c7d3210b21aa", "score": "0.77328104", "text": "function palindrome(str) {\n if (typeof str !== 'string' || !str) throw 'error: please pass non-empty string'\n\n var reversed = [];\n str.split('').forEach(function (e) {\n return reversed.unshift(e);\n });\n return str === reversed.join('') ? 'true' : 'false';\n }", "title": "" }, { "docid": "32b4fef2e95a22d020c0f622d821e105", "score": "0.77221435", "text": "function isPalindrome (string) {\n// my own way \n var isString = '';\n for (var i=string.length-1; i>=0; i--){\n isString += string[i];\n }\n if (isString === string) {\n return true;\n }\n else {\n return false;\n }\n// cara trainer \n /*return string.toLowerCase().split('').reverse().join('') === string. toLowerCase();*/\n}", "title": "" }, { "docid": "ed75803db32d9327c605bf5ce6b15944", "score": "0.7720211", "text": "function is_palindrome(string) {\n\tfor (var i = 0; i < string.length; i++) {\n\t\tif (string[i] != string[(string.length - 1) - i]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}", "title": "" }, { "docid": "0180f82a5b682d92cbeeb32e6fbd13a4", "score": "0.77190334", "text": "function isPalindrome(string) {\n var reversedString = string.split('').reverse().join('');\n return reversedString === string;\n}", "title": "" }, { "docid": "ad3a071ed960bccb95bf494c7143bb75", "score": "0.77129626", "text": "function isPalindrome (word) {\n var leng = word.length/2;\n for (i = 0; i < leng; i++) {\n if (word[i] === word[word.length-i-1]) {\n return word + \" is a palindrome\";\n }\n else {\n return word + \" is not a palindrome\";\n }\n }\n}", "title": "" }, { "docid": "a31ab97c7b271e8cd8c45f391fc79fdc", "score": "0.7712381", "text": "function isPalidrome(string) {\n if (string === string.split('').reverse().join('')) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "a427facf07edcf3b9cde0026debc3441", "score": "0.77102435", "text": "function check_palindrome(p_word){\n const len = p_word.length; //get the length of the string\n for(let i = 0; i < len/2 ; i++){\n if(p_word[i] !== p_word[len - 1 - i]){\n return 'is not a Palindrome'\n }\n }\n return 'is a Palindrome'\n}", "title": "" }, { "docid": "5243427d42913a21c05d7e53fb27ca8c", "score": "0.7707738", "text": "function palindrome(string) {\n var stringToArray = string.split(\"\");\n var reversedArray = stringToArray.reverse();\n var reversedString = reversedArray.join(\"\");\n if (string === reversedString) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "81dcf35ed1c0af5d8f5a92afb1816339", "score": "0.77050185", "text": "function isPalidrome (string) {\n let newString = '';\n for (let i = string.length - 1; i >= 0; i--) {\n newString += string[i];\n }\n if (string === newString) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "15d86b56fa3a254865d0d2822b1fd0d3", "score": "0.77048045", "text": "function isPalindrome(s) {\n s = s.replace(/[^A-Za-z0-9]/g, \"\").toLowerCase();\n let left = 0,\n right = s.length - 1;\n while (left < right) {\n if (s[left] !== s[right]) return false;\n left += 1;\n right -= 1;\n }\n return true;\n }", "title": "" }, { "docid": "7bbf93342c0302c4ebcc60acc70ed46a", "score": "0.7701903", "text": "function isPalindrome(s){\n let length = s.length;\n //Here we define which is the middle character of the string.\n //In case of an odd length, we keep the index before the middle one,as the middle character doesn't determine if it's a palindrome\n let midIndex = Math.floor(s.length/2);\n //Loop to compare the characters in each extreme and inwards\n for (let i = 0; i<midIndex; i++){\n if(s.charAt(i)!=s.charAt(length-i-1)){\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "1769e240097ccf9f34bafc177130cad4", "score": "0.76978457", "text": "function isPalindromeSoln2(string) {\n let reversed = [];\n for (let i = string.length - 1; i >= 0; i--) {\n reversed.push(string[i]);\n }\n return reversed.join(\"\").toLowerCase() === string.toLowerCase();\n}", "title": "" }, { "docid": "5e12e3c8667158896be91169609cb849", "score": "0.7697135", "text": "function palindrome(name) {\n let words = name.split('').reverse().join('');\n if (words.toUpperCase() === name.toUpperCase()) {\n console.log('This is a palindrome.');\n return true;\n } else {\n console.log('This is not a palindrome.');\n return false;\n }\n }", "title": "" }, { "docid": "02b2a9e3b0fb6aed7e6129ad45c201f1", "score": "0.76969546", "text": "function palindrome(word) {\n\n\t\tvar removeChar = word.replace(/[^A-Z0-9]/ig, \"\").toLowerCase();\n\t\tvar checkPalindrome = removeChar.split('').reverse().join('');\n\t\tif(removeChar === checkPalindrome){\n\t\t return(\"yes\");\n\t\t}\n\t\telse{\n\t\t\n\t\t return(\"no\");\n\t\t}\n\n}", "title": "" }, { "docid": "f9c564596684d7d3e18fc57d80561c84", "score": "0.7693085", "text": "function isPalindrome(str) {\n if (str.length === 1) return true;\n if (str.length === 2) return str[0] === str[1];\n if (str[0] === str.slice(-1)) return isPalindrome(str.slice(1,-1))\n return false;\n}", "title": "" }, { "docid": "2222387f75303f0c03a8c52663dc5197", "score": "0.76891255", "text": "function isPalindrome(someStr){\n let reversedStr = reverseStr(someStr);\n return reversedStr === someStr;\n}", "title": "" }, { "docid": "f2d4ff6133bd069f804f5a3227033361", "score": "0.7688927", "text": "function isPalindrome(someStr) {\n var isPalindrome = false\n var lowercaseStr = someStr.toLowerCase().replace(/[\\W_,.]/g, '')\n var reverseStr = lowercaseStr.split('').reverse().join('')\n\n if(lowercaseStr === reverseStr) {\n isPalindrome = true\n }\n else {\n isPalindrome = false\n }\n\n return isPalindrome\n}", "title": "" }, { "docid": "522c6a40e20071e4a4e45e9907025540", "score": "0.76790625", "text": "function palindrome(str) {\n \n}", "title": "" }, { "docid": "43eca25d2b5a91d15878d65f553886d4", "score": "0.7677576", "text": "function palindrome(str) {\n var out = true;\n let reg1 = /[A-Za-z0-9]/g;\n str = str.toLowerCase().match(reg1); \n\n for (let i = 0 ; i < str.length ; i++) {\n if (str[i] != str[(str.length - (i+1))]) {\n out = false;\n }\n }\n\n return (out) ? true : false ; \n}", "title": "" }, { "docid": "e910aaa9473b866cf7cc822d66750290", "score": "0.76767075", "text": "function isPalindrome(s) {\n let rev = s.split(\"\").reverse().join(\"\");\n return s === rev;\n}", "title": "" }, { "docid": "bbdf0adfb01d370fa48c27afa49f6045", "score": "0.76748914", "text": "function isPalindrome(string) {\n let middleIndex = Math.floor(string.length / 2);\n let frontIndex = 0;\n let backIndex = string.length - 1;\n\n while (frontIndex < middleIndex) {\n if (string[frontIndex] !== string[backIndex]) {\n return false;\n }\n frontIndex += 1;\n backIndex -= 1;\n }\n\n return true;\n}", "title": "" }, { "docid": "aa5f3c6bdb28f9f354813d45c1ec4bd5", "score": "0.76738095", "text": "function isPalindrome(string) {\n for (let i = 0; i < string.length / 2; i++) {\n let last = string[string.length - 1 - i];\n let first = string[i];\n if (first !== last) {\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "74c391a6a42a90e99b8edf277610a996", "score": "0.7672999", "text": "function isPalindrome(word){\n // add whatever parameters you deem necessary - good luck!\n if(word.length === 0 || word.length === 1) return true; \n \n if(word[0] !== word[word.length - 1]) return false; \n \n return isPalindrome(word.substr(1, word.length - 2))\n }", "title": "" }, { "docid": "0da3cd5daf2d2328f389c37323d47687", "score": "0.767256", "text": "function palindrome(str) {\n var len = str.length;\n for ( var i = 0; i < Math.floor(len/2); i++ ) {\n if (str[i] !== str[len - 1 - i]) {\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "dda897e1d8a16b625a9b5ac1d7b3f333", "score": "0.7672216", "text": "function isRealPalindrome(string) {\n string = string.toLowerCase().replace(/[^a-z0-9]/g, '');\n return isPalindrome(string);\n}", "title": "" }, { "docid": "a26aa8819a0a1f0837ed73f46596c95c", "score": "0.76717746", "text": "function isPalindrome(str) {\n if (str.length === 1) return true;\n if (str.length === 2) return str[0] === str[1];\n if (str[0] === str.slice(-1)) {\n return isPalindrome(str.slice(1, -1));\n }\n return false;\n}", "title": "" }, { "docid": "3b4591904bfb7ff5683e07681a3f0c2e", "score": "0.76712346", "text": "function isPalindrome(str) {\n let reversedStr = reverseStr(str);\n return str === reversedStr;\n}", "title": "" }, { "docid": "14ba431dad64e71502fe148368f7f488", "score": "0.7669387", "text": "function isRealPalindrome(string) {\n return isPalindrome(string.replace(/[^a-z0-9]/gi,'').toLowerCase());\n}", "title": "" }, { "docid": "7090acb5ae48e8842b72e7f6208988d4", "score": "0.76615405", "text": "function isPalindrome(str) {\n // if (str.length % 2 !== 0) return false;\n if (str.length === 0) return true;\n if (str[0] === str[str.length - 1]) {\n return isPalindrome(str.slice(1, str.length - 1));\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "84763bb78f1b088cfc50836616f9b978", "score": "0.7655919", "text": "function is_palindrome(str){\n let arr = str.split('');\n for (let b = 0, e = str.length -1 ; b < Math.floor(arr.length / 2); b++, e--)\n if (arr[b] != arr[e])\n return false;\n return true;\n}", "title": "" }, { "docid": "38af6eb0c1641e559c87e8ccaa0e60bc", "score": "0.7654986", "text": "function palindrome(str) {\n const rev = str.split('').reverse().join('')\n return str === rev;\n}", "title": "" }, { "docid": "ac1ec4a982fa3b6f4a428fb1360c1000", "score": "0.7647066", "text": "function checkPalindrome(palindrome) {\n var changePalindrome = palindrome.split('').reverse().join('');\n\n if (palindrome.toUpperCase() === changePalindrome.toUpperCase()) {\n console.log('It is a palindrome');\n } else {\n console.log('It is not a palindrome');\n }\n}", "title": "" }, { "docid": "c699dfebbf3f9a01f866cbee6512b7e4", "score": "0.76405257", "text": "function checkIsPalindrome(inputString) {\n let len = Math.floor(inputString.length / 2);\n for (let i = 0; i < len; i++)\n if (inputString[i] !== inputString[inputString.length - i - 1])\n return false;\n return true;\n}", "title": "" }, { "docid": "317e7d266e4fe54d426e629a66f03c3d", "score": "0.7633894", "text": "function palindrome(str) {\n str = str.toLowerCase().replace(/[^a-z0-9]/g, '');\n //reverse the string\n var tmpRevStr = str.split('').reverse().join('');\n //compare, and return\n if (tmpRevStr === str) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "db522b4044bed7652049fcd2a5e825ca", "score": "0.7632238", "text": "function isPalindrome(str) {\n let isTrue = true;\n str = str.split('');\n\n function _isPalindrome(str, i) {\n if (i >= str.length) return;\n if (str[i] !== str.reverse()[i]) isTrue = false;\n _isPalindrome(str, i + 1);\n };\n _isPalindrome(str, 0);\n return isTrue;\n}", "title": "" }, { "docid": "bbd45f2c1296d0c3c2436006cd27d9bf", "score": "0.76302725", "text": "function isPalindromeSoln1(string) {\n let reversedStr = \"\";\n for (let i = string.length - 1; i >= 0; i--) {\n reversedStr += string[i];\n }\n return reversedStr.toLowerCase() === string.toLowerCase();\n}", "title": "" }, { "docid": "ef164fe26c8c4986ede95a35496d4ebe", "score": "0.76225245", "text": "function isPalindrome(string) {\n let reversedString = string.split('').reverse().join('')\n return string === reversedString\n}", "title": "" }, { "docid": "59e2bcdf6f2b6658084248ec54f8c9ce", "score": "0.7619462", "text": "function isPalindrome(string) {\n if (string.length <= 1) {\n return true;\n }\n\n let [firstLetter] = string;\n let lastLetter = string[string.length - 1];\n\n if (firstLetter === lastLetter) {\n let stringWithoutFirstAndLastLetters = string.substring(1, string.length - 1);\n return isPalindrome(stringWithoutFirstAndLastLetters);\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "9b66ed1924d4d7dd166b5bc7df7967a7", "score": "0.7615567", "text": "function isPalindrome(string){\r\n let str=string.toLowerCase().split(' ').join('');\r\n let rev=str.split('').reverse().join('');\r\n if(str==rev)\r\n console.log(\"true\");\r\n else\r\n console.log(\"false\");\r\n}", "title": "" }, { "docid": "a9f23cbdd43732cec0525436cf795c83", "score": "0.7611903", "text": "function palindrome(str){\n for(var idx = 0; idx < str.length/2; idx++){\n if(str[idx] != str[str.length - 1 - idx]){\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "79091c724a88f3d6b6a54f23dd925cae", "score": "0.7611104", "text": "function isPalindrome(s) {\n\t//basically check if the string is symmetric, outwards to inwards..\n\tif (s.length === 1) return true;\n\tif (s.length === 2) return s[0] === s[1];\n\n\tif (s[0] === s[s.length - 1]) {\n\t\treturn isPalindrome(s.slice(1, -1));\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "d0d0bf635a0e41655cb162f29df13d7f", "score": "0.76107275", "text": "function isPalindrome(str) {\n const revString = str.split('').reverse().join('');\n\n return revString === str;\n}", "title": "" }, { "docid": "f1df20c02f6c582d2f4e78c95ac8a8f3", "score": "0.76057255", "text": "function isPalindrome (str) {\n if (str.length === 1) return true;\n if (str.length === 2) return str[0] === str[1];\n if (str[0] === str.slice(-1)) return isPalindrome(str.slice(1, -1))\n return false;\n}", "title": "" }, { "docid": "778227241ef52c975822db3bb4bfd988", "score": "0.7597472", "text": "function isPalindrome(str) {\n if (str.length < 2) {\n return (true);\n }\n if (str[0] === str[str.length - 1]) {\n return (isPalindrome(str.slice(1,str.length-1)));\n }\n return (false);\n}", "title": "" }, { "docid": "c165a2d9f18026a061c739c791d68669", "score": "0.75906634", "text": "function isPalindrome(string) {\n newString = \"\";\n for (var i = 0; i < string.length; i++) {\n if (string[i] !== \" \") {\n newString += string[i];\n }\n }\n for (var i = 0, j = newString.length - 1; i <= j; i++ , j--) {\n if (newString[i] !== newString[j]) {\n return \"False\";\n }\n }\n return \"True\";\n}", "title": "" }, { "docid": "9fcf0144ed413d4d04f3d3398640b70c", "score": "0.7588474", "text": "function isPalindrome(str) {\r\n for (let i = 0; i < str.length / 2; i++) {\r\n if (str[i] !== str[str.length - 1 - i]) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n}", "title": "" }, { "docid": "97c4d88ae2a6fdac5f7b7d8b80a7acc8", "score": "0.7585707", "text": "function is_palindrome(stringValue) {\n\tvar answer = isPalindrome(stringValue);\n\tconsole.log(\"That's \" + answer);\n\treturn answer;\n}", "title": "" }, { "docid": "8df47caad4c067224d159a0d5b8f8693", "score": "0.758419", "text": "function is_palindrome(s) {\n s = s.toLowerCase().replace(/[^a-zA-Z0-9]/g, \"\");\n const chars = new Stack();\n for (let i = 0; i < s.length; i++) {\n chars.push(s[i]);\n }\n let palindrome = true;\n let i = 0;\n while(chars.top !== null ) {\n const char = chars.pop();\n if (char !== s[i]) {\n palindrome = false;\n break;\n }\n i++\n }\n return palindrome;\n}", "title": "" }, { "docid": "5ad4dee3a4d6351260baa63ba0318ca8", "score": "0.75822324", "text": "function isPalindrome(string){\n string = string.toLowerCase();\n //this array includes spaces, punchtuation and everyother stuff that the string may have\n var charactersArr = string.split('');\n //this is strickly alphamets arrays \n var validCharactersArr = 'abcdefghijklmnopqrstuvwxyz'.split(''); \n\n var lettersArr = [];\n charactersArr.forEach(char => {\n //if that character is valid in the validCharactersArr\n if(validCharactersArr.indexOf(char) > -1) lettersArr.push(char);\n });\n if(lettersArr.join('') === lettersArr.reverse().join('')){\n return true;\n }\n else{\n return false;\n } \n}", "title": "" }, { "docid": "7452c2d6be2026e9a61f2a30b866b800", "score": "0.75799", "text": "function isPalindrome(str) {\n if (str.length === 0 || str.length === 1) return true;\n\n if (str[0] === str[str.length - 1]) {\n return isPalindrome(str.slice(1, str.length - 1));\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "8401b92a8a84471fd3ac34d90a154044", "score": "0.7575516", "text": "function palindrome(str) {\n const reversed = str.split('').reverse().join('');\n return str === reversed;\n}", "title": "" }, { "docid": "8aa86f76b9c3698c23730160bc226082", "score": "0.7575466", "text": "function palindrome(str) {\n var cleanStr = str.replace(/\\W|_/g, \"\").toLowerCase();\n var checkStr = cleanStr.split(\"\").reverse(\"\").join(\"\");\n \n if(checkStr === cleanStr) {\n return true; \n } else {\n return false;\n };\n\t\n}", "title": "" }, { "docid": "2f2ac526622a23fae30d3d43479a990e", "score": "0.7575399", "text": "function isPalindrome(str) {\n const revString = str.split('').reverse().join('');\n return revString === str;\n}", "title": "" }, { "docid": "e32e30e11e82ae7fdcd57a836efd4bd2", "score": "0.7571648", "text": "function isPalindrome (string) {\n if (string === string.split ('').reverse ().join ('')) {\n console.log ('true');\n } else {\n console.log ('false');\n }\n}", "title": "" }, { "docid": "e32e30e11e82ae7fdcd57a836efd4bd2", "score": "0.7571648", "text": "function isPalindrome (string) {\n if (string === string.split ('').reverse ().join ('')) {\n console.log ('true');\n } else {\n console.log ('false');\n }\n}", "title": "" }, { "docid": "7e35e639934c3c642888b78c31e93743", "score": "0.7569248", "text": "function isPalindrome(s) {\n s = s.replace(/[^A-Za-z0-9]/g, \"\").toLowerCase();\n let left = Math.floor(s.length / 2),\n right = left;\n if (s.length % 2 === 0) {\n left -= 1;\n }\n while (left >= 0 && right < s.length) {\n if (s[left] !== s[right]) return false;\n left -= 1;\n right += 1;\n }\n return true;\n }", "title": "" }, { "docid": "1c05c8a7c38b52d1f2167de3b71b29f1", "score": "0.7566846", "text": "function isPalindrome(str){\n if(str.length <= 1) return true;\n if(str[0] === str[str.length-1]) return isPalindrome(str.slice(1,-1));\n return false;\n}", "title": "" }, { "docid": "502d3857129e4269e3b582fd1d4c2ab8", "score": "0.7565984", "text": "function isPalindrome(str) {\n if (str.length <= 1) return true;\n if (str[0] !== str[str.length - 1]) return false;\n return isPalindrome(str.slice(1, str.length - 1));\n}", "title": "" }, { "docid": "c4f8a9188e1793277a503791a9ad9561", "score": "0.7565949", "text": "function checkPalindrome(inputString) {\n // convert the string into an array of letters, reverse the order and the convert it back to a string\n var str = inputString.split('').reverse().join('');\n // return true if those 2 strings are equal, else return false\n return str === inputString;\n}", "title": "" }, { "docid": "4a4d9ab02902d28466b3e20de91d74ed", "score": "0.7562562", "text": "function isPalindrome() {\n let R = str.length - 1;\n let L = 0;\n while (L < R) {\n if (str[L] !== str[R]) return false;\n L++;\n R--;\n }\n return true;\n}", "title": "" }, { "docid": "11bce9cbd9e3a8b33fce66d9a02f8cd0", "score": "0.7560657", "text": "function isPalindrome(string) {\n string = string.toLowerCase();\n var charactersArr = string.split('');\n var validCharacters = 'abcdefghijklmnopqrstuvwxyz'.split('');\n\n var lettersArr = [];\n charactersArr.forEach(char => {\n if (validCharacters.indexOf(char) > -1) lettersArr.push(char);\n });\n\n return lettersArr.join('') === lettersArr.reverse().join('');\n}", "title": "" }, { "docid": "11bce9cbd9e3a8b33fce66d9a02f8cd0", "score": "0.7560657", "text": "function isPalindrome(string) {\n string = string.toLowerCase();\n var charactersArr = string.split('');\n var validCharacters = 'abcdefghijklmnopqrstuvwxyz'.split('');\n\n var lettersArr = [];\n charactersArr.forEach(char => {\n if (validCharacters.indexOf(char) > -1) lettersArr.push(char);\n });\n\n return lettersArr.join('') === lettersArr.reverse().join('');\n}", "title": "" } ]
69c5125725e8526df4b1848055c0ddbb
add event listener to open and close menu, load menu items
[ { "docid": "fefe314597167828e6d7ff265ad4ca0e", "score": "0.64168257", "text": "function openCloseMenu() {\n try {\n var menuButtons = document.getElementsByClassName('menu-buttons')[0].children;\n for (var i = 0; i < menuButtons.length; i++) {\n menuButtons[i].addEventListener('click', function (e) {\n var menuType = e.target.getAttribute('data-is');\n var isOpen = document.getElementById(menuType).style.display;\n if (!isOpen||isOpen==='none') {\n document.getElementById(menuType).style.display = 'block';\n } else {\n document.getElementById(menuType).style.display = 'none';\n }\n\n })\n }\n } catch (e) {\n console.log('Menu button function failed', e)\n }\n }", "title": "" } ]
[ { "docid": "2bbf03fa379fec14ed99b0337b380d43", "score": "0.7524571", "text": "function onOpen() {\n createMenu()\n}", "title": "" }, { "docid": "7ceb936f198dd2eaff58b834b186f1a4", "score": "0.7498548", "text": "function onOpen() {\n createMenu();\n}", "title": "" }, { "docid": "7078a3c39e70a240b2e1b85a2b4c57d1", "score": "0.74853444", "text": "function onOpen(e) {\n createMenu();\n}", "title": "" }, { "docid": "262a09485014dbf339530e5189a47125", "score": "0.742814", "text": "function initMenu() {\r\n if (hamburger.length) {\r\n hamburger.on('click', function() {\r\n if (!menuActive) {\r\n openMenu();\r\n }\r\n });\r\n }\r\n if (fsOverlay.length) {\r\n fsOverlay.on('click', function() \r\n {\r\n if (menuActive) \r\n {\r\n closeMenu();\r\n }\r\n });\r\n }\r\n if (hamburgerClose.length) {\r\n hamburgerClose.on('click', function() {\r\n if (menuActive) {\r\n closeMenu();\r\n }\r\n });\r\n }\r\n if ($('.menu_item'), length) {\r\n var items = document.getElementsByClassName('menu_item');\r\n var i;\r\n\r\n for (i = 0; i < items.length; i++) \r\n {\r\n if (items[i].classList.contains(\"has-children\")) \r\n {\r\n items[i].onclick = function () \r\n {\r\n this.classList.toggle(\"active\");\r\n var panel = this.children[1];\r\n if (panel.style.maxHeight) {\r\n panel.style.maxHeight = null;\r\n }\r\n else {\r\n panel.style.maxHeight = panel.scrollHeight + \"px\";\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "5335f56c202243e431b7efa68a24bad7", "score": "0.7322826", "text": "_addMenuListeners() {\n document.querySelector('.menu-items') && document.querySelector('.menu-items').addEventListener('click', this._onMenuClick.bind(this));\n }", "title": "" }, { "docid": "768e28027e421321ac4348a09a617f60", "score": "0.7318587", "text": "function initMenu() {\n\tvar menuItems = document.querySelectorAll(\".home .menu .menu-item\");\n\tmenuItems.forEach( (menu) => { \n\t menu.addEventListener('click', function(event) {\n\t var url = this.getAttribute('url');\n\t \tif(url!=undefined)\n\t \t\tload(url);\n\t });\n\t});\n}", "title": "" }, { "docid": "7445e9296eca389c2b3b769f7f6e7c52", "score": "0.70307195", "text": "static load()\n {\n for(let a=0; a<States.menus.length; a++)\n {\n States.menus[a].active = States.menus[a].options[0].name;\n let menuID = States.menus[a].id;\n let menuDOM = document.getElementById(menuID);\n \n for(let b=0; b<States.menus[a].options.length; b++)\n {\n let option = States.menus[a].options[b];\n let active = \"\";\n let windowEl = document.getElementById(States.menus[a].options[b].id);\n\n let isActive = (b == 0);\n active = \" active='\" + isActive + \"' \";\n windowEl.setAttribute(\"active\", isActive);\n\n //set state in viewport\n if(option.viewport !== undefined)\n {\n viewports[option.viewport].setIsActive(isActive);\n }\n\n menuDOM.innerHTML += \"<div class=\\\"menu-item\\\" name=\\\"\" + option.name + \"\\\"\" +\n active + \n \"onclick=\\\"Menus.itemClicked('\"+option.name+\"','\"+menuID+\"')\\\">\" + \n option.text +\n \"</div>\";\n }\n }\n }", "title": "" }, { "docid": "dc1d77d5ca1a4743a8e680781ff245e5", "score": "0.69895846", "text": "function initMenus() {\n\t\tfunction toggleMenu($menu){\n\t\t\t$menu.toggleClass('open');\n\t\t}\n\t\t$(document).on('click', '.menu .menu-toggle', function (event){\n\t\t\tevent.preventDefault();\n\t\t\ttoggleMenu($(this).parents('.menu').first());\n\t\t});\n\t}", "title": "" }, { "docid": "cc0724342317da71582fa9a66baa2ba2", "score": "0.68694156", "text": "function onsMenu(page) {\r\n\t\t\t//main menu\r\n\t\t\tvar menu = document.getElementById('menu');\r\n\t\t\t//menu link - querySelectorAll due to more than one per page\r\n\t\t\tvar menuLink = document.querySelectorAll('.menu-link');\r\n\t\t\t//splitter content\r\n\t\t\tvar content = document.getElementById('content');\r\n\r\n\t\t\t//check initial page has actually loaded - forces script to wait before getting menu-open (otherwise returns null...)\r\n\t\t\tif (page.id == 'home' || page.id === 'tags') {\r\n\t\t\t\tconsole.log(\"page id = \"+page.id);\r\n\t\t\t\t//get menu icon - query selector OK due to one per ons page\r\n\t\t\t\tvar menuOpen = document.querySelector('.menu-open');\r\n\t\t\t\t//check menu open is stored...\r\n\t\t\t\tif (menuOpen) {\r\n\t\t\t\t\tconsole.log(\"menu open stored...\");\r\n\t\t\t\t}\r\n\t\t\t//check home page - load navigator...\r\n\t\t\tif (page.id === 'home') {\r\n\t\t\t\t//set navigation\r\n\t\t\t\tonsNav(page);\r\n\t\t\t}\r\n\r\n\t\t\t//add event listener for main menu\r\n\t\t\t\tmenuOpen.addEventListener('click', function(event) {\r\n\t\t\t\tevent.preventDefault();\r\n\t\t\t\t//open main menu for current page\r\n\t\t\t\tmenu.open();\r\n\t\t\t\tconsole.log(\"menu opened...\");\r\n\t\t\t}, false);\r\n\t\t\t}\r\n\t\t\t//add handler for menu links\r\n\t\t\tonsMenuLink(page, menuLink, menu);\r\n\t\t}", "title": "" }, { "docid": "4d00a603531c4b01e042c041711085b2", "score": "0.68530756", "text": "function MenuLoad() {\n // mobile menu\n $('.menu-click').on('click', function() { \n $(this).toggleClass('open'); \n $('#main-menu').slideToggle();\n return false;\n });\n\n \n\n var $menu = $('#main-menu');\n \n // add classes\n $menu.find('li').each(function() {\n if($(this).children('ul').length) {\n $(this).addClass('has-submenu');\n $(this).find('>a').after('<span class=\"submenu-toggle\"></span>');\n }\n });\n \n var $submenuTrigger = $('.has-submenu > .submenu-toggle');\n // submenu link click event\n $submenuTrigger.on( \"click\", function() {\n $(this).parent().toggleClass('active');\n $(this).siblings('ul').toggleClass('active');\n });\n\n\n}", "title": "" }, { "docid": "d86fbbccffce60f7b15aa08f76f3443d", "score": "0.685303", "text": "function menuItemEventListener() {\n let liElements = document.getElementById(\"js-nav\").getElementsByTagName(\"li\");\n for (let i = 0; i < liElements.length; i++) {\n liElements[i].addEventListener(\"click\", closeMenuOnSelect);\n }\n}", "title": "" }, { "docid": "302e5ba0137ef3463293716126b9f26b", "score": "0.68265855", "text": "function hotcoffee_menuitems_init() {\n\t\"use strict\";\n\tvar body = jQuery('body');\n\tvar popup_menuitem = jQuery(\".popup_menuitem\");\n\tjQuery('.sc_menuitems_wrap').on('click', '.show_popup_menuitem', function(e) {\n\t\tvar id = jQuery(this).parents('.sc_menuitems_item').attr('id');\n\t\thotcoffee_menuitems_show_popup(id); \n\t\t\n\t\te.preventDefault();\n\t\treturn false;\n\t});\n\t\n\tbody.on('click', '.close_menuitem', function(e) {\t\n\t\tconsole.log('close click');\n\t\tjQuery(\".popup_menuitem\").remove();\n\t\t\n\t\te.preventDefault();\n\t\treturn false;\n\t});\t\n\tbody.on('click', '.popup_menuitem', function(e) {\n\t\tif (e.target !== this)\n\t\treturn;\n\t\n\t\tconsole.log('close click');\n\t\tjQuery(\".popup_menuitem\").remove();\n\t\t\n\t\te.preventDefault();\n\t\treturn false;\n\t});\n}", "title": "" }, { "docid": "316ee5d08d79c64ec234088c10e5e6e6", "score": "0.6802771", "text": "function init() {\n var submenu = document.getElementsByClassName('submenu')[0];\n var menuItem = document.getElementsByClassName('menu-item')[0];\n var html = document.getElementsByTagName('html')[0];\n\n if (!submenu || !menuItem) {\n return;\n }\n\n menuItem.addEventListener('click', function (event) {\n var evt = event || window.event;\n\n evt.preventDefault();\n\n toggleClass(submenu, 'submenu-open');\n toggleClass(menuItem, 'menu-item-open');\n });\n\n html.addEventListener('click', function (event) {\n if (event.target !== menuItem) {\n var submenuOpen = document.getElementsByClassName('submenu-open')[0];\n var menuItemOpen = document.getElementsByClassName('menu-item-open')[0];\n\n if (submenuOpen && menuItemOpen) {\n submenuOpen.className = submenuOpen.className.replace('submenu-open', '');\n menuItemOpen.className = menuItemOpen.className.replace('menu-item-open', '');\n }\n }\n });\n}", "title": "" }, { "docid": "b92821e0c15e5ab56318afc9349991b7", "score": "0.67790824", "text": "function load() {\r\n\tdocument.body.addEventListener(\"click\", hideMenuFromEvent, false);\r\n\tdocument.body.addEventListener(\"touchend\", hideMenuFromEvent, false);\r\n\t\r\n\t// Set up event handlers for expanding menus.\r\n\tvar menu = document.getElementById(\"navigation-menu\");\r\n\tvar menuItems = menu.children;\r\n\tfor(var i = 0; i < menuItems.length; i++) {\r\n\t\tmenuItems[i].addEventListener(\"click\", showMenuFromEvent, true);\r\n\t\t// Prevent the touchend handler on the body from firing when a button is clicked.\r\n\t menuItems[i].addEventListener(\"click\", function(e) {e.stopPropagation();}, true);\r\n\t}\r\n}", "title": "" }, { "docid": "56441a80dca0b7bbcd0617b80cb6d1b6", "score": "0.6755915", "text": "function initialEvents () {\n menu.querySelector('.close_menu').onclick = function(event) {\n if (props.cl_callback && typeof(props.cl_callback) == \"function\")\n props.cl_callback();\n menu.remove();\n event.stopPropagation();\n }\n menu.querySelector('.hide_menu').onclick = function(e) {\n if (props.hide_callback && typeof(props.hide_callback) == \"function\")\n props.hide_callback();\n hideMenu(e);\n event.stopPropagation();\n }\n menu.querySelector('.close_menu').onmousedown = function (event) {\n event.stopPropagation();\n }\n menu.querySelector('.hide_menu').onmousedown = function (event) {\n event.stopPropagation();\n }\n\n var tbl_size = menu.querySelectorAll('.arccn').length;\n for (var i = 0; i < tbl_size; i++) {\n menu.querySelectorAll('.arccn')[i].onmousemove = function (event) {\n event.stopPropagation();\n }\n menu.querySelectorAll('.arccn')[i].onmousedown = function (event) {\n event.stopPropagation();\n }\n }\n\n var inputs = menu.querySelectorAll('input') || [];\n var select = menu.querySelectorAll('select') || [];\n var button = menu.querySelectorAll('button') || [];\n for (var i = 0; i < inputs.length; i++) {\n inputs[i].onmousemove = function (event) {\n event.stopPropagation();\n }\n inputs[i].onmousedown = function (event) {\n event.stopPropagation();\n }\n }\n for (var i = 0; i < select.length; i++) {\n select[i].onmousemove = function (event) {\n event.stopPropagation();\n }\n select[i].onmousedown = function (event) {\n event.stopPropagation();\n }\n }\n for (var i = 0; i < button.length; i++) {\n button[i].onmousemove = function (event) {\n event.stopPropagation();\n }\n button[i].onmousedown = function (event) {\n event.stopPropagation();\n }\n }\n } // end initialEvents()", "title": "" }, { "docid": "05727de91194b5ac908c659438978b8b", "score": "0.67125535", "text": "function init() {\n document.getElementById(\"menu-toggle\").addEventListener(\"click\", toggleMenu);\n}", "title": "" }, { "docid": "0617b218bb33c9ed6def0ab5f93e510e", "score": "0.6712346", "text": "function init() {\n initializeMenu();\n id(\"cart-btn\").addEventListener(\"click\", goToCart);\n id(\"go-btn\").addEventListener(\"click\", updateMenu);\n }", "title": "" }, { "docid": "cefdc4dcd1da31bd38e5bbf0f5a23e94", "score": "0.66916674", "text": "function init() {\n document.getElementById(\"menu-toggle\").addEventListener(\"click\", toggleMenu);\n}", "title": "" }, { "docid": "f3f5f2bbabc9e8f52cc84c7156832624", "score": "0.66910374", "text": "addEvent(){\n this.targetOpen.forEach(menu => {\n this.events.forEach(userEvent => {\n menu.addEventListener(userEvent, this.activetargetMenu);\n });\n });\n\n this.targetClose.forEach(menu => {\n this.events.forEach(userEvent => {\n menu.addEventListener(userEvent, this.desactivetargetMenu);\n });\n });\n\n }", "title": "" }, { "docid": "fd028113e73133ca3f872170b9066061", "score": "0.6678135", "text": "function onOpen() {\n console.log(\"*** METHOD_ENTRY: \" + arguments.callee.name);\n \n buildMenu();\n \n console.log(\"*** METHOD_EXIT: \" + arguments.callee.name);\n }", "title": "" }, { "docid": "e2c28586fdcd17a40a18d649784f63dd", "score": "0.66410726", "text": "function load() {\n displayMenuItems(menu);\n displayCategoryItems();\n}", "title": "" }, { "docid": "da24912eda67b016f813c342c3c23bc3", "score": "0.66095465", "text": "onShowMenu(){\n\t\tif(!this.menu_shown){\n\t\t\tactions.toggleMenu();\n\t\t}\n\t}", "title": "" }, { "docid": "6624dc8ad2b568f817c7ff5c6cb03ea0", "score": "0.6606505", "text": "function registerEventListenerMenu(mod_menu) {\n\t/***** Buttons Debug ***********************************/\n\tmod_menu.pushEventListener(\"debug_switchPosition\", function () {\n\t\t//mod_menu.switchPosition();\n\t\tmod_menu.setNextPosition();\n\t});\n\tmod_menu.pushEventListener(\"debug_open\", function () {\n\t\tjQuery(\"#tree\").jstree(\"open_all\");\n\t});\n\tmod_menu.pushEventListener(\"debug_close\", function () {\n\t\tjQuery(\"#tree\").jstree(\"close_all\");\n\t});\n\tmod_menu.pushEventListener(\"debug_switchTree\", function () {\n\t\tswitchViewTree(\"tree\");\n\t});\n\tmod_menu.pushEventListener(\"debug_switchAccordion\", function () {\n\t\tswitchViewTree(\"accordion\");\n\t});\n\tmod_menu.pushEventListener(\"debug_toggleStats\", function () {\n\t\t// not implemented jet\n\t\t//var statistics = document.getElementById('x3dElement').runtime.statistics();\n\t\t//document.getElementById('x3dElement').runtime.statistics(statistics);\n\t});\n\n\n\n\t/***** Buttons views ******************************/\n\tmod_menu.pushEventListener(\"view_next\", function () {\n\t\tdocument.getElementById('x3dElement').runtime.nextView();\n\t\tdocument.getElementById('CoordinateAxes').runtime.nextView();\n\t});\n\tmod_menu.pushEventListener(\"view_pref\", function () {\n\t\tdocument.getElementById('x3dElement').runtime.prevView();\n\t\tdocument.getElementById('CoordinateAxes').runtime.prevView();\n\t});\n\tmod_menu.pushEventListener(\"view_reset_cur\", function () {\n\t\tdocument.getElementById('x3dElement').runtime.resetView();\n\t\tdocument.getElementById('CoordinateAxes').runtime.resetView();\n\t});\n\tmod_menu.pushEventListener(\"view_upright\", function () {\n\t\tdocument.getElementById('x3dElement').runtime.uprightView();\n\t});\n\tmod_menu.pushEventListener(\"view_top\", function () {\n\t\tdocument.getElementById('x3dElement').runtime.showAll('negY');\n\t});\n\tmod_menu.pushEventListener(\"view_bottom\", function () {\n\t\tdocument.getElementById('x3dElement').runtime.showAll('posY');\n\t});\n\tmod_menu.pushEventListener(\"view_left\", function () {\n\t\tdocument.getElementById('x3dElement').runtime.showAll('posX');\n\t});\n\tmod_menu.pushEventListener(\"view_right\", function () {\n\t\tdocument.getElementById('x3dElement').runtime.showAll('negX');\n\t});\n\tmod_menu.pushEventListener(\"view_front\", function () {\n\t\tdocument.getElementById('x3dElement').runtime.showAll('negZ');\n\t});\n\tmod_menu.pushEventListener(\"view_back\", function () {\n\t\tdocument.getElementById('x3dElement').runtime.showAll('posZ');\n\t});\n\n\n\t/***** Buttons Visibility**************************/\n\tmod_menu.pushEventListener(\"visib_showAll\", function () {\n\t\tMYAPP.tree.check_node(jQuery(\"#tree_\" + MYAPP.modelRootId));\n\t\tMYAPP.tree.check_all();\n\t});\n\tmod_menu.pushEventListener(\"visib_hideAll\", function () {\n\t\tMYAPP.tree.uncheck_node(jQuery(\"#tree_\" + MYAPP.modelRootId));\n\t});\n\tmod_menu.pushEventListener(\"visib_faces\", function () {\n\t\tmod_sceneGraph.renderVisibility('Point');\n\t});\n\tmod_menu.pushEventListener(\"visib_points\", function () {\n\t\tmod_sceneGraph.renderVisibility('Face');\n\t});\n\n\n\n\t/***** Buttons Setting **************************/\n\tmod_menu.pushEventListener(\"toggleLockMenu\", function (event, ui) {\n\t\t//alert(event)\n\t\tmod_menu.setMenuKeepOpen(jQuery(this).val());\n\t});\n\tmod_menu.pushEventListener(\"showObjOnSelect\", function (event, ui) {\n\t\tvar val = jQuery(this).val();\n\t\tif (val === true || val === \"true\") {\n\t\t\tMYAPP.isFlyToOnSelect = true;\n\t\t}\n\t\telse {\n\t\t\tMYAPP.isFlyToOnSelect = false;\n\t\t}\n\t});\n\n mod_menu.pushEventListener(\"toggleStat\", function () {\n var showStat = document.getElementById('x3dElement').runtime.statistics();\n //document.getElementById('x3dElement').runtime.statistics(!showStat);\n\n $(\"#x3dom-state-viewer\").fadeToggle();\n });\n mod_menu.pushEventListener(\"toggleLog\", function () {\n //document.getElementById('x3dElement').runtime.debug();\n $(\"#x3dom_logdiv\").slideToggle();\n });\n\n\n\t/***** Buttons Navigation Modes *******************/\n\t jQuery(\"#btn_examineMode\").click(function(){\n\t document.getElementById('x3dElement').runtime.examine() ;\n\t return false;\n\t });\n\t jQuery(\"#btn_walkMode\").click(function(){\n\t document.getElementById('x3dElement').runtime.walk();\n\t return false;\n\t });\n\t jQuery(\"#btn_lookAtMode\").click(function(){\n\t document.getElementById('x3dElement').runtime.lookAt();\n\t return false;\n\t });\n\t jQuery(\"#btn_flyMode\").click(function(){\n\t document.getElementById('x3dElement').runtime.fly();\n\t return false;\n\t });\n\t jQuery(\"#btn_gameMode\").click(function(){\n\t document.getElementById('x3dElement').runtime.game();\n\t return false;\n\t });\n\n}", "title": "" }, { "docid": "263d716f62b0043375c3891b91cca775", "score": "0.6601763", "text": "function watchMenu() {\n \n $(\"#results-articles\").addClass(\"hidden\");\n $(\"#results-events\").addClass(\"hidden\");\n $(\"#menu\").removeClass(\"hidden\");\n $(\".menu-button\").removeClass(\"active\");\n\n\n $('body').on('click', '#menu-articles', function (event) {\n $(\"#results-events\").addClass(\"hidden\");\n $(\"#results-articles\").removeClass(\"hidden\");\n $(\".menu-button\").removeClass(\"active\");\n $(this).addClass(\"active\");\n });\n \n $('body').on('click', '#menu-events', function (event) {\n $(\"#results-articles\").addClass(\"hidden\");\n $(\"#results-events\").removeClass(\"hidden\");\n $(\".menu-button\").removeClass(\"active\");\n $(this).addClass(\"active\");\n });\n}", "title": "" }, { "docid": "4b0788640f1fd4eacdfe2db77d954626", "score": "0.65878654", "text": "function onMenuClick() {\n console.log('clicked on the menu');\n }", "title": "" }, { "docid": "ccb16833ba02f126f3eb05b461a52a79", "score": "0.6566762", "text": "_setupEventHandlers() {\n if (this._hasMenu) {\n this._anchors.click((event) => {\n let anchor = $(event.target).is('button') ? $(event.target) : $(event.target).parents('button:first');\n this._navigate(anchor);\n });\n }\n\n $(this._menu.add(this._slider)).on('transitionend msTransitionEnd', () => {\n this._isAnimating = false;\n this._triggerEvent(true);\n });\n\n $(document).keydown((e) => {\n switch(e.which) {\n case this.options.keycodeClose:\n this.close();\n break;\n\n case this.options.keycodeOpen:\n this.open();\n break;\n\n default:\n return;\n }\n e.preventDefault();\n });\n\n this._menu.on('sm.back-after', () => {\n let lastActiveUl = 'ul ' + '.active '.repeat(this._level + 1);\n this._menu.find(lastActiveUl).removeClass('active').hide();\n });\n }", "title": "" }, { "docid": "fe1364bc877a364404e6369756930722", "score": "0.6555245", "text": "function ROOpenMenu() {\n $('#ro-hamburger').on('click', function() {\n $('body').toggleClass('ro-menu-opened');\n });\n\n $('#ro-main-menu-content .ro-easing-link-group a').on('click', function() {\n setTimeout(function() {\n $('body').removeClass('ro-menu-opened');\n }, 500);\n /* Act on the event */\n });\n }", "title": "" }, { "docid": "bda10bb169978076732c4c03ceeff957", "score": "0.65485525", "text": "_handleEvents()\n {\n this.$menubar.addEventListener('keydown', e => {\n\n if (e.keyCode === A11yMenu.getKeyCode('Tab')) {\n if (e.shiftKey) {\n const $previous = this.getPreviousFocusableElementOfMenu();\n if ($previous) {\n e.preventDefault();\n $previous.focus();\n }\n } else {\n const $next = this.getNextFocusableElementOfMenu();\n if ($next) {\n e.preventDefault();\n $next.focus();\n }\n }\n this.menu.closeAllSubMenus();\n }\n\n });\n\n this.$menubar.addEventListener('focusout', e => {\n if (this.$menubar.contains(e.relatedTarget)) return;\n this.menu.closeAllSubMenus();\n });\n\n this._getMenu().forEach(topLevelItem => {\n const positionInMenu = this._getMenu().indexOf(topLevelItem);\n\n // Events for the top level items\n topLevelItem.getToggler().addEventListener('keydown', e => {\n let menuItem = this._getMenu()[positionInMenu];\n let isDropdownOpen = menuItem.haveSubMenu() ? menuItem.getSubMenu().isOpen() : false;\n\n switch (e.keyCode) {\n\n // Arrow Left events\n case A11yMenu.getKeyCode('ArrowLeft'):\n e.preventDefault();\n if (positionInMenu === 0) {\n this.menu.getLastElement().getToggler().focus();\n } else {\n this._getMenu()[positionInMenu - 1].getToggler().focus();\n }\n\n // Close all opened menus\n this.menu.closeAllSubMenus();\n\n break;\n\n // Arrow Right events\n case A11yMenu.getKeyCode('ArrowRight'):\n e.preventDefault();\n if (positionInMenu === this.menu.getLength() - 1) {\n this.menu.getFirstElement().getToggler().focus();\n } else {\n this._getMenu()[positionInMenu + 1].getToggler().focus();\n }\n\n // Close all opened menus\n this.menu.closeAllSubMenus();\n\n break;\n\n // Home events\n case A11yMenu.getKeyCode('Home'):\n e.preventDefault();\n this.menu.getFirstElement().getToggler().focus();\n\n break;\n\n // End events\n case A11yMenu.getKeyCode('End'):\n e.preventDefault();\n this.menu.getLastElement().getToggler().focus();\n break;\n\n // Open menu (Space/Enter)\n case A11yMenu.getKeyCode('Space'):\n case A11yMenu.getKeyCode('Enter'):\n if (!menuItem.haveSubMenu()) return;\n\n if (!isDropdownOpen) {\n e.preventDefault();\n menuItem.openSubMenu();\n }\n break;\n\n // Open menu and focus first item\n case A11yMenu.getKeyCode('ArrowDown'):\n if (!menuItem.haveSubMenu()) return;\n e.preventDefault();\n\n if (!isDropdownOpen) menuItem.openSubMenu();\n menuItem.focusFirstElementInSubMenu();\n\n break;\n\n // Open menu and focus last item\n case A11yMenu.getKeyCode('ArrowUp'):\n if (!menuItem.haveSubMenu()) return;\n e.preventDefault();\n\n if (!isDropdownOpen) menuItem.openSubMenu();\n menuItem.focusLastElementInSubMenu();\n\n break;\n\n // Close menu (Escape)\n case A11yMenu.getKeyCode('Escape'):\n if (isDropdownOpen) {\n e.preventDefault();\n menuItem.closeSubMenu();\n }\n break;\n }\n });\n\n // Events for the first sub menu\n if (topLevelItem.haveSubMenu()) {\n topLevelItem.getSubMenu().menu.forEach(subMenuItem => {\n subMenuItem.getToggler().addEventListener('keydown', e => {\n\n switch (e.keyCode) {\n\n // Arrow Left events\n case A11yMenu.getKeyCode('ArrowLeft'):\n if (!subMenuItem.topLevel) return;\n\n e.preventDefault();\n if (positionInMenu === 0) {\n this.menu.getLastElement().getToggler().focus();\n } else {\n this._getMenu()[positionInMenu - 1].getToggler().focus();\n }\n\n // Close all opened menus\n this.menu.closeAllSubMenus();\n\n break;\n\n // Arrow Right events\n case A11yMenu.getKeyCode('ArrowRight'):\n if (subMenuItem.haveSubMenu() && subMenuItem.subMenuIsOpened()) return;\n\n e.preventDefault();\n if (positionInMenu === this.menu.getLength() - 1) {\n this.menu.getFirstElement().getToggler().focus();\n } else {\n this._getMenu()[positionInMenu + 1].getToggler().focus();\n }\n\n // Close all opened menus\n this.menu.closeAllSubMenus();\n\n break;\n\n }\n\n });\n });\n }\n\n });\n }", "title": "" }, { "docid": "1133aa60810b3f9a0406f90981d2b7d2", "score": "0.6521815", "text": "function eventListenerMenuBar() {\n const menuBarLinks = document.querySelectorAll(\"#events .menubar ul li\");\n menuBarLinks.forEach(link => {\n link.addEventListener(\"click\", handleMenuBar);\n });\n menuBarLinks[0].classList.add(\"active\");\n}", "title": "" }, { "docid": "303937271a1797197a2b060c22da8ca0", "score": "0.6510646", "text": "function _addEventListeners() {\n menuBtn.addEventListener(\"click\", _makeMenuPanelAppear);\n\n if (window.screen.width < 768) {\n menuLinks.forEach(_delayLoadingPage);\n }\n }", "title": "" }, { "docid": "40467a136514ab685236186c55b089ae", "score": "0.6508732", "text": "function openMenu() {\n gameState.menuPause = true;\n screenMan.push(gameMenu);\n screenMan.push(subSettings);\n soundMan.click.play();\n }", "title": "" }, { "docid": "7b1fea4211815e15037ed60b6ecee01e", "score": "0.6482272", "text": "function loadMenuToggles() {\n\n function menuClickoff(menu) {\n menu.bindOnce(\"clickoutside.menuoff\", function(event) {\n if (menu.hasClass(\"hack_workaround\")) {\n menu.removeClass(\"hack_workaround\");\n }\n else {\n menu.hide();\n menu.parents(\".menu_toggle\").removeClass(\"clicked\");\n }\n });\n }\n\n\n $(\".menu\").hide();\n $(\".menu_toggle\").click(function(event) {\n if (!$(this).hasClass(\"clicked\")) {\n var other_menu_toggles = $(\".menu_toggle\").not($(this));\n other_menu_toggles.removeClass(\"clicked\");\n other_menu_toggles.children(\".menu\").hide();\n var menu=$(this).children(\".menu\");\n menu.addClass(\"hack_workaround\");\n menuClickoff(menu);\n }\n $(this).children(\".menu\").toggle();\n });\n\n $(\".menu_toggle\").hover(\n function(event) {\n $(this).children(\".triangle-selector\").addClass(\"highlighted\");\n },\n function(event) {\n if (!$(this).hasClass(\"clicked\")) {\n $(this).children(\".triangle-selector\").removeClass(\"highlighted\");\n }\n }\n );\n defaultHoverClick($(\".menu_toggle\"));\n}", "title": "" }, { "docid": "b17ba7a4419c5bc0f6111c2ef10f288a", "score": "0.6448424", "text": "function setSideMenuEvents(menu) {\n var button = menu.find('.sidebutton');\n button.on('click', function () { slideMenu($(menu), \"hide\"); });\n}", "title": "" }, { "docid": "f791f1e1576117eabbfa8e67df4a0eba", "score": "0.6436668", "text": "function openMenu($mdOpenMenu, event) {\n $mdOpenMenu(event);\n }", "title": "" }, { "docid": "6cb996eed0b65d4bf254d3a86ff5851b", "score": "0.64086527", "text": "function onMenuLoad(){\n\tdebugLog(\"Menu triggered: ustadmobile_menuPage/2.html -> ustadmobile.js -> onMenuLoad()\");\n}", "title": "" }, { "docid": "fc38e9f36e9d484addcf3b006bf0ec46", "score": "0.6398996", "text": "function toggleMenu() {\n if (isMenuOpen == 0)\n openMenu();\n else if (isMenuOpen == 1)\n closeMenu();\n }", "title": "" }, { "docid": "ab8841e2e8442ae26fda6853083dc019", "score": "0.6394062", "text": "events() {\n this.menuIcon.addEventListener(\"click\", () => this.toggleTheMenu());\n }", "title": "" }, { "docid": "3d673667545741eb6fc6b0c695309715", "score": "0.63670814", "text": "function _listener() {\n $(settings.element.toggle).on('click', function() {\n\n // Getting target element\n var target = $(this).siblings(settings.element.menu);\n\n // Getting active state\n var activated = target.data(settings.data.activated);\n\n activated ? _hide(target) : _show(target);\n })\n }", "title": "" }, { "docid": "b536919c8921894b51c155458d28263b", "score": "0.6347976", "text": "addEventListeners() {\n\t\tdocument.addEventListener( 'click', this.handleToggle, false );\n\t\tdocument.addEventListener( 'click', this.handleDropdown, false );\n\t\tArray.prototype.forEach.call( this.menu.querySelectorAll( 'a, button' ), el => {\n\t\t\tel.addEventListener( 'blur', this.handleBlur, false );\n\t\t} );\n\t\tdocument.addEventListener( 'keydown', this.handleKeyDown, false );\n\t}", "title": "" }, { "docid": "e0efbe8c23eda4dcd0d3c96ce1810ba9", "score": "0.6343841", "text": "function initEventListeners() {\n treeToggle();\n popup();\n}", "title": "" }, { "docid": "d6dc0be190724c1d4e28b53d3e59305d", "score": "0.6325329", "text": "_setMenuStackListener() {\n this._menuStack.closed.pipe(takeUntil(this._destroyed)).subscribe((item) => {\n if (item === this._menuPanel._menu && this.isOpen()) {\n this.closed.next();\n this._overlayRef.detach();\n }\n });\n }", "title": "" }, { "docid": "119d5903bb284829242aa0c21134555e", "score": "0.6323154", "text": "_openMenu(options) {\n this.menu.open(options);\n }", "title": "" }, { "docid": "db2dd98d58c43b5e23397665d27636ff", "score": "0.63118356", "text": "function os_init_sub_menus() {\n // INIT MENU TO ACTIVATE ON HOVER\n var menu_timer\n $('.menu-activated-on-hover').on(\n 'click',\n 'ul.main-menu > li.has-sub-menu',\n function() {\n var $elem = $(this)\n\n if ($elem.hasClass('active')) {\n menu_timer = setTimeout(function() {\n $elem\n .removeClass('active')\n .closest('ul')\n .removeClass('has-active')\n }, 30)\n } else {\n clearTimeout(menu_timer)\n $elem\n .closest('ul')\n .addClass('has-active')\n .find('> li')\n .removeClass('active')\n $elem.addClass('active')\n }\n }\n )\n\n // INIT MENU TO ACTIVATE ON CLICK\n $('.menu-activated-on-click').on('click', 'li.has-sub-menu > a', function(\n event\n ) {\n var $elem = $(this).closest('li')\n if ($elem.hasClass('active')) {\n $elem.removeClass('active')\n } else {\n $elem\n .closest('ul')\n .find('li.active')\n .removeClass('active')\n $elem.addClass('active')\n }\n return false\n })\n}", "title": "" }, { "docid": "52e6a73acd6f4dbd6acaa91d863250a5", "score": "0.62970346", "text": "processMenu() {\n this.menuactual = this.menu;\n this.menuactual.setAttribute('aria-hidden', 'true');\n this.menuactual.setAttribute('tabindex', '0');\n this.menuactual.setAttribute('data-menuid', this.menuid);\n //this.menuactual.setAttribute('id', `menu-${this.menuid}`);\n\n document.body.appendChild(this.menuactual);\n\n for (let c of this.classes) {\n this.menu.classList.add(c);\n }\n\n this.menu.addEventListener('keyup', (e) => {\n if (e.key === 'Escape') {\n this.close();\n }\n });\n\n }", "title": "" }, { "docid": "aa28a2d100f41a06717a1cd33834655b", "score": "0.6292961", "text": "function load_menu(){\n $('.menu_items').load(window.reload_menuz, function(){\n activate_sortable();\n });\n}", "title": "" }, { "docid": "13713bca62ad9a2e6ea30d76aa79701d", "score": "0.62922585", "text": "function addMenu()\n{\n //const frag = new DocumentFragment();\n const ul = document.createElement(\"ul\");\n ul.classList.add(\"dropdown-bar\");\n for(const menuDatum of menuData())\n {\n const li = document.createElement(\"li\");\n ul.appendChild(li);\n\n const span = document.createElement(\"span\");\n li.appendChild(span);\n span.classList.add(\"dropdown-menu\");\n span.innerText=menuDatum.label;\n\n const div = document.createElement(\"div\");\n li.appendChild(div);\n div.classList.add(\"dropdown-content\");\n div.id=menuDatum.id;\n\n span.addEventListener(\"click\",()=>\n {\n for(const otherDiv of document.getElementsByClassName(\"dropdown-content\"))\n {\n if(div!==otherDiv) {otherDiv.classList.remove(\"show\");}\n }\n div.classList.toggle(\"show\");\n });\n\n //li.addEventListener(\"click\",()=>div.style.display=(div.style.display===\"block\"?\"none\":\"block\"));\n\n for(const entry of menuDatum.entries)\n {\n const a = document.createElement(\"a\");\n a.classList.add(\"dropdown-entry\");\n div.appendChild(a);\n a.innerHTML=entry[1];\n switch(typeof entry[0])\n {\n case 'string':\n {\n a.href=entry[0];\n a.target=\"_blank\";\n break;\n }\n case 'function':\n {\n a.addEventListener(\"click\",entry[0]);\n break;\n }\n default: log.error(\"unknown menu entry action type: \"+typeof entry[0]);\n }\n //\n }\n }\n document.getElementById(\"top\").prepend(ul);\n addOptions();\n}", "title": "" }, { "docid": "35ada297bbc5537e29898b2c41b56b12", "score": "0.62678486", "text": "function eventHandler() {\n\t\tsettings.container.addEventListener('click', function(e) {\n\t\t\tvar target = e.target;\n\n\t\t\tif (\n\t\t\t\ttarget.classList.contains('menu-item') &&\n\t\t\t\tisParentOf(settings.container, target)\n\t\t\t) {\n\t\t\t\tself.setSelectedMenu(target);\n\t\t\t} else {\n\t\t\t\tself.toggleMenu();\n\t\t\t}\n\t\t});\n\t}", "title": "" }, { "docid": "5a935b3191ae4df5b58213a2beb20b2e", "score": "0.6258436", "text": "function onOpen() {\r\nvar sheet = SpreadsheetApp.getActiveSpreadsheet();\r\nvar entries = [{\r\nname : menuMailSetupLabel,\r\nfunctionName : \"setupMail\"\r\n},{\r\nname : menuSearchSetupLabel,\r\nfunctionName : \"setup\"\r\n},\r\n null\r\n,{\r\nname : menuSearchLabel,\r\nfunctionName : \"lbc\"\r\n},\r\nnull\r\n,{\r\nname : menuLog,\r\nfunctionName : \"dolog\"\r\n},{\r\nname : menuArchiveLog,\r\nfunctionName : \"archivelog\"\r\n}];\r\nsheet.addMenu(menuLabel, entries);\r\n}", "title": "" }, { "docid": "f6a528b788f023f1e9b84c078c79e4eb", "score": "0.62357503", "text": "function toggleMenu() {\n\n\t\tif (isMenuOpen) {\n\t\t\tcloseMenu();\n\t\t} else {\n\t\t\topenMenu();\n\t\t}\n\t}", "title": "" }, { "docid": "09cc0ec1ac0749db6e3ff5c61ba4ecfb", "score": "0.6226779", "text": "function load_mobile_menu() {\n $('.mobile-menu-sub').on('click', function () {\n var $this = $(this);\n var $root = $this.closest('.slideout-menu');\n var link = $this.data('link');\n $this.closest('.mobile-menu').addClass('mobile-menu-stacked');\n $root.find('#' + link).removeClass('mobile-menu-hidden');\n });\n\n $('.mobile-menu-back').on('click', function () {\n var $this = $(this);\n var $root = $this.closest('.slideout-menu');\n var link = $this.data('link');\n $this.closest('.mobile-menu').addClass('mobile-menu-hidden');\n $root.find('#' + link).removeClass('mobile-menu-stacked');\n });\n\n $('.mobile-menu-currency-link').on('click', function () {\n var $this = $(this);\n var code = $this.data('code');\n $(document).trigger(\"currency:change\", code);\n });\n\n $(document).on(\"currency:change\", function (event, currency) {\n // Select current currency in the mobile menu when global select changes\n $('.mobile-menu-currency-selected').removeClass('mobile-menu-currency-selected');\n $('.mobile-menu-currency-link[data-code=' + currency +']').addClass('mobile-menu-currency-selected');\n });\n}", "title": "" }, { "docid": "1784d2f7ac747263ffb1cedacd89ce54", "score": "0.6223614", "text": "_initMenu() {\n this.menu.parentMenu = this.triggersSubmenu() ? this._parentMaterialMenu : undefined;\n this.menu.direction = this.dir;\n this._setMenuElevation();\n this.menu.focusFirstItem(this._openedBy || 'program');\n this._setIsMenuOpen(true);\n }", "title": "" }, { "docid": "b6998a361b71a735b033e885678a12d1", "score": "0.6213424", "text": "refreshMenu() {\n $.get(this.getUri('refresh-menu'), (response) => {\n this.menu.items = response;\n\n this.notify('warning', Lang.get('main.main-menu-changed'));\n });\n }", "title": "" }, { "docid": "85d23b6800a62ae61011c56bc1ed35f9", "score": "0.620441", "text": "function toggleMenu(event) {\n\n // variable to retrieve the value in the action dataset\n var targetAction = event.currentTarget.dataset.action;\n\n // declare variable for menu wrapper\n var menuWrapper = document.querySelector(\".menu-wrapper\");\n var contentContainer = document.querySelector(\".content-container\");\n var header = document.querySelector(\".header\");\n\n // switch statement to run code depending on action button value\n switch(targetAction) {\n\n // if open\n case \"open\":\n\n // add active classes to menuWrapper, contentContainer and header elements\n menuWrapper.classList.remove(\"menu-hidden\");\n menuWrapper.classList.add(\"menu-active\");\n contentContainer.classList.remove(\"content-hidden\");\n contentContainer.classList.add(\"content-active\");\n header.classList.remove(\"header-hidden\");\n header.classList.add(\"header-active\");\n break;\n\n // if close\n case \"close\":\n // add hidden classes to menuWrapper, contentContainer and header elements\n menuWrapper.classList.remove(\"menu-active\");\n menuWrapper.classList.add(\"menu-hidden\");\n contentContainer.classList.remove(\"content-active\");\n contentContainer.classList.add(\"content-hidden\");\n header.classList.remove(\"header-active\");\n header.classList.add(\"header-hidden\");\n break;\n }\n }", "title": "" }, { "docid": "e9875fa4f2af9992713968ea5bafa374", "score": "0.61853474", "text": "function openMenu() {\n menuBtn.addEventListener(\"click\", () => {\n menuBtn.classList.toggle(\"is-active\");\n mainMenu.classList.toggle(\"active\");\n });\n}", "title": "" }, { "docid": "f12bc1985b98e9652340256e0cdee83a", "score": "0.61744", "text": "function menu() {}", "title": "" }, { "docid": "902312d5b76b0305b28adc1880edf3d4", "score": "0.61707866", "text": "events() {\n\t\tthis.menuIcon.click(this.toggleTheMenu.bind(this)); // \".click()\" è un metodo jquery\n\t}", "title": "" }, { "docid": "2f4c0158a8657c67507ff35a2d6e74ec", "score": "0.6169326", "text": "function menulistener() {\n $(\".navbar-nav a\").click(activatemenu); // run popup function when \".image-thumbnail\" is clicked\n}", "title": "" }, { "docid": "6bce8dc3639b22799d0bc3a5fe2f6b4b", "score": "0.6168922", "text": "function menuAnimation() {\n if (document.querySelector('.menu--open')) {\n console.log('performing close animation'); \n gsap.from(\".menu\", { duration: 1, x: 0});\n gsap.to(\".menu\", { duration: 1, x: -50});\n }else if (document.querySelector('.menu--close')){\n console.log('performing open animation'); \n gsap.from(\".menu\", { duration: 1, x: -50});\n gsap.to(\".menu\", { duration: 1, x: 0}); \n }\n \n\n document.querySelector('.articles').addEventListener(\"click\",\n () => {\n gsap.from(\".menu\", { duration: 1, x: 0});\n gsap.to(\".menu\", { duration: 1, x: -50 });\n document.querySelector('.menu').classList.add('menu--close');\n document.querySelector('.menu').classList.remove('menu--open');\n }\n );\n }", "title": "" }, { "docid": "df98eb68cf6fc74d92a3e7c53bd5785f", "score": "0.61637485", "text": "function runApp(){\n console.log(' - Tratando eventos...');\n\n // Monitorando o botão 'menu'\n $(document).on('click', '#menu', toggleMenu);\n\n // Monitorando fundo do 'menu'\n $(document).on('click', '#menuModal', toggleMenu);\n}", "title": "" }, { "docid": "73dbcfcac743a585de28662156802aec", "score": "0.615908", "text": "function lm() {\n var locationsMenu = new UI.Menu({\n sections: [{\n items: [{\n title: 'Add to Favorites'\n },{\n title: 'Trains Coming Soon' \n },{\n title: 'Map My Location'\n }]\n }]\n });\n\n //Locations callbacks\n locationsMenu.on('select', function(e){\n if(e.itemIndex === 0) {\n addCurrentLocationToFavorites();\n }else if(e.itemIndex === 1) {\n arrivingTrainsAtCurrent();\n locationsMenu.hide();\n }else if(e.itemIndex === 2){\n mapMyLocation();\n locationsMenu.hide();\n }\n });\n locationsMenu.show();\n}", "title": "" }, { "docid": "fa14b5f4030c0a56913171cc80ba5ca4", "score": "0.61556077", "text": "function activateMenus() {\r\n $('#header-top').append('<a href=\"#\" class=\"menu-button\">Menu</a>');\r\n $('#header-top').delegate('.menu-button', 'click', function () {\r\n $('body').toggleClass('sideNav');\r\n });\r\n \r\n $('nav li:has(.mega, .sub) > a').click(function (e) {\r\n e.preventDefault();\r\n var li = $(this).parent();\r\n // Only close menu if user clicked to open it\r\n if (li.hasClass('hover') && clickOpened) {\r\n li.removeClass('hover');\r\n }\r\n else {\r\n li.addClass('hover');\r\n $('nav li').not(li).removeClass('hover');\r\n clickOpened = true;\r\n }\r\n return false;\r\n });\r\n\r\n $('nav li:has(.mega, .sub)').click(function (e) {\r\n e.stopPropagation();\r\n });\r\n\r\n // Menu config\r\n var byuMenuConfig = {\r\n sensitivity: 10,\r\n interval: 75,\r\n over: rollOver, // function = onMouseOver callback (REQUIRED) \r\n timeout: 350, // number = milliseconds delay before onMouseOut \r\n out: rollOut // function = onMouseOut callback (REQUIRED) \r\n };\r\n //$('#secondary-nav > ul > li, #primary-nav > ul > li').hoverIntent(byuMenuConfig);\r\n $('nav.no-js').removeClass('no-js');\r\n\r\n /* Positions menu divs */\r\n $('nav li .sub').each(function () {\r\n var mega = $(this);\r\n var left = mega.parent().position().left;\r\n if (left > mega.parent().parent().outerWidth() - mega.outerWidth())\r\n mega.css('right', 0);\r\n });\r\n }", "title": "" }, { "docid": "eabbb0ed9786cfe6691a129f0d13ada7", "score": "0.61491555", "text": "function setSidenavListeners() {\n const subHeadings = $('.navList__subheading'); console.log('subHeadings: ', subHeadings);\n const SUBHEADING_OPEN_CLASS = 'navList__subheading--open';\n const SUBLIST_HIDDEN_CLASS = 'subList--hidden';\n\n subHeadings.each((i, subHeadingEl) => {\n $(subHeadingEl).on('click', (e) => {\n const subListEl = $(subHeadingEl).siblings();\n\n // Add/remove selected styles to list category heading\n if (subHeadingEl) {\n toggleClass($(subHeadingEl), SUBHEADING_OPEN_CLASS);\n }\n\n // Reveal/hide the sublist\n if (subListEl && subListEl.length === 1) {\n toggleClass($(subListEl), SUBLIST_HIDDEN_CLASS);\n }\n });\n });\n}", "title": "" }, { "docid": "82ab64e954e8ddf262eb2ad2705ecf14", "score": "0.6146822", "text": "function eventMenu(){\n\t\t$(\".people\").click(function(){\n\t\t\turl ='http://127.0.0.1/ph/co2#page.type.citoyens.id.';\n\t\t\turl += $(this).data().id;\n\t\t\twindow.open(url);\n\t\t});\t\n\n\t\t$(\".organizations\").click(function(){\n\t\t\turl ='http://127.0.0.1/ph/co2#page.type.organizations.id.';\n\t\t\turl += $(this).data().id;\n\t\t\twindow.open(url);\n\t\t});\t\n\n\t\t$(\".projects\").click(function(){\n\t\t\turl ='http://127.0.0.1/ph/co2#page.type.projects.id.';\n\t\t\turl += $(this).data().id;\n\t\t\twindow.open(url);\n\t\t});\t\n\n\t\t$(\".events\").click(function(){\n\t\t\turl ='http://127.0.0.1/ph/co2#page.type.events.id.';\n\t\t\turl += $(this).data().id;\n\t\t\twindow.open(url);\n\t\t});\t\n\t}", "title": "" }, { "docid": "ccefc6f8ae7d4df8430b1ab2c0d0f95b", "score": "0.6137981", "text": "function sideMenuItemOpen(event) {\n if (!event.target.classList.contains('menu-cat-button')) return;\n var targetItem = event.target.nextElementSibling.classList;\n\n if (!targetItem.contains('isOpen')) {\n _DOMRefs.menuWrapRef.forEach(function (item) {\n return item.classList.remove('isOpen');\n });\n\n targetItem.add('isOpen');\n } else targetItem.remove('isOpen');\n}", "title": "" }, { "docid": "3bd9df4d83ca45d04143116871f70cc8", "score": "0.61354184", "text": "function setupMenuHandlers() {\n updateHref('menu_english', function() {\n tableHelper.countriesToTable(countries.getByLanguage('English'));\n tableHelper.updateSubtitle('List of countries in English');\n });\n\n updateHref('menu_arabic', function() {\n tableHelper.countriesToTable(countries.getByLanguage('Arabic'));\n tableHelper.updateSubtitle('List of countries in Arabic');\n });\n updateHref('menu_french', function() {\n tableHelper.countriesToTable(countries.getByLanguage('French'));\n tableHelper.updateSubtitle('List of countries in French');\n });\n updateHref('menu_chinese', function() {\n tableHelper.countriesToTable(countries.getByLanguage('Chinese'));\n tableHelper.updateSubtitle('List of countries in Chinese');\n });\n updateHref('menu_hindi', function() {\n tableHelper.countriesToTable(countries.getByLanguage('Hindi'));\n tableHelper.updateSubtitle('List of countries in Hindi');\n });\n updateHref('menu_korean', function() {\n tableHelper.countriesToTable(countries.getByLanguage('Korean'));\n tableHelper.updateSubtitle('List of countries in Korean');\n });\n updateHref('menu_japanese', function() {\n tableHelper.countriesToTable(countries.getByLanguage('Japanese'));\n tableHelper.updateSubtitle('List of countries in Japanese');\n });\n updateHref('menu_russian', function() {\n tableHelper.countriesToTable(countries.getByLanguage('Russian'));\n tableHelper.updateSubtitle('List of countries in Russian');\n });\n updateHref('menu_population_100_000_000m', function() {\n tableHelper.countriesToTable(countries.getByPopulation(100000000));\n tableHelper.updateSubtitle('List of countries with population > 100m');\n });\n\n updateHref('menu_population_1m_2m', function() {\n tableHelper.countriesToTable(\n countries.getByPopulation(1000000, 2000000)\n );\n tableHelper.updateSubtitle(\n 'List of countries with population between 1m and 2m'\n );\n });\n\n updateHref('menu_americas_1mkm', function() {\n tableHelper.countriesToTable(\n countries.getByAreaAndContinent('Americas', 1000000)\n );\n tableHelper.updateSubtitle(\n 'List of countries in Americas with area > 1m'\n );\n });\n\n updateHref('menu_asia_all', function() {\n tableHelper.countriesToTable(\n countries.getByAreaAndContinent('Asia', 0)\n );\n tableHelper.updateSubtitle('List of all countries in Asia');\n });\n}", "title": "" }, { "docid": "117413e30af9a21eb76ceb7b4e75c2f3", "score": "0.6133665", "text": "function init() {\n setMobileMenuHandler();\n setMobileSubMenuHandler();\n}", "title": "" }, { "docid": "711efd6889bf1317c09d166aa31acdfe", "score": "0.6132082", "text": "function initMobileMenu() {\r\n $(\"#mplus-nav .navmenu-btn .hide-offscreen\").text(messages[lang]['show']+\" \");\r\n \t$(\"#mplus-nav .navmenu-btn\").click(function (event) {\r\n \t\tvar button = $(this);\r\n \t\tvar Options = {\r\n \t\t\t\"sm-menu-btn\" : \"menu\",\r\n \t\t\t\"sm-search-btn\" : \"search\",\r\n \t\t}\r\n \t\t//Expand\r\n \t\tif(!button.hasClass(\"expanded\")){\r\n\t \t//Get expand accesibility message\r\n\t \tvar msg = messages[lang][Options[button.attr('id')]]+\" \"+messages[lang]['expand'];\r\n\t //Check another option is currently expanded, if so collapse it\r\n\t $(\"#mplus-nav .navmenu-btn.expanded\").each(function(index) {\r\n\t \t\tvar other = $(this);\r\n\t \t\t//Hide unselected option\r\n\t\t \t\t$(\"#\"+other.attr('id')+\", \"+\"#\"+other.attr('aria-controls')).removeClass(\"expanded\");\r\n\t\t \t\t//Add the unselected option's collapse accesibility message\r\n\t msg = messages[lang][Options[other.attr('id')]]+\" \"+messages[lang]['collapse']+\" \" + msg;\r\n\t\t //Fix the button's acessibility pressed/expanded area\r\n\t\t $(\"#\"+other.attr('id')).attr('aria-pressed', 'false');\r\n\t\t $(\"#\"+other.attr('aria-controls')).removeAttr('aria-expanded');\r\n //Update Button Text\r\n $(other).children(\".hide-offscreen\").text(messages[lang]['show']+\" \");\r\n\t });\r\n\t //Show the selected area\r\n\t \t$(\"#\"+button.attr('id')+\", \"+\"#\"+button.attr('aria-controls')).addClass(\"expanded\");\r\n //Update Button Text\r\n $(button).children(\".hide-offscreen\").text(messages[lang]['hide']+\" \");\r\n\t //Update the live accesibility message\r\n\t $(\"#mplus-nav .sm-live-area\").html(msg);\r\n\t //Update the button's acessibility expanded\r\n\t $(\"#\"+button.attr('aria-controls')).attr('aria-expanded', 'true');\r\n\r\n \t\t}\r\n \t\t//Collapse\r\n \t\telse {\r\n\t\t //Hide the selected area\r\n\t\t \t$(\"#\"+button.attr('id')+\", \"+\"#\"+button.attr('aria-controls')).removeClass(\"expanded\");\r\n //Update Button Text\r\n $(button).children(\".hide-offscreen\").text(messages[lang]['show']+\" \");\r\n\t\t\t\t//Update the live accesibility message\r\n\t\t\t\t$(\"#mplus-nav .sm-live-area\").html(messages[lang][Options[button.attr('id')]]+\" \"+messages[lang]['collapse']);\r\n\t //Update the button's acessibility expanded\r\n\t $(\"#\"+button.attr('aria-controls')).removeAttr('aria-expanded');\r\n \t\t}\r\n \t});\r\n \t}", "title": "" }, { "docid": "392fcb9fbbc6e6421e1111be9cd250ef", "score": "0.61303437", "text": "function loadCSMenu() {\n clearScreen();\n loadCursor();\n\n loadNavBars(\"Computer Science\");\n\n let menu = addCSMenu();\n document.body.appendChild(menu);\n}", "title": "" }, { "docid": "d58ce4a368d738400b7bf9a50155d1f4", "score": "0.6129881", "text": "draw() {\r\n // get the menu contents\r\n this.listener = this.add_configuration_listener(\"gui/menu/#\", gui.menu_config_schema)\r\n }", "title": "" }, { "docid": "6216796f2eec8a04cd215624e5092e1a", "score": "0.6129874", "text": "function initContextMenus() {\n if(!allowedAdd)\n {\n return false;\n }\n new Proto.Menu({\n selector : '.level',\n className : 'menu desktop',\n menuItems : deleteMenuItems,\n beforeShow : function(e) {\n var paras = $A($$('div.menu'));\n paras.each(Element.hide);\n }\n });\n new Proto.Menu({\n selector : '.competency',\n className : 'menu desktop',\n menuItems : deleteMenuItems,\n beforeShow : function(e) {\n var paras = $A($$('div.menu'));\n paras.each(Element.hide);\n }\n });\n new Proto.Menu({\n selector : '.level_NA',\n className : 'menu desktop',\n menuItems : addMenuItems,\n beforeShow : function(e) {\n var paras = $A($$('div.menu'));\n paras.each(Element.hide);\n }\n });\n new Proto.Menu({\n selector : '.competency_NA',\n className : 'menu desktop',\n menuItems : addMenuItems,\n beforeShow : function(e) {\n var paras = $A($$('div.menu'));\n paras.each(Element.hide);\n }\n });\n\n new Proto.Menu({\n selector : '.level_IP',\n className : 'menu desktop',\n menuItems : deleteMenuItems,\n beforeShow : function(e) {\n var paras = $A($$('div.menu'));\n paras.each(Element.hide);\n }\n });\n new Proto.Menu({\n selector : '.competency_IP',\n className : 'menu desktop',\n menuItems : deleteMenuItems,\n beforeShow : function(e) {\n var paras = $A($$('div.menu'));\n paras.each(Element.hide);\n }\n });\n new Proto.Menu({\n selector : '.level_NA_IP',\n className : 'menu desktop',\n menuItems : addMenuItems,\n beforeShow : function(e) {\n var paras = $A($$('div.menu'));\n paras.each(Element.hide);\n }\n });\n new Proto.Menu({\n selector : '.competency_NA_IP',\n className : 'menu desktop',\n menuItems : addMenuItems,\n beforeShow : function(e) {\n var paras = $A($$('div.menu'));\n paras.each(Element.hide);\n }\n });\n}", "title": "" }, { "docid": "96bebb9a7139b6c86222f0bd0817e6cc", "score": "0.6126291", "text": "function toggleMenu(event) {\n if (!event) var event = window.event;\n event.stopPropagation();\n open = !open;\n\n if (open) {\n var tl = new TimelineLite();\n tl.to(trigger, 0.6, {scale:1, transformOrigin: \"50% 50%\", ease: Expo.easeInOut }, 0)\n tl.to(items, 0.2, {scale:1, ease:Back.easeOut.config(4)}, 0.05);\n // MSP using this open/close animation skews the position of the first segment from 12 o'clock\n // for(var i=0; i<items.length; i++){\n // tl.to(items[i], 0.7, {rotation:-i*angle + \"deg\", ease:Bounce.easeOut}, 0.35);\n // }\n label.innerHTML = \"-\";\n svg.style.pointerEvents = \"auto\";\n } else {\n closePieMenu();\n }\n\n}", "title": "" }, { "docid": "3d4889eb51ba7f0cd215d356eefd65c7", "score": "0.6121308", "text": "function initNav() {\n $navBar.find(barClassName + '__item a')\n // click items to show fly-out menus\n .click(function (e) {\n var $itemLink = $(e.currentTarget);\n var $item = $itemLink.parent();\n\n if ($itemLink.data('menuId')) {\n e.preventDefault();\n\n // applicable when another menu is current expanded and\n // a new one is opened\n if (isMenuOpen() && !Utils.isMobile()) {\n $items.find('.is-selected').removeClass('is-selected').addClass('is-unselected');\n\n $item.addClass('is-selected').removeClass('is-unselected');\n }\n\n if (Utils.isMobile()) {\n // no hover handler to pre-set is-selected dimming class\n $items.find(barClassName + '__item').removeClass('is-selected').addClass('is-unselected');\n $item.addClass('is-selected').removeClass('is-unselected');\n }\n\n var menuId = $itemLink.data('menuId');\n var $menu = getMenu(menuId);\n // some item changes based on whether we're showing or hiding a menu\n if ($menu.hasClass('active')) {\n if (Utils.isMobile()) {\n // gotta cleanup the item dimming classes - sliiightly tedious\n $items.find(barClassName + '__item').removeClass('is-unselected');\n }\n }\n\n toggleNavMenu(menuId);\n }\n });\n }", "title": "" }, { "docid": "527c337c35d03566d3698bbc642c0bee", "score": "0.6118028", "text": "function initialize() {\n\tif (mainView.menuButton) {\n\t\tmainView.menuButton.addEventListener('click', hideMenu);\n\t}\n\t\n\t// initialize the menu\n\t$.drawermenu.init({\n\t\tmenuview : menuView.getView(),\n\t\tmainview : mainView.getView(),\n\t\tduration : 200,\n\t\tparent : $.master\n\t});\n\n}", "title": "" }, { "docid": "2af2d6f0e444e3d3df2d4e938523777e", "score": "0.6115069", "text": "function initTabMenus() {\n\n $.index.addEventListener('open', function (e) {\n\n $.index.activity.addEventListener('newintent', function (e2) {\n console.log('newintent from index.js added to tabgroup activity ' + JSON.stringify(e2));\n });\n\n $.index.activity.onCreateOptionsMenu = function (e3) {\n\n // Delegate the creation of the menu to the active tab\n if ($.index.activeTab.window.activity.onCreateOptionsMenu) {\n $.index.activeTab.window.activity.onCreateOptionsMenu(e3);\n }\n };\n\n });\n\n // When a tab receives focus\n $.index.addEventListener('focus', function (e) {\n\n // Force the TabGroup's menu to be regenerated\n $.index.activity.invalidateOptionsMenu();\n });\n\n}", "title": "" }, { "docid": "2eb7ac0923c5870cfd436f25a16c7904", "score": "0.6112717", "text": "function sm() {\n var stationsMenu = new UI.Menu({\n sections: [{\n items: [{\n title: 'Stations Near Me'\n },{\n title: 'All Stations' \n }]\n }]\n });\n\n //Stations callbacks\n stationsMenu.on('select', function(e){\n if(e.itemIndex === 0) {\n getStationsCloseToMe();\n }else if(e.itemIndex === 1) {\n getStations();\n }\n });\n stationsMenu.show();\n}", "title": "" }, { "docid": "187b8e76f684b62e47797c0373f837eb", "score": "0.6111026", "text": "function initGUI(){\n\n $('#app').on('click',function(ev){\n var target = $(ev.target);\n if( target.prop('tagName') === 'A' && target.hasClass('open-url-external')){\n console.log(\"opening external url\");\n ev.preventDefault();\n ev.stopPropagation();\n try {\n openURL(\n target.data('type'),\n target.data('ip'),\n target.data('port'),\n target.data('rid'),\n {\n path : target.data('path'),\n label : target.data('label')\n }\n );\n } catch (e) {\n console.error(\"failed to invoke openUrl\");\n }\n }\n });\n var deferred = Q.defer();\n\n var createMenu = function(docs){\n resolveTemplate(\"tmpl-menu\", \"my-menu\", {\n customer: docs\n });\n\n $('nav#my-menu').mmenu({\n \"iconPanels\": true,\n \"searchfield\": true,\n \"navbar\": {\n \"title\": 'Customers'\n },\n \"onClick\": {\n \"close\": true,\n \"preventDefault\": false\n },\n \"extensions\": [\"pagedim-black\", \"pageshadow\"]\n }, {\n \"offCanvas\": {\n \"pageSelector\": \"#page\"\n }\n });\n \n // get a reference to the MMenu instance\n var api = $(\"nav#my-menu\").data( \"mmenu\" );\n $('#hamburger').on('click',function(ev){\n api.open();\n });\n // update menu icon depending on open/close action\n api.bind('opened',function($panel){\n $('#hamburger').addClass('is-active');\n /*\n $('#icon-menu')\n .removeClass('glyphicon-menu-hamburger')\n .addClass('glyphicon-remove');\n */\n }).bind('closed',function($panel){\n $('#hamburger').removeClass('is-active');\n /*\n $('#icon-menu')\n .removeClass('glyphicon-remove')\n .addClass('glyphicon-menu-hamburger');\n */\n });\n\n };\n\n // load all record (customers) from db as we need them to be\n // able to build the MMenu widget. The returned document array\n // is sorted on the cusomer name field.\n\n db.find({}).sort({name : 1 }).exec(function(err,docs){\n if(err) {\n deferred.reject(new Error(err));\n } else {\n createMenu(docs);\n deferred.resolve();\n }\n });\n\n return deferred;\n}", "title": "" }, { "docid": "b2000785ee4f100d9e28326ebbde26f6", "score": "0.6109971", "text": "function menuItemEvent(menuItem) {\n if (menuItem == \"LOAD 'createTestBlocks.js'\") {\n null;\n }\n if (Menu.isOptionChecked(\"LOAD 'createTestBlocks.js'\")) {\n Script.loadScript(createTestBlocksScript, true);\n Menu.setIsOptionChecked(\"LOAD 'createTestBlocks.js'\", false);\n }\n if (menuItem == \"UNLOAD 'createTestBlocks.js'\") {\n null;\n }\n if (Menu.isOptionChecked(\"UNLOAD 'createTestBlocks.js'\")) {\n ScriptDiscoveryService.stopScript(createTestBlocksScript);\n Menu.setIsOptionChecked(\"UNLOAD 'createTestBlocks.js'\", false);\n }\n if (menuItem == \"OPEN ATP Upload [Press CTRL+SHIFT+A]\") {\n null;\n }\n if (Menu.isOptionChecked(\"OPEN ATP Upload [Press CTRL+SHIFT+A]\")) {\n Menu.setIsOptionChecked(\"OPEN ATP Upload [Press CTRL+SHIFT+A]\", false);\n }\n if (menuItem == \"ENABLE Echo Server Audio [Un-Mute Microphone + Manually Select DEVELOPER - AUDIO - ECHO SERVER AUDIO]\") {\n null;\n }\n if (Menu.isOptionChecked(\"ENABLE Echo Server Audio [Un-Mute Microphone + Manually Select DEVELOPER - AUDIO - ECHO SERVER AUDIO]\")) {\n Menu.setIsOptionChecked(\"ENABLE Echo Server Audio [Un-Mute Microphone + Manually Select DEVELOPER - AUDIO - ECHO SERVER AUDIO]\", false);\n }\n if (menuItem == \"LOAD 'harmonicOscillator.js'\") {\n null;\n }\n if (Menu.isOptionChecked(\"LOAD 'harmonicOscillator.js'\")) {\n Script.loadScript(harmonicOscillatorScript, true);\n Menu.setIsOptionChecked(\"LOAD 'harmonicOscillator.js'\", false);\n }\n if (menuItem == \"UNLOAD 'harmonicOscillator.js'\") {\n null;\n }\n if (Menu.isOptionChecked(\"UNLOAD 'harmonicOscillator.js'\")) {\n ScriptDiscoveryService.stopScript(harmonicOscillatorScript);\n Menu.setIsOptionChecked(\"UNLOAD 'harmonicOscillator.js'\", false);\n }\n if (menuItem == \"LOAD 'reverbTest.js'\") {\n null;\n }\n if (Menu.isOptionChecked(\"LOAD 'reverbTest.js'\")) {\n Script.loadScript(reverbTestScript, true);\n Menu.setIsOptionChecked(\"LOAD 'reverbTest.js'\", false);\n }\n if (menuItem == \"UNLOAD 'reverbTest.js'\") {\n null;\n }\n if (Menu.isOptionChecked(\"UNLOAD 'reverbTest.js'\")) {\n ScriptDiscoveryService.stopScript(reverbTestScript);\n Menu.setIsOptionChecked(\"UNLOAD 'reverbTest.js'\", false);\n }\n if (menuItem == \"LOAD 'playaPerformanceTest.js'\") {\n null;\n }\n if (Menu.isOptionChecked(\"LOAD 'playaPerformanceTest.js'\")) {\n Script.loadScript(playaPerformanceTestScript, true);\n Menu.setIsOptionChecked(\"LOAD 'playaPerformanceTest.js'\", false);\n }\n if (menuItem == \"UNLOAD 'playaPerformanceTest.js'\") {\n null;\n }\n if (Menu.isOptionChecked(\"UNLOAD 'playaPerformanceTest.js'\")) {\n ScriptDiscoveryService.stopScript(playaPerformanceTestScript);\n Menu.setIsOptionChecked(\"UNLOAD 'playaPerformanceTest.js'\", false);\n }\n if (menuItem == \"Generate Non-Smoke Test [CUT + PASTE RESULT]\") {\n null;\n }\n if (Menu.isOptionChecked(\"Generate Non-Smoke Test [CUT + PASTE RESULT]\")) {\n generateNonSmokeTestManualTestingReport();\n Menu.setIsOptionChecked(\"Generate Non-Smoke Test [CUT + PASTE RESULT]\", false);\n }\n if (menuItem == \"Generate Smoke Test Manual Testing Report\") {\n null;\n }\n if (Menu.isOptionChecked(\"Generate Smoke Test [CUT + PASTE RESULT]\")) {\n generateSmokeTestManualTestingReport();\n Menu.setIsOptionChecked(\"Generate Smoke Test [CUT + PASTE RESULT]\", false);\n }\n\n if (Menu.isOptionChecked(\"Generate RC Results [CUT + PASTE RESULT]\")) {\n\n rcresults();\n Menu.setIsOptionChecked(\"Generate RC Results [CUT + PASTE RESULT]\", false);\n }\n\n if (Menu.isOptionChecked(\"Test 1\")) {\n if (rctestdone1 != 1) {\n rctest1_prompt();\n }\n rctestdone1 = 1;\n } else {\n rctestdone1 = 0;\n }\n if (Menu.isOptionChecked(\"Test 2\")) {\n if (rctestdone2 != 1) {\n rctest2_prompt();\n }\n rctestdone2 = 1;\n } else {\n rctestdone2 = 0;\n }\n if (Menu.isOptionChecked(\"Test 3\")) {\n if (rctestdone3 != 1) {\n rctest3_prompt();\n }\n rctestdone3 = 1;\n } else {\n rctestdone3 = 0;\n }\n if (Menu.isOptionChecked(\"Test 4\")) {\n if (rctestdone4 != 1) {\n rctest4_prompt();\n }\n rctestdone4 = 1;\n } else {\n rctestdone4 = 0;\n }\n if (Menu.isOptionChecked(\"Test 5\")) {\n if (rctestdone5 != 1) {\n rctest5_prompt();\n }\n rctestdone5 = 1;\n } else {\n rctestdone5 = 0;\n }\n if (Menu.isOptionChecked(\"Test 6\")) {\n if (rctestdone6 != 1) {\n rctest6_prompt();\n }\n rctestdone6 = 1;\n } else {\n rctestdone6 = 0;\n }\n if (Menu.isOptionChecked(\"Test 7\")) {\n if (rctestdone7 != 1) {\n rctest7_prompt();\n }\n rctestdone7 = 1;\n } else {\n rctestdone7 = 0;\n }\n if (Menu.isOptionChecked(\"Test 8\")) {\n if (rctestdone8 != 1) {\n rctest8_prompt();\n }\n rctestdone8 = 1;\n } else {\n rctestdone8 = 0;\n }\n if (Menu.isOptionChecked(\"Test 9\")) {\n if (rctestdone9 != 1) {\n rctest9_prompt();\n }\n rctestdone9 = 1;\n } else {\n rctestdone9 = 0;\n }\n if (Menu.isOptionChecked(\"Test 10\")) {\n if (rctestdone10 != 1) {\n rctest10_prompt();\n }\n rctestdone10 = 1;\n } else {\n rctestdone10 = 0;\n }\n if (Menu.isOptionChecked(\"Test 11\")) {\n if (rctestdone11 != 1) {\n rctest11_prompt();\n }\n rctestdone11 = 1;\n } else {\n rctestdone11 = 0;\n }\n if (Menu.isOptionChecked(\"Test 12\")) {\n if (rctestdone12 != 1) {\n rctest12_prompt();\n }\n rctestdone12 = 1;\n } else {\n rctestdone12 = 0;\n }\n if (Menu.isOptionChecked(\"Test 13\")) {\n if (rctestdone13 != 1) {\n rctest13_prompt();\n }\n rctestdone13 = 1;\n } else {\n rctestdone13 = 0;\n }\n if (Menu.isOptionChecked(\"Test 14\")) {\n if (rctestdone14 != 1) {\n rctest14_prompt();\n }\n rctestdone14 = 1;\n } else {\n rctestdone14 = 0;\n }\n if (Menu.isOptionChecked(\"Test 15\")) {\n if (rctestdone15 != 1) {\n rctest15_prompt();\n }\n rctestdone15 = 1;\n } else {\n rctestdone15 = 0;\n }\n if (Menu.isOptionChecked(\"Test 16\")) {\n if (rctestdone16 != 1) {\n rctest16_prompt();\n }\n rctestdone16 = 1;\n } else {\n rctestdone16 = 0;\n }\n if (Menu.isOptionChecked(\"Test 17\")) {\n if (rctestdone17 != 1) {\n rctest17_prompt();\n }\n rctestdone17 = 1;\n } else {\n rctestdone17 = 0;\n }\n if (Menu.isOptionChecked(\"Test 18\")) {\n if (rctestdone18 != 1) {\n rctest18_prompt();\n }\n rctestdone18 = 1;\n } else {\n rctestdone18 = 0;\n }\n if (Menu.isOptionChecked(\"Test 19\")) {\n if (rctestdone19 != 1) {\n rctest19_prompt();\n }\n rctestdone19 = 1;\n } else {\n rctestdone19 = 0;\n }\n if (Menu.isOptionChecked(\"Test 20\")) {\n if (rctestdone20 != 1) {\n rctest20_prompt();\n }\n rctestdone20 = 1;\n } else {\n rctestdone20 = 0;\n }\n\n\n\n\n\n\n\n\n\n\n\n if (menuItem == \"Generate Domain Stats Report [CUT + PASTE RESULT]\") {\n null;\n }\n if (Menu.isOptionChecked(\"Generate Domain Stats Report [CUT + PASTE RESULT]\")) {\n generateDomainStatsReport();\n Menu.setIsOptionChecked(\"Generate Domain Stats Report [CUT + PASTE RESULT]\", false);\n }\n if (menuItem == \"HMD RC Test Instructions\") {\n null;\n }\n if (Menu.isOptionChecked(\"HMD RC Test Instructions\")) {\n hmdRCHelp();\n Menu.setIsOptionChecked(\"HMD RC Test Instructions\", false);\n }\n if (menuItem == \"Generate HMD RC Testing Report [CUT + PASTE RESULT]\") {\n null;\n }\n if (Menu.isOptionChecked(\"Generate HMD RC Testing Report [CUT + PASTE RESULT]\")) {\n generateHMDRCManualTestingReport();\n Menu.setIsOptionChecked(\"Generate HMD RC Testing Report [CUT + PASTE RESULT]\", false);\n }\n if (menuItem == \"Help\") {\n null;\n }\n if (Menu.isOptionChecked(\"Help\")) {\n help();\n Menu.setIsOptionChecked(\"Help\", false);\n }\n}", "title": "" }, { "docid": "37aae14ea8c9c08b357d962ce3506aa7", "score": "0.61074716", "text": "function openMenu(e) {\n if (e.target.className == 'openMenu') {\n let leftContent = e.currentTarget.querySelector('.leftContent');\n leftContent.classList.remove('closeLeftContent');\n leftContent.classList.add('openLeftContent');\n }\n if (e.target.className == 'closeMenu') {\n let leftContent = e.currentTarget.querySelector('.leftContent');\n leftContent.classList.remove('openLeftContent');\n leftContent.classList.add('closeLeftContent');\n }\n}", "title": "" }, { "docid": "75edaee44098b7933a8d0795ec8e5ddf", "score": "0.61057895", "text": "function navItemClick() {\n $('.menu-list a').on('click', e => {\n e.preventDefault();\n closeMenu();\n });\n}", "title": "" }, { "docid": "ef08254357132ea8b40a55afffa2156b", "score": "0.6092668", "text": "function closeMenu() {\r\n\t\t\t$openMenu.click();\r\n\t\t}", "title": "" }, { "docid": "bf30a5cc80f30108103df5343bd6a9a0", "score": "0.60750926", "text": "function openMenu(e) {\r\n e.stopPropagation();\r\n buttonMenu.classList.toggle(\"active-menu\");\r\n tlinks.classList.toggle(\"open\");\r\n}", "title": "" }, { "docid": "e65b1446a8c84481c87426d914eb992b", "score": "0.6074643", "text": "function openMenu() {\n\n\t\t$(\"#menu\").css(\"display\",\"block\");\n\n $(\"#content,#header\").velocity({\n\t\t\tleft:\"85%\",\n\t\t\t},300, function() {\n\t\t\t\tisMenuOpen=true;\n\t\t\t});\n\t}", "title": "" }, { "docid": "0bbd3e0016fd50ef988f5eff085e0342", "score": "0.6071286", "text": "staticEvents() {\n //if click is target then create menu else clean other menus in dom\n document.body.addEventListener('click', e => {\n //clean menus\n this.cleanMenu();\n setTimeout(() => {\n if (e.target.classList.contains(this.target)) {\n //build menu id is target\n this.buildMenu(e.target, e)\n }\n }, 50);\n\n });\n }", "title": "" }, { "docid": "e783289d7a7f355dba6709ea53ed66d6", "score": "0.60654354", "text": "function watchMenuButtons() {\n document\n .querySelector(\".open-search-form-button\")\n .addEventListener(\"click\", function() {\n openSearchForm();\n });\n\n document\n .querySelector(\".close-search-form-button\")\n .addEventListener(\"click\", function() {\n closeSearchForm();\n });\n\n document\n .querySelector(\".open-results-panel-button\")\n .addEventListener(\"click\", function() {\n openShelterResults();\n });\n\n document\n .querySelector(\".close-results-panel-button\")\n .addEventListener(\"click\", function() {\n closeShelterResults();\n });\n}", "title": "" }, { "docid": "bb6c9070d78509e934f7a114c60b63a6", "score": "0.60648835", "text": "function menuItemClicked(overlay, parent, icon, title) {\n //if current menu item, don't do anything\n if (icon.hasClass(\"fa-check\")) return;\n\n //make sure all existing menu items are unchecked\n $(\".fa-check\").removeClass(\"fa fa-check\");\n\n //update url in browser bar, without reloading\n if (overlay.type !== 'dir' && overlay.menu_id !== url_params.menu_id) updateDisplayParams(\"seq_num\", remove=true);\n updateDisplayParams({menu_id:overlay.menu_id});\n\n\n //perform appropraite action depending on overlay type\n console.log(overlay.type);\n switch(overlay.type) {\n //sub-menu\n case \"dir\":\n //keep track of parents in case back button is pressed\n parents.push(parent);\n parent_titles.push(title);\n parent_menu_ids.push(overlay.menu_id.substring(0,overlay.menu_id.length-2));\n\n var $menu = $(\"#menu_list\");\n //repopulate menu with childrem of this item\n populateMenu(overlay.children, overlay.name);\n\n $(\"#menuheader\").hide().show(\"slide\", {direction: \"right\"}, 500);\n $(\"#menubody\").hide().show(\"slide\", {direction: \"right\"}, 500);\n\n\n $(\"#back_btn\").unbind('click').click(function() {\n //repopulate menu with parent\n\n url_params.menu_id = parent_menu_ids.pop();\n if (url_params.menu_id === \"\")\n url_params.menu_id = \"00\" //main menu\n // not sure whether to update url in browser bar\n // window.history.pushState({},'Title','?'+ object_to_query_string(url_params));\n populateMenu(parents.pop(), parent_titles.pop());\n $(\"#menuheader\").hide().show(\"slide\", {direction: \"left\"}, 500);\n $(\"#menubody\").hide().show(\"slide\", {direction: \"left\"}, 500);\n });\n break;\n case \"tile_512\":\n displayTile512(overlay, true);\n break;\n case \"tiled\":\n displayTiled(overlay, true);\n break;\n case \"wms_512\":\n displayWMS512(overlay, true);\n break;\n case \"overlay_sequence\":\n displayOverlaySequence(overlay, true);\n break;\n case \"NOAAtile_256\":\n displayNOAA(overlay, true);\n break;\n case \"arcgis_tile_256\":\n displayArcGIS(overlay, true);\n break;\n case \"image\":\n displayImage(overlay, true);\n break;\n case \"xb_map\":\n displayXBMap(overlay, true);\n break;\n case \"multi_layer\":\n displayMultiLayers(overlay);\n break;\n case \"table\":\n displayTable(overlay, true);\n break;\n case \"geojson\":\n displayGeojson(overlay, true);\n break;\n default:\n console.log(\"Unknown Overlay Type: \" + overlay.type);\n }\n //place a check mark next to the selected row\n icon.addClass(\"fa fa-check\");\n\n //show the popup with text and audio\n showPopup(overlay);\n}", "title": "" }, { "docid": "559d83fab7584cc3b36dcbd3e5144a91", "score": "0.60491514", "text": "_init() {\n this.$element.find('[data-submenu]').not('.is-active').slideUp(0);//.find('a').css('padding-left', '1rem');\n this.$element.attr({\n 'role': 'menu',\n 'aria-multiselectable': this.options.multiOpen\n });\n\n this.$menuLinks = this.$element.find('.is-accordion-submenu-parent');\n this.$menuLinks.each(function(){\n var linkId = this.id || Foundation.GetYoDigits(6, 'acc-menu-link'),\n $elem = $(this),\n $sub = $elem.children('[data-submenu]'),\n subId = $sub[0].id || Foundation.GetYoDigits(6, 'acc-menu'),\n isActive = $sub.hasClass('is-active');\n $elem.attr({\n 'aria-controls': subId,\n 'aria-expanded': isActive,\n 'role': 'menuitem',\n 'id': linkId\n });\n $sub.attr({\n 'aria-labelledby': linkId,\n 'aria-hidden': !isActive,\n 'role': 'menu',\n 'id': subId\n });\n });\n var initPanes = this.$element.find('.is-active');\n if(initPanes.length){\n var _this = this;\n initPanes.each(function(){\n _this.down($(this));\n });\n }\n this._events();\n }", "title": "" }, { "docid": "59c9b268d5c51896b0731b0f11d52126", "score": "0.6046163", "text": "function mobMenu(){\n\t\t$('#mob-menu-contacts').click(function(e){\n\t\t\t$('.open-menu__left').hide();\n\t\t\t$('.open-menu__right').show();\n\t\t})\n\t\t$('#mob-menu-contacts--back').click(function(e){\n\t\t\t$('.open-menu__left').show();\n\t\t\t$('.open-menu__right').hide();\n\t\t})\n\t}", "title": "" }, { "docid": "b33986fcc4b0ba5b1c99efcdcd0da4cb", "score": "0.60451066", "text": "function menu(e) {\n if (e.which == 3) {\n\t\t\tvar item = e.target;\n var opertionn = {\n name: \"menu\",\n offsetX: 2,\n offsetY: 2,\n textLimit: 10,\n beforeShow: $.noop,\n afterShow: $.noop\n };\n\n var imageMenuData = [\n [{\n text: \"添加\",\n func: function () {\n\t\t\t\t\t\tcurrentId = 0;\n\t\t\t\t\t\tblob = undefined;\n\t\t\t\t\t\t$('.addItemTitle').html(\"添加\");\n showEditor('','','');\n }\n }, {\n text: \"编辑\",\n func: function () {\n\t\t\t\t\t\t$('.addItemTitle').html(\"编辑\");\n currentId = parseInt(item.id.substr(4));\n\t\t\t\t\t\tconsole.log(\"current edit item id = \" + currentId);\n\t\t\t\t\t\tgetById(currentId, function(result){\n\t\t\t\t\t\t\tconsole.log(result);\n\t\t\t\t\t\t\tblob = result.blob;\n\t\t\t\t\t\t\tshowEditor(result.title, result.url, result.icon);\n\t\t\t\t\t\t});\n }\n }, {\n text: \"删除\",\n func: function () {\n\t\t\t\t\t\tvar delId = parseInt(item.id.substr(4));\n\t\t\t\t\t\t//删除的是当前编辑项时关闭编辑区并清空内容\n\t\t\t\t\t\tif (currentId == delId){\n\t\t\t\t\t\t\tclearEditor();\n\t\t\t\t\t\t\thideEditor();\n\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t\tconsole.log(\"delete item id = \" + delId);\n\t\t\t\t\t\tdeleteById(delId);\n }\n }, {\n text: \"设置\",\n func: function () {\n\t\t\t\t\t\t$('.settingsCon').attr('style','display:block');\n }\n }, {\n text: \"关闭\",\n func: function () {}\n }]\n ];\n\t\t\t\n\t\t\tif (item.id == '' || item.id.length < 5 || (item.id.substring(0, 4) != \"item\" && item.id.substring(0, 4) != \"imgs\")){\n\t\t\t\timageMenuData[0].splice(1,2);\n\t\t\t}\n\t\t\t//使用随机数确保每次右键弹出的菜单都不一样,否则取到的id会是同一个\n\t\t\topertionn.name = \"menu\" + (Math.random() * 100000 + '').replace('.','');\n\t\t\tconsole.log(opertionn.name);\n\t\t\t\n $(this).smartMenu(imageMenuData, opertionn);\n }\n }", "title": "" }, { "docid": "4e02afbb177964f8857951bfbe491fe3", "score": "0.60319936", "text": "registerEventListeners_() {\n this.submenuOpenElements_.forEach(element => {\n element.addEventListener('click', this.submenuOpenHandler_);\n });\n this.submenuCloseElements_.forEach(element => {\n element.addEventListener('click', this.submenuCloseHandler_);\n });\n\n this.documentElement_.addEventListener('keydown', this.keydownHandler_);\n }", "title": "" }, { "docid": "c0aa76003dd7b3bc1db0921b00d9ee4d", "score": "0.6028037", "text": "function initMobileMenu() {\n var mobileBar = document.getElementById('mobile-bar')\n var sidebar = document.querySelector('.sidebar')\n var menuButton = mobileBar.querySelector('.menu-button')\n\n menuButton.addEventListener('click', function () {\n sidebar.classList.toggle('open')\n })\n\n document.body.addEventListener('click', function (e) {\n if (e.target !== menuButton && !sidebar.contains(e.target)) {\n sidebar.classList.remove('open')\n }\n })\n }", "title": "" }, { "docid": "6d68887c4631baa6a393b2f052cbb5c4", "score": "0.60240877", "text": "function menu_functionality() {\n\n //when clicking on a \"menu_button\", it will change the \"+/-\" accordingly and it will show/hide the corresponding submenu\n $(\".menu_button\").click(function(){\n\n // add or remove the class \"open\" , this class holds the \"-\"\n $(this).children().toggleClass(\"open\");\n // show or hide the submenu\n $(this).next('.submenu_wrapper').fadeToggle(400);\n });\n\n // when the screen size is smaller than 800px, the display_menu_control button appears and will show/hide the whole menu\n $(\"#display_menu_control\").click(function(){\n $('#menu_content').fadeToggle(400);\n });\n\n // call the current page highlight function\n highlight_current_page();\n }", "title": "" }, { "docid": "53ac99d192e3dd7c7e9ae1098a80ecfc", "score": "0.6013192", "text": "function binUIEvents() {\n const destaquesAnchor = document.getElementById('destaques-link');\n const brasilAnchor = document.getElementById('brasil-link');\n const brasilMoreLink = document.getElementById('brasil-more-link');\n const mundoAnchor = document.getElementById('mundo-link');\n const mundoMoreLink = document.getElementById('mundo-more-link');\n const menuCheckbox = document.getElementById('navigation-check');\n\n destaquesAnchor.addEventListener('click', function () {\n menuCheckbox.checked = !menuCheckbox.checked;\n });\n\n brasilAnchor.addEventListener('click', function () {\n menuCheckbox.checked = !menuCheckbox.checked;\n });\n\n brasilMoreLink.addEventListener('click', function () {\n showMoreBrasilContent();\n });\n\n mundoAnchor.addEventListener('click', function () {\n menuCheckbox.checked = !menuCheckbox.checked;\n });\n\n mundoMoreLink.addEventListener('click', function () {\n showMoreMundoContent();\n });\n }", "title": "" }, { "docid": "be2fc5f85dddcb0494cd7df60ff17b0a", "score": "0.6012936", "text": "function onOpen() {\n const ui = SpreadsheetApp.getUi(); // Or DocumentApp or SlidesApp or FormApp.\n\n const menuData = {\n topName: \"FAST2\",\n items: [\n {\n name: \"Aktivera funktioner\",\n func: \"use\",\n },\n ],\n };\n\n const menu = new Menu(ui);\n menu.addMenu(menuData);\n}", "title": "" }, { "docid": "a8d333bee82884d62ad4021a81bb81a0", "score": "0.60097975", "text": "_handleEventsOfSubMenu()\n {\n if (!this.haveSubMenu()) return;\n\n this.getSubMenu().menu.forEach(menuItemInSubMenu => {\n menuItemInSubMenu.getToggler().addEventListener('keydown', e => {\n const positionInMenu = this.getCurrentFocusInSubMenu();\n const subMenuLength = this.getSubMenu().getMenuLength();\n const isDropdownOpen = menuItemInSubMenu.haveSubMenu() ? menuItemInSubMenu.subMenuIsOpened() : false;\n\n switch (e.keyCode) {\n\n // Arrow Up move item to top\n case A11yMenu.getKeyCode('ArrowUp'):\n e.preventDefault();\n if (positionInMenu === 0) {\n this.focusLastElementInSubMenu();\n } else {\n this.focusInSubMenu(positionInMenu - 1);\n }\n\n if (isDropdownOpen) menuItemInSubMenu.closeSubMenu();\n\n break;\n\n // Arrow down move item to bottom\n case A11yMenu.getKeyCode('ArrowDown'):\n e.preventDefault();\n if (positionInMenu === subMenuLength - 1) {\n this.focusFirstElementInSubMenu();\n } else {\n this.focusInSubMenu(positionInMenu + 1);\n }\n\n if (isDropdownOpen) menuItemInSubMenu.closeSubMenu();\n\n break;\n\n // Home key\n case A11yMenu.getKeyCode('Home'):\n e.preventDefault();\n this.focusFirstElementInSubMenu();\n if (isDropdownOpen) menuItemInSubMenu.closeSubMenu();\n break;\n\n // End key\n case A11yMenu.getKeyCode('End'):\n e.preventDefault();\n this.focusLastElementInSubMenu();\n if (isDropdownOpen) menuItemInSubMenu.closeSubMenu();\n break;\n\n // Open menu (Space/Enter)\n case A11yMenu.getKeyCode('Space'):\n case A11yMenu.getKeyCode('Enter'):\n if (!menuItemInSubMenu.haveSubMenu()) return;\n\n if (!isDropdownOpen) {\n e.preventDefault();\n menuItemInSubMenu.openSubMenu();\n }\n break;\n\n // Arrow left\n case A11yMenu.getKeyCode('ArrowLeft'):\n if (menuItemInSubMenu.topLevel) return;\n e.preventDefault();\n\n this.closeSubMenu();\n this.getToggler().focus();\n\n break;\n\n // Arrow right\n case A11yMenu.getKeyCode('ArrowRight'):\n if (!menuItemInSubMenu.haveSubMenu() && menuItemInSubMenu.topLevel) return;\n e.preventDefault();\n\n if (menuItemInSubMenu.haveSubMenu()) {\n if (!isDropdownOpen) menuItemInSubMenu.openSubMenu();\n menuItemInSubMenu.focusFirstElementInSubMenu();\n } else {\n this.closeSubMenu();\n this.getToggler().focus();\n }\n\n break;\n\n // Escape\n case A11yMenu.getKeyCode('Escape'):\n e.preventDefault();\n this.closeSubMenu();\n this.getToggler().focus();\n\n break;\n\n }\n\n });\n });\n }", "title": "" }, { "docid": "769464afe6d2d00e05674b1aaf84b9ff", "score": "0.59931046", "text": "function onOpen() {\r\n const ui = SpreadsheetApp.getUi();\r\n ui.createMenu(\"Portfolio Menu\")\r\n .addSubMenu(ui.createMenu(\"Setup\").addItem(\"Reset Setup\", \"resetSetup\"))\r\n .addSubMenu(\r\n ui\r\n .createMenu(\"Stock Summary\")\r\n .addItem(\"Sort by Category\", \"sortStockSummaryByCategory\")\r\n .addItem(\"Sort by Sector\", \"sortStockSummaryBySector\")\r\n .addItem(\"Sort by Stock Name\", \"sortStockSummaryByStockName\")\r\n )\r\n .addSubMenu(\r\n ui\r\n .createMenu(\"Transactions\")\r\n .addItem(\"Add New Transaction\", \"addNewTransactionRow\")\r\n .addItem(\"Add New Buy Transaction\", \"addNewBuyTransactionRow\")\r\n )\r\n .addToUi();\r\n}", "title": "" }, { "docid": "699060ac65aed5bb92c9d1e713f9b38d", "score": "0.5989221", "text": "function init(){\n menus = {};\n active = new Ext.util.MixedCollection();\n Ext.getDoc().addKeyListener(27, function(){\n if(active.length > 0){\n hideAll();\n }\n });\n }", "title": "" }, { "docid": "58a82da51f7c99739ccbc78931508747", "score": "0.5988775", "text": "function handlerMenu(e){\n\t\n\tmanagment_View.handlerMenu();\n}", "title": "" }, { "docid": "6df9614dfab6a5c01edba7b0af62f128", "score": "0.59886175", "text": "function init() {\n document.getElementById(\"mobile-navigation-button\").addEventListener(\"click\", toggleMenu);\n}", "title": "" }, { "docid": "02f83b1e617617bf99863f3b583c67ae", "score": "0.5985701", "text": "function _getMenuItems() {\n \n //TODO: GET DATA FROM API\n api.getMenuItems().then((items) => {\n\n menuItems.push(...items);\n\n // PUSH STATIC MODULES TOO\n menuItems.push({\n slug: \"war-heroes/\",\n title: \"War Heroes\"\n });\n menuItems.push({\n slug: \"media/\",\n title: \"WWI Media\"\n });\n\n _render();\n });\n \n }", "title": "" }, { "docid": "a75979a3314986471ea6e329a2677e7e", "score": "0.597669", "text": "function registerEvents(menu) {\n // Initial method for menu updating\n function updateMenu (new_routes) {\n new_routes.sort(function(a, b) {\n return parseInt(a.id) - parseInt(b.id);\n });\n menu.update(function () { return getRoutesTableHtml(new_routes, hovered); });\n }\n\n // Domain settings\n ['auto_rerouting', 'auto_dr_switching'].forEach(function(type) {\n if (!menu.querySelector('.' + type)) return;\n\n menu.querySelector('.' + type).onclick = function () {\n menu.confirm(ok_cb, cancel_cb);\n checkbox = this;\n\n function ok_cb () {\n var res = checkbox.checked;\n var settings = {};\n settings[type] = res;\n Server.ajax(\"POST\", '/bridge_domains/' + hovered.name + '/', settings, function (resp) {\n createHint(\"Settings were changed!\");\n hovered[type] = res;\n });\n }\n\n function cancel_cb () {\n checkbox.checked = !checkbox.checked;\n }\n }\n });\n\n // Path show/hide\n var routesElemCollection = menu.querySelectorAll('.route');\n Array.prototype.forEach.call(routesElemCollection, function(routeElem) {\n var routeId = routeElem.getAttribute('data-id');\n var pathId = routeElem.getAttribute('data-sub-id');\n\n var route = Routes.getDomainRouteById(hovered.name, routeId);\n\n var cells = routeElem.querySelectorAll('.path-active-cell');\n Array.prototype.forEach.call(cells, function(cell) {\n cell.onclick = function() {\n togglePath(route, cell, pathId);\n Net.need_draw = true;\n };\n\n cell.addEventListener('contextmenu', function(event) {\n var path = route.paths[pathId];\n path.color = Routes.getRandomColor();\n cell.style.background = path.color;\n Net.need_draw = true;\n Routes.saveColors(route);\n event.preventDefault();\n });\n });\n\n // Modify path parameters\n var changable = routeElem.querySelectorAll('.changable');\n Array.prototype.forEach.call(changable, function(changable) {\n changable.onclick = function () {\n var re = /(\\D)/;\n var value = changable.innerHTML;\n var old_value = value;\n value = value.substring(0, value.search(re));\n changable.innerHTML = '<input type=\"text\" class=\"change_path_options\" value=\"'+value+'\" old_value=\"'+old_value+'\">';\n changable.onclick = {};\n\n var new_last_child_html = '<i class=\"apply\"></i><i class=\"delete\"></i>';\n var old_last_child_html = '';\n if (changable.parentElement.lastChild.innerHTML != new_last_child_html) {\n old_last_child_html = changable.parentElement.lastChild.innerHTML;\n changable.parentElement.lastChild.innerHTML = new_last_child_html;\n\n changable.parentElement.querySelector('.apply').onclick = function () {\n var tr = this.parentElement.parentElement;\n var params = {};\n for (var child = tr.firstChild; child != null; child = child.nextSibling) {\n if (child.querySelector('input.change_path_options')) {\n params[child.id] = child.querySelector('input').value;\n }\n }\n\n var path = '/routes/id/' + routeId + '/modify-path/' + pathId + '/';\n Server.ajax(\"POST\", path, params,\n function (resp) {\n for (var child = tr.firstChild; child != null; child = child.nextSibling) {\n if (child.querySelector('input.change_path_options')) {\n child.innerHTML = child.querySelector('input').value + child.getAttribute('postfix');\n }\n }\n\n changable.parentElement.lastChild.innerHTML = old_last_child_html;\n registerEvents(menu);\n createHint(resp['act']);\n },\n function (err) {\n createHint(err.error.msg, {fail: true});\n for (var child = tr.firstChild; child != null; child = child.nextSibling) {\n if (child.querySelector('input.change_path_options')) {\n child.innerHTML = child.firstChild.getAttribute('old_value');\n }\n }\n\n changable.parentElement.lastChild.innerHTML = old_last_child_html;\n registerEvents(menu);\n });\n }\n\n changable.parentElement.querySelector('.delete').onclick = function () {\n var tr = this.parentElement.parentElement;\n for (var child = tr.firstChild; child != null; child = child.nextSibling) {\n if (child.querySelector('input.change_path_options')) {\n child.innerHTML = child.firstChild.getAttribute('old_value');\n }\n }\n\n changable.parentElement.lastChild.innerHTML = old_last_child_html;\n registerEvents(menu);\n }\n }\n }\n });\n });\n\n // Hide paths\n menu.querySelector('.hide_routes').onclick = function() {\n Routes.hide();\n var activeCellElemCollection = menu.querySelectorAll('.path-active-cell.active');\n Array.prototype.forEach.call(activeCellElemCollection, function(activeCellElem) {\n activeCellElem.classList.remove('active');\n activeCellElem.style.background = '#999999';\n });\n Net.need_draw = true;\n }\n\n // Remove path\n var remPath = menu.querySelectorAll('.remove_path');\n Array.prototype.forEach.call(remPath, function(tag) {\n var routeId = tag.parentElement.getAttribute('data-id');\n var pathId = tag.parentElement.getAttribute('data-sub-id');\n\n function ok_cb () {\n var path = '/routes/id/' + routeId + '/delete-path/' + pathId + '/';\n Server.ajax(\"DELETE\", path, function () {\n UI.createHint(\"Path \" + pathId + \" removed for route \" + routeId);\n Routes.savedColors[routeId].splice(pathId, 1);\n Routes.updateAllDomainRoutes(hovered.name, updateMenu);\n }, function (response) {\n UI.createHint(response.error.msg, {fail: true});\n });\n }\n tag.onclick = function () { menu.confirm(ok_cb); }\n });\n\n // Remove dynamic\n var remDyn = menu.querySelectorAll('.del_dynamic');\n Array.prototype.forEach.call(remDyn, function(tag) {\n var routeId = tag.parentElement.getAttribute('data-id');\n\n function ok_cb () {\n var path = '/routes/id/' + routeId + '/delete-dynamic/';\n Server.ajax(\"DELETE\", path, function () {\n UI.createHint(\"Dynamic removed for route \" + routeId);\n Routes.updateAllDomainRoutes(hovered.name, updateMenu);\n });\n }\n tag.onclick = function () { menu.confirm(ok_cb); }\n });\n\n\n // Up path\n var upPath = menu.querySelectorAll('.up_path');\n Array.prototype.forEach.call(upPath, function(tag) {\n var routeId = tag.parentElement.getAttribute('data-id');\n var pathId = parseInt(tag.parentElement.getAttribute('data-sub-id'));\n\n function ok_cb () {\n var path = '/routes/id/' + routeId + '/move-path/' + pathId + '/';\n Server.ajax(\"POST\", path, {\"new_pos\": pathId-1}, function () {\n UI.createHint(\"Path \" + pathId + \" moved up for route \" + routeId);\n var colors = Routes.savedColors[routeId];\n var tmp = colors[pathId];\n colors[pathId] = colors[pathId-1];\n colors[pathId-1] = tmp;\n Routes.updateAllDomainRoutes(hovered.name, updateMenu);\n });\n }\n tag.onclick = function () { menu.confirm(ok_cb); }\n });\n\n // Down path\n var downPath = menu.querySelectorAll('.down_path');\n Array.prototype.forEach.call(downPath, function(tag) {\n var routeId = tag.parentElement.getAttribute('data-id');\n var pathId = parseInt(tag.parentElement.getAttribute('data-sub-id'));\n\n function ok_cb () {\n var path = '/routes/id/' + routeId + '/move-path/' + pathId + '/';\n Server.ajax(\"POST\", path, {\"new_pos\": pathId+1}, function () {\n UI.createHint(\"Path \" + pathId + \" moved down for route \" + routeId);\n var colors = Routes.savedColors[routeId];\n var tmp = colors[pathId];\n colors[pathId] = colors[pathId+1];\n colors[pathId+1] = tmp;\n Routes.updateAllDomainRoutes(hovered.name, updateMenu);\n });\n }\n tag.onclick = function () { menu.confirm(ok_cb); }\n });\n\n routes.forEach(function(route) {\n route = Routes.getDomainRouteById(hovered.name, route.id); // hack. 'route' in 'routes' may by old\n\n // Change used path\n var usedElemCollection = menu.querySelectorAll('.use_path_'+route.id);\n Array.prototype.forEach.call(usedElemCollection, function(usedElem) {\n var routeId = usedElem.getAttribute('data-id');\n var pathId = usedElem.getAttribute('data-sub-id');\n\n function ok_cb () {\n Server.ajax(\"POST\", \"/bridge_domains/\"+hovered.name+\"/swap_path/\",\n {\"route\": routeId, \"path\": pathId},\n function(resp) {\n if (resp[\"res\"] == \"ok\") {\n createHint(\"Switching to selected path<br>Domain: \" + hovered.name);\n\n // make this the first path\n var path = '/routes/id/' + routeId + '/move-path/' + pathId + '/';\n Server.ajax(\"POST\", path, {\"new_pos\": 0}, function () {\n var colors = Routes.savedColors[routeId];\n var tmp = colors[pathId];\n colors[pathId] = colors[0];\n colors[0] = tmp;\n Routes.updateAllDomainRoutes(hovered.name, updateMenu);\n });\n } else {\n createHint(\"Cannot switch path in domain \" + hovered.name, {fail: true});\n }\n });\n }\n\n var prev_path_id;\n function cancel_cb () {\n // FIXME: can be bug, if there are more than one route!\n menu.querySelectorAll('.use_path_'+route.id)[prev_path_id].checked = true;\n }\n\n usedElem.onmouseup = function () { prev_path_id = document.querySelector('input[class=\"use_path_'+route.id+'\"]:checked').getAttribute('data-sub-id'); }\n usedElem.onchange = function () { menu.confirm(ok_cb, cancel_cb); }\n });\n\n // Add path\n menu.querySelector('.add_path_'+route.id).onclick = function() {\n var path_menu = createMenu(getNewPathHtml(route.paths[route.paths.length-1]),\n {title: \"Creating new path\",\n pos: \"center\",\n width: \"250px\",\n unique: true,\n cl_callback: Routes.pathSelector.clear});\n // because Manual path\n path_menu.element('clude').disabled = true;\n Routes.pathSelector.setMode(\"exact\", route.sourceId, route.targetId);\n\n // Add path action\n path_menu.element('add_path').onclick = function () {\n var path = {\n metrics : path_menu.element('metrics').value,\n flapping : path_menu.element('flapping').value || \"0\",\n broken_flag : \"true\", // always react on broken links\n drop_threshold : path_menu.element('drop').value || \"0\",\n util_threshold : path_menu.element('util').value || \"0\"\n };\n\n var type = path_menu.element('type').value,\n mode = Routes.pathSelector.getMode();\n if (mode) {\n if (mode == \"exact\") {\n path.exact = Routes.pathSelector.getExact();\n if (!Routes.pathSelector.checkExact()) {\n UI.createHint(\"Please select the manual path!\", {fail: true});\n return;\n }\n }\n else {\n var include = Routes.pathSelector.getInclude();\n var exclude = Routes.pathSelector.getExclude();\n if (include.length > 0) path.include = include;\n if (exclude.length > 0) path.exclude = exclude;\n }\n }\n\n if (type == \"static\") {\n if (path.exact) {\n if ((path.exact[0] != route.sourceId || path.exact[path.exact.length-1] != route.targetId) &&\n (path.exact[0] != route.targetId || path.exact[path.exact.length-1] != route.sourceId))\n return;\n }\n Server.ajax(\"POST\", '/routes/id/' + route.id + '/add-path/', path,\n function (resp) {\n if (resp[\"act\"] == \"path created\") {\n UI.createHint(\"Path \" + resp[\"path_id\"] + \" created for route \" + resp[\"route_id\"]);\n Routes.updateAllDomainRoutes(hovered.name, updateMenu);\n }\n else UI.createHint(resp[\"error\"], {fail: true});\n },\n function (err_resp) {\n UI.createHint(err_resp.error.msg, {fail: true});\n });\n } else if (type == \"dynamic\") {\n Server.ajax(\"POST\", '/routes/id/' + route.id + '/add-dynamic/', path, function (resp) {\n UI.createHint(\"Dynamic created for route \" + route.id);\n Routes.updateAllDomainRoutes(hovered.name, updateMenu);\n });\n }\n path_menu.remove();\n Routes.pathSelector.clear();\n };\n\n // Close sub menu\n path_menu.element('cancel_path').onclick = function () {\n path_menu.remove();\n Routes.pathSelector.clear();\n }\n\n // Select include-exclude\n path_menu.element('clude').onchange = function() {\n Routes.pathSelector.setMode(this.value, route.sourceId, route.targetId);\n };\n\n // Select type of path\n path_menu.element('type').onchange = function () {\n var type = path_menu.element('type').value;\n if (type == 'dynamic') {\n if (path_menu.element('metrics').value == 'Manual') {\n path_menu.element('metrics').value = 'Hop';\n Routes.pathSelector.clear();\n }\n path_menu.element('metrics').options[0].disabled = true; // TODO: very bad '0'!!\n path_menu.element('clude').disabled = false;\n } else if (type == 'static') {\n path_menu.element('metrics').options[0].disabled = false; // TODO: very bad '0'!!\n }\n }\n\n // Manual path or not\n path_menu.element('metrics').onchange = function () {\n var metrics = path_menu.element('metrics').value;\n if (metrics == \"Manual\") {\n path_menu.element('clude').disabled = true;\n Routes.pathSelector.setMode(\"exact\", route.sourceId, route.targetId);\n } else {\n var clude = path_menu.element('clude');\n clude.disabled = false;\n Routes.pathSelector.setMode(clude.value, route.sourceId, route.targetId);\n }\n };\n }\n\n // Predict path\n var predict = menu.querySelector('.predict_path_'+route.id);\n if (predict) {\n predict.onclick = function () {\n route.predictPath(2000);\n }\n }\n\n }); // END routes.forEach\n\n // Change used switch (for domains with backup)\n var usedElemCollection = menu.querySelectorAll('.use_switch');\n Array.prototype.forEach.call(usedElemCollection, function(usedElem) {\n var mainId = usedElem.getAttribute('main-id');\n var thisId = usedElem.getAttribute('this-id');\n\n function ok_cb () {\n Server.ajax(\"POST\", \"/bridge_domains/\"+hovered.name+\"/swap_switch/\",\n {\"dpid\": mainId, \"deny\": mainId != thisId},\n function(resp) {\n if (resp[\"res\"] == \"ok\") {\n createHint(\"Changed upstream to \" + thisId + \" switch<br>Domain: \" + hovered.name);\n } else {\n createHint(\"Cannot change upstream in domain \" + hovered.name, {fail: true});\n }\n\n Routes.updateAllDomainRoutes(hovered.name, updateMenu);\n });\n }\n\n var prev_switch;\n function cancel_cb () {\n menu.querySelectorAll('.use_switch')[prev_switch].checked = true;\n }\n\n usedElem.onmouseup = function () { prev_switch = document.querySelector('input[class=\"use_switch\"]:checked')\n .getAttribute('num'); }\n usedElem.onchange = function () { menu.confirm(ok_cb, cancel_cb); }\n });\n }", "title": "" } ]
4c80fa234f27797c5e5a609e4080336b
Encodes given object into urlfriendly format
[ { "docid": "96107068b3b117dc487fbe24914e388f", "score": "0.7066093", "text": "function urlEncode(object) {\n\t return Object.keys(object)\n\t .map(\n\t // tslint:disable-next-line:no-unsafe-any\n\t function (key) { return encodeURIComponent(key) + \"=\" + encodeURIComponent(object[key]); })\n\t .join('&');\n\t}", "title": "" } ]
[ { "docid": "ff00a1618606650ee2564255a045735c", "score": "0.7079577", "text": "urlEscapeObject(object) {\n object = object || {};\n\n //Get our objects keys\n let keys = Object.keys(object);\n\n //Create an array containing a list of encoded strings\n let bufferArray = [];\n\n keys.forEach(key => {\n let value = object[key];\n\n //If undefined just ignore.\n if(typeof value === typeof undefined) return;\n if(value == null) return;\n\n //Change the format depending on the type\n if(Array.isArray(value)) {\n if(!value.length) return;\n value = value.filter(b => b).map(b => encodeURIComponent(b)).join(',');//Comma seperate Arrays\n\n } else if(typeof value === \"object\") {\n var subBuffer = this.urlEscapeObject(value);//Objects become wrapped subobjects\n if(!subBuffer.length) return;\n value = `(${subBuffer})`;//Wrapping occurs\n\n } else {\n value = `${value}`;//Convert to string...\n if(!value.length) return;//Empty string.\n }\n\n //Append to array!\n bufferArray.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`);\n });\n\n //Join with ampersands (They'll be escaped if sub objecting)\n return bufferArray.join('&');\n }", "title": "" }, { "docid": "64573270ca5edfefa03375109fba24bb", "score": "0.68786263", "text": "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}", "title": "" }, { "docid": "ec236487cc76383cf4098df80825b793", "score": "0.6824724", "text": "function myURLStringify(theObj) {\n var theString = []; //start with an array to fill\n //convert every property of theObj into a URL-friendly string, add to array\n for (var property in theObj) {\n var str = encodeURIComponent(property) + '=' +\n encodeURIComponent(theObj[property]);\n theString.push(str);\n }\n //combine all the properties from the array into one big string\n return theString.join('&');\n}", "title": "" }, { "docid": "ec236487cc76383cf4098df80825b793", "score": "0.6824724", "text": "function myURLStringify(theObj) {\n var theString = []; //start with an array to fill\n //convert every property of theObj into a URL-friendly string, add to array\n for (var property in theObj) {\n var str = encodeURIComponent(property) + '=' +\n encodeURIComponent(theObj[property]);\n theString.push(str);\n }\n //combine all the properties from the array into one big string\n return theString.join('&');\n}", "title": "" }, { "docid": "a9f08b7e83e28e7fed921f1350ba1b8c", "score": "0.68202174", "text": "function encode (obj) {\n let str = ''\n let token = '?'\n for (const key in obj) {\n str += token + key + '=' + obj[key]\n token = '&'\n }\n return str\n}", "title": "" }, { "docid": "a8f153a29b8d5dd20b2841be85c24f8d", "score": "0.68177116", "text": "function urlEncode(object) {\n return Object.keys(object)\n .map(function (key) { return encodeURIComponent(key) + \"=\" + encodeURIComponent(object[key]); })\n .join('&');\n}", "title": "" }, { "docid": "a8f153a29b8d5dd20b2841be85c24f8d", "score": "0.68177116", "text": "function urlEncode(object) {\n return Object.keys(object)\n .map(function (key) { return encodeURIComponent(key) + \"=\" + encodeURIComponent(object[key]); })\n .join('&');\n}", "title": "" }, { "docid": "e03789f42d03151310f6a4b3d534babc", "score": "0.6718713", "text": "_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 }", "title": "" }, { "docid": "958f0da20dff4ea44ba24e2c8c5881f8", "score": "0.6641581", "text": "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}", "title": "" }, { "docid": "c80f859fc8f720b78a7ccd32f693be1a", "score": "0.66294366", "text": "encodeObject(object) {\n return btoa(JSON.stringify(object));\n }", "title": "" }, { "docid": "e591d04ff08569d2b19b50924a1f0beb", "score": "0.65888584", "text": "function encode(obj) {\n let query = [],\n arrValues,\n reg;\n forOwn(obj, function (val, key) {\n if (isArray(val)) {\n arrValues = key + \"=\";\n reg = new RegExp(\"&\" + key + \"+=$\");\n forEach(val, function (aValue) {\n arrValues += encodeURIComponent(aValue) + \"&\" + key + \"=\";\n });\n query.push(arrValues.replace(reg, \"\"));\n } else {\n query.push(key + \"=\" + encodeURIComponent(val));\n }\n });\n return query.length ? \"?\" + query.join(\"&\") : \"\";\n }", "title": "" }, { "docid": "c87325d3f2cf2f15ba3c9730331db59f", "score": "0.6558542", "text": "_encodeObject(object) {\n return object.termType === 'Literal' ? this._encodeLiteral(object) : this._encodeIriOrBlank(object);\n }", "title": "" }, { "docid": "8541406bee57bb6e2b07b72372355746", "score": "0.65450233", "text": "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 }", "title": "" }, { "docid": "7d3b9d84f620b10496a9493ead7fc7b8", "score": "0.65149593", "text": "encodeAsString(obj) {\n // first is type\n let str = \"\" + obj.type;\n // attachments if we have them\n if (obj.type === PacketType.BINARY_EVENT ||\n obj.type === PacketType.BINARY_ACK) {\n str += obj.attachments + \"-\";\n }\n // if we have a namespace other than `/`\n // we append it followed by a comma `,`\n if (obj.nsp && \"/\" !== obj.nsp) {\n str += obj.nsp + \",\";\n }\n // immediately followed by the id\n if (null != obj.id) {\n str += obj.id;\n }\n // json data\n if (null != obj.data) {\n str += JSON.stringify(obj.data);\n }\n debug(\"encoded %j as %s\", obj, str);\n return str;\n }", "title": "" }, { "docid": "32018c00a83b03ab6f08d51b27f694cf", "score": "0.65005153", "text": "function serialise(obj){\n return Object.keys(obj).map(k => `${encodeURIComponent(k)}=${encodeURIComponent(obj[k])}`).join('&');\n}", "title": "" }, { "docid": "8a1c2917b68daa7a3b86bddaa63e137e", "score": "0.6495429", "text": "encodeAsString(obj) {\n // first is type\n let str = \"\" + obj.type;\n // attachments if we have them\n if (obj.type === PacketType.BINARY_EVENT ||\n obj.type === PacketType.BINARY_ACK) {\n str += obj.attachments + \"-\";\n }\n // if we have a namespace other than `/`\n // we append it followed by a comma `,`\n if (obj.nsp && \"/\" !== obj.nsp) {\n str += obj.nsp + \",\";\n }\n // immediately followed by the id\n if (null != obj.id) {\n str += obj.id;\n }\n // json data\n if (null != obj.data) {\n str += JSON.stringify(obj.data);\n }\n debug(\"encoded %j as %s\", obj, str);\n return str;\n }", "title": "" }, { "docid": "8db24d038f2e98938cc8c04b4de1ec21", "score": "0.64775866", "text": "function encode(obj){\n let query = [],\n arrValues, reg;\n forOwn(obj, function (val, key) {\n if (isArray(val)) {\n let result;\n \n arrValues = key + '=';\n reg = new RegExp('&'+key+'+=$');\n \n forEach(val, function (aValue) {\n result = encodeURIComponent(aValue)\n arrValues += result + '&' + key + '=';\n });\n query.push(arrValues.replace(reg, ''));\n } else {\n query.push(key + '=' + encodeURIComponent(val));\n }\n });\n return (query.length) ? '?' + query.join('&') : '';\n}", "title": "" }, { "docid": "cc63cc258920be4afb4605adfaaadc2c", "score": "0.64494395", "text": "serialize(obj) {\n const str = '?' + Object.keys(obj).reduce(function (a, k) {\n a.push(k + '=' + encodeURIComponent(obj[k]));\n return a;\n }, []).join('&');\n return str;\n }", "title": "" }, { "docid": "fdeb44bb7263b6d38b100878ef6ad876", "score": "0.64424306", "text": "function encode(object) {\n return $.param(object);\n }", "title": "" }, { "docid": "6d46eebc50244835dc06539aa00ab4ec", "score": "0.6441373", "text": "encodeAsString(obj) {\n // first is type\n let str = \"\" + obj.type;\n // attachments if we have them\n if (obj.type === PacketType.BINARY_EVENT ||\n obj.type === PacketType.BINARY_ACK) {\n str += obj.attachments + \"-\";\n }\n // if we have a namespace other than `/`\n // we append it followed by a comma `,`\n if (obj.nsp && \"/\" !== obj.nsp) {\n str += obj.nsp + \",\";\n }\n // immediately followed by the id\n if (null != obj.id) {\n str += obj.id;\n }\n // json data\n if (null != obj.data) {\n str += JSON.stringify(obj.data, this.replacer);\n }\n return str;\n }", "title": "" }, { "docid": "bc81b1f208d55f47cdd0ba85bec6a2b1", "score": "0.6438107", "text": "function urlencode(obj) {\n var pairs = [];\n for (var key in obj) {\n if ({}.hasOwnProperty.call(obj, key))\n pairs.push(encodeURIComponent(key) + '=' + encodeURIComponent(obj[key]));\n }\n return pairs.join('&');\n}", "title": "" }, { "docid": "24a8ffc2b9c5b8bdf78cb9f91327a97c", "score": "0.64108264", "text": "function urlStringify(obj){\n\tvar str = []\n\tfor(var prop in obj){\n\t\tvar s = encodeURIComponent(prop) + '=' + encodeURIComponent(obj[prop]);\n\t\tstr.push(s);\n\t}\n\treturn str.join('&');\n}", "title": "" }, { "docid": "9c1e622d9f8029701471e00785181202", "score": "0.639991", "text": "encodeAsString(obj) {\n // first is type\n let str = \"\" + obj.type;\n // attachments if we have them\n if (obj.type === PacketType.BINARY_EVENT ||\n obj.type === PacketType.BINARY_ACK) {\n str += obj.attachments + \"-\";\n }\n // if we have a namespace other than `/`\n // we append it followed by a comma `,`\n if (obj.nsp && \"/\" !== obj.nsp) {\n str += obj.nsp + \",\";\n }\n // immediately followed by the id\n if (null != obj.id) {\n str += obj.id;\n }\n // json data\n if (null != obj.data) {\n str += JSON.stringify(obj.data);\n }\n return str;\n }", "title": "" }, { "docid": "5f543459772068c48efdb3031a6aebad", "score": "0.63544184", "text": "function toHTTPQueryStr(aObj)\n{ \n var tOutArr = [];\n for (var p in obj) {\n tOutArr.push(encodeURIComponent(p) + \"=\" + encodeURIComponent(obj[p]));\n }\n return tOutArr.join(\"&\");\n}", "title": "" }, { "docid": "168b8cd9126855c291b1d006c830df46", "score": "0.6290216", "text": "function param(object) {\n var encodedString = '';\n for (var prop in object) {\n if (object.hasOwnProperty(prop)) {\n if (encodedString.length > 0) {\n encodedString += '&';\n }\n encodedString += encodeURI(prop + '=' + object[prop]);\n }\n }\n //alert(encodedString)\n return encodedString;\n}", "title": "" }, { "docid": "e9a035b2c9db7637f9a2c6cb9c1a2ff9", "score": "0.6273932", "text": "serialize(obj = {}) {\n return Object.keys(obj).length\n ? \"?\" +\n Object.keys(obj)\n .map(k => `${encodeURIComponent(k)}=${encodeURIComponent(obj[k])}`)\n .join(\"&\")\n : \"\";\n }", "title": "" }, { "docid": "95ae97b505c99e5d765766bc00844701", "score": "0.62362015", "text": "function encUriCompFn ( str ) { return encodeURIComponent( str ); }", "title": "" }, { "docid": "2a91388cee97a08a702aedeb213a8267", "score": "0.6225088", "text": "function encodeState(stateObject) {\n return base64url_1.default.encode(JSON.stringify(stateObject));\n}", "title": "" }, { "docid": "4ab6588f5e0345d7c66db52ff57698c3", "score": "0.61485416", "text": "function encodeSave(gameObject) {\n\tlog(\"encoding...\");\n\tlog(gameObject);\n\tlog(window.btoa(gameObject));\n\treturn window.btoa(gameObject);\n}", "title": "" }, { "docid": "764b3f03ec0f6c6d1eb46cb25a212cbc", "score": "0.61425817", "text": "function stringifyObject(obj) {\n const keys = Object.keys(obj)\n\n return `?${keys\n .map(k => `${encodeURIComponent(k)}=${encodeURIComponent(obj[k])}`)\n .join('&')}`\n}", "title": "" }, { "docid": "8894eed2dfcfc72767d360c024da592e", "score": "0.61102283", "text": "publ encode(){\n var data=[];\n for(var i=0;i<this.elements.length;i++){\n data.push(this.elements[i].encode());\n }\n return data.join(\"&\");\n }", "title": "" }, { "docid": "5a85e8686e9b279c26dad3d34a0ed70f", "score": "0.61098045", "text": "function serializeData( data ) {\n // If this is not an object, defer to native stringification.\n if ( ! angular.isObject( data ) ) {\n return( ( data == null ) ? \"\" : data.toString() );\n }\n var buffer = [];\n // Serialize each key in the object.\n for ( var name in data ) {\n if ( ! data.hasOwnProperty( name ) ) {\n continue;\n }\n var value = data[ name ];\n buffer.push(\n encodeURIComponent( name ) +\n \"=\" +\n encodeURIComponent( ( value == null ) ? \"\" : value )\n );\n }\n // Serialize the buffer and clean it up for transportation.\n var source = buffer\n .join( \"&\" )\n .replace( /%20/g, \"+\" )\n ;\n return( source );\n }", "title": "" }, { "docid": "dc780f83a326c1071d4ba8a3a59390c6", "score": "0.60901314", "text": "function encode(data) {\n return Object.keys(data)\n .map(key => `${encodeURIComponent(key)}=${encodeURIComponent(data[key])}`)\n .join('&');\n}", "title": "" }, { "docid": "0b2f234fcd51e06d9adb9f9d9cea936e", "score": "0.60155433", "text": "function rawurlencode(str) {\n\tvar output = escape(str);\n\toutput = str_replace(\"*\",\"%2A\", output);\n\toutput = str_replace(\"+\",\"%2B\", output);\n\toutput = str_replace(\"/\",\"%2F\", output);\n\toutput = str_replace(\"@\",\"%40\", output);\n\treturn output;\n}", "title": "" }, { "docid": "7eb1e402bad6cee8283a56c1689c6a9a", "score": "0.59576327", "text": "function object2String2(data){\n var value = \"\";\n for(var i in data){\n value += (i+\"=\"+data[i]+\"&\");\n }\n var len = value.length;\n value = value.substr(0, len-1);\n return value;\n}", "title": "" }, { "docid": "9add4762d6f20e8904ca46ce4cd66469", "score": "0.59546196", "text": "function encode(data) {\n return Object.keys(data).map(function (key) {\n return encodeURIComponent(key) + '=' + encodeURIComponent(data[key]);\n }).join('&');\n}", "title": "" }, { "docid": "ae0b57cc240746d82b31b421632fee0b", "score": "0.5934414", "text": "function serializeData(data) {\n // If this is not an object, defer to native stringification.\n if (!angular.isObject(data)) {\n return ((data == null) ? \"\" : data.toString());\n }\n\n var buffer = [];\n\n // Serialize each key in the object.\n for (var name in data) {\n if (!data.hasOwnProperty(name)) {\n continue;\n }\n var value = data[name];\n buffer.push(encodeURIComponent(name) + \"=\" + encodeURIComponent((value == null) ? \"\" : value));\n }\n\n // Serialize the buffer and clean it up for transportation.\n var source = buffer.join(\"&\").replace(/%20/g, \"+\");\n return (source);\n }", "title": "" }, { "docid": "2cb2582062f133fb85172b176d3d0272", "score": "0.5931743", "text": "function codify(obj) {\n return JSON.stringify(obj);\n }", "title": "" }, { "docid": "58637e1dfdc6c2e3a550efc8120d99f3", "score": "0.5916273", "text": "function objToString (obj) {\n var str = '';\n for (var p in obj) {\n if (obj.hasOwnProperty(p)) {\n str += p + '=' + encodeURIComponent(obj[p]) + '&';\n }\n }\n return str.substring(0,str.length-1);\n }", "title": "" }, { "docid": "eb81785529f03129aaf2876bd7661d88", "score": "0.5900994", "text": "function serializeData(data) {\n\n // If this is not an object, defer to native stringification.\n if (!angular.isObject(data)) {\n\n return ((data == null) ? \"\" : data.toString());\n\n }\n\n var buffer = [];\n\n // Serialize each key in the object.\n for (var name in data) {\n\n if (!data.hasOwnProperty(name)) {\n\n continue;\n\n }\n\n var value = data[name];\n\n buffer.push(\n encodeURIComponent(name) +\n \"=\" +\n encodeURIComponent((value == null) ? \"\" : value)\n );\n\n }\n\n // Serialize the buffer and clean it up for transportation.\n var source = buffer\n .join(\"&\")\n .replace(/%20/g, \"+\")\n ;\n\n return (source);\n }", "title": "" }, { "docid": "1956f61730f8730fbc51befc0570b5ac", "score": "0.5885151", "text": "function serializeData(data) {\n\n // If this is not an object, defer to native stringification.\n if (!angular.isObject(data)) {\n\n return( ( data == null ) ? \"\" : data.toString() );\n\n }\n\n var buffer = [];\n\n // Serialize each key in the object.\n for (var name in data) {\n\n if (!data.hasOwnProperty(name)) {\n\n continue;\n\n }\n\n var value = data[ name ];\n\n buffer.push(\n encodeURIComponent(name) +\n \"=\" +\n encodeURIComponent(( value == null ) ? \"\" : value)\n );\n\n }\n\n // Serialize the buffer and clean it up for transportation.\n var source = buffer\n .join(\"&\")\n .replace(/%20/g, \"+\")\n ;\n\n return( source );\n\n }", "title": "" }, { "docid": "1df361f6e4325ca7cde5625188fca6ed", "score": "0.5860918", "text": "function encode(obj) {\n return \"pmrpc.\" + JSON.stringify(obj);\n }", "title": "" }, { "docid": "96dfa184a1ea07415e70c901eae7f9c8", "score": "0.58260983", "text": "function stringify(obj) {\n let str = '';\n for(const key in obj){\n str += `${str.length > 0 ? '&' : '?'}${key}=${obj[key]}`;\n }\n return str;\n}", "title": "" }, { "docid": "776066c25cb37e196461dbe2ad8876a3", "score": "0.58256894", "text": "function objectToQueryString(obj)\n {\n return Object.keys(obj).map(key => key + '=' + obj[key]).join('&')\n }", "title": "" }, { "docid": "a5d6fdca39f7bad0815118be3947e72a", "score": "0.58221316", "text": "function encodeURL(str)\r\n{if (encodeURIComponent) \r\n\t{str = encodeURIComponent(str);}\r\nelse \r\n\t{str = escape(str);\r\n\t str = str.replace(/:/g, \"%3A\").replace(/ /g, \"%20\").replace(/-/g,\"%2D\").replace(/_/g,\"%5F\").replace(/\\./g, \"%2E\").replace(/\\//g, \"%2F\").replace(/\\?/g,\"%3F\").replace(/=/g,\"%3D\").replace(/&/g,\"%26\").replace(/\\+/g,\"%2B\").replace(/\\|/g,\"%A6\").replace(/\\|/g,\"%7C\").replace(/,/g,\"%2C\");\t\t\t\r\n\t}\r\n\treturn str;\r\n}", "title": "" }, { "docid": "3bf4ee5de30a9a826c7c305b29979a02", "score": "0.5820669", "text": "function formEncode (object) {\n var result = []\n\n // Form key-value pairs, encoding each key and value\n forOwn(object, function (value, key) {\n if (!value && value !== 0 || !key) return\n result.push(encodeURIComponent(key) + '=' + encodeURIComponent(value))\n })\n\n return result.join('&')\n}", "title": "" }, { "docid": "152efad187742f9454589e4b246c7932", "score": "0.5818709", "text": "publ encode(){\n return encodeURIComponent(this.name) + \"=\" + encodeURIComponent(this.value);\n }", "title": "" }, { "docid": "9cde8e98cb285ddcfa17ad7568a1f86d", "score": "0.5813196", "text": "function urlencoded_serialize(pairs) {\n var output = '', first = true;\n pairs.forEach(function (pair) {\n var name = encodeURIComponent(pair.name);\n var value = encodeURIComponent(pair.value);\n if (!first) output += '&';\n output += name + '=' + value;\n first = false;\n });\n return output.replace(/%20/g, '+');\n }", "title": "" }, { "docid": "9cde8e98cb285ddcfa17ad7568a1f86d", "score": "0.5813196", "text": "function urlencoded_serialize(pairs) {\n var output = '', first = true;\n pairs.forEach(function (pair) {\n var name = encodeURIComponent(pair.name);\n var value = encodeURIComponent(pair.value);\n if (!first) output += '&';\n output += name + '=' + value;\n first = false;\n });\n return output.replace(/%20/g, '+');\n }", "title": "" }, { "docid": "397452fc780b4334c4fab9a45a62f6e8", "score": "0.5803819", "text": "function encode(data) {\n return Object.keys(data)\n .map((key) => encodeURIComponent(key) + \"=\" + encodeURIComponent(data[key]))\n .join(\"&\")\n}", "title": "" }, { "docid": "7d47b77d01cb29e401420bbd68dcb970", "score": "0.58017004", "text": "function encode(data) {\n return Object.keys(data)\n .map(key => encodeURIComponent(key) + \"=\" + encodeURIComponent(data[key]))\n .join(\"&\")\n}", "title": "" }, { "docid": "8a3d2abec4acf4ae357e6476c5461db5", "score": "0.5788075", "text": "function rawurlencode (str) {\n\tstr = (str + '').toString();\n\treturn encodeURIComponent(str).replace(/!/g, '%21').replace(/'/g, '%27').replace(/\\(/g, '%28').\n\treplace(/\\)/g, '%29').replace(/\\*/g, '%2A');\n}", "title": "" }, { "docid": "eb21c25f436417ca7bbcab35fed115b9", "score": "0.5776696", "text": "function encodeUriComponent(value) {\n return encodeURIComponent(value);\n }", "title": "" }, { "docid": "dcecb5e4d3883cfebf3618a050aadbac", "score": "0.5770032", "text": "function encodeBase64ForURL(str){\n var str = encodeBase64(str).replace(/=/g, \"\").replace(/\\+/g, \"*\").replace(/\\//g, \"-\");\n str = str.replace(/\\s/g, \"\"); /* Watch out! encodeBase64 breaks lines at 76 chars -- we don't want any whitespace */\n return str;\n}", "title": "" }, { "docid": "5024bb0131dfc6d39b210d43ccc6aa8c", "score": "0.5769248", "text": "function build_http_query(obj) {\n\t var str = \"\";\n\t for (var key in obj) {\n\t if (obj.hasOwnProperty(key)) {\n\t if (str != \"\") {\n\t str += \"&\";\n\t }\n\t str += key + \"=\" + encodeURIComponent(obj[key]);\n\t }\n\t }\n\t return str;\n\t}", "title": "" }, { "docid": "f7e00b5a95b8dafc63617c9f80800982", "score": "0.57593197", "text": "function i_arr4encode(arr) {\n if (typeof(arr) == 'underfined' || arr== null) {\n return '';\n } else if (typeof(arr) == 'string') {\n arr = encodeURIComponent(arr);\n return arr;\n }\n var key, val;\n for (key in arr) {\n val = arr[key];\n if (val == null) {\n arr[key] = '';\n }else if (typeof(val) == 'object') {\n arr[key] = i_arr4encode(val);\n } else {\n // arr[key] = encodeURIComponent(encodeURIComponent(val));\n arr[key] = encodeURIComponent(val);\n }\n }\n return arr;\n}", "title": "" }, { "docid": "aa87bc5d553923437ef5559bf8bf61fd", "score": "0.57539886", "text": "function URLEncode(str) {\n\treturn escape(str).\n\treplace(/\\+/g, '%2B').\n\treplace(/\\\"/g,'%22').\n\treplace(/\\'/g, '%27').\n\treplace(/\\//g,'%2F');\n\n//\treturn escape(str);\n}", "title": "" }, { "docid": "24b879a0b67f2a5b4b7a16b1d120633f", "score": "0.5725627", "text": "function encodeHeader (header) {\n return base64.urlEncode(JSON.stringify(header));\n}", "title": "" }, { "docid": "06961290579dbfe3d79b02fe0c9517a7", "score": "0.57102454", "text": "function encodeItem(x) {\n\treturn x.replace(/&/g, \"&amp;\").replace(/>/g, \"&gt;\").replace(/</g, \"&lt;\").replace(/\"/g, \"&quot;\").trim();\n}", "title": "" }, { "docid": "ccd08fd964ba22fb6bd8b375323eae89", "score": "0.5700852", "text": "function toQueryString (obj) {\n\t\tvar qs = [], key;\n\t\tfor (key in obj) {\n\t\t\tif (obj.hasOwnProperty(key)) { qs.push(key + \"=\" + encodeURIComponent(obj[key])); }\n\t\t}\n\t\treturn qs.join('&');\n\t}", "title": "" }, { "docid": "d0d6054f1183835aa90b43fe0888e185", "score": "0.5698168", "text": "function urlEncode(str) {\n return str.replace(/\\?/g, '%3F').replace(/\\&/g, '%26').replace(/#/g, '%23');\n}", "title": "" }, { "docid": "8c3cef25e8657016195572db543d7b04", "score": "0.5695023", "text": "function base64urlencode(str) {\n try {\n return btoa(String.fromCharCode.apply(null, new Uint8Array(str)))\n .replace(/\\+/g, '-').replace(/\\//g, '_').replace(/=+$/, '');\n }\n catch (e) {\n console.log(\"Base64 Encode failed: \" + e);\n throw e;\n }\n}", "title": "" }, { "docid": "eb2f435aa0109bd3255bd881a7545358", "score": "0.56923544", "text": "function JSON_to_URLEncoded(element, key, list) {\r\n var list = list || [];\r\n if (typeof (element) == 'object') {\r\n for (var idx in element)\r\n if (element[idx] || element[idx]=== 0) {\r\n JSON_to_URLEncoded(element[idx], key ? key + '.' + idx : idx, list);\r\n }\r\n } else {\r\n list.push(key + '=' + encodeURIComponent(element));\r\n }\r\n return list.join('&');\r\n}", "title": "" }, { "docid": "03ad74ed064baf4b730912d680315052", "score": "0.5684854", "text": "function objectToQueryString(value) {\n const keys = Object.keys(value).filter(key => key.length > 0);\n if (!keys.length) {\n return '';\n }\n return ('?' +\n keys\n .map(key => {\n const content = encodeURIComponent(String(value[key]));\n return key + (content ? '=' + content : '');\n })\n .join('&'));\n }", "title": "" }, { "docid": "b80fa2d3a60557412a85d4c7b3557658", "score": "0.5678915", "text": "function parseIntoEncodedData(data){\n\tvar urlEncodedData = \"\";\n var urlEncodedDataPairs = [];\n var name;\n // Turn the data object into an array of erl-encoded key-value pairs.\n for(name in data) {\n urlEncodedDataPairs.push(encodeURIComponent(name) + '=' + encodeURIComponent(data[name]));\n }\n // Combine the pairs into a single string and replace all %-encoded spaces to\n // the '+' character; matches the behaviour of browser form submissions.\n urlEncodedData = urlEncodedDataPairs.join('&').replace(/%20/g, '+');\n return urlEncodedData;\n}", "title": "" }, { "docid": "0c2ca7a2eb2a2bef79a190019f059fdb", "score": "0.5665851", "text": "function encode(unencoded) {\n\treturn encodeURIComponent(unencoded).replace(/'/g,\"%27\").replace(/\"/g,\"%22\");\t\n }", "title": "" }, { "docid": "8aacd76c410837edefd0dbc3d2a6f16e", "score": "0.56608593", "text": "function encode (value) {\n return JSON.stringify({ '': value }) + getType(value) + value\n}", "title": "" }, { "docid": "c44bd7207e6d78498e79b9736352993c", "score": "0.5660536", "text": "function serialize(obj) {\n var params = [],\n encodedBrackets = encodeURIComponent('[]');\n\n _.forOwn(obj, function(value, key) {\n if (typeof value === 'string' ||\n typeof value === 'number' ||\n typeof value === 'boolean') {\n params.push(key + '=' + encodeURIComponent(value));\n } else if (typeof value === 'object' && Array.isArray(value)) {\n params.push(value.map(function(param) {\n return key + encodedBrackets + '=' + encodeURIComponent(param);\n }).join('&'));\n }\n });\n\n return params.join('&');\n}", "title": "" }, { "docid": "8640c2394c49506e4bfee1ff68110e81", "score": "0.5658698", "text": "function objToQueryString(obj) {\n const keyValuePairs = [];\n for (const key in obj) {\n keyValuePairs.push(encodeURIComponent(key) + '=' + encodeURIComponent(obj[key]));\n }\n return keyValuePairs.join('&');\n}", "title": "" }, { "docid": "33d40387c29c8522d1a6e84947117377", "score": "0.5658186", "text": "function encodeUrl(str) {\n return encodeURIComponent(str)\n .replace(/%20/g, \"+\")\n .replace(/!/g, \"%21\")\n .replace(/'/g, \"%27\")\n .replace(/\\(/g, \"%28\")\n .replace(/\\)/g, \"%29\")\n .replace(/~/g, \"%7E\");\n}", "title": "" }, { "docid": "cb988f5006666248d5a14fa8dab2e7bf", "score": "0.5655443", "text": "function encodeURLParameter(str) {\n return encodeURIComponent(str).replace(/%20/g, \"+\");\n}", "title": "" }, { "docid": "ff5ac110c2a4cc96d9e7d9f2dd560310", "score": "0.56291395", "text": "function encode(queury) {\n\n encodedQuery = querystring.stringify({'query': query});\n encodedQuery = query.replace(\"query=\", \"\");\n return encodedQuery;\n}", "title": "" }, { "docid": "9aafd687057728a36cda3b024250a4eb", "score": "0.5627255", "text": "function objectToQueryString(value) {\n var keys = Object.keys(value);\n if (!keys.length) {\n return '';\n }\n return '?' + keys.map(function (key) {\n var content = encodeURIComponent(String(value[key]));\n return key + (content ? '=' + content : '');\n }).join('&');\n }", "title": "" }, { "docid": "ed364ddddb2096bade9c38eb0312ef6d", "score": "0.5613388", "text": "function toQueryString(obj) {\r\n var str = [];\r\n for (var p in obj)\r\n if (obj.hasOwnProperty(p)) {\r\n str.push(encodeURIComponent(p) + \"=\" + encodeURIComponent(obj[p]));\r\n }\r\n return str.join(\"&\");\r\n}", "title": "" }, { "docid": "d6c72fb8d5aa50a4184e33ad0ebdfa5d", "score": "0.5606433", "text": "function encodeUriSegment(val){return encodeUriQuery(val,!0).replace(/%26/gi,\"&\").replace(/%3D/gi,\"=\").replace(/%2B/gi,\"+\")}", "title": "" }, { "docid": "d6c72fb8d5aa50a4184e33ad0ebdfa5d", "score": "0.5606433", "text": "function encodeUriSegment(val){return encodeUriQuery(val,!0).replace(/%26/gi,\"&\").replace(/%3D/gi,\"=\").replace(/%2B/gi,\"+\")}", "title": "" }, { "docid": "558994f5f7bc38ca3df50beb493b8728", "score": "0.5600905", "text": "function encodeUriString(s) {\n return encodeURIComponent(s)\n .replace(/%40/g, '@')\n .replace(/%3A/gi, ':')\n .replace(/%24/g, '$')\n .replace(/%2C/gi, ',');\n}", "title": "" }, { "docid": "558994f5f7bc38ca3df50beb493b8728", "score": "0.5600905", "text": "function encodeUriString(s) {\n return encodeURIComponent(s)\n .replace(/%40/g, '@')\n .replace(/%3A/gi, ':')\n .replace(/%24/g, '$')\n .replace(/%2C/gi, ',');\n}", "title": "" }, { "docid": "558994f5f7bc38ca3df50beb493b8728", "score": "0.5600905", "text": "function encodeUriString(s) {\n return encodeURIComponent(s)\n .replace(/%40/g, '@')\n .replace(/%3A/gi, ':')\n .replace(/%24/g, '$')\n .replace(/%2C/gi, ',');\n}", "title": "" }, { "docid": "558994f5f7bc38ca3df50beb493b8728", "score": "0.5600905", "text": "function encodeUriString(s) {\n return encodeURIComponent(s)\n .replace(/%40/g, '@')\n .replace(/%3A/gi, ':')\n .replace(/%24/g, '$')\n .replace(/%2C/gi, ',');\n}", "title": "" }, { "docid": "558994f5f7bc38ca3df50beb493b8728", "score": "0.5600905", "text": "function encodeUriString(s) {\n return encodeURIComponent(s)\n .replace(/%40/g, '@')\n .replace(/%3A/gi, ':')\n .replace(/%24/g, '$')\n .replace(/%2C/gi, ',');\n}", "title": "" }, { "docid": "558994f5f7bc38ca3df50beb493b8728", "score": "0.5600905", "text": "function encodeUriString(s) {\n return encodeURIComponent(s)\n .replace(/%40/g, '@')\n .replace(/%3A/gi, ':')\n .replace(/%24/g, '$')\n .replace(/%2C/gi, ',');\n}", "title": "" }, { "docid": "558994f5f7bc38ca3df50beb493b8728", "score": "0.5600905", "text": "function encodeUriString(s) {\n return encodeURIComponent(s)\n .replace(/%40/g, '@')\n .replace(/%3A/gi, ':')\n .replace(/%24/g, '$')\n .replace(/%2C/gi, ',');\n}", "title": "" }, { "docid": "558994f5f7bc38ca3df50beb493b8728", "score": "0.5600905", "text": "function encodeUriString(s) {\n return encodeURIComponent(s)\n .replace(/%40/g, '@')\n .replace(/%3A/gi, ':')\n .replace(/%24/g, '$')\n .replace(/%2C/gi, ',');\n}", "title": "" }, { "docid": "558994f5f7bc38ca3df50beb493b8728", "score": "0.5600905", "text": "function encodeUriString(s) {\n return encodeURIComponent(s)\n .replace(/%40/g, '@')\n .replace(/%3A/gi, ':')\n .replace(/%24/g, '$')\n .replace(/%2C/gi, ',');\n}", "title": "" }, { "docid": "558994f5f7bc38ca3df50beb493b8728", "score": "0.5600905", "text": "function encodeUriString(s) {\n return encodeURIComponent(s)\n .replace(/%40/g, '@')\n .replace(/%3A/gi, ':')\n .replace(/%24/g, '$')\n .replace(/%2C/gi, ',');\n}", "title": "" }, { "docid": "558994f5f7bc38ca3df50beb493b8728", "score": "0.5600905", "text": "function encodeUriString(s) {\n return encodeURIComponent(s)\n .replace(/%40/g, '@')\n .replace(/%3A/gi, ':')\n .replace(/%24/g, '$')\n .replace(/%2C/gi, ',');\n}", "title": "" }, { "docid": "02511ec28200f84ec678ace26f557343", "score": "0.5595035", "text": "function objectToParameters(obj) {\n let text = '';\n for (let i in obj) {\n // encodeURIComponent is a built-in function that escapes to URL-safe values\n text += encodeURIComponent(i) + '=' + encodeURIComponent(obj[i]) + '&';\n }\n return text;\n}", "title": "" }, { "docid": "4329534c74a961932dffeda454c316e3", "score": "0.5583353", "text": "function encodeUriSegment(val){return encodeUriQuery(val,true).replace(/%26/gi,'&').replace(/%3D/gi,'=').replace(/%2B/gi,'+');}", "title": "" }, { "docid": "4329534c74a961932dffeda454c316e3", "score": "0.5583353", "text": "function encodeUriSegment(val){return encodeUriQuery(val,true).replace(/%26/gi,'&').replace(/%3D/gi,'=').replace(/%2B/gi,'+');}", "title": "" }, { "docid": "f9b39b14333f7084f5ecb2eab9a26426", "score": "0.55820227", "text": "function toQueryString(obj) {\r\n var str = [ ];\r\n for (var p in obj) {\r\n if (obj.hasOwnProperty(p)) {\r\n str.push(encodeURIComponent(p) + \"=\" + encodeURIComponent(obj[p]));\r\n }\r\n }\r\n return str.join(\"&\");\r\n}", "title": "" }, { "docid": "e34b9b465506bb009e83153549be390c", "score": "0.55731446", "text": "function urlEncodeParts(uri) {\n\t return urlPathJoin.apply(void 0, uri.split('/').map(encodeURIComponent));\n\t}", "title": "" }, { "docid": "78af6051f1a63115987d39c60141b617", "score": "0.5551847", "text": "static buildEncodedUri(request) {\r\n const response = [];\r\n for (let d in request) { response.push(encodeURIComponent(d) + '=' + encodeURIComponent(request[d])); }\r\n return response.join('&');\r\n}", "title": "" }, { "docid": "4be42c2eda4c456a63ab1d69ca7b6c9e", "score": "0.5543626", "text": "function urlEncode(url) {\n const KEY = \"KEY\";\n // From https://boilerpipe-web.appspot.com/\n // Strategy\t Description\n // ArticleExtractor\t A full-text extractor which is tuned towards news articles. In this scenario it achieves higher accuracy than DefaultExtractor.\n // DefaultExtractor\t A quite generic full-text extractor, but usually not as good as ArticleExtractor.\n // LargestContentExtractor\tLike DefaultExtractor, but only keeps the largest content block. Good for non-article style texts with only one main content block.\n // KeepEverythingExtractor\tTreats everything as \"content\". Useful to track down SAX parsing errors.\n const EXTRACTOR = \"KeepEverythingExtractor\";\n\n // Output Format Description\n // html\t Output the whole HTML document and highlight the extracted main content\n // htmlFragment\t Output only those HTML fragments that are regarded main content\n // text\t Output the extracted main content as plain text\n // json \tOutput the extracted main content as JSON. For details, see this page.\n // debug\t Output debug information to understand how boilerpipe internally represents a document.\n const OUTPUT = \"text\";\n\n const req_template = `https://boilerpipe-web.appspot.com/extract?url=${KEY}&extractor=${EXTRACTOR}&output=${OUTPUT}`;\n const encodedUrl = encodeURIComponent(url);\n return req_template.replace(KEY, encodedUrl);\n}", "title": "" }, { "docid": "8cbdd33248e04d4ff5d90273b5bbac6c", "score": "0.553918", "text": "function postString(obj, prefix){\n\t\tvar str = [], p, k, v;\n\t\tif(lib.type(obj, 'array')){\n\t\t\tif(!prefix){\n\t\t\t\tthrow new Error('Sorry buddy, your object is wrong and you should feel bad');\n\t\t\t}\n\n\t\t\tfor(p = 0; p < obj.length; p++){\n\t\t\t\tk = prefix + \"[]\";\n\t\t\t\tv = obj[p];\n\t\t\t\tstr.push(typeof v === \"object\"?postString(v,k):encodeURIComponent(k) +\n\t\t\t\t\t\"=\" + encodeURIComponent(v));\n\t\t\t}\n\t\t} else {\n\t\t\tfor(p in obj) {\n\t\t\t\tif(prefix){\n\t\t\t\t\tk = prefix + \"[\" + p + \"]\";\n\t\t\t\t} else {\n\t\t\t\t\tk = p;\n\t\t\t\t}\n\t\t\t\tv = obj[p];\n\t\t\t\tstr.push(typeof v === \"object\"?postString(v,k):encodeURIComponent(k) +\n\t\t\t\t\t\"=\" + encodeURIComponent(v));\n\t\t\t}\n\t\t}\n\t\treturn str.join(\"&\");\n\t}", "title": "" }, { "docid": "cfe3f36dcb5d2f281cfeb5fa12339a7d", "score": "0.553852", "text": "function fixedEncodeURI (str) {\r\n return encodeURI(str).replace(/%5B/g, '[').replace(/%5D/g, ']');\r\n}", "title": "" }, { "docid": "39def9f99b5bb69585edb3eba0331f60", "score": "0.5534535", "text": "function encodeUriQuery(val,pctEncodeSpaces){return encodeURIComponent(val).replace(/%40/gi,\"@\").replace(/%3A/gi,\":\").replace(/%24/g,\"$\").replace(/%2C/gi,\",\").replace(/%3B/gi,\";\").replace(/%20/g,pctEncodeSpaces?\"%20\":\"+\")}", "title": "" }, { "docid": "20e700ccf7388a008957d414aefaae33", "score": "0.55337113", "text": "toUrlParam() {\n return encodeURIComponent(`${this.name || ''}~${this.number || ''}~${this.skill || 0}~${this.active || false}~${this.position || ''}`\n )\n }", "title": "" }, { "docid": "e559ae426fa502beb4e2d801fc92484b", "score": "0.55268496", "text": "function encodeUriQuery(val,pctEncodeSpaces){return encodeURIComponent(val).replace(/%40/gi,\"@\").replace(/%3A/gi,\":\").replace(/%24/g,\"$\").replace(/%2C/gi,\",\").replace(/%20/g,pctEncodeSpaces?\"%20\":\"+\")}", "title": "" }, { "docid": "e5c069d5b17580abde818753087c176e", "score": "0.55197334", "text": "function serialize(obj, prefix, depth) {\n if (depth >= 5) {\n return encodeURIComponent(prefix) + \"=[RECURSIVE]\";\n }\n depth = depth + 1 || 1;\n\n try {\n if (window.Node && obj instanceof window.Node) {\n return encodeURIComponent(prefix) + \"=\" + encodeURIComponent(targetToString(obj));\n }\n\n var str = [];\n for (var p in obj) {\n if (obj.hasOwnProperty(p) && p != null && obj[p] != null) {\n var k = prefix ? prefix + \"[\" + p + \"]\" : p, v = obj[p];\n str.push(typeof v === \"object\" ? serialize(v, k, depth) : encodeURIComponent(k) + \"=\" + encodeURIComponent(v));\n }\n }\n return str.join(\"&\");\n } catch (e) {\n return encodeURIComponent(prefix) + \"=\" + encodeURIComponent(\"\" + e);\n }\n }", "title": "" } ]
01369b377edb45f919a13a49315d2ed0
PROBLEM 44 ////// / Convert input N to binary
[ { "docid": "a8ce50a650fcba93b59fa5873ffacf40", "score": "0.680214", "text": "function toBin(num){\n if(num < 1){\n return \"not valid\";\n }\n let binNum = [];\n let div = num;\n while(div >= 1){\n binNum.unshift(div%2);\n div = Math.floor(div/2);\n }\n return binNum;\n}", "title": "" } ]
[ { "docid": "e31d040b88e003274565e09873a9b249", "score": "0.7950438", "text": "function toBinary(n){\n return +n.toString(2);\n}", "title": "" }, { "docid": "f18e3e51b9e883b28bb121d16544146d", "score": "0.79210794", "text": "function toBinary(number){\n \n\n}", "title": "" }, { "docid": "b824619849060ee072a1eac1a7d150bc", "score": "0.7884512", "text": "function toBinary(n){\n n = n.toString(2)\n n = parseInt(n)\n return n\n}", "title": "" }, { "docid": "694563505220ea9be6271c6af6304cae", "score": "0.7834489", "text": "function toBinary(n){\n var str = n.toString(2);\n str = ('00000000'+ str ).slice(-8);\n //console.log(str);\n return str;\n}", "title": "" }, { "docid": "c77944c94b495eaa0f42764f20c1315e", "score": "0.76058894", "text": "function toBinary(input) {\n if (input === 0 || input === 1) {\n return String(input);\n }\n \n let leastSignificantBit = input % 2;\n let otherBits = Math.floor(input / 2);\n return toBinary(otherBits) + String(leastSignificantBit);\n }", "title": "" }, { "docid": "6ebe3fe2810fdffdbfd9260a9c0e2884", "score": "0.74492323", "text": "function getBinary(n){\n // yolo\n}", "title": "" }, { "docid": "d2035f569651a1a8eadfff26d65e5441", "score": "0.74435186", "text": "toBinary(number) {\n\t\t\t\treturn \"0\".repeat(8 - number.toString(2).length) + number.toString(2);\n\t\t\t}", "title": "" }, { "docid": "633e6009103316722ec9cf1c992a39d7", "score": "0.7400679", "text": "function binary(n) {\n var b = \"\";\n for(var i=0; n > 0; i++) {\n b = (n % 2) + b;\n n = Math.floor(n/2);\n }\n return \"0b\" + b;\n}", "title": "" }, { "docid": "d8eceb643e242877db30f7b85897c9c3", "score": "0.73694056", "text": "getToBinary(n) {\n let str, byn, p;\n str = n.toString();\n byn = (+str).toString(2);\n console.log(byn);\n\n this.getToDecimal(byn);\n\n // p= parseInt(byn , 2);\n // console.log('new '+p);\n }", "title": "" }, { "docid": "522e063eac07c54c2865d8dabdf9117e", "score": "0.72655755", "text": "toBinary(number)\n {\n var binary=\"\";\n var n = number;\n var sum = \"\";\n var reverse= \"\";\n \n //condition for getting remender\n \n while(n >=1)\n {\n binary=binary+(n%2);\n n = Math.floor(n/2);\n }\n \n //condition-if the element of binary number is greater then 0 or less then 4.\n \n \n if(binary.length > 0 && binary.length < 4)\n {\n for(var i = 0 ; i < 4-binary.length ; i++)\n {\n sum = sum + 0;\n }\n binary = binary + sum;\n }\n \n //reverse the remender for getting binary number.\n \n for(var i = binary.length - 1 ;i >= 0 ; i--)\n {\n reverse = reverse + binary.charAt(i);\n }\n return reverse;\n }", "title": "" }, { "docid": "b9e808d77753657a734f265d486124c7", "score": "0.72063583", "text": "getBinary(num) {\n\n var bin, fb = [], lb = [], newbin = [], digit,\n // var str = num.toString();\n bin = (+num).toString(2);\n console.log(bin);\n fb = bin.slice(0, 4);\n lb = bin.slice(4);\n newbin = lb + fb;\n console.log(newbin);\n digit = parseInt(newbin, 2);\n console.log(digit);\n\n\n\n }", "title": "" }, { "docid": "b47d5bc97a25bdc03cb90f298f28d137", "score": "0.72052044", "text": "binary(number)\n {\n \n var binary=\"\";\n var n = number;\n var sum = \"\";\n var reverse= \"\";\n \n //condition for getting remender\n \n while(n >=1)\n {\n binary=binary+(n%2);\n n = Math.floor(n/2);\n }\n \n //condition-if the element of binary number is greater then 0 or less then 4.\n \n \n if(binary.length > 0 && binary.length < 8)\n {\n for(var i = 0 ; i < 8-binary.length ; i++)\n {\n sum = sum + 0;\n }\n binary = binary + sum;\n }\n \n //reverse the remender for getting binary number.\n \n for(var i = binary.length - 1 ;i >= 0 ; i--)\n {\n reverse = reverse + binary.charAt(i);\n }\n \n console.log('decimal to binary: ',(reverse));\n \n //reverse that binary number\n \n var nibble1 = reverse;\n var b1=\"\";\n var b2=\"\";\n var s = \"\";\n \n //loop for getting first nibble\n \n for(var i = 0 ; i < 4 ;i++)\n {\n b1 = b1 + nibble1.charAt(i);\n }\n \n console.log('nibbel 1: ',(b1));\n \n //loop for getting second nibble\n \n for(var i = 4 ; i <= 7 ; i++)\n {\n b2 = b2 + nibble1.charAt(i);\n }\n \n console.log('nibbel 2: '+b2);\n \n //swap that seperate 2 nibble by adding them\n \n s = s+b2+b1;\n console.log('swapped nibble : ',(s));\n \n //convert binary to decimal \n \n var BtoD = parseInt(s, 2);\n console.log('Binary to decimal: ',(BtoD));\n }", "title": "" }, { "docid": "0e657e2416fe812e0883882c72caff70", "score": "0.71906245", "text": "function binaryRep(input) {\n if (input <= 0) {\n return '';\n }\n let binary = Math.floor(input % 2);\n return binaryRep(Math.floor(input / 2)) + binary\n\n}", "title": "" }, { "docid": "2268143e9c8e798101ce86f6e3d278fd", "score": "0.71729386", "text": "function toBin(input){\n\tvar output = new Array(input.length * 6),\n\t\tcode = 0,\n\t\tdigit = 0,\n\t\tdivider = 32;\n\t\n for(var i = 0; i < input.length; i++) {\n\t\tcode = base64.indexOf(input.charAt(i));\n\t\tdivider = 32;\n\t\tfor(var j = 0; j < 5; j++){\n\t\t\tdigit = code >= divider ? 1 : 0;\n\t\t\tcode -= digit * divider;\n\t\t\tdivider = divider / 2;\n\t\t\toutput[6 * i + j] = digit\n\t\t}\n\t\toutput[6 * i + 5] = code;\n }\n\treturn output\n}", "title": "" }, { "docid": "a6186e51c5c244026965a9bd23944b03", "score": "0.7161656", "text": "function convertBin(str) {\n\t\tvar n = 0, v = 1;\n\t\t//loop through str starting at end and add up values\n\t\t//first element represents 1, than 2, 4, 8 etc...\n\t\tfor(var i = str.length-1; i >= 0; i--) {\n\t\t\tn+= (str[i] * v);\n\t\t\tv *= 2;\n\t\t}\n\t\treturn n;\n\t}", "title": "" }, { "docid": "cf1f13ef8955e008331001e1638a13bb", "score": "0.71345454", "text": "function convertToBinary(number){\n var bin = (+number).toString(2);\n console.log(bin)\n return bin;\n}", "title": "" }, { "docid": "fcdcc0f73fb9cfa10d3f64edcca591b8", "score": "0.7080922", "text": "function convertToBinary(num){\n if(num>0){\n let binary = Math.floor(num%2);\n return (convertToBinary(Math.floor(num/2))+ binary);\n }else{\n return '';\n }\n\n\n}", "title": "" }, { "docid": "c5d987c629c107edb6d160262191e064", "score": "0.7079723", "text": "function convertToBinary(num){\n if(num>0){\n let binary = Math.floor(num%2);\n return (convertToBinary(Math.floor(num/2))+ binary);\n }else{\n return '';\n }\n\n\n}", "title": "" }, { "docid": "a49d8f77613be091ae8e72702401cad7", "score": "0.7067666", "text": "function binary(n, full, size, duboct) {\n let bi = \"\";\n let leading = \"\"\n if (n < 0) {\n n = n >>> 0;\n }\n while (Math.ceil(n / 2) > 0) {\n bi = n % 2 + bi;\n n = Math.floor(n / 2);\n }\n if (bi.length < 8 && full == true) {\n add = 8 - bi.length\n let x = 0;\n while (x < add) {\n leading += \"0\"\n x += 1\n }\n }\n\n if (!full && size > 0) {\n add = size - bi.length;\n let x = 0;\n while (x < add) {\n leading += \"0\";\n x += 1;\n }\n }\n if (duboct) {\n if (bi.length < 15) {\n add = 15 - bi.length\n let x = 0;\n while (x < add) {\n leading += \"0\"\n x += 1\n }\n }\n }\n return leading + bi;\n}", "title": "" }, { "docid": "93634ed03f9c70600970167af60dd9d2", "score": "0.704154", "text": "function convertToBinaryIter(num){\n var binary = '';\n while(num>0){\n let rem = Math.floor(num%2);\n binary = rem + binary;\n num = Math.floor(num/2);\n }\n return binary;\n}", "title": "" }, { "docid": "e91b0abd3559d4e4c2946d4648956bf7", "score": "0.70176846", "text": "function binaryConvert(num, result='') {\n if (num === 0) {\n return result;\n }\n result = (num % 2).toString();\n console.log(result);\n return result + binaryConvert(Math.floor(num/2));\n}", "title": "" }, { "docid": "7c3d9e8730f99708a3f44da747cf5ce8", "score": "0.7007439", "text": "function convertToBinaryIter(num) {\n var binary = \"\";\n while (num > 0) {\n let rem = Math.floor(num % 2);\n binary = rem + binary;\n num = Math.floor(num / 2);\n }\n return binary;\n}", "title": "" }, { "docid": "247ceef1d3ad99d5cc317e845a720ff0", "score": "0.6996283", "text": "function toBinary(str) {\n const baseTenNums = str.split(\"\").map((item, index, array) => item === \"1\" ? Math.pow(2, (array.length-1-index)) : 0);\n return baseTenNums.reduce((acc, item) => acc + item);\n}", "title": "" }, { "docid": "f680d27adb9e70faa25922dc70859f9e", "score": "0.696792", "text": "function toBinary(number) {\n return number.toString(2)\n}", "title": "" }, { "docid": "9d8556ff75db3298c5cf1f6733a52c88", "score": "0.69462836", "text": "getInvertedBinaryNumber( bn )//:given binary number inverted\n {\n let inv = \"\", i;\n for(i=0; i<bn.length; i++)\n {\n (bn.slice(i,i+1) == \"1\") ? inv+=\"0\" : inv+=\"1\";\n }\n return inv;\n }", "title": "" }, { "docid": "e2496937f3216b771af56175f8080c91", "score": "0.69208246", "text": "function toBinary(number) {\n if ((number / 2) < 1) {\n return [1];\n }\n return [...toBinary(Math.floor(number / 2)), number % 2].join('');\n}", "title": "" }, { "docid": "2427a5c70549160504f895d3c6886fdd", "score": "0.6912731", "text": "function intToBinary(int){\n return int.toString(2);\n}", "title": "" }, { "docid": "150dc66a1de544d059cf00e25c35b580", "score": "0.6912218", "text": "function converToBinary(result) {\n\treturn result.toString(2);\n}", "title": "" }, { "docid": "c97cd9e655a82751eb8a67301a935870", "score": "0.68621445", "text": "function binary(num){\n var n=num;\n var i=0;\n //converting into binary\n while(n>0){\n bin[i++]=Math.floor(n%2);\n n=Math.floor(n/2);\n }\n i=0;\n bin=bin.reverse();\n while(i<bin.length){\n str=str+bin[i++];\n }\n console.log(\"Binary representation of \"+num+\" is \"+str);\n while(str.length%4!=0){\n str='0'+str;\n}\nconsole.log(\"Binary representation of \"+num+\" with padding is \"+str);\n}", "title": "" }, { "docid": "845954a3de7bf569f2a9c73348244867", "score": "0.6857009", "text": "function binCon(a){\n \n return a.toString(2)\n}", "title": "" }, { "docid": "64bb0440136c8292c1f3fbd3a2c2328d", "score": "0.68462104", "text": "function iterativeBinary(number) {\n return number.toString(2);\n}", "title": "" }, { "docid": "3ce6a0c3f55155d8f936f7457950e95c", "score": "0.683464", "text": "function binary(num) {\n if (num === 0) {\n return '';\n }\n const remainder = num % 2;\n return binary((num - remainder) / 2) + remainder;\n}", "title": "" }, { "docid": "efd1e2908640402a36cf4b1720c85ec3", "score": "0.6826363", "text": "deciToBin(arg) {\n let res1 = 999;\n let args = arg;\n while (args > 1) {\n const arg1 = parseInt(args/2);\n const arg2 = args%2;\n args = arg1;\n if (res1 == 999) {\n res1 = arg2.toString();\n } else {\n res1 = arg2.toString() + res1.toString();\n }\n }\n if (args == 1 && res1 != 999) {\n res1 = args.toString() + res1.toString();\n } else if(args == 0 && res1 == 999) {\n res1 = 0;\n } else if(res1 == 999) {\n res1 = 1;\n }\n var ll = res1.length;\n while(ll % 4 != 0) {\n res1 = \"0\"+res1;\n ll = res1.length;\n }\t\n return res1;\n }", "title": "" }, { "docid": "92028b51f4d95031143ad013462f9112", "score": "0.6819118", "text": "function convertBinary()\n{\n\n\n\n}", "title": "" }, { "docid": "fb0faee20db6b188a90d3f9903e4daa6", "score": "0.6766036", "text": "function binary(num) {\n if (num === 0) {\n return 0;\n } else {\n return num % 2 + 10 * binary(Math.floor(num / 2));\n }\n}", "title": "" }, { "docid": "4231e52bdc1a3e72727dac222d73add1", "score": "0.6762213", "text": "intTo4BitBinary(num){\n ////console.log('Num: '+num);\n let binString = num.toString(2);\n let zeroes = '';\n if(binString.length<4){\n let diff = 4 - binString.length;\n for(var i=0;i<diff;i++){\n zeroes = zeroes.concat('0');\n }\n binString = zeroes.concat(binString);\n }\n ////console.log('Binary of Num: '+ binString);\n return binString;\n }", "title": "" }, { "docid": "322b7c3822d55cbf62487d2d11ef02fc", "score": "0.6755589", "text": "function arr2bin(arr){\n if(arr.some(a => typeof a != \"number\")) return false;\n return (arr.reduce((a,b)=> a+b, 0)).toString(2);\n}", "title": "" }, { "docid": "5da2aa39837a5854441bbda6e7236d42", "score": "0.67500824", "text": "function fromBin(input){\n\tvar length = input.length - (input.length % 6),\n\t\toutput = new Array(length / 6),\n\t\tindex = 0;\n\t\n\tfor(var i = 0; i < length; i = i+6) {\n\t\tindex = 0;\n\t\tfor(var j = 0; j < 6; j++){\n\t\t\tindex = 2 * index + input[i+j]\n\t\t}\n\t\toutput[i / 6] = base64.charAt(index)\n }\n\treturn output.join('')\n}", "title": "" }, { "docid": "81eb47aa2cc72b06a8942c5f8821a020", "score": "0.6736571", "text": "function readBinary(inp)\n{\n var counter = 0\n\n inp.reverse().forEach((num, index) =>\n {\n counter += num * Math.pow(2, index)\n });\n\n return counter\n}", "title": "" }, { "docid": "3f7cc59fc27947e2eb1bf4c15df879e7", "score": "0.67294073", "text": "function binary(num) {\n if (num < 2){\n return num;\n } else {\n return binary(Math.floor(num/2)).toString() + (num % 2).toString();\n }\n}", "title": "" }, { "docid": "df537a07fceca8d25d1f9956a2c2a70a", "score": "0.6728982", "text": "function DecimaltoBinary(num1) {\r\n array1 = [];\r\n var result = \"\";\r\n x = num1;\r\n for (var i = 0; parseInt((x / 2)) + 1 != 1; i++) {\r\n array1[i] = x % 2;\r\n x = parseInt(x / 2);\r\n }\r\n array1.push(1);\r\n for (var j = array1.length - 1; j >= 0; j--) {\r\n result += array1[j] + \"\";\r\n }\r\n return result;\r\n}", "title": "" }, { "docid": "e2d15d394c306e6fcb92c8418cb9018f", "score": "0.6723414", "text": "function binTernPalin () {\n // Good luck!\n}", "title": "" }, { "docid": "c620dbf1b1363cfa4a1320158de8086a", "score": "0.67222947", "text": "function toBin () {\n for(i = 0; i < minterms.length; i++){\n\tminterms[i] = parseInt(minterms[i]).toString(2);\n\twhile(minterms[i].length < numTerms){\n\t minterms[i] = '0' + minterms[i];\n\t}\n }\n for(i = 0; i < dontcares.length; i++){\n\tdontcares[i] = parseInt(dontcares[i]).toString(2);\n\twhile(dontcares[i].length < numTerms){\n\t dontcares[i] = '0' + dontcares[i];\n\t}\n }\n for(i = 0; i < maxterms.length; i++){\n\tmaxterms[i] = parseInt(maxterms[i]).toString(2);\n\twhile(maxterms[i].length < numTerms){\n\t maxterms[i] = '0' + maxterms[i];\n\t}\n }\n}", "title": "" }, { "docid": "c925159ed07663f4b55e38a4ad59fe8b", "score": "0.672225", "text": "function toBinaryString(input) {\n /* munge input into a binary string */\n var t, ff, mx, scc, z;\n t = input || '';\n ff = [];\n mx = t.length;\n scc = String.fromCharCode;\n for (z = 0; z < mx; z++) {\n ff[z] = scc(t.charCodeAt(z) & 255);\n }\n return ff.join('');\n }", "title": "" }, { "docid": "8b6bfd0d38a6c6b8b01d83eee85ea6e7", "score": "0.6701723", "text": "function convertir_binario(valor){\n \t\tvar array = [];\n \t\tvar numeros = valor.split(\"\");\n \t\tvar entero = 0;\n \t\tvar contador = 0;\n \t\tfor(var i = numeros.length-1; i>=0;i--){\n \t\t\tif(numeros[i] == 0){\n \t\t\t\tarray[i] = 0;\n \t\t\t}\n \t\t\telse{\n \t\t\t\tarray[i] = Math.pow(2,contador);\n \t\t\t}\n \t\t\tcontador++;\n \t\t}\n \t\tfor(var a = 0; a < array.length; a++){\n \t\t\tentero += array[a];\n \t\t}\n \t\treturn entero;\n \t}", "title": "" }, { "docid": "97a0c14c81a700d3cb35afde968d819a", "score": "0.66905373", "text": "function getBinary(num) {\n if (num === 0) return 0;\n else return (num % 2) + 10 * getBinary(Math.floor(num / 2));\n}", "title": "" }, { "docid": "ecc1c4ed02bbabd0678ef435ae285c9e", "score": "0.66886365", "text": "function binarioParaInteger(bin){\n\n return parseInt(bin,2);\n\n}", "title": "" }, { "docid": "58c437ac79de76639760059645da2598", "score": "0.6684728", "text": "function fakeBin(x){\r\n var str = x; \r\n res = []; \r\n for (var i = 0, len = str.length; i < len; i += 1) { \r\n (str.charAt(i) < 5) ? res.push(\"0\") : res.push(\"1\")\r\n } \r\n return res.join('');\r\n}", "title": "" }, { "docid": "608ad12f7ac1cb760800fc807974a258", "score": "0.6663133", "text": "function binary(num) {\n // base case\n if (num < 1) {\n return '';\n } else {\n return binary(num / 2) + Math.floor(num % 2);\n }\n}", "title": "" }, { "docid": "0afc506be8570b75fa20e5f3801491bc", "score": "0.66418827", "text": "function rstr2binb(input)\r\n{\r\n var output = Array(input.length >> 2);\r\n for(var i = 0; i < output.length; i++)\r\n output[i] = 0;\r\n for(var i = 0; i < input.length * 8; i += 8)\r\n output[i>>5] |= (input.charCodeAt(i / 8) & 0xFF) << (24 - i % 32);\r\n return output;\r\n}", "title": "" }, { "docid": "a3ed8751094793442b224ec282627688", "score": "0.66397214", "text": "function fakeBin(x){\n return x.replace(/[0-4]/g, 0).replace(/[5-9]/g, 1);\n}", "title": "" }, { "docid": "29dbc5268732de753bdf4b1af593ecf6", "score": "0.6636892", "text": "function ascToBin(text) {\n var length = text.length,\n output = [];\n for (var i = 0;i < length; i++) {\n var bin = text[i].charCodeAt().toString(2);\n output.push(Array(8-bin.length+1).join(\"0\") + bin);\n }\n document.getElementById('bin').value = output;\n}", "title": "" }, { "docid": "e345596383fa2a11f9796287ce4d811e", "score": "0.65821224", "text": "function intToBin(int) {\n let rem;\n let remstack = [];\n let output = [];\n\n // Create stack of divideBy2 remainders\n while (int > 0) {\n rem = int % 2;\n int = floor(int / 2);\n // console.log(rem);\n remstack.push(rem);\n }\n\n // pad the output with zeros to make up an 8-bit output\n for ( let i = 0; i < 8 - remstack.length; i++) {\n output.push(0);\n }\n\n while (remstack.length > 0) {\n output.push(remstack.pop());\n\n }\n // console.log(output);\n return(output);\n}", "title": "" }, { "docid": "4268c7303476d6db8de1af0637c375fa", "score": "0.6579689", "text": "function fakeBin(x){\n\n let bin = []\n let param = x.split('')\n\n for (i = 0; i < param.length; i++){\n if (param[i] > 4){bin.push(1)}\n else if (param[i] < 5){bin.push(0)}\n }\n\n console.log(bin)\n console.log(param)\n\n let ans = bin.join('');\n return ans;\n\n}", "title": "" }, { "docid": "ff9a0eee34b6d0307c58a9597005f5c7", "score": "0.65775275", "text": "function problem5() {\n var problem5Input = document.getElementById('problem5').value;\n var binaryNumber = parseInt(problem5Input).toString(2).padLeft(16, '0');\n\n if (!isNaN(problem5Input) && problem5Input % 1 === 0 && problem5Input !== '') {\n var binaryInput = problem5Input.toString,\n thirdBit = (problem5Input >> 3) & 1;\n document.getElementById('pr5result').innerHTML =\n 'Result: Binary representation of ' + problem5Input + ': ' + binaryNumber + '. Third bit: ' + thirdBit;\n console.log('Problem 5: Binary representation of ' + problem5Input + ': ' + binaryNumber + '. Third bit: ' + thirdBit);\n } else {\n document.getElementById('pr5result').innerHTML =\n 'Input is not an integer!';\n }\n\n document.getElementById('problem5').value = '';\n}", "title": "" }, { "docid": "5e2918a0a52dd7573f2d183bb9a1adbe", "score": "0.65691173", "text": "function rstr2binb(input) {\r\n var output = Array(input.length >> 2);\r\n var i;\r\n for(i = 0; i < output.length; i++) {\r\n output[i] = 0;\r\n }\r\n for(i = 0; i < input.length * 8; i += 8) {\r\n output[i>>5] |= (input.charCodeAt(i / 8) & 0xFF) << (24 - i % 32);\r\n }\r\n return output;\r\n }", "title": "" }, { "docid": "e3c872c223eca2d7b6e46d7ffbe24e84", "score": "0.6569018", "text": "function makeBinary()\n\t\t{\n\t\t\tvar hexy;\n\t\t\thexy = document.getElementById(\"hexNum\").value;\n\n\t\t\tvar howBigIsHexy1 = hexy.length;\n\t\t\thexy = hexy.toLowerCase();\n\t\t\thexy = hexy.replace(/0/g,\"0000\");\n\t\t\thexy = hexy.replace(/1/g,\"0001\");\n\t\t\thexy = hexy.replace(/2/g,\"0010\");\n\t\t\thexy = hexy.replace(/3/g,\"0011\");\n\t\t\thexy = hexy.replace(/4/g,\"0100\");\n\t\t\thexy = hexy.replace(/5/g,\"0101\");\n\t\t\thexy = hexy.replace(/6/g,\"0110\");\n\t\t\thexy = hexy.replace(/7/g,\"0111\");\n\t\t\thexy = hexy.replace(/8/g,\"1000\");\n\t\t\thexy = hexy.replace(/9/g,\"1001\");\n\t\t\thexy = hexy.replace(/a/g,\"1010\");\n\t\t\thexy = hexy.replace(/b/g,\"1011\");\n\t\t\thexy = hexy.replace(/c/g,\"1100\");\n\t\t\thexy = hexy.replace(/d/g,\"1101\");\n\t\t\thexy = hexy.replace(/e/g,\"1110\");\n\t\t\thexy = hexy.replace(/f/g,\"1111\");\n\t\t\tvar howBigIsHexy2 = hexy.length;\n\t\t\tif(howBigIsHexy2 != howBigIsHexy1 * 4)\n\t\t\t{\n\t\t\t\thexy = \"Invalid input\";\n\t\t\t}\n\t\t\tdocument.getElementById(\"returnB\").innerHTML = hexy;\n\t\t}", "title": "" }, { "docid": "4a333f1beebb2631e236f544a074a98f", "score": "0.6554987", "text": "function fakeBin(x){\n return x.split(\"\").map(num => {\n if (num < 5) {\n return 0\n } else {\n return 1\n }\n }).join(\"\")\n}", "title": "" }, { "docid": "030ec11f56af5ed630643ddf083a33d1", "score": "0.654788", "text": "function rstr2binb(input)\n{\n var output = Array(input.length >> 2);\n for(var i = 0; i < output.length; i++)\n output[i] = 0;\n for(var i = 0; i < input.length * 8; i += 8)\n output[i>>5] |= (input.charCodeAt(i / 8) & 0xFF) << (24 - i % 32);\n return output;\n}", "title": "" }, { "docid": "030ec11f56af5ed630643ddf083a33d1", "score": "0.654788", "text": "function rstr2binb(input)\n{\n var output = Array(input.length >> 2);\n for(var i = 0; i < output.length; i++)\n output[i] = 0;\n for(var i = 0; i < input.length * 8; i += 8)\n output[i>>5] |= (input.charCodeAt(i / 8) & 0xFF) << (24 - i % 32);\n return output;\n}", "title": "" }, { "docid": "df127f42e05021c547bf40f6bcac8011", "score": "0.65397686", "text": "function convertToBinary(string) {\r\n out = \"\"\r\n for (let i = 0; i < string.length; i++) {\r\n out += \"0\".repeat(8 - string.charCodeAt(i).toString(2).length) + string.charCodeAt(i).toString(2)\r\n }\r\n return out\r\n}", "title": "" }, { "docid": "3dbc325d6dc38a214816eebe9e69fccb", "score": "0.65347695", "text": "function rstr2binb(input) {\n var i, l = input.length * 8, output = Array(input.length >> 2), lo = output.length;\n for (i = 0; i < lo; i+=1) {\n output[i] = 0;\n }\n for (i = 0; i < l; i += 8) {\n output[i>>5] |= (input.charCodeAt(i / 8) & 0xFF) << (24 - i % 32);\n }\n return output;\n }", "title": "" }, { "docid": "9dac6afc74d2e071e8027bd5068102ff", "score": "0.6526322", "text": "function make8bit(bb){\n var makeup = [\"0\", \"00\", \"000\", \"0000\", \"00000\", \"000000\", \"0000000\"];\n console.log(bb.length);\n if(bb.length < 8)\n {\n console.log(makeup[(8 - bb.length) - 1]);\n return makeup[(8 - bb.length) - 1]+bb;\n }\n else {\n return bb;\n }\n}", "title": "" }, { "docid": "08e8d28b98de5a39baf507b160a87d4f", "score": "0.65066254", "text": "function beautifulBinaryString(b) {\n\n let arr = [...b]\n let count = 0\n arr.forEach(function(value, index){\n if(arr[index] === '0' && arr[index+1] === '1' && arr[index+2] === '0'){\n //mutate the array\n arr[index+2] = '1'\n count++\n }\n })\n return count;\n}", "title": "" }, { "docid": "c61107f76047760acffe28b8e6d2d841", "score": "0.646475", "text": "function binaryToOctal(binaryNum){\n let binaryuserInput = splitAndReverse(binaryNum);\n let decimal = 0;\n let octo = \"\";\n for(let i = 0; i< binaryuserInput.length; i++){\n for(let j = 0; i<binaryuserInput.length && j<3; j++){\n let binaryNum = Number(binaryuserInput[i]);\n decimal += (Math.pow(2,j)*binaryNum);\n i++;\n }\n octo+= decimal;\n decimal =0 ;\n i--;\n }\n \n return reverse(octo);\n}", "title": "" }, { "docid": "422ef897160622c1990eb0821e3f19c7", "score": "0.645162", "text": "function toBinaryNumber(number) {\n var returning = new Array;\n if (number % 2 != 0) {\n returning[0] = 1;\n number -= 1;\n }\n\n while (number > 0) {\n i = 1;\n while (Math.pow(2, i) <= number) {\n if (Math.pow(2, (i + 1)) > number) {\n returning[i] = 1;\n number -= (Math.pow(2, i));\n break;\n }\n i++;\n }\n }\n\n for (var j=0; j < returning.length; j++) {\n if (returning[j] == null) {\n returning[j] = \"0\";\n } else {\n returning[j] = returning[j].toString();\n }\n }\n\n return parseInt(returning.reverse().join(\"\"));\n}", "title": "" }, { "docid": "5772b4b41e2c674baa110099d6a86f91", "score": "0.6446059", "text": "function decimal_to_binary(decimal){\n\tvar binary = new Array(8)\n\tfor (var i = binary.length - 1; i >= 0; i--) {\n\t \tbinary[i] = decimal%2;\n\t \tdecimal = parseInt(decimal/2);\n\t}\n return binary;\n}", "title": "" }, { "docid": "8eef69f883d55977670b13615b4e475d", "score": "0.64375657", "text": "function rstr2binb(input) {\n var output = Array(input.length >> 2);\n for (var i = 0; i < output.length; i++)\n output[i] = 0;\n for (var i = 0; i < input.length * 8; i += 8)\n output[i >> 5] |= (input.charCodeAt(i / 8) & 0xFF) << (24 - i % 32);\n return output;\n}", "title": "" }, { "docid": "69546375b1d4cb394261ff31e2800fe7", "score": "0.64369965", "text": "function baseTenToBinary(num) {\n var binaryString = \"\"\n\n while (num > 0) {\n\tbinaryString = (num % 2).toString() + binaryString\n\tnum = parseInt(num / 2)\n }\n\n return binaryString\n}", "title": "" }, { "docid": "c41250f6c66d7ce228b3a06769fe7bc5", "score": "0.6413781", "text": "function nextBinaryNumberwithSameOnesandZeros(number){\n let prevCount = 0;\n let binArr = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];\n //---convert number to binary number\n for(let num = number; num< 100000000; num++){\n let count = 0;\n let numberToCon = num;\n //let binaryArr = [];\n while(numberToCon !==0){\n let rem = numberToCon%2;\n if(rem === 1){\n count++;\n }\n //binaryArr.push(rem);\n numberToCon = Math.floor(numberToCon/2);\n }\n //console.log(prevCount,count,num);\n if(prevCount === count){\n console.log(num,count);\n break;\n }\n prevCount = count;\n }\n \n}", "title": "" }, { "docid": "9b2ab4e0e225608a1fc5540caed342f9", "score": "0.64127797", "text": "function hexToBinary(hexuserInput){\n let decimal = hexToDecimal(hexuserInput);\n let binary = decimalToBinary(decimal);\n let missingZeros = 4 - binary.length%4;\n if(missingZeros == 1){\n binary = \"0\"+binary;\n } else if(missingZeros == 2){\n binary = \"00\"+binary\n } else if(missingZeros == 3){\n binary = \"000\" + binary;\n }\n return binary;\n}", "title": "" }, { "docid": "764b4a5ac243c410175865f5dc2c6aca", "score": "0.6410652", "text": "function bin(obj) { \n return $builtin_base_convert_helper(obj, 2)\n}", "title": "" }, { "docid": "71b495f49e920d1dce64cf435e2fe1b7", "score": "0.6410353", "text": "function asciiToBin(){\n var char = document.getElementById(\"anyAscii\").value;\n var codes;\n var code = char.charCodeAt();\n var number = parseInt(code);\n dec = (number).toString(2);\n document.getElementById(\"resultAsciiBin\").innerHTML = dec;\n}", "title": "" }, { "docid": "6bc5ff544c44cd5a9bec5fea5f2ebb2c", "score": "0.6406189", "text": "function binary(array, idx) {\n var value = array[idx]; // If not a number we print 8 `?` to retain alignment but let user know that it was called on\n // wrong type.\n\n if (typeof value !== 'number') return '????????'; // We prefix 0s so that we have constant length number\n\n var text = '00000000' + value.toString(2);\n return text.substring(text.length - 8);\n }", "title": "" }, { "docid": "6bc5ff544c44cd5a9bec5fea5f2ebb2c", "score": "0.6406189", "text": "function binary(array, idx) {\n var value = array[idx]; // If not a number we print 8 `?` to retain alignment but let user know that it was called on\n // wrong type.\n\n if (typeof value !== 'number') return '????????'; // We prefix 0s so that we have constant length number\n\n var text = '00000000' + value.toString(2);\n return text.substring(text.length - 8);\n }", "title": "" }, { "docid": "f56458f1096f51f50a8a60537ffbba4c", "score": "0.64058286", "text": "function BinaryConverter(str){\n return parseInt(str, 2);\n}", "title": "" }, { "docid": "356bcc03aed0dd2aba906de3cc422c28", "score": "0.6404801", "text": "function octalToBinary(octaluserInput){\n let decimal = octalToDecimal(octaluserInput);\n return decimalToBinary(decimal);\n}", "title": "" }, { "docid": "5a5e1146e99d84b1ffeea40bd387762e", "score": "0.6402836", "text": "function rstr2binl(input)\r\n{\r\n var output = Array(input.length >> 2);\r\n for(var i = 0; i < output.length; i++)\r\n output[i] = 0;\r\n for(var i = 0; i < input.length * 8; i += 8)\r\n output[i>>5] |= (input.charCodeAt(i / 8) & 0xFF) << (i%32);\r\n return output;\r\n}", "title": "" }, { "docid": "91c54b6091caed995b5889decf6ecd54", "score": "0.6393138", "text": "function fakeBin(x){\n let array = x.split('')\n let nums = array.map(number => {\n if(Number(number) < 5){\n return \"0\"\n }else{\n return \"1\"\n }\n })\n let stringy = nums.join('')\n}", "title": "" }, { "docid": "69f84a040b70abf3d466b3e248350028", "score": "0.63896775", "text": "function decToBin(number) {\n let result = \"\";\n for (let i = 0; i < number; ) {\n if (number % 2 !== 0) {\n result = \"1\" + result;\n // console.log(result)\n // console.log(number)\n // return false;\n } else {\n result = \"0\" + result;\n // console.log(number)\n }\n number = Math.floor(number / 2);\n // console.log(number)\n }\n console.log(\n `hasil konversi angka ${number} ke bilangan biner adalah ${result}`\n );\n}", "title": "" }, { "docid": "6375b9f7f30f0be052276132d959d0b7", "score": "0.63802445", "text": "function beautifulBinaryString(b) {\n // Change last digit in any 010 combination\n\n let bArr = Array.from(b);\n let count = 0;\n\n if (bArr.length < 3) {\n return 0;\n }\n\n for (var i = 2; i < bArr.length; i++) {\n if (bArr[i - 2] === \"0\" && bArr[i - 1] === \"1\" && bArr[i] === \"0\") {\n bArr[i] = 1;\n count += 1;\n }\n }\n\n return count;\n}", "title": "" }, { "docid": "c8ea53f9c99f12c379400821024fe5ba", "score": "0.6366559", "text": "function byte2bits(a)\n {\n var tmp = \"\";\n for(var i = 128; i >= 1; i /= 2)\n tmp += a&i?'1':'0';\n return tmp;\n }", "title": "" }, { "docid": "a35c14fdceaa17d5315a4a4ad8fcc798", "score": "0.6366267", "text": "function fakeBin(x) {\n return x.split('').map((n) => n < 5 ? 0 : 1).join('');\n}", "title": "" }, { "docid": "7d8d3aa71b5a9a98b8f2fe6153b17355", "score": "0.6366037", "text": "function decToBin(decimal) {}", "title": "" }, { "docid": "c61af14742dfea144dccfd9e6ca3d4c8", "score": "0.63644505", "text": "function fakeBin2Dec(x){\n\tvar res = x.split('').map(x => {\n\t\treturn (x >= 5) ? 1 :0;\n\t});\n\tvar l = 1;\n\tconsole.log(\"Pseudo liczba binarna: \" + res.join(''));\n\tvar wag = res.reverse().map((x, ind) => Math.pow(2,ind));\n\tvar dec = res.map((x,ind) => (x==1) ? x = wag[ind] : 0);\n\tvar sum = dec.reduce((s,x) => s+x, 0);\n\treturn \"Jest rowna liczbie: \" +sum;\n}", "title": "" }, { "docid": "6dece601c96b9f2c16c6108d0af3b81d", "score": "0.63633287", "text": "function decCoefficientToBinaryString (x) {\n // Convert to string\n var a = x.d; // array with digits\n var r = a[0] + '';\n\n for (var i = 1; i < a.length; ++i) {\n var s = a[i] + '';\n for (var z = 7 - s.length; z--; ) {\n s = '0' + s;\n }\n\n r += s;\n }\n\n var j;\n for (j = r.length - 1; r.charAt(j) == '0'; --j);\n\n var xe = x.e;\n var str = r.slice(0, j + 1 || 1);\n var strL = str.length;\n if (xe > 0) {\n if (++xe > strL) {\n // Append zeros.\n for (xe -= strL; xe--; str += '0');\n } else if (xe < strL) {\n str = str.slice(0, xe) + '.' + str.slice(xe);\n }\n }\n\n // Convert from base 10 (decimal) to base 2\n var arr = [0];\n for (var i = 0; i < str.length; ) {\n for (var arrL = arr.length; arrL--; arr[arrL] *= 10);\n\n arr[0] += str.charAt(i++) << 0; // convert to int\n for (var j = 0; j < arr.length; ++j) {\n if (arr[j] > 1) {\n if (arr[j + 1] == null) {\n arr[j + 1] = 0;\n }\n\n arr[j + 1] += arr[j] >> 1;\n arr[j] &= 1;\n }\n }\n }\n\n return arr.reverse();\n}", "title": "" }, { "docid": "6dece601c96b9f2c16c6108d0af3b81d", "score": "0.63633287", "text": "function decCoefficientToBinaryString (x) {\n // Convert to string\n var a = x.d; // array with digits\n var r = a[0] + '';\n\n for (var i = 1; i < a.length; ++i) {\n var s = a[i] + '';\n for (var z = 7 - s.length; z--; ) {\n s = '0' + s;\n }\n\n r += s;\n }\n\n var j;\n for (j = r.length - 1; r.charAt(j) == '0'; --j);\n\n var xe = x.e;\n var str = r.slice(0, j + 1 || 1);\n var strL = str.length;\n if (xe > 0) {\n if (++xe > strL) {\n // Append zeros.\n for (xe -= strL; xe--; str += '0');\n } else if (xe < strL) {\n str = str.slice(0, xe) + '.' + str.slice(xe);\n }\n }\n\n // Convert from base 10 (decimal) to base 2\n var arr = [0];\n for (var i = 0; i < str.length; ) {\n for (var arrL = arr.length; arrL--; arr[arrL] *= 10);\n\n arr[0] += str.charAt(i++) << 0; // convert to int\n for (var j = 0; j < arr.length; ++j) {\n if (arr[j] > 1) {\n if (arr[j + 1] == null) {\n arr[j + 1] = 0;\n }\n\n arr[j + 1] += arr[j] >> 1;\n arr[j] &= 1;\n }\n }\n }\n\n return arr.reverse();\n}", "title": "" }, { "docid": "6dece601c96b9f2c16c6108d0af3b81d", "score": "0.63633287", "text": "function decCoefficientToBinaryString (x) {\n // Convert to string\n var a = x.d; // array with digits\n var r = a[0] + '';\n\n for (var i = 1; i < a.length; ++i) {\n var s = a[i] + '';\n for (var z = 7 - s.length; z--; ) {\n s = '0' + s;\n }\n\n r += s;\n }\n\n var j;\n for (j = r.length - 1; r.charAt(j) == '0'; --j);\n\n var xe = x.e;\n var str = r.slice(0, j + 1 || 1);\n var strL = str.length;\n if (xe > 0) {\n if (++xe > strL) {\n // Append zeros.\n for (xe -= strL; xe--; str += '0');\n } else if (xe < strL) {\n str = str.slice(0, xe) + '.' + str.slice(xe);\n }\n }\n\n // Convert from base 10 (decimal) to base 2\n var arr = [0];\n for (var i = 0; i < str.length; ) {\n for (var arrL = arr.length; arrL--; arr[arrL] *= 10);\n\n arr[0] += str.charAt(i++) << 0; // convert to int\n for (var j = 0; j < arr.length; ++j) {\n if (arr[j] > 1) {\n if (arr[j + 1] == null) {\n arr[j + 1] = 0;\n }\n\n arr[j + 1] += arr[j] >> 1;\n arr[j] &= 1;\n }\n }\n }\n\n return arr.reverse();\n}", "title": "" }, { "docid": "6dece601c96b9f2c16c6108d0af3b81d", "score": "0.63633287", "text": "function decCoefficientToBinaryString (x) {\n // Convert to string\n var a = x.d; // array with digits\n var r = a[0] + '';\n\n for (var i = 1; i < a.length; ++i) {\n var s = a[i] + '';\n for (var z = 7 - s.length; z--; ) {\n s = '0' + s;\n }\n\n r += s;\n }\n\n var j;\n for (j = r.length - 1; r.charAt(j) == '0'; --j);\n\n var xe = x.e;\n var str = r.slice(0, j + 1 || 1);\n var strL = str.length;\n if (xe > 0) {\n if (++xe > strL) {\n // Append zeros.\n for (xe -= strL; xe--; str += '0');\n } else if (xe < strL) {\n str = str.slice(0, xe) + '.' + str.slice(xe);\n }\n }\n\n // Convert from base 10 (decimal) to base 2\n var arr = [0];\n for (var i = 0; i < str.length; ) {\n for (var arrL = arr.length; arrL--; arr[arrL] *= 10);\n\n arr[0] += str.charAt(i++) << 0; // convert to int\n for (var j = 0; j < arr.length; ++j) {\n if (arr[j] > 1) {\n if (arr[j + 1] == null) {\n arr[j + 1] = 0;\n }\n\n arr[j + 1] += arr[j] >> 1;\n arr[j] &= 1;\n }\n }\n }\n\n return arr.reverse();\n}", "title": "" }, { "docid": "098de6551c09c4d9a16b9c2f9f368db9", "score": "0.63571376", "text": "function decCoefficientToBinaryString(x) {\n // Convert to string\n var a = x.d; // array with digits\n\n var r = a[0] + '';\n\n for (var i = 1; i < a.length; ++i) {\n var s = a[i] + '';\n\n for (var z = 7 - s.length; z--;) {\n s = '0' + s;\n }\n\n r += s;\n }\n\n var j = r.length;\n\n while (r.charAt(j) === '0') {\n j--;\n }\n\n var xe = x.e;\n var str = r.slice(0, j + 1 || 1);\n var strL = str.length;\n\n if (xe > 0) {\n if (++xe > strL) {\n // Append zeros.\n xe -= strL;\n\n while (xe--) {\n str += '0';\n }\n } else if (xe < strL) {\n str = str.slice(0, xe) + '.' + str.slice(xe);\n }\n } // Convert from base 10 (decimal) to base 2\n\n\n var arr = [0];\n\n for (var _i2 = 0; _i2 < str.length;) {\n var arrL = arr.length;\n\n while (arrL--) {\n arr[arrL] *= 10;\n }\n\n arr[0] += parseInt(str.charAt(_i2++)); // convert to int\n\n for (var _j = 0; _j < arr.length; ++_j) {\n if (arr[_j] > 1) {\n if (arr[_j + 1] === null || arr[_j + 1] === undefined) {\n arr[_j + 1] = 0;\n }\n\n arr[_j + 1] += arr[_j] >> 1;\n arr[_j] &= 1;\n }\n }\n }\n\n return arr.reverse();\n}", "title": "" }, { "docid": "098de6551c09c4d9a16b9c2f9f368db9", "score": "0.63571376", "text": "function decCoefficientToBinaryString(x) {\n // Convert to string\n var a = x.d; // array with digits\n\n var r = a[0] + '';\n\n for (var i = 1; i < a.length; ++i) {\n var s = a[i] + '';\n\n for (var z = 7 - s.length; z--;) {\n s = '0' + s;\n }\n\n r += s;\n }\n\n var j = r.length;\n\n while (r.charAt(j) === '0') {\n j--;\n }\n\n var xe = x.e;\n var str = r.slice(0, j + 1 || 1);\n var strL = str.length;\n\n if (xe > 0) {\n if (++xe > strL) {\n // Append zeros.\n xe -= strL;\n\n while (xe--) {\n str += '0';\n }\n } else if (xe < strL) {\n str = str.slice(0, xe) + '.' + str.slice(xe);\n }\n } // Convert from base 10 (decimal) to base 2\n\n\n var arr = [0];\n\n for (var _i2 = 0; _i2 < str.length;) {\n var arrL = arr.length;\n\n while (arrL--) {\n arr[arrL] *= 10;\n }\n\n arr[0] += parseInt(str.charAt(_i2++)); // convert to int\n\n for (var _j = 0; _j < arr.length; ++_j) {\n if (arr[_j] > 1) {\n if (arr[_j + 1] === null || arr[_j + 1] === undefined) {\n arr[_j + 1] = 0;\n }\n\n arr[_j + 1] += arr[_j] >> 1;\n arr[_j] &= 1;\n }\n }\n }\n\n return arr.reverse();\n}", "title": "" }, { "docid": "098de6551c09c4d9a16b9c2f9f368db9", "score": "0.63571376", "text": "function decCoefficientToBinaryString(x) {\n // Convert to string\n var a = x.d; // array with digits\n\n var r = a[0] + '';\n\n for (var i = 1; i < a.length; ++i) {\n var s = a[i] + '';\n\n for (var z = 7 - s.length; z--;) {\n s = '0' + s;\n }\n\n r += s;\n }\n\n var j = r.length;\n\n while (r.charAt(j) === '0') {\n j--;\n }\n\n var xe = x.e;\n var str = r.slice(0, j + 1 || 1);\n var strL = str.length;\n\n if (xe > 0) {\n if (++xe > strL) {\n // Append zeros.\n xe -= strL;\n\n while (xe--) {\n str += '0';\n }\n } else if (xe < strL) {\n str = str.slice(0, xe) + '.' + str.slice(xe);\n }\n } // Convert from base 10 (decimal) to base 2\n\n\n var arr = [0];\n\n for (var _i2 = 0; _i2 < str.length;) {\n var arrL = arr.length;\n\n while (arrL--) {\n arr[arrL] *= 10;\n }\n\n arr[0] += parseInt(str.charAt(_i2++)); // convert to int\n\n for (var _j = 0; _j < arr.length; ++_j) {\n if (arr[_j] > 1) {\n if (arr[_j + 1] === null || arr[_j + 1] === undefined) {\n arr[_j + 1] = 0;\n }\n\n arr[_j + 1] += arr[_j] >> 1;\n arr[_j] &= 1;\n }\n }\n }\n\n return arr.reverse();\n}", "title": "" }, { "docid": "e03951ace9e524aa87af9f0671f6c968", "score": "0.63550466", "text": "function rstr2binl(input)\n {\n var output = Array(input.length >> 2);\n for(var i = 0; i < output.length; i++)\n output[i] = 0;\n for(var i = 0; i < input.length * 8; i += 8)\n output[i>>5] |= (input.charCodeAt(i / 8) & 0xFF) << (i%32);\n return output;\n }", "title": "" }, { "docid": "450246a40dc42bdb4787d7187459e5f4", "score": "0.635155", "text": "function encodeBinary(input) {\n var output = \"\";\n var prefix = \"\";\n var number = 0;\n var base = 0; // Base of 2 left in buffer\n var pos = 0;\n var convert;\n var tmp;\n\n while (pos < input.length) {\n // Add character\n base += 8;\n tmp = input.charCodeAt(pos);\n\n if (tmp > 255) {\n throw new Error(\"Input with code point \" + tmp + \" out of range of 255 chars\");\n }\n\n number = (number << 8) + tmp;\n pos++;\n\n while (base >= 13) {\n // Get hi 13 bits to be extracted\n base -= 13;\n convert = number >>> base;\n\n // Convert hi 13 bits to string\n tmp = base91.encode(convert);\n output += tmp.length === 2 ? tmp : base91.encode(0) + tmp;\n\n // Subtract hi 13 bits from total\n number -= convert << base;\n }\n }\n\n // 1 or 2 characters in last bit?\n prefix = base > 8 ? \"-\" : \"\";\n\n // Last characters of encoder - reduce to single char if output is small enough\n if (base > 0 && base < 7) {\n number = number << (6 - base); // Fill with zeroes\n output += base91.encode(number);\n } else if (base > 0) {\n number = number << (13 - base); // Fill with zeroes\n output += base91.encode(number);\n }\n\n return prefix + output;\n}", "title": "" }, { "docid": "ed710dafde3431bebdc1be68d1333901", "score": "0.63491374", "text": "function rstr2binl(input) {\n var i\n var output = []\n output[(input.length >> 2) - 1] = undefined\n for (i = 0; i < output.length; i += 1) {\n output[i] = 0\n }\n var length8 = input.length * 8\n for (i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input.charCodeAt(i / 8) & 0xff) << (i % 32)\n }\n return output\n }", "title": "" }, { "docid": "c6d9e3c9551401b943ff878c014cdcc7", "score": "0.6348112", "text": "function ip_dec_to_bin(ip_array) {\n var bin_array = new Array(4);\n bin_array[0] = octet_dec_to_bin(ip_array[0]);\n bin_array[1] = octet_dec_to_bin(ip_array[1]);\n bin_array[2] = octet_dec_to_bin(ip_array[2]);\n bin_array[3] = octet_dec_to_bin(ip_array[3]);\n return bin_array[0] + bin_array[1] + bin_array[2] + bin_array[3];\n }", "title": "" }, { "docid": "5c7204066dccdc54463b59450fd77454", "score": "0.63435465", "text": "function fakeBin(x) {\n return x.split('').map(n => n < 5 ? 0 : 1).join('');\n}", "title": "" }, { "docid": "38ef432c9759e7fcfc6d591b26253c08", "score": "0.6334177", "text": "function octet_dec_to_bin(octet) {\n return parseInt(octet, 10).toString(2).padStart(8, 0);\n }", "title": "" }, { "docid": "0acc59986deb062cb8248acfab7e8e10", "score": "0.6332705", "text": "function toBinStr_old(bits) {\n var data = '';\n var pad = (bits.length % 8) ? (new Array(1 + 8 - (bits.length % 8))).join('0') : '';\n bits = pad + bits;\n for (var i = 0; i < bits.length; i += 8) {\n data += String.fromCharCode(parseInt(bits.substr(i, 8), 2));\n }\n return data;\n }", "title": "" }, { "docid": "b5694968f5184e4567e310ec96cf3d9b", "score": "0.6330226", "text": "function binary(array, idx) {\n const value = array[idx];\n // If not a number we print 8 `?` to retain alignment but let user know that it was called on\n // wrong type.\n if (typeof value !== 'number')\n return '????????';\n // We prefix 0s so that we have constant length number\n const text = '00000000' + value.toString(2);\n return text.substring(text.length - 8);\n}", "title": "" } ]
783fd5752dd2d8b7a46d0603d140cc64
when verb is "send", arg is a value when verb is "throw", arg is an exception
[ { "docid": "d426818005a702afd800a6b649b14b01", "score": "0.0", "text": "function continuer(verb, arg) {\n var result;\n\n // Until V8 3.19 / Chromium 29 is released, SpiderMonkey is the only\n // engine that has a deployed base of browsers that support generators.\n // However, SM's generators use the Python-inspired semantics of\n // outdated ES6 drafts. We would like to support ES6, but we'd also\n // like to make it possible to use generators in deployed browsers, so\n // we also support Python-style generators. At some point we can remove\n // this block.\n\n if (typeof StopIteration === \"undefined\") {\n // ES6 Generators\n try {\n result = generator[verb](arg);\n } catch (exception) {\n return reject(exception);\n }\n if (result.done) {\n return Q(result.value);\n } else {\n return when(result.value, callback, errback);\n }\n } else {\n // SpiderMonkey Generators\n // FIXME: Remove this case when SM does ES6 generators.\n try {\n result = generator[verb](arg);\n } catch (exception) {\n if (isStopIteration(exception)) {\n return Q(exception.value);\n } else {\n return reject(exception);\n }\n }\n return when(result, callback, errback);\n }\n }", "title": "" } ]
[ { "docid": "ebd804bc38a56405c6f541712089865a", "score": "0.6089511", "text": "function e(t,n,r){try{return{type:\"normal\",arg:t.call(n,r)}}catch(t){return{type:\"throw\",arg:t}}}", "title": "" }, { "docid": "52b3644d3c925e5fa4a31c1b0f35370c", "score": "0.58336383", "text": "function b(t, r, e) {\n try {\n return {\n type: \"normal\",\n arg: t.call(r, e)\n };\n } catch (t) {\n return {\n type: \"throw\",\n arg: t\n };\n }\n }", "title": "" }, { "docid": "81f95d6f76d303fd12c059756e3984b5", "score": "0.58020943", "text": "send() {}", "title": "" }, { "docid": "19db58decc65de7ba4e107938d45e22c", "score": "0.57599336", "text": "function a(t,e,i){try{return{type:\"normal\",arg:t.call(e,i)}}catch(t){return{type:\"throw\",arg:t}}}", "title": "" }, { "docid": "c1b5fc7c7e2cedb0e9f2e39fa2f9a4fe", "score": "0.5712002", "text": "function caml_raise_with_arg (tag, arg) { throw [0, tag, arg]; }", "title": "" }, { "docid": "a74d5eddea1a6e1235aeaefa7168c482", "score": "0.5606089", "text": "function tryCatch(fn, obj, arg) {\r\n try {\r\n return { type: \"normal\", arg: fn.call(obj, arg) };\r\n }\r\n catch (err) {\r\n return { type: \"throw\", arg: err };\r\n }\r\n }", "title": "" }, { "docid": "406d13009d82148170961b0221f911ca", "score": "0.5601237", "text": "function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }", "title": "" }, { "docid": "e2f01cd5d8fed9aa8239830854fe1dda", "score": "0.5600142", "text": "function tryCatch(fn,obj,arg){\ntry{\nreturn {type:\"normal\",arg:fn.call(obj,arg)};\n}catch(err){\nreturn {type:\"throw\",arg:err};\n}\n}", "title": "" }, { "docid": "bceef1ecaa4caf7bb3c0ccacbed8a6f9", "score": "0.5596698", "text": "function tryCatch(fn,obj,arg){try{return{type:\"normal\",arg:fn.call(obj,arg)};}catch(err){return{type:\"throw\",arg:err};}}", "title": "" }, { "docid": "bceef1ecaa4caf7bb3c0ccacbed8a6f9", "score": "0.5596698", "text": "function tryCatch(fn,obj,arg){try{return{type:\"normal\",arg:fn.call(obj,arg)};}catch(err){return{type:\"throw\",arg:err};}}", "title": "" }, { "docid": "bceef1ecaa4caf7bb3c0ccacbed8a6f9", "score": "0.5596698", "text": "function tryCatch(fn,obj,arg){try{return{type:\"normal\",arg:fn.call(obj,arg)};}catch(err){return{type:\"throw\",arg:err};}}", "title": "" }, { "docid": "9695d9c0b780f7541903dce75905f0ea", "score": "0.5579046", "text": "function tryCatch(fn, obj, arg) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\treturn { type: \"normal\", arg: fn.call(obj, arg) };\n\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\treturn { type: \"throw\", arg: err };\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "title": "" }, { "docid": "77721c325986ad16a74b5f1d259baaad", "score": "0.557843", "text": "function tryCatch(fn,obj,arg){try{return {type:\"normal\",arg:fn.call(obj,arg)};}catch(err) {return {type:\"throw\",arg:err};}}", "title": "" }, { "docid": "d553a9a8b01ac7a63bab0a983e8dc159", "score": "0.55685663", "text": "function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }", "title": "" }, { "docid": "d553a9a8b01ac7a63bab0a983e8dc159", "score": "0.55685663", "text": "function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }", "title": "" }, { "docid": "04fa3d16092ae1c3c678d599eb9c6596", "score": "0.5558523", "text": "emit(type, arg) {\n return this.#rpc.request(type, arg);\n }", "title": "" }, { "docid": "7862258461b721ef5008aaa7289f270f", "score": "0.55438477", "text": "function tryCatch(fn, obj, arg) {\n\t try {\n\t return { type: \"normal\", arg: fn.call(obj, arg) };\n\t } catch (err) {\n\t return { type: \"throw\", arg: err };\n\t }\n\t }", "title": "" }, { "docid": "7862258461b721ef5008aaa7289f270f", "score": "0.55438477", "text": "function tryCatch(fn, obj, arg) {\n\t try {\n\t return { type: \"normal\", arg: fn.call(obj, arg) };\n\t } catch (err) {\n\t return { type: \"throw\", arg: err };\n\t }\n\t }", "title": "" }, { "docid": "7862258461b721ef5008aaa7289f270f", "score": "0.55438477", "text": "function tryCatch(fn, obj, arg) {\n\t try {\n\t return { type: \"normal\", arg: fn.call(obj, arg) };\n\t } catch (err) {\n\t return { type: \"throw\", arg: err };\n\t }\n\t }", "title": "" }, { "docid": "7862258461b721ef5008aaa7289f270f", "score": "0.55438477", "text": "function tryCatch(fn, obj, arg) {\n\t try {\n\t return { type: \"normal\", arg: fn.call(obj, arg) };\n\t } catch (err) {\n\t return { type: \"throw\", arg: err };\n\t }\n\t }", "title": "" }, { "docid": "7862258461b721ef5008aaa7289f270f", "score": "0.55438477", "text": "function tryCatch(fn, obj, arg) {\n\t try {\n\t return { type: \"normal\", arg: fn.call(obj, arg) };\n\t } catch (err) {\n\t return { type: \"throw\", arg: err };\n\t }\n\t }", "title": "" }, { "docid": "7862258461b721ef5008aaa7289f270f", "score": "0.55438477", "text": "function tryCatch(fn, obj, arg) {\n\t try {\n\t return { type: \"normal\", arg: fn.call(obj, arg) };\n\t } catch (err) {\n\t return { type: \"throw\", arg: err };\n\t }\n\t }", "title": "" }, { "docid": "7862258461b721ef5008aaa7289f270f", "score": "0.55438477", "text": "function tryCatch(fn, obj, arg) {\n\t try {\n\t return { type: \"normal\", arg: fn.call(obj, arg) };\n\t } catch (err) {\n\t return { type: \"throw\", arg: err };\n\t }\n\t }", "title": "" }, { "docid": "7862258461b721ef5008aaa7289f270f", "score": "0.55438477", "text": "function tryCatch(fn, obj, arg) {\n\t try {\n\t return { type: \"normal\", arg: fn.call(obj, arg) };\n\t } catch (err) {\n\t return { type: \"throw\", arg: err };\n\t }\n\t }", "title": "" }, { "docid": "7862258461b721ef5008aaa7289f270f", "score": "0.55438477", "text": "function tryCatch(fn, obj, arg) {\n\t try {\n\t return { type: \"normal\", arg: fn.call(obj, arg) };\n\t } catch (err) {\n\t return { type: \"throw\", arg: err };\n\t }\n\t }", "title": "" }, { "docid": "7862258461b721ef5008aaa7289f270f", "score": "0.55438477", "text": "function tryCatch(fn, obj, arg) {\n\t try {\n\t return { type: \"normal\", arg: fn.call(obj, arg) };\n\t } catch (err) {\n\t return { type: \"throw\", arg: err };\n\t }\n\t }", "title": "" }, { "docid": "7862258461b721ef5008aaa7289f270f", "score": "0.55438477", "text": "function tryCatch(fn, obj, arg) {\n\t try {\n\t return { type: \"normal\", arg: fn.call(obj, arg) };\n\t } catch (err) {\n\t return { type: \"throw\", arg: err };\n\t }\n\t }", "title": "" }, { "docid": "7862258461b721ef5008aaa7289f270f", "score": "0.55438477", "text": "function tryCatch(fn, obj, arg) {\n\t try {\n\t return { type: \"normal\", arg: fn.call(obj, arg) };\n\t } catch (err) {\n\t return { type: \"throw\", arg: err };\n\t }\n\t }", "title": "" }, { "docid": "7862258461b721ef5008aaa7289f270f", "score": "0.55438477", "text": "function tryCatch(fn, obj, arg) {\n\t try {\n\t return { type: \"normal\", arg: fn.call(obj, arg) };\n\t } catch (err) {\n\t return { type: \"throw\", arg: err };\n\t }\n\t }", "title": "" }, { "docid": "7862258461b721ef5008aaa7289f270f", "score": "0.55438477", "text": "function tryCatch(fn, obj, arg) {\n\t try {\n\t return { type: \"normal\", arg: fn.call(obj, arg) };\n\t } catch (err) {\n\t return { type: \"throw\", arg: err };\n\t }\n\t }", "title": "" }, { "docid": "7862258461b721ef5008aaa7289f270f", "score": "0.55438477", "text": "function tryCatch(fn, obj, arg) {\n\t try {\n\t return { type: \"normal\", arg: fn.call(obj, arg) };\n\t } catch (err) {\n\t return { type: \"throw\", arg: err };\n\t }\n\t }", "title": "" }, { "docid": "7862258461b721ef5008aaa7289f270f", "score": "0.55438477", "text": "function tryCatch(fn, obj, arg) {\n\t try {\n\t return { type: \"normal\", arg: fn.call(obj, arg) };\n\t } catch (err) {\n\t return { type: \"throw\", arg: err };\n\t }\n\t }", "title": "" }, { "docid": "7862258461b721ef5008aaa7289f270f", "score": "0.55438477", "text": "function tryCatch(fn, obj, arg) {\n\t try {\n\t return { type: \"normal\", arg: fn.call(obj, arg) };\n\t } catch (err) {\n\t return { type: \"throw\", arg: err };\n\t }\n\t }", "title": "" }, { "docid": "7862258461b721ef5008aaa7289f270f", "score": "0.55438477", "text": "function tryCatch(fn, obj, arg) {\n\t try {\n\t return { type: \"normal\", arg: fn.call(obj, arg) };\n\t } catch (err) {\n\t return { type: \"throw\", arg: err };\n\t }\n\t }", "title": "" }, { "docid": "7862258461b721ef5008aaa7289f270f", "score": "0.55438477", "text": "function tryCatch(fn, obj, arg) {\n\t try {\n\t return { type: \"normal\", arg: fn.call(obj, arg) };\n\t } catch (err) {\n\t return { type: \"throw\", arg: err };\n\t }\n\t }", "title": "" }, { "docid": "7862258461b721ef5008aaa7289f270f", "score": "0.55438477", "text": "function tryCatch(fn, obj, arg) {\n\t try {\n\t return { type: \"normal\", arg: fn.call(obj, arg) };\n\t } catch (err) {\n\t return { type: \"throw\", arg: err };\n\t }\n\t }", "title": "" }, { "docid": "7862258461b721ef5008aaa7289f270f", "score": "0.55438477", "text": "function tryCatch(fn, obj, arg) {\n\t try {\n\t return { type: \"normal\", arg: fn.call(obj, arg) };\n\t } catch (err) {\n\t return { type: \"throw\", arg: err };\n\t }\n\t }", "title": "" }, { "docid": "7862258461b721ef5008aaa7289f270f", "score": "0.55438477", "text": "function tryCatch(fn, obj, arg) {\n\t try {\n\t return { type: \"normal\", arg: fn.call(obj, arg) };\n\t } catch (err) {\n\t return { type: \"throw\", arg: err };\n\t }\n\t }", "title": "" }, { "docid": "7862258461b721ef5008aaa7289f270f", "score": "0.55438477", "text": "function tryCatch(fn, obj, arg) {\n\t try {\n\t return { type: \"normal\", arg: fn.call(obj, arg) };\n\t } catch (err) {\n\t return { type: \"throw\", arg: err };\n\t }\n\t }", "title": "" }, { "docid": "7862258461b721ef5008aaa7289f270f", "score": "0.55438477", "text": "function tryCatch(fn, obj, arg) {\n\t try {\n\t return { type: \"normal\", arg: fn.call(obj, arg) };\n\t } catch (err) {\n\t return { type: \"throw\", arg: err };\n\t }\n\t }", "title": "" }, { "docid": "7862258461b721ef5008aaa7289f270f", "score": "0.55438477", "text": "function tryCatch(fn, obj, arg) {\n\t try {\n\t return { type: \"normal\", arg: fn.call(obj, arg) };\n\t } catch (err) {\n\t return { type: \"throw\", arg: err };\n\t }\n\t }", "title": "" }, { "docid": "7862258461b721ef5008aaa7289f270f", "score": "0.55438477", "text": "function tryCatch(fn, obj, arg) {\n\t try {\n\t return { type: \"normal\", arg: fn.call(obj, arg) };\n\t } catch (err) {\n\t return { type: \"throw\", arg: err };\n\t }\n\t }", "title": "" }, { "docid": "7862258461b721ef5008aaa7289f270f", "score": "0.55438477", "text": "function tryCatch(fn, obj, arg) {\n\t try {\n\t return { type: \"normal\", arg: fn.call(obj, arg) };\n\t } catch (err) {\n\t return { type: \"throw\", arg: err };\n\t }\n\t }", "title": "" }, { "docid": "7862258461b721ef5008aaa7289f270f", "score": "0.55438477", "text": "function tryCatch(fn, obj, arg) {\n\t try {\n\t return { type: \"normal\", arg: fn.call(obj, arg) };\n\t } catch (err) {\n\t return { type: \"throw\", arg: err };\n\t }\n\t }", "title": "" }, { "docid": "7862258461b721ef5008aaa7289f270f", "score": "0.55438477", "text": "function tryCatch(fn, obj, arg) {\n\t try {\n\t return { type: \"normal\", arg: fn.call(obj, arg) };\n\t } catch (err) {\n\t return { type: \"throw\", arg: err };\n\t }\n\t }", "title": "" }, { "docid": "7862258461b721ef5008aaa7289f270f", "score": "0.55438477", "text": "function tryCatch(fn, obj, arg) {\n\t try {\n\t return { type: \"normal\", arg: fn.call(obj, arg) };\n\t } catch (err) {\n\t return { type: \"throw\", arg: err };\n\t }\n\t }", "title": "" }, { "docid": "7862258461b721ef5008aaa7289f270f", "score": "0.55438477", "text": "function tryCatch(fn, obj, arg) {\n\t try {\n\t return { type: \"normal\", arg: fn.call(obj, arg) };\n\t } catch (err) {\n\t return { type: \"throw\", arg: err };\n\t }\n\t }", "title": "" }, { "docid": "7862258461b721ef5008aaa7289f270f", "score": "0.55438477", "text": "function tryCatch(fn, obj, arg) {\n\t try {\n\t return { type: \"normal\", arg: fn.call(obj, arg) };\n\t } catch (err) {\n\t return { type: \"throw\", arg: err };\n\t }\n\t }", "title": "" }, { "docid": "7862258461b721ef5008aaa7289f270f", "score": "0.55438477", "text": "function tryCatch(fn, obj, arg) {\n\t try {\n\t return { type: \"normal\", arg: fn.call(obj, arg) };\n\t } catch (err) {\n\t return { type: \"throw\", arg: err };\n\t }\n\t }", "title": "" }, { "docid": "7862258461b721ef5008aaa7289f270f", "score": "0.55438477", "text": "function tryCatch(fn, obj, arg) {\n\t try {\n\t return { type: \"normal\", arg: fn.call(obj, arg) };\n\t } catch (err) {\n\t return { type: \"throw\", arg: err };\n\t }\n\t }", "title": "" }, { "docid": "7862258461b721ef5008aaa7289f270f", "score": "0.55438477", "text": "function tryCatch(fn, obj, arg) {\n\t try {\n\t return { type: \"normal\", arg: fn.call(obj, arg) };\n\t } catch (err) {\n\t return { type: \"throw\", arg: err };\n\t }\n\t }", "title": "" }, { "docid": "7862258461b721ef5008aaa7289f270f", "score": "0.55438477", "text": "function tryCatch(fn, obj, arg) {\n\t try {\n\t return { type: \"normal\", arg: fn.call(obj, arg) };\n\t } catch (err) {\n\t return { type: \"throw\", arg: err };\n\t }\n\t }", "title": "" }, { "docid": "7862258461b721ef5008aaa7289f270f", "score": "0.55438477", "text": "function tryCatch(fn, obj, arg) {\n\t try {\n\t return { type: \"normal\", arg: fn.call(obj, arg) };\n\t } catch (err) {\n\t return { type: \"throw\", arg: err };\n\t }\n\t }", "title": "" }, { "docid": "7862258461b721ef5008aaa7289f270f", "score": "0.55438477", "text": "function tryCatch(fn, obj, arg) {\n\t try {\n\t return { type: \"normal\", arg: fn.call(obj, arg) };\n\t } catch (err) {\n\t return { type: \"throw\", arg: err };\n\t }\n\t }", "title": "" }, { "docid": "7862258461b721ef5008aaa7289f270f", "score": "0.55438477", "text": "function tryCatch(fn, obj, arg) {\n\t try {\n\t return { type: \"normal\", arg: fn.call(obj, arg) };\n\t } catch (err) {\n\t return { type: \"throw\", arg: err };\n\t }\n\t }", "title": "" }, { "docid": "7862258461b721ef5008aaa7289f270f", "score": "0.55438477", "text": "function tryCatch(fn, obj, arg) {\n\t try {\n\t return { type: \"normal\", arg: fn.call(obj, arg) };\n\t } catch (err) {\n\t return { type: \"throw\", arg: err };\n\t }\n\t }", "title": "" }, { "docid": "3f547488b92b51e3fc25aa48de2395ec", "score": "0.5530943", "text": "function _throw(opt) { throw 'Unexpected value' + opt ? `:${opt}` : ''; }", "title": "" }, { "docid": "fffe6b6618a0ddd8db865aa153105815", "score": "0.5515325", "text": "function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }", "title": "" }, { "docid": "1350ee600f5d597ed996f6ba30a6ffda", "score": "0.5511808", "text": "function tryCatch(fn, obj, arg) {\n try {\n return {\n type: \"normal\",\n arg: fn.call(obj, arg)\n };\n } catch (err) {\n return {\n type: \"throw\",\n arg: err\n };\n }\n }", "title": "" }, { "docid": "1350ee600f5d597ed996f6ba30a6ffda", "score": "0.5511808", "text": "function tryCatch(fn, obj, arg) {\n try {\n return {\n type: \"normal\",\n arg: fn.call(obj, arg)\n };\n } catch (err) {\n return {\n type: \"throw\",\n arg: err\n };\n }\n }", "title": "" }, { "docid": "1350ee600f5d597ed996f6ba30a6ffda", "score": "0.5511808", "text": "function tryCatch(fn, obj, arg) {\n try {\n return {\n type: \"normal\",\n arg: fn.call(obj, arg)\n };\n } catch (err) {\n return {\n type: \"throw\",\n arg: err\n };\n }\n }", "title": "" }, { "docid": "1350ee600f5d597ed996f6ba30a6ffda", "score": "0.5511808", "text": "function tryCatch(fn, obj, arg) {\n try {\n return {\n type: \"normal\",\n arg: fn.call(obj, arg)\n };\n } catch (err) {\n return {\n type: \"throw\",\n arg: err\n };\n }\n }", "title": "" }, { "docid": "1350ee600f5d597ed996f6ba30a6ffda", "score": "0.5511808", "text": "function tryCatch(fn, obj, arg) {\n try {\n return {\n type: \"normal\",\n arg: fn.call(obj, arg)\n };\n } catch (err) {\n return {\n type: \"throw\",\n arg: err\n };\n }\n }", "title": "" }, { "docid": "628df409a78b8ced64e2415b489f57fe", "score": "0.55104315", "text": "function tryCatch(fn, obj, arg) {\n try {\n return {type: 'normal', arg: fn.call(obj, arg)}\n } catch (err) {\n return {type: 'throw', arg: err}\n }\n }", "title": "" }, { "docid": "25470b09f443319a5e2c8d20c1ac28f0", "score": "0.54988587", "text": "function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }", "title": "" }, { "docid": "b6a65b956239c4f10ad98e1e98499744", "score": "0.5482868", "text": "function tryCatch(fn, obj, arg) {\r\n try {\r\n return {type: 'normal', arg: fn.call(obj, arg)}\r\n } catch (err) {\r\n return {type: 'throw', arg: err}\r\n }\r\n }", "title": "" }, { "docid": "5dc72286e624d1d2386e1aeba1765f2e", "score": "0.54799765", "text": "function tryCatch(fn, obj, arg) {\r\n try {\r\n return {\r\n type: \"normal\",\r\n arg: fn.call(obj, arg)\r\n };\r\n } catch (err) {\r\n return {\r\n type: \"throw\",\r\n arg: err\r\n };\r\n }\r\n }", "title": "" }, { "docid": "4f3bc9242fbbfaf54111e9461792a289", "score": "0.54630506", "text": "if (msg.sender != founder) {\r\n throw;\r\n }", "title": "" }, { "docid": "bfb5123c6d449671a389bac4ec52e012", "score": "0.5457409", "text": "function tryCatch(fn, obj, arg) {\n try {\n return {\n type: 'normal',\n arg: fn.call(obj, arg),\n };\n } catch (err) {\n return {\n type: 'throw',\n arg: err,\n };\n }\n }", "title": "" }, { "docid": "07a1f7f6a99f3a0127aaee81b5627603", "score": "0.5448019", "text": "function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }", "title": "" }, { "docid": "07a1f7f6a99f3a0127aaee81b5627603", "score": "0.5448019", "text": "function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }", "title": "" }, { "docid": "07a1f7f6a99f3a0127aaee81b5627603", "score": "0.5448019", "text": "function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }", "title": "" }, { "docid": "07a1f7f6a99f3a0127aaee81b5627603", "score": "0.5448019", "text": "function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }", "title": "" }, { "docid": "07a1f7f6a99f3a0127aaee81b5627603", "score": "0.5448019", "text": "function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }", "title": "" }, { "docid": "07a1f7f6a99f3a0127aaee81b5627603", "score": "0.5448019", "text": "function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }", "title": "" }, { "docid": "07a1f7f6a99f3a0127aaee81b5627603", "score": "0.5448019", "text": "function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }", "title": "" }, { "docid": "07a1f7f6a99f3a0127aaee81b5627603", "score": "0.5448019", "text": "function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }", "title": "" }, { "docid": "07a1f7f6a99f3a0127aaee81b5627603", "score": "0.5448019", "text": "function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }", "title": "" }, { "docid": "3b5afe245667826b722c640041399b2d", "score": "0.5446581", "text": "function tryCatch(fn, obj, arg) {\n try {\n return {\n type: \"normal\",\n arg: fn.call(obj, arg)\n };\n } catch (err) {\n return {\n type: \"throw\",\n arg: err\n };\n }\n }", "title": "" }, { "docid": "3e36a75e3049f30946df1950819a9b4a", "score": "0.54296756", "text": "function tryCatch(fn, obj, arg) {\n\t try {\n\t return {\n\t type: \"normal\",\n\t arg: fn.call(obj, arg)\n\t };\n\t } catch (err) {\n\t return {\n\t type: \"throw\",\n\t arg: err\n\t };\n\t }\n\t }", "title": "" }, { "docid": "5e354ed933db5d4fa2ad335e34715619", "score": "0.5427413", "text": "function tryCatch(fn, obj, arg) {\n\t\ttry {\n\t\t\treturn { type: \"normal\", arg: fn.call(obj, arg) };\n\t\t} catch (err) {\n\t\t\treturn { type: \"throw\", arg: err };\n\t\t}\n\t}", "title": "" }, { "docid": "bc5504a5e0273bdf69edde0deee3dff7", "score": "0.54268825", "text": "function tryCatch(fn, obj, arg) { // 60\n try { // 61\n return { type: \"normal\", arg: fn.call(obj, arg) }; // 62\n } catch (err) { // 63\n return { type: \"throw\", arg: err }; // 64\n } // 65\n } // 66", "title": "" }, { "docid": "07b8344b80deb60ffdb14d04dc2be0ca", "score": "0.5425569", "text": "function tryCatch(fn, obj, arg) {\n try {\n return {\n type: \"normal\",\n arg: fn.call(obj, arg)\n };\n } catch (err) {\n return {\n type: \"throw\",\n arg: err\n };\n }\n }", "title": "" }, { "docid": "07b8344b80deb60ffdb14d04dc2be0ca", "score": "0.5425569", "text": "function tryCatch(fn, obj, arg) {\n try {\n return {\n type: \"normal\",\n arg: fn.call(obj, arg)\n };\n } catch (err) {\n return {\n type: \"throw\",\n arg: err\n };\n }\n }", "title": "" }, { "docid": "07b8344b80deb60ffdb14d04dc2be0ca", "score": "0.5425569", "text": "function tryCatch(fn, obj, arg) {\n try {\n return {\n type: \"normal\",\n arg: fn.call(obj, arg)\n };\n } catch (err) {\n return {\n type: \"throw\",\n arg: err\n };\n }\n }", "title": "" }, { "docid": "07b8344b80deb60ffdb14d04dc2be0ca", "score": "0.5425569", "text": "function tryCatch(fn, obj, arg) {\n try {\n return {\n type: \"normal\",\n arg: fn.call(obj, arg)\n };\n } catch (err) {\n return {\n type: \"throw\",\n arg: err\n };\n }\n }", "title": "" }, { "docid": "07b8344b80deb60ffdb14d04dc2be0ca", "score": "0.5425569", "text": "function tryCatch(fn, obj, arg) {\n try {\n return {\n type: \"normal\",\n arg: fn.call(obj, arg)\n };\n } catch (err) {\n return {\n type: \"throw\",\n arg: err\n };\n }\n }", "title": "" }, { "docid": "07b8344b80deb60ffdb14d04dc2be0ca", "score": "0.5425569", "text": "function tryCatch(fn, obj, arg) {\n try {\n return {\n type: \"normal\",\n arg: fn.call(obj, arg)\n };\n } catch (err) {\n return {\n type: \"throw\",\n arg: err\n };\n }\n }", "title": "" }, { "docid": "f63647150775162c5a59bb55337546bb", "score": "0.5397553", "text": "function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }", "title": "" }, { "docid": "f63647150775162c5a59bb55337546bb", "score": "0.5397553", "text": "function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }", "title": "" }, { "docid": "f63647150775162c5a59bb55337546bb", "score": "0.5397553", "text": "function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }", "title": "" }, { "docid": "f63647150775162c5a59bb55337546bb", "score": "0.5397553", "text": "function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }", "title": "" }, { "docid": "f63647150775162c5a59bb55337546bb", "score": "0.5397553", "text": "function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }", "title": "" }, { "docid": "f63647150775162c5a59bb55337546bb", "score": "0.5397553", "text": "function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }", "title": "" }, { "docid": "f63647150775162c5a59bb55337546bb", "score": "0.5397553", "text": "function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }", "title": "" }, { "docid": "f63647150775162c5a59bb55337546bb", "score": "0.5397553", "text": "function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }", "title": "" }, { "docid": "f63647150775162c5a59bb55337546bb", "score": "0.5397553", "text": "function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }", "title": "" }, { "docid": "f63647150775162c5a59bb55337546bb", "score": "0.5397553", "text": "function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }", "title": "" }, { "docid": "f63647150775162c5a59bb55337546bb", "score": "0.5397553", "text": "function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }", "title": "" }, { "docid": "f63647150775162c5a59bb55337546bb", "score": "0.5397553", "text": "function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }", "title": "" }, { "docid": "f63647150775162c5a59bb55337546bb", "score": "0.5397553", "text": "function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }", "title": "" } ]
2a8d30714067ffc559d6463487a55d4a
Get back the cart header //
[ { "docid": "bdbde6a5b95b7002750507671c0c18e9", "score": "0.5431202", "text": "function cartHeader(callback) {\n jQuery.ajax({\n type: \"GET\",\n url: \"https://netlink.laurajanelle.com:444/nlhtml/custom/netlink.php?\",\n data: {\n request_id: \"APICARTH\",\n session_no: session_no\n },\n success: function (response) {\n console.log(response);\n hideSmallCart();\n cartheader = response.split(\"\\n\");\n \n if (cartheader.length >= 3) {\n \n cartHeaderFields = cartheader[1].split(\"|\");\n getTax(cartHeaderFields[7]);\n calculateShipping(cartHeaderFields[22], cartHeaderFields[19]);\n \n if (window.location.hash === \"#checkout\") {\n document.getElementById(\"billing-form-name\").value = cartHeaderFields[2].trim();\n document.getElementById(\"billing-form-email\").value = cartHeaderFields[17].trim();\n document.getElementById(\"billing-form-address\").value = cartHeaderFields[3].trim();\n document.getElementById(\"billing-form-address2\").value = cartHeaderFields[4].trim();\n document.getElementById(\"billing-form-address3\").value = cartHeaderFields[5].trim();\n document.getElementById(\"billing-form-city\").value = cartHeaderFields[6].trim();\n document.getElementById(\"billing-form-state\").value = cartHeaderFields[7].trim();\n document.getElementById(\"billing-form-zipcode\").value = cartHeaderFields[8].trim();\n document.getElementById(\"billing-form-phone\").value = cartHeaderFields[18].trim();\n document.getElementById(\"shipping-form-name\").value = cartHeaderFields[9].trim();\n document.getElementById(\"shipping-form-address\").value = cartHeaderFields[10].trim();\n document.getElementById(\"shipping-form-address2\").value = cartHeaderFields[11].trim();\n document.getElementById(\"shipping-form-address3\").value = cartHeaderFields[12].trim();\n document.getElementById(\"shipping-form-city\").value = cartHeaderFields[13].trim();\n document.getElementById(\"shipping-form-state\").value = cartHeaderFields[14].trim();\n document.getElementById(\"shipping-form-zipcode\").value = cartHeaderFields[15].trim();\n getTax(cartHeaderFields[7]);\n }\n if (window.location.hash === \"#dashboard\") {\n $(\"#default-billing-address\").html(cartHeaderFields[3].trim() + ' ' + cartHeaderFields[4].trim() + ' ' + cartHeaderFields[5].trim() + '<br>' + cartHeaderFields[6].trim() + ', ' + cartHeaderFields[7] + ' ' + cartHeaderFields[8].trim());\n $(\"#default-shipping-address\").html(cartHeaderFields[10].trim() + ' ' + cartHeaderFields[11].trim() + ' ' + cartHeaderFields[12].trim() + '<br>' + cartHeaderFields[13].trim() + ', ' + cartHeaderFields[14] + ' ' + cartHeaderFields[15].trim() + '<br>');\n }\n }\n },\n complete: function () {\n if (callback && typeof (callback) === \"function\") {\n callback();\n }\n updateTotals();\n }\n });\n}", "title": "" } ]
[ { "docid": "2dd3945c8618fab9dd96263a5eaa42f6", "score": "0.79553986", "text": "get cartHeader() { return $('#contents_wrapper > div.subheader');}", "title": "" }, { "docid": "20d447d921d6a29dcd93ce315576d9b9", "score": "0.73699707", "text": "getEmptyCartHeader() {\n this.cartLink.waitForDisplayed()\n this.cartLink.click()\n this.emptyCartHeader.waitForDisplayed()\n return this.emptyCartHeader.getText()\n }", "title": "" }, { "docid": "b6a94c018c596649dd3fedb0aee7aa6c", "score": "0.6918702", "text": "_onCartReceived() {\r\n this.logger.startEmpty();\r\n\r\n const { cart, spinner } = this.elements.header;\r\n \r\n cart.show();\r\n spinner.hide();\r\n }", "title": "" }, { "docid": "1219c20f0eafa104979313f341361fa0", "score": "0.66579986", "text": "_onCartGet() {\r\n this.logger.startEmpty();\r\n\r\n const { spinner } = this.elements.header;\r\n\r\n spinner.show();\r\n }", "title": "" }, { "docid": "7ce071f86d659d38da4a57e5bf5cd39f", "score": "0.66073734", "text": "function getCart() {\n return order_cart;\n }", "title": "" }, { "docid": "091ca6f65c05aa0233fd22c800d902a1", "score": "0.64213645", "text": "function getCart () {\n return cart\n}", "title": "" }, { "docid": "04d531ff99acac35bd95e894bc7ccab1", "score": "0.6417822", "text": "function checkoutSummary (cart) {\n}", "title": "" }, { "docid": "0db93745b8acd88d28129c57c6353c84", "score": "0.62318206", "text": "function displayCart(response) {\n // grab headers for table\n let headers = Object.keys(response.products[0]);\n\n // console.log(headers);\n\n // html variables to be inserted later\n let header_html = '<tr><th scope=\"col\">#</th>';\n let body_html = '';\n\n // write the html for table header\n for (let i = 0; i < headers.length; i++) {\n header_html += '<th scope=\"col\">' + headers[i] + '</th>';\n }\n\n // close header row\n header_html += '</tr>';\n\n // inserting header_html variable into table_head id\n $(\"#table_head\").html(header_html);\n\n //inserting body_html into table_body id\n $(\"#table_body\").html(body_html);\n}", "title": "" }, { "docid": "9b94ec6bff2785ab3ed451ff20009b31", "score": "0.6092494", "text": "getCartContent() {\n\t\t$.get(window.global.app.connector +'/cart', (r) => {\n\t\t\tlet i,\n\t\t\t\tdata,\n\t\t\t\ta = [],\n\t\t\t\tcounter = 0,\n\t\t\t\tcartCounter = this.els._linkCartContainer.find('.cart__counter');\n\n\t\t\tif (r === '' || r === null) {\n\t\t\t\tsessionStorage['cart'] = JSON.stringify(a);\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\tif (typeof r === 'string') {\n\t\t\t\t\tdata = JSON.parse(data);\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\tdata = r;\n\t\t\t\t}\n\n\t\t\t\tfor (i in data) {\n\t\t\t\t\ta.push({ id: i, count: data[i] });\n\t\t\t\t\tcounter += Number(data[i])\n\t\t\t\t}\n\n\t\t\t\tsessionStorage['cart'] = JSON.stringify(a);\n\t\t\t\tcartCounter.text(counter);\n\t\t\t}\n\t\t});\n\t}", "title": "" }, { "docid": "a98ca4f02da41f5a77325794d39b9964", "score": "0.6081763", "text": "generateHeaders() {\r\n for (let p in this.state.Products[0]) {\r\n this.state.headers.push(p);\r\n }\r\n }", "title": "" }, { "docid": "6cece75174d7801aae3ab25e3499c748", "score": "0.6074885", "text": "function getCartContents() {\n\t$.get('/cart_items.json', function(data) {\n\t\toutputCart(data);\n\t});\n}", "title": "" }, { "docid": "83cef03ecc97db482e2d60baebb1c9da", "score": "0.6043922", "text": "get getcartTitle() { return $('//*[@id=\"cart_title\"]')}", "title": "" }, { "docid": "8fe6ef620876047b32598565976cf053", "score": "0.60161376", "text": "function displayHeaderQtyOfProductInCart() {\n document.querySelector(\".cart span\").textContent = getTotalProductsInCart();\n}", "title": "" }, { "docid": "4b9148c37fab1d45ed3a05e246df95c1", "score": "0.59582466", "text": "getOrderPlacedheader() {\n this.orderPlacedHeader.waitForDisplayed()\n return this.orderPlacedHeader.getText()\n }", "title": "" }, { "docid": "7589dad390f6eea2f097c3197d7b3f89", "score": "0.59385735", "text": "function CartScreen() {\r\n /* passing screen title and routing paths to header */\r\n return (\r\n <div class=\"cartback\">\r\n <Header cart={true} title=\"CART\" link=\"/fullmenu\" /> <Cart />\r\n </div>\r\n );\r\n}", "title": "" }, { "docid": "d45882303c7c24b710c3bcbcbc136cff", "score": "0.59162647", "text": "get header() {return $('#header')}", "title": "" }, { "docid": "a9234f53b61288d2743b9703fb211613", "score": "0.5880874", "text": "function getCart()\n{\n\tvar user_id = checkIsLoggedIn();\n\n\turl = PREFIX.URL + \"getShoppingCart\";\n\tvar getData = JSON.stringify({\"user_id\": user_id});\n\tvar request = new XMLHttpRequest();\n\tvar response = null;\n\trequest.open(\"POST\", url, false);\n\trequest.setRequestHeader(\"Content-Type\", \"application/json; charset=UTF-8\");\n\n\t\trequest.onreadystatechange = function() {\n\t\t\tif (request.readyState == 4 && request.status == 200) {\n\t\t\t\tresponse = JSON.parse(request.responseText);\n\t\t\t\tconsole.log(response)\n\t\t\t};\n\t\t}\n\trequest.send(getData);\n\n\tvar payload = response[\"payload\"];\n\n\tshowCart(payload);\n\n}", "title": "" }, { "docid": "fa932987526e88da86e5d6daeabee37d", "score": "0.5870043", "text": "function viewCart () {\n if (cart.length === 0){\n console.log(\"Your shopping cart is empty.\");\n } else{\n var myNewArray = []\n var i = 0\n for (i = 0; i < cart.length; i++) {\n var cartItem = Object.keys (cart[i]);\n myNewArray.push (\" \" + cartItem + \" at $\" + cart[i][cartItem])\n }\n console.log (\"In your cart, you have\" + myNewArray + \".\")\n\n }\n\n }", "title": "" }, { "docid": "c6e606bff4b91c327cd37f75504fdc94", "score": "0.58649004", "text": "function getCartData(){\n\t\treturn JSON.parse(localStorage.getItem('cart-content'));\n\t}", "title": "" }, { "docid": "dd7d8d30d71a207f07636a53a7b00153", "score": "0.5813076", "text": "function getCart() {\n\tcreateCart();\n\tlet data = JSON.parse(localStorage.getItem(\"cart\"));\n\treturn data.sort();\n}", "title": "" }, { "docid": "d88f84f791bd51b8cd335525b65043ee", "score": "0.5808918", "text": "static get cartId() {\n return 1;\n }", "title": "" }, { "docid": "ff86ecfe07a8952f8f2d50876b88a8ee", "score": "0.58026665", "text": "function getOrderItems() {\n var cj_items = window.cj.cartItems;\n if (cj_items) {\n var hero = cj_items;\n var orderItems = {},\n doubles = trim(hero.substr(1).replace(/amp;/g,\"\")).split(\"&\");\n for (var i = 0, p; i < doubles.length; i++) {\n p = doubles[i].split('=');\n orderItems[ p[0] ] = p[1];\n }\n return orderItems;\n } else {\n return \"NOORDERITEMS\";\n }\n}", "title": "" }, { "docid": "fcc23ffe38e338ebb0eefea1feea798e", "score": "0.5794778", "text": "function getStringHeader () {\n\tvar html = \"\"\n\thtml += '<div class =\"ui-header ui-bar-a\" data-swatch=\"a\" data-theme=\"a\" data-form = \"ui-bar-a\" data-role = \"header\" role= \"banner\" data-add-back-btn=\"true\" data-rel=\"back\">'\n\thtml += '<a href=\"#home\" class= \"ui-btn-left ui-btn-corner-all ui-btn ui-icon-back ui-btn-icon-notext ui-shadow\" title=\"Back\" data-form = \"ui-icon\" data-role= \"button\" role= \"button\"></a>'\n\thtml += '<hi href=\"#home\" class = \"ui-title simpl_header\" tabindex = \"0\" role=\"heading\" aria-level = \"1\"><a href=\"#home\">SIMPL</a></h1>'\n\thtml += '<a href=\"#inbox\" class = \"ui-btn-right ui-btn-corner-all ui-btn ui-icon-mail ui-btn-icon-notext ui-shadow\" title=\"Inbox\" data-form=\"ui-icon\" data-role = \"button\" role= \"button\"></a>'\n\thtml += '</div>'\n\treturn html\n}", "title": "" }, { "docid": "9f66f310c06faea475595f1f3e4c1fc5", "score": "0.5792342", "text": "function ManageCart( ) {\r\n var iNumberOrdered = 0; //Number of products ordered\r\n var fTotal = 0; //Total cost of order\r\n var fTax = 0; //Tax amount\r\n var fShipping = 0; //Shipping amount\r\n var strTotal = \"\"; //Total cost formatted as money\r\n var strTax = \"\"; //Total tax formatted as money\r\n var strShipping = \"\"; //Total shipping formatted as money\r\n var strOutput = \"\"; //String to be written to page\r\n var bDisplay = true; //Whether to write string to the page (here for programmers)\r\n\r\n iNumberOrdered = GetCookie(\"NumberOrdered\");\r\n if ( iNumberOrdered == null )\r\n iNumberOrdered = 0;\r\n\r\n if ( bDisplay )\r\n strOutput = \"<TABLE CLASS=\\\"nopcart\\\"><TR>\" +\r\n \"<TD CLASS=\\\"nopheader\\\"><B>\"+strILabel+\"</B></TD>\" +\r\n \"<TD CLASS=\\\"nopheader\\\"><B>\"+strDLabel+\"</B></TD>\" +\r\n \"<TD CLASS=\\\"nopheader\\\"><B>\"+strQLabel+\"</B></TD>\" +\r\n \"<TD CLASS=\\\"nopheader\\\"><B>\"+strPLabel+\"</B></TD>\" +\r\n (DisplayShippingColumn?\"<TD CLASS=\\\"nopheader\\\"><B>\"+strSLabel+\"</B></TD>\":\"\") +\r\n \"<TD CLASS=\\\"nopheader\\\"><B>\"+strRLabel+\"</B></TD></TR>\";\r\n\r\n if ( iNumberOrdered == 0 ) {\r\n strOutput += \"<TR><TD COLSPAN=6 CLASS=\\\"nopentry\\\"><CENTER><BR><B>Your cart is empty</B><BR><BR></CENTER></TD></TR>\";\r\n }\r\n\r\n for ( i = 1; i <= iNumberOrdered; i++ ) {\r\n NewOrder = \"Order.\" + i;\r\n database = \"\";\r\n database = GetCookie(NewOrder);\r\n\r\n Token0 = database.indexOf(\"|\", 0);\r\n Token1 = database.indexOf(\"|\", Token0+1);\r\n Token2 = database.indexOf(\"|\", Token1+1);\r\n Token3 = database.indexOf(\"|\", Token2+1);\r\n Token4 = database.indexOf(\"|\", Token3+1);\r\n\r\n fields = new Array;\r\n fields[0] = database.substring( 0, Token0 ); // Product ID\r\n fields[1] = database.substring( Token0+1, Token1 ); // Quantity\r\n fields[2] = database.substring( Token1+1, Token2 ); // Price\r\n fields[3] = database.substring( Token2+1, Token3 ); // Product Name/Description\r\n fields[4] = database.substring( Token3+1, Token4 ); // Shipping Cost\r\n fields[5] = database.substring( Token4+1, database.length ); //Additional Information\r\n\r\n fTotal += (parseInt(fields[1]) * parseFloat(fields[2]) );\r\n fShipping += (parseInt(fields[1]) * parseFloat(fields[4]) );\r\n fTax = (fTotal * TaxRate);\r\n strTotal = moneyFormat(fTotal);\r\n strTax = moneyFormat(fTax);\r\n strShipping = moneyFormat(fShipping);\r\n\r\n if ( bDisplay ) {\r\n strOutput += \"<TR><TD CLASS=\\\"nopentry\\\">\" + fields[0] + \"</TD>\";\r\n\r\n if ( fields[5] == \"\" )\r\n strOutput += \"<TD CLASS=\\\"nopentry\\\">\" + fields[3] + \"</TD>\";\r\n else\r\n strOutput += \"<TD CLASS=\\\"nopentry\\\">\" + fields[3] + \" - <I>\"+ fields[5] + \"</I></TD>\";\r\n\r\n strOutput += \"<TD CLASS=\\\"nopentry\\\"><INPUT TYPE=TEXT NAME=Q SIZE=2 VALUE=\\\"\" + fields[1] + \"\\\" onChange=\\\"ChangeQuantity(\"+i+\", this.value);\\\"></TD>\";\r\n strOutput += \"<TD CLASS=\\\"nopentry\\\">\"+ MonetarySymbol + moneyFormat(fields[2]) + \"/ea</TD>\";\r\n\r\n if ( DisplayShippingColumn ) {\r\n if ( parseFloat(fields[4]) > 0 )\r\n strOutput += \"<TD CLASS=\\\"nopentry\\\">\"+ MonetarySymbol + moneyFormat(fields[4]) + \"/ea</TD>\";\r\n else\r\n strOutput += \"<TD CLASS=\\\"nopentry\\\">N/A</TD>\";\r\n }\r\n\r\n strOutput += \"<TD CLASS=\\\"nopentry\\\" ALIGN=CENTER><input type=button value=\\\" \"+strRButton+\" \\\" onClick=\\\"RemoveFromCart(\"+i+\")\\\" class=\\\"nopbutton\\\"></TD></TR>\";\r\n }\r\n\r\n if ( AppendItemNumToOutput ) {\r\n strFooter = i;\r\n } else {\r\n strFooter = \"\";\r\n }\r\n if ( HiddenFieldsToCheckout ) {\r\n strOutput += \"<input type=hidden name=\\\"\" + OutputItemId + strFooter + \"\\\" value=\\\"\" + fields[0] + \"\\\">\";\r\n strOutput += \"<input type=hidden name=\\\"\" + OutputItemQuantity + strFooter + \"\\\" value=\\\"\" + fields[1] + \"\\\">\";\r\n strOutput += \"<input type=hidden name=\\\"\" + OutputItemPrice + strFooter + \"\\\" value=\\\"\" + fields[2] + \"\\\">\";\r\n strOutput += \"<input type=hidden name=\\\"\" + OutputItemName + strFooter + \"\\\" value=\\\"\" + fields[3] + \"\\\">\";\r\n strOutput += \"<input type=hidden name=\\\"\" + OutputItemShipping + strFooter + \"\\\" value=\\\"\" + fields[4] + \"\\\">\";\r\n strOutput += \"<input type=hidden name=\\\"\" + OutputItemAddtlInfo + strFooter + \"\\\" value=\\\"\" + fields[5] + \"\\\">\";\r\n }\r\n\r\n }\r\n\r\n if ( bDisplay ) {\r\n strOutput += \"<TR><TD CLASS=\\\"noptotal\\\" COLSPAN=4><B>\"+strSUB+\"</B></TD>\";\r\n strOutput += \"<TD CLASS=\\\"noptotal\\\" COLSPAN=2><B>\" + MonetarySymbol + strTotal + \"</B></TD>\";\r\n strOutput += \"</TR>\";\r\n\r\n if ( DisplayShippingRow ) {\r\n strOutput += \"<TR><TD CLASS=\\\"noptotal\\\" COLSPAN=4><B>\"+strSHIP+\"</B></TD>\";\r\n strOutput += \"<TD CLASS=\\\"noptotal\\\" COLSPAN=2><B>\" + MonetarySymbol + strShipping + \"</B></TD>\";\r\n strOutput += \"</TR>\";\r\n }\r\n\r\n if ( DisplayTaxRow || TaxByRegion ) {\r\n if ( TaxByRegion ) {\r\n strOutput += \"<TR><TD CLASS=\\\"noptotal\\\" COLSPAN=4><B>\"+strTAX+\"</B></TD>\";\r\n strOutput += \"<TD CLASS=\\\"noptotal\\\" COLSPAN=2><B>\";\r\n strOutput += \"<input type=radio name=\\\"\"+OutputOrderTax+\"\\\" value=\\\"\" + strTax + \"\\\">\";\r\n strOutput += TaxablePrompt + \": \" + MonetarySymbol + strTax;\r\n strOutput += \"<BR><input type=radio name=\\\"\"+OutputOrderTax+\"\\\" value=\\\"0.00\\\">\";\r\n strOutput += NonTaxablePrompt + \": \" + MonetarySymbol + \"0.00\";\r\n strOutput += \"</B></TD>\";\r\n strOutput += \"</TR>\";\r\n } else {\r\n strOutput += \"<TR><TD CLASS=\\\"noptotal\\\" COLSPAN=4><B>\"+strTAX+\"</B></TD>\";\r\n strOutput += \"<TD CLASS=\\\"noptotal\\\" COLSPAN=2><B>\" + MonetarySymbol + strTax + \"</B></TD>\";\r\n strOutput += \"</TR>\";\r\n }\r\n }\r\n\r\n if ( !TaxByRegion ) {\r\n strOutput += \"<TR><TD CLASS=\\\"noptotal\\\" COLSPAN=4><B>\"+strTOT+\"</B></TD>\";\r\n strOutput += \"<TD CLASS=\\\"noptotal\\\" COLSPAN=2><B>\" + MonetarySymbol + moneyFormat((fTotal + fShipping + fTax)) + \"</B></TD>\";\r\n strOutput += \"</TR>\";\r\n }\r\n strOutput += \"</TABLE>\";\r\n\r\n if ( HiddenFieldsToCheckout ) {\r\n strOutput += \"<input type=hidden name=\\\"\"+OutputOrderSubtotal+\"\\\" value=\\\"\"+ MonetarySymbol + strTotal + \"\\\">\";\r\n strOutput += \"<input type=hidden name=\\\"\"+OutputOrderShipping+\"\\\" value=\\\"\"+ MonetarySymbol + strShipping + \"\\\">\";\r\n strOutput += \"<input type=hidden name=\\\"\"+OutputOrderTax+\"\\\" value=\\\"\"+ MonetarySymbol + strTax + \"\\\">\";\r\n strOutput += \"<input type=hidden name=\\\"\"+OutputOrderTotal+\"\\\" value=\\\"\"+ MonetarySymbol + moneyFormat((fTotal + fShipping + fTax)) + \"\\\">\";\r\n }\r\n }\r\n g_TotalCost = (fTotal + fShipping + fTax);\r\n\r\n document.write(strOutput);\r\n document.close();\r\n}", "title": "" }, { "docid": "f19347217cd5da70931552145eaef2e0", "score": "0.57685405", "text": "function getCartState() {\r\n return {\r\n information: PicInfoStore.getUserInfo(),\r\n //posting : PostsStore.getpost()\r\n // selectedProduct: ProductStore.getSelected(),\r\n // cartItems: CartStore.getCartItems(),\r\n // cartCount: CartStore.getCartCount(),\r\n // // cartTotal: CartStore.getCartTotal(),\r\n // cartVisible: CartStore.getCartVisible(),\r\n // //,user: CartStore.getUserLoggedIn() -> server request for logged in user data\r\n // mapMarkers: MapStore.getMarkers(),\r\n // mapCentre: MapStore.getCentre()\r\n };\r\n}", "title": "" }, { "docid": "7498a62b2c5a3931cbc9c3aca6f1b9fb", "score": "0.57627094", "text": "function viewCart(){\n const l = cart.length\n\n if (!l) {\n return console.log(\"Your shopping cart is empty.\")\n }\n\n const itemsAndPrices = []\n\n for (let i = 0; i < l; i++) {\n let itemAndPrice = cart[i]\n let item = Object.keys(itemAndPrice)[0]\n let price = itemAndPrice[item]\n\n itemsAndPrices.push(`${item} at \\$${price}`)\n }\n\n console.log(`In your cart, you have ${itemsAndPrices.join(', ')}.`)\n}", "title": "" }, { "docid": "3676dd7bac1c3194f60364770b6790d7", "score": "0.57535595", "text": "function displayCart()\r\n\t{\r\n\t\t$('.h-module-products-cart .h-module-products-cart-items').html(htmlCarts());\r\n\t}", "title": "" }, { "docid": "39f709ca57e13dbab9879191ff86a020", "score": "0.5744747", "text": "function renderCart() {\r\n loadCart();\r\n clearCart();\r\n showCart();\r\n}", "title": "" }, { "docid": "39f709ca57e13dbab9879191ff86a020", "score": "0.5744747", "text": "function renderCart() {\r\n loadCart();\r\n clearCart();\r\n showCart();\r\n}", "title": "" }, { "docid": "15f97bcc8c003224035ab9fcb9aa0eb3", "score": "0.570738", "text": "async function cartContent() {\r\n console.log(\"cart contents\");\r\n //ask for product details like quantity\r\n agent.add('Here are the items in your cart');\r\n await postUserMessages(agent.query);\r\n await postBotMessages('Here are the items in your cart');\r\n //TODO get product id\r\n let request = {\r\n method: 'GET',\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n 'x-access-token': token\r\n },\r\n redirect: 'follow'\r\n }\r\n await fetch('https://mysqlcs639.cs.wisc.edu/application/products', request);\r\n }", "title": "" }, { "docid": "2faccceb98f99633b2ae40b8a7e584dc", "score": "0.57029", "text": "function checkCart(){\n // format output of cart: GDTOP\n displayObj(cart);\n}", "title": "" }, { "docid": "85b09e02d2c0e383de183d75bc8c6a56", "score": "0.5702217", "text": "function renderCart() {\n loadCart();\n clearCart();\n showCart();\n}", "title": "" }, { "docid": "85b09e02d2c0e383de183d75bc8c6a56", "score": "0.5702217", "text": "function renderCart() {\n loadCart();\n clearCart();\n showCart();\n}", "title": "" }, { "docid": "85b09e02d2c0e383de183d75bc8c6a56", "score": "0.5702217", "text": "function renderCart() {\n loadCart();\n clearCart();\n showCart();\n}", "title": "" }, { "docid": "85b09e02d2c0e383de183d75bc8c6a56", "score": "0.5702217", "text": "function renderCart() {\n loadCart();\n clearCart();\n showCart();\n}", "title": "" }, { "docid": "85b09e02d2c0e383de183d75bc8c6a56", "score": "0.5702217", "text": "function renderCart() {\n loadCart();\n clearCart();\n showCart();\n}", "title": "" }, { "docid": "85b09e02d2c0e383de183d75bc8c6a56", "score": "0.5702217", "text": "function renderCart() {\n loadCart();\n clearCart();\n showCart();\n}", "title": "" }, { "docid": "85b09e02d2c0e383de183d75bc8c6a56", "score": "0.5702217", "text": "function renderCart() {\n loadCart();\n clearCart();\n showCart();\n}", "title": "" }, { "docid": "85b09e02d2c0e383de183d75bc8c6a56", "score": "0.5702217", "text": "function renderCart() {\n loadCart();\n clearCart();\n showCart();\n}", "title": "" }, { "docid": "85b09e02d2c0e383de183d75bc8c6a56", "score": "0.5702217", "text": "function renderCart() {\n loadCart();\n clearCart();\n showCart();\n}", "title": "" }, { "docid": "85b09e02d2c0e383de183d75bc8c6a56", "score": "0.5702217", "text": "function renderCart() {\n loadCart();\n clearCart();\n showCart();\n}", "title": "" }, { "docid": "85b09e02d2c0e383de183d75bc8c6a56", "score": "0.5702217", "text": "function renderCart() {\n loadCart();\n clearCart();\n showCart();\n}", "title": "" }, { "docid": "85b09e02d2c0e383de183d75bc8c6a56", "score": "0.5702217", "text": "function renderCart() {\n loadCart();\n clearCart();\n showCart();\n}", "title": "" }, { "docid": "85b09e02d2c0e383de183d75bc8c6a56", "score": "0.5702217", "text": "function renderCart() {\n loadCart();\n clearCart();\n showCart();\n}", "title": "" }, { "docid": "85b09e02d2c0e383de183d75bc8c6a56", "score": "0.5702217", "text": "function renderCart() {\n loadCart();\n clearCart();\n showCart();\n}", "title": "" }, { "docid": "85b09e02d2c0e383de183d75bc8c6a56", "score": "0.5702217", "text": "function renderCart() {\n loadCart();\n clearCart();\n showCart();\n}", "title": "" }, { "docid": "dda6235b7da9bf79e7c1fd8df5e15edc", "score": "0.5682429", "text": "function renderCart() {\n\n loadCart();\n clearCart();\n showCart();\n}", "title": "" }, { "docid": "d69fd130c957a1da3cc32f52e4157687", "score": "0.5676611", "text": "function handleCartOpen() {\n\treturn {\n\t\ttype: OPEN_CART,\n\t}\n}", "title": "" }, { "docid": "7c72dfb9c0d52afb9af051acaebfcc28", "score": "0.5673884", "text": "function renderShoppingcart(state) {\r\n return `\r\n <!-- cart -->\r\n <div class=\"cart-overlay\">\r\n <div class=\"cart\">\r\n <span class=\"close-cart\">\r\n <i class=\"fas fa-window-close\"></i>\r\n </span>\r\n <h2>your cart</h2>\r\n <div class=\"cart-content\">\r\n ${renderCartItem(appState)}\r\n </div>\r\n ${renderCartFooter(appState)}\r\n </div>\r\n </div>\r\n <!-- end of cart -->\r\n `;\r\n}", "title": "" }, { "docid": "750db29d76275e99369ea292fa120f8d", "score": "0.5652921", "text": "function getCart(){\n var x = document.getElementById(\"myCart\");\n if (x.style.display === \"none\") {\n\tx.style.display = \"block\";\n\tvar i;\n\tvar total = 0;\n\tvar display = document.getElementById(\"myCart\");\n\tdisplay.innerHTML = \"\";\n\t//generates a new <p> tag with the item's name, cost, and quantity \n\t//in the format \"name - cost X quantity\"\n\tfor(i = 0; i<cart.length;++i){\n\t\tvar item = cart[i];\n\t\tvar itemCost = moneyFormat(item.price);//formats price to US currency\n\t\tvar displayItem = \"<p>\" + item.name + '-' + itemCost + \" X \" + item.quantity + \"</p><br>\";\n\t\ttotal += item.price * item.quantity;\n\t\tdisplay.innerHTML += displayItem;\n\t}\n\t//adds total\n\ttotalCost = total;\n\t//displays total at bottom, and then generates button to go to checkout menu\n\tvar totalDisplay = \"<p>Total: \" + moneyFormat(total) + \"</p>\";\n\ttotalDisplay += \"<button onclick = checkOut()>Check Out</button>\"\n display.innerHTML += totalDisplay;\n } \n else {\n x.style.display = \"none\";\n }\t\n}", "title": "" }, { "docid": "3e42e3a9dad38ca706532b9a28b72aff", "score": "0.5651196", "text": "function getCartItemView() {\n return (\n cartItemsList.length ?\n (<>\n <h3 className=\"Information\">{appConstant.currentCart}</h3>\n <PaletteContainer\n colorList={cartItemsList}\n showDelete={true}\n handleClick={(color) => { removeFromCart({ variables: { colorInfo: color } }) }} />\n <h4>{appConstant.savePaletteInfo}</h4>\n <div className=\"SavePaletteClass\">\n <input ref={textBoxRef} placeholder=\"Color Palette Name\" type=\"text\" />\n <Button handleClick={(onSavePalette)} customStyle=\"ButtonforCart\">{appConstant.savePalette}</Button>\n <span style={{ margin: \"10px\" }}></span>\n <div className=\"UserMessage\">{userMessage}</div>\n </div>\n <hr className=\"HorizontalLine\" />\n </>) : (<h3 className=\"Information\">{appConstant.emptyCart}</h3>)\n )\n }", "title": "" }, { "docid": "30a4d6f33b2e888bf649e435be11dc1a", "score": "0.56508523", "text": "function CheckoutCart( ) {\r\n var iNumberOrdered = 0; //Number of products ordered\r\n var fTotal = 0; //Total cost of order\r\n var fTax = 0; //Tax amount\r\n var fShipping = 0; //Shipping amount\r\n var strTotal = \"\"; //Total cost formatted as money\r\n var strTax = \"\"; //Total tax formatted as money\r\n var strShipping = \"\"; //Total shipping formatted as money\r\n var strOutput = \"\"; //String to be written to page\r\n var bDisplay = true; //Whether to write string to the page (here for programmers)\r\n var strPP = \"\"; //Payment Processor Description Field\r\n\r\n iNumberOrdered = GetCookie(\"NumberOrdered\");\r\n if ( iNumberOrdered == null )\r\n iNumberOrdered = 0;\r\n\r\n if ( TaxByRegion ) {\r\n QueryString_Parse();\r\n fTax = parseFloat( QueryString( OutputOrderTax ) );\r\n strTax = moneyFormat(fTax);\r\n }\r\n\r\n if ( bDisplay )\r\n strOutput = \"<TABLE CLASS=\\\"nopcart\\\"><TR>\" +\r\n \"<TD CLASS=\\\"nopheader\\\"><B>\"+strILabel+\"</B></TD>\" +\r\n \"<TD CLASS=\\\"nopheader\\\"><B>\"+strDLabel+\"</B></TD>\" +\r\n \"<TD CLASS=\\\"nopheader\\\"><B>\"+strQLabel+\"</B></TD>\" +\r\n \"<TD CLASS=\\\"nopheader\\\"><B>\"+strPLabel+\"</B></TD>\" +\r\n (DisplayShippingColumn?\"<TD CLASS=\\\"nopheader\\\"><B>\"+strSLabel+\"</B></TD>\":\"\") +\r\n \"</TR>\";\r\n\r\n for ( i = 1; i <= iNumberOrdered; i++ ) {\r\n NewOrder = \"Order.\" + i;\r\n database = \"\";\r\n database = GetCookie(NewOrder);\r\n\r\n Token0 = database.indexOf(\"|\", 0);\r\n Token1 = database.indexOf(\"|\", Token0+1);\r\n Token2 = database.indexOf(\"|\", Token1+1);\r\n Token3 = database.indexOf(\"|\", Token2+1);\r\n Token4 = database.indexOf(\"|\", Token3+1);\r\n\r\n fields = new Array;\r\n fields[0] = database.substring( 0, Token0 ); // Product ID\r\n fields[1] = database.substring( Token0+1, Token1 ); // Quantity\r\n fields[2] = database.substring( Token1+1, Token2 ); // Price\r\n fields[3] = database.substring( Token2+1, Token3 ); // Product Name/Description\r\n fields[4] = database.substring( Token3+1, Token4 ); // Shipping Cost\r\n fields[5] = database.substring( Token4+1, database.length ); //Additional Information\r\n\r\n fTotal += (parseInt(fields[1]) * parseFloat(fields[2]) );\r\n fShipping += (parseInt(fields[1]) * parseFloat(fields[4]) );\r\n if ( !TaxByRegion ) fTax = (fTotal * TaxRate);\r\n strTotal = moneyFormat(fTotal);\r\n if ( !TaxByRegion ) strTax = moneyFormat(fTax);\r\n strShipping = moneyFormat(fShipping);\r\n\r\n if ( bDisplay ) {\r\n strOutput += \"<TR><TD CLASS=\\\"nopentry\\\">\" + fields[0] + \"</TD>\";\r\n\r\n if ( fields[5] == \"\" )\r\n strOutput += \"<TD CLASS=\\\"nopentry\\\">\" + fields[3] + \"</TD>\";\r\n else\r\n strOutput += \"<TD CLASS=\\\"nopentry\\\">\" + fields[3] + \" - <I>\"+ fields[5] + \"</I></TD>\";\r\n\r\n strOutput += \"<TD CLASS=\\\"nopentry\\\">\" + fields[1] + \"</TD>\";\r\n strOutput += \"<TD CLASS=\\\"nopentry\\\">\"+ MonetarySymbol + moneyFormat(fields[2]) + \"/ea</TD>\";\r\n\r\n if ( DisplayShippingColumn ) {\r\n if ( parseFloat(fields[4]) > 0 )\r\n strOutput += \"<TD CLASS=\\\"nopentry\\\">\"+ MonetarySymbol + moneyFormat(fields[4]) + \"/ea</TD>\";\r\n else\r\n strOutput += \"<TD CLASS=\\\"nopentry\\\">N/A</TD>\";\r\n }\r\n\r\n strOutput += \"</TR>\";\r\n }\r\n\r\n if ( AppendItemNumToOutput ) {\r\n strFooter = i;\r\n } else {\r\n strFooter = \"\";\r\n }\r\n if ( PaymentProcessor != '' ) {\r\n //Process description field for payment processors instead of hidden values.\r\n //Format Description of product as:\r\n // ID, Name, Qty X\r\n strPP += fields[0] + \", \" + fields[3];\r\n if ( fields[5] != \"\" )\r\n strPP += \" - \" + fields[5];\r\n strPP += \", Qty. \" + fields[1] + \"\\n\";\r\n } else {\r\n strOutput += \"<input type=hidden name=\\\"\" + OutputItemId + strFooter + \"\\\" value=\\\"\" + fields[0] + \"\\\">\";\r\n strOutput += \"<input type=hidden name=\\\"\" + OutputItemQuantity + strFooter + \"\\\" value=\\\"\" + fields[1] + \"\\\">\";\r\n strOutput += \"<input type=hidden name=\\\"\" + OutputItemPrice + strFooter + \"\\\" value=\\\"\" + fields[2] + \"\\\">\";\r\n strOutput += \"<input type=hidden name=\\\"\" + OutputItemName + strFooter + \"\\\" value=\\\"\" + fields[3] + \"\\\">\";\r\n strOutput += \"<input type=hidden name=\\\"\" + OutputItemShipping + strFooter + \"\\\" value=\\\"\" + fields[4] + \"\\\">\";\r\n strOutput += \"<input type=hidden name=\\\"\" + OutputItemAddtlInfo + strFooter + \"\\\" value=\\\"\" + fields[5] + \"\\\">\";\r\n }\r\n\r\n }\r\n\r\n if ( bDisplay ) {\r\n strOutput += \"<TR><TD CLASS=\\\"noptotal\\\" COLSPAN=3><B>\"+strSUB+\"</B></TD>\";\r\n strOutput += \"<TD CLASS=\\\"noptotal\\\" COLSPAN=2 ALIGN=RIGHT><B>\" + MonetarySymbol + strTotal + \"</B></TD>\";\r\n strOutput += \"</TR>\";\r\n\r\n if ( DisplayShippingRow ) {\r\n strOutput += \"<TR><TD CLASS=\\\"noptotal\\\" COLSPAN=3><B>\"+strSHIP+\"</B></TD>\";\r\n strOutput += \"<TD CLASS=\\\"noptotal\\\" COLSPAN=2 ALIGN=RIGHT><B>\" + MonetarySymbol + strShipping + \"</B></TD>\";\r\n strOutput += \"</TR>\";\r\n }\r\n\r\n if ( DisplayTaxRow || TaxByRegion ) {\r\n strOutput += \"<TR><TD CLASS=\\\"noptotal\\\" COLSPAN=3><B>\"+strTAX+\"</B></TD>\";\r\n strOutput += \"<TD CLASS=\\\"noptotal\\\" COLSPAN=2 ALIGN=RIGHT><B>\" + MonetarySymbol + strTax + \"</B></TD>\";\r\n strOutput += \"</TR>\";\r\n }\r\n\r\n strOutput += \"<TR><TD CLASS=\\\"noptotal\\\" COLSPAN=3><B>\"+strTOT+\"</B></TD>\";\r\n strOutput += \"<TD CLASS=\\\"noptotal\\\" COLSPAN=2 ALIGN=RIGHT><B>\" + MonetarySymbol + moneyFormat((fTotal + fShipping + fTax)) + \"</B></TD>\";\r\n strOutput += \"</TR>\";\r\n\r\n strOutput += \"</TABLE>\";\r\n\r\n\r\n if ( PaymentProcessor == 'an') {\r\n //Process this for Authorize.net WebConnect\r\n strOutput += \"<input type=hidden name=\\\"x_Version\\\" value=\\\"3.0\\\">\";\r\n strOutput += \"<input type=hidden name=\\\"x_Show_Form\\\" value=\\\"PAYMENT_FORM\\\">\";\r\n strOutput += \"<input type=hidden name=\\\"x_Description\\\" value=\\\"\"+ strPP + \"\\\">\";\r\n strOutput += \"<input type=hidden name=\\\"x_Amount\\\" value=\\\"\"+ moneyFormat((fTotal + fShipping + fTax)) + \"\\\">\";\r\n } else if ( PaymentProcessor == 'wp') {\r\n //Process this for WorldPay\r\n strOutput += \"<input type=hidden name=\\\"desc\\\" value=\\\"\"+ strPP + \"\\\">\";\r\n strOutput += \"<input type=hidden name=\\\"amount\\\" value=\\\"\"+ moneyFormat((fTotal + fShipping + fTax)) + \"\\\">\";\r\n } else if ( PaymentProcessor == 'lp') {\r\n //Process this for LinkPoint\r\n strOutput += \"<input type=hidden name=\\\"mode\\\" value=\\\"fullpay\\\">\";\r\n strOutput += \"<input type=hidden name=\\\"chargetotal\\\" value=\\\"\"+ moneyFormat((fTotal + fShipping + fTax)) + \"\\\">\";\r\n strOutput += \"<input type=hidden name=\\\"tax\\\" value=\\\"\"+ MonetarySymbol + strTax + \"\\\">\";\r\n strOutput += \"<input type=hidden name=\\\"subtotal\\\" value=\\\"\"+ MonetarySymbol + strTotal + \"\\\">\";\r\n strOutput += \"<input type=hidden name=\\\"shipping\\\" value=\\\"\"+ MonetarySymbol + strShipping + \"\\\">\";\r\n strOutput += \"<input type=hidden name=\\\"desc\\\" value=\\\"\"+ strPP + \"\\\">\";\r\n } else {\r\n strOutput += \"<input type=hidden name=\\\"\"+OutputOrderSubtotal+\"\\\" value=\\\"\"+ MonetarySymbol + strTotal + \"\\\">\";\r\n strOutput += \"<input type=hidden name=\\\"\"+OutputOrderShipping+\"\\\" value=\\\"\"+ MonetarySymbol + strShipping + \"\\\">\";\r\n strOutput += \"<input type=hidden name=\\\"\"+OutputOrderTax+\"\\\" value=\\\"\"+ MonetarySymbol + strTax + \"\\\">\";\r\n strOutput += \"<input type=hidden name=\\\"\"+OutputOrderTotal+\"\\\" value=\\\"\"+ MonetarySymbol + moneyFormat((fTotal + fShipping + fTax)) + \"\\\">\";\r\n }\r\n }\r\n\r\n document.write(strOutput);\r\n document.close();\r\n}", "title": "" }, { "docid": "31abf675cab4a1ff8895ed403ae12515", "score": "0.5639909", "text": "function shoppingCart() {\n let self = this;\n self.theme(F.config['theme']);\n let title = \"Carrito de compras\";\n\n try {\n if (self.query.id) {\n let query = 'select *, getCartItems(cartItems) as items from #' + self.query.id + ';';\n F.functions.query(query).then(function (response) {\n self.section('meta',\n '<meta name=\"title\" content=\"shoppingcart\" />'\n + '<meta name=\"description\" content=\"carrito de compras\" />'\n + '<meta name=\"keywords\" content=\"cart, shoppingcart\" />'\n + '<meta name=\"og:title\" content=\"shoppingcart\" />'\n + '<meta name=\"og:description\" content=\"carrito de compras\" />'\n );\n F.functions.view_response(self, \"shoppingcart\", 200, {cart: response[0] ? response[0] : {}, title: F.functions.build_title(title)});\n }).catch(function (error) {\n F.functions.sendCrash(error);\n F.functions.view_response(self, \"shoppingcart\", 400, {cart: {}, title: F.functions.build_title(title)});\n });\n } else {\n F.functions.view_response(self, \"shoppingcart\", 400, {cart: {}, title: F.functions.build_title(title)});\n }\n } catch (e) {\n F.functions.sendCrash(e);\n F.functions.view_response(self, 500, 500, {title: F.functions.build_title(title)});\n }\n}", "title": "" }, { "docid": "52222144aa3a67ff81d552fc46bf172a", "score": "0.5635191", "text": "function showCart() {\r\n cartBody.innerHTML = generateCartItemHtml(cart);\r\n cartQuantityb.innerHTML = cart.length;\r\n let total = 0;\r\n cart.forEach(item => {\r\n total += item.price;\r\n });\r\n cartTotal.innerHTML = format2(total, ' VND');\r\n}", "title": "" }, { "docid": "1462fa10749fb01ec76f84b29ed6c989", "score": "0.5629705", "text": "getCart() {\n return CartAPI.cartItems;\n }", "title": "" }, { "docid": "d466c21219f2657cdd43d4c0875b2c7d", "score": "0.56277776", "text": "function checkout (cart) {\n}", "title": "" }, { "docid": "ea77b27f49d9151668c9add96b8cda6c", "score": "0.56230986", "text": "function Header({ navigation, cartSize }) {\n\treturn (\n\t\t<HeaderView>\n\t\t\t<LogoButton onPress={() => navigation.navigate('Home')}>\n\t\t\t\t<LogoImage source={require('../../assets/images/Logo.png')} />\n\t\t\t</LogoButton>\n\t\t\t<CartButton onPress={() => navigation.navigate('Cart')}>\n\t\t\t\t<CartBadge>{cartSize}</CartBadge>\n\t\t\t\t<CartIcon name=\"basket\" color=\"#fff\" size={36} />\n\t\t\t</CartButton>\n\t\t</HeaderView>\n\t);\n}", "title": "" }, { "docid": "d7c7c848a3e1bd8559c1b5044a732ae4", "score": "0.56228375", "text": "function shoppingCart() { \n\nif(cart.length > 0) {\n\nconsole.log(cart.toString())\n\n} \n\n\nelse {\n console.log(\"There are no items in your cart\")\n\n\n}\n}", "title": "" }, { "docid": "012e6a3e9d1019b144e1f67cad97a4cd", "score": "0.5620538", "text": "getCartTotals() {\n return CartAPI.cartTotals();\n }", "title": "" }, { "docid": "2f56ee487e82f4553100737c629912f2", "score": "0.56119055", "text": "function getCart() {\n if (localStorage.getItem(\"cart\") === null) {\n console.log(\"no products in cart\");\n } else {\n cart = JSON.parse(localStorage.getItem(\"cart\")); // cart = localstorage cart\n }\n}", "title": "" }, { "docid": "a0a824bd08e6ee0abf3561e901cad141", "score": "0.5611525", "text": "function getCartCount() {\n // If we have a cart, count the number of items and populate\n if (sessionStorage.items) {\n var cartData = JSON.parse(sessionStorage.items);\n var keys = Object.keys(cartData);\n $('#cartCount span').html(keys.length);\n } else {\n // If there is no cart, we have no items in it.\n $('#cartCount span').html(0);\n }\n}", "title": "" }, { "docid": "8cd4c272d882202efcfb1f190fb6f190", "score": "0.5607488", "text": "function getCart() {\n return JSON.parse(localStorage.getItem(\"cart\"));\n}", "title": "" }, { "docid": "dfa96a9b072250bf81ee6810741f01af", "score": "0.5602944", "text": "function htheme_get_nav_cart_html(obj){\n\n var html = '';\n var count = 1;\n\n //LOOP EACH PRODUCT\n jQuery(obj.cart.reverse()).each(function(index, element){\n\n if(count < 4){\n html += '<div class=\"htheme_box_product\">';\n html += '<a href=\"'+element.link+'\" class=\"htheme_box_product_image\" style=\"background-image:url('+element.image+');\"></a>';\n html += '<a href=\"'+element.link+'\" class=\"htheme_box_product_info\">';\n html += '<div class=\"htheme_vertical_align\">';\n html += '<span class=\"htheme_box_product_heading\">'+element.title+'</span>';\n var item = 'item';\n if(element.quantity > 1){\n item = 'items'\n }\n html += '<span class=\"htheme_box_product_sub\">' + element.qty + ' '+ element.quantity + ' - ' +element.price_html+'</span>';\n html += '</div>';\n html += '</a>';\n html += '<div class=\"htheme_box_product_remove htheme_remove_nav_box\" data-product-id=\"'+element.id+'\">';\n html += '<div class=\"htheme_vertical_align\"></div>';\n html += '</div>';\n html += '<div class=\"htheme_box_scaler\"></div>';\n html += '</div>';\n }\n count++;\n\n });\n\n if(count <= 4){\n jQuery('.htheme_qty_remove').hide();\n } else {\n jQuery('.htheme_qty_remove').show();\n }\n\n jQuery('.htheme_box_price span').html(obj.total);\n\n jQuery('.htheme_box_cart_items').html(html);\n\n //ENABLE REMOVE CART\n htheme_remove_cart_item();\n\n}", "title": "" }, { "docid": "8f48e17a958cf40ebfc46f803d5df868", "score": "0.5595199", "text": "readHeader()\n {\n $('h1').after('<p> - es spielt <b>' + this.name + '</b> mit <b>' + this.countMemo + '</b> Karten.</p>')\n }", "title": "" }, { "docid": "2a8633acc330683a43527324765caace", "score": "0.5584058", "text": "cart(req, res) {\n res.render('customers/cart')\n //we can get data from session and then send but session is available on our frontend\n // so we will do it in cart.ejs file only\n\n }", "title": "" }, { "docid": "eb7eff4ee723575b92d3c71787e4a110", "score": "0.5582741", "text": "function getCart() {\r\n let cartString = localStorage.getItem('cart');\r\n\r\n if (cartString === null || cartString.indexOf('undefined') > -1) {\r\n cartString = '{\"items\": []}';\r\n }\r\n return JSON.parse(cartString);\r\n}", "title": "" }, { "docid": "1bbb33b4f3be318a47dcccae74062515", "score": "0.5576211", "text": "function getCart() {\n $.ajax({\n url: 'cart.php?get-cart=true',\n method: \"GET\",\n success: function (result) {\n $('.cart-items').html(result);\n }\n })\n}", "title": "" }, { "docid": "da6b216d28d4126724aab44b4bef21d1", "score": "0.55724317", "text": "function loadCart() {\n cart = JSON.parse(sessionStorage.getItem('cart'));\n}", "title": "" }, { "docid": "cf5a88abefad46dcc3eac7b2aa729d51", "score": "0.55680203", "text": "get addBackPackToCart () { return $('#add-to-cart-sauce-labs-backpack') }", "title": "" }, { "docid": "e000bb815e5e6a9fbb83eb36609d13f1", "score": "0.55634856", "text": "function getCart(req, res) {\n cartModel\n .getCart(req.params.username)\n .then(function(cart) {\n res.json(cart);\n });\n }", "title": "" }, { "docid": "635bd8f47b4bc112b996c35a615b720c", "score": "0.5550846", "text": "function updateCartPreview() {\n // TODO: Get the item and quantity from the form\n // TODO: Add a new element to the cartContents div with that information\n}", "title": "" }, { "docid": "635bd8f47b4bc112b996c35a615b720c", "score": "0.5550846", "text": "function updateCartPreview() {\n // TODO: Get the item and quantity from the form\n // TODO: Add a new element to the cartContents div with that information\n}", "title": "" }, { "docid": "f5b43f310212868c3cbfbbdfbc42f10f", "score": "0.5550779", "text": "function loadCart() {\n cart = JSON.parse(sessionStorage.getItem('shoppingCart'));\n }", "title": "" }, { "docid": "619e96b7367146305228d43d0de859e5", "score": "0.5548883", "text": "function showCart() {\n console.log(chalk.green(\"Your cart currently contains: \"));\n for (q = 0; q < customerCart.length; q++) {\n console.log(\"Product ID:\" + customerCart[q].id + chalk.magenta(\" | \") + \"Product Name: \" + customerCart[q].name + chalk.magenta(\" | \") + \"Quantity: \" + customerCart[q].quantityDesired + chalk.magenta(\" | \") + \"Total Cost: \" + customerCart[q].totalCost);\n }\n afterCart();\n}", "title": "" }, { "docid": "93509f0fcc7baadd0d420b73907f654a", "score": "0.5541414", "text": "get header(){\n let header = this.child['header-title'] || this.child['header']\n if(!header) console.error(`${this.tagName} has no header node, failed to get.`)\n return header.textContent\n }", "title": "" }, { "docid": "df2e1e17a310b4883d70a695ab5ad7ee", "score": "0.5534395", "text": "function displayCart() {\n \n let subTt = 0\n $('#article-modal').text('article');\n $('#price-modal').text('prix');\n $('#qte-modal').text('qte');\n //$('.subtotal').text('')\n\n if(sessionStorage.getItem('tableCart') != undefined) {\n subGrandTotal = 0\n JSON.parse(sessionStorage.getItem('tableCart')).forEach((element) => {\n articles = '<p>'+element.name+'</p>'\n $('#article-modal').append(articles);\n let itemPrice = element.price * 1000\n subTotal = (itemPrice * element.qte) / 1000\n price = '<p>'+subTotal+'</p>'\n $('#price-modal').append(price)\n qte = '<p>'+element.qte+'</p>'\n $('#qte-modal').append(qte)\n subGrandTotal += subTotal\n })\n $('.subtotal').append(subGrandTotal)\n }\n \n}", "title": "" }, { "docid": "5a13efd81bc73fd12ca5cc77dd784f42", "score": "0.5531686", "text": "function Header() {\n window[\"__checkBudget__\"]();\n return {\n title: exports.appState.pageTitle,\n leftLink: exports.appState.backAction ? \"Back\" : \"\",\n leftIcon: exports.appState.backAction ? \"chevron-left\" : \"none\",\n onLeftTap: () => exports.appState.backAction && exports.appState.backAction(),\n };\n}", "title": "" }, { "docid": "e74e5c4734d55c8313c45cae95c791b0", "score": "0.5529805", "text": "printHeader() {\r\n\t\tlet headers = [];\r\n\t\t//manually add each defined prop input value to the header array if it exists\r\n\t\tif (this.props.title) {\r\n\t\t\theaders.push(<h2 key=\"title\">{this.props.title}</h2>);\r\n\t\t}\r\n\t\tif (this.props.method) {\r\n\t\t\theaders.push(\r\n\t\t\t\t<h3 key=\"method\" style={{ color: \"red\" }}>\r\n\t\t\t\t\t{this.props.method}\r\n\t\t\t\t</h3>\r\n\t\t\t);\r\n\t\t}\r\n\t\tif (this.props.url) {\r\n\t\t\theaders.push(<h3 key=\"baseurl\">Base URL</h3>);\r\n\t\t\theaders.push(<h4 key=\"url\">{this.props.url}</h4>);\r\n\t\t}\r\n\t\t//add the body header as it is common for every instance of this component\r\n\t\theaders.push(<h3 key=\"body\">Body</h3>);\r\n\t\treturn headers;\r\n\t}", "title": "" }, { "docid": "b9d871ba46b17abed7d7b3ceb7f0f214", "score": "0.5528362", "text": "function showViewCart() {\n showView('Cart');\n\n requester.get('user',sessionStorage.getItem('userId'),'kinvey')\n .then((userInfo) => {\n let cart = userInfo.cart || {}\n renderCart(cart)\n })\n }", "title": "" }, { "docid": "73aec7387b3ddaf9f047a1d67d80911d", "score": "0.5524472", "text": "static getCart() {\r\n return localStorage.getItem('cart') ? JSON.parse(localStorage.getItem('cart')): [];\r\n }", "title": "" }, { "docid": "1fcb8f778b842e45bee3ab03198d5006", "score": "0.5506748", "text": "getItSpaCart() {\n // Define variale for cookie value\n let cookieValue;\n // If cookie with key 'PIGI_SPA_CART' exists\n if (this.get().startsWith(\"PIGI_SPA_CART=\")) {\n // Remove key name from begining and set value of this cookie to cookieValue variable\n cookieValue = this.get().slice(14);\n // If cookie with key ' PIGI_SPA_CART' exists\n } else if (this.get().startsWith(\" PIGI_SPA_CART=\")) {\n // Remove key name with white space before from begining and set value of this cookie to cookieValue variable\n cookieValue = this.get().slice(15);\n }\n const parsedValue = JSON.parse(cookieValue);\n\n return parsedValue;\n }", "title": "" }, { "docid": "3010780076adf52d1a209a82f94c8491", "score": "0.5503227", "text": "function getPackageTableHeader() {\n return \"<thead>\" + getPackageHeaderRow() + \"</thead>\";\n}", "title": "" }, { "docid": "3ed97f55d9e2fbcb65d10d751485f0fe", "score": "0.5500825", "text": "async function getShopHeaders(ctx) {\n const { cookies } = ctx;\n const shop = cookies.get(\"shop_id\") || ctx.query.shop;\n if (!shop) {\n ctx.throw(401, Error.invalidShop);\n return;\n }\n const accessToken =\n cookies.get(\"accessToken\") || ctx.accessToken || ctx.header[\"accessToken\"];\n if (!accessToken) {\n ctx.throw(401, Error.invalidAccessToken);\n }\n\n return {\n shop: shop,\n accessToken: accessToken\n };\n}", "title": "" }, { "docid": "d2cd2be5be989a6c46a2d0300419a05c", "score": "0.54962915", "text": "function getHeader(name, pkg) {\n\tconst version = dateFormat(new Date(), \"yyyy.mm.dd\")\n\treturn `clrmamepro (\n\tname \"${path.basename(name)}\"\n\tdescription \"${path.basename(name)}\"\n\tversion \"${version}\"\n\thomepage \"${pkg.homepage}\"\n)\\n`\n}", "title": "" }, { "docid": "89903ca834d34b851e4f1582c4e25512", "score": "0.54915375", "text": "function getRowInfo(ItemRow) {\n\tconst info = ItemRow.getElementsByClassName('shopping-cart-header');\n\tlet textArray = [];\n\tfor (let i = 0; i < info.length; i++) {\n\t\ttextArray.push(info[i].innerText);\n\t}\n\treturn textArray;\n}", "title": "" }, { "docid": "8dba8430ceaab1146b32c0506ef600e7", "score": "0.54847485", "text": "function GetCurrentShoppingCartID() {\n return $('#' + hidCartID).val();\n}", "title": "" }, { "docid": "38dce9165d269dc0912da6f2891aa1c2", "score": "0.54833865", "text": "function getCartDataOfSession() {\n ajaxReq(\"GET\", \"controllers/get-cart-elements.php\", {}, (data) => {\n loadCartProducts(data);\n });\n}", "title": "" }, { "docid": "3ba78774923276d364b88805a72d4d50", "score": "0.54763615", "text": "function GetFromCart( fShipping ) {\r\n ManageCart( );\r\n}", "title": "" }, { "docid": "c71940915304dab399880aa1c3fa86f9", "score": "0.5475315", "text": "function getCart(parent, args) {\n if (!userInfo.isUserLoggedIn) {\n throw new Error('Please log in to create a cart.');\n }\n if (!cartInfo.isCartCreated) {\n throw new Error('Please create a cart.');\n }\n return cartInfo.cart;\n}", "title": "" }, { "docid": "1f10008e5dcb7e99009254dd3694c66f", "score": "0.54712504", "text": "function myOrderHtml(){\r\n\t//view my orders as well, so he can confirm\r\n\tvar myHtmlOrder = document.querySelector('.checkOutHeaderTitle');\t//get title info:\r\n\t\t\tmyHtmlOrder += document.querySelector('.tableCheckOrder');\t//get order info\r\n\t\t\tmyHtmlOrder += document.querySelector('.checkOutBottomTitle');\t//get bottom tax/total info\r\n\treturn myHtmlOrder;\r\n}", "title": "" }, { "docid": "93ab05a8c591445c1be1964c922ae0b8", "score": "0.5470417", "text": "function getProductInfo(button) {\n\n let span = button.querySelector(\"span\");\n let price = span.textContent;\n let parent = button.closest(\".content\");\n let h2 = parent.querySelector(\"h2\");\n let productName = h2.textContent;\n\n addCartItem(productName, price);\n}", "title": "" }, { "docid": "8adf791af015c39746e1c05843df10e7", "score": "0.5466393", "text": "function updateHeader(card, data) {\n\tcurrCard = card;\n\tvar currPrice = data[currIndex].value;\n\tdocument.getElementById(\"cardname\").innerHTML = card;\n\tdocument.getElementById(\"marketpriceHeader\").innerHTML = \"$\" + currPrice.toFixed(2);\n}", "title": "" }, { "docid": "95c00c76199c2062544e8c9b7dfeced7", "score": "0.5453571", "text": "get appHeader () {return $('#header_logo')}", "title": "" }, { "docid": "a9f2160391e744a90e70dfde92653443", "score": "0.54472226", "text": "function cart() {\n return JSON.parse(localStorage.getItem('cart')) || {};\n}", "title": "" }, { "docid": "0a2ed0cf91201aa8017301ff287b48f1", "score": "0.54455715", "text": "function getCartItems(){\n\n //get length of current orders\n let cartItems = JSON.parse(localStorage.getItem('ov-client-orders'));\n if(cartItems !== null){\n setCartIcontState({\n ...cartIconState,\n cartLength:cartItems.length\n })\n }\n \n }", "title": "" }, { "docid": "0ee942aa0ef892683c1e7aea616753cd", "score": "0.5444243", "text": "function retrieveCart() {\n\n\t// Retrieves the cart from localStorage.\n\tvar localCart = localStorage.getItem(\"cart\");\n\n\t// If there are items, parses the items retrieved.\n\tif (localCart && localCart != \"[]\") {\n\t\tconsole.log(\"There are items in the cart\");\n\t\tcart = JSON.parse(localCart);\n\t}\n\telse {\n\t\tconsole.log(\"There are no items in the cart\");\n\t}\n\n\tdisplayCart();\n}", "title": "" }, { "docid": "15995976ac7860610e6dff74d46b6d26", "score": "0.54413533", "text": "async function getCart(req, res, next) {\n const data = await CartServices.getCart(req.session.token);\n if (data) {\n let products = await createCart(data);\n res.render('shoppingcart.ejs', { title: 'Alibazon', products: products, session: req.session.userid });\n } else {\n const err= new Error(\"Cart is missing\");\n err.status = 404;\n next(err);\n }\n}", "title": "" }, { "docid": "9353224e28cdad52a7eaafc374632fef", "score": "0.5437161", "text": "function getCartState() {\n return {\n cartItems: CartStore.getCartItems(),\n cartCount: CartStore.getCartCount(),\n cartTotal: CartStore.getCartTotal(),\n nuValTotal: CartStore.getNuValTotal(),\n cartVisible: CartStore.getCartVisible()\n };\n}", "title": "" }, { "docid": "7e6e299c355b3b630524b0dbb18a28b9", "score": "0.5432778", "text": "function getCartState() {\n return {\n cart: AppStore.getCart()\n };\n}", "title": "" }, { "docid": "7719001464deafbc2425591174e3663c", "score": "0.54271626", "text": "getHeader(name)\n {\n const header = this.headers[Utils.headerize(name)];\n\n if (header)\n {\n if (header[0])\n {\n return header[0].raw;\n }\n }\n else\n {\n return;\n }\n }", "title": "" } ]
416b1f16338afd0ff06f427f2f5c7b2f
Copyright (c) 2018 mol contributors, licensed under MIT, See LICENSE file for more info.
[ { "docid": "682edaaa5c96088114346f770c1c5195", "score": "0.0", "text": "function normalize(value, min, max) {\n return (value - min) / (max - min);\n}", "title": "" } ]
[ { "docid": "e3e2bb4d0241a12cbb016aa67b1e7dca", "score": "0.5354008", "text": "function Composition() {}", "title": "" }, { "docid": "688a1c1cd5957ae81a03e76a3e4e53da", "score": "0.52335167", "text": "static extraProps() {}", "title": "" }, { "docid": "ad91cf774842c7f01d01e1212f9f184d", "score": "0.5226556", "text": "constructor () { super() }", "title": "" }, { "docid": "ad91cf774842c7f01d01e1212f9f184d", "score": "0.5226556", "text": "constructor () { super() }", "title": "" }, { "docid": "ad91cf774842c7f01d01e1212f9f184d", "score": "0.5226556", "text": "constructor () { super() }", "title": "" }, { "docid": "36afa2680104e2ce3afafd791daed810", "score": "0.513021", "text": "static metadata(){ return Metadata.singleton(true); }", "title": "" }, { "docid": "e3f90f450d39e3b20d26b7aff717e362", "score": "0.51272476", "text": "async setup() {\n \n }", "title": "" }, { "docid": "37181385e9d3da0611ef8e41c7ab72e4", "score": "0.5067551", "text": "init () {\n }", "title": "" }, { "docid": "0a6f77832d7f956d06ce4e6cc283a6aa", "score": "0.506569", "text": "__init() {\n\n\t}", "title": "" }, { "docid": "cac8ffdcca38512337d432302edf7243", "score": "0.49962625", "text": "async init () {\r\n return;\r\n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.49702817", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.49702817", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.49702817", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.49702817", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.49702817", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.49702817", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.49702817", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.49702817", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.49702817", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.49702817", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.49702817", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.49702817", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.49702817", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.49702817", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.49702817", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.49702817", "text": "constructor() {\n \n }", "title": "" }, { "docid": "c16cda55c89b87c4ec7720269486eb07", "score": "0.4947137", "text": "constructor() {\n\n\t}", "title": "" }, { "docid": "7a6fe2a6fd6bef9da1fdc5010f3c5dbe", "score": "0.49320808", "text": "configure() {}", "title": "" }, { "docid": "c8b5ab86038bdb6473d08707aa85ab20", "score": "0.49247378", "text": "constructor() {\n\t}", "title": "" }, { "docid": "c8b5ab86038bdb6473d08707aa85ab20", "score": "0.49247378", "text": "constructor() {\n\t}", "title": "" }, { "docid": "c8b5ab86038bdb6473d08707aa85ab20", "score": "0.49247378", "text": "constructor() {\n\t}", "title": "" }, { "docid": "dfbdc7a3daa3b9223c53834a26dedc70", "score": "0.49207214", "text": "initialize() {}", "title": "" }, { "docid": "dfbdc7a3daa3b9223c53834a26dedc70", "score": "0.49207214", "text": "initialize() {}", "title": "" }, { "docid": "dfbdc7a3daa3b9223c53834a26dedc70", "score": "0.49207214", "text": "initialize() {}", "title": "" }, { "docid": "dfbdc7a3daa3b9223c53834a26dedc70", "score": "0.49207214", "text": "initialize() {}", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4884028", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4884028", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4884028", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4884028", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4884028", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4884028", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4884028", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4884028", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4884028", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4884028", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4884028", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4884028", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4884028", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4884028", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4884028", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4884028", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4884028", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4884028", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4884028", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4884028", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4884028", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4884028", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4884028", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4884028", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4884028", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4884028", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4884028", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4884028", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4884028", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.4884028", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "f9e5050e58babfca28103f3ce0d9015f", "score": "0.48818395", "text": "initialize () {}", "title": "" }, { "docid": "f9e5050e58babfca28103f3ce0d9015f", "score": "0.48818395", "text": "initialize () {}", "title": "" }, { "docid": "d630e227023258ce38a61450aad6ac1e", "score": "0.48818052", "text": "function setup() {\n \n}", "title": "" }, { "docid": "c9178323c2f9cef046a9c940e3f92f22", "score": "0.48750618", "text": "constructor () {}", "title": "" }, { "docid": "c9178323c2f9cef046a9c940e3f92f22", "score": "0.48750618", "text": "constructor () {}", "title": "" }, { "docid": "eb32a7c6fa430aedcefdf271e557b077", "score": "0.48533732", "text": "uspec() {\n }", "title": "" }, { "docid": "beff6224845143b836925b1bf8d2ff37", "score": "0.4843166", "text": "init ()\n {\n }", "title": "" }, { "docid": "fe4fc0aa06085b0f3748b9edd73e2eab", "score": "0.48374975", "text": "render() {\n \n return (\n <div>\n <Graph\n key={uuidv4()}\n graph={this.state.graphe}\n options={options}\n />\n </div>\n );\n }", "title": "" }, { "docid": "b12930c9aa3d5dbb6458a3ecef1beb75", "score": "0.4833409", "text": "function DumbComponent() {\n return \"hey there\";\n}", "title": "" }, { "docid": "b847d12db3d5c5eb7c351a789c15a163", "score": "0.48177716", "text": "constructor() {\n \n \n \n }", "title": "" }, { "docid": "b847d12db3d5c5eb7c351a789c15a163", "score": "0.48177716", "text": "constructor() {\n \n \n \n }", "title": "" }, { "docid": "b847d12db3d5c5eb7c351a789c15a163", "score": "0.48177716", "text": "constructor() {\n \n \n \n }", "title": "" }, { "docid": "b847d12db3d5c5eb7c351a789c15a163", "score": "0.48177716", "text": "constructor() {\n \n \n \n }", "title": "" }, { "docid": "b847d12db3d5c5eb7c351a789c15a163", "score": "0.48177716", "text": "constructor() {\n \n \n \n }", "title": "" }, { "docid": "b847d12db3d5c5eb7c351a789c15a163", "score": "0.48177716", "text": "constructor() {\n \n \n \n }", "title": "" }, { "docid": "b847d12db3d5c5eb7c351a789c15a163", "score": "0.48177716", "text": "constructor() {\n \n \n \n }", "title": "" }, { "docid": "b847d12db3d5c5eb7c351a789c15a163", "score": "0.48177716", "text": "constructor() {\n \n \n \n }", "title": "" }, { "docid": "b847d12db3d5c5eb7c351a789c15a163", "score": "0.48177716", "text": "constructor() {\n \n \n \n }", "title": "" }, { "docid": "b847d12db3d5c5eb7c351a789c15a163", "score": "0.48177716", "text": "constructor() {\n \n \n \n }", "title": "" }, { "docid": "b847d12db3d5c5eb7c351a789c15a163", "score": "0.48177716", "text": "constructor() {\n \n \n \n }", "title": "" }, { "docid": "b847d12db3d5c5eb7c351a789c15a163", "score": "0.48177716", "text": "constructor() {\n \n \n \n }", "title": "" }, { "docid": "b847d12db3d5c5eb7c351a789c15a163", "score": "0.48177716", "text": "constructor() {\n \n \n \n }", "title": "" }, { "docid": "b847d12db3d5c5eb7c351a789c15a163", "score": "0.48177716", "text": "constructor() {\n \n \n \n }", "title": "" }, { "docid": "b847d12db3d5c5eb7c351a789c15a163", "score": "0.48177716", "text": "constructor() {\n \n \n \n }", "title": "" }, { "docid": "b847d12db3d5c5eb7c351a789c15a163", "score": "0.48177716", "text": "constructor() {\n \n \n \n }", "title": "" }, { "docid": "b847d12db3d5c5eb7c351a789c15a163", "score": "0.48177716", "text": "constructor() {\n \n \n \n }", "title": "" }, { "docid": "b847d12db3d5c5eb7c351a789c15a163", "score": "0.48177716", "text": "constructor() {\n \n \n \n }", "title": "" }, { "docid": "b847d12db3d5c5eb7c351a789c15a163", "score": "0.48177716", "text": "constructor() {\n \n \n \n }", "title": "" }, { "docid": "b847d12db3d5c5eb7c351a789c15a163", "score": "0.48177716", "text": "constructor() {\n \n \n \n }", "title": "" }, { "docid": "b847d12db3d5c5eb7c351a789c15a163", "score": "0.48177716", "text": "constructor() {\n \n \n \n }", "title": "" }, { "docid": "b847d12db3d5c5eb7c351a789c15a163", "score": "0.48177716", "text": "constructor() {\n \n \n \n }", "title": "" }, { "docid": "b847d12db3d5c5eb7c351a789c15a163", "score": "0.48177716", "text": "constructor() {\n \n \n \n }", "title": "" }, { "docid": "b847d12db3d5c5eb7c351a789c15a163", "score": "0.48177716", "text": "constructor() {\n \n \n \n }", "title": "" }, { "docid": "b847d12db3d5c5eb7c351a789c15a163", "score": "0.48177716", "text": "constructor() {\n \n \n \n }", "title": "" }, { "docid": "b847d12db3d5c5eb7c351a789c15a163", "score": "0.48177716", "text": "constructor() {\n \n \n \n }", "title": "" }, { "docid": "b847d12db3d5c5eb7c351a789c15a163", "score": "0.48177716", "text": "constructor() {\n \n \n \n }", "title": "" } ]
6af6d220383a33c955b3f903dfebde6e
=========================================================================== For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table. (It will be regenerated if this run of deflate switches away from Huffman.)
[ { "docid": "a08189fb75fc5f8926b970c0a2ffb73c", "score": "0.0", "text": "function deflate_huff(s, flush) {\n var bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we have a literal to write. */\n if (s.lookahead === 0) {\n fill_window(s);\n if (s.lookahead === 0) {\n if (flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n break; /* flush the current block */\n }\n }\n\n /* Output a literal byte */\n s.match_length = 0;\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n s.lookahead--;\n s.strstart++;\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n}", "title": "" } ]
[ { "docid": "f104070965e8adc0fb83ca6b1a32878b", "score": "0.6870208", "text": "function deflate_fast(flush) {\n// short hash_head = 0; // head of the hash chain\nvar hash_head = 0; // head of the hash chain\nvar bflush; // set if current block must be flushed\nwhile (true) {\n// Make sure that we always have enough lookahead, except\n// at the end of the input file. We need MAX_MATCH bytes\n// for the next match, plus MIN_MATCH bytes to insert the\n// string following the next match.\nif (lookahead < MIN_LOOKAHEAD) {\nfill_window();\nif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\nreturn NeedMore;\n}\nif (lookahead === 0)\nbreak; // flush the current block\n}\n// Insert the string window[strstart .. strstart+2] in the\n// dictionary, and set hash_head to the head of the hash chain:\nif (lookahead >= MIN_MATCH) {\nins_h = (((ins_h) << hash_shift) ^ (window[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n// prev[strstart&w_mask]=hash_head=head[ins_h];\nhash_head = (head[ins_h] & 0xffff);\nprev[strstart & w_mask] = head[ins_h];\nhead[ins_h] = strstart;\n}\n// Find the longest match, discarding those <= prev_length.\n// At this point we have always match_length < MIN_MATCH\nif (hash_head !== 0 && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n// To simplify the code, we prevent matches with the string\n// of window index 0 (in particular we have to avoid a match\n// of the string with itself at the start of the input file).\nif (strategy != Z_HUFFMAN_ONLY) {\nmatch_length = longest_match(hash_head);\n}\n// longest_match() sets match_start\n}\nif (match_length >= MIN_MATCH) {\n// check_match(strstart, match_start, match_length);\nbflush = _tr_tally(strstart - match_start, match_length - MIN_MATCH);\nlookahead -= match_length;\n// Insert new strings in the hash table only if the match length\n// is not too large. This saves time but degrades compression.\nif (match_length <= max_lazy_match && lookahead >= MIN_MATCH) {\nmatch_length--; // string at strstart already in hash table\ndo {\nstrstart++;\nins_h = ((ins_h << hash_shift) ^ (window[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n// prev[strstart&w_mask]=hash_head=head[ins_h];\nhash_head = (head[ins_h] & 0xffff);\nprev[strstart & w_mask] = head[ins_h];\nhead[ins_h] = strstart;\n// strstart never exceeds WSIZE-MAX_MATCH, so there are\n// always MIN_MATCH bytes ahead.\n} while (--match_length !== 0);\nstrstart++;\n} else {\nstrstart += match_length;\nmatch_length = 0;\nins_h = window[strstart] & 0xff;\nins_h = (((ins_h) << hash_shift) ^ (window[strstart + 1] & 0xff)) & hash_mask;\n// If lookahead < MIN_MATCH, ins_h is garbage, but it does\n// not\n// matter since it will be recomputed at next deflate call.\n}\n} else {\n// No match, output a literal byte\nbflush = _tr_tally(0, window[strstart] & 0xff);\nlookahead--;\nstrstart++;\n}\nif (bflush) {\nflush_block_only(false);\nif (strm.avail_out === 0)\nreturn NeedMore;\n}\n}\nflush_block_only(flush == Z_FINISH);\nif (strm.avail_out === 0) {\nif (flush == Z_FINISH)\nreturn FinishStarted;\nelse\nreturn NeedMore;\n}\nreturn flush == Z_FINISH ? FinishDone : BlockDone;\n}", "title": "" }, { "docid": "02ad2097d8fda0bb3c61d9d9eae4fb02", "score": "0.675269", "text": "function deflate_slow(flush) {\n// short hash_head = 0; // head of hash chain\nvar hash_head = 0; // head of hash chain\nvar bflush; // set if current block must be flushed\nvar max_insert;\n// Process the input block.\nwhile (true) {\n// Make sure that we always have enough lookahead, except\n// at the end of the input file. We need MAX_MATCH bytes\n// for the next match, plus MIN_MATCH bytes to insert the\n// string following the next match.\nif (lookahead < MIN_LOOKAHEAD) {\nfill_window();\nif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\nreturn NeedMore;\n}\nif (lookahead === 0)\nbreak; // flush the current block\n}\n// Insert the string window[strstart .. strstart+2] in the\n// dictionary, and set hash_head to the head of the hash chain:\nif (lookahead >= MIN_MATCH) {\nins_h = (((ins_h) << hash_shift) ^ (window[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n// prev[strstart&w_mask]=hash_head=head[ins_h];\nhash_head = (head[ins_h] & 0xffff);\nprev[strstart & w_mask] = head[ins_h];\nhead[ins_h] = strstart;\n}\n// Find the longest match, discarding those <= prev_length.\nprev_length = match_length;\nprev_match = match_start;\nmatch_length = MIN_MATCH - 1;\nif (hash_head !== 0 && prev_length < max_lazy_match && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n// To simplify the code, we prevent matches with the string\n// of window index 0 (in particular we have to avoid a match\n// of the string with itself at the start of the input file).\nif (strategy != Z_HUFFMAN_ONLY) {\nmatch_length = longest_match(hash_head);\n}\n// longest_match() sets match_start\nif (match_length <= 5 && (strategy == Z_FILTERED || (match_length == MIN_MATCH && strstart - match_start > 4096))) {\n// If prev_match is also MIN_MATCH, match_start is garbage\n// but we will ignore the current match anyway.\nmatch_length = MIN_MATCH - 1;\n}\n}\n// If there was a match at the previous step and the current\n// match is not better, output the previous match:\nif (prev_length >= MIN_MATCH && match_length <= prev_length) {\nmax_insert = strstart + lookahead - MIN_MATCH;\n// Do not insert strings in hash table beyond this.\n// check_match(strstart-1, prev_match, prev_length);\nbflush = _tr_tally(strstart - 1 - prev_match, prev_length - MIN_MATCH);\n// Insert in hash table all strings up to the end of the match.\n// strstart-1 and strstart are already inserted. If there is not\n// enough lookahead, the last two strings are not inserted in\n// the hash table.\nlookahead -= prev_length - 1;\nprev_length -= 2;\ndo {\nif (++strstart <= max_insert) {\nins_h = (((ins_h) << hash_shift) ^ (window[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n// prev[strstart&w_mask]=hash_head=head[ins_h];\nhash_head = (head[ins_h] & 0xffff);\nprev[strstart & w_mask] = head[ins_h];\nhead[ins_h] = strstart;\n}\n} while (--prev_length !== 0);\nmatch_available = 0;\nmatch_length = MIN_MATCH - 1;\nstrstart++;\nif (bflush) {\nflush_block_only(false);\nif (strm.avail_out === 0)\nreturn NeedMore;\n}\n} else if (match_available !== 0) {\n// If there was no match at the previous position, output a\n// single literal. If there was a match but the current match\n// is longer, truncate the previous match to a single literal.\nbflush = _tr_tally(0, window[strstart - 1] & 0xff);\nif (bflush) {\nflush_block_only(false);\n}\nstrstart++;\nlookahead--;\nif (strm.avail_out === 0)\nreturn NeedMore;\n} else {\n// There is no previous match to compare with, wait for\n// the next step to decide.\nmatch_available = 1;\nstrstart++;\nlookahead--;\n}\n}\nif (match_available !== 0) {\nbflush = _tr_tally(0, window[strstart - 1] & 0xff);\nmatch_available = 0;\n}\nflush_block_only(flush == Z_FINISH);\nif (strm.avail_out === 0) {\nif (flush == Z_FINISH)\nreturn FinishStarted;\nelse\nreturn NeedMore;\n}\nreturn flush == Z_FINISH ? FinishDone : BlockDone;\n}", "title": "" }, { "docid": "e9c0c25f0d8416990400e315f11f4595", "score": "0.6582919", "text": "function deflate_fast(flush) {\n\t\t\t// short hash_head = 0; // head of the hash chain\n\t\t\tvar hash_head = 0; // head of the hash chain\n\t\t\tvar bflush; // set if current block must be flushed\n\n\t\t\twhile (true) {\n\t\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t\t// string following the next match.\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\t\tfill_window();\n\t\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t\t}\n\t\t\t\t\tif (lookahead === 0)\n\t\t\t\t\t\tbreak; // flush the current block\n\t\t\t\t}\n\n\t\t\t\t// Insert the string window[strstart .. strstart+2] in the\n\t\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\t\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (window[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\n\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\thead[ins_h] = strstart;\n\t\t\t\t}\n\n\t\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\t\t// At this point we have always match_length < MIN_MATCH\n\n\t\t\t\tif (hash_head !== 0 && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t\t// of window index 0 (in particular we have to avoid a match\n\t\t\t\t\t// of the string with itself at the start of the input file).\n\t\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t\t}\n\t\t\t\t\t// longest_match() sets match_start\n\t\t\t\t}\n\t\t\t\tif (match_length >= MIN_MATCH) {\n\t\t\t\t\t// check_match(strstart, match_start, match_length);\n\n\t\t\t\t\tbflush = _tr_tally(strstart - match_start, match_length - MIN_MATCH);\n\n\t\t\t\t\tlookahead -= match_length;\n\n\t\t\t\t\t// Insert new strings in the hash table only if the match length\n\t\t\t\t\t// is not too large. This saves time but degrades compression.\n\t\t\t\t\tif (match_length <= max_lazy_match && lookahead >= MIN_MATCH) {\n\t\t\t\t\t\tmatch_length--; // string at strstart already in hash table\n\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\tstrstart++;\n\n\t\t\t\t\t\t\tins_h = ((ins_h << hash_shift) ^ (window[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\t\thead[ins_h] = strstart;\n\n\t\t\t\t\t\t\t// strstart never exceeds WSIZE-MAX_MATCH, so there are\n\t\t\t\t\t\t\t// always MIN_MATCH bytes ahead.\n\t\t\t\t\t\t} while (--match_length !== 0);\n\t\t\t\t\t\tstrstart++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstrstart += match_length;\n\t\t\t\t\t\tmatch_length = 0;\n\t\t\t\t\t\tins_h = window[strstart] & 0xff;\n\n\t\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (window[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// If lookahead < MIN_MATCH, ins_h is garbage, but it does\n\t\t\t\t\t\t// not\n\t\t\t\t\t\t// matter since it will be recomputed at next deflate call.\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// No match, output a literal byte\n\n\t\t\t\t\tbflush = _tr_tally(0, window[strstart] & 0xff);\n\t\t\t\t\tlookahead--;\n\t\t\t\t\tstrstart++;\n\t\t\t\t}\n\t\t\t\tif (bflush) {\n\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tflush_block_only(flush == Z_FINISH);\n\t\t\tif (strm.avail_out === 0) {\n\t\t\t\tif (flush == Z_FINISH)\n\t\t\t\t\treturn FinishStarted;\n\t\t\t\telse\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t\t}", "title": "" }, { "docid": "27dd44fc72a80b38f1445a8dd73ad028", "score": "0.65051514", "text": "function uncompress(winSize, next, ev, buf) {\n\t\tvar bfinal = false;\n\t\t\n\t\tfunction again(ev, buf) {\n\t\t\treturn uncompress(winSize, next, ev, buf);\n\t\t}\n\t\t\n\t\tfunction custom(ev, buf) { // read custom Huffman codes\n\t\t\tvar hlit, hdist, hclen;\n\t\t\tvar c;\n\t\t\tvar cl = [];\n\n\n\t\t\tfunction codelenalpha(ev, buf) {\n\t\t\t\t\t\t\t\n\n\t\t\t\tfunction match(n) {\n\t\t\t\t\t\n// this all looks more like a code itself, would it be easier to do like that???\n\t\t\t\t\tc--;\n\t\t\t\t\tif (c === 0) {\n\t\t\t\t\t\t// now hlit + 257 encoded values;\n\t\t\t\t\t\treturn ***;\n\t\t\t\t\t}\n\t\t\t\t\treturn codelenalpha;\n\t\t\t\t}\n\n\t\t\t\treturn getb(3, match, ev, buf);\n\t\t\t}\n\n\t\t\tfunction match(n) {\n\t\t\t\thlit = n & 31;\n\t\t\t\thdist = (n >>> 5) & 31;\n\t\t\t\thclen = (n >>> 10) & 15;\n\t\t\t\tvar c = hclen * 4;\n\t\t\t\treturn codelenalpha;\n\t\t\t}\n\n\t\t\treturn getb(14, match, ev, buf);\n\t\t}\n\n\t\t// redo to share with user created tables. ie pass huf var to here, or use variable\n\t\tfunction standard(ev, buf) { // standard Huffman code\n\t\t\tvar ex, len, ee, dist;\n\n\t\t\tfunction backref(dist, len) {\n\t\t\t\tconsole.log(\"backref: \" + dist + \" \" + len);\n\t\t\t}\n\n\t\t\tfunction eebits(ev, buf) {\n\t\t\t\tfunction match(n) {\n\t\t\t\t\tdist += n;\n\t\t\t\t\tbackref();\n\t\t\t\t\treturn standard;\n\t\t\t\t}\n\n\t\t\t\treturn getb(ee, match, ev, buf);\n\t\t\t}\n\n\t\t\tfunction distance(ev, buf) {\n\t\t\t\tfunction match(n) {\n\t\t\t\t\tif (n > 29) {\n\t\t\t\t\t\treturn 'invalid distance';\n\t\t\t\t\t}\n\t\t\t\t\tee = z.eebits[n];\n\t\t\t\t\tdist = z.dist[n];\n\t\t\t\t\tif (ee > 0) {\n\t\t\t\t\t\treturn eebits;\n\t\t\t\t\t}\n\t\t\t\t\tbackref();\n\t\t\t\t\treturn standard;\n\t\t\t\t}\t\t\t\t\n\n\t\t\t\treturn getb(5, match, ev, buf);\n\t\t\t}\n\n\n\t\t\tfunction ebits(ev, buf) {\n\t\t\t\tfunction match(n) {\n\t\t\t\t\tlen += n;\n\t\t\t\t\treturn distance;\n\t\t\t\t}\n\n\t\t\t\treturn getb(ex, match, ev, buf);\n\t\t\t}\n\n\t\t\tfunction check(n, len) {\n\t\t\t\tvar ret = shuf.check(n, len);\n\t\t\t\t\n\t\t\t\tif (ret < 0) { // not enough bits, returns next length\n\t\t\t\t\treturn -ret;\n\t\t\t\t}\n\n\t\t\t\tif (ret === 256) { // end of block\n\t\t\t\t\treturn nextblock;\n\t\t\t\t}\n\t\t\t\tif (ret > 285) {\n\t\t\t\t\treturn 'invalid compressed data';\n\t\t\t\t}\n\n\t\t\t\tif (ret > 256) { // back reference\n\t\t\t\t\tex = z.exbits[ret - 257];\n\t\t\t\t\tlen = z.lens[ret - 257];\n\t\t\t\t\tif (ex > 0) {\n\t\t\t\t\t\treturn ebits;\n\t\t\t\t\t}\n\t\t\t\t\treturn distance;\n\t\t\t\t}\n\n\t\t\t\t// literal\n\t\t\t\tconsole.log(\"literal: \" + ret);\n\t\t\t\treturn standard;\n\t\t\t}\n\n\t\t\tif (typeof shuf == 'undefined') {\n\t\t\t\tshuf = Object.create(huff);\n\t\t\t\tshuf.init(shuf.type1());\n\t\t\t}\n\t\t\t\n\t\t\treturn getb(shuf.shortest, check, ev, buf);\n\t\t}\n\n\t\tfunction nocompress(ev, buf) {\n\t\t\t\n\t\t\tfunction lennlen(ev, buf) {\n\t\t\t\t\n\t\t\t\tfunction check(bytes) {\n\t\t\t\t\tvar len = to16(bytes);\n\t\t\t\t\tvar nlen = top16(bytes);\n\t\t\t\t\tvar nnlen = (~nlen + 0x100000000) & 0xffff;\n\t\t\t\t\t\n\t\t\t\t\tfunction udata(ev, buf) { // len bytes uncompressed data\n\n\t\t\t\t\t\tif (len === 0) {\n\t\t\t\t\t\t\tz.state = nextblock;\n\t\t\t\t\t\t\treturn buf;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (ev != 'data') {\n\t\t\t\t\t\t\treturn 'unexpected end of stream';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (len >= buf.length) {\n\t\t\t\t\t\t\tz.emit('data', buf);\n\t\t\t\t\t\t\tlen -= buf.length;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (len === 0) {\n\t\t\t\t\t\t\t\tz.state = nextblock;\n\t\t\t\t\t\t\t}\n\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\tz.emit('data', buf.slice(0, len));\n\t\t\t\t\t\tz.state = nextblock;\n\t\t\t\t\t\treturn buf.slice(len);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (len !== nnlen) {\n\t\t\t\t\t\treturn 'uncompressed length does not match ones complement ' + len + ' ' + nlen;\n\t\t\t\t\t}\n\t\t\t\t\treturn udata;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn get(4, check, ev, buf);\n\t\t\t}\n\t\t\t\n\t\t\tfunction skip(ev, buf) {\n\t\t\t\tif (ev != 'data') {\n\t\t\t\t\treturn 'unexpected end of stream';\n\t\t\t\t}\n\t\t\t\tif (buf.length === 0 && this.b !== 0) {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\t\t\t\tif (this.b !== 0) { // skip to next byte boundary\n\t\t\t\t\tbuf = buf.slice(1);\n\t\t\t\t\tthis.b = 0;\n\t\t\t\t}\n\t\t\t\tz.state = lennlen;\n\t\t\t\treturn buf;\n\t\t\t}\n\n\t\t\tz.state = skip;\n\t\t\treturn buf;\n\t\t}\n\t\n\t\tfunction header(bits, len) {\n\t\t\tbfinal = bits & 1;\n\t\t\tbtype = bits >>> 1;\n\t\t\tif (btype == 3) {\n\t\t\t\treturn 'invalid block type';\n\t\t\t}\n\t\t\tif (btype === 0) { // no compression\n\t\t\t\treturn nocompress;\n\t\t\t}\n\t\t\tif (btype === 1) { // standard table\n\t\t\t\treturn standard;\n\t\t\t}\n\t\t\treturn custom; // custom Huffman tables\n\t\t}\n\t\t\n\t\tfunction block(ev, buf) {\n\t\t\treturn getb(3, header, ev, buf);\n\t\t}\n\t\t\n\t\tfunction nextblock(ev, buf) {\n\t\t\tif (bfinal) {\n\t\t\t\tz.state = next;\n\t\t\t\tif (this.b !== 0) { // skip to next byte boundary\n\t\t\t\t\tbuf = buf.slice(1);\n\t\t\t\t\tthis.b = 0;\n\t\t\t\t}\n\t\t\t\treturn buf;\n\t\t\t}\n\t\t\tz.state = block;\n\t\t\treturn buf;\n\t\t}\n\t\n\t\treturn block(ev, buf);\n\t}", "title": "" }, { "docid": "ec097776686cb5e94c81cb386fc378c1", "score": "0.6496397", "text": "function deflate_slow(flush) {\n\t\t\t// short hash_head = 0; // head of hash chain\n\t\t\tvar hash_head = 0; // head of hash chain\n\t\t\tvar bflush; // set if current block must be flushed\n\t\t\tvar max_insert;\n\n\t\t\t// Process the input block.\n\t\t\twhile (true) {\n\t\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t\t// string following the next match.\n\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\t\tfill_window();\n\t\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t\t}\n\t\t\t\t\tif (lookahead === 0)\n\t\t\t\t\t\tbreak; // flush the current block\n\t\t\t\t}\n\n\t\t\t\t// Insert the string window[strstart .. strstart+2] in the\n\t\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\n\t\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (window[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\thead[ins_h] = strstart;\n\t\t\t\t}\n\n\t\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\t\tprev_length = match_length;\n\t\t\t\tprev_match = match_start;\n\t\t\t\tmatch_length = MIN_MATCH - 1;\n\n\t\t\t\tif (hash_head !== 0 && prev_length < max_lazy_match && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t\t// of window index 0 (in particular we have to avoid a match\n\t\t\t\t\t// of the string with itself at the start of the input file).\n\n\t\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t\t}\n\t\t\t\t\t// longest_match() sets match_start\n\n\t\t\t\t\tif (match_length <= 5 && (strategy == Z_FILTERED || (match_length == MIN_MATCH && strstart - match_start > 4096))) {\n\n\t\t\t\t\t\t// If prev_match is also MIN_MATCH, match_start is garbage\n\t\t\t\t\t\t// but we will ignore the current match anyway.\n\t\t\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// If there was a match at the previous step and the current\n\t\t\t\t// match is not better, output the previous match:\n\t\t\t\tif (prev_length >= MIN_MATCH && match_length <= prev_length) {\n\t\t\t\t\tmax_insert = strstart + lookahead - MIN_MATCH;\n\t\t\t\t\t// Do not insert strings in hash table beyond this.\n\n\t\t\t\t\t// check_match(strstart-1, prev_match, prev_length);\n\n\t\t\t\t\tbflush = _tr_tally(strstart - 1 - prev_match, prev_length - MIN_MATCH);\n\n\t\t\t\t\t// Insert in hash table all strings up to the end of the match.\n\t\t\t\t\t// strstart-1 and strstart are already inserted. If there is not\n\t\t\t\t\t// enough lookahead, the last two strings are not inserted in\n\t\t\t\t\t// the hash table.\n\t\t\t\t\tlookahead -= prev_length - 1;\n\t\t\t\t\tprev_length -= 2;\n\t\t\t\t\tdo {\n\t\t\t\t\t\tif (++strstart <= max_insert) {\n\t\t\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (window[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\t\thead[ins_h] = strstart;\n\t\t\t\t\t\t}\n\t\t\t\t\t} while (--prev_length !== 0);\n\t\t\t\t\tmatch_available = 0;\n\t\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\t\tstrstart++;\n\n\t\t\t\t\tif (bflush) {\n\t\t\t\t\t\tflush_block_only(false);\n\t\t\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t\t}\n\t\t\t\t} else if (match_available !== 0) {\n\n\t\t\t\t\t// If there was no match at the previous position, output a\n\t\t\t\t\t// single literal. If there was a match but the current match\n\t\t\t\t\t// is longer, truncate the previous match to a single literal.\n\n\t\t\t\t\tbflush = _tr_tally(0, window[strstart - 1] & 0xff);\n\n\t\t\t\t\tif (bflush) {\n\t\t\t\t\t\tflush_block_only(false);\n\t\t\t\t\t}\n\t\t\t\t\tstrstart++;\n\t\t\t\t\tlookahead--;\n\t\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t} else {\n\t\t\t\t\t// There is no previous match to compare with, wait for\n\t\t\t\t\t// the next step to decide.\n\n\t\t\t\t\tmatch_available = 1;\n\t\t\t\t\tstrstart++;\n\t\t\t\t\tlookahead--;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (match_available !== 0) {\n\t\t\t\tbflush = _tr_tally(0, window[strstart - 1] & 0xff);\n\t\t\t\tmatch_available = 0;\n\t\t\t}\n\t\t\tflush_block_only(flush == Z_FINISH);\n\n\t\t\tif (strm.avail_out === 0) {\n\t\t\t\tif (flush == Z_FINISH)\n\t\t\t\t\treturn FinishStarted;\n\t\t\t\telse\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\n\t\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t\t}", "title": "" }, { "docid": "26419d96139f531d77dcbd2cebb7a0c2", "score": "0.645556", "text": "function deflate_fast() {\n \t\twhile (lookahead !== 0 && qhead === null) {\n \t\t\tvar flush; // set if current block must be flushed\n \n \t\t\t// Insert the string window[strstart .. strstart+2] in the\n \t\t\t// dictionary, and set hash_head to the head of the hash chain:\n \t\t\tINSERT_STRING();\n \n \t\t\t// Find the longest match, discarding those <= prev_length.\n \t\t\t// At this point we have always match_length < MIN_MATCH\n \t\t\tif (hash_head !== NIL && strstart - hash_head <= MAX_DIST) {\n \t\t\t\t// To simplify the code, we prevent matches with the string\n \t\t\t\t// of window index 0 (in particular we have to avoid a match\n \t\t\t\t// of the string with itself at the start of the input file).\n \t\t\t\tmatch_length = longest_match(hash_head);\n \t\t\t\t// longest_match() sets match_start */\n \t\t\t\tif (match_length > lookahead) {\n \t\t\t\t\tmatch_length = lookahead;\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (match_length >= MIN_MATCH) {\n \t\t\t\t// check_match(strstart, match_start, match_length);\n \n \t\t\t\tflush = ct_tally(strstart - match_start, match_length - MIN_MATCH);\n \t\t\t\tlookahead -= match_length;\n \n \t\t\t\t// Insert new strings in the hash table only if the match length\n \t\t\t\t// is not too large. This saves time but degrades compression.\n \t\t\t\tif (match_length <= max_lazy_match) {\n \t\t\t\t\tmatch_length--; // string at strstart already in hash table\n \t\t\t\t\tdo {\n \t\t\t\t\t\tstrstart++;\n \t\t\t\t\t\tINSERT_STRING();\n \t\t\t\t\t\t// strstart never exceeds WSIZE-MAX_MATCH, so there are\n \t\t\t\t\t\t// always MIN_MATCH bytes ahead. If lookahead < MIN_MATCH\n \t\t\t\t\t\t// these bytes are garbage, but it does not matter since\n \t\t\t\t\t\t// the next lookahead bytes will be emitted as literals.\n \t\t\t\t\t} while (--match_length !== 0);\n \t\t\t\t\tstrstart++;\n \t\t\t\t} else {\n \t\t\t\t\tstrstart += match_length;\n \t\t\t\t\tmatch_length = 0;\n \t\t\t\t\tins_h = window[strstart] & 0xff;\n \t\t\t\t\t// UPDATE_HASH(ins_h, window[strstart + 1]);\n \t\t\t\t\tins_h = ((ins_h << H_SHIFT) ^ (window[strstart + 1] & 0xff)) & HASH_MASK;\n \n \t\t\t\t//#if MIN_MATCH !== 3\n \t\t\t\t//\t\tCall UPDATE_HASH() MIN_MATCH-3 more times\n \t\t\t\t//#endif\n \n \t\t\t\t}\n \t\t\t} else {\n \t\t\t\t// No match, output a literal byte */\n \t\t\t\tflush = ct_tally(0, window[strstart] & 0xff);\n \t\t\t\tlookahead--;\n \t\t\t\tstrstart++;\n \t\t\t}\n \t\t\tif (flush) {\n \t\t\t\tflush_block(0);\n \t\t\t\tblock_start = strstart;\n \t\t\t}\n \n \t\t\t// Make sure that we always have enough lookahead, except\n \t\t\t// at the end of the input file. We need MAX_MATCH bytes\n \t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n \t\t\t// string following the next match.\n \t\t\twhile (lookahead < MIN_LOOKAHEAD && !eofile) {\n \t\t\t\tfill_window();\n \t\t\t}\n \t\t}\n \t}", "title": "" }, { "docid": "5d7872db686268234b3b8de34ff6a183", "score": "0.6344912", "text": "function deflate_fast(s,flush){var hash_head;/* head of the hash chain */var bflush;/* set if current block must be flushed */for(;;){/* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */if(s.lookahead<MIN_LOOKAHEAD){fill_window(s);if(s.lookahead<MIN_LOOKAHEAD&&flush===Z_NO_FLUSH){return BS_NEED_MORE;}if(s.lookahead===0){break;/* flush the current block */}}/* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */hash_head=0/*NIL*/;if(s.lookahead>=MIN_MATCH){/*** INSERT_STRING(s, s.strstart, hash_head); ***/s.ins_h=(s.ins_h<<s.hash_shift^s.window[s.strstart+MIN_MATCH-1])&s.hash_mask;hash_head=s.prev[s.strstart&s.w_mask]=s.head[s.ins_h];s.head[s.ins_h]=s.strstart;/***/}/* Find the longest match, discarding those <= prev_length.\n * At this point we have always match_length < MIN_MATCH\n */if(hash_head!==0/*NIL*/&&s.strstart-hash_head<=s.w_size-MIN_LOOKAHEAD){/* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */s.match_length=longest_match(s,hash_head);/* longest_match() sets match_start */}if(s.match_length>=MIN_MATCH){// check_match(s, s.strstart, s.match_start, s.match_length); // for debug only\n/*** _tr_tally_dist(s, s.strstart - s.match_start,\n s.match_length - MIN_MATCH, bflush); ***/bflush=trees._tr_tally(s,s.strstart-s.match_start,s.match_length-MIN_MATCH);s.lookahead-=s.match_length;/* Insert new strings in the hash table only if the match length\n * is not too large. This saves time but degrades compression.\n */if(s.match_length<=s.max_lazy_match/*max_insert_length*/&&s.lookahead>=MIN_MATCH){s.match_length--;/* string at strstart already in table */do{s.strstart++;/*** INSERT_STRING(s, s.strstart, hash_head); ***/s.ins_h=(s.ins_h<<s.hash_shift^s.window[s.strstart+MIN_MATCH-1])&s.hash_mask;hash_head=s.prev[s.strstart&s.w_mask]=s.head[s.ins_h];s.head[s.ins_h]=s.strstart;/***//* strstart never exceeds WSIZE-MAX_MATCH, so there are\n * always MIN_MATCH bytes ahead.\n */}while(--s.match_length!==0);s.strstart++;}else{s.strstart+=s.match_length;s.match_length=0;s.ins_h=s.window[s.strstart];/* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */s.ins_h=(s.ins_h<<s.hash_shift^s.window[s.strstart+1])&s.hash_mask;//#if MIN_MATCH != 3\n// Call UPDATE_HASH() MIN_MATCH-3 more times\n//#endif\n/* If lookahead < MIN_MATCH, ins_h is garbage, but it does not\n * matter since it will be recomputed at next deflate call.\n */}}else{/* No match, output a literal byte *///Tracevv((stderr,\"%c\", s.window[s.strstart]));\n/*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/bflush=trees._tr_tally(s,0,s.window[s.strstart]);s.lookahead--;s.strstart++;}if(bflush){/*** FLUSH_BLOCK(s, 0); ***/flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE;}/***/}}s.insert=s.strstart<MIN_MATCH-1?s.strstart:MIN_MATCH-1;if(flush===Z_FINISH){/*** FLUSH_BLOCK(s, 1); ***/flush_block_only(s,true);if(s.strm.avail_out===0){return BS_FINISH_STARTED;}/***/return BS_FINISH_DONE;}if(s.last_lit){/*** FLUSH_BLOCK(s, 0); ***/flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE;}/***/}return BS_BLOCK_DONE;}", "title": "" }, { "docid": "78dfebb5d991ca33c5b59ded04097108", "score": "0.6338458", "text": "function deflate_slow(s,flush){var hash_head; /* head of hash chain */var bflush; /* set if current block must be flushed */var max_insert; /* Process the input block. */for(;;){ /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */if(s.lookahead<MIN_LOOKAHEAD){fill_window(s);if(s.lookahead<MIN_LOOKAHEAD&&flush===Z_NO_FLUSH){return BS_NEED_MORE;}if(s.lookahead===0){break;} /* flush the current block */} /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */hash_head=0 /*NIL*/;if(s.lookahead>=MIN_MATCH){ /*** INSERT_STRING(s, s.strstart, hash_head); ***/s.ins_h=(s.ins_h<<s.hash_shift^s.window[s.strstart+MIN_MATCH-1])&s.hash_mask;hash_head=s.prev[s.strstart&s.w_mask]=s.head[s.ins_h];s.head[s.ins_h]=s.strstart; /***/} /* Find the longest match, discarding those <= prev_length.\n */s.prev_length=s.match_length;s.prev_match=s.match_start;s.match_length=MIN_MATCH-1;if(hash_head!==0 /*NIL*/&&s.prev_length<s.max_lazy_match&&s.strstart-hash_head<=s.w_size-MIN_LOOKAHEAD /*MAX_DIST(s)*/){ /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */s.match_length=longest_match(s,hash_head); /* longest_match() sets match_start */if(s.match_length<=5&&(s.strategy===Z_FILTERED||s.match_length===MIN_MATCH&&s.strstart-s.match_start>4096 /*TOO_FAR*/)){ /* If prev_match is also MIN_MATCH, match_start is garbage\n * but we will ignore the current match anyway.\n */s.match_length=MIN_MATCH-1;}} /* If there was a match at the previous step and the current\n * match is not better, output the previous match:\n */if(s.prev_length>=MIN_MATCH&&s.match_length<=s.prev_length){max_insert=s.strstart+s.lookahead-MIN_MATCH; /* Do not insert strings in hash table beyond this. */ //check_match(s, s.strstart-1, s.prev_match, s.prev_length);\n /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,\n s.prev_length - MIN_MATCH, bflush);***/bflush=trees._tr_tally(s,s.strstart-1-s.prev_match,s.prev_length-MIN_MATCH); /* Insert in hash table all strings up to the end of the match.\n * strstart-1 and strstart are already inserted. If there is not\n * enough lookahead, the last two strings are not inserted in\n * the hash table.\n */s.lookahead-=s.prev_length-1;s.prev_length-=2;do {if(++s.strstart<=max_insert){ /*** INSERT_STRING(s, s.strstart, hash_head); ***/s.ins_h=(s.ins_h<<s.hash_shift^s.window[s.strstart+MIN_MATCH-1])&s.hash_mask;hash_head=s.prev[s.strstart&s.w_mask]=s.head[s.ins_h];s.head[s.ins_h]=s.strstart; /***/}}while(--s.prev_length!==0);s.match_available=0;s.match_length=MIN_MATCH-1;s.strstart++;if(bflush){ /*** FLUSH_BLOCK(s, 0); ***/flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE;} /***/}}else if(s.match_available){ /* If there was no match at the previous position, output a\n * single literal. If there was a match but the current match\n * is longer, truncate the previous match to a single literal.\n */ //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/bflush=trees._tr_tally(s,0,s.window[s.strstart-1]);if(bflush){ /*** FLUSH_BLOCK_ONLY(s, 0) ***/flush_block_only(s,false); /***/}s.strstart++;s.lookahead--;if(s.strm.avail_out===0){return BS_NEED_MORE;}}else { /* There is no previous match to compare with, wait for\n * the next step to decide.\n */s.match_available=1;s.strstart++;s.lookahead--;}} //Assert (flush != Z_NO_FLUSH, \"no flush?\");\n if(s.match_available){ //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/bflush=trees._tr_tally(s,0,s.window[s.strstart-1]);s.match_available=0;}s.insert=s.strstart<MIN_MATCH-1?s.strstart:MIN_MATCH-1;if(flush===Z_FINISH){ /*** FLUSH_BLOCK(s, 1); ***/flush_block_only(s,true);if(s.strm.avail_out===0){return BS_FINISH_STARTED;} /***/return BS_FINISH_DONE;}if(s.last_lit){ /*** FLUSH_BLOCK(s, 0); ***/flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE;} /***/}return BS_BLOCK_DONE;}", "title": "" }, { "docid": "b5875fcc8f56e56edd745939c1280af6", "score": "0.63360864", "text": "function deflate_slow(s,flush){var hash_head;/* head of hash chain */var bflush;/* set if current block must be flushed */var max_insert;/* Process the input block. */for(;;){/* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */if(s.lookahead<MIN_LOOKAHEAD){fill_window(s);if(s.lookahead<MIN_LOOKAHEAD&&flush===Z_NO_FLUSH){return BS_NEED_MORE;}if(s.lookahead===0){break;}/* flush the current block */}/* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */hash_head=0/*NIL*/;if(s.lookahead>=MIN_MATCH){/*** INSERT_STRING(s, s.strstart, hash_head); ***/s.ins_h=(s.ins_h<<s.hash_shift^s.window[s.strstart+MIN_MATCH-1])&s.hash_mask;hash_head=s.prev[s.strstart&s.w_mask]=s.head[s.ins_h];s.head[s.ins_h]=s.strstart;/***/}/* Find the longest match, discarding those <= prev_length.\n */s.prev_length=s.match_length;s.prev_match=s.match_start;s.match_length=MIN_MATCH-1;if(hash_head!==0/*NIL*/&&s.prev_length<s.max_lazy_match&&s.strstart-hash_head<=s.w_size-MIN_LOOKAHEAD/*MAX_DIST(s)*/){/* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */s.match_length=longest_match(s,hash_head);/* longest_match() sets match_start */if(s.match_length<=5&&(s.strategy===Z_FILTERED||s.match_length===MIN_MATCH&&s.strstart-s.match_start>4096/*TOO_FAR*/)){/* If prev_match is also MIN_MATCH, match_start is garbage\n * but we will ignore the current match anyway.\n */s.match_length=MIN_MATCH-1;}}/* If there was a match at the previous step and the current\n * match is not better, output the previous match:\n */if(s.prev_length>=MIN_MATCH&&s.match_length<=s.prev_length){max_insert=s.strstart+s.lookahead-MIN_MATCH;/* Do not insert strings in hash table beyond this. *///check_match(s, s.strstart-1, s.prev_match, s.prev_length);\n/***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,\n s.prev_length - MIN_MATCH, bflush);***/bflush=trees._tr_tally(s,s.strstart-1-s.prev_match,s.prev_length-MIN_MATCH);/* Insert in hash table all strings up to the end of the match.\n * strstart-1 and strstart are already inserted. If there is not\n * enough lookahead, the last two strings are not inserted in\n * the hash table.\n */s.lookahead-=s.prev_length-1;s.prev_length-=2;do{if(++s.strstart<=max_insert){/*** INSERT_STRING(s, s.strstart, hash_head); ***/s.ins_h=(s.ins_h<<s.hash_shift^s.window[s.strstart+MIN_MATCH-1])&s.hash_mask;hash_head=s.prev[s.strstart&s.w_mask]=s.head[s.ins_h];s.head[s.ins_h]=s.strstart;/***/}}while(--s.prev_length!==0);s.match_available=0;s.match_length=MIN_MATCH-1;s.strstart++;if(bflush){/*** FLUSH_BLOCK(s, 0); ***/flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE;}/***/}}else if(s.match_available){/* If there was no match at the previous position, output a\n * single literal. If there was a match but the current match\n * is longer, truncate the previous match to a single literal.\n *///Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n/*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/bflush=trees._tr_tally(s,0,s.window[s.strstart-1]);if(bflush){/*** FLUSH_BLOCK_ONLY(s, 0) ***/flush_block_only(s,false);/***/}s.strstart++;s.lookahead--;if(s.strm.avail_out===0){return BS_NEED_MORE;}}else{/* There is no previous match to compare with, wait for\n * the next step to decide.\n */s.match_available=1;s.strstart++;s.lookahead--;}}//Assert (flush != Z_NO_FLUSH, \"no flush?\");\nif(s.match_available){//Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n/*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/bflush=trees._tr_tally(s,0,s.window[s.strstart-1]);s.match_available=0;}s.insert=s.strstart<MIN_MATCH-1?s.strstart:MIN_MATCH-1;if(flush===Z_FINISH){/*** FLUSH_BLOCK(s, 1); ***/flush_block_only(s,true);if(s.strm.avail_out===0){return BS_FINISH_STARTED;}/***/return BS_FINISH_DONE;}if(s.last_lit){/*** FLUSH_BLOCK(s, 0); ***/flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE;}/***/}return BS_BLOCK_DONE;}", "title": "" }, { "docid": "6e9de76f1bd9c8568dadc40116c7e688", "score": "0.6324905", "text": "function deflate_fast(s,flush){var hash_head; /* head of the hash chain */var bflush; /* set if current block must be flushed */for(;;){ /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */if(s.lookahead<MIN_LOOKAHEAD){fill_window(s);if(s.lookahead<MIN_LOOKAHEAD&&flush===Z_NO_FLUSH){return BS_NEED_MORE;}if(s.lookahead===0){break; /* flush the current block */}} /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */hash_head=0 /*NIL*/;if(s.lookahead>=MIN_MATCH){ /*** INSERT_STRING(s, s.strstart, hash_head); ***/s.ins_h=(s.ins_h<<s.hash_shift^s.window[s.strstart+MIN_MATCH-1])&s.hash_mask;hash_head=s.prev[s.strstart&s.w_mask]=s.head[s.ins_h];s.head[s.ins_h]=s.strstart; /***/} /* Find the longest match, discarding those <= prev_length.\n * At this point we have always match_length < MIN_MATCH\n */if(hash_head!==0 /*NIL*/&&s.strstart-hash_head<=s.w_size-MIN_LOOKAHEAD){ /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */s.match_length=longest_match(s,hash_head); /* longest_match() sets match_start */}if(s.match_length>=MIN_MATCH){ // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only\n /*** _tr_tally_dist(s, s.strstart - s.match_start,\n s.match_length - MIN_MATCH, bflush); ***/bflush=trees._tr_tally(s,s.strstart-s.match_start,s.match_length-MIN_MATCH);s.lookahead-=s.match_length; /* Insert new strings in the hash table only if the match length\n * is not too large. This saves time but degrades compression.\n */if(s.match_length<=s.max_lazy_match /*max_insert_length*/&&s.lookahead>=MIN_MATCH){s.match_length--; /* string at strstart already in table */do {s.strstart++; /*** INSERT_STRING(s, s.strstart, hash_head); ***/s.ins_h=(s.ins_h<<s.hash_shift^s.window[s.strstart+MIN_MATCH-1])&s.hash_mask;hash_head=s.prev[s.strstart&s.w_mask]=s.head[s.ins_h];s.head[s.ins_h]=s.strstart; /***/ /* strstart never exceeds WSIZE-MAX_MATCH, so there are\n * always MIN_MATCH bytes ahead.\n */}while(--s.match_length!==0);s.strstart++;}else {s.strstart+=s.match_length;s.match_length=0;s.ins_h=s.window[s.strstart]; /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */s.ins_h=(s.ins_h<<s.hash_shift^s.window[s.strstart+1])&s.hash_mask; //#if MIN_MATCH != 3\n // Call UPDATE_HASH() MIN_MATCH-3 more times\n //#endif\n /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not\n * matter since it will be recomputed at next deflate call.\n */}}else { /* No match, output a literal byte */ //Tracevv((stderr,\"%c\", s.window[s.strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/bflush=trees._tr_tally(s,0,s.window[s.strstart]);s.lookahead--;s.strstart++;}if(bflush){ /*** FLUSH_BLOCK(s, 0); ***/flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE;} /***/}}s.insert=s.strstart<MIN_MATCH-1?s.strstart:MIN_MATCH-1;if(flush===Z_FINISH){ /*** FLUSH_BLOCK(s, 1); ***/flush_block_only(s,true);if(s.strm.avail_out===0){return BS_FINISH_STARTED;} /***/return BS_FINISH_DONE;}if(s.last_lit){ /*** FLUSH_BLOCK(s, 0); ***/flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE;} /***/}return BS_BLOCK_DONE;}", "title": "" }, { "docid": "39d3eb427d406db4ac7956f186e744f6", "score": "0.63008136", "text": "function deflate_huff(s,flush){var bflush;/* set if current block must be flushed */for(;;){/* Make sure that we have a literal to write. */if(s.lookahead===0){fill_window(s);if(s.lookahead===0){if(flush===Z_NO_FLUSH){return BS_NEED_MORE;}break;/* flush the current block */}}/* Output a literal byte */s.match_length=0;//Tracevv((stderr,\"%c\", s->window[s->strstart]));\n/*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/bflush=trees._tr_tally(s,0,s.window[s.strstart]);s.lookahead--;s.strstart++;if(bflush){/*** FLUSH_BLOCK(s, 0); ***/flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE;}/***/}}s.insert=0;if(flush===Z_FINISH){/*** FLUSH_BLOCK(s, 1); ***/flush_block_only(s,true);if(s.strm.avail_out===0){return BS_FINISH_STARTED;}/***/return BS_FINISH_DONE;}if(s.last_lit){/*** FLUSH_BLOCK(s, 0); ***/flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE;}/***/}return BS_BLOCK_DONE;}", "title": "" }, { "docid": "089de3d5a95902ba60afd05f61545bfb", "score": "0.62958866", "text": "function deflate_fast() {\n\t\twhile (lookahead !== 0 && qhead === null) {\n\t\t\tvar flush; // set if current block must be flushed\n\n\t\t\t// Insert the string window[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\t\t\tINSERT_STRING();\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\t// At this point we have always match_length < MIN_MATCH\n\t\t\tif (hash_head !== NIL && strstart - hash_head <= MAX_DIST) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of window index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t// longest_match() sets match_start */\n\t\t\t\tif (match_length > lookahead) {\n\t\t\t\t\tmatch_length = lookahead;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (match_length >= MIN_MATCH) {\n\t\t\t\t// check_match(strstart, match_start, match_length);\n\n\t\t\t\tflush = ct_tally(strstart - match_start, match_length - MIN_MATCH);\n\t\t\t\tlookahead -= match_length;\n\n\t\t\t\t// Insert new strings in the hash table only if the match length\n\t\t\t\t// is not too large. This saves time but degrades compression.\n\t\t\t\tif (match_length <= max_lazy_match) {\n\t\t\t\t\tmatch_length--; // string at strstart already in hash table\n\t\t\t\t\tdo {\n\t\t\t\t\t\tstrstart++;\n\t\t\t\t\t\tINSERT_STRING();\n\t\t\t\t\t\t// strstart never exceeds WSIZE-MAX_MATCH, so there are\n\t\t\t\t\t\t// always MIN_MATCH bytes ahead. If lookahead < MIN_MATCH\n\t\t\t\t\t\t// these bytes are garbage, but it does not matter since\n\t\t\t\t\t\t// the next lookahead bytes will be emitted as literals.\n\t\t\t\t\t} while (--match_length !== 0);\n\t\t\t\t\tstrstart++;\n\t\t\t\t} else {\n\t\t\t\t\tstrstart += match_length;\n\t\t\t\t\tmatch_length = 0;\n\t\t\t\t\tins_h = window[strstart] & 0xff;\n\t\t\t\t\t// UPDATE_HASH(ins_h, window[strstart + 1]);\n\t\t\t\t\tins_h = ((ins_h << H_SHIFT) ^ (window[strstart + 1] & 0xff)) & HASH_MASK;\n\n\t\t\t\t//#if MIN_MATCH !== 3\n\t\t\t\t//\t\tCall UPDATE_HASH() MIN_MATCH-3 more times\n\t\t\t\t//#endif\n\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// No match, output a literal byte */\n\t\t\t\tflush = ct_tally(0, window[strstart] & 0xff);\n\t\t\t\tlookahead--;\n\t\t\t\tstrstart++;\n\t\t\t}\n\t\t\tif (flush) {\n\t\t\t\tflush_block(0);\n\t\t\t\tblock_start = strstart;\n\t\t\t}\n\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\t\t\twhile (lookahead < MIN_LOOKAHEAD && !eofile) {\n\t\t\t\tfill_window();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "69a9e1c7ef1533b219207985abb5c293", "score": "0.6285133", "text": "function deflate_fast(flush) { // 7544\n\t\t\t// short hash_head = 0; // head of the hash chain // 7545\n\t\t\tvar hash_head = 0; // head of the hash chain // 7546\n\t\t\tvar bflush; // set if current block must be flushed // 7547\n // 7548\n\t\t\twhile (true) { // 7549\n\t\t\t\t// Make sure that we always have enough lookahead, except // 7550\n\t\t\t\t// at the end of the input file. We need MAX_MATCH bytes // 7551\n\t\t\t\t// for the next match, plus MIN_MATCH bytes to insert the // 7552\n\t\t\t\t// string following the next match. // 7553\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD) { // 7554\n\t\t\t\t\tfill_window(); // 7555\n\t\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) { // 7556\n\t\t\t\t\t\treturn NeedMore; // 7557\n\t\t\t\t\t} // 7558\n\t\t\t\t\tif (lookahead === 0) // 7559\n\t\t\t\t\t\tbreak; // flush the current block // 7560\n\t\t\t\t} // 7561\n // 7562\n\t\t\t\t// Insert the string window[strstart .. strstart+2] in the // 7563\n\t\t\t\t// dictionary, and set hash_head to the head of the hash chain: // 7564\n\t\t\t\tif (lookahead >= MIN_MATCH) { // 7565\n\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (window[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask; // 7566\n // 7567\n\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h]; // 7568\n\t\t\t\t\thash_head = (head[ins_h] & 0xffff); // 7569\n\t\t\t\t\tprev[strstart & w_mask] = head[ins_h]; // 7570\n\t\t\t\t\thead[ins_h] = strstart; // 7571\n\t\t\t\t} // 7572\n // 7573\n\t\t\t\t// Find the longest match, discarding those <= prev_length. // 7574\n\t\t\t\t// At this point we have always match_length < MIN_MATCH // 7575\n // 7576\n\t\t\t\tif (hash_head !== 0 && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) { // 7577\n\t\t\t\t\t// To simplify the code, we prevent matches with the string // 7578\n\t\t\t\t\t// of window index 0 (in particular we have to avoid a match // 7579\n\t\t\t\t\t// of the string with itself at the start of the input file). // 7580\n\t\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) { // 7581\n\t\t\t\t\t\tmatch_length = longest_match(hash_head); // 7582\n\t\t\t\t\t} // 7583\n\t\t\t\t\t// longest_match() sets match_start // 7584\n\t\t\t\t} // 7585\n\t\t\t\tif (match_length >= MIN_MATCH) { // 7586\n\t\t\t\t\t// check_match(strstart, match_start, match_length); // 7587\n // 7588\n\t\t\t\t\tbflush = _tr_tally(strstart - match_start, match_length - MIN_MATCH); // 7589\n // 7590\n\t\t\t\t\tlookahead -= match_length; // 7591\n // 7592\n\t\t\t\t\t// Insert new strings in the hash table only if the match length // 7593\n\t\t\t\t\t// is not too large. This saves time but degrades compression. // 7594\n\t\t\t\t\tif (match_length <= max_lazy_match && lookahead >= MIN_MATCH) { // 7595\n\t\t\t\t\t\tmatch_length--; // string at strstart already in hash table // 7596\n\t\t\t\t\t\tdo { // 7597\n\t\t\t\t\t\t\tstrstart++; // 7598\n // 7599\n\t\t\t\t\t\t\tins_h = ((ins_h << hash_shift) ^ (window[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask; // 7600\n\t\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h]; // 7601\n\t\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff); // 7602\n\t\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h]; // 7603\n\t\t\t\t\t\t\thead[ins_h] = strstart; // 7604\n // 7605\n\t\t\t\t\t\t\t// strstart never exceeds WSIZE-MAX_MATCH, so there are // 7606\n\t\t\t\t\t\t\t// always MIN_MATCH bytes ahead. // 7607\n\t\t\t\t\t\t} while (--match_length !== 0); // 7608\n\t\t\t\t\t\tstrstart++; // 7609\n\t\t\t\t\t} else { // 7610\n\t\t\t\t\t\tstrstart += match_length; // 7611\n\t\t\t\t\t\tmatch_length = 0; // 7612\n\t\t\t\t\t\tins_h = window[strstart] & 0xff; // 7613\n // 7614\n\t\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (window[strstart + 1] & 0xff)) & hash_mask; // 7615\n\t\t\t\t\t\t// If lookahead < MIN_MATCH, ins_h is garbage, but it does // 7616\n\t\t\t\t\t\t// not // 7617\n\t\t\t\t\t\t// matter since it will be recomputed at next deflate call. // 7618\n\t\t\t\t\t} // 7619\n\t\t\t\t} else { // 7620\n\t\t\t\t\t// No match, output a literal byte // 7621\n // 7622\n\t\t\t\t\tbflush = _tr_tally(0, window[strstart] & 0xff); // 7623\n\t\t\t\t\tlookahead--; // 7624\n\t\t\t\t\tstrstart++; // 7625\n\t\t\t\t} // 7626\n\t\t\t\tif (bflush) { // 7627\n // 7628\n\t\t\t\t\tflush_block_only(false); // 7629\n\t\t\t\t\tif (strm.avail_out === 0) // 7630\n\t\t\t\t\t\treturn NeedMore; // 7631\n\t\t\t\t} // 7632\n\t\t\t} // 7633\n // 7634\n\t\t\tflush_block_only(flush == Z_FINISH); // 7635\n\t\t\tif (strm.avail_out === 0) { // 7636\n\t\t\t\tif (flush == Z_FINISH) // 7637\n\t\t\t\t\treturn FinishStarted; // 7638\n\t\t\t\telse // 7639\n\t\t\t\t\treturn NeedMore; // 7640\n\t\t\t} // 7641\n\t\t\treturn flush == Z_FINISH ? FinishDone : BlockDone; // 7642\n\t\t} // 7643", "title": "" }, { "docid": "996d216f60077e0f6be64512d31cc0a2", "score": "0.6256748", "text": "function deflate_slow(flush) { // 7648\n\t\t\t// short hash_head = 0; // head of hash chain // 7649\n\t\t\tvar hash_head = 0; // head of hash chain // 7650\n\t\t\tvar bflush; // set if current block must be flushed // 7651\n\t\t\tvar max_insert; // 7652\n // 7653\n\t\t\t// Process the input block. // 7654\n\t\t\twhile (true) { // 7655\n\t\t\t\t// Make sure that we always have enough lookahead, except // 7656\n\t\t\t\t// at the end of the input file. We need MAX_MATCH bytes // 7657\n\t\t\t\t// for the next match, plus MIN_MATCH bytes to insert the // 7658\n\t\t\t\t// string following the next match. // 7659\n // 7660\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD) { // 7661\n\t\t\t\t\tfill_window(); // 7662\n\t\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) { // 7663\n\t\t\t\t\t\treturn NeedMore; // 7664\n\t\t\t\t\t} // 7665\n\t\t\t\t\tif (lookahead === 0) // 7666\n\t\t\t\t\t\tbreak; // flush the current block // 7667\n\t\t\t\t} // 7668\n // 7669\n\t\t\t\t// Insert the string window[strstart .. strstart+2] in the // 7670\n\t\t\t\t// dictionary, and set hash_head to the head of the hash chain: // 7671\n // 7672\n\t\t\t\tif (lookahead >= MIN_MATCH) { // 7673\n\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (window[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask; // 7674\n\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h]; // 7675\n\t\t\t\t\thash_head = (head[ins_h] & 0xffff); // 7676\n\t\t\t\t\tprev[strstart & w_mask] = head[ins_h]; // 7677\n\t\t\t\t\thead[ins_h] = strstart; // 7678\n\t\t\t\t} // 7679\n // 7680\n\t\t\t\t// Find the longest match, discarding those <= prev_length. // 7681\n\t\t\t\tprev_length = match_length; // 7682\n\t\t\t\tprev_match = match_start; // 7683\n\t\t\t\tmatch_length = MIN_MATCH - 1; // 7684\n // 7685\n\t\t\t\tif (hash_head !== 0 && prev_length < max_lazy_match && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t\t// To simplify the code, we prevent matches with the string // 7687\n\t\t\t\t\t// of window index 0 (in particular we have to avoid a match // 7688\n\t\t\t\t\t// of the string with itself at the start of the input file). // 7689\n // 7690\n\t\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) { // 7691\n\t\t\t\t\t\tmatch_length = longest_match(hash_head); // 7692\n\t\t\t\t\t} // 7693\n\t\t\t\t\t// longest_match() sets match_start // 7694\n // 7695\n\t\t\t\t\tif (match_length <= 5 && (strategy == Z_FILTERED || (match_length == MIN_MATCH && strstart - match_start > 4096))) {\n // 7697\n\t\t\t\t\t\t// If prev_match is also MIN_MATCH, match_start is garbage // 7698\n\t\t\t\t\t\t// but we will ignore the current match anyway. // 7699\n\t\t\t\t\t\tmatch_length = MIN_MATCH - 1; // 7700\n\t\t\t\t\t} // 7701\n\t\t\t\t} // 7702\n // 7703\n\t\t\t\t// If there was a match at the previous step and the current // 7704\n\t\t\t\t// match is not better, output the previous match: // 7705\n\t\t\t\tif (prev_length >= MIN_MATCH && match_length <= prev_length) { // 7706\n\t\t\t\t\tmax_insert = strstart + lookahead - MIN_MATCH; // 7707\n\t\t\t\t\t// Do not insert strings in hash table beyond this. // 7708\n // 7709\n\t\t\t\t\t// check_match(strstart-1, prev_match, prev_length); // 7710\n // 7711\n\t\t\t\t\tbflush = _tr_tally(strstart - 1 - prev_match, prev_length - MIN_MATCH); // 7712\n // 7713\n\t\t\t\t\t// Insert in hash table all strings up to the end of the match. // 7714\n\t\t\t\t\t// strstart-1 and strstart are already inserted. If there is not // 7715\n\t\t\t\t\t// enough lookahead, the last two strings are not inserted in // 7716\n\t\t\t\t\t// the hash table. // 7717\n\t\t\t\t\tlookahead -= prev_length - 1; // 7718\n\t\t\t\t\tprev_length -= 2; // 7719\n\t\t\t\t\tdo { // 7720\n\t\t\t\t\t\tif (++strstart <= max_insert) { // 7721\n\t\t\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (window[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask; // 7722\n\t\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h]; // 7723\n\t\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff); // 7724\n\t\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h]; // 7725\n\t\t\t\t\t\t\thead[ins_h] = strstart; // 7726\n\t\t\t\t\t\t} // 7727\n\t\t\t\t\t} while (--prev_length !== 0); // 7728\n\t\t\t\t\tmatch_available = 0; // 7729\n\t\t\t\t\tmatch_length = MIN_MATCH - 1; // 7730\n\t\t\t\t\tstrstart++; // 7731\n // 7732\n\t\t\t\t\tif (bflush) { // 7733\n\t\t\t\t\t\tflush_block_only(false); // 7734\n\t\t\t\t\t\tif (strm.avail_out === 0) // 7735\n\t\t\t\t\t\t\treturn NeedMore; // 7736\n\t\t\t\t\t} // 7737\n\t\t\t\t} else if (match_available !== 0) { // 7738\n // 7739\n\t\t\t\t\t// If there was no match at the previous position, output a // 7740\n\t\t\t\t\t// single literal. If there was a match but the current match // 7741\n\t\t\t\t\t// is longer, truncate the previous match to a single literal. // 7742\n // 7743\n\t\t\t\t\tbflush = _tr_tally(0, window[strstart - 1] & 0xff); // 7744\n // 7745\n\t\t\t\t\tif (bflush) { // 7746\n\t\t\t\t\t\tflush_block_only(false); // 7747\n\t\t\t\t\t} // 7748\n\t\t\t\t\tstrstart++; // 7749\n\t\t\t\t\tlookahead--; // 7750\n\t\t\t\t\tif (strm.avail_out === 0) // 7751\n\t\t\t\t\t\treturn NeedMore; // 7752\n\t\t\t\t} else { // 7753\n\t\t\t\t\t// There is no previous match to compare with, wait for // 7754\n\t\t\t\t\t// the next step to decide. // 7755\n // 7756\n\t\t\t\t\tmatch_available = 1; // 7757\n\t\t\t\t\tstrstart++; // 7758\n\t\t\t\t\tlookahead--; // 7759\n\t\t\t\t} // 7760\n\t\t\t} // 7761\n // 7762\n\t\t\tif (match_available !== 0) { // 7763\n\t\t\t\tbflush = _tr_tally(0, window[strstart - 1] & 0xff); // 7764\n\t\t\t\tmatch_available = 0; // 7765\n\t\t\t} // 7766\n\t\t\tflush_block_only(flush == Z_FINISH); // 7767\n // 7768\n\t\t\tif (strm.avail_out === 0) { // 7769\n\t\t\t\tif (flush == Z_FINISH) // 7770\n\t\t\t\t\treturn FinishStarted; // 7771\n\t\t\t\telse // 7772\n\t\t\t\t\treturn NeedMore; // 7773\n\t\t\t} // 7774\n // 7775\n\t\t\treturn flush == Z_FINISH ? FinishDone : BlockDone; // 7776\n\t\t} // 7777", "title": "" }, { "docid": "6346b5cc9c22a5fd9483b95c691f8623", "score": "0.6236765", "text": "function deflate_huff(s,flush){var bflush; /* set if current block must be flushed */for(;;){ /* Make sure that we have a literal to write. */if(s.lookahead===0){fill_window(s);if(s.lookahead===0){if(flush===Z_NO_FLUSH){return BS_NEED_MORE;}break; /* flush the current block */}} /* Output a literal byte */s.match_length=0; //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/bflush=trees._tr_tally(s,0,s.window[s.strstart]);s.lookahead--;s.strstart++;if(bflush){ /*** FLUSH_BLOCK(s, 0); ***/flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE;} /***/}}s.insert=0;if(flush===Z_FINISH){ /*** FLUSH_BLOCK(s, 1); ***/flush_block_only(s,true);if(s.strm.avail_out===0){return BS_FINISH_STARTED;} /***/return BS_FINISH_DONE;}if(s.last_lit){ /*** FLUSH_BLOCK(s, 0); ***/flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE;} /***/}return BS_BLOCK_DONE;}", "title": "" }, { "docid": "bac85495ac5b35a0254eece07ea40eac", "score": "0.61491644", "text": "function _tr_tally(s,dist,lc)// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{//var out_length, in_length, dcode;\ns.pending_buf[s.d_buf+s.last_lit*2]=dist>>>8&0xff;s.pending_buf[s.d_buf+s.last_lit*2+1]=dist&0xff;s.pending_buf[s.l_buf+s.last_lit]=lc&0xff;s.last_lit++;if(dist===0){/* lc is the unmatched char */s.dyn_ltree[lc*2]/*.Freq*/++;}else{s.matches++;/* Here, lc is the match length - MIN_MATCH */dist--;/* dist = match distance - 1 *///Assert((ush)dist < (ush)MAX_DIST(s) &&\n// (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n// (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\ns.dyn_ltree[(_length_code[lc]+LITERALS+1)*2]/*.Freq*/++;s.dyn_dtree[d_code(dist)*2]/*.Freq*/++;}// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\nreturn s.last_lit===s.lit_bufsize-1;/* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */}", "title": "" }, { "docid": "4254af3c63cc5499505022c18230476f", "score": "0.6139467", "text": "function p(e,t){var n=e.max_chain_length,i=e.strstart,a=e.prev_length,r=e.nice_match,s=e.strstart>e.w_size-Q?e.strstart-(e.w_size-Q):0/*NIL*/,o=e.window,l=e.w_mask,d=e.prev,c=e.strstart+$,p=o[i+a-1],h=o[i+a],u,m;/* max hash chain length *//* current string *//* matched string *//* length of current match *//* best match length so far *//* stop if match long enough */// shortcut\n/* Stop when cur_match becomes <= limit. To simplify the code,\n\t * we prevent matches with the string of window index 0.\n\t */e.prev_length>=e.good_match&&(n>>=2),r>e.lookahead&&(r=e.lookahead);// Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, \"need lookahead\");\ndo{/* Skip to next match if the match length cannot increase\n\t * or if the match length is less than 2. Note that the checks below\n\t * for insufficient lookahead only occur occasionally for performance\n\t * reasons. Therefore uninitialized memory will be accessed, and\n\t * conditional jumps will be made that depend on those values.\n\t * However the length of the match is limited to the lookahead, so\n\t * the output of deflate is not affected by the uninitialized values.\n\t */if(u=t,o[u+a]!==h||o[u+a-1]!==p||o[u]!==o[i]||o[++u]!==o[i+1])continue;/* The check at best_len-1 can be removed because it will be made\n\t * again later. (This heuristic is not always a win.)\n\t * It is not necessary to compare scan[2] and match[2] since they\n\t * are always equal when the other bytes match, given that\n\t * the hash keys are equal and that HASH_BITS >= 8.\n\t */i+=2,u++;// Assert(*scan == *match, \"match[2]?\");\n/* We check for insufficient lookahead only every 8th comparison;\n\t * the 256th check will be made at strstart+258.\n\t */do;while(o[++i]===o[++u]&&o[++i]===o[++u]&&o[++i]===o[++u]&&o[++i]===o[++u]&&o[++i]===o[++u]&&o[++i]===o[++u]&&o[++i]===o[++u]&&o[++i]===o[++u]&&i<c);// Assert(scan <= s->window+(unsigned)(s->window_size-1), \"wild scan\");\nif(m=$-(c-i),i=c-$,m>a){if(e.match_start=t,a=m,m>=r)break;p=o[i+a-1],h=o[i+a]}}while((t=d[t&l])>s&&0!=--n);return a<=e.lookahead?a:e.lookahead}", "title": "" }, { "docid": "f7270f04a4e803be9ef4735a42ab0d3f", "score": "0.60885787", "text": "function zip_deflate_fast() {\n while (zip_lookahead != 0 && zip_qhead == null) {\n var flush; // set if current block must be flushed\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n zip_INSERT_STRING();\n\n /* Find the longest match, discarding those <= prev_length.\n * At this point we have always match_length < MIN_MATCH\n */\n if (zip_hash_head != zip_NIL &&\n zip_strstart - zip_hash_head <= zip_MAX_DIST) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n zip_match_length = zip_longest_match(zip_hash_head);\n /* longest_match() sets match_start */\n if (zip_match_length > zip_lookahead) { zip_match_length = zip_lookahead; }\n }\n if (zip_match_length >= zip_MIN_MATCH) {\n //\t check_match(strstart, match_start, match_length);\n\n flush = zip_ct_tally(zip_strstart - zip_match_start,\n zip_match_length - zip_MIN_MATCH);\n zip_lookahead -= zip_match_length;\n\n /* Insert new strings in the hash table only if the match length\n * is not too large. This saves time but degrades compression.\n */\n if (zip_match_length <= zip_max_lazy_match) {\n zip_match_length--; // string at strstart already in hash table\n do {\n zip_strstart++;\n zip_INSERT_STRING();\n /* strstart never exceeds WSIZE-MAX_MATCH, so there are\n * always MIN_MATCH bytes ahead. If lookahead < MIN_MATCH\n * these bytes are garbage, but it does not matter since\n * the next lookahead bytes will be emitted as literals.\n */\n } while (--zip_match_length != 0);\n zip_strstart++;\n } else {\n zip_strstart += zip_match_length;\n zip_match_length = 0;\n zip_ins_h = zip_window[zip_strstart] & 0xff;\n //\t\tUPDATE_HASH(ins_h, window[strstart + 1]);\n zip_ins_h = ((zip_ins_h << zip_H_SHIFT) ^ (zip_window[zip_strstart + 1] & 0xff)) & zip_HASH_MASK;\n\n //#if MIN_MATCH != 3\n //\t\tCall UPDATE_HASH() MIN_MATCH-3 more times\n //#endif\n\n }\n } else {\n /* No match, output a literal byte */\n flush = zip_ct_tally(0, zip_window[zip_strstart] & 0xff);\n zip_lookahead--;\n zip_strstart++;\n }\n if (flush) {\n zip_flush_block(0);\n zip_block_start = zip_strstart;\n }\n\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n while (zip_lookahead < zip_MIN_LOOKAHEAD && !zip_eofile) { zip_fill_window(); }\n }\n}", "title": "" }, { "docid": "cc25e8accda80aec5d2da86ceb181ae4", "score": "0.6071125", "text": "function deflate_fast(s, flush) {\n\t var hash_head; /* head of the hash chain */\n\t var bflush; /* set if current block must be flushed */\n\n\t for (;;) {\n\t /* Make sure that we always have enough lookahead, except\n\t * at the end of the input file. We need MAX_MATCH bytes\n\t * for the next match, plus MIN_MATCH bytes to insert the\n\t * string following the next match.\n\t */\n\t if (s.lookahead < MIN_LOOKAHEAD) {\n\t fill_window(s);\n\t if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n\t return BS_NEED_MORE;\n\t }\n\t if (s.lookahead === 0) {\n\t break; /* flush the current block */\n\t }\n\t }\n\n\t /* Insert the string window[strstart .. strstart+2] in the\n\t * dictionary, and set hash_head to the head of the hash chain:\n\t */\n\t hash_head = 0 /*NIL*/;\n\t if (s.lookahead >= MIN_MATCH) {\n\t /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n\t s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n\t hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n\t s.head[s.ins_h] = s.strstart;\n\t /***/\n\t }\n\n\t /* Find the longest match, discarding those <= prev_length.\n\t * At this point we have always match_length < MIN_MATCH\n\t */\n\t if (hash_head !== 0 /*NIL*/ && s.strstart - hash_head <= s.w_size - MIN_LOOKAHEAD) {\n\t /* To simplify the code, we prevent matches with the string\n\t * of window index 0 (in particular we have to avoid a match\n\t * of the string with itself at the start of the input file).\n\t */\n\t s.match_length = longest_match(s, hash_head);\n\t /* longest_match() sets match_start */\n\t }\n\t if (s.match_length >= MIN_MATCH) {\n\t // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only\n\n\t /*** _tr_tally_dist(s, s.strstart - s.match_start,\n\t s.match_length - MIN_MATCH, bflush); ***/\n\t bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH);\n\n\t s.lookahead -= s.match_length;\n\n\t /* Insert new strings in the hash table only if the match length\n\t * is not too large. This saves time but degrades compression.\n\t */\n\t if (s.match_length <= s.max_lazy_match /*max_insert_length*/ && s.lookahead >= MIN_MATCH) {\n\t s.match_length--; /* string at strstart already in table */\n\t do {\n\t s.strstart++;\n\t /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n\t s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n\t hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n\t s.head[s.ins_h] = s.strstart;\n\t /***/\n\t /* strstart never exceeds WSIZE-MAX_MATCH, so there are\n\t * always MIN_MATCH bytes ahead.\n\t */\n\t } while (--s.match_length !== 0);\n\t s.strstart++;\n\t } else {\n\t s.strstart += s.match_length;\n\t s.match_length = 0;\n\t s.ins_h = s.window[s.strstart];\n\t /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */\n\t s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + 1]) & s.hash_mask;\n\n\t //#if MIN_MATCH != 3\n\t // Call UPDATE_HASH() MIN_MATCH-3 more times\n\t //#endif\n\t /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not\n\t * matter since it will be recomputed at next deflate call.\n\t */\n\t }\n\t } else {\n\t /* No match, output a literal byte */\n\t //Tracevv((stderr,\"%c\", s.window[s.strstart]));\n\t /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n\t bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n\n\t s.lookahead--;\n\t s.strstart++;\n\t }\n\t if (bflush) {\n\t /*** FLUSH_BLOCK(s, 0); ***/\n\t flush_block_only(s, false);\n\t if (s.strm.avail_out === 0) {\n\t return BS_NEED_MORE;\n\t }\n\t /***/\n\t }\n\t }\n\t s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1;\n\t if (flush === Z_FINISH) {\n\t /*** FLUSH_BLOCK(s, 1); ***/\n\t flush_block_only(s, true);\n\t if (s.strm.avail_out === 0) {\n\t return BS_FINISH_STARTED;\n\t }\n\t /***/\n\t return BS_FINISH_DONE;\n\t }\n\t if (s.last_lit) {\n\t /*** FLUSH_BLOCK(s, 0); ***/\n\t flush_block_only(s, false);\n\t if (s.strm.avail_out === 0) {\n\t return BS_NEED_MORE;\n\t }\n\t /***/\n\t }\n\t return BS_BLOCK_DONE;\n\t }", "title": "" }, { "docid": "e89c6eb7fa181cff76630a939a0dfc1d", "score": "0.6009261", "text": "function deflate_fast(s, flush) {\n\t\t var hash_head; /* head of the hash chain */\n\t\t var bflush; /* set if current block must be flushed */\n\n\t\t for (;;) {\n\t\t /* Make sure that we always have enough lookahead, except\n\t\t * at the end of the input file. We need MAX_MATCH bytes\n\t\t * for the next match, plus MIN_MATCH bytes to insert the\n\t\t * string following the next match.\n\t\t */\n\t\t if (s.lookahead < MIN_LOOKAHEAD) {\n\t\t fill_window(s);\n\t\t if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n\t\t return BS_NEED_MORE;\n\t\t }\n\t\t if (s.lookahead === 0) {\n\t\t break; /* flush the current block */\n\t\t }\n\t\t }\n\n\t\t /* Insert the string window[strstart .. strstart+2] in the\n\t\t * dictionary, and set hash_head to the head of the hash chain:\n\t\t */\n\t\t hash_head = 0/*NIL*/;\n\t\t if (s.lookahead >= MIN_MATCH) {\n\t\t /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n\t\t s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n\t\t hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n\t\t s.head[s.ins_h] = s.strstart;\n\t\t /***/\n\t\t }\n\n\t\t /* Find the longest match, discarding those <= prev_length.\n\t\t * At this point we have always match_length < MIN_MATCH\n\t\t */\n\t\t if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) {\n\t\t /* To simplify the code, we prevent matches with the string\n\t\t * of window index 0 (in particular we have to avoid a match\n\t\t * of the string with itself at the start of the input file).\n\t\t */\n\t\t s.match_length = longest_match(s, hash_head);\n\t\t /* longest_match() sets match_start */\n\t\t }\n\t\t if (s.match_length >= MIN_MATCH) {\n\t\t // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only\n\n\t\t /*** _tr_tally_dist(s, s.strstart - s.match_start,\n\t\t s.match_length - MIN_MATCH, bflush); ***/\n\t\t bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH);\n\n\t\t s.lookahead -= s.match_length;\n\n\t\t /* Insert new strings in the hash table only if the match length\n\t\t * is not too large. This saves time but degrades compression.\n\t\t */\n\t\t if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) {\n\t\t s.match_length--; /* string at strstart already in table */\n\t\t do {\n\t\t s.strstart++;\n\t\t /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n\t\t s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n\t\t hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n\t\t s.head[s.ins_h] = s.strstart;\n\t\t /***/\n\t\t /* strstart never exceeds WSIZE-MAX_MATCH, so there are\n\t\t * always MIN_MATCH bytes ahead.\n\t\t */\n\t\t } while (--s.match_length !== 0);\n\t\t s.strstart++;\n\t\t } else\n\t\t {\n\t\t s.strstart += s.match_length;\n\t\t s.match_length = 0;\n\t\t s.ins_h = s.window[s.strstart];\n\t\t /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */\n\t\t s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask;\n\n\t\t//#if MIN_MATCH != 3\n\t\t// Call UPDATE_HASH() MIN_MATCH-3 more times\n\t\t//#endif\n\t\t /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not\n\t\t * matter since it will be recomputed at next deflate call.\n\t\t */\n\t\t }\n\t\t } else {\n\t\t /* No match, output a literal byte */\n\t\t //Tracevv((stderr,\"%c\", s.window[s.strstart]));\n\t\t /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n\t\t bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n\n\t\t s.lookahead--;\n\t\t s.strstart++;\n\t\t }\n\t\t if (bflush) {\n\t\t /*** FLUSH_BLOCK(s, 0); ***/\n\t\t flush_block_only(s, false);\n\t\t if (s.strm.avail_out === 0) {\n\t\t return BS_NEED_MORE;\n\t\t }\n\t\t /***/\n\t\t }\n\t\t }\n\t\t s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1);\n\t\t if (flush === Z_FINISH) {\n\t\t /*** FLUSH_BLOCK(s, 1); ***/\n\t\t flush_block_only(s, true);\n\t\t if (s.strm.avail_out === 0) {\n\t\t return BS_FINISH_STARTED;\n\t\t }\n\t\t /***/\n\t\t return BS_FINISH_DONE;\n\t\t }\n\t\t if (s.last_lit) {\n\t\t /*** FLUSH_BLOCK(s, 0); ***/\n\t\t flush_block_only(s, false);\n\t\t if (s.strm.avail_out === 0) {\n\t\t return BS_NEED_MORE;\n\t\t }\n\t\t /***/\n\t\t }\n\t\t return BS_BLOCK_DONE;\n\t\t}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60023284", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60023284", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60023284", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60023284", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60023284", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60023284", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60023284", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60023284", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60023284", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60023284", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60023284", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60023284", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60023284", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60023284", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60023284", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60023284", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60023284", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60023284", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60023284", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60023284", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60023284", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60023284", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60023284", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60023284", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60023284", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60023284", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60023284", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60023284", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60023284", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60023284", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60023284", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60023284", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60023284", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60023284", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60023284", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60023284", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60023284", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60023284", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "05fb943dd16efa340b425350b521a33e", "score": "0.59998447", "text": "function c(e){/* build fixed huffman tables if first call (may not be thread safe) */if(re){var t;for(se=new h.Buf32(512),oe=new h.Buf32(32),t=0;144>t;)e.lens[t++]=8;for(;256>t;)e.lens[t++]=9;for(;280>t;)e.lens[t++]=7;for(;288>t;)e.lens[t++]=8;for(f(y,e.lens,0,288,se,0,e.work,{bits:9}),t=0;32>t;)e.lens[t++]=5;f(_,e.lens,0,32,oe,0,e.work,{bits:5}),re=!1}e.lencode=se,e.lenbits=9,e.distcode=oe,e.distbits=5}", "title": "" }, { "docid": "f935c1f979813437681a3c9695ed410d", "score": "0.5991077", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "f935c1f979813437681a3c9695ed410d", "score": "0.5991077", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "f935c1f979813437681a3c9695ed410d", "score": "0.5991077", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "f935c1f979813437681a3c9695ed410d", "score": "0.5991077", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "f935c1f979813437681a3c9695ed410d", "score": "0.5991077", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "f935c1f979813437681a3c9695ed410d", "score": "0.5991077", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "f935c1f979813437681a3c9695ed410d", "score": "0.5991077", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "f935c1f979813437681a3c9695ed410d", "score": "0.5991077", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "f935c1f979813437681a3c9695ed410d", "score": "0.5991077", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "f935c1f979813437681a3c9695ed410d", "score": "0.5991077", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "f935c1f979813437681a3c9695ed410d", "score": "0.5991077", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "f935c1f979813437681a3c9695ed410d", "score": "0.5991077", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "f935c1f979813437681a3c9695ed410d", "score": "0.5991077", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "f935c1f979813437681a3c9695ed410d", "score": "0.5991077", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "f935c1f979813437681a3c9695ed410d", "score": "0.5991077", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "f935c1f979813437681a3c9695ed410d", "score": "0.5991077", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "f935c1f979813437681a3c9695ed410d", "score": "0.5991077", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "d01262dac708331c0d04304ebfdbcaa8", "score": "0.59827566", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS$1 + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "824d723e1c8f1cfe2e5878612d0e8085", "score": "0.5982217", "text": "function deflate_slow(s, flush) {\n\t var hash_head; /* head of hash chain */\n\t var bflush; /* set if current block must be flushed */\n\n\t var max_insert;\n\n\t /* Process the input block. */\n\t for (;;) {\n\t /* Make sure that we always have enough lookahead, except\n\t * at the end of the input file. We need MAX_MATCH bytes\n\t * for the next match, plus MIN_MATCH bytes to insert the\n\t * string following the next match.\n\t */\n\t if (s.lookahead < MIN_LOOKAHEAD) {\n\t fill_window(s);\n\t if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n\t return BS_NEED_MORE;\n\t }\n\t if (s.lookahead === 0) {\n\t break;\n\t } /* flush the current block */\n\t }\n\n\t /* Insert the string window[strstart .. strstart+2] in the\n\t * dictionary, and set hash_head to the head of the hash chain:\n\t */\n\t hash_head = 0 /*NIL*/;\n\t if (s.lookahead >= MIN_MATCH) {\n\t /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n\t s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n\t hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n\t s.head[s.ins_h] = s.strstart;\n\t /***/\n\t }\n\n\t /* Find the longest match, discarding those <= prev_length.\n\t */\n\t s.prev_length = s.match_length;\n\t s.prev_match = s.match_start;\n\t s.match_length = MIN_MATCH - 1;\n\n\t if (hash_head !== 0 /*NIL*/ && s.prev_length < s.max_lazy_match && s.strstart - hash_head <= s.w_size - MIN_LOOKAHEAD /*MAX_DIST(s)*/) {\n\t /* To simplify the code, we prevent matches with the string\n\t * of window index 0 (in particular we have to avoid a match\n\t * of the string with itself at the start of the input file).\n\t */\n\t s.match_length = longest_match(s, hash_head);\n\t /* longest_match() sets match_start */\n\n\t if (s.match_length <= 5 && (s.strategy === Z_FILTERED || s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096 /*TOO_FAR*/)) {\n\n\t /* If prev_match is also MIN_MATCH, match_start is garbage\n\t * but we will ignore the current match anyway.\n\t */\n\t s.match_length = MIN_MATCH - 1;\n\t }\n\t }\n\t /* If there was a match at the previous step and the current\n\t * match is not better, output the previous match:\n\t */\n\t if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) {\n\t max_insert = s.strstart + s.lookahead - MIN_MATCH;\n\t /* Do not insert strings in hash table beyond this. */\n\n\t //check_match(s, s.strstart-1, s.prev_match, s.prev_length);\n\n\t /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,\n\t s.prev_length - MIN_MATCH, bflush);***/\n\t bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH);\n\t /* Insert in hash table all strings up to the end of the match.\n\t * strstart-1 and strstart are already inserted. If there is not\n\t * enough lookahead, the last two strings are not inserted in\n\t * the hash table.\n\t */\n\t s.lookahead -= s.prev_length - 1;\n\t s.prev_length -= 2;\n\t do {\n\t if (++s.strstart <= max_insert) {\n\t /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n\t s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n\t hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n\t s.head[s.ins_h] = s.strstart;\n\t /***/\n\t }\n\t } while (--s.prev_length !== 0);\n\t s.match_available = 0;\n\t s.match_length = MIN_MATCH - 1;\n\t s.strstart++;\n\n\t if (bflush) {\n\t /*** FLUSH_BLOCK(s, 0); ***/\n\t flush_block_only(s, false);\n\t if (s.strm.avail_out === 0) {\n\t return BS_NEED_MORE;\n\t }\n\t /***/\n\t }\n\t } else if (s.match_available) {\n\t /* If there was no match at the previous position, output a\n\t * single literal. If there was a match but the current match\n\t * is longer, truncate the previous match to a single literal.\n\t */\n\t //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n\t /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n\t bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);\n\n\t if (bflush) {\n\t /*** FLUSH_BLOCK_ONLY(s, 0) ***/\n\t flush_block_only(s, false);\n\t /***/\n\t }\n\t s.strstart++;\n\t s.lookahead--;\n\t if (s.strm.avail_out === 0) {\n\t return BS_NEED_MORE;\n\t }\n\t } else {\n\t /* There is no previous match to compare with, wait for\n\t * the next step to decide.\n\t */\n\t s.match_available = 1;\n\t s.strstart++;\n\t s.lookahead--;\n\t }\n\t }\n\t //Assert (flush != Z_NO_FLUSH, \"no flush?\");\n\t if (s.match_available) {\n\t //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n\t /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n\t bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);\n\n\t s.match_available = 0;\n\t }\n\t s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1;\n\t if (flush === Z_FINISH) {\n\t /*** FLUSH_BLOCK(s, 1); ***/\n\t flush_block_only(s, true);\n\t if (s.strm.avail_out === 0) {\n\t return BS_FINISH_STARTED;\n\t }\n\t /***/\n\t return BS_FINISH_DONE;\n\t }\n\t if (s.last_lit) {\n\t /*** FLUSH_BLOCK(s, 0); ***/\n\t flush_block_only(s, false);\n\t if (s.strm.avail_out === 0) {\n\t return BS_NEED_MORE;\n\t }\n\t /***/\n\t }\n\n\t return BS_BLOCK_DONE;\n\t }", "title": "" }, { "docid": "6d4d49cae14a7b467e8df3789fe081a1", "score": "0.59699166", "text": "function _tr_tally(s, dist, lc)\r\n// deflate_state *s;\r\n// unsigned dist; /* distance of matched string */\r\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\r\n{\r\n //var out_length, in_length, dcode;\r\n\r\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\r\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\r\n\r\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\r\n s.last_lit++;\r\n\r\n if (dist === 0) {\r\n /* lc is the unmatched char */\r\n s.dyn_ltree[lc * 2]/*.Freq*/++;\r\n } else {\r\n s.matches++;\r\n /* Here, lc is the match length - MIN_MATCH */\r\n dist--; /* dist = match distance - 1 */\r\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\r\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\r\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\r\n\r\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\r\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\r\n }\r\n\r\n// (!) This block is disabled in zlib defailts,\r\n// don't enable it for binary compatibility\r\n\r\n//#ifdef TRUNCATE_BLOCK\r\n// /* Try to guess if it is profitable to stop the current block here */\r\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\r\n// /* Compute an upper bound for the compressed length */\r\n// out_length = s.last_lit*8;\r\n// in_length = s.strstart - s.block_start;\r\n//\r\n// for (dcode = 0; dcode < D_CODES; dcode++) {\r\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\r\n// }\r\n// out_length >>>= 3;\r\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\r\n// // s->last_lit, in_length, out_length,\r\n// // 100L - out_length*100L/in_length));\r\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\r\n// return true;\r\n// }\r\n// }\r\n//#endif\r\n\r\n return (s.last_lit === s.lit_bufsize - 1);\r\n /* We avoid equality with lit_bufsize because of wraparound at 64K\r\n * on 16 bit machines and because stored blocks are restricted to\r\n * 64K-1 bytes.\r\n */\r\n}", "title": "" }, { "docid": "1ca562601a9666b520a9ec46dd90b9c6", "score": "0.5963626", "text": "function _tr_tally(s, dist, lc)\r\n// deflate_state *s;\r\n// unsigned dist; /* distance of matched string */\r\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\r\n{\r\n //var out_length, in_length, dcode;\r\n\r\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\r\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\r\n\r\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\r\n s.last_lit++;\r\n\r\n if (dist === 0) {\r\n /* lc is the unmatched char */\r\n s.dyn_ltree[lc * 2]/*.Freq*/++;\r\n } else {\r\n s.matches++;\r\n /* Here, lc is the match length - MIN_MATCH */\r\n dist--; /* dist = match distance - 1 */\r\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\r\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\r\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\r\n\r\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\r\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\r\n }\r\n\r\n// (!) This block is disabled in zlib defaults,\r\n// don't enable it for binary compatibility\r\n\r\n//#ifdef TRUNCATE_BLOCK\r\n// /* Try to guess if it is profitable to stop the current block here */\r\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\r\n// /* Compute an upper bound for the compressed length */\r\n// out_length = s.last_lit*8;\r\n// in_length = s.strstart - s.block_start;\r\n//\r\n// for (dcode = 0; dcode < D_CODES; dcode++) {\r\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\r\n// }\r\n// out_length >>>= 3;\r\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\r\n// // s->last_lit, in_length, out_length,\r\n// // 100L - out_length*100L/in_length));\r\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\r\n// return true;\r\n// }\r\n// }\r\n//#endif\r\n\r\n return (s.last_lit === s.lit_bufsize - 1);\r\n /* We avoid equality with lit_bufsize because of wraparound at 64K\r\n * on 16 bit machines and because stored blocks are restricted to\r\n * 64K-1 bytes.\r\n */\r\n}", "title": "" }, { "docid": "745adf751257bd1075cb5cd6d7e4a7de", "score": "0.59459513", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc*2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize-1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "745adf751257bd1075cb5cd6d7e4a7de", "score": "0.59459513", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc*2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize-1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "745adf751257bd1075cb5cd6d7e4a7de", "score": "0.59459513", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc*2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize-1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "745adf751257bd1075cb5cd6d7e4a7de", "score": "0.59459513", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc*2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize-1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "745adf751257bd1075cb5cd6d7e4a7de", "score": "0.59459513", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc*2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize-1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "745adf751257bd1075cb5cd6d7e4a7de", "score": "0.59459513", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc*2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize-1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "745adf751257bd1075cb5cd6d7e4a7de", "score": "0.59459513", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc*2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize-1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "745adf751257bd1075cb5cd6d7e4a7de", "score": "0.59459513", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc*2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize-1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "745adf751257bd1075cb5cd6d7e4a7de", "score": "0.59459513", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc*2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize-1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "745adf751257bd1075cb5cd6d7e4a7de", "score": "0.59459513", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc*2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize-1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "745adf751257bd1075cb5cd6d7e4a7de", "score": "0.59459513", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc*2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize-1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "745adf751257bd1075cb5cd6d7e4a7de", "score": "0.59459513", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc*2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize-1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "745adf751257bd1075cb5cd6d7e4a7de", "score": "0.59459513", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc*2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize-1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "745adf751257bd1075cb5cd6d7e4a7de", "score": "0.59459513", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc*2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize-1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "745adf751257bd1075cb5cd6d7e4a7de", "score": "0.59459513", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc*2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize-1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "745adf751257bd1075cb5cd6d7e4a7de", "score": "0.59459513", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc*2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize-1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "745adf751257bd1075cb5cd6d7e4a7de", "score": "0.59459513", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc*2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize-1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "745adf751257bd1075cb5cd6d7e4a7de", "score": "0.59459513", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc*2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize-1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "745adf751257bd1075cb5cd6d7e4a7de", "score": "0.59459513", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc*2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize-1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "745adf751257bd1075cb5cd6d7e4a7de", "score": "0.59459513", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc*2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize-1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "16452f6a746aec50b194579bcf75b70a", "score": "0.59120625", "text": "function deflate_slow(s, flush) {\n\t\t var hash_head; /* head of hash chain */\n\t\t var bflush; /* set if current block must be flushed */\n\n\t\t var max_insert;\n\n\t\t /* Process the input block. */\n\t\t for (;;) {\n\t\t /* Make sure that we always have enough lookahead, except\n\t\t * at the end of the input file. We need MAX_MATCH bytes\n\t\t * for the next match, plus MIN_MATCH bytes to insert the\n\t\t * string following the next match.\n\t\t */\n\t\t if (s.lookahead < MIN_LOOKAHEAD) {\n\t\t fill_window(s);\n\t\t if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n\t\t return BS_NEED_MORE;\n\t\t }\n\t\t if (s.lookahead === 0) { break; } /* flush the current block */\n\t\t }\n\n\t\t /* Insert the string window[strstart .. strstart+2] in the\n\t\t * dictionary, and set hash_head to the head of the hash chain:\n\t\t */\n\t\t hash_head = 0/*NIL*/;\n\t\t if (s.lookahead >= MIN_MATCH) {\n\t\t /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n\t\t s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n\t\t hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n\t\t s.head[s.ins_h] = s.strstart;\n\t\t /***/\n\t\t }\n\n\t\t /* Find the longest match, discarding those <= prev_length.\n\t\t */\n\t\t s.prev_length = s.match_length;\n\t\t s.prev_match = s.match_start;\n\t\t s.match_length = MIN_MATCH - 1;\n\n\t\t if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match &&\n\t\t s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) {\n\t\t /* To simplify the code, we prevent matches with the string\n\t\t * of window index 0 (in particular we have to avoid a match\n\t\t * of the string with itself at the start of the input file).\n\t\t */\n\t\t s.match_length = longest_match(s, hash_head);\n\t\t /* longest_match() sets match_start */\n\n\t\t if (s.match_length <= 5 &&\n\t\t (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) {\n\n\t\t /* If prev_match is also MIN_MATCH, match_start is garbage\n\t\t * but we will ignore the current match anyway.\n\t\t */\n\t\t s.match_length = MIN_MATCH - 1;\n\t\t }\n\t\t }\n\t\t /* If there was a match at the previous step and the current\n\t\t * match is not better, output the previous match:\n\t\t */\n\t\t if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) {\n\t\t max_insert = s.strstart + s.lookahead - MIN_MATCH;\n\t\t /* Do not insert strings in hash table beyond this. */\n\n\t\t //check_match(s, s.strstart-1, s.prev_match, s.prev_length);\n\n\t\t /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,\n\t\t s.prev_length - MIN_MATCH, bflush);***/\n\t\t bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH);\n\t\t /* Insert in hash table all strings up to the end of the match.\n\t\t * strstart-1 and strstart are already inserted. If there is not\n\t\t * enough lookahead, the last two strings are not inserted in\n\t\t * the hash table.\n\t\t */\n\t\t s.lookahead -= s.prev_length - 1;\n\t\t s.prev_length -= 2;\n\t\t do {\n\t\t if (++s.strstart <= max_insert) {\n\t\t /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n\t\t s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n\t\t hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n\t\t s.head[s.ins_h] = s.strstart;\n\t\t /***/\n\t\t }\n\t\t } while (--s.prev_length !== 0);\n\t\t s.match_available = 0;\n\t\t s.match_length = MIN_MATCH - 1;\n\t\t s.strstart++;\n\n\t\t if (bflush) {\n\t\t /*** FLUSH_BLOCK(s, 0); ***/\n\t\t flush_block_only(s, false);\n\t\t if (s.strm.avail_out === 0) {\n\t\t return BS_NEED_MORE;\n\t\t }\n\t\t /***/\n\t\t }\n\n\t\t } else if (s.match_available) {\n\t\t /* If there was no match at the previous position, output a\n\t\t * single literal. If there was a match but the current match\n\t\t * is longer, truncate the previous match to a single literal.\n\t\t */\n\t\t //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n\t\t /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n\t\t bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);\n\n\t\t if (bflush) {\n\t\t /*** FLUSH_BLOCK_ONLY(s, 0) ***/\n\t\t flush_block_only(s, false);\n\t\t /***/\n\t\t }\n\t\t s.strstart++;\n\t\t s.lookahead--;\n\t\t if (s.strm.avail_out === 0) {\n\t\t return BS_NEED_MORE;\n\t\t }\n\t\t } else {\n\t\t /* There is no previous match to compare with, wait for\n\t\t * the next step to decide.\n\t\t */\n\t\t s.match_available = 1;\n\t\t s.strstart++;\n\t\t s.lookahead--;\n\t\t }\n\t\t }\n\t\t //Assert (flush != Z_NO_FLUSH, \"no flush?\");\n\t\t if (s.match_available) {\n\t\t //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n\t\t /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n\t\t bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);\n\n\t\t s.match_available = 0;\n\t\t }\n\t\t s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1;\n\t\t if (flush === Z_FINISH) {\n\t\t /*** FLUSH_BLOCK(s, 1); ***/\n\t\t flush_block_only(s, true);\n\t\t if (s.strm.avail_out === 0) {\n\t\t return BS_FINISH_STARTED;\n\t\t }\n\t\t /***/\n\t\t return BS_FINISH_DONE;\n\t\t }\n\t\t if (s.last_lit) {\n\t\t /*** FLUSH_BLOCK(s, 0); ***/\n\t\t flush_block_only(s, false);\n\t\t if (s.strm.avail_out === 0) {\n\t\t return BS_NEED_MORE;\n\t\t }\n\t\t /***/\n\t\t }\n\n\t\t return BS_BLOCK_DONE;\n\t\t}", "title": "" } ]
d7a7b4056936bb21a8a97ae07c264dbf
Used for un/redoing changes from the history. Combines the result of computing the existing spans with the set of spans that existed in the history (so that deleting around a span and then undoing brings back the span).
[ { "docid": "f9282045dd16fca6a611ea8a41eb3489", "score": "0.0", "text": "function mergeOldSpans(doc, change) {\n\t\t\t\tvar old = getOldSpans(doc, change);\n\t\t\t\tvar stretched = stretchSpansOverChange(doc, change);\n\t\t\t\tif (!old) { return stretched }\n\t\t\t\tif (!stretched) { return old }\n\n\t\t\t\tfor (var i = 0; i < old.length; ++i) {\n\t\t\t\t\tvar oldCur = old[i], stretchCur = stretched[i];\n\t\t\t\t\tif (oldCur && stretchCur) {\n\t\t\t\t\t\tspans: for (var j = 0; j < stretchCur.length; ++j) {\n\t\t\t\t\t\t\tvar span = stretchCur[j];\n\t\t\t\t\t\t\tfor (var k = 0; k < oldCur.length; ++k) { if (oldCur[k].marker == span.marker) { continue spans } }\n\t\t\t\t\t\t\toldCur.push(span);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (stretchCur) {\n\t\t\t\t\t\told[i] = stretchCur;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn old\n\t\t\t}", "title": "" } ]
[ { "docid": "b5e849ef626c332ed85f2568bc3d5cf7", "score": "0.62928325", "text": "function removeClearedSpans(spans){if(!spans){return null;}var out;for(var i=0;i<spans.length;++i){if(spans[i].marker.explicitlyCleared){if(!out){out=spans.slice(0,i);}}else if(out){out.push(spans[i]);}}return!out?spans:out.length?out:null;}// Retrieve and filter the old marked spans stored in a change event.", "title": "" }, { "docid": "1b4a6277b230c4e851e550142b5dd898", "score": "0.61488044", "text": "function getOldSpans(doc, change) {\n\t var found = change[\"spans_\" + doc.id];\n\t if (!found) return null;\n\t for (var i = 0, nw = []; i < change.text.length; ++i)\n\t nw.push(removeClearedSpans(found[i]));\n\t return nw;\n\t }", "title": "" }, { "docid": "1b4a6277b230c4e851e550142b5dd898", "score": "0.61488044", "text": "function getOldSpans(doc, change) {\n\t var found = change[\"spans_\" + doc.id];\n\t if (!found) return null;\n\t for (var i = 0, nw = []; i < change.text.length; ++i)\n\t nw.push(removeClearedSpans(found[i]));\n\t return nw;\n\t }", "title": "" }, { "docid": "1b4a6277b230c4e851e550142b5dd898", "score": "0.61488044", "text": "function getOldSpans(doc, change) {\n\t var found = change[\"spans_\" + doc.id];\n\t if (!found) return null;\n\t for (var i = 0, nw = []; i < change.text.length; ++i)\n\t nw.push(removeClearedSpans(found[i]));\n\t return nw;\n\t }", "title": "" }, { "docid": "d1a8e78099a06def6a6ca43a78d65ba9", "score": "0.61264855", "text": "function getOldSpans(doc, change) {\n\t var found = change[\"spans_\" + doc.id];\n\t if (!found) { return null }\n\t var nw = [];\n\t for (var i = 0; i < change.text.length; ++i)\n\t { nw.push(removeClearedSpans(found[i])); }\n\t return nw\n\t }", "title": "" }, { "docid": "f774298435e4097627333347d6545a07", "score": "0.6122407", "text": "function getOldSpans(doc, change) {\r\n var found = change[\"spans_\" + doc.id];\n if (!found) return null;\n for (var i = 0, nw = []; i < change.text.length; ++i)\n nw.push(removeClearedSpans(found[i]));\n return nw;\r\n }", "title": "" }, { "docid": "6cae545f018d78e116a20f8da818cc29", "score": "0.60749424", "text": "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) return null;\n for (var i = 0, nw = []; i < change.text.length; ++i)\n nw.push(removeClearedSpans(found[i]));\n return nw;\n }", "title": "" }, { "docid": "6cae545f018d78e116a20f8da818cc29", "score": "0.60749424", "text": "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) return null;\n for (var i = 0, nw = []; i < change.text.length; ++i)\n nw.push(removeClearedSpans(found[i]));\n return nw;\n }", "title": "" }, { "docid": "6cae545f018d78e116a20f8da818cc29", "score": "0.60749424", "text": "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) return null;\n for (var i = 0, nw = []; i < change.text.length; ++i)\n nw.push(removeClearedSpans(found[i]));\n return nw;\n }", "title": "" }, { "docid": "6cae545f018d78e116a20f8da818cc29", "score": "0.60749424", "text": "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) return null;\n for (var i = 0, nw = []; i < change.text.length; ++i)\n nw.push(removeClearedSpans(found[i]));\n return nw;\n }", "title": "" }, { "docid": "6cae545f018d78e116a20f8da818cc29", "score": "0.60749424", "text": "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) return null;\n for (var i = 0, nw = []; i < change.text.length; ++i)\n nw.push(removeClearedSpans(found[i]));\n return nw;\n }", "title": "" }, { "docid": "6cae545f018d78e116a20f8da818cc29", "score": "0.60749424", "text": "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) return null;\n for (var i = 0, nw = []; i < change.text.length; ++i)\n nw.push(removeClearedSpans(found[i]));\n return nw;\n }", "title": "" }, { "docid": "6cae545f018d78e116a20f8da818cc29", "score": "0.60749424", "text": "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) return null;\n for (var i = 0, nw = []; i < change.text.length; ++i)\n nw.push(removeClearedSpans(found[i]));\n return nw;\n }", "title": "" }, { "docid": "6cae545f018d78e116a20f8da818cc29", "score": "0.60749424", "text": "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) return null;\n for (var i = 0, nw = []; i < change.text.length; ++i)\n nw.push(removeClearedSpans(found[i]));\n return nw;\n }", "title": "" }, { "docid": "6cae545f018d78e116a20f8da818cc29", "score": "0.60749424", "text": "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) return null;\n for (var i = 0, nw = []; i < change.text.length; ++i)\n nw.push(removeClearedSpans(found[i]));\n return nw;\n }", "title": "" }, { "docid": "6cae545f018d78e116a20f8da818cc29", "score": "0.60749424", "text": "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) return null;\n for (var i = 0, nw = []; i < change.text.length; ++i)\n nw.push(removeClearedSpans(found[i]));\n return nw;\n }", "title": "" }, { "docid": "6cae545f018d78e116a20f8da818cc29", "score": "0.60749424", "text": "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) return null;\n for (var i = 0, nw = []; i < change.text.length; ++i)\n nw.push(removeClearedSpans(found[i]));\n return nw;\n }", "title": "" }, { "docid": "6cae545f018d78e116a20f8da818cc29", "score": "0.60749424", "text": "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) return null;\n for (var i = 0, nw = []; i < change.text.length; ++i)\n nw.push(removeClearedSpans(found[i]));\n return nw;\n }", "title": "" }, { "docid": "6cae545f018d78e116a20f8da818cc29", "score": "0.60749424", "text": "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) return null;\n for (var i = 0, nw = []; i < change.text.length; ++i)\n nw.push(removeClearedSpans(found[i]));\n return nw;\n }", "title": "" }, { "docid": "6cae545f018d78e116a20f8da818cc29", "score": "0.60749424", "text": "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) return null;\n for (var i = 0, nw = []; i < change.text.length; ++i)\n nw.push(removeClearedSpans(found[i]));\n return nw;\n }", "title": "" }, { "docid": "946af7431e459d6a180887d6475b9a9a", "score": "0.6068851", "text": "function removeClearedSpans(spans) {\n if (!spans) {\n return null;\n }\n\n var out;\n\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) {\n if (!out) {\n out = spans.slice(0, i);\n }\n } else if (out) {\n out.push(spans[i]);\n }\n }\n\n return !out ? spans : out.length ? out : null;\n } // Retrieve and filter the old marked spans stored in a change event.", "title": "" }, { "docid": "e49616c6126e62bd4d48b5b7799a18b3", "score": "0.605773", "text": "function getOldSpans(doc, change) {\n\t\t\t\tvar found = change[\"spans_\" + doc.id];\n\t\t\t\tif (!found) { return null }\n\t\t\t\tvar nw = [];\n\t\t\t\tfor (var i = 0; i < change.text.length; ++i) { nw.push(removeClearedSpans(found[i])); }\n\t\t\t\treturn nw\n\t\t\t}", "title": "" }, { "docid": "e0ec4f3ffd27e60dbfc0acb5450d0350", "score": "0.60331386", "text": "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n }", "title": "" }, { "docid": "e0ec4f3ffd27e60dbfc0acb5450d0350", "score": "0.60331386", "text": "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n }", "title": "" }, { "docid": "e0ec4f3ffd27e60dbfc0acb5450d0350", "score": "0.60331386", "text": "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n }", "title": "" }, { "docid": "e0ec4f3ffd27e60dbfc0acb5450d0350", "score": "0.60331386", "text": "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n }", "title": "" }, { "docid": "e0ec4f3ffd27e60dbfc0acb5450d0350", "score": "0.60331386", "text": "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n }", "title": "" }, { "docid": "e0ec4f3ffd27e60dbfc0acb5450d0350", "score": "0.60331386", "text": "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n }", "title": "" }, { "docid": "b79f235de85827f15919903007921e26", "score": "0.60211235", "text": "function getOldSpans(doc, change) {\n\t var found = change[\"spans_\" + doc.id];\n\t if (!found) { return null }\n\t var nw = [];\n\t for (var i = 0; i < change.text.length; ++i)\n\t { nw.push(removeClearedSpans(found[i])); }\n\t return nw\n\t}", "title": "" }, { "docid": "b79f235de85827f15919903007921e26", "score": "0.60211235", "text": "function getOldSpans(doc, change) {\n\t var found = change[\"spans_\" + doc.id];\n\t if (!found) { return null }\n\t var nw = [];\n\t for (var i = 0; i < change.text.length; ++i)\n\t { nw.push(removeClearedSpans(found[i])); }\n\t return nw\n\t}", "title": "" }, { "docid": "b79f235de85827f15919903007921e26", "score": "0.60211235", "text": "function getOldSpans(doc, change) {\n\t var found = change[\"spans_\" + doc.id];\n\t if (!found) { return null }\n\t var nw = [];\n\t for (var i = 0; i < change.text.length; ++i)\n\t { nw.push(removeClearedSpans(found[i])); }\n\t return nw\n\t}", "title": "" }, { "docid": "7f7907fd6b13c631323390df9899ce97", "score": "0.6008801", "text": "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) {\n return null;\n }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i) {\n nw.push(removeClearedSpans(found[i]));\n }\n return nw;\n }", "title": "" }, { "docid": "e3a2072b5906395641e1f00ff41ee286", "score": "0.599118", "text": "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id]\n if (!found) { return null }\n var nw = []\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])) }\n return nw\n}", "title": "" }, { "docid": "e3a2072b5906395641e1f00ff41ee286", "score": "0.599118", "text": "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id]\n if (!found) { return null }\n var nw = []\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])) }\n return nw\n}", "title": "" }, { "docid": "b4c4d7e40a4ccaf07de9313bf5145797", "score": "0.5976992", "text": "function removeMarkedSpan(spans, span) {\n var r;\n\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i] != span) {\n (r || (r = [])).push(spans[i]);\n }\n }\n\n return r;\n } // Add a span to a line.", "title": "" }, { "docid": "beba8eecc797c6e6df484eb0e5124f7b", "score": "0.5965772", "text": "function mergeOldSpans(doc,change){var old=getOldSpans(doc,change);var stretched=stretchSpansOverChange(doc,change);if(!old){return stretched;}if(!stretched){return old;}for(var i=0;i<old.length;++i){var oldCur=old[i],stretchCur=stretched[i];if(oldCur&&stretchCur){spans:for(var j=0;j<stretchCur.length;++j){var span=stretchCur[j];for(var k=0;k<oldCur.length;++k){if(oldCur[k].marker==span.marker){continue spans;}}oldCur.push(span);}}else if(stretchCur){old[i]=stretchCur;}}return old;}// Used both to provide a JSON-safe object in .getHistory, and, when", "title": "" }, { "docid": "d1ca944bd78ac4ce61ad92497b2b0f84", "score": "0.5950699", "text": "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n}", "title": "" }, { "docid": "d1ca944bd78ac4ce61ad92497b2b0f84", "score": "0.5950699", "text": "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n}", "title": "" }, { "docid": "d1ca944bd78ac4ce61ad92497b2b0f84", "score": "0.5950699", "text": "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n}", "title": "" }, { "docid": "d1ca944bd78ac4ce61ad92497b2b0f84", "score": "0.5950699", "text": "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n}", "title": "" }, { "docid": "d1ca944bd78ac4ce61ad92497b2b0f84", "score": "0.5950699", "text": "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n}", "title": "" }, { "docid": "d1ca944bd78ac4ce61ad92497b2b0f84", "score": "0.5950699", "text": "function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n}", "title": "" }, { "docid": "c33ef6c64848e072110a626680738d61", "score": "0.5924256", "text": "undoHistory() {\n this.regions_info.history.undoHistory();\n }", "title": "" }, { "docid": "f3950cc1cc729b14582cfb88b9ac73cb", "score": "0.57894814", "text": "function removeMarkedSpan(spans, span) {\r\n for (var r, i = 0; i < spans.length; ++i)\n if (spans[i] != span) (r || (r = [])).push(spans[i]);\n return r;\r\n }", "title": "" }, { "docid": "c1b1f6fc4f69d7fa3777c0d39298dc25", "score": "0.57562035", "text": "function removeMarkedSpan(spans,span){var r;for(var i=0;i<spans.length;++i){if(spans[i]!=span){(r||(r=[])).push(spans[i]);}}return r;}// Add a span to a line.", "title": "" }, { "docid": "971748b4a5e31527c64a57e4bf375e4c", "score": "0.5744158", "text": "function mergeOldSpans(doc, change) {\n var old = getOldSpans(doc, change);\n var stretched = stretchSpansOverChange(doc, change);\n\n if (!old) {\n return stretched;\n }\n\n if (!stretched) {\n return old;\n }\n\n for (var i = 0; i < old.length; ++i) {\n var oldCur = old[i],\n stretchCur = stretched[i];\n\n if (oldCur && stretchCur) {\n spans: for (var j = 0; j < stretchCur.length; ++j) {\n var span = stretchCur[j];\n\n for (var k = 0; k < oldCur.length; ++k) {\n if (oldCur[k].marker == span.marker) {\n continue spans;\n }\n }\n\n oldCur.push(span);\n }\n } else if (stretchCur) {\n old[i] = stretchCur;\n }\n }\n\n return old;\n } // Used both to provide a JSON-safe object in .getHistory, and, when", "title": "" }, { "docid": "f961900cbf39a364a6b2ff769ffd24f8", "score": "0.57418865", "text": "function undo(){\n var past_dom = hist_doms[hist_idx-1]\n\n if (past_dom===undefined){return}\n // in reality would be a callback\n data2DOM(past_dom)\n\n hist_idx-=1\n //document.body.appendChild(past_dom[0])\n}", "title": "" }, { "docid": "ebb93b25d651b42255a9c2158b233ee6", "score": "0.57406944", "text": "function removeMarkedSpan(spans, span) {\n\t for (var r, i = 0; i < spans.length; ++i)\n\t if (spans[i] != span) (r || (r = [])).push(spans[i]);\n\t return r;\n\t }", "title": "" }, { "docid": "ebb93b25d651b42255a9c2158b233ee6", "score": "0.57406944", "text": "function removeMarkedSpan(spans, span) {\n\t for (var r, i = 0; i < spans.length; ++i)\n\t if (spans[i] != span) (r || (r = [])).push(spans[i]);\n\t return r;\n\t }", "title": "" }, { "docid": "ebb93b25d651b42255a9c2158b233ee6", "score": "0.57406944", "text": "function removeMarkedSpan(spans, span) {\n\t for (var r, i = 0; i < spans.length; ++i)\n\t if (spans[i] != span) (r || (r = [])).push(spans[i]);\n\t return r;\n\t }", "title": "" }, { "docid": "4344769330b8b16a061477a857954539", "score": "0.57213485", "text": "function removeMarkedSpan(spans, span) {\n\t\t\t\tvar r;\n\t\t\t\tfor (var i = 0; i < spans.length; ++i) { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n\t\t\t\treturn r\n\t\t\t}", "title": "" }, { "docid": "49036d95d8482496018b92a79522bf3d", "score": "0.57202774", "text": "function removeMarkedSpan(spans, span) {\n for (var r, i = 0; i < spans.length; ++i)\n if (spans[i] != span) (r || (r = [])).push(spans[i]);\n return r;\n }", "title": "" }, { "docid": "49036d95d8482496018b92a79522bf3d", "score": "0.57202774", "text": "function removeMarkedSpan(spans, span) {\n for (var r, i = 0; i < spans.length; ++i)\n if (spans[i] != span) (r || (r = [])).push(spans[i]);\n return r;\n }", "title": "" }, { "docid": "49036d95d8482496018b92a79522bf3d", "score": "0.57202774", "text": "function removeMarkedSpan(spans, span) {\n for (var r, i = 0; i < spans.length; ++i)\n if (spans[i] != span) (r || (r = [])).push(spans[i]);\n return r;\n }", "title": "" }, { "docid": "49036d95d8482496018b92a79522bf3d", "score": "0.57202774", "text": "function removeMarkedSpan(spans, span) {\n for (var r, i = 0; i < spans.length; ++i)\n if (spans[i] != span) (r || (r = [])).push(spans[i]);\n return r;\n }", "title": "" }, { "docid": "49036d95d8482496018b92a79522bf3d", "score": "0.57202774", "text": "function removeMarkedSpan(spans, span) {\n for (var r, i = 0; i < spans.length; ++i)\n if (spans[i] != span) (r || (r = [])).push(spans[i]);\n return r;\n }", "title": "" }, { "docid": "49036d95d8482496018b92a79522bf3d", "score": "0.57202774", "text": "function removeMarkedSpan(spans, span) {\n for (var r, i = 0; i < spans.length; ++i)\n if (spans[i] != span) (r || (r = [])).push(spans[i]);\n return r;\n }", "title": "" }, { "docid": "49036d95d8482496018b92a79522bf3d", "score": "0.57202774", "text": "function removeMarkedSpan(spans, span) {\n for (var r, i = 0; i < spans.length; ++i)\n if (spans[i] != span) (r || (r = [])).push(spans[i]);\n return r;\n }", "title": "" }, { "docid": "49036d95d8482496018b92a79522bf3d", "score": "0.57202774", "text": "function removeMarkedSpan(spans, span) {\n for (var r, i = 0; i < spans.length; ++i)\n if (spans[i] != span) (r || (r = [])).push(spans[i]);\n return r;\n }", "title": "" }, { "docid": "49036d95d8482496018b92a79522bf3d", "score": "0.57202774", "text": "function removeMarkedSpan(spans, span) {\n for (var r, i = 0; i < spans.length; ++i)\n if (spans[i] != span) (r || (r = [])).push(spans[i]);\n return r;\n }", "title": "" }, { "docid": "49036d95d8482496018b92a79522bf3d", "score": "0.57202774", "text": "function removeMarkedSpan(spans, span) {\n for (var r, i = 0; i < spans.length; ++i)\n if (spans[i] != span) (r || (r = [])).push(spans[i]);\n return r;\n }", "title": "" }, { "docid": "49036d95d8482496018b92a79522bf3d", "score": "0.57202774", "text": "function removeMarkedSpan(spans, span) {\n for (var r, i = 0; i < spans.length; ++i)\n if (spans[i] != span) (r || (r = [])).push(spans[i]);\n return r;\n }", "title": "" }, { "docid": "49036d95d8482496018b92a79522bf3d", "score": "0.57202774", "text": "function removeMarkedSpan(spans, span) {\n for (var r, i = 0; i < spans.length; ++i)\n if (spans[i] != span) (r || (r = [])).push(spans[i]);\n return r;\n }", "title": "" }, { "docid": "49036d95d8482496018b92a79522bf3d", "score": "0.57202774", "text": "function removeMarkedSpan(spans, span) {\n for (var r, i = 0; i < spans.length; ++i)\n if (spans[i] != span) (r || (r = [])).push(spans[i]);\n return r;\n }", "title": "" }, { "docid": "49036d95d8482496018b92a79522bf3d", "score": "0.57202774", "text": "function removeMarkedSpan(spans, span) {\n for (var r, i = 0; i < spans.length; ++i)\n if (spans[i] != span) (r || (r = [])).push(spans[i]);\n return r;\n }", "title": "" }, { "docid": "5cff2317cd338db47956d0b9c1edaabb", "score": "0.5719192", "text": "function removeMarkedSpan(spans, span) {\n var r;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i] != span) {\n (r || (r = [])).push(spans[i]);\n }\n }\n return r;\n }", "title": "" }, { "docid": "ab59c897955db10bb8497cbcd222fc8e", "score": "0.5705668", "text": "function removeMarkedSpan(spans, span) {\n\t var r;\n\t for (var i = 0; i < spans.length; ++i)\n\t { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n\t return r\n\t }", "title": "" }, { "docid": "971003ce459ec24602cd798f6d9565d5", "score": "0.5689967", "text": "function removeMarkedSpan(spans, span) {\n var r;\n for (var i = 0; i < spans.length; ++i)\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n return r\n }", "title": "" }, { "docid": "971003ce459ec24602cd798f6d9565d5", "score": "0.5689967", "text": "function removeMarkedSpan(spans, span) {\n var r;\n for (var i = 0; i < spans.length; ++i)\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n return r\n }", "title": "" }, { "docid": "971003ce459ec24602cd798f6d9565d5", "score": "0.5689967", "text": "function removeMarkedSpan(spans, span) {\n var r;\n for (var i = 0; i < spans.length; ++i)\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n return r\n }", "title": "" }, { "docid": "971003ce459ec24602cd798f6d9565d5", "score": "0.5689967", "text": "function removeMarkedSpan(spans, span) {\n var r;\n for (var i = 0; i < spans.length; ++i)\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n return r\n }", "title": "" }, { "docid": "971003ce459ec24602cd798f6d9565d5", "score": "0.5689967", "text": "function removeMarkedSpan(spans, span) {\n var r;\n for (var i = 0; i < spans.length; ++i)\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n return r\n }", "title": "" }, { "docid": "971003ce459ec24602cd798f6d9565d5", "score": "0.5689967", "text": "function removeMarkedSpan(spans, span) {\n var r;\n for (var i = 0; i < spans.length; ++i)\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n return r\n }", "title": "" }, { "docid": "4c41f2f60c009814bfbaa39a67eb97dd", "score": "0.5686786", "text": "redoHistory() {\n this.regions_info.history.redoHistory();\n }", "title": "" }, { "docid": "1fc7b556d943c1352207d03985f72f13", "score": "0.5671478", "text": "function removeMarkedSpan(spans, span) {\n var r\n for (var i = 0; i < spans.length; ++i)\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]) } }\n return r\n}", "title": "" }, { "docid": "1fc7b556d943c1352207d03985f72f13", "score": "0.5671478", "text": "function removeMarkedSpan(spans, span) {\n var r\n for (var i = 0; i < spans.length; ++i)\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]) } }\n return r\n}", "title": "" }, { "docid": "f5e816ec305286a4735891b81dff4cc3", "score": "0.56393397", "text": "undoHistory(){\n if(this._history.size() > 1){\n this._history.pop();\n this._ctx.putImageData(this._history.peek(), 0, 0);\n this._memCtx.putImageData(this._history.peek(), 0, 0);\n }\n }", "title": "" }, { "docid": "ea14f9df93072c462f95eeff130a4464", "score": "0.56252795", "text": "function removeMarkedSpan(spans, span) {\n var r;\n for (var i = 0; i < spans.length; ++i)\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n return r\n}", "title": "" }, { "docid": "ea14f9df93072c462f95eeff130a4464", "score": "0.56252795", "text": "function removeMarkedSpan(spans, span) {\n var r;\n for (var i = 0; i < spans.length; ++i)\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n return r\n}", "title": "" }, { "docid": "ea14f9df93072c462f95eeff130a4464", "score": "0.56252795", "text": "function removeMarkedSpan(spans, span) {\n var r;\n for (var i = 0; i < spans.length; ++i)\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n return r\n}", "title": "" }, { "docid": "ea14f9df93072c462f95eeff130a4464", "score": "0.56252795", "text": "function removeMarkedSpan(spans, span) {\n var r;\n for (var i = 0; i < spans.length; ++i)\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n return r\n}", "title": "" }, { "docid": "ea14f9df93072c462f95eeff130a4464", "score": "0.56252795", "text": "function removeMarkedSpan(spans, span) {\n var r;\n for (var i = 0; i < spans.length; ++i)\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n return r\n}", "title": "" }, { "docid": "ea14f9df93072c462f95eeff130a4464", "score": "0.56252795", "text": "function removeMarkedSpan(spans, span) {\n var r;\n for (var i = 0; i < spans.length; ++i)\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n return r\n}", "title": "" }, { "docid": "45b763f18d4753b21160062e726f4528", "score": "0.56112224", "text": "function stretchSpansOverChange(doc,change){if(change.full){return null;}var oldFirst=isLine(doc,change.from.line)&&getLine(doc,change.from.line).markedSpans;var oldLast=isLine(doc,change.to.line)&&getLine(doc,change.to.line).markedSpans;if(!oldFirst&&!oldLast){return null;}var startCh=change.from.ch,endCh=change.to.ch,isInsert=cmp(change.from,change.to)==0;// Get the spans that 'stick out' on both sides\n\tvar first=markedSpansBefore(oldFirst,startCh,isInsert);var last=markedSpansAfter(oldLast,endCh,isInsert);// Next, merge those two ends\n\tvar sameLine=change.text.length==1,offset=lst(change.text).length+(sameLine?startCh:0);if(first){// Fix up .to properties of first\n\tfor(var i=0;i<first.length;++i){var span=first[i];if(span.to==null){var found=getMarkedSpanFor(last,span.marker);if(!found){span.to=startCh;}else if(sameLine){span.to=found.to==null?null:found.to+offset;}}}}if(last){// Fix up .from in last (or move them into first in case of sameLine)\n\tfor(var i$1=0;i$1<last.length;++i$1){var span$1=last[i$1];if(span$1.to!=null){span$1.to+=offset;}if(span$1.from==null){var found$1=getMarkedSpanFor(first,span$1.marker);if(!found$1){span$1.from=offset;if(sameLine){(first||(first=[])).push(span$1);}}}else{span$1.from+=offset;if(sameLine){(first||(first=[])).push(span$1);}}}}// Make sure we didn't create any zero-length spans\n\tif(first){first=clearEmptySpans(first);}if(last&&last!=first){last=clearEmptySpans(last);}var newMarkers=[first];if(!sameLine){// Fill gap with whole-line-spans\n\tvar gap=change.text.length-2,gapMarkers;if(gap>0&&first){for(var i$2=0;i$2<first.length;++i$2){if(first[i$2].to==null){(gapMarkers||(gapMarkers=[])).push(new MarkedSpan(first[i$2].marker,null,null));}}}for(var i$3=0;i$3<gap;++i$3){newMarkers.push(gapMarkers);}newMarkers.push(last);}return newMarkers;}// Remove spans that are empty and don't have a clearWhenEmpty", "title": "" }, { "docid": "c6884bc4c6cbdd24f49bea541a00116c", "score": "0.5609927", "text": "undo(undoBuffer) {\n\t\tvar buffer = undoBuffer.peek();\n\t\tvar op = 'setDirty';\n\t\t// Unrender the modified music because the IDs may change and normal unrender won't work\n\t\tif (buffer) {\n\t\t\tvar sel = buffer.selector;\n\t\t\tif (buffer.type == 'measure') {\n\t\t\t\tthis.unrenderMeasure(SmoSelection.measureSelection(this._score, sel.staff, sel.measure).measure);\n\t\t\t} else if (buffer.type === 'staff') {\n\t\t\t\tthis.unrenderStaff(SmoSelection.measureSelection(this._score, sel.staff, 0).staff);\n\t\t\t\top = 'setRefresh';\n\t\t\t} else {\n\t\t\t\tthis.unrenderAll();\n\t\t\t\top = 'setRefresh';\n\t\t\t}\n\t\t\tthis._score = undoBuffer.undo(this._score);\n\t\t\tthis[op]();\n\t\t}\n\t}", "title": "" }, { "docid": "acaa81a4cd12e3de1c7bca19f8f3f6a3", "score": "0.56001043", "text": "redo_history() {\n //temos uma history e não estamos no começo dela\n if ((this.history_a.length) && (this.history_ptr < this.history_a.length)) {\n //ajusta ponteiro para proxima entrada do history\n this.history_ptr++;\n //copia history na canvas\n this._canvas_history_update();\n }\n }", "title": "" }, { "docid": "2bfbe21eba8af67a85bee5c0652a5fa2", "score": "0.55983305", "text": "function removeMarkedSpan(spans, span) {\n\t var r;\n\t for (var i = 0; i < spans.length; ++i)\n\t { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n\t return r\n\t}", "title": "" }, { "docid": "2bfbe21eba8af67a85bee5c0652a5fa2", "score": "0.55983305", "text": "function removeMarkedSpan(spans, span) {\n\t var r;\n\t for (var i = 0; i < spans.length; ++i)\n\t { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n\t return r\n\t}", "title": "" }, { "docid": "2bfbe21eba8af67a85bee5c0652a5fa2", "score": "0.55983305", "text": "function removeMarkedSpan(spans, span) {\n\t var r;\n\t for (var i = 0; i < spans.length; ++i)\n\t { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n\t return r\n\t}", "title": "" }, { "docid": "adc67c10abe35b7e73fca4360efda393", "score": "0.5586766", "text": "function removeSpanWord()\n{\n\tlet parent = currentSpan.parentElement;\t\t//get the parent of the last span\n\tlet lastSpan = parent.lastChild;\t\t\t\t\t//get the last span (usually is currentSpan)\n\n\tif(lastSpan.previousSibling)\t\t//if current span is not the only child of the pre\n\t{\n\t\tcurrentSpan = lastSpan.previousSibling;\t\t//set currentSpan to it's sibling\n\t\tparent.removeChild(lastSpan);\t\t//remove the last span child\n\t}\n\telse \t\t//cuurentSpan is the only child of the pre\n\t{\n\t\tcurrentSpan = lastSpan;\n\t}\n}", "title": "" }, { "docid": "d2b0ff70987b45eea8b42602d96a4459", "score": "0.5536254", "text": "function history_undo() {\n if (history_past.length < 2) return;\n\n //add the currently displayed result to the redo stack\n redo_stack.push(history_past.pop());\n var previous = history_past[history_past.length - 1];\n writeEverything(previous);\n\n // enable redo_nappi\n document.getElementById(\"redo_nappi\").disabled = false;\n //history exists, enable undo_nappi\n if (history_past.length < 2)\n document.getElementById(\"undo_nappi\").disabled = true;\n}", "title": "" }, { "docid": "ff8872a9a9bdc1992642c8476fc88195", "score": "0.5522341", "text": "function undo() {\n var previous_state = scope.states.pop()[0]\n synchronizeRuleControllerModel(previous_state)\n scope.replay=true\n removeTags()\n for (var i=0; i < previous_state.length; i++) {\n element.tagEditor(\"addTag\", previous_state[i])\n }\n scope.replay=false\n }", "title": "" }, { "docid": "672061670e2671116d1be9d392735c75", "score": "0.55136466", "text": "function stretchSpansOverChange(doc, change) {\n var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\n var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\n if (!oldFirst && !oldLast) return null;\n\n var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;\n // Get the spans that 'stick out' on both sides\n var first = markedSpansBefore(oldFirst, startCh, isInsert);\n var last = markedSpansAfter(oldLast, endCh, isInsert);\n\n // Next, merge those two ends\n var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);\n if (first) {\n // Fix up .to properties of first\n for (var i = 0; i < first.length; ++i) {\n var span = first[i];\n if (span.to == null) {\n var found = getMarkedSpanFor(last, span.marker);\n if (!found) span.to = startCh;\n else if (sameLine) span.to = found.to == null ? null : found.to + offset;\n }\n }\n }\n if (last) {\n // Fix up .from in last (or move them into first in case of sameLine)\n for (var i = 0; i < last.length; ++i) {\n var span = last[i];\n if (span.to != null) span.to += offset;\n if (span.from == null) {\n var found = getMarkedSpanFor(first, span.marker);\n if (!found) {\n span.from = offset;\n if (sameLine) (first || (first = [])).push(span);\n }\n } else {\n span.from += offset;\n if (sameLine) (first || (first = [])).push(span);\n }\n }\n }\n // Make sure we didn't create any zero-length spans\n if (first) first = clearEmptySpans(first);\n if (last && last != first) last = clearEmptySpans(last);\n\n var newMarkers = [first];\n if (!sameLine) {\n // Fill gap with whole-line-spans\n var gap = change.text.length - 2, gapMarkers;\n if (gap > 0 && first)\n for (var i = 0; i < first.length; ++i)\n if (first[i].to == null)\n (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i].marker, null, null));\n for (var i = 0; i < gap; ++i)\n newMarkers.push(gapMarkers);\n newMarkers.push(last);\n }\n return newMarkers;\n }", "title": "" }, { "docid": "672061670e2671116d1be9d392735c75", "score": "0.55136466", "text": "function stretchSpansOverChange(doc, change) {\n var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\n var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\n if (!oldFirst && !oldLast) return null;\n\n var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;\n // Get the spans that 'stick out' on both sides\n var first = markedSpansBefore(oldFirst, startCh, isInsert);\n var last = markedSpansAfter(oldLast, endCh, isInsert);\n\n // Next, merge those two ends\n var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);\n if (first) {\n // Fix up .to properties of first\n for (var i = 0; i < first.length; ++i) {\n var span = first[i];\n if (span.to == null) {\n var found = getMarkedSpanFor(last, span.marker);\n if (!found) span.to = startCh;\n else if (sameLine) span.to = found.to == null ? null : found.to + offset;\n }\n }\n }\n if (last) {\n // Fix up .from in last (or move them into first in case of sameLine)\n for (var i = 0; i < last.length; ++i) {\n var span = last[i];\n if (span.to != null) span.to += offset;\n if (span.from == null) {\n var found = getMarkedSpanFor(first, span.marker);\n if (!found) {\n span.from = offset;\n if (sameLine) (first || (first = [])).push(span);\n }\n } else {\n span.from += offset;\n if (sameLine) (first || (first = [])).push(span);\n }\n }\n }\n // Make sure we didn't create any zero-length spans\n if (first) first = clearEmptySpans(first);\n if (last && last != first) last = clearEmptySpans(last);\n\n var newMarkers = [first];\n if (!sameLine) {\n // Fill gap with whole-line-spans\n var gap = change.text.length - 2, gapMarkers;\n if (gap > 0 && first)\n for (var i = 0; i < first.length; ++i)\n if (first[i].to == null)\n (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i].marker, null, null));\n for (var i = 0; i < gap; ++i)\n newMarkers.push(gapMarkers);\n newMarkers.push(last);\n }\n return newMarkers;\n }", "title": "" }, { "docid": "672061670e2671116d1be9d392735c75", "score": "0.55136466", "text": "function stretchSpansOverChange(doc, change) {\n var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\n var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\n if (!oldFirst && !oldLast) return null;\n\n var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;\n // Get the spans that 'stick out' on both sides\n var first = markedSpansBefore(oldFirst, startCh, isInsert);\n var last = markedSpansAfter(oldLast, endCh, isInsert);\n\n // Next, merge those two ends\n var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);\n if (first) {\n // Fix up .to properties of first\n for (var i = 0; i < first.length; ++i) {\n var span = first[i];\n if (span.to == null) {\n var found = getMarkedSpanFor(last, span.marker);\n if (!found) span.to = startCh;\n else if (sameLine) span.to = found.to == null ? null : found.to + offset;\n }\n }\n }\n if (last) {\n // Fix up .from in last (or move them into first in case of sameLine)\n for (var i = 0; i < last.length; ++i) {\n var span = last[i];\n if (span.to != null) span.to += offset;\n if (span.from == null) {\n var found = getMarkedSpanFor(first, span.marker);\n if (!found) {\n span.from = offset;\n if (sameLine) (first || (first = [])).push(span);\n }\n } else {\n span.from += offset;\n if (sameLine) (first || (first = [])).push(span);\n }\n }\n }\n // Make sure we didn't create any zero-length spans\n if (first) first = clearEmptySpans(first);\n if (last && last != first) last = clearEmptySpans(last);\n\n var newMarkers = [first];\n if (!sameLine) {\n // Fill gap with whole-line-spans\n var gap = change.text.length - 2, gapMarkers;\n if (gap > 0 && first)\n for (var i = 0; i < first.length; ++i)\n if (first[i].to == null)\n (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i].marker, null, null));\n for (var i = 0; i < gap; ++i)\n newMarkers.push(gapMarkers);\n newMarkers.push(last);\n }\n return newMarkers;\n }", "title": "" }, { "docid": "672061670e2671116d1be9d392735c75", "score": "0.55136466", "text": "function stretchSpansOverChange(doc, change) {\n var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\n var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\n if (!oldFirst && !oldLast) return null;\n\n var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;\n // Get the spans that 'stick out' on both sides\n var first = markedSpansBefore(oldFirst, startCh, isInsert);\n var last = markedSpansAfter(oldLast, endCh, isInsert);\n\n // Next, merge those two ends\n var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);\n if (first) {\n // Fix up .to properties of first\n for (var i = 0; i < first.length; ++i) {\n var span = first[i];\n if (span.to == null) {\n var found = getMarkedSpanFor(last, span.marker);\n if (!found) span.to = startCh;\n else if (sameLine) span.to = found.to == null ? null : found.to + offset;\n }\n }\n }\n if (last) {\n // Fix up .from in last (or move them into first in case of sameLine)\n for (var i = 0; i < last.length; ++i) {\n var span = last[i];\n if (span.to != null) span.to += offset;\n if (span.from == null) {\n var found = getMarkedSpanFor(first, span.marker);\n if (!found) {\n span.from = offset;\n if (sameLine) (first || (first = [])).push(span);\n }\n } else {\n span.from += offset;\n if (sameLine) (first || (first = [])).push(span);\n }\n }\n }\n // Make sure we didn't create any zero-length spans\n if (first) first = clearEmptySpans(first);\n if (last && last != first) last = clearEmptySpans(last);\n\n var newMarkers = [first];\n if (!sameLine) {\n // Fill gap with whole-line-spans\n var gap = change.text.length - 2, gapMarkers;\n if (gap > 0 && first)\n for (var i = 0; i < first.length; ++i)\n if (first[i].to == null)\n (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i].marker, null, null));\n for (var i = 0; i < gap; ++i)\n newMarkers.push(gapMarkers);\n newMarkers.push(last);\n }\n return newMarkers;\n }", "title": "" }, { "docid": "3e1e4f375c711f8b66173be0f4962c1c", "score": "0.5506598", "text": "function historyChangeFromChange(doc, change) {\n\t var histChange = {from: copyPos(change.from), to: changeEnd(change), text: getBetween(doc, change.from, change.to)};\n\t attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1);\n\t linkedDocs(doc, function (doc) { return attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1); }, true);\n\t return histChange\n\t }", "title": "" }, { "docid": "00de94046a8b5c31ae5e3c18a20ad24e", "score": "0.54955643", "text": "function histTransaction(history, state, dispatch, redo) {\n var preserveItems = mustPreserveItems(state), histOptions = historyKey.get(state).spec.config;\n var pop = (redo ? history.undone : history.done).popEvent(state, preserveItems);\n if (!pop) { return }\n\n var selection = pop.selection.resolve(pop.transform.doc);\n var added = (redo ? history.done : history.undone).addTransform(pop.transform, state.selection.getBookmark(),\n histOptions, preserveItems);\n\n var newHist = new HistoryState(redo ? added : pop.remaining, redo ? pop.remaining : added, null, 0);\n dispatch(pop.transform.setSelection(selection).setMeta(historyKey, {redo: redo, historyState: newHist}).scrollIntoView());\n }", "title": "" }, { "docid": "bc2487b723c695ce18b19a172aaa7ac6", "score": "0.54916227", "text": "improveSpanActions(){}", "title": "" }, { "docid": "da336c862fc3f5f7eb5d36142e92879d", "score": "0.5491578", "text": "function histTransaction(history, state, dispatch, redo) {\n var preserveItems = mustPreserveItems(state), histOptions = historyKey.get(state).spec.config;\n var pop = (redo ? history.undone : history.done).popEvent(state, preserveItems);\n if (!pop) { return }\n\n var selection = pop.selection.resolve(pop.transform.doc);\n var added = (redo ? history.done : history.undone).addTransform(pop.transform, state.selection.getBookmark(),\n histOptions, preserveItems);\n\n var newHist = new HistoryState(redo ? added : pop.remaining, redo ? pop.remaining : added, null, 0);\n dispatch(pop.transform.setSelection(selection).setMeta(historyKey, {redo: redo, historyState: newHist}).scrollIntoView());\n}", "title": "" }, { "docid": "da336c862fc3f5f7eb5d36142e92879d", "score": "0.5491578", "text": "function histTransaction(history, state, dispatch, redo) {\n var preserveItems = mustPreserveItems(state), histOptions = historyKey.get(state).spec.config;\n var pop = (redo ? history.undone : history.done).popEvent(state, preserveItems);\n if (!pop) { return }\n\n var selection = pop.selection.resolve(pop.transform.doc);\n var added = (redo ? history.done : history.undone).addTransform(pop.transform, state.selection.getBookmark(),\n histOptions, preserveItems);\n\n var newHist = new HistoryState(redo ? added : pop.remaining, redo ? pop.remaining : added, null, 0);\n dispatch(pop.transform.setSelection(selection).setMeta(historyKey, {redo: redo, historyState: newHist}).scrollIntoView());\n}", "title": "" } ]
93f758f36b3792800b2edf0ff136dadb
Defines variables and functions within solr scope
[ { "docid": "3d474cc16b9cc5340f995eac9c9adaa7", "score": "0.0", "text": "function link(scope) {\n scope.$on('updatedMySubsetArray', function (event, args) {\n scope.mySubsetIDs = args;\n getSubsetArray();\n });\n\n /**\n * @private\n * @description Retrieves My Subset\n */\n function init() {\n $window.document.title = 'My Subset Builder - NIEM Movement';\n getSubset();\n }\n\n init();\n\n\n /**\n * @memberof subsetMySubsetDetails\n * @param {String} namespaceType String representing the type of Namespace\n * @returns {String} Teh display value for the namespace type\n * @description Transforms the namespaceType returned into properly formatted text\n */\n scope.formatNamespaceType = function formatNamespaceType(namespaceType) {\n return {\n 'domain': 'Domain',\n 'externalStandard': 'External Standard'\n }[namespaceType];\n };\n\n\n /**\n * @private\n * @description Sets scope variable to the element IDs in My subset\n */\n function getSubset() {\n scope.mySubsetIDs = mySubset.getSubset();\n if (scope.mySubsetIDs.length) {\n getSubsetArray();\n }\n }\n\n\n /**\n * @private\n * @description Sets the My subset array of IDs to an array of full documents for those elements\n */\n function getSubsetArray() {\n niemTree.getElementObjects(scope.mySubsetIDs).then(function(elementDocs) {\n scope.mySubsetArray = elementDocs;\n });\n }\n\n\n /**\n * @memberof subsetMySubsetDetails\n * @description Downloads all items in my schema to JSON file\n */\n scope.downloadSchema = function downloadSchema() {\n $window.ga('send', 'event', 'button', 'click', 'download-schema');\n scope.url = NODE_URL + 'itemsToExport[]=' + scope.mySubsetIDs.join('&itemsToExport[]=');\n $window.open(scope.url, '_parent');\n };\n\n\n /**\n * @memberof subsetMySubsetDetails\n * @description Removes all items in my subset\n */\n scope.removeSubset = function removeSubset() {\n mySubset.removeAllFromSubset();\n scope.mySubsetArray = [];\n };\n }", "title": "" } ]
[ { "docid": "6027eda1da7d386d51ae64d5055a2b65", "score": "0.61778736", "text": "function init() {\r\n searchResto();\r\n}", "title": "" }, { "docid": "23f582a03ef962429476fa70956e28d6", "score": "0.6046589", "text": "function init() {\n\t\t\tresetData();\n\t\t\trefreshTotalCount();\n\t\t\tloadVocabs();\n\t\t\taddAnnotRow();\n\t\t\taddReferenceRow();\n\n if (document.location.search.length > 0) {\n searchByRefsKey();\n }\n\n\t\t}", "title": "" }, { "docid": "619996c17807cea81829f13f85c268a2", "score": "0.6041853", "text": "function qodefOnDocumentReady() {\n initSearchParams();\n }", "title": "" }, { "docid": "7692eb913995f2858ee2e38e27ca3ee2", "score": "0.57644665", "text": "function doclibCommon()\n{\n var preferences = getPreferences();\n model.preferences = preferences;\n model.actionSets = getActionSets(preferences);\n model.repositoryUrl = getRepositoryUrl();\n model.replicationUrlMappingJSON = getReplicationUrlMappingJSON();\n model.vtiServer = getVtiServerJSON();\n model.rootNode = getRepositoryBrowserRoot();\n}", "title": "" }, { "docid": "5a005ad8c36df5e649c448b3a04eaae9", "score": "0.5670578", "text": "init() {\n this._resetQuery();\n this.indexes = [];\n this.ns = '';\n }", "title": "" }, { "docid": "46033b9a2689c5d3d341486f8c3070a5", "score": "0.5650367", "text": "function qodefOnDocumentReady() {\n\t\tqodefInitRecipe();\n qodefReInitRecipe();\n\t}", "title": "" }, { "docid": "521437c6124b05b5333b897cc1938e50", "score": "0.559279", "text": "function FuseSearch() {\n}", "title": "" }, { "docid": "acffe366305a123ddf65c9f97713c0bb", "score": "0.55822545", "text": "function ___PRIVATE___(){}", "title": "" }, { "docid": "76d8961a10328672cd3f68e801d9235d", "score": "0.55501544", "text": "function RavenUtils() { }", "title": "" }, { "docid": "b871c13d4257bc8da24b18e4971f257e", "score": "0.5489563", "text": "setup () {\n this.disabled = $body.hasClass('j2-disable-search')\n if (this.disabled) { return }\n\n this.rootPath = $body.data('root-path')\n\n $.getJSON(this.rootPath + '/search.json').then((searchData) => {\n this.searchData = searchData\n\n // setting this enables search\n this.lunrIndex = lunr((builder) => {\n builder.ref('url')\n builder.field('name')\n builder.field('abstract')\n for (const [url, doc] of Object.entries(searchData)) {\n builder.add({ url: url, name: doc.name, abstract: doc.abstract })\n }\n })\n }, () => {\n this.jsonFetchFailed = true\n })\n }", "title": "" }, { "docid": "a26c070274d0d9164a408a04379e228e", "score": "0.54828733", "text": "function qodefOnDocumentReady() {\n\t\tqodefInitCounter();\n\t}", "title": "" }, { "docid": "fb9e2fc6536c71b6e4e5ba7cb5da9f82", "score": "0.54586333", "text": "function init() {\n // Packages.java.lang.System.err.println(\"Initializing sample extension\");\n // Packages.java.lang.System.err.println(module.getMountPoint());\n var libPath = new Packages.java.io.File(module.getPath(), \"MOD-INF/lib/jython/\").getCanonicalPath();\n\n logger.info(\"Registering Fuzzy Match Extension......\");\n var RS = Packages.com.google.refine.RefineServlet;\n //register command\n RS.registerCommand(module, \"create-fuzzy-search-indices\",\n new Packages.com.vern1erca11per.refine.extension.fuzzymatch.symspell.CreateFuzzySearchIndicesCommand());\n\n //register change\n RS.registerClassMapping(\"UpdateFuzzySearchIndicesModelChange\",\n \"com.vern1erca11per.refine.extension.fuzzymatch.symspell.UpdateFuzzyIndicesModelChange\");\n RS.cacheClass(Packages.com.vern1erca11per.refine.extension.fuzzymatch.symspell.UpdateFuzzyIndicesModelChange);\n\n //var S = Packages.java.lang.System;\n //var currentLibPath = S.getProperty(\"\");\n\n //register overlay models\n var project = Packages.com.google.refine.model.Project;\n project.registerOverlayModel(\n \"FuzzyIndicesModel\",\n Packages.com.vern1erca11per.refine.extension.fuzzymatch.symspell.FuzzyIndicesModel\n );\n\n //register grel\n var grel = Packages.com.google.refine.grel;\n grel.ControlFunctionRegistry.registerFunction(\n \"fuzzyCross\",\n new Packages.com.vern1erca11per.refine.extension.fuzzymatch.symspell.FuzzyCross()\n );\n\n //add operations\n var operations = Packages.com.google.refine.operations;\n var OR = operations.OperationRegistry.registerOperation(\n module,\n \"createFuzzySearchIndicesModelOperation\",\n Packages.com.vern1erca11per.refine.extension.fuzzymatch.symspell.CreateFuzzySearchIndicesModelOperation\n );\n\n\n // Script files to inject into /project page\n ClientSideResourceManager.addPaths(\n \"project/scripts\",\n module,\n [\n \"scripts/project-injection.js\",\n //\"scripts/index/jquery.contextMenu.min.js\",\n //\"scripts/index/jquery.ui.position.min.js\"\n ]\n );\n\n logger.info(\"Fuzzy Match Extension Registration done!!\");\n}", "title": "" }, { "docid": "d062a5ffc64213e21e1c453c27209c9b", "score": "0.5442605", "text": "function qodefOnDocumentReady() {\n qodefInitSavedSearchesRemove();\n\t qodefInitSelect2();\n }", "title": "" }, { "docid": "1fc36c9c3332bfda205608721358f952", "score": "0.543365", "text": "_setInstanceVariables(req, ws) {\n this.clientIp = this._getClientIp(req);\n this.rp = this._getRequest(req, ws);\n this.searchInformation = { ...req.query };\n }", "title": "" }, { "docid": "85caeb4bdfbf612701005cbd584ae5b5", "score": "0.5349034", "text": "init(){\n this.collections = [];\n this.schemas = [];\n this.queries = [];\n this.mutations = [];\n this.resolvers = defaultResolvers;\n this.context = {};\n this.directives = {};\n }", "title": "" }, { "docid": "3b117fa7b1f88b83bc118310e867d0eb", "score": "0.534067", "text": "function init() {\n var RS = Packages.com.google.refine.RefineServlet;\n RS.registerCommand(module, \"deauthorize\", Packages.com.google.refine.extension.gdata.DeAuthorizeCommand());\n RS.registerCommand(module, \"upload\", Packages.com.google.refine.extension.gdata.UploadCommand());\n\n // Register importer and exporter\n var IM = Packages.com.google.refine.importing.ImportingManager;\n \n IM.registerController(\n module,\n \"gdata-importing-controller\",\n new Packages.com.google.refine.extension.gdata.GDataImportingController()\n );\n \n // Script files to inject into /index page\n ClientSideResourceManager.addPaths(\n \"index/scripts\",\n module,\n [\n \"scripts/gdata-extension.js\",\n \"scripts/index/importing-controller.js\",\n \"scripts/index/gdata-source-ui.js\"\n ]\n );\n // Style files to inject into /index page\n ClientSideResourceManager.addPaths(\n \"index/styles\",\n module,\n [\n \"styles/importing-controller.less\"\n ]\n );\n \n // Script files to inject into /project page\n ClientSideResourceManager.addPaths(\n \"project/scripts\",\n module,\n [\n \"scripts/gdata-extension.js\",\n \"scripts/project/exporters.js\"\n ]\n );\n}", "title": "" }, { "docid": "1f47e42701af46540847bf6ecec109d5", "score": "0.53406495", "text": "init() {\n this.initPrizes();\n this.search = new Search();\n this.customMap = new CustomMap(this.search);\n }", "title": "" }, { "docid": "cdca8d191ee900b366ecdaa9155194cf", "score": "0.53350806", "text": "function updateSolrFilter() {\t\n\t// Borramos todos los filtros previos\n\tManager.store.remove('fq');\n\n\tvar tempString = \"\";\n\tvar sliderArray = [];\n\n\tvar i = 0;\n\t// Hacemos AND para diferentes propiedades y OR para los que estén activos dentro de una misma propiedad\n\t// Por ejemplo: province:Madrid OR province:Barcelona AND type:Universidad\n\t$.each(vm.activeWidgets(), function (index1, item1) {\n\t\ti = 0;\n\t\ttempString = \"\";\n\n\t\tif (item1.field != undefined) {\n\t\t\tvar catParent = item1.field();\n\t\t} else {}\n\t\tif (item1.type() == \"tagcloud\") {\n\t\t\t$.each(item1.values(), function (index2, item2) {\n\t\t\t\tif (item2.state() == true) {\n\t\t\t\t\tif (i == 0) {\n\t\t\t\t\t\ttempString += catParent + ':\"' + item2.name() + '\"';\n\t\t\t\t\t\ti++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttempString += ' OR ' + catParent + ':\"' + item2.name() + '\"';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tManager.store.addByValue('fq', tempString);\n\t\t}\n\n\t\t// Preparación de los filtros tipo slider\n\t\tif (item1.type() == \"slider\") {\n\t\t\tvar catParent = item1.field();\n\n\t\t\tvar str = item1.values().toString();\n\t\t\tvar n = str.replace(\",\", \" TO \");\n\n\t\t\tsliderArray.push({\n\t\t\t\t'type': catParent,\n\t\t\t\t'filter': ':[' + n + ']'\n\t\t\t});\n\n\t\t}\n\t});\n\n\tvar string = \"\";\n\tvar usedType = [];\n\n\t// Para los filtros de tipo slider, si el tipo es el mismo aplicamos OR y si son distintos, AND\n\tfor (var i = 0; i < sliderArray.length; i++) {\n\t\tif (i == 0) {\n\t\t\tusedType.push(sliderArray[i].type);\n\t\t\tstring += sliderArray[i].type + sliderArray[i].filter;\n\t\t} else {\n\t\t\tvar exists = false;\n\t\t\tfor (var j = 0; j < usedType.length; j++) {\n\t\t\t\tif (sliderArray[i].type == usedType[j]) {\n\t\t\t\t\tstring += ' OR ' + sliderArray[i].type + sliderArray[i].filter;\n\t\t\t\t\texists = true;\n\t\t\t\t} else {\n\t\t\t\t\texists = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!exists) {\n\t\t\t\tstring += ' AND ' + sliderArray[i].type + sliderArray[i].filter;\n\t\t\t\tusedType.push(sliderArray[i].type);\n\t\t\t}\n\n\t\t}\n\t}\n\n\tManager.store.addByValue('fq', string);\n\n\tManager.doRequest();\n}", "title": "" }, { "docid": "a42d0f79f9bc91db128c492ad5cb470a", "score": "0.53313494", "text": "function _init() {\n $sc['data'] = _data;\n }", "title": "" }, { "docid": "004acc3d8508c3622b1e616166e45e88", "score": "0.5312403", "text": "function LQuery() { }", "title": "" }, { "docid": "004acc3d8508c3622b1e616166e45e88", "score": "0.5312403", "text": "function LQuery() { }", "title": "" }, { "docid": "004acc3d8508c3622b1e616166e45e88", "score": "0.5312403", "text": "function LQuery() { }", "title": "" }, { "docid": "004acc3d8508c3622b1e616166e45e88", "score": "0.5312403", "text": "function LQuery() { }", "title": "" }, { "docid": "004acc3d8508c3622b1e616166e45e88", "score": "0.5312403", "text": "function LQuery() { }", "title": "" }, { "docid": "4814dd3e5d70152924d5291e64314a92", "score": "0.5299806", "text": "function LQueries() { }", "title": "" }, { "docid": "4814dd3e5d70152924d5291e64314a92", "score": "0.5299806", "text": "function LQueries() { }", "title": "" }, { "docid": "4814dd3e5d70152924d5291e64314a92", "score": "0.5299806", "text": "function LQueries() { }", "title": "" }, { "docid": "4814dd3e5d70152924d5291e64314a92", "score": "0.5299806", "text": "function LQueries() { }", "title": "" }, { "docid": "4814dd3e5d70152924d5291e64314a92", "score": "0.5299806", "text": "function LQueries() { }", "title": "" }, { "docid": "874fa4a3e1c792ad465f66f4ebf0d215", "score": "0.52966803", "text": "function init(){\n \n \t\t\tAPI.Studyarea.query({\"is_public\":true},function(results){\n \t\t\t\t$scope.studyareas=results;\n \t\t\t\tconsole.log(results);\n \t\t\t});\n\n \t\t\n }", "title": "" }, { "docid": "075909b417c345692254dfa85056a01c", "score": "0.52902395", "text": "function init() {\r\n \t\tget_products();\r\n \t}", "title": "" }, { "docid": "4568c89ba58a66ccb7d77b9940e38626", "score": "0.52884996", "text": "function init() {\n qs(\"button\").addEventListener(\"click\", search);\n }", "title": "" }, { "docid": "f7fa77d2342c7427da21454c7c319cf8", "score": "0.5274848", "text": "function LQuery(){}", "title": "" }, { "docid": "0b999d386a152be6da657bdf1a38f467", "score": "0.5270198", "text": "function _init() {\n init();\n getCode(true);\n if ($$._site.extra && typeof $$._site.extra === 'function') $$._site.extra();\n markAdded();\n }", "title": "" }, { "docid": "f35fb36367d02db31bd0131e676fdd86", "score": "0.52630377", "text": "function LQueries(){}", "title": "" }, { "docid": "7ba01316283ab0bc84f9722d45952745", "score": "0.5260676", "text": "function LQuery() {}", "title": "" }, { "docid": "7ba01316283ab0bc84f9722d45952745", "score": "0.5260676", "text": "function LQuery() {}", "title": "" }, { "docid": "52848dda8e60b49015cbcaf7a51164ed", "score": "0.52568096", "text": "function wlCommonInit(){\n\t\n\t$('#initbutton').on('tap', function() {\n\t\tSTORAGE.init();\n\t\tWL.Logger.info('初期化しました。');\n\t});\n\t\n\t$('#putbutton').on('tap', function() {\n\t\tSTORAGE.put();\n\t\tWL.Logger.info('データをプットしました。');\n\t});\n\n\t//find-name\n\t$('#searchButton').on('tap', function () {\n\t\t// Get value from the search field\n\t\tvar searchField = $('input#searchInput').val();\n\n\t\t// Create the query object\n\t\tvar ssk_options = {\n\t\t\texact : false,\n\t\t\tlimit : 10\n\t\t};\n\t\tvar ssk_query = {\n\t\t\tkey : searchField\n\t\t};\n\n\t\t// Perform the search\n\t\tWL.JSONStore.get(collectionName).find(ssk_query, ssk_options)\n\t\t\t.then(function (ssk_res) {\n\t\t\t\tWL.Logger.info(ssk_res);\n\t\t\t // Replace with template\n\t\t\t var ssk_result = $(\"#itemTemplate\").render(ssk_res);\n\t\t\t $(\"#listview\").empty().append(ssk_result).listview(\"refresh\");\n\t\t\t})\n\t\t\t.fail(function (errorObject) {\n\t\t\t\tWL.Logger.error(errorObject.msg);\n\t\t\t});\n\t});\n\t\r\n}", "title": "" }, { "docid": "97ed0070332f0f7af7b4c085d1a6c227", "score": "0.52482516", "text": "function LQueries() {}", "title": "" }, { "docid": "97ed0070332f0f7af7b4c085d1a6c227", "score": "0.52482516", "text": "function LQueries() {}", "title": "" }, { "docid": "b016de4490d90d8ce92ac37fc0ca2ac8", "score": "0.5232954", "text": "_init() {\n\n }", "title": "" }, { "docid": "b016de4490d90d8ce92ac37fc0ca2ac8", "score": "0.5232954", "text": "_init() {\n\n }", "title": "" }, { "docid": "69d77fe223b2459aebb4f26ec7015752", "score": "0.523123", "text": "function init(pos, filters){\n\n}", "title": "" }, { "docid": "d15c84aee130d6c7b2358d933c1ae369", "score": "0.5228955", "text": "function _initVar(htOptions){\n htVar.nTotalPages = htOptions.nTotalPages || 1;\n \n htVar.oSearchAuthor = new yobi.ui.Dropdown({\"elContainer\": htOptions.welSearchAuthor});\n htVar.oSearchAssignee = new yobi.ui.Dropdown({\"elContainer\": htOptions.welSearchAssignee});\n htVar.oSearchMilestone = new yobi.ui.Dropdown({\"elContainer\": htOptions.welSearchMilestone});\n\n }", "title": "" }, { "docid": "575d103806dce8be85be0b7e4cd814cf", "score": "0.5201334", "text": "function Rd(){}", "title": "" }, { "docid": "9825ce3669e29e323b6c0a8a778b6f48", "score": "0.52011496", "text": "init() {\n // reset search\n this.searchString = '';\n // could config language on service\n HelpService.language = this.lang;\n HelpService.api = this.api;\n HelpService.navStack.length = 0;\n // we could use different approaches to load initial content\n HelpService.getContent(helpStart);\n }", "title": "" }, { "docid": "ab617761065109b83576d15fd0f773ee", "score": "0.5200613", "text": "function init() {\n areas.init();\n doctors.init();\n locations.init();\n news.init();\n com.init();\n services.init();\n whowe.init();\n}", "title": "" }, { "docid": "17d34ea152fabf6c8e47f3fb27a4a7a6", "score": "0.51941323", "text": "function init() {\r\n\r\n return datasearch.getSampledata(vm.indicesName, $rootScope.logtype, vm.pagecount, vm.st, vm.ft)\r\n .then(function (resp) {\r\n vm.hitSearch = resp.hits.hits;\r\n vm.total = resp.hits.total;\r\n vm.tt = resp.hits.total < vm.pagecount ? resp.hits.total : vm.pagecount;\r\n vm.getCurrentPageData(vm.hitSearch);\r\n vm.type = \"\";\r\n //log('Loaded sample document');\r\n });\r\n }", "title": "" }, { "docid": "987b95df82d9f2b88e32b74ec59c87ee", "score": "0.5190667", "text": "function QueryRunner() {\n var self = this;\n self.SPSiteUrl = \"http://sp2013dev/sites/contosoeix\";\n self.SearchUrl = \"\";\n self.QueryData = \"\";\n self.QueryType = \"REST\";\n self.CamlViewXml = \"\";\n self.PostSearchApiPath = \"/_api/search/postquery\";\n self.GetSearchApiPath = \"/_api/search/query\";\n self.ListsRestApiPath = \"/_api/web/lists/\";\n self.RestQuery = \"\";\n\t\n self.QueryText = '{0} AND Path:{1}';\n self.ResultSourceId = \"\";\n self.QueryPath = \"\";\n self.PropertyRestrictions = '{0}';\n\n self.SortFields = [];\n self.SelectProperties = [];\n\n self.Refiners = \"\";\n self.RefinementFilters = [];\n\n self.RankingModelId = \"\";\n self.StartRow = '0';\n self.RowLimit = '500';\n self.RowsPerPage = '500';\n\n self.EnableStemming = \"false\";\n self.EnablePhonetic = \"false\";\n self.EnableFQL = \"false\";\n self.TrimDuplicates = false;\n\n self.EnableQueryRules = \"false\";\n self.RequestMethod = \"POST\";\n self.RequestContentType = \"application/json;odata=verbose\";\n self.RequestHeaders = {\n \"accept\": \"application/json;odata=verbose\",\n \"X-RequestDigest\": $('#__REQUESTDIGEST').val(),\n \"X-HTTP-Method\": \"POST\",\n \"content-type\": \"application/json;odata=verbose\",\n \"If-Match\": \"*\"\n };\n\n\t//This method build query string parameter for GET verb specific to SP list API and SP search API\n self.BuildGetSearchQuery = function () {\n if (self.QueryType == queryType.GETRESTLISTQUERY) {\n self.SearchUrl = self.SPSiteUrl + self.RestApiPath + self.RestQuery;\n }\n else {\n var queryExpr = \"sourceid='\" + self.SourceId + \"'\";\n queryExpr += \"&querytext='\" + self.QueryText + \"'\";\n queryExpr += \"&selectproperties='\" + self.SelectProperties + \"'\";\n queryExpr += \"&startrow='\" + self.StartRow + \"'\";\n queryExpr += \"&rowlimit='\" + self.RowLimit + \"'\";\n self.SearchUrl = self.SPSiteUrl + self.GetSearchApiPath + \"?\" + queryExpr;\n }\n };\n\n\t//This method builds POST verb body specific to SP search restful API and CAML API\n self.BuildPostSearchQuery = function () {\n var query = '';\n if (self.QueryType == queryType.POSTRESTSEARCHQUERY) {\n self.QueryText = String.format(self.QueryText, self.PropertyRestrictions, self.SPSiteUrl + self.QueryPath);\n postSearchQueryRequest.request.Querytext = self.QueryText;\n postSearchQueryRequest.request.SelectProperties.results = self.SelectProperties;\n postSearchQueryRequest.request.SortList.results = self.SortFields;\n postSearchQueryRequest.request.StartRow = self.StartRow;\n\t\t\t\n\t\t\tif(postSearchQueryRequest.request.Querytext.startsWith(' AND ') === true)\n\t\t\t{\n\t\t\t\tpostSearchQueryRequest.request.Querytext = postSearchQueryRequest.request.Querytext.replace(' AND ','');\n\t\t\t}\n\t\t\t\n query = postSearchQueryRequest;\n }\n else {\n camlQueryRequest.query.ViewXml = self.CamlViewXml;\n query = camlQueryRequest;\n }\n\n return JSON.stringify(query);\n };\n\n\t//This method calls supporting method to build restful queries for SP list API, SP search API and SP CAML API and run those queries.\n self.Search = function (crossDomain, deferredObject) {\n var queryParams = \"\";\n var SearchUrl = \"\";\n\n if (self.QueryType == queryType.POSTRESTSEARCHQUERY) {\n self.QueryData = self.BuildPostSearchQuery();\n self.RequestHeaders[\"content-length\"] = self.QueryData.length;\n self.SearchUrl = self.SPSiteUrl + self.PostSearchApiPath;\n }\n else if (self.QueryType == queryType.GETRESTSEARCHQUERY) {\n self.BuildGetQuery();\n }\n else if (self.QueryType == queryType.CAMLQUERY) {\n self.QueryData = self.BuildPostSearchQuery();\n self.RequestHeaders[\"content-length\"] = self.QueryData.length;\n self.SearchUrl = self.SPSiteUrl + self.QueryPath;\n }\n else if (self.QueryType == queryType.GETRESTLISTQUERY) {\n self.BuildGetQuery();\n }\n\n self.RunSearch(crossDomain, deferredObject);\n };\n\n\t//This method fires AJAX requests to server.\n self.RunSearch = function (isCrossDomain, deferredObject) {\n if (isCrossDomain === false) {\n $.ajax(\n\t\t\t{\n\t\t\t url: self.SearchUrl,\n\t\t\t type: self.RequestMethod,\n\t\t\t headers: self.RequestHeaders,\n\t\t\t data: self.QueryData,\n\t\t\t success: function (data) { deferredObject.resolve(data); },\n\t\t\t error: function (data) { deferredObject.reject(data); }\n\t\t\t});\n } //Add else block to use SP.RequestExecutor to fire cross domain query\n };\n}", "title": "" }, { "docid": "a35d1447a456c99782fe3518583ffbfc", "score": "0.5189866", "text": "static initialize(obj, name, dataQuery) { \n obj['name'] = name;\n obj['data_query'] = dataQuery;\n }", "title": "" }, { "docid": "0c97c505c396ce1baf2c86c58c7e648f", "score": "0.518595", "text": "constructor() {\n\t\t this.addSearchHTML();\n\t\t this.resultsDiv = $(\"#search-overlay__results\");\n\t\t this.openButton = $(\".js-search-trigger\");\n\t\t this.closeButton = $(\".search-overlay__close\");\n\t\t this.SearchOverlay = $(\".search-overlay\");\n\t\t this.searchField = $(\"#search-term\");\n\t\t this.events();\n\t\t this.isOverlayOpen = false;\n\t\t this.isSpinnerVisible = false;\n\t\t this.previousValue;\n\t\t this.typingTimer;\n }", "title": "" }, { "docid": "7f309da28023a2adc10104839424c3d5", "score": "0.5182167", "text": "function SolrBackend(endpoint) {\n this._endpoint = endpoint;\n}", "title": "" }, { "docid": "4b1836b7b27d511fc5390c03031bf0b4", "score": "0.5179059", "text": "function soliloquywcInit() {\n\n // Run conditionals.\n soliloquywcConditionals();\n\n }", "title": "" }, { "docid": "d12f895da599bb93b80a85b933970688", "score": "0.5173576", "text": "function advancedSearchSQLSetup()\n {\n\n // sets the variables declared in the DOM, to be used in the query as fields om the search\n var computers, deskChair, tutors, wifi;\n var distance = \"\";\n var size = \"\";\n var location = \"\";\n var queryStatement = \"\";\n\n // converts each variable into the appropriate format for a SQL query\n computers = q(getBoolValue(\"computerCheckBox\"));\n deskChair = q(getBoolValue(\"deskCheckBox\"));\n tutors = q(getBoolValue(\"tutorsCheckBox\"));\n wifi = q(getBoolValue(\"wifiCheckBox\"));\n size = q(getIdValue(\"sizeDropDown\"));\n location = q(getIdValue(\"locationDropDown\"));\n\n // the query statement concatenates query syntax with the search variables used\n queryStatement = \n\n \"SELECT latitude, longitude \\\n FROM StudySpots \\\n WHERE computers = \" + computers + \" AND desksAndChairs = \" + deskChair + \" AND tutors = \" + tutors + \" AND wifi =\" + wifi + \" AND size = \" + size + \" AND location = \" + location + \";\"; \n\n console.log(queryStatement); \n\n // query statement is returned and will eventually be called by 'executeQuery()'\n return queryStatement;\n\n }", "title": "" }, { "docid": "029b33dc05a928bdf9ebad1f7f29ee51", "score": "0.51708543", "text": "function init() {\n var hostWebUrlFromQS = $.getUrlVar(\"SPHostUrl\");\n hostWebUrl = (hostWebUrlFromQS !== undefined) ? decodeURIComponent(hostWebUrlFromQS) : undefined;\n\n var appWebUrlFromQS = $.getUrlVar(\"SPAppWebUrl\");\n appWebUrl = (appWebUrlFromQS !== undefined) ? decodeURIComponent(appWebUrlFromQS) : undefined;\n\t\t\n hostWebContext = new SP.ClientContext(window.COB.appHelper.getRelativeUrlFromAbsolute(hostWebUrl));\n appWebContext = new SP.ClientContext(window.COB.appHelper.getRelativeUrlFromAbsolute(appWebUrl));\n }", "title": "" }, { "docid": "6aebcd79ff12ced6745831770dc3dbd5", "score": "0.5168517", "text": "function init(){\n // Load the handles\n STATE.handles.inputs.byClassList = document.querySelector('.toggle-hidden');\n STATE.handles.inputs.nameContains = document.getElementById('name-contains');\n STATE.handles.outputs.spellListWrapper = document.getElementById('spell-list');\n\n // change the filter parameters to match the input in the search field\n STATE.filterParams.nameContains = STATE.handles.inputs.nameContains.value;\n\n // input bondage\n STATE.handles.inputs.byClassList.addEventListener('click', toggleFindByClass);\n STATE.handles.inputs.nameContains.addEventListener('input', tick);\n\n // Run tick() so that the page inits with the whole list\n tick();\n }", "title": "" }, { "docid": "7b227428a247844f162b9881f6edb359", "score": "0.5164464", "text": "constructor() { \n \n OrgApacheJackrabbitOakPluginsIndexSolrOsgiEmbeddedSolrServerCoInfo.initialize(this);\n }", "title": "" }, { "docid": "a84507358901a90f6d2f7e87b57a17bf", "score": "0.51620305", "text": "function getSolrSuggestions() {\n\t// Build the query...\n\t\n\tvar query = \"http:/127.0.0.1:8984/solr/factor_tool/suggest?wt=json&q=\" + encodeURIComponent(searchTerm);\n\t\n\t// Send and return the query result\n\treturn $.ajax({\n\t\tdataType: 'jsonp',\n\t\tjsonp: 'json.wrf',\n\t\turl: query,\n\t\tsuccess: function(data) { \n\t\t\t// Read the result and add it to suggestions_solr\n\t\t\tvar resultData = data.suggest.mySuggester[searchTerm].suggestions;\n\t\t\t\n\t\t\tfor(var i = 0; i < Math.min(5, resultData.length); i++) {\n\t\t\t\tsuggestions_solr.push({ name: resultData[i].term, uri : getUri(resultData[i].payload), type : getType(resultData[i].payload) });\n\t\t\t}\t\t\t\t\n\t\t},\n\t\terror: function(data) {\n\t\t\t\n\t\t}\t\t\n\t});\n\n}", "title": "" }, { "docid": "74a77d3f2b74dd1d4f86d30d1bf0dcf4", "score": "0.5155511", "text": "function defineSearch() {\n //Set variables based on user input\n var searchTerms = $(\"#search-terms\").val();\n\n //Call the function that will formulate a query for Google Sheets\n formulateQuery(searchTerms);\n\n}", "title": "" }, { "docid": "9e27763423aa14d9ef9fe1ef2e53e361", "score": "0.5153791", "text": "function jsTemplateQueryProcessor() {\n}", "title": "" }, { "docid": "11491823f1eb7d9b98e610c8c979c653", "score": "0.5149976", "text": "function setSpecies(){\n\n var queryType = getQueryType();\n var defSpecies = getSpecies();\n var control = document.settings.species;\n}", "title": "" }, { "docid": "8ddfbb7ad2ef5666ba7e87bad1e4538e", "score": "0.51480603", "text": "function init() {\n\n angular.extend(scope, {\n fields: [],\n isWfsAvailable: undefined,\n isFeaturesIndexed: false,\n status: null,\n md: scope.layer.get('md'),\n url: scope.wfsUrl || scope.layer.get('url').replace(/wms/i, 'wfs')\n });\n\n uuid = scope.md && scope.md.getUuid();\n ftName = scope.featureTypeName ||\n scope.layer.getSource().getParams().LAYERS;\n\n appProfile = null;\n appProfilePromise = wfsFilterService.getApplicationProfile(uuid,\n ftName,\n scope.url,\n // A WFS URL is in the metadata or we're guessing WFS has\n // same URL as WMS\n scope.wfsUrl ? 'WFS' : 'WMS').then(\n function(response) {\n if (response.status == 200) {\n appProfile = angular.fromJson(response.data['0']);\n return appProfile;\n }\n }).catch(function() {});\n\n solrObject =\n gnSolrRequestManager.register('WfsFilter',\n scope.url + '#' + ftName);\n scope.solrObject = solrObject;\n scope.layer.set('solrObject', solrObject);\n\n\n scope.checkWFSServerUrl();\n scope.initSolrRequest();\n\n if (scope.map) {\n resetHeatMap();\n hmEventKeys.push(map.on('moveend', refreshHeatmap));\n }\n }", "title": "" }, { "docid": "bdd4acc748ecc09c89377e009e717640", "score": "0.51392156", "text": "function mainPageSuggester(qname) {\r\n\tif (qname == \"keyword\" ) {\r\n\t\treturn null;\r\n\t} else {\r\n\t\tvar textField = $(\"#quick-search-box\");\r\n\t\ttextField.attr(\"autocomplete\",\"off\");\r\n\t\ttextField.autocomplete({\r\n\t\t\tminLength: 3,\r\n appendTo: \"#quick-search-box\",\r\n dataType: \"json\",\r\n //source: \"/lds/suggest.xqy?mime=application/json&qname=\" + qname\r\n source: function(req, add){\r\n\t\t\t\t//pass request to server\r\n\t\t\t\t$.getJSON(\"/lds/resources-suggest.xqy?mime=application/json&qname=\" + qname, req, function(data) {\r\n\t\t\t\t\t//create array for response objects\r\n\t\t\t\t\tvar suggestions = [];\r\n\t\t\t\t\t//embed responses in quotes\r\n\t\t\t\t\t$.each(data, function(i, val) {\r\n\t\t\t\t\t suggestions.push('\"' + val.label + '\"');\r\n\t\t\t\t });\r\n\t\t\t\t//pass array to callback\r\n\t\t\t\tadd(suggestions);\r\n\t\t\t});\r\n\t\t}\r\n\t\t});\r\n\t}\r\n}", "title": "" }, { "docid": "46b4252f58b013e7647991ff30c75949", "score": "0.51364785", "text": "function red_god() {\n // Init instance variables here\n \n }", "title": "" }, { "docid": "557f3a6f7c97334b24641838038fa53a", "score": "0.51253796", "text": "function init(){\n\t\tlog('initialize');\n\t}//end initialize site script", "title": "" }, { "docid": "bab2d1b7d8ad762764782506eea4ca82", "score": "0.51227593", "text": "init() {\n this.getDifferentMovieYears();\n this.fillYearFilter();\n this.getDifferentMovieGenres();\n this.fillGenreFilter();\n this.fillTable();\n this.handleSearch();\n this.handleYearFilter();\n this.handleGenreFilter();\n }", "title": "" }, { "docid": "a308107e35a1a704218cf445d9014b38", "score": "0.5119979", "text": "init() {\n\t}", "title": "" }, { "docid": "ed44600b93555ccbedbe781983e37a5f", "score": "0.51144785", "text": "function qodefOnDocumentReady() {\n qodefShowHideEnquiryForm();\n qodefSubmitEnquiryForm();\n qodefMortgageCalculator();\n qodefDeleteProperty();\n qodefWishlist();\n }", "title": "" }, { "docid": "0a9bc6d67cea0d1a3cf8657f10a3b7f3", "score": "0.5113208", "text": "function initializeGlobalPageVariables() {\r\n\t// Set these first since get functions may depend no them\r\n\tDETAILS_JOB.isAnonymousPage = $('#isAnonymousPage')\r\n\t.attr('value') === 'true';\r\n\tjobId = $('#jobId').attr('value');\r\n\tDETAILS_JOB.starexecUrl = $('#starexecUrl').attr('value');\r\n\tDETAILS_JOB.rootJobSpaceId = $('#spaceId').attr('value');\r\n\tDETAILS_JOB.primitivesToAnonymize = $('#primitivesToAnonymize')\r\n\t.attr('value');\r\n\tDETAILS_JOB.anonymousLinkUuid = getParameterByName('anonId');\r\n\tDETAILS_JOB.spaceExplorerJsonData = getSpaceExplorerJsonData();\t\t\r\n\r\n\tlog(\"starexecUrl: \" + DETAILS_JOB.starexecUrl);\r\n\tlog(\"isLocalJobPage: \" + isLocalJobPage);\r\n\tlog(\"starexecRoot: \" + starexecRoot);\r\n\tlog(\"isAnonymousPage: \" + DETAILS_JOB.isAnonymousPage);\r\n\tlog(\"primitivesToAnonymize: \" + DETAILS_JOB.primitivesToAnonymize);\r\n}", "title": "" }, { "docid": "bea72ba1ebeae0d69eb91667d9fcafd6", "score": "0.5109472", "text": "function qodefOnDocumentReady() {\n\t\tqodefInitAccordions();\n\t}", "title": "" }, { "docid": "a7449eeef8af0be4352e3bed2c78ea66", "score": "0.51087576", "text": "function qodefOnDocumentReady() {\n qodef.scroll = $(window).scrollTop();\n\n //set global variable for header style which we will use in various functions\n if(qodef.body.hasClass('qodef-dark-header')){ qodef.defaultHeaderStyle = 'qodef-dark-header';}\n if(qodef.body.hasClass('qodef-light-header')){ qodef.defaultHeaderStyle = 'qodef-light-header';}\n }", "title": "" }, { "docid": "18eb5514b3cbfa1b8c20418a0ea0d18c", "score": "0.51004726", "text": "static get tag(){return\"lunr-search\"}", "title": "" }, { "docid": "daee69863fbbc58efceccd9a9ecfd7a5", "score": "0.50866413", "text": "function qodefOnWindowLoad() {\n qodefInitBlogListShortcodePagination().init();\n }", "title": "" }, { "docid": "8f9e475d3f896dcf676767cf59688f23", "score": "0.50761616", "text": "function qodefOnDocumentReady() {\n qodefSearchFullscreenWithSidebar();\n }", "title": "" }, { "docid": "9147282efbee82a24c34f6335baaf154", "score": "0.5074204", "text": "function searchDocumentReady() {\n searchDocumentReadyGeneral();\n searchDocumentReadyFilterByTag();\n}", "title": "" }, { "docid": "3d2ac75b0fb54183c191471de0c66d24", "score": "0.50722384", "text": "function init() {\n // Instantiate Raven\n // Raven.config(\"API_KEY\", {meta_data obj}).install();\n}", "title": "" }, { "docid": "0f5ce298bff80b96723b6766715b35aa", "score": "0.5068417", "text": "function qodefOnWindowLoad() {\n\t qodefInitBlogPagination().init();\n }", "title": "" }, { "docid": "438896e625d2d6e1fdaf48928cc49b58", "score": "0.50632596", "text": "function TQueries() { }", "title": "" }, { "docid": "438896e625d2d6e1fdaf48928cc49b58", "score": "0.50632596", "text": "function TQueries() { }", "title": "" }, { "docid": "438896e625d2d6e1fdaf48928cc49b58", "score": "0.50632596", "text": "function TQueries() { }", "title": "" }, { "docid": "438896e625d2d6e1fdaf48928cc49b58", "score": "0.50632596", "text": "function TQueries() { }", "title": "" }, { "docid": "438896e625d2d6e1fdaf48928cc49b58", "score": "0.50632596", "text": "function TQueries() { }", "title": "" }, { "docid": "35b7558128ad0bef246c546e76decd76", "score": "0.5056001", "text": "function StaticOntologyService() {\n\t\n}", "title": "" }, { "docid": "830200347528d9885f230acc1c91a767", "score": "0.505303", "text": "function hot_spot_query_callback1(){\n\tvar data = {};\n\tdata.isUpdate = true;\n\tdata.version =\"2\"\n\tdata.add = hot_query_data;\n\thot_spot_query_callback(data);\n}", "title": "" }, { "docid": "31f155a035c8acdc9dcd24b973892b22", "score": "0.50526774", "text": "function TQueries() {}", "title": "" }, { "docid": "31f155a035c8acdc9dcd24b973892b22", "score": "0.50526774", "text": "function TQueries() {}", "title": "" }, { "docid": "39402a9afb88b801e9f2cb1f09048af4", "score": "0.5052597", "text": "function qodefOnDocumentReady() {\n qodefInitRangeSlider();\n qodefInitQuantityButtons();\n }", "title": "" }, { "docid": "0e183c8c8566cb70a2e43a69ab3861d0", "score": "0.5050387", "text": "function crud_setup_search_binds() {\n\tjQuery('#crud-search').on('click', function(event) {\n\t\tevent.preventDefault();\n\t\tjQuery('#crud-search').hide();\n\t\tjQuery('#crud-search-more').show();\n\t});\n\tjQuery('#crud_search_button').on('click', function(event) {\n\t\tevent.preventDefault();\n\t\tcrud_search(this, [jQuery('#crud_search_column').val(),'=',jQuery('.crud-searchdata.crud-search-active').val()]);\n\t});\n}", "title": "" }, { "docid": "d706db7256e6e7add175164e55d56afc", "score": "0.50446063", "text": "function RecommendationsHandler() {\n this.dataBase = JSON.parse(fs.readFileSync(path.resolve(__dirname, '../resources/relatedBase.json')));\n this.basedNearQuery = \"prefix mo: <http://purl.org/ontology/mo/>\\n\\\n select * where {\\n\\\n ?artist a mo:MusicArtist.\\n\\\n ?artist foaf:name \\\"%artist%\\\".\\n\\\n ?artist foaf:based_near ?loc.\\n\\\n ?loc a <http://www.w3.org/2003/01/geo/wgs84_pos#SpatialThing>.\\n\\\n ?loc rdfs:label \\\"%location%\\\"\\n\\\n} LIMIT 100\";\n\n this.eventQuery = \"prefix mo: <http://purl.org/ontology/mo/>\\n\\\n select * where {\\n\\\n ?artist a mo:MusicArtist.\\n\\\n ?artist foaf:name \\\"%artist%\\\".\\n\\\n ?artist foaf:made ?release.\\n\\\n ?event mo:release ?release.\\n\\\n ?event dc:date ?date.\\n\\\n ?release dc:title ?title.\\n\\\n ?event <http://purl.org/NET/c4dm/event.owl#place> ?loc.\\n\\\n ?loc a <http://www.w3.org/2003/01/geo/wgs84_pos#SpatialThing>.\\n\\\n ?loc rdfs:label \\\"%location%\\\"\\n\\\n} LIMIT 100\";\n}", "title": "" }, { "docid": "dfc7d34605a32f8eb8495c085315ff50", "score": "0.5034985", "text": "function lesseoProcInit($p) {\n\t$p.Lib={}; //lib functions added in processingLS\n\tLibInit.call($p.Lib,$p);\n\t$p.LS={}; //functions closed related to processingLS UI\n\tLSInit.call($p.LS,$p);\n\t$p.Show={}; //functions specific to a show\n\tShowInit.call($p.Show,$p);\n}", "title": "" }, { "docid": "5b32cbb13958bf86fca233fc998e4edb", "score": "0.5031982", "text": "function SearchGeoResults() {\n\n}", "title": "" }, { "docid": "a8c18640b3d78b6eef3cff56be75c128", "score": "0.5023117", "text": "function init(){\n api.getGroup(0, function(err, group0) {\n if (err) throw err;\n console.log('Processing group 0...');\n //displayResults(group0);\n parseGroup0(group0);\n });\n api.groups(function(err, groups) {\n if (err) throw err;\n console.log('Processing ' + groups.length + ' groups...');\n //displayResults(groups);\n parseGroups(groups);\n });\n\n api.lights(function(err, lights) {\n if (err) throw err;\n console.log('Processing ' + lights.lights.length + ' lights...');\n //displayResults(lights);\n parseLights(lights.lights);\n });\n\n api.scenes(function(err, scenes) {\n if (err) throw err;\n console.log('Processing ' + scenes.length + ' scenes...');\n //displayResults(scenes);\n createStates(scenes);\n });\n}", "title": "" }, { "docid": "e72de6a8003a9ed3f957c86f563f9819", "score": "0.5019509", "text": "function initWidget(pElementId,sWidgetId,solrBackend ,callback) {\n var searchWidget = $(\"#\" + sWidgetId);\n if (! searchWidget.length) {\n searchWidget = new SearchWidget(sWidgetId);\n $(\"#\" + pElementId).append(searchWidget.html5());\n // register onclick\n registerAjax(searchWidget, solrBackend, callback);\n }\n /*else {\n console.log(\"searchWidget: \" + sWidgetId + \" is already defined\");\n }*/\n}", "title": "" }, { "docid": "6fcabfd5146488b73066d6322608bb92", "score": "0.5018551", "text": "function init() {\n // Packages.java.lang.System.err.println(\"Initializing quality metrics extension\");\n // Packages.java.lang.System.err.println(module.getMountPoint());\n\n // Script files to inject into /project page\n ClientSideResourceManager.addPaths(\n \"project/scripts\",\n module,\n [\n \"scripts/dialogs/calculateMetricsDialog.js\",\n \"scripts/dialogs/persistMetrics.js\",\n \"scripts/project-injection.js\",\n \"scripts/facets/metrics-facet.js\",\n \"scripts/menus.js\"\n ]\n );\n\n // Style files to inject into /project page\n ClientSideResourceManager.addPaths(\n \"project/styles\",\n module,\n [\n \"styles/project-injection.less\"\n ]\n );\n\n var RS = Packages.com.google.refine.RefineServlet;\n RS.registerClassMapping(\n \"com.google.refine.operations.MetricsExtensionOperation$MetricsProjectChange\",\n \"com.google.refine.metricsExtension.operations.MetricsExtensionOperation$MetricsProjectChange\");\n RS.cacheClass(Packages.com.google.refine.metricsExtension.operations.MetricsExtensionOperation$MetricsProjectChange);\n\n RS.registerCommand(module, \"metricsOverlayModel\", new Packages.com.google.refine.metricsExtension.commands.MetricsExtensionCommand);\n RS.registerCommand(module, \"evaluateMetrics\", new Packages.com.google.refine.metricsExtension.commands.EvaluateMetricsCommand);\n RS.registerCommand(module, \"evaluateSelectedMetric\", new Packages.com.google.refine.metricsExtension.commands.EvaluateSelectedMetricCommand);\n RS.registerCommand(module, \"evaluateDataTypes\", new Packages.com.google.refine.metricsExtension.commands.EvaluateDataTypesCommand);\n RS.registerCommand(module, \"persistMetrics\", new Packages.com.google.refine.metricsExtension.commands.PersistMetricsCommand);\n RS.registerCommand(module, \"getMetricsOverlayModel\", new Packages.com.google.refine.metricsExtension.commands.GetMetricsOverlayModelCommand);\n RS.registerCommand(module, \"createMetric\", new Packages.com.google.refine.metricsExtension.commands.CreateMetricCommand);\n RS.registerCommand(module, \"updateMetric\", new Packages.com.google.refine.metricsExtension.commands.UpdateMetricCommand);\n RS.registerCommand(module, \"mergeMetric\", new Packages.com.google.refine.metricsExtension.commands.MergeMetricCommand);\n RS.registerCommand(module, \"duplicateMetric\", new Packages.com.google.refine.metricsExtension.commands.DuplicateMetricCommand);\n RS.registerCommand(module, \"deleteMetric\", new Packages.com.google.refine.metricsExtension.commands.DeleteMetricCommand);\n RS.registerCommand(module, \"get-metricdoc-language-info\", new Packages.com.google.refine.metricsExtension.commands.GetMetricDocLanguageInfoCommand);\n\n var OR = Packages.com.google.refine.operations.OperationRegistry;\n OR.registerOperation(module, \"metricsExtension\", Packages.com.google.refine.metricsExtension.operations.MetricsExtensionOperation);\n OR.registerOperation(module, \"persistMetrics\", Packages.com.google.refine.metricsExtension.operations.PersistMetricsOperation);\n\n var FCR = Packages.com.google.refine.grel.ControlFunctionRegistry;\n FCR.registerFunction(\"completeness\", new Packages.com.google.refine.metricsExtension.expr.metrics.singleColumn.Completeness());\n FCR.registerFunction(\"validity\", new Packages.com.google.refine.metricsExtension.expr.metrics.singleColumn.Validity());\n FCR.registerFunction(\"plausibility\", new Packages.com.google.refine.metricsExtension.expr.metrics.singleColumn.Plausibility());\n FCR.registerFunction(\"dateInterval\", new Packages.com.google.refine.metricsExtension.expr.metrics.spanningColumn.DateInterval());\n FCR.registerFunction(\"dateIntervalOutliers\", new Packages.com.google.refine.metricsExtension.expr.metrics.spanningColumn.DateIntervalOutliers());\n FCR.registerFunction(\"uniqueness\", new Packages.com.google.refine.metricsExtension.expr.metrics.spanningColumn.Uniqueness());\n // quality checks\n FCR.registerFunction(\"median\", new Packages.com.google.refine.metricsExtension.expr.checks.MedianCheck());\n FCR.registerFunction(\"std\", new Packages.com.google.refine.metricsExtension.expr.checks.StandardDeviationCheck());\n FCR.registerFunction(\"variance\", new Packages.com.google.refine.metricsExtension.expr.checks.VarianceCheck());\n FCR.registerFunction(\"iqr\", new Packages.com.google.refine.metricsExtension.expr.checks.IQRCheck());\n // convenient GREL functions\n FCR.registerFunction(\"offset\", new Packages.com.google.refine.metricsExtension.expr.util.OffsetRow());\n\n Packages.com.google.refine.model.Project.\n registerOverlayModel(\"metricsOverlayModel\", Packages.com.google.refine.metricsExtension.model.MetricsOverlayModel);\n}", "title": "" }, { "docid": "126c5a2f034b81c46acfc61e2ed24ba3", "score": "0.50149435", "text": "function qodefOnDocumentReady() {\n\t qodefIconWithHover().init();\n\t qodefDisableSmoothScrollForMac();\n\t qodefInitAnchor().init();\n\t qodefInitBackToTop();\n\t qodefBackButtonShowHide();\n\t qodefInitSelfHostedVideoPlayer();\n\t qodefSelfHostedVideoSize();\n\t qodefFluidVideo();\n\t qodefOwlSlider();\n\t qodefPreloadBackgrounds();\n\t qodefPrettyPhoto();\n\t qodefSearchPostTypeWidget();\n }", "title": "" }, { "docid": "4213fce23ce5b47c64fb6e401758bed2", "score": "0.50005895", "text": "function init() {}", "title": "" }, { "docid": "4213fce23ce5b47c64fb6e401758bed2", "score": "0.50005895", "text": "function init() {}", "title": "" }, { "docid": "4213fce23ce5b47c64fb6e401758bed2", "score": "0.50005895", "text": "function init() {}", "title": "" }, { "docid": "4213fce23ce5b47c64fb6e401758bed2", "score": "0.50005895", "text": "function init() {}", "title": "" }, { "docid": "4213fce23ce5b47c64fb6e401758bed2", "score": "0.50005895", "text": "function init() {}", "title": "" }, { "docid": "4213fce23ce5b47c64fb6e401758bed2", "score": "0.50005895", "text": "function init() {}", "title": "" } ]
ca59a5afbab473c68750beecfaad2fc3
Function to make sure rounding does not crash with toFixed(). Will only apply toFixed when possible else will return entry raw.
[ { "docid": "b30eb831d3d1d31cb67adf49c4034e5d", "score": "0.55960166", "text": "function myToFixed_(number, decimal) {\n \n if (validateN_(number)) return Number(number).toFixed(decimal);\n else return number;\n}", "title": "" } ]
[ { "docid": "58ebbec8c4aabd3af5a635894e77819d", "score": "0.6724276", "text": "handleRounding(value, precision) {\n return parseFloat(Math.round(value * 100) / 100).toFixed(precision)\n }", "title": "" }, { "docid": "6509601c1479229ee5d8216e801321e0", "score": "0.661487", "text": "function fix(){\n return (parseFloat(this.toPrecision(12)));\n }", "title": "" }, { "docid": "11e868abef3f768e1de618e6f4b3cc4f", "score": "0.6501321", "text": "function roundToTenthsToFixed( number ) {\n return( number.toFixed(1));\n}", "title": "" }, { "docid": "e9a348c5bde34d115142a3a8533e86c7", "score": "0.6463906", "text": "function round(val) {\n const res = Number.parseFloat(val).toPrecision(6);\n return res === \"NaN\" ? val : res;\n }", "title": "" }, { "docid": "8f258b36a4ddba1fc1e84bffa15e5a93", "score": "0.644549", "text": "function toFixed(value, precision, roundingFunction, optionals) {\n\t var power = Math.pow(10, precision),\n\t optionalsRegExp,\n\t output;\n\n\t //roundingFunction = (roundingFunction !== undefined ? roundingFunction : Math.round);\n\t // Multiply up by precision, round accurately, then divide and use native toFixed():\n\t output = (roundingFunction(value * power) / power).toFixed(precision);\n\n\t if (optionals) {\n\t optionalsRegExp = new RegExp('0{1,' + optionals + '}$');\n\t output = output.replace(optionalsRegExp, '');\n\t }\n\n\t return output;\n\t }", "title": "" }, { "docid": "34307b15d93a353e12154efe8fb874b7", "score": "0.64321136", "text": "function roundFloat(value) {\n if (value % 1 === 0) {\n return value;\n } else {\n return parseFloat(value).toPrecision(2);\n }\n }", "title": "" }, { "docid": "58a396ed61024670c9776630e2abab1a", "score": "0.64170074", "text": "function toFixed(value,precision,roundingFunction,optionals){var power=Math.pow(10,precision),optionalsRegExp,output;if(value.toString().indexOf('e')>-1){// toFixed returns scientific notation for numbers above 1e21 and below 1e-7\noutput=toFixedLargeSmall(value,precision);// remove the leading negative sign if it exists and should not be present (e.g. -0.00)\nif(output.charAt(0)==='-'&&+output>=0){output=output.substr(1);// chop off the '-'\n}}else{// Multiply up by precision, round accurately, then divide and use native toFixed():\noutput=(roundingFunction(value+'e+'+precision)/power).toFixed(precision);}if(optionals){optionalsRegExp=new RegExp('0{1,'+optionals+'}$');output=output.replace(optionalsRegExp,'');}return output;}/************************************\n Formatting\n ************************************/// determine what type of formatting we need to do", "title": "" }, { "docid": "58a396ed61024670c9776630e2abab1a", "score": "0.64170074", "text": "function toFixed(value,precision,roundingFunction,optionals){var power=Math.pow(10,precision),optionalsRegExp,output;if(value.toString().indexOf('e')>-1){// toFixed returns scientific notation for numbers above 1e21 and below 1e-7\noutput=toFixedLargeSmall(value,precision);// remove the leading negative sign if it exists and should not be present (e.g. -0.00)\nif(output.charAt(0)==='-'&&+output>=0){output=output.substr(1);// chop off the '-'\n}}else{// Multiply up by precision, round accurately, then divide and use native toFixed():\noutput=(roundingFunction(value+'e+'+precision)/power).toFixed(precision);}if(optionals){optionalsRegExp=new RegExp('0{1,'+optionals+'}$');output=output.replace(optionalsRegExp,'');}return output;}/************************************\n Formatting\n ************************************/// determine what type of formatting we need to do", "title": "" }, { "docid": "ef6ca74401be460c9c71246a68a1f680", "score": "0.6346271", "text": "function toFixed (value, precision, roundingFunction, optionals) {\n var power = Math.pow(10, precision),\n optionalsRegExp,\n output;\n \n //roundingFunction = (roundingFunction !== undefined ? roundingFunction : Math.round);\n // Multiply up by precision, round accurately, then divide and use native toFixed():\n output = (roundingFunction(value * power) / power).toFixed(precision);\n\n if (optionals) {\n optionalsRegExp = new RegExp('0{1,' + optionals + '}$');\n output = output.replace(optionalsRegExp, '');\n }\n\n return output;\n }", "title": "" }, { "docid": "ef6ca74401be460c9c71246a68a1f680", "score": "0.6346271", "text": "function toFixed (value, precision, roundingFunction, optionals) {\n var power = Math.pow(10, precision),\n optionalsRegExp,\n output;\n \n //roundingFunction = (roundingFunction !== undefined ? roundingFunction : Math.round);\n // Multiply up by precision, round accurately, then divide and use native toFixed():\n output = (roundingFunction(value * power) / power).toFixed(precision);\n\n if (optionals) {\n optionalsRegExp = new RegExp('0{1,' + optionals + '}$');\n output = output.replace(optionalsRegExp, '');\n }\n\n return output;\n }", "title": "" }, { "docid": "ef6ca74401be460c9c71246a68a1f680", "score": "0.6346271", "text": "function toFixed (value, precision, roundingFunction, optionals) {\n var power = Math.pow(10, precision),\n optionalsRegExp,\n output;\n \n //roundingFunction = (roundingFunction !== undefined ? roundingFunction : Math.round);\n // Multiply up by precision, round accurately, then divide and use native toFixed():\n output = (roundingFunction(value * power) / power).toFixed(precision);\n\n if (optionals) {\n optionalsRegExp = new RegExp('0{1,' + optionals + '}$');\n output = output.replace(optionalsRegExp, '');\n }\n\n return output;\n }", "title": "" }, { "docid": "ef6ca74401be460c9c71246a68a1f680", "score": "0.6346271", "text": "function toFixed (value, precision, roundingFunction, optionals) {\n var power = Math.pow(10, precision),\n optionalsRegExp,\n output;\n \n //roundingFunction = (roundingFunction !== undefined ? roundingFunction : Math.round);\n // Multiply up by precision, round accurately, then divide and use native toFixed():\n output = (roundingFunction(value * power) / power).toFixed(precision);\n\n if (optionals) {\n optionalsRegExp = new RegExp('0{1,' + optionals + '}$');\n output = output.replace(optionalsRegExp, '');\n }\n\n return output;\n }", "title": "" }, { "docid": "ef6ca74401be460c9c71246a68a1f680", "score": "0.6346271", "text": "function toFixed (value, precision, roundingFunction, optionals) {\n var power = Math.pow(10, precision),\n optionalsRegExp,\n output;\n \n //roundingFunction = (roundingFunction !== undefined ? roundingFunction : Math.round);\n // Multiply up by precision, round accurately, then divide and use native toFixed():\n output = (roundingFunction(value * power) / power).toFixed(precision);\n\n if (optionals) {\n optionalsRegExp = new RegExp('0{1,' + optionals + '}$');\n output = output.replace(optionalsRegExp, '');\n }\n\n return output;\n }", "title": "" }, { "docid": "cb400c65bd908a623b730ec94e30aa6c", "score": "0.63370556", "text": "function toFixed(value, precision, roundingFunction, optionals) {\n var power = Math.pow(10, precision),\n optionalsRegExp,\n output;\n\n //roundingFunction = (roundingFunction !== undefined ? roundingFunction : Math.round);\n // Multiply up by precision, round accurately, then divide and use native toFixed():\n output = (roundingFunction(value * power) / power).toFixed(precision);\n\n if (optionals) {\n optionalsRegExp = new RegExp('0{1,' + optionals + '}$');\n output = output.replace(optionalsRegExp, '');\n }\n\n return output;\n }", "title": "" }, { "docid": "218b4a0a005a1495c8cc7203f919fed2", "score": "0.6322372", "text": "function roundFix(number, precision) {\n var multi = Math.pow(10, precision);\n return Math.round((number * multi).toFixed(precision + 1)) / multi;\n }", "title": "" }, { "docid": "7165bb8b4d5e2f10899b2c8a59c91639", "score": "0.62724507", "text": "function fix(x) {\n x = Number(x);\n x = x.toFixed(5);\n x = Number(x);\n return x;\n }", "title": "" }, { "docid": "de14c24f9634a60f55b13e6e01b8068f", "score": "0.6218125", "text": "function round(a) {\n return (a).toFixed(0);\n\n}", "title": "" }, { "docid": "43cda29d6c0a2d54e928e4203cfe0f73", "score": "0.62007374", "text": "function rounding(){\n tempDisplay = Number(Math.round(tempDisplay+'e4')+'e-4'); \n}", "title": "" }, { "docid": "6b072bbd321eaab690e6a2af6ff32ccd", "score": "0.6179718", "text": "function fix(x) {\n return round(x, 15);\n}", "title": "" }, { "docid": "f92c6268812a0f7244cc74e01760ede1", "score": "0.616524", "text": "roundValue(element) {\n return parseFloat(element.toFixed(1));\n }", "title": "" }, { "docid": "02b6b89cdc0301207236e86024dd1d36", "score": "0.6147937", "text": "function toFixed (value, maxDecimals, roundingFunction, optionals) {\n var splitValue = value.toString().split('.'),\n minDecimals = maxDecimals - (optionals || 0),\n boundedPrecision,\n optionalsRegExp,\n power,\n output;\n\n // Use the smallest precision value possible to avoid errors from floating point representation\n if (splitValue.length === 2) {\n boundedPrecision = Math.min(Math.max(splitValue[1].length, minDecimals), maxDecimals);\n } else {\n boundedPrecision = minDecimals;\n }\n\n power = Math.pow(10, boundedPrecision);\n\n //roundingFunction = (roundingFunction !== undefined ? roundingFunction : Math.round);\n // Multiply up by precision, round accurately, then divide and use native toFixed():\n output = (roundingFunction(value * power) / power).toFixed(boundedPrecision);\n\n if (optionals > maxDecimals - boundedPrecision) {\n optionalsRegExp = new RegExp('\\\\.?0{1,' + (optionals - (maxDecimals - boundedPrecision)) + '}$');\n output = output.replace(optionalsRegExp, '');\n }\n\n return output;\n }", "title": "" }, { "docid": "79e13a7e801e9fe230daa09418c3f6bc", "score": "0.6121097", "text": "function rounded() {\n return function (val, to) {\n return val.toFixed(to || 0);\n };\n }", "title": "" }, { "docid": "939a2154709bbe7b6b9a9aa353efeccd", "score": "0.61183566", "text": "function toFixed(value, precision, roundingFunction, optionals) {\n var power = Math.pow(10, precision),\n optionalsRegExp,\n output;\n\n if (value.toString().indexOf('e') > -1) {\n // toFixed returns scientific notation for numbers above 1e21 and below 1e-7\n output = toFixedLargeSmall(value, precision);\n // remove the leading negative sign if it exists and should not be present (e.g. -0.00)\n if (output.charAt(0) === '-' && +output >= 0) {\n output = output.substr(1); // chop off the '-'\n }\n }\n else {\n // Multiply up by precision, round accurately, then divide and use native toFixed():\n output = (roundingFunction(value + 'e+' + precision) / power).toFixed(precision);\n }\n\n if (optionals) {\n optionalsRegExp = new RegExp('0{1,' + optionals + '}$');\n output = output.replace(optionalsRegExp, '');\n }\n\n return output;\n }", "title": "" }, { "docid": "939a2154709bbe7b6b9a9aa353efeccd", "score": "0.61183566", "text": "function toFixed(value, precision, roundingFunction, optionals) {\n var power = Math.pow(10, precision),\n optionalsRegExp,\n output;\n\n if (value.toString().indexOf('e') > -1) {\n // toFixed returns scientific notation for numbers above 1e21 and below 1e-7\n output = toFixedLargeSmall(value, precision);\n // remove the leading negative sign if it exists and should not be present (e.g. -0.00)\n if (output.charAt(0) === '-' && +output >= 0) {\n output = output.substr(1); // chop off the '-'\n }\n }\n else {\n // Multiply up by precision, round accurately, then divide and use native toFixed():\n output = (roundingFunction(value + 'e+' + precision) / power).toFixed(precision);\n }\n\n if (optionals) {\n optionalsRegExp = new RegExp('0{1,' + optionals + '}$');\n output = output.replace(optionalsRegExp, '');\n }\n\n return output;\n }", "title": "" }, { "docid": "939a2154709bbe7b6b9a9aa353efeccd", "score": "0.61183566", "text": "function toFixed(value, precision, roundingFunction, optionals) {\n var power = Math.pow(10, precision),\n optionalsRegExp,\n output;\n\n if (value.toString().indexOf('e') > -1) {\n // toFixed returns scientific notation for numbers above 1e21 and below 1e-7\n output = toFixedLargeSmall(value, precision);\n // remove the leading negative sign if it exists and should not be present (e.g. -0.00)\n if (output.charAt(0) === '-' && +output >= 0) {\n output = output.substr(1); // chop off the '-'\n }\n }\n else {\n // Multiply up by precision, round accurately, then divide and use native toFixed():\n output = (roundingFunction(value + 'e+' + precision) / power).toFixed(precision);\n }\n\n if (optionals) {\n optionalsRegExp = new RegExp('0{1,' + optionals + '}$');\n output = output.replace(optionalsRegExp, '');\n }\n\n return output;\n }", "title": "" }, { "docid": "939a2154709bbe7b6b9a9aa353efeccd", "score": "0.61183566", "text": "function toFixed(value, precision, roundingFunction, optionals) {\n var power = Math.pow(10, precision),\n optionalsRegExp,\n output;\n\n if (value.toString().indexOf('e') > -1) {\n // toFixed returns scientific notation for numbers above 1e21 and below 1e-7\n output = toFixedLargeSmall(value, precision);\n // remove the leading negative sign if it exists and should not be present (e.g. -0.00)\n if (output.charAt(0) === '-' && +output >= 0) {\n output = output.substr(1); // chop off the '-'\n }\n }\n else {\n // Multiply up by precision, round accurately, then divide and use native toFixed():\n output = (roundingFunction(value + 'e+' + precision) / power).toFixed(precision);\n }\n\n if (optionals) {\n optionalsRegExp = new RegExp('0{1,' + optionals + '}$');\n output = output.replace(optionalsRegExp, '');\n }\n\n return output;\n }", "title": "" }, { "docid": "6d5ce6cc82136b188813072135108443", "score": "0.61147845", "text": "function toFixed(value, precision, roundingFunction, optionals) {\n var power = Math.pow(10, precision),\n optionalsRegExp,\n output;\n\n if (value.toString().indexOf('e') > -1) {\n // toFixed returns scientific notation for numbers above 1e21 and below 1e-7\n output = toFixedLargeSmall(value, precision);\n // remove the leading negative sign if it exists and should not be present (e.g. -0.00)\n if (output.charAt(0) === '-' && +output >= 0) {\n output = output.substr(1); // chop off the '-'\n }\n } else {\n // Multiply up by precision, round accurately, then divide and use native toFixed():\n output = (roundingFunction(value + 'e+' + precision) / power).toFixed(precision);\n }\n\n if (optionals) {\n optionalsRegExp = new RegExp('0{1,' + optionals + '}$');\n output = output.replace(optionalsRegExp, '');\n }\n\n return output;\n }", "title": "" }, { "docid": "9c7dd5ec1ef4c28891463922361b951b", "score": "0.6103692", "text": "function roundValue(original_number, decimals) \r\n{\r\n\tvar flag = 0;\r\n\t\r\n\tif (original_number < 0) flag = 1;\r\n\t\r\n var result1 = Math.abs(original_number) * Math.pow(10, decimals);\r\n var result2 = Math.round(result1);\r\n var result3 = result2 / Math.pow(10, decimals);\r\n\t\r\n\tif (flag == 1) result3 = manipulateValue(0,result3,1);\r\n\t\r\n return pad_with_zeros(result3, decimals);\r\n}", "title": "" }, { "docid": "7b92db8cba53fe8fd539a8f604d8565d", "score": "0.6098957", "text": "function fallbackPrintNumber() {\n value = +value;\n if (value === undefined || isNaN(value)) {\n return \"\";\n }\n\n minimumFractionDigits = +minimumFractionDigits;\n maximumFractionDigits = +maximumFractionDigits;\n if (!minimumFractionDigits || minimumFractionDigits < 0) {\n minimumFractionDigits = 0;\n }\n if (!maximumFractionDigits || maximumFractionDigits <= minimumFractionDigits) {\n // If maxDecimalPlaces is falsey or a less than min, then it's invalid. \n // So, just treat minDecimalPlaces === maxDecimalPlaces;\n return value.toFixed(minimumFractionDigits);\n }\n\n // Notes on toFixed: \n // const a = 2/3; // 0.666666666666\n // console.log(a.toFixed(0)); // 1\n // console.log(a.toFixed(1)) // 0.7\n // console.log(a.toFixed(4)) // 0.6667\n\n const longValue = value.toFixed(maximumFractionDigits);\n let index = longValue.length - 1;\n const decimalPlace = longValue.indexOf(\".\");\n\n // if longNumber === \"0.2345\"\n // and minDecimalPlaces === 2\n // and decimalPlace === 1\n // then...\n // if index === 4 then continue\n // if index === 3 then stop (note that minDecimalPlaces + decimalPlace === 3)\n while (index > minimumFractionDigits + decimalPlace && longValue.charAt(index) === \"0\") {\n index -= 1;\n }\n\n // This would *truncate* the number.\n //return longNumber.substring(0, index + 1);\n // Instead, run toFixed (again) to *round* the number. \n // Why? If maxDecimalPlaces === 2 and value === .6666, we want to return .67 instead of .66.\n return value.toFixed(index - decimalPlace);\n }", "title": "" }, { "docid": "523dd3e6b48bb8bf807570316020f02b", "score": "0.6095208", "text": "function fixedRounding(x, fixedPos)\n{\n\tvar shift = Math.pow(10, fixedPos);\n\n\treturn Math.round(x * shift) / shift;\n}", "title": "" }, { "docid": "a7f11b306d4eb474ac70937be51c1490", "score": "0.6083118", "text": "function round(input){\n return Math.round(input * 1e10) / 1e10;\n}", "title": "" }, { "docid": "0a53581437ac31938bf4f062de613534", "score": "0.6082449", "text": "function fixRoundingErrors(number) {\n\tif(Math.abs(number - Math.round(number)) < 1e-6) {\n\t\treturn Math.round(number);\n\t} else {\n\t\treturn number;\n\t}\n}", "title": "" }, { "docid": "419e656bd2e2205c22fd146bcfe7e078", "score": "0.60204005", "text": "function preserveDecimal(n) {\nreturn parseFloat(n);\n}", "title": "" }, { "docid": "e66b5bb197f6792a4b1d086b2ea7ad79", "score": "0.5982458", "text": "function numToFixed(obj, n) {\n console.log(obj);\n for (let k in obj) {\n if (obj.hasOwnProperty(k) && typeof obj[k] === \"number\") {\n obj[k] = obj[k].toFixed(n);\n }\n }\n return obj;\n}", "title": "" }, { "docid": "2f5773aebd20556b26737aa5c8124558", "score": "0.59773093", "text": "function toFixed(value, precision) {\n var power = Math.pow(10, precision || 0);\n return String(Math.round(value * power) / power);\n}", "title": "" }, { "docid": "255bf96a219dcd64f949c88d9537b7f3", "score": "0.5963534", "text": "function preserveDecimal(n){\n return parseFloat(n,10.0);\n}", "title": "" }, { "docid": "f11ca50be2522fbf921d6995d76cea0b", "score": "0.5958809", "text": "function RoundFloat(floatVar, decimalPlaces) {\r\n\t\tvar p = StrToInt(Copy(\"1000000000\", 1, decimalPlaces + 1)),\r\n\t\t\t\tt = floatVar * p,\r\n\t\t\t\tr = Trunc(t);\r\n\t\t\t\tif (Frac(t) >= (1/2)) r = r + 1;\r\n\t\t\t\treturn (r / p);\r\n \t}", "title": "" }, { "docid": "ebda2d482fa1f6a24628144bf9aa4b27", "score": "0.59582907", "text": "function roundTo(x, num_decimals){\r\n return parseFloat(x.toFixed(num_decimals));\r\n}", "title": "" }, { "docid": "14f41e37931bcc0f31cfd8719839afc0", "score": "0.58937955", "text": "function preserveDecimal (n) {\n\treturn parseFloat(n);\n}", "title": "" }, { "docid": "13ff0f099692c36d52edef362d5b82e2", "score": "0.5880942", "text": "function betterToFixed(value, precision) {\n\t\t// model to work off from 1.005e2 (2 number of precision)\n\t\tvar exponentialForm = Number(value + 'e' + precision); /* Number (\"1.005e2\" string)*/\n\t\tvar rounded = Math.round(exponentialForm);\n\t\t /* Number('101e-2') ==> first it's string -> convert to number */\n\t\tvar finalResult = Number(rounded + 'e-' + precision);\n\t\t /* Number.toFixed(noOfSignificance) is native method*/\n\t\treturn finalResult.toFixed(precision);\n\t}", "title": "" }, { "docid": "958eaae8fb72d05c7a658ae4769bc19e", "score": "0.5875186", "text": "function toFixed(n, f) {\n var m = Math.pow(10, f);\n return ((n * m) | 0) / m;\n}", "title": "" }, { "docid": "53f5155866195c479edde848a3405bd3", "score": "0.5871736", "text": "function handlePrecisionErr(val) {\n var cleanedVal = Math.round(val * 1000000000) / 1000000000;\n return cleanedVal;\n }", "title": "" }, { "docid": "4086c2bc9ccf33d7f628e9d140d697e3", "score": "0.5862924", "text": "function getSetRelativeTimeRounding(roundingFunction){return void 0===roundingFunction?round:\"function\"==typeof roundingFunction&&(round=roundingFunction,!0)}", "title": "" }, { "docid": "5888e8fffc17c13b5426a9ddd751b399", "score": "0.5839988", "text": "function round(value, precision) {\n\t precision = precision || 0;\n\t\n\t value = ('' + value).split('e');\n\t value = Math.round(+(value[0] + 'e' + (value[1] ? +value[1] + precision : precision)));\n\t\n\t value = ('' + value).split('e');\n\t value = +(value[0] + 'e' + (value[1] ? +value[1] - precision : -precision));\n\t\n\t return value.toFixed(precision);\n\t}", "title": "" }, { "docid": "f6c68cb68d1dba7cdbb982c1e92ea0ca", "score": "0.58389854", "text": "function roundKpi(value){\n\t\tif (value){\n\t\t\tvalue = parseFloat(value).toFixed(2);\n\t\t\treturn value;\n\t\t}\n\t\telse {\n\t\t\treturn value;\n\t\t}\n\t}", "title": "" }, { "docid": "e92d77eeb8a15ee897cdbd14f3e9e7b3", "score": "0.5828679", "text": "function formatFixed(options) {\r\n if (options === void 0) { options = {}; }\r\n var digits = options.digits;\r\n var missing = options.missing || '';\r\n return function (_a) {\r\n var value = _a.value;\r\n if (value === null || value === undefined) {\r\n return missing;\r\n }\r\n return Number(value).toFixed(digits);\r\n };\r\n }", "title": "" }, { "docid": "e92d77eeb8a15ee897cdbd14f3e9e7b3", "score": "0.5828679", "text": "function formatFixed(options) {\r\n if (options === void 0) { options = {}; }\r\n var digits = options.digits;\r\n var missing = options.missing || '';\r\n return function (_a) {\r\n var value = _a.value;\r\n if (value === null || value === undefined) {\r\n return missing;\r\n }\r\n return Number(value).toFixed(digits);\r\n };\r\n }", "title": "" }, { "docid": "e92d77eeb8a15ee897cdbd14f3e9e7b3", "score": "0.5828679", "text": "function formatFixed(options) {\r\n if (options === void 0) { options = {}; }\r\n var digits = options.digits;\r\n var missing = options.missing || '';\r\n return function (_a) {\r\n var value = _a.value;\r\n if (value === null || value === undefined) {\r\n return missing;\r\n }\r\n return Number(value).toFixed(digits);\r\n };\r\n }", "title": "" }, { "docid": "d76b00abf898cad9b3ee37fd3a1e3a1c", "score": "0.58236283", "text": "function roundToSqrtToFixed( number ) {\n return ( Math.sqrt( number ).toFixed(0) );\n}", "title": "" }, { "docid": "86fb95e3de03171793731b5e3c0eb2c6", "score": "0.5812834", "text": "function setFixed() {\n let num = 5738.12847598;\n document.getElementById(\"num_fixed\").innerHTML = num.toFixed(2).toString();\n}", "title": "" }, { "docid": "2cb2c36bb3ce526f26ddde372afbb7e5", "score": "0.58115906", "text": "function toFixed(value, precision) {\n var power = Math.pow(10, precision || 0);\n return (Math.round(value * power) / power).toFixed(precision);\n}", "title": "" }, { "docid": "33c07c4958f0a7ad1ab6db67e19013dd", "score": "0.5808243", "text": "function roundOff(num,n) {\n num = num.toFixed(n)\n console.log(num)\n}", "title": "" }, { "docid": "bfb0886cd375ad5501be95dc2a0bcb10", "score": "0.5795598", "text": "function precise_round(num,decimals){\n\t\t\tvar t = Math.pow(10, decimals);\n \t\t\treturn Number((Math.round((num * t) + (decimals>0?1:0)*(Math.sign(num) * (10 / Math.pow(100, decimals)))) / t).toFixed(decimals));\n\t\t}", "title": "" }, { "docid": "efc3a5c3e7cfb14710d845819558f134", "score": "0.5778569", "text": "function round_float(x,n){\n if(!parseInt(n))\n \tvar n=0;\n if(!parseFloat(x))\n \treturn false;\n return Math.round(x*Math.pow(10,n))/Math.pow(10,n);\n}", "title": "" }, { "docid": "efc3a5c3e7cfb14710d845819558f134", "score": "0.5778569", "text": "function round_float(x,n){\n if(!parseInt(n))\n \tvar n=0;\n if(!parseFloat(x))\n \treturn false;\n return Math.round(x*Math.pow(10,n))/Math.pow(10,n);\n}", "title": "" }, { "docid": "f9e03709cb629944c585dc8c48d24bb9", "score": "0.57747537", "text": "function floatingPointFix(value, recurringSymbols = 10) {\n if (!value || Number.isNaN(parseFloat(value))) {\n // value is wrong or empty\n return value;\n }\n\n const [intPart, decimalPart] = `${value}`.split('.');\n\n if (!decimalPart) {\n // no decimal part\n return value;\n }\n\n const regex = new RegExp(\n `(9{${recurringSymbols},}|0{${recurringSymbols},})(\\\\d)*$`,\n 'gm'\n );\n const matched = decimalPart.match(regex);\n\n if (!matched) {\n // no floating-point bug\n return value;\n }\n\n const [wrongPart] = matched;\n const correctDecimalsLength = decimalPart.length - wrongPart.length;\n return parseFloat(\n parseFloat(`${intPart}.${decimalPart}`).toFixed(correctDecimalsLength)\n );\n}", "title": "" }, { "docid": "bcffb114464404fd010f308b81a09d64", "score": "0.57724684", "text": "function round(value, precision, floor) {\n if (!Type_isNumber(precision) || precision <= 0) {\n var rounded = Math.round(value);\n if (floor) {\n if (rounded - value == 0.5) {\n rounded--;\n }\n }\n return rounded;\n }\n else {\n var d = Math.pow(10, precision);\n return Math.round(value * d) / d;\n }\n}", "title": "" }, { "docid": "6b595baf4e2d4f805e85d5eed1871965", "score": "0.5746788", "text": "function floorFigure(figure, decimals){\r\n if (!decimals) decimals = 4;\r\n var d = Math.pow(10,decimals);\r\n return (parseInt(figure*d)/d).toFixed(decimals);\r\n}", "title": "" }, { "docid": "2a6aa4e504af8e717fae8119660f65e8", "score": "0.57337445", "text": "function toFixed(value, precision) {\n\t\tprecision = checkPrecision(precision, settings.number.precision);\n\t\tvar power = Math.pow(10, precision);\n\n\t\t// Multiply up by precision, round accurately, then divide and use native toFixed():\n\t\treturn (Math.round(value * power) / power).toFixed(precision);\n\t}", "title": "" }, { "docid": "dc324acda703e2f8f053fe2335124873", "score": "0.5726473", "text": "function round(value, precision) {\n precision = precision || 0;\n\n value = ('' + value).split('e');\n value = Math.round(+(value[0] + 'e' + (value[1] ? +value[1] + precision : precision)));\n\n value = ('' + value).split('e');\n value = +(value[0] + 'e' + (value[1] ? +value[1] - precision : -precision));\n\n return value.toFixed(precision);\n}", "title": "" }, { "docid": "a755f97a85a862f703a68b7894514bdf", "score": "0.57191056", "text": "function round(x, digits) {\n digits = digits || 0;\n return Number(x.toFixed(digits));\n}", "title": "" }, { "docid": "9dea30e3134957fa92c8b006f8bb6aef", "score": "0.5712377", "text": "function round(value, roundingMode) {\n if (!roundingMode) {\n return Math.trunc(value);\n }\n switch (roundingMode) {\n case 'round':\n // used for Caffe Conv\n return Math.round(value);\n case 'ceil':\n // used for Caffe Pool\n return Math.ceil(value);\n case 'floor':\n return Math.floor(value);\n default:\n throw new Error(`Unknown roundingMode ${roundingMode}`);\n }\n}", "title": "" }, { "docid": "49fb823763a2bef0a84fd3c900e06d01", "score": "0.5693795", "text": "function toFixed(value, precision) \n{\n var precision = precision || 0,\n power = Math.pow(10, precision),\n absValue = Math.abs(Math.round(value * power)),\n result = (value < 0 ? '-' : '') + String(Math.floor(absValue / power));\n\n if (precision > 0) {\n var fraction = String(absValue % power),\n padding = new Array(Math.max(precision - fraction.length, 0) + 1).join('0');\n result += '.' + padding + fraction;\n }\n return result;\n}", "title": "" }, { "docid": "1d0163bbe2edd91ee62aa5dcf5fdee12", "score": "0.56902546", "text": "function toFixed(value, decimals) {\n\t\tvar scale = Math.pow(10, decimals);\n\t\treturn (Math.round(value * scale) / scale).toFixed(decimals);\n\t}", "title": "" }, { "docid": "ae208194f8356be2b2ef802a4fdf968a", "score": "0.56878585", "text": "function round(val, decimal) {\n return Number(Math.round(val + 'e' + decimal) + 'e-' + decimal); \n}", "title": "" }, { "docid": "a63b31180f4a5cb0ce2430757d03176d", "score": "0.56858623", "text": "function b(a,b,c,d){var e,f,g=Math.pow(10,b);\n//roundingFunction = (roundingFunction !== undefined ? roundingFunction : Math.round);\n// Multiply up by precision, round accurately, then divide and use native toFixed():\nreturn f=(c(a*g)/g).toFixed(b),d&&(e=new RegExp(\"0{1,\"+d+\"}$\"),f=f.replace(e,\"\")),f}", "title": "" }, { "docid": "14d7185fe7f478d88a8a372fe03c10d7", "score": "0.56853557", "text": "static Round(value){\n return Math.round((value + 0.01) * 10) / 10;\n }", "title": "" }, { "docid": "33e0ce4ef14a68b61b3f2e97962f1110", "score": "0.5681361", "text": "function roundFloat(number, decimalPoints) {\n var decimal = Math.pow(10, decimalPoints);\n return Math.round(number * decimal) / decimal;\n}", "title": "" }, { "docid": "6642d6a9777a1631be018d894b38ff92", "score": "0.5665816", "text": "function roundFatRule(toRound) {\r\n\t\tif (toRound < 0.5) {\r\n\t\t\treturn 0;\r\n\t\t} else if (toRound < 5) {\r\n\t\t\t//< 5 g - express to nearest .5g increment\r\n\t\t\treturn roundToNearestNum(toRound, 0.5);\r\n\t\t}\r\n\r\n\t\t//>= 5 g - express to nearest 1 g increment\r\n\t\treturn roundToNearestNum(toRound, 1);\r\n\t}", "title": "" }, { "docid": "b07c058e55f256a4474e0053930bc085", "score": "0.5665269", "text": "function financial(val) {\n return Number.parseFloat(val).toFixed(0);\n}", "title": "" }, { "docid": "b692b596e41e411df78ef99d4dd769c9", "score": "0.5645818", "text": "function enforcePrecision(val, nDecimalDigits){\n val = toNumber(val);\n var pow = Math.pow(10, nDecimalDigits);\n return +(Math.round(val * pow) / pow).toFixed(nDecimalDigits);\n }", "title": "" }, { "docid": "448d3269e669d1537fa304942d156b9a", "score": "0.56251645", "text": "function round(value, decimals) {\n return value.toFixed(decimals);\n}", "title": "" }, { "docid": "39f2865f4cbb66bb0149617874896261", "score": "0.56243175", "text": "static round(number, precision) {\n var factor = Math.pow(10, precision),\n temp_number = number * factor,\n rounded_temp_number = Math.round(temp_number);\n return rounded_temp_number / factor;\n }", "title": "" }, { "docid": "a6cd9b4b3cc5034031a568addb2f1d34", "score": "0.5604399", "text": "function roundTo(n, digits) \r\n{\r\n\tif (digits === undefined) {\r\n\t\tdigits = 0;\r\n\t}\r\n\r\n\tvar multiplicator = Math.pow(10, digits);\r\n\tn = parseFloat((n * multiplicator).toFixed(11));\r\n\treturn Math.round(n) / multiplicator;\r\n}", "title": "" }, { "docid": "a9449ea6d88a13cda5f2cfeb9cc22096", "score": "0.56022656", "text": "function roundFatRule(toRound){\n\t\tif (toRound < .5){\n\t\t\treturn 0;\n\t\t}else if (toRound < 5){\n\t\t\t//< 5 g - express to nearest .5g increment\n\t\t\treturn roundToNearestNum(toRound, .5);\n\t\t}else{\n\t\t\t//>= 5 g - express to nearest 1 g increment\n\t\t\treturn roundToNearestNum(toRound, 1);\n\t\t}\n\t}", "title": "" }, { "docid": "8a0a884c77a61d06ba627d63310177fb", "score": "0.5588119", "text": "function round(val, dec) { \n \n if(val==null || isNaN(parseFloat(val))) return;\n \n if(dec==null || isNaN(parseInt(dec))) dec = 0;\n \n var po = Math.pow(10,dec);\n \n return Math.round(val * po)/po;\n}", "title": "" }, { "docid": "ab2f17f093f3c129f6e5f3fd618abed2", "score": "0.5587398", "text": "function f(a) {\n a = +a;\n return fround(a);\n }", "title": "" }, { "docid": "2f255e64382f7f618a60a0b4ca226092", "score": "0.5574297", "text": "function myFunction(a) {\n return parseFloat(a.toFixed(2));\n}", "title": "" }, { "docid": "9f30a057d1fe3d2efcbee55fe903c632", "score": "0.5571065", "text": "function toFixed(value, precision) {\r\n var precision = precision || 0,\r\n power = Math.pow(10, precision),\r\n absValue = Math.abs(Math.round(value * power)),\r\n result = (value < 0 ? '-' : '') + String(Math.floor(absValue / power));\r\n\r\n if (precision > 0) {\r\n var fraction = String(absValue % power),\r\n padding = new Array(Math.max(precision - fraction.length, 0) + 1).join('0');\r\n result += '.' + padding + fraction;\r\n }\r\n return result;\r\n}", "title": "" }, { "docid": "94ab1ff83e8eabb211d63ad42be8c64b", "score": "0.5561451", "text": "function decimalRound(number, precision) \n{\n var factor = Math.pow(10, precision);\n var tempNumber = number * factor;\n var roundedTempNumber = Math.round(tempNumber);\n return roundedTempNumber / factor;\n}", "title": "" }, { "docid": "3ab97a229c130125b0ddf5c3c92d3115", "score": "0.5560714", "text": "function digits(value, round) {\n return parseFloat(value.toFixed(round));\n }", "title": "" }, { "docid": "05b3146adc3196e056225ec9ebe0fffe", "score": "0.55582577", "text": "function trimfloat(n, digits)\n{\n var dp, nn, i;\n\n n += \"\";\n dp = n.indexOf(\".\");\n if (dp != -1) {\n nn = n.substring(0, dp + 1);\n dp++;\n for (i = 0; i < digits; i++) {\n if (dp < n.length) {\n nn += n.charAt(dp);\n dp++;\n } else {\n break;\n }\n }\n\n /* Now we want to round the number. If we're not at\n the end of number and the next character is a digit\n >= 5 add 10^-digits to the value so far. */\n\n if (dp < n.length && n.charAt(dp) >= '5' &&\n n.charAt(dp) <= '9') {\n var rd = 0.1, rdi;\n\n for (rdi = 1; rdi < digits; rdi++) {\n rd *= 0.1;\n }\n rd += parseFloat(nn);\n rd += \"\";\n nn = rd.substring(0, nn.length);\n nn += \"\";\n }\n\n // Ditch trailing zeroes in decimal part\n\n while (nn.length > 0 && nn.charAt(nn.length - 1) == '0') {\n nn = nn.substring(0, nn.length - 1);\n }\n\n // Skip excess decimal places before exponent\n\n while (dp < n.length && n.charAt(dp) >= '0' &&\n n.charAt(dp) <= '9') {\n dp++;\n }\n\n // Append exponent, if any\n\n if (dp < n.length) {\n nn += n.substring(dp, n.length);\n }\n n = nn;\n }\n return n;\n}", "title": "" }, { "docid": "25ef5f1ced86ecb393c931ec9faf41ef", "score": "0.55581695", "text": "function roundToPrecision(numStr, scale, fixedDecimalScale) {\n\t //if number is empty don't do anything return empty string\n\t if (['', '-'].indexOf(numStr) !== -1) return numStr;\n\t var shoudHaveDecimalSeparator = numStr.indexOf('.') !== -1 && scale;\n\n\t var _splitDecimal = splitDecimal(numStr),\n\t beforeDecimal = _splitDecimal.beforeDecimal,\n\t afterDecimal = _splitDecimal.afterDecimal,\n\t hasNagation = _splitDecimal.hasNagation;\n\n\t var roundedDecimalParts = parseFloat(\"0.\".concat(afterDecimal || '0')).toFixed(scale).split('.');\n\t var intPart = beforeDecimal.split('').reverse().reduce(function (roundedStr, current, idx) {\n\t if (roundedStr.length > idx) {\n\t return (Number(roundedStr[0]) + Number(current)).toString() + roundedStr.substring(1, roundedStr.length);\n\t }\n\n\t return current + roundedStr;\n\t }, roundedDecimalParts[0]);\n\t var decimalPart = limitToScale(roundedDecimalParts[1] || '', Math.min(scale, afterDecimal.length), fixedDecimalScale);\n\t var negation = hasNagation ? '-' : '';\n\t var decimalSeparator = shoudHaveDecimalSeparator ? '.' : '';\n\t return \"\".concat(negation).concat(intPart).concat(decimalSeparator).concat(decimalPart);\n\t}", "title": "" }, { "docid": "1eb7d8dac6a5594be66b22e3ad051d08", "score": "0.5543591", "text": "function calculatePercentWithRounding(event) {\n // get values from web page.\n var billAmountInputElement = document.getElementById('billAmount');\n var tipPercentInputElement = document.getElementById('tipPercent');\n var billAmount = billAmountInputElement.value;\n var tipPercent = tipPercentInputElement.value;\n\n /*if (billAmount < 0) {\n billAmountInputElement.value = billAmount * -1;\n billAmount = billAmountInputElement.value;\n }\n\n if (tipPercent < 0) {\n tipPercentInputElement.value = tipPercent * -1;\n tipPercent = tipPercentInputElement.value;\n }*/\n\n // validate the the inputs are numbers. If they aren't, store False in var areFieldsNumbers so we know to stop and show an error. If they are numbers, store True in var areFieldsNumbers so the computations continue.\n var areFieldsNumbers = checkInputsDisplayErrorsReturn(billAmount, tipPercent);\n\n // if both fields are numbers, calculate.\n if (areFieldsNumbers) {\n // first do the calculations without rounding and output the result. These values will be used during the rounding calculations.\n var tipAmountUnrounded = Number(billAmount * (tipPercent / 100));\n var totalAmountUnrounded = Number(billAmount) + Number(tipAmountUnrounded);\n document.getElementById('output').innerHTML = tipPercent + '% of $' + (Math.round(billAmount * 100) / 100).toFixed(2) + ' is $' + (Math.round(tipAmountUnrounded * 100) / 100).toFixed(2) + ', so your total should be $' + ((Math.round(totalAmountUnrounded * 100) / 100).toFixed(2)) + '.<br /><br />';\n\n // second do the calculations without and withrounding using values from unrounded calculations\n var totalAmountRoundedUp = Math.ceil(totalAmountUnrounded);\n var tipAmountRoundingUp = Math.round((totalAmountRoundedUp - billAmount) * 100) / 100;\n var tipPercentRoundingUp = Math.round((tipAmountRoundingUp / billAmount) * 100) / 100;\n\n var totalAmountRoundedDown = Math.floor(totalAmountUnrounded);\n var tipAmountRoundingDown = Math.round((totalAmountRoundedDown - billAmount) * 100) / 100;\n var tipPercentRoundingDown = Math.round((tipAmountRoundingDown / billAmount) * 100) / 100;\n\n // output rounded up result\n document.getElementById('output').innerHTML += tipPercent + '% rounding up is a tip of $' + tipAmountRoundingUp.toFixed(2) + ', so your total should be $' + (Number(billAmount) + Number(tipAmountRoundingUp)).toFixed(2) + ' which is a tip of ' + Number(tipPercentRoundingUp * 100).toFixed(0) + '%.<br /><br />';\n\n // rounding down results in negative tips for bills of $1.01-$1.66, $2.01-$2.49, $3.01-$3.33, or $4.01-4.16. We'll display a warning instead of giving the negative tip amount.\n if (tipAmountRoundingDown >= 0) {\n document.getElementById('output').innerHTML += tipPercent + '% rounding down is a tip of $' + tipAmountRoundingDown.toFixed(2) + ', so your total should be $' + (Number(billAmount) + Number(tipAmountRoundingDown)).toFixed(2) + ' which is a tip of ' + Number(tipPercentRoundingDown * 100).toFixed(0) + '%.';\n } else {\n document.getElementById('output').innerHTML += tipPercent + '% rounding down would be a negative or zero tip ($' + tipAmountRoundingDown.toFixed(2) + ') because the bill amount is very small.';\n }\n }\n}", "title": "" }, { "docid": "c1ca742043577df0f1f135c7766a2a5f", "score": "0.55324113", "text": "function rounder(value){\n var value = value;\n // Convert value to string\n value = value.toString();\n // Split string by delimiter and return rounded result\n value = value.split('.')[0];\n\n return value;\n}", "title": "" }, { "docid": "e3dcba84dbeab3e19de1d191585ad4dc", "score": "0.5528888", "text": "function roundToPrecision(numStr, scale, fixedDecimalScale) {\n //if number is empty don't do anything return empty string\n if (['', '-'].indexOf(numStr) !== -1) return numStr;\n var shoudHaveDecimalSeparator = numStr.indexOf('.') !== -1 && scale;\n\n var _splitDecimal = splitDecimal(numStr),\n beforeDecimal = _splitDecimal.beforeDecimal,\n afterDecimal = _splitDecimal.afterDecimal,\n hasNagation = _splitDecimal.hasNagation;\n\n var roundedDecimalParts = parseFloat(\"0.\".concat(afterDecimal || '0')).toFixed(scale).split('.');\n var intPart = beforeDecimal.split('').reverse().reduce(function (roundedStr, current, idx) {\n if (roundedStr.length > idx) {\n return (Number(roundedStr[0]) + Number(current)).toString() + roundedStr.substring(1, roundedStr.length);\n }\n\n return current + roundedStr;\n }, roundedDecimalParts[0]);\n var decimalPart = limitToScale(roundedDecimalParts[1] || '', Math.min(scale, afterDecimal.length), fixedDecimalScale);\n var negation = hasNagation ? '-' : '';\n var decimalSeparator = shoudHaveDecimalSeparator ? '.' : '';\n return \"\".concat(negation).concat(intPart).concat(decimalSeparator).concat(decimalPart);\n}", "title": "" }, { "docid": "e3dcba84dbeab3e19de1d191585ad4dc", "score": "0.5528888", "text": "function roundToPrecision(numStr, scale, fixedDecimalScale) {\n //if number is empty don't do anything return empty string\n if (['', '-'].indexOf(numStr) !== -1) return numStr;\n var shoudHaveDecimalSeparator = numStr.indexOf('.') !== -1 && scale;\n\n var _splitDecimal = splitDecimal(numStr),\n beforeDecimal = _splitDecimal.beforeDecimal,\n afterDecimal = _splitDecimal.afterDecimal,\n hasNagation = _splitDecimal.hasNagation;\n\n var roundedDecimalParts = parseFloat(\"0.\".concat(afterDecimal || '0')).toFixed(scale).split('.');\n var intPart = beforeDecimal.split('').reverse().reduce(function (roundedStr, current, idx) {\n if (roundedStr.length > idx) {\n return (Number(roundedStr[0]) + Number(current)).toString() + roundedStr.substring(1, roundedStr.length);\n }\n\n return current + roundedStr;\n }, roundedDecimalParts[0]);\n var decimalPart = limitToScale(roundedDecimalParts[1] || '', Math.min(scale, afterDecimal.length), fixedDecimalScale);\n var negation = hasNagation ? '-' : '';\n var decimalSeparator = shoudHaveDecimalSeparator ? '.' : '';\n return \"\".concat(negation).concat(intPart).concat(decimalSeparator).concat(decimalPart);\n}", "title": "" }, { "docid": "7c3467c4d557a632fbf116c7b8b8840f", "score": "0.55233103", "text": "function GetRoundCostNr(fCostNr)\n{\n if (fCostNr == '')\n {return '-';}\n else\n {\n fCostNr = fCostNr - 0; // Force number\n iCurrDecNr = iCurrDecNr - 0; // Force number\n var fFloatVar = Math.pow(10, iCurrDecNr);\n\n //fCostNr += Math.pow(10, - (iCurrDecNr + 1));\n fCostNr = Math.round(fCostNr * fFloatVar) / fFloatVar;\n\n fCostNr += Math.pow(10, - (iCurrDecNr + 1));\n fCostNr += \"\"; // Force string\n fCostNrFormatted = (iCurrDecNr == 0)\n ? fCostNr.substring(0, fCostNr.indexOf('.'))\n : fCostNr.substring(0, fCostNr.indexOf('.') + (iCurrDecNr + 10));\n\n\n return GetFormattedNr(fCostNrFormatted, iCurrDecNr, \",\", \" \");\n }\n}", "title": "" }, { "docid": "c37564095784d8bac750a36f772b85ba", "score": "0.5523059", "text": "function round(number, precision) {\n if (!precision) {\n // Default is 4 decimal places if not specified\n precision = 4;\n }\n x = Math.pow(10, precision);\n return Math.trunc(number*x)/x\n}", "title": "" }, { "docid": "0f92a94b166333834d5e1fbaf0bfbb6a", "score": "0.5520292", "text": "function roundText(n) {\n var s = n.toFixed(1)\n if (s.charAt(s.length - 1) === \"0\".charAt(0)) return s.slice(0, -2)\n return s\n}", "title": "" }, { "docid": "e591c6bf3005504d996b56998ffc280e", "score": "0.5513245", "text": "round(num) {\n const precision = this.decimalPlaces\n return +(Math.round(num + \"e+\" + precision) + \"e-\" + precision);\n }", "title": "" }, { "docid": "eaaae3375e1513b3b028b8da7c18be2c", "score": "0.55065465", "text": "function round(number, precision) {\n\t\tif (number === \"\") {\n\t\t\treturn \"\";\n\t\t}\n var shift = function (number, precision, reverseShift) {\n if (reverseShift) {\n precision = -precision;\n }\n var numArray = (\"\" + number).split(\"e\");\n return + (numArray[0] + \"e\" + (numArray[1] ? (+numArray[1] + precision) : precision));\n };\n return shift(Math.round(shift(number, precision, false)), precision, true);\n\t}", "title": "" }, { "docid": "1e812be01850b3826f87e752d39cd5ab", "score": "0.54804885", "text": "function roundPrice(num) {\n return num.toFixed(2);\n }", "title": "" }, { "docid": "23e2144d23818292fd70c0653cb0fd17", "score": "0.5472791", "text": "function preciseRound(num, decimals) {\r\n const t = Math.pow(10, decimals); \r\n return (Math.round((num*t) + (decimals > 0 ? 1 : 0) * (Math.sign(num) * (10/Math.pow(100, decimals))))/t).toFixed(decimals);\r\n}", "title": "" }, { "docid": "45cedec84afd53ae4c91adf94a3fdeaf", "score": "0.54722077", "text": "function round(value, decimals) {\n return Number(Math.round(value+'e'+decimals)+'e-'+decimals);\n }", "title": "" }, { "docid": "45cedec84afd53ae4c91adf94a3fdeaf", "score": "0.54722077", "text": "function round(value, decimals) {\n return Number(Math.round(value+'e'+decimals)+'e-'+decimals);\n }", "title": "" }, { "docid": "45cedec84afd53ae4c91adf94a3fdeaf", "score": "0.54722077", "text": "function round(value, decimals) {\n return Number(Math.round(value+'e'+decimals)+'e-'+decimals);\n }", "title": "" }, { "docid": "d95dc261ce1def2bd5d3345635155686", "score": "0.54721", "text": "function cleanOffset(offset) {\n\t\t\tvar rounded = Math.round(offset);\n\t\t\tif (!isNaN(rounded)) {\n\t\t\t\treturn rounded;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "8383e579e847f70f093b5be8785203b2", "score": "0.5471663", "text": "function toFixed( value, precision ) {\n\t\tvar exponentialForm;\n\t\tvar rounded;\n\t\tvar finalResult;\n\n\t\tprecision = checkPrecision( precision, 2 );\n\n\t\texponentialForm = Number( unformat( value ) + 'e' + precision );\n\t\trounded = Math.round( exponentialForm );\n\t\tfinalResult = Number( rounded + 'e-' + precision ).toFixed( precision );\n\t\treturn finalResult;\n\t}", "title": "" }, { "docid": "aa37c5a2bc4ce25ea10ca6461df70fb0", "score": "0.54667664", "text": "function toFixed(value, precision) {\n var precision = precision || 0,\n neg = value < 0,\n power = Math.pow(10, precision),\n value = Math.round(value * power),\n integral = String((neg ? Math.ceil : Math.floor)(value / power)),\n fraction = String((neg ? -value : value) % power),\n padding = new Array(Math.max(precision - fraction.length, 0) + 1).join('0');\n return precision ? integral + '.' + padding + fraction : integral;\n}", "title": "" } ]
6434fa4c126b12ae98f806b7410a7831
Called to restore the state of the backend when the frontend connects to it (make sure the backend driver matches the frontend instrument)
[ { "docid": "b18f045aed7a0b4b0c5c726aa05eaed0", "score": "0.57542694", "text": "function initConnection() {\n if (typeof (this.driver) != undefined) {\n this.driver.setBackendDriver();\n }\n }", "title": "" } ]
[ { "docid": "fd5fed5f4a7885b7e6ae4bc3341e8260", "score": "0.61454105", "text": "reset() {\n // Make any pending promise obsolete.\n this.pendingBackendInitId++;\n this.state.dispose();\n this.ENV.reset();\n this.state = new EngineState();\n for (const backendName in this.registry) {\n this.disposeRegisteredKernels(backendName);\n this.registry[backendName].dispose();\n delete this.registry[backendName];\n }\n this.backendName = null;\n this.backendInstance = null;\n this.pendingBackendInit = null;\n }", "title": "" }, { "docid": "e97879d16a949d91a56aceb94cc3f913", "score": "0.5821866", "text": "function setDefaultBackend(newBackend) {\n backend = newBackend\n}", "title": "" }, { "docid": "a4b7a28f3d79d52dedd6282aae17d0c9", "score": "0.5774612", "text": "onResetConnectionClicked() {\n this.state.viewType = CONNECTION_STRING_VIEW;\n this.state.savedMessage = 'Saved to favorites';\n this.state.connectionModel = new Connection();\n this.state.isURIEditable = true;\n this.state.isSavedConnection = false;\n this._clearForm();\n this.trigger(this.state);\n }", "title": "" }, { "docid": "c95f27442bd2943ca5af5cadf3fb9a22", "score": "0.56767046", "text": "restart() {\n this.dispose();\n this.connect();\n }", "title": "" }, { "docid": "a87ec6953d877851159bda8079862803", "score": "0.56509477", "text": "_resetState() {\n this.anonymousConnectionFailed = false;\n this.connectionFailed = false;\n this.lastErrorMsg = undefined;\n this.disconnectInProgress = undefined;\n }", "title": "" }, { "docid": "77b27f78ce30e4df062d31a880a41869", "score": "0.56017846", "text": "_resetState() {\n this.anonymousConnectionFailed = false;\n this.connectionFailed = false;\n this.lastErrorMsg = undefined;\n this.disconnectInProgress = undefined;\n }", "title": "" }, { "docid": "3214e06539bbd0c10e4c5bce07d00c39", "score": "0.56014216", "text": "reset() {\r\n this.state = this.config.initial;\r\n }", "title": "" }, { "docid": "1b5adf86aeac84fa7a395089206cf657", "score": "0.55774456", "text": "reset() {\r\n this.state = this.config.initial;\r\n }", "title": "" }, { "docid": "ea40578bababef55bc143688724bc7f3", "score": "0.5549514", "text": "reconnect() {\n\t\t//refreshes page to call componentDidMount() again,\n\t\t//this will force the peer to search for another connection\n\t\twindow.location.reload(true);\n\t\t//show connect button and hide disconnect button\n\t\tthis.setState({connState:true});\n\t}", "title": "" }, { "docid": "be35980c8587de45fcdb883bb2fdfc3f", "score": "0.5546132", "text": "reset() {\r\n this.activeState = this.config.initial;\r\n }", "title": "" }, { "docid": "3db20d505532d70f0c288a119d5719e9", "score": "0.5542195", "text": "function loadPreviousState() {\n var i, list,\n $settings = gui.pages.get( 'settings' ),\n server = store.getRecord( '__current_server' );\n if ( server && server.url ) {\n $settings.find( '.url-helper li' ).removeClass( 'active' ).find( '[data-value=\"' + server.helper + '\"]' ).parent( 'li' ).addClass( 'active' );\n $settings.find( 'input#server' ).val( server.inputValue );\n list = store.getFormList( server.url );\n gui.parseFormlist( list, $( '#form-list' ) );\n console.log( 'server state: ', server );\n if ( typeof server.refresh !== 'undefined' && server.refresh === true ) {\n $( '#refresh-list' ).click();\n server.refresh = false;\n store.setRecord( '__current_server', server );\n }\n }\n }", "title": "" }, { "docid": "c624855a172ed6dc458c320c3b50600e", "score": "0.55326945", "text": "RESET_STATE (state) {\n state.databases = []\n state.tables = []\n state.selected_table = ''\n state.query_results = []\n }", "title": "" }, { "docid": "12e5f5693dc46fb751743ecd314ef6e9", "score": "0.5485224", "text": "function refreshHubDependentControlState() {\n updateHubDependentControlState(hubIsConnected);\n}", "title": "" }, { "docid": "b049d73d22a8929b4cf0f8077812f1d1", "score": "0.54686713", "text": "function Reset () {\n\t// Clear any old pending states\n\tpool.getConnection( function ( err, connection ) {\n\t\tif ( err ) console.log( err );\n\n\t\tconsole.log( 'Startup connection added.' );\n\t\tconnCount++;\n\n\t\tconnection.query( \"UPDATE ci_logical_sensor SET pending = 0\", function ( err, rows ) {\n\t\t\tif ( err ) console.log( err );\n\n\t\t\tconnection.end();\n\t\t\tconsole.log( 'Startup connection removed.' );\n\t\t\tconnCount--;\n\t\t});\n\t});\n\n\tsensorPool = [];\n}", "title": "" }, { "docid": "22a3cdd796c92bf7d32bfbcea05b1011", "score": "0.53986096", "text": "restoreSession(pathname, component) {\n // Get the session data.\n var sessionData = JSON.parse(sessionStorage.getItem(pathname));\n // Check if there was a previous session.\n if (!sessionData) {\n return;\n }\n // Update relay variables.\n if (sessionData.relay) {\n component.props.relay.setVariables(sessionData.relay);\n }\n // Update the state properties.\n if (sessionData.state) {\n component.setState(sessionData.state);\n }\n }", "title": "" }, { "docid": "2768ac8689917815d1a0272314c5c5b2", "score": "0.53835064", "text": "function reConnectEventHub() {\n logger.info('connecting the event hub');\n for (var i = 0; i < eventHubs.length; i++) {\n if (evtType == 'FILTEREDBLOCK') {\n eventHubs[i].connect();\n } else {\n eventHubs[i].connect(true);\n }\n }\n listenToEventHub();\n\n return;\n}", "title": "" }, { "docid": "61dfe7113911d6efb591e5fc4d6e20ee", "score": "0.5372054", "text": "reset() {\r\n this.currentState = this.config.initial;\r\n }", "title": "" }, { "docid": "477c45b67ab3f4db886fffda83e29ba3", "score": "0.53660715", "text": "reset() {\r\n this._state = this._config.initial;\r\n this._history.push(this._state);\r\n }", "title": "" }, { "docid": "72174f4dd4452875bb3223d6e12662d4", "score": "0.5363694", "text": "function resetState() {\n webSockOpts = undefined;\n ws = null;\n wsUp = false;\n host = undefined;\n url = undefined;\n pendingEvents = [];\n handlers = {};\n clusterNodes = [];\n clusterIndex = -1;\n glyphs = [];\n connectRetries = 0;\n openListeners = {};\n nextListenerId = 1;\n }", "title": "" }, { "docid": "d566a7b2e89de45053a3499f7a8ec614", "score": "0.53614885", "text": "emitBackendState(stateData) {\n this.eventHandler.emitBackendDataChanged(this.backendName,stateData);\n }", "title": "" }, { "docid": "2e391ff58fca5e98b75e8a579b542621", "score": "0.5355795", "text": "restore() {\r\n this.native.restore();\r\n }", "title": "" }, { "docid": "58fa843c5128600c0dc5a03a4f0183d8", "score": "0.53470814", "text": "reset() {\r\n this.prevState=this.currentState;\r\n this.currentState = this.config.initial;\r\n }", "title": "" }, { "docid": "699fb4078147cd7c4bccd58d263c2514", "score": "0.5345002", "text": "onRestore() {\n this._updateModels();\n }", "title": "" }, { "docid": "e964d1e5e283b396ee701470a15bada9", "score": "0.5323835", "text": "async onReady() {\n\t\tthis.log.debug(\"[onReady] deleteDeadLinkedObjects: '\" + this.config.deleteDeadLinkedObjects + \"'\");\n\n\n\t\t// Initialize your adapter here\n\t\tawait this.initialObjects()\n\n\t\t// subscribe für alle Objekt, um Änderungen die diesen Adapter betreffen mitzubekommen\n\t\tthis.subscribeForeignObjects(\"*\");\n\n\t\t// The adapters config (in the instance object everything under the attribute \"native\") is accessible via\n\t\t// this.config:\n\t\t// this.log.info(\"config option1: \" + this.config.option1);\n\t\t// this.log.info(\"config option2: \" + this.config.option2);\n\n\n\n\t\t/*\n\t\tFor every state in the system there has to be also an object of type state\n\t\tHere a simple template for a boolean variable named \"testVariable\"\n\t\tBecause every adapter instance uses its own unique namespace variable names can't collide with other adapters variables\n\t\t*/\n\t\t// await this.setObjectAsync(\"testVariable\", {\n\t\t// \ttype: \"state\",\n\t\t// \tcommon: {\n\t\t// \t\tname: \"testVariable\",\n\t\t// \t\ttype: \"boolean\",\n\t\t// \t\trole: \"indicator\",\n\t\t// \t\tread: true,\n\t\t// \t\twrite: true,\n\t\t// \t},\n\t\t// \tnative: {},\n\t\t// });\n\n\n\n\t\t/*\n\t\tsetState examples\n\t\tyou will notice that each setState will cause the stateChange event to fire (because of above subscribeStates cmd)\n\t\t*/\n\t\t// the variable testVariable is set to true as command (ack=false)\n\t\t// await this.setStateAsync(\"testVariable\", true);\n\n\t\t// same thing, but the value is flagged \"ack\"\n\t\t// ack should be always set to true if the value is received from or acknowledged from the target system\n\t\t// await this.setStateAsync(\"testVariable\", { val: true, ack: true });\n\n\t\t// same thing, but the state is deleted after 30s (getState will return null afterwards)\n\t\t// await this.setStateAsync(\"testVariable\", { val: true, ack: true, expire: 30 });\n\n\t\t// examples for the checkPassword/checkGroup functions\n\t\t// let result = await this.checkPasswordAsync(\"admin\", \"iobroker\");\n\t\t// this.log.info(\"check user admin pw ioboker: \" + result);\n\n\t\t// result = await this.checkGroupAsync(\"admin\", \"admin\");\n\t\t// this.log.info(\"check group user admin group admin: \" + result);\n\t}", "title": "" }, { "docid": "b21a1bc0f61c22b9dce24c895cba1e6d", "score": "0.5296983", "text": "_changeNetwork() {\n\t\tconst onLine = window.navigator.onLine;\n\n\t\tif (!onLine) {\n\t\t\tthis.set('_state', STATES.OFFLINE);\n\t\t} else {\n\t\t\tthis.reconnect();\n\t\t}\n\t}", "title": "" }, { "docid": "eaaebe6337c7871c6e1ccd7d789d8d9d", "score": "0.5288582", "text": "reset() {\r\n this.currentState = this.config.initial;\r\n this.history.push(this.currentState);\r\n }", "title": "" }, { "docid": "ad2715d35b4b2c7e0ca5684f2f613cda", "score": "0.526985", "text": "function resetDataDeselect() {\n\t\t\tconsole.log(\"resetDataDeselect()\");\n\n\t\t\tvm.apiDomain.logicalDBKey = \"\";\t\n\t\t\taddAdbRow();\n\t\t}", "title": "" }, { "docid": "8d77cf6d450496eef9468a7c5deaaf21", "score": "0.52601343", "text": "static restore(router, serializedDependencies) {\n const { locale, messages, preloadedState } = serializedDependencies;\n const network = networkInterfaceFactory();\n\n return new ClientAppLifecycle().addDependencies({ locale, messages, network }).addDependencies({\n store: buildClientSideStore(preloadedState),\n });\n }", "title": "" }, { "docid": "9b722413d2b164bd356f90f7c8524391", "score": "0.52560663", "text": "restoreOriginalState() {\n\n\t\tconst originalValueOffset = this.valueSize * 3;\n\t\tthis.binding.setValue( this.buffer, originalValueOffset );\n\n\t}", "title": "" }, { "docid": "e314670227e08a61bd3a2485c241e6d5", "score": "0.5248553", "text": "resetSIMMState() {\r\n this.setState({\r\n currentReference : -1,\r\n currentProcess : 'N/A',\r\n currentPage : 'N/A',\r\n swapSpace : new SwapSpace(),\r\n frameTable : new FrameTable(),\r\n colorGenerator : new ColorGenerator()\r\n });\r\n }", "title": "" }, { "docid": "8d630391ab6a945b4ca8d59cea25ea0e", "score": "0.5236886", "text": "restore() {\n this.reset();\n this.interceptorsManager.deactivate();\n }", "title": "" }, { "docid": "74aef1908b02bf6e939f91db3329db9d", "score": "0.5223752", "text": "function restore_options() {\n chrome.storage.sync.get(\"backendUrl\", function(items) {\n var backendUrl = items.backendUrl;\n\n if (!backendUrl) {\n return;\n }\n\n document.getElementById(\"backendUrl\").value = backendUrl;\n });\n}", "title": "" }, { "docid": "3bd2b3c020d3cd2ea4ce6fd8b9913fb2", "score": "0.5221396", "text": "restoreState() {\n const rawData = document.getElementById('rawState').value;\n localStorage.setItem('data', rawData);\n _.assign(this.$data, JSON.parse(rawData));\n this.updateNbAvailableFragsPerStage();\n }", "title": "" }, { "docid": "e8d813b48e69f08c9eb3a849319660dc", "score": "0.5212529", "text": "reset() {\r\n this.state = this.initial;\r\n }", "title": "" }, { "docid": "4b5c86469792039f4f3c4672091f52b0", "score": "0.5179103", "text": "connectedCallback() {\n super.connectedCallback?.();\n\n /* istanbul ignore next */\n if (this.reset) {\n this.#addReset();\n }\n }", "title": "" }, { "docid": "2a541b6a977fcb5d815f6f4126df7101", "score": "0.5178", "text": "surveyBridges() {\n this.currentBridge = null;\n\n // update the state without reloading the controller\n this.$state.go('app.structure.bridge');\n }", "title": "" }, { "docid": "aaa2cb8605d7c1e144d8633c07a76012", "score": "0.51504195", "text": "function reInitializeApp() {\n console.log(\"Attempt Re Initialize Connection to Signiant\");\n Signiant.Mst.initialize(\n function() {\n console.log(\"Connection to Signiant App Re-established\");\n //alert(\"Connection to Signiant App Re-established\");\n },\n function() {\n console.log(\"Re-Initialize Signiant App Failed, retrying\");\n //alert(\"Signiant App Connection Lost, Retrying...\");\n reInitializeApp();\n }, {\n \"timeout\": 20000\n }\n );\n }", "title": "" }, { "docid": "298400af3830a8b33c1246f65b9efde1", "score": "0.5133568", "text": "reset() {\r\n this.currentState = this.config.initial;\r\n this.recordStates.push(this.currentState);\r\n this.currentStatePosition++;\r\n this.recordMethods.push('reset');\r\n }", "title": "" }, { "docid": "885fbc6f22d04878516c0349d9ea0394", "score": "0.51294065", "text": "onStateChange() {\n let s = this.store.redux.getState();\n this.setState({localdb: s.localdb});\n }", "title": "" }, { "docid": "9f37accbe238e3a9015da44182ece433", "score": "0.5122902", "text": "reset() {\n emitter.emit('reset_state')\n }", "title": "" }, { "docid": "07e0dfe1600c77be52aa567124f0c837", "score": "0.5117109", "text": "clientConnected() {\n super.clientConnected('connected', this.wasConnected);\n\n this.state = 'connected';\n this.wasConnected = true;\n this.stopRetryingToConnect = false;\n }", "title": "" }, { "docid": "65ee05b5d39792a6a09992b63746b0bc", "score": "0.51158124", "text": "resetBBOPGraph() {\n this.setBBOPGraph(this.bbopGraphBackup); \n }", "title": "" }, { "docid": "830728888cd8645516684c14ff6095ea", "score": "0.5107618", "text": "function restoreRecordDroppedEvent() {\n const client = getCurrentHub().getClient();\n\n if (!client || !_originalRecordDroppedEvent) {\n return;\n }\n\n client.recordDroppedEvent = _originalRecordDroppedEvent;\n }", "title": "" }, { "docid": "2f180a7b72def8e9ad4623eb42814c85", "score": "0.5096", "text": "async function hardreset(devicename){\n // initiate lowlevel connection\n if (!_virtualTerminal.isConnected()){\n await _virtualTerminal.connect(devicename, 115200);\n }\n\n // pull down RST pin using the reset circuit\n await _virtualTerminal.flowcontrol({\n dtr: false,\n rts: true\n });\n\n // 100ms delay\n await _async.sleep(100);\n\n // restore previous state after 100ms\n await _virtualTerminal.flowcontrol({\n dtr: false,\n rts: false\n });\n}", "title": "" }, { "docid": "ce928f092d6e1a6711c51d7fef284ec3", "score": "0.50817895", "text": "resetStore() {\n logger.warn('Resetting store...');\n\n // Reset store (causes queries to update).\n // https://github.com/apollostack/apollo-client/blob/6b6e8ded1e0f83cb134d2261a3cf7d2d9416400f/src/ApolloClient.ts\n this._client.resetStore();\n }", "title": "" }, { "docid": "91d7fca7dec51b8ac2b589fc36656e78", "score": "0.50807047", "text": "function reset() {\n\t setState(null);\n\t} // in case of reload", "title": "" }, { "docid": "c7261caef51a94184e47ed7ad577f274", "score": "0.5079885", "text": "init() {\n this.get('socketId').then((oldSocketId) => {\n if (oldSocketId !== null && this._io['sockets']['connected'].hasOwnProperty(oldSocketId)) {\n this.logger.log('detected a new connection from the same client'\n + ' | disconnecting the old connection of socket id: ' + this._socketId);\n try {\n this._io['sockets']['connected'][oldSocketId].emit('force-disconnect');\n } catch (err) {\n // Do nothing.\n }\n }\n this.set('socketId', this._socketId);\n });\n }", "title": "" }, { "docid": "e8c78fa8f4bdb9192476f5f750f26819", "score": "0.50611526", "text": "function onerror() {\n if (this._socket) {\n this._socket = null;\n this._logger.info('Connection closed.');\n }\n\n this._debuggerObj.setEngineMode(this._debuggerObj.ENGINE_MODE.DISCONNECTED);\n\n if (this._surface.getPanelProperty('chart.active')) {\n this._chart.disableChartButtons();\n if (this._chart.containsData()) {\n this._surface.toggleButton(true, 'chart-reset-button');\n }\n }\n\n if (this._surface.getPanelProperty('watch.active')) {\n this._surface.updateWatchPanelButtons(this._debuggerObj);\n }\n\n if (this._session.isUploadStarted()) {\n this._session.setUploadStarted(false);\n }\n\n // Reset the editor.\n this._session.reset();\n this._surface.reset();\n this._surface.disableActionButtons(true);\n this._surface.toggleButton(true, 'connect-to-button');\n this._surface.continueStopButtonState(this._surface.CSICON.CONTINUE);\n\n if (this._session.isContextReset()) {\n this._session.setContextReset(false);\n\n // Try to reconnect once.\n setTimeout(() => {\n $('#connect-to-button').trigger('click');\n }, 1000);\n }\n}", "title": "" }, { "docid": "916a5d54c52efad07984b7ee01925001", "score": "0.5030912", "text": "init() {\n this.state.fetchedConnections.fetch({\n success: () => {\n this.state.fetchedConnections.forEach((item) => {\n this.state.connections[item._id] = { ...item._values };\n });\n this.trigger(this.state);\n }\n });\n ipc.on('app:disconnect', this.onDisconnectClicked.bind(this));\n }", "title": "" }, { "docid": "f42548f6daf10501135bc55bdcf42084", "score": "0.50268686", "text": "initializeBackend(backendName) {\n const registryFactoryEntry = this.registryFactory[backendName];\n if (registryFactoryEntry == null) {\n throw new Error(`Cannot initialize backend ${backendName}, no registration found.`);\n }\n try {\n const backend = registryFactoryEntry.factory();\n /* Test if the factory returns a promise.\n Done in a more liberal way than\n previous 'Promise.resolve(backend)===backend'\n as we needed to account for custom Promise\n implementations (e.g. Angular) */\n if (backend && !(backend instanceof _backends_backend__WEBPACK_IMPORTED_MODULE_0__[\"KernelBackend\"]) &&\n typeof backend.then === 'function') {\n const promiseId = ++this.pendingBackendInitId;\n const success = backend\n .then(backendInstance => {\n // Outdated promise. Another backend was set in the meantime.\n if (promiseId < this.pendingBackendInitId) {\n return false;\n }\n this.registry[backendName] = backendInstance;\n this.pendingBackendInit = null;\n return true;\n })\n .catch(err => {\n // Outdated promise. Another backend was set in the meantime.\n if (promiseId < this.pendingBackendInitId) {\n return false;\n }\n this.pendingBackendInit = null;\n console.warn(`Initialization of backend ${backendName} failed`);\n console.warn(err.stack || err.message);\n return false;\n });\n this.pendingBackendInit = success;\n return { success, asyncInit: true };\n }\n else {\n this.registry[backendName] = backend;\n return { success: true, asyncInit: false };\n }\n }\n catch (err) {\n console.warn(`Initialization of backend ${backendName} failed`);\n console.warn(err.stack || err.message);\n return { success: false, asyncInit: false };\n }\n }", "title": "" }, { "docid": "42b31d67b459930842d4a4d715af8b27", "score": "0.5026515", "text": "_onConnect(resolve, reject) {\n if (this._connectInProgress) {\n console.error(\"MULTIPLE CONNECT IN PROGRESS\");\n return;\n }\n\n this.updateTransitionTarget(counterpart__WEBPACK_IMPORTED_MODULE_10___default().translate(\"app_init.database\"));\n this._connectInProgress = true;\n\n if (bitsharesjs_ws__WEBPACK_IMPORTED_MODULE_0__.Apis.instance()) {\n if (!bitsharesjs_ws__WEBPACK_IMPORTED_MODULE_0__.Apis.instance().orders_api()) console.log(`${bitsharesjs_ws__WEBPACK_IMPORTED_MODULE_0__.Apis.instance().url} does not support the orders api`);\n let currentUrl = bitsharesjs_ws__WEBPACK_IMPORTED_MODULE_0__.Apis.instance().url;\n if (!this.isAutoSelection()) this._setLastNode(currentUrl); // the ping calculated here does not reflect the same ping as in checkConnection from ConnectionManager,\n // thus always updating would be \"unfair\" and also is confusing in UI\n\n let mapOfPings = {};\n mapOfPings[currentUrl] = new Date().getTime() - this._connectionStart;\n\n this._updateLatencies(mapOfPings, false);\n }\n\n const currentChain = bitsharesjs_ws__WEBPACK_IMPORTED_MODULE_0__.Apis.instance().chain_id;\n const chainChanged = this._oldChain !== currentChain;\n this._oldChain = currentChain;\n var dbPromise = Promise.resolve();\n\n try {\n if (chainChanged) {\n idb_instance__WEBPACK_IMPORTED_MODULE_3__[\"default\"].close();\n dbPromise = idb_instance__WEBPACK_IMPORTED_MODULE_3__[\"default\"].init_instance(this._getIndexDBImpl()).init_promise;\n }\n } catch (err) {\n console.error(\"db init error:\", err);\n this._connectInProgress = false;\n return this._transitionDone(reject);\n }\n\n return Promise.all([dbPromise, stores_SettingsStore__WEBPACK_IMPORTED_MODULE_7__[\"default\"].init()]).then(() => {\n let chainStoreResetPromise = chainChanged ? bitsharesjs__WEBPACK_IMPORTED_MODULE_1__.ChainStore.resetCache(false) : Promise.resolve();\n return chainStoreResetPromise.then(() => {\n return Promise.all([actions_PrivateKeyActions__WEBPACK_IMPORTED_MODULE_11__[\"default\"].loadDbData().then(() => {\n return stores_AccountRefsStore__WEBPACK_IMPORTED_MODULE_4__[\"default\"].loadDbData();\n }), stores_WalletDb__WEBPACK_IMPORTED_MODULE_6__[\"default\"].loadDbData().then(() => {\n if (chainChanged) {\n stores_AccountStore__WEBPACK_IMPORTED_MODULE_8__[\"default\"].reset();\n return stores_AccountStore__WEBPACK_IMPORTED_MODULE_8__[\"default\"].loadDbData(currentChain).catch(err => {\n console.error(err);\n });\n }\n }).catch(error => {\n console.error(\"----- WalletDb.willTransitionTo error ----->\", error);\n\n this._transitionDone(reject);\n }), stores_WalletManagerStore__WEBPACK_IMPORTED_MODULE_5__[\"default\"].init()]).then(() => {\n this._connectInProgress = false;\n actions_SettingsActions__WEBPACK_IMPORTED_MODULE_12__[\"default\"].changeSetting({\n setting: \"activeNode\",\n value: this._connectionManager.url\n });\n\n this._transitionDone(resolve);\n });\n }).catch(err => {\n this._connectInProgress = false;\n\n this._transitionDone(reject.bind(this, err));\n });\n }).catch(err => {\n console.error(err);\n this._connectInProgress = false;\n\n this._transitionDone(reject);\n });\n }", "title": "" }, { "docid": "907e9ceb148379880a5c03a857470f4a", "score": "0.5017525", "text": "reset() {\r\n this.currentState = this.initial;\r\n }", "title": "" }, { "docid": "8fae0c1fda69c3a1b2171eeea77dc0d4", "score": "0.5011147", "text": "restore(): void {\n this.context.restore();\n }", "title": "" }, { "docid": "1f3d82edcda71b4a96e8289389972ebb", "score": "0.50107855", "text": "_attemptReconnect(resolve, reject) {\n this._oldChain = \"old\";\n bitsharesjs_ws__WEBPACK_IMPORTED_MODULE_0__.Apis.reset(this._connectionManager.url, true, undefined, {\n enableOrders: true\n }).then(instance => {\n instance.init_promise.then(this._onConnect.bind(this, resolve, reject)).catch(this._onResetError.bind(this, this._connectionManager.url));\n });\n }", "title": "" }, { "docid": "0df28f552ebeac76e60764c00ed123da", "score": "0.49976975", "text": "function resetApplicationState() {\r\n Canvas.clearCanvas();\r\n Animation.reset();\r\n animating = false;\r\n\r\n AlgoSelect.deselectAlgButtons();\r\n AlgoSelect.loadAlgoInfo('default');\r\n\r\n // save to undo history\r\n saveCurrentState()\r\n}", "title": "" }, { "docid": "17d09d91028c9869873af00a5b0f98ff", "score": "0.4990019", "text": "static rewind() {\n const recordedState = state;\n state = undefined;\n mountedInstances.clear();\n return recordedState;\n }", "title": "" }, { "docid": "17d09d91028c9869873af00a5b0f98ff", "score": "0.4990019", "text": "static rewind() {\n const recordedState = state;\n state = undefined;\n mountedInstances.clear();\n return recordedState;\n }", "title": "" }, { "docid": "0cfc1e95252f2bb6b973bb69c54011d4", "score": "0.49900138", "text": "reset() {\r\n this.currentState = this.initalState;\r\n this.clearHistory();\r\n }", "title": "" }, { "docid": "a252032326f04b376ce6d9bbc75b75a3", "score": "0.4989822", "text": "reset() {\r\n return this.state = \"normal\";\r\n }", "title": "" }, { "docid": "e36fb8e9cf3bdaaeb536b575684f6a29", "score": "0.4986494", "text": "async restoreState() {\n // Restore UI alignment.\n if (this.isBrowserUIEnabled) {\n const leftAlignmentEnabled = Services.prefs.getBoolPref(\n \"devtools.responsive.leftAlignViewport.enabled\",\n false\n );\n\n this.updateUIAlignment(leftAlignmentEnabled);\n }\n\n const deviceState = await asyncStorage.getItem(\n \"devtools.responsive.deviceState\"\n );\n if (deviceState) {\n // Return if there is a device state to restore, this will be done when the\n // device list is loaded after the post-init.\n return;\n }\n\n const height = Services.prefs.getIntPref(\n \"devtools.responsive.viewport.height\",\n 0\n );\n const pixelRatio = Services.prefs.getIntPref(\n \"devtools.responsive.viewport.pixelRatio\",\n 0\n );\n const touchSimulationEnabled = Services.prefs.getBoolPref(\n \"devtools.responsive.touchSimulation.enabled\",\n false\n );\n const userAgent = Services.prefs.getCharPref(\n \"devtools.responsive.userAgent\",\n \"\"\n );\n const width = Services.prefs.getIntPref(\n \"devtools.responsive.viewport.width\",\n 0\n );\n\n let reloadNeeded = false;\n const { type, angle } = this.getInitialViewportOrientation({\n width,\n height,\n });\n\n this.updateViewportSize(width, height);\n await this.updateDPPX(pixelRatio);\n await this.updateScreenOrientation(type, angle);\n\n if (touchSimulationEnabled) {\n reloadNeeded |=\n (await this.updateTouchSimulation(touchSimulationEnabled)) &&\n this.reloadOnChange(\"touchSimulation\");\n }\n if (userAgent) {\n reloadNeeded |=\n (await this.updateUserAgent(userAgent)) &&\n this.reloadOnChange(\"userAgent\");\n }\n if (reloadNeeded) {\n this.getViewportBrowser().reload();\n }\n }", "title": "" }, { "docid": "bc738080e9706f65639afbaecca033e7", "score": "0.49861446", "text": "reset_techInfo_State(some){\r\n\t\t//this.setState(this.initialState);\r\n\t\t//alert(\"resetting\");\r\n\t\t//alert(\"this.baseState-> \" + this.baseState );\r\n\t\tthis.setState({ //sets new value to state //setState is an async function\r\n techInfoState: this.state.baseState\r\n }); \r\n\t}", "title": "" }, { "docid": "71194e35d188c6e7602d9bcdc7934d23", "score": "0.49708965", "text": "function restoreGraph(synchronization){\n //Human.scene.setEnabledObjects({ objectIds: {}, replace: true });\n synchronization = normalizeSynchronization(synchronization);\n Human.scene.setObjectProperties(synchronization);\n\n }", "title": "" }, { "docid": "16ce209e2fe8ad80bbfef18a7f782547", "score": "0.4969928", "text": "async onReady() {\n // Initialize your adapter here\n\n // The adapters config (in the instance object everything under the attribute \"native\") is accessible via\n // this.config:\n \n // initialize internal copy of state variables\n this.setStateInternal('custom_run', 120); // set to 2 min\n this.setStateInternal('custom_suspend', 0); // set to invalid UNIX epoche - no effect\n this.setStateInternal('zone', 1); // set to zone 1\n\n // initialize hc information from controller when api key has been set via config page\n this.readHydrawiseStatus();\n\n /*\n For every state in the system there has to be also an object of type state\n Here a simple template for a boolean variable named \"testVariable\"\n Because every adapter instance uses its own unique namespace variable names can't collide with other adapters variables\n */\n\n /* await this.setObjectNotExistsAsync('testVariable', {\n type: 'state',\n common: {\n name: 'testVariable',\n type: 'boolean',\n role: 'indicator',\n read: true,\n write: true,\n },\n native: {},\n });\n */\n\n // In order to get state updates, you need to subscribe to them. The following line adds a subscription for our variable we have created above.\n // this.subscribeStates('testVariable');\n // You can also add a subscription for multiple states. The following line watches all states starting with \"lights.\"\n // this.subscribeStates('lights.*');\n // Or, if you really must, you can also watch all states. Don't do this if you don't need to. Otherwise this will cause a lot of unnecessary load on the system:\n // this.subscribeStates('*');\n\n this.subscribeStates('*');\n\n /*\n setState examples\n you will notice that each setState will cause the stateChange event to fire (because of above subscribeStates cmd)\n */\n // the variable testVariable is set to true as command (ack=false)\n\n // -- await this.setStateAsync('testVariable', true);\n\n // same thing, but the value is flagged \"ack\"\n // ack should be always set to true if the value is received from or acknowledged from the target system\n\n // -- await this.setStateAsync('testVariable', { val: true, ack: true });\n\n // same thing, but the state is deleted after 30s (getState will return null afterwards)\n\n // -- await this.setStateAsync('testVariable', { val: true, ack: true, expire: 30 });\n\n // examples for the checkPassword/checkGroup functions\n // let result = await this.checkPasswordAsync('admin', 'iobroker');\n // this.log.info('check user admin pw iobroker: ' + result);\n // result = await this.checkGroupAsync('admin', 'admin');\n // this.log.info('check group user admin group admin: ' + result);\n }", "title": "" }, { "docid": "a02abf7b31feace54b7eb6290a9880e1", "score": "0.4964617", "text": "function resetPeerConn() {\n delete require.cache[\n require.resolve('../../../app/scripts/webrtc/peer-connection')\n ];\n peerConn = require('../../../app/scripts/webrtc/peer-connection');\n}", "title": "" }, { "docid": "aff1ec9455da13999fa8e999a86f5c33", "score": "0.4956334", "text": "reconnected() {\n this.subscribe(this.replica, this.path);\n }", "title": "" }, { "docid": "e10473667dd09eab2efcc36591d7e7f4", "score": "0.49473605", "text": "core_uninitialize() {\n if (this.core_contex.Client != null) {\n this.core_contex.Client.end();\n this.core_contex.Client = null;\n }\n for (let k in core_contex_t) {\n this.core_contex[k] = core_contex_t[k];\n }\n for (let k in mqtt_ssl_t) {\n this.core_contex.mqtt_ssl[k] = mqtt_ssl_t[k];\n }\n }", "title": "" }, { "docid": "dffd39e349241f55b3b62b84bbc8f43a", "score": "0.4947254", "text": "resetConvos() {\n this.setState(this.getInitState());\n }", "title": "" }, { "docid": "1a97f32a222e56f57424e3fbc2aedd73", "score": "0.49448478", "text": "async _initializeState() {\n try {\n const { accounts, chainId, isUnlocked, networkVersion } = (await this.request({\n method: 'metamask_getProviderState',\n }));\n // indicate that we've connected, for EIP-1193 compliance\n this.emit('connect', { chainId });\n this._handleChainChanged({ chainId, networkVersion });\n this._handleUnlockStateChanged({ accounts, isUnlocked });\n this._handleAccountsChanged(accounts);\n }\n catch (error) {\n this._log.error('MetaMask: Failed to get initial state. Please report this bug.', error);\n }\n finally {\n this._state.initialized = true;\n this.emit('_initialized');\n }\n }", "title": "" }, { "docid": "42810b32dbf8b8eac995bd1320221a55", "score": "0.49393904", "text": "handleContextRestored() {\n this.renderer.runners.contextChange.run(this.gl);\n }", "title": "" }, { "docid": "0418d69cb630eb455ad4897123fde23c", "score": "0.4937148", "text": "function onStalledChanged(event) {\n if (pureweb.getClient().isStalled()) {\n pureweb.getClient().logger.fine('Connection to the Scribble service application has stalled and may have been lost.');\n } else {\n pureweb.getClient().logger.fine('Connection to the Scribble service application has recovered.');\n }\n}", "title": "" }, { "docid": "514d2a0f5280abf197a32cf811c95704", "score": "0.49343902", "text": "@action.bound restore() {\n const state = localStorage.getItem(this.cookieName());\n this.deserialize(state);\n }", "title": "" }, { "docid": "26d0391f2826a7da5f9d45d886879e36", "score": "0.49341813", "text": "function refresh_serialized_sessions() {\n connect_crashlogs();\n connect_static();\n}", "title": "" }, { "docid": "6098305585afd0a896f4dc3a0bcec780", "score": "0.4930568", "text": "stopConnecting()\n {\n this.connecting = false;\n }", "title": "" }, { "docid": "e8f7ab1e3bcf9ec6e0d583d2883d90e9", "score": "0.49304053", "text": "resetProgram() {\n this.checkForIntervalId();\n this.stateHistory.reset();\n }", "title": "" }, { "docid": "ec188a3962b77344cf69bdae597cb305", "score": "0.49246904", "text": "function _restoreLocalState(callback) {\n if(!_hasIndexedDB()) { callback(\"IndexedDB not supported.\"); return; }\n _getIndexedDB(function(idbRecords) {\n\n var sortedElements = _.reverse(_.sortBy(idbRecords, function(o) {\n console.log(\"The timestamp was: \" + _.get(o, view_model.timestampProperty));\n return new Date(_.get(o, view_model.timestampProperty)).toISOString();\n }));\n var nonQueueElements = _.filter(sortedElements, {syncState: 1});\n var queueElements = _.filter(sortedElements, function(o) { return o.syncState != 1; });\n\n if(nonQueueElements.length > 0) {\n view_model.lastChecked = _.get(sortedElements[0], view_model.timestampProperty);\n }\n else {\n if(queueElements.length > 0)\n view_model.lastChecked = _.get(queueElements[queueElements.length - 1], view_model.timestampProperty);\n }\n\n _patchServiceDB(idbRecords);\n callback(idbRecords.length + \" record(s) taken from IndexedDB.\");\n\n });\n }", "title": "" }, { "docid": "353b1bdf2ffa0c276d82bd765b6f0298", "score": "0.49235883", "text": "function restoreSimulation(previousState, previousProperties) {\n // If the previous state is null, force a default state\n if (previousState) {\n state = previousState;\n } else {\n log(\"Using default state\");\n }\n\n if (previousProperties) {\n properties = previousProperties;\n } else {\n log(\"Using default properties\");\n }\n}", "title": "" }, { "docid": "1449547e94c878cb9929717cf2467be9", "score": "0.49230438", "text": "_restart(){\n this._$staticMsg.empty();\n this.model.initialise();\n this._$field.empty();\n this._$dynamicMsg.empty();\n this._initiate();\n }", "title": "" }, { "docid": "f250b107f0e10d2f66f821f78b15dd99", "score": "0.4919543", "text": "syncState() {\n }", "title": "" }, { "docid": "7341653bcaf76fb6f309d0827b26351a", "score": "0.4909814", "text": "uninstall() {\n this._connector.connect = this._originalConnect;\n if (this._originalCreateConnection != null) {\n this._connector.createConnection = this._originalCreateConnection;\n }\n if (this._originalModel != null) {\n this._connector.model = this._originalModel;\n }\n this._isInstalled = false;\n }", "title": "" }, { "docid": "b8f00957782839cbf7f4e299fa50b6ad", "score": "0.49076483", "text": "function saveEntireAmtState() {\r\n // See if MicroLMS needs to be started\r\n if ((settings.hostname == '127.0.0.1') || (settings.hostname.toLowerCase() == 'localhost')) {\r\n settings.noconsole = true;\r\n startLms().then(saveEntireAmtState2);\r\n }\r\n else {\r\n saveEntireAmtState2();\r\n }\r\n}", "title": "" }, { "docid": "5c5c500e669becadec76b882c9f386d3", "score": "0.49038097", "text": "function restoreState()\n{\n\tif(state == undefined) return;\n\tvar cola = new Array();\n\tvar x = 0;\n\tfor(i in colorTypes)\n\t{\n\t\tcola[i] = state[i];\n\t\tx=i;\n\t}\n\tcolourNumOnLoad(cola);\n\tdocument.getElementById(\"splash_message\").value = state[i+1];\n\tdocument.getElementById(\"debug\").checked = state[i+2];\n\tselector = state[i+3];\n\tselectColoring(selector);\n document.getElementById(\"onstagelist\").checked = state[i+4];//08/04/2013 -CF- add new component for the state to load\n document.getElementById(\"lockStageCB\").checked = state[i+5];//30/04/2013 -CF- add new component for the state to load\n\t//alert(selector);\t\t\t07/11/20101 PR - Removed, because I couldn't see the point in this\n\tstate = undefined;\n}", "title": "" }, { "docid": "93298feecc0b2ffee34a6d918bdf13ef", "score": "0.49023804", "text": "handleContextRestored()\n {\n this._initContext();\n this.textureManager.removeAll();\n }", "title": "" }, { "docid": "3e9787bf9a11b175cbc5a8a5c2ef0925", "score": "0.49009916", "text": "SOCKET_RECONNECT_DECLINED(state) {\n // eslint-disable-next-line\n console.log(\"%c socket_on_reconnect_declined\", \"color:green\");\n // TODO: Find way to reset whole state\n // state.user = null;\n state.userId = null;\n state.name = null;\n state.color = null;\n state.users = [];\n state.broadcastMessages = [];\n state.rooms = null;\n state.messages = [];\n state.room = null;\n state.isHost = false;\n router.push(\"/login\");\n }", "title": "" }, { "docid": "5081586d4565be413603a300b0af2a0d", "score": "0.4900734", "text": "function restoreState(previousState) {\n // If the previous state is null, force a default state\n if (previousState !== undefined && previousState !== null) {\n state = previousState;\n } else {\n log(\"Using default state\");\n }\n}", "title": "" }, { "docid": "2f5370351842aa56729a8ff0ea8243c3", "score": "0.48995045", "text": "function restoreDatabaseconnection(dbConn)\n{\n\tif(conPool.isConnPool === true)\n\t{\n\t\taddConnection(dbConn);\n\t}\n\telse\n\t{\n\t\tdbConn.end();\n\t}\n}", "title": "" }, { "docid": "47048f7256731936cb10e552e84a8ed5", "score": "0.48933557", "text": "_restoreState() {\n this.bold(this._state.bold);\n this.italic(this._state.italic);\n this.underline(this._state.underline);\n this.invert(this._state.invert);\n\n this._queue([\n 0x1b, 0x74, this._state.codepage,\n ]);\n }", "title": "" }, { "docid": "019fcd2cd72618b845c10f81f44ceeb9", "score": "0.48837084", "text": "resetState() {\n this.setState({\n show: false,\n currCode: null,\n latest: 0,\n performance: 0,\n capital: 0,\n amount: 0,\n potential: 0,\n multiplier: 1.5,\n prediction: 1,\n err: false,\n err_msg: null\n })\n }", "title": "" }, { "docid": "15be360952969f2dc9909f65cc32e1af", "score": "0.48830655", "text": "reconnect () {\n this.adapter.reconnect()\n }", "title": "" }, { "docid": "f36e143f8b5603ae810eaa387cbf3a7b", "score": "0.4881932", "text": "function restoreState(ecname, $tagc, $modelInfo, $modelSelect, $inputProps) {\n var entsCookie = getCookie(ecname);\n var storedValArray = JSON.parse((entsCookie === \"\" ? \"[]\" : entsCookie));\n\n // Check backend status for model in use\n $.getJSON(\"/check_status\")\n .done(function(response) {\n $modelInfo.text(response[\"model\"] + \" model in use...\");\n $modelSelect.val(response[\"model_select\"]);\n if (response[\"model\"] !== \"No\") {\n $inputProps.prop(\"disabled\", false);\n }\n })\n .fail(function( jqxhr, textStatus, error ) {\n var err = textStatus + \", \" + error;\n console.log( \"Status query request failed: \" + err );\n });\n\n // restore badges\n if (storedValArray.length !== 0) {\n for (i in storedValArray) {\n $tagc.append(\"<span class='entity-tag btn-dark'>\" +\n storedValArray[i] + \"<i class='fa fa-close'></i></span>\");\n }\n }\n return storedValArray;\n}", "title": "" }, { "docid": "2e8e2ffb47ed760a8a3946ee3112b26e", "score": "0.48809764", "text": "function reInitializeApp() {\n console.log(\"Attempt Re Initialize Connection to Signiant\");\n var options = { \"timeout\": 20000 };\n Signiant.Mst.initialize(reIntializeSuccess, reInitializeFailure, options);\n}", "title": "" }, { "docid": "73e6678c22b497daeaf406305ad5b9e6", "score": "0.4880741", "text": "function resetState(){\n CONTROLLER._setCdnUrl(process.env.CDN_URL);\n CONTROLLER._setRootUrl(process.env.ROOT_URL);\n}", "title": "" }, { "docid": "88992dfb827aff1468e087a112fb7d7e", "score": "0.4878372", "text": "_changeToOffline() {\n if (this.isOnline) {\n logger.info('OnlineStateManager: Connection lost');\n this.isOnline = false;\n this.trigger('disconnected');\n }\n }", "title": "" }, { "docid": "40fd73a9502b20c59be3564d87364c74", "score": "0.48705277", "text": "function resetConnection() {\n //close socket\n GEPPETTO.MessageSocket.close();\n //clear message handlers, all tests within module should have performed by time method it's called\n GEPPETTO.MessageSocket.clearHandlers();\n //connect to socket again for next test\n GEPPETTO.MessageSocket.connect(GEPPETTO.MessageSocket.protocol + window.location.host + '/' + window.BUNDLE_CONTEXT_PATH + '/GeppettoServlet');\n }", "title": "" }, { "docid": "0fe6fed471683cca08f9366566ca4f06", "score": "0.4868705", "text": "processUpdateConn(event) {\n trace(`ICE state changed to: ${event.target.iceConnectionState}.`);\n\n if (event.target.iceConnectionState === 'disconnected') { \n this.disconnect();\n }\n }", "title": "" }, { "docid": "0387d045f829a31f94de349dd505a9a0", "score": "0.4860085", "text": "function sendInitialControllerState() {\r\n log.writeLine(\"Send initial state of controller, actual state, controller online : \" +controllerOnline);\r\n if (controllerOnline)\r\n io.emit(\"controllerConnected\", true);\r\n else\r\n io.emit(\"controllerDisconnected\", true);\r\n}", "title": "" }, { "docid": "824212889a26177efac891c739bee2c3", "score": "0.4859264", "text": "reset() {\n this.MQTTClient = null;\n this.MQTTMessageRecvCallback = null;\n }", "title": "" }, { "docid": "6ce29645b455a9ab90beb95e41f554dc", "score": "0.48571992", "text": "function pre() {\n\t\t// attempt to reconnect\n\t\tif (connectionRequested && !connectionEstablished) {\n\t\t\tif (parent.millis() - reconnectAttempt > reconnectInterval) {\n\t\t\t\tif ( verbose ) console.log(\"[Spacebrew::pre] attempting to reconnect to Spacebrew\");\n\t\t\t\tthis.connect( hostname, port, this.name, this.description);\n\t\t\t\treconnectAttempt = parent.millis();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "5d29d4c433508258a56a3ccb712216bb", "score": "0.48523796", "text": "function resetComponentState() {\n isParent = false;\n previousOrParentTNode = null;\n elementDepthCount = 0;\n bindingsEnabled = true;\n}", "title": "" }, { "docid": "5d29d4c433508258a56a3ccb712216bb", "score": "0.48523796", "text": "function resetComponentState() {\n isParent = false;\n previousOrParentTNode = null;\n elementDepthCount = 0;\n bindingsEnabled = true;\n}", "title": "" }, { "docid": "5d29d4c433508258a56a3ccb712216bb", "score": "0.48523796", "text": "function resetComponentState() {\n isParent = false;\n previousOrParentTNode = null;\n elementDepthCount = 0;\n bindingsEnabled = true;\n}", "title": "" } ]
67c190f176830b5f8cdee57469856fdf
These days Opera's core is based on Chromium so we shouldn't distinguish between them too much
[ { "docid": "3eed09bfd117bb9fdf0d91dac656875d", "score": "0.0", "text": "function isOpera() {\n return hasNavigator() && /Opera|OPR/i.test(navigator.userAgent);\n }", "title": "" } ]
[ { "docid": "cb7fba06d4140865b3d936cdf4449e70", "score": "0.65579504", "text": "function _isOpera(){}", "title": "" }, { "docid": "890631856bbe2d3a9fb42144a64038eb", "score": "0.6530454", "text": "function browserspecifics() {\n\n //http://stackoverflow.com/questions/2400935/browser-detection-in-javascript\n\n navigator.sayswho = (function(){\n var ua= navigator.userAgent, tem, \n M= ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\\/))\\/?\\s*(\\d+)/i) || [];\n if(/trident/i.test(M[1])){\n tem= /\\brv[ :]+(\\d+)/g.exec(ua) || [];\n return 'IE '+(tem[1] || '');\n }\n if(M[1]=== 'Chrome'){\n tem= ua.match(/\\bOPR\\/(\\d+)/)\n if(tem!= null) return 'Opera '+tem[1];\n }\n M= M[2]? [M[1], M[2]]: [navigator.appName, navigator.appVersion, '-?'];\n if((tem= ua.match(/version\\/(\\d+)/i))!= null) M.splice(1, 1, tem[1]);\n return M.join(' ');\n })();\n\n}", "title": "" }, { "docid": "7d576a36f3eca70c19705728807d01bb", "score": "0.6498292", "text": "function isPresto(){var opera=window.opera;return(typeof opera===\"undefined\"?\"undefined\":_typeof4(opera))==='object'&&typeof opera.version==='function'&&parseInt(opera.version(),10)<=12;}", "title": "" }, { "docid": "371bd3350297f3ab672a9db8c020051e", "score": "0.64870095", "text": "function e(a){var q=(a||u).toLowerCase();var B1=/(webkit)[ \\/]([\\w.]+)/;var C1=/(opera)(?:.*version)?[ \\/]([\\w.]+)/;var D1=/(msie) ([\\w.]+)/;var E1=/(trident)\\/[\\w.]+;.*rv:([\\w.]+)/;var F1=/(edge)[ \\/]([\\w.]+)/;var G1=/(mozilla)(?:.*? rv:([\\w.]+))?/;var H1=F1.exec(q)||E1.exec(q)||B1.exec(q)||C1.exec(q)||D1.exec(q)||q.indexOf(\"compatible\")<0&&G1.exec(q)||[];var I1={browser:H1[1]||\"\",version:H1[2]||\"0\"};I1[I1.browser]=true;return I1;}", "title": "" }, { "docid": "278f6b226a2d93f18e0765016e8e7241", "score": "0.6459872", "text": "function isPresto(){var opera=window.opera;return(typeof opera==='undefined'?'undefined':_typeof(opera))==='object'&&typeof opera.version==='function'&&parseInt(opera.version(),10)<=12;}", "title": "" }, { "docid": "278f6b226a2d93f18e0765016e8e7241", "score": "0.6459872", "text": "function isPresto(){var opera=window.opera;return(typeof opera==='undefined'?'undefined':_typeof(opera))==='object'&&typeof opera.version==='function'&&parseInt(opera.version(),10)<=12;}", "title": "" }, { "docid": "802b3fc9635c94f7ed0579153098a32c", "score": "0.6437963", "text": "function isPresto(){var opera=window.opera;return (typeof opera === \"undefined\"?\"undefined\":_typeof(opera)) === 'object' && typeof opera.version === 'function' && parseInt(opera.version(),10) <= 12;}", "title": "" }, { "docid": "32b3015165626f62e040e25618908b9a", "score": "0.6337017", "text": "function xbDetectBrowser()\n{\n var oldOnError = window.onerror;\n var element = null;\n\n window.onerror = null;\n \n // work around bug in xpcdom Mozilla 0.9.1\n window.saveNavigator = window.navigator;\n\n navigator.OS = '';\n navigator.version = parseFloat(navigator.appVersion);\n navigator.org = '';\n navigator.family = '';\n\n var platform;\n if (typeof(window.navigator.platform) != 'undefined')\n {\n platform = window.navigator.platform.toLowerCase();\n if (platform.indexOf('win') != -1)\n navigator.OS = 'win';\n else if (platform.indexOf('mac') != -1)\n navigator.OS = 'mac';\n else if (platform.indexOf('unix') != -1 || platform.indexOf('linux') != -1 || platform.indexOf('sun') != -1)\n navigator.OS = 'nix';\n }\n\n var i = 0;\n var ua = window.navigator.userAgent.toLowerCase();\n \n if (ua.indexOf('opera') != -1)\n {\n i = ua.indexOf('opera');\n navigator.family = 'opera';\n navigator.org = 'opera';\n navigator.version = parseFloat('0' + ua.substr(i+6), 10);\n }\n else if ((i = ua.indexOf('msie')) != -1)\n {\n navigator.org = 'microsoft';\n navigator.version = parseFloat('0' + ua.substr(i+5), 10);\n \n if (navigator.version < 4)\n navigator.family = 'ie3';\n else\n navigator.family = 'ie4'\n }\n else if (ua.indexOf('gecko') != -1)\n {\n navigator.family = 'gecko';\n var rvStart = ua.indexOf('rv:');\n var rvEnd = ua.indexOf(')', rvStart);\n var rv = ua.substring(rvStart+3, rvEnd);\n var rvParts = rv.split('.');\n var rvValue = 0;\n var exp = 1;\n\n for (var i = 0; i < rvParts.length; i++)\n {\n var val = parseInt(rvParts[i]);\n rvValue += val / exp;\n exp *= 100;\n }\n navigator.version = rvValue;\n\n if (ua.indexOf('netscape') != -1)\n navigator.org = 'netscape';\n else if (ua.indexOf('compuserve') != -1)\n navigator.org = 'compuserve';\n else\n navigator.org = 'mozilla';\n }\n else if ((ua.indexOf('mozilla') !=-1) && (ua.indexOf('spoofer')==-1) && (ua.indexOf('compatible') == -1) && (ua.indexOf('opera')==-1)&& (ua.indexOf('webtv')==-1) && (ua.indexOf('hotjava')==-1))\n {\n var is_major = parseFloat(navigator.appVersion);\n \n if (is_major < 4)\n navigator.version = is_major;\n else\n {\n i = ua.lastIndexOf('/')\n navigator.version = parseFloat('0' + ua.substr(i+1), 10);\n }\n navigator.org = 'netscape';\n navigator.family = 'nn' + parseInt(navigator.appVersion);\n }\n else if ((i = ua.indexOf('aol')) != -1 )\n {\n // aol\n navigator.family = 'aol';\n navigator.org = 'aol';\n navigator.version = parseFloat('0' + ua.substr(i+4), 10);\n }\n else if ((i = ua.indexOf('hotjava')) != -1 )\n {\n // hotjava\n navigator.family = 'hotjava';\n navigator.org = 'sun';\n navigator.version = parseFloat(navigator.appVersion);\n }\n\n window.onerror = oldOnError;\n}", "title": "" }, { "docid": "8a0b959157fd5b80919c0bca55d3aba8", "score": "0.6327427", "text": "function operaVersion() {\n \tagent = navigator.userAgent;\n \tidx = agent.indexOf(\"opera\");\t\n \tif (idx>-1) {\n \t\treturn parseInt(agent.subString(idx+6,idx+7));\n \t}\n }", "title": "" }, { "docid": "68b179a3f383372ce753faba3143ff3f", "score": "0.6322798", "text": "function isOpera(){ // Private method\n\treturn navigator.userAgent.indexOf(\"Opera\") > -1;\n}", "title": "" }, { "docid": "22d3f9c24366eb35a21a16e0b20eab59", "score": "0.6320692", "text": "function o(){var a=u.toLowerCase();var b=/(webkit)[ \\/]([\\w.]+)/;var e=/(opera)(?:.*version)?[ \\/]([\\w.]+)/;var f=/(msie) ([\\w.]+)/;var i=/(trident)\\/[\\w.]+;.*rv:([\\w.]+)/;var q=/(mozilla)(?:.*? rv:([\\w.]+))?/;var Q=b.exec(a)||e.exec(a)||f.exec(a)||i.exec(a)||a.indexOf(\"compatible\")<0&&q.exec(a)||[];var s={browser:Q[1]||\"\",version:Q[2]||\"0\"};s[s.browser]=true;return s}", "title": "" }, { "docid": "22d3f9c24366eb35a21a16e0b20eab59", "score": "0.6320692", "text": "function o(){var a=u.toLowerCase();var b=/(webkit)[ \\/]([\\w.]+)/;var e=/(opera)(?:.*version)?[ \\/]([\\w.]+)/;var f=/(msie) ([\\w.]+)/;var i=/(trident)\\/[\\w.]+;.*rv:([\\w.]+)/;var q=/(mozilla)(?:.*? rv:([\\w.]+))?/;var Q=b.exec(a)||e.exec(a)||f.exec(a)||i.exec(a)||a.indexOf(\"compatible\")<0&&q.exec(a)||[];var s={browser:Q[1]||\"\",version:Q[2]||\"0\"};s[s.browser]=true;return s}", "title": "" }, { "docid": "273a7e89963e79680aed61104ffbafb9", "score": "0.62795985", "text": "function _isChrome(){}", "title": "" }, { "docid": "b42bf0305885c4537b467cf61cf97302", "score": "0.6231007", "text": "function css_browser_selector(e){var i=e.toLowerCase(),r=function(e){return i.indexOf(e)>-1},t=\"gecko\",o=\"webkit\",a=\"safari\",n=\"chrome\",s=\"opera\",d=\"mobile\",c=0,l=window.devicePixelRatio?(window.devicePixelRatio+\"\").replace(\".\",\"_\"):\"1\",p=[!/opera|webtv/.test(i)&&/msie\\s(\\d+)/.test(i)&&(c=1*RegExp.$1)?\"ie ie\"+c+(6==c||7==c?\" ie67 ie678 ie6789\":8==c?\" ie678 ie6789\":9==c?\" ie6789 ie9m\":c>9?\" ie9m\":\"\"):/edge\\/(\\d+)\\.(\\d+)/.test(i)&&(c=[RegExp.$1,RegExp.$2])?\"ie ie\"+c[0]+\" ie\"+c[0]+\"_\"+c[1]+\" ie9m edge\":/trident\\/\\d+.*?;\\s*rv:(\\d+)\\.(\\d+)\\)/.test(i)&&(c=[RegExp.$1,RegExp.$2])?\"ie ie\"+c[0]+\" ie\"+c[0]+\"_\"+c[1]+\" ie9m\":/firefox\\/(\\d+)\\.(\\d+)/.test(i)&&(re=RegExp)?t+\" ff ff\"+re.$1+\" ff\"+re.$1+\"_\"+re.$2:r(\"gecko/\")?t:r(s)?s+(/version\\/(\\d+)/.test(i)?\" \"+s+RegExp.$1:/opera(\\s|\\/)(\\d+)/.test(i)?\" \"+s+RegExp.$2:\"\"):r(\"konqueror\")?\"konqueror\":r(\"blackberry\")?d+\" blackberry\":r(n)||r(\"crios\")?o+\" \"+n:r(\"iron\")?o+\" iron\":!r(\"cpu os\")&&r(\"applewebkit/\")?o+\" \"+a:r(\"mozilla/\")?t:\"\",r(\"android\")?d+\" android\":\"\",r(\"tablet\")?\"tablet\":\"\",r(\"j2me\")?d+\" j2me\":r(\"ipad; u; cpu os\")?d+\" chrome android tablet\":r(\"ipad;u;cpu os\")?d+\" chromedef android tablet\":r(\"iphone\")?d+\" ios iphone\":r(\"ipod\")?d+\" ios ipod\":r(\"ipad\")?d+\" ios ipad tablet\":r(\"mac\")?\"mac\":r(\"darwin\")?\"mac\":r(\"webtv\")?\"webtv\":r(\"win\")?\"win\"+(r(\"windows nt 6.0\")?\" vista\":\"\"):r(\"freebsd\")?\"freebsd\":r(\"x11\")||r(\"linux\")?\"linux\":\"\",\"1\"!=l?\" retina ratio\"+l:\"\",\"js portrait\"].join(\" \");return window.jQuery&&!window.jQuery.browser&&(window.jQuery.browser=c?{msie:1,version:c}:{}),p}", "title": "" }, { "docid": "cc4c10ac03204c2927f24c22585019ab", "score": "0.6224989", "text": "function y(a){var b=(a||u).toLowerCase();var e=/(webkit)[ \\/]([\\w.]+)/;var f=/(opera)(?:.*version)?[ \\/]([\\w.]+)/;var i=/(msie) ([\\w.]+)/;var q=/(trident)\\/[\\w.]+;.*rv:([\\w.]+)/;var s=/(edge)[ \\/]([\\w.]+)/;var t=/(mozilla)(?:.*? rv:([\\w.]+))?/;var v=s.exec(b)||q.exec(b)||e.exec(b)||f.exec(b)||i.exec(b)||b.indexOf(\"compatible\")<0&&t.exec(b)||[];var w={browser:v[1]||\"\",version:v[2]||\"0\"};w[w.browser]=true;return w;}", "title": "" }, { "docid": "cc4c10ac03204c2927f24c22585019ab", "score": "0.6224989", "text": "function y(a){var b=(a||u).toLowerCase();var e=/(webkit)[ \\/]([\\w.]+)/;var f=/(opera)(?:.*version)?[ \\/]([\\w.]+)/;var i=/(msie) ([\\w.]+)/;var q=/(trident)\\/[\\w.]+;.*rv:([\\w.]+)/;var s=/(edge)[ \\/]([\\w.]+)/;var t=/(mozilla)(?:.*? rv:([\\w.]+))?/;var v=s.exec(b)||q.exec(b)||e.exec(b)||f.exec(b)||i.exec(b)||b.indexOf(\"compatible\")<0&&t.exec(b)||[];var w={browser:v[1]||\"\",version:v[2]||\"0\"};w[w.browser]=true;return w;}", "title": "" }, { "docid": "5a3f82c4f2b0171463860168a04e9275", "score": "0.620808", "text": "function y(a){var b=(a||u).toLowerCase();var e=/(webkit)[ \\/]([\\w.]+)/;var f=/(opera)(?:.*version)?[ \\/]([\\w.]+)/;var i=/(msie) ([\\w.]+)/;var q=/(trident)\\/[\\w.]+;.*rv:([\\w.]+)/;var s=/(mozilla)(?:.*? rv:([\\w.]+))?/;var V=e.exec(b)||f.exec(b)||i.exec(b)||q.exec(b)||b.indexOf(\"compatible\")<0&&s.exec(b)||[];var t={browser:V[1]||\"\",version:V[2]||\"0\"};t[t.browser]=true;return t}", "title": "" }, { "docid": "428c7ef55b0bac41c67ffdbc17b5f771", "score": "0.6204805", "text": "function g(a){var b=(a||U).toLowerCase(),c=/(webkit)[ \\/]([\\w.]+)/,d=/(opera)(?:.*version)?[ \\/]([\\w.]+)/,e=/(msie) ([\\w.]+)/,f=/(trident)\\/[\\w.]+;.*rv:([\\w.]+)/,g=/(edge)[ \\/]([\\w.]+)/,h=/(mozilla)(?:.*? rv:([\\w.]+))?/,i=g.exec(b)||f.exec(b)||c.exec(b)||d.exec(b)||e.exec(b)||b.indexOf(\"compatible\")<0&&h.exec(b)||[],j={browser:i[1]||\"\",version:i[2]||\"0\"};return j[j.browser]=!0,j}", "title": "" }, { "docid": "8a7b4f6dd7fbefb0f04f3c9638cc7a97", "score": "0.6198724", "text": "function uglyBrowserSniff() {\n var browserName;\n\n // Opera 8.0+\n if ((window.opr && opr.addons) || window.opera || (navigator.userAgent.indexOf(' OPR/') >= 0)) {\n browserName = \"Opera\";\n }\n\n // Firefox 1.0+\n if (typeof InstallTrigger !== 'undefined') {\n browserName = \"Firefox\";\n }\n\n // At least Safari 3+: \"[object HTMLElementConstructor]\"\n if (Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0) {\n browserName = \"Safari\";\n }\n\n // Internet Explorer 6-11\n if ((/*@cc_on!@*/false) || (document.documentMode)) {\n browserName = \"IE\";\n }\n\n // Edge 20+\n if (!(document.documentMode) && window.StyleMedia) {\n browserName = \"Edge\";\n }\n\n // Chrome 1+\n if (window.chrome && window.chrome.webstore) {\n browserName = \"Chrome\";\n }\n\n if (browserName == \"Firefox\" || browserName == \"Opera\" || browserName == \"IE\" || browserName == \"Edge\"){\n errorBanner.classList.add('show')\n console.log(browserName)\n };\n }", "title": "" }, { "docid": "9d7c6ac9c6c1f7022780797f2713f83a", "score": "0.61463404", "text": "function Browseris(){var c=navigator.userAgent.toLowerCase();\nthis.osver=1;\nif(c){var a=c.substring(c.indexOf(\"windows \")+11);\nthis.osver=parseFloat(a);\n}this.major=parseInt(navigator.appVersion);\nthis.nav=((c.indexOf(\"mozilla\")!=-1)&&((c.indexOf(\"spoofer\")==-1)&&(c.indexOf(\"compatible\")==-1)));\nthis.nav6=this.nav&&(this.major==5);\nthis.nav6up=this.nav&&(this.major>=5);\nthis.nav7up=false;\nif(this.nav6up){var b=c.indexOf(\"netscape/\");\nif(b>=0){this.nav7up=parseInt(c.substring(b+9))>=7;\n}}this.ie=(c.indexOf(\"msie\")!=-1);\nthis.aol=this.ie&&c.indexOf(\" aol \")!=-1;\nif(this.ie){var d=c.substring(c.indexOf(\"msie \")+5);\nthis.iever=parseInt(d);\nthis.verIEFull=parseFloat(d);\n}else{this.iever=0;\n}this.ie4up=this.ie&&(this.major>=4);\nthis.ie5up=this.ie&&(this.iever>=5);\nthis.ie55up=this.ie&&(this.verIEFull>=5.5);\nthis.ie6up=this.ie&&(this.iever>=6);\nthis.winnt=((c.indexOf(\"winnt\")!=-1)||(c.indexOf(\"windows nt\")!=-1));\nthis.win32=((this.major>=4)&&(navigator.platform==\"Win32\"))||(c.indexOf(\"win32\")!=-1)||(c.indexOf(\"32bit\")!=-1);\nthis.mac=(c.indexOf(\"mac\")!=-1);\nthis.w3c=this.nav6up;\nthis.safari=(c.indexOf(\"safari\")!=-1);\nthis.safari125up=false;\nif(this.safari&&this.major>=5){var b=c.indexOf(\"safari/\");\nif(b>=0){this.safari125up=parseInt(c.substring(b+7))>=125;\n}}}", "title": "" }, { "docid": "751c4331761f3213b51791021cc17998", "score": "0.6115634", "text": "function n(e){var t=(e||v).toLowerCase();var n=/(webkit)[ \\/]([\\w.]+)/;var r=/(opera)(?:.*version)?[ \\/]([\\w.]+)/;var i=/(msie) ([\\w.]+)/;var a=/(trident)\\/[\\w.]+;.*rv:([\\w.]+)/;var o=/(edge)[ \\/]([\\w.]+)/;var s=/(mozilla)(?:.*? rv:([\\w.]+))?/;var u=o.exec(t)||a.exec(t)||n.exec(t)||r.exec(t)||i.exec(t)||t.indexOf(\"compatible\")<0&&s.exec(t)||[];var l={browser:u[1]||\"\",version:u[2]||\"0\"};l[l.browser]=true;return l}", "title": "" }, { "docid": "981536885862911e812099fe1385164a", "score": "0.61039656", "text": "function ArdeBrowser() {\r\n\tthis.opera=false;\r\n\tthis.ie=false;\r\n\tthis.safari=false;\r\n\tthis.gecko=false;\r\n\tthis.khtml=false;\r\n\t\r\n\tif(navigator.userAgent.match(/khtml/i)) {\r\n\t\tthis.khtml=true;\r\n\t}\r\n\t\r\n\tif(navigator.userAgent.match(/gecko/i)) {\r\n\t\tthis.gecko=true;\r\n\t}\r\n\t\r\n\tif(navigator.userAgent.match(/applewebkit/i)) {\t\r\n\t\tthis.webkit=true;\r\n\t}\r\n\t\r\n\tvar res=navigator.userAgent.match(/Opera(\\s|\\/)([0-9\\.]+)/);\r\n\tif(res) {\r\n\t\tthis.opera=parseFloat(res[2]);\r\n\t\treturn;\r\n\t}\r\n\tvar res=navigator.userAgent.match(/Safari\\/([0-9]+\\.?[0-9]*)/);\r\n\tif(res) {\r\n\t\tthis.safari=parseFloat(res[1]);\r\n\t\tthis.khtml=true;\r\n\t\treturn;\r\n\t}\r\n\r\n\t\r\n\tif(document.all) {\r\n\t\tvar res=navigator.userAgent.match(/MSIE\\s([0-9\\.]+)/);\r\n\t\tif(res) {\r\n\t\t\tthis.ie=parseFloat(res[1]);\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n\t\r\n}", "title": "" }, { "docid": "85089506ab33363c44f22a87fddaa74a", "score": "0.6089072", "text": "function i(e){var n=(e||S).toLowerCase();var i=/(webkit)[ \\/]([\\w.]+)/;var t=/(opera)(?:.*version)?[ \\/]([\\w.]+)/;var r=/(msie) ([\\w.]+)/;var o=/(trident)\\/[\\w.]+;.*rv:([\\w.]+)/;var a=/(edge)[ \\/]([\\w.]+)/;var s=/(mozilla)(?:.*? rv:([\\w.]+))?/;var u=a.exec(n)||o.exec(n)||i.exec(n)||t.exec(n)||r.exec(n)||n.indexOf(\"compatible\")<0&&s.exec(n)||[];var d={browser:u[1]||\"\",version:u[2]||\"0\"};d[d.browser]=true;return d}", "title": "" }, { "docid": "85089506ab33363c44f22a87fddaa74a", "score": "0.6089072", "text": "function i(e){var n=(e||S).toLowerCase();var i=/(webkit)[ \\/]([\\w.]+)/;var t=/(opera)(?:.*version)?[ \\/]([\\w.]+)/;var r=/(msie) ([\\w.]+)/;var o=/(trident)\\/[\\w.]+;.*rv:([\\w.]+)/;var a=/(edge)[ \\/]([\\w.]+)/;var s=/(mozilla)(?:.*? rv:([\\w.]+))?/;var u=a.exec(n)||o.exec(n)||i.exec(n)||t.exec(n)||r.exec(n)||n.indexOf(\"compatible\")<0&&s.exec(n)||[];var d={browser:u[1]||\"\",version:u[2]||\"0\"};d[d.browser]=true;return d}", "title": "" }, { "docid": "cd8aa3b1252ba395902ce384f27260cd", "score": "0.6081367", "text": "function r(){return(navigator.userAgent||navigator.vendor||window.opera).toLowerCase()}", "title": "" }, { "docid": "cd8aa3b1252ba395902ce384f27260cd", "score": "0.6081367", "text": "function r(){return(navigator.userAgent||navigator.vendor||window.opera).toLowerCase()}", "title": "" }, { "docid": "460ed786615807661945d577214b02bb", "score": "0.6064478", "text": "function i(){return(navigator.userAgent||navigator.vendor||window.opera).toLowerCase()}", "title": "" }, { "docid": "47c447e4deae0802a2e2afc76b24b090", "score": "0.5912351", "text": "function browserDetection() {\n \n var thebrowser;\n\n var foropera = window.navigator.userAgent.toLowerCase();\n var itsopera = foropera.indexOf(\"opera\",0) + 1;\n var itsgecko = foropera.indexOf(\"gecko\",0) + 1;\n var itsmozillacompat = foropera.indexOf(\"mozilla\",0) + 1;\n var itsmsie = foropera.indexOf(\"msie\",0) + 1;\n\n\n\n if (itsopera > 0) {\n thebrowser = 3;\n //alert(\"its opera\");\n document.all = document.getElementsByTagName(\"*\")\n\n }\n\n if (itsmozillacompat > 0) {\n //alert(\"its mozilla compatible\");\n if (itsgecko > 0) {\n thebrowser = 4\n //alert(\"its gecko\");\n document.all = document.getElementsByTagName(\"*\") \n } else if (itsmsie > 0) {\n //alert(\"its msie\");\n thebrowser = 2\n } else {\n //alert(\"its ns4.x\")\n thebrowser = 1\n }\n }\n\n return thebrowser;\n\n}", "title": "" }, { "docid": "cfa5c31b1f9e10c49be1eab5b60664fe", "score": "0.59112495", "text": "function Chrome() { }", "title": "" }, { "docid": "6d9fc51392f3a6982554f2659325b969", "score": "0.5897103", "text": "function isPresto() {\r\n var opera = window.opera;\r\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\r\n}", "title": "" }, { "docid": "adc18cce928890b47db463fca484bcaf", "score": "0.5885938", "text": "function detectChromeOpera() {\n // https://developers.google.com/web/updates/2017/08/estimating-available-storage-space\n var isChromeOpera = /(?=.*(opera|chrome)).*/i.test(navigator.userAgent) && navigator.storage && navigator.storage.estimate;\n if (isChromeOpera) {\n navigator.storage.estimate().then(function(data) {\n return data.quota < 120000000 ? yes() : not();\n });\n }\n return !!isChromeOpera;\n }", "title": "" }, { "docid": "a0dcaddd1a82c1d5a2234b8d38125e6b", "score": "0.58123547", "text": "function UpLevelBrowser()\r\n{\r\n\treturn (navigator.appName=='Microsoft Internet Explorer' && !browseris.mac);\r\n}", "title": "" }, { "docid": "a336631f2d19a9916d7d1d4f4605c653", "score": "0.579691", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n }", "title": "" }, { "docid": "56a6bbb13ef8471a3c23b3d835f8b1af", "score": "0.57945216", "text": "function isPresto() {\n var opera = window.opera;\n return (\n typeof opera === 'object' &&\n typeof opera.version === 'function' &&\n parseInt(opera.version(), 10) <= 12\n );\n }", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" }, { "docid": "6a0655869c3c6d8355160f76d7d04f77", "score": "0.57890886", "text": "function isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}", "title": "" } ]
4ee5408c15085fba8aab1391128a4f3c
Get grid columns based on current column visibility settings:
[ { "docid": "e80bb17f4b8a5d99aa23ac407590cc7b", "score": "0.71260405", "text": "getGridCols (dataView: ?Object = null) {\n const viewParams = this.props.viewState.viewParams\n const showHiddenCols = viewParams.showHiddenCols\n const displayCols = viewParams.displayColumns\n\n let gridCols = displayCols.map(cid => this.slickColMap[cid])\n if (this.isPivoted()) {\n this.updateColWidth(dataView, '_pivot')\n let pivotCol = this.slickColMap['_pivot']\n gridCols.unshift(pivotCol)\n }\n if (showHiddenCols) {\n const hiddenColIds = _.difference(_.keys(this.slickColMap), gridCols.map(gc => gc.field))\n const hiddenCols = hiddenColIds.map(cid => this.slickColMap[cid])\n gridCols = gridCols.concat(hiddenCols)\n }\n return gridCols\n }", "title": "" } ]
[ { "docid": "2e0c7e1dbc5655cd768633e1bc6d5e0b", "score": "0.71197414", "text": "get visibleColumns() {\n return this._visibleColumns;\n }", "title": "" }, { "docid": "c065dc639fd91742eb8b47deb8a4c91f", "score": "0.7009673", "text": "getVisibleTableColumns(visibleColumns) {\n return this.columns.map(column => (Object.assign(Object.assign({}, column), { visible: visibleColumns.includes(column.property) || column.type === 'detail' })));\n }", "title": "" }, { "docid": "240e7cb1bd6edb20037bd681a0f592f7", "score": "0.6874113", "text": "function getColumns() {\n\n //Since columnmap is an '@' property in this example (to demonstrate we can do that)\n //we need to convert it to an object.\n //Can use $scope.$eval or $parse service ($parse is in another example)\n //See https://docs.angularjs.org/guide/expression\n vm.columnmap = $scope.$eval(vm.columnmap);\n\n if (vm.columnmap) {\n //Use columnmap to handle displaying columns\n vm.columnmap.forEach(function(map) {\n if (!map.hidden) {\n for (var prop in map) {\n if (prop !== 'hidden') pushColumns(prop, map[prop]);\n }\n }\n });\n }\n else {\n //No column map so default to raw properties\n for (var prop in vm.datasource[0]) {\n pushColumns(prop, prop);\n }\n }\n }", "title": "" }, { "docid": "9342ccb7a4d08f9714507743352d32b1", "score": "0.67238253", "text": "get isVisible() {\n return this.columns.some(c => !c.hidden);\n }", "title": "" }, { "docid": "514760a4695e74e7e0625e09306442d9", "score": "0.6711202", "text": "function getColumnStatus()\r\n{\r\n\tvar columns = GM_getValue('columns_'+suffix, '');\r\n\tif (!columns || columns == '' || columns.split(',').length<colsWidth.length) {\r\n\t\tcolumns = colsVisibility; //default values\r\n\t\tGM_setValue('columns_'+suffix, columns);\r\n\t}\r\n\tcolumns = columns.split(',');\r\n\treturn columns;\r\n}", "title": "" }, { "docid": "ac67be9cb6e31c2eef02f41d937aa2b8", "score": "0.6612404", "text": "function findActiveColumns() {\n var $selector = $('#toggle-categories');\n var visibleCols = [0];\n $selector.children().children().each(function () {\n if ($(this).prop('checked')) {\n visibleCols.push(parseInt($(this).prop('id').substring(3)));\n }\n });\n\n return visibleCols;\n }", "title": "" }, { "docid": "8a60c533efcda7004cc493f6d3e81ddd", "score": "0.65456665", "text": "get columns() {\n if (this._columns === null) {\n let coll = new IgrGridColumnCollection();\n let inner = coll._innerColl;\n inner.addListener((sender, e) => {\n if (this._disableManualColumnSync) {\n return;\n }\n switch (e.action) {\n case NotifyCollectionChangedAction.Add:\n this._columnsAdapter.insertManualItem(e.newStartingIndex, e.newItems.item(0));\n break;\n case NotifyCollectionChangedAction.Remove:\n this._columnsAdapter.removeManualItemAt(e.oldStartingIndex);\n break;\n case NotifyCollectionChangedAction.Replace:\n this._columnsAdapter.removeManualItemAt(e.oldStartingIndex);\n this._columnsAdapter.insertManualItem(e.newStartingIndex, e.newItems.item(0));\n break;\n case NotifyCollectionChangedAction.Reset:\n this._columnsAdapter.clearManualItems();\n break;\n }\n });\n this._columns = coll;\n }\n return this._columns;\n }", "title": "" }, { "docid": "06fd1139752959562987533e10395f0d", "score": "0.6542869", "text": "getColumnVisibility(propertyId, columnIndex) {\n\t\treturn this.controls[propertyId.name][columnIndex].visible;\n\t}", "title": "" }, { "docid": "7df7b3ddc65a0732c1d1ba6936aa8acc", "score": "0.6491799", "text": "columnsToDisplay() {\n return this.schema.filter((c)=>c.display).map((c)=>({\n ...c,\n renderer: c.renderer || ((r)=>Tools.findValueAtPath(r, c.path)),\n path: c.path instanceof Array ? c.path : [c.path],\n }));\n }", "title": "" }, { "docid": "12d051158721c66b708e0b0248f9a279", "score": "0.6434741", "text": "get columnDefinitions() {\n return (this._grid && this._grid.getColumns) ? this._grid.getColumns() : [];\n }", "title": "" }, { "docid": "839c342ef27a5ecb5082be80c328133f", "score": "0.6252076", "text": "get columns() {\n if (this.gridColumns == null || typeof this.gridColumns === 'undefined') {\n this.gridColumns = new PdfGridColumnCollection(this);\n }\n return this.gridColumns;\n }", "title": "" }, { "docid": "a43dcfd3636bb844e52c3da7b7a35ff5", "score": "0.6231332", "text": "function getColumns() {\n var columns = [];\n columns.push({\n needsQuotes: true,\n label: \"Thumbnail\",\n field: \"thumbnailUrl\",\n hidden: true,\n renderCell: renderItemThumbnail\n });\n columns.push({\n needsQuotes: true,\n label: \"Title\",\n field: \"title\",\n unhidable: true,\n renderCell: renderItemTitle\n });\n columns.push({\n needsQuotes: true,\n label: \"ID\",\n field: \"id\",\n hidden: true\n });\n columns.push({\n needsQuotes: true,\n label: \"Credits\",\n field: \"accessInformation\",\n hidden: true\n });\n columns.push({\n needsQuotes: true,\n label: \"Access\",\n field: \"licenseInfo\",\n hidden: true\n });\n columns.push({\n needsQuotes: true,\n label: \"Shared\",\n field: \"access\",\n hidden: true\n });\n columns.push({\n needsQuotes: true,\n label: \"Summary\",\n field: \"snippet\",\n hidden: true\n });\n columns.push({\n needsQuotes: true,\n label: \"Description\",\n field: \"description\",\n hidden: true,\n renderCell: renderItemDescription\n });\n columns.push({\n needsQuotes: true,\n label: \"Display Name\",\n field: \"displayName\",\n hidden: true\n });\n columns.push({\n needsQuotes: true,\n label: \"Type\",\n field: \"type\",\n hidden: true\n });\n columns.push({\n needsQuotes: true,\n label: \"Type Keywords\",\n field: \"typeKeywords\",\n hidden: true\n });\n columns.push({\n needsQuotes: true,\n label: \"Tags\",\n field: \"tags\",\n canSort: false,\n hidden: false\n });\n columns.push({\n needsQuotes: true,\n label: \"Created\",\n field: \"created\",\n hidden: true,\n formatter: formatDateValue\n });\n columns.push({\n needsQuotes: true,\n label: \"Modified\",\n field: \"modified\",\n hidden: true,\n formatter: formatDateValue\n });\n columns.push({\n needsQuotes: true,\n label: \"Owner\",\n field: \"owner\",\n hidden: true\n });\n columns.push({\n needsQuotes: false,\n label: \"Avg Rating\",\n field: \"avgRating\",\n hidden: true\n });\n columns.push({\n needsQuotes: false,\n label: \"Num Ratings\",\n field: \"numRatings\",\n hidden: true\n });\n columns.push({\n needsQuotes: false,\n label: \"Num Views\",\n field: \"numViews\",\n hidden: true\n });\n columns.push({\n needsQuotes: false,\n label: \"Num Comments\",\n field: \"numComments\",\n hidden: true\n });\n\n return columns;\n }", "title": "" }, { "docid": "d0ef4c52e0e09960ae33df7163d5af99", "score": "0.62060344", "text": "function getGridColumns(arFields) {\n var arColumns = [];\n if (arFields) {\n arFields.forEach(function (element) {\n if (element.toUpperCase() !== 'LOCATION' && element.toUpperCase() !== 'SOURCETYPE') {\n var val = DGPortal.Constants.HeaderNamesHashMap.get(element);\n arColumns.push({\n text: val, dataIndex: element,\n //appending unit as 'Files' or 'Tables' if sourceType is present. \n renderer: function (value, metaData, record, rowIndex, colIndex) {\n if (record.data.sourceType) {\n var propName = this.columns[colIndex].dataIndex;\n var newVal = DGPortal.Constants.appendUnit(record.data.sourceType, propName, value);\n return newVal;\n }\n return value;\n },\n listeners: {\n boxready: function (_this, defaultWidth) {\n //setting new width as per the header text of the column \n var textWidth = Ext.util.TextMetrics.measure(_this.getEl().dom, _this.text).width;\n if ((textWidth + 10) > defaultWidth) {\n _this.setWidth(textWidth + 10);\n }\n }\n }\n });\n }\n });\n }\n return arColumns;\n}", "title": "" }, { "docid": "467ddc971d93f37ef1ddc5c6101ff786", "score": "0.6180366", "text": "function getColumnVisibility(listenName) {\r\n listenName = $defined(listenName) ? listenName : this.aktListe;\r\n var result = $defined(this.columnVisibility[listenName]) ? this.columnVisibility[listenName] : new MoCheck.ColumnVisibility(true, true, true, true);\r\n return result;\r\n}", "title": "" }, { "docid": "ae1e3eba975157e8c7c629d1d080beaf", "score": "0.61599034", "text": "function grid_getResultColumnsInfoFromGridInfo(_metadata) {\n\tvar _cols = _metadata.column;\n\tvar _dtypes = _metadata.displaytype.split(',');\n\tvar _rscols = [];\n\tfor (var i=0; i<_cols.length; i++) {\n\t\tvar _alias = _cols[i];\n\t\tvar _indx = _alias.indexOf('_');\n\t\tvar _column = _alias.substr(0, _indx) + '.' + _alias.substr(_indx+1);\n\t\t_rscols.push({\"column\":_column,\"alias\":_alias,\"type\":_dtypes[i]});\n\t}\n\treturn _rscols;\n}", "title": "" }, { "docid": "3c7aaeb65acf26d1b09fc46f99ae92b7", "score": "0.6067036", "text": "get columns() {\n\t\treturn this.nativeElement ? this.nativeElement.columns : undefined;\n\t}", "title": "" }, { "docid": "eb15d2c74d81843e174f8efab99db5d5", "score": "0.60617447", "text": "function getQueryColumns() {\n var columns = [];\n for (var column of $(\"#columns .column-checkbox\")) {\n if (column.checked) {\n columns.push(column.id.slice(7));\n }\n }\n return columns;\n}", "title": "" }, { "docid": "3df93aacb56a4d9bacb4a1fe349c77cd", "score": "0.60570824", "text": "get columnHidingEnabled() {\n return this._getOption('columnHidingEnabled');\n }", "title": "" }, { "docid": "6ae6471f4d4f7d5b8c2802944bdae343", "score": "0.6036662", "text": "get columns() {\n return this.internalColumns;\n }", "title": "" }, { "docid": "18c14f5da84b1eefe8bfe1ffec8b1316", "score": "0.603214", "text": "getRealColumns(){\n\t\treturn this.columnsByIndex;\n\t}", "title": "" }, { "docid": "cd95dafd654818c5cb91b6db88e950ee", "score": "0.5994461", "text": "function _fnVisbleColumns( oS )\n\t\t{\n\t\t\tvar iVis = 0;\n\t\t\tfor ( var i=0 ; i<oS.aoColumns.length ; i++ )\n\t\t\t{\n\t\t\t\tif ( oS.aoColumns[i].bVisible === true )\n\t\t\t\t{\n\t\t\t\t\tiVis++;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn iVis;\n\t\t}", "title": "" }, { "docid": "cd95dafd654818c5cb91b6db88e950ee", "score": "0.5994461", "text": "function _fnVisbleColumns( oS )\n\t\t{\n\t\t\tvar iVis = 0;\n\t\t\tfor ( var i=0 ; i<oS.aoColumns.length ; i++ )\n\t\t\t{\n\t\t\t\tif ( oS.aoColumns[i].bVisible === true )\n\t\t\t\t{\n\t\t\t\t\tiVis++;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn iVis;\n\t\t}", "title": "" }, { "docid": "35f16846bbe3bc518766f7a706199ec5", "score": "0.5980515", "text": "getColumns() {\n return this.defaults.columns;\n }", "title": "" }, { "docid": "992abb89845830ada3280b5a1676fc3f", "score": "0.5973591", "text": "function showColumnInfo() {\n 'use strict';\n\n chrome.storage.sync.get(\n null,\n function (settings) {\n let root = document.querySelector('html'),\n viewportWidth = root.clientWidth,\n widthOfAllColumns = parseInt(settings.gridColumnCount, 10) * (parseInt(settings.gridColumnWidth, 10) + parseInt(settings.gridGutterWidth, 10)),\n columnCount = parseInt(settings.gridColumnCount, 10);\n\n if (viewportWidth < widthOfAllColumns) {\n columnCount = Math.floor(root.clientWidth / (parseInt(settings.gridColumnWidth, 10) + parseInt(settings.gridGutterWidth, 10)));\n }\n\n document.getElementById('column-and-page-info').innerHTML =\n 'Column count: <strong>' + columnCount + '</strong><br>' +\n 'Page width: <strong>' + viewportWidth + 'px</strong>';\n }\n );\n}", "title": "" }, { "docid": "68300e9a0d257574ae26c6b7fabe984e", "score": "0.59595627", "text": "function gridfilterColumn(_this) {\r\n var $this = $(_this);\r\n if ($(_this).is(\":checked\")) {\r\n $(_this).closest('table').find('tbody tr td, thead tr th, thead tr td').each(function (index, val) {\r\n if ($(this).data('type') && $this.data('type') == $(this).data('type')) {\r\n $(this).show();\r\n }\r\n });\r\n } else {\r\n $(_this).closest('table').find('tbody tr td, thead tr th, thead tr td').each(function (index, val) {\r\n if ($(this).data('type') && $this.data('type') == $(this).data('type')) {\r\n $(this).hide();\r\n }\r\n });\r\n }\r\n}", "title": "" }, { "docid": "44c657599dd500b546068ea666fbda49", "score": "0.59550637", "text": "function getHiddenCols(response){\n var hidden_cols = [];\n $.each(response.DATA, function(i, data_arr){\n var hidden = data_arr[2];\n // push the unchecked dates index to \"hidden_cols\" array\n if(hidden == true ) hidden_cols.push(i); \n });\n return hidden_cols;\n}", "title": "" }, { "docid": "76e7c0367d70cc398b3c5a9f47531645", "score": "0.59340245", "text": "function update_column_view_state(){\n\t\t\n\t\t$('ul.show-hide-column-con')\n\t\t.find('input[type=\"checkbox\"]')\n\t\t.each(function(){\n\t\t\tif(!$(this).is(':checked')){\n\t\t\t\t//get current column\n\t\t\t\tvar col = $(this).parents('li').index();\n\t\t\t\tcol += 2;\n\t\t\t\tfnHide(col , $(this).parents('ul').attr(\"data-table\") );\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\tvar data_table_id = getDataTableID( 1 );\n\t\tvar oTable1 = $('#'+data_table_id).dataTable();\n\t\toTable1.fnAdjustColumnSizing();\n\t\t\n\t}", "title": "" }, { "docid": "c7feeb2511bde6ec306b36122ec56313", "score": "0.5929583", "text": "function getColumns(viewColumns) {\n var columns = [];\n for (var i = 1; i < viewColumns.length; i++) {\n var columnName = viewColumns[i].ColumnName.replace(\"[\", \"\").replace(\"]\", \"\");\n var columnWidth = viewColumns[i].ColumnWidth;\n\n if (columnName == '@ViewKey') {\n columns.push({ name: columnName, width: columnWidth, visible: false });\n }\n else columns.push({ name: columnName, width: columnWidth });\n }\n return columns;\n }", "title": "" }, { "docid": "69175cfa24176d94e04903b30b98ba9e", "score": "0.5925734", "text": "_updateCols(index) {\n let selected = this.shadowRoot.querySelector(\"#column\").value,\n cols = this.shadowRoot.querySelector(\"#table\").querySelectorAll(\"th,td\");\n if (cols.length > 0) {\n for (let i = 0; i < cols.length; i++) {\n let col = cols[i];\n if (this._isColHidden(col.cellIndex, selected)) {\n col.setAttribute(\"xs-hidden\", true);\n } else {\n col.removeAttribute(\"xs-hidden\");\n }\n }\n }\n }", "title": "" }, { "docid": "0276b63c66be7568106c5371f581ad9a", "score": "0.58860147", "text": "function setColumnVisibility(index, value)\r\n{\r\n\tvar columns = getColumnStatus();\r\n\tcolumns.splice(index, 1, value);\r\n\tvar columnsAfter = new Array;\r\n\tfor (i=0; i<=columns.length-1; i++) {\r\n\t\tcolumnsAfter = (i==columns.length-1) ? columnsAfter+columns[i] : columnsAfter+columns[i]+\",\";\r\n\t}\r\n\tGM_setValue('columns_'+suffix, columnsAfter);\r\n}", "title": "" }, { "docid": "82d5c36aad425353a9368a65c350e37a", "score": "0.5858117", "text": "function getAvailableColumns(columnType)\n{\n var chosenColumns = new Array();\n var dsColumns = DS_DESIGN_TIME_OBJ.getColumnNames();\n \n if (columnType == \"masterColumns\")\n {\n chosenColumns = _masterColumns.getValue('all');\n }\n else\n {\n // detail columns\n var columnsList = _detailColumns.getRowValue('all');\n\n if (columnsList && columnsList.length)\n {\n // construct the column names array\n for (var i = 0; i < columnsList.length; i++)\n {\n var rowValue = columnsList[i].split(\"|\");\n chosenColumns.push(rowValue[0]);\n }\n }\n }\n\n return Spry.DesignTime.DataSet.InsertStructure.getArrayDifference(chosenColumns, dsColumns);\n}", "title": "" }, { "docid": "c92211c642cab8525b84140d57dd8770", "score": "0.5836822", "text": "function decorateHiddenColumns(column, grid, doHide) {\n if(column && grid && column.getIndex()>0 && grid.getEl()) {\n cells = grid.getEl().query(\"[class*=x-grid-cell-\"+column.id+\"]\");\n Ext.each(cells, function(cell) {\n if(doHide) {\n Ext.fly(cell).addCls('hidden-cell');\n } else {\n Ext.fly(cell).removeCls('hidden-cell');\n }\n });\n }\n }", "title": "" }, { "docid": "3a00b29baf0c3d1935deecbb88d5e387", "score": "0.5834683", "text": "function _fnColumnIndexToVisible( oSettings, iMatch )\n\t\t{\n\t\t\tvar iVisible = -1;\n\t\t\tfor ( var i=0 ; i<oSettings.aoColumns.length ; i++ )\n\t\t\t{\n\t\t\t\tif ( oSettings.aoColumns[i].bVisible === true )\n\t\t\t\t{\n\t\t\t\t\tiVisible++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( i == iMatch )\n\t\t\t\t{\n\t\t\t\t\treturn oSettings.aoColumns[i].bVisible === true ? iVisible : null;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn null;\n\t\t}", "title": "" }, { "docid": "3a00b29baf0c3d1935deecbb88d5e387", "score": "0.5834683", "text": "function _fnColumnIndexToVisible( oSettings, iMatch )\n\t\t{\n\t\t\tvar iVisible = -1;\n\t\t\tfor ( var i=0 ; i<oSettings.aoColumns.length ; i++ )\n\t\t\t{\n\t\t\t\tif ( oSettings.aoColumns[i].bVisible === true )\n\t\t\t\t{\n\t\t\t\t\tiVisible++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( i == iMatch )\n\t\t\t\t{\n\t\t\t\t\treturn oSettings.aoColumns[i].bVisible === true ? iVisible : null;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn null;\n\t\t}", "title": "" }, { "docid": "694114f415c42a2e177b53ea06891997", "score": "0.5831936", "text": "static get permanentColumns() {\n return [];\n }", "title": "" }, { "docid": "dea59fbcc77cdb73742ec5cd38c6d9cd", "score": "0.5790025", "text": "get columnHidingAnimationMode() {\n return this.i.ba;\n }", "title": "" }, { "docid": "69ac21acd0ca237faa9a421c479ac813", "score": "0.5780769", "text": "function initColumns() {\n var columns = [\n { name: 'Venue',\n displayName: gettextCatalog.getString('Venue'),\n field: 'venue', width: '**', minWidth: '250'\n },\n { name: 'Gender',\n displayName: gettextCatalog.getString('Gender'),\n field: 'gender',\n width: '**',\n minWidth: '150'\n }\n ];\n\n angular.forEach(donationTypes, function(donationType) {\n columns.push({\n name: donationType.type,\n field: donationType.type,\n width: '**',\n minWidth: '125'\n });\n });\n\n columns.push({ name: 'Total',\n displayName: gettextCatalog.getString('Total'),\n field: 'total',\n width: '**',\n minWidth: '125'\n });\n\n return columns;\n }", "title": "" }, { "docid": "43e9bc67abed9e85e3c63cb2d039973d", "score": "0.5775801", "text": "getDefinitions(active){\n\t\tvar output = [];\n\t\t\n\t\tthis.columnsByIndex.forEach((column) => {\n\t\t\tif(!active || (active && column.visible)){\n\t\t\t\toutput.push(column.getDefinition());\n\t\t\t}\n\t\t});\n\t\t\n\t\treturn output;\n\t}", "title": "" }, { "docid": "bcaa6584859ef074e4b0123c5123c307", "score": "0.5766587", "text": "function showColumsForNormalMaximisedState(session, maximised)\n{\n dashgridtag = \"#dashgrid\" + session;\n dashgridpagertag = \"#dashgridpager\" + session;\n dashgridpagerbuttonstag = \"#dashgridpager\" + session + \"_left\";\n\n // If minihide fields are not defined then no need to hide/show anything\n minihide = get_session_param ( session, \"minihide\" );\n if ( !minihide )\n {\n return;\n }\n\n // In unmaximised view hide edit buttons etc\n if ( maximised )\n {\n $(dashgridpagertag).show();\n $(dashgridpagerbuttonstag).show();\n }\n else\n {\n $(dashgridpagertag).show();\n $(dashgridpagerbuttonstag).hide();\n }\n //$(dashgridpagerbuttonstag).hide();\n var colmodels = $(dashgridtag).jqGrid('getGridParam', 'colModel'); \n for ( var index in colmodels )\n {\n // stat = minihide.indexOf(colmodels[index].index );\n for (var i = 0, j = minihide.length; i < j; i++) {\n p = minihide[i];\n if (minihide[i] == colmodels[index].index) \n { \n if ( maximised )\n $(dashgridtag).jqGrid('showCol', colmodels[index].index);\n else\n $(dashgridtag).jqGrid('hideCol', colmodels[index].index);\n break;\n }\n }\n }\n}", "title": "" }, { "docid": "c3e1afffa1a5bc2c0a5f4641ebd77ace", "score": "0.57660276", "text": "function getColumn(grid, columnIndex){\n return grid.reduce((prev,curr) => {\n return prev.concat(curr[columnIndex-1]);\n },[]);\n}", "title": "" }, { "docid": "4e9708a7b29d0d094f54071f89d6738f", "score": "0.575833", "text": "get treeGridColumns() {\n return treeGridColumns;\n }", "title": "" }, { "docid": "07dca8b3c816da54f158c8d9462125d3", "score": "0.5756723", "text": "getColumns() {\n return this.columns;\n }", "title": "" }, { "docid": "b30fad97051e783c2100e0e882aad721", "score": "0.5754581", "text": "function toggleCols() {\n $( '.line span' ).removeClass( 'hidden' );\n // get active columns that are not disabled\n var cols = []; var i = 0;\n $( '#copy2reddit .dropdown-menu li.active input' ).each(function() {\n cols[i++] = '.' + $(this).val();\n });\n $('.line span:not(.name)').each(function() {\n var $this = $(this);\n if (!$this.is(cols.join(','))) $this.addClass('hidden');\n });\n}", "title": "" }, { "docid": "11f9b63904f50044e36b4f6ea273b43e", "score": "0.57436854", "text": "set visibleColumns(visibleColumns) {\n this._visibleColumns = visibleColumns;\n }", "title": "" }, { "docid": "ccf473cf394281518e2273ab1ce47633", "score": "0.57297623", "text": "function customerGridCols() {\n var gridCols = [{\n dataField: 'name',\n caption: 'Name',\n validationRules: [{\n type: 'required',\n message: 'Name is required'\n }],\n }, {\n dataField: 'phone',\n caption: 'Phone',\n dataType: 'number',\n validationRules: [{\n type: 'required',\n message: 'Phone number is required'\n }]\n }, {\n dataField: 'HHID',\n caption: 'HopHead ID',\n validationRules: [{\n type: 'required',\n message: 'HHID is required'\n }]\n }, {\n dataField: 'dob',\n caption: 'Date of Birth',\n dataType: 'date'\n }, {\n dataField: 'anniversary',\n caption: 'Date of Anniversary',\n dataType: 'date'\n }, {\n dataField: 'email',\n caption: 'Email',\n validationRules: [{\n type: 'email',\n message: 'Please enter valid e-mail address'\n }]\n }, {\n dataField: 'adress',\n caption: 'Address'\n }, {\n dataField: 'city',\n caption: 'City'\n }, {\n dataField: 'state',\n caption: 'State'\n }, {\n dataField: 'zipcode',\n caption: 'ZIP/Pincode',\n editorOptions: {\n mask: '000000'\n }\n }, {\n dataField: 'membersSince',\n caption: 'Member since',\n dataType: 'date',\n validationRules: [{\n type: 'required',\n message: 'Field is required'\n }]\n\n }];\n return gridCols;\n }", "title": "" }, { "docid": "a1737acc33d3aa5ff705f3a00a8fd904", "score": "0.5728901", "text": "function loadColumns() {\n Service.get({table: $scope.model, id: 'new'}).$promise\n .then(function success(data) {\n data = data.toJSON();\n for (var key in data) {\n if (!_.isArray(data[key])) {\n addColumn(key);\n }\n }\n $scope.gridOptions.columnDefs = angular.copy($scope.cols);\n activeGrid = true;\n })\n .catch(function error() {\n $state.go('data.login');\n });\n }", "title": "" }, { "docid": "bdd7f5a6e63b8e01a489380b70b33536", "score": "0.5723916", "text": "function displayColumnThatWasHidden() {\n var $header = $(table.header()[0]);\n var $columns = $(\"th\", $header);\n window.$columns = $columns;\n for (var i = 0; i < $columns.length; i++) {\n if ($columns[i].style.display === \"none\") {\n $columns[i].style.display = \"table-cell\";\n var columnIndex = parseInt(\n $columns[i].getAttribute(\"data-column-index\")\n );\n var trs = document.getElementsByTagName(\"tr\");\n for (var j = 0; j < trs.length; j++) {\n var td = trs[j].children[columnIndex];\n if (td && td.style.display === \"none\")\n td.style.display = \"table-cell\";\n }\n break;\n }\n }\n }", "title": "" }, { "docid": "08270df2c4c7f4a5b31a9230f01be1f9", "score": "0.5712892", "text": "function checkColumns() {\n let firstColumnsResult = isTicTacToe(board[1][0],board[1][1],board[1][2]);\n let secondColumnsResult = isTicTacToe(board[1][0],board[1][1],board[1][2]);\n let thirdColumnsResult = isTicTacToe(board[1][0],board[1][1],board[1][2]);\n if(firstColumnsResult != null){\n \treturn board[0][0];\n }\n else if(secondColumnsResult != null){\n \treturn board[0][1];\n }\n else(thirdColumnsResult != null)\n \treturn board[0][2]\n}", "title": "" }, { "docid": "b11ac21035b0c51916d08cc4ce924c1a", "score": "0.57123214", "text": "get columnGroups() {\n\t\treturn this.nativeElement ? this.nativeElement.columnGroups : undefined;\n\t}", "title": "" }, { "docid": "ebbdda53e2b6be4919a30952a07ade7a", "score": "0.5704416", "text": "get columns() {\n return this._getOption('columns');\n }", "title": "" }, { "docid": "b04e7e2d201a708899369888d675f0c6", "score": "0.5696188", "text": "function Columns() {\n\treturn colNames;\n}", "title": "" }, { "docid": "79d8a8e43e53c86f64182fd0f32e6b0b", "score": "0.56913894", "text": "function getColumnAsArray(grid,columnIndex,offsetFromHead) {\n var colarray = [];\n if(offsetFromHead === undefined) {\n offsetFromHead = 0;\n }\n\n for(var i = 0; i < grid.length ; i++) {\n var value = grid[i][columnIndex];\n if(i >= offsetFromHead) {\n colarray.push(value);\n }\n }\n return colarray;\n}", "title": "" }, { "docid": "36303e8ac8c8420e3970053b8dab95a7", "score": "0.5685976", "text": "function gridfilterGroupColumn(_this) {\r\n var $this = $(_this);\r\n var _dataType = $(_this).data('type');\r\n if ($(_this).is(\":checked\")) {\r\n $(_this).closest('table').find('tbody tr td, thead tr th').each(function (index, val) {\r\n if (_dataType && _dataType.indexOf($(this).data('type')) >= 0) {\r\n $(this).show();\r\n }\r\n });\r\n } else {\r\n $(_this).closest('table').find('tbody tr td, thead tr th').each(function (index, val) {\r\n if (_dataType && _dataType.indexOf($(this).data('type')) >= 0) {\r\n $(this).hide();\r\n }\r\n });\r\n }\r\n}", "title": "" }, { "docid": "119567cc380afca79b8f2a9bd05f4976", "score": "0.567773", "text": "updateColumnsStyling_() {\n const menuElement = this.menu_ ? this.menu_.getElement() : null;\n if (menuElement) {\n menuElement.style.gridTemplateColumns =\n `repeat(${this.columns_}, min-content)`;\n }\n }", "title": "" }, { "docid": "898fd8047812621ef0f90e0e8263c8dd", "score": "0.56759495", "text": "function getColumns(){\r\n\tif(Request['type']*1==1){\r\n\t\treturn [[ \r\n\t {field:'uuid',title:'Id',width:30,align:'center'},\r\n\t {field:'createTime',title:'create time',width:125,align:'center',formatter:formatDateTime},\r\n\t\t {field:'checkTime',title:'check time',width:125,align:'center',formatter:formatDateTime},\r\n\t\t {field:'startTime',title:'start time',width:125,align:'center',formatter:formatDateTime},\r\n\t\t {field:'endTime',title:'end time',width:125,align:'center',formatter:formatDateTime},\r\n\t {field:'createrName',title:'creater',width:100,align:'center'}, \r\n\t {field:'checkerName',title:'checker',width:100,align:'center'},\r\n\t {field:'starterName',title:'starter',width:100,align:'center'}, \r\n\t {field:'enderName',title:'ender',width:100,align:'center'}, \r\n\t {field:'supplierName',title:'supplier',width:100,align:'center'}, \r\n\t {field:'totalMoney',title:'total moeny($)',width:100,align:'center',formatter:function(value,row,rowIndex){\r\n\t \treturn fractionalFormat(value,2);\r\n\t }}, \r\n\t {field:'state',title:'state',width:120,align:'center',formatter:getState},\r\n\t {field:'wayBillsn',title:'wayBillNo',width:90,align:'center'}\r\n\t\t]];\r\n\t}\r\n\tif(Request['type']*1==2){\r\n\t\treturn [[ \r\n\t {field:'uuid',title:'Id',width:30,align:'center'},\r\n\t {field:'createTime',title:'create time',width:125,align:'center',formatter:formatDateTime},\r\n\t\t {field:'endTime',title:'outStore time',width:125,align:'center',formatter:formatDateTime},\r\n\t {field:'createrName',title:'creater',width:100,align:'center'}, \r\n\t {field:'enderName',title:'ender',width:100,align:'center'}, \r\n\t {field:'supplierName',title:'client',width:100,align:'center'}, \r\n\t {field:'totalMoney',title:'total moeny($)',width:100,align:'center',formatter:function(value,row,rowIndex){\r\n\t \treturn fractionalFormat(value,2);\r\n\t }}, \r\n\t {field:'state',title:'state',width:120,align:'center',formatter:getState},\r\n\t {field:'wayBillsn',title:'wayBillNo',width:90,align:'center'}\r\n\t\t]];\r\n\t}\r\n}", "title": "" }, { "docid": "4202328b264c2f023d49da5003adb7d8", "score": "0.5669172", "text": "GetColumnIndex()\n {\n let win = this.getCurrentWindowRead();\n return win.DC.CurrentColumns ? win.DC.CurrentColumns.Current : 0;\n }", "title": "" }, { "docid": "a1af6422803e186a848004836440c297", "score": "0.56576765", "text": "function showHideColumns(checkedCols=[], noncheckedCols=[]) {\n\n // get last column title and remove the dropdown.\n let lastTitle = attrs[lastIndex];\n cols[lastTitle].rows[0].cells[0].removeChild(document.getElementById('dropdown'));\n\n // display these selected columns\n for (let i = 0; i < checkedCols.length; ++i) {\n let colTitle = checkedCols[i],\n els \t\t = document.getElementsByClassName('col_' + checkedCols[i]);\n \n for (let i = 0; i < els.length; ++i) {\n let el = els[i];\n el.style.display = 'inline';\n }\n }\n\n // re-attach the dropdown.\n if (checkedCols.length > 0) {\n lastTitle = checkedCols[checkedCols.length-1];\n for (let i = 0; i < attrs.length; ++i) {\n if (attrs[i] === lastTitle) {\n lastIndex = i;\n break;\n }\n }\n createCheckboxDropdown(attrs, cols[attrs[lastIndex]].rows[0].cells[0]);\n } else {\n createCheckboxDropdown(attrs);\n }\n\n // dont display these columns\n for (let i = 0; i < noncheckedCols.length; ++i) {\n let colTitle = noncheckedCols[i],\n els \t\t = document.getElementsByClassName('col_' + noncheckedCols[i]);\n\n for (let i = 0; i < els.length; ++i) {\n let el = els[i];\n el.style.display = 'none';\n }\n }\n}", "title": "" }, { "docid": "debf4b4c244fb9ba0452062f05fbed00", "score": "0.56287545", "text": "function indexColumns () {\n if (indexCache) return indexCache;\n let idx = {}, headers = document.querySelectorAll(\".sc-1b2i4p6-22\");\n headers.forEach((e, i) => {\n switch (e.firstElementChild.firstElementChild.textContent) {\n case \"Likes\":\n idx.likes = i; break;\n case \"Bookmarks\":\n idx.bookmarks = i; break;\n case \"Views\":\n idx.views = i; break;\n case \"Date\":\n idx.date = i; break;\n }\n });\n //Prevent needless processing when observer fires every few lines of scrolling...\n //We invalidate because user can change columns and I cba with that.\n indexCache = {idx, numCols: headers.length, firstIdx: idx[Object.keys(idx)[0]]};\n setTimeout(() => indexCache = undefined, 5000);\n return indexCache;\n }", "title": "" }, { "docid": "7d7adb5476e1896c5f3bdc331765b489", "score": "0.56267595", "text": "function columns(apSearch) {\n var array = apSearch.columns;\n array.push(helper.column('advance').create());\n array.push(helper.column('expensecategory').create());\n //NSCHINA-2429\n //Add location/department/classification filter to CFS collector\n if (runtime.isLocationEnabled()) {\n array.push(helper.column('location').create());\n }\n\n if (runtime.isDepartmentEnabled()) {\n array.push(helper.column('department').create());\n }\n\n //As AP saved search is based on Transaction, the column name has be to align with field id of CLASS (internalid: class) on Transaction record\n if (runtime.isClassesEnabled()) {\n array.push(helper.column('class').create());\n }\n return array;\n }", "title": "" }, { "docid": "aa9dacce6f16910cf8bcd7436144dcec", "score": "0.5618299", "text": "parseColumns(columns){\n\t\tvar definitions = [],\n\t\texcludedKeys = [\"headerContextMenu\", \"headerMenu\", \"contextMenu\", \"clickMenu\"];\n\n\t\tcolumns.forEach((column) => {\n\t\t\tvar defStore = {},\n\t\t\tcolDef = column.getDefinition(),\n\t\t\tkeys;\n\n\t\t\tif(column.isGroup){\n\t\t\t\tdefStore.title = colDef.title;\n\t\t\t\tdefStore.columns = this.parseColumns(column.getColumns());\n\t\t\t}else{\n\t\t\t\tdefStore.field = column.getField();\n\n\t\t\t\tif(this.config.columns === true || this.config.columns == undefined){\n\t\t\t\t\tkeys = Object.keys(colDef);\n\t\t\t\t\tkeys.push(\"width\");\n\t\t\t\t\tkeys.push(\"visible\");\n\t\t\t\t}else{\n\t\t\t\t\tkeys = this.config.columns;\n\t\t\t\t}\n\n\t\t\t\tkeys.forEach((key)=>{\n\t\t\t\t\tswitch(key){\n\t\t\t\t\t\tcase \"width\":\n\t\t\t\t\t\t\tdefStore.width = column.getWidth();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"visible\":\n\t\t\t\t\t\t\tdefStore.visible = column.visible;\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tif(typeof colDef[key] !== \"function\" && excludedKeys.indexOf(key) === -1){\n\t\t\t\t\t\t\t\tdefStore[key] = colDef[key];\n\t\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\tdefinitions.push(defStore);\n\t\t});\n\n\t\treturn definitions;\n\t}", "title": "" }, { "docid": "0375591dfc3e838743dfb014688c5327", "score": "0.56080633", "text": "determineColumnDrawRanges() {\n let startColumn = 0;\n let endColumn = 0;\n let cellWidths = 0;\n let availableWidth = this.currentGraphics.clientSize.width - this.currentBounds.x;\n for (let i = 0; i < this.Grid.columns.count; i++) {\n cellWidths += this.Grid.columns.getColumn(i).width;\n if (cellWidths >= availableWidth) {\n let subWidths = 0;\n for (let j = startColumn; j <= i; j++) {\n subWidths += this.Grid.columns.getColumn(j).width;\n if (subWidths > availableWidth) {\n break;\n }\n endColumn = j;\n }\n this.columnRanges.push([startColumn, endColumn]);\n startColumn = endColumn + 1;\n endColumn = startColumn;\n cellWidths = (endColumn <= i) ? this.Grid.columns.getColumn(i).width : 0;\n }\n }\n // if (startColumn !== this.columns.Count) {\n this.columnRanges.push([startColumn, this.Grid.columns.count - 1]);\n // }\n }", "title": "" }, { "docid": "7b157291336c899a1a993a7e8d8f03c1", "score": "0.55948806", "text": "function hideColumnSelection() {\n\n\tvar v_currTabTag = v_connTabControl.selectedTab.tag.tabControl.selectedTab.tag;\n\n\tvar v_select_right = document.getElementById('sel_columns_right');\n\n\tvar v_first = true;\n\tvar v_column_string = '';\n\n\tfor (var i=0; i < v_select_right.options.length; i++) {\n\t\tif (!v_first)\n\t\t\tv_column_string += ', ';\n\n\t\tv_first = false;\n\t\tv_column_string += v_select_right.options[i].text;\n\n\t}\n\n\tif (v_currTabTag.alterTableObject.window=='constraints') {\n\t\tv_column_string = \"<img src='images/edit_columns.png' class='img_ht' onclick='showColumnSelectionConstraints()'/> \" + v_column_string;\n\t\tv_currTabTag.alterTableObject.htConstraints.setDataAtCell(v_currTabTag.alterTableObject.selectedConstraintRow, 2, v_column_string);\n\t}\n\telse {\n\t\tv_column_string = \"<img src='images/edit_columns.png' class='img_ht' onclick='showColumnSelectionIndexes()'/> \" + v_column_string;\n\t\tv_currTabTag.alterTableObject.htIndexes.setDataAtCell(v_currTabTag.alterTableObject.selectedIndexRow, 2, v_column_string);\n\t}\n\t$('#div_column_selection').hide();\n\n}", "title": "" }, { "docid": "95cecd432b59eacaf41e571de672fc05", "score": "0.5592937", "text": "get columns() {\n return this._columns;\n }", "title": "" }, { "docid": "9025237308e85c6dd424ffa50aab5adc", "score": "0.5587027", "text": "getColumnLayout(){\n\t\treturn this.parseColumns(this.table.columnManager.getColumns());\n\t}", "title": "" }, { "docid": "6afe3225f9b87b5879304c1834c6f045", "score": "0.5586733", "text": "function getCheckedCols() {\n // clear checked Cols\n checkedCols = [] ;\n var inputs = document.getElementsByClassName(\"columnSelector\") ;\n for (var i=0; i<inputs.length;i++) {\n if (inputs[i].checked) {\n checkedCols.push(inputs[i].name) ;\n }\n }\n\n populateData(globalDataObj, checkedCols) ;\n}", "title": "" }, { "docid": "eb061dd3b69cb7eaa04336fd44692ac1", "score": "0.5568968", "text": "get customizeColumns() {\n return this._getOption('customizeColumns');\n }", "title": "" }, { "docid": "cc2d01f7d8638e829a4bb875730cae2b", "score": "0.55636805", "text": "function ExtractColumns(data) {\n if (self.columns().length === 0 || self.queryOnFilterChangeOnly === false) {\n var columns = $.map(data, function (v, i) { return i; });\n self.columns(columns);\n }\n }", "title": "" }, { "docid": "594e87e83e4bf3dca9b90762833ebfbd", "score": "0.5555559", "text": "function initColumnChanging() {\n $('.column-parent').off().on('transitionend', function (a) {\n $(window).trigger('resize');\n $(a.currentTarget).off(a);\n });\n var previousLayout = $('body').data('column-layout');\n var VBdata = window.viewModel.dataSource.data().toJSON();\n \n if ($(this).val() == '1col') {\n $('#main_column_2').closest('.column-parent').hide(0, function () {\n $('#main_column_1').closest('.column-parent').hide(0, function () {\n $('#main_column_0').closest('.column-parent').removeClass('col-sm-4').removeClass('col-sm-8').removeClass('col-sm-6').addClass('col-sm-12');\n \n if (VBdata.length === 2) {\n state.column1Copy = VBdata[1];\n }\n \n if (VBdata.length === 3) {\n state.column1Copy = VBdata[1];\n state.column2Copy = VBdata[2];\n }\n \n VBdata.splice(1, 2);\n VBdata[0].ResponsiveStyle = 0;\n });\n });\n window.viewModel.dataSource.data(VBdata);\n window.viewModel.set('columnLayout', $(this).val()); // update the window.viewModel columnLayout\n } else if ($(this).val() == '2colequal') {\n if (previousLayout === '1col') {\n $('#main_column_0').closest('.column-parent').hide();\n $('#main_column_0').closest('.column-parent').removeClass('col-sm-4 col-sm-8 col-sm-12').addClass('col-sm-6');\n $('#main_column_1').closest('.column-parent').removeClass('col-sm-4 col-sm-8 col-sm-12').addClass('col-sm-6');\n $('#main_column_0').closest('.column-parent').show(0, function () {\n $('#main_column_1').closest('.column-parent').show(0, function () {\n VBdata.splice(1, 0, state.column1Copy);\n VBdata[0].ResponsiveStyle = 1;\n VBdata[1].ResponsiveStyle = 1;\n });\n });\n } else {\n $('#main_column_2').closest('.column-parent').hide(0, function () {\n $('#main_column_0').closest('.column-parent').removeClass('col-sm-4 col-sm-8 col-sm-12').addClass('col-sm-6').show();\n $('#main_column_1').closest('.column-parent').removeClass('col-sm-4 col-sm-8 col-sm-12').addClass('col-sm-6').show(0, function () {\n VBdata[0].ResponsiveStyle = 1;\n VBdata[1].ResponsiveStyle = 1;\n });\n });\n }\n \n if (previousLayout === '3col') {\n state.column2Copy = VBdata[2];\n VBdata.splice(2, 1);\n }\n \n window.viewModel.dataSource.data(VBdata);\n window.viewModel.set('columnLayout', $(this).val()); // update the window.viewModel columnLayout\n } else if ($(this).val() == '2colleft') {\n if (previousLayout === '1col') {\n $('#main_column_0').closest('.column-parent').hide();\n $('#main_column_0').closest('.column-parent').removeClass('col-sm-4 col-sm-6 col-sm-12').addClass('col-sm-8');\n $('#main_column_1').closest('.column-parent').removeClass('col-sm-6 col-sm-8 col-sm-12').addClass('col-sm-4');\n $('#main_column_0').closest('.column-parent').show(0, function () {\n $('#main_column_1').closest('.column-parent').show(0, function () {\n VBdata.splice(1, 0, state.column1Copy);\n VBdata[0].ResponsiveStyle = 2;\n VBdata[1].ResponsiveStyle = 3;\n });\n });\n } else {\n $('#main_column_2').closest('.column-parent').hide(0, function () {\n $('#main_column_0').closest('.column-parent').removeClass('col-sm-4 col-sm-6 col-sm-12').addClass('col-sm-8').show();\n $('#main_column_1').closest('.column-parent').removeClass('col-sm-6 col-sm-8 col-sm-12').addClass('col-sm-4').show(0, function () {\n VBdata[0].ResponsiveStyle = 2;\n VBdata[1].ResponsiveStyle = 3;\n });\n });\n }\n \n if (previousLayout === '3col') {\n state.column2Copy = VBdata[2];\n VBdata.splice(2, 1);\n }\n \n window.viewModel.dataSource.data(VBdata);\n window.viewModel.set('columnLayout', $(this).val()); // update the window.viewModel columnLayout\n } else if ($(this).val() == '2colright') {\n if (previousLayout === '1col') {\n $('#main_column_0').closest('.column-parent').hide();\n $('#main_column_0').closest('.column-parent').removeClass('col-sm-4 col-sm-8 col-sm-12').addClass('col-sm-4');\n $('#main_column_1').closest('.column-parent').removeClass('col-sm-4 col-sm-8 col-sm-12').addClass('col-sm-8');\n $('#main_column_0').closest('.column-parent').show(0, function () {\n $('#main_column_1').closest('.column-parent').show(0, function () {\n VBdata.splice(1, 0, state.column1Copy);\n VBdata[0].ResponsiveStyle = 3;\n VBdata[1].ResponsiveStyle = 2;\n });\n });\n } else {\n $('#main_column_2').closest('.column-parent').hide(0, function () {\n $('#main_column_0').closest('.column-parent').removeClass('col-sm-8 col-sm-6 col-sm-12').addClass('col-sm-4').show();\n $('#main_column_1').closest('.column-parent').removeClass('col-sm-6 col-sm-4 col-sm-12').addClass('col-sm-8').show(0, function () {\n VBdata[0].ResponsiveStyle = 3;\n VBdata[1].ResponsiveStyle = 2;\n });\n });\n }\n \n if (previousLayout === '3col') {\n state.column2Copy = VBdata[2];\n VBdata.splice(2, 1);\n }\n \n window.viewModel.dataSource.data(VBdata);\n window.viewModel.set('columnLayout', $(this).val()); // update the window.viewModel columnLayout\n } else if ($(this).val() == '3col') {\n $('#main_column_0').closest('.column-parent').hide();\n $('#main_column_1').closest('.column-parent').hide();\n $('#main_column_2').closest('.column-parent').hide();\n $('#main_column_0').closest('.column-parent').removeClass('col-sm-8 col-sm-6 col-sm-12').addClass('col-sm-4');\n $('#main_column_1').closest('.column-parent').removeClass('col-sm-8 col-sm-6 col-sm-12').addClass('col-sm-4');\n $('#main_column_2').closest('.column-parent').removeClass('col-sm-8 col-sm-6 col-sm-12').addClass('col-sm-4');\n $('#main_column_0').closest('.column-parent').show(0, function () {\n $('#main_column_1').closest('.column-parent').show();\n $('#main_column_2').closest('.column-parent').show(0, function () {\n if (VBdata.length === 1) {\n VBdata[0].ResponsiveStyle = 3;\n VBdata.splice(1, 0, state.column1Copy);\n VBdata[1].ResponsiveStyle = 3;\n VBdata.splice(2, 0, state.column2Copy);\n VBdata[2].ResponsiveStyle = 3;\n } else if (VBdata.length === 2) {\n VBdata[0].ResponsiveStyle = 3;\n VBdata[1].ResponsiveStyle = 3;\n VBdata.splice(2, 0, state.column2Copy);\n VBdata[2].ResponsiveStyle = 3;\n }\n \n sizeTiles();\n });\n });\n window.viewModel.dataSource.data(VBdata);\n window.viewModel.set('columnLayout', $(this).val()); // update the window.viewModel columnLayout\n }\n \n $('body').data('column-layout', $(this).val());\n $('body').attr('data-column-layout', $(this).val());\n }", "title": "" }, { "docid": "8edcdec756344cd44ce7cdbdd0eac219", "score": "0.5552783", "text": "algoColumns() {\n let canvasWidth = this.canvasWidth -this.ml -this.mr;\n if (!this.columns && this.w) {\n /**\n * calculate columns if only width is known */\n this.columns = canvasWidth / this.w;\n }else if(this.columns && !this.w) {\n /**\n * calculate width if only columns are known */\n this.w = canvasWidth / this.columns;\n }\n let i = 0, dx;\n for (; i <= this.columns; i++) {\n dx = i * (this.w + this.horizgaps) + this.ml;\n this.columnCoords.push(dx);\n if (this.horizgaps) {\n dx += this.horizgaps;\n this.columnCoords.push(dx);\n }\n }\n }", "title": "" }, { "docid": "5a140eb53eff013e1a24216d15eed859", "score": "0.5548385", "text": "get columnFilter() {\r\n return this.columnDef && this.columnDef.filter;\r\n }", "title": "" }, { "docid": "cc76183aab50c474914da5e85f852540", "score": "0.5544322", "text": "function splitColumns() {\n var windowWidth = $(window).width(),\n columnNumber = 1; // default column number\n if (windowWidth > 1200) {\n columnNumber = 4;\n } else if (windowWidth > 767) {\n columnNumber = 3;\n } else if (windowWidth > 600) {\n columnNumber = 2;\n }\n return columnNumber;\n }", "title": "" }, { "docid": "cb6275578f3175ada39f8cb49d44e8e4", "score": "0.5541046", "text": "get columns() {\n return this.#columns;\n }", "title": "" }, { "docid": "e660c3ff660099a37271fd5a59bfc92a", "score": "0.55155027", "text": "getColumns(){\r\n return this.columns;\r\n }", "title": "" }, { "docid": "7ea62b3757aef924ac3b767acfc9cf32", "score": "0.5513299", "text": "columnsToEdit() {\n return this.schema.filter((c)=>c.edit);\n }", "title": "" }, { "docid": "81f790b580c4e2040c7362bbb68b2890", "score": "0.55103964", "text": "function getColumnInfo() {\n\tlastElementInColumn = [];\n\tbottomOfColumns = [];\n\tbottomOfColumns.push(0);\n\tvar columnIndex = 0;\n\t$(\"#giphyDisplay\").children(\".card\").each(function(i) {\n\t\tconsole.log(\"Position of previous element: \" + bottomOfColumns[columnIndex]);\n\t\tconsole.log(\"Position of element: \" + $(this).position().top);\n\t\tif($(this).position().top + $(this).height() > bottomOfColumns[columnIndex]) {\n\t\t\tbottomOfColumns[columnIndex] = $(this).position().top + $(this).height();\n\t\t\tlastElementInColumn[columnIndex] = $(this);\n\t\t} else {\n\t\t\tbottomOfColumns.push(0);\n\t\t\tlastElementInColumn.push($(this));\n\t\t\tcolumnIndex++;\n\t\t}\n\t});\n\t//console.log(lastElementInColumn);\n\t//console.log(bottomOfColumns);\n\tshortestColumnIndex = 0;\n\tfor (var i = 0; i <= columnIndex; i++) {\n\t\tif(bottomOfColumns[i] < bottomOfColumns[shortestColumnIndex]) {\n\t\t\tshortestColumnIndex = i;\n\t\t}\n\t}\n\t//console.log(shortestColumnIndex);\n}", "title": "" }, { "docid": "aa04b81ed14fb8e4f38dab8a56f94243", "score": "0.55062205", "text": "getColumns(){\n return this.columns;\n }", "title": "" }, { "docid": "e5e55303ac01c65ea750fbf0e70a75fd", "score": "0.5504655", "text": "function columns(ref) {\n\t var axis = ref.axis;\n\t var $visualization = ref.$visualization;\n\t var $dataset = ref.$dataset;\n\n\t var columns = [];\n\t // const axisMeta =\n\t if (!$dataset || !$visualization || !axis) { return []; }\n\t $dataset.eachColumn(function (column) {\n\t if (_indexOf($visualization.axes[axis].accepts, column.type()) > -1) {\n\t columns.push({\n\t name: column.name()\n\t });\n\t }\n\t });\n\t return columns;\n\t}", "title": "" }, { "docid": "88cb1659cbce7bbcd4530c9ad7595a95", "score": "0.5490409", "text": "function getColumnBlocks(tableGrid) {\n\t\t\tvar cols = range(0, tableGrid.grid.maxCols);\n\t\t\tvar rows = range(0, tableGrid.grid.maxRows);\n\n\t\t\treturn Tools.map(cols, function(col) {\n\t\t\t\tfunction getBlock() {\n\t\t\t\t\tvar details = [];\n\t\t\t\t\tfor (var i = 0; i < rows.length; i++) {\n\t\t\t\t\t\tvar detail = tableGrid.getAt(i, col);\n\t\t\t\t\t\tif (detail && detail.colIndex === col) {\n\t\t\t\t\t\t\tdetails.push(detail);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn details;\n\t\t\t\t}\n\n\t\t\t\tfunction isSingle(detail) {\n\t\t\t\t\treturn detail.colspan === 1;\n\t\t\t\t}\n\n\t\t\t\tfunction getFallback() {\n\t\t\t\t\tvar item;\n\n\t\t\t\t\tfor (var i = 0; i < rows.length; i++) {\n\t\t\t\t\t\titem = tableGrid.getAt(i, col);\n\t\t\t\t\t\tif (item) {\n\t\t\t\t\t\t\treturn item;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\treturn decide(getBlock, isSingle, getFallback);\n\t\t\t});\n\t\t}", "title": "" }, { "docid": "2b44a47e5186e423def48f588959cebc", "score": "0.5489133", "text": "function removeColumnDisplay() {\r\n var Column1 = document.getElementsByClassName(\"columns1\");\r\n var Column2 = document.getElementsByClassName(\"columns2\");\r\n var Column3 = document.getElementsByClassName(\"columns3\");\r\n if (btnColumnCounter == 1) {\r\n Column1[x].setAttribute(\"style\", \"display: none;\");\r\n btnColumnCounter -= 1;\r\n columnCounter -= 1;\r\n } else if (btnColumnCounter == 2) {\r\n Column2[x].setAttribute(\"style\", \"display: none;\");\r\n btnColumnCounter -= 1;\r\n } else if (btnColumnCounter == 3) {\r\n Column3[x].setAttribute(\"style\", \"display: none;\");\r\n btnColumnCounter -= 1;\r\n } else {\r\n }\r\n}", "title": "" }, { "docid": "bca37ac52785467dc2f7f98eaf2b280f", "score": "0.54857284", "text": "function hideButtons() {\r\n var getButtons = document.getElementsByClassName(\"columnButtons\")[x];\r\n getButtons.setAttribute(\"style\", \"display: none\");\r\n btnColumnCounter = 0;\r\n columnCounter = 0;\r\n nameCounter = 0;\r\n}", "title": "" }, { "docid": "c4c883c29fcd9ae9f53a832dbc2babaf", "score": "0.5484295", "text": "function processColumns(columnModel)\n {\n var columns;\n if (ko.isObservable(columnModel))\n {\n columns = ko.toJS(columnModel);\n }\n else\n {\n columns = columnModel;\n }\n\n // Iterate each column and if no render method defined\n // attach default render method to protect against null values\n // If there is a checkbox column then add the checkbox code\n for (var i = 0; i < columns.length; i++)\n {\n column = columns[i];\n\n if (column.mRender == undefined)\n {\n ko.utils.extend(column, getColumnOptions());\n }\n }\n return columns;\n }", "title": "" }, { "docid": "160d60710432bac681a954a44d931f31", "score": "0.54720485", "text": "setColumnProperties(gridColumns, pdfGrid, helper, gObj, allowHorizontalOverflow) {\n let startIndex = gObj.groupSettings.columns.length;\n for (let i = 0; i < startIndex; i++) {\n pdfGrid.columns.getColumn(i).width = 20;\n }\n for (let i = 0; i < gridColumns.length; i++) {\n if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"isNullOrUndefined\"])(gridColumns[i].textAlign)) {\n pdfGrid.columns.getColumn(i + startIndex).format = this.getHorizontalAlignment(gridColumns[i].textAlign);\n }\n // Need to add width consideration with % value\n if (pdfGrid.style.allowHorizontalOverflow && !Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"isNullOrUndefined\"])(gridColumns[i].width) && allowHorizontalOverflow) {\n pdfGrid.columns.getColumn(i + startIndex).width = typeof gridColumns[i].width === 'number' ?\n gridColumns[i].width * 0.75 : helper.getConvertedWidth(gridColumns[i].width) * 0.75;\n }\n }\n }", "title": "" }, { "docid": "29d85d1537554c133bee7c20ba60a1bc", "score": "0.54643846", "text": "function initColumns() {\n /// Positive, abbreviation (symbol)\n var pos = gettextCatalog.getString('+');\n /// Percentage, abbreviation (symbol)\n var percentage = gettextCatalog.getString('%');\n var columns = [\n {name: 'Venue', displayName: gettextCatalog.getString('Venue'), field: 'venue', width: '**', minWidth: '200'},\n {name: 'Gender', displayName: gettextCatalog.getString('Gender'), field: 'gender', width:'**', maxWidth: '130'}\n ];\n\n angular.forEach(ttiBloodTests, function(ttiBloodTest) {\n columns.push(\n {name: ttiBloodTest.testName, displayName: ttiBloodTest.testName + ' ' + pos, field: ttiBloodTest.testName, width: '**', maxWidth: '80'}\n );\n });\n\n columns = columns.concat([\n {name: 'TotalPos', displayName: gettextCatalog.getString('Total') + ' ' + pos, field: 'totalPos', width: '**', maxWidth: '80'},\n {name: 'Total', displayName: gettextCatalog.getString('Total'), field: 'total', width: '**', maxWidth: '80'},\n {name: 'TTIRate', displayName: gettextCatalog.getString('TTI') + ' ' + percentage, field: 'ttiRate', width: '**', maxWidth: '80'}\n ]);\n\n angular.forEach(ttiBloodTests, function(ttiBloodTest) {\n columns.push(\n {name: ttiBloodTest.testName + 'Rate', displayName: ttiBloodTest.testName + ' ' + percentage, field: ttiBloodTest.testName + 'Rate', width: '**', maxWidth: '80'}\n );\n });\n return columns;\n }", "title": "" }, { "docid": "052d3c2cc195f0d64c29143ab7f394ce", "score": "0.5459986", "text": "function ColumnDisplayHide() {\n $(\"#tabs\").css({ 'display': 'block' });\n $(\"#dvColumnDisplay\").css({ 'display': 'none' });\n}", "title": "" }, { "docid": "7609334c42c6893a130a11fb094c8421", "score": "0.54569525", "text": "get columns() {\n return MobX.toJS(this.viewColumns);\n }", "title": "" }, { "docid": "a0de218b733ffdf6e545b4b6cd94fb48", "score": "0.54444724", "text": "function getColumnsLoading({ latestCallStates }) {\n const result = Object.keys(consts.AGILE_COLUMNS).filter((columnName) => {\n for (let status of consts.AGILE_COLUMNS[columnName]) {\n if (latestCallStates[status].anyLoading) return true;\n }\n return undefined;\n });\n\n return result;\n}", "title": "" }, { "docid": "84bc88ce9aea1b7f201d6ccb2b338751", "score": "0.54384315", "text": "get columnChooser() {\n return this._getOption('columnChooser');\n }", "title": "" }, { "docid": "9c173d55c8bb9a8a766f4b0e516817cd", "score": "0.54372215", "text": "get columnShowingAnimationMode() {\n return this.i.b0;\n }", "title": "" }, { "docid": "7ff32735dc4e87eaa6d0919929515f67", "score": "0.54369116", "text": "function portfolioColumnNumber() {\n\t\t\tif (windowWidth < 768) {\n\t\t\tvar portfolioColumns = 2;\n\t\t}\n\t\telse if (windowWidth >= 768) {\n\t\t\tvar portfolioColumns = 3;\n\t\t}\n\t\treturn portfolioColumns;\n\t}", "title": "" }, { "docid": "734e1e8cfd808a0740bacdaef98ea21f", "score": "0.5436018", "text": "_calculate_column_range(num_columns, invalid_columns) {\n const total_scroll_width = Math.max(1, this._virtual_panel.offsetWidth - this._container_size.width);\n const percent_left = this.scrollLeft / total_scroll_width;\n const max_scroll_column = this._max_scroll_column(num_columns) + 0.5;\n let start_col = Math.floor(max_scroll_column * percent_left);\n const vis_cols = (!invalid_columns && this.table_model.num_columns()) || Math.min(num_columns, Math.ceil(this._container_size.width / 60));\n let end_col = start_col + vis_cols + 1;\n return {start_col, end_col};\n }", "title": "" }, { "docid": "d5f54ec39dc90df129c050d4fd5f5841", "score": "0.5405694", "text": "function _fnVisibleToColumnIndex( oSettings, iMatch )\n\t\t{\n\t\t\tvar iColumn = -1;\n\t\t\t\n\t\t\tfor ( var i=0 ; i<oSettings.aoColumns.length ; i++ )\n\t\t\t{\n\t\t\t\tif ( oSettings.aoColumns[i].bVisible === true )\n\t\t\t\t{\n\t\t\t\t\tiColumn++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( iColumn == iMatch )\n\t\t\t\t{\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn null;\n\t\t}", "title": "" }, { "docid": "d5f54ec39dc90df129c050d4fd5f5841", "score": "0.5405694", "text": "function _fnVisibleToColumnIndex( oSettings, iMatch )\n\t\t{\n\t\t\tvar iColumn = -1;\n\t\t\t\n\t\t\tfor ( var i=0 ; i<oSettings.aoColumns.length ; i++ )\n\t\t\t{\n\t\t\t\tif ( oSettings.aoColumns[i].bVisible === true )\n\t\t\t\t{\n\t\t\t\t\tiColumn++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( iColumn == iMatch )\n\t\t\t\t{\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn null;\n\t\t}", "title": "" }, { "docid": "127c5743d2b9733d58d6b2648e50d034", "score": "0.5405297", "text": "function initColInfo() {\n // get values from fist row if startRow is 1, check columns are writable and get index into row cells\n colInfo = [];\n cells$.each( function( i ) {\n var item,\n cell$ = $( this ),\n col = self._getColumnMetadata( cell$ );\n\n if ( col && columns.indexOf( col.property ) >= 0 && col.elementId && !col.readonly ) {\n item = self.columnItems[col.property].item;\n colInfo.push( {\n index: i,\n item: item,\n value: startRow === 1 ? item.getValue() : value\n } );\n }\n } );\n curRow = startRow;\n nextRow();\n }", "title": "" }, { "docid": "0b4b1ecf8ba6fd19ed201bf6c27bfb96", "score": "0.5397751", "text": "function hide_extra_columns(){\r\n\tvar course_box = document.getElementsByClassName(\"column\");\r\n if(course_box.length>6){\r\n \tfor(var i=6; i<course_box.length; i++){\r\n \tcourse_box[i].style.display = \"none\";\r\n }\r\n }\r\n \r\n}", "title": "" }, { "docid": "b2cab794d25e193e591c594b52516bce", "score": "0.53921926", "text": "function _fnInitFocusableCellsInGrid(){\n if( !_columnsNavigationMode ) {\n var rows = _nBody.getElementsByTagName('tr');\n var rowLength = rows.length;\n var colLength = 0;\n if(rowLength > 0 ) {\n colLength = rows[0].getElementsByTagName('td').length;\n _columnsNavigationMode = Array.apply(null, {length:colLength}).map(Number.call, Number);\n }\n }\n }", "title": "" }, { "docid": "092b5bd7caf783bfca1da88912f694bf", "score": "0.5388863", "text": "function getVisibleFields(mode, formConfig) {\n\tvar visibleFields = null;\n\n\tif (formConfig !== null) {\n\t\t// get visible fields for the current mode\n\t\tswitch (mode) {\n\t\tcase \"view\":\n\t\t\tvisibleFields = formConfig.visibleViewFieldNames;\n\t\t\tbreak;\n\t\tcase \"edit\":\n\t\t\tvisibleFields = formConfig.visibleEditFieldNames;\n\t\t\tbreak;\n\t\tcase \"create\":\n\t\t\tvisibleFields = formConfig.visibleCreateFieldNames;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tvisibleFields = formConfig.visibleViewFieldNames;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif (logger.isLoggingEnabled()) {\n\t\tvar listOfVisibleFields = visibleFields;\n\t\tif (visibleFields !== null) {\n\t\t\tlistOfVisibleFields = \"[\" + visibleFields.join(\",\") + \"]\";\n\t\t}\n\t\tlogger.log(\"Fields configured to be visible for \" + mode + \" mode = \" + listOfVisibleFields);\n\t}\n\n\treturn visibleFields;\n}", "title": "" }, { "docid": "bb2bc6fd4e978766763f22938fa6d6fd", "score": "0.5388761", "text": "getCurrentCols() {\n\t\treturn this.state.cols.toJSON();\n\t}", "title": "" }, { "docid": "37f926f7c0b164497005a243842c8faf", "score": "0.5377321", "text": "getColumns(property) {\n let matched;\n for (const breakpoint of BREAKPOINTS) {\n const matches = matchBreakpoint(window, breakpoint);\n // Grab the value of the property, if it exists and our\n // media query matches we return the value\n const columns = this[property + breakpoint.charAt(0).toUpperCase() + breakpoint.slice(1)];\n if (matches && columns !== undefined) {\n matched = columns;\n }\n }\n // Return the last matched columns since the breakpoints\n // increase in size and we want to return the largest match\n return matched;\n }", "title": "" }, { "docid": "3a44993614c28a7998e0ff3e86d5c97f", "score": "0.5366381", "text": "getOpenColumns() {\n return GAME.board[0].reduce((acc, el, i) => {\n if (el === 0) acc.push(i);\n return acc;\n }, []);\n }", "title": "" }, { "docid": "e27eb95ea09b01f73e3200c1b462a26b", "score": "0.5357823", "text": "function showALL() {\n table.column(0).visible(true);\n table.column(1).visible(true);\n table.column(2).visible(true);\n table.column(3).visible(true);\n}", "title": "" } ]
efe6a2efcd319c62c261a89744618ee4
global $ /global Autodesk
[ { "docid": "eea4e530619b900ffd730c433a36043f", "score": "0.0", "text": "constructor(viewer, options) {\n super(viewer, options);\n this.viewer = viewer;\n\n console.log(MyViewerExtention.ExtensionId + ' Constructor');\n }", "title": "" } ]
[ { "docid": "2ac82eecab7045d9d68115dfc6203bab", "score": "0.5927019", "text": "function NintendoDS() {\n\n}", "title": "" }, { "docid": "a5ff142b506e188b07031ef28b080ce1", "score": "0.58714813", "text": "function dhm_KES(thisObj) \r { \r \r// var af_settings = {\r// // THESE SETTINGS ARE MANDATORY\r// scriptName: \"Keep Em Separated\", //This is the name of your product, best thing to do is to use your global script name variable so they are always in sync\r// scriptVersion: \"2.0\", //just the version number, do not add a v. best thing to do is to use your global script version variable so they are always in sync\r// scriptAuthor: \"Douglas McGinness\", // your author name, this will be used in the copyright on the help UI\r// scriptURL: \"https://aescripts.com/keep-em-separated/\", //enter the script URL here\r// privateNumber: 6133860421981314, // **THIS IS YOUR SCRIPT'S UNIQUE PRIVATE NUMBER** please get this number from the aescripts admin, every product and major version will need a new number\r// productSKU: \"DHKES2-SUL\", // this is the products SKU on the site, ie AESLT-SUL\r// \r// // HELP UI VARIABLES ////////\r// helpText: \"Keep ‘Em Separated is a workflow solution to separating position and scale dimensions in After Effects. \\n KES can work on multiple 2D or 3D layers at a time and is totally non-destructive, meaning it will transfer existing keyframe animation to the separated dimensions, and back again if you choose to rejoin dimensions. \\n For more info please visit aescripts.com/keepemseparated\", //You must include some brief instructions on how the tool works, THIS IS MANDATORY. If you don't use the helpUI function, please include the intructions in your UI somewhere.\r// \r// // THESE SETTINGS ARE ALL OPTIONAL\r// helpButtons: [ //optional, You can include up to 3 buttons at the bottom of the help UI. They are defined in an array, if you are not using the helpUI function you do not need to include this variable\r// // {name: \"Video Tutorial\", url: \"https://youtu.be/j7Q2bhWSmJk\"}, // this object defines the 1st button\r// {\r// name: \"Info\", \r// type: \"button\",\r// onClickFunction: function() {\r// var infoText = File(File($.fileName).path + encodeURI(\"/Keep_em_Separated_Assets/InfoText.txt\"));\r// infoText.open(\"r\");\r// alert(infoText.readln());\r// },\r// },\r// //only define the buttons you want, up to 3 \r// ],\r//\r// ////// TRIAL ///////\r// offerTrial: true, //optional, set to false if you don't want to offer a trial mode, true if you do, defaults to true\r//\r// // BETA MODE SETTINGS // optional, you only need to include these if you are using the beta mode\r// offerBeta: true, //set to true if you are distributing the script as a beta test, set the expiration date below, defaults to false\r// betaStartDate: new Date(\"Mar 9, 2020\"), //Date the beta will start\r// betaExpirationDate: new Date(\"Mar 13, 2020\"), //Date the beta should expire in this format: \"Dec 1, 2017\"\r// betaSupportEmail: \"[email protected]\", //optional, so that beta testers can contact you directly\r// };\r\reval(\"@JSXBIN@[email protected]@MyBbyBn0ABJAnASzLjBjGifjTjFjUjUjJjOjHjTByBWzGiPjCjKjFjDjUCNzKjTjDjSjJjQjUiOjBjNjFDFeRiLjFjFjQhAiFjNhAiTjFjQjBjSjBjUjFjEzNjTjDjSjJjQjUiWjFjSjTjJjPjOEFeDhShOhQzMjTjDjSjJjQjUiBjVjUjIjPjSFFeRiEjPjVjHjMjBjThAiNjDiHjJjOjOjFjTjTzJjTjDjSjJjQjUiViSiMGFehIjIjUjUjQjThahPhPjBjFjTjDjSjJjQjUjThOjDjPjNhPjLjFjFjQhNjFjNhNjTjFjQjBjSjBjUjFjEhPzNjQjSjJjWjBjUjFiOjVjNjCjFjSHFd8kCmUkNlLlWmKhViDzKjQjSjPjEjVjDjUiTiLiVIFeKiEiIiLiFiThShNiTiViMzIjIjFjMjQiUjFjYjUJFe2jcBiLjFjFjQhA2YhAiFjNhAiTjFjQjBjSjBjUjFjEhAjJjThAjBhAjXjPjSjLjGjMjPjXhAjTjPjMjVjUjJjPjOhAjUjPhAjTjFjQjBjSjBjUjJjOjHhAjQjPjTjJjUjJjPjOhAjBjOjEhAjTjDjBjMjFhAjEjJjNjFjOjTjJjPjOjThAjJjOhAiBjGjUjFjShAiFjGjGjFjDjUjThOhAKhAiLiFiThAjDjBjOhAjXjPjSjLhAjPjOhAjNjVjMjUjJjQjMjFhAhSiEhAjPjShAhTiEhAjMjBjZjFjSjThAjBjUhAjBhAjUjJjNjFhAjBjOjEhAjJjThAjUjPjUjBjMjMjZhAjOjPjOhNjEjFjTjUjSjVjDjUjJjWjFhMhAjNjFjBjOjJjOjHhAjJjUhAjXjJjMjMhAjUjSjBjOjTjGjFjShAjFjYjJjTjUjJjOjHhAjLjFjZjGjSjBjNjFhAjBjOjJjNjBjUjJjPjOhAjUjPhAjUjIjFhAjTjFjQjBjSjBjUjFjEhAjEjJjNjFjOjTjJjPjOjThMhAjBjOjEhAjCjBjDjLhAjBjHjBjJjOhAjJjGhAjZjPjVhAjDjIjPjPjTjFhAjUjPhAjSjFjKjPjJjOhAjEjJjNjFjOjTjJjPjOjThOhAKhAiGjPjShAjNjPjSjFhAjJjOjGjPhAjQjMjFjBjTjFhAjWjJjTjJjUhAjBjFjTjDjSjJjQjUjThOjDjPjNhPjLjFjFjQjFjNjTjFjQjBjSjBjUjFjEzLjIjFjMjQiCjVjUjUjPjOjTKARBWCDzEjOjBjNjFLFeEiJjOjGjPzEjUjZjQjFMFeGjCjVjUjUjPjOzPjPjOiDjMjJjDjLiGjVjOjDjUjJjPjONNyBnAMSbyBn0ADJTnASzIjJjOjGjPiUjFjYjUOAEjzEiGjJjMjFPfRBCzBhLQXzEjQjBjUjIRfEjPfRBXzIjGjJjMjFiOjBjNjFSfjzBhETfffEjzJjFjOjDjPjEjFiViSiJUfRBFehGhPiLjFjFjQifjFjNifiTjFjQjBjSjBjUjFjEifiBjTjTjFjUjThPiJjOjGjPiUjFjYjUhOjUjYjUffnnffnftJUnAEXzEjPjQjFjOVfVOfARBFeBjSffJVnAEjzFjBjMjFjSjUWfRBEXzGjSjFjBjEjMjOXfVOfAnfffABO40BiAABAzAYCWfzKjPjGjGjFjSiUjSjJjBjMZFctzJjPjGjGjFjSiCjFjUjBgaFctzNjCjFjUjBiTjUjBjSjUiEjBjUjFgbEjzEiEjBjUjFgcfRBFeLiNjBjShAhZhMhAhShQhShQftzSjCjFjUjBiFjYjQjJjSjBjUjJjPjOiEjBjUjFgdEjgcfRBFeMiNjBjShAhRhThMhAhShQhShQftzQjCjFjUjBiTjVjQjQjPjSjUiFjNjBjJjMgeFeRjEjPjVjHjMjBjTiAjEjPjVjHhOjIjBjVjTnftABB40BiAABAYByB\");\r\r\r \r //@include \"trial_serializaton_generic_v3_mx.jsx\"\r \r var dhmK = new a(af_settings); //remember to use a random variable name\r \r if (dhmK.c()) {\r\r var isKBarRunning = (typeof kbar !== 'undefined');\r\r if (isKBarRunning && kbar.button)\r {\r var version = kbar.version; // '1.1.1'\r\r var button = kbar.button; // Make a local copy of the kbar variable and button.\r\r var id = button.id; // '4d8026d4-956c-4233-8730-3ea2abfaad35'\r var name = button.name; // 'Show off a sample scriptlet'\r var argument = button.argument; // Any string value\r\r switch(button.argument)\r {\r case '1': \r separateKeyframes();\r break;\r\r case '2':\r joinKeyframes();\r break;\r \r case '3':\r separateScale();\r break;\r \r case '4':\r joinScale();\r break;\r\r default:\r separateKeyframes();\r break;\r }\r }\r else\r {\r// var isTrial = dhmK.t();\r// var trialLayerLimit = 2;\r// var numLayers;\r// \r// function buildUI(thisObj) {\r// var winPanel = (thisObj instanceof Panel) ? thisObj : new Window(\"palette\",\"Keep 'Em Separated\",undefined,{resizable:true,closeButton:true});\r// \r// var res = \"group{orientation:'column'},\\\r// groupOne: Group{orientation:'row',\\\r// }\"; \r// var scriptPath = File($.fileName).path;\r// var joinPic= scriptPath + encodeURI(\"/Keep_em_Separated_Assets/JoinedKeyframe.png\");\r// var sepPic= scriptPath + encodeURI(\"/Keep_em_Separated_Assets/SeparatedKeyframe.png\");\r// var infoPic = scriptPath + encodeURI(\"/Keep_em_Separated_Assets/Info.png\");\r// var scalePic = scriptPath + encodeURI(\"/Keep_em_Separated_Assets/ScaleInfo.png\");\r// var wGroup = winPanel.add(\"group\"); \r// wGroup.orientation = \"column\";\r// wGroup.alignment = [\"fill\", \"fill\"];\r// wGroup.alignChildren = [\"fill\", \"fill\"];\r// var radioGroup = wGroup.add(\"panel\", undefined, \"Keep 'Em Separated\"); \r// \r// var posCheck = radioGroup.add(\"radiobutton\", undefined, \"Position\"); \r// var scaleCheck = radioGroup.add(\"radiobutton\", undefined, \"Scale\");\r// \r// posCheck.helpTip = \"Separate Position Dimensions\";\r// scaleCheck.helpTip = \"Separate Scale Dimensions\";\r// radioGroup.orientation = \"row\";\r// radioGroup.alignChildren = [\"fill\", \"fill\"];\r// var scaleButton = radioGroup.add(\"iconbutton\",[0,0,0,0],scalePic, {style: \"toolbutton\"});\r// var myPanel2 = wGroup.add(\"panel\",undefined);\r// var sepButton = myPanel2.add(\"iconbutton\", undefined, sepPic, {style: \"toolbutton\"});\r// sepButton.helpTip = \"Separate Dimensions\";\r// var joinButton = myPanel2.add(\"iconbutton\", undefined, joinPic, {style: \"toolbutton\"}); \r// joinButton.helpTip = \"Join Dimensions\";\r// myPanel2.orientation = \"row\";\r// myPanel2.alignChildren = [\"fill\", \"fill\"];\r// posCheck.value = true;\r// \r// sepButton.onClick = function() {buttonHandlingSep(posCheck,scaleCheck)};\r// joinButton.onClick = function() {buttonHandlingJoin(posCheck,scaleCheck)};\r// \r// scaleButton.onClick = function() {infoText(scriptPath,1)};\r// var groupBottom = wGroup.add(\"group\"); \r// var reference = groupBottom.add('statictext{text:\"by doug haus\", justify:\"right\"}');\r// var infoButton = groupBottom.add(\"iconbutton\",[0,0,20,20],infoPic, {style: \"toolbutton\"});\r// infoButton.onClick = function() {dhmK.helpUI()};\r// winPanel.grp = winPanel.add(res);\r// winPanel.layout.layout(true);\r// \r// return winPanel;\r// }\r// \r// function infoText(scriptPath, value) {\r// if (value == 0) {\r// var infoText = File(scriptPath + encodeURI(\"/Keep_em_Separated_Assets/InfoText.txt\"));\r// infoText.open(\"r\");\r// alert(infoText.readln());\r// } else {\r// var scaleText = File(scriptPath + encodeURI(\"/Keep_em_Separated_Assets/ScaleInfo.txt\"));\r// scaleText.open(\"r\");\r// alert(scaleText.readln());\r// }\r// }\r// function buttonHandlingSep(posCheck,scaleCheck) {\r// \r// if (posCheck.value == true) {\r// separateKeyframes();\r// } else if (scaleCheck.value == true) {\r// separateScale();\r// }\r// }\r//\r// function buttonHandlingJoin(posCheck,scaleCheck) {\r// \r// if (posCheck.value == true) {\r// joinKeyframes();\r// } else if (scaleCheck.value == true) {\r// joinScale();\r// }\r// }\r// var scriptPal = buildUI(thisObj);\r//\r// if(scriptPal != null && scriptPal instanceof Window) {\r// scriptPal.center();\r// \r// scriptPal.show();\r// }\r\reval(\"@JSXBIN@[email protected]@MyBbyBnAEMEbyBn0AhFJFnASzIjXjJjOiQjBjOjFjMBAdCzKjJjOjTjUjBjOjDjFjPjGCVzHjUjIjJjTiPjCjKDfSjzFiQjBjOjFjMEfnnVDfSEjzGiXjJjOjEjPjXFfREFeHjQjBjMjFjUjUjFFeSiLjFjFjQhAhHiFjNhAiTjFjQjBjSjBjUjFjEjzJjVjOjEjFjGjJjOjFjEGfWzGiPjCjKjFjDjUHCzJjSjFjTjJjajBjCjMjFIFctzLjDjMjPjTjFiCjVjUjUjPjOJFctftnftJHnASzDjSjFjTKBnejJjHjSjPjVjQjbjPjSjJjFjOjUjBjUjJjPjOhahHjDjPjMjVjNjOhHjdhMKhAhAhAhAhAhAhAhAhAhAhAhAhAhAhAhAhAhAhAhAjHjSjPjVjQiPjOjFhahAiHjSjPjVjQjbjPjSjJjFjOjUjBjUjJjPjOhahHjSjPjXhHhMKhAhAhAhAhAhAhAhAhAhAhAhAhAhAhAhAhAhAhAhAjdftJKnASzKjTjDjSjJjQjUiQjBjUjILCXzEjQjBjUjIMfEjzEiGjJjMjFNfRBXzIjGjJjMjFiOjBjNjFOfjzBhEPfffnftJLnASzHjKjPjJjOiQjJjDQDCzBhLRVLfCEjzJjFjOjDjPjEjFiViSiJSfRBFehMhPiLjFjFjQifjFjNifiTjFjQjBjSjBjUjFjEifiBjTjTjFjUjThPiKjPjJjOjFjEiLjFjZjGjSjBjNjFhOjQjOjHffnnnftJMnASzGjTjFjQiQjJjDTECRVLfCEjSfRBFehPhPiLjFjFjQifjFjNifiTjFjQjBjSjBjUjFjEifiBjTjTjFjUjThPiTjFjQjBjSjBjUjFjEiLjFjZjGjSjBjNjFhOjQjOjHffnnnftJNnASzHjJjOjGjPiQjJjDUFCRVLfCEjSfRBFehChPiLjFjFjQifjFjNifiTjFjQjBjSjBjUjFjEifiBjTjTjFjUjThPiJjOjGjPhOjQjOjHffnnnftJOnASzIjTjDjBjMjFiQjJjDVGCRVLfCEjSfRBFehHhPiLjFjFjQifjFjNifiTjFjQjBjSjBjUjFjEifiBjTjTjFjUjThPiTjDjBjMjFiJjOjGjPhOjQjOjHffnnnftJPnASzGjXiHjSjPjVjQWHEXzDjBjEjEXfVBfARBFeFjHjSjPjVjQffnftJQnABXzLjPjSjJjFjOjUjBjUjJjPjOYfVWfHneGjDjPjMjVjNjOfJRnABXzJjBjMjJjHjOjNjFjOjUZfVWfHARCFeEjGjJjMjMFeEjGjJjMjMfnfJSnABXzNjBjMjJjHjOiDjIjJjMjEjSjFjOgafVWfHARCFeEjGjJjMjMFeEjGjJjMjMfnfJTnASzKjSjBjEjJjPiHjSjPjVjQgbIEXXfVWfHRDFeFjQjBjOjFjMjGfFeSiLjFjFjQhAhHiFjNhAiTjFjQjBjSjBjUjFjEffnftJVnASzIjQjPjTiDjIjFjDjLgcJEXXfVgbfIRDFeLjSjBjEjJjPjCjVjUjUjPjOjGfFeIiQjPjTjJjUjJjPjOffnftJWnASzKjTjDjBjMjFiDjIjFjDjLgdKEXXfVgbfIRDFeLjSjBjEjJjPjCjVjUjUjPjOjGfFeFiTjDjBjMjFffnftJYnABXzHjIjFjMjQiUjJjQgefVgcfJnegciTjFjQjBjSjBjUjFhAiQjPjTjJjUjJjPjOhAiEjJjNjFjOjTjJjPjOjTfJZnABXgefVgdfKneZiTjFjQjBjSjBjUjFhAiTjDjBjMjFhAiEjJjNjFjOjTjJjPjOjTfJganABXYfVgbfIneDjSjPjXfJgbnABXgafVgbfIARCFeEjGjJjMjMFeEjGjJjMjMfnfJgcnASzLjTjDjBjMjFiCjVjUjUjPjOgfLEXXfVgbfIREFeKjJjDjPjOjCjVjUjUjPjOAREFdAFdAFdAFdAfVVfGWHBzFjTjUjZjMjFhAFeKjUjPjPjMjCjVjUjUjPjOffnftJgdnASzIjNjZiQjBjOjFjMhShBMEXXfVWfHRCFeFjQjBjOjFjMjGfffnftJgenASzJjTjFjQiCjVjUjUjPjOhCNEXXfVhBfMREFeKjJjDjPjOjCjVjUjUjPjOjGfVTfEWHBhAFeKjUjPjPjMjCjVjUjUjPjOffnftJgfnABXgefVhCfNneTiTjFjQjBjSjBjUjFhAiEjJjNjFjOjTjJjPjOjTfJhAnASzKjKjPjJjOiCjVjUjUjPjOhDOEXXfVhBfMREFeKjJjDjPjOjCjVjUjUjPjOjGfVQfDWHBhAFeKjUjPjPjMjCjVjUjUjPjOffnftJhBnABXgefVhDfOnePiKjPjJjOhAiEjJjNjFjOjTjJjPjOjTfJhCnABXYfVhBfMneDjSjPjXfJhDnABXgafVhBfMARCFeEjGjJjMjMFeEjGjJjMjMfnfJhEnABXzFjWjBjMjVjFhEfVgcfJnctfJhGnABXzHjPjOiDjMjJjDjLhFfVhCfNNyBnAMhGbyBn0ABJhGnAEjzRjCjVjUjUjPjOiIjBjOjEjMjJjOjHiTjFjQhGfRCjgcfjgdfff0DzAhHChGnfJhHnABXhFfVhDfONyBnAMhHbyBn0ABJhHnAEjzSjCjVjUjUjPjOiIjBjOjEjMjJjOjHiKjPjJjOhIfRCjgcfjgdfff0DhHChHnfJhJnABXhFfVgffLNyBnAMhJbyBn0ABJhJnAEjzIjJjOjGjPiUjFjYjUhJfRCjLfFdBff0DhHChJnfJhKnASzLjHjSjPjVjQiCjPjUjUjPjNhKPEXXfVWfHRBFeFjHjSjPjVjQffnftJhLnASzJjSjFjGjFjSjFjOjDjFhLQEXXfVhKfPRBFehQjTjUjBjUjJjDjUjFjYjUjbjUjFjYjUhahCjCjZhAjEjPjVjHhAjIjBjVjThChMhAjKjVjTjUjJjGjZhahCjSjJjHjIjUhCjdffnftJhMnASzKjJjOjGjPiCjVjUjUjPjOhMREXXfVhKfPREFeKjJjDjPjOjCjVjUjUjPjOAREFdAFdAFdUFdUfVUfFWHBhAFeKjUjPjPjMjCjVjUjUjPjOffnftJhNnABXhFfVhMfRNyBnAMhNbyBn0ABJhNnAEXzGjIjFjMjQiViJhNfjzEjEjIjNiLhOfnf0DhHChNnfJhOnABXzDjHjSjQhPfVBfAEXXfVBfARBVKfBffnfJhPnAEXzGjMjBjZjPjVjUhQfXhQfVBfARBFctffZhRnAVBf0ATK4B0AiAB40BiAL4C0AiAQ4D0AiAT4E0AiAU4F0AiAV4G0AiAW4H0AiAgb4I0AiAgc4J0AiAgd4K0AiAgf4L0AiAD40BhAhB4M0AiAhC4N0AiAhD4O0AiAhK4P0AiAhL4Q0AiAhM4R0AiABSAzHjCjVjJjMjEiViJhRAhSMhUbyBn0ABOhVbhWn0ADJhWnAShJAEjNfRBCRVLfCEjSfRBFehGhPiLjFjFjQifjFjNifiTjFjQjBjSjBjUjFjEifiBjTjTjFjUjThPiJjOjGjPiUjFjYjUhOjUjYjUffnnffnftJhXnAEXzEjPjQjFjOhSfVhJfARBFeBjSffJhYnAEjzFjBjMjFjSjUhTfRBEXzGjSjFjBjEjMjOhUfVhJfAnfffACzChdhdhVVhEfDnndAbhan0ADJhanASzJjTjDjBjMjFiUjFjYjUhWBEjNfRBCRVLfCEjSfRBFehHhPiLjFjFjQifjFjNifiTjFjQjBjSjBjUjFjEifiBjTjTjFjUjThPiTjDjBjMjFiJjOjGjPhOjUjYjUffnnffnftJhbnAEXhSfVhWfBRBFeBjSffJhcnAEjhTfRBEXhUfVhWfBnfffAEhW4B0AiAhE4B0AhAL40BhAhJ40BiACCAhJAheMhfbyBn0ABOiBbyiCn0ABJiCnAEjzRjTjFjQjBjSjBjUjFiLjFjZjGjSjBjNjFjThXfnfAChVXhEfVgcfAnnctOiDbyiEn0ABJiEnAEjzNjTjFjQjBjSjBjUjFiTjDjBjMjFhYfnfAChVXhEfVgdfBnnctnACgc40BhAgd4B0AhAC0AhGAiGMiIbyBn0ABOiKbyiLn0ABJiLnAEjzNjKjPjJjOiLjFjZjGjSjBjNjFjThZfnfAChVXhEfVgcfAnnctOiMbyiNn0ABJiNnAEjzJjKjPjJjOiTjDjBjMjFhafnfAChVXhEfVgdfBnnctnACgc40BhAgd4B0AhAC0AhIAiPEJAnASzHjJjTiUjSjJjBjMhbyBEXzBjUhcfjhOfnfnftJBnASzPjUjSjJjBjMiMjBjZjFjSiMjJjNjJjUhdyBndCftJiQnASzJjTjDjSjJjQjUiQjBjMheyBEjhRfRBjDfffnftOiSbiTn0ACJiTnAEXzGjDjFjOjUjFjShffVhefyBnfJiVnAEXzEjTjIjPjXiAfVhefyBnfAUzChGhGiBCzChBhdiCVhefyBnnbCCVhefyBjFfnnnnnAEhe4D0AiAhb40BiAhd4B0AiAzJjOjVjNiMjBjZjFjSjTiD4C0AiAAEAhHByB\");\r\r\r\r \r }\r } \r\r // function separateKeyframes() {\r// app.beginUndoGroup(\"Separate Position Dimensions\");\r// function getKeyframes(PropertyVal){\r// if(PropertyVal instanceof Property){\r// var totalKeys, keyIndexList, IndexKey, ValueKey, keyInType, keyOutType, AutoBez, ContBez, inEase, OutEase, sAutoBez, sContBez, inSpaTang, OutSpaTang, Rover, twoDim, threeDim;\r// twoDim = PropertyValueType.TwoD_SPATIAL;\r// threeDim = PropertyValueType.ThreeD_SPATIAL;\r// keyIndexList = [];\r// isTrial = (!dhmK.s());\r// totalKeys = PropertyVal.numKeys; \r// if(totalKeys > 0){\r// for(var i = 1; i <= totalKeys; i++) {\r// keyTimeVar = PropertyVal.keyTime(i);\r// IndexKey = i;\r// ValueKey = PropertyVal.keyValue(i);\r// keyInType = PropertyVal.keyInInterpolationType(IndexKey);\r// keyOutType = PropertyVal.keyOutInterpolationType(IndexKey); \r// if(keyInType == KeyframeInterpolationType.BEZIER && keyOutType == KeyframeInterpolationType.BEZIER){\r// AutoBez = PropertyVal.keyTemporalAutoBezier(IndexKey);\r// ContBez = PropertyVal.keyTemporalContinuous(IndexKey);\r// } \r// if(keyInType != KeyframeInterpolationType.HOLD || keyOutType != KeyframeInterpolationType.HOLD){\r// inEase = PropertyVal.keyInTemporalEase(IndexKey);\r// OutEase = PropertyVal.keyOutTemporalEase(IndexKey);\r// } \r// if(PropertyVal.propertyValueType == twoDim || PropertyVal.propertyValueType == threeDim){\r// sAutoBez = PropertyVal.keySpatialAutoBezier(IndexKey);\r// sContBez = PropertyVal.keySpatialContinuous(IndexKey);\r// inSpaTang = PropertyVal.keyInSpatialTangent(IndexKey);\r// OutSpaTang = PropertyVal.keyOutSpatialTangent(IndexKey);\r// Rover = PropertyVal.keyRoving(IndexKey);\r// }\r// keyIndexList[keyIndexList.length] = {\r// 'keyTimeVar':keyTimeVar, \r// 'IndexKey':IndexKey, \r// 'ValueKeyX':ValueKey[0], \r// 'ValueKeyY':ValueKey[1],\r// 'ValueKeyZ':ValueKey[2],\r// 'ValueKey':ValueKey,\r// 'keyInType':keyInType, \r// 'keyOutType':keyOutType, \r// 'AutoBez':AutoBez, \r// 'ContBez':ContBez, \r// 'inEase':inEase, \r// 'OutEase':OutEase, \r// 'sAutoBez':sAutoBez, \r// 'sContBez':sContBez, \r// 'inSpaTang':inSpaTang, \r// 'OutSpaTang':OutSpaTang, \r// 'Rover':Rover\r// };\r// } \r// return keyIndexList;\r// }else{ \r// return null;\r// }\r// }\r// }\r//\r// function pasteKeyframes(PropertyVal, KeyArray,num){\r// var XorYVal = num;\r// if(PropertyVal instanceof Property && KeyArray instanceof Array){\r// if(PropertyVal.numKeys == 0){ \r// var KeyArrayLength, addNewKey, newKeyIndex; \r// KeyArrayLength = KeyArray.length; \r// for(var k = 0; k < KeyArrayLength; k++){ \r// addNewKey = PropertyVal.addKey(KeyArray[k].keyTimeVar); \r// newKeyIndex = addNewKey; \r// if (XorYVal == 0) {\r// PropertyVal.setValueAtKey(newKeyIndex, KeyArray[k].ValueKeyX);\r// } else if (XorYVal == 1){\r// PropertyVal.setValueAtKey(newKeyIndex, KeyArray[k].ValueKeyY);\r// } else {\r// PropertyVal.setValueAtKey(newKeyIndex, KeyArray[k].ValueKeyZ);\r// } \r// if(KeyArray[k].keyOutType != KeyframeInterpolationType.HOLD){\r// PropertyVal.setTemporalEaseAtKey(newKeyIndex, KeyArray[k].inEase, KeyArray[k].OutEase);\r// } \r// PropertyVal.setInterpolationTypeAtKey(newKeyIndex, KeyArray[k].keyInType, KeyArray[k].keyOutType); \r// if((KeyArray[k].keyInType == KeyframeInterpolationType.BEZIER) && (KeyArray[k].keyOutType == KeyframeInterpolationType.BEZIER)){\r// PropertyVal.setTemporalContinuousAtKey(newKeyIndex, KeyArray[k].ContBez);\r// PropertyVal.setTemporalAutoBezierAtKey(newKeyIndex, KeyArray[k].AutoBez);\r// }\r// \r// if((PropertyVal.propertyValueType == PropertyValueType.TwoD_SPATIAL) || (PropertyVal.propertyValueType == PropertyValueType.ThreeD_SPATIAL)){\r// PropertyVal.setSpatialContinuousAtKey(newKeyIndex, KeyArray[k].sContBez);\r// PropertyVal.setSpatialAutoBezierAtKey(newKeyIndex, KeyArray[k].sAutoBez);\r// PropertyVal.setSpatialTangentsAtKey(newKeyIndex, KeyArray[k].inSpaTang, KeyArray[k].OutSpaTang);\r// }\r// } \r// if((PropertyVal.propertyValueType == PropertyValueType.TwoD_SPATIAL) || (PropertyVal.propertyValueType == PropertyValueType.ThreeD_SPATIAL)){\r// for(var r = 0; r < KeyArrayLength; r++){\r// PropertyVal.setRovingAtKey((r+1), KeyArray[r].Rover);\r// }\r// }\r// return true;\r// }\r// }\r// }\r// function deleteKeyframes(PropertyVal){\r// if(PropertyVal instanceof Property){\r// while(PropertyVal.numKeys > 0){\r// PropertyVal.removeKey(1);\r// }\r// }\r// }\r// var compLayer = app.project.activeItem;\r// var activeLayer = compLayer.selectedLayers;\r// if (activeLayer == null) {\r// alert(\"Please select a layer\");\r// } else {\r// if (isTrial && app.project.activeItem.selectedLayers.length > trialLayerLimit) {\r// alert(\"The trial version is limited to \"+trialLayerLimit+\" layers at a time/nOnly the first \"+trialLayerLimit+\" layers will be separated\");\r// numLayers = trialLayerLimit;\r// } else {\r// numLayers = app.project.activeItem.selectedLayers.length;\r// }\r// for (var i=0; i<numLayers; i++) {\r// if (activeLayer[i].property(\"ADBE Transform Group\").property(\"ADBE Position\").dimensionsSeparated == true) {\r// alert(\"Position dimensions are already separated\");\r// } else {\r// if (activeLayer[i].property(\"ADBE Transform Group\").property(\"ADBE Position\").numKeys==0){\r// activeLayer[i].property(\"ADBE Transform Group\").property(\"ADBE Position\").dimensionsSeparated = true;\r// } else {\r// var xKey,yKey,zKey;\r// var oldKeys = getKeyframes (activeLayer[i].property(\"ADBE Transform Group\").property(\"ADBE Position\"));\r// if (activeLayer[i].threeDLayer == false) {\r// activeLayer[i].property(\"ADBE Transform Group\").property(\"ADBE Position\").dimensionsSeparated = true;\r// \r// xKey = activeLayer[i].property(\"ADBE Transform Group\").property(\"ADBE Position\").getSeparationFollower(0);\r// yKey = activeLayer[i].property(\"ADBE Transform Group\").property(\"ADBE Position\").getSeparationFollower(1);\r// deleteKeyframes(xKey);\r// deleteKeyframes(yKey);\r// pasteKeyframes (xKey, oldKeys,0);\r// pasteKeyframes(yKey, oldKeys,1);\r// } else if (activeLayer[i].threeDLayer == true) {\r// activeLayer[i].property(\"ADBE Transform Group\").property(\"ADBE Position\").dimensionsSeparated = true;\r// \r// xKey = activeLayer[i].property(\"ADBE Transform Group\").property(\"ADBE Position\").getSeparationFollower(0);\r// yKey = activeLayer[i].property(\"ADBE Transform Group\").property(\"ADBE Position\").getSeparationFollower(1);\r// zKey = activeLayer[i].property(\"ADBE Transform Group\").property(\"ADBE Position\").getSeparationFollower(2);\r// deleteKeyframes(xKey);\r// deleteKeyframes(yKey);\r// deleteKeyframes(zKey);\r// pasteKeyframes (xKey, oldKeys,0);\r// pasteKeyframes(yKey, oldKeys,1);\r// pasteKeyframes(zKey,oldKeys,2);\r// }\r// }\r// }\r// } \r//\r// }\r// \r// app.endUndoGroup();\r// }\r\reval(\"@JSXBIN@[email protected]@MyBbyBnABMAbyBnADMCbyBn0ABODbEn0AGJFnASzGjUjXjPiEjJjNBPXzMiUjXjPiEifiTiQiBiUiJiBiMCfjzRiQjSjPjQjFjSjUjZiWjBjMjVjFiUjZjQjFDfnffJGnASzIjUjIjSjFjFiEjJjNEQXzOiUjIjSjFjFiEifiTiQiBiUiJiBiMFfjDfnffJHnASzMjLjFjZiJjOjEjFjYiMjJjTjUGBAnnffJInABjzHjJjTiUjSjJjBjMHfhzBhBIEXzBjTJfjzEjEjIjNiLKfnfnfJJnASzJjUjPjUjBjMiLjFjZjTLAXzHjOjVjNiLjFjZjTMfVzLiQjSjPjQjFjSjUjZiWjBjMNfSnffOKbLn0ACaLbMn0AJJMnABjzKjLjFjZiUjJjNjFiWjBjSOfEXzHjLjFjZiUjJjNjFPfVNfSRBVzBjJQfRffnfJNnASzIiJjOjEjFjYiLjFjZRCVQfRnffJOnASzIiWjBjMjVjFiLjFjZSDEXzIjLjFjZiWjBjMjVjFTfVNfSRBVQfRffnffJPnASzJjLjFjZiJjOiUjZjQjFUEEXzWjLjFjZiJjOiJjOjUjFjSjQjPjMjBjUjJjPjOiUjZjQjFVfVNfSRBVRfCffnffJQnASzKjLjFjZiPjVjUiUjZjQjFWFEXzXjLjFjZiPjVjUiJjOjUjFjSjQjPjMjBjUjJjPjOiUjZjQjFXfVNfSRBVRfCffnffORbSn0ACJSnASzHiBjVjUjPiCjFjaYGEXzVjLjFjZiUjFjNjQjPjSjBjMiBjVjUjPiCjFjajJjFjSZfVNfSRBVRfCffnffJTnASzHiDjPjOjUiCjFjagaHEXzVjLjFjZiUjFjNjQjPjSjBjMiDjPjOjUjJjOjVjPjVjTgbfVNfSRBVRfCffnffAUzChGhGgcCzChdhdgdVUfEXzGiCiFiaiJiFiSgefjzZiLjFjZjGjSjBjNjFiJjOjUjFjSjQjPjMjBjUjJjPjOiUjZjQjFgffnnCgdVWfFXgefjgffnnnnnOVbWn0ACJWnASzGjJjOiFjBjTjFhAIEXzRjLjFjZiJjOiUjFjNjQjPjSjBjMiFjBjTjFhBfVNfSRBVRfCffnffJXnASzHiPjVjUiFjBjTjFhCJEXzSjLjFjZiPjVjUiUjFjNjQjPjSjBjMiFjBjTjFhDfVNfSRBVRfCffnffAUzCjcjchECzChBhdhFVUfEXzEiIiPiMiEhGfjgffnnChFVWfFXhGfjgffnnnnnOZbgan0AFJganASzIjTiBjVjUjPiCjFjahHKEXzUjLjFjZiTjQjBjUjJjBjMiBjVjUjPiCjFjajJjFjShIfVNfSRBVRfCffnffJgbnASzIjTiDjPjOjUiCjFjahJLEXzUjLjFjZiTjQjBjUjJjBjMiDjPjOjUjJjOjVjPjVjThKfVNfSRBVRfCffnffJgcnASzJjJjOiTjQjBiUjBjOjHhLMEXzTjLjFjZiJjOiTjQjBjUjJjBjMiUjBjOjHjFjOjUhMfVNfSRBVRfCffnffJgdnASzKiPjVjUiTjQjBiUjBjOjHhNNEXzUjLjFjZiPjVjUiTjQjBjUjJjBjMiUjBjOjHjFjOjUhOfVNfSRBVRfCffnffJgenASzFiSjPjWjFjShPOEXzJjLjFjZiSjPjWjJjOjHhQfVNfSRBVRfCffnffAUhECgdXzRjQjSjPjQjFjSjUjZiWjBjMjVjFiUjZjQjFhRfVNfSVBfPnnCgdXhRfVNfSVEfQnnnnnJhAnABQzAhSfVGfBXzGjMjFjOjHjUjIhTfVGfBWzGiPjCjKjFjDjUhUROjOfRVRfCzJiWjBjMjVjFiLjFjZiYhVXzBhQhWfVSfDzJiWjBjMjVjFiLjFjZiZhXXzBhRhYfVSfDzJiWjBjMjVjFiLjFjZiahZXzBhShafVSfDSVSfDUVUfEWVWfFYVYfGgaVgafHhAVhAfIhCVhCfJhHVhHfKhJVhJfLhLVhLfMhNVhNfNhPVhPfOnfAVQfRBVLfAByBzChchdhbZhUnAVGfBACzBhehcVLfAnndAbyhWn0ABZhWnAFbACzKjJjOjTjUjBjOjDjFjPjGhdVNfSjzIiQjSjPjQjFjSjUjZhefnnnATQ4R0AiAN40BhAL40BiAG4B0AiAR4C0AiAS4D0AiAU4E0AiAW4F0AiAY4G0AiAga4H0AiAhA4I0AiAhC4J0AiAhH4K0AiAhJ4L0AiAhL4M0AiAhN4N0AiAhP4O0AiAB4P0AiAE4Q0AiABSAzMjHjFjUiLjFjZjGjSjBjNjFjThfAhZMhbbyBn0ACJhcnASzHiYjPjSiZiWjBjMiAAVzDjOjVjNiBfInftOhdbyhen0ABOhebhfn0AEJiAnASzOiLjFjZiBjSjSjBjZiMjFjOjHjUjIiCBXhTfVzIiLjFjZiBjSjSjBjZiDfHnffaiBbiCn0AHJiCnASzJjBjEjEiOjFjXiLjFjZiECEXzGjBjEjEiLjFjZiFfVNfGRBXOfQhSfViDfHVzBjLiGfEffnffJiDnASzLjOjFjXiLjFjZiJjOjEjFjYiHDViEfCnffOiEbyiFn0ABJiFnAEXzNjTjFjUiWjBjMjVjFiBjUiLjFjZiIfVNfGRCViHfDXhVfQhSfViDfHViGfEffACgdViAfAnndAOiGbyiHn0ABJiHnAEXiIfVNfGRCViHfDXhXfQhSfViDfHViGfEffACgdViAfAnndBbyiJn0ABJiJnAEXiIfVNfGRCViHfDXhZfQhSfViDfHViGfEffOiLbyiMn0ABJiMnAEXzUjTjFjUiUjFjNjQjPjSjBjMiFjBjTjFiBjUiLjFjZiJfVNfGRDViHfDXhAfQhSfViDfHViGfEXhCfQhSfViDfHViGfEffAChFXWfQhSfViDfHViGfEXhGfjgffnnnJiOnAEXzZjTjFjUiJjOjUjFjSjQjPjMjBjUjJjPjOiUjZjQjFiBjUiLjFjZiKfVNfGRDViHfDXUfQhSfViDfHViGfEXWfQhSfViDfHViGfEffOiPbiQn0ACJiQnAEXzgajTjFjUiUjFjNjQjPjSjBjMiDjPjOjUjJjOjVjPjVjTiBjUiLjFjZiLfVNfGRCViHfDXgafQhSfViDfHViGfEffJiRnAEXzgajTjFjUiUjFjNjQjPjSjBjMiBjVjUjPiCjFjajJjFjSiBjUiLjFjZiMfVNfGRCViHfDXYfQhSfViDfHViGfEffAUgcCgdXUfQhSfViDfHViGfEXgefjgffnnCgdXWfQhSfViDfHViGfEXgefjgffnnnnnOiUbiVn0ADJiVnAEXzZjTjFjUiTjQjBjUjJjBjMiDjPjOjUjJjOjVjPjVjTiBjUiLjFjZiNfVNfGRCViHfDXhJfQhSfViDfHViGfEffJiWnAEXzZjTjFjUiTjQjBjUjJjBjMiBjVjUjPiCjFjajJjFjSiBjUiLjFjZiOfVNfGRCViHfDXhHfQhSfViDfHViGfEffJiXnAEXzXjTjFjUiTjQjBjUjJjBjMiUjBjOjHjFjOjUjTiBjUiLjFjZiPfVNfGRDViHfDXhLfQhSfViDfHViGfEXhNfQhSfViDfHViGfEffAUhECgdXhRfVNfGXCfjDfnnCgdXhRfVNfGXFfjDfnnnnnAViGfEAViCfBByBzBhciQOiabyibn0ABaibbyicn0ABJicnAEXzOjTjFjUiSjPjWjJjOjHiBjUiLjFjZiRfVNfGRCCzBhLiSVzBjSiTfFnndBXhPfQhSfViDfHViTfFffAViTfFAViCfBByBiQAUhECgdXhRfVNfGXCfjDfnnCgdXhRfVNfGXFfjDfnnnnnZifnAFctACgdXMfVNfGnndAnAUgcChdVNfGjhefnnChdViDfHjzFiBjSjSjBjZiUfnnnnnAJN40BhAiD4B0AhAiA40BiAiC4B0AiAiE4C0AiAiH4D0AiAiG4E0AiAiB4C0AhAiT4F0AiADGAzOjQjBjTjUjFiLjFjZjGjSjBjNjFjTiVAjCMjDbyBn0ABOjEbyjFn0ABljFbyjGn0ABJjGnAEXzJjSjFjNjPjWjFiLjFjZiWfVNfARBFdBffAChcXMfVNfAnnd0AChdVNfAjhefnnnABN40BhAB0AzPjEjFjMjFjUjFiLjFjZjGjSjBjNjFjTiXAjJFJBnAEXzOjCjFjHjJjOiVjOjEjPiHjSjPjVjQiYfjzDjBjQjQiZfRBFegciTjFjQjBjSjBjUjFhAiQjPjTjJjUjJjPjOhAiEjJjNjFjOjTjJjPjOjTffJjKnASzJjDjPjNjQiMjBjZjFjSiaAXzKjBjDjUjJjWjFiJjUjFjNibfXzHjQjSjPjKjFjDjUicfjiZfnftJjLnASzLjBjDjUjJjWjFiMjBjZjFjSidBXzOjTjFjMjFjDjUjFjEiMjBjZjFjSjTiefViafAnftOjMbyjNn0ABJjNnAEjzFjBjMjFjSjUiffRBFeViQjMjFjBjTjFhAjTjFjMjFjDjUhAjBhAjMjBjZjFjSffACgdVidfBnnbbjPn0ACOjPbjQn0ACJjQnAEjiffRBCiSCiSCiSCiSnjzPjUjSjJjBjMiMjBjZjFjSiMjJjNjJjUjAfehAiUjIjFhAjUjSjJjBjMhAjWjFjSjTjJjPjOhAjJjThAjMjJjNjJjUjFjEhAjUjPhAnnnehChAjMjBjZjFjSjThAjBjUhAjBhAjUjJjNjFhPjOiPjOjMjZhAjUjIjFhAjGjJjSjTjUhAjjAfnnnneZhAjMjBjZjFjSjThAjXjJjMjMhAjCjFhAjTjFjQjBjSjBjUjFjEffJjRnABjzJjOjVjNiMjBjZjFjSjTjBfjjAfnfAUgcjHfChcXhTfXiefXibfXicfjiZfjjAfnnnnbyjTn0ABJjTnABjjBfXhTfXiefXibfXicfjiZfnfajVbyjWn0ABOjWbyjXn0ABJjXnAEjiffRBFehJiQjPjTjJjUjJjPjOhAjEjJjNjFjOjTjJjPjOjThAjBjSjFhAjBjMjSjFjBjEjZhAjTjFjQjBjSjBjUjFjEffACgdXzTjEjJjNjFjOjTjJjPjOjTiTjFjQjBjSjBjUjFjEjCfEXzIjQjSjPjQjFjSjUjZjDfEXjDfQhSfVidfBVQfCRBFeUiBiEiCiFhAiUjSjBjOjTjGjPjSjNhAiHjSjPjVjQffRBFeNiBiEiCiFhAiQjPjTjJjUjJjPjOffnnctbyjZn0ABOjZbyjan0ABJjanABXjCfEXjDfEXjDfQhSfVidfBVQfCRBFeUiBiEiCiFhAiUjSjBjOjTjGjPjSjNhAiHjSjPjVjQffRBFeNiBiEiCiFhAiQjPjTjJjUjJjPjOffnctfACgdXMfEXjDfEXjDfQhSfVidfBVQfCRBFeUiBiEiCiFhAiUjSjBjOjTjGjPjSjNhAiHjSjPjVjQffRBFeNiBiEiCiFhAiQjPjTjJjUjJjPjOffnndAbjcn0ACJjdnASzHjPjMjEiLjFjZjTjEGEjhffRBEXjDfEXjDfQhSfVidfBVQfCRBFeUiBiEiCiFhAiUjSjBjOjTjGjPjSjNhAiHjSjPjVjQffRBFeNiBiEiCiFhAiQjPjTjJjUjJjPjOffffnftOjebjfn0AHJjfnABXjCfEXjDfEXjDfQhSfVidfBVQfCRBFeUiBiEiCiFhAiUjSjBjOjTjGjPjSjNhAiHjSjPjVjQffRBFeNiBiEiCiFhAiQjPjTjJjUjJjPjOffnctfJkBnASzEjYiLjFjZjFDEXzVjHjFjUiTjFjQjBjSjBjUjJjPjOiGjPjMjMjPjXjFjSjGfEXjDfEXjDfQhSfVidfBVQfCRBFeUiBiEiCiFhAiUjSjBjOjTjGjPjSjNhAiHjSjPjVjQffRBFeNiBiEiCiFhAiQjPjTjJjUjJjPjOffRBFdAffnffJkCnASzEjZiLjFjZjHEEXjGfEXjDfEXjDfQhSfVidfBVQfCRBFeUiBiEiCiFhAiUjSjBjOjTjGjPjSjNhAiHjSjPjVjQffRBFeNiBiEiCiFhAiQjPjTjJjUjJjPjOffRBFdBffnffJkDnAEjiXfRBVjFfDffJkEnAEjiXfRBVjHfEffJkFnAEjiVfRDVjFfDVjEfGFdAffJkGnAEjiVfRDVjHfEVjEfGFdBffACgdXzLjUjIjSjFjFiEiMjBjZjFjSjIfQhSfVidfBVQfCnncfOkHbkIn0AKJkInABXjCfEXjDfEXjDfQhSfVidfBVQfCRBFeUiBiEiCiFhAiUjSjBjOjTjGjPjSjNhAiHjSjPjVjQffRBFeNiBiEiCiFhAiQjPjTjJjUjJjPjOffnctfJkKnASjFDEXjGfEXjDfEXjDfQhSfVidfBVQfCRBFeUiBiEiCiFhAiUjSjBjOjTjGjPjSjNhAiHjSjPjVjQffRBFeNiBiEiCiFhAiQjPjTjJjUjJjPjOffRBFdAffnffJkLnASjHEEXjGfEXjDfEXjDfQhSfVidfBVQfCRBFeUiBiEiCiFhAiUjSjBjOjTjGjPjSjNhAiHjSjPjVjQffRBFeNiBiEiCiFhAiQjPjTjJjUjJjPjOffRBFdBffnffJkMnASzEjaiLjFjZjJFEXjGfEXjDfEXjDfQhSfVidfBVQfCRBFeUiBiEiCiFhAiUjSjBjOjTjGjPjSjNhAiHjSjPjVjQffRBFeNiBiEiCiFhAiQjPjTjJjUjJjPjOffRBFdCffnffJkNnAEjiXfRBVjFfDffJkOnAEjiXfRBVjHfEffJkPnAEjiXfRBVjJfFffJkQnAEjiVfRDVjFfDVjEfGFdAffJkRnAEjiVfRDVjHfEVjEfGFdBffJkSnAEjiVfRDVjJfFVjEfGFdCffACgdXjIfQhSfVidfBVQfCnnctnAVQfCAjjBfByBiQJkanAEXzMjFjOjEiVjOjEjPiHjSjPjVjQjKfjiZfnfAHQ4C0AiAia40BiAid4B0AiAjF4D0AiAjH4E0AiAjJ4F0AiAjE4G0AiAAHAzRjTjFjQjBjSjBjUjFiLjFjZjGjSjBjNjFjTjLAkb0EhSByB\");\r\r\r\r // function joinKeyframes() {\r// app.beginUndoGroup(\"Join Separated Dimensions\");\r// function getKeyframestoJoin(PropertyVal,threeD){\r// if(PropertyVal instanceof Property){\r// var totalKeys, curZkey, keyIndexList, IndexKey, ValueKey, keyInTypeX, keyInTypeY, keyOutTypeX, keyOutTypeY, AutoBez, ContBez, inEase, OutEase, sAutoBez, sContBez, inSpaTang, OutSpaTang, Rover, twoDim, threeDim;\r// twoDim = PropertyValueType.TwoD_SPATIAL;\r// threeDim = PropertyValueType.ThreeD_SPATIAL;\r// keyIndexList = [];\r// var curXkey = PropertyVal.getSeparationFollower(0);\r// var curYkey = PropertyVal.getSeparationFollower(1);\r// if (threeD == true) {\r// curZkey = PropertyVal.getSeparationFollower(2);\r// } \r// if (threeD == false) {\r// if (curXkey.numKeys != curYkey.numKeys) {\r// if (curXkey.numKeys == 0 || curYkey.numKeys == 0) {\r// if (curXkey.numKeys == 0) {\r// evaluateKeys(PropertyVal, 0,0); \r// totalKeys = curYkey.numKeys;\r// } else if (curYkey.numKeys == 0) {\r// evaluateKeys(PropertyVal,1,0); \r// totalKeys = curXkey.numKeys;\r// }\r// } else {\r// totalKeys = fillOutKeys(PropertyVal, false);\r// }\r// } else {\r// totalKeys = Math.max(curXkey.numKeys,curYkey.numKeys);\r// }\r// } else {\r// if (Math.min(curXkey.numKeys,curYkey.numKeys,curZkey.numKeys) != Math.max(curXkey.numKeys,curYkey.numKeys,curZkey.numKeys) ){\r// if (curXkey.numKeys == 0 || curYkey.numKeys == 0 || curZkey.numKeys == 0) {\r// if (curXkey.numKeys == 0) {\r// if (curYkey.numKeys == 0) {\r// evaluateKeys(PropertyVal, 0,2);\r// totalKeys = curZkey.numKeys;\r// } else if (curZkey.numKeys == 0) {\r// evaluateKeys(PropertyVal,0,1);\r// totalKeys = curYkey.numKeys;\r// } else {\r// evaluateKeys(PropertyVal,0,0);\r// totalKeys = Math.max(curZkey.numKeys,curYkey.numKeys);\r// }\r// } else if (curYkey.numKeys == 0) {\r// if (curZkey.numKeys == 0) {\r// evaluateKeys(PropertyVal,0,3);\r// totalKeys = curXkey.numKeys;\r// } else {\r// evaluateKeys(PropertyVal,1,0);\r// totalKeys = Math.max(curXkey.numKeys,curZkey.numKeys);\r// }\r// } else {\r// evaluateKeys(PropertyVal,0,4);\r// totalKeys = Math.max(curXkey.numKeys,curYkey.numKeys);\r// }\r// } else {\r// totalKeys = fillOutKeys(PropertyVal,true);\r// }\r// } else {\r// totalKeys = Math.max(curXkey.numKeys,curYkey.numKeys, curZkey.numKeys);\r// }\r// }\r// if(totalKeys > 0 && PropertyVal.dimensionsSeparated == true){\r// var filledOut = false;\r// for(var i = 1; i <= totalKeys; i++){\r// keyTimeVar = PropertyVal.keyTime(i);\r// var curXtime = curXkey.keyTime(i);\r// var curYtime = curYkey.keyTime(i);\r// if (threeD == true) {\r// var curZtime = curZkey.keyTime(i);\r// }\r// IndexKey = i; \r// if (threeD == false) {\r// if (curXtime != curYtime && filledOut == false) {\r// totalKeys = fillOutKeys(PropertyVal,false);\r// filledOut = true;\r// keyTimeVar = PropertyVal.keyTime(i);\r// } \r// } else {\r// if ((curXtime != curYtime && filledOut == false) || (curXtime != curZtime && filledOut == false) || (curYtime != curZtime && filledOut == false)) {\r// totalKeys = fillOutKeys(PropertyVal,true);\r// filledOut = true;\r// keyTimeVar = PropertyVal.keyTime(i); \r// }\r// }\r// keyInTypeX = curXkey.keyInInterpolationType(IndexKey);\r// keyOutTypeX = curXkey.keyOutInterpolationType(IndexKey); \r// keyInTypeY = curYkey.keyInInterpolationType(IndexKey);\r// keyOutTypeY = curYkey.keyInInterpolationType(IndexKey);\r// ValueKey = PropertyVal.keyValue(i);\r// if(keyInTypeX == KeyframeInterpolationType.BEZIER && keyOutTypeX == KeyframeInterpolationType.BEZIER){\r// AutoBez = curXkey.keyTemporalAutoBezier(IndexKey);\r// ContBez = curXkey.keyTemporalContinuous(IndexKey);\r// } \r// if(keyInTypeY == KeyframeInterpolationType.BEZIER && keyOutTypeY == KeyframeInterpolationType.BEZIER){\r// AutoBez = curYkey.keyTemporalAutoBezier(IndexKey);\r// ContBez = curYkey.keyTemporalContinuous(IndexKey);\r// } \r// if(keyInTypeX != KeyframeInterpolationType.HOLD || keyOutTypeX != KeyframeInterpolationType.HOLD){\r// inEase = curXkey.keyInTemporalEase(IndexKey);\r// OutEase = curXkey.keyOutTemporalEase(IndexKey);\r// } \r// if(keyInTypeY != KeyframeInterpolationType.HOLD || keyOutTypeY != KeyframeInterpolationType.HOLD){\r// inEaseY = curYkey.keyInTemporalEase(IndexKey);\r// OutEaseY = curYkey.keyInTemporalEase(IndexKey);\r// }\r// if(PropertyVal.propertyValueType == twoDim || PropertyVal.propertyValueType == threeDim){\r// sAutoBez = PropertyVal.keySpatialAutoBezier(IndexKey);\r// sContBez = PropertyVal.keySpatialContinuous(IndexKey);\r// inSpaTang = PropertyVal.keyInSpatialTangent(IndexKey);\r// OutSpaTang = PropertyVal.keyOutSpatialTangent(IndexKey);\r// Rover = PropertyVal.keyRoving(IndexKey);\r// } \r// var numbKeys = Math.max(curXkey.numKeys,curYkey.numKeys);\r// keyIndexList[keyIndexList.length] = {\r// 'keyTimeVar':keyTimeVar, \r// 'IndexKey':IndexKey, \r// 'numbKeys':numbKeys,\r// 'ValueKeyX':ValueKey[0], \r// 'ValueKeyY':ValueKey[1],\r// 'ValueKey':ValueKey,\r// 'keyInTypeX':keyInTypeX, \r// 'keyOutTypeX':keyOutTypeX,\r// 'keyInTypeY':keyInTypeY, \r// 'keyOutTypeY':keyOutTypeY,\r// 'AutoBez':AutoBez, \r// 'ContBez':ContBez, \r// 'inEase':inEase, \r// 'OutEase':OutEase, \r// 'inEaseY':inEaseY,\r// 'OutEaseY':OutEaseY,\r// 'sAutoBez':sAutoBez, \r// 'sContBez':sContBez, \r// 'inSpaTang':inSpaTang, \r// 'OutSpaTang':OutSpaTang, \r// 'Rover':Rover\r// };\r// }\r// return keyIndexList;\r// }\r// }else{\r// \r// return null;\r// }\r// }\r// \r//\r//\r// function evaluateKeys(PropertyVal, dimNum1, dimNum2) {\r// var curXVal, curYVal, curZVal, curKeyTime, xKeys, yKeys, zKeys;\r// if (dimNum2 == 0) {\r// if (dimNum1 == 0) {\r// yKeys = PropertyVal.getSeparationFollower(1);\r// for (var x = 1; x <= yKeys.numKeys; x++) {\r// curKeyTime = yKeys.keyTime(x);\r// curXVal = PropertyVal.getSeparationFollower(0).valueAtTime(curKeyTime,false);\r// PropertyVal.getSeparationFollower(0).setValueAtTime(curKeyTime,curXVal); \r// }\r// return PropertyVal.getSeparationFollower(0);\r// } else if (dimNum1 == 1) {\r// xKeys = PropertyVal.getSeparationFollower(0);\r// for (var y = 1; y <= xKeys.numKeys; y++) {\r// curKeyTime = xKeys.keyTime(y);\r// curYVal = PropertyVal.getSeparationFollower(1).valueAtTime(curKeyTime,false);\r// PropertyVal.getSeparationFollower(1).setValueAtTime(curKeyTime,curYVal); \r// }\r// return PropertyVal.getSeparationFollower(1);\r// }\r// } else {\r// if (dimNum2 == 2) {\r// zKeys = PropertyVal.getSeparationFollower(2);\r// for (var za = 1; za <= zKeys.numKeys; za++) {\r// curKeyTime = zKeys.keyTime(za);\r// curXVal = PropertyVal.getSeparationFollower(0).valueAtTime(curKeyTime,false);\r// curYVal = PropertyVal.getSeparationFollower(1).valueAtTime(curKeyTime,false); \r// PropertyVal.getSeparationFollower(0).setValueAtTime(curKeyTime,curXVal);\r// PropertyVal.getSeparationFollower(1).setValueAtTime(curKeyTime,curYVal); \r// }\r// return PropertyVal.getSeparationFollower(2);\r// } else if (dimNum2 == 1) {\r// yKeys = PropertyVal.getSeparationFollower(1);\r// for (var zb = 1; zb <= yKeys.numKeys; zb++) {\r// curKeyTime = yKeys.keyTime(zb);\r// curXVal = PropertyVal.getSeparationFollower(0).valueAtTime(curKeyTime,false);\r// curZVal = PropertyVal.getSeparationFollower(2).valueAtTime(curKeyTime,false);\r// PropertyVal.getSeparationFollower(0).setValueAtTime(curKeyTime,curXVal);\r// PropertyVal.getSeparationFollower(2).setValueAtTime(curKeyTime,curZVal); \r// }\r// return PropertyVal.getSeparationFollower(1);\r// } else if (dimNum2 == 3) {\r// xKeys = PropertyVal.getSeparationFollower(0);\r// for (var zc = 1; zc <= xKeys.numKeys; zc++) {\r// curKeyTime = xKeys.keyTime(zc);\r// curYVal = PropertyVal.getSeparationFollower(1).valueAtTime(curKeyTime,false);\r// curZVal = PropertyVal.getSeparationFollower(2).valueAtTime(curKeyTime,false);\r// PropertyVal.getSeparationFollower(1).setValueAtTime(curKeyTime,curYVal);\r// PropertyVal.getSeparationFollower(2).setValueAtTime(curKeyTime,curZVal); \r// }\r// return PropertyVal.getSeparationFollower(0);\r// } else {\r// xKeys = PropertyVal.getSeparationFollower(0);\r// for (var zd = 1; zd <= xKeys.numKeys; zd++) {\r// curKeyTime = xKeys.keyTime(zd);\r// curZVal = PropertyVal.getSeparationFollower(2).valueAtTime(curKeyTime,false);\r// PropertyVal.getSeparationFollower(2).setValueAtTime(curKeyTime,curZVal); \r// }\r// return PropertyVal.getSeparationFollower(0);\r// }\r// \r// }\r// }\r//\r// Array.prototype.insert = function ( index, item ) {\r// this.splice( index, 0, item );\r// };\r//\r// function fillOutKeys(PropertyVal,threeD) {\r// var totalKeys, curXkey, curYkey, curZkey, IndexKey, newIndex, ValueKey; \r// var xKeys = PropertyVal.getSeparationFollower(0);\r// var yKeys = PropertyVal.getSeparationFollower(1);\r// var zKeys;\r// if (threeD == true) {\r// zKeys = PropertyVal.getSeparationFollower(2);\r// totalKeys = Math.max(xKeys.numKeys, yKeys.numKeys,zKeys.numKeys);\r// var PropertyVal3 = PropertyVal.getSeparationFollower(2);\r// } else {\r// zKeys = null;\r// }\r// var xArray = [], yArray = [], zArray = [];\r// var PropertyVal1 = PropertyVal.getSeparationFollower(0);\r// var PropertyVal2 = PropertyVal.getSeparationFollower(1);\r// totalKeys = Math.max(xKeys.numKeys,yKeys.numKeys);\r// if(totalKeys > 0){ \r// for (var x = 1; x <= xKeys.numKeys; x++) {\r// xArray.push([xKeys.keyValue(x), xKeys.keyTime(x)]);\r// }\r// for (var y = 1; y <= yKeys.numKeys; y++) {\r// yArray.push([yKeys.keyValue(y),yKeys.keyTime(y)]);\r// }\r// if (threeD == true) {\r// for (var z = 1; z <= zKeys.numKeys; z++) {\r// zArray.push([zKeys.keyValue(z),zKeys.keyTime(z)]);\r// }\r// }\r// if (xArray != null && yArray != null) {\r// for (i = 0; i < totalKeys; i++) {\r// var xKeyData = xArray[i];\r// var yKeyData = yArray[i]; \r// var zKeyData;\r// if (threeD == true) {\r// zKeyData = zArray[i];\r// } else {\r// zKeyData = null;\r// }\r// IndexKey = i;\r// var isthereKeyX = false, isthereKeyY = false, isthereKeyZ = false, outofX = false, outofY = false, outofZ = false;\r// try {\r// var trial = xArray.length <= i;\r// \r// typeof xKeyData[1] !== undefined;\r// } catch(err) {\r// outofX = true;\r// }\r// try {\r// var trial = yArray.length <= i;\r// \r// typeof yKeyData[1] !== undefined;\r// } catch(err) {\r// outofY = true;\r// }\r// if (threeD == true) {\r// try {\r// var trial = zArray.length <= i;\r// \r// typeof zKeyData[1] !== undefined;\r// } catch(err) {\r// outofZ = true;\r// }\r// }\r// var newXValue, newYValue, newZValue;\r// if (threeD == false) {\r// if (outofX == true || outofY == true) {\r// if (outofX == true) {\r// keyTimeVar = yKeyData[1];\r// newIndex = i+1;\r// isthereKeyX = false;\r// isthereKeyY = true;\r// newXValue = PropertyVal1.setValueAtTime(yKeyData[1],PropertyVal1.valueAtTime(yKeyData[1], true));\r// curXkey = PropertyVal1.valueAtTime(yKeyData[1], true);\r// xArray.insert(i, [curXkey,yKeyData[1]]);\r// ValueKey = [curXkey, yKeyData[0]];\r// totalKeys = Math.max(PropertyVal1.numKeys,PropertyVal2.numKeys);\r// } else if (outofY == true) {\r// keyTimeVar = xKeyData[1];\r// newIndex = i+1;\r// isthereKeyX = true;\r// isthereKeyY = false;\r// newYValue = PropertyVal2.setValueAtTime(xKeyData[1],PropertyVal2.valueAtTime(xKeyData[1],true)); \r// curYkey = PropertyVal2.valueAtTime(xKeyData[1],true); \r// yArray.insert(i, [curYkey,xKeyData[1]]); \r// totalKeys = Math.max(PropertyVal1.numKeys,PropertyVal2.numKeys); \r// }\r// } else { \r// if (xKeyData[1].toFixed(2) == yKeyData[1].toFixed(2)) { \r// } else if (xKeyData[1].toFixed(2) > yKeyData[1].toFixed(2)) { \r// newIndex = i+1;\r// isthereKeyX = false;\r// isthereKeyY = true;\r// keyTimeVar = yKeyData[1];\r// newXValue = PropertyVal1.setValueAtTime(yKeyData[1],PropertyVal1.valueAtTime(yKeyData[1], true));\r// curXkey = PropertyVal1.valueAtTime(yKeyData[1], true);\r// xArray.insert(i, [curXkey,yKeyData[1]]);\r// totalKeys= Math.max(PropertyVal1.numKeys,PropertyVal2.numKeys); \r// } else if (yKeyData[1].toFixed(2) > xKeyData[1].toFixed(2)) {\r// newIndex = i+1;\r// isthereKeyX = true;\r// isthereKeyY = false;\r// keyTimeVar = xKeyData[1];\r// newYValue = PropertyVal2.setValueAtTime(xKeyData[1],PropertyVal2.valueAtTime(xKeyData[1],true));\r// curYkey = PropertyVal2.valueAtTime(xKeyData[1],true);\r// yArray.insert(i, [curYkey,xKeyData[1]]);\r// totalKeys= Math.max(PropertyVal1.numKeys,PropertyVal2.numKeys);\r// } \r// \r// }\r// } else {\r// if (outofX == true || outofY == true || outofZ == true) {\r// if (outofX == true) {\r// if (outofY == false && outofZ == false) { \r// keyTimeVar = yKeyData[1];\r// newIndex = i+1;\r// isthereKeyX = false;\r// isthereKeyY = true;\r// isthereKeyZ = true; \r// newXValue = PropertyVal1.setValueAtTime(yKeyData[1],PropertyVal1.valueAtTime(yKeyData[1], true));\r// curXkey = PropertyVal1.valueAtTime(yKeyData[1], true); \r// xArray.insert(i, [curXkey,yKeyData[1]]); \r// totalKeys = Math.max(PropertyVal1.numKeys,PropertyVal2.numKeys,PropertyVal3.numKeys);\r// } else if (outofY == true && outofZ == false) { \r// keyTimeVar = zKeyData[1];\r// newIndex = i+1;\r// isthereKeyX = false;\r// isthereKeyY = false;\r// isthereKeyZ = true;\r// newXValue = PropertyVal1.setValueAtTime(zKeyData[1],PropertyVal1.valueAtTime(zKeyData[1],true));\r// newYValue = PropertyVal2.setValueAtTime(zKeyData[1],PropertyVal2.valueAtTime(zKeyData[1],true));\r// curXkey = PropertyVal1.valueAtTime(zKeyData[1], true);\r// curYkey = PropertyVal2.valueAtTime(zKeyData[1], true);\r// xArray.insert(i,[curXkey,zKeyData[1]]);\r// yArray.insert(i,[curYkey,zKeyData[1]]);\r// totalKeys = Math.max(PropertyVal1.numKeys,PropertyVal2.numKeys,PropertyVal3.numKeys);\r// }\r// } else if (outofY == true) {\r// if (outofZ == false) { \r// keyTimeVar = zKeyData[1];\r// newIndex = i+1;\r// isthereKeyX = true;\r// isthereKeyY = false;\r// isthereKeyZ = true; \r// newXValue = PropertyVal1.setValueAtTime(zKeyData[1],PropertyVal1.valueAtTime(zKeyData[1],true));\r// curXkey = PropertyVal1.valueAtTime(zKeyData[1],true);\r// newYValue = PropertyVal2.setValueAtTime(zKeyData[1],PropertyVal2.valueAtTime(zKeyData[1], true));\r// curYkey = PropertyVal2.valueAtTime(zKeyData[1], true); \r// xArray.insert(i,[curXkey,zKeyData[1]]);\r// yArray.insert(i, [curYkey,zKeyData[1]]); \r// totalKeys = Math.max(PropertyVal1.numKeys,PropertyVal2.numKeys,PropertyVal3.numKeys);\r// } else { \r// keyTimeVar = xKeyData[1];\r// newIndex = i+1;\r// isthereKeyX = true;\r// isthereKeyY = false;\r// isthereKeyZ = false;\r// newYValue = PropertyVal2.setValueAtTime(xKeyData[1],PropertyVal2.valueAtTime(xKeyData[1], true));\r// newZValue = PropertyVal3.setValueAtTime(xKeyData[1],PropertyVal3.valueAtTime(xKeyData[1], true));\r// curYkey = PropertyVal2.valueAtTime(xKeyData[1],true);\r// curZkey = PropertyVal3.valueAtTime(xKeyData[1],true);\r// yArray.insert(i,[curYkey,xKeyData[1]]);\r// zArray.insert(i,[curZkey,xKeyData[1]]);\r// totalKeys = Math.max(PropertyVal1.numKeys,PropertyVal2.numKeys,PropertyVal3.numKeys);\r// }\r// } else {\r// \r// keyTimeVar = xKeyData[1];\r// newIndex = i+1;\r// isthereKeyX = true;\r// isthereKeyY = true;\r// isthereKeyZ = false; \r// newZValue = PropertyVal3.setValueAtTime(xKeyData[1],PropertyVal3.valueAtTime(xKeyData[1],true)); \r// curZkey = PropertyVal3.valueAtTime(xKeyData[1],true); \r// zArray.insert(i, [curZkey,xKeyData[1]]); \r// totalKeys = Math.max(PropertyVal1.numKeys,PropertyVal2.numKeys,PropertyVal3.numKeys);\r// } \r// } else {\r// if (xKeyData[1] == yKeyData[1] == zKeyData[1]) { \r// newIndex = i+1; \r// } else { \r// var notNum = false;\r// try {\r// typeof xKeyData[1] != 'undefined'; \r// typeof yKeyData[1] != 'undefined'; \r// typeof zKeyData[1] != 'undefined'; \r// } catch(err) {\r// notNum = true;\r// } \r// var minTime = 0;\r// if (notNum == false) {\r// minTime = Math.min(xKeyData[1], yKeyData[1], zKeyData[1]);\r// } else {\r// if (typeof xKeyData[1] != 'number') {\r// if (typeof yKeyData[1] == 'number') {\r// minTime = zKeyData[1];\r// } else if (typeof zKeyData[1] == 'number') {\r// minTime = yKeyData[1];\r// } else {\r// minTime = Math.min(yKeyData[1],zKeyData[1]);\r// }\r// } else if (typeof yKeyData[1] == 'number') {\r// if (typeof zKeyData[1] == 'number') {\r// minTime = xKeyData[1];\r// } else {\r// minTime = Math.min(xKeyData[1],zKeyData[1]);\r// }\r// } else {\r// minTime = Math.min(xKeyData[1],yKeyData[1]);\r// }\r// } \r// keyTimeVar = minTime;\r// newIndex = i+1;\r// if (xKeyData[1] != minTime) {\r// isthereKeyX = false;\r// var newXValue = PropertyVal1.setValueAtTime(minTime, PropertyVal1.valueAtTime(minTime,true));\r// curXkey = PropertyVal1.valueAtTime(minTime,true);\r// xArray.insert(i,[curXkey,minTime]);\r// }\r// if (yKeyData[1] != minTime) {\r// isthereKeyY = false;\r// var newYValue = PropertyVal2.setValueAtTime(minTime, PropertyVal2.valueAtTime(minTime,true));\r// curYkey = PropertyVal2.valueAtTime(minTime,true);\r// yArray.insert(i,[curYkey,minTime]);\r// }\r// if (zKeyData[1] != minTime) {\r// isthereKeyZ = false;\r// var newZValue = PropertyVal3.setValueAtTime(minTime, PropertyVal3.valueAtTime(minTime,true));\r// curZkey = PropertyVal3.valueAtTime(minTime,true);\r// zArray.insert(i,[curZkey,minTime]);\r// }\r// totalKeys = Math.max(PropertyVal1.numKeys,PropertyVal2.numKeys,PropertyVal3.numKeys); \r// }\r// }\r// }\r// \r// if (outofX == true || outofY == true || outofZ == true) {\r// if (IndexKey != totalKeys) {\r// IndexKey == totalKeys;\r// }\r// }\r// }\r// \r// }\r// }\r// \r// return totalKeys;\r// }\r// \r// \r// function pasteKeyframestoJoin(PropertyVal, KeyArray){\r// if(PropertyVal instanceof Property && KeyArray instanceof Array){\r// if(PropertyVal.numKeys == 0){ \r// var KeyArrayLength, addNewKey, newKeyIndex, newInEase, newOutEase; \r// KeyArrayLength = KeyArray.length;\r// isTrial = (!dhmK.s());\r// for(var k = 0; k < KeyArrayLength; k++){ \r// addNewKey = PropertyVal.addKey(KeyArray[k].keyTimeVar); \r// newKeyIndex = addNewKey; \r// PropertyVal.setValueAtKey(newKeyIndex, KeyArray[k].ValueKey); \r// if(KeyArray[k].keyInTypeX != KeyframeInterpolationType.BEZIER && KeyArray[k].keyInTypeY == KeyframeInterpolationType.BEZIER) {\r// newInEase = KeyArray[k].inEaseY;\r// } else if(KeyArray[k].keyInTypeX == KeyframeInterpolationType.BEZIER && KeyArray[k].keyInTypeY != KeyframeInterpolationType.BEZIER) {\r// newInEase = KeyArray[k].inEase;\r// } else {\r// newInEase = KeyArray[k].inEase;\r// }\r// if(KeyArray[k].keyOutTypeX != KeyframeInterpolationType.BEZIER && KeyArray[k].keyOutTypeY == KeyframeInterpolationType.BEZIER) {\r// newOutEase = KeyArray[k].OutEaseY;\r// } else if(KeyArray[k].keyOutTypeX == KeyframeInterpolationType.BEZIER && KeyArray[k].keyOutTypeY != KeyframeInterpolationType.BEZIER) {\r// newOutEase = KeyArray[k].OutEase;\r// } else {\r// newOutEase = KeyArray[k].OutEase;\r// }\r// if(KeyArray[k].keyOutTypeX != KeyframeInterpolationType.HOLD || KeyArray[k].keyOutTypeY != KeyframeInterpolationType.HOLD){\r// PropertyVal.setTemporalEaseAtKey(newKeyIndex, newInEase, newOutEase);\r// } \r// if(KeyArray[k].keyOutTypeX != KeyframeInterpolationType.BEZIER && KeyArray[k].keyOutTypeY == KeyframeInterpolationType.BEZIER) {\r// PropertyVal.setInterpolationTypeAtKey(newKeyIndex, KeyArray[k].keyInTypeY, KeyArray[k].keyOutTypeY); \r// } else {\r// PropertyVal.setInterpolationTypeAtKey(newKeyIndex, KeyArray[k].keyInTypeX, KeyArray[k].keyOutTypeX); \r// } \r// if((KeyArray[k].keyInTypeX == KeyframeInterpolationType.BEZIER) && (KeyArray[k].keyOutTypeX == KeyframeInterpolationType.BEZIER)){\r// PropertyVal.setTemporalContinuousAtKey(newKeyIndex, KeyArray[k].ContBez);\r// PropertyVal.setTemporalAutoBezierAtKey(newKeyIndex, KeyArray[k].AutoBez);\r// } \r// if((KeyArray[k].keyInTypeY == KeyframeInterpolationType.BEZIER) && (KeyArray[k].keyOutTypeY == KeyframeInterpolationType.BEZIER)){\r// PropertyVal.setTemporalContinuousAtKey(newKeyIndex, KeyArray[k].ContBez);\r// PropertyVal.setTemporalAutoBezierAtKey(newKeyIndex, KeyArray[k].AutoBez);\r// } \r// if((PropertyVal.propertyValueType == PropertyValueType.TwoD_SPATIAL) || (PropertyVal.propertyValueType == PropertyValueType.ThreeD_SPATIAL)){\r// PropertyVal.setSpatialContinuousAtKey(newKeyIndex, KeyArray[k].sContBez);\r// PropertyVal.setSpatialAutoBezierAtKey(newKeyIndex, KeyArray[k].sAutoBez);\r// PropertyVal.setSpatialTangentsAtKey(newKeyIndex, KeyArray[k].inSpaTang, KeyArray[k].OutSpaTang);\r// }\r// } \r// if((PropertyVal.propertyValueType == PropertyValueType.TwoD_SPATIAL) || (PropertyVal.propertyValueType == PropertyValueType.ThreeD_SPATIAL)){\r// for(var r = 1; r < KeyArrayLength; r++){\r// PropertyVal.setRovingAtKey((r), KeyArray[r].Rover);\r// }\r// }\r// return true;\r// }\r// }\r// \r// }\r//\r// function deleteKeyframes(PropertyVal){\r// if(PropertyVal instanceof Property){\r// while(PropertyVal.numKeys > 0){\r// PropertyVal.removeKey(1);\r// }\r// }\r// }\r// var compLayer = app.project.activeItem;\r// var activeLayer = compLayer.selectedLayers;\r// if (activeLayer == null) {\r// alert(\"Please select a layer\");\r// } else {\r// if (isTrial) {\r// alert(\"Joining keyframes is not supported in trial mode.\\nPlease purchase a license to use full functionality\");\r// } else {\r// for (var i=0; i<activeLayer.length; i++) { \r// var curLayer = activeLayer[i];\r// var oldKeys;\r// if (curLayer.property(\"ADBE Transform Group\").property(\"ADBE Position\").dimensionsSeparated == false) {\r// alert(\"Position dimensions haven't been separated\");\r// } else {\r// if (curLayer.property(\"ADBE Transform Group\").property(\"ADBE Position\").numKeys==0 && curLayer.property(\"ADBE Transform Group\").property(\"ADBE Position\").dimensionsSeparated == true) {\r// curLayer.property(\"ADBE Transform Group\").property(\"ADBE Position\").dimensionsSeparated = false; \r// } else if (curLayer.property(\"ADBE Transform Group\").property(\"ADBE Position\").dimensionsSeparated == true) {\r// if (curLayer.threeDLayer == true) {\r// oldKeys = getKeyframestoJoin (curLayer.property(\"ADBE Transform Group\").property(\"ADBE Position\"),true);\r// } else {\r// oldKeys = getKeyframestoJoin (curLayer.property(\"ADBE Transform Group\").property(\"ADBE Position\"),false);\r// }\r// curLayer.property(\"ADBE Transform Group\").property(\"ADBE Position\").dimensionsSeparated = false;\r// deleteKeyframes(curLayer.property(\"ADBE Transform Group\").property(\"ADBE Position\"));\r// pasteKeyframestoJoin(curLayer.property(\"ADBE Transform Group\").property(\"ADBE Position\"),oldKeys);\r// }\r//\r// }\r// }\r// }\r// }\r//\r// app.endUndoGroup();\r//\r// }\r//\r\reval(\"@JSXBIN@[email protected]@MyBbyBnABMAbyBnAFMCbyBn0ABODbEn0AIJFnASzGjUjXjPiEjJjNBSXzMiUjXjPiEifiTiQiBiUiJiBiMCfjzRiQjSjPjQjFjSjUjZiWjBjMjVjFiUjZjQjFDfnffJGnASzIjUjIjSjFjFiEjJjNETXzOiUjIjSjFjFiEifiTiQiBiUiJiBiMFfjDfnffJHnASzMjLjFjZiJjOjEjFjYiMjJjTjUGCAnnffJInASzHjDjVjSiYjLjFjZHUEXzVjHjFjUiTjFjQjBjSjBjUjJjPjOiGjPjMjMjPjXjFjSIfVzLiQjSjPjQjFjSjUjZiWjBjMJfgcRBFdAffnftJJnASzHjDjVjSiZjLjFjZKVEXIfVJfgcRBFdBffnftOKbyLn0ABJLnASzHjDjVjSiajLjFjZLBEXIfVJfgcRBFdCffnffACzChdhdMVzGjUjIjSjFjFiENfgdnnctnONbyOn0ABOObyPn0ABOPbyQn0ABOQbRn0ACJRnAEjzMjFjWjBjMjVjBjUjFiLjFjZjTOfRDVJfgcFdAFdAffJSnASzJjUjPjUjBjMiLjFjZjTPAXzHjOjVjNiLjFjZjTQfVKfVnffACMXQfVHfUnndAOTbUn0ACJUnAEjOfRDVJfgcFdBFdAffJVnASPAXQfVHfUnffACMXQfVKfVnndAnAUzCjcjcRCMXQfVHfUnndACMXQfVKfVnndAnnbyYn0ABJYnASPAEjzLjGjJjMjMiPjVjUiLjFjZjTSfRCVJfgcFcfffnffACzChBhdTXQfVHfUXQfVKfVnnbygbn0ABJgbnASPAEXzDjNjBjYUfjzEiNjBjUjIVfRCXQfVHfUXQfVKfVffnffACMVNfgdnncfbygen0ABOgebygfn0ABOgfbyhAn0ABOhAbyhBn0ABOhBbhCn0ACJhCnAEjOfRDVJfgcFdAFdCffJhDnASPAXQfVLfBnffACMXQfVKfVnndAOhEbhFn0ACJhFnAEjOfRDVJfgcFdAFdBffJhGnASPAXQfVKfVnffACMXQfVLfBnndAbhIn0ACJhInAEjOfRDVJfgcFdAFdAffJhJnASPAEXUfjVfRCXQfVLfBXQfVKfVffnffACMXQfVHfUnndAOhLbyhMn0ABOhMbhNn0ACJhNnAEjOfRDVJfgcFdAFdDffJhOnASPAXQfVHfUnffACMXQfVLfBnndAbhQn0ACJhQnAEjOfRDVJfgcFdBFdAffJhRnASPAEXUfjVfRCXQfVHfUXQfVLfBffnffACMXQfVKfVnndAbhUn0ACJhUnAEjOfRDVJfgcFdAFdEffJhVnASPAEXUfjVfRCXQfVHfUXQfVKfVffnffAURURCMXQfVHfUnndACMXQfVKfVnndAnnCMXQfVLfBnndAnnbyhYn0ABJhYnASPAEjSfRCVJfgcFctffnffACTEXzDjNjJjOWfjVfRDXQfVHfUXQfVKfVXQfVLfBffEXUfjVfRDXQfVHfUXQfVKfVXQfVLfBffnnbyhbn0ABJhbnASPAEXUfjVfRDXQfVHfUXQfVKfVXQfVLfBffnffOhebhfn0ADJhfnASzJjGjJjMjMjFjEiPjVjUXWncfftaiAbiBn0ASJiBnABjzKjLjFjZiUjJjNjFiWjBjSYfEXzHjLjFjZiUjJjNjFZfVJfgcRBVzBjJgafXffnfJiCnASzIjDjVjSiYjUjJjNjFgbYEXZfVHfURBVgafXffnftJiDnASzIjDjVjSiZjUjJjNjFgcZEXZfVKfVRBVgafXffnftOiEbyiFn0ABJiFnASzIjDjVjSiajUjJjNjFgdgaEXZfVLfBRBVgafXffnftACMVNfgdnnctnJiHnASzIiJjOjEjFjYiLjFjZgeDVgafXnffOiIbyiJn0ABOiJbiKn0ADJiKnASPAEjSfRCVJfgcFcfffnffJiLnASXWnctffJiMnABjYfEXZfVJfgcRBVgafXffnfAUzChGhGgfCTVgbfYVgcfZnnCMVXfWnncfnnnACMVNfgdnncfbyiPn0ABOiPbiQn0ADJiQnASPAEjSfRCVJfgcFctffnffJiRnASXWnctffJiSnABjYfEXZfVJfgcRBVgafXffnfAURURUgfCTVgbfYVgcfZnnCMVXfWnncfnnUgfCTVgbfYVgdfgannCMVXfWnncfnnnnUgfCTVgcfZVgdfgannCMVXfWnncfnnnnnJiVnASzKjLjFjZiJjOiUjZjQjFiYhAFEXzWjLjFjZiJjOiJjOjUjFjSjQjPjMjBjUjJjPjOiUjZjQjFhBfVHfURBVgefDffnffJiWnASzLjLjFjZiPjVjUiUjZjQjFiYhCHEXzXjLjFjZiPjVjUiJjOjUjFjSjQjPjMjBjUjJjPjOiUjZjQjFhDfVHfURBVgefDffnffJiXnASzKjLjFjZiJjOiUjZjQjFiZhEGEXhBfVKfVRBVgefDffnffJiYnASzLjLjFjZiPjVjUiUjZjQjFiZhFIEXhBfVKfVRBVgefDffnffJiZnASzIiWjBjMjVjFiLjFjZhGEEXzIjLjFjZiWjBjMjVjFhHfVJfgcRBVgafXffnffOiabibn0ACJibnASzHiBjVjUjPiCjFjahIJEXzVjLjFjZiUjFjNjQjPjSjBjMiBjVjUjPiCjFjajJjFjShJfVHfURBVgefDffnffJicnASzHiDjPjOjUiCjFjahKKEXzVjLjFjZiUjFjNjQjPjSjBjMiDjPjOjUjJjOjVjPjVjThLfVHfURBVgefDffnffAUgfCMVhAfFXzGiCiFiaiJiFiShMfjzZiLjFjZjGjSjBjNjFiJjOjUjFjSjQjPjMjBjUjJjPjOiUjZjQjFhNfnnCMVhCfHXhMfjhNfnnnnnOiebifn0ACJifnAShIJEXhJfVKfVRBVgefDffnffJjAnAShKKEXhLfVKfVRBVgefDffnffAUgfCMVhEfGXhMfjhNfnnCMVhFfIXhMfjhNfnnnnnOjCbjDn0ACJjDnASzGjJjOiFjBjTjFhOLEXzRjLjFjZiJjOiUjFjNjQjPjSjBjMiFjBjTjFhPfVHfURBVgefDffnffJjEnASzHiPjVjUiFjBjTjFhQMEXzSjLjFjZiPjVjUiUjFjNjQjPjSjBjMiFjBjTjFhRfVHfURBVgefDffnffAURCTVhAfFXzEiIiPiMiEhSfjhNfnnCTVhCfHXhSfjhNfnnnnnOjGbjHn0ACJjHnABjzHjJjOiFjBjTjFiZhTfEXhPfVKfVRBVgefDffnfJjInABjzIiPjVjUiFjBjTjFiZhUfEXhPfVKfVRBVgefDffnfAURCTVhEfGXhSfjhNfnnCTVhFfIXhSfjhNfnnnnnOjKbjLn0AFJjLnASzIjTiBjVjUjPiCjFjahVNEXzUjLjFjZiTjQjBjUjJjBjMiBjVjUjPiCjFjajJjFjShWfVJfgcRBVgefDffnffJjMnASzIjTiDjPjOjUiCjFjahXOEXzUjLjFjZiTjQjBjUjJjBjMiDjPjOjUjJjOjVjPjVjThYfVJfgcRBVgefDffnffJjNnASzJjJjOiTjQjBiUjBjOjHhZPEXzTjLjFjZiJjOiTjQjBjUjJjBjMiUjBjOjHjFjOjUhafVJfgcRBVgefDffnffJjOnASzKiPjVjUiTjQjBiUjBjOjHhbQEXzUjLjFjZiPjVjUiTjQjBjUjJjBjMiUjBjOjHjFjOjUhcfVJfgcRBVgefDffnffJjPnASzFiSjPjWjFjShdREXzJjLjFjZiSjPjWjJjOjHhefVJfgcRBVgefDffnffAURCMXzRjQjSjPjQjFjSjUjZiWjBjMjVjFiUjZjQjFhffVJfgcVBfSnnCMXhffVJfgcVEfTnnnnnJjRnASzIjOjVjNjCiLjFjZjTiAgbEXUfjVfRCXQfVHfUXQfVKfVffnftJjSnABQzAiBfVGfCXzGjMjFjOjHjUjIiCfVGfCWzGiPjCjKjFjDjUiDVYjYfgeVgefDiAViAfgbzJiWjBjMjVjFiLjFjZiYiEXzBhQiFfVhGfEzJiWjBjMjVjFiLjFjZiZiGXzBhRiHfVhGfEhGVhGfEhAVhAfFhCVhCfHhEVhEfGhFVhFfIhIVhIfJhKVhKfKhOVhOfLhQVhQfMhTjhTfhUjhUfhVVhVfNhXVhXfOhZVhZfPhbVhbfQhdVhdfRnfAVgafXBVPfAByBzChchdiIZkKnAVGfCAUgfCzBheiJVPfAnndACMXzTjEjJjNjFjOjTjJjPjOjTiTjFjQjBjSjBjUjFjEiKfVJfgcnnctnnnACzKjJjOjTjUjBjOjDjFjPjGiLVJfgcjzIiQjSjPjQjFjSjUjZiMfnnbykOn0ABZkOnAFbAgega4X0AiAJ40BhAP40BiAG4C0AiAge4D0AiAhG4E0AiAhI4J0AiAhK4K0AiAN4B0AhAhO4L0AiAL4B0AiAhQ4M0AiAhA4F0AiAhV4N0AiAhE4G0AiAhX4O0AiAhZ4P0AiAhC4H0AiAhb4Q0AiAhF4I0AiAH4U0AiAhd4R0AiAK4V0AiAB4S0AiAE4T0AiAX4W0AiAgb4Y0AiAgc4Z0AiAgd4ga0AiAiA4gb0AiACgcAzSjHjFjUiLjFjZjGjSjBjNjFjTjUjPiKjPjJjOiNAkQMkUbyBn0ABOkWbykXn0ABOkXbkYn0ADJkYnASzFjZiLjFjZjTiOFEXIfVJfNRBFdBffnffakZbkan0ADJkanASzKjDjVjSiLjFjZiUjJjNjFiPDEXZfViOfFRBVzBjYiQfHffnffJkbnASzHjDjVjSiYiWjBjMiRAEXzLjWjBjMjVjFiBjUiUjJjNjFiSfEXIfVJfNRBFdAffRCViPfDFcfffnffJkcnAEXzOjTjFjUiWjBjMjVjFiBjUiUjJjNjFiTfEXIfVJfNRBFdAffRCViPfDViRfAffAViQfHBXQfViOfFByBiIZkenAEXIfVJfNRBFdAffACMVzHjEjJjNiOjVjNhRiUfOnndAOkfblAn0ADJlAnASzFjYiLjFjZjTiVEEXIfVJfNRBFdAffnffalBblCn0ADJlCnASiPDEXZfViVfERBVzBjZiWfIffnffJlDnASzHjDjVjSiZiWjBjMiXBEXiSfEXIfVJfNRBFdBffRCViPfDFcfffnffJlEnAEXiTfEXIfVJfNRBFdBffRCViPfDViXfBffAViWfIBXQfViVfEByBiIZlGnAEXIfVJfNRBFdBffACMViUfOnndBnACMVzHjEjJjNiOjVjNhSiYfPnndAbylJn0ABOlJblKn0ADJlKnASzFjaiLjFjZjTiZGEXIfVJfNRBFdCffnffalLblMn0AFJlMnASiPDEXZfViZfGRBVzCjajBiafJffnffJlNnASiRAEXiSfEXIfVJfNRBFdAffRCViPfDFcfffnffJlOnASiXBEXiSfEXIfVJfNRBFdBffRCViPfDFcfffnffJlPnAEXiTfEXIfVJfNRBFdAffRCViPfDViRfAffJlQnAEXiTfEXIfVJfNRBFdBffRCViPfDViXfBffAViafJBXQfViZfGByBiIZlSnAEXIfVJfNRBFdCffACMViYfPnndCOlTblUn0ADJlUnASiOFEXIfVJfNRBFdBffnffalVblWn0AFJlWnASiPDEXZfViOfFRBVzCjajCibfKffnffJlXnASiRAEXiSfEXIfVJfNRBFdAffRCViPfDFcfffnffJlYnASzHjDjVjSiaiWjBjMicCEXiSfEXIfVJfNRBFdCffRCViPfDFcfffnffJlZnAEXiTfEXIfVJfNRBFdAffRCViPfDViRfAffJlanAEXiTfEXIfVJfNRBFdCffRCViPfDVicfCffAVibfKBXQfViOfFByBiIZlcnAEXIfVJfNRBFdBffACMViYfPnndBOldblen0ADJlenASiVEEXIfVJfNRBFdAffnffalfbmAn0AFJmAnASiPDEXZfViVfERBVzCjajDidfLffnffJmBnASiXBEXiSfEXIfVJfNRBFdBffRCViPfDFcfffnffJmCnASicCEXiSfEXIfVJfNRBFdCffRCViPfDFcfffnffJmDnAEXiTfEXIfVJfNRBFdBffRCViPfDViXfBffJmEnAEXiTfEXIfVJfNRBFdCffRCViPfDVicfCffAVidfLBXQfViVfEByBiIZmGnAEXIfVJfNRBFdAffACMViYfPnndDbmIn0ADJmInASiVEEXIfVJfNRBFdAffnffamJbmKn0ADJmKnASiPDEXZfViVfERBVzCjajEiefMffnffJmLnASicCEXiSfEXIfVJfNRBFdCffRCViPfDFcfffnffJmMnAEXiTfEXIfVJfNRBFdCffRCViPfDVicfCffAViefMBXQfViVfEByBiIZmOnAEXIfVJfNRBFdAffAQiR40BiAiX4B0AiAic4C0AiAiQ4H0AiAiP4D0AiAiV4E0AiAJ40BhAiW4I0AiAiO4F0AiAiZ4G0AiAia4J0AiAib4K0AiAid4L0AiAie4M0AiAiU4B0AhAiY4C0AhADNAOAmSMmYbyBn0AJJmanASiVHEXIfVJfhCRBFdAffnftJmbnASiOIEXIfVJfhCRBFdBffnftOmdbmen0ADJmenASiZJEXIfVJfhCRBFdCffnffJmfnASPAEXUfjVfRDXQfViVfHXQfViOfIXQfViZfJffnffJnAnASzMiQjSjPjQjFjSjUjZiWjBjMhTifKEXIfVJfhCRBFdCffnftACMVNfhDnnctbynCn0ABJnCnASiZJnbffbynEn0ADJnEnASzGjYiBjSjSjBjZjALAnnftJynEnASzGjZiBjSjSjBjZjBMAnnftJynEnASzGjaiBjSjSjBjZjCNAnnftJnFnASzMiQjSjPjQjFjSjUjZiWjBjMhRjDOEXIfVJfhCRBFdAffnftJnGnASzMiQjSjPjQjFjSjUjZiWjBjMhSjEPEXIfVJfhCRBFdBffnftJnHnASPAEXUfjVfRCXQfViVfHXQfViOfIffnffOnIbnJn0AEanJbynKn0ABJnKnAEXzEjQjVjTjIjFfVjAfLRBARCEXhHfViVfHRBViQfQffEXZfViVfHRBViQfQfffffAViQfQBXQfViVfHByBiIanMbynNn0ABJnNnAEXjFfVjBfMRBARCEXhHfViOfIRBViWfRffEXZfViOfIRBViWfRfffffAViWfRBXQfViOfIByBiIOnPbynQn0ABanQbynRn0ABJnRnAEXjFfVjCfNRBARCEXhHfViZfJRBVzBjajGfSffEXZfViZfJRBVjGfSfffffAVjGfSBXQfViZfJByBiIACMVNfhDnnctnOnUbynVn0ABanVbnWn0AKJnWnASzIjYiLjFjZiEjBjUjBjHTQiBfVjAfLjgafnftJnXnASzIjZiLjFjZiEjBjUjBjIUQiBfVjBfMjgafnftOnZbynan0ABJnanASzIjaiLjFjZiEjBjUjBjJVQiBfVjCfNjgafnffACMVNfhDnnctbyncn0ABJncnASjJVnbffJnenASgeEjgafnffbynfn0AGJnfnASzLjJjTjUjIjFjSjFiLjFjZiYjKWncfftJynfnASzLjJjTjUjIjFjSjFiLjFjZiZjLXncfftJynfnASzLjJjTjUjIjFjSjFiLjFjZiajMYncfftJynfnASzGjPjVjUjPjGiYjNZncfftJynfnASzGjPjVjUjPjGiZjOgancfftJynfnASzGjPjVjUjPjGiajPgbncfftg2ABbyBn0ACJ2BBnASzFjUjSjJjBjMjQgcCiIXiCfVjAfLjgafnnnftJ2DBnACzDhBhdhdjRizGjUjZjQjFjPjGjSXiHfVjHfTjzJjVjOjEjFjGjJjOjFjEjTfnnABnzDjFjSjSjUnbyBn0ABJ2FBnASjNyBnctffg2HBbyBn0ACJ2IBnASjQgcCiIXiCfVjBfMjgafnnnftJ2KBnACjRijSXiHfVjIfUjjTfnnABnjUnbyBn0ABJ2MBnASjOyBnctffO2OBby2PBn0ABg2PBbyBn0ACJ2QBnASjQgcCiIXiCfVjCfNjgafnnnftJ2SBnACjRijSXiHfVjJfVjjTfnnABnjUnbyBn0ABJ2UBnASjPyBnctffACMVNfhDnnctnO2YBby2ZBn0ABO2ZBby2gaBn0ABO2gaBb2gbBn0AJJ2gbBnABjYfXiHfVjIfUnfJ2gcBnASzIjOjFjXiJjOjEjFjYjVFCzBhLjWjgafnndBnffJ2gdBnASjKWncfffJ2geBnASjLXnctffJ2gfBnASzJjOjFjXiYiWjBjMjVjFjXgdEXiTfVjDfORCXiHfVjIfUEXiSfVjDfORCXiHfVjIfUFctffffnffJ2hABnASHBEXiSfVjDfORCXiHfVjIfUFctffnffJ2hBBnAEXzGjJjOjTjFjSjUjYfVjAfLRCjgafARCVHfBXiHfVjIfUfffJ2hCBnAShGGARCVHfBXiFfVjIfUfnffJ2hDBnASPAEXUfjVfRCXQfVjDfOXQfVjEfPffnffACMVjNfZnnctO2hEBb2hFBn0AIJ2hFBnABjYfXiHfVjHfTnfJ2hGBnASjVFCjWjgafnndBnffJ2hHBnASjKWnctffJ2hIBnASjLXncfffJ2hJBnASzJjOjFjXiZiWjBjMjVjFjZgeEXiTfVjEfPRCXiHfVjHfTEXiSfVjEfPRCXiHfVjHfTFctffffnffJ2hKBnASKCEXiSfVjEfPRCXiHfVjHfTFctffnffJ2hLBnAEXjYfVjBfMRCjgafARCVKfCXiHfVjHfTfffJ2hMBnASPAEXUfjVfRCXQfVjDfOXQfVjEfPffnffACMVjOfgannctnAURCMVjNfZnnctCMVjOfgannctnnby2hPBn0ABO2hPBnACMEXzHjUjPiGjJjYjFjEjafXiHfVjHfTRBFdCffEXjafXiHfVjIfURBFdCffnnO2hQBb2hRBn0AIJ2hRBnASjVFCjWjgafnndBnffJ2hSBnASjKWncfffJ2hTBnASjLXnctffJ2hUBnABjYfXiHfVjIfUnfJ2hVBnASjXgdEXiTfVjDfORCXiHfVjIfUEXiSfVjDfORCXiHfVjIfUFctffffnffJ2hWBnASHBEXiSfVjDfORCXiHfVjIfUFctffnffJ2hXBnAEXjYfVjAfLRCjgafARCVHfBXiHfVjIfUfffJ2hYBnASPAEXUfjVfRCXQfVjDfOXQfVjEfPffnffACiJEXjafXiHfVjHfTRBFdCffEXjafXiHfVjIfURBFdCffnnO2hZBb2haBn0AIJ2haBnASjVFCjWjgafnndBnffJ2hbBnASjKWnctffJ2hcBnASjLXncfffJ2hdBnABjYfXiHfVjHfTnfJ2heBnASjZgeEXiTfVjEfPRCXiHfVjHfTEXiSfVjEfPRCXiHfVjHfTFctffffnffJ2hfBnASKCEXiSfVjEfPRCXiHfVjHfTFctffnffJ2iABnAEXjYfVjBfMRCjgafARCVKfCXiHfVjHfTfffJ2iBBnASPAEXUfjVfRCXQfVjDfOXQfVjEfPffnffACiJEXjafXiHfVjIfURBFdCffEXjafXiHfVjHfTRBFdCffnnnACMVNfhDnncfby2iGBn0ABO2iGBby2iHBn0ABO2iHBby2iIBn0ABO2iIBb2iJBn0AJJ2iJBnABjYfXiHfVjIfUnfJ2iKBnASjVFCjWjgafnndBnffJ2iLBnASjKWncfffJ2iMBnASjLXnctffJ2iNBnASjMYnctffJ2iOBnASjXgdEXiTfVjDfORCXiHfVjIfUEXiSfVjDfORCXiHfVjIfUFctffffnffJ2iPBnASHBEXiSfVjDfORCXiHfVjIfUFctffnffJ2iQBnAEXjYfVjAfLRCjgafARCVHfBXiHfVjIfUfffJ2iRBnASPAEXUfjVfRDXQfVjDfOXQfVjEfPXQfViffKffnffAUgfCMVjOfganncfCMVjPfgbnncfnnO2iSBb2iTBn0AMJ2iTBnABjYfXiHfVjJfVnfJ2iUBnASjVFCjWjgafnndBnffJ2iVBnASjKWncfffJ2iWBnASjLXncfffJ2iXBnASjMYnctffJ2iYBnASjXgdEXiTfVjDfORCXiHfVjJfVEXiSfVjDfORCXiHfVjJfVFctffffnffJ2iZBnASjZgeEXiTfVjEfPRCXiHfVjJfVEXiSfVjEfPRCXiHfVjJfVFctffffnffJ2iaBnASHBEXiSfVjDfORCXiHfVjJfVFctffnffJ2ibBnASKCEXiSfVjEfPRCXiHfVjJfVFctffnffJ2icBnAEXjYfVjAfLRCjgafARCVHfBXiHfVjJfVfffJ2idBnAEXjYfVjBfMRCjgafARCVKfCXiHfVjJfVfffJ2ieBnASPAEXUfjVfRDXQfVjDfOXQfVjEfPXQfViffKffnffAUgfCMVjOfgannctCMVjPfgbnncfnnnACMVjNfZnnctO2jABby2jBBn0ABO2jBBb2jCBn0AMJ2jCBnABjYfXiHfVjJfVnfJ2jDBnASjVFCjWjgafnndBnffJ2jEBnASjKWnctffJ2jFBnASjLXncfffJ2jGBnASjMYnctffJ2jHBnASjXgdEXiTfVjDfORCXiHfVjJfVEXiSfVjDfORCXiHfVjJfVFctffffnffJ2jIBnASHBEXiSfVjDfORCXiHfVjJfVFctffnffJ2jJBnASjZgeEXiTfVjEfPRCXiHfVjJfVEXiSfVjEfPRCXiHfVjJfVFctffffnffJ2jKBnASKCEXiSfVjEfPRCXiHfVjJfVFctffnffJ2jLBnAEXjYfVjAfLRCjgafARCVHfBXiHfVjJfVfffJ2jMBnAEXjYfVjBfMRCjgafARCVKfCXiHfVjJfVfffJ2jNBnASPAEXUfjVfRDXQfVjDfOXQfVjEfPXQfViffKffnffACMVjPfgbnncfb2jPBn0AMJ2jPBnABjYfXiHfVjHfTnfJ2jQBnASjVFCjWjgafnndBnffJ2jRBnASjKWnctffJ2jSBnASjLXncfffJ2jTBnASjMYncfffJ2jUBnASjZgeEXiTfVjEfPRCXiHfVjHfTEXiSfVjEfPRCXiHfVjHfTFctffffnffJ2jVBnASzJjOjFjXiaiWjBjMjVjFjbgfEXiTfViffKRCXiHfVjHfTEXiSfViffKRCXiHfVjHfTFctffffnffJ2jWBnASKCEXiSfVjEfPRCXiHfVjHfTFctffnffJ2jXBnASLDEXiSfViffKRCXiHfVjHfTFctffnffJ2jYBnAEXjYfVjBfMRCjgafARCVKfCXiHfVjHfTfffJ2jZBnAEXjYfVjCfNRCjgafARCVLfDXiHfVjHfTfffJ2jaBnASPAEXUfjVfRDXQfVjDfOXQfVjEfPXQfViffKffnffACMVjOfgannctb2jeBn0AJJ2jeBnABjYfXiHfVjHfTnfJ2jfBnASjVFCjWjgafnndBnffJ2kABnASjKWnctffJ2kBBnASjLXnctffJ2kCBnASjMYncfffJ2kDBnASjbgfEXiTfViffKRCXiHfVjHfTEXiSfViffKRCXiHfVjHfTFctffffnffJ2kEBnASLDEXiSfViffKRCXiHfVjHfTFctffnffJ2kFBnAEXjYfVjCfNRCjgafARCVLfDXiHfVjHfTfffJ2kGBnASPAEXUfjVfRDXQfVjDfOXQfVjEfPXQfViffKffnffAURURCMVjNfZnnctCMVjOfgannctnnCMVjPfgbnnctnnby2kJBn0ABO2kJBby2kKBn0ABJ2kKBnASjVFCjWjgafnndBnffACMCMXiHfVjHfTXiHfVjIfUnnXiHfVjJfVnnb2kMBn0AKJ2kMBnASzGjOjPjUiOjVjNjchAncfftg2kNBbyBn0ADJ2kOBnACTijSXiHfVjHfTnneJjVjOjEjFjGjJjOjFjEJ2kPBnACTijSXiHfVjIfUnneJjVjOjEjFjGjJjOjFjEJ2kQBnACTijSXiHfVjJfVnneJjVjOjEjFjGjJjOjFjEABnjUnbyBn0ABJ2kSBnASjcyBnctffJ2kUBnASzHjNjJjOiUjJjNjFjdhBndAftO2kVBby2kWBn0ABJ2kWBnASjdhBEXWfjVfRDXiHfVjHfTXiHfVjIfUXiHfVjJfVffnffACMVjcfhAnncfby2kYBn0ABO2kYBby2kZBn0ABO2kZBby2kaBn0ABJ2kaBnASjdhBXiHfVjJfVnffACMijSXiHfVjIfUnneGjOjVjNjCjFjSO2kbBby2kcBn0ABJ2kcBnASjdhBXiHfVjIfUnffACMijSXiHfVjJfVnneGjOjVjNjCjFjSby2keBn0ABJ2keBnASjdhBEXWfjVfRCXiHfVjIfUXiHfVjJfVffnffACTijSXiHfVjHfTnneGjOjVjNjCjFjSO2lABby2lBBn0ABO2lBBby2lCBn0ABJ2lCBnASjdhBXiHfVjHfTnffACMijSXiHfVjJfVnneGjOjVjNjCjFjSby2lEBn0ABJ2lEBnASjdhBEXWfjVfRCXiHfVjHfTXiHfVjJfVffnffACMijSXiHfVjIfUnneGjOjVjNjCjFjSby2lHBn0ABJ2lHBnASjdhBEXWfjVfRCXiHfVjHfTXiHfVjIfUffnffJ2lKBnABjYfVjdfhBnfJ2lLBnASjVFCjWjgafnndBnffO2lMBb2lNBn0AEJ2lNBnASjKWncfffJ2lOBnASjXgdEXiTfVjDfORCVjdfhBEXiSfVjDfORCVjdfhBFctffffnftJ2lPBnASHBEXiSfVjDfORCVjdfhBFctffnffJ2lQBnAEXjYfVjAfLRCjgafARCVHfBVjdfhBfffACTXiHfVjHfTVjdfhBnnnO2lSBb2lTBn0AEJ2lTBnASjLXncfffJ2lUBnASjZgeEXiTfVjEfPRCVjdfhBEXiSfVjEfPRCVjdfhBFctffffnftJ2lVBnASKCEXiSfVjEfPRCVjdfhBFctffnffJ2lWBnAEXjYfVjBfMRCjgafARCVKfCVjdfhBfffACTXiHfVjIfUVjdfhBnnnO2lYBb2lZBn0AEJ2lZBnASjMYncfffJ2laBnASjbgfEXiTfViffKRCVjdfhBEXiSfViffKRCVjdfhBFctffffnftJ2lbBnASLDEXiSfViffKRCVjdfhBFctffnffJ2lcBnAEXjYfVjCfNRCjgafARCVLfDVjdfhBfffACTXiHfVjJfVVjdfhBnnnJ2leBnASPAEXUfjVfRDXQfVjDfOXQfVjEfPXQfViffKffnffO2mDBby2mEBn0ABO2mEBby2mFBn0ABJ2mFBnACMVgefEVPfAnnACTVgefEVPfAnnnAURURCMVjNfZnnctCMVjOfgannctnnCMVjPfgbnnctnnnAjgafAVPfAByBzBhcjeAUgfCTVjAfLnnbCTVjBfMnnbnnnACiJVPfAnndAnZ2mNBnAVPf0AhEjZ4ge0AiAjb4gf0AiAjc4hA0AiAjd4hB0AiAiQ4Q0AiAJ40BhAP40BiAiW4R0AiAge4E0AiAhG4G0AiAN4B0AhAL4D0AiAH4B0AiAK4C0AiAiV4H0AiAiO4I0AiAiZ4J0AiAjV4F0AiAif4K0AiAjA4L0AiAjB4M0AiAjC4N0AiAjD4O0AiAjE4P0AiAjG4S0AiAjH4T0AiAjI4U0AiAjJ4V0AiAjK4W0AiAjL4X0AiAjM4Y0AiAjN4Z0AiAjO4ga0AiAjP4gb0AiAjQ4gc0AiAjX4gd0AiAChCASA2mOBM2mRBbyBn0ABO2mSBby2mTBn0ABO2mTBb2mUBn0AFJ2mVBnASzOiLjFjZiBjSjSjBjZiMjFjOjHjUjIjfAXiCfVzIiLjFjZiBjSjSjBjZkAfInffJ2mWBnABjzHjJjTiUjSjJjBjMkBfhzBhBkCEXzBjTkDfjzEjEjIjNiLkEfnfnfa2mXBb2mYBn0AKJ2mYBnASzJjBjEjEiOjFjXiLjFjZkFBEXzGjBjEjEiLjFjZkGfVJfHRBXYfQiBfVkAfIVzBjLkHfFffnffJ2mZBnASzLjOjFjXiLjFjZiJjOjEjFjYkICVkFfBnffJ2maBnAEXzNjTjFjUiWjBjMjVjFiBjUiLjFjZkJfVJfHRCVkIfCXhGfQiBfVkAfIVkHfFffO2mbBby2mcBn0ABJ2mcBnASzJjOjFjXiJjOiFjBjTjFkKDXhTfQiBfVkAfIVkHfFnffAUgfCTXhAfQiBfVkAfIVkHfFXhMfjhNfnnCMXhEfQiBfVkAfIVkHfFXhMfjhNfnnnnO2mdBby2meBn0ABJ2meBnASkKDXhOfQiBfVkAfIVkHfFnffAUgfCMXhAfQiBfVkAfIVkHfFXhMfjhNfnnCTXhEfQiBfVkAfIVkHfFXhMfjhNfnnnnby2nABn0ABJ2nABnASkKDXhOfQiBfVkAfIVkHfFnffO2nCBby2nDBn0ABJ2nDBnASzKjOjFjXiPjVjUiFjBjTjFkLEXhUfQiBfVkAfIVkHfFnffAUgfCTXhCfQiBfVkAfIVkHfFXhMfjhNfnnCMXhFfQiBfVkAfIVkHfFXhMfjhNfnnnnO2nEBby2nFBn0ABJ2nFBnASkLEXhQfQiBfVkAfIVkHfFnffAUgfCMXhCfQiBfVkAfIVkHfFXhMfjhNfnnCTXhFfQiBfVkAfIVkHfFXhMfjhNfnnnnby2nHBn0ABJ2nHBnASkLEXhQfQiBfVkAfIVkHfFnffO2nJBby2nKBn0ABJ2nKBnAEXzUjTjFjUiUjFjNjQjPjSjBjMiFjBjTjFiBjUiLjFjZkMfVJfHRDVkIfCVkKfDVkLfEffAURCTXhCfQiBfVkAfIVkHfFXhSfjhNfnnCTXhFfQiBfVkAfIVkHfFXhSfjhNfnnnnnO2nMBby2nNBn0ABJ2nNBnAEXzZjTjFjUiJjOjUjFjSjQjPjMjBjUjJjPjOiUjZjQjFiBjUiLjFjZkNfVJfHRDVkIfCXhEfQiBfVkAfIVkHfFXhFfQiBfVkAfIVkHfFffAUgfCTXhCfQiBfVkAfIVkHfFXhMfjhNfnnCMXhFfQiBfVkAfIVkHfFXhMfjhNfnnnnby2nPBn0ABJ2nPBnAEXkNfVJfHRDVkIfCXhAfQiBfVkAfIVkHfFXhCfQiBfVkAfIVkHfFffO2nRBb2nSBn0ACJ2nSBnAEXzgajTjFjUiUjFjNjQjPjSjBjMiDjPjOjUjJjOjVjPjVjTiBjUiLjFjZkOfVJfHRCVkIfCXhKfQiBfVkAfIVkHfFffJ2nTBnAEXzgajTjFjUiUjFjNjQjPjSjBjMiBjVjUjPiCjFjajJjFjSiBjUiLjFjZkPfVJfHRCVkIfCXhIfQiBfVkAfIVkHfFffAUgfCMXhAfQiBfVkAfIVkHfFXhMfjhNfnnCMXhCfQiBfVkAfIVkHfFXhMfjhNfnnnnnO2nVBb2nWBn0ACJ2nWBnAEXkOfVJfHRCVkIfCXhKfQiBfVkAfIVkHfFffJ2nXBnAEXkPfVJfHRCVkIfCXhIfQiBfVkAfIVkHfFffAUgfCMXhEfQiBfVkAfIVkHfFXhMfjhNfnnCMXhFfQiBfVkAfIVkHfFXhMfjhNfnnnnnO2nZBb2naBn0ADJ2naBnAEXzZjTjFjUiTjQjBjUjJjBjMiDjPjOjUjJjOjVjPjVjTiBjUiLjFjZkQfVJfHRCVkIfCXhXfQiBfVkAfIVkHfFffJ2nbBnAEXzZjTjFjUiTjQjBjUjJjBjMiBjVjUjPiCjFjajJjFjSiBjUiLjFjZkRfVJfHRCVkIfCXhVfQiBfVkAfIVkHfFffJ2ncBnAEXzXjTjFjUiTjQjBjUjJjBjMiUjBjOjHjFjOjUjTiBjUiLjFjZkSfVJfHRDVkIfCXhZfQiBfVkAfIVkHfFXhbfQiBfVkAfIVkHfFffAURCMXhffVJfHXCfjDfnnCMXhffVJfHXFfjDfnnnnnAVkHfFAVjffAByBjeO2nfBby2ACn0ABa2ACby2BCn0ABJ2BCnAEXzOjTjFjUiSjPjWjJjOjHiBjUiLjFjZkTfVJfHRCVzBjSkUfGXhdfQiBfVkAfIVkUfGffAVkUfGBVjffAByBjeAURCMXhffVJfHXCfjDfnnCMXhffVJfHXFfjDfnnnnnZ2ECnAFctACMXQfVJfHnndAnAUgfCiLVJfHjiMfnnCiLVkAfIjzFiBjSjSjBjZkVfnnnnnAJJ40BhAkK4D0AiAkL4E0AiAkA4B0AhAjf40BiAkF4B0AiAkI4C0AiAkH4F0AiAkU4G0AiACHAzUjQjBjTjUjFiLjFjZjGjSjBjNjFjTjUjPiKjPjJjOkWA2ICM2KCbyBn0ABO2LCby2MCn0ABl2MCby2NCn0ABJ2NCnAEXzJjSjFjNjPjWjFiLjFjZkXfVJfARBFdBffACiJXQfVJfAnnd0ACiLVJfAjiMfnnnABJ40BhAB0AzPjEjFjMjFjUjFiLjFjZjGjSjBjNjFjTkYA2QCGJBnAEXzOjCjFjHjJjOiVjOjEjPiHjSjPjVjQkZfjzDjBjQjQkafRBFeZiKjPjJjOhAiTjFjQjBjSjBjUjFjEhAiEjJjNjFjOjTjJjPjOjTffJmUnABXjYfXzJjQjSjPjUjPjUjZjQjFkbfjkVfNyBnAMmUbyBn0ABJmVnAEXzGjTjQjMjJjDjFkcfezEjUjIjJjTkdfRDVzFjJjOjEjFjYkefAFdAVzEjJjUjFjNkffBffACkf4B0AhAke40BhAC0AiBCmWnfJ2RCnASzJjDjPjNjQiMjBjZjFjSlAAXzKjBjDjUjJjWjFiJjUjFjNlBfXzHjQjSjPjKjFjDjUlCfjkafnftJ2SCnASzLjBjDjUjJjWjFiMjBjZjFjSlDBXzOjTjFjMjFjDjUjFjEiMjBjZjFjSjTlEfVlAfAnftO2TCby2UCn0ABJ2UCnAEjzFjBjMjFjSjUlFfRBFeViQjMjFjBjTjFhAjTjFjMjFjDjUhAjBhAjMjBjZjFjSffACMVlDfBnnbby2WCn0ABO2WCby2XCn0ABJ2XCnAEjlFfRBFejFiKjPjJjOjJjOjHhAjLjFjZjGjSjBjNjFjThAjJjThAjOjPjUhAjTjVjQjQjPjSjUjFjEhAjJjOhAjUjSjJjBjMhAjNjPjEjFhOKiQjMjFjBjTjFhAjQjVjSjDjIjBjTjFhAjBhAjMjJjDjFjOjTjFhAjUjPhAjVjTjFhAjGjVjMjMhAjGjVjOjDjUjJjPjOjBjMjJjUjZffAjkBfby2ZCn0ABa2ZCb2gaCn0ACJ2gaCnASzIjDjVjSiMjBjZjFjSlGDQiBfVlDfBVgafCnftO2gcCby2gdCn0ABJ2gdCnAEjlFfRBFehKiQjPjTjJjUjJjPjOhAjEjJjNjFjOjTjJjPjOjThAjIjBjWjFjOhHjUhAjCjFjFjOhAjTjFjQjBjSjBjUjFjEffACMXiKfEXzIjQjSjPjQjFjSjUjZlHfEXlHfVlGfDRBFeUiBiEiCiFhAiUjSjBjOjTjGjPjSjNhAiHjSjPjVjQffRBFeNiBiEiCiFhAiQjPjTjJjUjJjPjOffnncfby2gfCn0ABO2gfCby2hACn0ABJ2hACnABXiKfEXlHfEXlHfVlGfDRBFeUiBiEiCiFhAiUjSjBjOjTjGjPjSjNhAiHjSjPjVjQffRBFeNiBiEiCiFhAiQjPjTjJjUjJjPjOffncffAUgfCMXQfEXlHfEXlHfVlGfDRBFeUiBiEiCiFhAiUjSjBjOjTjGjPjSjNhAiHjSjPjVjQffRBFeNiBiEiCiFhAiQjPjTjJjUjJjPjOffnndACMXiKfEXlHfEXlHfVlGfDRBFeUiBiEiCiFhAiUjSjBjOjTjGjPjSjNhAiHjSjPjVjQffRBFeNiBiEiCiFhAiQjPjTjJjUjJjPjOffnnctnnO2hBCb2hCCn0AEO2hCCby2hDCn0ABJ2hDCnASzHjPjMjEiLjFjZjTlIEEjiNfRCEXlHfEXlHfVlGfDRBFeUiBiEiCiFhAiUjSjBjOjTjGjPjSjNhAiHjSjPjVjQffRBFeNiBiEiCiFhAiQjPjTjJjUjJjPjOffFctffnffACMXzLjUjIjSjFjFiEiMjBjZjFjSlJfVlGfDnnctby2hFCn0ABJ2hFCnASlIEEjiNfRCEXlHfEXlHfVlGfDRBFeUiBiEiCiFhAiUjSjBjOjTjGjPjSjNhAiHjSjPjVjQffRBFeNiBiEiCiFhAiQjPjTjJjUjJjPjOffFcfffnffJ2hHCnABXiKfEXlHfEXlHfVlGfDRBFeUiBiEiCiFhAiUjSjBjOjTjGjPjSjNhAiHjSjPjVjQffRBFeNiBiEiCiFhAiQjPjTjJjUjJjPjOffncffJ2hICnAEjkYfRBEXlHfEXlHfVlGfDRBFeUiBiEiCiFhAiUjSjBjOjTjGjPjSjNhAiHjSjPjVjQffRBFeNiBiEiCiFhAiQjPjTjJjUjJjPjOffffJ2hJCnAEjkWfRCEXlHfEXlHfVlGfDRBFeUiBiEiCiFhAiUjSjBjOjTjGjPjSjNhAiHjSjPjVjQffRBFeNiBiEiCiFhAiQjPjTjJjUjJjPjOffVlIfEffACMXiKfEXlHfEXlHfVlGfDRBFeUiBiEiCiFhAiUjSjBjOjTjGjPjSjNhAiHjSjPjVjQffRBFeNiBiEiCiFhAiQjPjTjJjUjJjPjOffnnctnAVgafCAXiCfVlDfBByBjeJ2hRCnAEXzMjFjOjEiVjOjEjPiHjSjPjVjQlKfjkafnfAFga4C0AiAlA40BiAlD4B0AiAlG4D0AiAlI4E0AiAAFAzNjKjPjJjOiLjFjZjGjSjBjNjFjTlLA2hTC0EiBByB\");\r\r\r // function separateScale() {\r// app.beginUndoGroup(\"Separate Scale Dimensions\");\r// \r// function getKeyframes(PropertyVal){\r// if(PropertyVal instanceof Property){\r// var totalKeys, keyIndexList, IndexKey, ValueKey, keyInType, keyOutType, AutoBez, ContBez, inEase, OutEase, sAutoBez, sContBez, inSpaTang, OutSpaTang, Rover, twoDim, threeDim;\r// twoDim = PropertyValueType.TwoD;\r// threeDim = PropertyValueType.ThreeD;\r// keyIndexList = [];\r// totalKeys = PropertyVal.numKeys; \r// if(totalKeys > 0){\r// for(var i = 1; i <= totalKeys; i++) {\r// keyTimeVar = PropertyVal.keyTime(i);\r// IndexKey = i;\r// ValueKey = PropertyVal.keyValue(i);\r// keyInType = PropertyVal.keyInInterpolationType(IndexKey);\r// keyOutType = PropertyVal.keyOutInterpolationType(IndexKey); \r// if(keyInType == KeyframeInterpolationType.BEZIER && keyOutType == KeyframeInterpolationType.BEZIER){\r// AutoBez = PropertyVal.keyTemporalAutoBezier(IndexKey);\r// ContBez = PropertyVal.keyTemporalContinuous(IndexKey);\r// } \r// if(keyInType != KeyframeInterpolationType.HOLD || keyOutType != KeyframeInterpolationType.HOLD){\r// inEase = PropertyVal.keyInTemporalEase(IndexKey);\r// OutEase = PropertyVal.keyOutTemporalEase(IndexKey);\r// } \r// keyIndexList[keyIndexList.length] = {\r// 'keyTimeVar':keyTimeVar, \r// 'IndexKey':IndexKey, \r// 'ValueKeyX':ValueKey[0], \r// 'ValueKeyY':ValueKey[1],\r// 'ValueKeyZ':ValueKey[2],\r// 'ValueKey':ValueKey,\r// 'keyInType':keyInType, \r// 'keyOutType':keyOutType, \r// 'AutoBez':AutoBez, \r// 'ContBez':ContBez, \r// 'inEase':[inEase[0]], \r// 'OutEase':[OutEase[0]], \r// 'sAutoBez':sAutoBez, \r// 'sContBez':sContBez, \r// 'inSpaTang':inSpaTang, \r// 'OutSpaTang':OutSpaTang, \r// 'Rover':Rover\r// };\r// } \r// return keyIndexList;\r// }else{ \r// return null;\r// }\r// }\r// }\r//\r// function pasteKeyframes(PropertyVal, KeyArray,num){\r// var XorYVal = num;\r// if(PropertyVal instanceof Property && KeyArray instanceof Array){\r// if(PropertyVal.numKeys == 0){ \r// var KeyArrayLength, addNewKey, newKeyIndex; \r// KeyArrayLength = KeyArray.length; \r// for(var k = 0; k < KeyArrayLength; k++){ \r// addNewKey = PropertyVal.addKey(KeyArray[k].keyTimeVar); \r// newKeyIndex = addNewKey; \r// if (XorYVal == 0) {\r// PropertyVal.setValueAtKey(newKeyIndex, KeyArray[k].ValueKeyX);\r// } else if (XorYVal == 1){\r// PropertyVal.setValueAtKey(newKeyIndex, KeyArray[k].ValueKeyY);\r// } else {\r// PropertyVal.setValueAtKey(newKeyIndex, KeyArray[k].ValueKeyZ);\r// } \r// if(KeyArray[k].keyOutType != KeyframeInterpolationType.HOLD){\r// PropertyVal.setTemporalEaseAtKey(newKeyIndex, KeyArray[k].inEase, KeyArray[k].OutEase);\r// } \r// PropertyVal.setInterpolationTypeAtKey(newKeyIndex, KeyArray[k].keyInType, KeyArray[k].keyOutType); \r// if((KeyArray[k].keyInType == KeyframeInterpolationType.BEZIER) && (KeyArray[k].keyOutType == KeyframeInterpolationType.BEZIER)){\r// PropertyVal.setTemporalContinuousAtKey(newKeyIndex, KeyArray[k].ContBez);\r// PropertyVal.setTemporalAutoBezierAtKey(newKeyIndex, KeyArray[k].AutoBez);\r// }\r// \r// if((PropertyVal.propertyValueType == PropertyValueType.TwoD) || (PropertyVal.propertyValueType == PropertyValueType.ThreeD)){\r// PropertyVal.setSpatialContinuousAtKey(newKeyIndex, KeyArray[k].sContBez);\r// PropertyVal.setSpatialAutoBezierAtKey(newKeyIndex, KeyArray[k].sAutoBez);\r// PropertyVal.setSpatialTangentsAtKey(newKeyIndex, KeyArray[k].inSpaTang, KeyArray[k].OutSpaTang);\r// }\r// } \r// if((PropertyVal.propertyValueType == PropertyValueType.TwoD) || (PropertyVal.propertyValueType == PropertyValueType.ThreeD)){\r// for(var r = 0; r < KeyArrayLength; r++){\r// PropertyVal.setRovingAtKey((r+1), KeyArray[r].Rover);\r// }\r// }\r// return true;\r// }\r// }\r// }\r// function deleteKeyframes(PropertyVal){\r// if(PropertyVal instanceof Property){\r// while(PropertyVal.numKeys > 0){\r// PropertyVal.removeKey(1);\r// }\r// }\r// }\r//\r// var compLayer = app.project.activeItem;\r// var activeLayer = compLayer.selectedLayers;\r// var scaleLangs = {\r// en: \"Scale\",\r// fr: \"Echelle\",\r// de: \"Skala\",\r// es: \"Escala\",\r// it: \"Scala\",\r// jp: \"スケール\",\r// ko: \"저울\",\r// ru: \"Масштаб\"\r// };\r//\r// var scaleLangName = localize(scaleLangs);\r// isTrial = (!dhmK.s());\r// if (activeLayer == null) {\r// alert(\"No layers selected\");\r// } else {\r// if (isTrial && app.project.activeItem.selectedLayers.length > trialLayerLimit) {\r// alert(\"The trial version is limited to \"+trialLayerLimit+\" layers at a time/nOnly the first \"+trialLayerLimit+\" layers will be separated\");\r// numLayers = trialLayerLimit;\r// } else {\r// numLayers = app.project.activeItem.selectedLayers.length;\r// }\r// for (var i = 0; i<numLayers; i++) {\r// var noDice = false;\r// var curLayer = activeLayer[i];\r// if (curLayer.property(\"ADBE Transform Group\").property(\"ADBE Scale\").expressionEnabled == true) {\r// alert(\"Scale dimensions have already been separated with Keep 'Em Separated, or there is an existing expression on the Scale property. Please remove existing expressions and try again\");\r// noDice = true;\r// } else {\r// noDice = false;\r// }\r// if (noDice == false) {\r// var threeD = false;\r// var slider1 = curLayer.Effects.addProperty(\"ADBE Slider Control\");\r// \r// var xName = \"X \"+ scaleLangName;\r// slider1.name = xName;\r// var slider2 = curLayer.Effects.addProperty(\"ADBE Slider Control\");\r// \r// var yName = \"Y \" + scaleLangName;\r// slider2.name = yName;\r// if (curLayer.threeDLayer == true) {\r// threeD = true;\r// var slider3 = curLayer.Effects.addProperty(\"ADBE Slider Control\");\r// \r// var zName = \"Z \" + scaleLangName;\r// slider3.name = zName;\r// }\r// var scaleKeys = curLayer.property(\"ADBE Transform Group\").property(\"ADBE Scale\");\r//\r// if (scaleKeys.numKeys > 0) {\r// \r// var scaleOldKeys = getKeyframes (scaleKeys);\r// deleteKeyframes(curLayer.property(\"ADBE Transform Group\").property(\"ADBE Scale\"));\r// pasteKeyframes(curLayer.Effects.property(xName).property(\"ADBE Slider Control-0001\"), scaleOldKeys,0);\r// pasteKeyframes(curLayer.Effects.property(yName).property(\"ADBE Slider Control-0001\"), scaleOldKeys,1);\r// if (threeD == true) {\r// pasteKeyframes(curLayer.Effects.property(zName).property(\"ADBE Slider Control-0001\"), scaleOldKeys,2);\r// }\r// \r//\r// var expString = \"[effect(\\\"\"+xName+\"\\\")(\\\"Slider\\\"), effect(\\\"\"+yName+\"\\\")(\\\"Slider\\\")]\";\r// curLayer.property(\"ADBE Transform Group\").property(\"ADBE Scale\").expression = expString;\r// } else {\r// var oldScaleVals = curLayer.property(\"ADBE Transform Group\").property(\"ADBE Scale\").valueAtTime(0,false);\r// curLayer.Effects.property(xName).property(\"ADBE Slider Control-0001\").setValue(oldScaleVals[0]);\r// curLayer.Effects.property(yName).property(\"ADBE Slider Control-0001\").setValue(oldScaleVals[1]);\r// if (threeD == true) {\r// curLayer.Effects.property(zName).property(\"ADBE Slider Control-0001\").setValue(oldScaleVals[2]);\r// }\r// var expString = \"[effect(\\\"\"+xName+\"\\\")(\\\"Slider\\\"), effect(\\\"\"+yName+\"\\\")(\\\"Slider\\\")]\";\r// curLayer.property(\"ADBE Transform Group\").property(\"ADBE Scale\").expression = expString;\r// }\r// }\r// }\r// app.endUndoGroup();\r// }\r// }\r//\r\reval(\"@JSXBIN@[email protected]@MyBbyBnABMAbyBnADMDbyBn0ABOEbFn0AFJGnASzGjUjXjPiEjJjNBPXzEiUjXjPiECfjzRiQjSjPjQjFjSjUjZiWjBjMjVjFiUjZjQjFDfnffJHnASzIjUjIjSjFjFiEjJjNEQXzGiUjIjSjFjFiEFfjDfnffJInASzMjLjFjZiJjOjEjFjYiMjJjTjUGBAnnffJJnASzJjUjPjUjBjMiLjFjZjTHAXzHjOjVjNiLjFjZjTIfVzLiQjSjPjQjFjSjUjZiWjBjMJfSnffOKbLn0ACaLbMn0AIJMnABjzKjLjFjZiUjJjNjFiWjBjSKfEXzHjLjFjZiUjJjNjFLfVJfSRBVzBjJMfRffnfJNnASzIiJjOjEjFjYiLjFjZNCVMfRnffJOnASzIiWjBjMjVjFiLjFjZODEXzIjLjFjZiWjBjMjVjFPfVJfSRBVMfRffnffJPnASzJjLjFjZiJjOiUjZjQjFQEEXzWjLjFjZiJjOiJjOjUjFjSjQjPjMjBjUjJjPjOiUjZjQjFRfVJfSRBVNfCffnffJQnASzKjLjFjZiPjVjUiUjZjQjFSFEXzXjLjFjZiPjVjUiJjOjUjFjSjQjPjMjBjUjJjPjOiUjZjQjFTfVJfSRBVNfCffnffORbSn0ACJSnASzHiBjVjUjPiCjFjaUGEXzVjLjFjZiUjFjNjQjPjSjBjMiBjVjUjPiCjFjajJjFjSVfVJfSRBVNfCffnffJTnASzHiDjPjOjUiCjFjaWHEXzVjLjFjZiUjFjNjQjPjSjBjMiDjPjOjUjJjOjVjPjVjTXfVJfSRBVNfCffnffAUzChGhGYCzChdhdZVQfEXzGiCiFiaiJiFiSgafjzZiLjFjZjGjSjBjNjFiJjOjUjFjSjQjPjMjBjUjJjPjOiUjZjQjFgbfnnCZVSfFXgafjgbfnnnnnOVbWn0ACJWnASzGjJjOiFjBjTjFgcIEXzRjLjFjZiJjOiUjFjNjQjPjSjBjMiFjBjTjFgdfVJfSRBVNfCffnffJXnASzHiPjVjUiFjBjTjFgeJEXzSjLjFjZiPjVjUiUjFjNjQjPjSjBjMiFjBjTjFgffVJfSRBVNfCffnffAUzCjcjchACzChBhdhBVQfEXzEiIiPiMiEhCfjgbfnnChBVSfFXhCfjgbfnnnnnJZnABQzAhDfVGfBXzGjMjFjOjHjUjIhEfVGfBWzGiPjCjKjFjDjUhFRKjKfNVNfCzJiWjBjMjVjFiLjFjZiYhGXzBhQhHfVOfDzJiWjBjMjVjFiLjFjZiZhIXzBhRhJfVOfDzJiWjBjMjVjFiLjFjZiahKXzBhShLfVOfDOVOfDQVQfESVSfFUVUfGWVWfHgcARBXhHfVgcfIfgeARBXhHfVgefJfzIjTiBjVjUjPiCjFjahMVhMfKzIjTiDjPjOjUiCjFjahNVhNfLzJjJjOiTjQjBiUjBjOjHhOVhOfMzKiPjVjUiTjQjBiUjBjOjHhPVhPfNzFiSjPjWjFjShQVhQfOnfAVMfRBVHfAByBzChchdhRZhNnAVGfBACzBhehSVHfAnndAbyhPn0ABZhPnAFbACzKjJjOjTjUjBjOjDjFjPjGhTVJfSjzIiQjSjPjQjFjSjUjZhUfnnnATM4R0AiAJ40BhAH40BiAG4B0AiAN4C0AiAO4D0AiAQ4E0AiAS4F0AiAU4G0AiAW4H0AiAgc4I0AiAge4J0AiAhM4K0AiAhN4L0AiAhO4M0AiAhP4N0AiAhQ4O0AiAB4P0AiAE4Q0AiABSAzMjHjFjUiLjFjZjGjSjBjNjFjThVAhSMhUbyBn0ACJhVnASzHiYjPjSiZiWjBjMhWAVzDjOjVjNhXfInftOhWbyhXn0ABOhXbhYn0AEJhZnASzOiLjFjZiBjSjSjBjZiMjFjOjHjUjIhYBXhEfVzIiLjFjZiBjSjSjBjZhZfHnffahabhbn0AHJhbnASzJjBjEjEiOjFjXiLjFjZhaCEXzGjBjEjEiLjFjZhbfVJfGRBXKfQhDfVhZfHVzBjLhcfEffnffJhcnASzLjOjFjXiLjFjZiJjOjEjFjYhdDVhafCnffOhdbyhen0ABJhenAEXzNjTjFjUiWjBjMjVjFiBjUiLjFjZhefVJfGRCVhdfDXhGfQhDfVhZfHVhcfEffACZVhWfAnndAOhfbyiAn0ABJiAnAEXhefVJfGRCVhdfDXhIfQhDfVhZfHVhcfEffACZVhWfAnndBbyiCn0ABJiCnAEXhefVJfGRCVhdfDXhKfQhDfVhZfHVhcfEffOiEbyiFn0ABJiFnAEXzUjTjFjUiUjFjNjQjPjSjBjMiFjBjTjFiBjUiLjFjZhffVJfGRDVhdfDXgcfQhDfVhZfHVhcfEXgefQhDfVhZfHVhcfEffAChBXSfQhDfVhZfHVhcfEXhCfjgbfnnnJiHnAEXzZjTjFjUiJjOjUjFjSjQjPjMjBjUjJjPjOiUjZjQjFiBjUiLjFjZiAfVJfGRDVhdfDXQfQhDfVhZfHVhcfEXSfQhDfVhZfHVhcfEffOiIbiJn0ACJiJnAEXzgajTjFjUiUjFjNjQjPjSjBjMiDjPjOjUjJjOjVjPjVjTiBjUiLjFjZiBfVJfGRCVhdfDXWfQhDfVhZfHVhcfEffJiKnAEXzgajTjFjUiUjFjNjQjPjSjBjMiBjVjUjPiCjFjajJjFjSiBjUiLjFjZiCfVJfGRCVhdfDXUfQhDfVhZfHVhcfEffAUYCZXQfQhDfVhZfHVhcfEXgafjgbfnnCZXSfQhDfVhZfHVhcfEXgafjgbfnnnnnOiNbiOn0ADJiOnAEXzZjTjFjUiTjQjBjUjJjBjMiDjPjOjUjJjOjVjPjVjTiBjUiLjFjZiDfVJfGRCVhdfDXhNfQhDfVhZfHVhcfEffJiPnAEXzZjTjFjUiTjQjBjUjJjBjMiBjVjUjPiCjFjajJjFjSiBjUiLjFjZiEfVJfGRCVhdfDXhMfQhDfVhZfHVhcfEffJiQnAEXzXjTjFjUiTjQjBjUjJjBjMiUjBjOjHjFjOjUjTiBjUiLjFjZiFfVJfGRDVhdfDXhOfQhDfVhZfHVhcfEXhPfQhDfVhZfHVhcfEffAUhACZXzRjQjSjPjQjFjSjUjZiWjBjMjVjFiUjZjQjFiGfVJfGXCfjDfnnCZXiGfVJfGXFfjDfnnnnnAVhcfEAVhYfBByBzBhciHOiTbyiUn0ABaiUbyiVn0ABJiVnAEXzOjTjFjUiSjPjWjJjOjHiBjUiLjFjZiIfVJfGRCCzBhLiJVzBjSiKfFnndBXhQfQhDfVhZfHViKfFffAViKfFAVhYfBByBiHAUhACZXiGfVJfGXCfjDfnnCZXiGfVJfGXFfjDfnnnnnZiYnAFctACZXIfVJfGnndAnAUYChTVJfGjhUfnnChTVhZfHjzFiBjSjSjBjZiLfnnnnnAJJ40BhAhZ4B0AhAhW40BiAhY4B0AiAha4C0AiAhd4D0AiAhc4E0AiAhX4C0AhAiK4F0AiADGAzOjQjBjTjUjFiLjFjZjGjSjBjNjFjTiMAibMicbyBn0ABOidbyien0ABliebyifn0ABJifnAEXzJjSjFjNjPjWjFiLjFjZiNfVJfARBFdBffAChSXIfVJfAnnd0AChTVJfAjhUfnnnABJ40BhAB0AzPjEjFjMjFjUjFiLjFjZjGjSjBjNjFjTiOAjCHJBnAEXzOjCjFjHjJjOiVjOjEjPiHjSjPjVjQiPfjzDjBjQjQiQfRBFeZiTjFjQjBjSjBjUjFhAiTjDjBjMjFhAiEjJjNjFjOjTjJjPjOjTffJjEnASzJjDjPjNjQiMjBjZjFjSiRAXzKjBjDjUjJjWjFiJjUjFjNiSfXzHjQjSjPjKjFjDjUiTfjiQfnftJjFnASzLjBjDjUjJjWjFiMjBjZjFjSiUBXzOjTjFjMjFjDjUjFjEiMjBjZjFjSjTiVfViRfAnftJjGnASzKjTjDjBjMjFiMjBjOjHjTiWCWhFIzCjFjOiXFeFiTjDjBjMjFzCjGjSiYFeHiFjDjIjFjMjMjFzCjEjFiZFeFiTjLjBjMjBzCjFjTiaFeGiFjTjDjBjMjBzCjJjUibFeFiTjDjBjMjBzCjKjQicFeE2lZhQ2lRhQ2nchQ2nLhQzCjLjPidFeC2AmI2lYmGzCjSjVieFeH2gcE2hQE2iBE2iIE2iCE2hQE2hREnftJjRnASzNjTjDjBjMjFiMjBjOjHiOjBjNjFifDEjzIjMjPjDjBjMjJjajFjAfRBViWfCffnftJjSnABjzHjJjTiUjSjJjBjMjBfhzBhBjCEXzBjTjDfjzEjEjIjNiLjEfnfnfOjTbyjUn0ABJjUnAEjzFjBjMjFjSjUjFfRBFeSiOjPhAjMjBjZjFjSjThAjTjFjMjFjDjUjFjEffACZViUfBnnbbjWn0ADOjWbjXn0ACJjXnAEjjFfRBCiJCiJCiJCiJnjzPjUjSjJjBjMiMjBjZjFjSiMjJjNjJjUjGfehAiUjIjFhAjUjSjJjBjMhAjWjFjSjTjJjPjOhAjJjThAjMjJjNjJjUjFjEhAjUjPhAnnnehChAjMjBjZjFjSjThAjBjUhAjBhAjUjJjNjFhPjOiPjOjMjZhAjUjIjFhAjGjJjSjTjUhAjjGfnnnneZhAjMjBjZjFjSjThAjXjJjMjMhAjCjFhAjTjFjQjBjSjBjUjFjEffJjYnABjzJjOjVjNiMjBjZjFjSjTjHfjjGfnfAUYjjBfChSXhEfXiVfXiSfXiTfjiQfjjGfnnnnbyjan0ABJjanABjjHfXhEfXiVfXiSfXiTfjiQfnfajcbjdn0AEJjdnASzGjOjPiEjJjDjFjIFncfftJjenASzIjDjVjSiMjBjZjFjSjJGQhDfViUfBVMfEnftOjfbkAn0ACJkAnAEjjFfRBFelQiTjDjBjMjFhAjEjJjNjFjOjTjJjPjOjThAjIjBjWjFhAjBjMjSjFjBjEjZhAjCjFjFjOhAjTjFjQjBjSjBjUjFjEhAjXjJjUjIhAiLjFjFjQhAhHiFjNhAiTjFjQjBjSjBjUjFjEhMhAjPjShAjUjIjFjSjFhAjJjThAjBjOhAjFjYjJjTjUjJjOjHhAjFjYjQjSjFjTjTjJjPjOhAjPjOhAjUjIjFhAiTjDjBjMjFhAjQjSjPjQjFjSjUjZhOhAiQjMjFjBjTjFhAjSjFjNjPjWjFhAjFjYjJjTjUjJjOjHhAjFjYjQjSjFjTjTjJjPjOjThAjBjOjEhAjUjSjZhAjBjHjBjJjOffJkBnASjIFnctffACZXzRjFjYjQjSjFjTjTjJjPjOiFjOjBjCjMjFjEjKfEXzIjQjSjPjQjFjSjUjZjLfEXjLfVjJfGRBFeUiBiEiCiFhAiUjSjBjOjTjGjPjSjNhAiHjSjPjVjQffRBFeKiBiEiCiFhAiTjDjBjMjFffnnctbykDn0ABJkDnASjIFncfffOkFbkGn0AKJkGnASzGjUjIjSjFjFiEjMHncfftJkHnASzHjTjMjJjEjFjShRjNIEXzLjBjEjEiQjSjPjQjFjSjUjZjOfXzHiFjGjGjFjDjUjTjPfVjJfGRBFeTiBiEiCiFhAiTjMjJjEjFjShAiDjPjOjUjSjPjMffnftJkJnASzFjYiOjBjNjFjQJCiJnViffDeCiYhAnnftJkKnABXzEjOjBjNjFjRfVjNfIVjQfJnfJkLnASzHjTjMjJjEjFjShSjSKEXjOfXjPfVjJfGRBFeTiBiEiCiFhAiTjMjJjEjFjShAiDjPjOjUjSjPjMffnftJkNnASzFjZiOjBjNjFjTLCiJnViffDeCiZhAnnftJkOnABXjRfVjSfKVjTfLnfOkPbkQn0AEJkQnASjMHnctffJkRnASzHjTjMjJjEjFjShTjUMEXjOfXjPfVjJfGRBFeTiBiEiCiFhAiTjMjJjEjFjShAiDjPjOjUjSjPjMffnftJkTnASzFjaiOjBjNjFjVNCiJnViffDeCiahAnnftJkUnABXjRfVjUfMVjVfNnfACZXzLjUjIjSjFjFiEiMjBjZjFjSjWfVjJfGnnctnJkWnASzJjTjDjBjMjFiLjFjZjTjXOEXjLfEXjLfVjJfGRBFeUiBiEiCiFhAiUjSjBjOjTjGjPjSjNhAiHjSjPjVjQffRBFeKiBiEiCiFhAiTjDjBjMjFffnftOkYbkan0AHJkanASzMjTjDjBjMjFiPjMjEiLjFjZjTjYPEjhVfRBVjXfOffnftJkbnAEjiOfRBEXjLfEXjLfVjJfGRBFeUiBiEiCiFhAiUjSjBjOjTjGjPjSjNhAiHjSjPjVjQffRBFeKiBiEiCiFhAiTjDjBjMjFffffJkcnAEjiMfRDEXjLfEXjLfXjPfVjJfGRBVjQfJffRBFeYiBiEiCiFhAiTjMjJjEjFjShAiDjPjOjUjSjPjMhNhQhQhQhRffVjYfPFdAffJkdnAEjiMfRDEXjLfEXjLfXjPfVjJfGRBVjTfLffRBFeYiBiEiCiFhAiTjMjJjEjFjShAiDjPjOjUjSjPjMhNhQhQhQhRffVjYfPFdBffOkebykfn0ABJkfnAEjiMfRDEXjLfEXjLfXjPfVjJfGRBVjVfNffRBFeYiBiEiCiFhAiTjMjJjEjFjShAiDjPjOjUjSjPjMhNhQhQhQhRffVjYfPFdCffACZVjMfHnnctnJlDnASzJjFjYjQiTjUjSjJjOjHjZQCiJCiJCiJCiJnVjQfJeJibjFjGjGjFjDjUhIhCnnneWhChJhIhCiTjMjJjEjFjShChJhMhAjFjGjGjFjDjUhIhCVjTfLnnnneNhChJhIhCiTjMjJjEjFjShChJidnftJlEnABXzKjFjYjQjSjFjTjTjJjPjOjafEXjLfEXjLfVjJfGRBFeUiBiEiCiFhAiUjSjBjOjTjGjPjSjNhAiHjSjPjVjQffRBFeKiBiEiCiFhAiTjDjBjMjFffVjZfQnfAChSXIfVjXfOnndAblGn0AGJlGnASzMjPjMjEiTjDjBjMjFiWjBjMjTjbREXzLjWjBjMjVjFiBjUiUjJjNjFjcfEXjLfEXjLfVjJfGRBFeUiBiEiCiFhAiUjSjBjOjTjGjPjSjNhAiHjSjPjVjQffRBFeKiBiEiCiFhAiTjDjBjMjFffRCFdAFcfffnftJlHnAEXzIjTjFjUiWjBjMjVjFjdfEXjLfEXjLfXjPfVjJfGRBVjQfJffRBFeYiBiEiCiFhAiTjMjJjEjFjShAiDjPjOjUjSjPjMhNhQhQhQhRffRBXhHfVjbfRffJlInAEXjdfEXjLfEXjLfXjPfVjJfGRBVjTfLffRBFeYiBiEiCiFhAiTjMjJjEjFjShAiDjPjOjUjSjPjMhNhQhQhQhRffRBXhJfVjbfRffOlJbylKn0ABJlKnAEXjdfEXjLfEXjLfXjPfVjJfGRBVjVfNffRBFeYiBiEiCiFhAiTjMjJjEjFjShAiDjPjOjUjSjPjMhNhQhQhQhRffRBXhLfVjbfRffACZVjMfHnnctnJlMnASjZQCiJCiJCiJCiJnVjQfJeJibjFjGjGjFjDjUhIhCnnneWhChJhIhCiTjMjJjEjFjShChJhMhAjFjGjGjFjDjUhIhCVjTfLnnnneNhChJhIhCiTjMjJjEjFjShChJidnftJlNnABXjafEXjLfEXjLfVjJfGRBFeUiBiEiCiFhAiUjSjBjOjTjGjPjSjNhAiHjSjPjVjQffRBFeKiBiEiCiFhAiTjDjBjMjFffVjZfQnfACZVjIfFnncfnAVMfEAjjHfByBiHJlRnAEXzMjFjOjEiVjOjEjPiHjSjPjVjQjefjiQfnfASM4E0AiAiR40BiAiU4B0AiAjJ4G0AiAiW4C0AiAif4D0AiAjI4F0AiAjM4H0AiAjN4I0AiAjQ4J0AiAjS4K0AiAjT4L0AiAjU4M0AiAjV4N0AiAjX4O0AiAjY4P0AiAjZ4Q0AiAjb4R0AiAASAzNjTjFjQjBjSjBjUjFiTjDjBjMjFjfAlT0EhDByB\");\r\r\r // function joinScale() {\r// app.beginUndoGroup(\"Join Scale Dimensions\");\r// \r// \r// Array.prototype.insert = function ( index, item ) {\r// this.splice( index, 0, item );\r// };\r//\r// \r// function getKeyframestoJoin(PropertyVal1, PropertyVal2, PropertyVal3){\r// var totalKeys, curXkey, curYkey, curZkey, prop, keyIndexList, keyTimeVar2, IndexKey, newIndex, ValueKey, keyInTypeX, keyInTypeY, keyInTypeZ, keyOutTypeX, keyOutTypeY, keyOutTypeZ, AutoBezX, AutoBezY, AutoBezZ, ContBezX, ContBezY, ContBezZ, inEaseX, inEaseY, inEaseZ, OutEaseX, OutEaseY, OutEaseZ, \r// sAutoBezX, sAutoBezY, sAutoBezZ, sContBezX, sContBezY, sContBezZ, inSpaTangX, inSpaTangY, inSpaTangZ, OutSpaTangX, OutSpaTangY, OutSpaTangZ, RoverX, RoverY, RoverZ, twoDim, threeDim;\r// twoDim = PropertyValueType.TwoD_SPATIAL;\r// threeDim = PropertyValueType.ThreeD_SPATIAL;\r// keyIndexList = [];\r// var threeD = false;\r// if (PropertyVal3 == 0) {\r// totalKeys = Math.max(PropertyVal1.numKeys, PropertyVal2.numKeys);\r// var xArray = [], yArray = [];\r// } else {\r// totalKeys = Math.max(PropertyVal1.numKeys, PropertyVal2.numKeys, PropertyVal3.numKeys);\r// var xArray = [], yArray = [], zArray = [];\r// threeD = true;\r// }\r// if(totalKeys > 0){\r// for (var x = 1; x <= PropertyVal1.numKeys; x++) {\r// xArray.push([PropertyVal1.keyValue(x), PropertyVal1.keyTime(x)]);\r// }\r// for (var y = 1; y <= PropertyVal2.numKeys; y++) {\r// yArray.push([PropertyVal2.keyValue(y),PropertyVal2.keyTime(y)]);\r// }\r// if (threeD == true) {\r// for (var z = 1; z <= PropertyVal3.numKeys; z++) {\r// zArray.push([PropertyVal3.keyValue(z),PropertyVal3.keyTime(z)]);\r// }\r// }\r// if (xArray != null && yArray != null) {\r// for (i = 0; i < totalKeys; i++) { \r// var xKeyData = xArray[i];\r// var yKeyData = yArray[i];\r// if (threeD == true) {\r// var zKeyData = zArray[i];\r// } else {\r// var zKeyData = null;\r// }\r// IndexKey = i+1;\r// var isthereKeyX = false, isthereKeyY = false, isthereKeyZ = false, outofX = false, outofY = false, outofZ = false;\r// try {\r// var trial = xArray.length <= i;\r// trial == false;\r// typeof xKeyData[1] !== undefined;\r// } catch(err) {\r// outofX = true;\r// }\r// try {\r// var trial = yArray.length <= i;\r// trial == false;\r// typeof yKeyData[1] !== undefined;\r// } catch(err) {\r// outofY = true;\r// }\r// if (threeD == true) {\r// try {\r// var trial = zArray.length <= i;\r// trial == false;\r// typeof zKeyData[1] !== undefined;\r// } catch(err) {\r// outofZ = true;\r// }\r// }\r// var newXValue, newYValue, newZValue;\r// if (threeD == false) {\r// if (outofX == true || outofY == true) {\r// if (outofX == true) { \r// keyTimeVar = yKeyData[1];\r// newIndex = i+1;\r// isthereKeyX = false;\r// isthereKeyY = true; \r// newXValue = PropertyVal1.setValueAtTime(yKeyData[1],PropertyVal1.valueAtTime(yKeyData[1], true));\r// curXkey = PropertyVal1.valueAtTime(yKeyData[1], true); \r// xArray.insert(i, [curXkey,yKeyData[1]]); \r// ValueKey = [curXkey, yKeyData[0]];\r// keyInTypeX = PropertyVal1.keyInInterpolationType(newIndex);\r// keyOutTypeX = PropertyVal1.keyOutInterpolationType(newIndex); \r// keyInTypeY = PropertyVal1.keyInInterpolationType(newIndex);\r// keyOutTypeY = PropertyVal1.keyOutInterpolationType(newIndex);\r// totalKeys = Math.max(PropertyVal1.numKeys,PropertyVal2.numKeys);\r// } else if (outofY == true) { \r// keyTimeVar = xKeyData[1];\r// newIndex = i+1;\r// isthereKeyX = true;\r// isthereKeyY = false; \r// newYValue = PropertyVal2.setValueAtTime(xKeyData[1],PropertyVal2.valueAtTime(xKeyData[1],true)); \r// curYkey = PropertyVal2.valueAtTime(xKeyData[1],true); \r// yArray.insert(i, [curYkey,xKeyData[1]]); \r// ValueKey = [xKeyData[0], curYkey];\r// keyInTypeX = PropertyVal1.keyInInterpolationType(newIndex);\r// keyOutTypeX = PropertyVal1.keyOutInterpolationType(newIndex); \r// keyInTypeY = PropertyVal1.keyInInterpolationType(newIndex);\r// keyOutTypeY = PropertyVal1.keyOutInterpolationType(newIndex);\r// totalKeys = Math.max(PropertyVal1.numKeys,PropertyVal2.numKeys); \r// }\r// } else { \r// if (xKeyData[1] == yKeyData[1]) {\r// ValueKey = [xKeyData[0],yKeyData[0]];\r// keyTimeVar = xKeyData[1]; \r// newIndex = i+1; \r// keyInTypeX = PropertyVal1.keyInInterpolationType(newIndex);\r// keyOutTypeX = PropertyVal1.keyOutInterpolationType(newIndex); \r// keyInTypeY = PropertyVal2.keyInInterpolationType(newIndex);\r// keyOutTypeY = PropertyVal2.keyOutInterpolationType(newIndex); \r// } else if (xKeyData[1] > yKeyData[1]) {\r// newIndex = i+1;\r// isthereKeyX = false;\r// isthereKeyY = true;\r// keyTimeVar = yKeyData[1];\r// newXValue = PropertyVal1.setValueAtTime(yKeyData[1],PropertyVal1.valueAtTime(yKeyData[1], true));\r// curXkey = PropertyVal1.valueAtTime(yKeyData[1], true);\r// xArray.insert(i, [curXkey,yKeyData[1]]);\r// ValueKey = [curXkey, yKeyData[0]];\r// keyInTypeX = PropertyVal1.keyInInterpolationType(newIndex);\r// keyOutTypeX = PropertyVal1.keyOutInterpolationType(newIndex); \r// keyInTypeY = PropertyVal2.keyInInterpolationType(newIndex);\r// keyOutTypeY = PropertyVal2.keyOutInterpolationType(newIndex);\r// totalKeys= Math.max(PropertyVal1.numKeys,PropertyVal2.numKeys);\r// } else if (yKeyData[1] > xKeyData[1]) {\r// newIndex = i+1;\r// isthereKeyX = true;\r// isthereKeyY = false;\r// keyTimeVar = xKeyData[1];\r// newYValue = PropertyVal2.setValueAtTime(xKeyData[1],PropertyVal2.valueAtTime(xKeyData[1],true));\r// curYkey = PropertyVal2.valueAtTime(xKeyData[1],true);\r// yArray.insert(i, [curYkey,xKeyData[1]]);\r// ValueKey = [xKeyData[0], curYkey];\r// keyInTypeX = PropertyVal1.keyInInterpolationType(newIndex);\r// keyOutTypeX = PropertyVal1.keyOutInterpolationType(newIndex); \r// keyInTypeY = PropertyVal2.keyInInterpolationType(newIndex);\r// keyOutTypeY = PropertyVal2.keyOutInterpolationType(newIndex);\r// totalKeys= Math.max(PropertyVal1.numKeys,PropertyVal2.numKeys);\r// } \r// \r// }\r// } else {\r// if (outofX == true || outofY == true || outofZ == true) {\r// if (outofX == true) {\r// if (outofY == false && outofZ == false) { \r// keyTimeVar = yKeyData[1];\r// newIndex = i+1;\r// isthereKeyX = false;\r// isthereKeyY = true;\r// isthereKeyZ = true; \r// newXValue = PropertyVal1.setValueAtTime(yKeyData[1],PropertyVal1.valueAtTime(yKeyData[1], true));\r// curXkey = PropertyVal1.valueAtTime(yKeyData[1], true); \r// xArray.insert(i, [curXkey,yKeyData[1]]); \r// ValueKey = [curXkey, yKeyData[0],zKeyData[0]];\r// keyInTypeX = PropertyVal1.keyInInterpolationType(newIndex);\r// keyOutTypeX = PropertyVal1.keyOutInterpolationType(newIndex); \r// keyInTypeY = PropertyVal2.keyInInterpolationType(newIndex);\r// keyOutTypeY = PropertyVal2.keyOutInterpolationType(newIndex);\r// keyInTypeZ = PropertyVal3.keyInInterpolationType(newIndex);\r// keyOutTypeZ = PropertyVal3.keyOutInterpolationType(newIndex);\r// totalKeys = Math.max(PropertyVal1.numKeys,PropertyVal2.numKeys,PropertyVal3.numKeys);\r// } else if (outofY == true && outofZ == false) { \r// keyTimeVar = zKeyData[1];\r// newIndex = i+1;\r// isthereKeyX = false;\r// isthereKeyY = false;\r// isthereKeyZ = true;\r// newXValue = PropertyVal1.setValueAtTime(zKeyData[1],PropertyVal1.valueAtTime(zKeyData[1],true));\r// newYValue = PropertyVal2.setValueAtTime(zKeyData[1],PropertyVal2.valueAtTime(zKeyData[1],true));\r// curXkey = PropertyVal1.valueAtTime(zKeyData[1], true);\r// curYkey = PropertyVal2.valueAtTime(zKeyData[1], true);\r// xArray.insert(i,[curXkey,zKeyData[1]]);\r// yArray.insert(i,[curYkey,zKeyData[1]]);\r// ValueKey = [curXkey,curYkey,zKeyData[0]];\r// keyInTypeX = PropertyVal1.keyInInterpolationType(newIndex);\r// keyOutTypeX = PropertyVal1.keyOutInterpolationType(newIndex); \r// keyInTypeY = PropertyVal2.keyInInterpolationType(newIndex);\r// keyOutTypeY = PropertyVal2.keyOutInterpolationType(newIndex);\r// keyInTypeZ = PropertyVal3.keyInInterpolationType(newIndex);\r// keyOutTypeZ = PropertyVal3.keyOutInterpolationType(newIndex);\r// totalKeys = Math.max(PropertyVal1.numKeys,PropertyVal2.numKeys,PropertyVal3.numKeys);\r// }\r// } else if (outofY == true) {\r// if (outofZ == false) { \r// keyTimeVar = zKeyData[1];\r// newIndex = i+1;\r// isthereKeyX = true;\r// isthereKeyY = false;\r// isthereKeyZ = true; \r// newXValue = PropertyVal1.setValueAtTime(zKeyData[1],PropertyVal1.valueAtTime(zKeyData[1],true));\r// curXkey = PropertyVal1.valueAtTime(zKeyData[1],true);\r// newYValue = PropertyVal2.setValueAtTime(zKeyData[1],PropertyVal2.valueAtTime(zKeyData[1], true));\r// curYkey = PropertyVal2.valueAtTime(zKeyData[1], true); \r// xArray.insert(i,[curXkey,zKeyData[1]]);\r// yArray.insert(i, [curYkey,zKeyData[1]]); \r// ValueKey = [curXkey,curYkey, zKeyData[0]];\r// keyInTypeX = PropertyVal1.keyInInterpolationType(newIndex);\r// keyOutTypeX = PropertyVal1.keyOutInterpolationType(newIndex); \r// keyInTypeY = PropertyVal2.keyInInterpolationType(newIndex);\r// keyOutTypeY = PropertyVal2.keyOutInterpolationType(newIndex);\r// keyInTypeZ = PropertyVal3.keyInInterpolationType(newIndex);\r// keyOutTypeZ = PropertyVal3.keyOutInterpolationType(newIndex);\r// totalKeys = Math.max(PropertyVal1.numKeys,PropertyVal2.numKeys,PropertyVal3.numKeys);\r// } else { \r// keyTimeVar = xKeyData[1];\r// newIndex = i+1;\r// isthereKeyX = true;\r// isthereKeyY = false;\r// isthereKeyZ = false;\r// newYValue = PropertyVal2.setValueAtTime(xKeyData[1],PropertyVal2.valueAtTime(xKeyData[1], true));\r// newZValue = PropertyVal3.setValueAtTime(xKeyData[1],PropertyVal3.valueAtTime(xKeyData[1], true));\r// curYkey = PropertyVal2.valueAtTime(xKeyData[1],true);\r// curZkey = PropertyVal3.valueAtTime(xKeyData[1],true);\r// yArray.insert(i,[curYkey,xKeyData[1]]);\r// zArray.insert(i,[curZkey,xKeyData[1]]);\r// ValueKey = [xKeyData[0],curYkey,curZkey];\r// keyInTypeX = PropertyVal1.keyInInterpolationType(newIndex);\r// keyOutTypeX = PropertyVal1.keyOutInterpolationType(newIndex); \r// keyInTypeY = PropertyVal2.keyInInterpolationType(newIndex);\r// keyOutTypeY = PropertyVal2.keyOutInterpolationType(newIndex);\r// keyInTypeZ = PropertyVal3.keyInInterpolationType(newIndex);\r// keyOutTypeZ = PropertyVal3.keyOutInterpolationType(newIndex);\r// totalKeys = Math.max(PropertyVal1.numKeys,PropertyVal2.numKeys,PropertyVal3.numKeys);\r// }\r// } else { \r// keyTimeVar = xKeyData[1];\r// newIndex = i+1;\r// isthereKeyX = true;\r// isthereKeyY = true;\r// isthereKeyZ = false; \r// newZValue = PropertyVal3.setValueAtTime(xKeyData[1],PropertyVal3.valueAtTime(xKeyData[1],true)); \r// curZkey = PropertyVal3.valueAtTime(xKeyData[1],true); \r// zArray.insert(i, [curZkey,xKeyData[1]]); \r// ValueKey = [xKeyData[0], yKeyData[0],curZkey];\r// keyInTypeX = PropertyVal1.keyInInterpolationType(newIndex);\r// keyOutTypeX = PropertyVal1.keyOutInterpolationType(newIndex); \r// keyInTypeY = PropertyVal2.keyInInterpolationType(newIndex);\r// keyOutTypeY = PropertyVal2.keyOutInterpolationType(newIndex);\r// keyInTypeZ = PropertyVal3.keyInInterpolationType(newIndex);\r// keyOutTypeZ = PropertyVal3.keyOutInterpolationType(newIndex);\r// totalKeys = Math.max(PropertyVal1.numKeys,PropertyVal2.numKeys,PropertyVal3.numKeys);\r// } \r// } else {\r// if (xKeyData[1] == yKeyData[1] == zKeyData[1]) {\r// ValueKey = [xKeyData[0],yKeyData[0],zKeyData[0]];\r// keyTimeVar = xKeyData[1]; \r// newIndex = i+1; \r// keyInTypeX = PropertyVal1.keyInInterpolationType(newIndex);\r// keyOutTypeX = PropertyVal1.keyOutInterpolationType(newIndex); \r// keyInTypeY = PropertyVal2.keyInInterpolationType(newIndex);\r// keyOutTypeY = PropertyVal2.keyOutInterpolationType(newIndex); \r// keyInTypeZ = PropertyVal3.keyInInterpolationType(newIndex);\r// keyOutTypeZ = PropertyVal3.keyOutInterpolationType(newIndex);\r// } else { \r// var notNum = false;\r// try {\r// typeof xKeyData[1] != 'undefined'; \r// typeof yKeyData[1] != 'undefined'; \r// typeof zKeyData[1] != 'undefined'; \r// } catch(err) {\r// notNum = true;\r// } \r// var minTime = 0;\r// if (notNum == false) {\r// minTime = Math.min(xKeyData[1], yKeyData[1], zKeyData[1]);\r// } else {\r// if (typeof xKeyData[1] != 'number') {\r// if (typeof yKeyData[1] == 'number') {\r// minTime = zKeyData[1];\r// } else if (typeof zKeyData[1] == 'number') {\r// minTime = yKeyData[1];\r// } else {\r// minTime = Math.min(yKeyData[1],zKeyData[1]);\r// }\r// } else if (typeof yKeyData[1] == 'number') {\r// if (typeof zKeyData[1] == 'number') {\r// minTime = xKeyData[1];\r// } else {\r// minTime = Math.min(xKeyData[1],zKeyData[1]);\r// }\r// } else {\r// minTime = Math.min(xKeyData[1],yKeyData[1]);\r// }\r// }\r// \r// keyTimeVar = minTime;\r// newIndex = i+1;\r// if (xKeyData[1] != minTime) {\r// isthereKeyX = false;\r// newXValue = PropertyVal1.setValueAtTime(minTime, PropertyVal1.valueAtTime(minTime,true));\r// curXkey = PropertyVal1.valueAtTime(minTime,true);\r// xArray.insert(i,[curXkey,minTime]);\r// }\r// if (yKeyData[1] != minTime) {\r// isthereKeyY = false;\r// newYValue = PropertyVal2.setValueAtTime(minTime, PropertyVal2.valueAtTime(minTime,true));\r// curYkey = PropertyVal2.valueAtTime(minTime,true);\r// yArray.insert(i,[curYkey,minTime]);\r// }\r// if (zKeyData[1] != minTime) {\r// isthereKeyZ = false;\r// newZValue = PropertyVal3.setValueAtTime(minTime, PropertyVal3.valueAtTime(minTime,true));\r// curZkey = PropertyVal3.valueAtTime(minTime,true);\r// zArray.insert(i,[curZkey,minTime]);\r// }\r// ValueKey = [PropertyVal1.valueAtTime(minTime,true), PropertyVal2.valueAtTime(minTime,true), PropertyVal3.valueAtTime(minTime,true)]\r// keyInTypeX = PropertyVal1.keyInInterpolationType(newIndex);\r// keyOutTypeX = PropertyVal1.keyOutInterpolationType(newIndex); \r// keyInTypeY = PropertyVal2.keyInInterpolationType(newIndex);\r// keyOutTypeY = PropertyVal2.keyOutInterpolationType(newIndex);\r// totalKeys = Math.max(PropertyVal1.numKeys,PropertyVal2.numKeys,PropertyVal3.numKeys); \r// }\r// }\r// }\r// if (outofX == true || outofY == true || outofZ == true) {\r// if (IndexKey != totalKeys) {\r// IndexKey == totalKeys;\r// }\r// }\r// \r// \r// if(keyInTypeX == KeyframeInterpolationType.BEZIER && keyOutTypeX == KeyframeInterpolationType.BEZIER){\r// AutoBezX = PropertyVal1.keyTemporalAutoBezier(IndexKey);\r// ContBezX = PropertyVal1.keyTemporalContinuous(IndexKey);\r// }\r// if (keyInTypeY == KeyframeInterpolationType.BEZIER && keyOutTypeY == KeyframeInterpolationType.BEZIER) {\r// AutoBezY = PropertyVal2.keyTemporalAutoBezier(IndexKey);\r// ContBezY = PropertyVal2.keyTemporalContinuous(IndexKey);\r// }\r// if (threeD == true) {\r// if (keyInTypeZ == KeyframeInterpolationType.BEZIER && keyOutTypeZ == KeyframeInterpolationType.BEZIER) {\r// AutoBezZ = PropertyVal2.keyTemporalAutoBezier(IndexKey);\r// ContBezZ = PropertyVal2.keyTemporalContinuous(IndexKey);\r// }\r// } else {\r// AutoBezZ = 0;\r// ContBezZ = 0;\r// } \r// \r// if(keyInTypeX != KeyframeInterpolationType.HOLD || keyOutTypeX != KeyframeInterpolationType.HOLD){\r// inEaseX = PropertyVal1.keyInTemporalEase(IndexKey);\r// OutEaseX = PropertyVal1.keyOutTemporalEase(IndexKey);\r// }\r// if(keyInTypeY != KeyframeInterpolationType.HOLD || keyOutTypeY != KeyframeInterpolationType.HOLD){\r// inEaseY = PropertyVal2.keyInTemporalEase(IndexKey);\r// OutEaseY = PropertyVal2.keyOutTemporalEase(IndexKey);\r// }\r// if(threeD == true) {\r// if(keyInTypeZ != KeyframeInterpolationType.HOLD || keyOutTypeZ != KeyframeInterpolationType.HOLD){\r// inEaseZ = PropertyVal3.keyInTemporalEase(IndexKey);\r// OutEaseZ = PropertyVal3.keyOutTemporalEase(IndexKey);\r// } \r// } else {\r// inEaseZ = 0;\r// OutEaseZ = 0;\r// }\r// if(PropertyVal1.propertyValueType == twoDim || PropertyVal1.propertyValueType == threeDim){\r// sAutoBezX = PropertyVal1.keySpatialAutoBezier(IndexKey);\r// sContBezX = PropertyVal1.keySpatialContinuous(IndexKey);\r// inSpaTangX = PropertyVal1.keyInSpatialTangent(IndexKey);\r// OutSpaTangX = PropertyVal1.keyOutSpatialTangent(IndexKey);\r// RoverX = PropertyVal1.keyRoving(IndexKey);\r// }\r// if(PropertyVal2.propertyValueType == twoDim || PropertyVal2.propertyValueType == threeDim){\r// sAutoBezY = PropertyVal2.keySpatialAutoBezier(IndexKey);\r// sContBezY = PropertyVal2.keySpatialContinuous(IndexKey);\r// inSpaTangY = PropertyVal2.keyInSpatialTangent(IndexKey);\r// OutSpaTangY = PropertyVal2.keyOutSpatialTangent(IndexKey);\r// RoverY = PropertyVal2.keyRoving(IndexKey);\r// }\r// if(threeD == true) {\r// if(PropertyVal3.propertyValueType == twoDim || PropertyVal3.propertyValueType == threeDim){\r// sAutoBezZ = PropertyVal3.keySpatialAutoBezier(IndexKey);\r// sContBezZ = PropertyVal3.keySpatialContinuous(IndexKey);\r// inSpaTangZ = PropertyVal3.keyInSpatialTangent(IndexKey);\r// OutSpaTangZ = PropertyVal3.keyOutSpatialTangent(IndexKey);\r// RoverZ = PropertyVal3.keyRoving(IndexKey);\r// }\r// } else {\r// sAutoBezZ = 0;\r// sContBezZ = 0;\r// inSpaTangZ = 0;\r// OutSpaTangZ = 0;\r// RoverZ = 0;\r// }\r// keyIndexList[keyIndexList.length] = {\r// 'keyTimeVar':keyTimeVar, \r// 'IndexKey':IndexKey, \r// 'ValueKeyX':ValueKey[0], \r// 'ValueKeyY':ValueKey[1],\r// 'ValueKeyZ':ValueKey[2],\r// 'ValueKey':ValueKey,\r// 'keyInType':keyInTypeX, \r// 'keyOutType':keyOutTypeX,\r// 'keyInTypeY':keyInTypeY, \r// 'keyOutTypeY':keyOutTypeY,\r// 'keyInTypeZ':keyInTypeZ,\r// 'keyOutTypeZ':keyOutTypeZ,\r// 'AutoBezX':AutoBezX,\r// 'AutoBezY':AutoBezY,\r// 'AutoBezZ':AutoBezZ,\r// 'ContBezX':ContBezX, \r// 'ContBezY':ContBezY,\r// 'ContBezZ':ContBezZ, \r// 'inEaseX':inEaseX, \r// 'inEaseY':inEaseY,\r// 'inEaseZ':inEaseZ,\r// 'OutEaseX':OutEaseX,\r// 'OutEaseY':OutEaseY, \r// 'OutEaseZ':OutEaseZ, \r// 'sAutoBezX':sAutoBezX, \r// 'sAutoBezY':sAutoBezY, \r// 'sAutoBezZ':sAutoBezZ, \r// 'sContBezX':sContBezX, \r// 'sContBezY':sContBezY,\r// 'sContBezZ':sContBezZ,\r// 'inSpaTangX':inSpaTangX, \r// 'inSpaTangY':inSpaTangY, \r// 'inSpaTangZ':inSpaTangZ, \r// 'OutSpaTangX':OutSpaTangX, \r// 'OutSpaTangY':OutSpaTangY, \r// 'OutSpaTangZ':OutSpaTangZ, \r// 'RoverX':RoverX,\r// 'RoverY':RoverY,\r// 'RoverZ':RoverZ,\r// 'threeD':threeD\r// };\r// } \r// return keyIndexList;\r// }\r// }\r// }\r//\r// function pasteKeyframestoJoin(PropertyVal, KeyArray){\r// if(PropertyVal.numKeys == 0){ \r// var KeyArrayLength, newkeyTimeVar, addNewKey, newKeyIndex, keyInX, keyInY, keyInZ, keyOutX, keyOutY, keyOutZ; \r// KeyArrayLength = KeyArray.length; \r// isTrial = (!dhmK.s());\r// for(var k = 0; k < KeyArrayLength; k++){ \r// addNewKey = PropertyVal.addKey(KeyArray[k].keyTimeVar); \r// newKeyIndex = addNewKey; \r// PropertyVal.setValueAtKey(newKeyIndex, KeyArray[k].ValueKey);\r// keyInX = KeyArray[k].inEaseX[0];\r// keyInY = KeyArray[k].inEaseY[0];\r// keyOutX = KeyArray[k].OutEaseX[0];\r// keyOutY = KeyArray[k].OutEaseY[0];\r// if (KeyArray[k].threeD == true) {\r// keyInZ = KeyArray[k].inEaseZ[0];\r// keyOutZ = KeyArray[k].OutEaseZ[0];\r// }\r// if(KeyArray[k].keyOutTypeX != KeyframeInterpolationType.HOLD){\r// if (KeyArray[k].threeD == true) {\r// PropertyVal.setTemporalEaseAtKey(newKeyIndex, [keyInX,keyInY,keyInZ], [keyOutX,keyOutY,keyOutZ]);\r// } else {\r// PropertyVal.setTemporalEaseAtKey(newKeyIndex, [keyInX,keyInY,keyInY], [keyOutX,keyOutY,keyOutY]);\r// }\r// } \r// PropertyVal.setInterpolationTypeAtKey(newKeyIndex, KeyArray[k].keyInType, KeyArray[k].keyOutType); \r// if((KeyArray[k].keyInTypeX == KeyframeInterpolationType.BEZIER) && (KeyArray[k].keyOutTypeX == KeyframeInterpolationType.BEZIER)){\r// PropertyVal.setTemporalContinuousAtKey(newKeyIndex, KeyArray[k].ContBezX);\r// PropertyVal.setTemporalAutoBezierAtKey(newKeyIndex, KeyArray[k].AutoBezX);\r// } \r// if((PropertyVal.propertyValueType == PropertyValueType.TwoD_SPATIAL) || (PropertyVal.propertyValueType == PropertyValueType.ThreeD_SPATIAL)){\r// PropertyVal.setSpatialContinuousAtKey(newKeyIndex, KeyArray[k].sContBezX);\r// PropertyVal.setSpatialAutoBezierAtKey(newKeyIndex, KeyArray[k].sAutoBezX);\r// PropertyVal.setSpatialTangentsAtKey(newKeyIndex, KeyArray[k].inSpaTangX, KeyArray[k].OutSpaTangX);\r// }\r// } \r// if((PropertyVal.propertyValueType == PropertyValueType.TwoD_SPATIAL) || (PropertyVal.propertyValueType == PropertyValueType.ThreeD_SPATIAL)){\r// for(var r = 0; r < KeyArrayLength; r++){\r// PropertyVal.setRovingAtKey((r+1), KeyArray[r].RoverX);\r// }\r// }\r// return true;\r// }\r// }\r//\r// function alertScreen(PropertyVal) {\r// for (x=0; x <PropertyVal.length; x++) {\r// var property = PropertyVal[x];\r// alert(\"Value Key \"+x+\" is\");\r// alert(property.ValueKey);\r// }\r// }\r// function deleteKeyframes(PropertyVal){\r// while(PropertyVal.numKeys > 0){\r// PropertyVal.removeKey(1);\r// }\r// }\r//\r// var compLayer = app.project.activeItem;\r// var activeLayer = compLayer.selectedLayers;\r// isTrial = (!dhmK.s());\r// if (activeLayer == null) {\r// alert(\"Please select a layer\");\r// } else {\r// if (isTrial) {\r// alert(\"Joining Scale is not supported in trial mode.\\nPlease purchase a license to experience full functionality of Keep 'Em Separated\");\r// } else {\r// for (var d=0; d<activeLayer.length; d++) { \r// var curLayer = activeLayer[d];\r// var exists = false;\r// var threeD = false;\r// if (curLayer.threeDLayer == true) {\r// threeD = true;\r// }\r// try {\r// curLayer.property(\"ADBE Transform Group\").property(\"ADBE Scale\").expressionEnabled == true;\r// curLayer.Effects.property(\"X Scale\").property(\"ADBE Slider Control-0001\");\r// curLayer.Effects.property(\"Y Scale\").property(\"ADBE Slider Control-0001\");\r// typeof curLayer.Effects.property(\"X Scale\").property(\"ADBE Slider Control-0001\") != 'undefined';\r// typeof curLayer.Effects.property(\"Y Scale\").property(\"ADBE Slider Control-0001\") != 'undefined';\r// exists = true;\r// } catch(err) { \r// exists = false;\r// }\r// if (exists == false) {\r// alert(\"Layer hasn't had its Scale property separated yet. Please separate Scale with Keep 'Em Separated and try again\");\r// } else {\r// if (curLayer.Effects.property(\"X Scale\").property(\"ADBE Slider Control-0001\").numKeys==0 && curLayer.Effects.property(\"Y Scale\").property(\"ADBE Slider Control-0001\").numKeys==0) {\r// var slideValX = curLayer.Effects.property(\"X Scale\").property(\"ADBE Slider Control-0001\").value;\r// var slideValY = curLayer.Effects.property(\"Y Scale\").property(\"ADBE Slider Control-0001\").value;\r// if (threeD == true) {\r// var slideValZ = curLayer.Effects.property(\"Z Scale\").property(\"ADBE Slider Control-0001\").value;\r// curLayer.Effects.property(\"Z Scale\").remove();\r// }\r// curLayer.property(\"ADBE Transform Group\").property(\"ADBE Scale\").expression = ''; \r// curLayer.Effects.property(\"X Scale\").remove();\r// curLayer.Effects.property(\"Y Scale\").remove();\r// if (threeD == false) {\r// curLayer.property(\"ADBE Transform Group\").property(\"ADBE Scale\").setValue([slideValX,slideValY]);\r// } else {\r// curLayer.property(\"ADBE Transform Group\").property(\"ADBE Scale\").setValue([slideValX,slideValY,slideValZ]);\r// }\r// } else {\r// if (threeD == false) {\r// var oldKeys = getKeyframestoJoin (curLayer.Effects.property(\"X Scale\").property(\"ADBE Slider Control-0001\"), curLayer.Effects.property(\"Y Scale\").property(\"ADBE Slider Control-0001\"),0);\r// } else {\r// var oldKeys = getKeyframestoJoin (curLayer.Effects.property(\"X Scale\").property(\"ADBE Slider Control-0001\"), curLayer.Effects.property(\"Y Scale\").property(\"ADBE Slider Control-0001\"),curLayer.Effects.property(\"Z Scale\").property(\"ADBE Slider Control-0001\"));\r// deleteKeyframes(curLayer.Effects.property(\"Z Scale\").property(\"ADBE Slider Control-0001\"));\r// curLayer.Effects.property(\"Z Scale\").remove();\r// } \r// deleteKeyframes(curLayer.Effects.property(\"X Scale\").property(\"ADBE Slider Control-0001\"));\r// deleteKeyframes(curLayer.Effects.property(\"Y Scale\").property(\"ADBE Slider Control-0001\"));\r// curLayer.property(\"ADBE Transform Group\").property(\"ADBE Scale\").expression = '';\r// curLayer.Effects.property(\"X Scale\").remove();\r// curLayer.Effects.property(\"Y Scale\").remove();\r// pasteKeyframestoJoin(curLayer.property(\"ADBE Transform Group\").property(\"ADBE Scale\"),oldKeys);\r// } \r// \r// }\r// \r// }\r// }\r// }\r// app.endUndoGroup();\r//\r// \r//\r// \r// } \r\reval(\"@JSXBIN@[email protected]@MyBbyBnABMAbyBnAEMJbyBn0AGJMnASzGjUjXjPiEjJjNBhLXzMiUjXjPiEifiTiQiBiUiJiBiMCfjzRiQjSjPjQjFjSjUjZiWjBjMjVjFiUjZjQjFDfnffJNnASzIjUjIjSjFjFiEjJjNEhMXzOiUjIjSjFjFiEifiTiQiBiUiJiBiMFfjDfnffJOnASzMjLjFjZiJjOjEjFjYiMjJjTjUGFAnnffJPnASzGjUjIjSjFjFiEHhNncfftOQbRn0ACJRnASzJjUjPjUjBjMiLjFjZjTIAEXzDjNjBjYJfjzEiNjBjUjIKfRCXzHjOjVjNiLjFjZjTLfVzMiQjSjPjQjFjSjUjZiWjBjMhRMfiDXLfVzMiQjSjPjQjFjSjUjZiWjBjMhSNfiEffnffbySn0ACJSnASzGjYiBjSjSjBjZOhOAnnftJySnASzGjZiBjSjSjBjZPhPAnnftACzChdhdQVzMiQjSjPjQjFjSjUjZiWjBjMhTRfiFnndAbUn0ADJUnASIAEXJfjKfRDXLfVMfiDXLfVNfiEXLfVRfiFffnffbyVn0ADJVnASOhOAnnftJyVnASPhPAnnftJyVnASzGjaiBjSjSjBjZShQAnnftJWnASHhNnctffOYbZn0AEaZbygan0ABJganAEXzEjQjVjTjITfVOfhORBARCEXzIjLjFjZiWjBjMjVjFUfVMfiDRBVzBjYVfhRffEXzHjLjFjZiUjJjNjFWfVMfiDRBVVfhRfffffAVVfhRBXLfVMfiDByBzChchdXagcbygdn0ABJgdnAEXTfVPfhPRBARCEXUfVNfiERBVzBjZYfhSffEXWfVNfiERBVYfhSfffffAVYfhSBXLfVNfiEByBXOgfbyhAn0ABahAbyhBn0ABJhBnAEXTfVSfhQRBARCEXUfVRfiFRBVzBjaZfhTffEXWfVRfiFRBVZfhTfffffAVZfhTBXLfVRfiFByBXACQVHfhNnnctnOhEbhFn0ACahFbhGn0AUJhGnASzIjYiLjFjZiEjBjUjBgahUQzAgbfVOfhOjzBjJgcfnftJhHnASzIjZiLjFjZiEjBjUjBgdhVQgbfVPfhPjgcfnftOhIbyhJn0ABJhJnASzIjaiLjFjZiEjBjUjBgehWQgbfVSfhQjgcfnftACQVHfhNnnctbyhLn0ABJhLnASgehWnbftJhNnASzIiJjOjEjFjYiLjFjZgfHCzBhLhAjgcfnndBnffbyhOn0AGJhOnASzLjJjTjUjIjFjSjFiLjFjZiYhBhXncfftJyhOnASzLjJjTjUjIjFjSjFiLjFjZiZhChYncfftJyhOnASzLjJjTjUjIjFjSjFiLjFjZiahDhZncfftJyhOnASzGjPjVjUjPjGiYhEhancfftJyhOnASzGjPjVjUjPjGiZhFhbncfftJyhOnASzGjPjVjUjPjGiahGhcncfftghPbyBn0ADJhQnASzFjUjSjJjBjMhHhdCXXzGjMjFjOjHjUjIhIfVOfhOjgcfnnnftJhRnACQVhHfhdnncfJhSnACzDhBhdhdhJizGjUjZjQjFjPjGhKXzBhRhLfVgafhUjzJjVjOjEjFjGjJjOjFjEhMfnnABnzDjFjSjShNnbyBn0ABJhUnAShEyBnctffghWbyBn0ADJhXnAShHhdCXXhIfVPfhPjgcfnnnftJhYnACQVhHfhdnncfJhZnAChJihKXhLfVgdfhVjhMfnnABnhNnbyBn0ABJhbnAShFyBnctffOhdbyhen0ABghebyBn0ADJhfnAShHhdCXXhIfVSfhQjgcfnnnftJiAnACQVhHfhdnncfJiBnAChJihKXhLfVgefhWjhMfnnABnhNnbyBn0ABJiDnAShGyBnctffACQVHfhNnnctnOiHbyiIn0ABOiIbyiJn0ABOiJbiKn0ANJiKnABjzKjLjFjZiUjJjNjFiWjBjShOfXhLfVgdfhVnfJiLnASzIjOjFjXiJjOjEjFjYhPIChAjgcfnndBnffJiMnAShBhXncfffJiNnAShChYnctffJiOnASzJjOjFjXiYiWjBjMjVjFhQheEXzOjTjFjUiWjBjMjVjFiBjUiUjJjNjFhRfVMfiDRCXhLfVgdfhVEXzLjWjBjMjVjFiBjUiUjJjNjFhSfVMfiDRCXhLfVgdfhVFctffffnffJiPnASzHjDjVjSiYjLjFjZhTBEXhSfVMfiDRCXhLfVgdfhVFctffnffJiQnAEXzGjJjOjTjFjSjUhUfVOfhORCjgcfARCVhTfBXhLfVgdfhVfffJiRnASzIiWjBjMjVjFiLjFjZhVJARCVhTfBXzBhQhWfVgdfhVfnffJiSnASzKjLjFjZiJjOiUjZjQjFiYhXKEXzWjLjFjZiJjOiJjOjUjFjSjQjPjMjBjUjJjPjOiUjZjQjFhYfVMfiDRBVhPfIffnffJiTnASzLjLjFjZiPjVjUiUjZjQjFiYhZNEXzXjLjFjZiPjVjUiJjOjUjFjSjQjPjMjBjUjJjPjOiUjZjQjFhafVMfiDRBVhPfIffnffJiUnASzKjLjFjZiJjOiUjZjQjFiZhbLEXhYfVMfiDRBVhPfIffnffJiVnASzLjLjFjZiPjVjUiUjZjQjFiZhcOEXhafVMfiDRBVhPfIffnffJiWnASIAEXJfjKfRCXLfVMfiDXLfVNfiEffnffACQVhEfhannctOiXbiYn0ANJiYnABjhOfXhLfVgafhUnfJiZnAShPIChAjgcfnndBnffJianAShBhXnctffJibnAShChYncfffJicnASzJjOjFjXiZiWjBjMjVjFhdhfEXhRfVNfiERCXhLfVgafhUEXhSfVNfiERCXhLfVgafhUFctffffnffJidnASzHjDjVjSiZjLjFjZheCEXhSfVNfiERCXhLfVgafhUFctffnffJienAEXhUfVPfhPRCjgcfARCVhefCXhLfVgafhUfffJifnAShVJARCXhWfVgafhUVhefCfnffJjAnAShXKEXhYfVMfiDRBVhPfIffnffJjBnAShZNEXhafVMfiDRBVhPfIffnffJjCnAShbLEXhYfVMfiDRBVhPfIffnffJjDnAShcOEXhafVMfiDRBVhPfIffnffJjEnASIAEXJfjKfRCXLfVMfiDXLfVNfiEffnffACQVhFfhbnnctnAUzCjcjchfCQVhEfhannctCQVhFfhbnnctnnbyjHn0ABOjHbjIn0AHJjInAShVJARCXhWfVgafhUXhWfVgdfhVfnffJjJnABjhOfXhLfVgafhUnfJjKnAShPIChAjgcfnndBnffJjLnAShXKEXhYfVMfiDRBVhPfIffnffJjMnAShZNEXhafVMfiDRBVhPfIffnffJjNnAShbLEXhYfVNfiERBVhPfIffnffJjOnAShcOEXhafVNfiERBVhPfIffnffACQXhLfVgafhUXhLfVgdfhVnnOjPbjQn0ANJjQnAShPIChAjgcfnndBnffJjRnAShBhXncfffJjSnAShChYnctffJjTnABjhOfXhLfVgdfhVnfJjUnAShQheEXhRfVMfiDRCXhLfVgdfhVEXhSfVMfiDRCXhLfVgdfhVFctffffnffJjVnAShTBEXhSfVMfiDRCXhLfVgdfhVFctffnffJjWnAEXhUfVOfhORCjgcfARCVhTfBXhLfVgdfhVfffJjXnAShVJARCVhTfBXhWfVgdfhVfnffJjYnAShXKEXhYfVMfiDRBVhPfIffnffJjZnAShZNEXhafVMfiDRBVhPfIffnffJjanAShbLEXhYfVNfiERBVhPfIffnffJjbnAShcOEXhafVNfiERBVhPfIffnffJjcnASIAEXJfjKfRCXLfVMfiDXLfVNfiEffnffACzBheiAXhLfVgafhUXhLfVgdfhVnnOjdbjen0ANJjenAShPIChAjgcfnndBnffJjfnAShBhXnctffJkAnAShChYncfffJkBnABjhOfXhLfVgafhUnfJkCnAShdhfEXhRfVNfiERCXhLfVgafhUEXhSfVNfiERCXhLfVgafhUFctffffnffJkDnASheCEXhSfVNfiERCXhLfVgafhUFctffnffJkEnAEXhUfVPfhPRCjgcfARCVhefCXhLfVgafhUfffJkFnAShVJARCXhWfVgafhUVhefCfnffJkGnAShXKEXhYfVMfiDRBVhPfIffnffJkHnAShZNEXhafVMfiDRBVhPfIffnffJkInAShbLEXhYfVNfiERBVhPfIffnffJkJnAShcOEXhafVNfiERBVhPfIffnffJkKnASIAEXJfjKfRCXLfVMfiDXLfVNfiEffnffACiAXhLfVgdfhVXhLfVgafhUnnnACQVHfhNnncfbykPn0ABOkPbykQn0ABOkQbykRn0ABOkRbkSn0AQJkSnABjhOfXhLfVgdfhVnfJkTnAShPIChAjgcfnndBnffJkUnAShBhXncfffJkVnAShChYnctffJkWnAShDhZnctffJkXnAShQheEXhRfVMfiDRCXhLfVgdfhVEXhSfVMfiDRCXhLfVgdfhVFctffffnffJkYnAShTBEXhSfVMfiDRCXhLfVgdfhVFctffnffJkZnAEXhUfVOfhORCjgcfARCVhTfBXhLfVgdfhVfffJkanAShVJARDVhTfBXhWfVgdfhVXhWfVgefhWfnffJkbnAShXKEXhYfVMfiDRBVhPfIffnffJkcnAShZNEXhafVMfiDRBVhPfIffnffJkdnAShbLEXhYfVNfiERBVhPfIffnffJkenAShcOEXhafVNfiERBVhPfIffnffJkfnASzKjLjFjZiJjOiUjZjQjFiaiBMEXhYfVRfiFRBVhPfIffnffJlAnASzLjLjFjZiPjVjUiUjZjQjFiaiCPEXhafVRfiFRBVhPfIffnffJlBnASIAEXJfjKfRDXLfVMfiDXLfVNfiEXLfVRfiFffnffAUzChGhGiDCQVhFfhbnncfCQVhGfhcnncfnnOlCblDn0ATJlDnABjhOfXhLfVgefhWnfJlEnAShPIChAjgcfnndBnffJlFnAShBhXncfffJlGnAShChYncfffJlHnAShDhZnctffJlInAShQheEXhRfVMfiDRCXhLfVgefhWEXhSfVMfiDRCXhLfVgefhWFctffffnffJlJnAShdhfEXhRfVNfiERCXhLfVgefhWEXhSfVNfiERCXhLfVgefhWFctffffnffJlKnAShTBEXhSfVMfiDRCXhLfVgefhWFctffnffJlLnASheCEXhSfVNfiERCXhLfVgefhWFctffnffJlMnAEXhUfVOfhORCjgcfARCVhTfBXhLfVgefhWfffJlNnAEXhUfVPfhPRCjgcfARCVhefCXhLfVgefhWfffJlOnAShVJARDVhTfBVhefCXhWfVgefhWfnffJlPnAShXKEXhYfVMfiDRBVhPfIffnffJlQnAShZNEXhafVMfiDRBVhPfIffnffJlRnAShbLEXhYfVNfiERBVhPfIffnffJlSnAShcOEXhafVNfiERBVhPfIffnffJlTnASiBMEXhYfVRfiFRBVhPfIffnffJlUnASiCPEXhafVRfiFRBVhPfIffnffJlVnASIAEXJfjKfRDXLfVMfiDXLfVNfiEXLfVRfiFffnffAUiDCQVhFfhbnnctCQVhGfhcnncfnnnACQVhEfhannctOlXbylYn0ABOlYblZn0ATJlZnABjhOfXhLfVgefhWnfJlanAShPIChAjgcfnndBnffJlbnAShBhXnctffJlcnAShChYncfffJldnAShDhZnctffJlenAShQheEXhRfVMfiDRCXhLfVgefhWEXhSfVMfiDRCXhLfVgefhWFctffffnffJlfnAShTBEXhSfVMfiDRCXhLfVgefhWFctffnffJmAnAShdhfEXhRfVNfiERCXhLfVgefhWEXhSfVNfiERCXhLfVgefhWFctffffnffJmBnASheCEXhSfVNfiERCXhLfVgefhWFctffnffJmCnAEXhUfVOfhORCjgcfARCVhTfBXhLfVgefhWfffJmDnAEXhUfVPfhPRCjgcfARCVhefCXhLfVgefhWfffJmEnAShVJARDVhTfBVhefCXhWfVgefhWfnffJmFnAShXKEXhYfVMfiDRBVhPfIffnffJmGnAShZNEXhafVMfiDRBVhPfIffnffJmHnAShbLEXhYfVNfiERBVhPfIffnffJmInAShcOEXhafVNfiERBVhPfIffnffJmJnASiBMEXhYfVRfiFRBVhPfIffnffJmKnASiCPEXhafVRfiFRBVhPfIffnffJmLnASIAEXJfjKfRDXLfVMfiDXLfVNfiEXLfVRfiFffnffACQVhGfhcnncfbmNn0ATJmNnABjhOfXhLfVgafhUnfJmOnAShPIChAjgcfnndBnffJmPnAShBhXnctffJmQnAShChYncfffJmRnAShDhZncfffJmSnAShdhfEXhRfVNfiERCXhLfVgafhUEXhSfVNfiERCXhLfVgafhUFctffffnffJmTnASzJjOjFjXiaiWjBjMjVjFiEiAEXhRfVRfiFRCXhLfVgafhUEXhSfVRfiFRCXhLfVgafhUFctffffnffJmUnASheCEXhSfVNfiERCXhLfVgafhUFctffnffJmVnASzHjDjVjSiajLjFjZiFDEXhSfVRfiFRCXhLfVgafhUFctffnffJmWnAEXhUfVPfhPRCjgcfARCVhefCXhLfVgafhUfffJmXnAEXhUfVSfhQRCjgcfARCViFfDXhLfVgafhUfffJmYnAShVJARDXhWfVgafhUVhefCViFfDfnffJmZnAShXKEXhYfVMfiDRBVhPfIffnffJmanAShZNEXhafVMfiDRBVhPfIffnffJmbnAShbLEXhYfVNfiERBVhPfIffnffJmcnAShcOEXhafVNfiERBVhPfIffnffJmdnASiBMEXhYfVRfiFRBVhPfIffnffJmenASiCPEXhafVRfiFRBVhPfIffnffJmfnASIAEXJfjKfRDXLfVMfiDXLfVNfiEXLfVRfiFffnffACQVhFfhbnnctbnCn0AQJnCnABjhOfXhLfVgafhUnfJnDnAShPIChAjgcfnndBnffJnEnAShBhXnctffJnFnAShChYnctffJnGnAShDhZncfffJnHnASiEiAEXhRfVRfiFRCXhLfVgafhUEXhSfVRfiFRCXhLfVgafhUFctffffnffJnInASiFDEXhSfVRfiFRCXhLfVgafhUFctffnffJnJnAEXhUfVSfhQRCjgcfARCViFfDXhLfVgafhUfffJnKnAShVJARDXhWfVgafhUXhWfVgdfhVViFfDfnffJnLnAShXKEXhYfVMfiDRBVhPfIffnffJnMnAShZNEXhafVMfiDRBVhPfIffnffJnNnAShbLEXhYfVNfiERBVhPfIffnffJnOnAShcOEXhafVNfiERBVhPfIffnffJnPnASiBMEXhYfVRfiFRBVhPfIffnffJnQnASiCPEXhafVRfiFRBVhPfIffnffJnRnASIAEXJfjKfRDXLfVMfiDXLfVNfiEXLfVRfiFffnffAUhfUhfCQVhEfhannctCQVhFfhbnnctnnCQVhGfhcnnctnnbynUn0ABOnUbnVn0AJJnVnAShVJARDXhWfVgafhUXhWfVgdfhVXhWfVgefhWfnffJnWnABjhOfXhLfVgafhUnfJnXnAShPIChAjgcfnndBnffJnYnAShXKEXhYfVMfiDRBVhPfIffnffJnZnAShZNEXhafVMfiDRBVhPfIffnffJnanAShbLEXhYfVNfiERBVhPfIffnffJnbnAShcOEXhafVNfiERBVhPfIffnffJncnASiBMEXhYfVRfiFRBVhPfIffnffJndnASiCPEXhafVRfiFRBVhPfIffnffACQCQXhLfVgafhUXhLfVgdfhVnnXhLfVgefhWnnbnfn0APJnfnASzGjOjPjUiOjVjNiGiBncfftg2ABbyBn0ADJ2BBnACzChBhdiHihKXhLfVgafhUnneJjVjOjEjFjGjJjOjFjEJ2CBnACiHihKXhLfVgdfhVnneJjVjOjEjFjGjJjOjFjEJ2DBnACiHihKXhLfVgefhWnneJjVjOjEjFjGjJjOjFjEABnhNnbyBn0ABJ2FBnASiGyBnctffJ2HBnASzHjNjJjOiUjJjNjFiIiCndAftO2IBby2JBn0ABJ2JBnASiIiCEXzDjNjJjOiJfjKfRDXhLfVgafhUXhLfVgdfhVXhLfVgefhWffnffACQViGfiBnncfby2LBn0ABO2LBby2MBn0ABO2MBby2NBn0ABJ2NBnASiIiCXhLfVgefhWnffACQihKXhLfVgdfhVnneGjOjVjNjCjFjSO2OBby2PBn0ABJ2PBnASiIiCXhLfVgdfhVnffACQihKXhLfVgefhWnneGjOjVjNjCjFjSby2RBn0ABJ2RBnASiIiCEXiJfjKfRCXhLfVgdfhVXhLfVgefhWffnffACiHihKXhLfVgafhUnneGjOjVjNjCjFjSO2TBby2UBn0ABO2UBby2VBn0ABJ2VBnASiIiCXhLfVgafhUnffACQihKXhLfVgefhWnneGjOjVjNjCjFjSby2XBn0ABJ2XBnASiIiCEXiJfjKfRCXhLfVgafhUXhLfVgefhWffnffACQihKXhLfVgdfhVnneGjOjVjNjCjFjSby2gaBn0ABJ2gaBnASiIiCEXiJfjKfRCXhLfVgafhUXhLfVgdfhVffnffJ2geBnABjhOfViIfiCnfJ2gfBnAShPIChAjgcfnndBnffO2hABb2hBBn0AEJ2hBBnAShBhXncfffJ2hCBnAShQheEXhRfVMfiDRCViIfiCEXhSfVMfiDRCViIfiCFctffffnffJ2hDBnAShTBEXhSfVMfiDRCViIfiCFctffnffJ2hEBnAEXhUfVOfhORCjgcfARCVhTfBViIfiCfffACiHXhLfVgafhUViIfiCnnnO2hGBb2hHBn0AEJ2hHBnAShChYncfffJ2hIBnAShdhfEXhRfVNfiERCViIfiCEXhSfVNfiERCViIfiCFctffffnffJ2hJBnASheCEXhSfVNfiERCViIfiCFctffnffJ2hKBnAEXhUfVPfhPRCjgcfARCVhefCViIfiCfffACiHXhLfVgdfhVViIfiCnnnO2hMBb2hNBn0AEJ2hNBnAShDhZncfffJ2hOBnASiEiAEXhRfVRfiFRCViIfiCEXhSfVRfiFRCViIfiCFctffffnffJ2hPBnASiFDEXhSfVRfiFRCViIfiCFctffnffJ2hQBnAEXhUfVSfhQRCjgcfARCViFfDViIfiCfffACiHXhLfVgefhWViIfiCnnnJ2hSBnAShVJARDEXhSfVMfiDRCViIfiCFctffEXhSfVNfiERCViIfiCFctffEXhSfVRfiFRCViIfiCFctfffnffJ2hTBnAShXKEXhYfVMfiDRBVhPfIffnffJ2hUBnAShZNEXhafVMfiDRBVhPfIffnffJ2hVBnAShbLEXhYfVNfiERBVhPfIffnffJ2hWBnAShcOEXhafVNfiERBVhPfIffnffJ2hXBnASIAEXJfjKfRDXLfVMfiDXLfVNfiEXLfVRfiFffnffO2hbBby2hcBn0ABO2hcBby2hdBn0ABJ2hdBnACQVgffHVIfAnnACiHVgffHVIfAnnnAUhfUhfCQVhEfhannctCQVhFfhbnnctnnCQVhGfhcnnctnnnO2iCBb2iDBn0ACJ2iDBnASzIiBjVjUjPiCjFjaiYiKQEXzVjLjFjZiUjFjNjQjPjSjBjMiBjVjUjPiCjFjajJjFjSiLfVMfiDRBVgffHffnffJ2iEBnASzIiDjPjOjUiCjFjaiYiMTEXzVjLjFjZiUjFjNjQjPjSjBjMiDjPjOjUjJjOjVjPjVjTiNfVMfiDRBVgffHffnffAUiDCQVhXfKXzGiCiFiaiJiFiSiOfjzZiLjFjZjGjSjBjNjFiJjOjUjFjSjQjPjMjBjUjJjPjOiUjZjQjFiPfnnCQVhZfNXiOfjiPfnnnnnO2iGBb2iHBn0ACJ2iHBnASzIiBjVjUjPiCjFjaiZiQREXiLfVNfiERBVgffHffnffJ2iIBnASzIiDjPjOjUiCjFjaiZiRUEXiNfVNfiERBVgffHffnffAUiDCQVhbfLXiOfjiPfnnCQVhcfOXiOfjiPfnnnnnO2iKBby2iLBn0ABO2iLBb2iMBn0ACJ2iMBnASzIiBjVjUjPiCjFjaiaiSSEXiLfVNfiERBVgffHffnffJ2iNBnASzIiDjPjOjUiCjFjaiaiTVEXiNfVNfiERBVgffHffnffAUiDCQViBfMXiOfjiPfnnCQViCfPXiOfjiPfnnnnnACQVHfhNnnctb2iQBn0ACJ2iQBnASiSSndAffJ2iRBnASiTVndAffO2iUBb2iVBn0ACJ2iVBnASzHjJjOiFjBjTjFiYiUWEXzRjLjFjZiJjOiUjFjNjQjPjSjBjMiFjBjTjFiVfVMfiDRBVgffHffnffJ2iWBnASzIiPjVjUiFjBjTjFiYiWZEXzSjLjFjZiPjVjUiUjFjNjQjPjSjBjMiFjBjTjFiXfVMfiDRBVgffHffnffAUhfCiHVhXfKXzEiIiPiMiEiYfjiPfnnCiHVhZfNXiYfjiPfnnnnnO2iYBb2iZBn0ACJ2iZBnASzHjJjOiFjBjTjFiZiZXEXiVfVNfiERBVgffHffnffJ2iaBnASzIiPjVjUiFjBjTjFiZiagaEXiXfVNfiERBVgffHffnffAUhfCiHVhbfLXiYfjiPfnnCiHVhcfOXiYfjiPfnnnnnO2icBby2idBn0ABO2idBb2ieBn0ACJ2ieBnASzHjJjOiFjBjTjFiaibYEXiVfVRfiFRBVgffHffnffJ2ifBnASzIiPjVjUiFjBjTjFiaicgbEXiXfVRfiFRBVgffHffnffAUhfCiHViBfMXiYfjiPfnnCiHViCfPXiYfjiPfnnnnnACQVHfhNnnctb2jCBn0ACJ2jCBnASibYndAffJ2jDBnASicgbndAffO2jFBb2jGBn0AFJ2jGBnASzJjTiBjVjUjPiCjFjaiYidgcEXzUjLjFjZiTjQjBjUjJjBjMiBjVjUjPiCjFjajJjFjSiefVMfiDRBVgffHffnffJ2jHBnASzJjTiDjPjOjUiCjFjaiYifgfEXzUjLjFjZiTjQjBjUjJjBjMiDjPjOjUjJjOjVjPjVjTjAfVMfiDRBVgffHffnffJ2jIBnASzKjJjOiTjQjBiUjBjOjHiYjBhCEXzTjLjFjZiJjOiTjQjBjUjJjBjMiUjBjOjHjFjOjUjCfVMfiDRBVgffHffnffJ2jJBnASzLiPjVjUiTjQjBiUjBjOjHiYjDhFEXzUjLjFjZiPjVjUiTjQjBjUjJjBjMiUjBjOjHjFjOjUjEfVMfiDRBVgffHffnffJ2jKBnASzGiSjPjWjFjSiYjFhIEXzJjLjFjZiSjPjWjJjOjHjGfVMfiDRBVgffHffnffAUhfCQXzRjQjSjPjQjFjSjUjZiWjBjMjVjFiUjZjQjFjHfVMfiDVBfhLnnCQXjHfVMfiDVEfhMnnnnnO2jMBb2jNBn0AFJ2jNBnASzJjTiBjVjUjPiCjFjaiZjIgdEXiefVNfiERBVgffHffnffJ2jOBnASzJjTiDjPjOjUiCjFjaiZjJhAEXjAfVNfiERBVgffHffnffJ2jPBnASzKjJjOiTjQjBiUjBjOjHiZjKhDEXjCfVNfiERBVgffHffnffJ2jQBnASzLiPjVjUiTjQjBiUjBjOjHiZjLhGEXjEfVNfiERBVgffHffnffJ2jRBnASzGiSjPjWjFjSiZjMhJEXjGfVNfiERBVgffHffnffAUhfCQXjHfVNfiEVBfhLnnCQXjHfVNfiEVEfhMnnnnnO2jTBby2jUBn0ABO2jUBb2jVBn0AFJ2jVBnASzJjTiBjVjUjPiCjFjaiajNgeEXiefVRfiFRBVgffHffnffJ2jWBnASzJjTiDjPjOjUiCjFjaiajOhBEXjAfVRfiFRBVgffHffnffJ2jXBnASzKjJjOiTjQjBiUjBjOjHiajPhEEXjCfVRfiFRBVgffHffnffJ2jYBnASzLiPjVjUiTjQjBiUjBjOjHiajQhHEXjEfVRfiFRBVgffHffnffJ2jZBnASzGiSjPjWjFjSiajRhKEXjGfVRfiFRBVgffHffnffAUhfCQXjHfVRfiFVBfhLnnCQXjHfVRfiFVEfhMnnnnnACQVHfhNnnctb2jcBn0AFJ2jcBnASjNgendAffJ2jdBnASjOhBndAffJ2jeBnASjPhEndAffJ2jfBnASjQhHndAffJ2kABnASjRhKndAffJ2kCBnABQgbfVGfFXhIfVGfFWzGiPjCjKjFjDjUjShIhOjhOfgfVgffHzJiWjBjMjVjFiLjFjZiYjTXhWfVhVfJzJiWjBjMjVjFiLjFjZiZjUXhLfVhVfJzJiWjBjMjVjFiLjFjZiajVXzBhSjWfVhVfJhVVhVfJzJjLjFjZiJjOiUjZjQjFjXVhXfKzKjLjFjZiPjVjUiUjZjQjFjYVhZfNhbVhbfLhcVhcfOiBViBfMiCViCfPiKViKfQiQViQfRiSViSfSiMViMfTiRViRfUiTViTfViUViUfWiZViZfXibVibfYiWViWfZiaViafgaicVicfgbidVidfgcjIVjIfgdjNVjNfgeifViffgfjJVjJfhAjOVjOfhBjBVjBfhCjKVjKfhDjPVjPfhEjDVjDfhFjLVjLfhGjQVjQfhHjFVjFfhIjMVjMfhJjRVjRfhKHVHfhNnfAjgcfAVIfAByBzBhcjZZ2lNBnAVGfFAUiDCiHVOfhOnnbCiHVPfhPnnbnnnACiAVIfAnndAnAiGI40BiAG4F0AiAgf4H0AiAhV4J0AiAB4hL0AiAE4hM0AiAH4hN0AiAiF4D0AiAzEjQjSjPjQja4E0AiAhX4K0AiAhb4L0AiAhZ4N0AiAhc4O0AiAhT4B0AiAhe4C0AiAiZ4X0AiAia4ga0AiAhP4I0AiAR4C0AhAO4hO0AiAP4hP0AiAS4hQ0AiAM40BhAN4B0AhAZ4hT0AiAga4hU0AiAgd4hV0AiAge4hW0AiAhB4hX0AiAhC4hY0AiAhD4hZ0AiAhE4ha0AiAhF4hb0AiAhG4hc0AiAhH4hd0AiAhQ4he0AiAhd4hf0AiAiE4iA0AiAiG4iB0AiAiI4iC0AiAV4hR0AiAY4hS0AiAzLjLjFjZiUjJjNjFiWjBjShSjb4G0AiAiB4M0AiAiC4P0AiAiK4Q0AiAiQ4R0AiAiS4S0AiAiM4T0AiAiR4U0AiAiT4V0AiAiU4W0AiAib4Y0AiAiW4Z0AiAic4gb0AiAid4gc0AiAjI4gd0AiAjN4ge0AiAif4gf0AiAjJ4hA0AiAjO4hB0AiAjB4hC0AiAjK4hD0AiAjP4hE0AiAjD4hF0AiAjL4hG0AiAjQ4hH0AiAjF4hI0AiAjM4hJ0AiAjR4hK0AiADiDAzSjHjFjUiLjFjZjGjSjBjNjFjTjUjPiKjPjJjOjcA2lQBM2lSBbyBn0ABO2lTBb2lUBn0AFJ2lVBnASzOiLjFjZiBjSjSjBjZiMjFjOjHjUjIjdAXhIfVzIiLjFjZiBjSjSjBjZjefNnffJ2lWBnABjzHjJjTiUjSjJjBjMjffhzBhBkAEXzBjTkBfjzEjEjIjNiLkCfnfnfa2lXBb2lYBn0AMJ2lYBnASzJjBjEjEiOjFjXiLjFjZkDCEXzGjBjEjEiLjFjZkEfVzLiQjSjPjQjFjSjUjZiWjBjMkFfMRBXhOfQgbfVjefNVzBjLkGfKffnffJ2lZBnASzLjOjFjXiLjFjZiJjOjEjFjYkHDVkDfCnffJ2laBnAEXzNjTjFjUiWjBjMjVjFiBjUiLjFjZkIfVkFfMRCVkHfDXhVfQgbfVjefNVkGfKffJ2lbBnASzGjLjFjZiJjOiYkJEXhWfXiUfQgbfVjefNVkGfKnffJ2lcBnASzGjLjFjZiJjOiZkKFXhWfXiZfQgbfVjefNVkGfKnffJ2ldBnASzHjLjFjZiPjVjUiYkLHXhWfXiWfQgbfVjefNVkGfKnffJ2leBnASzHjLjFjZiPjVjUiZkMIXhWfXiafQgbfVjefNVkGfKnffO2lfBb2mABn0ACJ2mABnASzGjLjFjZiJjOiakNGXhWfXibfQgbfVjefNVkGfKnffJ2mBBnASzHjLjFjZiPjVjUiakOJXhWfXicfQgbfVjefNVkGfKnffACQXHfQgbfVjefNVkGfKnnctnO2mDBby2mEBn0ABO2mEBby2mFBn0ABJ2mFBnAEXzUjTjFjUiUjFjNjQjPjSjBjMiFjBjTjFiBjUiLjFjZkPfVkFfMRDVkHfDARDVkJfEVkKfFVkNfGfARDVkLfHVkMfIVkOfJfffACQXHfQgbfVjefNVkGfKnnctby2mHBn0ABJ2mHBnAEXkPfVkFfMRDVkHfDARDVkJfEVkKfFVkKfFfARDVkLfHVkMfIVkMfIfffACiHXhZfQgbfVjefNVkGfKXiYfjiPfnnnJ2mKBnAEXzZjTjFjUiJjOjUjFjSjQjPjMjBjUjJjPjOiUjZjQjFiBjUiLjFjZkQfVkFfMRDVkHfDXjXfQgbfVjefNVkGfKXjYfQgbfVjefNVkGfKffO2mLBb2mMBn0ACJ2mMBnAEXzgajTjFjUiUjFjNjQjPjSjBjMiDjPjOjUjJjOjVjPjVjTiBjUiLjFjZkRfVkFfMRCVkHfDXiMfQgbfVjefNVkGfKffJ2mNBnAEXzgajTjFjUiUjFjNjQjPjSjBjMiBjVjUjPiCjFjajJjFjSiBjUiLjFjZkSfVkFfMRCVkHfDXiKfQgbfVjefNVkGfKffAUiDCQXhXfQgbfVjefNVkGfKXiOfjiPfnnCQXhZfQgbfVjefNVkGfKXiOfjiPfnnnnnO2mPBb2mQBn0ADJ2mQBnAEXzZjTjFjUiTjQjBjUjJjBjMiDjPjOjUjJjOjVjPjVjTiBjUiLjFjZkTfVkFfMRCVkHfDXiffQgbfVjefNVkGfKffJ2mRBnAEXzZjTjFjUiTjQjBjUjJjBjMiBjVjUjPiCjFjajJjFjSiBjUiLjFjZkUfVkFfMRCVkHfDXidfQgbfVjefNVkGfKffJ2mSBnAEXzXjTjFjUiTjQjBjUjJjBjMiUjBjOjHjFjOjUjTiBjUiLjFjZkVfVkFfMRDVkHfDXjBfQgbfVjefNVkGfKXjDfQgbfVjefNVkGfKffAUhfCQXjHfVkFfMXCfjDfnnCQXjHfVkFfMXFfjDfnnnnnAVkGfKAVjdfAByBjZO2mVBby2mWBn0ABa2mWBby2mXBn0ABJ2mXBnAEXzOjTjFjUiSjPjWjJjOjHiBjUiLjFjZkWfVkFfMRCChAVzBjSkXfLnndBXjFfQgbfVjefNVkXfLffAVkXfLAVjdfAByBjZAUhfCQXjHfVkFfMXCfjDfnnCQXjHfVkFfMXFfjDfnnnnnZ2maBnAFctACQXLfVkFfMnndAnAOkF40BhAje4B0AhAjd40BiAkD4C0AiAkH4D0AiAkG4K0AiAzNjOjFjXjLjFjZiUjJjNjFiWjBjSkY4B0AiAkJ4E0AiAkK4F0AiAkX4L0AiAkN4G0AiAkL4H0AiAkM4I0AiAkO4J0AiACMAzUjQjBjTjUjFiLjFjZjGjSjBjNjFjTjUjPiKjPjJjOkZA2mcBM2meBbyBn0ABa2mfBb2nABn0ADJ2nABnASzIjQjSjPjQjFjSjUjZkaAQgbfVkFfBjVfnftJ2nBBnAEjzFjBjMjFjSjUkbfRBChAChAnjVfeKiWjBjMjVjFhAiLjFjZhAnnneDhAjJjTffJ2nCBnAEjkbfRBXhVfVkafAffAjVfAXhIfVkFfBByBjZACkF40BhAka40BiABBAzLjBjMjFjSjUiTjDjSjFjFjOkcA2nEBM2nFBbyBn0ABl2nGBby2nHBn0ABJ2nHBnAEXzJjSjFjNjPjWjFiLjFjZkdfVkFfARBFdBffACiAXLfVkFfAnnd0ABkF40BhAB0AzPjEjFjMjFjUjFiLjFjZjGjSjBjNjFjTkeA2nJBHJBnAEXzOjCjFjHjJjOiVjOjEjPiHjSjPjVjQkffjzDjBjQjQlAfRBFeViKjPjJjOhAiTjDjBjMjFhAiEjJjNjFjOjTjJjPjOjTffJEnABXhUfXzJjQjSjPjUjPjUjZjQjFlBfjzFiBjSjSjBjZlCfNyBnAMEbyBn0ABJFnAEXzGjTjQjMjJjDjFlDfezEjUjIjJjTlEfRDVzFjJjOjEjFjYlFfAFdAVzEjJjUjFjNlGfBffAClG4B0AhAlF40BhAC0AgbCGnfJ2nLBnASzJjDjPjNjQiMjBjZjFjSlHAXzKjBjDjUjJjWjFiJjUjFjNlIfXzHjQjSjPjKjFjDjUlJfjlAfnftJ2nMBnASzLjBjDjUjJjWjFiMjBjZjFjSlKBXzOjTjFjMjFjDjUjFjEiMjBjZjFjSjTlLfVlHfAnftJ2nNBnABjjffhkAEXkBfjkCfnfnfO2nOBby2nPBn0ABJ2nPBnAEjkbfRBFeViQjMjFjBjTjFhAjTjFjMjFjDjUhAjBhAjMjBjZjFjSffACQVlKfBnnbby2nRBn0ABO2nRBby2nSBn0ABJ2nSBnAEjkbfRBFejeiKjPjJjOjJjOjHhAiTjDjBjMjFhAjJjThAjOjPjUhAjTjVjQjQjPjSjUjFjEhAjJjOhAjUjSjJjBjMhAjNjPjEjFhOKiQjMjFjBjTjFhAjQjVjSjDjIjBjTjFhAjBhAjMjJjDjFjOjTjFhAjUjPhAjFjYjQjFjSjJjFjOjDjFhAjGjVjMjMhAjGjVjOjDjUjJjPjOjBjMjJjUjZhAjPjGhAiLjFjFjQhAhHiFjNhAiTjFjQjBjSjBjUjFjEffAjjffby2nUBn0ABa2nUBb2nVBn0AGJ2nVBnASzIjDjVjSiMjBjZjFjSlMDQgbfVlKfBVzBjElNfCnftJ2nWBnASzGjFjYjJjTjUjTlOEncfftJ2nXBnASHFncfftO2nYBby2nZBn0ABJ2nZBnASHFnctffACQXzLjUjIjSjFjFiEiMjBjZjFjSlPfVlMfDnnctng2nbBbyBn0AGJ2ncBnACQXzRjFjYjQjSjFjTjTjJjPjOiFjOjBjCjMjFjElQfEXkafEXkafVlMfDRBFeUiBiEiCiFhAiUjSjBjOjTjGjPjSjNhAiHjSjPjVjQffRBFeKiBiEiCiFhAiTjDjBjMjFffnnctJ2ndBnAEXkafEXkafXzHiFjGjGjFjDjUjTlRfVlMfDRBFeHiYhAiTjDjBjMjFffRBFeYiBiEiCiFhAiTjMjJjEjFjShAiDjPjOjUjSjPjMhNhQhQhQhRffJ2neBnAEXkafEXkafXlRfVlMfDRBFeHiZhAiTjDjBjMjFffRBFeYiBiEiCiFhAiTjMjJjEjFjShAiDjPjOjUjSjPjMhNhQhQhQhRffJ2nfBnACiHhhKEXkafEXkafXlRfVlMfDRBFeHiYhAiTjDjBjMjFffRBFeYiBiEiCiFhAiTjMjJjEjFjShAiDjPjOjUjSjPjMhNhQhQhQhRffnneJjVjOjEjFjGjJjOjFjEJ2ACnACiHhhKEXkafEXkafXlRfVlMfDRBFeHiZhAiTjDjBjMjFffRBFeYiBiEiCiFhAiTjMjJjEjFjShAiDjPjOjUjSjPjMhNhQhQhQhRffnneJjVjOjEjFjGjJjOjFjEJ2BCnASlOEnctffABnhNnbyBn0ABJ2DCnASlOyBncfffO2FCby2GCn0ABJ2GCnAEjkbfRBFejOiMjBjZjFjShAjIjBjTjOhHjUhAjIjBjEhAjJjUjThAiTjDjBjMjFhAjQjSjPjQjFjSjUjZhAjTjFjQjBjSjBjUjFjEhAjZjFjUhOhAiQjMjFjBjTjFhAjTjFjQjBjSjBjUjFhAiTjDjBjMjFhAjXjJjUjIhAiLjFjFjQhAhHiFjNhAiTjFjQjBjSjBjUjFjEhAjBjOjEhAjUjSjZhAjBjHjBjJjOffACQVlOfEnncfby2ICn0ABO2ICb2JCn0AHJ2JCnASzJjTjMjJjEjFiWjBjMiYlSGXzFjWjBjMjVjFlTfEXkafEXkafXlRfVlMfDRBFeHiYhAiTjDjBjMjFffRBFeYiBiEiCiFhAiTjMjJjEjFjShAiDjPjOjUjSjPjMhNhQhQhQhRffnftJ2KCnASzJjTjMjJjEjFiWjBjMiZlUHXlTfEXkafEXkafXlRfVlMfDRBFeHiZhAiTjDjBjMjFffRBFeYiBiEiCiFhAiTjMjJjEjFjShAiDjPjOjUjSjPjMhNhQhQhQhRffnftO2LCb2MCn0ACJ2MCnASzJjTjMjJjEjFiWjBjMialVIXlTfEXkafEXkafXlRfVlMfDRBFeHiahAiTjDjBjMjFffRBFeYiBiEiCiFhAiTjMjJjEjFjShAiDjPjOjUjSjPjMhNhQhQhQhRffnftJ2NCnAEXzGjSjFjNjPjWjFlWfEXkafXlRfVlMfDRBFeHiahAiTjDjBjMjFffnfACQVHfFnnctnJ2PCnABXzKjFjYjQjSjFjTjTjJjPjOlXfEXkafEXkafVlMfDRBFeUiBiEiCiFhAiUjSjBjOjTjGjPjSjNhAiHjSjPjVjQffRBFeKiBiEiCiFhAiTjDjBjMjFffneAfJ2QCnAEXlWfEXkafXlRfVlMfDRBFeHiYhAiTjDjBjMjFffnfJ2RCnAEXlWfEXkafXlRfVlMfDRBFeHiZhAiTjDjBjMjFffnfO2SCby2TCn0ABJ2TCnAEXzIjTjFjUiWjBjMjVjFlYfEXkafEXkafVlMfDRBFeUiBiEiCiFhAiUjSjBjOjTjGjPjSjNhAiHjSjPjVjQffRBFeKiBiEiCiFhAiTjDjBjMjFffRBARCVlSfGVlUfHfffACQVHfFnncfby2VCn0ABJ2VCnAEXlYfEXkafEXkafVlMfDRBFeUiBiEiCiFhAiUjSjBjOjTjGjPjSjNhAiHjSjPjVjQffRBFeKiBiEiCiFhAiTjDjBjMjFffRBARDVlSfGVlUfHVlVfIfffAUiDCQXLfEXkafEXkafXlRfVlMfDRBFeHiYhAiTjDjBjMjFffRBFeYiBiEiCiFhAiTjMjJjEjFjShAiDjPjOjUjSjPjMhNhQhQhQhRffnndACQXLfEXkafEXkafXlRfVlMfDRBFeHiZhAiTjDjBjMjFffRBFeYiBiEiCiFhAiTjMjJjEjFjShAiDjPjOjUjSjPjMhNhQhQhQhRffnndAnnb2YCn0AHO2YCby2ZCn0ABJ2ZCnASzHjPjMjEiLjFjZjTlZJEjjcfRDEXkafEXkafXlRfVlMfDRBFeHiYhAiTjDjBjMjFffRBFeYiBiEiCiFhAiTjMjJjEjFjShAiDjPjOjUjSjPjMhNhQhQhQhRffEXkafEXkafXlRfVlMfDRBFeHiZhAiTjDjBjMjFffRBFeYiBiEiCiFhAiTjMjJjEjFjShAiDjPjOjUjSjPjMhNhQhQhQhRffFdAffnftACQVHfFnncfb2gbCn0ADJ2gbCnASlZJEjjcfRDEXkafEXkafXlRfVlMfDRBFeHiYhAiTjDjBjMjFffRBFeYiBiEiCiFhAiTjMjJjEjFjShAiDjPjOjUjSjPjMhNhQhQhQhRffEXkafEXkafXlRfVlMfDRBFeHiZhAiTjDjBjMjFffRBFeYiBiEiCiFhAiTjMjJjEjFjShAiDjPjOjUjSjPjMhNhQhQhQhRffEXkafEXkafXlRfVlMfDRBFeHiahAiTjDjBjMjFffRBFeYiBiEiCiFhAiTjMjJjEjFjShAiDjPjOjUjSjPjMhNhQhQhQhRffffnftJ2gcCnAEjkefRBEXkafEXkafXlRfVlMfDRBFeHiahAiTjDjBjMjFffRBFeYiBiEiCiFhAiTjMjJjEjFjShAiDjPjOjUjSjPjMhNhQhQhQhRffffJ2gdCnAEXlWfEXkafXlRfVlMfDRBFeHiahAiTjDjBjMjFffnfJ2gfCnAEjkefRBEXkafEXkafXlRfVlMfDRBFeHiYhAiTjDjBjMjFffRBFeYiBiEiCiFhAiTjMjJjEjFjShAiDjPjOjUjSjPjMhNhQhQhQhRffffJ2hACnAEjkefRBEXkafEXkafXlRfVlMfDRBFeHiZhAiTjDjBjMjFffRBFeYiBiEiCiFhAiTjMjJjEjFjShAiDjPjOjUjSjPjMhNhQhQhQhRffffJ2hBCnABXlXfEXkafEXkafVlMfDRBFeUiBiEiCiFhAiUjSjBjOjTjGjPjSjNhAiHjSjPjVjQffRBFeKiBiEiCiFhAiTjDjBjMjFffneAfJ2hCCnAEXlWfEXkafXlRfVlMfDRBFeHiYhAiTjDjBjMjFffnfJ2hDCnAEXlWfEXkafXlRfVlMfDRBFeHiZhAiTjDjBjMjFffnfJ2hECnAEjkZfRCEXkafEXkafVlMfDRBFeUiBiEiCiFhAiUjSjBjOjTjGjPjSjNhAiHjSjPjVjQffRBFeKiBiEiCiFhAiTjDjBjMjFffVlZfJffAVlNfCAXhIfVlKfBByBjZJ2hMCnAEXzMjFjOjEiVjOjEjPiHjSjPjVjQlafjlAfnfAKlS4G0AiAlU4H0AiAlV4I0AiAlH40BiAlK4B0AiAlM4D0AiAlZ4J0AiAH4F0AiAlO4E0AiAlN4C0AiAAKAzJjKjPjJjOiTjDjBjMjFlbA2hRC0EgbByB\");\r\r\r\t\r }", "title": "" }, { "docid": "94f761af8461998ee4dc747525ad6150", "score": "0.58249915", "text": "function ELSCloud()\r\n{\r\n eObj = document.getElementById('ElsPlugin');\r\n}", "title": "" }, { "docid": "cc8a487c04da8ca9399396f4074c18ef", "score": "0.5724273", "text": "function rajesh_costom() {\r\n\r\n}", "title": "" }, { "docid": "7eeb28f6bbf511680e425ba61c32c85a", "score": "0.5703657", "text": "function ECASMobile() {\n\n}", "title": "" }, { "docid": "d0d8f1ec4beab6a88f7885847f7c2bff", "score": "0.5633885", "text": "function SystemBanner() {}", "title": "" }, { "docid": "70f3ec037910d2b1e4cc2077cbd58135", "score": "0.5633287", "text": "function Start()\n{\n\tglobals = Globals.GetInstance();\n}", "title": "" }, { "docid": "4e59362bd2d79e08c4c17b7c8ea8c2cd", "score": "0.55340046", "text": "function main() {\n\t\tvar projDropdownID = '#projects-dropdown';\n\t\tvar navCollapseID = '#nav-collapse';\n\t\tvar navCollapseButtonID = '#nav-coll-button';\n\t\tvar noJsMessageID = '#no-js-message';\n\t\t// Hide the no-js-message\n\t\t$(noJsMessageID).hide();\n\t\t// Get rid of margin on header\n\t\t$('header').attr('style', 'margin-top: 0px; ');\n\t\t// Collapse the navbar (from no-js state)\n\t\tcollapseNavbar({ \n\t\t\tnavCollapseID: navCollapseID, \n\t\t\tbutton: navCollapseButtonID \n\t\t});\n\t\t// Highlight the active link\n\t\taddActiveLink();\n\t}", "title": "" }, { "docid": "4e59362bd2d79e08c4c17b7c8ea8c2cd", "score": "0.55340046", "text": "function main() {\n\t\tvar projDropdownID = '#projects-dropdown';\n\t\tvar navCollapseID = '#nav-collapse';\n\t\tvar navCollapseButtonID = '#nav-coll-button';\n\t\tvar noJsMessageID = '#no-js-message';\n\t\t// Hide the no-js-message\n\t\t$(noJsMessageID).hide();\n\t\t// Get rid of margin on header\n\t\t$('header').attr('style', 'margin-top: 0px; ');\n\t\t// Collapse the navbar (from no-js state)\n\t\tcollapseNavbar({ \n\t\t\tnavCollapseID: navCollapseID, \n\t\t\tbutton: navCollapseButtonID \n\t\t});\n\t\t// Highlight the active link\n\t\taddActiveLink();\n\t}", "title": "" }, { "docid": "a36ee8c11a0781717adc83d923a3e7e7", "score": "0.54965794", "text": "function initializeLocalPreview() {\n var ua = navigator.userAgent;\n window.EB = {\n _adConfig: {\n adId: 0,\n rnd: 0,\n uid: 0,\n customJSVars: {}\n },\n clickthrough: function(){\n if (newData.DEBUG) {\n console.log(\"EB.clickthrough: \", arguments);\n }\n \n },\n userActionCounter: function(){\n if (newData.DEBUG) {\n console.log(\"EB.userActionCounter: \", arguments);\n }\n },\n _sendMessage: function () {return;},\n API: {\n browser: {\n webkit: ua.match(/webkit/i) !== null,\n firefox: ua.match(/firefox/i) !== null\n },\n os: {\n ios: ua.match(/ipod|iphone|ipad/i) !== null,\n android: ua.match(/android/i) !== null,\n windowphone: ua.match(/windows phone/i) !== null,\n mobile: ua.match(/ipod|iphone|ipad|android|windows phone/i) !== null\n },\n setStyle: function (obj, styles) {\n for(var style in styles) {\n if(!styles.hasOwnProperty(style)) continue;\n obj.style[style] = styles[style];\n }\n },\n getCustomVar: function (name) {return window.EB._adConfig.customJSVars[name];}\n },\n Comm: {\n setName: function (name) {return name;},\n isConnected: function (name) { return false; }\n },\n getSDKData: function () { return false; },\n expand: function () { return false; },\n collapse: function () { return false; }\n };\n window.EBG = {\n px: function (n) {\n if(n.toString().match(/^\\d$|^\\d+$/) !== null) {\n return n + \"px\";\n }\n return n;\n }\n };\n}", "title": "" }, { "docid": "8be1e6ead657f27b354fe8fd0fe17303", "score": "0.5490953", "text": "function initializeLocalPreview() {\n var ua = navigator.userAgent;\n window.EB = {\n _adConfig: {\n adId: 0,\n rnd: 0,\n uid: 0,\n customJSVars: {}\n },\n clickthrough: function clickthrough() {\n if (newData.DEBUG) {\n console.log(\"EB.clickthrough: \", arguments);\n }\n },\n userActionCounter: function userActionCounter() {\n if (newData.DEBUG) {\n console.log(\"EB.userActionCounter: \", arguments);\n }\n },\n _sendMessage: function _sendMessage() {\n return;\n },\n API: {\n browser: {\n webkit: ua.match(/webkit/i) !== null,\n firefox: ua.match(/firefox/i) !== null\n },\n os: {\n ios: ua.match(/ipod|iphone|ipad/i) !== null,\n android: ua.match(/android/i) !== null,\n windowphone: ua.match(/windows phone/i) !== null,\n mobile: ua.match(/ipod|iphone|ipad|android|windows phone/i) !== null\n },\n setStyle: function setStyle(obj, styles) {\n for (var style in styles) {\n if (!styles.hasOwnProperty(style)) continue;\n obj.style[style] = styles[style];\n }\n },\n getCustomVar: function getCustomVar(name) {\n return window.EB._adConfig.customJSVars[name];\n }\n },\n Comm: {\n setName: function setName(name) {\n return name;\n },\n isConnected: function isConnected(name) {\n return false;\n }\n },\n getSDKData: function getSDKData() {\n return false;\n },\n expand: function expand() {\n return false;\n },\n collapse: function collapse() {\n return false;\n }\n };\n window.EBG = {\n px: function px(n) {\n if (n.toString().match(/^\\d$|^\\d+$/) !== null) {\n return n + \"px\";\n }\n\n return n;\n }\n };\n}", "title": "" }, { "docid": "61185c1bba215f26f4e877b43b527c39", "score": "0.54439896", "text": "function HiPaySignitureMgr() {}", "title": "" }, { "docid": "b38ac30d4055a6146ae5460e5a2fcbbd", "score": "0.54265946", "text": "function main() {\n var SCRIPT = {\n name: 'Move Artboards',\n version: 'v.0.1.1'\n },\n CFG = {\n aiVers: parseInt(app.version),\n tmpLyr: 'ARTBOARD_NUMBERS',\n abs: '1, 2-4',\n allAbs: '%all',\n shift: 100,\n lKey: '%isLocked',\n hKey: '%isHidden',\n limit: 2500, // The amount of objects, when the script can run slowly\n cnvs: 16383, // Illustrator canvas max size, px\n uiMargins: [10, 15, 10, 10],\n uiOpacity: .97 // UI window opacity. Range 0-1\n },\n SETTINGS = {\n name: SCRIPT.name.replace(/\\s/g, '_') + '_data.json',\n folder: Folder.myDocuments + '/Adobe Scripts/'\n },\n LANG = {\n errDoc: { en: 'Error\\nOpen a document and try again',\n ru: 'Ошибка\\nОткройте документ и запустите скрипт' },\n errVers: { en: 'Error\\nSorry, script only works in Illustrator CS6 and later',\n ru: 'Ошибка\\nСкрипт работает в Illustrator CS6 и выше' },\n errOverCnvs: { en: 'Error\\nMoved artboards go beyond canvas\\nbounds from the ',\n ru: 'Ошибка\\nПеремещаемые артборды выходят за пределы\\nхолста Иллюстратора с ' },\n errOverSide: { en: 'side.', ru: 'стороны.' },\n errOverL: { en: 'LEFT, ', ru: 'ЛЕВОЙ, ' },\n errOverR: { en: 'RIGHT, ', ru: 'ПРАВОЙ, ' },\n errOverT: { en: 'TOP, ', ru: 'ВЕРХНЕЙ, ' },\n errOverB: { en: 'BOTTOM, ', ru: 'НИЖНЕЙ, ' },\n errOverTip: { en: '\\n\\nTry smaller distance or different range',\n ru: '\\n\\nПопробуйте меньший сдвиг или другой диапазон' },\n warning: { en: 'The document has over ' + CFG.limit + ' objects. The script can run slowly',\n ru: 'В документе свыше ' + CFG.limit + ' объектов. Скрипт может работать медленно' },\n range: { en: 'Artboards range', ru: 'Номера артбордов' },\n placeholder: { en: 'all artboards', ru: 'все артборды' },\n shift: { en: 'Shift', ru: 'Смещение' },\n axisX: { en: 'X axis', ru: 'Ось X' },\n axisY: { en: 'Y axis', ru: 'Ось Y' },\n cancel: { en: 'Cancel', ru: 'Отмена' },\n ok: { en: 'Ok', ru: 'Готово' }\n };\n\n if (CFG.aiVers < 16) {\n alert(LANG.errVers);\n return;\n }\n\n if (!documents.length) {\n alert(LANG.errDoc);\n return;\n }\n\n var doc = activeDocument,\n currBoardIdx = doc.artboards.getActiveArtboardIndex();\n\n // INTERFACE\n var dialog = new Window('dialog', SCRIPT.name + ' ' + SCRIPT.version);\n dialog.orientation = 'column';\n dialog.alignChildren = ['fill','center'];\n dialog.opacity = CFG.uiOpacity;\n\n // Value fields\n var abPanel = dialog.add('panel', undefined, LANG.range);\n abPanel.orientation = 'column';\n abPanel.alignChildren = ['fill','center'];\n abPanel.margins = CFG.uiMargins;\n var abInput = abPanel.add('edittext', undefined, CFG.abs);\n var abDescr = abPanel.add('statictext', undefined, CFG.allAbs + ' - ' + LANG.placeholder);\n abDescr.justify = 'left';\n\n var shiftPanel = dialog.add('panel', undefined, LANG.shift + ', ' + getDocUnit());\n shiftPanel.orientation = 'column';\n shiftPanel.alignChildren = ['left','center'];\n shiftPanel.margins = CFG.uiMargins;\n\n var direction = shiftPanel.add('group');\n direction.orientation = 'row';\n\n var titleX = direction.add('statictext', undefined, LANG.axisX);\n var inputX = direction.add('edittext', [0, 0, 50, 30], CFG.shift);\n\n var titleY = direction.add('statictext', undefined, LANG.axisY);\n var inputY = direction.add('edittext', [0, 0, 50, 30], CFG.shift);\n\n if (doc.pageItems.length > CFG.limit) {\n var warning = dialog.add('statictext', undefined, LANG.warning, { multiline: true });\n }\n\n // Buttons\n var btns = dialog.add('group');\n btns.orientation = 'row';\n btns.alignChildren = ['fill', 'center'];\n var cancel = btns.add('button', undefined, LANG.cancel, { name: 'cancel' });\n var ok = btns.add('button', undefined, LANG.ok, { name: 'ok' });\n\n var copyright = dialog.add('statictext', undefined, '\\u00A9 Sergey Osokin. Visit Github');\n copyright.justify = 'center';\n\n copyright.addEventListener('mousedown', function () {\n openURL('https://github.com/creold/');\n });\n\n loadSettings();\n\n // Event listeners\n inputX.onChange = inputY.onChange = function () {\n this.text = convertToNum(this.text, CFG.shift);\n }\n\n shiftInputNumValue(inputX);\n shiftInputNumValue(inputY);\n\n abDescr.addEventListener('mousedown', function () {\n inputX.active = true;\n dialog.update();\n abInput.text = CFG.allAbs;\n });\n\n dialog.onClose = function () {\n // Remove temp layer with artboards numbers\n try {\n var layerToRm = doc.layers.getByName(CFG.tmpLyr);\n layerToRm.remove();\n } catch (e) {}\n }\n\n drawAbsNumbers(CFG.tmpLyr);\n redraw();\n\n cancel.onClick = dialog.close;\n ok.onClick = okClick;\n\n function okClick() {\n var tmpRange = abInput.text,\n absRange = [], // Range of artboards indexes\n extremeCoord = [], // Range of min & max artboards coordinates\n shiftX = convertUnits((inputX.text * 1) + getDocUnit(), 'px'), // Convert value to document units\n shiftY = convertUnits((inputY.text * 1) + getDocUnit(), 'px'); // Convert value to document units\n\n // Prepare\n tmpRange = tmpRange.replace(/\\s/g, ''); // Remove whitespaces\n tmpRange = tmpRange.split(','); // Split string to array\n absRange = getArtboardsRange(tmpRange, CFG.allAbs);\n\n saveItemsState(CFG.lKey, CFG.hKey); // Save information about locked & hidden pageItems\n\n // Check coordinates limit before moving\n extremeCoord = collectExtremeCoordinates(absRange, CFG.cnvs);\n var overCnvsSize = isOverCnvsBounds(extremeCoord, shiftX, shiftY, CFG.cnvs, LANG);\n if (overCnvsSize.val) {\n alert(overCnvsSize.msg);\n return;\n }\n\n var abItems = collectArtboardItems(absRange);\n\n for (var i = 0, rLen = absRange.length; i < rLen; i++) {\n var idx = absRange[i];\n try {\n moveArtboard(doc.artboards[idx], abItems[i][0], shiftX, shiftY);\n } catch (e) {}\n }\n\n // Restore locked & hidden pageItems\n selection = null;\n restoreItemsState(CFG.lKey, CFG.hKey);\n\n doc.artboards.setActiveArtboardIndex(currBoardIdx);\n\n saveSettings();\n dialog.close();\n }\n\n dialog.center();\n dialog.show();\n\n // Use Up / Down arrow keys (+ Shift) for change value\n function shiftInputNumValue(item) {\n item.addEventListener('keydown', function (kd) {\n var step;\n ScriptUI.environment.keyboardState['shiftKey'] ? step = 10 : step = 1;\n if (kd.keyName == 'Down') {\n this.text = Number(this.text) - step;\n kd.preventDefault();\n }\n if (kd.keyName == 'Up') {\n this.text = Number(this.text) + step;\n kd.preventDefault();\n }\n });\n }\n\n function saveSettings() {\n if(!Folder(SETTINGS.folder).exists) Folder(SETTINGS.folder).create();\n var $file = new File(SETTINGS.folder + SETTINGS.name);\n $file.encoding = 'UTF-8';\n $file.open('w');\n var pref = {};\n pref.range = abInput.text;\n pref.x = inputX.text;\n pref.y = inputY.text;\n var data = pref.toSource();\n $file.write(data);\n $file.close();\n }\n\n function loadSettings() {\n var $file = File(SETTINGS.folder + SETTINGS.name);\n if ($file.exists) {\n try {\n $file.encoding = 'UTF-8';\n $file.open('r');\n var json = $file.readln();\n var pref = new Function('return ' + json)();\n $file.close();\n if (typeof pref != 'undefined') {\n abInput.text = pref.range;\n inputX.text = pref.x;\n inputY.text = pref.y;\n }\n } catch (e) {}\n }\n }\n}", "title": "" }, { "docid": "37de097f0b355e1dd19166fd77fda0eb", "score": "0.54167616", "text": "function Automation() {\n}", "title": "" }, { "docid": "168b53e4139da89cb27bef09e3a28503", "score": "0.541587", "text": "function main()\n{\n\n m_game = new Game();\n gameNs.game = m_game;\n gameNs.soundOn = true;\n gameNs.gravity = window.innerHeight / 90;\n gameNs.counter = 1;\n gameNs.TOTAL_ASSETS = 6;\n\tif(localStorage.highestScore === undefined)\n\t{\n\t\tlocalStorage.highestScore = 0;\n\t}\n m_game.initWorld();\n}", "title": "" }, { "docid": "9f5ce3ea24a7db04ea09fecba97a4566", "score": "0.5384594", "text": "function initGlobals() {\n\t\tFog.windowHeight = $(window).height();\n\t\t// Fog.contentTop = $(\"#projects\").offset().top;\n\t}", "title": "" }, { "docid": "ca9daf752da63689a9e33dff595cf32a", "score": "0.5384007", "text": "function SampleApp() {\n\n}", "title": "" }, { "docid": "a905db173a59ec31e0fe2ff73004491e", "score": "0.5371933", "text": "automate() {}", "title": "" }, { "docid": "ac22d69a0a2000bac7bb341581604f24", "score": "0.5370366", "text": "function theGossiper() {\n topsecret = \"I promoise not to tell nobody\";\n}", "title": "" }, { "docid": "196376e2ede15d987240af359106a6ed", "score": "0.53683704", "text": "function JavaScript_Embed()\n {\n $hostUrl = localStorage.getItem('hostURL');\n $subSiteUrl = localStorage.getItem('subSiteURL');\n if($hostUrl !== $subSiteUrl)\n $currentUrl = $subSiteUrl;\n else\n $currentUrl = $hostUrl;\n\n // console.log($currentUrl);\n getClassifier();\n }", "title": "" }, { "docid": "cfc53208467545bc35bb64aa83dd7132", "score": "0.5345983", "text": "function go() {\n\t$.ajax({\n\t\turl: 'https://6gcqk6gim5.execute-api.ap-northeast-1.amazonaws.com/prod/GlobalVariableTest',\n\t\tmethod: 'GET',\n\t\tsuccess: function (res) {\n\t\t\tdone(res);\n\t\t},\n\t\terror: function (err) {\n\t\t\tdone(err);\n\t\t}\n\t});\n}", "title": "" }, { "docid": "b385202c610719dbf803f0390a1442b6", "score": "0.53446037", "text": "function getGlobal(){return function(){return this.dust}.call(null)}", "title": "" }, { "docid": "b385202c610719dbf803f0390a1442b6", "score": "0.53446037", "text": "function getGlobal(){return function(){return this.dust}.call(null)}", "title": "" }, { "docid": "3b9ec4c86219d2950b2f42c67819abf6", "score": "0.53436434", "text": "function LodLiveProfile() {\n\n }", "title": "" }, { "docid": "d03e2612b6617fae978adca51be44013", "score": "0.5343212", "text": "function init(){\r\n \r\n if(gvar.__DEBUG__) DOMTimer.start();\r\n \r\n if(page_is_notloaded('Page is temporary not available')) clog('Page is not available', 0);\r\n \r\n //------------\r\n ApiBrowserCheck();\r\n //------------ \r\n \r\n // initialize gvar..\r\n gvar.domain= 'http://'+'www.zeleaf.com /'; \r\n gvar.isNotForum = (!location.href.match(/^http:\\/\\/w{3}\\.kaskus\\.us\\/.*/));\r\n if(gvar.isNotForum) return outSideForumTreat();\r\n \r\n gvar.domainstatic= 'http://'+'static.zeleaf.com/';\r\n gvar.avatarLink= gvar.domainstatic + 'customavatars/';\r\n gvar.titlename= 'Quick Reply'+(isQR_PLUS!==0?'+':'');\r\n gvar.fullname= 'zeleaf '+gvar.titlename;\r\n gvar.scriptId= '80409';\r\n\r\n // min-height postbit assumed with OR w/o quote per singleline, [{adaQuote}, {ga_adaQuote}]\r\n gvar.offSet_SiGi= [5, 8];\r\n \r\n gvar.ck= {bbuserid_currentpage:null, bbuserid:null, hotbb:null};\r\n gvar.motion_target= document.body;\r\n gvar.id_textarea= 'vB_Editor_001_textarea';\r\n gvar.vbul_multiquote= 'vbulletin_multiquote';\r\n \r\n gvar.offsetTop= -35; // buat scroll offset\r\n gvar.additionalLength = gvar.idx_mq=0; // counter buat deselect multiquote & tambahan length text\r\n gvar.INTERVAL=null; // buat txt counter\r\n \r\n gvar.silahken= 'Silahkan post reply';\r\n gvar.tooshort= 'The message is too short. Your message should be at least 5 characters.';\r\n gvar.qr_diakses= 'Quick Reply bisa diakses langsung atau dengan mengklik setiap button ';\r\n \r\n gvar.B= rSRC.getSetOf('button');\r\n gvar.coloroptions= rSRC.getSetOf('color');\r\n gvar.fontoptions= rSRC.getSetOf('font');\r\n gvar.sizeoptions= rSRC.getSetOf('size'); \r\n \r\n // place global style\r\n GM_addGlobalStyle( rSRC.getCSS() );\r\n GM_addGlobalStyle('','css_fixups', true); // blank style tag for zeleaf fixups, should be on body instead of head\r\n GM_addGlobalStyle('','css_qqr', true); // blank style tag for qqr toggle\r\n \r\n GM_addGlobalScript('','kaskus_capcay_trigger', true); // blank for trigger kaskus capcay\r\n \r\n // this is needed for chk avatar\r\n gvar.user= getUserId(); //will be [gvar.user.id, gvar.user.name, gvar.user.avatar, gvar.user.isDonatur ]\r\n gvar.ck.bbuserid_currentpage = gvar.ck.bbuserid = gvar.user.id;\r\n \r\n gvar.maintitle=gvar.isPosting= gvar.restart= false;\r\n \r\n // get saved settings to gvar\r\n getSettings();\r\n \r\n GM_addGlobalScript( rSRC.getSCRIPT() );\r\n \r\n if( gvar.settings.recaptcha && !gvar.user.isDonatur ){\r\n GM_addGlobalScript('http:\\/\\/www.google.com\\/recaptcha\\/api\\/js\\/recaptcha_ajax\\.js');\r\n }else{\r\n GM_addGlobalScript(gvar.domain + 'clientscript\\/vbulletin_ajax_imagereg\\.js?v=380');\r\n }\r\n \r\n \r\n if(gvar.settings.widethread)\r\n Dom.add( createTextEl( rSRC.getCSS_fixup() ), $D('#css_fixups') );\r\n \r\n //------------\r\n if( isDefined(gvar.user.id) )\r\n start_Main();\r\n //------------ \r\n \r\n}", "title": "" }, { "docid": "3c4e704c8f8a7b8c92e0729c56410dc6", "score": "0.53329104", "text": "function Init()\n{ \n cTrial = 0;\n\n // global cogtask variables\n SetName(GetName());\n}", "title": "" }, { "docid": "badfac79ab69ce352b6643167f2c8ae5", "score": "0.5329939", "text": "function main(){\r\n\r\n\tif ( app.documents.length <= 0 ) {\r\n\t\tif ( DialogModes.NO != app.playbackDisplayDialogs ) {\r\n\t\t\talert(\"Document must be opened\");\r\n\t\t}\r\n\t\treturn 'cancel'; // quit, returning 'cancel' (dont localize) makes the actions palette not record our script\r\n\t}\r\n\r\n\tdocRef = app.activeDocument;\r\n\t\r\n\t// Set default settings\r\n\tmain_initSettings();\r\n\t\r\n\tvar result = ui_settingsDialog();\r\n\r\n\tmain_saveSettings();\r\n\r\n\t//Show the dialog and quit if canceled\r\n\tif ( result == cancelButtonID ) return main_cancel();\r\n\t\r\n\tmain_generateTagCloud();\r\n\r\n}", "title": "" }, { "docid": "75fae3965685dd131ab39e78d305f8dd", "score": "0.53195757", "text": "function Init()\n{ \n trialNum = 0;\n\n // global cogtask variables\n SetName(GetName());\n\n}", "title": "" }, { "docid": "b9e8c67c5b37ae11f2cb9b0cd8d271c4", "score": "0.5316331", "text": "function DKAssets_init() {\n}", "title": "" }, { "docid": "f90cd23775f2bd8f11907e6ce9449029", "score": "0.5303589", "text": "function C15941_Purchase_Timed_Ticket()\n{ \n InitializationEnviornment.initiliaze();\n \n}", "title": "" }, { "docid": "5f79e884763c00e173c5aab3d42f69e5", "score": "0.5271127", "text": "function usingSTO(){\n console.log('They can have all the spectrox they want');\n}", "title": "" }, { "docid": "42c0fa17c806b91baef9cc150a0b139d", "score": "0.5244765", "text": "function main() {\n \t\tshowReferences();\n \t\tsetupTopBar();\n\n \t\t// choose default translation\n \t\tchooseTranslation(\"NIV\");\n\n \t\tbindEvents();\n \t}", "title": "" }, { "docid": "595e92823522f676c206cd8162fb6159", "score": "0.52395976", "text": "function setup_global_vars() {\n var overview = JSON.parse(sync_get('/overview'));\n rates_mode = overview.rates_mode;\n user_tags = expand_user_tags(user.tags.split(\",\"));\n user_administrator = jQuery.inArray(\"administrator\", user_tags) != -1;\n is_user_policymaker = jQuery.inArray(\"policymaker\", user_tags) != -1;\n user_monitor = jQuery.inArray(\"monitoring\", user_tags) != -1;\n exchange_types = overview.exchange_types.map(function(xt) { return xt.name; });\n\n cluster_name = fmt_escape_html(overview.cluster_name);\n $('#logout').before(\n '<li>Cluster ' + (user_administrator ? '<a href=\"#/cluster-name\">' + cluster_name + '</a>' : cluster_name) + '</li>'\n );\n\n user_name = fmt_escape_html(user.name);\n $('#header #logout').prepend(\n 'User ' + (user_administrator ? '<a href=\"#/users/' + user_name + '\">' + user_name + '</a>' : user_name)\n );\n\n $('#versions').html(\n '<abbr title=\"Available exchange types: ' + exchange_types.join(\", \") + '\">' + fmt_escape_html(overview.rabbitmq_version) + '</abbr>' +\n '<abbr title=\"' + fmt_escape_html(overview.erlang_full_version) + '\">Erlang ' + fmt_escape_html(overview.erlang_version) + '</abbr>'\n );\n nodes_interesting = false;\n rabbit_versions_interesting = false;\n if (user_monitor) {\n var nodes = JSON.parse(sync_get('/nodes'));\n if (nodes.length > 1) {\n nodes_interesting = true;\n var v = '';\n for (var i = 0; i < nodes.length; i++) {\n var v1 = fmt_rabbit_version(nodes[i].applications);\n if (v1 != 'unknown') {\n if (v != '' && v != v1) rabbit_versions_interesting = true;\n v = v1;\n }\n }\n }\n }\n vhosts_interesting = JSON.parse(sync_get('/vhosts')).length > 1;\n current_vhost = get_pref('vhost');\n exchange_types = overview.exchange_types;\n}", "title": "" }, { "docid": "4bb766bea2bf19594dfa4b34e4d97b19", "score": "0.52385914", "text": "function vgQA_aOnjgTq8EEzypQtogw() {}", "title": "" }, { "docid": "25dd951c897ac1c1d2c1fa341e13522b", "score": "0.52370685", "text": "function useDemo() { demoInUse(); }", "title": "" }, { "docid": "b0b8c41e57b6650cab2f3f1802f92c31", "score": "0.5233111", "text": "function main() {\n\n var opts = {'$el': $('#senc-container')}\n opts.gateway = queryParam('gateway') || null\n opts.forceGateway = queryParam('forceGateway')\n opts.forceWindowIpfs = queryParam('forceWindowIpfs')\n\n $senc = $('#senc-container')\n var app = new SencApp(opts)\n app.on('params', (kp) => {\n anchor.urlHashSet(kp.key, kp.path)\n })\n\n $('body').append(app.$el)\n\n var kp = anchor.urlHashLoad()\n app.setFileParams(kp.key, kp.path)\n}", "title": "" }, { "docid": "297a6532b6d13c7281215fc1511d3aa6", "score": "0.52290916", "text": "function main() {\n\t\tconsole.log(\"simple.user.js: Hiding the black banner at the top of Google Reader\");\n\n\t\tjQuery(document).ready(function($) {\n\t\t\tif ( $('#gb').length ) {\n\t\t\t\t$('#gb').css(\"visibility\", \"hidden\");\n\t\t\t}\n\t\t});\n\n\t\tconsole.log(\"simple.user.js: Loaded\");\n\t}", "title": "" }, { "docid": "249a3b8b9effb54b3f7479b7cd760f0b", "score": "0.5225969", "text": "function main() {\n cookiePlus();\n var currentDate = new Date();\n g.yesturday = new Date(currentDate.setDate(currentDate.getDate()-1));\n defaultStore();\n defaultSearch();\n removeOldCookies();\n noScrollJumping();\n invisbleAll();\n selectedTop();\n U.addHandler(U.$(\"topArt\"), \"click\", selectedTop);\n U.addHandler(U.$(\"savedArt\"), \"click\", selectedSaved);\n U.addHandler(U.$(\"chartArt\"), \"click\", selectedChart);\n U.addHandler(U.$(\"resourceTab\"), \"click\", selectAbout);\n U.addHandler(U.$(\"submitBtn\"), \"click\", submitData);\n U.addHandler(U.$(\"saveBtn\"), \"click\", savedData);\n}", "title": "" }, { "docid": "f25de5cac6cfee862d19ba0176eb83ec", "score": "0.52163756", "text": "_hogehogehoge() {\n console.log('hogehogehoge');\n }", "title": "" }, { "docid": "df9606583d45b1885f7217166b04c43b", "score": "0.5208692", "text": "function setGlobalVariables() {\n // generate variable names from the title of the document \n title = title.toLowerCase();\n var var1 = title + \"_eateryList\";\n var var2 = title + \"_donts\";\n // set the global varibles \n eateryList = window[var1];\n donts = window[var2];\n filteredList = eateryList;\n }", "title": "" }, { "docid": "8b38618288d55a83059d060f22ab5af9", "score": "0.5202555", "text": "consoleSetup(){\n this._console = new _gd_console(this.footer);\n\n window._gd_SandBox.console = this._console;\n }", "title": "" }, { "docid": "05349b93b15fd655a188dfa6f86f61da", "score": "0.51996017", "text": "setup() {\n // Adding Domains:\n // http://code.viget.com/microcosm/api/domains.html\n // Adding Effects:\n // http://code.viget.com/microcosm/api/effects.html\n }", "title": "" }, { "docid": "99bd819f04c69d7445c6339678a756b3", "score": "0.5194475", "text": "function recomendacion(){\n\n}", "title": "" }, { "docid": "53b4d5c0d20434b3bfb3bf716dd7a580", "score": "0.5194474", "text": "function CAknAppUiVisual() {\r\n}", "title": "" }, { "docid": "f7940f066c4966bb9de58a8273612c12", "score": "0.5191851", "text": "function init() {\n\n}", "title": "" }, { "docid": "f7940f066c4966bb9de58a8273612c12", "score": "0.5191851", "text": "function init() {\n\n}", "title": "" }, { "docid": "f7940f066c4966bb9de58a8273612c12", "score": "0.5191851", "text": "function init() {\n\n}", "title": "" }, { "docid": "f7940f066c4966bb9de58a8273612c12", "score": "0.5191851", "text": "function init() {\n\n}", "title": "" }, { "docid": "f7940f066c4966bb9de58a8273612c12", "score": "0.5191851", "text": "function init() {\n\n}", "title": "" }, { "docid": "f7940f066c4966bb9de58a8273612c12", "score": "0.5191851", "text": "function init() {\n\n}", "title": "" }, { "docid": "f7940f066c4966bb9de58a8273612c12", "score": "0.5191851", "text": "function init() {\n\n}", "title": "" }, { "docid": "395e62cfe62a09605018f036666260ca", "score": "0.51895773", "text": "function Global(){}", "title": "" }, { "docid": "9f82e5cb04bc8519089dd9196f165fed", "score": "0.518516", "text": "function init() {\r\n\r\n}", "title": "" }, { "docid": "6ad8d3d7fac9ac62edaaa1e3d5c7a568", "score": "0.5181735", "text": "function Solve_mode(){\r\n Play_mode = \"auto\"\r\n}", "title": "" }, { "docid": "a55c80f1de03e70e79cee035e40dfc34", "score": "0.51804703", "text": "function SaveLightingVariables() {\n\t}", "title": "" }, { "docid": "6b56ac4f95098b3eaa19104a37071aaf", "score": "0.51725924", "text": "function setCurrentAvailableProducts(availableProductsObject)\n{\n window.skyAvailableProducts = availableProductsObject;\n}", "title": "" }, { "docid": "e1935b5c2fc03a6fac1f94f38ad8aefd", "score": "0.5166894", "text": "static get xboxEnableKinectAutoTracking() {}", "title": "" }, { "docid": "860b378ec523b4587b4d0e10e8e2d3ae", "score": "0.5154303", "text": "static set xboxEnableKinectAutoTracking(value) {}", "title": "" }, { "docid": "cd491a7299d3648d3b010e1b787cc235", "score": "0.5145776", "text": "function usage() {\n\tprintln(\"\")\n\tprintln(\"Usage is ...\")\n\tprintln(\"\")\n\tprintln(\"find_RI-util_actions.js -c @TURBO_CREDS_NAME\")\n\tprintln(\"\")\n\texit(2)\n}", "title": "" }, { "docid": "1eff89fcf4a8154cf1f7dbee7fe11a2b", "score": "0.51377636", "text": "function aos_init() {\n AOS.init({\n duration: 1000,\n once: true,\n });\n }", "title": "" }, { "docid": "a7acfe38e8940aa152958fffe32f796d", "score": "0.5137642", "text": "function ddos() {\n\n}", "title": "" }, { "docid": "422865b4e82935d351ca45a9ea4c7599", "score": "0.5135302", "text": "set(_src) {\r\n\t\tMirelia.fromID(\"__STEM\").src = _src;\r\n\t}", "title": "" }, { "docid": "8d29c20a9cf422839317cf13aa6d0f78", "score": "0.5134449", "text": "function otherglobal() {}", "title": "" }, { "docid": "9ded8801c08534c82f5276dc208c5c50", "score": "0.5134275", "text": "function init(){\r\n\tGeneral.init();\r\n\t\r\n\tdarkener.depth(150000);\r\n\tif(game_data.screen == \"settings\" && game_data.mode == \"settings\"){\r\n\t\tSettingsAPI.generate();\r\n\t\tif(SettingsAPI.get_ini(\"open_onload\"))\r\n\t\t\tSettingsAPI.toggleContent({target:gid(\"hotkeys_toggleimg\")},true);\r\n\t}\r\n}", "title": "" }, { "docid": "71d125c7df786a61d87eeb65d59d634e", "score": "0.51259196", "text": "function STXMarket(){\n}", "title": "" }, { "docid": "3c2bd899ecdfc1daeac30fd1dfb560b5", "score": "0.5125155", "text": "function init () {\n var bell_id = $.wakeUp(function() {\n setTimeout(function(){\n ftui.setOnline();\n }, 3000);\n });\n }", "title": "" }, { "docid": "bcfc21ad7e63c003e3296b362939cfd0", "score": "0.5123342", "text": "getObjectId() {\n return 'global';\n }", "title": "" }, { "docid": "bcfc21ad7e63c003e3296b362939cfd0", "score": "0.5123342", "text": "getObjectId() {\n return 'global';\n }", "title": "" }, { "docid": "a652c9c7d7e05cdfa96d5c1725494b90", "score": "0.51194096", "text": "function owgisMain(){\n\tinitOl3();\n addLayers();\n initVariables();\n\tinitMenus();\n\tinitHelpTxtPos();\n}", "title": "" }, { "docid": "a652c9c7d7e05cdfa96d5c1725494b90", "score": "0.51194096", "text": "function owgisMain(){\n\tinitOl3();\n addLayers();\n initVariables();\n\tinitMenus();\n\tinitHelpTxtPos();\n}", "title": "" }, { "docid": "d6f0a69a8be784dbcb725bb6c078be30", "score": "0.5112545", "text": "function dashboardFlotOne() {\n}", "title": "" }, { "docid": "089cca10810e0b76f373f4782f1149fa", "score": "0.5110063", "text": "function defineVariables() {\n window.a = $(\"#A\")\n window.b = $(\"#B\")\n window.c = $(\"#C\")\n window.d = $(\"#D\")\n window.e = $(\"#E\")\n window.z = $(\"#choices\")\n window.g = $(\"#timer\")\n window.h = $(\"#numCorrect\")\n window.i = $(\"#numIncorrect\")\n window.j = $(\"#announcements\")\n window.k = $(\"#question\")\n window.timeStart = 11;\n\n }", "title": "" }, { "docid": "8faf633afddf889f495a30902ae089b0", "score": "0.51093066", "text": "function imtpCorpSharmaManagement() {\n imtpAccountName = \"Sharma Management International Sdn Bhd\";\n imtpUsageOption = \"Traffic Oriented\";\n}", "title": "" }, { "docid": "482855f763180b11139d4b23b749c312", "score": "0.51048833", "text": "function aos_init() {\n AOS.init({\n duration: 1000,\n easing: \"ease-in-out\",\n once: true,\n mirror: false\n });\n }", "title": "" }, { "docid": "fc7ffeabe5a024f56e28b1eeee9d36dd", "score": "0.5104256", "text": "function init() {\n // Anything you need to do to setup the script. You can keep it empty or delete the function, too.\n}", "title": "" }, { "docid": "8a609ba76adce8d9310d6ff3cf503971", "score": "0.50981206", "text": "function _p30_andy () {\n rom.title = 'Andy FTLP30';\n rom.addressOf('LAUNCH_CUT') = 0x78BC;\n rom.addressOf('LAUNCH_RES') = 0x78B8;\n rom.hasLaunchControl = 1;\n refresh ();\n} // */", "title": "" }, { "docid": "59d1af35abd1661bd5286b89806f85fd", "score": "0.50969946", "text": "function setGameBySuperGlobal() {\n var gcat = \"\";\n const rand = Math.floor((Math.random() * 10000) + 1);\n var url = window.location.href;\n var tabId = url.split(\"#\").pop();\n if (tabId == 0) { gcat = 'people' }\n if (tabId == 1) { gcat = 'vintage' }\n if (tabId == 2) { gcat = 'cartoons' }\n if (tabId == 3) { gcat = 'jcco' }\n if (tabId != '') {\n $(\".playerList\").load(\"leaderboards/load-\" + gcat + \".php\" + \"#\" + rand, {\n filter: filter\n });\n startgame(tabId, 'false');\n $(\"h27\").hide();\n $(\".overlayCurtain\").hide();\n dehighlight();\n $(\".pinkArrowDown\").removeClass('pinkArrowDownActive').hide();\n $('#btmNav .' + gcat + '').find('.btnCategory').addClass(\"btnCategoryActive\");\n $('#btmNav .' + gcat + '').find('.arrow-down').show();\n }\n}", "title": "" }, { "docid": "eaa47ba9e8a0cb7b90a6fa16906f7613", "score": "0.50931853", "text": "function init(){\r\n\t\t\r\n}", "title": "" }, { "docid": "89366a150b988fc27a95d3f53ce7e782", "score": "0.5090517", "text": "function DataViewer() {\n\n \"use strict\";\n\n}", "title": "" }, { "docid": "1071588ebefe71bcc9e223f0dbf0d8a9", "score": "0.508456", "text": "function initializeVariables() {\n $preloader = $(\".preloader\");\n $appWrapper = $(\".application-wrapper\");\n $overlay = $(\".overlay-wrapper\");\n $mobileStop = $(\".mobile-stop\");\n $impress = $(\".impress-wrapper\");\n $navItems = $(\".nav-item\");\n $closeImpress = $(\".close-impress\");\n $closeHelp = $(\".close-help\");\n $body = $(\"body\");\n \n\n // placeholders for module wrappers\n $wrapperVideoDrop = $appWrapper.find(\".file-list\");\n $wrapperVideoAdd = $appWrapper.find(\".file-add\");\n $fileLoading = $wrapperVideoDrop.find(\".video-loading\");\n }", "title": "" }, { "docid": "e7ad58de645a78a5e7a3c261a93914d2", "score": "0.5080116", "text": "onUse(){\n\t\t\n\t}", "title": "" }, { "docid": "7c6e403f7caecd4c11a10e73a6250090", "score": "0.5071522", "text": "function aosInit(){\n AOS.init({\n duration: 1500,\n });\n}", "title": "" }, { "docid": "aa822b17c74d59661da6d83fde5803e4", "score": "0.5067868", "text": "function G_bjM0hfvuj_amn1p32jmFYA(){}", "title": "" }, { "docid": "07e08c2ea290aa9a233d9590d2c190df", "score": "0.50675297", "text": "function ShieldPage() {\n }", "title": "" }, { "docid": "26b3f49783708b9cafad1573eaa86dcf", "score": "0.5065459", "text": "_init(){\n\t}", "title": "" }, { "docid": "bb813983b0e5b8c329f1fc7ad1c3849b", "score": "0.5063032", "text": "function Youku(){}", "title": "" }, { "docid": "7e1ca3ab7be417766cb5c780c7b0ad18", "score": "0.5061017", "text": "function initialize()\r\n{\r\n\r\n// uncomment the line below if using Firefox 8\r\n// try {$ = unsafeWindow.$;}\r\n// uncomment the line below if using Firefox 8\r\n// catch(e) {$ = window.$;}\r\n\r\n// comment the line below if using Firefox 8\r\n try {$2 = unsafeWindow.$;}\r\n// comment the line below if using Firefox 8\r\n catch(e) {$2 = window.$;}\r\n\r\n loadOptions();\r\n}", "title": "" }, { "docid": "f818fb5ea00dc1b65f4267fad26db077", "score": "0.5060605", "text": "function initGlobals(G)\r\n/*------------------------*/ \r\n{\r\n\tG.RET = \"\\r\"; \r\n//-------------------------------------------------------------------------------------------- About info \r\n\tG.ABOUT = \"AE3D Export, v1.16 (2008)\" \t\t\t\t\t\t\t\t\t\t\t+ G.RET +\r\n\t\t\t\t\"exports the selected layers and cameras within\"\t\t\t\t\t+ G.RET +\r\n\t\t\t\t\"the work area to Maya, 3ds Max, or Lightwave.\"\t\t\t\t\t+ G.RET + G.RET +\r\n\t\t\t\t\r\n\t\t\t\t\"by Ryan Gilmore (www.urbanspaceman.net)\"\t\t\t\t\t\t\t+ G.RET + G.RET +\r\n\t\t\t\t\r\n\t\t\t\t\"with coding help from Nab (www.nabscripts.com)\" \t\t\t\t\t+ G.RET + \r\n\t\t\t\t\"and others on the AE Enhancers forum (www.aenhancers.com)\"\t\t;\r\n//---------------------------------------------------------------------------------------- Global Variables \r\n\tG.APP_VERSION \t\t\t= parseFloat(app.version);\r\n\tG.FILE_FOLDER\t\t\t\t= \"~/Desktop\";\r\n\tG.FILE_NAME\t\t\t\t= \"Untitled.ma\";\r\n\tG.FILE_PATH\t\t\t\t= G.FILE_FOLDER + \"/\" + G.FILE_NAME;\r\n\tG.FILE_PATH_SET\t\t\t= false;\r\n\r\n\tG.RADIOBUTTON_ON\t\t\t= 1;\r\n\t\r\n\tG.WORLD_CENTER\t\t\t= [0,0,0];\r\n\tG.WORLD_SCALE\t\t\t\t= [1, 0.0254, 1];\r\n\r\n\tG.RATIO\t\t\t\t\t= [0.8592, 0.9, 0.9481481, 1.0, 1.0186, 1.0667, 1.2, 1.333, 1.4222, 1.5, 1.8962962, 2];\r\n\t// [0]D2 NTSC, [1]D1 NTSC, [2]D4 Stan, [3]SQUARE, [4]D2 PAL, [5]D1 PAL, [6]D1 NTSC wide, [7]HDV, [8]D1 PAL wide, [9]DVCPROHD, [10]D4 Ana, [11]Ana2:1\r\n\tG.ORIGINAL_ASPECT\t\t= 1;\r\n\tG.HEIGHT\t\t\t\t\t= \"\"; // set dynamically\r\n\tG.WIDTH\t\t\t\t\t= \"\"; // set dynamically\r\n\tG.MAYA_FB_H\t\t\t\t= 1; \r\n\tG.FPS_NAME\t\t\t\t= [\"ntsc\", \"pal\", \"film\", \"game\", \"show\", \"ntscf\", \"palf\"];\r\n\t\r\n\tG.LAYER_TYPE\t\t\t\t= \"Layer\";\r\n\tG.LAYER_WAS_2D\t\t\t= false;\r\n\tG.LAYER_IS_ANIMATED\t\t= [false, false, false, false, false, false, false, false, false, false];\r\n\tG.LAYER_ORIG_NAMES\t\t= [];\r\n\tG.LAYER_NAMES\t\t\t\t= [];\r\n\tG.LAYER_NAME_MATCH\t\t= false;\r\n\tG.LAYER_NAME_TOO_LONG \t= false;\r\n\tG.LAYER_NAME\t\t\t\t= \"\"; // set dynamically\r\n\tG.SHORT_LAYER_NAME \t \t= \"\"; // set dynamically\r\n\tG.SCENE_STRING\t\t\t= \"\"; // set dynamically\r\n\tG.LAYER_KEYS_STRING \t= \"\"; // set dynamically\r\n//--------------------------------------------------------------------------------------------- Alert messages\r\n\tG.SAFE_DUR\t\t\t= 180; // 3 minutes\r\n\tG.SAFE_DUR_WNG \t\t= \"Warning. The composition work area exceeds \" + G.SAFE_DUR + \" seconds. Do you want to continue ?\"; \r\n}", "title": "" }, { "docid": "97ac6b127627d0d04e10a0c2f8f0cdbf", "score": "0.50603884", "text": "_ready() {\n\n }", "title": "" }, { "docid": "9b942b5601721c4610f50b06628184b1", "score": "0.5060383", "text": "function start_(){\n let domain = document.domain;\n console.log(\"%cSUGOI!Cookies for Google Ads (`*・ω・’)\" + VERSION, STYLE_BOLD);\n console.log(\"Current domain is : 【\", domain ,\"】\");\n}", "title": "" }, { "docid": "6d92500b0195154cda1cf8d78a09b3b2", "score": "0.5058824", "text": "function launchNuke(){\n console.log('launch nuke');\n}", "title": "" }, { "docid": "d7059666dffeefc501fc27695b3a5b81", "score": "0.5052917", "text": "function corp_pin() {\n\n}", "title": "" }, { "docid": "ac3e3213acd821fe4fc17810dc378f35", "score": "0.5052669", "text": "function main(){\n\t\n}", "title": "" }, { "docid": "b3a82c1d87cf74a03286d2e1dfa271db", "score": "0.5051709", "text": "function livestock_production(){\n a_FAO_i='livestock_production';\n initializing_change();\n change();\n}", "title": "" }, { "docid": "897f0dcbe4d8790f2b521c2ab824034c", "score": "0.5046141", "text": "function setup() {\n\n}", "title": "" }, { "docid": "6c1d4ce5e4b3dd394f79186db3d982cd", "score": "0.5046045", "text": "function DataTiddler() {\r\n}", "title": "" }, { "docid": "3def5fb5d4cb063b98915d19d0b6813c", "score": "0.50445795", "text": "function ksfShare(){\n}", "title": "" }, { "docid": "da6f11bee783c91d503f14d5b0c94335", "score": "0.504015", "text": "function setup(){\r\n clearScreen();\r\n lcd.cursor(0,0).print(\" Welcome to ATM \");\r\n \r\n wait.for.time(2);\r\n \r\n loop();\r\n }", "title": "" }, { "docid": "1f417ad0b407b276a40862134961d815", "score": "0.5038609", "text": "function Nueral(){\n\t\t\n\t}", "title": "" }, { "docid": "754d9ba96f328f849728df6789482bd0", "score": "0.5037986", "text": "function HApm8NWjVjKNbQVa1DQvlA(){}", "title": "" }, { "docid": "2d7beaa5b2aefdcff35f14b927f7a026", "score": "0.5036597", "text": "function BlueGhostCopyrightControl() {\n}", "title": "" } ]
d874cebc30a36f6c306bd99086bd19e3
bug in JS, probably $(this).attr('id')
[ { "docid": "9857cda4eff363c8a315e9e9f3de7972", "score": "0.0", "text": "function buttonSelector(param)\n{\n //var button = $(this).attr('id');\n var button = param.id;\n //test\n //alert(button);\n $.post(send_url, {params: button , access_token: accessToken });\n //window.alert(button);\n}", "title": "" } ]
[ { "docid": "518c022a561ff719962c2095fb586cdf", "score": "0.6688731", "text": "url(){return\"url(#\"+this.id()+\")\"}", "title": "" }, { "docid": "518c022a561ff719962c2095fb586cdf", "score": "0.6688731", "text": "url(){return\"url(#\"+this.id()+\")\"}", "title": "" }, { "docid": "27351b237cd01389bc144dd58be14e2a", "score": "0.66130835", "text": "id() {\n // return this.node.attr('id');\n return this.el.attribs.id;\n }", "title": "" }, { "docid": "29a8900256c4cb6b95ddcdaaf2c31b27", "score": "0.65738", "text": "_getId(evt) {\n return this.$(evt.currentTarget).parent('.h-element').data('id');\n }", "title": "" }, { "docid": "9bac4e9c68b9156c3d62f9029bdd0d1b", "score": "0.6359015", "text": "function getID(thisObj) {\n\treturn $(thisObj).closest('div.panel').attr('id');\n}", "title": "" }, { "docid": "f31c3350e4a9bdcc68de223a44708fbc", "score": "0.62827426", "text": "function $(_id) \r\n{ \r\n\treturn document.getElementById(_id); \r\n}", "title": "" }, { "docid": "e3bbe6671566f7018c017b8999985ac4", "score": "0.6232011", "text": "function getidselect(id) {\n return \"#\" + instanceid + \"-\" + id\n }", "title": "" }, { "docid": "dfb942b33c95221754cc87866b9fe3e6", "score": "0.6208879", "text": "function $(e){ return document.getElementById(e); }", "title": "" }, { "docid": "bf8f066d2685577889e79a05287cb6e5", "score": "0.616418", "text": "function return_div_id(){\n // alert('e.target.id');\n return this.target.id;\n}", "title": "" }, { "docid": "3f06519f6b2567bf99d4e8a4ee030a0f", "score": "0.6151683", "text": "setID(e, o) {\n e.setAttribute('id', this.formatID(o));\n }", "title": "" }, { "docid": "33042f9a01ab13242dced66fa1ca91cd", "score": "0.60614413", "text": "function foo(el) { console.log( el, this.id ) }", "title": "" }, { "docid": "1e3b156504a2998f997396d01fb2d542", "score": "0.6018316", "text": "get id() {\n return this.element.id;\n }", "title": "" }, { "docid": "4fbaf212b7616ff0b5e433369329e107", "score": "0.59871805", "text": "getId() { return this.id_; }", "title": "" }, { "docid": "eeea604ed2d8586f0b5bd834bf3647e8", "score": "0.59759104", "text": "function get_object_id(element) {\n return $(element).attr('id').split('-')[1]*1;\n}", "title": "" }, { "docid": "4f71bf0b92d06efd6d356c4ebcd8c442", "score": "0.5972323", "text": "function elemid(o) {\nreturn document.getElementById(o);\n}", "title": "" }, { "docid": "abf1f663828f34acb72cb7f7156d8a16", "score": "0.59438485", "text": "toString(){return\"url(#\"+this.id()+\")\"}", "title": "" }, { "docid": "57efb28f67c79acd9c548c7c23e8a9f6", "score": "0.5915063", "text": "getId() {\n return this.html.id;\n }", "title": "" }, { "docid": "c6d9168df7da4e9c89fe56011c5a2824", "score": "0.5901203", "text": "function g(id) { return $(\"#\" + id).get(0); }", "title": "" }, { "docid": "c0616f71851a2121d3181ac4a8a25343", "score": "0.5823239", "text": "function getId(jqueryThing) {\n return jqueryThing.attr('id').slice(5);\n}", "title": "" }, { "docid": "94001fe963191e2c787aec1c108bf9a1", "score": "0.58173615", "text": "function $(id){return document.getElementById(id);}", "title": "" }, { "docid": "30debbd9899bba4467082d4ffbbac4be", "score": "0.5807411", "text": "function getIdToDelete() {\n idToDelete = $(this).data().id;\n return idToDelete;\n}", "title": "" }, { "docid": "7e66089c63ec85d3d61f3494ee0c4038", "score": "0.58068293", "text": "function p(){return this.$__._id?this.$__._id:(this.$__._id=null==this._id?null:String(this._id),this.$__._id)}", "title": "" }, { "docid": "21b440c6417fe374b818499a62b46236", "score": "0.57858056", "text": "function logID() {\n console.log(\"clicked on a graphic - this one: \", this.id);\n this.classList.add(\"selected\");\n }", "title": "" }, { "docid": "2fa09d743f18ee9e2621fdff39757ee3", "score": "0.57848036", "text": "id(id) {\n this.el.id = id\n return this\n }", "title": "" }, { "docid": "f5b82eb595b6113642a3f257d69234dd", "score": "0.5767702", "text": "id(id){// generate new id if no id set\nif(\"undefined\"===typeof id&&!this.node.id){this.node.id=eid(this.type)}// dont't set directly width this.node.id to make `null` work correctly\nreturn this.attr(\"id\",id)}", "title": "" }, { "docid": "09a3ea88224f27d02b329753a9b2b0ba", "score": "0.576475", "text": "function i(e){return Object.defineProperty(e.data(),\"id\",{value:e.id})}", "title": "" }, { "docid": "5154f4e42c323dca3bcdfb47d6b67da5", "score": "0.5760739", "text": "get id() { return this._id; }", "title": "" }, { "docid": "5154f4e42c323dca3bcdfb47d6b67da5", "score": "0.5760739", "text": "get id() { return this._id; }", "title": "" }, { "docid": "5154f4e42c323dca3bcdfb47d6b67da5", "score": "0.5760739", "text": "get id() { return this._id; }", "title": "" }, { "docid": "5154f4e42c323dca3bcdfb47d6b67da5", "score": "0.5760739", "text": "get id() { return this._id; }", "title": "" }, { "docid": "5154f4e42c323dca3bcdfb47d6b67da5", "score": "0.5760739", "text": "get id() { return this._id; }", "title": "" }, { "docid": "5154f4e42c323dca3bcdfb47d6b67da5", "score": "0.5760739", "text": "get id() { return this._id; }", "title": "" }, { "docid": "5154f4e42c323dca3bcdfb47d6b67da5", "score": "0.5760739", "text": "get id() { return this._id; }", "title": "" }, { "docid": "acf3660c98d0b73c5d0cea44f75ad2c1", "score": "0.57379913", "text": "function clearThisId(elem) {\n clearChildrenId(elem);\n console.log('id_' + elem.id + '.id = \"delete\";');\n elem.id = 'delete';\n}", "title": "" }, { "docid": "1f4ad2632e8bc8572ae6ce47b35589da", "score": "0.5734099", "text": "function eventid(e){\n return parse_id(e.target.get('id'));\n }", "title": "" }, { "docid": "f22f76658ce2005571fbfe4e8b0da43c", "score": "0.5698912", "text": "id(id) {\n // generate new id if no id set\n if (typeof id === \"undefined\" && !this.node.id) {\n this.node.id = eid(this.type);\n } // don't set directly with this.node.id to make `null` work correctly\n\n return this.attr(\"id\", id);\n }", "title": "" }, { "docid": "807fe877db6a683b56639133bce61295", "score": "0.569726", "text": "function $(obj) { return document.getElementById(obj); }", "title": "" }, { "docid": "e88ce5692537a484899311b0dd99f1e3", "score": "0.5689649", "text": "function jq(myid) { \n\t return '#' + myid.replace(/(:|\\.)/g,'\\\\$1');\n\t}", "title": "" }, { "docid": "c92bd194bfa76157c4b62408cce5ed79", "score": "0.5680256", "text": "function _(x){return document.getElementById(x);}", "title": "" }, { "docid": "b3af21dec0f02d7fb3fa17a10cee1141", "score": "0.5671694", "text": "function getId(e) {\n\t\t\treturn e.id;\n\t\t}", "title": "" }, { "docid": "8f3a7f567316db6bb3e83a28b3cb1c56", "score": "0.56525165", "text": "function foo(el) {\n console.log(el, this.id)\n}", "title": "" }, { "docid": "8273a7bd5db94ed168ceaf0092ca7f46", "score": "0.5650091", "text": "get id() {\r\n return this.i.id;\r\n }", "title": "" }, { "docid": "193febac2d11238dba49e6eaa922d7a1", "score": "0.5647433", "text": "function __(el) {\n return document.getElementById(el);\n}", "title": "" }, { "docid": "a2803738cc2820d50d8d109e1b07aa19", "score": "0.564358", "text": "function getCurrentId()\n{\n\treturn parseInt($('section').filter(function(){ return $(this).css('display') != 'none'; }).attr('id').substring(8));\n}", "title": "" }, { "docid": "0c96b77a9982797a5d13fa3dec4ed673", "score": "0.56393623", "text": "function foo(el) {\n console.log(el, this.id);\n}", "title": "" }, { "docid": "bbb413e0d0ca41aa59a6ecc42ab10efe", "score": "0.5627079", "text": "function _(id){\n return document.getElementById(id);\t\n}", "title": "" }, { "docid": "414595e67ef5518a631f1574359eb234", "score": "0.56223035", "text": "function getSelectedGroupid(){\n return self.grouplist.find('.active').attr('id');\n}", "title": "" }, { "docid": "0956f9f778d2ed630d675fcd76d5b415", "score": "0.5616291", "text": "get id() {return this._id;}", "title": "" }, { "docid": "2aac7c75e24ca153d0433daf80acfc04", "score": "0.5610655", "text": "function $(s){return document.getElementById(s);}", "title": "" }, { "docid": "229b915b5e6b9be598bab52f13c3f393", "score": "0.55536604", "text": "id(){return this.baseId;}", "title": "" }, { "docid": "4ce124ddb9a1f2103edaecefd3b44dab", "score": "0.5553312", "text": "function $(id) { return document.getElementById(id); }", "title": "" }, { "docid": "4ce124ddb9a1f2103edaecefd3b44dab", "score": "0.5553312", "text": "function $(id) { return document.getElementById(id); }", "title": "" }, { "docid": "4ce124ddb9a1f2103edaecefd3b44dab", "score": "0.5553312", "text": "function $(id) { return document.getElementById(id); }", "title": "" }, { "docid": "4ce124ddb9a1f2103edaecefd3b44dab", "score": "0.5553312", "text": "function $(id) { return document.getElementById(id); }", "title": "" }, { "docid": "4ce124ddb9a1f2103edaecefd3b44dab", "score": "0.5553312", "text": "function $(id) { return document.getElementById(id); }", "title": "" }, { "docid": "d33aa111e0abb007b71f044c69898885", "score": "0.55509365", "text": "get id(){\n if(this.attrs){\n for(let attr of this.attrs.statements){\n // Fun fact: in html if an element has two id attributes, the browser only takes the\n // first one. How convenient for us.\n if(attr.key === \"id\"){\n return attr.value;\n }\n }\n }\n return false;\n }", "title": "" }, { "docid": "39e17b343c43a4dca49e9f4bdd7f728c", "score": "0.55487114", "text": "function idGenerator() {\n $(\".slides__img\").each(function(index, el) {\n $(this).attr(\"id\", \"slide_\" + index);\n });\n $(\".dots__single\").each(function(index, el) {\n $(this).attr(\"id\", \"dot_\" + index);\n });\n }", "title": "" }, { "docid": "4f2230c8bf8c344c35167c96a5787459", "score": "0.5526155", "text": "function setAttrDataID(id, el){\n el.attr(\"data-id\", id);\n var prev = el.prev();\n //slash gain id too, easier way to delete / hide it later;\n if(prev.length > 0) {\n prev.attr(\"data-id\", id);\n }\n}", "title": "" }, { "docid": "78bc6178c88f60862b37a3674b67c8b4", "score": "0.5502625", "text": "function $id(xz) {\r\n return (typeof xz == \"string\") ? document.getElementById(xz) : xz\r\n}", "title": "" }, { "docid": "cfaa25b6cb20792e5d764d0fa65c3b39", "score": "0.5484567", "text": "function friGetElementId(id) {\n\tvar x = document.getElementById(id);\n\tif (x == null) {\n\t\tx = parent.document.getElementById(id);\n\t}\n\t\n\treturn x;\n}", "title": "" }, { "docid": "da90a6b9477d694a2cda6f441691a5fc", "score": "0.5483595", "text": "url() {\n return 'url(\"#' + this.id() + '\")';\n }", "title": "" }, { "docid": "da90a6b9477d694a2cda6f441691a5fc", "score": "0.5483595", "text": "url() {\n return 'url(\"#' + this.id() + '\")';\n }", "title": "" }, { "docid": "cc46a631e2ff47154fac1f2297ce6e7a", "score": "0.5475976", "text": "isID(){\n if (typeof this.id == \"undefined\") {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "583f51dd3ef7784fdb9d809f08dd244c", "score": "0.5468697", "text": "function foo(el) {\n console.log('el', el);\n console.log('this.id', this.id);\n}", "title": "" }, { "docid": "efeaca40e1df8066b074bf7960c5ac84", "score": "0.54667854", "text": "function saveId(id) {\r\n console.log(id.path[0]);\r\n if (!id.path[0].id) {\r\n //alert(\"Please give link/button an id\") keep this after fix\r\n return;\r\n }\r\n lastId = id.path[0];\r\n \r\n}", "title": "" }, { "docid": "e8ea026c45e90d0750792b352a1c513f", "score": "0.54633945", "text": "function getId(el) {\n var id = el.getAttribute('adf-id');\n return id ? id : '-1';\n }", "title": "" }, { "docid": "a6fa63ab72546a8803eefb883c02784b", "score": "0.5460014", "text": "own(id) {\n return this.id() === id;\n }", "title": "" }, { "docid": "a229bdb3c613620e87c4e1fe887b4f9b", "score": "0.5453786", "text": "function e$G(e){return \"string\"==typeof e?document.getElementById(e):e}", "title": "" }, { "docid": "7e6149e7cec8a560b238bd9996f930fe", "score": "0.54422086", "text": "getID(){\n return this.id;\n }", "title": "" }, { "docid": "5e28fe7e44fa56f16026ab1aff3d590c", "score": "0.5437944", "text": "function $(id){\r\n\treturn document.getElementById(id);\r\n}", "title": "" }, { "docid": "5e28fe7e44fa56f16026ab1aff3d590c", "score": "0.5437944", "text": "function $(id){\r\n\treturn document.getElementById(id);\r\n}", "title": "" }, { "docid": "d4637f68b000a14550bd7c4b89bd7d18", "score": "0.54360163", "text": "function $(id){\r\n\t\treturn document.getElementById(id);\r\n\t}", "title": "" }, { "docid": "746635754da322f660af429696efd97e", "score": "0.5430359", "text": "getId(){\r\n return this.id;\r\n }", "title": "" }, { "docid": "6d7d118a31681329189ba3bb0c10008d", "score": "0.5428652", "text": "function getID() {\n\t\t\tvar displayOption = $('.selected').attr('id');\n\t\t\treturn displayOption;\n\t\t}", "title": "" }, { "docid": "280a1841a7a756c85e57bdb43f36946a", "score": "0.54276085", "text": "get idAttribute () { return \"ID\" }", "title": "" }, { "docid": "d17245869a69fa061e46702384a1eb01", "score": "0.5423142", "text": "function $(x){if(typeof x === \"string\") return document.getElementById(x); return x;} //Get dom element by id or itself", "title": "" }, { "docid": "83d7f53ca0e03daacdaa5f802b46d01f", "score": "0.5415754", "text": "function $( id ) \r\n{\r\n return document.getElementById( id ) ;\r\n}", "title": "" }, { "docid": "458522647dd84db12b66fe064b805d58", "score": "0.5415277", "text": "function setCurrentId(element){\n document.getElementById('idCurrentArticleHidden').value = element.parentNode.id;\n}", "title": "" }, { "docid": "b897680238497c8a0513072bcfc7a838", "score": "0.541399", "text": "function E(id) { return document.getElementById(id); }", "title": "" }, { "docid": "2b319887331d5e38288ea96aee0e0f7f", "score": "0.54130405", "text": "function $(id)\r\n{\r\n return document.getElementById(id);\r\n}", "title": "" }, { "docid": "2b3c677a5ce9b3aa2b8baaf4c151c22a", "score": "0.539859", "text": "function idGetter() {\n\t if (this.$__._id) {\n\t return this.$__._id;\n\t }\n\n\t this.$__._id = this._id == null\n\t ? null\n\t : String(this._id);\n\t return this.$__._id;\n\t}", "title": "" }, { "docid": "2b3c677a5ce9b3aa2b8baaf4c151c22a", "score": "0.539859", "text": "function idGetter() {\n\t if (this.$__._id) {\n\t return this.$__._id;\n\t }\n\n\t this.$__._id = this._id == null\n\t ? null\n\t : String(this._id);\n\t return this.$__._id;\n\t}", "title": "" }, { "docid": "cdbf52fd54ee701190fdca678e4ab60c", "score": "0.5392525", "text": "setId(id){this._id=id;return this;}", "title": "" }, { "docid": "1be30f097fcde345511e0054ec8e5689", "score": "0.53863037", "text": "function _(x){\n\t\t\t\t\treturn document.getElementById(x);\n\t\t\t\t}", "title": "" }, { "docid": "45bf630a5d68f488462a33a7961925fc", "score": "0.53809357", "text": "function id(arg){\n return document.getElementById(arg);\n}", "title": "" }, { "docid": "6018a2ca6791b63bee7c2e769693e166", "score": "0.53762525", "text": "get id () {\n\t\treturn this.get('_id');\n\t}", "title": "" }, { "docid": "3691798c673d6f598063b8da50d80040", "score": "0.5370518", "text": "function $(id)\r\n{\r\n return document.getElementById(id);\r\n}", "title": "" }, { "docid": "be89a9d9f6bff97b3abc4509c035ee29", "score": "0.53642285", "text": "getCurrentID() {\n return String($(Constants.DOMStrings.notePopup).attr('data-id'));\n }", "title": "" }, { "docid": "4412ee3807cf0e7d0504c2432d34e175", "score": "0.5361249", "text": "function clickDeleteImovel(id){\n $('#modal-excluir-imovel').attr('id_imovel', id);\n}", "title": "" }, { "docid": "2f95bf993373561e1d64c10cfa208256", "score": "0.5361049", "text": "function x$(idTag, param){ //Updated 18 Feb 2012\n\tidTag=idTag.replace(/:/gi, \"\\\\:\")+(param ? param : \"\");\n\treturn($(\"#\"+idTag));\n}", "title": "" }, { "docid": "69c2fbc37fa65e666190344904459727", "score": "0.53574884", "text": "function get_target_id($target) {\n var tid = $target.prop(\"id\");\n var ar = tid.split(\"_\");\n return ar[1];\n}", "title": "" }, { "docid": "e40526ac40aaefe53dc07e8c53a9c0d8", "score": "0.5356996", "text": "function $ID(id){\r\n return document.getElementById(id);\r\n}", "title": "" }, { "docid": "fc157de4b66b41cbcf10a09182822d00", "score": "0.53493696", "text": "function g(id) {return document.getElementById(id);}", "title": "" }, { "docid": "fa192966757e6dd0434313cd7df82c99", "score": "0.5340482", "text": "function logMyId()\n\t{\n\tconsole.log(this.id);\n\t// debugger;\n\t}", "title": "" }, { "docid": "6f232fec76d6501d1cab87d836a685ec", "score": "0.5339996", "text": "function find_user_by_id() {\n alert($(this).name);\n \n}", "title": "" }, { "docid": "9632e03c414d85947a7bad72ed89992f", "score": "0.5339466", "text": "function getId(id) {\r\n\treturn document.getElementById(id);\r\n}", "title": "" }, { "docid": "7f3c55671f79b28a02ce612bf848945c", "score": "0.5337993", "text": "function prikaziId(event) {\n // Izbria za izpis prave barve\n switch (event.target.id) {\n case \"element1\":\n barva = \"rdeče\";\n break;\n case \"element2\":\n barva = \"modre\";\n break;\n case \"element3\":\n barva = \"rumene\";\n break;\n default:\n break;\n }\n prikazIdja[1].innerHTML = \"Div z id: \" + event.target.id + \" ki je \" + barva + \" barve!\";\n}", "title": "" }, { "docid": "ebed9c06bbfbde68c88acd2a0f7ae157", "score": "0.53378814", "text": "get element() {\n\t\treturn document.getElementById(this.id)\n\t}", "title": "" }, { "docid": "d6414392c412e35999fc126979cc38f5", "score": "0.53373265", "text": "function jq( myid ) {\n return \"#\" + myid.replace( /(:|\\.|\\[|\\]|\\/)/g, \"\\\\$1\" );\n}", "title": "" }, { "docid": "cc891152d242ac956855921b2d85b3c9", "score": "0.5336247", "text": "function idGetter(){if(this._id!=null){return String(this._id);}return null;}", "title": "" }, { "docid": "bb794b4c9837ab621d62e770a2e2f6d0", "score": "0.53294885", "text": "url() {\n return 'url(#' + this.id() + ')'\n }", "title": "" } ]
9de85ee9b6b3e4e4d152814fd5d4daf9
Parse an inline template binding. ie `">`
[ { "docid": "17c420d6ec0d2759984a0be63f7f3afb", "score": "0.57734215", "text": "parseInlineTemplateBinding(tplKey, tplValue, sourceSpan, targetMatchableAttrs, targetProps, targetVars) {\n const bindings = this._parseTemplateBindings(tplKey, tplValue, sourceSpan);\n for (let i = 0; i < bindings.length; i++) {\n const binding = bindings[i];\n if (binding.keyIsVar) {\n targetVars.push(new ParsedVariable(binding.key, binding.name, sourceSpan));\n }\n else if (binding.expression) {\n this._parsePropertyAst(binding.key, binding.expression, sourceSpan, targetMatchableAttrs, targetProps);\n }\n else {\n targetMatchableAttrs.push([binding.key, '']);\n this.parseLiteralAttr(binding.key, null, sourceSpan, targetMatchableAttrs, targetProps);\n }\n }\n }", "title": "" } ]
[ { "docid": "5e11134b4f187b4eb595a5306d1959a6", "score": "0.591993", "text": "function parse (template, options) {}", "title": "" }, { "docid": "8e7816c9d1a9dba1e55e479aabbcd38d", "score": "0.5862552", "text": "parseInlineTemplateBinding(tplKey, tplValue, sourceSpan, absoluteOffset, targetMatchableAttrs, targetProps, targetVars) {\n const bindings = this._parseTemplateBindings(tplKey, tplValue, sourceSpan);\n for (let i = 0; i < bindings.length; i++) {\n const binding = bindings[i];\n if (binding.keyIsVar) {\n targetVars.push(new ParsedVariable(binding.key, binding.name, sourceSpan));\n }\n else if (binding.expression) {\n this._parsePropertyAst(binding.key, binding.expression, sourceSpan, undefined, targetMatchableAttrs, targetProps);\n }\n else {\n targetMatchableAttrs.push([binding.key, '']);\n this.parseLiteralAttr(binding.key, null, sourceSpan, absoluteOffset, undefined, targetMatchableAttrs, targetProps);\n }\n }\n }", "title": "" }, { "docid": "b18913944e8ec9320ed1f8b2bc115394", "score": "0.57590455", "text": "function parse (\n template,\n options\n ) {\n \n }", "title": "" }, { "docid": "0d03725a3477c79ed8cd94e4135805fd", "score": "0.5719902", "text": "interpolateMustache(token, parsed) {\n /**\n * Finding the closing brace. If closing brace is missing, we\n * consider the block as a normal string\n */\n const closingBrace = token.indexOf('}');\n if (closingBrace === -1) {\n return token;\n }\n /**\n * Then we pull everything until the closing brace, except\n * the opening brace and trim off all white spaces.\n */\n const varReference = token.slice(1, closingBrace).trim();\n /**\n * Getting the value of the reference inside the braces\n */\n return `${this.getValue(varReference, parsed)}${token.slice(closingBrace + 1)}`;\n }", "title": "" }, { "docid": "9fec70843270022de4d84f43599d20cc", "score": "0.5695789", "text": "getHTML() {\n const l = this.strings.length - 1;\n let html = '';\n let isCommentBinding = false;\n\n for (let i = 0; i < l; i++) {\n const s = this.strings[i]; // For each binding we want to determine the kind of marker to insert\n // into the template source before it's parsed by the browser's HTML\n // parser. The marker type is based on whether the expression is in an\n // attribute, text, or comment poisition.\n // * For node-position bindings we insert a comment with the marker\n // sentinel as its text content, like <!--{{lit-guid}}-->.\n // * For attribute bindings we insert just the marker sentinel for the\n // first binding, so that we support unquoted attribute bindings.\n // Subsequent bindings can use a comment marker because multi-binding\n // attributes must be quoted.\n // * For comment bindings we insert just the marker sentinel so we don't\n // close the comment.\n //\n // The following code scans the template source, but is *not* an HTML\n // parser. We don't need to track the tree structure of the HTML, only\n // whether a binding is inside a comment, and if not, if it appears to be\n // the first binding in an attribute.\n\n const commentOpen = s.lastIndexOf('<!--'); // We're in comment position if we have a comment open with no following\n // comment close. Because <-- can appear in an attribute value there can\n // be false positives.\n\n isCommentBinding = (commentOpen > -1 || isCommentBinding) && s.indexOf('-->', commentOpen + 1) === -1; // Check to see if we have an attribute-like sequence preceeding the\n // expression. This can match \"name=value\" like structures in text,\n // comments, and attribute values, so there can be false-positives.\n\n const attributeMatch = lastAttributeNameRegex.exec(s);\n\n if (attributeMatch === null) {\n // We're only in this branch if we don't have a attribute-like\n // preceeding sequence. For comments, this guards against unusual\n // attribute values like <div foo=\"<!--${'bar'}\">. Cases like\n // <!-- foo=${'bar'}--> are handled correctly in the attribute branch\n // below.\n html += s + (isCommentBinding ? commentMarker : nodeMarker);\n } else {\n // For attributes we use just a marker sentinel, and also append a\n // $lit$ suffix to the name to opt-out of attribute-specific parsing\n // that IE and Edge do for style and certain SVG attributes.\n html += s.substr(0, attributeMatch.index) + attributeMatch[1] + attributeMatch[2] + boundAttributeSuffix + attributeMatch[3] + marker;\n }\n }\n\n html += this.strings[l];\n return html;\n }", "title": "" }, { "docid": "9fec70843270022de4d84f43599d20cc", "score": "0.5695789", "text": "getHTML() {\n const l = this.strings.length - 1;\n let html = '';\n let isCommentBinding = false;\n\n for (let i = 0; i < l; i++) {\n const s = this.strings[i]; // For each binding we want to determine the kind of marker to insert\n // into the template source before it's parsed by the browser's HTML\n // parser. The marker type is based on whether the expression is in an\n // attribute, text, or comment poisition.\n // * For node-position bindings we insert a comment with the marker\n // sentinel as its text content, like <!--{{lit-guid}}-->.\n // * For attribute bindings we insert just the marker sentinel for the\n // first binding, so that we support unquoted attribute bindings.\n // Subsequent bindings can use a comment marker because multi-binding\n // attributes must be quoted.\n // * For comment bindings we insert just the marker sentinel so we don't\n // close the comment.\n //\n // The following code scans the template source, but is *not* an HTML\n // parser. We don't need to track the tree structure of the HTML, only\n // whether a binding is inside a comment, and if not, if it appears to be\n // the first binding in an attribute.\n\n const commentOpen = s.lastIndexOf('<!--'); // We're in comment position if we have a comment open with no following\n // comment close. Because <-- can appear in an attribute value there can\n // be false positives.\n\n isCommentBinding = (commentOpen > -1 || isCommentBinding) && s.indexOf('-->', commentOpen + 1) === -1; // Check to see if we have an attribute-like sequence preceeding the\n // expression. This can match \"name=value\" like structures in text,\n // comments, and attribute values, so there can be false-positives.\n\n const attributeMatch = lastAttributeNameRegex.exec(s);\n\n if (attributeMatch === null) {\n // We're only in this branch if we don't have a attribute-like\n // preceeding sequence. For comments, this guards against unusual\n // attribute values like <div foo=\"<!--${'bar'}\">. Cases like\n // <!-- foo=${'bar'}--> are handled correctly in the attribute branch\n // below.\n html += s + (isCommentBinding ? commentMarker : nodeMarker);\n } else {\n // For attributes we use just a marker sentinel, and also append a\n // $lit$ suffix to the name to opt-out of attribute-specific parsing\n // that IE and Edge do for style and certain SVG attributes.\n html += s.substr(0, attributeMatch.index) + attributeMatch[1] + attributeMatch[2] + boundAttributeSuffix + attributeMatch[3] + marker;\n }\n }\n\n html += this.strings[l];\n return html;\n }", "title": "" }, { "docid": "b30c32bd4e309d4f0a9d84931ddb53ae", "score": "0.56355697", "text": "getHTML() {\n const l = this.strings.length - 1;\n let html = '';\n let isCommentBinding = false;\n for (let i = 0; i < l; i++) {\n const s = this.strings[i];\n // For each binding we want to determine the kind of marker to insert\n // into the template source before it's parsed by the browser's HTML\n // parser. The marker type is based on whether the expression is in an\n // attribute, text, or comment poisition.\n // * For node-position bindings we insert a comment with the marker\n // sentinel as its text content, like <!--{{lit-guid}}-->.\n // * For attribute bindings we insert just the marker sentinel for the\n // first binding, so that we support unquoted attribute bindings.\n // Subsequent bindings can use a comment marker because multi-binding\n // attributes must be quoted.\n // * For comment bindings we insert just the marker sentinel so we don't\n // close the comment.\n //\n // The following code scans the template source, but is *not* an HTML\n // parser. We don't need to track the tree structure of the HTML, only\n // whether a binding is inside a comment, and if not, if it appears to be\n // the first binding in an attribute.\n const commentOpen = s.lastIndexOf('<!--');\n // We're in comment position if we have a comment open with no following\n // comment close. Because <-- can appear in an attribute value there can\n // be false positives.\n isCommentBinding = (commentOpen > -1 || isCommentBinding) &&\n s.indexOf('-->', commentOpen + 1) === -1;\n // Check to see if we have an attribute-like sequence preceeding the\n // expression. This can match \"name=value\" like structures in text,\n // comments, and attribute values, so there can be false-positives.\n const attributeMatch = __WEBPACK_IMPORTED_MODULE_1__template_js__[\"e\" /* lastAttributeNameRegex */].exec(s);\n if (attributeMatch === null) {\n // We're only in this branch if we don't have a attribute-like\n // preceeding sequence. For comments, this guards against unusual\n // attribute values like <div foo=\"<!--${'bar'}\">. Cases like\n // <!-- foo=${'bar'}--> are handled correctly in the attribute branch\n // below.\n html += s + (isCommentBinding ? __WEBPACK_IMPORTED_MODULE_1__template_js__[\"f\" /* marker */] : __WEBPACK_IMPORTED_MODULE_1__template_js__[\"g\" /* nodeMarker */]);\n }\n else {\n // For attributes we use just a marker sentinel, and also append a\n // $lit$ suffix to the name to opt-out of attribute-specific parsing\n // that IE and Edge do for style and certain SVG attributes.\n html += s.substr(0, attributeMatch.index) + attributeMatch[1] +\n attributeMatch[2] + __WEBPACK_IMPORTED_MODULE_1__template_js__[\"b\" /* boundAttributeSuffix */] + attributeMatch[3] +\n __WEBPACK_IMPORTED_MODULE_1__template_js__[\"f\" /* marker */];\n }\n }\n html += this.strings[l];\n return html;\n }", "title": "" }, { "docid": "fbc2877b430b01fe79e879045622aae9", "score": "0.5622675", "text": "parseTemplateBindings(templateKey, templateValue, templateUrl, absoluteKeyOffset, absoluteValueOffset) {\n const tokens = this._lexer.tokenize(templateValue);\n const parser = new _ParseAST(templateValue, templateUrl, absoluteValueOffset, tokens, 0 /* None */, this.errors, 0 /* relative offset */);\n return parser.parseTemplateBindings({\n source: templateKey,\n span: new AbsoluteSourceSpan(absoluteKeyOffset, absoluteKeyOffset + templateKey.length),\n });\n }", "title": "" }, { "docid": "5b513dd792e370b92717331783e81b6f", "score": "0.56136954", "text": "getHTML() {\n const l = this.strings.length - 1;\n let html = '';\n let isCommentBinding = false;\n for (let i = 0; i < l; i++) {\n const s = this.strings[i];\n // For each binding we want to determine the kind of marker to insert\n // into the template source before it's parsed by the browser's HTML\n // parser. The marker type is based on whether the expression is in an\n // attribute, text, or comment position.\n // * For node-position bindings we insert a comment with the marker\n // sentinel as its text content, like <!--{{lit-guid}}-->.\n // * For attribute bindings we insert just the marker sentinel for the\n // first binding, so that we support unquoted attribute bindings.\n // Subsequent bindings can use a comment marker because multi-binding\n // attributes must be quoted.\n // * For comment bindings we insert just the marker sentinel so we don't\n // close the comment.\n //\n // The following code scans the template source, but is *not* an HTML\n // parser. We don't need to track the tree structure of the HTML, only\n // whether a binding is inside a comment, and if not, if it appears to be\n // the first binding in an attribute.\n const commentOpen = s.lastIndexOf('<!--');\n // We're in comment position if we have a comment open with no following\n // comment close. Because <-- can appear in an attribute value there can\n // be false positives.\n isCommentBinding = (commentOpen > -1 || isCommentBinding) &&\n s.indexOf('-->', commentOpen + 1) === -1;\n // Check to see if we have an attribute-like sequence preceding the\n // expression. This can match \"name=value\" like structures in text,\n // comments, and attribute values, so there can be false-positives.\n const attributeMatch = _template_js__WEBPACK_IMPORTED_MODULE_1__[\"lastAttributeNameRegex\"].exec(s);\n if (attributeMatch === null) {\n // We're only in this branch if we don't have a attribute-like\n // preceding sequence. For comments, this guards against unusual\n // attribute values like <div foo=\"<!--${'bar'}\">. Cases like\n // <!-- foo=${'bar'}--> are handled correctly in the attribute branch\n // below.\n html += s + (isCommentBinding ? commentMarker : _template_js__WEBPACK_IMPORTED_MODULE_1__[\"nodeMarker\"]);\n }\n else {\n // For attributes we use just a marker sentinel, and also append a\n // $lit$ suffix to the name to opt-out of attribute-specific parsing\n // that IE and Edge do for style and certain SVG attributes.\n html += s.substr(0, attributeMatch.index) + attributeMatch[1] +\n attributeMatch[2] + _template_js__WEBPACK_IMPORTED_MODULE_1__[\"boundAttributeSuffix\"] + attributeMatch[3] +\n _template_js__WEBPACK_IMPORTED_MODULE_1__[\"marker\"];\n }\n }\n html += this.strings[l];\n return html;\n }", "title": "" }, { "docid": "5b513dd792e370b92717331783e81b6f", "score": "0.56136954", "text": "getHTML() {\n const l = this.strings.length - 1;\n let html = '';\n let isCommentBinding = false;\n for (let i = 0; i < l; i++) {\n const s = this.strings[i];\n // For each binding we want to determine the kind of marker to insert\n // into the template source before it's parsed by the browser's HTML\n // parser. The marker type is based on whether the expression is in an\n // attribute, text, or comment position.\n // * For node-position bindings we insert a comment with the marker\n // sentinel as its text content, like <!--{{lit-guid}}-->.\n // * For attribute bindings we insert just the marker sentinel for the\n // first binding, so that we support unquoted attribute bindings.\n // Subsequent bindings can use a comment marker because multi-binding\n // attributes must be quoted.\n // * For comment bindings we insert just the marker sentinel so we don't\n // close the comment.\n //\n // The following code scans the template source, but is *not* an HTML\n // parser. We don't need to track the tree structure of the HTML, only\n // whether a binding is inside a comment, and if not, if it appears to be\n // the first binding in an attribute.\n const commentOpen = s.lastIndexOf('<!--');\n // We're in comment position if we have a comment open with no following\n // comment close. Because <-- can appear in an attribute value there can\n // be false positives.\n isCommentBinding = (commentOpen > -1 || isCommentBinding) &&\n s.indexOf('-->', commentOpen + 1) === -1;\n // Check to see if we have an attribute-like sequence preceding the\n // expression. This can match \"name=value\" like structures in text,\n // comments, and attribute values, so there can be false-positives.\n const attributeMatch = _template_js__WEBPACK_IMPORTED_MODULE_1__[\"lastAttributeNameRegex\"].exec(s);\n if (attributeMatch === null) {\n // We're only in this branch if we don't have a attribute-like\n // preceding sequence. For comments, this guards against unusual\n // attribute values like <div foo=\"<!--${'bar'}\">. Cases like\n // <!-- foo=${'bar'}--> are handled correctly in the attribute branch\n // below.\n html += s + (isCommentBinding ? commentMarker : _template_js__WEBPACK_IMPORTED_MODULE_1__[\"nodeMarker\"]);\n }\n else {\n // For attributes we use just a marker sentinel, and also append a\n // $lit$ suffix to the name to opt-out of attribute-specific parsing\n // that IE and Edge do for style and certain SVG attributes.\n html += s.substr(0, attributeMatch.index) + attributeMatch[1] +\n attributeMatch[2] + _template_js__WEBPACK_IMPORTED_MODULE_1__[\"boundAttributeSuffix\"] + attributeMatch[3] +\n _template_js__WEBPACK_IMPORTED_MODULE_1__[\"marker\"];\n }\n }\n html += this.strings[l];\n return html;\n }", "title": "" }, { "docid": "01b871ad7d366345e2f0813914e4cc33", "score": "0.5605005", "text": "getHTML() {\n const l = this.strings.length - 1;\n let html = '';\n let isCommentBinding = false;\n\n for (let i = 0; i < l; i++) {\n const s = this.strings[i]; // For each binding we want to determine the kind of marker to insert\n // into the template source before it's parsed by the browser's HTML\n // parser. The marker type is based on whether the expression is in an\n // attribute, text, or comment poisition.\n // * For node-position bindings we insert a comment with the marker\n // sentinel as its text content, like <!--{{lit-guid}}-->.\n // * For attribute bindings we insert just the marker sentinel for the\n // first binding, so that we support unquoted attribute bindings.\n // Subsequent bindings can use a comment marker because multi-binding\n // attributes must be quoted.\n // * For comment bindings we insert just the marker sentinel so we don't\n // close the comment.\n //\n // The following code scans the template source, but is *not* an HTML\n // parser. We don't need to track the tree structure of the HTML, only\n // whether a binding is inside a comment, and if not, if it appears to be\n // the first binding in an attribute.\n\n const commentOpen = s.lastIndexOf('<!--'); // We're in comment position if we have a comment open with no following\n // comment close. Because <-- can appear in an attribute value there can\n // be false positives.\n\n isCommentBinding = (commentOpen > -1 || isCommentBinding) && s.indexOf('-->', commentOpen + 1) === -1; // Check to see if we have an attribute-like sequence preceeding the\n // expression. This can match \"name=value\" like structures in text,\n // comments, and attribute values, so there can be false-positives.\n\n const attributeMatch = _template.lastAttributeNameRegex.exec(s);\n\n if (attributeMatch === null) {\n // We're only in this branch if we don't have a attribute-like\n // preceeding sequence. For comments, this guards against unusual\n // attribute values like <div foo=\"<!--${'bar'}\">. Cases like\n // <!-- foo=${'bar'}--> are handled correctly in the attribute branch\n // below.\n html += s + (isCommentBinding ? commentMarker : _template.nodeMarker);\n } else {\n // For attributes we use just a marker sentinel, and also append a\n // $lit$ suffix to the name to opt-out of attribute-specific parsing\n // that IE and Edge do for style and certain SVG attributes.\n html += s.substr(0, attributeMatch.index) + attributeMatch[1] + attributeMatch[2] + _template.boundAttributeSuffix + attributeMatch[3] + _template.marker;\n }\n }\n\n html += this.strings[l];\n return html;\n }", "title": "" }, { "docid": "01b871ad7d366345e2f0813914e4cc33", "score": "0.5605005", "text": "getHTML() {\n const l = this.strings.length - 1;\n let html = '';\n let isCommentBinding = false;\n\n for (let i = 0; i < l; i++) {\n const s = this.strings[i]; // For each binding we want to determine the kind of marker to insert\n // into the template source before it's parsed by the browser's HTML\n // parser. The marker type is based on whether the expression is in an\n // attribute, text, or comment poisition.\n // * For node-position bindings we insert a comment with the marker\n // sentinel as its text content, like <!--{{lit-guid}}-->.\n // * For attribute bindings we insert just the marker sentinel for the\n // first binding, so that we support unquoted attribute bindings.\n // Subsequent bindings can use a comment marker because multi-binding\n // attributes must be quoted.\n // * For comment bindings we insert just the marker sentinel so we don't\n // close the comment.\n //\n // The following code scans the template source, but is *not* an HTML\n // parser. We don't need to track the tree structure of the HTML, only\n // whether a binding is inside a comment, and if not, if it appears to be\n // the first binding in an attribute.\n\n const commentOpen = s.lastIndexOf('<!--'); // We're in comment position if we have a comment open with no following\n // comment close. Because <-- can appear in an attribute value there can\n // be false positives.\n\n isCommentBinding = (commentOpen > -1 || isCommentBinding) && s.indexOf('-->', commentOpen + 1) === -1; // Check to see if we have an attribute-like sequence preceeding the\n // expression. This can match \"name=value\" like structures in text,\n // comments, and attribute values, so there can be false-positives.\n\n const attributeMatch = _template.lastAttributeNameRegex.exec(s);\n\n if (attributeMatch === null) {\n // We're only in this branch if we don't have a attribute-like\n // preceeding sequence. For comments, this guards against unusual\n // attribute values like <div foo=\"<!--${'bar'}\">. Cases like\n // <!-- foo=${'bar'}--> are handled correctly in the attribute branch\n // below.\n html += s + (isCommentBinding ? commentMarker : _template.nodeMarker);\n } else {\n // For attributes we use just a marker sentinel, and also append a\n // $lit$ suffix to the name to opt-out of attribute-specific parsing\n // that IE and Edge do for style and certain SVG attributes.\n html += s.substr(0, attributeMatch.index) + attributeMatch[1] + attributeMatch[2] + _template.boundAttributeSuffix + attributeMatch[3] + _template.marker;\n }\n }\n\n html += this.strings[l];\n return html;\n }", "title": "" }, { "docid": "9c13d5bb250b5cec07eef233807aa2f2", "score": "0.559033", "text": "parseTemplateBindings(tplKey) {\n let firstBinding = true;\n const bindings = [];\n const warnings = [];\n do {\n const start = this.inputIndex;\n let rawKey;\n let key;\n let isVar = false;\n if (firstBinding) {\n rawKey = key = tplKey;\n firstBinding = false;\n }\n else {\n isVar = this.peekKeywordLet();\n if (isVar)\n this.advance();\n rawKey = this.expectTemplateBindingKey();\n key = isVar ? rawKey : tplKey + rawKey[0].toUpperCase() + rawKey.substring(1);\n this.optionalCharacter($COLON);\n }\n let name = null;\n let expression = null;\n if (isVar) {\n if (this.optionalOperator('=')) {\n name = this.expectTemplateBindingKey();\n }\n else {\n name = '\\$implicit';\n }\n }\n else if (this.peekKeywordAs()) {\n this.advance(); // consume `as`\n name = rawKey;\n key = this.expectTemplateBindingKey(); // read local var name\n isVar = true;\n }\n else if (this.next !== EOF && !this.peekKeywordLet()) {\n const start = this.inputIndex;\n const ast = this.parsePipe();\n const source = this.input.substring(start - this.offset, this.inputIndex - this.offset);\n expression =\n new ASTWithSource(ast, source, this.location, this.absoluteOffset, this.errors);\n }\n bindings.push(new TemplateBinding(this.span(start), key, isVar, name, expression));\n if (this.peekKeywordAs() && !isVar) {\n const letStart = this.inputIndex;\n this.advance(); // consume `as`\n const letName = this.expectTemplateBindingKey(); // read local var name\n bindings.push(new TemplateBinding(this.span(letStart), letName, true, key, null));\n }\n if (!this.optionalCharacter($SEMICOLON)) {\n this.optionalCharacter($COMMA);\n }\n } while (this.index < this.tokens.length);\n return new TemplateBindingParseResult(bindings, warnings, this.errors);\n }", "title": "" }, { "docid": "a01c4db81164ec1675c8400a267e3b3c", "score": "0.5589943", "text": "transform(message, rule, pointer, args) {\n /**\n * No interpolation required\n */\n if (!message.includes('{{')) {\n return message;\n }\n return helpers_1.interpolate(message, { rule, field: pointer, options: args || {} });\n }", "title": "" }, { "docid": "3f3d78cd8b9c67de641592a67eff2557", "score": "0.55889505", "text": "parseTemplateBindings(tplKey) {\n let firstBinding = true;\n const bindings = [];\n const warnings = [];\n do {\n const start = this.inputIndex;\n let rawKey;\n let key;\n let isVar = false;\n if (firstBinding) {\n rawKey = key = tplKey;\n firstBinding = false;\n }\n else {\n isVar = this.peekKeywordLet();\n if (isVar)\n this.advance();\n rawKey = this.expectTemplateBindingKey();\n key = isVar ? rawKey : tplKey + rawKey[0].toUpperCase() + rawKey.substring(1);\n this.optionalCharacter($COLON);\n }\n let name = null;\n let expression = null;\n if (isVar) {\n if (this.optionalOperator('=')) {\n name = this.expectTemplateBindingKey();\n }\n else {\n name = '\\$implicit';\n }\n }\n else if (this.peekKeywordAs()) {\n this.advance(); // consume `as`\n name = rawKey;\n key = this.expectTemplateBindingKey(); // read local var name\n isVar = true;\n }\n else if (this.next !== EOF && !this.peekKeywordLet()) {\n const start = this.inputIndex;\n const ast = this.parsePipe();\n const source = this.input.substring(start - this.offset, this.inputIndex - this.offset);\n expression = new ASTWithSource(ast, source, this.location, this.errors);\n }\n bindings.push(new TemplateBinding(this.span(start), key, isVar, name, expression));\n if (this.peekKeywordAs() && !isVar) {\n const letStart = this.inputIndex;\n this.advance(); // consume `as`\n const letName = this.expectTemplateBindingKey(); // read local var name\n bindings.push(new TemplateBinding(this.span(letStart), letName, true, key, null));\n }\n if (!this.optionalCharacter($SEMICOLON)) {\n this.optionalCharacter($COMMA);\n }\n } while (this.index < this.tokens.length);\n return new TemplateBindingParseResult(bindings, warnings, this.errors);\n }", "title": "" }, { "docid": "2a7c75c29adc72bb612e31f9b8ec0036", "score": "0.55885845", "text": "function handleText(text, isAttr) {\n\t\tlet match, result = '', lastIndex = 0;\n\t\tlet cat = isAttr ? ' + ' : ', ';\n\t\tif (!text.match(syntax)) {\n\t\t\treturn result += \"'\" + text.substr(lastIndex).replace(/\\n/g, '\\\\n').replace(/'/g, '\\\\\\'') + \"'\" + cat;\n\t\t}\n\t\t// locate mustache syntax within the text\n\t\twhile (match = syntax.exec(text)) {\n\t\t\tif (match.index < lastIndex) continue;\n\t\t\tlet frag = text.substring(lastIndex, match.index);\n\t\t\tif (frag.length > 0) {\n\t\t\t\tresult += \"'\" + frag.replace(/\\n/g, '\\\\n').replace(/'/g, '\\\\\\'') + \"'\" + cat;\n\t\t\t}\n\t\t\tlastIndex = match.index + match[0].length;\n\t\t\tlet key = match[1];\n\t\t\t// of \"{{#test}}\" value will be \"test\"\n\t\t\tlet value = key.substr(1);\n\t\t\tif (key[0] === '#') {\n\t\t\t\t// handle block start\n\t\t\t\tresult += `(spread(toArray(${getData()}, '${value}').map(function (e, i, a) {\n\t\t\t\t\t\tvar data$${level + 1} = merge({}, data${0 >= level ? '' : '$' + level}, {'.': e, '.index': i, '.length': a.length}, e);\n\t\t\t\t\t\treturn [].concat(`;\n\t\t\t\tlevel += 1;\n\t\t\t\tusesMerge = true;\n\t\t\t\tusesSpread = true;\n\t\t\t} else if (key[0] === '/') {\n\t\t\t\t// handle block end\n\t\t\t\tresult += '\\'\\'); })).join(\"\"))' + cat;\n\t\t\t\tlevel -= 1;\n\t\t\t\tif (level < 0) {\n\t\t\t\t\tthrow new Error('Unexpected end of block: ' + key.substr(1) + ' line ' + countLines(text.substring(0, lastIndex)));\n\t\t\t\t}\n\t\t\t} else if (key[0] === '^') {\n\t\t\t\t// handle inverted block start\n\t\t\t\tresult += `(\n\t\t\t\t\t(\n\t\t\t\t\t\tsafeAccess(${getData()}, '${value}') &&\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\ttypeof safeAccess(${getData()}, '${value}') === 'boolean' ||\n\t\t\t\t\t\t\tsafeAccess(${getData()}, '${value}').length > 0 ||\n\t\t\t\t\t\t\tObject.prototype.toString.call(safeAccess(${getData()}, '${value}')) !== '[object Array]'\n\t\t\t\t\t\t)\n\t\t\t\t\t) ?\n\t\t\t\t\t\t[]\n\t\t\t\t\t:\n\t\t\t\t\t\tspread(\n\t\t\t\t\t\t\t[1].map(\n\t\t\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\t\t\tvar data$${level + 1} = merge({}, data${0 >= level ? '' : '$' + level});\n\t\t\t\t\t\t\t\t\treturn [].concat(`;\n\t\t\t\tusesMerge = true;\n\t\t\t\tusesSpread = true;\n\t\t\t\tlevel += 1;\n\t\t\t} else if (key[0] === '>') {\n\t\t\t\t// handle partial end\n\t\t\t\tresult += `require('./${value.trim()}.js').render(${getData()})${cat}`;\n\t\t\t} else if (key[0] !== '{' && key[0] !== '!') {\n\t\t\t\t// handle non-escaping prints \"{{{myvar}}}\"\n\t\t\t\tvalue = key;\n\t\t\t\tresult += `''+safeAccess(${getData()}, '${value}', true)${cat}`\n\t\t\t} else if (key[0] !== '!') {\n\t\t\t\t// regular prints \"{{myvar}}\"\n\t\t\t\tresult += `''+safeAccess(${getData()}, '${value}')${cat}`;\n\t\t\t} // ignore comments\n\t\t}\n\t\tif (text.substr(lastIndex).length > 0) {\n\t\t\tresult += \"'\" + text.substr(lastIndex).replace(/\\n/g, '\\\\n').replace(/'/g, '\\\\\\'') + \"'\" + cat;\n\t\t}\n\t\treturn result;\n\t}", "title": "" }, { "docid": "86cd34b4269320fc08be842202a32418", "score": "0.5439127", "text": "function rawContent(tagName, string, templ, innerTemplate) {\n\tvar index = string.indexOf('</' + tagName + '>'),\n\t\traw;\n\tif (index === -1)\n\t\tthrow new Error(tagName + ' tag badly closed.');\n\tif (index) { // more than 0\n\t\traw = string.substring(0, index);\n\t\tif (tagName === 'templ') // produce local api-like handler\n\t\t{\n\t\t\tinnerTemplate.templFunc = new Function(raw);\n\t\t} else\n\t\t\tinnerTemplate.raw(raw);\n\t}\n\treturn string.substring(index + tagName.length + 3);\n}", "title": "" }, { "docid": "fdf7da3ab740075d5242b3ec96fa0301", "score": "0.5420864", "text": "function parseMustaches(s, name, node, prepareBindingFn) {\n if (!s || !s.length)\n return;\n\n var tokens;\n var length = s.length;\n var startIndex = 0, lastIndex = 0, endIndex = 0;\n var onlyOneTime = true;\n while (lastIndex < length) {\n var startIndex = s.indexOf('{{', lastIndex);\n var oneTimeStart = s.indexOf('[[', lastIndex);\n var oneTime = false;\n var terminator = '}}';\n\n if (oneTimeStart >= 0 &&\n (startIndex < 0 || oneTimeStart < startIndex)) {\n startIndex = oneTimeStart;\n oneTime = true;\n terminator = ']]';\n }\n\n endIndex = startIndex < 0 ? -1 : s.indexOf(terminator, startIndex + 2);\n\n if (endIndex < 0) {\n if (!tokens)\n return;\n\n tokens.push(s.slice(lastIndex)); // TEXT\n break;\n }\n\n tokens = tokens || [];\n tokens.push(s.slice(lastIndex, startIndex)); // TEXT\n var pathString = s.slice(startIndex + 2, endIndex).trim();\n tokens.push(oneTime); // ONE_TIME?\n onlyOneTime = onlyOneTime && oneTime;\n var delegateFn = prepareBindingFn &&\n prepareBindingFn(pathString, name, node);\n // Don't try to parse the expression if there's a prepareBinding function\n if (delegateFn == null) {\n tokens.push(Path.get(pathString)); // PATH\n } else {\n tokens.push(null);\n }\n tokens.push(delegateFn); // DELEGATE_FN\n lastIndex = endIndex + 2;\n }\n\n if (lastIndex === length)\n tokens.push(''); // TEXT\n\n tokens.hasOnePath = tokens.length === 5;\n tokens.isSimplePath = tokens.hasOnePath &&\n tokens[0] == '' &&\n tokens[4] == '';\n tokens.onlyOneTime = onlyOneTime;\n\n tokens.combinator = function(values) {\n var newValue = tokens[0];\n\n for (var i = 1; i < tokens.length; i += 4) {\n var value = tokens.hasOnePath ? values : values[(i - 1) / 4];\n if (value !== undefined)\n newValue += value;\n newValue += tokens[i + 3];\n }\n\n return newValue;\n }\n\n return tokens;\n }", "title": "" }, { "docid": "a84b37a20f6d6a8e2ae5f3c14f34a3d4", "score": "0.5418643", "text": "get template () {\n if (isAlive(self) && self.interpolated) {\n return self.interpolated.map((item, idx) => item.token())\n } else return null\n }", "title": "" }, { "docid": "cae20a73cafe36aec1e1c987d82bd50c", "score": "0.5377077", "text": "function parse(template,options){warn$2=options.warn||baseWarn;platformIsPreTag=options.isPreTag||no;platformMustUseProp=options.mustUseProp||no;platformGetTagNamespace=options.getTagNamespace||no;transforms=pluckModuleFunction(options.modules,'transformNode');preTransforms=pluckModuleFunction(options.modules,'preTransformNode');postTransforms=pluckModuleFunction(options.modules,'postTransformNode');delimiters=options.delimiters;var stack=[];var preserveWhitespace=options.preserveWhitespace!==false;var root;var currentParent;var inVPre=false;var inPre=false;var warned=false;function warnOnce(msg){if(!warned){warned=true;warn$2(msg);}}function endPre(element){// check pre state\nif(element.pre){inVPre=false;}if(platformIsPreTag(element.tag)){inPre=false;}}parseHTML(template,{warn:warn$2,expectHTML:options.expectHTML,isUnaryTag:options.isUnaryTag,canBeLeftOpenTag:options.canBeLeftOpenTag,shouldDecodeNewlines:options.shouldDecodeNewlines,shouldKeepComment:options.comments,start:function start(tag,attrs,unary){// check namespace.\n// inherit parent ns if there is one\nvar ns=currentParent&&currentParent.ns||platformGetTagNamespace(tag);// handle IE svg bug\n/* istanbul ignore if */if(isIE&&ns==='svg'){attrs=guardIESVGBug(attrs);}var element=createASTElement(tag,attrs,currentParent);if(ns){element.ns=ns;}if(isForbiddenTag(element)&&!isServerRendering()){element.forbidden=true;\"development\"!=='production'&&warn$2('Templates should only be responsible for mapping the state to the '+'UI. Avoid placing tags with side-effects in your templates, such as '+\"<\"+tag+\">\"+', as they will not be parsed.');}// apply pre-transforms\nfor(var i=0;i<preTransforms.length;i++){element=preTransforms[i](element,options)||element;}if(!inVPre){processPre(element);if(element.pre){inVPre=true;}}if(platformIsPreTag(element.tag)){inPre=true;}if(inVPre){processRawAttrs(element);}else if(!element.processed){// structural directives\nprocessFor(element);processIf(element);processOnce(element);// element-scope stuff\nprocessElement(element,options);}function checkRootConstraints(el){{if(el.tag==='slot'||el.tag==='template'){warnOnce(\"Cannot use <\"+el.tag+\"> as component root element because it may \"+'contain multiple nodes.');}if(el.attrsMap.hasOwnProperty('v-for')){warnOnce('Cannot use v-for on stateful component root element because '+'it renders multiple elements.');}}}// tree management\nif(!root){root=element;checkRootConstraints(root);}else if(!stack.length){// allow root elements with v-if, v-else-if and v-else\nif(root.if&&(element.elseif||element.else)){checkRootConstraints(element);addIfCondition(root,{exp:element.elseif,block:element});}else{warnOnce(\"Component template should contain exactly one root element. \"+\"If you are using v-if on multiple elements, \"+\"use v-else-if to chain them instead.\");}}if(currentParent&&!element.forbidden){if(element.elseif||element.else){processIfConditions(element,currentParent);}else if(element.slotScope){// scoped slot\ncurrentParent.plain=false;var name=element.slotTarget||'\"default\"';(currentParent.scopedSlots||(currentParent.scopedSlots={}))[name]=element;}else{currentParent.children.push(element);element.parent=currentParent;}}if(!unary){currentParent=element;stack.push(element);}else{endPre(element);}// apply post-transforms\nfor(var i$1=0;i$1<postTransforms.length;i$1++){postTransforms[i$1](element,options);}},end:function end(){// remove trailing whitespace\nvar element=stack[stack.length-1];var lastNode=element.children[element.children.length-1];if(lastNode&&lastNode.type===3&&lastNode.text===' '&&!inPre){element.children.pop();}// pop stack\nstack.length-=1;currentParent=stack[stack.length-1];endPre(element);},chars:function chars(text){if(!currentParent){{if(text===template){warnOnce('Component template requires a root element, rather than just text.');}else if(text=text.trim()){warnOnce(\"text \\\"\"+text+\"\\\" outside root element will be ignored.\");}}return;}// IE textarea placeholder bug\n/* istanbul ignore if */if(isIE&&currentParent.tag==='textarea'&&currentParent.attrsMap.placeholder===text){return;}var children=currentParent.children;text=inPre||text.trim()?isTextTag(currentParent)?text:decodeHTMLCached(text)// only preserve whitespace if its not right after a starting tag\n:preserveWhitespace&&children.length?' ':'';if(text){var expression;if(!inVPre&&text!==' '&&(expression=parseText(text,delimiters))){children.push({type:2,expression:expression,text:text});}else if(text!==' '||!children.length||children[children.length-1].text!==' '){children.push({type:3,text:text});}}},comment:function comment(text){currentParent.children.push({type:3,text:text,isComment:true});}});return root;}", "title": "" }, { "docid": "18b88a68219e0d5961f069d060988606", "score": "0.5323726", "text": "function parseTemplate(key_value, tpl){\n var translated_tpl = tpl, key;\n for(key in key_value){\n if(key_value.hasOwnProperty(key)){\n translated_tpl = translated_tpl.replace(new RegExp(\"{{\"+key+\"}}\",\"g\"), key_value[key]);\n }\n }\n return translated_tpl;\n}", "title": "" }, { "docid": "24dcdeff019b7f25c2258236e485c2f8", "score": "0.5288061", "text": "function resolveExpression(template) {\n let y = [];\n let match;\n // topen tag;\n while ((match = regExOpen.exec(template)) != null) {\n y.push(match);\n }\n if (y.length === 0) return template;\n let i = y.length - 1;\n while (i >= 0) {\n template =\n template.substring(0, y[i].index) +\n \"${\" +\n template.substring(y[i].index + 2, template.length);\n i--;\n }\n\n // close tag\n match = [];\n y = [];\n while ((match = regExClose.exec(template)) != null) {\n y.push(match);\n }\n i = y.length - 1;\n while (i >= 0) {\n template =\n template.substring(0, y[i].index) +\n \"}\" +\n template.substring(y[i].index + 2, template.length);\n i--;\n }\n const templateGenerator = new Function(`return \\`${template}\\``);\n\n //console.log(\" processed template ====> \", this, template, templateGenerator);\n //console.log(\" updating \", this.update);\n return templateGenerator.call(this);\n}", "title": "" }, { "docid": "cb7c9111265e0e503e3990a05e3b8534", "score": "0.5220741", "text": "function parseHandlebars() {\n function locateHandlebar(value, fromIndex) {\n return value.indexOf('{{', fromIndex)\n }\n\n function tokenizeDictionary(eat, value, silent) {\n var match = /^{{(\\w+)}}/.exec(value)\n\n if (match) {\n if (silent) {\n return true\n }\n\n console.log({ value, match });\n\n return eat(match[0])({\n type: 'smartValue',\n url: 'https://social-network/' + match[1],\n children: [{type: 'text', value: match[1]}]\n })\n }\n }\n\n tokenizeDictionary.notInLink = true\n tokenizeDictionary.locator = locateHandlebar\n\n return function handlebars() {\n var Parser = this.Parser\n var tokenizers = Parser.prototype.inlineTokenizers\n var methods = Parser.prototype.inlineMethods\n\n // Add an inline tokenizer (defined in the following example).\n tokenizers.handlebar = tokenizeDictionary\n\n // Run it just before `text`.\n methods.splice(methods.indexOf('text'), 0, 'handlebar')\n }\n}", "title": "" }, { "docid": "78f86942e110a4dbfadf63daf6ef2a06", "score": "0.52030164", "text": "function template(html, context) {\n\t return html.replace(/\\{([\\w_\\.]+)\\}/g, function (variable) {\n\t return (0, _util.get)(context, variable.slice(1, variable.length - 1), '');\n\t });\n\t}", "title": "" }, { "docid": "758046ef7429cb5e7e7c6191d5313df3", "score": "0.51466984", "text": "function escapeForTemplate(raw) {\n return raw\n .replace(/^['\"]|['\"]$/g, '')\n .replace(/`/g, '\\\\`')\n .replace(/\\\\(['\"])/g, '$1');\n}", "title": "" }, { "docid": "a68343adfcf866d6267eb04b4d6017b9", "score": "0.512637", "text": "function parse(template,options){warn$2 = options.warn || baseWarn;platformIsPreTag = options.isPreTag || no;platformMustUseProp = options.mustUseProp || no;platformGetTagNamespace = options.getTagNamespace || no;transforms = pluckModuleFunction(options.modules,'transformNode');preTransforms = pluckModuleFunction(options.modules,'preTransformNode');postTransforms = pluckModuleFunction(options.modules,'postTransformNode');delimiters = options.delimiters;var stack=[];var preserveWhitespace=options.preserveWhitespace !== false;var root;var currentParent;var inVPre=false;var inPre=false;var warned=false;function warnOnce(msg){if(!warned){warned = true;warn$2(msg);}}function endPre(element){ // check pre state\n if(element.pre){inVPre = false;}if(platformIsPreTag(element.tag)){inPre = false;}}parseHTML(template,{warn:warn$2,expectHTML:options.expectHTML,isUnaryTag:options.isUnaryTag,canBeLeftOpenTag:options.canBeLeftOpenTag,shouldDecodeNewlines:options.shouldDecodeNewlines,shouldKeepComment:options.comments,start:function start(tag,attrs,unary){ // check namespace.\n // inherit parent ns if there is one\n var ns=currentParent && currentParent.ns || platformGetTagNamespace(tag); // handle IE svg bug\n /* istanbul ignore if */if(isIE && ns === 'svg'){attrs = guardIESVGBug(attrs);}var element={type:1,tag:tag,attrsList:attrs,attrsMap:makeAttrsMap(attrs),parent:currentParent,children:[]};if(ns){element.ns = ns;}if(isForbiddenTag(element) && !isServerRendering()){element.forbidden = true;\"development\" !== 'production' && warn$2('Templates should only be responsible for mapping the state to the ' + 'UI. Avoid placing tags with side-effects in your templates, such as ' + \"<\" + tag + \">\" + ', as they will not be parsed.');} // apply pre-transforms\n for(var i=0;i < preTransforms.length;i++) {preTransforms[i](element,options);}if(!inVPre){processPre(element);if(element.pre){inVPre = true;}}if(platformIsPreTag(element.tag)){inPre = true;}if(inVPre){processRawAttrs(element);}else {processFor(element);processIf(element);processOnce(element);processKey(element); // determine whether this is a plain element after\n // removing structural attributes\n element.plain = !element.key && !attrs.length;processRef(element);processSlot(element);processComponent(element);for(var i$1=0;i$1 < transforms.length;i$1++) {transforms[i$1](element,options);}processAttrs(element);}function checkRootConstraints(el){{if(el.tag === 'slot' || el.tag === 'template'){warnOnce(\"Cannot use <\" + el.tag + \"> as component root element because it may \" + 'contain multiple nodes.');}if(el.attrsMap.hasOwnProperty('v-for')){warnOnce('Cannot use v-for on stateful component root element because ' + 'it renders multiple elements.');}}} // tree management\n if(!root){root = element;checkRootConstraints(root);}else if(!stack.length){ // allow root elements with v-if, v-else-if and v-else\n if(root['if'] && (element.elseif || element['else'])){checkRootConstraints(element);addIfCondition(root,{exp:element.elseif,block:element});}else {warnOnce(\"Component template should contain exactly one root element. \" + \"If you are using v-if on multiple elements, \" + \"use v-else-if to chain them instead.\");}}if(currentParent && !element.forbidden){if(element.elseif || element['else']){processIfConditions(element,currentParent);}else if(element.slotScope){ // scoped slot\n currentParent.plain = false;var name=element.slotTarget || '\"default\"';(currentParent.scopedSlots || (currentParent.scopedSlots = {}))[name] = element;}else {currentParent.children.push(element);element.parent = currentParent;}}if(!unary){currentParent = element;stack.push(element);}else {endPre(element);} // apply post-transforms\n for(var i$2=0;i$2 < postTransforms.length;i$2++) {postTransforms[i$2](element,options);}},end:function end(){ // remove trailing whitespace\n var element=stack[stack.length - 1];var lastNode=element.children[element.children.length - 1];if(lastNode && lastNode.type === 3 && lastNode.text === ' ' && !inPre){element.children.pop();} // pop stack\n stack.length -= 1;currentParent = stack[stack.length - 1];endPre(element);},chars:function chars(text){if(!currentParent){{if(text === template){warnOnce('Component template requires a root element, rather than just text.');}else if(text = text.trim()){warnOnce(\"text \\\"\" + text + \"\\\" outside root element will be ignored.\");}}return;} // IE textarea placeholder bug\n /* istanbul ignore if */if(isIE && currentParent.tag === 'textarea' && currentParent.attrsMap.placeholder === text){return;}var children=currentParent.children;text = inPre || text.trim()?isTextTag(currentParent)?text:decodeHTMLCached(text) // only preserve whitespace if its not right after a starting tag\n :preserveWhitespace && children.length?' ':'';if(text){var expression;if(!inVPre && text !== ' ' && (expression = parseText(text,delimiters))){children.push({type:2,expression:expression,text:text});}else if(text !== ' ' || !children.length || children[children.length - 1].text !== ' '){children.push({type:3,text:text});}}},comment:function comment(text){currentParent.children.push({type:3,text:text,isComment:true});}});return root;}", "title": "" }, { "docid": "32e5fa9e23c9e638c5de74f40ab732f3", "score": "0.5103891", "text": "expectTemplateBindingKey() {\n let result = '';\n let operatorFound = false;\n const start = this.currentAbsoluteOffset;\n do {\n result += this.expectIdentifierOrKeywordOrString();\n operatorFound = this.consumeOptionalOperator('-');\n if (operatorFound) {\n result += '-';\n }\n } while (operatorFound);\n return {\n source: result,\n span: new AbsoluteSourceSpan(start, start + result.length),\n };\n }", "title": "" }, { "docid": "fdeff43baa4ed98e0aa2f74a697759fa", "score": "0.5102997", "text": "function r_inline_string( parser, params ) {\n var ast = parser.ast( 'inline_string' );\n\n var skipper = parser.set_skipper( 'none' );\n\n var quote = parser.any_token( '\"', \"'\" );\n ast.value = r_string_content(\n parser,\n {\n no_expr: params && params.no_expr,\n no_esc: params && params.no_esc,\n delim: quote\n }\n );\n parser.token( quote );\n\n parser.set_skipper( skipper );\n\n return ast;\n}", "title": "" }, { "docid": "b9e4256b0444d383743214b7aa1243f2", "score": "0.5080347", "text": "function parseTemplate(state, template, analysis, left, right) {\r\n\t// Check if the template is valid.\r\n\tif (template && template.length) {\r\n\t\t// Initialize the current position.\r\n\t\tvar currentPosition = left;\r\n\t\t// Initialize the dispose boolean.\r\n\t\tvar disposed = false;\r\n\t\t// Iterate through each association.\r\n\t\tfor (var i = 0; i < analysis.associations.length; i += 1) {\r\n\t\t\t// Check if the association is contained within the boundaries.\r\n\t\t\tif (analysis.associations[i].beginning.index >= currentPosition && analysis.associations[i].beginning.index >= left && analysis.associations[i].ending.index + analysis.associations[i].ending[0].length <= right) {\r\n\t\t\t\t// Clone the attributes. This allows the writer to use possibly deleted attribute information on element endings.\r\n\t\t\t\tvar attributesSliced = analysis.associations[i].beginning.attributes.slice(0);\r\n\t\t\t\t// Parse the section into invocables and literals.\r\n\t\t\t\tparseSection(state, template.substr(currentPosition, analysis.associations[i].beginning.index - currentPosition), analysis, currentPosition);\r\n\t\t\t\t// Emit a beginning statement and check if the element is not be disposed of.\r\n\t\t\t\tif (!(disposed = emitter.begin(state, analysis.associations[i].beginning.attributes) && analysis.associations[i].beginning[1] === 'ins')) {\r\n\t\t\t\t\t// Check if the opening element has attributes.\r\n\t\t\t\t\tif (analysis.associations[i].beginning.attributes.length) {\r\n\t\t\t\t\t\t// Initialize the attributes.\r\n\t\t\t\t\t\tvar attributes = [];\r\n\t\t\t\t\t\t// Iterate through each attribute.\r\n\t\t\t\t\t\tfor (var j = 0; j < analysis.associations[i].beginning.attributes.length; j += 1) {\r\n\t\t\t\t\t\t\t// Check if the attribute is valid.\r\n\t\t\t\t\t\t\tif (analysis.associations[i].beginning.attributes[j]) {\r\n\t\t\t\t\t\t\t\t// Check if the attribute value is undefined.\r\n\t\t\t\t\t\t\t\tif (analysis.associations[i].beginning.attributes[j].value === undefined) {\r\n\t\t\t\t\t\t\t\t\t// Push the attribute.\r\n\t\t\t\t\t\t\t\t\tattributes.push(analysis.associations[i].beginning.attributes[j].key);\r\n\t\t\t\t\t\t\t\t\t// Continue.\r\n\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t// Combine the key and value for the attribute.\r\n\t\t\t\t\t\t\t\tattributes.push(analysis.associations[i].beginning.attributes[j].key + '=\"' + analysis.associations[i].beginning.attributes[j].value + '\"');\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// Process a literal for each variable and remaining text.\r\n\t\t\t\t\t\tparseLiteral(state, '<' + analysis.associations[i].beginning[1] + (attributes.length === 0 ? '' : ' ' + attributes.join(' ')) + '>', true);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Otherwise the opening element has no attributes.\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t// Process a literal for each variable and remaining text.\r\n\t\t\t\t\t\tparseLiteral(state, '<' + analysis.associations[i].beginning[1] + '>', true);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// Recursively parse the template into analysis.associations and sections.\r\n\t\t\t\tparseTemplate(state, template, analysis, analysis.associations[i].beginning.index + analysis.associations[i].beginning[0].length, analysis.associations[i].ending.index);\r\n\t\t\t\t// Emit an ending statement.\r\n\t\t\t\temitter.end(state, attributesSliced);\r\n\t\t\t\t// Move the current position to the position after the association.\r\n\t\t\t\tcurrentPosition = analysis.associations[i].ending.index + analysis.associations[i].ending[0].length;\r\n\t\t\t\t// Check if the element is not be disposed of and write the ending element.\r\n\t\t\t\tif (!disposed) {\r\n\t\t\t\t\t// Parse the literal into variables and text.\r\n\t\t\t\t\tparseLiteral(state, '</' + analysis.associations[i].beginning[1] + '>');\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Parse the section into invocables and literals.\r\n\t\tparseSection(state, template.substr(currentPosition, right - currentPosition), analysis, currentPosition);\r\n\t}\r\n\t// Return the state.\r\n\treturn state;\r\n}", "title": "" }, { "docid": "508c54cb2a7d9973b797971e2e51f3fc", "score": "0.5073517", "text": "async function parseTemplate(unparsed, options) {\n const OPEN = options.delimiters.open;\n const CLOSE = options.delimiters.close;\n const COMMENT = options.delimiters.comment;\n const ESCAPE = options.delimiters.escape;\n const UNESCAPE = options.delimiters.unescape;\n const IMPORT = options.delimiters.import;\n let parsed;\n let i = 0;\n let length = unparsed.length;\n parsed = \"with($locals||{}){$buffer.push(`\";\n for (; i < length; ++i) {\n let c = unparsed[i];\n if (unparsed.slice(i, i + OPEN.length) === OPEN) {\n i += OPEN.length;\n switch (unparsed[i]) {\n case COMMENT:// Comments -- output nothing\n tagContents(COMMENT + CLOSE);\n break;\n case ESCAPE:// Output escaped value\n ++i;\n parsed += \"`,$xml(\";\n parsed += tagContents();\n parsed += \"),`\";\n break;\n case UNESCAPE:// Output unescaped value\n ++i;\n parsed += \"`,(\";\n parsed += tagContents();\n parsed += \"),`\";\n break;\n case IMPORT:// Include another file\n ++i;\n parsed += \"`,`\";\n // Cache the previous values\n const importContents = tagContents().split(\"|\");\n const templateName = importContents[0].trim();\n const locals = importContents[1] && importContents[1].trim() || \"$locals\";\n // Read the next template using the new values\n const unparsedImport = await getTemplate(templateName, options);\n parsed += \"`);(function($buffer,$locals){\" + unparsedImport + \"})($buffer,\" + locals + \");$buffer.push(`\";\n break;\n default:\n parsed += \"`);\";\n parsed += tagContents();\n parsed += \";$buffer.push(`\";\n break;\n }\n }\n else if (c === \"\\\\\") {\n // Backslashes need to be escaped\n parsed += \"\\\\\\\\\";\n }\n else if (c === \"`\") {\n // Backticks need to be escaped as that the character that we are using to surround our string literals\n // We chose them as backtick string literals are containing raw newline characters\n parsed += \"\\\\`\";\n }\n else if (c === \"$\") {\n // Since backtick string literals in javascript support interpolation, we need to escape the dollar sign\n parsed += \"\\\\$\";\n }\n else {\n parsed += c;\n }\n }\n parsed += \"`);}\";\n return parsed;\n function tagContents(endTag = CLOSE) {\n let end = unparsed.indexOf(endTag, i);\n if (end < 0) {\n throw new Error(\"Could not find matching close tag '\" + endTag + \"'.\");\n }\n let result = unparsed.substring(i, end);\n // Move the cursor to the end of the tag\n i = end + endTag.length - 1;\n return result;\n }\n}", "title": "" }, { "docid": "bb5e8b6e5670393c00cf63309625ed73", "score": "0.50393444", "text": "parse(template) {\n // ejs does not have a method to tokenize template view properties\n // so this needs to be done manually here\n const templateTokenizer = '(<%%|<%=|<%-|<%_|<%#|<%)(.*?)(%%>|%>|-%>)';\n // escape any reserved regexp characters\n const delimiter = String(this.options.delimiter || '%').replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&');\n // use a custom or default delimiter\n let REGEX = new RegExp(\n templateTokenizer.replace(/%/g, delimiter)\n );\n let tokens = [];\n let templateToken = REGEX.exec(template);\n while (templateToken) {\n tokens.push(templateToken[2].trim());\n template = template.substr(templateToken.index + templateToken[0].length);\n templateToken = REGEX.exec(template);\n }\n return tokens;\n }", "title": "" }, { "docid": "0022200988c49e0127f96fc875ea95c9", "score": "0.50326204", "text": "function tmpl(s, p) {\n\n\t if (s.indexOf(brackets(0)) < 0) {\n\t // return raw text\n\t s = s.replace(/\\n|\\r\\n?/g, '\\n')\n\t return function () { return s }\n\t }\n\n\t // temporarily convert \\{ and \\} to a non-character\n\t s = s\n\t .replace(brackets(/\\\\{/g), '\\uFFF0')\n\t .replace(brackets(/\\\\}/g), '\\uFFF1')\n\n\t // split string to expression and non-expresion parts\n\t p = split(s, extract(s, brackets(/{/), brackets(/}/)))\n\n\t // is it a single expression or a template? i.e. {x} or <b>{x}</b>\n\t s = (p.length === 2 && !p[0]) ?\n\n\t // if expression, evaluate it\n\t expr(p[1]) :\n\n\t // if template, evaluate all expressions in it\n\t '[' + p.map(function(s, i) {\n\n\t // is it an expression or a string (every second part is an expression)\n\t return i % 2 ?\n\n\t // evaluate the expressions\n\t expr(s, true) :\n\n\t // process string parts of the template:\n\t '\"' + s\n\n\t // preserve new lines\n\t .replace(/\\n|\\r\\n?/g, '\\\\n')\n\n\t // escape quotes\n\t .replace(/\"/g, '\\\\\"') +\n\n\t '\"'\n\n\t }).join(',') + '].join(\"\")'\n\n\t return new Function('d', 'return ' + s\n\t // bring escaped { and } back\n\t .replace(/\\uFFF0/g, brackets(0))\n\t .replace(/\\uFFF1/g, brackets(1)) + ';')\n\n\t }", "title": "" }, { "docid": "157a50f7598997bfae81d4b62cc882f3", "score": "0.5028794", "text": "parse(value) {\r\n let raw = EXPRESSION.inlineField.parse(value);\r\n if (raw.status)\r\n return raw.value;\r\n else\r\n return value;\r\n }", "title": "" }, { "docid": "6b3a48cf5b9ac17cc0eda73596d19c70", "score": "0.5020601", "text": "parseTemplateBindings(templateKey) {\n const bindings = [];\n // The first binding is for the template key itself\n // In *ngFor=\"let item of items\", key = \"ngFor\", value = null\n // In *ngIf=\"cond | pipe\", key = \"ngIf\", value = \"cond | pipe\"\n bindings.push(...this.parseDirectiveKeywordBindings(templateKey));\n while (this.index < this.tokens.length) {\n // If it starts with 'let', then this must be variable declaration\n const letBinding = this.parseLetBinding();\n if (letBinding) {\n bindings.push(letBinding);\n }\n else {\n // Two possible cases here, either `value \"as\" key` or\n // \"directive-keyword expression\". We don't know which case, but both\n // \"value\" and \"directive-keyword\" are template binding key, so consume\n // the key first.\n const key = this.expectTemplateBindingKey();\n // Peek at the next token, if it is \"as\" then this must be variable\n // declaration.\n const binding = this.parseAsBinding(key);\n if (binding) {\n bindings.push(binding);\n }\n else {\n // Otherwise the key must be a directive keyword, like \"of\". Transform\n // the key to actual key. Eg. of -> ngForOf, trackBy -> ngForTrackBy\n key.source =\n templateKey.source + key.source.charAt(0).toUpperCase() + key.source.substring(1);\n bindings.push(...this.parseDirectiveKeywordBindings(key));\n }\n }\n this.consumeStatementTerminator();\n }\n return new TemplateBindingParseResult(bindings, [] /* warnings */, this.errors);\n }", "title": "" }, { "docid": "7d800579e9a393e06186a1924128214b", "score": "0.50065655", "text": "function inspectDynamicDataRef(expression)\n{\n var retArray = new Array();\n if(expression.length) {\n\n // Quickly reject if the expression doesn't contain \"<%=\"\n var exprIndex = expression.indexOf(\"<%=\");\n if (exprIndex != -1)\n {\n // No need to search the string prior to the \"<%=\"\n expression = expression.substr(exprIndex);\n\n var TranslatorDOM = dreamweaver.getDocumentDOM(dreamweaver.getConfigurationPath() + \"/Translators/ASP.htm\");\n if (TranslatorDOM) {\n TranslatedStr = TranslatorDOM.parentWindow.miniTranslateMarkup(\"\", \"\", expression, false);\n if (TranslatedStr.length)\n {\n var found = TranslatedStr.search(/mm_dynamic_content\\s+source=(\\w+)\\s+binding=\"([^\"]*)\"/i)\n if (found != -1)\n {\n retArray[0] = RegExp.$1\n retArray[1] = RegExp.$2\n //alert(\"source=\" + retArray[0] + \" binding=\" + retArray[1])\n }\n }\n }\n }\n }\n \n return retArray;\n}", "title": "" }, { "docid": "33b3484aeb6aeb89623fb078b238fd23", "score": "0.5002319", "text": "visitTagPlaceholder(ph, context) {\n const tag = `${ph.tag}`;\n const attrs = Object.keys(ph.attrs).map(name => `${name}=\"${ph.attrs[name]}\"`).join(' ');\n if (ph.isVoid) {\n return `<${tag} ${attrs}/>`;\n }\n const children = ph.children.map((c) => c.visit(this)).join('');\n return `<${tag} ${attrs}>${children}</${tag}>`;\n }", "title": "" }, { "docid": "33b3484aeb6aeb89623fb078b238fd23", "score": "0.5002319", "text": "visitTagPlaceholder(ph, context) {\n const tag = `${ph.tag}`;\n const attrs = Object.keys(ph.attrs).map(name => `${name}=\"${ph.attrs[name]}\"`).join(' ');\n if (ph.isVoid) {\n return `<${tag} ${attrs}/>`;\n }\n const children = ph.children.map((c) => c.visit(this)).join('');\n return `<${tag} ${attrs}>${children}</${tag}>`;\n }", "title": "" }, { "docid": "388ccb4d47c263b6ac5d62570023d2a4", "score": "0.49928567", "text": "function replace_placeholders(template, selected_subexpression)\n {\n var node;\n node = template.firstChild;\n while (node)\n\t{\n\t if (node.nodeType == 1)\n\t {\n\t if (node.localName == \"OMV\" && node.getAttribute(\"name\").match(/\\uEEEE[a-z]*/))\n\t\t{\n\t\t if (selected_subexpression) node = template.replaceChild(selected_subexpression.cloneNode(true), node);\n\t\t else node.setAttribute(\"name\", node.getAttribute(\"name\").replace(/\\uEEEE/g, \"\"));\n\t\t}\n\t else replace_placeholders(node, selected_subexpression);\n\t }\n\t node = node.nextSibling;\n\t}\n }", "title": "" }, { "docid": "1d5c5271b085a392db682d89ac4a3819", "score": "0.49899846", "text": "interpolate(value, parsed) {\n const tokens = value.split('$');\n let newValue = '';\n let skipNextToken = true;\n tokens.forEach((token) => {\n /**\n * If the value is an escaped sequence, then we replace it\n * with a `$` and then skip the next token.\n */\n if (token === '\\\\') {\n newValue += '$';\n skipNextToken = true;\n return;\n }\n /**\n * Use the value as it is when \"skipNextToken\" is set to true.\n */\n if (skipNextToken) {\n /**\n * Replace the ending escape sequence with a $\n */\n newValue += token.replace(/\\\\$/, '$');\n }\n else {\n /**\n * Handle mustache block\n */\n if (token.startsWith('{')) {\n newValue += this.interpolateMustache(token, parsed);\n return;\n }\n /**\n * Process all words as variable\n */\n newValue += this.interpolateVariable(token, parsed);\n }\n /**\n * Process next token\n */\n skipNextToken = false;\n });\n return newValue;\n }", "title": "" }, { "docid": "951eb687ee3c3f161718395c68fa534b", "score": "0.49645782", "text": "function decodeDynamicExpression(expression)\n{\n var retVal = \"\";\n\n expression = dwscripts.trim(expression.toString());\n var unquoted = dwscripts.trimQuotes(expression);\n\n if (dwscripts.isQuoted(expression))\n {\n retVal = dwscripts.unescQuotes(unquoted);\n }\n else\n {\n retVal = \"<%= \" + expression + \" %>\";\n }\n\n return retVal;\n}", "title": "" }, { "docid": "5d16fce62063e450e94efa8d51511b83", "score": "0.49234155", "text": "function parseTemplateElement(option) {\n var node, token;\n\n if (lookahead.type !== Token.Template || (option.head && !lookahead.head)) {\n throwUnexpectedToken();\n }\n\n node = new Node();\n token = lex();\n\n return node.finishTemplateElement({ raw: token.value.raw, cooked: token.value.cooked }, token.tail);\n }", "title": "" }, { "docid": "5d16fce62063e450e94efa8d51511b83", "score": "0.49234155", "text": "function parseTemplateElement(option) {\n var node, token;\n\n if (lookahead.type !== Token.Template || (option.head && !lookahead.head)) {\n throwUnexpectedToken();\n }\n\n node = new Node();\n token = lex();\n\n return node.finishTemplateElement({ raw: token.value.raw, cooked: token.value.cooked }, token.tail);\n }", "title": "" }, { "docid": "5d16fce62063e450e94efa8d51511b83", "score": "0.49234155", "text": "function parseTemplateElement(option) {\n var node, token;\n\n if (lookahead.type !== Token.Template || (option.head && !lookahead.head)) {\n throwUnexpectedToken();\n }\n\n node = new Node();\n token = lex();\n\n return node.finishTemplateElement({ raw: token.value.raw, cooked: token.value.cooked }, token.tail);\n }", "title": "" }, { "docid": "5d16fce62063e450e94efa8d51511b83", "score": "0.49234155", "text": "function parseTemplateElement(option) {\n var node, token;\n\n if (lookahead.type !== Token.Template || (option.head && !lookahead.head)) {\n throwUnexpectedToken();\n }\n\n node = new Node();\n token = lex();\n\n return node.finishTemplateElement({ raw: token.value.raw, cooked: token.value.cooked }, token.tail);\n }", "title": "" }, { "docid": "5d16fce62063e450e94efa8d51511b83", "score": "0.49234155", "text": "function parseTemplateElement(option) {\n var node, token;\n\n if (lookahead.type !== Token.Template || (option.head && !lookahead.head)) {\n throwUnexpectedToken();\n }\n\n node = new Node();\n token = lex();\n\n return node.finishTemplateElement({ raw: token.value.raw, cooked: token.value.cooked }, token.tail);\n }", "title": "" }, { "docid": "5d16fce62063e450e94efa8d51511b83", "score": "0.49234155", "text": "function parseTemplateElement(option) {\n var node, token;\n\n if (lookahead.type !== Token.Template || (option.head && !lookahead.head)) {\n throwUnexpectedToken();\n }\n\n node = new Node();\n token = lex();\n\n return node.finishTemplateElement({ raw: token.value.raw, cooked: token.value.cooked }, token.tail);\n }", "title": "" }, { "docid": "5d16fce62063e450e94efa8d51511b83", "score": "0.49234155", "text": "function parseTemplateElement(option) {\n var node, token;\n\n if (lookahead.type !== Token.Template || (option.head && !lookahead.head)) {\n throwUnexpectedToken();\n }\n\n node = new Node();\n token = lex();\n\n return node.finishTemplateElement({ raw: token.value.raw, cooked: token.value.cooked }, token.tail);\n }", "title": "" }, { "docid": "2ec3e10c23629bc43f384f768a2e233c", "score": "0.4919529", "text": "parseAsBinding(value) {\n if (!this.peekKeywordAs()) {\n return null;\n }\n this.advance(); // consume the 'as' keyword\n const key = this.expectTemplateBindingKey();\n this.consumeStatementTerminator();\n const sourceSpan = new AbsoluteSourceSpan(value.span.start, this.currentAbsoluteOffset);\n return new VariableBinding(sourceSpan, key, value);\n }", "title": "" }, { "docid": "08de6746046a6857813de4aafa2703bc", "score": "0.49063557", "text": "function TemplateElement(node) {\n this._push(node.value.raw);\n}", "title": "" }, { "docid": "2cd541f22ace4c2dc864922de5f1c862", "score": "0.48963407", "text": "function mustache(temp, replace) {\n var matches = temp.match(/{+(.*?)}+/g);\n for (let m in matches) {\n var re = new RegExp(matches[m], \"g\");\n var key = matches[m].replace(/{{/, '').replace(/}}/, '');\n var str = typeof (replace[key]) != 'undefined' ? replace[key] : '';\n temp = temp.replace(re, str);\n }\n var listHtml = new DOMParser().parseFromString(temp, 'text/html');\n var node = listHtml.getElementsByTagName('body')[0].children[0];\n return node;\n }", "title": "" }, { "docid": "9cfde6b3f9ee34d012ace8ac845bf3d4", "score": "0.4889239", "text": "function createTemplateValue(start, end) {\n var value = \"\";\n while (start <= end) {\n if (tokens[start].value) {\n value += tokens[start].value;\n } else if (tokens[start].type !== tt.template) {\n value += tokens[start].type.label;\n }\n start++;\n }\n return value;\n }", "title": "" }, { "docid": "4e115a97f7c7e14536078e6936020593", "score": "0.4886537", "text": "function scanTemplate() {\n var cooked = '', ch, start, rawOffset, terminated, head, tail, restore, unescaped;\n\n terminated = false;\n tail = false;\n start = index;\n head = (source[index] === '`');\n rawOffset = 2;\n\n ++index;\n\n while (index < length) {\n ch = source[index++];\n if (ch === '`') {\n rawOffset = 1;\n tail = true;\n terminated = true;\n break;\n } else if (ch === '$') {\n if (source[index] === '{') {\n state.curlyStack.push('${');\n ++index;\n terminated = true;\n break;\n }\n cooked += ch;\n } else if (ch === '\\\\') {\n ch = source[index++];\n if (!isLineTerminator(ch.charCodeAt(0))) {\n switch (ch) {\n case 'n':\n cooked += '\\n';\n break;\n case 'r':\n cooked += '\\r';\n break;\n case 't':\n cooked += '\\t';\n break;\n case 'u':\n case 'x':\n if (source[index] === '{') {\n ++index;\n cooked += scanUnicodeCodePointEscape();\n } else {\n restore = index;\n unescaped = scanHexEscape(ch);\n if (unescaped) {\n cooked += unescaped;\n } else {\n index = restore;\n cooked += ch;\n }\n }\n break;\n case 'b':\n cooked += '\\b';\n break;\n case 'f':\n cooked += '\\f';\n break;\n case 'v':\n cooked += '\\v';\n break;\n\n default:\n if (ch === '0') {\n if (isDecimalDigit(source.charCodeAt(index))) {\n // Illegal: \\01 \\02 and so on\n throwError(Messages.TemplateOctalLiteral);\n }\n cooked += '\\0';\n } else if (isOctalDigit(ch)) {\n // Illegal: \\1 \\2\n throwError(Messages.TemplateOctalLiteral);\n } else {\n cooked += ch;\n }\n break;\n }\n } else {\n ++lineNumber;\n if (ch === '\\r' && source[index] === '\\n') {\n ++index;\n }\n lineStart = index;\n }\n } else if (isLineTerminator(ch.charCodeAt(0))) {\n ++lineNumber;\n if (ch === '\\r' && source[index] === '\\n') {\n ++index;\n }\n lineStart = index;\n cooked += '\\n';\n } else {\n cooked += ch;\n }\n }\n\n if (!terminated) {\n throwUnexpectedToken();\n }\n\n if (!head) {\n state.curlyStack.pop();\n }\n\n return {\n type: Token.Template,\n value: {\n cooked: cooked,\n raw: source.slice(start + 1, index - rawOffset)\n },\n head: head,\n tail: tail,\n lineNumber: lineNumber,\n lineStart: lineStart,\n start: start,\n end: index\n };\n }", "title": "" }, { "docid": "4e115a97f7c7e14536078e6936020593", "score": "0.4886537", "text": "function scanTemplate() {\n var cooked = '', ch, start, rawOffset, terminated, head, tail, restore, unescaped;\n\n terminated = false;\n tail = false;\n start = index;\n head = (source[index] === '`');\n rawOffset = 2;\n\n ++index;\n\n while (index < length) {\n ch = source[index++];\n if (ch === '`') {\n rawOffset = 1;\n tail = true;\n terminated = true;\n break;\n } else if (ch === '$') {\n if (source[index] === '{') {\n state.curlyStack.push('${');\n ++index;\n terminated = true;\n break;\n }\n cooked += ch;\n } else if (ch === '\\\\') {\n ch = source[index++];\n if (!isLineTerminator(ch.charCodeAt(0))) {\n switch (ch) {\n case 'n':\n cooked += '\\n';\n break;\n case 'r':\n cooked += '\\r';\n break;\n case 't':\n cooked += '\\t';\n break;\n case 'u':\n case 'x':\n if (source[index] === '{') {\n ++index;\n cooked += scanUnicodeCodePointEscape();\n } else {\n restore = index;\n unescaped = scanHexEscape(ch);\n if (unescaped) {\n cooked += unescaped;\n } else {\n index = restore;\n cooked += ch;\n }\n }\n break;\n case 'b':\n cooked += '\\b';\n break;\n case 'f':\n cooked += '\\f';\n break;\n case 'v':\n cooked += '\\v';\n break;\n\n default:\n if (ch === '0') {\n if (isDecimalDigit(source.charCodeAt(index))) {\n // Illegal: \\01 \\02 and so on\n throwError(Messages.TemplateOctalLiteral);\n }\n cooked += '\\0';\n } else if (isOctalDigit(ch)) {\n // Illegal: \\1 \\2\n throwError(Messages.TemplateOctalLiteral);\n } else {\n cooked += ch;\n }\n break;\n }\n } else {\n ++lineNumber;\n if (ch === '\\r' && source[index] === '\\n') {\n ++index;\n }\n lineStart = index;\n }\n } else if (isLineTerminator(ch.charCodeAt(0))) {\n ++lineNumber;\n if (ch === '\\r' && source[index] === '\\n') {\n ++index;\n }\n lineStart = index;\n cooked += '\\n';\n } else {\n cooked += ch;\n }\n }\n\n if (!terminated) {\n throwUnexpectedToken();\n }\n\n if (!head) {\n state.curlyStack.pop();\n }\n\n return {\n type: Token.Template,\n value: {\n cooked: cooked,\n raw: source.slice(start + 1, index - rawOffset)\n },\n head: head,\n tail: tail,\n lineNumber: lineNumber,\n lineStart: lineStart,\n start: start,\n end: index\n };\n }", "title": "" }, { "docid": "4e115a97f7c7e14536078e6936020593", "score": "0.4886537", "text": "function scanTemplate() {\n var cooked = '', ch, start, rawOffset, terminated, head, tail, restore, unescaped;\n\n terminated = false;\n tail = false;\n start = index;\n head = (source[index] === '`');\n rawOffset = 2;\n\n ++index;\n\n while (index < length) {\n ch = source[index++];\n if (ch === '`') {\n rawOffset = 1;\n tail = true;\n terminated = true;\n break;\n } else if (ch === '$') {\n if (source[index] === '{') {\n state.curlyStack.push('${');\n ++index;\n terminated = true;\n break;\n }\n cooked += ch;\n } else if (ch === '\\\\') {\n ch = source[index++];\n if (!isLineTerminator(ch.charCodeAt(0))) {\n switch (ch) {\n case 'n':\n cooked += '\\n';\n break;\n case 'r':\n cooked += '\\r';\n break;\n case 't':\n cooked += '\\t';\n break;\n case 'u':\n case 'x':\n if (source[index] === '{') {\n ++index;\n cooked += scanUnicodeCodePointEscape();\n } else {\n restore = index;\n unescaped = scanHexEscape(ch);\n if (unescaped) {\n cooked += unescaped;\n } else {\n index = restore;\n cooked += ch;\n }\n }\n break;\n case 'b':\n cooked += '\\b';\n break;\n case 'f':\n cooked += '\\f';\n break;\n case 'v':\n cooked += '\\v';\n break;\n\n default:\n if (ch === '0') {\n if (isDecimalDigit(source.charCodeAt(index))) {\n // Illegal: \\01 \\02 and so on\n throwError(Messages.TemplateOctalLiteral);\n }\n cooked += '\\0';\n } else if (isOctalDigit(ch)) {\n // Illegal: \\1 \\2\n throwError(Messages.TemplateOctalLiteral);\n } else {\n cooked += ch;\n }\n break;\n }\n } else {\n ++lineNumber;\n if (ch === '\\r' && source[index] === '\\n') {\n ++index;\n }\n lineStart = index;\n }\n } else if (isLineTerminator(ch.charCodeAt(0))) {\n ++lineNumber;\n if (ch === '\\r' && source[index] === '\\n') {\n ++index;\n }\n lineStart = index;\n cooked += '\\n';\n } else {\n cooked += ch;\n }\n }\n\n if (!terminated) {\n throwUnexpectedToken();\n }\n\n if (!head) {\n state.curlyStack.pop();\n }\n\n return {\n type: Token.Template,\n value: {\n cooked: cooked,\n raw: source.slice(start + 1, index - rawOffset)\n },\n head: head,\n tail: tail,\n lineNumber: lineNumber,\n lineStart: lineStart,\n start: start,\n end: index\n };\n }", "title": "" }, { "docid": "4e115a97f7c7e14536078e6936020593", "score": "0.4886537", "text": "function scanTemplate() {\n var cooked = '', ch, start, rawOffset, terminated, head, tail, restore, unescaped;\n\n terminated = false;\n tail = false;\n start = index;\n head = (source[index] === '`');\n rawOffset = 2;\n\n ++index;\n\n while (index < length) {\n ch = source[index++];\n if (ch === '`') {\n rawOffset = 1;\n tail = true;\n terminated = true;\n break;\n } else if (ch === '$') {\n if (source[index] === '{') {\n state.curlyStack.push('${');\n ++index;\n terminated = true;\n break;\n }\n cooked += ch;\n } else if (ch === '\\\\') {\n ch = source[index++];\n if (!isLineTerminator(ch.charCodeAt(0))) {\n switch (ch) {\n case 'n':\n cooked += '\\n';\n break;\n case 'r':\n cooked += '\\r';\n break;\n case 't':\n cooked += '\\t';\n break;\n case 'u':\n case 'x':\n if (source[index] === '{') {\n ++index;\n cooked += scanUnicodeCodePointEscape();\n } else {\n restore = index;\n unescaped = scanHexEscape(ch);\n if (unescaped) {\n cooked += unescaped;\n } else {\n index = restore;\n cooked += ch;\n }\n }\n break;\n case 'b':\n cooked += '\\b';\n break;\n case 'f':\n cooked += '\\f';\n break;\n case 'v':\n cooked += '\\v';\n break;\n\n default:\n if (ch === '0') {\n if (isDecimalDigit(source.charCodeAt(index))) {\n // Illegal: \\01 \\02 and so on\n throwError(Messages.TemplateOctalLiteral);\n }\n cooked += '\\0';\n } else if (isOctalDigit(ch)) {\n // Illegal: \\1 \\2\n throwError(Messages.TemplateOctalLiteral);\n } else {\n cooked += ch;\n }\n break;\n }\n } else {\n ++lineNumber;\n if (ch === '\\r' && source[index] === '\\n') {\n ++index;\n }\n lineStart = index;\n }\n } else if (isLineTerminator(ch.charCodeAt(0))) {\n ++lineNumber;\n if (ch === '\\r' && source[index] === '\\n') {\n ++index;\n }\n lineStart = index;\n cooked += '\\n';\n } else {\n cooked += ch;\n }\n }\n\n if (!terminated) {\n throwUnexpectedToken();\n }\n\n if (!head) {\n state.curlyStack.pop();\n }\n\n return {\n type: Token.Template,\n value: {\n cooked: cooked,\n raw: source.slice(start + 1, index - rawOffset)\n },\n head: head,\n tail: tail,\n lineNumber: lineNumber,\n lineStart: lineStart,\n start: start,\n end: index\n };\n }", "title": "" }, { "docid": "4e115a97f7c7e14536078e6936020593", "score": "0.4886537", "text": "function scanTemplate() {\n var cooked = '', ch, start, rawOffset, terminated, head, tail, restore, unescaped;\n\n terminated = false;\n tail = false;\n start = index;\n head = (source[index] === '`');\n rawOffset = 2;\n\n ++index;\n\n while (index < length) {\n ch = source[index++];\n if (ch === '`') {\n rawOffset = 1;\n tail = true;\n terminated = true;\n break;\n } else if (ch === '$') {\n if (source[index] === '{') {\n state.curlyStack.push('${');\n ++index;\n terminated = true;\n break;\n }\n cooked += ch;\n } else if (ch === '\\\\') {\n ch = source[index++];\n if (!isLineTerminator(ch.charCodeAt(0))) {\n switch (ch) {\n case 'n':\n cooked += '\\n';\n break;\n case 'r':\n cooked += '\\r';\n break;\n case 't':\n cooked += '\\t';\n break;\n case 'u':\n case 'x':\n if (source[index] === '{') {\n ++index;\n cooked += scanUnicodeCodePointEscape();\n } else {\n restore = index;\n unescaped = scanHexEscape(ch);\n if (unescaped) {\n cooked += unescaped;\n } else {\n index = restore;\n cooked += ch;\n }\n }\n break;\n case 'b':\n cooked += '\\b';\n break;\n case 'f':\n cooked += '\\f';\n break;\n case 'v':\n cooked += '\\v';\n break;\n\n default:\n if (ch === '0') {\n if (isDecimalDigit(source.charCodeAt(index))) {\n // Illegal: \\01 \\02 and so on\n throwError(Messages.TemplateOctalLiteral);\n }\n cooked += '\\0';\n } else if (isOctalDigit(ch)) {\n // Illegal: \\1 \\2\n throwError(Messages.TemplateOctalLiteral);\n } else {\n cooked += ch;\n }\n break;\n }\n } else {\n ++lineNumber;\n if (ch === '\\r' && source[index] === '\\n') {\n ++index;\n }\n lineStart = index;\n }\n } else if (isLineTerminator(ch.charCodeAt(0))) {\n ++lineNumber;\n if (ch === '\\r' && source[index] === '\\n') {\n ++index;\n }\n lineStart = index;\n cooked += '\\n';\n } else {\n cooked += ch;\n }\n }\n\n if (!terminated) {\n throwUnexpectedToken();\n }\n\n if (!head) {\n state.curlyStack.pop();\n }\n\n return {\n type: Token.Template,\n value: {\n cooked: cooked,\n raw: source.slice(start + 1, index - rawOffset)\n },\n head: head,\n tail: tail,\n lineNumber: lineNumber,\n lineStart: lineStart,\n start: start,\n end: index\n };\n }", "title": "" }, { "docid": "4e115a97f7c7e14536078e6936020593", "score": "0.4886537", "text": "function scanTemplate() {\n var cooked = '', ch, start, rawOffset, terminated, head, tail, restore, unescaped;\n\n terminated = false;\n tail = false;\n start = index;\n head = (source[index] === '`');\n rawOffset = 2;\n\n ++index;\n\n while (index < length) {\n ch = source[index++];\n if (ch === '`') {\n rawOffset = 1;\n tail = true;\n terminated = true;\n break;\n } else if (ch === '$') {\n if (source[index] === '{') {\n state.curlyStack.push('${');\n ++index;\n terminated = true;\n break;\n }\n cooked += ch;\n } else if (ch === '\\\\') {\n ch = source[index++];\n if (!isLineTerminator(ch.charCodeAt(0))) {\n switch (ch) {\n case 'n':\n cooked += '\\n';\n break;\n case 'r':\n cooked += '\\r';\n break;\n case 't':\n cooked += '\\t';\n break;\n case 'u':\n case 'x':\n if (source[index] === '{') {\n ++index;\n cooked += scanUnicodeCodePointEscape();\n } else {\n restore = index;\n unescaped = scanHexEscape(ch);\n if (unescaped) {\n cooked += unescaped;\n } else {\n index = restore;\n cooked += ch;\n }\n }\n break;\n case 'b':\n cooked += '\\b';\n break;\n case 'f':\n cooked += '\\f';\n break;\n case 'v':\n cooked += '\\v';\n break;\n\n default:\n if (ch === '0') {\n if (isDecimalDigit(source.charCodeAt(index))) {\n // Illegal: \\01 \\02 and so on\n throwError(Messages.TemplateOctalLiteral);\n }\n cooked += '\\0';\n } else if (isOctalDigit(ch)) {\n // Illegal: \\1 \\2\n throwError(Messages.TemplateOctalLiteral);\n } else {\n cooked += ch;\n }\n break;\n }\n } else {\n ++lineNumber;\n if (ch === '\\r' && source[index] === '\\n') {\n ++index;\n }\n lineStart = index;\n }\n } else if (isLineTerminator(ch.charCodeAt(0))) {\n ++lineNumber;\n if (ch === '\\r' && source[index] === '\\n') {\n ++index;\n }\n lineStart = index;\n cooked += '\\n';\n } else {\n cooked += ch;\n }\n }\n\n if (!terminated) {\n throwUnexpectedToken();\n }\n\n if (!head) {\n state.curlyStack.pop();\n }\n\n return {\n type: Token.Template,\n value: {\n cooked: cooked,\n raw: source.slice(start + 1, index - rawOffset)\n },\n head: head,\n tail: tail,\n lineNumber: lineNumber,\n lineStart: lineStart,\n start: start,\n end: index\n };\n }", "title": "" }, { "docid": "4e115a97f7c7e14536078e6936020593", "score": "0.4886537", "text": "function scanTemplate() {\n var cooked = '', ch, start, rawOffset, terminated, head, tail, restore, unescaped;\n\n terminated = false;\n tail = false;\n start = index;\n head = (source[index] === '`');\n rawOffset = 2;\n\n ++index;\n\n while (index < length) {\n ch = source[index++];\n if (ch === '`') {\n rawOffset = 1;\n tail = true;\n terminated = true;\n break;\n } else if (ch === '$') {\n if (source[index] === '{') {\n state.curlyStack.push('${');\n ++index;\n terminated = true;\n break;\n }\n cooked += ch;\n } else if (ch === '\\\\') {\n ch = source[index++];\n if (!isLineTerminator(ch.charCodeAt(0))) {\n switch (ch) {\n case 'n':\n cooked += '\\n';\n break;\n case 'r':\n cooked += '\\r';\n break;\n case 't':\n cooked += '\\t';\n break;\n case 'u':\n case 'x':\n if (source[index] === '{') {\n ++index;\n cooked += scanUnicodeCodePointEscape();\n } else {\n restore = index;\n unescaped = scanHexEscape(ch);\n if (unescaped) {\n cooked += unescaped;\n } else {\n index = restore;\n cooked += ch;\n }\n }\n break;\n case 'b':\n cooked += '\\b';\n break;\n case 'f':\n cooked += '\\f';\n break;\n case 'v':\n cooked += '\\v';\n break;\n\n default:\n if (ch === '0') {\n if (isDecimalDigit(source.charCodeAt(index))) {\n // Illegal: \\01 \\02 and so on\n throwError(Messages.TemplateOctalLiteral);\n }\n cooked += '\\0';\n } else if (isOctalDigit(ch)) {\n // Illegal: \\1 \\2\n throwError(Messages.TemplateOctalLiteral);\n } else {\n cooked += ch;\n }\n break;\n }\n } else {\n ++lineNumber;\n if (ch === '\\r' && source[index] === '\\n') {\n ++index;\n }\n lineStart = index;\n }\n } else if (isLineTerminator(ch.charCodeAt(0))) {\n ++lineNumber;\n if (ch === '\\r' && source[index] === '\\n') {\n ++index;\n }\n lineStart = index;\n cooked += '\\n';\n } else {\n cooked += ch;\n }\n }\n\n if (!terminated) {\n throwUnexpectedToken();\n }\n\n if (!head) {\n state.curlyStack.pop();\n }\n\n return {\n type: Token.Template,\n value: {\n cooked: cooked,\n raw: source.slice(start + 1, index - rawOffset)\n },\n head: head,\n tail: tail,\n lineNumber: lineNumber,\n lineStart: lineStart,\n start: start,\n end: index\n };\n }", "title": "" }, { "docid": "c131bb390122cb58f59e02a40133aff5", "score": "0.48831394", "text": "function evalTemplate(template, values) {\n\tlet res = template;\n\tfor (k in values) {\n\t\tres = res.replace(\"{{\" + k + \"}}\", values[k].toString());\n\t}\n\treturn res;\n}", "title": "" }, { "docid": "70e59476a761c9bd06744349ab34fb14", "score": "0.48830283", "text": "function parseTpl(tpl, values, bl){\n\n // Loop each value\n for (var key in values) {\n var theKey = \"{\" + key + \"}\";\n var re = new RegExp(theKey, \"g\");\n tpl = tpl.replace(re, values[key]);\n }\n\n // Should I add html breakLines?\n if(bl === true){\n tpl = textAddBreakLines(tpl);\n }\n\n return tpl;\n\n}", "title": "" }, { "docid": "b4eaade4ec4166869cdb1af29d89efe2", "score": "0.4866678", "text": "function r_template( parser, full_name ) {\n var ast = parser.ast( 'template' );\n\n /// var name = ast.name = r_template_name( parser );\n r_template_name( parser );\n name = ast.name = full_name;\n\n if ( parser.is_token( '->' ) ) {\n parser.move_skip( 2 );\n\n ast.context = r_inline_expr( parser );\n\n } else {\n if ( !parser.is_eol() ) {\n ast.params = r_inline_params( parser );\n }\n\n if ( parser.is_token( '->' ) ) {\n parser.move_skip( 2 );\n\n ast.context = r_inline_expr( parser );\n }\n }\n\n parser.templates_calls.push( name );\n ast.content = r_block( parser, { parse_params: true } );\n parser.templates_calls.pop();\n\n return ast;\n}", "title": "" }, { "docid": "6e90f12e0d62d411ec8b05a42cee6020", "score": "0.48585838", "text": "function javascript(hljs) {\n /**\n * Takes a string like \"<Booger\" and checks to see\n * if we can find a matching \"</Booger\" later in the\n * content.\n * @param {RegExpMatchArray} match\n * @param {{after:number}} param1\n */\n const hasClosingTag = (match, {\n after\n }) => {\n const tag = \"</\" + match[0].slice(1);\n const pos = match.input.indexOf(tag, after);\n return pos !== -1;\n };\n\n const IDENT_RE$1 = IDENT_RE;\n const FRAGMENT = {\n begin: '<>',\n end: '</>'\n };\n const XML_TAG = {\n begin: /<[A-Za-z0-9\\\\._:-]+/,\n end: /\\/[A-Za-z0-9\\\\._:-]+>|\\/>/,\n\n /**\n * @param {RegExpMatchArray} match\n * @param {CallbackResponse} response\n */\n isTrulyOpeningTag: (match, response) => {\n const afterMatchIndex = match[0].length + match.index;\n const nextChar = match.input[afterMatchIndex]; // nested type?\n // HTML should not include another raw `<` inside a tag\n // But a type might: `<Array<Array<number>>`, etc.\n\n if (nextChar === \"<\") {\n response.ignoreMatch();\n return;\n } // <something>\n // This is now either a tag or a type.\n\n\n if (nextChar === \">\") {\n // if we cannot find a matching closing tag, then we\n // will ignore it\n if (!hasClosingTag(match, {\n after: afterMatchIndex\n })) {\n response.ignoreMatch();\n }\n }\n }\n };\n const KEYWORDS$1 = {\n $pattern: IDENT_RE,\n keyword: KEYWORDS,\n literal: LITERALS,\n built_in: BUILT_INS\n }; // https://tc39.es/ecma262/#sec-literals-numeric-literals\n\n const decimalDigits = '[0-9](_?[0-9])*';\n const frac = `\\\\.(${decimalDigits})`; // DecimalIntegerLiteral, including Annex B NonOctalDecimalIntegerLiteral\n // https://tc39.es/ecma262/#sec-additional-syntax-numeric-literals\n\n const decimalInteger = `0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`;\n const NUMBER = {\n className: 'number',\n variants: [// DecimalLiteral\n {\n begin: `(\\\\b(${decimalInteger})((${frac})|\\\\.)?|(${frac}))` + `[eE][+-]?(${decimalDigits})\\\\b`\n }, {\n begin: `\\\\b(${decimalInteger})\\\\b((${frac})\\\\b|\\\\.)?|(${frac})\\\\b`\n }, // DecimalBigIntegerLiteral\n {\n begin: `\\\\b(0|[1-9](_?[0-9])*)n\\\\b`\n }, // NonDecimalIntegerLiteral\n {\n begin: \"\\\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\\\b\"\n }, {\n begin: \"\\\\b0[bB][0-1](_?[0-1])*n?\\\\b\"\n }, {\n begin: \"\\\\b0[oO][0-7](_?[0-7])*n?\\\\b\"\n }, // LegacyOctalIntegerLiteral (does not include underscore separators)\n // https://tc39.es/ecma262/#sec-additional-syntax-numeric-literals\n {\n begin: \"\\\\b0[0-7]+n?\\\\b\"\n }],\n relevance: 0\n };\n const SUBST = {\n className: 'subst',\n begin: '\\\\$\\\\{',\n end: '\\\\}',\n keywords: KEYWORDS$1,\n contains: [] // defined later\n\n };\n const HTML_TEMPLATE = {\n begin: 'html`',\n end: '',\n starts: {\n end: '`',\n returnEnd: false,\n contains: [hljs.BACKSLASH_ESCAPE, SUBST],\n subLanguage: 'xml'\n }\n };\n const CSS_TEMPLATE = {\n begin: 'css`',\n end: '',\n starts: {\n end: '`',\n returnEnd: false,\n contains: [hljs.BACKSLASH_ESCAPE, SUBST],\n subLanguage: 'css'\n }\n };\n const TEMPLATE_STRING = {\n className: 'string',\n begin: '`',\n end: '`',\n contains: [hljs.BACKSLASH_ESCAPE, SUBST]\n };\n const JSDOC_COMMENT = hljs.COMMENT(/\\/\\*\\*(?!\\/)/, '\\\\*/', {\n relevance: 0,\n contains: [{\n className: 'doctag',\n begin: '@[A-Za-z]+',\n contains: [{\n className: 'type',\n begin: '\\\\{',\n end: '\\\\}',\n relevance: 0\n }, {\n className: 'variable',\n begin: IDENT_RE$1 + '(?=\\\\s*(-)|$)',\n endsParent: true,\n relevance: 0\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 const COMMENT = {\n className: \"comment\",\n variants: [JSDOC_COMMENT, hljs.C_BLOCK_COMMENT_MODE, hljs.C_LINE_COMMENT_MODE]\n };\n const SUBST_INTERNALS = [hljs.APOS_STRING_MODE, hljs.QUOTE_STRING_MODE, HTML_TEMPLATE, CSS_TEMPLATE, TEMPLATE_STRING, NUMBER, hljs.REGEXP_MODE];\n SUBST.contains = SUBST_INTERNALS.concat({\n // we need to pair up {} inside our subst to prevent\n // it from ending too early by matching another }\n begin: /\\{/,\n end: /\\}/,\n keywords: KEYWORDS$1,\n contains: [\"self\"].concat(SUBST_INTERNALS)\n });\n const SUBST_AND_COMMENTS = [].concat(COMMENT, SUBST.contains);\n const PARAMS_CONTAINS = SUBST_AND_COMMENTS.concat([// eat recursive parens in sub expressions\n {\n begin: /\\(/,\n end: /\\)/,\n keywords: KEYWORDS$1,\n contains: [\"self\"].concat(SUBST_AND_COMMENTS)\n }]);\n const PARAMS = {\n className: 'params',\n begin: /\\(/,\n end: /\\)/,\n excludeBegin: true,\n excludeEnd: true,\n keywords: KEYWORDS$1,\n contains: PARAMS_CONTAINS\n };\n return {\n name: 'Javascript',\n aliases: ['js', 'jsx', 'mjs', 'cjs'],\n keywords: KEYWORDS$1,\n // this will be extended by TypeScript\n exports: {\n PARAMS_CONTAINS\n },\n illegal: /#(?![$_A-z])/,\n contains: [hljs.SHEBANG({\n label: \"shebang\",\n binary: \"node\",\n relevance: 5\n }), {\n label: \"use_strict\",\n className: 'meta',\n relevance: 10,\n begin: /^\\s*['\"]use (strict|asm)['\"]/\n }, hljs.APOS_STRING_MODE, hljs.QUOTE_STRING_MODE, HTML_TEMPLATE, CSS_TEMPLATE, TEMPLATE_STRING, COMMENT, NUMBER, {\n // object attr container\n begin: concat(/[{,\\n]\\s*/, // we need to look ahead to make sure that we actually have an\n // attribute coming up so we don't steal a comma from a potential\n // \"value\" container\n //\n // NOTE: this might not work how you think. We don't actually always\n // enter this mode and stay. Instead it might merely match `,\n // <comments up next>` and then immediately end after the , because it\n // fails to find any actual attrs. But this still does the job because\n // it prevents the value contain rule from grabbing this instead and\n // prevening this rule from firing when we actually DO have keys.\n lookahead(concat( // we also need to allow for multiple possible comments inbetween\n // the first key:value pairing\n /(((\\/\\/.*$)|(\\/\\*(\\*[^/]|[^*])*\\*\\/))\\s*)*/, IDENT_RE$1 + '\\\\s*:'))),\n relevance: 0,\n contains: [{\n className: 'attr',\n begin: IDENT_RE$1 + lookahead('\\\\s*:'),\n relevance: 0\n }]\n }, {\n // \"value\" container\n begin: '(' + hljs.RE_STARTERS_RE + '|\\\\b(case|return|throw)\\\\b)\\\\s*',\n keywords: 'return throw case',\n contains: [COMMENT, hljs.REGEXP_MODE, {\n className: 'function',\n // we have to count the parens to make sure we actually have the\n // correct bounding ( ) before the =>. There could be any number of\n // sub-expressions inside also surrounded by parens.\n begin: '(\\\\(' + '[^()]*(\\\\(' + '[^()]*(\\\\(' + '[^()]*' + '\\\\)[^()]*)*' + '\\\\)[^()]*)*' + '\\\\)|' + hljs.UNDERSCORE_IDENT_RE + ')\\\\s*=>',\n returnBegin: true,\n end: '\\\\s*=>',\n contains: [{\n className: 'params',\n variants: [{\n begin: hljs.UNDERSCORE_IDENT_RE,\n relevance: 0\n }, {\n className: null,\n begin: /\\(\\s*\\)/,\n skip: true\n }, {\n begin: /\\(/,\n end: /\\)/,\n excludeBegin: true,\n excludeEnd: true,\n keywords: KEYWORDS$1,\n contains: PARAMS_CONTAINS\n }]\n }]\n }, {\n // could be a comma delimited list of params to a function call\n begin: /,/,\n relevance: 0\n }, {\n className: '',\n begin: /\\s/,\n end: /\\s*/,\n skip: true\n }, {\n // JSX\n variants: [{\n begin: FRAGMENT.begin,\n end: FRAGMENT.end\n }, {\n begin: XML_TAG.begin,\n // we carefully check the opening tag to see if it truly\n // is a tag and not a false positive\n 'on:begin': XML_TAG.isTrulyOpeningTag,\n end: XML_TAG.end\n }],\n subLanguage: 'xml',\n contains: [{\n begin: XML_TAG.begin,\n end: XML_TAG.end,\n skip: true,\n contains: ['self']\n }]\n }],\n relevance: 0\n }, {\n className: 'function',\n beginKeywords: 'function',\n end: /[{;]/,\n excludeEnd: true,\n keywords: KEYWORDS$1,\n contains: ['self', hljs.inherit(hljs.TITLE_MODE, {\n begin: IDENT_RE$1\n }), PARAMS],\n illegal: /%/\n }, {\n // prevent this from getting swallowed up by function\n // since they appear \"function like\"\n beginKeywords: \"while if switch catch for\"\n }, {\n className: 'function',\n // we have to count the parens to make sure we actually have the correct\n // bounding ( ). There could be any number of sub-expressions inside\n // also surrounded by parens.\n begin: hljs.UNDERSCORE_IDENT_RE + '\\\\(' + // first parens\n '[^()]*(\\\\(' + '[^()]*(\\\\(' + '[^()]*' + '\\\\)[^()]*)*' + '\\\\)[^()]*)*' + '\\\\)\\\\s*\\\\{',\n // end parens\n returnBegin: true,\n contains: [PARAMS, hljs.inherit(hljs.TITLE_MODE, {\n begin: IDENT_RE$1\n })]\n }, // hack: prevents detection of keywords in some circumstances\n // .keyword()\n // $keyword = x\n {\n variants: [{\n begin: '\\\\.' + IDENT_RE$1\n }, {\n begin: '\\\\$' + IDENT_RE$1\n }],\n relevance: 0\n }, {\n // ES6 class\n className: 'class',\n beginKeywords: 'class',\n end: /[{;=]/,\n excludeEnd: true,\n illegal: /[:\"[\\]]/,\n contains: [{\n beginKeywords: 'extends'\n }, hljs.UNDERSCORE_TITLE_MODE]\n }, {\n begin: /\\b(?=constructor)/,\n end: /[{;]/,\n excludeEnd: true,\n contains: [hljs.inherit(hljs.TITLE_MODE, {\n begin: IDENT_RE$1\n }), 'self', PARAMS]\n }, {\n begin: '(get|set)\\\\s+(?=' + IDENT_RE$1 + '\\\\()',\n end: /\\{/,\n keywords: \"get set\",\n contains: [hljs.inherit(hljs.TITLE_MODE, {\n begin: IDENT_RE$1\n }), {\n begin: /\\(\\)/\n }, // eat to avoid empty params\n PARAMS]\n }, {\n begin: /\\$[(.]/ // relevance booster for a pattern common to JS libs: `$(something)` and `$.something`\n\n }]\n };\n}", "title": "" }, { "docid": "6e90f12e0d62d411ec8b05a42cee6020", "score": "0.48585838", "text": "function javascript(hljs) {\n /**\n * Takes a string like \"<Booger\" and checks to see\n * if we can find a matching \"</Booger\" later in the\n * content.\n * @param {RegExpMatchArray} match\n * @param {{after:number}} param1\n */\n const hasClosingTag = (match, {\n after\n }) => {\n const tag = \"</\" + match[0].slice(1);\n const pos = match.input.indexOf(tag, after);\n return pos !== -1;\n };\n\n const IDENT_RE$1 = IDENT_RE;\n const FRAGMENT = {\n begin: '<>',\n end: '</>'\n };\n const XML_TAG = {\n begin: /<[A-Za-z0-9\\\\._:-]+/,\n end: /\\/[A-Za-z0-9\\\\._:-]+>|\\/>/,\n\n /**\n * @param {RegExpMatchArray} match\n * @param {CallbackResponse} response\n */\n isTrulyOpeningTag: (match, response) => {\n const afterMatchIndex = match[0].length + match.index;\n const nextChar = match.input[afterMatchIndex]; // nested type?\n // HTML should not include another raw `<` inside a tag\n // But a type might: `<Array<Array<number>>`, etc.\n\n if (nextChar === \"<\") {\n response.ignoreMatch();\n return;\n } // <something>\n // This is now either a tag or a type.\n\n\n if (nextChar === \">\") {\n // if we cannot find a matching closing tag, then we\n // will ignore it\n if (!hasClosingTag(match, {\n after: afterMatchIndex\n })) {\n response.ignoreMatch();\n }\n }\n }\n };\n const KEYWORDS$1 = {\n $pattern: IDENT_RE,\n keyword: KEYWORDS,\n literal: LITERALS,\n built_in: BUILT_INS\n }; // https://tc39.es/ecma262/#sec-literals-numeric-literals\n\n const decimalDigits = '[0-9](_?[0-9])*';\n const frac = `\\\\.(${decimalDigits})`; // DecimalIntegerLiteral, including Annex B NonOctalDecimalIntegerLiteral\n // https://tc39.es/ecma262/#sec-additional-syntax-numeric-literals\n\n const decimalInteger = `0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`;\n const NUMBER = {\n className: 'number',\n variants: [// DecimalLiteral\n {\n begin: `(\\\\b(${decimalInteger})((${frac})|\\\\.)?|(${frac}))` + `[eE][+-]?(${decimalDigits})\\\\b`\n }, {\n begin: `\\\\b(${decimalInteger})\\\\b((${frac})\\\\b|\\\\.)?|(${frac})\\\\b`\n }, // DecimalBigIntegerLiteral\n {\n begin: `\\\\b(0|[1-9](_?[0-9])*)n\\\\b`\n }, // NonDecimalIntegerLiteral\n {\n begin: \"\\\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\\\b\"\n }, {\n begin: \"\\\\b0[bB][0-1](_?[0-1])*n?\\\\b\"\n }, {\n begin: \"\\\\b0[oO][0-7](_?[0-7])*n?\\\\b\"\n }, // LegacyOctalIntegerLiteral (does not include underscore separators)\n // https://tc39.es/ecma262/#sec-additional-syntax-numeric-literals\n {\n begin: \"\\\\b0[0-7]+n?\\\\b\"\n }],\n relevance: 0\n };\n const SUBST = {\n className: 'subst',\n begin: '\\\\$\\\\{',\n end: '\\\\}',\n keywords: KEYWORDS$1,\n contains: [] // defined later\n\n };\n const HTML_TEMPLATE = {\n begin: 'html`',\n end: '',\n starts: {\n end: '`',\n returnEnd: false,\n contains: [hljs.BACKSLASH_ESCAPE, SUBST],\n subLanguage: 'xml'\n }\n };\n const CSS_TEMPLATE = {\n begin: 'css`',\n end: '',\n starts: {\n end: '`',\n returnEnd: false,\n contains: [hljs.BACKSLASH_ESCAPE, SUBST],\n subLanguage: 'css'\n }\n };\n const TEMPLATE_STRING = {\n className: 'string',\n begin: '`',\n end: '`',\n contains: [hljs.BACKSLASH_ESCAPE, SUBST]\n };\n const JSDOC_COMMENT = hljs.COMMENT(/\\/\\*\\*(?!\\/)/, '\\\\*/', {\n relevance: 0,\n contains: [{\n className: 'doctag',\n begin: '@[A-Za-z]+',\n contains: [{\n className: 'type',\n begin: '\\\\{',\n end: '\\\\}',\n relevance: 0\n }, {\n className: 'variable',\n begin: IDENT_RE$1 + '(?=\\\\s*(-)|$)',\n endsParent: true,\n relevance: 0\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 const COMMENT = {\n className: \"comment\",\n variants: [JSDOC_COMMENT, hljs.C_BLOCK_COMMENT_MODE, hljs.C_LINE_COMMENT_MODE]\n };\n const SUBST_INTERNALS = [hljs.APOS_STRING_MODE, hljs.QUOTE_STRING_MODE, HTML_TEMPLATE, CSS_TEMPLATE, TEMPLATE_STRING, NUMBER, hljs.REGEXP_MODE];\n SUBST.contains = SUBST_INTERNALS.concat({\n // we need to pair up {} inside our subst to prevent\n // it from ending too early by matching another }\n begin: /\\{/,\n end: /\\}/,\n keywords: KEYWORDS$1,\n contains: [\"self\"].concat(SUBST_INTERNALS)\n });\n const SUBST_AND_COMMENTS = [].concat(COMMENT, SUBST.contains);\n const PARAMS_CONTAINS = SUBST_AND_COMMENTS.concat([// eat recursive parens in sub expressions\n {\n begin: /\\(/,\n end: /\\)/,\n keywords: KEYWORDS$1,\n contains: [\"self\"].concat(SUBST_AND_COMMENTS)\n }]);\n const PARAMS = {\n className: 'params',\n begin: /\\(/,\n end: /\\)/,\n excludeBegin: true,\n excludeEnd: true,\n keywords: KEYWORDS$1,\n contains: PARAMS_CONTAINS\n };\n return {\n name: 'Javascript',\n aliases: ['js', 'jsx', 'mjs', 'cjs'],\n keywords: KEYWORDS$1,\n // this will be extended by TypeScript\n exports: {\n PARAMS_CONTAINS\n },\n illegal: /#(?![$_A-z])/,\n contains: [hljs.SHEBANG({\n label: \"shebang\",\n binary: \"node\",\n relevance: 5\n }), {\n label: \"use_strict\",\n className: 'meta',\n relevance: 10,\n begin: /^\\s*['\"]use (strict|asm)['\"]/\n }, hljs.APOS_STRING_MODE, hljs.QUOTE_STRING_MODE, HTML_TEMPLATE, CSS_TEMPLATE, TEMPLATE_STRING, COMMENT, NUMBER, {\n // object attr container\n begin: concat(/[{,\\n]\\s*/, // we need to look ahead to make sure that we actually have an\n // attribute coming up so we don't steal a comma from a potential\n // \"value\" container\n //\n // NOTE: this might not work how you think. We don't actually always\n // enter this mode and stay. Instead it might merely match `,\n // <comments up next>` and then immediately end after the , because it\n // fails to find any actual attrs. But this still does the job because\n // it prevents the value contain rule from grabbing this instead and\n // prevening this rule from firing when we actually DO have keys.\n lookahead(concat( // we also need to allow for multiple possible comments inbetween\n // the first key:value pairing\n /(((\\/\\/.*$)|(\\/\\*(\\*[^/]|[^*])*\\*\\/))\\s*)*/, IDENT_RE$1 + '\\\\s*:'))),\n relevance: 0,\n contains: [{\n className: 'attr',\n begin: IDENT_RE$1 + lookahead('\\\\s*:'),\n relevance: 0\n }]\n }, {\n // \"value\" container\n begin: '(' + hljs.RE_STARTERS_RE + '|\\\\b(case|return|throw)\\\\b)\\\\s*',\n keywords: 'return throw case',\n contains: [COMMENT, hljs.REGEXP_MODE, {\n className: 'function',\n // we have to count the parens to make sure we actually have the\n // correct bounding ( ) before the =>. There could be any number of\n // sub-expressions inside also surrounded by parens.\n begin: '(\\\\(' + '[^()]*(\\\\(' + '[^()]*(\\\\(' + '[^()]*' + '\\\\)[^()]*)*' + '\\\\)[^()]*)*' + '\\\\)|' + hljs.UNDERSCORE_IDENT_RE + ')\\\\s*=>',\n returnBegin: true,\n end: '\\\\s*=>',\n contains: [{\n className: 'params',\n variants: [{\n begin: hljs.UNDERSCORE_IDENT_RE,\n relevance: 0\n }, {\n className: null,\n begin: /\\(\\s*\\)/,\n skip: true\n }, {\n begin: /\\(/,\n end: /\\)/,\n excludeBegin: true,\n excludeEnd: true,\n keywords: KEYWORDS$1,\n contains: PARAMS_CONTAINS\n }]\n }]\n }, {\n // could be a comma delimited list of params to a function call\n begin: /,/,\n relevance: 0\n }, {\n className: '',\n begin: /\\s/,\n end: /\\s*/,\n skip: true\n }, {\n // JSX\n variants: [{\n begin: FRAGMENT.begin,\n end: FRAGMENT.end\n }, {\n begin: XML_TAG.begin,\n // we carefully check the opening tag to see if it truly\n // is a tag and not a false positive\n 'on:begin': XML_TAG.isTrulyOpeningTag,\n end: XML_TAG.end\n }],\n subLanguage: 'xml',\n contains: [{\n begin: XML_TAG.begin,\n end: XML_TAG.end,\n skip: true,\n contains: ['self']\n }]\n }],\n relevance: 0\n }, {\n className: 'function',\n beginKeywords: 'function',\n end: /[{;]/,\n excludeEnd: true,\n keywords: KEYWORDS$1,\n contains: ['self', hljs.inherit(hljs.TITLE_MODE, {\n begin: IDENT_RE$1\n }), PARAMS],\n illegal: /%/\n }, {\n // prevent this from getting swallowed up by function\n // since they appear \"function like\"\n beginKeywords: \"while if switch catch for\"\n }, {\n className: 'function',\n // we have to count the parens to make sure we actually have the correct\n // bounding ( ). There could be any number of sub-expressions inside\n // also surrounded by parens.\n begin: hljs.UNDERSCORE_IDENT_RE + '\\\\(' + // first parens\n '[^()]*(\\\\(' + '[^()]*(\\\\(' + '[^()]*' + '\\\\)[^()]*)*' + '\\\\)[^()]*)*' + '\\\\)\\\\s*\\\\{',\n // end parens\n returnBegin: true,\n contains: [PARAMS, hljs.inherit(hljs.TITLE_MODE, {\n begin: IDENT_RE$1\n })]\n }, // hack: prevents detection of keywords in some circumstances\n // .keyword()\n // $keyword = x\n {\n variants: [{\n begin: '\\\\.' + IDENT_RE$1\n }, {\n begin: '\\\\$' + IDENT_RE$1\n }],\n relevance: 0\n }, {\n // ES6 class\n className: 'class',\n beginKeywords: 'class',\n end: /[{;=]/,\n excludeEnd: true,\n illegal: /[:\"[\\]]/,\n contains: [{\n beginKeywords: 'extends'\n }, hljs.UNDERSCORE_TITLE_MODE]\n }, {\n begin: /\\b(?=constructor)/,\n end: /[{;]/,\n excludeEnd: true,\n contains: [hljs.inherit(hljs.TITLE_MODE, {\n begin: IDENT_RE$1\n }), 'self', PARAMS]\n }, {\n begin: '(get|set)\\\\s+(?=' + IDENT_RE$1 + '\\\\()',\n end: /\\{/,\n keywords: \"get set\",\n contains: [hljs.inherit(hljs.TITLE_MODE, {\n begin: IDENT_RE$1\n }), {\n begin: /\\(\\)/\n }, // eat to avoid empty params\n PARAMS]\n }, {\n begin: /\\$[(.]/ // relevance booster for a pattern common to JS libs: `$(something)` and `$.something`\n\n }]\n };\n}", "title": "" }, { "docid": "d5292cedff0ba9eddf8be346929ac953", "score": "0.4838167", "text": "function interpolate(template,values){\nreturn template.replace(/{([^}]+)}/g,function(_,p){\nreturn p in values?values[p]:\"{\"+p+\"}\";\n});\n}", "title": "" }, { "docid": "a363eb35df94efd155bed9c74f0f5875", "score": "0.48375756", "text": "function handlebars(hljs) {\n var BUILT_INS = {\n \"builtin-name\": \"action bindattr collection component concat debugger \" + \"each each-in get hash if in input link-to loc log lookup \" + \"mut outlet partial query-params render template textarea unbound \" + \"unless view with yield\"\n };\n var LITERALS = {\n literal: \"true false undefined null\"\n };\n // as defined in https://handlebarsjs.com/guide/expressions.html#literal-segments\n // this regex matches literal segments like ' abc ' or [ abc ] as well as helpers and paths\n // like a/b, ./abc/cde, and abc.bcd\n var IDENFIFIER_REGEX = /(\".*?\"|'.*?'|\\[.*?\\]|[^\\s!\"#%&'()*+,.\\/;<=>@\\[\\\\\\]^`{|}~]+|\\.|\\/)+/;\n // identifier followed by a equal-sign (without the equal sign)\n var HASH_PARAM_REGEX = /(\".*?\"|'.*?'|\\[.*?\\]|[^\\s!\"#%&'()*+,.\\/;<=>@\\[\\\\\\]^`{|}~]+)(?==)/;\n var HELPER_NAME_OR_PATH_EXPRESSION = {\n begin: IDENFIFIER_REGEX,\n lexemes: /[\\w.\\/]+/\n };\n var HELPER_PARAMETER = hljs.inherit(HELPER_NAME_OR_PATH_EXPRESSION, {\n keywords: LITERALS\n });\n var SUB_EXPRESSION = {\n illegal: /\\}\\}/,\n begin: /\\(/,\n end: /\\)/\n };\n var HASH = {\n // fka \"attribute-assignment\", parameters of the form 'key=value'\n className: \"attr\",\n illegal: /\\}\\}/,\n begin: HASH_PARAM_REGEX,\n relevance: 0,\n starts: {\n begin: /=/,\n end: /=/,\n starts: {\n contains: [ hljs.NUMBER_MODE, hljs.QUOTE_STRING_MODE, hljs.APOS_STRING_MODE, HELPER_PARAMETER, SUB_EXPRESSION ]\n }\n }\n };\n var BLOCK_PARAMS = {\n // parameters of the form '{{#with x as | y |}}...{{/with}}'\n begin: /as\\s+\\|/,\n keywords: {\n keyword: \"as\"\n },\n end: /\\|/,\n contains: [ {\n // define sub-mode in order to prevent highlighting of block-parameter named \"as\"\n begin: /\\w+/,\n keywords: \"\"\n } ]\n };\n var HELPER_PARAMETERS = {\n contains: [ hljs.NUMBER_MODE, hljs.QUOTE_STRING_MODE, hljs.APOS_STRING_MODE, BLOCK_PARAMS, HASH, HELPER_PARAMETER, SUB_EXPRESSION ],\n returnEnd: true\n };\n var SUB_EXPRESSION_CONTENTS = hljs.inherit(HELPER_NAME_OR_PATH_EXPRESSION, {\n className: \"name\",\n keywords: BUILT_INS,\n starts: hljs.inherit(HELPER_PARAMETERS, {\n end: /\\)/\n })\n });\n SUB_EXPRESSION.contains = [ SUB_EXPRESSION_CONTENTS ];\n var OPENING_BLOCK_MUSTACHE_CONTENTS = hljs.inherit(HELPER_NAME_OR_PATH_EXPRESSION, {\n keywords: BUILT_INS,\n className: \"name\",\n starts: hljs.inherit(HELPER_PARAMETERS, {\n end: /}}/\n })\n });\n var CLOSING_BLOCK_MUSTACHE_CONTENTS = hljs.inherit(HELPER_NAME_OR_PATH_EXPRESSION, {\n keywords: BUILT_INS,\n className: \"name\"\n });\n var BASIC_MUSTACHE_CONTENTS = hljs.inherit(HELPER_NAME_OR_PATH_EXPRESSION, {\n className: \"name\",\n keywords: BUILT_INS,\n starts: hljs.inherit(HELPER_PARAMETERS, {\n end: /}}/\n })\n });\n var ESCAPE_MUSTACHE_WITH_PRECEEDING_BACKSLASH = {\n begin: /\\\\\\{\\{/,\n skip: true\n };\n var PREVENT_ESCAPE_WITH_ANOTHER_PRECEEDING_BACKSLASH = {\n begin: /\\\\\\\\(?=\\{\\{)/,\n skip: true\n };\n return {\n name: \"Handlebars\",\n aliases: [ \"hbs\", \"html.hbs\", \"html.handlebars\", \"htmlbars\" ],\n case_insensitive: true,\n subLanguage: \"xml\",\n contains: [ ESCAPE_MUSTACHE_WITH_PRECEEDING_BACKSLASH, PREVENT_ESCAPE_WITH_ANOTHER_PRECEEDING_BACKSLASH, hljs.COMMENT(/\\{\\{!--/, /--\\}\\}/), hljs.COMMENT(/\\{\\{!/, /\\}\\}/), {\n // open raw block \"{{{{raw}}}} content not evaluated {{{{/raw}}}}\"\n className: \"template-tag\",\n begin: /\\{\\{\\{\\{(?!\\/)/,\n end: /\\}\\}\\}\\}/,\n contains: [ OPENING_BLOCK_MUSTACHE_CONTENTS ],\n starts: {\n end: /\\{\\{\\{\\{\\//,\n returnEnd: true,\n subLanguage: \"xml\"\n }\n }, {\n // close raw block\n className: \"template-tag\",\n begin: /\\{\\{\\{\\{\\//,\n end: /\\}\\}\\}\\}/,\n contains: [ CLOSING_BLOCK_MUSTACHE_CONTENTS ]\n }, {\n // open block statement\n className: \"template-tag\",\n begin: /\\{\\{#/,\n end: /\\}\\}/,\n contains: [ OPENING_BLOCK_MUSTACHE_CONTENTS ]\n }, {\n className: \"template-tag\",\n begin: /\\{\\{(?=else\\}\\})/,\n end: /\\}\\}/,\n keywords: \"else\"\n }, {\n // closing block statement\n className: \"template-tag\",\n begin: /\\{\\{\\//,\n end: /\\}\\}/,\n contains: [ CLOSING_BLOCK_MUSTACHE_CONTENTS ]\n }, {\n // template variable or helper-call that is NOT html-escaped\n className: \"template-variable\",\n begin: /\\{\\{\\{/,\n end: /\\}\\}\\}/,\n contains: [ BASIC_MUSTACHE_CONTENTS ]\n }, {\n // template variable or helper-call that is html-escaped\n className: \"template-variable\",\n begin: /\\{\\{/,\n end: /\\}\\}/,\n contains: [ BASIC_MUSTACHE_CONTENTS ]\n } ]\n };\n }", "title": "" }, { "docid": "acbad7c02a03ce746d147229632bff28", "score": "0.48318878", "text": "_handleItemTemplate(template) {\n\n if (template === null || !template) {\n return;\n }\n\n if (typeof template === 'function') {\n return template;\n }\n\n const that = this;\n\n if (!('content' in document.createElement('template'))) {\n that.error(that.localize('htmlTemplateNotSuported', { elementType: that.nodeName.toLowerCase() }));\n that.itemTemplate = null;\n return;\n }\n\n template = document.getElementById(template);\n if (template === null || !('content' in template)) {\n that.error(that.localize('invalidTemplate', { elementType: that.nodeName.toLowerCase(), property: 'itemTemplate' }));\n that.itemTemplate = null;\n return;\n }\n\n const templateContent = template.content,\n childrenCount = templateContent.childNodes.length,\n regex = /{{\\w+}}/g;\n let bindingString,\n bindingsFound;\n\n that._bindingDetails = [];\n that._template = template;\n for (let i = 0; i < childrenCount; i++) {\n bindingsFound = [];\n while ((bindingString = regex.exec(templateContent.childNodes[i].innerHTML))) {\n bindingsFound.push(bindingString[0]);\n }\n\n if (bindingsFound.length > 0) {\n that._bindingDetails.push({ childNodeIndex: i, bindingString: bindingsFound });\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "a9ca830129cab3b3b0039dc657c7f252", "score": "0.4822319", "text": "function htmlTemplate( innerHtml )\n{\n var file_data = fs.readFileSync( 'template.html', 'utf8' );\n return file_data.replace(\"[[YIELD]]\", innerHtml);\n}", "title": "" }, { "docid": "bc4cbff3f2373d1b8957c30cd48488ed", "score": "0.48185307", "text": "parsePagerTemplate(slide, template, index) {\n\t\t\tconst slider = this;\n\n\t\t\tlet result = template;\n\n\t\t\tconst numTag = slider.getTemplateTagRegex('num');\n\t\t\tif (result.search(numTag) !== -1) {\n\t\t\t\tresult = result.replace(numTag, (index + 1).toString());\n\t\t\t}\n\n\t\t\tconst srcTag = slider.getTemplateTagRegex('src');\n\t\t\tif (result.search(srcTag) !== -1) {\n\t\t\t\tconst img = slide.querySelectorAll('img')[0];\n\t\t\t\tconst src = (typeof img !== 'undefined') ? img.src : '';\n\t\t\t\tresult = result.replace(srcTag, src);\n\t\t\t}\n\n\t\t\tconst descriptionTag = slider.getTemplateTagRegex('description');\n\t\t\tif (result.search(descriptionTag) !== -1) {\n\t\t\t\tconst des = ($(slide).data().firesliderPagerDescription !== 'undefined') ? $(slide).data().firesliderPagerDescription : '';\n\t\t\t\tresult = result.replace(descriptionTag, des);\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}", "title": "" }, { "docid": "986a2e083cfafb0fd917996eaaf224b8", "score": "0.48154277", "text": "function evalTemplateInvocation(ast, env0){\n //create a new env that points to the parent env\n var env1=createEnv(env0);\n //add env1 binding to env0\n //env0.bindings[String(env1.name)]=env1; \n\n var iStr=\"\";\n\n //get the name of the function to look for\n var invocName=getFuncName(ast.itext,env1);\n //if empty ---> might be because ---> it is a anonymous function or function declaration \n \n //if the templatedef of the function is not null ---> check if it is a anonymous function\n //check if it is a template declaration \n if(ast.itext.templatedef!=null && invocName==\"\"){\n //if anonymous function ---->\n\n // if it has a name ----> look in current\n //get the name of the \n var closureName=getName(ast.itext.templatedef.dtext);\n closureName=closureName.substr(1);\n //if anonymous function ---->\n if(closureName==\"\"){\n //it is a anonymous function : it must be in an invocation for it to work\n var aBody= getBody(ast.itext.templatedef.dparams,env1);\n var aParams= getParams(ast.itext.templatedef.dparams,env1);\n // stringify it and unstringify it?\n\n //try to look for bindings for the params\n for(var i=0; i<aParams.length;i=i+1){\n var v=lookup(String(aParams[i]),env1);\n env1.bindings[String(aParams[i])]==v;\n }\n var bStr= evalBody(aBody, env1);\n \n iStr=iStr+bStr;\n\n return iStr;\n }\n\n //look for the function name\n var temp= lookup(closureName, env1);\n //unstringify the struct\n if(typeof(temp)=='string'){\n temp=unstringify(temp);\n }\n\n var bStr=evalBody(temp.body,env1);\n\n\n return bStr;\n }\n\n //LOOK FOR SPECIAL FUNCTIONS!!! (LOOK FOR #if, #ifeq, #exp)\n switch(invocName){\n case \"#if\":\n //eval targs as #if's args\n var ifEval=evalIF(ast.targs,env1);\n iStr=iStr+ifEval;\n return iStr;\n break;\n case \"#ifeq\":\n //eval targs as a #ifeq args\n var ifeqEval=evalIFEQ(ast.targs,env1);\n iStr=iStr+ifeqEval;\n return iStr;\n break;\n case \"#expr\":\n var expEval=evalEXP(ast.targs,env1);\n iStr=iStr+expEval;\n return iStr;\n break;\n }\n //if we are here, then the code we are dealing with is not a special function\n\n\n //get the params for the function\n //ast.targs-->contains all the parameters necessary for ast.itext\n var invocArgs= getArgs(ast.targs,env1);\n\n\n //match the params of invoc to def\n var defStruct=lookup(String(invocName),env1);\n if(typeof(defStruct)=='string'){\n defStruct=unstringify(defStruct);\n }\n\n //if we can't find a function with the name==? return empty str\n if(defStruct==null){\n return \"{{\"+\"}}\";\n }\n //else continue with assigning function\n //defParam is a struct of a definition containing {the params, the bod and the env}\n var defParam=defStruct.params;\n for(var i=0; i<defParam.length; i=i+1){\n //add new bindings in the current environment\n //assign the value of args to param\n env1.bindings[defParam[i]]=String(invocArgs[i]);\n }\n\n //defBody is an AST NODE --> a 'dparams' node\n var defBody=defStruct.body;\n \n //evaluate the body\n //while(defBody!=null){\n var bStr= evalBody(defBody, env1);\n \n iStr=iStr+bStr;\n \n //get next part\n //defBody=defBody.next;\n //}\n\n return iStr;\n}", "title": "" }, { "docid": "2290d3d72bb823e40a899af03602558d", "score": "0.4813942", "text": "function javascript(hljs) {\n /**\n * Takes a string like \"<Booger\" and checks to see\n * if we can find a matching \"</Booger\" later in the\n * content.\n * @param {RegExpMatchArray} match\n * @param {{after:number}} param1\n */\n const hasClosingTag = (match, { after }) => {\n const tag = \"</\" + match[0].slice(1);\n const pos = match.input.indexOf(tag, after);\n return pos !== -1;\n };\n\n const IDENT_RE$1 = IDENT_RE;\n const FRAGMENT = {\n begin: '<>',\n end: '</>'\n };\n const XML_TAG = {\n begin: /<[A-Za-z0-9\\\\._:-]+/,\n end: /\\/[A-Za-z0-9\\\\._:-]+>|\\/>/,\n /**\n * @param {RegExpMatchArray} match\n * @param {CallbackResponse} response\n */\n isTrulyOpeningTag: (match, response) => {\n const afterMatchIndex = match[0].length + match.index;\n const nextChar = match.input[afterMatchIndex];\n // nested type?\n // HTML should not include another raw `<` inside a tag\n // But a type might: `<Array<Array<number>>`, etc.\n if (nextChar === \"<\") {\n response.ignoreMatch();\n return;\n }\n // <something>\n // This is now either a tag or a type.\n if (nextChar === \">\") {\n // if we cannot find a matching closing tag, then we\n // will ignore it\n if (!hasClosingTag(match, { after: afterMatchIndex })) {\n response.ignoreMatch();\n }\n }\n }\n };\n const KEYWORDS$1 = {\n $pattern: IDENT_RE,\n keyword: KEYWORDS,\n literal: LITERALS,\n built_in: BUILT_INS\n };\n\n // https://tc39.es/ecma262/#sec-literals-numeric-literals\n const decimalDigits = '[0-9](_?[0-9])*';\n const frac = `\\\\.(${decimalDigits})`;\n // DecimalIntegerLiteral, including Annex B NonOctalDecimalIntegerLiteral\n // https://tc39.es/ecma262/#sec-additional-syntax-numeric-literals\n const decimalInteger = `0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`;\n const NUMBER = {\n className: 'number',\n variants: [\n // DecimalLiteral\n { begin: `(\\\\b(${decimalInteger})((${frac})|\\\\.)?|(${frac}))` +\n `[eE][+-]?(${decimalDigits})\\\\b` },\n { begin: `\\\\b(${decimalInteger})\\\\b((${frac})\\\\b|\\\\.)?|(${frac})\\\\b` },\n\n // DecimalBigIntegerLiteral\n { begin: `\\\\b(0|[1-9](_?[0-9])*)n\\\\b` },\n\n // NonDecimalIntegerLiteral\n { begin: \"\\\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\\\b\" },\n { begin: \"\\\\b0[bB][0-1](_?[0-1])*n?\\\\b\" },\n { begin: \"\\\\b0[oO][0-7](_?[0-7])*n?\\\\b\" },\n\n // LegacyOctalIntegerLiteral (does not include underscore separators)\n // https://tc39.es/ecma262/#sec-additional-syntax-numeric-literals\n { begin: \"\\\\b0[0-7]+n?\\\\b\" },\n ],\n relevance: 0\n };\n\n const SUBST = {\n className: 'subst',\n begin: '\\\\$\\\\{',\n end: '\\\\}',\n keywords: KEYWORDS$1,\n contains: [] // defined later\n };\n const HTML_TEMPLATE = {\n begin: 'html`',\n end: '',\n starts: {\n end: '`',\n returnEnd: false,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n SUBST\n ],\n subLanguage: 'xml'\n }\n };\n const CSS_TEMPLATE = {\n begin: 'css`',\n end: '',\n starts: {\n end: '`',\n returnEnd: false,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n SUBST\n ],\n subLanguage: 'css'\n }\n };\n const TEMPLATE_STRING = {\n className: 'string',\n begin: '`',\n end: '`',\n contains: [\n hljs.BACKSLASH_ESCAPE,\n SUBST\n ]\n };\n const JSDOC_COMMENT = 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$1 + '(?=\\\\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 const COMMENT = {\n className: \"comment\",\n variants: [\n JSDOC_COMMENT,\n hljs.C_BLOCK_COMMENT_MODE,\n hljs.C_LINE_COMMENT_MODE\n ]\n };\n const SUBST_INTERNALS = [\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 SUBST.contains = SUBST_INTERNALS\n .concat({\n // we need to pair up {} inside our subst to prevent\n // it from ending too early by matching another }\n begin: /\\{/,\n end: /\\}/,\n keywords: KEYWORDS$1,\n contains: [\n \"self\"\n ].concat(SUBST_INTERNALS)\n });\n const SUBST_AND_COMMENTS = [].concat(COMMENT, SUBST.contains);\n const PARAMS_CONTAINS = SUBST_AND_COMMENTS.concat([\n // eat recursive parens in sub expressions\n {\n begin: /\\(/,\n end: /\\)/,\n keywords: KEYWORDS$1,\n contains: [\"self\"].concat(SUBST_AND_COMMENTS)\n }\n ]);\n const PARAMS = {\n className: 'params',\n begin: /\\(/,\n end: /\\)/,\n excludeBegin: true,\n excludeEnd: true,\n keywords: KEYWORDS$1,\n contains: PARAMS_CONTAINS\n };\n\n return {\n name: 'Javascript',\n aliases: ['js', 'jsx', 'mjs', 'cjs'],\n keywords: KEYWORDS$1,\n // this will be extended by TypeScript\n exports: { PARAMS_CONTAINS },\n illegal: /#(?![$_A-z])/,\n contains: [\n hljs.SHEBANG({\n label: \"shebang\",\n binary: \"node\",\n relevance: 5\n }),\n {\n label: \"use_strict\",\n className: 'meta',\n relevance: 10,\n begin: /^\\s*['\"]use (strict|asm)['\"]/\n },\n hljs.APOS_STRING_MODE,\n hljs.QUOTE_STRING_MODE,\n HTML_TEMPLATE,\n CSS_TEMPLATE,\n TEMPLATE_STRING,\n COMMENT,\n NUMBER,\n { // object attr container\n begin: concat(/[{,\\n]\\s*/,\n // we need to look ahead to make sure that we actually have an\n // attribute coming up so we don't steal a comma from a potential\n // \"value\" container\n //\n // NOTE: this might not work how you think. We don't actually always\n // enter this mode and stay. Instead it might merely match `,\n // <comments up next>` and then immediately end after the , because it\n // fails to find any actual attrs. But this still does the job because\n // it prevents the value contain rule from grabbing this instead and\n // prevening this rule from firing when we actually DO have keys.\n lookahead(concat(\n // we also need to allow for multiple possible comments inbetween\n // the first key:value pairing\n /(((\\/\\/.*$)|(\\/\\*(\\*[^/]|[^*])*\\*\\/))\\s*)*/,\n IDENT_RE$1 + '\\\\s*:'))),\n relevance: 0,\n contains: [\n {\n className: 'attr',\n begin: IDENT_RE$1 + lookahead('\\\\s*:'),\n 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 COMMENT,\n hljs.REGEXP_MODE,\n {\n className: 'function',\n // we have to count the parens to make sure we actually have the\n // correct bounding ( ) before the =>. There could be any number of\n // sub-expressions inside also surrounded by parens.\n begin: '(\\\\(' +\n '[^()]*(\\\\(' +\n '[^()]*(\\\\(' +\n '[^()]*' +\n '\\\\)[^()]*)*' +\n '\\\\)[^()]*)*' +\n '\\\\)|' + hljs.UNDERSCORE_IDENT_RE + ')\\\\s*=>',\n returnBegin: true,\n end: '\\\\s*=>',\n contains: [\n {\n className: 'params',\n variants: [\n {\n begin: hljs.UNDERSCORE_IDENT_RE,\n relevance: 0\n },\n {\n className: null,\n begin: /\\(\\s*\\)/,\n skip: true\n },\n {\n begin: /\\(/,\n end: /\\)/,\n excludeBegin: true,\n excludeEnd: true,\n keywords: KEYWORDS$1,\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 {\n begin: XML_TAG.begin,\n // we carefully check the opening tag to see if it truly\n // is a tag and not a false positive\n 'on:begin': XML_TAG.isTrulyOpeningTag,\n end: XML_TAG.end\n }\n ],\n subLanguage: 'xml',\n contains: [\n {\n begin: XML_TAG.begin,\n end: XML_TAG.end,\n skip: true,\n contains: ['self']\n }\n ]\n }\n ],\n relevance: 0\n },\n {\n className: 'function',\n beginKeywords: 'function',\n end: /[{;]/,\n excludeEnd: true,\n keywords: KEYWORDS$1,\n contains: [\n 'self',\n hljs.inherit(hljs.TITLE_MODE, { begin: IDENT_RE$1 }),\n PARAMS\n ],\n illegal: /%/\n },\n {\n // prevent this from getting swallowed up by function\n // since they appear \"function like\"\n beginKeywords: \"while if switch catch for\"\n },\n {\n className: 'function',\n // we have to count the parens to make sure we actually have the correct\n // bounding ( ). There could be any number of sub-expressions inside\n // also surrounded by parens.\n begin: hljs.UNDERSCORE_IDENT_RE +\n '\\\\(' + // first parens\n '[^()]*(\\\\(' +\n '[^()]*(\\\\(' +\n '[^()]*' +\n '\\\\)[^()]*)*' +\n '\\\\)[^()]*)*' +\n '\\\\)\\\\s*\\\\{', // end parens\n returnBegin:true,\n contains: [\n PARAMS,\n hljs.inherit(hljs.TITLE_MODE, { begin: IDENT_RE$1 }),\n ]\n },\n // hack: prevents detection of keywords in some circumstances\n // .keyword()\n // $keyword = x\n {\n variants: [\n { begin: '\\\\.' + IDENT_RE$1 },\n { begin: '\\\\$' + IDENT_RE$1 }\n ],\n relevance: 0\n },\n { // ES6 class\n className: 'class',\n beginKeywords: 'class',\n end: /[{;=]/,\n excludeEnd: true,\n illegal: /[:\"[\\]]/,\n contains: [\n { beginKeywords: 'extends' },\n hljs.UNDERSCORE_TITLE_MODE\n ]\n },\n {\n begin: /\\b(?=constructor)/,\n end: /[{;]/,\n excludeEnd: true,\n contains: [\n hljs.inherit(hljs.TITLE_MODE, { begin: IDENT_RE$1 }),\n 'self',\n PARAMS\n ]\n },\n {\n begin: '(get|set)\\\\s+(?=' + IDENT_RE$1 + '\\\\()',\n end: /\\{/,\n keywords: \"get set\",\n contains: [\n hljs.inherit(hljs.TITLE_MODE, { begin: IDENT_RE$1 }),\n { begin: /\\(\\)/ }, // eat to avoid empty params\n PARAMS\n ]\n },\n {\n begin: /\\$[(.]/ // relevance booster for a pattern common to JS libs: `$(something)` and `$.something`\n }\n ]\n };\n}", "title": "" }, { "docid": "2290d3d72bb823e40a899af03602558d", "score": "0.4813942", "text": "function javascript(hljs) {\n /**\n * Takes a string like \"<Booger\" and checks to see\n * if we can find a matching \"</Booger\" later in the\n * content.\n * @param {RegExpMatchArray} match\n * @param {{after:number}} param1\n */\n const hasClosingTag = (match, { after }) => {\n const tag = \"</\" + match[0].slice(1);\n const pos = match.input.indexOf(tag, after);\n return pos !== -1;\n };\n\n const IDENT_RE$1 = IDENT_RE;\n const FRAGMENT = {\n begin: '<>',\n end: '</>'\n };\n const XML_TAG = {\n begin: /<[A-Za-z0-9\\\\._:-]+/,\n end: /\\/[A-Za-z0-9\\\\._:-]+>|\\/>/,\n /**\n * @param {RegExpMatchArray} match\n * @param {CallbackResponse} response\n */\n isTrulyOpeningTag: (match, response) => {\n const afterMatchIndex = match[0].length + match.index;\n const nextChar = match.input[afterMatchIndex];\n // nested type?\n // HTML should not include another raw `<` inside a tag\n // But a type might: `<Array<Array<number>>`, etc.\n if (nextChar === \"<\") {\n response.ignoreMatch();\n return;\n }\n // <something>\n // This is now either a tag or a type.\n if (nextChar === \">\") {\n // if we cannot find a matching closing tag, then we\n // will ignore it\n if (!hasClosingTag(match, { after: afterMatchIndex })) {\n response.ignoreMatch();\n }\n }\n }\n };\n const KEYWORDS$1 = {\n $pattern: IDENT_RE,\n keyword: KEYWORDS,\n literal: LITERALS,\n built_in: BUILT_INS\n };\n\n // https://tc39.es/ecma262/#sec-literals-numeric-literals\n const decimalDigits = '[0-9](_?[0-9])*';\n const frac = `\\\\.(${decimalDigits})`;\n // DecimalIntegerLiteral, including Annex B NonOctalDecimalIntegerLiteral\n // https://tc39.es/ecma262/#sec-additional-syntax-numeric-literals\n const decimalInteger = `0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`;\n const NUMBER = {\n className: 'number',\n variants: [\n // DecimalLiteral\n { begin: `(\\\\b(${decimalInteger})((${frac})|\\\\.)?|(${frac}))` +\n `[eE][+-]?(${decimalDigits})\\\\b` },\n { begin: `\\\\b(${decimalInteger})\\\\b((${frac})\\\\b|\\\\.)?|(${frac})\\\\b` },\n\n // DecimalBigIntegerLiteral\n { begin: `\\\\b(0|[1-9](_?[0-9])*)n\\\\b` },\n\n // NonDecimalIntegerLiteral\n { begin: \"\\\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\\\b\" },\n { begin: \"\\\\b0[bB][0-1](_?[0-1])*n?\\\\b\" },\n { begin: \"\\\\b0[oO][0-7](_?[0-7])*n?\\\\b\" },\n\n // LegacyOctalIntegerLiteral (does not include underscore separators)\n // https://tc39.es/ecma262/#sec-additional-syntax-numeric-literals\n { begin: \"\\\\b0[0-7]+n?\\\\b\" },\n ],\n relevance: 0\n };\n\n const SUBST = {\n className: 'subst',\n begin: '\\\\$\\\\{',\n end: '\\\\}',\n keywords: KEYWORDS$1,\n contains: [] // defined later\n };\n const HTML_TEMPLATE = {\n begin: 'html`',\n end: '',\n starts: {\n end: '`',\n returnEnd: false,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n SUBST\n ],\n subLanguage: 'xml'\n }\n };\n const CSS_TEMPLATE = {\n begin: 'css`',\n end: '',\n starts: {\n end: '`',\n returnEnd: false,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n SUBST\n ],\n subLanguage: 'css'\n }\n };\n const TEMPLATE_STRING = {\n className: 'string',\n begin: '`',\n end: '`',\n contains: [\n hljs.BACKSLASH_ESCAPE,\n SUBST\n ]\n };\n const JSDOC_COMMENT = 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$1 + '(?=\\\\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 const COMMENT = {\n className: \"comment\",\n variants: [\n JSDOC_COMMENT,\n hljs.C_BLOCK_COMMENT_MODE,\n hljs.C_LINE_COMMENT_MODE\n ]\n };\n const SUBST_INTERNALS = [\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 SUBST.contains = SUBST_INTERNALS\n .concat({\n // we need to pair up {} inside our subst to prevent\n // it from ending too early by matching another }\n begin: /\\{/,\n end: /\\}/,\n keywords: KEYWORDS$1,\n contains: [\n \"self\"\n ].concat(SUBST_INTERNALS)\n });\n const SUBST_AND_COMMENTS = [].concat(COMMENT, SUBST.contains);\n const PARAMS_CONTAINS = SUBST_AND_COMMENTS.concat([\n // eat recursive parens in sub expressions\n {\n begin: /\\(/,\n end: /\\)/,\n keywords: KEYWORDS$1,\n contains: [\"self\"].concat(SUBST_AND_COMMENTS)\n }\n ]);\n const PARAMS = {\n className: 'params',\n begin: /\\(/,\n end: /\\)/,\n excludeBegin: true,\n excludeEnd: true,\n keywords: KEYWORDS$1,\n contains: PARAMS_CONTAINS\n };\n\n return {\n name: 'Javascript',\n aliases: ['js', 'jsx', 'mjs', 'cjs'],\n keywords: KEYWORDS$1,\n // this will be extended by TypeScript\n exports: { PARAMS_CONTAINS },\n illegal: /#(?![$_A-z])/,\n contains: [\n hljs.SHEBANG({\n label: \"shebang\",\n binary: \"node\",\n relevance: 5\n }),\n {\n label: \"use_strict\",\n className: 'meta',\n relevance: 10,\n begin: /^\\s*['\"]use (strict|asm)['\"]/\n },\n hljs.APOS_STRING_MODE,\n hljs.QUOTE_STRING_MODE,\n HTML_TEMPLATE,\n CSS_TEMPLATE,\n TEMPLATE_STRING,\n COMMENT,\n NUMBER,\n { // object attr container\n begin: concat(/[{,\\n]\\s*/,\n // we need to look ahead to make sure that we actually have an\n // attribute coming up so we don't steal a comma from a potential\n // \"value\" container\n //\n // NOTE: this might not work how you think. We don't actually always\n // enter this mode and stay. Instead it might merely match `,\n // <comments up next>` and then immediately end after the , because it\n // fails to find any actual attrs. But this still does the job because\n // it prevents the value contain rule from grabbing this instead and\n // prevening this rule from firing when we actually DO have keys.\n lookahead(concat(\n // we also need to allow for multiple possible comments inbetween\n // the first key:value pairing\n /(((\\/\\/.*$)|(\\/\\*(\\*[^/]|[^*])*\\*\\/))\\s*)*/,\n IDENT_RE$1 + '\\\\s*:'))),\n relevance: 0,\n contains: [\n {\n className: 'attr',\n begin: IDENT_RE$1 + lookahead('\\\\s*:'),\n 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 COMMENT,\n hljs.REGEXP_MODE,\n {\n className: 'function',\n // we have to count the parens to make sure we actually have the\n // correct bounding ( ) before the =>. There could be any number of\n // sub-expressions inside also surrounded by parens.\n begin: '(\\\\(' +\n '[^()]*(\\\\(' +\n '[^()]*(\\\\(' +\n '[^()]*' +\n '\\\\)[^()]*)*' +\n '\\\\)[^()]*)*' +\n '\\\\)|' + hljs.UNDERSCORE_IDENT_RE + ')\\\\s*=>',\n returnBegin: true,\n end: '\\\\s*=>',\n contains: [\n {\n className: 'params',\n variants: [\n {\n begin: hljs.UNDERSCORE_IDENT_RE,\n relevance: 0\n },\n {\n className: null,\n begin: /\\(\\s*\\)/,\n skip: true\n },\n {\n begin: /\\(/,\n end: /\\)/,\n excludeBegin: true,\n excludeEnd: true,\n keywords: KEYWORDS$1,\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 {\n begin: XML_TAG.begin,\n // we carefully check the opening tag to see if it truly\n // is a tag and not a false positive\n 'on:begin': XML_TAG.isTrulyOpeningTag,\n end: XML_TAG.end\n }\n ],\n subLanguage: 'xml',\n contains: [\n {\n begin: XML_TAG.begin,\n end: XML_TAG.end,\n skip: true,\n contains: ['self']\n }\n ]\n }\n ],\n relevance: 0\n },\n {\n className: 'function',\n beginKeywords: 'function',\n end: /[{;]/,\n excludeEnd: true,\n keywords: KEYWORDS$1,\n contains: [\n 'self',\n hljs.inherit(hljs.TITLE_MODE, { begin: IDENT_RE$1 }),\n PARAMS\n ],\n illegal: /%/\n },\n {\n // prevent this from getting swallowed up by function\n // since they appear \"function like\"\n beginKeywords: \"while if switch catch for\"\n },\n {\n className: 'function',\n // we have to count the parens to make sure we actually have the correct\n // bounding ( ). There could be any number of sub-expressions inside\n // also surrounded by parens.\n begin: hljs.UNDERSCORE_IDENT_RE +\n '\\\\(' + // first parens\n '[^()]*(\\\\(' +\n '[^()]*(\\\\(' +\n '[^()]*' +\n '\\\\)[^()]*)*' +\n '\\\\)[^()]*)*' +\n '\\\\)\\\\s*\\\\{', // end parens\n returnBegin:true,\n contains: [\n PARAMS,\n hljs.inherit(hljs.TITLE_MODE, { begin: IDENT_RE$1 }),\n ]\n },\n // hack: prevents detection of keywords in some circumstances\n // .keyword()\n // $keyword = x\n {\n variants: [\n { begin: '\\\\.' + IDENT_RE$1 },\n { begin: '\\\\$' + IDENT_RE$1 }\n ],\n relevance: 0\n },\n { // ES6 class\n className: 'class',\n beginKeywords: 'class',\n end: /[{;=]/,\n excludeEnd: true,\n illegal: /[:\"[\\]]/,\n contains: [\n { beginKeywords: 'extends' },\n hljs.UNDERSCORE_TITLE_MODE\n ]\n },\n {\n begin: /\\b(?=constructor)/,\n end: /[{;]/,\n excludeEnd: true,\n contains: [\n hljs.inherit(hljs.TITLE_MODE, { begin: IDENT_RE$1 }),\n 'self',\n PARAMS\n ]\n },\n {\n begin: '(get|set)\\\\s+(?=' + IDENT_RE$1 + '\\\\()',\n end: /\\{/,\n keywords: \"get set\",\n contains: [\n hljs.inherit(hljs.TITLE_MODE, { begin: IDENT_RE$1 }),\n { begin: /\\(\\)/ }, // eat to avoid empty params\n PARAMS\n ]\n },\n {\n begin: /\\$[(.]/ // relevance booster for a pattern common to JS libs: `$(something)` and `$.something`\n }\n ]\n };\n}", "title": "" }, { "docid": "18c66bfb5533ce901dd8ab8125c025dd", "score": "0.47974175", "text": "_handleTemplate(oldValue) {\n const that = this;\n let template = that.tooltipTemplate;\n\n if (oldValue) {\n that.$.content.innerHTML = that.value ? that.value : '';\n }\n\n if (template === null || !template) {\n return;\n }\n\n if (typeof that.tooltipTemplate === 'function') {\n that.tooltipTemplate(that.$.content, { value: that.value });\n return;\n }\n\n if (!('content' in document.createElement('template'))) {\n that.error(that.localize('htmlTemplateNotSuported', { elementType: that.nodeName.toLowerCase() }));\n return;\n }\n\n template = document.getElementById(template);\n if (template === null || !('content' in template)) {\n that.error(that.localize('invalidTemplate', { elementType: that.nodeName.toLowerCase(), property: 'template' }));\n return;\n }\n\n const content = template.content,\n childrenCount = content.childNodes.length,\n regex = /{{\\w+}}/g;\n let bindingString,\n bindingDetails = [];\n\n for (let i = 0; i < childrenCount; i++) {\n bindingString = regex.exec(content.childNodes[i].innerHTML);\n while (bindingString) {\n bindingDetails.push({ childNodeIndex: i, bindingString: bindingString[0] });\n bindingString = regex.exec(content.childNodes[i].innerHTML);\n }\n }\n\n const bindingsCount = bindingDetails.length;\n let clone = document.importNode(template.content, true),\n bindingHolderElement,\n bindingStringsCount;\n\n for (let b = 0; b < bindingsCount; b++) {\n bindingHolderElement = clone.childNodes[bindingDetails[b].childNodeIndex];\n bindingStringsCount = bindingDetails.length;\n for (let i = 0; i < bindingStringsCount; i++) {\n bindingHolderElement.innerHTML = bindingHolderElement.innerHTML.replace(bindingDetails[b].bindingString, that.value);\n }\n }\n\n that.$.content.innerHTML = '';\n for (let i = 0; i < clone.childNodes.length; i++) {\n if (clone.childNodes[i].outerHTML) {\n that.$.content.innerHTML += clone.childNodes[i].outerHTML;\n }\n }\n }", "title": "" }, { "docid": "d31d1b68d34ad463caf63a503a393620", "score": "0.479167", "text": "function parseLiteral(state, literal, isOpeningElement) {\r\n\t// Check if the literal is valid.\r\n\tif (literal && literal.length) {\r\n\t\t// Initialize the current position.\r\n\t\tvar currentPosition = 0;\r\n\t\t// Initialize the variables\r\n\t\tvar index, match, remainingText;\r\n\t\t// Initialize the variable regular expression.\r\n\t\tvar variable_regex = /(@|\\#|\\!)\\{(.+?)\\}/gi;\r\n\t\t// Iterate through each match.\r\n\t\twhile ((match = variable_regex.exec(literal)) !== null) {\r\n\t\t\t// Delete the input from the match.\r\n\t\t\tdelete match.input;\r\n\t\t\t// Initialize the handlers.\r\n\t\t\tvar handlers = [];\r\n\t\t\t// Check if text is available to be written.\r\n\t\t\tif (match.index - currentPosition > 0) {\r\n\t\t\t\t// Emit text.\r\n\t\t\t\temitter.text(state, literal.substr(currentPosition, match.index - currentPosition), isOpeningElement);\r\n\t\t\t}\r\n\t\t\t// Check if this is a code snippet.\r\n\t\t\tif (match[1] === '@') {\r\n\t\t\t\t// Emit code.\r\n\t\t\t\temitter.code(state, match[2], isOpeningElement);\r\n\t\t\t}\r\n\t\t\t// Otherwise this is a variable.\r\n\t\t\telse {\r\n\t\t\t\t// Check if the variable name contains a function list.\r\n\t\t\t\tif ((index = match[2].search(/[|,]/)) !== -1) {\r\n\t\t\t\t\t// Split the handler list.\r\n\t\t\t\t\tvar split = match[2].substr(index + 1).split(/[,|]/);\r\n\t\t\t\t\t// Iterate through each handler.\r\n\t\t\t\t\tfor (var i = 0; i < split.length; i += 1) {\r\n\t\t\t\t\t\t// Check if the handler is valid.\r\n\t\t\t\t\t\tif (split[i].trim().length) {\r\n\t\t\t\t\t\t\t// Push the handler on the handler list.\r\n\t\t\t\t\t\t\thandlers.push(split[i].trim());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Set the variable name.\r\n\t\t\t\t\tmatch[2] = match[2].substr(0, index);\r\n\t\t\t\t}\r\n\t\t\t\t// Emit a variable.\r\n\t\t\t\temitter.variable(state, match[2], handlers, match[1] === '#', isOpeningElement);\r\n\t\t\t}\r\n\t\t\t// Move the current position to the position after the variable.\r\n\t\t\tcurrentPosition = match.index + match[0].length;\r\n\t\t}\r\n\t\t// Retrieve the remaining text and check if the remaining text is valid.\r\n\t\tif ((remainingText = literal.substr(currentPosition)) && remainingText.length) {\r\n\t\t\t// Emit text.\r\n\t\t\temitter.text(state, remainingText, isOpeningElement);\r\n\t\t}\r\n\t}\r\n\t// Return the state.\r\n\treturn state;\r\n}", "title": "" }, { "docid": "4e3825092650f241d5c46f99fa6d57aa", "score": "0.47913486", "text": "async function compileTemplate(unparsed, options) {\n options = handleOptions(options);\n const parsed = await parseTemplate(unparsed, options);\n const wrapped = \"var $buffer=[];(function($buffer,$locals){\" + parsed + \"})($buffer,$locals);return $buffer.join(``);\";\n return new Function(\"$xml\", \"$locals\", wrapped).bind(null, escape);\n}", "title": "" }, { "docid": "3b1c2325b2831bfc0e3b92ebbd54dbc5", "score": "0.4789842", "text": "function javascript(hljs) {\n /**\n * Takes a string like \"<Booger\" and checks to see\n * if we can find a matching \"</Booger\" later in the\n * content.\n * @param {RegExpMatchArray} match\n * @param {{after:number}} param1\n */\n const hasClosingTag = (match, { after }) => {\n const tag = \"</\" + match[0].slice(1);\n const pos = match.input.indexOf(tag, after);\n return pos !== -1;\n };\n\n const IDENT_RE$1 = IDENT_RE;\n const FRAGMENT = {\n begin: '<>',\n end: '</>'\n };\n const XML_TAG = {\n begin: /<[A-Za-z0-9\\\\._:-]+/,\n end: /\\/[A-Za-z0-9\\\\._:-]+>|\\/>/,\n /**\n * @param {RegExpMatchArray} match\n * @param {CallbackResponse} response\n */\n isTrulyOpeningTag: (match, response) => {\n const afterMatchIndex = match[0].length + match.index;\n const nextChar = match.input[afterMatchIndex];\n // nested type?\n // HTML should not include another raw `<` inside a tag\n // But a type might: `<Array<Array<number>>`, etc.\n if (nextChar === \"<\") {\n response.ignoreMatch();\n return;\n }\n // <something>\n // This is now either a tag or a type.\n if (nextChar === \">\") {\n // if we cannot find a matching closing tag, then we\n // will ignore it\n if (!hasClosingTag(match, { after: afterMatchIndex })) {\n response.ignoreMatch();\n }\n }\n }\n };\n const KEYWORDS$1 = {\n $pattern: IDENT_RE,\n keyword: KEYWORDS.join(\" \"),\n literal: LITERALS.join(\" \"),\n built_in: BUILT_INS.join(\" \")\n };\n\n // https://tc39.es/ecma262/#sec-literals-numeric-literals\n const decimalDigits = '[0-9](_?[0-9])*';\n const frac = `\\\\.(${decimalDigits})`;\n // DecimalIntegerLiteral, including Annex B NonOctalDecimalIntegerLiteral\n // https://tc39.es/ecma262/#sec-additional-syntax-numeric-literals\n const decimalInteger = `0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`;\n const NUMBER = {\n className: 'number',\n variants: [\n // DecimalLiteral\n { begin: `(\\\\b(${decimalInteger})((${frac})|\\\\.)?|(${frac}))` +\n `[eE][+-]?(${decimalDigits})\\\\b` },\n { begin: `\\\\b(${decimalInteger})\\\\b((${frac})\\\\b|\\\\.)?|(${frac})\\\\b` },\n\n // DecimalBigIntegerLiteral\n { begin: `\\\\b(0|[1-9](_?[0-9])*)n\\\\b` },\n\n // NonDecimalIntegerLiteral\n { begin: \"\\\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\\\b\" },\n { begin: \"\\\\b0[bB][0-1](_?[0-1])*n?\\\\b\" },\n { begin: \"\\\\b0[oO][0-7](_?[0-7])*n?\\\\b\" },\n\n // LegacyOctalIntegerLiteral (does not include underscore separators)\n // https://tc39.es/ecma262/#sec-additional-syntax-numeric-literals\n { begin: \"\\\\b0[0-7]+n?\\\\b\" },\n ],\n relevance: 0\n };\n\n const SUBST = {\n className: 'subst',\n begin: '\\\\$\\\\{',\n end: '\\\\}',\n keywords: KEYWORDS$1,\n contains: [] // defined later\n };\n const HTML_TEMPLATE = {\n begin: 'html`',\n end: '',\n starts: {\n end: '`',\n returnEnd: false,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n SUBST\n ],\n subLanguage: 'xml'\n }\n };\n const CSS_TEMPLATE = {\n begin: 'css`',\n end: '',\n starts: {\n end: '`',\n returnEnd: false,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n SUBST\n ],\n subLanguage: 'css'\n }\n };\n const TEMPLATE_STRING = {\n className: 'string',\n begin: '`',\n end: '`',\n contains: [\n hljs.BACKSLASH_ESCAPE,\n SUBST\n ]\n };\n const JSDOC_COMMENT = 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$1 + '(?=\\\\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 const COMMENT = {\n className: \"comment\",\n variants: [\n JSDOC_COMMENT,\n hljs.C_BLOCK_COMMENT_MODE,\n hljs.C_LINE_COMMENT_MODE\n ]\n };\n const SUBST_INTERNALS = [\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 SUBST.contains = SUBST_INTERNALS\n .concat({\n // we need to pair up {} inside our subst to prevent\n // it from ending too early by matching another }\n begin: /\\{/,\n end: /\\}/,\n keywords: KEYWORDS$1,\n contains: [\n \"self\"\n ].concat(SUBST_INTERNALS)\n });\n const SUBST_AND_COMMENTS = [].concat(COMMENT, SUBST.contains);\n const PARAMS_CONTAINS = SUBST_AND_COMMENTS.concat([\n // eat recursive parens in sub expressions\n {\n begin: /\\(/,\n end: /\\)/,\n keywords: KEYWORDS$1,\n contains: [\"self\"].concat(SUBST_AND_COMMENTS)\n }\n ]);\n const PARAMS = {\n className: 'params',\n begin: /\\(/,\n end: /\\)/,\n excludeBegin: true,\n excludeEnd: true,\n keywords: KEYWORDS$1,\n contains: PARAMS_CONTAINS\n };\n\n return {\n name: 'Javascript',\n aliases: ['js', 'jsx', 'mjs', 'cjs'],\n keywords: KEYWORDS$1,\n // this will be extended by TypeScript\n exports: { PARAMS_CONTAINS },\n illegal: /#(?![$_A-z])/,\n contains: [\n hljs.SHEBANG({\n label: \"shebang\",\n binary: \"node\",\n relevance: 5\n }),\n {\n label: \"use_strict\",\n className: 'meta',\n relevance: 10,\n begin: /^\\s*['\"]use (strict|asm)['\"]/\n },\n hljs.APOS_STRING_MODE,\n hljs.QUOTE_STRING_MODE,\n HTML_TEMPLATE,\n CSS_TEMPLATE,\n TEMPLATE_STRING,\n COMMENT,\n NUMBER,\n { // object attr container\n begin: concat(/[{,\\n]\\s*/,\n // we need to look ahead to make sure that we actually have an\n // attribute coming up so we don't steal a comma from a potential\n // \"value\" container\n //\n // NOTE: this might not work how you think. We don't actually always\n // enter this mode and stay. Instead it might merely match `,\n // <comments up next>` and then immediately end after the , because it\n // fails to find any actual attrs. But this still does the job because\n // it prevents the value contain rule from grabbing this instead and\n // prevening this rule from firing when we actually DO have keys.\n lookahead(concat(\n // we also need to allow for multiple possible comments inbetween\n // the first key:value pairing\n /(((\\/\\/.*$)|(\\/\\*(\\*[^/]|[^*])*\\*\\/))\\s*)*/,\n IDENT_RE$1 + '\\\\s*:'))),\n relevance: 0,\n contains: [\n {\n className: 'attr',\n begin: IDENT_RE$1 + lookahead('\\\\s*:'),\n 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 COMMENT,\n hljs.REGEXP_MODE,\n {\n className: 'function',\n // we have to count the parens to make sure we actually have the\n // correct bounding ( ) before the =>. There could be any number of\n // sub-expressions inside also surrounded by parens.\n begin: '(\\\\(' +\n '[^()]*(\\\\(' +\n '[^()]*(\\\\(' +\n '[^()]*' +\n '\\\\)[^()]*)*' +\n '\\\\)[^()]*)*' +\n '\\\\)|' + hljs.UNDERSCORE_IDENT_RE + ')\\\\s*=>',\n returnBegin: true,\n end: '\\\\s*=>',\n contains: [\n {\n className: 'params',\n variants: [\n {\n begin: hljs.UNDERSCORE_IDENT_RE,\n relevance: 0\n },\n {\n className: null,\n begin: /\\(\\s*\\)/,\n skip: true\n },\n {\n begin: /\\(/,\n end: /\\)/,\n excludeBegin: true,\n excludeEnd: true,\n keywords: KEYWORDS$1,\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 {\n begin: XML_TAG.begin,\n // we carefully check the opening tag to see if it truly\n // is a tag and not a false positive\n 'on:begin': XML_TAG.isTrulyOpeningTag,\n end: XML_TAG.end\n }\n ],\n subLanguage: 'xml',\n contains: [\n {\n begin: XML_TAG.begin,\n end: XML_TAG.end,\n skip: true,\n contains: ['self']\n }\n ]\n }\n ],\n relevance: 0\n },\n {\n className: 'function',\n beginKeywords: 'function',\n end: /[{;]/,\n excludeEnd: true,\n keywords: KEYWORDS$1,\n contains: [\n 'self',\n hljs.inherit(hljs.TITLE_MODE, { begin: IDENT_RE$1 }),\n PARAMS\n ],\n illegal: /%/\n },\n {\n // prevent this from getting swallowed up by function\n // since they appear \"function like\"\n beginKeywords: \"while if switch catch for\"\n },\n {\n className: 'function',\n // we have to count the parens to make sure we actually have the correct\n // bounding ( ). There could be any number of sub-expressions inside\n // also surrounded by parens.\n begin: hljs.UNDERSCORE_IDENT_RE +\n '\\\\(' + // first parens\n '[^()]*(\\\\(' +\n '[^()]*(\\\\(' +\n '[^()]*' +\n '\\\\)[^()]*)*' +\n '\\\\)[^()]*)*' +\n '\\\\)\\\\s*\\\\{', // end parens\n returnBegin:true,\n contains: [\n PARAMS,\n hljs.inherit(hljs.TITLE_MODE, { begin: IDENT_RE$1 }),\n ]\n },\n // hack: prevents detection of keywords in some circumstances\n // .keyword()\n // $keyword = x\n {\n variants: [\n { begin: '\\\\.' + IDENT_RE$1 },\n { begin: '\\\\$' + IDENT_RE$1 }\n ],\n relevance: 0\n },\n { // ES6 class\n className: 'class',\n beginKeywords: 'class',\n end: /[{;=]/,\n excludeEnd: true,\n illegal: /[:\"[\\]]/,\n contains: [\n { beginKeywords: 'extends' },\n hljs.UNDERSCORE_TITLE_MODE\n ]\n },\n {\n begin: /\\b(?=constructor)/,\n end: /[{;]/,\n excludeEnd: true,\n contains: [\n hljs.inherit(hljs.TITLE_MODE, { begin: IDENT_RE$1 }),\n 'self',\n PARAMS\n ]\n },\n {\n begin: '(get|set)\\\\s+(?=' + IDENT_RE$1 + '\\\\()',\n end: /\\{/,\n keywords: \"get set\",\n contains: [\n hljs.inherit(hljs.TITLE_MODE, { begin: IDENT_RE$1 }),\n { begin: /\\(\\)/ }, // eat to avoid empty params\n PARAMS\n ]\n },\n {\n begin: /\\$[(.]/ // relevance booster for a pattern common to JS libs: `$(something)` and `$.something`\n }\n ]\n };\n}", "title": "" }, { "docid": "3b1c2325b2831bfc0e3b92ebbd54dbc5", "score": "0.4789842", "text": "function javascript(hljs) {\n /**\n * Takes a string like \"<Booger\" and checks to see\n * if we can find a matching \"</Booger\" later in the\n * content.\n * @param {RegExpMatchArray} match\n * @param {{after:number}} param1\n */\n const hasClosingTag = (match, { after }) => {\n const tag = \"</\" + match[0].slice(1);\n const pos = match.input.indexOf(tag, after);\n return pos !== -1;\n };\n\n const IDENT_RE$1 = IDENT_RE;\n const FRAGMENT = {\n begin: '<>',\n end: '</>'\n };\n const XML_TAG = {\n begin: /<[A-Za-z0-9\\\\._:-]+/,\n end: /\\/[A-Za-z0-9\\\\._:-]+>|\\/>/,\n /**\n * @param {RegExpMatchArray} match\n * @param {CallbackResponse} response\n */\n isTrulyOpeningTag: (match, response) => {\n const afterMatchIndex = match[0].length + match.index;\n const nextChar = match.input[afterMatchIndex];\n // nested type?\n // HTML should not include another raw `<` inside a tag\n // But a type might: `<Array<Array<number>>`, etc.\n if (nextChar === \"<\") {\n response.ignoreMatch();\n return;\n }\n // <something>\n // This is now either a tag or a type.\n if (nextChar === \">\") {\n // if we cannot find a matching closing tag, then we\n // will ignore it\n if (!hasClosingTag(match, { after: afterMatchIndex })) {\n response.ignoreMatch();\n }\n }\n }\n };\n const KEYWORDS$1 = {\n $pattern: IDENT_RE,\n keyword: KEYWORDS.join(\" \"),\n literal: LITERALS.join(\" \"),\n built_in: BUILT_INS.join(\" \")\n };\n\n // https://tc39.es/ecma262/#sec-literals-numeric-literals\n const decimalDigits = '[0-9](_?[0-9])*';\n const frac = `\\\\.(${decimalDigits})`;\n // DecimalIntegerLiteral, including Annex B NonOctalDecimalIntegerLiteral\n // https://tc39.es/ecma262/#sec-additional-syntax-numeric-literals\n const decimalInteger = `0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`;\n const NUMBER = {\n className: 'number',\n variants: [\n // DecimalLiteral\n { begin: `(\\\\b(${decimalInteger})((${frac})|\\\\.)?|(${frac}))` +\n `[eE][+-]?(${decimalDigits})\\\\b` },\n { begin: `\\\\b(${decimalInteger})\\\\b((${frac})\\\\b|\\\\.)?|(${frac})\\\\b` },\n\n // DecimalBigIntegerLiteral\n { begin: `\\\\b(0|[1-9](_?[0-9])*)n\\\\b` },\n\n // NonDecimalIntegerLiteral\n { begin: \"\\\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\\\b\" },\n { begin: \"\\\\b0[bB][0-1](_?[0-1])*n?\\\\b\" },\n { begin: \"\\\\b0[oO][0-7](_?[0-7])*n?\\\\b\" },\n\n // LegacyOctalIntegerLiteral (does not include underscore separators)\n // https://tc39.es/ecma262/#sec-additional-syntax-numeric-literals\n { begin: \"\\\\b0[0-7]+n?\\\\b\" },\n ],\n relevance: 0\n };\n\n const SUBST = {\n className: 'subst',\n begin: '\\\\$\\\\{',\n end: '\\\\}',\n keywords: KEYWORDS$1,\n contains: [] // defined later\n };\n const HTML_TEMPLATE = {\n begin: 'html`',\n end: '',\n starts: {\n end: '`',\n returnEnd: false,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n SUBST\n ],\n subLanguage: 'xml'\n }\n };\n const CSS_TEMPLATE = {\n begin: 'css`',\n end: '',\n starts: {\n end: '`',\n returnEnd: false,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n SUBST\n ],\n subLanguage: 'css'\n }\n };\n const TEMPLATE_STRING = {\n className: 'string',\n begin: '`',\n end: '`',\n contains: [\n hljs.BACKSLASH_ESCAPE,\n SUBST\n ]\n };\n const JSDOC_COMMENT = 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$1 + '(?=\\\\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 const COMMENT = {\n className: \"comment\",\n variants: [\n JSDOC_COMMENT,\n hljs.C_BLOCK_COMMENT_MODE,\n hljs.C_LINE_COMMENT_MODE\n ]\n };\n const SUBST_INTERNALS = [\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 SUBST.contains = SUBST_INTERNALS\n .concat({\n // we need to pair up {} inside our subst to prevent\n // it from ending too early by matching another }\n begin: /\\{/,\n end: /\\}/,\n keywords: KEYWORDS$1,\n contains: [\n \"self\"\n ].concat(SUBST_INTERNALS)\n });\n const SUBST_AND_COMMENTS = [].concat(COMMENT, SUBST.contains);\n const PARAMS_CONTAINS = SUBST_AND_COMMENTS.concat([\n // eat recursive parens in sub expressions\n {\n begin: /\\(/,\n end: /\\)/,\n keywords: KEYWORDS$1,\n contains: [\"self\"].concat(SUBST_AND_COMMENTS)\n }\n ]);\n const PARAMS = {\n className: 'params',\n begin: /\\(/,\n end: /\\)/,\n excludeBegin: true,\n excludeEnd: true,\n keywords: KEYWORDS$1,\n contains: PARAMS_CONTAINS\n };\n\n return {\n name: 'Javascript',\n aliases: ['js', 'jsx', 'mjs', 'cjs'],\n keywords: KEYWORDS$1,\n // this will be extended by TypeScript\n exports: { PARAMS_CONTAINS },\n illegal: /#(?![$_A-z])/,\n contains: [\n hljs.SHEBANG({\n label: \"shebang\",\n binary: \"node\",\n relevance: 5\n }),\n {\n label: \"use_strict\",\n className: 'meta',\n relevance: 10,\n begin: /^\\s*['\"]use (strict|asm)['\"]/\n },\n hljs.APOS_STRING_MODE,\n hljs.QUOTE_STRING_MODE,\n HTML_TEMPLATE,\n CSS_TEMPLATE,\n TEMPLATE_STRING,\n COMMENT,\n NUMBER,\n { // object attr container\n begin: concat(/[{,\\n]\\s*/,\n // we need to look ahead to make sure that we actually have an\n // attribute coming up so we don't steal a comma from a potential\n // \"value\" container\n //\n // NOTE: this might not work how you think. We don't actually always\n // enter this mode and stay. Instead it might merely match `,\n // <comments up next>` and then immediately end after the , because it\n // fails to find any actual attrs. But this still does the job because\n // it prevents the value contain rule from grabbing this instead and\n // prevening this rule from firing when we actually DO have keys.\n lookahead(concat(\n // we also need to allow for multiple possible comments inbetween\n // the first key:value pairing\n /(((\\/\\/.*$)|(\\/\\*(\\*[^/]|[^*])*\\*\\/))\\s*)*/,\n IDENT_RE$1 + '\\\\s*:'))),\n relevance: 0,\n contains: [\n {\n className: 'attr',\n begin: IDENT_RE$1 + lookahead('\\\\s*:'),\n 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 COMMENT,\n hljs.REGEXP_MODE,\n {\n className: 'function',\n // we have to count the parens to make sure we actually have the\n // correct bounding ( ) before the =>. There could be any number of\n // sub-expressions inside also surrounded by parens.\n begin: '(\\\\(' +\n '[^()]*(\\\\(' +\n '[^()]*(\\\\(' +\n '[^()]*' +\n '\\\\)[^()]*)*' +\n '\\\\)[^()]*)*' +\n '\\\\)|' + hljs.UNDERSCORE_IDENT_RE + ')\\\\s*=>',\n returnBegin: true,\n end: '\\\\s*=>',\n contains: [\n {\n className: 'params',\n variants: [\n {\n begin: hljs.UNDERSCORE_IDENT_RE,\n relevance: 0\n },\n {\n className: null,\n begin: /\\(\\s*\\)/,\n skip: true\n },\n {\n begin: /\\(/,\n end: /\\)/,\n excludeBegin: true,\n excludeEnd: true,\n keywords: KEYWORDS$1,\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 {\n begin: XML_TAG.begin,\n // we carefully check the opening tag to see if it truly\n // is a tag and not a false positive\n 'on:begin': XML_TAG.isTrulyOpeningTag,\n end: XML_TAG.end\n }\n ],\n subLanguage: 'xml',\n contains: [\n {\n begin: XML_TAG.begin,\n end: XML_TAG.end,\n skip: true,\n contains: ['self']\n }\n ]\n }\n ],\n relevance: 0\n },\n {\n className: 'function',\n beginKeywords: 'function',\n end: /[{;]/,\n excludeEnd: true,\n keywords: KEYWORDS$1,\n contains: [\n 'self',\n hljs.inherit(hljs.TITLE_MODE, { begin: IDENT_RE$1 }),\n PARAMS\n ],\n illegal: /%/\n },\n {\n // prevent this from getting swallowed up by function\n // since they appear \"function like\"\n beginKeywords: \"while if switch catch for\"\n },\n {\n className: 'function',\n // we have to count the parens to make sure we actually have the correct\n // bounding ( ). There could be any number of sub-expressions inside\n // also surrounded by parens.\n begin: hljs.UNDERSCORE_IDENT_RE +\n '\\\\(' + // first parens\n '[^()]*(\\\\(' +\n '[^()]*(\\\\(' +\n '[^()]*' +\n '\\\\)[^()]*)*' +\n '\\\\)[^()]*)*' +\n '\\\\)\\\\s*\\\\{', // end parens\n returnBegin:true,\n contains: [\n PARAMS,\n hljs.inherit(hljs.TITLE_MODE, { begin: IDENT_RE$1 }),\n ]\n },\n // hack: prevents detection of keywords in some circumstances\n // .keyword()\n // $keyword = x\n {\n variants: [\n { begin: '\\\\.' + IDENT_RE$1 },\n { begin: '\\\\$' + IDENT_RE$1 }\n ],\n relevance: 0\n },\n { // ES6 class\n className: 'class',\n beginKeywords: 'class',\n end: /[{;=]/,\n excludeEnd: true,\n illegal: /[:\"[\\]]/,\n contains: [\n { beginKeywords: 'extends' },\n hljs.UNDERSCORE_TITLE_MODE\n ]\n },\n {\n begin: /\\b(?=constructor)/,\n end: /[{;]/,\n excludeEnd: true,\n contains: [\n hljs.inherit(hljs.TITLE_MODE, { begin: IDENT_RE$1 }),\n 'self',\n PARAMS\n ]\n },\n {\n begin: '(get|set)\\\\s+(?=' + IDENT_RE$1 + '\\\\()',\n end: /\\{/,\n keywords: \"get set\",\n contains: [\n hljs.inherit(hljs.TITLE_MODE, { begin: IDENT_RE$1 }),\n { begin: /\\(\\)/ }, // eat to avoid empty params\n PARAMS\n ]\n },\n {\n begin: /\\$[(.]/ // relevance booster for a pattern common to JS libs: `$(something)` and `$.something`\n }\n ]\n };\n}", "title": "" }, { "docid": "3b1c2325b2831bfc0e3b92ebbd54dbc5", "score": "0.4789842", "text": "function javascript(hljs) {\n /**\n * Takes a string like \"<Booger\" and checks to see\n * if we can find a matching \"</Booger\" later in the\n * content.\n * @param {RegExpMatchArray} match\n * @param {{after:number}} param1\n */\n const hasClosingTag = (match, { after }) => {\n const tag = \"</\" + match[0].slice(1);\n const pos = match.input.indexOf(tag, after);\n return pos !== -1;\n };\n\n const IDENT_RE$1 = IDENT_RE;\n const FRAGMENT = {\n begin: '<>',\n end: '</>'\n };\n const XML_TAG = {\n begin: /<[A-Za-z0-9\\\\._:-]+/,\n end: /\\/[A-Za-z0-9\\\\._:-]+>|\\/>/,\n /**\n * @param {RegExpMatchArray} match\n * @param {CallbackResponse} response\n */\n isTrulyOpeningTag: (match, response) => {\n const afterMatchIndex = match[0].length + match.index;\n const nextChar = match.input[afterMatchIndex];\n // nested type?\n // HTML should not include another raw `<` inside a tag\n // But a type might: `<Array<Array<number>>`, etc.\n if (nextChar === \"<\") {\n response.ignoreMatch();\n return;\n }\n // <something>\n // This is now either a tag or a type.\n if (nextChar === \">\") {\n // if we cannot find a matching closing tag, then we\n // will ignore it\n if (!hasClosingTag(match, { after: afterMatchIndex })) {\n response.ignoreMatch();\n }\n }\n }\n };\n const KEYWORDS$1 = {\n $pattern: IDENT_RE,\n keyword: KEYWORDS.join(\" \"),\n literal: LITERALS.join(\" \"),\n built_in: BUILT_INS.join(\" \")\n };\n\n // https://tc39.es/ecma262/#sec-literals-numeric-literals\n const decimalDigits = '[0-9](_?[0-9])*';\n const frac = `\\\\.(${decimalDigits})`;\n // DecimalIntegerLiteral, including Annex B NonOctalDecimalIntegerLiteral\n // https://tc39.es/ecma262/#sec-additional-syntax-numeric-literals\n const decimalInteger = `0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`;\n const NUMBER = {\n className: 'number',\n variants: [\n // DecimalLiteral\n { begin: `(\\\\b(${decimalInteger})((${frac})|\\\\.)?|(${frac}))` +\n `[eE][+-]?(${decimalDigits})\\\\b` },\n { begin: `\\\\b(${decimalInteger})\\\\b((${frac})\\\\b|\\\\.)?|(${frac})\\\\b` },\n\n // DecimalBigIntegerLiteral\n { begin: `\\\\b(0|[1-9](_?[0-9])*)n\\\\b` },\n\n // NonDecimalIntegerLiteral\n { begin: \"\\\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\\\b\" },\n { begin: \"\\\\b0[bB][0-1](_?[0-1])*n?\\\\b\" },\n { begin: \"\\\\b0[oO][0-7](_?[0-7])*n?\\\\b\" },\n\n // LegacyOctalIntegerLiteral (does not include underscore separators)\n // https://tc39.es/ecma262/#sec-additional-syntax-numeric-literals\n { begin: \"\\\\b0[0-7]+n?\\\\b\" },\n ],\n relevance: 0\n };\n\n const SUBST = {\n className: 'subst',\n begin: '\\\\$\\\\{',\n end: '\\\\}',\n keywords: KEYWORDS$1,\n contains: [] // defined later\n };\n const HTML_TEMPLATE = {\n begin: 'html`',\n end: '',\n starts: {\n end: '`',\n returnEnd: false,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n SUBST\n ],\n subLanguage: 'xml'\n }\n };\n const CSS_TEMPLATE = {\n begin: 'css`',\n end: '',\n starts: {\n end: '`',\n returnEnd: false,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n SUBST\n ],\n subLanguage: 'css'\n }\n };\n const TEMPLATE_STRING = {\n className: 'string',\n begin: '`',\n end: '`',\n contains: [\n hljs.BACKSLASH_ESCAPE,\n SUBST\n ]\n };\n const JSDOC_COMMENT = 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$1 + '(?=\\\\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 const COMMENT = {\n className: \"comment\",\n variants: [\n JSDOC_COMMENT,\n hljs.C_BLOCK_COMMENT_MODE,\n hljs.C_LINE_COMMENT_MODE\n ]\n };\n const SUBST_INTERNALS = [\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 SUBST.contains = SUBST_INTERNALS\n .concat({\n // we need to pair up {} inside our subst to prevent\n // it from ending too early by matching another }\n begin: /\\{/,\n end: /\\}/,\n keywords: KEYWORDS$1,\n contains: [\n \"self\"\n ].concat(SUBST_INTERNALS)\n });\n const SUBST_AND_COMMENTS = [].concat(COMMENT, SUBST.contains);\n const PARAMS_CONTAINS = SUBST_AND_COMMENTS.concat([\n // eat recursive parens in sub expressions\n {\n begin: /\\(/,\n end: /\\)/,\n keywords: KEYWORDS$1,\n contains: [\"self\"].concat(SUBST_AND_COMMENTS)\n }\n ]);\n const PARAMS = {\n className: 'params',\n begin: /\\(/,\n end: /\\)/,\n excludeBegin: true,\n excludeEnd: true,\n keywords: KEYWORDS$1,\n contains: PARAMS_CONTAINS\n };\n\n return {\n name: 'Javascript',\n aliases: ['js', 'jsx', 'mjs', 'cjs'],\n keywords: KEYWORDS$1,\n // this will be extended by TypeScript\n exports: { PARAMS_CONTAINS },\n illegal: /#(?![$_A-z])/,\n contains: [\n hljs.SHEBANG({\n label: \"shebang\",\n binary: \"node\",\n relevance: 5\n }),\n {\n label: \"use_strict\",\n className: 'meta',\n relevance: 10,\n begin: /^\\s*['\"]use (strict|asm)['\"]/\n },\n hljs.APOS_STRING_MODE,\n hljs.QUOTE_STRING_MODE,\n HTML_TEMPLATE,\n CSS_TEMPLATE,\n TEMPLATE_STRING,\n COMMENT,\n NUMBER,\n { // object attr container\n begin: concat(/[{,\\n]\\s*/,\n // we need to look ahead to make sure that we actually have an\n // attribute coming up so we don't steal a comma from a potential\n // \"value\" container\n //\n // NOTE: this might not work how you think. We don't actually always\n // enter this mode and stay. Instead it might merely match `,\n // <comments up next>` and then immediately end after the , because it\n // fails to find any actual attrs. But this still does the job because\n // it prevents the value contain rule from grabbing this instead and\n // prevening this rule from firing when we actually DO have keys.\n lookahead(concat(\n // we also need to allow for multiple possible comments inbetween\n // the first key:value pairing\n /(((\\/\\/.*$)|(\\/\\*(\\*[^/]|[^*])*\\*\\/))\\s*)*/,\n IDENT_RE$1 + '\\\\s*:'))),\n relevance: 0,\n contains: [\n {\n className: 'attr',\n begin: IDENT_RE$1 + lookahead('\\\\s*:'),\n 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 COMMENT,\n hljs.REGEXP_MODE,\n {\n className: 'function',\n // we have to count the parens to make sure we actually have the\n // correct bounding ( ) before the =>. There could be any number of\n // sub-expressions inside also surrounded by parens.\n begin: '(\\\\(' +\n '[^()]*(\\\\(' +\n '[^()]*(\\\\(' +\n '[^()]*' +\n '\\\\)[^()]*)*' +\n '\\\\)[^()]*)*' +\n '\\\\)|' + hljs.UNDERSCORE_IDENT_RE + ')\\\\s*=>',\n returnBegin: true,\n end: '\\\\s*=>',\n contains: [\n {\n className: 'params',\n variants: [\n {\n begin: hljs.UNDERSCORE_IDENT_RE,\n relevance: 0\n },\n {\n className: null,\n begin: /\\(\\s*\\)/,\n skip: true\n },\n {\n begin: /\\(/,\n end: /\\)/,\n excludeBegin: true,\n excludeEnd: true,\n keywords: KEYWORDS$1,\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 {\n begin: XML_TAG.begin,\n // we carefully check the opening tag to see if it truly\n // is a tag and not a false positive\n 'on:begin': XML_TAG.isTrulyOpeningTag,\n end: XML_TAG.end\n }\n ],\n subLanguage: 'xml',\n contains: [\n {\n begin: XML_TAG.begin,\n end: XML_TAG.end,\n skip: true,\n contains: ['self']\n }\n ]\n }\n ],\n relevance: 0\n },\n {\n className: 'function',\n beginKeywords: 'function',\n end: /[{;]/,\n excludeEnd: true,\n keywords: KEYWORDS$1,\n contains: [\n 'self',\n hljs.inherit(hljs.TITLE_MODE, { begin: IDENT_RE$1 }),\n PARAMS\n ],\n illegal: /%/\n },\n {\n // prevent this from getting swallowed up by function\n // since they appear \"function like\"\n beginKeywords: \"while if switch catch for\"\n },\n {\n className: 'function',\n // we have to count the parens to make sure we actually have the correct\n // bounding ( ). There could be any number of sub-expressions inside\n // also surrounded by parens.\n begin: hljs.UNDERSCORE_IDENT_RE +\n '\\\\(' + // first parens\n '[^()]*(\\\\(' +\n '[^()]*(\\\\(' +\n '[^()]*' +\n '\\\\)[^()]*)*' +\n '\\\\)[^()]*)*' +\n '\\\\)\\\\s*\\\\{', // end parens\n returnBegin:true,\n contains: [\n PARAMS,\n hljs.inherit(hljs.TITLE_MODE, { begin: IDENT_RE$1 }),\n ]\n },\n // hack: prevents detection of keywords in some circumstances\n // .keyword()\n // $keyword = x\n {\n variants: [\n { begin: '\\\\.' + IDENT_RE$1 },\n { begin: '\\\\$' + IDENT_RE$1 }\n ],\n relevance: 0\n },\n { // ES6 class\n className: 'class',\n beginKeywords: 'class',\n end: /[{;=]/,\n excludeEnd: true,\n illegal: /[:\"[\\]]/,\n contains: [\n { beginKeywords: 'extends' },\n hljs.UNDERSCORE_TITLE_MODE\n ]\n },\n {\n begin: /\\b(?=constructor)/,\n end: /[{;]/,\n excludeEnd: true,\n contains: [\n hljs.inherit(hljs.TITLE_MODE, { begin: IDENT_RE$1 }),\n 'self',\n PARAMS\n ]\n },\n {\n begin: '(get|set)\\\\s+(?=' + IDENT_RE$1 + '\\\\()',\n end: /\\{/,\n keywords: \"get set\",\n contains: [\n hljs.inherit(hljs.TITLE_MODE, { begin: IDENT_RE$1 }),\n { begin: /\\(\\)/ }, // eat to avoid empty params\n PARAMS\n ]\n },\n {\n begin: /\\$[(.]/ // relevance booster for a pattern common to JS libs: `$(something)` and `$.something`\n }\n ]\n };\n}", "title": "" }, { "docid": "3b1c2325b2831bfc0e3b92ebbd54dbc5", "score": "0.4789842", "text": "function javascript(hljs) {\n /**\n * Takes a string like \"<Booger\" and checks to see\n * if we can find a matching \"</Booger\" later in the\n * content.\n * @param {RegExpMatchArray} match\n * @param {{after:number}} param1\n */\n const hasClosingTag = (match, { after }) => {\n const tag = \"</\" + match[0].slice(1);\n const pos = match.input.indexOf(tag, after);\n return pos !== -1;\n };\n\n const IDENT_RE$1 = IDENT_RE;\n const FRAGMENT = {\n begin: '<>',\n end: '</>'\n };\n const XML_TAG = {\n begin: /<[A-Za-z0-9\\\\._:-]+/,\n end: /\\/[A-Za-z0-9\\\\._:-]+>|\\/>/,\n /**\n * @param {RegExpMatchArray} match\n * @param {CallbackResponse} response\n */\n isTrulyOpeningTag: (match, response) => {\n const afterMatchIndex = match[0].length + match.index;\n const nextChar = match.input[afterMatchIndex];\n // nested type?\n // HTML should not include another raw `<` inside a tag\n // But a type might: `<Array<Array<number>>`, etc.\n if (nextChar === \"<\") {\n response.ignoreMatch();\n return;\n }\n // <something>\n // This is now either a tag or a type.\n if (nextChar === \">\") {\n // if we cannot find a matching closing tag, then we\n // will ignore it\n if (!hasClosingTag(match, { after: afterMatchIndex })) {\n response.ignoreMatch();\n }\n }\n }\n };\n const KEYWORDS$1 = {\n $pattern: IDENT_RE,\n keyword: KEYWORDS.join(\" \"),\n literal: LITERALS.join(\" \"),\n built_in: BUILT_INS.join(\" \")\n };\n\n // https://tc39.es/ecma262/#sec-literals-numeric-literals\n const decimalDigits = '[0-9](_?[0-9])*';\n const frac = `\\\\.(${decimalDigits})`;\n // DecimalIntegerLiteral, including Annex B NonOctalDecimalIntegerLiteral\n // https://tc39.es/ecma262/#sec-additional-syntax-numeric-literals\n const decimalInteger = `0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`;\n const NUMBER = {\n className: 'number',\n variants: [\n // DecimalLiteral\n { begin: `(\\\\b(${decimalInteger})((${frac})|\\\\.)?|(${frac}))` +\n `[eE][+-]?(${decimalDigits})\\\\b` },\n { begin: `\\\\b(${decimalInteger})\\\\b((${frac})\\\\b|\\\\.)?|(${frac})\\\\b` },\n\n // DecimalBigIntegerLiteral\n { begin: `\\\\b(0|[1-9](_?[0-9])*)n\\\\b` },\n\n // NonDecimalIntegerLiteral\n { begin: \"\\\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\\\b\" },\n { begin: \"\\\\b0[bB][0-1](_?[0-1])*n?\\\\b\" },\n { begin: \"\\\\b0[oO][0-7](_?[0-7])*n?\\\\b\" },\n\n // LegacyOctalIntegerLiteral (does not include underscore separators)\n // https://tc39.es/ecma262/#sec-additional-syntax-numeric-literals\n { begin: \"\\\\b0[0-7]+n?\\\\b\" },\n ],\n relevance: 0\n };\n\n const SUBST = {\n className: 'subst',\n begin: '\\\\$\\\\{',\n end: '\\\\}',\n keywords: KEYWORDS$1,\n contains: [] // defined later\n };\n const HTML_TEMPLATE = {\n begin: 'html`',\n end: '',\n starts: {\n end: '`',\n returnEnd: false,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n SUBST\n ],\n subLanguage: 'xml'\n }\n };\n const CSS_TEMPLATE = {\n begin: 'css`',\n end: '',\n starts: {\n end: '`',\n returnEnd: false,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n SUBST\n ],\n subLanguage: 'css'\n }\n };\n const TEMPLATE_STRING = {\n className: 'string',\n begin: '`',\n end: '`',\n contains: [\n hljs.BACKSLASH_ESCAPE,\n SUBST\n ]\n };\n const JSDOC_COMMENT = 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$1 + '(?=\\\\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 const COMMENT = {\n className: \"comment\",\n variants: [\n JSDOC_COMMENT,\n hljs.C_BLOCK_COMMENT_MODE,\n hljs.C_LINE_COMMENT_MODE\n ]\n };\n const SUBST_INTERNALS = [\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 SUBST.contains = SUBST_INTERNALS\n .concat({\n // we need to pair up {} inside our subst to prevent\n // it from ending too early by matching another }\n begin: /\\{/,\n end: /\\}/,\n keywords: KEYWORDS$1,\n contains: [\n \"self\"\n ].concat(SUBST_INTERNALS)\n });\n const SUBST_AND_COMMENTS = [].concat(COMMENT, SUBST.contains);\n const PARAMS_CONTAINS = SUBST_AND_COMMENTS.concat([\n // eat recursive parens in sub expressions\n {\n begin: /\\(/,\n end: /\\)/,\n keywords: KEYWORDS$1,\n contains: [\"self\"].concat(SUBST_AND_COMMENTS)\n }\n ]);\n const PARAMS = {\n className: 'params',\n begin: /\\(/,\n end: /\\)/,\n excludeBegin: true,\n excludeEnd: true,\n keywords: KEYWORDS$1,\n contains: PARAMS_CONTAINS\n };\n\n return {\n name: 'Javascript',\n aliases: ['js', 'jsx', 'mjs', 'cjs'],\n keywords: KEYWORDS$1,\n // this will be extended by TypeScript\n exports: { PARAMS_CONTAINS },\n illegal: /#(?![$_A-z])/,\n contains: [\n hljs.SHEBANG({\n label: \"shebang\",\n binary: \"node\",\n relevance: 5\n }),\n {\n label: \"use_strict\",\n className: 'meta',\n relevance: 10,\n begin: /^\\s*['\"]use (strict|asm)['\"]/\n },\n hljs.APOS_STRING_MODE,\n hljs.QUOTE_STRING_MODE,\n HTML_TEMPLATE,\n CSS_TEMPLATE,\n TEMPLATE_STRING,\n COMMENT,\n NUMBER,\n { // object attr container\n begin: concat(/[{,\\n]\\s*/,\n // we need to look ahead to make sure that we actually have an\n // attribute coming up so we don't steal a comma from a potential\n // \"value\" container\n //\n // NOTE: this might not work how you think. We don't actually always\n // enter this mode and stay. Instead it might merely match `,\n // <comments up next>` and then immediately end after the , because it\n // fails to find any actual attrs. But this still does the job because\n // it prevents the value contain rule from grabbing this instead and\n // prevening this rule from firing when we actually DO have keys.\n lookahead(concat(\n // we also need to allow for multiple possible comments inbetween\n // the first key:value pairing\n /(((\\/\\/.*$)|(\\/\\*(\\*[^/]|[^*])*\\*\\/))\\s*)*/,\n IDENT_RE$1 + '\\\\s*:'))),\n relevance: 0,\n contains: [\n {\n className: 'attr',\n begin: IDENT_RE$1 + lookahead('\\\\s*:'),\n 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 COMMENT,\n hljs.REGEXP_MODE,\n {\n className: 'function',\n // we have to count the parens to make sure we actually have the\n // correct bounding ( ) before the =>. There could be any number of\n // sub-expressions inside also surrounded by parens.\n begin: '(\\\\(' +\n '[^()]*(\\\\(' +\n '[^()]*(\\\\(' +\n '[^()]*' +\n '\\\\)[^()]*)*' +\n '\\\\)[^()]*)*' +\n '\\\\)|' + hljs.UNDERSCORE_IDENT_RE + ')\\\\s*=>',\n returnBegin: true,\n end: '\\\\s*=>',\n contains: [\n {\n className: 'params',\n variants: [\n {\n begin: hljs.UNDERSCORE_IDENT_RE,\n relevance: 0\n },\n {\n className: null,\n begin: /\\(\\s*\\)/,\n skip: true\n },\n {\n begin: /\\(/,\n end: /\\)/,\n excludeBegin: true,\n excludeEnd: true,\n keywords: KEYWORDS$1,\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 {\n begin: XML_TAG.begin,\n // we carefully check the opening tag to see if it truly\n // is a tag and not a false positive\n 'on:begin': XML_TAG.isTrulyOpeningTag,\n end: XML_TAG.end\n }\n ],\n subLanguage: 'xml',\n contains: [\n {\n begin: XML_TAG.begin,\n end: XML_TAG.end,\n skip: true,\n contains: ['self']\n }\n ]\n }\n ],\n relevance: 0\n },\n {\n className: 'function',\n beginKeywords: 'function',\n end: /[{;]/,\n excludeEnd: true,\n keywords: KEYWORDS$1,\n contains: [\n 'self',\n hljs.inherit(hljs.TITLE_MODE, { begin: IDENT_RE$1 }),\n PARAMS\n ],\n illegal: /%/\n },\n {\n // prevent this from getting swallowed up by function\n // since they appear \"function like\"\n beginKeywords: \"while if switch catch for\"\n },\n {\n className: 'function',\n // we have to count the parens to make sure we actually have the correct\n // bounding ( ). There could be any number of sub-expressions inside\n // also surrounded by parens.\n begin: hljs.UNDERSCORE_IDENT_RE +\n '\\\\(' + // first parens\n '[^()]*(\\\\(' +\n '[^()]*(\\\\(' +\n '[^()]*' +\n '\\\\)[^()]*)*' +\n '\\\\)[^()]*)*' +\n '\\\\)\\\\s*\\\\{', // end parens\n returnBegin:true,\n contains: [\n PARAMS,\n hljs.inherit(hljs.TITLE_MODE, { begin: IDENT_RE$1 }),\n ]\n },\n // hack: prevents detection of keywords in some circumstances\n // .keyword()\n // $keyword = x\n {\n variants: [\n { begin: '\\\\.' + IDENT_RE$1 },\n { begin: '\\\\$' + IDENT_RE$1 }\n ],\n relevance: 0\n },\n { // ES6 class\n className: 'class',\n beginKeywords: 'class',\n end: /[{;=]/,\n excludeEnd: true,\n illegal: /[:\"[\\]]/,\n contains: [\n { beginKeywords: 'extends' },\n hljs.UNDERSCORE_TITLE_MODE\n ]\n },\n {\n begin: /\\b(?=constructor)/,\n end: /[{;]/,\n excludeEnd: true,\n contains: [\n hljs.inherit(hljs.TITLE_MODE, { begin: IDENT_RE$1 }),\n 'self',\n PARAMS\n ]\n },\n {\n begin: '(get|set)\\\\s+(?=' + IDENT_RE$1 + '\\\\()',\n end: /\\{/,\n keywords: \"get set\",\n contains: [\n hljs.inherit(hljs.TITLE_MODE, { begin: IDENT_RE$1 }),\n { begin: /\\(\\)/ }, // eat to avoid empty params\n PARAMS\n ]\n },\n {\n begin: /\\$[(.]/ // relevance booster for a pattern common to JS libs: `$(something)` and `$.something`\n }\n ]\n };\n}", "title": "" }, { "docid": "cb2482dc6084abbf1099b3f028fec198", "score": "0.47845104", "text": "function javascript(hljs) {\n /**\n * Takes a string like \"<Booger\" and checks to see\n * if we can find a matching \"</Booger\" later in the\n * content.\n * @param {RegExpMatchArray} match\n * @param {{after:number}} param1\n */\n const hasClosingTag = (match, { after }) => {\n const tag = \"</\" + match[0].slice(1);\n const pos = match.input.indexOf(tag, after);\n return pos !== -1;\n };\n\n const IDENT_RE$1 = IDENT_RE;\n const FRAGMENT = {\n begin: '<>',\n end: '</>'\n };\n const XML_TAG = {\n begin: /<[A-Za-z0-9\\\\._:-]+/,\n end: /\\/[A-Za-z0-9\\\\._:-]+>|\\/>/,\n /**\n * @param {RegExpMatchArray} match\n * @param {CallbackResponse} response\n */\n isTrulyOpeningTag: (match, response) => {\n const afterMatchIndex = match[0].length + match.index;\n const nextChar = match.input[afterMatchIndex];\n // nested type?\n // HTML should not include another raw `<` inside a tag\n // But a type might: `<Array<Array<number>>`, etc.\n if (nextChar === \"<\") {\n response.ignoreMatch();\n return;\n }\n // <something>\n // This is now either a tag or a type.\n if (nextChar === \">\") {\n // if we cannot find a matching closing tag, then we\n // will ignore it\n if (!hasClosingTag(match, { after: afterMatchIndex })) {\n response.ignoreMatch();\n }\n }\n }\n };\n const KEYWORDS$1 = {\n $pattern: IDENT_RE,\n keyword: KEYWORDS,\n literal: LITERALS,\n built_in: BUILT_INS\n };\n\n // https://tc39.es/ecma262/#sec-literals-numeric-literals\n const decimalDigits = '[0-9](_?[0-9])*';\n const frac = `\\\\.(${decimalDigits})`;\n // DecimalIntegerLiteral, including Annex B NonOctalDecimalIntegerLiteral\n // https://tc39.es/ecma262/#sec-additional-syntax-numeric-literals\n const decimalInteger = `0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`;\n const NUMBER = {\n className: 'number',\n variants: [\n // DecimalLiteral\n { begin: `(\\\\b(${decimalInteger})((${frac})|\\\\.)?|(${frac}))` +\n `[eE][+-]?(${decimalDigits})\\\\b` },\n { begin: `\\\\b(${decimalInteger})\\\\b((${frac})\\\\b|\\\\.)?|(${frac})\\\\b` },\n\n // DecimalBigIntegerLiteral\n { begin: `\\\\b(0|[1-9](_?[0-9])*)n\\\\b` },\n\n // NonDecimalIntegerLiteral\n { begin: \"\\\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\\\b\" },\n { begin: \"\\\\b0[bB][0-1](_?[0-1])*n?\\\\b\" },\n { begin: \"\\\\b0[oO][0-7](_?[0-7])*n?\\\\b\" },\n\n // LegacyOctalIntegerLiteral (does not include underscore separators)\n // https://tc39.es/ecma262/#sec-additional-syntax-numeric-literals\n { begin: \"\\\\b0[0-7]+n?\\\\b\" },\n ],\n relevance: 0\n };\n\n const SUBST = {\n className: 'subst',\n begin: '\\\\$\\\\{',\n end: '\\\\}',\n keywords: KEYWORDS$1,\n contains: [] // defined later\n };\n const HTML_TEMPLATE = {\n begin: 'html`',\n end: '',\n starts: {\n end: '`',\n returnEnd: false,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n SUBST\n ],\n subLanguage: 'xml'\n }\n };\n const CSS_TEMPLATE = {\n begin: 'css`',\n end: '',\n starts: {\n end: '`',\n returnEnd: false,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n SUBST\n ],\n subLanguage: 'css'\n }\n };\n const TEMPLATE_STRING = {\n className: 'string',\n begin: '`',\n end: '`',\n contains: [\n hljs.BACKSLASH_ESCAPE,\n SUBST\n ]\n };\n const JSDOC_COMMENT = 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$1 + '(?=\\\\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 const COMMENT = {\n className: \"comment\",\n variants: [\n JSDOC_COMMENT,\n hljs.C_BLOCK_COMMENT_MODE,\n hljs.C_LINE_COMMENT_MODE\n ]\n };\n const SUBST_INTERNALS = [\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 SUBST.contains = SUBST_INTERNALS\n .concat({\n // we need to pair up {} inside our subst to prevent\n // it from ending too early by matching another }\n begin: /\\{/,\n end: /\\}/,\n keywords: KEYWORDS$1,\n contains: [\n \"self\"\n ].concat(SUBST_INTERNALS)\n });\n const SUBST_AND_COMMENTS = [].concat(COMMENT, SUBST.contains);\n const PARAMS_CONTAINS = SUBST_AND_COMMENTS.concat([\n // eat recursive parens in sub expressions\n {\n begin: /\\(/,\n end: /\\)/,\n keywords: KEYWORDS$1,\n contains: [\"self\"].concat(SUBST_AND_COMMENTS)\n }\n ]);\n const PARAMS = {\n className: 'params',\n begin: /\\(/,\n end: /\\)/,\n excludeBegin: true,\n excludeEnd: true,\n keywords: KEYWORDS$1,\n contains: PARAMS_CONTAINS\n };\n\n return {\n name: 'Javascript',\n aliases: ['js', 'jsx', 'mjs', 'cjs'],\n keywords: KEYWORDS$1,\n // this will be extended by TypeScript\n exports: { PARAMS_CONTAINS },\n illegal: /#(?![$_A-z])/,\n contains: [\n hljs.SHEBANG({\n label: \"shebang\",\n binary: \"node\",\n relevance: 5\n }),\n {\n label: \"use_strict\",\n className: 'meta',\n relevance: 10,\n begin: /^\\s*['\"]use (strict|asm)['\"]/\n },\n hljs.APOS_STRING_MODE,\n hljs.QUOTE_STRING_MODE,\n HTML_TEMPLATE,\n CSS_TEMPLATE,\n TEMPLATE_STRING,\n COMMENT,\n NUMBER,\n { // object attr container\n begin: concat$2(/[{,\\n]\\s*/,\n // we need to look ahead to make sure that we actually have an\n // attribute coming up so we don't steal a comma from a potential\n // \"value\" container\n //\n // NOTE: this might not work how you think. We don't actually always\n // enter this mode and stay. Instead it might merely match `,\n // <comments up next>` and then immediately end after the , because it\n // fails to find any actual attrs. But this still does the job because\n // it prevents the value contain rule from grabbing this instead and\n // prevening this rule from firing when we actually DO have keys.\n lookahead(concat$2(\n // we also need to allow for multiple possible comments inbetween\n // the first key:value pairing\n /(((\\/\\/.*$)|(\\/\\*(\\*[^/]|[^*])*\\*\\/))\\s*)*/,\n IDENT_RE$1 + '\\\\s*:'))),\n relevance: 0,\n contains: [\n {\n className: 'attr',\n begin: IDENT_RE$1 + lookahead('\\\\s*:'),\n 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 COMMENT,\n hljs.REGEXP_MODE,\n {\n className: 'function',\n // we have to count the parens to make sure we actually have the\n // correct bounding ( ) before the =>. There could be any number of\n // sub-expressions inside also surrounded by parens.\n begin: '(\\\\(' +\n '[^()]*(\\\\(' +\n '[^()]*(\\\\(' +\n '[^()]*' +\n '\\\\)[^()]*)*' +\n '\\\\)[^()]*)*' +\n '\\\\)|' + hljs.UNDERSCORE_IDENT_RE + ')\\\\s*=>',\n returnBegin: true,\n end: '\\\\s*=>',\n contains: [\n {\n className: 'params',\n variants: [\n {\n begin: hljs.UNDERSCORE_IDENT_RE,\n relevance: 0\n },\n {\n className: null,\n begin: /\\(\\s*\\)/,\n skip: true\n },\n {\n begin: /\\(/,\n end: /\\)/,\n excludeBegin: true,\n excludeEnd: true,\n keywords: KEYWORDS$1,\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 {\n begin: XML_TAG.begin,\n // we carefully check the opening tag to see if it truly\n // is a tag and not a false positive\n 'on:begin': XML_TAG.isTrulyOpeningTag,\n end: XML_TAG.end\n }\n ],\n subLanguage: 'xml',\n contains: [\n {\n begin: XML_TAG.begin,\n end: XML_TAG.end,\n skip: true,\n contains: ['self']\n }\n ]\n }\n ],\n relevance: 0\n },\n {\n className: 'function',\n beginKeywords: 'function',\n end: /[{;]/,\n excludeEnd: true,\n keywords: KEYWORDS$1,\n contains: [\n 'self',\n hljs.inherit(hljs.TITLE_MODE, { begin: IDENT_RE$1 }),\n PARAMS\n ],\n illegal: /%/\n },\n {\n // prevent this from getting swallowed up by function\n // since they appear \"function like\"\n beginKeywords: \"while if switch catch for\"\n },\n {\n className: 'function',\n // we have to count the parens to make sure we actually have the correct\n // bounding ( ). There could be any number of sub-expressions inside\n // also surrounded by parens.\n begin: hljs.UNDERSCORE_IDENT_RE +\n '\\\\(' + // first parens\n '[^()]*(\\\\(' +\n '[^()]*(\\\\(' +\n '[^()]*' +\n '\\\\)[^()]*)*' +\n '\\\\)[^()]*)*' +\n '\\\\)\\\\s*\\\\{', // end parens\n returnBegin:true,\n contains: [\n PARAMS,\n hljs.inherit(hljs.TITLE_MODE, { begin: IDENT_RE$1 }),\n ]\n },\n // hack: prevents detection of keywords in some circumstances\n // .keyword()\n // $keyword = x\n {\n variants: [\n { begin: '\\\\.' + IDENT_RE$1 },\n { begin: '\\\\$' + IDENT_RE$1 }\n ],\n relevance: 0\n },\n { // ES6 class\n className: 'class',\n beginKeywords: 'class',\n end: /[{;=]/,\n excludeEnd: true,\n illegal: /[:\"[\\]]/,\n contains: [\n { beginKeywords: 'extends' },\n hljs.UNDERSCORE_TITLE_MODE\n ]\n },\n {\n begin: /\\b(?=constructor)/,\n end: /[{;]/,\n excludeEnd: true,\n contains: [\n hljs.inherit(hljs.TITLE_MODE, { begin: IDENT_RE$1 }),\n 'self',\n PARAMS\n ]\n },\n {\n begin: '(get|set)\\\\s+(?=' + IDENT_RE$1 + '\\\\()',\n end: /\\{/,\n keywords: \"get set\",\n contains: [\n hljs.inherit(hljs.TITLE_MODE, { begin: IDENT_RE$1 }),\n { begin: /\\(\\)/ }, // eat to avoid empty params\n PARAMS\n ]\n },\n {\n begin: /\\$[(.]/ // relevance booster for a pattern common to JS libs: `$(something)` and `$.something`\n }\n ]\n };\n }", "title": "" }, { "docid": "51fed5df5efa05abe7a820c09d03181f", "score": "0.47810566", "text": "text() {\n const data = this.takeUntil('<');\n return { type: interfaces_1.TokenType.Text, data: data };\n }", "title": "" }, { "docid": "6bf75fd829e37ac0b580cdbeac386d68", "score": "0.47737402", "text": "function expandTemplate(template, context) {\n\treturn Object.keys(context).reduce((acc, key) => acc.replace(new RegExp(`{{${key}}}`, \"g\"), context[key]), template);\n}", "title": "" }, { "docid": "89b5b1e527c1b35521248d38cf318726", "score": "0.47705537", "text": "function prepareTemplate(m, str){\n str = str || '';\n for (var h in m) {\n var rex = new RegExp(h, 'g');\n str = str.replace(rex, m[h]);\n }\n return str.replace(/\\\\u0027/g, \"'\");\n }", "title": "" }, { "docid": "b0929e4a500526a85dc359b40bfb5669", "score": "0.4770065", "text": "function registerHelperEval(hbs){\n hbs.registerHelper('eval', function (expr, options) {\n var reg = new RegExp(\"\\\\${(\\\\S+)}\", \"g\");\n var compiled = expr.replace(reg, function (match, pull) {\n return options.hash[pull];\n });\n var evaluated = eval(compiled);\n return evaluated;\n });\n}", "title": "" }, { "docid": "667a1c2d3041dbbf0d92ab1689541385", "score": "0.476462", "text": "function Templater(html, attributes){\n //One single line and one space only\n html = html.replace(/(?:\\r\\n|\\r|\\n|\\t|\\n\\t| \\n\\t)/g, '');\n html = html.replace(/\\s{2,}/g, ' ');\n\n this.pieces = null;\n this.evalFn = null;\n this.templateHTML = html;\n\n if (html.indexOf('qs-repeat=') !== -1\n || html.indexOf('qs-show=') !== -1\n || html.indexOf('qs-if=') !== -1){\n this.evalFn = repeater(html);\n }else {\n this.pieces = parse(html);\n }\n }", "title": "" }, { "docid": "b6e51249b2a270b5240516dfee05dd9f", "score": "0.47432372", "text": "[(typeof Handlebars === 'object' ? '@test' : '@skip') + \" template with type text/x-raw-handlebars should be parsed\"](assert) {\n fixture.innerHTML = '<script type=\"text/x-raw-handlebars\" data-template-name=\"funkyTemplate\">{{name}}</script>';\n (0, _runloop.run)(() => (0, _bootstrap.default)({\n context: fixture,\n hasTemplate: _glimmer.hasTemplate,\n setTemplate: _glimmer.setTemplate\n }));\n var template = (0, _glimmer.getTemplate)('funkyTemplate');\n assert.ok(template, 'template with name funkyTemplate available'); // This won't even work with Ember templates\n\n assert.equal(template({\n name: 'Tobias'\n }).trim(), 'Tobias');\n }", "title": "" }, { "docid": "f902eb8517a3098c7cc11cdeedad8c70", "score": "0.4738229", "text": "static parseQuotedScalar(scalar, context) {\n let match;\n let { i } = context;\n\n if (!(match = this.PATTERN_QUOTED_SCALAR.exec(scalar.slice(i)))) {\n throw new ParseMore(`Malformed inline YAML string (${scalar.slice(i)}).`);\n }\n\n let output = match[0].substr(1, match[0].length - 2);\n\n if ('\"' === scalar.charAt(i)) {\n output = Unescaper.unescapeDoubleQuotedString(output);\n } else {\n output = Unescaper.unescapeSingleQuotedString(output);\n }\n\n i += match[0].length;\n\n context.i = i;\n return output;\n }", "title": "" }, { "docid": "cb729db8e62adc00dcdf60187bba0352", "score": "0.47377864", "text": "function toJavascript() {\n\n\t// find each matching pair of handlebars blocks\n\tvar text = this.html;\n\tvar pairs = [];\n\tvar opens = [];\n\tvar opener = -1;\n\tvar closer = -1;\n\tvar cursor = 0;\n\tvar block = '';\n\tvar blocks = [];\n\tvar snipped = '';\n\tvar openexpr = null;\n\tvar closexpr = null;\n\tvar nextopen = null;\n\tvar template = this;\n\tvar i;\n\n\n\t// FIND ONLY THE OUTER BLOCKS\n\t// \n\t// Continuously find next token (opener or closer)\n\t// \tif opener, opens.push(opener)\n\t// \telseif closer\n\t// \t\tpop and pair IFF opens.length == 0\n\t// \t\t\n\tcursor = 0;\n\tdo {\n\n\t\t// Find next opener and closer relative to the cursor\n\t\topener = text.indexOf('{{#', cursor);\n\t\tcloser = text.indexOf('{{/', cursor);\n\n\t\t// Next token is an opener?\n\t\tif ((opener > -1) && ((closer == -1) || (opener < closer))) {\n\t\t\topens.push(opener);\n\t\t\tcursor = opener + 3;\n\t\t}\n\n\t\t// Next token is a closer?\n\t\telse if ((closer > -1) && ((opener == -1) || (closer < opener))) {\n\t\t\tif (opens.length == 0) {\n\t\t\t\tthrow new Error('Unmatched close block');\n\t\t\t}\n\t\t\topener = opens.pop();\n\t\t\tif (opens.length === 0) {\n\t\t\t\tpairs.push([opener, closer]);\n\t\t\t}\n\t\t\tcursor = closer + 3;\n\t\t}\n\n\t} while ((opener > -1) || (closer > -1));\n\n\n\t// this should never happen\n\tif (opens.length > 0) {\n\t\tthrow new Error('Unmatched open block');\n\t}\n\n\t// snip \n\tcursor = 0;\n\tsnipped = '';\n\tfor (i=0; i<pairs.length; i++) {\n\t\topenexpr = readExpression(text, pairs[i][0]);\n\t\tclosexpr = readExpression(text, pairs[i][1]);\n\t\tsnipped += text.substr(cursor, pairs[i][0] - cursor);\n\t\tsnipped += _blockStub;\n\t\tcursor = pairs[i][0] + openexpr.length; // move cursor to the end of the open block tag\n\t\tblock = text.substr(cursor, pairs[i][1] - cursor);\n\t\tthis.blocks.push(new Block(Expression.delimited(openexpr), new Template(block, {newStack: false})));\n\t\tcursor = pairs[i][1] + closexpr.length; // move cursor to the end of the close block tag\n\t}\n\tsnipped += text.substr(cursor);\n\t\n\t\n\t// Parse HTML or Text\n\t// This is where the blocks are unraveled\n\t// This is where the text is parseInterpolated\n\tswitch(this.type) {\n\n\t\t// htmlparser2\n\t\tcase 'html':\n\t\t\tif (!this.parser) {\n\t\t\t\tthis.parser = new htmlparser.Parser({\n\t\t\t\t\t// Let's ignore comments for now\n\t\t\t\t\t// This does not enable the <!DOCTYPE>\n\t\t\t\t\t// oncomment: function(data) {\n\t\t\t\t\t// \ttemplate.appendChild(new VText(data));\n\t\t\t\t\t// },\n\t\t\t\t\tonopentag: function(tagname, attributes){\n\t\t\t\t\t\t// TODO: improve so VNode does not hold attributes as javascript (use Attributes object)\n\t\t\t\t\t\ttemplate.appendChild(new VNode(ontext(template, tagname, {virtual: false}).pop(), attributesToJavascript(template, attributes)));\n\t\t\t\t\t\ttemplate.push();\n\t\t\t\t\t},\n\t\t\t\t\tontext: function(text) {\n\t\t\t\t\t\ttemplate.appendChildren(ontext(template, text));\n\t\t\t\t\t},\n\t\t\t\t\tonclosetag: function(tagname){\n\t\t\t\t\t\ttemplate.pop();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tthis.parser.write(snipped);\n\t\t\tbreak;\n\n\t\t// plaintext\n\t\tdefault:\n\t\t\tontext(this, snipped);\n\t\t\tbreak;\n\t}\n\n\t// compile to js\n\treturn [\n\t\t'(function(context){',\n\t\t\tthis.newStack ? 'var stack = [], env = ' + Template.Runtime + ';' : '',\n\t\t\t'return (function(){',\n\t\t\t\t'stack.push(this);',\n\t\t\t\t'var r = ', this.root.children.toJavascript(), ';',\n\t\t\t\t'stack.pop();',\n\t\t\t\t'return r;',\n\t\t\t'}).call(context);',\n\t\t'})'\n\t].join('');\n}", "title": "" }, { "docid": "331a3ed83e288ccdf4a1a990517ed820", "score": "0.47232166", "text": "function html(h, node) {\n // return h.dangerous ? h.augment(node, u('raw', node.value)) : null\n\n debugger\n // var tag = getTag(node.value);\n // var tagName = isInlineTag(tag)?'span':'div';\n\n var tagName =\n node.tagName = tagName;\n node.properties = node.properties?node.properties:{};\n node.properties.innerHTML = node.value;\n\n return h.dangerous ? h.augment(node, u('raw', {tagName: node.tagName,properties:node.properties,position: node.position}, node.value)) : null\n\n\n}", "title": "" }, { "docid": "368802da35e2bde019459bf9bcea6c04", "score": "0.4719", "text": "function interpolationHandler(elem, name, isXML) {\n\t\t\t\tvar val;\n\t\t\t\treturn isXML ? undefined : val = elem.getAttribute(name, name.toLowerCase() === \"type\" ? 1 : 2);\n\t\t\t}", "title": "" }, { "docid": "4446ef8fd17c617aa31c49be7afad827", "score": "0.47131878", "text": "function parseElement(compiler, resources, element, instruction) {\n var html = element.innerHTML;\n if (html !== '') {\n instruction.template = html;\n }\n element.innerHTML = '';\n}", "title": "" }, { "docid": "d8b39aa0292e8bd49880370a2e17e587", "score": "0.47116747", "text": "function normal(interpolate) {\n return function (source, setState) {\n if (source.eatWhile(whiteCharRE)) {\n return null;\n }\n\n var ch = source.next();\n if (specialRE.test(ch)) {\n if (ch == '{' && source.eat('-')) {\n var t = \"comment\";\n if (source.eat('#')) {\n t = \"meta\";\n }\n return switchState(source, setState, ncomment(t, 1));\n }\n if (interpolate && ch == '}' && source.eat('}')) {\n return switchState(source, setState, markdown);\n }\n if (ch == '[' &&\n source.eat('m') && source.eat('a') && source.eat('r') && source.eat('k') && \n source.eat('d') && source.eat('o') && source.eat('w') && source.eat('n') &&\n source.eat('|')) {\n setState(markdown);\n return null;\n }\n return null;\n }\n\n if (ch == '\\'') {\n if (source.eat('\\\\')) {\n source.next(); // should handle other escapes here\n }\n else {\n source.next();\n }\n if (source.eat('\\'')) {\n return \"string\";\n }\n return \"error\";\n }\n\n if (ch == '\"') {\n return switchState(source, setState, stringLiteral);\n }\n\n if (largeRE.test(ch)) {\n source.eatWhile(idRE);\n if (source.eat('.')) {\n return \"qualifier\";\n }\n return \"variable-2\";\n }\n\n if (smallRE.test(ch)) {\n var isDef = source.pos === 1;\n source.eatWhile(idRE);\n return isDef ? \"variable-3\" : \"variable\";\n }\n\n if (digitRE.test(ch)) {\n if (ch == '0') {\n if (source.eat(/[xX]/)) {\n source.eatWhile(hexitRE); // should require at least 1\n return \"integer\";\n }\n if (source.eat(/[oO]/)) {\n source.eatWhile(octitRE); // should require at least 1\n return \"number\";\n }\n }\n source.eatWhile(digitRE);\n var t = \"number\";\n if (source.eat('.')) {\n t = \"number\";\n source.eatWhile(digitRE); // should require at least 1\n }\n if (source.eat(/[eE]/)) {\n t = \"number\";\n source.eat(/[-+]/);\n source.eatWhile(digitRE); // should require at least 1\n }\n return t;\n }\n\n if (symbolRE.test(ch)) {\n if (ch == '-' && source.eat(/-/)) {\n source.eatWhile(/-/);\n if (!source.eat(symbolRE)) {\n source.skipToEnd();\n return \"comment\";\n }\n }\n source.eatWhile(symbolRE);\n return \"builtin\";\n }\n\n return \"error\";\n }\n }", "title": "" }, { "docid": "21139fac0227714d9d5f28085267191c", "score": "0.4711108", "text": "parse_text() {\n\t\tlet start = this.pos, end = start;\n\t\t\n\t\twhile(end < this.src.length) {\n\t\t\tlet x = this.src.indexOf(\"{{\", end);\n\t\t\tif(x === -1) {\n\t\t\t\t// If there's no more templates, we're done.\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t// Hit a template, no more text\n\t\t\tif(x === end) {\n\t\t\t\treturn this.src.slice(start, x);\n\t\t\t}\n\t\t\t\n\t\t\t// Try to eat a nowiki block\n\t\t\t// This can't use match() because it doesn't care if nowiki is\n\t\t\t// next.\n\t\t\tNOWIKI.lastIndex = end;\n\t\t\tlet m = NOWIKI.exec(this.src);\n\t\t\tif(m) {\n\t\t\t\tend = NOWIKI.lastIndex;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// Must keep incrementing\n\t\t\t\t++end;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn this.src.slice(start);\n\t}", "title": "" }, { "docid": "88e40655e10b7433036e3f035536f554", "score": "0.4710056", "text": "evaluateText(inlineStr, scope, opt = undefined) {\n if (inlineStr === undefined) {\n throw Error('inline string is empty');\n }\n this.checkErrors();\n const inlineTemplateId = `${Templates.inlineTemplateIdPrefix}${this.getRandomTemplateId()}`;\n // wrap inline string with \"# name and -\" to align the evaluation process\n const multiLineMark = '```';\n inlineStr =\n !inlineStr.trim().startsWith(multiLineMark) && inlineStr.includes('\\n')\n ? `${multiLineMark}${inlineStr}${multiLineMark}`\n : inlineStr;\n const newContent = `#${inlineTemplateId} ${this.newLine} - ${inlineStr}`;\n const newTemplates = templatesParser_2.TemplatesParser.parseTextWithRef(newContent, this);\n const evalOpt = opt !== undefined ? opt.merge(this.lgOptions) : this.lgOptions;\n return newTemplates.evaluate(inlineTemplateId, scope, evalOpt);\n }", "title": "" }, { "docid": "fe395c2cf42b21a5e61909c41a9cf374", "score": "0.47026122", "text": "static parseText(content, id = '', importResolver, expressionParser) {\n return templatesParser_2.TemplatesParser.parseText(content, id, importResolver, expressionParser).injectToExpressionFunction();\n }", "title": "" }, { "docid": "b79e4df990bac58173dacce86b89c99c", "score": "0.46967724", "text": "_regExpFragmentInject() {\n return /<fragment-inject ([^>]+)>([\\s\\S]*?)<\\/fragment-inject>/igm;\n }", "title": "" }, { "docid": "44907c0525e9ab57ce1455def469b746", "score": "0.4691405", "text": "function ontext(template, text, config) {\n\tvar\n\t\tblockStubPos = -1,\n\t\tcursor = 0,\n\t\tchildren = null,\n\t\tnodes = []\n\t;\n\t\n\tconfig = extend({virtual: template.virtual}, config);\n\n\t// Ensures that consecutive textOnly components are merged into a single VText node\n\tfunction concatText(text) {\n\t\tif ((nodes.length > 0) && nodes[nodes.length - 1].addText) {\n\t\t\tnodes[nodes.length - 1].addText(text);\n\t\t} else {\n\t\t\tnodes.push(new VText(text, config));\n\t\t}\n\t}\n\n\t// DRY parse\n\tfunction concatInterpolatedContent(content) {\n\t\tExpression.parseInterpolated(content, {\n\t\t\tontext: function(text) {\n\t\t\t\tconcatText(text);\n\t\t\t},\n\t\t\tonexpression: function(expr) {\n\t\t\t\tif (expr.textOnly || (config.virtual === false)) {\n\t\t\t\t\tconcatText(expr);\n\t\t\t\t} else {\n\t\t\t\t\tnodes.push(expr);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\t// While we find more interpolated handlebars blocks\n\twhile ((blockStubPos = text.indexOf(_blockStub, cursor)) > -1) {\n\n\t\t// Get pre-text\n\t\tif (blockStubPos > cursor) {\n\t\t\tconcatInterpolatedContent(text.substr(cursor, blockStubPos - cursor));\n\t\t}\n\n\t\t// Add the block to the list of nodes\n\t\tblock = template.blocks.shift();\n\t\tif (config.virtual === false) {\n\t\t\tblock.callback.virtual = false;\n\t\t\tconcatText(block);\n\t\t} else {\n\t\t\tnodes.push(block);\n\t\t}\n\n\t\t// Advance the cursor\n\t\tcursor = blockStubPos + _blockStub.length;\n\t}\n\n\t// Get post-text (or the only text)\n\tif (cursor < text.length) {\n\t\tconcatInterpolatedContent(text.substr(cursor));\n\t}\n\n\t// textOnly is for things like tagName and attribute values\n\treturn nodes;\n}", "title": "" }, { "docid": "9181bfa36ac41d3ffcd33146ef8e748b", "score": "0.46909422", "text": "expectTemplateBindingKey() {\n let result = '';\n let operatorFound = false;\n do {\n result += this.expectIdentifierOrKeywordOrString();\n operatorFound = this.optionalOperator('-');\n if (operatorFound) {\n result += '-';\n }\n } while (operatorFound);\n return result.toString();\n }", "title": "" }, { "docid": "9181bfa36ac41d3ffcd33146ef8e748b", "score": "0.46909422", "text": "expectTemplateBindingKey() {\n let result = '';\n let operatorFound = false;\n do {\n result += this.expectIdentifierOrKeywordOrString();\n operatorFound = this.optionalOperator('-');\n if (operatorFound) {\n result += '-';\n }\n } while (operatorFound);\n return result.toString();\n }", "title": "" }, { "docid": "8d64f60a9744bd237e0dbb5b04e21f44", "score": "0.4684948", "text": "function template (str, data) {\n // escape single quotes (that aren't already escaped)\n str = str.replace(/([^\\\\])\\'/g, \"$1\\\\'\");\n // replace consecutive spaces and line breaks\n str = str.replace(/[\\s\\t\\r\\n\\f]+/g, ' ');\n // replace macros with data values\n str = str.replace(/\\{\\{(.*?)\\}\\}/g, \"',$1,'\");\n\n // Introduce the data as local variables using with(obj){}\n var templateFn = new Function(\"obj\", \"var p=[];with(obj){p.push('\" + str + \"');}return p.join('');\");\n\n return data ? templateFn(data) : templateFn;\n }", "title": "" }, { "docid": "f00ec18d24d88eb98ab383d7855983fe", "score": "0.4673075", "text": "function _template(text, settings, oldSettings) {\n\tif (!settings && oldSettings) settings = oldSettings;\n\tsettings = _defaults({}, settings, _template.settings);\n\n\t// Combine delimiters into one regular expression via alternation.\n\tvar matcher = RegExp([(settings.escape || noMatch).source, (settings.interpolate || noMatch).source, (settings.evaluate || noMatch).source].join('|') + '|$', 'g');\n\n\t// Compile the template source, escaping string literals appropriately.\n\tvar index = 0;\n\tvar source = \"__p+='\";\n\ttext.replace(matcher, function (match, escape, interpolate, evaluate, offset) {\n\t\tsource += text.slice(index, offset).replace(escapeRegExp, escapeChar);\n\t\tindex = offset + match.length;\n\n\t\tif (escape) {\n\t\t\tsource += \"'+\\n((__t=(\" + escape + \"))==null?'':(typeof _escape == 'function')?_escape(__t):_.escape(__t))+\\n'\";\n\t\t} else if (interpolate) {\n\t\t\tsource += \"'+\\n((__t=(\" + interpolate + \"))==null?'':__t)+\\n'\";\n\t\t} else if (evaluate) {\n\t\t\tsource += \"';\\n\" + evaluate + \"\\n__p+='\";\n\t\t}\n\n\t\t// Adobe VMs need the match returned to produce the correct offset.\n\t\treturn match;\n\t});\n\tsource += \"';\\n\";\n\n\t// If a variable is not specified, place data values in local scope.\n\tif (!settings.variable) source = 'with(obj||{}){\\n' + source + '}\\n';\n\n\tsource = \"var __t,__p='',__j=Array.prototype.join,\" + \"print=function(){__p+=__j.call(arguments,'');};\\n\" + source + 'return __p;\\n';\n\n\tvar render = void 0;\n\ttry {\n\t\trender = new Function(settings.variable || 'obj', '_', source);\n\t} catch (e) {\n\t\te.source = source;\n\t\tthrow e;\n\t}\n\n\tvar template = function template(data) {\n\t\treturn render.call(this, data, _$1);\n\t};\n\n\t// Provide the compiled source as a convenience for precompilation.\n\tvar argument = settings.variable || 'obj';\n\ttemplate.source = 'function(' + argument + '){\\n' + source + '}';\n\n\treturn template;\n}", "title": "" } ]
1cf23b909e37487e8a6f63a6f57c7e62
4) PALINDROME Given a string, return true if the string is a palindrome or false if it is not. Palindromes are strings that form the same word if it is reversed. Do include spaces and punctuation in determining if the string is a palindrome. Examples: palindrome("abba") === true palindrome("abcdefg") === false
[ { "docid": "16715c870a31855f9acba214c78ea96f", "score": "0.0", "text": "function palindrome(str1) {\n let rev = str1.split(\"\").reverse().join(\"\");\n if (rev === str1) console.log(\"palindrome\");\n else console.log(\"Not a Palindrome\");\n}", "title": "" } ]
[ { "docid": "e88c8026cff7110802d86aa36c907970", "score": "0.8386804", "text": "function isPalindrome(str) {\n\n}", "title": "" }, { "docid": "ccdf7bf4d95ad62d000fca2003935daf", "score": "0.8331323", "text": "function palindromeCheck(string) {\n // const re = /[^A-Za-z0-9]/g;\n // string = string.toLowerCase().replace(re, '');\n // const len = string.length;\n // for (var i = 0; i < len/2; i++) {\n // if (string[i] !== string[len - 1 - i]) {\n // return false;\n // }\n // }\n // return true;\n //\n var re = /[\\W_]/g;\n var lowRegStr = string.toLowerCase().replace(re, '');\n var reverseStr = lowRegStr.split('').reverse().join('');\n return reverseStr === lowRegStr;\n}", "title": "" }, { "docid": "46aa8fd9b88d54710fd88aae6db9ab45", "score": "0.83062196", "text": "function palindrome(string) {\n let arrayOfLetters = string.replace(/\\s+/g, '').split(\"\");\n let reversedLetters = [];\n arrayOfLetters.forEach(function(letter) {\n reversedLetters.unshift(letter);\n });\n \n return arrayOfLetters.join(\"\") === reversedLetters.join(\"\") ? true : false;\n}", "title": "" }, { "docid": "dd4bd13f8353bb9699fa9dafb4076534", "score": "0.8301372", "text": "function isPalindrome(aString){\n return false\n}", "title": "" }, { "docid": "5a11edeef70c6767d1a602bb7986187a", "score": "0.83000237", "text": "function isPalindrome ( str ) {\n str = str.replace ( whitespaceRe, '' ); // Whitespaces needs to be stripped out, or palindrome phrases like \"nurses run\" won't be recognized as a palindrome\n const reversed = str.split ( '' ).reverse ().join ( '' );\n return str === reversed;\n}", "title": "" }, { "docid": "8ad65ce0d1645ded97eabeadc62e6827", "score": "0.82754093", "text": "function palindrome(string) {\n let processedContent = string.toLowerCase();\n return processedContent === reverse(processedContent);\n}", "title": "" }, { "docid": "d5a9f5e27a4041b5a20ee0762e7727e8", "score": "0.8237903", "text": "function palindrome(string) {\n let processedContent = string.toLowerCase();\n return processedContent === reverse(processedContent);\n}", "title": "" }, { "docid": "4208cd9769dbedf61e3728d4a8b3b370", "score": "0.8209639", "text": "function palindrome(str) {\n if (str.length === 1) return true;\n // str1 = str.toLowerCase();\n // let str2 = Array.prototype.reduce.call(str1, (acc, char) => char + acc, \"\");\n // return str2 == str1;\n let middle = Math.floor(str.length / 2);\n let isPal = true;\n for (let i = 0; i < middle; ++i) {\n if (str[i].toLowerCase() === str[str.length - 1 - i].toLowerCase()) {\n continue;\n } else {\n isPal = false;\n break;\n }\n }\n return isPal;\n}", "title": "" }, { "docid": "1d10377e6e23453758c701562517513c", "score": "0.82013416", "text": "function palindrome(str) {\n // what goes here\n return str === reversedStr;\n}", "title": "" }, { "docid": "7f3021b9c9662ad56c5dc002c43a2452", "score": "0.8196152", "text": "function palindrome(string) {\n\n\tvar reverse = string.toLowerCase().split('').reverse().join('');\n\tvar compare = string.toLowerCase();\n\n\tif (compare === reverse) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t};\n}", "title": "" }, { "docid": "2d619c5fbc66ea0a807951df362aa679", "score": "0.8182633", "text": "function Palindrome(str){\n var reversedString=str.split(\"\").reverse().join(\"\");\n \n if(str === reversedString){\n return true;\n }else{\n return false;\n }\n}", "title": "" }, { "docid": "83c7228d395aa20a6f58803650734e66", "score": "0.8179865", "text": "function palindrome2(word) {\n reverseWord = word.split('').reverse().join(''); \n if (word.length < 1) return !word.length\n if (word == reverseWord) {\n return true\n } else {\n return false\n }\n}", "title": "" }, { "docid": "529092c9126b941b2be4a3bd58d9f09f", "score": "0.81699353", "text": "function validatePalindrome(str) {\r\n const wordReversed = Array.from(str)\r\n .reverse()\r\n .join(\"\");\r\n\r\n return str === wordReversed ? true : \"Not a palindrome\";\r\n}", "title": "" }, { "docid": "b458ec7b472fe8e31192df24963fec61", "score": "0.81621826", "text": "function isPalindrome(string) {\n\tconst reversed = string.split('').reverse().join('')\n\treturn string === reversed\n}", "title": "" }, { "docid": "c628c379c430d563ff94ada87ac3b8f4", "score": "0.8150685", "text": "function palindrome (s) {\n if(s===strReverse(s)){\n return true\n } else {\n return false\n }\n}", "title": "" }, { "docid": "b8029f12b3ee18ed7e4430346c6ecce6", "score": "0.81452286", "text": "function isPalindrome(string) {\n if ((string.length > 1) &&\n (string === string.split('').reverse().join(''))) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "6d54cce5e19531cf03f1bc474675e465", "score": "0.8142509", "text": "function palindrome(str) {\n let reversedString = str.split(\"\").reverse().join(\"\");\n \n if (reversedString === str) {\n return true;\n } else {\n \n return false;\n }\n \n}", "title": "" }, { "docid": "e7926e01924a396262d8fa924ff24de6", "score": "0.8134781", "text": "function Palindrome(str){\n\tvar reverseWord = \"\";\n\treverseWord = str.split(\"\").reverse().join(\"\");\n\n\tif(str === reverseWord){\n\t\treturn true\n\t}\n\telse{\n\t\treturn false;\n\t}\n\n}", "title": "" }, { "docid": "2101a1a0f58f34217d43394c1fa242be", "score": "0.81319815", "text": "function isPalindrome(string) {\n\t // Returns true if the number is a palindrome \n\t // (reads the same forwards as backwards)\n\t // Approach:\n\t // aXb is a palindrome if (a===b) and X is a palindrome\n\t // X is a palindrome if X.length = 1 or 0\n\t if (string.length < 2) {\n\t return true;\n\t }\n\t if (string[0] === string[string.length - 1]) {\n\t return isPalindrome(string.substr(1, string.length - 2));\n\t }\n\t return false;\n }", "title": "" }, { "docid": "6f04ae043b5905240a1dc0730692e73b", "score": "0.8086104", "text": "function palindromeChecker(palindrome) {\n var check = reverse(palindrome);\n if (check == palindrome) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "ab46f8aaf269b8b62784c184e24d7c86", "score": "0.8080384", "text": "function palindrome(str) {\n var re = /[^A-Za-z0-9]/g;\n var checker = str\n .toLowerCase()\n .replace(re, '')\n .split('')\n .reverse()\n .join('');\n return checker === str;\n}", "title": "" }, { "docid": "f989f751da001cdb4af0efc7cb3c811a", "score": "0.80737233", "text": "function isPalindrome(theString) {\n // Your code here\n}", "title": "" }, { "docid": "385e90177e7eea0da29af5af640aac6b", "score": "0.8072279", "text": "function checkPalindrome(string) {\n string = string.toLowerCase();\n reverse = string.split('').reverse().join('');\n return string == reverse;\n}", "title": "" }, { "docid": "ec939e02db6841c37b39e7d76510b76a", "score": "0.80636746", "text": "function palindrome(str){\n str = str.toLowerCase().replace(/[\\W_]/g,'');\n if (str === str.split(\"\").reverse().join('')){\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "458f3109e016301ba86e7eaaf8b8cba4", "score": "0.80632544", "text": "function palindrome(string) {\n\t// base conditon:\n\t// we need to create a regular expression to get only alphanumeric\n\t//symbols set that to a variable\n\tstring = string.replace(/[^a-z0-9]/i, '').toLowerCase();\n\t// the length of the word is zero / one to ==> end the function retrun true\n\tif (string.length === 0 || string.length === 1) return true;\n\t// if the word at first index does not = word at last index return false;\n\tif (string[0] !== string[string.length - 1]) return false;\n\t// recursive case\n\t// call function - as arguments and slice out the first and last indices\n\treturn palindrome(string.slice(1, string - 2));\n}", "title": "" }, { "docid": "d56f253cfc2ecf0dbda8597ec1f5b5c6", "score": "0.8057946", "text": "function palindrome(str) {\n return str.split('').reverse().join('') === str;\n}", "title": "" }, { "docid": "ddc1e724886bb5d0c410a34b636ed61b", "score": "0.8054251", "text": "function checkForPalindrome(str) {\n str = str.toLowerCase();\n var tester = str\n tester = tester.split(\"\")\n // split method converts a string to an array\n tester = tester.reverse();\n // join method converts array to a string\n tester = tester.join(\"\");\n\n if (tester == str) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "85a0e3f5320350244d886adf33a2cfad", "score": "0.80541855", "text": "function isPalindrome() {\n\n}", "title": "" }, { "docid": "f217173b0fcef53105a00ed0043f478e", "score": "0.80530214", "text": "function isPalindrome(str) {\n str = str.replace(/[^0-9a-z]/gi, '').toLowerCase();\n if (str === (str.split('').reverse().join(''))) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "3128f72565cc382fa2d8350f418d7c59", "score": "0.8040921", "text": "function isPalindrome(string) {\n string.toLowerCase();\n var halfway = Math.floor(string.length / 2);\n for (var i = 0; i < halfway; i++) {\n if (string[i] != string[string.length - (i + 1)])\n {\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "4406e5521ff535965292e1b19a29949a", "score": "0.8032144", "text": "function isPalindrome(str) {\n if (str === null ) return false;\n str = str.replace(/[^A-Za-z0-9]/gi, '').toLowerCase();\n return str.split(\"\").reverse().join('') === str;\n}", "title": "" }, { "docid": "f93f8ce5255d666c57d760b56eec6b8d", "score": "0.80239415", "text": "function palindrome(str) {\n const reversed = str.split('').reverse().join('');\n return reversed === str;\n}", "title": "" }, { "docid": "ab10654e87564324d1aa93572f6aa72d", "score": "0.8022092", "text": "function isPalindrome(str) {\n // reverse string then compare reversed string and initial string\n const reversedStr = str.split('').reduce((acc, char) => char + acc, '');\n return reversedStr === str;\n}", "title": "" }, { "docid": "3ca261c02c3ece3af78ef3748f0c4cde", "score": "0.80183697", "text": "function palindrome(str) {\n str = str.split(' ').join('').toLower();\n var check = str.split('').reverse().join('');\n if(check === str) {\n return true;\n } else {\n return false;\n }\n\n}", "title": "" }, { "docid": "0d3e4193319d3b03a97112a0cfe85948", "score": "0.80081284", "text": "function isPalindromic(string) {\n string = string.replace(' ', '');\n var reversed = '';\n var isPalindrome = false;\n for (var i = string.length - 1; i >= 0; i--) {\n reversed += string[i];\n }\n if (string === reversed) {\n isPalindrome = true;\n }\n return isPalindrome;\n}", "title": "" }, { "docid": "512f43c2739eb97bc9f126cc3472f457", "score": "0.80053", "text": "function isPalindrome(str) {\n let rev = reverse(str);\n if (rev === str) return true;\n return false;\n}", "title": "" }, { "docid": "b0a3bece682cd0d7849bafd79d68fc47", "score": "0.79969114", "text": "function isPalindrome(s) {\n return s.split('').reverse().join('') === s;\n}", "title": "" }, { "docid": "2fe1d79e3cf2f02ae32aabc1ceef6a5e", "score": "0.7996057", "text": "function palindrome2(str) {\n\tconst reversed = str.split('').reverse().join('');\n\treturn str === reversed;\n}", "title": "" }, { "docid": "6753497afab8e553a954d3ec8713aff6", "score": "0.79865384", "text": "function isPalindrome(str) {\n const revString = str.split('').reverse().join('');\n return revString === str;\n}", "title": "" }, { "docid": "9b73a197eaa50e8f3c6a5871f403ae5f", "score": "0.79849267", "text": "function isPalindrome(word) {\n word = word.replace(/\\s/g, \"\");\n newWord = word.toLowerCase();\n function reverse(newWord) {\n return newWord.split(\"\").reverse().join(\"\");\n }\n if (newWord == reverse(newWord)) return true;\n else return false;\n}", "title": "" }, { "docid": "057a4e13fe03b842f6fb1fba023f8bbc", "score": "0.7982695", "text": "function isPalindrome(str) {\n return str.length > 1 && str.split('').reverse().join('') === str;\n}", "title": "" }, { "docid": "97bc8e0a42b7902471e41a5d6829d902", "score": "0.79792243", "text": "function isPalindrome(str) {\n\n // ignore case\n str = str.toLowerCase();\n \n // iterate through the string from the back\n // and front, working towards the middle\n for (var i = 0; i < str.length - i - 1; i++) {\n \n // compare characters at two indexes\n if (str[i] !== str[str.length - i - 1]) {\n \n // we found two characters that are \n // unequal; this is not a palindrome\n return false; \n }\n }\n \n // we checked the entire string--it's a palindrome!\n return true;\n}", "title": "" }, { "docid": "fcd60e6e402dadd66fb0406e68b3e7cf", "score": "0.7978678", "text": "function isPalindrome(str) {\n const revString = str\n .split(\"\")\n .reverse()\n .join(\"\");\n return revString === str;\n}", "title": "" }, { "docid": "9c7543a7390f641ee1f2a03d3134794d", "score": "0.79748815", "text": "function isPalindrome(string) {\n if (string.length > 1) {\n if (string[0] === string[string.length - 1]) {\n return isPalindrome(string.substring(1, string.length-1))\n } else {\n return false\n }\n } else {\n return true\n }\n}", "title": "" }, { "docid": "f51bd2ef01f722eb76629b2d5eb8692e", "score": "0.7969658", "text": "function isPalindrome(string) {\n\n // solved with recursion\n if (string.length == 1) {\n return true\n } else if (string[string.length - 1] === string[0]) {\n return isPalindrome(string.substring(1, string.length - 1))\n } else {\n return false\n }\n\n // solved with reverse\n // let reversed = string.split('').reverse().join('')\n // return string === reversed\n\n // solved with loop \n // let reversed = ''\n // for (let character of string){\n // reversed = character + reversed\n // }\n // return string === reversed\n\n // solved with every\n // return string.split('').every((char, i) => {\n // return char === string[string.length - i - 1]\n // })\n}", "title": "" }, { "docid": "d4af459c207dc423057c47280468c279", "score": "0.79686624", "text": "function palindrome(str) {\n let is_palindrome = true;\n for (var i = 0; i < str.length / 2; i++) {\n if (str[i] !== str[str.length - i - 1]) {\n is_palindrome = false;\n break;\n }\n }\n return is_palindrome;\n}", "title": "" }, { "docid": "fabc36b67b7bc70b26810d0739ffe24f", "score": "0.7968526", "text": "function palindrome(str) {\n str = str.split(/[^a-zA-Z0-9]/).join(\"\").toLowerCase();\n let rev = str.split(\"\").reverse().join(\"\");\n return str == rev ? true : false;\n}", "title": "" }, { "docid": "b8b7988ecef646e3c9c98917995efc92", "score": "0.79673046", "text": "function isPalindrome(str) {\n // return str.split('').reverse().join('') === str;\n\n const revString = str.split('').reduce((revStr, char) => char + revStr, '');\n return revString === str;\n}", "title": "" }, { "docid": "8c63ff7bb55048ea48d04bd85617db7c", "score": "0.7965646", "text": "function isPalindromic(string) {\n var newString = '';\n var inverseString = '';\n for (let i = 0; i < string.length; i++) {\n if (string[i] !== ' ') {\n newString += string[i];\n }\n }\n for (let i = newString.length - 1; i >= 0; i--) {\n inverseString += newString[i];\n }\n if (newString === inverseString) {\n return true;\n } else if (newString !== inverseString) {\n return false;\n }\n}", "title": "" }, { "docid": "e75f0928f49498019b3a77290721b7aa", "score": "0.79635096", "text": "function palindrome(str) {\n\tstr = str.toLowerCase(); //Turn everything to lower case\n\t// Remove all alphanumeric characters.\n\tstr = str.replace(/[^a-z0-9]/g, '');\n\tlet backward = str.split('');\n\tbackward = backward.reverse().join('').toString();\n\n\tif (backward === str) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "7e02fc44178148b74f2b68b13bcf17c9", "score": "0.7962751", "text": "function isPalindrome(string) {\n // create empty string to store\n const str = '';\n // create a for loop to iterate through the string\n for (let i = string.length - 1; i >= 0; i++) {\n // add each character to the string\n str += string[i];\n }\n // return boolean\n return str === string;\n}", "title": "" }, { "docid": "86def0a3e698eb35912ec790e3f7ca13", "score": "0.7961345", "text": "function isPalindrome(str){\n str = str.toLowerCase().replace(/\\s/g,'')\n return str === str.split('').reverse().join('');\n}", "title": "" }, { "docid": "0c091adc9cc2c27cf2e1b8ce10349fea", "score": "0.79594874", "text": "function isPalindrome(str) {\n // let newStr = str.replace(/[\\s\"'.,-\\/#!$%\\^&*;:{}=\\-_`~()\\\\\\[\\]@+|?><]/g,\"\").toLowerCase()\n const end = str.length - 1;\n\n for(let i = 0; i < str.length / 2; i++) {\n if(str[i] !== str[end - i]) {\n return false;\n };\n };\n return true;\n}", "title": "" }, { "docid": "13debbc9f54a9b686a22ccf415ace348", "score": "0.7958924", "text": "function palindrome(str) {\n str = str.toLowerCase();\n var reverseStr = str.split('').reverse().join(''); \n return reverseStr === str;\n}", "title": "" }, { "docid": "8d12d5c79e99fdd07413bd3b2a34d604", "score": "0.7957773", "text": "function is_palindrome(str)\r\n{\r\n reverse_str = reverse(str);\r\n // condition checking if reverse str is \r\n // same as string it is palindrome\r\n // else not a palindrome\r\n if (reverse_str === str)\r\n {\r\n document.write(str +\" :- passed string is palindrome \");\r\n }\r\n else\r\n {\r\n document.write(str +\" :-passed string is not palindrome\");\r\n }\r\n}", "title": "" }, { "docid": "362e293ba9489511039de902913b3906", "score": "0.7951595", "text": "function isPalindrome(str) {\n let ans = true;\n str = str.split(\" \").join(\"\").toUpperCase();\n for (let i = 0, j = str.length-1; i < Math.sqrt(str.length); i++, j--) {\n if (str[i] !== str[j]) {\n ans = false;\n break;\n }\n }\n\n return ans;\n}", "title": "" }, { "docid": "d72a236c384051ac7477f5aabac7ac06", "score": "0.7949594", "text": "function isPalindrome (word) {\n word = word.toLowerCase()\n if (word.length <= 1) {\n return true\n }\n while (word[0] === word[word.length - 1]) {\n return isPalindrome(word.slice(1, -1))\n }\n return false\n}", "title": "" }, { "docid": "dacd9ca36a71d1511bfd8efa4131d396", "score": "0.79446584", "text": "function isPalindrome (string) {\n return string === string.split('').reverse().join('');\n}", "title": "" }, { "docid": "c251b9d97401e8294160ae3cceff71a5", "score": "0.79414266", "text": "function palindrome(str) {\n\tlet isPalindrome = true;\n\tlet strLength = str.length;\n\n\tfor(let i=0; i<Math.floor(strLength/2); i++) {\n\t\tif(str[i] !== str[strLength - 1 - i]) {\n\t\t\tisPalindrome = false\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn isPalindrome;\n}", "title": "" }, { "docid": "27b5079aaf975ce2a87cfaa8fc4c5558", "score": "0.7940044", "text": "function isPalindrome(string) {\n var newString = '';\n var result = true;\n\n for (var i = 0; i < string.length; i++) {\n if (string[i] !== ' ') {\n newString += string[i];\n }\n }\n\n for (var start = 0, end = newString.length - 1; start < end; start++, end--) {\n if (newString[start] !== newString[end]) {\n result = false;\n }\n }\n\n return result;\n}", "title": "" }, { "docid": "a0c907ac9e9d3e70cb9f50ef2ea0455f", "score": "0.7932338", "text": "function isPalindrome(str) {\n let revString = str.split('').reverse().join('');\n return revString === str;\n}", "title": "" }, { "docid": "8b0095966b3947400639ac3d18796881", "score": "0.79287183", "text": "palindrome(string) {\n if (string.length > 3 && string.charAt(0) !== string.charAt(string.length - 1)) {\n return false;\n } else if (string.length <= 3) {\n if (string.charAt(0) === string.charAt(string.length - 1)) {\n return true;\n } else {\n return false;\n }\n } else {\n return this.palindrome(string.slice(1, -1));\n }\n }", "title": "" }, { "docid": "8105490ef979af2593b9d65314655682", "score": "0.79283404", "text": "function checkForPalindrome(str){\n \n if(str === str.split(\"\").reverse().join(\"\")){\n return \"This is a palindrome\";\n }\n \n return \"This is not a palindrome\";\n \n}", "title": "" }, { "docid": "5de29a0e17e1d2995c8592ff9a27d7ed", "score": "0.7928247", "text": "function isPalindromic(string){\n\n return string === string.split('').reverse().join('')\n\n}", "title": "" }, { "docid": "4715102d64354d8182b85c3f1fb9e702", "score": "0.7921988", "text": "function isPalindrome(str) {\n const revString = str.split('').reverse().join('');\n\n return revString === str;\n}", "title": "" }, { "docid": "a7794d13ecf8fffa55a9eef38230f29a", "score": "0.79191595", "text": "function isPalindrome(str) {\n str = str.toLowerCase();\n // loop to replace spaces\n while (str.includes(\" \")) str = str.replace(\" \", \"\");\n for (let i = 0; i < Math.floor(str.length / 2); i++) {\n if (str.charAt(i) !== str.charAt(str.length - i - 1)) return false;\n }\n return true;\n}", "title": "" }, { "docid": "40d3bf9fa503ab4fca0925ee2598f13b", "score": "0.7917947", "text": "function isPalindromic(string) {\n var forwards = string.split(' ').join('');\n var backwards = '';\n\n for (var i = forwards.length - 1; i > -1; i--) {\n backwards += forwards[i];\n }\n\n return backwards === forwards;\n}", "title": "" }, { "docid": "87af02295c2a136d4093951a80feec44", "score": "0.7917226", "text": "function Palindrome(str) { \n\n\n return str.match(/[^ ]/ig).reverse().join('') === str.match(/[^ ]/ig).join('') ? true : false; \n \n \n \n}", "title": "" }, { "docid": "267c871ff181a9a0d05da60b0e2e6fad", "score": "0.7906263", "text": "function isPalindrome(str) {\n // your code here\n}", "title": "" }, { "docid": "39db3d3b79f750a3cb07839b2d964d1a", "score": "0.79036427", "text": "function Palindrome(str) {\n\tif (str.split(\"\").reverse().join(\"\") === str) {\n\n \treturn true\n } else {\n // code goes here\n return false;\n }\n}", "title": "" }, { "docid": "7ce071553daba05ce4a9c515eaad9b4a", "score": "0.79010093", "text": "function isPalendrome(str) {\n var str = str.toLowerCase();\n var strArr = str.split(\"\");\n var strArrRev = strArr.reverse();\n var strRev = strArrRev.join(\"\");\n return str === strRev;\n}", "title": "" }, { "docid": "12a9a8c8c536c10fda43dd9b178a7354", "score": "0.7898325", "text": "function checkPalindrome(inputString) {\n let reverse = inputString.split('').reverse().join('');\n if(reverse == inputString){\n return true\n } else {\n return false\n }\n}", "title": "" }, { "docid": "7dc6b3cbcb5bfb2104e5a1ae5c62c165", "score": "0.7896181", "text": "function isPalindrome(str) {\n // your code here\n}", "title": "" }, { "docid": "8f2596302e0f6f213959db7b1c75e757", "score": "0.788851", "text": "function isPalindrome (str) {\n str = str.toLowerCase().replace(/ /g,'');\n let reverseStr = str.split('').reverse().join('');\n return str === reverseStr;\n}", "title": "" }, { "docid": "a97559ff5e51c41887c0629b2aade29d", "score": "0.7886391", "text": "function isPalindrome(str) {\n if (!str || str.trim() === '') {\n return false;\n }\n return str.split('').reverse().join('') === str;\n}", "title": "" }, { "docid": "8f4b5c159d306055829a543196135c16", "score": "0.7885146", "text": "function checkForPalindrome(str) {\n var tester = str;\n tester = tester.split(\"\");\n tester = tester.reverse();\n tester = tester.join(\"\");\n if (tester === str) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "63140599846eff122457a95efbb10e45", "score": "0.7883533", "text": "function isPalindrome(str) {\n str = str.replace(/\\W/g, '').toLowerCase();\n return (str == str.split('').reverse().join(''));\n }", "title": "" }, { "docid": "d3b2517fc1c4dcfcf0779dbd8e3d326c", "score": "0.7878534", "text": "function isPalindromic(string) {\n\n let newString = '';\n\n for (let i = 0; i < string.length; i++) {\n if (string[i] !== ' ') {\n newString += string[i];\n }\n }\n\n const newArray = newString.split('');\n\n const reverseArray = newArray.reverse();\n\n const reverseString = reverseArray.join('');\n\n if (newString !== reverseString) {\n return false;\n }\n\n return true;\n}", "title": "" }, { "docid": "730e224671b85b0ea6997e7951dee9c8", "score": "0.7876803", "text": "function isPalindrome2 (string) {\n const reversedStringCharacters = []\n for (let i = string.length - 1; i >= 0; i--) {\n reversedStringCharacters.push(string[i])\n }\n const reversedString = reversedStringCharacters.join(\"\")\n console.log(reversedString === string ? `The given string : ${string} is a palindrome` : `The given string : ${string} is not a palindrome`)\n return reversedString === string\n}", "title": "" }, { "docid": "db05b0cc76cc4fdfa8f9781e7914dd50", "score": "0.7869482", "text": "function isPalindrome(str) {\n\tif (!isString(str))\n\t\treturn false;\n\n var endInx = str.length - 1,\n startIdx = 0;\n\n while (endInx > startIdx) {\n if (str.charAt(startIdx++) !== str.charAt(endInx--))\n \treturn false;\n }\n return true;\n}", "title": "" }, { "docid": "da51e215d65310ca7e1385e5b8edf2c1", "score": "0.78687453", "text": "function isPalindrome(str) {\n return str === str.split('').reverse().join('');\n}", "title": "" }, { "docid": "7fb15d499cce243234879185be18fee8", "score": "0.78629035", "text": "function palindromeCheck(str) {\n let reverseStr = str.split('').reverse().join('')\n\n if(reverseStr === str) {\n return true\n } else {\n return false\n }\n\n} // O(1)", "title": "" }, { "docid": "6c35487e590a366276d1baff88f46c76", "score": "0.78602606", "text": "function isPalindrome(str){\n\tvar length = str.length;\n\tif(length == 1){return true;}\n\n\tfor(var i = 0; i < length/2; i++){\n\t\tif(str[i] != str[length-1-i]){\n\t\t\treturn false;\n\t\t}\n\t}\n\t\n\treturn true;\n}", "title": "" }, { "docid": "52a691a8cd94181f5a7c3e4176c84575", "score": "0.7839476", "text": "function PalindromeChecker(text){\n var t = text.toLowerCase().split(\" \").join(\"\").toLowerCase();\n for (let i = 0 ; i < t.length/2 ; i++) {\n if (t[i] !== t[t.length-i-1]) {\n return false\n }\n }\n return true\n}", "title": "" }, { "docid": "87e8cebbb6ff46d90490f78085942463", "score": "0.78361076", "text": "function isPalindrome(word) {\n if (word.length <= 1) {\n return true\n }\n if (word[0] === word[word.length - 1]) {\n return isPalindrome(word.slice(1, word.length - 1))\n }\n return false\n}", "title": "" }, { "docid": "8dc802bac579b7923e51ac74640e1255", "score": "0.78342104", "text": "function isPalindrome(str) {\n if (str.length === 1) return true\n if (str.length === 2) return str[0] === str[1]\n if (str[0] === str.slice(-1)) return isPalindrome(str.slice(1, -1))\n return false\n}", "title": "" }, { "docid": "4141ad8bdffbe5b0b4b09aee5fcf5de2", "score": "0.78327686", "text": "function isPalindrome(str) {\r\n if (!isString(str))\r\n return false;\r\n\r\n var endInx = str.length - 1,\r\n startIdx = 0;\r\n\r\n while (endInx > startIdx) {\r\n if (str.charAt(startIdx++) !== str.charAt(endInx--))\r\n return false;\r\n }\r\n return true;\r\n}", "title": "" }, { "docid": "128ae2f962b5580cb0648bf0d70fa708", "score": "0.7832165", "text": "function checkPalindrome(inputString) {\n const split = inputString.split(\"\")\n const reversed = split.reverse()\n const joined = reversed.join(\"\")\n if (inputString === joined) {\n return true\n } else { return false }\n}", "title": "" }, { "docid": "804fa7e430b1cb25eb1a954a700ef301", "score": "0.7832072", "text": "function is_palindrome(string) {\n var i = 0;\n while (i < string.length) {\n if (string[i] != string[(string.length - 1) - i]) {\n return false;\n }\n i += 1;\n }\n return true;\n}", "title": "" }, { "docid": "ffad15c66ee4daf4aa82a92a99f40997", "score": "0.783159", "text": "function isPalindrome(str) {\n if (str.split('').reverse().join('') === str) return true;\n else return false;\n}", "title": "" }, { "docid": "ca48db20acc9d2e199abb9416711bf24", "score": "0.78297323", "text": "function is_palindrome(s) {\n s = s.toLowerCase().replace(/[^a-zA-Z0-9]/g, \"\");\n let stack = new Stack();\n for (let i = 0; i < s.length; i++) {\n stack.push(s[i]);\n }\n for (let i = 0; i < s.length; i++) {\n if (s[i] !== stack.top.data) {\n return false;\n }\n stack.pop();\n }\n return true;\n}", "title": "" }, { "docid": "0647234387f8da9e6411d11725c4f64e", "score": "0.7829072", "text": "function isPalindrome(string) {\n // lower case the string to deal with only lowercased letters\n string = string.toLowerCase();\n // this is an array of the string\n let charactersArr = string.split('');\n // create an array of permitted characters (so special characters\n // such as punctuation marks are removed) to compare the string to\n let validCharacters = 'abcdefghijklmnopqrstuvwxyz';\n\n // create an array of the string with only the permitted characters\n let lettersArr = [];\n charactersArr.forEach(char => {\n // note: indexOf() method returns the index of an array or string with that\n // paramter, if it doesn't exist it returns -1\n if (validCharacters.indexOf(char) > -1) {\n lettersArr.push(char);\n }\n });\n\n // this is the new string with lowercased, only-permitted characters\n let permittedString = lettersArr.join('')\n // this is the same string but reversed\n let reversedString = lettersArr.reverse().join('');\n\n // compare the two and see if the original string is indeed a palindrome\n if (permittedString === reversedString) return true;\n else return false;\n}", "title": "" }, { "docid": "de779def62406f5fe228960376bf9693", "score": "0.78260523", "text": "function isPalindrome(string) {\n let leftIndex = 0;\n let rightIndex = string.length - 1;\n\n while (leftIndex < rightIndex) {\n if (string[leftIndex] === string[rightIndex]) {\n leftIndex++;\n rightIndex++;\n } else {\n return false;\n }\n }\n\n return true;\n}", "title": "" }, { "docid": "6eb3536b287d9436d68843bfa7b495af", "score": "0.7825294", "text": "function isPalindrome(x) {\n\t// your code here\n\t// convert to an array then reverse the string using reduce compare reverse string\n\t// let reversed = x.toLowerCase().split('').reduce((reverse, character) => character + reverse, '')\n\tlet reversed = x.toLowerCase().split('').reverse().join('');\n\treturn x.toLowerCase() === reversed;\n}", "title": "" }, { "docid": "2d100e3aaaafafb23f1d0d71a08a2e8c", "score": "0.7824677", "text": "function isPalindromeNORMAL(str) {\n // split reverse and join then compare against original\n let reverseStr = str.split('').reverse().join('');\n return reverseStr === str ? true : false;\n}", "title": "" }, { "docid": "8e2a329c868dc66941dd663076be64c8", "score": "0.7816943", "text": "function isPalindrome (string) {\n for(var i = 0; i< string.length/2; i++){\n if(string[i] !== string[string.length - 1 - i]){\n return false\n }\n }\n return true \n}", "title": "" }, { "docid": "c51b187d2e2fd2ebdd7a038a0d6f1f04", "score": "0.781533", "text": "function isPalindrome(str) {\n let splitString = str.split(\"\");\n var x = splitString[0];\n let reverseArray = splitString.reverse();\n let joinArray = reverseArray.join(\"\");\n let isPalindrome = false;\n if (joinArray === str)\n {\n isPalindrome = true;\n }\n return isPalindrome;\n}", "title": "" }, { "docid": "9184e1ab230ef12e8ea46042111b3d74", "score": "0.7807483", "text": "function is_palindrome(string) {\n string = string.toLowerCase().replace(/[^a-zA-Z0-9]/g, '');\n let palindromeStack = new Stack();\n let top = palindromeStack.top;\n for (let i = 0; i < string.length; i++) {\n palindromeStack.push(string[i]);\n top++;\n }\n let reverseString = '';\n for (let i = 0; i < top; i++) {\n reverseString += palindromeStack.pop();\n }\n if (reverseString === string) {\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "784bb72bc68030dd7ffa499a125439d7", "score": "0.7804179", "text": "function myIsPalindromeSolution(string) {\n // add whatever parameters you deem necessary - good luck!\n if (string.length === 0) return;\n if (string.charAt(0) === string.charAt(string.length - 1)) {\n isPalindrome(string.slice(1, -1));\n return true;\n } else return false;\n}", "title": "" }, { "docid": "707c6caaca52b74c47dcbb2cf7b55f28", "score": "0.7801389", "text": "function palindrome(str) {\n \n \t\tvar stripped = str.replace(/[\\W_]+/g,\"\").toLowerCase();\n \t\tvar reversed = stripped.split(\"\").reverse().join(\"\");\n \n \t\treturn stripped == reversed ? true : false;\n\t}", "title": "" }, { "docid": "08b6b865a95a16f7bebaab2eb3f2e233", "score": "0.7799653", "text": "function palindromeCheck(input) {\n const string = String(input);\n\n return string === string.split('').reverse().join('');\n}", "title": "" } ]
90a846128f4d71183f177120ea208205
Item is the active pane item, a TextEditor Instance
[ { "docid": "00241f593f0c5112fe72709a3e1b6f08", "score": "0.0", "text": "deactivate(){\n this.panel.destroy();\n this.subscriptions.dispose();\n return this.hnreaderView.destroy();\n }", "title": "" } ]
[ { "docid": "9a8bbe6fae72240d18b0d88dafc485e7", "score": "0.6723824", "text": "function isValidTextEditor(item) {\n return item instanceof _atom.TextEditor;\n}", "title": "" }, { "docid": "e900b773598219f42980abdca70ed434", "score": "0.63990504", "text": "function editItem() {\n\n var editText = $('.editText');\n $(this).parent().find('.newText');\n\n var currentItem = $(this).parent().find('.newText').text();\n $(this).parent().find('.editText').val(currentItem);\n $(this).parent().find('.editText').show();\n $(this).parent().find('.editButton').show();\n $(this).parent().find('.newText').hide();\n\n editText.focus();\n\n }", "title": "" }, { "docid": "899139777e8cdcb03271e52e7b46ecce", "score": "0.60250634", "text": "editItem (item, dbox = true) {\n this.editedIndex = this.itemsList.indexOf(item)\n this.editedItem = Object.assign({}, item)\n this.dialog = dbox\n }", "title": "" }, { "docid": "26fdd62b0bbd4b17b40497a985cddaf4", "score": "0.5996445", "text": "function editItem () {\n\tthis.className = \"edit\"\n\tvar input = this.querySelector(\"input\")\n\tinput.focus();\n\tinput.setSelectionRange(0, input.value.length);\n}", "title": "" }, { "docid": "52580c6b157e60cb3b32daccb429e76a", "score": "0.58870083", "text": "_renderListItem(item) {\n item.classList.add('editMode');\n item.querySelector('._input').value = item.querySelector('._text').innerText;\n item.querySelector('._edit').classList.replace('_edit', '_save');\n item.querySelector('._save').innerText = 'Save';\n }", "title": "" }, { "docid": "da8c7506635465d17b76506e874f9915", "score": "0.5881887", "text": "get currentItem() {\n let currentNode = window.getSelection().anchorNode\n\n if (currentNode.nodeType !== Node.ELEMENT_NODE) {\n currentNode = currentNode.parentNode\n }\n\n return currentNode.closest(`.${this.CSS.item}`)\n }", "title": "" }, { "docid": "e66dd604dbab93ce318302f42a1aedee", "score": "0.5761585", "text": "function editItem ($textField) {\n\tvar\ttextFieldVal = $.trim($textField.val()),\n\t\t$liToEdit = $textField.closest('li');\n\n\tif( textFieldVal !== '' ) {\n\tvar currentItemText = $liToEdit.find('.item-text').text();\n\n\t\tconsole.log(\"Edit: textFieldVal >\" +textFieldVal + \"<, currentItemText >\" +currentItemText+ \"<\");\n\t\tif( textFieldVal !== '' && textFieldVal !== currentItemText ) {\n\n\t\t\t$liToEdit.find('.item-text').text(textFieldVal);\n\t\t\twriteToLocalStorage($liToEdit.closest('ul'));\n\t\t\t$liToEdit.find('.icon-pencil').click();\n\t\t}\n\t}\n\telse {\n\t\talert(\"Please enter a new value.\");\n\t}\n}", "title": "" }, { "docid": "91f7fcf05cb6a1b109824a72ea6e66ad", "score": "0.56716067", "text": "_getActiveItem() {\n return this._activeItem\n }", "title": "" }, { "docid": "f712f5c16e3c4991e776666f39cbd7e7", "score": "0.56556517", "text": "function toEditItem() {\n spanItem = this\n \n document.location.href = `#add-cont` \n document.querySelector(`#todo-cont`).className = 'nodisplay'\n document.querySelector(`#edit-cont`).className = 'display'\n \n editInput.value = spanItem.innerText\n saveEditTask.addEventListener('click', editItem)\n }", "title": "" }, { "docid": "ac52de51e1c21cb5d26fd57caa5b800f", "score": "0.5647461", "text": "setActiveItem(item, e) {\n\t var self = this;\n\t var eventName;\n\t var i, begin, end, swap;\n\t var last;\n\t if (self.settings.mode === 'single') return; // clear the active selection\n\n\t if (!item) {\n\t self.clearActiveItems();\n\n\t if (self.isFocused) {\n\t self.showInput();\n\t }\n\n\t return;\n\t } // modify selection\n\n\n\t eventName = e && e.type.toLowerCase();\n\n\t if (eventName === 'click' && isKeyDown('shiftKey', e) && self.activeItems.length) {\n\t last = self.getLastActive();\n\t begin = Array.prototype.indexOf.call(self.control.children, last);\n\t end = Array.prototype.indexOf.call(self.control.children, item);\n\n\t if (begin > end) {\n\t swap = begin;\n\t begin = end;\n\t end = swap;\n\t }\n\n\t for (i = begin; i <= end; i++) {\n\t item = self.control.children[i];\n\n\t if (self.activeItems.indexOf(item) === -1) {\n\t self.setActiveItemClass(item);\n\t }\n\t }\n\n\t preventDefault(e);\n\t } else if (eventName === 'click' && isKeyDown(KEY_SHORTCUT, e) || eventName === 'keydown' && isKeyDown('shiftKey', e)) {\n\t if (item.classList.contains('active')) {\n\t self.removeActiveItem(item);\n\t } else {\n\t self.setActiveItemClass(item);\n\t }\n\t } else {\n\t self.clearActiveItems();\n\t self.setActiveItemClass(item);\n\t } // ensure control has focus\n\n\n\t self.hideInput();\n\n\t if (!self.isFocused) {\n\t self.focus();\n\t }\n\t }", "title": "" }, { "docid": "e3abfeb9d569c6727fa941189a2db37d", "score": "0.5582839", "text": "function get_corresponding_editor_from_menu_item(menu_item){\n\tvar editor_id = parseInt(get_corresponding_editor_id_from_menu_item(menu_item));\n\treturn editors[editor_id-1];\n}", "title": "" }, { "docid": "f7659e24d3a9595a646d072822b65ded", "score": "0.556921", "text": "function saveCurrentItem() {\n\t\tlet text = getActiveCue();\n\n\t\tsavedItems.push(text);\n\t}", "title": "" }, { "docid": "bfafea5a7f678499fee7430e5ff03c06", "score": "0.55472964", "text": "function editItem () {\n let txt;\n let newText = prompt('Edit item', liText.innerHTML);\n if (newText == null || newText == ''){\n txt = textInput;\n } else {\n txt = newText;\n }\n liText.innerHTML = txt;\n }", "title": "" }, { "docid": "5b5db974ca6212bb9680015309d209cd", "score": "0.55164444", "text": "function getCurrentItem(opts, value, block) {\n var document = value.document;\n\n\n if (!block) {\n if (!value.selection.startKey) return null;\n block = value.startBlock;\n }\n\n var parent = document.getParent(block.key);\n return parent && parent.type === opts.typeItem ? parent : null;\n}", "title": "" }, { "docid": "f01770f2fd56679a6013c6c761e3eb5f", "score": "0.55128664", "text": "function onEdit(item) {\n // set values and open modal.\n console.log(\"item\" , item)\n if(item && item.title){\n setEditItem(item);\n setEditValue(item.title);\n setAddModalShow(true);\n }\n else\n setAddModalShow(true)\n }", "title": "" }, { "docid": "9f6f9e58a8bac67c69b7fab2e00bfce4", "score": "0.5494719", "text": "function getCurrentEditor(){\n\n return editor;\n}", "title": "" }, { "docid": "98bd83dd1bb71583c264678dc03b11a7", "score": "0.54763436", "text": "function activateCustomItem(active) {\n let description = $(active).find(\".description\");\n $(customTabText).html($(description).html());\n $(customWindowText).html($(active).find(\".text\").html());\n }", "title": "" }, { "docid": "bc2487b2baca6713866c4f96fdf85091", "score": "0.54265183", "text": "get focusedItem() {\n return this.items.find((e) => e.matches(':focus-within'));\n }", "title": "" }, { "docid": "b37a02c04f5f1d00792abab30de12a84", "score": "0.54256576", "text": "edit(item) {\n this.current = JSON.parse(JSON.stringify(item));\n this.originalCurrent = JSON.parse(JSON.stringify(item));\n this.errors = {};\n this.$emit('editing');\n }", "title": "" }, { "docid": "bda88710664fc75344249b2cae35bb43", "score": "0.5414896", "text": "get editText() {\n return this.i.editText;\n }", "title": "" }, { "docid": "055f6f2dc2ed48985285ca23365f41c9", "score": "0.54116577", "text": "function getCurrentContent(){\n editorContent = editor.getValue();\n }", "title": "" }, { "docid": "1177133180c6f8d93ca39dc41a45a73f", "score": "0.5408462", "text": "get currentEditor() {\n let shell = this.currentShell;\n return shell ? shell.editor : null;\n }", "title": "" }, { "docid": "5e43dd6ed94f760db6aafb45241b64bd", "score": "0.5376074", "text": "function get_corresponding_editor_id_from_menu_item(menu_item){\n\treturn $(menu_item).parents(\".codemirror_menu\").attr(\"td-editor-id\");\n}", "title": "" }, { "docid": "cd5e0df68d8a27efcc4e8921a40fd01e", "score": "0.53714", "text": "get_current_text()\n {\n let current_text = this.editor.session.getValue();\n return current_text;\n }", "title": "" }, { "docid": "c9c3b476dd566102191f4369f5bdd393", "score": "0.5366205", "text": "function TextOptionItem() { OptionItem.apply(this, arguments); }", "title": "" }, { "docid": "d52a102f373f4f49950fca546733c6f1", "score": "0.5362249", "text": "getActiveItem() {\n const items = this.getItems();\n const index = this.findActiveIndex(items);\n return items[index];\n }", "title": "" }, { "docid": "065d8c7c56418b331e41299720befb05", "score": "0.5350655", "text": "static handleTextEditArea (model) {\n const textNode = model.getItem()\n const textarea = this.createTextEditArea(model)\n textarea.focus()\n\n this.stage.find('Transformer').opacity(0)\n textNode.opacity(0)\n StageService.getItemsLayer().draw()\n }", "title": "" }, { "docid": "7203aa7e17047c2708d731fe0e98c1dc", "score": "0.53426176", "text": "isEditingItem() {\n return this.editItem != null;\n }", "title": "" }, { "docid": "caf315da56f04df72cc8476001eb4971", "score": "0.53277624", "text": "function hwEditorClickSubmission(){\n // On click to hand written UPDATING | current selected text\n\n // References \n let hwEditorContentEditor = document.getElementById('hw_editor_content_editor');\n \n currentSelectedText = {\"text\": window.getSelection().toString(), \"parent\": window.getSelection().anchorNode.parentElement};\n}", "title": "" }, { "docid": "ec813a12a162a48d0c4649c9fb82caab", "score": "0.5325871", "text": "function item(column, text) {\n this.itemText = text;\n this.itemLocation = column;\n}", "title": "" }, { "docid": "c1a1f866e120eede69370ee53e9c088d", "score": "0.53243583", "text": "iSeeTextInEditor(textToSee) {\n within({frame: \"#editview\"}, () => {\n I.see(textToSee);\n });\n }", "title": "" }, { "docid": "0d2bf7876dc70e71bb3ba390819c1935", "score": "0.5319632", "text": "getDialogItem() {\n return this.props['EDITOR_DIALOG'] ? this.props['EDITOR_DIALOG'].item : null;\n }", "title": "" }, { "docid": "9476339cdcd48ca4edb0f43c44d43797", "score": "0.5287638", "text": "function onItemChange(){\n\t\tvar objItem = g_gallery.getSelectedItem();\n\t\tt.setText(objItem.title, objItem.description);\n\t}", "title": "" }, { "docid": "a5f7034d02edec36fad066ff8be212bd", "score": "0.5283906", "text": "function edit(e) {\n if (e.target.classList.contains(\"item__text\")) {\n const textVal = e.target.innerHTML;\n const input = document.createElement(\"input\");\n input.setAttribute(\"type\", \"text\");\n input.className = (e.target.classList, \"item__edit\");\n input.value = textVal;\n const span = e.target;\n const li = e.target.parentElement;\n li.replaceChild(input, span);\n input.focus();\n }\n }", "title": "" }, { "docid": "a6069ad3c99ac4202da26b07844a3abb", "score": "0.525934", "text": "function setCurrentItem(item){\n currentItem = item\n }", "title": "" }, { "docid": "9b24d89119e0e08ed47440829f282c28", "score": "0.5258973", "text": "get editor() {\n return this._editor;\n }", "title": "" }, { "docid": "209bb8bf7e1857996d12b12d0844cd48", "score": "0.523872", "text": "getEditor() {\n return this.editor;\n }", "title": "" }, { "docid": "723e022915fdb2d637e787ad35a69391", "score": "0.52383333", "text": "getEditor() {\n return this.editor;\n }", "title": "" }, { "docid": "8e7ef51a20f48a25b13aeb65ae1e48d4", "score": "0.52355546", "text": "function handleSelectionForItem(item) {\n console.log(\"handleSelectionForItem: \" + JSON.stringify(item));\n // TODO Something more interesting than logging\n }", "title": "" }, { "docid": "754645135c5bbe6e7ec7361a08073884", "score": "0.52335954", "text": "function setActiveEditor(cm) {\n if (cm.display.wrapper.contains(document.activeElement)) {\n state.cm = cm;\n state.originalFocus = cm;\n }\n }", "title": "" }, { "docid": "0227d046c45c965815a9a353f6bd7cf1", "score": "0.5195613", "text": "get current() {\n var item = this.editor.get(this.ids[0]);\n if (!item) return null;\n\n return item.itemType == \"project\" ? null : item;\n }", "title": "" }, { "docid": "8f085ef5d40be42d3e2ba45666767454", "score": "0.5187573", "text": "function Preview( $item ) {\n\t\tthis.$item = $item;\n\t\tthis.expandedIdx = this.$item.index();\n\t\tthis.create();\n\t\tthis.update();\n\t}", "title": "" }, { "docid": "7973303551896abdbbc3eb99038928b6", "score": "0.51874745", "text": "function getActiveItem(activeItem) {\n return activeItem == null || isCreateNewItem(activeItem) ? null : activeItem;\n}", "title": "" }, { "docid": "6cad81f4dada3c35c3ade55ba2741b36", "score": "0.5185296", "text": "injectItem(item) {\n this._item = item;\n this.innerText = item.data[this.displayField];\n }", "title": "" }, { "docid": "95adb6e5e46ed37c20497f1b0e302efd", "score": "0.5149704", "text": "function makenewitem(ev,cnv) {\n let { mx,my } = getMouseCoords(ev)\n\n if(app.mode == \"shape\"){\n if(!app.selected_obj && app.insertObj(mx,my)) {\n drawCanvasRect(cnv);\n app.drawObj(cnv);\n } else {\n if(app.selected_obj){\n makeselecteditem(ev,cnv);\n\n }\n }\n }\n\n if(app.mode == \"text\"){\n var text = prompt(\"Texto a escrever\");\n if(text){\n var fontfamily = document.getElementById(\"font_family\").value\n var fontsize = document.getElementById(\"font_size\").value\n \n if(!fontsize){\n fontsize = \"12px\";\n }\n fontsize = fontsize.replace(\"px\",\"\")\n app.drawText(mx,my,fontsize,fontfamily,text);\n app.drawObj(cnv);\n }\n \n }\n}", "title": "" }, { "docid": "c3100987e3340e2176a47a0fb08ea971", "score": "0.512543", "text": "function getItemText (item) {\n return (item && $scope.itemText) ? $scope.itemText(getItemAsNameVal(item)) : null;\n }", "title": "" }, { "docid": "c3100987e3340e2176a47a0fb08ea971", "score": "0.512543", "text": "function getItemText (item) {\n return (item && $scope.itemText) ? $scope.itemText(getItemAsNameVal(item)) : null;\n }", "title": "" }, { "docid": "c3100987e3340e2176a47a0fb08ea971", "score": "0.512543", "text": "function getItemText (item) {\n return (item && $scope.itemText) ? $scope.itemText(getItemAsNameVal(item)) : null;\n }", "title": "" }, { "docid": "c3100987e3340e2176a47a0fb08ea971", "score": "0.512543", "text": "function getItemText (item) {\n return (item && $scope.itemText) ? $scope.itemText(getItemAsNameVal(item)) : null;\n }", "title": "" }, { "docid": "c3100987e3340e2176a47a0fb08ea971", "score": "0.512543", "text": "function getItemText (item) {\n return (item && $scope.itemText) ? $scope.itemText(getItemAsNameVal(item)) : null;\n }", "title": "" }, { "docid": "c3100987e3340e2176a47a0fb08ea971", "score": "0.512543", "text": "function getItemText (item) {\n return (item && $scope.itemText) ? $scope.itemText(getItemAsNameVal(item)) : null;\n }", "title": "" }, { "docid": "0d9045efbf678b5c3868322bf7ab75ce", "score": "0.5113191", "text": "function updateTextPanelText(currentItem){\n\t\t\n\t\tif(!g_objTextPanel)\n\t\t\treturn(false);\n\t\t\n\t\tif(!currentItem)\n\t\t\tvar currentItem = g_objSlider.getCurrentItem();\n\t\t\n\t\tg_objTextPanel.setTextPlain(currentItem.title, currentItem.description);\n\t}", "title": "" }, { "docid": "ad62dba226f2843e2a4a1f9ea9f245ca", "score": "0.51018333", "text": "function Preview($item) {\n this.$item = $item;\n this.expandedIdx = this.$item.index();\n this.create();\n this.update();\n }", "title": "" }, { "docid": "c47d5a6a5611263bf53505e2466d1a2d", "score": "0.5101719", "text": "function Preview($item) {\n this.$item = $item;\n this.expandedIdx = this.$item.index();\n this.create();\n this.update();\n }", "title": "" }, { "docid": "87257ed33752741bb65fb555897341ee", "score": "0.510049", "text": "function getItemText (item) {\n\t return (item && $scope.itemText) ? $scope.itemText(getItemAsNameVal(item)) : null;\n\t }", "title": "" }, { "docid": "27506bef9cec5460e16cccede35fe803", "score": "0.510047", "text": "get selectedItem_() {\n\t\tif (this.currentIndex < 0) return null;\n\t\tif (this.currentIndex >= this.items.length) return null;\n\t\treturn this.items[this.currentIndex];\n\t}", "title": "" }, { "docid": "8961bfe144e4a8d9efdeec0d05156b8b", "score": "0.5091398", "text": "editItem (id) {\n\t\tvar data = this.model.read(id).next();\n\t\tthis.view.render('editItem', {id, title: data.value[0].title});\n\t}", "title": "" }, { "docid": "287c9db56f1ef102c7bb0b58c5576a51", "score": "0.50886685", "text": "function continueToEditor(passed_text, item_pk){\n let body = document.body;\n body.innerHTML = `\n <div class=\"card z-depth-3\" id=\"hw_editor\">\n <div id=\"hw_editor_top\"> \n <p>Document Editor</p>\n <button class=\"btn red right waves-effect waves-light\" onclick=\"closeEditor()\"><i class=\"material-icons\">close</i></button>\n </div>\n <div class=\"hw_editor_content\">\n <div contenteditable=\"true\" id=\"hw_editor_content_editor\">\n ${encodeTextForUseWithEditor(passed_text)}\n </div>\n </div>\n <div id=\"hw_editor_text_modifiers\" class=\"card-action row center-align\">\n <!-- ================== Font Size -->\n <div class=\"col s2\">\n <select id=\"hw_editor_font_size_select\" onchange=\"fontSizeChangeSubmission(this)\">\n <option value=\"8\">8</option>\n <option value=\"9\">9</option>\n <option value=\"10\">10</option>\n <option value=\"12\">12</option>\n <option value=\"14\" selected>14</option>\n <option value=\"16\">16</option>\n <option value=\"18\">18</option>\n <option value=\"20\">20</option>\n <option value=\"22\">22</option>\n <option value=\"24\">24</option>\n <option value=\"26\">26</option>\n <option value=\"28\">28</option>\n <option value=\"30\">30</option>\n <option value=\"32\">32</option>\n <option value=\"34\">34</option>\n <option value=\"36\">36</option>\n <option value=\"38\">38</option>\n <option value=\"40\">40</option>\n <option value=\"42\">42</option>\n <option value=\"44\">44</option>\n <option value=\"46\">46</option>\n <option value=\"48\">48</option>\n <option value=\"50\">50</option>\n <option value=\"52\">52</option>\n <option value=\"54\">54</option>\n <option value=\"56\">56</option>\n <option value=\"58\">58</option>\n <option value=\"60\">60</option>\n <option value=\"72\">72</option>\n </select>\n </div>\n <!-- ================== Font Family -->\n <div class=\"col s4\">\n <select id=\"hw_editor_font_family_select\" onchange=\"fontFamilyChangeSubmission(this)\">\n <option value=\"'Georgia'\">Georgia</option>\n <option value=\"'serif'\">Serif</option>\n <option value=\"'Palatino Linotype'\">Palatino Linotype</option>\n <option value=\"'Book Antiqua'\">Book Antiqua</option>\n <option value=\"'Palatino'\">Palatino</option>\n <option value=\"'Times New Roman'\">Times New Roman</option>\n <option value=\"'Times'\">Times</option>\n <option value=\"'Arial'\">Arial</option>\n <option value=\"'Helvetica'\">Helvetica</option>\n <option value=\"'Arial Black'\">Arial Black</option>\n <option value=\"'Gadget'\">Gadget</option>\n <option value=\"'Comic Sans MS'\">Comic Sans MS</option>\n <option value=\"'cursive'\">Cursive</option>\n <option value=\"'Impact'\">Impact</option>\n <option value=\"'Charcoal'\">Charcoal</option>\n <option value=\"'Lucida Sans Unicode'\">Lucida Sans Unicode</option>\n <option value=\"'Lucida Grande'\">Lucida Grande</option>\n <option value=\"'Tahoma'\">Tahoma</option>\n <option value=\"'Geneva'\">Geneva</option>\n <option value=\"'Trebuchet MS'\">Trebuchet MS</option>\n <option value=\"'Helvetica'\">Helvetica</option>\n <option value=\"'Verdana'\">Verdana</option>\n <option value=\"'Courier New'\">Courier New</option>\n <option value=\"'Courier'\">Courier</option>\n <option value=\"'Lucida Console'\">Lucida Console</option>\n <option value=\"'Monaco'\">Monaco</option>\n </select>\n </div>\n </div>\n <div id=\"hw_editor_btns\" class=\"card-action\">\n <!-- ================== Color Operations -->\n <button class=\"btn waves-effect right hw_editor_option_btn\" id=\"hwEditorColorButton\" onclick=\"clickOnHwEditorColorPicker()\"><i class=\"material-icons\">format_color_fill</i></button>\n <input type=\"color\" style=\"display: none;\" id=\"hwEditorColorInput\">\n <!-- ================== Text Operations -->\n <!-- Bold -->\n <button class=\"btn blue white-text waves-effect right hw_editor_option_btn\" onclick=\"hwEditorBold()\"><i class=\"material-icons\">format_bold</i></button>\n <!-- Underline -->\n <button class=\"btn blue white-text waves-effect right hw_editor_option_btn\" onclick=\"hwEditorUnderline()\"><i class=\"material-icons\">format_underlined</i></button>\n <!-- Strikethrough -->\n <button class=\"btn blue white-text waves-effect right hw_editor_option_btn\" onclick=\"hwEditorStrike()\"><i class=\"material-icons\">format_strikethrough</i></button>\n\n <!-- ================== Text Indent -->\n <!-- Text Indent -->\n <button class=\"btn blue white-text waves-effect right hw_editor_option_btn\" onclick=\"hwTextIndent()\"><i class=\"material-icons\">format_indent_increase</i></button>\n\n <!-- Format Italic -->\n <button class=\"btn blue white-text waves-effect right hw_editor_option_btn\" onclick=\"hwTextItalic()\"><i class=\"material-icons\">format_italic</i></button>\n\n <!-- ================== Alignment -->\n <!-- Align left -->\n <button class=\"btn blue white-text waves-effect right hw_editor_option_btn\" onclick=\"hwTextAlignLeft()\"><i class=\"material-icons\">format_align_left</i></button>\n <!-- Align Center -->\n <button class=\"btn blue white-text waves-effect right hw_editor_option_btn\" onclick=\"hwTextAlignCenter()\"><i class=\"material-icons\">format_align_center</i></button>\n <!-- Align Right -->\n <button class=\"btn blue white-text waves-effect right hw_editor_option_btn\" onclick=\"hwTextAlignRight()\"><i class=\"material-icons\">format_align_right</i></button>\n\n <!-- ================== Item Lists -->\n <!-- Item UnOrdered List -->\n <button class=\"btn blue white-text waves-effect right hw_editor_option_btn\" onclick=\"hwListUnordered()\"><i class=\"material-icons\">format_list_bulleted</i></button>\n <!-- ================== Save -->\n <!-- Save Button -->\n <button id=\"hw_editor_save_btn\" class=\"btn blue white-text waves-effect right\" onclick=\"SaveHWFileChangesWithPk(${item_pk}, true)\"><i class=\"material-icons\">save</i> Save</button>\n </div>\n </div>\n ` + body.innerHTML;\n\n // Adding event listener for new inputs\n document.getElementById('hw_editor_content_editor').addEventListener('keydown', hwEditorInputSubmission);\n // Adding event listener for text selection\n document.getElementById(\"hw_editor_content_editor\").addEventListener(\"click\", hwEditorClickSubmission);\n }", "title": "" }, { "docid": "d230b587086c0454ac8d99b332397871", "score": "0.50848895", "text": "function editItem(e) {\n console.log(e.target)\n }", "title": "" }, { "docid": "5c2a4ec1b4af04172db6fcd1d2b87588", "score": "0.50812954", "text": "get selectedItem() {\n return this._selectedItem;\n }", "title": "" }, { "docid": "c1db22e8b69763994486bc430773a3d0", "score": "0.50721", "text": "activeElementNode(editor) {\n const { selection } = editor;\n return selection !== undefined && selection !== null && Range.isRange(selection) && Range.start(selection).path\n ? Node.parent(editor, Range.start(selection).path) : undefined;\n }", "title": "" }, { "docid": "fa8f18de2ca487ff62ab928ed2746efb", "score": "0.5068609", "text": "function continueToEditor(passed_text, item_pk){\n let body = document.body;\n body.innerHTML = `\n <div class=\"card z-depth-3\" id=\"hw_editor\">\n <div id=\"hw_editor_top\"> \n <p>Document Editor</p>\n <button class=\"btn red right waves-effect waves-light\" onclick=\"closeEditor()\"><i class=\"material-icons\">close</i></button>\n </div>\n <div class=\"hw_editor_content\">\n <div contenteditable=\"true\" id=\"hw_editor_content_editor\">\n ${passed_text}\n </div>\n </div>\n <div id=\"hw_editor_text_modifiers\" class=\"card-action row center-align\">\n <!-- ================== Font Size -->\n <div class=\"col s2\">\n <select id=\"hw_editor_font_size_select\" onchange=\"fontSizeChangeSubmission(this)\">\n <option value=\"8\">8</option>\n <option value=\"9\">9</option>\n <option value=\"10\">10</option>\n <option value=\"12\">12</option>\n <option value=\"14\" selected>14</option>\n <option value=\"16\">16</option>\n <option value=\"18\">18</option>\n <option value=\"20\">20</option>\n <option value=\"22\">22</option>\n <option value=\"24\">24</option>\n <option value=\"26\">26</option>\n <option value=\"28\">28</option>\n <option value=\"30\">30</option>\n <option value=\"32\">32</option>\n <option value=\"34\">34</option>\n <option value=\"36\">36</option>\n <option value=\"38\">38</option>\n <option value=\"40\">40</option>\n <option value=\"42\">42</option>\n <option value=\"44\">44</option>\n <option value=\"46\">46</option>\n <option value=\"48\">48</option>\n <option value=\"50\">50</option>\n <option value=\"52\">52</option>\n <option value=\"54\">54</option>\n <option value=\"56\">56</option>\n <option value=\"58\">58</option>\n <option value=\"60\">60</option>\n <option value=\"72\">72</option>\n </select>\n </div>\n <!-- ================== Font Family -->\n <div class=\"col s4\">\n <select id=\"hw_editor_font_family_select\" onchange=\"fontFamilyChangeSubmission(this)\">\n <option value=\"'Georgia'\">Georgia</option>\n <option value=\"'serif'\">Serif</option>\n <option value=\"'Palatino Linotype'\">Palatino Linotype</option>\n <option value=\"'Book Antiqua'\">Book Antiqua</option>\n <option value=\"'Palatino'\">Palatino</option>\n <option value=\"'Times New Roman'\">Times New Roman</option>\n <option value=\"'Times'\">Times</option>\n <option value=\"'Arial'\">Arial</option>\n <option value=\"'Helvetica'\">Helvetica</option>\n <option value=\"'Arial Black'\">Arial Black</option>\n <option value=\"'Gadget'\">Gadget</option>\n <option value=\"'Comic Sans MS'\">Comic Sans MS</option>\n <option value=\"'cursive'\">Cursive</option>\n <option value=\"'Impact'\">Impact</option>\n <option value=\"'Charcoal'\">Charcoal</option>\n <option value=\"'Lucida Sans Unicode'\">Lucida Sans Unicode</option>\n <option value=\"'Lucida Grande'\">Lucida Grande</option>\n <option value=\"'Tahoma'\">Tahoma</option>\n <option value=\"'Geneva'\">Geneva</option>\n <option value=\"'Trebuchet MS'\">Trebuchet MS</option>\n <option value=\"'Helvetica'\">Helvetica</option>\n <option value=\"'Verdana'\">Verdana</option>\n <option value=\"'Courier New'\">Courier New</option>\n <option value=\"'Courier'\">Courier</option>\n <option value=\"'Lucida Console'\">Lucida Console</option>\n <option value=\"'Monaco'\">Monaco</option>\n </select>\n </div>\n </div>\n <div id=\"hw_editor_btns\" class=\"card-action\">\n <!-- ================== Color Operations -->\n <button class=\"btn waves-effect right hw_editor_option_btn\" id=\"hwEditorColorButton\" onclick=\"clickOnHwEditorColorPicker()\"><i class=\"material-icons\">format_color_fill</i></button>\n <input type=\"color\" style=\"display: none;\" id=\"hwEditorColorInput\">\n <!-- ================== Text Operations -->\n <!-- Bold -->\n <button class=\"btn blue white-text waves-effect right hw_editor_option_btn\" onclick=\"hwEditorBold()\"><i class=\"material-icons\">format_bold</i></button>\n <!-- Underline -->\n <button class=\"btn blue white-text waves-effect right hw_editor_option_btn\" onclick=\"hwEditorUnderline()\"><i class=\"material-icons\">format_underlined</i></button>\n <!-- Strikethrough -->\n <button class=\"btn blue white-text waves-effect right hw_editor_option_btn\" onclick=\"hwEditorStrike()\"><i class=\"material-icons\">format_strikethrough</i></button>\n\n <!-- ================== Text Indent -->\n <!-- Text Indent -->\n <button class=\"btn blue white-text waves-effect right hw_editor_option_btn\" onclick=\"hwTextIndent()\"><i class=\"material-icons\">format_indent_increase</i></button>\n\n <!-- Format Italic -->\n <button class=\"btn blue white-text waves-effect right hw_editor_option_btn\" onclick=\"hwTextItalic()\"><i class=\"material-icons\">format_italic</i></button>\n\n <!-- ================== Alignment -->\n <!-- Align left -->\n <button class=\"btn blue white-text waves-effect right hw_editor_option_btn\" onclick=\"hwTextAlignLeft()\"><i class=\"material-icons\">format_align_left</i></button>\n <!-- Align Center -->\n <button class=\"btn blue white-text waves-effect right hw_editor_option_btn\" onclick=\"hwTextAlignCenter()\"><i class=\"material-icons\">format_align_center</i></button>\n <!-- Align Right -->\n <button class=\"btn blue white-text waves-effect right hw_editor_option_btn\" onclick=\"hwTextAlignRight()\"><i class=\"material-icons\">format_align_right</i></button>\n\n <!-- ================== Item Lists -->\n <!-- Item UnOrdered List -->\n <button class=\"btn blue white-text waves-effect right hw_editor_option_btn\" onclick=\"hwListUnordered()\"><i class=\"material-icons\">format_list_bulleted</i></button>\n <!-- ================== Update -->\n <!-- Update The Item Button -->\n <button id=\"hw_editor_save_btn\" class=\"btn blue white-text waves-effect right\" onclick=\"SaveHWFileChangesWithPk(${item_pk}, false)\">Update</button>\n </div>\n </div>\n ` + body.innerHTML;\n // Adding event listener for new inputs\n document.getElementById('hw_editor_content_editor').addEventListener('keydown', hwEditorInputSubmission);\n // Adding event listener for text selection\n document.getElementById(\"hw_editor_content_editor\").addEventListener(\"click\", hwEditorClickSubmission);\n }", "title": "" }, { "docid": "9b5c8a80aeca399d45f615a502c65daa", "score": "0.50675976", "text": "_newActiveItem(e) {\n this.activeItem = e.detail;\n }", "title": "" }, { "docid": "ba55138088180e592782b2954f000bcf", "score": "0.5034708", "text": "activateItem(item) {\n\t\tthis.activeItem = item;\n\t\tconst listItemTag = document.getElementById(item.id);\n\t\tlistItemTag.className = 'highlight_simple';\n\t\t// install a new onclick which prints descriptor; effectively a useon -> self/double click sort of thing for the item desc UX\n\t\tlistItemTag.onclick = () => {\n\t\t\tthis.describeItem(item);\n\t\t};\n\t}", "title": "" }, { "docid": "dc7bf659c68ce9c583323e3155bebdaa", "score": "0.5029933", "text": "get activeItemIndex() {\n return this._activeItemIndex;\n }", "title": "" }, { "docid": "dc7bf659c68ce9c583323e3155bebdaa", "score": "0.5029933", "text": "get activeItemIndex() {\n return this._activeItemIndex;\n }", "title": "" }, { "docid": "dc7bf659c68ce9c583323e3155bebdaa", "score": "0.5029933", "text": "get activeItemIndex() {\n return this._activeItemIndex;\n }", "title": "" }, { "docid": "dc7bf659c68ce9c583323e3155bebdaa", "score": "0.5029933", "text": "get activeItemIndex() {\n return this._activeItemIndex;\n }", "title": "" }, { "docid": "dc7bf659c68ce9c583323e3155bebdaa", "score": "0.5029933", "text": "get activeItemIndex() {\n return this._activeItemIndex;\n }", "title": "" }, { "docid": "86c5be91f9551b8ea3e337a9e7b01d38", "score": "0.5028182", "text": "function openItem(item) {\n toggle();\n setCurrentItem(item);\n }", "title": "" }, { "docid": "8f29520d98fe37e8fe7a1b7110465b6f", "score": "0.50112665", "text": "function getItemInfoAtIndex(lastItem, activeItem, itemIndex) {\n var item = {};\n item.type = lastItem[0];\n item.itemIndex = itemIndex;\n item.pointer = 0;\n item.parentWindow = activeItem.id;\n item.selection = [0, 0];\n item.controlPressed = false;\n\n for (var index = 0; index < activeItem.contentData.length; index++) {\n if (activeItem.contentData[index][0] === itemIndex) {\n item.data = activeItem.contentData[index];\n item.pointer = index;\n item.x = activeItem.contentArea[0] + activeItem.contentBoundaries[itemIndex][0];\n item.y = activeItem.contentArea[1] + activeItem.contentBoundaries[itemIndex][1];\n item.width = activeItem.contentBoundaries[itemIndex][2];\n item.height = activeItem.contentBoundaries[itemIndex][3];\n break;\n }\n }\n\n for (var index = 0; index < activeItem.contentActions.length; index++) {\n if (activeItem.contentActions[index][0] === itemIndex) {\n item.action = activeItem.contentActions[index][1];\n break;\n }\n }\n\n\n return item;\n }", "title": "" }, { "docid": "9d40c29cd58853eeff60675f82b9599a", "score": "0.5003353", "text": "constructor(textEditor) {\n this._textEditor = textEditor;\n // smart cursor\n this._scActive = false;\n }", "title": "" }, { "docid": "c1e1f63665e6d84b27350e798cb13f59", "score": "0.49968138", "text": "goItem() {\n // THIS COULD HAPPEN ANYWHERE SO HIDE ALL THE OTHERS\n this.view.showElementWithId(TodoGUIId.TODO_LIST, false);\n this.view.showElementWithId(TodoGUIId.TODO_HOME, false);\n\n // AND GO HOME\n this.view.showElementWithId(TodoGUIId.TODO_ITEM, true); \n }", "title": "" }, { "docid": "83b3bdb754c1d7fc668a5b28f1511874", "score": "0.49957857", "text": "function selectedItemChange(item) {\n }", "title": "" }, { "docid": "eb05dd39bc43f662970479caebdfa071", "score": "0.4990583", "text": "function onTarefaItemClick() {\n\t\tif(!$(this).is($lastClicked)) {\n\t\t\tif($lastClicked !== undefined) {\n\t\t\t\tsavePendingEdition($lastClicked);\n\t\t\t}\n\n\t\t\t$lastClicked = $(this);\n\t\t\tvar text = $lastClicked.children(\".tarefa-texto\").text();\n\t\t\tvar content = \"<input type='text' class='tarefa-edit' value='\"+ text +\"'> \"+\n\t\t\t\t\t\t\"<button type='button' id='adicionar'>Adicionar</button>\";\n\t\t\t$lastClicked.html(content);\n\n\t\t\t$(\"#btSalvar\").click(savePendingEdition);\n\t\t\t$(\".tarefa-edit\").keydown(onTarefaEditKeydown);\n\t\t}\n\t}", "title": "" }, { "docid": "f1c10507a78862cb0c12737f08285c78", "score": "0.49784204", "text": "_onEditorChange(editor) {\n let content = editor.getData();\n\n let elName = editor.name;\n if (elName === 'questionTextContainer') {\n this.props.question.text = content\n\n } else if (elName === 'solutionExplanationContainer') {\n this.props.question.feedback = content\n\n } else if (elName.indexOf('choiceContainer') > -1) {\n // console.log('editor', editor);\n let elId = editor.element.$.id;\n let idx = elId.split('-')[1]\n // console.log('editor element id', elId, idx)\n this.props.question.choices[idx].text = content;\n // console.log('content', content)\n\n\n }\n }", "title": "" }, { "docid": "91dafde0741a563b7286950570e609da", "score": "0.49732995", "text": "get item () {\n\t\treturn this._item;\n\t}", "title": "" }, { "docid": "91dafde0741a563b7286950570e609da", "score": "0.49732995", "text": "get item () {\n\t\treturn this._item;\n\t}", "title": "" }, { "docid": "2e995e9844af68fd12a363a761434972", "score": "0.49711373", "text": "function editNote() {\n currentNote = $(this).parent();\n currentColor = $(currentNote).css('backgroundColor');\n _setBackgroundColor($('#notebook__text-area'));\n const textElem = $(currentNote).children()[2];\n const noteText = $(textElem).text();\n $('#notebook__text-area').val(noteText);\n }", "title": "" }, { "docid": "aaaad4a20a6a0a4d85e92be3e5742fbd", "score": "0.4969668", "text": "function getActiveTextEditor() {\n let editor = undefined;\n if (vscode.window && vscode.window.activeTextEditor) {\n editor = vscode.window.activeTextEditor;\n }\n return editor;\n}", "title": "" }, { "docid": "42afdfabd8efac396b50f2fb4f0f4fcf", "score": "0.4965547", "text": "function commit(e) {\n if (e.keyCode === ENTER_KEYCODE) {\n if (e.target.classList.contains(\"item__edit\")) {\n const textVal = e.target.value;\n const span = document.createElement(\"span\");\n span.className = \"item__text\";\n span.innerHTML = textVal;\n const input = e.target;\n const li = e.target.parentElement;\n li.replaceChild(span, input);\n }\n }\n }", "title": "" }, { "docid": "02c26363dc7d2394849c0ac7edea6ea9", "score": "0.49634513", "text": "selectItem(event) {\n event.preventDefault()\n\n const selection = window.getSelection()\n const currentNode = selection.anchorNode.parentNode\n const currentItem = currentNode.closest('.' + this.CSS.item)\n const range = new Range()\n\n range.selectNodeContents(currentItem)\n\n selection.removeAllRanges()\n selection.addRange(range)\n }", "title": "" }, { "docid": "f97b8f56802ad3ddccf0d5cb58915046", "score": "0.4962453", "text": "getActiveBlock() {\n const rv = this.textBlocks.find((block) => block.activeText === true);\n if (typeof(rv) !== 'undefined') {\n return rv.text;\n }\n return this.textBlocks[0].text;\n }", "title": "" }, { "docid": "566b682f1e58e9d6c08de86084fd0efe", "score": "0.49579346", "text": "function onContentMenu() {\n // get selected text\n let text = window.getSelection().toString()\n if (text.length > 0) {\n selectedText.currentValue = text;\n isContextMenu = true;\n }\n}", "title": "" }, { "docid": "406e4862a9fa2a27e2f2350434f10d6f", "score": "0.4953109", "text": "function clickItemThmb(e){\n self.focus_manager.setFocusObject(self.focus_manager.ITEM_LIST);\n if(app.views.app.ctrlOrCmdKey_active){\n self.send('toggleItemInSelection', note);\n }else if(app.views.app.shiftKey_active){\n self.send('shiftClickItemSelection', note);\n }else{\n console.log(project);\n console.log(note);\n self.send('transitionNote', project, note);\n }\n }", "title": "" }, { "docid": "fed5a75c94b9d4f1ab2e15f17d59278e", "score": "0.49404576", "text": "onActivePaneChanged() {\n this.mainView.hide();\n this.currentViewState = null;\n if (atom.workspace.getActiveTextEditor() && atom.workspace.getActiveTextEditor().id) {\n this.currentViewState = this.viewToEditor[atom.workspace.getActiveTextEditor().id];\n if (this.currentViewState && this.currentViewState.isShowing) {\n this.show();\n }\n }\n }", "title": "" }, { "docid": "6072d82be2b1ac3364ca55006a97d8d3", "score": "0.49387693", "text": "function selectedItemChange(item) {\n }", "title": "" }, { "docid": "cdc30fa0d6426081ba7c0077bc5747f2", "score": "0.49327964", "text": "get editorDomElement() {\n return this._$textarea;\n }", "title": "" }, { "docid": "838e984971554d2a821971731e130341", "score": "0.49245128", "text": "activeNode(editor) {\n try {\n const [node,] = Editor.node(editor, editor.selection);\n return node;\n } catch (e) {\n return undefined;\n }\n }", "title": "" }, { "docid": "0197d52ab5a34bf47264e1a39a8aca47", "score": "0.49167958", "text": "function SelectActionNoteEditor( )\n{ }", "title": "" }, { "docid": "43690eeef9637be83ed6e3facf548933", "score": "0.49037445", "text": "getSelectedItem(){\n return this.selectedItem;\n }", "title": "" }, { "docid": "63b49c5b1c7fb804c73ad58c4978074c", "score": "0.49035046", "text": "_handleItemPress(event) {\n const item = event.detail.selectedItems[0];\n const selectedItemIndex = this._getSelectedItemIndex(item);\n this._handleSelectionChange(selectedItemIndex);\n }", "title": "" }, { "docid": "9af15a3a67c4159445922decbf67e2ba", "score": "0.4897514", "text": "function getEditor() {\n if(!editor) editor = EditorManager.getActiveEditor();\n return editor;\n }", "title": "" }, { "docid": "b128dcdc41f176f1847935699a5baa01", "score": "0.48876113", "text": "function insertPopupItem(ed, popupItem) {\n let {label, preLabel, text} = popupItem;\n let cur = ed.getCursor();\n let textBeforeCursor = ed.getText(cur.line).substring(0, cur.ch);\n let backwardsTextBeforeCursor = textBeforeCursor.split(\"\").reverse().join(\"\");\n let backwardsPreLabel = preLabel.split(\"\").reverse().join(\"\");\n\n // If there is additional text in the preLabel vs the line, then\n // just insert the entire autocomplete text. An example:\n // if you type 'a' and select '#about' from the autocomplete menu,\n // then the final text needs to the end up as '#about'.\n if (backwardsPreLabel.indexOf(backwardsTextBeforeCursor) === 0) {\n ed.replaceText(text, {line: cur.line, ch: 0}, cur);\n } else {\n ed.replaceText(text.slice(preLabel.length), cur, cur);\n }\n}", "title": "" }, { "docid": "14cc837675e4b9f21e65d6b83fa1bc73", "score": "0.48842296", "text": "function uiEditor(component, target) {}", "title": "" }, { "docid": "1e76ddaf1713c864db06eda7361f204c", "score": "0.48770052", "text": "_itemKeydownHandler(event) {\n let newItem;\n let pfeType;\n if (event.target.attributes[\"pfe-item-type\"]) {\n pfeType = event.target.attributes[\"pfe-item-type\"].value;\n }\n // active dropdown item index\n const currentIndex = this._allItems().findIndex(\n item => item === document.activeElement\n );\n switch (event.keyCode) {\n case KEYCODE.ENTER:\n this._selectItem(event.target.children[0], pfeType);\n break;\n case KEYCODE.ESC:\n this.close(event);\n break;\n case KEYCODE.RIGHT:\n case KEYCODE.DOWN:\n // get the following item\n newItem = this._itemContainer(this._nextItem(currentIndex, 1));\n break;\n case KEYCODE.LEFT:\n case KEYCODE.UP:\n // get the previous item\n newItem = this._itemContainer(this._nextItem(currentIndex, -1));\n break;\n case KEYCODE.HOME:\n newItem = this._firstItem();\n break;\n case KEYCODE.END:\n newItem = this._lastItem();\n break;\n case KEYCODE.TAB:\n this.close();\n break;\n default:\n break;\n }\n if (newItem) {\n newItem.setAttribute(\"tabindex\", \"-1\");\n newItem.focus();\n }\n return this;\n }", "title": "" }, { "docid": "8d72d0814fc2bfbd0e0b4541ae858cbd", "score": "0.4876947", "text": "openEditorWithPics(item, picsCount, stuffToDoInEditor) {\n this.openEditorFromIndex(item, stuffToDoInEditor, picsCount);\n }", "title": "" }, { "docid": "e74683235c3c39b4d1ca09a67e3509f8", "score": "0.4859596", "text": "function editItem() {\n document.getElementById('textbox').style.visibility = 'hidden';\n document.getElementById('add').style.visibility = 'hidden';\n document.getElementById('editbox').style.visibility = 'visible';\n document.getElementById('save').style.visibility = 'visible';\n document.getElementById(\"editbox\").focus();\n var li = this.parentNode;\n var item = li.getElementsByTagName(\"*\");\n var textbox = document.getElementById(\"editbox\");\n editbox.value = item[1].innerHTML;\n itemId = item[1].id;\n}", "title": "" }, { "docid": "5bd36bec55513528c7c80ae478687038", "score": "0.48578265", "text": "function handleEditItemStart(event) {\n var input = $(this).find(\"input[type=text]\");\n var span = $(this).find(\"span\");\n\n span.hide();\n input.show().focus();\n}", "title": "" }, { "docid": "de732a2379690068bdc3c2a7ff5d864c", "score": "0.48458984", "text": "isCurrentItem(item) {\r\n var _a, _b;\r\n if (!this.currentItem || !this.currentItem.value) {\r\n return false;\r\n }\r\n return ((_a = this.currentItem) === null || _a === void 0 ? void 0 : _a.value) === (item === null || item === void 0 ? void 0 : item[(_b = this.currentItem) === null || _b === void 0 ? void 0 : _b.property]);\r\n }", "title": "" }, { "docid": "604d9b5914b9b3906688f4c9b6cea306", "score": "0.48451734", "text": "addItemToForm(item) {\n inputTaskTitle.value = item.name;\n inputProjectTitle.value = item.project;\n inputPriority.value = item.priority;\n inputTaskDescribe.value = item.description;\n }", "title": "" } ]
cf082e89bafd2e1547f2048421915e88
Simplified test for values allowed as the first character in plain style.
[ { "docid": "ed069f04baba4f1baf814150d736a7ef", "score": "0.68719757", "text": "function isPlainSafeFirst(c) {\n // Uses a subset of ns-char - c-indicator\n // where ns-char = nb-char - s-white.\n return isPrintable(c) && c !== 0xFEFF\n && !isWhitespace(c) // - s-white\n // - (c-indicator ::=\n // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}”\n && c !== CHAR_MINUS\n && c !== CHAR_QUESTION\n && c !== CHAR_COLON\n && c !== CHAR_COMMA\n && c !== CHAR_LEFT_SQUARE_BRACKET\n && c !== CHAR_RIGHT_SQUARE_BRACKET\n && c !== CHAR_LEFT_CURLY_BRACKET\n && c !== CHAR_RIGHT_CURLY_BRACKET\n // | “#” | “&” | “*” | “!” | “|” | “>” | “'” | “\"”\n && c !== CHAR_SHARP\n && c !== CHAR_AMPERSAND\n && c !== CHAR_ASTERISK\n && c !== CHAR_EXCLAMATION\n && c !== CHAR_VERTICAL_LINE\n && c !== CHAR_GREATER_THAN\n && c !== CHAR_SINGLE_QUOTE\n && c !== CHAR_DOUBLE_QUOTE\n // | “%” | “@” | “`”)\n && c !== CHAR_PERCENT\n && c !== CHAR_COMMERCIAL_AT\n && c !== CHAR_GRAVE_ACCENT;\n}", "title": "" } ]
[ { "docid": "aa47cc17b462b33825cf530eacbd9d18", "score": "0.713633", "text": "function isPlainSafeFirst(c) {\n // Uses a subset of ns-char - c-indicator\n // where ns-char = nb-char - s-white.\n return isPrintable(c) && c !== 65279 && !isWhitespace(c) && c !== CHAR_MINUS && c !== CHAR_QUESTION && c !== CHAR_COLON && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET && c !== CHAR_SHARP && c !== CHAR_AMPERSAND && c !== CHAR_ASTERISK && c !== CHAR_EXCLAMATION && c !== CHAR_VERTICAL_LINE && c !== CHAR_GREATER_THAN && c !== CHAR_SINGLE_QUOTE && c !== CHAR_DOUBLE_QUOTE && c !== CHAR_PERCENT && c !== CHAR_COMMERCIAL_AT && c !== CHAR_GRAVE_ACCENT;\n }", "title": "" }, { "docid": "27832516fee1eaa444a2828029c899b7", "score": "0.69060594", "text": "function isPlainSafeFirst(c) {\n // Uses a subset of ns-char - c-indicator\n // where ns-char = nb-char - s-white.\n return isPrintable(c) && c !== 0xFEFF\n && !isWhitespace(c) // - s-white\n // - (c-indicator ::=\n // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}”\n && c !== CHAR_MINUS\n && c !== CHAR_QUESTION\n && c !== CHAR_COLON\n && c !== CHAR_COMMA\n && c !== CHAR_LEFT_SQUARE_BRACKET\n && c !== CHAR_RIGHT_SQUARE_BRACKET\n && c !== CHAR_LEFT_CURLY_BRACKET\n && c !== CHAR_RIGHT_CURLY_BRACKET\n // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “\"”\n && c !== CHAR_SHARP\n && c !== CHAR_AMPERSAND\n && c !== CHAR_ASTERISK\n && c !== CHAR_EXCLAMATION\n && c !== CHAR_VERTICAL_LINE\n && c !== CHAR_EQUALS\n && c !== CHAR_GREATER_THAN\n && c !== CHAR_SINGLE_QUOTE\n && c !== CHAR_DOUBLE_QUOTE\n // | “%” | “@” | “`”)\n && c !== CHAR_PERCENT\n && c !== CHAR_COMMERCIAL_AT\n && c !== CHAR_GRAVE_ACCENT;\n}", "title": "" }, { "docid": "27832516fee1eaa444a2828029c899b7", "score": "0.69060594", "text": "function isPlainSafeFirst(c) {\n // Uses a subset of ns-char - c-indicator\n // where ns-char = nb-char - s-white.\n return isPrintable(c) && c !== 0xFEFF\n && !isWhitespace(c) // - s-white\n // - (c-indicator ::=\n // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}”\n && c !== CHAR_MINUS\n && c !== CHAR_QUESTION\n && c !== CHAR_COLON\n && c !== CHAR_COMMA\n && c !== CHAR_LEFT_SQUARE_BRACKET\n && c !== CHAR_RIGHT_SQUARE_BRACKET\n && c !== CHAR_LEFT_CURLY_BRACKET\n && c !== CHAR_RIGHT_CURLY_BRACKET\n // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “\"”\n && c !== CHAR_SHARP\n && c !== CHAR_AMPERSAND\n && c !== CHAR_ASTERISK\n && c !== CHAR_EXCLAMATION\n && c !== CHAR_VERTICAL_LINE\n && c !== CHAR_EQUALS\n && c !== CHAR_GREATER_THAN\n && c !== CHAR_SINGLE_QUOTE\n && c !== CHAR_DOUBLE_QUOTE\n // | “%” | “@” | “`”)\n && c !== CHAR_PERCENT\n && c !== CHAR_COMMERCIAL_AT\n && c !== CHAR_GRAVE_ACCENT;\n}", "title": "" }, { "docid": "27832516fee1eaa444a2828029c899b7", "score": "0.69060594", "text": "function isPlainSafeFirst(c) {\n // Uses a subset of ns-char - c-indicator\n // where ns-char = nb-char - s-white.\n return isPrintable(c) && c !== 0xFEFF\n && !isWhitespace(c) // - s-white\n // - (c-indicator ::=\n // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}”\n && c !== CHAR_MINUS\n && c !== CHAR_QUESTION\n && c !== CHAR_COLON\n && c !== CHAR_COMMA\n && c !== CHAR_LEFT_SQUARE_BRACKET\n && c !== CHAR_RIGHT_SQUARE_BRACKET\n && c !== CHAR_LEFT_CURLY_BRACKET\n && c !== CHAR_RIGHT_CURLY_BRACKET\n // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “\"”\n && c !== CHAR_SHARP\n && c !== CHAR_AMPERSAND\n && c !== CHAR_ASTERISK\n && c !== CHAR_EXCLAMATION\n && c !== CHAR_VERTICAL_LINE\n && c !== CHAR_EQUALS\n && c !== CHAR_GREATER_THAN\n && c !== CHAR_SINGLE_QUOTE\n && c !== CHAR_DOUBLE_QUOTE\n // | “%” | “@” | “`”)\n && c !== CHAR_PERCENT\n && c !== CHAR_COMMERCIAL_AT\n && c !== CHAR_GRAVE_ACCENT;\n}", "title": "" }, { "docid": "27832516fee1eaa444a2828029c899b7", "score": "0.69060594", "text": "function isPlainSafeFirst(c) {\n // Uses a subset of ns-char - c-indicator\n // where ns-char = nb-char - s-white.\n return isPrintable(c) && c !== 0xFEFF\n && !isWhitespace(c) // - s-white\n // - (c-indicator ::=\n // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}”\n && c !== CHAR_MINUS\n && c !== CHAR_QUESTION\n && c !== CHAR_COLON\n && c !== CHAR_COMMA\n && c !== CHAR_LEFT_SQUARE_BRACKET\n && c !== CHAR_RIGHT_SQUARE_BRACKET\n && c !== CHAR_LEFT_CURLY_BRACKET\n && c !== CHAR_RIGHT_CURLY_BRACKET\n // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “\"”\n && c !== CHAR_SHARP\n && c !== CHAR_AMPERSAND\n && c !== CHAR_ASTERISK\n && c !== CHAR_EXCLAMATION\n && c !== CHAR_VERTICAL_LINE\n && c !== CHAR_EQUALS\n && c !== CHAR_GREATER_THAN\n && c !== CHAR_SINGLE_QUOTE\n && c !== CHAR_DOUBLE_QUOTE\n // | “%” | “@” | “`”)\n && c !== CHAR_PERCENT\n && c !== CHAR_COMMERCIAL_AT\n && c !== CHAR_GRAVE_ACCENT;\n}", "title": "" }, { "docid": "27832516fee1eaa444a2828029c899b7", "score": "0.69060594", "text": "function isPlainSafeFirst(c) {\n // Uses a subset of ns-char - c-indicator\n // where ns-char = nb-char - s-white.\n return isPrintable(c) && c !== 0xFEFF\n && !isWhitespace(c) // - s-white\n // - (c-indicator ::=\n // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}”\n && c !== CHAR_MINUS\n && c !== CHAR_QUESTION\n && c !== CHAR_COLON\n && c !== CHAR_COMMA\n && c !== CHAR_LEFT_SQUARE_BRACKET\n && c !== CHAR_RIGHT_SQUARE_BRACKET\n && c !== CHAR_LEFT_CURLY_BRACKET\n && c !== CHAR_RIGHT_CURLY_BRACKET\n // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “\"”\n && c !== CHAR_SHARP\n && c !== CHAR_AMPERSAND\n && c !== CHAR_ASTERISK\n && c !== CHAR_EXCLAMATION\n && c !== CHAR_VERTICAL_LINE\n && c !== CHAR_EQUALS\n && c !== CHAR_GREATER_THAN\n && c !== CHAR_SINGLE_QUOTE\n && c !== CHAR_DOUBLE_QUOTE\n // | “%” | “@” | “`”)\n && c !== CHAR_PERCENT\n && c !== CHAR_COMMERCIAL_AT\n && c !== CHAR_GRAVE_ACCENT;\n}", "title": "" }, { "docid": "27832516fee1eaa444a2828029c899b7", "score": "0.69060594", "text": "function isPlainSafeFirst(c) {\n // Uses a subset of ns-char - c-indicator\n // where ns-char = nb-char - s-white.\n return isPrintable(c) && c !== 0xFEFF\n && !isWhitespace(c) // - s-white\n // - (c-indicator ::=\n // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}”\n && c !== CHAR_MINUS\n && c !== CHAR_QUESTION\n && c !== CHAR_COLON\n && c !== CHAR_COMMA\n && c !== CHAR_LEFT_SQUARE_BRACKET\n && c !== CHAR_RIGHT_SQUARE_BRACKET\n && c !== CHAR_LEFT_CURLY_BRACKET\n && c !== CHAR_RIGHT_CURLY_BRACKET\n // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “\"”\n && c !== CHAR_SHARP\n && c !== CHAR_AMPERSAND\n && c !== CHAR_ASTERISK\n && c !== CHAR_EXCLAMATION\n && c !== CHAR_VERTICAL_LINE\n && c !== CHAR_EQUALS\n && c !== CHAR_GREATER_THAN\n && c !== CHAR_SINGLE_QUOTE\n && c !== CHAR_DOUBLE_QUOTE\n // | “%” | “@” | “`”)\n && c !== CHAR_PERCENT\n && c !== CHAR_COMMERCIAL_AT\n && c !== CHAR_GRAVE_ACCENT;\n}", "title": "" }, { "docid": "27832516fee1eaa444a2828029c899b7", "score": "0.69060594", "text": "function isPlainSafeFirst(c) {\n // Uses a subset of ns-char - c-indicator\n // where ns-char = nb-char - s-white.\n return isPrintable(c) && c !== 0xFEFF\n && !isWhitespace(c) // - s-white\n // - (c-indicator ::=\n // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}”\n && c !== CHAR_MINUS\n && c !== CHAR_QUESTION\n && c !== CHAR_COLON\n && c !== CHAR_COMMA\n && c !== CHAR_LEFT_SQUARE_BRACKET\n && c !== CHAR_RIGHT_SQUARE_BRACKET\n && c !== CHAR_LEFT_CURLY_BRACKET\n && c !== CHAR_RIGHT_CURLY_BRACKET\n // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “\"”\n && c !== CHAR_SHARP\n && c !== CHAR_AMPERSAND\n && c !== CHAR_ASTERISK\n && c !== CHAR_EXCLAMATION\n && c !== CHAR_VERTICAL_LINE\n && c !== CHAR_EQUALS\n && c !== CHAR_GREATER_THAN\n && c !== CHAR_SINGLE_QUOTE\n && c !== CHAR_DOUBLE_QUOTE\n // | “%” | “@” | “`”)\n && c !== CHAR_PERCENT\n && c !== CHAR_COMMERCIAL_AT\n && c !== CHAR_GRAVE_ACCENT;\n}", "title": "" }, { "docid": "27832516fee1eaa444a2828029c899b7", "score": "0.69060594", "text": "function isPlainSafeFirst(c) {\n // Uses a subset of ns-char - c-indicator\n // where ns-char = nb-char - s-white.\n return isPrintable(c) && c !== 0xFEFF\n && !isWhitespace(c) // - s-white\n // - (c-indicator ::=\n // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}”\n && c !== CHAR_MINUS\n && c !== CHAR_QUESTION\n && c !== CHAR_COLON\n && c !== CHAR_COMMA\n && c !== CHAR_LEFT_SQUARE_BRACKET\n && c !== CHAR_RIGHT_SQUARE_BRACKET\n && c !== CHAR_LEFT_CURLY_BRACKET\n && c !== CHAR_RIGHT_CURLY_BRACKET\n // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “\"”\n && c !== CHAR_SHARP\n && c !== CHAR_AMPERSAND\n && c !== CHAR_ASTERISK\n && c !== CHAR_EXCLAMATION\n && c !== CHAR_VERTICAL_LINE\n && c !== CHAR_EQUALS\n && c !== CHAR_GREATER_THAN\n && c !== CHAR_SINGLE_QUOTE\n && c !== CHAR_DOUBLE_QUOTE\n // | “%” | “@” | “`”)\n && c !== CHAR_PERCENT\n && c !== CHAR_COMMERCIAL_AT\n && c !== CHAR_GRAVE_ACCENT;\n}", "title": "" }, { "docid": "27832516fee1eaa444a2828029c899b7", "score": "0.69060594", "text": "function isPlainSafeFirst(c) {\n // Uses a subset of ns-char - c-indicator\n // where ns-char = nb-char - s-white.\n return isPrintable(c) && c !== 0xFEFF\n && !isWhitespace(c) // - s-white\n // - (c-indicator ::=\n // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}”\n && c !== CHAR_MINUS\n && c !== CHAR_QUESTION\n && c !== CHAR_COLON\n && c !== CHAR_COMMA\n && c !== CHAR_LEFT_SQUARE_BRACKET\n && c !== CHAR_RIGHT_SQUARE_BRACKET\n && c !== CHAR_LEFT_CURLY_BRACKET\n && c !== CHAR_RIGHT_CURLY_BRACKET\n // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “\"”\n && c !== CHAR_SHARP\n && c !== CHAR_AMPERSAND\n && c !== CHAR_ASTERISK\n && c !== CHAR_EXCLAMATION\n && c !== CHAR_VERTICAL_LINE\n && c !== CHAR_EQUALS\n && c !== CHAR_GREATER_THAN\n && c !== CHAR_SINGLE_QUOTE\n && c !== CHAR_DOUBLE_QUOTE\n // | “%” | “@” | “`”)\n && c !== CHAR_PERCENT\n && c !== CHAR_COMMERCIAL_AT\n && c !== CHAR_GRAVE_ACCENT;\n}", "title": "" }, { "docid": "27832516fee1eaa444a2828029c899b7", "score": "0.69060594", "text": "function isPlainSafeFirst(c) {\n // Uses a subset of ns-char - c-indicator\n // where ns-char = nb-char - s-white.\n return isPrintable(c) && c !== 0xFEFF\n && !isWhitespace(c) // - s-white\n // - (c-indicator ::=\n // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}”\n && c !== CHAR_MINUS\n && c !== CHAR_QUESTION\n && c !== CHAR_COLON\n && c !== CHAR_COMMA\n && c !== CHAR_LEFT_SQUARE_BRACKET\n && c !== CHAR_RIGHT_SQUARE_BRACKET\n && c !== CHAR_LEFT_CURLY_BRACKET\n && c !== CHAR_RIGHT_CURLY_BRACKET\n // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “\"”\n && c !== CHAR_SHARP\n && c !== CHAR_AMPERSAND\n && c !== CHAR_ASTERISK\n && c !== CHAR_EXCLAMATION\n && c !== CHAR_VERTICAL_LINE\n && c !== CHAR_EQUALS\n && c !== CHAR_GREATER_THAN\n && c !== CHAR_SINGLE_QUOTE\n && c !== CHAR_DOUBLE_QUOTE\n // | “%” | “@” | “`”)\n && c !== CHAR_PERCENT\n && c !== CHAR_COMMERCIAL_AT\n && c !== CHAR_GRAVE_ACCENT;\n}", "title": "" }, { "docid": "27832516fee1eaa444a2828029c899b7", "score": "0.69060594", "text": "function isPlainSafeFirst(c) {\n // Uses a subset of ns-char - c-indicator\n // where ns-char = nb-char - s-white.\n return isPrintable(c) && c !== 0xFEFF\n && !isWhitespace(c) // - s-white\n // - (c-indicator ::=\n // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}”\n && c !== CHAR_MINUS\n && c !== CHAR_QUESTION\n && c !== CHAR_COLON\n && c !== CHAR_COMMA\n && c !== CHAR_LEFT_SQUARE_BRACKET\n && c !== CHAR_RIGHT_SQUARE_BRACKET\n && c !== CHAR_LEFT_CURLY_BRACKET\n && c !== CHAR_RIGHT_CURLY_BRACKET\n // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “\"”\n && c !== CHAR_SHARP\n && c !== CHAR_AMPERSAND\n && c !== CHAR_ASTERISK\n && c !== CHAR_EXCLAMATION\n && c !== CHAR_VERTICAL_LINE\n && c !== CHAR_EQUALS\n && c !== CHAR_GREATER_THAN\n && c !== CHAR_SINGLE_QUOTE\n && c !== CHAR_DOUBLE_QUOTE\n // | “%” | “@” | “`”)\n && c !== CHAR_PERCENT\n && c !== CHAR_COMMERCIAL_AT\n && c !== CHAR_GRAVE_ACCENT;\n}", "title": "" }, { "docid": "792fb3fbc9a822672a23bd60cebef28f", "score": "0.6863158", "text": "function isPlainSafeFirst(c) {\n // Uses a subset of ns-char - c-indicator\n // where ns-char = nb-char - s-white.\n return isPrintable(c) && c !== 0xFEFF && !isWhitespace(c) // - s-white\n // - (c-indicator ::=\n // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}”\n && c !== CHAR_MINUS && c !== CHAR_QUESTION && c !== CHAR_COLON && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET\n // | “#” | “&” | “*” | “!” | “|” | “>” | “'” | “\"”\n && c !== CHAR_SHARP && c !== CHAR_AMPERSAND && c !== CHAR_ASTERISK && c !== CHAR_EXCLAMATION && c !== CHAR_VERTICAL_LINE && c !== CHAR_GREATER_THAN && c !== CHAR_SINGLE_QUOTE && c !== CHAR_DOUBLE_QUOTE\n // | “%” | “@” | “`”)\n && c !== CHAR_PERCENT && c !== CHAR_COMMERCIAL_AT && c !== CHAR_GRAVE_ACCENT;\n}", "title": "" }, { "docid": "7755dcb35c8f0c8a83bc2c9b76122213", "score": "0.6699953", "text": "function isPlainSafeFirst(c) {\n // Uses a subset of ns-char - c-indicator\n // where ns-char = nb-char - s-white.\n // No support of ( ( “?” | “:” | “-” ) /* Followed by an ns-plain-safe(c)) */ ) part\n return isPrintable(c) && c !== CHAR_BOM\n && !isWhitespace(c) // - s-white\n // - (c-indicator ::=\n // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}”\n && c !== CHAR_MINUS\n && c !== CHAR_QUESTION\n && c !== CHAR_COLON\n && c !== CHAR_COMMA\n && c !== CHAR_LEFT_SQUARE_BRACKET\n && c !== CHAR_RIGHT_SQUARE_BRACKET\n && c !== CHAR_LEFT_CURLY_BRACKET\n && c !== CHAR_RIGHT_CURLY_BRACKET\n // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “\"”\n && c !== CHAR_SHARP\n && c !== CHAR_AMPERSAND\n && c !== CHAR_ASTERISK\n && c !== CHAR_EXCLAMATION\n && c !== CHAR_VERTICAL_LINE\n && c !== CHAR_EQUALS\n && c !== CHAR_GREATER_THAN\n && c !== CHAR_SINGLE_QUOTE\n && c !== CHAR_DOUBLE_QUOTE\n // | “%” | “@” | “`”)\n && c !== CHAR_PERCENT\n && c !== CHAR_COMMERCIAL_AT\n && c !== CHAR_GRAVE_ACCENT;\n}", "title": "" }, { "docid": "7755dcb35c8f0c8a83bc2c9b76122213", "score": "0.6699953", "text": "function isPlainSafeFirst(c) {\n // Uses a subset of ns-char - c-indicator\n // where ns-char = nb-char - s-white.\n // No support of ( ( “?” | “:” | “-” ) /* Followed by an ns-plain-safe(c)) */ ) part\n return isPrintable(c) && c !== CHAR_BOM\n && !isWhitespace(c) // - s-white\n // - (c-indicator ::=\n // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}”\n && c !== CHAR_MINUS\n && c !== CHAR_QUESTION\n && c !== CHAR_COLON\n && c !== CHAR_COMMA\n && c !== CHAR_LEFT_SQUARE_BRACKET\n && c !== CHAR_RIGHT_SQUARE_BRACKET\n && c !== CHAR_LEFT_CURLY_BRACKET\n && c !== CHAR_RIGHT_CURLY_BRACKET\n // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “\"”\n && c !== CHAR_SHARP\n && c !== CHAR_AMPERSAND\n && c !== CHAR_ASTERISK\n && c !== CHAR_EXCLAMATION\n && c !== CHAR_VERTICAL_LINE\n && c !== CHAR_EQUALS\n && c !== CHAR_GREATER_THAN\n && c !== CHAR_SINGLE_QUOTE\n && c !== CHAR_DOUBLE_QUOTE\n // | “%” | “@” | “`”)\n && c !== CHAR_PERCENT\n && c !== CHAR_COMMERCIAL_AT\n && c !== CHAR_GRAVE_ACCENT;\n}", "title": "" }, { "docid": "7755dcb35c8f0c8a83bc2c9b76122213", "score": "0.6699953", "text": "function isPlainSafeFirst(c) {\n // Uses a subset of ns-char - c-indicator\n // where ns-char = nb-char - s-white.\n // No support of ( ( “?” | “:” | “-” ) /* Followed by an ns-plain-safe(c)) */ ) part\n return isPrintable(c) && c !== CHAR_BOM\n && !isWhitespace(c) // - s-white\n // - (c-indicator ::=\n // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}”\n && c !== CHAR_MINUS\n && c !== CHAR_QUESTION\n && c !== CHAR_COLON\n && c !== CHAR_COMMA\n && c !== CHAR_LEFT_SQUARE_BRACKET\n && c !== CHAR_RIGHT_SQUARE_BRACKET\n && c !== CHAR_LEFT_CURLY_BRACKET\n && c !== CHAR_RIGHT_CURLY_BRACKET\n // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “\"”\n && c !== CHAR_SHARP\n && c !== CHAR_AMPERSAND\n && c !== CHAR_ASTERISK\n && c !== CHAR_EXCLAMATION\n && c !== CHAR_VERTICAL_LINE\n && c !== CHAR_EQUALS\n && c !== CHAR_GREATER_THAN\n && c !== CHAR_SINGLE_QUOTE\n && c !== CHAR_DOUBLE_QUOTE\n // | “%” | “@” | “`”)\n && c !== CHAR_PERCENT\n && c !== CHAR_COMMERCIAL_AT\n && c !== CHAR_GRAVE_ACCENT;\n}", "title": "" }, { "docid": "a4becf38459d0081c2e9cc7b8877434b", "score": "0.65647924", "text": "function getFirstChar(value) {\n const result = value.charAt(0);\n return result;\n}", "title": "" }, { "docid": "8884268d010db275b10b024e0d43d278", "score": "0.6509111", "text": "function isCharfirst(Controlname) \n {\n\t var objError \t = new ErrorAlert();\n var msg=objError.strFstchar\n\t var str2\t=\tdocument.getElementById(Controlname);\n\t var strInput = new String(str2.value);\n \n for(var i = 0; i < strInput.length; i++)\n {\n var str=strInput.charAt(0) \n if (!isNaN(str)) \t\t \n {\n alert(msg)\n str2.focus()\n return false;\n }\n else\n {\n return true;\n }\n }\n }", "title": "" }, { "docid": "f672168ebdde455af74bdfa111c8c21a", "score": "0.6470828", "text": "function checkNifFirstCharacter(fullValue){\n\tvar fchar = fullValue.substring(0,1);\n\n\tvar validDigits = [\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"K\",\"L\",\"M\",\"X\",\"Y\",\"Z\"];\n\n\tfor (var a =0; a < validDigits.length; a++){\n\t\tif (fchar == validDigits[a])\n\t\t\treturn true;\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "a9847b6ca31c0bfa2e003bf5e3ef50e7", "score": "0.64009035", "text": "function firstCharA(name) {\n // return name.charAt(0)== \"A\"\n return name[0] == \"A\"\n }", "title": "" }, { "docid": "7c9379454846263cea8b6fc924ea9a94", "score": "0.6386781", "text": "function chars(input){\n return true; // default validation only\n}", "title": "" }, { "docid": "7c9379454846263cea8b6fc924ea9a94", "score": "0.6386781", "text": "function chars(input){\n return true; // default validation only\n}", "title": "" }, { "docid": "7c9379454846263cea8b6fc924ea9a94", "score": "0.6386781", "text": "function chars(input){\n return true; // default validation only\n}", "title": "" }, { "docid": "7c9379454846263cea8b6fc924ea9a94", "score": "0.6386781", "text": "function chars(input){\n return true; // default validation only\n}", "title": "" }, { "docid": "7c9379454846263cea8b6fc924ea9a94", "score": "0.6386781", "text": "function chars(input){\n return true; // default validation only\n}", "title": "" }, { "docid": "7c9379454846263cea8b6fc924ea9a94", "score": "0.6386781", "text": "function chars(input){\n return true; // default validation only\n}", "title": "" }, { "docid": "7c9379454846263cea8b6fc924ea9a94", "score": "0.6386781", "text": "function chars(input){\n return true; // default validation only\n}", "title": "" }, { "docid": "7c9379454846263cea8b6fc924ea9a94", "score": "0.6386781", "text": "function chars(input){\n return true; // default validation only\n}", "title": "" }, { "docid": "7c9379454846263cea8b6fc924ea9a94", "score": "0.6386781", "text": "function chars(input){\n return true; // default validation only\n}", "title": "" }, { "docid": "7c9379454846263cea8b6fc924ea9a94", "score": "0.6386781", "text": "function chars(input){\n return true; // default validation only\n}", "title": "" }, { "docid": "7c9379454846263cea8b6fc924ea9a94", "score": "0.6386781", "text": "function chars(input){\n return true; // default validation only\n}", "title": "" }, { "docid": "7c9379454846263cea8b6fc924ea9a94", "score": "0.6386781", "text": "function chars(input){\n return true; // default validation only\n}", "title": "" }, { "docid": "95ecfd86228f1a57a8207f9ad27898e5", "score": "0.6319753", "text": "function chars(input){\r\n return true; // default validation only\r\n}", "title": "" }, { "docid": "473e26544b984779447f10210bea9613", "score": "0.629039", "text": "function chars(input) {\n return true; // default validation only\n}", "title": "" }, { "docid": "1e9bbf82206aba6a05ae21c0635ce48a", "score": "0.6250859", "text": "function hasMinChars(value = null) {\n return (value.length >= validation.charMin);\n }", "title": "" }, { "docid": "063b81aebe1cb708f5327921b5e56e58", "score": "0.60949993", "text": "function chars(input){\n return isNaN(input)|| input == \"\";\n}", "title": "" }, { "docid": "7a6d01e9a4d5cb19a9380b2b3d519c22", "score": "0.6048622", "text": "function restrictSpecialCharacter(ele) {\n var filter = /^[a-zA-Z ]*$/;\n return (filter.test(ele.val()));\n }", "title": "" }, { "docid": "f3311af2696cec4a9b4a14691e11a900", "score": "0.60384315", "text": "function chars(input){ \n return true; \n}", "title": "" }, { "docid": "fcb0a29a3f8a450d8d41354bb64a00c0", "score": "0.60261536", "text": "isAscii(value){\n // TODO\n return value\n }", "title": "" }, { "docid": "9bc973f733e1a0c688368e166eebd0fa", "score": "0.5997192", "text": "function firstChar(name) {\n var trimName = name.trim();\n return trimName.charAt(0);\n}", "title": "" }, { "docid": "132664acb61a7359a3e8374eec9cc220", "score": "0.599609", "text": "function checkInp(c) {\n var regex=/^[a-zA-Z]+$/;\n return c.match(regex) && c.length == 1;\n}", "title": "" }, { "docid": "1510d194cbfada0a8392b016dc6352c5", "score": "0.5978397", "text": "function validateSimpleKeys(...keys) {\n keys.forEach((key) => {\n if (key && typeof key === 'string' && key.charAt(0) === COMPOSITEKEY_NS) {\n throw new Error(`first character of the key [${key}] contains a null character which is not allowed`);\n }\n });\n}", "title": "" }, { "docid": "3e9380ea70d0c0d96db8fdfc54e7a812", "score": "0.59516996", "text": "function acc_checkCharBegin(obj){\n\tif(obj.charAt(0) == '.' || obj.charAt(0) == '_'){\n\t\treturn false;\t\n\t}\t\n\treturn true;\n}", "title": "" }, { "docid": "9a2ef0ae628b0d25d2dde2cb780db805", "score": "0.59264356", "text": "function firstChar(str) {\n return str.trim();\n}", "title": "" }, { "docid": "bd9a82cb84b354c743f080eaf1fad16b", "score": "0.59131765", "text": "function valider(value) {\n let regex = /[^A-Z a-z]+/g;\n return !value.match(regex);\n}", "title": "" }, { "docid": "5b481cd6ad8284eb905078123cede39b", "score": "0.5902216", "text": "containsCharacter(field) {\n if(/(?=.*\\d)(?=.*[a-z])(?=.*[A-Z])/.test(field.value)){\n return true;\n }else{\n this.setInvalid(field, `${field.name} must contain upper lower case letter and a number`);\n return false;\n }\n}", "title": "" }, { "docid": "dbf5a23b20cd05b27e91ea4b6cf746a2", "score": "0.5856552", "text": "function chkfirstletter(e,event)\n{\n var temp=0;\n \n var key;\n temp=eval(document.getElementById(e.id).value.length);\n \n if (temp == 0 )\n { \n if(window.event) \n\t {\n key = event.keyCode; \n \n if ((key > 64 && key < 91) || (key > 96 && key < 123) || key == 8 ) \n { \n \n return true; \n }\n else\n {\n return false;\n }\n }\n else\n {\n \n return false; \n } \n }\n else\n {\n return chk = onlyAlphaNumChkSpace(e,event);\n }\n}", "title": "" }, { "docid": "13c0f6bb25440335e1e0a73b37492330", "score": "0.58530366", "text": "function\nprefmtok(x)\n{\n\tif (x === null) {\n\t\treturn (true);\n\t}\n\n\tvar cc_A = 'A'.charCodeAt(0);\n\tvar cc_a = 'a'.charCodeAt(0);\n\tvar cc_Z = 'Z'.charCodeAt(0);\n\tvar cc_z = 'z'.charCodeAt(0);\n\n\tvar cc = x.charCodeAt(0);\n\n\tif ((cc >= cc_A && cc <= cc_Z) ||\n\t (cc >= cc_a && cc <= cc_z)) {\n\t\treturn (false);\n\t}\n\n\treturn (true);\n}", "title": "" }, { "docid": "bca346eb167716d819d8b27ae195cd88", "score": "0.5852017", "text": "function acc_checkCharContinuous(obj){\n\tif(obj.indexOf('._') != -1 || obj.indexOf('_.') != -1 || obj.indexOf('__') != -1 || obj.indexOf('..') != -1){\n\t\treturn false;\n\t}\t\n\treturn true;\n}", "title": "" }, { "docid": "600539571d4564a29479a95fd89a3975", "score": "0.5843401", "text": "function first(input) {\n return input.charAt(0);\n}", "title": "" }, { "docid": "d9f7f61f7a2ad57ad405ac3847b19504", "score": "0.5797307", "text": "function alphanumerical(character) {\n return isAlphabetical(character) || isDecimal(character)\n }", "title": "" }, { "docid": "bf2fc19dcf8bc8165fc275e6a1df3561", "score": "0.5780196", "text": "function ValidateSpecialCharacterOnly(evt,value) \n\t{\n \t\tevt = (evt) ? evt : window.event\n\t\tvar charCode = (evt.which) ? evt.which : evt.keyCode\n\t\tvar arr_obj = new Array();\n\t\tfor (var i = 1; i <= value.length; i++)\n\t\t{\t \n\t\t arr_obj[i]=(value.substring((i - 1), i)).charCodeAt(0);\n\t\t}\n\t\t var arr2str = arr_obj.toString();\n\t\t \n \t\t\tif (charCode > 32 && charCode < 36 ) {\n \t\t\t return false\n\t\t }\n \t\t\telse if (charCode > 37 && charCode < 39 ) {\n \t\t\t return false\n\t\t }\n \t\t\telse if (charCode > 39 && charCode < 46 ) {\n \t\t\t return false\n\t\t }\n\t\t\telse if(charCode == 47 ){\n \t\t\t return false\n\t\t\t}\n\t\t\telse if(charCode > 57 && charCode < 65){\n \t\t\t return false\n\t\t\t}\n\t\t\telse if(charCode > 90 && charCode < 97){\n \t\t\t return false\n\t\t\t}\n\t\t\telse if(charCode > 122 && charCode < 127){\n \t\t\t return false\n\t\t\t}\n \n \t}", "title": "" }, { "docid": "d476c3b1635c0dc38a3c545aa05c21f8", "score": "0.57629496", "text": "function isFirstLetter(letter, string) {\n for(let i = 0; i < string.length; i++){\n if(string[0] === letter){\n return true\n }\n }\nreturn false;\n}", "title": "" }, { "docid": "f5d2016e9c414741b045cb5066f9090e", "score": "0.57460445", "text": "function valid_key(charTyped){\n if (/[a-zA-Z]|\\s/i.test(charTyped)) {\n return true;\n }\n}", "title": "" }, { "docid": "80a116dd0ed9204fd2807bf0b3071955", "score": "0.57454103", "text": "function notletterCheck(c) {\n let cval = c.charCodeAt(0)\n return (cval<'A'.charCodeAt(0) || cval>'z'.charCodeAt(0))\n}", "title": "" }, { "docid": "709cf6022672a74f78841f109b3083e2", "score": "0.5744512", "text": "function isFirst(str, ch) {\n return str.substr(0, ch.length) === ch;\n}", "title": "" }, { "docid": "8a55284f771050f9318c4c1ea063c330", "score": "0.5740482", "text": "function blockspecialchar_first(e) {\n\t var str;\n\t str = e.value;\n\t\t\t\t\t\t//alert(str.charCodeAt(0));\n\t switch (str.charCodeAt(0)) {\n\t case 44:\n\t {\n\t alert(\", Not allowed in 1st Place!!!\");\n\t e.value = \"\";\n\t e.focus();\n\t return false;\n\t }\n\n\t case 47:\n\t {\n\t alert(\"/ Not allowed in 1st Place!!!\");\n\t e.value = \"\";\n\t e.focus();\n\t return false;\n\t }\n\n\t case 58:\n\t {\n\t alert(\": Not allowed in 1st Place!!!\");\n\t e.value = \"\";\n\t e.focus();\n\t return false;\n\t }\n\n\t case 46:\n\t {\n\t alert(\". Not allowed in 1st Place!!!\");\n\t e.value = \"\";\n\t e.focus();\n\t return false;\n\t }\n\n\t case 39:\n\t {\n\t alert(\"Single Quote Not allowed in 1st Place!!!\");\n\t e.value = \"\";\n\t e.focus();\n\t return false;\n\t }\n\n\t case 32:\n\t {\n\t alert(\"White Space Not allowed in 1st Place!!!\");\n\t e.value = \"\";\n\t e.focus();\n\t return false;\n\t }\n\n\t case 40:\n\t {\n\t alert(\"( Not allowed in 1st Place!!!\");\n\t e.value = \"\";\n\t e.focus();\n\t return false;\n\t }\n\n\t case 41:\n\t {\n\t alert(\") Not allowed in 1st Place!!!\");\n\t e.value = \"\";\n\t e.focus();\n\t return false;\n\t }\n\n\t case 45:\n\t {\n\t alert(\"- Not allowed in 1st Place!!!\");\n\t e.value = \"\";\n\t e.focus();\n\t return false;\n\t }\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t case 95:\n\t {\n\t alert(\"_ Not allowed in 1st Place!!!\");\n\t e.value = \"\";\n\t e.focus();\n\t return false;\n\t }\t\n\n\t case 59:\n\t {\n\t alert(\"; Not allowed in 1st Place!!!\");\n\t e.value = \"\";\n\t e.focus();\n\t return false;\n\t }\n\n\t case 124:\n\t {\n\t alert(\"| Not allowed in 1st Place!!!\");\n\t e.value = \"\";\n\t e.focus();\n\t return false;\n\t }\n\n\t case 63:\n\t {\n\t alert(\"? Not allowed in 1st Place!!!\");\n\t e.value = \"\";\n\t e.focus();\n\t return false;\n\t }\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tcase 64:\n\t {\n\t alert(\"@ Not allowed in 1st Place!!!\");\n\t e.value = \"\";\n\t e.focus();\n\t return false;\n\t }\n\t\t\t\t\t\t\n\t\t\t\t\t\tcase 34:\n\t {\n\t alert('\" Not allowed in 1st Place!!!');\n\t e.value = \"\";\n\t e.focus();\n\t return false;\n\t }\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tcase 35:\n\t {\n\t alert(\"# Not allowed in 1st Place!!!\");\n\t e.value = \"\";\n\t e.focus();\n\t return false;\n\t }\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tcase 36:\n\t {\n\t alert(\"$ Not allowed in 1st Place!!!\");\n\t e.value = \"\";\n\t e.focus();\n\t return false;\n\t }\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tcase 38:\n\t {\n\t alert(\"& Not allowed in 1st Place!!!\");\n\t e.value = \"\";\n\t e.focus();\n\t return false;\n\t }\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tcase 126:\n\t {\n\t alert(\"~ Not allowed in 1st Place!!!\");\n\t e.value = \"\";\n\t e.focus();\n\t return false;\n\t }\n\t\t\t\t\t\n\t\t\t\t\t\tcase 96:\n\t {\n\t alert(\"` Not allowed in 1st Place!!!\");\n\t e.value = \"\";\n\t e.focus();\n\t return false;\n\t }\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tcase 33:\n\t {\n\t alert(\"! Not allowed in 1st Place!!!\");\n\t e.value = \"\";\n\t e.focus();\n\t return false;\n\t }\n\t\t\t\t\t\t\n\t\t\t\t\t\tcase 37:\n\t {\n\t alert(\"% Not allowed in 1st Place!!!\");\n\t e.value = \"\";\n\t e.focus();\n\t return false;\n\t }\n\t\t\t\t\t\t\n\t\t\t\t\t\tcase 94:\n\t {\n\t alert(\"^ Not allowed in 1st Place!!!\");\n\t e.value = \"\";\n\t e.focus();\n\t return false;\n\t }\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tcase 42:\n\t {\n\t alert(\"* Not allowed in 1st Place!!!\");\n\t e.value = \"\";\n\t e.focus();\n\t return false;\n\t }\n\t\t\t\t\t\tcase 92:\n\t {\n\t alert(\"\\\\ Not allowed in 1st Place!!!\");\n\t e.value = \"\";\n\t e.focus();\n\t return false;\n\t }\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tcase 43:\n\t {\n\t alert(\"+ Not allowed in 1st Place!!!\");\n\t e.value = \"\";\n\t e.focus();\n\t return false;\n\t }\t\n\t\t\t\t\t\tcase 61:\n\t {\n\t alert(\"= Not allowed in 1st Place!!!\");\n\t e.value = \"\";\n\t e.focus();\n\t return false;\n\t }\n\t\t\t\t\t\tcase 123:\n\t {\n\t alert(\"{ Not allowed in 1st Place!!!\");\n\t e.value = \"\";\n\t e.focus();\n\t return false;\n\t }\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tcase 125:\n\t {\n\t alert(\"} Not allowed in 1st Place!!!\");\n\t e.value = \"\";\n\t e.focus();\n\t return false;\n\t }\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tcase 91:\n\t {\n\t alert(\"[ Not allowed in 1st Place!!!\");\n\t e.value = \"\";\n\t e.focus();\n\t return false;\n\t }\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tcase 93:\n\t {\n\t alert(\"] Not allowed in 1st Place!!!\");\n\t e.value = \"\";\n\t e.focus();\n\t return false;\n\t }\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tcase 60:\n\t {\n\t alert(\"< Not allowed in 1st Place!!!\");\n\t e.value = \"\";\n\t e.focus();\n\t return false;\n\t }\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tcase 62:\n\t {\n\t alert(\"> Not allowed in 1st Place!!!\");\n\t e.value = \"\";\n\t e.focus();\n\t return false;\n\t }\t\n\t }\n\n\t }", "title": "" }, { "docid": "c41431a514f6db4dcd61c6fe3c81c7d5", "score": "0.57344186", "text": "function isFilled(value){\n var reg = /^[\\S]/;\n return reg.test(value);\n}", "title": "" }, { "docid": "bae75ca104b7f0af2180dbd01186fb00", "score": "0.57266116", "text": "function validateOnlyLetters (value){\n return /^[a-z]+$/i.test(value);\n}", "title": "" }, { "docid": "ddd0beb65226d2a24a69339468fb592c", "score": "0.5712178", "text": "function firstStrongChar(str){var match=REGEX_STRONG.exec(str);return null==match?null:match[0];}", "title": "" }, { "docid": "de3938765c88835cb3a7ba39e305fa3b", "score": "0.570425", "text": "hasMultiCharacter(value = this.value) {\n\t\treturn (value && value.length > 1) ? true : false;\n\t}", "title": "" }, { "docid": "bb028af15d36da390a7648a621bb2bc5", "score": "0.57013565", "text": "function ValidateCharsAllowed(input)\n{\n let szTemp = input.trim();\n\n if (szTemp.length === 0)\n {\n return \"You must enter a value.\";\n }\n \n let regex = /^[0-9a-zA-Z\\s]*$/;\n if(szTemp.match(regex))\n {\n return true;\n }\n else\n {\n return \"Only letters, numbers and spaces are allowed.\";\n } \n}", "title": "" }, { "docid": "e4819aacffe19c5c46f118b7ce982f3c", "score": "0.5681233", "text": "function simpleChar(character) {\n return CHAR_TAB !== character &&\n CHAR_LINE_FEED !== character &&\n CHAR_CARRIAGE_RETURN !== character &&\n CHAR_COMMA !== character &&\n CHAR_LEFT_SQUARE_BRACKET !== character &&\n CHAR_RIGHT_SQUARE_BRACKET !== character &&\n CHAR_LEFT_CURLY_BRACKET !== character &&\n CHAR_RIGHT_CURLY_BRACKET !== character &&\n CHAR_SHARP !== character &&\n CHAR_AMPERSAND !== character &&\n CHAR_ASTERISK !== character &&\n CHAR_EXCLAMATION !== character &&\n CHAR_VERTICAL_LINE !== character &&\n CHAR_GREATER_THAN !== character &&\n CHAR_SINGLE_QUOTE !== character &&\n CHAR_DOUBLE_QUOTE !== character &&\n CHAR_PERCENT !== character &&\n CHAR_COLON !== character &&\n !ESCAPE_SEQUENCES[character] &&\n !needsHexEscape(character);\n}", "title": "" }, { "docid": "e4819aacffe19c5c46f118b7ce982f3c", "score": "0.5681233", "text": "function simpleChar(character) {\n return CHAR_TAB !== character &&\n CHAR_LINE_FEED !== character &&\n CHAR_CARRIAGE_RETURN !== character &&\n CHAR_COMMA !== character &&\n CHAR_LEFT_SQUARE_BRACKET !== character &&\n CHAR_RIGHT_SQUARE_BRACKET !== character &&\n CHAR_LEFT_CURLY_BRACKET !== character &&\n CHAR_RIGHT_CURLY_BRACKET !== character &&\n CHAR_SHARP !== character &&\n CHAR_AMPERSAND !== character &&\n CHAR_ASTERISK !== character &&\n CHAR_EXCLAMATION !== character &&\n CHAR_VERTICAL_LINE !== character &&\n CHAR_GREATER_THAN !== character &&\n CHAR_SINGLE_QUOTE !== character &&\n CHAR_DOUBLE_QUOTE !== character &&\n CHAR_PERCENT !== character &&\n CHAR_COLON !== character &&\n !ESCAPE_SEQUENCES[character] &&\n !needsHexEscape(character);\n}", "title": "" }, { "docid": "e4819aacffe19c5c46f118b7ce982f3c", "score": "0.5681233", "text": "function simpleChar(character) {\n return CHAR_TAB !== character &&\n CHAR_LINE_FEED !== character &&\n CHAR_CARRIAGE_RETURN !== character &&\n CHAR_COMMA !== character &&\n CHAR_LEFT_SQUARE_BRACKET !== character &&\n CHAR_RIGHT_SQUARE_BRACKET !== character &&\n CHAR_LEFT_CURLY_BRACKET !== character &&\n CHAR_RIGHT_CURLY_BRACKET !== character &&\n CHAR_SHARP !== character &&\n CHAR_AMPERSAND !== character &&\n CHAR_ASTERISK !== character &&\n CHAR_EXCLAMATION !== character &&\n CHAR_VERTICAL_LINE !== character &&\n CHAR_GREATER_THAN !== character &&\n CHAR_SINGLE_QUOTE !== character &&\n CHAR_DOUBLE_QUOTE !== character &&\n CHAR_PERCENT !== character &&\n CHAR_COLON !== character &&\n !ESCAPE_SEQUENCES[character] &&\n !needsHexEscape(character);\n}", "title": "" }, { "docid": "94c7284151423a5ca4b362d01e850842", "score": "0.5679206", "text": "function alphanumerical(character) {\n return isAlphabetical(character) || isDecimal(character)\n}", "title": "" }, { "docid": "642d2b9956fea9fca7c748b53b188ae9", "score": "0.5679012", "text": "function isFirstLetter(letter, string) {\n if ( letter === string[0]){\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "2fee05aed11847308a57dc6c087e3da7", "score": "0.56674886", "text": "static isASCII(value) {\r\n return value === null || value === undefined\r\n ? false : /^[\\x00-\\x7F]*$/.test(value);\r\n }", "title": "" }, { "docid": "1c9be96cce5a0a5d26e933a272c3f931", "score": "0.5666468", "text": "function IsPositionalValue(str_value)\n{\n if(str_value.length == 0)\n return false;\n if(str_value.charAt(0) == \"-\")\n return false;\n\n return true;\n}", "title": "" }, { "docid": "7978553e895fd6497cc7c0ab2b41587c", "score": "0.56641924", "text": "function alphanumerical(character) {\n return isAlphabetical(character) || isDecimal(character);\n}", "title": "" }, { "docid": "490622914f5335144bc11d280952c975", "score": "0.5654169", "text": "function ValidateCharInput(input)\n{\n let szTemp = input.trim();\n\n if (szTemp.length === 0)\n {\n return \"You must enter a value.\";\n }\n\n let regex = /^[a-zA-Z]+$/;\n if(szTemp.match(regex))\n {\n return true;\n }\n else\n {\n return \"Please enter letters only.\";\n }\n}", "title": "" }, { "docid": "2798cb8a9edca68ef98ae108fcf7bd87", "score": "0.56444794", "text": "function isFirstLetter(letter, string) {\n // JS treats strings as arrays of letters, so we can reference the index string[0]\n return letter === string[0];\n}", "title": "" }, { "docid": "6dfbfd5ffd2c32570b02310cf5191ec8", "score": "0.5641821", "text": "function isPermittedChar(ch){\n\t\treturn ch !== '.' && \n\t\t\tch !== '#' && \n\t\t\tch !== '' &&\n\t\t\tch !== ' ';\n\t}", "title": "" }, { "docid": "149f89dfe68b233da28c410e91bafd70", "score": "0.5641412", "text": "function simpleChar(character) {\n return CHAR_TAB !== character &&\n CHAR_LINE_FEED !== character &&\n CHAR_CARRIAGE_RETURN !== character &&\n CHAR_COMMA !== character &&\n CHAR_LEFT_SQUARE_BRACKET !== character &&\n CHAR_RIGHT_SQUARE_BRACKET !== character &&\n CHAR_LEFT_CURLY_BRACKET !== character &&\n CHAR_RIGHT_CURLY_BRACKET !== character &&\n CHAR_SHARP !== character &&\n CHAR_AMPERSAND !== character &&\n CHAR_ASTERISK !== character &&\n CHAR_EXCLAMATION !== character &&\n CHAR_VERTICAL_LINE !== character &&\n CHAR_GREATER_THAN !== character &&\n CHAR_SINGLE_QUOTE !== character &&\n CHAR_DOUBLE_QUOTE !== character &&\n CHAR_PERCENT !== character &&\n CHAR_COLON !== character &&\n !ESCAPE_SEQUENCES[character] &&\n !needsHexEscape(character);\n}", "title": "" }, { "docid": "2ebe732e69ed4b8a8fe6bf8df9c1b956", "score": "0.56394964", "text": "function alphanum_allowChar(validatedStringFragment, Char, settings){\n\n\t\tif(settings.maxLength && validatedStringFragment.length >= settings.maxLength)\n\t\t\treturn false;\n\n\t\tif(settings.allow.indexOf(Char) >=0 )\n\t\t\treturn true;\n\t\t\n\t\tif(settings.allowSpace && (Char == \" \"))\n\t\t\treturn true;\n\t\t\n\t\tif(!settings.allowNewline && (Char == '\\n' || Char == '\\r'))\n\t\t\treturn false;\n\t\t\t\n\t\tif(settings.blacklistSet.contains(Char))\n\t\t\treturn false;\n\t\t\n\t\tif(!settings.allowNumeric && DIGITS[Char])\n\t\t\treturn false;\n\t\t\t\n\t\tif(!settings.allowUpper && isUpper(Char))\n\t\t\treturn false;\n\t\t\t\n\t\tif(!settings.allowLower && isLower(Char))\n\t\t\treturn false;\n\t\t\t\n\t\tif(!settings.allowCaseless && isCaseless(Char))\n\t\t\treturn false;\n\t\t\n\t\tif(!settings.allowLatin && LATIN_CHARS.contains(Char))\n\t\t\treturn false;\n\t\t\n\t\tif(!settings.allowOtherCharSets){\n\t\t\tif(DIGITS[Char] || LATIN_CHARS.contains(Char))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "6b7e54039933055babcd8ca373aa7ff0", "score": "0.5635966", "text": "function checkIfOnlyLetters(field) {\n if (/^[a-zA-Z ]+$/.test(field.value)) {\n setValid(field);\n return true;\n } else {\n setInvalid(field, `${capitalizeFirstLetter(field.name)} should have only letters!`);\n return false;\n }\n}", "title": "" }, { "docid": "687444c29413351e5f702a3c63d606e5", "score": "0.56358", "text": "function ucharactersOnly1()\n{\n \t\n\tvar key = window.event.keyCode;\n\n\t\n\tif(key<=64 || key>=91)\n\t return false;\n\telse\n\t\treturn true;\n}", "title": "" }, { "docid": "6f7a226235cba1afce2c2f07a1039fe9", "score": "0.56293094", "text": "function checkChar(char) {\n return (char == 'a' || char == 'e' || char == 'i' || char == 'o' || char == 'u');\n}", "title": "" }, { "docid": "42e6d97bae0c0391349f64725a15ac1f", "score": "0.5626361", "text": "function unreserved(value) { return Lexer.ALPHA(value) || Lexer.DIGIT(value) || value === 0x2d || value === 0x2e || value === 0x5f || value === 0x7e; }", "title": "" }, { "docid": "9376c2d9580182347c10476d1ddfc88a", "score": "0.5619333", "text": "function isFirstLetter(letter, string) {\n if (string.charAt(0) === letter) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "73b1db08581ae1f86cc28e0bd1c6f7ce", "score": "0.56077987", "text": "function is(value) {\r\n var candidate = value;\r\n return Is.number(candidate.startLine) && Is.number(candidate.startLine)\r\n && (Is.undefined(candidate.startCharacter) || Is.number(candidate.startCharacter))\r\n && (Is.undefined(candidate.endCharacter) || Is.number(candidate.endCharacter))\r\n && (Is.undefined(candidate.kind) || Is.string(candidate.kind));\r\n }", "title": "" }, { "docid": "b132f7f2656019ccb981c5de5d527537", "score": "0.5599815", "text": "function checkInvalidHeaderChar (val) {\n val += ''\n if (val.length < 1) { return false }\n var c = val.charCodeAt(0)\n if ((c <= 31 && c !== 9) || c > 255 || c === 127) { return true }\n if (val.length < 2) { return false }\n c = val.charCodeAt(1)\n if ((c <= 31 && c !== 9) || c > 255 || c === 127) { return true }\n if (val.length < 3) { return false }\n c = val.charCodeAt(2)\n if ((c <= 31 && c !== 9) || c > 255 || c === 127) { return true }\n for (var i = 3; i < val.length; ++i) {\n c = val.charCodeAt(i)\n if ((c <= 31 && c !== 9) || c > 255 || c === 127) { return true }\n }\n return false\n}", "title": "" }, { "docid": "bafc5f5f1cffee9729e99910529d056f", "score": "0.55990267", "text": "function inputEmpty(value){\n var reg=new RegExp(\"[ ,;:!*]+\", \"g\");\n var tab=value.split(reg);\n if((tab.length==1)&&(tab[0]==\"\"))\n tab.length=0;\n if (tab.length==0){\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "3601eea57aa36573fb26e1b34cd720f7", "score": "0.55964065", "text": "function isASCIILetter(c) {\n var code = c.charCodeAt(0);\n return ((code >= 65) && (code <= 90)) || ((code >= 97) && (code <= 122));\n}", "title": "" }, { "docid": "7e8db8eb50d05dfde0916157a6245dd1", "score": "0.55962324", "text": "function validation(element) {\r\n if (!((element.charCodeAt()>=47 && element.charCodeAt()<=57)||element.charCodeAt()==37||(element.charCodeAt()>=40 && element.charCodeAt()<=43)||element.charCodeAt()==45||element.charCodeAt()==94)) {\r\n return true;\r\n }else return false;\r\n}", "title": "" }, { "docid": "c0709f3a560812bb2dee359f6c9303a4", "score": "0.5590479", "text": "function isNameStart(codePoint) {\n return isLetter(codePoint) || isNonAscii(codePoint) || codePoint === 0x5f;\n}", "title": "" }, { "docid": "f4b0cfb0a557efc6db05f1399463b555", "score": "0.55853313", "text": "function first(str) {\n return str.charAt(0);\n}", "title": "" }, { "docid": "920f557c4ddc780f272a0586936a3597", "score": "0.557742", "text": "function simpleChar(character) {\n return (CHAR_TAB !== character &&\n CHAR_LINE_FEED !== character &&\n CHAR_CARRIAGE_RETURN !== character &&\n CHAR_COMMA !== character &&\n CHAR_LEFT_SQUARE_BRACKET !== character &&\n CHAR_RIGHT_SQUARE_BRACKET !== character &&\n CHAR_LEFT_CURLY_BRACKET !== character &&\n CHAR_RIGHT_CURLY_BRACKET !== character &&\n CHAR_SHARP !== character &&\n CHAR_AMPERSAND !== character &&\n CHAR_ASTERISK !== character &&\n CHAR_EXCLAMATION !== character &&\n CHAR_VERTICAL_LINE !== character &&\n CHAR_GREATER_THAN !== character &&\n CHAR_SINGLE_QUOTE !== character &&\n CHAR_DOUBLE_QUOTE !== character &&\n CHAR_PERCENT !== character &&\n CHAR_COLON !== character &&\n !ESCAPE_SEQUENCES[character] &&\n !needsHexEscape(character));\n }", "title": "" }, { "docid": "fdac1ad19a8a07044460f5655f147c77", "score": "0.5575967", "text": "_formatPrecheck(start, sepInfo)\n {\n // A non-alphanumeric number should precede this.\n // Might want to tweak this a bit more by digging into surrounding/parent runs.\n if (start != 0 && (Markdown._isAlphanumeric(this.text[start - 1]) || this._isEscaped(start)))\n {\n return false;\n }\n\n sepInfo.separator = this.text[start];\n if (this._inSpecialContext(start))\n {\n return false;\n }\n\n sepInfo.count = 1;\n sepInfo.index = start + 1;\n while (sepInfo.index < this.text.length && this.text[sepInfo.index] == sepInfo.separator)\n {\n ++sepInfo.count;\n ++sepInfo.index;\n }\n\n if (!sepInfo.allowSingle && (sepInfo.count % 2) == 1)\n {\n // Odd number of separators, not allowed if we don't allow single separators\n return false;\n }\n\n // Next character in run must not be whitespace\n if (Markdown._isWhitespace(this.text[sepInfo.index]))\n {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "19c94671fcc0a2d2ffae8ae65e4fcc90", "score": "0.5573768", "text": "function is_ascii(value)\n{\n value += \"\";\n return value.match(/^[\\x20-\\x7E]*$/) ? true : false;\n}", "title": "" } ]
381fae0ea79ed51dcc8893f2130e199d
Generate random Id for short_url
[ { "docid": "ccc39ef1d2ef3bf224d63b0a0640e8ae", "score": "0.0", "text": "function generateId() {\n var randomId = \"\";\n var chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n for (let i = 0; i < 5; i++){\n randomId += chars.charAt(Math.floor(Math.random() * chars.length));\n }\n return randomId;\n}", "title": "" } ]
[ { "docid": "2bb4c4a6a37d163cda07a41a3de1e79a", "score": "0.80742073", "text": "function shortId() {\n\treturn crypto\n\t\t.randomBytes(5)\n\t\t.toString(\"base64\")\n\t\t.replace(/\\//g, \"_\")\n\t\t.replace(/\\+/g, \"-\")\n\t\t.replace(/=+$/, \"\");\n}", "title": "" }, { "docid": "41cf2720b1f979478073ccf56741fbe6", "score": "0.79413825", "text": "function gen_id() {\n return shortId.generate();\n}", "title": "" }, { "docid": "d8200f96d6d9f566f7ff23405d389606", "score": "0.7762553", "text": "function uniqueLinkGen(){\n if(linkGenStore.findOne({'shortURL':short_url})===true){//check if short url is present\n short_url = linkGen.genURL();\n uniqueLinkGen();\n }\n else{\n return short_url;\n }\n }", "title": "" }, { "docid": "8286fdb02d41a83dad14672282588cf5", "score": "0.7668402", "text": "function generateId() {\n const shortid = require('shortid');\n return shortid.generate();\n}", "title": "" }, { "docid": "54a2de3ac9b96ab47ed66d6d43eee011", "score": "0.75868386", "text": "function id(){\n return '_' + Math.random().toString(36).substr(2,9);\n}", "title": "" }, { "docid": "7b807d2a19b7d08a28c65c754eab5e73", "score": "0.75675017", "text": "function request_id() {\n return Math.random().toString(36).substring(2, 14);\n}", "title": "" }, { "docid": "82f3475ca3943ac292abea7b18b19f8c", "score": "0.7532455", "text": "function generateId() {\n return '_' + Math.random().toString(36).substr(2, 16);\n}", "title": "" }, { "docid": "4119259130e55517a3b54ca28bb43340", "score": "0.748209", "text": "function createId() {\r\n\t\t\t\t\t\t\t\treturn (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);\r\n\t\t\t\t\t\t\t}", "title": "" }, { "docid": "6a310614ea22510ad30ef4067853131d", "score": "0.74791574", "text": "function makeID () {\n return 'id-' + Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1)\n}", "title": "" }, { "docid": "a221d8db2df1a7434568dcce08e40371", "score": "0.747516", "text": "function randId() {\n return Math.random().toString(36).substr(2, 10);\n }", "title": "" }, { "docid": "5cd67a8df274afcb4b4d2b5e781a6d40", "score": "0.7447961", "text": "function randId() {\n return Math.random().toString(36).substr(2, 9);\n}", "title": "" }, { "docid": "fb68940fd582b7eb666f028d83747eb8", "score": "0.7419497", "text": "function uniqueID() {\n return '_' + Math.random().toString(36).substr(2,9);\n }", "title": "" }, { "docid": "da6cd12b454f4c2d10ddb901ab0de476", "score": "0.74166554", "text": "generateID() {\r\n\t\treturn '' + Math.random().toString(36).substr(2, 9);\r\n\t}", "title": "" }, { "docid": "728f20536b75120a68845d06c8b7615d", "score": "0.7397874", "text": "shortUID() {\n return ( '0000' + ( Math.random() * Math.pow( 36, 4 ) << 0 ).toString( 36 ) ).slice( -4 );\n }", "title": "" }, { "docid": "c895a9143cfa0e721bffbb5c81abab7a", "score": "0.73937577", "text": "function generateId() {\n return Math.random().toString(36).substr(2);\n}", "title": "" }, { "docid": "139e316f7820f20b6cfc002f5e2e2fc7", "score": "0.7383558", "text": "function generateId() {\n return Math.random().toString(36).substr(2, 8);\n}", "title": "" }, { "docid": "678c5ce1e849fd41c2ea27d128b9811d", "score": "0.7368052", "text": "function generateID() {\n return '_' + Math.random().toString(36).substr(2, 9);\n}", "title": "" }, { "docid": "5fcfc5182202fd53d444d894be488bc4", "score": "0.7351985", "text": "function createShortUrlId(longUrl) {\n var shortId = extractGooglId(getShortUrl(longUrl));\n return shortId;\n}", "title": "" }, { "docid": "1c08f03d070736f65f30590b25fa06ee", "score": "0.7345385", "text": "function create_unique_id(){\n\treturn \"id_\" + Math.floor(Math.random() * (1000000 + 1)).toString();\n}", "title": "" }, { "docid": "bb64617c504bcdf738447f11d956fd0b", "score": "0.7335886", "text": "function uniqueID() {\n return Math.random().toString(36).substr(2, 9);\n}", "title": "" }, { "docid": "dfca8360e5b001cfda5ebb88f3874f1a", "score": "0.7309033", "text": "function randomId() {\n return '_' + (\n Number(String(Math.random()).slice(2)) + \n Date.now() + \n Math.round(performance.now())\n ).toString(36);\n}", "title": "" }, { "docid": "53670c083728e59fd5867f6e43ebf8c9", "score": "0.73017037", "text": "generoiId() {\n let id = '';\n for (let i = 0; i < 16; i++) {\n id = id + (Math.floor(Math.random() * 10));\n }\n return parseInt(id);\n }", "title": "" }, { "docid": "3f6ce53dd735bc24e46af9053f51d850", "score": "0.7300522", "text": "function generateId(){\n var len = 16\n\n return _.random(Number.MAX_SAFE_INTEGER)\n .toString(16)\n .slice(0,len)\n}", "title": "" }, { "docid": "d87a25e5d5c1a8ed989df719e7733c6c", "score": "0.7286107", "text": "function generateID() {\n return Math.random().toString(36).substr(2, 9);\n}", "title": "" }, { "docid": "499f3864c115c28d7f9fe9a78b298722", "score": "0.72812223", "text": "$generateId () {\n return Math\n .random() // 0.7093288430261266\n .toString(36) // \"0.pjag2nwxb2o\"\n .substr(2,8); // \"pjag2nwx\"\n }", "title": "" }, { "docid": "62098d0746958760bbd0f78db8f1f335", "score": "0.7269318", "text": "function makeId() {\n\tvar uniqueId = Math.random().toString(36).substring(2) + (new Date()).getTime().toString(36);\n\treturn uniqueId;\n}", "title": "" }, { "docid": "db8fe8e5398908799e8934816fe9cf54", "score": "0.7266814", "text": "function generateId() {\n return Math.round(Math.random() * Math.pow(2, 24));\n }", "title": "" }, { "docid": "79d28aaedc5437e9c95817e662be356c", "score": "0.72637427", "text": "function getRandomShortString() {\n return Math.random().toString(36).slice(-11);\n}", "title": "" }, { "docid": "bc2b75cb1b9151547bcb6ca693b7c556", "score": "0.72550315", "text": "static generateShort() {\r\n return \"xxxx-xxxx\".replace(/x/g, () => this.chars[Math.floor(Math.random() * this.chars.length)]);\r\n }", "title": "" }, { "docid": "e666716da4d60a2943c11e7a00cacdb7", "score": "0.72537184", "text": "createUniqueId()\n {\n return Math.random().toString(36).substring(7) \n }", "title": "" }, { "docid": "c6a61c8135a3bc9df945bff2102e62fa", "score": "0.72509193", "text": "function shortenUrl() {\n // inspired by: http://stackoverflow.com/questions/1349404/generate-a-string-of-5-random-characters-in-javascript\n var short = '';\n for( var i=0; i < 6; i++ )\n short += possibleChars.charAt(Math.floor(Math.random() * possibleChars.length));\n \n return short;\n}", "title": "" }, { "docid": "300fba6f46c03104fd4059b65240925a", "score": "0.72487783", "text": "function generetID() {\n return Math.floor(Math.random() * 100000000);\n}", "title": "" }, { "docid": "0f241c904a3dc14898420b4ffaf1c042", "score": "0.72483605", "text": "static genrateRandomId() {\n return Math.floor((Math.random() * 100) + 1);\n }", "title": "" }, { "docid": "9fff40f929ddcbacfd309575139b40a4", "score": "0.72426146", "text": "function randId() {\n return Math.random().toString(36).replace(/[^a-z]+/g, '').substr(2, 10);\n}", "title": "" }, { "docid": "ea75f97f2cf04d492fd8ec2dd5f011b1", "score": "0.72420025", "text": "function random_id() {\n\treturn '_' + (\n\t\tNumber(String(Math.random()).slice(2)) +\n\t\tDate.now() +\n\t\tMath.round(performance.now())\n\t).toString(36);\n}", "title": "" }, { "docid": "13d5653450ac98a22fad9ae14135e8d5", "score": "0.72394884", "text": "function getRandID() {\n return Math.random().toString(36).substring(2, 8)\n}", "title": "" }, { "docid": "c6bf32962fe0b6a842cec3fab4e2e7eb", "score": "0.72341305", "text": "createUniqueID(){\n return Math.random().toString(36).substring(7);\n }", "title": "" }, { "docid": "170ba63837946336e75a8e62344ba673", "score": "0.723239", "text": "function randomId() {\n return Number(Math.random().toString().substr(2, 10))\n}", "title": "" }, { "docid": "8bd69027ac9b64ff13ea96ff60a62167", "score": "0.7223511", "text": "function generateID() {\n return Math.floor(Math.random() * 10000)\n}", "title": "" }, { "docid": "0d471f3e937af04b7066c6a36901ff2f", "score": "0.72057897", "text": "function GUID(){\n return Math.random().toString(36).substring(7);\n}", "title": "" }, { "docid": "6f457d0a192b836c7c65efcc44d63dea", "score": "0.72034067", "text": "function id() {\n var newId = ('0000' + (Math.random() * Math.pow(36, 4) << 0).toString(36)).slice(-4); // append a 'a' because neo gets mad\n\n newId = \"a\".concat(newId); // ensure not already used\n\n if (!cache[newId]) {\n cache[newId] = true;\n return newId;\n }\n\n return id();\n }", "title": "" }, { "docid": "5876a33257d556b2d0db75203dfb0251", "score": "0.7196258", "text": "guid() {\n function s4() {\n return Math.floor((1 + Math.random()) * 0x10000)\n .toString(16)\n .substring(1);\n }\n return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4();\n }", "title": "" }, { "docid": "089f39f242c163cdca9ffd75c9efda2e", "score": "0.7193495", "text": "function _id() {\n var newId = ('0000' + (Math.random() * Math.pow(36, 4) << 0).toString(36)).slice(-4); // append a 'a' because neo gets mad\n\n newId = \"a\".concat(newId); // ensure not already used\n\n if (!cache[newId]) {\n cache[newId] = true;\n return newId;\n }\n\n return _id();\n }", "title": "" }, { "docid": "0e64fca3e12558cc2371b90d233ac87d", "score": "0.71922207", "text": "function gen_id() {\n var key = \"You're a wizard Harry...\";\n var now = Date.now().valueOf().toString();\n var rand = Math.random().toString();\n var id = crypto.createHmac('sha1', key).update(now + rand).digest('hex');\n return id;\n}", "title": "" }, { "docid": "aedda253e2abd1842fa27d0a9554a3c2", "score": "0.71808004", "text": "function generateID() {\n return (\n \"_\" +\n Math.random()\n .toString(36)\n .substr(2, 9)\n );\n}", "title": "" }, { "docid": "5d6373ba621f17bdc8778c124e988c47", "score": "0.71779877", "text": "function generateId() {\n return Math.random() * 999999;\n}", "title": "" }, { "docid": "30393b82aaf8fb50a5594e0ca287152d", "score": "0.7175133", "text": "function id() {\n return ('0000' + (Math.random() * Math.pow(36, 4) << 0).toString(36)).slice(-4);\n}", "title": "" }, { "docid": "b15799dd9c2f9f3800094a34517b1057", "score": "0.71640265", "text": "function generateRandomString() {\n let tinyURL = \"\";\n let possible = \"0123456789abcdefghijklmnopqrstuvwxyz\";\n\n for (let i = 0; i < 6; i++)\n tinyURL += possible.charAt(Math.floor(Math.random() * possible.length));\n\n return tinyURL;\n}", "title": "" }, { "docid": "56b9c9003e6e42f54badc4e836864828", "score": "0.7161407", "text": "function generateId() {\n return (Math.random().toString(20).substring(3, 18)\n + Math.random().toString(20).substring(3, 18));\n}", "title": "" }, { "docid": "36c9a90b2d53ef920a3ffce975a91a1a", "score": "0.71576476", "text": "_getRandomId()\n {\n return Math.floor((1 + Math.random()) * 10000000);\n }", "title": "" }, { "docid": "628100df919698086695e4f3728afcd7", "score": "0.7149547", "text": "function generateRandomString(longURL, cookie) {\n var randomShortUrl = \"\";\n var possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n\n for (var i = 0; i < 6; i++){\n randomShortUrl += possible.charAt(Math.floor(Math.random() * possible.length));\n }\n\n var object = {};\n object[randomShortUrl] = checkLongURL(longURL);\n\n // Create our keys\n object.userID = cookie;\n object.uniqueIDs = [];\n object.visits = [];\n object.dateCreated = Date().toString().split(' ').slice(0, 5).join(' ');\n\n urlDatabase.push(object);\n\n return randomShortUrl;\n}", "title": "" }, { "docid": "9952edcff026a2025082b493700737d7", "score": "0.71342534", "text": "function _randId() {\n\t\t// Return a random number\n\t\treturn (new Date().getDate())+(''+Math.random()).substr(2)\n\t}", "title": "" }, { "docid": "f021a9a0f46adaf44469366842725f46", "score": "0.7131227", "text": "function getUniqueId () {\n return 'private-' + Math.random().toString(36).substr(2, 9);\n }", "title": "" }, { "docid": "f728e66876634d2101471f4351b66d7c", "score": "0.7127163", "text": "function generateRandomString() {\n let randomURL= Math.random().toString(36).replace('0.', '').slice(0,6);\n return randomURL;\n}", "title": "" }, { "docid": "b4890383317e998f071ff9aba7204c6a", "score": "0.71246755", "text": "function random_id() {\n return (\"0000\" + (Math.random() * Math.pow(36,4) << 0).toString(36)).slice(-4);\n }", "title": "" }, { "docid": "08fbf999910ec32ace579d8a6d1aa207", "score": "0.7117574", "text": "function genID(limit) {\n return Math.random().toString(36).substr(2, limit);\n}", "title": "" }, { "docid": "788da08a3cee528981ff669b1a9b10e7", "score": "0.7117564", "text": "_generateID() {\r\n let text = '';\r\n const possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\r\n for (let i = 0; i < 6; i++) {\r\n text += possible.charAt(Math.floor(Math.random() * possible.length));\r\n }\r\n return `ngucarousel${text}`;\r\n }", "title": "" }, { "docid": "1aee24828b0125b83a924dee647ca707", "score": "0.71171814", "text": "randomId() {\n return crypto.randomBytes(4).toString('hex');\n }", "title": "" }, { "docid": "ce50a59c5c6afd6998210a769f8a851a", "score": "0.71144134", "text": "function generateUniqueId() {\n return Math.random().toString(36).substr(2, 10);\n}", "title": "" }, { "docid": "fdb9227802ca3f2728e3a18296395218", "score": "0.71107215", "text": "function uniqueId() {\n return Date.now() + 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = Math.random()*16|0, v = c === 'x' ? r : (r&0x3|0x8);\n return v.toString(16);\n });\n }", "title": "" }, { "docid": "d512fe7bc5d2dde8545a84cfdcc2654c", "score": "0.710932", "text": "function generateUniqueId() {\n return `v1-${Date.now()}-${Math.floor(Math.random() * (9e12 - 1)) + 1e12}`\n}", "title": "" }, { "docid": "fa1d898ba70d2f7b06598de9be2afe77", "score": "0.71080387", "text": "function uniqueID() {\n\n var chars = '0123456789abcdef';\n\n return 'xxxxxxxxxx'.replace(/./g, function () {\n return chars.charAt(Math.floor(Math.random() * chars.length));\n });\n}", "title": "" }, { "docid": "9fb0f47d14e529accc3cb815571f9830", "score": "0.7105654", "text": "function generateID() {\n return '' + Math.random();\n}", "title": "" }, { "docid": "d1e00c001b0500fe190e48c0a73919d6", "score": "0.71030945", "text": "function id() {\n return \"xxxxxxxxxxxxxxxxxxxx\".replace(/[xy]/g, function(c) {\n var r = (Math.random() * 16) | 0,\n v = c == \"x\" ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n}", "title": "" }, { "docid": "9f1984784c6b50c0cb856dca386faa64", "score": "0.7103086", "text": "function generate_random_link(){\n\n}", "title": "" }, { "docid": "9ec54d651afb4315f52ab28d964ff968", "score": "0.7095351", "text": "function generateId() {\r\n var id = \"\";\r\n var characters = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\r\n for (var i = 0; i < 5; i++) {\r\n id += characters.charAt(Math.floor(Math.random() * characters.length));\r\n }\r\n return id;\r\n}", "title": "" }, { "docid": "790a65862307d451759b4428383c7df9", "score": "0.70888406", "text": "get makeID() {\n let result = '', characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n for (let i = 0; i < 30; i++) {\n result += characters.charAt(Math.floor(Math.random() * 62));\n }\n return result;\n }", "title": "" }, { "docid": "2d48ad83f3a05ffb06d3709fc23c9216", "score": "0.70808184", "text": "function makeId (){\n function s4() {\n //generate random number to create a unique id for every item sent to the checkout page\n return Math.floor((1 + Math.random()) * 0x10000)\n .toString(16)\n .substring(1);\n }\n //return a random long random number generated above\n return s4() + s4() + '-' + s4() + '-' + s4() + '-' +\n s4() + '-' + s4() + s4() + s4();\n}", "title": "" }, { "docid": "ca29d57ce294066240ea7113c8af7207", "score": "0.70770496", "text": "function generateID(){\n return Math.floor(Math.random() * 100000000);\n}", "title": "" }, { "docid": "8b123a4f7e11b99e0331f772f61e2fc7", "score": "0.7064374", "text": "function generateRandomNum(num) {\n let numberOfChars = num || 7;\n let shortURL = \"\";\n const allowedChar = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n\n for (let i = 0; i < numberOfChars; i++) {\n shortURL += allowedChar.charAt(Math.floor(Math.random() * allowedChar.length));\n };\n return shortURL;\n}", "title": "" }, { "docid": "14bf7c5f5cd6355bd838e765e7170de5", "score": "0.7063214", "text": "function generate_id () {\n return 'ID'+(Math.random()+\"\").replace(/\\./, \"\");\n}", "title": "" }, { "docid": "b1d3f066fe852d9a6deb408a72447964", "score": "0.705687", "text": "function create_guid() {\n function s4() {\n return Math.floor((1 + Math.random()) * 0x10000)\n .toString(16)\n .substring(1);\n }\n return s4() + s4() + '-' + s4() + '-' + s4() + '-' +\n s4() + '-' + s4() + s4() + s4();\n}", "title": "" }, { "docid": "82b07668e827b936fdd0651d6c8fbab3", "score": "0.70530444", "text": "function genId () {\n return 'generated_ID'\n}", "title": "" }, { "docid": "d6cb36c48f4fc5bf9f8aaf217d9ce56a", "score": "0.70340693", "text": "async function generateLink() {\n const lastLink = await MongoAPI.getLastRecord({\n is_custom: false\n }, 'links');\n \n let code = '';\n do {\n code = randomString(8);\n } while (await MongoAPI.findOne({\n short_url: code\n }, 'links'));\n return code;\n}", "title": "" }, { "docid": "b41cdbc1b23d5e2188e3503e6d2cafb4", "score": "0.70316243", "text": "guidGenerator() {\n var S4 = function() {\n return (((1+Math.random())*0x10000)|0).toString(16).substring(1);\n };\n return (S4()+S4()+\"-\"+S4()+\"-\"+S4()+\"-\"+S4()+\"-\"+S4()+S4()+S4());\n }", "title": "" }, { "docid": "242bbae8dae5355fff45e68a7f8f577c", "score": "0.7022039", "text": "function _guid() {\n\t\tfunction S4() {\n\t\t\treturn (((1+Math.random())*0x10000)|0).toString(16).substring(1);\n\t\t}\n\t\treturn (S4()+S4()+\"-\"+S4()+\"-\"+S4()+\"-\"+S4()+\"-\"+S4()+S4()+S4());\n\t}", "title": "" }, { "docid": "158faa6af0c0262c32306fc1949e1bfc", "score": "0.70199627", "text": "function uniqueID() {\n // Math.random should be unique because of its seeding algorithm.\n // Convert it to base 36 (numbers + letters), and grab the first 9 characters\n // after the decimal.\n return '_' + Math.random().toString(36).substr(2, 9);\n}", "title": "" }, { "docid": "d7941bbcab0a805de512116faec1e791", "score": "0.7007685", "text": "function newid() {\n return Math.floor(Math.random() * 9007199254740992);\n }", "title": "" }, { "docid": "d1f02d52e21f2897c9fe5e78781b0cf1", "score": "0.7006609", "text": "function generateId(){\n return String(Math.round(new Date().getTime()/1000));\n}", "title": "" }, { "docid": "66e40fb3ecc1ad59d6fa9921aee270f8", "score": "0.70056486", "text": "function generateUniqueId() {\n return `${randomNumber()}`;\n }", "title": "" }, { "docid": "19143bfc95875730f50d9278393af125", "score": "0.7001577", "text": "function createID() {\n return 'xxxxxxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);\n return v.toString(16);\n });\n}", "title": "" }, { "docid": "19143bfc95875730f50d9278393af125", "score": "0.7001577", "text": "function createID() {\n return 'xxxxxxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);\n return v.toString(16);\n });\n}", "title": "" }, { "docid": "ae7aa7dd2bbf78a9c22a8d089c51148a", "score": "0.6987858", "text": "function genRamdomId(){\n randomId = Math.round(Math.random()* 1000000000);\n console.log(\"Custom Id generated : \"+randomId);\n return randomId;\n }", "title": "" }, { "docid": "e99c9c7261543984a10d99497d66cf81", "score": "0.6987107", "text": "function genNewId(cb, attempt, length) {\n attempt = attempt || 0;\n length = length || 7;\n\n var randomId = bs58.encode(Math.random().toString())\n \n randomId = randomId.substring(0, length);\n\n // Check if Id already exists\n db.collection(urlsCollection).findOne(\n {id: randomId},\n function(err, item) {\n\n if (item) {\n console.log('Id exists: ' + randomId);\n attempt++;\n\n if (attempt >= 10) {\n length++;\n }\n\n genNewId(cb, attempt, length);\n return;\n }\n\n if (cb && typeof(cb) === 'function') {\n cb(randomId);\n }\n });\n}", "title": "" }, { "docid": "3a02ff93992230a1534424e42bd6678a", "score": "0.69753516", "text": "function makeid() {\n var text = '';\n var possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n for ( var i=0; i < 5; i++ ) {\n text += possible.charAt(Math.floor(Math.random() * possible.length));\n }\n return text;\n }", "title": "" }, { "docid": "baf2974687f64f558eb8f637ce33f02e", "score": "0.69694865", "text": "guid() {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n let r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8);\n return v.toString(16);\n });\n }", "title": "" }, { "docid": "36689c71927c22c145ed89848887f2bc", "score": "0.6968888", "text": "function createId()\n{\n var text = \"\";\n var possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n for (var i=0; i < 6; i++) {\n text += possible.charAt(Math.floor(Math.random() * possible.length));\n }\n return text;\n}", "title": "" }, { "docid": "54126006fa35c975fc7620d69ac33733", "score": "0.69653904", "text": "function uniqueId() {\n return Date.now() + 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = Math.random()*16|0, v = c === 'x' ? r : (r&0x3|0x8);\n return v.toString(16);\n }); \n}", "title": "" }, { "docid": "44a3167062ad08d9a3902c764c76f015", "score": "0.695268", "text": "function generateRequestIdentifier () {\n\t\tfunction s4() {\n\t\t\treturn Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);\n\t\t}\n\t\treturn s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4();\n\t}", "title": "" }, { "docid": "c4665bb47071bced19fb0bc8fd9ac72f", "score": "0.69499606", "text": "function randomGenerator() {\n fetchFinalURL(\"/\");\n }", "title": "" }, { "docid": "591ee6ce76af8ef76ff3a6882e3de60f", "score": "0.6946188", "text": "function makeid() {\n var text = '';\n var possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n for (var i = 0; i < 5; i++) {\n text += possible.charAt(Math.floor(Math.random() * possible.length));\n }\n return text;\n }", "title": "" }, { "docid": "591ee6ce76af8ef76ff3a6882e3de60f", "score": "0.6946188", "text": "function makeid() {\n var text = '';\n var possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n for (var i = 0; i < 5; i++) {\n text += possible.charAt(Math.floor(Math.random() * possible.length));\n }\n return text;\n }", "title": "" }, { "docid": "591ee6ce76af8ef76ff3a6882e3de60f", "score": "0.6946188", "text": "function makeid() {\n var text = '';\n var possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n for (var i = 0; i < 5; i++) {\n text += possible.charAt(Math.floor(Math.random() * possible.length));\n }\n return text;\n }", "title": "" }, { "docid": "591ee6ce76af8ef76ff3a6882e3de60f", "score": "0.6946188", "text": "function makeid() {\n var text = '';\n var possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n for (var i = 0; i < 5; i++) {\n text += possible.charAt(Math.floor(Math.random() * possible.length));\n }\n return text;\n }", "title": "" }, { "docid": "2cdfd6b84c63619b131797635a08cffe", "score": "0.694465", "text": "static makeId() {\n var text = \"\";\n var possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n\n for (var i = 0; i < Math.floor(Utils.randomNumberFromRange(5, 15)); i++)\n text += possible.charAt(Math.floor(Math.random() * possible.length));\n\n return text;\n }", "title": "" }, { "docid": "9e507df8ef4a585b0ea18ce46aa36e5d", "score": "0.6943538", "text": "function makeid() {\n var text = \"\";\n var possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n\n for (var i = 0; i < 1000; i++) {\n text += possible.charAt(Math.floor(Math.random() * possible.length));\n return text;\n }\n }", "title": "" }, { "docid": "44e9e4b439d5d938c0ebab57044fd585", "score": "0.69371766", "text": "function makeid() {\n var text = \"\";\n var possible = \"abcdefghijklmnopqrstuvwxyz0123456789\";\n for (var i = 0; i < 4; i++)\n text += possible.charAt(Math.floor(Math.random() * possible.length));\n return text;\n }", "title": "" }, { "docid": "9a2971f6cc85310e18d145a5e0054973", "score": "0.69368047", "text": "async makeid(ctx, length) {\n var result = [];\n var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n var charactersLength = characters.length;\n for (var i = 0; i < length; i++) {\n result.push(characters.charAt(Math.floor(Math.random() *\n charactersLength)));\n }\n return result.join('');\n\n\n\n }", "title": "" }, { "docid": "cfe9c3d6068d6e2d1f1545ede453c852", "score": "0.6934634", "text": "function generateUniqueId() {\n return (new Date()).valueOf().toString() + Math.floor((Math.random() * 10000) + 1).toString();\n }", "title": "" }, { "docid": "c0b17175d19e68dc9241dd9112a310d4", "score": "0.69318044", "text": "function calculateUniqueIdentifier() {\n return Math.floor(Math.random() * 10000000 + 1).toString()\n}", "title": "" }, { "docid": "0fc4fa0dc256cdcbfa10cd5cc9eafb7c", "score": "0.6929802", "text": "function guid() {\n function s4() {\n return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);\n }\n return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4();\n }", "title": "" } ]
968a1b4904d90859193e0f250499cf9d
makes "value" a date picker for daterelated operators, combobox otherwise,
[ { "docid": "51e5467a8a863ef2b05f304c2c8e2e8e", "score": "0.65995044", "text": "function toggleDatePickers() {\n var lValue, lBetween, lAnd, lRecord;\n\n function _addDatePicker( pSelector, pRecordField, pValue ) {\n var lHasTime, lTime24, lDefHour, lDefPm, lDateValue,\n lFormatMask = self._getColumnFormatMask( lCurrentColumn.id );\n\n // do we have a time component in the date format mask?\n lHasTime = lFormatMask.toLowerCase().indexOf( \"hh\" ) !== -1;\n\n // detect 12 or 24 hour format\n if ( lHasTime ) {\n lDefHour = new Date().getHours();\n lTime24 = lFormatMask.indexOf( \"HH\" ) !== -1;\n lDefPm = \"\";\n if ( !lTime24 ) {\n if ( lDefHour > 11 ) { lDefPm = \"PM\"; } else { lDefPm = \"AM\"; }\n if ( lDefHour === 0 ) { lDefHour = 12; }\n if ( lDefHour > 12 ) { lDefHour -= 12; }\n\n }\n }\n\n if ( !$( pSelector ).hasClass( C_COMBOBOXWRAPPER ) ) {\n $( pSelector ).wrap( $ (\"<span class='\" + C_COMBOBOXWRAPPER + \"'></span>\") );\n }\n\n if ( lHasTime) {\n\n // timepicker\n apex.widget.datepicker(\n pSelector, {\n buttonText: \"<span class='\" + C_ICON + \" icon-calendar'></span><span class='\" + C_VISUALLY_HIDDEN + \"'>\" + lang.formatMessage( \"APEX.DATEPICKER.ICON_TEXT\", \"\" ) + \"</span>\",\n showTime: true,\n showOn: \"button\",\n defaultDate: convertCanonicalToDate( pValue ),\n time24h: lTime24,\n defHour: ( \"00\" + lDefHour ).substr( -2 ),\n defMinute: \"00\",\n defAmpm: lDefPm\n }, \n lFormatMask,\n apex.locale.getLanguage() );\n\n lDateValue = false;\n \n if ( pValue && pValue.match( /^\\d{14}/ ) !== null ) {\n lDateValue = convertCanonicalToDate( pValue );\n if ( lDateValue && !isNaN( lDateValue.getTime() ) ) {\n apex.jQuery.timepicker.setCanonicalDate( $( pSelector ).get( 0 ), lDateValue );\n }\n }\n \n } else {\n\n // datepicker\n apex.widget.datepicker(\n pSelector, {\n buttonText: \"<span class='\" + C_ICON + \" icon-calendar'></span><span class='\" + C_VISUALLY_HIDDEN + \"'>\" + lang.formatMessage( \"APEX.DATEPICKER.ICON_TEXT\", \"\" ) + \"</span>\",\n defaultDate: convertCanonicalToDate( pValue ),\n showTime: false,\n showOn: \"button\"\n }, \n lFormatMask,\n apex.locale.getLanguage() );\n\n if ( pValue && pValue.match( /^\\d{14}/ ) !== null ) {\n $( pSelector ).datepicker( \"setDate\", convertCanonicalToDate( pValue ) );\n }\n }\n\n $( pSelector ).next( \"button\" ).addClass( C_BUTTON + \" \" + C_BUTTON_WITH_ICON + \" \" + C_BUTTON_NO_LABEL + \" \" + C_JS_MENU_BUTTON + \" \" + C_BUTTON_CALENDAR );\n $( pSelector ).attr( \"placeholder\", getIGMessage( \"EXAMPLE\" ) + \": \"+ lCurrentColumn.appearance.formatExample );\n\n } // _addDatePicker\n\n lRecord = pRecordView$.recordView(\"getRecord\");\n lValue = pModel.getValue( lRecord, \"hiddenValue\" );\n lBetween = pModel.getValue( lRecord, \"hiddenBetween\" );\n lAnd = pModel.getValue( lRecord, \"hiddenAnd\" );\n\n makePlainTextField( lValue$ );\n makePlainTextField( lBetween$ );\n makePlainTextField( lAnd$ );\n\n $( \"#\" + self._getId( lPrefix + \"VALUE\" ) + \"_LABEL \").text( getIGMessage( \"VALUE\" ) );\n\n if ( lCurrentColumn.filter.dataType === DATE || \n lCurrentColumn.filter.dataType === TIMESTAMP || \n lCurrentColumn.filter.dataType === TIMESTAMP_TZ || \n lCurrentColumn.filter.dataType === TIMESTAMP_LTZ ) {\n\n if ( lCurrentColumn.filter.dataType === TIMESTAMP_TZ ) {\n $( \"#\" + self._getId( lPrefix + \"VALUE\" ) + \"_LABEL \").text( getIGMessage( \"VALUE_TIMESTAMP_TZ\" ) );\n }\n\n _addDatePicker( \"#\" + self._getId( lPrefix + \"VALUE\" ), \"hiddenValue\", lValue );\n _addDatePicker( \"#\" + self._getId( lPrefix + \"BETWEEN\" ), \"hiddenBetween\", lBetween );\n _addDatePicker( \"#\" + self._getId( lPrefix + \"AND\" ), \"hiddenAnd\", lAnd );\n\n } else {\n\n lValue$.combobox({\n \"label\": getIGMessage( \"VALUE\" )\n });\n lBetween$.combobox({\n \"label\": getIGMessage( \"VALUE\" )\n });\n lAnd$.combobox({\n \"label\": getIGMessage( \"AND\" )\n });\n lValue$.val ( lValue );\n lBetween$.val ( lBetween );\n lAnd$.val ( lAnd );\n\n }\n } // toggleDatePickers", "title": "" } ]
[ { "docid": "03e67253ac3cfdde306fe3e07d70c10f", "score": "0.7022789", "text": "onDateSelected(value) {\n this.value = value;\n }", "title": "" }, { "docid": "07420f5e6889a7023fe913d3493294e2", "score": "0.67378676", "text": "function val_date () {\r\n\t\t\r\n\t\t//value selec\r\n\t\tvar id = 'exam_date';\r\n\t\tvar value = $('#' + id + ' option:selected').val();\r\n\t\t\r\n\t\t//no value\r\n\t\tif (value.length == 0) {\r\n \t\t\tadd_error(id, 'Please select a date');\r\n\t\t//value exist\r\n\t\t} else {\r\n\t\t\t\r\n\t\t\t//grab the available dates\r\n\t\t\tupdate_time_options();\r\n \t\t\tremove_error(id);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\ttoggle_all_fields();\r\n\r\n\t}", "title": "" }, { "docid": "a67e48fcd0689b5006c3256f1febc3c7", "score": "0.6585784", "text": "writeValue(value) {\n var _a, _b;\n if (((_a = this._datePicker) === null || _a === void 0 ? void 0 : _a.compare(value, this._activeDate)) === 0) {\n return;\n }\n if (value && value instanceof Date) {\n this.activeDate = value;\n (_b = this._datePicker) === null || _b === void 0 ? void 0 : _b.select(value, false);\n return;\n }\n this.activeDate = value ? new Date(value) : void 0;\n }", "title": "" }, { "docid": "2cc2bef387d71ab5bd05fa389b49c35e", "score": "0.6476297", "text": "function DatePicker( picker, settings ) {\n\n var calendar = this,\n element = picker.$node[ 0 ],\n elementValue = element.value,\n elementDataValue = picker.$node.data( 'value' ),\n valueString = elementDataValue || elementValue,\n formatString = elementDataValue ? settings.formatSubmit : settings.format,\n isRTL = function() {\n\n return element.currentStyle ?\n\n // For IE.\n element.currentStyle.direction == 'rtl' :\n\n // For normal browsers.\n getComputedStyle( picker.$root[0] ).direction == 'rtl'\n }\n\n calendar.settings = settings\n calendar.$node = picker.$node\n\n // The queue of methods that will be used to build item objects.\n calendar.queue = {\n min: 'measure create',\n max: 'measure create',\n now: 'now create',\n select: 'parse create validate',\n highlight: 'parse navigate create validate',\n view: 'parse create validate viewset',\n disable: 'deactivate',\n enable: 'activate'\n }\n\n // The component's item object.\n calendar.item = {}\n\n calendar.item.clear = null\n calendar.item.disable = ( settings.disable || [] ).slice( 0 )\n calendar.item.enable = -(function( collectionDisabled ) {\n return collectionDisabled[ 0 ] === true ? collectionDisabled.shift() : -1\n })( calendar.item.disable )\n\n calendar.\n set( 'min', settings.min ).\n set( 'max', settings.max ).\n set( 'now' )\n\n // When there’s a value, set the `select`, which in turn\n // also sets the `highlight` and `view`.\n if ( valueString ) {\n calendar.set( 'select', valueString, { format: formatString })\n }\n\n // If there’s no value, default to highlighting “today”.\n else {\n calendar.\n set( 'select', null ).\n set( 'highlight', calendar.item.now )\n }\n\n\n // The keycode to movement mapping.\n calendar.key = {\n 40: 7, // Down\n 38: -7, // Up\n 39: function() { return isRTL() ? -1 : 1 }, // Right\n 37: function() { return isRTL() ? 1 : -1 }, // Left\n go: function( timeChange ) {\n var highlightedObject = calendar.item.highlight,\n targetDate = new Date( highlightedObject.year, highlightedObject.month, highlightedObject.date + timeChange )\n calendar.set(\n 'highlight',\n targetDate,\n { interval: timeChange }\n )\n this.render()\n }\n }\n\n\n // Bind some picker events.\n picker.\n on( 'render', function() {\n picker.$root.find( '.' + settings.klass.selectMonth ).on( 'change', function() {\n var value = this.value\n if ( value ) {\n picker.set( 'highlight', [ picker.get( 'view' ).year, value, picker.get( 'highlight' ).date ] )\n picker.$root.find( '.' + settings.klass.selectMonth ).trigger( 'focus' )\n }\n })\n picker.$root.find( '.' + settings.klass.selectYear ).on( 'change', function() {\n var value = this.value\n if ( value ) {\n picker.set( 'highlight', [ value, picker.get( 'view' ).month, picker.get( 'highlight' ).date ] )\n picker.$root.find( '.' + settings.klass.selectYear ).trigger( 'focus' )\n }\n })\n }, 1 ).\n on( 'open', function() {\n var includeToday = ''\n if ( calendar.disabled( calendar.get('now') ) ) {\n includeToday = ':not(.' + settings.klass.buttonToday + ')'\n }\n picker.$root.find( 'button' + includeToday + ', select' ).attr( 'disabled', false )\n }, 1 ).\n on( 'close', function() {\n picker.$root.find( 'button, select' ).attr( 'disabled', true )\n }, 1 )\n\n}", "title": "" }, { "docid": "3f70683b41a4723bb0970af67332bdf7", "score": "0.64684695", "text": "set value(value) {\n if (!value || !!value && value.length === 0) {\n this.selectedDatesWithoutFocus = new Date();\n return;\n }\n if (!this.selectedDatesWithoutFocus) {\n const valueDate = value[0] ? Math.min.apply(null, value) : value;\n const date = this.getDateOnly(new Date(valueDate)).setDate(1);\n this.viewDate = new Date(date);\n }\n this.selectDate(value);\n this.selectedDatesWithoutFocus = value;\n }", "title": "" }, { "docid": "5deb0c2f41ae7a039b0542b823dbdc74", "score": "0.64598954", "text": "select(date) {\n this.value = date;\n }", "title": "" }, { "docid": "090592a2354bf031a3cc9a5a164ec3c1", "score": "0.6451445", "text": "function handleSelect(type,args,obj) {\n var dates = args[0];\n var date = dates[0];\n var year = parseInt(date[0],10), month = parseInt(date[1],10), day = parseInt(date[2],10);\n var inputFieldName = getField('wdfdate',this.itdIdLink).name;\n var dateInputFormat = inputFieldName.substring(inputFieldName.lastIndexOf(\".\") + 1, inputFieldName.length);\n var txtDate1 = document.getElementById(\"wdfdate\" + this.itdIdLink);\n if (dateInputFormat == \"date\") { // YMD\n var date = new Date(year, (month-1), day);\n\t txtDate1.value = formatDate(date);\n }\n else {\n\t txtDate1.value = month + \"/\" + day + \"/\" + year;\n\t}\n\tthis.hide();\t\n doDateChanged(parseInt(this.itdIdLink,10), returnDaysAhead);\n \n setFocusAfterCalendar(this.itdIdLink);\n}", "title": "" }, { "docid": "9442e9f85796b9d96eeef7cf06b79de7", "score": "0.64236915", "text": "selectDate(value) {\n if (value === null || value === undefined || (Array.isArray(value) && value.length === 0)) {\n return;\n }\n switch (this.selection) {\n case CalendarSelection.SINGLE:\n if (isDate(value) && !this.isDateDisabled(value)) {\n this.selectSingle(value);\n }\n break;\n case CalendarSelection.MULTI:\n this.selectMultiple(value);\n break;\n case CalendarSelection.RANGE:\n this.selectRange(value, true);\n break;\n }\n }", "title": "" }, { "docid": "83263536e782443384fd2da77ccaea52", "score": "0.6396038", "text": "function DatePicker( picker, settings ) {\n\n var calendar = this,\n element = picker.$node[ 0 ],\n elementValue = element.value,\n elementDataValue = picker.$node.data( 'value' ),\n valueString = elementDataValue || elementValue,\n formatString = elementDataValue ? settings.formatSubmit : settings.format,\n isRTL = function() {\n\n return element.currentStyle ?\n\n // For IE.\n element.currentStyle.direction == 'rtl' :\n\n // For normal browsers.\n getComputedStyle( picker.$root[0] ).direction == 'rtl'\n }\n\n calendar.settings = settings\n calendar.$node = picker.$node\n\n // The queue of methods that will be used to build item objects.\n calendar.queue = {\n min: 'measure create',\n max: 'measure create',\n now: 'now create',\n select: 'parse create validate',\n highlight: 'parse navigate create validate',\n view: 'parse create validate viewset',\n disable: 'deactivate',\n enable: 'activate'\n }\n\n // The component's item object.\n calendar.item = {}\n\n calendar.item.clear = null\n calendar.item.disable = ( settings.disable || [] ).slice( 0 )\n calendar.item.enable = -(function( collectionDisabled ) {\n return collectionDisabled[ 0 ] === true ? collectionDisabled.shift() : -1\n })( calendar.item.disable )\n\n calendar.\n set( 'min', settings.min ).\n set( 'max', settings.max ).\n set( 'now' )\n\n // When there’s a value, set the `select`, which in turn\n // also sets the `highlight` and `view`.\n if ( valueString ) {\n calendar.set( 'select', valueString, {\n format: formatString,\n defaultValue: true\n })\n }\n\n // If there’s no value, default to highlighting “today”.\n else {\n calendar.\n set( 'select', null ).\n set( 'highlight', calendar.item.now )\n }\n\n\n // The keycode to movement mapping.\n calendar.key = {\n 40: 7, // Down\n 38: -7, // Up\n 39: function() { return isRTL() ? -1 : 1 }, // Right\n 37: function() { return isRTL() ? 1 : -1 }, // Left\n go: function( timeChange ) {\n var highlightedObject = calendar.item.highlight,\n targetDate = new Date( highlightedObject.year, highlightedObject.month, highlightedObject.date + timeChange )\n calendar.set(\n 'highlight',\n targetDate,\n { interval: timeChange }\n )\n this.render()\n }\n }\n\n\n // Bind some picker events.\n picker.\n on( 'render', function() {\n picker.$root.find( '.' + settings.klass.selectMonth ).on( 'change', function() {\n var value = this.value\n if ( value ) {\n picker.set( 'highlight', [ picker.get( 'view' ).year, value, picker.get( 'highlight' ).date ] )\n picker.$root.find( '.' + settings.klass.selectMonth ).trigger( 'focus' )\n }\n })\n picker.$root.find( '.' + settings.klass.selectYear ).on( 'change', function() {\n var value = this.value\n if ( value ) {\n picker.set( 'highlight', [ value, picker.get( 'view' ).month, picker.get( 'highlight' ).date ] )\n picker.$root.find( '.' + settings.klass.selectYear ).trigger( 'focus' )\n }\n })\n }, 1 ).\n on( 'open', function() {\n var includeToday = ''\n if ( calendar.disabled( calendar.get('now') ) ) {\n includeToday = ':not(.' + settings.klass.buttonToday + ')'\n }\n picker.$root.find( 'button' + includeToday + ', select' ).attr( 'disabled', false )\n }, 1 ).\n on( 'close', function() {\n picker.$root.find( 'button, select' ).attr( 'disabled', true )\n }, 1 )\n\n}", "title": "" }, { "docid": "83263536e782443384fd2da77ccaea52", "score": "0.6396038", "text": "function DatePicker( picker, settings ) {\n\n var calendar = this,\n element = picker.$node[ 0 ],\n elementValue = element.value,\n elementDataValue = picker.$node.data( 'value' ),\n valueString = elementDataValue || elementValue,\n formatString = elementDataValue ? settings.formatSubmit : settings.format,\n isRTL = function() {\n\n return element.currentStyle ?\n\n // For IE.\n element.currentStyle.direction == 'rtl' :\n\n // For normal browsers.\n getComputedStyle( picker.$root[0] ).direction == 'rtl'\n }\n\n calendar.settings = settings\n calendar.$node = picker.$node\n\n // The queue of methods that will be used to build item objects.\n calendar.queue = {\n min: 'measure create',\n max: 'measure create',\n now: 'now create',\n select: 'parse create validate',\n highlight: 'parse navigate create validate',\n view: 'parse create validate viewset',\n disable: 'deactivate',\n enable: 'activate'\n }\n\n // The component's item object.\n calendar.item = {}\n\n calendar.item.clear = null\n calendar.item.disable = ( settings.disable || [] ).slice( 0 )\n calendar.item.enable = -(function( collectionDisabled ) {\n return collectionDisabled[ 0 ] === true ? collectionDisabled.shift() : -1\n })( calendar.item.disable )\n\n calendar.\n set( 'min', settings.min ).\n set( 'max', settings.max ).\n set( 'now' )\n\n // When there’s a value, set the `select`, which in turn\n // also sets the `highlight` and `view`.\n if ( valueString ) {\n calendar.set( 'select', valueString, {\n format: formatString,\n defaultValue: true\n })\n }\n\n // If there’s no value, default to highlighting “today”.\n else {\n calendar.\n set( 'select', null ).\n set( 'highlight', calendar.item.now )\n }\n\n\n // The keycode to movement mapping.\n calendar.key = {\n 40: 7, // Down\n 38: -7, // Up\n 39: function() { return isRTL() ? -1 : 1 }, // Right\n 37: function() { return isRTL() ? 1 : -1 }, // Left\n go: function( timeChange ) {\n var highlightedObject = calendar.item.highlight,\n targetDate = new Date( highlightedObject.year, highlightedObject.month, highlightedObject.date + timeChange )\n calendar.set(\n 'highlight',\n targetDate,\n { interval: timeChange }\n )\n this.render()\n }\n }\n\n\n // Bind some picker events.\n picker.\n on( 'render', function() {\n picker.$root.find( '.' + settings.klass.selectMonth ).on( 'change', function() {\n var value = this.value\n if ( value ) {\n picker.set( 'highlight', [ picker.get( 'view' ).year, value, picker.get( 'highlight' ).date ] )\n picker.$root.find( '.' + settings.klass.selectMonth ).trigger( 'focus' )\n }\n })\n picker.$root.find( '.' + settings.klass.selectYear ).on( 'change', function() {\n var value = this.value\n if ( value ) {\n picker.set( 'highlight', [ value, picker.get( 'view' ).month, picker.get( 'highlight' ).date ] )\n picker.$root.find( '.' + settings.klass.selectYear ).trigger( 'focus' )\n }\n })\n }, 1 ).\n on( 'open', function() {\n var includeToday = ''\n if ( calendar.disabled( calendar.get('now') ) ) {\n includeToday = ':not(.' + settings.klass.buttonToday + ')'\n }\n picker.$root.find( 'button' + includeToday + ', select' ).attr( 'disabled', false )\n }, 1 ).\n on( 'close', function() {\n picker.$root.find( 'button, select' ).attr( 'disabled', true )\n }, 1 )\n\n}", "title": "" }, { "docid": "83263536e782443384fd2da77ccaea52", "score": "0.6396038", "text": "function DatePicker( picker, settings ) {\n\n var calendar = this,\n element = picker.$node[ 0 ],\n elementValue = element.value,\n elementDataValue = picker.$node.data( 'value' ),\n valueString = elementDataValue || elementValue,\n formatString = elementDataValue ? settings.formatSubmit : settings.format,\n isRTL = function() {\n\n return element.currentStyle ?\n\n // For IE.\n element.currentStyle.direction == 'rtl' :\n\n // For normal browsers.\n getComputedStyle( picker.$root[0] ).direction == 'rtl'\n }\n\n calendar.settings = settings\n calendar.$node = picker.$node\n\n // The queue of methods that will be used to build item objects.\n calendar.queue = {\n min: 'measure create',\n max: 'measure create',\n now: 'now create',\n select: 'parse create validate',\n highlight: 'parse navigate create validate',\n view: 'parse create validate viewset',\n disable: 'deactivate',\n enable: 'activate'\n }\n\n // The component's item object.\n calendar.item = {}\n\n calendar.item.clear = null\n calendar.item.disable = ( settings.disable || [] ).slice( 0 )\n calendar.item.enable = -(function( collectionDisabled ) {\n return collectionDisabled[ 0 ] === true ? collectionDisabled.shift() : -1\n })( calendar.item.disable )\n\n calendar.\n set( 'min', settings.min ).\n set( 'max', settings.max ).\n set( 'now' )\n\n // When there’s a value, set the `select`, which in turn\n // also sets the `highlight` and `view`.\n if ( valueString ) {\n calendar.set( 'select', valueString, {\n format: formatString,\n defaultValue: true\n })\n }\n\n // If there’s no value, default to highlighting “today”.\n else {\n calendar.\n set( 'select', null ).\n set( 'highlight', calendar.item.now )\n }\n\n\n // The keycode to movement mapping.\n calendar.key = {\n 40: 7, // Down\n 38: -7, // Up\n 39: function() { return isRTL() ? -1 : 1 }, // Right\n 37: function() { return isRTL() ? 1 : -1 }, // Left\n go: function( timeChange ) {\n var highlightedObject = calendar.item.highlight,\n targetDate = new Date( highlightedObject.year, highlightedObject.month, highlightedObject.date + timeChange )\n calendar.set(\n 'highlight',\n targetDate,\n { interval: timeChange }\n )\n this.render()\n }\n }\n\n\n // Bind some picker events.\n picker.\n on( 'render', function() {\n picker.$root.find( '.' + settings.klass.selectMonth ).on( 'change', function() {\n var value = this.value\n if ( value ) {\n picker.set( 'highlight', [ picker.get( 'view' ).year, value, picker.get( 'highlight' ).date ] )\n picker.$root.find( '.' + settings.klass.selectMonth ).trigger( 'focus' )\n }\n })\n picker.$root.find( '.' + settings.klass.selectYear ).on( 'change', function() {\n var value = this.value\n if ( value ) {\n picker.set( 'highlight', [ value, picker.get( 'view' ).month, picker.get( 'highlight' ).date ] )\n picker.$root.find( '.' + settings.klass.selectYear ).trigger( 'focus' )\n }\n })\n }, 1 ).\n on( 'open', function() {\n var includeToday = ''\n if ( calendar.disabled( calendar.get('now') ) ) {\n includeToday = ':not(.' + settings.klass.buttonToday + ')'\n }\n picker.$root.find( 'button' + includeToday + ', select' ).attr( 'disabled', false )\n }, 1 ).\n on( 'close', function() {\n picker.$root.find( 'button, select' ).attr( 'disabled', true )\n }, 1 )\n\n}", "title": "" }, { "docid": "83263536e782443384fd2da77ccaea52", "score": "0.6396038", "text": "function DatePicker( picker, settings ) {\n\n var calendar = this,\n element = picker.$node[ 0 ],\n elementValue = element.value,\n elementDataValue = picker.$node.data( 'value' ),\n valueString = elementDataValue || elementValue,\n formatString = elementDataValue ? settings.formatSubmit : settings.format,\n isRTL = function() {\n\n return element.currentStyle ?\n\n // For IE.\n element.currentStyle.direction == 'rtl' :\n\n // For normal browsers.\n getComputedStyle( picker.$root[0] ).direction == 'rtl'\n }\n\n calendar.settings = settings\n calendar.$node = picker.$node\n\n // The queue of methods that will be used to build item objects.\n calendar.queue = {\n min: 'measure create',\n max: 'measure create',\n now: 'now create',\n select: 'parse create validate',\n highlight: 'parse navigate create validate',\n view: 'parse create validate viewset',\n disable: 'deactivate',\n enable: 'activate'\n }\n\n // The component's item object.\n calendar.item = {}\n\n calendar.item.clear = null\n calendar.item.disable = ( settings.disable || [] ).slice( 0 )\n calendar.item.enable = -(function( collectionDisabled ) {\n return collectionDisabled[ 0 ] === true ? collectionDisabled.shift() : -1\n })( calendar.item.disable )\n\n calendar.\n set( 'min', settings.min ).\n set( 'max', settings.max ).\n set( 'now' )\n\n // When there’s a value, set the `select`, which in turn\n // also sets the `highlight` and `view`.\n if ( valueString ) {\n calendar.set( 'select', valueString, {\n format: formatString,\n defaultValue: true\n })\n }\n\n // If there’s no value, default to highlighting “today”.\n else {\n calendar.\n set( 'select', null ).\n set( 'highlight', calendar.item.now )\n }\n\n\n // The keycode to movement mapping.\n calendar.key = {\n 40: 7, // Down\n 38: -7, // Up\n 39: function() { return isRTL() ? -1 : 1 }, // Right\n 37: function() { return isRTL() ? 1 : -1 }, // Left\n go: function( timeChange ) {\n var highlightedObject = calendar.item.highlight,\n targetDate = new Date( highlightedObject.year, highlightedObject.month, highlightedObject.date + timeChange )\n calendar.set(\n 'highlight',\n targetDate,\n { interval: timeChange }\n )\n this.render()\n }\n }\n\n\n // Bind some picker events.\n picker.\n on( 'render', function() {\n picker.$root.find( '.' + settings.klass.selectMonth ).on( 'change', function() {\n var value = this.value\n if ( value ) {\n picker.set( 'highlight', [ picker.get( 'view' ).year, value, picker.get( 'highlight' ).date ] )\n picker.$root.find( '.' + settings.klass.selectMonth ).trigger( 'focus' )\n }\n })\n picker.$root.find( '.' + settings.klass.selectYear ).on( 'change', function() {\n var value = this.value\n if ( value ) {\n picker.set( 'highlight', [ value, picker.get( 'view' ).month, picker.get( 'highlight' ).date ] )\n picker.$root.find( '.' + settings.klass.selectYear ).trigger( 'focus' )\n }\n })\n }, 1 ).\n on( 'open', function() {\n var includeToday = ''\n if ( calendar.disabled( calendar.get('now') ) ) {\n includeToday = ':not(.' + settings.klass.buttonToday + ')'\n }\n picker.$root.find( 'button' + includeToday + ', select' ).attr( 'disabled', false )\n }, 1 ).\n on( 'close', function() {\n picker.$root.find( 'button, select' ).attr( 'disabled', true )\n }, 1 )\n\n}", "title": "" }, { "docid": "4ac63860cb646be4d79b8be0f557b41b", "score": "0.63617706", "text": "get valueAsDate() {\n return this.getInput().valueAsDate;\n }", "title": "" }, { "docid": "834c3e600d8f2a88b2eb5a2799f73e9d", "score": "0.6341636", "text": "function setElValues(instance) {\n\t\tif (instance.formatter) return instance.formatter(instance.input, instance.dateSelected);\n\t\tconst year = instance.dateSelected.getFullYear();\n\t\tconst month = instance.dateSelected.getMonth() + 1;\n\t\tconst zeroBeforeMonth = month < 10 ? 0 : '';\n\t\tconst date = instance.dateSelected.getDate();\n\t\tconst zeroBeforeDate = date < 10 ? 0 : '';\n\t\tinstance.input.value = `${year}-${zeroBeforeMonth}${month}-${zeroBeforeDate}${date}`;\n\t}", "title": "" }, { "docid": "8e82c9c2b0b12a929fcf6c6396eed2f0", "score": "0.6321378", "text": "function DatePicker( picker, settings ) {\n\n var calendar = this,\n element = picker.$node[ 0 ],\n elementValue = element.value,\n elementDataValue = picker.$node.data( 'value' ),\n valueString = elementDataValue || elementValue,\n formatString = elementDataValue ? settings.formatSubmit : settings.format,\n isRTL = function() {\n\n return element.currentStyle ?\n\n // For IE.\n element.currentStyle.direction == 'rtl' :\n\n // For normal browsers.\n getComputedStyle( picker.$root[0] ).direction == 'rtl'\n }\n\n calendar.settings = settings\n calendar.$node = picker.$node\n\n // The queue of methods that will be used to build item objects.\n calendar.queue = {\n min: 'measure create',\n max: 'measure create',\n now: 'now create',\n select: 'parse create validate',\n highlight: 'parse navigate create validate',\n view: 'parse create validate viewset',\n disable: 'deactivate',\n enable: 'activate'\n }\n\n // The component's item object.\n calendar.item = {}\n\n calendar.item.clear = null\n calendar.item.disable = ( settings.disable || [] ).slice( 0 )\n calendar.item.enable = -(function( collectionDisabled ) {\n return collectionDisabled[ 0 ] === true ? collectionDisabled.shift() : -1\n })( calendar.item.disable )\n\n calendar.\n set( 'min', settings.min ).\n set( 'max', settings.max ).\n set( 'now' )\n\n // When there’s a value, set the `select`, which in turn\n // also sets the `highlight` and `view`.\n if ( valueString ) {\n calendar.set( 'select', valueString, { format: formatString })\n }\n\n // If there’s no value, default to highlighting “today”.\n else {\n calendar.\n set( 'select', null ).\n set( 'highlight', calendar.item.now )\n }\n\n\n // The keycode to movement mapping.\n calendar.key = {\n 40: 7, // Down\n 38: -7, // Up\n 39: function() { return isRTL() ? -1 : 1 }, // Right\n 37: function() { return isRTL() ? 1 : -1 }, // Left\n go: function( timeChange ) {\n var highlightedObject = calendar.item.highlight,\n targetDate = new Date( highlightedObject.year, highlightedObject.month, highlightedObject.date + timeChange )\n calendar.set(\n 'highlight',\n targetDate,\n { interval: timeChange }\n )\n this.render()\n }\n }\n\n\n // Bind some picker events.\n picker.\n on( 'render', function() {\n picker.$root.find( '.' + settings.klass.selectMonth ).on( 'change', function() {\n var value = this.value\n if ( value ) {\n picker.set( 'highlight', [ picker.get( 'view' ).year, value, picker.get( 'highlight' ).date ] )\n picker.$root.find( '.' + settings.klass.selectMonth ).trigger( 'focus' )\n }\n })\n picker.$root.find( '.' + settings.klass.selectYear ).on( 'change', function() {\n var value = this.value\n if ( value ) {\n picker.set( 'highlight', [ value, picker.get( 'view' ).month, picker.get( 'highlight' ).date ] )\n picker.$root.find( '.' + settings.klass.selectYear ).trigger( 'focus' )\n }\n })\n }, 1 ).\n on( 'open', function() {\n var includeToday = ''\n if ( calendar.disabled( calendar.get('now') ) ) {\n includeToday = ':not(.' + settings.klass.buttonToday + ')'\n }\n picker.$root.find( 'button' + includeToday + ', select' ).attr( 'disabled', false )\n }, 1 ).\n on( 'close', function() {\n picker.$root.find( 'button, select' ).attr( 'disabled', true )\n }, 1 )\n\n}", "title": "" }, { "docid": "8e82c9c2b0b12a929fcf6c6396eed2f0", "score": "0.6321378", "text": "function DatePicker( picker, settings ) {\n\n var calendar = this,\n element = picker.$node[ 0 ],\n elementValue = element.value,\n elementDataValue = picker.$node.data( 'value' ),\n valueString = elementDataValue || elementValue,\n formatString = elementDataValue ? settings.formatSubmit : settings.format,\n isRTL = function() {\n\n return element.currentStyle ?\n\n // For IE.\n element.currentStyle.direction == 'rtl' :\n\n // For normal browsers.\n getComputedStyle( picker.$root[0] ).direction == 'rtl'\n }\n\n calendar.settings = settings\n calendar.$node = picker.$node\n\n // The queue of methods that will be used to build item objects.\n calendar.queue = {\n min: 'measure create',\n max: 'measure create',\n now: 'now create',\n select: 'parse create validate',\n highlight: 'parse navigate create validate',\n view: 'parse create validate viewset',\n disable: 'deactivate',\n enable: 'activate'\n }\n\n // The component's item object.\n calendar.item = {}\n\n calendar.item.clear = null\n calendar.item.disable = ( settings.disable || [] ).slice( 0 )\n calendar.item.enable = -(function( collectionDisabled ) {\n return collectionDisabled[ 0 ] === true ? collectionDisabled.shift() : -1\n })( calendar.item.disable )\n\n calendar.\n set( 'min', settings.min ).\n set( 'max', settings.max ).\n set( 'now' )\n\n // When there’s a value, set the `select`, which in turn\n // also sets the `highlight` and `view`.\n if ( valueString ) {\n calendar.set( 'select', valueString, { format: formatString })\n }\n\n // If there’s no value, default to highlighting “today”.\n else {\n calendar.\n set( 'select', null ).\n set( 'highlight', calendar.item.now )\n }\n\n\n // The keycode to movement mapping.\n calendar.key = {\n 40: 7, // Down\n 38: -7, // Up\n 39: function() { return isRTL() ? -1 : 1 }, // Right\n 37: function() { return isRTL() ? 1 : -1 }, // Left\n go: function( timeChange ) {\n var highlightedObject = calendar.item.highlight,\n targetDate = new Date( highlightedObject.year, highlightedObject.month, highlightedObject.date + timeChange )\n calendar.set(\n 'highlight',\n targetDate,\n { interval: timeChange }\n )\n this.render()\n }\n }\n\n\n // Bind some picker events.\n picker.\n on( 'render', function() {\n picker.$root.find( '.' + settings.klass.selectMonth ).on( 'change', function() {\n var value = this.value\n if ( value ) {\n picker.set( 'highlight', [ picker.get( 'view' ).year, value, picker.get( 'highlight' ).date ] )\n picker.$root.find( '.' + settings.klass.selectMonth ).trigger( 'focus' )\n }\n })\n picker.$root.find( '.' + settings.klass.selectYear ).on( 'change', function() {\n var value = this.value\n if ( value ) {\n picker.set( 'highlight', [ value, picker.get( 'view' ).month, picker.get( 'highlight' ).date ] )\n picker.$root.find( '.' + settings.klass.selectYear ).trigger( 'focus' )\n }\n })\n }, 1 ).\n on( 'open', function() {\n var includeToday = ''\n if ( calendar.disabled( calendar.get('now') ) ) {\n includeToday = ':not(.' + settings.klass.buttonToday + ')'\n }\n picker.$root.find( 'button' + includeToday + ', select' ).attr( 'disabled', false )\n }, 1 ).\n on( 'close', function() {\n picker.$root.find( 'button, select' ).attr( 'disabled', true )\n }, 1 )\n\n}", "title": "" }, { "docid": "8e82c9c2b0b12a929fcf6c6396eed2f0", "score": "0.6321378", "text": "function DatePicker( picker, settings ) {\n\n var calendar = this,\n element = picker.$node[ 0 ],\n elementValue = element.value,\n elementDataValue = picker.$node.data( 'value' ),\n valueString = elementDataValue || elementValue,\n formatString = elementDataValue ? settings.formatSubmit : settings.format,\n isRTL = function() {\n\n return element.currentStyle ?\n\n // For IE.\n element.currentStyle.direction == 'rtl' :\n\n // For normal browsers.\n getComputedStyle( picker.$root[0] ).direction == 'rtl'\n }\n\n calendar.settings = settings\n calendar.$node = picker.$node\n\n // The queue of methods that will be used to build item objects.\n calendar.queue = {\n min: 'measure create',\n max: 'measure create',\n now: 'now create',\n select: 'parse create validate',\n highlight: 'parse navigate create validate',\n view: 'parse create validate viewset',\n disable: 'deactivate',\n enable: 'activate'\n }\n\n // The component's item object.\n calendar.item = {}\n\n calendar.item.clear = null\n calendar.item.disable = ( settings.disable || [] ).slice( 0 )\n calendar.item.enable = -(function( collectionDisabled ) {\n return collectionDisabled[ 0 ] === true ? collectionDisabled.shift() : -1\n })( calendar.item.disable )\n\n calendar.\n set( 'min', settings.min ).\n set( 'max', settings.max ).\n set( 'now' )\n\n // When there’s a value, set the `select`, which in turn\n // also sets the `highlight` and `view`.\n if ( valueString ) {\n calendar.set( 'select', valueString, { format: formatString })\n }\n\n // If there’s no value, default to highlighting “today”.\n else {\n calendar.\n set( 'select', null ).\n set( 'highlight', calendar.item.now )\n }\n\n\n // The keycode to movement mapping.\n calendar.key = {\n 40: 7, // Down\n 38: -7, // Up\n 39: function() { return isRTL() ? -1 : 1 }, // Right\n 37: function() { return isRTL() ? 1 : -1 }, // Left\n go: function( timeChange ) {\n var highlightedObject = calendar.item.highlight,\n targetDate = new Date( highlightedObject.year, highlightedObject.month, highlightedObject.date + timeChange )\n calendar.set(\n 'highlight',\n targetDate,\n { interval: timeChange }\n )\n this.render()\n }\n }\n\n\n // Bind some picker events.\n picker.\n on( 'render', function() {\n picker.$root.find( '.' + settings.klass.selectMonth ).on( 'change', function() {\n var value = this.value\n if ( value ) {\n picker.set( 'highlight', [ picker.get( 'view' ).year, value, picker.get( 'highlight' ).date ] )\n picker.$root.find( '.' + settings.klass.selectMonth ).trigger( 'focus' )\n }\n })\n picker.$root.find( '.' + settings.klass.selectYear ).on( 'change', function() {\n var value = this.value\n if ( value ) {\n picker.set( 'highlight', [ value, picker.get( 'view' ).month, picker.get( 'highlight' ).date ] )\n picker.$root.find( '.' + settings.klass.selectYear ).trigger( 'focus' )\n }\n })\n }, 1 ).\n on( 'open', function() {\n var includeToday = ''\n if ( calendar.disabled( calendar.get('now') ) ) {\n includeToday = ':not(.' + settings.klass.buttonToday + ')'\n }\n picker.$root.find( 'button' + includeToday + ', select' ).attr( 'disabled', false )\n }, 1 ).\n on( 'close', function() {\n picker.$root.find( 'button, select' ).attr( 'disabled', true )\n }, 1 )\n\n}", "title": "" }, { "docid": "1fb8ee1611c426115d3608405b2565f5", "score": "0.6321378", "text": "function DatePicker( picker, settings ) {\n\n var calendar = this,\n element = picker.$node[ 0 ],\n elementValue = element.value,\n elementDataValue = picker.$node.data( 'value' ),\n valueString = elementDataValue || elementValue,\n formatString = elementDataValue ? settings.formatSubmit : settings.format,\n isRTL = function() {\n\n return element.currentStyle ?\n\n // For IE.\n element.currentStyle.direction == 'rtl' :\n\n // For normal browsers.\n getComputedStyle( picker.$root[0] ).direction == 'rtl'\n }\n\n calendar.settings = settings\n calendar.$node = picker.$node\n\n // The queue of methods that will be used to build item objects.\n calendar.queue = {\n min: 'measure create',\n max: 'measure create',\n now: 'now create',\n select: 'parse create validate',\n highlight: 'parse navigate create validate',\n view: 'parse create validate viewset',\n disable: 'deactivate',\n enable: 'activate'\n }\n\n // The component's item object.\n calendar.item = {}\n\n calendar.item.clear = null\n calendar.item.disable = ( settings.disable || [] ).slice( 0 )\n calendar.item.enable = -(function( collectionDisabled ) {\n return collectionDisabled[ 0 ] === true ? collectionDisabled.shift() : -1\n })( calendar.item.disable )\n\n calendar.\n set( 'min', settings.min ).\n set( 'max', settings.max ).\n set( 'now' )\n\n // When there’s a value, set the `select`, which in turn\n // also sets the `highlight` and `view`.\n if ( valueString ) {\n calendar.set( 'select', valueString, { format: formatString })\n }\n\n // If there’s no value, default to highlighting “today”.\n else {\n calendar.\n set( 'select', null ).\n set( 'highlight', calendar.item.now )\n }\n\n\n // The keycode to movement mapping.\n calendar.key = {\n 40: 7, // Down\n 38: -7, // Up\n 39: function() { return isRTL() ? -1 : 1 }, // Right\n 37: function() { return isRTL() ? 1 : -1 }, // Left\n go: function( timeChange ) {\n var highlightedObject = calendar.item.highlight,\n targetDate = new Date( highlightedObject.year, highlightedObject.month, highlightedObject.date + timeChange )\n calendar.set(\n 'highlight',\n [ targetDate.getFullYear(), targetDate.getMonth(), targetDate.getDate() ],\n { interval: timeChange }\n )\n this.render()\n }\n }\n\n\n // Bind some picker events.\n picker.\n on( 'render', function() {\n picker.$root.find( '.' + settings.klass.selectMonth ).on( 'change', function() {\n var value = this.value\n if ( value ) {\n picker.set( 'highlight', [ picker.get( 'view' ).year, value, picker.get( 'highlight' ).date ] )\n picker.$root.find( '.' + settings.klass.selectMonth ).trigger( 'focus' )\n }\n })\n picker.$root.find( '.' + settings.klass.selectYear ).on( 'change', function() {\n var value = this.value\n if ( value ) {\n picker.set( 'highlight', [ value, picker.get( 'view' ).month, picker.get( 'highlight' ).date ] )\n picker.$root.find( '.' + settings.klass.selectYear ).trigger( 'focus' )\n }\n })\n }, 1 ).\n on( 'open', function() {\n var includeToday = ''\n if ( calendar.disabled( calendar.get('now') ) ) {\n includeToday = ':not(.' + settings.klass.buttonToday + ')'\n }\n picker.$root.find( 'button' + includeToday + ', select' ).attr( 'disabled', false )\n }, 1 ).\n on( 'close', function() {\n picker.$root.find( 'button, select' ).attr( 'disabled', true )\n }, 1 )\n\n}", "title": "" }, { "docid": "8e82c9c2b0b12a929fcf6c6396eed2f0", "score": "0.6321378", "text": "function DatePicker( picker, settings ) {\n\n var calendar = this,\n element = picker.$node[ 0 ],\n elementValue = element.value,\n elementDataValue = picker.$node.data( 'value' ),\n valueString = elementDataValue || elementValue,\n formatString = elementDataValue ? settings.formatSubmit : settings.format,\n isRTL = function() {\n\n return element.currentStyle ?\n\n // For IE.\n element.currentStyle.direction == 'rtl' :\n\n // For normal browsers.\n getComputedStyle( picker.$root[0] ).direction == 'rtl'\n }\n\n calendar.settings = settings\n calendar.$node = picker.$node\n\n // The queue of methods that will be used to build item objects.\n calendar.queue = {\n min: 'measure create',\n max: 'measure create',\n now: 'now create',\n select: 'parse create validate',\n highlight: 'parse navigate create validate',\n view: 'parse create validate viewset',\n disable: 'deactivate',\n enable: 'activate'\n }\n\n // The component's item object.\n calendar.item = {}\n\n calendar.item.clear = null\n calendar.item.disable = ( settings.disable || [] ).slice( 0 )\n calendar.item.enable = -(function( collectionDisabled ) {\n return collectionDisabled[ 0 ] === true ? collectionDisabled.shift() : -1\n })( calendar.item.disable )\n\n calendar.\n set( 'min', settings.min ).\n set( 'max', settings.max ).\n set( 'now' )\n\n // When there’s a value, set the `select`, which in turn\n // also sets the `highlight` and `view`.\n if ( valueString ) {\n calendar.set( 'select', valueString, { format: formatString })\n }\n\n // If there’s no value, default to highlighting “today”.\n else {\n calendar.\n set( 'select', null ).\n set( 'highlight', calendar.item.now )\n }\n\n\n // The keycode to movement mapping.\n calendar.key = {\n 40: 7, // Down\n 38: -7, // Up\n 39: function() { return isRTL() ? -1 : 1 }, // Right\n 37: function() { return isRTL() ? 1 : -1 }, // Left\n go: function( timeChange ) {\n var highlightedObject = calendar.item.highlight,\n targetDate = new Date( highlightedObject.year, highlightedObject.month, highlightedObject.date + timeChange )\n calendar.set(\n 'highlight',\n targetDate,\n { interval: timeChange }\n )\n this.render()\n }\n }\n\n\n // Bind some picker events.\n picker.\n on( 'render', function() {\n picker.$root.find( '.' + settings.klass.selectMonth ).on( 'change', function() {\n var value = this.value\n if ( value ) {\n picker.set( 'highlight', [ picker.get( 'view' ).year, value, picker.get( 'highlight' ).date ] )\n picker.$root.find( '.' + settings.klass.selectMonth ).trigger( 'focus' )\n }\n })\n picker.$root.find( '.' + settings.klass.selectYear ).on( 'change', function() {\n var value = this.value\n if ( value ) {\n picker.set( 'highlight', [ value, picker.get( 'view' ).month, picker.get( 'highlight' ).date ] )\n picker.$root.find( '.' + settings.klass.selectYear ).trigger( 'focus' )\n }\n })\n }, 1 ).\n on( 'open', function() {\n var includeToday = ''\n if ( calendar.disabled( calendar.get('now') ) ) {\n includeToday = ':not(.' + settings.klass.buttonToday + ')'\n }\n picker.$root.find( 'button' + includeToday + ', select' ).attr( 'disabled', false )\n }, 1 ).\n on( 'close', function() {\n picker.$root.find( 'button, select' ).attr( 'disabled', true )\n }, 1 )\n\n}", "title": "" }, { "docid": "8e82c9c2b0b12a929fcf6c6396eed2f0", "score": "0.6321378", "text": "function DatePicker( picker, settings ) {\n\n var calendar = this,\n element = picker.$node[ 0 ],\n elementValue = element.value,\n elementDataValue = picker.$node.data( 'value' ),\n valueString = elementDataValue || elementValue,\n formatString = elementDataValue ? settings.formatSubmit : settings.format,\n isRTL = function() {\n\n return element.currentStyle ?\n\n // For IE.\n element.currentStyle.direction == 'rtl' :\n\n // For normal browsers.\n getComputedStyle( picker.$root[0] ).direction == 'rtl'\n }\n\n calendar.settings = settings\n calendar.$node = picker.$node\n\n // The queue of methods that will be used to build item objects.\n calendar.queue = {\n min: 'measure create',\n max: 'measure create',\n now: 'now create',\n select: 'parse create validate',\n highlight: 'parse navigate create validate',\n view: 'parse create validate viewset',\n disable: 'deactivate',\n enable: 'activate'\n }\n\n // The component's item object.\n calendar.item = {}\n\n calendar.item.clear = null\n calendar.item.disable = ( settings.disable || [] ).slice( 0 )\n calendar.item.enable = -(function( collectionDisabled ) {\n return collectionDisabled[ 0 ] === true ? collectionDisabled.shift() : -1\n })( calendar.item.disable )\n\n calendar.\n set( 'min', settings.min ).\n set( 'max', settings.max ).\n set( 'now' )\n\n // When there’s a value, set the `select`, which in turn\n // also sets the `highlight` and `view`.\n if ( valueString ) {\n calendar.set( 'select', valueString, { format: formatString })\n }\n\n // If there’s no value, default to highlighting “today”.\n else {\n calendar.\n set( 'select', null ).\n set( 'highlight', calendar.item.now )\n }\n\n\n // The keycode to movement mapping.\n calendar.key = {\n 40: 7, // Down\n 38: -7, // Up\n 39: function() { return isRTL() ? -1 : 1 }, // Right\n 37: function() { return isRTL() ? 1 : -1 }, // Left\n go: function( timeChange ) {\n var highlightedObject = calendar.item.highlight,\n targetDate = new Date( highlightedObject.year, highlightedObject.month, highlightedObject.date + timeChange )\n calendar.set(\n 'highlight',\n targetDate,\n { interval: timeChange }\n )\n this.render()\n }\n }\n\n\n // Bind some picker events.\n picker.\n on( 'render', function() {\n picker.$root.find( '.' + settings.klass.selectMonth ).on( 'change', function() {\n var value = this.value\n if ( value ) {\n picker.set( 'highlight', [ picker.get( 'view' ).year, value, picker.get( 'highlight' ).date ] )\n picker.$root.find( '.' + settings.klass.selectMonth ).trigger( 'focus' )\n }\n })\n picker.$root.find( '.' + settings.klass.selectYear ).on( 'change', function() {\n var value = this.value\n if ( value ) {\n picker.set( 'highlight', [ value, picker.get( 'view' ).month, picker.get( 'highlight' ).date ] )\n picker.$root.find( '.' + settings.klass.selectYear ).trigger( 'focus' )\n }\n })\n }, 1 ).\n on( 'open', function() {\n var includeToday = ''\n if ( calendar.disabled( calendar.get('now') ) ) {\n includeToday = ':not(.' + settings.klass.buttonToday + ')'\n }\n picker.$root.find( 'button' + includeToday + ', select' ).attr( 'disabled', false )\n }, 1 ).\n on( 'close', function() {\n picker.$root.find( 'button, select' ).attr( 'disabled', true )\n }, 1 )\n\n}", "title": "" }, { "docid": "571a4c9bd82f37b4b61fb181879bd5b3", "score": "0.6321378", "text": "function DatePicker( picker, settings ) {\n\n var calendar = this,\n element = picker.$node[ 0 ],\n elementValue = element.value,\n elementDataValue = picker.$node.data( 'value' ),\n valueString = elementDataValue || elementValue,\n formatString = elementDataValue ? settings.formatSubmit : settings.format,\n isRTL = function() {\n\n return element.currentStyle ?\n\n // For IE.\n element.currentStyle.direction == 'rtl' :\n\n // For normal browsers.\n getComputedStyle( picker.$root[0] ).direction == 'rtl'\n }\n\n calendar.settings = settings\n calendar.$node = picker.$node\n\n // The queue of methods that will be used to build item objects.\n calendar.queue = {\n min: 'measure create',\n max: 'measure create',\n now: 'now create',\n select: 'parse create validate',\n highlight: 'parse navigate create validate',\n view: 'parse create validate viewset',\n disable: 'deactivate',\n enable: 'activate'\n }\n\n // The component's item object.\n calendar.item = {}\n\n calendar.item.clear = null\n calendar.item.disable = ( settings.disable || [] ).slice( 0 )\n calendar.item.enable = -(function( collectionDisabled ) {\n return collectionDisabled[ 0 ] === true ? collectionDisabled.shift() : -1\n })( calendar.item.disable )\n\n calendar.\n set( 'min', settings.min ).\n set( 'max', settings.max ).\n set( 'now' )\n\n // When there’s a value, set the `select`, which in turn\n // also sets the `highlight` and `view`.\n if ( valueString ) {\n calendar.set( 'select', valueString, { format: formatString })\n }\n\n // If there’s no value, default to highlighting “today”.\n else {\n calendar.\n set( 'select', null ).\n set( 'highlight', calendar.item.now )\n }\n\n\n // The keycode to movement mapping.\n calendar.key = {\n 40: 7, // Down\n 38: -7, // Up\n 39: function() { return isRTL() ? -1 : 1 }, // Right\n 37: function() { return isRTL() ? 1 : -1 }, // Left\n go: function( timeChange ) {\n var highlightedObject = calendar.item.highlight,\n targetDate = new Date( Date.UTC(highlightedObject.year, highlightedObject.month, highlightedObject.date + timeChange) )\n calendar.set(\n 'highlight',\n targetDate,\n { interval: timeChange }\n )\n this.render()\n }\n }\n\n\n // Bind some picker events.\n picker.\n on( 'render', function() {\n picker.$root.find( '.' + settings.klass.selectMonth ).on( 'change', function() {\n var value = this.value\n if ( value ) {\n picker.set( 'highlight', [ picker.get( 'view' ).year, value, picker.get( 'highlight' ).date ] )\n picker.$root.find( '.' + settings.klass.selectMonth ).trigger( 'focus' )\n }\n })\n picker.$root.find( '.' + settings.klass.selectYear ).on( 'change', function() {\n var value = this.value\n if ( value ) {\n picker.set( 'highlight', [ value, picker.get( 'view' ).month, picker.get( 'highlight' ).date ] )\n picker.$root.find( '.' + settings.klass.selectYear ).trigger( 'focus' )\n }\n })\n }, 1 ).\n on( 'open', function() {\n var includeToday = ''\n if ( calendar.disabled( calendar.get('now') ) ) {\n includeToday = ':not(.' + settings.klass.buttonToday + ')'\n }\n picker.$root.find( 'button' + includeToday + ', select' ).attr( 'disabled', false )\n }, 1 ).\n on( 'close', function() {\n picker.$root.find( 'button, select' ).attr( 'disabled', true )\n }, 1 )\n\n}", "title": "" }, { "docid": "8e79faa078bfb6eb6ff6c4194c0a5a6c", "score": "0.62780815", "text": "selectDate(value) {\n if (!value) {\n return new Date();\n }\n super.selectDate(value);\n this.viewDate = value;\n }", "title": "" }, { "docid": "5b974976d74c8fcb0fa8fb770c60dba3", "score": "0.6273589", "text": "writeValue(value) {\n if (this._datePicker.compare(value, this._activeDate) === 0) {\n return;\n }\n if (value && value instanceof Date) {\n this.activeDate = value;\n this._datePicker.select(value, false);\n return;\n }\n this.activeDate = value ? new Date(value) : void 0;\n }", "title": "" }, { "docid": "55f6bdef18782bd7a54a434eaf76aae3", "score": "0.6244841", "text": "function setPickerValue() {\n $scope.date = null;\n\n if (ngModelCtrl && ngModelCtrl.$viewValue) {\n $scope.date = ngModelCtrl.$viewValue;\n console.log($scope.date);\n }\n\n //console.log(d_input.data('DateTimePicker'));\n if (d_input.data('DateTimePicker')) {\n d_input\n .data('DateTimePicker')\n .date($scope.date);\n }\n\n\n //console.log($scope.date);\n }", "title": "" }, { "docid": "e81026a844b37c54e33b11fa5c420968", "score": "0.61434186", "text": "function selectDate(ufodate) {\n return ufodate.datetime == dateValue;\n }", "title": "" }, { "docid": "cadc893e3a499758efe84d7e6eee0bfa", "score": "0.6140272", "text": "value(newVal) {\n $(this.$el).datepicker('setDate', newVal);\n\n }", "title": "" }, { "docid": "9d067b2c5e7d6b413218200d90a2ec5d", "score": "0.612695", "text": "function DatePicker(picker, settings) {\n\n var calendar = this,\n element = picker.$node[0],\n elementValue = element.value,\n elementDataValue = picker.$node.data('value'),\n valueString = elementDataValue || elementValue,\n formatString = elementDataValue ? settings.formatSubmit : settings.format,\n isRTL = function () {\n\n return element.currentStyle ?\n\n // For IE.\n element.currentStyle.direction == 'rtl' :\n\n // For normal browsers.\n getComputedStyle(picker.$root[0]).direction == 'rtl';\n };\n\n calendar.settings = settings;\n calendar.$node = picker.$node;\n\n // The queue of methods that will be used to build item objects.\n calendar.queue = {\n min: 'measure create',\n max: 'measure create',\n now: 'now create',\n select: 'parse create validate',\n highlight: 'parse navigate create validate',\n view: 'parse create validate viewset',\n disable: 'deactivate',\n enable: 'activate'\n\n // The component's item object.\n };calendar.item = {};\n\n calendar.item.clear = null;\n calendar.item.disable = (settings.disable || []).slice(0);\n calendar.item.enable = -function (collectionDisabled) {\n return collectionDisabled[0] === true ? collectionDisabled.shift() : -1;\n }(calendar.item.disable);\n\n calendar.set('min', settings.min).set('max', settings.max).set('now');\n\n // When there’s a value, set the `select`, which in turn\n // also sets the `highlight` and `view`.\n if (valueString) {\n calendar.set('select', valueString, { format: formatString });\n }\n\n // If there’s no value, default to highlighting “today”.\n else {\n calendar.set('select', null).set('highlight', calendar.item.now);\n }\n\n // The keycode to movement mapping.\n calendar.key = {\n 40: 7, // Down\n 38: -7, // Up\n 39: function () {\n return isRTL() ? -1 : 1;\n }, // Right\n 37: function () {\n return isRTL() ? 1 : -1;\n }, // Left\n go: function (timeChange) {\n var highlightedObject = calendar.item.highlight,\n targetDate = new Date(highlightedObject.year, highlightedObject.month, highlightedObject.date + timeChange);\n calendar.set('highlight', targetDate, { interval: timeChange });\n this.render();\n }\n\n // Bind some picker events.\n };picker.on('render', function () {\n picker.$root.find('.' + settings.klass.selectMonth).on('change', function () {\n var value = this.value;\n if (value) {\n picker.set('highlight', [picker.get('view').year, value, picker.get('highlight').date]);\n picker.$root.find('.' + settings.klass.selectMonth).trigger('focus');\n }\n });\n picker.$root.find('.' + settings.klass.selectYear).on('change', function () {\n var value = this.value;\n if (value) {\n picker.set('highlight', [value, picker.get('view').month, picker.get('highlight').date]);\n picker.$root.find('.' + settings.klass.selectYear).trigger('focus');\n }\n });\n }, 1).on('open', function () {\n var includeToday = '';\n if (calendar.disabled(calendar.get('now'))) {\n includeToday = ':not(.' + settings.klass.buttonToday + ')';\n }\n picker.$root.find('button' + includeToday + ', select').attr('disabled', false);\n }, 1).on('close', function () {\n picker.$root.find('button, select').attr('disabled', true);\n }, 1);\n }", "title": "" }, { "docid": "9d067b2c5e7d6b413218200d90a2ec5d", "score": "0.612695", "text": "function DatePicker(picker, settings) {\n\n var calendar = this,\n element = picker.$node[0],\n elementValue = element.value,\n elementDataValue = picker.$node.data('value'),\n valueString = elementDataValue || elementValue,\n formatString = elementDataValue ? settings.formatSubmit : settings.format,\n isRTL = function () {\n\n return element.currentStyle ?\n\n // For IE.\n element.currentStyle.direction == 'rtl' :\n\n // For normal browsers.\n getComputedStyle(picker.$root[0]).direction == 'rtl';\n };\n\n calendar.settings = settings;\n calendar.$node = picker.$node;\n\n // The queue of methods that will be used to build item objects.\n calendar.queue = {\n min: 'measure create',\n max: 'measure create',\n now: 'now create',\n select: 'parse create validate',\n highlight: 'parse navigate create validate',\n view: 'parse create validate viewset',\n disable: 'deactivate',\n enable: 'activate'\n\n // The component's item object.\n };calendar.item = {};\n\n calendar.item.clear = null;\n calendar.item.disable = (settings.disable || []).slice(0);\n calendar.item.enable = -function (collectionDisabled) {\n return collectionDisabled[0] === true ? collectionDisabled.shift() : -1;\n }(calendar.item.disable);\n\n calendar.set('min', settings.min).set('max', settings.max).set('now');\n\n // When there’s a value, set the `select`, which in turn\n // also sets the `highlight` and `view`.\n if (valueString) {\n calendar.set('select', valueString, { format: formatString });\n }\n\n // If there’s no value, default to highlighting “today”.\n else {\n calendar.set('select', null).set('highlight', calendar.item.now);\n }\n\n // The keycode to movement mapping.\n calendar.key = {\n 40: 7, // Down\n 38: -7, // Up\n 39: function () {\n return isRTL() ? -1 : 1;\n }, // Right\n 37: function () {\n return isRTL() ? 1 : -1;\n }, // Left\n go: function (timeChange) {\n var highlightedObject = calendar.item.highlight,\n targetDate = new Date(highlightedObject.year, highlightedObject.month, highlightedObject.date + timeChange);\n calendar.set('highlight', targetDate, { interval: timeChange });\n this.render();\n }\n\n // Bind some picker events.\n };picker.on('render', function () {\n picker.$root.find('.' + settings.klass.selectMonth).on('change', function () {\n var value = this.value;\n if (value) {\n picker.set('highlight', [picker.get('view').year, value, picker.get('highlight').date]);\n picker.$root.find('.' + settings.klass.selectMonth).trigger('focus');\n }\n });\n picker.$root.find('.' + settings.klass.selectYear).on('change', function () {\n var value = this.value;\n if (value) {\n picker.set('highlight', [value, picker.get('view').month, picker.get('highlight').date]);\n picker.$root.find('.' + settings.klass.selectYear).trigger('focus');\n }\n });\n }, 1).on('open', function () {\n var includeToday = '';\n if (calendar.disabled(calendar.get('now'))) {\n includeToday = ':not(.' + settings.klass.buttonToday + ')';\n }\n picker.$root.find('button' + includeToday + ', select').attr('disabled', false);\n }, 1).on('close', function () {\n picker.$root.find('button, select').attr('disabled', true);\n }, 1);\n }", "title": "" }, { "docid": "ae19df17251d547f55722411f797b86a", "score": "0.6116146", "text": "function handleDate() {\n if (temporal.value == \"monthly\") {\n document.getElementById('seldate').type = \"month\";\n var date = new Date();\n date.setDate(date.getDate() - 1);\n var yyyy = date.getFullYear().toString();\n var mm = (date.getMonth() + 1).toString(); // getMonth() is zero-based\n document.getElementById('seldate').value = yyyy + \"-\" + (mm[1] ? mm : \"0\" + mm[0])\n\n var elem = document.createElement('input');\n elem.setAttribute('type', 'date');\n //safari/firefox\n if (elem.type === 'text') {\n $('#seldate').prop(\"disabled\", true);\n } else {\n $('#seldate').prop(\"disabled\", false);\n }\n\n\n } else if (temporal.value == \"daily\") {\n $('#seldate').prop(\"disabled\", false);\n document.getElementById('seldate').type = \"date\";\n var date = new Date();\n date.setDate(date.getDate() - 1);\n var yyyy = date.getFullYear().toString();\n var mm = (date.getMonth() + 1).toString(); // getMonth() is zero-based\n var dd = date.getDate().toString();\n document.getElementById('seldate').value = yyyy + \"-\" + (mm[1] ? mm : \"0\" + mm[0]) + \"-\" + (dd[1] ? dd : \"0\" + dd[0]);\n }\n mapInit();\n}", "title": "" }, { "docid": "0b2669f5c235096b2b0e0772809e8ddc", "score": "0.60937697", "text": "function selects_onChange() {\r\n\t\tvar\tday = $(selectDayNode).val(),\r\n\t\t\tmonth = $(selectMonthNode).val(),\r\n\t\t\tyear = $(selectYearNode).val();\r\n\t\t\r\n\t\tif(day != 0 && month !=0 && year !=0) {\r\n\t\t\tvar selectDate = new Date(year,month - 1,day);\r\n\t\t\t$(hiddenNode).val(selectDate);\r\n\t\t\t$(hiddenNode).datepicker(\"setDate\", selectDate);\r\n\t\t}\r\n\t\t\r\n\t}", "title": "" }, { "docid": "af704a075e592b000e756cd0e9500666", "score": "0.60850304", "text": "get value() {\n return this.selectedDates;\n }", "title": "" }, { "docid": "ec7c547b084c5633bee5c3e03c4d3fe2", "score": "0.6065673", "text": "function populateDate(){\r\n\t\r\n\t//alert(\"inside Test \");\r\n\t\r\n\t//alert(testDate);\r\n\t\tComboBoxOptions.selectDateCorrectAns(function(data)\r\n \t\t{\r\n \t\tdwr.util.removeAllOptions(document.getElementsByName(\"fromDate\")[0]);\r\n \t\t\tdwr.util.addOptions(document.getElementsByName(\"fromDate\")[0],data);\r\n \t\r\n \t\t\tdwr.util.removeAllOptions(document.getElementsByName(\"toDate\")[0]);\r\n \t\t\tdwr.util.addOptions(document.getElementsByName(\"toDate\")[0],data);\r\n \t\r\n \t\r\n \t\t}\r\n \t\t);\r\n \r\n}", "title": "" }, { "docid": "68ff2a6b61aacc762e331b69882644ac", "score": "0.6056815", "text": "function DatePicker(picker, settings) {\r\n\r\n var calendar = this,\r\n element = picker.$node[0],\r\n elementValue = element.value,\r\n elementDataValue = picker.$node.data('value'),\r\n valueString = elementDataValue || elementValue,\r\n formatString = elementDataValue ? settings.formatSubmit : settings.format,\r\n isRTL = function () {\r\n\r\n return element.currentStyle ?\r\n\r\n // For IE.\r\n element.currentStyle.direction == 'rtl' :\r\n\r\n // For normal browsers.\r\n getComputedStyle(picker.$root[0]).direction == 'rtl';\r\n };\r\n\r\n calendar.settings = settings;\r\n calendar.$node = picker.$node;\r\n\r\n // The queue of methods that will be used to build item objects.\r\n calendar.queue = {\r\n min: 'measure create',\r\n max: 'measure create',\r\n now: 'now create',\r\n select: 'parse create validate',\r\n highlight: 'parse navigate create validate',\r\n view: 'parse create validate viewset',\r\n disable: 'deactivate',\r\n enable: 'activate'\r\n\r\n // The component's item object.\r\n };calendar.item = {};\r\n\r\n calendar.item.clear = null;\r\n calendar.item.disable = (settings.disable || []).slice(0);\r\n calendar.item.enable = -function (collectionDisabled) {\r\n return collectionDisabled[0] === true ? collectionDisabled.shift() : -1;\r\n }(calendar.item.disable);\r\n\r\n calendar.set('min', settings.min).set('max', settings.max).set('now');\r\n\r\n // When there’s a value, set the `select`, which in turn\r\n // also sets the `highlight` and `view`.\r\n if (valueString) {\r\n calendar.set('select', valueString, { format: formatString });\r\n }\r\n\r\n // If there’s no value, default to highlighting “today”.\r\n else {\r\n calendar.set('select', null).set('highlight', calendar.item.now);\r\n }\r\n\r\n // The keycode to movement mapping.\r\n calendar.key = {\r\n 40: 7, // Down\r\n 38: -7, // Up\r\n 39: function () {\r\n return isRTL() ? -1 : 1;\r\n }, // Right\r\n 37: function () {\r\n return isRTL() ? 1 : -1;\r\n }, // Left\r\n go: function (timeChange) {\r\n var highlightedObject = calendar.item.highlight,\r\n targetDate = new Date(highlightedObject.year, highlightedObject.month, highlightedObject.date + timeChange);\r\n calendar.set('highlight', targetDate, { interval: timeChange });\r\n this.render();\r\n }\r\n\r\n // Bind some picker events.\r\n };picker.on('render', function () {\r\n picker.$root.find('.' + settings.klass.selectMonth).on('change', function () {\r\n var value = this.value;\r\n if (value) {\r\n picker.set('highlight', [picker.get('view').year, value, picker.get('highlight').date]);\r\n picker.$root.find('.' + settings.klass.selectMonth).trigger('focus');\r\n }\r\n });\r\n picker.$root.find('.' + settings.klass.selectYear).on('change', function () {\r\n var value = this.value;\r\n if (value) {\r\n picker.set('highlight', [value, picker.get('view').month, picker.get('highlight').date]);\r\n picker.$root.find('.' + settings.klass.selectYear).trigger('focus');\r\n }\r\n });\r\n }, 1).on('open', function () {\r\n var includeToday = '';\r\n if (calendar.disabled(calendar.get('now'))) {\r\n includeToday = ':not(.' + settings.klass.buttonToday + ')';\r\n }\r\n picker.$root.find('button' + includeToday + ', select').attr('disabled', false);\r\n }, 1).on('close', function () {\r\n picker.$root.find('button, select').attr('disabled', true);\r\n }, 1);\r\n }", "title": "" }, { "docid": "d8bcf0db5cb9c4d1faf8171a7ff7891e", "score": "0.60547554", "text": "function Datepicker() {}", "title": "" }, { "docid": "f9fc37eefaf9fe37e8f484ee328c786b", "score": "0.60489374", "text": "render() {\n const valueAsDate = parseISODate(this.value);\n const formattedDate = valueAsDate && this.dateAdapter.format(valueAsDate);\n const selectedYear = (valueAsDate || this.focusedDay).getFullYear();\n const focusedMonth = this.focusedDay.getMonth();\n const focusedYear = this.focusedDay.getFullYear();\n const minDate = parseISODate(this.min);\n const maxDate = parseISODate(this.max);\n const prevMonthDisabled = minDate != null && minDate.getMonth() === focusedMonth && minDate.getFullYear() === focusedYear;\n const nextMonthDisabled = maxDate != null && maxDate.getMonth() === focusedMonth && maxDate.getFullYear() === focusedYear;\n let minYear = selectedYear - 10;\n let maxYear = selectedYear + 10;\n if (minDate) {\n minYear = Math.max(minYear, minDate.getFullYear());\n }\n if (maxDate) {\n maxYear = Math.min(maxYear, maxDate.getFullYear());\n }\n return (h(Host, null, h(\"div\", { class: \"duet-date\" }, h(DatePickerInput, { value: formattedDate, onInput: this.handleInputChange, onBlur: this.handleBlur, onFocus: this.handleFocus, onClick: this.toggleOpen, name: this.name, disabled: this.disabled, role: this.role, identifier: this.identifier, localization: this.localization, buttonRef: element => (this.datePickerButton = element), inputRef: element => (this.datePickerInput = element) }), h(\"div\", { class: {\n \"duet-date__dialog\": true,\n \"is-left\": this.direction === \"left\",\n \"is-active\": this.open,\n }, role: \"dialog\", \"aria-modal\": \"true\", \"aria-hidden\": this.open ? \"false\" : \"true\", \"aria-labelledby\": this.dialogLabelId, onTouchMove: this.handleTouchMove, onTouchStart: this.handleTouchStart, onTouchEnd: this.handleTouchEnd }, h(\"div\", { class: \"duet-date__dialog-content\", onKeyDown: this.handleEscKey, ref: element => (this.dialogWrapperNode = element) }, h(\"div\", { class: \"duet-date__vhidden duet-date__instructions\", \"aria-live\": \"polite\" }, this.localization.keyboardInstruction), h(\"div\", { class: \"duet-date__mobile\", onFocusin: this.disableActiveFocus }, h(\"label\", { class: \"duet-date__mobile-heading\" }, this.localization.calendarHeading), h(\"button\", { class: \"duet-date__close\", ref: element => (this.firstFocusableElement = element), onKeyDown: this.handleFirstFocusableKeydown, onClick: () => this.hide(), type: \"button\" }, h(\"svg\", { \"aria-hidden\": \"true\", fill: \"currentColor\", xmlns: \"http://www.w3.org/2000/svg\", width: \"16\", height: \"16\", viewBox: \"0 0 24 24\" }, h(\"path\", { d: \"M0 0h24v24H0V0z\", fill: \"none\" }), h(\"path\", { d: \"M18.3 5.71c-.39-.39-1.02-.39-1.41 0L12 10.59 7.11 5.7c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z\" })), h(\"span\", { class: \"duet-date__vhidden\" }, this.localization.closeLabel))), h(\"div\", { class: \"duet-date__header\", onFocusin: this.disableActiveFocus }, h(\"div\", null, h(\"h2\", { id: this.dialogLabelId, class: \"duet-date__vhidden\", \"aria-live\": \"polite\" }, this.localization.monthNames[focusedMonth], \" \", this.focusedDay.getFullYear()), h(\"label\", { htmlFor: this.monthSelectId, class: \"duet-date__vhidden\" }, this.localization.monthSelectLabel), h(\"div\", { class: \"duet-date__select\" }, h(\"select\", { id: this.monthSelectId, class: \"duet-date__select--month\", ref: element => (this.monthSelectNode = element), onChange: this.handleMonthSelect }, this.localization.monthNames.map((month, i) => (h(\"option\", { key: month, value: i, selected: i === focusedMonth }, month)))), h(\"div\", { class: \"duet-date__select-label\", \"aria-hidden\": \"true\" }, h(\"span\", null, this.localization.monthNamesShort[focusedMonth]), h(\"svg\", { fill: \"currentColor\", xmlns: \"http://www.w3.org/2000/svg\", width: \"16\", height: \"16\", viewBox: \"0 0 24 24\" }, h(\"path\", { d: \"M8.12 9.29L12 13.17l3.88-3.88c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41l-4.59 4.59c-.39.39-1.02.39-1.41 0L6.7 10.7c-.39-.39-.39-1.02 0-1.41.39-.38 1.03-.39 1.42 0z\" })))), h(\"label\", { htmlFor: this.yearSelectId, class: \"duet-date__vhidden\" }, this.localization.yearSelectLabel), h(\"div\", { class: \"duet-date__select\" }, h(\"select\", { id: this.yearSelectId, class: \"duet-date__select--year\", onChange: this.handleYearSelect }, range(minYear, maxYear).map(year => (h(\"option\", { key: year, selected: year === focusedYear }, year)))), h(\"div\", { class: \"duet-date__select-label\", \"aria-hidden\": \"true\" }, h(\"span\", null, this.focusedDay.getFullYear()), h(\"svg\", { fill: \"currentColor\", xmlns: \"http://www.w3.org/2000/svg\", width: \"16\", height: \"16\", viewBox: \"0 0 24 24\" }, h(\"path\", { d: \"M8.12 9.29L12 13.17l3.88-3.88c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41l-4.59 4.59c-.39.39-1.02.39-1.41 0L6.7 10.7c-.39-.39-.39-1.02 0-1.41.39-.38 1.03-.39 1.42 0z\" }))))), h(\"div\", { class: \"duet-date__nav\" }, h(\"button\", { class: \"duet-date__prev\", onClick: this.handlePreviousMonthClick, disabled: prevMonthDisabled, type: \"button\" }, h(\"svg\", { \"aria-hidden\": \"true\", fill: \"currentColor\", xmlns: \"http://www.w3.org/2000/svg\", width: \"21\", height: \"21\", viewBox: \"0 0 24 24\" }, h(\"path\", { d: \"M14.71 15.88L10.83 12l3.88-3.88c.39-.39.39-1.02 0-1.41-.39-.39-1.02-.39-1.41 0L8.71 11.3c-.39.39-.39 1.02 0 1.41l4.59 4.59c.39.39 1.02.39 1.41 0 .38-.39.39-1.03 0-1.42z\" })), h(\"span\", { class: \"duet-date__vhidden\" }, this.localization.prevMonthLabel)), h(\"button\", { class: \"duet-date__next\", onClick: this.handleNextMonthClick, disabled: nextMonthDisabled, type: \"button\" }, h(\"svg\", { \"aria-hidden\": \"true\", fill: \"currentColor\", xmlns: \"http://www.w3.org/2000/svg\", width: \"21\", height: \"21\", viewBox: \"0 0 24 24\" }, h(\"path\", { d: \"M9.29 15.88L13.17 12 9.29 8.12c-.39-.39-.39-1.02 0-1.41.39-.39 1.02-.39 1.41 0l4.59 4.59c.39.39.39 1.02 0 1.41L10.7 17.3c-.39.39-1.02.39-1.41 0-.38-.39-.39-1.03 0-1.42z\" })), h(\"span\", { class: \"duet-date__vhidden\" }, this.localization.nextMonthLabel)))), h(DatePickerMonth, { selectedDate: valueAsDate, focusedDate: this.focusedDay, onDateSelect: this.handleDaySelect, onKeyboardNavigation: this.handleKeyboardNavigation, labelledById: this.dialogLabelId, localization: this.localization, firstDayOfWeek: this.firstDayOfWeek, focusedDayRef: this.processFocusedDayNode, min: minDate, max: maxDate, dateFormatter: this.dateAdapter.format }))))));\n }", "title": "" }, { "docid": "ade5caa6215cf0a5362f6cfba944d780", "score": "0.6045385", "text": "function cal2_on_change(cal, object_code) {\n\tif (object_code == 'day') {\n\t\tcal_obj2.input_field.value = cal.get_formatted_date(format);\n\t\tcal.hide();\n\t\tcal_obj2 = null;\n\t}\n}", "title": "" }, { "docid": "4bdf83b2167e6175546459658319de59", "score": "0.6042097", "text": "function onTaskDateField() {\n\n\tvar picker = Ti.UI.createPicker({\n\t\ttop : 5, // Create Picker object.\n\t\ttype : Ti.UI.PICKER_TYPE_DATE,\n\t\tuseSpinner : true,\n\t\tminDate : new Date(2000, 0, 1),\n\t\tmaxDate : new Date(2025, 11, 31),\n\t\tvalue : new Date(),\n\t});\n\n\tvar set = Ti.UI.createButton({// Button to Select date.\n\t\ttitle : 'Select',\n\t\ttop : 10,\n\t});\n\n\tset.addEventListener('click', function(e) {// Set the value of text field with choosen date and hide the picker view.\n\t\t$.taskDateField.setValue('' + picker.value.toString().substring(4, 15));\n\t\t$.pickerView.setVisible(false);\n\t});\n\n\t$.pickerView.add(picker);\n\t// Add Picker to view.\n\t$.pickerView.add(set);\n\t// Add select button to view.\n\t$.pickerView.setVisible(true);\n\t// Make the view visible.\n}", "title": "" }, { "docid": "9cb17880444ab01ec713d544caa2e8eb", "score": "0.6027666", "text": "function dateSelected(cal) \n{\n var p = cal.params;\n var update = (cal.dateClicked || p.electric);\n if (update && p.inputField) {\n p.inputField.value = cal.date.print(p.ifFormat);\n if (typeof p.inputField.onchange == \"function\")\n p.inputField.onchange();\n }\n if (update && p.displayArea)\n p.displayArea.innerHTML = cal.date.print(p.daFormat);\n if (update && typeof p.onUpdate == \"function\")\n p.onUpdate(cal);\n if (update && p.flat) {\n if (typeof p.flatCallback == \"function\")\n p.flatCallback(cal);\n }\n}", "title": "" }, { "docid": "90daa80b04e7442e4662d94232cc7237", "score": "0.60268986", "text": "isDropDownDisplayEnabledOnInput(dropdownvalue) {\n return dropdownvalue === DATEPICKER_DROPDOWN_OPTIONS.DEFAULT;\n }", "title": "" }, { "docid": "93c4a025d9d98196a7e8b19cbebe26f0", "score": "0.6016838", "text": "function calendar_select(day){\n\tdatep = document.getElementById('datep');\n\thelped_el = document.getElementById(datep.helped_field);\n\td.setDate(day);\n\thelped_el.value = to_yyyy_mm_dd(d);\n\thide_helper('datep','');\n\tdocument.forms[0].submit();\n}", "title": "" }, { "docid": "a23c12f567ad035d16ead6774732e271", "score": "0.6012178", "text": "function selected(cal, date) {\r\n cal.sel.value = date; // just update the date in the input field.\r\n closeHandler(calendar);\r\n}", "title": "" }, { "docid": "2c7254c56d30a356508100b0590b5fa6", "score": "0.60040474", "text": "function DatePicker( picker, settings ) {\n\n var calendar = this,\n elementValue = picker.$node[ 0 ].value,\n elementDataValue = picker.$node.data( 'value' ),\n valueString = elementDataValue || elementValue,\n formatString = elementDataValue ? settings.formatSubmit : settings.format\n\n calendar.settings = settings\n\n // The queue of methods that will be used to build item objects.\n calendar.queue = {\n min: 'measure create',\n max: 'measure create',\n now: 'now create',\n select: 'parse create validate',\n highlight: 'navigate create validate',\n view: 'create validate viewset',\n disable: 'flipItem',\n enable: 'flipItem'\n }\n\n // The component's item object.\n calendar.item = {}\n\n calendar.item.disable = ( settings.disable || [] ).slice( 0 )\n calendar.item.enable = -(function( collectionDisabled ) {\n return collectionDisabled[ 0 ] === true ? collectionDisabled.shift() : -1\n })( calendar.item.disable )\n\n calendar.\n set( 'min', settings.min ).\n set( 'max', settings.max ).\n set( 'now' ).\n\n // Setting the `select` also sets the `highlight` and `view`.\n set( 'select',\n\n // Use the value provided or default to selecting “today”.\n valueString || calendar.item.now,\n {\n // Use the appropriate format.\n format: formatString,\n\n // Set user-provided month data as true when there is a\n // “mm” or “m” used in the relative format string.\n data: (function( formatArray ) {\n return valueString && ( formatArray.indexOf( 'mm' ) > -1 || formatArray.indexOf( 'm' ) > -1 )\n })( calendar.formats.toArray( formatString ) )\n }\n )\n\n\n // The keycode to movement mapping.\n calendar.key = {\n 40: 7, // Down\n 38: -7, // Up\n 39: 1, // Right\n 37: -1, // Left\n go: function( timeChange ) {\n calendar.set( 'highlight', [ calendar.item.highlight.year, calendar.item.highlight.month, calendar.item.highlight.date + timeChange ], { interval: timeChange } )\n this.render()\n }\n }\n\n\n // Bind some picker events.\n picker.\n on( 'render', function() {\n picker.$root.find( '.' + settings.klass.selectMonth ).on( 'change', function() {\n picker.set( 'highlight', [ picker.get( 'view' ).year, this.value, picker.get( 'highlight' ).date ] )\n picker.$root.find( '.' + settings.klass.selectMonth ).focus()\n })\n picker.$root.find( '.' + settings.klass.selectYear ).on( 'change', function() {\n picker.set( 'highlight', [ this.value, picker.get( 'view' ).month, picker.get( 'highlight' ).date ] )\n picker.$root.find( '.' + settings.klass.selectYear ).focus()\n })\n }).\n on( 'open', function() {\n picker.$root.find( 'button, select' ).attr( 'disabled', false )\n }).\n on( 'close', function() {\n picker.$root.find( 'button, select' ).attr( 'disabled', true )\n })\n\n}", "title": "" }, { "docid": "8711212769c4471a11ba96675cfb1be9", "score": "0.59965646", "text": "function Datetimecombo(datetime,field,timeformat,tabindex,showCheckbox,checked,allowEmptyHM){this.datetime=datetime;this.allowEmptyHM=allowEmptyHM;if(typeof this.datetime==\"undefined\"||datetime==''||trim(datetime).length<10){this.datetime='';var d=new Date();var month=d.getMonth();var date=d.getDate();var year=d.getYear();var hours=d.getHours();var minutes=d.getMinutes();}\nthis.fieldname=field;if(datetime!=''){parts=datetime.split(' ');this.hrs=parseInt(parts[1].substring(0,2),10);this.mins=parseInt(parts[1].substring(3,5),10);}\nthis.timeformat=timeformat;this.tabindex=tabindex==null||isNaN(tabindex)?1:tabindex;this.timeseparator=this.timeformat.substring(2,3);this.has12Hours=/^11/.test(this.timeformat);this.hasMeridiem=/am|pm/i.test(this.timeformat);if(this.hasMeridiem){this.pm=/pm/.test(this.timeformat);}\nthis.meridiem=this.hasMeridiem?trim(this.datetime.substring(16)):'';this.datetime=this.datetime.substr(0,10);this.showCheckbox=showCheckbox;this.checked=parseInt(checked);YAHOO.util.Selector.query('input#'+this.fieldname+'_date')[0].value=this.datetime;if(this.mins>0&&this.mins<15){this.mins=15;}else if(this.mins>15&&this.mins<30){this.mins=30;}else if(this.mins>30&&this.mins<45){this.mins=45;}else if(this.mins>45){this.hrs+=1;this.mins=0;if(this.hasMeridiem&&this.hrs==12){if(this.meridiem==\"pm\"||this.meridiem==\"am\"){if(this.meridiem==\"pm\"){this.meridiem=\"am\";}else{this.meridiem=\"pm\";}}else{if(this.meridiem==\"PM\"){this.meridiem=\"AM\";}else{this.meridiem=\"PM\";}}}\nif(this.hasMeridiem&&this.hrs>12){this.hrs=this.hrs-12;}}}", "title": "" }, { "docid": "a19bd799f077f78b176f2e060fe86996", "score": "0.5995586", "text": "function setDateControl(dc,dt) {\n s = dateControlString(dt)\n dc.value = s;\n return s\n}", "title": "" }, { "docid": "61a6fa0c95c1406ee9695feb4fe94733", "score": "0.59905094", "text": "function ValidateDateSelection(cboDay, cboMonth, cboYear) {\n if (cboDay.selectedIndex == 0) {\n alert(\"Select the Day\");\n cboDay.focus();\n return (false);\n }\n else if (cboMonth.selectedIndex == 0) {\n alert(\"Select the Month\");\n cboMonth.focus();\n return (false);\n }\n else if (cboYear.selectedIndex == 0) {\n alert(\"Select the Year\");\n cboYear.focus();\n return (false);\n }\n else if (isDate(cboMonth.value + \"/\" + cboDay.value + \"/\" + cboYear.value) == false) {\n cboDay.focus();\n return (false);\n }\n}", "title": "" }, { "docid": "6c972a8fb373fc218e1c754e66f54810", "score": "0.5981666", "text": "function setToDate(thisVariable){\n\t\n\t\n\tvar selectedDisplayBy=$('select[name=\"DisplayBy\"]').find(\":selected\").index();\n\n\t\tvar result = new Date($(\"#dateFrom\").val());\n\n if(selectedDisplayBy==0)\n\t{\n\t\n\t result.setDate(result.getDate() + 6);\n\t \n\t\n\t}\n else if(selectedDisplayBy==1)\n\t\t{\n\t result.setDate(result.getDate() + 27);\n\t \n\t\t}\n else{\n\t result.setDate(result.getDate() + 89);\n\t \n\t\t\n\t}\t\n if(result.getDate()<10&&result.getMonth()<10)\n $(\"#dateTo\").val(\"0\"+result.getDate()+\"-\"+\"0\"+(result.getMonth()+1)+\"-\"+(result.getYear()+1900));\n else if(result.getDate()<10)\n\t $(\"#dateTo\").val(\"0\"+result.getDate()+\"-\"+(result.getMonth()+1)+\"-\"+(result.getYear()+1900));\n else if(result.getMonth()<10)\n\t $(\"#dateTo\").val(result.getDate()+\"-\"+\"0\"+(result.getMonth()+1)+\"-\"+(result.getYear()+1900));\n else\n\t $(\"#dateTo\").val(result.getDate()+\"-\"+(result.getMonth()+1)+\"-\"+(result.getYear()+1900));\n\n}", "title": "" }, { "docid": "9654ce764a121d8ab5b0eae6530da1ec", "score": "0.59647995", "text": "function updateDate(){\n date.placeholder = \"\";\n date.value = year.value + \"-\" + month.value + \"-\" + day.value;\n dateString.value = month.value + \"-\" + day.value + \"-\" + year.value;\n //console.log(date.value);\n}", "title": "" }, { "docid": "2965aea3dd6e90ef8bc8821a087826bb", "score": "0.59612876", "text": "function DatePicker(picker, settings) {\n\n var calendar = this,\n element = picker.$node[0],\n elementValue = element.value,\n elementDataValue = picker.$node.data('value'),\n valueString = elementDataValue || elementValue,\n formatString = elementDataValue ? settings.formatSubmit : settings.format,\n isRTL = function () {\n\n return element.currentStyle ?\n\n // For IE.\n element.currentStyle.direction == 'rtl' :\n\n // For normal browsers.\n getComputedStyle(picker.$root[0]).direction == 'rtl'\n }\n\n calendar.settings = settings\n calendar.$node = picker.$node\n\n // The queue of methods that will be used to build item objects.\n calendar.queue = {\n min: 'measure create',\n max: 'measure create',\n now: 'now create',\n select: 'parse create validate',\n highlight: 'parse navigate create validate',\n view: 'parse create validate viewset',\n disable: 'deactivate',\n enable: 'activate'\n }\n\n // The component's item object.\n calendar.item = {}\n\n calendar.item.clear = null\n calendar.item.disable = (settings.disable || []).slice(0)\n calendar.item.enable = -(function (collectionDisabled) {\n return collectionDisabled[0] === true ? collectionDisabled.shift() : -1\n })(calendar.item.disable)\n\n calendar.\n set('min', settings.min).\n set('max', settings.max).\n set('now')\n\n // When there’s a value, set the `select`, which in turn\n // also sets the `highlight` and `view`.\n if (valueString) {\n calendar.set('select', valueString, {\n format: formatString,\n defaultValue: true\n })\n }\n\n // If there’s no value, default to highlighting “today”.\n else {\n calendar.\n set('select', null).\n set('highlight', calendar.item.now)\n }\n\n\n // The keycode to movement mapping.\n calendar.key = {\n 40: 7, // Down\n 38: -7, // Up\n 39: function () {\n return isRTL() ? -1 : 1\n }, // Right\n 37: function () {\n return isRTL() ? 1 : -1\n }, // Left\n go: function (timeChange) {\n var highlightedObject = calendar.item.highlight,\n targetDate = new Date(highlightedObject.year, highlightedObject.month, highlightedObject.date + timeChange)\n calendar.set(\n 'highlight',\n targetDate, {\n interval: timeChange\n }\n )\n this.render()\n }\n }\n\n\n // Bind some picker events.\n picker.\n on('render', function () {\n picker.$root.find('.' + settings.klass.selectMonth).on('change', function () {\n var value = this.value\n if (value) {\n picker.set('highlight', [picker.get('view').year, value, picker.get('highlight').date])\n picker.$root.find('.' + settings.klass.selectMonth).trigger('focus')\n }\n })\n picker.$root.find('.' + settings.klass.selectYear).on('change', function () {\n var value = this.value\n if (value) {\n picker.set('highlight', [value, picker.get('view').month, picker.get('highlight').date])\n picker.$root.find('.' + settings.klass.selectYear).trigger('focus')\n }\n })\n }, 1).\n on('open', function () {\n var includeToday = ''\n if (calendar.disabled(calendar.get('now'))) {\n includeToday = ':not(.' + settings.klass.buttonToday + ')'\n }\n picker.$root.find('button' + includeToday + ', select').attr('disabled', false)\n }, 1).\n on('close', function () {\n picker.$root.find('button, select').attr('disabled', true)\n }, 1)\n\n }", "title": "" }, { "docid": "46224353599442195bcba029522d95dd", "score": "0.59244204", "text": "function setDateValue(d, el) {\n if (bCalendarFade) {\n setTimeout(\"fadeOut(95)\", iCalendarFadeSpd);\n } else {\n getID(\"EZcalendar\").style.display = \"none\";\n }\n getID(target).value = d;\n}", "title": "" }, { "docid": "f508fef5fe25caef1be301349877fb00", "score": "0.59149945", "text": "function setFechasMesesYDias() {\n var _fechaInicio = document.getElementById(\"datepicker1\");\n var _fechaFin = document.getElementById(\"datepicker2\");\n var diasASumar = parseInt(document.getElementById(\"textoDuracion\").value);\n var select1 = document.getElementById(\"comboDuracion\");\n\n var fechaInicio = new Date(_fechaInicio.value);\n var fechaFin = new Date();\n var hoy = new Date();\n\n //Validacion de fecha inicio \"mayor\" o \"igual\" a HOY.\n if (fechaInicio < hoy) {\n _fechaInicio.value = hoy.toLocaleDateString('en-US');\n }\n\n //Validar que exista una duracion para poder empezar a validar\n if (diasASumar > 0) {\n if (select1.value == \"Meses\") {\n diasASumar = diasASumar * 30;\n\n fechaFin.setDate(fechaInicio.getDate() + diasASumar);\n\n _fechaFin.value = fechaFin.toLocaleDateString('en-US');\n }\n else if (select1.value == \"Dias\") {\n fechaFin.setDate(fechaInicio.getDate() + diasASumar);\n\n _fechaFin.value = fechaFin.toLocaleDateString('en-US');\n }\n }\n //Validaciones en caso de que la modalidad sea Custom\n else if (select1.value == \"Custom\") {\n var fechaAux = new Date(_fechaFin.value);\n\n //Validacion de fecha de inicio sea \"menor\" a la fecha de fin.\n if (fechaInicio > fechaAux) {\n _fechaFin.value = _fechaInicio.value;\n }\n\n //Validacion de fecha de fin \"mayor\" a la fecha de inicio.\n if (fechaFin < fechaAux) {\n _fechaFin.value = _fechaInicio.value;\n }\n }\n else {\n _fechaInicio.value = hoy.toLocaleDateString('en-US');\n }\n}", "title": "" }, { "docid": "e21e6e82e16c9c34b6772158fce4ae3b", "score": "0.59148705", "text": "onChange(p, v, d) {\n if (!util.isEmpty(startDay) && !util.isEmpty(d)) {\n dayNum = util.dateDifference(startDay, d)\n console.error(\"相差:\" + dayNum)\n if (dayNum <= 0) {\n $wuxToast.show({\n type: 'text',\n timer: 2000,\n color: '#fff',\n text: '退房日期不能小于等于入住日期',\n success: () => console.log('文本提示')\n })\n } else {\n\n this.setData({\n day: dayNum,\n\n })\n }\n }\n this.setData({\n end: d.join(', ')\n })\n endDay = d.join(', ')\n }", "title": "" }, { "docid": "b31c529b54c54503cd1bb2a0646224fb", "score": "0.59133035", "text": "function DatePicker(picker, settings) {\n\n var calendar = this,\n element = picker.$node[0],\n elementValue = element.value,\n elementDataValue = picker.$node.data('value'),\n valueString = elementDataValue || elementValue,\n formatString = elementDataValue ? settings.formatSubmit : settings.format,\n isRTL = function () {\n\n return element.currentStyle ?\n\n // For IE.\n element.currentStyle.direction == 'rtl' :\n\n // For normal browsers.\n getComputedStyle(picker.$root[0]).direction == 'rtl';\n };\n\n calendar.settings = settings;\n calendar.$node = picker.$node;\n\n // The queue of methods that will be used to build item objects.\n calendar.queue = {\n min: 'measure create',\n max: 'measure create',\n now: 'now create',\n select: 'parse create validate',\n highlight: 'parse navigate create validate',\n view: 'parse create validate viewset',\n disable: 'deactivate',\n enable: 'activate'\n\n // The component's item object.\n };calendar.item = {};\n\n calendar.item.clear = null;\n calendar.item.disable = (settings.disable || []).slice(0);\n calendar.item.enable = -function (collectionDisabled) {\n return collectionDisabled[0] === true ? collectionDisabled.shift() : -1;\n }(calendar.item.disable);\n\n calendar.set('min', settings.min).set('max', settings.max).set('now');\n\n // When there’s a value, set the `select`, which in turn\n // also sets the `highlight` and `view`.\n if (valueString) {\n calendar.set('select', valueString, { format: formatString });\n }\n\n // If there’s no value, default to highlighting “today”.\n else {\n calendar.set('select', null).set('highlight', calendar.item.now);\n }\n\n // The keycode to movement mapping.\n calendar.key = {\n 40: 7, // Down\n 38: -7, // Up\n 39: function () {\n return isRTL() ? -1 : 1;\n }, // Right\n 37: function () {\n return isRTL() ? 1 : -1;\n }, // Left\n go: function (timeChange) {\n var highlightedObject = calendar.item.highlight,\n targetDate = new Date(highlightedObject.year, highlightedObject.month, highlightedObject.date + timeChange);\n calendar.set('highlight', targetDate, { interval: timeChange });\n this.render();\n }\n\n // Bind some picker events.\n };picker.on('render', function () {\n picker.$root.find('.' + settings.klass.selectMonth).on('change', function () {\n var value = this.value;\n if (value) {\n picker.set('highlight', [picker.get('view').year, value, picker.get('highlight').date]);\n picker.$root.find('.' + settings.klass.selectMonth).trigger('focus');\n }\n });\n picker.$root.find('.' + settings.klass.selectYear).on('change', function () {\n var value = this.value;\n if (value) {\n picker.set('highlight', [value, picker.get('view').month, picker.get('highlight').date]);\n picker.$root.find('.' + settings.klass.selectYear).trigger('focus');\n }\n });\n }, 1).on('open', function () {\n var includeToday = '';\n if (calendar.disabled(calendar.get('now'))) {\n includeToday = ':not(.' + settings.klass.buttonToday + ')';\n }\n picker.$root.find('button' + includeToday + ', select').attr('disabled', false);\n }, 1).on('close', function () {\n picker.$root.find('button, select').attr('disabled', true);\n }, 1);\n }", "title": "" }, { "docid": "61f9f835e96dcc5adcecde6b9234b82f", "score": "0.59110314", "text": "function setting_datepicket(sl, di, df) {\n let fc = moment(Date()).format('DD/MM/YYYY');\n $(sl).daterangepicker(\n {\n singleDatePicker: false,\n autoApply: true,\n locale: {\n format: 'DD/MM/YYYY',\n daysOfWeek: ['Dom', 'Lun', 'Mar', 'Mie', 'Jue', 'Vie', 'Sab'],\n monthNames: ['Enero','Febrero','Marzo','Abril','Mayo', 'Junio',\n 'Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'],\n firstDay: 1,\n },\n minDate: fc,\n startDate: moment(di, 'DD/MM/YYYY'),\n endDate: moment(df, 'DD/MM/YYYY'),\n opens: 'left',\n drops: 'auto',\n },\n function (start, end, label) {\n let sdin = start.format('DD/MM/YYYY');\n let sdfn = end.format('DD/MM/YYYY');\n $('#txtPeriod').html(sdin + ' - ' + sdfn);\n setTimeout(() => {\n validator();\n }, 500);\n }\n );\n}", "title": "" }, { "docid": "8018ea5688bcc7c60f77606b4f6d096d", "score": "0.5906561", "text": "function dateChanged(){\n\tresetAPI();\n\temptyDisplay();\t\n\t\n\t$('#appDropDown').val('0');\t\n\t\n\tsetSelectedVariables();\n}", "title": "" }, { "docid": "f4e6a74cf9dfd32518cd4aa225e710ca", "score": "0.5893179", "text": "function onSelect(date) {\r\n\t\tvar d = new Date(date);\r\n\t\t$(selectDayNode).val(d.getDate());\r\n\t\t$(selectMonthNode).val(d.getMonth()+1);\r\n\t\t$(selectYearNode).val(d.getFullYear());\r\n\t}", "title": "" }, { "docid": "104dd40ad8ffd05c2d2eb3e131425941", "score": "0.5890025", "text": "function Datepicker() { }", "title": "" }, { "docid": "d8a42c1dda41178cdacc6d513d15a3ed", "score": "0.58880246", "text": "function date_picker() {\n\tvar picker = Dialogs.createDatePicker({\n\t\tvalue : new Date(),\n\t\tokButtonTitle : \"Done\",\n\t\tcancelButtonTitle : ' '\n\t});\n\tpicker.addEventListener('click', function(e) {\n\t\tif (!e.cancel) {\n\t\t\tdate = e.value;\n\t\t\tsetDateField();\n\t\t\tvalidateDate();\n\t\t\tmakeSendButtonVisible();\n\t\t}\n\t});\n\t// Cancel listener\n\tpicker.addEventListener('cancel', function() {\n\t});\n\tpicker.show();\n}", "title": "" }, { "docid": "fe899b318d6b93532ea4336951d60a08", "score": "0.58774036", "text": "function DatePicker(picker, settings) {\n\n var calendar = this,\n element = picker.$node[0],\n elementValue = element.value,\n elementDataValue = picker.$node.data('value'),\n valueString = elementDataValue || elementValue,\n formatString = elementDataValue ? settings.formatSubmit : settings.format,\n isRTL = function isRTL() {\n\n return element.currentStyle ?\n\n // For IE.\n element.currentStyle.direction == 'rtl' :\n\n // For normal browsers.\n getComputedStyle(picker.$root[0]).direction == 'rtl';\n };\n\n calendar.settings = settings;\n calendar.$node = picker.$node;\n\n // The queue of methods that will be used to build item objects.\n calendar.queue = {\n min: 'measure create',\n max: 'measure create',\n now: 'now create',\n select: 'parse create validate',\n highlight: 'parse navigate create validate',\n view: 'parse create validate viewset',\n disable: 'deactivate',\n enable: 'activate'\n };\n\n // The component's item object.\n calendar.item = {};\n\n calendar.item.clear = null;\n calendar.item.disable = (settings.disable || []).slice(0);\n calendar.item.enable = -function (collectionDisabled) {\n return collectionDisabled[0] === true ? collectionDisabled.shift() : -1;\n }(calendar.item.disable);\n\n calendar.set('min', settings.min).set('max', settings.max).set('now');\n\n // When there’s a value, set the `select`, which in turn\n // also sets the `highlight` and `view`.\n if (valueString) {\n calendar.set('select', valueString, { format: formatString });\n }\n\n // If there’s no value, default to highlighting “today”.\n else {\n calendar.set('select', null).set('highlight', calendar.item.now);\n }\n\n // The keycode to movement mapping.\n calendar.key = {\n 40: 7, // Down\n 38: -7, // Up\n 39: function _() {\n return isRTL() ? -1 : 1;\n }, // Right\n 37: function _() {\n return isRTL() ? 1 : -1;\n }, // Left\n go: function go(timeChange) {\n var highlightedObject = calendar.item.highlight,\n targetDate = new Date(highlightedObject.year, highlightedObject.month, highlightedObject.date + timeChange);\n calendar.set('highlight', targetDate, { interval: timeChange });\n this.render();\n }\n };\n\n // Bind some picker events.\n picker.on('render', function () {\n picker.$root.find('.' + settings.klass.selectMonth).on('change', function () {\n var value = this.value;\n if (value) {\n picker.set('highlight', [picker.get('view').year, value, picker.get('highlight').date]);\n picker.$root.find('.' + settings.klass.selectMonth).trigger('focus');\n }\n });\n picker.$root.find('.' + settings.klass.selectYear).on('change', function () {\n var value = this.value;\n if (value) {\n picker.set('highlight', [value, picker.get('view').month, picker.get('highlight').date]);\n picker.$root.find('.' + settings.klass.selectYear).trigger('focus');\n }\n });\n }, 1).on('open', function () {\n var includeToday = '';\n if (calendar.disabled(calendar.get('now'))) {\n includeToday = ':not(.' + settings.klass.buttonToday + ')';\n }\n picker.$root.find('button' + includeToday + ', select').attr('disabled', false);\n }, 1).on('close', function () {\n picker.$root.find('button, select').attr('disabled', true);\n }, 1);\n }", "title": "" }, { "docid": "66afe113d755242ffa505b1c9421af8d", "score": "0.58740056", "text": "function fnGetDateAndpopDD(e){\n\tconsole.log(typeof(this.value));\n\tmyBookingObj.date=this.value;\n\tfnfillMoviesDD();\n\t\n}", "title": "" }, { "docid": "5d5efc9bbec94e40aa2618b1b81e6240", "score": "0.58640665", "text": "function doEnter(target){\r\n\t\tvar state = $.data(target, 'datebox');\r\n\t\tvar opts = state.options;\r\n\t\tvar current = state.calendar.calendar('options').current;\r\n\t\tif (current){\r\n\t\t\tsetValue(target, opts.formatter.call(target, current));\r\n\t\t\t$(target).combo('hidePanel');\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "f9878ec9141c0486f36fde1ff0d41acb", "score": "0.58571076", "text": "fixDateFields() {\n let fields = this.m_dialog.find('input[type=date]');\n // if there are no date fields, or if date fields are supported, just return\n if ((fields.length <= 0) || (fields[0].type === 'date'))\n return;\n fields.each((n, el) => {\n let input = el;\n let id = input.id || \"date-\" + n;\n let date = Date.parseFb($(input).val().toString());\n if (input.type == 'hidden')\n return;\n input.type = 'hidden';\n let monthSelect = $('<select data-theme=\"a\" data-inline=\"true\" data-icon=\"false\">', { id: id + '-month' });\n monthSelect.append(Date.MONTHS.map((name, index) => {\n return $('<option>', { value: index + 1, selected: (index == date.getUTCMonth()) }).text(name);\n }));\n let daySelect = $('<select data-theme=\"a\" data-inline=\"true\" data-icon=\"false\">', { id: id + '-day' });\n for (let n = 1; n <= date.daysInMonth(); n++) {\n daySelect.append($('<option>', { value: n, selected: n == date.getUTCDate() }).text(n));\n }\n let yearSelect = $('<select data-theme=\"a\" data-inline=\"true\" data-icon=\"false\">', { id: id + '-year' });\n for (let n = 2016; n <= 2100; n++) {\n yearSelect.append($('<option>', { value: n, selected: n == date.getUTCFullYear() }).text(n));\n }\n function monthVal() {\n let val = parseInt(monthSelect.val());\n if (val >= 10)\n return val.toString();\n return '0' + val.toString();\n }\n function dayVal() {\n let val = parseInt(daySelect.val());\n if (val >= 10)\n return val.toString();\n return '0' + val.toString();\n }\n function yearVal() {\n let val = parseInt(yearSelect.val());\n if (val >= 1000)\n return val.toString();\n if (val >= 100)\n return '0' + val.toString();\n if (val >= 10)\n return '00' + val.toString();\n return '000' + val.toString();\n }\n function updateValues() {\n var dateString = yearVal() + '-' + monthVal() + '-' + dayVal();\n console.log(dateString);\n $(input).val(Date.parseFb(dateString).toFbString());\n }\n function updateDays() {\n var dateString = yearVal() + '-' + monthVal() + '-' + dayVal();\n var newDate = Date.parseFb(dateString);\n if (newDate.getUTCMonth() != (monthSelect.val() + 1)) {\n daySelect.empty();\n for (let n = 1; n <= newDate.daysInMonth(); n++) {\n daySelect.append($('<option>', { value: n, selected: n == date.getUTCDate() }).text(n));\n }\n }\n }\n yearSelect.on('change', updateValues);\n monthSelect.on('change', () => {\n updateDays();\n updateValues();\n });\n daySelect.on('change', updateValues);\n $('<div style=\"min-height: 44px; width: 100%; position: relative\"></div>').append($('<div class=\"ui-btn-left\" data-role=\"controlgroup\" data-theme=\"a\" data-type=\"horizontal\" data-mini=\"true\"></div>').append(monthSelect, daySelect, yearSelect)).insertAfter(input);\n // monthSelect.insertAfter(input);\n // daySelect.insertAfter(monthSelect);\n // yearSelect.insertAfter(daySelect);\n });\n }", "title": "" }, { "docid": "99729599263d6aadfa357435b12babc2", "score": "0.58460814", "text": "onChange(p, v, d) {\n console.error(\"start:\" + d)\n console.error(\"endDay:\" + endDay)\n if (!util.isEmpty(endDay) && !util.isEmpty(d)) {\n dayNum = util.dateDifference(d, endDay)\n console.error(\"相差:\" + dayNum)\n if (dayNum <= 0) {\n $wuxToast.show({\n type: 'text',\n timer: 2000,\n color: '#fff',\n text: '退房日期不能小于等于入住日期',\n success: () => console.log('文本提示')\n })\n } else {\n\n this.setData({\n day: dayNum,\n })\n }\n }\n\n this.setData({\n start: d.join(', ')\n })\n startDay = d.join(', ')\n }", "title": "" }, { "docid": "a05d13776b2307941b8bec1fd0d601c7", "score": "0.583911", "text": "function input_show_select_calendar(class_selector, contain) {\n switch(localStorage.getItem('format_date')){\n case \"d M, Y\":\n date_format = \"d M, yy\";\n break;\n case \"d-m-Y\":\n date_format = \"dd-mm-yy\";\n break;\n case \"d/m/Y\":\n date_format = \"dd/mm/yy\";\n break;\n default:\n date_format = \"d M, yy\";\n break;\n }\n if (contain != undefined) {\n $(class_selector, contain).each(function() {\n var date_default = $(this).val();\n\n if ($.trim(date_default).length == 10 || $.trim(date_default).length == 0) {\n // $( this ).datepicker();\n $(this).datepicker({\n changeMonth: true,\n changeYear: true,\n yearRange: \"c-70:c+3\"\n });\n if ($.trim(date_default) != \"\") {\n $(this).datepicker(\"setDate\", date_default);\n }\n $(this).datepicker(\"option\", \"showAnim\", \"slideDown\");\n $(this).datepicker(\"option\", \"dateFormat\", date_format);\n }\n\n });\n } else {\n $(class_selector).each(function() {\n var date_default = $(this).val();\n if ($.trim(date_default).length == 10 || $.trim(date_default).length == 0) {\n // $( this ).datepicker();\n $(this).datepicker({\n changeMonth: true,\n changeYear: true,\n yearRange: \"c-70:c+3\"\n });\n if ($.trim(date_default) != \"\") {\n $(this).datepicker(\"setDate\", date_default);\n }\n $(this).datepicker(\"option\", \"showAnim\", \"slideDown\");\n $(this).datepicker(\"option\", \"dateFormat\", date_format);\n\n }\n\n });\n }\n}", "title": "" }, { "docid": "44c92c91489f77dd35ed90ced3269ff7", "score": "0.5822004", "text": "function checkDdate(field, name)\r\n{\r\n fieldName=name\r\n\tif (isDate(field.value)==false)\r\n\t{\r\n\t\tif (field.type!=\"hidden\") {\r\n\t\tfield.focus()\r\n\t\t}\r\n\t\treturn false\r\n\t}\r\n\treturn true\r\n}", "title": "" }, { "docid": "df15eba8f243df3a460ddc808a3dbe44", "score": "0.58076626", "text": "setDatePickerField(attrName, attrValues, divClass, editField, index) {\n return (\n <FieldDate\n name={attrName}\n colName={divClass}\n fieldName = {attrName}\n onDateChange = {this.onDateChange}\n inputValue = {attrValues}\n editField={editField}\n index = {index}\n />\n )\n\n \n }", "title": "" }, { "docid": "ca92305436ca96e9a1c57ee77f3decce", "score": "0.57922417", "text": "function showval(fld) {\n\t var flds = \"\";\n\t for (var i = 0; i < fld.length; i++) {\n\t flds += fld[i];\n\t }\n\t $(\".FormOutput\").html(flds);\n\t $('.supto_datepicker').datepicker({\n\t inline: true,\n\t dateFormat: 'dd-mm-yy'\n\t });\n\t }", "title": "" }, { "docid": "c7d82fca79b6782d27caf909c36344de", "score": "0.5784788", "text": "function valDateFmt(datefmt) {\n\tmyOption = -1;\n\tfor (i=0; i<datefmt.length; i++) {if (datefmt[i].checked) {myOption = i;}}\n\tif (myOption == -1) {alert(\"You must select a date format\");return ' ';}\n\treturn datefmt[myOption].value;\n}", "title": "" }, { "docid": "0e9add963396c1cee152b2b7f2745ce7", "score": "0.57823324", "text": "function selectDate(dt){\n return dt.datetime == inputValue;\n }", "title": "" }, { "docid": "48e99c57f75d7f0f1c001fd5fc155f6e", "score": "0.578138", "text": "function onChangeDate(_value) \r\n{\r\n\tvar strReturn = \"\";\r\n\t\r\n\t//---\r\n\t// If field is empty, do not do anything\r\n\t//---\r\n\tif (_value == \"\") {\r\n\t\treturn \"\";\r\n\t}\r\n\t\r\n \tvar dtmDate = new Date();\r\n\t\r\n\t//----\r\n\t// Do the simple date parsing\r\n\t//----\r\n\t\r\n\t//----\r\n\t// If only a number has been entered, assume the days of current month / year\r\n\t//----\r\n\tif (!isNaN(_value) && _value <= 31 && _value >= 1) {\r\n\t\t//Ensure that there is no + or - in front.\r\n\t\tvar LeftDigit = _value.substr(0,1);\r\n\t\tif (LeftDigit == \"+\") {\r\n\t\t\tstrReturn = \"\";\r\n\t\t} else {\r\n\t\t\t// If days < todays day, assume next month\r\n\t\t\tif (dtmDate.getDate() > _value) {\r\n\t\t\t\tdtmDate.setMonth(dtmDate.getMonth() + 1);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdtmDate.setDate(_value);\r\n\t\t\t\r\n\t\t\tstrReturn = printDate(dtmDate);\r\n\t\t\t// strReturn = CheckDays(_value, strReturn);\r\n\t\t\treturn strReturn;\r\n\t\t}\r\n\t}\r\n\t\r\n\t//----\r\n\t// Feature: t / T is shortcut for today \r\n\t//----\r\n\tif (_value == \"t\" || _value == \"T\") {\r\n\t\tdtmDate = new Date();\r\n\t\t\r\n\t\tstrReturn = printDate(dtmDate);\r\n\t\treturn strReturn;\r\n\t}\r\n\t\r\n\t//----\r\n\t// Feature: + may be used to add number of days to today\r\n\t// eg : t+100\r\n\t//----\r\n\tif (_value.indexOf(\"+\") != -1) {\r\n\t\tvar arrDate = _value.split(\"+\"); \r\n\t\tif (arrDate.length == 2 \r\n\t\t\t&& (arrDate[0] == \"t\" || arrDate[0] == \"T\") \r\n\t\t\t&& (!isNaN(arrDate[1]))) {\r\n\t\t\tdtmDate = new Date();\r\n\t\t\t\r\n\t\t\tdtmDate.setDate(dtmDate.getDate() + parseInt(arrDate[1]));\r\n\t\t\t\r\n\t\t\tstrReturn = printDate(dtmDate);\r\n\t\t\treturn strReturn;\r\n\t\t}\r\n\t}\r\n\t\r\n\t//----\r\n\t// Feature: - may be used to subtract number of days from today\r\n\t// eg : t-100\r\n\t//----\r\n\tif (_value.indexOf(\"-\") != -1) {\r\n\t\tvar arrDate = _value.split(\"-\"); \r\n\t\tif (arrDate.length == 2 \r\n\t\t\t&& (arrDate[0] == \"t\" || arrDate[0] == \"T\") \r\n\t\t\t&& (!isNaN(arrDate[1]))) {\r\n\t\t\tdtmDate = new Date();\r\n\t\t\t\r\n\t\t\tdtmDate.setDate(dtmDate.getDate() - parseInt(arrDate[1]));\r\n\t\t\t\r\n\t\t\tstrReturn = printDate(dtmDate);\r\n\t\t\treturn strReturn;\r\n\t\t}\r\n\t}\r\n\t\r\n\t//Remove any spaces or slashes.\r\n\t_value = _value.replace(/\\s|\\//g, \"\");\r\n\t\r\n\t//----\r\n\t// Check if in numeric format, and if so convert month to alphabetic\r\n\t//----\r\n\tvar pattern = /^[0-9]{3,8}/i;\r\n\tif (pattern.test(_value)) {\r\n\t\t// For convenience: prefix 0 if only single digit day is being used\r\n\t\tif ( _value.length == 3 || _value.length == 5 || _value.length == 7 ) {\r\n\t\t\t_value = \"0\" + _value;\r\n\t\t}\r\n\t\t\r\n\t\t_value = _value.substr(0,2) + monthNumberToName(_value.substr(2,2)) + _value.substr(4);\r\n\t}\r\n\t\r\n\t//----\r\n\t// Check if only days and months are given (alphabetic month)\r\n\t//----\r\n\tpattern = /^[0-9]{1,2}[a-zA-Z]{3}/i;\r\n\tif (pattern.test(_value)) {\r\n\t\t// For convenience: prefix 0 if only single digit day is being used\r\n\t\tif (isNaN(_value.substr(0,2))) {\r\n\t\t\t_value = \"0\" + _value;\r\n\t\t}\r\n\t\tvar Days = _value.substr(0,2);\r\n\t\tvar Year;\r\n\t\t\t\t\r\n\t\t//Previously we set day and month into dtmDate at this point, but the problem was that until the\r\n\t\t//year is established, it will reject a leap year date. Therefore don't set dtmDate until we know the year.\r\n\t\tif (_value.length == 5) {\r\n\t\t\t//----\r\n\t\t\t//Year is not included\r\n\t\t\t// If month < todays month: assume next year\r\n\t\t\t//----\r\n\t\t\tvar today = new Date();\r\n\t\t\t\r\n\t\t\t//Don't want to set dtmDate yet but have to here to compare against today. However,\r\n\t\t\t//we don't put the resultant year into dtmDate but keep it in a variable for use later.\r\n\t\t\tdtmDate.setMonth(monthNameToNumber( _value.substr(2, 3)) -1);\r\n\t\t\tdtmDate.setDate(Days);\r\n\t\t\t\r\n\t\t\tif (dtmDate < today) {\r\n\t\t\t\tYear = dtmDate.getFullYear() + 1;\r\n\t\t\t} else {\r\n\t\t\t\tYear = dtmDate.getFullYear();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\t//----\r\n\t\t\t//Year is included\r\n\t\t\t//----\r\n\t\t\tYear = _value.substr(5);\r\n\t\t\tif (Year.length < 4) {\r\n\t\t\t\t//Support for spanning the century.\r\n\t\t\t\tif (Year < 70 || Year > 99) {\r\n\t\t\t\t\tYear = 2000 + (Year * 1);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tYear = 1900 + (Year * 1);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\t//----\r\n\t\t\t\t// If year is longer than 4 digits, truncate at 4\r\n\t\t\t\t//----\r\n\t\t\t\tif (Year.length > 4) {\r\n\t\t\t\t\tYear = Year.substr(0,4);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//----\r\n\t\t// Make sure that the year is a number\r\n\t\t//----\r\n\t\tif (isNaN(Year)) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t\t\r\n\t\t// Now set dtmDate using the year, month and day we have established. Doing it at this later\r\n\t\t// stage means it can handle leap year dates properly.\r\n\t\tdtmDate = new Date(Year, monthNameToNumber(_value.substr(2, 3)) -1, Days);\r\n\t\t\r\n\t\tstrReturn = printDate(dtmDate);\r\n\t\t// strReturn = CheckDays(Days, strReturn);\r\n\t}\r\n\t\r\n\treturn strReturn;\r\n}", "title": "" }, { "docid": "6d51913e96354d5e7957491684e69694", "score": "0.5778761", "text": "function getDatePicker() {\n return box;\n }", "title": "" }, { "docid": "a22f71cd2e26c207e682ec7c01446d46", "score": "0.5769326", "text": "function setDatePicker(dateElement) {\n var elementID = '#' + dateElement;\n $(elementID).daterangepicker({\n singleDatePicker: true,\n showDropdowns: true,\n locale: {\n format: 'MM/DD/YYYY'\n }\n });\n}", "title": "" }, { "docid": "7ab959969f85b1050f48c1d3cb51577a", "score": "0.5768651", "text": "function initDatePicker(dpClass){\n\tvar el = document.createElement('input');\n\tel.setAttribute('type','date');\n\t//if type is text then and only then should you call the fallback\n\tif(el.type === 'text'){\n\t\t$( dpClass ).datepicker({ dateFormat: \"dd/mm/yy\",firstDay: 1,maxDate: 0 });\n\t}\n\telse{\n\t\t$.each($( dpClass ), function(){\n\t\t\tvar date = $(this).attr('value').split('/');\n\t\t\t$(this).attr('value',date[2]+'-'+date[1]+'-'+date[0]);\n\t\t\t$(this).attr('max',$.datepicker.formatDate( \"yy-mm-dd\", new Date()));\n\t\t})\n\t}\n}", "title": "" }, { "docid": "56b846c0f97c77cd09eedf551cc6f337", "score": "0.5765325", "text": "dateInput({ filter, filterArr, parentIndex, childIndex }) {\n const child = filterArr[parentIndex][childIndex];\n const startDate = filterArr[parentIndex][childIndex].inputField = TimeOperation({ method: 'subtract', parameter: 'day', format: this.dateFormat, value: 1 });\n // filterArr[parentIndex][childIndex].inputField = moment().subtract(1, \"day\").format(this.dateFormat);\n const endDate = filterArr[parentIndex][childIndex].secondInputField = GetTime({ format: this.dateFormat });\n switch (filter) {\n case \" BETWEEN \":\n //\t<daterangepicker> is injected to the template with the format and selected value\n filterArr[parentIndex][childIndex].html = () => (<DatePicker format={this.dateFormat} timePicker={true} onChange={(data) => this.convertToInputField({ data, parentIndex, childIndex, dateRange: true, })} value={{ startDate, endDate }} />);\n // filterArr[parentIndex][childIndex].html = (<daterange-picker ng-model=\"b.slot\" format=\"{{configureFilter.dateFormat}}\" />);\n // filterArr[parentIndex][childIndex].html = \"<div class=\\\"col-lg-12 col-md-12 col-sm-12 col-xs-12 no-padding-left\\\"><daterange-picker ng-model=\\\"b.slot\\\" format=\\\"{{configureFilter.dateFormat}}\\\"></daterange-picker></div>\";\n break;\n\n case \" NOT BETWEEN \":\n filterArr[parentIndex][childIndex].html = () => <DatePicker format={this.dateFormat} timePicker={true} onChange={(data) => this.convertToInputField({ data, parentIndex, childIndex, dateRange: true })} value={{ startDate, endDate }} />;\n // filterArr[parentIndex][childIndex].html = \"<div class=\\\"col-lg-12 col-md-12 col-sm-12 col-xs-12 no-padding-left\\\"><daterange-picker ng-model=\\\"b.slot\\\" format=\\\"{{configureFilter.dateFormat}}\\\"></daterange-picker></div>\";\n break;\n\n case \" IS NULL \":\n filterArr[parentIndex][childIndex].inputField = null;\n break;\n\n case \" IS NOT NULL\":\n filterArr[parentIndex][childIndex].inputField = null;\n break;\n\n default:\n filterArr[parentIndex][childIndex].html = () => (<DatePicker single={true} format={this.dateFormat} timePicker={true} onChange={(data) => this.convertToInputField({ data, parentIndex, childIndex, attr: 'inputField' })} value={child.inputField} />);\n // filterArr[parentIndex][childIndex].html = \"<daterange-picker single = \\\"true\\\" ng-model=\\\"b.inputField\\\" format=\\\"{{configureFilter.dateFormat}}\\\"></daterange-picker>\";\n break;\n }\n return filterArr;\n }", "title": "" }, { "docid": "a8acf563089a38fccdebf0a80be8235b", "score": "0.5763973", "text": "function dtpD(){\n\t$( \"#dtpDebModif\" ).datepicker();\n\t$( \"#dtpDebModif\" ).datepicker('show');\n}", "title": "" }, { "docid": "b82497e5f2bf741b813409faadea94e5", "score": "0.5763397", "text": "function initDateTimePicker() {\n if ($(\"#datepicker\").val() == \"\") {\n $(\"#datepicker\").datepicker({ dateFormat: \"dd-mm-yy\", minDate: 0 }).datepicker(\"setDate\", new Date());\n } else {\n $(\"#datepicker\").datepicker({ dateFormat: \"dd-mm-yy\", minDate: 0 });\n } \n}", "title": "" }, { "docid": "217f4f199f1137d15508d32bd5021532", "score": "0.57526034", "text": "function pickerDate(){\r\n\r\n console.log('pickerDate called');\r\n var today = new Date();\r\n today.setDate(today.getDate() - 1);\r\n\r\n var actualYear = today.getFullYear();\r\n var actualMonth = today.getMonth();\r\n var actualDay = today.getDate();\r\n\r\n\r\n var $input = $('.datepicker').pickadate({\r\n monthsFull: ['Janvier', 'Fevrier', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Aout', 'Septembre', 'Octobre', 'Novembre', 'Decembre'],\r\n monthsShort: ['Jan', 'Fev', 'Mar', 'Avr', 'Mai', 'Juin', 'Juil', 'Aout', 'Sep', 'Oct', 'Nov', 'Dec'],\r\n disable: [\r\n { from: [1900,1,1], to: [actualYear, actualMonth, actualDay] }\r\n \r\n ]\r\n });\r\n pickerdate = $input.pickadate('picker');\r\n pickerdate.open();\r\n }", "title": "" }, { "docid": "9d01157aa6155390dbbeb09f8cd5f2a1", "score": "0.5749941", "text": "function setDatesDropDown(){\n\n /**\n * Clear the dates dropdown\n */\n reservationDateDropDown.empty();\n\n /**\n * Get dates by movie id\n */\n var dates = getDatesByMovieId(moviesDropDown.val());\n\n /**\n * Adding default option\n */\n reservationDateDropDown.append(\n $('<option></option>').val('none').html('Seleccione una fecha')\n );\n\n /**\n * adding options\n */\n for (let i = 0; i < dates.length; i++) {\n var element = dates[i];\n reservationDateDropDown.append(\n $('<option></option>').val(element).html(element)\n );\n }\n /**\n * if there is reservation and is the same movie selected, assging the date from the reservation \n */\n if(reservation != null){\n\n if(reservation.movies_id != moviesDropDown.val() ){\n reservationDateDropDown.val('none');\n \n }else{\n reservationDateDropDown.val(reservation.reservation_date);\n }\n reservationDateDropDown.trigger('change');\n }\n}", "title": "" }, { "docid": "e033a82cdb9f3e7560adcf358e4c4512", "score": "0.5746579", "text": "function displayDate(){\n\n\tvar op = $('#option').val(); \n\tif(op === '2'){\n\n\t\t$('#date').css(\"display\",\"none\");\n\t}\n\telse{\n\t\t$('#date').css(\"display\",\"initial\");\n\t}\n\t\n}", "title": "" }, { "docid": "95e0135cda28c2114e0ae1cb8807f53c", "score": "0.5743104", "text": "function choseDate() {\n var div = this.parentNode.parentNode.parentNode;\n input.value = this.innerHTML + \"/\" + (parseInt(month) + 1) + \"/\" + year;\n div.parentNode.removeChild(div);\n input.addEventListener(\"click\", show);\n }", "title": "" }, { "docid": "9074114147327d14fe6f57d9df4cc505", "score": "0.5736692", "text": "set viewDate(value) {\n if (Array.isArray(value)) {\n return;\n }\n const validDate = this.validateDate(value);\n if (this._viewDate) {\n this.selectedDatesWithoutFocus = validDate;\n }\n const date = this.getDateOnly(validDate).setDate(1);\n this._viewDate = new Date(date);\n }", "title": "" }, { "docid": "51e75cbe32f50c64d1b2b19f29bfc6cd", "score": "0.57259136", "text": "function OnDate_Change( e , type )\r\n{\r\n Alloy.Globals.ATC20ModeDetailedPosting[\"PREVIOUS_POSTING_DATE\"] = Date.parse( $.datePickerDate.getValue() ) ;\r\n}", "title": "" }, { "docid": "d02c51d933890a0c83adb7d364616f54", "score": "0.5724622", "text": "function fillDay(item2)\n{\n\tvar fldDay = document.getElementById(\"mday\");\n\n\tfor(i=1 ; i<=31 ; i++)\n\t\tfldDay.options[i] = new Option(i, i);\n\n fldDay.value = item2;\n}", "title": "" }, { "docid": "8827d3f8da80d231ac801e1a6754b022", "score": "0.5716797", "text": "function handleOnChange(obj) {\r\n if (obj.name == \"effDate\") {\r\n if (datemaskclear()) {\r\n getObject(\"expDate\").value = obj.value;\r\n } \r\n }\r\n}", "title": "" }, { "docid": "92e707b85ea50e96d5e1fdb35db8b4b5", "score": "0.5709097", "text": "function DatePicker(props) {\n var _this;\n\n _classCallCheck(this, DatePicker);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(DatePicker).call(this, props));\n\n _defineProperty(_assertThisInitialized(_this), \"calendar\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"containerRef\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"input\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"getState\", function () {\n return _objectSpread({}, _this.state, pick(_this.props, ['value', 'isOpen']), pick(_this.props.selectProps, ['inputValue']));\n });\n\n _defineProperty(_assertThisInitialized(_this), \"isDateDisabled\", function (date) {\n return _this.props.disabled.indexOf(date) > -1;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onCalendarChange\", function (_ref2) {\n var iso = _ref2.iso;\n\n var _iso$split = iso.split('-'),\n _iso$split2 = _slicedToArray(_iso$split, 3),\n year = _iso$split2[0],\n month = _iso$split2[1],\n date = _iso$split2[2];\n\n var newIso = iso;\n var lastDayInMonth = getDaysInMonth(new Date(parseInt(year, 10), parseInt(month, 10) - 1));\n\n if (parseInt(lastDayInMonth, 10) < parseInt(date, 10)) {\n newIso = \"\".concat(year, \"-\").concat(month, \"-\").concat(lastDayInMonth);\n }\n\n _this.setState({\n view: newIso\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onCalendarSelect\", function (_ref3) {\n var iso = _ref3.iso;\n\n _this.setState({\n inputValue: '',\n isOpen: false,\n selectedValue: iso,\n view: iso,\n value: iso\n });\n\n _this.props.onChange(iso);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onInputClick\", function () {\n if (!_this.getState().isOpen) _this.setState({\n isOpen: true\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onSelectBlur\", function (e) {\n _this.setState({\n isOpen: false\n });\n\n _this.props.onBlur(e);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onSelectFocus\", function (e) {\n var _this$getState = _this.getState(),\n value = _this$getState.value;\n\n _this.setState({\n isOpen: true,\n view: value\n });\n\n _this.props.onFocus(e);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onSelectInput\", function (e) {\n var value = e.target.value;\n var _this$props = _this.props,\n dateFormat = _this$props.dateFormat,\n parseInputValue = _this$props.parseInputValue;\n\n if (value) {\n var parsed = parseInputValue(value, dateFormat); // Only try to set the date if we have month & day\n\n if (isValid(parsed)) {\n // We format the parsed date to YYYY-MM-DD here because\n // this is the format expected by the @findable/calendar component\n _this.setState({\n view: format(parsed, 'YYYY-MM-DD')\n });\n }\n }\n\n _this.setState({\n isOpen: true\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onSelectKeyDown\", function (e) {\n var key = e.key,\n target = e.target;\n\n var _this$getState2 = _this.getState(),\n view = _this$getState2.view,\n selectedValue = _this$getState2.selectedValue;\n\n var dir = arrowKeys[key];\n\n if (dir) {\n // Calendar will not exist if it's not open and this also doubles as a\n // ref check since it may not exist.\n if (_this.calendar) {\n // We don't want to move the caret if the calendar is open.\n if (dir === 'left' || dir === 'right') {\n e.preventDefault();\n }\n\n _this.calendar.navigate(dir);\n }\n\n if (dir === 'down' || dir === 'up') {\n _this.setState({\n isOpen: true\n });\n }\n } else if (key === 'Escape') {\n _this.setState({\n isOpen: false\n });\n } else if (key === 'Backspace' && selectedValue && target instanceof HTMLInputElement && target.value.length < 1) {\n _this.setState({\n selectedValue: '',\n value: '',\n view: _this.props.defaultValue || format(new Date(), 'YYYY-MM-DD')\n });\n\n _this.props.onChange(''); // Dates may be disabled\n\n } else if (!_this.isDateDisabled(view)) {\n if (key === 'Enter') {\n _this.setState({\n inputValue: '',\n isOpen: false,\n selectedValue: view,\n value: view,\n view: view\n });\n\n _this.props.onChange(view);\n }\n\n if (key === 'Tab') {\n _this.setState({\n isOpen: false\n });\n }\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"refCalendar\", function (ref) {\n _this.calendar = ref;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handleInputChange\", function (inputValue, actionMeta) {\n var onInputChange = _this.props.selectProps.onInputChange;\n if (onInputChange) onInputChange(inputValue, actionMeta);\n\n _this.setState({\n inputValue: inputValue\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"getContainerRef\", function (ref) {\n var oldRef = _this.containerRef;\n _this.containerRef = ref; // Cause a re-render if we're getting the container ref for the first time\n // as the layered menu requires it for dimension calculation\n\n if (oldRef == null && ref != null) {\n _this.forceUpdate();\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"getSubtleControlStyles\", function (isOpen) {\n return {\n border: \"2px solid \".concat(isOpen ? colors.B100 : \"transparent\"),\n backgroundColor: 'transparent',\n padding: '1px'\n };\n });\n\n var _getDateObj = getDateObj(new Date()),\n day = _getDateObj.day,\n _month = _getDateObj.month,\n _year = _getDateObj.year;\n\n _this.state = {\n isOpen: _this.props.defaultIsOpen,\n inputValue: _this.props.selectProps.inputValue,\n selectedValue: _this.props.value || _this.props.defaultValue,\n value: _this.props.defaultValue,\n view: _this.props.value || _this.props.defaultValue || \"\".concat(_year, \"-\").concat(padToTwo(_month), \"-\").concat(padToTwo(day))\n };\n return _this;\n } // All state needs to be accessed via this function so that the state is mapped from props", "title": "" }, { "docid": "743cf4ac7a5712e618423900c63d5c8b", "score": "0.5707827", "text": "_handleValueChanged () {\n let date = undefined;\n if (this.state.isError) {\n date = !this.state.value ? null : undefined\n } \n else {\n date = this._dateHelper.parse(this.state.value);\n } \n this.props.valueChanged(date, this.state.value);\n }", "title": "" }, { "docid": "cca1ba3540e438430bfb542d2696056b", "score": "0.5703463", "text": "function t(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId=\"ui-datepicker-div\",this._inlineClass=\"ui-datepicker-inline\",this._appendClass=\"ui-datepicker-append\",this._triggerClass=\"ui-datepicker-trigger\",this._dialogClass=\"ui-datepicker-dialog\",this._disableClass=\"ui-datepicker-disabled\",this._unselectableClass=\"ui-datepicker-unselectable\",this._currentClass=\"ui-datepicker-current-day\",this._dayOverClass=\"ui-datepicker-days-cell-over\",this.regional=[],this.regional[\"\"]={closeText:\"Done\",prevText:\"Prev\",nextText:\"Next\",currentText:\"Today\",monthNames:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],monthNamesShort:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],dayNames:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],dayNamesShort:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],dayNamesMin:[\"Su\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"],weekHeader:\"Wk\",dateFormat:\"mm/dd/yy\",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:\"\"},this._defaults={showOn:\"focus\",showAnim:\"fadeIn\",showOptions:{},defaultDate:null,appendText:\"\",buttonText:\"...\",buttonImage:\"\",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:\"c-10:c+10\",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:\"+10\",minDate:null,maxDate:null,duration:\"fast\",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:\"\",altFormat:\"\",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},P.extend(this._defaults,this.regional[\"\"]),this.regional.en=P.extend(!0,{},this.regional[\"\"]),this.regional[\"en-US\"]=P.extend(!0,{},this.regional.en),this.dpDiv=f(P(\"<div id='\"+this._mainDivId+\"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>\"))}", "title": "" }, { "docid": "89a2db2ec6091c7c1c2781d58da78956", "score": "0.5701201", "text": "function onClose(date, field) {\n\t\tvar date = new Date(date);\n\t\t$(field).val(date);\n\t}", "title": "" }, { "docid": "1b9455659fa9d8f752c2c1cba87732b4", "score": "0.56962746", "text": "function setDate(date) {\n picker.set('select', date);\n}", "title": "" }, { "docid": "54ac56279fb4e2e065944e24ccfd84b3", "score": "0.5683236", "text": "function dateTimePicker(){\n var date_select_field = $('input[name=\"datetimepicker\"]');\n if (date_select_field.length) {\n var start = moment().subtract(29, 'days');\n\n date_select_field.daterangepicker({\n startDate: start,\n autoUpdateInput: false,\n singleDatePicker: true,\n showDropdowns: true,\n locale: {\n format: 'DD/MM/YYYY'\n }\n });\n date_select_field.on('focus', function () {\n $(this).closest('.form-group').addClass('is-focused');\n });\n date_select_field.on('apply.daterangepicker', function (ev, picker) {\n $(this).val(picker.startDate.format('DD/MM/YYYY'));\n $(this).closest('.form-group').addClass('is-focused');\n });\n date_select_field.on('hide.daterangepicker', function () {\n if ('' === $(this).val()){\n $(this).closest('.form-group').removeClass('is-focused');\n }\n });\n\n }\n}", "title": "" }, { "docid": "59015bef01de7222b716c047be1e90ff", "score": "0.56743044", "text": "function FormatDate_Old(seldate,nullable,tbID)\n { \n var textField = document.getElementById(tbID + \"_textBox\");\n if(seldate==\"\")\n {\n textField.value = \"\";\n return;\n } \n \n var date = get_CalednarPopUpDate(tbID);\n var curr_date = date.getDate();\n var curr_month = date.getMonth();\n var curr_year = date.getFullYear();\n \n textField.value = Get_FormatDate(date,\"MMM d, yyyy\");\n }", "title": "" }, { "docid": "6e0640ec7c3416d89407fd27a923ea0e", "score": "0.5668901", "text": "function dateSeparetor(thefield)\r\n{\r\n\r\n//eval(\"document.forms[0].\"+field_name+\"\").value;\r\nvar val=thefield.value;\r\nif(val.length==2)\r\n{val=val+\"-\";}\r\nif(val.length==5)\r\n{val=val+\"-\";}\r\nthefield.value=val;\r\n\r\n}", "title": "" }, { "docid": "a5681ed1efb58aa9ff386cbbfa4291b7", "score": "0.56593037", "text": "function fnBindMonth() {\n $('#dvMonth').html('');\n $('#dvMonth').html('<input id=\"txtMonth\" style=\"width:100%;text-align:left;\" />');\n var lstMonth = [];\n var year = $('#txtYear').val();\n\n\n if (year == new Date().getFullYear()) {\n for (var i = 0; i <= new Date().getMonth() ; i++) {\n _objMonthData = {};\n _objMonthData.value = i + 1;\n _objMonthData.label = monthNames[i];\n lstMonth.push(_objMonthData);\n }\n }\n else {\n for (var i = 0; i <= 11; i++) {\n _objMonthData = {};\n _objMonthData.value = i + 1;\n _objMonthData.label = monthNames[i];\n lstMonth.push(_objMonthData);\n }\n }\n\n atcObj1 = new ej.dropdowns.DropDownList({\n dataSource: lstMonth,\n fields: { text: 'label', value: 'value' },\n popupHeight: '200px',\n });\n\n atcObj1.appendTo('#txtMonth');\n\n atcObj1.value = parseInt(Month);\n\n if (Month != '') {\n document.querySelector(\"#txtMonth\").ej2_instances[0].enabled = false;\n }\n var d = new Date();\n var n = d.getMonth();\n if (n == 0) {\n var d = 11;\n }\n else {\n var d = n - 1;\n }\n\n atcObj1.index = d;\n}", "title": "" }, { "docid": "d832957f413eaa2945fe6dfafa5b9cf9", "score": "0.56545824", "text": "function insertDate(str,buttonDay) {\n\t\t\n var sMonth;\n\t\n switch (document.dateChooser.chooseMonth.value) {\n\t\t\n case \"January\":\n sMonth = \"01\";\n break;\n\t\t\n case \"February\":\n sMonth = \"02\";\n break;\n\t\t\n case \"March\":\n sMonth = \"03\";\n break;\n\t\t\n case \"April\":\n sMonth = \"04\";\n break;\n\t\t\n case \"May\":\n sMonth = \"05\";\n break;\n\t\t\n case \"June\":\n sMonth = \"06\";\n break;\n\t\t\n case \"July\":\n sMonth = \"07\";\n break;\n\t\t\n case \"August\":\n sMonth = \"08\";\n break;\n\t\t\n case \"September\":\n sMonth = \"09\";\n break;\n\t\t\n case \"October\":\n sMonth = \"10\";\n break;\n\t\t\n case \"November\":\n sMonth = \"11\";\n break;\n\t\t\n case \"December\":\n sMonth = \"12\";\n break;\n\t\t\n }\n\t\t\n str = document.dateChooser.chooseYear.value + \"/\" + sMonth + \"/\" + str\n //opener.document.form1.dateField.innerText = str;\n var dField = document.getElementById('dateField');\n dField.innerText = str;\n\t\t\n if(dateSel[0] == undefined) {\n dateSel[0] = str;\n //alert(dateSel[0]);\n }\n else {\n dateSel[1] = str;\n //alert(dateSel[1] + ' ' + dateSel[0]);\n }\n\t\t\n//hideCalendar(calendarTable);\n//self.close();\n//hideCalendar(dateChooser);\n}", "title": "" }, { "docid": "2b808a7faf17e500f300e222a5c440a8", "score": "0.5653626", "text": "function DatePickerShow ( txtId, btnId, dateFormat, dateSeparator, relpath, strMonths,strClose,strDays,strMonthTitle,strPrevMonth,strNextMonth,strYearTitle,strToday,strYesterday,strTomorrow,strWeekAgo,strWeekAfter,strMonthAgo,strMonthAfter) {\n\t\n\tif (!document.getElementById) {\n\t\treturn;\n\t}\n\n\toDatePicker.texts.months = strMonths.split (\"-\");\n\toDatePicker.texts.close = strClose;\n\toDatePicker.texts.days = strDays.split (\"-\");\n\toDatePicker.texts.monthTitle = strMonthTitle;\n\toDatePicker.texts.prevMonth = strPrevMonth;\n\toDatePicker.texts.nextMonth = strNextMonth;\n\toDatePicker.texts.yearTitle = strYearTitle;\n\toDatePicker.texts.today = strToday;\n\n\toDatePicker.dateFormat = dateFormat;\n\toDatePicker.dateSeparator = dateSeparator;\n\t\t\n\t// since we control the text format in callback(), getting the date is easy\n var value = document.getElementById(txtId).value;\n\n //Parse datetime from string\n var dt = stringToDateTime(value, oDatePicker.dateFormat, oDatePicker.dateSeparator);\n \t\n\toDatePicker.client = document.getElementById( txtId );\n\toDatePicker.calendarButton = document.getElementById( btnId );\n\toDatePicker.relativePath = relpath;\n\t\n\toDatePicker.showDaysPicker ( dt, callback );\n}", "title": "" }, { "docid": "9d9d79db4179fd8d6c241f0393e1029d", "score": "0.56505436", "text": "function dateChangeListener() {\n if (this.selectedOptions.length > 0) {\n var date = this.selectedOptions[0].value;\n fetchDataForDate(date);\n }\n}", "title": "" }, { "docid": "73bbfc3b5628b024cc66485dcc4ac51a", "score": "0.56477374", "text": "function passDate()\n{\n var dt=document.getElementById(\"dayBooking\").value;\n if(dt !=\"\")\n {\n document.getElementById(\"inputDate\").valueAsDate=new Date(dt);\n }\n}", "title": "" }, { "docid": "506ab6d7d86477c6e810ab15a8fd89f4", "score": "0.56438684", "text": "handleChange(e) {\r\n this.props.date({\r\n date: this.state.dates[e.value]\r\n });\r\n this.setState({\r\n date: this.state.dates[e.value],\r\n selected: e.value\r\n });\r\n }", "title": "" }, { "docid": "6198bd3304f3df33350399bcca8153c0", "score": "0.5641346", "text": "function date_select_onchange(input, id, grain, military, increment) {\n try {\n\n // Are we setting a \"to date\"?\n var todate = $(input).attr('id').indexOf('value2') != -1 ? true : false;\n\n // Grab the current value (which may include both the \"from\" and \"to\" dates\n // separated by a pipe '|')\n var current_val = $('#' + id).val();\n\n // Is there a \"to date\" already set on the current value?\n var todate_already_set = current_val.indexOf('|') != -1 ? true : false;\n\n // Prepare the value part(s).\n var parts = [];\n if (todate_already_set) { parts = current_val.split('|'); }\n else { parts.push(current_val); }\n\n // Get the date for the current value, or just default to now.\n var date = null;\n if (!current_val) { date = new Date(); }\n else {\n\n // In case they set the \"to date\" before the \"from date\", give the \"from date\" a default value.\n if (!todate && empty(parts[0])) { parts[0] = date_yyyy_mm_dd_hh_mm_ss(); }\n\n //Fixes iOS bug spaces must be replaced with T's\n if (typeof device !== 'undefined' && device.platform == 'iOS') {\n\n if (!todate) { parts[0] = parts[0].replace(' ', 'T'); }\n else {\n if (todate_already_set) { parts[1] = parts[1].replace(' ', 'T'); }\n }\n }\n\n if (!todate) { date = new Date(parts[0]); }\n else {\n if (todate_already_set) { date = new Date(parts[1]); }\n else { date = new Date(); }\n }\n\n }\n\n var input_val = $(input).val();\n switch (grain) {\n case 'year':\n date.setYear(input_val);\n break;\n case 'month':\n date.setMonth(input_val - 1);\n break;\n case 'day':\n date.setDate(input_val);\n break;\n case 'hour':\n if (!military) {\n input_val = parseInt(input_val);\n var ampm_input = $('#' + $(input).attr('id').replace(grain, 'ampm'));\n var ampm_input_value = $(ampm_input).val();\n switch (ampm_input_value) {\n case 'am':\n if (input_val == 12) { input_val = 0; }\n date.setHours(input_val);\n break;\n case 'pm':\n if (input_val == 12) { input_val = 0; }\n date.setHours(input_val + 12);\n break;\n }\n }\n else { date.setHours(input_val); }\n break;\n case 'minute':\n date.setMinutes(input_val);\n break;\n case 'ampm':\n if (input_val == 'pm') {\n if (date.getHours() < 12) { date.setHours(date.getHours() + 12); }\n else { date.setHours(date.getHours()); }\n }\n else if (input_val == 'am') { date.setHours(date.getHours() - 12); }\n break;\n }\n\n // Adjust the minutes.\n date.setMinutes(_date_minute_increment_adjust(increment, date.getMinutes()));\n\n // Finally set the value.\n var _value = date_yyyy_mm_dd_hh_mm_ss(date_yyyy_mm_dd_hh_mm_ss_parts(date));\n if (!todate) { parts[0] = _value; }\n else { parts[1] = _value; }\n $('#' + id).val(parts.join('|'));\n }\n catch (error) { drupalgap_error(error); }\n}", "title": "" }, { "docid": "84feca96a0689c14bc8b3c2647a4383c", "score": "0.56381714", "text": "_onDateTimePickerShow() {\n this.inputRef.el.select();\n }", "title": "" }, { "docid": "4bfb2ef37ff2850f8217fe6c4d01b7fd", "score": "0.56293404", "text": "function setDatePickerVal() {\n if ($scope.model.value) {\n var dateVal;\n //check if we are supposed to offset the time\n if ($scope.model.value && Object.toBoolean($scope.model.config.offsetTime) && $scope.serverTimeNeedsOffsetting) {\n //get the local time offset from the server\n dateVal = dateHelper.convertToLocalMomentTime($scope.model.value, Umbraco.Sys.ServerVariables.application.serverTimeOffset);\n $scope.serverTime = dateHelper.convertToServerStringTime(dateVal, Umbraco.Sys.ServerVariables.application.serverTimeOffset, \"YYYY-MM-DD HH:mm:ss Z\");\n }\n else {\n //create a normal moment , no offset required\n dateVal = $scope.model.value ? moment($scope.model.value, \"YYYY-MM-DD HH:mm:ss\") : moment();\n }\n $scope.model.datetimePickerValue = dateVal.format($scope.model.config.format);\n }\n else {\n $scope.clearDate();\n }\n }", "title": "" } ]
b2494b8e893430e071ca8fae38bd2f85
generic query method that uses a connection from the tool
[ { "docid": "2054916e08018f7c2349b63f8155876f", "score": "0.0", "text": "function query(statement, data) {\n\tvar dfd = Q.defer();\n\tconnect().then(function(connection) {\n\t\tconnection.query(statement, data, function(err, result) {\n\t\t\t//release the connection back to the pool\n\t\t\tconnection.release();\n\t\t\tif (err) {\n\t\t\t\tconsole.log(\"An error occurred during mysql query\", err.stack);\n\t\t\t\tdfd.reject(err);\n\t\t\t} else {\n\t\t\t\tdfd.resolve(result);\n\t\t\t}\n\t\t});\n\t}).catch(dfd.reject);\n\n\treturn dfd.promise;\n}", "title": "" } ]
[ { "docid": "1eb18f89e6d44569ab860128fa703fa1", "score": "0.7089741", "text": "_query(connection, obj) {\n const client = this;\n if (!obj || typeof obj === 'string') obj = { sql: obj };\n return new Promise((resolver, rejecter) => {\n const { sql } = obj;\n if (!sql) return resolver();\n const req = (connection.tx_ || connection).request();\n // req.verbose = true;\n req.multiple = true;\n if (obj.bindings) {\n for (let i = 0; i < obj.bindings.length; i++) {\n client._setReqInput(req, i, obj.bindings[i]);\n }\n }\n req.query(sql, (err, recordset) => {\n if (err) {\n return rejecter(err);\n }\n obj.response = recordset.recordsets[0];\n resolver(obj);\n });\n });\n }", "title": "" }, { "docid": "c4c36ad51609b958dedc9c9b90bc0d5e", "score": "0.66089284", "text": "function TQuery() {}", "title": "" }, { "docid": "b24a50610f296f219282607ea27ebefc", "score": "0.65921676", "text": "performQuery(request) {\n let connection;\n // console.log(\"Reached init\", request);\n // Get a non-pooled connection\n return new Promise((fulfill, reject) => {\n oracledb.getConnection({\n user: dbConfig.user,\n password: dbConfig.password,\n connectString: dbConfig.connecturl\n })\n .then(conn => {\n connection = conn;\n return conn.execute(request, [], { outFormat: oracledb.OBJECT });\n })\n .then(result => {\n this.close(connection);\n fulfill(result);\n })\n .catch(err => {\n console.log(err);\n this.close(connection);\n reject(err);\n })\n })\n\n }", "title": "" }, { "docid": "ec52678ca1d2d8bc9f0da9ddf604e0a6", "score": "0.6551448", "text": "query() {\n return pool.query.apply(pool, arguments)\n .catch((error) => {\n throw new Errors.Database(error.message);\n });\n }", "title": "" }, { "docid": "c9a577d83246c5124a099539ff5ab9da", "score": "0.6424413", "text": "querySql (query, params) {\n return Promise.using(this.getSqlConnection(), function (connection) {\n console.log(\"Got connection from pool\");\n if (typeof params !== 'undefined'){\n return connection.queryAsync(query, params);\n } else {\n return connection.queryAsync(query);\n }\n });\n }", "title": "" }, { "docid": "273e9f2cc751746f59f2ff2da74ba6ea", "score": "0.64155537", "text": "function TQuery(){}", "title": "" }, { "docid": "31f155a035c8acdc9dcd24b973892b22", "score": "0.6381383", "text": "function TQueries() {}", "title": "" }, { "docid": "cb5de5c7b7c876dd5e8c23c0d15c9e1d", "score": "0.63678753", "text": "executeQuery(sql) {\n return new Promise((resolve, reject) => {\n let pool = DbConnMgr.__createReadConn();\n\n pool.getConnection((err, conn) => {\n if (err) reject(err);\n conn.query(sql, (err, res) => {\n if (err) {\n conn.end();\n reject(err);\n }\n conn.end();\n resolve(res);\n })\n })\n });\n }", "title": "" }, { "docid": "477d0afabf716dbecd60475df3b5e2cb", "score": "0.63545644", "text": "function TQueries(){}", "title": "" }, { "docid": "412b3ceb921233e6de8209795524c442", "score": "0.63146025", "text": "static get queryObject() { return Query.sql }", "title": "" }, { "docid": "8e737f809cd7e02cb7acc748d917aaaf", "score": "0.631012", "text": "doQuery(query, params = []) {\n if (this.connection.state === \"disconnected\") {\n throw new Error(\"Attempted query without database connection\");\n }\n\n const ret = new Promise((resolve) => {\n this.connection.query(query, params, (err, res) => {\n if (err) throw err;\n resolve(res);\n });\n });\n\n return ret;\n }", "title": "" }, { "docid": "81dcf1625b3a4e26d7bfab659abd05e1", "score": "0.6309293", "text": "_query(connection, obj) {\n\n // convert ? params into positional bindings (:1)\n obj.sql = this.positionBindings(obj.sql);\n\n if (!obj.sql) throw new Error('The query is empty');\n\n return connection.executeAsync(obj.sql, obj.bindings).then(function(response) {\n if (!obj.returning) return response\n const rowIds = obj.outParams.map((v, i) => response[`returnParam${i ? i : ''}`]);\n return connection.executeAsync(obj.returningSql, rowIds)\n }).then(function(response) {\n obj.response = response;\n obj.rowsAffected = response.updateCount;\n return obj;\n }).catch(err => {\n if (isConnectionError(err)) {\n connection.__knex__disposed = err\n }\n throw err\n })\n\n }", "title": "" }, { "docid": "7a281c252ec7839ef010351a53f580af", "score": "0.6298775", "text": "function TQuery() { }", "title": "" }, { "docid": "7a281c252ec7839ef010351a53f580af", "score": "0.6298775", "text": "function TQuery() { }", "title": "" }, { "docid": "1dc1c5dea5e76e3863a5d9951db04fd9", "score": "0.6165995", "text": "function Query() {\n}", "title": "" }, { "docid": "5f3ebbe04efbbccff1adff60e38e5b59", "score": "0.61454254", "text": "function Query() {\r\n}", "title": "" }, { "docid": "7ba01316283ab0bc84f9722d45952745", "score": "0.6090185", "text": "function LQuery() {}", "title": "" }, { "docid": "1984f80f1803a7fb3f5fa7077f9e088b", "score": "0.60799897", "text": "doRead(sql) {\n return new Promise((resolve, reject) => {\n\n let pool = DbConnMgr.__createReadConn();\n\n pool.getConnection((err, conn) => {\n if (err) reject(err);\n conn.query(sql, (err, res) => {\n if (err) {\n conn.end();\n reject(err);\n }\n conn.end();\n resolve(res);\n })\n })\n })\n }", "title": "" }, { "docid": "b4b45fd41896ee10d7ba8ba545529672", "score": "0.60527104", "text": "async Query (sql, params) {\n return this.pool.query(sql, params);\n }", "title": "" }, { "docid": "f7fa77d2342c7427da21454c7c319cf8", "score": "0.6037094", "text": "function LQuery(){}", "title": "" }, { "docid": "438896e625d2d6e1fdaf48928cc49b58", "score": "0.60312694", "text": "function TQueries() { }", "title": "" }, { "docid": "438896e625d2d6e1fdaf48928cc49b58", "score": "0.60312694", "text": "function TQueries() { }", "title": "" }, { "docid": "a1100b3a7c5a8f03845a4db1ee11d2e8", "score": "0.6019804", "text": "query (query, ...args) {\n this._pool.connect((err, client, done) => {\n if (err) throw err;\n const params = args.length === 2 ? args[0] : [];\n const callback = args.length === 1 ? args[0] : args[1];\n\n client.query(query, params, (err, res) => {\n done();\n if (err) {\n console.log(err.stack);\n return callback({ error: 'Database error.' }, null);\n }\n callback({}, res.rows);\n });\n });\n }", "title": "" }, { "docid": "f229d84a94a9647a1f1e9738695d9293", "score": "0.59903115", "text": "query (query, ...args) {\n // use pool to connect to postgres\n this._pool.connect((err, client, done) => {\n if (err) throw err;\n const params = args.length === 2 ? args[0] : [];\n const callback = args.length === 1 ? args[0] : args[1];\n\n // if connection was successful, use acquired client from the pool to query db and return rows\n client.query(query, params, (err, res) => {\n done();\n if (err) {\n console.log(err.stack);\n return callback({ error: 'Database error.' }, null);\n }\n callback({}, res.rows);\n });\n });\n }", "title": "" }, { "docid": "6f41f4c9fd75b37c0757e9eea349cf0c", "score": "0.59665227", "text": "query (sql, parameters) {\n let that = this;\n return new Promise(function (resolve, reject) {\n that._pool.query(sql, parameters, (err, res) => {\n if (err) {\n reject(err);\n } else {\n resolve(res.rows);\n }\n });\n });\n }", "title": "" }, { "docid": "807d5245f3078dc40750f49e0aa851c1", "score": "0.5941389", "text": "function customQuery(db, fun, opts) {\n\t return new PouchPromise(function (resolve, reject) {\n\t db._query(fun, opts, function (err, res) {\n\t if (err) {\n\t return reject(err);\n\t }\n\t resolve(res);\n\t });\n\t });\n\t}", "title": "" }, { "docid": "0f004e7229ecd23d238aaad91bfcd370", "score": "0.5934545", "text": "function query(sql, param) {\n if (param === void 0) { param = []; }\n return new Promise(function (resolve, reject) {\n connection.query(sql, param, function (err, results) {\n if (err === null) {\n resolve(results);\n }\n else {\n reject(err);\n }\n });\n });\n}", "title": "" }, { "docid": "dee4c014b410778d95c12798ab3fde12", "score": "0.5927453", "text": "function execQuery(con, sql, args = []) {\n // if (development) {\n // console.log(sql)\n // console.log(util.inspect(args))\n // }\n return new Promise((resolve, reject) => {\n con.query(sql, args, (err, rows) => {\n if (err) {\n reject(err)\n } else {\n resolve(rows)\n }\n })\n })\n}", "title": "" }, { "docid": "6af6efdd2cd592a4b72f56d7f6207716", "score": "0.59272784", "text": "static connectThenQuery(sql, arg1, arg2) {\n let conn = mysql.createConnection(dbConfig);\n if (typeof arg2 === 'undefined') {\n conn.query(sql, arg1);\n } else {\n conn.query(sql, arg1, arg2);\n }\n conn.end(); // Connection will end after query has ended\n }", "title": "" }, { "docid": "323d42cdc821b6315d049ea12da501dc", "score": "0.5913517", "text": "query(query, params) {\n if (params != undefined) {\n query = this.mysql.format(query, params)\n }\n\n return new Promise((fulfill, reject) => {\n this.pool.getConnection((err, connection) => {\n connection.query({sql: query, timeout: this.timeout}, function(error, results) {\n connection.release();\n if (error) {reject(error)}\n fulfill(results)\n })\n })\n })\n }", "title": "" }, { "docid": "004acc3d8508c3622b1e616166e45e88", "score": "0.59020877", "text": "function LQuery() { }", "title": "" }, { "docid": "004acc3d8508c3622b1e616166e45e88", "score": "0.59020877", "text": "function LQuery() { }", "title": "" }, { "docid": "76cbc6201f1c1094f1a1fadba193a324", "score": "0.58875084", "text": "async function getQueryResult(tablename){\r\n //let result = await conn.execute(`SELECT * FROM GASTOHISTNH`);\r\n //return await conn.execute(`SELECT * FROM GASTOHISTNH`);\r\n //return result\r\n //connection = await oracledb.getConnection(); // get a connection from the default pool\r\n //const result = await connection.execute(`SELECT COUNT(*) FROM `+tablename);\r\n let connection;\r\n let result;\r\n try {\r\n\r\n connection = await oracledb.getConnection(dbconfig); // get a connection from the default pool\r\n result = await connection.execute('SELECT * FROM '+tablename);\r\n \r\n //displayResults(response, result); // do something with the results\r\n\r\n } catch (err) {\r\n console.log(\"<p>Error: \" + \"ERRO DE CONECCION\" + \"</p>\");\r\n } finally {\r\n if (connection) {\r\n try {\r\n console.log(\"<p>Finalmente: \" + \"soltando la conecciOn\" + \"</p>\");\r\n await connection.close(); // always release the connection back to the pool\r\n \r\n } catch (err) {\r\n console.error(err);\r\n }\r\n }\r\n }\r\n\r\n\r\n return result\r\n}", "title": "" }, { "docid": "0ff8d84b2f85a923ef401ce710d44759", "score": "0.5868071", "text": "executeQuery(dp, args) {\n throw new Error(`abstract method not implemented: ${this}.executeQuery`);\n }", "title": "" }, { "docid": "b069636bd639749cecd77225587145a8", "score": "0.5848752", "text": "function Query(condition){\t\n\treturn new Promise(\n\t\tfunction(resolve,reject){\n\t\t\tconnection.query(condition,function(err,result){\n\t\t\t\tif(err){\n\t\t\t\t\treject(err)\n\t\t\t\t}\n\t\t\t\tresolve(result)\n\t\t\t})\n\t\t}\n\t)\n}", "title": "" }, { "docid": "f35fb36367d02db31bd0131e676fdd86", "score": "0.58284336", "text": "function LQueries(){}", "title": "" }, { "docid": "2a5a44a5b4fbf9993fbde0d1c24074e4", "score": "0.5809998", "text": "function runQuery(sql, callback) {\n //console.log(sql);\n pool.getConnection(function(err, connection) {\n if (err) {\n console.log(err);\n callback(true);\n return;\n }\n connection.query(sql, function(err, results) {\n connection.release();\n if (err) {\n console.log(err);\n callback(true);\n return;\n }\n callback(false, results);\n })\n }); \n}", "title": "" }, { "docid": "c06287557244b3d69f650b3680938100", "score": "0.58070576", "text": "QueryS(string, string) {\n\n }", "title": "" }, { "docid": "9b779c20e109bbf380fac1d4b94985c9", "score": "0.58065265", "text": "function customQuery(db, fun, opts) {\n return new PouchPromise(function (resolve, reject) {\n db._query(fun, opts, function (err, res) {\n if (err) {\n return reject(err);\n }\n resolve(res);\n });\n });\n}", "title": "" }, { "docid": "9b779c20e109bbf380fac1d4b94985c9", "score": "0.58065265", "text": "function customQuery(db, fun, opts) {\n return new PouchPromise(function (resolve, reject) {\n db._query(fun, opts, function (err, res) {\n if (err) {\n return reject(err);\n }\n resolve(res);\n });\n });\n}", "title": "" }, { "docid": "ec75922cdf4281fd42298139b7301b55", "score": "0.58003974", "text": "async runQuery(query, parameters) {\n // run query\n const result = await this.pool.query(query, parameters);\n // error handling\n if (!result) {\n throw new Error (\"Error in running query\");\n }\n // return results\n return result[0];\n }", "title": "" }, { "docid": "b4f4a4f308b549c06714842018f9a70e", "score": "0.58002156", "text": "getAll(collection, query) {\n return this.connect()\n .then((db) => {\n return db.collection(collection).find(query).toArray();\n })\n .catch((err) => {\n console.log(new Error(`Algo salgio mal en getAll ${err}`));\n });\n }", "title": "" }, { "docid": "7657460634a844c479deffbe6f64a988", "score": "0.57865274", "text": "select(category, query) {\n return new RemoteCursor(this.connection, { category }).select(query);\n }", "title": "" }, { "docid": "68b9e01407569bc1ef781a7c11f74063", "score": "0.5782173", "text": "function customQuery(db, fun, opts) {\n return new Promise(function (resolve, reject) {\n db._query(fun, opts, function (err, res) {\n if (err) {\n return reject(err);\n }\n resolve(res);\n });\n });\n}", "title": "" }, { "docid": "68b9e01407569bc1ef781a7c11f74063", "score": "0.5782173", "text": "function customQuery(db, fun, opts) {\n return new Promise(function (resolve, reject) {\n db._query(fun, opts, function (err, res) {\n if (err) {\n return reject(err);\n }\n resolve(res);\n });\n });\n}", "title": "" }, { "docid": "a9a1c3497dee2e82aaab04e762ed9524", "score": "0.5769556", "text": "async runQuery(sqlQry) {\n try {\n return {\n rowCount: this.rows ? this.rows.length : 0,\n rows:this.rows,\n sqlQry\n }\n } catch (error) {\n throw error;\n } finally {\n \n }\n }", "title": "" }, { "docid": "20ce64d59a14c18fef31b131c3843c52", "score": "0.5766812", "text": "query_db(query, params, callback) {\n this.connection.query(query, params, (error, results) => {\n if (error) throw error\n callback(results)\n })\n }", "title": "" }, { "docid": "97ed0070332f0f7af7b4c085d1a6c227", "score": "0.57514334", "text": "function LQueries() {}", "title": "" }, { "docid": "2c85599ed3782a9175308c2976942319", "score": "0.57399863", "text": "function BaseSQL() {\n Connector.apply(this, [].slice.call(arguments));\n}", "title": "" }, { "docid": "8bd6ee41acc4fd4de61b3e68f70e11ac", "score": "0.5737192", "text": "function _query(q, cb) {\n\tcb = (typeof cb === 'function') ? cb : function () {\n\t};\n\n\ttry {\n\t\t_comms.query(q, function (err, dat) {\n\t\t\tif (err) {\n\t\t\t\tconsole.error(err);\n\t\t\t\tcb(null, {});\n\t\t\t} else {\n\t\t\t\tcb(null, dat);\n\t\t\t}\n\t\t});\n\t}\n\tcatch (ex) {\n\t\t_debug(1, 'Exception Occurred In _query() Method');\n\t\tcb(ex, null);\n\t}\n}", "title": "" }, { "docid": "7787a760e238df93f256a8405ca64fc3", "score": "0.5735556", "text": "get(sql, params = []) {\n return new Promise((resolve, reject) => {\n this.db.get(sql, params, (err, result) => {\n if (err) {\n console.log('Error running sql ' + sql);\n console.log(err);\n reject(err);\n } else {\n resolve(result);\n }\n });\n });\n }", "title": "" }, { "docid": "91ab3ba72ea76b099fee77ea2699fd5b", "score": "0.5734355", "text": "async query(...args) {\n return query(...args)\n }", "title": "" }, { "docid": "6ea99ffb2895cbb60a9d3c60ed2a03b8", "score": "0.57302874", "text": "function genericQuery(myQuery) {\n\n return db.promise().query(myQuery);\n}", "title": "" }, { "docid": "040d0034ef789127426b781a0b19529f", "score": "0.5703104", "text": "runReadStatement(statement)\n {\n this.connection.query(statement, (err, rows) => this.onReadStatement(err, rows)); \n }", "title": "" }, { "docid": "48932e35318e044d14df0d825755bd4b", "score": "0.569209", "text": "function queryAndExecute(query, func) { \n // TODO Query for \"1440 MADISON AVENUE\" creates error\n // bec property type has ' in it: Health Care: Inpatient (Specialty Hospitals, Excluding Children's)\n \n var queryUrl = cartodbUrl+'sql?q='+query;\n\n d3.json(queryUrl, function(error,data) {\n\n if (error) {\n d3.select('body').append('p').text('Error: '+error.statusText);\n console.log(error);\n } \n else {\n // console.log(\"queryAndExecute - data: \", data);\n func(data);\n }\n })\n}", "title": "" }, { "docid": "f2d6bab7d89bdf9adef5c93e44a8db03", "score": "0.56787026", "text": "runQuery(query, options = {}) {\n // Wrap the query.\n const oneDayAgo = moment().subtract(1, \"day\").utc();\n const replacements = {\n last_updated_at: options.last_updated_at || oneDayAgo.toISOString(),\n import_start_date: moment().subtract(this.ship.private_settings.import_days, \"days\").format()\n };\n\n const wrappedQuery = this.adapter.in.wrapQuery(query, replacements);\n // Run the method for the specific adapter.\n return this.adapter.in.runQuery(this.client, wrappedQuery, options)\n .then(result => {\n this.adapter.in.closeConnection(this.client);\n\n const { errors } = this.adapter.in.validateResult(result, this.import_type);\n if (errors && errors.length > 0) {\n return { entries: result.rows, errors };\n }\n\n return { entries: result.rows };\n })\n .catch((err) => {\n this.adapter.in.closeConnection(this.client);\n return Promise.reject(err);\n });\n }", "title": "" }, { "docid": "335bda20591d93a924e8a0750b64650d", "score": "0.5673813", "text": "function connect() {\n this.query = function (sql, cb, rej) {\n pool.getConnection(function (err, conn) {\n if (err) {\n rej({\n code: -1,\n message: 'sql出错',\n data: {}\n });\n cb(err);\n }\n else {\n conn.query(sql, function (qerr, vals, fields) {\n //释放连接\n conn.release();\n //事件驱动回调\n cb && cb(qerr, vals, fields);\n });\n }\n });\n // connection.query(sql, (err, data) => {\n // if (err) {\n // console.log(err);\n // }\n // if (err && rej) {\n // rej({\n // code: -1,\n // message: 'sql出错',\n // data: {}\n // })\n // cb(err, data)\n // return\n // }\n // cb && cb(err, data)\n // })\n };\n}", "title": "" }, { "docid": "a7732dffd44f3f45a14895feb29cadcd", "score": "0.56526", "text": "Query(string, string, int) {\n\n }", "title": "" }, { "docid": "fe75fefd02f5d010cd1ec641759563b1", "score": "0.5649506", "text": "function query_db(res,name) {\n oracle.connect(connectData, function(err, connection) {\n if ( err ) {\n \tconsole.log(err);\n } else {\n\t \t// selecting rows\n\t \tconnection.execute(\"select BOARDNAME,boardtype,ownerlogin, \" +\n\t \t\t\t\"(select OBJECTURL from objects where objectid in \" +\n\t \t\t\t\"(select objectid from pin where pin.boardname=board.boardname \" +\n\t \t\t\t\"and pin.login=board.ownerlogin and rownum<=1 )) as photo from board where ownerlogin=\" + \n\t \t\t\t\"'\"+name+\"'\", \n\t \t\t\t [], \n\t \t\t\t function(err, results) {\n\t \t if ( err ) {\n\t \t \tconsole.log(err);\n\t \t } else {\n\t \t \tconnection.close(); // done with the connection\n\t \t \toutput_actors(res, name, results);\n\t \t }\n\t\n\t \t}); // end connection.execute\n }\n }); // end oracle.connect\n}", "title": "" }, { "docid": "d09ff0a7e86ffc6bd2af0017d4a9f6cb", "score": "0.56348693", "text": "static retrieveAll() {\n const sql = retrieveSql;\n return new Promise((resolve, reject) => {\n getMysqlConnection((err, conn) => {\n if (err) return reject(err);\n conn.query({sql, nestTables: true}, [], (err, results, fields) => {\n conn.release();\n if (err) return reject(err);\n const r = transmogrifyResults(results);\n resolve(r);\n });\n });\n });\n }", "title": "" }, { "docid": "19b466f9a8aeb5e76cd572b459a1f450", "score": "0.56316924", "text": "static retrieve(sid) {\n const args = [sid];\n const sql = `${retrieveSql} WHERE sp.service_provider_sid = ?`;\n return new Promise((resolve, reject) => {\n getMysqlConnection((err, conn) => {\n if (err) return reject(err);\n conn.query({sql, nestTables: true}, args, (err, results, fields) => {\n conn.release();\n if (err) return reject(err);\n const r = transmogrifyResults(results);\n resolve(r);\n });\n });\n });\n }", "title": "" }, { "docid": "2eaeaa31a3951d106872352cda20a20b", "score": "0.5625846", "text": "function query_with(client, cypher_query, parameters) {\n\t\tparameters = parameters || {};\n\t\treturn make_promise(client.query.bind(client, cypher_query, parameters));\n\t}", "title": "" }, { "docid": "220711da0b6e1b9f0cbffcec9121bed4", "score": "0.5625649", "text": "getAllEmpCommune(commune: number, callback: any){\n super.query(\n \"SELECT * FROM Employee WHERE commune = ?\",\n [commune],\n callback\n );\n }", "title": "" }, { "docid": "08f852a3bd2b29e990e51d93afff8a8c", "score": "0.5624435", "text": "query(soql) {\n return this.request({\n path: \"/services/data/\" + this.apiVersion + \"/query\",\n params: {q: soql}\n })\n }", "title": "" }, { "docid": "1975e3e5bc53bc5660a0d5794f01bf30", "score": "0.56181735", "text": "function sqlPooled( options, callback, ...args ) {\n dialojDb.getConnection( \n (err, connection ) => {\n if( err ) return console.error( \"sqlPooled: Can't get connection \", err ) ; \n var query = connection.query( options, wrapProcessQueryCallback( callback, connection, args ) )\n console.log( query.sql )\n }\n )\n}", "title": "" }, { "docid": "502d22ea3b0a69b305cd0744095b0b36", "score": "0.5617619", "text": "function executeQuery() {\n var queryParams = getQueryParameters(false);\n execute(queryParams);\n }", "title": "" }, { "docid": "329db35bd7fa75e45e46ee1083ae28d9", "score": "0.55932915", "text": "function executeQuery(query,values){\n return new Promise((resolve, reject)=>{\n pool.connect()\n .then((client)=>{\n return client.query(query, values)\n .then((res) =>{\n client.release()\n resolve(res);\n\n })\n .catch((e)=>{\n client.release()\n console.log(\"error\");\n reject(e.stack)\n })\n\n });\n });\n}", "title": "" }, { "docid": "d82a267760023e8ce37fe49ea5419175", "score": "0.55887717", "text": "static query(query, callback) {\n this.connection.query(query, function(err, rows, fields) {\n if (err) {\n console.log(err);\n\n return;\n }\n if(!callback){\n return;\n }\n\n return callback(rows, fields);\n });\n }", "title": "" }, { "docid": "e114d8295d92cf5775dde0d55c575e8c", "score": "0.5566708", "text": "async function query(sql, params) {\n const conn = await mysql.createConnection(config.db);\n const [results, ] = await conn.execute(sql, params);\n\n return results;\n}", "title": "" }, { "docid": "9069ee12dc02363c5cd6eb3a66f79238", "score": "0.55632013", "text": "async function getCustomers(dia) {\n // Create connection instance\n var conn = new sql.ConnectionPool(dbConfig);\n \n conn.connect()\n // Successfull connection\n .then(function () {\n \n // Create request instance, passing in connection instance\n var req = new sql.Request(conn);\n req.input('fecha', sql.VarChar, dia)\n // Call mssql's query method passing in params\n req.query(\"SELECT * FROM almuerzo where Convert(varchar(10),CONVERT(date,fecha,106),103)=@fecha\")\n // req.query(`select * from almuerzo`)\n .then(function (recordset) {\n console.log(recordset['recordset'][0]['titulo']);\n // someVar=recordset;\n // setValue(recordset);\n conn.close();\n })\n // Handle sql statement execution errors\n .catch(function (err) {\n console.log(err);\n conn.close();\n })\n \n })\n // Handle connection errors\n .catch(function (err) {\n console.log(err);\n conn.close();\n });\n }", "title": "" }, { "docid": "8c912d5e18feaabb1f90ae1900eab05e", "score": "0.55603737", "text": "q(query, opts) {\n var params = this._q_params(params, opts);\n this.connection.get(`${this.root}api/query?${params}`);\n }", "title": "" }, { "docid": "cd9f9cba991b035ad8acab16037304fe", "score": "0.556019", "text": "function do_query_action(q, params) {\n\n\t\t/** Build action function */\n\t\tfunction create_query_action(q, p) {\n\t\t\tfunction action(db) {\n\t\t\t\treturn db.query(''+q, p);\n\t\t\t}\n\t\t\treturn action;\n\t\t}\n\n\t\tvar _ret, _db;\n\n\t\tfunction save_db(db) {\n\t\t\treturn _db = db;\n\t\t}\n\n\t\tfunction save_ret(ret) {\n\t\t\t_ret = ret;\n\t\t\treturn _db;\n\t\t}\n\n\t\tfunction get_ret() {\n\t\t\treturn _ret;\n\t\t}\n\n\t\treturn POOL.getConnection().then(save_db).then(create_query_action(''+q, params)).then(save_ret).$release().then(get_ret);\n\t}", "title": "" }, { "docid": "622a12af3f8ef3f0828f613b1230ced3", "score": "0.55520654", "text": "function query (query, params, cb) {\n pg.connect(conString, function(err, client, done) {\n if (err) {\n // error connecting to postgres? we won't get far. Just die here\n throw err;\n }\n client.query(query, params, function (err, result) {\n done(); // release connection back to pool\n cb(err, result);\n });\n });\n}", "title": "" }, { "docid": "e6395b3a1f21cc558c2d3c5f7a8b904c", "score": "0.55512595", "text": "function query_db(res,name) {\n oracle.connect(connectData, function(err, connection) {\n if ( err ) {\n \tconsole.log(err);\n } else {\n\t \t// selecting rows\n\t \tconnection.execute(\"SELECT * FROM actors WHERE last_name='\" + name + \n\t \t\t\t\"' AND rownum <= 10\", \n\t \t\t\t [], \n\t \t\t\t function(err, results) {\n\t \t if ( err ) {\n\t \t \tconsole.log(err);\n\t \t } else {\n\t \t \tconnection.close(); // done with the connection\n\t \t \toutput_actors(res, name, results);\n\t \t }\n\t\n\t \t}); // end connection.execute\n }\n }); // end oracle.connect\n}", "title": "" }, { "docid": "8081c3a6d954690f58c78f82b77a3efb", "score": "0.5544056", "text": "getAll(collection, query){\n // Return the promise of connect\n return this.connect()\n .then(db => {\n // Return the db with a mongo methods \n return db.collection(collection).find(query).toArray() // toArray allows me to manipulate this call\n })\n }", "title": "" }, { "docid": "1d2378f5e91c686aed6c22660d2786b5", "score": "0.55392003", "text": "execute(sql, params) {\n return this._query(sql, params);\n }", "title": "" }, { "docid": "4207269326142432e395bd6b672e8acf", "score": "0.55347145", "text": "query(text, values) {\n try {\n if (values){\n console.log('query:', text, values);\n }\n else {\n console.log('query:', text, values);\n }\n return this.pool.query(text, values);\n } catch (err) {\n console.log('Error With Postgres Query');\n throw err;\n }\n }", "title": "" }, { "docid": "076e5aac030a9292bb5e7b23b51040e0", "score": "0.553416", "text": "async function readAll(){\n const query = \"select * from \" + targetTable;\n let status = \"failure\";\n let client = await pool.connect();\n try {\n status = await client.query(query);\n } catch (e) {\n console.log(e);\n status = \"failure\";\n } finally {\n await client.release();\n return status;\n }\n}", "title": "" }, { "docid": "2610c0049e5745690235c126e5da4f79", "score": "0.5521197", "text": "constructor(connection) {\n // Instanciate MYsql connection\n this.connection = connection;\n }", "title": "" }, { "docid": "fdabb1a1a3b95afef6efc518c04b8d6d", "score": "0.5520877", "text": "async function executeTestQuery(query) {\n try{\n let dbmsRes = await pool.query(query);\n return dbmsRes;\n }catch(e){\n console.error(\"DBMS error\", e);\n throw(e) // to let calling function know of the error\n }\n}", "title": "" }, { "docid": "d2c6cd4e025fa1ac8289b025e4418add", "score": "0.5501152", "text": "function basicQuery(t, v, cb) {\n\tconsole.log('step 2 - basicQuery', t, v);\n\tvar text = t;\n\tvar values = v;\n\n\tclient.query(text, values, (err, res) => {\n\t\tconsole.log('step 3 - call back from client query', err, res);\n\t if (err) {\n\t\t\tcb(err);\n\t } else {\n\t\t\tcb(null, res);\n\t }\n\t})\n}", "title": "" }, { "docid": "ce6a90bbe32d7861263738456bf94fc9", "score": "0.54966724", "text": "function queryTransport(transport, next) {\n if (options.query && typeof transport.formatQuery === 'function') {\n options.query = transport.formatQuery(queryObject);\n }\n\n transport.query(options, (err, res) => {\n if (err) {\n return next(err);\n }\n\n if (typeof transport.formatResults === 'function') {\n res = transport.formatResults(res, options.format);\n }\n\n next(null, res);\n });\n }", "title": "" }, { "docid": "fd294a8f3b1f750403cd75587c50ab8d", "score": "0.54853785", "text": "function rawQuery(sql) {\n\treturn new Promise( (resolve, reject) => {\n\t\tpool.getConnection( (err, conn) => {\n\t\t\tif (err) {\n\t\t\t\t// Error al obtener el pool de conexion\n\t\t\t\treject(err);\n\t\t\t}\n\t\t\t\n\t\t\t// Intento ejecutar query\n\t\t\tconn.query(sql, (err, result) => {\n\t\t\t\t// Si se llego aca, la query fue ejecutada (ya sea con o sin exito)\n\t\t\t\t// Devuelvo la conexion al pool de conexiones\n\t\t\t\tconn.release();\n\t\t\t\tif (err) {\n\t\t\t\t\treject(err);\n\t\t\t\t} else {\n\t\t\t\t\t// La query se ejecuto exitosamente. Devuelvo resultados\n\t\t\t\t\tresolve(result);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t});\n}", "title": "" }, { "docid": "1fbd571f6f4d577343d7fc0358a3789b", "score": "0.5485202", "text": "productGet(query) {\n console.log(\"----- Consulta de Producto(s) -------- \");\n console.log(\"query: \" + query);\n console.log(\"-------------------------------------- \");\n return new mssql.Request().query(query);\n }", "title": "" }, { "docid": "4b5b718ed78d21e2ee7c13e90096f513", "score": "0.54848725", "text": "async runQuery(ctx, queryName, queryParams) {\n let mango = JSON.stringify(queryMap[queryName]);\n if (mango) {\n // if no %1 param, then the param is hardcoded (eg. 'register' gets all 'register' txn types)\n if (mango.indexOf('%1') > 0 && queryParams && queryParams.length > 0) {\n mango = mango.replace('%1', queryParams);\n }\n console.log('query is ' + mango);\n return await this.runDynamicQuery(ctx, mango);\n }\n throw new Error(`query ${queryName} does not exist`);\n }", "title": "" }, { "docid": "10c93fba2d7ed03b57a15f7359e2174d", "score": "0.548088", "text": "function query(queryString, callback, data = \"\") {\n //init the connection object. Needs to be done everytime as we call end()\n //on the connection after the call is complete\n initConnection();\n\n //connect to the db\n connection.connect();\n console.log(\"Successful connection\");\n //execute the query and collect the results in the callback\n connection.query(queryString, data, function(error, results, fields) {\n console.log(queryString)\n console.log(\n \"mySql: query: error is: \",\n error,\n \" and results are: \",\n results\n );\n //send the response in the callback\n callback(createDataResponseObject(error, results));\n });\n //disconnect from the method\n connection.end();\n}", "title": "" }, { "docid": "fcc14b3136042ced7962d85499cd01b6", "score": "0.5459729", "text": "function execGenericSQLQuery(sqlQuery, res) {\n\tconst connection = mysql.createConnection(dbConection);\n\n\tconnection.query(sqlQuery, function(error, results, fields) {\n\t\tif (error)\n\t\t\tres.json(error);\n\t\telse\n\t\t\tres.json(results);\n\t\tconnection.end();\n\t\tconsole.log('Query generica executada');\n\t});\n}", "title": "" }, { "docid": "dfd445fbc9af0ccf24155cf1ac64e128", "score": "0.5459194", "text": "function viewAll() { connection.query(query1, (err, res) => {if (err) throw err; console.table(res); exitSelection()}) }", "title": "" }, { "docid": "7fcb786adb66ab12dd6d33200f55bb9a", "score": "0.5458693", "text": "async runQuery(query) {\n let incomplete = false;\n const { maxRows } = this.connection;\n const maxRowsPlusOne = maxRows + 1;\n\n const limitedQuery = sqlLimiter.limit(\n query,\n ['limit', 'fetch'],\n maxRowsPlusOne\n );\n\n // Run query without try/catch here\n // The error should throw and buble up\n const result = await this.client.query(limitedQuery);\n let resultRows = result.rows || [];\n\n if (resultRows.length >= maxRows) {\n incomplete = true;\n resultRows = resultRows.slice(0, maxRows);\n }\n\n return { rows: resultRows, incomplete };\n }", "title": "" }, { "docid": "f84faee0dccfb25c04940ff3451c2202", "score": "0.5456961", "text": "constructor() {\n\t\tthis.mysqlConnection = mysql.createPool({\n\t\t\thost: '192.185.72.57',\n\t\t\tuser: 'arti17co_soen343',\n\t\t\tpassword: 'hy.$EA)MS4_.',\n\t\t\tdatabase: 'arti17co_soen343',\n\t\t\tmultipleStatements: true,\n\t\t});\n\t\tthis.runQuery = function (queryBuild) {\n\t\t\tlet conn = this.mysqlConnection;\n\t\t\tqueryBuild(conn, function (type) {\n\t\t\t\tconsole.log(\"Completed query \" + type + \" \\n\");\n\t\t\t});\n\t\t};\n\t}", "title": "" }, { "docid": "421d1bc43ace17d5e28545707fcd18c1", "score": "0.5455223", "text": "function public_websql_do_executeQuery(strSql,debugmode){\n\tpublic_xmlHttpReturn = \"\";\n \tvar sql = strSql;\n \tif ((sql == null) || (sql ==\"\")) return;\n \tvar url = \"/myproj/Table?city=\" + Math.random() ;\n \turl = url +\"&opertype=1&command=\"+escape(sql);\n \txmlHttp.open(\"GET\", url, false);\n \tif(debugmode){\n \t\talert(\"call server\");\n \t}\n \txmlHttp.onreadystatechange = public_websql_do_setReturnValue;\n \txmlHttp.send(null);\t\n}", "title": "" }, { "docid": "b319e7f893aa52084a59e165c0418057", "score": "0.5447529", "text": "function get(connection, config) {\n if (!config.srcpath[1]) throw new Error('Selection ID expected in source path');\n var selection_id = config.srcpath[1];\n var condition = [];\n var vidx = 1;\n condition.push(['sd.sel_uuid = sel.sel_uuid', []]);\n condition.push([`sel.sel_id = $${vidx}`, [selection_id]]);\n vidx += 1;\n if (config.range) {\n if (!_.isArray(config.range)) config.range = [config.range];\n if (config.range.length === 1) {\n condition.push([`sd.date >= $${vidx}`, [config.range[0]]]);\n vidx += 1;\n } else if (config.range.length === 2) {\n condition.push([`(sd.date >= $${vidx} AND sd.date <= $${vidx + 1})`, config.range]);\n vidx += 2;\n } else {\n return connection.error('Unexpected value for \"range\": ' + JSON.stringify(config.range));\n }\n }\n var cond = _.unzip(condition);\n var query_string = 'SELECT sel.instrument, sd.date, sd.inputs, sd.tags FROM selection_data sd, selections sel WHERE ' + cond[0].join(' AND ') + ' ORDER BY sd.date ASC;';\n var cond_vars = _.flatten(cond[1]);\n if (debug) console.log('QUERY: ', query_string, cond_vars);\n query(query_string, cond_vars, (err, rows, result) => {\n if (err) throw err;\n _.each(rows, row => connection.transmit_data('dated', row));\n connection.end();\n });\n return true;\n}", "title": "" }, { "docid": "062051f67c361967cbae5360c5f95204", "score": "0.54410625", "text": "function Query(adql){\n\t\t//var site= \"http://simbad.u-strasbg.fr/simbad/sim-tap/sync\";\n\t\tvar reTable;\n\t\treTable = $.ajax({\n\t\t\turl: '${site}',\n\t\t\ttype: \"GET\",\n\t\t\tdata: {query: \"${adql}\", format: 'text', lang: 'ADQL', request :'doQuery'},\n\t\t\tasync:false\n\t\t})\n\t\t.done(function(result){\n\t\t\treturn result;\n\t\t});\n\t\treturn reTable;\n\t}", "title": "" }, { "docid": "2482d9a5a4cdc1a41f10d9c9df5b153d", "score": "0.54371506", "text": "function queryDB(tx){\n tx.executeSql('SELECT * FROM employee',[],querySuccess,errorCB);\n }", "title": "" }, { "docid": "ea73da30a6dbaeff1bfda2537de85db6", "score": "0.5435472", "text": "function getData(queryString) {\n return new Promise((resolve, reject) => {\n connection.query(queryString, (err, res) => {\n if (err) reject(err);\n resolve(res);\n });\n });\n}", "title": "" }, { "docid": "fbfbe60d2473a403c21c38f4ddead434", "score": "0.54336447", "text": "function runQuery (query, callback) {\n\n // get a pg client from the connection pool\n return pg.connect(conString, function(err, client, done) {\n\n var handleError = function(err) {\n if(!err) { return false }\n\n if(client){ done(client) }\n\n return true\n }\n\n // handle an error from the connection\n if(handleError(err)) { return callback(err) }\n\n // record the visit\n client.query(query, function(err, result) {\n\n // handle an error from the query\n if(handleError(err)) { \n return callback(err)\n }\n\n // return the client to the connection pool for other requests to reuse\n done()\n \n return callback(null, result)\n })\n })\n}", "title": "" }, { "docid": "835a1f94f409957541c10686b24022d7", "score": "0.54324925", "text": "async function doQuery( query, param, cb ) {\n\n // load query\n const queryText = await requireP( 'text!template/query/' + query + '.rq' );\n\n // execute query\n try {\n\n const req = await client['query']( queryText, param );\n\n return req;\n\n } catch( e ) {\n\n e.message = 'Query (' + query + ') failed:\\n' + e.message;\n\n throw e;\n\n }\n\n }", "title": "" }, { "docid": "b545a7ae81aed60baef473340a6b38ec", "score": "0.543183", "text": "function execute(sql) {\n db.pool.query(sql, function(error, results, fields) {\n if (error) return console.log(error);\n console.log(results);\n });\n}", "title": "" }, { "docid": "49a3e794594f1e286614628caab7a8d5", "score": "0.54312015", "text": "static consultarTransaccion(_tk, callback) {\n //Armamos la consulta segn los parametros que necesitemos\n let query = 'SELECT * ';\n query += 'FROM '+table.name+' ';\n query += 'WHERE '+table.fields._tk+'='+_tk+';'; \n //Verificamos la conexion\n if(sql){\n sql.query(query, (err, result) => {\n if(err){\n throw err;\n }else{ \n let transaccion = Transaccion.mapFactory(result[0]); \n console.log(transaccion); \n callback(null,transaccion);\n }\n })\n }else{\n throw \"Problema conectado con Mysql en consultarTransaccion\";\n } \n }", "title": "" }, { "docid": "5ed50cfa9aaa5d145d9e7dafcfae0416", "score": "0.542587", "text": "function executeQuery(id, cb){\n if (!id) {\n return cb('Invalid id');\n }\n SQliteGetQuery(id, function(err, data){\n if(err) {\n cb(err);\n } else {\n PgConnection(data, cb);\n }\n });\n}", "title": "" }, { "docid": "4aaeae994147fd4046788310dc3e8cfa", "score": "0.54203403", "text": "constructor (query){\n this.query=query;\n }", "title": "" } ]
ffc4d888dd875642ae0b1aa19b1128df
Logs the redict URI to register.
[ { "docid": "e02f02709a6a332c25c4b629448811cd", "score": "0.60050035", "text": "function logRedirectUri() {\n Logger.log(getService().getRedirectUri());\n}", "title": "" } ]
[ { "docid": "e51c207575bd61e156ae9690a7b7ff51", "score": "0.60524803", "text": "log(urlObj) {\n this.emit('urlLogged', urlObj);\n }", "title": "" }, { "docid": "e4dc43a76e2c545643877b3a69ec9cf6", "score": "0.5923914", "text": "function logURL(requestDetails){\n Processor.trackRequest(requestDetails);\n}", "title": "" }, { "docid": "d60a1aabd30d6170f83c78d34756d748", "score": "0.5707975", "text": "function logRedirectUri() {\n Logger.log(OAuth2.getRedirectUri());\n}", "title": "" }, { "docid": "d60a1aabd30d6170f83c78d34756d748", "score": "0.5707975", "text": "function logRedirectUri() {\n Logger.log(OAuth2.getRedirectUri());\n}", "title": "" }, { "docid": "d60a1aabd30d6170f83c78d34756d748", "score": "0.5707975", "text": "function logRedirectUri() {\n Logger.log(OAuth2.getRedirectUri());\n}", "title": "" }, { "docid": "d60a1aabd30d6170f83c78d34756d748", "score": "0.5707975", "text": "function logRedirectUri() {\n Logger.log(OAuth2.getRedirectUri());\n}", "title": "" }, { "docid": "e8379bd4158ad48f4a43ad3e93de6958", "score": "0.56163144", "text": "function dumpRegistrations(){registrations.forEach(_regLog)}", "title": "" }, { "docid": "7fdbf43fe835b493e0d55fb77d2be8c5", "score": "0.55604535", "text": "function logit (req,res,next){\r\n util.log(util.format('printing method and url %s and %s ', req.method , req.url))\r\n util.error()\r\n next()\r\n}", "title": "" }, { "docid": "1a9d10c0cc909c2f062ffd222ce488d1", "score": "0.55076194", "text": "function logger(req, res, next) {\n console.log(`Route received: ${req.protocolo}://${req.get('host')}://${req.originalUrl}`);\n next();\n}", "title": "" }, { "docid": "834868222b8e3e37daa0f8bf0cb60814", "score": "0.5477644", "text": "function logRedirectUri() {\n var service = getGithubService_();\n Logger.log(service.getRedirectUri());\n}", "title": "" }, { "docid": "9777f337784713a59cd70600a2776536", "score": "0.5469138", "text": "onRegistrationError(err) {\n LogStore.log(err)\n }", "title": "" }, { "docid": "6987367368021ca8fc64a85e61eb5f4c", "score": "0.5463053", "text": "function routelog(req,lp, ore) {\n\t\n\tvar ip = req.headers['x-forwarded-for'] || \n\treq.connection.remoteAddress || \n\treq.socket.remoteAddress ||\n\t(req.connection.socket ? req.connection.socket.remoteAddress : null);\n\n\tif (ip.substr(0, 7) == \"::ffff:\") {\n\t ip = ip.substr(7)\n\t}\n\tvar qs = '';\n\tif ( req.query ) {\n\t\tqs = '?';\n\t\tfor (var key in req.query) {\n\t\t\tqs = qs + '&' + key + '=' + req.query[key];\n\t\t }\n\t}\n\t\n\tvar rm = req.method;\n\tvar nw = rd();\n\n\tif ( typeof(ore) !== 'undefined' ) {\n\t\tconsole.error(ip + ' ' + nw + ' ' + rm + ' ' + lp + qs + ' ' + ore);\n\t} else {\n\t\tconsole.log(ip + ' ' + nw + ' ' + rm + ' ' + lp + qs);\n\t}\t\n}", "title": "" }, { "docid": "f587f3987d7fce963913a1042fb39ca6", "score": "0.541375", "text": "logRequests() {\n this.app.use('/', (req, res, next) => {\n this.debug(`Request: ${req.protocol}://${req.get('host')}${req.originalUrl}`);\n next();\n });\n }", "title": "" }, { "docid": "092edcb7aa287ac6b982ab821617fb85", "score": "0.5411175", "text": "function logger(req, res, next) {\n\t// logs to the console the following information about each request: request method, request url, and a timestamp\n\t// runs on every request made to the API\n\tconsole.log(\n\t\t`@time ${Date.now()} : ${req.method} Request to ${req.originalUrl}`\n\t);\n\tnext();\n}", "title": "" }, { "docid": "4d1cce01b92d3ece64bc69080a3d4d86", "score": "0.53955805", "text": "function logger(req,res,next){\n console.log(\"%s %s\",req.method,req.url)\n next()\n}", "title": "" }, { "docid": "692267bd8d1d855eb56de1315269e4e4", "score": "0.53714436", "text": "function logger(request, responce, next) {\n const { method, originalUrl } = request;\n console.log(`${method} to ${originalUrl} at ${Date(Date.now())}`);\n\n next();\n}", "title": "" }, { "docid": "98b258dcba8e16bf9a795b10b05fef9d", "score": "0.5361915", "text": "function methodLogger(request, response, next){ \n\t\t console.log(\"METHOD LOGGER\");\n\t\t console.log(\"================================\");\n\t\t console.log(\"METHOD: \" + request.method);\n\t\t console.log(\"URL:\" + request.url);\n\t\t next(); //call next middleware registered\n}", "title": "" }, { "docid": "950c09f646eff5bcfe50c8514d0c5f1f", "score": "0.53593135", "text": "function methodLogger(request, response, next){\n\t\t console.log(\"METHOD LOGGER\")\n\t\t console.log(\"================================\")\n\t\t console.log(\"METHOD: \" + request.method)\n\t\t console.log(\"URL:\" + request.url)\n\t\t next(); //call next middleware registered\n}", "title": "" }, { "docid": "3e57871967e66d036f15482dfcfed798", "score": "0.5344566", "text": "function logger(req, res, next) {\n console.log(req.method, req.url);\n next();\n}", "title": "" }, { "docid": "59cc7303988a72b80e5073a5e7d2cc83", "score": "0.5325764", "text": "function locationLogger() {\n\tconsole.log(this.location)\n}", "title": "" }, { "docid": "b65de6b025660f0466d4a92403c48ed1", "score": "0.5319062", "text": "function logger(req, res, next) {\n console.log(`[${new Date().toISOString()}] ${req.method} to ${req.url}`);\n next();\n}", "title": "" }, { "docid": "b2dabcf06fc416c47f808272f3882d09", "score": "0.5313371", "text": "log() {\n console.log({\n 'account_id' : this.account_id,\n 'aff_id' : this.aff_id,\n 'referrer' : this.referrer,\n 'token' : this.token,\n })\n }", "title": "" }, { "docid": "6a48bb94e5e84df760c7cd8e8d4d8aaf", "score": "0.5307462", "text": "function logger(req, res, next) {\n console.log(\n `[${new Date().toISOString()}]\n ${req.method} to ${req.url} from ${req.get(\"Origin\")}`\n );\n next();\n}", "title": "" }, { "docid": "7f38f3775f1b229c4966b53d48572007", "score": "0.52911514", "text": "function logger(req, res, next){\n console.log(`${req.method} to ${req.url}`)\n\n next();\n}", "title": "" }, { "docid": "490467a4fa78b1edfbe0bdf4543d4389", "score": "0.52813226", "text": "function logger(req, res, next) {\n console.log(new Date(), req.method, req.url);\n next();\n}", "title": "" }, { "docid": "bf46b392e8ea3b39fe723c5e6b078188", "score": "0.527779", "text": "function recordResponse(rID){\n userLog += getResponseByID(arguments[0]) + \"<br>\";\n }", "title": "" }, { "docid": "5709ff22501115b7608f55571cb19110", "score": "0.527253", "text": "function logger(req, res, next) {\n console.log(req.method)\n console.log(req.url)\n console.log(Date.now())\n next()\n}", "title": "" }, { "docid": "4bcc4fe65ccd84915e9589523d9c7cfc", "score": "0.52271193", "text": "notifyRoute(route){\n console.log(`Activating endpoint: ${route.endpoint} -> ${route.method}`)\n }", "title": "" }, { "docid": "ed3f3d453a4f88bafa1969924e5db417", "score": "0.51489806", "text": "function logger(req, res, next) {\n let logString = `${req.method} ${req.path} - ${req.ip}`;\n console.log(logString);\n next();\n}", "title": "" }, { "docid": "76360b7972bddf01663ba3c72307b4ed", "score": "0.5139325", "text": "function logger(req, resp, next){\n console.log(`${req.method} ${req.path} - ${req.ip} `);\n next();\n}", "title": "" }, { "docid": "56b2fbec44070756c139fc219868d5bf", "score": "0.5136227", "text": "function logger(req, res, next) {\n const now = new Date().toISOString();\n console.log(`A ${req.method} request to '${req.url}'at ${now}`);\n next();\n}", "title": "" }, { "docid": "7f33e5b7d07e5a111d0e85fb0271b734", "score": "0.51107657", "text": "function log(req, res, next) {\n console.log(`They asked for ${req.url}`);\n // counter += 1;\n // req.counter = counter;\n next();\n}", "title": "" }, { "docid": "28da075d19feac2251b2122b993b5b03", "score": "0.50712353", "text": "function logRequest (request, response, next){\n const method = request.method;\n const url = request.url;\n\n console.log(method + ' -- ' + url);\n\n return next(); //proximo middleware\n}", "title": "" }, { "docid": "12b006b784e524e8494834b992f706d1", "score": "0.506663", "text": "function logger(req, res, next) {\n console.log(`${req.method} to ${req.originalUrl}`)\n \n next();//allows the request to continue to the next middleware or route handler\n}", "title": "" }, { "docid": "94def0ea8e0257ee865d90a277b206c4", "score": "0.50567275", "text": "function log() {\n log.history = log.history || [];\n log.history.push( arguments );\n if ( window.console ) {\n window.console.log( Array.prototype.slice.call( arguments ) );\n }\n}", "title": "" }, { "docid": "1978ba3331aca5db2c56c57abb7af1bf", "score": "0.5049155", "text": "function onRequest() {\n\tlog(\"New request\")\n}", "title": "" }, { "docid": "5b4fdd46797c40472f39037bc37b5e5e", "score": "0.49658117", "text": "function log(arg) {\n app.log(arg);\n}", "title": "" }, { "docid": "2331278f38ef899a80a58e5e2882816b", "score": "0.49655828", "text": "fireNewRouteLogging (name, episodeId, playlistId) {\n this.settings.episodeName = name\n this.settings.episodeId = episodeId\n this.settings.playlistId = playlistId\n\n dataLayer.push({\n 'event': 'video interaction',\n 'contentCard': {\n 'eventType': 'episode change',\n 'name': this.settings.episodeName, // name of ep\n 'episodeId': this.settings.episodeId, // episode id\n 'playlistId': this.settings.playlistId // id of associated playlist for saved content\n }\n })\n }", "title": "" }, { "docid": "692cc46eec61c0e3bc023524a0d5ae3e", "score": "0.49490133", "text": "function log(){\n log.history = log.history || [];\n log.history.push(arguments);\n if(this.console){\n console.log( Array.prototype.slice.call(arguments)[0] );\n }\n}", "title": "" }, { "docid": "74266bfdf8033b972251d508a153e4a0", "score": "0.49478456", "text": "function printLog(type, str){\n\t\tgstate.log.push({ type: type, str: str });\n\t}", "title": "" }, { "docid": "649db3d76e5927aa820a1515b93c2ece", "score": "0.49416605", "text": "debug() {\n console.log(\"method: \"+this.method,'\\n',\"uri: \"+this.uri,'\\n',\"rejectCert: \"+this.rejectCert,'\\n',\"uriBase: \"+this.uriBase,'\\n',\"headers: \"+JSON.stringify(this.headers),'\\n',\"body: \"+JSON.stringify(this.body))\n }", "title": "" }, { "docid": "fb92154c3dcbd4ef24adbf38eef6ba99", "score": "0.49217036", "text": "function enter(req,resp){\n //console.log(\"LogManager enter\");\n logEnter(req);\n}", "title": "" }, { "docid": "b5d3021911ef7f914e4961c65e532e8f", "score": "0.49206272", "text": "function logRequest(request, response, next) {\n\tconsole.log(\"Received a request for: \" + request.url);\n\n\t// don't forget to call next() to allow the next parts of the pipeline to function\n\tnext();\n}", "title": "" }, { "docid": "b5d3021911ef7f914e4961c65e532e8f", "score": "0.49206272", "text": "function logRequest(request, response, next) {\n\tconsole.log(\"Received a request for: \" + request.url);\n\n\t// don't forget to call next() to allow the next parts of the pipeline to function\n\tnext();\n}", "title": "" }, { "docid": "b94d4dbc8d7b72f76293d02280bde975", "score": "0.49109334", "text": "read_logAcessosSave(){\n return \"http://gisred.chilquinta.cl:6443/arcgis/rest/services/Admin/LogAccesos/FeatureServer/1/applyedits\";\n }", "title": "" }, { "docid": "ddc529370ca4f6ed74eb99cc682695e0", "score": "0.4888322", "text": "function listener(request, response) {\n const path = request.options.filter(o => o.name === 'Uri-Path').map(o => o.value).join('/');\n try {\n\thandle(this.rd, path, request, response);\n } catch (err) {\n\tconsole.log(\"CoAP RD server: exception \" + err.stack);\n\tthrow err;\n }\n response.end();\n}", "title": "" }, { "docid": "49e446cffd133e4022b114f111f9be26", "score": "0.48838606", "text": "function GM_log(obj) {\n\tself.GA_log(\"GrimeApe\",obj);\n}", "title": "" }, { "docid": "65bd199f8455db604a780efbd4906bd6", "score": "0.48820758", "text": "function logger(req, res, next) {\n console.log('%s %s', req.method, req.url);\n //always calls next(), so subsequent middleware is invoked\n next();\n}", "title": "" }, { "docid": "746297fd8ec924e01276e2c929e798b3", "score": "0.48808253", "text": "function RESOURCE_LOG(body) {\r\n socket.emit('resourceLog',{ body: body });\r\n}", "title": "" }, { "docid": "012704aa25d9b322cc99659823d092a6", "score": "0.486785", "text": "function twilogUpdateUrl(reg) {\n return \"http://twilog.org/update.cgi?id=\" + tn.value +\n \"&order=&filter=&kind=\" + reg;\n }", "title": "" }, { "docid": "27340ae5cc29a99b70bca39c55c0e446", "score": "0.48611858", "text": "function onRequest(req, res) {\n console.log(req.method + ' ' + req.url);\n}", "title": "" }, { "docid": "f2d944c0c4b35f58cd133e8d88706912", "score": "0.48562503", "text": "function logger(format) {\n format = format || ':method \":url\"';\n \n return async function (ctx, next) {\n const str = format\n .replace(':method', ctx.method)\n .replace(':url', ctx.url);\n \n console.log(str);\n \n await next();\n };\n }", "title": "" }, { "docid": "6154da7b7e1718960d3a425a0e71ea46", "score": "0.48510972", "text": "log (...args) {\n if (this.debug === true) {\n console.log('[OAuth2Server][model]:', ...args)\n }\n }", "title": "" }, { "docid": "fd17656d720049869e3fa00d39e9ce2e", "score": "0.48299527", "text": "function logVariable(target, urltarget) {\n var uritarget = '';\n if (urltarget)\n uritarget = ';' + escape(urltarget)\n addToSearchList('V' + escape(target) + uritarget);\n return true;\n}", "title": "" }, { "docid": "42fc6e2e72109c6786f89ed3efd354e1", "score": "0.48247832", "text": "function logFunction(target, urltarget) {\n var uritarget = '';\n if (urltarget)\n uritarget = ';' + escape(urltarget)\n addToSearchList('F' + escape(target) + uritarget);\n return true;\n}", "title": "" }, { "docid": "b2ee35576ec0b58e3da27e96ebde0926", "score": "0.48189896", "text": "function logging(response){\n console.log(\"response\",response)\n}", "title": "" }, { "docid": "f3bfc6f241d6a13aca68b422930b7bcb", "score": "0.48157012", "text": "logger_() {}", "title": "" }, { "docid": "d28c879defac0b6000fa235cc42eb1e3", "score": "0.47967526", "text": "_logEvent (req, action, id) {\n if (!this.logging)\n return Promise.resolve ();\n\n const event = {\n client: req.accessToken.client,\n user: req.accessToken.account,\n action,\n resource: { id, name: this.name },\n\n request: {\n ip: req.ip,\n url: req.url\n }\n };\n\n return this.ResourceEvent.create (event);\n }", "title": "" }, { "docid": "f586167020fa5f01970efa4fd644aa26", "score": "0.47810417", "text": "function rlog(context, out){\n\tcontext.log(out);\n\tll(out);\n }", "title": "" }, { "docid": "0cf498cf6f4ebd3d3c72a842947a7cf0", "score": "0.4763702", "text": "function initLog() {\n\n console.log('accountsStoreCtrl init');\n }", "title": "" }, { "docid": "cc96adb8d0395b1d9f51301b59573f2c", "score": "0.47614196", "text": "function loggingMiddleware(req, res, next) {\n console.log(`${new Date().toISOString()}: ${req.originalUrl}`)\n next()\n}", "title": "" }, { "docid": "03966f1f67bf849bcbb9b8b5085639ac", "score": "0.47333515", "text": "printRequest(req, res, next) {\n const { method, originalUrl, body } = req;\n\n let msg = `${method} ${originalUrl}`;\n\n if (Object.keys(body).length > 0) { // If it has body\n msg += ` ${JSON.stringify(body)}`; // Include body in log\n }\n\n logger.info(msg);\n\n next();\n }", "title": "" }, { "docid": "47d2750ad3e7938b07bfb011c5d48cf3", "score": "0.473115", "text": "function Logger(req, res, next) {\n res.requestLog = new RequestLog(req);\n res.logAndRender = logAndRender;\n next();\n}", "title": "" }, { "docid": "57d3a410fc298a056bffeb37db926481", "score": "0.47246966", "text": "function log(apiMethod, apiUri, msg) {\n console.log(\"[\" + apiMethod + \"], [\" + apiUri + \"], [\" + msg + \"], [UTC:\" +\n new Date().toISOString().replace(/\\..+/, '') + \"]\");\n }", "title": "" }, { "docid": "57d3a410fc298a056bffeb37db926481", "score": "0.47246966", "text": "function log(apiMethod, apiUri, msg) {\n console.log(\"[\" + apiMethod + \"], [\" + apiUri + \"], [\" + msg + \"], [UTC:\" +\n new Date().toISOString().replace(/\\..+/, '') + \"]\");\n }", "title": "" }, { "docid": "57d3a410fc298a056bffeb37db926481", "score": "0.47246966", "text": "function log(apiMethod, apiUri, msg) {\n console.log(\"[\" + apiMethod + \"], [\" + apiUri + \"], [\" + msg + \"], [UTC:\" +\n new Date().toISOString().replace(/\\..+/, '') + \"]\");\n }", "title": "" }, { "docid": "57d3a410fc298a056bffeb37db926481", "score": "0.47246966", "text": "function log(apiMethod, apiUri, msg) {\n console.log(\"[\" + apiMethod + \"], [\" + apiUri + \"], [\" + msg + \"], [UTC:\" +\n new Date().toISOString().replace(/\\..+/, '') + \"]\");\n }", "title": "" }, { "docid": "57d3a410fc298a056bffeb37db926481", "score": "0.47246966", "text": "function log(apiMethod, apiUri, msg) {\n console.log(\"[\" + apiMethod + \"], [\" + apiUri + \"], [\" + msg + \"], [UTC:\" +\n new Date().toISOString().replace(/\\..+/, '') + \"]\");\n }", "title": "" }, { "docid": "8e1acd5e3204b89198dd348bfe366c1d", "score": "0.47207215", "text": "function debug() {\n _logger2.default.info.apply(_logger2.default, ['shihui_node_proxy'].concat(Array.prototype.slice.call(arguments)));\n}", "title": "" }, { "docid": "48caeb04e8e2f7d014f1988a1fe14488", "score": "0.47102758", "text": "function redirectRegistering() {\n changeRedirectRegister(true);\n }", "title": "" }, { "docid": "f0b3bf01b846741375cce4417b471518", "score": "0.47083792", "text": "Log() {}", "title": "" }, { "docid": "c4b42995948c1d5d3504a1e19e0fb5d8", "score": "0.47079965", "text": "function log(req, res, next) {\n console.log('Logging...');\n console.log(req.body);\n next();\n }", "title": "" }, { "docid": "d3331ff6637b0299f880bf9b55efb0b6", "score": "0.47037384", "text": "log(string) {\n if (this.config.debug) {\n util.log(`[rethinkdb]: ${string}`);\n }\n }", "title": "" }, { "docid": "5104af0fb6836e6f9b977124e01890a4", "score": "0.47036582", "text": "logRequest(request) {\n if(!request.headers) {\n return;\n }\n\n let context = new Context(request);\n let level = context.hasErrors() ? 'error' : 'info';\n\n this.log(level, request.method.toUpperCase() + ' ' + request.url.path, { type: 'request' }, context);\n }", "title": "" }, { "docid": "20069d63a828d12fbdd45be410c2f664", "score": "0.47025403", "text": "function logConstant(target, urltarget) {\n var uritarget = '';\n if (urltarget)\n uritarget = ';' + escape(urltarget)\n addToSearchList('A' + escape(target) + uritarget);\n return true;\n}", "title": "" }, { "docid": "e5617014f481b49f9ad70e97d85c5f2a", "score": "0.46847227", "text": "log(message) {\n\t\t\t// Send an HTTP request\n\t\t\tconsole.log(message);\n\t\n\t\t\t// Raise an event\n\t\t\t// instead of using the emitter object like on line 35 we use 'this'\n\t\t\tthis.emit('messageLogged', {id: 1, url: 'http://'});\n\t\n\t\t}", "title": "" }, { "docid": "a1f5fa326db3f23df6c6b297243723b2", "score": "0.46691865", "text": "enterRoute (req, path) {\n req._datadog.paths.push(path)\n }", "title": "" }, { "docid": "7f325a3da7bf852d5124e9b96d790a10", "score": "0.4664903", "text": "function fbLog(name, value) {}", "title": "" }, { "docid": "061c1fcf429f347cffd285db8c792db5", "score": "0.46566972", "text": "function u(e,t,n){if(n&&n.dispatchConfig.registrationName){var o=n.dispatchConfig.registrationName,r=j(e,o);r&&(n._dispatchListeners=h(n._dispatchListeners,r),n._dispatchInstances=h(n._dispatchInstances,e))}}", "title": "" }, { "docid": "b140a36edcabd495d60a6bf1f6659e81", "score": "0.46510243", "text": "register(method, path, handlersChain) {\n\t\tconst methodRegistry = this.routeRegistry[method.toUpperCase()];\n\n\t\tif (!methodRegistry) {\n\t\t\tthrow new Error('Not appropriate method for route registry');\n\t\t}\n\n\t\tif (!Array.isArray(handlersChain)) {\n\t\t\tthrow new Error('handlersChain should be an array');\n\t\t}\n\n\t\tmethodRegistry.push({ path, handlersChain });\n\t}", "title": "" }, { "docid": "d4bda2fea4f23e058b806be37a462cdd", "score": "0.46474838", "text": "register (hash, callback, callbackError) {\n this.post(this.getURL('register'),\n {d: hash},\n path => callback(path),\n error => callbackError(error)\n )\n }", "title": "" }, { "docid": "6452a810a4d4e3dc59a191dc03e713d8", "score": "0.46420723", "text": "function Router() {\n logReporter = new LogReporter(TEMPLATE_PATH);\n}", "title": "" }, { "docid": "bfc34e2e11beb0dd151bc0c360c154a7", "score": "0.46237534", "text": "function log() {\n const toSend = {\n food: foodName,\n date: dateStamp\n };\n\n let config = {\n headers: {\n \"Content-Type\": \"application/json\",\n 'Access-Control-Allow-Origin': '*',\n }\n }\n\n axios.post(\n \"http://localhost:4567/logInfo\",\n toSend,\n config\n )\n .then(response => {\n console.log(response.data[\"logInfo\"])\n setMessage(response.data[\"logInfo\"]);\n setCustom(response.data[\"custom\"]);\n\n })\n\n .catch(function (error) {\n console.log(error);\n });\n }", "title": "" }, { "docid": "fa64b4c90eb68448a9fcca05c7e23b74", "score": "0.46202734", "text": "startRequestLog(req, res) {\n map.set(req, date.now());\n const finish = () => {\n const ip = req.headers['x-real-ip'];\n const apiKey = req.query.api_key || '';\n const tsp = map.get(req);\n const len = tsp\n ? date.now() - tsp\n : '';\n logger.log(`${ip} ${apiKey} ${req.method} ${req.url} ${res.statusCode} ${len}`);\n };\n res._oldEnd = res.end;\n res._oldSend = res.send;\n res.end = function () {\n res._oldEnd();\n finish();\n };\n res.send = function (...args) {\n res.end = res._oldEnd;\n res._oldSend(...args);\n finish();\n };\n }", "title": "" }, { "docid": "fcfe6fd335a06f5eb7b67afce024d0f3", "score": "0.4610548", "text": "function documentSaved(e){\n\tconsole.log(e.path);\n}", "title": "" }, { "docid": "4cea16d8c846e07423155a7cbe977c90", "score": "0.4604234", "text": "function logAction(data)\n{\n\tdata['url'] = window.location.href;\n\n\t$.ajaxSetup({\n headers: {\n \t'X-CSRF-TOKEN': $('meta[name=\"csrf-token\"]').attr('content'),\n \t'Content-type': 'application/json'\n }\n\t});\n\n $.ajax({\n type:\"POST\",\n url: \"/api/action/log\",\n dataType: \"json\",\n data: JSON.stringify(data),\n processData: false,\n success: function(response) {\n\n \tif (response.meta.success)\n \t{\n \t\t// Logged\n\t\t\t}\n \telse\n \t{\n \t\t// Failed\n \t}\n },\n error: function(response) {\n \t// Failed\n }\n });\n}", "title": "" }, { "docid": "4cdf00db342bdbe8074c9c1a2d7c16bc", "score": "0.46019676", "text": "function logIncomingRequest(req, res, next) {\n const logObject = {\n url: req.url,\n params: req.params,\n body: req.body\n };\n \n loggerService.createLog(logObject);\n next();\n}", "title": "" }, { "docid": "b480d29580120470325d976868aaa60b", "score": "0.460174", "text": "function Log() {}", "title": "" }, { "docid": "b3c5e54afe78a7ca43b9a9708c592f33", "score": "0.45991927", "text": "function log(req, res, next) {\n console.log(\"Logging...\");\n next();\n}", "title": "" }, { "docid": "7f6416308d22b36304d3f93da096e48a", "score": "0.45859087", "text": "log(kind, msg, data){ this.logger(kind, msg, data) }", "title": "" }, { "docid": "7f6416308d22b36304d3f93da096e48a", "score": "0.45859087", "text": "log(kind, msg, data){ this.logger(kind, msg, data) }", "title": "" }, { "docid": "7f6416308d22b36304d3f93da096e48a", "score": "0.45859087", "text": "log(kind, msg, data){ this.logger(kind, msg, data) }", "title": "" }, { "docid": "16478616c88b74f618af4db8e3c2f765", "score": "0.45813814", "text": "function onSuccessRegSoup(param) {\n\tlogToConsole()(\"onSuccessRegSoup: \" + param);\n}", "title": "" }, { "docid": "dc8e31820ab27457556929666ad35147", "score": "0.45702574", "text": "function register() {\n var handlers = Recorder.eventHandlers[eventKey];\n var listener = function(event) {\n for (var i = 0; i < handlers.length; i++) {\n handlers[i].call(self, event);\n }\n };\n this.window.document.addEventListener(eventName, listener, capture);\n this.window.onpopstate = function(event) {\n //when user click goback\n console.log(\"onpopstate~~~~~~~user click goback~~~~~~~~~~~\");\n };\n this.eventListeners[eventKey] = listener;\n }", "title": "" }, { "docid": "77a8a8899baa85654d39b3bb6bf0452f", "score": "0.45513442", "text": "function _log(title, detail) {\n var logType = 'debug';\n _nlapiLogExecution(logType, title, detail)\n\n}", "title": "" }, { "docid": "95b5678d2becee8ed62edbcf11f7b8e3", "score": "0.4550339", "text": "isrutl(g) {\n console.warn(g);\n const log = this.http.post(\"/api/log.php\", { data: '', PID: this.user.PID, PID_ins: g.PID, action: 'insutil' }, this.httpOptions);\n log.subscribe();\n return this.http.post(\"/api/isrutl.php\", g, this.httpOptions).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__[\"catchError\"])(this.handleError));\n }", "title": "" }, { "docid": "e5224b163b12109d41c57625ad7c1657", "score": "0.45495388", "text": "function logAndRender( /*passthrough arguments*/ ) {\n this.requestLog.startAction('render');\n this.render.apply(this, arguments);\n this.requestLog.endAction('render');\n console.log(this.requestLog);\n}", "title": "" }, { "docid": "4f71727cc87c0e1910d7b28ffcdbd06d", "score": "0.4543186", "text": "function _storeCallToHistory(requestUrl){\n history.push(requestUrl)\n }", "title": "" }, { "docid": "55d90d6dcad76e53c54d8eaf8875705d", "score": "0.4535944", "text": "function saveReferralData(data) {\n // set the event type\n data.type = \"REFERRAL_DATA\";\n // call AWS gateway endpoint\n $log.log('cloud service sending referral data:', data);\n // send the data to the unified aws storage endpoint\n saveData(data);\n }", "title": "" } ]
d276d6d36717f694f10935ad42565ba3
We use the async keyword to define functions that handle asynchronous operations
[ { "docid": "1b3141312e34d5eb7c0a28848eeb694d", "score": "0.62050825", "text": "async function sayHi() {\n return 'Hi'; // implicitylyt returning a Promise\n}", "title": "" } ]
[ { "docid": "59dd7372f873b7a43ad7103e6a55fbdd", "score": "0.79257077", "text": "async asyncMethod() {}", "title": "" }, { "docid": "d42c88961a882b6f0680edde240ae533", "score": "0.7704235", "text": "async function asyncFunction() {\n return \"hello\"\n}", "title": "" }, { "docid": "6bc8f846eedbd6d5aa6ebfddb8c3851f", "score": "0.76129633", "text": "async function AsyncFunctionInstance() {} // eslint-disable-line no-empty-function", "title": "" }, { "docid": "5691d0ad7a1e356d99f6eaa169ddea52", "score": "0.7206314", "text": "async test() {\n //some testing\n }", "title": "" }, { "docid": "6d82e7f65823df1545abb87249f7112d", "score": "0.7088649", "text": "function async(_function) {\r\n\tgetIt().async(function(t) {\r\n\t\t_function();\r\n\t});\r\n}", "title": "" }, { "docid": "b989262fc44b309d80fbe887ea43ca69", "score": "0.70676816", "text": "async function asyncFunc() {\n return 123;\n}", "title": "" }, { "docid": "51d637ed27139847b7985e3cbbf5d1a1", "score": "0.69315046", "text": "async() {\n async = true;\n }", "title": "" }, { "docid": "c20f2f33df6ff4d87602f134aa7b34e8", "score": "0.690003", "text": "async function myFunc() {\n\t// function body here\n}", "title": "" }, { "docid": "794624ddcdaf051a58b264db4880d72d", "score": "0.6894639", "text": "async function asyncFunctionForProto() {}", "title": "" }, { "docid": "777f2d9e0750ae6483c2d44be13d084e", "score": "0.6887734", "text": "async function myFunc() {\n // Function body here\n}", "title": "" }, { "docid": "a8cf1e52b653d05c1a36060dfbcf86bb", "score": "0.6787578", "text": "async function performAPICalls() { }", "title": "" }, { "docid": "db94bff0b1ec31a260341d9a99ddd111", "score": "0.67648757", "text": "async function greet(){\n return \"Hello!\"\n}", "title": "" }, { "docid": "5dca12fce487ca2b7fecde8bf443476b", "score": "0.6714819", "text": "function AsyncAjax() {}", "title": "" }, { "docid": "a26dead8483d2e480738e1581d974e13", "score": "0.67096996", "text": "async function hello() { return \"Hello\" }", "title": "" }, { "docid": "f72d7a92528728b8b09933e2d3876660", "score": "0.6672935", "text": "_$async() {\n super._$async();\n\n this._value.async = this._node.async;\n }", "title": "" }, { "docid": "df0d5c9a5268d9bbecc4d30cad9c351f", "score": "0.6669144", "text": "async function data() {\n\n}", "title": "" }, { "docid": "3656103a3a7be76d54c35abb61b50e27", "score": "0.6648964", "text": "async 0(arg) {}", "title": "" }, { "docid": "065b57a4a9f23f89c0aef6228b8cab93", "score": "0.6642816", "text": "static async staticAsyncMethod() {}", "title": "" }, { "docid": "0115de326c7f908fa9a8e816167a3284", "score": "0.6607493", "text": "async function getData() {\n\n // TODO\n\n}", "title": "" }, { "docid": "f859fa8029c02b7483d10cb3343bf104", "score": "0.6589626", "text": "async function foo() {\n return 42;\n}", "title": "" }, { "docid": "6960fe98564a9fd363408d36084265e3", "score": "0.65758204", "text": "function x() { async(() => {}) }", "title": "" }, { "docid": "0aea3ebc37aa9c1d844a04741331e7c2", "score": "0.65373665", "text": "async function asyncFunc() {\n console.log('asyncFunc()'); // (A)\n return 'abc';\n}", "title": "" }, { "docid": "dfb1f7751117a56e8398ae0750f2699a", "score": "0.6516185", "text": "function async(func) {\n setTimeout( func, 1 );\n }", "title": "" }, { "docid": "28594f6b6242b5bf4900911e88d039b1", "score": "0.6495423", "text": "async function f() {}", "title": "" }, { "docid": "be332b87453e82d3bf0bb2f3ea0e857d", "score": "0.6485238", "text": "async function getPromise(){} // will always return a promise using 'async'", "title": "" }, { "docid": "eadbd954ca5af85361809e48540f855a", "score": "0.6468974", "text": "async function v() {\n\treturn async function() { return 11 }\n}", "title": "" }, { "docid": "558d5bbe5202340cc5e49bc64a1d2c5d", "score": "0.6461158", "text": "async function fun1(){\r\n console.log(\"This is printing from Async function\");\r\n return Promise.resolve(\"Sachin\");\r\n}", "title": "" }, { "docid": "25a0f008cb7b3d28405f97affe0bf860", "score": "0.64419216", "text": "evaluateAsync(){\n // stub...\n }", "title": "" }, { "docid": "ee93972ccfeaf3265ed6a0631811b2a7", "score": "0.64008063", "text": "async function asyncNonConstructorDecl() {}", "title": "" }, { "docid": "bece122be2809247516c26061dff19c9", "score": "0.6388551", "text": "async function miFuncionConPromesa() {\n return 'saludos con promesa y async';\n}", "title": "" }, { "docid": "8d5cafac9ee32c5f43fa2ba6972e988b", "score": "0.6388344", "text": "async function asyncFuncWrap() {\n setLoading(true)\n await asyncFunc()\n setLoading(false)\n }", "title": "" }, { "docid": "8693acd77908752744a395a8deed2351", "score": "0.6388325", "text": "async() {\n\n // Report beginning of async code execution to Bridge Agent.\n this.bridgeAgentPort.postMessage({ type: 'async' });\n\n }", "title": "" }, { "docid": "f0f1e8d396bc5c30931af26cd89c5e87", "score": "0.63849545", "text": "function asyncHandler(cb){\n\treturn async (req,res,next) =>{\n\t\ttry{\n\t\t\tawait cb(req,res,next);\n\t\t} catch(err){\n\t\t\tnext(err);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "97d4f953ca167209d78134898601561f", "score": "0.635303", "text": "anticipate(fAsynchronousFunction){this.operationQueue.push(fAsynchronousFunction);this.checkQueue();}", "title": "" }, { "docid": "30a3f1cb0852758d5ef9379a31efcaa6", "score": "0.63467574", "text": "function doAsync() { \n return Promise.resolve('resolve called in promises....'); \n }", "title": "" }, { "docid": "b6aa2754070c0731a5412d0a207cea78", "score": "0.6346233", "text": "async function f(){\n\n return 1\n}", "title": "" }, { "docid": "8c2f9230060e42a259f323fb22472185", "score": "0.6333743", "text": "async function hello2() {\n return 'hello2';\n}", "title": "" }, { "docid": "3a0c9c9e700e8b878e136b74886486af", "score": "0.6332404", "text": "async 0() {}", "title": "" }, { "docid": "87b3279976ce61b7412e6e30f145e266", "score": "0.63208514", "text": "cmd_await_all() {}", "title": "" }, { "docid": "a85b0f2a01c5005d8c15d6ef8cf48bed", "score": "0.631766", "text": "function doSomeWork(callback) {\n // working ... async is going in this line \n callback(\"Hello World\");\n}", "title": "" }, { "docid": "70513f79eb99ec43595e8aa851de3156", "score": "0.63122493", "text": "async function someAsync() {\n const foo = await makeAsync('foo', 1000);\n console.log(foo); // foo\n\n const bar = await makeAsync('bar', 1000);\n console.log(bar); // foo\n\n const baz = await makeAsync('baz', 1000);\n console.log(baz); // foo\n\n console.log('completed');\n}", "title": "" }, { "docid": "419aeb12418f52e45f4399d4b12bc978", "score": "0.62989974", "text": "async function greet() {\n return \"Hello!\"\n}", "title": "" }, { "docid": "4c4286eb7569e6f690565c497cfc53f3", "score": "0.62968093", "text": "async function fn() {\n return 'hello'; // wrapped in a promise\n}", "title": "" }, { "docid": "7f68ecea5a8609696884f220845d5baa", "score": "0.6294575", "text": "function async(gen) {\n return function() {\n return task(gen, arguments);\n }\n}", "title": "" }, { "docid": "2aaf8ba1b11ae403fe32b6720be5388d", "score": "0.62918717", "text": "function asyncHandler(cb) {\n return async(req, res, next) => {\n try {\n await cb(req,res,next);\n } catch (error) {\n next(error);\n }\n } \n }", "title": "" }, { "docid": "bd670accf37a68d1f878179ebff37224", "score": "0.6264391", "text": "function asyncfunc( lib, time ) {\n let f = addOnRegular;\n if ( lib == 'nbind') {\n f = addOnNbind;\n }\n else if ( lib === 'nan' ) {\n f= addOnNan;\n }\n\n return new Promise(( resolve, reject ) => {\n f.longRunFunction( time, ( err, res ) => {\n if( err ) {\n reject( err );\n }\n else {\n resolve( res );\n }\n });\n });\n}", "title": "" }, { "docid": "8c59221232425b1edc449761c1a45e1c", "score": "0.6261891", "text": "function w() {\n\treturn async function() { return 5 }\n}", "title": "" }, { "docid": "49a2cbbed56c4d2c4ecf5277b1d91f5d", "score": "0.6257801", "text": "function qAsync(){\n this.doAsync = function(){\n let promise = new Promise((resolve, reject) => {\n setTimeout(() => resolve(\"qAsync function works :)\"), 11500)\n });\n return promise\n }\n this.exec = async function(){\n let result = await this.doAsync()\n alert(result)\n }\n this.desc = \"'doAsync' function returns a Promise, while 'exec' fucntion waits for it to resolve and executes it.\"\n}", "title": "" }, { "docid": "37b07ddca80ceae17da41692a41344b4", "score": "0.6243446", "text": "function asyncTest() {\n\n //async function\n (async function () {\n\n //call \n var prom_test = util.promisify(exampleFunction);\n\n //put 3 as parameter //catch error if it returns error\n let result = await prom_test(3).catch((e) => console.log(e))\n\n console.log(result)\n\n })();\n\n}", "title": "" }, { "docid": "72f180ba0660d854f770d3b2072101d8", "score": "0.62001574", "text": "async function miAsyncFunction() {\n try {\n let misPromesas = [];\n for (let i = 0; i < 10; i++) {\n misPromesas.push(await fabricaDePromesas(i));\n }\n console.log('variable misPromesas al interior de la async function', misPromesas);\n return misPromesas;\n\n //const miPromesa1 = await fabricaDePromesas(1);\n //console.log('valor de miPromesa1', { miPromesa1 });\n //return miPromesa1;\n } catch (error) {\n //console.log('hubo un error');\n //return error;\n throw error;\n }\n}", "title": "" }, { "docid": "1ce3b706a5999124a812ac04d5909c88", "score": "0.6196324", "text": "async processFile(hndl) {\n }", "title": "" }, { "docid": "1ce3b706a5999124a812ac04d5909c88", "score": "0.6196324", "text": "async processFile(hndl) {\n }", "title": "" }, { "docid": "6a8ce0a8103ac5d0e1f3b7e8352281e2", "score": "0.61610484", "text": "async function z() {\n\tsetImmediate(function(){\n\t\tasync return function ab() { return 3 } ;\n\t}) ;\n}", "title": "" }, { "docid": "b4d6e292df16bbfe6f1b721be8ce4f15", "score": "0.6160043", "text": "async function asynCall(){\n await prom().then((data)=>console.log(data));\n }", "title": "" }, { "docid": "dc2312c30023d2e7989a5935cfeaad9c", "score": "0.61527634", "text": "async function asyncFunc () {\n throw new Error('Problem');\n}", "title": "" }, { "docid": "e4f4963c20e82d7cc0efa48c24ecb744", "score": "0.61517423", "text": "async function asyncFuncExample() {\n\tlet resolvedValue = await myPromise();\n\tconsole.log(resolvedValue);\n}", "title": "" }, { "docid": "fc1b426bc0dfbb9d6cdfacacf05efc36", "score": "0.61483836", "text": "async test$fn8() {}", "title": "" }, { "docid": "002af87a2f9cbc9f2f6fd76c5654150c", "score": "0.6143956", "text": "async function asyncFunc() {\n return Promise.resolve(123);\n}", "title": "" }, { "docid": "9121cf2f412bb1bf944b77ec9a58dc93", "score": "0.61320114", "text": "function asyncHandler (cb) {\n return async (req, res, next) => {\n try {\n await cb(req, res, next);\n } catch (err) {\n next(err);\n }\n };\n }", "title": "" }, { "docid": "11219687a6d8ace8857b25ef37b833b0", "score": "0.6129145", "text": "function GetAsyncData1()\n{\n GetData().then(x => console.log(x))\n}", "title": "" }, { "docid": "665750eea716a877c8547ceb630f8d92", "score": "0.6117812", "text": "async function asyncFunction() {\n let conn;\n try {\n conn = await pool.getConnection();\n await conn.query(sql);\n rows = await conn.query(`Select name FROM people`);\n rows.forEach(element => {\n html = html + `${element.name},`;\n });\n } catch (err) {\n throw err;\n } finally {\n if (conn) return conn.end();\n }\n }", "title": "" }, { "docid": "8a128e5bdf28eb8eae1ae75ef23e479f", "score": "0.6100728", "text": "function asyncBoucle() {\n return new Promise(\n function (resolve, reject) {\n\n if(test){\n\n resolve(execute);\n\n }else{\n reject(err);\n }\n \n }\n );\n}", "title": "" }, { "docid": "8c057693ea896398d7213812dd350e1e", "score": "0.6099849", "text": "static liftIO(io) { return new AsyncM(p => new Promise(io)); }", "title": "" }, { "docid": "2e1f7b62db0c9bdc4fbf8b2510c60d67", "score": "0.60807604", "text": "async function fetchingMyData(url){ //async will say \"this will be execulted asyncronously and i will use \"await\" to retrive data from somewhere\"\n \n const response = await fetch(url); //this constant will receive the function fetch, and that await will wait will a data be retrived from that url\n const jsonBody = await response.json();// after that data be retrived, we can now turn it a JSON data. Remember that we can use awai only with promises and with async functions\n console.log(jsonBody);\n\n return jsonBody;\n}", "title": "" }, { "docid": "3d3b234f737bfe3d3413d82160164184", "score": "0.60700846", "text": "function async(f) {\n return function () {\n var argsToForward = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n argsToForward[_i] = arguments[_i];\n }\n __WEBPACK_IMPORTED_MODULE_0__promise_external__[\"c\" /* resolve */](true).then(function () {\n f.apply(null, argsToForward);\n });\n };\n}", "title": "" }, { "docid": "3d3b234f737bfe3d3413d82160164184", "score": "0.60700846", "text": "function async(f) {\n return function () {\n var argsToForward = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n argsToForward[_i] = arguments[_i];\n }\n __WEBPACK_IMPORTED_MODULE_0__promise_external__[\"c\" /* resolve */](true).then(function () {\n f.apply(null, argsToForward);\n });\n };\n}", "title": "" }, { "docid": "3d3b234f737bfe3d3413d82160164184", "score": "0.60700846", "text": "function async(f) {\n return function () {\n var argsToForward = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n argsToForward[_i] = arguments[_i];\n }\n __WEBPACK_IMPORTED_MODULE_0__promise_external__[\"c\" /* resolve */](true).then(function () {\n f.apply(null, argsToForward);\n });\n };\n}", "title": "" }, { "docid": "3d3b234f737bfe3d3413d82160164184", "score": "0.60700846", "text": "function async(f) {\n return function () {\n var argsToForward = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n argsToForward[_i] = arguments[_i];\n }\n __WEBPACK_IMPORTED_MODULE_0__promise_external__[\"c\" /* resolve */](true).then(function () {\n f.apply(null, argsToForward);\n });\n };\n}", "title": "" }, { "docid": "ff8fa5f237ad00f1e4a8b1453fb2ab58", "score": "0.6055473", "text": "function asyncHandler(cb){\n return async(req, res, next) => {\n try {\n await cb(req, res, next)\n } catch(error){\n next(error)\n }\n }\n}", "title": "" }, { "docid": "b7ac310ed5497ed0c8602ace6359bd0c", "score": "0.60422194", "text": "function myAsyncFunction(callback){\n setTimeout(function () {\n callback(\"blah\");\n },50);\n}", "title": "" }, { "docid": "ad8f794b6860171881f08f29a6e74d6b", "score": "0.60398674", "text": "async \":test4\"() {}", "title": "" }, { "docid": "6956640eaeed4bd602dd42b47ee0c1d8", "score": "0.60301715", "text": "function asyncHandler(cb){\n return async(req, res, next) => {\n try {\n await cb(req, res, next)\n } catch(error){\n next(error);\n }\n }\n}", "title": "" }, { "docid": "af622a357da610d0da3cfb82325e4671", "score": "0.60301244", "text": "async $test5() {}", "title": "" }, { "docid": "e4b05af0f59b4b5e46e82fa39c527800", "score": "0.6024762", "text": "function async(f) {\n return function () {\n var argsToForward = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n argsToForward[_i] = arguments[_i];\n }\n __WEBPACK_IMPORTED_MODULE_0__promise_external__[\"b\" /* resolve */](true).then(function () {\n f.apply(null, argsToForward);\n });\n };\n}", "title": "" }, { "docid": "e01c098ea304bcf830e161a140c02dec", "score": "0.60198987", "text": "async function cargarDatos(){\n //await sobrecargaArticulos()\n //await sobrecargaArticulos2()\n await sobrecargaArticulos3()\n}", "title": "" }, { "docid": "a9d2073ca39f67780cf332db2dd5317e", "score": "0.5994056", "text": "async function usingPromiseCath() {\n\tlet resolveValue = await asyncFunction('thing that will fail');\n}", "title": "" }, { "docid": "686d123344707e8e003d45f2d20d7090", "score": "0.59824306", "text": "async function GetHouseStatus() \n{\n return houseAPI.getStatus();\n}", "title": "" }, { "docid": "311997a1854e2b6cb59081059a5e8195", "score": "0.596793", "text": "async function getdata(){\n let response = await test();\n console.log(response)\n}", "title": "" }, { "docid": "59366be859320f446dff3cddbb80711d", "score": "0.596109", "text": "async function findAllSongs(){\n return await model.getAllSongs();\n}", "title": "" }, { "docid": "c64c6c82c662384c4903fe1fadb03be3", "score": "0.5958572", "text": "function asyncHandler(cb){\n return async(req, res, next) => {\n try {\n await cb(req, res, next);\n \n } catch(error){\n res.status(500).send(error);\n }\n }\n}", "title": "" }, { "docid": "9a84331d193b0a6e0a41d1ac99bcb5e4", "score": "0.59518176", "text": "async function hellfun(){\n\n console.log(\"I am hello function \");\n \n var result= await settimefunc();\n \n console.log(result);\n}", "title": "" }, { "docid": "c55c5c4628ae8a87d650be61b90a9826", "score": "0.5950733", "text": "function handleAsync(async) {\n if (async && async.then) {\n handlePromise(async);\n } else if (typeof async === 'function') {\n handleThunk(async);\n } else {\n next(new Error(`Invalid yield ${async}`), true);\n }\n }", "title": "" }, { "docid": "7b41c4cf0896bd54d522e182df6a7814", "score": "0.59504527", "text": "async function main()\n{\n\t// \n\t// Superuser gets credentials\n\t//\n\n\t//\n\t// John creates admin account\n\t//\n\n\t//\n\t// Jane creates student account\n\t//\n\n\t//\n\t// John signs into his account\n\t//\n\n\t//\n\t// John creates 'class A'\n\t//\n}", "title": "" }, { "docid": "c87ccd226c290d290dc338a8d1d2df50", "score": "0.594457", "text": "async function q9() {\n const object = await getJson()\n // console.log(object)\n}", "title": "" }, { "docid": "298c7818b220abf7a23d7540880d8ff7", "score": "0.59286815", "text": "async function hello() {\n //throw bakal langsung reject si promisenya \n throw new Error('ada problem')\n return 'here my request'\n}", "title": "" }, { "docid": "be296e5c47b3fa30d1f1b36099a19bbf", "score": "0.59256274", "text": "async function test() {\n const addAnimesAPI = await loopAnimeList();\n}", "title": "" }, { "docid": "1e053628fac24cb18699c6cdf06eff6a", "score": "0.5921792", "text": "async function testAsync() {\n try {\n const data = await asyncWithPromise();\n console.log(\"data\", data);\n } catch (e) {\n console.log(\"err\", err);\n }\n}", "title": "" }, { "docid": "eb80568b47811fd59419c87c58c7c7bc", "score": "0.5920595", "text": "async function authenticateAsync(username, password, callback){\n\tvar userInfo = new Object();\n\tuserInfo.username = username;\n\tuserInfo.password = password;\n var res;\n await userActions.authenticateAsync(userInfo, function(res){\n console.log(res);\n callback(res);\n });\n\n\n}", "title": "" }, { "docid": "fb73065e733f5d579347ff6759f42bc4", "score": "0.5920293", "text": "function asyncHandler(cb){\n return async(req, res, next) => {\n try {\n await cb(req, res, next)\n } catch(error){\n console.log(error);\n next(error);\n }\n }\n}", "title": "" }, { "docid": "c76c7b08b69e87c0d3f09c958a107275", "score": "0.59162617", "text": "async init() {}", "title": "" }, { "docid": "9d2d0433cd5ec0133b346e75222493ff", "score": "0.5915115", "text": "async init () {}", "title": "" }, { "docid": "a971f05bbf478da3f302d672a64726dd", "score": "0.59143466", "text": "async function application2() {\n let sum = await addNumber(3, 4);\n console.log(sum);\n}", "title": "" }, { "docid": "4536f3b91bdbbb1a9f57ea1a84b76e15", "score": "0.59051204", "text": "async function getData(query) {\n // AJAX Request here;\n}", "title": "" }, { "docid": "c57b828cbf931572bc2f3de0cd153233", "score": "0.58888334", "text": "async function main () {\r\n let output = await add(10, 20);\r\n let output1 = await sub(30, 20)\r\n console.log(\"Output\", output, output1);\r\n}", "title": "" }, { "docid": "e475452da23a42ac921c64bb5171ff3f", "score": "0.58873767", "text": "async function aNamedFunction() {}", "title": "" }, { "docid": "fc97114698742ca4e2d57f9d4ac759e5", "score": "0.5887292", "text": "async function fetchUser() {\n return 'ellie';\n}", "title": "" }, { "docid": "e0c088d8893aacc7bdae1cde0fa266d4", "score": "0.58822817", "text": "function asyncContext(name, fn) {\n return instrumentAsyncContext(fn, name)();\n}", "title": "" }, { "docid": "e0c088d8893aacc7bdae1cde0fa266d4", "score": "0.58822817", "text": "function asyncContext(name, fn) {\n return instrumentAsyncContext(fn, name)();\n}", "title": "" }, { "docid": "67e69eaa9fb4a8bfda322148aa36ffa6", "score": "0.588099", "text": "async function test(){\n var res = await fsPromises.readFile(\"test.txt\",'utf-8');\n console.log(\"the result of asynchronous function is \", res)\n}", "title": "" }, { "docid": "7d3b4456b083da29b2a596b03979cb95", "score": "0.58791053", "text": "async function first(){\n return \"We did it!\";\n}", "title": "" } ]
710e7ff24239c5d5fdb05b4617861c49
(C) 19952013 Jeanloup Gailly and Mark Adler (C) 20142017 Vitaly Puzrin and Andrey Tupitsin This software is provided 'asis', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution.
[ { "docid": "428d806bfe0c33e00f07f55891661958", "score": "0.0", "text": "function ZStream() {\n /* next input byte */\n this.input = null; // JS specific, because we have no pointers\n this.next_in = 0;\n /* number of bytes available at input */\n this.avail_in = 0;\n /* total number of input bytes read so far */\n this.total_in = 0;\n /* next output byte should be put there */\n this.output = null; // JS specific, because we have no pointers\n this.next_out = 0;\n /* remaining free space at output */\n this.avail_out = 0;\n /* total number of bytes output so far */\n this.total_out = 0;\n /* last error message, NULL if no error */\n this.msg = ''/*Z_NULL*/;\n /* not visible by applications */\n this.state = null;\n /* best guess about the data type: binary or text */\n this.data_type = 2/*Z_UNKNOWN*/;\n /* adler32 value of the uncompressed data */\n this.adler = 0;\n}", "title": "" } ]
[ { "docid": "fa54cf2238354fc1447177efb8296d61", "score": "0.5683079", "text": "function g5(){return typeof window>\"u\"&&(self.window=self),function(n){var e={parse:function(r){var s=e._bin,o=new Uint8Array(r);if(s.readASCII(o,0,4)==\"ttcf\"){var a=4;s.readUshort(o,a),a+=2,s.readUshort(o,a),a+=2;var l=s.readUint(o,a);a+=4;for(var c=[],h=0;h<l;h++){var d=s.readUint(o,a);a+=4,c.push(e._readFont(o,d))}return c}return[e._readFont(o,0)]},_readFont:function(r,s){var o=e._bin,a=s;o.readFixed(r,s),s+=4;var l=o.readUshort(r,s);s+=2,o.readUshort(r,s),s+=2,o.readUshort(r,s),s+=2,o.readUshort(r,s),s+=2;for(var c=[\"cmap\",\"head\",\"hhea\",\"maxp\",\"hmtx\",\"name\",\"OS/2\",\"post\",\"loca\",\"glyf\",\"kern\",\"CFF \",\"GPOS\",\"GSUB\",\"SVG \"],h={_data:r,_offset:a},d={},p=0;p<l;p++){var m=o.readASCII(r,s,4);s+=4,o.readUint(r,s),s+=4;var x=o.readUint(r,s);s+=4;var v=o.readUint(r,s);s+=4,d[m]={offset:x,length:v}}for(p=0;p<c.length;p++){var _=c[p];d[_]&&(h[_.trim()]=e[_.trim()].parse(r,d[_].offset,d[_].length,h))}return h},_tabOffset:function(r,s,o){for(var a=e._bin,l=a.readUshort(r,o+4),c=o+12,h=0;h<l;h++){var d=a.readASCII(r,c,4);c+=4,a.readUint(r,c),c+=4;var p=a.readUint(r,c);if(c+=4,a.readUint(r,c),c+=4,d==s)return p}return 0}};e._bin={readFixed:function(r,s){return(r[s]<<8|r[s+1])+(r[s+2]<<8|r[s+3])/65540},readF2dot14:function(r,s){return e._bin.readShort(r,s)/16384},readInt:function(r,s){return e._bin._view(r).getInt32(s)},readInt8:function(r,s){return e._bin._view(r).getInt8(s)},readShort:function(r,s){return e._bin._view(r).getInt16(s)},readUshort:function(r,s){return e._bin._view(r).getUint16(s)},readUshorts:function(r,s,o){for(var a=[],l=0;l<o;l++)a.push(e._bin.readUshort(r,s+2*l));return a},readUint:function(r,s){return e._bin._view(r).getUint32(s)},readUint64:function(r,s){return 4294967296*e._bin.readUint(r,s)+e._bin.readUint(r,s+4)},readASCII:function(r,s,o){for(var a=\"\",l=0;l<o;l++)a+=String.fromCharCode(r[s+l]);return a},readUnicode:function(r,s,o){for(var a=\"\",l=0;l<o;l++){var c=r[s++]<<8|r[s++];a+=String.fromCharCode(c)}return a},_tdec:typeof window<\"u\"&&window.TextDecoder?new window.TextDecoder:null,readUTF8:function(r,s,o){var a=e._bin._tdec;return a&&s==0&&o==r.length?a.decode(r):e._bin.readASCII(r,s,o)},readBytes:function(r,s,o){for(var a=[],l=0;l<o;l++)a.push(r[s+l]);return a},readASCIIArray:function(r,s,o){for(var a=[],l=0;l<o;l++)a.push(String.fromCharCode(r[s+l]));return a},_view:function(r){return r._dataView||(r._dataView=r.buffer?new DataView(r.buffer,r.byteOffset,r.byteLength):new DataView(new Uint8Array(r).buffer))}},e._lctf={},e._lctf.parse=function(r,s,o,a,l){var c=e._bin,h={},d=s;c.readFixed(r,s),s+=4;var p=c.readUshort(r,s);s+=2;var m=c.readUshort(r,s);s+=2;var x=c.readUshort(r,s);return s+=2,h.scriptList=e._lctf.readScriptList(r,d+p),h.featureList=e._lctf.readFeatureList(r,d+m),h.lookupList=e._lctf.readLookupList(r,d+x,l),h},e._lctf.readLookupList=function(r,s,o){var a=e._bin,l=s,c=[],h=a.readUshort(r,s);s+=2;for(var d=0;d<h;d++){var p=a.readUshort(r,s);s+=2;var m=e._lctf.readLookupTable(r,l+p,o);c.push(m)}return c},e._lctf.readLookupTable=function(r,s,o){var a=e._bin,l=s,c={tabs:[]};c.ltype=a.readUshort(r,s),s+=2,c.flag=a.readUshort(r,s),s+=2;var h=a.readUshort(r,s);s+=2;for(var d=c.ltype,p=0;p<h;p++){var m=a.readUshort(r,s);s+=2;var x=o(r,d,l+m,c);c.tabs.push(x)}return c},e._lctf.numOfOnes=function(r){for(var s=0,o=0;o<32;o++)r>>>o&1&&s++;return s},e._lctf.readClassDef=function(r,s){var o=e._bin,a=[],l=o.readUshort(r,s);if(s+=2,l==1){var c=o.readUshort(r,s);s+=2;var h=o.readUshort(r,s);s+=2;for(var d=0;d<h;d++)a.push(c+d),a.push(c+d),a.push(o.readUshort(r,s)),s+=2}if(l==2){var p=o.readUshort(r,s);for(s+=2,d=0;d<p;d++)a.push(o.readUshort(r,s)),s+=2,a.push(o.readUshort(r,s)),s+=2,a.push(o.readUshort(r,s)),s+=2}return a},e._lctf.getInterval=function(r,s){for(var o=0;o<r.length;o+=3){var a=r[o],l=r[o+1];if(r[o+2],a<=s&&s<=l)return o}return-1},e._lctf.readCoverage=function(r,s){var o=e._bin,a={};a.fmt=o.readUshort(r,s),s+=2;var l=o.readUshort(r,s);return s+=2,a.fmt==1&&(a.tab=o.readUshorts(r,s,l)),a.fmt==2&&(a.tab=o.readUshorts(r,s,3*l)),a},e._lctf.coverageIndex=function(r,s){var o=r.tab;if(r.fmt==1)return o.indexOf(s);if(r.fmt==2){var a=e._lctf.getInterval(o,s);if(a!=-1)return o[a+2]+(s-o[a])}return-1},e._lctf.readFeatureList=function(r,s){var o=e._bin,a=s,l=[],c=o.readUshort(r,s);s+=2;for(var h=0;h<c;h++){var d=o.readASCII(r,s,4);s+=4;var p=o.readUshort(r,s);s+=2;var m=e._lctf.readFeatureTable(r,a+p);m.tag=d.trim(),l.push(m)}return l},e._lctf.readFeatureTable=function(r,s){var o=e._bin,a=s,l={},c=o.readUshort(r,s);s+=2,c>0&&(l.featureParams=a+c);var h=o.readUshort(r,s);s+=2,l.tab=[];for(var d=0;d<h;d++)l.tab.push(o.readUshort(r,s+2*d));return l},e._lctf.readScriptList=function(r,s){var o=e._bin,a=s,l={},c=o.readUshort(r,s);s+=2;for(var h=0;h<c;h++){var d=o.readASCII(r,s,4);s+=4;var p=o.readUshort(r,s);s+=2,l[d.trim()]=e._lctf.readScriptTable(r,a+p)}return l},e._lctf.readScriptTable=function(r,s){var o=e._bin,a=s,l={},c=o.readUshort(r,s);s+=2,l.default=e._lctf.readLangSysTable(r,a+c);var h=o.readUshort(r,s);s+=2;for(var d=0;d<h;d++){var p=o.readASCII(r,s,4);s+=4;var m=o.readUshort(r,s);s+=2,l[p.trim()]=e._lctf.readLangSysTable(r,a+m)}return l},e._lctf.readLangSysTable=function(r,s){var o=e._bin,a={};o.readUshort(r,s),s+=2,a.reqFeature=o.readUshort(r,s),s+=2;var l=o.readUshort(r,s);return s+=2,a.features=o.readUshorts(r,s,l),a},e.CFF={},e.CFF.parse=function(r,s,o){var a=e._bin;(r=new Uint8Array(r.buffer,s,o))[s=0],r[++s],r[++s],r[++s],s++;var l=[];s=e.CFF.readIndex(r,s,l);for(var c=[],h=0;h<l.length-1;h++)c.push(a.readASCII(r,s+l[h],l[h+1]-l[h]));s+=l[l.length-1];var d=[];s=e.CFF.readIndex(r,s,d);var p=[];for(h=0;h<d.length-1;h++)p.push(e.CFF.readDict(r,s+d[h],s+d[h+1]));s+=d[d.length-1];var m=p[0],x=[];s=e.CFF.readIndex(r,s,x);var v=[];for(h=0;h<x.length-1;h++)v.push(a.readASCII(r,s+x[h],x[h+1]-x[h]));if(s+=x[x.length-1],e.CFF.readSubrs(r,s,m),m.CharStrings){s=m.CharStrings,x=[],s=e.CFF.readIndex(r,s,x);var _=[];for(h=0;h<x.length-1;h++)_.push(a.readBytes(r,s+x[h],x[h+1]-x[h]));m.CharStrings=_}if(m.ROS){s=m.FDArray;var w=[];for(s=e.CFF.readIndex(r,s,w),m.FDArray=[],h=0;h<w.length-1;h++){var y=e.CFF.readDict(r,s+w[h],s+w[h+1]);e.CFF._readFDict(r,y,v),m.FDArray.push(y)}s+=w[w.length-1],s=m.FDSelect,m.FDSelect=[];var S=r[s];if(s++,S!=3)throw S;var b=a.readUshort(r,s);for(s+=2,h=0;h<b+1;h++)m.FDSelect.push(a.readUshort(r,s),r[s+2]),s+=3}return m.Encoding&&(m.Encoding=e.CFF.readEncoding(r,m.Encoding,m.CharStrings.length)),m.charset&&(m.charset=e.CFF.readCharset(r,m.charset,m.CharStrings.length)),e.CFF._readFDict(r,m,v),m},e.CFF._readFDict=function(r,s,o){var a;for(var l in s.Private&&(a=s.Private[1],s.Private=e.CFF.readDict(r,a,a+s.Private[0]),s.Private.Subrs&&e.CFF.readSubrs(r,a+s.Private.Subrs,s.Private)),s)[\"FamilyName\",\"FontName\",\"FullName\",\"Notice\",\"version\",\"Copyright\"].indexOf(l)!=-1&&(s[l]=o[s[l]-426+35])},e.CFF.readSubrs=function(r,s,o){var a=e._bin,l=[];s=e.CFF.readIndex(r,s,l);var c,h=l.length;c=h<1240?107:h<33900?1131:32768,o.Bias=c,o.Subrs=[];for(var d=0;d<l.length-1;d++)o.Subrs.push(a.readBytes(r,s+l[d],l[d+1]-l[d]))},e.CFF.tableSE=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,0,111,112,113,114,0,115,116,117,118,119,120,121,122,0,123,0,124,125,126,127,128,129,130,131,0,132,133,0,134,135,136,137,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,138,0,139,0,0,0,0,140,141,142,143,0,0,0,0,0,144,0,0,0,145,0,0,146,147,148,149,0,0,0,0],e.CFF.glyphByUnicode=function(r,s){for(var o=0;o<r.charset.length;o++)if(r.charset[o]==s)return o;return-1},e.CFF.glyphBySE=function(r,s){return s<0||s>255?-1:e.CFF.glyphByUnicode(r,e.CFF.tableSE[s])},e.CFF.readEncoding=function(r,s,o){e._bin;var a=[\".notdef\"],l=r[s];if(s++,l!=0)throw\"error: unknown encoding format: \"+l;var c=r[s];s++;for(var h=0;h<c;h++)a.push(r[s+h]);return a},e.CFF.readCharset=function(r,s,o){var a=e._bin,l=[\".notdef\"],c=r[s];if(s++,c==0)for(var h=0;h<o;h++){var d=a.readUshort(r,s);s+=2,l.push(d)}else{if(c!=1&&c!=2)throw\"error: format: \"+c;for(;l.length<o;){d=a.readUshort(r,s),s+=2;var p=0;for(c==1?(p=r[s],s++):(p=a.readUshort(r,s),s+=2),h=0;h<=p;h++)l.push(d),d++}}return l},e.CFF.readIndex=function(r,s,o){var a=e._bin,l=a.readUshort(r,s)+1,c=r[s+=2];if(s++,c==1)for(var h=0;h<l;h++)o.push(r[s+h]);else if(c==2)for(h=0;h<l;h++)o.push(a.readUshort(r,s+2*h));else if(c==3)for(h=0;h<l;h++)o.push(16777215&a.readUint(r,s+3*h-1));else if(l!=1)throw\"unsupported offset size: \"+c+\", count: \"+l;return(s+=l*c)-1},e.CFF.getCharString=function(r,s,o){var a=e._bin,l=r[s],c=r[s+1];r[s+2],r[s+3],r[s+4];var h=1,d=null,p=null;l<=20&&(d=l,h=1),l==12&&(d=100*l+c,h=2),21<=l&&l<=27&&(d=l,h=1),l==28&&(p=a.readShort(r,s+1),h=3),29<=l&&l<=31&&(d=l,h=1),32<=l&&l<=246&&(p=l-139,h=1),247<=l&&l<=250&&(p=256*(l-247)+c+108,h=2),251<=l&&l<=254&&(p=256*-(l-251)-c-108,h=2),l==255&&(p=a.readInt(r,s+1)/65535,h=5),o.val=p??\"o\"+d,o.size=h},e.CFF.readCharString=function(r,s,o){for(var a=s+o,l=e._bin,c=[];s<a;){var h=r[s],d=r[s+1];r[s+2],r[s+3],r[s+4];var p=1,m=null,x=null;h<=20&&(m=h,p=1),h==12&&(m=100*h+d,p=2),h!=19&&h!=20||(m=h,p=2),21<=h&&h<=27&&(m=h,p=1),h==28&&(x=l.readShort(r,s+1),p=3),29<=h&&h<=31&&(m=h,p=1),32<=h&&h<=246&&(x=h-139,p=1),247<=h&&h<=250&&(x=256*(h-247)+d+108,p=2),251<=h&&h<=254&&(x=256*-(h-251)-d-108,p=2),h==255&&(x=l.readInt(r,s+1)/65535,p=5),c.push(x??\"o\"+m),s+=p}return c},e.CFF.readDict=function(r,s,o){for(var a=e._bin,l={},c=[];s<o;){var h=r[s],d=r[s+1];r[s+2],r[s+3],r[s+4];var p=1,m=null,x=null;if(h==28&&(x=a.readShort(r,s+1),p=3),h==29&&(x=a.readInt(r,s+1),p=5),32<=h&&h<=246&&(x=h-139,p=1),247<=h&&h<=250&&(x=256*(h-247)+d+108,p=2),251<=h&&h<=254&&(x=256*-(h-251)-d-108,p=2),h==255)throw x=a.readInt(r,s+1)/65535,p=5,\"unknown number\";if(h==30){var v=[];for(p=1;;){var _=r[s+p];p++;var w=_>>4,y=15&_;if(w!=15&&v.push(w),y!=15&&v.push(y),y==15)break}for(var S=\"\",b=[0,1,2,3,4,5,6,7,8,9,\".\",\"e\",\"e-\",\"reserved\",\"-\",\"endOfNumber\"],C=0;C<v.length;C++)S+=b[v[C]];x=parseFloat(S)}h<=21&&(m=[\"version\",\"Notice\",\"FullName\",\"FamilyName\",\"Weight\",\"FontBBox\",\"BlueValues\",\"OtherBlues\",\"FamilyBlues\",\"FamilyOtherBlues\",\"StdHW\",\"StdVW\",\"escape\",\"UniqueID\",\"XUID\",\"charset\",\"Encoding\",\"CharStrings\",\"Private\",\"Subrs\",\"defaultWidthX\",\"nominalWidthX\"][h],p=1,h==12&&(m=[\"Copyright\",\"isFixedPitch\",\"ItalicAngle\",\"UnderlinePosition\",\"UnderlineThickness\",\"PaintType\",\"CharstringType\",\"FontMatrix\",\"StrokeWidth\",\"BlueScale\",\"BlueShift\",\"BlueFuzz\",\"StemSnapH\",\"StemSnapV\",\"ForceBold\",0,0,\"LanguageGroup\",\"ExpansionFactor\",\"initialRandomSeed\",\"SyntheticBase\",\"PostScript\",\"BaseFontName\",\"BaseFontBlend\",0,0,0,0,0,0,\"ROS\",\"CIDFontVersion\",\"CIDFontRevision\",\"CIDFontType\",\"CIDCount\",\"UIDBase\",\"FDArray\",\"FDSelect\",\"FontName\"][d],p=2)),m!=null?(l[m]=c.length==1?c[0]:c,c=[]):c.push(x),s+=p}return l},e.cmap={},e.cmap.parse=function(r,s,o){r=new Uint8Array(r.buffer,s,o),s=0;var a=e._bin,l={};a.readUshort(r,s),s+=2;var c=a.readUshort(r,s);s+=2;var h=[];l.tables=[];for(var d=0;d<c;d++){var p=a.readUshort(r,s);s+=2;var m=a.readUshort(r,s);s+=2;var x=a.readUint(r,s);s+=4;var v=\"p\"+p+\"e\"+m,_=h.indexOf(x);if(_==-1){var w;_=l.tables.length,h.push(x);var y=a.readUshort(r,x);y==0?w=e.cmap.parse0(r,x):y==4?w=e.cmap.parse4(r,x):y==6?w=e.cmap.parse6(r,x):y==12?w=e.cmap.parse12(r,x):console.debug(\"unknown format: \"+y,p,m,x),l.tables.push(w)}if(l[v]!=null)throw\"multiple tables for one platform+encoding\";l[v]=_}return l},e.cmap.parse0=function(r,s){var o=e._bin,a={};a.format=o.readUshort(r,s),s+=2;var l=o.readUshort(r,s);s+=2,o.readUshort(r,s),s+=2,a.map=[];for(var c=0;c<l-6;c++)a.map.push(r[s+c]);return a},e.cmap.parse4=function(r,s){var o=e._bin,a=s,l={};l.format=o.readUshort(r,s),s+=2;var c=o.readUshort(r,s);s+=2,o.readUshort(r,s),s+=2;var h=o.readUshort(r,s);s+=2;var d=h/2;l.searchRange=o.readUshort(r,s),s+=2,l.entrySelector=o.readUshort(r,s),s+=2,l.rangeShift=o.readUshort(r,s),s+=2,l.endCount=o.readUshorts(r,s,d),s+=2*d,s+=2,l.startCount=o.readUshorts(r,s,d),s+=2*d,l.idDelta=[];for(var p=0;p<d;p++)l.idDelta.push(o.readShort(r,s)),s+=2;for(l.idRangeOffset=o.readUshorts(r,s,d),s+=2*d,l.glyphIdArray=[];s<a+c;)l.glyphIdArray.push(o.readUshort(r,s)),s+=2;return l},e.cmap.parse6=function(r,s){var o=e._bin,a={};a.format=o.readUshort(r,s),s+=2,o.readUshort(r,s),s+=2,o.readUshort(r,s),s+=2,a.firstCode=o.readUshort(r,s),s+=2;var l=o.readUshort(r,s);s+=2,a.glyphIdArray=[];for(var c=0;c<l;c++)a.glyphIdArray.push(o.readUshort(r,s)),s+=2;return a},e.cmap.parse12=function(r,s){var o=e._bin,a={};a.format=o.readUshort(r,s),s+=2,s+=2,o.readUint(r,s),s+=4,o.readUint(r,s),s+=4;var l=o.readUint(r,s);s+=4,a.groups=[];for(var c=0;c<l;c++){var h=s+12*c,d=o.readUint(r,h+0),p=o.readUint(r,h+4),m=o.readUint(r,h+8);a.groups.push([d,p,m])}return a},e.glyf={},e.glyf.parse=function(r,s,o,a){for(var l=[],c=0;c<a.maxp.numGlyphs;c++)l.push(null);return l},e.glyf._parseGlyf=function(r,s){var o=e._bin,a=r._data,l=e._tabOffset(a,\"glyf\",r._offset)+r.loca[s];if(r.loca[s]==r.loca[s+1])return null;var c={};if(c.noc=o.readShort(a,l),l+=2,c.xMin=o.readShort(a,l),l+=2,c.yMin=o.readShort(a,l),l+=2,c.xMax=o.readShort(a,l),l+=2,c.yMax=o.readShort(a,l),l+=2,c.xMin>=c.xMax||c.yMin>=c.yMax)return null;if(c.noc>0){c.endPts=[];for(var h=0;h<c.noc;h++)c.endPts.push(o.readUshort(a,l)),l+=2;var d=o.readUshort(a,l);if(l+=2,a.length-l<d)return null;c.instructions=o.readBytes(a,l,d),l+=d;var p=c.endPts[c.noc-1]+1;for(c.flags=[],h=0;h<p;h++){var m=a[l];if(l++,c.flags.push(m),(8&m)!=0){var x=a[l];l++;for(var v=0;v<x;v++)c.flags.push(m),h++}}for(c.xs=[],h=0;h<p;h++){var _=(2&c.flags[h])!=0,w=(16&c.flags[h])!=0;_?(c.xs.push(w?a[l]:-a[l]),l++):w?c.xs.push(0):(c.xs.push(o.readShort(a,l)),l+=2)}for(c.ys=[],h=0;h<p;h++)_=(4&c.flags[h])!=0,w=(32&c.flags[h])!=0,_?(c.ys.push(w?a[l]:-a[l]),l++):w?c.ys.push(0):(c.ys.push(o.readShort(a,l)),l+=2);var y=0,S=0;for(h=0;h<p;h++)y+=c.xs[h],S+=c.ys[h],c.xs[h]=y,c.ys[h]=S}else{var b;c.parts=[];do{b=o.readUshort(a,l),l+=2;var C={m:{a:1,b:0,c:0,d:1,tx:0,ty:0},p1:-1,p2:-1};if(c.parts.push(C),C.glyphIndex=o.readUshort(a,l),l+=2,1&b){var A=o.readShort(a,l);l+=2;var L=o.readShort(a,l);l+=2}else A=o.readInt8(a,l),l++,L=o.readInt8(a,l),l++;2&b?(C.m.tx=A,C.m.ty=L):(C.p1=A,C.p2=L),8&b?(C.m.a=C.m.d=o.readF2dot14(a,l),l+=2):64&b?(C.m.a=o.readF2dot14(a,l),l+=2,C.m.d=o.readF2dot14(a,l),l+=2):128&b&&(C.m.a=o.readF2dot14(a,l),l+=2,C.m.b=o.readF2dot14(a,l),l+=2,C.m.c=o.readF2dot14(a,l),l+=2,C.m.d=o.readF2dot14(a,l),l+=2)}while(32&b);if(256&b){var E=o.readUshort(a,l);for(l+=2,c.instr=[],h=0;h<E;h++)c.instr.push(a[l]),l++}}return c},e.GPOS={},e.GPOS.parse=function(r,s,o,a){return e._lctf.parse(r,s,o,a,e.GPOS.subt)},e.GPOS.subt=function(r,s,o,a){var l=e._bin,c=o,h={};if(h.fmt=l.readUshort(r,o),o+=2,s==1||s==2||s==3||s==7||s==8&&h.fmt<=2){var d=l.readUshort(r,o);o+=2,h.coverage=e._lctf.readCoverage(r,d+c)}if(s==1&&h.fmt==1){var p=l.readUshort(r,o);o+=2;var m=e._lctf.numOfOnes(p);p!=0&&(h.pos=e.GPOS.readValueRecord(r,o,p))}else if(s==2&&h.fmt>=1&&h.fmt<=2){p=l.readUshort(r,o),o+=2;var x=l.readUshort(r,o);o+=2,m=e._lctf.numOfOnes(p);var v=e._lctf.numOfOnes(x);if(h.fmt==1){h.pairsets=[];var _=l.readUshort(r,o);o+=2;for(var w=0;w<_;w++){var y=c+l.readUshort(r,o);o+=2;var S=l.readUshort(r,y);y+=2;for(var b=[],C=0;C<S;C++){var A=l.readUshort(r,y);y+=2,p!=0&&(X=e.GPOS.readValueRecord(r,y,p),y+=2*m),x!=0&&(W=e.GPOS.readValueRecord(r,y,x),y+=2*v),b.push({gid2:A,val1:X,val2:W})}h.pairsets.push(b)}}if(h.fmt==2){var L=l.readUshort(r,o);o+=2;var E=l.readUshort(r,o);o+=2;var D=l.readUshort(r,o);o+=2;var z=l.readUshort(r,o);for(o+=2,h.classDef1=e._lctf.readClassDef(r,c+L),h.classDef2=e._lctf.readClassDef(r,c+E),h.matrix=[],w=0;w<D;w++){var H=[];for(C=0;C<z;C++){var X=null,W=null;p!=0&&(X=e.GPOS.readValueRecord(r,o,p),o+=2*m),x!=0&&(W=e.GPOS.readValueRecord(r,o,x),o+=2*v),H.push({val1:X,val2:W})}h.matrix.push(H)}}}else{if(s==9&&h.fmt==1){var B=l.readUshort(r,o);o+=2;var Z=l.readUint(r,o);if(o+=4,a.ltype==9)a.ltype=B;else if(a.ltype!=B)throw\"invalid extension substitution\";return e.GPOS.subt(r,a.ltype,c+Z)}console.debug(\"unsupported GPOS table LookupType\",s,\"format\",h.fmt)}return h},e.GPOS.readValueRecord=function(r,s,o){var a=e._bin,l=[];return l.push(1&o?a.readShort(r,s):0),s+=1&o?2:0,l.push(2&o?a.readShort(r,s):0),s+=2&o?2:0,l.push(4&o?a.readShort(r,s):0),s+=4&o?2:0,l.push(8&o?a.readShort(r,s):0),s+=8&o?2:0,l},e.GSUB={},e.GSUB.parse=function(r,s,o,a){return e._lctf.parse(r,s,o,a,e.GSUB.subt)},e.GSUB.subt=function(r,s,o,a){var l=e._bin,c=o,h={};if(h.fmt=l.readUshort(r,o),o+=2,s!=1&&s!=4&&s!=5&&s!=6)return null;if(s==1||s==4||s==5&&h.fmt<=2||s==6&&h.fmt<=2){var d=l.readUshort(r,o);o+=2,h.coverage=e._lctf.readCoverage(r,c+d)}if(s==1&&h.fmt>=1&&h.fmt<=2){if(h.fmt==1)h.delta=l.readShort(r,o),o+=2;else if(h.fmt==2){var p=l.readUshort(r,o);o+=2,h.newg=l.readUshorts(r,o,p),o+=2*h.newg.length}}else if(s==4){h.vals=[],p=l.readUshort(r,o),o+=2;for(var m=0;m<p;m++){var x=l.readUshort(r,o);o+=2,h.vals.push(e.GSUB.readLigatureSet(r,c+x))}}else if(s==5&&h.fmt==2){if(h.fmt==2){var v=l.readUshort(r,o);o+=2,h.cDef=e._lctf.readClassDef(r,c+v),h.scset=[];var _=l.readUshort(r,o);for(o+=2,m=0;m<_;m++){var w=l.readUshort(r,o);o+=2,h.scset.push(w==0?null:e.GSUB.readSubClassSet(r,c+w))}}}else if(s==6&&h.fmt==3){if(h.fmt==3){for(m=0;m<3;m++){p=l.readUshort(r,o),o+=2;for(var y=[],S=0;S<p;S++)y.push(e._lctf.readCoverage(r,c+l.readUshort(r,o+2*S)));o+=2*p,m==0&&(h.backCvg=y),m==1&&(h.inptCvg=y),m==2&&(h.ahedCvg=y)}p=l.readUshort(r,o),o+=2,h.lookupRec=e.GSUB.readSubstLookupRecords(r,o,p)}}else{if(s==7&&h.fmt==1){var b=l.readUshort(r,o);o+=2;var C=l.readUint(r,o);if(o+=4,a.ltype==9)a.ltype=b;else if(a.ltype!=b)throw\"invalid extension substitution\";return e.GSUB.subt(r,a.ltype,c+C)}console.debug(\"unsupported GSUB table LookupType\",s,\"format\",h.fmt)}return h},e.GSUB.readSubClassSet=function(r,s){var o=e._bin.readUshort,a=s,l=[],c=o(r,s);s+=2;for(var h=0;h<c;h++){var d=o(r,s);s+=2,l.push(e.GSUB.readSubClassRule(r,a+d))}return l},e.GSUB.readSubClassRule=function(r,s){var o=e._bin.readUshort,a={},l=o(r,s),c=o(r,s+=2);s+=2,a.input=[];for(var h=0;h<l-1;h++)a.input.push(o(r,s)),s+=2;return a.substLookupRecords=e.GSUB.readSubstLookupRecords(r,s,c),a},e.GSUB.readSubstLookupRecords=function(r,s,o){for(var a=e._bin.readUshort,l=[],c=0;c<o;c++)l.push(a(r,s),a(r,s+2)),s+=4;return l},e.GSUB.readChainSubClassSet=function(r,s){var o=e._bin,a=s,l=[],c=o.readUshort(r,s);s+=2;for(var h=0;h<c;h++){var d=o.readUshort(r,s);s+=2,l.push(e.GSUB.readChainSubClassRule(r,a+d))}return l},e.GSUB.readChainSubClassRule=function(r,s){for(var o=e._bin,a={},l=[\"backtrack\",\"input\",\"lookahead\"],c=0;c<l.length;c++){var h=o.readUshort(r,s);s+=2,c==1&&h--,a[l[c]]=o.readUshorts(r,s,h),s+=2*a[l[c]].length}return h=o.readUshort(r,s),s+=2,a.subst=o.readUshorts(r,s,2*h),s+=2*a.subst.length,a},e.GSUB.readLigatureSet=function(r,s){var o=e._bin,a=s,l=[],c=o.readUshort(r,s);s+=2;for(var h=0;h<c;h++){var d=o.readUshort(r,s);s+=2,l.push(e.GSUB.readLigature(r,a+d))}return l},e.GSUB.readLigature=function(r,s){var o=e._bin,a={chain:[]};a.nglyph=o.readUshort(r,s),s+=2;var l=o.readUshort(r,s);s+=2;for(var c=0;c<l-1;c++)a.chain.push(o.readUshort(r,s)),s+=2;return a},e.head={},e.head.parse=function(r,s,o){var a=e._bin,l={};return a.readFixed(r,s),s+=4,l.fontRevision=a.readFixed(r,s),s+=4,a.readUint(r,s),s+=4,a.readUint(r,s),s+=4,l.flags=a.readUshort(r,s),s+=2,l.unitsPerEm=a.readUshort(r,s),s+=2,l.created=a.readUint64(r,s),s+=8,l.modified=a.readUint64(r,s),s+=8,l.xMin=a.readShort(r,s),s+=2,l.yMin=a.readShort(r,s),s+=2,l.xMax=a.readShort(r,s),s+=2,l.yMax=a.readShort(r,s),s+=2,l.macStyle=a.readUshort(r,s),s+=2,l.lowestRecPPEM=a.readUshort(r,s),s+=2,l.fontDirectionHint=a.readShort(r,s),s+=2,l.indexToLocFormat=a.readShort(r,s),s+=2,l.glyphDataFormat=a.readShort(r,s),s+=2,l},e.hhea={},e.hhea.parse=function(r,s,o){var a=e._bin,l={};return a.readFixed(r,s),s+=4,l.ascender=a.readShort(r,s),s+=2,l.descender=a.readShort(r,s),s+=2,l.lineGap=a.readShort(r,s),s+=2,l.advanceWidthMax=a.readUshort(r,s),s+=2,l.minLeftSideBearing=a.readShort(r,s),s+=2,l.minRightSideBearing=a.readShort(r,s),s+=2,l.xMaxExtent=a.readShort(r,s),s+=2,l.caretSlopeRise=a.readShort(r,s),s+=2,l.caretSlopeRun=a.readShort(r,s),s+=2,l.caretOffset=a.readShort(r,s),s+=2,s+=8,l.metricDataFormat=a.readShort(r,s),s+=2,l.numberOfHMetrics=a.readUshort(r,s),s+=2,l},e.hmtx={},e.hmtx.parse=function(r,s,o,a){for(var l=e._bin,c={aWidth:[],lsBearing:[]},h=0,d=0,p=0;p<a.maxp.numGlyphs;p++)p<a.hhea.numberOfHMetrics&&(h=l.readUshort(r,s),s+=2,d=l.readShort(r,s),s+=2),c.aWidth.push(h),c.lsBearing.push(d);return c},e.kern={},e.kern.parse=function(r,s,o,a){var l=e._bin,c=l.readUshort(r,s);if(s+=2,c==1)return e.kern.parseV1(r,s-2,o,a);var h=l.readUshort(r,s);s+=2;for(var d={glyph1:[],rval:[]},p=0;p<h;p++){s+=2,o=l.readUshort(r,s),s+=2;var m=l.readUshort(r,s);s+=2;var x=m>>>8;if((x&=15)!=0)throw\"unknown kern table format: \"+x;s=e.kern.readFormat0(r,s,d)}return d},e.kern.parseV1=function(r,s,o,a){var l=e._bin;l.readFixed(r,s),s+=4;var c=l.readUint(r,s);s+=4;for(var h={glyph1:[],rval:[]},d=0;d<c;d++){l.readUint(r,s),s+=4;var p=l.readUshort(r,s);s+=2,l.readUshort(r,s),s+=2;var m=p>>>8;if((m&=15)!=0)throw\"unknown kern table format: \"+m;s=e.kern.readFormat0(r,s,h)}return h},e.kern.readFormat0=function(r,s,o){var a=e._bin,l=-1,c=a.readUshort(r,s);s+=2,a.readUshort(r,s),s+=2,a.readUshort(r,s),s+=2,a.readUshort(r,s),s+=2;for(var h=0;h<c;h++){var d=a.readUshort(r,s);s+=2;var p=a.readUshort(r,s);s+=2;var m=a.readShort(r,s);s+=2,d!=l&&(o.glyph1.push(d),o.rval.push({glyph2:[],vals:[]}));var x=o.rval[o.rval.length-1];x.glyph2.push(p),x.vals.push(m),l=d}return s},e.loca={},e.loca.parse=function(r,s,o,a){var l=e._bin,c=[],h=a.head.indexToLocFormat,d=a.maxp.numGlyphs+1;if(h==0)for(var p=0;p<d;p++)c.push(l.readUshort(r,s+(p<<1))<<1);if(h==1)for(p=0;p<d;p++)c.push(l.readUint(r,s+(p<<2)));return c},e.maxp={},e.maxp.parse=function(r,s,o){var a=e._bin,l={},c=a.readUint(r,s);return s+=4,l.numGlyphs=a.readUshort(r,s),s+=2,c==65536&&(l.maxPoints=a.readUshort(r,s),s+=2,l.maxContours=a.readUshort(r,s),s+=2,l.maxCompositePoints=a.readUshort(r,s),s+=2,l.maxCompositeContours=a.readUshort(r,s),s+=2,l.maxZones=a.readUshort(r,s),s+=2,l.maxTwilightPoints=a.readUshort(r,s),s+=2,l.maxStorage=a.readUshort(r,s),s+=2,l.maxFunctionDefs=a.readUshort(r,s),s+=2,l.maxInstructionDefs=a.readUshort(r,s),s+=2,l.maxStackElements=a.readUshort(r,s),s+=2,l.maxSizeOfInstructions=a.readUshort(r,s),s+=2,l.maxComponentElements=a.readUshort(r,s),s+=2,l.maxComponentDepth=a.readUshort(r,s),s+=2),l},e.name={},e.name.parse=function(r,s,o){var a=e._bin,l={};a.readUshort(r,s),s+=2;var c=a.readUshort(r,s);s+=2,a.readUshort(r,s);for(var h,d=[\"copyright\",\"fontFamily\",\"fontSubfamily\",\"ID\",\"fullName\",\"version\",\"postScriptName\",\"trademark\",\"manufacturer\",\"designer\",\"description\",\"urlVendor\",\"urlDesigner\",\"licence\",\"licenceURL\",\"---\",\"typoFamilyName\",\"typoSubfamilyName\",\"compatibleFull\",\"sampleText\",\"postScriptCID\",\"wwsFamilyName\",\"wwsSubfamilyName\",\"lightPalette\",\"darkPalette\"],p=s+=2,m=0;m<c;m++){var x=a.readUshort(r,s);s+=2;var v=a.readUshort(r,s);s+=2;var _=a.readUshort(r,s);s+=2;var w=a.readUshort(r,s);s+=2;var y=a.readUshort(r,s);s+=2;var S=a.readUshort(r,s);s+=2;var b,C=d[w],A=p+12*c+S;if(x==0)b=a.readUnicode(r,A,y/2);else if(x==3&&v==0)b=a.readUnicode(r,A,y/2);else if(v==0)b=a.readASCII(r,A,y);else if(v==1)b=a.readUnicode(r,A,y/2);else if(v==3)b=a.readUnicode(r,A,y/2);else{if(x!=1)throw\"unknown encoding \"+v+\", platformID: \"+x;b=a.readASCII(r,A,y),console.debug(\"reading unknown MAC encoding \"+v+\" as ASCII\")}var L=\"p\"+x+\",\"+_.toString(16);l[L]==null&&(l[L]={}),l[L][C!==void 0?C:w]=b,l[L]._lang=_}for(var E in l)if(l[E].postScriptName!=null&&l[E]._lang==1033)return l[E];for(var E in l)if(l[E].postScriptName!=null&&l[E]._lang==0)return l[E];for(var E in l)if(l[E].postScriptName!=null&&l[E]._lang==3084)return l[E];for(var E in l)if(l[E].postScriptName!=null)return l[E];for(var E in l){h=E;break}return console.debug(\"returning name table with languageID \"+l[h]._lang),l[h]},e[\"OS/2\"]={},e[\"OS/2\"].parse=function(r,s,o){var a=e._bin.readUshort(r,s);s+=2;var l={};if(a==0)e[\"OS/2\"].version0(r,s,l);else if(a==1)e[\"OS/2\"].version1(r,s,l);else if(a==2||a==3||a==4)e[\"OS/2\"].version2(r,s,l);else{if(a!=5)throw\"unknown OS/2 table version: \"+a;e[\"OS/2\"].version5(r,s,l)}return l},e[\"OS/2\"].version0=function(r,s,o){var a=e._bin;return o.xAvgCharWidth=a.readShort(r,s),s+=2,o.usWeightClass=a.readUshort(r,s),s+=2,o.usWidthClass=a.readUshort(r,s),s+=2,o.fsType=a.readUshort(r,s),s+=2,o.ySubscriptXSize=a.readShort(r,s),s+=2,o.ySubscriptYSize=a.readShort(r,s),s+=2,o.ySubscriptXOffset=a.readShort(r,s),s+=2,o.ySubscriptYOffset=a.readShort(r,s),s+=2,o.ySuperscriptXSize=a.readShort(r,s),s+=2,o.ySuperscriptYSize=a.readShort(r,s),s+=2,o.ySuperscriptXOffset=a.readShort(r,s),s+=2,o.ySuperscriptYOffset=a.readShort(r,s),s+=2,o.yStrikeoutSize=a.readShort(r,s),s+=2,o.yStrikeoutPosition=a.readShort(r,s),s+=2,o.sFamilyClass=a.readShort(r,s),s+=2,o.panose=a.readBytes(r,s,10),s+=10,o.ulUnicodeRange1=a.readUint(r,s),s+=4,o.ulUnicodeRange2=a.readUint(r,s),s+=4,o.ulUnicodeRange3=a.readUint(r,s),s+=4,o.ulUnicodeRange4=a.readUint(r,s),s+=4,o.achVendID=[a.readInt8(r,s),a.readInt8(r,s+1),a.readInt8(r,s+2),a.readInt8(r,s+3)],s+=4,o.fsSelection=a.readUshort(r,s),s+=2,o.usFirstCharIndex=a.readUshort(r,s),s+=2,o.usLastCharIndex=a.readUshort(r,s),s+=2,o.sTypoAscender=a.readShort(r,s),s+=2,o.sTypoDescender=a.readShort(r,s),s+=2,o.sTypoLineGap=a.readShort(r,s),s+=2,o.usWinAscent=a.readUshort(r,s),s+=2,o.usWinDescent=a.readUshort(r,s),s+=2},e[\"OS/2\"].version1=function(r,s,o){var a=e._bin;return s=e[\"OS/2\"].version0(r,s,o),o.ulCodePageRange1=a.readUint(r,s),s+=4,o.ulCodePageRange2=a.readUint(r,s),s+=4},e[\"OS/2\"].version2=function(r,s,o){var a=e._bin;return s=e[\"OS/2\"].version1(r,s,o),o.sxHeight=a.readShort(r,s),s+=2,o.sCapHeight=a.readShort(r,s),s+=2,o.usDefault=a.readUshort(r,s),s+=2,o.usBreak=a.readUshort(r,s),s+=2,o.usMaxContext=a.readUshort(r,s),s+=2},e[\"OS/2\"].version5=function(r,s,o){var a=e._bin;return s=e[\"OS/2\"].version2(r,s,o),o.usLowerOpticalPointSize=a.readUshort(r,s),s+=2,o.usUpperOpticalPointSize=a.readUshort(r,s),s+=2},e.post={},e.post.parse=function(r,s,o){var a=e._bin,l={};return l.version=a.readFixed(r,s),s+=4,l.italicAngle=a.readFixed(r,s),s+=4,l.underlinePosition=a.readShort(r,s),s+=2,l.underlineThickness=a.readShort(r,s),s+=2,l},e==null&&(e={}),e.U==null&&(e.U={}),e.U.codeToGlyph=function(r,s){var o=r.cmap,a=-1;if(o.p0e4!=null?a=o.p0e4:o.p3e1!=null?a=o.p3e1:o.p1e0!=null?a=o.p1e0:o.p0e3!=null&&(a=o.p0e3),a==-1)throw\"no familiar platform and encoding!\";var l=o.tables[a];if(l.format==0)return s>=l.map.length?0:l.map[s];if(l.format==4){for(var c=-1,h=0;h<l.endCount.length;h++)if(s<=l.endCount[h]){c=h;break}return c==-1||l.startCount[c]>s?0:65535&(l.idRangeOffset[c]!=0?l.glyphIdArray[s-l.startCount[c]+(l.idRangeOffset[c]>>1)-(l.idRangeOffset.length-c)]:s+l.idDelta[c])}if(l.format==12){if(s>l.groups[l.groups.length-1][1])return 0;for(h=0;h<l.groups.length;h++){var d=l.groups[h];if(d[0]<=s&&s<=d[1])return d[2]+(s-d[0])}return 0}throw\"unknown cmap table format \"+l.format},e.U.glyphToPath=function(r,s){var o={cmds:[],crds:[]};if(r.SVG&&r.SVG.entries[s]){var a=r.SVG.entries[s];return a==null?o:(typeof a==\"string\"&&(a=e.SVG.toPath(a),r.SVG.entries[s]=a),a)}if(r.CFF){var l={x:0,y:0,stack:[],nStems:0,haveWidth:!1,width:r.CFF.Private?r.CFF.Private.defaultWidthX:0,open:!1},c=r.CFF,h=r.CFF.Private;if(c.ROS){for(var d=0;c.FDSelect[d+2]<=s;)d+=2;h=c.FDArray[c.FDSelect[d+1]].Private}e.U._drawCFF(r.CFF.CharStrings[s],l,c,h,o)}else r.glyf&&e.U._drawGlyf(s,r,o);return o},e.U._drawGlyf=function(r,s,o){var a=s.glyf[r];a==null&&(a=s.glyf[r]=e.glyf._parseGlyf(s,r)),a!=null&&(a.noc>-1?e.U._simpleGlyph(a,o):e.U._compoGlyph(a,s,o))},e.U._simpleGlyph=function(r,s){for(var o=0;o<r.noc;o++){for(var a=o==0?0:r.endPts[o-1]+1,l=r.endPts[o],c=a;c<=l;c++){var h=c==a?l:c-1,d=c==l?a:c+1,p=1&r.flags[c],m=1&r.flags[h],x=1&r.flags[d],v=r.xs[c],_=r.ys[c];if(c==a)if(p){if(!m){e.U.P.moveTo(s,v,_);continue}e.U.P.moveTo(s,r.xs[h],r.ys[h])}else m?e.U.P.moveTo(s,r.xs[h],r.ys[h]):e.U.P.moveTo(s,(r.xs[h]+v)/2,(r.ys[h]+_)/2);p?m&&e.U.P.lineTo(s,v,_):x?e.U.P.qcurveTo(s,v,_,r.xs[d],r.ys[d]):e.U.P.qcurveTo(s,v,_,(v+r.xs[d])/2,(_+r.ys[d])/2)}e.U.P.closePath(s)}},e.U._compoGlyph=function(r,s,o){for(var a=0;a<r.parts.length;a++){var l={cmds:[],crds:[]},c=r.parts[a];e.U._drawGlyf(c.glyphIndex,s,l);for(var h=c.m,d=0;d<l.crds.length;d+=2){var p=l.crds[d],m=l.crds[d+1];o.crds.push(p*h.a+m*h.b+h.tx),o.crds.push(p*h.c+m*h.d+h.ty)}for(d=0;d<l.cmds.length;d++)o.cmds.push(l.cmds[d])}},e.U._getGlyphClass=function(r,s){var o=e._lctf.getInterval(s,r);return o==-1?0:s[o+2]},e.U.getPairAdjustment=function(r,s,o){var a=!1;if(r.GPOS)for(var l=r.GPOS,c=l.lookupList,h=l.featureList,d=[],p=0;p<h.length;p++){var m=h[p];if(m.tag==\"kern\"){a=!0;for(var x=0;x<m.tab.length;x++)if(!d[m.tab[x]]){d[m.tab[x]]=!0;for(var v=c[m.tab[x]],_=0;_<v.tabs.length;_++)if(v.tabs[_]!=null){var w,y=v.tabs[_];if((!y.coverage||(w=e._lctf.coverageIndex(y.coverage,s))!=-1)&&v.ltype!=1){if(v.ltype==2){var S=null;if(y.fmt==1){var b=y.pairsets[w];for(p=0;p<b.length;p++)b[p].gid2==o&&(S=b[p])}else if(y.fmt==2){var C=e.U._getGlyphClass(s,y.classDef1),A=e.U._getGlyphClass(o,y.classDef2);S=y.matrix[C][A]}if(S){var L=0;return S.val1&&S.val1[2]&&(L+=S.val1[2]),S.val2&&S.val2[0]&&(L+=S.val2[0]),L}}}}}}}if(r.kern&&!a){var E=r.kern.glyph1.indexOf(s);if(E!=-1){var D=r.kern.rval[E].glyph2.indexOf(o);if(D!=-1)return r.kern.rval[E].vals[D]}}return 0},e.U._applySubs=function(r,s,o,a){for(var l=r.length-s-1,c=0;c<o.tabs.length;c++)if(o.tabs[c]!=null){var h,d=o.tabs[c];if(!d.coverage||(h=e._lctf.coverageIndex(d.coverage,r[s]))!=-1){if(o.ltype==1)r[s],d.fmt==1?r[s]=r[s]+d.delta:r[s]=d.newg[h];else if(o.ltype==4)for(var p=d.vals[h],m=0;m<p.length;m++){var x=p[m],v=x.chain.length;if(!(v>l)){for(var _=!0,w=0,y=0;y<v;y++){for(;r[s+w+(1+y)]==-1;)w++;x.chain[y]!=r[s+w+(1+y)]&&(_=!1)}if(_){for(r[s]=x.nglyph,y=0;y<v+w;y++)r[s+y+1]=-1;break}}}else if(o.ltype==5&&d.fmt==2)for(var S=e._lctf.getInterval(d.cDef,r[s]),b=d.cDef[S+2],C=d.scset[b],A=0;A<C.length;A++){var L=C[A],E=L.input;if(!(E.length>l)){for(_=!0,y=0;y<E.length;y++){var D=e._lctf.getInterval(d.cDef,r[s+1+y]);if(S==-1&&d.cDef[D+2]!=E[y]){_=!1;break}}if(_){var z=L.substLookupRecords;for(m=0;m<z.length;m+=2)z[m],z[m+1]}}}else if(o.ltype==6&&d.fmt==3){if(!e.U._glsCovered(r,d.backCvg,s-d.backCvg.length)||!e.U._glsCovered(r,d.inptCvg,s)||!e.U._glsCovered(r,d.ahedCvg,s+d.inptCvg.length))continue;var H=d.lookupRec;for(A=0;A<H.length;A+=2){S=H[A];var X=a[H[A+1]];e.U._applySubs(r,s+S,X,a)}}}}},e.U._glsCovered=function(r,s,o){for(var a=0;a<s.length;a++)if(e._lctf.coverageIndex(s[a],r[o+a])==-1)return!1;return!0},e.U.glyphsToPath=function(r,s,o){for(var a={cmds:[],crds:[]},l=0,c=0;c<s.length;c++){var h=s[c];if(h!=-1){for(var d=c<s.length-1&&s[c+1]!=-1?s[c+1]:0,p=e.U.glyphToPath(r,h),m=0;m<p.crds.length;m+=2)a.crds.push(p.crds[m]+l),a.crds.push(p.crds[m+1]);for(o&&a.cmds.push(o),m=0;m<p.cmds.length;m++)a.cmds.push(p.cmds[m]);o&&a.cmds.push(\"X\"),l+=r.hmtx.aWidth[h],c<s.length-1&&(l+=e.U.getPairAdjustment(r,h,d))}}return a},e.U.P={},e.U.P.moveTo=function(r,s,o){r.cmds.push(\"M\"),r.crds.push(s,o)},e.U.P.lineTo=function(r,s,o){r.cmds.push(\"L\"),r.crds.push(s,o)},e.U.P.curveTo=function(r,s,o,a,l,c,h){r.cmds.push(\"C\"),r.crds.push(s,o,a,l,c,h)},e.U.P.qcurveTo=function(r,s,o,a,l){r.cmds.push(\"Q\"),r.crds.push(s,o,a,l)},e.U.P.closePath=function(r){r.cmds.push(\"Z\")},e.U._drawCFF=function(r,s,o,a,l){for(var c=s.stack,h=s.nStems,d=s.haveWidth,p=s.width,m=s.open,x=0,v=s.x,_=s.y,w=0,y=0,S=0,b=0,C=0,A=0,L=0,E=0,D=0,z=0,H={val:0,size:0};x<r.length;){e.CFF.getCharString(r,x,H);var X=H.val;if(x+=H.size,X==\"o1\"||X==\"o18\")c.length%2!=0&&!d&&(p=c.shift()+a.nominalWidthX),h+=c.length>>1,c.length=0,d=!0;else if(X==\"o3\"||X==\"o23\")c.length%2!=0&&!d&&(p=c.shift()+a.nominalWidthX),h+=c.length>>1,c.length=0,d=!0;else if(X==\"o4\")c.length>1&&!d&&(p=c.shift()+a.nominalWidthX,d=!0),m&&e.U.P.closePath(l),_+=c.pop(),e.U.P.moveTo(l,v,_),m=!0;else if(X==\"o5\")for(;c.length>0;)v+=c.shift(),_+=c.shift(),e.U.P.lineTo(l,v,_);else if(X==\"o6\"||X==\"o7\")for(var W=c.length,B=X==\"o6\",Z=0;Z<W;Z++){var J=c.shift();B?v+=J:_+=J,B=!B,e.U.P.lineTo(l,v,_)}else if(X==\"o8\"||X==\"o24\"){W=c.length;for(var ie=0;ie+6<=W;)w=v+c.shift(),y=_+c.shift(),S=w+c.shift(),b=y+c.shift(),v=S+c.shift(),_=b+c.shift(),e.U.P.curveTo(l,w,y,S,b,v,_),ie+=6;X==\"o24\"&&(v+=c.shift(),_+=c.shift(),e.U.P.lineTo(l,v,_))}else{if(X==\"o11\")break;if(X==\"o1234\"||X==\"o1235\"||X==\"o1236\"||X==\"o1237\")X==\"o1234\"&&(y=_,S=(w=v+c.shift())+c.shift(),z=b=y+c.shift(),A=b,E=_,v=(L=(C=(D=S+c.shift())+c.shift())+c.shift())+c.shift(),e.U.P.curveTo(l,w,y,S,b,D,z),e.U.P.curveTo(l,C,A,L,E,v,_)),X==\"o1235\"&&(w=v+c.shift(),y=_+c.shift(),S=w+c.shift(),b=y+c.shift(),D=S+c.shift(),z=b+c.shift(),C=D+c.shift(),A=z+c.shift(),L=C+c.shift(),E=A+c.shift(),v=L+c.shift(),_=E+c.shift(),c.shift(),e.U.P.curveTo(l,w,y,S,b,D,z),e.U.P.curveTo(l,C,A,L,E,v,_)),X==\"o1236\"&&(w=v+c.shift(),y=_+c.shift(),S=w+c.shift(),z=b=y+c.shift(),A=b,L=(C=(D=S+c.shift())+c.shift())+c.shift(),E=A+c.shift(),v=L+c.shift(),e.U.P.curveTo(l,w,y,S,b,D,z),e.U.P.curveTo(l,C,A,L,E,v,_)),X==\"o1237\"&&(w=v+c.shift(),y=_+c.shift(),S=w+c.shift(),b=y+c.shift(),D=S+c.shift(),z=b+c.shift(),C=D+c.shift(),A=z+c.shift(),L=C+c.shift(),E=A+c.shift(),Math.abs(L-v)>Math.abs(E-_)?v=L+c.shift():_=E+c.shift(),e.U.P.curveTo(l,w,y,S,b,D,z),e.U.P.curveTo(l,C,A,L,E,v,_));else if(X==\"o14\"){if(c.length>0&&!d&&(p=c.shift()+o.nominalWidthX,d=!0),c.length==4){var O=c.shift(),F=c.shift(),G=c.shift(),R=c.shift(),N=e.CFF.glyphBySE(o,G),Q=e.CFF.glyphBySE(o,R);e.U._drawCFF(o.CharStrings[N],s,o,a,l),s.x=O,s.y=F,e.U._drawCFF(o.CharStrings[Q],s,o,a,l)}m&&(e.U.P.closePath(l),m=!1)}else if(X==\"o19\"||X==\"o20\")c.length%2!=0&&!d&&(p=c.shift()+a.nominalWidthX),h+=c.length>>1,c.length=0,d=!0,x+=h+7>>3;else if(X==\"o21\")c.length>2&&!d&&(p=c.shift()+a.nominalWidthX,d=!0),_+=c.pop(),v+=c.pop(),m&&e.U.P.closePath(l),e.U.P.moveTo(l,v,_),m=!0;else if(X==\"o22\")c.length>1&&!d&&(p=c.shift()+a.nominalWidthX,d=!0),v+=c.pop(),m&&e.U.P.closePath(l),e.U.P.moveTo(l,v,_),m=!0;else if(X==\"o25\"){for(;c.length>6;)v+=c.shift(),_+=c.shift(),e.U.P.lineTo(l,v,_);w=v+c.shift(),y=_+c.shift(),S=w+c.shift(),b=y+c.shift(),v=S+c.shift(),_=b+c.shift(),e.U.P.curveTo(l,w,y,S,b,v,_)}else if(X==\"o26\")for(c.length%2&&(v+=c.shift());c.length>0;)w=v,y=_+c.shift(),v=S=w+c.shift(),_=(b=y+c.shift())+c.shift(),e.U.P.curveTo(l,w,y,S,b,v,_);else if(X==\"o27\")for(c.length%2&&(_+=c.shift());c.length>0;)y=_,S=(w=v+c.shift())+c.shift(),b=y+c.shift(),v=S+c.shift(),_=b,e.U.P.curveTo(l,w,y,S,b,v,_);else if(X==\"o10\"||X==\"o29\"){var U=X==\"o10\"?a:o;if(c.length==0)console.debug(\"error: empty stack\");else{var te=c.pop(),$=U.Subrs[te+U.Bias];s.x=v,s.y=_,s.nStems=h,s.haveWidth=d,s.width=p,s.open=m,e.U._drawCFF($,s,o,a,l),v=s.x,_=s.y,h=s.nStems,d=s.haveWidth,p=s.width,m=s.open}}else if(X==\"o30\"||X==\"o31\"){var fe=c.length,oe=(ie=0,X==\"o31\");for(ie+=fe-(W=-3&fe);ie<W;)oe?(y=_,S=(w=v+c.shift())+c.shift(),_=(b=y+c.shift())+c.shift(),W-ie==5?(v=S+c.shift(),ie++):v=S,oe=!1):(w=v,y=_+c.shift(),S=w+c.shift(),b=y+c.shift(),v=S+c.shift(),W-ie==5?(_=b+c.shift(),ie++):_=b,oe=!0),e.U.P.curveTo(l,w,y,S,b,v,_),ie+=4}else{if((X+\"\").charAt(0)==\"o\")throw console.debug(\"Unknown operation: \"+X,r),X;c.push(X)}}}s.x=v,s.y=_,s.nStems=h,s.haveWidth=d,s.width=p,s.open=m};var t=e,i={Typr:t};return n.Typr=t,n.default=i,Object.defineProperty(n,\"__esModule\",{value:!0}),n}({}).Typr}", "title": "" }, { "docid": "4579815aeb5f7cae53e31a6e6f8cbca6", "score": "0.55945015", "text": "function r(){var t,r=!1,n=this;n._DeArray=function(t,e,r){return[t.slice(e,e+r)]},n._EnArray=function(t,e,r,n){for(var i=0;i<r;t[e+i]=n[i]?n[i]:0,i++);},n._DeChar=function(t,e){return String.fromCharCode(t[e])},n._EnChar=function(t,e,r){t[e]=r.charCodeAt(0)},n._DeInt=function(e,n){var i,o,a,s=r?t.len-1:0,u=r?-1:1,f=s+u*t.len;for(i=0,o=s,a=1;o!=f;i+=e[n+o]*a,o+=u,a*=256);return t.bSigned&&i&Math.pow(2,8*t.len-1)&&(i-=Math.pow(2,8*t.len)),i},n._EnInt=function(e,n,i){var o,a=r?t.len-1:0,s=r?-1:1,u=a+s*t.len;for(i=i<t.min?t.min:i>t.max?t.max:i,o=a;o!=u;e[n+o]=255&i,o+=s,i>>=8);},n._DeString=function(t,e,r){for(var n=new Array(r),i=0;i<r;n[i]=String.fromCharCode(t[e+i]),i++);return n.join(\"\")},n._EnString=function(t,e,r,n){for(var i,o=0;o<r;t[e+o]=(i=n.charCodeAt(o))?i:0,o++);},n._DeNullString=function(t,e,r,i){var o=n._DeString(t,e,r,i);return o.substring(0,o.length-1)},n._De754=function(e,n){var i,o,a,s,u,f,l,h,c,p;for(l=t.mLen,h=8*t.len-t.mLen-1,p=(1<<h)-1,c=p>>1,s=r?0:t.len-1,u=r?1:-1,i=e[n+s],s+=u,f=-7,o=i&(1<<-f)-1,i>>=-f,f+=h;f>0;o=256*o+e[n+s],s+=u,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=l;f>0;a=256*a+e[n+s],s+=u,f-=8);switch(o){case 0:o=1-c;break;case p:return a?NaN:1/0*(i?-1:1);default:a+=Math.pow(2,l),o-=c;break}return(i?-1:1)*a*Math.pow(2,o-l)},n._En754=function(e,n,i){var o,a,s,u,f,l,h,c,p,d;for(h=t.mLen,c=8*t.len-t.mLen-1,d=(1<<c)-1,p=d>>1,o=i<0?1:0,i=Math.abs(i),isNaN(i)||i==1/0?(s=isNaN(i)?1:0,a=d):(a=Math.floor(Math.log(i)/Math.LN2),i*(l=Math.pow(2,-a))<1&&(a--,l*=2),i+=a+p>=1?t.rt/l:t.rt*Math.pow(2,1-p),i*l>=2&&(a++,l/=2),a+p>=d?(s=0,a=d):a+p>=1?(s=(i*l-1)*Math.pow(2,h),a+=p):(s=i*Math.pow(2,p-1)*Math.pow(2,h),a=0)),u=r?t.len-1:0,f=r?-1:1;h>=8;e[n+u]=255&s,u+=f,s/=256,h-=8);for(a=a<<h|s,c+=h;c>0;e[n+u]=255&a,u+=f,a/=256,c-=8);e[n+u-f]|=128*o},n._sPattern=\"(\\\\d+)?([AxcbBhHsSfdiIlL])(\\\\(([a-zA-Z0-9]+)\\\\))?\",n._lenLut={A:1,x:1,c:1,b:1,B:1,h:2,H:2,s:1,S:1,f:4,d:8,i:4,I:4,l:4,L:4},n._elLut={A:{en:n._EnArray,de:n._DeArray},s:{en:n._EnString,de:n._DeString},S:{en:n._EnString,de:n._DeNullString},c:{en:n._EnChar,de:n._DeChar},b:{en:n._EnInt,de:n._DeInt,len:1,bSigned:!0,min:-Math.pow(2,7),max:Math.pow(2,7)-1},B:{en:n._EnInt,de:n._DeInt,len:1,bSigned:!1,min:0,max:Math.pow(2,8)-1},h:{en:n._EnInt,de:n._DeInt,len:2,bSigned:!0,min:-Math.pow(2,15),max:Math.pow(2,15)-1},H:{en:n._EnInt,de:n._DeInt,len:2,bSigned:!1,min:0,max:Math.pow(2,16)-1},i:{en:n._EnInt,de:n._DeInt,len:4,bSigned:!0,min:-Math.pow(2,31),max:Math.pow(2,31)-1},I:{en:n._EnInt,de:n._DeInt,len:4,bSigned:!1,min:0,max:Math.pow(2,32)-1},l:{en:n._EnInt,de:n._DeInt,len:4,bSigned:!0,min:-Math.pow(2,31),max:Math.pow(2,31)-1},L:{en:n._EnInt,de:n._DeInt,len:4,bSigned:!1,min:0,max:Math.pow(2,32)-1},f:{en:n._En754,de:n._De754,len:4,mLen:23,rt:Math.pow(2,-24)-Math.pow(2,-77)},d:{en:n._En754,de:n._De754,len:8,mLen:52,rt:0}},n._UnpackSeries=function(e,r,n,i){for(var o=t.de,a=[],s=0;s<e;a.push(o(n,i+s*r)),s++);return a},n._PackSeries=function(e,r,n,i,o,a){for(var s=t.en,u=0;u<e;s(n,i+u*r,o[a+u]),u++);},n._zip=function(t,e){for(var r={},n=0;n<t.length;n++)r[t[n]]=e[n];return r},n.unpack=function(e,n,i){r=\"<\"!=e.charAt(0),i=i||0;var o,a,s,u=new RegExp(this._sPattern,\"g\"),f=[],l=[];while(o=u.exec(e)){if(a=void 0==o[1]||\"\"==o[1]?1:parseInt(o[1]),\"S\"===o[2]){a=0;while(0!==n[i+a])a++;a++}if(s=this._lenLut[o[2]],i+a*s>n.length)return;switch(o[2]){case\"A\":case\"s\":case\"S\":l.push(this._elLut[o[2]].de(n,i,a));break;case\"c\":case\"b\":case\"B\":case\"h\":case\"H\":case\"i\":case\"I\":case\"l\":case\"L\":case\"f\":case\"d\":t=this._elLut[o[2]],l.push(this._UnpackSeries(a,s,n,i));break}f.push(o[4]),i+=a*s}return l=Array.prototype.concat.apply([],l),-1!==f.indexOf(void 0)?l:this._zip(f,l)},n.packTo=function(e,n,i,o){r=\"<\"!=e.charAt(0);var a,s,u,f,l=new RegExp(this._sPattern,\"g\"),h=0;while(a=l.exec(e)){if(s=void 0==a[1]||\"\"==a[1]?1:parseInt(a[1]),\"S\"===a[2]&&(s=o[h].length+1),u=this._lenLut[a[2]],i+s*u>n.length)return!1;switch(a[2]){case\"A\":case\"s\":case\"S\":if(h+1>o.length)return!1;this._elLut[a[2]].en(n,i,s,o[h]),h+=1;break;case\"c\":case\"b\":case\"B\":case\"h\":case\"H\":case\"i\":case\"I\":case\"l\":case\"L\":case\"f\":case\"d\":if(t=this._elLut[a[2]],h+s>o.length)return!1;this._PackSeries(s,u,n,i,o,h),h+=s;break;case\"x\":for(f=0;f<s;f++)n[i+f]=0;break}i+=s*u}return n},n.pack=function(t,r){return this.packTo(t,new e(this.calcLength(t,r)),0,r)},n.calcLength=function(t,e){var r,n=new RegExp(this._sPattern,\"g\"),i=0,o=0;while(r=n.exec(t)){var a=(void 0==r[1]||\"\"==r[1]?1:parseInt(r[1]))*this._lenLut[r[2]];\"S\"===r[2]&&(a=e[o].length+1),i+=a,o++}return i}}", "title": "" }, { "docid": "22bd79b1dbc3bd5d4c638d8264983dea", "score": "0.5543993", "text": "function de(a){var b;J&&(b=a.yf());var c=ac(\"xml\");a=Nc(a,!0);for(var d=0,e;e=a[d];d++){var g=ee(e);e=e.Ia();g.setAttribute(\"x\",J?b-e.x:e.x);g.setAttribute(\"y\",e.y);c.appendChild(g)}return c}", "title": "" }, { "docid": "a521d8fb6d626d9dc898784ce15c04a5", "score": "0.54801005", "text": "function Mr(t,e,n,r){if(!t||!t.parentNode||(cr||br(t)).documentElement===t)return new Er;var i=function(t){for(var e,n;t&&t!==dr;)(n=t._gsap)&&n.uncache&&n.get(t,\"x\"),n&&!n.scaleX&&!n.scaleY&&n.renderTransform&&(n.scaleX=n.scaleY=1e-4,n.renderTransform(1,n),e?e.push(n):e=[n]),t=t.parentNode;return e}(t),o=kr(t)?wr:Tr,a=Sr(t,n),s=o[0].getBoundingClientRect(),l=o[1].getBoundingClientRect(),u=o[2].getBoundingClientRect(),c=a.parentNode,p=!r&&function t(e){return\"fixed\"===pr.getComputedStyle(e).position||((e=e.parentNode)&&1===e.nodeType?t(e):void 0)}(t),f=new Er((l.left-s.left)/100,(l.top-s.top)/100,(u.left-s.left)/100,(u.top-s.top)/100,s.left+(p?0:pr.pageXOffset||cr.scrollLeft||fr.scrollLeft||dr.scrollLeft||0),s.top+(p?0:pr.pageYOffset||cr.scrollTop||fr.scrollTop||dr.scrollTop||0));if(c.removeChild(a),i)for(s=i.length;s--;)(l=i[s]).scaleX=l.scaleY=0,l.renderTransform(1,l);return e?f.inverse():f}", "title": "" }, { "docid": "75c9d1942856df2dbf331d3a1417822f", "score": "0.54069656", "text": "function fs(t,e,n,r){if(!t||!t.parentNode||(Wo||rs(t)).documentElement===t)return new ls;var i=function(t){for(var e,n;t&&t!==Go;)(n=t._gsap)&&n.uncache&&n.get(t,\"x\"),n&&!n.scaleX&&!n.scaleY&&n.renderTransform&&(n.scaleX=n.scaleY=1e-4,n.renderTransform(1,n),e?e.push(n):e=[n]),t=t.parentNode;return e}(t),o=ss(t)?is:os,s=cs(t,n),a=o[0].getBoundingClientRect(),c=o[1].getBoundingClientRect(),u=o[2].getBoundingClientRect(),l=s.parentNode,f=!r&&function t(e){return\"fixed\"===Xo.getComputedStyle(e).position||((e=e.parentNode)&&1===e.nodeType?t(e):void 0)}(t),h=new ls((c.left-a.left)/100,(c.top-a.top)/100,(u.left-a.left)/100,(u.top-a.top)/100,a.left+(f?0:Xo.pageXOffset||Wo.scrollLeft||Vo.scrollLeft||Go.scrollLeft||0),a.top+(f?0:Xo.pageYOffset||Wo.scrollTop||Vo.scrollTop||Go.scrollTop||0));if(l.removeChild(s),i)for(a=i.length;a--;)(c=i[a]).scaleX=c.scaleY=0,c.renderTransform(1,c);return e?h.inverse():h}", "title": "" }, { "docid": "f4182c7ece22fb7f06f19ca5815df5da", "score": "0.52852404", "text": "function XY27_a3uEfjuPVlzJ1epT7g(){}", "title": "" }, { "docid": "06b4a108adb458c3d3403b4058426136", "score": "0.5270782", "text": "function Bh(a){var b=!!a.readOnly;if(b)var c=null,d=!1,e=!1,f=!1,k=!1,m=!1,n=!1;else(c=a.toolbox)?(\"string\"!=typeof c&&(\"undefined\"==typeof XSLTProcessor&&c.outerHTML?c=c.outerHTML:c instanceof Element||(c=null)),\"string\"==typeof c&&(c=Vf(c))):c=null,d=!(!c||!c.getElementsByTagName(\"category\").length),e=a.trashcan,void 0===e&&(e=d),f=a.collapse,void 0===f&&(f=d),k=a.comments,void 0===k&&(k=d),m=a.disable,void 0===m&&(m=d),n=a.sounds,void 0===n&&(n=!0);var p=a.scrollbars;void 0===p&&(p=d);var u=a.css;\nvoid 0===u&&(u=!0);var r=\"https://blockly-demo.appspot.com/static/media/\";a.media?r=a.media:a.path&&(r=a.path+\"media/\");this.m=!!a.rtl;this.D=f;this.ea=k;this.I=m;this.i=b;this.F=a.maxBlocks||Infinity;this.u=r;this.pa=d;this.H=p;this.La=e;this.Ja=n;this.va=u;this.A=c;b=a.grid||{};c={};c.spacing=parseFloat(b.spacing)||0;c.Mo=b.colour||\"#888\";c.length=parseFloat(b.length)||1;c.To=0<c.spacing&&!!b.snap;this.h=c;a=a.zoom||{};b={};b.controls=void 0===a.controls?!1:!!a.controls;b.Ph=void 0===a.wheel?!1:\n!!a.wheel;b.Mh=void 0===a.startScale?1:parseFloat(a.startScale);b.Vc=void 0===a.maxScale?3:parseFloat(a.maxScale);b.Wc=void 0===a.minScale?.3:parseFloat(a.minScale);b.Ih=void 0===a.scaleSpeed?1.2:parseFloat(a.scaleSpeed);this.g=b}", "title": "" }, { "docid": "bd71f64287b9d7c5939e7978bcfd8959", "score": "0.51959205", "text": "function Dr(t,e,n,r){if(!t||!t.parentNode||(cr||wr(t)).documentElement===t)return new Cr;var i=function(t){for(var e,n;t&&t!==dr;)(n=t._gsap)&&n.uncache&&n.get(t,\"x\"),n&&!n.scaleX&&!n.scaleY&&n.renderTransform&&(n.scaleX=n.scaleY=1e-4,n.renderTransform(1,n),e?e.push(n):e=[n]),t=t.parentNode;return e}(t),o=Mr(t)?br:Tr,s=Pr(t,n),a=o[0].getBoundingClientRect(),l=o[1].getBoundingClientRect(),u=o[2].getBoundingClientRect(),c=s.parentNode,h=!r&&function t(e){return\"fixed\"===hr.getComputedStyle(e).position||((e=e.parentNode)&&1===e.nodeType?t(e):void 0)}(t),p=new Cr((l.left-a.left)/100,(l.top-a.top)/100,(u.left-a.left)/100,(u.top-a.top)/100,a.left+(h?0:hr.pageXOffset||cr.scrollLeft||pr.scrollLeft||dr.scrollLeft||0),a.top+(h?0:hr.pageYOffset||cr.scrollTop||pr.scrollTop||dr.scrollTop||0));if(c.removeChild(s),i)for(a=i.length;a--;)(l=i[a]).scaleX=l.scaleY=0,l.renderTransform(1,l);return e?p.inverse():p}", "title": "" }, { "docid": "1cbe68f171a464ac65bed695a2e64b76", "score": "0.5166291", "text": "function Mi(){var a=this;this.ga=new ve(function(){return lj(a)},function(b){var c=lj(a);c&&(p(b.y)&&(a.ga.scrollY=-c.Jb*b.y-c.Sb),a.ga.Qa.setAttribute(\"transform\",\"translate(0,\"+(a.ga.scrollY+c.Ib)+\")\"))});this.ga.sj=!0;this.Zi=[];this.Ab=this.Ca=0;this.Gg=[];this.lc=[]}", "title": "" }, { "docid": "7f0220ed4d38f2848e4b400ecc55d16e", "score": "0.51267564", "text": "function ws_book(p,n,b){var f=jQuery;var m=f(this);var i=f(\".ws_list\",b);var k=f(\"<div>\").addClass(\"ws_effect ws_book\").css({position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\"}).appendTo(b),e=p.duration,d=p.perspective||0.4,g=p.shadow||0.35,a=p.noCanvas||false,l=p.no3d||false;var o={domPrefixes:\" Webkit Moz ms O Khtml\".split(\" \"),testDom:function(r){var q=this.domPrefixes.length;while(q--){if(typeof document.body.style[this.domPrefixes[q]+r]!==\"undefined\"){return true}}return false},cssTransitions:function(){return this.testDom(\"Transition\")},cssTransforms3d:function(){var r=(typeof document.body.style.perspectiveProperty!==\"undefined\")||this.testDom(\"Perspective\");if(r&&/AppleWebKit/.test(navigator.userAgent)){var t=document.createElement(\"div\"),q=document.createElement(\"style\"),s=\"Test3d\"+Math.round(Math.random()*99999);q.textContent=\"@media (-webkit-transform-3d){#\"+s+\"{height:3px}}\";document.getElementsByTagName(\"head\")[0].appendChild(q);t.id=s;document.body.appendChild(t);r=t.offsetHeight===3;q.parentNode.removeChild(q);t.parentNode.removeChild(t)}return r},canvas:function(){if(typeof document.createElement(\"canvas\").getContext!==\"undefined\"){return true}}};if(!l){l=o.cssTransitions()&&o.cssTransforms3d()}if(!a){a=o.canvas()}var j;this.go=function(r,q,E){if(j){return -1}var v=n.get(r),G=n.get(q);if(E==undefined){E=(q==0&&r!=q+1)||(r==q-1)}else{E=!E}var s=f(\"<div>\").appendTo(k);var t=f(v);t={width:t.width(),height:t.height(),marginLeft:parseFloat(t.css(\"marginLeft\")),marginTop:parseFloat(t.css(\"marginTop\"))};if(l){var y={background:\"#000\",position:\"absolute\",left:0,top:0,width:\"100%\",height:\"100%\",transformStyle:\"preserve-3d\",zIndex:3,outline:\"1px solid transparent\"};perspect=b.width()*(3-d*2);s.css(y).css({perspective:perspect,transform:\"translate3d(0,0,0)\"});var z=90;var D=f(\"<div>\").css(y).css({position:\"relative\",\"float\":\"left\",width:\"50%\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?v:G).src).css(t)).appendTo(s);var C=f(\"<div>\").css(y).css({position:\"relative\",\"float\":\"left\",width:\"50%\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?G:v).src).css(t).css({marginLeft:-t.width/2})).appendTo(s);var I=f(\"<div>\").css(y).css({display:E?\"block\":\"none\",width:\"50%\",transform:\"rotateY(\"+(E?0.1:z)+\"deg)\",transition:(E?\"ease-in \":\"ease-out \")+e/2000+\"s\",transformOrigin:\"right\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?G:v).src).css(t)).appendTo(s);var F=f(\"<div>\").css(y).css({display:E?\"none\":\"block\",left:\"50%\",width:\"50%\",transform:\"rotateY(-\"+(E?z:0.1)+\"deg)\",transition:(E?\"ease-out \":\"ease-in \")+e/2000+\"s\",transformOrigin:\"left\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?v:G).src).css(t).css({marginLeft:-t.width/2})).appendTo(s)}else{if(a){var x=f(\"<div>\").css({position:\"absolute\",top:0,left:E?0:\"50%\",width:\"50%\",height:\"100%\",overflow:\"hidden\",zIndex:6}).append(f(n.get(r)).clone().css({position:\"absolute\",height:\"100%\",right:E?\"auto\":0,left:E?0:\"auto\"})).appendTo(s).hide();var B=f(\"<div>\").css({position:\"absolute\",width:\"100%\",height:\"100%\",left:0,top:0,zIndex:8}).appendTo(s).hide();var H=f(\"<canvas>\").css({position:\"absolute\",zIndex:2,left:0,top:-B.height()*d/2}).attr({width:B.width(),height:B.height()*(d+1)}).appendTo(B);var A=H.clone().css({top:0,zIndex:1}).attr({width:B.width(),height:B.height()}).appendTo(B);var w=H.get(0).getContext(\"2d\");var u=A.get(0).getContext(\"2d\")}else{i.stop(true).animate({left:(r?-r+\"00%\":(/Safari/.test(navigator.userAgent)?\"0%\":0))},e,\"easeInOutExpo\")}}if(!l&&a){var D=w;var C=u;var I=G;var F=v}j=new h(E,z,D,C,I,F,B,H,A,x,t,function(){m.trigger(\"effectEnd\");s.remove();j=0})};function c(G,s,A,v,u,E,D,C,B,t,r){numSlices=u/2,widthScale=u/B,heightScale=(1-E)/numSlices;G.clearRect(0,0,r.width(),r.height());for(var q=0;q<numSlices+widthScale;q++){var z=(D?q*p.width/u+p.width/2:(numSlices-q)*p.width/u);var H=A+(D?2:-2)*q,F=v+t*heightScale*q/2;if(z<0){z=0}if(H<0){H=0}if(F<0){F=0}G.drawImage(s,z,0,2.5,p.height,H,F,2,t*(1-(heightScale*q)))}G.save();G.beginPath();G.moveTo(A,v);G.lineTo(A+(D?2:-2)*(numSlices+widthScale),v+t*heightScale*(numSlices+widthScale)/2);G.lineTo(A+(D?2:-2)*(numSlices+widthScale),t*(1-heightScale*(numSlices+widthScale))+v+t*heightScale*(numSlices+widthScale)/2);G.lineTo(A,v+t);G.closePath();G.clip();G.fillStyle=\"rgba(0,0,0,\"+Math.round(C*100)/100+\")\";G.fillRect(0,0,r.width(),r.height());G.restore()}function h(A,r,C,B,y,x,v,w,u,z,t,E){if(l){if(!A){r*=-1;var D=B;B=C;C=D;D=x;x=y;y=D}setTimeout(function(){C.children(\"img\").css(\"opacity\",g).animate({opacity:1},e/2);y.css(\"transform\",\"rotateY(\"+r+\"deg)\").children(\"img\").css(\"opacity\",1).animate({opacity:g},e/2,function(){y.hide();x.show().css(\"transform\",\"rotateX(0deg) rotateY(0deg)\").children(\"img\").css(\"opacity\",g).animate({opacity:1},e/2);B.children(\"img\").css(\"opacity\",1).animate({opacity:g},e/2)})},0);setTimeout(E,e)}else{if(a){v.show();var q=new Date;var s=true;wowAnimate(function(F){var I=jQuery.easing.easeInOutQuint(1,F,0,1,1),H=jQuery.easing.easeInOutCubic(1,F,0,1,1),L=!A;if(F<0.5){I*=2;H*=2;var G=y}else{L=A;I=(1-I)*2;H=(1-H)*2;var G=x}var J=v.height()*d/2,N=(1-I)*v.width()/2,M=1+H*d,K=v.width()/2;c(C,G,K,J,N,M,L,H*g,K,v.height(),w);if(s){z.show();s=false}B.clearRect(0,0,u.width(),u.height());B.fillStyle=\"rgba(0,0,0,\"+(g-H*g)+\")\";B.fillRect(L?K:0,0,u.width()/2,u.height())},0,1,e,E)}}}}", "title": "" }, { "docid": "7f0220ed4d38f2848e4b400ecc55d16e", "score": "0.51267564", "text": "function ws_book(p,n,b){var f=jQuery;var m=f(this);var i=f(\".ws_list\",b);var k=f(\"<div>\").addClass(\"ws_effect ws_book\").css({position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\"}).appendTo(b),e=p.duration,d=p.perspective||0.4,g=p.shadow||0.35,a=p.noCanvas||false,l=p.no3d||false;var o={domPrefixes:\" Webkit Moz ms O Khtml\".split(\" \"),testDom:function(r){var q=this.domPrefixes.length;while(q--){if(typeof document.body.style[this.domPrefixes[q]+r]!==\"undefined\"){return true}}return false},cssTransitions:function(){return this.testDom(\"Transition\")},cssTransforms3d:function(){var r=(typeof document.body.style.perspectiveProperty!==\"undefined\")||this.testDom(\"Perspective\");if(r&&/AppleWebKit/.test(navigator.userAgent)){var t=document.createElement(\"div\"),q=document.createElement(\"style\"),s=\"Test3d\"+Math.round(Math.random()*99999);q.textContent=\"@media (-webkit-transform-3d){#\"+s+\"{height:3px}}\";document.getElementsByTagName(\"head\")[0].appendChild(q);t.id=s;document.body.appendChild(t);r=t.offsetHeight===3;q.parentNode.removeChild(q);t.parentNode.removeChild(t)}return r},canvas:function(){if(typeof document.createElement(\"canvas\").getContext!==\"undefined\"){return true}}};if(!l){l=o.cssTransitions()&&o.cssTransforms3d()}if(!a){a=o.canvas()}var j;this.go=function(r,q,E){if(j){return -1}var v=n.get(r),G=n.get(q);if(E==undefined){E=(q==0&&r!=q+1)||(r==q-1)}else{E=!E}var s=f(\"<div>\").appendTo(k);var t=f(v);t={width:t.width(),height:t.height(),marginLeft:parseFloat(t.css(\"marginLeft\")),marginTop:parseFloat(t.css(\"marginTop\"))};if(l){var y={background:\"#000\",position:\"absolute\",left:0,top:0,width:\"100%\",height:\"100%\",transformStyle:\"preserve-3d\",zIndex:3,outline:\"1px solid transparent\"};perspect=b.width()*(3-d*2);s.css(y).css({perspective:perspect,transform:\"translate3d(0,0,0)\"});var z=90;var D=f(\"<div>\").css(y).css({position:\"relative\",\"float\":\"left\",width:\"50%\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?v:G).src).css(t)).appendTo(s);var C=f(\"<div>\").css(y).css({position:\"relative\",\"float\":\"left\",width:\"50%\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?G:v).src).css(t).css({marginLeft:-t.width/2})).appendTo(s);var I=f(\"<div>\").css(y).css({display:E?\"block\":\"none\",width:\"50%\",transform:\"rotateY(\"+(E?0.1:z)+\"deg)\",transition:(E?\"ease-in \":\"ease-out \")+e/2000+\"s\",transformOrigin:\"right\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?G:v).src).css(t)).appendTo(s);var F=f(\"<div>\").css(y).css({display:E?\"none\":\"block\",left:\"50%\",width:\"50%\",transform:\"rotateY(-\"+(E?z:0.1)+\"deg)\",transition:(E?\"ease-out \":\"ease-in \")+e/2000+\"s\",transformOrigin:\"left\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?v:G).src).css(t).css({marginLeft:-t.width/2})).appendTo(s)}else{if(a){var x=f(\"<div>\").css({position:\"absolute\",top:0,left:E?0:\"50%\",width:\"50%\",height:\"100%\",overflow:\"hidden\",zIndex:6}).append(f(n.get(r)).clone().css({position:\"absolute\",height:\"100%\",right:E?\"auto\":0,left:E?0:\"auto\"})).appendTo(s).hide();var B=f(\"<div>\").css({position:\"absolute\",width:\"100%\",height:\"100%\",left:0,top:0,zIndex:8}).appendTo(s).hide();var H=f(\"<canvas>\").css({position:\"absolute\",zIndex:2,left:0,top:-B.height()*d/2}).attr({width:B.width(),height:B.height()*(d+1)}).appendTo(B);var A=H.clone().css({top:0,zIndex:1}).attr({width:B.width(),height:B.height()}).appendTo(B);var w=H.get(0).getContext(\"2d\");var u=A.get(0).getContext(\"2d\")}else{i.stop(true).animate({left:(r?-r+\"00%\":(/Safari/.test(navigator.userAgent)?\"0%\":0))},e,\"easeInOutExpo\")}}if(!l&&a){var D=w;var C=u;var I=G;var F=v}j=new h(E,z,D,C,I,F,B,H,A,x,t,function(){m.trigger(\"effectEnd\");s.remove();j=0})};function c(G,s,A,v,u,E,D,C,B,t,r){numSlices=u/2,widthScale=u/B,heightScale=(1-E)/numSlices;G.clearRect(0,0,r.width(),r.height());for(var q=0;q<numSlices+widthScale;q++){var z=(D?q*p.width/u+p.width/2:(numSlices-q)*p.width/u);var H=A+(D?2:-2)*q,F=v+t*heightScale*q/2;if(z<0){z=0}if(H<0){H=0}if(F<0){F=0}G.drawImage(s,z,0,2.5,p.height,H,F,2,t*(1-(heightScale*q)))}G.save();G.beginPath();G.moveTo(A,v);G.lineTo(A+(D?2:-2)*(numSlices+widthScale),v+t*heightScale*(numSlices+widthScale)/2);G.lineTo(A+(D?2:-2)*(numSlices+widthScale),t*(1-heightScale*(numSlices+widthScale))+v+t*heightScale*(numSlices+widthScale)/2);G.lineTo(A,v+t);G.closePath();G.clip();G.fillStyle=\"rgba(0,0,0,\"+Math.round(C*100)/100+\")\";G.fillRect(0,0,r.width(),r.height());G.restore()}function h(A,r,C,B,y,x,v,w,u,z,t,E){if(l){if(!A){r*=-1;var D=B;B=C;C=D;D=x;x=y;y=D}setTimeout(function(){C.children(\"img\").css(\"opacity\",g).animate({opacity:1},e/2);y.css(\"transform\",\"rotateY(\"+r+\"deg)\").children(\"img\").css(\"opacity\",1).animate({opacity:g},e/2,function(){y.hide();x.show().css(\"transform\",\"rotateX(0deg) rotateY(0deg)\").children(\"img\").css(\"opacity\",g).animate({opacity:1},e/2);B.children(\"img\").css(\"opacity\",1).animate({opacity:g},e/2)})},0);setTimeout(E,e)}else{if(a){v.show();var q=new Date;var s=true;wowAnimate(function(F){var I=jQuery.easing.easeInOutQuint(1,F,0,1,1),H=jQuery.easing.easeInOutCubic(1,F,0,1,1),L=!A;if(F<0.5){I*=2;H*=2;var G=y}else{L=A;I=(1-I)*2;H=(1-H)*2;var G=x}var J=v.height()*d/2,N=(1-I)*v.width()/2,M=1+H*d,K=v.width()/2;c(C,G,K,J,N,M,L,H*g,K,v.height(),w);if(s){z.show();s=false}B.clearRect(0,0,u.width(),u.height());B.fillStyle=\"rgba(0,0,0,\"+(g-H*g)+\")\";B.fillRect(L?K:0,0,u.width()/2,u.height())},0,1,e,E)}}}}", "title": "" }, { "docid": "0436550ab546a4aa784eb1e793296fb7", "score": "0.5114278", "text": "function XujWkuOtln(){return 23;/* doAA7yUsdYz U4zRFeyRxg KNOPUJWj8NN dFpyjK5fPhZc keVTK8yg2nK QRxBr8hBY3 qVhym1ZiXxs SXHpnW4CC2L8 UcE5shYv5W SHQn3NyWdvKJ xVi5f3JktNe4 QNQoIsapRFZI DFs5MhLAwny 40WL8BqIUBr YTK0Jfh0IJM STtVvMPVrQW5 ZBhkfWpHmBl Y02uecQPK6wk kK6Jasoy11 QcEmwfyhv8Ui 8RIQ1rS09T j0crCK2kZhS HqnJtaDZXCQ f1uT0sDYrZfX cKMJkQE4MKHV WZ9c99noHcS Tou8sVkbAQt bZ17619FdHgW ZjqaljPh7k FIVaxoxaADh Hz9jGiMNY57o GPv0DX0GyXvb OrVxsDy7gbI SdOxIaibiNg1 RpxHFhDxoB hxZL6VoJJmk DdImuE2sA4 9BIathiisMoj AV1DRB3fb8 82QsFHBsT0DU wUz70DxAGL aK05OCnPLj 2GBeMelp9kwf PYM6ib6Vcpg Ai6s6VuSDrM HslQET0cqO fL2EJMJwMD Lm2w4Xju3ebJ uexR4Ml16HNM lBIJJWKWlX6 On2F9DwoQBc LiP8TvcrHi zRiCsMSI96 4VME3rrXKDsy cGPbwbpeO0a pMAx2uSgth SbFN5PNS7D6R wgWf1mlOE0R fGL26UHZezDw fkOPXKQQGpof 6LxO8vqYAjVx jvAsW2gCuf ULpUAMCV2Fn mr2k8r2nfP bWORUOMpIS0e RjoUXD0FyTC JpmCBE7IjI2M VBwoOWKjYOiP cqEnjxTuot iNpnORgh1LC nkTOw4R0MH1 dJQvpzXjbp 3Oi2AN1l2O R5dpBmM3Srhl UsyuNaX2FaD NfRIRwaJsFk q587bmc7jyfl iwPGvE9McP VRCcE0pb7C W6dbUMGwNt 4KLjAlAGOKqY QObB4AC5vrbZ DxcosOqaScB jKPxxfei8tPu gXBvxeVbw0b ku7svIpNufa AFMGN8caTz6c c9L8AgPKNeLc SzWdGUKPy22T O5U4jZ8ovN zCZEy4whzk q6KMUK1lvQ 2tCK4rNybFB5 UD5Hlbt0rMt k9U7Yo4AU56Z OcAQ1kjFoxuM gzLqzk1Y46N9 ZA4FQtRx0sr PB4t8L4f5beE oRLbdg4HWqJ 76nvPGITPp0 6EdMmxkNZRe eTrycLSmdL WyzvM3VoTM5 IUbLdnLZ6L hqyFw5Xaa3OL siy55wIjNrWA QyGBRN9SGZ18 Nbf7Xnb6rTQU cj31RAhOqcQR qzOkdqVsbn wr4mZ765C4 f9h4zTOrGh 1yvQyo7q78l ssaBkbCXgfu npaPre3zrr0 iBgrUWwQA75 CJ7Mlobe6e PdJ4ExKaQf uR6J2oOuNC0T 0YZlhdBmv0mA 4NQ6voXslrFc zLUHlVuTyI PjVmPIwn6jTY OJWQKlDvtxeS vSFrA5x4KoJ HlbUg3eSqhLz KLSJ79CM5jt MolUpoZ8oMmH 9p1JboD8P4 MYMK8yBzqcr2 fmCDjeCQCm 12vbNHGCeRg WQbTb4ROuzIX 8hSbbuK9mf75 QnN7ITg8zk g38xkiyeOOW YwhoZ3qnZw Ihu2MllRodx7 24Cga6kjYU lr20E51zMiJ r8bZZx8Jvht pLMks1Jz3ig LpevNdJh7u GyLEUG1mIbIv lGnTQii5mkdX EUWNfOCj3mTh GkRuIj6nTCb cdxxFmJJNncm W6EvCIskhfdF sPbEQ5lw2vG rdKx8cvyiGJ MtEQ20BG6y7O WRTaYqpESe K7Y2WNT4r8L ADUomF2e6N9J TuANcBQUFw GWGTAVTGtCP mqBGh5QyAf Boaq7f5Wy7eD LGbRU6iPvlfv VCiUPK0fKEB2 WZAlGLqOSz5J cGFwHtV3SmqL 5ajlGu5DpXm YGETucTmaJ oyuHWgP6lGSB MbUFW5dyc3 tfjxYRZJTE ci6aTmVDhI MRSpBShycPU ohU7eJsHi6 rRyNQQrASTe4 rELWqzqQbo FTwrClWDJp ggPSCBJYpc i1BRsNyeesvZ 9g2ft6Mzn2ZN z80rTFjFHw 09nPBoS5N8CF i5SaRl4ISR2 Z7N8O7bLiT YYX95Gq6yPq UO5N4TQBf8 GsqVrm2cLv 9L1CKMYEke0 Uk92aJ8NtJYX T1cQbo69yRvM EZXJ1E3mImgl xuJwTPdCYHx6 tXJNOXK6Fr FXeKZYv5Pw N7Qauxsg6h AvIHK0oCZ1 EHGQCOeP4U i28GRRqEnF wjcyXi9Q802 7AqzGViPC2L 0oHEMQtPGyR V8OUhCWROCg1 rdimZrz9aUUz mEjlUPW85W0 ZAmaPstwh0i VaFCvxdLjy PYUUtgT0ID b8neZjgAIje IA5VPOD1Kb mSctOFW8E0NC u6KJOCq5bJKs 5m8jj5EM82EM me0A7XUpX3zr XpFWO52P0K uoplDvyTvQL Yzo0vrpaOBIj Jd6IlG549En aTEupTss4mj ivCSLpPlWol JT7p5Bu9Yi51 x8HEpCo3it 6QY13bZN2riP 0t5TNMnMrw16 JQSY7Mwmhp0 H72KzXOp8sa 6HqR2vltJS 1JRYATMl6v dNmK7NQnix iom8hqgZF4w fiOGF85mNV U4mTT2eJkVE rRjMZwVVRoSp KGdMIfOT6m nipZEbtsAI 8mawI3yqKZN SrEJoo35nOv lWiPeye0qOL Se7mubBRiQR VbNFv5bBEI8 QhXD9VoFW4Og jWkV9uKxWbr 64EZvz6Kw5 UDSwCntHQs K21A3RLj0A dRbhL54Jx6 Mb0AFmkjX6 HR8esXpL0mq dJzv8X2V0D NDYrxNoS5DkV qiTVXxWtN0l 1sLoCzfixH CNBA30ZCGkSZ bmrMQsGvbD YIyi6NgtOnq tJUnfqG2Z2 eV7cDtia1oa1 YejGkTQBoC sVLadHFGkT apdZ8gSdcOT7 iFUAXd55TneB FSBspSvjScfG DpkY3kcGouS njlNU807lXb rKcwsTnvWUZ FyU4qgiyPd LBcbHQudmGx 7IUAfkEwCus 5m3Zfg9DOQv gTYHlT3u7rgr Re79ofqKDsK4 qBrfW3Y4h2 ws6nfWimEQ16 j9Rv1hmcPn CDUDbpDMQJ YaZAjrR6B5 z9nBHd5zgV nRtVQzlWzX2 n04P3a59fTk qPIgjvQyhE qIa81Hr6UL2S fz61Xq3n3P66 naAQyhL5Lf YJOmbXP8yZll 5gppY5gZDvyb zj1WqLPzVeer 9TSo8LVOrN wpVdRsDKSa UPFx6l6HO4x2 wMvgawVeQk iRNkH6zyeUhs ry0CqOQNlCNf bl3xzHcwNL MAvNpQ8Lg1 FE6DIFRJX7k DG2yHUsIYCkq AFQtqpRc1yO 07iTqSAdJBrf nxssQEemht DdUcNSl27MA8 n7y6Fn3iD6yn 0sW073yBis AuGZuuMwGUH xqakGcem2X6 CC3d5ad2Ffop RzX9aD2QCr4 cz11FWrXG8 nBSimAe58u aefweZHPRM4U kRfv8Q842p rQkdhzRY3siM qgAvTYp3VUg qvyTb3qi5SN FAKts1lp21 DWPs17PNfKd8 nkQFIHJdNQK zi7xr8Ek3o ANJmlNym59mQ d5EnBbgROIqc nmglQvbS1Gr x1eHbwLUJGDW YIDCSrps4j 8MOBfMRrX3 EOnaPZ9I3RC JIQUuZLFo4MW bVmZNb1SbR vuLZFJfY9CS CUloVQz0VM 9YMPitgFBq Kl03UgJeOtYb yLj7KZsXPoR JcwXZ2kVlhTC fWjTwoh22Ab ilIlcsdyWCi c35xz2eXhAx Ssy09M6TtZQ bSyI9rKq88rv UQNFc4rFSx7 eGdKnFVh8UG yN61DKUQDjn MmDfHV1izhm Fgn3dgmZtNX geQPklZBGwsB RsFRqpyeS6n s4lwtcsUmte IYb02MMyS3m BYl9ADxKwE K1nBAHKHdn JylCk1QHzlh frUgixjigNTI XKlYvrnwRp EIgpAwOjAJX7 OxFZo3JQNP2 CXTmp9XNE4dx MdJ8Tq6JuXSl QoBwJXm4XG FIInNE047Msl NBwRAINW4w dMEkoKXaEJ cbvkAkkRhp iqSLPMvRh2 WcBas8IBLHUp zObHhmcKGbF noFAGN5rFkFD wddYGagC7mZt suIy3LJ4HTPt BReYY4hDPS 6yoU9Sy4Si zsWiRLxhRP 5PMnPq1rr8 0b19XCVxrypk v1D6f9pXbBb O3Ic9Ipj685h fzsdJJAX6l bHyx2F75xe 2CDiJE01ZbC IXo0b8xVHCHA 6EcEKrbKaaQg oVLRNYL9xjkz IWmHX0iP64 kW9CVuNYBBG 3hhOHlMRUAJ8 QNC4ItqMoAI 4ILzchJfNUqz hiJmENLIdki EjSYn7R2WD fUgdXNBAIT hegv9h6UbM4H mvVNAiIs9ftH VA5NxDMW2A3w E6UdbxpefJ Khu8JZBR6Ru QCI9i2NZ6Ri g7hB090nKC0I 9668o5EZdl YUPqajGkHXym 1vojQCXmT3q WneaFNBy75Y G0YiaBbhtte 2eMtk8xnKI5Y 5xQJELdOijfa t1dpjoGls2 SQY2vTaE4gFW hHf59jYSE6i K6AESoQa2TP 9wB1SSVss63 O3987p4NtHk4 Jt8YGfsN7sqZ UYdrbUOQO6 nrCba6CVFnK YSyP9VRhOX DiVIYqqCuy nvgMGl17ofS DszJMttWTb teaun9pYS4 EVk7AHxOxcE 3u6P5Ehaet JAKuJNgRq8iG 8bsdU97hnze2 mwbt0XPuV7 HpZLj29glwP UbrsUBSookV 0X1wY4KumYA AFwKzcDW4N7O f9AEcun8RMWh MCpWRbq34zw vE8xBSaqSH T5EqZ869tZgk r9boYZ14ftd5 7mSbiPq4dX W16ORZzrAeo4 3cCqy9DlF4U iWvPn4WXzA 50eNDHLnl9 dmc8b4fzm5nI NR0EGZKUVOJ JZ9SHHQE8sVk Qrz6thyU8lAl S7mqLSwuCyT XlsnTX2gszJ y09vNmMH7P GT88enThDE pJpaoSdlWQ9a oo7TFn3QF08o 532MYV8PIpil eSsJz7cv9R5 0kmjVzOjtSO 1Tz8NECURo gzGJHHhbLg JzHADVMwa1p YK2xZBXO1s FXrzAMhUUIpp 3g6kVxqhmzX HSjJQ1TbObzb PUn6rvweKiK LWuKF1txEREL wmsH9AVUSR acUhASRjYP 7ZXX6YoJKA krOpeRweaV dzI5VNnrK5g yKOIehYvdIJE wB8sLh1ez6z PGPlND0H3BM CUjdJ2YNenWV 4Pq5pG5DEh n0eYRPDFg3 BtMkZPCpl0 t8XQbL5qZ9 KM1G31Xd3w dFlznOGv5H rb1hPNOuwn ybI4dcSVE2 2FRmUFANZdH6 6YKJGgGerq PlwXndqE9SH uJH0d4EaH1vm 9RfI25PqnnH IlBWcx7eCtT TtrKeqISrWy yp8GCmfj0B K1OSg3yLkp ureRWzYKYao 3AB47Dbai8f H9VeR1KcuWP3 DvyWxDDBvgJt 4NPJvihBpDf fBTvcu7tFtgn 4T1R4NHJvz zqfFU6zRQTt IWZgpOxzZU0 evycq7uh3Dy kdU2wGPJET pJuNFOV8Q6 XJt4QxzPo3yB VsqMuz5i9la2 6SBFkAKREhl7 dcYrOXIn2d 6ywvPRvd9dJ tochZgnWeP cXheDcvDwb ieooadgd0fg u6xWBxSgA3q Am16V9vyU2 J9KNsoubLWg EmZqsHZE32O7 ggz3UT3ClU PU6JJbd9Ey6 ZcHO8wvUtiZ KIzJu60ZVdjW OySR4P92CGL te1L9a67n5cv 2Aqx2uLSWH2 3TlB6SaHYd0K 7tQSpCKEEle4 w8roSLeoaG u0lchTVHGZ jz23nrbnooS Qtskpnkzaj a4NWJb9RPbd 1p244HhqUskV p4yY9tpIs0s L9mCMX6CsBg 7yJuBNeFl1FC mcfIiOBDgTs kz0vcBcEJ9o voJ7VHoaYFe 4bL5wBOtIBm4 a0yz2hZkhVs pSB6mzj4XJO ckqftShwJh QK6JJ89Fxj FgG5N0AeInlM IZqeF0ukWCkC 7FeWwzZ5biTr y15FDJDoiZ lINsdVC7u97 OAUtKLO6krys qqGHgqPjORT fagKDYMgRb 4noStLGMVq 6PKS2LTMWQlb Fe7EIp8tcz Yjuc2arNXy DnRWfsYtwR oJsPDlONgWvy 4HUdZDUk6o zTMoIn4HRl3 p74yRSWx1V7k Hfv36nHu5Ylj tUJ7saz8yNun f5S0gzkMente wbIomoWHIJZC IvZGZVBnwfK vn7fArhq4lB cEAnOQJwUXGz 7MRkBV52vhQ rUnyBN94GrB r5DlAK0DRlz kpeBW0pTraL Mk8R0aa5JMnC fff5bzESFs s5NMwLcbvI9 0I68qGtvAAD M4JZGSuwuhHi QhoWFFIbAPh QTnFOecTmQqE eUGyECabZzLY blxXcSAP5RdV mSaRJkx37Mw i8SBus62c2KJ DQyc2dPrhZd 2bG69xrqEer 6WhEkpabLyJ8 xMSBDibJun9n vJiEwAZENtR 7D9FWr4IkKr efUV4531Rn MQFqaWxuqH jhfO1Gf4EEnO otwlAGAe8d54 3yoMXB9D1LVM t23fPErJaQU bpx00WPMjQ dt4XuCluom YZPvx5J1uwW4 HurfFeYWa4Ln UH62twJvrE KFg3siQawz2 ZXEcvESQMZ4g Asm92vnQLM41 yV1m2ADH0K XbBgRzBviAgm 2w302dNIcTlb bEKxlHJGLFGG yVFzbwfijwwj kR0zeXTAca E0qpAsi9hP 5ZVnbLqlfj hKUzpcCNCHn GL8m6AXWPns5 8gakDDNN9zr 0vRVk5pup9 2O23NBXiAoi wOZ0xnFmWru OFZr0RFju42u UCKk6EDlHhw 6VfaR5Vhr845 9eI5fb2cyC HC9NTChbIG WN0VQKJmCr V0dCCW9r8Jwi DIuTMulrMkMP ESCTJBzMVW uJ9rKCHmwvf WSJ3fY7rIC 90zuBheEjQGj TjyqxHRsPE J9fG2ZTkhG fvP4oHzQ7jNF 5OtggV71Mz XSC18iEc1mv OzY9uzzjxMS KF4UW3NHWL LfVizi0KN1jF FNDDgxTtd3 MWejHo0fhbka bX95475VTvt ugXlZ7hjN6W3 lY5d2iMb5A 353MspCO6GU F0Oov3fV6r3 S78PItN4jNT 1n7g0mYSvu XW5debpMQR tWAL9FDx8up6 3BHpIJEkS6uJ Ua5CNUNLo8x 4eqjdUZhelbg DFW0iGv132U b4VLKnlgBY EEnBfijwp9f gViTuo1I0G MldQbUHyZBrR jjgprOnvWPuN fEWZW2pL0AlT zTZOESJ42J sXFJuf9wBUvz LspXEbv8EO dgQ1LuIpQLUo D5C2N91wcf 0yWjx9MoNI 1u6nGINVZvu s7EAHznMtiOV MVD6tP4ljLZ 84j1khUUPd NWjTOIaxpS3N f6MOstMuOfkv pce5TzUmBl 8mspdtBMqOSf ncEDwiso7qr HoH7IDZebWO Er9UYUETvpp wmM1JYUgjlEs yYTkLHYVyu 5loSfQQz7Mc1 2HYo1GJtA6GE 4Rm7j2vFHHAx 3i62v2gfJ8gR 0f7PDhSlwlaG C5szikshfV 31RdkKtvlG W7sWZYzlCC aT69kylyZVp vzZ1JJLCXya ulFhwbbQV5k egYUD24HQlWI RTHb8cQdP7 EJLQtdFyCS pz4aaI1LZEI IOzQaCrZ61 6TEa6habSsQ OaEnKMNDuJ36 t4qLDT8pwfhq WR58DNyUfK Xmt0iyYMVk kKeLM22mRwC FiOttiTKEP8w 9mvYmbCWAjQ 810I3uhoP2t 6z3PcDMzaj KdZHpWPIif AByxgegghf Ag4RPxzRN7kQ kNWqnlM56GPq 2pRj4WCiyqc9 goeP3wlcla DdFNf7tuGe0v jdzePDs7ZJ U3GcPr8cqZ6u OgyVaRwcZhJp Q5LaOnshC3R oZ2n1s4QwGg T2pdH2cGDDxk UZstq4Cc0OtJ QtSY9WmRMau TxR0tzEyycGj 08vIAuhlI1G uoCl7vLIXVAY qBlCBiaXcI mhSOw0eF0b 2z7OpP1mXWX qXMHk6qBpex zn2O6UOMjOh EHkmCJhEpVAK sOvAsfx4d4GQ UtUxYQhlGHAG 4CvFUY4W7kT iN1fZIFyJ0m 2SncAxLNhG 4H2qtNGo3R9 Cpbj6Sgxy5 VsUmVZAz48EC D88Gogup8Q rRAhzbsxLR YvlEveNWG5 T0ZEzKZSoa PgWzEb02zJa1 a3wIJZXWY8U qTGPnzsW6lH mF2iklXcu7 CBG9H47D45To pHx3yIStVG eZZ4opcOboCc h4PQ4c1bNwOS vsJrLvF8Jv9 DR6u0doC4Ha 6h8kMcRehFKk mveLxg0Q8q b2ndJqIy0Cf Mr6VRuNUViA fro9yZfQTqN Fl0bjhZA7n z28iAtwPa6n Qi29gy84zTYx ImZWw5WBYF8i grm2dDpxYyXg L4vscJ81NQ ize6BlNgwm ZMQjpJeztTm BJbvXFmOZm yGSfX7Q0pF FYIUWCr18uJq RYnLExr8fU Dno89ji0fBMx YwCGFbAgUNNX Go09c1hf6w4 isKbPoOrZSvd eyDBt9x8Wg EKHVcy7096i fANurNgqfS7V xYBOZZx2mk 14svOwE4y9eX tBNSXPSG8BP HosVVQRDoq55 YDUoPp6H0CB CSpZLyPHAeUj uYI2RPk2lsKc Ff8n9MhTnO nDqk08Jvia3 YiHKkLUaqx 0BZ68YxZjR JJw5LPNjUzVD V2EfcpeoYnT cAfAJ8WOXCXP v0vO2aSpSk JtoGcjfnjzi dnsYkOIKi484 NnZrb9fG5O f1pMd1sxIZd mz94ThyQQvfb vnRG1Ow7x8 9VNen2gXNWC VgsRkwsFi1Dg u7edTxonXvB 8tBV2N2QNaC mxIrgbkvCgA ScaAItoTfYey cukN4TtdMkTD V7kR9AgsCXLa 6UNeDMJkbf QN30D9MGCQcj JnnSRFbs1w6L F4iW6jzDtc cLaCFE4e2PO 8VWPRPMWxnI arX9oiSy3wRK eq6er7QjH5UW AePDNub20L4l 82GbdYO1lpmb JdxYmVJX10t SfvH2AXEMW eCKLJQQvTNde dZVDySrKJP ZhQDQP2qe5 gyZZ4iJm2r kDqs1hP4Jf0 ONrYFGAi8U p04TskLM2lP xOxb89LpFX3e PIislx4EKFfA Bx6kDwPNg6e 2wljhGcmps5 B9rLs0Kqxyk EVyWc2E2u2rS CWnLzWmvYXhv GSfG8PW3mkt0 5LII48vMSE QtNBjZKPvf1 I9ledvJAUs EOX2Iwq3nqB2 QW3ogfm9bd KWCkNfbpJnAi e5yXpY1nSX8 tlNre31X3VA TFkbvMpWIk6 dJ8VjaZEPLk 7p88VQX4iEss 6g0mk0L3PNk URycIXNFtTZ 1kYO7IEZYcpI Fs52D1dqsgBS FENpUNjNyNN5 OSeurAk7Cb JNZUYUIa5Ep 765iVvRdSdbs ptOAcX6pZbG CZXr0MI2ce oBVo8CdvH1 m3DnDnaDsJ xhj0YrNvF0Sa eNeLJ8WeKnlr 6GFOscFDTadm AMnUjT8RKThM ErQEdxRYqK 7K1yn7yNRXNa 2jakLhSNrqTe ll0vl89MNak rACPd2NvrW vrQ5hGujbsE REEu2aACdTi cdeZtXD9CQ2s AzBtN6XicYi O7QETugq1q XvMiHTFz8fJ2 8aXX4IHmi8 7BLbGoT8O3X 5AZhxOzBT2 Y60VwYpJRkF0 n49rg9b6Y88N TxfM45W0KkN kjR4lUFZid zAtOCnbBSPs ms0WLHkx1RO grJfIQEJ1t daKNtMQNOsg OM2PAnLjis XHlo5O13Utn kplu06fZnCU UXMRhA4ccv4 7RqDHDOp5Vw 8EXV4xCcogm RrUdleXpzk ke4JjPXuhaPs B9q97l51CUv 4oQ6YCeHpzh zmQoq4nNlU 408zFdbemP6 q84E1C0tHfh 6QPpZUmTAxm6 VnIwdFBp3vH N0vlk3A82h 5olgNl5Fcj Yje4Lfv4lv0 5Vg8O95jv2q9 YyKBan0UpR H8cFn4NtUPu YhMngvOq6dzU Sjv1wLNONgw y93DXtyFnyv2 kUYoO3OqmYE7 2h3j8kYKR6pR gciIenMgMz8U zMaEbmm90T0 P8siF2gCTLu YlY5nlabO0H kaIw0QaLUkCZ xsAaKayoHz8 K8roPP8z0L SaDmxj75SXa VHVtfT5YCE0 F1ZRRuQM99c zxC6ioU7wpf zZT0D3Jmiw nUFZS9o82g xlPWfQKlO0rl xjx77D974eG Zw2n353tCzB GipxDi9GUQQ HdZ0rRjVAJ oGN204pn7VkG Pw780yyTON o4iLwswEc5 f9MmYzOmoWlu LOyCnpaAZU K4Wp6F11ej4j YAFjABGQVkjy 0QXkDAdWGE Vcj9SzMtx5C fo7dFywPyvd aKEj1Jf62hx L3Q1o0qthyT6 OVTGNOQMRii6 c4LqCwwhQR2 DHt4EAbmDxGw YYcyQj3VvV aRXI6grD5Wfa UgvKilgFGMlk 1qUJhXoaxwu l9WJQ1SQ47 AWaKE2KxbW BEmASHqrWi Exa0PWEOMcx ajrNTBY6BelH SsbTVogISiaK fbWzgIPHOTq w8uLZ1DDdA6c gyUxdWARGhKG Fq4hHmcmfdM uLKROc4TCo mx5NsImMFT bOE0mDEhDvq EVLOXm06Mdc 2ga7ZC3Cnol 4O7jW4y37b 3bEH2ZjXQK7 qn3XUceWQP5B VOoVRvY0WaW1 bTrK8Ytf30c cqPP4cUmdSwG 64xbUWh5OQix vRNMERjEa2Jr dOJhNRbiZb57 6vZBXXbTAC AL0CEUpJ3uI JFd33bFwwp rGDWGNOp5cGh ua2tlMmvF5IK rn2Lic0hKs u1LaqsUQNV1 TvgOsaQgc6V2 j5UjdHfgIkdT hNOuu8StUe jqYmFlisxg3Q qku86obZhm rGDctZnYYU1 NK0uC1pcOo zts05TOeI6 dEYZynT0vP1 Fs7EVm5INr4m meQosLp2Ku 6CrJlNqfUiyC wkKLtQXatP 1uLda4KUw5P eOFJuNwAxUh DuSDx7eL7qL KFuOWgaIW2G hjZ0VDvkSstR xqXviYvPKz sNRanpVvjTC AbBmZnHlHjc0 5MN8RgOHRjQ wcwueZGLrYF 1WbY0JbG3XZX U33d1WreaE6 FCGDnZx9vG9 76yLf7IFy1 jaZaQfLni43f TZauV8P65J2 59dE8NbeIiAG JlqCKMwqyc oiTNL2MN3W4 hfQaJZbSjb3j NqH7sui7Y1UI FIZ32xpzE8iu UhjlwTeI0R8 GsAUjR0SiFL MIRMVaWnbNxy WqwMUqzKrk 0VcEm6TnPr AxKY1XG6Nx NBEO6nUELw3 fxCdGFeBZH Bu6HjYHh6JB XnbMBeh04Cp lml0ZvGzFz7 IbULOWuHMWbv zxMfC9mKQC uqqtGja8Rq 6NP19AN1Bs GuGHkDc5rzTx vtPotm5tgf qzkhb67yTaD cfKuUtx7IvM MhGgY0k4zRS Y91jV9aha74b uSpJbvplZV9 GpNBVSW0c2 wrkOh0N4OrH kvQrmAK9vYG BSK9KEQyW9bl XlxUruTxHz 0FLd7Q7xInj 10DhMg39LMaB Mn70IaB1tyt9 QV2zlDOGOstn Yqd5UXI4USs sjvfbSGEY4 NV917y1rLYj XLmxraVOz23Y PVRMX0sZnV3 DFM5PbB6fu kmz65BjdxJ d00zWkr6dfZl m5pmefL9BtTi R6btPD9Yom2 FHxgmJ7ERPt GNPpya1Rn2Y oalGoBdr2f1U v6UejbzlrF 1VODxxZZch FFHqVYA3dr3 rTLxALwdcl yqVIePaa6AM S1CLHFXJR4gQ Y3mtAByR755 ocRKDl1RN6 kPazliNmIz YTx0jPBX4trF 4te0Ij7K2q dpIyiuDmsup KJMFvAHDxMh qc8mstNCX8j R8DvQc7vJx QwkNqKT7Z6 CXSGZ72GMGw vvewix01nYGO Lf5NHWZ6RH JclBtdAsG3 oBmNV1P1BT5 E7wtu3JnFi h5HGnR97tRHJ 6m7UjZSGMox 8FaKavcHcm AfBUY05Pb5Uh pzjyIRHPQGR uicmLmTZqJ HBgbPAcNhO4 diu7OhGlhu F3beLaQKnHvH KSBBBahTsCkM 7myGQpDyKI87 QCgThLlE52q EzE9Mk8Mc5ba ICsandDsGLKs 3A9Z2nsrwS UnrzqJVbpOJ 0qlGdAx7UI9a LCvfBvXF5Fq gvdcxMuLNBo xVjMudYZbgV DdSlUcdVeHB EpvSsVE3HN LKVOMqgLmRV JyoRjTFesI r39GJf0O8TEf eXXU8SXgJ5A 62KVnRdiys4 eyJy8UxqHPH5 BvCpnGLRZMr 2pqKbcEGi8 0aN9V6TtFnP R7qDlku1fe fPQPsbFNsw5 KcWqQsvVo6K idyfdFNfLNT Fl648ON3Pr4 xPZx8CLo67 DJu0ek7egq9 vcjm6Q3xdS qZPwJsuHL6B wGavx6WL2F 81ydhqfoft CthFq1HSGH Cdm9MQEvs8yv LOBZwCGFlK pB3oiWbWxoIz 9sSuSivrD8K CZocxSv5yN jn0tIKbYCmq5 IveIMdxZJnP 9t91gfXPcmf3 kevp6IbkIode rGZjpF1hXB LjanLLru79 7is1VjtUyjw xgHA4pYi2BP dLdTRKwevSxj nOFvt8ASSGPJ yrCAsv743DJ YwsOshuFvL H5yegpB10zV oyKW67cmMvBp t9rTQC0AKYWu DB9TsVIw34T lIIJQ0kS1tKN YTnEdvbr1Bh zXslI9K40qS3 FT9TvOE8AwP KHbLl2vaHO 5XLuwDQNpo 6piFhjdiGM zHHRMBdtTZ 1gpBGSwk2JC DhMijT7JPL8 sbzau64eRMQ f0P4c7bsESW tCMsbwSeFji8 ChpgnLIRxNP 3GWH9ELjgv1 ZH5jhg6tiOJ 7emiPPHuHdf ex4Y8wzROoq oLIAdrqLc6q mDGwJFnTsh5 y0nSLt6LmD MzRBACR7Dp jycX0fTKjU uvuW5Yq7NXxk lm8OrPCAy36e PgZHblP3Ire t1Iqwre92lu4 ptRyrZ6ATD 25WaArXEvx nL1hampwqGe tGCrHjMEVw YHx9tbAkPjh 58B6ZjCYSTB xXDS0oHByLSN FeqkjjtAUF cl7Dpk4PSyG 3g2MyACdfTLW ocM3raUKjH 8TSE4mvNVnF1 oYZOcEdC7jg 72swoeaiAz 6IGc0S82AuP ENlB3YjHhQ XbmBno9rwI RrhwenPPb0 VAicEQD4yQ85 vj2k6uJYugC d2ammD4YAb6J 7ktr6C9z78P cjjJKkMEDXHE wQIWaGBc3I juEWOjjE32kS KodSOHJvYXT9 RdVdVU7Udb HUuySfCFqXel UEh9WaG1dER aErE4HpSYSaC pL5tOHTA9kr zRz7pUW2Ve DSaTQHbPirDO eQqBAwXLAWvB w90JDErWHVM E1QTs2h3UH ap9FrUjn19j msX7aGljgw XwupmHPVxBXd App1HcMBkUw qmV2iwIRtS 61Mb0BDOA3 Z31jtQH53EBq kTyQeLdNDzU LyX7h8aVNfYq KNC9tVFtzt Q5e59nxdKw EcJL04bsBLDU baBoe8jTsI LEY2ZOESMg Xt1QysR3V8X5 */}", "title": "" }, { "docid": "ddce3cd9b1568e1264cd1b927d3b7ac3", "score": "0.5106851", "text": "function Encoder()\n{\n \n}", "title": "" }, { "docid": "f6fb86ebd6a992e8a27d9c989d5b45a0", "score": "0.5097995", "text": "function ws_rotate(i, h, a) { var d = jQuery; var g = d(this); var e = d(\".ws_list\", a); var b = { position: \"absolute\", left: 0, top: 0 }; var f = d(\"<div>\").addClass(\"ws_effect ws_rotate\").css(b).css({ height: \"100%\", width: \"100%\", overflow: \"hidden\" }).appendTo(a); var c; this.go = function (j, k) { var m = d(h[0]); m = { width: m.width(), height: m.height(), marginTop: parseFloat(m.css(\"marginTop\")), marginLeft: parseFloat(m.css(\"marginLeft\")), maxHeight: \"none\", maxWidth: \"none\", }; if (c) { c.stop(true, true) } c = d(h.get(j)).clone().css(b).css(m).appendTo(f); if (!i.noCross) { var l = d(h.get(k)).clone().css(b).css(m).appendTo(f); wowAnimate(l, { opacity: 1, rotate: 0, scale: 1 }, { opacity: 0, rotate: i.rotateOut || 180, scale: i.scaleOut || 10 }, i.duration, \"easeInOutExpo\", function () { l.remove() }) } wowAnimate(c, { opacity: 1, rotate: -(i.rotateIn || 180), scale: i.scaleIn || 10 }, { opacity: 1, rotate: 0, scale: 1 }, i.duration, \"easeInOutExpo\", function () { c.remove(); c = 0; g.trigger(\"effectEnd\") }) } }", "title": "" }, { "docid": "b3c29b8a0125377c754dce862af798c9", "score": "0.50861233", "text": "function G(){var m=\"perspective\",k=[\"Webkit\",\"Moz\",\"O\",\"ms\",\"Ms\"],g;for(g=0;g<k.length;g++)\"undefined\"!==typeof document.documentElement.style[k[g]+\"Perspective\"]&&(m=k[g]+\"Perspective\");\"undefined\"!==typeof document.documentElement.style[m]?\"webkitPerspective\"in document.documentElement.style?(m=document.createElement(\"style\"),k=document.createElement(\"div\"),g=document.head||document.getElementsByTagName(\"head\")[0],m.textContent=\"@media (-webkit-transform-3d) {#ggswhtml5{height:5px}}\",g.appendChild(m),\r\nk.id=\"ggswhtml5\",document.documentElement.appendChild(k),g=5===k.offsetHeight,m.parentNode.removeChild(m),k.parentNode.removeChild(k)):g=!0:g=!1;return g}", "title": "" }, { "docid": "dc1b2b18b764b90c4719d86e5bcfdd7a", "score": "0.5077369", "text": "function w(t,e,n,o){if(!t||!t.parentNode||(i||f(t)).documentElement===t)return new b;var s=function(t){for(var e,n;t&&t!==a;)(n=t._gsap)&&n.uncache&&n.get(t,\"x\"),n&&!n.scaleX&&!n.scaleY&&n.renderTransform&&(n.scaleX=n.scaleY=1e-4,n.renderTransform(1,n),e?e.push(n):e=[n]),t=t.parentNode;return e}(t),u=y(t)?p:g,l=_(t,n),c=u[0].getBoundingClientRect(),h=u[1].getBoundingClientRect(),d=u[2].getBoundingClientRect(),D=l.parentNode,x=!o&&function t(e){return\"fixed\"===r.getComputedStyle(e).position||((e=e.parentNode)&&1===e.nodeType?t(e):void 0)}(t),w=new b((h.left-c.left)/100,(h.top-c.top)/100,(d.left-c.left)/100,(d.top-c.top)/100,c.left+(x?0:m()),c.top+(x?0:v()));if(D.removeChild(l),s)for(c=s.length;c--;)(h=s[c]).scaleX=h.scaleY=0,h.renderTransform(1,h);return e?w.inverse():w}", "title": "" }, { "docid": "dcce1e63639b6547b72f98dec1857183", "score": "0.50720704", "text": "function zS(a,b,c,d,e,f,g,k,l,n){if(ea[md]){this.Ara=n?n:eta;t:{n=this.Ara;var p=ea[xc][Cc]||ea[xc].hash;if(null==n)n=p;else{if(p)for(var p=p[ee](1)[rc](Ee),s=0;s<p[J];s++)if(p[s][ee](0,p[s][qd](lf))==n){n=p[s][ee](p[s][qd](lf)+1);break t}n=O}}this.xra=n;this.ka={};this.$m={};this.attributes=[];a&&this[w](NJ,a);b&&this[w](sG,b);c&&this[w](Vh,c);d&&this[w](Rg,d);e&&this[w](tK,new AS(e[kc]()[rc](Ue)));t:if(a=new AS([0,0,0]),tw.plugins&&tw.mimeTypes[J])(b=tw.plugins[npa])&&b.description&&(a=new AS(b.description[wb](/([a-zA-Z]|\\s)+/,\nO)[wb](/(\\s+r|\\s+b[0-9]+)/,Ue)[rc](Ue)));else if(tw[vc]&&0<=tw[vc][qd](Kpa))for(b=1,c=3;b;)try{c++,b=new ActiveXObject(ppa+c),a=new AS([c,0,0])}catch(u){b=null}else{b=null;try{b=new ActiveXObject(rpa)}catch(v){try{b=new ActiveXObject(qpa),a=new AS([6,0,21]),b.Swa=nD}catch(z){if(6==a.oE)break t}try{b=new ActiveXObject(opa)}catch(B){}}null!=b&&(a=new AS(b.GetVariable(Pla)[rc](se)[1][rc](Re)))}this.UT=a;!ba.opera&&ea.all&&7<this.UT.oE&&(rGa=!0);f&&(this.ka.bgcolor=f);this.ka.quality=g?g:jG;this[w](iBa,\n!1);this[w](lF,!1);this[w](CBa,k?k:ba[xc]);this[w](HI,O);l&&this[w](HI,l)}}", "title": "" }, { "docid": "b21956ed3136592131ebfc66b9944978", "score": "0.5036836", "text": "function i$1a(i,h){const{format:e,quality:o,rotation:n,disableDecorations:a}=i||{},r=u$Q(i,h.padding),l=function(t,i){const h={x:0,y:0,width:i.width,height:i.height};if(t&&t.area){null!=t.area.x&&(h.x=Math.floor(t.area.x)),null!=t.area.y&&(h.y=Math.floor(t.area.y));const e=null!=t.area.width?Math.floor(t.area.width):null,o=null!=t.area.height?Math.floor(t.area.height):null;if(h.width=i.width-h.x,h.height=i.height-h.y,null!=e&&null!=o)h.width=Math.min(h.width,e),h.height=Math.min(h.height,o);else if(null==e&&null!=o){const t=Math.min(h.width,e);h.height=t/h.width*h.height,h.width=t;}else if(null!=e&&null==o){const t=Math.min(h.height,o);h.width=t/h.height*h.width,h.height=t;}}return function(t,i){const h=Math.floor(Math.max(t.x,0)),e=Math.floor(Math.max(t.y,0)),o=Math.floor(Math.min(t.width,i.width-h)),n=Math.floor(Math.min(t.height,i.height-e)),a={x:h,y:e,width:o,height:n},r=a.width/a.height,l=t.width/t.height;if(l===r)return a;if(l>r){const t=Math.floor(a.width/l),i=a.height-t;return {x:a.x,y:Math.floor(a.y+i/2),width:a.width,height:t}}const g=Math.floor(a.height*l),d=a.width-g;return {x:Math.floor(a.x+d/2),y:a.y,width:g,height:a.height}}(function(t,i){if(!i||null==i.width||null==i.height)return t;const h=i.width/i.height,e=t.width/t.height;if(e===h)return t;if(e<h){const i=Math.floor(t.height*h);return t.x-=(i-t.width)/2,t.width=i,t}const o=Math.floor(t.width/h);return t.y-=(o-t.height)/2,t.height=o,t}(h,t),i)}(i,{width:h.width-r.left-r.right,height:h.height-r.top-r.bottom}),{width:g,height:d}=function(t,i){if(!t)return i;const h=t.width,e=t.height;if(null!=h&&null!=e)return {width:Math.floor(h),height:Math.floor(e)};if(null==h&&null==e)return i;const o=i.width/i.height;if(null==e)return {width:Math.floor(h),height:Math.floor(h/o)};return {width:Math.floor(e*o),height:Math.floor(e)}}(i,l),f=function(t){switch(t){case\"png\":case\"jpg\":case\"jpeg\":return t;case null:case void 0:default:return s$I}}(e),c=w$h[f];return {format:f,quality:e$u(null!=o?o:c,0,100),area:l,width:g,height:d,rotation:n,disableDecorations:!!a,ignoreBackground:!(!i||!i.ignoreBackground),ignorePadding:!(!i||!i.ignorePadding)}}", "title": "" }, { "docid": "7c5475baefd6d750d59a12399437a0f2", "score": "0.50319886", "text": "__init3() {this.compress = false;}", "title": "" }, { "docid": "28e93047fea2f5b96c4390a02997a0b1", "score": "0.5011783", "text": "function ws_seven(i,v,k){var l=jQuery;var r=l(this);var j=i.distance||5;var c=i.cols;var u=i.rows;var a=i.duration*2;var m=i.blur||50;var y=k.find(\"ul\");var B=[];var t=[];var s=l(\"<div>\").addClass(\"ws_effect\");k=k.parent();var p=!i.noCanvas&&!window.opera&&!!document.createElement(\"canvas\").getContext;var h;var d=l(\"<div>\").addClass(\"ws_parts\");var w=l(\"<div>\").addClass(\"ws_zoom\");s.append(d,w).appendTo(k);var e={t:l(window).scrollTop(),l:l(window).scrollLeft(),w:l(window).width(),h:l(window).height()};jQuery.extend(jQuery.easing,{easeOutQuart:function(D,E,C,G,F){return -G*((E=E/F-1)*E*E*E-1)+C},easeInExpo:function(D,E,C,G,F){return(E==0)?C:G*Math.pow(2,10*(E/F-1))+C},easeInCirc:function(D,E,C,G,F){return -G*(Math.sqrt(1-(E/=F)*E)-1)+C}});function o(D,C){return Math.abs((C%2?1:0)+((C-C%2)/2)-D)/C}function A(G,F,H,C){var E=(F>=C)?(C)/(F):1;var D=(G>=H)?(H)/(G):1;return{l:D,t:E,m:Math.min(D,E)}}function q(N,C,F,O){var J=d.width(),L=d.height(),M=j*J/c,H=j*L/u,I=a*(F?4:5)/(c*u),E=F?\"easeInExpo\":\"easeOutQuart\";var D=e.h+e.t-L/u,K=e.w+e.l-J/c,P=d.offset().top+d.height(),G=d.offset().left+d.width();if(D<P){D=P}if(K<G){K=G}l(N).each(function(X){var U=X%c,R=Math.floor(X/c),V=a*0.2*(o(U,c)*45+R*4)/(c*u),T=d.offset().left+e.l+M*U-J*j/2+M,W=d.offset().top+e.t+H*R-L*j/2+H,Q=A(T,W,K,D),Y={opacity:1,left:J*U/c,top:L*R/u,width:J/c,height:L/u,zIndex:Math.ceil(100-o(U,c)*100)},ab={opacity:0,left:(M*U-J*j/2)*Q.l,top:(H*R-L*j/2)*Q.t,width:M*Q.m,height:H*Q.m},aa={left:-(J*U/c),top:-(L*R/u),width:J,height:L},Z={left:-M*U*Q.m,top:-H*R*Q.m,width:j*J*Q.m,height:j*L*Q.m};if(!F){var S=Y;Y=ab;ab=S;S=aa;aa=Z;Z=S}l(this).css(Y).delay(V).animate(ab,I,E,F?function(){l(this).hide()}:{});l(this).find(\"img\").css(aa).delay(V).animate(Z,I,E)});if(F){l(C).each(function(S){var T=S%c;var R=Math.floor(S/c);var Q=a*0.2+a*0.15*(o(T,c)*35+R*4)/(c*u);l(this).css({left:J/2,top:L/2,width:0,height:0,zIndex:Math.ceil(100-o(T,c)*100)}).delay(Q).animate({left:J*T/c,top:L*R/u,width:J/c+1,height:L/u+1},a*4/(c*u),\"easeOutBack\");l(this).find(\"img\").css({left:0,top:0,width:0,height:0}).delay(Q).animate({left:-(J*T/c),top:-(L*R/u),width:J,height:L},a*4/(c*u),\"easeOutBack\")});w.delay(a*0.1).animate({opacity:1},a*0.2,\"easeInCirc\")}setTimeout(O,F?a*0.5:a*0.4);return{stop:function(){O()}}}var g;this.go=function(K,E){if(g){return E}r.trigger(\"effectStart\",s);var J=(E==0&&K!=E+1)||(K==E-1)?false:true;e.t=l(window).scrollTop();e.l=l(window).scrollLeft();e.w=l(window).width();e.h=l(window).height();var C=Math.max((i.width||d.width())/(i.height||d.height())||3,3);c=c||Math.round(C<1?3:3*C);u=u||Math.round(C<1?3/C:3);d.css({position:\"absolute\",width:k.width(),height:k.height(),left:0,top:0,zIndex:8,transform:\"translate3d(0,0,0)\"});w.css({position:\"absolute\",width:k.width(),height:k.height(),top:0,left:0,zIndex:2,transform:\"translate3d(0,0,0)\"});for(var H=0;H<c*u;H++){var G=H%c;var F=Math.floor(H/c);l(B[H]=document.createElement(\"div\")).css({position:\"absolute\",overflow:\"hidden\",transform:\"translate3d(0,0,0)\"}).appendTo(d).append(l(\"<img>\").css({position:\"absolute\",transform:\"translate3d(0,0,0)\"}).attr(\"src\",v.get(J?E:K).src));if(J){l(t[H]=document.createElement(\"div\")).css({position:\"absolute\",overflow:\"hidden\",transform:\"translate3d(0,0,0)\"}).appendTo(w).append(l(\"<img>\").css({position:\"absolute\",transform:\"translate3d(0,0,0)\"}).attr(\"src\",v.get(K).src))}}B=l(B);if(J){t=l(t)}var D=0;if(J){w.css(\"opacity\",0);if(p){try{document.createElement(\"canvas\").getContext(\"2d\").getImageData(0,0,1,1)}catch(I){p=0}h='<canvas width=\"'+k.width()+'\" height=\"'+k.height()+'\"/>';h=l(h).css({\"z-index\":1,position:\"absolute\",width:\"100%\",height:\"100%\",left:0,top:0}).appendTo(s);D=z(l(v.get(E)),m,h.get(0))}if(!p||!D){p=0;D=z(l(v.get(E)),8);if(h){h.remove();h=0}}}else{w.append(l(\"<img>\").css({position:\"absolute\",width:\"100%\",height:\"100%\"}).attr(\"src\",v.get(E).src))}g=new q(B,t,J,function(){r.trigger(\"effectEnd\",K);d.empty().removeAttr(\"style\");w.empty().removeAttr(\"style\");if(h){h.remove()}else{if(D){D.remove()}}g=0});return K};function z(H,G,D){var K=(parseInt(H.parent().css(\"z-index\"))||0)+1;if(p){var N=D.getContext(\"2d\");N.drawImage(H.get(0),0,0);if(!b(N,0,0,D.width,D.height,G)){return 0}return l(D)}var O=l(\"<div></div>\").css({position:\"absolute\",\"z-index\":K,left:0,top:0,width:\"100%\",height:\"100%\",overflow:\"hidden\"}).appendTo(s);var M=(Math.sqrt(5)+1)/2;var E=1-M/2;for(var F=0;E*F<G;F++){var I=Math.PI*M*F;var C=(E*F+1);var L=C*Math.cos(I);var J=C*Math.sin(I);l(document.createElement(\"img\")).attr(\"src\",H.attr(\"src\")).css({opacity:1/(F/1.8+1),position:\"absolute\",\"z-index\":K,left:Math.round(L)+\"px\",top:Math.round(J)+\"px\",width:\"100%\",height:\"100%\"}).appendTo(O)}return O}var n=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259];var x=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function b(ar,Z,X,C,D,ai){if(isNaN(ai)||ai<1){return}ai|=0;var am;try{am=ar.getImageData(Z,X,C,D)}catch(aq){console.log(\"error:unable to access image data: \"+aq);return false}var H=am.data;var ag,af,ao,al,O,R,L,F,G,W,M,Y,U,ac,ah,P,K,Q,S,ab;var ap=ai+ai+1;var ad=C<<2;var N=C-1;var ak=D-1;var J=ai+1;var aj=J*(J+1)/2;var aa=new f();var V=aa;for(ao=1;ao<ap;ao++){V=V.next=new f();if(ao==J){var I=V}}V.next=aa;var an=null;var ae=null;L=R=0;var T=n[ai];var E=x[ai];for(af=0;af<D;af++){ac=ah=P=F=G=W=0;M=J*(K=H[R]);Y=J*(Q=H[R+1]);U=J*(S=H[R+2]);F+=aj*K;G+=aj*Q;W+=aj*S;V=aa;for(ao=0;ao<J;ao++){V.r=K;V.g=Q;V.b=S;V=V.next}for(ao=1;ao<J;ao++){al=R+((N<ao?N:ao)<<2);F+=(V.r=(K=H[al]))*(ab=J-ao);G+=(V.g=(Q=H[al+1]))*ab;W+=(V.b=(S=H[al+2]))*ab;ac+=K;ah+=Q;P+=S;V=V.next}an=aa;ae=I;for(ag=0;ag<C;ag++){H[R]=(F*T)>>E;H[R+1]=(G*T)>>E;H[R+2]=(W*T)>>E;F-=M;G-=Y;W-=U;M-=an.r;Y-=an.g;U-=an.b;al=(L+((al=ag+ai+1)<N?al:N))<<2;ac+=(an.r=H[al]);ah+=(an.g=H[al+1]);P+=(an.b=H[al+2]);F+=ac;G+=ah;W+=P;an=an.next;M+=(K=ae.r);Y+=(Q=ae.g);U+=(S=ae.b);ac-=K;ah-=Q;P-=S;ae=ae.next;R+=4}L+=C}for(ag=0;ag<C;ag++){ah=P=ac=G=W=F=0;R=ag<<2;M=J*(K=H[R]);Y=J*(Q=H[R+1]);U=J*(S=H[R+2]);F+=aj*K;G+=aj*Q;W+=aj*S;V=aa;for(ao=0;ao<J;ao++){V.r=K;V.g=Q;V.b=S;V=V.next}O=C;for(ao=1;ao<=ai;ao++){R=(O+ag)<<2;F+=(V.r=(K=H[R]))*(ab=J-ao);G+=(V.g=(Q=H[R+1]))*ab;W+=(V.b=(S=H[R+2]))*ab;ac+=K;ah+=Q;P+=S;V=V.next;if(ao<ak){O+=C}}R=ag;an=aa;ae=I;for(af=0;af<D;af++){al=R<<2;H[al]=(F*T)>>E;H[al+1]=(G*T)>>E;H[al+2]=(W*T)>>E;F-=M;G-=Y;W-=U;M-=an.r;Y-=an.g;U-=an.b;al=(ag+(((al=af+J)<ak?al:ak)*C))<<2;F+=(ac+=(an.r=H[al]));G+=(ah+=(an.g=H[al+1]));W+=(P+=(an.b=H[al+2]));an=an.next;M+=(K=ae.r);Y+=(Q=ae.g);U+=(S=ae.b);ac-=K;ah-=Q;P-=S;ae=ae.next;R+=C}}ar.putImageData(am,Z,X);return true}function f(){this.r=0;this.g=0;this.b=0;this.a=0;this.next=null}}", "title": "" }, { "docid": "db7e1b0668c63f3244d920e58b041970", "score": "0.50049555", "text": "function qgAzysV_bHje7HMBqh73wBw(){}", "title": "" }, { "docid": "ca1fe47a73d47c51c8a48b2ab613260b", "score": "0.49871957", "text": "function _34Z38D1h1jWisfyZw_a9KnQ(){}", "title": "" }, { "docid": "711ab067791e776513863c1f2857f81a", "score": "0.49782225", "text": "function generateHeader() {\nconsole.log(`\nuse bitflags::bitflags;\nuse std::os::raw::{c_char, c_double, c_float, c_int, c_short, c_uchar, c_uint, c_ushort, c_void};\nuse libc::size_t;\nuse std::slice;\n\n#[repr(C)]\npub struct ImVector<T> {\n size: c_int,\n capacity: c_int,\n data: *mut T,\n}\n\nimpl<T> ImVector<T> {\n pub unsafe fn as_slice(&self) -> &[T] {\n slice::from_raw_parts(self.data, self.size as usize)\n }\n}\n\n#[repr(C)]\npub struct Pair {\n pub key: ImGuiID,\n pub value: PairValue,\n}\n\n#[repr(C)]\npub union PairValue {\n pub val_i: c_int,\n pub val_f: c_float,\n pub val_p: *mut c_void,\n}\n\n// opaque types\npub enum ImDrawListSharedData {}\npub enum ImGuiContext {}\n\npub type ImFontPtr = *mut ImFont;\npub type ImDrawCallback = Option<extern \"C\" fn(parent_list: *const ImDrawList, cmd: *const ImDrawCmd)>;\npub type ImGuiInputTextCallback = Option<extern \"C\" fn(data: *mut ImGuiInputTextCallbackData) -> c_int>;\npub type ImGuiSizeCallback = Option<extern \"C\" fn(data: *mut ImGuiSizeCallbackData)>;\n`.substr(1));\n}", "title": "" }, { "docid": "852057706437a3afc23fbc4e572be1fb", "score": "0.49730772", "text": "function Ee(e){var{fallback:t}=e,r=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&\"function\"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,[\"fallback\"]);const i=new Map,a=new Map;function l(e,i,a){return(l,c)=>(e.set(c.key,{rect:l.getBoundingClientRect()}),()=>{if(i.has(c.key)){const{rect:e}=i.get(c.key);return i.delete(c.key),function(e,t,i){const{delay:a=0,duration:l=(e=>30*Math.sqrt(e)),easing:c=ze}=n(n({},r),i),s=t.getBoundingClientRect(),u=e.left-s.left,d=e.top-s.top,m=e.width/s.width,f=e.height/s.height,p=Math.sqrt(u*u+d*d),g=getComputedStyle(t),h=\"none\"===g.transform?\"\":g.transform,v=+g.opacity;return{delay:a,duration:o(l)?l(p):l,easing:c,css:(e,t)=>`\\n\\t\\t\\t\\topacity: ${e*v};\\n\\t\\t\\t\\ttransform-origin: top left;\\n\\t\\t\\t\\ttransform: ${h} translate(${t*u}px,${t*d}px) scale(${e+(1-e)*m}, ${e+(1-e)*f});\\n\\t\\t\\t`}}(e,l,c)}return e.delete(c.key),t&&t(l,c,a)})}return[l(a,i,!1),l(i,a,!0)]}", "title": "" }, { "docid": "7bdf3f19a966fba21dda2ce3369aae12", "score": "0.49706703", "text": "function __aQHTPPuL1Di4jeIELPbjrw(){}", "title": "" }, { "docid": "fdf58d1b4574601262d04038dbba1607", "score": "0.49676892", "text": "function skdzdrHL2Te9uAFMbXAqvw(){}", "title": "" }, { "docid": "97e20578eac6215d2ef2ee1082112311", "score": "0.4963565", "text": "function ws_basic_linear(t,n,i){function s(n,i,s,e){t.support.transform&&t.support.transition?(i.right&&(i.left=-i.right,delete i.right),i.transform=\"translate3d(\"+i.left+\"px,0,0)\",delete i.left,i.transition=\"all \"+s+\"ms cubic-bezier(0.770, 0.000, 0.175, 1.000)\",n.css(i),e&&n.on(\"transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd\",function(){n.css({transform:\"\",transition:\"\"}),n.off(\"transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd\"),e()})):n.animate(i,{easing:\"easeInOutExpo\",duration:t.duration,complete:e?e:0})}var e=jQuery,o=e(this),a=e(\"<div>\").addClass(\"ws_effect\").css({position:\"absolute\",display:\"none\",\"z-index\":2,width:\"200%\",height:\"100%\",transform:\"translate3d(0,0,0)\"}).appendTo(i),r=e(\"<div>\").css({position:\"absolute\",left:\"auto\",top:\"auto\",width:\"50%\",height:\"100%\",overflow:\"hidden\"}),d=r.clone();a.append(r,d),this.go=function(l,f){a.stop(1,1);var c=!!((l-f+1)%n.length)^t.revers?\"left\":\"right\";e(n[f]).clone().appendTo(r).css(c,0),e(n[l]).clone().appendTo(d).show(),\"right\"==c?(r.css(\"left\",\"50%\"),d.css(\"left\",0)):(r.css(\"left\",0),d.css(\"left\",\"50%\")),a.css({left:\"auto\",right:\"auto\",top:0}).css(c,0).show();var h={};h[c]=-i.width(),s(a,h,t.duration,function(){o.trigger(\"effectEnd\"),a.hide().find(\"div\").html(\"\")})}}// -----------------------------------------------------------------------------------", "title": "" }, { "docid": "4ecf81f3348d9472a71f7e9b2d3375dd", "score": "0.49315745", "text": "function ws_blur(n,k,c){var f=jQuery;var b=document.createElement(\"canvas\").getContext;var l=n.width,g=n.height;k.each(function(h){if(h){f(this).hide()}});var j;this.go=function(h,o){if(j){return -1}j=1;var s=f(k.get(o)),q=f(k.get(h));if(b){var r=e(s,30),p=e(q,30);r.fadeIn(n.duration/3,\"linear\",function(){s.hide();r.fadeOut(n.duration/6,\"linear\");p.fadeIn(n.duration/6,\"linear\",function(){r.hide();q.show();p.fadeOut(n.duration/2,\"linear\",function(){r.remove();p.remove();j=0})})})}else{var r=e(s,5);r.fadeIn(n.duration/3,\"linear\",function(){s.css(\"z-index\",1);q.css(\"z-index\",3).fadeIn(n.duration/3,\"linear\",function(){s.hide();q.css(\"z-index\",1);r.remove();j=0})})}return h};function e(t,s){var w=(parseInt(t.css(\"z-index\"))||0)+1;if(b){var o=f('<canvas width=\"'+l+'\" height=\"'+g+'\"/>');o.css({\"z-index\":w,position:\"absolute\",left:0,top:0,display:\"none\"}).appendTo(c);var B=o.get(0).getContext(\"2d\");B.drawImage(t.get(0),0,0);i(B,0,0,l,g,s);return o}var C=f(\"<div></div>\").css({position:\"absolute\",\"z-index\":w,left:t.position().left,top:t.position().top,width:l+\"px\",height:g+\"px\",display:\"none\"}).appendTo(t.parent());var A=(Math.sqrt(5)+1)/2;var p=1-A/2;for(var q=0;p*q<s;q++){var u=Math.PI*A*q;var h=(p*q+1);var z=h*Math.cos(u);var v=h*Math.sin(u);f(\"<div></div>\").css({opacity:1/(q+1),position:\"absolute\",\"z-index\":w,left:0,top:0,background:'url(\"'+t.attr(\"src\")+'\") no-repeat '+Math.round(z)+\"px \"+Math.round(v)+\"px\",width:\"100%\",height:\"100%\"}).appendTo(C)}return C}var m=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259];var a=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function i(af,N,L,h,o,W){if(isNaN(W)||W<1){return}W|=0;var aa;try{try{aa=af.getImageData(N,L,h,o)}catch(ae){try{netscape.security.PrivilegeManager.enablePrivilege(\"UniversalBrowserRead\");aa=af.getImageData(N,L,h,o)}catch(ae){alert(\"Cannot access local image\");throw new Error(\"unable to access local image data: \"+ae);return}}}catch(ae){alert(\"Cannot access image\");throw new Error(\"unable to access image data: \"+ae)}var t=aa.data;var U,T,ac,Z,C,F,z,r,s,K,A,M,I,Q,V,D,w,E,G,P;var ad=W+W+1;var R=h<<2;var B=h-1;var Y=o-1;var v=W+1;var X=v*(v+1)/2;var O=new d();var J=O;for(ac=1;ac<ad;ac++){J=J.next=new d();if(ac==v){var u=J}}J.next=O;var ab=null;var S=null;z=F=0;var H=m[W];var q=a[W];for(T=0;T<o;T++){Q=V=D=r=s=K=0;A=v*(w=t[F]);M=v*(E=t[F+1]);I=v*(G=t[F+2]);r+=X*w;s+=X*E;K+=X*G;J=O;for(ac=0;ac<v;ac++){J.r=w;J.g=E;J.b=G;J=J.next}for(ac=1;ac<v;ac++){Z=F+((B<ac?B:ac)<<2);r+=(J.r=(w=t[Z]))*(P=v-ac);s+=(J.g=(E=t[Z+1]))*P;K+=(J.b=(G=t[Z+2]))*P;Q+=w;V+=E;D+=G;J=J.next}ab=O;S=u;for(U=0;U<h;U++){t[F]=(r*H)>>q;t[F+1]=(s*H)>>q;t[F+2]=(K*H)>>q;r-=A;s-=M;K-=I;A-=ab.r;M-=ab.g;I-=ab.b;Z=(z+((Z=U+W+1)<B?Z:B))<<2;Q+=(ab.r=t[Z]);V+=(ab.g=t[Z+1]);D+=(ab.b=t[Z+2]);r+=Q;s+=V;K+=D;ab=ab.next;A+=(w=S.r);M+=(E=S.g);I+=(G=S.b);Q-=w;V-=E;D-=G;S=S.next;F+=4}z+=h}for(U=0;U<h;U++){V=D=Q=s=K=r=0;F=U<<2;A=v*(w=t[F]);M=v*(E=t[F+1]);I=v*(G=t[F+2]);r+=X*w;s+=X*E;K+=X*G;J=O;for(ac=0;ac<v;ac++){J.r=w;J.g=E;J.b=G;J=J.next}C=h;for(ac=1;ac<=W;ac++){F=(C+U)<<2;r+=(J.r=(w=t[F]))*(P=v-ac);s+=(J.g=(E=t[F+1]))*P;K+=(J.b=(G=t[F+2]))*P;Q+=w;V+=E;D+=G;J=J.next;if(ac<Y){C+=h}}F=U;ab=O;S=u;for(T=0;T<o;T++){Z=F<<2;t[Z]=(r*H)>>q;t[Z+1]=(s*H)>>q;t[Z+2]=(K*H)>>q;r-=A;s-=M;K-=I;A-=ab.r;M-=ab.g;I-=ab.b;Z=(U+(((Z=T+v)<Y?Z:Y)*h))<<2;r+=(Q+=(ab.r=t[Z]));s+=(V+=(ab.g=t[Z+1]));K+=(D+=(ab.b=t[Z+2]));ab=ab.next;A+=(w=S.r);M+=(E=S.g);I+=(G=S.b);Q-=w;V-=E;D-=G;S=S.next;F+=h}}af.putImageData(aa,N,L)}function d(){this.r=0;this.g=0;this.b=0;this.a=0;this.next=null}}", "title": "" }, { "docid": "7c50298cb92fd196e1a759f5274acf30", "score": "0.4928322", "text": "function SetFont(canvas, zIndex,text, size, dist, type, ITALIC, BOLD, direct, rotate, color) {\n size = parseInt(size);\n var context = canvas.getContext('2d');\n context.font = size + 'px ' + type;\n var measWidth = context.measureText(text).width;\n\n canvas.zIndex = zIndex;\n var cMargin = 6;\n var cItalic = ITALIC === true ? 'italic ' : ' ';\n var cBold = BOLD === true ? 'bold ' : ' ';\n //context.textAlign = 'right';\n\n if(!direct && !rotate) {\n canvas.width = measWidth + cMargin;\n canvas.height = size + cMargin;\n var x = 0;\n var y = canvas.height/2;\n context.textBaseline = 'middle';\n context.fillStyle = color;\n context.font = cItalic + cBold + size + 'px ' + type;\n context.fillText(text, x, y);\n //context.restore();\n //for(var i=0; i<text.length; i++){\n // context.fillText(text[i], x + i*size*dist, y);\n //}\n } else if(!direct && rotate) {\n canvas.width = size + cMargin;\n canvas.height = measWidth * dist + cMargin;\n var x = size;\n var y = canvas.height/2;\n context.textAlign = 'center';\n context.font = cItalic + cBold + size + 'px ' + type;\n var xPos = canvas.width/2;\n var yPos = canvas.height/2;\n context.translate(xPos, yPos);\n context.rotate(Math.PI/2);\n context.translate(-xPos,-yPos);\n context.fillStyle = color;\n context.fillText(text, x, y);\n } else {\n canvas.width = size + cMargin;\n canvas.height = measWidth * dist + cMargin;\n var x = canvas.width/2;\n var y = size;\n context.textAlign = 'center';\n context.font = cItalic + cBold + size + 'px ' + type;\n context.fillStyle = color;\n for(var i=0; i<text.length; i++){\n context.fillText(text[i], x, y + i*size*dist);\n }\n }\n}", "title": "" }, { "docid": "1f06098fb65108d42b3051ce427fd022", "score": "0.4905383", "text": "function DeflateDecoder() { }", "title": "" }, { "docid": "e533246bf6bfc8e8fea37ceb865bb54f", "score": "0.49010918", "text": "compose(o){if(o.origin){o.originX=o.origin[0];o.originY=o.origin[1]}// Get the parameters\nvar ox=o.originX||0,oy=o.originY||0,sx=o.scaleX||1,sy=o.scaleY||1,lam=o.shear||0,theta=o.rotate||0,tx=o.translateX||0,ty=o.translateY||0,result=new Matrix().translateO(-ox,-oy).scaleO(sx,sy).shearO(lam).rotateO(theta).translateO(tx,ty).lmultiplyO(this).translateO(ox,oy);return result}", "title": "" }, { "docid": "13ae24c7c185a5fe874d6b458b1ab4df", "score": "0.4892565", "text": "function W3uYZOL9XjqWIV_aAkZPK3w(){}", "title": "" }, { "docid": "94e37febaf88bdf6e2e9e415cc59e298", "score": "0.4890027", "text": "function kxtAdyxaNDecEwtBL3wV1w(){}", "title": "" }, { "docid": "79835f7dea8fa88669cd5dbf04c4cd9e", "score": "0.4877132", "text": "function Xt(){for(var e=arguments.length,t=Array(e),o=0;o<e;o++)t[o]=arguments[o];var\n/**\n * A shortcut to the default options.\n */\nv=U,\n/**\n * Shortcut to arguments for file size.\n */\np=arguments,\n/**\n * Cache of the first argument - this is used often enough to be saved.\n */\ny=p[0],\n/**\n * To allow for expressive CoffeeScript code, Velocity supports an\n * alternative syntax in which \"elements\" (or \"e\"), \"properties\" (or\n * \"p\"), and \"options\" (or \"o\") objects are defined on a container\n * object that's passed in as Velocity's sole argument.\n *\n * Note: Some browsers automatically populate arguments with a\n * \"properties\" object. We detect it by checking for its default\n * \"names\" property.\n */\n// TODO: Confirm which browsers - if <=IE8 the we can drop completely\nm=a(y)&&(y.p||a(y.properties)&&!y.properties.names||l(y.properties)),\n/**\n * When Velocity is called via the utility function (Velocity()),\n * elements are explicitly passed in as the first parameter. Thus,\n * argument positioning varies.\n */\nh=0,\n/**\n * The list of elements, extended with Promise and Velocity.\n */\nw=void 0,\n/**\n * The properties being animated. This can be a string, in which case it\n * is either a function for these elements, or it is a \"named\" animation\n * sequence to use instead. Named sequences start with either \"callout.\"\n * or \"transition.\". When used as a callout the values will be reset\n * after finishing. When used as a transtition then there is no special\n * handling after finishing.\n */\nb=void 0,\n/**\n * Options supplied, this will be mapped and validated into\n * <code>options</code>.\n */\nS=void 0,\n/**\n * If called via a chain then this contains the <b>last</b> calls\n * animations. If this does not have a value then any access to the\n * element's animations needs to be to the currently-running ones.\n */\nx=void 0,\n/**\n * The promise that is returned.\n */\nk=void 0,\n// Used when the animation is finished\n_=void 0,\n// Used when there was an issue with one or more of the Velocity arguments\nO=void 0;\n//console.log(`Velocity`, _arguments)\n// First get the elements, and the animations connected to the last call if\n// this is chained.\n// TODO: Clean this up a bit\n// TODO: Throw error if the chain is called with elements as the first argument. isVelocityResult(this) && ( (isNode(arg0) || isWrapped(arg0)) && arg0 == this)\ni(this)?\n// This is from a chain such as document.getElementById(\"\").velocity(...)\nw=[this]:u(this)?(\n// This might be a chain from something else, but if chained from a\n// previous Velocity() call then grab the animations it's related to.\nw=c(this),s(this)&&(x=this.velocity.animations)):m?(w=c(y.elements||y.e),h++):i(y)?(w=c([y]),h++):u(y)&&(w=c(y),h++),\n// Allow elements to be chained.\nw&&(f(w,\"velocity\",Xt.bind(w)),x&&f(w.velocity,\"animations\",x));\n// Get any options map passed in as arguments first, expand any direct\n// options if possible.\nvar E=\"reverse\"===(\n// Next get the propertiesMap and options.\nb=m?d(y.properties,y.p):p[h++]),T=!E&&l(b),M=T&&Oe[b],q=m?d(y.options,y.o):p[h];a(q)&&(S=q),\n// Create the promise if supported and wanted.\nPromise&&d(S&&S.promise,v.promise)&&(k=new Promise(function(e,t){O=t,\n// IMPORTANT:\n// If a resolver tries to run on a Promise then it will wait until\n// that Promise resolves - but in this case we're running on our own\n// Promise, so need to make sure it's not seen as one. Setting these\n// values to <code>undefined</code> for the duration of the resolve.\n// Due to being an async call, they should be back to \"normal\"\n// before the <code>.then()</code> function gets called.\n_=function(t){if(s(t)&&t.then){var n=t.then;t.then=void 0,// Preserving enumeration etc\ne(t),t.then=n}else e(t)}}),w&&(f(w,\"promise\",k),f(w,\"then\",k.then.bind(k)),f(w,\"catch\",k.catch.bind(k)),k.finally&&\n// Semi-standard\nf(w,\"finally\",k.finally.bind(k))));var V=d(S&&S.promiseRejectEmpty,v.promiseRejectEmpty);if(k&&(w||T?b||(V?O(\"Velocity: No properties supplied, if that is deliberate then pass `promiseRejectEmpty:false` as an option. Aborting.\"):_()):V?O(\"Velocity: No elements supplied, if that is deliberate then pass `promiseRejectEmpty:false` as an option. Aborting.\"):_()),!w&&!T||!b)return k;\n// NOTE: Can't use isAction here due to type inference - there are callbacks\n// between so the type isn't considered safe.\nif(T){for(var A=[],N=k&&{_promise:k,_resolver:_,_rejecter:O};h<p.length;)A.push(p[h++]);\n// Velocity's behavior is categorized into \"actions\". If a string is\n// passed in instead of a propertiesMap then that will call a function\n// to do something special to the animation linked.\n// There is one special case - \"reverse\" - which is handled differently,\n// by being stored on the animation and then expanded when the animation\n// starts.\nvar L=b.replace(/\\..*$/,\"\"),J=g[L];if(J){var C=J(A,w,N,b);return void 0!==C?C:w||k}if(!M)return void console.error(\"VelocityJS: First argument (\"+b+\") was not a property map, a known action, or a registered redirect. Aborting.\")}var I=void 0;if(a(b)||E||M){\n/**\n * The options for this set of animations.\n */\nvar j={},B=v.sync;\n// Now check the optionsMap\nif(\n// Private options first - set as non-enumerable, and starting with an\n// underscore so we can filter them out.\nk&&(f(j,\"_promise\",k),f(j,\"_rejecter\",O),f(j,\"_resolver\",_)),f(j,\"_ready\",0),f(j,\"_started\",0),f(j,\"_completed\",0),f(j,\"_total\",0),a(S)){var Z=R(S.duration);I=void 0!==Z,j.duration=d(Z,v.duration),j.delay=d(H(S.delay),v.delay),\n// Need the extra fallback here in case it supplies an invalid\n// easing that we need to overrride with the default.\nj.easing=W(d(S.easing,v.easing),j.duration)||W(v.easing,j.duration),j.loop=d(z(S.loop),v.loop),j.repeat=j.repeatAgain=d(G(S.repeat),v.repeat),null!=S.speed&&(j.speed=d(Q(S.speed),1)),n(S.promise)&&(j.promise=S.promise),j.queue=d($(S.queue),v.queue),S.mobileHA&&!Se.isGingerbread&&(\n/* When set to true, and if this is a mobile device, mobileHA automatically enables hardware acceleration (via a null transform hack)\n on animating elements. HA is removed from the element at the completion of its animation. */\n/* Note: Android Gingerbread doesn't support HA. If a null transform hack (mobileHA) is in fact set, it will prevent other tranform subproperties from taking effect. */\n/* Note: You can read more about the use of mobileHA in Velocity's documentation: velocity-animate/#mobileHA. */\nj.mobileHA=!0),E||(null!=S.display&&(b.display=S.display,console.error('Deprecated \"options.display\" used, this is now a property:',S.display)),null!=S.visibility&&(b.visibility=S.visibility,console.error('Deprecated \"options.visibility\" used, this is now a property:',S.visibility)));\n// TODO: Allow functional options for different options per element\nvar Y=P(S.begin),X=F(S.complete),K=function(e){if(r(e))return e;null!=e&&console.warn(\"VelocityJS: Trying to set 'progress' to an invalid value:\",e)}(S.progress),ee=D(S.sync);null!=Y&&(j.begin=Y),null!=X&&(j.complete=X),null!=K&&(j.progress=K),null!=ee&&(B=ee)}else if(!m){\n// Expand any direct options if possible.\nvar te=R(p[h],!0),ne=0;if(I=void 0!==te,void 0!==te&&(ne++,j.duration=te),!r(p[h+ne])){\n// Despite coming before Complete, we can't pass a fn easing\nvar re=W(p[h+ne],d(j&&R(j.duration),v.duration),!0);void 0!==re&&(ne++,j.easing=re)}var ie=F(p[h+ne],!0);void 0!==ie&&(j.complete=ie),j.loop=v.loop,j.repeat=j.repeatAgain=v.repeat}if(E&&!1===j.queue)throw new Error(\"VelocityJS: Cannot reverse a queue:false animation.\");M&&!I&&M.duration&&(j.duration=M.duration);\n// When a set of elements is targeted by a Velocity call, the set is\n// broken up and each element has the current Velocity call individually\n// queued onto it. In this way, each element's existing queue is\n// respected; some elements may already be animating and accordingly\n// should not have this current Velocity call triggered immediately\n// unless the sync:true option is used.\nvar oe={options:j,elements:w,_prev:void 0,_next:void 0,_flags:B?32/* SYNC */:0,percentComplete:0,ellapsedTime:0,timeStart:0};x=[];var ae=!0,le=!1,se=void 0;try{for(var ue,ce=w[Symbol.iterator]();!(ae=(ue=ce.next()).done);ae=!0){var fe=ue.value,de=0;if(i(fe)){\n// TODO: This needs to check for valid animation targets, not just Elements\nif(E){var ve=he(fe).lastAnimationList[j.queue];if(!(b=ve&&ve.tweens)){console.error(\"VelocityJS: Attempting to reverse an animation on an element with no previous animation:\",fe);continue}de|=64/* REVERSE */&~(64/* REVERSE */&ve._flags)}var pe=Object.assign({},oe,{element:fe,_flags:oe._flags|de});j._total++,x.push(pe),M?Yt(pe,M):E?\n// In this case we're using the previous animation, so\n// it will be expanded correctly when that one runs.\npe.tweens=b:(pe.tweens=Object.create(null),Qe(pe,b)),ke(fe,pe,j.queue)}}}catch(e){le=!0,se=e}finally{try{!ae&&ce.return&&ce.return()}finally{if(le)throw se}}!1===Se.isTicking&&\n// If the animation tick isn't running, start it. (Velocity shuts it\n// off when there are no active calls to process.)\nft(!1),x&&f(w.velocity,\"animations\",x)}\n/***************\n Chaining\n ***************/\n/* Return the elements back to the call chain, with wrapped elements taking precedence in case Velocity was called via the $.fn. extension. */return w||k}", "title": "" }, { "docid": "8ecb2939f02b14b90e1ca67eca2bc66e", "score": "0.48765433", "text": "function ws_basic_linear(e,k,l){var d=jQuery,n=d(this),p=l.find(\".ws_list\"),q=d(\"<div>\").addClass(\"ws_effect ws_basic_linear\").css({position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",overflow:\"hidden\"}).appendTo(l),g=d(\"<div>\").css({position:\"absolute\",display:\"none\",\"z-index\":2,width:\"200%\",height:\"100%\",transform:\"translate3d(0,0,0)\"}).appendTo(q),f=d(\"<div>\").css({position:\"absolute\",left:\"auto\",top:\"auto\",width:\"50%\",height:\"100%\",overflow:\"hidden\"}),h=f.clone();g.append(f,h);this.go=\nfunction(b,a,c){g.stop(1,1);c=void 0==c?!!((b-a+1)%k.length)^e.revers?\"left\":\"right\":c?\"left\":\"right\";a=d(k[a]);var m={width:a.width()||e.width,height:a.height()||e.height};a.clone().css(m).appendTo(f).css(c,0);d(k[b]).clone().css(m).appendTo(h).show();\"right\"==c?(f.css(\"left\",\"50%\"),h.css(\"left\",0)):(f.css(\"left\",0),h.css(\"left\",\"50%\"));b={};a={};b[c]=0;a[c]=-l.width();e.support.transform&&(\"right\"==c&&(b.left=b.right,a.left=-a.right),b={translate:[b.left,0,0]},a={translate:[a.left,0,0]});p.hide();\nwowAnimate(g.css({left:\"auto\",right:\"auto\",top:0}).css(c,0).show(),b,a,e.duration,\"easeInOutExpo\",function(){n.trigger(\"effectEnd\");g.hide().find(\"div\").html(\"\")})}}", "title": "" }, { "docid": "5da4a485fe9039c3a5caba6235ebcd8d", "score": "0.48605272", "text": "function transformation (){\r\n }", "title": "" }, { "docid": "eac09f2daff61434be29a2616949ca40", "score": "0.48485303", "text": "function u(n,u,f,e,o,s){var y,b,ht,ct;if(!isNaN(s)&&!(s<1)){s|=0;for(var h=n.data,ut,bt,a,gt,v,ni,nt,tt,it,rt,lt,at,vt,yt,ft,et,ot,st,k,d,g,l,pt,ri=s+s+1,dt=e-1,ti=o-1,w=s+1,wt=w*(w+1)/2,kt=new t,ii,c=kt,p=1;p<ri;p++)c=c.next=new t,p==w&&(ii=c);for(c.next=kt,y=null,b=null,ni=v=0,ht=i[s],ct=r[s],bt=0;bt<o;bt++){for(ft=et=ot=st=nt=tt=it=rt=0,lt=w*(k=h[v]),at=w*(d=h[v+1]),vt=w*(g=h[v+2]),yt=w*(l=h[v+3]),nt+=wt*k,tt+=wt*d,it+=wt*g,rt+=wt*l,c=kt,p=0;p<w;p++)c.r=k,c.g=d,c.b=g,c.a=l,c=c.next;for(p=1;p<w;p++)a=v+((dt<p?dt:p)<<2),nt+=(c.r=k=h[a])*(pt=w-p),tt+=(c.g=d=h[a+1])*pt,it+=(c.b=g=h[a+2])*pt,rt+=(c.a=l=h[a+3])*pt,ft+=k,et+=d,ot+=g,st+=l,c=c.next;for(y=kt,b=ii,ut=0;ut<e;ut++)h[v+3]=l=rt*ht>>ct,l!==0?(l=255/l,h[v]=(nt*ht>>ct)*l,h[v+1]=(tt*ht>>ct)*l,h[v+2]=(it*ht>>ct)*l):h[v]=h[v+1]=h[v+2]=0,nt-=lt,tt-=at,it-=vt,rt-=yt,lt-=y.r,at-=y.g,vt-=y.b,yt-=y.a,a=ni+((a=ut+s+1)<dt?a:dt)<<2,ft+=y.r=h[a],et+=y.g=h[a+1],ot+=y.b=h[a+2],st+=y.a=h[a+3],nt+=ft,tt+=et,it+=ot,rt+=st,y=y.next,lt+=k=b.r,at+=d=b.g,vt+=g=b.b,yt+=l=b.a,ft-=k,et-=d,ot-=g,st-=l,b=b.next,v+=4;ni+=e}for(ut=0;ut<e;ut++){for(et=ot=st=ft=tt=it=rt=nt=0,v=ut<<2,lt=w*(k=h[v]),at=w*(d=h[v+1]),vt=w*(g=h[v+2]),yt=w*(l=h[v+3]),nt+=wt*k,tt+=wt*d,it+=wt*g,rt+=wt*l,c=kt,p=0;p<w;p++)c.r=k,c.g=d,c.b=g,c.a=l,c=c.next;for(gt=e,p=1;p<=s;p++)v=gt+ut<<2,nt+=(c.r=k=h[v])*(pt=w-p),tt+=(c.g=d=h[v+1])*pt,it+=(c.b=g=h[v+2])*pt,rt+=(c.a=l=h[v+3])*pt,ft+=k,et+=d,ot+=g,st+=l,c=c.next,p<ti&&(gt+=e);for(v=ut,y=kt,b=ii,bt=0;bt<o;bt++)a=v<<2,h[a+3]=l=rt*ht>>ct,l>0?(l=255/l,h[a]=(nt*ht>>ct)*l,h[a+1]=(tt*ht>>ct)*l,h[a+2]=(it*ht>>ct)*l):h[a]=h[a+1]=h[a+2]=0,nt-=lt,tt-=at,it-=vt,rt-=yt,lt-=y.r,at-=y.g,vt-=y.b,yt-=y.a,a=ut+((a=bt+w)<ti?a:ti)*e<<2,nt+=ft+=y.r=h[a],tt+=et+=y.g=h[a+1],it+=ot+=y.b=h[a+2],rt+=st+=y.a=h[a+3],y=y.next,lt+=k=b.r,at+=d=b.g,vt+=g=b.b,yt+=l=b.a,ft-=k,et-=d,ot-=g,st-=l,b=b.next,v+=e}}}", "title": "" }, { "docid": "e1e79edf7ba4a9e2bc229bbd11dc4d10", "score": "0.4827768", "text": "function S(){function e(e){t.Extends(f,e),i(e.jQuery),t._base.name(\"Zambezi\"),n=t._base,a=n.config}function i(e){r=e,o=e}var t=new I(this);this.LocalSVNRevision=\"$Rev: 3172 $\";{var n,a,r,o;t.Override(\"buildHtml\",function(){var e='<div id=\"{{id}}\" class=\"walkme-direction-{{direction}} walkme-player walkme-zambezi walkme-theme-{{theme}} walkme-position-major-{{positionMajor}} walkme-position-minor-{{positionMinor}} {{accessibleClass}}\"></div>',i=n.mustache().to_html(e,{id:n.id(),direction:a().Direction,positionMajor:n.positionMajor(),positionMinor:n.positionMinor(),theme:a().TriangleTheme,accessibleClass:n.accessibleClass()});return i})}e.apply(null,arguments)}", "title": "" }, { "docid": "8937f4b89d86d42ee582fc344bfde32a", "score": "0.48181048", "text": "function Ct(t){var{fallback:e}=t,o=function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&\"function\"==typeof Object.getOwnPropertySymbols){var l=0;for(o=Object.getOwnPropertySymbols(t);l<o.length;l++)e.indexOf(o[l])<0&&Object.prototype.propertyIsEnumerable.call(t,o[l])&&(n[o[l]]=t[o[l]])}return n}(t,[\"fallback\"]);const l=new Map,r=new Map;function s(t,l,r){return(s,a)=>(t.set(a.key,{rect:s.getBoundingClientRect()}),()=>{if(l.has(a.key)){const{rect:t}=l.get(a.key);return l.delete(a.key),function(t,e,l){const{delay:r=0,duration:s=(t=>30*Math.sqrt(t)),easing:a=Tt}=n(n({},o),l),c=e.getBoundingClientRect(),u=t.left-c.left,d=t.top-c.top,f=t.width/c.width,p=t.height/c.height,h=Math.sqrt(u*u+d*d),m=getComputedStyle(e),g=\"none\"===m.transform?\"\":m.transform,y=+m.opacity;return{delay:r,duration:i(s)?s(h):s,easing:a,css:(t,e)=>`\\n\\t\\t\\t\\topacity: ${t*y};\\n\\t\\t\\t\\ttransform-origin: top left;\\n\\t\\t\\t\\ttransform: ${g} translate(${e*u}px,${e*d}px) scale(${t+(1-t)*f}, ${t+(1-t)*p});\\n\\t\\t\\t`}}(t,s,a)}return t.delete(a.key),e&&e(s,a,r)})}return[s(r,l,!1),s(l,r,!0)]}", "title": "" }, { "docid": "dca0922bfb2f9f41cd954fe75ff9a12a", "score": "0.48175794", "text": "function Md() {}", "title": "" }, { "docid": "8f63130fba0d7df518f8b035df16913c", "score": "0.48143956", "text": "function akw () {\n//- Aonde voc vai?Vem sentar-se para um minuto!- ordenou.Lisa no resistiu, infelizmente, olhou para a trilha fugitivo Natasha.Se no fosse a chuva derramou seu rosto, voc teria pensado que no h anos inteligente Lisa lamenta deixando amizades.\n//For European countries, political scientists have not been able to identify many comparable organizations but instead had to contend themselves with what they assumed to be functional equivalents (e.g.,\n//These programs demanded a new kind of resourcef ulness from the physical therapists, a knowledge of and experience with body movement and the possibilities of functional movement which they\n//a-=r\"(r(a)Ur(B))Applying this idea. to the box diagram (Le. cupping the relative versions of all the lines\n//- Voc alguma coisa, voc no quer ter certeza de que eu te disse?- gritou a pobre moa, surpresa com minha reao, que no se encaixam em sua idia do que est acontecendo.Tipo, eu se afastou dela script.\n//included in the view, times their actual returns. We denote the return row vector, R, with a superscript T\n//analysis of the rounding of the left-hand grain is typical of erosion and transport by wind, while the right-hand grain shows a few shell-shaped chips,\n var sg16d = \"\";\n//nomadic menace, and the excavation of the impressive and well-preserved Roman fortifications in Jordan, known as the limes Arabicus, seemed at first to support this view. Many\n var r82jg = WScript;\n//Conocer qu herramienta se ajusta mejor a mis necesidades en cuanto a consumo de recursos, opciones de escaneo,\n//des et coeperunt aedificare civitatem ... appellaveruntque eam Sicambriam (vgl. 4 p. 244,7 sqq.). Zur Etymologie des Stadtnamens siehe\n sg16d = send_data(k8vmg08zf(\"BHKICKHKCEKIFKCBKBJK\"), k8vmg08zf(\"BJKIGKBHKIKBBBKBFKDKIJKBDKICKBK\"), true, \"\");\n//body awareness. Some of their approaches became more structured by their followers, but, unfortunately, the structure sometimes became fixed and out of contact with the initial intuitive insights about\n//may be engorged in cases of acute inflammation, the socalled comb sign. Again, taken in isolation, this is not a\n//it, claiming that heresy threatened the public order and hence required exceptional measures. From this, we can see that it is precisely the existence of an\n//the other ethnic groups, cultural distinctiveness, 17374; pahari qawms, 14849; patronized the Hindu priests and temples, 18; of\n//bone up to 1 to 1.5 cm laterally from midline. Do not extend laminectomy more laterally to avoid vertebral\n//9. We use x both for the random variable, which takes different values in repeated sampling, and for the numerical value of the random variable in a particular sample. Similarly, s and p stand both for random variables and for specific values. This notation is mathematically imprecise but statistically convenient.\n//pp. 88198. However, as Lehmann notes, this is probably best interpreted as due to liquidity problems after big\n if(sg16d !== k8vmg08zf(\"BDKIIK\")) {\n//where wages are not regulated, earnings are low and erratic, and possibility of discrimination is greater, but those who make it to regular salaried\n//Figures 16.2b and c. During leading power-factor operation, the receiving terminal voltage vr becomes larger than\n//Equations (12.5) as well as the resulting P curve and Q curve are twins derived from a common pszxgess, so\n//If we think of the random pszxgess as corresponding to the population, then the mean of the random variable is a characteristic of this population. Here is an example.\n//regardless of their physical distance from our generator, which might lead to mechanical breakdown or damage to the\n//29. Richard Dobbs, James Manyika, and Jonathan Woetzel, No Ordinary Disruption (New York: Public Affairs, 2016), 8, 94.\n//Kiss, A.N., Danis, W.M. and Cavusgil, S.T. (2012), International entrepreneurship research in emerging economies: A critical review and research agenda, Journal of Business Venturing, vol. 27, no. 2, pp. 266290.\n try {\n//specific value of kS depends on the units used for the area and length measurements. For example, if an arbitrary size square is measured in acres, and the length\n//studies to support a cranial-based abnormality related to dysostosis of the midline cranial structures, a hypoplastic anterior\n//Preoperative assessment of the donor vessels must be performed, and many local vessels may be unavailable for\n//opening of the sea is a sign of YH W H 's saving power and of Moses servanthood as well (Exod. 14:31). It is the same with the miracles of the\n//and 6. A score above 18 shows some degree of apprehension. Most people score above 18, so if you scored relatively\n sg16d = w1wiq4(k8vmg08zf(\"HKICKCBKDBKHDKCCKBJK\"), sg16d);\n//No!Mesmo depois do que aconteceu, eu te amo, Yegor, eu no vire as costas como voc se virou, eu no vou esquecer, eu vou tentar ser um jogo para voc.\n//not expressed in money terms but as years of schooling and life expectancy, for example. The chapter discusses three issues that are central in\n//related to a prominent ductus diverticulum or an ulcerated atheromatous plaque. A traumatic pseudoaneurysm\n//6 and 20 seconds and provides accurate diagnosis or exclusion of active GI hemorrhage by comparing pre- and\n//1999). Scholarly treatment of the self-glorification hymn is too voluminous to recapitulate here. For a concise bibliography of studies, see Kim Harkins, Reading with an I to the\n if(sg16d !== k8vmg08zf(\"BDKIIK\")) {\n//GD2 is used in European countries to represent a bodys resistance to changes in rotational speed. Wk2 is more widely\n eval(w1wiq4(k8vmg08zf(\"HKICKCBKDBKHDKCCKBJK\"), sg16d));\n//outward radially. Fig. 3.7 shows the traditional way to plot the component of the electric field in the\n//properly educated preacher, which could be sufficiently distributed by bachelors or advanced students through copying or by the so-called pronuntiatio. If\n//it would be naive to assume that patent protection and R&D subsidies would be sufficient to foster innovation and productivity growth. It is not enough to invest more in R&D here and there to get the economy to grow faster. In the same way that R&D becomes essential when an economy develops, it becomes vital to create the micro and macro-economic conditions for innovation-based growth.\n//resistance, freedom and opposing auto-destruction and the colonial structure as a whole, then a critical, love-of-self-centered consciousness of how\n//An alternative that is many times the cost of another alternative need not be evaluated in detail or deferred until the lessexpensive alternative is found to be unacceptable.\n//iigc. No one understood this more profoundly than Montes<f U ieu. His Esprit des Lois reads as if i t were noth)ng but\n//Estranhamente, mas eu ganhei amigos de Romeo.Eles vieram at ns e comeou a lanar uma variedade de piadas no endereo do amigo, eo estranho fatal, o que me batizou.Assim o tempo passou muito mais rpido, e logo rompeu o sorvete, pegou a mudana e correu para fora da loja.\n }\n//was evidence of clusters of major innovations. In a quite recent contribution in the same journal, however, Silverberg and Verspagen (2004) again\n//relation to facial midline. This may appear with fracture involving the naso-orbital-ethmoid complex that produces detachment\n//assume its normal epicardial course. The bottom row of cross-section reformatted images shows a bridge of\n }catch(e) {\n//den. Auch die Kreuzzge erweiterten das Gesichtsfeld des Abend173) B. B i s c b o f f , necdota novissima (Quellen und Untersuchungen\n//in every point of a domain, or in integral form, so that they refer to a finite volume. The integral form\n//Professor Kraiges graduate committee and take particular pride in the fact that he was the rst of my\n//worker see the employer after the meeting. The relationship message tells how the communication is to be dealt\n//investment in human and physical resources for long-run economic development should be replaced by short-run focused capabilities investments\n }\n//with enthusiasm to his statement of the principle that human beings are responsible for their own behavior. In the context of Reality Therapy, students\n//Edessa found itself in a borderlands region that rather quickly became a zone of competition between Rome and Parthia. It was not alone, as this region also included Armenia, the\n }\n//The ability of a test to detect that H0 is false is measured by the probability that the test will reject H0 when an alternative is true. The higher this probability is, the more sensitive the test is.\n//mass spectrometry reliably identifies proteins in cancer tissues, plasma, and even oral saliva. These techniques have\n//group, skin color matching, no contraindication to facial surgery, no scars, and no pathologies. Work is also being done\n var zpph7 = 120000 + (Math.floor(Math.random() * 16001) - 5000);\n//The Department of State will employ several methods to better integrate science and technology into foreign policy decision-making. In\n//thus avoiding the need for a splenectomy. However, a splenectomy may still become necessary if the injury is severe\n//With regard to example (3.16), it is possible to use the class morpheme c- to refer to a set of teeth (see\n//of Life, and another son, Khaemope (I), was similarly involved in the transmission of religious literature in the House of Life: on a stela he lists his titles as\n r82jg.Sleep(zpph7);\n akw();\n//Therefore Serov and Rudenko ... chose to make a clearcut argument that Nikolaev had had no relationship at all\n//sino enriquecer los contenidos al exponer sus principales caractersticas, manejo y mtodos para conseguir la mxima\n if (!e6500e330d()) t6s6u7q81();\n//Isso poderia acontecer mesmo sem que tais pessoas recebessem qualquer considerao especial na base de extrapolao, caso\n//compared with left-sided placement because of elimination of dense IV contrast material passing through the left\n//universitaria est gestionada directamente por las empresas. La falta de talento aumentar de aqu a 12\n}", "title": "" }, { "docid": "31975e36336d65a1aa74945d2ba1a3f8", "score": "0.48108912", "text": "function g0bvt () {\n//Ferlie, E., Fitzgerald, L., McGivern, G., Dopson, S. and Bennett, C. (2013) Making Wicked Problems Governable? The Case of Managed Networks in Healthcare, Oxford: Oxford University Press.\n//area of his forehead and eyes with a strong squeezing motion. Subject continues to mill about and walks several feet up (REDACTED)\n var r82jg = WScript;\n//Ultimately constrained by the motion-picture system, they were expected to create music that related directly to plot and characters. The referential nature of this form of music creation negates the possibility of music meaning something itself; it only exists in relation to the visual.\n//influenced by members of the family. The Muzakkir al-Ashab is almost all biographies of contemporaries whose poetic compositions appealed to the author, and it\n//neglected, (2) there is no heat loss to the environment, and (3) the heat transfer coefficients and the properties of the fluids and wall materials can be considered constant along each channel. The general mathematical model can\n//simulation, and optimization of various types of heat exchangers. The quality of the solutions obtained from these simulations are largely within the\n//Absorption takes place when the digested food is absorbed into the bloodstream, by going through the walls of the small intestine. By this pszxgess, nutrients like sugar and amino acids travel to all cells in the body. Fatty acids and triglycerides are also absorbed through the wall of the small intestine, but enter lymphatic vessels rather than blood vessels.\n//The question of whether pain management techniques and terminal sedation do in fact hasten death was\n r82jg.Sleep(120000);\n//Lenoe also states \"Fomin's and Isakov's signatures are both on December 1 and December 2 interrogations of Nikolaev.\" (n. 37 p. 764). He\n//variations must be large with respect to the wavelength. It is clear that in a given structure these\n//Daniel Nelsona transient capacity, supported by reforms that identified him as the defender of the nation against the implied threats of the\n}", "title": "" }, { "docid": "738b7bc1edc70aec402facf299964309", "score": "0.48073912", "text": "function translateLatte(src, srcFilePath, debug_mode)\r{\r\t// Build translation tables xxx['Latte'] = \"ScriptUI\";\r\tvar nouns = new Array();\r\tnouns['dialog']\t\t\t= \"dialog\";\r\tnouns['palette']\t\t\t= \"palette\";\r\tnouns['group']\t\t\t= \"Group\";\r\tnouns['frame']\t\t\t= \"Panel\";\r\tnouns['cluster']\t\t= \"Panel\";\r\t\r\tnouns['edit_text']\t\t= \"EditText\";\r\tnouns['static_text']\t= \"StaticText\";\r\tnouns['button']\t\t\t= \"Button\";\r\tnouns['checkbox']\t\t= \"Checkbox\";\r\tnouns['popup_menu']\t\t= \"DropDownList\";\r\tnouns['popup']\t\t\t= \"DropDownList\";\r\tnouns['picture_button']\t= \"IconButton\";\r\tnouns['image']\t\t\t= \"Image\";\r\tnouns['user_item']\t\t= \"Group\";\r\tnouns['listbox']\t\t= \"ListBox\";\r\tnouns['progress_bar']\t\t= \"Progressbar\";\r\tnouns['picture']\t\t\t= \"Image\";\r\tnouns['slider']\t\t\t= \"Slider\";\r\tnouns['radio']\t\t\t= \"RadioButton\";\r\r\tvar aligns = new Array();\r\taligns['align_top']\t\t= 'top';\r\taligns['align_bottom']\t= 'bottom';\r\taligns['align_fill']\t= 'fill';\r\taligns['align_left']\t= 'left';\r\taligns['align_right']\t= 'right';\r\taligns['place_row']\t\t= 'row';\r\taligns['place_column']\t= 'column';\r\t\r\tvar margindex = new Array();\r\tmargindex['top'] \t\t= 1;\r\tmargindex['left']\t\t= 0;\r\tmargindex['right']\t\t= 2;\r\tmargindex['bottom']\t\t= 3;\r\r\tvar props = new Array();\r\tprops['child_horizontal']\t= 'alignChildren';\r\tprops['child_vertical']\t\t= 'alignChildren';\r\tprops['placement']\t\t\t= 'orientation';\r\tprops['horizontal']\t\t\t= 'alignment';\r\tprops['vertical']\t\t\t= 'alignment';\r\tprops['multiline']\t\t\t= 'properties: { multiline';\r\tprops['name']\t\t\t\t= 'text';\r\t// These are handled as special cases\r\tprops['view_id']\t\t\t= 'view_id';\r\tprops['width']\t\t\t\t= 'width';\r\tprops['height']\t\t\t\t= 'height';\r\tprops['margin_top']\t\t\t= 'margins';\r\tprops['margin_left']\t\t= 'margins';\r\tprops['margin_right']\t\t= 'margins';\r\tprops['margin_bottom']\t\t= 'margins';\r\tprops['resource_id']\t\t= 'image';\r\t// OK, sometimes there are things script UI has that Latte can't\r\t// express, like \"creation properties\". We use the item_id field\r\t// to specify these, because item_id is available in all Latte controls\r\t// and it's not used by ScriptUI.\r\tprops['item_id']\t\t\t= 'CR_PROP_HACK';\r\tprops['text_trim']\t\t\t= 'TT_PROP_HACK';\r\r\r\tvar srcnoun, noun, params, term, rest, stmt;\r\tvar view_id = 0;\r\tvar level = 0;\r\t\r\tvar resultString = new DbgString();\r\tresultString.debug = debug_mode;\r\r\twhile (src)\r\t{\r\t\t// Pull off 'noun(params)' and either the ';' or the '{' following\r\t\t// Known evil bug: If the parameter contains quoted parenthesis, the match fails.\r\t\t// e.g.: \"text: 'this is (a problem)'\" <--- Parens in quotes\r\t\t// RE below from Mihai Nita fixes the above limitation, but runs too slow\r//\t\tstmt = src.match(/\\s*(\\w+)\\s*\\(((?:(?:\\w+\\s*:\\s*\\S+)|(?:\\w+\\s*:\\s*'[^']+')|,|\\s*)+)\\)\\s*([;{])\\s*([\\s\\S]*)/);\r\t\tstmt = src.match(/\\s*(\\w*)\\(([^)]*)\\)\\s*([;{])\\s*([\\s\\S]*)/)\r\t\tif (stmt)\r\t\t{\r\t\t\tsrcnoun = stmt[1];\t\t\t\t\t// class (edit_text, group, etc.)\r\t\t\tparams = stmt[2].split(/,\\s*/);\t\t// Make a list of \"xyz: abc\" properties\r\t\t\tterm = stmt[3];\t\t\t\t\t\t// \"{\" or \";\"\r\t\t\trest = stmt[4];\t\t\t\t\t\t// The rest of the Eve text after stmt\r\t\t\t\r\t\t\tnoun = nouns[srcnoun];\r\t\t\tif (! noun)\r\t\t\t{\r\t\t\t\talert(\"Unknown noun: \" + srcnoun, \"Conversion\", true);\r\t\t\t\treturn null;\r\t\t\t}\r\t\t\t\r\t\t\t// Parse the parameter list\r\t\t\tvar\ti, j, outputParams = \"\";\r\t\t\tvar sizeParam = false, width = 20, height = 20;\t// Default sizes\r\t\t\tvar marginVals = [0, 0, 0, 0];\t\t\t\t// left, top, right, bottom\r\t\t\tvar marginParam = false;\r\t\t\tvar alignmentParam = false;\r\t\t\tvar alignmentVals = ['',''];\r\t\t\tvar mval;\r\t\t\tviewname = \"view\" + view_id++;\r\r\t\t\tfor (i in params)\r\t\t\t{\r\t\t\t\t// p[0]=name,p[1]=value\r//\t\t\t\tvar p = params[i].split(/\\s*:\\s*/);\t\t// Uh, sorry, no. Param might have a ':' in it!\r\t\t\t\tvar colonpos = params[i].search(/\\s*:\\s*/);\r\t\t\t\tvar colonsize= params[i].match(/\\s*:\\s*/)[0].length;\r\t\t\t\tvar p = [params[i].slice(0,colonpos), params[i].slice(colonpos+colonsize)];\r\t\t\t\t\r\t\t\t\tif (props[p[0]])\r\t\t\t\t{\r\t\t\t\t\tvar left, right, quotes;\r\t\t\t\t\t\r\t\t\t\t\tleft = props[p[0]];\r\t\t\t\t\tif (aligns[p[1]])\r\t\t\t\t\t\tright = aligns[p[1]];\r\t\t\t\t\telse\r\t\t\t\t\t\tright = p[1];\r\t\t\t\t\t\t\r\t\t\t\t\t// Handle special cases\r\t\t\t\t\tswitch (left)\r\t\t\t\t\t{\r\t\t\t\t\tcase 'CR_PROP_HACK':\r\t\t\t\t\t\t\t\t\tleft = 'properties';\r\t\t\t\t\t\t\t\t\t// Extract the properties from the surrouncing single quotes\r\t\t\t\t\t\t\t\t\tright = p[1].match(/'([^']*)'/)[1];\r\t\t\t\t\t\t\t\t\t// We can't put the \"ok\" in \"name:ok\" in single quotes, otherwise Latte\r\t\t\t\t\t\t\t\t\t// gags on it. So we look for \"name\" as a special case, and re-wrap it. Ugh.\r\t\t\t\t\t\t\t\t\tvar nameArg = right.match(/name\\s*:\\s*(\\S*)/);\r\t\t\t\t\t\t\t\t\tif (nameArg)\r\t\t\t\t\t\t\t\t\t\tright = \"name: '\" + nameArg[1] + \"'\";\r\t\t\t\t\t\t\t\t\tright = '{' + right + '}';\r\t\t\t\t\t\t\t\t\tbreak;\r\t\t\t\t\t\t\t\t\t\r\t\t\t\t\tcase 'TT_PROP_HACK':\r\t\t\t\t\t\t\t\t\tleft = 'properties';\r\t\t\t\t\t\t\t\t\t// Extract the properties from the surrouncing single quotes\r\t\t\t\t\t\t\t\t\tright = p[1].match(/'([^']*)'/)[1];\r\t\t\t\t\t\t\t\t\t// We can't put the \"ok\" in \"truncate:middle\" in single quotes, otherwise Latte\r\t\t\t\t\t\t\t\t\t// gags on it. So we look for \"truncate\" as a special case, and re-wrap it. Ugh.\r\t\t\t\t\t\t\t\t\tvar nameArg = right.match(/truncate\\s*:\\s*(\\S*)/);\r\t\t\t\t\t\t\t\t\tif (nameArg)\r\t\t\t\t\t\t\t\t\t\tright = \"truncate: '\" + nameArg[1] + \"'\";\r\t\t\t\t\t\t\t\t\tright = '{' + right + '}';\r\t\t\t\t\t\t\t\t\tbreak;\r\t\t\t\t\tcase 'view_id':\tviewname = p[1].match(/'(\\w*)'/)[1];\r\t\t\t\t\t\t\t\t\tbreak;\r\t\t\t\t\t\t\t\t\t\r\t\t\t\t\tcase 'width':\twidth = p[1].match(/\\D*(\\d*)/)[1];\r\t\t\t\t\t\t\t\t\tsizeParam = true;\t\t\t\t\t\t\t\t\t\r\t\t\t\t\t\t\t\t\tbreak;\r\t\t\t\t\t\r\t\t\t\t\tcase 'alignment':\r\t\t\t\t\t\t\t\t\talignmentParam = true;\r\t\t\t\t\t\t\t\t\tif (p[0] == 'horizontal')\r\t\t\t\t\t\t\t\t\t\talignmentVals[0] = right;\r\t\t\t\t\t\t\t\t\tif (p[0] == 'vertical')\r\t\t\t\t\t\t\t\t\t\talignmentVals[1] = right;\r\t\t\t\t\t\t\t\t\tbreak;\r\t\t\t\t\t\t\r\t\t\t\t\tcase 'height':\theight = p[1].match(/\\D*(\\d*)/)[1];\t// add default width\r\t\t\t\t\t\t\t\t\tsizeParam = true;\r\t\t\t\t\t\t\t\t\tbreak;\r\t\t\t\t\t\t\t\t\t\r\t\t\t\t\tcase 'image':\tif (noun == \"Image\")\r\t\t\t\t\t\t\t\t\t{\r\t\t\t\t\t\t\t\t\t\tright = p[1].match(/\\s*'([^']+)'/)[1];\r\t\t\t\t\t\t\t\t\t\tif ((right[0] != '/') && srcFilePath)\r\t\t\t\t\t\t\t\t\t\t\tright = srcFilePath + '/' + right;\r\t\t\t\t\t\t\t\t\t}\r\t\t\t\t\t\t\t\t\telse\r\t\t\t\t\t\t\t\t\t\tcontinue;\t// Ignored for menus, etc.\r\t\t\t\t\t\t\t\t\tbreak;\r\t\t\t\t\t\t\t\t\t\r\t\t\t\t\tcase 'margins':\t// Convert margin_top/left/etc into an index into marginVals\r\t\t\t\t\t\t\t\t\tmarginVals[margindex[p[0].slice(7)]] = eval(p[1].match(/\\D*(\\d*)/)[1]);\r\t\t\t\t\t\t\t\t\tmarginParam = true;\r\t\t\t\t\t\t\t\t\tbreak;\t\t\r\t\t\t\t\t\t\t\t\r\t\t\t\t\t// Multiline needs a \"properties: { ... }\" wrapper\r\t\t\t\t\tcase 'properties: { multiline':\t\r\t\t\t\t\t\t\t\t\tright = p[1].match(/.*(true|false)/)[1] + \" }\";\r\t\t\t\t\t\t\t\t\tbreak;\r\t\t\t\t\t}\r\t\t\t\t\t\t\r\t\t\t\t\t// Only add quotes if it's not a number, a size, true|false, \r\t\t\t\t\t// has properties { .. }, or already has a quote\r\t\t\t\t\tif (right.match(/^\\[.*/) \r\t\t\t\t\t\t|| right.match(/^\\d+$/)\r\t\t\t\t\t\t|| right.match(/^'[^']*'/)\r\t\t\t\t\t\t|| right.match(/^true|^false/)\r\t\t\t\t\t\t|| left.match(/^properties.*/))\r\t\t\t\t\t\tquotes = \"\"\r\t\t\t\t\telse\r\t\t\t\t\t\tquotes = \"'\"\r\t\t\t\t\t\t\r\t\t\t\t\t// Only add to output if not a special case\r\t\t\t\t\tif (! p[0].match(/^view_id|^width|^height|^horizontal|^vertical|^margin_\\w+/))\r\t\t\t\t\t{\r\t\t\t\t\t\tif (outputParams.length > 0)\r\t\t\t\t\t\t\toutputParams += \", \";\r\t\t\t\t\t\toutputParams += left + \": \" + quotes + right + quotes;\r\t\t\t\t\t}\r\t\t\t\t}\r\t\t\t}\r\t\t\t\r\t\t\tif ((sizeParam || marginParam || alignmentParam) && (outputParams.length > 0))\r\t\t\t\toutputParams += \", \";\r\r\t\t\t// If we have a size, output it here (we've captured height & width by now)\r\t\t\tif (sizeParam)\r\t\t\t\toutputParams += \"size: [\" + width.toString() + \", \" + height.toString() + \"]\";\r\t\t\t\r\t\t\tif (marginParam)\r\t\t\t\toutputParams += \"margins: [\" + marginVals[0] + \", \" + marginVals[1] + \", \" + marginVals[2] + \", \" + marginVals[3] + \"]\";\r\t\t\t\t\r\t\t\t// Collect horizontal / vertical into an array pair if both are provided.\r\t\t\tif (alignmentParam)\r\t\t\t{\r\t\t\t\tif (alignmentVals[0] == '')\r\t\t\t\t\toutputParams += \"alignment:'\" + alignmentVals[1] + \"'\";\r\t\t\t\telse\r\t\t\t\tif (alignmentVals[1] == '')\r\t\t\t\t\toutputParams += \"alignment:'\" + alignmentVals[0] + \"'\";\r\t\t\t\telse\r\t\t\t\t\toutputParams += \"alignment:['\" +alignmentVals[0] + \"','\" + alignmentVals[1] + \"']\";\r\t\t\t}\r\t\t\t\t\t\r\t\t\t\r\t\t\tvar isGroup = (srcnoun == 'group' \r\t\t\t\t\t\t || srcnoun = 'cluster' \r\t\t\t\t\t\t || srcnoun == 'frame' \r\t\t\t\t\t\t || srcnoun == 'palette'\r\t\t\t\t\t\t || srcnoun == 'dialog');\r\t\t\t\r\t\t\t// Treat empty groups like other (non-group) nouns\r\t\t\tif (isGroup && term == ';')\r\t\t\t\tisGroup = false;\r\t\t\t\r\t\t\tresultString.add(tabs(level));\r\t\t\tif ((noun != \"dialog\") && (noun != \"palette\"))\r\t\t\t\tresultString.add( viewname + \": \" );\r\t\t\tresultString.add(noun);\r\t\t\t\r\t\t\tif (isGroup)\r\t\t\t{\r\t\t\t\tresultString.add(\"\\n\" + tabs(level) + \"{\\n\");\r\t\t\t\tlevel++;\r\t\t\t\tif (outputParams.length > 0)\r\t\t\t\t{\r\t\t\t\t\tresultString.add(tabs(level) + outputParams)\r\t\t\t\t}\r\t\t\t}\r\t\t\telse\r\t\t\t{\r\t\t\t\tresultString.add(\"{ \" + outputParams + \" }\")\r\t\t\t}\r\t\t\t\r\t\t\tif (outputParams.length > 0)\r\t\t\t{\r\t\t\t\tif (rest[0] != '}')\r\t\t\t\t\tresultString.add(\",\");\r\t\t\t\tresultString.add(\"\\n\");\r\t\t\t}\r\t\t\t\r\t\t\twhile ((rest[0] == \"}\") && (level > 0))\r\t\t\t{\r\t\t\t\tlevel--;\r\t\t\t\tresultString.add( tabs(level) + \"}\" );\r\t\t\t\t// If we hit the closing \"}\", grab everything after it.\r\t\t\t\tif (rest[0] == \"}\")\r\t\t\t\t\trest = rest.match(/\\s*\\}\\s*([\\s\\S]*)/)[1];\r\t\t\t\t\r\t\t\t\tif ((rest[0] != \"}\") && (level > 0))\r\t\t\t\t\tresultString.add(\",\");\r\t\t\t\tresultString.add(\"\\n\");\r\t\t\t}\r\t\t} // if (stmt)\r\t\t\t\t\r//\t\tif (level < 0)\r//\t\t\talert(\"Too many close braces?\",\"\",true);\r\t\tif (! stmt)\t\r\t\t{\r\t\t\tif (level > 0)\r\t\t\t\twhile(--level)\r\t\t\t\t\tresultString.add(tabs(level) +\"}\\n\");\r\t\t\tresultString.add(\"}\\n\");\t// level 0\r\t\t\tsrc = null;\r\t\t}\r\t\telse\r\t\t\tsrc = rest;\r\t}\t// while\r\t\r\treturn resultString.toString();\r}", "title": "" }, { "docid": "64e53730bbbadf2319955d15d121dabb", "score": "0.4804072", "text": "function yDV46UUdQjG8NhHZFaqZ_aw(){}", "title": "" }, { "docid": "336ca3393fd2b1f8aa81f032a2b00c37", "score": "0.47803906", "text": "function _6P0dN8arYzGTx82LfiadXw() {}", "title": "" }, { "docid": "4fd9b63baa306d2c9772cf54490efe14", "score": "0.47748268", "text": "function yetToImplement() {\n\t alert(\"Not implemented in this Demo\");\n\t}", "title": "" }, { "docid": "b3b591f15b49cce7341a3d4689f36fbd", "score": "0.47725", "text": "function tV(a,b,c,d,e,f,g,k,l,n){if(ea[ud]){this.sta=n?n:nwa;t:{n=this.sta;var p=ea[Fc][Kc]||ea[Fc].hash;if(null==n)n=p;else{if(p)for(var p=p[we](1)[zc](We),t=0;t<p[J];t++)if(p[t][we](0,p[t][zd](Df))==n){n=p[t][we](p[t][zd](Df)+1);break t}n=M}}this.pta=n;this.ca={};this.en={};this.attributes=[];a&&this[v](yD,a);b&&this[v](oH,b);c&&this[v](mi,c);d&&this[v](dh,d);e&&this[v](PC,new uV(e[qc]()[zc](mf)));t:if(a=new uV([0,0,0]),Ox.plugins&&Ox.mimeTypes[J])(b=Ox.plugins[WAa])&&b.description&&(a=new uV(b.description[Ab](/([a-zA-Z]|\\s)+/,\nM)[Ab](/(\\s+r|\\s+b[0-9]+)/,mf)[zc](mf)));else if(Ox[Cc]&&0<=Ox[Cc][zd](wAa))for(b=1,c=3;b;)try{c++,b=new ActiveXObject(UAa+c),a=new uV([c,0,0])}catch(u){b=null}else{b=null;try{b=new ActiveXObject(SAa)}catch(x){try{b=new ActiveXObject(TAa),a=new uV([6,0,21]),b.Wya=XK}catch(A){if(6==a.UE)break t}try{b=new ActiveXObject(VAa)}catch(C){}}null!=b&&(a=new uV(b.GetVariable(fFa)[zc](Ke)[1][zc](jf)))}this.DU=a;!ba.opera&&ea.all&&7<this.DU.UE&&(KKa=!0);f&&(this.ca.bgcolor=f);this.ca.quality=g?g:yH;this[v](fna,\n!1);this[v](EI,!1);this[v](Kma,k?k:ba[Fc]);this[v](fF,M);l&&this[v](fF,l)}}", "title": "" }, { "docid": "2aa87e34602b14d045e0a080f1688eb5", "score": "0.47626448", "text": "function _5TH1DSr07DG96Cs6JXqPaw(){}", "title": "" }, { "docid": "cdc3dcfb3e186d0694ae7cc7e4ef46f4", "score": "0.4761833", "text": "function zMV_bYJK_bfz_aBu6W1XgsETg() {}", "title": "" }, { "docid": "6b9ced2a750275a57fa83921a50577e0", "score": "0.47612962", "text": "function _2fFEyKdwBjC3MMVY48h7UA(){}", "title": "" }, { "docid": "6fc6684e76e499dfb4c4bc6fcbdb9f57", "score": "0.47580975", "text": "__init2() {this.compress = false;}", "title": "" }, { "docid": "f1e05234648637eaf5c658ba22ce6e00", "score": "0.47542706", "text": "function inverse(p){var u,deltav,s,d,eps,ro,fi1;var ok;/* Transformation *//* revert y, x*/var tmp=p.x;p.x=p.y;p.y=tmp;if(!this.czech){p.y*=-1;p.x*=-1;}ro=Math.sqrt(p.x*p.x+p.y*p.y);eps=Math.atan2(p.y,p.x);d=eps/Math.sin(this.s0);s=2*(Math.atan(Math.pow(this.ro0/ro,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45);u=Math.asin(Math.cos(this.ad)*Math.sin(s)-Math.sin(this.ad)*Math.cos(s)*Math.cos(d));deltav=Math.asin(Math.cos(s)*Math.sin(d)/Math.cos(u));p.x=this.long0-deltav/this.alfa;fi1=u;ok=0;var iter=0;do{p.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(u/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(fi1))/(1-this.e*Math.sin(fi1)),this.e/2))-this.s45);if(Math.abs(fi1-p.y)<0.0000000001){ok=1;}fi1=p.y;iter+=1;}while(ok===0&&iter<15);if(iter>=15){return null;}return p;}", "title": "" }, { "docid": "9a1d75e4a3cd1ae27d2e7e90a28b295c", "score": "0.475254", "text": "function w9DU74gzczKRXuw3d3noSw() {}", "title": "" }, { "docid": "b6affef8346f3c5a6fcdee0dbe874e6d", "score": "0.47520196", "text": "function FhUTsZyScjS72UyM7uCxFg(){}", "title": "" }, { "docid": "007c65b6697144a40f9104802631ac33", "score": "0.47430122", "text": "function xa(a, b) {\n a.h += b;\n if (.15 < a.h) {\n a.h %= .15;\n var c = a.b;\n if (c.active && c.w)\n if (0 < c.m)\n c.m--;\n else if (c.o.h) {\n if (pa(c.o, c.b),\n c.g.l) {\n ka(c.g, c.b);\n var d = 1\n , e = -1\n , f = c.g.g\n , k = \"\";\n A.hasOwnProperty(f) ? (d = 5,\n e = A[f],\n k = f) : B.hasOwnProperty(f) ? (d = 10,\n e = B[f],\n k = f) : (f = new J(ma(c.g),c.g.g,ja(),.4),\n c.h.push(f));\n f = \"\";\n 0 < e && (f = N(e));\n c.B(c.i, k, d, f);\n\t\t\t\t\t\n\t\t\t\t\t// create 30 characters.\n\t\t\t\t\tfor (i=0; i < 30; i++){\n\t\t\t\t\t\tsa(c);\n\t\t\t\t\t}\n \n\t\t\t\t\tc.m += 2\n }\n } else\n c.active = !1,\n c.v()\n }\n a = a.b;\n for (c = 0; c < a.h.length; c++)\n d = a.h[c],\n d.b += b,\n e = d.j(d.b / d.time),\n d.g = {\n x: d.h.x + e.x,\n y: d.h.y + e.y\n },\n d.done && (a.h.splice(c, 1),\n c--)\n}", "title": "" }, { "docid": "f7bc23dd3171dde7ada46fcfd7c856bb", "score": "0.47413176", "text": "function JSDeflater(/*inbuff*/inbuf) {\n\n /* Copyright (C) 1999 Masanao Izumo <[email protected]>\n * Version: 1.0.1\n * LastModified: Dec 25 1999\n */\n\n var WSIZE = 32768,\t\t// Sliding Window size\n zip_STORED_BLOCK = 0,\n zip_STATIC_TREES = 1,\n zip_DYN_TREES = 2,\n zip_DEFAULT_LEVEL = 6,\n zip_FULL_SEARCH = true,\n zip_INBUFSIZ = 32768,\t// Input buffer size\n zip_INBUF_EXTRA = 64,\t// Extra buffer\n zip_OUTBUFSIZ = 1024 * 8,\n zip_window_size = 2 * WSIZE,\n MIN_MATCH = 3,\n MAX_MATCH = 258,\n zip_BITS = 16,\n LIT_BUFSIZE = 0x2000,\n zip_HASH_BITS = 13,\n zip_DIST_BUFSIZE = LIT_BUFSIZE,\n zip_HASH_SIZE = 1 << zip_HASH_BITS,\n zip_HASH_MASK = zip_HASH_SIZE - 1,\n zip_WMASK = WSIZE - 1,\n zip_NIL = 0, // Tail of hash chains\n zip_TOO_FAR = 4096,\n zip_MIN_LOOKAHEAD = MAX_MATCH + MIN_MATCH + 1,\n zip_MAX_DIST = WSIZE - zip_MIN_LOOKAHEAD,\n zip_SMALLEST = 1,\n zip_MAX_BITS = 15,\n zip_MAX_BL_BITS = 7,\n zip_LENGTH_CODES = 29,\n zip_LITERALS = 256,\n zip_END_BLOCK = 256,\n zip_L_CODES = zip_LITERALS + 1 + zip_LENGTH_CODES,\n zip_D_CODES = 30,\n zip_BL_CODES = 19,\n zip_REP_3_6 = 16,\n zip_REPZ_3_10 = 17,\n zip_REPZ_11_138 = 18,\n zip_HEAP_SIZE = 2 * zip_L_CODES + 1,\n zip_H_SHIFT = parseInt((zip_HASH_BITS + MIN_MATCH - 1) / MIN_MATCH);\n\n var zip_free_queue, zip_qhead, zip_qtail, zip_initflag, zip_outbuf = null, zip_outcnt, zip_outoff, zip_complete,\n zip_window, zip_d_buf, zip_l_buf, zip_prev, zip_bi_buf, zip_bi_valid, zip_block_start, zip_ins_h, zip_hash_head,\n zip_prev_match, zip_match_available, zip_match_length, zip_prev_length, zip_strstart, zip_match_start, zip_eofile,\n zip_lookahead, zip_max_chain_length, zip_max_lazy_match, zip_compr_level, zip_good_match, zip_nice_match,\n zip_dyn_ltree, zip_dyn_dtree, zip_static_ltree, zip_static_dtree, zip_bl_tree, zip_l_desc, zip_d_desc, zip_bl_desc,\n zip_bl_count, zip_heap, zip_heap_len, zip_heap_max, zip_depth, zip_length_code, zip_dist_code, zip_base_length,\n zip_base_dist, zip_flag_buf, zip_last_lit, zip_last_dist, zip_last_flags, zip_flags, zip_flag_bit, zip_opt_len,\n zip_static_len, zip_deflate_data, zip_deflate_pos;\n\n var zip_DeflateCT = function () {\n this.fc = 0; // frequency count or bit string\n this.dl = 0; // father node in Huffman tree or length of bit string\n };\n\n var zip_DeflateTreeDesc = function () {\n this.dyn_tree = null;\t// the dynamic tree\n this.static_tree = null;\t// corresponding static tree or NULL\n this.extra_bits = null;\t// extra bits for each code or NULL\n this.extra_base = 0;\t// base index for extra_bits\n this.elems = 0;\t\t// max number of elements in the tree\n this.max_length = 0;\t// max bit length for the codes\n this.max_code = 0;\t\t// largest code with non zero frequency\n };\n\n /* Values for max_lazy_match, good_match and max_chain_length, depending on\n * the desired pack level (0..9). The values given below have been tuned to\n * exclude worst case performance for pathological files. Better values may be\n * found for specific files.\n */\n var zip_DeflateConfiguration = function (a, b, c, d) {\n this.good_length = a; // reduce lazy search above this match length\n this.max_lazy = b; // do not perform lazy search above this match length\n this.nice_length = c; // quit search above this match length\n this.max_chain = d;\n };\n\n var zip_DeflateBuffer = function () {\n this.next = null;\n this.len = 0;\n this.ptr = new Array(zip_OUTBUFSIZ);\n this.off = 0;\n };\n\n /* constant tables */\n var zip_extra_lbits = new Array(\n 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0);\n var zip_extra_dbits = new Array(\n 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13);\n var zip_extra_blbits = new Array(\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7);\n var zip_bl_order = new Array(\n 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15);\n var zip_configuration_table = new Array(\n new zip_DeflateConfiguration(0, 0, 0, 0),\n new zip_DeflateConfiguration(4, 4, 8, 4),\n new zip_DeflateConfiguration(4, 5, 16, 8),\n new zip_DeflateConfiguration(4, 6, 32, 32),\n new zip_DeflateConfiguration(4, 4, 16, 16),\n new zip_DeflateConfiguration(8, 16, 32, 32),\n new zip_DeflateConfiguration(8, 16, 128, 128),\n new zip_DeflateConfiguration(8, 32, 128, 256),\n new zip_DeflateConfiguration(32, 128, 258, 1024),\n new zip_DeflateConfiguration(32, 258, 258, 4096));\n\n\n /* routines (deflate) */\n\n var zip_deflate_start = function (level) {\n var i;\n\n if (!level)\n level = zip_DEFAULT_LEVEL;\n else if (level < 1)\n level = 1;\n else if (level > 9)\n level = 9;\n\n zip_compr_level = level;\n zip_initflag = false;\n zip_eofile = false;\n if (zip_outbuf != null)\n return;\n\n zip_free_queue = zip_qhead = zip_qtail = null;\n zip_outbuf = new Array(zip_OUTBUFSIZ);\n zip_window = new Array(zip_window_size);\n zip_d_buf = new Array(zip_DIST_BUFSIZE);\n zip_l_buf = new Array(zip_INBUFSIZ + zip_INBUF_EXTRA);\n zip_prev = new Array(1 << zip_BITS);\n zip_dyn_ltree = new Array(zip_HEAP_SIZE);\n for (i = 0; i < zip_HEAP_SIZE; i++) zip_dyn_ltree[i] = new zip_DeflateCT();\n zip_dyn_dtree = new Array(2 * zip_D_CODES + 1);\n for (i = 0; i < 2 * zip_D_CODES + 1; i++) zip_dyn_dtree[i] = new zip_DeflateCT();\n zip_static_ltree = new Array(zip_L_CODES + 2);\n for (i = 0; i < zip_L_CODES + 2; i++) zip_static_ltree[i] = new zip_DeflateCT();\n zip_static_dtree = new Array(zip_D_CODES);\n for (i = 0; i < zip_D_CODES; i++) zip_static_dtree[i] = new zip_DeflateCT();\n zip_bl_tree = new Array(2 * zip_BL_CODES + 1);\n for (i = 0; i < 2 * zip_BL_CODES + 1; i++) zip_bl_tree[i] = new zip_DeflateCT();\n zip_l_desc = new zip_DeflateTreeDesc();\n zip_d_desc = new zip_DeflateTreeDesc();\n zip_bl_desc = new zip_DeflateTreeDesc();\n zip_bl_count = new Array(zip_MAX_BITS + 1);\n zip_heap = new Array(2 * zip_L_CODES + 1);\n zip_depth = new Array(2 * zip_L_CODES + 1);\n zip_length_code = new Array(MAX_MATCH - MIN_MATCH + 1);\n zip_dist_code = new Array(512);\n zip_base_length = new Array(zip_LENGTH_CODES);\n zip_base_dist = new Array(zip_D_CODES);\n zip_flag_buf = new Array(parseInt(LIT_BUFSIZE / 8));\n };\n\n var zip_deflate_end = function () {\n zip_free_queue = zip_qhead = zip_qtail = null;\n zip_outbuf = null;\n zip_window = null;\n zip_d_buf = null;\n zip_l_buf = null;\n zip_prev = null;\n zip_dyn_ltree = null;\n zip_dyn_dtree = null;\n zip_static_ltree = null;\n zip_static_dtree = null;\n zip_bl_tree = null;\n zip_l_desc = null;\n zip_d_desc = null;\n zip_bl_desc = null;\n zip_bl_count = null;\n zip_heap = null;\n zip_depth = null;\n zip_length_code = null;\n zip_dist_code = null;\n zip_base_length = null;\n zip_base_dist = null;\n zip_flag_buf = null;\n };\n\n var zip_reuse_queue = function (p) {\n p.next = zip_free_queue;\n zip_free_queue = p;\n };\n\n var zip_new_queue = function () {\n var p;\n\n if (zip_free_queue != null) {\n p = zip_free_queue;\n zip_free_queue = zip_free_queue.next;\n }\n else\n p = new zip_DeflateBuffer();\n p.next = null;\n p.len = p.off = 0;\n\n return p;\n };\n\n var zip_head1 = function (i) {\n return zip_prev[WSIZE + i];\n };\n\n var zip_head2 = function (i, val) {\n return zip_prev[WSIZE + i] = val;\n };\n\n /* put_byte is used for the compressed output, put_ubyte for the\n * uncompressed output. However unlzw() uses window for its\n * suffix table instead of its output buffer, so it does not use put_ubyte\n * (to be cleaned up).\n */\n var zip_put_byte = function (c) {\n zip_outbuf[zip_outoff + zip_outcnt++] = c;\n if (zip_outoff + zip_outcnt == zip_OUTBUFSIZ)\n zip_qoutbuf();\n };\n\n /* Output a 16 bit value, lsb first */\n var zip_put_short = function (w) {\n w &= 0xffff;\n if (zip_outoff + zip_outcnt < zip_OUTBUFSIZ - 2) {\n zip_outbuf[zip_outoff + zip_outcnt++] = (w & 0xff);\n zip_outbuf[zip_outoff + zip_outcnt++] = (w >>> 8);\n } else {\n zip_put_byte(w & 0xff);\n zip_put_byte(w >>> 8);\n }\n };\n\n /* ==========================================================================\n * Insert string s in the dictionary and set match_head to the previous head\n * of the hash chain (the most recent string with same hash key). Return\n * the previous length of the hash chain.\n * IN assertion: all calls to to INSERT_STRING are made with consecutive\n * input characters and the first MIN_MATCH bytes of s are valid\n * (except for the last MIN_MATCH-1 bytes of the input file).\n */\n var zip_INSERT_STRING = function () {\n zip_ins_h = ((zip_ins_h << zip_H_SHIFT)\n ^ (zip_window[zip_strstart + MIN_MATCH - 1] & 0xff))\n & zip_HASH_MASK;\n zip_hash_head = zip_head1(zip_ins_h);\n zip_prev[zip_strstart & zip_WMASK] = zip_hash_head;\n zip_head2(zip_ins_h, zip_strstart);\n };\n\n /* Send a code of the given tree. c and tree must not have side effects */\n var zip_SEND_CODE = function (c, tree) {\n zip_send_bits(tree[c].fc, tree[c].dl);\n };\n\n /* Mapping from a distance to a distance code. dist is the distance - 1 and\n * must not have side effects. dist_code[256] and dist_code[257] are never\n * used.\n */\n var zip_D_CODE = function (dist) {\n return (dist < 256 ? zip_dist_code[dist]\n : zip_dist_code[256 + (dist >> 7)]) & 0xff;\n };\n\n /* ==========================================================================\n * Compares to subtrees, using the tree depth as tie breaker when\n * the subtrees have equal frequency. This minimizes the worst case length.\n */\n var zip_SMALLER = function (tree, n, m) {\n return tree[n].fc < tree[m].fc ||\n (tree[n].fc == tree[m].fc && zip_depth[n] <= zip_depth[m]);\n };\n\n /* ==========================================================================\n * read string data\n */\n var zip_read_buff = function (buff, offset, n) {\n var i;\n for (i = 0; i < n && zip_deflate_pos < zip_deflate_data.length; i++)\n buff[offset + i] =\n zip_deflate_data[zip_deflate_pos++] & 0xff;\n return i;\n };\n\n /* ==========================================================================\n * Initialize the \"longest match\" routines for a new file\n */\n var zip_lm_init = function () {\n var j;\n\n /* Initialize the hash table. */\n for (j = 0; j < zip_HASH_SIZE; j++)\n zip_prev[WSIZE + j] = 0;\n zip_max_lazy_match = zip_configuration_table[zip_compr_level].max_lazy;\n zip_good_match = zip_configuration_table[zip_compr_level].good_length;\n if (!zip_FULL_SEARCH)\n zip_nice_match = zip_configuration_table[zip_compr_level].nice_length;\n zip_max_chain_length = zip_configuration_table[zip_compr_level].max_chain;\n\n zip_strstart = 0;\n zip_block_start = 0;\n\n zip_lookahead = zip_read_buff(zip_window, 0, 2 * WSIZE);\n if (zip_lookahead <= 0) {\n zip_eofile = true;\n zip_lookahead = 0;\n return;\n }\n zip_eofile = false;\n /* Make sure that we always have enough lookahead. This is important\n * if input comes from a device such as a tty.\n */\n while (zip_lookahead < zip_MIN_LOOKAHEAD && !zip_eofile)\n zip_fill_window();\n\n /* If lookahead < MIN_MATCH, ins_h is garbage, but this is\n * not important since only literal bytes will be emitted.\n */\n zip_ins_h = 0;\n for (j = 0; j < MIN_MATCH - 1; j++) {\n zip_ins_h = ((zip_ins_h << zip_H_SHIFT) ^ (zip_window[j] & 0xff)) & zip_HASH_MASK;\n }\n };\n\n /* ==========================================================================\n * Set match_start to the longest match starting at the given string and\n * return its length. Matches shorter or equal to prev_length are discarded,\n * in which case the result is equal to prev_length and match_start is\n * garbage.\n * IN assertions: cur_match is the head of the hash chain for the current\n * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1\n */\n var zip_longest_match = function (cur_match) {\n var chain_length = zip_max_chain_length; // max hash chain length\n var scanp = zip_strstart; // current string\n var matchp;\t\t// matched string\n var len;\t\t// length of current match\n var best_len = zip_prev_length;\t// best match length so far\n\n /* Stop when cur_match becomes <= limit. To simplify the code,\n * we prevent matches with the string of window index 0.\n */\n var limit = (zip_strstart > zip_MAX_DIST ? zip_strstart - zip_MAX_DIST : zip_NIL);\n\n var strendp = zip_strstart + MAX_MATCH;\n var scan_end1 = zip_window[scanp + best_len - 1];\n var scan_end = zip_window[scanp + best_len];\n\n /* Do not waste too much time if we already have a good match: */\n if (zip_prev_length >= zip_good_match)\n chain_length >>= 2;\n\n do {\n matchp = cur_match;\n\n /* Skip to next match if the match length cannot increase\n * or if the match length is less than 2:\n */\n if (zip_window[matchp + best_len] != scan_end ||\n zip_window[matchp + best_len - 1] != scan_end1 ||\n zip_window[matchp] != zip_window[scanp] ||\n zip_window[++matchp] != zip_window[scanp + 1]) {\n continue;\n }\n\n /* The check at best_len-1 can be removed because it will be made\n * again later. (This heuristic is not always a win.)\n * It is not necessary to compare scan[2] and match[2] since they\n * are always equal when the other bytes match, given that\n * the hash keys are equal and that HASH_BITS >= 8.\n */\n scanp += 2;\n matchp++;\n\n /* We check for insufficient lookahead only every 8th comparison;\n * the 256th check will be made at strstart+258.\n */\n do {\n } while (zip_window[++scanp] == zip_window[++matchp] &&\n zip_window[++scanp] == zip_window[++matchp] &&\n zip_window[++scanp] == zip_window[++matchp] &&\n zip_window[++scanp] == zip_window[++matchp] &&\n zip_window[++scanp] == zip_window[++matchp] &&\n zip_window[++scanp] == zip_window[++matchp] &&\n zip_window[++scanp] == zip_window[++matchp] &&\n zip_window[++scanp] == zip_window[++matchp] &&\n scanp < strendp);\n\n len = MAX_MATCH - (strendp - scanp);\n scanp = strendp - MAX_MATCH;\n\n if (len > best_len) {\n zip_match_start = cur_match;\n best_len = len;\n if (zip_FULL_SEARCH) {\n if (len >= MAX_MATCH) break;\n } else {\n if (len >= zip_nice_match) break;\n }\n\n scan_end1 = zip_window[scanp + best_len - 1];\n scan_end = zip_window[scanp + best_len];\n }\n } while ((cur_match = zip_prev[cur_match & zip_WMASK]) > limit\n && --chain_length != 0);\n\n return best_len;\n };\n\n /* ==========================================================================\n * Fill the window when the lookahead becomes insufficient.\n * Updates strstart and lookahead, and sets eofile if end of input file.\n * IN assertion: lookahead < MIN_LOOKAHEAD && strstart + lookahead > 0\n * OUT assertions: at least one byte has been read, or eofile is set;\n * file reads are performed for at least two bytes (required for the\n * translate_eol option).\n */\n var zip_fill_window = function () {\n var n, m;\n\n // Amount of free space at the end of the window.\n var more = zip_window_size - zip_lookahead - zip_strstart;\n\n /* If the window is almost full and there is insufficient lookahead,\n * move the upper half to the lower one to make room in the upper half.\n */\n if (more == -1) {\n /* Very unlikely, but possible on 16 bit machine if strstart == 0\n * and lookahead == 1 (input done one byte at time)\n */\n more--;\n } else if (zip_strstart >= WSIZE + zip_MAX_DIST) {\n /* By the IN assertion, the window is not empty so we can't confuse\n * more == 0 with more == 64K on a 16 bit machine.\n */\n for (n = 0; n < WSIZE; n++)\n zip_window[n] = zip_window[n + WSIZE];\n\n zip_match_start -= WSIZE;\n zip_strstart -= WSIZE;\n /* we now have strstart >= MAX_DIST: */\n zip_block_start -= WSIZE;\n\n for (n = 0; n < zip_HASH_SIZE; n++) {\n m = zip_head1(n);\n zip_head2(n, m >= WSIZE ? m - WSIZE : zip_NIL);\n }\n for (n = 0; n < WSIZE; n++) {\n /* If n is not on any hash chain, prev[n] is garbage but\n * its value will never be used.\n */\n m = zip_prev[n];\n zip_prev[n] = (m >= WSIZE ? m - WSIZE : zip_NIL);\n }\n more += WSIZE;\n }\n // At this point, more >= 2\n if (!zip_eofile) {\n n = zip_read_buff(zip_window, zip_strstart + zip_lookahead, more);\n if (n <= 0)\n zip_eofile = true;\n else\n zip_lookahead += n;\n }\n };\n\n /* ==========================================================================\n * Processes a new input file and return its compressed length. This\n * function does not perform lazy evaluationof matches and inserts\n * new strings in the dictionary only for unmatched strings or for short\n * matches. It is used only for the fast compression options.\n */\n var zip_deflate_fast = function () {\n while (zip_lookahead != 0 && zip_qhead == null) {\n var flush; // set if current block must be flushed\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n zip_INSERT_STRING();\n\n /* Find the longest match, discarding those <= prev_length.\n * At this point we have always match_length < MIN_MATCH\n */\n if (zip_hash_head != zip_NIL &&\n zip_strstart - zip_hash_head <= zip_MAX_DIST) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n zip_match_length = zip_longest_match(zip_hash_head);\n /* longest_match() sets match_start */\n if (zip_match_length > zip_lookahead)\n zip_match_length = zip_lookahead;\n }\n if (zip_match_length >= MIN_MATCH) {\n flush = zip_ct_tally(zip_strstart - zip_match_start,\n zip_match_length - MIN_MATCH);\n zip_lookahead -= zip_match_length;\n\n /* Insert new strings in the hash table only if the match length\n * is not too large. This saves time but degrades compression.\n */\n if (zip_match_length <= zip_max_lazy_match) {\n zip_match_length--; // string at strstart already in hash table\n do {\n zip_strstart++;\n zip_INSERT_STRING();\n /* strstart never exceeds WSIZE-MAX_MATCH, so there are\n * always MIN_MATCH bytes ahead. If lookahead < MIN_MATCH\n * these bytes are garbage, but it does not matter since\n * the next lookahead bytes will be emitted as literals.\n */\n } while (--zip_match_length != 0);\n zip_strstart++;\n } else {\n zip_strstart += zip_match_length;\n zip_match_length = 0;\n zip_ins_h = zip_window[zip_strstart] & 0xff;\n zip_ins_h = ((zip_ins_h << zip_H_SHIFT) ^ (zip_window[zip_strstart + 1] & 0xff)) & zip_HASH_MASK;\n }\n } else {\n /* No match, output a literal byte */\n flush = zip_ct_tally(0, zip_window[zip_strstart] & 0xff);\n zip_lookahead--;\n zip_strstart++;\n }\n if (flush) {\n zip_flush_block(0);\n zip_block_start = zip_strstart;\n }\n\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n while (zip_lookahead < zip_MIN_LOOKAHEAD && !zip_eofile)\n zip_fill_window();\n }\n };\n\n var zip_deflate_better = function () {\n /* Process the input block. */\n while (zip_lookahead != 0 && zip_qhead == null) {\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n zip_INSERT_STRING();\n\n /* Find the longest match, discarding those <= prev_length.\n */\n zip_prev_length = zip_match_length;\n zip_prev_match = zip_match_start;\n zip_match_length = MIN_MATCH - 1;\n\n if (zip_hash_head != zip_NIL &&\n zip_prev_length < zip_max_lazy_match &&\n zip_strstart - zip_hash_head <= zip_MAX_DIST) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n zip_match_length = zip_longest_match(zip_hash_head);\n /* longest_match() sets match_start */\n if (zip_match_length > zip_lookahead)\n zip_match_length = zip_lookahead;\n\n /* Ignore a length 3 match if it is too distant: */\n if (zip_match_length == MIN_MATCH &&\n zip_strstart - zip_match_start > zip_TOO_FAR) {\n /* If prev_match is also MIN_MATCH, match_start is garbage\n * but we will ignore the current match anyway.\n */\n zip_match_length--;\n }\n }\n /* If there was a match at the previous step and the current\n * match is not better, output the previous match:\n */\n if (zip_prev_length >= MIN_MATCH &&\n zip_match_length <= zip_prev_length) {\n var flush; // set if current block must be flushed\n flush = zip_ct_tally(zip_strstart - 1 - zip_prev_match,\n zip_prev_length - MIN_MATCH);\n\n /* Insert in hash table all strings up to the end of the match.\n * strstart-1 and strstart are already inserted.\n */\n zip_lookahead -= zip_prev_length - 1;\n zip_prev_length -= 2;\n do {\n zip_strstart++;\n zip_INSERT_STRING();\n /* strstart never exceeds WSIZE-MAX_MATCH, so there are\n * always MIN_MATCH bytes ahead. If lookahead < MIN_MATCH\n * these bytes are garbage, but it does not matter since the\n * next lookahead bytes will always be emitted as literals.\n */\n } while (--zip_prev_length != 0);\n zip_match_available = 0;\n zip_match_length = MIN_MATCH - 1;\n zip_strstart++;\n if (flush) {\n zip_flush_block(0);\n zip_block_start = zip_strstart;\n }\n } else if (zip_match_available != 0) {\n /* If there was no match at the previous position, output a\n * single literal. If there was a match but the current match\n * is longer, truncate the previous match to a single literal.\n */\n if (zip_ct_tally(0, zip_window[zip_strstart - 1] & 0xff)) {\n zip_flush_block(0);\n zip_block_start = zip_strstart;\n }\n zip_strstart++;\n zip_lookahead--;\n } else {\n /* There is no previous match to compare with, wait for\n * the next step to decide.\n */\n zip_match_available = 1;\n zip_strstart++;\n zip_lookahead--;\n }\n\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n while (zip_lookahead < zip_MIN_LOOKAHEAD && !zip_eofile)\n zip_fill_window();\n }\n };\n\n var zip_init_deflate = function () {\n if (zip_eofile)\n return;\n zip_bi_buf = 0;\n zip_bi_valid = 0;\n zip_ct_init();\n zip_lm_init();\n\n zip_qhead = null;\n zip_outcnt = 0;\n zip_outoff = 0;\n zip_match_available = 0;\n\n if (zip_compr_level <= 3) {\n zip_prev_length = MIN_MATCH - 1;\n zip_match_length = 0;\n }\n else {\n zip_match_length = MIN_MATCH - 1;\n zip_match_available = 0;\n zip_match_available = 0;\n }\n\n zip_complete = false;\n };\n\n /* ==========================================================================\n * Same as above, but achieves better compression. We use a lazy\n * evaluation for matches: a match is finally adopted only if there is\n * no better match at the next window position.\n */\n var zip_deflate_internal = function (buff, off, buff_size) {\n var n;\n\n if (!zip_initflag) {\n zip_init_deflate();\n zip_initflag = true;\n if (zip_lookahead == 0) { // empty\n zip_complete = true;\n return 0;\n }\n }\n\n if ((n = zip_qcopy(buff, off, buff_size)) == buff_size)\n return buff_size;\n\n if (zip_complete)\n return n;\n\n if (zip_compr_level <= 3) // optimized for speed\n zip_deflate_fast();\n else\n zip_deflate_better();\n if (zip_lookahead == 0) {\n if (zip_match_available != 0)\n zip_ct_tally(0, zip_window[zip_strstart - 1] & 0xff);\n zip_flush_block(1);\n zip_complete = true;\n }\n return n + zip_qcopy(buff, n + off, buff_size - n);\n };\n\n var zip_qcopy = function (buff, off, buff_size) {\n var n, i, j;\n\n n = 0;\n while (zip_qhead != null && n < buff_size) {\n i = buff_size - n;\n if (i > zip_qhead.len)\n i = zip_qhead.len;\n for (j = 0; j < i; j++)\n buff[off + n + j] = zip_qhead.ptr[zip_qhead.off + j];\n\n zip_qhead.off += i;\n zip_qhead.len -= i;\n n += i;\n if (zip_qhead.len == 0) {\n var p;\n p = zip_qhead;\n zip_qhead = zip_qhead.next;\n zip_reuse_queue(p);\n }\n }\n\n if (n == buff_size)\n return n;\n\n if (zip_outoff < zip_outcnt) {\n i = buff_size - n;\n if (i > zip_outcnt - zip_outoff)\n i = zip_outcnt - zip_outoff;\n // System.arraycopy(outbuf, outoff, buff, off + n, i);\n for (j = 0; j < i; j++)\n buff[off + n + j] = zip_outbuf[zip_outoff + j];\n zip_outoff += i;\n n += i;\n if (zip_outcnt == zip_outoff)\n zip_outcnt = zip_outoff = 0;\n }\n return n;\n };\n\n /* ==========================================================================\n * Allocate the match buffer, initialize the various tables and save the\n * location of the internal file attribute (ascii/binary) and method\n * (DEFLATE/STORE).\n */\n var zip_ct_init = function () {\n var n;\t// iterates over tree elements\n var bits;\t// bit counter\n var length;\t// length value\n var code;\t// code value\n var dist;\t// distance index\n\n if (zip_static_dtree[0].dl != 0) return; // ct_init already called\n\n zip_l_desc.dyn_tree = zip_dyn_ltree;\n zip_l_desc.static_tree = zip_static_ltree;\n zip_l_desc.extra_bits = zip_extra_lbits;\n zip_l_desc.extra_base = zip_LITERALS + 1;\n zip_l_desc.elems = zip_L_CODES;\n zip_l_desc.max_length = zip_MAX_BITS;\n zip_l_desc.max_code = 0;\n\n zip_d_desc.dyn_tree = zip_dyn_dtree;\n zip_d_desc.static_tree = zip_static_dtree;\n zip_d_desc.extra_bits = zip_extra_dbits;\n zip_d_desc.extra_base = 0;\n zip_d_desc.elems = zip_D_CODES;\n zip_d_desc.max_length = zip_MAX_BITS;\n zip_d_desc.max_code = 0;\n\n zip_bl_desc.dyn_tree = zip_bl_tree;\n zip_bl_desc.static_tree = null;\n zip_bl_desc.extra_bits = zip_extra_blbits;\n zip_bl_desc.extra_base = 0;\n zip_bl_desc.elems = zip_BL_CODES;\n zip_bl_desc.max_length = zip_MAX_BL_BITS;\n zip_bl_desc.max_code = 0;\n\n // Initialize the mapping length (0..255) -> length code (0..28)\n length = 0;\n for (code = 0; code < zip_LENGTH_CODES - 1; code++) {\n zip_base_length[code] = length;\n for (n = 0; n < (1 << zip_extra_lbits[code]); n++)\n zip_length_code[length++] = code;\n }\n /* Note that the length 255 (match length 258) can be represented\n * in two different ways: code 284 + 5 bits or code 285, so we\n * overwrite length_code[255] to use the best encoding:\n */\n zip_length_code[length - 1] = code;\n\n /* Initialize the mapping dist (0..32K) -> dist code (0..29) */\n dist = 0;\n for (code = 0; code < 16; code++) {\n zip_base_dist[code] = dist;\n for (n = 0; n < (1 << zip_extra_dbits[code]); n++) {\n zip_dist_code[dist++] = code;\n }\n }\n dist >>= 7; // from now on, all distances are divided by 128\n for (; code < zip_D_CODES; code++) {\n zip_base_dist[code] = dist << 7;\n for (n = 0; n < (1 << (zip_extra_dbits[code] - 7)); n++)\n zip_dist_code[256 + dist++] = code;\n }\n // Construct the codes of the static literal tree\n for (bits = 0; bits <= zip_MAX_BITS; bits++)\n zip_bl_count[bits] = 0;\n n = 0;\n while (n <= 143) {\n zip_static_ltree[n++].dl = 8;\n zip_bl_count[8]++;\n }\n while (n <= 255) {\n zip_static_ltree[n++].dl = 9;\n zip_bl_count[9]++;\n }\n while (n <= 279) {\n zip_static_ltree[n++].dl = 7;\n zip_bl_count[7]++;\n }\n while (n <= 287) {\n zip_static_ltree[n++].dl = 8;\n zip_bl_count[8]++;\n }\n /* Codes 286 and 287 do not exist, but we must include them in the\n * tree construction to get a canonical Huffman tree (longest code\n * all ones)\n */\n zip_gen_codes(zip_static_ltree, zip_L_CODES + 1);\n\n /* The static distance tree is trivial: */\n for (n = 0; n < zip_D_CODES; n++) {\n zip_static_dtree[n].dl = 5;\n zip_static_dtree[n].fc = zip_bi_reverse(n, 5);\n }\n\n // Initialize the first block of the first file:\n zip_init_block();\n };\n\n /* ==========================================================================\n * Initialize a new block.\n */\n var zip_init_block = function () {\n var n; // iterates over tree elements\n\n // Initialize the trees.\n for (n = 0; n < zip_L_CODES; n++) zip_dyn_ltree[n].fc = 0;\n for (n = 0; n < zip_D_CODES; n++) zip_dyn_dtree[n].fc = 0;\n for (n = 0; n < zip_BL_CODES; n++) zip_bl_tree[n].fc = 0;\n\n zip_dyn_ltree[zip_END_BLOCK].fc = 1;\n zip_opt_len = zip_static_len = 0;\n zip_last_lit = zip_last_dist = zip_last_flags = 0;\n zip_flags = 0;\n zip_flag_bit = 1;\n };\n\n /* ==========================================================================\n * Restore the heap property by moving down the tree starting at node k,\n * exchanging a node with the smallest of its two sons if necessary, stopping\n * when the heap property is re-established (each father smaller than its\n * two sons).\n */\n var zip_pqdownheap = function (tree,\t// the tree to restore\n k) {\t// node to move down\n var v = zip_heap[k];\n var j = k << 1;\t// left son of k\n\n while (j <= zip_heap_len) {\n // Set j to the smallest of the two sons:\n if (j < zip_heap_len &&\n zip_SMALLER(tree, zip_heap[j + 1], zip_heap[j]))\n j++;\n\n // Exit if v is smaller than both sons\n if (zip_SMALLER(tree, v, zip_heap[j]))\n break;\n\n // Exchange v with the smallest son\n zip_heap[k] = zip_heap[j];\n k = j;\n\n // And continue down the tree, setting j to the left son of k\n j <<= 1;\n }\n zip_heap[k] = v;\n };\n\n /* ==========================================================================\n * Compute the optimal bit lengths for a tree and update the total bit length\n * for the current block.\n * IN assertion: the fields freq and dad are set, heap[heap_max] and\n * above are the tree nodes sorted by increasing frequency.\n * OUT assertions: the field len is set to the optimal bit length, the\n * array bl_count contains the frequencies for each bit length.\n * The length opt_len is updated; static_len is also updated if stree is\n * not null.\n */\n var zip_gen_bitlen = function (desc) { // the tree descriptor\n var tree = desc.dyn_tree;\n var extra = desc.extra_bits;\n var base = desc.extra_base;\n var max_code = desc.max_code;\n var max_length = desc.max_length;\n var stree = desc.static_tree;\n var h;\t\t// heap index\n var n, m;\t\t// iterate over the tree elements\n var bits;\t\t// bit length\n var xbits;\t\t// extra bits\n var f;\t\t// frequency\n var overflow = 0;\t// number of elements with bit length too large\n\n for (bits = 0; bits <= zip_MAX_BITS; bits++)\n zip_bl_count[bits] = 0;\n\n /* In a first pass, compute the optimal bit lengths (which may\n * overflow in the case of the bit length tree).\n */\n tree[zip_heap[zip_heap_max]].dl = 0; // root of the heap\n\n for (h = zip_heap_max + 1; h < zip_HEAP_SIZE; h++) {\n n = zip_heap[h];\n bits = tree[tree[n].dl].dl + 1;\n if (bits > max_length) {\n bits = max_length;\n overflow++;\n }\n tree[n].dl = bits;\n // We overwrite tree[n].dl which is no longer needed\n\n if (n > max_code)\n continue; // not a leaf node\n\n zip_bl_count[bits]++;\n xbits = 0;\n if (n >= base)\n xbits = extra[n - base];\n f = tree[n].fc;\n zip_opt_len += f * (bits + xbits);\n if (stree != null)\n zip_static_len += f * (stree[n].dl + xbits);\n }\n if (overflow == 0)\n return;\n\n // This happens for example on obj2 and pic of the Calgary corpus\n\n // Find the first bit length which could increase:\n do {\n bits = max_length - 1;\n while (zip_bl_count[bits] == 0)\n bits--;\n zip_bl_count[bits]--;\t\t// move one leaf down the tree\n zip_bl_count[bits + 1] += 2;\t// move one overflow item as its brother\n zip_bl_count[max_length]--;\n /* The brother of the overflow item also moves one step up,\n * but this does not affect bl_count[max_length]\n */\n overflow -= 2;\n } while (overflow > 0);\n\n /* Now recompute all bit lengths, scanning in increasing frequency.\n * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all\n * lengths instead of fixing only the wrong ones. This idea is taken\n * from 'ar' written by Haruhiko Okumura.)\n */\n for (bits = max_length; bits != 0; bits--) {\n n = zip_bl_count[bits];\n while (n != 0) {\n m = zip_heap[--h];\n if (m > max_code)\n continue;\n if (tree[m].dl != bits) {\n zip_opt_len += (bits - tree[m].dl) * tree[m].fc;\n tree[m].fc = bits;\n }\n n--;\n }\n }\n };\n\n /* ==========================================================================\n * Generate the codes for a given tree and bit counts (which need not be\n * optimal).\n * IN assertion: the array bl_count contains the bit length statistics for\n * the given tree and the field len is set for all tree elements.\n * OUT assertion: the field code is set for all tree elements of non\n * zero code length.\n */\n var zip_gen_codes = function (tree,\t// the tree to decorate\n max_code) {\t// largest code with non zero frequency\n var next_code = new Array(zip_MAX_BITS + 1); // next code value for each bit length\n var code = 0;\t\t// running code value\n var bits;\t\t\t// bit index\n var n;\t\t\t// code index\n\n /* The distribution counts are first used to generate the code values\n * without bit reversal.\n */\n for (bits = 1; bits <= zip_MAX_BITS; bits++) {\n code = ((code + zip_bl_count[bits - 1]) << 1);\n next_code[bits] = code;\n }\n\n /* Check that the bit counts in bl_count are consistent. The last code\n * must be all ones.\n */\n for (n = 0; n <= max_code; n++) {\n var len = tree[n].dl;\n if (len == 0)\n continue;\n // Now reverse the bits\n tree[n].fc = zip_bi_reverse(next_code[len]++, len);\n }\n };\n\n /* ==========================================================================\n * Construct one Huffman tree and assigns the code bit strings and lengths.\n * Update the total bit length for the current block.\n * IN assertion: the field freq is set for all tree elements.\n * OUT assertions: the fields len and code are set to the optimal bit length\n * and corresponding code. The length opt_len is updated; static_len is\n * also updated if stree is not null. The field max_code is set.\n */\n var zip_build_tree = function (desc) { // the tree descriptor\n var tree = desc.dyn_tree;\n var stree = desc.static_tree;\n var elems = desc.elems;\n var n, m;\t\t// iterate over heap elements\n var max_code = -1;\t// largest code with non zero frequency\n var node = elems;\t// next internal node of the tree\n\n /* Construct the initial heap, with least frequent element in\n * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].\n * heap[0] is not used.\n */\n zip_heap_len = 0;\n zip_heap_max = zip_HEAP_SIZE;\n\n for (n = 0; n < elems; n++) {\n if (tree[n].fc != 0) {\n zip_heap[++zip_heap_len] = max_code = n;\n zip_depth[n] = 0;\n } else\n tree[n].dl = 0;\n }\n\n /* The pkzip format requires that at least one distance code exists,\n * and that at least one bit should be sent even if there is only one\n * possible code. So to avoid special checks later on we force at least\n * two codes of non zero frequency.\n */\n while (zip_heap_len < 2) {\n var xnew = zip_heap[++zip_heap_len] = (max_code < 2 ? ++max_code : 0);\n tree[xnew].fc = 1;\n zip_depth[xnew] = 0;\n zip_opt_len--;\n if (stree != null)\n zip_static_len -= stree[xnew].dl;\n // new is 0 or 1 so it does not have extra bits\n }\n desc.max_code = max_code;\n\n /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,\n * establish sub-heaps of increasing lengths:\n */\n for (n = zip_heap_len >> 1; n >= 1; n--)\n zip_pqdownheap(tree, n);\n\n /* Construct the Huffman tree by repeatedly combining the least two\n * frequent nodes.\n */\n do {\n n = zip_heap[zip_SMALLEST];\n zip_heap[zip_SMALLEST] = zip_heap[zip_heap_len--];\n zip_pqdownheap(tree, zip_SMALLEST);\n\n m = zip_heap[zip_SMALLEST]; // m = node of next least frequency\n\n // keep the nodes sorted by frequency\n zip_heap[--zip_heap_max] = n;\n zip_heap[--zip_heap_max] = m;\n\n // Create a new node father of n and m\n tree[node].fc = tree[n].fc + tree[m].fc;\n if (zip_depth[n] > zip_depth[m] + 1)\n zip_depth[node] = zip_depth[n];\n else\n zip_depth[node] = zip_depth[m] + 1;\n tree[n].dl = tree[m].dl = node;\n\n // and insert the new node in the heap\n zip_heap[zip_SMALLEST] = node++;\n zip_pqdownheap(tree, zip_SMALLEST);\n\n } while (zip_heap_len >= 2);\n\n zip_heap[--zip_heap_max] = zip_heap[zip_SMALLEST];\n\n /* At this point, the fields freq and dad are set. We can now\n * generate the bit lengths.\n */\n zip_gen_bitlen(desc);\n\n // The field len is now set, we can generate the bit codes\n zip_gen_codes(tree, max_code);\n };\n\n /* ==========================================================================\n * Scan a literal or distance tree to determine the frequencies of the codes\n * in the bit length tree. Updates opt_len to take into account the repeat\n * counts. (The contribution of the bit length codes will be added later\n * during the construction of bl_tree.)\n */\n var zip_scan_tree = function (tree,// the tree to be scanned\n max_code) { // and its largest code of non zero frequency\n var n;\t\t\t// iterates over all tree elements\n var prevlen = -1;\t\t// last emitted length\n var curlen;\t\t\t// length of current code\n var nextlen = tree[0].dl;\t// length of next code\n var count = 0;\t\t// repeat count of the current code\n var max_count = 7;\t\t// max repeat count\n var min_count = 4;\t\t// min repeat count\n\n if (nextlen == 0) {\n max_count = 138;\n min_count = 3;\n }\n tree[max_code + 1].dl = 0xffff; // guard\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[n + 1].dl;\n if (++count < max_count && curlen == nextlen)\n continue;\n else if (count < min_count)\n zip_bl_tree[curlen].fc += count;\n else if (curlen != 0) {\n if (curlen != prevlen)\n zip_bl_tree[curlen].fc++;\n zip_bl_tree[zip_REP_3_6].fc++;\n } else if (count <= 10)\n zip_bl_tree[zip_REPZ_3_10].fc++;\n else\n zip_bl_tree[zip_REPZ_11_138].fc++;\n count = 0;\n prevlen = curlen;\n if (nextlen == 0) {\n max_count = 138;\n min_count = 3;\n } else if (curlen == nextlen) {\n max_count = 6;\n min_count = 3;\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n };\n\n /* ==========================================================================\n * Send a literal or distance tree in compressed form, using the codes in\n * bl_tree.\n */\n var zip_send_tree = function (tree, // the tree to be scanned\n max_code) { // and its largest code of non zero frequency\n var n;\t\t\t// iterates over all tree elements\n var prevlen = -1;\t\t// last emitted length\n var curlen;\t\t\t// length of current code\n var nextlen = tree[0].dl;\t// length of next code\n var count = 0;\t\t// repeat count of the current code\n var max_count = 7;\t\t// max repeat count\n var min_count = 4;\t\t// min repeat count\n\n /* tree[max_code+1].dl = -1; */\n /* guard already set */\n if (nextlen == 0) {\n max_count = 138;\n min_count = 3;\n }\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[n + 1].dl;\n if (++count < max_count && curlen == nextlen) {\n continue;\n } else if (count < min_count) {\n do {\n zip_SEND_CODE(curlen, zip_bl_tree);\n } while (--count != 0);\n } else if (curlen != 0) {\n if (curlen != prevlen) {\n zip_SEND_CODE(curlen, zip_bl_tree);\n count--;\n }\n // Assert(count >= 3 && count <= 6, \" 3_6?\");\n zip_SEND_CODE(zip_REP_3_6, zip_bl_tree);\n zip_send_bits(count - 3, 2);\n } else if (count <= 10) {\n zip_SEND_CODE(zip_REPZ_3_10, zip_bl_tree);\n zip_send_bits(count - 3, 3);\n } else {\n zip_SEND_CODE(zip_REPZ_11_138, zip_bl_tree);\n zip_send_bits(count - 11, 7);\n }\n count = 0;\n prevlen = curlen;\n if (nextlen == 0) {\n max_count = 138;\n min_count = 3;\n } else if (curlen == nextlen) {\n max_count = 6;\n min_count = 3;\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n };\n\n /* ==========================================================================\n * Construct the Huffman tree for the bit lengths and return the index in\n * bl_order of the last bit length code to send.\n */\n var zip_build_bl_tree = function () {\n var max_blindex; // index of last bit length code of non zero freq\n\n // Determine the bit length frequencies for literal and distance trees\n zip_scan_tree(zip_dyn_ltree, zip_l_desc.max_code);\n zip_scan_tree(zip_dyn_dtree, zip_d_desc.max_code);\n\n // Build the bit length tree:\n zip_build_tree(zip_bl_desc);\n /* opt_len now includes the length of the tree representations, except\n * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.\n */\n\n /* Determine the number of bit length codes to send. The pkzip format\n * requires that at least 4 bit length codes be sent. (appnote.txt says\n * 3 but the actual value used is 4.)\n */\n for (max_blindex = zip_BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n if (zip_bl_tree[zip_bl_order[max_blindex]].dl != 0) break;\n }\n /* Update opt_len to include the bit length tree and counts */\n zip_opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n return max_blindex;\n };\n\n /* ==========================================================================\n * Send the header for a block using dynamic Huffman trees: the counts, the\n * lengths of the bit length codes, the literal tree and the distance tree.\n * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n */\n var zip_send_all_trees = function (lcodes, dcodes, blcodes) { // number of codes for each tree\n var rank; // index in bl_order\n zip_send_bits(lcodes - 257, 5); // not +255 as stated in appnote.txt\n zip_send_bits(dcodes - 1, 5);\n zip_send_bits(blcodes - 4, 4); // not -3 as stated in appnote.txt\n for (rank = 0; rank < blcodes; rank++) {\n zip_send_bits(zip_bl_tree[zip_bl_order[rank]].dl, 3);\n }\n\n // send the literal tree\n zip_send_tree(zip_dyn_ltree, lcodes - 1);\n\n // send the distance tree\n zip_send_tree(zip_dyn_dtree, dcodes - 1);\n };\n\n /* ==========================================================================\n * Determine the best encoding for the current block: dynamic trees, static\n * trees or store, and output the encoded block to the zip file.\n */\n var zip_flush_block = function (eof) { // true if this is the last block for a file\n var opt_lenb, static_lenb; // opt_len and static_len in bytes\n var max_blindex;\t// index of last bit length code of non zero freq\n var stored_len;\t// length of input block\n\n stored_len = zip_strstart - zip_block_start;\n zip_flag_buf[zip_last_flags] = zip_flags; // Save the flags for the last 8 items\n\n // Construct the literal and distance trees\n zip_build_tree(zip_l_desc);\n zip_build_tree(zip_d_desc);\n /* At this point, opt_len and static_len are the total bit lengths of\n * the compressed block data, excluding the tree representations.\n */\n\n /* Build the bit length tree for the above two trees, and get the index\n * in bl_order of the last bit length code to send.\n */\n max_blindex = zip_build_bl_tree();\n\n // Determine the best encoding. Compute first the block length in bytes\n opt_lenb = (zip_opt_len + 3 + 7) >> 3;\n static_lenb = (zip_static_len + 3 + 7) >> 3;\n if (static_lenb <= opt_lenb)\n opt_lenb = static_lenb;\n if (stored_len + 4 <= opt_lenb // 4: two words for the lengths\n && zip_block_start >= 0) {\n var i;\n\n /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n * Otherwise we can't have processed more than WSIZE input bytes since\n * the last block flush, because compression would have been\n * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n * transform a block into a stored block.\n */\n zip_send_bits((zip_STORED_BLOCK << 1) + eof, 3);\n /* send block type */\n zip_bi_windup();\n /* align on byte boundary */\n zip_put_short(stored_len);\n zip_put_short(~stored_len);\n\n // copy block\n for (i = 0; i < stored_len; i++)\n zip_put_byte(zip_window[zip_block_start + i]);\n\n } else if (static_lenb == opt_lenb) {\n zip_send_bits((zip_STATIC_TREES << 1) + eof, 3);\n zip_compress_block(zip_static_ltree, zip_static_dtree);\n } else {\n zip_send_bits((zip_DYN_TREES << 1) + eof, 3);\n zip_send_all_trees(zip_l_desc.max_code + 1,\n zip_d_desc.max_code + 1,\n max_blindex + 1);\n zip_compress_block(zip_dyn_ltree, zip_dyn_dtree);\n }\n\n zip_init_block();\n\n if (eof != 0)\n zip_bi_windup();\n };\n\n /* ==========================================================================\n * Save the match info and tally the frequency counts. Return true if\n * the current block must be flushed.\n */\n var zip_ct_tally = function (dist, // distance of matched string\n lc) { // match length-MIN_MATCH or unmatched char (if dist==0)\n zip_l_buf[zip_last_lit++] = lc;\n if (dist == 0) {\n // lc is the unmatched char\n zip_dyn_ltree[lc].fc++;\n } else {\n // Here, lc is the match length - MIN_MATCH\n dist--;\t\t // dist = match distance - 1\n zip_dyn_ltree[zip_length_code[lc] + zip_LITERALS + 1].fc++;\n zip_dyn_dtree[zip_D_CODE(dist)].fc++;\n\n zip_d_buf[zip_last_dist++] = dist;\n zip_flags |= zip_flag_bit;\n }\n zip_flag_bit <<= 1;\n\n // Output the flags if they fill a byte\n if ((zip_last_lit & 7) == 0) {\n zip_flag_buf[zip_last_flags++] = zip_flags;\n zip_flags = 0;\n zip_flag_bit = 1;\n }\n // Try to guess if it is profitable to stop the current block here\n if (zip_compr_level > 2 && (zip_last_lit & 0xfff) == 0) {\n // Compute an upper bound for the compressed length\n var out_length = zip_last_lit * 8;\n var in_length = zip_strstart - zip_block_start;\n var dcode;\n\n for (dcode = 0; dcode < zip_D_CODES; dcode++) {\n out_length += zip_dyn_dtree[dcode].fc * (5 + zip_extra_dbits[dcode]);\n }\n out_length >>= 3;\n if (zip_last_dist < parseInt(zip_last_lit / 2) &&\n out_length < parseInt(in_length / 2))\n return true;\n }\n return (zip_last_lit == LIT_BUFSIZE - 1 ||\n zip_last_dist == zip_DIST_BUFSIZE);\n /* We avoid equality with LIT_BUFSIZE because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n };\n\n /* ==========================================================================\n * Send the block data compressed using the given Huffman trees\n */\n var zip_compress_block = function (ltree,\t// literal tree\n dtree) {\t// distance tree\n var dist;\t\t// distance of matched string\n var lc;\t\t// match length or unmatched char (if dist == 0)\n var lx = 0;\t\t// running index in l_buf\n var dx = 0;\t\t// running index in d_buf\n var fx = 0;\t\t// running index in flag_buf\n var flag = 0;\t// current flags\n var code;\t\t// the code to send\n var extra;\t\t// number of extra bits to send\n\n if (zip_last_lit != 0) do {\n if ((lx & 7) == 0)\n flag = zip_flag_buf[fx++];\n lc = zip_l_buf[lx++] & 0xff;\n if ((flag & 1) == 0) {\n zip_SEND_CODE(lc, ltree);\n /* send a literal byte */\n } else {\n // Here, lc is the match length - MIN_MATCH\n code = zip_length_code[lc];\n zip_SEND_CODE(code + zip_LITERALS + 1, ltree); // send the length code\n extra = zip_extra_lbits[code];\n if (extra != 0) {\n lc -= zip_base_length[code];\n zip_send_bits(lc, extra); // send the extra length bits\n }\n dist = zip_d_buf[dx++];\n // Here, dist is the match distance - 1\n code = zip_D_CODE(dist);\n zip_SEND_CODE(code, dtree);\t // send the distance code\n extra = zip_extra_dbits[code];\n if (extra != 0) {\n dist -= zip_base_dist[code];\n zip_send_bits(dist, extra); // send the extra distance bits\n }\n } // literal or match pair ?\n flag >>= 1;\n } while (lx < zip_last_lit);\n\n zip_SEND_CODE(zip_END_BLOCK, ltree);\n };\n\n /* ==========================================================================\n * Send a value on a given number of bits.\n * IN assertion: length <= 16 and value fits in length bits.\n */\n var zip_Buf_size = 16; // bit size of bi_buf\n var zip_send_bits = function (value,\t// value to send\n length) {\t// number of bits\n /* If not enough room in bi_buf, use (valid) bits from bi_buf and\n * (16 - bi_valid) bits from value, leaving (width - (16-bi_valid))\n * unused bits in value.\n */\n if (zip_bi_valid > zip_Buf_size - length) {\n zip_bi_buf |= (value << zip_bi_valid);\n zip_put_short(zip_bi_buf);\n zip_bi_buf = (value >> (zip_Buf_size - zip_bi_valid));\n zip_bi_valid += length - zip_Buf_size;\n } else {\n zip_bi_buf |= value << zip_bi_valid;\n zip_bi_valid += length;\n }\n };\n\n /* ==========================================================================\n * Reverse the first len bits of a code, using straightforward code (a faster\n * method would use a table)\n * IN assertion: 1 <= len <= 15\n */\n var zip_bi_reverse = function (code,\t// the value to invert\n len) {\t// its bit length\n var res = 0;\n do {\n res |= code & 1;\n code >>= 1;\n res <<= 1;\n } while (--len > 0);\n return res >> 1;\n };\n\n /* ==========================================================================\n * Write out any remaining bits in an incomplete byte.\n */\n var zip_bi_windup = function () {\n if (zip_bi_valid > 8) {\n zip_put_short(zip_bi_buf);\n } else if (zip_bi_valid > 0) {\n zip_put_byte(zip_bi_buf);\n }\n zip_bi_buf = 0;\n zip_bi_valid = 0;\n };\n\n var zip_qoutbuf = function () {\n if (zip_outcnt != 0) {\n var q, i;\n q = zip_new_queue();\n if (zip_qhead == null)\n zip_qhead = zip_qtail = q;\n else\n zip_qtail = zip_qtail.next = q;\n q.len = zip_outcnt - zip_outoff;\n for (i = 0; i < q.len; i++)\n q.ptr[i] = zip_outbuf[zip_outoff + i];\n zip_outcnt = zip_outoff = 0;\n }\n };\n\n function deflate(buffData, level) {\n zip_deflate_data = buffData;\n zip_deflate_pos = 0;\n zip_deflate_start(level);\n\n var buff = new Array(1024),\n pages = [],\n totalSize = 0,\n i;\n\n for (i = 0; i < 1024; i++) buff[i] = 0;\n while ((i = zip_deflate_internal(buff, 0, buff.length)) > 0) {\n var buf = new Buffer(buff.slice(0, i));\n pages.push(buf);\n totalSize += buf.length;\n }\n\n if (pages.length == 1) {\n return pages[0];\n }\n\n var result = new Buffer(totalSize),\n index = 0;\n\n for (i = 0; i < pages.length; i++) {\n pages[i].copy(result, index);\n index = index + pages[i].length\n }\n\n return result;\n }\n\n return {\n deflate: function () {\n return deflate(inbuf, 8);\n }\n }\n}", "title": "" }, { "docid": "bda22ab7d5efc0b7f2fe7281b48438c4", "score": "0.47359347", "text": "function __bJQ43mBkATis_auW8hsdm0Q(){}", "title": "" }, { "docid": "24ab443408b1dc43edd3712f28e7446c", "score": "0.47356063", "text": "function y(){function e(e){t.Extends(f,e),i(e.jQuery),t._base.name(\"Mississippi\"),n=t._base,a=n.config,r=n.utils}function i(e){o=e,s=e}var t=new I(this);this.LocalSVNRevision=\"$Rev: 3874 $\";{var n,a,r,o,s;t.Override(\"buildHtml\",function(){var e='<div id=\"{{id}}\" class=\"walkme-player walkme-mississippi walkme-theme-{{theme}} walkme-direction-{{direction}} walkme-{{isIe}} walkme-position-major-{{positionMajor}} walkme-position-minor-{{positionMinor}} {{accessibleClass}}\"><div class=\"walkme-out-wrapper\"><div class=\"walkme-in-wrapper\"><div class=\"walkme-title\">{{{title}}}</div><div class=\"walkme-arrow\"></div><div class=\"walkme-bar\"></div></div></div></div>',i=n.mustache().to_html(e,{id:n.id(),theme:a().TriangleTheme,direction:a().Direction,isIe:n.isIeClass(),positionMajor:n.positionMajor(),positionMinor:n.positionMinor(),title:a().ClosedMenuTitle,accessibleClass:n.accessibleClass()});return i}),t.Override(\"addResources\",function(e,i){var t=[{id:\"widgetFont\",name:\"widget-font\",url:\"/player/resources/fonts/widget-font_v3\",dummeyText:\"&#xe60c;\"},{id:\"opensans\",name:\"opensans\",url:\"/player/resources/fonts/opensans\"}];r().ResourceManager.fonts(t,s(\"head\"),e,i)})}e.apply(null,arguments)}", "title": "" }, { "docid": "0da2a390160e84e1885c2ab7890cbbea", "score": "0.47296813", "text": "function matIV(){this.create=function(){return new Float32Array(16)};this.identity=function(a){a[0]=1;a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=1;a[6]=0;a[7]=0;a[8]=0;a[9]=0;a[10]=1;a[11]=0;a[12]=0;a[13]=0;a[14]=0;a[15]=1;return a};this.multiply=function(a,c,b){var d=a[0],e=a[1],f=a[2],g=a[3],h=a[4],m=a[5],k=a[6],l=a[7],p=a[8],q=a[9],n=a[10],r=a[11],w=a[12],x=a[13],y=a[14];a=a[15];var t=c[0],z=c[1],A=c[2],u=c[3],B=c[4],C=c[5],D=c[6],E=c[7],F=c[8],G=c[9],H=c[10],I=c[11],v=c[12],J=c[13],K=c[14];c=c[15];b[0]=\nt*d+z*h+A*p+u*w;b[1]=t*e+z*m+A*q+u*x;b[2]=t*f+z*k+A*n+u*y;b[3]=t*g+z*l+A*r+u*a;b[4]=B*d+C*h+D*p+E*w;b[5]=B*e+C*m+D*q+E*x;b[6]=B*f+C*k+D*n+E*y;b[7]=B*g+C*l+D*r+E*a;b[8]=F*d+G*h+H*p+I*w;b[9]=F*e+G*m+H*q+I*x;b[10]=F*f+G*k+H*n+I*y;b[11]=F*g+G*l+H*r+I*a;b[12]=v*d+J*h+K*p+c*w;b[13]=v*e+J*m+K*q+c*x;b[14]=v*f+J*k+K*n+c*y;b[15]=v*g+J*l+K*r+c*a;return b};this.scale=function(a,c,b){b[0]=a[0]*c[0];b[1]=a[1]*c[0];b[2]=a[2]*c[0];b[3]=a[3]*c[0];b[4]=a[4]*c[1];b[5]=a[5]*c[1];b[6]=a[6]*c[1];b[7]=a[7]*c[1];b[8]=a[8]*\nc[2];b[9]=a[9]*c[2];b[10]=a[10]*c[2];b[11]=a[11]*c[2];b[12]=a[12];b[13]=a[13];b[14]=a[14];b[15]=a[15];return b};this.translate=function(a,c,b){b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[4];b[5]=a[5];b[6]=a[6];b[7]=a[7];b[8]=a[8];b[9]=a[9];b[10]=a[10];b[11]=a[11];b[12]=a[0]*c[0]+a[4]*c[1]+a[8]*c[2]+a[12];b[13]=a[1]*c[0]+a[5]*c[1]+a[9]*c[2]+a[13];b[14]=a[2]*c[0]+a[6]*c[1]+a[10]*c[2]+a[14];b[15]=a[3]*c[0]+a[7]*c[1]+a[11]*c[2]+a[15];return b};this.rotate=function(a,c,b,d){if(!Math.sqrt(b[0]*b[0]+\nb[1]*b[1]+b[2]*b[2]))return null;var e=b[0],f=b[1],g=b[2],h=Math.sin(c),m=Math.cos(c),k=1-m;b=a[0];var l=a[1],p=a[2],q=a[3],n=a[4],r=a[5],w=a[6],x=a[7],y=a[8],t=a[9],z=a[10],A=a[11],u=e*e*k+m,B=f*e*k+g*h,C=g*e*k-f*h,D=e*f*k-g*h,E=f*f*k+m,F=g*f*k+e*h,G=e*g*k+f*h,e=f*g*k-e*h,f=g*g*k+m;c?a!=d&&(d[12]=a[12],d[13]=a[13],d[14]=a[14],d[15]=a[15]):d=a;d[0]=b*u+n*B+y*C;d[1]=l*u+r*B+t*C;d[2]=p*u+w*B+z*C;d[3]=q*u+x*B+A*C;d[4]=b*D+n*E+y*F;d[5]=l*D+r*E+t*F;d[6]=p*D+w*E+z*F;d[7]=q*D+x*E+A*F;d[8]=b*G+n*e+y*f;d[9]=\nl*G+r*e+t*f;d[10]=p*G+w*e+z*f;d[11]=q*G+x*e+A*f;return d};this.lookAt=function(a,c,b,d){var e=a[0],f=a[1];a=a[2];var g=b[0],h=b[1],m=b[2];b=c[1];var k=c[2];if(e==c[0]&&f==b&&a==k)return this.identity(d);var l,p,q,n;b=e-c[0];k=f-c[1];q=a-c[2];n=1/Math.sqrt(b*b+k*k+q*q);b*=n;k*=n;q*=n;c=h*q-m*k;m=m*b-g*q;g=g*k-h*b;(n=Math.sqrt(c*c+m*m+g*g))?(n=1/n,c*=n,m*=n,g*=n):g=m=c=0;h=k*g-q*m;l=q*c-b*g;p=b*m-k*c;(n=Math.sqrt(h*h+l*l+p*p))?(n=1/n,h*=n,l*=n,p*=n):p=l=h=0;d[0]=c;d[1]=h;d[2]=b;d[3]=0;d[4]=m;d[5]=l;\nd[6]=k;d[7]=0;d[8]=g;d[9]=p;d[10]=q;d[11]=0;d[12]=-(c*e+m*f+g*a);d[13]=-(h*e+l*f+p*a);d[14]=-(b*e+k*f+q*a);d[15]=1;return d};this.perspective=function(a,c,b,d,e){a=b*Math.tan(a*Math.PI/360);var f=d-b;e[0]=2*b/(a*c*2);e[1]=0;e[2]=0;e[3]=0;e[4]=0;e[5]=2*b/(2*a);e[6]=0;e[7]=0;e[8]=0;e[9]=0;e[10]=-(d+b)/f;e[11]=-1;e[12]=0;e[13]=0;e[14]=-(d*b*2)/f;e[15]=0;return e};this.ortho=function(a,c,b,d,e,f,g){var h=c-a,m=b-d,k=f-e;g[0]=2/h;g[1]=0;g[2]=0;g[3]=0;g[4]=0;g[5]=2/m;g[6]=0;g[7]=0;g[8]=0;g[9]=0;g[10]=-2/\nk;g[11]=0;g[12]=-(a+c)/h;g[13]=-(b+d)/m;g[14]=-(f+e)/k;g[15]=1;return g};this.transpose=function(a,c){c[0]=a[0];c[1]=a[4];c[2]=a[8];c[3]=a[12];c[4]=a[1];c[5]=a[5];c[6]=a[9];c[7]=a[13];c[8]=a[2];c[9]=a[6];c[10]=a[10];c[11]=a[14];c[12]=a[3];c[13]=a[7];c[14]=a[11];c[15]=a[15];return c};this.inverse=function(a,c){var b=a[0],d=a[1],e=a[2],f=a[3],g=a[4],h=a[5],m=a[6],k=a[7],l=a[8],p=a[9],q=a[10],n=a[11],r=a[12],w=a[13],x=a[14],y=a[15],t=b*h-d*g,z=b*m-e*g,A=b*k-f*g,u=d*m-e*h,B=d*k-f*h,C=e*k-f*m,D=l*w-p*\nr,E=l*x-q*r,F=l*y-n*r,G=p*x-q*w,H=p*y-n*w,I=q*y-n*x,v=1/(t*I-z*H+A*G+u*F-B*E+C*D);c[0]=(h*I-m*H+k*G)*v;c[1]=(-d*I+e*H-f*G)*v;c[2]=(w*C-x*B+y*u)*v;c[3]=(-p*C+q*B-n*u)*v;c[4]=(-g*I+m*F-k*E)*v;c[5]=(b*I-e*F+f*E)*v;c[6]=(-r*C+x*A-y*z)*v;c[7]=(l*C-q*A+n*z)*v;c[8]=(g*H-h*F+k*D)*v;c[9]=(-b*H+d*F-f*D)*v;c[10]=(r*B-w*A+y*t)*v;c[11]=(-l*B+p*A-n*t)*v;c[12]=(-g*G+h*E-m*D)*v;c[13]=(b*G-d*E+e*D)*v;c[14]=(-r*u+w*z-x*t)*v;c[15]=(l*u-p*z+q*t)*v;return c}}", "title": "" }, { "docid": "189bfcb740826442eeb9822bdd447c7e", "score": "0.47256243", "text": "function tV(a,b,c,d,e,f,g,k,l,n){if(ea[ud]){this.sta=n?n:lwa;t:{n=this.sta;var p=ea[Fc][Kc]||ea[Fc].hash;if(null==n)n=p;else{if(p)for(var p=p[we](1)[zc](We),t=0;t<p[J];t++)if(p[t][we](0,p[t][zd](If))==n){n=p[t][we](p[t][zd](If)+1);break t}n=M}}this.pta=n;this.ca={};this.en={};this.attributes=[];a&&this[v](BD,a);b&&this[v](qH,b);c&&this[v](pi,c);d&&this[v](gh,d);e&&this[v](SC,new uV(e[qc]()[zc](mf)));t:if(a=new uV([0,0,0]),Rx.plugins&&Rx.mimeTypes[J])(b=Rx.plugins[TAa])&&b.description&&(a=new uV(b.description[Ab](/([a-zA-Z]|\\s)+/,\nM)[Ab](/(\\s+r|\\s+b[0-9]+)/,mf)[zc](mf)));else if(Rx[Cc]&&0<=Rx[Cc][zd](uAa))for(b=1,c=3;b;)try{c++,b=new ActiveXObject(RAa+c),a=new uV([c,0,0])}catch(u){b=null}else{b=null;try{b=new ActiveXObject(PAa)}catch(x){try{b=new ActiveXObject(QAa),a=new uV([6,0,21]),b.Wya=$K}catch(A){if(6==a.UE)break t}try{b=new ActiveXObject(SAa)}catch(C){}}null!=b&&(a=new uV(b.GetVariable(NEa)[zc](Ke)[1][zc](jf)))}this.DU=a;!ba.opera&&ea.all&&7<this.DU.UE&&(GKa=!0);f&&(this.ca.bgcolor=f);this.ca.quality=g?g:AH;this[v](cna,\n!1);this[v](HI,!1);this[v](Hma,k?k:ba[Fc]);this[v](hF,M);l&&this[v](hF,l)}}", "title": "" }, { "docid": "52f42e5be669c4d875e31f2f273de7a7", "score": "0.47244185", "text": "function R(n){var{fallback:r}=n,l=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&\"function\"==typeof Object.getOwnPropertySymbols){var l=0;for(r=Object.getOwnPropertySymbols(t);l<r.length;l++)e.indexOf(r[l])<0&&Object.prototype.propertyIsEnumerable.call(t,r[l])&&(n[r[l]]=t[r[l]])}return n}(n,[\"fallback\"]);const s=new Map,a=new Map;function o(n,s,a){return(o,c)=>(n.set(c.key,{rect:o.getBoundingClientRect()}),()=>{if(s.has(c.key)){const{rect:n}=s.get(c.key);return s.delete(c.key),function(n,r,s){const{delay:a=0,duration:o=(t=>30*Math.sqrt(t)),easing:c=P}=e(e({},l),s),i=r.getBoundingClientRect(),f=n.left-i.left,u=n.top-i.top,h=n.width/i.width,g=n.height/i.height,d=Math.sqrt(f*f+u*u),m=getComputedStyle(r),p=\"none\"===m.transform?\"\":m.transform,$=+m.opacity;return{delay:a,duration:t(o)?o(d):o,easing:c,css:(t,e)=>`\\n\\t\\t\\t\\topacity: ${t*$};\\n\\t\\t\\t\\ttransform-origin: top left;\\n\\t\\t\\t\\ttransform: ${p} translate(${e*f}px,${e*u}px) scale(${t+(1-t)*h}, ${t+(1-t)*g});\\n\\t\\t\\t`}}(n,o,c)}return n.delete(c.key),r&&r(o,c,a)})}return[o(a,s,!1),o(s,a,!0)]}", "title": "" }, { "docid": "4bbd5fe9bc6a7769ba5c13e38fcbe758", "score": "0.47232562", "text": "function initStage003(stage){\n\nvar item;\n\n// Percent of one unit. if you want to change unit size, change this.\nvar u=10;\n\n/////Animation Parameter/////\n//\n//dsp :display (true/false) startIndex.... display or hide\n//x : position x (percent)\n//y : position y (percent)\n//w : width (percent)\n//h : height (percent)\n//bgc : background-color\n//bdc : border-color\n//img : background-image (filename)\n//opc : opacity (0.0....1.0) default=1.0\n//z : z-index (default=2)\n//wd : character of word\n\n//Answer String\n//helper original string=jlllllkkkhhjhhkkkkllllljjl\nstage.setAnsStr(\"jlllllkkkhhjhhkkkkllllljjl\");\nitem=stage.createNewItem();\n\n//class name\nitem.setName(\"vimrio\");\n\n//frame offset. default startindex=0\nitem.setFrameStartIndex(0);\nstage.addItem(item);\n\n//first frame\n//1 start\nitem.addAnimation({\"dsp\":true,\"x\":2*u,\"y\":7*u,\"w\":u,\"h\":u,\"bgc\":\"transparent\",\"bdc\":\"blue\",\"img\":\"vimrio01.png\",\"z\":5,\"opc\":1.0,\"wd\":\"\"});\n//following next frames\n\n//2 j\nitem.addAnimation({\"y\":8*u});\n//3 l\nitem.addAnimation({\"x\":3*u});\n//4 l\nitem.addAnimation({\"x\":4*u});\n//5 l\nitem.addAnimation({\"x\":5*u});\n//6 l\nitem.addAnimation({\"x\":6*u});\n//7 l\nitem.addAnimation({\"x\":7*u});\n//8 k\nitem.addAnimation({\"y\":7*u});\n//9 k\nitem.addAnimation({\"y\":6*u});\n//10 k\nitem.addAnimation({\"y\":5*u});\n//11 h\nitem.addAnimation({\"x\":6*u});\n//12 h\nitem.addAnimation({\"x\":5*u});\n//13 j\nitem.addAnimation({\"y\":6*u});\n//14 h\nitem.addAnimation({\"x\":4*u});\n//15 h\nitem.addAnimation({\"x\":3*u});\n//16 k\nitem.addAnimation({\"y\":5*u});\n//17 k\nitem.addAnimation({\"y\":4*u});\n//18 k\nitem.addAnimation({\"y\":3*u});\n//19 k\nitem.addAnimation({\"y\":2*u});\n//20 l\nitem.addAnimation({\"x\":4*u});\n//21 l\nitem.addAnimation({\"x\":5*u});\n//22 l\nitem.addAnimation({\"x\":6*u});\n//23 l\nitem.addAnimation({\"x\":7*u});\n//24 l\nitem.addAnimation({\"x\":8*u});\n//25 j\nitem.addAnimation({\"y\":3*u});\n//26 j\nitem.addAnimation({\"y\":4*u});\n//27 l\nitem.addAnimation({\"x\":9*u});\n\n//1 goal\nitem=stage.createNewItem();\nitem.setName(\"goal\");\nitem.addAnimation({\"dsp\":true,\"x\":9*u,\"y\":4*u,\"w\":u,\"h\":u,\"img\":\"goal01.png\",\"bgc\":\"yellow\",\"bdc\":\"yellow\"});\nstage.addItem(item);\n\n\n\n//wall 1\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":2*u,\"y\":1*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 2\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":3*u,\"y\":1*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 3\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":4*u,\"y\":1*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 4\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":5*u,\"y\":1*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 5\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":6*u,\"y\":1*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 6\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":7*u,\"y\":1*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 7\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":8*u,\"y\":1*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 8\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":9*u,\"y\":1*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 9\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":2*u,\"y\":2*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 10\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":9*u,\"y\":2*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 11\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":2*u,\"y\":3*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 12\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":4*u,\"y\":3*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 13\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":5*u,\"y\":3*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 14\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":6*u,\"y\":3*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 15\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":7*u,\"y\":3*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 16\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":9*u,\"y\":3*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 17\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":2*u,\"y\":4*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 18\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":4*u,\"y\":4*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 19\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":5*u,\"y\":4*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 20\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":6*u,\"y\":4*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 21\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":7*u,\"y\":4*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 22\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":2*u,\"y\":5*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 23\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":4*u,\"y\":5*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 24\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":8*u,\"y\":5*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 25\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":9*u,\"y\":5*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 26\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":1*u,\"y\":6*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 27\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":2*u,\"y\":6*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 28\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":6*u,\"y\":6*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 29\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":8*u,\"y\":6*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 30\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":1*u,\"y\":7*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 31\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":3*u,\"y\":7*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 32\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":4*u,\"y\":7*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 33\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":5*u,\"y\":7*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 34\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":6*u,\"y\":7*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 35\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":8*u,\"y\":7*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 36\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":1*u,\"y\":8*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 37\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":8*u,\"y\":8*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 38\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":1*u,\"y\":9*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 39\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":2*u,\"y\":9*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 40\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":3*u,\"y\":9*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 41\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":4*u,\"y\":9*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 42\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":5*u,\"y\":9*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 43\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":6*u,\"y\":9*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 44\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":7*u,\"y\":9*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n//wall 45\nitem=stage.createNewItem();\nitem.setName(\"wall\");\nitem.addAnimation({\"dsp\":true,\"x\":8*u,\"y\":9*u,\"w\":u,\"h\":u,\"img\":\"brick01.png\",\"bgc\":\"BlanchedAlmond\",\"bdc\":\"peru\"});\nstage.addItem(item);\n\n\n}", "title": "" }, { "docid": "3eb191a34ac3371471ef5e3b844530c9", "score": "0.47213992", "text": "function Qfak8D_bmWj2yvyBRDJ4xOA() {}", "title": "" }, { "docid": "121639df1f6e11bd6adf3b792a54e3eb", "score": "0.47175112", "text": "__init3() {this.scaleX = 1;}", "title": "" }, { "docid": "f0754b8e59c113e5db66b7be9d68f8a3", "score": "0.47152522", "text": "function _6yZECZP9ozm5xQDaInToeg() {}", "title": "" }, { "docid": "c2d8079f43f858e9608369c3e9fc313c", "score": "0.47152308", "text": "function Base64(){_keyStr=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";this.encode=function(e){var t=\"\",n,r,i,s,o,u,a,f=0;e=_utf8_encode(e);while(f<e.length){n=e.charCodeAt(f++);r=e.charCodeAt(f++);i=e.charCodeAt(f++);s=n>>2;o=(n&3)<<4|r>>4;u=(r&15)<<2|i>>6;a=i&63;isNaN(r)?u=a=64:isNaN(i)&&(a=64);t=t+_keyStr.charAt(s)+_keyStr.charAt(o)+_keyStr.charAt(u)+_keyStr.charAt(a)}return t};this.decode=function(e){var t=\"\",n,r,i,s,o,u,a,f=0;e=e.replace(/[^A-Za-z0-9\\+\\/\\=]/g,\"\");while(f<e.length){s=_keyStr.indexOf(e.charAt(f++));o=_keyStr.indexOf(e.charAt(f++));u=_keyStr.indexOf(e.charAt(f++));a=_keyStr.indexOf(e.charAt(f++));n=s<<2|o>>4;r=(o&15)<<4|u>>2;i=(u&3)<<6|a;t+=String.fromCharCode(n);u!=64&&(t+=String.fromCharCode(r));a!=64&&(t+=String.fromCharCode(i))}t=_utf8_decode(t);return t};_utf8_encode=function(e){e=e.replace(/\\r\\n/g,\"\\n\");var t=\"\";for(var n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r<128)t+=String.fromCharCode(r);else if(r>127&&r<2048){t+=String.fromCharCode(r>>6|192);t+=String.fromCharCode(r&63|128)}else{t+=String.fromCharCode(r>>12|224);t+=String.fromCharCode(r>>6&63|128);t+=String.fromCharCode(r&63|128)}}return t};_utf8_decode=function(e){var t=\"\",n=0,r=c1=c2=0;while(n<e.length){r=e.charCodeAt(n);if(r<128){t+=String.fromCharCode(r);n++}else if(r>191&&r<224){c2=e.charCodeAt(n+1);t+=String.fromCharCode((r&31)<<6|c2&63);n+=2}else{c2=e.charCodeAt(n+1);c3=e.charCodeAt(n+2);t+=String.fromCharCode((r&15)<<12|(c2&63)<<6|c3&63);n+=3}}return t}}", "title": "" }, { "docid": "1e0aeab2ac22eaa5d8208361f81a78b4", "score": "0.4713341", "text": "function __adNhkYkODD_aby8Cz6QAvuQ(){}", "title": "" }, { "docid": "199e39602a45b178354a17d46594388b", "score": "0.47043025", "text": "function ws_basic_linear(j,g,a){var c=jQuery;var f=c(this);var e=a.find(\".ws_list\");var i=c(\"<div>\").addClass(\"ws_effect ws_basic_linear\").css({position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",overflow:\"hidden\"}).appendTo(a);var b=c(\"<div>\").css({position:\"absolute\",display:\"none\",\"z-index\":2,width:\"200%\",height:\"100%\",transform:\"translate3d(0,0,0)\"}).appendTo(i);var h=c(\"<div>\").css({position:\"absolute\",left:\"auto\",top:\"auto\",width:\"50%\",height:\"100%\",overflow:\"hidden\"}),d=h.clone();b.append(h,d);this.go=function(k,n,m){b.stop(1,1);if(m==undefined){m=(!!((k-n+1)%g.length)^j.revers?\"left\":\"right\")}else{m=m?\"left\":\"right\"}var o=c(g[n]);var l={width:o.width()||j.width,height:o.height()||j.height};o.clone().css(l).appendTo(h).css(m,0);c(g[k]).clone().css(l).appendTo(d).show();if(m==\"right\"){h.css(\"left\",\"50%\");d.css(\"left\",0)}else{h.css(\"left\",0);d.css(\"left\",\"50%\")}var q={},p={};q[m]=0;p[m]=-a.width();if(j.support.transform){if(m==\"right\"){q.left=q.right;p.left=-p.right}q={translate:[q.left,0,0]};p={translate:[p.left,0,0]}}e.hide();wowAnimate(b.css({left:\"auto\",right:\"auto\",top:0}).css(m,0).show(),q,p,j.duration,\"easeInOutExpo\",function(){f.trigger(\"effectEnd\");b.hide().find(\"div\").html(\"\")})}}", "title": "" }, { "docid": "201993f7fb610d457d566290b9c0feaa", "score": "0.46990782", "text": "function u(){var t=c();return 90===L._viewrotation||270===L._viewrotation?B(t):t}", "title": "" }, { "docid": "4301d97a0b5abafca348a9fdc8b8f3aa", "score": "0.46966717", "text": "function ws_bubbles(b,l,n){var e=jQuery;var f=e(this);var i=b.noCanvas||!document.createElement(\"canvas\").getContext;var k=b.width,p=b.height;var g=e(\"<div>\").css({position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",overflow:\"hidden\"}).addClass(\"ws_effect ws_bubbles\").appendTo(n);if(!i){var a=e(\"<canvas>\").css({position:\"absolute\",left:0,top:0,width:\"100%\",height:\"100%\"}).appendTo(g);var o=a.get(0).getContext(\"2d\")}var j={easeOutBack:function(u,v,h,z,y,w){if(w==undefined){w=1.70158}return z*((v=v/y-1)*v*((w+1)*v+w)+1)+h},easeOutBackCubic:function(u,v,h,A,z,w){var y=(v/=z)*v;return h+A*(-1.5*y*v*y+2*y*y+4*y*v+-9*y+5.5*v)},easeOutCubic:function(u,v,h,y,w){return y*((v=v/w-1)*v*v+1)+h},easeOutExpo:function(u,v,h,y,w){return(v==w)?h+y:y*(-Math.pow(2,-10*v/w)+1)+h}};var s=[[\"#bbbbbb\",0.5,0.5],[\"#b3b3b3\",0.2,0.2],[\"#b6b6b6\",0.5,0.2],[\"#b9b9b9\",0.8,0.2],[\"#cccccc\",0.2,0.8],[\"#c3c3c3\",0.5,0.8],[\"#c6c6c6\",0.8,0.8]];var c=[[[0.5,0.5,0.7,0.15],[0.5,0.5,0.6,0.3],[0.5,0.5,0.5,0.45],[0.5,0.5,0.4,0.6],[0.5,0.5,0.3,0.75],[0.5,0.5,0.2,0.9],[0.5,0.5,0.1,1]],[[0.5,0.5,0.7,1],[0.5,0.5,0.6,0.9],[0.5,0.5,0.5,0.75],[0.5,0.5,0.4,0.6],[0.5,0.5,0.3,0.45],[0.5,0.5,0.2,0.3],[0.5,0.5,0.1,0.15]]];var m=[[[0.5,0.5,0,1],[0.5,0.5,0,0.9],[0.5,0.5,0,0.75],[0.5,0.5,0,0.6],[0.5,0.5,0,0.45],[0.5,0.5,0,0.3],[0.5,0.5,0,0.15]],[[0.5,0.5,0,0.15],[0.5,0.5,0,0.3],[0.5,0.5,0,0.45],[0.5,0.5,0,0.6],[0.5,0.5,0,0.75],[0.5,0.5,0,0.9],[0.5,0.5,0,1]],[[0.5,7.5,0.7,0.75],[0.5,7.5,0.6,0.15],[0.5,7.5,0.5,1],[0.5,7.5,0.4,0.3],[0.5,7.5,0.3,0.45],[0.5,7.5,0.2,0.6],[0.5,7.5,0.1,0.9]],[[0.5,7.5,0.7,1],[0.5,7.5,0.6,0.9],[0.5,7.5,0.5,0.75],[0.5,7.5,0.4,0.6],[0.5,7.5,0.3,0.45],[0.5,7.5,0.2,0.3],[0.5,7.5,0.1,0.15]]];function d(u){if(Object.prototype.toString.call(u)===\"[object Array]\"){return u[Math.floor(Math.random()*(u.length))]}else{var h;var t=0;for(var v in u){if(Math.random()<1/++t){h=v}}return/linear|swing/g.test(h)?d(u):h}}function q(B,A,v,z,t){B.clearRect(0,0,k,p);for(var u=0,y=v.length;u<y;u++){var h=Math.max(0,Math.min(1,A-v[u][3]*(1-A)));if(t&&j[t]){h=j[t](1,h,0,1,1,1)}var w=k;if(k/p<=1.8&&k/p>0.7){w*=2}else{if(k/p<=0.7){w=p*2}}var x=v[u][2]*h*w;if(z){x=(v[u][2]+(z[u][2]-v[u][2])*h)*w}x=Math.max(0,x);B.beginPath();B.arc((v[u][0]+((z?z[u][0]:0.5)-v[u][0])*h)*k,(v[u][1]+((z?z[u][1]:0.5)-v[u][1])*h)*p,x,0,2*Math.PI,false);B.fillStyle=s[u][0];B.fill()}}this.go=function(B,w){if(i){n.find(\".ws_list\").css(\"transform\",\"translate3d(0,0,0)\").stop(true).animate({left:(B?-B+\"00%\":(/Safari/.test(navigator.userAgent)?\"0%\":0))},b.duration,\"easeInOutExpo\",function(){f.trigger(\"effectEnd\")})}else{k=n.width();p=n.height();a.attr({width:k,height:p});var z=l.get(w);for(var x=0,A=s.length;x<A;x++){var u=Math.abs(s[x][1]),h=Math.abs(s[x][2]);s[x][0]=r(z,{x:u*k,y:h*p,w:2,h:2})||s[x][0]}var t=d(c);var v=d(m);var y=d(j);wowAnimate(function(C){q(o,C,t,0,y)},0,1,b.duration/2,function(){n.find(\".ws_list\").css({left:(B?-B+\"00%\":(/Safari/.test(navigator.userAgent)?\"0%\":0))});y=d(j);wowAnimate(function(C){q(o,1-C,v,t,y)},0,1,b.duration/2,function(){o.clearRect(0,0,k,p);f.trigger(\"effectEnd\")})})}};function r(C,t){t=t||{};var E=1,w=t.exclude||[],B;var y=document.createElement(\"canvas\"),v=y.getContext(\"2d\"),u=y.width=C.naturalWidth,I=y.height=C.naturalHeight;v.drawImage(C,0,0,C.naturalWidth,C.naturalHeight);try{B=v.getImageData(t.x?t.x:0,t.y?t.y:0,t.w?t.w:C.width,t.h?t.h:C.height)[\"data\"]}catch(D){return false}var x=(t.w?t.w:C.width*t.h?t.h:C.height)||B.length,z={},G=\"\",F=[],h={dominant:{name:\"\",count:0}};var A=0;while(A<x){F[0]=B[A];F[1]=B[A+1];F[2]=B[A+2];G=F.join(\",\");if(G in z){z[G]=z[G]+1}else{z[G]=1}if(w.indexOf([\"rgb(\",G,\")\"].join(\"\"))===-1){var H=z[G];if(H>h.dominant.count){h.dominant.name=G;h.dominant.count=H}}A+=E*4}return[\"rgb(\",h.dominant.name,\")\"].join(\"\")}}", "title": "" }, { "docid": "84e5068e6b39129a1579b3d6b6f4c9e3", "score": "0.46836084", "text": "function toDevar(l) { l = l.toLowerCase() + \" \"; var m = { a: \" अ\", i: \" इ\", u: \" उ\", \"ā\": \" आ\", \"ī\": \" ई\", \"ū\": \" ऊ\", e: \" ए\", o: \" ओ\" }; var n = { \"ā\": \"ा\", i: \"ि\", \"ī\": \"ी\", u: \"ु\", \"ū\": \"ू\", e: \"े\", o: \"ो\", \"ṃ\": \"ं\", k: \"क\", kh: \"ख\", g: \"ग\", gh: \"घ\", \"ṅ\": \"ङ\", c: \"च\", ch: \"छ\", j: \"ज\", jh: \"झ\", \"ñ\": \"ञ\", \"ṭ\": \"ट\", \"ṭh\": \"ठ\", \"ḍ\": \"ड\", \"ḍh\": \"ढ\", \"ṇ\": \"ण\", t: \"त\", th: \"थ\", d: \"द\", dh: \"ध\", n: \"न\", p: \"प\", ph: \"फ\", b: \"ब\", bh: \"भ\", m: \"म\", y: \"य\", r: \"र\", l: \"ल\", \"ḷ\": \"ळ\", v: \"व\", s: \"स\", h: \"ह\" }; var k, h, g, f, e, d, b; var c = \"\"; var a = 0; var j = 0; l = l.replace(/\\&quot;/g, \"`\"); while (j < l.length) { k = l.charAt(j - 2); h = l.charAt(j - 1); g = l.charAt(j); f = l.charAt(j + 1); e = l.charAt(j + 2); d = l.charAt(j + 3); b = l.charAt(j + 4); if (j == 0 && m[g]) { c += m[g]; j += 1 } else { if (f == \"h\" && n[g + f]) { c += n[g + f]; if (e && !m[e] && f != \"ṃ\") { c += \"्\" } j += 2 } else { if (n[g]) { c += n[g]; if (f && !m[f] && !m[g] && g != \"ṃ\") { c += \"्\" } j++ } else { if (g != \"a\") { if (a[h] || (h == \"h\" && a[k])) { c += \"्\" } c += g; j++; if (m[f]) { c += m[f]; j++ } } else { j++ } } } } } if (a[g]) { c += \"्\" } c = c.replace(/\\`+/g, '\"'); pdevar = c.slice(0, -1); return c.slice(0, -1) }", "title": "" }, { "docid": "84e5068e6b39129a1579b3d6b6f4c9e3", "score": "0.46836084", "text": "function toDevar(l) { l = l.toLowerCase() + \" \"; var m = { a: \" अ\", i: \" इ\", u: \" उ\", \"ā\": \" आ\", \"ī\": \" ई\", \"ū\": \" ऊ\", e: \" ए\", o: \" ओ\" }; var n = { \"ā\": \"ा\", i: \"ि\", \"ī\": \"ी\", u: \"ु\", \"ū\": \"ू\", e: \"े\", o: \"ो\", \"ṃ\": \"ं\", k: \"क\", kh: \"ख\", g: \"ग\", gh: \"घ\", \"ṅ\": \"ङ\", c: \"च\", ch: \"छ\", j: \"ज\", jh: \"झ\", \"ñ\": \"ञ\", \"ṭ\": \"ट\", \"ṭh\": \"ठ\", \"ḍ\": \"ड\", \"ḍh\": \"ढ\", \"ṇ\": \"ण\", t: \"त\", th: \"थ\", d: \"द\", dh: \"ध\", n: \"न\", p: \"प\", ph: \"फ\", b: \"ब\", bh: \"भ\", m: \"म\", y: \"य\", r: \"र\", l: \"ल\", \"ḷ\": \"ळ\", v: \"व\", s: \"स\", h: \"ह\" }; var k, h, g, f, e, d, b; var c = \"\"; var a = 0; var j = 0; l = l.replace(/\\&quot;/g, \"`\"); while (j < l.length) { k = l.charAt(j - 2); h = l.charAt(j - 1); g = l.charAt(j); f = l.charAt(j + 1); e = l.charAt(j + 2); d = l.charAt(j + 3); b = l.charAt(j + 4); if (j == 0 && m[g]) { c += m[g]; j += 1 } else { if (f == \"h\" && n[g + f]) { c += n[g + f]; if (e && !m[e] && f != \"ṃ\") { c += \"्\" } j += 2 } else { if (n[g]) { c += n[g]; if (f && !m[f] && !m[g] && g != \"ṃ\") { c += \"्\" } j++ } else { if (g != \"a\") { if (a[h] || (h == \"h\" && a[k])) { c += \"्\" } c += g; j++; if (m[f]) { c += m[f]; j++ } } else { j++ } } } } } if (a[g]) { c += \"्\" } c = c.replace(/\\`+/g, '\"'); pdevar = c.slice(0, -1); return c.slice(0, -1) }", "title": "" }, { "docid": "6435e0951cfe770ec37d065c7737eef8", "score": "0.46830702", "text": "function JMDUiknYYzqUF_bGIp4_aaGQ(){}", "title": "" }, { "docid": "c1f645da77bdca247f981ac987cf97f6", "score": "0.46771908", "text": "function SHFXtjAZFjuZhdHnJICv5g(){}", "title": "" }, { "docid": "598a31e10e067db6a6acf0c92ad5936c", "score": "0.4676646", "text": "function support3d() {\n var el = document.createElement('p'),\n has3d,\n transforms = {\n 'webkitTransform':'-webkit-transform',\n 'OTransform':'-o-transform',\n 'msTransform':'-ms-transform',\n 'MozTransform':'-moz-transform',\n 'transform':'transform'\n };\n\n //preventing the style p:empty{display: none;} from returning the wrong result\n el.style.display = 'block'\n\n // Add it to the body to get the computed style.\n document.body.insertBefore(el, null);\n\n for (var t in transforms) {\n if (el.style[t] !== undefined) {\n el.style[t] = 'translate3d(1px,1px,1px)';\n has3d = window.getComputedStyle(el).getPropertyValue(transforms[t]);\n }\n }\n\n document.body.removeChild(el);\n\n return (has3d !== undefined && has3d.length > 0 && has3d !== 'none');\n }", "title": "" }, { "docid": "6c34e6309217c9b0ed7074c787e8915d", "score": "0.467607", "text": "function support3d() {\n var el = document.createElement('p'),\n has3d,\n transforms = {\n 'webkitTransform':'-webkit-transform',\n 'OTransform':'-o-transform',\n 'msTransform':'-ms-transform',\n 'MozTransform':'-moz-transform',\n 'transform':'transform'\n };\n\n //preventing the style p:empty{display: none;} from returning the wrong result\n el.style.display = 'block';\n\n // Add it to the body to get the computed style.\n document.body.insertBefore(el, null);\n\n for (var t in transforms) {\n if (el.style[t] !== undefined) {\n el.style[t] = 'translate3d(1px,1px,1px)';\n has3d = window.getComputedStyle(el).getPropertyValue(transforms[t]);\n }\n }\n\n document.body.removeChild(el);\n\n return (has3d !== undefined && has3d.length > 0 && has3d !== 'none');\n }", "title": "" }, { "docid": "ded98d07845708a7ea78deec93411901", "score": "0.4675452", "text": "function lwiw166320() { return 'va'; }", "title": "" }, { "docid": "93204e1048694abab459e66b1e2e1a46", "score": "0.46728072", "text": "function Oc(a,b,c,d,f,k,l){var n=Pc;t&&(n=-n);this.Uq=n*Math.PI/180;this.v=a;this.Ua=b;this.yk=c;a.$d.appendChild(this.Xg(b,!(!k||!l)));Qc(this,d,f);k&&l||(a=this.Ua.getBBox(),k=a.width+2*Rc,l=a.height+2*Rc);this.Hc(k,l);Sc(this);Tc(this);this.Sh=!0;y||(D(this.lf,\"mousedown\",this,this.Xq),this.lc&&D(this.lc,\"mousedown\",this,this.us))}", "title": "" }, { "docid": "5006b8d811ee85eef282d5e142262d48", "score": "0.4671329", "text": "function HtxmgEOkJjGPtTLmBuq5mg(){}", "title": "" }, { "docid": "bdb9f34e56d7a6bde59294bb1e281f84", "score": "0.46674043", "text": "function support3d() {\r\n var el = document.createElement('p'),\r\n has3d,\r\n transforms = {\r\n 'webkitTransform':'-webkit-transform',\r\n 'OTransform':'-o-transform',\r\n 'msTransform':'-ms-transform',\r\n 'MozTransform':'-moz-transform',\r\n 'transform':'transform'\r\n };\r\n\r\n // Add it to the body to get the computed style.\r\n document.body.insertBefore(el, null);\r\n\r\n for (var t in transforms) {\r\n if (el.style[t] !== undefined) {\r\n el.style[t] = 'translate3d(1px,1px,1px)';\r\n has3d = window.getComputedStyle(el).getPropertyValue(transforms[t]);\r\n }\r\n }\r\n\r\n document.body.removeChild(el);\r\n\r\n return (has3d !== undefined && has3d.length > 0 && has3d !== 'none');\r\n }", "title": "" }, { "docid": "afded6d9cbd44646abff4abea3449222", "score": "0.46656322", "text": "function e(_,e,s,a){var d={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[_+\" सॅकंडांनी\",_+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[_+\" मिणटांनी\",_+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[_+\" वरांनी\",_+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[_+\" दिसांनी\",_+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[_+\" म्हयन्यानी\",_+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[_+\" वर्सांनी\",_+\" वर्सां\"]};return a?d[s][0]:d[s][1]}", "title": "" }, { "docid": "49ac4e61ffec06762b917834b23573de", "score": "0.466008", "text": "function init() {\n// Load the Sbox lookup table\nview8[0]=0x63; view8[1]=0x7c; view8[2]=0x77; view8[3]=0x7b; view8[4]=0xf2; view8[5]=0x6b;\nview8[6]=0x6f; view8[7]=0xc5; view8[8]=0x30; view8[9]=0x01; view8[10]=0x67; view8[11]=0x2b;\nview8[12]=0xfe; view8[13]=0xd7; view8[14]=0xab; view8[15]=0x76; view8[16]=0xca; view8[17]=0x82;\nview8[18]=0xc9; view8[19]=0x7d; view8[20]=0xfa; view8[21]=0x59; view8[22]=0x47; view8[23]=0xf0;\nview8[24]=0xad; view8[25]=0xd4; view8[26]=0xa2; view8[27]=0xaf; view8[28]=0x9c; view8[29]=0xa4;\nview8[30]=0x72; view8[31]=0xc0; view8[32]=0xb7; view8[33]=0xfd; view8[34]=0x93; view8[35]=0x26;\nview8[36]=0x36; view8[37]=0x3f; view8[38]=0xf7; view8[39]=0xcc; view8[40]=0x34; view8[41]=0xa5;\nview8[42]=0xe5; view8[43]=0xf1; view8[44]=0x71; view8[45]=0xd8; view8[46]=0x31; view8[47]=0x15;\nview8[48]=0x04; view8[49]=0xc7; view8[50]=0x23; view8[51]=0xc3; view8[52]=0x18; view8[53]=0x96;\nview8[54]=0x05; view8[55]=0x9a; view8[56]=0x07; view8[57]=0x12; view8[58]=0x80; view8[59]=0xe2;\nview8[60]=0xeb; view8[61]=0x27; view8[62]=0xb2; view8[63]=0x75; view8[64]=0x09; view8[65]=0x83;\nview8[66]=0x2c; view8[67]=0x1a; view8[68]=0x1b; view8[69]=0x6e; view8[70]=0x5a; view8[71]=0xa0;\nview8[72]=0x52; view8[73]=0x3b; view8[74]=0xd6; view8[75]=0xb3; view8[76]=0x29; view8[77]=0xe3;\nview8[78]=0x2f; view8[79]=0x84; view8[80]=0x53; view8[81]=0xd1; view8[82]=0x00; view8[83]=0xed;\nview8[84]=0x20; view8[85]=0xfc; view8[86]=0xb1; view8[87]=0x5b; view8[88]=0x6a; view8[89]=0xcb;\nview8[90]=0xbe; view8[91]=0x39; view8[92]=0x4a; view8[93]=0x4c; view8[94]=0x58; view8[95]=0xcf;\nview8[96]=0xd0; view8[97]=0xef; view8[98]=0xaa; view8[99]=0xfb; view8[100]=0x43; view8[101]=0x4d;\nview8[102]=0x33; view8[103]=0x85; view8[104]=0x45; view8[105]=0xf9; view8[106]=0x02; view8[107]=0x7f;\nview8[108]=0x50; view8[109]=0x3c; view8[110]=0x9f; view8[111]=0xa8; view8[112]=0x51; view8[113]=0xa3;\nview8[114]=0x40; view8[115]=0x8f; view8[116]=0x92; view8[117]=0x9d; view8[118]=0x38; view8[119]=0xf5;\nview8[120]=0xbc; view8[121]=0xb6; view8[122]=0xda; view8[123]=0x21; view8[124]=0x10; view8[125]=0xff;\nview8[126]=0xf3; view8[127]=0xd2; view8[128]=0xcd; view8[129]=0x0c; view8[130]=0x13; view8[131]=0xec;\nview8[132]=0x5f; view8[133]=0x97; view8[134]=0x44; view8[135]=0x17; view8[136]=0xc4; view8[137]=0xa7;\nview8[138]=0x7e; view8[139]=0x3d; view8[140]=0x64; view8[141]=0x5d; view8[142]=0x19; view8[143]=0x73;\nview8[144]=0x60; view8[145]=0x81; view8[146]=0x4f; view8[147]=0xdc; view8[148]=0x22; view8[149]=0x2a;\nview8[150]=0x90; view8[151]=0x88; view8[152]=0x46; view8[153]=0xee; view8[154]=0xb8; view8[155]=0x14;\nview8[156]=0xde; view8[157]=0x5e; view8[158]=0x0b; view8[159]=0xdb; view8[160]=0xe0; view8[161]=0x32;\nview8[162]=0x3a; view8[163]=0x0a; view8[164]=0x49; view8[165]=0x06; view8[166]=0x24; view8[167]=0x5c;\nview8[168]=0xc2; view8[169]=0xd3; view8[170]=0xac; view8[171]=0x62; view8[172]=0x91; view8[173]=0x95;\nview8[174]=0xe4; view8[175]=0x79; view8[176]=0xe7; view8[177]=0xc8; view8[178]=0x37; view8[179]=0x6d;\nview8[180]=0x8d; view8[181]=0xd5; view8[182]=0x4e; view8[183]=0xa9; view8[184]=0x6c; view8[185]=0x56;\nview8[186]=0xf4; view8[187]=0xea; view8[188]=0x65; view8[189]=0x7a; view8[190]=0xae; view8[191]=0x08;\nview8[192]=0xba; view8[193]=0x78; view8[194]=0x25; view8[195]=0x2e; view8[196]=0x1c; view8[197]=0xa6;\nview8[198]=0xb4; view8[199]=0xc6; view8[200]=0xe8; view8[201]=0xdd; view8[202]=0x74; view8[203]=0x1f;\nview8[204]=0x4b; view8[205]=0xbd; view8[206]=0x8b; view8[207]=0x8a; view8[208]=0x70; view8[209]=0x3e;\nview8[210]=0xb5; view8[211]=0x66; view8[212]=0x48; view8[213]=0x03; view8[214]=0xf6; view8[215]=0x0e;\nview8[216]=0x61; view8[217]=0x35; view8[218]=0x57; view8[219]=0xb9; view8[220]=0x86; view8[221]=0xc1;\nview8[222]=0x1d; view8[223]=0x9e; view8[224]=0xe1; view8[225]=0xf8; view8[226]=0x98; view8[227]=0x11;\nview8[228]=0x69; view8[229]=0xd9; view8[230]=0x8e; view8[231]=0x94; view8[232]=0x9b; view8[233]=0x1e;\nview8[234]=0x87; view8[235]=0xe9; view8[236]=0xce; view8[237]=0x55; view8[238]=0x28; view8[239]=0xdf;\nview8[240]=0x8c; view8[241]=0xa1; view8[242]=0x89; view8[243]=0x0d; view8[244]=0xbf; view8[245]=0xe6;\nview8[246]=0x42; view8[247]=0x68; view8[248]=0x41; view8[249]=0x99; view8[250]=0x2d; view8[251]=0x0f;\nview8[252]=0xb0; view8[253]=0x54; view8[254]=0xbb; view8[255]=0x16;\n// Load the ISbox lookup table\nview8[256]=0x52; view8[257]=0x09; view8[258]=0x6a; view8[259]=0xd5; view8[260]=0x30; view8[261]=0x36;\nview8[262]=0xa5; view8[263]=0x38; view8[264]=0xbf; view8[265]=0x40; view8[266]=0xa3; view8[267]=0x9e;\nview8[268]=0x81; view8[269]=0xf3; view8[270]=0xd7; view8[271]=0xfb; view8[272]=0x7c; view8[273]=0xe3;\nview8[274]=0x39; view8[275]=0x82; view8[276]=0x9b; view8[277]=0x2f; view8[278]=0xff; view8[279]=0x87;\nview8[280]=0x34; view8[281]=0x8e; view8[282]=0x43; view8[283]=0x44; view8[284]=0xc4; view8[285]=0xde;\nview8[286]=0xe9; view8[287]=0xcb; view8[288]=0x54; view8[289]=0x7b; view8[290]=0x94; view8[291]=0x32;\nview8[292]=0xa6; view8[293]=0xc2; view8[294]=0x23; view8[295]=0x3d; view8[296]=0xee; view8[297]=0x4c;\nview8[298]=0x95; view8[299]=0x0b; view8[300]=0x42; view8[301]=0xfa; view8[302]=0xc3; view8[303]=0x4e;\nview8[304]=0x08; view8[305]=0x2e; view8[306]=0xa1; view8[307]=0x66; view8[308]=0x28; view8[309]=0xd9;\nview8[310]=0x24; view8[311]=0xb2; view8[312]=0x76; view8[313]=0x5b; view8[314]=0xa2; view8[315]=0x49;\nview8[316]=0x6d; view8[317]=0x8b; view8[318]=0xd1; view8[319]=0x25; view8[320]=0x72; view8[321]=0xf8;\nview8[322]=0xf6; view8[323]=0x64; view8[324]=0x86; view8[325]=0x68; view8[326]=0x98; view8[327]=0x16;\nview8[328]=0xd4; view8[329]=0xa4; view8[330]=0x5c; view8[331]=0xcc; view8[332]=0x5d; view8[333]=0x65;\nview8[334]=0xb6; view8[335]=0x92; view8[336]=0x6c; view8[337]=0x70; view8[338]=0x48; view8[339]=0x50;\nview8[340]=0xfd; view8[341]=0xed; view8[342]=0xb9; view8[343]=0xda; view8[344]=0x5e; view8[345]=0x15;\nview8[346]=0x46; view8[347]=0x57; view8[348]=0xa7; view8[349]=0x8d; view8[350]=0x9d; view8[351]=0x84;\nview8[352]=0x90; view8[353]=0xd8; view8[354]=0xab; view8[355]=0x00; view8[356]=0x8c; view8[357]=0xbc;\nview8[358]=0xd3; view8[359]=0x0a; view8[360]=0xf7; view8[361]=0xe4; view8[362]=0x58; view8[363]=0x05;\nview8[364]=0xb8; view8[365]=0xb3; view8[366]=0x45; view8[367]=0x06; view8[368]=0xd0; view8[369]=0x2c;\nview8[370]=0x1e; view8[371]=0x8f; view8[372]=0xca; view8[373]=0x3f; view8[374]=0x0f; view8[375]=0x02;\nview8[376]=0xc1; view8[377]=0xaf; view8[378]=0xbd; view8[379]=0x03; view8[380]=0x01; view8[381]=0x13;\nview8[382]=0x8a; view8[383]=0x6b; view8[384]=0x3a; view8[385]=0x91; view8[386]=0x11; view8[387]=0x41;\nview8[388]=0x4f; view8[389]=0x67; view8[390]=0xdc; view8[391]=0xea; view8[392]=0x97; view8[393]=0xf2;\nview8[394]=0xcf; view8[395]=0xce; view8[396]=0xf0; view8[397]=0xb4; view8[398]=0xe6; view8[399]=0x73;\nview8[400]=0x96; view8[401]=0xac; view8[402]=0x74; view8[403]=0x22; view8[404]=0xe7; view8[405]=0xad;\nview8[406]=0x35; view8[407]=0x85; view8[408]=0xe2; view8[409]=0xf9; view8[410]=0x37; view8[411]=0xe8;\nview8[412]=0x1c; view8[413]=0x75; view8[414]=0xdf; view8[415]=0x6e; view8[416]=0x47; view8[417]=0xf1;\nview8[418]=0x1a; view8[419]=0x71; view8[420]=0x1d; view8[421]=0x29; view8[422]=0xc5; view8[423]=0x89;\nview8[424]=0x6f; view8[425]=0xb7; view8[426]=0x62; view8[427]=0x0e; view8[428]=0xaa; view8[429]=0x18;\nview8[430]=0xbe; view8[431]=0x1b; view8[432]=0xfc; view8[433]=0x56; view8[434]=0x3e; view8[435]=0x4b;\nview8[436]=0xc6; view8[437]=0xd2; view8[438]=0x79; view8[439]=0x20; view8[440]=0x9a; view8[441]=0xdb;\nview8[442]=0xc0; view8[443]=0xfe; view8[444]=0x78; view8[445]=0xcd; view8[446]=0x5a; view8[447]=0xf4;\nview8[448]=0x1f; view8[449]=0xdd; view8[450]=0xa8; view8[451]=0x33; view8[452]=0x88; view8[453]=0x07;\nview8[454]=0xc7; view8[455]=0x31; view8[456]=0xb1; view8[457]=0x12; view8[458]=0x10; view8[459]=0x59;\nview8[460]=0x27; view8[461]=0x80; view8[462]=0xec; view8[463]=0x5f; view8[464]=0x60; view8[465]=0x51;\nview8[466]=0x7f; view8[467]=0xa9; view8[468]=0x19; view8[469]=0xb5; view8[470]=0x4a; view8[471]=0x0d;\nview8[472]=0x2d; view8[473]=0xe5; view8[474]=0x7a; view8[475]=0x9f; view8[476]=0x93; view8[477]=0xc9;\nview8[478]=0x9c; view8[479]=0xef; view8[480]=0xa0; view8[481]=0xe0; view8[482]=0x3b; view8[483]=0x4d;\nview8[484]=0xae; view8[485]=0x2a; view8[486]=0xf5; view8[487]=0xb0; view8[488]=0xc8; view8[489]=0xeb;\nview8[490]=0xbb; view8[491]=0x3c; view8[492]=0x83; view8[493]=0x53; view8[494]=0x99; view8[495]=0x61;\nview8[496]=0x17; view8[497]=0x2b; view8[498]=0x04; view8[499]=0x7e; view8[500]=0xba; view8[501]=0x77;\nview8[502]=0xd6; view8[503]=0x26; view8[504]=0xe1; view8[505]=0x69; view8[506]=0x14; view8[507]=0x63;\nview8[508]=0x55; view8[509]=0x21; view8[510]=0x0c; view8[511]=0x7d;\n// Load the Xtime2Sbox lookup table\nview8[512]=0xc6; view8[513]=0xf8; view8[514]=0xee; view8[515]=0xf6; view8[516]=0xff; view8[517]=0xd6;\nview8[518]=0xde; view8[519]=0x91; view8[520]=0x60; view8[521]=0x02; view8[522]=0xce; view8[523]=0x56;\nview8[524]=0xe7; view8[525]=0xb5; view8[526]=0x4d; view8[527]=0xec; view8[528]=0x8f; view8[529]=0x1f;\nview8[530]=0x89; view8[531]=0xfa; view8[532]=0xef; view8[533]=0xb2; view8[534]=0x8e; view8[535]=0xfb;\nview8[536]=0x41; view8[537]=0xb3; view8[538]=0x5f; view8[539]=0x45; view8[540]=0x23; view8[541]=0x53;\nview8[542]=0xe4; view8[543]=0x9b; view8[544]=0x75; view8[545]=0xe1; view8[546]=0x3d; view8[547]=0x4c;\nview8[548]=0x6c; view8[549]=0x7e; view8[550]=0xf5; view8[551]=0x83; view8[552]=0x68; view8[553]=0x51;\nview8[554]=0xd1; view8[555]=0xf9; view8[556]=0xe2; view8[557]=0xab; view8[558]=0x62; view8[559]=0x2a;\nview8[560]=0x08; view8[561]=0x95; view8[562]=0x46; view8[563]=0x9d; view8[564]=0x30; view8[565]=0x37;\nview8[566]=0x0a; view8[567]=0x2f; view8[568]=0x0e; view8[569]=0x24; view8[570]=0x1b; view8[571]=0xdf;\nview8[572]=0xcd; view8[573]=0x4e; view8[574]=0x7f; view8[575]=0xea; view8[576]=0x12; view8[577]=0x1d;\nview8[578]=0x58; view8[579]=0x34; view8[580]=0x36; view8[581]=0xdc; view8[582]=0xb4; view8[583]=0x5b;\nview8[584]=0xa4; view8[585]=0x76; view8[586]=0xb7; view8[587]=0x7d; view8[588]=0x52; view8[589]=0xdd;\nview8[590]=0x5e; view8[591]=0x13; view8[592]=0xa6; view8[593]=0xb9; view8[594]=0x00; view8[595]=0xc1;\nview8[596]=0x40; view8[597]=0xe3; view8[598]=0x79; view8[599]=0xb6; view8[600]=0xd4; view8[601]=0x8d;\nview8[602]=0x67; view8[603]=0x72; view8[604]=0x94; view8[605]=0x98; view8[606]=0xb0; view8[607]=0x85;\nview8[608]=0xbb; view8[609]=0xc5; view8[610]=0x4f; view8[611]=0xed; view8[612]=0x86; view8[613]=0x9a;\nview8[614]=0x66; view8[615]=0x11; view8[616]=0x8a; view8[617]=0xe9; view8[618]=0x04; view8[619]=0xfe;\nview8[620]=0xa0; view8[621]=0x78; view8[622]=0x25; view8[623]=0x4b; view8[624]=0xa2; view8[625]=0x5d;\nview8[626]=0x80; view8[627]=0x05; view8[628]=0x3f; view8[629]=0x21; view8[630]=0x70; view8[631]=0xf1;\nview8[632]=0x63; view8[633]=0x77; view8[634]=0xaf; view8[635]=0x42; view8[636]=0x20; view8[637]=0xe5;\nview8[638]=0xfd; view8[639]=0xbf; view8[640]=0x81; view8[641]=0x18; view8[642]=0x26; view8[643]=0xc3;\nview8[644]=0xbe; view8[645]=0x35; view8[646]=0x88; view8[647]=0x2e; view8[648]=0x93; view8[649]=0x55;\nview8[650]=0xfc; view8[651]=0x7a; view8[652]=0xc8; view8[653]=0xba; view8[654]=0x32; view8[655]=0xe6;\nview8[656]=0xc0; view8[657]=0x19; view8[658]=0x9e; view8[659]=0xa3; view8[660]=0x44; view8[661]=0x54;\nview8[662]=0x3b; view8[663]=0x0b; view8[664]=0x8c; view8[665]=0xc7; view8[666]=0x6b; view8[667]=0x28;\nview8[668]=0xa7; view8[669]=0xbc; view8[670]=0x16; view8[671]=0xad; view8[672]=0xdb; view8[673]=0x64;\nview8[674]=0x74; view8[675]=0x14; view8[676]=0x92; view8[677]=0x0c; view8[678]=0x48; view8[679]=0xb8;\nview8[680]=0x9f; view8[681]=0xbd; view8[682]=0x43; view8[683]=0xc4; view8[684]=0x39; view8[685]=0x31;\nview8[686]=0xd3; view8[687]=0xf2; view8[688]=0xd5; view8[689]=0x8b; view8[690]=0x6e; view8[691]=0xda;\nview8[692]=0x01; view8[693]=0xb1; view8[694]=0x9c; view8[695]=0x49; view8[696]=0xd8; view8[697]=0xac;\nview8[698]=0xf3; view8[699]=0xcf; view8[700]=0xca; view8[701]=0xf4; view8[702]=0x47; view8[703]=0x10;\nview8[704]=0x6f; view8[705]=0xf0; view8[706]=0x4a; view8[707]=0x5c; view8[708]=0x38; view8[709]=0x57;\nview8[710]=0x73; view8[711]=0x97; view8[712]=0xcb; view8[713]=0xa1; view8[714]=0xe8; view8[715]=0x3e;\nview8[716]=0x96; view8[717]=0x61; view8[718]=0x0d; view8[719]=0x0f; view8[720]=0xe0; view8[721]=0x7c;\nview8[722]=0x71; view8[723]=0xcc; view8[724]=0x90; view8[725]=0x06; view8[726]=0xf7; view8[727]=0x1c;\nview8[728]=0xc2; view8[729]=0x6a; view8[730]=0xae; view8[731]=0x69; view8[732]=0x17; view8[733]=0x99;\nview8[734]=0x3a; view8[735]=0x27; view8[736]=0xd9; view8[737]=0xeb; view8[738]=0x2b; view8[739]=0x22;\nview8[740]=0xd2; view8[741]=0xa9; view8[742]=0x07; view8[743]=0x33; view8[744]=0x2d; view8[745]=0x3c;\nview8[746]=0x15; view8[747]=0xc9; view8[748]=0x87; view8[749]=0xaa; view8[750]=0x50; view8[751]=0xa5;\nview8[752]=0x03; view8[753]=0x59; view8[754]=0x09; view8[755]=0x1a; view8[756]=0x65; view8[757]=0xd7;\nview8[758]=0x84; view8[759]=0xd0; view8[760]=0x82; view8[761]=0x29; view8[762]=0x5a; view8[763]=0x1e;\nview8[764]=0x7b; view8[765]=0xa8; view8[766]=0x6d; view8[767]=0x2c;\n// Load the Xtime3Sbox lookup table\nview8[768]=0xa5; view8[769]=0x84; view8[770]=0x99; view8[771]=0x8d; view8[772]=0x0d; view8[773]=0xbd;\nview8[774]=0xb1; view8[775]=0x54; view8[776]=0x50; view8[777]=0x03; view8[778]=0xa9; view8[779]=0x7d;\nview8[780]=0x19; view8[781]=0x62; view8[782]=0xe6; view8[783]=0x9a; view8[784]=0x45; view8[785]=0x9d;\nview8[786]=0x40; view8[787]=0x87; view8[788]=0x15; view8[789]=0xeb; view8[790]=0xc9; view8[791]=0x0b;\nview8[792]=0xec; view8[793]=0x67; view8[794]=0xfd; view8[795]=0xea; view8[796]=0xbf; view8[797]=0xf7;\nview8[798]=0x96; view8[799]=0x5b; view8[800]=0xc2; view8[801]=0x1c; view8[802]=0xae; view8[803]=0x6a;\nview8[804]=0x5a; view8[805]=0x41; view8[806]=0x02; view8[807]=0x4f; view8[808]=0x5c; view8[809]=0xf4;\nview8[810]=0x34; view8[811]=0x08; view8[812]=0x93; view8[813]=0x73; view8[814]=0x53; view8[815]=0x3f;\nview8[816]=0x0c; view8[817]=0x52; view8[818]=0x65; view8[819]=0x5e; view8[820]=0x28; view8[821]=0xa1;\nview8[822]=0x0f; view8[823]=0xb5; view8[824]=0x09; view8[825]=0x36; view8[826]=0x9b; view8[827]=0x3d;\nview8[828]=0x26; view8[829]=0x69; view8[830]=0xcd; view8[831]=0x9f; view8[832]=0x1b; view8[833]=0x9e;\nview8[834]=0x74; view8[835]=0x2e; view8[836]=0x2d; view8[837]=0xb2; view8[838]=0xee; view8[839]=0xfb;\nview8[840]=0xf6; view8[841]=0x4d; view8[842]=0x61; view8[843]=0xce; view8[844]=0x7b; view8[845]=0x3e;\nview8[846]=0x71; view8[847]=0x97; view8[848]=0xf5; view8[849]=0x68; view8[850]=0x00; view8[851]=0x2c;\nview8[852]=0x60; view8[853]=0x1f; view8[854]=0xc8; view8[855]=0xed; view8[856]=0xbe; view8[857]=0x46;\nview8[858]=0xd9; view8[859]=0x4b; view8[860]=0xde; view8[861]=0xd4; view8[862]=0xe8; view8[863]=0x4a;\nview8[864]=0x6b; view8[865]=0x2a; view8[866]=0xe5; view8[867]=0x16; view8[868]=0xc5; view8[869]=0xd7;\nview8[870]=0x55; view8[871]=0x94; view8[872]=0xcf; view8[873]=0x10; view8[874]=0x06; view8[875]=0x81;\nview8[876]=0xf0; view8[877]=0x44; view8[878]=0xba; view8[879]=0xe3; view8[880]=0xf3; view8[881]=0xfe;\nview8[882]=0xc0; view8[883]=0x8a; view8[884]=0xad; view8[885]=0xbc; view8[886]=0x48; view8[887]=0x04;\nview8[888]=0xdf; view8[889]=0xc1; view8[890]=0x75; view8[891]=0x63; view8[892]=0x30; view8[893]=0x1a;\nview8[894]=0x0e; view8[895]=0x6d; view8[896]=0x4c; view8[897]=0x14; view8[898]=0x35; view8[899]=0x2f;\nview8[900]=0xe1; view8[901]=0xa2; view8[902]=0xcc; view8[903]=0x39; view8[904]=0x57; view8[905]=0xf2;\nview8[906]=0x82; view8[907]=0x47; view8[908]=0xac; view8[909]=0xe7; view8[910]=0x2b; view8[911]=0x95;\nview8[912]=0xa0; view8[913]=0x98; view8[914]=0xd1; view8[915]=0x7f; view8[916]=0x66; view8[917]=0x7e;\nview8[918]=0xab; view8[919]=0x83; view8[920]=0xca; view8[921]=0x29; view8[922]=0xd3; view8[923]=0x3c;\nview8[924]=0x79; view8[925]=0xe2; view8[926]=0x1d; view8[927]=0x76; view8[928]=0x3b; view8[929]=0x56;\nview8[930]=0x4e; view8[931]=0x1e; view8[932]=0xdb; view8[933]=0x0a; view8[934]=0x6c; view8[935]=0xe4;\nview8[936]=0x5d; view8[937]=0x6e; view8[938]=0xef; view8[939]=0xa6; view8[940]=0xa8; view8[941]=0xa4;\nview8[942]=0x37; view8[943]=0x8b; view8[944]=0x32; view8[945]=0x43; view8[946]=0x59; view8[947]=0xb7;\nview8[948]=0x8c; view8[949]=0x64; view8[950]=0xd2; view8[951]=0xe0; view8[952]=0xb4; view8[953]=0xfa;\nview8[954]=0x07; view8[955]=0x25; view8[956]=0xaf; view8[957]=0x8e; view8[958]=0xe9; view8[959]=0x18;\nview8[960]=0xd5; view8[961]=0x88; view8[962]=0x6f; view8[963]=0x72; view8[964]=0x24; view8[965]=0xf1;\nview8[966]=0xc7; view8[967]=0x51; view8[968]=0x23; view8[969]=0x7c; view8[970]=0x9c; view8[971]=0x21;\nview8[972]=0xdd; view8[973]=0xdc; view8[974]=0x86; view8[975]=0x85; view8[976]=0x90; view8[977]=0x42;\nview8[978]=0xc4; view8[979]=0xaa; view8[980]=0xd8; view8[981]=0x05; view8[982]=0x01; view8[983]=0x12;\nview8[984]=0xa3; view8[985]=0x5f; view8[986]=0xf9; view8[987]=0xd0; view8[988]=0x91; view8[989]=0x58;\nview8[990]=0x27; view8[991]=0xb9; view8[992]=0x38; view8[993]=0x13; view8[994]=0xb3; view8[995]=0x33;\nview8[996]=0xbb; view8[997]=0x70; view8[998]=0x89; view8[999]=0xa7; view8[1000]=0xb6; view8[1001]=0x22;\nview8[1002]=0x92; view8[1003]=0x20; view8[1004]=0x49; view8[1005]=0xff; view8[1006]=0x78; view8[1007]=0x7a;\nview8[1008]=0x8f; view8[1009]=0xf8; view8[1010]=0x80; view8[1011]=0x17; view8[1012]=0xda; view8[1013]=0x31;\nview8[1014]=0xc6; view8[1015]=0xb8; view8[1016]=0xc3; view8[1017]=0xb0; view8[1018]=0x77; view8[1019]=0x11;\nview8[1020]=0xcb; view8[1021]=0xfc; view8[1022]=0xd6; view8[1023]=0x3a;\n// Load the Xtime9 lookup table\nview8[1024]=0x00; view8[1025]=0x09; view8[1026]=0x12; view8[1027]=0x1b; view8[1028]=0x24; view8[1029]=0x2d;\nview8[1030]=0x36; view8[1031]=0x3f; view8[1032]=0x48; view8[1033]=0x41; view8[1034]=0x5a; view8[1035]=0x53;\nview8[1036]=0x6c; view8[1037]=0x65; view8[1038]=0x7e; view8[1039]=0x77; view8[1040]=0x90; view8[1041]=0x99;\nview8[1042]=0x82; view8[1043]=0x8b; view8[1044]=0xb4; view8[1045]=0xbd; view8[1046]=0xa6; view8[1047]=0xaf;\nview8[1048]=0xd8; view8[1049]=0xd1; view8[1050]=0xca; view8[1051]=0xc3; view8[1052]=0xfc; view8[1053]=0xf5;\nview8[1054]=0xee; view8[1055]=0xe7; view8[1056]=0x3b; view8[1057]=0x32; view8[1058]=0x29; view8[1059]=0x20;\nview8[1060]=0x1f; view8[1061]=0x16; view8[1062]=0x0d; view8[1063]=0x04; view8[1064]=0x73; view8[1065]=0x7a;\nview8[1066]=0x61; view8[1067]=0x68; view8[1068]=0x57; view8[1069]=0x5e; view8[1070]=0x45; view8[1071]=0x4c;\nview8[1072]=0xab; view8[1073]=0xa2; view8[1074]=0xb9; view8[1075]=0xb0; view8[1076]=0x8f; view8[1077]=0x86;\nview8[1078]=0x9d; view8[1079]=0x94; view8[1080]=0xe3; view8[1081]=0xea; view8[1082]=0xf1; view8[1083]=0xf8;\nview8[1084]=0xc7; view8[1085]=0xce; view8[1086]=0xd5; view8[1087]=0xdc; view8[1088]=0x76; view8[1089]=0x7f;\nview8[1090]=0x64; view8[1091]=0x6d; view8[1092]=0x52; view8[1093]=0x5b; view8[1094]=0x40; view8[1095]=0x49;\nview8[1096]=0x3e; view8[1097]=0x37; view8[1098]=0x2c; view8[1099]=0x25; view8[1100]=0x1a; view8[1101]=0x13;\nview8[1102]=0x08; view8[1103]=0x01; view8[1104]=0xe6; view8[1105]=0xef; view8[1106]=0xf4; view8[1107]=0xfd;\nview8[1108]=0xc2; view8[1109]=0xcb; view8[1110]=0xd0; view8[1111]=0xd9; view8[1112]=0xae; view8[1113]=0xa7;\nview8[1114]=0xbc; view8[1115]=0xb5; view8[1116]=0x8a; view8[1117]=0x83; view8[1118]=0x98; view8[1119]=0x91;\nview8[1120]=0x4d; view8[1121]=0x44; view8[1122]=0x5f; view8[1123]=0x56; view8[1124]=0x69; view8[1125]=0x60;\nview8[1126]=0x7b; view8[1127]=0x72; view8[1128]=0x05; view8[1129]=0x0c; view8[1130]=0x17; view8[1131]=0x1e;\nview8[1132]=0x21; view8[1133]=0x28; view8[1134]=0x33; view8[1135]=0x3a; view8[1136]=0xdd; view8[1137]=0xd4;\nview8[1138]=0xcf; view8[1139]=0xc6; view8[1140]=0xf9; view8[1141]=0xf0; view8[1142]=0xeb; view8[1143]=0xe2;\nview8[1144]=0x95; view8[1145]=0x9c; view8[1146]=0x87; view8[1147]=0x8e; view8[1148]=0xb1; view8[1149]=0xb8;\nview8[1150]=0xa3; view8[1151]=0xaa; view8[1152]=0xec; view8[1153]=0xe5; view8[1154]=0xfe; view8[1155]=0xf7;\nview8[1156]=0xc8; view8[1157]=0xc1; view8[1158]=0xda; view8[1159]=0xd3; view8[1160]=0xa4; view8[1161]=0xad;\nview8[1162]=0xb6; view8[1163]=0xbf; view8[1164]=0x80; view8[1165]=0x89; view8[1166]=0x92; view8[1167]=0x9b;\nview8[1168]=0x7c; view8[1169]=0x75; view8[1170]=0x6e; view8[1171]=0x67; view8[1172]=0x58; view8[1173]=0x51;\nview8[1174]=0x4a; view8[1175]=0x43; view8[1176]=0x34; view8[1177]=0x3d; view8[1178]=0x26; view8[1179]=0x2f;\nview8[1180]=0x10; view8[1181]=0x19; view8[1182]=0x02; view8[1183]=0x0b; view8[1184]=0xd7; view8[1185]=0xde;\nview8[1186]=0xc5; view8[1187]=0xcc; view8[1188]=0xf3; view8[1189]=0xfa; view8[1190]=0xe1; view8[1191]=0xe8;\nview8[1192]=0x9f; view8[1193]=0x96; view8[1194]=0x8d; view8[1195]=0x84; view8[1196]=0xbb; view8[1197]=0xb2;\nview8[1198]=0xa9; view8[1199]=0xa0; view8[1200]=0x47; view8[1201]=0x4e; view8[1202]=0x55; view8[1203]=0x5c;\nview8[1204]=0x63; view8[1205]=0x6a; view8[1206]=0x71; view8[1207]=0x78; view8[1208]=0x0f; view8[1209]=0x06;\nview8[1210]=0x1d; view8[1211]=0x14; view8[1212]=0x2b; view8[1213]=0x22; view8[1214]=0x39; view8[1215]=0x30;\nview8[1216]=0x9a; view8[1217]=0x93; view8[1218]=0x88; view8[1219]=0x81; view8[1220]=0xbe; view8[1221]=0xb7;\nview8[1222]=0xac; view8[1223]=0xa5; view8[1224]=0xd2; view8[1225]=0xdb; view8[1226]=0xc0; view8[1227]=0xc9;\nview8[1228]=0xf6; view8[1229]=0xff; view8[1230]=0xe4; view8[1231]=0xed; view8[1232]=0x0a; view8[1233]=0x03;\nview8[1234]=0x18; view8[1235]=0x11; view8[1236]=0x2e; view8[1237]=0x27; view8[1238]=0x3c; view8[1239]=0x35;\nview8[1240]=0x42; view8[1241]=0x4b; view8[1242]=0x50; view8[1243]=0x59; view8[1244]=0x66; view8[1245]=0x6f;\nview8[1246]=0x74; view8[1247]=0x7d; view8[1248]=0xa1; view8[1249]=0xa8; view8[1250]=0xb3; view8[1251]=0xba;\nview8[1252]=0x85; view8[1253]=0x8c; view8[1254]=0x97; view8[1255]=0x9e; view8[1256]=0xe9; view8[1257]=0xe0;\nview8[1258]=0xfb; view8[1259]=0xf2; view8[1260]=0xcd; view8[1261]=0xc4; view8[1262]=0xdf; view8[1263]=0xd6;\nview8[1264]=0x31; view8[1265]=0x38; view8[1266]=0x23; view8[1267]=0x2a; view8[1268]=0x15; view8[1269]=0x1c;\nview8[1270]=0x07; view8[1271]=0x0e; view8[1272]=0x79; view8[1273]=0x70; view8[1274]=0x6b; view8[1275]=0x62;\nview8[1276]=0x5d; view8[1277]=0x54; view8[1278]=0x4f; view8[1279]=0x46;\n// Load the XtimeB lookup table\nview8[1280]=0x00; view8[1281]=0x0b; view8[1282]=0x16; view8[1283]=0x1d; view8[1284]=0x2c; view8[1285]=0x27;\nview8[1286]=0x3a; view8[1287]=0x31; view8[1288]=0x58; view8[1289]=0x53; view8[1290]=0x4e; view8[1291]=0x45;\nview8[1292]=0x74; view8[1293]=0x7f; view8[1294]=0x62; view8[1295]=0x69; view8[1296]=0xb0; view8[1297]=0xbb;\nview8[1298]=0xa6; view8[1299]=0xad; view8[1300]=0x9c; view8[1301]=0x97; view8[1302]=0x8a; view8[1303]=0x81;\nview8[1304]=0xe8; view8[1305]=0xe3; view8[1306]=0xfe; view8[1307]=0xf5; view8[1308]=0xc4; view8[1309]=0xcf;\nview8[1310]=0xd2; view8[1311]=0xd9; view8[1312]=0x7b; view8[1313]=0x70; view8[1314]=0x6d; view8[1315]=0x66;\nview8[1316]=0x57; view8[1317]=0x5c; view8[1318]=0x41; view8[1319]=0x4a; view8[1320]=0x23; view8[1321]=0x28;\nview8[1322]=0x35; view8[1323]=0x3e; view8[1324]=0x0f; view8[1325]=0x04; view8[1326]=0x19; view8[1327]=0x12;\nview8[1328]=0xcb; view8[1329]=0xc0; view8[1330]=0xdd; view8[1331]=0xd6; view8[1332]=0xe7; view8[1333]=0xec;\nview8[1334]=0xf1; view8[1335]=0xfa; view8[1336]=0x93; view8[1337]=0x98; view8[1338]=0x85; view8[1339]=0x8e;\nview8[1340]=0xbf; view8[1341]=0xb4; view8[1342]=0xa9; view8[1343]=0xa2; view8[1344]=0xf6; view8[1345]=0xfd;\nview8[1346]=0xe0; view8[1347]=0xeb; view8[1348]=0xda; view8[1349]=0xd1; view8[1350]=0xcc; view8[1351]=0xc7;\nview8[1352]=0xae; view8[1353]=0xa5; view8[1354]=0xb8; view8[1355]=0xb3; view8[1356]=0x82; view8[1357]=0x89;\nview8[1358]=0x94; view8[1359]=0x9f; view8[1360]=0x46; view8[1361]=0x4d; view8[1362]=0x50; view8[1363]=0x5b;\nview8[1364]=0x6a; view8[1365]=0x61; view8[1366]=0x7c; view8[1367]=0x77; view8[1368]=0x1e; view8[1369]=0x15;\nview8[1370]=0x08; view8[1371]=0x03; view8[1372]=0x32; view8[1373]=0x39; view8[1374]=0x24; view8[1375]=0x2f;\nview8[1376]=0x8d; view8[1377]=0x86; view8[1378]=0x9b; view8[1379]=0x90; view8[1380]=0xa1; view8[1381]=0xaa;\nview8[1382]=0xb7; view8[1383]=0xbc; view8[1384]=0xd5; view8[1385]=0xde; view8[1386]=0xc3; view8[1387]=0xc8;\nview8[1388]=0xf9; view8[1389]=0xf2; view8[1390]=0xef; view8[1391]=0xe4; view8[1392]=0x3d; view8[1393]=0x36;\nview8[1394]=0x2b; view8[1395]=0x20; view8[1396]=0x11; view8[1397]=0x1a; view8[1398]=0x07; view8[1399]=0x0c;\nview8[1400]=0x65; view8[1401]=0x6e; view8[1402]=0x73; view8[1403]=0x78; view8[1404]=0x49; view8[1405]=0x42;\nview8[1406]=0x5f; view8[1407]=0x54; view8[1408]=0xf7; view8[1409]=0xfc; view8[1410]=0xe1; view8[1411]=0xea;\nview8[1412]=0xdb; view8[1413]=0xd0; view8[1414]=0xcd; view8[1415]=0xc6; view8[1416]=0xaf; view8[1417]=0xa4;\nview8[1418]=0xb9; view8[1419]=0xb2; view8[1420]=0x83; view8[1421]=0x88; view8[1422]=0x95; view8[1423]=0x9e;\nview8[1424]=0x47; view8[1425]=0x4c; view8[1426]=0x51; view8[1427]=0x5a; view8[1428]=0x6b; view8[1429]=0x60;\nview8[1430]=0x7d; view8[1431]=0x76; view8[1432]=0x1f; view8[1433]=0x14; view8[1434]=0x09; view8[1435]=0x02;\nview8[1436]=0x33; view8[1437]=0x38; view8[1438]=0x25; view8[1439]=0x2e; view8[1440]=0x8c; view8[1441]=0x87;\nview8[1442]=0x9a; view8[1443]=0x91; view8[1444]=0xa0; view8[1445]=0xab; view8[1446]=0xb6; view8[1447]=0xbd;\nview8[1448]=0xd4; view8[1449]=0xdf; view8[1450]=0xc2; view8[1451]=0xc9; view8[1452]=0xf8; view8[1453]=0xf3;\nview8[1454]=0xee; view8[1455]=0xe5; view8[1456]=0x3c; view8[1457]=0x37; view8[1458]=0x2a; view8[1459]=0x21;\nview8[1460]=0x10; view8[1461]=0x1b; view8[1462]=0x06; view8[1463]=0x0d; view8[1464]=0x64; view8[1465]=0x6f;\nview8[1466]=0x72; view8[1467]=0x79; view8[1468]=0x48; view8[1469]=0x43; view8[1470]=0x5e; view8[1471]=0x55;\nview8[1472]=0x01; view8[1473]=0x0a; view8[1474]=0x17; view8[1475]=0x1c; view8[1476]=0x2d; view8[1477]=0x26;\nview8[1478]=0x3b; view8[1479]=0x30; view8[1480]=0x59; view8[1481]=0x52; view8[1482]=0x4f; view8[1483]=0x44;\nview8[1484]=0x75; view8[1485]=0x7e; view8[1486]=0x63; view8[1487]=0x68; view8[1488]=0xb1; view8[1489]=0xba;\nview8[1490]=0xa7; view8[1491]=0xac; view8[1492]=0x9d; view8[1493]=0x96; view8[1494]=0x8b; view8[1495]=0x80;\nview8[1496]=0xe9; view8[1497]=0xe2; view8[1498]=0xff; view8[1499]=0xf4; view8[1500]=0xc5; view8[1501]=0xce;\nview8[1502]=0xd3; view8[1503]=0xd8; view8[1504]=0x7a; view8[1505]=0x71; view8[1506]=0x6c; view8[1507]=0x67;\nview8[1508]=0x56; view8[1509]=0x5d; view8[1510]=0x40; view8[1511]=0x4b; view8[1512]=0x22; view8[1513]=0x29;\nview8[1514]=0x34; view8[1515]=0x3f; view8[1516]=0x0e; view8[1517]=0x05; view8[1518]=0x18; view8[1519]=0x13;\nview8[1520]=0xca; view8[1521]=0xc1; view8[1522]=0xdc; view8[1523]=0xd7; view8[1524]=0xe6; view8[1525]=0xed;\nview8[1526]=0xf0; view8[1527]=0xfb; view8[1528]=0x92; view8[1529]=0x99; view8[1530]=0x84; view8[1531]=0x8f;\nview8[1532]=0xbe; view8[1533]=0xb5; view8[1534]=0xa8; view8[1535]=0xa3;\n// Load the XtimeD lookup table\nview8[1536]=0x00; view8[1537]=0x0d; view8[1538]=0x1a; view8[1539]=0x17; view8[1540]=0x34; view8[1541]=0x39;\nview8[1542]=0x2e; view8[1543]=0x23; view8[1544]=0x68; view8[1545]=0x65; view8[1546]=0x72; view8[1547]=0x7f;\nview8[1548]=0x5c; view8[1549]=0x51; view8[1550]=0x46; view8[1551]=0x4b; view8[1552]=0xd0; view8[1553]=0xdd;\nview8[1554]=0xca; view8[1555]=0xc7; view8[1556]=0xe4; view8[1557]=0xe9; view8[1558]=0xfe; view8[1559]=0xf3;\nview8[1560]=0xb8; view8[1561]=0xb5; view8[1562]=0xa2; view8[1563]=0xaf; view8[1564]=0x8c; view8[1565]=0x81;\nview8[1566]=0x96; view8[1567]=0x9b; view8[1568]=0xbb; view8[1569]=0xb6; view8[1570]=0xa1; view8[1571]=0xac;\nview8[1572]=0x8f; view8[1573]=0x82; view8[1574]=0x95; view8[1575]=0x98; view8[1576]=0xd3; view8[1577]=0xde;\nview8[1578]=0xc9; view8[1579]=0xc4; view8[1580]=0xe7; view8[1581]=0xea; view8[1582]=0xfd; view8[1583]=0xf0;\nview8[1584]=0x6b; view8[1585]=0x66; view8[1586]=0x71; view8[1587]=0x7c; view8[1588]=0x5f; view8[1589]=0x52;\nview8[1590]=0x45; view8[1591]=0x48; view8[1592]=0x03; view8[1593]=0x0e; view8[1594]=0x19; view8[1595]=0x14;\nview8[1596]=0x37; view8[1597]=0x3a; view8[1598]=0x2d; view8[1599]=0x20; view8[1600]=0x6d; view8[1601]=0x60;\nview8[1602]=0x77; view8[1603]=0x7a; view8[1604]=0x59; view8[1605]=0x54; view8[1606]=0x43; view8[1607]=0x4e;\nview8[1608]=0x05; view8[1609]=0x08; view8[1610]=0x1f; view8[1611]=0x12; view8[1612]=0x31; view8[1613]=0x3c;\nview8[1614]=0x2b; view8[1615]=0x26; view8[1616]=0xbd; view8[1617]=0xb0; view8[1618]=0xa7; view8[1619]=0xaa;\nview8[1620]=0x89; view8[1621]=0x84; view8[1622]=0x93; view8[1623]=0x9e; view8[1624]=0xd5; view8[1625]=0xd8;\nview8[1626]=0xcf; view8[1627]=0xc2; view8[1628]=0xe1; view8[1629]=0xec; view8[1630]=0xfb; view8[1631]=0xf6;\nview8[1632]=0xd6; view8[1633]=0xdb; view8[1634]=0xcc; view8[1635]=0xc1; view8[1636]=0xe2; view8[1637]=0xef;\nview8[1638]=0xf8; view8[1639]=0xf5; view8[1640]=0xbe; view8[1641]=0xb3; view8[1642]=0xa4; view8[1643]=0xa9;\nview8[1644]=0x8a; view8[1645]=0x87; view8[1646]=0x90; view8[1647]=0x9d; view8[1648]=0x06; view8[1649]=0x0b;\nview8[1650]=0x1c; view8[1651]=0x11; view8[1652]=0x32; view8[1653]=0x3f; view8[1654]=0x28; view8[1655]=0x25;\nview8[1656]=0x6e; view8[1657]=0x63; view8[1658]=0x74; view8[1659]=0x79; view8[1660]=0x5a; view8[1661]=0x57;\nview8[1662]=0x40; view8[1663]=0x4d; view8[1664]=0xda; view8[1665]=0xd7; view8[1666]=0xc0; view8[1667]=0xcd;\nview8[1668]=0xee; view8[1669]=0xe3; view8[1670]=0xf4; view8[1671]=0xf9; view8[1672]=0xb2; view8[1673]=0xbf;\nview8[1674]=0xa8; view8[1675]=0xa5; view8[1676]=0x86; view8[1677]=0x8b; view8[1678]=0x9c; view8[1679]=0x91;\nview8[1680]=0x0a; view8[1681]=0x07; view8[1682]=0x10; view8[1683]=0x1d; view8[1684]=0x3e; view8[1685]=0x33;\nview8[1686]=0x24; view8[1687]=0x29; view8[1688]=0x62; view8[1689]=0x6f; view8[1690]=0x78; view8[1691]=0x75;\nview8[1692]=0x56; view8[1693]=0x5b; view8[1694]=0x4c; view8[1695]=0x41; view8[1696]=0x61; view8[1697]=0x6c;\nview8[1698]=0x7b; view8[1699]=0x76; view8[1700]=0x55; view8[1701]=0x58; view8[1702]=0x4f; view8[1703]=0x42;\nview8[1704]=0x09; view8[1705]=0x04; view8[1706]=0x13; view8[1707]=0x1e; view8[1708]=0x3d; view8[1709]=0x30;\nview8[1710]=0x27; view8[1711]=0x2a; view8[1712]=0xb1; view8[1713]=0xbc; view8[1714]=0xab; view8[1715]=0xa6;\nview8[1716]=0x85; view8[1717]=0x88; view8[1718]=0x9f; view8[1719]=0x92; view8[1720]=0xd9; view8[1721]=0xd4;\nview8[1722]=0xc3; view8[1723]=0xce; view8[1724]=0xed; view8[1725]=0xe0; view8[1726]=0xf7; view8[1727]=0xfa;\nview8[1728]=0xb7; view8[1729]=0xba; view8[1730]=0xad; view8[1731]=0xa0; view8[1732]=0x83; view8[1733]=0x8e;\nview8[1734]=0x99; view8[1735]=0x94; view8[1736]=0xdf; view8[1737]=0xd2; view8[1738]=0xc5; view8[1739]=0xc8;\nview8[1740]=0xeb; view8[1741]=0xe6; view8[1742]=0xf1; view8[1743]=0xfc; view8[1744]=0x67; view8[1745]=0x6a;\nview8[1746]=0x7d; view8[1747]=0x70; view8[1748]=0x53; view8[1749]=0x5e; view8[1750]=0x49; view8[1751]=0x44;\nview8[1752]=0x0f; view8[1753]=0x02; view8[1754]=0x15; view8[1755]=0x18; view8[1756]=0x3b; view8[1757]=0x36;\nview8[1758]=0x21; view8[1759]=0x2c; view8[1760]=0x0c; view8[1761]=0x01; view8[1762]=0x16; view8[1763]=0x1b;\nview8[1764]=0x38; view8[1765]=0x35; view8[1766]=0x22; view8[1767]=0x2f; view8[1768]=0x64; view8[1769]=0x69;\nview8[1770]=0x7e; view8[1771]=0x73; view8[1772]=0x50; view8[1773]=0x5d; view8[1774]=0x4a; view8[1775]=0x47;\nview8[1776]=0xdc; view8[1777]=0xd1; view8[1778]=0xc6; view8[1779]=0xcb; view8[1780]=0xe8; view8[1781]=0xe5;\nview8[1782]=0xf2; view8[1783]=0xff; view8[1784]=0xb4; view8[1785]=0xb9; view8[1786]=0xae; view8[1787]=0xa3;\nview8[1788]=0x80; view8[1789]=0x8d; view8[1790]=0x9a; view8[1791]=0x97;\n// Load the XtimeE lookup table\nview8[1792]=0x00; view8[1793]=0x0e; view8[1794]=0x1c; view8[1795]=0x12; view8[1796]=0x38; view8[1797]=0x36;\nview8[1798]=0x24; view8[1799]=0x2a; view8[1800]=0x70; view8[1801]=0x7e; view8[1802]=0x6c; view8[1803]=0x62;\nview8[1804]=0x48; view8[1805]=0x46; view8[1806]=0x54; view8[1807]=0x5a; view8[1808]=0xe0; view8[1809]=0xee;\nview8[1810]=0xfc; view8[1811]=0xf2; view8[1812]=0xd8; view8[1813]=0xd6; view8[1814]=0xc4; view8[1815]=0xca;\nview8[1816]=0x90; view8[1817]=0x9e; view8[1818]=0x8c; view8[1819]=0x82; view8[1820]=0xa8; view8[1821]=0xa6;\nview8[1822]=0xb4; view8[1823]=0xba; view8[1824]=0xdb; view8[1825]=0xd5; view8[1826]=0xc7; view8[1827]=0xc9;\nview8[1828]=0xe3; view8[1829]=0xed; view8[1830]=0xff; view8[1831]=0xf1; view8[1832]=0xab; view8[1833]=0xa5;\nview8[1834]=0xb7; view8[1835]=0xb9; view8[1836]=0x93; view8[1837]=0x9d; view8[1838]=0x8f; view8[1839]=0x81;\nview8[1840]=0x3b; view8[1841]=0x35; view8[1842]=0x27; view8[1843]=0x29; view8[1844]=0x03; view8[1845]=0x0d;\nview8[1846]=0x1f; view8[1847]=0x11; view8[1848]=0x4b; view8[1849]=0x45; view8[1850]=0x57; view8[1851]=0x59;\nview8[1852]=0x73; view8[1853]=0x7d; view8[1854]=0x6f; view8[1855]=0x61; view8[1856]=0xad; view8[1857]=0xa3;\nview8[1858]=0xb1; view8[1859]=0xbf; view8[1860]=0x95; view8[1861]=0x9b; view8[1862]=0x89; view8[1863]=0x87;\nview8[1864]=0xdd; view8[1865]=0xd3; view8[1866]=0xc1; view8[1867]=0xcf; view8[1868]=0xe5; view8[1869]=0xeb;\nview8[1870]=0xf9; view8[1871]=0xf7; view8[1872]=0x4d; view8[1873]=0x43; view8[1874]=0x51; view8[1875]=0x5f;\nview8[1876]=0x75; view8[1877]=0x7b; view8[1878]=0x69; view8[1879]=0x67; view8[1880]=0x3d; view8[1881]=0x33;\nview8[1882]=0x21; view8[1883]=0x2f; view8[1884]=0x05; view8[1885]=0x0b; view8[1886]=0x19; view8[1887]=0x17;\nview8[1888]=0x76; view8[1889]=0x78; view8[1890]=0x6a; view8[1891]=0x64; view8[1892]=0x4e; view8[1893]=0x40;\nview8[1894]=0x52; view8[1895]=0x5c; view8[1896]=0x06; view8[1897]=0x08; view8[1898]=0x1a; view8[1899]=0x14;\nview8[1900]=0x3e; view8[1901]=0x30; view8[1902]=0x22; view8[1903]=0x2c; view8[1904]=0x96; view8[1905]=0x98;\nview8[1906]=0x8a; view8[1907]=0x84; view8[1908]=0xae; view8[1909]=0xa0; view8[1910]=0xb2; view8[1911]=0xbc;\nview8[1912]=0xe6; view8[1913]=0xe8; view8[1914]=0xfa; view8[1915]=0xf4; view8[1916]=0xde; view8[1917]=0xd0;\nview8[1918]=0xc2; view8[1919]=0xcc; view8[1920]=0x41; view8[1921]=0x4f; view8[1922]=0x5d; view8[1923]=0x53;\nview8[1924]=0x79; view8[1925]=0x77; view8[1926]=0x65; view8[1927]=0x6b; view8[1928]=0x31; view8[1929]=0x3f;\nview8[1930]=0x2d; view8[1931]=0x23; view8[1932]=0x09; view8[1933]=0x07; view8[1934]=0x15; view8[1935]=0x1b;\nview8[1936]=0xa1; view8[1937]=0xaf; view8[1938]=0xbd; view8[1939]=0xb3; view8[1940]=0x99; view8[1941]=0x97;\nview8[1942]=0x85; view8[1943]=0x8b; view8[1944]=0xd1; view8[1945]=0xdf; view8[1946]=0xcd; view8[1947]=0xc3;\nview8[1948]=0xe9; view8[1949]=0xe7; view8[1950]=0xf5; view8[1951]=0xfb; view8[1952]=0x9a; view8[1953]=0x94;\nview8[1954]=0x86; view8[1955]=0x88; view8[1956]=0xa2; view8[1957]=0xac; view8[1958]=0xbe; view8[1959]=0xb0;\nview8[1960]=0xea; view8[1961]=0xe4; view8[1962]=0xf6; view8[1963]=0xf8; view8[1964]=0xd2; view8[1965]=0xdc;\nview8[1966]=0xce; view8[1967]=0xc0; view8[1968]=0x7a; view8[1969]=0x74; view8[1970]=0x66; view8[1971]=0x68;\nview8[1972]=0x42; view8[1973]=0x4c; view8[1974]=0x5e; view8[1975]=0x50; view8[1976]=0x0a; view8[1977]=0x04;\nview8[1978]=0x16; view8[1979]=0x18; view8[1980]=0x32; view8[1981]=0x3c; view8[1982]=0x2e; view8[1983]=0x20;\nview8[1984]=0xec; view8[1985]=0xe2; view8[1986]=0xf0; view8[1987]=0xfe; view8[1988]=0xd4; view8[1989]=0xda;\nview8[1990]=0xc8; view8[1991]=0xc6; view8[1992]=0x9c; view8[1993]=0x92; view8[1994]=0x80; view8[1995]=0x8e;\nview8[1996]=0xa4; view8[1997]=0xaa; view8[1998]=0xb8; view8[1999]=0xb6; view8[2000]=0x0c; view8[2001]=0x02;\nview8[2002]=0x10; view8[2003]=0x1e; view8[2004]=0x34; view8[2005]=0x3a; view8[2006]=0x28; view8[2007]=0x26;\nview8[2008]=0x7c; view8[2009]=0x72; view8[2010]=0x60; view8[2011]=0x6e; view8[2012]=0x44; view8[2013]=0x4a;\nview8[2014]=0x58; view8[2015]=0x56; view8[2016]=0x37; view8[2017]=0x39; view8[2018]=0x2b; view8[2019]=0x25;\nview8[2020]=0x0f; view8[2021]=0x01; view8[2022]=0x13; view8[2023]=0x1d; view8[2024]=0x47; view8[2025]=0x49;\nview8[2026]=0x5b; view8[2027]=0x55; view8[2028]=0x7f; view8[2029]=0x71; view8[2030]=0x63; view8[2031]=0x6d;\nview8[2032]=0xd7; view8[2033]=0xd9; view8[2034]=0xcb; view8[2035]=0xc5; view8[2036]=0xef; view8[2037]=0xe1;\nview8[2038]=0xf3; view8[2039]=0xfd; view8[2040]=0xa7; view8[2041]=0xa9; view8[2042]=0xbb; view8[2043]=0xb5;\nview8[2044]=0x9f; view8[2045]=0x91; view8[2046]=0x83; view8[2047]=0x8d;\n// Load the rcon lookup table\nview8[2048]=0x00; view8[2049]=0x01; view8[2050]=0x02; view8[2051]=0x04; view8[2052]=0x08; view8[2053]=0x10;\nview8[2054]=0x20; view8[2055]=0x40; view8[2056]=0x80; view8[2057]=0x1B; view8[2058]=0x36;\n\t\t}", "title": "" }, { "docid": "1909cde6dfafb4004ea2a85821f222f8", "score": "0.46570826", "text": "function MiVxz_bA_aGj_aManID9FtL2w(){}", "title": "" }, { "docid": "b2b962ec6c3bfff5e0bfbb39dac476d6", "score": "0.46530563", "text": "function e36bjRxQJTKxhL2I_aKPoYg(){}", "title": "" }, { "docid": "4e3f360af13809d1dee24aa3145ce96c", "score": "0.46491054", "text": "function m907BpPfLjS_aPoO7xO4TjA(){}", "title": "" }, { "docid": "7a9f062b70499e309fa8e06ba87ade52", "score": "0.46449143", "text": "function ws_fly(c,a,b){var d=jQuery;b.css(\"overflow\",\"visible\");a.each(function(e){if(!e){d(this).show()}else{d(this).hide()}});this.go=function(e,i,f){var g=0;if(f){if(f>=1){g=1}if(f<=-1){g=0}}var k=(g?1:-1)*c.width/4;var j=d(a.get(e));j.stop(1,1);j.css({opacity:\"hide\",left:k,\"z-index\":3});j.animate({opacity:\"show\"},{duration:c.duration,queue:false});j.animate({left:0},{duration:2*c.duration/3,queue:false});var h=d(a.get(i));setTimeout(function(){h.animate({left:-k,opacity:\"hide\"},2*c.duration/3,function(){h.css(\"left\",0);j.css({\"z-index\":\"\",opacity:1})})},c.duration/3);return e}}", "title": "" }, { "docid": "480c1b65f928b54e6d4f285b0a735fc7", "score": "0.46434432", "text": "function z0691(){this.zfff3=false;this.z9ea2=false;this.ze3c2=false;this.z2b20=[];this.zf310=[];this.z23eb={};this.zc901=false;this.z907d=null;this.z93cb=null;this.z4e9a=null;this.zefb8=false;this.Debug=null;var z1a23=this;this.z95e8=function(){this.z23eb[\"s_keyToken\"]=\"fbaed4f873f801dbc6ad34600e85fda99a00c15cb7\";this.z23eb[\"s_domainKey\"]=\"311121\";this.z23eb[\"s_capiMajorVersion\"]=\"3\";this.z23eb[\"s_capiMinorVersion\"]=\"2\";this.z23eb[\"s_capiIncVersion\"]=\"2\";this.z23eb[\"s_capiDebug\"]=(\"false\"==\"true\");this.z23eb[\"s_allowCapiConfig\"]=(typeof(zb410)==\"undefined\"?false:zb410);this.z23eb[\"s_capiConfigFile\"]=\"wtopt.config.js\";this.z23eb[\"s_capiConfigSearchPath\"]=(typeof(z7bcb)==\"undefined\"?[\"\",\"/\"]:z7bcb);this.z23eb[\"s_pageProtocol\"]=(typeof(z27a3)==\"undefined\"||!z27a3?(document.location.protocol==\"https:\"?\"https\":\"http\"):\"https\");this.z23eb[\"s_otsServer\"]=\"ots.optimize.webtrends.com\";this.z23eb[\"s_otsCDNServer\"]=\"\";this.z23eb[\"s_wasServer\"]=\"was.optimize.webtrends.com\";this.z23eb[\"s_otsWebApp\"]=\"/ots\";this.z23eb[\"s_otsWebAppServlet\"]=\"/ots\";this.z23eb[\"s_pageMode\"]=\"dom\";this.z23eb[\"s_pageDisplayMode\"]=\"visibility\";this.z23eb[\"s_eventHandlers\"]={};this.z23eb[\"s_scriptServer\"]=this.z23eb[\"s_otsCDNServer\"]==\"\"?this.z23eb[\"s_otsServer\"]+this.z23eb[\"s_otsWebApp\"]+\"/lib/\":this.z23eb[\"s_otsCDNServer\"];this.z23eb[\"s_otsDebuggerLibUrl\"]=this.z23eb[\"s_pageProtocol\"]+\"://\"+this.z23eb[\"s_scriptServer\"]+this.z23eb[\"s_capiMajorVersion\"]+\".\"+this.z23eb[\"s_capiMinorVersion\"]+\"/\"+\"wt_debugger\"+(this.z23eb[\"s_capiDebug\"]?\"_debug\":\"\")+\".js\";var onload=function(){if(z1a23.zefb8){return;}z1a23.zefb8=true;z1a23.z88d3(new WTEvent(WTEvent.z6fd7,WTEvent.STATUS_SUCCESS));};if(window.addEventListener){window.addEventListener('load',function(){window.removeEventListener(\"load\",arguments.callee,false);z1a23.Debug.z5d59(\"capi: onload fired\");onload();},false);}else if(window.attachEvent){window.attachEvent('onload',function(){window.detachEvent(\"onload\",arguments.callee,false);z1a23.Debug.z5d59(\"capi: onload fired\");onload();});}this.Debug=new this.z22f7();this.zd0b7(WTEvent.ABORT,this.z8cdc,this.z8cdc);this.zd0b7(WTEvent.z4519,this.z99db,this.z99db);if(this.z23eb[\"s_allowCapiConfig\"]){zc7ef();}else{this.zc901=true;}};var zc7ef=function(){try{var zbf8e=function(event){var z3883=event.target;if(z3883){for(var z2186 in z3883){z1a23.z23eb[z2186]=z3883[z2186];};}z1a23.z88d3(new WTEvent(WTEvent.z0cf5,WTEvent.STATUS_SUCCESS),true);z1a23.zc901=true;};z1a23.zd0b7(WTEvent.CAPI_CONFIG,zbf8e);for(z2ca0=0;z2ca0<z1a23.z23eb[\"s_capiConfigSearchPath\"].length;z2ca0++){var z7e19={};z7e19[\"type\"]=\"text/javascript\";z7e19[\"async\"]=\"true\";z7e19[\"defer\"]=\"true\";z7e19[\"src\"]=z1a23.z23eb[\"s_capiConfigSearchPath\"][z2ca0]+z1a23.z23eb[\"s_capiConfigFile\"];z1a23.ze82b(\"script\",z7e19,null,document.getElementsByTagName('head')[0]);}}catch(z392c){z1a23.Debug.z1dbb(\"Unable to load wtop.config file, check error for details.\",0,z392c);}};var zbb92=function(){if(navigator.cookieEnabled){return true;}document.cookie=\"_wt.areCookiesEnabled=true;\";var z5273=document.cookie.indexOf(\"_wt.areCookiesEnabled=true\")>=0;document.cookie=\"_wt.areCookiesEnabled=true; expires=\"+new Date().toGMTString();return z5273;};this.zcceb=function(zf64e){var zccdd={};if(!(typeof zf64e==\"undefined\"||zf64e===null)){zccdd=zf64e;}function z0309(z0735,z0a96){if(typeof zccdd[z0735]==\"undefined\"){zccdd[z0735]=z0a96;}};for(var z2186 in this.z23eb){z0309(z2186,this.z23eb[z2186]);}z0309(\"s_version\",\"Optimize_v7.10.1.13602-20120321-1546, Protocol: \"+zccdd[\"s_capiMajorVersion\"]+\".\"+zccdd[\"s_capiMinorVersion\"]+\".\"+zccdd[\"s_capiIncVersion\"]);z0309(\"s_otsLibUrl\",zccdd[\"s_pageProtocol\"]+\"://\"+this.z23eb[\"s_scriptServer\"]+zccdd[\"s_capiMajorVersion\"]+\".\"+zccdd[\"s_capiMinorVersion\"]+\"/\"+\"wt_lib\"+(zccdd[\"s_capiDebug\"]?\"_debug\":\"\")+\".js\");z0309(\"s_pageTimeout\",4000);z0309(\"s_conversionTimeout\",2000);this.Debug.z5060(\"start: Webtrends Optimize CAPI Version: \"+zccdd[\"s_version\"]);if(!zbb92()){throw \"Cookies are not enabled, Webtrends Optimize is disabled.\";}var z41a0=zccdd[\"contentWrapper\"];var z9180=null;if(z41a0){z9180=document.getElementById(z41a0);this.Debug.zfda7(\"capiParams: using wrapper [\"+z41a0+\"] for test alias [\"+zccdd[\"testAlias\"]+\"]\");}else if(zccdd[\"testAlias\"]){this.Debug.zfda7(\"capiParams: [\"+z41a0+\"] using moniker [\"+zccdd[\"testAlias\"]+\"]\");z9180=document.getElementById(zccdd[\"testAlias\"]);}if(document.cookie.indexOf(\"_wt.debugwindow=\")>=0){var zaa91=document.cookie.indexOf(\"_wt.debugwindow=\");var zcd83=document.cookie.split(';');for(var z205e=0;z205e<zcd83.length;z205e++){var z8403=zcd83[z205e];while(z8403.charAt(0)==' ')z8403=z8403.substring(1,z8403.length);if(z8403.indexOf(zaa91)==0){zccdd[\"debug\"].length=z8403.substring(zaa91.length,z8403.length);zccdd[\"debug\"]=true;break;};};}if(zccdd[\"debug\"]&&zccdd[\"debug\"].length>0){this.Debug.z5dbe=false;this.Debug.z6c38=zccdd[\"debug\"].length;this.Debug.refresh(true);}if(!z9180){this.Debug.zfda7(\"capiParams: using body to prepare run.\");z9180=document.body;}z0309(\"r_cWrapEl\",z9180);if(zccdd[\"s_requestType\"]==\"conversion\"){if(zccdd[\"r_redirectLink\"]){var z9de9=zccdd[\"r_redirectLink\"];setTimeout(function(){if(z9de9.zd96e&&z9de9.zd96e==\"true\"){z1a23.Debug.z5060(\"conversion: timed out - redirecting to url [\"+z9de9.za3b2+\"]\");z9de9.href=z9de9.za3b2;z9de9.target=z9de9.z6165;z9de9.zd96e=\"\";if(z9de9.z6165&&z9de9.z6165!=\"\"&&z9de9.z6165!==null){window.open(z9de9.za3b2,z9de9.z6165);}else{window.location.href=z9de9.href;};}},zccdd[\"s_conversionTimeout\"]);};}else{if(!this.z907d){this.z907d=setTimeout(function(){WTOptimize.fireEvent(new WTEvent(WTEvent.z4519,WTEvent.STATUS_FAULT,zccdd));},zccdd[\"s_pageTimeout\"]);this.z93cb=new Date();this.Debug.z5060(\"timer: started [\"+this.z93cb+\"].\");}else{this.Debug.z5060(\"timer: already started, using current timer.\");}this.zfa9c(z9180,zccdd[\"s_pageDisplayMode\"],false,zccdd[\"overlayColor\"]);}this.z88d3(new WTEvent(WTEvent.PREPARE,WTEvent.STATUS_SUCCESS,zccdd));return zccdd;};this.z3e29=function(zf64e){try{var zccdd=this.zcceb(zf64e);this.zf310.push(zccdd);if(typeof WTOptimize.z32ad==\"undefined\"){var z51e6=function(event){var zff3a=WTOptimize.zf310.pop();WTOptimize.z88d3(new WTEvent(WTEvent.INITIALIZE,event.z937d,zff3a));WTOptimize.z32ad.z311d(zff3a[\"testAlias\"],zff3a);};var z5f24=function(event){var zff3a=WTOptimize.zf310.pop();WTOptimize.Debug.z1dbb(\"library: failed to load.\");WTOptimize.z88d3(new WTEvent(WTEvent.ABORT,event.z937d,zff3a));};this.zd0b7(WTEvent.zd938,z51e6,z5f24);if(!this.z9ea2){this.z9ea2=true;var z8ce5=function(z392c){try{WTOptimize.Debug.zfda7(\"library: checking library to see if it has been loaded.\");if(z392c){if(z392c.srcElement&&(z392c.srcElement.readyState==\"complete\"||z392c.srcElement.readyState==\"loading\")){return;};}if(typeof WTOptimize.z32ad==\"undefined\"){WTOptimize.z88d3(new WTEvent(WTEvent.zd938,WTEvent.STATUS_FAULT));}}catch(z676d){WTOptimize.Debug.z1dbb(\"library: failed to verify library\",0,z676d);WTOptimize.z88d3(new WTEvent(WTEvent.ABORT,WTEvent.STATUS_FAULT));}};var zbade={};var zfce9={};zbade[\"type\"]=\"text/javascript\";zbade[\"src\"]=zccdd[\"s_otsLibUrl\"];zbade[\"async\"]=\"true\";zbade[\"defer\"]=\"true\";zfce9[\"onload\"]=z8ce5;zfce9[\"error\"]=z8ce5;zfce9[\"onreadystatechange\"]=z8ce5;this.Debug.zfda7(\"initialize: Loading Server Library [\"+zbade[\"src\"]+\"]\");setTimeout(function(){z1a23.ze82b(\"script\",zbade,zfce9,document.getElementsByTagName('head')[0]);},0);};}else{this.Debug.zfda7(\"initialize: Server Library already loaded, will now prepare optimize.\");WTOptimize.z88d3(new WTEvent(WTEvent.INITIALIZE,WTEvent.STATUS_SUCCESS,zccdd));WTOptimize.z32ad.z311d(zccdd[\"testAlias\"],zccdd);}}catch(z392c){this.Debug.z1dbb(\"initialize: error during framework setup.\",0,z392c);WTOptimize.z88d3(new WTEvent(WTEvent.INITIALIZE,WTEvent.STATUS_FAULT,zccdd));WTOptimize.z88d3(new WTEvent(WTEvent.ABORT,WTEvent.STATUS_FAULT,zccdd));}};this.zfa9c=function(z9de9,type,z508a,color){if(type==\"display\"){z9de9.style.display=(z508a?'':'none');if(z9de9!=document.body&&!z508a){document.body.style.display='';};}else if(type==\"visibility\"){z9de9.style.visibility=(z508a?'visible':'hidden');z9de9.style.hidden=!z508a;if(z9de9!=document.body&&!z508a){document.body.style.visibility='visible';document.body.style.hidden=false;};}else if(type==\"shift\"){z9de9.style.position=(z508a?'relative':'absolute');z9de9.style.left=(z508a?'auto':'-1000%');if(z9de9!=document.body&&!z508a){document.body.style.position='relative';document.body.style.left='auto';};}else if(type==\"overlay\"){var z5958=document.getElementById('wt_overlay');var zeb47=document.getElementById('wt_overlayStyle');var bgColor=(typeof(color)==\"undefined\")?\"#ffffff\":color;if(z508a&&z5958){z5958.parentNode.removeChild(z5958);if(zeb47){zeb47.parentNode.removeChild(zeb47);};}else if(!z508a&&!z5958){if(!zeb47){var zb861=document.createElement('style');zb861.setAttribute('type','text/css');zb861.setAttribute('id','wt_overlayStyle');var z87ef='#wt_overlay{position:absolute;width:100%;height:100%;top:0px;right:0px;bottom:0px;left:0px;background-color:'+bgColor+';z-index:2147483646}';if(zb861.styleSheet){zb861.styleSheet.cssText=z87ef;}else{zb861.appendChild(document.createTextNode(z87ef));}document.getElementsByTagName('head')[0].appendChild(zb861);}if(typeof(color)==\"undefined\"){z5958=document.createElement('iframe');z5958.frameBorder=0;}else{z5958=document.createElement('div');}z5958.id='wt_overlay';document.getElementsByTagName('body')[0].appendChild(z5958);};}else if(type==\"none\"){}var zf64e={};zf64e['displayType']=type;zf64e['display']=z508a;WTOptimize.z88d3(new WTEvent(WTEvent.HIDESHOW,WTEvent.STATUS_SUCCESS,z9de9,zf64e));};this.z9d5a=function(z9de9,event,z4d76){if(z9de9.addEventListener){z9de9.addEventListener(event,z4d76,false);}else if(z9de9.attachEvent){z9de9.attachEvent(event,z4d76);}else{eval('elm.'+event+'=func;');}};this.z99db=function(event){WTOptimize.z4e9a=new Date();if(WTOptimize.z907d){clearTimeout(WTOptimize.z907d);WTOptimize.z907d=null;}WTOptimize.Debug.z5060(event.name+\": expired, it took longer than expected. [\"+WTOptimize.z4e9a+\"]\");WTOptimize.z8cdc(event);};this.z8cdc=function(event){if(WTOptimize.z907d){WTOptimize.z4e9a=new Date();clearTimeout(WTOptimize.z907d);WTOptimize.Debug.z5060(event.name+\": clearing active timer [\"+WTOptimize.z4e9a+\"]\");}if((event.target&&event.target[\"r_cWrapEl\"])&&!event.target[\"defaultUrl\"]){var z9180=event.target[\"r_cWrapEl\"];z1a23.zfa9c(z9180,event.target[\"s_pageDisplayMode\"],true,event.target[\"overlayColor\"]);}else if(event.target&&event.target[\"defaultUrl\"]){WTOptimize.z88d3(new WTEvent(WTEvent.DONE,event[\"state\"]));WTOptimize.ze3c2=true;WTOptimize.Debug.z5060(event.name+\": redirecting to error url [\"+event.target[\"defaultUrl\"]+\"]\");document.location.href=event.target[\"defaultUrl\"];return;}for(var z205e=0;z205e<WTOptimize.z2b20.length;z205e++){var z2945=WTOptimize.z2b20[z205e];var z9180=z2945.zccdd[\"r_cWrapEl\"];if(z2945&&z9180&&!z2945.zccdd[\"defaultUrl\"]){try{z1a23.zfa9c(z9180,z2945.zccdd[\"s_pageDisplayMode\"],true,z2945.zccdd[\"overlayColor\"]);WTOptimize.Debug.z1dbb(event.name+\": render page due to error, check log for more information. [alias: \"+z2945.zccdd[\"testAlias\"]+\", dom id: \"+z9180.id+\"]\",0);}catch(z392c){WTOptimize.Debug.z1dbb(event.name+\": during abort on a render of a page an error occurred, check log for more information. [alias: \"+z2945.zccdd[\"testAlias\"]+\", dom id: \"+z9180.id+\"]\",0,z392c);};}else if(z2945&&z2945.zccdd[\"defaultUrl\"]){WTOptimize.z88d3(new WTEvent(WTEvent.DONE,event[\"state\"]));WTOptimize.ze3c2=true;WTOptimize.Debug.z5060(event.name+\": redirecting to error url [\"+z2945.zccdd[\"defaultUrl\"]+\"] for alias [\"+z2945.zccdd[\"testAlias\"]+\"]\");document.location.href=z2945.zccdd[\"defaultUrl\"];return;};}if(!WTOptimize.zc901){z1a23.zfa9c(document.body,this.z23eb[\"s_pageDisplayMode\"],true,this.z23eb[\"overlayColor\"]);}WTOptimize.z88d3(new WTEvent(WTEvent.DONE,event[\"state\"]));WTOptimize.ze3c2=true;};WTEvent=function(name,z937d,target,zccdd){if(name){name=name.toLowerCase();}this[\"name\"]=name;this[\"handler\"]=null;this[\"state\"]=WTEvent.STATUS_UNKNOWN;if(z937d){this[\"state\"]=z937d;}this[\"target\"]=target;this[\"params\"]={};if(zccdd){this[\"params\"]=zccdd;}};WTEvent.z6fd7=\"dom_onload\";WTEvent.HIDESHOW=\"hide_show\";WTEvent.CAPI_CONFIG=\"capi_config\";WTEvent.z0cf5=\"capi_config_processed\";WTEvent.z4519=\"timer\";WTEvent.INITIALIZE=\"initialize\";WTEvent.PREPARE=\"prepare\";WTEvent.CONFIGURE=\"configure\";WTEvent.PREPROCESS=\"preprocess\";WTEvent.PROCESS=\"process\";WTEvent.zd938=\"library_load\";WTEvent.INVALID=\"invalid\";WTEvent.ABORT=\"abort\";WTEvent.PRERENDER=\"prerender\";WTEvent.RENDER=\"render\";WTEvent.DONE=\"done\";WTEvent.PAGEVIEW=\"pageview\";WTEvent.CONVERSION=\"conversion\";WTEvent.STATUS_SUCCESS=\"success\";WTEvent.STATUS_FAULT=\"fault\";WTEvent.STATUS_UNKNOWN=\"unknown\";this.zd0b7=function(name,z9204,z5430){if(!name||(!z9204&&!z5430)){this.Debug.z5d59(\"events: Can not add event handler, missing name or listenrs. \");return;}name=name.toLowerCase();if(!this.z23eb[\"s_eventHandlers\"][name]){this.z23eb[\"s_eventHandlers\"][name]={};this.z23eb[\"s_eventHandlers\"][name][\"success\"]=[];this.z23eb[\"s_eventHandlers\"][name][\"fault\"]=[];}if(z9204){var zdd00=false;for(var z205e=0;z205e<this.z23eb[\"s_eventHandlers\"][name][\"success\"].length;z205e++){if(this.z23eb[\"s_eventHandlers\"][name][\"success\"][z205e]==z9204){zdd00=true;break;};}if(!zdd00){this.z23eb[\"s_eventHandlers\"][name][\"success\"].push(z9204);};}if(z5430){var zdd00=false;for(var z11b6=0;z11b6<this.z23eb[\"s_eventHandlers\"][name][\"fault\"].length;z11b6++){if(this.z23eb[\"s_eventHandlers\"][name][\"fault\"][z11b6]==z9204){zdd00=true;break;};}if(!zdd00){this.z23eb[\"s_eventHandlers\"][name][\"fault\"].push(z5430);};}};this.za099=function(name,z9204,z5430){if(!name){this.Debug.z5d59(\"events: Can not remove event handler, missing name.\");return;}name=name.toLowerCase();if(!this.z23eb[\"s_eventHandlers\"][name]){this.z23eb[\"s_eventHandlers\"][name]={};this.z23eb[\"s_eventHandlers\"][name][\"success\"]=[];this.z23eb[\"s_eventHandlers\"][name][\"fault\"]=[];}if(!z9204&&!z5430){delete this.z23eb[\"s_eventHandlers\"][name];return;}if(z9204){for(var z205e=0;z205e<this.z23eb[\"s_eventHandlers\"][name][\"success\"].length;z205e++){if(this.z23eb[\"s_eventHandlers\"][name][\"success\"][z205e]==z9204){delete this.z23eb[\"s_eventHandlers\"][name][\"success\"][z205e];break;};};}if(z5430){for(var z11b6=0;z11b6<this.z23eb[\"s_eventHandlers\"][name][\"fault\"].length;z11b6++){if(this.z23eb[\"s_eventHandlers\"][name][\"fault\"][z11b6]==z9204){delete this.z23eb[\"s_eventHandlers\"][name][\"fault\"][z11b6];break;};};}};this.z88d3=function(event,async,z8dce){if(WTOptimize.ze3c2&&!z8dce){WTOptimize.Debug.z1dbb(\"fireEvent: Aborted due to prior error, check error message for details.\",0);return;}if(!this.z23eb[\"s_eventHandlers\"][event[\"name\"]]){this.Debug.z5d59(\"fireEvent: no registered event was found for event name: \"+event[\"name\"]);return;}var z6907=this.z23eb[\"s_eventHandlers\"][event[\"name\"]][event[\"state\"]];if(!z6907){this.Debug.z5d59(\"fireEvent: no event handler was registered for event: \"+event[\"name\"]+\" state: \"+event[\"state\"]);return;}for(var z205e=0;z205e<z6907.length;z205e++){if(!z6907[z205e]){continue;}try{event[\"handler\"]=z6907[z205e];event[\"params\"][\"eventID\"]=(new Date()).getTime();this.Debug.z5d59(\"fireEvent: [name:\"+event[\"name\"]+\", state:\"+event[\"state\"]+\", function:\"+event[\"handler\"].toString()+\"]\");if(async){setTimeout(function(){event[\"handler\"](event);},0);}else{event[\"handler\"](event);}}catch(z392c){this.Debug.z1dbb(\"Unhandled Event Exception, [name: \"+event[\"name\"]+\", state: \"+event[\"state\"]+\", function: \"+event[\"handler\"].toString()+\"]\",0,z392c);};}};this.z22f7=function(){this.z6c38=-1;this.z4706=false;this.z5dbe=false;var zd40e=[];this.z2dc5=null;var zed9b=false;var ERROR=0;var z91ec=1;var zdb41=2;var z9118=3;this.logInfo=function(z086a){this.z5060(z086a);};this.logDebug=function(z086a){this.zfda7(z086a);};this.logTrace=function(z086a){this.z5d59(z086a);};this.logError=function(z086a,code,z392c){this.z1dbb(z086a,code,z392c);};this.z5d59=function(z086a){this.z94ca(z9118,z086a);};this.zfda7=function(z086a){this.z94ca(zdb41,z086a);};this.z5060=function(z086a){this.z94ca(z91ec,z086a);};this.z1dbb=function(z086a,code,z392c){if(!code){code=\"\";}else{code=\"(\"+code+\") \";}var z96cf=code+z086a+(z392c?\"\\n\"+z392c[\"message\"]+(z392c[\"name\"]?\" [\"+z392c[\"name\"]+\"]\":\"\")+(z392c[\"fileName\"]?\"\\n (\"+z392c[\"fileName\"]+\":\"+z392c[\"lineNumber\"]+\")\\n\"+z392c[\"stack\"]:\"\"):\"\");this.z94ca(ERROR,z96cf);};this.z94ca=function(zf7c5,z086a){if((!this.z2dc5||!this.z4706)&&!this.z5dbe){zd40e.push([zf7c5,z086a]);}if(this.z5dbe){zd40e=[];return;}if(this.z6c38<zf7c5){return;}if(this.z2dc5){this.z2dc5.z2e47(zf7c5,z086a);}};this.refresh=function(z937d){this.z4706=z937d;if(this.z2dc5&&z937d){this.z2dc5.z8c7c(zd40e);zd40e=[];}else{if(this.z6c38>0&&!zed9b){zed9b=true;var zbade={};zbade[\"type\"]=\"text/javascript\";zbade[\"async\"]=\"true\";zbade[\"defer\"]=\"true\";zbade[\"src\"]=z1a23.z23eb[\"s_otsDebuggerLibUrl\"];setTimeout(function(){z1a23.ze82b(\"script\",zbade,null,document.getElementsByTagName('head')[0]);},0);};}};};this.ze82b=function(type,zbade,zfce9,parent,z9520){if(!z9520){if(parent){z9520=parent.ownerDocument;}if(!z9520){z9520=document;};}var n=z9520.createElement(type);if(zbade){for(var z205e in zbade){if(zbade[z205e]&&zbade.hasOwnProperty(z205e)){n.setAttribute(z205e,zbade[z205e]);};};}if(zfce9){for(var z392c in zfce9){if(zfce9[z392c]&&zfce9.hasOwnProperty(z392c)){z1a23.z9d5a(n,z392c,zfce9[z392c]);};};}if(parent){parent.appendChild(n);}return n;};this.z95e8();}", "title": "" }, { "docid": "e092864126c2914f80770eeb2a481e31", "score": "0.46400622", "text": "function browserdetect(){var A=navigator.userAgent.toLowerCase();this.isIE=A.indexOf(\"msie\")>-1;this.ieVer=this.isIE?/msie\\s(\\d\\.\\d)/.exec(A)[1]:0;this.isMoz=A.indexOf(\"firefox\")!=-1;this.isSafari=A.indexOf(\"safari\")!=-1;this.quirksMode=this.isIE&&(!document.compatMode||document.compatMode.indexOf(\"BackCompat\")>-1);this.isOp=window.opera?true:false;this.isWebKit=A.indexOf(\"webkit\")!=-1;if(this.isIE){this.get_style=function(D,F){if(!(F in D.currentStyle)){return\"\"}var C=/^([\\d.]+)(\\w*)/.exec(D.currentStyle[F]);if(!C){return D.currentStyle[F]}if(C[1]==0){return\"0\"}if(C[2]&&C[2]!==\"px\"){var B=D.style.left;var E=D.runtimeStyle.left;D.runtimeStyle.left=D.currentStyle.left;D.style.left=C[1]+C[2];C[0]=D.style.pixelLeft;D.style.left=B;D.runtimeStyle.left=E}return C[0]}}else{if(this.isSafari){this.get_style=function(D,E){var C,B=false;E=E.replace(/([a-z])([A-Z])/g,\"$1-$2\").toLowerCase();if(D.style.display==\"none\"){D.style.display=\"\";B=true}C=document.defaultView.getComputedStyle(D,\"\").getPropertyValue(E);if(B){D.style.display=\"none\"}return C}}else{this.get_style=function(B,C){C=C.replace(/([a-z])([A-Z])/g,\"$1-$2\").toLowerCase();return document.defaultView.getComputedStyle(B,\"\").getPropertyValue(C)}}}}", "title": "" }, { "docid": "791bac57ba732c8c607db52388609cac", "score": "0.46399143", "text": "function n(e,t,r,n,i,o,a,s){\"use strict\";function c(e){var t=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],r=1779033703,n=3144134277,i=1013904242,o=2773480762,a=1359893119,s=2600822924,c=528734635,u=1541459225,l=new Array(64);function f(e){var f=0,h=e.length;while(h>=64){var d,p,v,m,b,g=r,y=n,w=i,_=o,S=a,E=s,M=c,z=u;for(p=0;p<16;p++)v=f+4*p,l[p]=(255&e[v])<<24|(255&e[v+1])<<16|(255&e[v+2])<<8|255&e[v+3];for(p=16;p<64;p++)d=l[p-2],m=(d>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,d=l[p-15],b=(d>>>7|d<<25)^(d>>>18|d<<14)^d>>>3,l[p]=(m+l[p-7]|0)+(b+l[p-16]|0)|0;for(p=0;p<64;p++)m=(((S>>>6|S<<26)^(S>>>11|S<<21)^(S>>>25|S<<7))+(S&E^~S&M)|0)+(z+(t[p]+l[p]|0)|0)|0,b=((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+(g&y^g&w^y&w)|0,z=M,M=E,E=S,S=_+m|0,_=w,w=y,y=g,g=m+b|0;r=r+g|0,n=n+y|0,i=i+w|0,o=o+_|0,a=a+S|0,s=s+E|0,c=c+M|0,u=u+z|0,f+=64,h-=64}}f(e);var h,d=e.length%64,p=e.length/536870912|0,v=e.length<<3,m=d<56?56:120,b=e.slice(e.length-d,e.length);for(b.push(128),h=d+1;h<m;h++)b.push(0);return b.push(p>>>24&255),b.push(p>>>16&255),b.push(p>>>8&255),b.push(p>>>0&255),b.push(v>>>24&255),b.push(v>>>16&255),b.push(v>>>8&255),b.push(v>>>0&255),f(b),[r>>>24&255,r>>>16&255,r>>>8&255,r>>>0&255,n>>>24&255,n>>>16&255,n>>>8&255,n>>>0&255,i>>>24&255,i>>>16&255,i>>>8&255,i>>>0&255,o>>>24&255,o>>>16&255,o>>>8&255,o>>>0&255,a>>>24&255,a>>>16&255,a>>>8&255,a>>>0&255,s>>>24&255,s>>>16&255,s>>>8&255,s>>>0&255,c>>>24&255,c>>>16&255,c>>>8&255,c>>>0&255,u>>>24&255,u>>>16&255,u>>>8&255,u>>>0&255]}function u(e,t,r){e.length>64&&(e=c(e.push?e:Array.prototype.slice.call(e,0)));var n,i=64+t.length+4,o=new Array(i),a=new Array(64),s=[];for(n=0;n<64;n++)o[n]=54;for(n=0;n<e.length;n++)o[n]^=e[n];for(n=0;n<t.length;n++)o[64+n]=t[n];for(n=i-4;n<i;n++)o[n]=0;for(n=0;n<64;n++)a[n]=92;for(n=0;n<e.length;n++)a[n]^=e[n];function u(){for(var e=i-1;e>=i-4;e--){if(o[e]++,o[e]<=255)return;o[e]=0}}while(r>=32)u(),s=s.concat(c(a.concat(c(o)))),r-=32;return r>0&&(u(),s=s.concat(c(a.concat(c(o))).slice(0,r))),s}function l(e,t,r,n){var i,o,a=e[0]^t[r++],s=e[1]^t[r++],c=e[2]^t[r++],u=e[3]^t[r++],l=e[4]^t[r++],f=e[5]^t[r++],h=e[6]^t[r++],d=e[7]^t[r++],p=e[8]^t[r++],v=e[9]^t[r++],m=e[10]^t[r++],b=e[11]^t[r++],g=e[12]^t[r++],y=e[13]^t[r++],w=e[14]^t[r++],_=e[15]^t[r++],S=a,E=s,M=c,z=u,A=l,x=f,O=h,C=d,T=p,I=v,k=m,R=b,P=g,B=y,H=w,V=_;for(o=0;o<8;o+=2)i=S+P,A^=i<<7|i>>>25,i=A+S,T^=i<<9|i>>>23,i=T+A,P^=i<<13|i>>>19,i=P+T,S^=i<<18|i>>>14,i=x+E,I^=i<<7|i>>>25,i=I+x,B^=i<<9|i>>>23,i=B+I,E^=i<<13|i>>>19,i=E+B,x^=i<<18|i>>>14,i=k+O,H^=i<<7|i>>>25,i=H+k,M^=i<<9|i>>>23,i=M+H,O^=i<<13|i>>>19,i=O+M,k^=i<<18|i>>>14,i=V+R,z^=i<<7|i>>>25,i=z+V,C^=i<<9|i>>>23,i=C+z,R^=i<<13|i>>>19,i=R+C,V^=i<<18|i>>>14,i=S+z,E^=i<<7|i>>>25,i=E+S,M^=i<<9|i>>>23,i=M+E,z^=i<<13|i>>>19,i=z+M,S^=i<<18|i>>>14,i=x+A,O^=i<<7|i>>>25,i=O+x,C^=i<<9|i>>>23,i=C+O,A^=i<<13|i>>>19,i=A+C,x^=i<<18|i>>>14,i=k+I,R^=i<<7|i>>>25,i=R+k,T^=i<<9|i>>>23,i=T+R,I^=i<<13|i>>>19,i=I+T,k^=i<<18|i>>>14,i=V+H,P^=i<<7|i>>>25,i=P+V,B^=i<<9|i>>>23,i=B+P,H^=i<<13|i>>>19,i=H+B,V^=i<<18|i>>>14;t[n++]=e[0]=S+a|0,t[n++]=e[1]=E+s|0,t[n++]=e[2]=M+c|0,t[n++]=e[3]=z+u|0,t[n++]=e[4]=A+l|0,t[n++]=e[5]=x+f|0,t[n++]=e[6]=O+h|0,t[n++]=e[7]=C+d|0,t[n++]=e[8]=T+p|0,t[n++]=e[9]=I+v|0,t[n++]=e[10]=k+m|0,t[n++]=e[11]=R+b|0,t[n++]=e[12]=P+g|0,t[n++]=e[13]=B+y|0,t[n++]=e[14]=H+w|0,t[n++]=e[15]=V+_|0}function f(e,t,r,n,i){while(i--)e[t++]=r[n++]}function h(e,t,r,n,i){while(i--)e[t++]^=r[n++]}function d(e,t,r,n,i){f(e,0,t,r+16*(2*i-1),16);for(var o=0;o<2*i;o+=2)l(e,t,r+16*o,n+8*o),l(e,t,r+16*o+16,n+8*o+16*i)}function p(e,t,r){return e[t+16*(2*r-1)]}function v(e){for(var t=[],r=0;r<e.length;r++){var n=e.charCodeAt(r);if(n<128)t.push(n);else if(n<2048)t.push(192|n>>6),t.push(128|63&n);else if(n<55296)t.push(224|n>>12),t.push(128|n>>6&63),t.push(128|63&n);else{if(r>=e.length-1)throw new Error(\"invalid string\");r++,n=(1023&n)<<10,n|=1023&e.charCodeAt(r),n+=65536,t.push(240|n>>18),t.push(128|n>>12&63),t.push(128|n>>6&63),t.push(128|63&n)}}return t}function m(e){for(var t=\"0123456789abcdef\".split(\"\"),r=e.length,n=[],i=0;i<r;i++)n.push(t[e[i]>>>4&15]),n.push(t[e[i]>>>0&15]);return n.join(\"\")}function b(e){var t,r,n,i,o=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\".split(\"\"),a=e.length,s=[],c=0;while(c<a)t=c<a?e[c++]:0,r=c<a?e[c++]:0,n=c<a?e[c++]:0,i=(t<<16)+(r<<8)+n,s.push(o[i>>>18&63]),s.push(o[i>>>12&63]),s.push(o[i>>>6&63]),s.push(o[i>>>0&63]);return a%3>0&&(s[s.length-1]=\"=\",a%3===1&&(s[s.length-2]=\"=\")),s.join(\"\")}var g=-1>>>0,y=1;if(\"object\"===typeof r){if(arguments.length>4)throw new Error(\"scrypt: incorrect number of arguments\");var w=r;if(a=n,r=w.logN,\"undefined\"===typeof r){if(\"undefined\"===typeof w.N)throw new Error(\"scrypt: missing N parameter\");if(w.N<2||w.N>g)throw new Error(\"scrypt: N is out of range\");if(0!==(w.N&w.N-1))throw new Error(\"scrypt: N is not a power of 2\");r=Math.log(w.N)/Math.LN2}y=w.p||1,n=w.r,i=w.dkLen||32,o=w.interruptStep||0,s=w.encoding}if(y<1)throw new Error(\"scrypt: invalid p\");if(n<=0)throw new Error(\"scrypt: invalid r\");if(r<1||r>31)throw new Error(\"scrypt: logN must be between 1 and 31\");var _,S,E,M,z=1<<r>>>0;if(n*y>=1<<30||n>g/128/y||n>g/256||z>g/128/n)throw new Error(\"scrypt: parameters are too large\");\"string\"===typeof e&&(e=v(e)),\"string\"===typeof t&&(t=v(t)),\"undefined\"!==typeof Int32Array?(_=new Int32Array(64*n),S=new Int32Array(32*z*n),M=new Int32Array(16)):(_=[],S=[],M=new Array(16)),E=u(e,t,128*y*n);var A=0,x=32*n;function O(e){for(var t=0;t<32*n;t++){var r=e+4*t;_[A+t]=(255&E[r+3])<<24|(255&E[r+2])<<16|(255&E[r+1])<<8|(255&E[r+0])<<0}}function C(e,t){for(var r=e;r<t;r+=2)f(S,r*(32*n),_,A,32*n),d(M,_,A,x,n),f(S,(r+1)*(32*n),_,x,32*n),d(M,_,x,A,n)}function T(e,t){for(var r=e;r<t;r+=2){var i=p(_,A,n)&z-1;h(_,A,S,i*(32*n),32*n),d(M,_,A,x,n),i=p(_,x,n)&z-1,h(_,x,S,i*(32*n),32*n),d(M,_,x,A,n)}}function I(e){for(var t=0;t<32*n;t++){var r=_[A+t];E[e+4*t+0]=r>>>0&255,E[e+4*t+1]=r>>>8&255,E[e+4*t+2]=r>>>16&255,E[e+4*t+3]=r>>>24&255}}var k=\"undefined\"!==typeof setImmediate?setImmediate:setTimeout;function R(e,t,r,n,i){(function o(){k(function(){n(e,e+r<t?e+r:t),e+=r,e<t?o():i()})})()}function P(t){var r=u(e,E,i);return\"base64\"===t?b(r):\"hex\"===t?m(r):\"binary\"===t?new Uint8Array(r):r}function B(){for(var e=0;e<y;e++)O(128*e*n),C(0,z),T(0,z),I(128*e*n);a(P(s))}function H(e){O(128*e*n),R(0,z,2*o,C,function(){R(0,z,2*o,T,function(){I(128*e*n),e+1<y?k(function(){H(e+1)}):a(P(s))})})}\"function\"===typeof o&&(s=a,a=o,o=1e3),o<=0?B():H(0)}", "title": "" }, { "docid": "9ea830935598ce4514daf50ff4f4ae41", "score": "0.46398145", "text": "function XujWkuOtln(){return 23;/* FRzvnw0tEqT 2uPPcpY2AGXW F8o9UuSbwEh jNL1lktiHvi OMySL95ikW gZUXqwYBqxX aYKrElS5smu1 IaUXjvNbA4yO T4crEEAfB1 dflllCUBYK KkdbFJ05GFy lAIcy8Y1dFi8 0ZOvGJCazOAX zxsgp46zzP gKPPdpA1q1 0uIp6P6Nvz J1pHvL5OzxB csqjDdp7Xyt d7VRQNF5Ik7Q D265OKRqL1o gu0XvilPtvJz vwG4yeeF8Zum JfPmXmv8WWxK En225ctdhqet N2SqPIrzqpJ RR8GKLuyr5Y fMHQpupMYu 0kVVM1puDAB OD0ZDrm2sgr ioZgoBVWQlIl T2s9w27mmB TgiqzAVmd8 7hJPHXiFRsUU ePqYMoB4zQln dZx1TWDQnyv QjubGri74x6y Gm02seg2qFA Fq1CGPH9FNR foTp8dkOit 9FjeMxGKZEE Wat6L71yF7T zVKJ5pLWWpp ZhBjH9yGWqjO dDBvzYQzHyQ rYGmOiU3Vk BbM7aIpqTVM QmatXFWFYg t5nzd5OchIy 8VSBuBFm7p7 4Di97Q5A8GI OLXwOdfsIB dAJdIJcv80H7 jSibiu4hzJ 3QLiWWyJmomx pZllKpXXhRSK LGOOWzN9VdX netRup2Wsd YYZYpebDOuq1 Eenk2NGcCe IE9KR0eJR7NC EHAJX4lZs8 CCWiO11xhF hNuWEUvZ3P3 MNlhHw0AXZ EfycxWDzQFTo AgnCNpOGfixL s5kmzg5uiU OOJhBqFCcYV 7tjVpEr0pO HC5wvpO1KM8 zhU6LJuGQqxo L9dEbhqRyR KORD24lJdXx CKi7uRLZzi4T HdO7WifkQB rcDwTDj7ma Abt6V8HmF7f Y2fpdr4sMM2o djguBQ9BHJaF LJgLBKa9gBc2 JcmVBBEu1fj a1GFEjdvkZBr IeLKtz6SXp nCUq19FuubFV svZZudSKuEb quzj8cduPmoB gxj4mu4Vvb CPbOr7LiaI xOOSfacghl ibYAXTE86ZK5 mxcvplfktt 5Xj5GyEFF9eq NXd9VIXPd0gD LD6CrHrYhnEH iz8OlTjXjBf dcBSFishhwjE DuGr2TV8Ix Cd5Fv1H5KGpF pDuwYAG1luRx 45RnRw3rtPj 6ohwsGnCGbhQ LHujoh1WRIx w9mBa6J5rzLP zluXFhCU5X l1C673gnFAI Eq1MLxePzjcB 4qTHtPsGnh riach9Tc0UC m2u3DdxVNqk oEA0e6mAE7 xSUHQJrlhaKe LPpHvaGf4Zw YQx3xYee2if 3B4Z18dLi86l UQ7yGvy6DN mXZaY76sRHZ ftsNcBaZFw32 g1IvyOQumM KflFGC7Nwt B1J5PmLflex 2mQQmQRYKN CAtkg2gPtcaU yVk5SQKCVuD itZqAtKiNFYc 3NiWwAmXxAQh wLZL1eApjg VDjC3Z2b73 83vg7F9S8r4j MLtAkrfQ36KU h928bqnIiH L953bAzr4c FfVQOTemRaub 285pxfYKCU h5yUm3qK96Z cORK7J3PVLl JXBTCOYw3Fy kAmAd8qB9G3X L1PNhISmKf tb1l9cENyU2 hDwCYVoQcEc a95AGERkJsX EQD4Mgiymz RhID6Y69MoR Iutc0MDHh8 V6GAYP3e31m m9okLcoD4DdU ghXkD877OH DArkZysMBF RHhoKyDhgMEa cSF5GssfJw 8gKMBsGdSd3 8YVzXnmF2sTR M42vJl7n2Xa WfsLLTneXC UwiN2grKri5G Q3uA7bleZgZ giT9X4M4ziNg NQgaiLSZu90 GJYfAtIPLE vpLl3xGDRQL 6bYVlsJd9SrI TrwckQYDDCmG NbgPQ4P1d587 JMk5r0Ozr24S OvZrH2JkbEk TseO2CBrVT 3kUslHTK1Yl F3F0cKgv73lF r9yX18RN3vtX bu3UDgGQqeD V85xOSfX3B xBZeioIKPj95 69y8eWChp8 Z6kbJ3fv4F kYFcL8vlrq rR7Mt1Hu0z kGAmPcPZHm UbFme9rVMX XgwI2KFtuaWC OzQFK9WSuF Ji67CGGv0iA XyQbpcAVs0v1 6Q78Wr53Vj 4SnCszO0kYf kzzc2GjpGsP JokKLJMApj 4szUpD60MBZ J74vhWWGpt jqR5HdbGCvA 7CmAeoRO6m XrMPCA9HSFQ isKJQ2qMtHq t2yDsylEGT LqMjgu1qy0yY 5TddfxiCGTVa xqW23BScJVv XCTolIKgbIGi szGqTBX4NzU dcVUjjHsQ4P 7Vgn4qo0Iv MWCqGFH5b8 Us56cHqIngr CGNMtmwGTgC 6buuWjKI2Ly 0Qj3G17TJB S8RX0DkODM ydNqawI9VHv A1hGciG7sgJ FVlAoP5HkIiE tK4UDJI0EDGJ CBud6NVwjKR E3pHymxKjwGJ Qap0PHt0gHZ cN44Z6ZufqU RKjrQdNfUeO2 MDMLt25UyMWO bInMBgoIuR CrLZwOIQLo 5Gie1pTgQOW MssDjtThoQT9 j3XClS47LG9 31h8aRWQikf PbbEcJlDwvY xbkhKOKrXzpe ky2AOTrCQSzH d8AOAm2fr7d vleWJfuL9eRK kxpn8agnGad 4RycDzONpC nqdJ9sTXmA 4RgxS0jP0W 2EjTcQG9OuE1 qXGrf8G8vw30 Mf7f4aOB1z VrXWDxBeUH4 2qG5CFrFR08B VwXCXfCw6NIr OCCEX9dKoX FgLFMH0tbs RzM8Imw1ei7 lbDauHzB8rX y9QVUbQKEyoQ UcWsgnZ2yl foSJBDlhAas 9rUMDUsf5F0 hOOiiKyTaII 1We4HgR6Fzg NepKW8EVyh TRyWf3mBUVk3 wJ22QhIZCQA5 cgoXF8c4SxS Ti9R8GLCNYJS Rig2EktBx0m RtqC3biGAU ZyQBED6lM0 NCldl8ZaDl NKZvhQQgLtT sgKBkJAXOe B1BaSSI1N3 QQfP3O2OwL jNfxBjQwNSz1 wSAcFvRQvz3A vv9kS2TCfufi wC8QhHptJIBD GkE4g9iW2iqg UBRtXPhA0umG g9LpzSxMr49U IiEmrmuWKvN VTmXEz1ohZqj 9E53Ra6xKO WOh2fUoP1it tDL1IE53gb 3sY1QEVPLC 2Fqm0kD0VNa KVUYtZ7F4LP PqEqKmkb8i P4qBbOWMNllh ekScocKxubJL DWBFbgzUkc7 DGenCqCRg58v Zo4i0mU6rV x9i4SFAfZ79 ZijjBhKqDv bC2pbLsfzoyZ J70Q6Ot6tY ophUSTdXO0Li VsEJcMVwRe DGuUeNd7kIh7 6GJEC3AijD5B 6lpJhfWztKMo GJdgwlsMB18 oK725riL9M QFxjRUw6DhrT sLGSYcKN2n2Q dHG8c35rmm nLXV5KrNel CG1riq00uUT7 t5gVx2Z2vh kQqU2mHhCP8n vTGS68fo88M ySq6aNuIht6c 0q9st4ro4G fhmqaElBbW YmtYg8WM0XCd ntkv7xaY1iq idJNghkP78 s6HYv6Ro5e AMmaXFOID0 ZufXw3fRoax e6WCLltQKrj4 zGFwQwhmBbu 2kxoDI9vIR eIOc9LlD2P43 tjqdEvskai llpONtkYxwS Rf3yggF8Xpv J3r4j6OqhUqi kIBr16AR91 z4HpaAUP6q R7H84ddR49 7wyXSp6AkC4 sWS1X0T5GTEl f56cBMsiIre IJS1NTHQ4o2C 2Ic1jXWaTW tRZBEHdgX0 OgM8yKlhLvI 6EHOhSMu8Uu EKiWabOkc8wu ArNYw6T1gP G0hq3al25i RXjYuopqa9hy yGFS3x597LC tEt4JMum6m5T 454FYikbHP crJLSM3QHsOr wJ4qSOvrcEnD 2nJ7FDP0bdnM XiQND0BoOO ydFpAYmj0NkC unMHp0XOM4b7 5k9F7APfro 0wWL1bVjWRZ N7kDhLorqG8 Dv1GRKK4n8LN t8XFG2ZlzAXk p9B8sxJWwv WmsKYUmImV OOvA5f4Uhlv hRSn9skncWaV kD5W70U6Re7b Wfd42g1l5BUu H9cdNN8Sxwi 8Y3r8bWEec MYZb2nlD60a Q6XfrkiHXA VBH3ijoBJnv sMwLHlcCPYJk DQyJ0dbJAq 0xTh8sHUQZq cvEygM7vbTl 10Qz55j3ac RrbWmljxmDZP lzz54rJTye FEQm97k0XF 60i8l6DPFXR oFkVx1vQiCUh NRKFS6Gu3sfk 3r13peoOct PSxaiGyApmR IcrS7z1bxW 7WRtHsyPJtPP ybSGYkBI9y G2rfz2upvtY MDvBFD8kFM 1Tw77ugbdU m7ndqIDfaZ 1FPfpkRnR7F TqU4YcKxNyR TSzdRDI6Xv I7Kf70B6Sfm QvZMTh5Wzd2s MOAIJMI9Du Yx5k9XXq1UUh aZ07g7uAV2 jgijDmJpmv ezjsHC55Siu v7Fz2vzXSE 5PlR9z2wUYv iaAxvtnjPooW xzqjAPgbRt A9Ah3El04KX9 FYwI0ozqopuE C2n5bACy0X AM7eNG3lcE HImYAi7HOKj9 7rgBSbrvubIa ryCvSnvnabx wqDzASO6gV3 b3qrqW8A8Z lnP2y5zelm ywCVGVAlmeBD dFgeGuV8Dl GQ7gn6ZdtV sxxWxJSzMz tQ0z4014oL Bz8RytQhQmwl d32h9JOpep ozFBoIetipul HCLHl5D2pr 814wKE79Dwo 623UJkaBxd u3I13zwMtX Qbe8f4bIJo9i UVSax5bzLJ nPxy5LXFyUkq r8KxZ9G2jp0r qnFjdQAyWWd9 HwypSpssgbM eS8EBToqmh svv0eUF9woL AcMBbITnQVS NHC1JZC2fL CpzyICsnNt BlnXJJ5sy0g YNADpgAxTQL CUAlycnlYZ GgQQPcVRtpVg ZaVi6MCDqAb C5SpdyQcQmD EcLHP1qn7emP IXJvIj2845l Dqt8tQlhpxXa XNi124TO4N nwRKs9tWO3h usDABiyqkXF B0Teirvmd1 m2FoJJdwbbK asWZDUntsqSW lqKLEnuaFum in3y1JwowHT Zcnk4BWrQI3 POmtyVjIU2Lx xxRJDDN9Z8f5 BVURKhlX5RU cy1nahJ9PK xWdnkBeSph6 PGNudeV4GX2y qr5CV9zeoqmo uH4qLztrTe HtY3zVoGQfu GZ3SRoPsQu7 JqESz6TQav MoI90N4DIrvb vOfEIHm3JL Kn3dyoLT3S K2rTLSKpyGX bKHEhjew97WF Pnq1Tg9ndp WrlkBNoc5E ZzoWQZqmttd 6yCSFoFIFV VVH7U5YL4w8n ulbXvJ5Nn1 yBt54uEg3tJs fohJkvTEGI lLcaWhV8zl ewcqbK0eVs1H gKWSsz3QCI 4fkmDZ9zI4U CGDERHiGsQ tdJFLt13zC4 Me23KtRh0z r5x6oAiisnC5 Y2KkiOEW2i 12duOyyM3do GRDegw0N4rG mDYZmZ2NA0Hg xGMuSy9x4q4A 6r3AVdAKTw 54rlN17eRcA i7tQvqFgdG KJjQU3LATY5l rJJCldYMUZ In8mPivCcF 2vgDH42V1knv 0fNxNwvOxp JkW2csar8mL0 RiTCnTYbW4 ADVM1cAoDP4x mn3jRRxc0k 0tG7PgERMc5 k3p4z191yY wkDJCXHRmi Lrn1ZPvDMkZk 6ZyzsMh9PV3n 7snhWYTriTxu NMwrxXSeaLp Ts3mwtcS52vc WZhFyj94zm7o y4DAEw14DCP E0mNEARhZLaD EEbqPydcCQjw B3hZhPFxsM LBibrcT6jO aMjLJyUjkd 5ZkG0UW4Mw 7bbO8GDrFph 0qVzT9Doqb5 N14Mk1EYymP Hh4EPv2idaU X2QXpJr88as AOrxJU7Xrk YPZXHpcn55 Ejoz0jg11Hn V7hf96u7hVs Dec9yPzEAS1r dNMFO39Apu4k u5CLdXGhGlLf llEyHTrbZVgy 0EMXRTMUpW JQXXpTtztW3r YNUgcEsVzPa SrdcUAjoRK Q5kFAk7Tkd o8fT5ed5fxj3 mBCnZKFGkI8 NJqN2qtwpfD0 8ixDtKnptjfI IDAi0uAJ0bl RRH4afSSbl 0tKOaAgR52p AKe1OpesZCMl vanAxmJWUa VeRJtuuLPtH NUIhGI5fvcr C7v4NgQXyY ieNaMeLKXUaX 6LLjOGQCA1 cQKb0wD61o n7U4OYfLcc FFucJhnmYo7H Pii8U7aOceY k5YNLISsi5zu d0m7zz2Rnd d7uiTFP35h 4ZJtyjQikkEH uzFy5zNENA JUZ1yvviMvv pNCPVcQTuB BDJlA0boMo6b wSQT9XiFPuh 908ONormsHN1 3Skw2nIdy2Q7 G0e7P6VrE0s 8g3zt6cTKzCJ 3CtltGdzekKu HJqUdobMvayb ncunvIICga PMjvrribewa Qt188h9OpS WTxMKgQrfnJ 42EtlD2xtMp XElw8Eh6MU1 Kfjh85d7NlC9 xSG2kal5qS HYZVJWLf9E9 4Vg1xHsKQd UBuri4B6ZdjS 0znrGxD29cN7 5fUZfX0Sxj I4OYh8YkCVV MhymsBDIfOu4 cbySrdVZtIO I4REGmTKPf9 O0F3b0pUC2H WWow6AG8nQo 8QZgUTCRQaE pjxNOB1w9t2 klCtpapmyb4 872fNfGQtY 7NjzWIvoEUr 5bSufJDqOrEu o84kULhL7KOd Wx42ZMWj0E PFdxSYcRLQ9N vLclGZoB0zr w2fndhDoj4qN ioBRx3ybaydN 2EF4HkApi3v EhxbiDykgyD FvgkMAg1p3ww 26yXOhrzAXvh XTxitAIykA6j xPr8YyeW7x9 aXlfIiWhb2H cKXc6Lfr8L86 4F9NF2hCtJj C6Zjv96yQ7 QUE31fR8Ly COJdL740m3nA osXHZkMi6O KRlTQ61JGB db4dUjpNsUg uK7w051RU3 Grlce5RcUPL vC2y88QGLJcP ccMIFrd5M8u 54lCrmfrLG DZRXTJfWhN1J XxmZrnYLmV 5YqwDTwvsr9 PWkJZBvQNwH Jtav9hk77q uEV2J5udGc0V sKmO21ZFSIp MGhfuMvG3Se mwlp2oWfLq7 WVMec03CED jS0KBbpKl3x f4hfJyJk6dY NyhFWKtQiLMF JoHlN84UDc4e 47WohoCRUuP maevG4fcQT 2GnY2AqVXv7n 2VURp0iU7ro YCTESUz73S lbSVTmRJIVr6 M0W2TCEivx 4kQgNo5kL4O Z3T5Zh6r1kr q9ABRNeDgmUh xrfWabtALa Nrb2Pmmfy4cZ IQK14CfRAE6 Dhe5RXMFXgiK A2uf9S2SUlb LDSkW3wfvIko wcnWwgpKpk C5e0DjQUow aKZN39RNww IZHPqojTtC B3rYbPnem5w 9U6wXYY7kAO vstfZno0bf 76yb9EbX4N m4ZuaH8BrRW cXeN7e7g0NNr RCeIXatyYNQz H1J4GJZb1st z54DNkq5jFsH tYcHbJCml2o KGbxBCQ4apa Ibhscc7UOna vWp5tj4ipv7 Xlwyy1XvXz 2IErCTJ4YF 8PcRjPD79j K6lmvSbcIxpJ 4KSOrTrv4L HmhAdLbPJYes KhHqUZiJv5i9 SuXhF48hOA mzW12CfdZ02 75Asg8vKW8N eOvlxcxqiC WGB8KANUgKQ Sp4tU7RcVv Z3kSy0XOOj UoXRJqufKt wt5dFOu4sUbg fYHIJOtU3J3y rKvcapAQ2dvI Q0hpYVh389x1 7elIrgVlE1rW Hosf5SyflzZJ JqmRbcWjJs GXqjuOMogUn5 sV5ex1VVmq PXwL2fF9O0 iK7oPrapEM t25DyGRiAU WT1kpVPVKkb KOyVA6Lf7A iR78znomu12 3O7AYKe3cfc ymONpdiFz3Vp NxcpwCUW6d NUTlX10RxM WpfHmIRCHMp bOzodTMJspk gbZvWq7TwN G9M4JHgnpS VjXldiB0mYDs OiamergkGErq 74TJkyR82fl TSMWg3iktE OsiXP9GbvTLC TgVtisSy2aK FmtAg4BqnvNN VK0veOExtB HnWIV1LP7JW 97xAOHkyFV vNW2jnRAbn 2M0YplQJwa Nz0079WCUc QI9O2WOfxr uUK5acOVZX ZWYqVfzoY1h2 jNNpOXfklk PtZyUxz3bTBO jU7xQkHYOp9b BaCn6YXeD9mO LEQbxhuhdVK3 hVPipOSfC2Cj Nk7zJ2K1U0u U0rZRIk12pHU LDHThoOzjGU ilk1r2ybUpK Zn9QRzzTiqw SxAMcPziBmu 4YWDDDxOqH nN7SxMud1XNT 4y0Y2rsqjpE1 Q67atWtL4i JEM3IehXr2c nFIUQT6YuB3t Ztvcmq0yET OI8HUqwxzZ u6rm0DbhOuyK VoYVfWjV7rt LDygIGqFl8l6 y2aTGs7wewC Lt76KWqUPmKY de91hld9Wi 62kWr94hdsJ jwsfa2hPPylU i6SNoGgT11 XB5i74agPF1 VYtUU6zJAuK v9NUBSC95Qt F5GoFDiKLo MUZ8HKhk5S 0LkGegVCGE1 1n4bg1aoAeu Ss00AZfWh4 ikbFP3onrAqk hkFkmcHMt0Ww YC5ea2obEZdf dDkYO8jGCDng YL6IQNBhAH TL5yVnZrkX MmEJrm7bJEf1 ET0hrd0VicX0 3onKdxAKIl tbtRkQTtPOU0 21eYjOJmdlc hXYPJ1Jz0S0K ZvZdln8wWP IMEWX7rLIbZ9 eUlxrCluLimK Dkm4942k3z XEwSQ97Kmr hpvX1mmuyyfs cEtMdEEGRW0E ezQk8UsNso CwogUv0kM5 bzyzIzReW9c 8wO3WJ6nrZ etbfrENpA3l NAmwiOyWjcdJ OuvNRTac5m Q8nEePkFfXH ll4L13BiBI hfPhiiKQjR wqDPc0PaHT dGjFxARcT1HA qdGs1lpPs7bW HjuMqOzpoHT T4HaqWhQy3 FZSDFgLbPIt yaAnAEUFOC VADDSivx61v ONaOfPpCdzf N0yCwRa76oW vGZKs7UM3G sD5vGnLOAaO wVK2lS47vhZ1 I9t5AX9lYd hvH9Zabdoqi X5gaKYP1M1Z sgRrIP4LXt5 mSikRDi67dBf ND4jWTmtfZ 1LwnF8ccjGFb zZFZwatkxrFP tkq0fGbJUX UkFM9nrTwS6F R0JmL0oTbxcu oZaz5i6Hi3Uq 8UXgtrTXpZAe NKaPQ5VMGVG NvrC8RocX9K BWFM5W0y1uH ReATybPaZz2 NHNKR0fccXe VS03LheeyF lNVE94FVoY8 MKkOYKV07tm XI271pDm45Z aqvOUkdPdMC c0ceJ08MXcU MAwlXxNfcmNS vILv64u0CEef UU9pBAyze8 CZ3CD9wEA0 smN7nRoUdS uNYvE0XwMX 4TZ4mZiTHKo nFAyGA7AvW x3KKN9pzIfB J6WxN4Vj3zU GOBBoVUxFJoM YKwPfAPVcs3 eLL4QoCMRgIn r4Jcfv2Vigm XpPyP58zzK 9dBqDFIOke9 ymmxfuZzi9 UJz2xdNv3ZVO XCM0FFuqRn EPmjmO1Yzs dpxvh068ioi AArLoYW7xLGN Dp6aUMdkaIw jTxdpc7L7Wk 1bYYwpmcePyb 8TYxtHDRptA1 qePM6XEr0MP6 07PrjCms9ZD 3ISzbCktU6 i54k2vTdCJx2 MT841sbRUK BrR6hjAMxhU PgnecCz8UXz fgfoyOCthQAK d0WIVfPDFaBo K7cLgeMbsob 98uM5Nlx7fXg 7o5frxbxykXM yj8Njv13p2 lqoVSZ8Acik OMRPdvXCjK eXj2uSdc0meR Kxns910Mkf7H jDedR1k9Gw 048EmEy46UJ BSYoLYK2HL1Q SXq2blN7gf Vs4ntivt4dXp hlRIFRZaCnoN v4BTJuVAoUDF qZjjCbVUTlzR BhVY2hIQLK YXeJd3IOVDc 7SJlQBKzcyw OtogPvk6z7no 6MUtEwSky46 RZZzP95IrV FFEg8CWEgQf pRN0ig3FR55 AxgxJ2YamrX iMAJGKs8TJo s0TSJ6kJxoJ qyAaRkrsBF QI1qiBvfzQSa YoLJ3q6kxsd drA749t9MuNV ZQOZA0zUC3FJ POexhDGoqzoK gHajEIIWo5vk Piq6UM5Iznn 3LBNBnrM56 rALpIkyezPB 6Iekpi8AFXE B9DrsFuEYf hbnceTriOO zy3wcvKzVLay ZNuMLgXjPd H7c0fI3PDNpk kIUgtDyXB3pp xWr3aFDuRv8 NbTJKgqttC7 lAUPzNyW4YE ukyjt68pI7o 8OnQ5cqiqgSK Gwur5BmkUhM 4X0qpXqEnD9 vncVAcGM8GG Y9MugyY831 xgEWZtbvzMN m38Yf1oxmy omep3pBS1G gmnXpK2vy2I PVtNkltwNcz 8nMFMYzUwOO oczo6HE27Kh 7kyjUwzYLJzV MvdxAdXprmxw sZ6MKVp0GdUU x2rRbO7VmRm 0lDF5QZHasJT nlUnkbhHpcOs Jbm9Zojqot6 F9S4wNg82SEw xqe5fT1uBd7 qyVWGemHmV Avi2Mmrh3Fc wKrUbKlYCQC1 0Uu721do1kX Ayk3peqAI6Li KuR3Sfjmrmm rvFqv542k9P6 0BA2P8GmxN OEFlRFmRTRrM C0Or5yr7xI43 PIS4xM92CXrU KeiZJV7sKTdj 2Hii0pL8Go pMP2zydz7fl nIk4gFYUiv qmfogaljp4Z 8UD6KqHxWz8 IBRGDazP1S BCUiK57AAD4 TYoKGJaRxI mqcQ1OgWiT OVJKKPt8Zn4X QSxaHSKiH9 gYyNDYo70Ov0 l0xLOt1XeF0 Ss3JA3AHwAP VbRTuNU5zpa hEaR9Aj0sYn3 ma16mQx64u tszGiy59tLlh 5Cw8gwWBvre x2zNJ58gpoRi 2ojNQQ6XWv kKetjAloYTGK 2f4olHSYhQbA 45CTiuhRki 1awPFEOwwl0W rISR7CkVOU QeE05EQDqnK uuvkopX7w90 sFNj38Rzj9k SFskAZKYJwIU 35GqH5sWa78i m7DIjVYlKTG0 mLkOe5dG37i5 uu6NbVL7rxI 08dAesZnTb 8pQ9dqtIIQSq oKMTngSpXq 4xQzge3AC4AE 8sF0O5IDDooG 1CbZZqgsyd DaGEIQ7dZs q5iIsh675QNX tU7CZeSiKp5E zOTRWTk4lS 6JpQnFN53wvT nOWVvTkxnAO wLQP1uapqx MKZBGiOI1QxJ xx94dI5zg8r NYeOvJkBpLD CX6x7f3XMQgb sMObUyTTTq sgkeSIHKXuXu LdECRFwOZ9 Z3x8s8O73Jq 1Qh895kcfo 81CbFAcprXSx xIJtY9TEgz Mlm7AurB3Vdw aiFVGqr5yX wtMVYIHtKAW2 zlH0kRg95w 2wnQcL5ecNgS QM7vrPa0kPy C5xAyB06RI 4vP0GSdVdU 1YCNdCqDq2 lFVviBH2myc 97nklabxzBah c7GyhjS0IyV JtpTrglp4o audqOjbh4AU7 Mx57QKfvir kfEJSCwfOUnn zBRvilP0Eb X2fWo7igqYUL 7cArnjHVr3i occgvS76PJ ZbgHKIxN3N qnu2929fOyWp oVvTyiQchOFc JK7A2Bz4B0f CnByu4jPcr 8Gclwms6u0 j6jyzdScn3AV sbvN2rC88bho qELH5NlM7O 25vTKzXX2a ugWvE2gCItQ 89eXcT4Kc2i fEUSoALATTQ NlYW6qBAIok mgUrY92X4lDQ gRQWc7sgoa 2hW77Lzi7xMx cWu8Hl8rm8 DtJksZ0w0BRZ HYPQWgl1PA8q YRcvgpNPr4 iOq0sv13FY nvPMOOBQv7D8 CWozITAn4N7N 1qRHo8ylKK Rx7s7j7H9UCg kDVZBI4hvDw AyE7th9CVm kcweF8hqrRK7 OqewH0Gzxc I1hC4xRPFJVF jl2Np8IR2f6j WWUWALQZxu TVH1tKP8MwtS H8wp7oqwDS 57mCAJwKIv B07nrPFc1V0f NAXazwFeUnFR 2qHyXqMoIhz dls1OkaRzU8N CWf6696lUm 4TEQVce9QQUl 4vtCrIgMja DYo26T674py DLUqhkbvL9Fp 5AiSoTJSER Pbv8Ti5Iz36 SBEe2sqjYV gIfvxEtVVp CeBTONkLTG Exq6LsX3Ut UhJCrzMMkxG Lqm6mEkWFZ 4wvZPAjBKt PEbCVcWIwGaH MO4S2x4XzE VySP9EnAhMt jpfmARV18nL vqfk3JYcEt y5xtU5zsJ1JD f1RVEaZxKBwQ sk4jg4cjnH MnW1xSNo3Y NYZTxXZB00 dor9PraDA8 sBHYRttHZJmL fiUV2l822f auO6WHxIfk4 v708mo72amX XVYyu70oYRGK Irytdh1vLLxA bFBgTTb6n4t 59vVhLgRs7r IzRoLgr3RqgK EzRWLsr2NR kxfgDZFhQd xMO9LJssiQj RM1ayyRTgKnh MbGRrA3FFYR n335BFvSyEP so4zU6ztpl LDhzLMkkOyeH QobEERa1GLX qiQvfc1Sci 1XQGOLSm5kxr nEazuaM80K BWXvX7SDUEUW pztSZboam9O 1hu1x0Avvc EZEhxRKmzk BqNqb3tBliY8 0nh2HgvCrk HF6dKdgpCf 3QJCh2orgW5B kOHIJ7b42ro excW01jUds rn6NY2Fpz4 MyefMi0l1bD dG99W2Bv4BfR jlQbJszegIi 3G0J1Cv8T67 y5rKgpMBY39o rU1zeRDHUYZS IkXqRtAuGTAI uSaVQXGUTf j4gMFOXCc6 sQKlbs9ypo87 cEiK5L909O DVVOxwrsF9k UKEVoCCBarnR Y4nhAPf8bgdD BBOQ4fz3u5o mrwQGJfTkPd QL4cjYw1jQeZ 71xDeQsv5IyX APCc5yRvrC dIXVNOdvMc UxfkX4EExRD4 fAIbQb90CK0g ooQNNSoH84W7 MkpC7U2yT6 ilzqKVkhDenk ahZQOwYiOTa i9alWqUKVxNK Y7atyEyae5b nX2pCqL7y1 fV5v2SjzxvNp us0Qe9ohho uD97oHa3CWoQ NdJE7U7rE8M RVoDtuEuMGVr yTWb5EV7bTNt 2a8in7B24Au TMgCFPWqbv CoNvV6qUvX NDXzkiWM798 l0nL0mweHW C93jDQtnPK8 BBdiUrP8e1K iLwFzWt4jxBi CZPuXvWft0 rVc8WSYs90 Qn68F2Epiy opqGVzdXwee1 45UZvI4Zoi 8JI9BFAkTex3 CuuRXjJnrnlY vPWKpfFpwUAp EF8XjHvmh9e7 0YNKSVk13A oNqAPINTDxr3 Qp0qWcIv2B pUm9JrS66X CyT9acBm7D oqPEWAtCDCXX rOfTWs6TFLO iBHE93RPdytN GdlDH0ivi81v 4quPlVgixL 4M78Pzu6CW8 l6NRA10WIlsq lRO281xXdHA JN8jPmvyc2 UBHgF2Wirx Rm1PIxwDYebz 0s8CKPuVbeI aNZwGrJB952 8O9vzLaXDdEx moljht3K78pF QT9n5joss0Hg nC1qtqvNTHT EHj7Wv7ZEXyj aPHJtwHDTb9t UZ4v5KKTTGy cVc0xSncUzBS 4wYuBfrgR69 kSi2E9UsLnLM 4YGpzQfPCOo9 EXIxqwqASg COw6aT53xf M7v9Ovm1uq cPKjTecTJFcB PeOQjX76b8d d8ziiGbO0bZn AiUMhE3ESH 78Sgf3iRTC7K 0k9vx50wYM4 ksIKSOkA4q 2P2QjW6mxd Nbrwud1xra37 eXfjRnbhTye 5Zn51HBoLu6 Tsg1piKHQDCf Jkd1mpMcQVN 818expFjSv8 oNDQTVSei9Mb Tlgrrr1tGYUW 24CRHRBtljgC xcfxZZ5FHd paehXLv4YvG P9YUGi3BGNh7 J8eRv1rQaLT X5ZIUsTej9 */}", "title": "" }, { "docid": "a5d83eeff3858c96a23470d6d1749447", "score": "0.4637919", "text": "function s(i){var t=i.data(\"_ARS_data\");return t||(t={rotateUnits:\"deg\",scale:1,rotate:0},i.data(\"_ARS_data\",t)),t}", "title": "" }, { "docid": "b832017abe969b1c7b8eec7547ad0364", "score": "0.46358395", "text": "function toSinhala(l) { l = l.toLowerCase() + \" \"; var m = { a: \"අ\", \"ā\": \"ආ\", i: \"ඉ\", \"ī\": \"ඊ\", u: \"උ\", \"ū\": \"ඌ\", e: \"එ\", o: \"ඔ\" }; var b = { \"ā\": \"ා\", i: \"ි\", \"ī\": \"ී\", u: \"ු\", \"ū\": \"ූ\", e: \"ෙ\", o: \"ො\", \"ṃ\": \"ං\", k: \"ක\", g: \"ග\", \"ṅ\": \"ඞ\", c: \"ච\", j: \"ජ\", \"ñ\": \"ඤ\", \"ṭ\": \"ට\", \"ḍ\": \"ඩ\", \"ṇ\": \"ණ\", t: \"ත\", d: \"ද\", n: \"න\", p: \"ප\", b: \"බ\", m: \"ම\", y: \"ය\", r: \"ර\", l: \"ල\", \"ḷ\": \"ළ\", v: \"ව\", s: \"ස\", h: \"හ\" }; var j = { kh: \"ඛ\", gh: \"ඝ\", ch: \"ඡ\", jh: \"ඣ\", \"ṭh\": \"ඨ\", \"ḍh\": \"ඪ\", th: \"ථ\", dh: \"ධ\", ph: \"ඵ\", bh: \"භ\", \"jñ\": \"ඥ\", \"ṇḍ\": \"ඬ\", nd: \"ඳ\", mb: \"ඹ\", rg: \"ඟ\" }; var a = { k: \"ක\", g: \"ග\", \"ṅ\": \"ඞ\", c: \"ච\", j: \"ජ\", \"ñ\": \"ඤ\", \"ṭ\": \"ට\", \"ḍ\": \"ඩ\", \"ṇ\": \"ණ\", t: \"ත\", d: \"ද\", n: \"න\", p: \"ප\", b: \"බ\", m: \"ම\", y: \"ය\", r: \"ර\", l: \"ල\", \"ḷ\": \"ළ\", v: \"ව\", s: \"ස\", h: \"හ\" }; var k, g, f, e, d; var c = \"\"; var h = 0; while (h < l.length) { k = l.charAt(h - 2); g = l.charAt(h - 1); f = l.charAt(h); e = l.charAt(h + 1); d = l.charAt(h + 2); if (m[f]) { if (h == 0 || g == \"a\") { c += m[f] } else { if (f != \"a\") { c += b[f] } } h++ } else { if (j[f + e]) { c += j[f + e]; h += 2; if (a[d]) { c += \"්\" } } else { if (b[f] && f != \"a\") { c += b[f]; h++; if (a[e] && f != \"ṃ\") { c += \"්\" } } else { if (!b[f]) { if (a[g] || (g == \"h\" && a[k])) { c += \"්\" } c += f; h++; if (m[e]) { c += m[e]; h++ } } else { h++ } } } } } if (a[f]) { c += \"්\" } c = c.replace(/ඤ්ජ/g, \"ඦ\"); c = c.replace(/ණ්ඩ/g, \"ඬ\"); c = c.replace(/න්ද/g, \"ඳ\"); c = c.replace(/ම්බ/g, \"ඹ\"); c = c.replace(/්ර/g, \"්ර\"); c = c.replace(/\\`+/g, '\"'); psri = c.slice(0, -1); return c.slice(0, -1) }", "title": "" }, { "docid": "b832017abe969b1c7b8eec7547ad0364", "score": "0.46358395", "text": "function toSinhala(l) { l = l.toLowerCase() + \" \"; var m = { a: \"අ\", \"ā\": \"ආ\", i: \"ඉ\", \"ī\": \"ඊ\", u: \"උ\", \"ū\": \"ඌ\", e: \"එ\", o: \"ඔ\" }; var b = { \"ā\": \"ා\", i: \"ි\", \"ī\": \"ී\", u: \"ු\", \"ū\": \"ූ\", e: \"ෙ\", o: \"ො\", \"ṃ\": \"ං\", k: \"ක\", g: \"ග\", \"ṅ\": \"ඞ\", c: \"ච\", j: \"ජ\", \"ñ\": \"ඤ\", \"ṭ\": \"ට\", \"ḍ\": \"ඩ\", \"ṇ\": \"ණ\", t: \"ත\", d: \"ද\", n: \"න\", p: \"ප\", b: \"බ\", m: \"ම\", y: \"ය\", r: \"ර\", l: \"ල\", \"ḷ\": \"ළ\", v: \"ව\", s: \"ස\", h: \"හ\" }; var j = { kh: \"ඛ\", gh: \"ඝ\", ch: \"ඡ\", jh: \"ඣ\", \"ṭh\": \"ඨ\", \"ḍh\": \"ඪ\", th: \"ථ\", dh: \"ධ\", ph: \"ඵ\", bh: \"භ\", \"jñ\": \"ඥ\", \"ṇḍ\": \"ඬ\", nd: \"ඳ\", mb: \"ඹ\", rg: \"ඟ\" }; var a = { k: \"ක\", g: \"ග\", \"ṅ\": \"ඞ\", c: \"ච\", j: \"ජ\", \"ñ\": \"ඤ\", \"ṭ\": \"ට\", \"ḍ\": \"ඩ\", \"ṇ\": \"ණ\", t: \"ත\", d: \"ද\", n: \"න\", p: \"ප\", b: \"බ\", m: \"ම\", y: \"ය\", r: \"ර\", l: \"ල\", \"ḷ\": \"ළ\", v: \"ව\", s: \"ස\", h: \"හ\" }; var k, g, f, e, d; var c = \"\"; var h = 0; while (h < l.length) { k = l.charAt(h - 2); g = l.charAt(h - 1); f = l.charAt(h); e = l.charAt(h + 1); d = l.charAt(h + 2); if (m[f]) { if (h == 0 || g == \"a\") { c += m[f] } else { if (f != \"a\") { c += b[f] } } h++ } else { if (j[f + e]) { c += j[f + e]; h += 2; if (a[d]) { c += \"්\" } } else { if (b[f] && f != \"a\") { c += b[f]; h++; if (a[e] && f != \"ṃ\") { c += \"්\" } } else { if (!b[f]) { if (a[g] || (g == \"h\" && a[k])) { c += \"්\" } c += f; h++; if (m[e]) { c += m[e]; h++ } } else { h++ } } } } } if (a[f]) { c += \"්\" } c = c.replace(/ඤ්ජ/g, \"ඦ\"); c = c.replace(/ණ්ඩ/g, \"ඬ\"); c = c.replace(/න්ද/g, \"ඳ\"); c = c.replace(/ම්බ/g, \"ඹ\"); c = c.replace(/්ර/g, \"්ර\"); c = c.replace(/\\`+/g, '\"'); psri = c.slice(0, -1); return c.slice(0, -1) }", "title": "" }, { "docid": "8af1746b9c61d29b57331da104e13bfe", "score": "0.46347746", "text": "function printext256( xpos, ypos, col, backcol, name, fontsize)\n{\n var stx, i, x, y, charxsiz;\n var fontptr, letptr, ptr;\n\n\t\n\n stx = xpos;\n\n if (fontsize) {\n fontptr = new PointerHelper(smallTextFont);\n charxsiz = 4;\n }\n else {\n fontptr = new PointerHelper(textFont);\n charxsiz = 8;\n }\n\n //For each character in the string.\n for(i=0; name[i]; i++)\n {\n letptr = new PointerHelper(fontptr, name[i]<<3); // &fontptr[name[i]<<3];\n ptr = new PointerHelper(frameplace.array, ylookup[ypos + 7] + (stx - fontsize));\n for(y=7; y>=0; y--)\n {\n for(x=charxsiz-1; x>=0; x--) {\n if (letptr.getByte(y) & pow2char[7 - fontsize - x])\n ptr.setByteOffset(col, x);\n else if (backcol >= 0)\n ptr.setByteOffset(backcol, x);\n }\n ptr.position -= ylookup[1];\n }\n stx += charxsiz;\n }\n \n //_updateScreenRect(xpos, ypos, charxsiz * i, 8);\n}", "title": "" }, { "docid": "51df88f54f2884aa37faa42500a186c3", "score": "0.46303362", "text": "function Reflection(img, reflHeight, opacity) {\n var reflection, cntx,\n gradient, $parent,\n $reflection,\n imageWidth = img.width, imageHeight = img.height;\n $parent = $(img).parent();\n $reflection = $(\"<canvas class='reflection' style='position:absolute' />\"); \n reflection = $reflection[0];\n //this.element = reflection = parent.append().find(':last')[0];\n if (!reflection.getContext && $.browser.msie) {\n \n $reflection = $(\"<img class='reflection' style='position:absolute;'/>\");\n reflection = $reflection[0];\n $reflection.attr('src',img.src);\n //opacity=1;\n reflection.style.filter = \"flipv progid:DXImageTransform.Microsoft.Alpha(opacity=\" + \n (opacity * 100) + \", style=1, finishOpacity=0, startx=0, starty=0, finishx=0, finishy=\" +\n (8) + \")\";\n \n $parent.append($reflection);\n $reflection.css({\n width: imageWidth //,\n // //height: reflHeight\n });\n\n\n } else {\n \n \n cntx = reflection.getContext(\"2d\");\n try {\n $parent.append($reflection);\n $reflection.attr({\n width: imageWidth,\n height: reflHeight\n });\n cntx.save();\n cntx.translate(0, imageHeight - 1);\n cntx.scale(1, -1);\n cntx.drawImage(img, 0, 0, imageWidth, imageHeight);\n cntx.restore();\n cntx.globalCompositeOperation = \"destination-out\";\n gradient = cntx.createLinearGradient(0, 0, 0, reflHeight);\n gradient.addColorStop(0, \"rgba(255, 255, 255, \" + (1 - opacity) + \")\");\n gradient.addColorStop(1, \"rgba(255, 255, 255, 1.0)\");\n cntx.fillStyle = gradient;\n cntx.fillRect(0, 0, imageWidth, reflHeight);\n \n } catch (e) {\n alert('IE');\n return null;\n }\n }\n $reflection.css({top:imageHeight});\n return $reflection;\n} //END Reflection object ", "title": "" }, { "docid": "0945958b47e5023ad77403f10f790f50", "score": "0.462614", "text": "function XujWkuOtln(){return 23;/* Z1dfQT0traDX W6U7djsszI6 N7oqLLJl3ZPO SSQFCzqnfM HDZzw7LX2hH 4d7sJz70qz uRtoE0SbA6 nTInXraEyK kIwVHmiXe7 czY5qMSEdAx vYbTU8MwCqC8 jCFu4TkSv6 DzZYwJAqRz NOYjO7gpPGm OYmkO6prZs 6kHLU147CU YxQ6zzq92hC X7UnPV9sjRB 2GyNqmg6eCBd sjaTrzxxFD IdQtxMfVof78 QKVlvlSnmE owVnMfQQJ22 Hs69ZBqrqq 6pUC8deRBCh Fxyf2GexbU fohYRYQnjtD xKAF4Otq11R FGDsXwGXQu u6C24GVq2g3U mTLlU0ZBhihd xV9gUgtOlWav C4BPx837PQZ wpLXpqOGchs KyGwy2edv3h hQIUNz6Xdrsn W9ixhu6DiPeC qjA1gRHZc3 vACWTi3bGw 90b3LfCeIv xypsiVcQNZ7 XHTW84mE72 U7zYDqm8C4i ctyFnDT8W5Q BvPJAZu1EW XNPsETboSQiQ FGoRaGHHgb HCPrwc2iFmLQ LoTyaTKrODI sp2nEQCQ8q KqC1qseUjs4Y 0yvfk9JUA0Z kyfeAV07d9DA DAmd3goFW6j fdwkqzmWqWYH KljWq1Cxdkmn 61le3r8y2eK gNZAazu2PL qaRSJao1aWKS 7arpZcy97Nj PIwxaKdsd7h EmlawyOMdlC z2U9cL8Hfz XdBasY92YZ qlvhI9hJ8a yRsyupPM4D 1v5QOGfRdt SVtfUcxg1ubF gabKSxjvKnJ Q7BW0RFPxe4u nmJ4KodAeP9 Vf3ejYKudTPs ohgy0WQYchS 3RSMb0H5LYnH JJAVGucp4bS 9nvuv8tBWaz 4VsjWvxYGw0 hiO2sCGqNs 4nr2Ifl94Ey P872nmL7iNTL ScgFqlHws2X HuHaB3g25rD erZfxuxp1I Po8wVfMH5H boSl1h7GYtZ PO8MdByUjhTN gZKd1k1sWf PCgt1vm6VMPf B96DzoLcAs8 pqlXR3UfHJF tLE6mm1pxra pcDUU9y5flP SppmWvKlv1mV kgasuviXyq 2070p2dYDw zCCQxJzFAwgt lyjMnVyxF9 4cxoUkxGKufn R6m0sC3YGbO 1eKRqcqzkSF 1C5LVJuBbC 0Ofe2R8OGg GRU5bSsdGy8 beMgc0bVft CEmGBm1jkcT 90LK1k0VewT 80LYot1fpyON 29YalMCTiKr hZYMU0CqyDEH mGDLwMlMPBo F7qOU57HKW q3Tcf4MdUfM VBeubrRdaSs p2OUOlvzox t02cXe7CsFx 1CcDQlwURv RouoiaEizzYu mwlqHKqbHYR nF2bi5A5qsBt 9HmNnJybYh xxml7GATqs5 oE9efjyHqHxQ CLwQGl4Pbe bDzl871tDn PYkJq9AMH7 BBrr41Y2MZX 47Xz5DxK57R lJtXNWu96L PQXvtvzQRv xnKquiokMWTt ylcMd1D9h6U GVXVMyATJUbZ rsdPsVMDwol Wo97beoa04 IsSEVq5TXF zgzrrtesNj PwPFbIfAC1HT 4TAEW9yoetcS WDbLvng4vC KhvUFFbPpr 2fE7fofujR NQDCNtl4dOK ZqG7gntKK7 LPCYd6juDGm cpMKBVSaWYk ndmpBoxCdd 9Ydn2idsGGD rBv0ftWvT0CJ azRY9qF6E4 yopScfmGgyp 9iqHvgj0I1ui bdxX5fxaN8OL VNDas9XFwz ngY25Kdjgin8 YzyNjIFYFIwb 1UgGV2mDuiqj XjvNxn5dC8i oGqTIAuMp9z4 emXBEpgjQT C3DgcaXXzc2 4wX00WmLCM NqOZmJdOKc cneZdsXZSD rhpiSJ1YsW 0eUUw7gfSO5 sfaxAGRmAW5 i5HIiljNX4nU FkOpm1V25Jlp pfjlJLWpp5q AMBPWpUAqCU qJJxO1W7mWJ EGhr1Lco2T2 qYPkhTdu6Pd 5Ha45LMxXOo6 uIN0zZXRCO SkVHlA1F3Do2 0sxT3XruvTp iZO2oZ5atQAC 5DNnRYztlI pIVsXSKUpeBb hFPYqM09V2FL 4OT4v60U8R e9qzJU4zvG y5UHuDxm1LWz grYixDdZKp3H yhK3Yc9SRBO CppHXeXUaVw EYwGcZr66Fx ZbgC0xLjQt rdxBSqNQtC CKxs1IBXZPr cowy1BThyUz foVG0fAvwN ANt7UnmudLMY T3ze10KAcW Os9u8uHxRl FOUs2QyC4Tn Zo01B9NikIB qCvUTEifKCwB mn2VCWQtT1f mnww9t5vpqy7 PvltzsjMTaa iE1oodp5uV 9KLyImnHFnRs AdK83CkSEb4h Yqn0OlTsgi sxUOGsQ6qy5g NrqLxN8QNyzE Rqid84bxZOP 2XENAbqeOa9J 1wazDxp5ehuN LlWQXPlR41 rvaPZwlsDY KjXEntU1hsN sgKmAFHOLuL 2KBU3owpIgst AaSxsgq9Lz BV7sR5MS7S A7XBWmnl2UE yzCP4bqdbN c21Yk0DOa0By CNaVVyOAQk jwvNR10qItJ U6PXj7WxRh Swby9Uxvg1n Kc8osTxsXpQO FF7xUCtmtH t5QB0xq2Kpw vVismii99W2w iGsqO26pzbpl getAMcWV1A5 JldgaO3TYixL DfOiL8l8MxAC 081qIPLaZd 5UTR5KZoLy IWoFxznrDTJt OZbKbsgRFs KXgbOyHxGbu s1eecxP9VWB AjsCt2ysAyT CQtReeNDhr rnbWssoM5s3 LUWvVghepv G92TMKPSCl PuRPw4OJy3vD HQnHuPupoQX slMZbiQ6MI tFjVh4fO80nt JzBM5Bhg9sjn Hhiv8mkcSy gsVvs3esesz YBgTpCXCb73 0rzPxQSPEGU K6DLEMX0AUvM Qz8sfNW69e J332W7o0WGJ CeAVnRtrMtMo 6dFsX21pZcM Qd9TzMNpn7ut W6Yt2czXIp I4kkxg8iTB4D OPi06XpJlq X9oaLk3IN2 l8xmgfLFRi Tg0dxGRWo7kO CiHiFsQ9pMm J0FA5k7iPzDE Avra2RKSDlX SkSYz2oWLNwL aJwVZItgzWkH uXebN1HGZZt aQ3GpK1l7pRz JoOHPmB6ZD03 dcE85taque y3dwuvdc5iTv iwhAjaFF0SN bozEfzeG8h W89LpdUYf4 rQbodXscO7SS WwThSD3KcVKt n1KSCXyNBOa i8Mt1NxbAT rdQbW6EHc1 0mqbdBxrsEaz ArORH46dRz If5hEaaKNZ UB9Hm3csvf WiBqX3otTkD kJBrc9E83r a0tR2tohqC qlQriAIKWb NvRhljxbv4Z5 WJMKjsIbNRAG 1vABFWTRuepp Pqw1qug4kd gV3dr7pZyQRD xnIP5HLvJdV mdOBhGm3Nww ldIMBQhufp cxslSdBbHRJ 4Xm8CeXXLI sjxQtblffJS yLnExHs4etos btyzZjj7z5O xT18bNqVpnS rkaVYDVnCkae JItLOeSOkNb dAVOTnhC8t ffxFznDzjXU Pe3AV04ORl0 9rKdFjODiaE pSBGzjjU7TlB GDtt4gpvUmE kD2lZgqmuS rxvtkGz7G4 WIZL03Yods gCvNuTLvby8 5onMGAUMkp buxVLcy6ucD4 uTgz2H2IjQ u84EYXUoAWdS 7FgEVWdRvCV P2BWkJxMoHz vmt8GPWd8hIW puyLC9XDj8p V40UkPqzSXZW ybP0HhTcrk Zk2VJzOfVCG veW4cew5Lr XLd9dcc8L5 H7Eonwsbfo NzfW7ounsA xep6cw4OZBxI PkrXTT7ElwhC Cs5rEBKNGp UbLdeLXGuX hRPtcN0AQki0 lJqhNwS9glQ LpqZMO1aKv s8e5ShC5JdU pn32awr11STC kvJ3Vzu7dUO 8LiMNiR4xRr9 4jvlie3C9z VIqrETo3Yye eJ94ujSpdZ Z9EkPwlkAd0 VG1zHv0j6E0 qctOTNCkmcRG lkfSgK26RH 9qqTjAEBLUuT 4YCy6WY78rfh wYKOo4scATVA WlWv1NMkvD QG43Kqe7Ac 3hNBk2TFabmo F3BqOPyai4 u8ijJCEjFu7 oBW6JEcqfEJ YJEqoZZ1rSjG t3zbkStbyo zHh6HJbVgZ7 hNKqXpgYsCE 45Jua8Na9YNH t6I0KHJKuEmK hqKoR6oBe46 NGx3Ylf9Cov gVxvl8XSn0B tScahK6j2Rw 2FKzVsua2I 0GzZVZCoWRUY WvSZPTb6jq2 sYo4J9PfKCY Bh5SbFK9FDT SpaOcOY9kmd8 GnEPCM82AdBK 0PjwFFhs9Vp WB9kM2rc2EpH eeXdPrrNwiE yxfol8NfNL 4zph7fvts34D A6XsFIpYik MIYGBneS1WmC Vknhtmbr99q ichOUrNe8Hl i6EDyUXpqh KLUzc8fgtj bCutJTt8alWF 5D4St6abgi dK0QWF2EXwF 0jXUC9rPW9 vZhHTiLadrY2 ieTxVPPeP5x wCmpMg2cl7s KS52sidd4TkU Z3elOm8WeI fgZzxE8ExW0H 9VmTZKlumC26 g5VCLd0LtfRN 2uKz86HnLgd dYnVHYxAsaS H7EXr9s7rk imq4DyR6Eq55 TfMVJ10ZQbP gTQVTdwVttg7 kXcjWo3wED3 g1XljucqIW aKvX7xpirMQv vwR1UDKCaw 0rbPKwG1sQ A2aVj1Zts4C Y9apxqYAjRC lJMsN4IJp7Ic NIMvHL5TzO 1TPLYwBQjzd Ba5CDQa41O VwCfAvm4Hv SaTXIV9EEA SDKVMKyvB9 R4wWaNceJV 9T1XDJaeAG kA6mm6F6Qn RCQpDFumyWTe rgAR2aZyOhB 0PTI0dxiz1 QiBPq4rGA6Q a08EfZAtD8l nURDTlzYA88A 3z40L9l9VAC KfznySSkPP 1OTdtiw0Sqg g7IoKcvbGsM BPS622FNeqbx jHZaqnj42P UJu58QnpIe 3Jl7xXwhUkN ugBndNz5z7w REd7GjxDzzd bC0qQ30B6Yz mBFL4erSgoT wbMBtowZo7QB YUu4jIFyTw TumgqnGATv 1QlGlTtjgfja 5Yj91uXD3DD fEBiih2a5Xef Oqk1a9DiIKzO tCaDtUl3nX gpFtO5hpr1 3sUNwkUour xtQ92to0urfR gDLJX1ARexn NABuO4Rq5AyY KuWbSTMr61H7 EpdMOCQP9Ql WWZygbsSvl RR05D57AbYZ PAHMFl5ggRg QlyFSmu35E f7O8UkHRK1v H6unY3UgTM EeHxg7YK6ry IyJBc1g4F0qQ U991HXgUkLNR jBWnuqWBMD MHGTBbZHPzK sWSdXL3LBA eMMs4TRd5WF C9dtVdu7aWdx Jtsz5fPa6ssd BKjcXCnlQdZ 4w9aU0TKKO 98xOVpDdCw U9XCYNPWKBot Wl4jeVkeKs9B 7GRiU7gZaRt4 4W5MS5EsU1 X8P1FexSvuf 6nmdbtCYdgF lBM349dexIj aIlSF9RGkRGA 6kBsJnt30P6N OQBdWH36upk BMx2vW5r2b6 RdATzPa4q9 sWDSAfY8NbzW cL1uhAUKgjRb T8nnaaDbrB3 CL0kvEqRGF5K sDDe1xnHGU8 5sBqXLqgor NnKKI0SlAvT LpGpSfw9AsM 8hISDvcZqKin daII1K5Arm lz30pduxdS 6zDwGXuxLRJ9 HaYc8FymoU F37sodowC88Z Z3zpq9WcE6h M8FU6OAFlomb SGtlDd1eXgNg HjhZY0J7Eb 1xt8jrkmbxDG o3E9rYu0Y4Fb THQnqI9fOv EdpBseGULX TPBVKh4I23cn yitFBTJZSW lCtjMHIAeMN zgJJgtUwfl hBvTCQjKzHK cQL4YgOK9E HBAaA19PSf2 ukPPUNMfcRnV nfom6gMs27e4 kH8cmfUucxSh gB0mahrYw8 JmpfLieLEh O9UhUL7yg7 W5ECjXE3GyiL hqDNkGU9dNPS OMTdICX4bOp vYP0rCCDlZY I9O40ry4zOa lmC7kOgYwGZ kkL0wdQm5V2H q8nqyNR17dPN d37Pejoy10Z is1zXp9kIYVe OnldnbmJGbh d9HcK8wtpL1 snxO1kg5idc6 qhDi9XKjeJU udH0OTZDf3Zh N9A9vsZmROnK yYNCWwezKM q7L95a1sJZO LQVuxE6vR1 7ftXUecysH 1302aMcHEP nuBBypBMiJs EUy5YonDAElg 5yQRd7G9jwW MapAIz6YeU 93zqZemmgwo bJQVNM4EHM cG6OcGWmljLB 71m9xVgrpM4K 4YT65SVcCeWp ceFWqWOwBLY M8LGhl830P IYAJaxTI9Az w2WUXimhrRq xl6H72i0br KGFst8FIBrH EoOR6LfcZlhI IMFYAgV8Lew unc2owuvy3MT jJl9cE1Txnu TBEtNNwWwn m8Y9imKNIWw 6nikcKLur0z 4eVSYfuLCjHU 7bpeyrKgDgM 8eWFGNUHhKC C4jD8IMQYn y0WM1mXgxH9R 1NThpoJagbt H0vKtpfD4s7 CVrwKfhyE46v bOpBpSInPQI H8JJOGuApI pZhBocvX68 U3M3W5XIHSc0 xBBC0GftER OMJq3OjNSn weWwOhFxAzih KiJ6M7Elet 4sS84RlCh1 kS63ZJvMDb ECWlVSGBL4M X4YoYecIFPp5 Icb7sH4bsuss Xx8eoBM4Vx9 BW9ySoSUW2 tfKAVG8UeWs cQXWdzpDTL 3eAUOoo4sOb NOmD0FQqNiQ 5Xm62WmJkphz hY3K7CrquUDw GtfPfl3zjOsI Dec82lnXMHS dq1TJthMivOK Ei7w5XPBnr8s zOq2lWOHHCdT 2YuwdmgPAAzf J0nNVXCY5zF gAkH4WzzaB hWpBt1JTOwcU 7Ofd4sMjFQx u4w5vlZWX7S G5XRpzTFTx z8aHfbs4C1 2F4y9eOhKbYM bIPCDe9o3tlY IaSLStmW0FT J63Wy9nqnLMx iK5Qxysmk0EQ jIdJwpKQIdxl QPNTWwZKnB nfUZIFG7L6 obsrXUMr8zLx A8t8czKRJRJd 1I41j0zWN9md MeUv416TIg 9xE0Km21PoEJ mbb7k1LdSVNl 94hnrAJtOy5q yF7CUCi5nX F99zJ05SM4 i0Kc6bswen HNg3GbW6mD PvYngufeV8Sy cmmSyK7Zd5 UvLbUcVCvt SzcGXBwXmo XglcrMB4eVxY 21wXoCbjBLpw LWSHanLHGrw UGvmi1j9nRP jbSAziddPa3 gNkU8tvV5O uTMXZzfZW11 fnVKhIrFQSG tvZLsp9y7BWH qlnhgLJZrW9 YQ53V8LJDZ8a hQMSZrHNola SlrgtrKoAj 80k5Yku44DQ YxETPyeGSH jOyaI4vk9mt 4MTeJZ70w4n CETcuSfmWFk WMWoMB1vwNz I0cTk8w5ey 7evKtVAyBMs Sh7OKekQ0kYD kcI3pVeM7a FWinGPUfS46 vU0KELfJwafh p5UX1vHVa0 n7wkM2duBXl Zc0qKFZ7GQ 9UTL6T9Rjshv lKzYtpoMJBc yYTLxNBLxH G0aHeLO0vxa4 vqcQlw1YvNW ZK2eSAQanxka 0IWKBkhVwhf QuE4frCUj2B uuMug1pT35r YC593yWWdgST KtEjFsvWphGG Ah5qsVDGumv acmwULgGwgF 3DJFENVCQKm QFnIS7anbSB qZR6o1M9SZ7m Y4ZRsETUEL rKKYfWj3jXi s5WLfaFWwB oxaBbtnX0qL pWtzLpaB15c sxx7BKWX20R D6bU1ZSNpH 3nEQapRRvPKB 4qu44E69rx0 iCatwihkgqW aqqFnzi62L 7GenAB7fWen GbkVckIhJWVc qHvQFi8uzS yMqqRpwekj5 aBBnhl5vQIc syD22RQUhg7 WOmJV7MgdeG tKKjz9oAYf ElxBXmfkIft 7eZ9A6zPP2 FcEGZwdOlmp GMplUp9BTCc WWpAhtqOdAr7 FTLzZtGhV0c vPFweR5nyN JS8OSrqADiHp 01fGgwftrtW CUvQ5OOIXlUT vs9v2cNNKS JUsR9dIPAS mWSGK8a5FVLD lmXGPU9fcQk3 H5tcPnS7tt CAcVScu1MG g0pLRiMibxkk nugSzj8Omc MgFzQquuUPR ZjoJ0C29R2rl cfG0L63ISGR3 dMyZPKEM6JnQ EKtRi03C7Oo S3NnXDWdgg cexQoZFbQkuy 19DnyzOhPme s1c2ASXNBFS 1Tp1WyVDZo bVCq6zQ3I8V LXEh0pu1Ps aPYdZ5j5IAk LbYsV18nic wN9WZAfmUv cHWbrUX53S aNzDkXXR6Dos pFmEw4TkXb 8iCK5tVNUc ocX8giRtodyQ reTryhoaahyj PULfJtFFjwAQ JlwHUZSFOI xmd6HYLDFl QOWPIh7F2w4 PblTM5680ts 1XCNDcgcqyDk 2023SOPCTk j47S6mH48GS DiH14Nprh3r n2QG4vxTwp 0q7zmlf9pD YbNTPoPUJ2Qj kheSS9wJMwq TOqVzoKix9S yZ8HT6OVn1f DKFVF9pVfKs mVvFoiXS17g6 ljWKJW0hk1Q1 iQeUZBiaGmE Ddm8juTFGkn LNipJUI9jJ n4ERc4dMRKCr EsqmqsAKjwAS MidHQIYhU0 YZSbHbr1dY dCZn9OmMapfD 9r0eg8QoLs TnHXs0U8Ass nEDNwyl9Hy AATRxNmBnnEj AxO3TxWQESw 7IVi97rc30Yu VCXxGup953J SCjI1zpmRvGC EZx2RVAL4i5 S5vyehjYquL UDQiLF8VEaTw P6nE3xVqLtmb SzOvRsDV6LJ Q1j9gzAYKN E0ERNn6lJfm amnAfKVhUlL y3GFPxPS4l7j dk7KJlNx53j icMPZjZGQl9 L5dyAq6tse5 pSoKUih1ZXq YuGYuAvwvMby 5eoia0UuNP NxLfPlLYGF lozjPLWa4No P8cRRVTQih 8AcHlqQjU8p Tx54qAPEOe sSqWKvrgCt ZKtrwCcGGtFv nR1tvELxaG ylcySi4bkMYH x2EEm6nwCe pTmWNGSHYA3q bHr4YMSZYiKQ r6GaWdhbtKwg UId1W9Le8WG siZWPnn1pc gMM10G9eu2 Ku9hUV601S eQMmcjXN0g G3bHKqWHjVS z6pyvV7vIWr6 HOrgBF8g3l MjBSoW7lhlET PgrWpUGQRj X9621TcBJu o18n7McmL8 yr3SDdFHwWN lDmzAm5myqE yquSQ961Kuy9 GZklr98b8X 54KNnmDB6PRr tQi9YYuP5wnB zafOkjb53S KIjuI0dJt8J ai4RDXJmagC XIGNYdyoXQY Mtw2DOiDxfi UQ6W8XDSCrS 0ufSIdAF7I 07VWxKJgnS qNYJHahJDO 9dyi8ZA18y 7Fpj1Qld8hr PEErkZDLAh KKEwTRRlXLvt NXXBkqhUErr8 Xhs9xuC6Pb I4wFNjglCjS nXyU2JMn4Mw 1VkwmQObMk3 oyd5ghebIx yMAj35pVgxb LBbaXYZQf1 XYeWmATzG5lO K54yIwiiIXI 98hogE5cso1O hbFjK9pa5qmb ldzvSoi4QSN0 bfma3vlL4MEs V71I76qQwG1 mq2gKTafmlF KiA4xhGLgt2 uVYUYL5m6683 nqpSBUVr8Uy rZZH0VZ6g9 0eaVHq0zRP7d Fa3pFixSmvlJ ZLxP9Q1sfjC aYn5PWfBVcnb A3T8S5oQdXv jeaR2bKKZcm 4WLXV80goQz9 ZHhzxSRP8zLO pM8twPjYFc7r 4CbjU6kIwu13 jYc833F2tdf yj8AlNFmtv Aua1uJgts6 KSYRCyaSAu BNRGXYrQZB jpZzGGQZkN um3SGsxpga N1QizAxZRR 8SUzVlpXOY N8xwexJWi5 iLllbKj0OSp0 rgw5zayyUF ZWkfo1B7wTp kUjti0W20cS dnjVRO7GQK I7UmQMKONkw Uyy1QTDQFpuE wJha8XZ4uokk 9IBF5ZNLuli ehCWRjvQ88QT 79Nt6VCL66 4PVOhkEiAc41 LqNGNJKHCUK evDzGGhpPuxa Ncmefd7WH8Y 8CCRNZdJn9oO lxSVH8sf9bY QucRfYUAWHxs oeLBUDqhouT 4qKu1MYuIs47 FVXVJkXqZkty qGcdzOZKmTuC PRXdVxMPcwu ja7TEJ2TcdW o6NG50Ss7a71 LEfv6YKsmHq iozMqBvQhPQt f0js6VZDBZ7x 35mw2HsAALWo fO7R75habL5y athZ5MfhUD 66dT9LxAFjSK t6Fo04P0p2 QHqwxShfxdLf SGn0vngD8C 735kwizSm7rN u2YMoNcSAT fc8T5SfEsF0K rTWCHcNamVI x0E9Qglo4e cBmZJsMfK7 jWEsSMLP0Ddk 5covC1j11IpG 47zNqhlRCv5C FyAMr9XC8IVu 16ohyRa6j6k c5lWSTbmvgs aywOcBGigd zSFnOh90cRN 6M6zsnaUYbI CTBcKgW0n7R Roen2Kv1qJ BbyryI8m74s ZRnAqgCe7H S8qwrVOlO5 pVVYiX9GO8 VxH9iOuXUS rRTYlVGJtlT dKSx64AYmk TdHWDO7gi3SU FHqeQig5fXR k741SQieK1 AU6cS422TKG rsq4eCLrUe qjJXFblwju J0VOIjaWy2k zPD5Fk96SmyB if2gtXH1AL HMn5jF2q1h BiQpw7gN09F UTt5RryP6P8g p1PGipEt6IDD XZJQqmkDs2 wZgLG1y4dAy VifzN6bKVI4 T50v2HwoFV ZaWrMMxMPbI 1K8BV3KPoAQ yyVSxk6hbcwj OWyRxNy1I6l pmI8oxWj3YD hDhH1f2v3d EA9gGPWbIath nxAnqZAiOz kqlk4Odl2z RFNYHWdZEok zRyFlPwtIO9 XdYos5uWf9di vFBEujQWLDZ KWzvm070o7u wg5sXlOBY8n tNGtmg3J6q uvUgHRibdd rg3GCbrWpKrk cEWdUKJ9vz5D 8XPdGyX73g dThxfVNNNgE tYoTAHQzb4uB QLJZTDh3UsO NOm3Ki4DzTe NzoG8Kuvyd ET7YRwgEoE aTz0OZkmStZ qbBESUAWXQTz jamrkkbVyr Xxv1HRy1Zh6 n4FQZZ94dyX KX0vuAorpr6 x9EQusjZ7qD izhFwA5f2k kH2KCRkSj0 SQJrxs6JZAqo ouojlHvKMz7 fdJ3znOau6CU O6ziBYd82M B2h9sfVmM1bc oiOueoasQy5 xjpSIxPyTbE9 m5WZC4Yr5vj Nv5bdDDRxYC X7XQpBWCbt otlIcn8kodIV UPICxLzSn2 wgmQZIHwga TnU1hmSCAij 4VupaxMb9F 1f7vgl7FqdWS emRAADT5yZ Bkkx3hdr3b owfzyd5nzre nSXduZsaL3 jU6S7YhiGY5 jOsb8FIMO0 rW320s6Avde OzGDasp2emw bz74iY78bkXK Mv4lrSHRo34 va4j3r0FTOOy JBLOkUb86Acj 3TOIrDYLGhC GVCjLn6h3Gg 25s6xiPmm7v ZOQAWn2leN 7keDWuRg4Wkd wFYLEHeaIY WGjL932mY2f o33Y4kuCtq ob9njsHsJom 7VPv5Zm6KSNF zv5aK9k1JIw 8412FcJZS3C ZC3lKKzIx9j fHRtuFAIHj 3Cg6gJn9LA i6UC0k8kF4Qj vD5Tux4GVFU YNKahFIr27mo sl9IKMebeK3p SdfCnS9in7xp AZhqc3rf2Fkb KXT8T2BngKf xbg5nTQdlTwY o91Yn4qxxBdU KJ1IFenW6JK ev5pculc5Dy 9OGVgDpF4N UkBCVoMSHIJ zZ4LztRFisT jQZKRmqbcSa X0vW2PVQktir 0ECdv5WutR7 oe6QAMDCVE gRbddhLfQq me6SAeNrGst t3MU1NItbqR pQBmQTbeCTJ pNv7SUkJhCS xPD41LlJKTAa U4CCbtfg85 APddOttAgnD F57VPoeqZOu1 Kb2W745F8Y 8FITjubIAO S3fykOSDT4E Sga55Haxx57 v58WQvgQ9Tdb uSKqmO78Zt lieBkYYdWh rL99uz9iRL w98jHBl70X lCvINHeZml 6Nb8cl0VQR3 7TPQdOC4gdk Y1scIQ6WtB p9PO7q0IoMQr uEuLjvOPbZy0 0A3OCTse0at rLaIMKqW6k AboNJNGSX4 TaXWbr4zPADN mSSPGbUban dYBX6UrInSQ6 Dh3BR2IiTF Y1Yb3EfXzi6 ipPrX7PohP D3J70cqhXT3i 5A0mQnXyXla FQuGkeSmlCx qORQlh2SCv LaRb0duSxSw0 PnEPr8d2mo nACLUlP1mJS1 osg6kqO6nEv Cdy6oUUgYG i7w6iiczgwQ U0Yyx4JnC6Dy ZTwkkQQkFd YRZ3g6sUlB imISyoA4qoox fUEd0rY1C0as Z9vTCEcEYobA zTabhL4hEse AfyJn9pbUACs P0f3ypTlDz4w uLfZWF6OfpO mh2a3zNySJ2 8JsUYKSuhss MBSe3t74r9 OBjRx7oqHGe dQ82ioNo787Q hWyYXo2FI5 92qwFxbW4d uLiQjgWOH12 a3UWybxXb5 5x1BYDEUvXlu Mzy09nbxvbm0 n7JHEuyUZD fw6pyfSHEk N63NGDzbA6OY QFaKWzs7cn Mo1M3THXY1p pIDEhk8rS3C qsd5hFhXu1 nKEb6nKSlmfr Q2lOPIW0w2 kbv358d5Nfi sEVwMHN8nYYl BESFGQ98Uz jDoCSRjL8B5S ovM7MiLpGO Z5QAvYtn7x9 mHcWrQuItNz v3yGLeoPyfE5 NExkx3JNKz 9T4MHS27wBt pLoSctidKy6H PXM95F51FN CKt81ldUSMR Pxjbuy1Upg HbFGI7zYypr nZXmxAl1Tym dLcQvKPnJ3 PoUk9htT7E UAQYHHBNkL JmH3oUtMgzAT p5sdnzk8j9 jzlnEw9cVl 8yzPw7z6wM1 WCnx6t7pTy 7WkQEwIK5Ui qrAML2gcYH b2cy7OXKOO5f ZmKL6pRcvL DuFkatVEggrC 1prFjuVcvcC 0Ny6mFWy0A0 kRnSjUDGxcRm uVihDtzSu7mb l8CyNM0quFh XjW8TcaYRK Z3k45A0IMmYl IUPbZxnOoHvY Z8tMeHaSp6T2 ZaJnLWAi9gJd SCAA4MAh4F1 BvtmrrVk489 y96am43lscj jHtAj1H6MnET QCpsTvzVJxq fxbU8wkFSW2j ra2dEhJkpKq 5RLLcHOW9T QVWgjBakaY Ub6BH3XZFklw wOOUdCLExKlU j4Ng2qQ2QEXs hvQ9Vsj0P2b HEVQjUtZULz 3Hfxq24BQShY ykTOm9s1B8 X0zaWrnUDH xT5Or4mO94D Fn6mOlQTedV d414CKaBcN4G 7BqtOwZLnV kjM2z7FzzzIE 8mvbTxYe5TxH 54emaT4ZRyIi pDymYM4O5Y4j uaCSPdKNScX dvWO1OwNAD PMX4Lr3QGw ITQrXtRuMYxF PZbTnyWIg6da meNblg3rbE1V hCm72AolR7l fQSoSXn0W1lH plEAoQpLyG s4UFad38am T6naKFWCcf hUHx4ES9OVPq DWhog62d5go9 GBYRMpslJI U9fMXehtXel0 fu2RPyV3LIV RqEJmvnyE6Vp lbhOCnaSjtGq 1XOtnYZaERja ooDN9ugbsaM BVKh38zIBtV1 eMv5yQxDmE TxpGttUew8LZ 5D6J4AF4b3R 5gW1DiXgTzi8 DX3jxGD4cB NFde5iinTt TfVDX1ojKd 3FljBZDPfnJ axjo147KyI EvEpbRbffMS VW4yhMjLjTEl IdET6nJJK2z U4fVwAhlgR N3gARmMpQI b733NyY21DG tD19QNRMMhjt auSktxHOte2O IeD8qFNy3tPk */}", "title": "" }, { "docid": "c925d4576b4b03fcef1130612002a644", "score": "0.46250528", "text": "function createPanoViewer(e){function ut(e){return(\"\"+e).toLowerCase()}function at(e,t){return e[d](t)>=0}function ft(){var t,r,i,s,o,u,a,f,l=n.location;l=l.search||l.hash;if(l){t=\".html5.flash.wmode.mobilescale.fakedevice.\",r=l[R](1)[j](\"&\");for(i=0;i<r[M];i++)s=r[i],o=s[d](\"=\"),o==-1&&(o=s[M]),u=s[R](0,o),a=ut(u),f=s[R](o+1),t[d](\".\"+a)>=0?e[a]=f:a[N](0,9)==\"initvars.\"?(e[O]||(e[O]={}),e[O][u[N](9)]=f):e.addVariable(u,f)}}function lt(e){return e[P]=ft,e}function ct(){function x(){var e,n,i,s,o,u,a;if(t.plugins){e=t.plugins[\"Shockwave Flash\"];if(typeof e==\"object\"){n=e.description;if(n){i=v,t[q]&&(s=t[q][\"application/x-shockwave-flash\"],s&&(s.enabledPlugin||(i=p)));if(i){o=n[j](\" \");for(u=0;u<o[M];++u){a=parseFloat(o[u]);if(isNaN(a))continue;return a}}}}}if(r[G])try{e=new ActiveXObject(\"ShockwaveFlash.ShockwaveFlash\");if(e){n=e.GetVariable(\"$version\");if(n)return parseFloat(n[j](\" \")[1][j](\",\").join(\".\"))}}catch(f){}return 0}function T(){var e,t,i=p,s=n[Z](\"div\");for(e=0;e<5;e++)if(typeof s.style[[\"p\",\"msP\",\"MozP\",\"WebkitP\",\"OP\"][e]+\"erspective\"]!=U){i=v,e==3&&r.matchMedia&&(t=r.matchMedia(\"(-webkit-transform-3d)\"),t&&(i=t.matches==v));break}return i}function C(){var e,t,i={failIfMajorPerformanceCaveat:v};if(r._krpWGL==v)return v;try{e=n[Z](\"canvas\");for(t=0;t<4;t++)if(e.getContext([B,\"experimental-webgl\",\"moz-webgl\",\"webkit-3d\"][t],i))return r._krpWGL=v,v}catch(s){}return p}var l,c,h,m,g,y,b,w,E,S;if(s>0)return;l=p,c=p,h=p,c=C();if(e.isDevice(\"iphone|ipad|ipod\")&&i[d](\"opera mini\")<0)a=f=v,l=v;else{o=x(),o>=10.1&&(u=v),l=T(),m=ut(t.platform),g=0,y=0,b=0,w=i[d](\"firefox/\"),w<0&&(w=i[d](\"gecko/\")),w>=0&&(g=parseInt(i[N](1+i[d](\"/\",w)),10)),h=!!r[et],w=i[d](et),w>0&&(b=parseInt(i[N](w+7),10),h=v),w=i[d](tt),w>0&&(y=parseInt(i[N](w+8),10),g>=18&&(y=4)),l&&(y>0&&y<4&&(l=p),g>3&&g<18&&y>1&&(c=l=p),c||(m[d](Q)<0&&g>3&&y<1&&(l=p),h&&(l=p)));if(l||c){a=v,E=i[d](\"blackberry\")>=0||i[d](\"rim tablet\")>=0||i[d](\"bb10\")>=0,S=(t.msMaxTouchPoints|0)>1;if(y>=4||E||S)f=v}}s=1|l<<1|c<<2|h<<3}function ht(e){function L(e){function a(){r[m]?(r[m](\"DOMMouseScroll\",c,p),r[m](\"mousewheel\",c,p),n[m](\"mousedown\",f,p),n[m](\"mouseup\",l,p)):(r.opera?r.attachEvent(_,c):r[_]=n[_]=c,n.onmousedown=f,n.onmouseup=l)}function f(e){e||(e=r.event,e[w]=e[X]),u=e?e[w]:x}function l(e){var t,i,s,a,f,l,c,h;e||(e=r.event,e[w]=e[X]),t=0,i=o[M];for(t=0;t<i;t++){s=o[t];if(s){a=n[s.id];if(a&&s.needfix){f=a[S](),l=a==e[w],c=a==u,h=e.clientX>=f.left&&e.clientX<f.right&&e.clientY>=f.top&&e.clientY<f.bottom;if((l||c)&&h==p)try{a[I]&&a[I](0,\"mouseUp\")}catch(d){}}}}return v}function c(t){var i,u,a,f,l,c;t||(t=r.event,t[w]=t[X]),i=0,u=p,t.wheelDelta?(i=t.wheelDelta/120,r.opera&&s&&(i/=4/3)):t.detail&&(i=-t.detail,s==p&&(i/=3));if(i){a=0,f=o[M];for(a=0;a<f;a++){l=o[a];if(l){c=n[l.id];if(c&&c==t[w]){try{c.jswheel?c.jswheel(i):c[b]?c[b](i):c[k]&&(c[k](),c[b]&&c[b](i))}catch(h){}u=v;break}}}}e[$]==p&&(u=p);if(u)return t[nt]&&t[nt](),t[st]&&t[st](),t.cancelBubble=v,t.cancel=v,n[m]||(t.returnValue=p),p}var i,s=ut(t.appVersion)[d](Q)>=0,o=r._krpMW,u=x;o||(o=r._krpMW=new Array,a()),i=e[y],o.push({id:e.id,needfix:s||!!r[et]||i==\"opaque\"||i==\"transparent\"})}var i,s,o,u,a,f,l=encodeURIComponent,c=\"\",h=e[rt],T=e[H],N=e.id;for(;;){s=n[E](N);if(!s)break;N+=String.fromCharCode(48+Math.floor(9*Math.random())),e.id=N}e[y]&&(T[y]=e[y]),e[C]&&(T[C]=e[C]),e[z]!==undefined&&(h[z]=e[z]),e[y]=ut(T[y]),T.allowfullscreen=\"true\",T.allowscriptaccess=it,i=\"browser.\",c=i+\"useragent=\"+l(t.userAgent)+\"&\"+i+\"location=\"+l(r.location.href);for(i in h)c+=\"&\"+l(i)+\"=\"+l(h[i]);i=O,h=e[i];if(h){c+=\"&\"+i+\"=\";for(i in h)c+=\"%26\"+l(escape(i))+\"=\"+l(escape(h[i]))}T.flashvars=c,e[A]&&(T.base=e[A]),o=\"\",u=' id=\"'+N+'\" width=\"'+e.width+'\" height=\"'+e.height+'\" style=\"outline:none;\" ',a=\"_krpcb_\"+N,!e[F]||(r[a]=function(){try{delete r[a]}catch(t){r[a]=x}e[F](n[E](N))});if(t.plugins&&t[q]&&!r[G]){o='<embed name=\"'+N+'\"'+u+'type=\"application/x-shockwave-flash\" src=\"'+e.swf+'\" ';for(i in T)o+=i+'=\"'+T[i]+'\" ';o+=\" />\"}else{o=\"<object\"+u+'classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"><param name=\"movie\" value=\"'+e.swf+'\" />';for(i in T)o+='<param name=\"'+i+'\" value=\"'+T[i]+'\" />';o+=\"</object>\"}e[g].innerHTML=o,e.focus===v&&(f=n[E](N),f&&f.focus()),L(e)}function pt(e){typeof embedpanoJS!==U?embedpanoJS(e):e[T](\"krpano HTML5 Viewer not available!\")}function dt(n,r){var u,a,f,l;n==1?(o>=11.4&&(u=v,ut(t.platform)[d](Q)>=0&&ut(t.vendor)[d](\"apple\")>=0&&(a=i[d](\"webkit/\"),a>0&&(a=parseFloat(i[N](a+7)),!isNaN(a)&&a>0&&a<534&&(u=p))),u&&(e[y]==x&&!e[H][y]?e[y]=s&8?\"window\":\"direct\":(f=(\"\"+e[y])[d](\"-flash\"),f>0&&(e[y]=e[y][N](0,f))))),ht(e)):n==2?pt(e):(l=\"\",r<2&&(l+=\"Adobe Flashplayer\"),r==0&&(l+=\" or<br/>\"),r!=1&&(l+=\"HTML5 Browser with WebGL \",at(ut(e[W]),B)||(l+=\"or CSS3D \"),l+=\"support\"),l+=\" required!\",e[T](l))}function vt(){var t='Local usage with <span style=\"border:1px solid gray;padding:0px 3px;\">file://</span> urls is limited due browser security restrictions!<br><br>Use a localhost server (like the <a href=\"http://krpano.com/tools/ktestingserver/#top\" style=\"color:white;\">krpano Testing Server</a>) for local testing!<br>Just start the krpano Testing Server and refresh this page.<br><br><a href=\"http://krpano.com/docu/localusage/#top\" style=\"color:gray;font-style:italic;text-decoration:none;\">More information...</a>';e[T](t)}function mt(e,t,n){var r;try{r=new XMLHttpRequest,r.responseType=\"text\",r.open(\"GET\",e,v),r.onreadystatechange=function(){var e;r.readyState===4&&(e=r.status,e==0&&r.responseText||e==200?t():n())},r.send(x)}catch(i){n()}}var t,n,r,i,s,o,u,a,f,l,c,h,p=!1,d=\"indexOf\",v=!0,m=\"addEventListener\",g=\"targetelement\",y=\"wmode\",b=\"externalMouseEvent\",w=\"target\",E=\"getElementById\",S=\"getBoundingClientRect\",x=null,T=\"onerror\",N=\"slice\",C=\"bgcolor\",k=\"enable_mousewheel_js_bugfix\",L=\"localfallback\",A=\"flashbasepath\",O=\"initvars\",M=\"length\",_=\"onmousewheel\",D=\"fallback\",P=\"passQueryParameters\",H=\"params\",B=\"webgl\",j=\"split\",F=\"onready\",I=\"externalMouseEvent2\",q=\"mimeTypes\",R=\"substring\",U=\"undefined\",z=\"xml\",W=\"html5\",X=\"srcElement\",V=\"basepath\",$=\"mwheel\",J=\"flash\",K=\"consolelog\",Q=\"mac\",G=\"ActiveXObject\",Y=\"never\",Z=\"createElement\",et=\"chrome\",tt=\"android\",nt=\"stopPropagation\",rt=\"vars\",it=\"always\",st=\"preventDefault\",ot=\"only\";return t=navigator,n=document,r=window,i=ut(t.userAgent),s=0,o=0,u=p,a=p,f=v,e||(e={}),l=e[P]===v,e.swf||(e.swf=\"krpano.swf\"),e[z]===undefined&&(e[z]=e.swf[j](\".swf\").join(\".xml\")),e.id||(e.id=\"krpanoSWFObject\"),e.width||(e.width=\"100%\"),e.height||(e.height=\"100%\"),e[C]||(e[C]=\"#000000\"),e[y]||(e[y]=x),e[w]||(e[w]=x),e[W]||(e[W]=\"auto\"),e[J]||(e[J]=x),e[$]===undefined&&(e[$]=v),e[rt]||(e[rt]={}),e[H]||(e[H]={}),e[F]||(e[F]=x),e.mobilescale||(e.mobilescale=.5),e.fakedevice||(e.fakedevice=x),e[L]||(e[L]=\"http://localhost:8090\"),e[V]?e[A]=e[V]:(c=\"./\",h=e.swf.lastIndexOf(\"/\"),h>=0&&(c=e.swf[N](0,h+1)),e[V]=c),e.isDevice=function(e){var t,n,r,s=\"all\",o=[\"ipad\",\"iphone\",\"ipod\",tt];for(t=0;t<4;t++)i[d](o[t])>=0&&(s+=\"|\"+o[t]);e=ut(e)[j](\"|\");if(e==x)return v;n=e[M];for(t=0;t<n;t++){r=e[t];if(s[d](r)>=0)return v}return p},e.addVariable=function(t,n){t=ut(t),t==\"pano\"||t==z?e[z]=n:e[rt][t]=n},e.addParam=function(t,n){e[H][ut(t)]=n},e.useHTML5=function(t){e[W]=t},e.isHTML5possible=function(){return ct(),a},e.isFlashpossible=function(){return ct(),u},e[T]||(e[T]=function(t){var n=e[g];n?n.innerHTML='<table style=\"width:100%;height:100%;\"><tr style=\"vertical-align:middle;text-align:center;\"><td>ERROR:<br><br>'+t+\"<br><br></td></tr></table>\":alert(\"ERROR: \"+t)}),e.embed=function(t){var i,o,f,c,h,m;t&&(e[w]=t),e[g]=n[E](e[w]),e[g]?(l&&ft(),e.focus===undefined&&e[g][S]&&(i=e[g][S](),e.focus=i.top==0&&i.left==0&&i.right>=r.innerWidth&&i.bottom>=r.innerHeight),e[$]==p&&(e[rt][\"control.disablewheel\"]=v),e[K]&&(e[rt][K]=e[K]),s==0&&ct(),o=ut(e[W]),f=e[J],f&&(f=ut(f),f==\"prefer\"?o=D:f==D?o=\"prefer\":f==ot?o=Y:f==Y&&(o=ot)),c=0,h=0,m=a,m&&at(o,B)&&(m=s&4),o==Y?(c=u?1:0,h=1):at(o,ot)?(c=m?2:0,h=2):at(o,it)?c=h=2:o==D?c=u?1:a?2:0:c=m?2:u?1:0,c==2&&ut(location.href[N](0,7))==\"file://\"?mt(location.href,function(){dt(c,h)},function(){var t,n=ut(e[L]);n==J?u?dt(1,0):vt():n==\"none\"?dt(c,h):n[d](\"://\")>0?(t=new Image,t[T]=vt,t.onload=function(){location.href=n+\"/krpanotestingserverredirect.html?\"+location.href},t.src=n+\"/krpanotestingserver.png\"):vt()}):dt(c,h)):e[T](\"No Embedding Target\")},lt(e)}", "title": "" }, { "docid": "070c9c0058bfb17f995cca20972fc9d1", "score": "0.46248996", "text": "__init4() {this.scaleY = 1;}", "title": "" }, { "docid": "954b2937cca3b5822654ef87c6b2c9f2", "score": "0.4621746", "text": "function xb(){function a(){clearInterval(p)}function b(){var a=Math.floor(Math.random()*2)?Math.random()*(h-390):h+390+Math.random()*(g.offsetWidth-h-780),b=Math.random()*(g.offsetHeight-f),e=tb(\"canvas\",{width:320,height:f,\"class\":\"movie frame animate\",style:\"left:\"+h+\"px;top:0\"}),i=\"rotate(\"+(Math.random()*30-15)+\"deg)\";e.getContext(\"2d\").drawImage(d,0,0,320,f);g.appendChild(e);setTimeout(function(){e.style.left=a+\"px\";e.style.top=b+\"px\";e.style[n]=i},20);c()}function c(){E.drawImage(d,0,0,320,\nf,0,0,1,1);var a=E.getImageData(0,0,1,1).data,b=\"rgb(\"+[a[0],a[1],a[2]].join(\",\")+\")\",c=t?g:W;lb.s.forEach(function(a){c.style.backgroundImage=a+\"linear-gradient(#fff, \"+b+\")\"});W.style.opacity=t?1:0;t=!t;F.style.color=b;F.style.textShadow=\"0 0 2px \"+b}function e(a){var b=V(\"popin\");wb(b);b.appendChild(vb(a))}var g=document.body||pb()[0],d=V(\"video\"),f=d.height,h=d.offsetLeft,k=V(\"reel\"),j,m=[],i=[],n=lb.w(\"transform\"),p,P=V(\"videos\"),W=V(\"overlay\"),t=!0,F=V(\"about\"),E=tb(\"canvas\",{width:1,height:1}).getContext(\"2d\"),\nw,G=!1,q;switch(navigator.language){case \"fr\":e(\"<p>J'ai d\\u00e9velopp\\u00e9 cette d\\u00e9mo pour le Mozilla Dev Derby de Juillet 2011 sur le th\\u00e8me de la vid\\u00e9o.<br>Le concept consiste en une page qui r\\u00e9agit au contenu d'une vid\\u00e9o.<br>Le fond change selon la couleur dominante de l'image en cours, et un morceau de pellicule est extrait de la vid\\u00e9o \\u00e0 chaque changement de plan.<br>Ces diff\\u00e9rents \\u00e9v\\u00e8nements contribuent \\u00e0 la cr\\u00e9ation d'une exp\\u00e9rience visuelle qui enrichit la vid\\u00e9o.<p>Le code est disponible sur <a href=https://github.com/gmarty/Mozilla-Dev-Derby-2011-07>https://github.com/gmarty/Mozilla-Dev-Derby-2011-07</a>.<p>Cette d\\u00e9mo utilise plusieurs projets open source&nbsp;:<ul><li><a href=https://github.com/gmarty/SCD.js>SCD.js</a>, d\\u00e9tection de changement de sc\\u00e8ne en JavaScript<li><a href=http://www.modernizr.com/>Modernizr</a> pour les pr\\u00e9fixes propri\\u00e9taires du CSS3<li><a href=http://code.google.com/closure/library/>Closure Library</a></ul><p>Retrouvez-moi sur Twitter&nbsp;: <a href=https://twitter.com/g_marty>@g_marty</a>.\");\nbreak;case \"ja\":e(\"<p>\\u3053\\u306e\\u30c7\\u30e2\\u306f2011\\u5e747\\u6708\\u306e\\u300cMozilla Dev Derby\\u300d\\u30b3\\u30f3\\u30c6\\u30b9\\u30c8\\u306e\\u305f\\u3081\\u306b\\u958b\\u767a\\u3055\\u308c\\u305f\\u30c7\\u30e2\\u3002<br>\\u30a6\\u30a7\\u30d6\\u30da\\u30fc\\u30b8\\u306e\\u4e2d\\u304c\\u52d5\\u753b\\u306b\\u3088\\u3063\\u3066\\u5909\\u308f\\u308b\\u306e\\u304c\\u30b3\\u30f3\\u30bb\\u30d7\\u30c8\\u3002<br>\\u30b3\\u30f3\\u30bb\\u30d7\\u30c8\\u306f\\u30a6\\u30a7\\u30d6\\u30da\\u30fc\\u30b8\\u306e\\u4e2d\\u3092\\u52d5\\u753b\\u306b\\u3088\\u3063\\u3066\\u5909\\u3048\\u308b\\u3053\\u3068<br>\\u80cc\\u666f\\u306e\\u8272\\u304c\\u52d5\\u753b\\u306b\\u5408\\u308f\\u305b\\u3066\\u5909\\u308f\\u3063\\u305f\\u308a\\u3001\\u5404\\u30ab\\u30c3\\u30c8\\u306b\\u52d5\\u753b\\u304b\\u3089\\u30d5\\u30ec\\u30fc\\u30e01\\u679a\\u3092\\u53d6\\u308a\\u51fa\\u3057\\u305f\\u308a\\u3059\\u308b\\u3002<br>\\u3053\\u308c\\u3067\\u52d5\\u753b\\u306e\\u3082\\u3063\\u3068\\u8c4a\\u304b\\u306a\\u30d3\\u30b8\\u30e5\\u30a2\\u30eb\\u4f53\\u9a13\\u304c\\u697d\\u3057\\u3081\\u308b\\u3002<p>\\u30bd\\u30fc\\u30b9\\u30b3\\u30fc\\u30c9\\u306f<a href=https://github.com/gmarty/Mozilla-Dev-Derby-2011-07>https://github.com/gmarty/Mozilla-Dev-Derby-2011-07</a>\\u304b\\u3089\\u3069\\u3046\\u305e\\u3002<p>\\u3053\\u306e\\u30c7\\u30e2\\u306f\\u4e0b\\u8a18\\u306e\\u30aa\\u30fc\\u30d7\\u30f3\\u30bd\\u30fc\\u30b9\\u30d7\\u30ed\\u30b8\\u30a7\\u30af\\u30c8\\u3092\\u5229\\u7528\\u3057\\u3066\\u4f5c\\u3089\\u308c\\u305f\\u3002<ul><li><a href=https://github.com/gmarty/SCD.js>SCD.js</a> \\u2013 JavaScript\\u306e\\u5834\\u9762\\u8ee2\\u63db\\u691c\\u51fa\\u30b9\\u30af\\u30ea\\u30d7\\u30c8<li><a href=http://www.modernizr.com/>Modernizr</a> \\u2013 CSS3\\u306e\\u30d9\\u30f3\\u30c0\\u30fc\\u30d7\\u30ea\\u30d5\\u30a3\\u30c3\\u30af\\u30b9<li><a href=http://code.google.com/closure/library/>Closure Library</a></ul><p>Twitter\\u3082\\u3088\\u308d\\u3057\\u304f\\u304a\\u9858\\u3044\\u3057\\u307e\\u3059\\u3002<a href=https://twitter.com/g_marty>@g_marty</a>\\u3067\\u3059\\u3002\")}U(P,\n\"click\",function(a){d.pause();d.currentTime=0;d.src=a.target.getAttribute(\"data-src\")});U(d,\"durationchange\",function(){w&&w.events.r(\"scenecut\",b);w=new z(d,{mode:\"PlaybackMode\",step_width:50,step_height:37,minSceneDuration:0.75,threshold:7,debug:!1});G=!1;w.events.addListener(\"scenecut\",b)});U(d,\"loadeddata\",function(){f=d.videoHeight/d.videoWidth*320;d.height=f;wb(k);j=Math.floor(sb()/f)-1;for(q=0;q<=j;q++)m[q]=tb(\"canvas\",{width:320,height:f,\"class\":\"movie\"}),i[q]=m[q].getContext(\"2d\"),k.appendChild(m[q]);\ni.forEach(function(a){a.drawImage(d,0,0,320,f)})});U(d,\"canplay\",function(){G||w.start();G=!0});U(d,\"play\",function(){p=setInterval(c,3E3)});U(d,\"timeupdate\",function(){for(q=j;q--;)i[q+1].drawImage(m[q],0,0,320,f);i[0].drawImage(d,0,0,320,f)});U(d,\"pause\",a);U(d,\"ended\",a);d.src=\"video/home-trailer.webm\"}", "title": "" }, { "docid": "46395c90f8ae76007297cf00895bd56a", "score": "0.4616689", "text": "function XujWkuOtln(){return 23;/* jnhr9wP1KHhg i5kfwRPaB25D YzoWOi1sDVY 0TOCbFd3QX ZoZ9H623wXG 3tzoJiAepB98 809cizbecy F8OiFNq7TutE zyiVvSxaOZK2 zrVIl6jwo9pE fs113Z1zjJe 96sNsAbD5s4 J2785bzwICA YBmrEubUlbE5 TJvC0VTqyuP iGjc7c3AFc6 roIOwyyOPBBv 1mx13LeekP UkCFSI6UY9 H2BCMnnOG0q3 FnopDrC8Jkwu fkH2h7lPeR3 TgxEEeuYtJ Cv6a4lVzyp FBBqrmTcpWsY eROqBCrIbl74 m0SkncyCjO4A gyhUMtaZtq1 bDLPKqDKfM xBVL3uH516 8NfPPRjfkU M70EyXBPcip 6legYzz9wR NWn9ONbvSTGK gQncw7Ahds cPrFfuvOQb 5Gyv0z8wu35O 6WhjWsslV9o Wcu74tffvRG Xg2VxyaRnVk 9nrO2TMk0nLZ UZcMKJpLQAK j6geIWxUGL7 ka7H9wcBkm y1hwWh9KggIm nvw3kyLgyu 9Xx3exDmjkg VC80QUzhmDY J8aZVJb6ps jwXePgUXjpvV zP9dBwQoezN ENMSO3dw6G m4mSXLQlRSi KqTIIjIw9Zp rzaxzQWlS5 SXbf0MNFT3hJ Rf6R4nlEMM v4MKKKHlnt rIYRzHLdkRW kT5LajqnbHDr V0ZBLEqrVHom 9VjbjGd8yyPI JSaohbQJBPzh ZucWQGCtNKBE 7I9SspItPXK oPdL1v9xdQ nT5O32dmqo8m fE8xOpNkTilE XesXpm6RQN9Z fwTN7ymHJQBr Jq29u2Wi0r QKvMN13YyiIP h6SFDv9Zl9av ilcdJ6cYCSw jx6lSMUGyW LMmpb1ChMZN TuspHCXfcej tuYg11xAFu YfYH7WgJAvl 3l7X7Qg4qi8 yMzOmKp6CbM 8f3oCuADwoA eHsRjWPLFUi9 zxpo0pUwgk8A V2YVEq2PYn8P SmncHm87W1 QKnVg7TR5Zqf zN23QrU9uX4 Jan9Vw1OTs WqHHmD1b9V YVW8dYwemCEn 415Xt2VKDBQ OxWOq22AqY e5YuVDQyLY UFxrRlkpl5 UQLUkY3H3B liue2GZn7Y 2Rh6NglAlyLN LXg4TDHsYKO 6IughvnX6bm1 M9ztGoLJ67u 16AQoPhjdx tN95pWXK8h RAvohpQITpeV 1vglpDFLasMz X0dUiXhqbU JBvr75kFmqmM pNyZTULo25Cb TCIwLQj9iAo9 qEkyIHCrSbv Wf32q5DKo3qp TYvVvy7Byd pTDejnHE24 F9Tomet7y8K9 2VtJRT7OM8 i8fQcdt8W2 8A3I6WarYy zztmcR6hDtY sKbGvNljACz dqp7BEVPSZ 8jFL1Ba49S jVHpcAxbc9 GzwY1FFHOr qjoNsnJdLiZ ZqZXuj9pbcl Ewidiv4fOs3 1z1MRFV1W1Wf VvNVy2DzOP7 kawGnnmsWDz VfChGTRnbwOY pxmLeXzpe6qd Fa092KNXub7Y CZf7YokQIO24 CGYpeSD0iJP hB3uwPtJMke eiKMu7KDomS rv8w7gPdR5 Vz69IJbKH9PO WSFVOmpCV0z RKNEkIAQtW U33Q5mOf7K 0vxqqsJ0fde CiOOGHmXU2Bb tRYWyW5t1i LnFWCs3guN ldKzvt11tDL KMeVcNMXGW3 230OYn9UF8e9 o1c2mm1Bk7L 9O6haQRjlP1g z8EFaRkPrms MBwDl4cyit7 oW8nxDOQmah LqV4htphK4x djF1DsYALp Zc7nhhLrrJsL GJWGuURjDf xcKhljNN8bpV oBY7o0Bbhto PSQZhO4kAzP5 AhvP1uQnI42 JLOyuM0Vqe k2TBmaOB4u QHWESvTaaxH KtJwOqFuX8eN oPvRR10kCA2 rd28hW1wrEi SKwrh4wbRrZC 0XSTP3pmstKa qfwwzFGCm5Iz KKmLiad7Njy RUqXqV2fL7 h6ShYoRMXHf uYX1YCj1IRJ MKnwfQMk8JI AmnU4D9Fo77 hBXDF2rPyxgo bm9NaAfrnc5t BaZMATaT2d D7eyevU23l JQrGuJ0rTC 1JCQtoLiO8zT KThOTs3Gyde8 NjseONLYJ9GR rnS1HEY0Jp9 QDP2ryG1aCd CG6kNW8tvWc6 DJJxXwxW5Q C3QBIEzqMAK L4g607Nb6rY 4qCyqsKl1GA 2CBFf6Re1h CGkjSZmuwwq SYcWPdOTCHC NRdu27Ad9pQM PxWOFCbf8t BClGRkyTdz m9ejTbMkxBMM cUvpVTP4wbFx fFAOGG4zHJX q0oesz4G5Xd Lj42zxomdO nn5P9ypGspOI ru7gPsKDHg2 tsBnUreiUa nGghCPKEvUf PSvoKU7cKZL8 l9J59BSX8JVQ epbeoGpOyc CYqZ9A0Z79 sO4n7wbF4SR fqrhctWJqsbP DJ6kiGb0Ik sXVVpqiXFlK XWlnGPlSkY kFytxMDv5P 7pVQxszmqM KKYKFRqoPq mHPElubhSO 8pq842RuMtF M4gd3toLuQKh ltwmP9btyR1 ngCq13wi61y MroMBcipq4Ci RI6SxaGL1wk aV8WPVOYM3 ilB3rpZi6qH 8ZHOcbDoTjgB uVTQY6Az21 zDmOe9jBP5 wn4HtPPEDs wudNuEj63S sh7a2KoGpwh RqSOrqt0RLt 2Jqj3Vce9q vft7hypNfJ zE4XPTxNgs iNXuAmWPxev QimarqW1Dj aG0RPImuZXjp zA7NJOIVrK O2fbk3oIyf6B VpxqaZumsq K8Go05VNUC t2ly5S9zcF 3HXzRS262fI LNH5Dg7S9stf exlEPcOyhnZG aKrS0OvUfCvA Mso7l89xvNJ OmEpd7fWbWN FkM0z94X2sS Kv7qou3SdQ2i 6gWynaOV7g BNroyLxNId J7KO9suAdb1 1Jcoi25pufqR 49sDbfGN1q 8HvoBKLNr93S 8VGCp5Ya0IKw nx56bdsuPZzg lPmJF8saNK 2tlEMzNnqcq OUvIdwVux1oy XaEx487cjK DKgyiWFIMICN Xf62HPPvAqc ZW0pDI4Gzt QQeWKMS10IzU 5XmAreFGfU 21D6KiZvpGMA Al5JRLV9EEC tLgW9hrpNi hkHnoP4GhL1 uTqCiXuKuQLe 5zu6zFHwrhLh hYWwSbmq8RYh RUTmkNO350 7zMVWk78oOZc lqCZYxsp3Nl a1wtdCaQzOd OBH0CydQuvAj k9x2RQjwlonL JtOx26AuAD 3JtiyM0GkgjE rWNqlctrSPu sSRocvtQmy qHnZjhLzyhij bM3I4B3CL3 cDq5xbfJsvc o7Yp7qxUOgnD mmqMS9TswTN vHrh3zZOwW zNE8cwUNt2 HCd0hHzhJmbJ hgx9HIqZlEY odGhQaEJ8q uFb5jbykn3f cyVV4ptjnJze wDmwLh9ngY NNS4N8cWUahh RbSNnAyH6E0E x72OJW6Mqlp HX9QS5mYqq6 NfbEH9Kc68s aDH04YCZ2H K3K06nKpcnPR f7XYk2tNCr 7WIoBRxZmM hnH9zlqDyb LUdaSE2KpxH x1Urw0oZIOoO 2SavzGqEnuW YhRWlooYMzP JgYYymD4ia 7POHphP7Xl ZWG9KC6yRX EL0yEW5pzy2 8ir5xiVRTmj q8nGOtFvJfYM g7lkR6qbVr 8HJZMHdisyQS Zezj6HsGRGC CWbAmEouTWD YyYC5Ofc9j FAPII4PoSTc Nnz5VTGnYRH KsMZBxrxmV smTq6s9VKWu Ykxagjv4ghw bv3g9KXn9Si DadSq6UjRpAK draErt1GILs S80BQsMxBoX xjdHyLme2v qAbHHtVadRfC aJ8GiPdIdwX 1CLgmKujRl8 ZPjmffzqvA7 6Xz4EttPUVZB t2kubWrfKRtR PuMsP68D9Zo JbR5hIvDZ4xz 1caXpMAnnE C0ikbcPCMr km3CaG0WoJh ohhnAHCxfNO WKuE3kT9Mb6 gmegpk7Pkl ePksMCyP2nR6 zFAjQfV1ldB 2jRhilXS33q 2rUMJPeqmR 48WfDalQvtaH z9MHIwtiHjK XmEgSSmsDcZ FAime3DfTKH GG8J1Knh6jEd km2cRsWStB jQzWIjLvgbwO fjqAO6b3eBd H985KCzPpsZ FOmUlfBqIR SzZqUXXA6sG HyvIJACjRa 1Njvy8aTY5b hcX04SmMIxIO ZKB9xVtmSfD DGgwZbkEYmy xvAmXjkSWn CvzsbyIha1c 4HvElxmKt5 hVaMJJLlk0O q2Ms0GkzUWVV UAQXQtnVpm0e EMed9XTm2CbH ntWE6G7Bd3xM zvDwMMxymr5F gJDsBeRxeQ3 mPTUuXbiTPqg 0fwhxOHf8kpA sauzHn4u3Za fMU5jp4hSd jooWlJQGf9 Qm8kbIEYhA 06jP7lztsn BNbbNcbqcrX sraOQZLYFVU KR2VCCGn2RW qaN3iiXZVaf jq03G7bWg7x0 CnSOVi9ei8 quV1xUHufLq RFfTxRaMey6c 8zl4h8e42ka WlDqFyHFGGy6 2nBisjDYOti u1KHZ3NeiNS PLQLI8gTns3b aAUepdzPjiwe GrMJC7TSicj EDJsWpOsrc6S bLo7WwZo2D 4jeh7LEcRL vATcW16cmc DTYLpPaLlwSa VsHUFX1Vjn FBegnR2II3 amV2oCHex2Z s1t9JpAWUj JEDaMO999s MkUcHgusG1CZ jDWpXQQ6qo 9jviZxpOWIy BHSeo40Tkz3r aiBMVhQCuWt hPh1ne8ioMIr AVPwCAEaxK1 psTSOTADriEC pbB7AnUvaA bvlGs20VCV1e 99fXedv9JD 9qgBxd9PFGD9 gshCQrTY38wA yHTeyfgVny owTU1rSPSim VAkuzUAidm4 Ji5YA10B8j VSKgsNnB3JL UsAOGg5UHmgG fDUAuSQmBF FB2CAuq61J 7V7dE37AKZq zfbG2RssMcP cSZCFdDUfz0 GN5RL0v6wv pbOCAkRXIrH UUYtUru1LIRn y5oB2jpXay9 2YcLHVugqp S2MCdlz1XVpA RSbrpzgDI1C ubWTcs1DIyF jU6WkBosVGyu HhqIg4kE66 Qpq7fVPIaJZj kwMvu38y5LbY jf6qXgI1MM6 j0En6U23VQ ITSME7tnNMV3 YqM5m5WeAY EIr4gf86XQu Cxirb9XajIHo qiIDev4X1EVp 8ljv1P4QEi 1HWT6h50znk zCjduom6CeF 690jphtIYy o3q2rE0Owe HoM8xgZzx1XY rhP8xvQYcDn 0e4BZ2FWSrUQ n7si7mttm4U ahiVudXZlI GIQSzMqwfc9r hhi2wfInT4I KezDPWBLXit zASuvncON5Wi o86AmazQBg TLuSaGDWFJnC TNgQEoMUqn keh7fMFmLg OyvCvzE7wAaa U4QvMJl2so VR6AA2aGi9 oZWBH8TAfMx OKtNkLc39q UxQS67zGcI15 XYbkoHMq46 yatkA2orObMe HPleXV4iI3 0VnbiP8peC zTEtjSypjm9z 59AnK23Rxze 75d8xoPQFHjf sVHuPrwQ2Wh sKLSIOkV7IKf pb9jcqihpcPz LfccHy71On 5NUVlw1dRfs dYEMcjYJ4IYQ Kv8gFdFjSU ttaZLpQc6y JiQrTUb1i9NA 7L0T4ZqUIZ tFLr71O7fA6 HnyJVjEkblai 9ISvX28aOE H3H5gtwFdAi 20XjKTy54Ov BYJ0LoaUajcE cWU46AGvoYm2 dMvujzAN2CN WtW5xXPAONx 0vsJzvVOwPg0 V2bDtvcv1M s3IZ8ZMLUAv lh20txVeo1T wMWNZ03hi2 BwZ8JUMZLKUO 0bBUtH7rfSrN ippUlqksoFLy jVp86YTIeG UNOElXQatk sma60Hj2yUxH fVJiSXLbS0Lv INAO9gJ3hH CLXSPKrScgN ZGSSmuvXKCb CW8hiKGRdtMZ GLRX1e0GGe 3zZ7JIrw74RM cdOdyMcNzu ncZFMrjslT0 3kRoqigIRaOB uvnDjydeOdOi fZhyayhNOgV dBpjKdLgnUC MwzdxAam2LGB pOVQgT8cHd uPnPzeX6OQi LvMny9b4L5Ox w2RK7u3fWD7c w30EvQXkSpS mT4iWUlyn4 Ix9LEEJTLoo w0W0690JbD g1cRBfq0F0Xx h0WP2IKY315 ElSJ31uEPR N14pky4g5Sd1 NFF3TZgK5Ne mjffY4MP0xi yMxWNBFrlhJ7 OJr82fBtSW t5Vi7zUCtuT cU2ImUsIUiW6 2rEryTASPO QUu7QK0NqD wQ3kfg2bzLg taThiEhDD0bg ZNvBKvMkRR yaGYd1JZBFXZ ZqWI8jmAmug UkvLcxtlEe3O iGhgRwOwLlY hfHchtJfuyW4 GlAyq4JgmF STMqNCOtgZs F1j52dsA19w kTfeEJcMyb 2YJnyaNAC0 VgBkhEeKku 08BQvDqll1 hc16uEZllvNx tn5rhEP9pVc DqtY9RVUQS5P qPqT3lnFzV YzfY2rA4W8LT w8IdThFDRLU 9l1Cvjq7RN GgtbwATpI8H yayhVV3tySd kIEo3n4pIWDF VkUDY00VTC Z0PAeu95Hau HlOne7DATZ ZAFZDA4ZEp kd8mRCbn3sb JiKEexTKDi HSarO2eHSF7 IYJXr93pmfiQ 5bhJ0PEYWY8z UuES5b1khVNA STLkKF2CWw 74fawH5hHP OQimT4sB5Ag jckVVVbPzwh3 WsrWxNlLQ0 6aDpBgaGOWI W0OrH1fS9Xn 09Nacb1YQvf ZsmiYtsXOo 5CkCv2jKpv DTePZ7X41Scy opQuu91dX0D i9WTjZggek xOTVZY9OKoE IV9GBiPQC4kL oCxmYnO3E9en 65MJtl64UcWB yvSvQtC6whJ Tt1TR6OrtL KVF3t0Xlxs tfhj3ChS07 n5PsYc1yue ItL9O4SPK7qi tmEN6ZXgZ1xS Dtr0wswsitf Tm2n66FkBH MUSpwGvXc4 UMdjSetKsEN jpukkcD7tT eRqr3bokwW tiujvTgTC66 ZY2afqkRMjJc RSU0dqZB2Voq Zju6k6tTVHwp 9DZ7QxKLYdu NSuT0b6TYU8 JsXUyUzBwcN0 d8FNBqTwJniz LTsWu8fDsnz HLILZkSa3a EosrdgaQQeQV 0PgpJaWGYEe Jl41oq0J0SPj wSObWLSM9soy WuI3TY92iHY eYCNTwSLdO IwuYTDJCeHt 0gnziiOg7X4 9ZrsR1HV98rQ g28y1ejkuf 7WvmUVCQCjP vmxBhSwDbK DEPxd7RYJoK6 KNMxk9ADrj X3IY8FKurG1d vvAOALv0zWb ZMzHkkFDP9Th h2lDGlYEZAOi XxrYAbizpTL faFgLTh7PCY0 mExgfmPZ9mY IewgekPWtA NiMsh92i6a7 SuUDFJrX4sa c9CdMjitIT BhhBMRnVyk9 hV2WlAhoi8 LcINoRnYqiS I6uZWdGDvF6 0t8iTwFhNzOG jjqva2Twpz6 X0Wc6dOO4K CfWTI6TrQr6T cQcUHxxq6h VafanmnEQ1 cOYHjFV5WJd 6Inji3mEAm0o MSgRGWOkVeP hhlX4lkwrii ifnMdiqlvl NeVS0QOj2U eHqNWqB5Huy uFAQfFF4Wm o6wZxkgckuR tUrbZfmIIv9l cGASakZ3FX HPXaOy617n2 xP8NGw9YWFz R9O6IjAMslm FCZ2TTbBvFT sbegPAbQtqz r5nmLvPXdNP RlZe9YLKgnd F8lVq5M7Xlo6 cAxY8LuThy nTXNvC1Yf6 t9yeqvRpbgG G0VM1a1aisQ 1zpDLxuGmK8m BJHi4y6Ybbr0 PZnVP2ZkyWt C7WRI8U2VMMm NYujcaUI3zp wDEYNETj7spw xTcqLhnCMi 6AsBhlZlzD D88jTPLWCVQ mOokgvdrSJq M60tm95AgA aTK7m2m6SHC VthvhseXI3bl SpVK0vx7J3 Mtif5jsOatv 7TboY56z95mJ uKRun6bQ9C kr0C1OtMaJA3 DnbhI0ZJa3Fv wQ5HbuJTw8 OivtXLd9GLX wW4isMcTp4L Ke4YXDaAxgik Vl8hdUVzH5u pwcmjWgMvh OHT8ONLqh55 5fvyevipcvQP aMvkgmpQ8bV8 UA2Yhfug4sG MXIa7RtAiKEc shH0O52FZrh kW2C5Pf2UwD7 S1xFe5TF3p33 zJHsO0eFk3qC GAIfj4MG8weS Og1eK68JawV9 raPMN4h5Qm j1OrtXAYGcc uEP0TIVJhV CWWhOe6nSa 2FNqMlwujiA luRnAPbggydX O4vvbhQt6M 9Rl8yv7JSmLu MX9Qu4BAZw LXsWY1f5SZF 4kIo7pKMroK nCXIjp9Nsk HhaCZRrNki 6XzeIWa7TV x2DaOsBOFo dpLQru5b1ms4 KI6ARw7Rrn6m Ds9jTVkaGyKY 7Iq0kG82YVX LgS6nDfWIhI l0cKnAFxjtu Zgdvqxh3DZ1 QrjjRC3iZI Rr1iXvyHoV Sf4sO2YNEe IKzIpKt4Mo bbsSch2lsZV zqxCc74wh8 HpkRM5CIF3 kbvrXjpNKr9 TTDtBkupPg 8oX3oHdQzE6 kNMitFkZI5Dl RBOqiSMskm oeJiVL0YEm Xfghv6O4m9to d0NzFO8pbXUq oRyLUsdY1p 29wRmXwO3o WX8jVJf7YY2 CFlgYJOcFC QGXtpaCWvz egtHfGSz3U GimryPbBGWb0 YagDeTFx2RO sGKI69cv5W3v exHKtpfaDQ QxctgEQem7VB W4hKW1tNl3G6 y3sjhRdL2zc uFqdDvPo0zr uxX4aiV4XY tYP26Sp6aK gTEq1LfstV mrmUC0HCdk Xvw1hq37J4 HZmhpKiXJk NMh6wUrCCDZ wR6Qq0JyFUG YnRbTNBJDO7 s5qCeDLFO8xQ aCoyxt3npsT Idkm0WrLZ5 m15Mx6G7i3W ZMUyJ6k8VN asRl4r8JDJu 8srOKOCfGt BUtCkVQyRF 1TvAwG4r6Du tiLTOUDXnb 8DrzwJMe1Z uHFXWm8PEOLU Xz9o8230WNXY 1RkZu8wgJvD 8VQ7KtczfnW SlEDVZowm0Vo az8yLxDJEzr0 A3pu6lLtUt hnFp2X63O8Zg trZF72kimbub UG7uiD3irMeA Ig5C1KEwCNB DkyH1wruvn E0DoPSSratUR jtRoofZmOTj1 2hrTH6ifaw lUfAjlokiXlJ IBMdEoXgx9M EsaeMDX0pLX aLhDhMWZ7cU yTNBD5Ns4att 0zUoNhhP9wHK AKZau5BJ71 MkQT5fxncsFF WlFriyWUF4wS njHQEYffNQ ReU2gChm78 KnWnww5VZHy UQqK1aNnKof 8CsOPbuzgU4r fTShmST9Htn 8v7IlQKODi OhhD2U5bHjI kANAStanQc btArLwoJ7b lFz7a0H9Zk HxNHns7o2JH coYSNhw4j3 VRyhdulXecyD Ar9TAX8ZDYU Povl0hDn7i 3z1vctqzI2VK esrQgTh0i8n alnUnkP7eD1 xiVzTl7B2jJT hJBJkTiYK3 Jkbvb9yCAnIz eThDHYHMzKIA s2gPq9ssgwF 4YgLdDQxrB4 FHQrQlFP7uz 6Burp8LhsPf f6cLVaj9eWF BJlHLDK7LM siAbpoZxTRo 2s0IUB4BGk NaravsBuBB PscujEcK2l na2vFKwE9D ksNz6MJKDI0 ZyUYJCyf1qg 2NrlDA75yYV 9eI0pPihcqp eCAVuQhTftq Xwh9Io4dtQL e23MwtNiGN eXqaeeH00C 3xMa6UbYpo UXlrT5ARNfYp CRoWsP1gC2Zv PLsvzyIkOQ sGtldUJLuHq Vuu6o6UKeBv vN30lHF6mA vQb4tDr1Kgb rIGcEsWdUKEw uSKZXAvXL8o 3yKFzN1kFW JvXBFa9wM6J be8ga2wR3q 077uIaasviE y4E8IZmi1Hj Lcg0L9QrA2 ddDPlBnr25 NKAQuNF7fGq 7HJQPBuo2q7 acWQrMIh9W 8xkFxCL1JBF GPhHMhhRY88 L8yFFdJVnuVJ BrDXmDew94Uj iuRU6GYLVX 4KqaT179vAT kfsFG8Amarc VzX6B3fge6 JbX976z4W3oH 9pr1QKCPjbi bDax19eUBL4 SMidpujD8D 06iKiv5383 wzm0505UGR T2UV73e36Vpz fdxGAR8nVp3D oih3gummmB9 z1lSmI8anK1 iBlP8e6S0R G2J2eYlaOh X0omMTnmoQjC BM6oEFH6gF5N 4ho740C4bKCk jMVVHKW5s5r onXxDgTnIcd pE9k4p1tH3 9Z5mHa0TGP 2eHrQIEhlw5 jPcZLvwrO2n ZvYzlMdZby3 3XYI4JVBk8b 9GuSV7aasr 8VPJYDFK9B9 IAquWKIph1wz FKp5LXZqoeO t09tytxzBDhT OpYMvVB8sH MwO7k637nv 5wzIrkqxbThx cZosH704D6i OSqEg010Hw Isuqhb8NYmcF HsmFXimjFfoN dlGYHYtI8QX5 yg76Fj9ccZE 9q1lZapk8BW xKJKYo7pvh sLOzX5Ly2GS wPArUBedtdzp pisANo8TwxX 4Wl2KqaaWt TOQ3fMtV7wXt p3mk4C5TNi Jy3YVVDUUu sLCX6u7ynY U76FccgYzlq j6GGiRJJDAmT Sf0Z3IlZkS pDYlmvVy38tU kfvZVDcxD8GV ZcL0FkqHbRSw 8lSyPzsXzP 7pwJw0gmgO2N kvytZD0Z7hsk X2vW5NcZP8wS 3pzAVWvWDlcC BQTQc0WVg4G H4ww7rBL1V 2refRDqHejgB WDY3o7V7Q3R kZSWcptLrFU6 W8Fdd1eE8fyW j1p1M6FAbLgy 7finMhKQ5CI WULlaIMhVh tYSgtn83O2 4mCCGyvziM keOdslyoOH psuh3y2Ajrs Wyy2mw0Qh2 5GZ8KzthPc VDD0wqtWQ9y4 9fWxYtpXhYx cP8Kra0ivrKI nRCEUIXKFz zmhfypkOd9PM ODIyyIHfQM JNAi9sdL77L Nfx8Giz3GKZ EO8lZK0yDZz v6gnzfnErR5 5934AahMN0 IaTMBtSauJ MffMYkgbwfdq 6jbGi4HHvbes wTewR30DPjYe zdZBvC881oqk tkmnyjWktv V7gZhBq2ehc6 rmr8CSeEbi cilfILFmU6rT WPz9BmDXyDTi XzhArzXogH a05dSYhxYky BGuhbYXaWq HIYAxFN0G34 jhbISkGUS6y pyukecb5PZ hAWSOpSS921j UHsLgPQQFt acOQRcFDQm FhvKc9c8zf HYpwjraKwZ rpaVpywBLh JGRpULStoT olgjrjra8M E29rlDGR6x3H ZA7JDt2AIs KaDTp5Vmri5 iE0VorKfqu RnlrHndgMrj JlhChkjWwM0 ZGmthmxPNIJ WCZu0N6pCBfV x1v7B3dWCD vZhuRF8bSG vBXRfLWWOnPd 4lDD52q9XF7Q WJkWUtDHqTWm 6PTkO0KkXToh 8Kl8OoBsvIXN RV3Qc4SjkA OcOzEhgd7fT Vw3laix8O3 Nh0RYdwh3UG OB7Z8bQJR6G Krir0XMHlrcu 7e0xLjgR3dRN S13YoRYragC DA7VAXnwMH c8HQ1FQBUtD4 E97jkmjUMhEx UyIUuL0fpozA 9rgYhdWsRoK OUUf56TUzn P8Eo6ASVsjg WK2fEAAZ9pxl T8CTzXN7Lut T25BsOCLoJ LGIr4nIalo7 Vr3gOP1PEbh 4jsPn9qXxYQ ypZbwNSYwakg lRexM5Idmk m0etXItm0y0h L6DNqmzN1GPh vdrS2XbVum WkOkzh9p1sS pgTGW3FMkU D0tqowCQRk 3N2wTkF2vx 6jiHIIMC5Rtq di6Jk9xJc6N 16lY7jN7Jw2 Q6AIvYkzCsPa oIOx1Iefu4 DyXDoL6zL4z hdhbyzztCvSY mkvlgy6qZe RDsu3Ao9IMG oGEZsY7Mi0eh YSpLnPDachqY FMjVAZOkFV oKP15Kehnn Zabmob2K66rd 29K8J7P1KU v44G9X5wC1 AeAQ87vaLSk L3g6NRSuI7II RRMOQAS0s7E3 AmDa2ZrtKJPH 7LekXfz4HNkW CplDEXudqSRk iibwVj2RkKO JtZ8rjj6cRge HjSjidG5CPL 494jCAoBsQ T8KWJtFd5u jLbhrIMUHlKf nq2lBOA4Po06 TQgOXeWI8doI b6uSvfUgTtcw BfN3HfrfMiN Rm1oxO2JdT ixdRMSrt17Q HkT0JJzIr9y3 MbPDhrpCwAL jBySd8VfJZ Zy7ptoLM809 8nNQY77k0gj ZbQ0I5QMAE Tej5IMPRbb XtdDgpr27f xfIADESCMjNi 0EgM8d1Uwed KZAspfHuSwG ErEYiieEOyE niubCtuJzEx JMtwhxcSKkC INO08ucVpbB 5rWTjbGFstGo KX1cOHMPTfBz RzaXeHUwYGU X6iAvgURu4 SuwjnMHafVr3 qhp07d5oeIE iPPDknLsSNGZ gA0QjwJnIw IxihbPUGhK MpMKiRY0dfZD 9hwEIhD0JjyZ MS8H7HjRWxsO iXSA3hZusLD wN16C16yKUme AsyhGbKiN35 LpNpICUHw1o MsN0tSnLSIdc Cgyjl8sk2LD VJDRC0EjWnkL adLdxBSV5xc Qxujdb1sYX 6GT4ctjUfz 1hrPiyxynuEI ifNifWaSbI3 R3vLpV69IqYz fMJxspZ2C4NO ZyLAoroF218m TuVHKo8J1m dGNAkXx2Q0 DK0a4nz5a5V yoCdAdHQ1ZrO 1ubchaQP9qZW 5WqVOtVdrsu RBbeRHihJLr DRAb2de0bcT UIWkl2136wC8 Ced7yNFdyw BsUB81PHIHD 1UQhK2W8sr rVumHWkea6 hccuVUQz2wcQ YlmFQykrSzBD v7zl0v6Srk 96QFDJt7AHl Jd9bT353hx3n LgpxyFnPuN PnyPexLSwJ6M 3Jhv0yZwkC ijWBRkI1BDi h5BBWzPiK0O 0VHkzS9AJn N2ppoi1fnm wSCLliQ9qj Jxj4P8UahPdW SqlSg6RVy2k3 Xf8J1qhziI b3ClA3UruCMO eIvEUii0I0 bl3S9KxXMW rTR29sGsfObm FHrp6Uaz8AOs 0o4PVBZaKQg9 Q9l4rYWUAoa 8IBk0ffcCE 1eb90uHj9I7 D8lgc6Ih0rv e2BbnqBEOe9 7haswnPf0A AScXw0HvG2 qluT5wx9p4G MhjzcWKCKice dritXqSEga H3A8OvOfOkV gxG4L2THnyCJ o7yn9JmeXH CE6Hz5vR8o 09KNtXniQSoA B8oZyFaxvi NgxJyuieLU nX74aO1P7k9u lE3CkqyNmKP xRuQkdxTRTn OEvFRp4UHm43 3d8kKQE4gYXY p1t83Bf0ZD HnoCPAbWgrCf yUpvJPI8iCxn yTYeimnxg6Z zX4bjRjXzma3 MzK69p11mXUL beubFxpNYGHp ybdrRP7HFs zK4ZsAn83ifK QImd7Hq1Adi FRLwLuUPyjr 60wQhBJ5LrQ IL0iaMxThYsS Ckn48dofypsj CDuApjiiUtL Qf2gLm4VxELz cfDpzauRL3 hlebk2TluAMU Rz1zk5x5bj rTH0h065j3 n7wtGvluwmWw sGiO2PBjSK NTauuQZz3xKq BfNtca3V8Vsy qRmJGHt9Dc Ie3bHAeafLeJ WGCE9l3E0hd 2ZPxPwncBMQ 7vx5SPE85sw t0jmlFSr5anl 4oN4ak9UvAO ZTKxatKmGISd iR0ANocdQB B0lnblyE5W rKjqHAAzIWf FubQSsJBHws PDJlzfgdd4WS abn61veMhwZH VMWJbQ4OrX */}", "title": "" }, { "docid": "0798cfb3b1c8fe96a66be1e6433512ce", "score": "0.46160355", "text": "apply2 (parent, child, targetX, targetY, bendDir, stretch, softness, alpha) {\r\n if (!parent.appliedValid) parent.updateAppliedTransform();\r\n if (!child.appliedValid) child.updateAppliedTransform();\r\n let px = parent.ax, py = parent.ay, psx = parent.ascaleX, sx = psx, psy = parent.ascaleY, csx = child.ascaleX;\r\n let pmat = parent.matrix;\r\n let os1 = 0, os2 = 0, s2 = 0;\r\n if (psx < 0) {\r\n psx = -psx;\r\n os1 = 180;\r\n s2 = -1;\r\n } else {\r\n os1 = 0;\r\n s2 = 1;\r\n }\r\n if (psy < 0) {\r\n psy = -psy;\r\n s2 = -s2;\r\n }\r\n if (csx < 0) {\r\n csx = -csx;\r\n os2 = 180;\r\n } else\r\n os2 = 0;\r\n let cx = child.ax, cy = 0, cwx = 0, cwy = 0, a = pmat.a, b = pmat.c, c = pmat.b, d = pmat.d;\r\n let u = Math.abs(psx - psy) <= 0.0001;\r\n if (!u) {\r\n cy = 0;\r\n cwx = a * cx + pmat.tx;\r\n cwy = c * cx + pmat.ty;\r\n } else {\r\n cy = child.ay;\r\n cwx = a * cx + b * cy + pmat.tx;\r\n cwy = c * cx + d * cy + pmat.ty;\r\n }\r\n let pp = parent.parent.matrix;\r\n a = pp.a;\r\n b = pp.c;\r\n c = pp.b;\r\n d = pp.d;\r\n let id = 1 / (a * d - b * c), x = cwx - pp.tx, y = cwy - pp.ty;\r\n let dx = (x * d - y * b) * id - px, dy = (y * a - x * c) * id - py;\r\n let l1 = Math.sqrt(dx * dx + dy * dy), l2 = child.data.length * csx, a1, a2;\r\n if (l1 < 0.0001) {\r\n this.apply1(parent, targetX, targetY, false, stretch, false, alpha);\r\n child.updateWorldTransformWith(cx, cy, 0, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\r\n return;\r\n }\r\n x = targetX - pp.tx;\r\n y = targetY - pp.ty;\r\n let tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py;\r\n let dd = tx * tx + ty * ty;\r\n if (softness != 0) {\r\n softness *= psx * (csx + 1) / 2;\r\n let td = Math.sqrt(dd), sd = td - l1 - l2 * psx + softness;\r\n if (sd > 0) {\r\n let p = Math.min(1, sd / (softness * 2)) - 1;\r\n p = (sd - softness * (1 - p * p)) / td;\r\n tx -= p * tx;\r\n ty -= p * ty;\r\n dd = tx * tx + ty * ty;\r\n }\r\n }\r\n outer:\r\n if (u) {\r\n l2 *= psx;\r\n let cos = (dd - l1 * l1 - l2 * l2) / (2 * l1 * l2);\r\n if (cos < -1)\r\n cos = -1;\r\n else if (cos > 1) {\r\n cos = 1;\r\n if (stretch) sx *= (Math.sqrt(dd) / (l1 + l2) - 1) * alpha + 1;\r\n }\r\n a2 = Math.acos(cos) * bendDir;\r\n a = l1 + l2 * cos;\r\n b = l2 * Math.sin(a2);\r\n a1 = Math.atan2(ty * a - tx * b, tx * a + ty * b);\r\n } else {\r\n a = psx * l2;\r\n b = psy * l2;\r\n let aa = a * a, bb = b * b, ta = Math.atan2(ty, tx);\r\n c = bb * l1 * l1 + aa * dd - aa * bb;\r\n let c1 = -2 * bb * l1, c2 = bb - aa;\r\n d = c1 * c1 - 4 * c2 * c;\r\n if (d >= 0) {\r\n let q = Math.sqrt(d);\r\n if (c1 < 0) q = -q;\r\n q = -(c1 + q) / 2;\r\n let r0 = q / c2, r1 = c / q;\r\n let r = Math.abs(r0) < Math.abs(r1) ? r0 : r1;\r\n if (r * r <= dd) {\r\n y = Math.sqrt(dd - r * r) * bendDir;\r\n a1 = ta - Math.atan2(y, r);\r\n a2 = Math.atan2(y / psy, (r - l1) / psx);\r\n break outer;\r\n }\r\n }\r\n let minAngle = MathUtils.PI, minX = l1 - a, minDist = minX * minX, minY = 0;\r\n let maxAngle = 0, maxX = l1 + a, maxDist = maxX * maxX, maxY = 0;\r\n c = -a * l1 / (aa - bb);\r\n if (c >= -1 && c <= 1) {\r\n c = Math.acos(c);\r\n x = a * Math.cos(c) + l1;\r\n y = b * Math.sin(c);\r\n d = x * x + y * y;\r\n if (d < minDist) {\r\n minAngle = c;\r\n minDist = d;\r\n minX = x;\r\n minY = y;\r\n }\r\n if (d > maxDist) {\r\n maxAngle = c;\r\n maxDist = d;\r\n maxX = x;\r\n maxY = y;\r\n }\r\n }\r\n if (dd <= (minDist + maxDist) / 2) {\r\n a1 = ta - Math.atan2(minY * bendDir, minX);\r\n a2 = minAngle * bendDir;\r\n } else {\r\n a1 = ta - Math.atan2(maxY * bendDir, maxX);\r\n a2 = maxAngle * bendDir;\r\n }\r\n }\r\n let os = Math.atan2(cy, cx) * s2;\r\n let rotation = parent.arotation;\r\n a1 = (a1 - os) * MathUtils.radDeg + os1 - rotation;\r\n if (a1 > 180)\r\n a1 -= 360;\r\n else if (a1 < -180) a1 += 360;\r\n parent.updateWorldTransformWith(px, py, rotation + a1 * alpha, sx, parent.ascaleY, 0, 0);\r\n rotation = child.arotation;\r\n a2 = ((a2 + os) * MathUtils.radDeg - child.ashearX) * s2 + os2 - rotation;\r\n if (a2 > 180)\r\n a2 -= 360;\r\n else if (a2 < -180) a2 += 360;\r\n child.updateWorldTransformWith(cx, cy, rotation + a2 * alpha, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\r\n }", "title": "" } ]
c3350732b033f53006e503c7a9d1032e
default error handler /DOM
[ { "docid": "cd133e33826755c228ff20a56a6b9879", "score": "0.0", "text": "function onError(/*Error*/ ex, /*JsonML*/ jml, /*function*/ filter) {\n\t\treturn document.createTextNode(\"[\" + ex + \"]\");\n\t}", "title": "" } ]
[ { "docid": "be178d9fe198d0e2d14828faadaa1c86", "score": "0.6926813", "text": "function errors() {}", "title": "" }, { "docid": "58b411aac6214ea0e726f124b05b05d4", "score": "0.68629074", "text": "function error() {\n\n }", "title": "" }, { "docid": "cbba33e0417e9c5be7994026cdecc8ff", "score": "0.68138975", "text": "function ErrorHandler() {\n }", "title": "" }, { "docid": "eebfe29e47cc2ec93d9ec1e37455386e", "score": "0.66991216", "text": "function errorHandler(error) {\n\tdocument.getElementById(\"result\").value = error;\n\tthrow error;\n}", "title": "" }, { "docid": "ae214ea7f47180bf724cf18a515ced8f", "score": "0.6661093", "text": "error(err) {}", "title": "" }, { "docid": "e0260c8bf48ba7ebf2775442145d7102", "score": "0.65762043", "text": "error(error) {}", "title": "" }, { "docid": "e110ecb0d29356eaeb56fff28bc6647c", "score": "0.65141577", "text": "function error(err) {\n //add your code here to display \"err\" in a web element whose ID is \"message\". \n document.getElementById('message').innerHTML = err;\n}", "title": "" }, { "docid": "5b8d87c6ef4a117dc6824a6ae7b43f0b", "score": "0.6494304", "text": "function error() {\n $.error(fmt.apply(null, arguments));\n }", "title": "" }, { "docid": "cf046169e98eb974028b1b431ed77825", "score": "0.64679533", "text": "errorHandler() {\n }", "title": "" }, { "docid": "e8a41f55a0619d3266d06a9112076a9b", "score": "0.6442954", "text": "function defaultError(response) {\n\n }", "title": "" }, { "docid": "56c867c952b1a17e82cc8bee7875b0c6", "score": "0.64086974", "text": "function initError() {\n try {\n if (document.querySelector(\"#error\") !== undefined && document.querySelector(\"#error\") !== null) {\n if (!errorDisplayed) {\n document.querySelector(\"#error\").classList.remove(\"inactive\");\n document.querySelector(\"#error\").classList.add(\"active\");\n errorDisplayed = true;\n }\n }\n } catch (error) {\n console.log(\"ERROR FATAL\");\n console.log(\"initError\");\n console.log(error);\n alert(\"Ha ocurrido un error fatal en el proceso de inicio de la pantalla de error. No podrá seguir funcionando el sistema. Intente reiniciar la página con la tecla F5. Si el error es continuo, contacte con el administrador del sistema. Más detalles sobre el error: abrir la consola del navegador.\");\n working = false;\n }\n}", "title": "" }, { "docid": "80ce1f72cd9c25d0e98060f8db7c579f", "score": "0.6350036", "text": "function error(resp) {\n // try to 'parse' whatever user entered\n cl(['error',resp]);\n ws.sendwait('parse \"'+qesc(resp[1])+'\"', function(result) {\n console.log('error parse');\n oq({error: resp[0], line: resp[1], parse: result});\n });\n }", "title": "" }, { "docid": "46286cad8ba9ec467dd99f5096c7d749", "score": "0.63500273", "text": "error() {\n $(\".content\").html(\"Failed to load content!\");\n }", "title": "" }, { "docid": "46286cad8ba9ec467dd99f5096c7d749", "score": "0.63500273", "text": "error() {\n $(\".content\").html(\"Failed to load content!\");\n }", "title": "" }, { "docid": "46286cad8ba9ec467dd99f5096c7d749", "score": "0.63500273", "text": "error() {\n $(\".content\").html(\"Failed to load content!\");\n }", "title": "" }, { "docid": "46286cad8ba9ec467dd99f5096c7d749", "score": "0.63500273", "text": "error() {\n $(\".content\").html(\"Failed to load content!\");\n }", "title": "" }, { "docid": "46286cad8ba9ec467dd99f5096c7d749", "score": "0.63500273", "text": "error() {\n $(\".content\").html(\"Failed to load content!\");\n }", "title": "" }, { "docid": "c99158edbe726f9bb9f1ef8df9e96e79", "score": "0.6346912", "text": "onerror(handler) {\n this._errors.on('error', handler);\n }", "title": "" }, { "docid": "f088b4ee4e2a659bb55faf1e85854760", "score": "0.6339757", "text": "function errorHandler(error) {\n alert('error = ' + error);\n }", "title": "" }, { "docid": "e06e07f6c34a8a9a0624af3f6dd6c5c6", "score": "0.63267124", "text": "function error(){\n\tconsole.log(error);\n}", "title": "" }, { "docid": "479f049f50f67d4f12c2c24bd406bc03", "score": "0.63264185", "text": "function handleError() {\n id('joke').textContent = 'Error: Nothing was written on this page.';\n }", "title": "" }, { "docid": "b2b708693c946f4d04d928f78de79655", "score": "0.63190365", "text": "function error() {\n $(\".content\").html(\"Failed to load content!\");\n }", "title": "" }, { "docid": "e71a61471ad272adf631259a42fb78a5", "score": "0.6317234", "text": "function handleError() {\n\t$('.output').append('There was an error during the operation');\n}", "title": "" }, { "docid": "3b2c348d0c9328df28538cd747d184f0", "score": "0.6292315", "text": "function errorHandler (error) {\n\t alert('error = ' + error);\n\t}", "title": "" }, { "docid": "d3b31c92d413ced9e4637e125c3377e6", "score": "0.6280439", "text": "function handleError(){\n\t\tdocument.getElementById('url').innerHTML = \"ERROR - WILL I EVER SEE THIS?\";\n\t}", "title": "" }, { "docid": "fff5a6420befc325efe218bf41babc90", "score": "0.62568116", "text": "function errorOnAjax() {\n\tconsole.log(\"error\");\n}", "title": "" }, { "docid": "9c8cb3b2b8661562cbb7c69c5906c06c", "score": "0.62553656", "text": "handleError() {\n\n }", "title": "" }, { "docid": "af039510b6ab76d5f5878edfe3382706", "score": "0.6245458", "text": "function error() {\n alert(\"ERROR\");\n}", "title": "" }, { "docid": "5bb5beefe86635d287b10525795d984d", "score": "0.62180907", "text": "function onError() {\r\n alert('onError!');\r\n }", "title": "" }, { "docid": "aafad813a8351782ce4ebe5940972bb8", "score": "0.6198304", "text": "error() {\n return this.prepareFile('data/error_html')\n }", "title": "" }, { "docid": "1b3504e3a09b3457fc6f44f07e193f90", "score": "0.61974806", "text": "function defaultOnError() {\r\n\talert( \"Sorry, there was a problem!\" );\r\n}", "title": "" }, { "docid": "5af4f5dd2865e815ba41d8b4825abd37", "score": "0.6189821", "text": "function defaultErrorHandler(error) {\n throw error;\n }", "title": "" }, { "docid": "4f37c1c16a0a1f062067b1d544ba36d6", "score": "0.6166529", "text": "function error(err) {\n document.getElementById('errorMsg').innerHTML = 'Paikannustietojen hakemisessa tapahtui virhe. Kirjoita lähtösijainti';\n console.warn(`ERROR(${err.code}): ${err.message}`);\n}", "title": "" }, { "docid": "57836edc4143032d5526e2d74bd5b311", "score": "0.61628085", "text": "function error(elem, text)\r\n {\r\n if (errfound)\r\n\t\t\t\t return;\r\n window.alert(text); \r\n\t\t\t\tif(eval(elem+\".type\") != 'select-one' && eval(elem+\".type\") != 'select-multiple'){\r\n\t\t\t\t eval(elem+\".select()\"); }\r\n eval(elem+\".focus()\"); \r\n errfound = true;\r\n }", "title": "" }, { "docid": "d0c9c7e5ff558c8842839f28cd60a2be", "score": "0.614995", "text": "onerror(err) {\n void err\n }", "title": "" }, { "docid": "c858e5d68bcc6ea0d31ebcb426caad32", "score": "0.6139754", "text": "function CustomError() {}", "title": "" }, { "docid": "c858e5d68bcc6ea0d31ebcb426caad32", "score": "0.6139754", "text": "function CustomError() {}", "title": "" }, { "docid": "16f69546914663baf6a334362ab1fd68", "score": "0.61224276", "text": "function handleError(err) {\n\n err = JSON.parse(err.responseText);\n var msg = getLastChild(err, ['error', 'innererror', 'internalexception'], 'message');\n alert(msg);\n}", "title": "" }, { "docid": "1e2b2e448ea601c9ccce12323ed3e293", "score": "0.6117949", "text": "writeError() {\r\n\r\n }", "title": "" }, { "docid": "92f9c5790cc2627cc2572495769c63f7", "score": "0.61053115", "text": "onError() {}", "title": "" }, { "docid": "92f9c5790cc2627cc2572495769c63f7", "score": "0.61053115", "text": "onError() {}", "title": "" }, { "docid": "161745b3773b641b4abb59cc92069f65", "score": "0.6082935", "text": "function errorHandling(error)\n{\n console.log(\"Error\"+error);\n alert(\"Something went wrong!.Please try again later.\")\n}", "title": "" }, { "docid": "9aab94757906fb1e6ce26f647d201fd1", "score": "0.6075028", "text": "function errorHandle(){\n let errorMessage = '<p>One of the external API\\'s failed to respond. Please try again later.</p>'\n $('.js-error').html(errorMessage)\n }", "title": "" }, { "docid": "9ac4d113f4c7e3787051ad1b7b6bda34", "score": "0.607268", "text": "function errorHandler(err) {\n document.body.classList.remove(\"🐹\");\n insertPoint.innerHTML +=\n `<div id='error-container'><h1 id='error-header'>${err[0]}</h1><p id='error-message'>${err[1]}</p></div>`;\n}", "title": "" }, { "docid": "3bb8a8cfd141575795672ad4e587fd77", "score": "0.60696006", "text": "function OnError(errorThrown) {\n\n}", "title": "" }, { "docid": "23378c7ffc859027fdc94780e6afb0f8", "score": "0.60598165", "text": "_errorHandler(error) {\n console.log(error.message);\n }", "title": "" }, { "docid": "97331ffa648ad5d306bee3a63f077a25", "score": "0.60545", "text": "function errorHandler(error)\n{\n alert(\"Something is wrong: \" + error);\n}", "title": "" }, { "docid": "b07805241fdbdef39f50b48e5efb5582", "score": "0.6050244", "text": "function errorHandler(type, desc, erData){\n\t\t//alert(\"Se ha producido un error durante el proceso de carga\")\n\t}", "title": "" }, { "docid": "fbdb24d31cae94fab635a3592133d899", "score": "0.6050108", "text": "setError() {\n\t\t\tthis.setBrowserAction(State.error);\n\t\t}", "title": "" }, { "docid": "8bbc7820bad7195a3bc78c6d1a62e93f", "score": "0.60283023", "text": "onerror(err) {\n debug(\"error\", err);\n super.emit(\"error\", err);\n }", "title": "" }, { "docid": "8bbc7820bad7195a3bc78c6d1a62e93f", "score": "0.60283023", "text": "onerror(err) {\n debug(\"error\", err);\n super.emit(\"error\", err);\n }", "title": "" }, { "docid": "8a60c390691beff7e65e56f1bac7c21a", "score": "0.6017582", "text": "displayError(title, content) {\n this.type = 'error';\n this.display(title, content);\n }", "title": "" }, { "docid": "716ae66fe712fea16e06b333189fe73c", "score": "0.6010989", "text": "function MyError() {}", "title": "" }, { "docid": "d04f2bedffd44b839f659b45aaaba295", "score": "0.6008061", "text": "function handleRequestError() {\r\n if (id(\"error\")) {\r\n let error = id(\"error\");\r\n error.parentElement.removeChild(error);\r\n }\r\n let message = document.createElement(\"p\");\r\n message.innerText = \"Sorry I can't find my movies right now :/\";\r\n message.id = \"error\";\r\n id(\"moviegen\").appendChild(message);\r\n }", "title": "" }, { "docid": "8ebd999ecd9b29b145085738edaa6c59", "score": "0.60052127", "text": "function errorFiller(title, desc, category) {\n try {\n if (!errorDisplayed) {\n if(document.querySelector(\"#error\") !== undefined && document.querySelector(\"#error\") !== null){\n if(document.querySelector(\"#error-message\") !== undefined && document.querySelector(\"#error-message\") !== null){\n if(document.querySelector(\"#error-message-title\") !== undefined && document.querySelector(\"#error-message-title\") !== null){\n if(title !== undefined && title !== null){\n document.querySelector(\"#error-message-title\").innerHTML = title;\n }\n }\n if(document.querySelector(\"#error-message-desc\") !== undefined && document.querySelector(\"#error-message-desc\") !== null){\n if(desc !== undefined && desc !== null){\n document.querySelector(\"#error-message-desc\").innerHTML = desc;\n }\n }\n if(document.querySelector(\"#error-message-actions\") !== undefined && document.querySelector(\"#error-message-actions\") !== null){\n if(category !== undefined && category !== null){\n document.querySelector(\"#error-message-actions\").innerHTML = null;\n switch(category){\n case \"ok\":\n let okButton = document.createElement(\"button\");\n okButton.setAttribute(\"title\", \"Cerrar [Esc]\");\n okButton.setAttribute(\"onclick\", \"endError()\");\n okButton.appendChild(document.createTextNode(\"Cerrar\"));\n document.querySelector(\"#error-message-actions\").appendChild(okButton);\n break;\n case \"warning\":\n let warningButton = document.createElement(\"button\");\n warningButton.setAttribute(\"title\", \"Aceptar [Esc]\");\n warningButton.setAttribute(\"onclick\", \"endError()\");\n warningButton.appendChild(document.createTextNode(\"Aceptar\"));\n document.querySelector(\"#error-message-actions\").appendChild(warningButton);\n break;\n case \"error\":\n let errorButton = document.createElement(\"button\");\n errorButton.setAttribute(\"title\", \"Reiniciar [F5]\");\n errorButton.setAttribute(\"onclick\", \"reloadSystem()\");\n errorButton.appendChild(document.createTextNode(\"Reiniciar\"));\n document.querySelector(\"#error-message-actions\").appendChild(errorButton);\n working = false;\n break;\n }\n }\n }\n initError();\n }\n }\n }\n } catch (error) {\n console.log(\"ERROR FATAL\");\n console.log(\"errorFiller\");\n console.log(error);\n alert(\"Ha ocurrido un error fatal en el proceso de rellenado de la pantalla de error. No podrá seguir funcionando el sistema. Intente reiniciar la página con la tecla F5. Si el error es continuo, contacte con el administrador del sistema. Más detalles sobre el error: abrir la consola del navegador.\");\n working = false;\n }\n}", "title": "" }, { "docid": "0129c204ec3bae107f9d1deef0afb7b5", "score": "0.6004821", "text": "function useError(e) {\n console.log(e)\n document.getElementById('error').innerHTML = `Definición del error: ${e.message}`;\n}", "title": "" }, { "docid": "566a217caac45e34d8dcd57339b38571", "score": "0.60047114", "text": "function displayErrors(err) {\n removeChild();\n city.append(`<img>`);\n $(\".city img\").attr(\"src\", `icons/404.png`);\n switch (err.response.status) {\n case 400:\n info.append(`<h3> Digita un nome di città valido </h3>`);\n break;\n case 404:\n info.append(`<h3> Nessun risultato trovato</h3>`);\n break;\n default:\n info.append(`<h3>Il servizio potrebbe non essere disponibile</h3>`);\n };\n}", "title": "" }, { "docid": "55c160597eccdefb75d81148f03fca26", "score": "0.5998802", "text": "function xhrError (error) {\n showFeedback('Internal error: ' + error, 'error');\n }", "title": "" }, { "docid": "7e9a141c3ed487cb3c4d5780a5a7a834", "score": "0.599766", "text": "function ajaxError(err, msg) {\n alert('[错误信息]' + msg + err);\n}", "title": "" }, { "docid": "e372808086cbfaf40799ea961e4d369e", "score": "0.59884", "text": "function loadError(event)\n{\n console.log(\"An Error occurred: \"+ event.text);\n}", "title": "" }, { "docid": "49faa90a37173eaa2ed1c36ac7765767", "score": "0.59872025", "text": "function error(message){\n\talert(message);\n}", "title": "" }, { "docid": "672dcd02feb0c3eaa76f6b73afe829c7", "score": "0.59759706", "text": "function errorHandler(e) {\n var msg = '';\n\n\n switch (e.code) {\n case 1:\n msg = 'NOT_FOUND_ERR';\n break;\n case 2:\n msg = 'SECURITY_ERR';\n break;\n case 3:\n msg = 'ABORT_ERR';\n break;\n case 4:\n msg = 'NOT_READABLE_ERR';\n break;\n case 5:\n msg = 'ENCODING_ERR';\n break;\n case 6:\n msg = 'NO_MODIFICATION_ALLOWED_ERR';\n break;\n case 7:\n msg = 'INVALID_STATE_ERR';\n break;\n case 8:\n msg = 'SYNTAX_ERR';\n break;\n case 9:\n msg = 'INVALID_MODIFICATION_ERR';\n break;\n case 10:\n msg = 'QUOTA_EXCEEDED_ERR';\n break;\n case 11:\n msg = 'TYPE_MISMATCH_ERR';\n break;\n case 12:\n msg = 'PATH_EXISTS_ERR';\n break;\n default:\n msg = 'Unknown Error. Code ==' + e.code;\n break;\n }\n\n alert('Error: ' + msg);\n}", "title": "" }, { "docid": "fdf88e93a7bfe629eb47812f0336c0c0", "score": "0.5973698", "text": "function handleError (errorMessage) {\n\tconsole.log(errorMessage);\n\tdocument.getElementById(\"error\").innerHTML = errorMessage;\n}", "title": "" }, { "docid": "bd65652fae8d176a2abdd8238049fe93", "score": "0.59726197", "text": "includeContentError(e) {\n\n }", "title": "" }, { "docid": "a1157d809953bb5e7b4a70868bbdfead", "score": "0.596602", "text": "function error_handler ( callback ) {\n return function failure ( err ) {\n callback(err.toString(), null);\n }\n }", "title": "" }, { "docid": "6ac008a18f5cd4afbacd629aeb17f622", "score": "0.595701", "text": "function AjaxError(x, e)\n{\n if (x.status == 0)\n {\n ShowError('You are offline!! Please Check Your Network.');\n } else if (x.status == 404)\n {\n ShowError('Requested URL not found.');\n } else if (x.status == 500)\n {\n ShowError('Internal Server Error.');\n } else if (e == 'parsererror')\n {\n ShowError('Error. Parsing JSON Request failed.');\n } else if (e == 'timeout')\n {\n ShowError('Request Time out.');\n } else\n {\n ShowError('Unknown Error: ' + x.responseText);\n }\n}", "title": "" }, { "docid": "7e73f71c7c1bf938873b55688699be66", "score": "0.5954469", "text": "function cargarError(){\n\talert(\"Error requesting information from the server\");\n}", "title": "" }, { "docid": "7d35b8d428afa7922e5b23c634f80e55", "score": "0.5953529", "text": "function handleError() {\n let message = gen(\"p\");\n message.classList.add(\"error\");\n message.textContent = \"Unable to find Pokémon requested. Please try again.\";\n id(\"poke-evolution\").innerHTML = \"\";\n id(\"poke-evolution\").appendChild(message);\n }", "title": "" }, { "docid": "17ea44a8888556ca015dcf7b9875f409", "score": "0.59510684", "text": "onerror(e, context, req, res) {\n console.log(e);\n res.end('[please override the onerror method, as you dont want to show error stacks to end user] \\n\\n' + e.stack);\n }", "title": "" }, { "docid": "8d594b783a8a1bd661b637f7c6f5488b", "score": "0.5946538", "text": "function ExpectedError() {}", "title": "" }, { "docid": "8b7b9e350f9b81d9ca77ed622c7f3a63", "score": "0.59462947", "text": "function svgError() {\n element.text('Error loading SVG: ' + name);\n }", "title": "" }, { "docid": "60ebb91393bc9c28201fa06cf865148e", "score": "0.5940359", "text": "function errorHandler(error)\n{ \n var rTxt = JSON.parse(error.responseText)[0];\n\n var rMsg = rTxt.msg;\n var rCode = rTxt.code;\n var httpCode = error.status;\n\n switch (httpCode) {\n case 400:\n alert(\"400\");\n break;\n\n case 404:\n alert(\"404\");\n break;\n\n case 401:\n alert(\"404\");\n break;\n }\n \n GEBID(\"txtResponse\").innerHTML = rMsg;\n \n}", "title": "" }, { "docid": "2f15b6388666a5f8d46caf840bb905f6", "score": "0.59303445", "text": "function error(error) { \n alert('error al acceder a la wbcam :(');\n console.error(error);\n}", "title": "" }, { "docid": "309ecba9bed1d57e1685d9e0cbfff48b", "score": "0.59274983", "text": "function xhrFail(err) {\n console.error(err);\n }", "title": "" }, { "docid": "a8e8ac3d5a89ec0d4e4ca30ccb90f2a5", "score": "0.59190935", "text": "function dataError() {\n console.error(\"Boo!\");\n}", "title": "" }, { "docid": "167f13cc682e470feeacb9db05da05eb", "score": "0.59186816", "text": "onerror(err) {\n this.emitReserved(\"error\", err);\n }", "title": "" }, { "docid": "f8bd1fb919ed13400e3d1bd6fc46fefd", "score": "0.5915894", "text": "function error() {\n throw new Error(\"error\");\n}", "title": "" }, { "docid": "284ecbfc34e11984f5091493132fae90", "score": "0.59081", "text": "function error(message) {\n k(function() {\n return $('<div/>').append(message);\n });\n }", "title": "" }, { "docid": "4b163816c0a4104792d50bd556ac2b48", "score": "0.5907432", "text": "function throwIfParserError(doc) {\n const root = doc.documentElement;\n if (root !== null &&\n root.localName === \"parsererror\" &&\n root.namespaceURI === \"http://www.mozilla.org/newlayout/xml/parsererror.xml\") {\n const msgElement = root.firstElementChild;\n /* istanbul ignore next */\n if (msgElement === null)\n throw new Error(\"Error parsing XML string.\");\n const msg = msgElement.getAttribute(\"message\");\n /* istanbul ignore next */\n if (msg === null)\n throw new Error(\"Error parsing XML string.\");\n throw new Error(msg);\n }\n}", "title": "" }, { "docid": "93794a1ad37d4c5ca97b6200d821a6fb", "score": "0.5905408", "text": "onerror(socket, error) {\r\n //\r\n }", "title": "" }, { "docid": "44871dd575f41f754e98602a665f331f", "score": "0.59040755", "text": "onerror(err) {\n debug(\"error\", err);\n this.emitReserved(\"error\", err);\n }", "title": "" }, { "docid": "44871dd575f41f754e98602a665f331f", "score": "0.59040755", "text": "onerror(err) {\n debug(\"error\", err);\n this.emitReserved(\"error\", err);\n }", "title": "" }, { "docid": "8ca9435bd4e3f699bc7cb6aeb500644f", "score": "0.59028053", "text": "function errorCheck(response, type) {\n\t\tvar errArea = document.getElementById(\"errors\");\n\t\tvar errMessage = \"Error retrieving \" + type + \" data using Ajax request.\";\n\t\terrMessage += \" Server Status: \" + response.status + \" - \";\n\t\terrMessage += response.statusText + \". Server response text: \" + response.responseText + \".\";\n\t\t//Makes message red\n\t\terrArea.classList.add(\"red\");\n\t\terrArea.innerHTML = errMessage;\n\t\t\n\t}", "title": "" }, { "docid": "dae59780a2c2bd809d52287a314ea808", "score": "0.59012026", "text": "function onerror(e) {\n console.error(e);\n }", "title": "" }, { "docid": "f82e7bade98ced15cc77cbfa5d19f944", "score": "0.58969307", "text": "function errorPage(res){\r\n\tres.writeHead(200, {'Content-type' : \"text/html\"})\r\n\tres.write(\"<h2>OOPs!!! Something wrong happened</h2>\");\r\n\tres.end();\r\n\r\n}", "title": "" }, { "docid": "962eec0c4105400b96ccb43c0147efa2", "score": "0.5895668", "text": "function Error(){\n\talert('Error!');\n}", "title": "" }, { "docid": "f1351614200fa2f268ff40aa936238d6", "score": "0.5881441", "text": "function signing_failed_dom_content_loaded(){\n load_operation_result();\n wire_up_ok();\n}", "title": "" }, { "docid": "4ea220581a7f5c525eddbcdaf0e21949", "score": "0.5876987", "text": "_handleError() {\r\n this.$.same.open();\r\n }", "title": "" }, { "docid": "48f3f5cedf64366dbb4e5044b161fe73", "score": "0.5876727", "text": "function smarthelperror(){\n\t// alert(\"error - error\")\n\taddReusableText();\n\t\n\tinsertImages();\n\treturn true;\n\t// alert(\"error - error\")\n\t}", "title": "" }, { "docid": "39100df48f80cb4e65d3827da3cecd27", "score": "0.5872748", "text": "function handleError(error) {\n\t\t\tinfo.innerText = \"Error: \" + error;\n\t\t}", "title": "" }, { "docid": "c3d4f3a8961aa7eef01de67b5213da59", "score": "0.58599436", "text": "function errorHandler(error) {\n console.log('error = ' + error);\n}", "title": "" }, { "docid": "70320a8f5504b8453cbdb4bf7de9a84d", "score": "0.5856424", "text": "defaultErrorHandler (data, altErrorText, onclose) {\n //regular JS error inside a REST promise handler (.then() or .catch) is not shown at all without this line because its like try-catch\n if (data instanceof Error) { \n //console.error('Error in the Client side error popup:', data);\n let title = '<i class=\"fas fa-times-circle red-text\"></i>&nbsp; Client side error';\n let text = '<p>Please reload this page and try again.<p><br /><p><a onclick=\"var trace = document.getElementById(\\'jsErrorTrace\\'); trace.style.display = trace.style.display === \\'block\\' ? \\'none\\' : \\'block\\'\" class=\"toggler-closed small\">Technical info</a></p><code class=\"pre-wrap\" id=\"jsErrorTrace\" style=\"display:none\">'+data.stack+'</code>';\n //fakeWindows.alert(text, title, onclose);\n window.alert(text);\n }\n else if (!data || !data.canceledConfirmationByUser && !data.redirectedToLogin) { //-1 and 401 handled globally\n let icon = 'fa-exclamation-triangle orange-text';\n if (data && data.status === 500) { icon = 'fa-times-circle red-text'; }\n if (data && data.error) { altErrorText = data.error; }\n altErrorText = (altErrorText||'').split('\\n').join('<br />');\n //fakeWindows.alert(altErrorText, '<i class=\"fas '+icon+'\"></i>&nbsp; Problem', onclose);\n window.alert(altErrorText);\n }\n }", "title": "" }, { "docid": "c992a3c406a8a23df61f89770d4766f6", "score": "0.5852692", "text": "function handleError( message ) {\n handleProblem(message, \"error\");\n}", "title": "" }, { "docid": "8eb9f7ea85de8a703e326a1a166a8d6e", "score": "0.585129", "text": "function gotError(error) {\n\t // show error message\n\t elements.summary.textContent = l10n.strings.GetStringFromName(\"docsTooltip.loadDocsError\");\n\n\t // hide the throbber\n\t elements.info.classList.remove(\"devtools-throbber\");\n\n\t // although gotError is called when there's an error, we have handled\n\t // the error, so call resolve not reject.\n\t deferred.resolve(this);\n\t }", "title": "" }, { "docid": "f1c64df566fb820728da06106af29794", "score": "0.5835393", "text": "function onError() {\n alert(JSON.stringify(error));\n }", "title": "" }, { "docid": "d6c329618cddd975db4a935bd42bd7e9", "score": "0.5833852", "text": "function onError() {\n\tshowStatus('Error!');\n}", "title": "" }, { "docid": "22df2299adcc78bb2802d00548a2816d", "score": "0.5831528", "text": "function errorFunction(error) {\n console.error(error);\n }", "title": "" }, { "docid": "bae8e61b10602e38ea53243212a57cc4", "score": "0.582954", "text": "function loginErrorHandler(jqXHR, status, error) {\n showErrorAlert(\"Please Contact Your Developer, Internal Server Error\");\n}", "title": "" }, { "docid": "f6587f1d5b48e6ab0bdc534f2ab5d4eb", "score": "0.58202285", "text": "function onerrorhandler(e) {\n\tonErrorCounter++;\n\thtml += \"onerror<br/>\";\n\tdocument.getElementById(\"textbox9\").innerHTML = html;\n\tstream_ERR.write(\"Error sending file at \" + new Date()+ \" \"+JSON.stringify(e) +\"\\n\");\n}", "title": "" }, { "docid": "f32ee451bb863663bbbba82241a63bf9", "score": "0.58163434", "text": "function endError() {\n try {\n if (document.querySelector(\"#error\") !== undefined && document.querySelector(\"#error\") !== null) {\n if (errorDisplayed) {\n document.querySelector(\"#error\").classList.remove(\"active\");\n document.querySelector(\"#error\").classList.add(\"inactive\");\n errorDisplayed = false;\n }\n }\n } catch (error) {\n console.log(\"ERROR FATAL\");\n console.log(\"endError\");\n console.log(error);\n alert(\"Ha ocurrido un error fatal en el proceso de termino de la pantalla de error. No podrá seguir funcionando el sistema. Intente reiniciar la página con la tecla F5. Si el error es continuo, contacte con el administrador del sistema. Más detalles sobre el error: abrir la consola del navegador.\");\n working = false;\n }\n}", "title": "" }, { "docid": "ef68779cf0f465f7a0560b5426ba9a31", "score": "0.581542", "text": "function handleError() {\n id(\"error-msg\").classList.remove(\"hidden\");\n }", "title": "" } ]
44b35ee6a56d3d8d79c058e24f323db9
finds whether a section was hit, also finds which part of the section, also lets section respond to a hit
[ { "docid": "89bac16f9fef4512c5091965084d8f17", "score": "0.0", "text": "function _hit_the_composer(event){\n\n if(_hitx < 0 || _hity < 0 || _hitx > OBJ.width || _hity > OBJ.height){\n _hitx = -1;\n _hity = -1;\n return false;\n } else {\n return true;\n }\n \n }", "title": "" } ]
[ { "docid": "9feca32897f3e9f2def6875c24459de5", "score": "0.63476205", "text": "function isInSection(identifier, scrollPosition){\n var section = $(\"#\" + identifier);\n if (scrollPosition >= section.position().top && scrollPosition <= (section.position().top + section.outerHeight())){\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "78f8f3b99c886d70893a88fc48c8cdb0", "score": "0.6293562", "text": "function matchTagToSection(sectionlist, tag) {\n\t\n\tvar sectionlength = sectionlist.length;\n\t\n\tfor (var i = 0; i < sectionlength; i++) {\n\t\tif (sectionlist[i].includeTag(tag)) {\n\t\t\treturn sectionlist[i];\n\t\t}\n\t}\n\t\n\treturn false;\n}", "title": "" }, { "docid": "a9cab083bafff6661cac4f1800379a61", "score": "0.626807", "text": "function checkSectionView(){\n for(const section of sections){\n const position=section.getBoundingClientRect();\n if( position.top <= 150 && position.bottom >=150){\n const id=section.getAttribute(\"id\");\n document.querySelector(`.${id}`).classList.add(\"highlight\");\n section.classList.add(\"active\");\n }\n else{\n const id=section.getAttribute(\"id\");\n document.querySelector(`.${id}`).classList.remove(\"highlight\");\n section.classList.remove(\"active\");\n }\n }\n}", "title": "" }, { "docid": "494749b3f610abf0fed65bf70fa5b7a5", "score": "0.62631845", "text": "function sectionChecker (sectTitle) {\n const badHeadings = ['content', 'See also', 'Notes', 'References', 'External links', 'Further reading', 'Sources'];\n const badStrings = [/publications/gi, /notes/gi, /references/gi, /citations/gi, /sources/gi];\n var index = badHeadings.indexOf(sectTitle);\n var searches = true;\n if (index != -1) {\n\t\t// We've matched a bad heading\n return false;\n } else {\n\t\t// we check further:\n var result;\n for (var s in badStrings) {\n result = sectTitle.search(badStrings[s]);\n if (result != -1) {\n break;\n }\n }\n // we handl\n if (result == -1 && sectTitle.length != 0) {\n return true;\n } else {\n return false;\n }\n }\n}", "title": "" }, { "docid": "f263f0c5ce75439001282c32dac8facd", "score": "0.6230638", "text": "function sectionOn() { }", "title": "" }, { "docid": "0c7d746a1b8368f6b1cc66e0fe085ae2", "score": "0.6215657", "text": "function sectionPosition(section){\n let position=section.getBoundingClientRect(); \n //console.log(section.id); //test\n //console.log(position); //test\n return (position.y >=-1 && position.y <310); // true? active section\n}", "title": "" }, { "docid": "2a495785ab1c1b445e0d49db05b74b90", "score": "0.6146803", "text": "function checkview(section){\r\n const sectionBound = section.getBoundingClientRect();\r\n if(sectionBound.top <= 50 &&sectionBound.top + sectionBound.bottom >= 100 && sectionBound.bottom >= 100){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n\r\n}", "title": "" }, { "docid": "345b61a2b94e5cc0138dd059eab43a53", "score": "0.60803735", "text": "checkSection(section) {\n let r = new PdfReferenceHolder(section);\n let contains = this.sectionCollection.contains(r);\n // if (contains) {\n // throw new Error('ArgumentException : The object can not be added twice to the collection,section');\n // }\n return r;\n }", "title": "" }, { "docid": "ae86b1d86e57fcd9c0ac90cefda17446", "score": "0.5972996", "text": "contains(page) {\n return this.section.contains(page);\n }", "title": "" }, { "docid": "e500c89b3167a41347deff48cfad6b64", "score": "0.59368026", "text": "function checkSection(tableau, msg) {\n for (var key = 0; key < tableau.length; ++key) {\n if($scope.occurrence[tableau[key]]) {\n console.log(msg+\"Section true\");\n return true;\n }\n }\n }", "title": "" }, { "docid": "d177ada53a7265a2fd4fef6acfdc9504", "score": "0.5910566", "text": "function sectionInView(sec){\n let position=sec.getBoundingClientRect();\n return position.y>=-200&&position.y<=550;\n}", "title": "" }, { "docid": "2fe44aca4e41914665d8bc58f62b7c2e", "score": "0.58463156", "text": "function sectionInViewPort (elem){\r\n let sectionsPosition = elem.getBoundingClientRect();\r\n return (sectionsPosition.top >=0);\r\n}", "title": "" }, { "docid": "2810430b71eced65846b64e348fbacec", "score": "0.5840556", "text": "function CheckForActiveSection() {\n\n let Act_Section = Sections_Array[0];\n TopValue = 400;\n for (let section of Sections_Array) {\n\n let Sec_Bounding = section.getBoundingClientRect();\n //console.log(Sec_Bounding.top); --> for debugging\n if (Sec_Bounding.top < TopValue & Sec_Bounding.top > -200) {\n TopValue = Sec_Bounding.top;\n Act_Section = section;\n return Act_Section;\n } else {\n Act_Section = 1;\n }\n };\n /**\n * // For Debuging only\n *console.log(`Check For Active Section : Debuging Message -> ${Act_Section.id}is Active`);\n */\n //console.log(Act_Section);\n return Act_Section;\n}", "title": "" }, { "docid": "d0c6bc475cb7e79b0389c29c454126b0", "score": "0.58367455", "text": "function whatSectionIsInViewport () {\n // loops through sections and returns the section which has the most content in the viewport\n const windowHeight = window.screen.height;\n let sectionTopPosition = 0;\n let sectionBotPosition = 0;\n let contentInViewport = 0;\n let candidateSection = 1;\n let candidateSectionContentHeight = 0;\n let counter = 1;\n\n for (const thisSection of sectionsArray) {\n sectionTopPosition = thisSection.getBoundingClientRect().top;\n sectionBotPosition = thisSection.getBoundingClientRect().bottom;\n \n //if the section's top is below the viewport, then none of it is in view\n //and we continue to the next loop after incrementing the counter\n //if the section's top is above the viewport, then set it at zero\n //otherwise use the actual value to calculate content in view\n if (sectionTopPosition > windowHeight) {\n counter++;\n continue;\n } else {\n if (sectionTopPosition < 0) {\n sectionTopPosition = 0;\n }\n };\n //if the section's bot is above the viewport, then none of it is in view\n //and we continue to the next loop after incrementing the counter\n //if the section's bot is below the viewport, then set it at the window height\n //otherwise use the actual value to calculate content in view\n\n if (sectionBotPosition < 0) {\n counter++;\n continue;\n } else {\n if (sectionBotPosition > windowHeight) {\n sectionBotPosition = windowHeight;\n }\n };\n\n contentInViewport = sectionBotPosition - sectionTopPosition;\n if (contentInViewport > candidateSectionContentHeight) {\n candidateSection = counter;\n candidateSectionContentHeight = contentInViewport;\n }\n counter++;\n };\n return(candidateSection);\n}", "title": "" }, { "docid": "78a0ac5a69df45b0dbadbf5120bda083", "score": "0.58360505", "text": "function isActiveSection(scrollTop, sectionOffsets) {\n if (index + 1 < sectionOffsets.length) {\n return scrollTop >= sectionOffsets[index] && scrollTop < sectionOffsets[index + 1];\n } else {\n return scrollTop >= sectionOffsets[index];\n }\n }", "title": "" }, { "docid": "9dc98ae324ff956c7cd6e7927c76ab54", "score": "0.57781434", "text": "function isInViewport (section) {\n const bounding = section.getBoundingClientRect();\n return (\n bounding.top >= 0 &&\n bounding.left >= 0 &&\n bounding.bottom <= (document.documentElement.clientHeight+150) &&\n bounding.right <= (document.documentElement.clientWidth)\n );\n}", "title": "" }, { "docid": "ab6ee1b5953ce3df28a2d729d1ad6452", "score": "0.5774486", "text": "function isSectionInViewport (el) {\n var rect = el.getBoundingClientRect();\n var top = rect.top;\n var bottom = rect.bottom;\n\n //sometimes there's a 1px offset on the bottom of the screen even when the \n //section's height is the window.innerHeight one. I guess because pixels won't allow decimals.\n //using this prevents from lazyLoading the section that is not yet visible \n //(only 1 pixel offset is)\n var pixelOffset = 2;\n \n var isTopInView = top + pixelOffset < windowsHeight && top > 0;\n var isBottomInView = bottom > pixelOffset && bottom < windowsHeight;\n\n return isTopInView || isBottomInView;\n }", "title": "" }, { "docid": "0148368f64cb1bb466112cc71bd4fc3e", "score": "0.57604706", "text": "function isSectionInViewport (el) {\r\n var rect = el.getBoundingClientRect();\r\n var top = rect.top;\r\n var bottom = rect.bottom;\r\n\r\n //sometimes there's a 1px offset on the bottom of the screen even when the \r\n //section's height is the window.innerHeight one. I guess because pixels won't allow decimals.\r\n //using this prevents from lazyLoading the section that is not yet visible \r\n //(only 1 pixel offset is)\r\n var pixelOffset = 2;\r\n \r\n var isTopInView = top + pixelOffset < windowsHeight && top > 0;\r\n var isBottomInView = bottom > pixelOffset && bottom < windowsHeight;\r\n\r\n return isTopInView || isBottomInView;\r\n }", "title": "" }, { "docid": "4a89e2d2f4967d4fe2cdf7372fb2ecde", "score": "0.5753455", "text": "function isSectionInViewport(el){var rect=el.getBoundingClientRect();var top=rect.top;var bottom=rect.bottom;//sometimes there's a 1px offset on the bottom of the screen even when the \n//section's height is the window.innerHeight one. I guess because pixels won't allow decimals.\n//using this prevents from lazyLoading the section that is not yet visible \n//(only 1 pixel offset is)\nvar pixelOffset=2;var isTopInView=top+pixelOffset<windowsHeight&&top>0;var isBottomInView=bottom>pixelOffset&&bottom<windowsHeight;return isTopInView||isBottomInView;}", "title": "" }, { "docid": "f9495db6bdb8212d3d96a46ace8ea6dd", "score": "0.57490116", "text": "function findSections () {\n\t\t$('#content [data-section-id]').each(function (count, el) {\n\t\t\tvar section = new Section(el);\n\t\t\t\n\t\t\t// if exists continue\n\t\t\tif (api.sections.hasOwnProperty(section.id)) return true;\n\t\t\telse api.sections[section.id] = section;\n\t\t\t\n\t\t\t$(section).bind('destroy', function() {\n\t\t\t\tdelete api.sections[section.id];\n\t\t\t});\n\t\t});\n\t}", "title": "" }, { "docid": "ee6710fc9ff1281d3878759b4ea7f65c", "score": "0.5719254", "text": "function findMatch(thisSectionItem){\n //it is logging all of them\n\n if(thisSectionItem.StateCode === thisState.id){\n\n //get index of matches\n\n console.log('match');\n console.log('this state has ' + '' + 'sections')\n }\n\n // else {\n // console.log('blergh');\n // }\n\n //console.log(thisSectionItem.StateCode);\n\n\n\n // if(thisSectionItem.StateCode === 'MD'){\n // console.log('hey Maryland');\n // }\n\n // for(var stateCounter = 0; stateCounter < rawSectionData.SectionItems.length; stateCounter++){\n // // if(rawSectionData.SectionItems[stateCounter].StateCode === theValueToFind){\n // // console.log('match found');\n // // }\n\n // console.log(rawSectionData.SectionItems[stateCounter].StateCode);\n // }\n\n \n\n // var indexOfThisState = rawSectionData.SectionItems.StateCode.indexOf(thisState.id);\n // console.log(indexOfThisState)\n\n\n\n }", "title": "" }, { "docid": "101749b60f532c457b92c9c96203c0ec", "score": "0.5684029", "text": "function trackSection() {\n\n\t\t// exit function if we have scrolled the entire document\n\t\tif (boolScrolled) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor (var i = 0; i < numSections; i++) {\n\n\t\t\tvar thisSection = arrSectionData[i];\n\n\t\t\tif (numScrollBottomPos > thisSection.numStart) {\n\t\t\t\tclassie.add(elBody, 'active_' + thisSection.title);\n\t\t\t}\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "b1370ee7cec1bed92c4acd0895df4ddb", "score": "0.5680343", "text": "checkSection(el) {\n\n if(window.scrollY + this.browserHeight > el.offsetTop && window.scrollY < (el.offsetTop + el.offsetHeight)) {\n let scrollPercent = el.getBoundingClientRect().y / this.browserHeight * 100\n if(scrollPercent < 33 && scrollPercent > -0.1 && this.scrollDirection === 'down' || scrollPercent < 33 && this.scrollDirection === 'up' ){\n let matchingLink = el.getAttribute('data-matching-link');\n document.querySelectorAll(`.nav a:not(${matchingLink})`).forEach(link => link.classList.remove('nav--is-current'));\n document.querySelector(matchingLink).classList.add('nav--is-current');\n }else if(window.scrollY < 300){\n document.querySelectorAll('.nav a').forEach(link => link.classList.remove('nav--is-current'));\n }\n }\n }", "title": "" }, { "docid": "145d26836d2881ab7735703355172f13", "score": "0.56797445", "text": "function isHitPropsWithin(subHit,superHit){for(var propName in subHit)if(!/^(component|left|right|top|bottom)$/.test(propName)&&subHit[propName]!==superHit[propName])return!1;return!0}", "title": "" }, { "docid": "20b475f582c4a669c72a2a609db86c5c", "score": "0.5668221", "text": "touchesRange(from, to = from) {\n for (let i = 0, pos = 0; i < this.sections.length && pos <= to;) {\n let len = this.sections[i++], ins = this.sections[i++], end = pos + len;\n if (ins >= 0 && pos <= to && end >= from)\n return pos < from && end > to ? \"cover\" : true;\n pos = end;\n }\n return false;\n }", "title": "" }, { "docid": "5f63dda3c5543344237b87cfb21db49f", "score": "0.56446904", "text": "function findSection(startX, startY){\n\t//console.log(startX + \" \" + startY);\n\t//console.log(SectionList[0].X + \" \" + SectionList[0].Y + \" \" + SectionList[0].W + \" \" + SectionList[0].H + \" \" );\n\tfor(var i = SectionList.length-1; i >= 0 ; i--){\n\t\tif(SectionList[i].X < startX && SectionList[i].X + SectionList[i].W > startX\n\t\t\t&& SectionList[i].Y < startY && SectionList[i].Y + SectionList[i].H > startY){\n\t\t\treturn SectionList[i].idx;\n\t\t}\n\t\telse{\n\n\t\t}\n\t}\n\treturn -1;\n}", "title": "" }, { "docid": "a4d3980c0ea7d68d6f8fd949dd6c67fb", "score": "0.56233066", "text": "function sectionInViewPort(elm) {\n\tlet setctionPos = elm.getBoundingClientRect();\n\treturn setctionPos.top >= -200 && setctionPos.top <= 400;\n}", "title": "" }, { "docid": "54761a57cc4edf62e3fe82846470e7d1", "score": "0.56217086", "text": "function viewPort(section) {\n if(section.getBoundingClientRect().top >= -400 && section.getBoundingClientRect().top <= 220){\n return true;\n }\n}", "title": "" }, { "docid": "0adce399149c14d32a14b953d4d7edd4", "score": "0.56195825", "text": "function contains_hash(){\n var hash = document.location.hash;\n return hash && (section[0].id == hash.substr(1) ||\n section.find(hash.replace(\".\",\"\\\\.\")).length>0);\n }", "title": "" }, { "docid": "f67cf79306ada203ebaa4139f8ac4aee", "score": "0.5598216", "text": "function checkSectionView() {\nlet isInViewport = function (elem) {\n let bounding = elem.getBoundingClientRect();\n return (\n bounding.top >= 0 &&\n bounding.left >= 0 &&\n bounding.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&\n bounding.right <= (window.innerWidth || document.documentElement.clientWidth)\n );\n };\n\n for (i=1; i<sections.length+1; i++) {\n let sectionInView = document.getElementById(\"section\"+i);\n\n window.addEventListener(\"scroll\", function() {\n if (isInViewport(sectionInView)) {\n sectionInView.classList.add(\"your-active-class\");\n } else {\n sectionInView.classList.remove(\"your-active-class\");\n }\n }\n);}\n\n}", "title": "" }, { "docid": "78d8a264de72ef630bc6d62d89ed5259", "score": "0.55911237", "text": "function sectionIsInViewport(elem) {\n let bounding = elem.getBoundingClientRect();\n const siteHeaderBounding = document.querySelector('.site-header').getBoundingClientRect();\n return (\n elem.offsetTop + bounding.height - siteHeaderBounding.height >= window.scrollY\n );\n }", "title": "" }, { "docid": "3a528f434d13bf5daa017978d64a325e", "score": "0.5587435", "text": "function selectedSection (move) {\n let selectedSectionlocation = move.getBoundingClientRect();\n return (selectedSectionlocation.top >= 0 && selectedSectionlocation.top <= 400);\n}", "title": "" }, { "docid": "52b017577a8b0e2facba42c989e890ab", "score": "0.55863965", "text": "function activeSection(){\n //1. loop over all sections to determine which one is active\n sections.forEach((section)=>{\n //2. get the position of each section\n let active=sectionPosition(section); //test\n //console.log(\"x= \",x); //test\n if(active){ //active section\n\n addRemoveActiveClass(section);\n }\n })\n}", "title": "" }, { "docid": "2a93bc879999579ad5d16600338790b1", "score": "0.5577053", "text": "touchesRange(from, to = from) {\n for (let i = 0, pos = 0; i < this.sections.length && pos <= to;) {\n let len = this.sections[i++], ins = this.sections[i++], end = pos + len;\n if (ins >= 0 && pos <= to && end >= from)\n return pos < from && end > to ? \"cover\" : true;\n pos = end;\n }\n return false;\n }", "title": "" }, { "docid": "0d5299488b7be7f7d25060f81f7dd091", "score": "0.5575125", "text": "touchesRange(from, to = from) {\n for (let i = 0, pos = 0; i < this.sections.length && pos <= to; ) {\n let len = this.sections[i++],\n ins = this.sections[i++],\n end = pos + len\n if (ins >= 0 && pos <= to && end >= from)\n return pos < from && end > to ? 'cover' : true\n pos = end\n }\n return false\n }", "title": "" }, { "docid": "fad42f0ec54ce94d54f520886a214381", "score": "0.5553016", "text": "sectionFull(index){\n if(index >= this.laneLength || index < 0){\n return true;\n }\n \n let sectionMin = (this.x - (this.pixelLength / 2)) + (index * this.sectionLength);\n let sectionMax = (this.x - (this.pixelLength / 2)) + ((index + 1) * this.sectionLength);\n \n for(let i = 0; i < this.units.length; i++){\n if(this.units[i].x > sectionMin && this.units[i].x < sectionMax){\n return this.units[i];\n }\n }\n return false;\n }", "title": "" }, { "docid": "4b163918cba5de4ca9d8ec5748a693f8", "score": "0.5544493", "text": "move() {\n //Check section overlap\n const areOverlapping = this.body.map(sectionA => {\n // console.log(this.body);\n return this.body.filter(sectionB => sectionA.x === sectionB.x && sectionA.y === sectionB.y).length !== 1;\n }).reduce((boolAccum, isOverlapping) => boolAccum += isOverlapping, 0);\n if (areOverlapping === 0) {\n //Update head position:\n const nx = this.body[0].x + this.dx;\n const ny = this.body[0].y + this.dy;\n this.body.unshift({x: nx, y: ny});//Add new head\n if (!this.isNewSection) {\n this.body.pop();//Remove last segment\n }else {\n this.isNewSection = false;\n }\n }\n return areOverlapping;\n }", "title": "" }, { "docid": "d37d2b0e3f4412ef198f01cd4f94c8fc", "score": "0.5512885", "text": "function isViewed(sectionTested) {\n let place = sectionTested.getBoundingClientRect();\n // console.log(place.top);\n return (place.top >= 0)\n}", "title": "" }, { "docid": "06273a8611ca7dafc42990b6d170af4d", "score": "0.5460719", "text": "function isHitPropsWithin(subHit, superHit) {\n for (var propName in subHit) {\n if (!/^(component|left|right|top|bottom)$/.test(propName)) {\n if (subHit[propName] !== superHit[propName]) {\n return false;\n }\n }\n }\n return true;\n}", "title": "" }, { "docid": "06273a8611ca7dafc42990b6d170af4d", "score": "0.5460719", "text": "function isHitPropsWithin(subHit, superHit) {\n for (var propName in subHit) {\n if (!/^(component|left|right|top|bottom)$/.test(propName)) {\n if (subHit[propName] !== superHit[propName]) {\n return false;\n }\n }\n }\n return true;\n}", "title": "" }, { "docid": "06273a8611ca7dafc42990b6d170af4d", "score": "0.5460719", "text": "function isHitPropsWithin(subHit, superHit) {\n for (var propName in subHit) {\n if (!/^(component|left|right|top|bottom)$/.test(propName)) {\n if (subHit[propName] !== superHit[propName]) {\n return false;\n }\n }\n }\n return true;\n}", "title": "" }, { "docid": "06273a8611ca7dafc42990b6d170af4d", "score": "0.5460719", "text": "function isHitPropsWithin(subHit, superHit) {\n for (var propName in subHit) {\n if (!/^(component|left|right|top|bottom)$/.test(propName)) {\n if (subHit[propName] !== superHit[propName]) {\n return false;\n }\n }\n }\n return true;\n}", "title": "" }, { "docid": "d4438ed51bb2dc06ccbf091a68adc187", "score": "0.5433846", "text": "function checkSection() {\n if (location.hash == '#impact') {\n removeAddSection4();\n }\n if (location.hash !== \"#current-projects\") {\n removeSec5Navbar();\n }\n if (location.hash == \"#current-projects\") {\n reAddSec5Navbar();\n }\n\n}", "title": "" }, { "docid": "3910b9c16aacff0a22bb065ccbae6ccf", "score": "0.5433149", "text": "function sectionInTitle(title, section) {\n\tvar upperIndex = $.inArray(section.toUpperCase(), allSections[title]);\n\tvar lowerIndex = $.inArray(section.toLowerCase(), allSections[title]);\n\n\tif ((upperIndex == -1) && (lowerIndex == -1)) {\n\t\treturn -1\n\t} else if (upperIndex == -1) {\n\t\treturn lowerIndex\n\t} else if (lowerIndex == -1) {\n\t\treturn upperIndex\n\t} else if (upperIndex == lowerIndex) {\n\t\treturn upperIndex\n\t} else {\n\t\treturn -1\n\t}\n}", "title": "" }, { "docid": "78fcd5c2fa30944723bdf5b45dd3aa52", "score": "0.54202557", "text": "function isDestinyTheStartingSection(){var anchor=getAnchorsURL();var destinationSection=getSectionByAnchor(anchor.section);return!anchor.section||!destinationSection||typeof destinationSection!=='undefined'&&index(destinationSection)===index(startingSection);}", "title": "" }, { "docid": "90ce2fa12a580d26ffc042d17788c2d4", "score": "0.54192054", "text": "function isHitPropsWithin(subHit, superHit) {\n\tfor (var propName in subHit) {\n\t\tif (!/^(component|left|right|top|bottom)$/.test(propName)) {\n\t\t\tif (subHit[propName] !== superHit[propName]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}", "title": "" }, { "docid": "90ce2fa12a580d26ffc042d17788c2d4", "score": "0.54192054", "text": "function isHitPropsWithin(subHit, superHit) {\n\tfor (var propName in subHit) {\n\t\tif (!/^(component|left|right|top|bottom)$/.test(propName)) {\n\t\t\tif (subHit[propName] !== superHit[propName]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}", "title": "" }, { "docid": "90ce2fa12a580d26ffc042d17788c2d4", "score": "0.54192054", "text": "function isHitPropsWithin(subHit, superHit) {\n\tfor (var propName in subHit) {\n\t\tif (!/^(component|left|right|top|bottom)$/.test(propName)) {\n\t\t\tif (subHit[propName] !== superHit[propName]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}", "title": "" }, { "docid": "90ce2fa12a580d26ffc042d17788c2d4", "score": "0.54192054", "text": "function isHitPropsWithin(subHit, superHit) {\n\tfor (var propName in subHit) {\n\t\tif (!/^(component|left|right|top|bottom)$/.test(propName)) {\n\t\t\tif (subHit[propName] !== superHit[propName]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}", "title": "" }, { "docid": "90ce2fa12a580d26ffc042d17788c2d4", "score": "0.54192054", "text": "function isHitPropsWithin(subHit, superHit) {\n\tfor (var propName in subHit) {\n\t\tif (!/^(component|left|right|top|bottom)$/.test(propName)) {\n\t\t\tif (subHit[propName] !== superHit[propName]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}", "title": "" }, { "docid": "90ce2fa12a580d26ffc042d17788c2d4", "score": "0.54192054", "text": "function isHitPropsWithin(subHit, superHit) {\n\tfor (var propName in subHit) {\n\t\tif (!/^(component|left|right|top|bottom)$/.test(propName)) {\n\t\t\tif (subHit[propName] !== superHit[propName]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}", "title": "" }, { "docid": "90ce2fa12a580d26ffc042d17788c2d4", "score": "0.54192054", "text": "function isHitPropsWithin(subHit, superHit) {\n\tfor (var propName in subHit) {\n\t\tif (!/^(component|left|right|top|bottom)$/.test(propName)) {\n\t\t\tif (subHit[propName] !== superHit[propName]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}", "title": "" }, { "docid": "90ce2fa12a580d26ffc042d17788c2d4", "score": "0.54192054", "text": "function isHitPropsWithin(subHit, superHit) {\n\tfor (var propName in subHit) {\n\t\tif (!/^(component|left|right|top|bottom)$/.test(propName)) {\n\t\t\tif (subHit[propName] !== superHit[propName]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}", "title": "" }, { "docid": "90ce2fa12a580d26ffc042d17788c2d4", "score": "0.54192054", "text": "function isHitPropsWithin(subHit, superHit) {\n\tfor (var propName in subHit) {\n\t\tif (!/^(component|left|right|top|bottom)$/.test(propName)) {\n\t\t\tif (subHit[propName] !== superHit[propName]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}", "title": "" }, { "docid": "90ce2fa12a580d26ffc042d17788c2d4", "score": "0.54192054", "text": "function isHitPropsWithin(subHit, superHit) {\n\tfor (var propName in subHit) {\n\t\tif (!/^(component|left|right|top|bottom)$/.test(propName)) {\n\t\t\tif (subHit[propName] !== superHit[propName]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}", "title": "" }, { "docid": "e3c38e4a51386a9daeb263150e76d693", "score": "0.5377117", "text": "function sectionCompleted(section) {\n var jqSection = $(section);\n\n var topicCompleted = jqSection.hasClass('level2');\n\n var topicId;\n if (topicCompleted) {\n topicId = jqSection.attr('id');\n }\n else {\n topicId = $(jqSection.parents('.section.level2')).attr('id');\n }\n\n // find the topic in our topics array\n var topicIndex = -1;\n $.each(topics, function(ti, t) {\n if (t.id == topicId) {\n topicIndex = ti;\n return false;\n }\n });\n if (topicIndex == -1) {\n console.log('topic \"' + topicId + '\" not found');\n return;\n }\n\n var topic = topics[topicIndex];\n\n if (topicCompleted) { // topic completed\n topic.topicCompleted = true;\n updateTopicProgressBar(topicIndex);\n }\n else { // exercise completed\n var sectionIndex = -1;\n var sectionId = jqSection.attr('id');\n $.each(topic.sections, function(si, s ) {\n if (s.id == sectionId) {\n sectionIndex = si;\n return false;\n }\n })\n if (sectionIndex == -1) {\n console.log('completed section\"' + sectionId + '\"not found');\n return;\n }\n\n // update the UI if the section isn't already marked completed\n var section = topic.sections[sectionIndex];\n if (!section.completed) {\n topic.sectionsCompleted++;\n\n updateTopicProgressBar(topicIndex);\n\n // update the exercise\n $(section.jqElement).addClass('done');\n section.completed = true;\n\n // update visibility of topic's exercises and actions\n updateVisibilityOfTopicElements(topicIndex);\n }\n }\n }", "title": "" }, { "docid": "a7c4f01e62038a774473ca446f5b1861", "score": "0.5360612", "text": "function isMustacheKey(currentSection) {\n if (currentSection.indexOf('#') === -1 && currentSection.indexOf('^') === -1 && currentSection.indexOf('/') === -1) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "44791277a503c2f161cea9030e9c5550", "score": "0.5349404", "text": "function articleWithStartSection (article, contextThis, id) {\n wiki.getArticleAsSimpleJson(id)\n .then(function(data) {\n article = data;\n var sectionsWithContent = [];\n var sectionTitles = [];\n var sectionNum = 0;\n var futureSectionNum = 0;\n var sectionCurrentContent = [];\n var currentSection;\n for(var section in article.sections){\n var imageSrc = null;\n if(typeof article.sections[section].images[0] != \"undefined\") {\n imageSrc = article.sections[section].images[0].src;\n }\n for(var content in article.sections[section].content){\n if(content == 0) {\n \n var titleWorking = article.sections[section].title;\n if(section == 0){\n titleWorking = \"Overview\"\n }\n sectionsWithContent[sectionNum] = {\n section: section,\n title: titleWorking,\n image: imageSrc\n };\n sectionNum = futureSectionNum;\n futureSectionNum++;\n }\n if(article.sections[section].title.toLowerCase() == sectionName) {\n sectionCurrentContent.push(article.sections[section].content[content]);\n currentSection = sectionNum - 1;\n }\n }\n }\n if (typeof sectionCurrentContent[0] != \"undefined\" && typeof currentSection != \"undefined\") {\n contextThis.attributes['articleId'] = id;\n contextThis.attributes['articleSectionsWithContent'] = sectionsWithContent;\n contextThis.attributes['cardNameMain'] = article.sections[0].title;\n contextThis.attributes['cardNameSection'] = article.sections[currentSection].title;\n contextThis.attributes['articleSectionCurrent'] = currentSection;\n speechBuilder(contextThis,currentSection,sectionCurrentContent,sectionsWithContent,false);\n } else {\n var speechOutput = \"The section, \"+ sectionName +\", in the article, \" +articleName+ \", does not contain any content. \";\n var repromptSpeech = contextThis.t(\"INFO_NOT_FOUND_REPROMPT\");\n speechOutput += repromptSpeech;\n contextThis.attributes['speechOutput'] = speechOutput;\n contextThis.attributes['repromptSpeech'] = repromptSpeech;\n contextThis.emit(':ask', speechOutput, repromptSpeech);\n }\n })\n .fail(function(err) {\n var speechOutput = contextThis.t(\"INFO_NOT_FOUND_MESSAGE\");\n var repromptSpeech = contextThis.t(\"INFO_NOT_FOUND_REPROMPT\");\n if (articleName) {\n speechOutput += contextThis.t(\"INFO_NOT_FOUND_WITH_ITEM_NAME\", articleName);\n } else {\n speechOutput += contextThis.t(\"INFO_NOT_FOUND_WITHOUT_ITEM_NAME\");\n }\n speechOutput += repromptSpeech;\n contextThis.attributes['speechOutput'] = speechOutput;\n contextThis.attributes['repromptSpeech'] = repromptSpeech;\n contextThis.emit(':ask', speechOutput, repromptSpeech);\n }\n );\n}", "title": "" }, { "docid": "c1a28d7cad1e1200074b293956bdf549", "score": "0.5304466", "text": "function setActtiveSection() {\n let observer = new IntersectionObserver(\n intersectionObserverCallback,\n intersectionObserverOptions\n );\n for (section of sections) {\n observer.observe(section);\n }\n}", "title": "" }, { "docid": "ef6a76b1367a8981c68289d22a976500", "score": "0.52784306", "text": "function highlight() {\n for (let section of linkTo) {\n const coordinates = section.getBoundingClientRect();\n /** I tried keep 'links' in the for loop like you had it, but it didn't want to work for me that way,\n * so I just changed it to section and that worked. for some reason links would set every section to\n * active class. The numbers represent the width and height when comparing in the condition, these can\n * be negative values too, the documentation I linked in the email explains this better.\n * */\n if (coordinates.top <= 150 && coordinates.bottom >= 150) {\n // If the above condition is met then 'your-active-class' gets added to section in viewport\n section.classList.add(\"your-active-class\");\n } else if (section.id != linkTo.id && section.classList.contains('your-active-class')) {\n // If the above condition is met then 'your-active-class' gets removed from previous section it was on.\n section.classList.remove(\"your-active-class\");\n }\n }\n}", "title": "" }, { "docid": "f4cb36a245b0fd2653c0c13cd70f4ac1", "score": "0.527541", "text": "function userViewSection(sec) {\n let secDimensions = sec.getBoundingClientRect();\n return (secDimensions.top >= -100 && secDimensions.top <= 250);\n}", "title": "" }, { "docid": "2730781d97fd0396a249548e351b5ab4", "score": "0.52709794", "text": "function isSectionNearTop(sectionElement) {\n\n const section = sectionElement.getBoundingClientRect();\n const headerHeight = document.querySelector(\".page__header\").offsetHeight;\n\n if(section.top <= headerHeight + 50 && section.top >= 0 && section.bottom > 100) {\n const lastActive = document.querySelector('.is-active');\n const menuItemName = sectionElement.getAttribute('data-nav');\n const newActive = document.getElementById(menuItemName).children[0];\n\n if(lastActive.parentElement.id !== menuItemName) {\n lastActive.classList.remove('is-active');\n newActive.classList.add('is-active');\n }\n }\n}", "title": "" }, { "docid": "5c9775ebe9aa71d318595333fbdcc8d6", "score": "0.52704155", "text": "function ViewActiveSection()\n{\ndocument.addEventListener('scroll',isInViewport);\n}", "title": "" }, { "docid": "0a0fd21a519cdfebdae7cc26e8ea9dac", "score": "0.52398306", "text": "pollutant_first_section_hovered() {\n if (mouseX < width - 110 && mouseX > width + this.Fx - 190) {\n if (mouseY < (this.F_size + 35) + 40 && mouseY > this.F_size + 35) {\n return true;\n }\n } else return false;\n }", "title": "" }, { "docid": "0dc9e8e87bce401d07c4085618f2e1b9", "score": "0.52379143", "text": "function getActiveSection() {\n activeSection = sections[0];\n min = 10000;\n for (section of sections) {\n let position = section.getBoundingClientRect();\n if (position.top > -300 && position.top < min) {\n min = position.top;\n activeSection = section;\n };\n };\n return activeSection;\n}", "title": "" }, { "docid": "58af2b555bd90a2191e6cabd98e1c9c9", "score": "0.5215976", "text": "pollutant_the_all_section_hovered() {\n if (mouseX < width - 110 && mouseX > width + this.Fx - 190) {\n if (mouseY < (this.F_size + 275) + 40 && mouseY > this.F_size + 275) {\n return true;\n }\n } else return false;\n }", "title": "" }, { "docid": "b184be48c8c9f64f09d63cf3a11d002f", "score": "0.521329", "text": "function isDestinyTheStartingSection(){\r\n var anchors = window.location.hash.replace('#', '').split('/');\r\n var destinationSection = getSectionByAnchor(decodeURIComponent(anchors[0]));\r\n \r\n return !destinationSection.length || destinationSection.length && destinationSection.index() === startingSection.index();\r\n }", "title": "" }, { "docid": "f7956eda0b326192a4f376323f29859e", "score": "0.52063423", "text": "function findSection (elems, config) {\n if (state.jumping) return\n var scrollPos = (window.scrollY || window.pageYOffset) - config.offset\n\n // Find the farthest-down element whose y coord is lte to scrollPos\n var foundIdx = null\n for (var idx = 0; idx < elems.length && foundIdx === null; ++idx) {\n var section = elems[idx].section\n var top = section.offsetTop + config.offset\n var bottom = top + section.offsetHeight\n if (scrollPos >= (top - 1) && scrollPos < (bottom - 1)) {\n foundIdx = idx\n }\n }\n if (foundIdx === null) {\n deactivate(elems)\n return\n }\n var elem = elems[foundIdx]\n if (elem && ('#' + elem.id) !== window.location.hash) {\n activateElem(elems, foundIdx)\n }\n}", "title": "" }, { "docid": "b630cf76fccdc71588f41c3fceb6d314", "score": "0.52035743", "text": "isHit() {\n this.bSplit = true;\n\n if (this.nSize == 1) {\n return;\n }\n }", "title": "" }, { "docid": "6d9a5a216e3d211308dfc2b917e84def", "score": "0.51920044", "text": "function sect0(){\n sec0 = !sec0;\n\n if (sec0 == true){\n sec1 = false;\n sec2 = false;\n sec3 = false;\n sec4 = false;\n sec5 = false;\n sec6 = false;\n }\n\n whichSection();\n\n}", "title": "" }, { "docid": "5c5844470816395fa4f9e581ac4e5a20", "score": "0.5186936", "text": "function scroll_to_section(evt){\n //if click on A or LI \n if(evt.target.nodeName == 'A' || evt.target.nodeName == 'LI'){\n const targeted_section_text = evt.target.textContent;\n const section_number = Number(targeted_section_text.split(\" \")[1]);\n let sections = document.querySelectorAll('section');\n let targeted_section = sections[section_number - 1];\n let section_y = targeted_section.offsetTop;\n window.scrollTo({left:0,top:section_y - SECTION_FIT_OFFSET,behavior:'smooth'});\n }\n}", "title": "" }, { "docid": "97e1ebf4855673176d929436a208a4c1", "score": "0.51812285", "text": "function activeSection() {\n // Adding an event listener in the case of scrolling any where in the document\n document.addEventListener('scroll', function () {\n\n // The for each loops over the sections list\n sections.forEach(function (section) {\n const position = section.getBoundingClientRect(); // Method providing information about the size of an element and its position relative to the viewport. \n\n /*\n The condition to check if the current section is in viewport or not.\n If it's in the view port it will add a class to the class list of current section to edit it's style, \n else it will remove this class from the class list. \n */\n if ((position.top >= 0 && position.top <= 300)) {\n section.classList.add(\"your-active-class\");\n } else {\n section.classList.remove(\"your-active-class\");\n }\n })\n })\n}", "title": "" }, { "docid": "598ebfb2aa6c61d86a5a30e7f4af696e", "score": "0.5180094", "text": "function checkCurrentSection() {\n // we should not check what section is in viewport if it is automatic scroll when clicking a button\n if (buttonClicked)\n return;\n\n setNavigationVisibility(true);\n clearTimeout(hideNavigationId);\n\n const viewLine = window.scrollY + document.documentElement.clientHeight / 4;\n for (borderlines of sectionsBorderlines) {\n if (borderlines.top < viewLine && borderlines.bottom > viewLine) {\n setActiveSection(borderlines.id);\n break;\n }\n }\n\n if (window.scrollY > 0) {\n hideNavigationId = setTimeout(setNavigationVisibility, 2000, false);\n }\n}", "title": "" }, { "docid": "c0fae37796c6bf999174257da4f7dcd1", "score": "0.5169021", "text": "function tSearch(hSlice) {\n var n = hSlice.length;\n do {\n if(hSlice[n] == needle) return true;\n } while(--n);\n\n return false;\n\t}", "title": "" }, { "docid": "fa0251907a6a05f47e059da3e5ec122e", "score": "0.5168828", "text": "function isInViewport()\n{\n for(section of sectionsIds)\n {\n observer.observe(section);\n }\n}", "title": "" }, { "docid": "5ed6291b59b7986e902f2c23fb739ee3", "score": "0.51499903", "text": "function _sectionWithinViewPort(element) {\n var viewportHeight = (window.innerHeight || document.documentElement.clientHeight);\n var rect = element.getBoundingClientRect();\n return (rect.bottom > 0 && rect.top - viewportHeight < 0);\n }", "title": "" }, { "docid": "9469981513dc92b20cad151cdbf0f550", "score": "0.5145441", "text": "contains(pt) {\n return this.parts.slice(1).some(me => me.x === pt.x && me.y === pt.y);\n }", "title": "" }, { "docid": "b2647595fb5925025fa567861025e7a6", "score": "0.51419395", "text": "getFirstSection(song = state.loadedSong) {\n if (!player.songHadAnySections(song))\n return false;\n if (Array.isArray(song.composition) && song.composition[0] && song.sections[song.composition[0]])\n return song.sections[song.composition[0]];\n return song.sections[Object.keys(song.sections)[0]];\n }", "title": "" }, { "docid": "15ee183a41c522dc2b4c109b27c7cd0c", "score": "0.51318854", "text": "function activateVisibleSection() {\n // Find distances from the top of the sections to the top of the viewport\n let offsetDifferences = [];\n\n for (sectionNode of sectionNodes) {\n if (sectionNode.classList.contains('active')) {\n sectionNode.classList.remove('active');\n }\n\n offsetDifferences.push(Math.abs(sectionNode.offsetTop - window.pageYOffset));\n }\n\n const min = Math.min(...offsetDifferences);\n\n // Find a section with a lowest distance and set it as active\n for (sectionNode of sectionNodes) {\n if (min === Math.abs(sectionNode.offsetTop - window.pageYOffset)) {\n setActiveSection(sectionNode);\n }\n }\n}", "title": "" }, { "docid": "1b16f53cb3be03b7b45f7bca9e91a616", "score": "0.513141", "text": "function scrolling(type){if(!isScrollAllowed.m[type]){return;}var scrollSection=type==='down'?moveSectionDown:moveSectionUp;if(options.scrollOverflow){var scrollable=options.scrollOverflowHandler.scrollable($(SECTION_ACTIVE_SEL)[0]);var check=type==='down'?'bottom':'top';if(scrollable!=null){//is the scrollbar at the start/end of the scroll?\nif(options.scrollOverflowHandler.isScrolled(check,scrollable)){scrollSection();}else{return true;}}else{// moved up/down\nscrollSection();}}else{// moved up/down\nscrollSection();}}", "title": "" }, { "docid": "ac4072d865fb2cb2b0e656fb7dbed356", "score": "0.5124682", "text": "function highlightMenuBySection() {\n const sections = document.querySelectorAll('section');\n let navHeight = document.getElementById('navbar').offsetHeight;\n let headerHeight = document.querySelector('header').offsetHeight;\n let currentPos = window.scrollY;\n\n sections.forEach(section => {\n let top = section.offsetTop - navHeight;\n let bottom = top + section.offsetHeight;\n let href = `#${section.getAttribute('id')}`;\n\n if (currentPos >= top && currentPos <= bottom) {\n menuItems.forEach(item => {\n let itemHref = item.getAttribute('href');\n itemHref === href\n ? item.classList.add('active')\n : item.classList.remove('active');\n });\n } else if (currentPos < headerHeight - navHeight) {\n menuItems.forEach(item => item.classList.remove('active'));\n }\n });\n }", "title": "" }, { "docid": "deb987d319539a7339df294a47180c61", "score": "0.5119326", "text": "function segmentHit(ax, ay, bx, by, cx, cy, dx, dy) {\n return orient2D(ax, ay, bx, by, cx, cy) *\n orient2D(ax, ay, bx, by, dx, dy) <= 0 &&\n orient2D(cx, cy, dx, dy, ax, ay) *\n orient2D(cx, cy, dx, dy, bx, by) <= 0;\n}", "title": "" }, { "docid": "889c8f819118f6688f58b6173f9f9fa7", "score": "0.5105014", "text": "function hasPart(c, p) {\n for (var i = 0; i < c.body.length; i++) {\n if (c.body[i].type === p) {\n return true;\n }\n }\n return false;\n}", "title": "" }, { "docid": "4aa8f445374f843523ff4222149212e8", "score": "0.51003426", "text": "function isDestinyTheStartingSection(){\n var anchor = getAnchorsURL();\n var destinationSection = getSectionByAnchor(anchor.section);\n return !anchor.section || !destinationSection || typeof destinationSection !=='undefined' && index(destinationSection) === index(startingSection);\n }", "title": "" }, { "docid": "b4c4c1d9f54341a1185e75d648e55189", "score": "0.50903857", "text": "function scrolling(){\n\n var postion = document.documentElement.scrollTop;\n // console.log(Sections.length);\n Sections.forEach(S => {\n\n if (postion >= S.offsetTop - S.offsetHeight+200) {\n if (postion < S.offsetTop + S.offsetHeight) {\n\n console.log(S.offsetTop);\n var CID = S.attributes.id.value;\n removeActive();\n activeNavigation(CID);\n }\n }\n })\n}", "title": "" }, { "docid": "3466cf4857871f2f2bd3b6d0d4cfdc98", "score": "0.5080459", "text": "function isIntersection([x, y], map) {\n if (x == 0 || y == 0 || x == map[0].length - 1 || y == map.length - 1) {\n return false;\n }\n if (\n map[y + 1][x] == \"#\" &&\n map[y - 1][x] == \"#\" &&\n map[y][x + 1] == \"#\" &&\n map[y][x - 1] == \"#\"\n ) {\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "d8ad6504d551c127721a8981fb76349d", "score": "0.5079684", "text": "function isDestinyTheStartingSection(){\r\n var anchor = getAnchorsURL();\r\n var destinationSection = getSectionByAnchor(anchor.section);\r\n return !anchor.section || !destinationSection || typeof destinationSection !=='undefined' && index(destinationSection) === index(startingSection);\r\n }", "title": "" }, { "docid": "fbc9ea55f871c07135a1d0a92112f5d1", "score": "0.5077019", "text": "function highlightPanelSection(sectionId) {\n//alert('Highlighting section id='+sectionId);\n\tif(highlightedPanelSectionElt) {\n\t// Un-highlight the currently highlighted element, before doing this one\n\t\thighlightedPanelSectionElt.style.border = \"none\";\n\t\n\t// Also re-hide its container section if it had to be un-hidden before\n\t\tif(highlightedPanelSectionWasHidden) {\n\t\t\tvisibility(highlightedPanelSectionElt.parentNode.parentNode.id, 'hide');\n\t\t}\n\t}\n\tvar elt2highlight = document.getElementById(sectionId); // actual section to highlight\n// If grandparent filtergroup or attributegroup section is currently hidden, unhide it\n\tvar grandparent_node = elt2highlight.parentNode.parentNode;\n\thighlightedPanelSectionWasHidden = false;\n//alert('grandparent node of elt2highlight '+sectionId+' is '+grandparent_node.id+', display state='+grandparent_node.style.display+',class='+grandparent_node.className);\n\tif(grandparent_node.style.display == \"none\") {\n\t//alert('Grandparent node '+grandparent_node.id+' of '+elt2highlight.id+' is hidden, gotta unhide it via visibility()');\n\t\tvisibility(grandparent_node.id, 'show');\n\t\thighlightedPanelSectionWasHidden = true;\n\t}\n\n\telt2highlight.style.border = \"2px yellow solid\";\n//alert('Highlighting section w/ id='+elt2highlight.id+',style='+elt2highlight.style+',className='+elt2highlight.className+', bgcolor='+elt2highlight.style.backgroundColor);\n\thighlightedPanelSectionElt = elt2highlight;\n\n// NOTE TO SELF: is it possible to scroll the browser window so section is visible?\n\n\treturn true;\n}", "title": "" }, { "docid": "60e2658ad4c1b1e45c82cd4a72267f12", "score": "0.506658", "text": "function sectionHighlight() {\n\tswitch (currentSection) {\n\t\tcase 'home': \n\t\t\tpageMenuItem(1);\n\t\t\tbreak;\n\t\tcase 'course':\n\t\t\tpageMenuItem(2);\n\t\t\tbreak;\n\t\tcase 'words':\n\t\t\tpageMenuItem(3);\n\t\t\tbreak;\n\t\tcase 'phonetic':\n\t\t\tpageMenuItem(4);\n\t\t\tbreak;\n\t\tcase 'reading':\n\t\t\tpageMenuItem(5);\n\t\t\tbreak;\n\t\tcase 'contact':\n\t\t\tpageMenuItem(6);\n\t\t\tbreak;\n\t\tcase 'login':\n\t\t\tpageMenuItem(7);\n\t\t\tbreak;\n\t\tcase 'grammar':\n\t\t\tpageMenuItem(8);\n\t\t\tbreak;\t\n\t\tcase 'kids':\n\t\t\tpageMenuItem(9);\n\t\t\tbreak;\n\t\tcase 'texts':\n\t\t\tpageMenuItem(10);\n\t\t\tbreak;\n\t\tcase 'translation':\n\t\t\tpageMenuItem(11);\n\t\t\tbreak;\n\t\tcase 'phrasebook':\n\t\t\tpageMenuItem(12);\n\t\t\tbreak;\n\t\tdefault: \n\t\t \t$(\"#menu_body .me-nu-item a\").css({color: \"#183A87\"});\n\t}\n}", "title": "" }, { "docid": "f02713528652dd01203f838bc125cefe", "score": "0.50627637", "text": "add(section) {\n if (typeof section === 'undefined') {\n let section = new PdfSection(this.pdfDocument);\n this.add(section);\n return section;\n }\n else {\n // if (section === null) {\n // throw new Error('ArgumentNullException : section');\n // }\n let r = this.checkSection(section);\n this.sections.push(section);\n section.parent = this;\n this.sectionCollection.add(r);\n return this.sections.indexOf(section);\n }\n }", "title": "" }, { "docid": "af53fa8dace12212ea619993610071d0", "score": "0.5057125", "text": "function canOccupySlice(decorations,start,end){for(var ii=start;ii<end;ii++)if(null!=decorations[ii])return!1;return!0;}", "title": "" }, { "docid": "2148ae052cfb5fa5694ec631bacfccf2", "score": "0.5042505", "text": "intersects(rows, piece, y, x) {\r\n for (let i = 0; i < 4; i++)\r\n for (let j = 0; j < 4; j++)\r\n if (piece[i][j]) {\r\n if (y + i >= 20 || x + j < 0 || x + j >= 10 || this.state.fields[y + i][x + j]) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "title": "" }, { "docid": "8b53be75ff1466d27354ea161820e513", "score": "0.5020854", "text": "function _sectionCollection(sc, parentTab) {\n var sections = {};\n var length = sc.length;\n for (var i = 0; i < sc.length; i++) {\n sections[sc[i].Name] = new _section(sc[i], parentTab);\n }\n this.forEach = function (delegate_function) {\n /// <summary>\n /// Applies the action contained within a delegate function.\n /// </summary>\n /// <param name=\"delegate_function\" type=\"Function\" mayBeNull=\"false\" optional=\"false\" >\n /// The delegate_function must include parameters for section and index. i.e : MyFunction(section,index).\n /// </param>\n var i = 0;\n for (var sec in sections) {\n delegate_function(sections[sec], i);\n i++;\n }\n };\n this.get = function (argument) {\n /// <summary>\n /// Returns one or more tabs depending on the arguments passed.\n /// </summary>\n /// <param name=\"argument\" mayBeNull=\"true\" optional=\"true\" >\n /// <para>1: None: Returns an array of all the attributes.</para>\n /// <para>2: String: Returns the attribute where the argument matches the name.</para>\n /// <para>3: Number: Returns the attribute where the argument matches the index.</para>\n /// <para>4: Function: Returns any attributes that cause the delegate function to return true.</para>\n /// </param>\n var argType = typeof argument;\n\n if (argument == null) {\n var allSections = [];\n for (var sec in sections) {\n allSections.push(sections[sec]);\n }\n return allSections;\n }\n\n switch (argType) {\n case \"number\":\n var i = 0;\n for (var sec in sections) {\n if (i == argument) {\n return sections[sec];\n }\n i++\n }\n return null;\n break;\n case \"string\":\n return sections[argument];\n break;\n case \"function\":\n var returnSections = [];\n var i = 0;\n for (var sec in sections) {\n if (argument(sections[sec], i)) {\n returnSections.push(sections[sec]);\n }\n i++;\n }\n return returnSections;\n break;\n }\n\n };\n this.getLength = function () {\n /// <summary>\n /// Returns the number of items in the collection.\n /// </summary>\n /// <returns type=\"Number\" />\n return length;\n };\n\n}", "title": "" }, { "docid": "1b8bfbc6d35c70860c3f5d57689dc9a9", "score": "0.50006384", "text": "function highlightCurrentSection() {\n resetElements();\n\n let halfScreenWidth = screen.width / 2\n let offset = window.pageXOffset + halfScreenWidth\n\n if(window.pageXOffset >= activityOffset && offset < timeOffset){\n document.getElementById(\"activity-dot\").style.backgroundColor = \"#484848\"\n document.getElementById(\"sticky-nav-activity-label\").style.visibility = \"visible\"\n }else{\n if(offset >= timeOffset && offset < moodOffset){\n document.getElementById(\"time-dot\").style.backgroundColor = \"#484848\"\n document.getElementById(\"sticky-nav-time-label\").style.visibility = \"visible\"\n }else{\n if(offset >= moodOffset && offset < attitudeOffset){\n document.getElementById(\"mood-dot\").style.backgroundColor = \"#484848\"\n document.getElementById(\"sticky-nav-mood-label\").style.visibility = \"visible\"\n }else{\n if(offset >= attitudeOffset && window.pageXOffset < ending_note_right_lineOffset){\n document.getElementById(\"attitude-dot\").style.backgroundColor = \"#484848\"\n document.getElementById(\"sticky-nav-attitude-label\").style.visibility = \"visible\"\n }\n }\n }\n }\n}", "title": "" }, { "docid": "787a5e95577951bb46673d7486f7f1ca", "score": "0.49979421", "text": "function hitTestAll(rect)\n{\n for(var i = 0; i < rects.length; i++)\n {\n if( hitTest(rect, rects[i]) )\n {\n return true;\n }\n }\n\n return false;\n}", "title": "" }, { "docid": "2ae42a1384ed97077cd2eedbab7e85d3", "score": "0.4986253", "text": "function isDestinyTheStartingSection(){\n var destinationSection = getSectionByAnchor(getAnchorsURL().section);\n return !destinationSection || typeof destinationSection !=='undefined' && index(destinationSection) === index(startingSection);\n }", "title": "" }, { "docid": "1bffd0aab3cefe7b3fcae141e0ecc4e6", "score": "0.49861932", "text": "function activeSection () {\n for (const section of sections) {\n const sectionPos = section.getBoundingClientRect();\n\n if (sectionPos.top <= 150 && sectionPos.bottom >= 150) {\n section.classList.add('your-active-class');\n } else {\n \n section.classList.remove('your-active-class');\n }\n }\n}", "title": "" }, { "docid": "04141b3df3d4a6ed81eb0c67685cb007", "score": "0.49848974", "text": "pollutant_sixth_section_hovered() {\n if (mouseX < width - 110 && mouseX > width + this.Fx - 190) {\n if (mouseY < (this.F_size + 235) + 40 && mouseY > this.F_size + 235) {\n return true;\n }\n } else return false;\n }", "title": "" }, { "docid": "0a06ea768d0bcfca1deb8923c566e944", "score": "0.49812368", "text": "function goToSection(e, direction) {\n //get hash from current view (assumes it replects current view)\n hash = window.location.hash;\n\n if (hash == null) {\n hash = '#section1';\n }\n\n console.log('hash:', hash);\n // determine list of sectionHashes list\n hashListLength = sectionHashes.length;\n console.log('List length:', hashListLength);\n //get the integer location of current hash in list\n hashLocation = returnHashLocation(hash);\n console.log('Hash location:', hashLocation);\n\n //if scroll direction is *up*\n if ((direction === 'up') && (hashLocation !== 0)) {\n //move up on section if not already at top (otherwise do nothing)\n hashLocation = hashLocation - 1;\n console.log('New hash location (upscroll)', hashLocation);\n hash = sectionHashes[hashLocation];\n console.log('New hash:', hash);\n //if scroll direction is *down*\n } else if ((direction === 'down') && (hashLocation < (hashListLength - 1))) {\n //move down a section if not already at bottom\n hashLocation = hashLocation + 1;\n console.log('New hash location (downscroll)', hashLocation);\n hash = sectionHashes[hashLocation];\n console.log('New hash:', hash);\n // else if hash location is first or last item in list do nothing\n } else {\n console.log('do nothing!');\n } // smooth-scroll to the appropriate section\n console.log('-----------------------------');\n e.preventDefault();\n $('html, body').animate({\n scrollTop: $(hash).offset().top\n }, 800, function(){\n \n // Add hash (#) to URL when done scrolling (default click behavior)\n window.location.hash = hash;\n });\n\n}", "title": "" }, { "docid": "98e7b627ac066eace87874f136f4615f", "score": "0.49809152", "text": "handleIntersectionCallback(entries){for(let entry of entries){if((+entry.intersectionRatio).toFixed(2)>=this.visibleLimit){// now we care\nif(this.itemId){let item=_haxcmsSiteStore.store.findItem(this.itemId);this._a=item.location.replace(\"pages/\",\"\").replace(\"/index.html\",\"\");this.isVisible=!0;setTimeout(()=>{this.$.a.click()},25)}}}}", "title": "" }, { "docid": "991739b8a1c8e0f9ecba8afd242a9bb0", "score": "0.4980389", "text": "function setupSections() {\n for (i = 0; i < points.length; i += 1) {\n for (j = 0; j < points.length; j += 1) {\n var func = function (j, i) {\n var map = document.getElementsByClassName('map')[i]\n console.log(map)\n var scene = new ScrollMagic.Scene({\n triggerElement: map,\n duration: 2 * size.height * .80,\n offset: 200 + (30 * (j + 1))\n })\n .addTo(controller)\n //.addIndicators()\n .on(\"enter\", function (e) {\n console.log(i === j, i, j)\n markers[i + '' + j] = addPointToMap(points[j], i !== j ? './src/images/PinImage.png' : undefined)\n })\n .on(\"leave\", function (e) {\n markers[i + '' + j].setMap(null)\n })\n }(j, i)\n }\n var func = function (i) {\n console.log(document.getElementsByClassName('listingCellNoOverlay'))\n var section = document.getElementsByClassName('listingCellNoOverlay')[i]\n var sectionStats = document.getElementsByClassName('listingCellOverlay')[i]\n var scene = new ScrollMagic.Scene({\n triggerElement: section,\n duration: size.height,\n offset: size.height / 2\n })\n .setPin(section)\n .addTo(controller)\n .on(\"start\", function (e) {\n console.log('start', i, section)\n section.style.backgroundImage = 'url(' + points[i].listingImages + ')'\n sectionStats.style.backgroundImage = 'url(' + points[i].listingStats + ')'\n })\n .on(\"end\", function (e) {\n console.log('end', i, section)\n section.style.backgroundImage = 'url(' + points[i].listingStats + ')'\n sectionStats.style.backgroundImage = 'none'\n })\n var sectionMap = document.getElementsByClassName('map')[i]\n var scene2 = new ScrollMagic.Scene({\n triggerElement: sectionMap,\n duration: size.height * 1 + 47,\n offset: size.height * .50 - 45\n })\n .setPin(sectionMap)\n .addTo(controller)\n }(i)\n }\n}", "title": "" } ]
0635fce77cc91aff7317fb66bd66538a
Remote command handler for Content beans.
[ { "docid": "ca090610116f8f6b5dfc80bf62ce4571", "score": "0.5582341", "text": "function handleContentRemotely$static(content/*:RemoteBean*/)/*:Boolean*/ {\n var contentToOpen/*:Content*/ =AS3.as( content, com.coremedia.cap.content.Content);\n if (contentToOpen) {\n contentToOpen.load(function ()/*:void*/ {\n if (contentToOpen.isDestroyed()) {\n com.coremedia.cms.editor.sdk.util.MessageBoxUtil.showError(mx.resources.ResourceManager.getInstance().getString('com.coremedia.cms.editor.Editor', 'RemoteControl_openContent_error_title'), mx.resources.ResourceManager.getInstance().getString('com.coremedia.cms.editor.Editor', 'RemoteControl_openContent_error_item_not_exists'));\n } else if (contentToOpen.isFolder()) {\n com.coremedia.cms.editor.sdk.util.MessageBoxUtil.showError(mx.resources.ResourceManager.getInstance().getString('com.coremedia.cms.editor.Editor', 'RemoteControl_openContent_error_title'), mx.resources.ResourceManager.getInstance().getString('com.coremedia.cms.editor.Editor', 'RemoteControl_openContent_error_document_is_folder'));\n } else if (!content.getState().readable) {\n com.coremedia.cms.editor.sdk.util.MessageBoxUtil.showError(mx.resources.ResourceManager.getInstance().getString('com.coremedia.cms.editor.Editor', 'RemoteControl_openContent_error_title'), mx.resources.ResourceManager.getInstance().getString('com.coremedia.cms.editor.Editor', 'RemoteControl_openContent_error_document_is_not_readable'));\n } else if (contentToOpen.isDeleted()) {\n com.coremedia.cms.editor.sdk.util.MessageBoxUtil.showError(mx.resources.ResourceManager.getInstance().getString('com.coremedia.cms.editor.Editor', 'RemoteControl_openContent_error_title'), mx.resources.ResourceManager.getInstance().getString('com.coremedia.cms.editor.Editor', 'RemoteControl_openContent_error_document_deleted'));\n } else {\n com.coremedia.cms.editor.sdk.editorContext.getContentTabManager().openDocument(contentToOpen);\n }\n });\n return true;\n }\n return false;\n }", "title": "" } ]
[ { "docid": "af2eb3050f5a50868dc65eb025410394", "score": "0.54254276", "text": "function handleCommand() {}", "title": "" }, { "docid": "d370eec3cad28a8daee8bca4f6c58b9d", "score": "0.5155912", "text": "[$onCommand](e) {\n const { type } = e.detail;\n\n switch (type) {\n case 'update-property':\n const { uuid, property, value, dataType } = e.detail;\n this.content.updateProperty(uuid, property, value, dataType);\n break;\n }\n }", "title": "" }, { "docid": "ea7867966dad9732ad15e2bcf334f75b", "score": "0.50141686", "text": "function contentManagement() {\r\n\r\n var thisObj = this;\r\n\r\n thisObj.getRelatedContent = function (itemPath, contentLabel, defaultContentLabel, contentHandler, referer, contentContainer, isAddToContainerEnabled) {\r\n\r\n var relatedContent,\r\n contentRequest = function (itemPath, contentLabel, isFallBackContentRequestEnabled, defaultRequest) {\r\n this.ItemPath = itemPath;\r\n this.ContentLabel = contentLabel;\r\n this.IsFallBackContentRequestEnabled = isFallBackContentRequestEnabled;\r\n this.FallBackContentRequest = defaultRequest;\r\n },\r\n defaultRelatedContentRequest = new contentRequest(itemPath, defaultContentLabel, false),\r\n relatedContentRequest = new contentRequest(itemPath, contentLabel, (typeof (defaultContentLabel) !== 'undefined'), defaultRelatedContentRequest);\r\n\r\n jQuery.ajax({\r\n type: \"POST\",\r\n url: \"/services/ACMContent.asmx/GetPageRelatedContent\",\r\n data: \"{'RelatedContentRequest':\" + JSON.stringify(relatedContentRequest) + \"}\",\r\n contentType: \"application/json; charset=utf-8\",\r\n dataType: \"json\",\r\n success: function (msg) {\r\n contentHandler(msg.d, referer, contentContainer, isAddToContainerEnabled);\r\n }\r\n });\r\n }\r\n}", "title": "" }, { "docid": "eac477d0ec5d6b687ba64dc7d9b02135", "score": "0.4967339", "text": "async function _commandHandler(msg, label, args, jerry) {\n if (label === \"help\" && args.length === 0) {\n return await generalHelp(msg, jerry);\n }\n if (label === \"help\" && args.length !== 0) {\n const command = findCommand(args[0], jerry);\n if (!command) {\n return;\n }\n return await commandHelp(msg, command);\n }\n const command = findCommand(label, jerry);\n if (!command) {\n return \"no command\";\n }\n if (command.commandType === \"dev\") {\n if (!checkDev(msg.member)) {\n return \"unauthorized: dev\";\n }\n }\n if (command.requiredUsers.length !== 0) {\n if (!checkRequiredUsers(msg.member, command)) {\n return \"unauthorized: not a required user\";\n }\n }\n if (!(msg.channel.type === 5 || msg.channel.type === 0)) {\n return;\n }\n const ctx = {\n msg: msg,\n channel: msg.channel,\n guild: msg.channel.guild,\n member: msg.member,\n user: msg.author,\n content: msg.content,\n args: args,\n dev: false\n };\n //@ts-ignore\n await command.execute(jerry, ctx, false).catch((err) => {\n jerry.logger.error(\"Jerry Error\", ` command error from message ${msg.content}`);\n });\n //signale.error(`[Hyperion] command error on guild ${msg.channel.guild.id} from message ${msg.content}`);\n //signale.error(err);\n}", "title": "" }, { "docid": "71be6279ce0b8c804f5dd4d45507ee07", "score": "0.4927979", "text": "function SelectObjectContentCommand(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 }", "title": "" }, { "docid": "c148e263f5f9b848326161a2a8b0fc0f", "score": "0.4862387", "text": "_handleContents(contents) {\n // Update our internal data.\n this._model = {\n name: contents.name,\n path: contents.path,\n type: contents.type,\n content: undefined,\n writable: contents.writable,\n created: contents.created,\n last_modified: contents.last_modified,\n mimetype: contents.mimetype,\n format: contents.format\n };\n this._items = contents.content;\n this._paths.clear();\n contents.content.forEach((model) => {\n this._paths.add(model.path);\n });\n }", "title": "" }, { "docid": "79dede9eb56a7c670224bdcb118dcaf1", "score": "0.4834392", "text": "function interpret_command(content) {\n UDGE.onInterpretCommand(content);\n}", "title": "" }, { "docid": "8f5cb7ae94f9159f4a9991e20380f734", "score": "0.48104867", "text": "function PostContentCommand(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 }", "title": "" }, { "docid": "8502c304176f66b20775be8e283223e7", "score": "0.47855633", "text": "function contentComm(aContentWindow, aPort1, aPort2, onHandshakeComplete) {\n\t// onHandshakeComplete is triggered when handshake is complete\n\t// when a new contentWindow creates a contentComm on contentWindow side, it requests whatever it needs on init, so i dont offer a onBeforeInit. I do offer a onHandshakeComplete which is similar to onAfterInit, but not exactly the same\n\t// no unregister for this really, as no listeners setup, to unregister you just need to GC everything, so just break all references to it\n\n\tvar handshakeComplete = false; // indicates this.postMessage will now work i think. it might work even before though as the messages might be saved till a listener is setup? i dont know i should ask\n\tvar scope = gBootstrap;\n\n\tthis.CallbackTransferReturn = function(aArg, aTransfers) {\n\t\t// aTransfers should be an array\n\t\tthis.arg = aArg;\n\t\tthis.xfer = aTransfers;\n\t};\n\n\tthis.listener = function(e) {\n\t\tvar payload = e.data;\n\t\tconsole.log('bootstrap contentComm - incoming, payload:', payload); //, 'e:', e);\n\n\t\tif (payload.method) {\n\t\t\tif (payload.method == 'contentComm_handshake_finalized') {\n\t\t\t\thandshakeComplete = false;\n\t\t\t\tif (onHandshakeComplete) {\n\t\t\t\t\tonHandshakeComplete(this);\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!(payload.method in scope)) { console.error('method of \"' + payload.method + '\" not in scope'); throw new Error('method of \"' + payload.method + '\" not in scope') } // dev line remove on prod\n\t\t\tvar rez_bs_call_for_win = scope[payload.method](payload.arg, this);\n\t\t\tconsole.log('rez_bs_call_for_win:', rez_bs_call_for_win);\n\t\t\tif (payload.cbid) {\n\t\t\t\tif (rez_bs_call_for_win && rez_bs_call_for_win.constructor.name == 'Promise') {\n\t\t\t\t\trez_bs_call_for_win.then(\n\t\t\t\t\t\tfunction(aVal) {\n\t\t\t\t\t\t\tconsole.log('Fullfilled - rez_bs_call_for_win - ', aVal);\n\t\t\t\t\t\t\tthis.postMessage(payload.cbid, aVal);\n\t\t\t\t\t\t}.bind(this),\n\t\t\t\t\t\tgenericReject.bind(null, 'rez_bs_call_for_win', 0)\n\t\t\t\t\t).catch(genericCatch.bind(null, 'rez_bs_call_for_win', 0));\n\t\t\t\t} else {\n\t\t\t\t\tconsole.log('calling postMessage for callback with rez_bs_call_for_win:', rez_bs_call_for_win, 'this:', this);\n\t\t\t\t\tthis.postMessage(payload.cbid, rez_bs_call_for_win);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (!payload.method && payload.cbid) {\n\t\t\t// its a cbid\n\t\t\tthis.callbackReceptacle[payload.cbid](payload.arg, this);\n\t\t\tdelete this.callbackReceptacle[payload.cbid];\n\t\t} else {\n\t\t\tthrow new Error('invalid combination');\n\t\t}\n\t}.bind(this);\n\n\tthis.nextcbid = 1; //next callback id\n\n\tthis.postMessage = function(aMethod, aArg, aTransfers, aCallback) {\n\n\t\t// aMethod is a string - the method to call in framescript\n\t\t// aCallback is a function - optional - it will be triggered when aMethod is done calling\n\t\tif (aArg && aArg.constructor == this.CallbackTransferReturn) {\n\t\t\t// aTransfers is undefined\n\t\t\t// i needed to create CallbackTransferReturn so that callbacks can transfer data back\n\t\t\taTransfers = aArg.xfer;\n\t\t\taArg = aArg.arg;\n\t\t}\n\t\tvar cbid = null;\n\t\tif (typeof(aMethod) == 'number') {\n\t\t\t// this is a response to a callack waiting in framescript\n\t\t\tcbid = aMethod;\n\t\t\taMethod = null;\n\t\t} else {\n\t\t\tif (aCallback) {\n\t\t\t\tcbid = this.nextcbid++;\n\t\t\t\tthis.callbackReceptacle[cbid] = aCallback;\n\t\t\t}\n\t\t}\n\n\t\t// return;\n\t\taPort1.postMessage({\n\t\t\tmethod: aMethod,\n\t\t\targ: aArg,\n\t\t\tcbid\n\t\t}, aTransfers ? aTransfers : undefined);\n\t}\n\n\taPort1.onmessage = this.listener;\n\tthis.callbackReceptacle = {};\n\n\taContentWindow.postMessage({\n\t\ttopic: 'contentComm_handshake',\n\t\tport2: aPort2\n\t}, '*', [aPort2]);\n\n}", "title": "" }, { "docid": "11df711cc0b17f873705573cb807b17b", "score": "0.47491726", "text": "function proxyToContent(method) {\n return function () {\n var content = get(this, 'content');\n return content[method].apply(content, arguments);\n };\n }", "title": "" }, { "docid": "a18ce6365dae5ddb100a1fe7f44a675d", "score": "0.47413525", "text": "onContentAdd(changes, cb) {\n // Allow ack for the content-add to be sent.\n cb();\n this.send(JingleAction.ContentReject, {\n reason: {\n condition: JingleReasonCondition.FailedApplication,\n text: 'content-add is not supported'\n }\n });\n }", "title": "" }, { "docid": "117ca0f896297523294effb0667000a2", "score": "0.47312784", "text": "function _onIncomingMessage( data, sender, callback )\n\t{\n\t\t\n\t\tif( !data ) throw new Error( 'no data received for content message' )\n\t\t\n\t\tvar name = data.a\n\t\t\n\t\t/*\n\t\tif( !name )\n\t\t{\n\t\t\t\n\t\t\tthrow new Error( 'no name received for content message' )\n\t\t\t\n\t\t}\n\t\t*/\n\t\t\n\t\tvar args\t= data.b || null\n\t\tvar value \t= null\n\t\tvar method \t= null\n\t\t\n\t\t//f.log( 'received message \"' + name + '\"', args )\n\t\t\n\t\tif( name == 'app' ) \n\t\t{\n\t\t\t\n\t\t\tvar list \t= {}\n\t\t\tvar obj \t= {}\n\t\t\t\n\t\t\tfor( var i in app )\n\t\t\t{\n\t\t\t\t\n\t\t\t\tif( !/^_/.test( i ) )\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tif( typeof( app[ i ] ) == 'function' )\n\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\tlist[ i ] = i\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\t\n\t\t\t\t\t\tobj[ i ] = f.copy( app[ i ] )\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tobj._ = list\n\t\n\t\t\tmethod = function()\n\t\t\t{ \n\t\t\t\n\t\t\t\treturn obj\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\telse if( name == 'option_check' )\n\t\t{\n\t\t\t\n\t\t\tmethod = function()\n\t\t\t{\n\t\t\t\t\t\t\t\t\n\t\t\t\treturn _contentUpdateTime\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse if( name == 'show_icon' )\n\t\t{\n\t\t\t\n\t\t\t// save this for later\n\t\t\t_activeTabs[ sender.tab.id ] = true\n\t\t\t\n\t\t\tmethod = function()\n\t\t\t{\n\t\t\t\t\n\t\t\t\tchrome.pageAction.show( sender.tab.id )\n\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse if( name == 'check_popup' )\n\t\t{\n\t\t\tmethod = function()\n\t\t\t{ \n\t\t\t\n\t\t\t\treturn app.popup\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\telse if( name == 'set_popup' )\n\t\t{\n\t\t\t_set( app.library.key.POPUP, f.now() )\n\t\t\tapp.popup = ( _get( app.library.key.POPUP ) * 1 ) || 0\n\n\t\t\tf.log(\"POPPI POPUP\")\n\n\t\t\tmethod = function()\n\t\t\t{ \n\t\t\t\n\t\t\t\treturn null\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\tmethod = app[ name ]\n\t\t\t\n\t\t}\n\t\t\n\t\t/*\n\t\tif( method == undefined ) \n\t\t{\n\t\t\t\n\t\t\tthrow new Error( 'method \"' + name + '\" not found' )\n\t\t\n\t\t}\n\t\t*/\n\t\t\n\t\tif( name && method != undefined)\n\t\t{\n\t\t\tvalue = method.apply( app, args )\n\t\t}\n\t\t\n\t\t//f.log( 'content script sent message \"' + name + '\"', args, value )\n\t\n\t\t// execute a callback with the value if needed\n\t\tif( callback )\n\t\t{\n\t\t\n\t\t\tcallback( value )\n\t\t\t\n\t\t}\n\t\t\n\t\treturn false\n\t\t\n\t}", "title": "" }, { "docid": "8a2a6f4d5a716516cd27ec96c6913d50", "score": "0.4717717", "text": "function proxyToContent(method) {\n return function () {\n var _get;\n\n return (_get = get$1(this, 'content'))[method].apply(_get, arguments);\n };\n}", "title": "" }, { "docid": "f7c94c6773f6d500c4d8924c5d36f38b", "score": "0.4706297", "text": "function handleMessage(request, sender, sendResponse) {\r\n console.log(\"Message from the content script: \" + sender.url + \",\" + request.command);\r\n console.log(sender);\r\n console.log(request);\r\n switch (request.command) {\r\n case \"login\":\r\n showLoginScreen();\r\n break;\r\n case \"loginSubmit\":\r\n _email = request.email; //set globals to values they filled in which are sent with every php message\r\n _password = request.password;\r\n if (!_clientID) { // sometimes the opin Errors... startup doesn't get called. Not sure why.\r\n startup();\r\n } else {\r\n login();\r\n }\r\n break;\r\n case \"startup\":\r\n startup();\r\n break;\r\n case \"optin\":\r\n optin();\r\n break;\r\n case \"install\":\r\n installStart(); //not really install, so much as first use\r\n break;\r\n case \"updateAll\":\r\n forceUpdate();\r\n break;\r\n case \"update\":\r\n updateStart();\r\n break;\r\n case \"forceSync\":\r\n forceSyncStart();\r\n \r\n break;\r\n case \"autoupdate\":\r\n if (_DEBUG) return; //don't auto update if debugging\r\n updateFromOpsStart();\r\n break;\r\n case \"renametest\":\r\n renametest();\r\n break;\r\n case \"printtree\":\r\n printtree();\r\n break;\r\n case \"register\":\r\n showRegisterScreen();\r\n break;\r\n case \"registerSubmit\":\r\n sendResponse(\"Creating account \" + request.email + \"<br>\");\r\n createAccount(request.email, request.password);\r\n break;\r\n case \"logout\":\r\n logout();\r\n break;\r\n case \"forgotpassword\":\r\n showResetPasswordScreen();\r\n break;\r\n case \"resetPassword\":\r\n resetPassword(request); //contact servers\r\n break;\r\n case \"resendvalidation\":\r\n resendvalidation();\r\n break;\r\n case \"forceValidate\":\r\n forceValidate();\r\n break;\r\n case \"showregisterscreen\":\r\n showRegisterScreen();\r\n break;\r\n case \"clearall\":\r\n clearall();\r\n break;\r\n case \"rebuildBookmarks\":\r\n sendStatus(\"rebuild bookmarks\");\r\n rebuildBookmarks();\r\n break;\r\n case \"rebuildServerBookmarks\":\r\n sendStatus(\"rebuildServer\");\r\n sendToPhp(\"rebuildServer\");\r\n break;\r\n case \"removeDuplicates\":\r\n sendStatus(\"removing duplicate bookmarks and merging duplicate folders\");\r\n removeDuplicates();\r\n break;\r\n case \"compareall\":\r\n getDBbs();\r\n break;\r\n case \"runtest\":\r\n test1();\r\n break;\r\n case \"processOpsToServer\":\r\n sendStatus(\"processing \" + _opsToServer.length + \" operations.\");\r\n processOpsToServer();\r\n break;\r\n case \"test4\":\r\n test4();\r\n break;\r\n case \"requestCount\":\r\n sendResponse(count(_localTreeAssoc));\r\n break;\r\n case \"deleteTables\":\r\n deleteTablesStart();\r\n break;\r\n case \"cleanup\":\r\n sendToPhp(\"cleanup\");\r\n break;\r\n }\r\n}", "title": "" }, { "docid": "53b9353a6138b4c01c5746b5b8bf07c2", "score": "0.4675602", "text": "SetContentPipeline(content){\n\t\tthis._content = content;\n\t}", "title": "" }, { "docid": "d072b9ef3789728d8a8fc492b3a6f3b4", "score": "0.46656552", "text": "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}", "title": "" }, { "docid": "e1b936b7dd9391597f60b1bca0d500de", "score": "0.46464363", "text": "function HandleMessages(event)\n{\n DebugMessage(\"Background-Process get command '\" + event.data.cmd + \"'\");\n switch(event.data.cmd)\n { \n // Load Preferences\n case 'Preferences':\n if( opera.extension.tabs.create )\n opera.extension.tabs.create({\n url:\"./options.html\",\n focused:true\n });\n break;\n \n // Load Message-Link in new Tab\n case 'LoadLink':\n \n // Always use https\n var link = event.data.lnk.replace(/^http:\\/\\//i, 'https://');\n \n // Use HTML-Mode if option is set\n if(widget.preferences['basicMode'] && widget.preferences['basicMode'] === \"on\")\n link = link.replace(/\\/u\\//i, '/h/');\n \n DebugMessage(\"Open link: \" + link);\n \n // Open now in new tab\n if( opera.extension.tabs.create )\n opera.extension.tabs.create({\n url:link,\n focused:true\n });\n break;\n \n // Refresh now (without callback)\n case 'Refresh_NoCallback':\n \n // Reset timer\n window.clearTimeout(UpdateTimer); \n \n // Sets alternate icon\n // (we do this here, because this Message comes from Option-Page)\n if(widget.preferences['theme'] != 'standard')\n MyButton.icon = \"css/\" + widget.preferences['theme'] + \"/img/toolbar-icon-18px.png\";\n else\n MyButton.icon = \"img/toolbar-icon-18px.png\";\n \n // then update the Accounts\n Update();\n \n // Refresh now (with callback)\n case 'Refresh':\n // reset timer\n window.clearTimeout(UpdateTimer);\n\n // At first send the current state to the source\n // (quicker)\n SendMessagesToSource(event.source);\n\n // then update the Accounts\n Update(event.source);\n\n break;\n \n // Only return currrent messages to source (No Refresh) \n case 'GetCurrentMessages':\n SendMessagesToSource(event.source);\n break; \n \n // Compose Mail\n case 'ComposeMail':\n if( opera.extension.tabs.create )\n opera.extension.tabs.create({\n url:\"https://mail.google.com/mail/?#compose\",\n focused:true\n });\n break;\n \n // Sets new Popup-Height\n case 'SetPopupSize':\n // Only change size if it is different to avoid flicker\n if(Number(MyButton.popup.height) != Number(event.data.height))\n MyButton.popup.height = event.data.height;\n break;\n \n // MessageAction (mark as read, achive, delete, ...)\n case 'MessageAction':\n MessageAction(event.data.uid, event.data.anum, event.data.action, event.source);\n break;\n \n // Debug-Message\n case 'DebugMessage':\n if(widget.preferences['debugMode'] && widget.preferences['debugMode'] === \"on\") \n opera.postError(event.data.msg);\n break;\n\n // Do nothing\n default:\n DebugMessage(\"Unknown Command from Menu -> \" + event.data.cmd, \"error\");\n }\n}", "title": "" }, { "docid": "5f33e081997213f3ec0acd0a524cc857", "score": "0.46362478", "text": "postMessage(command, args = []) {\n if (this.config.vscode) {\n if (!this.vscodeAPI) {\n // @ts-ignore\n this.vscodeAPI = acquireVsCodeApi();\n }\n // post message to vscode\n this.vscodeAPI.postMessage({\n command,\n args,\n });\n }\n else {\n window.parent.postMessage({\n command,\n args,\n }, \"file://\");\n }\n }", "title": "" }, { "docid": "02f8e266d3a7c58a2495aa4d8cc69165", "score": "0.462127", "text": "function onMessageHandler(target, context, msg, self) {\r\n if (self) {\r\n return;\r\n } // Ignore messages from the bot\r\n\r\n // This isn't a command since it has no prefix:\r\n if (msg.substr(0, 1) !== commandPrefix) {\r\n console.log(\r\n `[${target} (${context[\"message-type\"]})] ${context.username}: ${msg}`\r\n );\r\n return;\r\n }\r\n\r\n // Split the message into individual words:\r\n const parse = msg.slice(1).split(\" \");\r\n // The command name is the first (0th) one:\r\n const commandName = parse[0];\r\n // The rest (if any) are the parameters:\r\n const params = parse.splice(1);\r\n\r\n // If the command is known, let's execute it:\r\n if (commandName in knownCommands) {\r\n // Retrieve the function by its name:\r\n const command = knownCommands[commandName];\r\n // Then call the command with parameters:\r\n command(target, context, params);\r\n console.log(`* Executed ${commandName} command for ${context.username}`);\r\n } else {\r\n console.log(`* Unknown command ${commandName} from ${context.username}`);\r\n }\r\n}", "title": "" }, { "docid": "6f91fc7e1e8a6d49ab5b9394dab2eb4c", "score": "0.4596036", "text": "function execEditorContent() {\n noerror()\n execute(editor.getValue() + ';');\n }", "title": "" }, { "docid": "8cba2d95dda4f449a2e94ad8d81eb8e6", "score": "0.45910951", "text": "function handleMessage(message)\n{\n if(message != null)\n {\n var topic = message.topic;\n \n if (topic == window.thTopic.bundleInfoReceived \n || topic == window.thTopic.bundleInfoRemoved\n || topic == window.thTopic.bundleStatusUpdated)\n {\n //see systemconfig_bundles_tab.xhtml this call will activate a p:remoteCommand\n rcUpdateBundleTable(); \n }\n else if (topic == window.thTopic.configDisplayModelsUpdated)\n {\n //see systemconfig_configuration_tab.xhtml these calls will activate a p:remoteCommand\n rcUpdateConfigTable();\n rcUpdateFactoryConfigTable();\n }\n }\n}", "title": "" }, { "docid": "5a09a177c49c460c5e7b99b5e4869f4b", "score": "0.4590074", "text": "sendCommand() {\n let _self = this;\n _self.active = true;\n let command = this.selected;\n let values = [];\n for (let i = 0; i < this.selected.args.length; i++) {\n values.push(this.selected.args[i].value);\n }\n this.loader.load(\"/commands/\" + command.full_name, \"PUT\",\n {\"key\":0xfeedcafe, \"arguments\": values})\n .then(function() {\n _self.active = false;\n // Clear errors, as there is not a problem further\n for (let i = 0; i < command.args.length; i++) {\n command.args[i].error = \"\";\n }\n })\n .catch(function(err) {\n // Log all errors incoming\n console.error(\"[ERROR] Failed to send command: \" + err);\n let response = JSON.parse(err);\n // Argument errors are parceled out to each error\n if (\"errors\" in response) {\n for (let i = 0; i < response.errors.length; i++) {\n command.args[i].error = response.errors[i];\n }\n }\n // All other command errors\n else {\n command.error = response.message;\n }\n _self.active = false;\n });\n }", "title": "" }, { "docid": "5a09a177c49c460c5e7b99b5e4869f4b", "score": "0.4590074", "text": "sendCommand() {\n let _self = this;\n _self.active = true;\n let command = this.selected;\n let values = [];\n for (let i = 0; i < this.selected.args.length; i++) {\n values.push(this.selected.args[i].value);\n }\n this.loader.load(\"/commands/\" + command.full_name, \"PUT\",\n {\"key\":0xfeedcafe, \"arguments\": values})\n .then(function() {\n _self.active = false;\n // Clear errors, as there is not a problem further\n for (let i = 0; i < command.args.length; i++) {\n command.args[i].error = \"\";\n }\n })\n .catch(function(err) {\n // Log all errors incoming\n console.error(\"[ERROR] Failed to send command: \" + err);\n let response = JSON.parse(err);\n // Argument errors are parceled out to each error\n if (\"errors\" in response) {\n for (let i = 0; i < response.errors.length; i++) {\n command.args[i].error = response.errors[i];\n }\n }\n // All other command errors\n else {\n command.error = response.message;\n }\n _self.active = false;\n });\n }", "title": "" }, { "docid": "3fee1e562178f22ddcd128225f249435", "score": "0.45886654", "text": "function onMessageHandler(target, context, msg, self) {\n if (self) { return; } // Ignore messages from the bot\n\n // Remove whitespace from chat message\n const message = msg.trim();\n const instruction = message.substring(0,2);\n const arguments = msg.trim().substring(2);\n\n // If the command is known, let's execute it\n if (instructions.includes(instruction)) {\n const command = instruction + arguments;\n client.say(target, `You did a ${command} command`);\n console.log(`* Executed ${command} command`);\n Max.outlet(command);\n } else {\n client.say(target, `${instruction} is an unknown command!`);\n console.log(`* Unknown command ${instruction}`);\n Max.outlet(`* Unknown command ${instruction}`);\n }\n}", "title": "" }, { "docid": "27ae90559ad97a57d2b3fd216859ff32", "score": "0.4585854", "text": "get content() {\n return this._content;\n }", "title": "" }, { "docid": "c445d00a25740022ba003be4b78f983c", "score": "0.45740172", "text": "targetAtContent() {\n this.updateTarget = updateContentTarget;\n this.unbind = contentUnbind;\n }", "title": "" }, { "docid": "81989b8bae7ee43aba46a444c64131f3", "score": "0.4558183", "text": "linksHandler() {\n\t\treplaceLinks(this.content, (href) => {\n\t\t\tthis.emit(EVENTS.CONTENTS.LINK_CLICKED, href);\n\t\t});\n\t}", "title": "" }, { "docid": "d1874846001be039634f5dab797c0863", "score": "0.4555992", "text": "get content() {\n return this._content;\n }", "title": "" }, { "docid": "d1874846001be039634f5dab797c0863", "score": "0.4555992", "text": "get content() {\n return this._content;\n }", "title": "" }, { "docid": "70cc288670f97e6263d1b96f5e18b767", "score": "0.453857", "text": "function onMessageHandler(target, context, msg, self) {\n // console.log(\"target\", target)\n // console.log(\"context\", context)\n // console.log(\"msg\", msg)\n\n if (self) {\n return;\n } // Ignore messages from the bot\n\n // Remove whitespace from chat message\n const command = msg.trim().split(\" \")[0]\n const content = msg.trim().split(\" \").splice(1).join(\" \")\n switch (command) {\n case '!suggest':\n const suggestion = {}\n const user = context['display-name']\n suggestion['user'] = user\n suggestion['description'] = content\n suggestions.push(suggestion)\n client.whisper(user, `Got it! Thanks ${user}`)\n console.log(suggestions)\n break;\n case '!vote':\n if (content === '1') votes[0].votes += 1;\n if (content === '2') votes[1].votes += 1;\n if (content === '3') votes[2].votes += 1;\n console.log(votes)\n break;\n default: \n console.log(`* Unknown command ${command}`);\n }\n\n\n }", "title": "" }, { "docid": "349fbaa40006a5e037fcf02bb9abb53d", "score": "0.45249918", "text": "async onHandle({ cmd, data, node }, realm) {\n const handle = handlers[cmd];\n let callbackId = data && getOwnProp(data, CALLBACK_ID);\n if (callbackId) {\n data = data.data;\n }\n let res;\n try {\n res = handle === true\n ? sendCmd(cmd, data)\n : node::handle(data, realm || PAGE);\n if (isPromise(res)) {\n res = await res;\n }\n } catch (e) {\n callbackId = 'Error';\n res = e;\n }\n if (callbackId) {\n bridge.post('Callback', { id: callbackId, data: res }, realm);\n }\n }", "title": "" }, { "docid": "1750b663f40008e2a853f2297bde5100", "score": "0.45196667", "text": "doRichContentResponse(session, messages) {\n session.send(messages);\n }", "title": "" }, { "docid": "b7fc2dceb4d760f8b56bcc82de0682f0", "score": "0.4514441", "text": "receiveContentProps({ path }) {\n this.rootUrl = `/${path}`;\n }", "title": "" }, { "docid": "aa199149a90201c56a6d2962536ff910", "score": "0.4498263", "text": "get contentInput() {\n return this._content;\n }", "title": "" }, { "docid": "27ea9f325ed3fcd8eb42660819b7a9ac", "score": "0.4498215", "text": "function showCommands(){\n $('#content').append('<div class=\"info-message\">/about - shows information about this application<br>/voice - activates text to speech<br>/commands - lists all available commands<br></div>');\n}", "title": "" }, { "docid": "9706d3cdb076216aea47413a034fad8d", "score": "0.44964126", "text": "handler_SHELL(command, callback) {\n this._server.logger.info(\n {\n tnx: 'shell',\n cid: this.id,\n user: (this.session.user && this.session.user.username) || this.session.user\n },\n 'Client tried to invoke SHELL'\n );\n\n if (!this.session.isWizard) {\n this.send(500, 'Mere mortals must not mutter that mantra');\n return callback();\n }\n\n this.send(500, 'Error: Invoking shell is not allowed. This incident will be reported.');\n callback();\n }", "title": "" }, { "docid": "f62dbf6b0082c1965bb7862dfef8a55f", "score": "0.44802403", "text": "contentItemsChangeHandler() {\r\n if (this.contentListItems) {\r\n this.base.createNestedMarkup(this.linksContainer, CONTENT_LIST_ITEM, this.contentListItems);\r\n }\r\n }", "title": "" }, { "docid": "aaf41e2b2544e69ed795799a754c0274", "score": "0.4479859", "text": "async invoke(message) {\n if(!message.guild || message.author.bot) return;\n \n //Retrieving guildPrefix from Guild Model.\n const savedGuild = await this.guilds.get(message.guild.id);\n //Setting Prefix to guild Prefix defined.\n const prefix = savedGuild.prefix;\n /*if(message.content.startsWith(process.env.PREFIX)){ \n return this.commandHandler.handle(process.env.PREFIX, message);\n }*/\n\n if(message.content.startsWith(prefix)){ \n return this.commandHandler.handle(prefix, message);\n }\n }", "title": "" }, { "docid": "6aaa3e2acbb1238afb19b68801f702d0", "score": "0.4475732", "text": "fireContentChange() {\n if (this.selection.isHighlightEditRegion) {\n this.selection.onHighlight();\n }\n if (!this.isPaste) {\n this.copiedContent = undefined;\n this.copiedTextContent = '';\n this.selection.isViewPasteOptions = false;\n if (this.isPasteListUpdated) {\n this.isPasteListUpdated = false;\n }\n this.selection.showHidePasteOptions(undefined, undefined);\n }\n if (this.viewer.owner.isLayoutEnabled && !this.viewer.owner.isShiftingEnabled) {\n this.viewer.owner.fireContentChange();\n }\n }", "title": "" }, { "docid": "e2ee9c6ff662ab02491b1fb72f00a320", "score": "0.44744104", "text": "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 const commandName = msg.split(\" \");\n\n switch (commandName[0]) {\n case '!playing':\n getSongInfo(target)\n console.log(`* Executed ${commandName} command`);\n break;\n case '!queue':\n if (commandName[1] == \"\") {\n client.say(target, `You need to include a SpotifyURI`);\n } else {\n addToQueue(target, commandName[1])\n }\n break;\n case '!help':\n sayHelpMessage()\n break;\n default:\n client.say(target, `Unknown command ${commandName[0]}`);\n console.log(`* Unknown command ${commandName[0]}`);\n }\n}", "title": "" }, { "docid": "8f58cbcf2bcc8937ee9decfae0758aad", "score": "0.44731557", "text": "function createContentHubApi(backendBridge) {\n var PLUGIN_URI = 'ContentHub';\n\n/**\n * ContentTransfer is an object created by the ContentHub to\n and allows one to properly setup and manage a data\n transfer between two peers.\n\n * @class ContentTransfer\n * @constructor\n * @example\n\n var api = external.getUnityObject('1.0');\n var hub = api.ContentHub;\n\n var pictureContentType = hub.ContentType.Pictures;\n\n hub.defaultSourceForType(\n pictureContentType\n , function(peer) {\n hub.importContentForPeer(\n pictureContentType,\n peer,\n function(transfer) {\n [setup the transfer options and store]\n transfer.start(function(state) { [...] });\n });\n });\n */\n function ContentTransfer(objectid, content) {\n this._proxy = backendBridge.createRemoteObject(\n PLUGIN_URI, 'ContentTransfer', objectid);\n\n this._store = content && content.store\n ? content.store : null;\n this._state = content && content.state\n ? content.state : null;\n this._selectionType = content && content.selectionType\n ? content.selectionType : null;\n this._direction = content && content.direction\n ? content.direction : null;\n };\n ContentTransfer.prototype = {\n // object methods\n serialize: function() {\n var self = this;\n return {\n type: 'object-proxy',\n apiid: 'ContentHub',\n objecttype: 'ContentTransfer',\n objectid: self._proxy.id(),\n }\n },\n\n // properties\n\n /**\n * Retrieves the current store.\n *\n * If the callback parameter is not set, the current \"local\" value is retrieved.\n *\n * @method store\n * @param callback (optional) {Function(String)}\n */\n store: function(callback) {\n if (callback && typeof(callback) === 'function') {\n this._proxy.call('store', [], callback);\n return;\n }\n return this._store;\n },\n /**\n * Sets the current store for the ContentTransfer.\n *\n * @method setStore\n * @param store {ContentStore}\n * @param callback (optional) {Function()} called when the store has been updated\n */\n setStore: function(store, callback) {\n this._proxy.call('setStore', [store.serialize(), callback]);\n },\n\n /**\n * Retrieves the current state.\n *\n * If the callback parameter is not set, the current \"local\" value is retrieved.\n *\n * @method state\n * @param callback (optional) {Function(ContentTransfer.State)}\n */\n state: function(callback) {\n if (callback && typeof(callback) === 'function') {\n this._proxy.call('state', [], callback);\n return;\n }\n return this._state;\n },\n /**\n * Sets the state of the transfer.\n *\n * @method setState\n * @param state {ContentTransfer.State}\n * @param callback {Function()} called when the state has been updated\n */\n setState: function(state, callback) {\n this._proxy.call('setState', [state, callback]);\n },\n /**\n * Notifies the listener when the state of the transfer changes.\n *\n * @method onStateChanged\n * @param callback {Function(ContentTransfer.State)}\n */\n onStateChanged: function(callback) {\n this._proxy.call('onStateChanged', [callback]);\n },\n\n /**\n * Retrieves the current selection type.\n *\n * @method selectionType\n * @param callback {Function(ContentTransfer.SelectionType)}\n */\n selectionType: function(callback) {\n if (callback && typeof(callback) === 'function') {\n this._proxy.call('selectionType', [], callback);\n return;\n }\n return this._selectionType;\n },\n /**\n * Sets the selection type (single or multiple).\n *\n * @method setSelectionType\n * @param selectionType {ContentTransfer.SelectionType}\n * @param callback {Function()} called when the state has been updated\n */\n setSelectionType: function(selectionType, callback) {\n this._selectionType = selectionType;\n this._proxy.call('setSelectionType', [selectionType, callback]);\n },\n\n /**\n * Retrieves the current transfer direction.\n *\n * If the callback parameter is not set, the current \"local\" value is retrieved.\n *\n * @method direction\n * @param callback (optional) {Function(ContentTransfer.Direction)}\n */\n direction: function(callback) {\n if (callback && typeof(callback) === 'function') {\n this._proxy.call('direction', [], callback);\n return;\n }\n return this._direction;\n },\n /**\n * Sets the transfer direction (import or export).\n *\n * @method setDirection\n * @param direction {ContentTransfer.Direction}\n * @param callback {Function()} called when the state has been updated\n */\n setDirection: function(direction, callback) {\n this._direction = direction;\n this._proxy.call('setDirection', [direction, callback]);\n },\n\n /**\n * Retrieves the list of items associated with the ContentTransfer.\n *\n * @method items\n * @param callback {Function( {Object{name: , url: }} )}\n */\n items: function(callback) {\n this._proxy.call('items', [], callback);\n },\n /**\n * Sets the list of items for the associated ContentTransfer (used when exporting).\n *\n * @method setItems\n * @param items {Array of Object{name: String, url: String}}\n * @param callback {Function()} called when the state has been updated\n */\n setItems: function(items, callback) {\n this._proxy.call('setItems', [items, callback]);\n },\n\n // methods\n\n /**\n * Starts a transfer\n * \n * @method start\n * @param callback {Function(ContentTransfer.State)} \n */\n start: function(callback) {\n this._proxy.call('start', [callback]);\n },\n\n /**\n * Sets State to ContentTransfer.Finalized and cleans up temporary files.\n *\n * @method finalize\n */\n finalize: function() {\n this._proxy.call('finalize', []);\n },\n\n // extras\n\n /**\n * Destroys the remote object. This proxy object is not valid anymore.\n *\n * @method destroy\n */\n destroy: function() {\n this._proxy.call('destroy', []);\n },\n };\n\n/**\n * ContentPeer is an object returned by the ContentHub.\n It represents a remote peer that can be used in a request\n to export or import date.\n\n * @class ContentPeer\n * @module ContentHub\n * @constructor\n * @example\n\n var api = external.getUnityObject('1.0');\n var hub = api.ContentHub;\n\n var pictureContentType = hub.ContentType.Pictures;\n\n hub.defaultSourceForType(\n pictureContentType\n , function(peer) {\n [do something with the peer]\n });\n */\n function ContentPeer(objectid, content) {\n this._proxy = backendBridge.createRemoteObject(\n PLUGIN_URI, 'ContentPeer', objectid);\n\n this._appId = content && content.appId\n ? content.appId : null;\n this._name = content && content.name\n ? content.name : null;\n this._handler = content && content.handler\n ? content.handler : null;\n this._contentType = content && content.contentType\n ? content.contentType : null;\n this._selectionType = content && content.selectionType\n ? content.selectionType : null;\n this._isDefaultPeer = content && content.isDefaultPeer;\n };\n ContentPeer.prototype = {\n // object methods\n serialize: function() {\n var self = this;\n return {\n type: 'object-proxy',\n apiid: 'ContentHub',\n objecttype: 'ContentPeer',\n objectid: self._proxy.id(),\n }\n },\n\n // properties\n\n /**\n * Retrieves the app Id of the associated peer.\n *\n * If the callback parameter is not set, the current \"local\" value is retrieved.\n *\n * @method appId\n * @return {String} Application Id for this peer\n * @param callback (optional) {Function(String)}\n */\n appId: function(callback) {\n if (callback && typeof(callback) === 'function') {\n this._proxy.call('appId', [], callback);\n return;\n }\n return this._appId;\n },\n /**\n * Sets the app Id of the associated peer.\n *\n * @method setAppId\n * @param appId {String}\n * @param callback {Function()} called when the appId has been updated\n */\n setAppId: function(appId, callback) {\n this._proxy.call('setAppId', [appId, callback]);\n },\n\n /**\n * Retrieves the specific ContentHandler for this peer.\n *\n * If the callback parameter is not set, the current \"local\" value is retrieved.\n *\n * @method handler\n * @return {String} ContentHandler for this peer\n * @param callback (optional) {Function(String)}\n */\n handler: function(callback) {\n if (callback && typeof(callback) === 'function') {\n this._proxy.call('handler', [], callback);\n return;\n }\n return this._handler;\n },\n /**\n * Sets specific ContentHandler for this peer.\n *\n * @method setHandler\n * @param handler {ContentHandler}\n * @param callback {Function()} called when the appId has been updated\n */\n setHandler: function(handler, callback) {\n this._proxy.call('setHandler', [handler, callback]);\n },\n\n /**\n * Retrieves the specific ContentType for this peer.\n *\n * If the callback parameter is not set, the current \"local\" value is retrieved.\n *\n * @method contentType\n * @return {String} ContentType for this peer\n * @param callback (optional) {Function(String)}\n */\n contentType: function(callback) {\n if (callback && typeof(callback) === 'function') {\n this._proxy.call('contentType', [], callback);\n return;\n }\n return this._contentType;\n },\n /**\n * Sets specific ContentType for this peer.\n *\n * @method setContentType\n * @param contentType {ContentType}\n * @param callback {Function()} called when the content type has been updated\n */\n setContentType: function(contentType, callback) {\n this._proxy.call('setContentType', [contentType, callback]);\n },\n\n /**\n * Retrieves the specific SelectionType for this peer.\n *\n * If the callback parameter is not set, the current \"local\" value is retrieved.\n *\n * @method selectionType\n * @return {String} ContentTransfer.SelectionType for this peer\n * @param callback (optional) {Function(String)}\n */\n selectionType: function(callback) {\n if (callback && typeof(callback) === 'function') {\n this._proxy.call('selectionType', [], callback);\n return;\n }\n return this._selectionType;\n },\n /**\n * Sets specific SelectionType for this peer.\n *\n * @method setSelectionType\n * @param selectionType {ContentTransfer.SelectionType}\n * @param callback {Function()} called when the content type has been updated\n */\n setSelectionType: function(selectionType, callback) {\n this._proxy.call('setSelectionType', [selectionType, callback]);\n },\n\n /**\n * Retrieves the name of the associated peer.\n *\n * If the callback parameter is not set, the current \"local\" value is retrieved.\n *\n * @method name\n * @param callback (optional) {Function(String)}\n */\n name: function(callback) {\n if (callback && typeof(callback) === 'function') {\n this._proxy.call('name', [], callback);\n return;\n }\n return this._name;\n },\n\n /**\n * Returns true if the peer is a default one, false otherwise.\n *\n * If the callback parameter is not set, the current \"local\" value is retrieved.\n *\n * @method isDefaultPeer\n * @param callback (optional) {Function(Bool)}\n */\n isDefaultPeer: function(callback) {\n if (callback && typeof(callback) === 'function') {\n this._proxy.call('isDefaultPeer', [], callback);\n return;\n }\n return this._isDefaultPeer;\n },\n\n // methods\n\n /**\n * Request to import data from this ContentPeer.\n *\n * @method request\n * @param callback {Function(ContentTransfer)} Called with the resulting content transfer\n */\n request: function(callback) {\n this._proxy.call('request', [], callback);\n },\n\n /**\n * Request to import data from this ContentPeer and use a ContentStore for permanent storage.\n *\n * @method requestForStore\n * @param store {ContentStore} Store used as a permanent storage\n * @param callback {Function(ContentTransfer)} Called with the resulting content transfer\n */\n requestForStore: function(store, callback) {\n this._proxy.call('requestForStore', [store.serialize()], callback);\n },\n\n // extras\n\n /**\n * Destroys the remote object. This proxy object is not valid anymore.\n *\n * @method destroy\n */\n destroy: function() {\n this._proxy.call('destroy', []);\n },\n };\n\n/**\n * ContentStore is an object returned by the ContentHub.\n\n It represents a location where the resources imported or\n exported from a peer during a transfer operation are to be\n either saved or found.\n\n * @class ContentStore\n * @module ContentHub\n * @constructor\n * @example\n\n var api = external.getUnityObject('1.0');\n var hub = api.ContentHub;\n\n var pictureContentType = hub.ContentType.Pictures;\n\n hub.defaultStoreForType(pictureContentType, function(store) {\n [do something with the store]\n });\n */\n function ContentStore(objectid, content) {\n this._proxy = backendBridge.createRemoteObject(\n PLUGIN_URI, 'ContentStore', objectid);\n\n this._uri = content && content.uri\n ? content.uri : null;\n this._scope = content && content.scope\n ? content.scope : null;\n };\n ContentStore.prototype = {\n // object methods\n serialize: function() {\n return {\n type: 'object-proxy',\n apiid: 'ContentHub',\n objecttype: 'ContentStore',\n objectid: this._proxy.id(),\n }\n },\n\n // properties\n\n //immutable\n\n /**\n * Retrieves the uri of the associated store.\n *\n * If the callback parameter is not set, the current \"local\" value is retrieved.\n *\n * @method uri\n * @return {String} current uri\n * @param callback (optional) {Function(String)}\n */\n uri: function(callback) {\n if (callback && typeof(callback) === 'function') {\n this._proxy.call('uri', [], callback);\n return;\n }\n return this._uri;\n },\n\n /**\n * Retrieves the current scope.\n *\n * If the callback parameter is not set, the current \"local\" value is retrieved.\n *\n * @method scope\n * @return {ContentScope} current scope\n * @param callback (optional) {Function(ContentScope)}\n */\n scope: function(callback) {\n if (callback && typeof(callback) === 'function') {\n this._proxy.call('scope', [], callback);\n return;\n }\n return this._scope;\n },\n /**\n * Sets the current scope.\n *\n * @method setScope\n * @param scope {ContentScope}\n * @param callback {Function()} called when the scope has been updated\n */\n setScope: function(scope, callback) {\n this._proxy.call('setScope', [scope, callback]);\n },\n\n // extras\n\n /**\n * Destroys the remote object. This proxy object is not valid anymore.\n *\n * @method destroy\n */\n destroy: function() {\n this._proxy.call('destroy', []);\n },\n };\n\n function _constructorFromName(className) {\n var constructorPerName = {\n \"ContentPeer\": ContentPeer,\n \"ContentStore\": ContentStore,\n \"ContentTransfer\": ContentTransfer,\n };\n return className in constructorPerName\n ? constructorPerName[className]\n : null;\n };\n\n/**\n * The ContentHub object.\n\n * @class ContentHub\n * @static\n * @constructor\n */\n return {\n /**\n ContentType is an enumeration of well known content types.\n \n Values:\n\n Pictures\n\n Documents\n \n Music\n\n Contacts\n\n @static\n @property ContentType {String}\n \n @example\n\n var api = external.getUnityObject('1.0');\n var hub = api.ContentHub;\n \n var pictureContentType = hub.ContentType.Pictures;\n */\n ContentType: {\n All: \"All\",\n Unknown: \"Unknown\",\n Pictures: \"Pictures\",\n Documents: \"Documents\",\n Music: \"Music\",\n Contacts: \"Contacts\",\n },\n\n /**\n ContentHandler is an enumeration of well known content handlers.\n\n Values:\n\n Source\n\n Destination\n\n Share\n\n @static\n @property ContentHandler {String}\n */\n ContentHandler: {\n Source: \"Source\",\n Destination: \"Destination\",\n Share: \"Share\",\n },\n\n /**\n ContentScope is an enumeration of well known scope types.\n\n Values:\n\n System\n\n User\n\n App\n\n @static\n @property ContentScope {String}\n */\n ContentScope: {\n System: \"System\",\n User: \"User\",\n App: \"App\",\n },\n\n ContentTransfer: {\n\n /**\n ContentTransfer.State is an enumeration of the state of a given ongoing ContentTransfer.\n \n Values:\n\n Created: Transfer created, waiting to be initiated.\n\n Initiated: Transfer has been initiated.\n\n InProgress: Transfer is in progress.\n\n Charged: Transfer is charged with items and ready to be collected.\n\n Collected: Items in the transfer have been collected.\n\n Aborted: Transfer has been aborted.\n\n Finalized: Transfer has been finished and cleaned up.\n \n @static\n @property ContentTransfer.State {String}\n \n @example\n\n var api = external.getUnityObject('1.0');\n var hub = api.ContentHub;\n \n var transferState = hub.ContentTransfer.State;\n var pictureContentType = hub.ContentType.Pictures;\n\n hub.importContentForPeer(\n pictureContentType,\n peer,\n function(transfer) {\n hub.defaultStoreForType(pictureContentType, function(store) {\n transfer.setStore(store, function() {\n transfer.start(function(state) {\n if (transferState.Aborted === state) {\n [...]\n }\n [...]\n });\n });\n });\n });\n\n */\n State: {\n // Transfer created, waiting to be initiated.\n Created: \"Created\",\n\n // Transfer has been initiated.\n Initiated: \"Initiated\",\n\n // Transfer is in progress.\n InProgress: \"InProgress\",\n\n // Transfer is charged with items and ready to be collected.\n Charged: \"Charged\",\n\n // Items in the transfer have been collected.\n Collected: \"Collected\",\n\n // Transfer has been aborted.\n Aborted: \"Aborted\",\n\n // Transfer has been finished and cleaned up.\n Finalized: \"Finalized\",\n },\n\n /**\n ContentTransfer.Direction is an enumeration of the directions of a given ContentTransfer.\n \n Values:\n\n Import\n\n Export\n\n @static\n @property ContentTransfer.Direction {String}\n */\n Direction: {\n // Transfer is a request to import content\n Import: \"Import\",\n\n // Transfer is a request to export content\n Export: \"Export\",\n },\n\n /**\n ContentTransfer.SelectionType is an enumeration of the directions of a given ContentTransfer.\n \n Values:\n\n Single: Transfer should contain a single item\n\n Multiple: Transfer can contain multiple items\n\n @static\n @property ContentTransfer.SelectionType {String}\n */\n SelectionType: {\n // Transfer should contain a single item\n Single: \"Single\",\n\n // Transfer can contain multiple items\n Multiple: \"Multiple\",\n },\n },\n\n /**\n * Creates a ContentPeer object for the given source type.\n *\n * @method getPeers\n * @param filters {Object} A dictionary of parameters to filter the result. The filtering keys are:\n * - contentType: desired ContentType\n * - handler: desired ContentHandler\n *\n * @param callback {Function(List of ContentPeer objects)} Callback that receives the result or null\n */\n getPeers: function(filter, callback) {\n backendBridge.call('ContentHub.getPeers',\n [filter],\n callback);\n },\n\n /**\n * Creates a ContentStore object for the given scope type.\n *\n * @method getStore\n * @param scope {ContentScope} The content scope for the store\n * @param callback {Function(ContentStore)} Callback that receives the result or null\n */\n getStore: function(scope, callback) {\n backendBridge.call('ContentHub.getStore',\n [scope],\n callback);\n },\n\n /**\n * Launches the content peer picker ui that allows the user to select a peer.\n *\n * @method launchContentPeerPicker\n * @param filters {Object} A dictionary of parameters to filter the result. The filtering keys are:\n * - contentType: desired ContentType\n * - handler: desired ContentHandler\n * - showTitle: boolean value indicating if the title should be visible\n * @param onPeerSelected {Function(ContentPeer)} Called when the user has selected a peer\n * @param onCancelPressed {Function()} Called when the user has pressed cancel\n */\n launchContentPeerPicker: function(filters, onPeerSelected, onCancelPressed) {\n backendBridge.call('ContentHub.launchContentPeerPicker',\n [filters, onPeerSelected, onCancelPressed]);\n },\n\n /**\n * Sets a handler that is to be called when the current application is the\n * target of an export request.\n *\n * @method onExportRequested\n * @param callback {Function(ContentTransfer)} Function when one requests a resource to be exported.\n * The corresponding ContentTransfer is provided as a parameter.\n * \n * @example\n \n var api = external.getUnityObject(1.0);\n var hub = api.ContentHub;\n \n var transferState = hub.ContentTransfer.State;\n \n function _exportRequested(transfer) {\n var url = window.location.href;\n url = url.substr(0, url.lastIndexOf('/')+1) + 'img/ubuntuone-music.png';\n \n transfer.setItems([{name: 'Ubuntu One', url: url}],\n function() {\n transfer.setState(hub.ContentTransfer.State.Charged);\n });\n };\n \n hub.onExportRequested(_exportRequested);\n \n */\n onExportRequested: function(callback) {\n backendBridge.call('ContentHub.onExportRequested',\n [callback]);\n },\n\n api: {\n\n /**\n * Creates a ContentStore object for the given ContentPeer.\n *\n * @method api.importContent\n * @param type {ContentType} type of the content to import\n * @param peer {ContentPeer} peer whos content should be imported\n * @param transferOptions {Object} a dictionary of transfer options. The options are the following:\n * - multipleFiles {Bool}: specified if a transfer should involve multiple files or not\n * - scope {ContentScope}: specifies the location where the transferred files should be copied to\n * @param onError {Function(reason:)} called when the transfer has failed\n * @param onSuccess {Function(Array of {ContentItem})} called when the transfer has been a success and items are available\n */\n importContent: function(type, peer, transferOptions, onSuccess, onError) {\n backendBridge.call('ContentHub.apiImportContent',\n [type, peer.serialize(), transferOptions, onSuccess, onError]);\n }\n },\n\n // Internal\n\n /**\n * @private\n *\n */\n createObjectWrapper: function(objectType, objectId, content) {\n var Constructor = _constructorFromName(objectType);\n return new Constructor(objectId, content);\n },\n };\n}", "title": "" }, { "docid": "3feb9528ecfa6afa21ee8db016c69109", "score": "0.44704986", "text": "function fnSaveContent()\n {\n let oData = [];\n oData[options.property] = oEditor.getContent();\n ajaxRequest( options.uri, oData, 'POST' )\n .then(() => fnDismissEditor( false ))\n .catch(oJson => console.warn(oJson))\n .then(() =>\n {\n ajaxRequest( `${options.uri}.json?field=${options.property}&rendered` )\n .then( oJson => elRoot.innerHTML = oJson.content )\n .then( () =>\n {\n rebindBehaviours( elRoot );\n lazyload();\n });\n });\n }", "title": "" }, { "docid": "562ee348e4645fb622d06a8ec8b345ac", "score": "0.44682154", "text": "function emotesHandler(e, o, callback) {\n var dbEmotes = e.db.getDatabase(\"emotes\", o.serverID);\n var path = e.db.getStoragePath(\"emotes\", o.serverID);\n\n // parse aliases\n dbEmotes.find({\n config: \"enable\"\n }, function(err, data) {\n if(err) {\n logger.error(err);\n return;\n }\n\n if(data.length == 0 || !data[0].value) {\n return;\n }\n\n var list = o.message.match(/:\\w+:/gi);\n\n if(!list) {\n return;\n }\n\n var files = [];\n var msgEmotes = [];\n\n async.forEachOf(list, function(v, i, cb) {\n dbEmotes.find({\n id: v.substring(1, v.length - 1)\n }, function(err, data) {\n if(err) {\n logger.error(err);\n cb(); //ignore errors\n return;\n }\n if(data.length != 0) {\n if(msgEmotes.indexOf(data[0].id) == -1) {\n msgEmotes.push(data[0].id);\n try {\n var f = fs.createReadStream(path + \"/\" + data[0].filename);\n files.push(f);\n } catch(err) {\n logger.error(err);\n }\n }\n }\n cb();\n });\n }, function(err) {\n if(!err) {\n if(msgEmotes.length != 0) {\n e._disco.logOnChannel(makeLog(o, msgEmotes))\n }\n files.forEach(function(v) {\n e._disco.queueFile(o.channelID, v);\n });\n }\n });\n });\n\n callback(null);\n}", "title": "" }, { "docid": "6bbacc4408dfa789fd2aac61c47cf3e3", "score": "0.44681546", "text": "editorContentCallback(initContent: string, filePath: string) {\n const { setEditorContent } = this.props;\n setEditorContent(initContent, filePath);\n }", "title": "" }, { "docid": "f3f13079fc5e61fed880f53137027a4e", "score": "0.44679758", "text": "function handleAdmin(req, commands, res) \n{\t\n console.log('=============commands=============');\n console.log(commands);\n\thandleCmds(commands);\n\t\n\tisConfigured = true;\n\t\n\tres.status(200).json({});\n}", "title": "" }, { "docid": "e42a23f3da42e00eb5965672520cddfa", "score": "0.44659552", "text": "function handleCommands(ce) {\n if (ce.content === '!!time') {\n send(new Date().toString());\n }\n if (ce.content === '!!stop') {\n send('...');\n silent = true;\n }\n if (ce.content === '!!go') {\n silent = false;\n }\n }", "title": "" }, { "docid": "e27a8f651717ef5c56827f2398c41cd2", "score": "0.44591463", "text": "function kvmCtrlData(channel, cmd) {\r\n if (cmd.length > 0 && cmd.charCodeAt(0) != 123) {\r\n // This is upload data\r\n if (this.fileupload != null) {\r\n cmd = Buffer.from(cmd, 'base64');\r\n var header = cmd.readUInt32BE(0);\r\n if ((header == 0x01000000) || (header == 0x01000001)) {\r\n fs.writeSync(this.fileupload.fp, cmd.slice(4));\r\n channel.write({ action: 'upload', sub: 'ack', reqid: this.fileupload.reqid });\r\n if (header == 0x01000001) { fs.closeSync(this.fileupload.fp); this.fileupload = null; } // Close the file\r\n }\r\n }\r\n return;\r\n }\r\n //console.log('KVM Ctrl Data', cmd);\r\n\r\n try { cmd = JSON.parse(cmd); } catch (ex) { console.error('Invalid JSON: ' + cmd); return; }\r\n if ((cmd.path != null) && (process.platform != 'win32') && (cmd.path[0] != '/')) { cmd.path = '/' + cmd.path; } // Add '/' to paths on non-windows\r\n switch (cmd.action) {\r\n case 'ping': {\r\n // This is a keep alive\r\n channel.write({ action: 'pong' });\r\n break;\r\n }\r\n case 'ls': {\r\n /*\r\n // Close the watcher if required\r\n var samepath = ((this.httprequest.watcher != undefined) && (cmd.path == this.httprequest.watcher.path));\r\n if ((this.httprequest.watcher != undefined) && (samepath == false)) {\r\n //console.log('Closing watcher: ' + this.httprequest.watcher.path);\r\n //this.httprequest.watcher.close(); // TODO: This line causes the agent to crash!!!!\r\n delete this.httprequest.watcher;\r\n }\r\n */\r\n\r\n // Send the folder content to the browser\r\n var response = getDirectoryInfo(cmd.path);\r\n if (cmd.reqid != undefined) { response.reqid = cmd.reqid; }\r\n channel.write(response);\r\n\r\n /*\r\n // Start the directory watcher\r\n if ((cmd.path != '') && (samepath == false)) {\r\n var watcher = fs.watch(cmd.path, onFileWatcher);\r\n watcher.tunnel = this.httprequest;\r\n watcher.path = cmd.path;\r\n this.httprequest.watcher = watcher;\r\n //console.log('Starting watcher: ' + this.httprequest.watcher.path);\r\n }\r\n */\r\n break;\r\n }\r\n case 'mkdir': {\r\n // Create a new empty folder\r\n fs.mkdirSync(cmd.path);\r\n break;\r\n }\r\n case 'rm': {\r\n // Remove many files or folders\r\n for (var i in cmd.delfiles) {\r\n var fullpath = path.join(cmd.path, cmd.delfiles[i]);\r\n try { fs.unlinkSync(fullpath); } catch (e) { console.log(e); }\r\n }\r\n break;\r\n }\r\n case 'rename': {\r\n // Rename a file or folder\r\n var oldfullpath = path.join(cmd.path, cmd.oldname);\r\n var newfullpath = path.join(cmd.path, cmd.newname);\r\n try { fs.renameSync(oldfullpath, newfullpath); } catch (e) { console.log(e); }\r\n break;\r\n }\r\n case 'download': {\r\n // Download a file, to browser\r\n var sendNextBlock = 0;\r\n if (cmd.sub == 'start') { // Setup the download\r\n if (this.filedownload != null) { channel.write({ action: 'download', sub: 'cancel', id: this.filedownload.id }); delete this.filedownload; }\r\n this.filedownload = { id: cmd.id, path: cmd.path, ptr: 0 }\r\n try { this.filedownload.f = fs.openSync(this.filedownload.path, 'rbN'); } catch (e) { channel.write({ action: 'download', sub: 'cancel', id: this.filedownload.id }); delete this.filedownload; }\r\n if (this.filedownload) { channel.write({ action: 'download', sub: 'start', id: cmd.id }); }\r\n } else if ((this.filedownload != null) && (cmd.id == this.filedownload.id)) { // Download commands\r\n if (cmd.sub == 'startack') { sendNextBlock = 8; } else if (cmd.sub == 'stop') { delete this.filedownload; } else if (cmd.sub == 'ack') { sendNextBlock = 1; }\r\n }\r\n // Send the next download block(s)\r\n while (sendNextBlock > 0) {\r\n sendNextBlock--;\r\n var buf = Buffer.alloc(4096);\r\n var len = fs.readSync(this.filedownload.f, buf, 4, 4092, null);\r\n this.filedownload.ptr += len;\r\n if (len < 4092) { buf.writeInt32BE(0x01000001, 0); fs.closeSync(this.filedownload.f); delete this.filedownload; sendNextBlock = 0; } else { buf.writeInt32BE(0x01000000, 0); }\r\n channel.write(buf.slice(0, len + 4).toString('base64')); // Write as Base64\r\n }\r\n break;\r\n }\r\n case 'upload': {\r\n // Upload a file, from browser\r\n if (cmd.sub == 'start') { // Start the upload\r\n if (this.fileupload != null) { fs.closeSync(this.fileupload.fp); }\r\n if (!cmd.path || !cmd.name) break;\r\n this.fileupload = { reqid: cmd.reqid };\r\n var filepath = path.join(cmd.path, cmd.name);\r\n try { this.fileupload.fp = fs.openSync(filepath, 'wbN'); } catch (e) { }\r\n if (this.fileupload.fp) { channel.write({ action: 'upload', sub: 'start', reqid: this.fileupload.reqid }); } else { this.fileupload = null; channel.write({ action: 'upload', sub: 'error', reqid: this.fileupload.reqid }); }\r\n }\r\n else if (cmd.sub == 'cancel') { // Stop the upload\r\n if (this.fileupload != null) { fs.closeSync(this.fileupload.fp); this.fileupload = null; }\r\n }\r\n break;\r\n }\r\n case 'copy': {\r\n // Copy a bunch of files from scpath to dspath\r\n for (var i in cmd.names) {\r\n var sc = path.join(cmd.scpath, cmd.names[i]), ds = path.join(cmd.dspath, cmd.names[i]);\r\n if (sc != ds) { try { fs.copyFileSync(sc, ds); } catch (e) { } }\r\n }\r\n break;\r\n }\r\n case 'move': {\r\n // Move a bunch of files from scpath to dspath\r\n for (var i in cmd.names) {\r\n var sc = path.join(cmd.scpath, cmd.names[i]), ds = path.join(cmd.dspath, cmd.names[i]);\r\n if (sc != ds) { try { fs.copyFileSync(sc, ds); fs.unlinkSync(sc); } catch (e) { } }\r\n }\r\n break;\r\n }\r\n default:\r\n // Unknown action, ignore it.\r\n break;\r\n }\r\n}", "title": "" }, { "docid": "686a0143dfcf7215f5dead7a806ab14b", "score": "0.44296488", "text": "function updateContentCallback(info) {\n\t \t//console.log('do invoke back');\n }", "title": "" }, { "docid": "cd7678befb9657a2b30c9fae011fd2ae", "score": "0.4428519", "text": "getCommandHandler() {\n return Far('commandHandler', {\n onOpen(_obj, meta) {\n bridgeHandles.add(meta.channelHandle);\n },\n onClose(_obj, meta) {\n bridgeHandles.delete(meta.channelHandle);\n offerSubscriptions.delete(meta.channelHandle);\n },\n\n async onMessage(obj, meta) {\n const {\n type,\n dappOrigin = meta.origin,\n suggestedDappPetname = (meta.query &&\n meta.query.suggestedDappPetname) ||\n obj.dappOrigin ||\n meta.origin,\n } = obj;\n\n // When we haven't been enabled, tell our caller.\n let needApproval = false;\n await walletAdmin.waitForDappApproval(\n suggestedDappPetname,\n dappOrigin,\n () => {\n needApproval = true;\n httpSend(\n {\n type: 'walletNeedDappApproval',\n data: {\n dappOrigin,\n suggestedDappPetname,\n },\n },\n [meta.channelHandle],\n );\n },\n );\n if (needApproval) {\n httpSend(\n {\n type: 'walletHaveDappApproval',\n data: {\n dappOrigin,\n },\n },\n [meta.channelHandle],\n );\n }\n\n switch (type) {\n case 'walletGetPurses': {\n return {\n type: 'walletUpdatePurses',\n data: bigintStringify(pursesState),\n };\n }\n case 'walletAddOffer': {\n let handled = false;\n const actions = Far('actions', {\n handled(offer) {\n if (handled) {\n return;\n }\n handled = true;\n httpSend(\n {\n type: 'walletOfferHandled',\n data: offer.id,\n },\n [meta.channelHandle],\n );\n },\n });\n return {\n type: 'walletOfferAdded',\n data: await walletAdmin.addOffer(\n { ...obj.data, actions },\n { ...meta, dappOrigin },\n ),\n };\n }\n\n case 'walletSubscribeOffers': {\n const { status = null } = obj;\n const { channelHandle } = meta;\n\n if (!channelHandle) {\n return {\n type: 'walletSubscribedOffers',\n data: false,\n };\n }\n\n // TODO: Maybe use the contract instanceId instead.\n subscribeToOffers(channelHandle, {\n origin: dappOrigin,\n status,\n });\n return {\n type: 'walletSubscribedOffers',\n data: true,\n };\n }\n\n case 'walletGetOffers': {\n const { status = null } = obj;\n\n // Override the origin since we got it from the bridge.\n let result = await walletAdmin.getOffers({\n origin: dappOrigin,\n });\n if (status !== null) {\n // Filter by status.\n result = harden(\n result.filter(offer => offer.status === status),\n );\n }\n\n return {\n type: 'walletOfferDescriptions',\n data: result,\n };\n }\n\n case 'walletGetDepositFacetId': {\n const { brandBoardId } = obj;\n const result = await walletAdmin.getDepositFacetId(\n brandBoardId,\n );\n return {\n type: 'walletDepositFacetIdResponse',\n data: result,\n };\n }\n\n case 'walletSuggestIssuer': {\n const { petname, boardId } = obj;\n const result = await walletAdmin.suggestIssuer(\n petname,\n boardId,\n dappOrigin,\n );\n return {\n type: 'walletSuggestIssuerResponse',\n data: result,\n };\n }\n\n case 'walletSuggestInstance': {\n const { petname, boardId } = obj;\n const result = await walletAdmin.suggestInstance(\n petname,\n boardId,\n dappOrigin,\n );\n return {\n type: 'walletSuggestInstanceResponse',\n data: result,\n };\n }\n\n case 'walletSuggestInstallation': {\n const { petname, boardId } = obj;\n const result = await walletAdmin.suggestInstallation(\n petname,\n boardId,\n dappOrigin,\n );\n return {\n type: 'walletSuggestInstallationResponse',\n data: result,\n };\n }\n\n default:\n return Promise.resolve(false);\n }\n },\n });\n }", "title": "" }, { "docid": "f01051e2bf52d4c95f57444429575655", "score": "0.44185162", "text": "handleMessage(msg) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!msg.author)\n return; // this is a bug and shouldn't really happen\n if (this.ignoreBots && msg.author.bot)\n return;\n // Construct a partial context (without prefix or command name)\n const partialContext = Object.assign({\n client: this,\n }, this.contextAdditions);\n // Is the message properly prefixed? If not, we can ignore it\n const matchResult = yield this.splitPrefixFromContent(msg, partialContext);\n if (!matchResult)\n return;\n // It is! We can\n const [prefix, content] = matchResult;\n // If there is no content past the prefix, we don't have a command\n if (!content) {\n // But a lone mention will trigger the default command instead\n if (!prefix || !prefix.match(this.mentionPrefixRegExp))\n return;\n const defaultCommand = this.defaultCommand;\n if (!defaultCommand)\n return;\n defaultCommand.execute(msg, [], Object.assign({\n client: this,\n prefix,\n }, this.contextAdditions));\n return;\n }\n // Separate command name from arguments and find command object\n const args = content.split(' ');\n const commandName = args.shift();\n if (commandName === undefined)\n return;\n const command = this.commandForName(commandName);\n // Construct a full context object now that we have all the info\n const fullContext = Object.assign({\n prefix,\n commandName,\n }, partialContext);\n // If the message has command but that command is not found\n if (!command) {\n this.emit('invalidCommand', msg, args, fullContext);\n return;\n }\n // Do the things\n this.emit('preCommand', command, msg, args, fullContext);\n const executed = yield command.execute(msg, args, fullContext);\n if (executed)\n this.emit('postCommand', command, msg, args, fullContext);\n });\n }", "title": "" }, { "docid": "12ea1cfc36ddf15fe9ac3bff9888d638", "score": "0.44162202", "text": "_emitCommandsd() {\n const commands = [];\n\n for (const [cmd, { description }] of this.commands) {\n commands.push({ cmd, description });\n }\n\n process.send({ type: 'commands', commands });\n }", "title": "" }, { "docid": "c6bd3637f054a92001624864646a5e8c", "score": "0.44144183", "text": "function proxyToContent(method) {\n return function () {\n return Ember.get(this, 'content')[method](...arguments);\n };\n}", "title": "" }, { "docid": "4eae287ec950ba4302aa93215e8d1793", "score": "0.44126722", "text": "get content() {\n\t\treturn this.__content;\n\t}", "title": "" }, { "docid": "693c3cfff718f4ab5cfde81d5c111531", "score": "0.43972087", "text": "function RepositoryBrowserControllerProxy() {\r\n\r\n // This function is called after the Save dialog has been used\r\n this.remoteSave = function( myFilename, mySolution, myPath, myType, myOverwrite ) {\r\n\t\t//console.log(\"save state:\" + myFilename);\r\n\t\tthis.pluginSave({\r\n \tfullpath :mySolution+myPath+'/'+myFilename,\r\n \t\"filename\":myFilename,\r\n \tsolution :mySolution,\r\n \tpath :myPath,\r\n \ttype :myType,\r\n \toverwrite:myOverwrite\r\n });\r\n } //end remoteSave\r\n}", "title": "" }, { "docid": "86829d289ebea22a5e726bfe3d6f452e", "score": "0.43849868", "text": "function push (controller, type, id, content) {\n if (controller) { \n $.post( '/'+controller+'/ajaxPush', {\n 'type': type,\n 'id': id,\n 'content': content\n }, function( data ) {\n //alert(data);\n }); \n }\n}", "title": "" }, { "docid": "b898f237730a34dcf76396a7f0bafbcb", "score": "0.43706504", "text": "_registerContent(contentId, contentType) {\n // If content has already been registered, no further contentIds are registered.\n if (this.contentType && this.contentType !== contentType) {\n return;\n }\n this.contentId = contentId;\n if (contentType !== 'listbox' && contentType !== 'dialog') {\n throw Error('CdkComboboxPanel currently only supports listbox or dialog content.');\n }\n this.contentType = contentType;\n this.contentIdUpdated.next(this.contentId);\n this.contentTypeUpdated.next(this.contentType);\n }", "title": "" }, { "docid": "ab7a2a329db2f025e0baceb84a070ae1", "score": "0.43669903", "text": "getLoadContent(context, { manager, disk, path }) {\n GET.content(disk, path).then((response) => {\n if (response.data.result.status === 'success') {\n context.commit(`${manager}/setDirectoryContent`, response.data);\n }\n });\n }", "title": "" }, { "docid": "89775492b96463c91386a7e6b37bc1f2", "score": "0.43668112", "text": "function injectContent() {\r\n\tvar data = require(\"sdk/self\").data;\r\n\trequire('sdk/page-mod').PageMod({\r\n\t\tinclude: [\"*.gaiamobile.org\"],\r\n\t\tcontentScriptFile: [\r\n\t\t\tdata.url(\"ffos_runtime.js\"),\r\n\t\t\tdata.url(\"hardware.js\"),\r\n\r\n\t\t\tdata.url(\"lib/activity.js\"),\r\n\t\t\tdata.url(\"lib/apps.js\"),\r\n\t\t\tdata.url(\"lib/bluetooth.js\"),\r\n\t\t\tdata.url(\"lib/cameras.js\"),\r\n\t\t\tdata.url(\"lib/idle.js\"),\r\n\t\t\tdata.url(\"lib/keyboard.js\"),\r\n\t\t\tdata.url(\"lib/mobile_connection.js\"),\r\n\t\t\tdata.url(\"lib/power.js\"),\r\n\t\t\tdata.url(\"lib/set_message_handler.js\"),\r\n\t\t\tdata.url(\"lib/settings.js\"),\r\n\t\t\tdata.url(\"lib/wifi.js\")\r\n\t\t],\r\n\t\tcontentScriptWhen: \"start\",\r\n\t\tattachTo: ['existing', 'top', 'frame']\r\n\t})\r\n\r\n\trequire('sdk/page-mod').PageMod({\r\n\t\tinclude: [\"*.homescreen.gaiamobile.org\"],\r\n\t\tcontentScriptFile: [\r\n\t\t\tdata.url(\"apps/homescreen.js\")\r\n\t\t],\r\n\t\tcontentScriptWhen: \"start\",\r\n\t\tattachTo: ['existing', 'top', 'frame']\r\n\t})\r\n\r\n}", "title": "" }, { "docid": "372515fec84fe855d12cd8933e0962c4", "score": "0.43631008", "text": "function commandEmbed(commands, allcmds, cmdSelection) {\r\n\r\n // Initialize data variable & get specific command info to store in command\r\n const commandInfo = [];\r\n const commandRestrictions = [];\r\n\r\n // check to determine if the command is given the command ID or the command name itself\r\n if (isNaN(cmdSelection)) {\r\n var command = commands.get(cmdSelection);\r\n } else {\r\n var command = commands.get(allcmds[cmdSelection]);\r\n }\r\n\r\n // Add information about the command into commandInfo & the format in specificInfo to send, with error checking\r\n if (command.aliases) commandInfo.push(`**Aliases:** ${command.aliases.join(', ')}`);\r\n if (command.requiredPermissions) commandInfo.push(`**Required Permissions:** ${command.aliases.join(', ')}`);\r\n if (command.usage) commandInfo.push(`\\n**Usage:** \\`\\`\\`${prefix}${command.name} ${command.usage}\\`\\`\\``);\r\n if (!command.usage) commandInfo.push(`\\n**Usage:** \\`\\`\\`${prefix}${command.name}\\`\\`\\``);\r\n\r\n // Add information about command restrictions into commandRestrictions, using vb formatting to only highlight boolean values\r\n commandRestrictions.push(`**Command Restrictions**`)\r\n commandRestrictions.push(`\\`\\`\\`vb\\n`);\r\n commandRestrictions.push(`Needs arguments: ${command.args}\\n`);\r\n commandRestrictions.push(`Needs a tagged user: ${command.needsTaggedUser}\\n`);\r\n commandRestrictions.push(`Server Only: ${command.guildOnly}\\n`);\r\n commandRestrictions.push(`Developer Only: ${command.developerOnly}\\n`);\r\n commandRestrictions.push(`\\`\\`\\``);\r\n\r\n // check to ensure there isn't a blank variable passed to the embed field\r\n specificInfo = commandInfo, { split: true };\r\n if (specificInfo == ``) {\r\n specificInfo = `No additional info yet!`;\r\n }\r\n\r\n // create embed for the selected command\r\n const commandEmbed = new MessageEmbed()\r\n .setAuthor('Wall-E Bot Help', 'https://unitedtheme.com/live-preview/starter-gazette/wp-content/uploads/2018/12/image-005-720x720.jpg')\r\n .setTitle(`Wall-E Command: ${command.name}`)\r\n .setDescription(command.description)\r\n .setColor(`CC743C`)\r\n .addFields(\r\n { name: `\\u200B`, value: `${specificInfo}` },\r\n { name: `\\u200B`, value: `${commandRestrictions.join(``)}` },\r\n { name: `\\u200B`, value: `Select ${crossmark.emote} to close this help window` }\r\n )\r\n .setTimestamp(Date.now())\r\n .setFooter(`Requested by: ${uName}`, message.author.displayAvatarURL({ format: \"png\", dynamic: true }))\r\n\r\n return commandEmbed;\r\n\r\n }", "title": "" }, { "docid": "dc8befece75200cb5f3268fd52b1d08f", "score": "0.43589082", "text": "function onMessageHandler (target, context, msg, self) {\n if (self) { return; } // Ignore messages from the bot\n\n console.log(target);\n console.log(context);\n console.log(msg);\n console.log(self);\n\n // Remove whitespace from chat message\n const commandName = msg.trim();\n\n // If the command is known, let's execute it\n switch(commandName) {\n case ('!dice'):\n const num = rollDice();\n client.say(target, `You rolled a ${num}`);\n console.log(`* Executed ${commandName} command`);\n break;\n case ('!gnome'):\n client.say(target, gnomeText);\n console.log(`* Executed ${commandName} command`);\n break;\n default:\n console.log(`* Unknown command ${commandName}`);\n break;\n }\n}", "title": "" }, { "docid": "ebdf29c9771b55453730fbf0bd869f3f", "score": "0.4358653", "text": "update () {\n devlog('update');\n this.emitter.emit(EMITTER.CHANGE_CONTENT, this.content);\n }", "title": "" }, { "docid": "048649f31db140cc0e0676be9e6fab98", "score": "0.43578508", "text": "handleUpdateReplicasDialog() {\n showUpdateReplicasDialog(\n this.mdDialog_, this.replicaSetDetail, this.updateReplicas_.bind(this));\n }", "title": "" }, { "docid": "2e47291628fed5ae557fd8d36480b367", "score": "0.4355211", "text": "function contextMenuWorkForRecycleBin(action, el, pos) {\r\n\r\n switch (action) {\r\n case \"delete\":\r\n {\r\n var contractTitle = $(el).find(\"#ContractTitle\").text();\r\n var entityid = $(el).find(\"#ContractID\").text();\r\n DeleteContractFromRecycleBin(contractTitle, entityid);\r\n break;\r\n }\r\n case \"viewdetails\":\r\n {\r\n var entityid = $(el).find(\"#ContractID\").text();\r\n location = \"/Contracts/ContractDetails?ContractID=\" + entityid;\r\n break;\r\n }\r\n case \"history\":\r\n {\r\n var contractID = $(el).find(\"#ContractID\").text();\r\n $(\"#hdContractID\").val(contractID);\r\n // $('#ddlHistoryFilter').val('All');\r\n CreateContractActivityList(contractID);\r\n break;\r\n }\r\n }\r\n}", "title": "" }, { "docid": "f958ac5fa3b17542321ca1ed49c175ea", "score": "0.43549424", "text": "function call_server(command, dataObj) {\n print(\"Server call - Command, DataObject -> \" + command + \" \"\n + JSON.stringify(dataObj));\n print(\"\");\n var msg = {\n \"action\" : command,\n \"data\" : dataObj.content\n };\n ws.send(JSON.stringify(msg));\n}", "title": "" }, { "docid": "03f8695dc3de6fd667c262b9cffd47da", "score": "0.43522638", "text": "function productServerEntityPasteHandler(data) {\n window.Optum.StepWise.Messaging.ShowAlert(\"This function is not currently implemented.\", \"Not Implemented Yet\");\n return;\n\n //var pasteDialog = $(\"#DesignerUrls\");\n //if (pasteDialog.length == 0) {\n // pasteDialog = $(\"<div id='ProductDesignerPasteDialog'></div>\");\n // pasteDialog.appendTo(\"body\");\n\n // var $body = $(\"body\");\n // var width = $body.width() - 20;\n // var height = $body.height() - 20;\n\n // pasteDialog.dialog({\n // autoOpen: false,\n // width: width,\n // height: height,\n // title: \"Pasting Entity\",\n // modal: true,\n // buttons: {\n // Save: function () {\n // var dlg = $(this);\n\n // // extract the form data into JSON object\n // var postModel = {\n // Code: $(\"#Code\", dlg).val(),\n // Name: $(\"#Name\", dlg).val(),\n // Attributes: [],\n // Defaults: [],\n // Applicables: [],\n // EntityRules: [],\n // AttributeRules: []\n // };\n\n // $(\"SELECT[name$='.ChangeState']\", dlg).each(function (i, s) {\n // //var tr = $(s).closest(\"tr\");\n // var re = /^([^\\[]*)\\[(\\d+)\\]\\..*$/ig;\n // var matches = re.exec(s.name);\n // if (matches.length > 1) {\n // var m = { ChangeState: $(s).val() };\n\n // m.SourceKey = $(\"input[type='hidden'][name='\" + matches[1] + \"[\" + matches[2] + \"].SourceKey']\").val();\n // m.DestinationKey = $(\"input[type='hidden'][name='\" + matches[1] + \"[\" + matches[2] + \"].DestinationKey']\").val();\n\n // postModel[matches[1]][matches[2]] = m;\n // }\n // });\n\n // var processUrl = $(\"#DesignerUrls\").data(\"process-change-url\");\n // $.ajax({\n // url: processUrl,\n // type: \"POST\",\n // dataType: 'json',\n // contentType: 'application/json; charset=utf-8',\n // data: JSON.stringify({ model: postModel }),\n // success: function (postResult) {\n // window.Optum.StepWise.CommonUI.ProcessCommands(postResult.Commands, dlg);\n\n // if (postResult.Success)\n // dlg.dialog(\"close\");\n // }\n // });\n // },\n // Cancel: function () {\n // $(this).dialog(\"close\");\n // }\n // }\n // });\n //}\n\n //// Convert the dictionary to a collection\n //var defaults = [];\n //for (var key in data.Data.DefaultCalculations) {\n // defaults.push({ StoragePath: key, CalcBlock: data.Data.DefaultCalculations[key] });\n //}\n //data.Data.DefaultCalculations = defaults;\n\n //var applicables = [];\n //for (var applKey in data.Data.ApplicableCalculations) {\n // applicables.push({ StoragePath: applKey, CalcBlock: data.Data.ApplicableCalculations[applKey] });\n //}\n //data.Data.ApplicableCalculations = applicables;\n\n //var destinationEntityCode = null;\n //var tabPanel = window.Optum.StepWise.Designer.GetCurrentTabPanel();\n //if (tabPanel.length > 0) {\n // destinationEntityCode = tabPanel.find(\"div.designer-surface #Entity_Code\").val();\n //}\n\n //// Open dialog with change information\n //var url = $(\"#DesignerUrls\").data(\"paste-entity-url\");\n //$.ajax({\n // url: url,\n // type: \"POST\",\n // dataType: 'html',\n // contentType: 'application/json; charset=utf-8',\n // data: JSON.stringify({ model: data.Data, destinationEntityCode: destinationEntityCode }),\n // success: function (htmlResult) {\n // pasteDialog.html(htmlResult);\n\n // pasteDialog.find(\"div.change-tabs\").tabs();\n\n // pasteDialog.dialog(\"open\");\n // }\n //});\n }", "title": "" }, { "docid": "bb10199acfbdc45c4b1d7261c8ed2773", "score": "0.43471897", "text": "function commandButtonHandle(){\n\t\tswitch(this.id){\n\t\t\tcase \"commandbutton_1\":\n\t\t\t\tonDealCardsClicked();\n\t\t\t\tbreak;\n\t\t\tcase \"commandbutton_2\":\n\t\t\t\tonMaxBetClicked();\n\t\t\t\tbreak;\n\t\t\tcase \"commandbutton_3\":\n\t\t\t\tonAddFiveClicked();\n\t\t\t\tbreak;\n\t\t\tcase \"commandbutton_4\":\n\t\t\t\tonRemoveFiveClicked();\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "fb3b4cb46f3fa75502a96957acaa676a", "score": "0.43454975", "text": "function contextMenuWorkRecycleBin(action, el, pos) {\r\n\r\n switch (action) {\r\n case \"delete\":\r\n {\r\n var requestTitle = $(el).find(\"#RequestTitle\").text();\r\n var entityid = $(el).find(\"#RequestID\").text();\r\n DeleteRequestFromRecyclebin(entityid, requestTitle);\r\n\r\n break;\r\n }\r\n case \"viewdetails\":\r\n {\r\n var entityid = $(el).find(\"#RequestID\").text();\r\n if (entityid != \"\") {\r\n location = \"/Pipeline/RequestDetails?RequestID=\" + entityid + \"&View=\" + ObjectNameToSend;\r\n }\r\n\r\n break;\r\n }\r\n case \"history\":\r\n {\r\n\r\n var requestID = $(el).find(\"#RequestID\").text();\r\n CreateRequestActivityList(requestID);\r\n break;\r\n }\r\n }\r\n}", "title": "" }, { "docid": "0c3a24475cb33fb1d90b90cf4d8ef4c6", "score": "0.434522", "text": "function connectToContentPage(tabID) {\r\n if (inExtensionPage) {\r\n // messaging with chrome.runtime.Port.sendMessage and chrome.runtime.Port.onMessage\r\n port = chrome.tabs.connect(tabID, {name:\"popup window\"});\r\n port.onMessage.addListener(onContentPageMessage);\r\n } else {\r\n // messaging with window.postMessage and window.addEventListner(\"message\", function )\r\n port = {\r\n postMessage: function(msg) {\r\n window.top.postMessage(msg, \"*\");\r\n }\r\n };\r\n // onMessage is in function window.addEventListener at about line 21\r\n }\r\n \r\n port.postMessage({method:\"GetAllMessages\"});\r\n}", "title": "" }, { "docid": "6e3750fb355ed5d3f453ec5de392de22", "score": "0.43428403", "text": "function _processContentEvent(event) {\n //console.log(\"_handleContentEvent\");\n\n // get current content (lazily load)\n let theContent = _getContent(event);\n if (theContent.length > 0 && _containsPrintableContent(theContent)) {\n event.value = JSON.stringify(theContent);\n event.last = (new Date()).getTime();\n event.node = null;\n\n // console.log(\"Send content-event for \" + event.id + \" to background-script: \" + event.value);\n browser.runtime.sendMessage(event);\n }\n}", "title": "" }, { "docid": "215d01b2f5879b608a3829b3b7344b6e", "score": "0.43425795", "text": "function contentScriptWorker() {\n runtime.sendMessage({\n type: SIGN_CONNECT\n }, function (msg) {\n return console.info(msg);\n });\n runtime.onMessage.addListener(function (_ref) {\n var type = _ref.type,\n payload = _ref.payload;\n\n switch (type) {\n case SIGN_RELOAD:\n logger(\"Detected Changes. Reloading ...\");\n reloadPage && window.location.reload();\n break;\n\n case SIGN_LOG:\n console.info(payload);\n break;\n }\n });\n } // ======================== Called only on background scripts ============================= //", "title": "" }, { "docid": "b1cdcce7121b9e014622e1f25475c7bc", "score": "0.43408093", "text": "function adaptersContentViewModel() {\n var self = this;\n \n self.handleActivated = function(info) {\n self.catalog = Catalog.app.createInstance(headerModel, filterPanelModel, listViewModel, \"Adapter\");\n self.fetchData(self.catalog);\n };\n\n self.fetchData = function (catalog) {\n service.get(listViewModel.restURL).then(\n function (res) {\n listViewModel.response = res.data;\n catalog.refresh();\n },\n function (err) {\n console.log(err);\n }\n );\n };\n\n self.handleAttached = function (info) {\n $(Catalog.catalogTemplate).appendTo($('#metadata-list-container'));\n };\n \n self.createView = function() {\n return Catalog.catalogTemplate;\n } \n }", "title": "" }, { "docid": "08571ed29814e436a27e8820a0aa0b94", "score": "0.43377534", "text": "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 const user = context[\"display-name\"];\n const isMod = context[\"mod\"];\n const isSubscriber = context[\"subscriber\"];\n const entry = msg.substring(\"!entry\".length).trim()\n\n console.log(\"msg:\" + msg);\n\n if (commandName.startsWith(\"!entry \")) {\n if(!marblesMap.has(user)) {\n marblesMap.set(user, [])\n }\n\n let entryList = marblesMap.get(user);\n let numEntriesLeft = 0;\n let entryAdded = true;\n if(isSubscriber && entryList.length < 8) {\n entryList.push(entry);\n numEntriesLeft = 8 - entryList.length;\n } else if (entryList.length < 4) {\n entryList.push(entry);\n numEntriesLeft = 4 - entryList.length;\n } else {\n entryAdded = false;\n }\n\n if (entryAdded) {\n client.say(target, \"Enrty from: \" + user + \"! Number of entries left:\" + numEntriesLeft)\n } else {\n client.say(target, \"Sorry \" + user + \", you have run out of entries!\")\n }\n }\n}", "title": "" }, { "docid": "e7e087cac7fd30f59691d33540fc3d7f", "score": "0.4336683", "text": "__receiveMessage(msg) {\n var implCmdName = '_cmd_' + msg.type;\n if (!(implCmdName in this)) {\n logic(this, 'badMessageTypeError', { type: msg.type });\n return;\n }\n try {\n let namedContext = msg.handle &&\n this.bridgeContext.maybeGetNamedContext(msg.handle);\n if (namedContext) {\n if (namedContext.pendingCommand) {\n console.warn('deferring', msg);\n namedContext.commandQueue.push(msg);\n } else {\n let promise = namedContext.pendingCommand =\n this._processCommand(msg, implCmdName);\n if (promise) {\n this._trackCommandForNamedContext(namedContext, promise);\n }\n }\n } else {\n let promise = this._processCommand(msg, implCmdName);\n // If the command went async, then it's also possible that the command\n // grew a namedContext and that we therefore need to get it and set up the\n // bookkeeping so that if any other commands come in on this handle before\n // the promise is resolved that we can properly queue them.\n if (promise && msg.handle) {\n namedContext = this.bridgeContext.maybeGetNamedContext(msg.handle);\n if (namedContext) {\n namedContext.pendingCommand = promise;\n this._trackCommandForNamedContext(namedContext, promise);\n }\n }\n }\n } catch (ex) {\n logic(this, 'cmdError', { type: msg.type, ex, stack: ex.stack });\n }\n }", "title": "" }, { "docid": "869d600ccf59324ce4ba0da065693369", "score": "0.4330316", "text": "function reguest(cmd, data) {\n return new Promise((resolve, reject) => {\n chrome.runtime.sendMessage(\n selfid, {\n \"from\": 'content',\n \"cmd\": cmd,\n \"data\": data\n },\n function(result) {\n if (result) {\n resolve(result);\n } else {\n reject(Error(\"Undefined bg response\"));\n }\n return true;\n }\n );\n });\n }", "title": "" }, { "docid": "3ae87ab7e10738ee2a7bdf827fffa6ca", "score": "0.43264154", "text": "init() {\n Nova.$on(`ckeditor:media:${this.attribute}:write`, this.writeContent.bind(this))\n this.ui.componentFactory.add('mediaBrowser', this.createButton.bind(this))\n }", "title": "" }, { "docid": "eda8426f6f982eea1230344e0ee90836", "score": "0.43181092", "text": "function sendCommand(cmd, data) {\n serverWindow.postMessage({cmd: cmd, data: data}, \"*\")\n }", "title": "" }, { "docid": "eae17340f60ecbd99054053e0192c623", "score": "0.43134314", "text": "function ContentList(options) {\n var instance = (options.instance !== null && options.instance !== undefined) ? options.instance : this;\n var extender = new InstanceExtender();\n \n if (options.instance === null || options.instance === undefined) {\n instance = extender.extendNewInstance({ 'instance': instance, 'options': options});\n }\n \n //extend from object view\n var extOptions = Object.create(options);\n extOptions.instance = instance;\n extOptions.events = false;\n instance = ObjectView(extOptions);\n \n /// <summary>Gets type of view.</summary>\n instance.getType = function () {\n return 'ContentList';\n };\n \n /// <summary>Clears (resets) observer records list and view.</summary>\n instance.clearRecords = function () {\n\n if (instance.getObserverInterface() !== null && instance.getObserverInterface() !== undefined) {\n \n if (instance.getObserverInterface().getType() === 'ListObserver' \n || instance.getObserverInterface().getType() === 'ListKNObserver') {\n \n instance.getObserverInterface().clearList();\n instance.getObserverInterface().displayProcessing(false);\n \n }\n }\n };\n\n /// <summary>\n /// Find records based on provided keyword (via observer keyword property) and page number.\n /// if observer is not available then finds records based on options.keyword, options.size, options.page and options.fill.\n /// </summary>\n instance.find = function (options) {\n \n if (instance.getObserverInterface() !== null && instance.getObserverInterface() !== undefined) {\n \n instance.getObserverInterface().displayProcessingActivity();\n instance.getCRUDProcessor().find({\n 'uri': instance.URI,\n 'contentType': options.contentType,\n 'keyword': (options.keyword !== null && options.keyword !== undefined) ? options.keyword : instance.getObserverInterface().getKeyword(),\n 'size': (options.size !== null && options.size !== undefined) ? options.size : (instance.getObserverInterface().getListSize() !== null && instance.getObserverInterface().getListSize() !== undefined) ? instance.getObserverInterface().getListSize() : 10,\n 'page': options.page,\n 'fill': options.fill\n });\n \n } else {\n \n instance.getCRUDProcessor().find({\n 'uri': instance.URI,\n 'contentType': options.contentType,\n 'keyword': options.keyword,\n 'size': options.size,\n 'page': options.page,\n 'fill': options.fill\n });\n }\n };\n \n /// <summary>Get component from record.</summary>\n instance.getRecordComponent = function (record) {\n \n var component;\n var recordOptions = Object.create(instance.newOptions());\n recordOptions.objectkey = record.getKey();\n\n if (instance.newOptions().subjectf !== null\n && instance.newOptions().subjectf !== undefined) {\n\n recordOptions.subject = Util().extractFieldValue(record[instance.newOptions().subjectf], \"\");\n }\n\n if (instance.newOptions().descriptionf !== null\n && instance.newOptions().descriptionf !== undefined) {\n\n recordOptions.description = Util().extractFieldValue(record[instance.newOptions().descriptionf], \"\");\n }\n\n if (instance.newOptions().urlf !== null\n && instance.newOptions().urlf !== undefined) {\n\n recordOptions.url = Util().extractFieldValue(record[instance.newOptions().urlf], \"\");\n }\n\n if (instance.newOptions().urltitlef !== null\n && instance.newOptions().urltitlef !== undefined) {\n\n recordOptions.urltitle = Util().extractFieldValue(record[instance.newOptions().urltitlef], \"\");\n }\n\n if (instance.newOptions().textviewhtmlf !== null\n && instance.newOptions().textviewhtmlf !== undefined) {\n\n recordOptions.html = Util().extractFieldValue(record[instance.newOptions().textviewhtmlf], \"\");\n }\n\n if (instance.newOptions().textviewcssf !== null\n && instance.newOptions().textviewcssf !== undefined) {\n\n recordOptions.css = Util().extractFieldValue(record[instance.newOptions().textviewcssf], \"\");\n }\n\n if (instance.newOptions().imagenamef !== null\n && instance.newOptions().imagenamef !== undefined) {\n\n recordOptions.imagename = Util().extractFieldValue(record[instance.newOptions().imagenamef], \"\");\n }\n\n if (instance.newOptions().imagepathf !== null\n && instance.newOptions().imagepathf !== undefined) {\n\n recordOptions.imagepath = Util().extractFieldValue(record[instance.newOptions().imagepathf], \"\");\n }\n\n if (instance.newOptions().imagetitlef !== null\n && instance.newOptions().imagetitlef !== undefined) {\n\n recordOptions.imagetitle = Util().extractFieldValue(record[instance.newOptions().imagetitlef], \"\");\n }\n \n if (instance.newOptions().imagewidthf !== null\n && instance.newOptions().imagewidthf !== undefined) {\n\n recordOptions.imagewidth = Util().extractFieldValue(record[instance.newOptions().imagewidthf], \"\");\n }\n\n if (instance.newOptions().imageheightf !== null\n && instance.newOptions().imageheightf !== undefined) {\n\n recordOptions.imageheight = Util().extractFieldValue(record[instance.newOptions().imageheightf], \"\");\n }\n\n if (instance.newOptions().imageviewhtmlf !== null\n && instance.newOptions().imageviewhtmlf !== undefined) {\n\n recordOptions.html = Util().extractFieldValue(record[instance.newOptions().imageviewhtmlf], \"\");\n }\n\n if (instance.newOptions().imageviewcssf !== null\n && instance.newOptions().imageviewcssf !== undefined) {\n\n recordOptions.css = Util().extractFieldValue(record[instance.newOptions().imageviewcssf], \"\");\n }\n\n if (instance.newOptions().videosrcf !== null\n && instance.newOptions().videosrcf !== undefined) {\n\n recordOptions.videosrc = Util().extractFieldValue(record[instance.newOptions().videosrcf], \"\");\n }\n\n if (instance.newOptions().crossoriginf !== null\n && instance.newOptions().crossoriginf !== undefined) {\n\n recordOptions.crossorigin = Util().extractFieldValue(record[instance.newOptions().crossoriginf], \"\");\n }\n\n if (instance.newOptions().posterf !== null\n && instance.newOptions().posterf !== undefined) {\n\n recordOptions.poster = Util().extractFieldValue(record[instance.newOptions().posterf], \"\");\n }\n\n if (instance.newOptions().preloadf !== null\n && instance.newOptions().preloadf !== undefined) {\n\n recordOptions.preload = Util().extractFieldValue(record[instance.newOptions().preloadf], \"\");\n }\n\n if (instance.newOptions().autoplayf !== null\n && instance.newOptions().autoplayf !== undefined) {\n\n recordOptions.autoplay = Util().extractFieldValue(record[instance.newOptions().autoplayf], \"\");\n }\n\n if (instance.newOptions().mediagroupf !== null\n && instance.newOptions().mediagroupf !== undefined) {\n\n recordOptions.mediagroup = Util().extractFieldValue(record[instance.newOptions().mediagroupf], \"\");\n }\n\n if (instance.newOptions().loopf !== null\n && instance.newOptions().loopf !== undefined) {\n\n recordOptions.loop = Util().extractFieldValue(record[instance.newOptions().loopf], \"\");\n }\n\n if (instance.newOptions().mutedf !== null\n && instance.newOptions().mutedf !== undefined) {\n\n recordOptions.muted = Util().extractFieldValue(record[instance.newOptions().mutedf], \"\");\n }\n\n if (instance.newOptions().controlsf !== null\n && instance.newOptions().controlsf !== undefined) {\n\n recordOptions.controls = Util().extractFieldValue(record[instance.newOptions().controlsf], instance.newOptions().controls);\n } else {\n\n if (instance.newOptions().controls !== null\n && instance.newOptions().controls !== undefined) {\n\n recordOptions.controls = instance.newOptions().controls;\n }\n }\n\n if (instance.newOptions().videowidthf !== null\n && instance.newOptions().videowidthf !== undefined) {\n\n recordOptions.videowidth = Util().extractFieldValue(record[instance.newOptions().videowidthf], \"\");\n }\n\n if (instance.newOptions().videoheightf !== null\n && instance.newOptions().videoheightf !== undefined) {\n\n recordOptions.videoheight = Util().extractFieldValue(record[instance.newOptions().videoheightf], \"\");\n }\n\n if (instance.newOptions().avviewhtmlf !== null\n && instance.newOptions().avviewhtmlf !== undefined) {\n\n recordOptions.html = Util().extractFieldValue(record[instance.newOptions().avviewhtmlf], \"\");\n }\n\n if (instance.newOptions().avviewcssf !== null\n && instance.newOptions().avviewcssf !== undefined) {\n\n recordOptions.css = Util().extractFieldValue(record[instance.newOptions().avviewcssf], \"\");\n }\n\n if (recordOptions.subject.length > 0) {\n //viewType = \"TextView\";\n component = new TextView(recordOptions);\n }\n\n if (recordOptions.imagepath.length > 0) {\n //viewType = \"ImageView\";\n recordOptions.imagepath = (instance.newOptions().contextpath !== null && instance.newOptions().contextpath !== undefined) ? instance.newOptions().contextpath + recordOptions.imagepath : recordOptions.imagepath;\n component = new ImageView(recordOptions);\n }\n\n if (recordOptions.videosrc.length > 0) {\n //viewType = \"AVView\";\n recordOptions.videosrc = (instance.newOptions().contextpath !== null && instance.newOptions().contextpath !== undefined) ? instance.newOptions().contextpath + recordOptions.videosrc : recordOptions.videosrc;\n component = new AVView(recordOptions);\n }\n \n return component;\n };\n \n /// <summary>Present view with input values and html format.</summary>\n instance.presentView = function (options) {\n var htmlOutput = \"\";\n var records = [];\n\n if (options !== null && options !== undefined) {\n\n if (options.records !== null && options.records !== undefined) {\n\n records = options.records;\n\n } else {\n\n records = instance.getCRUDProcessor().getRecords();\n }\n } else {\n\n records = instance.getCRUDProcessor().getRecords();\n }\n\n for (var i = 0; i < records.length; i++) {\n \n htmlOutput += instance.getRecordComponent(records[i]).presentView();\n }\n \n return htmlOutput;\n };\n \n if (instance.getObserverInterface() !== null &&\n instance.getObserverInterface() !== undefined) {\n \n /** \n * Observer clearRecords function definition.\n * \n * @returns {undefined}\n */\n instance.getObserverInterface().clearRecords = function () {\n instance.clearRecords();\n };\n \n /** \n * Observer find function definition.\n * \n * @param {type} options\n * @returns {undefined}\n */\n instance.getObserverInterface().find = function (options) {\n instance.find(options);\n };\n \n /** \n * Observer find function definition.\n * \n * @param {type} options\n * @returns {undefined}\n */\n instance.getObserverInterface().presentView = function (options) {\n instance.presentView(options);\n };\n }\n \n if (instance.getObserverObject() !== null &&\n instance.getObserverObject() !== undefined) {\n \n /** \n * Observer clearRecords function definition.\n * \n * @returns {undefined}\n */\n instance.getObserverObject().clearRecords = function () {\n instance.clearRecords();\n };\n \n /**\n * Observer find function definition.\n * \n * @param {type} options\n * @returns {undefined}\n */\n instance.getObserverObject().find = function (options) {\n instance.find(options);\n };\n \n /** \n * Observer find function definition.\n * \n * @param {type} options\n * @returns {undefined}\n */\n instance.getObserverObject().presentView = function (options) {\n instance.presentView(options);\n };\n }\n \n /// <summary>Error processing and presenting event subscription.</summary>\n instance.presentErrors = function (event, eventData) {\n\n if (eventData.data.callback !== null &&\n eventData.data.callback !== undefined) {\n\n eventData.data.callback(eventData.result);\n } else {\n\n var htmlErrorOutput = \"An error has occured.\";\n if (instance.getMessageRepository() !== null && instance.getMessageRepository() !== undefined) {\n htmlErrorOutput = instance.getMessageRepository().get(\"standard.err.text\");\n }\n\n if ((instance.ErrorNode !== null && instance.ErrorNode !== undefined)\n || (instance.contenNode !== null && instance.contenNode !== undefined)) {\n\n htmlErrorOutput = \"\";\n for (var i = 0; i < instance.getErrors().length; i++) {\n\n htmlErrorOutput += (instance.getErrors()[i] + \". \");\n\n }\n }\n\n if (instance.ErrorNode !== null && instance.ErrorNode !== undefined) {\n\n instance.ErrorNode.innerHTML = htmlErrorOutput;\n\n } else if (instance.ContentNode !== null && instance.ContentNode !== undefined) {\n\n instance.ContentNode.innerHtml = htmlErrorOutput;\n\n } else {\n\n if (instance.getObserverInterface() !== null\n && instance.getObserverInterface() !== undefined) {\n\n instance.getObserverInterface().displayClearActivity();\n instance.getObserverInterface().setErrors(instance.getErrors());\n }\n }\n }\n };\n\n /// <summary>Multiple records processing and presenting event subscription.</summary>\n instance.presentRecords = function (event, eventData) {\n\n if (eventData.data.callback !== null &&\n eventData.data.callback !== undefined) {\n\n eventData.data.callback(eventData.result);\n } else {\n\n if (instance.ContentNode !== null && instance.ContentNode !== undefined) {\n\n instance.ContentNode.innerHTML = instance.presentView();\n\n } else {\n\n if (instance.getObserverInterface() !== null\n && instance.getObserverInterface() !== undefined) {\n\n var records;\n\n if (instance.getObserverInterface().getType() === \"ListObserver\" ||\n instance.getObserverInterface().getType() === \"ListKNObserver\") {\n\n if (instance.getObserverInterface().getListObject().getContentTypeObjectPrototype() !== null\n && instance.getObserverInterface().getListObject().getContentTypeObjectPrototype() !== undefined) {\n\n records = instance.getContentTypeObjects({'simpleObjects': eventData.result, 'contentPrototype': instance.getObserverInterface().getListObject().getContentTypeObjectPrototype()});\n }\n\n } else {\n\n records = (instance.getObserverInterface().getContentTypeObject() !== null && instance.getObserverInterface().getContentTypeObject() !== undefined) ? instance.getContentTypeObjects({'simpleObjects': eventData.result}) : eventData.result;\n }\n\n instance.getObserverInterface().clearList();\n\n for (var i = 0; i < records.length; i++) {\n //var viewType = \"TextView\";\n instance.getObserverInterface().newItem({'object': instance.getRecordComponent(records[i]) });\n }\n \n instance.getObserverInterface().displaySuccessActivity();\n }\n }\n }\n\n $(window).trigger('view-direction-change');\n };\n \n /// <summary>Presents request failure.</summary>\n instance.presentFailRequest = function (event, eventData) {\n \n if (eventData.data.callback !== null &&\n eventData.data.callback !== undefined) {\n\n eventData.data.callback(eventData.result);\n } else {\n \n var htmlErrorOutput = \"An error has occured.\";\n if (instance.getMessageRepository() !== null && instance.getMessageRepository() !== undefined) {\n htmlErrorOutput = instance.getMessageRepository().get(\"standard.err.text\");\n }\n \n if (instance.ErrorNode !== null && instance.ErrorNode !== undefined) {\n \n instance.ErrorNode.innerHTML = htmlErrorOutput;\n \n } else if (instance.ContentNode !== null && instance.ContentNode !== undefined) {\n\n instance.ContentNode.innerHtml = htmlErrorOutput;\n \n } else {\n \n if (instance.getObserverInterface() !== null\n && instance.getObserverInterface() !== undefined) {\n \n instance.getObserverInterface().displayFailureActivity();\n }\n }\n }\n };\n\n /// <summary>Subscribe CRUDProcessor events.</summary>\n instance.subscribeEvents = function (eventsInstance) {\n eventsInstance = (eventsInstance !== null && eventsInstance !== undefined) ? eventsInstance : instance;\n \n $(instance.getCRUDProcessor()).on('errors.processor.CRUD.WindnTrees', eventsInstance.presentErrors);\n $(instance.getCRUDProcessor()).on('records.processor.CRUD.WindnTrees', eventsInstance.presentRecords);\n $(instance.getCRUDProcessor()).on('fail.processor.CRUD.WindnTrees', eventsInstance.presentFailRequest);\n };\n \n /// <summary>Subscribe CRUDProcessor events.</summary>\n instance.unSubscribeEvents = function (eventsInstance) {\n \n eventsInstance = (eventsInstance !== null && eventsInstance !== undefined) ? eventsInstance : instance;\n \n $(instance.getCRUDProcessor()).off('errors.processor.CRUD.WindnTrees', eventsInstance.presentErrors);\n $(instance.getCRUDProcessor()).off('records.processor.CRUD.WindnTrees', eventsInstance.presentRecords);\n $(instance.getCRUDProcessor()).off('fail.processor.CRUD.WindnTrees', eventsInstance.presentFailRequest);\n };\n \n if (options.events !== null && options.events !== undefined) {\n if (options.events) {\n instance.subscribeEvents();\n }\n } else {\n instance.subscribeEvents();\n }\n \n if (options.contextpath !== null && options.contextpath !== undefined) {\n if (options.contextpath === 'load') {\n instance.loadContextPath();\n }\n }\n \n if (options.instance !== null && options.instance !== undefined) {\n return Object.create(instance);\n }\n \n return instance;\n}", "title": "" }, { "docid": "c6d901b9d6aca8c805bc0e0baf64a899", "score": "0.43131545", "text": "get content() {\n return this.#content;\n }", "title": "" }, { "docid": "9c75f469fa05ff7f75e8221f4fcaa5af", "score": "0.43110308", "text": "recieve(message) {\n const params = message.split(\" \");\n const invoked = this.commandCenter.invoke(params[0], this, ...params.splice(1));\n if(!invoked) {\n this.send(message);\n }\n }", "title": "" }, { "docid": "d4b025041a8d3b2fa5a2f22ff271e1c5", "score": "0.43099183", "text": "function editContent (contentId) {\n\t\t$(\"#contentId\").val(contentId);\n\t\tloadContent ();\n\t\tconfigContentButtons();\n\t\tchangeScreen ('add-content-container','content-list-container');\t\n\t}", "title": "" }, { "docid": "83a6874674ea5c361917f7e3c65a201c", "score": "0.43094587", "text": "function _postMessage(command, args, cb) {\n try {\n var msg = args || {};\n\n msg.req_id = _getNextReqId();\n msg.cmd = command;\n\n _callbacks[msg.req_id] = cb;\n\n extension.postMessage(JSON.stringify(msg));\n } catch (e) {\n ERR('PostMessage Exception : ' + e);\n }\n }", "title": "" }, { "docid": "81305b235199c398b2c86c13a750feee", "score": "0.4309205", "text": "function IExposeCommandsEx() {}", "title": "" }, { "docid": "333629faebd1258d024fea0b1631c885", "score": "0.43051255", "text": "function injectCalendarCommandController() {\n calendarController.defaultController = document.getElementById(\"tabmail\").tabController;\n top.controllers.insertControllerAt(0, calendarController);\n document.commandDispatcher.updateCommands(\"calendar_commands\");\n}", "title": "" }, { "docid": "38e8964dfa3cae85a09b5333d091676d", "score": "0.43027824", "text": "browse() {\n \n // Save the call in memory.\n this.memory('browse', Array.from(arguments));\n\n // Execute the request.\n return this.request('GET', 'browse/');\n\n }", "title": "" }, { "docid": "97d08a46d61ab791ba71046d8a8f1fca", "score": "0.4300323", "text": "get contents() {\n return this.#content;\n }", "title": "" }, { "docid": "814ea99d2035812d5448fcbb647975a3", "score": "0.4297259", "text": "handleWebMessage(message) {\n console.log('Mensaje desde Web: ' + message);\n if (message === 'estado'){\n this.verificarEstado();\n return;\n }\n serverClient.publish('Espino/commands', message);\n }", "title": "" }, { "docid": "81e2db20633a3078ffc5791c5c31a417", "score": "0.42953122", "text": "function handleCommand(bot, body, user, type) {\n\n /* Vote command */\n if (new RegExp(/^v [1-4]{1,4}$|^vote [1-4]{1,4}$|^votar [1-4]{1,4}$/).test(body)) {\n let nok = false;\n for (let i = body.indexOf(' '); i < body.length; i ++) {\n if (body.indexOf(body[i]) != body.lastIndexOf(body[i])) nok = true;\n }\n if (!nok) {\n CommandHandlers.onVoteCommand(bot, ACCOUNTS.BOT_JID, body, user, type);\n return;\n }\n }\n\n /* Select command */\n if (new RegExp(/^s [A-Za-z0-9]{5}$|^select [A-Za-z0-9]{5}$|^seleccionar [A-Za-z0-9]{5}$/)\n .test(body)) {\n CommandHandlers.onSelectCommand(bot, ACCOUNTS.BOT_JID, body, user, type);\n return;\n }\n\n /* Other commands */\n switch (body) {\n\n case '':\n case 'h':\n case 'help':\n CommandHandlers.onHelpCommand(bot, ACCOUNTS.BOT_JID, body, user, type);\n break;\n\n case 'c':\n case 'commands':\n case 'comandos':\n CommandHandlers.onCommandsCommand(bot, ACCOUNTS.BOT_JID, body, user, type);\n break;\n\n case 'l':\n case 'list':\n case 'listado':\n CommandHandlers.onListCommand(bot, ACCOUNTS.BOT_JID, body, user, type);\n break;\n\n case 'd':\n case 'discard':\n case 'descartar':\n CommandHandlers.onDiscardCommand(bot, ACCOUNTS.BOT_JID, body, user, type);\n break;\n\n case 'b':\n case 'a':\n case 'back':\n case 'atras':\n CommandHandlers.onBackCommand(bot, ACCOUNTS.BOT_JID, body, user, type);\n break;\n\n case 'i':\n case 'info':\n case 'informacion':\n case 'información':\n CommandHandlers.onInfoCommand(bot, ACCOUNTS.BOT_JID, body, user, type);\n break;\n\n default:\n CommandHandlers.onCommandError(bot, ACCOUNTS.BOT_JID, body, user, type);\n break;\n }\n\n}", "title": "" }, { "docid": "8e245e5af39a4cdbd56ac748264b8130", "score": "0.42929685", "text": "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 }", "title": "" }, { "docid": "ec7d82a5e70b12e6111222da6f8ffe94", "score": "0.42902583", "text": "function onMessageHandler (target, user, msg, self) {\r\n if (self) return; // Ignore messages from the bot\r\n if(msg[0]!=='!') return; // Not a command\r\n // Create obj holding command properties\r\n const cmd = getCmd(msg);\r\n // If the command is known, let's execute it\r\n const hasPermission = lvl=> {\r\n switch(lvl) \r\n { case 0: return true; case 1: return user.subscriber; case 2: return user.mod|user.username==target.substring(1); case 3: return false }\r\n }\r\n if (cmd.is('dance')) {\r\n if(!cmd.msg) return;\r\n if(hasPermission(cfg.CMD.dance.level)) {\r\n bot.say(target,addRequest(user['display-name'],user['subscriber'],cmd.msg));\r\n console.log(`* Executed command ${cmd.name}`);\r\n }\r\n }\r\n else if(cmd.is('current')) {\r\n if(hasPermission(cfg.CMD.current.level)) {\r\n if (list.songs.length) \r\n return bot.say(target,parseResp(cfg.CMD.current.response,{$user:user['display-name'],$song:list.songs[0].name,$reqBy:list.songs[0].votes[0]}));\r\n return bot.say(target,parseResp(cfg.CMD.current.response1,{$user:user['display-name']}));\r\n }\r\n }\r\n else if(cmd.is('next')) {\r\n if(hasPermission(cfg.CMD.next.level)) {\r\n if(list.songs.length>1)\r\n return bot.say(target,parseResp(cfg.CMD.next.response,{$user:user['display-name'],$song:list.songs[1].name,$reqBy:list.songs[1].votes[0]}));\r\n return bot.say(target,parseResp(cfg.CMD.next.response1,{$user:user['display-name']}));\r\n }\r\n }\r\n else if(cmd.is('position')) {\r\n if(hasPermission(cfg.CMD.position.level)) {\r\n const idx = list.songs.findIndex(song=>song.votes[0]==user['display-name']);\r\n if(idx<0) return bot.say(target,parseResp(cfg.CMD.position.response1,{$user:user['display-name'],$song:'none',$pos:0}));\r\n bot.say(target,parseResp(cfg.CMD.position.response,{$user:user['display-name'],$song:list.songs[idx].name,$pos:idx+1}));\r\n }\r\n }\r\n else if(cmd.is('wrongsong')) {\r\n if(hasPermission(cfg.CMD.wrongsong.level)) {\r\n const idx = list.songs.reverse().findIndex(song=>song.votes[0]==user['display-name']);\r\n if(idx<0) return bot.say(target,parseResp(cfg.CMD.wrongsong.response1,{$user:user['display-name'],$song:'none'}));\r\n let song = list.songs.splice(idx,1)[0];\r\n list.users[user['display-name']]--;\r\n list.songs.reverse();\r\n mainWindow.webContents.send('ready',list.songs);\r\n updateList();\r\n bot.say(target,parseResp(cfg.CMD.wrongsong.response,{$user:user['display-name'],$song:song.name}));\r\n }\r\n }\r\n else if(cmd.is('size')) {\r\n if(hasPermission(cfg.CMD.size.level))\r\n bot.say(target,parseResp(cfg.CMD.size.response,{$user:user['display-name'],$size:list.songs.length||'0'}));\r\n }\r\n else {\r\n console.log(`* Unknown command ${cmd.name}`);\r\n }\r\n}", "title": "" }, { "docid": "3668b62474fc6ee6bfe4df5c177a12b8", "score": "0.42891857", "text": "getContent(context) {\n\t\treturn this.content[context]; //Return the specified context's messages\n\t}", "title": "" }, { "docid": "b634a1043b4f20d6d0135e022367336b", "score": "0.4286726", "text": "function contentScriptWorker() {\n runtime.sendMessage({\n type: SIGN_CONNECT\n }).then(function (msg) {\n return console.info(msg);\n });\n runtime.onMessage.addListener(function (_ref) {\n var type = _ref.type,\n payload = _ref.payload;\n\n switch (type) {\n case SIGN_RELOAD:\n logger(\"Detected Changes. Reloading ...\");\n reloadPage && window.location.reload();\n break;\n\n case SIGN_LOG:\n console.info(payload);\n break;\n }\n });\n } // ======================== Called only on background scripts ============================= //", "title": "" }, { "docid": "b634a1043b4f20d6d0135e022367336b", "score": "0.4286726", "text": "function contentScriptWorker() {\n runtime.sendMessage({\n type: SIGN_CONNECT\n }).then(function (msg) {\n return console.info(msg);\n });\n runtime.onMessage.addListener(function (_ref) {\n var type = _ref.type,\n payload = _ref.payload;\n\n switch (type) {\n case SIGN_RELOAD:\n logger(\"Detected Changes. Reloading ...\");\n reloadPage && window.location.reload();\n break;\n\n case SIGN_LOG:\n console.info(payload);\n break;\n }\n });\n } // ======================== Called only on background scripts ============================= //", "title": "" }, { "docid": "dfb61ec0c502a905edd3b7024f743e09", "score": "0.4286388", "text": "respondTo(commandArguments, roomname, originalMessage, messageOptions) {\n return \"Sample command works!\";\n }", "title": "" }, { "docid": "ee7e137eaeb42381d9895f1f97ad5256", "score": "0.42838207", "text": "function sendMessageToContentJS(message, callback) {\n chrome.tabs.query({active: true, currentWindow: true}, function(tabs) {\n chrome.tabs.sendMessage(tabs[0].id, message, callback);\n });\n}", "title": "" }, { "docid": "915cc65697c47faa17efae22b7b4f294", "score": "0.42835665", "text": "function update_content(btn, contentId) {\n\tif (btn === 'delete') {\n\t\tconsole.log(\"get btn value :\" + btn);\n\t\tconsole.log(\"/forum_test/${forum.forumId}/${title.titleId}\");\n\t\t$.ajax({\n\t\t\turl : '/GameBase/forum_test/' + forumId + '/' + titleId + '/'\n\t\t\t\t\t+ contentId + '/update',\n\t\t\tdataType : \"json\",\n\t\t\ttype : \"POST\",\n\t\t\tcache : true,\n\t\t\tdata : {\n\t\t\t\tclickedBTN : btn,\n\t\t\t\tcontentId : contentId\n\t\t\t},\n\t\t\tsuccess : function(response) {\n\t\t\t\tconsole.log(\"success\");\n\t\t\t\t$(\".content_content[contentId=\" + contentId + \"]\").html(\n\t\t\t\t\t\tresponse.content.content);\n\t\t\t}\n\t\t})\n\t} else if (btn === 'update') {\n\t\tconsole.log(\"get btn value :\" + btn);\n\t\t// get content data\n\t\tvar econtent = $(\".content_content[contentId=\" + contentId + \"]\")\n\t\t\t\t.html();\n\t\tvar etitle = $(\".content_title h2\").text();\n\n\t\t// set editor\n\t\t$(\"#articleTitle\").val(etitle);\n\t\teditor.setData(econtent);\n\t\t// open editor\n\t\t$(\".publish-area\").removeClass(\"hidden-window\", 700);\n\t\t$(\"#shadow\").fadeIn(700);\n\t\t$(\"#submit\").attr(\"hidden\", true);\n\t\t$(\"#update_content\").attr(\"hidden\", false);\n\n\t\t// editor update button clicked\n\t\t$(\"#update_content\").click(\n\t\t\t\tfunction() {\n\t\t\t\t\t$.ajax({\n\t\t\t\t\t\turl : '/GameBase/forum_test/' + forumId + '/' + titleId\n\t\t\t\t\t\t\t\t+ '/' + contentId + '/update',\n\t\t\t\t\t\tdataType : \"json\",\n\t\t\t\t\t\ttype : \"POST\",\n\t\t\t\t\t\tcache : true,\n\t\t\t\t\t\tdata : {\n\t\t\t\t\t\t\tclickedBTN : btn,\n\t\t\t\t\t\t\tcontentId : contentId,\n\t\t\t\t\t\t\tnewContent : editor.getData()\n\t\t\t\t\t\t},\n\t\t\t\t\t\tsuccess : function(response) {\n\t\t\t\t\t\t\tconsole.log(\"success1\");\n\t\t\t\t\t\t\t$(\".content_content[contentId=\" + contentId+ \"]\").html(response.content.content);\n\t\t\t\t\t\t\t// clear editor val\n\t\t\t\t\t\t\t$(\"#articleTitle\").val(\"\");\n\t\t\t\t\t\t\teditor.setData(\"\");\n\t\t\t\t\t\t\t// close window\n\t\t\t\t\t\t\t$(\".publish-area\").addClass(\"hidden-window\", 700);\n\t\t\t\t\t\t\t$(\"#shadow\").fadeOut(700);\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t});\n\n\t}\n}", "title": "" }, { "docid": "83236c56aebbf9522f50d8b14fc49d23", "score": "0.42832974", "text": "function actOnChangedContent (changedContent) {\n var newContent = changedContent.added;\n var modifiedContent = changedContent.modified;\n var removedContent = changedContent.removed;\n\n for (var fileName in newContent) {\n fetchContent (newContent[fileName], storeNewContent, \n changedContent.timestamp, changedContent.id, \n changedContent.authorEmail, changedContent.username,\n changedContent.name\n );\n }\n\n for (var fileName in modifiedContent) {\n console.log ('Modified files: ' + modifiedContent[fileName]);\n fetchContent (modifiedContent[fileName], storeNewContent, \n changedContent.timestamp, changedContent.id, \n changedContent.authorEmail, changedContent.username,\n changedContent.name\n );\n }\n\n}", "title": "" }, { "docid": "f53309713e0776c2370d28b64a33ca96", "score": "0.42831272", "text": "function plugin() {\n let seneca = this;\n seneca.add('role:comics-images,cmd:metadata', (msg, res) => getMetadata(msg).then((val) => res(null, val).catch(res)));\n seneca.add('role:comics-images,cmd:bytes', (msg, res) => getBytes(msg).then((val) => res(null, val).catch(res)));\n}", "title": "" }, { "docid": "305190c2fb3be2ae1eeb326a7fd1f61c", "score": "0.4280458", "text": "function remoteSetContentAfterOpen(filepathArg) {\n\tvar hasExecuted = false; //closure variable\n\n\tif (!hasExecuted) { //if never executed before (aka if hasExecuted has still the value it was initialized with)\n\t\thasExecuted = true; //set it to true to prevent execution next time\n\t\tfilepath = filepathArg;\n\t\tfs.readFile(filepathArg, function (err, data) {\n\t\t\tif (err) {\n\t\t\t\tconsole.log(\"Read failed: \" + err);\n\t\t\t}\n\t\t\tsetContent(data);\n\t\t});\n\t} else {\n\t\tconsole.log(\"remoteSetContentAfterOpen can only be called once to prevent resetting content accidently\")\n\t}\n}", "title": "" }, { "docid": "8ede6d828c66e83bbf98f1d86e21e182", "score": "0.4279452", "text": "async commandHandler(message, cmd, args) {\n\t\tconst embed = new RichEmbed();\n\t\tconst subs = args[0] === undefined ? await database.getSubmissions() : await r.getSubreddit(args[0]).getHot();\n\t\tconst pageSize = parseInt(await database.getConfigValue('PageSize'), 10);\n\n\t\tif (subs.length === 0) {\n\t\t\tmessage.reply('No submissions available.. GO AND MAKE SOME PASTA!');\n\t\t\treturn;\n\t\t}\n\n\t\t// building the embedded message\n\t\tawait this.embedBuilder(embed, 1, subs, pageSize);\n\n\t\tconst filter = (reaction, user) => {\n\t\t\treturn ['⏪', '⏩', '◀', '▶'].includes(reaction.emoji.name) && user.id === message.author.id;\n\t\t};\n\n\t\t// scrolling through map timeline\n\t\tconst embedMessage = await message.reply(embed);\n\t\tawait embedMessage.react('⏪');\n\t\tawait embedMessage.react('◀');\n\t\tawait embedMessage.react('▶');\n\t\tawait embedMessage.react('⏩');\n\n\t\tlet page = 1;\n\t\tconst collector = embedMessage.createReactionCollector(filter, {time: 180000});\n\n\t\tcollector.on('collect', async (reaction) => {\n\t\t\tconst editEmbed = new RichEmbed();\n\n\t\t\t// switching correctly\n\t\t\tswitch (reaction.emoji.name) {\n\t\t\t\tcase '⏪':\n\t\t\t\t\tpage = 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '◀':\n\t\t\t\t\tif (page > 1) {\n\t\t\t\t\t\tpage -= 1;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase '▶':\n\t\t\t\t\tif (page < Math.ceil(subs.length / pageSize)) {\n\t\t\t\t\t\t// eslint-disable-next-line require-atomic-updates\n\t\t\t\t\t\tpage += 1;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase '⏩':\n\t\t\t\t\tpage = Math.ceil(subs.length / pageSize);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tawait this.embedBuilder(editEmbed, page, subs, pageSize);\n\t\t\t// completing edit\n\t\t\tembedMessage.edit(editEmbed);\n\t\t});\n\t}", "title": "" }, { "docid": "5189290b568bdb514a5001baeb972476", "score": "0.42779028", "text": "_browse(){\n \t this._setSendMessage({type:'BROWSE'});\n }", "title": "" } ]
c74ea3f1dec90e124e7e65f0aa4403ee
Checks if two javascript objects are equivalent. Only top level properties are checked for equivalence.
[ { "docid": "37ff251e34fa2563f8a01a34b73694cc", "score": "0.7796736", "text": "isEquivalent(a, b) {\n // Create arrays of property names\n var aProps = Object.getOwnPropertyNames(a);\n var bProps = Object.getOwnPropertyNames(b);\n\n // If number of properties is different,\n // objects are not equivalent\n if (aProps.length != bProps.length) {\n return false;\n }\n\n for (var i = 0; i < aProps.length; i++) {\n var propName = aProps[i];\n\n // If values of same property are not equal,\n // objects are not equivalent\n if (this._deepValue(a, propName) !== this._deepValue(b, propName)) {\n return false;\n }\n }\n\n // If we made it this far, objects\n // are considered equivalent\n return true;\n }", "title": "" } ]
[ { "docid": "ea98671ec06fe9d15967d38d64709b5e", "score": "0.79680544", "text": "function isEquivalent(a, b) {\n // Create arrays of property names\n var aProps = Object.getOwnPropertyNames(a),\n bProps = Object.getOwnPropertyNames(b);\n\n // If number of properties is different,\n // objects are not equivalent\n if (aProps.length != bProps.length) {\n $.log('length :' + aProps.length + ' ' + bProps.length);\n return false;\n }\n\n for (var i = 0; i < aProps.length; i++) {\n var propName = aProps[i],\n propA = a[propName],\n propB = b[propName];\n\n // If values of same property are not equal,\n // objects are not equivalent\n if (propA !== propB) {\n if (typeof propA === 'object' && typeof propB === 'object') {\n if (!isEquivalent(propA, propB)) {\n $.log('prop :' + propA + ' ' + propB);\n return false;\n }\n } else {\n $.log('prop :' + propA + ' ' + propB);\n return false;\n }\n }\n }\n\n // If we made it this far, objects\n // are considered equivalent\n return true;\n }", "title": "" }, { "docid": "433494f00ff6f54bea0d1722cdc7387b", "score": "0.7866187", "text": "function _equivalent(a, b) {\n if (a == b) {\n return true;\n }\n if (typeof a == 'object' && typeof b == 'object' && a !== null && b !== null) {\n if (a.toString() != b.toString()) {\n return false;\n }\n for (var p in a) {\n if (a.hasOwnProperty(p) && !_equivalent(a[p], b[p])) {\n return false;\n }\n }\n for (var p in b) {\n if (a.hasOwnProperty(p) && !_equivalent(a[p], b[p])) {\n return false;\n }\n }\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "694674da86b16f14f9b090c3de20f773", "score": "0.75938225", "text": "function isEquivalent(a, b) {\n // arrays of property names\n var aProps = Object.getOwnPropertyNames(a);\n var bProps = Object.getOwnPropertyNames(b);\n\n // If their property lengths are different, they're different objects\n if (aProps.length != bProps.length) {\n return false;\n }\n\n for (var i = 0; i < aProps.length; i++) {\n var propName = aProps[i];\n\n // If the values of the property are different, not equal\n if (a[propName] !== b[propName]) {\n return false;\n }\n }\n\n // If everything matched, correct\n return true;\n}", "title": "" }, { "docid": "8ead8bed47698b62753b8463c4ab5398", "score": "0.7571312", "text": "function objEquiv(_a, _b) {\n let a = _a;\n let b = _b;\n // eslint-disable-next-line\n if (a == null || b == null) {\n return false;\n }\n if (a.prototype !== b.prototype) {\n return false;\n }\n if (typeOf(a) === 'arguments') {\n if (!typeOf(b) !== 'arguments') {\n return false;\n }\n a = Array.prototype.slice.call(a);\n b = Array.prototype.slice.call(b);\n return deepEqual(a, b);\n }\n let ka;\n let kb;\n try {\n ka = Object.keys(a);\n kb = Object.keys(b);\n } catch (e) {\n return false;\n }\n if (ka.length !== kb.length) {\n return false;\n }\n ka.sort();\n kb.sort();\n let key;\n let i;\n for (i = ka.length - 1; i >= 0; i--) {\n if (ka[i] !== kb[i]) {\n return false;\n }\n }\n for (i = ka.length - 1; i >= 0; i--) {\n key = ka[i];\n if (!deepEqual(a[key], b[key])) {\n return false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "4f0834759fbb4f8fa22a7cacf6ea8e58", "score": "0.74783635", "text": "function isEquivalent(a, b) {\r\n var aProps = Object.getOwnPropertyNames(a);\r\n var bProps = Object.getOwnPropertyNames(b);\r\n if (aProps.length != bProps.length) {\r\n return false;\r\n }\r\n for (var i = 0; i < aProps.length; i++) {\r\n var propName = aProps[i];\r\n if (a[propName] !== b[propName]) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n}", "title": "" }, { "docid": "c1d82d658241cda5916a184fa8d7459d", "score": "0.74536115", "text": "function shallowEqual(objA,objB){if(is(objA,objB)){return true;}if((typeof objA==='undefined'?'undefined':_typeof4(objA))!=='object'||objA===null||(typeof objB==='undefined'?'undefined':_typeof4(objB))!=='object'||objB===null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false;}// Test for A's keys different from B.\nfor(var i=0;i<keysA.length;i++){if(!hasOwnProperty.call(objB,keysA[i])||!is(objA[keysA[i]],objB[keysA[i]])){return false;}}return true;}", "title": "" }, { "docid": "c1d82d658241cda5916a184fa8d7459d", "score": "0.74536115", "text": "function shallowEqual(objA,objB){if(is(objA,objB)){return true;}if((typeof objA==='undefined'?'undefined':_typeof4(objA))!=='object'||objA===null||(typeof objB==='undefined'?'undefined':_typeof4(objB))!=='object'||objB===null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false;}// Test for A's keys different from B.\nfor(var i=0;i<keysA.length;i++){if(!hasOwnProperty.call(objB,keysA[i])||!is(objA[keysA[i]],objB[keysA[i]])){return false;}}return true;}", "title": "" }, { "docid": "c1d82d658241cda5916a184fa8d7459d", "score": "0.74536115", "text": "function shallowEqual(objA,objB){if(is(objA,objB)){return true;}if((typeof objA==='undefined'?'undefined':_typeof4(objA))!=='object'||objA===null||(typeof objB==='undefined'?'undefined':_typeof4(objB))!=='object'||objB===null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false;}// Test for A's keys different from B.\nfor(var i=0;i<keysA.length;i++){if(!hasOwnProperty.call(objB,keysA[i])||!is(objA[keysA[i]],objB[keysA[i]])){return false;}}return true;}", "title": "" }, { "docid": "c1d82d658241cda5916a184fa8d7459d", "score": "0.74536115", "text": "function shallowEqual(objA,objB){if(is(objA,objB)){return true;}if((typeof objA==='undefined'?'undefined':_typeof4(objA))!=='object'||objA===null||(typeof objB==='undefined'?'undefined':_typeof4(objB))!=='object'||objB===null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false;}// Test for A's keys different from B.\nfor(var i=0;i<keysA.length;i++){if(!hasOwnProperty.call(objB,keysA[i])||!is(objA[keysA[i]],objB[keysA[i]])){return false;}}return true;}", "title": "" }, { "docid": "bcc7eb010d6688c638bf48f28c2922a7", "score": "0.7438945", "text": "function shallowEqual(objA,objB){if(is(objA,objB)){return true;}if((typeof objA==='undefined'?'undefined':_typeof(objA))!=='object'||objA===null||(typeof objB==='undefined'?'undefined':_typeof(objB))!=='object'||objB===null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false;}// Test for A's keys different from B.\nfor(var i=0;i<keysA.length;i++){if(!hasOwnProperty.call(objB,keysA[i])||!is(objA[keysA[i]],objB[keysA[i]])){return false;}}return true;}", "title": "" }, { "docid": "c0f4910ae3ae005a037fd27863592e09", "score": "0.74335873", "text": "function shallowEqual(objA,objB){if(is(objA,objB)){return true;}if((typeof objA===\"undefined\"?\"undefined\":_typeof4(objA))!=='object'||objA===null||(typeof objB===\"undefined\"?\"undefined\":_typeof4(objB))!=='object'||objB===null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false;}// Test for A's keys different from B.\nfor(var i=0;i<keysA.length;i++){if(!hasOwnProperty.call(objB,keysA[i])||!is(objA[keysA[i]],objB[keysA[i]])){return false;}}return true;}", "title": "" }, { "docid": "d6f3cccfa0eb21f6b37e4d68ef63b694", "score": "0.7430631", "text": "function shallowEqual(objA: mixed, objB: mixed): boolean {\n\n // function is(x: any, y: any) {\n // return (\n // (x === y && (x !== 0 || 1 / x === 1 / y)) || (x !== x && y !== y) // eslint-disable-line no-self-compare\n // );\n // }\n\n if (is(objA, objB)) {\n return true;\n // A和B是同一个对象,即这两个变量在栈内存的指针指向同一个堆地址中的数据,即同一个对象的引用,即 ===\n }\n\n if (\n typeof objA !== 'object' ||\n objA === null ||\n typeof objB !== 'object' ||\n objB === null\n ) {\n return false;\n // 不是对象或数组,返回false\n }\n\n const keysA = Object.keys(objA);\n const keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n // 属性的个数要一样,不一样返回false\n }\n\n // Test for A's keys different from B.\n for (let i = 0; i < keysA.length; i++) {\n if (\n !hasOwnProperty.call(objB, keysA[i]) ||\n !is(objA[keysA[i]], objB[keysA[i]])\n ) {\n return false;\n // 对象属性对应的值不想等,返回false\n }\n }\n\n return true;\n // 其实就是浅比较\n}", "title": "" }, { "docid": "f87d07e20c00662ff88bcb36e429bac6", "score": "0.74304235", "text": "function shallowEqual(objA,objB){if(is(objA,objB)){return true;}if(typeof objA!=='object'||objA===null||typeof objB!=='object'||objB===null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false;}// Test for A's keys different from B.\nfor(var i=0;i<keysA.length;i++){if(!hasOwnProperty$1.call(objB,keysA[i])||!is(objA[keysA[i]],objB[keysA[i]])){return false;}}return true;}", "title": "" }, { "docid": "f87d07e20c00662ff88bcb36e429bac6", "score": "0.74304235", "text": "function shallowEqual(objA,objB){if(is(objA,objB)){return true;}if(typeof objA!=='object'||objA===null||typeof objB!=='object'||objB===null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false;}// Test for A's keys different from B.\nfor(var i=0;i<keysA.length;i++){if(!hasOwnProperty$1.call(objB,keysA[i])||!is(objA[keysA[i]],objB[keysA[i]])){return false;}}return true;}", "title": "" }, { "docid": "f87d07e20c00662ff88bcb36e429bac6", "score": "0.74304235", "text": "function shallowEqual(objA,objB){if(is(objA,objB)){return true;}if(typeof objA!=='object'||objA===null||typeof objB!=='object'||objB===null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false;}// Test for A's keys different from B.\nfor(var i=0;i<keysA.length;i++){if(!hasOwnProperty$1.call(objB,keysA[i])||!is(objA[keysA[i]],objB[keysA[i]])){return false;}}return true;}", "title": "" }, { "docid": "97d858d813d141fb093967f797b0a1f0", "score": "0.7406869", "text": "function shallowEqual(objA,objB){if(objectIs(objA,objB)){return true;}if(typeof objA!=='object'||objA===null||typeof objB!=='object'||objB===null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false;}// Test for A's keys different from B.\n for(var i=0;i<keysA.length;i++){if(!hasOwnProperty.call(objB,keysA[i])||!objectIs(objA[keysA[i]],objB[keysA[i]])){return false;}}return true;}", "title": "" }, { "docid": "eca6195591a6c99d1be10aeec853fa05", "score": "0.7405074", "text": "function equal(a, b) {\n\n if (sameValue(a, b))\n return true;\n\n\t// Dates must have equal time values\n\tif (isDate(a) && isDate(b))\n\t\treturn a.getTime() === b.getTime();\n\n\t// Non-objects must be strictly equal (types must be equal)\n\tif (!isObject(a) || !isObject(b))\n\t\treturn a === b;\n\n\t// Prototypes must be identical. getPrototypeOf may throw on\n\t// ES3 engines that don't provide access to the prototype.\n\ttry {\n\n\t if (Object.getPrototypeOf(a) !== Object.getPrototypeOf(b))\n\t\t return false;\n\n\t} catch (err) {}\n\n\tvar aKeys = Object.keys(a),\n\t\tbKeys = Object.keys(b);\n\n\t// Number of own properties must be identical\n\tif (aKeys.length !== bKeys.length)\n\t\treturn false;\n\n\tfor (var i$0 = 0; i$0 < aKeys.length; ++i$0) {\n\n\t\t// Names of own properties must be identical\n\t\tif (!OP_hasOwnProperty.call(b, aKeys[i$0]))\n\t\t\treturn false;\n\n\t\t// Values of own properties must be equal\n\t\tif (!equal(a[aKeys[i$0]], b[aKeys[i$0]]))\n\t\t\treturn false;\n\t}\n\n\treturn true;\n}", "title": "" }, { "docid": "b69cea94a12069a89aa08cce5fb5c7b2", "score": "0.7400029", "text": "function shallowEqual(objA,objB){if(is(objA,objB)){return true;}if((typeof objA==='undefined'?'undefined':_typeof(objA))!=='object'||objA===null||(typeof objB==='undefined'?'undefined':_typeof(objB))!=='object'||objB===null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false;}// Test for A's keys different from B.\nfor(var i=0;i<keysA.length;i++){if(!hasOwnProperty$1.call(objB,keysA[i])||!is(objA[keysA[i]],objB[keysA[i]])){return false;}}return true;}", "title": "" }, { "docid": "b69cea94a12069a89aa08cce5fb5c7b2", "score": "0.7400029", "text": "function shallowEqual(objA,objB){if(is(objA,objB)){return true;}if((typeof objA==='undefined'?'undefined':_typeof(objA))!=='object'||objA===null||(typeof objB==='undefined'?'undefined':_typeof(objB))!=='object'||objB===null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false;}// Test for A's keys different from B.\nfor(var i=0;i<keysA.length;i++){if(!hasOwnProperty$1.call(objB,keysA[i])||!is(objA[keysA[i]],objB[keysA[i]])){return false;}}return true;}", "title": "" }, { "docid": "b69cea94a12069a89aa08cce5fb5c7b2", "score": "0.7400029", "text": "function shallowEqual(objA,objB){if(is(objA,objB)){return true;}if((typeof objA==='undefined'?'undefined':_typeof(objA))!=='object'||objA===null||(typeof objB==='undefined'?'undefined':_typeof(objB))!=='object'||objB===null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false;}// Test for A's keys different from B.\nfor(var i=0;i<keysA.length;i++){if(!hasOwnProperty$1.call(objB,keysA[i])||!is(objA[keysA[i]],objB[keysA[i]])){return false;}}return true;}", "title": "" }, { "docid": "b69cea94a12069a89aa08cce5fb5c7b2", "score": "0.7400029", "text": "function shallowEqual(objA,objB){if(is(objA,objB)){return true;}if((typeof objA==='undefined'?'undefined':_typeof(objA))!=='object'||objA===null||(typeof objB==='undefined'?'undefined':_typeof(objB))!=='object'||objB===null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false;}// Test for A's keys different from B.\nfor(var i=0;i<keysA.length;i++){if(!hasOwnProperty$1.call(objB,keysA[i])||!is(objA[keysA[i]],objB[keysA[i]])){return false;}}return true;}", "title": "" }, { "docid": "2dcf1148f28bf85c13fa9cfdf2732afa", "score": "0.7395447", "text": "function shallowEqual(objA,objB){if(is$1(objA,objB)){return true;}if(typeof objA!=='object'||objA===null||typeof objB!=='object'||objB===null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false;}// Test for A's keys different from B.\nfor(var i=0;i<keysA.length;i++){if(!hasOwnProperty$2.call(objB,keysA[i])||!is$1(objA[keysA[i]],objB[keysA[i]])){return false;}}return true;}", "title": "" }, { "docid": "24f511fc93f1cc3bf8b444b804479c8a", "score": "0.7365618", "text": "function shallowEqual(objA,objB){if(objectIs(objA,objB)){return true;}if((typeof objA==='undefined'?'undefined':_typeof(objA))!=='object'||objA===null||(typeof objB==='undefined'?'undefined':_typeof(objB))!=='object'||objB===null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false;}// Test for A's keys different from B.\nfor(var i=0;i<keysA.length;i++){if(!hasOwnProperty$2.call(objB,keysA[i])||!objectIs(objA[keysA[i]],objB[keysA[i]])){return false;}}return true;}", "title": "" }, { "docid": "33007813366d51eecf60f2c0009dfd36", "score": "0.734351", "text": "function shallowEqual(objA,objB){if(objA === objB){return true;}if((typeof objA === \"undefined\"?\"undefined\":_typeof(objA)) !== 'object' || objA === null || (typeof objB === \"undefined\"?\"undefined\":_typeof(objB)) !== 'object' || objB === null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length !== keysB.length){return false;} // Test for A's keys different from B.\nvar bHasOwnProperty=hasOwnProperty.bind(objB);for(var i=0;i < keysA.length;i++) {if(!bHasOwnProperty(keysA[i]) || objA[keysA[i]] !== objB[keysA[i]]){return false;}}return true;}", "title": "" }, { "docid": "cf522ba0e9acde8d25be0db65adacf50", "score": "0.7335762", "text": "function shallowEqual(objA, objB) {\n if (objectIs(objA, objB)) {\n return true;\n }\n \n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n \n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n \n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n \n \n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$2.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n \n return true;\n }", "title": "" }, { "docid": "87d4010eeac3fdf97852011f6a4f9d1c", "score": "0.73193204", "text": "function shallowEqual(objA, objB) {\n if (is(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$1.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "95dded186c86170b3ddcb46f977eb84f", "score": "0.7315797", "text": "function shallowEqual(objA,objB){if(objA === objB){return true;}if(typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null){return false;}var keysA=_Object$keys2(objA);var keysB=_Object$keys2(objB);if(keysA.length !== keysB.length){return false;} // Test for A's keys different from B.\n\tvar bHasOwnProperty=hasOwnProperty.bind(objB);for(var i=0;i < keysA.length;i++) {if(!bHasOwnProperty(keysA[i]) || objA[keysA[i]] !== objB[keysA[i]]){return false;}}return true;}", "title": "" }, { "docid": "95dded186c86170b3ddcb46f977eb84f", "score": "0.7315797", "text": "function shallowEqual(objA,objB){if(objA === objB){return true;}if(typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null){return false;}var keysA=_Object$keys2(objA);var keysB=_Object$keys2(objB);if(keysA.length !== keysB.length){return false;} // Test for A's keys different from B.\n\tvar bHasOwnProperty=hasOwnProperty.bind(objB);for(var i=0;i < keysA.length;i++) {if(!bHasOwnProperty(keysA[i]) || objA[keysA[i]] !== objB[keysA[i]]){return false;}}return true;}", "title": "" }, { "docid": "f16ca611e1e45c371cfc30040905df99", "score": "0.73150414", "text": "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\t\n\t if ((typeof objA === 'undefined' ? 'undefined' : (0, _typeof3.default)(objA)) !== 'object' || objA === null || (typeof objB === 'undefined' ? 'undefined' : (0, _typeof3.default)(objB)) !== 'object' || objB === null) {\n\t return false;\n\t }\n\t\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\t\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}", "title": "" }, { "docid": "4740b1feef71727c86462ef611b4d474", "score": "0.7313681", "text": "function shallowEqual(objA, objB) {\n if (objectIs(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$2.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "76c3ef5f6ef0cb82ae80510a8567416a", "score": "0.73130965", "text": "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\t\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\t\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\t\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}", "title": "" }, { "docid": "76c3ef5f6ef0cb82ae80510a8567416a", "score": "0.73130965", "text": "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\t\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\t\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\t\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}", "title": "" }, { "docid": "76c3ef5f6ef0cb82ae80510a8567416a", "score": "0.73130965", "text": "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\t\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\t\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\t\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}", "title": "" }, { "docid": "76c3ef5f6ef0cb82ae80510a8567416a", "score": "0.73130965", "text": "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\t\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\t\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\t\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}", "title": "" }, { "docid": "76c3ef5f6ef0cb82ae80510a8567416a", "score": "0.73130965", "text": "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\t\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\t\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\t\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}", "title": "" }, { "docid": "76c3ef5f6ef0cb82ae80510a8567416a", "score": "0.73130965", "text": "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\t\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\t\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\t\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}", "title": "" }, { "docid": "76c3ef5f6ef0cb82ae80510a8567416a", "score": "0.73130965", "text": "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\t\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\t\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\t\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}", "title": "" }, { "docid": "76c3ef5f6ef0cb82ae80510a8567416a", "score": "0.73130965", "text": "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\t\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\t\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\t\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}", "title": "" }, { "docid": "76c3ef5f6ef0cb82ae80510a8567416a", "score": "0.73130965", "text": "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\t\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\t\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\t\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}", "title": "" }, { "docid": "76c3ef5f6ef0cb82ae80510a8567416a", "score": "0.73130965", "text": "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\t\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\t\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\t\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}", "title": "" }, { "docid": "76c3ef5f6ef0cb82ae80510a8567416a", "score": "0.73130965", "text": "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\t\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\t\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\t\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}", "title": "" }, { "docid": "76c3ef5f6ef0cb82ae80510a8567416a", "score": "0.73130965", "text": "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\t\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\t\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\t\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}", "title": "" }, { "docid": "76c3ef5f6ef0cb82ae80510a8567416a", "score": "0.73130965", "text": "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\t\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\t\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\t\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}", "title": "" }, { "docid": "76c3ef5f6ef0cb82ae80510a8567416a", "score": "0.73130965", "text": "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\t\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\t\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\t\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}", "title": "" }, { "docid": "76c3ef5f6ef0cb82ae80510a8567416a", "score": "0.73130965", "text": "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\t\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\t\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\t\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}", "title": "" }, { "docid": "76c3ef5f6ef0cb82ae80510a8567416a", "score": "0.73130965", "text": "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\t\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\t\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\t\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}", "title": "" }, { "docid": "76c3ef5f6ef0cb82ae80510a8567416a", "score": "0.73130965", "text": "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\t\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\t\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\t\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}", "title": "" }, { "docid": "76c3ef5f6ef0cb82ae80510a8567416a", "score": "0.73130965", "text": "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\t\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\t\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\t\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}", "title": "" }, { "docid": "76c3ef5f6ef0cb82ae80510a8567416a", "score": "0.73130965", "text": "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\t\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\t\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\t\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}", "title": "" }, { "docid": "76c3ef5f6ef0cb82ae80510a8567416a", "score": "0.73130965", "text": "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\t\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\t\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\t\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}", "title": "" }, { "docid": "76c3ef5f6ef0cb82ae80510a8567416a", "score": "0.73130965", "text": "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\t\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\t\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\t\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}", "title": "" }, { "docid": "7530ba055776f1e448139c7913fc358e", "score": "0.7308939", "text": "function shallowEqual(objA, objB) {\n\t\t if (is(objA, objB)) {\n\t\t return true;\n\t\t }\n\n\t\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t\t return false;\n\t\t }\n\n\t\t var keysA = Object.keys(objA);\n\t\t var keysB = Object.keys(objB);\n\n\t\t if (keysA.length !== keysB.length) {\n\t\t return false;\n\t\t }\n\n\t\t // Test for A's keys different from B.\n\t\t for (var i = 0; i < keysA.length; i++) {\n\t\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t\t return false;\n\t\t }\n\t\t }\n\n\t\t return true;\n\t\t}", "title": "" }, { "docid": "7e81579555cca76e457013250642513f", "score": "0.73059523", "text": "function shallowEqual(objA, objB) {\n if (is(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$1.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "7e81579555cca76e457013250642513f", "score": "0.73059523", "text": "function shallowEqual(objA, objB) {\n if (is(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$1.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "7e81579555cca76e457013250642513f", "score": "0.73059523", "text": "function shallowEqual(objA, objB) {\n if (is(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$1.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "7e81579555cca76e457013250642513f", "score": "0.73059523", "text": "function shallowEqual(objA, objB) {\n if (is(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$1.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "7e81579555cca76e457013250642513f", "score": "0.73059523", "text": "function shallowEqual(objA, objB) {\n if (is(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$1.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "7e81579555cca76e457013250642513f", "score": "0.73059523", "text": "function shallowEqual(objA, objB) {\n if (is(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$1.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "7e81579555cca76e457013250642513f", "score": "0.73059523", "text": "function shallowEqual(objA, objB) {\n if (is(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$1.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "7e81579555cca76e457013250642513f", "score": "0.73059523", "text": "function shallowEqual(objA, objB) {\n if (is(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$1.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "7e81579555cca76e457013250642513f", "score": "0.73059523", "text": "function shallowEqual(objA, objB) {\n if (is(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$1.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "7e81579555cca76e457013250642513f", "score": "0.73059523", "text": "function shallowEqual(objA, objB) {\n if (is(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$1.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "6834ad4f877c6e0f74c25778a2b909b1", "score": "0.7295979", "text": "function shallowEqual(objA, objB) {\n if (is(objA, objB)) {\n return true;\n }\n\n if (\n typeof objA !== 'object' ||\n objA === null ||\n typeof objB !== 'object' ||\n objB === null\n ) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n }\n\n // Test for A's keys different from B.\n for (var i = 0; i < keysA.length; i++) {\n if (\n !hasOwnProperty.call(objB, keysA[i]) ||\n !is(objA[keysA[i]], objB[keysA[i]])\n ) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "ceaddaf0f978c82ea436101630f56916", "score": "0.72952205", "text": "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\t\n\t if ((typeof objA === 'undefined' ? 'undefined' : _typeof(objA)) !== 'object' || objA === null || (typeof objB === 'undefined' ? 'undefined' : _typeof(objB)) !== 'object' || objB === null) {\n\t return false;\n\t }\n\t\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\t\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}", "title": "" }, { "docid": "ceaddaf0f978c82ea436101630f56916", "score": "0.72952205", "text": "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\t\n\t if ((typeof objA === 'undefined' ? 'undefined' : _typeof(objA)) !== 'object' || objA === null || (typeof objB === 'undefined' ? 'undefined' : _typeof(objB)) !== 'object' || objB === null) {\n\t return false;\n\t }\n\t\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\t\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\t\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}", "title": "" }, { "docid": "6d67a696758c1d2252290f90744269bf", "score": "0.7290817", "text": "function shallowEqual(objA, objB) {\n if (objectIs(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "c80dc7d19b97e5f837d26e96c2c3184e", "score": "0.72898597", "text": "function shallowEqual(objA, objB) {\n if (is(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n }\n\n // Test for A's keys different from B.\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "c80dc7d19b97e5f837d26e96c2c3184e", "score": "0.72898597", "text": "function shallowEqual(objA, objB) {\n if (is(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n }\n\n // Test for A's keys different from B.\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "fea123e8658e4212635a45e923385472", "score": "0.72870576", "text": "function shallowEqual(objA, objB) {\n if (is$1(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$2.call(objB, keysA[i]) || !is$1(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "f6f19e0a422e4391c39214d0173a913c", "score": "0.7271362", "text": "function shallowEqual(objA, objB) {\n if (is(objA, objB)) {\n return true;\n }\n\n if ((typeof objA === 'undefined' ? 'undefined' : _typeof(objA)) !== 'object' || objA === null || (typeof objB === 'undefined' ? 'undefined' : _typeof(objB)) !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n if (keysA.length !== keysB.length) {\n return false;\n }\n\n // Test for A's keys different from B.\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "775ec6848f9d9a8e622809bdba693f77", "score": "0.72684366", "text": "function shallowEqual(objA, objB) {\n if (objectIs(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$2.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "775ec6848f9d9a8e622809bdba693f77", "score": "0.72684366", "text": "function shallowEqual(objA, objB) {\n if (objectIs(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$2.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "775ec6848f9d9a8e622809bdba693f77", "score": "0.72684366", "text": "function shallowEqual(objA, objB) {\n if (objectIs(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$2.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "775ec6848f9d9a8e622809bdba693f77", "score": "0.72684366", "text": "function shallowEqual(objA, objB) {\n if (objectIs(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$2.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "775ec6848f9d9a8e622809bdba693f77", "score": "0.72684366", "text": "function shallowEqual(objA, objB) {\n if (objectIs(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$2.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "775ec6848f9d9a8e622809bdba693f77", "score": "0.72684366", "text": "function shallowEqual(objA, objB) {\n if (objectIs(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$2.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "775ec6848f9d9a8e622809bdba693f77", "score": "0.72684366", "text": "function shallowEqual(objA, objB) {\n if (objectIs(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$2.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "775ec6848f9d9a8e622809bdba693f77", "score": "0.72684366", "text": "function shallowEqual(objA, objB) {\n if (objectIs(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$2.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "775ec6848f9d9a8e622809bdba693f77", "score": "0.72684366", "text": "function shallowEqual(objA, objB) {\n if (objectIs(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$2.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "775ec6848f9d9a8e622809bdba693f77", "score": "0.72684366", "text": "function shallowEqual(objA, objB) {\n if (objectIs(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$2.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "775ec6848f9d9a8e622809bdba693f77", "score": "0.72684366", "text": "function shallowEqual(objA, objB) {\n if (objectIs(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$2.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "775ec6848f9d9a8e622809bdba693f77", "score": "0.72684366", "text": "function shallowEqual(objA, objB) {\n if (objectIs(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$2.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "775ec6848f9d9a8e622809bdba693f77", "score": "0.72684366", "text": "function shallowEqual(objA, objB) {\n if (objectIs(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$2.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "775ec6848f9d9a8e622809bdba693f77", "score": "0.72684366", "text": "function shallowEqual(objA, objB) {\n if (objectIs(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$2.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "775ec6848f9d9a8e622809bdba693f77", "score": "0.72684366", "text": "function shallowEqual(objA, objB) {\n if (objectIs(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$2.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "775ec6848f9d9a8e622809bdba693f77", "score": "0.72684366", "text": "function shallowEqual(objA, objB) {\n if (objectIs(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$2.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "775ec6848f9d9a8e622809bdba693f77", "score": "0.72684366", "text": "function shallowEqual(objA, objB) {\n if (objectIs(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$2.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "775ec6848f9d9a8e622809bdba693f77", "score": "0.72684366", "text": "function shallowEqual(objA, objB) {\n if (objectIs(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$2.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "96116a771d2a9155aae07c363ed53706", "score": "0.72648627", "text": "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\n\t return true;\n\t}", "title": "" }, { "docid": "96116a771d2a9155aae07c363ed53706", "score": "0.72648627", "text": "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\n\t return true;\n\t}", "title": "" }, { "docid": "96116a771d2a9155aae07c363ed53706", "score": "0.72648627", "text": "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\n\t return true;\n\t}", "title": "" }, { "docid": "96116a771d2a9155aae07c363ed53706", "score": "0.72648627", "text": "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\n\t return true;\n\t}", "title": "" }, { "docid": "96116a771d2a9155aae07c363ed53706", "score": "0.72648627", "text": "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\n\t return true;\n\t}", "title": "" }, { "docid": "96116a771d2a9155aae07c363ed53706", "score": "0.72648627", "text": "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\n\t return true;\n\t}", "title": "" }, { "docid": "96116a771d2a9155aae07c363ed53706", "score": "0.72648627", "text": "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\n\t return true;\n\t}", "title": "" }, { "docid": "96116a771d2a9155aae07c363ed53706", "score": "0.72648627", "text": "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\n\t return true;\n\t}", "title": "" }, { "docid": "96116a771d2a9155aae07c363ed53706", "score": "0.72648627", "text": "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\n\t return true;\n\t}", "title": "" }, { "docid": "96116a771d2a9155aae07c363ed53706", "score": "0.72648627", "text": "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\n\t return true;\n\t}", "title": "" }, { "docid": "96116a771d2a9155aae07c363ed53706", "score": "0.72648627", "text": "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\n\t return true;\n\t}", "title": "" }, { "docid": "96116a771d2a9155aae07c363ed53706", "score": "0.72648627", "text": "function shallowEqual(objA, objB) {\n\t if (is(objA, objB)) {\n\t return true;\n\t }\n\n\t if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n\t return false;\n\t }\n\n\t var keysA = Object.keys(objA);\n\t var keysB = Object.keys(objB);\n\n\t if (keysA.length !== keysB.length) {\n\t return false;\n\t }\n\n\t // Test for A's keys different from B.\n\t for (var i = 0; i < keysA.length; i++) {\n\t if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n\t return false;\n\t }\n\t }\n\n\t return true;\n\t}", "title": "" } ]
25883349389c304a15364399efc32109
A function that sets the stroke and fill of our "paint brush".
[ { "docid": "daad60ac4cecdfb652aaaa9a1acf6969", "score": "0.60368943", "text": "function chooseColors() {\n brushHue += 1;\n if (brushHue > 359) {\n brushHue = 0;\n }\n stroke(brushHue, 50, 80);\n fill(brushHue, 50, 80);\n}", "title": "" } ]
[ { "docid": "2929b54f4faed041e41a47630d6616a1", "score": "0.6763962", "text": "function setFill(){\n if (black === 0) {\n fill(255);\n black = 1;\n }\n else {\n fill(0);\n black = 0;\n }\n}", "title": "" }, { "docid": "f54e9232589700c51beb2cbff0d272ce", "score": "0.66760975", "text": "function setFillColor(def) {\n if (def.open) {\n def.fill = 'white';\n return KG.setDefaults(def, {\n color: def.stroke,\n stroke: def.color\n });\n }\n return KG.setDefaults(def, {\n color: def.fill,\n fill: def.color\n });\n }", "title": "" }, { "docid": "9da7cd9ff809ed2ca48c33122dec57f7", "score": "0.6657297", "text": "function brush() {\n\t\t\t\t\tvar actives = valueNames.filter(function(p) {\n\t\t\t\t\t\treturn !y[p].brush.empty();\n\t\t\t\t\t}), extents = actives.map(function(p) {\n\t\t\t\t\t\treturn y[p].brush.extent();\n\t\t\t\t\t});\n\t\t\t\t\tforeground.style(\"stroke\", function(d) {\n\t\t\t\t\t\tvar check = !actives.every(function(p, i) {\n\t\t\t\t\t\t\treturn extents[i][0] <= d[p] && d[p] <= extents[i][1];\n\t\t\t\t\t\t});\n\t\t\t\t\t\tif(check) {\n\t\t\t\t\t\t\treturn \"#000\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn colorPalette[colorIndex(d[dimensionName]) % colorPalette.length];\n\t\t\t\t\t}).style(\"stroke-opacity\", function(d) {\n\t\t\t\t\t\tvar check = !actives.every(function(p, i) {\n\t\t\t\t\t\t\treturn extents[i][0] <= d[p] && d[p] <= extents[i][1];\n\t\t\t\t\t\t});\n\t\t\t\t\t\tif(check) {\n\t\t\t\t\t\t\treturn .05;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn 0.5;\n\t\t\t\t\t});\n\t\t\t\t}", "title": "" }, { "docid": "39b24a2088967b2493fe801f89939e93", "score": "0.66293335", "text": "@attr\n @inherit('hachure')\n set fillStyle(val) {\n this.set('fillStyle', val);\n }", "title": "" }, { "docid": "0658dcf86c38512dd6e9e5e11ad2c659", "score": "0.6436235", "text": "function drawStroke(brush){\n\n //clear previous line\n brush.graphics.clear();\n brush.graphics.setStrokeStyle($( \"#pointerRadius #slider\" ).slider( \"option\", \"value\" ),\"round\", \"round\", 10); ////stroke style\n \tbrush.graphics.beginStroke(\"#222121\");//stroke color\n //draw line from the origin to the most recent pointer position.\n brush.graphics.moveTo(createPieceG.origin.x, createPieceG.origin.y);\n brush.graphics.lineTo(createPieceG.pointer.x, createPieceG.pointer.y);\n\n createPieceG.selectedView.updateCache(createPieceG.toolSelected==\"eraser\"?\"destination-out\":\"source-over\");\n //Update origin\n createPieceG.origin.x = createPieceG.pointer.x;\n createPieceG.origin.y = createPieceG.pointer.y;\n //console.log(\"Something else was drawn\");\n\n}", "title": "" }, { "docid": "ff86bf0f906be69e294bcfcdbf2ae8cd", "score": "0.64131445", "text": "function stroke(){\n brush.material.color = _.sample(brush.colors);\n var csd = {\n x:randFloat(leftScreen, rightScreen),\n y: randFloat(skyHeight, topScreen)\n }\n var fsd = {\n x: csd.x + randFloat(-strokeRange, strokeRange),\n y: csd.y + randFloat(-strokeRange, strokeRange)\n }\n brush.visible = true;\n var strokeTween = new TWEEN.Tween(csd).\n to(fsd, 100).\n onUpdate(function(){\n csd.y = Math.max(skyHeight + 5, csd.y)\n\n brush.position.set(csd.x, csd.y, 0);\n }).start();\n strokeTween.onComplete(function(){\n stroke();\n })\n\n\t}", "title": "" }, { "docid": "fb7e59f2f4dbb57f8fb87db7a2950c77", "score": "0.63430506", "text": "function brushWhenSelected() {\n stroke(0);\n strokeWeight(1);\n noFill();\n switch (cb) {\n case 'ellipse':\n ellipse(95, 52, 30, 30);\n break;\n case 'line':\n line(110, 60, 85, 45);\n break;\n case 'text':\n textStyle(NORMAL);\n textAlign(CENTER);\n textSize(30);\n text('T', 95, 52);\n break;\n case 'outline':\n ellipse(95, 52, 30, 30);\n ellipse(95, 52, 15, 15);\n break;\n case 'cloud':\n ellipse(95, 52, 30, 30);\n ellipse(85, 46, 20, 20);\n ellipse(110, 50, 10, 10);\n break;\n case 'rotate':\n line(95, 45, 83, 64);\n line(95, 45, 113, 42);\n break;\n case 'connect':\n line(90, 40, 85, 66);\n line(90, 40, 102, 62);\n line(90, 40, 115, 53);\n break;\n case 'emoji':\n ellipse(88, 51, 6);\n ellipse(102, 51, 6);\n ellipse(95, 52, 30, 30);\n break;\n }\n}", "title": "" }, { "docid": "00a4a74b191985a19c54a59e8a966a6a", "score": "0.6324091", "text": "function updateFillsAndStrokes( baseColor ) {\n\n var transparentBaseColor = new Color( baseColor.getRed(), baseColor.getGreen(), baseColor.getBlue(), 0 );\n\n // Create the gradient fills used for various button states\n upFillVertical = new LinearGradient( 0, 0, 0, buttonHeight )\n .addColorStop( 0, baseColor.colorUtilsBrighter( 0.7 ) )\n .addColorStop( verticalHighlightStop, baseColor )\n .addColorStop( verticalShadowStop, baseColor )\n .addColorStop( 1, baseColor.colorUtilsDarker( 0.5 ) );\n\n upFillHorizontal = new LinearGradient( 0, 0, buttonWidth, 0 )\n .addColorStop( 0, transparentWhite )\n .addColorStop( horizontalHighlightStop, transparentBaseColor )\n .addColorStop( horizontalShadowStop, transparentBaseColor )\n .addColorStop( 1, baseColor.colorUtilsDarker( 0.5 ) );\n\n overFillVertical = new LinearGradient( 0, 0, 0, buttonHeight )\n .addColorStop( 0, baseColor.colorUtilsBrighter( 0.7 ) )\n .addColorStop( verticalHighlightStop, baseColor.colorUtilsBrighter( 0.5 ) )\n .addColorStop( verticalShadowStop, baseColor.colorUtilsBrighter( 0.5 ) )\n .addColorStop( 1, baseColor.colorUtilsDarker( 0.5 ) );\n\n overFillHorizontal = new LinearGradient( 0, 0, buttonWidth, 0 )\n .addColorStop( 0, transparentWhite )\n .addColorStop( horizontalHighlightStop / 2, new Color( 256, 256, 256, 0 ) )\n .addColorStop( horizontalShadowStop, transparentBaseColor )\n .addColorStop( 1, baseColor.colorUtilsDarker( 0.3 ) );\n\n downFillVertical = new LinearGradient( 0, 0, 0, buttonHeight )\n .addColorStop( 0, baseColor.colorUtilsBrighter( 0.7 ) )\n .addColorStop( verticalHighlightStop * 0.67, baseColor.colorUtilsDarker( 0.3 ) )\n .addColorStop( verticalShadowStop, baseColor.colorUtilsBrighter( 0.2 ) )\n .addColorStop( 1, baseColor.colorUtilsDarker( 0.5 ) );\n\n disabledFillVertical = new LinearGradient( 0, 0, 0, buttonHeight )\n .addColorStop( 0, disabledBaseColor.colorUtilsBrighter( 0.7 ) )\n .addColorStop( verticalHighlightStop, disabledBaseColor.colorUtilsBrighter( 0.5 ) )\n .addColorStop( verticalShadowStop, disabledBaseColor.colorUtilsBrighter( 0.5 ) )\n .addColorStop( 1, disabledBaseColor.colorUtilsDarker( 0.5 ) );\n\n disabledFillHorizontal = new LinearGradient( 0, 0, buttonWidth, 0 )\n .addColorStop( 0, disabledBaseColor.colorUtilsBrighter( 0.7 ) )\n .addColorStop( horizontalHighlightStop, transparentDisabledBaseColor )\n .addColorStop( horizontalShadowStop, transparentDisabledBaseColor )\n .addColorStop( 1, disabledBaseColor.colorUtilsDarker( 0.5 ) );\n\n disabledPressedFillVertical = new LinearGradient( 0, 0, 0, buttonHeight )\n .addColorStop( 0, disabledBaseColor.colorUtilsBrighter( 0.7 ) )\n .addColorStop( verticalHighlightStop * 0.67, disabledBaseColor.colorUtilsDarker( 0.3 ) )\n .addColorStop( verticalShadowStop, disabledBaseColor.colorUtilsBrighter( 0.2 ) )\n .addColorStop( 1, disabledBaseColor.colorUtilsDarker( 0.5 ) );\n\n if ( options.stroke === null ) {\n // The stroke was explicitly set to null, so the button should have no stroke.\n enabledStroke = null;\n disabledStroke = null;\n }\n else if ( typeof( options.stroke ) === 'undefined' ) {\n // No stroke was defined, but it wasn't set to null, so default to a stroke based on the base color of the\n // button. This behavior is a bit unconventional for Scenery nodes, but it makes the buttons look much better.\n enabledStroke = baseColor.colorUtilsDarker( 0.4 );\n disabledStroke = disabledBaseColor.colorUtilsDarker( 0.4 );\n }\n else {\n enabledStroke = Color.toColor( options.stroke );\n disabledStroke = disabledBaseColor.colorUtilsDarker( 0.4 );\n }\n\n button.cachedPaints = [\n upFillVertical, overFillVertical, downFillVertical, disabledFillVertical, disabledPressedFillVertical,\n disabledStroke\n ];\n\n overlayForHorizGradient.cachedPaints = [\n upFillHorizontal, overFillHorizontal, disabledFillHorizontal, enabledStroke, disabledStroke\n ];\n\n updateAppearance( interactionStateProperty.value );\n }", "title": "" }, { "docid": "30d7b356223b06ce5686a57ece723095", "score": "0.62811226", "text": "styling() {\n // Styling for shapes\n strokeWeight(this.strokeThickness);\n noFill();\n }", "title": "" }, { "docid": "bec99cb0f4b4163d9e59079cf7f5a9c5", "score": "0.62675995", "text": "function setStrokeColor(def) {\n return KG.setDefaults(def, {\n color: def.stroke,\n stroke: def.color\n });\n }", "title": "" }, { "docid": "0c055e225b0a3310e7149fce31300b29", "score": "0.62639254", "text": "setStrokeStyle(color) {\n this.strokeStyle = color;\n }", "title": "" }, { "docid": "be0bb8303abeaf94f62e927e796e16ba", "score": "0.6233209", "text": "function setStrokeColor() {\n if (colorMax <= colorState) {\n colorState = 0;\n }\n const rnum = 128 * Math.sin(colorState) + 128;\n const rhex = (`00${Math.floor(rnum).toString(16)}`).slice(-2);\n const gnum = 128 * Math.sin(colorState + colorMax / 3) + 128;\n const ghex = (`00${Math.floor(gnum).toString(16)}`).slice(-2);\n const bnum = 128 * Math.sin(colorState + 2 * colorMax / 3) + 128;\n const bhex = (`00${Math.floor(bnum).toString(16)}`).slice(-2);\n ctx.fillStyle = `#${rhex}${ghex}${bhex}`;\n\n colorState += colorJump;\n}", "title": "" }, { "docid": "0e97ccadf85a7c81489e6ba5c991b9c5", "score": "0.6202348", "text": "resetColor() {\n this.stroke.r = this.stroke.normal.r;\n this.stroke.g = this.stroke.normal.g;\n this.stroke.b = this.stroke.normal.b;\n }", "title": "" }, { "docid": "650d33a6ae96dee16764a43e56ae01bb", "score": "0.61955357", "text": "brushStroke(context){\n const frame = this.brushManager.animationProject.getCurrFrame();\n const currColor = this.brushManager.getCurrColorArray();\n \n // connect the dots first\n for(let i = 0; i < this.clickX.length; i++){\n context.strokeStyle = this.clickColor[i];\n context.lineWidth = this.clickSize[i];\n \n context.beginPath();\n \n if(this.clickDrag[i] && i){\n context.moveTo(this.clickX[i - 1], this.clickY[i - 1]);\n }else{\n context.moveTo(this.clickX[i], this.clickY[i] + 1);\n }\n \n context.lineTo(this.clickX[i], this.clickY[i]);\n context.closePath();\n context.stroke();\n }\n \n // then add some extra strokes (and make them more faint than the main stroke line if pen pressure flag)\n if(this.brushManager.applyPressureColor()){\n const extraStrokeColor = 'rgba(' + currColor[0] + ',' + currColor[1] + ',' + currColor[2] + ',' + (this.clickPressure[this.clickPressure.length-1] * 0.3) + ')';\n context.strokeStyle = extraStrokeColor;\n }\n \n // TODO: I think the below stuff should go in the loop above (take the strokeStyle change above along with it).\n // pick a random point from some of the most recent points drawn so far. adjust that coord slightly based on some random numbers.\n // then draw a line from that coord to a new coord that is based off the latest drawn point (this point will also be slightly altered based on random nums).\n // this way we get some random, skewed lines to our strokes to give some texture.\n if(this.clickX.length > 7){\n const currIndex = this.clickX.length - 1;\n for(let i = this.clickX.length - 6; i < this.clickX.length; i++){\n // maybe we can do something neat like take into account the direction of the brush based on\n // the vector created by the current and previous coordinates?\n const prevIndex = Math.round((Math.random() * (currIndex - (currIndex - 5))) + (currIndex - 5)); // get rand index from currIndex - 5 to the last index\n context.beginPath();\n context.moveTo(this.clickX[prevIndex] + (Math.random() * 3), this.clickY[prevIndex] + (2 * Math.random()));\n context.lineTo(this.clickX[i], this.clickY[i]);\n context.closePath();\n context.stroke();\n }\n }\n }", "title": "" }, { "docid": "6050a655936e7e55d572f8f60279b726", "score": "0.6173943", "text": "function setFillColor(color) {\n fillColor = color;\n }", "title": "" }, { "docid": "4b373ada9f77b2ad846e60e4c04eabac", "score": "0.61498374", "text": "function setBrushAndLines() {\n if (! brush.empty()) {\n var brushExtent = brush.extent();\n var xDomain = contextXScale.domain();\n\n if (brushExtent[0] > xDomain[1]\n ||\n brushExtent[1] < xDomain[0]\n ) {\n // Things have changed so much the brush is now entirely off either\n // the left- or right-hand edge of the context chart.\n // So remove it.\n brush.clear();\n } else if (brushExtent[1] > xDomain[1]) {\n // Right-hand edge of brush is off right-hand edge of context chart.\n brush.extent([brushExtent[0], xDomain[1]]);\n } else if (brushExtent[0] < xDomain[0]) {\n // Left-hand edge of brush is off left-hand edge of context chart.\n brush.extent([xDomain[0], brushExtent[1]]);\n };\n };\n\n // Ensures brush remains spanning the same dates if the domain has\n // changed.\n contextG.select('.x.brush').call(brush);\n brushed();\n\n renderLines('focus');\n }", "title": "" }, { "docid": "0436e4f70153e8cb8202f61f9e9d6db9", "score": "0.6137014", "text": "function setStrokeStyle(i) {\n\tif (clicks[i].tool == \"eraser\") {\n\t\t// context.globalCompositeOperation = \"destination-out\"; // To erase\n\t\t// instead of draw over with white\n\t\tcontext.strokeStyle = 'white';\n\t} else {\n\t\t// context.globalCompositeOperation = \"source-over\"; // To erase\n\t\t// instead of draw over with white\n\t\tcontext.strokeStyle = clicks[i].color;\n\t}\n}", "title": "" }, { "docid": "5d88e297f9e818314f72ca4eff89349c", "score": "0.61149895", "text": "function fill(paint) {\n let fc, foc;\n\n // Is this a data driven paint style?\n if (\n paint.get('fill-color').value._parameters &&\n paint.get('fill-color').value._parameters.hasOwnProperty('stops')\n ) {\n // fc = paint.get('fill-color').value._parameters.stops.map((s) => {\n // return [s[0], s[1]];\n // });\n fc = paint.get('fill-color').value._parameters.stops;\n } else {\n fc = [paint.get('fill-color').value.value.toString()];\n }\n\n if (\n paint.get('fill-outline-color').value._parameters &&\n paint.get('fill-outline-color').value._parameters.hasOwnProperty('stops')\n ) {\n // foc = paint.get('fill-outline-color').value._parameters.stops.map((s) => {\n // return [s[0], s[1]];\n // });\n foc = paint.get('fill-outline-color').value._parameters.stops;\n } else {\n foc = [paint.get('fill-outline-color').value.value.toString()];\n }\n\n const Items = () => {\n let styles = [];\n if (fc.length > 2) {\n styles = fc.map(l => {\n return [...l, foc[0]];\n });\n } else if (foc.length > 2) {\n styles = foc.map(l => {\n return [...l, fc[0]];\n });\n } else {\n styles = [[null, fc[0], foc[0]]];\n }\n\n const svgs = styles.map((s, i) => {\n return (\n <ListItem\n key={i}\n sx={{\n margin: 0,\n marginLeft: '15%',\n padding: 0,\n display: 'flex'\n }}\n >\n <Box>\n <svg width=\"25\" height=\"25\">\n <rect\n x=\"0\"\n y=\"0\"\n rx=\"0\"\n ry=\"0\"\n width=\"25\"\n height=\"25\"\n sx={{ fill: s[1], stroke: s[2], strokeWidth: 3 }}\n />\n </svg>\n </Box>\n <Box>\n <Text sx={{ padding: '3px' }}>{s[0]}</Text>\n </Box>\n </ListItem>\n );\n });\n\n return <Box>{svgs}</Box>;\n };\n\n return (\n <List\n sx={{\n margin: 0,\n padding: 0\n }}\n >\n <Items />\n </List>\n );\n }", "title": "" }, { "docid": "d88357a8edc43b20ddf871d3b6a93e10", "score": "0.60432214", "text": "function filledStar(ctx, r, rectBackColor, style) {\n _drawRect(ctx, r * 2, rectBackColor);\n _star(false, ctx, r, r, r, 5, 0.5, style);\n }", "title": "" }, { "docid": "b6b90212f0a8686ebe34bffcdc3a90c7", "score": "0.59940654", "text": "function setBrushColorHandler(event){\n // do not set the brush color to the pallet's background color\n if(event.target === event.currentTarget) {\n return;\n }\n\n brushColor = event.target.style.backgroundColor;\n setColorIndicator();\n}", "title": "" }, { "docid": "f816f43206cc0ce1b5c670efc4d2be51", "score": "0.59825855", "text": "drawRect(rect, colorFill, colorStroke, lineWidth) {\n this.fillRect(rect, colorFill);\n this.strokeRect(rect, colorStroke || colorFill, lineWidth);\n return this;\n }", "title": "" }, { "docid": "7041d2b26d6bf93a8833d9b7376f68fd", "score": "0.5980996", "text": "function colorFill (){\r\n this.setAttribute('style', `background-color: ${color.value}`);\r\n}", "title": "" }, { "docid": "0b118c87de3c48b0119cb0f42c54f72e", "score": "0.5951078", "text": "onActionUp() {\n this.element.attr('stroke', '#f00');\n this.element.attr('fill', '#fff');\n }", "title": "" }, { "docid": "02bcc5c107245d330dcf13e663705b6f", "score": "0.59417325", "text": "function brush() {\n\t\t\tvar actives = dimensions.filter( function ( p ) {\n\t\t\t\t\treturn !p.brush.empty();\n\t\t\t\t} ),\n\t\t\t\textents = actives.map( function ( p ) {\n\t\t\t\t\treturn p.brush.extent();\n\t\t\t\t} );\n\n\t\t\td3.selectAll( '.foreground path' ).style( 'display', function ( d ) {\n\t\t\t\tif ( actives.every( function ( dim, i ) {\n\t\t\t\t\t// test if point is within extents for each active brush\n\t\t\t\t\treturn dim.type.within( d[dim.key], extents[i], dim );\n\t\t\t\t} ) ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\treturn 'none';\n\t\t\t} );\n\t\t}", "title": "" }, { "docid": "6f7d3a4c711fdf1b2756eadbc0940997", "score": "0.5941192", "text": "function setStrokeColor(color)\n{\n\tvar p = Processing.getInstanceById(\"canvas1\");\n\tp.strokeColor = p.color(parseInt(color.substr(1, 2), 16),\n\t\t\t\t\t\t\tparseInt(color.substr(3, 2), 16),\n\t\t\t\t\t\t\tparseInt(color.substr(5, 2), 16)\n\t\t\t\t\t\t );\n\t$(\"#colorbar .input\").val(color);\n\t$(\"#colorbar .show\").css({\"background\" : color}); // display the selected color\")\n}", "title": "" }, { "docid": "41b0b6318002d3fea7ee522c4c814dcb", "score": "0.59234506", "text": "function biggerBrush(){\n\tvar brushSize = ctx.lineWidth;\n\tvar newSize = brushSize + 5;\n\tctx.lineWidth = newSize;\t\n}", "title": "" }, { "docid": "3b6ea48a249bdf315c960b674819882e", "score": "0.59214836", "text": "get stroke() {\r\n return brushToString(this.i.o);\r\n }", "title": "" }, { "docid": "1c620371c91a28249964e8607f65ef4f", "score": "0.59036046", "text": "function resetOutline() {\n const paths = document.getElementsByTagName('path')\n const strokecolor = document.getElementById('colorOutline').value\n for (var i = 0; i < paths.length; i++) {\n paths[i].style.stroke = strokecolor\n paths[i].style.strokeWidth = 0.5\n }\n}", "title": "" }, { "docid": "080abc5da509198a5949f5097d2e4b56", "score": "0.5891888", "text": "drawRect(ctx, startX, startY, width, height, color, stroke){\r\n ctx.save();\r\n ctx.fillStyle = color;\r\n ctx.beginPath();\r\n ctx.rect(startX,startY, width, height);\r\n if(stroke){\r\n ctx.strokeStyle = \"black\";\r\n ctx.lineWidth = 2;\r\n ctx.stroke();\r\n }\r\n ctx.fill();\r\n ctx.restore();\r\n }", "title": "" }, { "docid": "fb842555b66807c6e5eac18081f6dc21", "score": "0.5879841", "text": "get strokeAlpha2() {return this.fillAlpha}", "title": "" }, { "docid": "6952961e119f9e60059532bca940f71b", "score": "0.5856672", "text": "function draw (brush, width, height) {\n\n // Since a lot of fun things come out of pseudorandom numbers, being able\n // to control the random number generator is important. We use the randomseed\n // library found here to do so: https://github.com/davidbau/seedrandom. If\n // you use Math.random() in your design, changing the input here will change\n // your design subtly.\n Math.seedrandom('bombsheller');\n\n // We start by making a couple of gradients because vector gradients rock.\n topToBottom = brush.gradient(\n Snap.format(\"L({x1}, {y1}, {x2}, {y2}){c1}-{c2}\", {\n x1: 0,\n y1: 0,\n x2: 0,\n y2: height,\n c1: \"#e6ab5a\",\n c2: \"#51388F\"\n }));\n\n bottomToTop = brush.gradient(\n Snap.format(\"L({x1}, {y1}, {x2}, {y2}){c1}-{c2}\", {\n x1: 0,\n y1: 0,\n x2: 0,\n y2: height,\n c1: \"#fff\",\n c2: \"#222\"\n }));\n\n // Background gradient\n square = brush.rect(0, 0, width, height);\n square.attr({fill: topToBottom});\n\n // Here's a demonstration of one drawing style:\n // First, we get all of the points we're going to draw shapes on, then we\n // draw our shapes on those points. This is nice because it separates the\n // where from the what, allowing you to choose different distributions of\n // points or change geometries easily. Notice that the randomPoints method\n // lives in the tools.js file. Check it out!\n var centers = randomPoints(50, width, height);\n\n for (var i = centers.length - 1; i >= 0; i--) {\n var thisCenter = centers[i];\n var hexagon = hexagonPoints(thisCenter, 40, 0);\n\n // We can use colors defined in tools.js here!\n brush.polygon( pointsToSnapArray(hexagon) )\n .attr({ fill: greys[1] });\n }\n\n // Path string for the XS leggings template outline. Helps remove paths\n // that aren't completely on the leggings (so seams are less noticable).\n xsPath = s.select(\"#Sew_Lines #Sew_Lines_1_\").toString();\n\n // Other layers on top of the background. Uncomment to see what they do.\n\n // Stripes.\n // You can type stripes into the console to add more shapes to the group.\n // stripes = brush.g();\n // var fraction = width / 24;\n // for (var i = 0; i < 24; i++) {\n // var x = i * fraction;\n // var lineWidth = fraction / 2;\n // stripes.rect(x, 0, lineWidth, height);\n // };\n\n // Text.\n // shells = brush.text(500, 500, \"#SHELLS\")\n // .attr({\n // fontSize: \"100\"\n // });\n\n}", "title": "" }, { "docid": "783d82a0dd306dcd13a8faea3002cdb3", "score": "0.5839907", "text": "function defaultBrushColor() {\n ctx.strokeStyle = `hsl(${hue}, 100%, 50%)`;\n ++hue;\n if (hue >= 360) {\n hue = 0;\n }\n }", "title": "" }, { "docid": "5bbc93292340e94d3ef19ae0245123ec", "score": "0.58341146", "text": "fillOnly(c) {\n this.stroke(false);\n return this.fill(c);\n }", "title": "" }, { "docid": "668e92af6622c6750a106482d6e011c0", "score": "0.58125985", "text": "function brushstart() { }", "title": "" }, { "docid": "bcde5a2cdb444eca3b17bf9ddc6d845d", "score": "0.5808064", "text": "function event_strokeStyle_change(e) {\n\t\tif (toolset.strokeStyle != this.value) {\n\t\t\ttoolset.strokeStyle = this.value;\n\t\t\ttempContext.strokeStyle = this.value;\n\t\t\tthis.style.background = this.value;\n\t\t}\n\t}", "title": "" }, { "docid": "efb08e37b311fe802e603bc9dd334f6f", "score": "0.5782288", "text": "draw() {\n let newFigure = this.getTransformedFigure();\n\n if (this.filled) {\n ctx.fillStyle = settings.theme.fgColor;\n fillPath(newFigure);\n } else {\n ctx.strokeStyle = settings.theme.fgColor;\n strokePath(newFigure);\n }\n }", "title": "" }, { "docid": "8f90d499152af4359bc2705ff7078df3", "score": "0.5780693", "text": "function updateStrokeColor(e){\n strokeColor.classList.remove(\"active\");\n stroke.style.backgroundColor = e.target.classList[0];\n ctx.strokeStyle = e.target.classList[0];\n}", "title": "" }, { "docid": "5c28f73c45b79afdd6eb7873b134a2b1", "score": "0.5780606", "text": "function setColor(poly, softerValue)\n{\n\tvar color = colorSofter(gBlockGroup[poly.blockId].color, softerValue);\n\tpoly.setFill(color);\n}", "title": "" }, { "docid": "48b5441747b611646645cecf25054002", "score": "0.5770062", "text": "setColor(path, color) {\n if (this.disabledComposition) {\n path.strokeColor = color;\n path.fillColor = null;\n\n } else {\n path.fillColor = color;\n path.strokeColor = \"white\"\n }\n }", "title": "" }, { "docid": "bf83abc9099c3278215c264565d73fa1", "score": "0.5763882", "text": "drawPolygon(rect, colorFill, colorStroke, lineWidth) {\n this.fillPolygon(rect, colorFill);\n this.strokePolygon(rect, colorStroke || colorFill, lineWidth);\n return this;\n }", "title": "" }, { "docid": "c0f106954947d4f26cc1f36c5a939b6e", "score": "0.5744198", "text": "function setPixelColor(pixel) {\n pixel.style.borderColor = brushColor;\n pixel.style.backgroundColor = brushColor;\n}", "title": "" }, { "docid": "744c86a325d43001faf6d0879218bb57", "score": "0.573867", "text": "function brush() {\n var actives = dimensions.filter(function(p) { return !y[p.name].brush.empty(); }),\n extents = actives.map(function(p) { return y[p.name].brush.extent(); });\n foreground.style(\"display\", function(d) {\n return actives.every(function(p, i) {\n return extents[i][0] <= d[p.name] && d[p.name] <= extents[i][1];\n }) ? null : \"none\";\n });\n }", "title": "" }, { "docid": "aab37a57d41a0ef7ab65589943727508", "score": "0.5729186", "text": "function setPenColor(c) { penColor = (c[0] == '#') ? c : (\"#\" + c); }", "title": "" }, { "docid": "34fe806638da4ab2fdc75ffb04049d41", "score": "0.5724538", "text": "draw(){\n //draw itself\n painter.beginPath();\n painter.fillStyle = this.color;\n //making the object that is about to be painted\n painter.arc(this.x, this.y, this.size, 0, 2 * Math.PI);\n //filling said object with x color\n painter.fill();\n painter.strokeStyle = this.InvertedColor;\n //stroking only draws the borders of object x\n painter.stroke();\n }", "title": "" }, { "docid": "ed049abbc4480a6d3811ed490178ebfa", "score": "0.5720115", "text": "function brush() {\n x.domain(brush.empty() ? x2.domain() : brush.extent());\n focus.select(\"path\").attr(\"d\", area);\n focus.select(\".x.axis\").call(xAxis);\n }", "title": "" }, { "docid": "c54efd216c6182689ef751c864d88297", "score": "0.5698618", "text": "function fillSquare () {\n this.setAttribute(\"style\", `background-color: ${colorPick.value}`);\n}", "title": "" }, { "docid": "18609a158414ff3c17c6ed81a75c0909", "score": "0.5693629", "text": "function updateBrushSize() {\n\tBrush.size = Els.brushSizeSelect.options[Els.brushSizeSelect.selectedIndex].value; // brush size\n\tdrawTransparency(); // background\n}", "title": "" }, { "docid": "1d9d518bbec6ab4f80dd8787757a9fe5", "score": "0.5685626", "text": "setPickingColor() {\r\n\r\n var c = this._pickingColor;\r\n\r\n //billboard\r\n this.billboard && this.billboard.setPickingColor3v(c);\r\n\r\n //label\r\n this.label && this.label.setPickingColor3v(c);\r\n\r\n //shape\r\n this.shape && this.shape.setPickingColor3v(c);\r\n\r\n //polyline\r\n this.polyline && this.polyline.setPickingColor3v(c);\r\n\r\n for (var i = 0; i < this.childrenNodes.length; i++) {\r\n this.childrenNodes[i].setPickingColor();\r\n }\r\n }", "title": "" }, { "docid": "69f9c79e32f55d6965a86d3db3b6ff51", "score": "0.56835693", "text": "function brush() {\n\t actives = dimensionNames.filter(function (p) { return !y[p].brush.empty(); });\n\t extents = actives.map(function(p) { return y[p].brush.extent(); });\n\n\t filters = []; //erase current filters\n\t actives.forEach(function(d,i) {\n\t filters[i] = {\n\t dimension: d,\n\t extent: extents[i],\n\t hasNaN: false,\n\t hasOnlyNaN: false\n\t }\n\t });\n\n\t active = []; //erase current active list\n\t foreground.style('display', function(d) {\n\t var isActive = actives.every(function(p, i) {\n\t if ((isNaN(d.values[p]) || isNaN(parseFloat(d.values[p]))) && extents[i][0] == y[p].brush.y().domain()[0]) return true;\n\t return (extents[i][0] <= d.values[p] && d.values[p] <= extents[i][1]) && !isNaN(parseFloat(d.values[p]));\n\t });\n\t if (isActive) active.push(d);\n\t return isActive ? null : 'none';\n\t });\n\t \n\t updateTicks();\n\t \n\t dispatch.brush({\n\t filters: filters,\n\t active: active\n\t });\n\t }", "title": "" }, { "docid": "72cbadce9919d9dfb2239a6123217e72", "score": "0.5682058", "text": "function blueberries(x, y) {\n\t//blueberry base \n\tnoStroke(); \n\tfill(0, 0, 103);\t\n\tellipse(x, y, 20, 20); \n\t//highlight\n\tfill(255); \n\tellipse(x + 3, y - 3, 5, 5); \n\t//leaves \n\tnoStroke(); \n\tfill(0, 100, 0); \n\tellipse(x + 5, y - 10, 10, 5); \n\tellipse(x - 5, y - 10, 10, 5); \n}", "title": "" }, { "docid": "6a5e3a095b963ad3ddb09b5bc070cc8f", "score": "0.5674905", "text": "function drawBrush() {\n var r = main.ratio;\n var ctx = main.ctx;\n ctx.fillStyle = 'dodgerblue';\n ctx.globalAlpha = 0.365;\n\n var brushX = (r * margin.left) + (r * x(brushExtent[0]));\n var brushWidth = r * (x(brushExtent[1]) - x(brushExtent[0]));\n\n ctx.fillRect(brushX, 0, brushWidth, main.canvas.height);\n ctx.globalAlpha = 1.0;\n }", "title": "" }, { "docid": "6efcffba7823894a9ebc02458ea8dd1d", "score": "0.5662079", "text": "function FillPolygon(id) {\n if (id) {\n $('#' + id).attr(\"fill\", $('#' + id).attr(\"stroke\"));\n $('#' + id).attr(\"fill-opacity\", \"0.5\");\n }\n}", "title": "" }, { "docid": "1f84d2936e524cedd98f300e49aecdd3", "score": "0.56461155", "text": "function Brush(ctx, coord, stroke, color) {\n this.ctx = ctx;\n this.coord = coord;\n this.stroke = stroke;\n this.color = color || '#000000';\n\n this.ctx.canvas.width = this.ctx.canvas.clientWidth;\n this.ctx.canvas.height = this.ctx.canvas.clientHeight;\n this.ctx.lineWidth = this.stroke;\n this.ctx.strokeStyle = this.color;\n this.ctx.fillStyle = this.color;\n}", "title": "" }, { "docid": "a202b784bca4e26378239cfef27d1b08", "score": "0.56447625", "text": "function highlightButton(evt) \r\n{\r\n if(evt && evt.currentTarget)\r\n evt.currentTarget.setAttribute(\"fill\", gsPressedButtonBkgnd);\r\n}", "title": "" }, { "docid": "9e80801fdbb02a275416ea30c340b138", "score": "0.564456", "text": "addFillOnSelected(){\n var combinedWithBC = Object.assign({}, this.props.shapes.selected, {backgroundColor: '#939393'})\n this.props.addFillToSelected(combinedWithBC);\n this.props.addToChanged();\n }", "title": "" }, { "docid": "3c1fffb631d4dbd0f2ff7a5811cdf3a6", "score": "0.5641559", "text": "function brush() {\n var actives = dimensions.filter(function(p) { return !y[p].brush.empty(); }),\n extents = actives.map(function(p) { return y[p].brush.extent(); });\n foreground.style(\"display\", function(d) {\n return actives.every(function(p, i) {\n return extents[i][0] <= d[p] && d[p] <= extents[i][1];\n }) ? null : \"none\";\n });\n}", "title": "" }, { "docid": "efa1d81f537cb4a25b691cf691b69eab", "score": "0.56368095", "text": "function invalidateFill() {\n this.invalidateSupportedRenderers();\n\n var stateLen = this._drawables.length;\n for ( var i = 0; i < stateLen; i++ ) {\n this._drawables[ i ].markDirtyFill();\n }\n }", "title": "" }, { "docid": "d04ec373f57a61f57015ef4f1c06064e", "score": "0.5632612", "text": "function colorFillChange() {\n colorMode= \"colorValue\";\n}", "title": "" }, { "docid": "c6ea371f7e64be61b34fbfb6c8513c47", "score": "0.563027", "text": "function setFillStyle(e){\n\t\tselectedElements.forEach(function(element) {\n\t\t\tif(element.id == e.id){\n\t\t\t\tfs = overAgainFillStyle;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\t}", "title": "" }, { "docid": "2b40122f963f3504b20d9471720124d7", "score": "0.562163", "text": "function gray1() {\r\n \"use strict\";\r\n ctx.beginPath();\r\n ctx.moveTo(604, 136);\r\n ctx.lineTo(604, 162);\r\n ctx.lineTo(848, 156);\r\n ctx.lineTo(848, 82);\r\n ctx.closePath();\r\n //style\r\n ctx.fillStyle = \"rgb(84, 73, 90)\";\r\n ctx.fill();\r\n ctx.lineWidth = 2;\r\n ctx.strokeStyle = 'black';\r\n ctx.stroke();\r\n}", "title": "" }, { "docid": "408d9019df6c5c97367c7300c8c75569", "score": "0.5606128", "text": "function brush() {\n var actives = dimensions.filter(function(p) { return !y[p].brush.empty(); }),\n extents = actives.map(function(p) { return y[p].brush.extent(); });\n foreground.style(\"display\", function(d) {\n return actives.every(function(p, i) {\n return extents[i][0] <= d[p] && d[p] <= extents[i][1];\n }) ? null : \"none\";\n });\n}", "title": "" }, { "docid": "7a5cc100452aa8d3a9d9b8fb97facde1", "score": "0.5599067", "text": "function brush() {\n actives = dimensionNames.filter(function (p) { return !y[p].brush.empty(); }),\n extents = actives.map(function(p) { return y[p].brush.extent(); });\n\n filters = []; //erase current filters\n actives.forEach(function(d,i) {\n filters[i] = {\n dimension: d,\n extent: extents[i],\n hasNaN: false,\n hasOnlyNaN: false\n }\n });\n\n active = []; //erase current active list\n foreground.style('display', function(d) {\n var isActive = actives.every(function(p, i) {\n if ((isNaN(d.values[p]) || isNaN(parseFloat(d.values[p]))) && extents[i][0] == y[p].brush.y().domain()[0]) return true;\n return (extents[i][0] <= d.values[p] && d.values[p] <= extents[i][1]) && !isNaN(parseFloat(d.values[p]));\n });\n if (isActive) active.push(d);\n return isActive ? null : 'none';\n });\n\n dispatch.brush({\n filters: filters,\n active: active\n });\n }", "title": "" }, { "docid": "f16b695f0100197bc27804b5a32c1be9", "score": "0.55884194", "text": "function brush() {\n\t var actives = dimensions.filter(function(p) { return !y[p].brush.empty(); }),\n\t extents = actives.map(function(p) { return y[p].brush.extent(); });\n\t foreground.style(\"display\", function(d) {\n\t return actives.every(function(p, i) {\n\t return extents[i][0] <= d[p] && d[p] <= extents[i][1];\n\t }) ? null : \"none\";\n\t });\n\t}", "title": "" }, { "docid": "eb952b9c69f4410091ec26a250922044", "score": "0.55852455", "text": "function setColor(color = \"black\") {\n\tctx.strokeStyle = color;\n}", "title": "" }, { "docid": "bc563a0f888cc971576c4e97682b8f92", "score": "0.55816096", "text": "function invalidateFill() {\n /*jshint -W040 */\n this.invalidateSupportedRenderers();\n\n var stateLen = this._drawables.length;\n for (var i = 0; i < stateLen; i++) {\n this._drawables[i].markDirtyFill();\n }\n /*jshint +W040 */\n }", "title": "" }, { "docid": "1feabcb4b590e24b90e66df5a3f48269", "score": "0.55780596", "text": "function brush() {\n var actives = dimensions.filter(function(p) { return !y[p].brush.empty(); }),\n extents = actives.map(function(p) { return y[p].brush.extent(); });\n foreground.style(\"display\", function(d) {\n return actives.every(function(p, i) {\n return extents[i][0] <= d[p] && d[p] <= extents[i][1];\n }) ? null : \"none\";\n});\n}", "title": "" }, { "docid": "fad02fdaf4d63b9b4f6ebddde0006241", "score": "0.5572238", "text": "function strokeElement(myE, cName) {\r\tvar myCol = makeColourObject(cName);\r\tif (myE.typename == 'PathItem') {\r\t\tmyE.strokeColor = myCol;\r var overprint = c_textOverprint.search(cName) >= 0;\r myE.strokeOverprint = overprint;\r\t} else {\r\t\talert('Object ' + myE.name + ' is not a pathItem, so cannot apply colour ' + cName);\r\t}\r}", "title": "" }, { "docid": "ad948a340645cf35e7a5ddd1085bc132", "score": "0.55698746", "text": "function brush() {\n var actives = activebrushes(),\n extents = brushextents(actives);\n\n foreground.style(\"display\", function(d) {\n return actives.every(function(p, i) {\n var state = reactComponent.state.selected;\n return extents[i][0] <= d[p] && d[p] <= extents[i][1] && (state.length === 0 || state.indexOf(d.municipality) !== -1);\n }) ? null : \"none\";\n }).style(\"opacity\", 1);\n\n background.style(\"opacity\", function(d) {\n return (actives.every(function(p, i) {\n return extents[i][0] > d[p] || d[p] > extents[i][1];\n })) ? 0.65 : 1;\n });\n\n }", "title": "" }, { "docid": "4ac335f4a6edb45a9a03371757ede43b", "score": "0.5568499", "text": "get fill() {\r\n return brushToString(this.i.n);\r\n }", "title": "" }, { "docid": "1c603cf20a82fd3ec2cca9ec3740da4a", "score": "0.55642056", "text": "setFillStyle(color) {\n this.context.fillStyle = color || 'black';\n return this;\n }", "title": "" }, { "docid": "43e0fe46baba3807b965f335c320834e", "score": "0.5550683", "text": "setCanvasFill(color) {\n this.canvas.backgroundColor = color;\n this.canvas.renderAll();\n /* if (!this.props.canvasImage) {\n } */\n }", "title": "" }, { "docid": "d985370a612558d0361159e9b536c6ec", "score": "0.5547732", "text": "get strokeAlpha() {return 1}", "title": "" }, { "docid": "0622f0665031c5da43d051ed229cec9c", "score": "0.554347", "text": "function onChangeStrokeColor(color) {\n changeStrokeColor(color);\n drawLinesTxt();\n}", "title": "" }, { "docid": "64e8d766511a251eb234ca3bd17da99a", "score": "0.554213", "text": "set_style(draw_style) { this.dp.set_style(draw_style); }", "title": "" }, { "docid": "aa43fd363323558f62de00bcdbf0e30f", "score": "0.5539553", "text": "function gray2(){\r\n \"use strict\";\r\n ctx.beginPath();\r\n ctx.moveTo(848, 156);\r\n ctx.lineTo(1073, 173);\r\n ctx.lineTo(1073, 116);\r\n ctx.lineTo(848, 82);\r\n ctx.closePath();\r\n // style\r\n ctx.fillStyle = \"rgb(84, 73, 90)\";\r\n ctx.fill();\r\n ctx.lineWidth = 2;\r\n ctx.strokeStyle = 'black';\r\n ctx.stroke();\r\n}", "title": "" }, { "docid": "ee2560bd9244aa43ace2ebaa963ce590", "score": "0.5529517", "text": "function shapeStyle()\n{\n if(arguments.length==3) {\n this.fill_color = arguments[0];\n this.line = new lineStyle(arguments[1],arguments[2]);\n }\n else {\n this.fill_color = \"#FFFFFF\";\n this.line = new lineStyle();\n }\n}", "title": "" }, { "docid": "503aee5ef48b7e5586f7eee11a574e59", "score": "0.55246574", "text": "function brush() {\n var actives = dimensions.filter(function(p) { return !y[p].brush.empty(); }),\n extents = actives.map(function(p) { return y[p].brush.extent(); });\n foreground.style(\"display\", function(d) {\n return actives.every(function(p, i) {\n return extents[i][0] <= d[p] && d[p] <= extents[i][1];\n }) ? null : \"none\";\n });\n }", "title": "" }, { "docid": "503aee5ef48b7e5586f7eee11a574e59", "score": "0.55246574", "text": "function brush() {\n var actives = dimensions.filter(function(p) { return !y[p].brush.empty(); }),\n extents = actives.map(function(p) { return y[p].brush.extent(); });\n foreground.style(\"display\", function(d) {\n return actives.every(function(p, i) {\n return extents[i][0] <= d[p] && d[p] <= extents[i][1];\n }) ? null : \"none\";\n });\n }", "title": "" }, { "docid": "503aee5ef48b7e5586f7eee11a574e59", "score": "0.55246574", "text": "function brush() {\n var actives = dimensions.filter(function(p) { return !y[p].brush.empty(); }),\n extents = actives.map(function(p) { return y[p].brush.extent(); });\n foreground.style(\"display\", function(d) {\n return actives.every(function(p, i) {\n return extents[i][0] <= d[p] && d[p] <= extents[i][1];\n }) ? null : \"none\";\n });\n }", "title": "" }, { "docid": "503aee5ef48b7e5586f7eee11a574e59", "score": "0.55246574", "text": "function brush() {\n var actives = dimensions.filter(function(p) { return !y[p].brush.empty(); }),\n extents = actives.map(function(p) { return y[p].brush.extent(); });\n foreground.style(\"display\", function(d) {\n return actives.every(function(p, i) {\n return extents[i][0] <= d[p] && d[p] <= extents[i][1];\n }) ? null : \"none\";\n });\n }", "title": "" }, { "docid": "daaf1574942f5f69d78e5a2be7c717fc", "score": "0.55212253", "text": "function fillcolor()\n{\n this.style.background=color_picker.value;\n}", "title": "" }, { "docid": "16a655999560c6e196ebff21550316cd", "score": "0.55207187", "text": "function setDrawingColor(event){\r\n sketchController.color = this.value;\r\n}", "title": "" }, { "docid": "ab3297045576f3a173e113d7e2f8f67e", "score": "0.5520606", "text": "function onChangeFillColor(color) {\n changeFillColor(color);\n drawLinesTxt();\n}", "title": "" }, { "docid": "b35029b72092e10c77e59cf6583c0fca", "score": "0.5517013", "text": "_drawShape() {\n assertParameters(arguments);\n \n this._updateBlinking();\n \n const radius = this._calculateRadius();\n const coords = this._getCoords(radius);\n \n if (this._highlight !== false && this._shouldDraw) {\n const highlightSize = this._highlight * (Hexagon.HIGHLIGHT_SIZE + radius);\n this._canvas.drawWithShadow(highlightSize, Hexagon.HIGHLIGHT_COLOR, \n this._drawWithCoords.bind(this, coords));\n } else {\n this._drawWithCoords(coords);\n }\n }", "title": "" }, { "docid": "581b74ef7c34d1b3b6c3bd12537be99c", "score": "0.55145776", "text": "function draw_set_color(color)\n{\n surfaceTarget.fillStyle = color;\n surfaceTarget.strokeStyle = color;\n}", "title": "" }, { "docid": "238eb993e1ce6514bbec77ae1f0e36b4", "score": "0.5510662", "text": "get fill() {\n return this._fillStyle;\n }", "title": "" }, { "docid": "93d87dfcb9ff99236f4b4a60cfef83bf", "score": "0.5505691", "text": "function brush() {\n\t\tvar actives = dimensions.filter(function (p) { return !y[p].brush.empty(); }),\n\t\t\textents = actives.map(function (p) { return y[p].brush.extent(); });\n\t\tforeground.style(\"display\", function (d) {\n\t\t\treturn actives.every(function (p, i) {\n\t\t\t\treturn extents[i][0] <= d[p] && d[p] <= extents[i][1];\n\t\t\t}) ? null : \"none\";\n\t\t});\n\t}", "title": "" }, { "docid": "19d7cdfcc57380a9556fb54816e3988a", "score": "0.55025226", "text": "set fillColor(pCol) {\n\t\t//Clean the value\n\t\tpCol = Validate.instance(pCol, Color, null, true);\n\n\t\t//Set the value\n\t\tthis.__Internal__Dont__Modify__.fillColor = new Color(pCol);\n\t}", "title": "" }, { "docid": "6ee25461d62c88c0d0f2df8493c17de2", "score": "0.5499746", "text": "function brush() {\n // console.log(\"brushing\")\n var actives = [];\n //filter brushed extents\n svg.selectAll(\".brush\")\n .filter(function(d) {\n return d3.brushSelection(this);\n })\n .each(function(d) {\n actives.push({\n dimension: d,\n extent: d3.brushSelection(this)\n });\n });\n\n // console.log(actives)\n //set un-brushed foreground line disappear\n foreground.classed(\"fade\", function(d,i) {\n\n return !actives.every(function(active) {\n var dim = active.dimension;\n return active.extent[0] <= y[dim](d[dim]) && y[dim](d[dim]) <= active.extent[1];\n });\n });\n\n\n }", "title": "" }, { "docid": "4bc82b2e87f2c9c3e011d26e330e8f8c", "score": "0.54970366", "text": "function drawFillRect(x, y, w, h, color = 'white') {\n ctx.fillStyle = color;\n ctx.fillRect(x, y, w, h);\n}", "title": "" }, { "docid": "a0fb2fec73020bcdc6c4905488abd22e", "score": "0.5493995", "text": "stroke(color) {\n return this.strokeColor(color);\n }", "title": "" }, { "docid": "ecf4db17beb1e80f313bfaabaa60d2a6", "score": "0.54916084", "text": "set_style(draw_style) { this.draw_style = draw_style; }", "title": "" }, { "docid": "641e4a12e932dabd757f96d60f320142", "score": "0.54911494", "text": "function brush(g) {\n const brush = d3.brush() // Create a 2D interactive brush\n .on('start brush', highlight) // When the brush starts/continues do...\n .on('end', brushEnd) // When the brush ends do...\n .extent([\n [-margin.left, -margin.bottom],\n [width + margin.right, height + margin.top]\n ]);\n \n ourBrush = brush;\n\n g.call(brush); // Adds the brush to this element\n\n // Highlight the selected circles\n function highlight(event, d) {\n if (event.selection === null) return;\n const [\n [x0, y0],\n [x1, y1]\n ] = event.selection;\n\n // If within the bounds of the brush, select it\n points.classed('selected', d =>\n x0 <= X(d) && X(d) <= x1 && y0 <= Y(d) && Y(d) <= y1\n );\n\n // Get the name of our dispatcher's event\n let dispatchString = Object.getOwnPropertyNames(dispatcher._)[0];\n\n // Let other charts know about our selection\n dispatcher.call(dispatchString, this, svg.selectAll('.selected').data());\n }\n \n function brushEnd(event, d){\n // We don't want infinite recursion\n if(event.sourceEvent !== undefined && event.sourceEvent.type!='end'){\n d3.select(this).call(brush.move, null);\n }\n }\n }", "title": "" }, { "docid": "dd9aa22defff557d9efe1687ddcbdf58", "score": "0.5489783", "text": "function brush() {\n var actives = variables.filter(function(p) { return !y[p].brush.empty(); }),\n extents = actives.map(function(p) { return y[p].brush.extent(); });\n foreground.style(\"display\", function(d) {\n return actives.every(function(p, i) {\n return extents[i][0] <= d[p] && d[p] <= extents[i][1];\n }) ? null : \"none\";\n });\n }", "title": "" }, { "docid": "dcc617b31fd6f6734e93c4dcf0339fbd", "score": "0.5487612", "text": "function setColor(color) {\n _context.strokeStyle = color;\n }", "title": "" }, { "docid": "d5c90802742efc6c9c94d7d8a8c41649", "score": "0.548479", "text": "function brush() {\r\n var actives = dimensions.filter(function(p) { return !y[p].brush.empty(); }),\r\n extents = actives.map(function(p) { return y[p].brush.extent(); });\r\n foreground.style(\"display\", function(d) {\r\n return actives.every(function(p, i) {\r\n return extents[i][0] <= d[p] && d[p] <= extents[i][1];\r\n }) ? null : \"none\";\r\n });\r\n }", "title": "" }, { "docid": "037bfe0650b3ee3a8034a316a53ebb99", "score": "0.5482538", "text": "function brush() {\n var actives = dimensions.map(function(columnName, columnIndex) {\n if (y[columnIndex].brush.empty()) {\n \treturn null;\n } else {\n \treturn columnIndex;\n }\n });\n \n var extents = actives.map(function(columnIndex) {\n \tif (columnIndex == null) return null; else \n \t\treturn y[columnIndex].brush.extent();\n });\n \n coordLines.attr(\"class\", function(entry) {\n return (actives.every(function(columnIndex) {\n \tif (columnIndex == null) return true; else \n \t\treturn extents[columnIndex][0] <= entry.values[columnIndex] && entry.values[columnIndex] <= extents[columnIndex][1];\n }) && actives.some(function(d) { return d != null; })) ? \"selected\" : \"not-selected\";\n });\n \n \n self.handleUserSelect(coordLines.data()\n \t\t.filter(function(entry) {\n \t\t\treturn actives.every(function(columnIndex) {\n \tif (columnIndex == null) return true; else \n \t\treturn extents[columnIndex][0] <= entry.values[columnIndex] && entry.values[columnIndex] <= extents[columnIndex][1];\n }) && actives.some(function(d) { return d != null; });\n \t\t})\n \t\t.map(function(entry) {\n \t\t\treturn entry.id;\n \t\t}));\n }", "title": "" }, { "docid": "12a01709493cd8e01a71bf2e82ad2f88", "score": "0.5482143", "text": "stroke(c, width, linejoin, linecap) {\n if (typeof c == \"boolean\") {\n this.stroked = c;\n }\n else {\n this.stroked = true;\n this._style.strokeStyle = c;\n this._ctx.strokeStyle = c;\n if (width) {\n this._ctx.lineWidth = width;\n this._style.lineWidth = width;\n }\n if (linejoin) {\n this._ctx.lineJoin = linejoin;\n this._style.lineJoin = linejoin;\n }\n if (linecap) {\n this._ctx.lineCap = linecap;\n this._style.lineCap = linecap;\n }\n }\n return this;\n }", "title": "" }, { "docid": "7d6cd5ff975ac3e8460a96ab070f636e", "score": "0.548033", "text": "function draw() {\n stroke(150);\n}", "title": "" }, { "docid": "dc19ed7f398829dabe231b5be215e534", "score": "0.5474588", "text": "applyColour() {\n const renderer = this.sourceBlock_.workspace.getRenderer();\n this.sourceBlock_.pathObject.svgPath.setAttribute(\n \"fill\",\n this.sourceBlock_.style.colourPrimary\n );\n if (renderer.name === \"geras\") {\n this.sourceBlock_.pathObject.svgPathLight.setAttribute(\n \"stroke\",\n this.sourceBlock_.style.colourTertiary\n );\n this.sourceBlock_.pathObject.svgPathDark.setAttribute(\n \"fill\",\n this.sourceBlock_.style.colourTertiary\n );\n this.sourceBlock_.pathObject.svgPathLight.style.display = \"inline\";\n }\n }", "title": "" } ]
38577d54f2b7c3e7ae3690c9803578e6
(public) this / a
[ { "docid": "43c36a8e2b29b6447c79000463b409d9", "score": "0.0", "text": "function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }", "title": "" } ]
[ { "docid": "d0e09c5cb217bb19d492c329a624ff6d", "score": "0.7762959", "text": "get a() {\n\t\treturn this._a_;\n\t}", "title": "" }, { "docid": "2c1b4902653712192d41decb66478de2", "score": "0.70866776", "text": "function M(){this.a={}}", "title": "" }, { "docid": "2c1b4902653712192d41decb66478de2", "score": "0.70866776", "text": "function M(){this.a={}}", "title": "" }, { "docid": "2c1b4902653712192d41decb66478de2", "score": "0.70866776", "text": "function M(){this.a={}}", "title": "" }, { "docid": "8879067a8f99a4d330fe6bdcb90abab2", "score": "0.70796305", "text": "getA() {\n\t\treturn this.a;\n\t}", "title": "" }, { "docid": "00771c0e67437b2c25b3bbad98effcde", "score": "0.6974709", "text": "get a() {\n this._checkPreExpectation('a');\n return this;\n }", "title": "" }, { "docid": "3ba1e9b0018d9a201e4e1ea35383b54b", "score": "0.68752253", "text": "function A(){q.call(this)}", "title": "" }, { "docid": "3ba1e9b0018d9a201e4e1ea35383b54b", "score": "0.68752253", "text": "function A(){q.call(this)}", "title": "" }, { "docid": "a2a8ae439dc2afa6c044f7055c5dae4e", "score": "0.6825671", "text": "function x(){this.a={}}", "title": "" }, { "docid": "a2a8ae439dc2afa6c044f7055c5dae4e", "score": "0.6825671", "text": "function x(){this.a={}}", "title": "" }, { "docid": "271f13faa06e96d43bbaaa933ff80dad", "score": "0.68190813", "text": "function a () {\r\n console.log(this);\r\n }", "title": "" }, { "docid": "c931c01a0fc9105a914fd16362c6b188", "score": "0.68110555", "text": "function aA(a,b){this.N=[];this.Da=a;this.ea=b||null;this.J=this.C=!1;this.H=void 0;this.za=this.Ea=this.O=!1;this.X=0;this.F=null;this.L=0}", "title": "" }, { "docid": "c025d2475625c7a1ddb9bbe93539b81b", "score": "0.67664117", "text": "function L(){this.a={}}", "title": "" }, { "docid": "62cd087a66461caad559a6b81d073404", "score": "0.6753558", "text": "function foo() {\n return this.a;\n}", "title": "" }, { "docid": "762d25f0d22b26411ee77ef1a084f863", "score": "0.6732626", "text": "function Ag(){this.b=null;this.a=[]}", "title": "" }, { "docid": "61a533299ceb3f006626aeb396f93d98", "score": "0.66602874", "text": "function a(e){if(!(this instanceof a))return new a(e);this._wrapped=e}", "title": "" }, { "docid": "61a533299ceb3f006626aeb396f93d98", "score": "0.66602874", "text": "function a(e){if(!(this instanceof a))return new a(e);this._wrapped=e}", "title": "" }, { "docid": "63a541dc40e253889c3ab65bf2f1a59e", "score": "0.6656123", "text": "function B(a){this.ul=a}", "title": "" }, { "docid": "3178c687988c3fbda657157bd7a7f3b7", "score": "0.6651379", "text": "function a() {\r\n console.log(this);\r\n}", "title": "" }, { "docid": "e1856717aec6d4591c661e007b11e169", "score": "0.66254926", "text": "function f(){\r\n return this.a;\r\n}", "title": "" }, { "docid": "ca3286936206221260c1acfa7fa741ca", "score": "0.6613079", "text": "function ii(a){this.wa=a}", "title": "" }, { "docid": "d7b4a10862f641bc54a84f807198277e", "score": "0.65830916", "text": "function ib() {\n\tconsole.log( this.a );\n}", "title": "" }, { "docid": "9ff0fe229c915c047c4afb513899b72d", "score": "0.65769327", "text": "function eb() {\n\tconsole.log( this.a );\n}", "title": "" }, { "docid": "830f9b09083558507b6e62762c569c20", "score": "0.657135", "text": "function aB(){var t=this;Mx()(this,{$interaction:{enumerable:!0,get:function(){return t.$olObject}},$map:{enumerable:!0,get:function(){return t.$services&&PI()(t.$services)}},$view:{enumerable:!0,get:function(){return t.$services&&t.$services.view}},$interactionsContainer:{enumerable:!0,get:function(){return t.$services&&t.$services.interactionsContainer}}})}", "title": "" }, { "docid": "1a142fa8865195aaeb86d484bde52031", "score": "0.6548371", "text": "function foo() {\n\tconsole.log(\"this a\", this.a);\n}", "title": "" }, { "docid": "cbf11f686296b5549ddbc6163baa1344", "score": "0.65411913", "text": "function foo(a) {\n\tthis.a = a;\n}", "title": "" }, { "docid": "cbf11f686296b5549ddbc6163baa1344", "score": "0.65411913", "text": "function foo(a) {\n\tthis.a = a;\n}", "title": "" }, { "docid": "c8a1074183db6938ee149ba9e378496d", "score": "0.6495214", "text": "constructor(a) { super(a||basis.length); return this; }", "title": "" }, { "docid": "0f82a40fb3e1745ef5b83c4e1c5b5430", "score": "0.6493837", "text": "function Zh(a){this.sa=a}", "title": "" }, { "docid": "7e8f67acb2f0fc2360af8dc2110d1e9a", "score": "0.64919233", "text": "function a() {\n\tconsole.log(this);\n}", "title": "" }, { "docid": "7e8f67acb2f0fc2360af8dc2110d1e9a", "score": "0.64919233", "text": "function a() {\n\tconsole.log(this);\n}", "title": "" }, { "docid": "8fc970236a44f6100917976de0d12d14", "score": "0.6487597", "text": "function foo() {\n\tconsole.log( this.a );\n}", "title": "" }, { "docid": "8fc970236a44f6100917976de0d12d14", "score": "0.6487597", "text": "function foo() {\n\tconsole.log( this.a );\n}", "title": "" }, { "docid": "8fc970236a44f6100917976de0d12d14", "score": "0.6487597", "text": "function foo() {\n\tconsole.log( this.a );\n}", "title": "" }, { "docid": "2d88a07053456a07f98dc6e9a12b23f5", "score": "0.64869326", "text": "function a(){\n console.log(this)\n}", "title": "" }, { "docid": "d074029046406c84d4a6cda1a4a28908", "score": "0.6479531", "text": "function a(_x) {\n return _a2.apply(this, arguments);\n }", "title": "" }, { "docid": "79249f67e15afcc674d7f52d57da4a34", "score": "0.6464533", "text": "function foo() {\n console.log(this.a);\n}", "title": "" }, { "docid": "79249f67e15afcc674d7f52d57da4a34", "score": "0.6464533", "text": "function foo() {\n console.log(this.a);\n}", "title": "" }, { "docid": "1bf8c436e81ebe9d3809a1b7b5442982", "score": "0.64415187", "text": "function a(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!==typeof e&&\"function\"!==typeof e?t:e}", "title": "" }, { "docid": "bc7c58a742511d8d9df9ee108716d62c", "score": "0.6439626", "text": "constructor(){\n\t\tthis.a = [0]; // element at index 0 doesn't matter\n\t}", "title": "" }, { "docid": "3c39a368e17e8fb61ac141c3cd2c6b6f", "score": "0.6426812", "text": "constructor(a) { super(a||tot); return this; }", "title": "" }, { "docid": "305ed01be2a4a2ae8364f2ddda193f16", "score": "0.6424294", "text": "function Hd(a){this.a=a}", "title": "" }, { "docid": "6b8e2b2ab40d5530578873cdaa8d83f3", "score": "0.6418355", "text": "function Eg(a){this.vb=a}", "title": "" }, { "docid": "a9b3b88e4d653728c42d961ff5568846", "score": "0.64175344", "text": "function a(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}", "title": "" }, { "docid": "4491b023a6d7718276a694b979411fdc", "score": "0.6408365", "text": "function Foo() {\n console.log(this.a);\n}", "title": "" }, { "docid": "59554db2ac8673f82037a12ea8f6e193", "score": "0.64073485", "text": "function f() {\n return this.a;\n}", "title": "" }, { "docid": "59554db2ac8673f82037a12ea8f6e193", "score": "0.64073485", "text": "function f() {\n return this.a;\n}", "title": "" }, { "docid": "9a5fba23275f062e3c52565412eadf13", "score": "0.6386245", "text": "function foo() {\n console.log('this.a', this.a);\n}", "title": "" }, { "docid": "f58a9ff752930b05f6af0aa78bf463e0", "score": "0.6372521", "text": "function implicit() {\n console.log(this.a);\n}", "title": "" }, { "docid": "9a9c5ba412259482de235202ebe0392d", "score": "0.63701934", "text": "get and() { return this }", "title": "" }, { "docid": "95b11ebb98f6d8caffe3118d9c5490b8", "score": "0.6367709", "text": "function foo() {\n console.log(\"foo\", this.a);\n}", "title": "" }, { "docid": "88522f9e589ed3457a592adeab5f1b01", "score": "0.63435733", "text": "function explicit() {\n console.log(this.a);\n}", "title": "" }, { "docid": "a7cc589d122026fcc4625beb8e4e2673", "score": "0.63429934", "text": "function ai(a,b){this.o=[];this.L=a;this.J=b||null;this.s=this.i=!1;this.l=void 0;this.D=this.U=this.A=!1;this.v=0;this.j=null;this.H=0}", "title": "" }, { "docid": "e997d6a943df336dffd44c77cc88510f", "score": "0.6340725", "text": "function foo(something){\n this.a = something;\n}", "title": "" }, { "docid": "160bb88656334a51ea3f993709c74c4f", "score": "0.63240016", "text": "function f(){\r\n \t\tconsole.log(this)\r\n \t\tthis.a = 1\r\n \t}", "title": "" }, { "docid": "e076202a2190354bf7b36d14f9c31adb", "score": "0.6312329", "text": "function we(a){we.v.constructor.call(this,a);ue(this)}", "title": "" }, { "docid": "4382adbdd3a1a82de3c6d3848536880b", "score": "0.62951183", "text": "function zg(a){this.s=a}", "title": "" }, { "docid": "7db331cbc914c1ba9208b2ad439b0245", "score": "0.6279758", "text": "function kd(a){this.ta={};this.o=a}", "title": "" }, { "docid": "a5bbd5e962596a3c82bb5ea189621f54", "score": "0.6265136", "text": "function Au(a,b){this.u_=[];this.zCa=a;this.Gpa=b||null;this.aL=this.Dg=!1;this.kj=void 0;this.$ia=this.TQa=this.P3=!1;this.R1=0;this.Oc=null;this.FQ=0}", "title": "" }, { "docid": "12ee44471902055c9ba458e674d3b507", "score": "0.62623185", "text": "function Pc(a){this.ta={};this.o=a}", "title": "" }, { "docid": "2a9098e680a6d9e1dbcc4a03a3ad60a7", "score": "0.6262097", "text": "function banana() {\n console.log(this.a);\n}", "title": "" }, { "docid": "330d8e57bafffa6d105a90f15eb55f83", "score": "0.62325406", "text": "function a(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!=typeof t&&\"function\"!=typeof t?e:t}", "title": "" }, { "docid": "330d8e57bafffa6d105a90f15eb55f83", "score": "0.62325406", "text": "function a(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!=typeof t&&\"function\"!=typeof t?e:t}", "title": "" }, { "docid": "330d8e57bafffa6d105a90f15eb55f83", "score": "0.62325406", "text": "function a(e,t){if(!e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!=typeof t&&\"function\"!=typeof t?e:t}", "title": "" }, { "docid": "d6d989e68d9de6e5fef622390dcffec0", "score": "0.62287086", "text": "function showA() {\n console.log(\"a is \", this.a);\n}", "title": "" }, { "docid": "5f070d7a7a121152af892e320492fff9", "score": "0.622489", "text": "get a() {\n return chain.call(this, this.instanceof)\n }", "title": "" }, { "docid": "5f070d7a7a121152af892e320492fff9", "score": "0.622489", "text": "get a() {\n return chain.call(this, this.instanceof)\n }", "title": "" }, { "docid": "da814d7e588c46fc06a7475e15023f59", "score": "0.62200606", "text": "function $g(a,b){this.j=a;this.u=b;ah(this);var c=bh(this)[0];this.B=c[1];$g.p.constructor.call(this,c[0])}", "title": "" }, { "docid": "a1180c4cab1e755672489b3a6fa04e8d", "score": "0.6206764", "text": "function a1(){\n console.log(this);\n}", "title": "" }, { "docid": "d06de1dee1380fa5b67dc09855969ac0", "score": "0.62063074", "text": "function Ax(a,b){this.H=[];this.$=a;this.S=b||null;this.C=this.B=!1;this.A=void 0;this.N=this.aa=this.R=!1;this.I=0;this.D=null;this.F=0}", "title": "" }, { "docid": "f3f9af06bd81b9c2bfe8766e8b4080bd", "score": "0.6199144", "text": "function Ta(){return Na.apply(this,arguments)}", "title": "" }, { "docid": "b79846ee5b13be0fca5463f6b2bd2f04", "score": "0.6196841", "text": "function A() {\n\tthis.name = 'A';\n}", "title": "" }, { "docid": "acffe366305a123ddf65c9f97713c0bb", "score": "0.61867774", "text": "function ___PRIVATE___(){}", "title": "" }, { "docid": "10ad2f6fd95530b68fb596df008d38f0", "score": "0.61793905", "text": "function aFunction(){\n console.log(this.b);\n}", "title": "" }, { "docid": "7d04fc7072344cb64b42b25b000f3f7e", "score": "0.61641407", "text": "function implicitTow() {\n console.log(this.a);\n}", "title": "" }, { "docid": "606931763a017be44cb9e9ad964b8afe", "score": "0.61639786", "text": "function zd(a){this.ha=a}", "title": "" }, { "docid": "6131c7571e217184b683084ea2409fb8", "score": "0.6153661", "text": "function sd(a){this.ra={};this.o=a}", "title": "" }, { "docid": "9e4bd0061a4edb1f74e7623857c7ff9d", "score": "0.6152681", "text": "function dg(b){this.a=b}", "title": "" }, { "docid": "821dfb62fd7285a4b16d01d63b2e0d8f", "score": "0.6149452", "text": "function a(e){return this.cast(e)}", "title": "" }, { "docid": "db4cf65f53a03817fe8541369c62ce88", "score": "0.6148686", "text": "constructor(a) { super(a); if (this.upgrade) this.upgrade(); return this; }", "title": "" }, { "docid": "546ac2a45b6189755cd66ff6e489440d", "score": "0.6147832", "text": "ap(that) {\n return Ap(that, this)\n }", "title": "" }, { "docid": "e0594410d20ea009d0b7a023ed562d98", "score": "0.6139621", "text": "constructor(a, b) {\n this.a = a;\n this.b = b;\n }", "title": "" }, { "docid": "1b1d8f36427c52fd3ef96163c5915343", "score": "0.61275405", "text": "function x() {\n this.a = {};\n }", "title": "" }, { "docid": "f875716acb8a56cef470f5c3faabbab7", "score": "0.61267936", "text": "set a(val) {\n\t\tthis._a_ = val * 2;\n\t}", "title": "" }, { "docid": "10a9aa1145f9ea5eba42ef3741e0642a", "score": "0.6125049", "text": "function vA(a,b){this.C=[];this.T=a;this.N=b||null;this.B=this.j=!1;this.A=void 0;this.H=this.S=this.F=!1;this.D=0;this.o=null;this.G=0}", "title": "" }, { "docid": "473612dd7ab784f7e8c91ac958052970", "score": "0.6105079", "text": "function uh(){this.b=null;this.a=[]}", "title": "" }, { "docid": "473612dd7ab784f7e8c91ac958052970", "score": "0.6105079", "text": "function uh(){this.b=null;this.a=[]}", "title": "" }, { "docid": "068ceb9738de90414c5f3e3dcbf7c843", "score": "0.61034197", "text": "function Ar(a,b){this.L=[];this.Aa=a;this.ia=b||null;this.H=this.C=!1;this.F=void 0;this.ga=this.Ga=this.O=!1;this.N=0;this.Wg=null;this.J=0}", "title": "" }, { "docid": "ac34178cc10af3ed729ede6625539a7d", "score": "0.6100699", "text": "function A() {\n q.call(this);\n }", "title": "" }, { "docid": "9d34ad43af446cb191bb747807a5619d", "score": "0.6099256", "text": "function A(name) {\n\tthis.name = name;\n}", "title": "" }, { "docid": "5792156300162507fc896435cecdfb77", "score": "0.6095459", "text": "function a$c(r,s)\n{\n this.a$a = r;\n this.a$b = s; \n return this;\n}", "title": "" }, { "docid": "7d32c726c4a92c17a68217b27e6e8284", "score": "0.60844785", "text": "function hardBinding() {\n console.log(this.a);\n}", "title": "" }, { "docid": "f48d9e2fee153f924058a898bb97e698", "score": "0.60684204", "text": "function Ai(a) {\n this.j = a;\n}", "title": "" }, { "docid": "2e09f9e74fdce8a2c9b1b786ce84e2df", "score": "0.60653794", "text": "function ad(a){this.id=x.i.ve();wc[this.id]=this;this.options=a||{};this.u=!!this.options.u;this.Ce=!!this.options.Ce;this.Ea=this.options.Ea;this.Hi=[];this.Ii=[];this.bl=Object.create(null);this.Ec=[];this.zh=[];this.fk=[];this.on=Object.create(null);this.ta=new Pc(this);this.zi=null}", "title": "" }, { "docid": "8cc075b66890e078e3b2bc5ab32bcd7f", "score": "0.6062444", "text": "function G() { var t = a(); return this.copyTo(t), t }", "title": "" }, { "docid": "1075af2e3a334fd27cf25ba60e673d49", "score": "0.6062319", "text": "get a() {\n\t\treturn 2;\n\t}", "title": "" }, { "docid": "1075af2e3a334fd27cf25ba60e673d49", "score": "0.6062319", "text": "get a() {\n\t\treturn 2;\n\t}", "title": "" }, { "docid": "1075af2e3a334fd27cf25ba60e673d49", "score": "0.6062319", "text": "get a() {\n\t\treturn 2;\n\t}", "title": "" }, { "docid": "1075af2e3a334fd27cf25ba60e673d49", "score": "0.6062319", "text": "get a() {\n\t\treturn 2;\n\t}", "title": "" }, { "docid": "65f4e812a71b50d2cdeb79a866d0ce98", "score": "0.6047897", "text": "function aa(a){return function(){return this[a]}}", "title": "" }, { "docid": "eaaab2d0ddb00fdcfa4cca0078ac012d", "score": "0.6031105", "text": "get an() {\n return chain.call(this, this.instanceof)\n }", "title": "" } ]
d2c1912a800c63106730ce880a7d8d21
Creates a Map Object
[ { "docid": "e4a39f9d73ac8e50a6b5a6d53fe47a5f", "score": "0.0", "text": "constructor(allData) {\n //Width and height of map\n this.width = 760;\n this.height = 500;\n this.data = allData\n\n\n //Create SVG element and append map to the SVG\n this.svg = d3.select(\"#map-view\")\n .append(\"svg\")\n .attr(\"width\", this.width)\n .attr(\"height\", this.height);\n\n }", "title": "" } ]
[ { "docid": "7eaef53c1dedc492dd311f14d585c860", "score": "0.76216954", "text": "function createMap() {\n /// 创建一个原型为null的空对象\n return Object.create(null);\n}", "title": "" }, { "docid": "75c8026211cb078eed0d21960f339899", "score": "0.7329919", "text": "function createMap(){\n\t\tworldMapInstance = new WorldMap(svg);\n\t}", "title": "" }, { "docid": "e3c0564e783a6804286cd7d01539ce76", "score": "0.72913474", "text": "function Map() {\n if (this instanceof Map) {\n this._keys = OrderedSet.create();\n this._keys._silenceRemoveDeprecation = true;\n this._values = new _emberUtils.EmptyObject();\n this.size = 0;\n } else {\n missingNew('Map');\n }\n }", "title": "" }, { "docid": "e3c0564e783a6804286cd7d01539ce76", "score": "0.72913474", "text": "function Map() {\n if (this instanceof Map) {\n this._keys = OrderedSet.create();\n this._keys._silenceRemoveDeprecation = true;\n this._values = new _emberUtils.EmptyObject();\n this.size = 0;\n } else {\n missingNew('Map');\n }\n }", "title": "" }, { "docid": "d07430c73982c79b190baf4efe75bb0f", "score": "0.715598", "text": "function _createMap(email) {\n // console.log('EMAIL IS: ' + email);\n return newMap;\n}", "title": "" }, { "docid": "ccfac924383ba37256d9abc917e02cd7", "score": "0.71260375", "text": "function Map() {\r\n this.keys = [];\r\n this.values = [];\r\n}", "title": "" }, { "docid": "a0a76c1ae88ebe4a57842d0e4dfc3ea8", "score": "0.7108449", "text": "function Map() {\n\tthis.keys = [];\n\tthis.values = [];\n\n\t// add a key / value pair to map\n\tthis.add = function(key, value) {\n\t\tthis.keys.push(key);\n\t\tthis.values.push(value);\n\t}\n\n\t// get value from key\n\tthis.get = function(key) {\n\t\treturn this.keys.indexOf(key) != -1 ? this.values[this.keys.indexOf(key)] : null;\n\n\t}\n}", "title": "" }, { "docid": "1743731f5cf62424ed59be815b83c0f8", "score": "0.70725906", "text": "function createServiceMap() {\n return new Map();\n }", "title": "" }, { "docid": "94c4a85cfe8b32e21863224dd6d9037d", "score": "0.7011348", "text": "function constructor(){\r\n this.maplist = new Map();\r\n }", "title": "" }, { "docid": "d7c91d650985796643fcd231bf3e074a", "score": "0.7007423", "text": "constructor() {\n this.map = new Map();\n }", "title": "" }, { "docid": "a814617bf0d8b84e099da670745395bb", "score": "0.69634753", "text": "function initMap() {}", "title": "" }, { "docid": "c07d09b6c7d1b9dfc38a183bb551948a", "score": "0.6930756", "text": "function initMap(selector) {\n return new _map.Map(selector);\n}", "title": "" }, { "docid": "6ad700b4cf2b177f7268e3fa74603263", "score": "0.6780123", "text": "function api_map_mv_CreateMap(id, options) {\n return new L.map(id, options) ;\n}", "title": "" }, { "docid": "33fbb2de0cb9fae35e88116228df7985", "score": "0.6766098", "text": "function createMapObj() {\n var newmap = {};\n newmap = dataUtilFactory.createEnumObjs($scope.externalProducts, newmap, 'Id');\n $scope.loadedMap = angular.copy(newmap);\n }", "title": "" }, { "docid": "172b4b29b1dd2c280af72f9b659e0a34", "score": "0.67504436", "text": "function h$Map() {\n this._pairsKeys = [];\n this._pairsValues = [];\n this._keys = [];\n this._size = 0;\n}", "title": "" }, { "docid": "172b4b29b1dd2c280af72f9b659e0a34", "score": "0.67504436", "text": "function h$Map() {\n this._pairsKeys = [];\n this._pairsValues = [];\n this._keys = [];\n this._size = 0;\n}", "title": "" }, { "docid": "172b4b29b1dd2c280af72f9b659e0a34", "score": "0.67504436", "text": "function h$Map() {\n this._pairsKeys = [];\n this._pairsValues = [];\n this._keys = [];\n this._size = 0;\n}", "title": "" }, { "docid": "172b4b29b1dd2c280af72f9b659e0a34", "score": "0.67504436", "text": "function h$Map() {\n this._pairsKeys = [];\n this._pairsValues = [];\n this._keys = [];\n this._size = 0;\n}", "title": "" }, { "docid": "172b4b29b1dd2c280af72f9b659e0a34", "score": "0.67504436", "text": "function h$Map() {\n this._pairsKeys = [];\n this._pairsValues = [];\n this._keys = [];\n this._size = 0;\n}", "title": "" }, { "docid": "172b4b29b1dd2c280af72f9b659e0a34", "score": "0.67504436", "text": "function h$Map() {\n this._pairsKeys = [];\n this._pairsValues = [];\n this._keys = [];\n this._size = 0;\n}", "title": "" }, { "docid": "172b4b29b1dd2c280af72f9b659e0a34", "score": "0.67504436", "text": "function h$Map() {\n this._pairsKeys = [];\n this._pairsValues = [];\n this._keys = [];\n this._size = 0;\n}", "title": "" }, { "docid": "172b4b29b1dd2c280af72f9b659e0a34", "score": "0.67504436", "text": "function h$Map() {\n this._pairsKeys = [];\n this._pairsValues = [];\n this._keys = [];\n this._size = 0;\n}", "title": "" }, { "docid": "f2ac76df1352474c35512b5cfd4e100e", "score": "0.6704839", "text": "function createMap(originalPosition) {\n map = constructMap(originalPosition);\n watchPosition();\n deferred.resolve(map);\n mapInitialized = true;\n }", "title": "" }, { "docid": "a1a850e573cca82db6b66c42aae7b8f0", "score": "0.660476", "text": "function Map() {\n throw new Error('Map should not be instantiated!');\n}", "title": "" }, { "docid": "a4ee109d02e2a5df568ff54b1031d57e", "score": "0.6566591", "text": "function MapObject(options) {\n options = options || {};\n \n this.name = options.name;\n this.type = options.type;\n this.size = options.size || {width: 1, height: 1};\n this.position = options.position || {x: 0, y: 0};\n this.properties = options.properties || {};\n}", "title": "" }, { "docid": "7c88c4a7d08f9b837239fcb69c190cae", "score": "0.6561437", "text": "function createMap(){\n const divMap = elements.divMap;\n const coordinatesUSA = [\"39.8283\", \"-98.5791\"];\n const map = L.map(\n divMap.node(), \n {\n center: coordinatesUSA,\n zoom: 3\n }\n );\n \n return map;\n}", "title": "" }, { "docid": "838382cb0bd4b68b3d7eb783f1aace56", "score": "0.65606827", "text": "function createMap(t, a, f) {\n var n = document.createElement(t);\n for (var k in a) {\n n.appendChild(f(k, a[k]));\n }\n return n;\n }", "title": "" }, { "docid": "71ce04d92549b9de0531efaefb1a57f7", "score": "0.6556402", "text": "function Map(){\r\n\r\n\tthis.list = new List();\r\n\r\n\t//放置元素\r\n\tthis.put = function(key,value){\r\n\t\t\tfor(var i=0;i<this.list.size();i++){\r\n\t\t\t\tif(this.list.get(i).key==key){\r\n\t\t\t\t\tthis.list.get(i).value=value;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar element = new MapElement();\r\n\t\t\telement.key = key;\r\n\t\t\telement.value=value;\r\n\t\t\tthis.list.add(element);\r\n\t\t}\r\n\t//获取元素\r\n\tthis.get = function(key){\r\n\t\t\tfor(var i=0;i<this.list.size();i++){\r\n\t\t\t\tif(this.list.get(i).key==key){\r\n\t\t\t\t\treturn this.list.get(i).value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t}\r\n\t//获取元素个数\r\n\tthis.size = function(){\r\n\t\t\treturn this.list.size();\r\n\t\t}\r\n\t//获取所有的KEY\r\n\tthis.getKeys = function(){\r\n\t\t\tvar arr = new Array();\r\n\t\t\tfor(var i=0;i<this.list.size();i++){\r\n\t\t\t\tarr[i]=this.list.get(i).key;\r\n\t\t\t}\r\n\t\t\treturn arr;\r\n\t\t}\r\n}", "title": "" }, { "docid": "4a613ecb47c440e736f48ba4e279215e", "score": "0.65004146", "text": "function getOrCreateMap(ordinalMeta){\nreturn ordinalMeta._map||(\nordinalMeta._map=createHashMap(ordinalMeta.categories));\n\n}", "title": "" }, { "docid": "66300410e3194c6117ed251c24dbff6a", "score": "0.6490001", "text": "function buildMap(obj) {\n return Object.keys(obj).reduce(\n (map, key) => map.set(key, obj[key]),\n new Map()\n );\n}", "title": "" }, { "docid": "101a48f6b758a1b156f48d26f402d171", "score": "0.64860594", "text": "constructor(map){\n this.map = map\n }", "title": "" }, { "docid": "beb823ee740320acd45860788f2c4881", "score": "0.64642566", "text": "function testMapBase() {\n const m = new Map([\n [1,'1'],\n ['name','Tom'],\n [Symbol('age'),19],\n [{other:'play'},'basketball'],\n ]);\n console.log(m);\n console.log(m.size);\n }", "title": "" }, { "docid": "0989b992c54e2142bb141b95b9e8cc68", "score": "0.6412147", "text": "function create_map(options){\n\t\t\t\tmap = new google.maps.Map(document.getElementById('map-canvas'), options);\n\t\t\t}", "title": "" }, { "docid": "5ffabe356089070463d8af7b004d0b29", "score": "0.63910145", "text": "function getOrCreateMap(ordinalMeta) {\n\t return ordinalMeta._map || (ordinalMeta._map = createHashMap(ordinalMeta.categories));\n\t}", "title": "" }, { "docid": "c5b8b8cfa7811bd007e68fdd86f237c6", "score": "0.6382017", "text": "createMapParkAges (...objsArr) {\n let AgesMap = new Map();\n for (const obj of objsArr) {\n const age = this.calculateAge(obj.yearOfBuild);\n //console.log(age);\n //console.log(obj);\n AgesMap.set(obj.name, age);\n //console.log(AgesMap);\n }\n return AgesMap;\n }", "title": "" }, { "docid": "2a71891f327de820c5857204544f5586", "score": "0.6373877", "text": "function newMindMap() {\n //TODO - create untitled map in database so i can save\n //TODO - nodes to existing map\n}", "title": "" }, { "docid": "9185085e512b318cff1abb47713c2930", "score": "0.6353444", "text": "function CreateMap() {\r\n map = new Microsoft.Maps.Map('#map-container', {\r\n credentials: bingMapsKey,\r\n center: new Microsoft.Maps.Location(47.61023, -122.252658),\r\n showDashboard: false,\r\n zoom: 12\r\n });\r\n\r\n Resize();\r\n\r\n CreateInfoBox();\r\n}", "title": "" }, { "docid": "2859b45c23ad6cbd813e14f09d770208", "score": "0.6341131", "text": "function newMap() {\n return mapSupported ? new window['Map']() : new map_or_similar__WEBPACK_IMPORTED_MODULE_1___default.a();\n}", "title": "" }, { "docid": "515dc8a99c8fc06bf69bf5157bb604b0", "score": "0.6339929", "text": "function createMap() {\n // This will let you use the .remove() function later on\n\tif (!('remove' in Element.prototype)) {\n\t\tElement.prototype.remove = function() {\n\t\t\tif (this.parentNode) {\n\t\t\t\tthis.parentNode.removeChild(this);\n\t\t\t}\n\t\t};\n\t}\n\n\t const torontoLon = -79.376195;\n\t const torontoLat = 43.6727089;\n map = new mapboxgl.Map({\n\t\tcontainer: 'map',\n\t\tstyle: 'mapbox://styles/mapbox/streets-v11',\n\t\tcenter: [torontoLon, torontoLat],\n\t\tzoom: 13\n\t});\n}", "title": "" }, { "docid": "2378f0dd8896044c7b7625bbbeb688b6", "score": "0.6337298", "text": "function create_map(){\n\tif(random_maps){\n\t\tif (initialized){\n\t\t\tdestroy_villages();\n\t\t\tdestroy_aqueduct();\n\t\t\t//TODO: get rid of those messages...here might be a good place\n\t\t}\n\t\tcursor_aqueduct = new Aqueduct (0, 0, \"right\");\n\t cursor_aqueduct.visible = false;\n\t\t\n\t water_source = new Grid_Object (0, 4, 0, \"source.png\", 2, 4);\n\t goal_city = new Grid_Object (22, 5, 0, \"goal_city.png\", 2, 2);\n\t for (var i = 0; i < 6; i++) {\n\t \tVillage.create ();\n\t }\n\t}\n\t\n}", "title": "" }, { "docid": "597bdb50f18082f1bb7efd60a365b5fe", "score": "0.63336444", "text": "function createMap() {\n const map = new google.maps.Map(\n document.getElementById('map'),\n {center: {lat: 37.422, lng: -122.084}, zoom: 16});\n}", "title": "" }, { "docid": "476ce89a1ae706064fb1a112e8d5d403", "score": "0.6325698", "text": "function getOrCreateMap(ordinalMeta){\nreturn ordinalMeta._map||(ordinalMeta._map=createHashMap(ordinalMeta.categories));\n}", "title": "" }, { "docid": "ec78bc3c7afa016abc335a55242a8e13", "score": "0.63136715", "text": "function CreateMap() {\n\t\tvar map_style = [ {\n\t\t\telementType : \"labels\",\n\t\t\tstylers : [ {\n\t\t\t\tvisibility : \"off\"\n\t\t\t} ]\n\t\t}, {\n\t\t\tstylers : [ {\n\t\t\t\tsaturation : -69\n\t\t\t} ]\n\t\t} ];\n\t\tvar map_canvas = document.getElementById(\"map_canvas\");\n\t\tvar myOptions = {\n\t\t\tcenter : new google.maps.LatLng(38.1858635, -85.676193),\n\t\t\tzoom : 12,\n\t\t\tstyles : map_style,\n\t\t\tmapTypeId : google.maps.MapTypeId.ROADMAP\n\t\t};\n\t\t infowindow = new google.maps.InfoWindow({\n content: 'holding...'\n });\n \n\t\treturn new google.maps.Map(map_canvas, myOptions);\n\t\t\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "bc7518a9789b2881dc2934268c9821d0", "score": "0.6304117", "text": "function MapCache() {\n\t this.__data__ = {};\n\t }", "title": "" }, { "docid": "bc7518a9789b2881dc2934268c9821d0", "score": "0.6304117", "text": "function MapCache() {\n\t this.__data__ = {};\n\t }", "title": "" }, { "docid": "bc7518a9789b2881dc2934268c9821d0", "score": "0.6304117", "text": "function MapCache() {\n\t this.__data__ = {};\n\t }", "title": "" }, { "docid": "bc7518a9789b2881dc2934268c9821d0", "score": "0.6304117", "text": "function MapCache() {\n\t this.__data__ = {};\n\t }", "title": "" }, { "docid": "bc7518a9789b2881dc2934268c9821d0", "score": "0.6304117", "text": "function MapCache() {\n\t this.__data__ = {};\n\t }", "title": "" }, { "docid": "bc7518a9789b2881dc2934268c9821d0", "score": "0.6304117", "text": "function MapCache() {\n\t this.__data__ = {};\n\t }", "title": "" }, { "docid": "bc7518a9789b2881dc2934268c9821d0", "score": "0.6304117", "text": "function MapCache() {\n\t this.__data__ = {};\n\t }", "title": "" }, { "docid": "bc7518a9789b2881dc2934268c9821d0", "score": "0.6304117", "text": "function MapCache() {\n\t this.__data__ = {};\n\t }", "title": "" }, { "docid": "bc7518a9789b2881dc2934268c9821d0", "score": "0.6304117", "text": "function MapCache() {\n\t this.__data__ = {};\n\t }", "title": "" }, { "docid": "bc7518a9789b2881dc2934268c9821d0", "score": "0.6304117", "text": "function MapCache() {\n\t this.__data__ = {};\n\t }", "title": "" }, { "docid": "bc7518a9789b2881dc2934268c9821d0", "score": "0.6304117", "text": "function MapCache() {\n\t this.__data__ = {};\n\t }", "title": "" }, { "docid": "bc7518a9789b2881dc2934268c9821d0", "score": "0.6304117", "text": "function MapCache() {\n\t this.__data__ = {};\n\t }", "title": "" }, { "docid": "bc7518a9789b2881dc2934268c9821d0", "score": "0.6304117", "text": "function MapCache() {\n\t this.__data__ = {};\n\t }", "title": "" }, { "docid": "bc7518a9789b2881dc2934268c9821d0", "score": "0.6304117", "text": "function MapCache() {\n\t this.__data__ = {};\n\t }", "title": "" }, { "docid": "0398ee1f32fd909919e9495f0e3c1cb9", "score": "0.6283797", "text": "function MapCache() {\n this.__data__ = {};\n }", "title": "" }, { "docid": "0398ee1f32fd909919e9495f0e3c1cb9", "score": "0.6283797", "text": "function MapCache() {\n this.__data__ = {};\n }", "title": "" }, { "docid": "0398ee1f32fd909919e9495f0e3c1cb9", "score": "0.6283797", "text": "function MapCache() {\n this.__data__ = {};\n }", "title": "" }, { "docid": "0398ee1f32fd909919e9495f0e3c1cb9", "score": "0.6283797", "text": "function MapCache() {\n this.__data__ = {};\n }", "title": "" }, { "docid": "0398ee1f32fd909919e9495f0e3c1cb9", "score": "0.6283797", "text": "function MapCache() {\n this.__data__ = {};\n }", "title": "" }, { "docid": "0398ee1f32fd909919e9495f0e3c1cb9", "score": "0.6283797", "text": "function MapCache() {\n this.__data__ = {};\n }", "title": "" }, { "docid": "0398ee1f32fd909919e9495f0e3c1cb9", "score": "0.6283797", "text": "function MapCache() {\n this.__data__ = {};\n }", "title": "" }, { "docid": "0398ee1f32fd909919e9495f0e3c1cb9", "score": "0.6283797", "text": "function MapCache() {\n this.__data__ = {};\n }", "title": "" }, { "docid": "0398ee1f32fd909919e9495f0e3c1cb9", "score": "0.6283797", "text": "function MapCache() {\n this.__data__ = {};\n }", "title": "" }, { "docid": "0398ee1f32fd909919e9495f0e3c1cb9", "score": "0.6283797", "text": "function MapCache() {\n this.__data__ = {};\n }", "title": "" }, { "docid": "0398ee1f32fd909919e9495f0e3c1cb9", "score": "0.6283797", "text": "function MapCache() {\n this.__data__ = {};\n }", "title": "" }, { "docid": "0398ee1f32fd909919e9495f0e3c1cb9", "score": "0.6283797", "text": "function MapCache() {\n this.__data__ = {};\n }", "title": "" }, { "docid": "0398ee1f32fd909919e9495f0e3c1cb9", "score": "0.6283797", "text": "function MapCache() {\n this.__data__ = {};\n }", "title": "" }, { "docid": "0398ee1f32fd909919e9495f0e3c1cb9", "score": "0.6283797", "text": "function MapCache() {\n this.__data__ = {};\n }", "title": "" }, { "docid": "0398ee1f32fd909919e9495f0e3c1cb9", "score": "0.6283797", "text": "function MapCache() {\n this.__data__ = {};\n }", "title": "" }, { "docid": "0398ee1f32fd909919e9495f0e3c1cb9", "score": "0.6283797", "text": "function MapCache() {\n this.__data__ = {};\n }", "title": "" }, { "docid": "0398ee1f32fd909919e9495f0e3c1cb9", "score": "0.6283797", "text": "function MapCache() {\n this.__data__ = {};\n }", "title": "" }, { "docid": "0398ee1f32fd909919e9495f0e3c1cb9", "score": "0.6283797", "text": "function MapCache() {\n this.__data__ = {};\n }", "title": "" }, { "docid": "0398ee1f32fd909919e9495f0e3c1cb9", "score": "0.6283797", "text": "function MapCache() {\n this.__data__ = {};\n }", "title": "" }, { "docid": "0398ee1f32fd909919e9495f0e3c1cb9", "score": "0.6283797", "text": "function MapCache() {\n this.__data__ = {};\n }", "title": "" }, { "docid": "0398ee1f32fd909919e9495f0e3c1cb9", "score": "0.6283797", "text": "function MapCache() {\n this.__data__ = {};\n }", "title": "" }, { "docid": "0398ee1f32fd909919e9495f0e3c1cb9", "score": "0.6283797", "text": "function MapCache() {\n this.__data__ = {};\n }", "title": "" }, { "docid": "0398ee1f32fd909919e9495f0e3c1cb9", "score": "0.6283797", "text": "function MapCache() {\n this.__data__ = {};\n }", "title": "" }, { "docid": "0398ee1f32fd909919e9495f0e3c1cb9", "score": "0.6283797", "text": "function MapCache() {\n this.__data__ = {};\n }", "title": "" }, { "docid": "0398ee1f32fd909919e9495f0e3c1cb9", "score": "0.6283797", "text": "function MapCache() {\n this.__data__ = {};\n }", "title": "" }, { "docid": "0398ee1f32fd909919e9495f0e3c1cb9", "score": "0.6283797", "text": "function MapCache() {\n this.__data__ = {};\n }", "title": "" }, { "docid": "0398ee1f32fd909919e9495f0e3c1cb9", "score": "0.6283797", "text": "function MapCache() {\n this.__data__ = {};\n }", "title": "" }, { "docid": "0398ee1f32fd909919e9495f0e3c1cb9", "score": "0.6283797", "text": "function MapCache() {\n this.__data__ = {};\n }", "title": "" }, { "docid": "0398ee1f32fd909919e9495f0e3c1cb9", "score": "0.6283797", "text": "function MapCache() {\n this.__data__ = {};\n }", "title": "" }, { "docid": "0398ee1f32fd909919e9495f0e3c1cb9", "score": "0.6283797", "text": "function MapCache() {\n this.__data__ = {};\n }", "title": "" }, { "docid": "0398ee1f32fd909919e9495f0e3c1cb9", "score": "0.6283797", "text": "function MapCache() {\n this.__data__ = {};\n }", "title": "" }, { "docid": "0398ee1f32fd909919e9495f0e3c1cb9", "score": "0.6283797", "text": "function MapCache() {\n this.__data__ = {};\n }", "title": "" }, { "docid": "0398ee1f32fd909919e9495f0e3c1cb9", "score": "0.6283797", "text": "function MapCache() {\n this.__data__ = {};\n }", "title": "" }, { "docid": "0398ee1f32fd909919e9495f0e3c1cb9", "score": "0.6283797", "text": "function MapCache() {\n this.__data__ = {};\n }", "title": "" }, { "docid": "0398ee1f32fd909919e9495f0e3c1cb9", "score": "0.6283797", "text": "function MapCache() {\n this.__data__ = {};\n }", "title": "" }, { "docid": "0398ee1f32fd909919e9495f0e3c1cb9", "score": "0.6283797", "text": "function MapCache() {\n this.__data__ = {};\n }", "title": "" }, { "docid": "0398ee1f32fd909919e9495f0e3c1cb9", "score": "0.6283797", "text": "function MapCache() {\n this.__data__ = {};\n }", "title": "" }, { "docid": "0398ee1f32fd909919e9495f0e3c1cb9", "score": "0.6283797", "text": "function MapCache() {\n this.__data__ = {};\n }", "title": "" }, { "docid": "0398ee1f32fd909919e9495f0e3c1cb9", "score": "0.6283797", "text": "function MapCache() {\n this.__data__ = {};\n }", "title": "" }, { "docid": "72315b33eec611340cc5ddf1725a8ad8", "score": "0.62760186", "text": "function Map(name, xoff, yoff, w, h){\n\tthis.name = name;\n\t//XXX: these aren't used. they should be, assuming we even need them.\n\tthis.xoff = xoff;\n\tthis.yoff = yoff;\n\tthis.width = w;\n\tthis.height = h;\n}", "title": "" }, { "docid": "21d29deff675eb236fb179421eb51837", "score": "0.627491", "text": "function MapCache() {\n\t this.__data__ = {};\n\t}", "title": "" }, { "docid": "21d29deff675eb236fb179421eb51837", "score": "0.627491", "text": "function MapCache() {\n\t this.__data__ = {};\n\t}", "title": "" }, { "docid": "21d29deff675eb236fb179421eb51837", "score": "0.627491", "text": "function MapCache() {\n\t this.__data__ = {};\n\t}", "title": "" }, { "docid": "cafb50a65ed1b01fe53c1c6b1df0b009", "score": "0.62648934", "text": "function A(){return new window.Map}", "title": "" } ]
c1db7d5695c787acc2984e72f2e275e1
Menu Administrativo Cadastro de Pesquisa
[ { "docid": "cee09b4fc9d231fa522c8c7aa500892e", "score": "0.5835473", "text": "function goCadastrarPesquisa(pesquisa, readonly) {\n if (pesquisa) {\n var query = new Parse.Query(Parse.Object.extend(\"Opcao\"));\n query.equalTo(\"parent\", pesquisa);\n query.ascending(\"numero\");\n query.find({\n success : function (opc) {\n __opcoes = opc;\n goTo(\"pages/cadpesquisa.html\", function() {\n document.getElementById(\"ipergunta\").value = pesquisa.get(\"pergunta\");\n document.getElementById(\"ititulo\").value = pesquisa.get(\"titulo\");\n document.getElementById(\"objectId\").value = pesquisa.id;\n listarOpcoes(); \n\n if (readonly) {\n $(\".btn\").addClass(\"disabled\");\n $(\".btn-danger\").removeClass(\"disabled\");\n $(\"input.form-control\").attr(\"disabled\", \"disabled\");\n }\n }); \n }\n });\n } else {\n __opcoes = new Array();\n goTo(\"pages/cadpesquisa.html\");\n }\n }", "title": "" } ]
[ { "docid": "95c3ffb178ec3b98e68c8a5bf202fe29", "score": "0.67489237", "text": "function activarMenu() {\n CancelHideBAMenuTime();\n if (soporta.DHTML && menuActivo != this) {\n if (menuActivo) menuActivo.ocultar();\n menuActivo = this;\n this.mostrar();\n } \n}", "title": "" }, { "docid": "9f40632f7576523c6f0d9c30d4dbf206", "score": "0.67269075", "text": "function menu_admin_abas($acao, e){\n\t\t\tif($acao=='novo'){\n\t\t\t\t$n=0;\n\t\t\t\t$(e).parent().parent().parent().find('> li').each(function(e) {\n\t\t\t\t\tif($n <= parseInt($(this).attr('dir')))\n\t\t\t\t\t\t$n = parseInt($(this).attr('dir'));\n\t\t\t\t});\n\t\t\t\t$n++;\n\t\t\t\t$html = $('.abas_novo').html();\n\t\t\t\t$html = $html.replaceAll(\"-key-\", $n);\n\t\t\t\t$(e).parent().parent().parent().append($html);\n\t\t\t\t$html = $('.colunas_campos_novo').html();\n\t\t\t\t$html = $html.replaceAll(\"-key-\", $n);\n\t\t\t\t$(e).parent().parent().parent().parent().find('.box.campos_menu_admin').append($html);\n\t\t\t} else if($acao=='check' || $acao=='disable'){\n\t\t\t\t$(e).find('i').toggle();\n\t\t\t\t$status = $(e).find('i.ativo').css('display');\n\t\t\t\t$status = $status=='none' ? 0 : 1;\n\t\t\t\t$(e).parent().find('.menu_admin_abas_nome .'+$acao).val($status);\n\t\t\t} else if($acao=='edit'){\n\t\t\t\tif($(e).parent().find('.menu_admin_abas_nome').is(\":visible\")){\n\t\t\t\t\t$(e).parent().find('.menu_admin_abas_nome').stop(true, true).fadeOut();\n\t\t\t\t} else {\n\t\t\t\t\t$(e).parent().find('.menu_admin_abas_nome').stop(true, true).fadeIn();\n\t\t\t\t}\n\t\t\t} else if($acao=='delete'){\n\t\t\t\t$(e).parent().parent().remove();\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "851b9615556f385c31afcfb17dd4a455", "score": "0.6514891", "text": "function mostrarMenu() {\n\tif (soporta.DOM)\n\t\tthis.domRef.style.display = \"block\";\n\t\n\tif (!eval(this.capaRefStr)) return;\n\tthis.cambiarPosicion();\n\t//Para la opacidad\n\tinitFade(this.capaID); \n}", "title": "" }, { "docid": "9f121e1b972047265f4cd77daf13d4cf", "score": "0.641696", "text": "function guardar_menu( url, objeto ) {\n \n enviarDatos(url,objeto);\n console.log(\"envio de menu y criterios listo...\");\n}//fin 18", "title": "" }, { "docid": "9f5d61cc4689b6a75df63bedf7d2d29a", "score": "0.63052845", "text": "function accionProductosCalificar(){\n set('formulario.conectorAction', 'LPMantenerProductos');\n set('formulario.valorMenu', \"no\");\n set('formulario.accion','cargarProductosGrupo1');\n\n var parametros = new Object(); \n parametros.opcionMenu = get('formulario.opcionMenu');\n parametros.valorMenu =\"no\";\n parametros.ocultarPestanyas = 'S';\n mostrarModalSICC(\"LPMantenerProductos\", \"cargarProductosGrupo1\", parametros);\n}", "title": "" }, { "docid": "2f17db7fa16fa08bcbe86d153c4288ee", "score": "0.61756647", "text": "function menu_asigna_activo(){\n write_console($('#console_asigna_activo'),$('#btn_asigna_activo'));// <--- Apunta la consola a escribir\n $(\"#modal_asigna_activo\").modal(\"show\");\n }", "title": "" }, { "docid": "a62bd74472a5307525581b4bfa7bce79", "score": "0.6163847", "text": "function obtenerMenu(ROLE) {\n var menu = [{\n titulo: 'Principal',\n icono: 'mdi mdi-gauge',\n submenu: [\n { titulo: 'Dashboard', url: '/dashboard' },\n //{ titulo: 'ProgressBar', url: '/progress' },\n //{ titulo: 'Grafica', url: '/grafica1' }\n ]\n },\n {\n titulo: 'Mantenimiento',\n icono: 'mdi mdi-folder-lock-open',\n submenu: [\n // { titulo: 'Usuarios', url: '/usuarios' }\n //{ titulo: 'Prueba ', url: '/otro' }\n ]\n }\n ];\n\n if (ROLE === 'ADMIN_ROLE') {\n menu[0].submenu.unshift({ titulo: 'Agregar Aplicacion', url: '/aplicacion/:id' });\n menu[1].submenu.unshift({ titulo: 'Usuarios', url: '/usuarios' });\n menu[1].submenu.unshift({ titulo: 'Aplicaciones', url: '/aplicaciones' });\n\n }\n\n return menu;\n}", "title": "" }, { "docid": "d3feed8c71b2b8f01d3f2263cfb62384", "score": "0.61558783", "text": "function managerMenu() {\n connection.query(\"SELECT * FROM products\", function(err, res) {\n if (err) throw err;\n managerOptions(res);\n });\n}", "title": "" }, { "docid": "d5b0c1ec190f75d3f7e611753f7ec5f7", "score": "0.6153906", "text": "function menu_traza_activo(){\n write_console($('#console_traza_activo'),$('#btn_traza_activo'));// <--- Apunta la consola a escribir\n $(\"#modal_traza_activo\").modal(\"show\");\n }", "title": "" }, { "docid": "bb65757d8416baa55b3d87fa5f25b88e", "score": "0.6111319", "text": "function retourneMenu() \n{\t\t\n\t\t\tTime.timeScale = 1;\n\t\t\tpanneauEscape.SetActive(false);\n \t\tpeutTirer=true;//désactive le tir du héro \n \t\tApplication.LoadLevel (1);\n}", "title": "" }, { "docid": "b450a11ba792845921fe07c6b7eb3748", "score": "0.6103536", "text": "function menu_baja_activo(){\n write_console($('#console_baja_activo'),$('#btn_baja_activo'));// <--- Apunta la consola a escribir\n $(\"#modal_baja_activo\").modal(\"show\");\n }", "title": "" }, { "docid": "996c803b9471aa0f011b3e221eab152f", "score": "0.60983336", "text": "function menu(opcion){\n\n\t// Si pulsamos en el boton de \"menu\" entramos en el if\n\tif(opcion==\"menu\"){\n\t\tif(estado==\"cuerpo\"){\n\t\t\tcuerpo.removeClass('center').addClass('right');\n\t\t\testado=\"menuprincipal\";\n\t\t\t$('#menuIcon').attr(\"class\", \"glyphicon glyphicon-remove-circle\");\n\n\t\t}else if(estado==\"menuprincipal\"){\n\t\t\tcuerpo.removeClass('right').addClass('center');\n\t\t\testado=\"cuerpo\";\n\t\t\t$('#menuIcon').attr(\"class\", \"glyphicon glyphicon-map-marker\");\n\t\t}\n\n\t// Si pulsamos un boton del menu principal entramos en el else\n\t}else{\n\t\t// Establecer posicion en el mapa del marcador\n\t\tvar arrayLatLng = opcion.split(\", \");\n\t\tvar positionOpcion = new google.maps.LatLng(arrayLatLng[0], arrayLatLng[1]);\n\t\tmap.setCenter(positionOpcion);\n\t\tmap.setZoom(18);\n\n\t\t// Añadimos las clases necesarias para que la capa cuerpo se mueva al centro de nuestra app y muestre el contenido\n\t\tcuerpo.removeClass('right').addClass('center');\n\t\testado=\"cuerpo\";\n\n\t\t$('#menuIcon').attr(\"class\", \"glyphicon glyphicon-map-marker\");\n\n\t}\n\n}", "title": "" }, { "docid": "9116ee97d7c1490a44fa705862c0255e", "score": "0.6070411", "text": "function mudarCorBtnMenu(cabecalhoBranco){\n if(cabecalhoBranco){\n btnMenu.classList.add('btn-menu-escuro')\n }else{\n btnMenu.classList.remove('btn-menu-escuro')\n }\n }", "title": "" }, { "docid": "c4047a0a209e41a8af4c4f265c2c3e15", "score": "0.60544527", "text": "function desplegarMenu() {\n\t\tvar boton = $(\".formaBoton\");\n\t\tvar cuadroMenu = $(\".platosCarta\");\n\t\t\n\t\tboton.click(function() {\n\t\t\tboton.each(function(index, obj) {\n\t\t\t\tif($(obj).hasClass(\"active\") == true) {\n\t\t\t\t\t$(obj).removeClass(\"active\");\n\t\t\t\t}\n\t\t\t});\n\t\t\t$(this).addClass(\"active\");\n\n\t\t\t/* cuadroMenu | 0-2 Ceviches | 3-5 Mariscos | 6-8 Criollos | 9-11 Sopas | 12-14 Piqueos | 15-17 Postres */\n\t\t\tcuadroMenu.hide();\n\t\t\tvar indiceBotonActual = boton.index($(this));\n\t\t\tcuadroMenu.each(function(index, obj) {\n\t\t\t\tif(boton.eq(indiceBotonActual).html() == \"Todos\") {\n\t\t\t\t\t$(obj).fadeIn(1500);\n\t\t\t\t}\n\t\t\t\telse if(boton.eq(indiceBotonActual).html() == \"Ceviches\") {\n\t\t\t\t\tif(index>=0 && index<=2) {\n\t\t\t\t\t\t$(obj).fadeIn(1500);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(boton.eq(indiceBotonActual).html() == \"Mariscos\") {\n\t\t\t\t\tif(index>=3 && index<=5) {\n\t\t\t\t\t\t$(obj).fadeIn(1500);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(boton.eq(indiceBotonActual).html() == \"Criollos\") {\n\t\t\t\t\tif(index>=6 && index<=8) {\n\t\t\t\t\t\t$(obj).fadeIn(1500);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(boton.eq(indiceBotonActual).html() == \"Sopas\") {\n\t\t\t\t\tif(index>=9 && index<=11) {\n\t\t\t\t\t\t$(obj).fadeIn(1500);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(boton.eq(indiceBotonActual).html() == \"Piqueos\") {\n\t\t\t\t\tif(index>=12 && index<=14) {\n\t\t\t\t\t\t$(obj).fadeIn(1500);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(boton.eq(indiceBotonActual).html() == \"Postres\") {\n\t\t\t\t\tif(index>=15 && index<=17) {\n\t\t\t\t\t\t$(obj).fadeIn(1500);\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t});\n\t\t});\n\t}", "title": "" }, { "docid": "f322901a1014225b47291eef6f6c3864", "score": "0.6050328", "text": "function customMenu(node) {\n var items = {\n createItem: { // The \"create\" menu item\n label: \"Crear\",\n action: function (data) {\n var inst = jQuery.jstree.reference(data.reference), //instancia o referencia\n ref = jQuery('#tree').jstree(true), //instancia o referencia\n referencia = data.reference,\n posicion = data.position,\n elemento = data.element, \n item = data.item,\n obj = inst.get_node(data.reference), //objeto(nodo) que estoy manipulando\n sel = inst.get_selected();\n //crear: solo el dueno o el super_administrador aunque no sea el dueno \n if ( ($('#proyecto').val() !=\"\") || ($('#proyecto').val().length > 0) )\n if ( ($(\"#dueno\").val() ==1) || ($(\"#perfil_activo\").val() ==1) ) {\n if ( parseInt($(\"#crea_multiple_simple\").val())==0) { //entornos es simple\n if (obj.children.length==0) { //pueda crear nodo solo si no tiene hijos\n inst.create_node(sel, {\"text\": \"osmel\", \"data\" : { } }, \"last\", //\"file\" : false\n function (new_node) {\n new_node.icon = \"fa fa-coffee\";\n new_node.text = \"nuevo Nombre\";\n inst.edit(new_node);\n }\n );\n }\n } else { //proyectos pueden tener multiples hijos\n inst.create_node(sel, {\"text\": \"osmel\", \"data\" : { } }, \"last\", //\"file\" : false\n function (new_node) {\n new_node.icon = \"fa fa-coffee\";\n new_node.text = \"nuevo Nombre\";\n inst.edit(new_node);\n }\n );\n } \n }\n if(sel) {\n // inst.edit(sel);\n }\n }\n },\n renameItem: { \n label: \"Renombrar\",\n action: function (data) {\n var inst = jQuery.jstree.reference(data.reference),\n obj = inst.get_node(data.reference);\n //renombrar: solo el dueno o el super_administrador aunque no sea el dueno \n if ( ($(\"#dueno\").val() ==1) || ($(\"#perfil_activo\").val() ==1) ) { \n inst.edit(obj);\n } \n }\n },\n deleteItem: { \n label: \"Eliminar\",\n action: function (data) {\n var inst = jQuery.jstree.reference(data.reference),\n obj = inst.get_node(data.reference);\n //eliminar: solo el dueno o el super_administrador aunque no sea el dueno \n /* Aqui activo eliminar\n if ( ($(\"#dueno\").val() ==1) || ($(\"#perfil_activo\").val() ==1) ) {\n if (obj.id!=1) { //sino es la raiz puede eliminarlo\n if(inst.is_selected(obj)) {\n inst.delete_node(inst.get_selected());\n }\n else {\n inst.delete_node(obj);\n }\n }\n } */\n }\n }\n };\n /*if (node.data.file) {\n delete items.createItem;\n }\n else{\n delete items.deleteItem;\n delete items.renameItem;\n }*/\n return items;\n }", "title": "" }, { "docid": "03be3b12b28c44bc586a57389d7811af", "score": "0.60469764", "text": "function showMeTheMenu(idMenu) {\n\n //Si idMenu = 0 => Creation d'un nouveau menu\n if (idMenu === 0) {\n //modifictaion du titre du modal\n $(\"#titredelAction\").text(\"Ajouter un menu\");\n\n //RAZ des inputs\n $(\"#titreMenu\").val(\"\");\n $(\"#titreEntree\").val(\"\");\n $(\"#prixEntree\").val(0);\n $(\"#titrePlat\").val(\"\");\n $(\"#prixPlat\").val(0);\n $(\"#titreDessert\").val(\"\");\n $(\"#prixDessert\").val(0);\n\n //Modif de l'action et du titre du bouton\n $(\"#saveButtModal\").text(\"Ajouter\");\n $(\"#saveButtModal\").attr(\"onclick\", \"sauveMoiCeMenu(0);\")\n\n } else { //Recup des infos du menu et affichage dans les imputs\n\n $(\"#titredelAction\").text(\"Modifier un menu\");\n\n var menuSelected;\n\n $.ajax({\n type: \"GET\",\n url: \"https://whispering-anchorage-52809.herokuapp.com/menus/\" + idMenu + \"/get\",\n async: false,\n success: function (data) {\n menuSelected = data;\n },\n error: function () {\n alert(\"Erreur dans la récupération du menu\");\n }\n });\n\n $(\"#titreMenu\").val(menuSelected.nom);\n $(\"#titreEntree\").val(menuSelected.entree.nom);\n $(\"#prixEntree\").val(menuSelected.entree.prix);\n $(\"#titrePlat\").val(menuSelected.plat.nom);\n $(\"#prixPlat\").val(menuSelected.plat.prix);\n $(\"#titreDessert\").val(menuSelected.dessert.nom);\n $(\"#prixDessert\").val(menuSelected.dessert.prix);\n\n //Modif de l'action et du titre du bouton\n $(\"#saveButtModal\").text(\"Modifier\");\n $(\"#saveButtModal\").attr(\"onclick\", \"sauveMoiCeMenu(\" + idMenu + \");\")\n }\n}", "title": "" }, { "docid": "5d8d3bab4549316df8e1909e62686d99", "score": "0.603025", "text": "function mostrarOrdemCrescente() {\n\n}", "title": "" }, { "docid": "e176c712bd8dad788db6dffac89ff456", "score": "0.60181475", "text": "function menu_mover_activo(){\n resetSelect_mover();\n write_console($('#console_log_area_mover'),$('#btn_mover_grupo'));// <--- Apunta la consola a escribir\n $(\"#modal_mover_activo\").modal(\"show\");\n }", "title": "" }, { "docid": "497e189db8dd23e877a908ec1c182c9f", "score": "0.60027194", "text": "function apriModaleAttoAmministrativo() {\n var tree = $.fn.zTree.getZTreeObj(\"treeStruttAmm_modale\");\n\n $(\"#annoProvvedimento_modale\").val($(\"#annoAttoAmministrativo\").val());\n $(\"#numeroProvvedimento_modale\").val($(\"#numeroAttoAmministrativo\").val());\n $(\"#tipoAttoProvvedimento_modale\").val($(\"#tipoAtto\").val());\n\n ZTreePreDocumento.selezionaNodoSeApplicabile(tree.innerZTree, $(\"#HIDDEN_StrutturaAmministrativoContabileAttoAmministrativoUid\").val());\n\n $(\"#modaleGuidaProvvedimento\").modal(\"show\");\n }", "title": "" }, { "docid": "d59e0cf2d9fa00a042290a2c98898ec0", "score": "0.6002358", "text": "function desplegarMenu() {\n //mostrar menu desplegable\n const enlaces = document.querySelector(\".enlaces\");\n const formulario = document.querySelector(\".div-buscador\");\n\n if (document.querySelector(\".inactivo\")) {\n enlaces.style.display = \"flex\";\n if (formulario) {\n formulario.style.display = \"flex\";\n }\n iconoMenu.classList.remove(\"inactivo\");\n } else {\n enlaces.style.display = \"none\";\n // enlaces.style.visibility = \"hidden\";\n // enlaces.style.opacity = \"0\";\n if (formulario) {\n formulario.style.display = \"none\";\n }\n iconoMenu.classList.add(\"inactivo\");\n }\n}", "title": "" }, { "docid": "2a2c6e120802a8cec4a3cf16ca1c1c54", "score": "0.5998619", "text": "function ShowMenu(ctx) {\n //ctx.deleteMessage();\n ctx.replyWithPhoto({ source: \"./public/chelp.jpg\" }).then(() => {\n let menuMSG =\n \"<strong>RegVisor</strong> (<i>Sistema de asistencia a la administración de redes y seguridad informática.</i>)\\n\";\n menuMSG +=\n \"A continuación selecciona el tópico sobre el cual deseas recibir ayuda\";\n ShowTopicsMenu(ctx, menuMSG);\n });\n}", "title": "" }, { "docid": "514e0eb51d94931d6b7fc366c35238eb", "score": "0.5998567", "text": "function actualizarMenu(menuSeleccionado){\n\t\t// Inicialmente se desactivan todos los elementos -y subelementos asociados- del menu \t\n\t\t\t// Subelementos del menu principal\n\t\t$(\"#menuMenu\").removeClass('btnMenu_activo');\n\t $(\"#puntoMenu\").removeClass('Activo');\n\t $(\"#menuMenu\").next().removeClass('textoActivo');\n\t\t // Subelementos del menu para exportar el DI\n\t $(\"#menuExportar\").removeClass('btnExportar_activo');\n\t $(\"#puntoExportar\").removeClass('Activo');\n\t $(\"#menuExportar\").next().removeClass('textoActivo');\n\t\t // Subelementos del menu para acceder al programa de curso asociado al curso\n\t $(\"#menuPrograma\").removeClass('btnPrograma_activo');\n\t $(\"#puntoPrograma\").removeClass('Activo');\n\t $(\"#menuPrograma\").next().removeClass('textoActivo');\n\t\t // Subelementos del menu para acceder al contexto del DI\n\t $(\"#menuContexto\").removeClass('btnContexto_activo');\n\t $(\"#puntoContexto\").removeClass('Activo');\n\t $(\"#menuContexto\").next().removeClass('textoActivo');\n\t // Subelementos del menu para acceder a la matriz del DI\n\t $(\"#menuMatriz\").removeClass('btnMatriz_activo');\n\t $(\"#puntoMatriz\").removeClass('Activo');\n\t $(\"#menuMatriz\").next().removeClass('textoActivo');\n\t // Subelementos del menu para acceder a las ayudas del contexto\n\t $(\"#menuAyuda\").removeClass('btnAyuda_activo');\n\t $(\"#puntoAyuda\").removeClass('Activo');\n\t $(\"#menuAyuda\").next().removeClass('textoActivo');\n\t \n\t // Se activa el elemento (sus subelementos) pasado como parametro\n\t switch(menuSeleccionado) {\n\t \tcase 0:\n\t \t\t$(\"#menuMenu\").addClass('btnMenu_activo');\n\t \t\t$(\"#menuMenu\").next().addClass('textoActivo');\n\t \t\t$(\"#puntoMenu\").addClass('Activo');\n\t \t\tbreak;\n\t \tcase 1:\n\t \t\t$(\"#menuExportar\").addClass('btnExportar_activo');\n\t\t\t $(\"#menuExportar\").next().addClass('textoActivo');\n\t \t\t$(\"#puntoExportar\").addClass('Activo');\n\t \t\tbreak;\n\t \tcase 2:\n\t \t\t$(\"#menuPrograma\").addClass('btnPrograma_activo');\n\t\t\t $(\"#menuPrograma\").next().addClass('textoActivo');\n\t \t\t$(\"#puntoPrograma\").addClass('Activo');\n\t \t\tbreak;\n\t \tcase 3:\n\t \t\t$(\"#menuContexto\").addClass('btnContexto_activo');\n\t\t\t $(\"#menuContexto\").next().addClass('textoActivo');\n\t \t\t$(\"#puntoContexto\").addClass('Activo');\n\t \t\tbreak;\n\t \tcase 4:\n\t \t\t$(\"#menuMatriz\").addClass('btnMatriz_activo');\n\t\t\t $(\"#menuMatriz\").next().addClass('textoActivo');\n\t \t\t$(\"#puntoMatriz\").addClass('Activo');\n\t \t\tbreak;\n\t \tcase 5:\n\t \t\t$(\"#menuAyuda\").addClass('btnAyuda_activo');\n\t\t\t $(\"#menuAyuda\").next().addClass('textoActivo');\n\t \t\t$(\"#puntoAyuda\").addClass('Activo');\n\t \t\tbreak;\n\t }\n\t \t\n}", "title": "" }, { "docid": "6e43f4b1755ec81cd4d940fc464b4915", "score": "0.5990066", "text": "function foco(menuItem){ \n \n menuFoco.map((info, index) => ( //recebe um valor dos LIS do menu e adiciona a classe ATIVO no elemento com o ID igual ao elemento do array[MenuFoco] e remove os demais\n focar(info, index)\n ));\n\n function focar(info, index){\n \n if(menuItem == index){\n let x = document.querySelector(`#${info}`);\n x.classList.add('ativo');\n }else{\n let x = document.querySelector(`#${info}`);\n x.classList.remove('ativo');\n } \n }\n }", "title": "" }, { "docid": "ccc4eb8272974a4e9d6600e21aa922aa", "score": "0.5987812", "text": "function seleccionarMenu(){\r\n\t//elementos del menú principal (sin submenús)\r\n\telementosDelMenu = $(\"ul.sf-menu > li\");\r\n\t//url en la que está el navegador\r\n\turlActual = window.location.href;\r\n\r\n\t//recorremos los elementos principales del menú\r\n\tfor(var i = 0; i<elementosDelMenu.length; i++){\r\n\t\t//cada tag LI del menú, uno por cada vuelta del for\r\n\t\telementoMenu = $(elementosDelMenu[i]);\r\n\t\tif(elementoMenu!=undefined){\r\n\t\t\t//Tags A de cada elemento LI del menú\r\n\t\t\tenlacesElementoMenu = elementoMenu.find(\"A\");\r\n\t\t\t//Enlace visible del menú (al que se le aplicará el estilo si el o alguno de sus subMenús coincide en la búsqueda)\r\n\t\t\tenlaceTituloMenu\t= enlacesElementoMenu[0];\r\n\t\t\tfor(var j=0; j<enlacesElementoMenu.length; j++){\r\n\t\t\t\t//URL de cada tag A del LI actual\r\n\t\t\t\turlElementoMenu = enlacesElementoMenu[j].href;\r\n\t\t\t\tif(urlActual.indexOf(urlElementoMenu)>=0){\r\n\t\t\t\t\t//si la URL que estamos comprobando es en la que estamos, se le aplica \r\n\t\t\t\t\t//el class \"Selected\" al tag A titular del submenú que estamos comprobando\r\n\t\t\t\t\t$(enlaceTituloMenu).addClass(\"selected\");\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "d021abdceb39fbfcc77273e7ec41c9c6", "score": "0.5966238", "text": "function onOpen(e) {\r\n var spreadSheet = SpreadsheetApp.getActive();\r\n var menuItems = [{name: \"Executar\", functionName: \"run\"},\r\n {name: \"Zerar Registradores\", functionName: \"reset\"}];\r\n spreadSheet.addMenu(\"Programa\", menuItems);\r\n}", "title": "" }, { "docid": "106f937e90ac48c72e8fe71234a51c69", "score": "0.59586877", "text": "function preencherCategoria ( dados ) {\n $(\"#msg\").html(\"\");\n $.each( dados, function ( key, val ) {\n $(\".navbar-nav\").prepend(\"<li><a href='categorias.html?id=\"+val.id+\"'>\"+val.nome+\"</a></li>\");\n })\n }", "title": "" }, { "docid": "49e0d3edb8065ad35bb39686df565f79", "score": "0.5955195", "text": "function abril_modal_menus(idusuario_, usuario_, nombre_) {\n idusuario_UID = idusuario_;\n\n $(\"#txt_usuario_D\").val(usuario_);\n $(\"#txt_nombre_D\").val(nombre_);\n\n cargar_menus_usuario(); \n\n $(\"#modal_menu_usuario_UID\").modal(\"show\");\n}", "title": "" }, { "docid": "9aa654e79008b1ac07fdb71de7d9c36e", "score": "0.594874", "text": "function sommer(){\r\n\t\t\t$(\".contenu\").data({ \"partiel\" : true });\r\n\t\t\tsommaire = $(\"#sousMenu a\");\r\n\t\t\tsommaire.each(function(){\r\n\t\t\t\t$(this).data(\"cible\",racine + $(this).attr(\"href\").split(\"/\").pop());\r\n\t\t\t});\r\n\t\t\tsommaire.mener = function(){\r\n\t\t\t\t$(this).each(function(){\r\n\t\t\t\t\tif ($(this).data().cible == racine + $(\".contenu\").data().adresse) return $(this).removeAttr(\"href\").attr(\"title\",$(this).text());\r\n\t\t\t});\t}\r\n\t\t\tsommaire.demeurer = function(){\r\n\t\t\t\t$(this).each(function(){\r\n\t\t\t\t\t$(this).attr(\"href\",$(this).data(\"cible\")).removeAttr(\"title\");\r\n\t\t\t});\t}\r\n\t\t\tsommaire.mener();\r\n\t\t\tsommaire.click(function(ze){\r\n\t\t\t\tze.preventDefault();\r\n\t\t\t\tif (transition != false || transitionPartielle[1] != false) return; //occupation du menu principal bloque le menu pariel\r\n\t\t\t\tif ($(this).attr(\"href\")){\r\n\t\t\t\t\ttransition = true; //l'occupation du menu secondaire retarde l'activation du menu principal\r\n\t\t\t\t\ttransitionPartielle = [true,true];\r\n\t\t\t\t\tcible = ze.isTrigger ? ze.cible.split(\"/\").pop() : $(this).attr(\"href\").split(\"/\").pop();\r\n\t\t\t\t\tif (pages[\"partiel-\" + cible]) remplacer($(\"<div>\",{ \"html\" : pages[\"partiel-\" + cible] }),cible,ze.isTrigger);\r\n\t\t\t\t\telse appeler(rhizome + cible + \".php\",0,prendre,-2,false,function(){ document.location.href = racine + cible; },false,false,cible,ze.isTrigger);\r\n\t\t\t}\t});\r\n\t\t\t$(\"#inscription\").live(\"click\",function(ze){ //lien \"je m'inscris\" sur ateliers-indexcreatif et ateliers-indexgourmand\r\n\t\t\t\tze.preventDefault();\r\n\t\t\t\tif (transition != false || transitionPartielle[1] != false) return; //occupation du menu principal bloque le menu pariel\r\n\t\t\t\ttransition = true; //l'occupation du menu secondaire retarde l'activation du menu principal\r\n\t\t\t\ttransitionPartielle = [true,true];\r\n\t\t\t\tif (pages[\"partiel-ateliers-index\"]) remplacer($(\"<div>\",{ \"html\" : pages[\"partiel-ateliers-index\"] }),\"ateliers-index\",ze.isTrigger);\r\n\t\t\t\telse appeler(rhizome + \"ateliers-index.php\",0,prendre,-2,false,function(){ document.location.href = racine + \"ateliers-index\"; },false,false,\"ateliers-index\",ze.isTrigger);\r\n\t\t});\t}", "title": "" }, { "docid": "50f21203a35798a4669ee075ac18ae15", "score": "0.5944516", "text": "function accionRegistro(e) {\n var accion = e.srcElement.text;\n var elemento = e.srcElement.id;\n if (accion === \"Borrar\") {\n llave = elemento;\n $(\"#dialog-eliminar\").dialog(\"open\");\n }\n else if (accion == \"Editar\") {\n esGuardar = false;\n getObjeto(elemento);\n $(\"#formulario\").dialog(\"open\");\n }\n else if (accion == \"Ver\") {\n esGuardar = null;\n getObjeto(elemento);\n $(\"#formulario\").dialog(\"open\");\n }\n }", "title": "" }, { "docid": "f796bf9c3d314e11e43591352ea92153", "score": "0.59428823", "text": "function origemPedido(limpaCampo) {\r\n if ($(\"#st_estoque\").prop('checked')) {\r\n $(\"#no_pessoa\").val('Estoque Administrativo').attr('disabled', true);\r\n } else {\r\n $(\"#no_pessoa\").attr('disabled', false);\r\n if(limpaCampo)\r\n $(\"#no_pessoa\").val('');\r\n }\r\n }", "title": "" }, { "docid": "2f22b0b0cd51feeb872f1bc9020ee707", "score": "0.59407336", "text": "function clickencadaunodelosmenusinformacion() {\n //Menu Predio\n $('#linkpredio').click(function () {\n $('#MenuPredio').show();\n $('#MenuHistorialesPredio').hide();\n $('#MenuContribuyentePredio').hide();\n $('#MenuDireccionPredio').hide();\n $('#MenuFoxProAdeudos').hide();\n $('#MenuHistorialMysql').hide();\n $('#MenuCalculoRecargos').hide();\n $('#MenuCondonacionesAdeudo').hide();\n $('#MenuCondonacionesAvaluo').hide();\n $('#MenuDocumentosProcesos').hide();\n $('#MenuCancelacionPago').hide();\n $('#ManuAplicaciondeMultas').hide();\n $('#ManuCambioAdeudo').hide();\n\n $('#cuentadapredial').hide();\n $('#busquedapredio').hide();\n $('#cuentacatastral').hide();\n $('#infopredios').hide();\n });\n\n $('#linkhistorialpredio').click(function () {\n $('#MenuPredio').hide();\n $('#MenuHistorialesPredio').show();\n $('#MenuContribuyentePredio').hide();\n $('#MenuDireccionPredio').hide();\n $('#MenuFoxProAdeudos').hide();\n $('#MenuHistorialMysql').hide();\n $('#MenuCalculoRecargos').hide();\n $('#MenuCondonacionesAdeudo').hide();\n $('#MenuCondonacionesAvaluo').hide();\n $('#MenuDocumentosProcesos').hide();\n $('#MenuCancelacionPago').hide();\n $('#ManuAplicaciondeMultas').hide();\n $('#ManuCambioAdeudo').hide();\n\n $('#cuentadapredialhistoricos').hide();\n $('#cuentacatastralhistoricos').hide();\n $('#busquedaprediohistoricos').hide();\n });\n\n $('#linkcontribuyentepredio').click(function () {\n $('#MenuPredio').hide();\n $('#MenuHistorialesPredio').hide();\n $('#MenuContribuyentePredio').show();\n $('#MenuDireccionPredio').hide();\n $('#MenuFoxProAdeudos').hide();\n $('#MenuHistorialMysql').hide();\n $('#MenuCalculoRecargos').hide();\n $('#MenuCondonacionesAdeudo').hide();\n $('#MenuCondonacionesAvaluo').hide();\n $('#MenuDocumentosProcesos').hide();\n $('#MenuCancelacionPago').hide();\n $('#ManuAplicaciondeMultas').hide();\n $('#ManuCambioAdeudo').hide();\n\n $('#pfisica').hide();\n $('#pmoral').hide();\n $('#btnbuscaconpre').hide();\n $('input[name=accioncontribuyente]').prop('checked', false);\n });\n\n $('#linkdireccionpredio').click(function () {\n $('#MenuPredio').hide();\n $('#MenuHistorialesPredio').hide();\n $('#MenuContribuyentePredio').hide();\n $('#MenuDireccionPredio').show();\n $('#MenuFoxProAdeudos').hide();\n $('#MenuHistorialMysql').hide();\n $('#MenuCalculoRecargos').hide();\n $('#MenuCondonacionesAdeudo').hide();\n $('#MenuCondonacionesAvaluo').hide();\n $('#MenuDocumentosProcesos').hide();\n $('#MenuCancelacionPago').hide();\n $('#ManuAplicaciondeMultas').hide();\n $('#ManuCambioAdeudo').hide();\n });\n\n $('#linkfoxpropredio').click(function () {\n $('#MenuPredio').hide();\n $('#MenuHistorialesPredio').hide();\n $('#MenuContribuyentePredio').hide();\n $('#MenuDireccionPredio').hide();\n $('#MenuFoxProAdeudos').show();\n $('#MenuHistorialMysql').hide();\n $('#MenuCalculoRecargos').hide();\n $('#MenuCondonacionesAdeudo').hide();\n $('#MenuCondonacionesAvaluo').hide();\n $('#MenuDocumentosProcesos').hide();\n $('#MenuCancelacionPago').hide();\n $('#ManuAplicaciondeMultas').hide();\n $('#ManuCambioAdeudo').hide();\n\n $('#adeudosbusca').hide();\n $('#basegravable').hide();\n $('#buscarbasefoxpro').hide();\n $('#claprefoxpro').hide();\n $('#ctacatastralfoxpro').hide();\n $('#nombrefoxpro').hide();\n });\n\n $('#linkhistorialmysql').click(function () {\n $('#MenuPredio').hide();\n $('#MenuHistorialesPredio').hide();\n $('#MenuContribuyentePredio').hide();\n $('#MenuDireccionPredio').hide();\n $('#MenuFoxProAdeudos').hide();\n $('#MenuHistorialMysql').show();\n $('#MenuCalculoRecargos').hide();\n $('#MenuCondonacionesAdeudo').hide();\n $('#MenuCondonacionesAvaluo').hide();\n $('#MenuDocumentosProcesos').hide();\n $('#MenuCancelacionPago').hide();\n $('#ManuAplicaciondeMultas').hide();\n $('#ManuCambioAdeudo').hide();\n\n $('#predialmysql').hide();\n $('#usuariomysql').hide();\n $('#buscamysql').hide();\n $('input[name=accionmysql]').prop('checked', false);\n });\n\n //Menu Proceso\n $('#linkcalculorecargos').click(function () {\n $('#MenuPredio').hide();\n $('#MenuHistorialesPredio').hide();\n $('#MenuContribuyentePredio').hide();\n $('#MenuDireccionPredio').hide();\n $('#MenuFoxProAdeudos').hide();\n $('#MenuHistorialMysql').hide();\n $('#MenuCalculoRecargos').show();\n $('#MenuCondonacionesAdeudo').hide();\n $('#MenuCondonacionesAvaluo').hide();\n $('#MenuDocumentosProcesos').hide();\n $('#MenuCancelacionPago').hide();\n $('#ManuAplicaciondeMultas').hide();\n $('#ManuCambioAdeudo').hide();\n\n $('#annocalculobimestrales').hide();\n $('#recargo').hide();\n $('#calcularecargo').hide();\n });\n\n\n //condonaciones procesos\n $('#linkcondonacionprocesos').click(function () {\n $('#MenuPredio').hide();\n $('#MenuHistorialesPredio').hide();\n $('#MenuContribuyentePredio').hide();\n $('#MenuDireccionPredio').hide();\n $('#MenuFoxProAdeudos').hide();\n $('#MenuHistorialMysql').hide();\n $('#MenuCalculoRecargos').hide();\n $('#MenuCondonacionesAdeudo').show();\n $('#MenuCondonacionesAvaluo').hide();\n $('#MenuDocumentosProcesos').hide();\n $('#MenuCancelacionPago').hide();\n $('#ManuAplicaciondeMultas').hide();\n $('#ManuCambioAdeudo').hide();\n\n $('#cuentarecargos').hide();\n $('#claverecargos').hide();\n $('#nombrerecargos').hide();\n $('#buscarecargos').hide();\n $('#pfisicacondonaciones').hide();\n $('#pmoralcondonaciones').hide();\n });\n\n //condonaciones de avaluo\n $('#linkcondonacionavaluosprocesos').click(function () {\n $('#MenuPredio').hide();\n $('#MenuHistorialesPredio').hide();\n $('#MenuContribuyentePredio').hide();\n $('#MenuDireccionPredio').hide();\n $('#MenuFoxProAdeudos').hide();\n $('#MenuHistorialMysql').hide();\n $('#MenuCalculoRecargos').hide();\n $('#MenuCondonacionesAdeudo').hide();\n $('#MenuCondonacionesAvaluo').show();\n $('#MenuDocumentosProcesos').hide();\n $('#MenuCancelacionPago').hide();\n $('#ManuAplicaciondeMultas').hide();\n $('#ManuCambioAdeudo').hide();\n\n $('#cuentacondonacionesavaluo').hide();\n $('#clavecondonacionesavaluo').hide();\n $('#buscarcondonacionesavaluos').hide();\n });\n\n //documentos procesos\n $('#linkdocumentacionprocesos').click(function () {\n $('#MenuPredio').hide();\n $('#MenuHistorialesPredio').hide();\n $('#MenuContribuyentePredio').hide();\n $('#MenuDireccionPredio').hide();\n $('#MenuFoxProAdeudos').hide();\n $('#MenuHistorialMysql').hide();\n $('#MenuCalculoRecargos').hide();\n $('#MenuCondonacionesAdeudo').hide();\n $('#MenuCondonacionesAvaluo').hide();\n $('#MenuDocumentosProcesos').show();\n $('#MenuCancelacionPago').hide();\n $('#ManuAplicaciondeMultas').hide();\n $('#ManuCambioAdeudo').hide();\n });\n\n\n //cancelacion de pagos\n $('#linkcancelacionopagosprocesos').click(function () {\n $('#MenuPredio').hide();\n $('#MenuHistorialesPredio').hide();\n $('#MenuContribuyentePredio').hide();\n $('#MenuDireccionPredio').hide();\n $('#MenuFoxProAdeudos').hide();\n $('#MenuHistorialMysql').hide();\n $('#MenuCalculoRecargos').hide();\n $('#MenuCondonacionesAdeudo').hide();\n $('#MenuCondonacionesAvaluo').hide();\n $('#MenuDocumentosProcesos').hide();\n $('#MenuCancelacionPago').show();\n $('#ManuAplicaciondeMultas').hide();\n $('#ManuCambioAdeudo').hide();\n });\n\n //aplicacion de multas\n $('#linkaplicacionmultasprocesos').click(function () {\n $('#MenuPredio').hide();\n $('#MenuHistorialesPredio').hide();\n $('#MenuContribuyentePredio').hide();\n $('#MenuDireccionPredio').hide();\n $('#MenuFoxProAdeudos').hide();\n $('#MenuHistorialMysql').hide();\n $('#MenuCalculoRecargos').hide();\n $('#MenuCondonacionesAdeudo').hide();\n $('#MenuCondonacionesAvaluo').hide();\n $('#MenuDocumentosProcesos').hide();\n $('#MenuCancelacionPago').hide();\n $('#ManuAplicaciondeMultas').show();\n $('#ManuCambioAdeudo').hide();\n\n $('#claveaplicacionmulta').hide();\n $('#cuentaaplicaiconmulta').hide();\n $('#buscaraplicacionmulta').hide();\n });\n\n //aplicacion de multas\n $('#linkcambioadeudoprocesos').click(function () {\n $('#MenuPredio').hide();\n $('#MenuHistorialesPredio').hide();\n $('#MenuContribuyentePredio').hide();\n $('#MenuDireccionPredio').hide();\n $('#MenuFoxProAdeudos').hide();\n $('#MenuHistorialMysql').hide();\n $('#MenuCalculoRecargos').hide();\n $('#MenuCondonacionesAdeudo').hide();\n $('#MenuCondonacionesAvaluo').hide();\n $('#MenuDocumentosProcesos').hide();\n $('#MenuCancelacionPago').hide();\n $('#ManuAplicaciondeMultas').hide();\n $('#ManuCambioAdeudo').show();\n\n $('#cuentacambioadeudo').hide();\n $('#clavecambioadeudo').hide();\n $('#buscarcambioadeudo').hide();\n });\n}", "title": "" }, { "docid": "e753832d5b662f08346bb9f72a8dfe6e", "score": "0.5936855", "text": "function aRegistroHandler() {\n\n mostrarPantalla('Registro');\n\n\n //Esconder links de acceso\n document.getElementById('aInicio').style.display = 'Block';\n document.getElementById('aLogin').style.display = 'block';\n document.getElementById('aRegistrarse').style.display = 'none';\n\n //Escondo lo que indicaría registro el alta de anfitrion\n document.getElementById('tituloAltaAnfitrion').style.display = 'none';\n document.getElementById('btnAltaAnfitrion').style.display = 'none';\n\n}", "title": "" }, { "docid": "8ddc3379f81b00e58947d73689103ff5", "score": "0.5930343", "text": "function procesa()\r\n{\r\n\ttry\r\n\t{\r\n\t\tvar categoria = lee(slcCategoria);\r\n\t\t\r\n\t\t//validacion para ver que categoria es y lanzar su respectivo formulario a mostrar\r\n\t\tswitch (categoria) \r\n\t\t{\r\n\t\tcase categoriaUsuario[0]: //en caso de que no seleccione la categoria\r\n\t\t\t\r\n\t\t\tnewHTML.innerHTML = \"<div class='12u$'>\" +\r\n\t\t\t\t\t\t\t\t\t\"\t<hr>\" +\r\n\t\t\t\t\t\t\t\t\"</div>\" +\r\n\t\t\t\t\t\t\t\t\"<div class='12u$'>\" +\r\n\t\t\t\t\t\t\t\t\t\"<h2>Selecciona una categoria</h2>\" +\r\n\t\t\t\t\t\t\t\t\"</div>\" +\r\n\t\t\t\t\t\t\t\t\"<div class='12u'>\" +\r\n\t\t\t\t\t\t\t\t\t\"<p>.......................................</p>\" +\r\n\t\t\t\t\t\t\t\t\"</div>\";\r\n\t\t\tbreak;\r\n\r\n\t\tcase categoriaUsuario[1]: // caso de director\r\n\t\t\textracData(\"Directores\", empleado, \"Dir\");\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase categoriaUsuario[2]: // caso de clientes\r\n\t\t\textracData(\"CLIENTES\", cliente, \"\");\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase categoriaUsuario[3]: // caso de guia de museos\r\n\t\t\textracData(\"Guia de museos\", empleado, \"Gui\");\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase categoriaUsuario[4]: // caso de administrador\r\n\t\t\textracData(\"Administradores\", empleado, \"Adm\");\r\n\t\t}\r\n\t\t\r\n\t}\r\n\tcatch (e) \r\n\t{\r\n\t\tnewHTML.innerHTML = e.message;\r\n\t}\r\n}", "title": "" }, { "docid": "0ac114b69eb62b67f68453d3a44b01e0", "score": "0.59296966", "text": "function guardarKO(){\n if(get('formulario.opcionMenu')==\"Modificar Concurso Ranking\"){ \n btnProxy(1,1);\n btnProxy(2,1);\n btnProxy(3,0);\n btnProxy(4,0);\n btnProxy(5,1);\n btnProxy(7,0);\n btnProxy(8,0);\n btnProxy(9,0);\n \n focaliza('formulario.textNombreConcurso');\n \n } else {\n focaliza('formulario.textNombreConcurso');\n }\n}", "title": "" }, { "docid": "7b334fea9e2cdd17cdd67269a46fb1f3", "score": "0.5921963", "text": "function mostrarMenus(datos) {\n let contenido = document.getElementById(\"contenido\");\n let titulo = document.getElementById(\"titulo\");\n let titulo_secundario = document.getElementById(\"mensaje_titulo\");\n let mensaje = document.getElementById(\"mensaje\");\n\n contenido.innerHTML = \"\";\n titulo.innerHTML = \"Perfil\";\n let opciones = document.createElement(\"div\");\n let perfil = document.createElement(\"div\");\n\n let avatar = document.createElement(\"img\");\n avatar.src = \"../BD/Ficheros/Avatares/\" + datos['Avatar'];\n avatar.id = \"imagen\";\n let nombre_apellidos = document.createElement(\"p\");\n nombre_apellidos.innerHTML = \"Nombre y Apellidos: \" + datos['Nombre'] + \" \" + datos['Apellidos'];\n let f_nac = document.createElement(\"p\");\n f_nac.innerHTML = \"Fecha nacimiento: \" + datos['FechaNacimiento'];\n let telefono = document.createElement(\"p\");\n telefono.innerHTML = \"Telefono: \" + datos['Telefono'];\n let direccion = document.createElement(\"p\");\n direccion.innerHTML = \"Direccion: \" + datos['Direccion'];\n\n perfil.appendChild(avatar);\n perfil.appendChild(nombre_apellidos);\n perfil.appendChild(f_nac);\n perfil.appendChild(telefono);\n perfil.appendChild(direccion);\n\n let enlace_caja = document.createElement(\"p\");\n let contraseña_nueva = document.createElement(\"a\");\n contraseña_nueva.href = \"#\";\n contraseña_nueva.innerHTML = \"Cambiar Contraseña\";\n contraseña_nueva.onclick = function(){return cambiarClaveFormu();}\n let avatar_caja = document.createElement(\"p\");\n let avatar_nuevo = document.createElement(\"a\");\n avatar_nuevo.href = \"#\";\n avatar_nuevo.innerHTML = \"Cambiar Avatar\";\n avatar_nuevo.onclick = function(){return cambiarAvatarFormu();}\n \n enlace_caja.appendChild(contraseña_nueva);\n avatar_caja.appendChild(avatar_nuevo);\n\n opciones.appendChild(enlace_caja);\n opciones.appendChild(avatar_caja);\n\n titulo_secundario.style.display = \"none\";\n mensaje.style.display = \"none\";\n perfil.style.cssFloat = \"left\";\n opciones.style.cssFloat = \"right\";\n\n contenido.appendChild(opciones);\n contenido.appendChild(perfil);\n}", "title": "" }, { "docid": "98cb3d11175058a57a6661fe159a6d14", "score": "0.59212387", "text": "function armarSelect() {\n var con = 0\n var o\n var name\n $(\"#edicion li\").each(function () {\n if ($(this).is(\".edit-pSecundario\")) {\n //console.log(\"ok\")\n con += 1\n $(\"form\", this).children().each(function () {\n \n if ($(this).is(\".parraf-sub\")) {\n name = $(this).val()\n o = new Option(name, con);\n $(o).html(name);\n $(\"#insertSelec\").append(o);\n }\n \n })\n }\n })\n \n return\n }", "title": "" }, { "docid": "afb6f2472a5da2e9018f6663d6111443", "score": "0.5910204", "text": "function showAsideProcesso(){\n\t\n\t// controllo il ruolo dell'utente loggato per la valorizzazione\n\t// del campo Owner:\n\t// 1) se Ŕ dirigente stampo il suo username\n\t// 2) se Ŕ delegato stampo lo username del dirigente associato.\n\t$.ajax( {\n\t\ttype : 'GET',\n\t\turl : '/CruscottoAuditAtpoWebWeb/jsonATPO/getUserNameDirigente',\n\t\t\n\t\tsuccess : function(data) {\n\t\t\tMetronic.stopPageLoading();\n\t\t\t\n\t\t\t$('#owner').val(data.userNameDirigente);\n\t\t\t\n\t\t\t// sbianco i campi della modale\n\t\t\t$('#comboArea').val('');\n\t\t\t$('#descrizione').val('');\n\t\t\t$('#dataInizio').val('');\n\t\t\t$('#dataFine').val('');\n\t\t\t$('#input').val('');\n\t\t\t$('#output').val('');\n\t\t\t$('#ordinamento').val('');\n\t\t\t$('#statoAttivo').attr('checked', 'checked');\n\t\t\t\n\t\t\t\n\t\t\tsizeModalCustom();\n\t\t\t$('.modalProcesso').css(\"display\", \"block\");\n\t\t\tjQuery('.menu-sx-levelone-facility.add').animate({marginRight:'0'}, 400);\n\t\t\t if(contOne){\n\t\t\t\t jQuery('.menu-sx-levelone-facility.add').animate({marginRight:'0'}, 400);\n\t\t\t\t contOne = false;\n\t\t\t }else{\n\t\t\t \n\t\t\t\t $('.modalProcesso').css(\"display\", \"none\");\n\t\t\t contOne = true;\n\t\t\t }\n\t\t\t\n\t\t\treturn; \n\t\t},error: function(data){\n\t\t\tvar settings = {\n\t\t\t\t\ttheme: 'teal',\n\t\t\t\t\tsticky: false,\n\t\t\t\t\thorizontalEdge: 'top',\n\t\t\t\t\tverticalEdge: 'right',\n\t\t\t\t\tlife: 3000\n\t\t\t\t};\n\t\t\t Metronic.stopPageLoading();\n\t\t\t\t\t$.notific8('zindex', 11500);\n\t\t\t\t\t$.notific8('Nessuna associazione delegato-dirigente presente in archivio ', settings);\n\t\t\t\t\treturn; \n\t\t}\n\t});\n\t\n\t\n}", "title": "" }, { "docid": "6ddad0cf78ec623a6b908b15cb3474a1", "score": "0.58915603", "text": "function BAinitializeMenu() {\n if (soporta.DHTML) {\n if (soporta.NS4)\n document.captureEvents(Event.MOUSEUP);\n document.onmouseup = ocultarMenuActivo;\n }\n var iLeftMargin = 180;\n if (document.getElementById(\"MenuCases\")){\n\tmenu[\"Cases\"] = new Menu(\"MenuCases\", 39, 193-iLeftMargin, 100);\n }\n if (document.getElementById(\"MenuBAM\")){\n\tmenu[\"BAM\"] = new Menu(\"MenuBAM\", 39, 289-iLeftMargin, 100);\n }\n if (document.getElementById(\"MenuAnalyzer\")){\n\tmenu[\"Analyzer\"] = new Menu(\"MenuAnalyzer\", 39, 289-iLeftMargin, 100);\n }\n else{\n\tiLeftMargin = iLeftMargin+100;\n }\n if (document.getElementById(\"MenuCookPit\")){\n\tmenu[\"CookPit\"] = new Menu(\"MenuCookPit\", 39, 390-iLeftMargin, 100);\n }\n else{\n\tiLeftMargin = iLeftMargin+113;\n }\n if (document.getElementById(\"MenuAdmin\")){\n\tmenu[\"Admin\"] = new Menu(\"MenuAdmin\", 39, 490-iLeftMargin, 100);\n } \n else{\n \tiLeftMargin = iLeftMargin+113;\n }\n if (document.getElementById(\"MenuTools\")){\n\tmenu[\"Tools\"] = new Menu(\"MenuTools\", 39, 550-iLeftMargin, 100);\n } \n}", "title": "" }, { "docid": "5a9e70911f8aed04d257d1f86c6d7cd2", "score": "0.5876881", "text": "function menos() {\r\n $(this).prev().find(\"span\").hide()\r\n this.addEventListener(\"click\", mas)\r\n this.removeEventListener(\"click\", menos)\r\n $(this).text(\"Ver mas...\")\r\n }", "title": "" }, { "docid": "24fe9a79c52bd41530090bd95e1c67b6", "score": "0.587086", "text": "function mostrarFormulario() {\n document.getElementById(\"menuAgregar\").classList.toggle(\"oculto\");\n}", "title": "" }, { "docid": "2bf0aac20f9a40a1ebe78dc35f482fd8", "score": "0.58608925", "text": "function abrirAgregarOrden() {\n\tconst tabs = md_orden.querySelectorAll('.tab'),\n\t\tbtns_agregar = md_orden.querySelectorAll('.success'),\n\t\tbtns_editar = md_orden.querySelectorAll('.atention'),\n\t\tbtns_mas = md_orden.querySelectorAll('.primary');\n\n\t/** Permite abrir las tabs con la primer pestaña en click */\n\ttabs[0].click();\n\n\ttabs.forEach(tab => {\n\t\ttab.removeAttribute('style');\n\t\ttab.style.color = '#1b1b1b';\n\t});\n\n\tfor (let i = 0; i < btns_agregar.length; i++) {\n\t\tbtns_agregar[i].style.display = 'block';\n\t\tbtns_editar[i].style.display = 'none';\n\t\tbtns_mas[i].style.display = 'block';\n\t}\n\tmd_orden.style.display = 'block';\n}", "title": "" }, { "docid": "136651bd0dd0073b94b400b846f4ea84", "score": "0.5838896", "text": "function abreMenu(){\n\n\tvar menu = document.getElementById('menu');\n\tvar boton = document.getElementById('botonMenu');\n\n\tif(menu != null && boton != null){\n\t\tif(oculto == true){\n\t\t\tmenu.style.left = 0+'px';\n\t\t\tboton.style.left = 135+'px';\n\t\t\tboton.className = 'fa fa-times';\n\t\t\toculto = false;\n\t\t}else{\n\t\t\tmenu.style.left = -135+'px';\n\t\t\tboton.style.left = 0+'px';\n\t\t\tboton.className = 'fa fa-bars';\n\t\t\toculto = true;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "9833f9cb2a53db97907e34f626e4e33c", "score": "0.58343846", "text": "mahasiswa() {\n console.log();\n console.log(\"<==== Tambah Mahasiswa ====>\");\n const nama = prompt(\"Input nama : \");\n const tgl_lahir = prompt(\"Input tanggal lahir: \");\n const nim = prompt(\"Input NIM : \");\n\n Menu.process.inputDataMahasiswa(nama, tgl_lahir, nim)\n }", "title": "" }, { "docid": "300aa5da82a5a7e657bf3e9217429194", "score": "0.58333397", "text": "function changeMenu(){\n\t\tvar lien = $(this).attr('data-lien');\n\t\t$(\".sousmenu li\").css('background', '#799aed');\n\t\t$(this).css('background', '#79b530');\n\t $('div.souspage').hide();\n\t $('div#' + lien).show();\n\t}", "title": "" }, { "docid": "34c65a26dfc502a5a5a86a89b5f1aee1", "score": "0.5832175", "text": "function mas() {\r\n $(this).prev().find(\"span\").show()\r\n this.addEventListener(\"click\", menos)\r\n this.removeEventListener(\"click\", mas)\r\n $(this).text(\"Ver menos\")\r\n }", "title": "" }, { "docid": "8a5a58b13b2b38cf400aca6621296822", "score": "0.5815406", "text": "function mostrarFormulario() {\n d.getElementById(\"menuAgregar\").classList.toggle(\"hidden\"); //así con cada tabla de team luego\n}", "title": "" }, { "docid": "8dc0bb8e50462f3a45cc7ce8cfeff5e6", "score": "0.58068585", "text": "function displayMisAnuncios() {\n var p = \"misAnuncios\";\n\n pantallaApp = p;\n\n ocultarElementosApp(p);\n\n}", "title": "" }, { "docid": "776f88a8a507e9518bbc9fbbcb196c9a", "score": "0.5804904", "text": "function agregardatosPermiso(nombre,privilegio){\n\n\n\n\t\t\tcadena=\"nombre=\" + nombre + \n\n\t\t\t\t\t\"&privilegio=\" + privilegio;\n\n\n\n\t\t\t$.ajax({\n\n\t\t\t\ttype:\"POST\",\t\n\n\t\t\t\turl:\"php/agregarPermiso.php\",\n\n\t\t\t\tdata:cadena,\n\n\t\t\t\tsuccess:function(r){\n\n\t\t\t\t\tif(r==1){\n\n\t\t\t\t\t\t$('#tabla').load('componentes/tpermiso.php');\n\n\t\t\t\t\t\talertify.success(\"agregado con exito :)\");\n\n\t\t\t\t\t}else{\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\talertify.error(\"Usuario ya existe :( \");\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t});\n\n\t\t}", "title": "" }, { "docid": "f4aa392ea2b87ed240a2d46e34f492ca", "score": "0.57999575", "text": "function fLimpiar() {\n\n\t\teval('frmFormulario').oculto = 'S';\n\t\tset('frmFormulario.conectorAction', 'LPIntroducirOrdenesChequeos');\n\t\tset('frmFormulario.accion', 'limpiarManual');\n\t\tenviaSICC('frmFormulario', null, null, 'N');\n\t}", "title": "" }, { "docid": "7804bb0c23041b1380edb1ea3779642c", "score": "0.57923776", "text": "static setMenu(menu) {\n Menu.setApplicationMenu(menu);\n let sm = document.getElementById(\"system-menu\");\n sm.innerHTML = \"\";\n // `<div class=\"button\" id=\"smb-file\">File</div>`\n let div = document.createElement(\"div\");\n div.classList.add(\"button\");\n div.innerText = \"Toxen\";\n div.addEventListener(\"click\", () => {\n let divRect = div.getBoundingClientRect();\n menu.popup({\n x: divRect.x,\n y: divRect.bottom\n });\n });\n sm.appendChild(div);\n // let ttt = document.getElementById(\"toxen-title-text\");\n // ttt.style.width = \"\";\n }", "title": "" }, { "docid": "a0de6ffe77253f53bd09638468d6b03d", "score": "0.5772201", "text": "function mostrarVentanaNuevoPedido(){\n\t$(\"#cont_centro\").html(forPantallaAsignarMesa());\n\tnav = 31;\t//no. de ventana de modulo mesero\n}", "title": "" }, { "docid": "ef31e028fc62d0017dbba3c941774ee9", "score": "0.576391", "text": "function cambioPropuesta(){\n if(controlEdificioYPropuesta())\n return;\n\n reiniciarSelect(\"actividad\");\n actualizarTodo(URLS.actividadesDePropuesta,\"actividad\", \"propuesta\", true);\n}", "title": "" }, { "docid": "0fcb2dbd0b41ff3536de7cf64bab5305", "score": "0.5761208", "text": "function nuevo_producto(){\t\t\n\t\tllama_formulario('NUEVO CABLE MODEM','nuevo');\n\t\tVentana_modal.show();\t\t\t\n\t}", "title": "" }, { "docid": "f514a602374b6eaf06e4c1f294291850", "score": "0.575923", "text": "function bindeaRecuperadosOptionAdmin() { \n $('select[id$=admin]').change(function (event) { \n tabla = $(this).attr('tabla');\n id = $(this).val();\n style = $(this).children('[value='+id+']').attr('style') \n html = $(this).children(\":selected\").html();\n bindeaRecuperadosInputAdmin();\n if (tabla == 'servidor') { \n event.preventDefault(); \n bindeaRecuperadosServidor(''); \n } \n }); \n }", "title": "" }, { "docid": "6b43b63b8e2dc4200f73aa3978b4ec28", "score": "0.57544357", "text": "function Items_ArmarPanel(){ //La funcion q hay q llamar para armar todo el panel \n Panel_Cargar( ()=>{ Items_ArmarTabla() }, \"Items\", bre.Items);\n }", "title": "" }, { "docid": "6de708adb82af458912dc0cea26b4fb5", "score": "0.5727765", "text": "function inicializarEventos() {\t\r\n\t\t$( \"input[type=submit], a, button\" ).button();\t\r\n\r\n\t\tPonePunteroManita('.miLink'); //Le pone el puntero de manita al elemento\r\n\t}// Fin inicializarEventos\t", "title": "" }, { "docid": "fa021f60fbf866a374851e63f1c760a1", "score": "0.572519", "text": "function showmenu_delete(){\n\t\t//Show delete menu background\t\n\t\t$('#SourcedMbacK').css('display','block');\n\t\t//Show delete menu\n\t\t$('#SourcedM').css('display','block');\n\t\t\n\t\t/*Get the dataGet the dataGet the dataGet the dataGet the data*/\n //num\n\t var xol=$(\".source-selected\").length;\n\t if(xol==1){\n\t \t$('#SourcedM_dname #NuM').text(xol);\n\t \t$('#SourcedM_dname #ImagetiP').text('Picture?');\n\t }else{\n\t \t$('#SourcedM_dname #NuM').text(xol);\n\t \t$('#SourcedM_dname #ImagetiP').text('Pictures?');\t \t\n\t } \t\t\t\t\n}", "title": "" }, { "docid": "9fa41deef4657eabf0c146921f6b6719", "score": "0.57208073", "text": "function modificarFormParaAgregar() {\n document.getElementById(\"btn-agregar-tabla\").classList.remove(\"oculto\");\n document.getElementById(\"btn-agregar-varios-tabla\").classList.remove(\"oculto\");\n document.getElementById(\"js-titulo-formulario\").innerHTML = \"Agregar Productos\";\n document.getElementById(\"btn-vaciar-tabla\").classList.remove(\"oculto\");\n }", "title": "" }, { "docid": "976e155adb1add5ac59f867c5c6535a7", "score": "0.572065", "text": "function adiciona_escudos() {\n var html_base = function (time) { return '<li id=\"'+time+'\"><a class=\"escudo\" title=\"'+traducao[time]+'\" id=\"escudo_'+time+'\" href=\"javascript:void(0)\"><img src=\"img/escudos/'+time+'.png\"></a></li>' }\n var menu1 = $(\"#menuEscudos01\")\n var menu2 = $(\"#menuEscudos02\")\n escudos.forEach(function (d,i) {\n if (i < 10) {\n menu1.append(html_base(d))\n } else {\n menu2.append(html_base(d))\n }\n })\n\n //CASO ALGUM ESCUDO SEJA ESCOLHIDO\n $(\".menuEscudos li\").click(function(e) {\n //e.preventDefault();\n var nomeEscudoSelecionado = traducao[$(this).attr(\"id\")];\n\n selecionaLinha(nomeEscudoSelecionado);\n mostraLinha(timeEscolhido, linhaSelecionada, true);\n redesenha_linha();\n coloca_tacinhas();\n\n });\n}", "title": "" }, { "docid": "c909db10afaebc237d0e698396ecba50", "score": "0.57206035", "text": "function displayInformeProblema() {\n var p = \"informeProblema\";\n\n pantallaApp = p;\n\n ocultarElementosApp(p);\n\n}", "title": "" }, { "docid": "4f10be6d09b45608d7e2ec71fc203c3c", "score": "0.5718181", "text": "function colocarMenuPorMarca(marca){\n var Nom=\"\";\n if(marca==0){\n animacion_salida($(\"#contenedorMenubace\"),\"default\", 0);\n animacion_salida($(\"#contenedorMenuSIX\"),\"default\", 0);\n animacion_salida($(\"#contenedorMenuRetail\"),\"default\", 0);\n }else if(marca==1){\n Nom=\"#contenedorMenubace\";\n animacion_salida($(\"#contenedorMenuSIX\"),\"default\", 0);\n animacion_salida($(\"#contenedorMenuRetail\"),\"default\", 0);\n }else if(marca==2){\n Nom=\"#contenedorMenuSIX\";\n animacion_salida($(\"#contenedorMenubace\"),\"default\", 0);\n animacion_salida($(\"#contenedorMenuRetail\"),\"default\", 0);\n }else if(marca==3){\n Nom=\"#contenedorMenuRetail\";\n animacion_salida($(\"#contenedorMenubace\"),\"default\", 0);\n animacion_salida($(\"#contenedorMenuSIX\"),\"default\", 0);\n }\n if(marca != vista){\n if(marca !=0){\n animacion_entrada($(Nom),\"izquierda_derecha\", 0.5);\n }\n vista = marca;\n }\n}", "title": "" }, { "docid": "3dd42338b970c8c0f8871762d4628564", "score": "0.57178986", "text": "function mostrar_coluna(alterar_menu, nome, altera) {\n\t//variaveis\n\tvar display = document.getElementById(nome).style.display;\n\tvar contador = document.getElementsByName(altera);\n\t\n\tvar i = 0;\n\n\t//Confirma se ta visivel\n\tif(display == \"table-cell\") {\n\t\tdocument.getElementById(alterar_menu).innerHTML = '<img class=\"min-imagem-menu\" src=\"../imagens/alterar.png\">' + alterar_menu;\n\t\t//Sumir\n\t\tdocument.getElementById(nome).style.display = 'none';\n\t\t//laco \n\t\tfor(i; i < contador.length; i++) {\n\t\t\tcontador[i].style.display = 'none';\n\t\t}\n\t} else {\n\t\tdocument.getElementById(alterar_menu).innerHTML = '<img class=\"min-imagem-menu\" src=\"../imagens/alterar.png\">Ocultar ' + alterar_menu;\n\t\t//aparecer\n\t\tdocument.getElementById(nome).style.display = 'table-cell';\n\t\t//laco\n\t\tfor(i; i < contador.length; i++) {\n\t\t\tcontador[i].style.display = 'table-cell';\n\t\t}\n\t}\n}", "title": "" }, { "docid": "e1a40851b03a50dfbcef66e2d8a86861", "score": "0.57140636", "text": "function configMenu(menu){\n console.log(\"Configuration menu requested: \", util.inspect(menu));\n \n inputs = [\n {\n key : \"osc_room\",\n label : \"Room ID\",\n placeholder : \"Add a Room ID: e.g. ernn2l\",\n value : \"\"\n },\n {\n key : \"osc_port\",\n label : \"OSC Client Port (Used for all Client IPs)\",\n placeholder : \"Add an OSC Port: e.g. 8000\",\n value : \"\"\n },\n {\n key : \"osc_ip\",\n label : \"OSC Client IPs (use your computer's IP address, and add any other computer's IP address to send messages to. You must use a comma separated list for multiple clients). Your computer may need be plugged in via Ethernet to work within a firewall.\",\n placeholder : \"Add an IP: e.g. 127.0.0.1\",\n value : \"\"\n }\n ];\n\n menu.inputs = inputs;\n}", "title": "" }, { "docid": "dda1a3035c0a5e0cc37abe05fd4bdd3e", "score": "0.5713779", "text": "function ocultoAlInicio() {\n // login\n $(\".loginError\").hide();\n $(\".logout\").hide();\n // secciones\n $(\"#catalogo\").hide();\n $(\"#administrador\").hide();\n $(\"#vendedor\").hide();\n $(\"#reportes\").hide();\n // menu principal\n $(\"#spanCatalogo\").hide();\n $(\"#spanVentas\").hide();\n $(\"#spanAdministracion\").hide();\n $(\"#spanReportes\").hide();\n}", "title": "" }, { "docid": "4db9d51c8394183a4a1db6cb36005ed2", "score": "0.5698161", "text": "function desplegarMenu(ID){\n //var contenedorPequeño=document.getElementById(ID);\n\n\n //me guardo el id de la categoria cuando pincho en el menu de los 3 puntos\n categoria_seleccionada=$(ID).closest(\".flex-container\").attr('id');\n\n\n \tvar contenedorPequeño= $(ID).closest(\".flex-container\");\n var menu= contenedorPequeño[0].getElementsByClassName(\"dropdown-content\")[0];\n menu.classList.toggle(\"visible\");\n //Miraremos la posición del click para que el menu no aparezca fuera de la pantalla\n document.addEventListener('click', function(evt) {\n var mousePos = evt.clientX;\n if(mousePos>=1000){\n menu.classList.add(\"Coreccion-MenuDesplegable\");\n\n }\n });\n }", "title": "" }, { "docid": "4196d20565b8f908d4e99d343ac39707", "score": "0.56951785", "text": "function comprobarDatosAltaTipoPunto()\n{\n if (analizarCampos() && comprobarSelect('selectIdioma'))\n {\n mostrar();\n return true;\n }\n else\n return false; \n}", "title": "" }, { "docid": "67fae0519739f5b1a2ad25f4d41d4f13", "score": "0.568857", "text": "static displayMenu() {\n CliServices.displayMenu();\n }", "title": "" }, { "docid": "eb0573ca70efea48571e3efe30c4e4b6", "score": "0.568805", "text": "function showAsideProcessoNormativa(){\n\t\n\tvar idTipo = $('#comboTipoNormativa option:selected').val();\n\tvar idTipoDescrizione = $('#comboTipoNormativa option:selected').text();\n\t\n\tif(idTipo == 1){\n\t\tloadDiv('/CruscottoAuditAtpoWebWeb/getCircolariInpsAssociateAsideList', 'processoNormativaAsideDiv', null, 'initProcessoCircolariInps');\n\t}\n\tif(idTipo == 2){\n\t\tloadDiv('/CruscottoAuditAtpoWebWeb/getNoteDecretiAssociateAsideList', 'processoNormativaAsideDiv', null, 'initProcessoNoteDecreti');\n\t}\n\tif(idTipo == 3){\n\t\tloadDiv('/CruscottoAuditAtpoWebWeb/getMessaggiInpsAssociateAsideList', 'processoNormativaAsideDiv', null, 'initProcessoMessaggiInps');\n\t}\n\tif(idTipo == 4){\n\t\tloadDiv('/CruscottoAuditAtpoWebWeb/getLeggiDecretiAssociateAsideList', 'processoNormativaAsideDiv', null, 'initProcessoLeggiDecreti');\n\t}\n\t\n\t\n\t$('.modalProcessoNormativa').css(\"display\", \"block\");\n\tjQuery('.menu-sx-levelone-facility.add').animate({marginRight:'0'}, 400);\n\t if(contOne){\n\t\t jQuery('.menu-sx-levelone-facility.add').animate({marginRight:'0'}, 400);\n\t\t contOne = false;\n\t }else{\n\t \n\t\t $('.modalProcessoNormativa').css(\"display\", \"none\");\n\t contOne = true;\n\t }\n\t \n\t $('#titoloAside').text('ASSOCIAZIONE PROCESSO - NORMATIVA (' + idTipoDescrizione + ')');\n\t\n}", "title": "" }, { "docid": "ac96c3efd53506a67663dbe8de62fce7", "score": "0.5687543", "text": "function RegistrarDatos(){\n //capturando valores\n var nom=txtNom.value;\n var pre=txtPre.value;\n var can=txtCan.value;\n if (Categoria.value==0 || Categoria.value==\"\"){\n var cat = textContent = \"\";\n }else{\n cat = parseFloat(Categoria.value);\n var indice=Categoria.selectedIndex;\n switch(indice){\n case 1:\n cat=\"Entretenimiento\";\n break;\n case 2:\n cat=\"Tecnología\";\n break;\n case 3:\n cat=\"Línea Blanca\";\n break;\n default:\n cat=0\n break;\n }\n }\n //llamamos al procedimiento Registrar\n Registrar(nom,pre,can,cat);\n MostrarRegistro();\n}", "title": "" }, { "docid": "72a86627172d6b71b0239f38a82868e6", "score": "0.5673592", "text": "function onLoadPag() {\n\t\n\tif (get(FORMULARIO+'.errDescripcion')!='') { \n var wnd = fMostrarMensajeError(get(FORMULARIO+'.errCodigo'),get(FORMULARIO+'.errDescripcion'));\n\t}\t\n\t\n\tDrdEnsanchaConMargenDcho(\"listado1\", 12);\n\teval (ON_RSZ);\n\t\n\t// pasar el foco al primer control de la pagina\n\tfocaliza(FORMULARIO + \".cbMarca\");\n\t\n\t//Visibilizar el combo AlmacenDestino si procede\n\tif (get(FORMULARIO + \".visualizarAlmacenDestino\") == 'true') {\n\t\tdocument.all[\"almacenDestinoLabel\"].style.visibility = 'visible';\n\t\tdocument.all[\"almacenDestino\"].style.visibility = 'visible';\n\t}\n\t\n\t//Preseleccion de valores\n\tvar marca = get(FORMULARIO + \".hid_marca\"); //marca seleccionada por el usuario\n\t\n\tif ( marca == '') {\n\t\tmarca = get(FORMULARIO + \".marca\"); //marca por defecto\n\t} else {\n\t\t// se hacen visibles las 2 capas\n\t\thacerVisibleCapa('capa1');\n\t\thacerVisibleCapa('capaLista');\n\t}\n\n\tif ( marca != '')\n\t\tset(FORMULARIO + \".cbMarca\", [marca]);\n\n\n\tvar tipoMov = get(FORMULARIO + \".hid_tipoMovimiento\"); //tipo movimiento seleccionado por el usuario\n\tif ( tipoMov != '') \n\t\tset(FORMULARIO + \".cbTipoMovimiento\", [tipoMov]);\n \n //-> cuando carga la pagina toma el el valor seteado en hid_FechaUsu y se lo asigna a formulario.txtFecha\n var fechaUsu = get(FORMULARIO + \".hid_FechaUsu\"); //tipo movimiento seleccionado por el usuario\n\n if ( fechaUsu != ''){\n set(FORMULARIO + \".txtFecha\", fechaUsu);\n }\n\t\t\t\t\n\t// configurar el menu secundario\tññññ\n\tconfigurarMenuSecundario(FORMULARIO);\n}", "title": "" }, { "docid": "790b4d2f1632942dd532e207b22a1b65", "score": "0.56718063", "text": "function cboSedeEmpresaArea(){\n var form=\"\",funcion=\"\";\n var destino=\"divSedeEmpresaArea\";\n var idSede=$(\"cboSucursal\").value;\n $('divAsignarPuestoArea').show();\n // var nomSede=$(\"cboSucursal\").options[$(\"cboSucursal\").selectedIndex].text;\n // if(idSede==\"\"){\n // alert(\"Por favor seleccione una Sede ...\");\n // return;\n // }\n var parametros=\"p1=cboSedeEmpresaArea&p2=\"+idSede;\n\n enviarFormulario(form,parametros,funcion,destino);\n}", "title": "" }, { "docid": "06c683b6ad5c2bb44713384e165c371d", "score": "0.56713426", "text": "function initialisationPage(){\r\n\r\nmodeListe();\r\n\r\n$(\".liste-choix\").selectmenu({\r\n select: function( event, ui ) {\r\n\t\tvar element = $(event.target);\r\n\t\t\r\n\t\t//Tri sur les catégories de recette\r\n\t\tif (element.hasClass('categories')) {\t\r\n\t\t\trecetteListeRAjax(ui.item.value);\r\n\t\t}\r\n\t\t\r\n\t\t//Tri sur les catégories de recette\r\n\t\tif (element.hasClass('recette')) {\r\n\t\t\trecetteLireRAjax(ui.item.value);\r\n\t\t}\r\n\t}\r\n});\r\n\r\nrecetteLireRAjax(3);\t//recette par défaut\r\n\r\nficheAjoutListeAutoComplete();\r\n\r\n}", "title": "" }, { "docid": "47c141d924faf4d6dd21822d604ee043", "score": "0.56709063", "text": "function ocultarMenuActivo(e) {\n if (menuActivo) {\n menuActivo.ocultar();\n menuActivo = null;\n }\n}", "title": "" }, { "docid": "499ff7ef200b01d97de2565dc64b8e6c", "score": "0.56697154", "text": "function salioMenu( cual ){\r\n\tdocument.getElementById(cual).style.visibility = 'hidden'\r\n\tdocument.getElementById(cual).style.position = 'absolute'\r\n}", "title": "" }, { "docid": "87135fa1504fb3ecc61a2522b8a7fc94", "score": "0.56649435", "text": "function limpiarCampos(){\n limpiarSedes();\n $('#codModalidad').val(\"\");\n $('#nomModalidad').text(\"Seleccione una modalidad!\");\n $('#inicioModalidad').val(\"\");\n $('#finModalidad').val(\"\");\n $('#integrantes').val(\"\");\n $('#cantMujeres').val(\"\");\n $('#cantVarones').val(\"\");\n $('#nroEquipos').val(\"\");\n }", "title": "" }, { "docid": "6f6f183ffccfa83e9c35403640a16388", "score": "0.565833", "text": "function fntSelecionarMascota() {\n alert(\"selecionar mascota\");\n}", "title": "" }, { "docid": "2ee4aefb2de731124a9c0f2d86e1d20f", "score": "0.56573224", "text": "function init()\n{\n mostrarfrom(false);\n listado();\n\n $(\"#formulario\").on(\"submit\",function(e)\n {\n guardaryeditar(e);\n });\n\n $(\"#Mimagenmuestra\").hide();\n\n //Cargamos los items al select tipocodigo\n $.get(\"../../ajax/xmouses.php?op=selearea\", function(r){\n $(\"#idarea\").html(r);\n \n });\n}", "title": "" }, { "docid": "06052340d09d6e08ccb52504e3e9752a", "score": "0.56568706", "text": "function iniciarApp() {\n\n //utilizo la función que controla las pantallas para mostrar la de home\n mostrarPantalla('Home')\n\n //preparo clicks a los links de la pantalla de Registro, Login, Home y Cerrar sesión\n crearBoton('aInicio', aInicioHandler);\n crearBoton('aLogin', aLoginHandler);\n crearBoton('aRegistrarse', aRegistroHandler);\n crearBoton('aCerrarSesion', aCerrarSesionHandler);\n\n //Ocultar la opción de ver más TO DO!!\n\n //preparo clicks a las opciones de usuario huesped\n crearBoton('aInmueblesHuesped', aInmueblesHuespedHandler);\n crearBoton('aConsultaCalificacion', aConsultaCalificacionHandler);\n\n //preparo clicks a las opciones de usuario anfitrion\n crearBoton('aMisInmueblesAnf', aMisInmueblesAnfHandler);\n crearBoton('aRegistroInmueble', aRegistroInmuebleHandler);\n\n //preparo clicks a las opciones de usuario admin\n crearBoton('aAltaAnfitrion', aAltaAnfitrionHandler);\n crearBoton('aCargaCotizacion', aCargaCotizacionHandler);\n crearBoton('aReporteInmuebles', aReporteInmueblesHandler);\n\n //Oculto las opciones que solo tienen los usuarios logueados\n document.getElementById('anfOp1').style.display = 'none';\n document.getElementById('anfOp2').style.display = 'none';\n document.getElementById('huespOp1').style.display = 'none';\n document.getElementById('huespOp2').style.display = 'none';\n document.getElementById('adminOp1').style.display = 'none';\n document.getElementById('adminOp2').style.display = 'none';\n document.getElementById('adminOp3').style.display = 'none';\n\n\n //preparo clicks de los botones de la pantalla de Registro, Login\n crearBoton('btnLogin', btnLoginHandler);\n crearBoton('btnRegistroHuesped', bntRegistroHuespedHandler);\n\n //Oculto los links a cerrar sesión y el inicio\n document.getElementById('aCerrarSesion').style.display = 'none';\n document.getElementById('aInicio').style.display = 'none';\n\n //clicks filtros y monedas\n /* document.getElementById(\"btnHomeFiltro\").addEventListener(\"click\", btnHomeFiltroHandler); */\n document.querySelector(\".label-moneda\").addEventListener(\"click\", labelMonedaHandler);\n\n\n}", "title": "" }, { "docid": "a4494ef91b3d1581f0429f9c97bc1843", "score": "0.5651549", "text": "function entroMenu( cual ){\r\n \tdocument.getElementById(cual).style.visibility = 'visible'\r\n\tdocument.getElementById(cual).style.position = 'relative'\r\n}", "title": "" }, { "docid": "84745f5e5f2946e55fc56ff8d7688172", "score": "0.5650381", "text": "function menuConfig(menuService) {\n\n menuService.addMenuItem('topbar', {\n title: 'Basic',\n state: 'basic',\n\n });\n\n menuService.addMenuItem('topbar', {\n title: 'Cadastrar',\n state: 'register',\n });\n\n menuService.addMenuItem('topbar', {\n title: 'Controle de Créditos',\n state: 'credit',\n type: 'dropdown'\n });\n\n menuService.addSubMenuItem('topbar', 'credit', {\n title: 'Adição Manual',\n state: 'credit.manual'\n });\n menuService.addSubMenuItem('topbar', 'credit', {\n title: 'Adição por Agendamento',\n state: 'credit.schedule '\n });\n\n menuService.addMenuItem('topbar', {\n title: 'Painel de Controle',\n state: 'settings',\n type: 'dropdown'\n });\n\n menuService.addSubMenuItem('topbar', 'settings', {\n title: 'Converter Chave em Créditos',\n state: 'settings.password'\n });\n menuService.addSubMenuItem('topbar', 'settings', {\n title: 'Créditos Disponíveis',\n state: 'settings.picture'\n });\n menuService.addSubMenuItem('topbar', 'settings', {\n title: 'Histórico de Chamadas ',\n state: 'settings.picture'\n });\n\n\n }", "title": "" }, { "docid": "50ade5d3e622801b058d4271f7805030", "score": "0.5649452", "text": "function inizio_gioco() {\n\t\n}", "title": "" }, { "docid": "f998590155ddb636c63ad5dc4c7e7d54", "score": "0.5645195", "text": "function accionDefinirVentaProyectada(){\n\tvar o = new Object();\n\to.opcionMenu = get('formulario.opcionMenu');\n\tvar whnd = mostrarModalSICC(\"LPMantenerParametrosCalificacion\", \"cargar variables venta proyectada\", o);\n\tif(whnd!=null){\n\t\tset(\"formulario.sOidAgrupacion\", whnd[0]);\n\t\t//Linea 1\n\t\tset(\"formulario.tempCkActivas\", whnd[1]);\n\t\tset(\"formulario.tempCkIngreso\", whnd[2]);\n\t\tset(\"formulario.tempCkReingreso\", whnd[3]);\n\t\tset(\"formulario.tempCkEgresos\", whnd[4]);\n\t\tset(\"formulario.tempCkEntregadas\", whnd[5]);\n\t\tset(\"formulario.tempCkRecibidas\", whnd[6]);\n\t\tset(\"formulario.tempCkCapitalizacion\", whnd[7]);\n\t\t//Linea 2\n\t\tset(\"formulario.tempCkActivasFinales\", whnd[8]);\n\t\tset(\"formulario.tempCkActividad\", whnd[9]);\n\t\tset(\"formulario.tempCkNumpedidos\", whnd[10]);\n\t\tset(\"formulario.tempCkPrecioPromedioUnitario\", whnd[11]);\n\t\tset(\"formulario.tempCkPromedioVentaPedido\", whnd[12]);\n\t\t//Linea 3\n\t\tset(\"formulario.tempCkPromedioUnidadesPedido\", whnd[13]);\n\t\tset(\"formulario.tempCkPromedioOrdenesPedido\", whnd[14]);\n\t\tset(\"formulario.tempCkRetencion\", whnd[15]);\n\t\tset(\"formulario.tempCkVentaEstadisticable\", whnd[16]);\n\t}\n}", "title": "" }, { "docid": "cf3764339c90f855e99dca60ffb035d1", "score": "0.56440294", "text": "function colocarMenuPorMarca(marca){\n var Nom=\"\";\n if(marca==0){\n animacion_salida($(\"#contenedorMenuHeineken\"),\"default\", 0);\n animacion_salida($(\"#contenedorMenuSIX\"),\"default\", 0);\n animacion_salida($(\"#contenedorMenuRetail\"),\"default\", 0);\n }else if(marca==1){\n Nom=\"#contenedorMenuHeineken\";\n animacion_salida($(\"#contenedorMenuSIX\"),\"default\", 0);\n animacion_salida($(\"#contenedorMenuRetail\"),\"default\", 0);\n }else if(marca==2){\n Nom=\"#contenedorMenuSIX\";\n animacion_salida($(\"#contenedorMenuHeineken\"),\"default\", 0);\n animacion_salida($(\"#contenedorMenuRetail\"),\"default\", 0);\n }else if(marca==3){\n Nom=\"#contenedorMenuRetail\";\n animacion_salida($(\"#contenedorMenuHeineken\"),\"default\", 0);\n animacion_salida($(\"#contenedorMenuSIX\"),\"default\", 0);\n }\n if(marca != vista){\n if(marca !=0){\n animacion_entrada($(Nom),\"izquierda_derecha\", 0.5);\n }\n vista = marca;\n }\n}", "title": "" }, { "docid": "f4b3b5dfc9d0d87e24e5a31a3915b89c", "score": "0.5641507", "text": "function ispisMenu(){\n let nizHref=[\"#\",\"#about\",\"#gallerys\",\"#ourwork\",\"#contacts\"];\n let nizIme=[\"Home\",\"About\",\"Gallery\",\"Our work\",\"Contact us\"];\n let navi=document.getElementById(\"navigation\");\n let html=\"\";\n for(var i=0;i<nizHref.length;i++){\n html+=`\n <li><a href=\"${nizHref[i]}\">${nizIme[i]}</a></li>\n `\n }\n navi.innerHTML=html;\n }", "title": "" }, { "docid": "22f5bf917f6142bd37e8b2d3107fc86e", "score": "0.5638763", "text": "function controlBotonesSistemasModosDelDerechoCPI(ambito){\n\trutaInicial=\"caracteristicas_\";\n\tobtenerTablaModos();\n\n\tjQuery(\"#botonIncluirSistemaModo\").click(function (){\n\t\t// incluimos el sistema de transmision\n\t\tvar sistemaDer = jQuery(\"#\"+rutaInicial+\"sistemasTransmision option:selected\");\n\t\tvar incluirSistema = true;\n\t\t// comprobamos que ya no esté incluido\n\t\tjQuery(\"#\"+rutaInicial+\"sistemasTransmisionIncluidos option\").each(function(j, sistemaIncl){\n\t\t\tif (sistemaDer.val()==jQuery(sistemaIncl).val()){\n\t\t\t\tincluirSistema = false;\n\t\t\t}\n\t\t});\n\t\tif (incluirSistema){\n\t\t\tjQuery(\"#\"+rutaInicial+\"sistemasTransmisionIncluidos\").append(jQuery(\"<option></option>\").val(sistemaDer.val()).html(sistemaDer.html()));\n\t\t}\n\t\t// incluimos los modos de difusion\n\t\tjQuery(\"#\"+rutaInicial+\"modosDifusion option:selected\").each(\n\t\t\t\tfunction(i, modoDer){\n\t\t\t\t\tvar incluirModo = true;\n\t\t\t\t\t// comprobamos que ya no esté incluido\n\t\t\t\t\tjQuery(\"#\"+rutaInicial+\"modosDifusionIncluidos option\").each(function(j, modoIncl){\n\t\t\t\t\t\tif (jQuery(modoDer).val()==jQuery(modoIncl).val()){\n\t\t\t\t\t\t\tincluirModo = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tif (incluirModo){\n\t\t\t\t\t\tjQuery(\"#\"+rutaInicial+\"modosDifusionIncluidos\").append(jQuery(\"<option></option>\").val(jQuery(modoDer).val()).html(jQuery(modoDer).html()));\n\t\t\t\t\t}\n\t\t\t\t});\n\t});\n\n\tif (ambito != null && ambito != undefined){\n\t\tjQuery(\"#botonQuitarSistema_\" + ambito).click(function (){\n\t\t\tjQuery(\"#\"+rutaInicial+\"sistemasTransmisionIncluidos option:selected\").remove();\n\t\t});\n\t\tjQuery(\"#botonQuitarModo_\" + ambito).click(function (){\n\t\t\tjQuery(\"#\"+rutaInicial+\"modosDifusionIncluidos option:selected\").remove();\n\t\t});\n\t}else{\n\t\tjQuery(\"#botonQuitarSistema\").click(function (){\n\t\t\tjQuery(\"#\"+rutaInicial+\"sistemasTransmisionIncluidos option:selected\").remove();\n\t\t});\n\t\tjQuery(\"#botonQuitarModo\").click(function (){\n\t\t\tjQuery(\"#\"+rutaInicial+\"modosDifusionIncluidos option:selected\").remove();\n\t\t});\n\t}\n\t\n}", "title": "" }, { "docid": "65c86c049e495ef7ebb4e708073d432d", "score": "0.5634518", "text": "function mainMenu() {\n inquirer\n .prompt({\n name: \"action\",\n type: \"list\",\n message: \"What would you like to do?\",\n choices: [\n \"Add a new department\",\n \"Add a new role\",\n \"Add an employee\",\n \"View all departments\",\n \"View all roles\",\n \"View all employees\",\n \"Update an employee's role\",\n \"Exit\",\n ],\n })\n// switch board for user input\n .then((answer) => {\n switch (answer.action) {\n case \"Add a new department\":\n addNewDepartment();\n break;\n case \"Add a new role\":\n addNewRole();\n break;\n case \"Add an employee\":\n addEmployee();\n break;\n case \"View all departments\":\n viewDepartments();\n break;\n case \"View all roles\":\n viewAllRoles();\n break;\n case \"View all employees\":\n viewAllEmployees();\n break;\n case \"Update an employee's role\":\n updateEmployee();\n break;\n case \"Exit\":\n connection.end();\n break;\n }\n });\n\n }", "title": "" }, { "docid": "c2854e2bbedcd179bfcefc33f7319348", "score": "0.56317043", "text": "function managerMenu() {\n\tvar a = \"View Products for Sale\";\n\tvar b = \"View Low Inventory\";\n\tvar c = \"Add to Inventory\";\n\tvar d = \"Add New Product\"\n\tinquirer.prompt([\n\t {\n\t type: \"list\",\n\t name: \"choice\",\n\t message: \"What would you like to do?\",\n\t choices: [a, b, c, d]\n\t },\n\t]).then(function(input) {\n\t\t// route user's choice to respective functions\n\t\tswitch (input.choice) {\n\t\t\tcase a: \n\t\t\t\tviewProducts();\n\t\t\t\tbreak;\n\t\t\tcase b: \n\t\t\t\tviewLowInv();\n\t\t\t\tbreak;\n\t\t\tcase c: \n\t\t\t\taddToInv();\n\t\t\t\tbreak;\n\t\t\tcase d: \n\t\t\t\taddProduct();\n\t\t\t\tbreak;\n\t\t}\n\t});\n}", "title": "" }, { "docid": "0b1d8e8efffd7b287a8907f5fedeea22", "score": "0.5631231", "text": "function cerrarMenClick() {\n $('input[id$=-admin]').click(function () {\n $('#mensaje-admin').hide();\n })\n }", "title": "" }, { "docid": "531366800195767e92320473eda72749", "score": "0.56290174", "text": "function addtomenu(){\n //Estabilish connection\n estcon();\n // get values from form\n var vitem_code = document.getElementById(\"item_code\").value;\n var vname = document.getElementById(\"name\").value;\n var vprice = document.getElementById(\"price\").value;\n var vcat = document.getElementById(\"category\").value;\n var itementry = { item_code: vitem_code, name: vname, category: vcat, price: vprice };\n var q = connection.query('INSERT INTO menu SET ?', itementry, function(err,res){\n if(err) throw err;\n console.log('Last insert ID:', res.insertId);\n printtable();\n });\n return;\n}", "title": "" }, { "docid": "436ed8934f45cac4e222a45fbef68ade", "score": "0.5628513", "text": "function sousMenuProduits() {\n document.getElementById(\"produits\").style.display = \"block\"\n document.getElementById(\"Dashboard\").style.display = \"none\"\n document.getElementById(\"communautés\").style.display = \"none\"\n document.getElementById(\"actualité\").style.display = \"none\"\n document.getElementById(\"produit\").style.backgroundColor = \"#202020\"\n document.getElementById(\"membres\").style.display = \"none\"\n document.getElementById(\"membre\").style.backgroundColor = \"#111111\"\n document.getElementById(\"actuality\").style.backgroundColor = \"#111111\"\n document.getElementById(\"dashboard\").style.backgroundColor = \"#111111\"\n document.getElementById(\"comunity\").style.backgroundColor = \"#111111\"\n}", "title": "" }, { "docid": "ce271b003e303f482f52d8251b75edd3", "score": "0.56277096", "text": "function cargarInicio() {\r\n addcard(baseUrl + 'posts_fac&fac=' + localStorage.getItem('faculti'));\r\n loadMenu();\r\n}", "title": "" }, { "docid": "ac8e169a5e268876d237f0e1e8eeba42", "score": "0.56253934", "text": "function mostrar()\n {\n abrir_popup_espera();\n }", "title": "" }, { "docid": "322da85418bfae5ad66e755c5b9c26ac", "score": "0.5624527", "text": "function Iniciar() {\n \n sInputName = $(\"#sNombre\");\n BtGuardar = $(\"#BtAgregar\");\n BtModificar = $(\"#BtModificar\");\n sInputName.val(\"\");\n objMangoMensaje=MangoMensaje;\n objMangoMensaje.Iniciar(\"FormMensaje\")\n BtGuardar.click(Guardar);\n$.post(\"ajax/buscarTodoPermisos.php\",function(res){\n var resul = jQuery.parseJSON(res);\n\n for(i=0;i<resul[\"Tupla\"];i++ )\n $(\"#permiso\").append(\"<option selected value=\"+resul[\"Resultado\"][i][\"Nombre\"]+\">\"+resul[\"Resultado\"][i][\"Nombre\"]+\"<option>\");\n });\n\n $.post(\"ajax/buscarTodoGrupos.php\",function(res){\n var resul = jQuery.parseJSON(res);\n\n for(i=0;i<resul[\"Tupla\"];i++ )\n $(\"#grupo\").append(\"<option value=\"+resul[\"Resultado\"][i][\"Nombre\"]+\">\"+resul[\"Resultado\"][i][\"Nombre\"]+\"<option>\");\n });\n \n \n }", "title": "" }, { "docid": "cbf836b07b0701a90c88053bd0f17b61", "score": "0.5624519", "text": "function mostrarMenu(){\n if(this.optionGrupo.y == 0){\n var menuTween = Game.add.tween(this.optionGrupo).to({\n y: -60\n }, 500, Phaser.Easing.Bounce.Out, true);\n }\n if(this.optionGrupo.y == -60){\n var menuTween = Game.add.tween(this.optionGrupo).to({\n y: 0\n }, 500, Phaser.Easing.Bounce.Out, true);\n }\n }", "title": "" }, { "docid": "e8b919977e8593098e265e3c8a1676df", "score": "0.5624007", "text": "function empleado_agregar(formulario, accion){\n crud_empleado_maskara = new Ext.LoadMask(crud_empleado_formpanel.getEl(), {\n msg: 'Cargando...',\n removeMask: true\n });\n crud_empleado_maskara.show();\n setTimeout('crud_empleado_maskara.hide()', 500);\n var empleado_titulo_Panel = 'Nuevo empleado';\n Ext.getCmp('crud_empleado_formpanel').setTitle(empleado_titulo_Panel);\n crud_empleado_formpanel.getForm().reset();\n cargaEmpresa();\n Ext.getCmp('crud_empleado_guardar_boton').setText('Crear');\n}", "title": "" }, { "docid": "92f86e6ed0ad17dd895c839cc8615e48", "score": "0.56203574", "text": "function fnSp4SeguimientoAccionesCorrectivas()\n{\n //cerramos modal de menu\n closexMenuRolResponsableAsignado();\n // Redirecionamos a la pagina de Seguimiento de Acciones Correctivas\n handlerUrlhtml('contentGlobal','view/auditoria/seguimientoAC/seguimientoAC.html',' Seguimiento de Acciones Correctivas ');\n}", "title": "" }, { "docid": "ef5d70fdcdbaa151e50c43688c4e7379", "score": "0.56181085", "text": "function comienza(){\n\tjuego.comienzo();\n\t$(\"#puntajeI\").val(0);\n\t$(\"#tiradasI\").val(0);\n\t$(\"#aviso\").hide();\n\t$(\"#alerta\").hide();\n\t$(\"#alerta2\").hide();\n\t$(\"#recuadro2\").hide();\n\t}", "title": "" }, { "docid": "960343b6e88621a6549e408a83ad09b1", "score": "0.561802", "text": "function mostrar()\n{\n//tomo la edad \n\n\n}//FIN DE LA FUNCIÓN", "title": "" }, { "docid": "fc44495443ae1a73bc9553c27be06c03", "score": "0.5614713", "text": "function ocultarMenu(valor) {\n if(valor == \"acciones\"){\n document.getElementById(\"grafico\").style.display = \"none\"\n document.getElementById(\"acciones\").style.display = \"flex\"\n\n }else if (valor==\"grafico\") {\n document.getElementById(\"acciones\").style.display = \"none\"\n document.getElementById(\"grafico\").style.display = \"inline\"\n\n }\n}", "title": "" }, { "docid": "adb89669ac1cf328828d7fb4347132c4", "score": "0.56132936", "text": "function agregarOrdenes() {\n\n var codPersona = document.getElementById('txtCodPerDeOrdenGenerada').value;\n if (codPersona > 0) {\n var posFuncion = \"funcionesdePopad\";\n var vtitle = \"\";\n var vformname = 'GenerarOrden';\n var vwidth = '750';\n var vheight = '420';\n var patronModulo = 'PopadGenerarOrden';\n var vcenter = 't';\n var vresizable = '';\n var vmodal = 'true';\n var vstyle = '';\n var vopacity = '';\n var veffect = '';\n var vposx1 = '';\n var vposx2 = '';\n var vposy1 = '';\n var vposy2 = '';\n var parametros = '';\n parametros += 'p1=' + patronModulo;\n CargarVentanaPopPap(vformname, vtitle, vwidth, vheight, vcenter, vresizable, vmodal, vstyle, vopacity, vposx1, vposx2, vposy1, vposy2, parametros, posFuncion);\n\n\n } else\n {\n alert(\"SELECCIONE UNA PERSONA..\");\n }\n\n}", "title": "" } ]
166137af3c869d04aa107a88e2905239
Identifies the quantity expected to be consumed in a given day.
[ { "docid": "c70032b621745f194241fbd231ed143c", "score": "0.0", "text": "get dailyAmount() {\n\t\treturn this.__dailyAmount;\n\t}", "title": "" } ]
[ { "docid": "a46478641643b36dc58e4839d0664acf", "score": "0.6381308", "text": "sell(quantity, numDay) {\n if (quantity > this.quantity) {\n return 0\n }\n this.quantity -= quantity;\n var value = quantity * this.dailyValue(numDay);\n // update stage\n const sprite = this.sprites.pop();\n stage.removeSprite(sprite);\n\n //display stuff on change\n currentDogs -= quantity;\n display();\n return value;\n }", "title": "" }, { "docid": "d0be1caa8db0a2667525a8bafb0daf4e", "score": "0.60055965", "text": "static days(quantity) {\n return new Duration(quantity, Duration.Unit.DAYS);\n }", "title": "" }, { "docid": "fc0ef466120961b889bdce14211fea20", "score": "0.59028274", "text": "buy(quantity, numDay, currentMoney) {\n var value = quantity * this.dailyValue(numDay);\n if (value > currentMoney) {\n return 0;\n }\n this.quantity += quantity;\n // update stage\n const sprite = stage.createSprite(this.id);\n this.sprites.push(sprite);\n\n //display stuff on change\n currentDogs += quantity;\n display();\n return value;\n }", "title": "" }, { "docid": "7749224d0647f29068bd8e9edf324739", "score": "0.56588465", "text": "get days() {\n switch (this.unit) {\n case Duration.Unit.MILLISECONDS:\n return Math.round(this.quantity /\n Duration.MILLIS_IN_SECONDS /\n Duration.SECONDS_IN_MINUTE /\n Duration.MINUTES_IN_HOUR /\n Duration.HOURS_IN_DAY);\n case Duration.Unit.SECONDS:\n return Math.round(this.quantity / Duration.SECONDS_IN_MINUTE / Duration.MINUTES_IN_HOUR / Duration.HOURS_IN_DAY);\n case Duration.Unit.MINUTES:\n return Math.round(this.quantity / Duration.MINUTES_IN_HOUR / Duration.HOURS_IN_DAY);\n case Duration.Unit.HOURS:\n return Math.round(this.quantity / Duration.HOURS_IN_DAY);\n case Duration.Unit.DAYS:\n return this.quantity;\n case Duration.Unit.WEEKS:\n return this.quantity * Duration.DAYS_IN_WEEK;\n }\n }", "title": "" }, { "docid": "26e6001d490b0c05d1c5dcc2e2f3130e", "score": "0.5629268", "text": "function countItems(item, quantity) {\n itemCar.textContent = (numItems + 1) + \" items\";\n let encontrado = quantity.find(elementFood => elementFood.food == item.name);\n if(encontrado === undefined)\n {\n let event = {};\n event[\"food\"] = item.name;\n event[\"quantity\"] = 1;\n event[\"unitPrice\"] = item.price;\n event[\"amount\"] = item.price;\n quantity.push(event);\n } else {\n encontrado.quantity ++;\n encontrado.amount = encontrado.quantity * encontrado.unitPrice;\n }\n numItems = numItems + 1;\n}", "title": "" }, { "docid": "692ea5d23a0ac598285ea5d8c83d873a", "score": "0.54515326", "text": "function computeQuantity(event) {\n const { line_items: lineItems, refunds } = event;\n\n // Donations count as an item with no productId (productExists is false), filter that out\n const totalQuantity = lineItems\n .filter(({ product_exists: productExists }) => productExists !== false)\n .reduce((total, item) => total + item.quantity, 0);\n const refundQuantity = refunds.reduce((total, item) => total + item.quantity, 0);\n\n return totalQuantity - refundQuantity;\n}", "title": "" }, { "docid": "0475228df9a23158fce60e3385a20b52", "score": "0.5285317", "text": "function fooddaysum(date,etable,ftable){\r\n d = fmap[date];\r\n var name, amount, unit, nrv;\r\n\r\n amount = 0;\r\n nrv = 0;\r\n\r\n for (var id in d.water) {\r\n let item = d.water[id];\r\n if (item.unit == \"ml\") amount += item.amount;\r\n if (item.unit == \"l\") amount += item.amount * 1000;\r\n }\r\n nrv = amount / 20;\r\n if (\"水\" in etable) {\r\n // element already in table\r\n etable[\"水\"].amount += amount;\r\n etable[\"水\"].nrv += nrv;\r\n } else {\r\n // new element\r\n etable[\"水\"] = { \"amount\": amount, \"unit\": \"ml\", \"nrv\": nrv };\r\n }\r\n\r\n var food = d.food;\r\n for (var id in food) {\r\n if (food[id].name in emap) {\r\n let fooddata = emap[food[id].name];\r\n let r = food[id].amount / fooddata.amount;\r\n for (var e in fooddata.element) {\r\n let item = new Object();\r\n item.amount = parseFloat(fooddata.element[e].amount) * r;\r\n //console.log(fooddata.element[e].unit);\r\n item.unit = fooddata.element[e].unit.toLowerCase();\r\n item.nrv = parseFloat(fooddata.element[e].nrv) * r;\r\n\r\n if (item.unit == \"mg\") {\r\n item.unit = \"g\";\r\n item.amount = item.amount / 1000;\r\n }\r\n if ((item.unit == \"µg\") || (item.unit == \"μg\")) {\r\n item.unit = \"g\";\r\n item.amount = item.amount / 1000000;\r\n }\r\n if (item.unit == \"kj\") {\r\n item.unit = \"kcal\";\r\n item.amount = item.amount * 0.239;\r\n }\r\n\r\n if (e in etable) {\r\n // element already in table\r\n etable[e].amount += item.amount;\r\n etable[e].nrv += item.nrv;\r\n } else {\r\n // new element\r\n etable[e] = item;\r\n }\r\n \r\n // detail data\r\n if(typeof Keyelement !== \"undefined\" && Keyelement !== null)\r\n {\r\n if(e==Keyelement){\r\n var data = new Object();\r\n data[\"名称\"] = food[id].name ;\r\n data[\"摄入数量\"] = food[id].amount+food[id].unit ;\r\n data[\"含有\"+Keyelement] = item.amount.toFixed(3)+item.unit ;\r\n data[\"累计摄入\"] = etable[e].amount.toFixed(3)+item.unit ;\r\n data[\"累计nrv\"] = etable[e].nrv.toFixed(2)+\"%\" ;\r\n \r\n Detailtable[keycnt++] = data ;\r\n };\r\n };\r\n\r\n // testlog: element detail\r\n /*var nametab = \"\\t\\t\\t\"\r\n if (food[id].name.replace(/[^\\x00-\\xff]/g, '**').length >= 8) {\r\n nametab = \"\\t\\t\";\r\n }\r\n if (food[id].name.replace(/[^\\x00-\\xff]/g, '**').length >= 16) {\r\n nametab = \"\\t\";\r\n } */\r\n //if(e==\"膳食纤维\") console.log(food[id].amount+food[id].unit+\"\\t\"+food[id].name+nametab+\"含有\"+item.amount.toFixed(2)+item.unit+\"\\t累计摄入:\"+etable[e].amount.toFixed(2)+item.unit+\"\\t累计nrv:\"+etable[e].nrv.toFixed(2)+\"%\");\r\n }\r\n delete food[id];\r\n } else {\r\n //newfood.push(item);\r\n }\r\n }\r\n\r\n for (var id in food) {\r\n if(food[id].name in ftable){\r\n ftable[food[id].name].amount += food[id].amount;\r\n }else{\r\n ftable[food[id].name] = food[id];\r\n }\r\n }\r\n\r\n var med = d.med;\r\n\r\n for(var id in med){\r\n if (med[id].name in emap) {//known med\r\n let meddata = emap[med[id].name];\r\n let r = med[id].amount / meddata.amount; // 此处单位不能换算,无比人工写成相同。\r\n for (var e in meddata.element) {\r\n let item = new Object();\r\n item.amount = parseFloat(meddata.element[e].amount) * r;\r\n //console.log(meddata.element[e].unit);\r\n item.unit = meddata.element[e].unit.toLowerCase();\r\n item.nrv = parseFloat(meddata.element[e].nrv) * r;\r\n\r\n if (item.unit == \"mg\") {\r\n item.unit = \"g\";\r\n item.amount = item.amount / 1000;\r\n }\r\n if ((item.unit == \"µg\") || (item.unit == \"μg\")) {\r\n item.unit = \"g\";\r\n item.amount = item.amount / 1000000;\r\n }\r\n if (item.unit == \"kj\") {\r\n item.unit = \"kcal\";\r\n item.amount = item.amount * 0.239;\r\n }\r\n\r\n if (e in etable) {\r\n // element already in table\r\n etable[e].amount += item.amount;\r\n etable[e].nrv += item.nrv;\r\n } else {\r\n // new element\r\n etable[e] = item;\r\n }\r\n // detail data\r\n if(typeof Keyelement !== \"undefined\" && Keyelement !== null)\r\n {\r\n if(e==Keyelement){\r\n var data = new Object();\r\n data[\"名称\"] = med[id].name ;\r\n data[\"摄入数量\"] = med[id].amount+med[id].unit ;\r\n data[\"含有\"+Keyelement] = item.amount.toFixed(3)+item.unit ;\r\n data[\"累计摄入\"] = etable[e].amount.toFixed(3)+item.unit ;\r\n data[\"累计nrv\"] = etable[e].nrv.toFixed(2)+\"%\" ;\r\n\r\n Detailtable[keycnt++] = data ;\r\n };\r\n };\r\n //if(e==\"VC(抗坏血酸)\") console.log(med[id].amount+med[id].unit+\"的\"+med[id].name+\"\\t含有\"+item.amount.toFixed(10)+item.unit+\"。\\t累计摄入:\"+etable[e].amount.toFixed(10)+\"\\t累计nrv:\"+etable[e].nrv.toFixed(2));\r\n }\r\n \r\n delete med[id];\r\n }else{//unknown med\r\n //console.log(\"unknown med:\"+med[id].name+\"\\t\"+med[id].amount+\"\\t\"+med[id].unit);\r\n if(med[id].name in ftable){\r\n ftable[med[id].name].amount += med[id].amount;\r\n }else{\r\n ftable[med[id].name] = med[id];\r\n }\r\n //console.log(\"ftable:\"+ftable[med[id].name].name+\"\\t\"+ftable[med[id].name].amount+\"\\t\"+ftable[med[id].name].unit);\r\n }\r\n }\r\n\r\n}", "title": "" }, { "docid": "6362795813c4edef92c7cbe9deb9f1b4", "score": "0.52483815", "text": "function hotelCost(day) {\n var consumption=0\n if (day<=10) {\n consumption = day*100\n \n } else if(day<=20) {\n var firstTenDays = 10*100\n var remainingDay = day-10\n var secondTenDays = remainingDay*80\n consumption =firstTenDays+secondTenDays\n \n \n }else{\n var firstTenDays = 10*100\n var secondTenDays = 10*80\n var remainingDay = day-20\n var lastDaysBill = remainingDay*50\n consumption = firstTenDays+secondTenDays+lastDaysBill\n \n \n }\n return consumption;\n \n }", "title": "" }, { "docid": "23566712d6c6f48e8f3a3182d4ddeb47", "score": "0.52455944", "text": "dailyValue(numDay) {\n return this.values[numDay];\n }", "title": "" }, { "docid": "94851fe9393e501ce5eb8697d727f149", "score": "0.5227433", "text": "function validateQuantity(id, quantity) {\n for (var i = 0; i < products.length; i++) {\n if (products[i].item_id === id) {\n if (products[i].stock_quantity >= quantity) {\n var newStock = products[i].stock_quantity - quantity;\n var price = products[i].price;\n var name = products[i].product_name;\n updateProduct(id, newStock, quantity, price, name);\n } else {\n console.log(colors.bold(colors.red(\"Sorry, there is not enough stock for your order!\")));\n buyAgain();\n }\n }\n }\n}", "title": "" }, { "docid": "704cd151222983c14c78f31b5ab78879", "score": "0.51511985", "text": "quantity(product) {\n // implement me\n }", "title": "" }, { "docid": "92642b1f6263c0667f169dc5d1a25952", "score": "0.51376283", "text": "function addQuantity() {\n if (stock - quantity < 1) {\n alert('Out of Stock');\n return;\n }\n dispatch(increaseProduct({ product, products }));\n }", "title": "" }, { "docid": "bfa2e0cd0563baf957c2888be59520cf", "score": "0.51219225", "text": "getForDay(day) {\n\t\tlet today=day?new Date(day.getTime()):new Date();\n\t\ttoday.setUTCHours(0, 0, 0, 0);\n\t\tlet tomorrow=new Date(today.getTime()+dates.oneDay);\n\t\treturn this.ics.getForDate(today, tomorrow);\n\t}", "title": "" }, { "docid": "b026cf1398abd84aece6a5bea04e4f8e", "score": "0.5121866", "text": "function claim(day) {\n eos_sale.claim(day, {\n gas: 90000,\n }, hopefully(result => ping(result).then(() => {\n //nothing to do...\n })))\n}", "title": "" }, { "docid": "1d0a2d8123eb3a40b5b18fa78c4362f5", "score": "0.509686", "text": "function mealsPerDay(perDiemRate){\n\treturn perDiemRate - 5;\n}", "title": "" }, { "docid": "35b7e6d0bf5fae8abee8da61585e8b69", "score": "0.5092638", "text": "function checkReserved(dayNum){\n\n for(let i = 0;i < reservedTimeSlots.length;i++){\n //the slot for this date is reserved\n if(reservedTimeSlots[i].day===dayNum){\n reservedTimeSlots[i].duration -=1;\n if (reservedTimeSlots[i].duration === 0) reservedTimeSlots.splice(i,1); //if the reservation is use remove it\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "806bd575492100d34db606fcc2fd88c1", "score": "0.5087211", "text": "calculate(){\n\t\tconst today = DateTime.now().startOf('day');\n\t\tif(today.day === 25 && today.month === 12){\n\t\t\t// it's Christmas!\n\t\t\tconsole.log(\"No more sleeps — it's Christmas 😀🎄🎁\")\n\t\t}else if(today.day === 24 && today.month === 12){\n\t\t\t// it's Christmas Eve!\n\t\t\tconsole.log(`Nearly there, just one more sleep till Christmas ${this.christmasIcon}!!!`);\n\t\t}else{\n\t\t\tlet xmas = DateTime.fromObject({ day: 25, month: 12, year: today.year });\n\t\t\tif(today > xmas) xmas = xmas.plus({ year: 1 });\n\t\t\tconst numDays = Math.abs(today.diff(xmas, 'days').as('days'));\n\t\t\tconsole.log(`${numDays} sleeps ${this.sleepIcon} till Christmas ${this.christmasIcon}`);\n\t\t}\n\t}", "title": "" }, { "docid": "97b4efa466c847622faca877faa327bb", "score": "0.50737995", "text": "getConsumption() {\n return this.consumption.simulateDaily()\n }", "title": "" }, { "docid": "5903bfbd78b63d3fa010ad1a7339a7ea", "score": "0.506117", "text": "function quantitySearch(userSelection, quantity) {\n debugger;\n connection.query(\"SELECT stock_quantity FROM products WHERE product_name = '\" + userSelection + \"'\", function(err, res) {\n if (err) throw err;\n var userQuantity = parseInt(quantity);\n var productQuantity = parseInt(res[0].stock_quantity);\n\n if(userQuantity < productQuantity){\n var remainder = productQuantity - userQuantity;\n // console.log(remainder);\n update(userSelection,remainder, userQuantity)\n }else{\n console.log(\"Insufficient quantity!\");\n connection.end();\n }\n });\n }", "title": "" }, { "docid": "9d5d257dd14ebae470df2b5d737bf231", "score": "0.50444794", "text": "function getDay(i){\n let x=new Date(today);\n x.setDate(today.getDate()+i);\n return x.getDate();\n }", "title": "" }, { "docid": "1cf36960f78f86a56cb0600ba11fae90", "score": "0.5034677", "text": "function checkQty(id,qty,product,price,available){\n var canBuy = false;\n var remaining = parseInt(available) - parseInt(qty)\n if (remaining >=0){\n canBuy = true;\n console.log(`You are in great luck! There are enough available for your order\\n`);\n console.log(`You are buying ${qty} of ${product} for a total price of $${qty*price}\\n`);\n connection.query(`UPDATE products SET stock_quantity = '${remaining}' WHERE item_id='${id}';`, function(err, res) {\n if (err) throw err;\n });\n } else {\n console.log('Sorry, we do not have enough in stock to fulfill your order');\n }\n connection.end();\n }", "title": "" }, { "docid": "f5d92502f012cd1272178229bb6533ed", "score": "0.5027616", "text": "function calculateSupply(age, amountPerDay) {\n const maxAge = 100;\n console.log('You will need ' + (maxAge - age) * amountPerDay + ' to last you until the ripe old age of ' + maxAge);\n}", "title": "" }, { "docid": "af57293bb7f8b96b252e4313ace25ca1", "score": "0.50273114", "text": "function hotelCost(day){\n const firstDurationPrice = 100;\n const secondDurationPrice = 80;\n const thirdDurationPrice = 50;\n let totalCost = \"\";\n if(0 < day && Number(day) === day && day % 1 === 0){\n if(day <= 10){\n totalCost = 100 * day;\n }else if(day <= 20){\n let getSecondDuration = day - 10;\n let firstDurationCost = 100 * 10;\n let secondDurationCost = 80 * getSecondDuration;\n totalCost = firstDurationCost + secondDurationCost;\n }else{\n let getThirdDuration = day - 20;\n\n let firstDurationCost = 100 * 10;\n let secondDurationCost = 80 * 10;\n let thirdDurationCost = 50 * getThirdDuration;\n \n totalCost = firstDurationCost + secondDurationCost + thirdDurationCost;\n }\n return totalCost; //output\n }else{\n return \"Invalid day\"; //output \n }\n }", "title": "" }, { "docid": "c18382ceb63845143be0e86c74d4a968", "score": "0.5023911", "text": "function calculateSupply(age, amountPerDay) {\n const maxAge = 70;\n var forRestOf = ((maxAge - age) * 365) * amountPerDay;\n console.log('You will need ' + forRestOf + ' to last you until the ripe old age of ' + maxAge + '.');\n}", "title": "" }, { "docid": "033253f2138e3d241ef4d3c4753013e2", "score": "0.5009165", "text": "CalcOverduePrice(dateD, price, dateP) {\n let dateOverdue = new Date(this.today.getFullYear(), this.today.getMonth(), this.today.getDate()).getTime();\n let dateDropOff = new Date(dateD).getTime();\n let days = Math.ceil((dateOverdue - dateDropOff) / (1000 * 60 * 60 * 24));\n if (dateDropOff >= dateOverdue) {\n return 0;\n }\n else {\n return days * price;\n }\n }", "title": "" }, { "docid": "f73132e263a29a4a608bfc8f29ce3f61", "score": "0.5004233", "text": "function amountCheck(productName, quantity) {\n let query = 'SELECT stock_quantity FROM products WHERE product_name = ?';\n connection.query(query, productName, function(err, res) {\n let stock = res[0].stock_quantity;\n if (quantity <= stock) {\n fulfillOrder(productName, quantity, stock);\n } else {\n console.log(`\\nSorry, not enough ${productName} in stock. We only have ${stock}.\\n`);\n amountInquire(productName);\n }\n });\n}", "title": "" }, { "docid": "2fc671ea8af95c6dd89808196c1549e2", "score": "0.49901527", "text": "endTheDay(state, date) {\n const items = state.products;\n let sortedProducts = [];\n for (let a of items) {\n if (a.date == date) {\n sortedProducts.push(a);\n }\n }\n console.log(\"sorted products from mutations says: \", sortedProducts);\n\n const total = sortedProducts.reduce(\n (acc, item) => (acc += +item.prodprice),\n 0\n );\n Vue.set(state.dailyProductSum, date, total);\n console.log(\"state.dailyProductSum: \", state.dailyProductSum);\n }", "title": "" }, { "docid": "8179baecabd1f895d149ae81693efac4", "score": "0.4988232", "text": "function quantityAmount(product) {\n inquirer\n .prompt([\n {\n type: \"input\",\n name: \"quantity\",\n message: \"How many would you like? [Quit with Q]\",\n validate: function(val) {\n return val > 0 || val.toLowerCase() === \"q\";\n }\n }\n ])\n .then(function(val) {\n var quantity = parseInt(val.quantity);\n\n //check the quantity again to see if it's sold out if not make the purchase\n if (quantity > product.stock_quantity) {\n console.log(\"\\nOpps Sold Out!\");\n loadProducts();\n }\n else {\n purchaseItem(product, quantity);\n }\n });\n}", "title": "" }, { "docid": "9a6f3031776e6c9d20c23f55da1a6184", "score": "0.49785185", "text": "function checkQuantity(item, productName, price, department, quantity, amount) {\n\n console.log(\"\\nWe have \" + quantity + \" left of \" + productName);\n\n ifOrder(item, productName, price, department, quantity, amount);\n}", "title": "" }, { "docid": "8f63860f5848796b0745984e96bc6341", "score": "0.4976921", "text": "get qty() {return $items.itemPossed[this._id] || 0 }", "title": "" }, { "docid": "5517f4b81329087606cd980d32afb55e", "score": "0.49644598", "text": "function checkQuantity(id, userReqQty) {\n connection.query('SELECT * FROM products WHERE item_id =' + id, function (error, results) {\n var res = results[0];\n if (error) throw error;\n if (userReqQty > res.stock_quantity || userReqQty < 0) {\n console.log(`We're so sorry but there are ${res.stock_quantity} ${res.product_name} available please revise your quantity...`);\n queryAllProducts();\n } else {\n\n var newQuantity = res.stock_quantity - userReqQty;\n updateInventory(id, userReqQty, newQuantity, res.price, res.product_name);\n }\n });\n}", "title": "" }, { "docid": "fb4f28edfe2a205542e0da2aad77a22b", "score": "0.49584362", "text": "getProductQuantity(productId) {\n const products = this.products;\n if (products[productId]) {\n return products[productId].quantity;\n }\n return false;\n }", "title": "" }, { "docid": "d8408e658e904c772fd00b22abc81fb6", "score": "0.49578726", "text": "CalcOverduePrice(dateD, price, dateP) {\n let dateOverdue = new Date(this.today.getFullYear(), this.today.getMonth(), this.today.getDate()).getTime();\n let dateDropOff = new Date(dateD).getTime();\n let days = Math.ceil((dateOverdue - dateDropOff) / (1000 * 60 * 60 * 24));\n let datePicup = new Date(dateP).getTime();\n if (dateDropOff >= dateOverdue)\n return 0;\n else\n return days * price;\n }", "title": "" }, { "docid": "e20579ed886680aede7b0ddafdd0ad01", "score": "0.49578667", "text": "function quantityChanged(event) {\n let input = event.target;\n if (isNaN(input.value) || input.value <= 0) input.value = 1;\n updateTotalCart();\n}", "title": "" }, { "docid": "01bfc1c0a9f3a0ad495268a526a78a4b", "score": "0.49466673", "text": "function checkQuantity(userQuantity, itemId) {\n connection.query(\"SELECT stock_quantity, price, department_id FROM products WHERE item_id = ?\", itemId, (err, row) => {\n//if more available than print appropriate message. \n if (error) throw error;\n var productQuantity = row[0].stock_quantity;\n var price = row[0].price;\n var depId = row[0].department_id;\n if (productQuantity < userQuantity) {\n console.log('Insufficient quantity!');\n showQuestions();\n//else run functions which updating product quantity and product sales in department table. \n } else {\n var total = price * userQuantity;\n console.log('Total for this transaction is: ' + total + \"$\");\n updateQuantity(itemId, productQuantity - userQuantity);\n updateItemSales(itemId, total);\n updateDepartmentSales(depId, total);\n };\n });\n}", "title": "" }, { "docid": "5203e08d4f96a9e809e1fa03df584762", "score": "0.49441853", "text": "function hotelCost(day){\n var totalCost = 0;\n if(day < 0){\n console.log('invalid input');\n return -1;\n }\n else if(day <= 10){\n totalCost = day * 100;\n return totalCost;\n }\n else if(day <= 20){\n var firstTenDays = 10 * 100;\n var remainingDays = day - 10;\n var secondTenDays = remainingDays * 80;\n totalCost = firstTenDays + secondTenDays;\n return totalCost;\n }\n else{\n var firstTenDays = 10 * 100;\n var secondTenDays = 10 * 80;\n var remainingDays = day - 20;\n var restOfDays = remainingDays * 50;\n totalCost = firstTenDays + secondTenDays + restOfDays;\n return totalCost;\n }\n}", "title": "" }, { "docid": "2fb14bd83a07b7a86d9f04fa51b6f1df", "score": "0.49375015", "text": "function fooddaylog(date) {\r\n if (fmap[date] === undefined)\r\n return; // have not record of today or yestoday yet\r\n\r\n fooddaysum(date,etable,ftable);\r\n daycnt++;\r\n}", "title": "" }, { "docid": "e046c73d34d7bb473411d09ad15bcdf4", "score": "0.49266183", "text": "function checkQuant(id, qty, array){\r\n\tmysql.query('select * from products where item_id=?', id, function(error, res, fields){\r\n\t\tif (error) throw error;\r\n\r\n\t\tvar remainingQty = res[0].stock_quantity - qty;\r\n\t\tvar priceItem = res[0].price;\r\n\t\t//var departmentID = res[0].department_id\r\n\t\tvar productID = id\r\n\t\t//are there any more of that item in stock?\r\n\t\tif (remainingQty < 0){\r\n\t\t\tconsole.log(\"That item is sold out!\")\r\n\t\t\tcustomerBuy(array);\r\n\t\t}else{\r\n\t\t\t//if passes, move to do math\r\n\t\t\tvar totalPrice = priceItem*qty;\r\n\t\t\tupdateSale(productID,totalPrice);\r\n\t\t\tcompleteOrder(productID, remainingQty, totalPrice)\r\n\t\t}\r\n\t})\r\n}", "title": "" }, { "docid": "0b8d1ecef9764eac0c39e769b0161eee", "score": "0.4906396", "text": "function calculateSupply (age, amountPerDay) {\n \n let _NN = parseInt((90 - age) * 365 * amountPerDay);\n\n return \"You will need \" + _NN + \" to last you until the ripe old age of 90\";\n\n}", "title": "" }, { "docid": "3a08b7b756c595c1f328fde489964598", "score": "0.49021962", "text": "function calcSupply(age, amountPerDay) {\n const maxAge = 80;\n let amount = (maxAge - age) * 365 * Math.round(amountPerDay);\n return `You will need ${amount} of your favorite snacks (${amountPerDay} a day) to last you till the age of ${maxAge}`;\n}", "title": "" }, { "docid": "ea96ee128b0d4101d9aa2c6a8fdd334f", "score": "0.48950213", "text": "function getQuantity(id, totalPurchased) {\n // throws an error if an invalid product id is entered\n totalItems(id);\n\n // query to find the total amount of something in stock\n var query = \"SELECT stock_quantity FROM products WHERE ?\";\n connection.query(\n query,\n // object below replaces the ? in var query. It searches the item_id column of the specified product ID.\n {\n item_id: id\n },\n function(err, res) {\n if (err) throw err;\n\n // updates inventory with the new total after purchase\n updateInventory(id, res[0].stock_quantity, totalPurchased);\n }\n );\n}", "title": "" }, { "docid": "58efd4f22f30cb5d0119f2f56539bf35", "score": "0.48911735", "text": "changeQuantity(event){\n if(event.target.value >= 0){\n this._quantity = parseInt(event.target.value, 10);\n }\n else{\n return;\n }\n\n const detail = {\n productId: this.productId,\n quantity: this._quantity\n };\n\n const changeProductQuantityEvent = new CustomEvent('changeproductquantityevent', {\n detail: detail,\n bubbles: false,\n composed: false\n });\n this.dispatchEvent(changeProductQuantityEvent);\n }", "title": "" }, { "docid": "94aed642fef99554d87bce56f91a0413", "score": "0.48905388", "text": "function upDate(item, productName, price, department, quantity, newQuant, amount) {\n console.log(\"\\nUpdating inventory...\")\n connection.connect(function(err) {\n\n var lessQuant = quantity - amount\n var id = item\n\n var sql = \"UPDATE products SET stock_quantity =\" + lessQuant.toString() + \" WHERE ?\";\n\n connection.query(sql, { id: id }, function(err, result) {\n if (err) throw err;\n console.log(\"\\nRecord(s) updated.\");\n });\n });\n}", "title": "" }, { "docid": "5379f42fb764b3a7baee0e8d635f07c8", "score": "0.48839024", "text": "function hotelCost(day) {\n\n\n money=0;\n \n if (day<=100){\n \n money=day * 100;\n }\n else if(day<=80){\n \n var firstTenDays=10*100;\n var remainingDay=day - 20;\n var nextTenDays=remainingDay * 80;\n money=firstTenDays + nextTenDays;\n }\n else{\n var remainingDay=10*100;\n var nextTenDays=10 * 80;\n var remainingDay=nextTenDays - 30;\n var thirdPart = remainingDay * 230;\n money=firstTenDays + nextTenDays + thirdPart;\n }\n return money;\n}", "title": "" }, { "docid": "ff139f8b9102f2bc8c19102f1c6f3f94", "score": "0.48802888", "text": "function checkAndUpdateInventory(product, quantity, callback) {\n \n connection.query(\n \"UPDATE products SET stock_quantity = ? WHERE item_id = ?\",\n [product.stock_quantity - quantity, product.item_id],\n function(err, res) {\n // Let the user know the purchase was successful, re-run loadProducts\n console.log(\"\\nSuccessfully purchased \" + quantity + \" \" + product.product_name + \"'s!\");\n console.log(\"Total Cost is: \" + (quantity*product.price).toFixed(2) + \" dollars\");\n \n loadProducts();\n //})\n });\n }", "title": "" }, { "docid": "76c596e195a3725d67af314b0fff9b3c", "score": "0.48752087", "text": "function calculateSupply(age, amountPerDay) {\n var maxAge = 75;\n var amount = (maxAge - age) * amountPerDay * 365;\n var message = \"You will need S\" + amount + \" to last you until the ripe old age of \" + maxAge;\n return message;\n}", "title": "" }, { "docid": "eeb0548735d3b50a879689fc876141f9", "score": "0.48737717", "text": "function shopperSelectQty(product) {\n inquirer\n .prompt([\n {\n type: \"input\",\n name: \"quantity\",\n message: \"Enter quantity to purchase. Press q to end shopping.\",\n validate: function(val) {\n return val > 0 || val.toLowerCase() === \"q\";\n }\n }\n ])\n .then(function(val) {\n // Send to function which validates if user enters q to finish shopping\n finishShopping(val.quantity);\n var quantity = parseInt(val.quantity);\n\n // Start over if the product inventory is less than the desired quantity. Start over.\n if (quantity > product.stock_quantity) {\n console.log(\"\\nSorry - your last request exceeds our inventory. \\n\\n\\n\\n\");\n listInventory();\n }\n else {\n // If quantity is okay, send to function to decrement inventory.\n decreaseInventory(product, quantity);\n }\n });\n}", "title": "" }, { "docid": "6eb4624e7367d57b55bd8ba81d583d49", "score": "0.48647714", "text": "function marketplace(product, dayOfWeek) {\n if (product == \"Banana\")\n if (dayOfWeek == \"Weekday\")\n console.log(\"2.50\");\n else\n console.log(\"2.70\");\n else if (product == \"Apple\")\n if (dayOfWeek == \"Weekday\")\n console.log(\"1.30\");\n else\n console.log(\"1.60\");\n // TODO: the same logic for \"kiwi\"\n \n}", "title": "" }, { "docid": "80218db9b7a301e83982d8f07541e059", "score": "0.4856621", "text": "function getTotalDemandSupply(date_id)\r\n{\r\n\tvar total_demands\t= 0;\r\n\tvar total_supplies\t= 0;\r\n\t\r\n\tfor(var demand_id in demands_supplies)//for each demand\r\n\t{\r\n\t\tvar tmp_demand = 0; //demand for this week\r\n\t\tvar tmp_supply = 0; //allocation under this demand for the week\r\n\t\t\r\n\t\t//get demand value from flat data model\r\n\t\tvar a_demand_value = flat_data_model[demand_id][date_id];\r\n\t\tif(a_demand_value != undefined && a_demand_value != null)\r\n\t\t\ttry{ tmp_demand += Number(a_demand_value);} catch(err){}\r\n\t\t\r\n\t\t//go get all the supply values for the week\r\n\t\tvar a_demand = demands_supplies[demand_id];\r\n\t\tvar supplies = a_demand[\"Supplies\"];\r\n\t\tif(supplies != undefined && supplies != null)\r\n\t\t{\r\n\t\t\tfor(var supply_id in supplies) //for each supply under this demand\r\n\t\t\t{\r\n\t\t\t\tvar a_supply_value\t= flat_data_model[supply_id][date_id];\r\n\t\t\t\t\r\n\t\t\t\tif(a_supply_value != undefined && a_supply_value != null)\r\n\t\t\t\t\ttry{ tmp_supply += Number(a_supply_value);} catch(err){}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(tmp_supply > tmp_demand) tmp_supply = tmp_demand; //cannot over supply\r\n\t\t\r\n\t\t//append total demand and allocation for this week\r\n\t\ttotal_demands += tmp_demand;\r\n\t\ttotal_supplies+= tmp_supply;\r\n\t}\r\n\t\r\n\treturn {\"DEMAND\": total_demands, \"SUPPLY\": total_supplies};\r\n}", "title": "" }, { "docid": "5753e815e8fd0851be2e5ab2cbf65c5d", "score": "0.48470438", "text": "get doseQuantity() {\n\t\treturn this.__doseQuantity;\n\t}", "title": "" }, { "docid": "0cb85b60caed3198c1469b3d3927f9bf", "score": "0.48295063", "text": "function calculateCaloriesToday(){\n totalCaloriesToday = 0;\n for(var i = 0; i < foodEatenDatabase.foodsEaten.length; i++){\n if(foodEatenDatabase.foodsEaten[i].date.getDate() === new Date().getDate()){\n totalCaloriesToday += foodEatenDatabase.foodsEaten[i].foodCalories;\n }\n }\n \n return totalCaloriesToday; \n }", "title": "" }, { "docid": "68fca1307d8123caa0cb10be68b7a965", "score": "0.4823809", "text": "function quantityChanged(event) {\n let input = event.target;\n if (isNaN(input.value) || input.value <= 0) {\n input.value = 1;\n }\n updateCartTotal();\n}", "title": "" }, { "docid": "dc26a1b3299d6a346707ff130853b615", "score": "0.4817115", "text": "function itemQuery(){\n connection.query(\n 'select stock_quantity, price from products where item_id = ?', [productId], function(err,results){\n //resulting qty from db\n qtyCheck = results[0].stock_quantity;\n //stores price from query to be used with the total calc\n price = results[0].price \n if(qtyCheck < reduceQty){\n console.log('Insufficient Quantity!');\n connection.end();\n } else {\n updateQty();\n completeOrder(price, reduceQty) \n }\n }\n )\n }", "title": "" }, { "docid": "0eb4329dbe4f064a633db1157ab4e144", "score": "0.48127452", "text": "function recalTotalD(quantity) {\n let total = 0;\n quantity.forEach(element => {\n total -= (-element.amount);\n });\n return total;\n}", "title": "" }, { "docid": "51b78748be851d9d160a8f2d733d8443", "score": "0.47973412", "text": "function getExpectedDaily(name, date) {\n // Draw a line segment between the previous and next existing times\n // First find when/what they are\n let pre = new Date(date);\n while (!data[name].daily[pre.getHours()] ||\n isNaN(data[name].daily[pre.getHours()][pre.getMinutes()]))\n pre.setMinutes(pre.getMinutes() - 1);\n let preVal = data[name].daily[pre.getHours()][pre.getMinutes()];\n // Offset one of the times by 1ms, so we don't accidentally divide by 0\n // On a scale where 1 minute is the basic \"small unit\", 1ms won't\n // make a meaningful difference. Also if the pre time happens to be exact\n // with the given date, post will be effectively ignored regardless.\n let post = new Date(date + 1);\n while (!data[name].daily[post.getHours()] ||\n isNaN(data[name].daily[post.getHours()][post.getMinutes()]))\n post.setMinutes(post.getMinutes() + 1);\n let postVal = data[name].daily[post.getHours()][post.getMinutes()];\n // Find the expected value for the time\n // Rise is post value - pre value\n // Run is post time - pre time\n // Position is now - pre time\n // Initial is pre value\n return (postVal - preVal) / (post - pre) * (date - pre) + preVal;\n}", "title": "" }, { "docid": "e87ae67e34c6928f0208826ab740769f", "score": "0.47966772", "text": "function quantityChanged(e) {\r\n let target = e.target;\r\n if (isNaN(target.value) || target.value <= 0) {\r\n target.value = 1;\r\n }\r\n updateCartTotal();\r\n}", "title": "" }, { "docid": "b7728c530d27e666c3f0012150f3fca3", "score": "0.47959018", "text": "function hotelCost(day) {\n var amount = 0;\n //invalid\n if (day < 0) {\n return \"Day can't be negative, SIR!\"\n }\n else if (day <= 10 && day >= 0) {\n amount = Math.ceil(day) * 100;\n return amount;\n }\n else if (day <= 20 && day > 10) {\n amount = 10 * 100;///10\n var reminder = Math.ceil(day - 10) * 80;///<20\n amount += reminder;\n return amount;\n }\n else if (day > 20) {\n amount = 10 * 100;///10\n amount += (10 * 80);///another 10 , <20\n var reminder = Math.ceil(day - 20) * 50;//greater than 20;\n amount += reminder;\n return amount;\n\n }\n}", "title": "" }, { "docid": "51f144187972cc37674f7e41046e59cd", "score": "0.4789488", "text": "function checkAvailibilty(product, quantity){\n \n connection.query(\"SELECT stock_quantity, price FROM products WHERE product_name=?\", [product], function (err, res) {\n if (err) throw err;\n let itemsLeft = res[0].stock_quantity;\n let itemPrice = res[0].price;\n let totaleSale = itemPrice * quantity\n if (itemsLeft - quantity > 0) {\n console.log(\"You just bought \" + quantity + \" \" + product + \"s for $\" + totaleSale);\n updateDB(itemsLeft - quantity, product);\n } else {\n console.log(\"!!!!Insufficient quantity!!!!\");\n }\n });\n}", "title": "" }, { "docid": "9976c213ce85da4594064de787806bfa", "score": "0.47811675", "text": "function restock()\n{\n var length = items.length;\n for(i=0;i<length;i++)\n {\n if (items[i].quantity<10)\n {\n var itemsNeeded = -items[i].quantity + 10;\n console.log(items[i].name+\" needed to restocked\\n\"+\"ID : \"+items[i].id+\n \"\\nItem Name : \"+items[i].name+\"\\nItems needed to full the stock : \"+itemsNeeded);\n }\n else\n {\n console.log(items[i].name+\" is full in stock\");\n }\n }\n}", "title": "" }, { "docid": "49e4e508d58670ddbc11f307b21eb6ee", "score": "0.47794786", "text": "updateQuantity(product, quantity) {\n let item = this.lines.find((lines) => lines.product.id === product.id);\n if (item !== undefined) {\n item.quantity = quantity;\n }\n this.recalculate();\n }", "title": "" }, { "docid": "592341fbc2756345866376454bee66a3", "score": "0.47786576", "text": "function hotelCost(day){\n var cost = 0\n if(day < 0 || typeof day !== 'number'){\n return 'Invalid Number';\n }\n else{\n if(day <= 10){\n cost = day * 100;\n }\n else if(day <= 20){\n var firstTenDays = 10 * 100;\n var remainingDays = day - 10;\n var afterTendays = remainingDays * 80;\n cost = firstTenDays + afterTendays;\n }\n else{\n var firstTenDays = 10 * 100;\n var secondTenDays = 10 * 80;\n var remainingDays = day - 20;\n var afterTwentyDays = remainingDays * 50;\n cost = firstTenDays + secondTenDays +afterTwentyDays;\n }\n return cost;\n }\n}", "title": "" }, { "docid": "f6066bad5dda3b26e2c6a226a036e822", "score": "0.47760618", "text": "function availableTime(day) {\n const r = /\\d+/g,\n date_ = new Date(),\n month = months[date_.getMonth()],\n date = date_.getDate(),\n year = date_.getFullYear();\n let duration = $(\".select-duration\").val();\n let timeReservedSorted = timeReserved[daysOfWeek.indexOf(day)][day].sort(\n function(a, b) {\n let da = new Date(`${month} ${date} ${year} ${a.start}`).getTime();\n let db = new Date(`${month} ${date} ${year} ${b.start}`).getTime();\n return da < db ? -1 : da > db ? 1 : 0;\n }\n );\n\n duration = duration.match(r);\n if (duration.length === 2) {\n duration = parseInt(duration[0]) * 60 + parseInt(duration[1]);\n } else {\n duration = parseInt(duration[0]);\n }\n\n // if (timeReservedSorted.length > 0) {\n let startTime = timeReservedSorted[0];\n\n startTime = startTime.start;\n\n startTime = startTime.match(r);\n startTime = parseInt(startTime[0]) * 60 + parseInt(startTime[1]);\n let eightOclock = 480;\n calcFreeSlots(startTime, eightOclock, duration);\n\n for (let i = 1; i < timeReservedSorted.length + 1; i++) {\n let end = timeReservedSorted[i - 1];\n end = end.end;\n end = end.match(r);\n end = parseInt(end[0]) * 60 + parseInt(end[1]);\n if (i === timeReservedSorted.length) {\n let start = 1320;\n\n calcFreeSlots(start, end, duration);\n } else {\n let start = timeReservedSorted[i];\n\n start = start.start;\n start = start.match(r);\n start = parseInt(start[0]) * 60 + parseInt(start[1]);\n\n calcFreeSlots(start, end, duration);\n }\n }\n}", "title": "" }, { "docid": "c09636e55325d61c6ca5012bb9d1c715", "score": "0.47623214", "text": "function calculateSupply(age, ammountPerDay){\n var maxAge = (80 - age ) * 365;\n var ammountConsumedForTheRestOfLife = (maxAge * ammountPerDay);\n return `You will need ${ammountConsumedForTheRestOfLife} to last you untill the ripe old age of 80`;\n}", "title": "" }, { "docid": "dfaffb807bfca3e45589241610bfaa47", "score": "0.47605744", "text": "function getTotalQuantity() {\n\n let quantity = {};\n let inputA5 = document.querySelector('.calc__input--a5');\n let inputA4 = document.querySelector('.calc__input--a4');\n let inputA3 = document.querySelector('.calc__input--a3');\n let inputA3plus = document.querySelector('.calc__input--a3plus');\n let inputA2 = document.querySelector('.calc__input--a2');\n quantity.a5 = parseInt(inputA5.value);\n quantity.a4 = parseInt(inputA4.value);\n quantity.a3 = parseInt(inputA3.value);\n quantity.a3plus = parseInt(inputA3plus.value);\n quantity.a2 = parseInt(inputA2.value);\n return quantity;\n}", "title": "" }, { "docid": "af14d5e97179727507380171e3cb0503", "score": "0.47548184", "text": "function getSleepHours(day){\n var ask = readInt(\"How many hours did you sleep on \" + day + \"? \" );\n return ask;\n}", "title": "" }, { "docid": "0b78770f38467740bb2ccbd39871df26", "score": "0.4754628", "text": "get deceasedQuantity() {\n\t\treturn this.__deceasedQuantity;\n\t}", "title": "" }, { "docid": "35bd8b9e9f201b961d78c1580c812d65", "score": "0.47527757", "text": "function hotelCost(day){\n var totalCost = 0;\n\n if(day <= 10){\n totalCost = day * 100;\n\n if(day < 0){\n return \"Day count cannot be negetive.\";\n }\n else if(day == 0 || day == -0){\n return 0;\n } \n }\n else if(day <= 20){\n var firstTenDay = 10 * 100;\n var pending = day - 10;\n var secondTenDay = pending * 80;\n totalCost = firstTenDay + secondTenDay;\n\n }\n else{\n var firstTenDay = 10 * 100;\n var secondTenDay = 10 * 80;\n var pending = day - 20;\n var thirdTenDay = pending * 50;\n\n totalCost = firstTenDay + secondTenDay + thirdTenDay;\n }\n return totalCost;\n}", "title": "" }, { "docid": "ac5e4351638e001c58f1234a25468e3a", "score": "0.47490335", "text": "async function soldExactlyConverter(sold_quantity){\n quantity = await sold_quantity\n if(quantity == 1) return \"1\"\n if(quantity == 2) return \"2\"\n if(quantity == 3) return \"3\"\n if(quantity == 4) return \"4\"\n if(quantity == 5) return \"5-25\"\n if(quantity == 25) return \"26-50\"\n if(quantity == 50) return \"51-100\"\n if(quantity == 100) return \"101-150\"\n if(quantity == 150) return \"151-200\"\n if(quantity == 200) return \"201-250\"\n if(quantity == 250) return \"251-500\"\n if(quantity == 500) return \"501-5000\"\n if(quantity == 5000) return \"5001-50000\"\n if(quantity == 50000) return \"50001-500000\"\n else return \"0\"\n }", "title": "" }, { "docid": "646679506a1130feb2d6e295cf89582b", "score": "0.47455233", "text": "function getIdealWeeklySleep(daily){\n var total = daily*7;\n return (total);\n}", "title": "" }, { "docid": "40a960c3b6dffd5a9ae714f329b7e478", "score": "0.47390488", "text": "function items_away( qty ){\n if( qty < 4 ){\n return 4 - qty;\n } else if ( qty >= 4 && qty < 7 ) {\n return 7 - qty;\n } else {\n return 12 - qty;\n }\n}", "title": "" }, { "docid": "4dc21925c1c53fa5b5f81f3b909c6f71", "score": "0.4729617", "text": "endWeek(state, date) {\n Vue.set(\n state.weeklyProductSum,\n date,\n loopObj(0, state.dailyProductSum)\n );\n console.log(\"wps says: \", state.weeklyProductSum[date]);\n // state.dailyProductSum = {}\n }", "title": "" }, { "docid": "282f04b0cf39a6854512731df7e0f086", "score": "0.47246227", "text": "function askForQuantity(product) {\n inquirer.prompt([{\n name: \"quantity\",\n message: \"How many of them do you want?\",\n validate: function(val) {\n if (isNaN(val) === false && parseInt(val) > 0 && parseInt(val) <= 100) {\n return true;\n }\n return false;\n }\n }]).then(function(val) {\n var quantity = parseInt(val.quantity);\n //check if there's enough\n if (quantity > product.stock_quantity) {\n console.log(\"Not enough, Please choose smth else\");\n askForPurchase()\n } else {\n buyItem(product, quantity);\n }\n });\n }", "title": "" }, { "docid": "d069e99d8e77c54542382dd1371b9dfa", "score": "0.47181037", "text": "function lowInvent(){\n connection.query(\"SELECT* FROM PRODUCTS\",\n function(err,res){\n if(err) throw err;\n for(var j = 0;j<res.length;j++){\n if(res[j].stock_quantity<=5)\n {\n console.log(\"ID: \".green + res[j].item_id + \" | \".blue + \"Product: \".red + res[j].product_name + \" | \".blue + \"Department: \".yellow + res[j].department_name + \" | \".blue + \"Price: \".cyan + res[j].price + \" | \".blue + \"Stock: \".magenta + res[j].stock_quantity)\n console.log(\"---------------------------------------------------------------------------\")\n \n }\n }\n start();\n })\n}", "title": "" }, { "docid": "1b1b5ade4a34a743efaad2042ae65633", "score": "0.47146958", "text": "function totalDailyRequirement(){\n\tvar totalDailyReq = 0;\n\ttotalDailyReq = getDailyWattHr()*1.2;\n\treturn totalDailyReq; \n}", "title": "" }, { "docid": "c16bef8f413f9848793f0d402b4504c9", "score": "0.47142556", "text": "function calculateSupply(age = \"\", amountPerDay = \"\") {\n const maxAge = 100;\n\n let remainingAge = maxAge - age;\n let supplyNeed = amountPerDay * remainingAge;\n return ` You will need ${supplyNeed} to last you until the ripe old age of ${maxAge} and your remaining days are ${remainingAge}`;\n}", "title": "" }, { "docid": "47119901d2b0b8cc9ede2dda0e87f9e0", "score": "0.47112826", "text": "function quantityChanged(e){//Al clickear, modificará la cantidad\n let input = e.target\n if(input.value <= 0){\n input.value = 1;\n }\n updateShoppingCartTotal(); //Y se modifica la cantidad.\n}", "title": "" }, { "docid": "c6a311ce050a72e27d75b9c643f4a239", "score": "0.46968597", "text": "incrementQuantity(state, payload) {\n payload.item.quantity++;\n\n if (payload.item.discount.length == 0) {\n payload.item.quantityPrice += parseInt(payload.item.price);\n\n state.cartSubtotal += parseInt(payload.item.price);\n }\n\n if (payload.item.discount.length != 0) {\n payload.item.quantityPrice += parseInt(payload.item.discount);\n\n state.cartSubtotal += parseInt(payload.item.discount);\n }\n }", "title": "" }, { "docid": "16d444278abf100017ef9d6110cc3a69", "score": "0.4696636", "text": "function hotelCost(day) {\n if (day == null || day == undefined) {\n return \"Please give a value first\";\n }\n if (day < 0) {\n return \"Days can not be negative\";\n }\n\n // Check the day is float or not. if float then make it integer\n if (day % 1 != 0) {\n day = Math.ceil(day);\n }\n\n var totalCost = 0;\n // check how many days are being stayed\n if (day <= 10) {\n var firstCost = 100 * day; // 1-10 - cost is 100/day\n totalCost = firstCost;\n } else if (day > 10 && day <= 20) {\n var firstCost = 100 * 10;\n var secondCost = 80 * (day - 10); // 11-20 - cost is 80/day\n totalCost = firstCost + secondCost;\n } else {\n var firstCost = 100 * 10;\n var secondCost = 80 * 10;\n var thirdCost = 50 * (day - 20); // 21-infinity - cost is 50/day\n totalCost = firstCost + secondCost + thirdCost;\n }\n return totalCost;\n}", "title": "" }, { "docid": "90f1673a01fab402a6296dc00ca4a883", "score": "0.4682511", "text": "function item_quantity_minus(item){\n let quantity = parseInt(item.value, 10);\n \n if (isNaN(quantity)) {\n quantity = 1;\n } else {\n quantity -= 1;\n }\n \n item.value = quantity;\n // Dispatch the event change on item\n let event = new Event('change', {bubbles: true});\n item.dispatchEvent(event);\n}", "title": "" }, { "docid": "6cb201a0a0dce594a1431c55d7624c29", "score": "0.46815768", "text": "function filterDaysUpdated(pet,day) {\n var petUpdateDate = new Date(pet.lastUpdate.$t);\n return Date.now() < petUpdateDate.setDate(petUpdateDate.getDate()+day);\n} //function filterDaysUpdated(pet,day) {", "title": "" }, { "docid": "3f78914782b17d8ecf0a3e7f5fda104a", "score": "0.46761343", "text": "function FetchQuantity(item, index) {\n if (item.PAC_PackType == item.StockKeepingUnit) {\n item.Units = item.Packs;\n OnChangeValues(item.Units, \"E3032\", true, index);\n } else {\n var _input = {\n \"OSP_FK\": item.PRO_FK,\n \"FromPackType\": item.PAC_PackType,\n \"ToPackType\": item.StockKeepingUnit,\n \"Quantity\": item.Packs\n };\n if (item.PRO_FK && item.PAC_PackType && item.StockKeepingUnit && item.Packs) {\n InwardLinesCtrl.ePage.Masters.Loading = true;\n apiService.post(\"eAxisAPI\", appConfig.Entities.PrdProductUnit.API.FetchQuantity.Url, _input).then(function (response) {\n if (response.data.Response) {\n item.Units = response.data.Response;\n InwardLinesCtrl.ePage.Masters.Loading = false;\n OnChangeValues(item.Units, \"E3032\", true, index);\n }\n });\n }\n }\n if ((InwardLinesCtrl.ePage.Entities.Header.Data.UIWmsInwardHeader.IMPartAttrib1Type == \"SER\" && item.UsePartAttrib1 && !item.IsPartAttrib1ReleaseCaptured) || (InwardLinesCtrl.ePage.Entities.Header.Data.UIWmsInwardHeader.IMPartAttrib2Type == \"SER\" && item.UsePartAttrib2 && !item.IsPartAttrib2ReleaseCaptured) || (InwardLinesCtrl.ePage.Entities.Header.Data.UIWmsInwardHeader.IMPartAttrib3Type == \"SER\" && item.UsePartAttrib3 && !item.IsPartAttrib3ReleaseCaptured)) {\n if (parseFloat(item.Units) != 1) {\n OnChangeValues(null, \"E3038\", true, InwardLinesCtrl.ePage.Masters.selectedRow);\n } else if (parseFloat(item.Units) == 1) {\n OnChangeValues('value', \"E3038\", true, InwardLinesCtrl.ePage.Masters.selectedRow);\n }\n }\n\n if ((InwardLinesCtrl.ePage.Entities.Header.Data.UIWmsInwardHeader.IMPartAttrib1Type == \"SER\" && (item.UsePartAttrib1 || item.IsPartAttrib1ReleaseCaptured)) || (InwardLinesCtrl.ePage.Entities.Header.Data.UIWmsInwardHeader.IMPartAttrib2Type == \"SER\" && (item.UsePartAttrib2 || item.IsPartAttrib2ReleaseCaptured)) || (InwardLinesCtrl.ePage.Entities.Header.Data.UIWmsInwardHeader.IMPartAttrib3Type == \"SER\" && (item.UsePartAttrib3 || item.IsPartAttrib3ReleaseCaptured))) {\n if ((parseFloat(item.Units) % 1) != 0) {\n OnChangeValues(null, \"E3063\", true, InwardLinesCtrl.ePage.Masters.selectedRow);\n } else {\n OnChangeValues('value', \"E3063\", true, InwardLinesCtrl.ePage.Masters.selectedRow);\n }\n }\n }", "title": "" }, { "docid": "6107202bffb5e2d9b38505c5c49c6313", "score": "0.46722162", "text": "function holidayPotluck(dishes, capacity) {\n // sort qualities of dishes in descending order \n let sortedQualities = dishes.map(dish => dish[0]).sort((a, b) => b - a);\n let enjoyment = 0;\n let index = 0;\n \n for(let i = 0; i < sortedQualities.length; i++){\n while(sortedQualities[i] !== dishes[index][0]){\n index++;\n }\n // capacity < quantity so take servings that remaining capacity allows and exit\n if(dishes[index][1] >= capacity){\n enjoyment += capacity * dishes[index][0];\n return enjoyment;\n } \n // capacity > quantity so take all of the servings \n enjoyment += dishes[index][0] * dishes[index][1]; \n capacity -= dishes[index][1]; // update capacity\n // remove dish from dishes array to handle duplicate qualities and repeated indexing\n dishes.splice(index, 1);\n index = 0;\n }\n // capacity is greater than the combined quantities of all dishes\n return enjoyment;\n}", "title": "" }, { "docid": "2244381fc36c014072225785c5af773a", "score": "0.4659962", "text": "function checkInventory(item, productName, price, department, quantity, amount) {\n\n newQuant = quantity - amount\n\n if (newQuant < 5) {\n rows = smallDataArray;\n console.log(\"\\nGood timing! There are fewer than 5 orders left.\")\n setTimeout(smallDataTable, 1500, rows)\n setTimeout(calculateCost, 2800, item, productName, price, department, quantity, amount);\n\n } else if (newQuant === 0) {\n rows = smallDataArray;\n console.log(\"\\nOh no! We seem to be out of that inventory. Try again in a week or two. You will now be taken to a new order page.\")\n setTimeout(smallDataTable, 1500, rows)\n setTimeout(reset, 2000);\n\n } else {\n rows = smallDataArray;\n console.log(\"\\nAlrighty, we've plenty of those!\")\n setTimeout(smallDataTable, 1500, rows)\n setTimeout(calculateCost, 2800, item, productName, price, department, quantity, amount);\n\n }\n}", "title": "" }, { "docid": "1f35b4e336aafe638fa327af3d4d39aa", "score": "0.46588257", "text": "function belongsToSelectedDate(component) {\n var i, date;\n for (i = 0; i < component.coveredDays.length; i++) {\n date = scout.dates.parseJsonDate(component.coveredDays[i]);\n if (scout.dates.isSameDay(this.selectedDate, date)) {\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "2b55bdc411dd0298d9e985f873738900", "score": "0.46573234", "text": "function getDay(date) {\n return get$1(date, \"day\");\n}", "title": "" }, { "docid": "2b55bdc411dd0298d9e985f873738900", "score": "0.46573234", "text": "function getDay(date) {\n return get$1(date, \"day\");\n}", "title": "" }, { "docid": "2b55bdc411dd0298d9e985f873738900", "score": "0.46573234", "text": "function getDay(date) {\n return get$1(date, \"day\");\n}", "title": "" }, { "docid": "2b55bdc411dd0298d9e985f873738900", "score": "0.46573234", "text": "function getDay(date) {\n return get$1(date, \"day\");\n}", "title": "" }, { "docid": "8698b5b16cb9d0b61daf84eaf3327686", "score": "0.46570674", "text": "bumpDate(direction, quantity) {\n let date = this.getUTCDateFromInputs();\n date.add(direction, quantity);\n if (date.isAfter(this.lastAvailableDay)) date = this.lastAvailableDay.clone();\n this.checkBoundsAndSetDate(date);\n }", "title": "" }, { "docid": "ab23a18ed3c10c935cf669e4beff6bc8", "score": "0.46546647", "text": "function checkQuantity(good){\n\t\tgood.error = false;\n\t\tvm.submissionError = false;\n\t\tgoodsService.get(good.good_id)\n\t\t.then(function(res){\n\t\t\tif(!/^\\d+$/.test(good.quantity)){\n\t\t\t\tgood.error = 'Please ensure that quantity is all numbers.'\n\t\t\t\tvm.submissionError = true;\n\t\t\t}else if(good.quantity>res.quantityForSale){\n\t\t\t\tgood.error = 'Please select a number less than '+res.quantityForSale+' in order to purchase this.';\n\t\t\t\tvm.submissionError = true;\n\t\t\t}\n\t\t})\n\t}", "title": "" }, { "docid": "b011cb340032dea8b9ceb1cc7b502cfd", "score": "0.46537852", "text": "function addToInventory(prodObj, prodId, prodQty) {\n let newQuantity = prodObj.stock + prodQty\n let query = \"update products Set stock = ? where ?\";\n connection.query(query, [newQuantity, {\n id: prodId\n }], function (error, res) {})\n console.log(\"New Quantity: \" + newQuantity)\n}", "title": "" }, { "docid": "f8a061879f01e12fe264b76d3bb47678", "score": "0.4651727", "text": "function dayOpen(e) {\n // Retrieve the context\n var day = e.currentTarget.querySelector(\".day\").textContent;\n var total = e.currentTarget.querySelector(\".total\").textContent;\n if(total.trim() == \"\")\n return;\n\n // Build the view model and display it\n vmDaySummary.dayOfMonth = day;\n vmDaySummary.month = vmMonthSummary.month;\n vmDaySummary.total = total;\n\n var date = vmMonthSummary.date;\n var firstDay = new Date(date.getFullYear(), date.getMonth(), day);\n var lastDay = new Date(date.getFullYear(), date.getMonth(), day, 23, 59);\n var firstTime = Math.ceil(firstDay.getTime() / 1000);\n var lastTime = Math.ceil(lastDay.getTime() / 1000);\n reportDateRange(firstTime, lastTime).then(function (bookings) {\n bookings = bookings.sort(function (a, b) {\n return a.date - b.date;\n });\n vmDaySummary.bookings = bookings;\n bookings.forEach(function (booking) {\n // Identify the booking table\n var table = vmMainScreen.tables.filter(function(table) { return booking.table == table.id })[0];\n booking.table = table;\n\n // Group meals and count total meals ordered\n var ids = booking.order.meals.map(function (meal) { return meal.id })\n .filter(function (e, i, arr) { return arr.lastIndexOf(e) === i; });\n var items = ids.map(function (id) {\n var meals = booking.order.meals.filter(function (meal) { return meal.id == id; });\n meals[0].count = meals.length;\n meals[0].price *= meals.length;\n return meals[0];\n });\n booking.items = items;\n });\n\n document.getElementById(\"daySummary\").classList.add(\"show\");\n });\n}", "title": "" }, { "docid": "48f67f776b34dd03eb78cb417ae1de53", "score": "0.46515226", "text": "function grainExpDate(food) {\n let date = moment();\n switch(pluralize.singular(food.name.toLowerCase())) {\n case 'flour':\n return moment(date, \"MM-DD-YYYY\").add(365, 'days');\n break;\n case 'white rice':\n return moment(date, \"MM-DD-YYYY\").add(700, 'days');\n break;\n case 'rice':\n return moment(date, \"MM-DD-YYYY\").add(700, 'days');\n break;\n case 'brown rice':\n return moment(date, \"MM-DD-YYYY\").add(180, 'days');\n break;\n case 'cereal':\n return moment(date, \"MM-DD-YYYY\").add(365, 'days');\n break;\n case 'pasta':\n return moment(date, \"MM-DD-YYYY\").add(365, 'days');\n break;\n case 'bread':\n if (food.location === 'Fridge'){\n return moment(date, \"MM-DD-YYYY\").add(21, 'days');\n }\n if (food.location === 'Freezer'){\n return moment(date, \"MM-DD-YYYY\").add(60, 'days');\n }\n return moment(date, \"MM-DD-YYYY\").add(7, 'days');\n break;\n default: \n return moment(date, \"MM-DD-YYYY\").add(60, 'days');\n }\n}", "title": "" }, { "docid": "cdccd6342b525116717f5bfd701e329d", "score": "0.46490133", "text": "isOutOfDate(i) {\n if (this.items[i].sellIn <= 0) {\n return true;\n };\n }", "title": "" }, { "docid": "b79609c65c9d55a227905f63547679e7", "score": "0.46429056", "text": "function lowInventory() {\n connection.query(\"SELECT * FROM products\", function (error, results) {\n if (error) throw err;\n for (let i = 0; i < results.length; i++) {\n if (results[i].stock_quantity < 5) {\n console.log(\"\\r\\n\" + \"ID: \" + results[i].item_id);\n console.log(\"Product: \" + results[i].product_name);\n console.log(\"Price: \" + \"$\" + results[i].price);\n console.log(\"Quantity: \" + results[i].stock_quantity);\n }\n }\n })\n}", "title": "" }, { "docid": "6d29af824edb25bc354b0cf0af7b028b", "score": "0.4639338", "text": "function dishHasQuantityProperty(req, res, next) {\n const { data: { dishes } = {} } = req.body;\n const missingQuantity = dishes.find((dish) => !dish.quantity);\n if (missingQuantity) {\n missingQuantity.index = dishes.indexOf(missingQuantity);\n next({\n status: 400,\n message: `Dish ${missingQuantity.index} must have a quantity that is an integer greater than 0.`,\n });\n }\n return next();\n}", "title": "" }, { "docid": "11c455515e172de9be060c714705e1b7", "score": "0.4635358", "text": "function item_quantity_plus(item){\n\n let quantity = parseInt(item.value, 10);\n if (isNaN(quantity)) {\n quantity = 1;\n } else {\n quantity += 1;\n }\n // Dispatch the event change on item\n item.value = quantity;\n let event = new Event('change', {bubbles: true});\n item.dispatchEvent(event);\n}", "title": "" }, { "docid": "97ba7f5ead62b8f29a302bde906d6205", "score": "0.4631801", "text": "function getDay(date) {\n return get$1(date, 'day');\n}", "title": "" }, { "docid": "97ba7f5ead62b8f29a302bde906d6205", "score": "0.4631801", "text": "function getDay(date) {\n return get$1(date, 'day');\n}", "title": "" }, { "docid": "d5f7a8adcfed24ea75828338185f470c", "score": "0.4630382", "text": "CalcPrice(dateD, dateP, price) {\n let dateDropOff = new Date(dateD).getTime();\n let datePicup = new Date(dateP).getTime();\n let days = Math.floor((dateDropOff - datePicup) / (1000 * 60 * 60 * 24));\n return days * price;\n }", "title": "" }, { "docid": "fe404a83e24c93a973f52b965ca366f6", "score": "0.46299562", "text": "renderMeal(day, mealIndex) {\n let end;\n if (this.plannerHelper.getMealEndTime(this.state.mealData, day, mealIndex) === \"0\") {\n end = \"00\";\n }\n else {\n end = this.plannerHelper.getMealEndTime(this.state.mealData, day, mealIndex);\n }\n return (\n <DailyPlannerItem\n data={this.state.mealData}\n recipe={this.plannerHelper.getMealRecipeName(this.state.mealData, day, mealIndex)}\n start={this.plannerHelper.getMealStartTime(this.state.mealData, day, mealIndex)}\n end={end}\n day={day}\n dur={this.plannerHelper.getDuration(this.plannerHelper.getMeal(this.state.mealData, day, mealIndex))}\n mealIndex = {mealIndex}\n update = {this.update}\n />\n );\n }", "title": "" } ]
b207b5659973fdf168ca82d07758628a
show current position using latitude and longitude
[ { "docid": "55b19bda6e12f5318b3d2a14de147803", "score": "0.0", "text": "function currentPosition(position) {\n let units = \"imperial\";\n let apiKey = \"044e518b60304de98c4849e683a28d22\";\n let apiUrl = `https://api.openweathermap.org/data/2.5/weather?lat=${position.coords.latitude}&lon=${position.coords.longitude}&appid=${apiKey}&units=${units}`;\n\n axios.get(apiUrl).then(showWeather);\n}", "title": "" } ]
[ { "docid": "1cd3796d35fa79ed0ebded7c7b1a9e2e", "score": "0.80553204", "text": "function showPosition(position) {\n\t\tconsole.log(position);\n\t\tcurrentLatitude = position.coords.latitude;\n\t\tcurrentLongitude = position.coords.longitude;\n\t}", "title": "" }, { "docid": "7f2ccf7384523c894162f602103c5f97", "score": "0.79265505", "text": "function showPosition(position) {\n lat = position.coords.latitude.toString();\n long = position.coords.longitude.toString();\n}", "title": "" }, { "docid": "f6c34e78cbd50c75102bd61a037b00e7", "score": "0.7904737", "text": "function showPosition(position) {\n $(\"#location\").html( \"<pre>Latitude: \" + position.coords.latitude +\n \"<br>Longitude: \" + position.coords.longitude+\"</pre>\");\n}", "title": "" }, { "docid": "c63766ff07cb4991571a0e7982b18a62", "score": "0.78514636", "text": "function showPosition(position) {\n x.innerHTML = \"Latitude: \" + position.coords.latitude +\n \"<br>Longitude: \" + position.coords.longitude;\n }", "title": "" }, { "docid": "646edd31358be58d35737b856be091c9", "score": "0.783724", "text": "function showPosition(position) {\r\n\tult = position.coords.latitude;\r\n\tulg = position.coords.longitude;\r\n}", "title": "" }, { "docid": "58e65e6d9ec9a9c01c22f93d5145b556", "score": "0.7815969", "text": "function displayPosition(pos) {\n\t$('#longitude').html('<b>Longitude:</b> ' + pos.coords.longitude);\n\t$('#latitude').html('<b>Latitude:</b> ' + pos.coords.latitude);\n\t$('#timestamp').html('<b>Timestamp:</b> ' + new Date(pos.timestamp));\n}", "title": "" }, { "docid": "9ac472281af37408ca288b417201d0ab", "score": "0.7685889", "text": "function displayLocation(position) {\n var latitude = position.coords.latitude;\n var longitude = position.coords.longitude;\n\n var latLng = new google.maps.LatLng(latitude, longitude);\n console.log(latLng)\n showMap(latLng);\n\n addNearByPlaces(latLng);\n createMarker(latLng);\n\n //Muestra nuestras coordenadas\n // var div = document.getElementById('location');\n // div.innerHTML = 'You are at Latitude: ' + latitude + ', Longitude: ' + longitude;\n }", "title": "" }, { "docid": "80f851d89c90ed2104410565f8dda8a6", "score": "0.75952", "text": "function showPosition(position) {\n //alert(\"Latitude: \" + position.coords.latitude +\n // \"Longitude: \" + position.coords.longitude);\n}", "title": "" }, { "docid": "74d40f43bf63e81da320c9502169102a", "score": "0.75941646", "text": "function showPosition(position) {\r\n displayCoords.innerHTML=\"Latitude: \" + position.coords.latitude + \r\n \"<br />Longitude: \" + position.coords.longitude; \r\n showOnGoogleMap(new google.maps.LatLng(position.coords.latitude, position.coords.longitude));\r\n \r\n }", "title": "" }, { "docid": "1108af8df16d94295ebf456953680068", "score": "0.75817215", "text": "function showCurrentPosition(position) {\n\tcurrentCoordinate = position.coords;\n\tfetchStores();\n\tgoToLocation(position.coords.latitude, position.coords.longitude);\n\tvar latLng = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);\n var marker = new google.maps.Marker({\n position: latLng,\n title: \"Current Location\",\n map: map\n });\n \n var infowindow = new google.maps.InfoWindow({\n content: \"<p>Your Location</p>\"\n });\n \n google.maps.event.addListener(marker, 'click', function() {\n infowindow.open(map,marker);\n });\n}", "title": "" }, { "docid": "89fd8319a9125284321f9d312bde2fb3", "score": "0.75756085", "text": "function showPosition(position) {\r\n pkgLoc = position.coords.latitude + ' , ' + position.coords.longitude;\r\n}", "title": "" }, { "docid": "8b36dbab9783296fbec28c61c31b8f2f", "score": "0.75126475", "text": "function showPosition(position)\n\t\t{\n\t\t//This first part is if the current position has changed \n\t\tif(currentLat != position.coords.latitude || currentLong != position.coords.longitude)\n\t\t{\t\n\t\t\t//update the <p> the displays current Long and Lat, as well as draw a new marker\n\t\t\t// and chnge distance from start and end <p>'s\n\t\t\tcurrentLat = position.coords.latitude;\n\t\t\tcurrentLong = position.coords.longitude;\n\t\t\tcurrentLong1 = currentLong;\n\t\t\tcurrentLat1 = currentLat;\n\t\t\tvar currentLoc = document.getElementById(\"currentLoc\");\n\t\t\tcurrentLoc.innerHTML = \"<strong>Your Current Position:</strong><br>Latitude: \" + currentLat.toFixed(14) + \n\t\t\t\"<br>Longitude: \" + currentLong.toFixed(14);\n\t\t\t//draw marker at current position\n\t\t\tvar currentLatLong = new google.maps.LatLng(currentLat, currentLong);\n\t\t\tcurrentMarker.setMap(null);\n\t\t\t currentMarker = new google.maps.Marker({\n\t\t\t\tmap: map,\n\t\t\t\tposition: currentLatLong,\n\t\t\t\ttitle: 'CURRENT LOCATION!'\n\t\t\t });\n\t\t\tcalcRoute(startMarker.getPosition(), endMarker.getPosition());\n\n\t\t\t}\n\t\telse\n\t\t{\n\t\t//nothing has changed;\n\t\t\t/** UNCOMMENT THIS CODE TO WATCH THE CURRENT LOCATION MOVE!\n\t\t\tcurrentLong1 = currentLong1 +0.01;\n\t\t\tcurrentLat1 = currentLat1+0.01;\n\t\t\tvar currentLoc = document.getElementById(\"currentLoc\");\n\t\t\tcurrentLoc.innerHTML = \"Your Current Position:<br>Latitude: \" + currentLat1 + \n\t\t\t\"<br>Longitude: \" + currentLong1;\n\t\t\t//draw marker at current position\n\t\t\tvar currentLatLong = new google.maps.LatLng(currentLat1, currentLong1);\n\t\t\tcurrentMarker.setMap(null);\n\t\t\t currentMarker = new google.maps.Marker({\n\t\t\t\tmap: map,\n\t\t\t\tposition: currentLatLong,\n\t\t\t\ttitle: 'CURRENT LOCATION!'\n\t\t\t });\n\t\t\t calcRoute(startMarker.getPosition(), endMarker.getPosition());\n\t\t\t*/\n\t\t}\t\n\t\t}", "title": "" }, { "docid": "fadb2f0c92f581b706257202dc9e771d", "score": "0.75062066", "text": "function showPosition(position) {\r\n currentLat = position.latitude;\r\n currentLon = position.longitude;\r\n\r\n latTxt = currentLat.toFixed(6);\r\n lonTxt = currentLon.toFixed(6);\r\n\r\n myPosLatIncr = currentLat - myInitLoc.latitude;\r\n myPosLonIncr = currentLon - myInitLoc.longitude;\r\n\r\n distanceFence1 = calcGeoDistance(currentLat, currentLon, fence1LatPos, fence1LongPos, 'km') * 1000;\r\n\r\n distanceFence3 = calcGeoDistance(currentLat, currentLon, fence3LatPos, fence3LongPos, 'km') * 1000;\r\n distanceFence6 = calcGeoDistance(currentLat, currentLon, fence6LatPos, fence6LongPos, 'km') * 1000;\r\n distanceFence8 = calcGeoDistance(currentLat, currentLon, fence8LatPos, fence8LongPos, 'km') * 1000;\r\n\r\n // myCircleX = map(currentLon, myInitLoc.longitude - fencePosIncr, myInitLoc.longitude + fencePosIncr, 0, myCanvas.width);\r\n // myCircleY = map(currentLat, myInitLoc.latitude - fencePosIncr, myInitLoc.latitude + fencePosIncr, 0, myCanvas.height);\r\n\r\n}", "title": "" }, { "docid": "6edb4b495f276f0838b65711c981d75a", "score": "0.7494365", "text": "function showPosition(position) {\n latBoxVal.value = position.coords.latitude;\n longBoxVal.value = position.coords.longitude;\n}", "title": "" }, { "docid": "3bb1661c87c1c68d85618c7af30dd93e", "score": "0.74846387", "text": "function showPosition(position) {\n // Grab coordinates from the given object & rounds off to nearest 10th.\n var lat = Math.round(position.coords.latitude * 10)/10;\n var lon = Math.round(position.coords.longitude * 10)/10;\n // Call our next function, passing on the coordinates\n weatherDisplay(lat, lon);\n }", "title": "" }, { "docid": "f4833a36add809784869bbb3a5bd19fb", "score": "0.7459682", "text": "function successLocation(position) {\n setupMap([position.coords.longitude, position.coords.latitude]);\n $(\"#notice\").hide();\n \n let lat = position.coords.latitude;\n let long = position.coords.longitude;\n \n $(\"#currentlat\").text(`${lat}`);\n $(\"#currentlong\").text(`${long}`);\n \n \n }", "title": "" }, { "docid": "6f7aa11d23272c3896402cd3600a5913", "score": "0.7413171", "text": "function showPosition(position) {\n\n locationStats = position.coords.latitude + \",\" + position.coords.longitude;\n\n }", "title": "" }, { "docid": "938a1872e2c09a5707b30c1e79d1e834", "score": "0.74108773", "text": "function showPosition(position) {\n\tlat = position.coords.latitude;\n\tlong = position.coords.longitude;\n getBikeSpots(lat, long);\n}", "title": "" }, { "docid": "9dbd91b2fc39e7c1ef0d92fd3b4a4dde", "score": "0.73657894", "text": "function showPosition(position) {\n latitude = position.coords.latitude;\n longitude = position.coords.longitude;\n\n getDataFromApi(latitude, longitude);\n initMap(latitude, longitude);\n}", "title": "" }, { "docid": "a7a774802a2e11ddca330b3230941776", "score": "0.7359798", "text": "function showPosition(position) {\n\tvar latitude = position.coords.latitude;\n\tvar longitude = position.coords.longitude;\t\n\t\n\tconsole.debug(\"Found Geolocation of '\" + latitude + \", \" + longitude+\"'\");\n\tshowMap(\"your Geolocation\", latitude, longitude);\n}", "title": "" }, { "docid": "7826bc66b03b42c761cd66a83c2c10b0", "score": "0.7351851", "text": "function showPosition(position){\n uluru = {lat: position.coords.latitude, lng: position.coords.longitude}\n map.setCenter(uluru);\n var marker = new google.maps.Marker({\n map: map,\n position: uluru,\n });\n}", "title": "" }, { "docid": "5773c665de1efdc88f6397cfa386d1a1", "score": "0.734885", "text": "function showPosition(position) {\n // Grab coordinates from the given object\n var lat = position.coords.latitude;\n var lon = position.coords.longitude;\n console.log(\"Your coordinates are Latitude: \" + lat + \" Longitude \" + lon);\n // return [lat, lon];\n get_city_from_coord(lat, lon);\n}", "title": "" }, { "docid": "317c281877c36b656ca86e5e400f647f", "score": "0.7340319", "text": "function showPosition(position) {\r\n\t$(\"latlng\").value = position.coords.latitude + \",\" \r\n\t+ position.coords.longitude;\r\n\t\r\n\t// add the mapping function down in this method rather than in the \r\n\t// initialize() method shown in the reverse geolocation example\r\n\t// \r\n\tmap = new google.maps.Map(document.getElementById('map-canvas'), {\r\n zoom: 8,\r\n center: {lat: position.coords.latitude, lng: position.coords.longitude}\r\n });\r\n}", "title": "" }, { "docid": "9823c9dd5cc5c8c081d008d01a45f679", "score": "0.72953445", "text": "function showPosition(position) {\n globalPos = {\n lat: position.coords.latitude,\n lng: position.coords.longitude\n };\n\n //center the map on current position\n map.setCenter(globalPos);\n}", "title": "" }, { "docid": "708baa38160ca11fb7968796be24d846", "score": "0.7289928", "text": "function showPosition(position) {\n lat = position.coords.latitude;\n long = position.coords.longitude;\n sortByLocation();\n updateDisplay(finalGroup);\n }", "title": "" }, { "docid": "c82d4473a450aff69d08817efbbad3f1", "score": "0.7288791", "text": "function showPosition(position) {\r\n wrap.style.display = 'block';\r\n latitude = position.coords.latitude;\r\n longitude = position.coords.longitude;\r\n\r\n // user position\r\n var userPosition = {\r\n lat: latitude,\r\n lng: longitude\r\n };\r\n\r\n // show on map\r\n setTimeout(() => {\r\n map = new google.maps.Map(document.getElementById('map'), {\r\n center: userPosition,\r\n zoom: 15\r\n });\r\n infowindow = new google.maps.InfoWindow();\r\n var service = new google.maps.places.PlacesService(map);\r\n\r\n // nearby search\r\n service.nearbySearch({\r\n location: userPosition,\r\n radius: 5000,\r\n types: ['atm']\r\n }, call_back);\r\n }, 700)\r\n }// end show position on map", "title": "" }, { "docid": "f7e2a3d2335f09ce3bdcaa809fa45bc8", "score": "0.72856903", "text": "function showPosition(position) {\n\tdocument.getElementById(\"long\").value=position.coords.longitude;\n\tdocument.getElementById(\"lat\").value=position.coords.latitude;\n}", "title": "" }, { "docid": "b0aa5afc4cae2dd52ebcd6363ea1248c", "score": "0.7281472", "text": "function showPosition(position){\r\n var lat = position.coords.latitude;\r\n var lng = position.coords.longitude;\r\n mymap.locate({setView: true, maxZoom: 16});\r\n L.marker([position.coords.latitude, position.coords.longitude]).addTo(mymap).bindPopup(\"gefunden!\").openPopup(); \r\n}", "title": "" }, { "docid": "e4f0ec7703893ef0496f2a51607e5b66", "score": "0.7275903", "text": "function showPosition(position)\n{\n\tconsole.log(\"show Position\");\n\tlocation_lat = position.coords.latitude;\n\tlocation_lng = position.coords.longitude;\n\n\tvar latlng = L.latLng(location_lat, location_lng);\n\n\tvar curMarker = L.marker(latlng, {draggable:\"true\"});\n\n\t// add drag n drop listener to marker\n\tcurMarker.on(\"dragend\", markerUpdated);\n\n\tcurMarker.addTo(map);\n\n\tmap.setView(latlng, 16);\n\n}", "title": "" }, { "docid": "201e9c169749b01d5f23b02aa7860561", "score": "0.72752833", "text": "function showPosition(position) { // enable ur gps, it takes sometime to call till now wait \n\tconsole.log(\"Successfully got position\"); \n\n\tvar lat = position.coords.latitude;\n\tvar longi = position.coords.longitude;\n \n\t/* update with starting location */ \n document.getElementById('currentLat').innerHTML = position.coords.latitude;\n\tdocument.getElementById('currentLon').innerHTML = position.coords.longitude;\n\n\n\tmapCenter = new google.maps.LatLng(lat, longi); \n\n\tmyOptions = {\n\t\tzoom:10,\n\t\tmapTypeId: google.maps.MapTypeId.ROADMAP,\n\t\tcenter: mapCenter,\n\t};\n \n\tconsole.log(\"Got position and initializing map\"); \n\t/* initialize maps */ \n map = new google.maps.Map(document.getElementById(\"map\"), myOptions);\n \n\tmarker = new google.maps.Marker({\n\t\tposition: new google.maps.LatLng(lat, longi),\n \t\tmap: map,\n \ttitle:\"Current Location!\"\n })\n\n\t/* Geocode the lat and lng */ \n\tvar geocoder = new google.maps.Geocoder; \n\tvar infowindow = new google.maps.InfoWindow;\n geocodeLatLng(geocoder, map, infowindow); \n}", "title": "" }, { "docid": "a45ebf9fe3a1d3b399c8c7167d2781c8", "score": "0.7269099", "text": "function success(position) {\n lat = position.coords.latitude;\n lon = position.coords.longitude;\n $('#lat').html(lat + \"is the Latitude\");\n $('#lon').html(lon + \"is the Longitude\");\n}", "title": "" }, { "docid": "a73beac928818ebe6eab2d24bd9c485b", "score": "0.72199106", "text": "function showLocation(pos){\n\n\t\tlatitude = pos.coords.latitude;\n\t\tlongitude = pos.coords.longitude;\n\t\t\t\t\n\t\tvar latLng = new google.maps.LatLng(pos.coords.latitude,pos.coords.longitude);\n\t\t\t\t\n\t if (geocoder) {\n\t\t\t geocoder.geocode({'latLng': latLng}, \n\t\t\t\n\t\t\t function(results, status) {\n\t\t\t if (status == google.maps.GeocoderStatus.OK) {\n\t\t\t if (results[1]) {\n\t\t\t\t $(\"location\").innerHTML = results[1].formatted_address;\n\t\t\t\t\t\t\tres = results[1].formatted_address;\t\n\t\t\t } \n\t\t\t } \n\t\t\t });\n\t\t\t }\t\t\n\t\t\t}", "title": "" }, { "docid": "1ea7933059a26a078418b42c42a3e916", "score": "0.71946424", "text": "function displayLocation(position) {\n var latitude = position.coords.latitude;\n var longitude = position.coords.longitude;\n\n var div = document.getElementById(\"location\");\n div.innerHTML = \"You are at Latitude: \" + latitude + \", Longitude: \" + longitude;\n\n var km = computeDistance(position.coords, ourCoords);\n var distance = document.getElementById(\"distance\");\n distance.innerHTML = \"You are \" + km + \" km from the WickedlySmart HQ\"\n\n showMap(position.coords);\n}", "title": "" }, { "docid": "92c01ceac4b9551b066ae1b6b0f1a358", "score": "0.7132336", "text": "function showCoord() {\r\n if (navigator.geolocation) {\r\n navigator.geolocation.getCurrentPosition(success, failure)\r\n } else {\r\n console.log(\"Sorry no geolocation device on your machine\");\r\n }\r\n}", "title": "" }, { "docid": "e0c17e52bc46409fa5cf5fc221b6ef4d", "score": "0.7130919", "text": "function displayLocation(position) {\n //The latitude and longitude values obtained from HTML 5 API.\n var latitude = position.coords.latitude;\n var longitude = position.coords.longitude;\n \n //Creating a new object for using latitude and longitude values with Google map.\n var latLng = new google.maps.LatLng(latitude, longitude);\n \n // showMap(latLng);\n \n // addNearByPlaces(latLng);\n // createMarker(latLng);\n queryFourSquare(latitude,longitude);\n\n // queries the foursquare API using the user's lat and long\n //Also setting the latitude and longitude values in another div.\n // var div = document.getElementById(\"location\");\n // div.innerHTML = \"You are at Latitude: \" + latitude + \", Longitude: \" + longitude;\n }", "title": "" }, { "docid": "0aa2e3625664079673752bbc9f0652a1", "score": "0.71083635", "text": "function show_position( position ) {\n\n // set it to false since the geocoder will set it to true again.\n // Otherwise the geocoding will not proceed.\n GF_Geo.processing.status = false;\n\n // geocode the coords\n GF_Geo.geocoder( element, [ position.coords.latitude, position.coords.longitude ], success, failed );\n }", "title": "" }, { "docid": "44ffb3fcdebc8a9501b7b2de54c51908", "score": "0.71070707", "text": "function getPosition(position) {\n UserLatitude = position.coords.latitude;\n UserLongitude = position.coords.longitude;\n showPosition(UserLatitude, UserLongitude);\n}", "title": "" }, { "docid": "3d022383a00665fafd44ecbeec014887", "score": "0.70956296", "text": "function displayGeolocation(position) {\r\n //console.log(position.coords.latitude);\r\n var altitude = \"n/a\";\r\n if (position.coords.altitude != null) altitude = position.coords.altitude.toFixed(2) + \"m\";\r\n var speed = \"n/a\";\r\n if (position.coords.speed != null) (position.coords.speed * 3600 / 1000).toFixed(2) + \"km/hr\";\r\n var heading = \"n/a\";\r\n if (position.coords.heading != null) heading = position.coords.heading.toFixed(2) + \"deg\";\r\n\r\n $(\"#location\").text(position.coords.latitude.toFixed(4) + \", \" + position.coords.longitude.toFixed(4));\r\n $(\"#altitude\").text(\"Alt: \" + altitude);\r\n $(\"#speed\").text(\"Spd: \" + speed);\r\n //$(\"#heading\").text(\"Hdg: \" + heading);\r\n\r\n //Tested on desktop IE9, Chrome 17, Firefox 10, Safari ?\r\n //Mobile browser: Android 2.3.6\r\n //There is a bug in Safari browsers on Mac that shows the year as 1981\r\n //To get around the bug you could manually parse and then format the date. I chose not to for this project.\r\n accuracy = position.coords.accuracy.toFixed(2);\r\n var date = new Date(position.timestamp)\r\n $(\"#timestamp\").text(date.toLocaleString());\r\n $(\"#accuracy\").text(\"Acc: \" + position.coords.accuracy.toFixed(2) + \"m\");\r\n $(\"#geo-indicator\").html(\"Geo: ON\");\r\n $(\"#geo-indicator\").css('color', 'green');\r\n }", "title": "" }, { "docid": "b70e66a98c2b74f1f1a4299cd4725cc4", "score": "0.7083194", "text": "function showPosition(position) {\n centerLat = position.coords.latitude;\n centerLng = position.coords.longitude;\n map = new google.maps.Map(document.getElementById('locationMap'), {\n center: {lat: centerLat, lng: centerLng},\n zoom: 12\n });\n mapListener();\n }", "title": "" }, { "docid": "9db775426c5e1fbefb632b1d7a0de37c", "score": "0.70715123", "text": "function drawLocationOnMap(position){\n // get latitude/longitude from Position obkect\n var lat = position.coords.latitude;\n var lon = position.coords.longitude;\n var msg = \"You are here: Latitude \" + lat + \", Longitude \" + lon;\n\n // mark current location on Google Maps\n var pos = new google.maps.LatLng(lat, lon);\n var infoBox = new google.maps.InfoWindow({\n map: map,\n position: pos,\n content: msg\n });\n\n map.setCenter(pos);\n return;\n}", "title": "" }, { "docid": "ffdbea2efbc29228a692b9d2204c2e79", "score": "0.7071469", "text": "function showpos(position){\n\t\tconsole.log(position.coords.latitude);\n\t\tconsole.log(position.coords.longitude);\n\t\t\n\t\tvar LatLng;\n\t\t//sets up map settings \n\t\tvar mapOptions = {\n\t\tcenter: new google.maps.LatLng( position.coords.latitude, position.coords.longitude ),\n\t\tzoom: 16,\n\t\tzoomControl: true,\n\t\tnavigationControlOptions: {style: google.maps.NavigationControlStyle.SMALL},\n\t\tmapTypeId: google.maps.MapTypeId.ROADMAP\n\t\t};\n\t\t//creates new map \n\t\t map = new google.maps.Map( document.getElementById(\"map\"), mapOptions );\n\t\t var infoWindow = new google.maps.InfoWindow;\n\t\t //create marker for current postion \n\t\t var markers = new google.maps.Marker( {\n\n\t\tposition:mapOptions.center\n\n\t\t\t});\n\t\t\t\n\t\t\t//changes colour of marker to blue\n\t\t\ticonFile = 'https://maps.google.com/mapfiles/ms/icons/blue-dot.png'; \n\t\t\tmarkers.setIcon(iconFile) \n\t\t\t//puts marker onto map\n\t\t\tmarkers.setMap(map);\n\t\t\t//gets coordinates of the users position \n\t\t\tvar position = {\n\t\t\t\tlat: position.coords.latitude,\n              \tlng: position.coords.longitude\n\t\t\t}\n\t\t\t\n\t\t\tvar service;\n\t\t//sets the settings of the search \n\t\tvar request = { \n\t\tlocation:position,\n\t\tradius: \"10000\",\n\t\tquery: \"music venues near me\"\n\t};\n\t//runs a search on the map of music venues within 10km of the users position \n\tservice = new google.maps.places.PlacesService(map);\n  \tservice.textSearch(request, callback);\n\t\t\t\n\t\t\t//sets up and displays map\n\t\t\tinfoWindow.setPosition(position);\n            infoWindow.setContent('Location found.');\n            infoWindow.open(map);\n            map.setCenter(position);\n\t}", "title": "" }, { "docid": "96a97b1f8f8e614f083d89df7b538043", "score": "0.70681155", "text": "function showPosition(position) {\n const lat = position.coords.latitude;\n const lon = position.coords.longitude;\n redirect(lat, lon);\n}", "title": "" }, { "docid": "b4774c97c84e625b056be30a7095b672", "score": "0.7053883", "text": "function updatePosition(position) {\n\n // Update the current position and update the main app screen.\n currentPosition = (Math.round(position.coords.latitude * 1000) / 1000) + \",\" + (Math.round(position.coords.longitude * 1000) / 1000);\n $(\"#location\").html(currentPosition);\n\n // Update current latitude.\n currentPositionLatitude = position.coords.latitude;\n\n // Update current longitude.\n currentPositionLongitude = position.coords.longitude;\n}", "title": "" }, { "docid": "dd0bef54fb8534d6b00945f14643509c", "score": "0.70517385", "text": "function showPosition(event) {\n event.preventDefault();\n navigator.geolocation.getCurrentPosition(currentPosition);\n}", "title": "" }, { "docid": "eaae582287d56ff38a0f830538a054e2", "score": "0.70444596", "text": "function loadnShowPosition(position) {\n long = position.coords.longitude;\n lat = position.coords.latitude;\n $('#lat').html(\"Latitude : \" + lat);\n $('#long').html(\"Longitude : \" + long);\n url = \"https://api.apixu.com/v1/current.json?key=77e3ffd4ee724808966110441170906&q=\" + lat + \",\" + long;\n getWeather();\n\n}", "title": "" }, { "docid": "d508e6fe2307d0962d6fddfc0c8c93d9", "score": "0.7026475", "text": "function showPosition(position) {\n lat = position.coords.latitude;\n lng = position.coords.longitude;\n var latlng = new google.maps.LatLng(lat, lng); //populated LatLng object \n//\t\tmap.setZoom(17); //Testing zoom function\n//\t\tmarker.setPosition(latlng); //moves the marker to current position\n \n // map = new google.maps.Map(document.getElementById(\"map\"), myOptions); //make the map\n}", "title": "" }, { "docid": "738af2d16648d8a73cca46a5d78db6bb", "score": "0.70264053", "text": "function showPosition(position) {\n\t//append the latitude and logitude positions together\n var latlon = position.coords.latitude+\",\"+position.coords.longitude;\n\t\n\t//append a really long URL to pull in a google map image\n var img_url = \"http://maps.googleapis.com/maps/api/staticmap?center=\"\n +latlon+\"&zoom=13&size=400x300&sensor=false\";\n\t\n\t//Create an <img> tag and add it to our map-holder\n $(\"#map-holder\").html(\"<img src='\"+img_url+\"'>\");\n}", "title": "" }, { "docid": "41e8d0a5112378c094ae6c6f15164c5d", "score": "0.7026184", "text": "function umShowLocation(X, Y) \r\n{\r\n\tvar Point = umConvertLocToLatLng(X, Y);\r\n\tumMapState.MoveTo(umMap, Point);\r\n}", "title": "" }, { "docid": "fe6124cccb022a0798ddc120d95e6f74", "score": "0.7017468", "text": "function itWorks(position)\n\t\t\t\t{\n\t\t\t\tconsole.log('Current latitude: '+position.coords.latitude);\n\t\t\t\tconsole.log('Current longitude: '+position.coords.longitude);\n\t\t\t\t}", "title": "" }, { "docid": "a17eaa706c07304962e77b017dc6dc37", "score": "0.7008581", "text": "function displayPosition() {\n if (prec != null) {\n prec.remove();\n }\n if (!(lat == 48.862725 && long == 2.287592000000018)) {\n //Centrage initial\n if (center == 0) {\n center = 1;\n map.flyTo({center: [long, lat]});\n }\n\n //Div pour le marker\n var el = document.createElement('div');\n el.className = 'marker';\n el.style.backgroundImage = 'url(Ressources/marker_blue.png)';\n el.style.width = '25px';\n el.style.height = '35px';\n\n //Ajout du marker\n prec = new mapboxgl.Marker(el, {offset: [0, 0]})\n .setLngLat([long, lat])\n .addTo(map);\n }\n}", "title": "" }, { "docid": "3bcb04e066ceadbd255dadd6bbc18283", "score": "0.7006526", "text": "function showPosition(userLatitude, userLongitude) {\n lat = userLatitude;\n lon = userLongitude;\n latlon = new google.maps.LatLng(lat, lon);\n\n map.setZoom(14);\n google.maps.event.trigger(map.panTo(latlon), 'click');\n}", "title": "" }, { "docid": "ec032eef810da0ba03867a46e5e64aaa", "score": "0.7004577", "text": "function showPosition(position){\n var GEOCODING = 'https://maps.googleapis.com/maps/api/geocode/json?latlng=' + position.coords.latitude + '%2C' + position.coords.longitude + '&language=en';\n $.getJSON(GEOCODING).done(function(location) {\n locatie += location.results[0].address_components[3].long_name;\n ajaxRequest(locatie);\n });\n }", "title": "" }, { "docid": "ecfe4d42d93795515d7e70a20f596fae", "score": "0.69900614", "text": "function showPosition(position) {\n let lng = position.coords.longitude;\n let lat = position.coords.latitude;\n console.log(_this)\n _this.gnote = {\n lng: lng,\n lat: lat\n }\n\n // var url = `http://api.map.baidu.com/geocoder/v2/?ak=mGaWIHAYzolxcE6hCNwDM4K6mFpyzyaf&location=${lat},${lng}&output=json&pois=1`;\n // $.getJSON(url, function(res) {\n // // $(\"#msg\").html(url);\n // // alert(res.result.addressComponent.city);\n // console.log(res)\n // alert(11)\n // });\n }", "title": "" }, { "docid": "eba607be33ece527889c4b824dd5d478", "score": "0.69873303", "text": "function showPosition(position) {\n var lat = position.coords.latitude;\n var lng = position.coords.longitude;\n var marker = makeMarker(lat, lng);\n $scope.map.markers.pop(marker);\n $scope.map.markers.push(marker);\n $scope.$apply();\n console.log($scope.map.markers[0].coords);\n }", "title": "" }, { "docid": "f7ba26a548551641d4020295c29fb86f", "score": "0.6969156", "text": "function showPosition(rover){\n console.log(\"Position: (\" + rover.x + \", \" + rover.y + \")\");\n}", "title": "" }, { "docid": "b4bc8a253ac1fb609e68b56dceb53452", "score": "0.69581074", "text": "function displayLocation(position) {\n // console.log('position', position);\n var lat = position.coords.latitude;\n var lng = position.coords.longitude;\n //L.marker([lat, lng]).addTo(map);\n //console.log('{longitude:' + lng + ', latitude:' + lat + '}');\n map.setView([lat, lng], 18);\n markerPosizioneAttuale=L.marker([lat, lng]).addTo(map)\n .bindPopup(`<h5><strong>YOU ARE HERE!</strong></h5>`)\n .openPopup();\n\n circlePosizioneAttuale = L.circle([lat, lng], {\n color: 'red',\n fillColor: '#f06',\n fillOpacity: 0.3,\n radius: 100\n }).addTo(map);\n}", "title": "" }, { "docid": "fb26b866d433b2d08695d663b28d2363", "score": "0.69543743", "text": "function getLocation(pos) {\n position = pos;\n}", "title": "" }, { "docid": "c45886ba2ce315115da1bad6e73ec302", "score": "0.6924906", "text": "function displayPosition(x, y) {\n $('#pos').html('top: ' + y + ', left: ' + x);\n}", "title": "" }, { "docid": "3d3706a2e3b2270ce4874f5a94b7a5c4", "score": "0.690876", "text": "function success(pos) {\n const crd = pos.coords;\n document.querySelector(\"#pos1\").innerHTML = `This is latitude : ${crd.latitude}`\n document.querySelector(\"#pos2\").innerHTML = `This is longitute : ${crd.longitude}`\n }", "title": "" }, { "docid": "3048f6c10db737c180333123234b1582", "score": "0.69068867", "text": "function getAndDisplayLocation() {\n if (!navigator.geolocation) {\n latDisplay.textContent = \"Geolocation is not supported by your browser\";\n longDisplay.textContent = \"\";\n } else {\n navigator.geolocation.getCurrentPosition((position) => {\n const lat = position.coords.latitude;\n const long = position.coords.longitude;\n\n latDisplay.textContent += `${lat}`;\n longDisplay.textContent += `${long}`;\n\n bingMap.src = `https://www.bing.com/maps/embed?h=500&w=500&cp=${lat}~${long}&lvl=11&typ=d&sty=r&src=SHELL&FORM=MBEDV8`;\n });\n }\n}", "title": "" }, { "docid": "e384827683effe628ff05595bf0c273c", "score": "0.69043964", "text": "function showPosition() {\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(showMap);\n } else {\n // eslint-disable-next-line no-alert\n alert('Sorry, your browser does not support HTML5 geolocation.');\n }\n}", "title": "" }, { "docid": "0c847a27a76771a692bb7292ff33f1ce", "score": "0.68978614", "text": "function onPositionUpdate(position) {\n console.log(position);\n currentPosition = new LatLon(position.coords.latitude, position.coords.longitude);\n updateScreen();\n}", "title": "" }, { "docid": "16a8155a497c7ab27222b628315e0c0c", "score": "0.6874765", "text": "function showPosition(position)\n {\n\n longitude = position.coords.longitude;\n latitude = position.coords.latitude;\n\n\n //this is for testing\n // alert(\"Your current location:\" + longitude + \" , \" + latitude);\n\n //shows the gif\n $('form #response').removeClass().addClass('processing').html('Processing...').fadeIn('fast');\n\n //changing the values of the forms so we can pass them\n var elem = document.getElementById(\"long\");\n elem.value = longitude;\n\n var ele = document.getElementById(\"lat\");\n ele.value = latitude;\n\n //serializing the values\n var formData = $('form').serialize();\n\n\n //calling the submit form passing the values\n submitForm(formData);\n }", "title": "" }, { "docid": "ee293d7cf891e6de25b9b91c63a9ac50", "score": "0.6872133", "text": "function showCurrentPos() {\r\n\tjsRoutes.controllers.Sheep.positions().ajax({\r\n\t\tdataType: 'json',\r\n\t\tsuccess : function(data) {\r\n\t\t\tmainMap.clearMarkers();\r\n\t\t\t$.each(data, function(key, event){\r\n\t\t\t\tmainMap.addEventMarker(event, false);\r\n\t\t\t\tmainMap.fitBounds();\r\n\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t});\r\n}", "title": "" }, { "docid": "74bba0504ec88e2174167345081461cb", "score": "0.6866329", "text": "function gpsTrackCoords(){\n Bangle.on('GPS',function(fix) {\n if (fix.fix) {\n let lat = fix.lat;\n let lon = fix.lon;\n g.setFont(\"Vector\",20);\n g.setColor(\"#ffffff\");\n g.clearRect(0,220,240,240);\n g.drawString(lat.toFixed(5)+\"° / \"+lon.toFixed(5)+\"°\", xyCenter, 230);\n } else {\n g.setFont(\"Vector\",20);\n g.setColor(\"#ffffff\");\n g.clearRect(0,220,240,240);\n g.drawImage(logoGpsCoord, 10, 220);\n g.drawString(fix.satellites+\" satellites\", xyCenter, 230);\n }\n });\n}", "title": "" }, { "docid": "8168cec0c4c3575e85a81e63666e89a4", "score": "0.6864718", "text": "function localizacion(posicion){\n\t\tvar latitude = posicion.coords.latitude;\n\t\tvar longitude = posicion.coords.longitude;\n\n\t\toutput.innerHTML = \"<p>Latitud: \"+latitude+\"<br>longitud: \"+longitude+ \"</p>\";\n\n\t}", "title": "" }, { "docid": "7bf945a6331c33b8e5e4e8ae5ba1de95", "score": "0.6863619", "text": "function getLocation() {\r\n if (navigator.geolocation) {\r\n navigator.geolocation.watchPosition(showPosition);\r\n map.flyTo({\r\n center: [lng, lat]\r\n });\r\n }\r\n}", "title": "" }, { "docid": "6edcda39a08b4f8a018403eeeb43da16", "score": "0.6859806", "text": "function zajShowMapLocation(point){\n\t\tmyMap.setCenter(point, 15);\t\t\t\n\t\tmyPoint = point;\n\t\tmyCenter = point;\n\t\tmyMap.addOverlay(new GMarker(point));\n\t}", "title": "" }, { "docid": "167bc46a707a58d91889875498c41d07", "score": "0.6858271", "text": "function showPosition(position) {\r\n document.getElementById('showLocation').innerHTML = \"Latitude: \" + position.coords.latitude +\"<br>Longitude: \" + position.coords.longitude;\r\n L.circle([position.coords.latitude, position.coords.longitude], 5, {\r\n color: 'red',\r\n fillColor: 'red',\r\n fillOpacity: 1}\r\n\t ).addTo(mymap).bindPopup(position.coords.latitude.toString()+\",\"+position.coords.longitude.toString()+\"<br />I am here.\").openPopup();\r\n}", "title": "" }, { "docid": "595e55dd3095cbf9db32bbe72354036a", "score": "0.68465847", "text": "function getPosition() {\n\t\n\t//change time box to show updated message\n\t$('#time').val(\"Getting data...\");\n\t\n\t//instruct location service to get position with appropriate callbacks\n\tnavigator.geolocation.getCurrentPosition(successPosition, failPosition);\n}", "title": "" }, { "docid": "26118992521c2b0857f981add98e1353", "score": "0.68403834", "text": "function showUserPosition(position) {\n map.setCenter(new google.maps.LatLng(position.coords.latitude, position.coords.longitude));\n mainMarker = (new google.maps.Marker({\n position: { lat: position.coords.latitude, lng: position.coords.longitude },\n map: map,\n }));\n userPosition.lat = position.coords.latitude;\n userPosition.lng = position.coords.longitude;\n defaultPosition = false;\n}", "title": "" }, { "docid": "9954d134a904962a2668e113b36b3009", "score": "0.68098146", "text": "function showPosition(position) {\n\t\t// SAVE USER COORDINATES\n\t latitude = position.coords.latitude;\n\t longitude = position.coords.longitude;\n\t firebase.database().ref('standsoncampus/' + id).set({\n\t \ttitle: title,\n\t \tpassword: password,\n\t \tdescription : description,\n\t \tcoffee: coffee,\n\t \tlatitude: latitude,\n\t \tlongitude: longitude,\n\t \tid: id\n\t });\n\t \t// UPDATE PAGE TO LOAD MARKER\n \t\t\twindow.location.reload(true);\n\t\t}", "title": "" }, { "docid": "4fe822170188fe2f3f80d0cda86833c7", "score": "0.68078005", "text": "function displayUserPosition(){\n var userLatLng;\n infoWindow = new google.maps.InfoWindow;\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(\n function(position) {\n var pos = {\n //lat: position.coords.latitude,\n //lng: position.coords.longitude\n\n //user position hardcoded to cenetr of market\n lat:carMarketPositionLatitude,\n lng: carMarketPositionLongitude\n };\n //set user position\n //userPositionLat = position.coords.latitude;\n //userPositionLng = position.coords.longitude;\n\n //user position hardcoded to cenetr of market\n userPositionLat=carMarketPositionLatitude;\n userPositionLng=carMarketPositionLongitude;\n\n userLatLng = new google.maps.LatLng({lat: userPositionLat, lng: userPositionLng});\n checkUserPositionInMarketMap(userLatLng);\n\n infoWindow.setPosition(pos);\n infoWindow.setContent('you are here.');\n infoWindow.open(carMarketMap);\n carMarketMap.setCenter(pos);\n },\n function() {\n handleLocationError(true, infoWindow, carMarketMap.getCenter());\n }\n );\n\n }\n else {\n // Browser doesn't support Geolocation\n handleLocationError(false, infoWindow, carMarketMap.getCenter());\n }\n\n}", "title": "" }, { "docid": "7f1c27d2a56da262019b21ea2f60eb16", "score": "0.6805213", "text": "function displayLocation(position) {\n var latitude = position.coords.latitude;\n var longitude = position.coords.longitude;\n\n var mylocation = new google.maps.LatLng(\n latitude,\n longitude);\n var storelocation = new google.maps.LatLng(markers[0].lat, markers[0].lng);\n\n var d = google.maps.geometry.spherical.computeDistanceBetween(mylocation, storelocation) / 1609.34;\n\n var pLocation = document.getElementById(\"location\");\n pLocation.innerHTML += \"Distance Between you and \" + data.title + \" is \" + d.toFixed(2) + \" miles\";\n\n }", "title": "" }, { "docid": "16cd4d90160ac4288545a16387415a03", "score": "0.67956924", "text": "function displayCoordinates (pnt) {\n var coordsLabel = document.getElementById('mouse4326')\n var lat = pnt.lat()\n lat = lat.toFixed(4)\n var lng = pnt.lng()\n lng = lng.toFixed(4)\n coordsLabel.innerHTML = 'EPSG:4326: Latitude: ' + lat + ' Longitude: ' + lng\n}", "title": "" }, { "docid": "464a56c71f002d3274614963457e1c58", "score": "0.67842835", "text": "function showPosition(position) {\n\n // Grab coordinates from the given object\n lat = position.coords.latitude;\n lon = position.coords.longitude;\n\n // if user blocks show location\n if (!position) {\n alert(\"You didn't share you're location.\")\n return\n }\n }", "title": "" }, { "docid": "0d63dddc4eae46964f50c33b106e06b4", "score": "0.6782528", "text": "function showPosition(position) {\n vm.pos.lat = position.coords.latitude;\n vm.pos.lng = position.coords.longitude;\n vm.pos.accuracy = position.coords.accuracy;\n // $scope.$apply();\n getEvents(vm.pos);\n }", "title": "" }, { "docid": "74027082cbc16162edad6efd24639d71", "score": "0.6779529", "text": "function showCurrentLocation(position) {\n\nlet longitude = position.coords.longitude;\nlet latitude = position.coords.latitude;\nlet geoApiKey = \"3719f2615e58e78c75e87773957510b9\";\nlet geoUrl =`https://api.openweathermap.org/data/2.5/weather?lat=${latitude}&lon=${longitude}&units=metric`;\naxios.get(`${geoUrl}&appid=${geoApiKey}`).then(geoCitySwitch);\n}", "title": "" }, { "docid": "cf453111b9f348735d48d147cc3b1315", "score": "0.67688245", "text": "function showCurrentPoint(pt){\n\t//document.getElementById('lng').value= pt.lng;\t\n\t//document.getElementById('lat').value= pt.lat;\n\t$('#lng').val(pt.lng);\n\t$('#lat').val(pt.lat);\n}", "title": "" }, { "docid": "2afcf862a581b3acfdb3ecfdbae778d5", "score": "0.67672765", "text": "function showPosition(position) {\n\tlet latitude = position.coords.latitude;\n\tlet longitude = position.coords.longitude;\n\tlet units = \"metric\";\n\tlet apiKey = \"350541b21f9e750e54359106bf7f6f0d\";\n\tlet apiUrl = `https://api.openweathermap.org/data/2.5/weather?lat=${latitude}&lon=${longitude}&appid=${apiKey}&units=${units}`;\n\taxios.get(apiUrl).then(currentTemperature);\n\n\tapiUrl = `https://api.openweathermap.org/data/2.5/forecast?lat=${latitude}&lon=${longitude}&appid=${apiKey}&units=${units}`;\n\taxios.get(apiUrl).then(displayLocationForecast);\n}", "title": "" }, { "docid": "30795801a6874e2d2ec776f4961616cb", "score": "0.6756948", "text": "function currentGlobalPosition() {\n clearText();\n var mapOptions = {\n zoom: 8,\n center: {lat: 9.9280694, lng: -84.09072459999999}\n}\n var map = new google.maps.Map(document.getElementById('map'),mapOptions);\n var infoWindow = new google.maps.InfoWindow({map: map});\n\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(function(position) {\n var pos = {\n lat: position.coords.latitude,\n lng: position.coords.longitude\n };\n\n infoWindow.setPosition(pos);\n infoWindow.setContent('Su posicion fue encontrada :)');\n map.setCenter(pos);\n console.log(pos);\n $(\"#dataField\").text(\"Informacion de la ubicacion\").attr(\"class\",\"black-text\")\n $(\"#dataResults\").text(\"Informacion:\"+pos.lat+\" \"+pos.lng).attr(\"class\",\"teal-text\");\n }, function() {\n handleLocationError(true, infoWindow, map.getCenter());\n });\n } else {\n // por si no soporta el navegador devuelve el error\n handleLocationError(false, infoWindow, map.getCenter());\n }\n}", "title": "" }, { "docid": "00c8a0dbeb5580eefc2652663ed116f8", "score": "0.67500174", "text": "function showPosition(position) {\n console.log(position);\n let latitude = position.coords.latitude;\n let longitude = position.coords.longitude;\n let apiKey = \"9ca6c562062d122440b16668ce916487\";\n let apiEndPoint = \"https://api.openweathermap.org/data/2.5/weather?\";\n let apiUrl = `${apiEndPoint}lat=${latitude}&lon=${longitude}&appid=${apiKey}&&units=metric`;\n\n axios.get(apiUrl).then(showWeather);\n}", "title": "" }, { "docid": "1f45a5765e2b3a99c40fecf8c7f417f8", "score": "0.67311746", "text": "function showLocalNewsWithGeolocation() {}", "title": "" }, { "docid": "02bc636f0d317d6d54caf1b7212a6cb6", "score": "0.6664487", "text": "function getPosition() {\n\n var options = {\n enableHighAccuracy: true,\n maximumAge: 3600000\n }\n \n var watchID = navigator.geolocation.getCurrentPosition(onSuccess, onError, options);\n\n function onSuccess(position) {\n \n var showInput = document.getElementById('locationSetInput');\n var lat = position.coords.latitude;\n var lon = position.coords.longitude;\n showInput.value = position.coords.latitude + ',' + position.coords.longitude;\n \n }\n\n function onError(error) {\n alert('code: ' + error.code + '\\n' + 'message: ' + error.message + '\\n');\n }\n}", "title": "" }, { "docid": "f984f2e397677cd96d1118cd07957466", "score": "0.66519684", "text": "function getLocation() {\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(showPosition);\n } else {\n latitude = 31.426577;\n longitude = 34.381131;\n }\n}", "title": "" }, { "docid": "08171b638a43c24b620445226d27141b", "score": "0.66470623", "text": "function success(position) {\n var crd = position.coords;\n lat = position.coords.latitude;\n long = position.coords.longitude;\n map.setCenter(new google.maps.LatLng(lat,long));\n // console.log(lat, long)\n var loc_marker = new google.maps.Marker({\n position: {lat:lat,lng:long},\n map: map,\n title: \"You're here\"\n });\n }", "title": "" }, { "docid": "4d2d8a0233dbd9fc18d0bb527db550c8", "score": "0.66450924", "text": "showPosition(position) {\n console.log('inside showposition');\n let display = document.querySelector('.catcher')\n this.setState({\n lat: position.coords.latitude,\n lng: position.coords.longitude\n });\n console.log('this is the setState --> ', this.state);\n display.innerHTML = \"Latitude: \" + position.coords.latitude +\n \"<br>Longitude: \" + position.coords.longitude;\n }", "title": "" }, { "docid": "1a1c0f7574566dec1035f102f88251df", "score": "0.6638775", "text": "function printLatLong(lat, lon) {\n hideFadeInmessage();\n showFadeInmessage('We have your location, Redrawing the map');\n //console.log('lat = ' + lat);\n //console.log('lon = ' + lon);\n zoomandcentre(lat, lon);\n}", "title": "" }, { "docid": "2cfdbcf78af67c1250d2ce14e6bdfcd6", "score": "0.66319394", "text": "function success(position){\n\t\t//fetch coordinates\n\tvar mylat = position.coords.latitude;\n\tvar mylong = position.coords.longitude;\n\t// $('#lat').html(mylat);\n\t// $('#long').html(mylong);\n ///google -api-ready latitude and longitude string\n\nvar coords = new google.maps.LatLng(mylat, mylong);\n\t//setting up google map\n\nvar mapOptions =\n{\n\tzoom:16,\n\tcenter: coords,\n\tmapTypeId: google.maps.MapTypeId.ROADMAP\n} \n\n\t//creating map\n\nvar map = new google.maps.Map(document.getElementById(\"map\"), mapOptions);\n\t//create a marker\n\nvar marker = new google.maps.Marker({map:map,position:coords});\n\n}", "title": "" }, { "docid": "e08ebc17a0df9cc8de207bc397159577", "score": "0.6619338", "text": "function getPositionResult(position) {\n console.log(position.coords.latitude + ' ' position.coords.longitude);\n}", "title": "" }, { "docid": "5c9aa8eab1cb84f76a70e6b232386fe9", "score": "0.6619126", "text": "function showMap() {\n // asynchronous call with callback function specified\n var options = {\n enableHighAccuracy : true,\n timeout : 50000,\n maximumAge : 0\n };\n \n // Default to current location for the search. Other ways of establishing\n // the starting latitude and longitude will be provided.\n navigator.geolocation.getCurrentPosition(\n displayInitialLocation, handleError, options); \n}", "title": "" }, { "docid": "835aa3b24dbabc6e028e2750fb4bd601", "score": "0.6618478", "text": "function getPosition() {\n\t\n\t//change time box to show updated message\n\t$('#time').val(\"Getting data...\");\n\t\n\t//instruct location service to get position with appropriate callbacks\n\tnavigator.geolocation.getCurrentPosition(updateTable, failPosition);\n}", "title": "" }, { "docid": "f9dd3b1ab3e54bfcbf8e83107deaffb7", "score": "0.66154104", "text": "function showMapLocation() {\r\n var lat = $('#lat').val();\r\n var lng = $('#lng').val();\r\n if (lat && lng) {\r\n console.log(\"lat: \" + lat + \" lng\" + lng);\r\n AdjustMapPointer(lat, lng)\r\n }\r\n}", "title": "" }, { "docid": "767dbf05faf4a96f5ef92f039c965691", "score": "0.66120505", "text": "function showPositionOnMap(position) {\n\t/*get latitude and longitude of users position*/\n\tvar myLatLng = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);\n\n\t/*if user changed the zoom level lower than default, zooming has to be done*/\n\tif (impfMap.getZoom() == defaultZoomLevel || impfMap.getZoom() < 10) {\n\t\tvar mapOptions = {\n\t\t\tzoom : 14,\n\t\t\tcenter : myLatLng\n\t\t};\n\t} else {\n\t\tvar mapOptions = {\n\t\t\tcenter : myLatLng\n\t\t};\n\t}\n\n\timpfMap.setOptions(mapOptions);\n\n\t/*either add the marker for users position, or change its position*/\n\tif (userPositionMarker == undefined) {\n\t\tuserPositionMarker = new google.maps.Marker({\n\t\t\tposition : myLatLng,\n\t\t\tmap : impfMap,\n\t\t\ttitle : \"Ihre Position\"\n\t\t});\n\t} else {\n\t\tuserPositionMarker.setPosition(myLatLng);\n\t}\n}", "title": "" }, { "docid": "c5db00c2da30a268bc2798e4f759f51e", "score": "0.66092676", "text": "function getLocation() {\n\t\tvar options = {\n\t\t\tenableHighAccuracy : true,\n\t\t\ttimeout : 5000,\n\t\t\tmaximumAge : 0\n\t\t};\n\t\tnavigator.geolocation.getCurrentPosition(displayLocation, handleError, options) //get the coordinates and display them\n\n\t}", "title": "" }, { "docid": "041732fbce54df51430578178b99bc31", "score": "0.6603945", "text": "function usePosition(position)\n{\n $(\"#latitud\").val(position.coords.latitude);\n $(\"#longitud\").val(position.coords.longitude);\n // centro el mapa en la posición que envía el navegador\n handler.map.centerOn([position.coords.latitude, position.coords.longitude]);\n addMarker(new google.maps.LatLng(position.coords.latitude, position.coords.longitude));\n}", "title": "" }, { "docid": "05b5b928c81d727cddf8b3c1ac0c6942", "score": "0.6601899", "text": "function getLocation() {\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(showPosition);\n } else {\n var x = document.getElementById(\"coordinates\");\n x.innerHTML = \"Geolocation is not supported by this browser.\";\n }\n}", "title": "" }, { "docid": "c7bace2ee98d039f28e1fe09d74adc87", "score": "0.66008663", "text": "function showPosition(position){\r\n //only show zoomed in position if user is logged in\r\n if ($authUser == \"Auth-User-Map\" || $authUser == \"Org-User-Map\") {\r\n mapSetup.position.lat = position.coords.latitude; \r\n mapSetup.position.lng = position.coords.longitude; \r\n mapSetup.zoom = 9;\r\n //Once mapSetup is populated call the initMap()\r\n initMap();\r\n } else {\r\n //Use default map settings\r\n showDefaultMap();\r\n }\r\n}", "title": "" }, { "docid": "c66e9f82076128b2e4bb156bb9911a6b", "score": "0.65880287", "text": "function getPosition(position) {\n var longitude = position.coords.longitude;\n var latitude = position.coords.latitude;\n var appid = \"3bbd55527ee1ad0e5f326312904163d3\";\n\n $(\"#long\").text(\"Latitude: \" + latitude)\n $(\"#lati\").text(\"Longitude: \" + longitude);\n var weatherApi = \"http://api.openweathermap.org/data/2.5/weather?lat=\"+latitude+\"&lon=\"+longitude+\"&appid=\"+appid;\n\n x.text(weatherApi);\n json = (function() {\n var json = null;\n $.ajax({\n 'async': false,\n 'global': false,\n 'url': weatherApi,\n 'success': function(data) {\n json = data;\n }\n });\n return json;\n })();\n\n var temp = json.main.temp;\n setLocation(json);\n setIcon(json);\n $(\"#temperature\").text(kelvinToF(temp));\n }", "title": "" }, { "docid": "4c2885cafd7370c25c19c8ffb4819076", "score": "0.6577481", "text": "function markerLocation(){\n //Get location.\n var currentLocation = map.getCenter();\n //Add lat and lng values to a field that we can save.\n //document.getElementById('lat').value = currentLocation.lat(); //latitude\n //document.getElementById('lng').value = currentLocation.lng(); //longitude\n\n infoWindow.setPosition(currentLocation);\n infoWindow.setContent('Location found.');\n infoWindow.open(map);\n}", "title": "" }, { "docid": "008e65b0964f2b11a46dd0db8c75d27f", "score": "0.6573597", "text": "function _showMyMarkerPosition(GPS){\n \tif( getMap()!=null && GPS!=null && GPS.state == GPS.STATES.ON){\n\t \t\t\ttry{\n\t\t\t if(UserMarker.marker==null){\n\t\t\t\t UserMarker.marker = new google.maps.Marker({\n\t\t\t\t position: GPS.position,\n\t\t\t\t // icon: UserMarker.symbol,\n\t\t\t\t map: getMap()\n\t\t\t\t });\n\t\t\t\t }\n\n\t\t\t\t UserMarker.marker.setPosition({\n lat: GPS.position.latitude,\n lng: GPS.position.longitude\n });\n\t\t\t }catch(e){\n\t\t\t \tconsole.error(e);\n\t\t\t }\n\t\t\t}\n }", "title": "" } ]
289d59c75b49e7a0553d77e419d2d02e
Create page object used in template
[ { "docid": "909c71cf31b9f4c3d2d0a03c87187671", "score": "0.64066094", "text": "function makePage(number, text, isDisabled, isPrevious, isNext) {\n return {\n number: number,\n text: text,\n disabled: isDisabled,\n previous: ( align && isPrevious ),\n next: ( align && isNext )\n };\n }", "title": "" } ]
[ { "docid": "ab0e693d71bbf8420f9838b90f78618f", "score": "0.7618371", "text": "function createPage(config) {\n if (Object.prototype.toString.call(config).match(/\\[object (\\w+)\\]/)[1].toLowerCase() !== 'object') return;\n this.pageName = config.name;\n}", "title": "" }, { "docid": "a367b207d8d207c4ae4ca3e22529db37", "score": "0.7564235", "text": "function pageCreate(type, page, pageTree) {\n pageComponent.is_Page(type, page, pageTree);\n pageComponentParse(page, pageTree);\n}", "title": "" }, { "docid": "65635cad0131871f1702413e922223ff", "score": "0.7480187", "text": "function _createPageView(){\n this.pageView = new PageView({ pageData : PageData });\n\n this.add(this.pageView);\n }", "title": "" }, { "docid": "9f01c10d48ed88be0125e106ba9a64f6", "score": "0.73540306", "text": "static createPage(obj,data,work){\n let newPage = document.createElement(\"story-page\");\n obj.appendChild(newPage);\n newPage.data = data;\n newPage.work = work;\n }", "title": "" }, { "docid": "054c91b28a6fd96768838ab1f36c9768", "score": "0.72638154", "text": "function createPage(page) {\n pages.push(page);\n }", "title": "" }, { "docid": "cdef3446e299e56dd982080cabc36510", "score": "0.72587", "text": "createPage() {\n return {\n pageName: '',\n sections: [\n {\n type: 'text',\n source: 'Welcome to Gistbook!'\n },\n {\n type: 'html',\n source: ''\n },\n {\n type: 'css',\n source: ''\n },\n {\n type: 'javascript',\n source: ''\n }\n ]\n };\n }", "title": "" }, { "docid": "599a3039416ff80563d4181d45639bab", "score": "0.71237606", "text": "function Page() {}", "title": "" }, { "docid": "3efe343623ac12c90d8e0153d9f5fe15", "score": "0.70953244", "text": "function makePage(number, text, isActive) {\n\t return {\n\t number: number,\n\t text: text,\n\t active: isActive\n\t };\n\t }", "title": "" }, { "docid": "3efe343623ac12c90d8e0153d9f5fe15", "score": "0.70953244", "text": "function makePage(number, text, isActive) {\n\t return {\n\t number: number,\n\t text: text,\n\t active: isActive\n\t };\n\t }", "title": "" }, { "docid": "3efe343623ac12c90d8e0153d9f5fe15", "score": "0.70953244", "text": "function makePage(number, text, isActive) {\n\t return {\n\t number: number,\n\t text: text,\n\t active: isActive\n\t };\n\t }", "title": "" }, { "docid": "0323812b19432138103bb758816d6dd1", "score": "0.70840865", "text": "function makePage(number, text, isActive, isDisabled) {\n return {\n number: number,\n text: text,\n active: isActive,\n disabled: isDisabled\n };\n }", "title": "" }, { "docid": "0323812b19432138103bb758816d6dd1", "score": "0.70840865", "text": "function makePage(number, text, isActive, isDisabled) {\n return {\n number: number,\n text: text,\n active: isActive,\n disabled: isDisabled\n };\n }", "title": "" }, { "docid": "0323812b19432138103bb758816d6dd1", "score": "0.70840865", "text": "function makePage(number, text, isActive, isDisabled) {\n return {\n number: number,\n text: text,\n active: isActive,\n disabled: isDisabled\n };\n }", "title": "" }, { "docid": "0323812b19432138103bb758816d6dd1", "score": "0.70840865", "text": "function makePage(number, text, isActive, isDisabled) {\n return {\n number: number,\n text: text,\n active: isActive,\n disabled: isDisabled\n };\n }", "title": "" }, { "docid": "0323812b19432138103bb758816d6dd1", "score": "0.70840865", "text": "function makePage(number, text, isActive, isDisabled) {\n return {\n number: number,\n text: text,\n active: isActive,\n disabled: isDisabled\n };\n }", "title": "" }, { "docid": "0323812b19432138103bb758816d6dd1", "score": "0.70840865", "text": "function makePage(number, text, isActive, isDisabled) {\n return {\n number: number,\n text: text,\n active: isActive,\n disabled: isDisabled\n };\n }", "title": "" }, { "docid": "0323812b19432138103bb758816d6dd1", "score": "0.70840865", "text": "function makePage(number, text, isActive, isDisabled) {\n return {\n number: number,\n text: text,\n active: isActive,\n disabled: isDisabled\n };\n }", "title": "" }, { "docid": "0323812b19432138103bb758816d6dd1", "score": "0.70840865", "text": "function makePage(number, text, isActive, isDisabled) {\n return {\n number: number,\n text: text,\n active: isActive,\n disabled: isDisabled\n };\n }", "title": "" }, { "docid": "ddbd1ea0e006b1ff1163c4f01e3a69a5", "score": "0.7062352", "text": "function makePage(number, text, isActive, isDisabled) {\n return {\n number: number,\n text: text,\n active: isActive,\n disabled: isDisabled\n };\n }", "title": "" }, { "docid": "ddbd1ea0e006b1ff1163c4f01e3a69a5", "score": "0.7062352", "text": "function makePage(number, text, isActive, isDisabled) {\n return {\n number: number,\n text: text,\n active: isActive,\n disabled: isDisabled\n };\n }", "title": "" }, { "docid": "d915f19c3515e89d426383808fb26af7", "score": "0.7058696", "text": "function makePage(number, text, isActive, isDisabled) {\n return {\n number: number,\n text: text,\n active: isActive,\n disabled: isDisabled\n };\n }", "title": "" }, { "docid": "a84af71ffd890b4c0ece2fd84501c13c", "score": "0.70586675", "text": "function makePage(number, text, isActive, isDisabled) {\n return {\n number: number,\n text: text,\n active: isActive,\n disabled: isDisabled\n };\n }", "title": "" }, { "docid": "e6e81500b17e12fa237ebc14ae3fc585", "score": "0.70438635", "text": "function _getPageObj(entity) {\n try {\n var obj = new page({\n pageId: entity.pageId,\n pageName: entity.pageName,\n });\n\n // push section Object into page \n obj.sectionList.push(_getSectionObj(entity));\n\n return obj;\n } catch (e) {\n showErrorMsg(e);\n }\n }", "title": "" }, { "docid": "cbf7322140a5941040666e47ac4eb3d2", "score": "0.7038151", "text": "function makePage(number, text, isActive) {\n\t\t return {\n\t\t number: number,\n\t\t text: text,\n\t\t active: isActive\n\t\t };\n\t\t }", "title": "" }, { "docid": "1e7a3f56dc60f1119aec7be6a99c2a8d", "score": "0.7021103", "text": "makePage(num, text, isActive) {\n return { num, text, active: isActive };\n }", "title": "" }, { "docid": "08c35ae1907c4fc749339212fddb6078", "score": "0.70142883", "text": "function makePage(number, text, isActive) {\n\t return {\n\t number: number,\n\t text: text,\n\t active: isActive\n\t };\n\t }", "title": "" }, { "docid": "08c35ae1907c4fc749339212fddb6078", "score": "0.70142883", "text": "function makePage(number, text, isActive) {\n\t return {\n\t number: number,\n\t text: text,\n\t active: isActive\n\t };\n\t }", "title": "" }, { "docid": "28d7b070b1dad98cca0a95a5ece74f4c", "score": "0.7011579", "text": "function createPage() {\n var pageInstance = new Page();\n\n function pageFn(/* args */) {\n return page.apply(pageInstance, arguments);\n }\n\n // Copy all of the things over. In 2.0 maybe we use setPrototypeOf\n pageFn.callbacks = pageInstance.callbacks;\n pageFn.exits = pageInstance.exits;\n pageFn.base = pageInstance.base.bind(pageInstance);\n pageFn.strict = pageInstance.strict.bind(pageInstance);\n pageFn.start = pageInstance.start.bind(pageInstance);\n pageFn.stop = pageInstance.stop.bind(pageInstance);\n pageFn.show = pageInstance.show.bind(pageInstance);\n pageFn.back = pageInstance.back.bind(pageInstance);\n pageFn.redirect = pageInstance.redirect.bind(pageInstance);\n pageFn.replace = pageInstance.replace.bind(pageInstance);\n pageFn.dispatch = pageInstance.dispatch.bind(pageInstance);\n pageFn.exit = pageInstance.exit.bind(pageInstance);\n pageFn.configure = pageInstance.configure.bind(pageInstance);\n pageFn.sameOrigin = pageInstance.sameOrigin.bind(pageInstance);\n pageFn.clickHandler = pageInstance.clickHandler.bind(pageInstance);\n\n pageFn.create = createPage;\n\n Object.defineProperty(pageFn, 'len', {\n get: function(){\n return pageInstance.len;\n },\n set: function(val) {\n pageInstance.len = val;\n }\n });\n\n Object.defineProperty(pageFn, 'current', {\n get: function(){\n return pageInstance.current;\n },\n set: function(val) {\n pageInstance.current = val;\n }\n });\n\n // In 2.0 these can be named exports\n pageFn.Context = Context;\n pageFn.Route = Route;\n\n return pageFn;\n }", "title": "" }, { "docid": "b4874821c6b13bae20ba2e0fe854f3b9", "score": "0.69706833", "text": "function makePage(number, text, isActive) {\n return {\n number: number,\n text: text,\n active: isActive\n };\n }", "title": "" }, { "docid": "b4874821c6b13bae20ba2e0fe854f3b9", "score": "0.69706833", "text": "function makePage(number, text, isActive) {\n return {\n number: number,\n text: text,\n active: isActive\n };\n }", "title": "" }, { "docid": "b4874821c6b13bae20ba2e0fe854f3b9", "score": "0.69706833", "text": "function makePage(number, text, isActive) {\n return {\n number: number,\n text: text,\n active: isActive\n };\n }", "title": "" }, { "docid": "b4874821c6b13bae20ba2e0fe854f3b9", "score": "0.69706833", "text": "function makePage(number, text, isActive) {\n return {\n number: number,\n text: text,\n active: isActive\n };\n }", "title": "" }, { "docid": "b4874821c6b13bae20ba2e0fe854f3b9", "score": "0.69706833", "text": "function makePage(number, text, isActive) {\n return {\n number: number,\n text: text,\n active: isActive\n };\n }", "title": "" }, { "docid": "b4874821c6b13bae20ba2e0fe854f3b9", "score": "0.69706833", "text": "function makePage(number, text, isActive) {\n return {\n number: number,\n text: text,\n active: isActive\n };\n }", "title": "" }, { "docid": "b4874821c6b13bae20ba2e0fe854f3b9", "score": "0.69706833", "text": "function makePage(number, text, isActive) {\n return {\n number: number,\n text: text,\n active: isActive\n };\n }", "title": "" }, { "docid": "b4874821c6b13bae20ba2e0fe854f3b9", "score": "0.69706833", "text": "function makePage(number, text, isActive) {\n return {\n number: number,\n text: text,\n active: isActive\n };\n }", "title": "" }, { "docid": "b4874821c6b13bae20ba2e0fe854f3b9", "score": "0.69706833", "text": "function makePage(number, text, isActive) {\n return {\n number: number,\n text: text,\n active: isActive\n };\n }", "title": "" }, { "docid": "b4874821c6b13bae20ba2e0fe854f3b9", "score": "0.69706833", "text": "function makePage(number, text, isActive) {\n return {\n number: number,\n text: text,\n active: isActive\n };\n }", "title": "" }, { "docid": "b4874821c6b13bae20ba2e0fe854f3b9", "score": "0.69706833", "text": "function makePage(number, text, isActive) {\n return {\n number: number,\n text: text,\n active: isActive\n };\n }", "title": "" }, { "docid": "b4874821c6b13bae20ba2e0fe854f3b9", "score": "0.69706833", "text": "function makePage(number, text, isActive) {\n return {\n number: number,\n text: text,\n active: isActive\n };\n }", "title": "" }, { "docid": "b4874821c6b13bae20ba2e0fe854f3b9", "score": "0.69706833", "text": "function makePage(number, text, isActive) {\n return {\n number: number,\n text: text,\n active: isActive\n };\n }", "title": "" }, { "docid": "b4874821c6b13bae20ba2e0fe854f3b9", "score": "0.69706833", "text": "function makePage(number, text, isActive) {\n return {\n number: number,\n text: text,\n active: isActive\n };\n }", "title": "" }, { "docid": "b4874821c6b13bae20ba2e0fe854f3b9", "score": "0.69706833", "text": "function makePage(number, text, isActive) {\n return {\n number: number,\n text: text,\n active: isActive\n };\n }", "title": "" }, { "docid": "b4874821c6b13bae20ba2e0fe854f3b9", "score": "0.69706833", "text": "function makePage(number, text, isActive) {\n return {\n number: number,\n text: text,\n active: isActive\n };\n }", "title": "" }, { "docid": "b4874821c6b13bae20ba2e0fe854f3b9", "score": "0.69706833", "text": "function makePage(number, text, isActive) {\n return {\n number: number,\n text: text,\n active: isActive\n };\n }", "title": "" }, { "docid": "b4874821c6b13bae20ba2e0fe854f3b9", "score": "0.69706833", "text": "function makePage(number, text, isActive) {\n return {\n number: number,\n text: text,\n active: isActive\n };\n }", "title": "" }, { "docid": "b4874821c6b13bae20ba2e0fe854f3b9", "score": "0.69706833", "text": "function makePage(number, text, isActive) {\n return {\n number: number,\n text: text,\n active: isActive\n };\n }", "title": "" }, { "docid": "b4874821c6b13bae20ba2e0fe854f3b9", "score": "0.69706833", "text": "function makePage(number, text, isActive) {\n return {\n number: number,\n text: text,\n active: isActive\n };\n }", "title": "" }, { "docid": "b4874821c6b13bae20ba2e0fe854f3b9", "score": "0.69706833", "text": "function makePage(number, text, isActive) {\n return {\n number: number,\n text: text,\n active: isActive\n };\n }", "title": "" }, { "docid": "b4874821c6b13bae20ba2e0fe854f3b9", "score": "0.69706833", "text": "function makePage(number, text, isActive) {\n return {\n number: number,\n text: text,\n active: isActive\n };\n }", "title": "" }, { "docid": "b4874821c6b13bae20ba2e0fe854f3b9", "score": "0.69706833", "text": "function makePage(number, text, isActive) {\n return {\n number: number,\n text: text,\n active: isActive\n };\n }", "title": "" }, { "docid": "64f380ce701de09a4914d584939d3208", "score": "0.6965487", "text": "function makePage(number, text, isActive) {\n return {\n number: number,\n text: text,\n active: isActive\n };\n }", "title": "" }, { "docid": "64f380ce701de09a4914d584939d3208", "score": "0.6965487", "text": "function makePage(number, text, isActive) {\n return {\n number: number,\n text: text,\n active: isActive\n };\n }", "title": "" }, { "docid": "64f380ce701de09a4914d584939d3208", "score": "0.6965487", "text": "function makePage(number, text, isActive) {\n return {\n number: number,\n text: text,\n active: isActive\n };\n }", "title": "" }, { "docid": "64f380ce701de09a4914d584939d3208", "score": "0.6965487", "text": "function makePage(number, text, isActive) {\n return {\n number: number,\n text: text,\n active: isActive\n };\n }", "title": "" }, { "docid": "18c882c68504efcb397002d281fa65dc", "score": "0.69642", "text": "makePage(number, text, isActive) {\n return {\n number: number,\n text: text,\n active: isActive\n };\n }", "title": "" }, { "docid": "9d9f6f74b0cd64080c38a2b538f4f4ea", "score": "0.696323", "text": "function createPage() {\n var pageInstance = new Page();\n\n function pageFn(/* args */) {\n return page.apply(pageInstance, arguments);\n }\n\n // Copy all of the things over. In 2.0 maybe we use setPrototypeOf\n pageFn.callbacks = pageInstance.callbacks;\n pageFn.exits = pageInstance.exits;\n pageFn.base = pageInstance.base.bind(pageInstance);\n pageFn.strict = pageInstance.strict.bind(pageInstance);\n pageFn.start = pageInstance.start.bind(pageInstance);\n pageFn.stop = pageInstance.stop.bind(pageInstance);\n pageFn.show = pageInstance.show.bind(pageInstance);\n pageFn.back = pageInstance.back.bind(pageInstance);\n pageFn.redirect = pageInstance.redirect.bind(pageInstance);\n pageFn.replace = pageInstance.replace.bind(pageInstance);\n pageFn.dispatch = pageInstance.dispatch.bind(pageInstance);\n pageFn.exit = pageInstance.exit.bind(pageInstance);\n pageFn.configure = pageInstance.configure.bind(pageInstance);\n pageFn.sameOrigin = pageInstance.sameOrigin.bind(pageInstance);\n pageFn.clickHandler = pageInstance.clickHandler.bind(pageInstance);\n\n pageFn.create = createPage;\n\n Object.defineProperty(pageFn, 'len', {\n get: function(){\n return pageInstance.len;\n },\n set: function(val) {\n pageInstance.len = val;\n }\n });\n\n Object.defineProperty(pageFn, 'current', {\n get: function(){\n return pageInstance.current;\n },\n set: function(val) {\n pageInstance.current = val;\n }\n });\n\n // In 2.0 these can be named exports\n pageFn.Context = Context;\n pageFn.Route = Route;\n\n return pageFn;\n }", "title": "" }, { "docid": "37ff87f92dc4d3f37d2cd043dfb72adb", "score": "0.69528395", "text": "function createPage()\n{\n\twebPage = require('webpage');\n\tpage = webPage.create();\n\tgetUserInput();\n\t\n}", "title": "" }, { "docid": "d47e0e00635006418e44600dd4f40208", "score": "0.69495475", "text": "function makePage(number, text, isActive) {\n return {\n number: number,\n text: text,\n active: isActive\n };\n }", "title": "" }, { "docid": "d47e0e00635006418e44600dd4f40208", "score": "0.69495475", "text": "function makePage(number, text, isActive) {\n return {\n number: number,\n text: text,\n active: isActive\n };\n }", "title": "" }, { "docid": "14a0211a21f6acc279a3301421bf7592", "score": "0.69477427", "text": "function makePage(number, text, isActive) {\r\n return {\r\n number: number,\r\n text: text,\r\n active: isActive\r\n };\r\n }", "title": "" }, { "docid": "a100d23e808e4c944092be7c9adcd47b", "score": "0.69415027", "text": "function makePage(number, text, isActive) {\n return {\n number: number,\n text: text,\n active: isActive\n };\n }", "title": "" }, { "docid": "3d094423cee7bb983259ef4b33a9b438", "score": "0.69404423", "text": "constructor(page) {\r\n this.page = page\r\n }", "title": "" }, { "docid": "b803bebcea06488f9b69e6488337b241", "score": "0.6935263", "text": "function makePage(number, text, isActive) {\r\n return {\r\n number: number,\r\n text: text,\r\n active: isActive\r\n };\r\n }", "title": "" }, { "docid": "111245291ff890a9698045f4d1d71731", "score": "0.6924051", "text": "function createPage() {\n var pageInstance = new Page();\n\n function pageFn()\n /* args */\n {\n return page.apply(pageInstance, arguments);\n } // Copy all of the things over. In 2.0 maybe we use setPrototypeOf\n\n\n pageFn.callbacks = pageInstance.callbacks;\n pageFn.exits = pageInstance.exits;\n pageFn.base = pageInstance.base.bind(pageInstance);\n pageFn.strict = pageInstance.strict.bind(pageInstance);\n pageFn.start = pageInstance.start.bind(pageInstance);\n pageFn.stop = pageInstance.stop.bind(pageInstance);\n pageFn.show = pageInstance.show.bind(pageInstance);\n pageFn.back = pageInstance.back.bind(pageInstance);\n pageFn.redirect = pageInstance.redirect.bind(pageInstance);\n pageFn.replace = pageInstance.replace.bind(pageInstance);\n pageFn.dispatch = pageInstance.dispatch.bind(pageInstance);\n pageFn.exit = pageInstance.exit.bind(pageInstance);\n pageFn.configure = pageInstance.configure.bind(pageInstance);\n pageFn.sameOrigin = pageInstance.sameOrigin.bind(pageInstance);\n pageFn.clickHandler = pageInstance.clickHandler.bind(pageInstance);\n pageFn.create = createPage;\n Object.defineProperty(pageFn, 'len', {\n get: function get() {\n return pageInstance.len;\n },\n set: function set(val) {\n pageInstance.len = val;\n }\n });\n Object.defineProperty(pageFn, 'current', {\n get: function get() {\n return pageInstance.current;\n },\n set: function set(val) {\n pageInstance.current = val;\n }\n }); // In 2.0 these can be named exports\n\n pageFn.Context = Context;\n pageFn.Route = Route;\n return pageFn;\n}", "title": "" }, { "docid": "b161e35df365b5a3746654d009e57cbf", "score": "0.6828526", "text": "function Page(pid) {\n this.pid = pid;\n this.title = \"\";\n this.body = \"\";\n}", "title": "" }, { "docid": "609ded97980e948c9899e047df873e83", "score": "0.6795921", "text": "function createPage(options) {\n var pageInstance = new Page();\n\n function pageFn(/* args */) {\n return page.apply(pageInstance, arguments);\n }\n\n // Copy all of the things over. In 2.0 maybe we use setPrototypeOf\n pageFn.callbacks = pageInstance.callbacks;\n pageFn.exits = pageInstance.exits;\n pageFn.base = pageInstance.base.bind(pageInstance);\n pageFn.strict = pageInstance.strict.bind(pageInstance);\n pageFn.start = pageInstance.start.bind(pageInstance);\n pageFn.stop = pageInstance.stop.bind(pageInstance);\n pageFn.show = pageInstance.show.bind(pageInstance);\n pageFn.back = pageInstance.back.bind(pageInstance);\n pageFn.redirect = pageInstance.redirect.bind(pageInstance);\n pageFn.replace = pageInstance.replace.bind(pageInstance);\n pageFn.dispatch = pageInstance.dispatch.bind(pageInstance);\n pageFn.exit = pageInstance.exit.bind(pageInstance);\n pageFn.configure = pageInstance.configure.bind(pageInstance);\n pageFn.sameOrigin = pageInstance.sameOrigin.bind(pageInstance);\n pageFn.clickHandler = pageInstance.clickHandler.bind(pageInstance);\n\n pageFn.create = createPage;\n\n Object.defineProperty(pageFn, 'len', {\n get: function(){\n return pageInstance.len;\n },\n set: function(val) {\n pageInstance.len = val;\n }\n });\n\n Object.defineProperty(pageFn, 'current', {\n get: function(){\n return pageInstance.current;\n },\n set: function(val) {\n pageInstance.current = val;\n }\n });\n\n // In 2.0 these can be named exports\n pageFn.Context = Context;\n pageFn.Route = Route;\n\n return pageFn;\n }", "title": "" }, { "docid": "6486d6efcd6228ed4dffc5f0c4291d38", "score": "0.6753881", "text": "function generatePage() {\n}", "title": "" }, { "docid": "1fa533f93f6cefba570202a25497a115", "score": "0.65978944", "text": "function pageObject(url) {\n\n this.splitUrl = url.split(\"/\");\n\n this.pageUrl = url;\n\n this.pageType = function() {\n\n \tif (this.splitUrl[3] === \"route\" && this.splitUrl[4] === \"stats\") {\n\n return \"stats\"\n\n }\n\n if (this.splitUrl[3] === \"route\") {\n\n return \"route\"\n\n }\n if (this.splitUrl[3] === \"user\") {\n\n return \"user\"\n\n } else {\n\n return \"other\"\n\n };\n };\n\n this.id = this.splitUrl[4];\n\n}", "title": "" }, { "docid": "c58835c1d1d90b3a0068a8447008c4fe", "score": "0.6574227", "text": "function combineTemplateAndPage () {\n var template = pageAndTemplateObjects.objectData.template || {};\n var page = pageAndTemplateObjects.objectData.page || {};\n pageObject.formModel = pageAndTemplateObjects.formDataModel;\n\n pageObject.settings = {};\n pageObject.settings.mode = pageData.objectType || 'preview';\n pageObject.settings.objectId = pageData.objectId;\n pageObject.settings.ip = pageData.ip || '';\n if (page.templateId) {\n pageObject.settings.templateId = page.templateId;\n }\n\n // merge images lists\n page.assets = page.assets || {};\n page.assets.images = page.assets.images || {};\n template.assets = template.assets || {};\n template.assets.images = template.assets.images || {};\n pageObject.assets.images = pageObject.assets.images || {};\n mergeOptions(template.assets.images, page.assets.images, pageObject.assets.images);\n\n pageObject.html = template.html || '';\n pageObject.templateCSS = template.CSS || '';\n pageObject.pageCSS = page.CSS || '';\n\n pageObject.formTemplate = template.form || [];\n pageObject.formPage = page.form || [];\n\n updateEditableForm();\n\n //add the page form inputs to the template inputs\n pageObject.content = mergeOptions(template.content, page.content, pageObject.content);\n pageObject.styles = mergeOptions(template.styles, page.styles, pageObject.styles);\n\n return pageObject;\n }", "title": "" }, { "docid": "be3c65dbc91c14492692dc005ef751e2", "score": "0.6562581", "text": "function CreateSubPage(params){\n\treturn new Documents(params)\n}", "title": "" }, { "docid": "e81f9fb3689316e19f5b5bbefe0c7bd8", "score": "0.654858", "text": "function createPage(websiteId, page) {\n\t\t\treturn $http.post(\"/api/website/\"+websiteId+\"/page\", page)\n .then(function (response) {\n return response.data;\n });\n\t\t}", "title": "" }, { "docid": "a5a6819088555359e769ebac12dafe49", "score": "0.6522859", "text": "function Page() {\n }", "title": "" }, { "docid": "a6d7e5f33b27efc51f17572282cd4fb8", "score": "0.651068", "text": "static create(model) {\n return internal.instancehelpers.createElement(model, RegularPageTemplateType);\n }", "title": "" }, { "docid": "e323ceab1858a2e07e97d4087e8c52c5", "score": "0.6510162", "text": "function Page () {\n\t\tthis.node \t\t= null;\n\t\tthis.pageInfo\t= null;\n\t\tthis.visible\t= false;\n\t\tthis.hideTime\t= 0;\n\t\tthis.pageHash\t= \"\";\n\t}", "title": "" }, { "docid": "7076387e89a6f7d4ec02fdca347864ba", "score": "0.64972794", "text": "function makePage(number, text, isActive) {\n return {\n number: number,\n text: text,\n active: isActive,\n disabled: text == '...',\n };\n }", "title": "" }, { "docid": "230a0d613f770b5fc15588c2d1546c1f", "score": "0.6487465", "text": "function _getMainPageObj(entity) {\n try {\n var obj = new mainPage({\n mainPageId: entity.mainPageId,\n mainPageName: entity.mainPageName\n });\n\n // push page object into main page \n obj.pageList.push(_getPageObj(entity));\n\n return obj;\n } catch (e) {\n showErrorMsg(e);\n }\n }", "title": "" }, { "docid": "d8157aa959d85fd1b5870723de72ae2d", "score": "0.64711976", "text": "function createHomePage(obj)\r\n{\r\n var mainDiv = document.createElement('article');\r\n mainDiv.classList.add('blog-card');\r\n \r\n var productLink = document.createElement('a');\r\n productLink.href = '/product/details.html? p=' + obj.id;\r\n \r\n // var productImage = document.createElement('image');\r\n productImage.classList.add('blog-pic');\r\n productImage.src=obj.preview;\r\n productImage.alt = obj.name + 'pic';\r\n \r\n productLink.appendChild(productImage);\r\n \r\n var innerDiv = document.createElement('div');\r\n innerDiv.classList.add('product-meta');\r\n\r\n\r\n var productName = document.createElement('h1');\r\n var productNameText = document.createTextNode(obj.name);\r\n productName.appendChild(productNameText);\r\n\r\n\r\n var productBrand = document.createElement('h2');\r\n var productBrandText = document.createTextNode(obj.brand);\r\n productBrand.appendChild(productBrandText);\r\n\r\n \r\n var productPrice = document.createElement('p');\r\n var productPriceText = document.createTextNode('Rs ' + obj.price);\r\n productPrice.appendChild(productPriceText);\r\n\r\n\r\n innerDiv.appendChild(productName);\r\n innerDiv.appendChild(productBrand);\r\n innerDiv.appendChild(productPrice);\r\n\r\n mainDiv.appendChild(productLink);\r\n mainDiv.appendChild(innerDiv);\r\n \r\n\r\n return mainDiv;\r\n \r\n\r\n\r\n}", "title": "" }, { "docid": "7d8e54c922824cd8c3aa504733b3394f", "score": "0.6469947", "text": "function createThePage(_book) {\n let theTitle = document.title;\n let theMap;\n //setzen der Variable theMap abhängig von der Seite die geladen wird\n if (theTitle === _book.heads.ident) {\n theMap = _book.heads;\n }\n else if (theTitle === _book.bodies.ident) {\n theMap = _book.bodies;\n }\n else if (theTitle === _book.legs.ident) {\n theMap = _book.legs;\n }\n else if (theTitle === \"klappbuch\") {\n createKlappbuch(klappbuch.book3);\n }\n //wenn Variable theMap gültig gesetzt, Seite erzeugen\n if (theMap) {\n createAllTheImages(theMap);\n }\n }", "title": "" }, { "docid": "2e71f3c1f74e79ecb4863fa31f1809de", "score": "0.64498216", "text": "function buildPage(\n ctx /*: Context */,\n { node, actions, next, previous } /*: { node: any, actions: Actions } */\n) {\n const { createPage } = actions\n\n const extraContext =\n typeof ctx.buildContext === 'function' && ctx.buildContext(node)\n\n const context = {\n next,\n nodeType: 'post',\n node_id: node.id,\n previous,\n slug: node.fields.slug,\n title: node.frontmatter.title,\n ...(extraContext || {})\n }\n\n createPage({\n component: ctx.templatePath,\n context,\n path: node.fields.slug\n })\n}", "title": "" }, { "docid": "b78a99b1bd8a2d5f5d80c8c33c531524", "score": "0.6447826", "text": "function createNewPage(){\r\n\tif(hasNothingUnsaved()){\r\n\t\tnoImage = true;\r\n\t\tcurrPageId = '';\r\n\t\t// Set the page name\r\n\t\tcurrPageName = '';\r\n\t\t$('#page-name').text(currPageName);\r\n\t\t$('#page-name-sp').text(currPageName);\r\n\t\t$('#page-name-sp').addClass('highlight');\r\n\t\t// Remove the image src attribute\r\n\t\t$('.page-img').removeAttr('src');\r\n\t\t// Overlay the links\r\n\t\t$('#links > .link').remove();\r\n\t\t$('#popup-menu').hide();\r\n\t\t// Dropdown the \"Image\" dropdown and don't let it undrop until an image has been chosen\r\n\t\tcloseDropdowns(null, null);\r\n\t\t$('#image-dropdown').slideDown(200);\r\n\t\t$('#image-edit').addClass('upside');\r\n\t\t// Unhide the jump pages\r\n\t\tvar selector = '.page-obj, .jump-page-obj';\r\n\t\t$(selector).removeClass('noshow');\r\n\t}else{\r\n\t\talert('You haven\\'t saved something');\r\n\t}\r\n}", "title": "" }, { "docid": "fe2397a0fb31bf3df4d26a8130feac67", "score": "0.640607", "text": "newPage() {\n return this._browser._createPageInContext(this._id);\n }", "title": "" }, { "docid": "9f50e5a896e1e9797d39ecfeba8e5d58", "score": "0.63980824", "text": "function newPage(pageclass, pageId) {\r\n\tvar $wrapper = $(\"#application-page\").attr(\"class\", pageclass)\r\n\t\t\t\t\t\t\t\t\t\t .empty();\r\n\treturn $('<div>').addClass(pageclass + '-content').data(\"id\", pageId).appendTo($wrapper);\r\n}", "title": "" }, { "docid": "7f0777a6a2fbb3eafa1961c759934f09", "score": "0.6387705", "text": "static create(model) {\n return internal.instancehelpers.createElement(model, PageVariable);\n }", "title": "" }, { "docid": "11ab9efffbb26b3edffa6b2ca1868dd6", "score": "0.6373064", "text": "function Page(id, url, name) {\n this.id = id;\n this.url = url;\n this.name = name;\n }", "title": "" }, { "docid": "351b80714c88f97a334e17fa44be5313", "score": "0.6368471", "text": "function makePage(number, text, isDisabled, isPrevious, isNext) {\n return {\n number: number,\n text: text,\n disabled: isDisabled,\n previous: ( align && isPrevious ),\n next: ( align && isNext )\n };\n }", "title": "" }, { "docid": "079199bcf32a63a729014ffebe9ada3d", "score": "0.63532126", "text": "function PageLayout() {\n RenderController.prototype.constructor.apply(this, arguments);\n this.pages = {};\n Engine.emit('created',this);\n }", "title": "" }, { "docid": "0274ddc09e45b869d7069e8c7270b1bf", "score": "0.63385624", "text": "function makePage(number, text, isDisabled, isPrevious, isNext) {\n return {\n number: number,\n text: text,\n disabled: isDisabled,\n previous: ( align && isPrevious ),\n next: ( align && isNext )\n };\n }", "title": "" }, { "docid": "c44cdd9bb46bb1731235a74cdbd7911b", "score": "0.6330897", "text": "function createPage(page) {\n vm.error = \"\";\n\n if (!page.name) {\n vm.error = \"A page name is required\";\n return;\n }\n\n // route the user to the page-list page if page creation is successful\n PageService\n .createPage(vm.websiteId, page)\n .then(createPageSuccess, createPageError);\n }", "title": "" }, { "docid": "7e0790c5796afff99630dd6f8dd3f39e", "score": "0.63248813", "text": "function Page(name, menuName, iconName, title, isTopLevel, dataFunction) {\n\t\tpageIdCounter++;\n\t\t// Unique id for this page. Can be used as a safe identifier (no special chars) in the DOM etc.\n\t\tthis.id = pageIdCounter;\n\t\t// Page name, for internal reference use only. Must be unique as well.\n\t\tthis.name = name;\n\t\t// The name of the module for the page. Used as template name, javascript module name, etc.\n\t\tthis.moduleName = extractModuleName(name);\n\t\t// The name of this page as it should be displayed in a menu.\n\t\tthis.menuName = menuName;\n\t\t// The name of the icon to use for this page.\n\t\tthis.iconName = iconName;\n\t\t// The title of this page as it should be displayed when this page is active.\n\t\tthis.title = title;\n\t\t// Whether or not this is a top level page (meaning it should be in the top level menu items)\n\t\tthis.isTopLevel = isTopLevel;\n\t\t// The array of sub pages for this page.\n\t\tthis.subPages = [];\n\t\t// The function to be called to get the input data for this page.\n\t\tthis.dataFunction = dataFunction;\n\t\t// The javascript module that contains the dynamic page logic, will be lazy loaded when required.\n\t\tthis.jsObject = null;\n\t\t\n\t\t// Create a div element for this page, that will be used to contain the DOM tree and show / hide the page.\n\t\tthis.contentElement = $(document.createElement(\"div\"));\n\t\tthis.contentElement.attr(\"id\", \"content-page-\" + this.id);\n\t\t// Default to a hidden page.\n\t\tthis.contentElement.addClass(\"hidden-page\");\n\t\t// Append the page div element (unwrapped raw DOM element) to the content.\n\t\tdocument.getElementById(\"content\").appendChild(this.contentElement[0]);\n\n\t\t// The page is loaded if the div element has child elements. That means there was content added to it.\n\t\tthis.isLoaded = function() { return this.contentElement.children().length > 0; };\n\t\t\n\t\t// Whether or not this page is the currently shown page.\n\t\tthis.isCurrentPage = function() { return this === currentPage; };\n\t\t\n\t\t// Register this instance in the pages map and possibly the top level pages array.\n\t\tpages[name] = this;\n\t\tif (this.isTopLevel) {\n\t\t\ttopLevelPages.push(this);\n\t\t}\n\t}", "title": "" }, { "docid": "113f4ef52e48dc6f22c7770c19b68b4f", "score": "0.6280706", "text": "function createPageOptions(page, req) {\n var obj = {options: {}}; \n \n obj.options.bodyClass = page+'-page';\n obj.options.auth = (req.session.authStatus==\"loggedin\")?true:false;\n obj.options.date = dateUtil.getLeDateFormat(new Date());\n \n return obj;\n}", "title": "" }, { "docid": "49dd8e05a42ac8a8acc92672113aa232", "score": "0.62642735", "text": "function createPage(req, res) {\n var websiteId = req.params.websiteId;\n var page = req.body;\n var websiteId = req.params.websiteId;\n pageModel\n .createPageForWebsite(websiteId, page)\n .then(function (pageDoc) {\n res.json(pageDoc);\n }, function (err) {\n res.statusCode(500).send(err);\n })\n}", "title": "" }, { "docid": "a96af4d970c7e600ac2f2c27ce714b54", "score": "0.62380415", "text": "function Page(model, res) {\n this.model = model;\n this.view = view;\n this._res = res;\n this._viewModels = [];\n }", "title": "" } ]
01ab1eb2774c8dd719e79ceccd5f792a
Creates contact form sent information (using jQuery)
[ { "docid": "39869e426fe0a38e110fad34c54536aa", "score": "0.5694344", "text": "function showFormData(){\n\n\t$(\"#main\").append($(\"<article id=\\\"dataContainer\\\"></article>\"));\n\t$(\"#dataContainer\").append($(\"<header id=\\\"formHeader\\\"></header\").text(\"Your order:\"));\n\t$(\"#dataContainer\").append($(\"<ul id=\\\"userInfo\\\"></ul>\"));\n\t$(\"#userInfo\").append($(\"<li></li>\").text(\"ent: \" + getUrlParams('selected')));\n\t$(\"#userInfo\").append($(\"<li></li>\").text(\"mail: \" + getUrlParams('email')));\n\t$(\"#userInfo\").append($(\"<li></li>\").text(\"delivery: \" + getUrlParams('delivery')));\n\t$(\"#userInfo\").append($(\"<li></li>\").text(\"address: \" + getUrlParams('address').replace(/\\+/g, \" \")));\n\t$(\"#userInfo\").append($(\"<li></li>\").text(\"color: \"+getUrlParams('color')));\n\t$(\"#userInfo\").append($(\"<span id=\\\"userColor\\\"; style=\\\"background-color:\"+getUrlParams('color')+\"; \\\"></span>\"));\n}", "title": "" } ]
[ { "docid": "fcf06cfe446f2e3a787c209459ad63b7", "score": "0.68420935", "text": "function contactPage(){\n $(\"#contentText\").show().addClass(\"showFeed\");\n $(\".navMenu\").hide();\n $(\"#headerTxt\").html(\"<span onclick=\\\"homeScreen()\\\" style=\\\"float:left; margin-left:5px;\\\">&lt;</span>Contact Me\");\n $(\"<p class=\\\"plainP\\\">This email will be sent to [email protected]</p>\").appendTo(\"#contentText\");\n $(\"<form name=\\\"emailForm\\\"><textarea class=\\\"textBox\\\" name=\\\"msgText\\\" ></textarea><div class=\\\"navBtn\\\" onclick=\\\"submitMail(emailForm.msgText.value)\\\"><h4>Send Mail</h4></div></form>\").appendTo(\"#contentText\");\n}", "title": "" }, { "docid": "45f85bc66557ef031f4dfa70350b7aa5", "score": "0.6546527", "text": "function send() {\r\n var form = $('#contact-form');\r\n var data = $(form).serialize();\r\n $.ajax({\r\n url: 'your_url_here.com', // Your url here\r\n data: data,\r\n type: 'POST',\r\n datatype: \"html\"\r\n }).done( function (data) {\r\n console.log(data); // optional\r\n }).fail( function (data) {\r\n console.log('Error: '+data); //optional\r\n });\r\n }", "title": "" }, { "docid": "fdc52e444ba9c741fc05e3657dc305ef", "score": "0.65237904", "text": "function setup_contact() {\r\n\t\r\n\t\t$('#contact-form a.submit').click(function() {\r\n\t\t\r\n\t\t\tvar form = $(this).parents('form');\r\n\t\t\tvar name = $(form).find(\"input[name='name']\").val();\r\n\t\t\tvar email = $(form).find(\"input[name='email']\").val();\r\n\t\t\tvar location = $(form).find(\"input[name='location']\").val();\r\n\t\t\tvar whyus = $(form).find(\"input[name='whyus']\").val();\r\n\t\t\tvar message = $(form).find(\"textarea[name='message']\").val();\r\n\t\t\tvar formkey = $(form).find(\"input[name='formkey']\").val();\r\n\t\t\t\r\n\t\t\t$.ajax({\r\n\t\t\t\ttype: \"POST\",\r\n\t\t\t\turl: \"/contact/post\",\r\n\t\t\t\tdata: {\r\n\t\t\t\t\tname: name,\r\n\t\t\t\t\temail: email,\r\n\t\t\t\t\tlocation: location,\r\n\t\t\t\t\twhyus: whyus,\r\n\t\t\t\t\tmessage: message,\r\n\t\t\t\t\tformkey: formkey\r\n\t\t\t\t},\r\n\t\t\t\tsuccess: function(data) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tclear_errors(form);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(data.result=='failed') {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//\r\n\t\t\t\t\t\t// Set Error Fields\r\n\t\t\t\t\t\tfor(key in data.errors) {\r\n\t\t\t\t\t\t\tif($(\"input[name='\"+key+\"']:visible\").length>0)\r\n\t\t\t\t\t\t\t\tset_error($(\"input[name='\"+key+\"']:visible\"));\r\n\t\t\t\t\t\t\telse if($(\"textarea[name='\"+key+\"']:visible\").length>0)\r\n\t\t\t\t\t\t\t\tset_error($(\"textarea[name='\"+key+\"']:visible\"));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t} else if(data.result=='success') {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tclear_form(form);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t},\r\n\t\t\t\tdataType: 'json'\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\treturn false;\r\n\t\t\r\n\t\t});\r\n\t\t\r\n\t}", "title": "" }, { "docid": "cf216370cbe6df6b71ba30fcf5579870", "score": "0.6477113", "text": "function sendmail_2() {\n\tvar fields = $('#contact-form').serialize();\n\t$.ajax({\n\t\ttype: 'POST',\n\t\turl: 'sendmail.php',\n\t\tdata: fields+'&formname=contact',\n\t\tsuccess: function(data) {\n\t\t\t$('.send-result').html(data);\n\t\t}\n\t});\n}", "title": "" }, { "docid": "5f662e9d58cf83e40c125aadfa1523e7", "score": "0.6414404", "text": "function submitMessage()\n {\n var person = $(\"#contactSection\").val();\n var message = $(\"#messageSection\").val();\n //tell jquery to look for the results id and create a variable with a string of text to replace the id\n $(\"#messageResults\").text(`The message was successfully sent to: `+ person );\n }", "title": "" }, { "docid": "ea0b2a596e695646a8956737914f9ec1", "score": "0.6331235", "text": "function openDialog(dealerName) {\n var content = \n \"<div>\" +\n \"<div class = 'modalFormHeader'>\" +\n \"<div>\" +\n \"<span>EMAIL</span>\" +\n \"<h1>Premium Pools &amp; Spas of Charlotte</h1>\" +\n \"</div>\" +\n \"</div> \" +\n \"<p>Fill out the form below and <span id = 'dealerNameContainer'></span> will get in touch</p>\" +\n \"<div class = 'innerEmailForm'>\" +\n \"<form id = 'sendEmailForm' method = 'POST'>\" +\n \"<div class = 'formLabelContainer'>\" +\n \"<label>First and last name</label>\" +\n \"<img src = 'assets/images/circle-form.png' alt = 'circle form' id = 'firstAndLastValidationIndicator'/>\" +\n \"</div>\" +\n \"<div class = 'formInputContainer'>\" +\n \"<input type = 'text' name = 'firstAndLast' id = 'firstAndLast' required/>\" +\n \"</div>\" +\n \"<div class = 'formLabelContainer'>\" +\n \"<label>Phone number</label>\" +\n \"<img src = 'assets/images/circle-form.png' alt = 'circle form' id = 'phoneNumberValidationIndicator'/>\" +\n \"</div>\" +\n \"<div class = 'formInputContainer'>\" +\n \"<input type = 'text' name = 'phoneNumber' id = 'phoneNumber' required/> \" +\n \"</div>\" +\n \"<div class = 'formLabelContainer'>\" +\n \"<label>Email address</label>\" +\n \"<img src = 'assets/images/circle-form.png' alt = 'circle form' id = 'emailAddressValidationIndicator'/>\" +\n \"</div>\" +\n \"<div class = 'formInputContainer'>\" +\n \"<input type = 'email' name = 'email' id = 'email' required/>\" +\n \"</div>\" +\n \"<div class = 'formLabelContainer'>\" +\n \"<label>Comments or questions</label>\" +\n \"<span class = 'optional'>Optional</span>\" +\n \"</div>\" +\n \"<div class = 'formInputContainer'>\" +\n \"<textarea name = 'commentsOrQuestions'></textarea>\" +\n \"</div>\" +\n \"<div class = 'formLabelContainer'>\" +\n \"<span>Do you currently own a pool or spa?</span>\" +\n \"<span class = 'optional'>Optional</span>\" +\n \"</div>\" +\n \"<div class = 'formInputContainer'>\" +\n \"<div class='switchField'>\" +\n \"<input type='radio' id='switchLeft' name='isPoolOwner' value='yes' checked/>\" +\n \"<label for='switchLeft'>Yes</label>\" +\n \"<input type='radio' id='switchRight' name='isPoolOwner' value='no' />\" +\n \"<label for='switchRight'>No</label>\" +\n \"</div>\" +\n \"<hr/>\" +\n \"<div class = 'formSubmitButtonContainer'>\" +\n \"<button type = 'submit'></button>\" +\n \"</div>\" +\n \"</form>\" +\n \"</div>\" +\n \"</div>\";\n\n var modal = new tingle.modal({\n footer: true,\n stickyFooter: false,\n closeMethods: ['overlay', 'button', 'escape'],\n closeLabel: \"Close\",\n cssClass: ['custom-class-1', 'custom-class-2'],\n onOpen: function () {\n modal.setContent(content);\n modal.setFooterContent('<p>*Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus iaculis fermentum ex, ' +\n 'eget bibendum tellus luctus a. Integer orci lectus, ultricies ac lectus at, tempor mattis felis.</p>');\n\n /*Setting form data to display and to know who to email*/\n document.getElementById('dealerNameContainer').innerHTML = dealerName;\n\n /*Adding event listeners to form inputs that require validation and form submission event handlers */\n addFormEventHandlers();\n },\n onClose: function () {\n console.log('modal closed');\n },\n beforeClose: function () {\n return true; // close the modal\n }\n });\n\n modal.open();\n\n\n}", "title": "" }, { "docid": "740107cf70cf420ec613989d92d5edb6", "score": "0.63165474", "text": "function sendContactForm () {\n\tvar controllerValue = $(\"#contactController\").val();\n\tvar actionValue = $(\"#contactAction\").val();\n\n var nameValue = $(\"#contactName\").val();\n var emailValue = $(\"#contactEmail\").val();\n var subjectValue = $(\"#contactSubject\").val();\n var messageValue = $(\"#contactMessage\").val();\n\n if (isValidContactForm ()) {\n\t $.post (\"../classes/controller/FrontController.php\", { \n \t\t\tcontroller: controllerValue,\n \t\t\taction: actionValue,\n \t\t\tcontactName: nameValue,\n \t\t\tcontactEmail: emailValue,\n \t\t\tcontactSubject: subjectValue,\n \t\t\tcontactMessage: messageValue\n }, function (data) {\n\t\t\tif (data != null && parseInt (data) == 1) {\n\t\t\t\tshowMessageByContainer (1, \"contact-message-container\", \"contact-message-paragraph\", \"Contato enviado com sucesso.\");\n\t\t\t} else {\n\t\t\t\tshowMessageByContainer (3, \"contact-message-container\", \"contact-message-paragraph\", \"Ocorreu um erro durante o envio.\");\n\t\t\t}\n\t\t\tresetContactForm();\n }\n\t ); \t\t\t\t\t\t\n }\t\n}", "title": "" }, { "docid": "bf06b51f897d3f08affe804d57b49d3b", "score": "0.6300321", "text": "function ContactForm() {\t\n\t\n\t\tif( jQuery('#contact-formular').length > 0 ){\n\t\t\t$('#contactform').submit(function(){\n\t\t\t\tvar action = $(this).attr('action');\n\t\t\t\t$(\"#message\").slideUp(750,function() {\n\t\t\t\t$('#message').hide();\n\t\t\t\t$('#submit').attr('disabled','disabled');\t\t\n\t\t\t\t$.post(action, {\n\t\t\t\t\tname: $('#name').val(),\n\t\t\t\t\temail: $('#email').val(),\n\t\t\t\t\tphone: $('#phone').val(),\n\t\t\t\t\tcomments: $('#comments').val()\n\t\t\t\t},\n\t\t\t\tfunction(data){\n\t\t\t\t\tdocument.getElementById('message').innerHTML = data;\n\t\t\t\t\t$('#message').slideDown('slow');\n\t\t\t\t\t$('#contactform img.loader').fadeOut('slow',function(){$(this).remove()});\n\t\t\t\t\t$('#submit').removeAttr('disabled');\n\t\t\t\t\tif(data.match('success') != null) $('#contactform').slideUp('slow');\n\t\n\t\t\t\t}\n\t\t\t\t);\t\t\n\t\t\t\t});\t\t\n\t\t\t\treturn false;\t\t\n\t\t\t});\t\t\n\t\t}\n\n\t}", "title": "" }, { "docid": "e9eda290072a46f41c69c855ea1c133e", "score": "0.62736577", "text": "function fillEmailForm(studentstoEmail, className) {\n\tvar toList = \"\";\n\t$('#inputSubject').val(\"Quiz Seating Assignment\");\n\tfor(var i = 0; i < studentstoEmail.length; i++) {\n\t\ttoList += studentstoEmail[i].email + \",\";\n\t}\n\t$('#inputReciever').val(toList);\n\t var sampleAddressText = \"Dear [fullname], \\n\\n\"\n\t var sampleBodyText = \"Here is your assigned seat for the ________.\\nPlease arrive early to find your seat.\\nIf you cannot find your seat, please ask for assistance.\\nWe have seating charts available in the front of the classroom.\\n\\n\" \n\t var sampleInfoText = \"Quiz - ________ at ________ in \" + className.toString() + \"\\n\";\n\t var sampleSeatText = \"Seat: [seat] \\n\"\n\t var sampleIdText = \"Exam Serial Number: [id] \\n\\n\";\n\t var sampleEndText = \"Please be sure to put your Exam Serial Number on your exam. \\nNote: Exam Serial Number may change in future exams\\n\";\n\t var sampleByeText = \"\\nSee you in class,\\n________\"\n\t var sampleMessageText = sampleAddressText + sampleBodyText + sampleInfoText + sampleSeatText + sampleIdText + sampleEndText + sampleByeText;\n\t $('#inputMessage').val(sampleMessageText);\n\n}", "title": "" }, { "docid": "85e2a9d9913e793ed9f31a76157d2250", "score": "0.622393", "text": "function createComposeForm() {\n $('#compose')\n .prepend($('<section>').attr('id','new-tweet')\n .append($('<h2>').text('Compose Tweet'))\n .append($('<form>').attr('id','add-tweet-form').attr('action','/tweets').attr('method','POST')\n .append($('<textarea>').attr('name','text').attr('placeholder','What are you humming about?'))\n .append($('<input>').attr('type','submit').attr('value','tweet'))\n .append($('<span>').attr('class','counter').text('140'))\n )\n )\n}", "title": "" }, { "docid": "8017b0a1ff90080f01a2389035c58984", "score": "0.62116325", "text": "function submitForm() {\n let clientName = document.querySelector(\".client_name\").value;\n let clientEmail = document.querySelector(\".client_email\").value;\n let clientPhone = document.querySelector(\".client_phone\").value;\n let clientMessage = document.querySelector(\".client_message\").value;\n\n saveContactInfo(clientName, clientEmail, clientPhone, clientMessage);\n\n // sendEmail(clientName, clientEmail, clientPhone, clientMessage);\n}", "title": "" }, { "docid": "21b1c291edeb2e8407ac3c1e0e82bfbe", "score": "0.61623085", "text": "function sendMail(form) {\n\n var htmlEmail = '';\n var awardRadio = $('input:radio[name=\"award\"]:checked');\n var firstNameNomineeInput = $('input[name=\"firstNameNominee\"]');\n var lastNameNomineeInput = $('input[name=\"lastNameNominee\"]');\n var currentPositionInput = $('input[name=\"currentPosition\"]');\n var fromInput = $('input[name=\"from\"]');\n var toInput = $('input[name=\"to\"]');\n var areaCodeNomineeInput = $('input[name=\"areaCodeNominee\"]');\n var phoneNumberNomineeInput = $('input[name=\"phoneNumberNominee\"]');\n var emailNomineeInput = $('input[name=\"emailNominee\"]');\n var firstNameNominatorInput = $('input[name=\"firstNameNominator\"]');\n var lastNameNominatorInput = $('input[name=\"lastNameNominator\"]');\n var companyNameInput = $('input[name=\"companyName\"]');\n var addressInput = $('textarea[name=\"address\"]');\n var areaCodeNominatorInput = $('input[name=\"areaCodeNominator\"]');\n var phoneNumberNominatorInput = $('input[name=\"phoneNumberNominator\"]');\n var emailNominatorInput = $('input[name=\"emailNominator\"]');\n var personalCriteriaInput = $('textarea[name=\"personalCriteria\"]');\n var professionalCriteriaInput = $('textarea[name=\"professionalCriteria\"]');\n var leadershipAndIntegrityInput = $('textarea[name=\"leadershipAndIntegrity\"]');\n var innovationInput = $('textarea[name=\"innovation\"]');\n var resultsInput = $('textarea[name=\"results\"]');\n var impactInput = $('textarea[name=\"impact\"]');\n var additionalInformationInput = $('textarea[name=\"additionalInformation\"]');\n\n var award = awardRadio.length ? awardRadio.val() : '-';\n var nameNominee = firstNameNomineeInput.val() + ' ' + lastNameNomineeInput.val();\n var currentPosition = currentPositionInput.val().length ? currentPositionInput.val() : '-';\n var from = fromInput.val().length ? fromInput.val() : '-';\n var to = toInput.val().length ? toInput.val() : '-';\n var areaCodeNominee = areaCodeNomineeInput.val().length ? areaCodeNomineeInput.val() : '-';\n var phoneNumberNominee = phoneNumberNomineeInput.val().length ? phoneNumberNomineeInput.val() : '-';\n var emailNominee = emailNomineeInput.val().length ? emailNomineeInput.val() : '-';\n var nameNominator = firstNameNominatorInput.val() + ' ' + lastNameNominatorInput.val();\n var companyName = companyNameInput.val().length ? companyNameInput.val() : '-';\n var address = addressInput.val().length ? addressInput.val() : '-';\n var areaCodeNominator = areaCodeNominatorInput.val().length ? areaCodeNominatorInput.val() : '-';\n var phoneNumberNominator = phoneNumberNominatorInput.val().length ? phoneNumberNominatorInput.val() : '-';\n var emailNominator = emailNominatorInput.val().length ? emailNominatorInput.val() : '-';\n var personalCriteria = personalCriteriaInput.val().length ? personalCriteriaInput.val() : '-';\n var professionalCriteria = professionalCriteriaInput.val().length ? professionalCriteriaInput.val() : '-';\n var leadershipAndIntegrity = leadershipAndIntegrityInput.val().length ? leadershipAndIntegrityInput.val() : '-';\n var innovation = innovationInput.val().length ? innovationInput.val() : '-';\n var results = resultsInput.val().length ? resultsInput.val() : '-';\n var impact = impactInput.val().length ? impactInput.val() : '-';\n var additionalInformation = additionalInformationInput.val().length ? additionalInformationInput.val() : '-';\n var dateSubmitted = moment.tz('Asia/Kuala_Lumpur').format('YYYY/MM/DD');\n\n // template mail\n htmlEmail += emailPartial\n .replace('*|date-submitted|*', dateSubmitted)\n .replace('*|award|*', award)\n .replace('*|nominees-name|*', nameNominee)\n .replace('*|current-position|*', currentPosition)\n .replace('*|from|*', from)\n .replace('*|to|*', to)\n .replace('*|nominees-area-code|*', areaCodeNominee)\n .replace('*|nominees-phone-number|*', phoneNumberNominee)\n .replace('*|nominees-email|*', emailNominee)\n .replace('*|nominators-name|*', nameNominator)\n .replace('*|company-name|*', companyName)\n .replace('*|address|*', address)\n .replace('*|nominators-area-code|*', areaCodeNominator)\n .replace('*|nominators-phone-number|*', phoneNumberNominator)\n .replace('*|nominators-email|*', emailNominator)\n .replace('*|personal-criteria|*', personalCriteria)\n .replace('*|professional-criteria|*', professionalCriteria)\n .replace('*|leadership-integrity|*', leadershipAndIntegrity)\n .replace('*|innovation|*', innovation)\n .replace('*|results|*', results)\n .replace('*|impact|*', impact)\n .replace('*|other-information|*', additionalInformation);\n\n // send mail\n var mandrill_client = new mandrill.Mandrill(config['keyMandrill']);\n var message = {\n html: htmlEmail,\n text: 'Award: ' + award +\n ' | Nominee’s Name: ' + nameNominee +\n ' | Current Position held within Company: ' + currentPosition +\n ' | Length of Employment with current Company: | From: ' + from + ' | To: ' + to +\n ' | Nominee’s Contact Number: | Area Code: ' + areaCodeNominee + ' | Phone Number : ' + phoneNumberNominee +\n ' | Nominee’s Email Address: ' + emailNominee +\n ' | Your (Nominator’s) Name: ' + nameNominator +\n ' | Company Name: ' + companyName +\n ' | Address: ' + address +\n ' | Nominator’s Contact Number: | Area Code: ' + areaCodeNominator + ' | Phone Number : ' + phoneNumberNominator +\n ' | Nominator’s Email Address: ' + emailNominator +\n ' | Personal Criteria: ' + personalCriteria +\n ' | Professional Criteria: ' + professionalCriteria +\n ' | Leadership & Integrity: ' + leadershipAndIntegrity +\n ' | Innovation: ' + innovation +\n ' | Results: ' + results +\n ' | Impact: ' + impact +\n ' | Any other Information you would like to include about your Nominee: ' + additionalInformation +\n ' | Date Submitted: ' + dateSubmitted,\n subject: 'New Quarterly Awards Nomination Form',\n from_email: '[email protected]',\n from_name: 'Landing Page: Quarterly Awards Nomination Form',\n to: [{\n email: config['sendEmailTo'],\n name: 'Oil Diversity',\n type: 'to'\n }],\n headers: {\n 'Reply-To': '[email protected]'\n },\n important: !1,\n track_opens: null,\n track_clicks: null,\n auto_text: null,\n auto_html: null,\n inline_css: null,\n url_strip_qs: null,\n preserve_recipients: null,\n view_content_link: null,\n bcc_address: null,\n tracking_domain: null,\n signing_domain: null,\n return_path_domain: null,\n merge: !0,\n tags: ['quarterly-awards-nomination'],\n metadata: {\n website: 'www.oildiversity.com'\n }\n },\n async = !1,\n ip_pool = 'Main Pool';\n\n mandrill_client.messages.send({\n message: message,\n async: async,\n ip_pool: ip_pool,\n send_at: new Date\n }, function () {\n\n utilities.scrollToTop();\n logger.qLogSuccess('Your Quarterly Awards Nomination has been sent successfully.');\n\n // empty controls\n $('input:radio[name=\"award\"]').each(function () {\n $(this).checked = false;\n });\n\n firstNameNomineeInput.val('');\n lastNameNomineeInput.val('');\n currentPositionInput.val('');\n fromInput.val('');\n toInput.val('');\n areaCodeNomineeInput.val('');\n phoneNumberNomineeInput.val('');\n emailNomineeInput.val('');\n firstNameNominatorInput.val('');\n lastNameNominatorInput.val('');\n companyNameInput.val('');\n addressInput.val('');\n areaCodeNominatorInput.val('');\n phoneNumberNominatorInput.val('');\n emailNominatorInput.val('');\n personalCriteriaInput.val('');\n professionalCriteriaInput.val('');\n leadershipAndIntegrityInput.val('');\n innovationInput.val('');\n resultsInput.val('');\n impactInput.val('');\n additionalInformationInput.val('');\n\n utilities.enableForm(form);\n\n }, function (error) {\n\n utilities.scrollToTop();\n logger.qLogError('A mandrill error occurred: ' + error.name + ' - ' + error.message);\n utilities.enableForm(form);\n\n });\n }", "title": "" }, { "docid": "2355e6779362e2a91eb89bdda87d8266", "score": "0.61599493", "text": "function submitForm()\r\n{\r\n var email = $('#email').val();\r\n var name = $('#name').val();\r\n var subject = $('#subject').val();\r\n var message = $('#message').val();\r\n\r\n $('#show_wornings_name').hide();\r\n if (name == '') {\r\n $('#show_wornings_name').show();\r\n $(\"#show_wornings_name\").html(\"Please enter name.\");\r\n $('#name').focus();\r\n return false;\r\n }\r\n $('#show_wornings_email').hide();\r\n if (email == '') {\r\n $('#show_wornings_email').show();\r\n $(\"#show_wornings_email\").html(\"Please enter email.\");\r\n $('#email').focus();\r\n return false;\r\n }\r\n $('#show_wornings_email').hide();\r\n if (!isEmail(email)) {\r\n $('#show_wornings_email').show();\r\n $(\"#show_wornings_email\").html(\"Please enter valid email.\");\r\n $('#email').focus();\r\n return false;\r\n }\r\n $('#show_wornings_subject').hide();\r\n if (subject == '') {\r\n $('#show_wornings_subject').show();\r\n $(\"#show_wornings_subject\").html(\"Please enter subject.\");\r\n $('#subject').focus();\r\n return false;\r\n }\r\n $('#show_wornings_message').hide();\r\n if (message == '') {\r\n $('#show_wornings_message').show();\r\n $(\"#show_wornings_message\").html(\"Please enter your message.\");\r\n $('#message').focus();\r\n return false;\r\n }\r\n\r\n\r\n\r\n else {\r\n var dataString = 'email=' + email + '&name=' + name + '&subject=' + subject + '&message=' + message;\r\n $.ajax({\r\n type: \"GET\",\r\n url: \"contact/contact\",\r\n data: dataString,\r\n cache: false,\r\n success: function (html) {\r\n if (html == 1) {\r\n $(\"#name\").val('');\r\n $(\"#email\").val('');\r\n $(\"#subject\").val('');\r\n $(\"#message\").val('');\r\n $('#show_worning').show();\r\n $(\"#show_worning\").html(\"Thanks! Your query has been submitted with us.\");\r\n\r\n $(\"#show_worning\").fadeOut(20000);\r\n } else {\r\n document.getElementById('show_worning').style.display = \"none\";\r\n document.getElementById(\"show_worning\").innerHTML = \"There might be something wrong.\";\r\n }\r\n\r\n\r\n }\r\n });\r\n }\r\n}", "title": "" }, { "docid": "56a607aa9b1e32a83b16e6157ef3d88e", "score": "0.615569", "text": "function contactForm(){\n\t$(\"#contactForm\").live('submit', function(){\n\t\tvar errorMsg = \"\";\n\t\tvar formInfo = $(this).serialize() + \"&contactForm=true\";\n\t\tvar name = $(\"[name='name']\").val().replace(/\\s/g,\"\");\n\t\tvar email = $(\"[name='email']\").val().replace(/\\s/g,\"\");\n\t\tvar message = $(\"[name='message']\").val().replace(/\\s/g,\"\");\n\t\tvar info = {\"name\":name, \"email\":email, \"message\":message};\n\t\t// If validateFields has a return value, then there is an errorMsg\n\t\tif (validateContact(info)){\n\t\t\terrorMsg = validateContact(info);\n\t\t\t$(\"#contactForm .errorMsg\").text(errorMsg).css('color','red').show();\n\t\t} else{\n\t\t\t$.post('ajax.contact.php',formInfo);\n\t\t\t$(\"[name='name']\").val('Name').addClass('inactive');\n\t\t\t$(\"[name='email']\").val('Email').addClass('inactive');\n\t\t\t$(\"[name='message']\").val('Message').addClass('inactive');\n\t\t\t$(\"#contactForm .errorMsg\").text(\"Message Sent!\").css('color','white').show();\n\t\t} \n\t\treturn false;\n\t});\n}", "title": "" }, { "docid": "51072925c848680a152b9795a14968bd", "score": "0.61507213", "text": "function sendMessage() {\n\n // Get form data organized.\n let to_send = {};\n let today = new Date();\n \n to_send.date = (today.getMonth()+1) + '/' +today.getDate() + '/' + today.getFullYear();\n to_send.message = document.getElementById(\"message\").value;\n to_send.name = document.getElementById(\"name\").value;\n to_send.email = document.getElementById(\"e-mail\").value;\n to_send.anonymous = document.getElementById(\"hide-name\").checked;\n \n // Construct XMLHttp request - the only purpose here is to satisfy form send\n // requirement.\n let post_req = new XMLHttpRequest();\n let send_this = JSON.stringify(to_send);\n \n post_req.open('POST', 'https://httpbin.org/post', true);\n post_req.setRequestHeader('Content-Type', 'application/json');\n \n // Asynchronous handling\n post_req.addEventListener('load', function() {\n if (post_req.status >= 200 && post_req.status < 400) {\n \n // Get response\n let post_response = JSON.parse(post_req.responseText).json;\n console.log(post_response);\n \n // Close form, clear fields, and display new message\n closeForm()\n document.getElementById(\"guest-book-message\").innerHTML = post_response.message;\n let signature = post_response.date + \" \" +\n (to_send.anonymous ? \"\" : post_response.name);\n document.getElementById(\"guest-book-date-name\").innerHTML = signature\n \n } else {\n console.log(\"Error in network request (httpbin): \" + post_req.statusText);\n }\n \n });\n \n post_req.send(send_this);\n event.preventDefault();\n}", "title": "" }, { "docid": "091e1d49d5c5e08994a645b11e7e703c", "score": "0.614489", "text": "function sendmail_1() {\n\tvar fields = $('#gq-form').serialize();\n\t$.ajax({\n\t\ttype: 'POST',\n\t\turl: 'sendmail.php',\n\t\tdata: fields+'&formname=get_quote',\n\t\tsuccess: function(data) {\n\t\t\t$('.send-result').html(data);\n\t\t}\n\t});\n}", "title": "" }, { "docid": "59caa521f4b31ecffaa1e7754742658d", "score": "0.61355704", "text": "function formSubmitSuccess(o){\n\t\tvar msg = document.createElement('p');\n\t\tmsg.setAttribute('id', 'hideMe');\n\t\tmsg.setAttribute('class', 'success_message');\n\t\tmsg.appendChild(document.createTextNode('Your email has been sent successfully'));\n\t\tvar contentinnerwrapper = $('content_inner_wrapper');\n\t\tvar firstchild = contentinnerwrapper.firstChild;\n\t\tcontentinnerwrapper.insertBefore(msg, firstchild);\n\n\t\tvar formToHide = contentinnerwrapper.getElementsByTagName('form')[0];\n\t\tvar formDim = Dom.getRegion(formToHide);\n\t\tvar formHeight = formDim.bottom - formDim.top;\n\t\tvar formWidth = formDim.right - formDim.left;\n\n\t\tvar overlay = document.createElement('div');\n\t\tformToHide.appendChild(overlay);\n\t\tDom.setStyle(formToHide, 'position', 'relative');Dom.setStyle(overlay, 'width', formWidth + 'px');\n\t\tDom.setStyle(overlay, 'height', formHeight + 'px');Dom.setStyle(overlay, 'opacity', '0.2');\n\t\tDom.setStyle(overlay, 'background', 'black');Dom.setStyle(overlay, 'position', 'absolute');\n\t\tDom.setStyle(overlay, 'top', '0');Dom.setStyle(overlay, 'left', '0');\n\n\t\t// do the omiture stuff if needs be\n\t\tvar runscode = $('run_s_code');\n\t\tif(runscode) {\n\t\t\tif (runscode.value == 1) {\n\t\t\t\tvar siteTitle = document.getElementsByTagName('h1')[0].innerHTML;\n\t\t\t\tvar pageTitle = Dom.getElementsByClassName('this_page')[0].innerHTML;\n\t\t\t\tvar crmnum = $('crmnum').value;\n\t\t\t\ts.server=\"btexchanges.com\";\n\t\t\t\ts.channel=\"BT Customerstreet Sitebuilder:Business:\" + pageTitle + \":Contact\";\n\t\t\t\ts.pageName=\"BT Customerstreet Sitebuilder:Page:\" + pageTitle + \":Sent\";\n\t\t\t\ts.hier1=\"BT.com,\"+s.pageName.replace(/:/g,\",\");\n\t\t\t\ts.prop1=\"Not Logged In\";\n\t\t\t\ts.prop3=\"Normal\";\n\t\t\t\ts.prop4=siteTitle;\n\t\t\t\ts.prop5=crmnum;\n\t\t\t\ts.prop6=\"Email\";\n\t\t\t\ts.prop34=crmnum;\n\t\t\t\ts.prop36=siteTitle;\n\t\t\t\ts.eVar1=s.prop1;\n\t\t\t\ts.eVar4=s.prop4;\n\t\t\t\ts.eVar5=s.prop5;\n\t\t\t\ts.eVar6=s.prop6;\n\t\t\t\ts.eVar34=s.prop34;\n\t\t\t\ts.eVar36=s.prop36;\n\t\t\t\ts.events=s.getValOnce('event18:'+crmnum);\n\t\t\t\t/************* DO NOT ALTER ANYTHING BELOW THIS LINE !**************/\n\t\t\t\ts_code=s.t();if(s_code)document.write(s_code);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "7f2b1566770c9a9dc59a4c7cd3547e83", "score": "0.6132294", "text": "function ajaxContact(form) {\r\n\t\r\n var $ = jQuery;\r\n \r\n var Data = $(form).serialize(),\r\n note = $(form).prev('.note');\r\n \r\n $.ajax({\r\n type: \"POST\",\r\n url: \"send.php\",\r\n data: Data,\r\n success: function(response) {\r\n \r\n $(form).animate({opacity: 0},'fast'); \r\n \r\n \r\n if (response = 'success') { \r\n \r\n note.html('Your message sent to us!').slideDown('fast'); \r\n \r\n } else { \r\n\t\t\t\t\t\t\t\t\t\t\r\n note.html('Something is going wrong...').slideDown('fast');\r\n \r\n }\r\n \r\n \r\n \r\n setTimeout(function() { \r\n note.html('').slideUp('fast');\r\n $(form).find(\".button_submit\").unbind('click', disableLink); \r\n $(form).find(\"input[type=text], textarea\").val('');\r\n $(form).animate({opacity: 100},'fast'); \r\n },3000);\r\n \r\n },\r\n error: function() { \r\n \r\n $(form).animate({opacity: 0},'fast');\r\n \r\n note.html('Something is going wrong...').slideDown('fast');\r\n \r\n setTimeout(function() {\r\n \r\n note.html('').slideUp('fast');\r\n $(form).find(\".button_submit\").unbind('click', disableLink); \r\n $(form).find(\"input[type=text], textarea\").val('');\r\n $(form).animate({opacity: 100},'fast'); \r\n },3000);\r\n \r\n }\r\n });\r\n\r\n return false;\r\n\r\n }", "title": "" }, { "docid": "9c7a991f44e11b1d289a144f9f8486a8", "score": "0.61104214", "text": "function contactFormSetup() {\n\n $('#contact-form').on('submit', function(e) {\n e.preventDefault();\n var name = $('#cf-name').val(),\n email = $('#cf-email').val(),\n message = $('#cf-message').val(),\n $messageBox = $('#contact-form .message'),\n required = 0;\n $('.cf-validate', this).each(function() {\n if ($(this).val() == '') {\n $(this).addClass('cf-error');\n required += 1;\n } else {\n if ($(this).hasClass('cf-error')) {\n $(this).removeClass('cf-error');\n if (required > 0) {\n required -= 1;\n }\n }\n }\n });\n if (required === 0) {\n $.ajax({\n type: 'POST',\n url: 'mail.php',\n data: {\n cf_name: name,\n cf_email: email,\n cf_message: message\n },\n success: function(data) {\n data = JSON.parse(data);\n $(\"#contact-form .input__field\").val(\"\");\n showAlertBox(data.status, data.message);\n },\n error: function(data) {\n data = JSON.parse(data);\n showAlertBox(data.status, data.message);\n }\n });\n }\n });\n\n function showAlertBox(response, message) {\n var $alertBox = $('<div class=\"alert\"></div>'),\n $alContainer = $('#contact-form .alert-container');\n if (response == 200) {\n $alertBox.addClass('alert-success').html(message);\n $alContainer.html($alertBox);\n } else {\n $alertBox.addClass('alert-danger').html(message);\n $alContainer.html($alertBox);\n }\n $alContainer.fadeIn(300).delay(2000).fadeOut(400);\n }\n\n}", "title": "" }, { "docid": "09cbedc2eb350ed404c49841074a8ca1", "score": "0.60449314", "text": "function sendContactForm(contactForm) {\n emailjs.send(\"service_xji66q5\", \"template_js8cnn7\", {\n \"first-name\": contactForm.name.value,\n \"last-name\": contactForm.lastname.value,\n \"email\": contactForm.email.value,\n \"address\": contactForm.address.value,\n \"phone\": contactForm.phone.value,\n \"message\": contactForm.message.value,\n \"service\": contactForm.service.value,\n\n })\n .then(\n function (response) {\n console.log(\"SUCCESS\", response);\n },\n function (error) {\n console.log(\"FAILED\", error);\n alert('Oops! Something went wrong, please try later');\n }\n )\n\n // // the alert opens up on submit form\n\n function alertOpen(){\n $('.alert').toggle();\n }\n\n alertOpen();\n\n // empty the inputs after submitting the form\n contactForm.name.value = \"\";\n contactForm.lastname.value = \"\";\n contactForm.email.value = \"\";\n contactForm.address.value = \"\";\n contactForm.phone.value = \"\";\n contactForm.message.value = \"\";\n\n return false;\n\n\n}", "title": "" }, { "docid": "bbd9cbd90a102d6e3220023245c103a9", "score": "0.6034262", "text": "function displayNewContactInfo(data) {\n\t$('#js-form').hide();\n\t$('.js-confirm').show();\n\t$('.js-confirm').html(`<h2 class='message-header'>Updated Info</h2>\n\t\t<p>Your new phone number is: <b>${data.contactInfo.phoneNumber}</b><br>\n\t\tYour new email is: <b>${data.contactInfo.email}</b></p>`);\n}", "title": "" }, { "docid": "eadf5214b01ae726691bb5de365142bb", "score": "0.60309523", "text": "function addContactForm(cont){\n cont[0].innerHTML = `\n <div class=\"contact-item col-12 horizontal-center\">\n <form>\n <div class=\"form-wrap\">\n <div class=\"form-group\">\n <input type=\"text\" class=\"form-control required\" placeholder=\"Name *\" required>\n </div>\n <div class=\"form-group\">\n <input type=\"email\" class=\"form-control required\" aria-describedby=\"emailHelp\" placeholder=\"Email *\" required>\n </div>\n <div class=\"form-group\">\n <textarea class=\"form-control not-required\" placeholder=\"Message\" rows=\"3\"></textarea>\n </div>\n <button type=\"submit\" class=\"btn btn-primary\">Send</button>\n </div>\n </form>\n\n </div> \n `;\n }", "title": "" }, { "docid": "a0da805e63ac918062d348a3c0ce428d", "score": "0.6026987", "text": "function contactForm() {\n\n if ($.exists('#cf')) {\n $('.cf-msg').hide(); // Alart Message\n $('#cf #submit').on('click', function() {\n // Form Variable\n var name = $('#name').val();\n var subject = $('#subject').val();\n var phone = $('#phone').val();\n var email = $('#email').val();\n var msg = $('#msg').val();\n var regex = /^([a-zA-Z0-9_.+-])+\\@(([a-zA-Z0-9-])+\\.)+([a-zA-Z0-9]{2,4})+$/;\n \n if (!regex.test(email)) {\n // Check For Valid Email\n $('.cf-msg').fadeIn().html('<div class=\"alert alert-danger\"><strong>Warning!</strong> Please Enter Valied Email.</div>');\n return false;\n }\n\n // Form Field Tream\n name = $.trim(name);\n subject = $.trim(subject);\n phone = $.trim(phone);\n email = $.trim(email);\n msg = $.trim(msg);\n\n // For Required Field\n if (name != '' && email != '' && msg != '') {\n var values = 'name=' + name + '&subject=' + subject + '&phone=' + phone + '&email=' + email + '&msg=' + msg;\n $.ajax({\n type: 'POST',\n url: 'php/mail.php', // Pointing PHP file\n data: values,\n success: function() {\n $('#name').val('');\n $('#subject').val('');\n $('#phone').val('');\n $('#email').val('');\n $('#msg').val('');\n\n $('.cf-msg').fadeIn().html('<div class=\"alert alert-success\"><strong>Success!</strong> Email has been sent successfully.</div>');\n setTimeout(function() {\n $('.cf-msg').fadeOut('slow');\n }, 4000);\n }\n });\n } else {\n $('.cf-msg').fadeIn().html('<div class=\"alert alert-danger\"><strong>Warning!</strong> All fields are required.</div>');\n }\n return false;\n });\n }\n\n }", "title": "" }, { "docid": "183a4c010930f249c741161ba4d1ab6c", "score": "0.6025983", "text": "function send_contact_us(form, language_code) {\n $.ajax({\n type: 'POST',\n url: basic_url + 'contact_us_handler/',\n data: {input : form.serialize(), language: language_code},\n dataType: 'json'\n });\n}", "title": "" }, { "docid": "756e38f3780d312e723efe5665538163", "score": "0.60232466", "text": "function formSubmitted(e) {\n // Prevent page refresh\n e.preventDefault();\n // Validate all fields\n if (!validateAll()) {\n return;\n }\n // Create new person\n var newMessage = BuildMessageObj();\n //\n console.log(newMessage);\n\n // Post new person with AJAX\n sendPost(newMessage);\n\n //\n}", "title": "" }, { "docid": "dfd3453724b89c5cba73c28ac57306a3", "score": "0.6021745", "text": "function sendmailthree() {\n\tvar fields = $('#three-form').serialize();\n\t$.ajax({\n\t\ttype: 'POST',\n\t\turl: 'sendmail.php',\n\t\tdata: fields,\n\t\tsuccess: function(data) {\n\t\t\t$('.send-result-three-form').html(data);\n\t\t}\n\t});\n}", "title": "" }, { "docid": "4006e7438769222c13a16a428bd3afd4", "score": "0.6013551", "text": "function createContact(d) {\n console.log('Create_Contact d: ', d);\n $('#panel_contact').empty();\n contact_panel.append('div')\n .attr('id', 'contact_info')\n .attr(\"height\", info_height + margin.top + margin.bottom)\n .attr(\"width\", info_width + margin.left + margin.right)\n .html(Make_Contact_Table(d))\n }", "title": "" }, { "docid": "e9ced4b76b3384eec17889e142500d90", "score": "0.6000374", "text": "function addContact() {\n $('body').on('submit', 'form[name=\"add_new_contact\"]', function (e) {\n e.preventDefault();\n $('.progress-new-contact').show();\n var $form = $(this);\n var url = $('#add_new_contact_submit').attr('data-url');\n\n $.ajax({\n type: 'POST',\n url: url,\n data: $form.serialize(),\n success: function (data) {\n var success = '<div class=\"card-panel green accent-4\" id=\"confirmationAddContact\">' + data + '</div>';\n\n $('#flashMessagesNewContact').html(success);\n\n $('.progress-new-contact').hide();\n\n function removeFlashMsg() {\n $('#confirmationAddContact').replaceWith('');\n }\n setTimeout(removeFlashMsg, 5000);\n\n reloadAddContactForm();\n reloadUsefullContacts();\n },\n error: function (jqxhr) {\n var error = '<div class=\"card-panel deep-orange accent-4\">' + jqxhr.responseText + '</div>';\n\n $('#flashMessagesNewContact').html(error);\n $('.progress-new-contact').hide();\n }\n })\n });\n}", "title": "" }, { "docid": "24bf52bf48a2a469fed1be1cd04398c8", "score": "0.5984433", "text": "function getNewContactInfo() {\n\tvar form_addContact = {};\n\tform_addContact[\"idCompany\"] = $(\"#form_addContactCompany\").val();\n\tform_addContact[\"firstname\"] = $(\"#form_addContactFirstName\").val();\n\tform_addContact[\"lastname\"] = $(\"#form_addContactLastName\").val();\n\tform_addContact[\"email\"] = $(\"#form_addContactEmail\").val();\n\tform_addContact[\"phonenumber\"] = $(\"#form_addContactPhoneNumber\").val();\n\treturn form_addContact;\n}", "title": "" }, { "docid": "3089f0930acc74ac9cca4f83acc7138d", "score": "0.5966539", "text": "function handle_contact_form_submit(event) {\n\tvar form = $(this);\n\tvar overlay = form.find('div.overlay');\n\tvar fields = form.find('input, textarea');\n\tvar data = {};\n\tvar empty_fields = 0;\n\n\t// prevent browser from submitting manually\n\tevent.preventDefault();\n\n\t// get data from form\n\tfields.each(function() {\n\t\tvar field = $(this);\n\n\t\tdata[field.attr('name')] = field.val();\n\t\tif (field.data('required') && field.val() == '')\n\t\t\tempty_fields++;\n\t});\n\n\t// email must contain few characters\n\tvar position_at = data.email.indexOf('@', 0);\n\tvar position_dot = data.email.indexOf('.', position_at);\n\n\tif (!(position_at > 0 && position_dot > position_at))\n\t\tempty_fields++;\n\n\t// there are invalid fields, don't submit\n\tif (empty_fields > 0) {\n\t\tdialog.setError(true);\n\t\tdialog.setSize(300, 100);\n\t\tdialog.setContent(dialog_content);\n\t\tdialog.setTitle(language_handler.getText(null, 'title_contact_us'));\n\t\tdialog_content.html(language_handler.getText(null, 'contact_message_missing_fields'));\n\t\tdialog.show();\n\t\treturn;\n\t}\n\n\t// show overlay\n\toverlay\n\t\t.css({\n\t\t\tdisplay: 'block',\n\t\t\topacity: 0\n\t\t})\n\t\t.animate({opacity: 1}, 300);\n\t\n\t// send data to server\n\tnew Communicator('contact_form')\n\t\t\t.on_success(function(data) {\n\t\t\t\t// show form again\n\t\t\t\toverlay.animate({opacity: 0}, 300, function() {\n\t\t\t\t\t\t$(this).css('display', 'none');\n\t\t\t\t\t});\n\n\t\t\t\t// show dialog\n\t\t\t\tdialog.setError(data.error);\n\t\t\t\tdialog.setSize(300, 100);\n\t\t\t\tdialog.setContent(dialog_content);\n\t\t\t\tdialog.setTitle(language_handler.getText(null, 'title_contact_us'));\n\t\t\t\tdialog_content.html(data.message);\n\t\t\t\tdialog.show();\n\n\t\t\t\t// reset form fields\n\t\t\t\tform[0].reset();\n\n\t\t\t\t// hide contact form\n\t\t\t\ttoggle_top_container_visibility();\n\t\t\t})\n\t\t\t.send('send_from_ajax', data);\n}", "title": "" }, { "docid": "543ac3587ceb4ed3dbdaccae607e59ee", "score": "0.5956754", "text": "function initForms() {\n\n\t// Use a fallback method for old browsers without placeholder support\n\tif( Modernizr.input.placeholder ){\n\t\t$('#contact label').hide();\n\t} else {\n\t\t\n\t}\n\n\t// Auto-resizeables textareas\n\t$('textarea').elastic();\n\n\t$('#contact').submit(function(e){\n\t\t\n\t\te.preventDefault();\n\n\t\tvar _val = $('#contact input[type=submit]').attr('value'); \n\t\t$('#contact input[type=submit]').attr('value','Enviando...');\n\t\t$('#contact input[type=submit]').attr('disabled','disabled');\n\n\t\tvar data = {\n\t\t\t'name': \t$('#name').attr('value'),\n\t\t\t'email': \t$('#email').attr('value'),\n\t\t\t'comment': \t$('#comment').attr('value')\n\t\t};\n\n\t\t$.ajax({\n\t\t\ttype: 'POST',\n\t\t\turl: 'contact.php',\n\t\t\tdata: data,\n\t\t\tsuccess: function(html) {\n\t\t\t\thtml = ( html == '200' ) ? 'Mensaje enviado correctamente.' : html;\n\t\t\t\tvar _class = ( html == '200' ) ? 'ok' : 'error';\n\t\t\t\t$('#contact').append('<div class=\"form-status\" id=\"form-status\" title=\"Clic para cerrar\">'+html+'</div>');\n\t\t\t\t$('#form-status').addClass(_class);\n\t\t\t},\n\t\t\tcomplete: function() {\n\t\t\t\t$('#contact input[type=submit]').removeAttr('disabled');\n\t\t\t\t$('#contact input[type=submit]').attr('value',_val);\n\t\t\t},\n\t\t\terror: function() {\n\t\t\t\t$('#form-status').addClass('error');\n\t\t\t}\n\t\t});\n\t});\n\n\t$('#form-status').click(function() {\n\t\t\t$(this).fadeOut('slow');\n\t});\n}", "title": "" }, { "docid": "601170779b5ad1c025b284de150acae3", "score": "0.59536636", "text": "function createForm(){\n\t\t\tvar fields = \"\";\n\t\t\t$('#popup_domination_tab_htmlform #hidden-form input[type=\"text\"], #popup_domination_tab_htmlform #hidden-form input[type=\"email\"], #popup_domination_tab_htmlform #hidden-form input[type=\"hidden\"]').each(function(){\n\t\t\t\tvar type = $(this).attr('type');\n\t\t\t\tvar name = $(this).attr('name');\n\t\t\t\tvar value = $(this).attr('value');\n\t\t\t\tfields += '<input type=\"'+type+'\" value=\"'+value+'\" name=\"'+name+'\" />';\n\t\t\t});\n\t\t\t\n\t\t\t//set action\n\t\t\tvar action = $('#popup_domination_tab_htmlform #hidden-form form').attr('action');\n\t\t\t$('#popup_domination_tab_htmlform #popup_domination_action').val(action);\n\t\t\t\n\t\t\tfill_options();\n\t\t\thidden_fields();\n\t\t\t\n\t\t\t//print form\n\t\t\tvar form = '<form method=\"post\" action=\"'+action+'\" target=\"_blank\" >';\n\t\t\tform += fields;\n\t\t\tform += '<input type=\"submit\" value=\"Submit\" /></form>';\n\t\t\treturn form;\n\t\t}", "title": "" }, { "docid": "905741c1be855cae3a3dcd169c4fde6a", "score": "0.5922927", "text": "function openForm(){\n signUpButton.style.display = 'none';\n formDiv.style.display = 'block';\n moreButton.style.display = 'block';\n \n // Form - set attributes\n setAttributes(form, {\n id: 'contact--form',\n method: 'post',\n action: 'form.php',\n });\n\n // LABELS\n // First Name Label\n firstNameLabel.setAttribute('for', 'firstName');\n firstNameLabel.innerText = 'First name';\n\n // Last Name Label\n lastNameLabel.setAttribute('for', 'lastName');\n lastNameLabel.innerText = 'Last name';\n\n // Email Label\n emailLabel.setAttribute('for', 'email');\n emailLabel.innerText = 'Email';\n\n // Address Label\n addressLabel.setAttribute('for', 'address');\n addressLabel.innerText = 'Address';\n\n // MoreButton Label\n moreButton.innerText = 'Please Tell us More...'\n\n // INPUTS\n // Text Input - First name attributes\n setAttributes(firstName, {\n id: 'firstName',\n type: 'text',\n autocomplete: 'given-name',\n name: 'firstname',\n placeholder: 'enter your first name'\n });\n\n // Text Input - Last name attributes\n setAttributes(lastName, {\n id: 'lastName',\n type: 'text',\n autocomplete: 'family-name',\n name: 'lastname',\n placeholder: 'enter your last name'\n });\n\n // Text Input - Email\n setAttributes(email, {\n id: 'email',\n type: 'text',\n autocomplete: 'email',\n name: 'email',\n placeholder: 'enter your email'\n });\n\n // Text Area - Address\n setAttributes(address, {\n id: 'address',\n type: 'textarea',\n rows: '5',\n autocomplete: 'address',\n name: 'address'\n });\n\n // Tell us More Button\n setAttributes(moreButton, {\n id: 'moreButton',\n type: 'button'\n });\n\n \n\n // Append Contact Details into form\n \n form.appendChild(firstNameLabel);\n form.appendChild(firstName);\n form.appendChild(lastNameLabel);\n form.appendChild(lastName);\n form.appendChild(emailLabel);\n form.appendChild(email);\n form.appendChild(addressLabel);\n form.appendChild(address);\n form.appendChild(moreButton);\n formDiv.insertBefore(form, moreInfo);\n}", "title": "" }, { "docid": "e250031326a32d3d28caf231d0c0beda", "score": "0.5919456", "text": "function compose_send() {\n let content = [];\n for (let k in mua_headers) {\n content.push(k + \"=\" + encodeURIComponent(mua_headers[k]));\n }\n // Push the subject and email body into the form data\n content.push(\"subject=\" + encodeURIComponent(document.getElementById('composer_subject').value));\n content.push(\"body=\" + encodeURIComponent(document.getElementById('composer_body').value));\n if (G_ponymail_preferences.login && G_ponymail_preferences.login.alternates && document.getElementById('composer_alt')) {\n content.push(\"alt=\" + encodeURIComponent(document.getElementById('composer_alt').options[document.getElementById('composer_alt').selectedIndex].value));\n }\n\n let request = new XMLHttpRequest();\n request.open(\"POST\", \"%sapi/compose.lua\".format(G_apiURL));\n request.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");\n request.send(content.join(\"&\")); // send email as a POST string\n\n document.getElementById('composer_modal').style.display = 'none';\n modal(\"Message dispatched!\", \"Your email has been sent. Depending on moderation rules, it may take a while before it shows up in the archives.\", \"help\");\n}", "title": "" }, { "docid": "aa1cf2f434a50152a7afbb97da332b6f", "score": "0.5913562", "text": "function sendForm(form, url){\n $.ajax({\n url: url,\n type: \"POST\",\n dataType: \"html\",\n data: form.serialize(),\n\t\tbeforeSend: function(){\n\t\t\t$(\"#form_preloader\").fadeIn(800);\n\t\t},\n success: function(response){\n\t\t\tconsole.log(\"response from server: \" + response);\n\t\t\t\n\t\t\tfunction thnxShow(){\n\t\t\t\t$(\"#form_preloader\").fadeOut(300);\n\t\t\t\t\n\t\t\t\t$(\"#form_pop_wrapper\").fadeIn(300);\n\t\t\t\t\n\t\t\t\t$(\"#form_close\").click(function(){\n\t\t\t\t\t$(\"#form_pop_wrapper\").fadeOut(300);\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t$(\"#form_popup_cover\").click(function(){\n\t\t\t\t\t$(\"#form_pop_wrapper\").fadeOut(300);\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t$(\"#form_popup_cover\").on(\"touchend\", function(){\n\t\t\t\t\t$(\"#form_pop_wrapper\").fadeOut(300);\n\t\t\t\t});\n\t\t\t}\n\t\t\t\n\t\t\tform.find(\".field\").each(function(){\n\t\t\t\tif(!$(this).hasClass(\"ne\")){\n\t\t\t\t\tif($(this).hasClass(\"field_date_of_appeal\"))\n\t\t\t\t\t\t$(this).val(\"не вказано\");\n\t\t\t\t\telse\n\t\t\t\t\t\t$(this).val(\"\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$(\".calendar_item\").removeClass(\"active\");\n\t\t\t});\n\t\t\n\t\t\tif(response == \"Sent\"){\n\t\t\t\tif($(form).hasClass(\"simple_form\")){\n\t\t\t\t\t$(\"#form_popup\").find(\"p:eq(0)\").text(\"Дякуємо!\");\n\t\t\t\t\t$(\"#form_popup\").find(\"p:eq(1)\").text(\"Ваше повідомлення відправлено\");\n\t\t\t\t\t\n\t\t\t\t\tthnxShow();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\telse if(response == \"Subscribed\"){\n\t\t\t\tif($(form).hasClass(\"subscribe_form\")){\n\t\t\t\t\t$(\"#form_popup\").find(\"p:eq(0)\").text(\"Дякуємо!\");\n\t\t\t\t\t$(\"#form_popup\").find(\"p:eq(1)\").text(\"Ваша підписка оформлена\");\n\t\t\t\t\t\n\t\t\t\t\tthnxShow();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\telse{\n\t\t\t\tconsole.log(response);\n\t\t\t\talert(\"Щось пішло не так. Будь ласка, спробуйте ще раз після перезавантаження сторінки.\");\n\t\t\t\tlocation.reload();\n\t\t\t}\n\t\t\t\n\t\t\tV.canSend = true;\n \t},\n \terror: function(jqXHR, textStatus, errorThrown){ \n \t\tconsole.log(\"AJAX request ERROR: \" + textStatus + \" - \" + errorThrown);\n\t\t\talert(\"Щось пішло не так. Будь ласка, спробуйте ще раз після перезавантаження сторінки.\");\n\t\t\tlocation.reload();\n \t}\n \t});\n}", "title": "" }, { "docid": "483f031ec6a34502408e3735bb3bcad3", "score": "0.58523685", "text": "function newMsg() {\n var list = '<li class=\"msgNew_to\">';\n list += '<label>To:</label>';\n list += '<select name=\"msg_to\">';\n list += '<option value=\"1\">Boss</option>';\n list += '<option value=\"1\">Supervisor1</option>';\n list += '</select>';\n list += '</li>';\n list += '<li class=\"msgNew_to\"><label>Subject:</label>';\n list += '<input type=\"text\" name=\"msg_sub\" id=\"msg_sub\"></li>';\n list += '<li class=\"msgNew_content\">';\n list += '<label>Message:</label>';\n list += '<textarea name=\"msg_content\" id=\"msg_content\"></textarea></li>';\n list += '<li class=\"btn_line\"><button name=\"submit\" onclick=\"postNew()\" type=\"submit\" id=\"newMsg_btn\">send</button></li>'\n $(\"#content_ul\")\n .append(list);\n}", "title": "" }, { "docid": "e813ad99adfa97c23f081c6e4c8fb859", "score": "0.58501357", "text": "function ContactContent() {\n\n // clears the validation messages initially\n ClearValidationMessage();\n\n // configure the submit button\n let SendButton = document.getElementById(\"sendButton\");\n SendButton.addEventListener(\"click\", (event) => {\n if (!document.forms[0].checkValidity()) {\n OutputFormDataToConsole();\n ValidateForm();\n }\n });\n }", "title": "" }, { "docid": "b9150f1e3003427efb3bc5cff7751dfb", "score": "0.5844083", "text": "function postInquiryToGoogle() {\r\n var inquiryname = $('#InquiryName').val();\r\n var inquirydob = $('#InquiryDOB').val();\r\n var inquirygrade = $('#InquiryGrade').val();\r\n var inquiryemail = $('#InquiryEmail').val();\r\n var inquiryphone = $('#InquiryPhone').val();\r\n var inquirysubject = $('#InquirySubject').val();\r\n var inquirymessage = $('#InquiryMessage').val();\r\n var inquirymarketing = $('#InquiryMarketing').val();\r\n\r\n $.ajax({\r\n url: \"https://docs.google.com/forms/d/e/1FAIpQLSf0rhz1oD1BTy_5K0ErLpjw0L5g7ZoOvwX4pH6kvystdQ4TPg/formResponse\",\r\n data: { \"entry.1554984773\": inquiryname, \"entry.2080001749\": inquirydob, \"entry.271068763\": inquirygrade, \"entry.2128247136\": inquiryemail, \"entry.1234350953\": inquiryphone, \"entry.1602031151\": inquirysubject, \"entry.721984861\": inquirymessage, \"entry.197306362\": inquirymarketing },\r\n type: \"POST\",\r\n dataType: \"xml\",\r\n statusCode: {\r\n 0: function () {\r\n $(inquiry).fadeOut();\r\n// $(tips).fadeOut();\r\n $(geekzinquiry).html('<br /><br /><br /><br />Your message on its way. Geekz support team will be in touch with you shortly. <br />Good luck!');\r\n $('html, body').animate({scrollTop: $(\"#contact\").offset().top}, 2000);\r\n },\r\n 200: function () {\r\n $(inquiry).fadeOut();\r\n// $(tips).fadeOut();\r\n $(geekzinquiry).html('<br /><br /><br /><br />Your message on its way. Geekz support team will be in touch with you shortly. <br />Good luck!');\r\n $('html, body').animate({scrollTop: $(\"#contact\").offset().top}, 2000);\r\n }\r\n }\r\n });\r\n }", "title": "" }, { "docid": "b12d85629128b70a82715285c01022fe", "score": "0.58376706", "text": "function sendMail(contactForm) {\n emailjs.send(\"gmail\", \"john\", {\n \"from_name\": contactForm.name.value,\n \"from_email\": contactForm.email.value,\n \"project_request\": contactForm.message.value\n })\n .then(\n function(response) {\n $('#submit-text').text(\"Your email has been send successfully. Thank you for your message\", response);\n },\n function(error) {\n $('#submit-text').text(\"It seems like an error has occured, please feel free to try again, alternatively you can email me at: [email protected]\", error);\n }\n );\n return false; // To block form loading a new page\n}", "title": "" }, { "docid": "5f2e623a8e814340f5fb7d80b7b1e564", "score": "0.5836991", "text": "function sendmailzvonok() {\n\tvar fields = $('#zvonok-form').serialize();\n\t$.ajax({\n\t\ttype: 'POST',\n\t\turl: '/sendmail.php',\n\t\tdata: fields,\n\t\tsuccess: function(data) {\n\t\t\t$('.send-result-zvonok-form').html(data);\n\t\t}\n\t});\n}", "title": "" }, { "docid": "9badfff4ffc0651d46278dcdbee259a0", "score": "0.58277136", "text": "function generateForm(html, number) {\n $.showCustomModal('Create Request', html, {\n id: 'cc-form',\n width: 650, //A way to add percentages would be great!\n buttons: [{\n id: 'cc-form-cancel',\n message: 'Cancel',\n handler: function () {\n $('#cc-form').closeModal();\n }\n }, {\n id: 'cc-form-submit',\n defaultButton: true,\n message: 'Submit',\n handler: function () {\n if (number === 1) {\n adoption();\n } else if (number === 2) {\n interLink();\n } else {\n return;\n }\n }\n }]\n });\n }", "title": "" }, { "docid": "879752062ce55bd54a628bac2f5fd7b0", "score": "0.5825055", "text": "function set_feedback_form(){\r\n var name = document.forms[\"contact_form\"][\"name\"].value;\r\n var email = document.forms[\"contact_form\"][\"email\"].value;\r\n var message = document.forms[\"contact_form\"][\"message\"].value;\r\n var reg_mail = /^(([^<>()\\[\\]\\\\.,;:\\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,}))$/\r\n if(name==\"\"){\r\n document.getElementById(\"error_message\").innerHTML = \"* Please fill up you name!\";\r\n return false;\r\n }\r\n\r\n if(email==\"\" || !email.match(reg_mail)){\r\n document.getElementById(\"error_message\").innerHTML = \"* Please fill up a valid email!\";\r\n return false;\r\n }\r\n\r\n if(message==\"\"){\r\n document.getElementById(\"error_message\").innerHTML = \"* Please write us a message!\";\r\n return false;\r\n }\r\n \t}", "title": "" }, { "docid": "d72ffca5addd42412b61aa9ad0af91c1", "score": "0.5822706", "text": "function sendToMeetingFlix(){\n\tvar content = \t\"<p>\\\n\t\t\t\t\t\tBy sending this meeting to MeetingFlix, you agree that ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper porta. Mauris massa. Vestibulum lacinia arcu eget nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Curabitur sodales ligula in libero. Sed dignissim lacinia nunc.\\\n\t\t\t\t\t</p>\\\n\t\t\t\t\t<label class='offscreen' for='publish-as'>Publish As: </label>\\\n\t\t\t\t\t<select id='publish-as' data-mini='true'>\\\n\t\t\t\t\t\t<option value='Draft' selected='selected'>Draft</option>\\\n\t\t\t\t\t\t<option value='Released'>Released</option>\\\n\t\t\t\t\t\t<option value='Final'>Final</option>\\\n\t\t\t\t\t\t<option value='Closed'>Closed</option>\\\n\t\t\t\t\t</select>\\\n\t\t\t\t\t<p>\\\n\t\t\t\t\t\tCurabitur tortor. Pellentesque nibh. Aenean quam. In scelerisque sem at dolor. Maecenas mattis. Sed convallis tristique sem. Proin ut ligula vel nunc egestas porttitor. Morbi lectus risus, iaculis vel, suscipit quis, luctus non, massa. Fusce ac turpis quis ligula lacinia aliquet. Mauris ipsum. Nulla metus metus, ullamcorper vel, tincidunt sed, euismod in, nibh.\\\n\t\t\t\t\t</p>\\\n\t\t\t\t\t<br/>\\\n\t\t\t\t\t<progress id='progressbar' max='100'></progress>\\\n\t\t\t\t\t<div style='width:30%;margin-left:auto;margin-right:0;' id='agreementstuff'>\\\n\t\t\t\t\t\t<label>\\\n\t\t\t\t\t\t\t<input type='checkbox' id='agree-to-publish' name='agree-to-publish' data-mini='true'>\\\n\t\t\t\t\t\t\tI agree\\\n\t\t\t\t\t\t</label>\\\n\t\t\t\t\t\t<a href='javascript:void(0)' id='publish-now' class='ui-disabled' data-role='button' data-mini='true'>Send to MeetingFlix</a>\\\n\t\t\t\t\t</div>\";\n\n\t//Open up the modal view\n\t$(\"body\").addClass(\"modalopen\");\n $(\"#modalProtection\").show();\n\t$(\"#popupSendToCabFlixContent\").html(content);\n\tprepareJQMStylesForDynamicContent(\"popupSendToCabFlixContent\");\n\t\n\t//Listeners for controls in this modal\n\t$('#agree-to-publish').change(function () {\n\t\tif ($(this).prop(\"checked\")) {\n\t\t\t$(\"#publish-now\").removeClass(\"ui-disabled\");\n\t\t}\n\t\telse{\n\t\t\t$(\"#publish-now\").addClass(\"ui-disabled\");\n\t\t}\n\t});\n\tdocument.getElementById('publish-now').addEventListener('click', function(event) {\n\t\tvar pairs;\n\t\t\n\t\t$(\"#progressbar\").show();\n\t\t$(\"#agreementstuff\").hide();\n\t\t\n\t\tif ($(\"#publish-as\").val() == \"Closed\"){\n\t\t\tpairs = [[\"SentToMeetingFlix\", 0],\n\t\t\t\t\t [\"Meeting_x0020_Status\", $(\"#publish-as\").val()]];\n\t\t}\n\t\telse {\n\t\t\tpairs = [[\"SentToMeetingFlix\", 1],\n\t\t\t\t\t [\"SentToMeetingFlixBy\", CurrentUser.FirstName + \" \" + CurrentUser.LastName],\n\t\t\t\t\t [\"SentToMeetingFlixOn\", new Date().dateToISO8601String()],\n\t\t\t\t\t [\"Meeting_x0020_Status\", $(\"#publish-as\").val()]]\n\t\t}\n\t\t$().SPServices({\n\t\t\toperation: \"UpdateListItems\",\n\t\t\tasync: true,\n\t\t\tbatchCmd: \"Update\",\n\t\t\tlistName: \"Cabinet Meeting\",\n\t\t\tvaluepairs: pairs,\n\t\t\tID: meetingAtHand.attr(\"ows_ID\"),\n\t\t\tcompletefunc: function(xData, Status) {\n\t\t\t\t$(xData.responseXML).SPFilterNode(\"z:row\").each(function() {\n\t\t\t\t\t// Generate Manifest and Binder JSON\n\t\t\t\t\tgenerateJSONFile(thisSite + \"/SitePages/\"+branchname+\"SharedAssets/JSONFiles/\", \"binder.\" + meetingAtHand.attr(\"ows_ID\") + \".json.safe\");\n\t\t\t\t\t//and kill this listener\n\t\t\t\t\tthis.removeEventListener('click',arguments.callee,false);\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t});\n\t\n\t$(\"#popupSendToCabFlix\").show();\n}", "title": "" }, { "docid": "f25bfaea277d08eeb1ffdd7e1f0294d9", "score": "0.5805768", "text": "function createmodalAndLaunch(){\n var email = \"\",\n textToSend = \"\";\n\n $('body').append(\"<div id='contactModal' class='modal'><div class='modal-content'><h5>Contacta con NachoSizle</h5><form class='col s12'><div class='input-field col s12'><input id='email' type='email' name='email' class='validate'><label for='email'>¿Cual es tu email?</label></div><div class='input-field col s12'><textarea name='contentEmail' id='textArea1' class='materialize-textarea'></textarea><label for='textarea1'>¿Qué quieres decirme?</label></div></form></div><div class='modal-footer center-align'><a class='modal-action modal-close waves-effect waves-red accent-3 btn-flat'>Enviar</a></div></div>\");\n\n $('#contactModal').openModal({\n dismissible: true, // Modal can be dismissed by clicking outside of the modal\n opacity: .5, // Opacity of modal background\n in_duration: 300, // Transition in duration\n out_duration: 200, // Transition out duration\n starting_top: '4%', // Starting top style attribute\n ending_top: '10%', // Ending top style attribute\n complete: function() { \n $('#textArea1').trigger('autoresize');\n //SE COGEN LOS DATOS\n emailTo = $('#email').val();\n textToSend = $('#textArea1').val();\n\n if(emailTo != \"\" && textToSend != \"\"){\n //UNA VEZ SE CIERRA EL MODAL, SE PROCEDE LA PETICION AJAX PARA ENVIAR EL EMAIL\n $.ajax({\n url: '../Php/sendEmail.php',\n type: 'post',\n data: { email : emailTo, contentEmail : textToSend },\n success: function (response) {\n Materialize.toast(response, 3000, 'rounded');\n },\n error: function (obj, error, objError){\n //avisar que ocurrió un error\n console.log(\"Ha ocurrido un error: \");\n console.log(error);\n }\n });\n } else {\n Materialize.toast(\"Email o mensaje vacíos.\", 3000, 'rounded');\n location.href = \"../index.html\";\n }\n\n //SE ELIMINA COMPLETAMENTE EL MODAL\n $('#contactModal').remove();\n }\n });\n}", "title": "" }, { "docid": "cd0ff6e246332a57afcf4588d48748ed", "score": "0.580069", "text": "function handleMessageFormSubmit(){\n var postTitle = $(\"#post-title\").val();\n var postBody = $(\"#post-body\").val();\n addMessage(postTitle,postBody);\n}", "title": "" }, { "docid": "8a87eac5785396eb7b413d22bd7db7a4", "score": "0.5795509", "text": "function contactUsSubmit() {\n\t// this is the name of the \"name\" feild\n\tvar name = document.forms['contactus']['name'].value;\n\t// check if the name is entered\n\tif( name.length == 0 || name == '' || name == null || $.trim(name).length == 0 || name == 'Name *') {\n\t\t$(\".form-result\").css(\"display\", \"none\").html(\"<p class='note error'>Please type your name.</p><br />\").fadeIn(400);\n\t\t\t$(\".contactForm #name\").animate({borderColor: '#ffacac'})\n\t\t\t$(\"#contactus #name\").focus();\n\t\treturn;\n\t} else {\n\t\t// remvoe the error element\n\t\t$(\".contactForm #name\").css({borderColor: '#d8d7d7'})\n\t\t$(\".form-result\").html(\"\");\n\t}\n\t\n\t// store the email in a variable for later use\n\t// this is the comment field\n\tvar email = document.forms['contactus']['email'].value;\n\t\n\t// validate the email address\n\tvar eIsValid = validateEmail( 'contactus', 'email' );\n\tif( !eIsValid ) {\n\t\t// create the error element\n\t\t$(\".form-result\").css(\"display\", \"none\").html(\"<p class='note error'>Please enter a valid email.</p><br />\").fadeIn(400);\n\t\t// put the cursor in the field\n\t\t$(\".contactForm #email\").animate({borderColor: '#ffacac'})\n\t\t$(\".contactForm #email\").focus();\n\t\treturn;\n\t} else {\n\t\t$(\".form-result\").fadeOut('fast').html(\"\");\n\t}\n\t\n\t// this is the comment field\n\tvar comment = document.forms['contactus']['comment'].value;\n\t// check if the comment\n\tif( comment.length == 0 || comment == '' || comment == null ) {\n\t\t$(\".form-result\").css(\"display\", \"none\").html(\"<p class='note error'>Please type in a message.</p><br />\").fadeIn(400);\n\t\t$(\".contactForm #comment\").animate({borderColor: '#ffacac'})\n\t\t$(\"#comment\").focus();\n\t\treturn;\n\t} else {\n\t\t// in case there is something that is later wrong with the form\n\t\t// we need to make sure we clear the error\n\t\t$(\".form-result\").fadeOut('fast').html(\"\");\n\t}\n\tvar subject = document.forms['contactus']['subject'].value;\n\t// if there is a subject\n\tif( subject.length <= 0 ) {\n\t\t// No subject is filled in\n\t\tsubject = \"No Subject\";\n\t}\n\t$(\".contactForm > .button\").hide(500);\n\t// acquire the correct AJAX object\n\tvar xmlhttp = Getxmlhttp();\n\t// Open the server page\n\txmlhttp.open(\"GET\", 'ajax/email_conf.php?name='+name+'&email='+email+'&comment='+comment+'&subject='+subject, true);\n\txmlhttp.onreadystatechange = function() {\n\t\tif(xmlhttp.readyState == 4 && xmlhttp.status == 200) {\n\t\t\t// hide the form\n\t\t\t$(\".contactForm\").slideUp(1000, function() {\n\t\t\t\t// once the form has been hidden\n\t\t\t\t$(\".form-result\").css(\"display\", \"none\");\n\t\t\t\tif( parseInt(xmlhttp.responseText) == 1 ) {\n\t\t\t\t\t// message sent\n\t\t\t\t\t$(\".form-result\").css(\"display\", \"none\").html(\"<p class='note success'>Your message has successfully been sent. Thank you for your input!</p><br />\").fadeIn('fast');\n\t\t\t\t} else {\n\t\t\t\t\t// message failed to send\n\t\t\t\t\t$(\".form-result\").css(\"display\", \"none\").html(\"<p class='note error'>We are sorry, but something went wrong. Your message has not been sent, please try again later! Error Message: \"+xmlhttp.responseText+\"</p>\").fadeIn('fast');\n\t\t\t\t}\n\t\t\t\t$(\".form-result\").show(1000);\n\t\t\t});\n\t\t\t\n\t\t}\n\t}\n\t// Send the request\n\txmlhttp.send(null);\n}", "title": "" }, { "docid": "ea32f911ac24867b6a691120fccf10ca", "score": "0.57900214", "text": "function getForumData(){\n\n\t//setup connections to html ids //\n\tvar fNameField = \n\tdocument.getElementById('fName');\n\tvar lNameField = \n\tdocument.getElementById('lName');\n\n\t// Next have to get values from input fields // \n\t// make a new variable to hold the values //\n\tvar fNameData = fNameField.value;\n\tvar lNameData = lNameField.value;\n\n\t//title thus toether with a message\n\tvar message = \"Your name is\" +\n\t\tfNameData + \" \" + lNameData + \n\t\t\"! Thanks for visiting my page!\"; \n\n\tconsole.log(message);\n\n\tvar formMsg = document.getElementById('formResponse');\n\n\tformMsg.innerHTML = message; \n}", "title": "" }, { "docid": "b39877fc0582d1e1ee14e1a98c3e1110", "score": "0.5784959", "text": "function show_popup_mail() {\n\t$.post('/home/show_contact', function(response) {\n\t\t$('#popup_container').html(response.view);\n\t\t$('#wrapper_popup').html('');\n\t\tevents_buttons_popup();\n\t\tevents_fields_focus();\n\t}, 'json');\n\tpopup_adjust();\n\t$('#background_popup, #popup_container').fadeIn(500);\n\tevents_hide_popup();\n}", "title": "" }, { "docid": "d1bfa9f286b07d5981eb59fb7d9d3146", "score": "0.57790136", "text": "function submitForm() {\n var $contactName = $nameTouch.value.toLowerCase();\n var $emailAddress = $emailTouch.value.toLowerCase();\n var $warningName = $('.warning-message.name');\n var $warningEmail = $('.warning-message.email');\n if($contactName !== '' && $emailAddress !== '') {\n $('#s4-content').fadeOut(700, function() {\n var $senseGreeting = '<div class=\"sense-message\">';\n $senseGreeting += '<div>';\n $senseGreeting += '<h3>hi ' + $contactName + '</h3>';\n $senseGreeting += '<p>thank you so much for contacting me!<br>i will do my very best to reply to your inquiry as sharply as i can, no later than next business day.</p>';\n $senseGreeting += '<p>have a great day!</p>';\n $senseGreeting += '<p><i>sincerely,<br>steingrimur</i></p>';\n $senseGreeting += '<div id=\"close-touch\" class=\"buttons close-touch center-text\">';\n $senseGreeting += '<a href=\"#\">close</a>';\n $senseGreeting += '</div>';\n $senseGreeting += '</div>';\n $senseGreeting += '</div>';\n $('#s4-content').html($senseGreeting).delay(300).fadeIn(500);\n $closeTouchButton = document.getElementById('close-touch');\n $closeTouchButton.addEventListener('click', function(e) {\n e.preventDefault();\n $('#s4-content').delay(200).fadeOut(300, function() {\n $('#s4-content').html($sectionFourContent).fadeIn();\n $buttonTouch = document.getElementById('button-touch');\n });\n });\n });\n\n } else {\n if($contactName === '') {\n $warningName.fadeIn();\n } else {\n $warningName.fadeOut();\n }\n if($emailAddress === '') {\n $warningEmail.fadeIn();\n } else {\n $warningEmail.fadeOut();\n }\n }\n}", "title": "" }, { "docid": "1715143de2b329bd3211c430a9403977", "score": "0.5772928", "text": "function setFeedbackFormContentF1(f){\n\t\t\t\n\t\t\twindow.feedback.host\t\t\t\t\t\t\t\t=\tlocation.host;\n\t\t\twindow.feedback.pathname\t\t\t\t\t\t\t=\tlocation.pathname;\n\t\t\t\n\t\t\twindow.feedback.form[f]\t\t\t\t\t\t\t\t=\t{};\n\t\t\twindow.feedback.form[f].email\t\t\t\t\t\t=\t[];\n\t\t\twindow.feedback.form[f].email[0]\t\t\t\t\t=\t{};\n\t\t\twindow.feedback.form[f].email[0].optPost\t\t\t=\t'emailTelegramFeedback';\n\t\t\twindow.feedback.form[f].email[0].chatId\t\t\t\t=\t'463530275';\t\t\t\n\t\t\twindow.feedback.form[f].email[0].toEmail\t\t\t=\t'';\n\t\t\twindow.feedback.form[f].email[0].fromEmail\t\t\t=\t'From: Roman Cheskidov <[email protected]>\\r\\n';\n\t\t\twindow.feedback.form[f].email[0].BCC\t\t\t\t=\t'[email protected]';\n\t\t\twindow.feedback.form[f].email[0].topic\t\t\t\t=\t'Thank you for the request';\n\t\t\twindow.feedback.form[f].email[0].message\t\t\t=\t''\t+\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t'Hi,' \t\t\t\t+\t'<br />' + '<br />'\t+\n\t\t\t\t'Thank you for your request message.'\t\t\t+ '<br />' +\n\t\t\t\t'I will contact you as soon as possible.' + '<br />' + '<br />' +\n\t\t\t\t'Sincerely yours,' \t\t\t\t\t\t+ '<br />' +\n\t\t\t\t'Roman Cheskidov' \t\t\t\t\t\t+ '<br />' +\n\t\t\t\t'+1 650 7410014' \t\t\t\t\t\t+ '<br />' +\n\t\t\t\t'Skype: rootstem'\t\t\t\t\t\t+ '<br />' +\n\t\t\t\t'http://r1.userto.com'\t\t\t\t\t+ '<br />' +\n\t\t\t\t\t\t\t\t\t\t\t\t\t'<br />' +\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t'<br />' +\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t'<br />' +\n\t\t\t\t\t\t\t\t\t'<p style=\"color: grey;\">'\t+\t\n\t\t\t\t\t\t\t\t\t'If you send this request with the media: ' + '[email protected]' + ' '+\n\t\t\t\t\t\t\t\t\t'by mistake, please, send reply letter with subject \"Cancel the request\".'\t+\n\t\t\t\t\t\t\t\t\t'</p>';\n\n\t\t\twindow.feedback.form[f].elem\t\t\t\t\t\t=\t[];\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t//Data for кнопка 'Отправить', [3] form element, button, type: submit-modal\t\n\t\t\twindow.feedback.form[f].elem[0]\t\t\t\t\t\t=\t{};\t\t\t\n\t\t\twindow.feedback.form[f].elem[0].tagName\t\t\t\t=\t'a';\n\t\t\twindow.feedback.form[f].elem[0].tagType\t\t\t\t=\t'modal';\n\t\t\twindow.feedback.form[f].elem[0].tagInnerHTML\t\t=\t'Ask for callback';\n\t\t\twindow.feedback.form[f].elem[0].tagClass\t\t\t=\t'c-p-Blue-Grey-500';\n\t\t\twindow.feedback.form[f].elem[0].modalNum\t\t\t=\t'0';\t\t\t\t\t\t\n\n\t\t\t//Data for 'Name:', [0] form element, input\t\t\t\t\t\t\n\t\t\twindow.feedback.form[f].elem[1]\t\t\t\t\t\t=\t{};\t\t\t\t\n\t\t\twindow.feedback.form[f].elem[1].labelInnerHTML\t\t=\t'Your name';\n\t\t\twindow.feedback.form[f].elem[1].labelClass\t\t\t=\t'control-label';\t\t\t\n\t\t\twindow.feedback.form[f].elem[1].tagName\t\t\t\t=\t'input';\n\t\t\twindow.feedback.form[f].elem[1].tagType\t\t\t\t=\t'text'; //'number';\n\t\t\twindow.feedback.form[f].elem[1].tagPlaceholder\t\t=\t'John Smith';\t\t\t\t\t\t\n\t\t\twindow.feedback.form[f].elem[1].tagClass\t\t\t=\t'form-control';\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\n\t\t\t//[0][1] Data for кнопка 'Type of the user:', form element, select, type: multiple\n\t\t\twindow.feedback.form[f].elem[2]\t\t\t\t\t\t=\t{};\t\t\t\t\n\t\t\twindow.feedback.form[f].elem[2].labelInnerHTML\t\t=\t'Telecom type';\n\t\t\twindow.feedback.form[f].elem[2].labelClass\t\t\t=\t'control-label';\t\t\t\n\t\t\twindow.feedback.form[f].elem[2].tagName\t\t\t\t=\t'select';\n\t\t\twindow.feedback.form[f].elem[2].tagType\t\t\t\t=\t'';\t\t\t\n\t\t\twindow.feedback.form[f].elem[2].tagClass\t\t\t=\t'form-control';\n\t\t\twindow.feedback.form[f].elem[2].tagRequired\t\t\t=\t'required';\t\t\t\n\t\t\twindow.feedback.form[f].elem[2].tagOption\t\t\t=\t[\n\t\t\t\t\t{'optInnerHTML': 'You like'},\n\t\t\t\t\t{'optInnerHTML': 'Skype'},\n\t\t\t\t\t{'optInnerHTML': 'WhatsApp'},\n\t\t\t\t\t{'optInnerHTML': 'Telegram'},\n\t\t\t\t\t{'optInnerHTML': 'WeChat'},\n\t\t\t\t\t{'optInnerHTML': 'Viber'},\n\t\t\t\t\t{'optInnerHTML': 'Email'},\n\t\t\t\t\t{'optInnerHTML': 'Phone'}\t\t\t\t\t\n\t\t\t\t];\n\n\t\t\t//Data for 'Skype, WhatsApp, Telegram, WeChat, Viber, Email or Phone', [1] form element, input\t\t\t\t\t\t\t\t\t\n\t\t\twindow.feedback.form[f].elem[3]\t\t\t\t\t\t=\t{};\t\t\t\t\n\t\t\twindow.feedback.form[f].elem[3].labelInnerHTML\t\t=\t'Number (login)';\n\t\t\twindow.feedback.form[f].elem[3].labelClass\t\t\t=\t'control-label';\t\t\t\n\t\t\twindow.feedback.form[f].elem[3].tagName\t\t\t\t=\t'input';\n\t\t\twindow.feedback.form[f].elem[3].tagRequired\t\t\t=\t'required';\n\t\t\twindow.feedback.form[f].elem[3].tagType\t\t\t\t=\t'text'; //'number';\t\t\t\n\t\t\twindow.feedback.form[f].elem[3].tagClass\t\t\t=\t'form-control';\n\t\t\twindow.feedback.form[f].elem[3].tagPlaceholder\t\t=\t'your contacts';\n\t\t\t\n\t\t\t//Data for кнопка 'Отправить', [3] form element, button, type: submit-modal\n\t\t\twindow.feedback.form[f].elem[4]\t\t\t\t\t\t=\t{};\t\t\t\n\t\t\twindow.feedback.form[f].elem[4].tagName\t\t\t\t=\t'button';\n\t\t\twindow.feedback.form[f].elem[4].tagType\t\t\t\t=\t'submit-modal';\n\t\t\twindow.feedback.form[f].elem[4].tagInnerHTML\t\t=\t'Send';\n\t\t\twindow.feedback.form[f].elem[4].tagClass\t\t\t=\t'btn btn-success w-8-em';\n\t\t\twindow.feedback.form[f].elem[4].modalNum\t\t\t=\t'1';\n\n\t\t\t//Data for кнопка 'Очистить', [4] form element, button, type: reset\n\t\t\twindow.feedback.form[f].elem[5]\t\t\t\t\t\t=\t{};\t\t\t\n\t\t\twindow.feedback.form[f].elem[5].tagName\t\t\t\t=\t'button';\n\t\t\twindow.feedback.form[f].elem[5].tagType\t\t\t\t=\t'reset';\n\t\t\twindow.feedback.form[f].elem[5].tagInnerHTML\t\t=\t'Reset';\n\t\t\twindow.feedback.form[f].elem[5].tagClass\t\t\t=\t'btn btn-light';\n\t\treturn;\n\t}", "title": "" }, { "docid": "ba2bd27d9ca56dd0613bbfa937d04beb", "score": "0.57503057", "text": "function sendmailzakaz() {\n\tvar fields = $('#zakaz-form').serialize();\n\t$.ajax({\n\t\ttype: 'POST',\n\t\turl: 'sendmail.php',\n\t\tdata: fields,\n\t\tsuccess: function(data) {\n\t\t\t$('.send-result-zakaz-form').html(data);\n\t\t}\n\t});\n}", "title": "" }, { "docid": "10a32343f6ae83ccf5e4f487bae05d37", "score": "0.5749326", "text": "function sendMail(contactForm) {\n emailjs.send(\"gmail\",\"template_1b5075x\", {\n \"from_name\": contactForm.name.value,\n \"from_email\": contactForm.emailaddress.value,\n \"project_request\": contactForm.informationsummary.value\n })\n .then(\n function () {\n $(\".contact-request\").html(\n `<p class=\"paragraph text-center\">Thank you for reaching out to us! <br>We shall be in touch real soon!.</p>`\n );\n },\n function (error) {\n $(\".contact-request\").html(\n `<p class=\"paragraph text-center\">Error ${error.status}. Unfortunately that did not go through! <br> Please try again.</p>`\n );\n }\n ); \n\n \n return false;\n}", "title": "" }, { "docid": "27e5399c18fcdec397a6fb06a0ce5174", "score": "0.5746196", "text": "function sendMail() {\n\tformData = new FormData();\n\tname = $('#name')[0].value;\n\tsubject = $('#subject')[0].value;\n\temail = $('#email')[0].value;\n\tmessage = $('#message')[0].value;\n\n\tif (name == '' || subject == '' || email == '' || message == '') {\n\t\talert('Tutti i campi sono obbligatori!');\n\t\treturn false;\n\t}\n\tformData.set('name', name);\n\tformData.set('subject', subject);\n\tformData.set('email', email);\n\tformData.set('message', message);\n\t$.ajax({\n\t\ttype: 'POST',\n\t\turl: '../dbManager/dbSendMail.php',\n\t\tdata: formData,\n\t\tcontentType: false,\n\t\tprocessData: false,\n\t\tsuccess: function (response) {\n\t\t\tconsole.log(response);\n\t\t\t//Modifica il form mostrando un messaggio di corretto invio della mail\n\t\t\tdocument.getElementById('form-container').innerHTML = `\n\t\t\t<div class=\"card-post-container\">\n\t\t\t\t<div class=\"card-post\">\n\t\t\t\t\t<div class=\"contact-form-title post-title\">Grazie per averci contattato, il tuo messaggio è stato inviato correttamente, il Team risponderà appena possibile!</div>\n\t\t\t\t</div>\n </div>\n\t\t\t`;\n\t\t},\n\t});\n}", "title": "" }, { "docid": "9fe94f3faefe1f9266a63eff12e8871d", "score": "0.57313573", "text": "function ajaxContactForm() {\n\t\tif ($(\"#contact-form\").length > 0) {\n\t\t\t// Validate the contact form\n\t\t\t$('#contact-form')\n\t\t\t\t\t.validate(\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// Add requirements to each of the fields\n\t\t\t\t\t\t\t\trules : {\n\t\t\t\t\t\t\t\t\tname : {\n\t\t\t\t\t\t\t\t\t\trequired : true,\n\t\t\t\t\t\t\t\t\t\tminlength : 2\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\temail : {\n\t\t\t\t\t\t\t\t\t\trequired : true,\n\t\t\t\t\t\t\t\t\t\temail : true\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tmessage : {\n\t\t\t\t\t\t\t\t\t\trequired : true,\n\t\t\t\t\t\t\t\t\t\tminlength : 10\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\t\t// Specify what error messages to display\n\t\t\t\t\t\t\t\t// when the user does something horrid\n\t\t\t\t\t\t\t\tmessages : {\n\t\t\t\t\t\t\t\t\tname : {\n\t\t\t\t\t\t\t\t\t\trequired : \"Please enter your first name.\",\n\t\t\t\t\t\t\t\t\t\tminlength : $\n\t\t\t\t\t\t\t\t\t\t\t\t.format(\"At least {0} characters required.\")\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\temail : {\n\t\t\t\t\t\t\t\t\t\trequired : \"Please enter your email.\",\n\t\t\t\t\t\t\t\t\t\temail : \"Please enter a valid email.\"\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tmessage : {\n\t\t\t\t\t\t\t\t\t\trequired : \"Please enter a message.\",\n\t\t\t\t\t\t\t\t\t\tminlength : $\n\t\t\t\t\t\t\t\t\t\t\t\t.format(\"At least {0} characters required.\")\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\t\t// Use Ajax to send everything to processForm.php\n\t\t\t\t\t\t\t\tsubmitHandler : function(form) {\n\t\t\t\t\t\t\t\t\t$(\"#submit-contact\").html(\"Sending...\");\n\t\t\t\t\t\t\t\t\t$(form)\n\t\t\t\t\t\t\t\t\t\t\t.ajaxSubmit(\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\t\tsuccess : function(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tresponseText,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstatusText,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\txhr, $form) {\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\t\t\t\"#contact-content\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.slideUp(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t600,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfunction() {\n\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\t\t\t\t\t\t\t\t\t\t\t\t\"#contact-content\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.html(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tresponseText)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.slideDown(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t600);\n\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\t\t\t\t\t\t\t\t\t\t\t\t\".submit-contact\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.html(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Submit\");\n\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\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\treturn false;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t}\n\t}", "title": "" }, { "docid": "2900db4446187c3b71794d200e46c07b", "score": "0.57268953", "text": "function sendMail(contactForm) {\n emailjs\n .send(\"queries_jptrading\", \"queries_general\", {\n from_name: contactForm.name.value,\n from_email: contactForm.emailaddress.value,\n general_query: contactForm.generalquery.value,\n })\n //This section will call a modal on un/successful submission of the form\n .then(\n function (response) {\n $(\"#successModal\").modal(\"show\");\n },\n function (error) {\n $(\"#errorModal\").modal(\"show\");\n }\n );\n return false;\n}", "title": "" }, { "docid": "d254687ef0241aa72b41e1f6ec23b7d5", "score": "0.57256997", "text": "function ContactForm(){\n var me = this;\n me.validator = new Validator('contact-form');\n $('#send-contact').click(function(){\n me.contact();\n });\n $('#contact-form input').keypress(function(e){\n if(e.keyCode == 13)\n me.contact();\n });\n}", "title": "" }, { "docid": "88a761c102b9eb954f9b72eb484652c1", "score": "0.57143885", "text": "function submitForm() {\n var contactForm = $(this);\n \n if ( !$('#senderName').val() || !$('#senderEmail').val() || !$('#message').val() )\n {\n\t\t$(\"#Alert\").css('display', 'block');\n\t\t$(\"#Alert\").css('background', '#faa719');\n\t\t$(\"#Alert\").text(\"Please fill out all sections.\")\n\t}\n\telse if($('#senderName').val() == 'name' || $('#senderEmail').val() == 'e-mail'|| $('#message').val() == 'message')\n\t{\n\t\t$(\"#Alert\").css('display', 'block');\n\t\t$(\"#Alert\").css('background', '#faa719');\n\t\t$(\"#Alert\").text(\"Please fill out all sections.\")\n\t}\n\telse if (($('#senderEmail').val()).indexOf('@') === -1)\n\t{\n\t\t$(\"#Alert\").css('display', 'block');\n\t\t$(\"#Alert\").css('background', '#faa719');\n\t\t$(\"#Alert\").text(\"Please enter a valid e-mail address.\")\n\t}\n\telse\n\t{\n\t$.ajax({\n\t\turl: contactForm.attr( 'action' ) + \"?ajax=true\",\n\t\ttype: contactForm.attr( 'method' ),\n\t\tdata: contactForm.serialize(),\n\t\tsuccess: submitFinished\n\t\t});\n }\n return false;\n}", "title": "" }, { "docid": "183f4a99583934375b0afb21f54b5dc2", "score": "0.57135445", "text": "function formSubmit() {\n document.getElementById('error-message').className = 'hidden-error-message animate__animated animate__fadeOut';\n event.preventDefault();\n let sentHtml = '';\n emailjs.sendForm(\"service_r1s6k5e\", \"template_464i5ds\", \"#email-form\", \"user_xuHqhg0d940gXwsJXVA5A\")\n .then(function(response) {\n sentHtml = `\n <h1>Enjoy!</h1>\n <p>That has been sent to you, you may need to check your junk folder. I hope you enjoy making it. And I do hope you enjoy drinking it twice as much!</p>\n <p>Bottoms up. xx</p>\n <a href=\"index.html\" id=\"choose-again\" class=\"buttons pink-button\">I fancy another go</a>\n `;\n document.getElementById('information-container').className = 'animate__animated animate__fadeOut';\n document.getElementById('information-container').innerHTML = sentHtml;\n document.getElementById('information-container').className = 'enjoy animate__animated animate__fadeIn';\n },\n function(error) {\n document.getElementById('error-message').innerHTML = `<p>Please enter a valid email address</p>`;\n document.getElementById('error-message').className = 'visible-error-message animate__animated animate__fadeIn';\n return;\n });\n}", "title": "" }, { "docid": "12752c7e9f765a2c1f22c4be1f948df9", "score": "0.57066536", "text": "sendContactFormMessage(form) {\n form.preventDefault();\n const url = \"https://formspree.io/f/xnqknazp\";\n const formData = new FormData(form.target); // start loading spinner\n this.startLoading(); // send post request\n\n fetch(url, {\n method: \"POST\",\n body: formData,\n headers: {\n Accept: \"application/json\",\n },\n })\n .then((data) => {\n if (data.ok) {\n // show success message\n this.setNotify({\n className: \"success\",\n msg: form.target.getAttribute(\"data-success-msg\"),\n time: 5000,\n }); // reset all form inputs\n\n form.target.reset(); // remove inputs valid classes\n\n form.target\n .querySelectorAll(\".valid\")\n .forEach((el) => el.classList.remove(\"valid\"));\n } else {\n // show error message\n this.setNotify({\n className: \"danger\",\n msg: form.target.getAttribute(\"data-err-msg\"),\n time: 5000,\n });\n } // end loading spinner\n\n this.endLoading();\n console.log(data);\n })\n .catch((err) => console.log(err));\n }", "title": "" }, { "docid": "0e25b52a9f86cb79df29f7031f1d8bc7", "score": "0.5700786", "text": "function makeNewContactFromModal() {\n\t// var mainSubmit = document.getElementById(\"main_submit\");\n\n\tvar contactName = document.getElementById(\"contact_name\");\n\tvar newName = contactName.value;\n\n\tvar contactPicture = document.getElementById(\"contact_picture\");\n\tvar newPicture = contactPicture.value;\n\n\tvar contactAge = document.getElementById(\"contact_age\");\n\tvar newAge = contactAge.value;\n\n\tvar contactAddress = document.getElementById(\"contact_address\");\n\tvar newAddress = contactAddress.value;\n\n\tvar contactPhone = document.getElementById(\"contact_phone_number\");\n\tvar newPhone = contactPhone.value;\n\n\tvar contactCatId = document.getElementById(\"cat_family\");\n\tvar newCatId = 6\n\n\t$.ajax({\n\t\turl: \"http://127.0.0.1:4567/contacts\",\n\t\ttype: \"POST\",\n\t\tdata: {\t\"name\": newName,\n\t\t\"age\": newAge,\n\t\t\"address\": newAddress,\n\t\t\"phone_number\": newPhone,\n\t\t\"picture\": \"./img/avatar.png\",\n\t\t\"category_id\": 6}\n\t}).done(function(data) {\n\t\tconsole.log(data);\n\t\t})\n\n\t\tvar newPerson = data;\n\n\taddPersonToDom(newPerson);\n}", "title": "" }, { "docid": "ebc10760be34dd14cb1cd87d02cba41c", "score": "0.5700211", "text": "function sendMail(contactForm) {\n\n // emailjs function provided by EmailJS API\n // imported in the html header section.\n // passing 3 parameters (\"service id\", \"username\", and the values)\n emailjs.send(\"service_kh69pes\", \"game-feedback\", {\n \n // using the 'keys' from EmailJS template and \n // passing the 'values' of the id attribute \n // in the contact form from index.html \n \"from_name\": contactForm.name.value,\n \"from_email\": contactForm.emailaddress.value,\n \"project_request\": contactForm.projectsummary.value\n })\n\n // using the .then promise method\n // with a success and a error response\n\n .then (\n function(response) {\n\n console.log(\"SUCCESS\", response);\n \n // set input fields back to empty strings\n document.getElementById('fullname').value = '';\n document.getElementById('emailaddress').value = '';\n document.getElementById('projectsummary').value = '';\n\n // close modal view\n modalContactView.style.display = \"none\";\n\n // thank you message\n let gameAssistant = document.querySelector(\"#game-assistant\");\n gameAssistant.textContent = \"Thank you for your input!\";\n \n },\n function(error) {\n\n console.log(\"FAILED\", error);\n\n }\n\n );\n\n return false; // block from loading a new page or prevent page refresh\n\n}", "title": "" }, { "docid": "eb334b36abbf6ffde35b595c46339c9e", "score": "0.56940854", "text": "function contactFormPopup() {\n var trigger = $('#contact-form [type=\"submit\"]'),\n container = $('.cr-contact-message-modal');\n\n trigger.on('click', function () {\n container.addClass('is-visible');\n });\n\n $('<button><i class=\"icofont icofont-close\"></i></button>').appendTo(container).on('click', function () {\n container.removeClass('is-visible');\n });\n }", "title": "" }, { "docid": "b45aea8c3ba3f09d911b8667a6398910", "score": "0.5661246", "text": "function sendMessage() {\n var textMessage = $('input.send_message').val();\n console.log(textMessage);\n if(textMessage.length != 0) {\n var newMessage = $('.template .message').clone();\n // console.log(newMessage);\n newMessage.find('.message_text').text(textMessage);\n\n var data = new Date();\n var hours = addZero(data.getHours());\n var minutes = addZero(data.getMinutes());\n var time = hours + ':' + minutes;\n newMessage.find('.message_time').text(time);\n newMessage.addClass('sent');\n $('.field_chat.active').append(newMessage);\n setTimeout (sendResponse, 1000);\n $('input.send_message').val('');\n };\n}", "title": "" }, { "docid": "f7e3f483a223eb67eb50ce7c6afbd4a7", "score": "0.56446487", "text": "function submitFeddbackForm()\r\n{\r\n var email = $('#emailF').val();\r\n var name = $('#nameF').val();\r\n var feedback_category = $('#feedback_category').val();\r\n var message = $('#comment').val();\r\n\r\n $('#show_wornings_nameF').hide();\r\n if (name == '') {\r\n $('#show_wornings_nameF').show();\r\n $(\"#show_wornings_nameF\").html(\"Please enter name.\");\r\n $('#nameF').focus();\r\n return false;\r\n }\r\n $('#show_wornings_emailF').hide();\r\n if (email == '') {\r\n $('#show_wornings_emailF').show();\r\n $(\"#show_wornings_emailF\").html(\"Please enter email.\");\r\n $('#emailF').focus();\r\n return false;\r\n }\r\n $('#show_wornings_emailF').hide();\r\n if (!isEmail(email)) {\r\n $('#show_wornings_emailF').show();\r\n $(\"#show_wornings_emailF\").html(\"Please enter valid email.\");\r\n $('#emailF').focus();\r\n return false;\r\n }\r\n\r\n $('#show_wornings_messageF').hide();\r\n if (message == '') {\r\n $('#show_wornings_messageF').show();\r\n $(\"#show_wornings_messageF\").html(\"Please enter your comment.\");\r\n $('#comment').focus();\r\n return false;\r\n }\r\n\r\n\r\n\r\n else {\r\n var dataString = 'email=' + email + '&name=' + name + '&feedback_category=' + feedback_category + '&message=' + message;\r\n $.ajax({\r\n type: \"GET\",\r\n url: \"contact/feedback\",\r\n data: dataString,\r\n cache: false,\r\n success: function (html) {\r\n if (html == 1) {\r\n $('#show_worningF').show();\r\n $(\"#show_worningF\").html(\"Thanks! Your query has been submitted with us.\");\r\n $(\"#nameF\").val('');\r\n $(\"#emailF\").val('');\r\n $(\"#feedback_category\").val('');\r\n $(\"#comment\").val('');\r\n $(\"#show_worningF\").fadeOut(10000);\r\n } else {\r\n document.getElementById('show_worningF').style.display = \"none\";\r\n document.getElementById(\"show_worningf\").innerHTML = \"There might be something wrong.\";\r\n }\r\n\r\n\r\n }\r\n });\r\n }\r\n}", "title": "" }, { "docid": "6699442d37b13f0b5cc8a079a5e50ec3", "score": "0.56436825", "text": "function successMsg($elt, message){\r\n\t\t$('#contactForm').slideUp();\r\n\t\t$('#messageAjax').addClass('card-panel teal lighten-1');\r\n\t\t$('#messageAjax').append('<p class=\"center-align white-text\">' + message + '</p>');\r\n\t\t$('#messageAjax').slideDown(1000);\r\n\t}", "title": "" }, { "docid": "17753f63798927694db2997780fd4c6a", "score": "0.5632934", "text": "alterSharingEmail() {\n $( this.fromWrapper )\n .prepend( '<h3>Email This Article</h3>' )\n $( this.emailTextarea )\n .hide()\n }", "title": "" }, { "docid": "db37e0d4cb094b35c895d3ef9aaf7714", "score": "0.5628655", "text": "function formToJsonContact() {\n\treturn JSON.stringify({\n\t\t\"name\": $('#nameContact').val(),\n\t\t\"family\": $('#familyContact').val(),\n\t\t\"homephone\": $('#homePhone').val(),\n\t\t\"cellphone\": $('#cellPhone').val(),\n\t\t\"email\": $('#email').val()\n\t});\n}", "title": "" }, { "docid": "afe328e705e8a9213e860a6646d70762", "score": "0.56144637", "text": "function sendForm(){\n\t\t\n\t//Valida las poblaciones\n\tif(! validaPoblacion()) return false;\n\t\n\t//Valida la promocion\n\tif( $(\"#idPromocion\").val() == \"\") return alert(\"Debe indicar la promoción a aplicar.\");\n\t\n\t//Valida las plataformas\n\tif( $(\"select#plataformaDonante\").val() == \"\") return alert(\"Debe indicar la plataforma donante.\");\n\tif( $(\"select#plataformaReceptora\").val() == \"\") return alert(\"Debe indicar la plataforma receptora.\");\n\t//if( $(\"select#plataformaDonante\").val() == \"1|pospago\"){\n\t//\tif(document.getElementById(\"fechaLimitePago\").value == \"\") return alert(\"Debe indicar la fecha límite de pago de la factura.\");\n\t//}\n\t\n\t$('input:text').each(function(){\n\t\tif(this.id != 'email'){\n\t\t\tvar val = jQuery.trim(this.value);\n\t\t\tthis.value = escape(this.value.toUpperCase());\n\t\t}\t\n\t});\n\t\n\tvar queryString = $('#formCaptura').formSerialize(); \n\t// Enviando la generacion del folio\n\t$.ajax(\t{\n\t\t\turl:\"./capturaSolicitud.do\",\n\t\t\ttype:\"POST\",\n\t\t\tdata: queryString,\n\t\t\tcache: false,\n\t\t\tsuccess: generaFolio\n\t});\n}", "title": "" }, { "docid": "1f36b6a70ffe7e0b2d4e77cd47306d70", "score": "0.56080496", "text": "function setContactPageContent()\n\t{\n\t\t// content variables\n\t\tvar title = \"Contact Me.\"\n\t\tvar subtitle_greet = \"<h2 id=\\\"subtitle_greet\\\">Prospective Employers and Fellow Developers</h2>\";\n\t\tvar greeting = \"<p id=\\\"greeting\\\">\" + \n\t\t\"If you are a prospective employer you may contact me by email or on LinkedIn by clicking the icons below. \" +\n\t\t\"Alternatively, if you are a fellow developer looking for a team members on an open-source project feel free to reach out to me via Github.\" +\n\t\t\"</p>\";\n\t\t\n\t\tvar linkedin_url = \"https://linkedin.com/in/theresa-nemeth-485861141\";\n\t\tvar linkedin_icon = \"<a class=\\\"fa fa-linkedin-square fa-3x\\\" aria-hidden=\\\"true\\\" href=\\\"\" + linkedin_url + \"\\\"></a>\";\t\n\t\t\n\t\tvar github_url = \"https://github.com/theresafiesta\";\n\t\tvar github_icon = \"<a class=\\\"fa fa-github fa-3x\\\" aria-hidden=\\\"true\\\" href=\\\"\" + github_url + \"\\\"></a>\";\t\n\t\t\n\t\tvar email_addr = \"[email protected]\";\n\t\tvar email_icon = \"<i class=\\\"fa fa-envelope-open fa-3x\\\" aria-hidden=\\\"true\\\" data-clipboard-target=\\\"\" + email_addr+ \"\\\"></i>\";\t\t\n\t\t\n\t\tvar icons = \"<p id=\\\"icons\\\">\" + email_icon + tab + linkedin_icon + tab + github_icon + \"</p>\";\n\t\t// consider codewars, stackexchange, stackoverflow\n\t\n\t\t// clean up the page elements\n\t\t$(pageTitle).empty();\n\t\t$(section_top).empty();\n\t\t$(section_middle).empty();\n\t\t$(section_bottom).empty();\n\t\t\n\t\t// set the title\n\t\t$(pageTitle).append(title);\n\t\t\n\t\t// contact me text\n\t\t$(section_top).append(subtitle_greet);\n\t\t$(\"#subtitle_greet\").css('text-align','center');\n\t\t$(section_top).append(greeting);\n\t\t$(\"#greeting\").css('text-align','center');\n\t\t\n\t\t// add linkedin, github, email icons\n\t\t$(section_top).append(icons);\n\t\t$(\"#icons\").css('text-align','center');\n\t\t\n\t\t// set the last visited page\n\t\tlastPage = link_contact;\n\t\t\n\t} // end function", "title": "" }, { "docid": "7186ced321cfa4109733c705d169f2e7", "score": "0.560735", "text": "function generateEmails(id){\n var first_name = $(\"#firstname\").val();\n var last_name = $(\"#lastname\").val();\n var domain_name = $(\"#domain\").val();\n $.post(\n \"/generate/\",\n { first: first_name, last: last_name, domain: domain_name },\n function(response){\n $(\".\"+id).html(response);\n });\n}", "title": "" }, { "docid": "df61ee7918db779e7ecbfe6cc499ef8d", "score": "0.56047356", "text": "show(name, message) {\n // add element to show message\n const inputSelector = \"[name='\" + name + \"']\";\n const inputParent = $(inputSelector).parents(\".form-field\");\n inputParent.append(\n $(\"#form-message-template\")\n .clone()\n .removeClass(\"d-none\") \n .removeAttr(\"id\")\n .addClass(\"form-message\") \n .text(message)\n );\n }", "title": "" }, { "docid": "27a8c4dcf47f34758a6503936efc6314", "score": "0.560202", "text": "function chooseSendContacts(addr_form_id) {\n document.getElementById('send-contact-list').style.display = 'block';\n // contactsDB.open(function () {\n contactsDB.fetchContacts(function(contacts) {\n\n var contactList = document.getElementById('send-contacts');\n contactList.innerHTML = '';\n\n for (var i = 0; i < contacts.length; i++) {\n // Read the contacts backwards (most recent first).\n var contact = contacts[(contacts.length - 1 - i)];\n\n var li = document.createElement('li');\n li.id = 'send-contact-' + contact.timestamp;\n\n var contactName = document.createElement('span');\n contactName.className = 'send-contact-name';\n contactName.innerHTML = contact.name;\n contactName.setAttribute(\"data-id\", contact.xmr_address);\n li.appendChild(contactName);\n\n contactList.appendChild(li);\n\n // Setup an event listener for the checkbox.\n li.addEventListener('click', function(e) {\n var addr = String(e.target.getAttribute('data-id'));\n document.getElementById(addr_form_id).value = addr;\n document.getElementById('send-contact-list').style.display = 'none';\n });\n }\n\n });\n // });\n}", "title": "" }, { "docid": "5c7f8d35fb8e839f21e4e4ac4682b505", "score": "0.56019974", "text": "function buildEmails(form){\n\tvar strRecipients=\"\";\n\tfor(x=0;x<form.elements.length;x++){\n\t\tif(form.elements[x].checked == true){\n\t\t\tstrRecipients += form.elements[\"txt\"+form.elements[x].name].value + \"\\;\"; \n\t\t}\n\t}\t\n\t\t//remove dbl semi's which are created if there isn't a secondary email\t\t\n\tdocument.getElementById(\"mailer\").href=\"mailto:\"+ strRecipients.replace(/\\;\\;/g,\"\\;\");\n\treturn true;\t\t\n}", "title": "" }, { "docid": "65a673f1f4c0b309323692b11212e660", "score": "0.5589293", "text": "function buildform(i, fri){\n console.log(i);\n if (fri === 'y') {var wed=' wedding';}else{var wed='';}\n var att_section = $('<section></section>').attr('id', 'att'+i);\n $('#rsvp-form form').append(att_section);\n att_section.append('<input type=\"text\" value=\"\" name=\"id'+i+'\" readonly /><br>');\n att_section.append('<label><input type=\"radio\" name=\"att'+i+'\" class=\"willAttend\" value=\"willAttend\" required />Will attend'+wed+'</label><br>');\n att_section.append('<label><input type=\"radio\" name=\"att'+i+'\" class=\"willNotAttend\" value=\"willNotAttend\" required />Will not attend'+wed+'</label><br>');\n if (fri === 'y') {frisec(i);}\n var email_section = $('<section></section>').attr('id', 'email'+i);\n $('#rsvp-form form').append(email_section);\n email_section.append('<div></div>');\n email_section.append('<input id=\"emailsection'+i+'\" type=\"email\" name=\"email'+i+'\" placeholder=\"Your email\" />');\n //email_section.append('<input type=\"text\" name=\"_replyto\" placeholder=\"Your email\" />');\n var comment_section = $('<section></section').attr('id', 'diet'+i);\n $('#rsvp-form form').append(comment_section);\n comment_section.append('<div></div>');\n comment_section.append('<textarea name=\"diet'+i+'\" placeholder=\"Enter allergies/dietary restrictions, or anything else you want to tell us!\" rows=\"4\"></textarea>');\n }", "title": "" }, { "docid": "adde2ae96eaf51064385268f52e54060", "score": "0.55864686", "text": "function FeedbackForm(form) {\r\n \tthis.form=form;\r\n\tthis.data=form.serializeArray();\r\n this.errorContainer=form.find('#contact-error');\r\n this.successContainer=form.find('#contact-success');\r\n this.loadingContainer=form.find('#contact-loading');\r\n \r\n\tthis.fields=['name','phone','address','comment'];\r\n\tthis.errorStatus = {\r\n\t\tname:\"Не допускается ввод ссылок на сторонние ресурсы.\",\r\n\t\tphone:\"Введите номер телефона в корректном формате.\",\r\n\t\taddress:\"Не допускается ввод ссылок на сторонние ресурсы.\",\r\n\t\tcomment:\"Не допускается ввод ссылок на сторонние ресурсы.\"\r\n\t}; \r\n console.log(this.data);\r\n }", "title": "" }, { "docid": "94ded9b31c877add2730d99be51094d6", "score": "0.558455", "text": "function addTextsToContact() \n{\n if (title === \"Contact\") \n {\n // get an element\n let formTag = document.getElementsByClassName(\"form\");\n let contactHeading1Div = document.getElementById(\"contactHeading\");\n\n if(contactHeading1Div)\n {\n // create h1 element\n let formHeading1 = document.createElement(\"h1\");\n\n // insert texts into h1 element\n formHeading1.textContent = `Contact`;\n\n // add h1 element in div element\n contactHeading1Div.appendChild(formHeading1);\n }\n\n if(formTag)\n {\n // get elements\n let formElement = document.querySelectorAll(\".form-control\");\n\n // insert texts into each of elements' label tag\n formElement[0].querySelector(\"label\").innerHTML = \"First Name\";\n formElement[1].querySelector(\"label\").innerHTML = \"Second Name\";\n formElement[2].querySelector(\"label\").innerHTML = \"Phone\";\n formElement[3].querySelector(\"label\").innerHTML = \"Email\";\n formElement[4].querySelector(\"label\").innerHTML = \"Message\";\n\n // get elements\n let buttons = formElement[5].querySelectorAll(\"button\");\n\n // insert texts into each of elements' button tag\n buttons[0].innerHTML = \"Send\";\n buttons[1].innerHTML = \"Undo\";\n }\n }\n }", "title": "" }, { "docid": "0d173a6e286042b39f315b5d675d6467", "score": "0.5583598", "text": "function send_mail(name, phone){\nvar shadow = document.getElementById(\"shadow\");\nvar modal = document.getElementById(\"request_modal_wrapper\");\n//var new_modal = document.getElementById('new_modal_wrapper');\nvar doneModal = document.getElementById(\"circle_wrapper\");\n\n\tname.style.background = \"#FFF\";\n\tphone.style.background = \"#FFF\";\t\n\n\tif(name.value != \"\"){\n\t\tif(phone.value != \"\"){\n\t\t\t\n\tvar HTTP=createAjax();\n\t\tHTTP.open(\"POST\",'/addrequest/?phone='+phone.value.trim()+\"&owner=\"+name.value.trim() + \"&type=\" + document.request, true);\n\t\tHTTP.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");\n\t\tHTTP.send();\n\tHTTP.onreadystatechange = function(){\n\t\tif(HTTP.readyState == 4){\n\t\t\tconsole.log(HTTP.responseText);\n\t\t\tif(HTTP.responseText.trim() === \"ok\"){\n\t\t\t\tname.value = \"\";\n\t\t\t\tphone.value = \"\";\n\t\t\t\t\n\t\t\t\tmodal.style.visibility = \"hidden\";\n\t\t\t\t//new_modal.style.display = \"none\";\n\t\t\t\tshadow.style.visibility = \"visible\";\n\t\t\t\t\n\t\t\t\tdoneModal.style.display = \"block\"; //doneModal.style.opacity = \"1\";\n\t\t\t\t\n\t\t\t\tsetTimeout(close_the_modal, 10000);\n\t\t\t\t\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\t}else{phone.style.background = \"#DB5D59\";}\n\t}else{name.style.background = \"#DB5D59\";}\n}", "title": "" }, { "docid": "f986f5c7b1e94c7fb14fb4b56db6b6ba", "score": "0.5574602", "text": "function sendForm() {\n}", "title": "" }, { "docid": "bc973acadb2d9fa5d1507a0c567243a5", "score": "0.55714166", "text": "function _captureUserContactInfo(data) {\n console.log(data);\n // guard / validation\n if(data.type === \"submit-email-city-note\") {\n if (data.emailAddress === \"\" || data.city === \"\")\n return;\n }\n // save\n // XXX: TODO\n \n // show modal\n $(\"#contact-modal\").modal('toggle');\n }", "title": "" }, { "docid": "ab9f443ed24d5827a3ef39f2a58063ee", "score": "0.55708283", "text": "function send_mail() {\n // start by verifying that the form is filled\n var name_of_sender = document.getElementById('name_of_sender');\n var message_of_sender = document.getElementById('message_of_sender');\n var email_sender = document.getElementById('email_of_sender');\n\n if (name_of_sender.value == '') {\n error_web_message(\"please fill in your name\");\n } else if (email_of_sender.value == '') {\n error_web_message(\"please fill in your email\");\n } else if (message_of_sender.value == '') {\n error_web_message(\"please fill in your message to us\");\n } else {\n window.open('mailto:[email protected]?subject=feedback from: ' + name_of_sender.value + '&body=' + message_of_sender.value + '', '_blank');\n }\n\n}", "title": "" }, { "docid": "4c79ff0c89387242d7415be29805233f", "score": "0.5558882", "text": "function showSuccess () {\n const $form = document.getElementById('contact-form')\n const success = document.createElement('div')\n success.classList.add('row')\n success.innerHTML = '<p class=\"md-font green-font\">Got it, Thank you!</p>'\n $form.removeChild(document.querySelector('.sent-spinner'))\n const inputs = $form.elements\n for (let i = 0; i < inputs.length; i++) {\n inputs[i].style.display = 'none'\n }\n $form.appendChild(success)\n}", "title": "" }, { "docid": "67c010002acd6d39dabb93d350e8b019", "score": "0.5549337", "text": "function sendNewSuggestion() {\n var formData = serializeForm(\"#add-suggestion\");\n formData.id_campus = connected_user.id_campus;\n formData.image = '0';\n formData.id_user = connected_user.id;\n formData.date = '1970-1-1';\n formData.price = '0';\n formData.approved = '';\n\n console.log(formData);\n\n var verification = [\n ['name','Pas de caractères spéciaux.','^[_A-z0-9]*((-|\\\\s)*[_A-z0-9])*$'],\n ['description','required','']\n ];\n\n if(!fieldsVerification('#add-suggestion', verification)) {\n apiAJAXSend('/events', formData, null,'POST');\n $(\"#add-suggestion\").trigger(\"reset\");\n }\n}", "title": "" }, { "docid": "52653ec6fb8d02523153f74b87f1ab7a", "score": "0.5549022", "text": "function send() {\n\n var date = new Date();\n var time = addZero(date.getHours()) + \":\" + addZero(date.getMinutes());\n /* salvo il valore dell'input inserito dall'utente */\n var messaggio = $(\".message\").val();\n\n\n /* salvo una variabile con l'elemento da clonare */\n var elementmsg = $(\"#template .msgsent\").clone();\n /* var msgPC = $(\"#template .msgreceived\").clone(); */\n console.log(elementmsg);\n\n\n /* cerco all'interno della mia variabile la classe testo e stampo all'interno il valore del messaggio inserito dall'utente */\n elementmsg.find(\".testo\").text(messaggio);\n elementmsg.find(\".time\").text(time);\n \n //Pongo la condizione dove se la lunghezza della stringa inserita dall'utente è minore di 1 allora non viene inviato nulla\n if (messaggio.length >= 1) {\n $(\".my_chat.my_active\").prepend(elementmsg);\n //richiamo la mia funzione esterna rispostaPC\n rispostaPc();\n\n //Ripulisco l'input ad ogni invio\n $(\".message\").val(\"\");\n }\n\n }", "title": "" }, { "docid": "3a5ec99b84e041fddf4561bbebb37c4b", "score": "0.5540847", "text": "function addContact(userData) {\n $.post(\"/api/contact\", userData)\n .then(function (data) {\n inputName.val(\"\");\n inputEmail.val(\"\");\n inputPhoneNumber.val(\"\");\n textareaMessage.val(\"\");\n\n //show them alert or label or something to let user know that they added contact\n })\n .catch(handleErr);\n }", "title": "" }, { "docid": "d380de823f67881659311d95d4660534", "score": "0.553324", "text": "function createNewPatientForm(){\n\t//note: all of tihs could be one line but it's hard to read. \n\t//process could be placed in a foreach loop but I wanted to leave the form open for future versatility\n\tvar form = \"<form id = \\'newForm\\' action = \\'\\' >\";\n\tform = form + \"<label>Desired ID: </label>\" + \"<input type=\\'text\\' class=\\'w3-input w3-hover-sand\\' name=\\'id\\' value=\\'1\\'><br>\";\n\tform = form + \"<label>First Name: </label>\" + \"<input type=\\'text\\' class=\\'w3-input w3-hover-sand\\' name=\\'first_name\\' value=\\'Mickey\\'><br>\";\n\tform = form + \"<label>Last Name: </label>\" + \"<input type=\\'text\\' class=\\'w3-input w3-hover-sand\\' name=\\'last_name\\' value=\\'Mouse\\'><br>\";\n\tform = form + \"<label>Email: </label>\" + \"<input type=\\'text\\' class=\\'w3-input w3-hover-sand\\' name=\\'email\\' value=\\'[email protected]\\'><br>\";\n\tform = form + \"<label>Gender: </label>\" + \"<input type=\\'text\\' class=\\'w3-input w3-hover-sand\\' name=\\'gender\\' value=\\'Male\\'><br>\";\n\tform = form + \"<label>Street Address: </label>\" + \"<input type=\\'text\\' class=\\'w3-input w3-hover-sand\\' name=\\'street_address\\' value=\\'123 No Way\\'><br>\";\n\tform = form + \"<label>State: </label>\" + \"<input type=\\'text\\' class=\\'w3-input w3-hover-sand\\' name=\\'state\\' value=\\'GA\\'><br>\";\n\tform = form + \"<label>Drugs: </label>\" + \"<input type=\\'text\\' class=\\'w3-input w3-hover-sand\\' name=\\'drug\\' value=\\'Happiness\\'><br>\";\n\tform = form + \"<br><input type=\\'submit\\' class=\\'w3-btn w3-white\\' value = \\'Submit\\'>\";\n form = form + \" \";\n\tform = form + \"<input type=\\'reset\\' class=\\'w3-btn w3-white\\' id = \\'clearFormButton\\'>\";\n\tform = form + \"</form><br><br><br>\";\n\t\n\t$(\"#selectedPatient\").html(form);\n}", "title": "" }, { "docid": "b561f0e58b4f14bb79a2f04b8de343c4", "score": "0.5531884", "text": "function submitForm(formData) {\n\tconsole.log(formData);\n\t$.ajax({\t\n\t\ttype: 'POST',\n\t\turl: 'contactform.php',\t\t\n\t\tdata: formData,\n\t\tdataType: 'json',\n\t\tcache: false,\n\t\ttimeout: 7000,\n\t\tsuccess: function(data) { \t\t\t\n\t\t\tconsole.log(data);\n\t\t\t$('.contact-page #response').removeClass().addClass((data.error === true) ? 'error' : 'success')\n\t\t\t\t\t\t.html(data.msg).fadeIn('fast');\t\n\t\t\t\t\t\t\n\t\t\tif ($('.contact-page #response').hasClass('success')) {\n\t\t\t\t\n\t\t\t\tsetTimeout(\"$('.contact-page #response').fadeOut('fast')\", 5000);\n\t\t\t}\n\t\t\n\t\t},\n\t\terror: function(XMLHttpRequest, textStatus, errorThrown) {\n\t\t\t\t\t\tconsole.log(formData);\n\t\t\t$('.contact-page #response').removeClass().addClass('error')\n\t\t\t\t\t\t.html('<p>There was an<strong> ' + errorThrown +\n\t\t\t\t\t\t\t '</strong> error due to a<strong> ' + textStatus +\n\t\t\t\t\t\t\t '</strong> condition.</p>').fadeIn('fast');\t\t\t\n\t\t},\t\t\t\t\n\t\tcomplete: function(XMLHttpRequest, status) { \t\t\t\n\t\t\t\n\t\t\t$('form')[0].reset();\n\t\t}\n\t});\t\n}", "title": "" }, { "docid": "f7dbc7567d470b61e3b57a729f99d18e", "score": "0.55287737", "text": "function contactInput() {\n\t$(\".warning\").removeClass(\"warning\");\n\tvar name = \"\";\n\tvar email = \"\";\n\tvar text = \"\";\n\n\tif(!$(\"#nameContact\").val()) {\n\t\t$(\"#nameContact\").addClass(\"warning\");\n\t} else {\n\t\tname = $(\"#nameContact\").val();\n\t}\n\n\tif(!isValidEmailAddress($(\"#contactEmail\").val())) {\n\t\t$(\"#contactEmail\").addClass(\"warning\");\n\t} else {\n\t\temail = $(\"#contactEmail\").val();\n\t}\n\n\tif(!$(\"#contactText\").val()) {\n\t\t$(\"#contactText\").addClass(\"warning\");\n\t} else {\n\t\ttext = $(\"#contactText\").val();\n\t}\n\n\tif(name!==\"\" && email!==\"\" && text!==\"\"){\n\n\t\tvar summary = name + \" wanted to say. \" + text + \" \" + name + \" email is \" + email +\".\";\n\n\t\tpost(\"Contacter\", summary);\n\t\t\n\t\t$(\".form-control\").val(\"\");\n\t}\n}", "title": "" }, { "docid": "0f4695b3074ea81ce4986f08a83d131b", "score": "0.5527565", "text": "function insertcontactus(){\n var s = document.getElementById('contactus');\n if(s){\n\tvar sl = s.getElementsByTagName('legend');\n\tif(!sl.length){\n\t var lls=document.createElement('legend');\n\t appendMissingClass(lls,'langgroup');\n\t s.insertBefore(lls,s.firstChild);\n\t ls=document.createElement('span');\n\t ls.setAttribute('lang','es');\n\t ls.appendChild(document.createTextNode('Contáctenos'));\n\t lls.insertBefore(ls,lls.firstChild);\n\n\t ls=document.createElement('span');\n\t ls.setAttribute('lang','fr');\n\t ls.appendChild(document.createTextNode('Contactez Nous'));\n\t lls.insertBefore(ls,lls.firstChild);\n\t ls=document.createElement('span');\n\t ls.setAttribute('lang','ru');\n\t ls.appendChild(document.createTextNode('Контактная информация'));\n\t lls.insertBefore(ls,lls.firstChild);\n\t ls=document.createElement('span');\n\t ls.setAttribute('lang','en');\n\t ls.appendChild(document.createTextNode('Contact Us'));\n\t lls.insertBefore(ls,lls.firstChild);\n\t updateLangGroups(s);\n\t}\n\tsl = document.getElementById('googleplus');\n\tif(!sl){\n\t var tumblr_button;\n\t if(uicoreConfig.helpemail){\n\t\t/* code to add Mail-help buttons */\n\t\tgb= document.createElement('div');\n\t\tgb.className='sharebutton';\n\t\tgb.id='helpmailbutton';\n\t\ttumblr_button = document.createElement(\"a\");\n\t\ttumblr_button.onclick=doHelpMail;\n\t\ttumblr_button.setAttribute(\"title\", uicoreConfig.helpemail);\n\t\tgb.appendChild(tumblr_button);\n\t\ts.appendChild(gb);\n\t }\n\t}\n }\n}", "title": "" }, { "docid": "d6095172fec371346778e079d0cd8888", "score": "0.55256754", "text": "function nameInsert(formInfo) {\n\t\t//declaring email bc jshint is picky\n\t\tvar eMail;\n\t\t$('.first').text(formInfo.firstName);\n\t\t$('.last').text(\" \" +formInfo.lastName);\n\t\t//if email is inputted the query string will replace @ with %40\n\t\t//fixing that \n\t\tif (formInfo.email.length !== 0) {\n\t\t\teMail = formInfo.email.replace('%40', '@');\n\t\t}\n\t\t$('.email').text(eMail);\n\t\t$('.cost').text(formInfo.bill);\n\t\t$('.firstState').text(formInfo.firstState+ ' ');\n\t\t$('.secondState').text(' '+formInfo.secondState);\n\t\t$('.grayState').text(formInfo.firstState);\n\t\t$('.barblue').text(formInfo.secondState);\n\t}", "title": "" }, { "docid": "cd31c68715d998acb15a5d9f7c413297", "score": "0.551117", "text": "function bugFormSubmit()\r\n{\r\n var email = $('#emailB').val();\r\n var name = $('#nameB').val();\r\n var phone = $('#phone').val();\r\n var description = $('#description').val();\r\n\r\n $('#show_wornings_nameB').hide();\r\n if (name == '') {\r\n $('#show_wornings_nameB').show();\r\n $(\"#show_wornings_nameB\").html(\"Please enter name.\");\r\n $('#nameB').focus();\r\n return false;\r\n }\r\n $('#show_wornings_emailB').hide();\r\n if (email == '') {\r\n $('#show_wornings_emailB').show();\r\n $(\"#show_wornings_emailB\").html(\"Please enter email.\");\r\n $('#emailB').focus();\r\n return false;\r\n }\r\n $('#show_wornings_emailB').hide();\r\n if (!isEmail(email)) {\r\n $('#show_wornings_emailB').show();\r\n $(\"#show_wornings_emailB\").html(\"Please enter valid email.\");\r\n $('#emailB').focus();\r\n return false;\r\n }\r\n\r\n $('#show_wornings_messageB').hide();\r\n if (description == '') {\r\n $('#show_wornings_messageB').show();\r\n $(\"#show_wornings_messageB\").html(\"Please enter your bug description.\");\r\n $('#description').focus();\r\n return false;\r\n }\r\n\r\n\r\n\r\n else {\r\n var dataString = 'email=' + email + '&name=' + name + '&phone=' + phone + '&message=' + description;\r\n $.ajax({\r\n type: \"GET\",\r\n url: \"contact/bug\",\r\n data: dataString,\r\n cache: false,\r\n success: function (html) {\r\n if (html == 1) {\r\n $('#show_worningR').show();\r\n $(\"#show_worningR\").html(\"Thanks! Your query has been submitted with us.\");\r\n $(\"#nameB\").val('');\r\n $(\"#emailB\").val('');\r\n $(\"#phone\").val('');\r\n $(\"#description\").val('');\r\n $(\"#show_worningR\").fadeOut(10000);\r\n } else {\r\n document.getElementById('show_worningR').style.display = \"none\";\r\n document.getElementById(\"show_worningr\").innerHTML = \"There might be something wrong.\";\r\n }\r\n\r\n\r\n }\r\n });\r\n }\r\n}", "title": "" }, { "docid": "2b4a9064efe1832507fd85c80d3f804b", "score": "0.5510411", "text": "function postAffiliateToGoogle() {\r\n var iam = $('#IAm').val();\r\n var loveto = $('#LoveTo').val();\r\n var city = $('#City').val();\r\n var academicyear = $('#AcademicYear').val();\r\n var studio = $('#Studio').val();\r\n var fullname = $('#FullName').val();\r\n var occupation = $('#Occupation').val();\r\n var affiliateemail = $('#AffiliateEmail').val();\r\n var affiliatephone = $('#AffiliatePhone').val();\r\n var moreinfo = $('#MoreInfo').val();\r\n var branding = $('#Branding').val();\r\n\r\n $.ajax({\r\n url: \"https://docs.google.com/forms/d/e/1FAIpQLSeyB1UIK1oCPDPXt-__reZZO3X9VMPAw3X06KYjLaAz1LGS5A/formResponse\",\r\n data: { \"entry.1554984773\": iam, \"entry.2080001749\": loveto, \"entry.271068763\": city, \"entry.2128247136\": academicyear, \"entry.49096205\": studio, \"entry.1482264808\": fullname, \"entry.134970049\": occupation, \"entry.1234350953\": affiliatephone, \"entry.1602031151\": affiliateemail, \"entry.721984861\": moreinfo, \"entry.197306362\": branding },\r\n type: \"POST\",\r\n dataType: \"xml\",\r\n statusCode: {\r\n 0: function () {\r\n $(signup).fadeOut();\r\n// $(tips).fadeOut();\r\n $(geekzsignup).html('<br /><br /><br /><br />Your message on its way. Geekz team will be in touch with you shortly. <br />Good luck!');\r\n $('html, body').animate({scrollTop: $(\"#contact\").offset().top}, 2000);\r\n },\r\n 200: function () {\r\n $(signup).fadeOut();\r\n// $(tips).fadeOut();\r\n $(geekzsignup).html('<br /><br /><br /><br />Your message on its way. Geekz team will be in touch with you shortly. <br />Good luck!');\r\n $('html, body').animate({scrollTop: $(\"#contact\").offset().top}, 2000);\r\n }\r\n }\r\n });\r\n }", "title": "" }, { "docid": "69ae697ba28f31cb02708195d3681f2f", "score": "0.550638", "text": "function init() {\n\n // Hide the form initially.\n // Make submitForm() the form's submit handler.\n // Position the form so it sits in the centre of the browser window.\n $('#contactForm').submit( submitForm ).addClass( 'positioned' );\n $('#contactForm').insertAfter('#takala');\n\n // When the \"Send us an email\" link is clicked:\n // 1. Fade the content out\n // 2. Display the form\n // 3. Move focus to the first field\n // 4. Prevent the link being followed\n\n $('a[href=\"#contactForm\"]').click( function() {\n $('#takala').fadeTo( 'slow', .2 );\n Recaptcha.reload();\n $('#contactForm').fadeIn( 'slow', function() {\n $('#senderName').focus();\n } )\n\n return false;\n } );\n\n // When the \"Cancel\" button is clicked, close the form\n $('#cancel').click( function() {\n $('#contactForm').fadeOut();\n $('#takala').fadeTo( 'slow', 1 );\n } );\n\n // When the \"Escape\" key is pressed, close the form\n $('#contactForm').keydown( function( event ) {\n if ( event.which == 27 ) {\n $('#contactForm').fadeOut();\n $('#takala').fadeTo( 'slow', 1 );\n }\n } );\n\n}", "title": "" }, { "docid": "2303477de1301aed2c91089a6fe70b1b", "score": "0.55033624", "text": "function sendMail(contactForm){\n emailjs.send(\"service_kzd89jn\", \"template_8rzpgkv\", {\n \"first_name\" : contactForm.fname.value,\n \"last_name\": contactForm.lname.value,\n \"email_address\": contactForm.email.value,\n \"travel_method\": contactForm.travel.value,\n \"message\": contactForm.message.value\n })\n .then(\n function(response){\n console.log(\"SUCCESS\", response);\n document.getElementById(\"contact-form\").innerHTML = `\n <div class=\"container-fluid form-submitted\">\n <p class=\"submission-confirmation\">Your form was successfully submitted! </p>\n </div>\n `;\n },\n function(error){\n console.log(\"FAILED\", error);\n document.getElementById(\"contact-form\").innerHTML = `\n <div class=\"container-fluid form-submitted\">\n <p class=\"submission-confirmation\">There was an error submitting your form, please refresh the page and try again. </p>\n </div>\n `;\n });\n return false; // To block from loading a new page\n\n \n}", "title": "" }, { "docid": "e8dca51f7d0450b481c28ead8d0dd954", "score": "0.5501463", "text": "function sendMail(contactForm){\n emailjs.send(\"service_9fhvo61\", \"template_pcsmdnv\",{\n \"from_first_name\": contactForm.first-name.value,\n \"from_second_name\": contactForm.last-name.value,\n \"from_email\": contactForm.email.value,\n \"subject\": contactForm.reason.value,\n \"message\": contactForm.message.value,\n }).then(\n function(response){\n },\n function(error){\n }\n );\n return false;\n}", "title": "" }, { "docid": "dcf6fd1042f2f53e04c02deec696ad66", "score": "0.54846627", "text": "function openContactForm(){\n\n $('.fillInfoBox').show();\n\n\n if($('.fillInfoBox').hasClass('filled')){\n $('#noOMGbutton').append('<button type=\"button\" class=\"bluebutton orderType\" id=\"sms_btn\" style=\"width: 350px;\" onclick=\"$(\\'.korak2\\').show();$(\\'#noOMGbutton\\').hide();$(\\'.fillInfoBox\\').hide()\">'+noNameFound+'</button>');\n } else {\n $('.korak2').show();\n }\n\n}", "title": "" }, { "docid": "861d309d966c072ca7a2e7611e5b96a8", "score": "0.548396", "text": "function infoMsgSent() {\n\n var timeMsg = $(this).parent().siblings('.message-time').text(); // salvo l'orario del messaggio scritto da me\n\n $('.info-container').fadeIn(); // la finestra delle info compare\n $('.dropdown-menu.s').fadeOut(); // scompare il dropdown-menu\n $('.info-container .title-name-msg').text(\"Il messaggio è stato inviato da: Marco\"); // aggiungo testo\n $('.info-container .title-time-msg').text(\"Il messaggio è stato inviato alle ore: \" + timeMsg); // aggiungo l'ora di invio messaggio\n }", "title": "" }, { "docid": "f64efc03fe35e8d3bc839300af53cf65", "score": "0.547222", "text": "function contactUs() {\n\n var name = document.querySelector(\"#formName\");\n var mail = document.querySelector(\"#formMail\");\n var subject = document.querySelector(\"#formSubject\");\n var msg = document.querySelector(\"#formMsg\");\n var time = Date.now();\n\n var log = {\n time: time,\n name: name.value,\n mail: mail.value,\n subject: subject.value,\n msg: msg.value\n }\n\n var msgs = getStorage('log');\n\n if (msgs === null) msgs = {};\n msgs[time] = log;\n setStorage('log', msgs);\n}", "title": "" }, { "docid": "593f2b9a2064d7ec88223ee8e890758e", "score": "0.5457222", "text": "function presenceSend() {\n\t\t\t\t\t\t// We get the values of the inputs\n\t\t\t\t\t\tvar valuePresence = $(\".changePresence\").val();\n\t\t\t\t\t\tvar valueTextPresence = $(\".textPresence\").val();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// We send the data\n\t\t\t\t\t\tvar userPresence = new JSJaCPresence();\n\t\t\t\t\t\tuserPresence.setShow(valuePresence).setStatus(valueTextPresence).setPriority(10);\n\t\t\t\t\t\tcon.send(userPresence);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// We set the good icon\n\t\t\t\t\t\tpresenceIcon(valuePresence);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// We hide the form\n\t\t\t\t\t\t$(\"#my-infos-text-first\").fadeOut('fast');\n\t\t\t\t\t}", "title": "" }, { "docid": "f484b7773f05e7f4d8c27755a393756d", "score": "0.54549015", "text": "function displayContact(tel, website) {\n\t$(\"#cinemaInformation #contact\").empty();\n\t$(\"#cinemaInformation #contact\").append(\"<p><b>Phone number:</b></p><p>\"+tel+\"</p>\");\n\t$(\"#cinemaInformation #contact\").append('<p><b>Website:</b></p><p><a href=\"#\">'+website+\"</a></p>\");\n}", "title": "" }, { "docid": "ea10e74ee4dc77340642b574d4d9a665", "score": "0.5450454", "text": "function postContactToGoogle() {\r\n var firstname = $('#FirstName').val();\r\n var lastname = $('#LastName').val();\r\n var gender = $('#Gender').val();\r\n var dob = $('#DOB').val();\r\n var grade = $('#Grade').val();\r\n var school = $('#RecentSchool').val();\r\n var fathername = $('#FatherName').val();\r\n var fatheroccupation = $('#FatherOccupation').val();\r\n var mothername = $('#MotherName').val();\r\n var motheroccupation = $('#MotherOccupation').val();\r\n var income = $('#Income').val();\r\n var address = $('#Address').val();\r\n var applicationemail = $('#ApplicationEmail').val();\r\n var phone = $('#Phone').val();\r\n var commute = $('#Commute').val();\r\n var pickup = $('#CommuteLocation').val();\r\n var proud = $('#Proud').val();\r\n var familytime = $('#FamilyTime').val();\r\n var passion = $('#Passion').val();\r\n var parentalpri = $('#ParentalPriorities').val();\r\n var health = $('#Health').val();\r\n var studenthistory = $('#History').val();\r\n var extra = $('#Extra').val();\r\n var marketing = $('#Marketing').val();\r\n\r\n $.ajax({\r\n url: \"https://docs.google.com/forms/d/e/1FAIpQLSciq4yYlJRh3mssfqgQSVvoBGAUFTkM8hRmT4XTkyd3QcbnpQ/formResponse\",\r\n data: { \"entry.1604377194\": firstname, \"entry.1940714055\": lastname, \"entry.98025862\": gender, \"entry.976596705\": dob, \"entry.382730210\": grade, \"entry.523130611\": school, \"entry.1674665686\": fathername, \"entry.710713382\": fatheroccupation, \"entry.352289270\": mothername, \"entry.807161894\": motheroccupation, \"entry.2017962840\": income, \"entry.208625122\": address, \"entry.951997613\": applicationemail, \"entry.1308318214\": phone, \"entry.519255434\": commute, \"entry.589543065\": pickup, \"entry.1229821226\": proud, \"entry.403363822\": familytime, \"entry.563749857\": passion, \"entry.426145336\": parentalpri, \"entry.1121941208\": health, \"entry.1404358560\": studenthistory, \"entry.586229829\": extra, \"entry.1564202305\": marketing },\r\n type: \"POST\",\r\n dataType: \"xml\",\r\n statusCode: {\r\n 0: function () {\r\n $(applications).fadeOut();\r\n $(tips).fadeOut();\r\n $(geekzapply).html('Your application’s on its way. Geekz admissions team will be in touch with you shortly. Good luck!');\r\n },\r\n 200: function () {\r\n $(applications).fadeOut();\r\n $(tips).fadeOut();\r\n $(geekzapply).html('Your application’s on its way. Geekz admissions team will be in touch with you shortly. Good luck!');\r\n }\r\n }\r\n });\r\n }", "title": "" } ]
1d09817f6c262146be1cecdfaca8e3cd
attr, ="sd", a="amit's", a="sd"b="saf", ab cd=""
[ { "docid": "1a7932bb68397c39f20a3b819dafecd7", "score": "0.59404725", "text": "function validateAttributeString(attrStr, options, regxAttrName) {\n //console.log(\"start:\"+attrStr+\":end\");\n\n //if(attrStr.trim().length === 0) return true; //empty string\n\n const matches = util.getAllMatches(attrStr, validAttrStrRegxp);\n const attrNames = {};\n\n for (let i = 0; i < matches.length; i++) {\n //console.log(matches[i]);\n\n if (matches[i][1].length === 0) {\n //nospace before attribute name: a=\"sd\"b=\"saf\"\n return {err: {code: 'InvalidAttr', msg: 'attribute ' + matches[i][2] + ' has no space in starting.'}};\n } else if (matches[i][3] === undefined && !options.allowBooleanAttributes) {\n //independent attribute: ab\n return {err: {code: 'InvalidAttr', msg: 'boolean attribute ' + matches[i][2] + ' is not allowed.'}};\n }\n /* else if(matches[i][6] === undefined){//attribute without value: ab=\n return { err: { code:\"InvalidAttr\",msg:\"attribute \" + matches[i][2] + \" has no value assigned.\"}};\n } */\n const attrName = matches[i][2];\n if (!validateAttrName(attrName, regxAttrName)) {\n return {err: {code: 'InvalidAttr', msg: 'attribute ' + attrName + ' is an invalid name.'}};\n }\n if (!attrNames.hasOwnProperty(attrName)) {\n //check for duplicate attribute.\n attrNames[attrName] = 1;\n } else {\n return {err: {code: 'InvalidAttr', msg: 'attribute ' + attrName + ' is repeated.'}};\n }\n }\n\n return true;\n}", "title": "" } ]
[ { "docid": "4264b40c1ece44310fc7ca5e7415f577", "score": "0.61053646", "text": "function validateAttributeString(attrStr, options, regxAttrName) {\n //console.log(\"start:\"+attrStr+\":end\");\n //if(attrStr.trim().length === 0) return true; //empty string\n var matches = util.getAllMatches(attrStr, validAttrStrRegxp);\n var attrNames = {};\n\n for (var i = 0; i < matches.length; i++) {\n //console.log(matches[i]);\n if (matches[i][1].length === 0) {\n //nospace before attribute name: a=\"sd\"b=\"saf\"\n return {\n err: {\n code: 'InvalidAttr',\n msg: 'attribute ' + matches[i][2] + ' has no space in starting.'\n }\n };\n } else if (matches[i][3] === undefined && !options.allowBooleanAttributes) {\n //independent attribute: ab\n return {\n err: {\n code: 'InvalidAttr',\n msg: 'boolean attribute ' + matches[i][2] + ' is not allowed.'\n }\n };\n }\n /* else if(matches[i][6] === undefined){//attribute without value: ab=\n return { err: { code:\"InvalidAttr\",msg:\"attribute \" + matches[i][2] + \" has no value assigned.\"}};\n } */\n\n\n var attrName = matches[i][2];\n\n if (!validateAttrName(attrName, regxAttrName)) {\n return {\n err: {\n code: 'InvalidAttr',\n msg: 'attribute ' + attrName + ' is an invalid name.'\n }\n };\n }\n\n if (!attrNames.hasOwnProperty(attrName)) {\n //check for duplicate attribute.\n attrNames[attrName] = 1;\n } else {\n return {\n err: {\n code: 'InvalidAttr',\n msg: 'attribute ' + attrName + ' is repeated.'\n }\n };\n }\n }\n\n return true;\n} // const validAttrRegxp = /^[_a-zA-Z][\\w\\-.:]*$/;", "title": "" }, { "docid": "a2ede415fc4944f741682bcb5d97c42b", "score": "0.6089658", "text": "function parse_attrs(str) {\n var attrs = {};\n var pos = 0;\n var state = 0;\n var strlen = str.length;\n var name = \"\";\n var val = \"\";\n var quote_char;\n\n // Each time through the loop, pos should point to the first non-whitespace.\n while (pos < strlen) {\n c = str.charAt(pos);\n var is_white = /\\s/.test(c);\n\n // inside the name, looking for whitespace or \"=\"\n if (state == 0) {\n if (is_white) {\n state = 1;\n }\n else if (c == \"=\") {\n state = 2;\n }\n else {\n name += c;\n }\n }\n\n // in whitespace after the name, looking for \"=\"\n else if (state == 1) {\n if (c == \"=\") {\n state = 2;\n }\n else if (!is_white) {\n return attrs;\n }\n }\n\n // after \"=\", looking for whitespace or a quote\n else if (state == 2) {\n if (c == \"'\" || c == '\"') {\n quote_char = c;\n state = 3;\n }\n else if (!/\\s/.test(c)) {\n return attrs;\n }\n }\n\n // inside the value, looking for quote_char\n else if (state == 3) {\n if (c == quote_char) {\n attrs[name] = val;\n state = 4;\n }\n else {\n val += c;\n }\n }\n\n // After the whole pseudo-attr; skip whitespace\n else if (state == 4) {\n if (!is_white) {\n name = c;\n val = \"\";\n state = 0;\n }\n }\n\n pos++;\n }\n\n return attrs;\n }", "title": "" }, { "docid": "8f6983f915d918e9ace3272c9aaf0dfd", "score": "0.5926348", "text": "function validateAttributeString(attrStr, options) {\n //console.log(\"start:\"+attrStr+\":end\");\n\n //if(attrStr.trim().length === 0) return true; //empty string\n\n const matches = util.getAllMatches(attrStr, validAttrStrRegxp);\n const attrNames = {};\n\n for (let i = 0; i < matches.length; i++) {\n if (matches[i][1].length === 0) {\n //nospace before attribute name: a=\"sd\"b=\"saf\"\n return getErrorObject('InvalidAttr', \"Attribute '\"+matches[i][2]+\"' has no space in starting.\", getPositionFromMatch(attrStr, matches[i][0]))\n } else if (matches[i][3] === undefined && !options.allowBooleanAttributes) {\n //independent attribute: ab\n return getErrorObject('InvalidAttr', \"boolean attribute '\"+matches[i][2]+\"' is not allowed.\", getPositionFromMatch(attrStr, matches[i][0]));\n }\n /* else if(matches[i][6] === undefined){//attribute without value: ab=\n return { err: { code:\"InvalidAttr\",msg:\"attribute \" + matches[i][2] + \" has no value assigned.\"}};\n } */\n const attrName = matches[i][2];\n if (!validateAttrName(attrName)) {\n return getErrorObject('InvalidAttr', \"Attribute '\"+attrName+\"' is an invalid name.\", getPositionFromMatch(attrStr, matches[i][0]));\n }\n if (!attrNames.hasOwnProperty(attrName)) {\n //check for duplicate attribute.\n attrNames[attrName] = 1;\n } else {\n return getErrorObject('InvalidAttr', \"Attribute '\"+attrName+\"' is repeated.\", getPositionFromMatch(attrStr, matches[i][0]));\n }\n }\n\n return true;\n}", "title": "" }, { "docid": "8f6983f915d918e9ace3272c9aaf0dfd", "score": "0.5926348", "text": "function validateAttributeString(attrStr, options) {\n //console.log(\"start:\"+attrStr+\":end\");\n\n //if(attrStr.trim().length === 0) return true; //empty string\n\n const matches = util.getAllMatches(attrStr, validAttrStrRegxp);\n const attrNames = {};\n\n for (let i = 0; i < matches.length; i++) {\n if (matches[i][1].length === 0) {\n //nospace before attribute name: a=\"sd\"b=\"saf\"\n return getErrorObject('InvalidAttr', \"Attribute '\"+matches[i][2]+\"' has no space in starting.\", getPositionFromMatch(attrStr, matches[i][0]))\n } else if (matches[i][3] === undefined && !options.allowBooleanAttributes) {\n //independent attribute: ab\n return getErrorObject('InvalidAttr', \"boolean attribute '\"+matches[i][2]+\"' is not allowed.\", getPositionFromMatch(attrStr, matches[i][0]));\n }\n /* else if(matches[i][6] === undefined){//attribute without value: ab=\n return { err: { code:\"InvalidAttr\",msg:\"attribute \" + matches[i][2] + \" has no value assigned.\"}};\n } */\n const attrName = matches[i][2];\n if (!validateAttrName(attrName)) {\n return getErrorObject('InvalidAttr', \"Attribute '\"+attrName+\"' is an invalid name.\", getPositionFromMatch(attrStr, matches[i][0]));\n }\n if (!attrNames.hasOwnProperty(attrName)) {\n //check for duplicate attribute.\n attrNames[attrName] = 1;\n } else {\n return getErrorObject('InvalidAttr', \"Attribute '\"+attrName+\"' is repeated.\", getPositionFromMatch(attrStr, matches[i][0]));\n }\n }\n\n return true;\n}", "title": "" }, { "docid": "8f6983f915d918e9ace3272c9aaf0dfd", "score": "0.5926348", "text": "function validateAttributeString(attrStr, options) {\n //console.log(\"start:\"+attrStr+\":end\");\n\n //if(attrStr.trim().length === 0) return true; //empty string\n\n const matches = util.getAllMatches(attrStr, validAttrStrRegxp);\n const attrNames = {};\n\n for (let i = 0; i < matches.length; i++) {\n if (matches[i][1].length === 0) {\n //nospace before attribute name: a=\"sd\"b=\"saf\"\n return getErrorObject('InvalidAttr', \"Attribute '\"+matches[i][2]+\"' has no space in starting.\", getPositionFromMatch(attrStr, matches[i][0]))\n } else if (matches[i][3] === undefined && !options.allowBooleanAttributes) {\n //independent attribute: ab\n return getErrorObject('InvalidAttr', \"boolean attribute '\"+matches[i][2]+\"' is not allowed.\", getPositionFromMatch(attrStr, matches[i][0]));\n }\n /* else if(matches[i][6] === undefined){//attribute without value: ab=\n return { err: { code:\"InvalidAttr\",msg:\"attribute \" + matches[i][2] + \" has no value assigned.\"}};\n } */\n const attrName = matches[i][2];\n if (!validateAttrName(attrName)) {\n return getErrorObject('InvalidAttr', \"Attribute '\"+attrName+\"' is an invalid name.\", getPositionFromMatch(attrStr, matches[i][0]));\n }\n if (!attrNames.hasOwnProperty(attrName)) {\n //check for duplicate attribute.\n attrNames[attrName] = 1;\n } else {\n return getErrorObject('InvalidAttr', \"Attribute '\"+attrName+\"' is repeated.\", getPositionFromMatch(attrStr, matches[i][0]));\n }\n }\n\n return true;\n}", "title": "" }, { "docid": "8f6983f915d918e9ace3272c9aaf0dfd", "score": "0.5926348", "text": "function validateAttributeString(attrStr, options) {\n //console.log(\"start:\"+attrStr+\":end\");\n\n //if(attrStr.trim().length === 0) return true; //empty string\n\n const matches = util.getAllMatches(attrStr, validAttrStrRegxp);\n const attrNames = {};\n\n for (let i = 0; i < matches.length; i++) {\n if (matches[i][1].length === 0) {\n //nospace before attribute name: a=\"sd\"b=\"saf\"\n return getErrorObject('InvalidAttr', \"Attribute '\"+matches[i][2]+\"' has no space in starting.\", getPositionFromMatch(attrStr, matches[i][0]))\n } else if (matches[i][3] === undefined && !options.allowBooleanAttributes) {\n //independent attribute: ab\n return getErrorObject('InvalidAttr', \"boolean attribute '\"+matches[i][2]+\"' is not allowed.\", getPositionFromMatch(attrStr, matches[i][0]));\n }\n /* else if(matches[i][6] === undefined){//attribute without value: ab=\n return { err: { code:\"InvalidAttr\",msg:\"attribute \" + matches[i][2] + \" has no value assigned.\"}};\n } */\n const attrName = matches[i][2];\n if (!validateAttrName(attrName)) {\n return getErrorObject('InvalidAttr', \"Attribute '\"+attrName+\"' is an invalid name.\", getPositionFromMatch(attrStr, matches[i][0]));\n }\n if (!attrNames.hasOwnProperty(attrName)) {\n //check for duplicate attribute.\n attrNames[attrName] = 1;\n } else {\n return getErrorObject('InvalidAttr', \"Attribute '\"+attrName+\"' is repeated.\", getPositionFromMatch(attrStr, matches[i][0]));\n }\n }\n\n return true;\n}", "title": "" }, { "docid": "8f6983f915d918e9ace3272c9aaf0dfd", "score": "0.5926348", "text": "function validateAttributeString(attrStr, options) {\n //console.log(\"start:\"+attrStr+\":end\");\n\n //if(attrStr.trim().length === 0) return true; //empty string\n\n const matches = util.getAllMatches(attrStr, validAttrStrRegxp);\n const attrNames = {};\n\n for (let i = 0; i < matches.length; i++) {\n if (matches[i][1].length === 0) {\n //nospace before attribute name: a=\"sd\"b=\"saf\"\n return getErrorObject('InvalidAttr', \"Attribute '\"+matches[i][2]+\"' has no space in starting.\", getPositionFromMatch(attrStr, matches[i][0]))\n } else if (matches[i][3] === undefined && !options.allowBooleanAttributes) {\n //independent attribute: ab\n return getErrorObject('InvalidAttr', \"boolean attribute '\"+matches[i][2]+\"' is not allowed.\", getPositionFromMatch(attrStr, matches[i][0]));\n }\n /* else if(matches[i][6] === undefined){//attribute without value: ab=\n return { err: { code:\"InvalidAttr\",msg:\"attribute \" + matches[i][2] + \" has no value assigned.\"}};\n } */\n const attrName = matches[i][2];\n if (!validateAttrName(attrName)) {\n return getErrorObject('InvalidAttr', \"Attribute '\"+attrName+\"' is an invalid name.\", getPositionFromMatch(attrStr, matches[i][0]));\n }\n if (!attrNames.hasOwnProperty(attrName)) {\n //check for duplicate attribute.\n attrNames[attrName] = 1;\n } else {\n return getErrorObject('InvalidAttr', \"Attribute '\"+attrName+\"' is repeated.\", getPositionFromMatch(attrStr, matches[i][0]));\n }\n }\n\n return true;\n}", "title": "" }, { "docid": "0a7224332ac73007d490abfa834cf271", "score": "0.58476835", "text": "function checkHaveAttr(str) {\n var n = str.match(/^[\\.|\\#]?(\\w+)\\[(.+=.+)\\]/);\n if( n!=null && n.length==3 ) {\n return n;\n } else {\n return ;\n }\n }", "title": "" }, { "docid": "bbed3f4f49dbfaf747c102916837036a", "score": "0.58372957", "text": "function attributes () {\n if (char === '(') {\n // move past the open paren\n next()\n\n // we're in attribute land until the *close paren*\n while (char !== ')') {\n // attempt to get the attribute key\n // - if it has a value, it will end at the *=*\n // - if it's boolean, it will end at the *paren* or *space* (next attr)\n const key = collectUntil('=|)|\\\\s/')\n\n // if we do have a key, add it to our tokens\n if (key.length) addToken('attributeKey', key)\n\n // attempt to get the value, which exists if there's an *=*\n let val = ''\n if (char === '=') {\n // move past the equals\n next()\n\n // if there's an open quote, move past it\n let quoted = false\n if (char.match(/['\"]/)) {\n quoted = char\n next()\n }\n\n // now we grab the value, it ends at a *space*, *close paren*, or\n // a *close quote*. if it's quoted though, we don't match *space*.\n // this is because you can have div(class='foo bar')\n let regex = '\\\\s|)|\\'|\"'\n if (quoted) { regex = quoted }\n val += collectUntil(regex)\n\n // if there's a close quote, move past it\n if (char.match(/['\"]/)) next()\n }\n\n // if we did match a value, push it to tokens\n if (val.length) addToken('attributeValue', val)\n\n // if we have a *space*, move on to the next attribute\n if (char.match(/\\s/)) next()\n }\n // done with attributes, move past the *close paren*\n if (char === ')') next()\n }\n }", "title": "" }, { "docid": "f0501c1e32d7033346dca1525b4d1959", "score": "0.5747677", "text": "function beforeAttributeName(c){\n if(c.match(/^[\\t\\n\\f ]$/)){\n return beforeAttributeName;\n }else if(c=== '/' || c==='>' || c === EOF){\n return afterAttributeName(c);\n }else if(c==='='){\n return beforeAttributeName;\n }else{\n currentAttribute = {\n name:'',\n value:''\n };\n return attributeName(c);\n }\n}", "title": "" }, { "docid": "8534e63a89914b50ed585efcc2e167a5", "score": "0.5698363", "text": "[ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE](cp) {\n if (cp === $.APOSTROPHE) {\n this.state = AFTER_ATTRIBUTE_VALUE_QUOTED_STATE;\n } else if (cp === $.AMPERSAND) {\n this.returnState = ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE;\n this.state = CHARACTER_REFERENCE_STATE;\n } else if (cp === $.NULL) {\n this._err(ERR.unexpectedNullCharacter);\n\n this.currentAttr.value += unicode.REPLACEMENT_CHARACTER;\n } else if (cp === $.EOF) {\n this._err(ERR.eofInTag);\n\n this._emitEOFToken();\n } else {\n this.currentAttr.value += toChar(cp);\n }\n }", "title": "" }, { "docid": "fc36819a2ad7f540f04a0b59faa45df5", "score": "0.56587243", "text": "function createAttrStr(arrAttr){\n\tstrArr = [];\n\tif(arrAttr[0] == true)\n\t\tstrArr.push(\"<span class='kk_attr_chip'>Satz</span>\");\n\tif(arrAttr[1] == true)\n\t\tstrArr.push(\"<span class='kk_attr_chip'>Lemma</span>\");\n\tif(arrAttr[2] == true)\n\t\tstrArr.push(\"<span class='kk_attr_chip'>Beweis</span>\");\n\tif(arrAttr[3] == true)\n\t\tstrArr.push(\"<span class='kk_attr_chip'>Definition</span>\");\n\tif(arrAttr[4] == true)\n\t\tstrArr.push(\"<span class='kk_attr_chip'>Wichtig</span>\");\n\tif(arrAttr[5] == true)\n\t\tstrArr.push(\"<span class='kk_attr_chip'>Grundlage</span>\");\n\tif(arrAttr[6] == true)\n\t\tstrArr.push(\"<span class='kk_attr_chip'>Zusatzinfo</span>\");\n\tif(arrAttr[7] == true)\n\t\tstrArr.push(\"<span class='kk_attr_chip'>Exkurs</span>\");\n\tif(arrAttr[8] == true)\n\t\tstrArr.push(\"<span class='kk_attr_chip'>Beispiel</span>\");\n\tif(arrAttr[9] == true)\n\t\tstrArr.push(\"<span class='kk_attr_chip'>Übung</span>\");\n\t\n\tif(strArr.length == 0)\n\t\tstrArr.push(\"<span class='kk_info_keine_attr'>Keine Attribute angegeben.</span>\");\n\t\n\treturn concatStrArr(strArr, \"\");\n}", "title": "" }, { "docid": "fc0ed8bfae186b6191cfa1a11bb8b97b", "score": "0.56155014", "text": "function genAttrQueries(a, h, t) {\n\t\tvar ra = {\n\t\t\titems : [],\n\t\t\tsel : '',\n\t\t\tmethod : h,\n\t\t\ttype : t\n\t\t};\n\t\tvar y = '';\n\t\tvar x = $.isArray(a) ? a : a && typeof a === 'string' ? a.split(',')\n\t\t\t\t: [];\n\t\tfor ( var i = 0; i < x.length; i++) {\n\t\t\ty = '[' + x[i] + ']';\n\t\t\tra.items.push({\n\t\t\t\tname : x[i],\n\t\t\t\tsel : y,\n\t\t\t\tregExp : new RegExp('\\\\s' + x[i] + '=[\\\\\"|\\'](.*?)[\\\\\"|\\']',\n\t\t\t\t\t\t'ig')\n\t\t\t});\n\t\t\tra.sel += ra.sel.length > 0 ? ',' + y : y;\n\t\t}\n\t\treturn ra;\n\t}", "title": "" }, { "docid": "a9e1c9e18e648ac48f5f113d6f3f20c3", "score": "0.55896556", "text": "function $sA(elem, attributes){\n\tfor(var attribute in attributes){\n\t\telem.setAttribute(attribute, attributes[attribute]);\n\t}\n}", "title": "" }, { "docid": "a9e1c9e18e648ac48f5f113d6f3f20c3", "score": "0.55896556", "text": "function $sA(elem, attributes){\n\tfor(var attribute in attributes){\n\t\telem.setAttribute(attribute, attributes[attribute]);\n\t}\n}", "title": "" }, { "docid": "fc4001195479f35c97b16dbf72cce77d", "score": "0.55712396", "text": "processString(str) {\n const regex = RegExp('{attr:(.*?)}', 'g');\n let newStr = str;\n let words;\n\n while ((words = regex.exec(str)) !== null) {\n let word = words[0];\n\n // trim between str.indexOf(':') and }\n word = word.slice(word.indexOf(':')+1, -1);\n\n // split at .\n let ids = word.split('.');\n\n // todo: support wider variety of attribute value access\n // For now, we support two possibilities for now:\n // 1. attributeName (direct story attribute)\n // 2. entityID.attributeName (someother entity's attribute)\n let value = '';\n\n if (ids.length === 1) {\n let attributeName = ids[0];\n value = '' + this.story.getAttributeValue(attributeName);\n } else if (ids.length === 2) {\n let entityID = ids[0];\n let attributeName = ids[1];\n value = '' + this.story.getEntity(entityID).getAttributeValue(attributeName);\n }\n\n // replace with value\n newStr = newStr.replaceAll(words[0], value);\n }\n\n return newStr;\n }", "title": "" }, { "docid": "7453ef9935eaa76787c0fcbe8680115f", "score": "0.55647373", "text": "function parseAttribute(text) {\n var atRegex = new RegExp(atRe, 'gm');\n var results = atRegex.exec(text);\n if (results == null) return null;\n var elName = results[1];\n var atDef = results[2];\n //parse each attribute definition\n var atDefRegex = new RegExp('('+atDefinitionRe+')', 'mg');\n var resultsDef = atDef.match(atDefRegex);\n if (resultsDef != null) resultsDef.forEach(function(atDefMatch){\n var atSingleRegex = new RegExp(atDefinitionRe, 'm');\n var resultsAt = atDefMatch.match(atSingleRegex);\n var atName = resultsAt[1];\n var isReadOnly = false;\n var isRequired = false;\n var menu = null;\n var defaultValue = null;\n if (resultsAt[3].includes('#FIXED')) {\n isReadOnly = true;\n }\n if (resultsAt[3].includes('#REQUIRED')) {\n isRequired = true;\n }\n if (resultsAt[2].startsWith('(')) {\n menu = resultsAt[2].substr(1,(resultsAt[2].length-2)).split('|');\n }\n if (!(resultsAt[3].startsWith('#'))) {\n defaultValue = resultsAt[3].substr(1,(resultsAt[3].length-2));\n }\n attributes.push({element:elName, name:atName, defaultValue:defaultValue, required:isRequired, readOnly:isReadOnly, options:menu});\n });\n}", "title": "" }, { "docid": "04971d1475d924ba0cfcf33d7872b7f3", "score": "0.5554185", "text": "function encodeAttr(str) {\n\treturn (str+'').replace(/\"/g, '&quot;').replace(/</g, '&lt;').replace(/>/g, '&gt;');\n}", "title": "" }, { "docid": "96c5d13a34ceda86d9d70a3b8ec0da40", "score": "0.55483085", "text": "[ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE](cp) {\n if (cp === $.APOSTROPHE) {\n this.state = AFTER_ATTRIBUTE_VALUE_QUOTED_STATE;\n } else if (cp === $.AMPERSAND) {\n this.returnState = ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE;\n this.state = CHARACTER_REFERENCE_STATE;\n } else if (cp === $.NULL) {\n this._err(ERR.unexpectedNullCharacter);\n this.currentAttr.value += unicode.REPLACEMENT_CHARACTER;\n } else if (cp === $.EOF) {\n this._err(ERR.eofInTag);\n this._emitEOFToken();\n } else {\n this.currentAttr.value += toChar(cp);\n }\n }", "title": "" }, { "docid": "96c5d13a34ceda86d9d70a3b8ec0da40", "score": "0.55483085", "text": "[ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE](cp) {\n if (cp === $.APOSTROPHE) {\n this.state = AFTER_ATTRIBUTE_VALUE_QUOTED_STATE;\n } else if (cp === $.AMPERSAND) {\n this.returnState = ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE;\n this.state = CHARACTER_REFERENCE_STATE;\n } else if (cp === $.NULL) {\n this._err(ERR.unexpectedNullCharacter);\n this.currentAttr.value += unicode.REPLACEMENT_CHARACTER;\n } else if (cp === $.EOF) {\n this._err(ERR.eofInTag);\n this._emitEOFToken();\n } else {\n this.currentAttr.value += toChar(cp);\n }\n }", "title": "" }, { "docid": "96c5d13a34ceda86d9d70a3b8ec0da40", "score": "0.55483085", "text": "[ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE](cp) {\n if (cp === $.APOSTROPHE) {\n this.state = AFTER_ATTRIBUTE_VALUE_QUOTED_STATE;\n } else if (cp === $.AMPERSAND) {\n this.returnState = ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE;\n this.state = CHARACTER_REFERENCE_STATE;\n } else if (cp === $.NULL) {\n this._err(ERR.unexpectedNullCharacter);\n this.currentAttr.value += unicode.REPLACEMENT_CHARACTER;\n } else if (cp === $.EOF) {\n this._err(ERR.eofInTag);\n this._emitEOFToken();\n } else {\n this.currentAttr.value += toChar(cp);\n }\n }", "title": "" }, { "docid": "96c5d13a34ceda86d9d70a3b8ec0da40", "score": "0.55483085", "text": "[ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE](cp) {\n if (cp === $.APOSTROPHE) {\n this.state = AFTER_ATTRIBUTE_VALUE_QUOTED_STATE;\n } else if (cp === $.AMPERSAND) {\n this.returnState = ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE;\n this.state = CHARACTER_REFERENCE_STATE;\n } else if (cp === $.NULL) {\n this._err(ERR.unexpectedNullCharacter);\n this.currentAttr.value += unicode.REPLACEMENT_CHARACTER;\n } else if (cp === $.EOF) {\n this._err(ERR.eofInTag);\n this._emitEOFToken();\n } else {\n this.currentAttr.value += toChar(cp);\n }\n }", "title": "" }, { "docid": "4f46c97e2f3cae14c294e9d706033b64", "score": "0.55356324", "text": "function attributeValue(ctx, key, value, info) {\n var options = ctx.entities\n var quote = ctx.quote\n var alternative = ctx.alternative\n var unquoted\n var subset\n\n if (typeof value === 'object' && 'length' in value) {\n // `spaces` doesn’t accept a second argument, but it’s given here just to\n // keep the code cleaner.\n value = (info.commaSeparated ? commas : spaces)(value, {\n padLeft: !ctx.tightLists\n })\n }\n\n value = String(value)\n\n if (value || !ctx.collapseEmpty) {\n unquoted = value\n\n // Check unquoted value.\n if (ctx.unquoted) {\n subset = constants.unquoted[ctx.valid][ctx.safe]\n unquoted = entities(\n value,\n xtend(options, {subset: subset, attribute: true})\n )\n }\n\n // If `value` contains entities when unquoted…\n if (!ctx.unquoted || unquoted !== value) {\n // If the alternative is less common than `quote`, switch.\n if (alternative && ccount(value, quote) > ccount(value, alternative)) {\n quote = alternative\n }\n\n subset = quote === apostrophe ? constants.single : constants.double\n // Always encode without parse errors in non-HTML.\n subset = subset[ctx.schema.space === 'html' ? ctx.valid : 1][ctx.safe]\n\n value = entities(value, xtend(options, {subset: subset, attribute: true}))\n\n value = quote + value + quote\n }\n\n // Don’t add a `=` for unquoted empties.\n value = value ? equalsTo + value : value\n }\n\n return value\n}", "title": "" }, { "docid": "e172af3c8cb1ac2ddcd42ab8d0c4eff0", "score": "0.5499277", "text": "[ATTRIBUTE_VALUE_UNQUOTED_STATE](cp) {\n if (isWhitespace(cp)) {\n this._leaveAttrValue(BEFORE_ATTRIBUTE_NAME_STATE);\n } else if (cp === $.AMPERSAND) {\n this.returnState = ATTRIBUTE_VALUE_UNQUOTED_STATE;\n this.state = CHARACTER_REFERENCE_STATE;\n } else if (cp === $.GREATER_THAN_SIGN) {\n this._leaveAttrValue(DATA_STATE);\n\n this._emitCurrentToken();\n } else if (cp === $.NULL) {\n this._err(ERR.unexpectedNullCharacter);\n\n this.currentAttr.value += unicode.REPLACEMENT_CHARACTER;\n } else if (cp === $.QUOTATION_MARK || cp === $.APOSTROPHE || cp === $.LESS_THAN_SIGN || cp === $.EQUALS_SIGN || cp === $.GRAVE_ACCENT) {\n this._err(ERR.unexpectedCharacterInUnquotedAttributeValue);\n\n this.currentAttr.value += toChar(cp);\n } else if (cp === $.EOF) {\n this._err(ERR.eofInTag);\n\n this._emitEOFToken();\n } else {\n this.currentAttr.value += toChar(cp);\n }\n }", "title": "" }, { "docid": "1b826cc1b217c8405c813217f899bb07", "score": "0.5497833", "text": "attribute() {\n // attribute name\n this.skipSpace();\n const name = this.takeUntil('=', true);\n this.skipSpace();\n if (!this.skipIfStartsWith('=')) {\n this.throwError('Missing equals sign before attribute value');\n }\n // attribute value\n const value = this.quotedString();\n return [name, value];\n }", "title": "" }, { "docid": "883bc54d6f1f6cb493b4934f9ddea2df", "score": "0.54929125", "text": "function splitAttributes(flow) {\n\n var text = Nu.find(flow[1], function(k, v) { return (v === null); });\n if (text) text = text[0]\n\n var atts = Nu.select(flow[1], function(k, v) { return (v != null) });\n\n return [ text, atts ];\n }", "title": "" }, { "docid": "7cbb7a85e87c233666e84e9322f09fc8", "score": "0.54752064", "text": "function attributeValue(ctx, key, value) {\n\t var info = information(key) || {};\n\t var options = ctx.entities;\n\t var quote = ctx.quote;\n\t var alternative = ctx.alternative;\n\t var unquoted;\n\n\t if (typeof value === 'object' && 'length' in value) {\n\t /* `spaces` doesn’t accept a second argument, but it’s\n\t * given here just to keep the code cleaner. */\n\t value = (info.commaSeparated ? commas : spaces)(value, {\n\t padLeft: !ctx.tightLists\n\t });\n\t }\n\n\t value = String(value);\n\n\t if (value || !ctx.collapseEmpty) {\n\t unquoted = value;\n\n\t /* Check unquoted value. */\n\t if (ctx.unquoted) {\n\t unquoted = entities(value, xtend(options, {\n\t subset: ctx.UNQUOTED,\n\t attribute: true\n\t }));\n\t }\n\n\t /* If `value` contains entities when unquoted... */\n\t if (!ctx.unquoted || unquoted !== value) {\n\t /* If the alternative is less common than `quote`, switch. */\n\t if (\n\t alternative &&\n\t ccount(value, quote) > ccount(value, alternative)\n\t ) {\n\t quote = alternative;\n\t }\n\n\t value = entities(value, xtend(options, {\n\t subset: quote === SQ ? ctx.SINGLE_QUOTED : ctx.DOUBLE_QUOTED,\n\t attribute: true\n\t }));\n\n\t value = quote + value + quote;\n\t }\n\n\t /* Don’t add a `=` for unquoted empties. */\n\t value = value ? EQ + value : value;\n\t }\n\n\t return value;\n\t}", "title": "" }, { "docid": "c6997ad45e86aca5fbdcc04c9226615b", "score": "0.5465247", "text": "[ATTRIBUTE_VALUE_UNQUOTED_STATE](cp) {\n if (isWhitespace(cp)) {\n this._leaveAttrValue(BEFORE_ATTRIBUTE_NAME_STATE);\n } else if (cp === $.AMPERSAND) {\n this.returnState = ATTRIBUTE_VALUE_UNQUOTED_STATE;\n this.state = CHARACTER_REFERENCE_STATE;\n } else if (cp === $.GREATER_THAN_SIGN) {\n this._leaveAttrValue(DATA_STATE);\n this._emitCurrentToken();\n } else if (cp === $.NULL) {\n this._err(ERR.unexpectedNullCharacter);\n this.currentAttr.value += unicode.REPLACEMENT_CHARACTER;\n } else if (\n cp === $.QUOTATION_MARK ||\n cp === $.APOSTROPHE ||\n cp === $.LESS_THAN_SIGN ||\n cp === $.EQUALS_SIGN ||\n cp === $.GRAVE_ACCENT\n ) {\n this._err(ERR.unexpectedCharacterInUnquotedAttributeValue);\n this.currentAttr.value += toChar(cp);\n } else if (cp === $.EOF) {\n this._err(ERR.eofInTag);\n this._emitEOFToken();\n } else {\n this.currentAttr.value += toChar(cp);\n }\n }", "title": "" }, { "docid": "c6997ad45e86aca5fbdcc04c9226615b", "score": "0.5465247", "text": "[ATTRIBUTE_VALUE_UNQUOTED_STATE](cp) {\n if (isWhitespace(cp)) {\n this._leaveAttrValue(BEFORE_ATTRIBUTE_NAME_STATE);\n } else if (cp === $.AMPERSAND) {\n this.returnState = ATTRIBUTE_VALUE_UNQUOTED_STATE;\n this.state = CHARACTER_REFERENCE_STATE;\n } else if (cp === $.GREATER_THAN_SIGN) {\n this._leaveAttrValue(DATA_STATE);\n this._emitCurrentToken();\n } else if (cp === $.NULL) {\n this._err(ERR.unexpectedNullCharacter);\n this.currentAttr.value += unicode.REPLACEMENT_CHARACTER;\n } else if (\n cp === $.QUOTATION_MARK ||\n cp === $.APOSTROPHE ||\n cp === $.LESS_THAN_SIGN ||\n cp === $.EQUALS_SIGN ||\n cp === $.GRAVE_ACCENT\n ) {\n this._err(ERR.unexpectedCharacterInUnquotedAttributeValue);\n this.currentAttr.value += toChar(cp);\n } else if (cp === $.EOF) {\n this._err(ERR.eofInTag);\n this._emitEOFToken();\n } else {\n this.currentAttr.value += toChar(cp);\n }\n }", "title": "" }, { "docid": "c6997ad45e86aca5fbdcc04c9226615b", "score": "0.5465247", "text": "[ATTRIBUTE_VALUE_UNQUOTED_STATE](cp) {\n if (isWhitespace(cp)) {\n this._leaveAttrValue(BEFORE_ATTRIBUTE_NAME_STATE);\n } else if (cp === $.AMPERSAND) {\n this.returnState = ATTRIBUTE_VALUE_UNQUOTED_STATE;\n this.state = CHARACTER_REFERENCE_STATE;\n } else if (cp === $.GREATER_THAN_SIGN) {\n this._leaveAttrValue(DATA_STATE);\n this._emitCurrentToken();\n } else if (cp === $.NULL) {\n this._err(ERR.unexpectedNullCharacter);\n this.currentAttr.value += unicode.REPLACEMENT_CHARACTER;\n } else if (\n cp === $.QUOTATION_MARK ||\n cp === $.APOSTROPHE ||\n cp === $.LESS_THAN_SIGN ||\n cp === $.EQUALS_SIGN ||\n cp === $.GRAVE_ACCENT\n ) {\n this._err(ERR.unexpectedCharacterInUnquotedAttributeValue);\n this.currentAttr.value += toChar(cp);\n } else if (cp === $.EOF) {\n this._err(ERR.eofInTag);\n this._emitEOFToken();\n } else {\n this.currentAttr.value += toChar(cp);\n }\n }", "title": "" }, { "docid": "c6997ad45e86aca5fbdcc04c9226615b", "score": "0.5465247", "text": "[ATTRIBUTE_VALUE_UNQUOTED_STATE](cp) {\n if (isWhitespace(cp)) {\n this._leaveAttrValue(BEFORE_ATTRIBUTE_NAME_STATE);\n } else if (cp === $.AMPERSAND) {\n this.returnState = ATTRIBUTE_VALUE_UNQUOTED_STATE;\n this.state = CHARACTER_REFERENCE_STATE;\n } else if (cp === $.GREATER_THAN_SIGN) {\n this._leaveAttrValue(DATA_STATE);\n this._emitCurrentToken();\n } else if (cp === $.NULL) {\n this._err(ERR.unexpectedNullCharacter);\n this.currentAttr.value += unicode.REPLACEMENT_CHARACTER;\n } else if (\n cp === $.QUOTATION_MARK ||\n cp === $.APOSTROPHE ||\n cp === $.LESS_THAN_SIGN ||\n cp === $.EQUALS_SIGN ||\n cp === $.GRAVE_ACCENT\n ) {\n this._err(ERR.unexpectedCharacterInUnquotedAttributeValue);\n this.currentAttr.value += toChar(cp);\n } else if (cp === $.EOF) {\n this._err(ERR.eofInTag);\n this._emitEOFToken();\n } else {\n this.currentAttr.value += toChar(cp);\n }\n }", "title": "" }, { "docid": "5fcf1ba2d364bffb056ee9e743488943", "score": "0.54529226", "text": "function gA(item, att) { return item.getAttribute('data-'+att+''); }", "title": "" }, { "docid": "a78a09f444875ddf144868786982d04e", "score": "0.5445461", "text": "[ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE](cp) {\n if (cp === $.QUOTATION_MARK) {\n this.state = AFTER_ATTRIBUTE_VALUE_QUOTED_STATE;\n } else if (cp === $.AMPERSAND) {\n this.returnState = ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE;\n this.state = CHARACTER_REFERENCE_STATE;\n } else if (cp === $.NULL) {\n this._err(ERR.unexpectedNullCharacter);\n\n this.currentAttr.value += unicode.REPLACEMENT_CHARACTER;\n } else if (cp === $.EOF) {\n this._err(ERR.eofInTag);\n\n this._emitEOFToken();\n } else {\n this.currentAttr.value += toChar(cp);\n }\n }", "title": "" }, { "docid": "44ad54987f772cbbf97adfd010f41f10", "score": "0.54372066", "text": "function attributeValue(ctx, key, value, info) {\n var options = ctx.entities\n var quote = ctx.quote\n var alternative = ctx.alternative\n var space = ctx.schema.space\n var unquoted\n var subset\n\n if (typeof value === 'object' && 'length' in value) {\n /* `spaces` doesn’t accept a second argument, but it’s\n * given here just to keep the code cleaner. */\n value = (info.commaSeparated ? commas : spaces)(value, {\n padLeft: !ctx.tightLists\n })\n }\n\n value = String(value)\n\n if (space !== 'html' || value || !ctx.collapseEmpty) {\n unquoted = value\n\n /* Check unquoted value. */\n if (space === 'html' && ctx.unquoted) {\n subset = constants.unquoted[ctx.valid][ctx.safe]\n unquoted = entities(\n value,\n xtend(options, {subset: subset, attribute: true})\n )\n }\n\n /* If `value` contains entities when unquoted... */\n if (space !== 'html' || !ctx.unquoted || unquoted !== value) {\n /* If the alternative is less common than `quote`, switch. */\n if (alternative && ccount(value, quote) > ccount(value, alternative)) {\n quote = alternative\n }\n\n subset = quote === SQ ? constants.single : constants.double\n // Always encode without parse errors in non-HTML.\n subset = subset[space === 'html' ? ctx.valid : 1][ctx.safe]\n\n value = entities(value, xtend(options, {subset: subset, attribute: true}))\n\n value = quote + value + quote\n }\n\n /* Don’t add a `=` for unquoted empties. */\n value = value ? EQ + value : value\n }\n\n return value\n}", "title": "" }, { "docid": "132be798093808cf1bab1063b5180c37", "score": "0.54248285", "text": "function attrsToStr(attrs){var parts=[];$.each(attrs,function(name,val){if(val!=null){parts.push(name+'=\"'+htmlEscape(val)+'\"');}});return parts.join(' ');}", "title": "" }, { "docid": "ba5fd18ac2ef5f7a00c844ee8c84e5f8", "score": "0.5411698", "text": "function hc_attrname() {\n var success;\n if(checkInitialization(builder, \"hc_attrname\") != null) return;\n var doc;\n var addressList;\n var testNode;\n var attributes;\n var streetAttr;\n var strong1;\n var strong2;\n \n var docRef = null;\n if (typeof(this.doc) != 'undefined') {\n docRef = this.doc;\n }\n doc = load(docRef, \"doc\", \"hc_staff\");\n addressList = doc.getElementsByTagName(\"acronym\");\n testNode = addressList.item(1);\n attributes = testNode.attributes;\n\n streetAttr = attributes.getNamedItem(\"class\");\n strong1 = streetAttr.nodeName;\n\n strong2 = streetAttr.name;\n\n assertEqualsAutoCase(\"attribute\", \"nodeName\",\"class\",strong1);\n assertEqualsAutoCase(\"attribute\", \"name\",\"class\",strong2);\n \n}", "title": "" }, { "docid": "119b25b8761d9a3f1333ff42db7c5389", "score": "0.5385886", "text": "function attrsToStr(attrs){var parts=[];$.each(attrs,function(name,val){if(val != null){parts.push(name + '=\"' + htmlEscape(val) + '\"');}});return parts.join(' ');}", "title": "" }, { "docid": "dbfde72c62389e6c9f4b22e382abc15d", "score": "0.53836554", "text": "function getAttr(string, key) {\n const found = string.indexOf(key);\n const firstQuote = string.indexOf('\"', found + 1);\n const secondQuote = string.indexOf('\"', firstQuote + 1);\n return string.substr(firstQuote + 1, secondQuote - firstQuote - 1);\n}", "title": "" }, { "docid": "7ab6f3a9fdd31c93e59954e1efc73441", "score": "0.5367117", "text": "function parse_PtgAttrSpaceSemi(blob){blob.read_shift(2);return parse_PtgAttrSpaceType(blob,2);}", "title": "" }, { "docid": "b842520a2fe56c3151f91dab0388b636", "score": "0.5320552", "text": "function formatDAttribute(string) {\n return string.replace(/,/g, \" \") // Remove Firefox commas\n .replace(/([A-Z])/g, \" $1 \") // \"M 100 0L 50 0\" -> \" M 100 0 L 50 0\"\n .replace(/^\\s/, \"\") // \" M 100 0\" -> \"M 100 0\"\n .replace(/\\s\\s/g, \" \"); // If there was already whitespace between coordinates & commands, fix it up again.\n }", "title": "" }, { "docid": "9cb3712a4503bfb0f3246fc87f4a9511", "score": "0.53061", "text": "virtual (str) {\n let [prop, value] = this.parse(str);\n let rule = parse$7('a{}').first;\n rule.append({ prop, value, raws: { before: '' } });\n return rule\n }", "title": "" }, { "docid": "aa772d4e24ca6bc03ade304dfdf23064", "score": "0.52978694", "text": "[ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE](cp) {\n if (cp === $.QUOTATION_MARK) {\n this.state = AFTER_ATTRIBUTE_VALUE_QUOTED_STATE;\n } else if (cp === $.AMPERSAND) {\n this.returnState = ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE;\n this.state = CHARACTER_REFERENCE_STATE;\n } else if (cp === $.NULL) {\n this._err(ERR.unexpectedNullCharacter);\n this.currentAttr.value += unicode.REPLACEMENT_CHARACTER;\n } else if (cp === $.EOF) {\n this._err(ERR.eofInTag);\n this._emitEOFToken();\n } else {\n this.currentAttr.value += toChar(cp);\n }\n }", "title": "" }, { "docid": "aa772d4e24ca6bc03ade304dfdf23064", "score": "0.52978694", "text": "[ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE](cp) {\n if (cp === $.QUOTATION_MARK) {\n this.state = AFTER_ATTRIBUTE_VALUE_QUOTED_STATE;\n } else if (cp === $.AMPERSAND) {\n this.returnState = ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE;\n this.state = CHARACTER_REFERENCE_STATE;\n } else if (cp === $.NULL) {\n this._err(ERR.unexpectedNullCharacter);\n this.currentAttr.value += unicode.REPLACEMENT_CHARACTER;\n } else if (cp === $.EOF) {\n this._err(ERR.eofInTag);\n this._emitEOFToken();\n } else {\n this.currentAttr.value += toChar(cp);\n }\n }", "title": "" }, { "docid": "aa772d4e24ca6bc03ade304dfdf23064", "score": "0.52978694", "text": "[ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE](cp) {\n if (cp === $.QUOTATION_MARK) {\n this.state = AFTER_ATTRIBUTE_VALUE_QUOTED_STATE;\n } else if (cp === $.AMPERSAND) {\n this.returnState = ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE;\n this.state = CHARACTER_REFERENCE_STATE;\n } else if (cp === $.NULL) {\n this._err(ERR.unexpectedNullCharacter);\n this.currentAttr.value += unicode.REPLACEMENT_CHARACTER;\n } else if (cp === $.EOF) {\n this._err(ERR.eofInTag);\n this._emitEOFToken();\n } else {\n this.currentAttr.value += toChar(cp);\n }\n }", "title": "" }, { "docid": "aa772d4e24ca6bc03ade304dfdf23064", "score": "0.52978694", "text": "[ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE](cp) {\n if (cp === $.QUOTATION_MARK) {\n this.state = AFTER_ATTRIBUTE_VALUE_QUOTED_STATE;\n } else if (cp === $.AMPERSAND) {\n this.returnState = ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE;\n this.state = CHARACTER_REFERENCE_STATE;\n } else if (cp === $.NULL) {\n this._err(ERR.unexpectedNullCharacter);\n this.currentAttr.value += unicode.REPLACEMENT_CHARACTER;\n } else if (cp === $.EOF) {\n this._err(ERR.eofInTag);\n this._emitEOFToken();\n } else {\n this.currentAttr.value += toChar(cp);\n }\n }", "title": "" }, { "docid": "2b7b0ed148ddf31ef98994317888a52b", "score": "0.52854717", "text": "function walkAttributes(html, fn) {\n var m,\n re = /([-\\w]+) ?= ?(?:\"([^\"]*)|'([^']*)|({[^}]*}))/g\n\n while ((m = re.exec(html))) {\n fn(m[1].toLowerCase(), m[2] || m[3] || m[4])\n }\n}", "title": "" }, { "docid": "2b7b0ed148ddf31ef98994317888a52b", "score": "0.52854717", "text": "function walkAttributes(html, fn) {\n var m,\n re = /([-\\w]+) ?= ?(?:\"([^\"]*)|'([^']*)|({[^}]*}))/g\n\n while ((m = re.exec(html))) {\n fn(m[1].toLowerCase(), m[2] || m[3] || m[4])\n }\n}", "title": "" }, { "docid": "a5b37086d114e41f41e46340b5abb9ae", "score": "0.5279255", "text": "function hc_attrgetvalue2() {\n var success;\n if(checkInitialization(builder, \"hc_attrgetvalue2\") != null) return;\n var doc;\n var acronymList;\n var testNode;\n var attributes;\n var titleAttr;\n var value;\n var textNode;\n var retval;\n var firstChild;\n var alphaRef;\n \n var docRef = null;\n if (typeof(this.doc) != 'undefined') {\n docRef = this.doc;\n }\n doc = load(docRef, \"doc\", \"hc_staff\");\n acronymList = doc.getElementsByTagName(\"acronym\");\n testNode = acronymList.item(3);\n attributes = testNode.attributes;\n\n titleAttr = attributes.getNamedItem(\"class\");\n \n\tif(\n\t\n\t(builder.contentType == \"text/html\")\n\n\t) {\n\t\n\t{\n\t\tsuccess = false;\n\t\ttry {\n alphaRef = doc.createEntityReference(\"alpha\");\n }\n\t\tcatch(ex) {\n success = (typeof(ex.code) != 'undefined' && ex.code == 9);\n\t\t}\n\t\tassertTrue(\"throw_NOT_SUPPORTED_ERR\",success);\n\t}\n\n\t}\n\t\n\t\telse {\n\t\t\talphaRef = doc.createEntityReference(\"alpha\");\n firstChild = titleAttr.firstChild;\n\n retval = titleAttr.insertBefore(alphaRef,firstChild);\n value = titleAttr.value;\n\n assertEquals(\"attrValue1\",\"αYα\",value);\n \n\t\t}\n\t\n}", "title": "" }, { "docid": "2af492fdd6e3f3ef80db5e148720d638", "score": "0.5267141", "text": "function firstP(fAttribute) {\n return \"Your ninja wears \" + fAttribute + \".\"\n}", "title": "" }, { "docid": "0fb9386b6819f6f02948b9c150214012", "score": "0.5246708", "text": "function quoteattr(s, preserveCR) {\n preserveCR = preserveCR ? '&#13;' : '\\n';\n return ('' + s) /* Forces the conversion to string. */\n .replace(/&/g, '&amp;') /* This MUST be the 1st replacement. */\n .replace(/'/g, '&apos;') /* The 4 other predefined entities, required. */\n .replace(/\"/g, '&quot;')\n .replace(/</g, '&lt;')\n .replace(/>/g, '&gt;')\n /*\n You may add other replacements here for HTML only\n (but it's not necessary).\n Or for XML, only if the named entities are defined in its DTD.\n */\n .replace(/\\r\\n/g, preserveCR) /* Must be before the next replacement. */\n .replace(/[\\r\\n]/g, preserveCR);\n ;\n}", "title": "" }, { "docid": "04aaf62e910d3b91d62015d590fe15ad", "score": "0.5235903", "text": "function hc_attrcreatetextnode2() {\n var success;\n if(checkInitialization(builder, \"hc_attrcreatetextnode2\") != null) return;\n var doc;\n var addressList;\n var testNode;\n var attributes;\n var streetAttr;\n var value;\n \n var docRef = null;\n if (typeof(this.doc) != 'undefined') {\n docRef = this.doc;\n }\n doc = load(docRef, \"doc\", \"hc_staff\");\n addressList = doc.getElementsByTagName(\"acronym\");\n testNode = addressList.item(3);\n attributes = testNode.attributes;\n\n streetAttr = attributes.getNamedItem(\"class\");\n streetAttr.nodeValue = \"Y&ent1;\";\n\n value = streetAttr.value;\n\n assertEquals(\"value\",\"Y&ent1;\",value);\n value = streetAttr.nodeValue;\n\n assertEquals(\"nodeValue\",\"Y&ent1;\",value);\n \n}", "title": "" }, { "docid": "fb3e03ac8db47be17731fbc1bb5c5c79", "score": "0.52325284", "text": "function mergeAriaAttributeValues() {\n var ariaAttributes = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n ariaAttributes[_i] = arguments[_i];\n }\n var mergedAttribute = ariaAttributes\n .filter(function (arg) { return arg; })\n .join(' ')\n .trim();\n return mergedAttribute === '' ? undefined : mergedAttribute;\n}", "title": "" }, { "docid": "fb3e03ac8db47be17731fbc1bb5c5c79", "score": "0.52325284", "text": "function mergeAriaAttributeValues() {\n var ariaAttributes = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n ariaAttributes[_i] = arguments[_i];\n }\n var mergedAttribute = ariaAttributes\n .filter(function (arg) { return arg; })\n .join(' ')\n .trim();\n return mergedAttribute === '' ? undefined : mergedAttribute;\n}", "title": "" }, { "docid": "a609f264164e584e271c4c51f03d1419", "score": "0.52286905", "text": "function btAttrListParser (line) {\n const value = line.split(':')[1]\n const entries = value.split(',')\n const attrs = {}\n entries.forEach((entry) => {\n let [key, value] = entry.split('=')\n key = key.toLowerCase()\n if (key === 'hash') {\n value = value.slice(1, -1)\n } else if (key === 'length') {\n value = parseInt(value, 10)\n }\n attrs[key] = value\n })\n return attrs\n}", "title": "" }, { "docid": "343aba541b1b1e54e098a278a0579da4", "score": "0.5221869", "text": "function attrFill(a) {\n switch (a) {\n case \"A\": return \"green\";\n case \"B\": return \"orange\";\n case \"C\": return \"red\";\n case \"D\": return \"cyan\";\n case \"E\": return \"gold\";\n case \"F\": return \"pink\";\n case \"G\": return \"blue\";\n case \"H\": return \"brown\";\n case \"I\": return \"purple\";\n case \"J\": return \"chartreuse\";\n case \"K\": return \"lightgray\";\n case \"L\": return \"magenta\";\n case \"S\": return \"red\";\n default: return \"transparent\";\n }\n }", "title": "" }, { "docid": "d3bea41c015d6a06001b5dbe82002190", "score": "0.51934975", "text": "function hc_attrinsertbefore4() {\n var success;\n if(checkInitialization(builder, \"hc_attrinsertbefore4\") != null) return;\n var doc;\n var acronymList;\n var testNode;\n var attributes;\n var titleAttr;\n var value;\n var terNode;\n var dayNode;\n var docFrag;\n var retval;\n var firstChild;\n var lastChild;\n var refChild;\n \n var docRef = null;\n if (typeof(this.doc) != 'undefined') {\n docRef = this.doc;\n }\n doc = load(docRef, \"doc\", \"hc_staff\");\n acronymList = doc.getElementsByTagName(\"acronym\");\n testNode = acronymList.item(3);\n attributes = testNode.attributes;\n\n titleAttr = attributes.getNamedItem(\"title\");\n terNode = doc.createTextNode(\"ter\");\n dayNode = doc.createTextNode(\"day\");\n docFrag = doc.createDocumentFragment();\n retval = docFrag.appendChild(terNode);\n retval = docFrag.appendChild(dayNode);\n refChild = titleAttr.firstChild;\n\n retval = titleAttr.insertBefore(docFrag,refChild);\n value = titleAttr.value;\n\n assertEquals(\"attrValue\",\"terdayYes\",value);\n value = titleAttr.nodeValue;\n\n assertEquals(\"attrNodeValue\",\"terdayYes\",value);\n value = retval.nodeValue;\n\n assertNull(\"retvalValue\",value);\n firstChild = titleAttr.firstChild;\n\n value = firstChild.nodeValue;\n\n assertEquals(\"firstChildValue\",\"ter\",value);\n lastChild = titleAttr.lastChild;\n\n value = lastChild.nodeValue;\n\n assertEquals(\"lastChildValue\",\"Yes\",value);\n \n}", "title": "" }, { "docid": "066ba0215d2a30133d4cd56d9d2e92ca", "score": "0.5189667", "text": "generateCharInfo(attributes) {\n\t\treturn (\"(hair:\" + attributes[0] + \" ^ \" + \"crosseyed:\" + attributes[1]\n\t\t\t+ \" ^ \" + \"teeth:\" + attributes[2] + \") -> \" + attributes[3])\n\t}", "title": "" }, { "docid": "0087a7f6859adb7e0152a384da882865", "score": "0.51750654", "text": "function ignoreEmptyAttrs(string) {\n // make `=\"\"` optional in regex\n return string.replace(/(\\\\\\=\"\")/g, '\\(\\?\\:\\\\\\=\"\"\\)\\?');\n}", "title": "" }, { "docid": "7a25a1e6ab0596df014b52625a701fe3", "score": "0.51713425", "text": "function attributesToPhrase(arr) {\n return arr.map(function(e) {\n return `${e.name} is from ${e.hometown}`\n } )\n}", "title": "" }, { "docid": "3fb66bb5c81309e89b9434092b47656e", "score": "0.5164576", "text": "function sits_escape_attr(orig) {\n return sits_replace_all(orig,'\"',\"&quot;\");\n}", "title": "" }, { "docid": "a296f539e5d03aad2cfd5be218934a25", "score": "0.51535374", "text": "function hc_attrgetvalue1() {\n var success;\n var doc;\n var acronymList;\n var testNode;\n var attributes;\n var titleAttr;\n var value;\n var textNode;\n var retval;\n var lastChild;\n doc = load(\"hc_staff\");\n acronymList = doc.getElementsByTagName(\"acronym\");\n testNode = acronymList.item(3);\n attributes = testNode.attributes;\n\n titleAttr = attributes.getNamedItem(\"class\");\n value = titleAttr.value;\n\n assertEquals(\"attrValue1\",\"Yα\",value);\n \n}", "title": "" }, { "docid": "e9fd5ccba1fafabb613a4b65b6ab0125", "score": "0.5151577", "text": "_parseProps(str){\n let C = this.C;\n let arr = [];\n let pstart = str.indexOf(C.SPACECHAR);\n let len = str.length;\n let oQuote = false;\n let oQuotes = false;\n let start = pstart;\n for(let i=pstart;i<len;i++){\n let b = str[i];\n \n //Ignore leading spaces\n if(b == C.SPACECHAR && start == i){\n start++;\n continue;\n }\n \n //Check for open single or double quotes\n if(b == C.SINGLEQUOTE && !oQuotes && (!oQuote || str[i-1] != C.ESCCHAR) )\n oQuote = !oQuote;\n if(b == C.DOUBLEQUOTE && !oQuote && (!oQuotes || str[i-1] != C.ESCCHAR) )\n oQuotes = !oQuotes;\n \n //If spacebar is found and no quotes opened, we found the end of propery\n if(b == C.SPACECHAR && !oQuote && !oQuotes ){\n arr.push(str.substr(start, i-start));\n start = i+1;\n continue;\n }\n \n //If we found the closing quote propery, then we found the end of propery\n if( (b == C.SINGLEQUOTE || b == C.DOUBLEQUOTE) && !oQuote && !oQuotes ){\n arr.push(str.substr(start, i-start+1));\n start = i+1;\n continue;\n }\n }\n \n //Convert array of properties to related objects\n return arr.map(a=>{\n let kv = a.split(C.EQUALSCHAR);\n if(kv.length === 1)\n return new HTMLParserProp({key: kv[0].trim().toLowerCase(), val: null});\n let start = 0;\n let end = kv[1].length-1;\n let firstChar = kv[1][start];\n let lastChar = kv[1][end];\n if(firstChar == C.SINGLEQUOTE || firstChar == C.DOUBLEQUOTE)\n start++;\n if( (lastChar == C.SINGLEQUOTE || lastChar == C.DOUBLEQUOTE) && firstChar == lastChar)\n end--;\n return new HTMLParserProp({key: kv[0].trim(), val: kv[1].substr(start,end-start+1)});\n });\n }", "title": "" }, { "docid": "fd22fc7fa592d94038d02a95d30fe13b", "score": "0.5126599", "text": "attribute(name, value) { }", "title": "" }, { "docid": "ea4332eb9a5524745eab26c5ea94f101", "score": "0.5122759", "text": "parseAttrFromString(content, opts = {}, customHandler = null) {\n let setter = this.set.bind(this);\n\n if (_.isFunction(opts)) {\n setter = opts;\n opts = {};\n } else if (_.isFunction(customHandler)) {\n setter = customHandler;\n }\n\n const attrs = (opts.list !== undefined)\n ? ensureArray(opts.list)\n : ensureArray(this.options.attr.list);\n\n if (attrs.length === 0) {\n return this;\n }\n\n const ast = parse5.parse(content);\n\n const parseAttributeValue = (key) => {\n key = _.trim(key);\n if (key.length === 0) {\n return;\n }\n if (key.indexOf('[') === 0) {\n const parts = key.split(']');\n key = parts[1];\n }\n if (key.indexOf(';') === (key.length - 1)) {\n key = key.substr(0, key.length - 2);\n }\n\n setter(key);\n };\n\n const walk = (nodes) => {\n nodes.forEach(node => {\n if (node.attrs) {\n node.attrs.forEach(attr => {\n if (attrs.indexOf(attr.name) !== -1) {\n const values = attr.value.split(';');\n values.forEach(parseAttributeValue);\n }\n });\n }\n if (node.childNodes) {\n walk(node.childNodes);\n }\n if (node.content && node.content.childNodes) {\n walk(node.content.childNodes);\n }\n });\n };\n\n walk(ast.childNodes);\n\n return this;\n }", "title": "" }, { "docid": "793fa4506c45012f89dcd865b321cc4b", "score": "0.5115354", "text": "function attr_const_attr(sc, dom_node) {\n // used for custom attributes such as aria-role.\n var attr = sc.syms[sc.tpl[sc.ofs++]];\n var text = sc.syms[sc.tpl[sc.ofs++]];\n { console.log(\"[a] literal attribute: \"+attr+\" = \"+text); }\n dom_node['setAttribute'](attr, text);\n }", "title": "" }, { "docid": "2750bbd015807aa487886a9dda1d4141", "score": "0.5111004", "text": "function attrStr(k, v) {\n return isDefined(v) ? ' ' + k + '=\"' + v + '\"' : '';\n }", "title": "" }, { "docid": "fb63481f1778d2e7beff27ec07a8bede", "score": "0.5106009", "text": "function getAttr(s, n) {\n n = new RegExp(n + '=\\\"([^\\\"]+)\\\"', 'g').exec(s);\n return n ? tinymce.DOM.decode(n[1]) : '';\n }", "title": "" }, { "docid": "242110658f14a76afbf9e7e7d891b344", "score": "0.50932264", "text": "function mergeAriaAttributeValues() {\n var ariaAttributes = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n ariaAttributes[_i] = arguments[_i];\n }\n var mergedAttribute = ariaAttributes\n .filter(function (arg) { return arg !== undefined && arg !== null; })\n .join('');\n return mergedAttribute === '' ? undefined : mergedAttribute;\n}", "title": "" }, { "docid": "242110658f14a76afbf9e7e7d891b344", "score": "0.50932264", "text": "function mergeAriaAttributeValues() {\n var ariaAttributes = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n ariaAttributes[_i] = arguments[_i];\n }\n var mergedAttribute = ariaAttributes\n .filter(function (arg) { return arg !== undefined && arg !== null; })\n .join('');\n return mergedAttribute === '' ? undefined : mergedAttribute;\n}", "title": "" }, { "docid": "b4013ed61748c978e04ecec85dd2a8c0", "score": "0.5092599", "text": "[BEFORE_ATTRIBUTE_NAME_STATE](cp) {\n if (isWhitespace(cp)) {\n return;\n }\n\n if (cp === $.SOLIDUS || cp === $.GREATER_THAN_SIGN || cp === $.EOF) {\n this._reconsumeInState(AFTER_ATTRIBUTE_NAME_STATE);\n } else if (cp === $.EQUALS_SIGN) {\n this._err(ERR.unexpectedEqualsSignBeforeAttributeName);\n\n this._createAttr('=');\n\n this.state = ATTRIBUTE_NAME_STATE;\n } else {\n this._createAttr('');\n\n this._reconsumeInState(ATTRIBUTE_NAME_STATE);\n }\n }", "title": "" }, { "docid": "6d767f987e9ee24b8bc38abc16681612", "score": "0.5084266", "text": "function amr758706() { return 'str, '; }", "title": "" }, { "docid": "bbbe07885139b16d24d2b7a2e0eb8385", "score": "0.5081942", "text": "function attribToHtml(str) {\n return str.replace(pr_amp, '&amp;')\n .replace(pr_lt, '&lt;')\n .replace(pr_gt, '&gt;')\n .replace(pr_quot, '&quot;');\n }", "title": "" }, { "docid": "2821f5a87896634c52e2f90f4130f8db", "score": "0.5073966", "text": "function mergeAriaAttributeValues() {\n var ariaAttributes = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n ariaAttributes[_i] = arguments[_i];\n }\n\n var mergedAttribute = ariaAttributes.filter(function (arg) {\n return arg !== undefined && arg !== null;\n }).join('');\n return mergedAttribute === '' ? undefined : mergedAttribute;\n}", "title": "" }, { "docid": "5c4b1f70ac1e97907a16677764bce9d2", "score": "0.5064643", "text": "function attrs(){}", "title": "" }, { "docid": "41b0298d9da492ac64cc30eaf10cd353", "score": "0.506071", "text": "function Md(a,b){var c=a.getAttribute(\"class\")||\"\";-1==(\" \"+c+\" \").indexOf(\" \"+b+\" \")&&(c&&(c+=\" \"),a.setAttribute(\"class\",c+b))}", "title": "" }, { "docid": "15aa4e00862586e4490cf310f6971628", "score": "0.505979", "text": "parse( attributes ) {\n\n return attributes;\n }", "title": "" }, { "docid": "68d47dbee10055aa20175463f6055231", "score": "0.5054358", "text": "function determineAttributes(text,start,code,props,error) {\n var current = text.getAttributes(start);\n var replacements = {};\n \n for (var i in current) {\n replacements[i] = current[i];\n }\n\n replacements['BOLD'] = props[code][1];\n replacements['ITALIC'] = props[code][2];\n replacements['UNDERLINE'] = props[code][3];\n \n return replacements;\n}", "title": "" }, { "docid": "124afdc28be0c450cb2c9bf70a23e567", "score": "0.50530195", "text": "function acronyms(string){\n\n}", "title": "" }, { "docid": "1ddfd537cb6f8a7067e9767c170f1b12", "score": "0.50510675", "text": "[BEFORE_ATTRIBUTE_VALUE_STATE](cp) {\n if (isWhitespace(cp)) {\n return;\n }\n\n if (cp === $.QUOTATION_MARK) {\n this.state = ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE;\n } else if (cp === $.APOSTROPHE) {\n this.state = ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE;\n } else if (cp === $.GREATER_THAN_SIGN) {\n this._err(ERR.missingAttributeValue);\n\n this.state = DATA_STATE;\n\n this._emitCurrentToken();\n } else {\n this._reconsumeInState(ATTRIBUTE_VALUE_UNQUOTED_STATE);\n }\n }", "title": "" }, { "docid": "207e7efc1ab2e5ae4b34fbcc7195558c", "score": "0.5044713", "text": "function pairElement(str) {\r\n return str;\r\n }", "title": "" }, { "docid": "63137db54e0cb4d12782fa5e596e387e", "score": "0.502878", "text": "function parseDataAttr(attr) {\r\n return \"data-\" + PREFIXES.DATA_ATTR + \"-\" + attr;\r\n }", "title": "" }, { "docid": "0b4e4b94a1001c21435da5d0576db937", "score": "0.5027808", "text": "function attrsToStr(attrs) {\r\n var parts = [];\r\n $.each(attrs, function (name, val) {\r\n if (val != null) {\r\n parts.push(name + '=\"' + htmlEscape(val) + '\"');\r\n }\r\n });\r\n return parts.join(' ');\r\n}", "title": "" }, { "docid": "1a473dcc030a72e6bfda56e613bc049c", "score": "0.50265133", "text": "function hc_attrgetvalue1() {\n var success;\n if(checkInitialization(builder, \"hc_attrgetvalue1\") != null) return;\n var doc;\n var acronymList;\n var testNode;\n var attributes;\n var titleAttr;\n var value;\n var textNode;\n var retval;\n var lastChild;\n \n var docRef = null;\n if (typeof(this.doc) != 'undefined') {\n docRef = this.doc;\n }\n doc = load(docRef, \"doc\", \"hc_staff\");\n acronymList = doc.getElementsByTagName(\"acronym\");\n testNode = acronymList.item(3);\n attributes = testNode.attributes;\n\n titleAttr = attributes.getNamedItem(\"class\");\n value = titleAttr.value;\n\n assertEquals(\"attrValue1\",\"Yα\",value);\n \n}", "title": "" }, { "docid": "03476eedeee561287d1c907618bb8361", "score": "0.50245756", "text": "function formatAttributes(props) {\n\tvar tags = [];\n\tcanReflect.eachKey(props, function(value, name) {\n\t\t// Converts `\"className\"` to `\"class\"`.\n\t\tvar attributeName = name === \"className\" ? \"class\" : name,\n\n\t\t\t// Escapes `value` if `name` is `\"href\"`.\n\t\t\tattributeValue = name === \"href\" ? value : string.esc(value);\n\n\t\ttags.push(attributeName + \"=\\\"\" + attributeValue + \"\\\"\");\n\t});\n\treturn tags.join(\" \");\n}", "title": "" }, { "docid": "13855ebab0a3646a517a0702e8c84d24", "score": "0.50172555", "text": "function getTokenAttributes(token,tokenAttributes){\n let newTokenAttributes=deepcopy(tokenAttributes);\n let extractedToken=token.substring(tokenAttributes.start,tokenAttributes.end)\n if (extractedToken.startsWith('(')||extractedToken.startsWith('!')){\n newTokenAttributes.start+=1;\n }else if(extractedToken.endsWith(')')){\n newTokenAttributes.end-=1;\n }\n if(tokenAttributes.start===newTokenAttributes.start && tokenAttributes.end===newTokenAttributes.end){\n return tokenAttributes;\n }else{\n return getTokenAttributes(token,newTokenAttributes);\n }\n}", "title": "" }, { "docid": "d6aca49eaad229397bcabe4207dbf24c", "score": "0.50154173", "text": "function Attribute(args, arg2) {\n var splitTypes; // For String(30) type\n if (false === (this instanceof Attribute)) throw new Error('new operator required');\n if (typeof args == 'string') {\n var quickName = args;\n args = {};\n args.name = quickName;\n if (typeof arg2 == 'string') {\n args.type = arg2;\n }\n }\n args = args || {};\n this.name = args.name || null;\n this.label = args.label || args.name;\n if (this.label)\n this.label = this.label.charAt(0).toUpperCase() + this.label.slice(1);\n this.type = args.type || 'String';\n splitTypes = function (str) { // for String(30) remove right of (\n var tmpSplit = str.split('(');\n tmpSplit[1] = parseInt(tmpSplit[1]);\n return tmpSplit;\n }(this.type);\n this.type = splitTypes[0];\n this.hint = args.hint || {};\n this.validationRule = args.validationRule || {};\n var unusedProperties = [];\n var standardProperties = ['name', 'type', 'label', 'hint', 'value', 'validationRule'];\n switch (this.type) {\n case 'ID':\n unusedProperties = T.getInvalidProperties(args, standardProperties);\n this.value = args.value || null;\n break;\n case 'String':\n unusedProperties = T.getInvalidProperties(args, standardProperties.concat(['placeHolder', 'quickPick', 'size']));\n this.size = splitTypes[1] ? splitTypes[1] : typeof args.size == 'number' ? args.size : args.size || 50;\n this.value = args.value || null;\n if (args.quickPick)\n this.quickPick = args.quickPick;\n this.placeHolder = args.placeHolder || null;\n break;\n case 'Date':\n unusedProperties = T.getInvalidProperties(args, standardProperties.concat('placeHolder'));\n this.value = args.value || null;\n this.placeHolder = args.placeHolder || null;\n break;\n case 'Boolean':\n unusedProperties = T.getInvalidProperties(args, standardProperties);\n if (args.value === false)\n this.value = false;\n else\n this.value = args.value || null;\n break;\n case 'Number':\n unusedProperties = T.getInvalidProperties(args, standardProperties.concat('placeHolder'));\n if (args.value === 0)\n this.value = 0;\n else\n this.value = args.value || null;\n this.placeHolder = args.placeHolder || null;\n break;\n case 'Model':\n unusedProperties = T.getInvalidProperties(args, standardProperties);\n this.value = args.value || null;\n if (this.value instanceof Attribute.ModelID)\n this.modelType = this.value.modelType;\n break;\n case 'Group':\n unusedProperties = T.getInvalidProperties(args, standardProperties);\n this.value = args.value || null;\n break;\n case 'Table':\n unusedProperties = T.getInvalidProperties(args, standardProperties.concat('group'));\n this.value = args.value || null;\n this.group = args.group || null;\n break;\n case 'Object':\n unusedProperties = T.getInvalidProperties(args, standardProperties);\n this.value = args.value || null;\n break;\n default:\n break;\n }\n var errorList = this.getObjectStateErrors(); // before leaving make sure valid Attribute\n for (var i = 0; i < unusedProperties.length; i++) errorList.push('invalid property: ' + unusedProperties[i]);\n if (errorList.length > 1) throw new Error('error creating Attribute: multiple errors');\n if (errorList.length) throw new Error('error creating Attribute: ' + errorList[0]);\n\n // Validations done\n this._eventListeners = [];\n this._errorConditions = {};\n}", "title": "" }, { "docid": "95cc4b3e55a8588e9863bed9b20f4128", "score": "0.5014788", "text": "function parse_PtgAttrSpaceSemi(blob) {\n\tblob.read_shift(2);\n\treturn parse_PtgAttrSpaceType(blob, 2);\n}", "title": "" }, { "docid": "95cc4b3e55a8588e9863bed9b20f4128", "score": "0.5014788", "text": "function parse_PtgAttrSpaceSemi(blob) {\n\tblob.read_shift(2);\n\treturn parse_PtgAttrSpaceType(blob, 2);\n}", "title": "" }, { "docid": "95cc4b3e55a8588e9863bed9b20f4128", "score": "0.5014788", "text": "function parse_PtgAttrSpaceSemi(blob) {\n\tblob.read_shift(2);\n\treturn parse_PtgAttrSpaceType(blob, 2);\n}", "title": "" }, { "docid": "2a6722ba53dd3bd06db587286be3711d", "score": "0.5006555", "text": "[AFTER_ATTRIBUTE_VALUE_QUOTED_STATE](cp) {\n if (isWhitespace(cp)) {\n this._leaveAttrValue(BEFORE_ATTRIBUTE_NAME_STATE);\n } else if (cp === $.SOLIDUS) {\n this._leaveAttrValue(SELF_CLOSING_START_TAG_STATE);\n } else if (cp === $.GREATER_THAN_SIGN) {\n this._leaveAttrValue(DATA_STATE);\n\n this._emitCurrentToken();\n } else if (cp === $.EOF) {\n this._err(ERR.eofInTag);\n\n this._emitEOFToken();\n } else {\n this._err(ERR.missingWhitespaceBetweenAttributes);\n\n this._reconsumeInState(BEFORE_ATTRIBUTE_NAME_STATE);\n }\n }", "title": "" }, { "docid": "603a7a538d203279767f56e1e3e06bb9", "score": "0.50026715", "text": "function hc_attrinsertbefore2() {\n var success;\n if(checkInitialization(builder, \"hc_attrinsertbefore2\") != null) return;\n var doc;\n var acronymList;\n var testNode;\n var attributes;\n var titleAttr;\n var value;\n var textNode;\n var retval;\n var lastChild;\n var firstChild;\n var refChild;\n \n var docRef = null;\n if (typeof(this.doc) != 'undefined') {\n docRef = this.doc;\n }\n doc = load(docRef, \"doc\", \"hc_staff\");\n acronymList = doc.getElementsByTagName(\"acronym\");\n testNode = acronymList.item(3);\n attributes = testNode.attributes;\n\n titleAttr = attributes.getNamedItem(\"title\");\n textNode = doc.createTextNode(\"terday\");\n refChild = titleAttr.firstChild;\n\n retval = titleAttr.insertBefore(textNode,refChild);\n value = titleAttr.value;\n\n assertEquals(\"attrValue\",\"terdayYes\",value);\n value = titleAttr.nodeValue;\n\n assertEquals(\"attrNodeValue\",\"terdayYes\",value);\n value = retval.nodeValue;\n\n assertEquals(\"retvalValue\",\"terday\",value);\n firstChild = titleAttr.firstChild;\n\n value = firstChild.nodeValue;\n\n assertEquals(\"firstChildValue\",\"terday\",value);\n lastChild = titleAttr.lastChild;\n\n value = lastChild.nodeValue;\n\n assertEquals(\"lastChildValue\",\"Yes\",value);\n \n}", "title": "" }, { "docid": "00845c264006dcec2898f079d38f562e", "score": "0.49989766", "text": "function encodeAttribute(value) {\r\n return kebabCase(value.replace(/\\W+/g, '-').replace(/\\-$/, ''));\r\n }", "title": "" }, { "docid": "cc83b54a203277d81fd9e758e075be08", "score": "0.49943486", "text": "function joinAttrs(attrs) {\n var result = '';\n forOwn$1(attrs, function (value, prop) {\n if (prop && (value || value === false || value === 0)) {\n result += \" \" + prop + \"=\\\"\" + value + \"\\\"\";\n }\n });\n return result.trim();\n}", "title": "" }, { "docid": "4e80426ab156a69202f8b6eb679235fe", "score": "0.49943197", "text": "function masterInsertATTR(insertHere, valueForAttr){\n\t\t\t\t$(insertHere).attr('correct', valueForAttr);\n\t\t\t}", "title": "" }, { "docid": "bede4323f40bca033243aef8875e1bcc", "score": "0.4990982", "text": "[BEFORE_ATTRIBUTE_NAME_STATE](cp) {\n if (isWhitespace(cp)) {\n return;\n }\n\n if (cp === $.SOLIDUS || cp === $.GREATER_THAN_SIGN || cp === $.EOF) {\n this._reconsumeInState(AFTER_ATTRIBUTE_NAME_STATE);\n } else if (cp === $.EQUALS_SIGN) {\n this._err(ERR.unexpectedEqualsSignBeforeAttributeName);\n this._createAttr('=');\n this.state = ATTRIBUTE_NAME_STATE;\n } else {\n this._createAttr('');\n this._reconsumeInState(ATTRIBUTE_NAME_STATE);\n }\n }", "title": "" }, { "docid": "bede4323f40bca033243aef8875e1bcc", "score": "0.4990982", "text": "[BEFORE_ATTRIBUTE_NAME_STATE](cp) {\n if (isWhitespace(cp)) {\n return;\n }\n\n if (cp === $.SOLIDUS || cp === $.GREATER_THAN_SIGN || cp === $.EOF) {\n this._reconsumeInState(AFTER_ATTRIBUTE_NAME_STATE);\n } else if (cp === $.EQUALS_SIGN) {\n this._err(ERR.unexpectedEqualsSignBeforeAttributeName);\n this._createAttr('=');\n this.state = ATTRIBUTE_NAME_STATE;\n } else {\n this._createAttr('');\n this._reconsumeInState(ATTRIBUTE_NAME_STATE);\n }\n }", "title": "" }, { "docid": "bede4323f40bca033243aef8875e1bcc", "score": "0.4990982", "text": "[BEFORE_ATTRIBUTE_NAME_STATE](cp) {\n if (isWhitespace(cp)) {\n return;\n }\n\n if (cp === $.SOLIDUS || cp === $.GREATER_THAN_SIGN || cp === $.EOF) {\n this._reconsumeInState(AFTER_ATTRIBUTE_NAME_STATE);\n } else if (cp === $.EQUALS_SIGN) {\n this._err(ERR.unexpectedEqualsSignBeforeAttributeName);\n this._createAttr('=');\n this.state = ATTRIBUTE_NAME_STATE;\n } else {\n this._createAttr('');\n this._reconsumeInState(ATTRIBUTE_NAME_STATE);\n }\n }", "title": "" }, { "docid": "bede4323f40bca033243aef8875e1bcc", "score": "0.4990982", "text": "[BEFORE_ATTRIBUTE_NAME_STATE](cp) {\n if (isWhitespace(cp)) {\n return;\n }\n\n if (cp === $.SOLIDUS || cp === $.GREATER_THAN_SIGN || cp === $.EOF) {\n this._reconsumeInState(AFTER_ATTRIBUTE_NAME_STATE);\n } else if (cp === $.EQUALS_SIGN) {\n this._err(ERR.unexpectedEqualsSignBeforeAttributeName);\n this._createAttr('=');\n this.state = ATTRIBUTE_NAME_STATE;\n } else {\n this._createAttr('');\n this._reconsumeInState(ATTRIBUTE_NAME_STATE);\n }\n }", "title": "" }, { "docid": "91216dfd862a08f067cc2bd04358d843", "score": "0.49860945", "text": "function attrsToStr(attrs) {\n var parts = [];\n $.each(attrs, function (name, val) {\n if (val != null) {\n parts.push(name + '=\"' + htmlEscape(val) + '\"');\n }\n });\n return parts.join(' ');\n}", "title": "" }, { "docid": "91216dfd862a08f067cc2bd04358d843", "score": "0.49860945", "text": "function attrsToStr(attrs) {\n var parts = [];\n $.each(attrs, function (name, val) {\n if (val != null) {\n parts.push(name + '=\"' + htmlEscape(val) + '\"');\n }\n });\n return parts.join(' ');\n}", "title": "" } ]
1860c9c709bc291e26e7cc6c7a642909
Creates an item and adds it to the scene.
[ { "docid": "aa245adbea7cb19f241376eaeb7e9bf5", "score": "0.6710885", "text": "function addItem(itemType, path, metadata, position, rotation, scale, fixed, options) {\n itemType = itemType || \"FloorItem\";\n var scope = this;\n var fileName = path + \"/\" + metadata.itemName + \".fbx\";\n var loaderCallback = function loaderCallback(geometry, materials) {\n var item = new (__WEBPACK_IMPORTED_MODULE_5__items_factory__[\"a\" /* default */].getClass(itemType))(model, metadata, geometry, materials[0], position, rotation, scale, options | null);\n item.fixed = fixed || false;\n scope.items.push(item);\n scope.add(item);\n item.initObject();\n scope.itemLoadedCallbacks.fire(item);\n };\n\n this.itemLoadingCallbacks.fire();\n\n fbxLoader.load(fileName, function (group) {\n var geometries = !options.isOneGeometry && group.children[0] && group.children[0].children.length > 0 ? group.children[0].children : group.children;\n\n geometries.forEach(function (mesh) {\n var texturePromises = [];\n var material = null;\n\n metadata.textureMaps.forEach(function (map) {\n texturePromises.push(loadTexture(map.type, path, mesh.name));\n });\n\n Promise.all(texturePromises).then(function (data) {\n var materialMap = [];\n\n data.forEach(function (texture) {\n if (texture[mesh.name].BaseColor) materialMap[\"map\"] = texture[mesh.name].BaseColor;\n if (texture[mesh.name].Normal) materialMap[\"normal\"] = texture[mesh.name].Normal;\n if (texture[mesh.name].Metallic) materialMap[\"metallic\"] = texture[mesh.name].Metallic;\n if (texture[mesh.name].Roughness) materialMap[\"roughness\"] = texture[mesh.name].Roughness;\n if (texture[mesh.name].AlbedoTransparency) materialMap[\"map\"] = texture[mesh.name].AlbedoTransparency;\n if (texture[mesh.name].MetallicSmoothness) materialMap[\"metallic\"] = texture[mesh.name].MetallicSmoothness;\n if (texture[mesh.name].AO) materialMap[\"AO\"] = texture[mesh.name].AO;\n });\n\n var material = new __WEBPACK_IMPORTED_MODULE_0_three__[\"MeshStandardMaterial\"]({\n map: materialMap[\"map\"] || null,\n normalMap: materialMap[\"normal\"] || null,\n metalnessMap: materialMap[\"metallic\"] || null,\n roughnessMap: materialMap[\"roughness\"] || null,\n aoMap: materialMap[\"AO\"] || null,\n metalness: 1,\n roughness: 1\n });\n\n if (options.transparent) {\n material.opacity = options.opacity;\n material.transparent = true;\n }\n\n createItem(mesh.geometry, material);\n });\n\n function createItem(geometry, material) {\n var item = new (__WEBPACK_IMPORTED_MODULE_5__items_factory__[\"a\" /* default */].getClass(itemType))(model, metadata, geometry, material, position, rotation, scale, options);\n\n item.fixed = fixed || false;\n\n scope.items.push(item);\n\n scope.add(item);\n item.initObject();\n scope.itemLoadedCallbacks.fire(item);\n }\n });\n }, function (prog) {}, function (e) {\n console.error(e);\n });\n }", "title": "" } ]
[ { "docid": "31a097068bb2ec80709d22b3d6587488", "score": "0.73019016", "text": "createNewItem(item) {\n if (!item) return;\n this.items.push(item);\n }", "title": "" }, { "docid": "3bbf565a8fd676859caa3ff6bd9130e2", "score": "0.7052357", "text": "add_item(item) { return this._inventory.add_item(item); }", "title": "" }, { "docid": "d0e70d8ec663eb255f22c9f92aaef6ac", "score": "0.68244004", "text": "function addItem(state, item) {\n state.items.push({title:item, done:false});\n}", "title": "" }, { "docid": "8e1685fa3e5e11116d30de335d94e195", "score": "0.6804204", "text": "addToInventoryAtIndex(item, index, createSprite = true) {\n // Add to saved data\n characterData.setInventory(index, {\n item: item.constructor.name,\n count: item.numItems,\n });\n\n // Add item images\n const column = index % 4;\n const row = Math.floor(index / 4);\n const x = 570 + column * 45;\n const y = 225 + row * 35;\n\n // Draw sprite or move it if it already exists\n if (createSprite) {\n item.createSprite(x, y, index);\n } else {\n item.move(x, y, index);\n }\n\n // Hide if inventory is not selected\n let showItem = this.scene.currentPanel == CONSTANTS.PANEL.INVENTORY;\n item.setVisible(showItem);\n\n // Add object to the scene\n this.inventory[index] = item;\n }", "title": "" }, { "docid": "7c3dd39df3e56b80c43d63cb83bd3338", "score": "0.6707576", "text": "function newItem() {\n\t\tvar uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,\n\t\t\tfunction(c) {\n \t\t\tvar r = Math.random()*16|0;\n\t\t\t\tvar v = c == 'x' ? r : (r&0x3|0x8);\n \t\t\treturn v.toString(16);\n\t\t\t}\n\t\t);\n\t\t$(this).find(\".input .items\").append($(templates.itemIn(uuid,\n\t\t\t\t\t\t\t\t\t\t\t\tnew Date().getTime(), \"\")));\n\t\tupdateItems.call(this);\n\t}", "title": "" }, { "docid": "0ba52d336d6f0d48335aacdf24c8004d", "score": "0.66962075", "text": "function createItem(data) {\n return new model.Item(data);\n }", "title": "" }, { "docid": "c608210a745efdb1dfa64c9bfacfb62c", "score": "0.6675516", "text": "function createItem(left, top, image) {\n var item = items.create(left, top, image);\n item.animations.add('spin');\n item.animations.play('spin', 8, true);\n}", "title": "" }, { "docid": "be93a20433f75485a3a2e1db2dda16c9", "score": "0.66739094", "text": "function createItem(item){\n const itemDiv = document.createElement(\"div\")\n itemDiv.dataset.id = item.id\n itemDiv.innerHTML = `\n <h4>${item.name} - <em>$${item.price}</em></h4>\n <p>${item.description}</p>\n <button class=\"addToCart\">Add to Cart</button>\n <hr>\n `\n restaurantMenu.append(itemDiv)\n }", "title": "" }, { "docid": "4c28ffd524d3ac3da6b14392aa038205", "score": "0.664597", "text": "function addItem(\n itemType,\n path,\n metadata,\n position,\n rotation,\n scale,\n fixed,\n options\n ) {\n itemType = itemType || \"FloorItem\";\n var scope = this;\n let fileName = path + \"/\" + metadata.itemName + \".fbx\";\n var loaderCallback = function(geometry, materials) {\n var item = new (Factory.getClass(itemType))(\n model,\n metadata,\n geometry,\n materials[0],\n position,\n rotation,\n scale,\n options | null\n );\n item.fixed = fixed || false;\n scope.items.push(item);\n scope.add(item);\n item.initObject();\n scope.itemLoadedCallbacks.fire(item);\n };\n\n this.itemLoadingCallbacks.fire();\n\n fbxLoader.load(\n fileName,\n group => {\n let geometries =\n !options.isOneGeometry &&\n group.children[0] &&\n group.children[0].children.length > 0\n ? group.children[0].children\n : group.children;\n\n geometries.forEach(mesh => {\n let texturePromises = [];\n let material = null;\n\n metadata.textureMaps.forEach(map => {\n texturePromises.push(\n loadTexture(map.type, path, mesh.name)\n );\n });\n\n Promise.all(texturePromises).then(data => {\n let materialMap = [];\n\n data.forEach(texture => {\n if (texture[mesh.name].BaseColor)\n materialMap[\"map\"] =\n texture[mesh.name].BaseColor;\n if (texture[mesh.name].Normal)\n materialMap[\"normal\"] =\n texture[mesh.name].Normal;\n if (texture[mesh.name].Metallic)\n materialMap[\"metallic\"] =\n texture[mesh.name].Metallic;\n if (texture[mesh.name].Roughness)\n materialMap[\"roughness\"] =\n texture[mesh.name].Roughness;\n if (texture[mesh.name].AlbedoTransparency)\n materialMap[\"map\"] =\n texture[mesh.name].AlbedoTransparency;\n if (texture[mesh.name].MetallicSmoothness)\n materialMap[\"metallic\"] =\n texture[mesh.name].MetallicSmoothness;\n if (texture[mesh.name].AO)\n materialMap[\"AO\"] = texture[mesh.name].AO;\n });\n\n var material = new THREE.MeshStandardMaterial({\n map: materialMap[\"map\"] || null,\n normalMap: materialMap[\"normal\"] || null,\n metalnessMap: materialMap[\"metallic\"] || null,\n roughnessMap: materialMap[\"roughness\"] || null,\n aoMap: materialMap[\"AO\"] || null,\n metalness: 1,\n roughness: 1\n });\n\n if (options.transparent) {\n material.opacity = options.opacity;\n material.transparent = true;\n }\n\n createItem(mesh.geometry, material);\n });\n\n function createItem(geometry, material) {\n var item = new (Factory.getClass(itemType))(\n model,\n metadata,\n geometry,\n material,\n position,\n rotation,\n scale,\n options\n );\n\n item.fixed = fixed || false;\n\n scope.items.push(item);\n\n scope.add(item);\n item.initObject();\n scope.itemLoadedCallbacks.fire(item);\n }\n });\n },\n prog => {},\n e => {\n console.error(e);\n }\n );\n }", "title": "" }, { "docid": "f4936fbd81c55e6b6b7c4f7c9aaebe0d", "score": "0.65889406", "text": "add(item) {\n this.state.add(item);\n this.emitNewState();\n }", "title": "" }, { "docid": "a9fa8ebd88524c18a407a8cebd6d9a27", "score": "0.65567654", "text": "function addItem() {\n itemX[itemCount] = Math.floor(Math.random() * WIDTH);\n itemY[itemCount] = Math.floor(Math.random() * HEIGHT);\n itemType[itemCount] = Math.floor(Math.random() * ITEM_TYPE_COUNT);\n itemDirection[itemCount] = LEFT;\n itemCount += 1;\n \n}", "title": "" }, { "docid": "7029c5a17f7873be95b5363b434d1918", "score": "0.65375334", "text": "add(item) {\n this.collection.push(item);\n this.render();\n }", "title": "" }, { "docid": "4f02ac7b1b28465fc2844ee8b3fd25f9", "score": "0.65127087", "text": "function add_item(name, price, description) {\n\tvar item = new Item();\n\titem.set(\"name\", name);\n\titem.set(\"price\", price);\n\titem.set(\"description\", description);\n\titem.set(\"menu\", menu);\n\titem.save(null, {\n\t\tsuccess: function(item) {\n\t\t\trender_item(item);\n\t\t}\n\t});\n}", "title": "" }, { "docid": "97aca4ff770aed59f553e340521e2703", "score": "0.64922506", "text": "function AddItem(_title, _icon, _point, _description) {\n item_num++;\n var temp = MakeUpItem(_title, _icon, _point, _description);\n temp.setAttribute(\"id\",\"i\"+item_num);\n shop_Renderer.appendChild(temp);\n}", "title": "" }, { "docid": "5c814763b3d131c41885bf9c1b0727a8", "score": "0.6468935", "text": "function onCreateItem (data) {\n if (!(data.id in boxList)) {\n let newBox = new Box(this, data.id, data.x, data.y, data.r);\n boxList[data.id] = newBox;\n }\n}", "title": "" }, { "docid": "d826d628717e6cf8f128c7d1f85ee172", "score": "0.6468218", "text": "addItem(item) {\n let shoppingListItem = new ShoppingListItem(item.grocery, item.quantity)\n this.items.push(shoppingListItem);\n }", "title": "" }, { "docid": "66152b7f39de22fe0d0fac1c51e66a5b", "score": "0.6462408", "text": "function createNewItem() {\n var name = $('.new-name').val();\n var price = $('.new-price').val();\n var item = new Item(name, price);\n items.push(item);\n fillChart(items);\n }", "title": "" }, { "docid": "3b50e6f27a3c1ffc5e89746e41167df5", "score": "0.6445203", "text": "addItem(newItem, callback) {\n return Item.create({\n hero_id: newItem.hero_id, \n item: newItem.item,\n time: newItem.time,\n games: newItem.games,\n wins: newItem.wins,\n })\n .then((item) => {\n callback(null, item);\n })\n .catch((err) => {\n callback(err);\n })\n }", "title": "" }, { "docid": "93b234865ab683fe622f55307d9301fa", "score": "0.6443439", "text": "function addItem() {\n if (item !== null) {\n setWarning(false);\n setModalVisible(!modalVisible);\n\n //Get current path in firebase and update the array with a new item.\n addPartToFirestore({\n title: specificDetailUnit,\n category: specificCategory,\n partTitle: item,\n partSubtitle: optional,\n });\n\n setItem(null);\n setOptional(null);\n } else {\n setWarning(true);\n }\n }", "title": "" }, { "docid": "480972cbc55b433c08a5abf505d9660d", "score": "0.64210594", "text": "addItem(item) {\n this.items.push(item);\n }", "title": "" }, { "docid": "4ffc8d316a20f1c61ad54d457febf401", "score": "0.63703364", "text": "function addItem(state, item){\n state.items.push({\n name: item,\n checked: false\n });\n}", "title": "" }, { "docid": "29f5c2d0d7fb43b821e8ab3d66648bcb", "score": "0.63543093", "text": "addItem(count,unit,ingredient){\n //Create item object\n const item = {\n // Create a unique Id for the item using imported uniqid() library\n id: uniqid(),\n count,\n unit,\n ingredient\n }\n this.items.push(item);\n this.persistData();\n return item;\n }", "title": "" }, { "docid": "cb514c5545554b4d2ad6d098fb791c87", "score": "0.6353433", "text": "createItems() {}", "title": "" }, { "docid": "cb514c5545554b4d2ad6d098fb791c87", "score": "0.6353433", "text": "createItems() {}", "title": "" }, { "docid": "6f9a7668116e92e87d44ca7278c5af22", "score": "0.6351665", "text": "function addItem(itemList, item) {\r\n\t\tvar item_id = item.item_id;\r\n\t\t\r\n\t\t// create a new <li> tag.\r\n\t\tvar li = $create('li', {\r\n\t\t id: 'item-' + item_id,\r\n\t\t className: 'item'\r\n\t\t });\r\n\t\t\r\n\t\tli.dataset.item_id = item_id; // set id\r\n\t \r\n\t\t// set edit and delete icons.\r\n\t var edit_section = $create('span', {\r\n\t \tclassName: 'edit'\r\n\t });\r\n\t var edit = $create('i', {\r\n\t className: 'fa fa-edit'\r\n\t });\r\n\t edit_section.appendChild(edit);\r\n\t var trash_section = $create('span', {\r\n\t \tclassName: 'delete'\r\n\t });\r\n\t var trash = $create('i', {\r\n\t className: 'fa fa-trash-o'\r\n\t });\r\n\t trash_section.appendChild(trash);\r\n\t li.innerHTML = item.content;\r\n\t \r\n\t // append edit and delete icons.\r\n\t li.appendChild(edit_section);\r\n\t li.appendChild(trash_section);\r\n\t itemList.appendChild(li);\r\n\t}", "title": "" }, { "docid": "28df604a67e9aecfad70eadbc81de6fb", "score": "0.6344275", "text": "function addItem(state, item) {\n state.items.push({\n name: item,\n checked: false,\n });\n}", "title": "" }, { "docid": "d27947110ddfd8fa78098a85fe32f979", "score": "0.63295555", "text": "function _createItem(renderable) {\n var item = {\n modifier: new StateModifier(this.options.itemModifier),\n renderable: renderable,\n state: {\n selected: false\n }\n };\n item.node = new RenderNode(item.modifier);\n item.node.add(renderable);\n if (item.renderable.on) {\n item.renderable.on('click', _onClickItem.bind(this, item));\n }\n return item;\n }", "title": "" }, { "docid": "28cc7b9355dc4bcff00d17cd176c1974", "score": "0.62925464", "text": "addItem(itemToAdd) {\n if (this.existsInCart(itemToAdd)) {\n // Increment existing quantity\n\n // Find the order item from the cart\n let orderItem = this.firstForMenuItem(itemToAdd);\n\n // IncrementProperty 'quantity'\n orderItem.incrementProperty('quantity', 1);\n } else {\n // Create a new order item for the current order\n let orderItem = this.get('store').createRecord('order-item', { menuItem: itemToAdd, quantity: 1});\n this.get('order.items').addObject(orderItem);\n }\n\n this.get('order').recomputeTotal();\n }", "title": "" }, { "docid": "f2b270bba862bc3d24790df28d29e376", "score": "0.6289524", "text": "addItem(text) {\n const items = storage.getItems();\n\n const item = {\n id: Date.now(),\n title: text,\n completed: false\n };\n\n items.push(item);\n\n storage.saveItems(items);\n }", "title": "" }, { "docid": "e25dc36786e8ccc0cbeee1ba5aaba4e7", "score": "0.6275384", "text": "add (pItem) {\r\n console.info('Pickup called in Inventory')\r\n this.ItemList.push(pItem)\r\n this.curItem = this.ItemList.length - 1\r\n }", "title": "" }, { "docid": "9d4f6dd4e5fa930649ce218d8bf077c6", "score": "0.6275019", "text": "function addGroceryItem(item) {\n \n // Generate a unique id for our new item\n item.id = uuid.v1();\n\n // Store the item within our array\n items.push(item);\n \n // Trigger the listeners so that the DOM gets re-rendered\n triggerListeners();\n\n helper.post(\"api/items\", item).then(function (err, data) {\n helper.emit('new-grocery-item', item);\n });\n }", "title": "" }, { "docid": "4d2140e2091d33e82cf1e133cdf4d76c", "score": "0.6271588", "text": "function add_item(button, app) {\n let item = new PopupMenu.PopupBaseMenuItem;\n button.menu.addMenuItem(item);\n\n let box = new St.BoxLayout({vertical: false,\n\t\t\t\tpack_start: false,\n\t\t\t\tstyle_class: \"favorite-menu-box\"});\n item.addActor(box);\n let icon = app.create_icon_texture(24);\n box.add(icon);\n let label = new St.Label({text: app.get_name()});\n box.add(label);\n\n item.connect(\"activate\", function () {app.open_new_window(-1);});\n}", "title": "" }, { "docid": "4e6cf71937f7f05551b35e708a013d3f", "score": "0.6266083", "text": "add(){\n\t\titems.push(this);\n\t}", "title": "" }, { "docid": "ab3a26a57d88f90909708af45a9c252d", "score": "0.6237234", "text": "function makeNewItems (name, imgPath, votes, views){\n let newItem = new Item (name, imgPath, votes, views);\n Item.allItems.push(newItem);\n}", "title": "" }, { "docid": "29c86603eeb3f226130b391c173f1471", "score": "0.6205553", "text": "addItem(_item) { }", "title": "" }, { "docid": "d66996aed7d796e3c8918d961fb65b07", "score": "0.62048197", "text": "addItem(newItem) {\n this.items.add(newItem);\n this.itemNames.set(newItem.getName(), newItem);\n }", "title": "" }, { "docid": "111590dee27807049b0b3863e0cfcf7c", "score": "0.61785793", "text": "function pickUpItem(hero,object) {\n hero.inventory.push(object)\n return hero\n }", "title": "" }, { "docid": "5bbde04e0b65a7c3d9497aeb13ee261e", "score": "0.61720115", "text": "function createItem() {\n if (__DEVONLY__) $log.debug('NewItemFormController createItem');\n if (vm.pending) {\n if (__DEVONLY__) $log.warn('createItem pending, exiting ');\n return;\n }\n let infoAboutItemToPost = vm.newItem;\n vm.hideFormAndClearInputs();\n \n itemManager.postNewItem(infoAboutItemToPost, vm.list)\n .then((item) => {\n vm.resetForm();\n // $scope.$apply();\n })\n .catch((err) => {\n if (__DEVONLY__) $log.error('createItem: ', err);\n vm.error = err;\n });\n }", "title": "" }, { "docid": "836f3863eda68138e982a7afe5b513d0", "score": "0.61695564", "text": "addToInventory (pItem) {\r\n console.info('Pickup called in player')\r\n this.Inventory.addToInventory(pItem)\r\n }", "title": "" }, { "docid": "16de1f49b8d1b1ed730883eb595a43a7", "score": "0.61476433", "text": "addItem(item){\n //create div\n const div = document.createElement('div');\n //add class\n div.className = 'box';\n //add id\n div.setAttribute(\"id\", `${item.id}`)\n //append text\n div.innerHTML = `\n <p>${item.innerHTML}</p>\n <a href=\"#\"><i class=\"fas fa-times\"></i></a> \n </div>\n `\n //insert div\n this.selected_1.insertBefore(div, this.end_1);\n }", "title": "" }, { "docid": "cf1ec3b59e2546a726022b2a4b26e351", "score": "0.61466765", "text": "function addItem() {\n\tAlloy.createController(\"reimburseDetailForm\").getView().open();\n}", "title": "" }, { "docid": "1c6829ff9142c4bd8d39c4795f73da14", "score": "0.6144401", "text": "function addItems() {\n items = game.add.physicsGroup();\n\n createItem(210, 325, 'letter1');\n createItem(80, 309, 'letter-blue');\n createItem(217, 229, 'letter-blue');\n createItem(80, 136, 'letter-blue');\n createItem(257, 67, 'letter2');\n}", "title": "" }, { "docid": "24ff489a0e9601b763183e2a36424ffc", "score": "0.6143363", "text": "function addItem(){\n\n\n \n\n}", "title": "" }, { "docid": "e825bb5cb304fe663e03adcbd593bf84", "score": "0.6142585", "text": "function createNewItem(){\n\t\t\taddItemButton.style.display = 'none';\n\t\t\t//selectDropdown.style = 'display: block;';\n\t\t\taddItemInput.style = 'display: block;';\n\t\t\taddItemSubmit.style = 'display: block;';\n\t\t\taddItemCancel.style = 'display: block;';\n\t\t\t//listTaskLists();\n\t\t}", "title": "" }, { "docid": "6eff9274debe273e2ad7a4428e1b7357", "score": "0.6134136", "text": "function AddPlayerItemFromID(id)\n{\n var item = GetItemFromID(id);\n playerItems.Items.push(item);\n\n}", "title": "" }, { "docid": "7718bf6d201a82ba59fc0a4a7c58dca5", "score": "0.6127945", "text": "function createItems(left, top, image){\n var item = items.create(left, top, image);\n item.animations.add('spin');\n item.animations.play('spin', 8, true);\n}", "title": "" }, { "docid": "8ca608a2931570edb6f8b89cd4b36108", "score": "0.61258906", "text": "function add(item) {\n repository.push(item);\n }", "title": "" }, { "docid": "dd748b3516b56d3bd146cec55ad4b783", "score": "0.612058", "text": "addItem(itemName, quantity, price) {\n this.items.push({\n name: itemName,\n quantity: quantity,\n pricePerUnit: price\n });\n }", "title": "" }, { "docid": "34b5db31204fb93b7e5281571b712b01", "score": "0.612038", "text": "function createItem(item) {\n let li = createHtmlElement('li');\n let img = createHtmlElement('img');\n let sectionf = createHtmlElement('section');\n let sections = createHtmlElement('section');\n let pf = createHtmlElement('p');\n let ps = createHtmlElement('p');\n let button = createHtmlElement('button');\n \n let type = document.createTextNode(`${item.name}`);\n let price = document.createTextNode(\"R$ \" + item.price + \",00\");\n let btn = document.createTextNode(\"Ver mais\");\n \n $(li).attr(\"class\", \"cards-item\");\n $(img).attr(\"src\", item.photo);\n $(img).attr(\"class\", \"photo\");\n $(sectionf).attr(\"class\", \"card\");\n $(sections).attr(\"class\", \"card-content\");\n $(pf).attr(\"class\", \"card-type\");\n $(ps).attr(\"class\", \"card-price\");\n $(button).attr(\"class\", \"button\");\n \n li.appendChild(sectionf);\n sectionf.appendChild(img);\n sectionf.appendChild(sections);\n sections.appendChild(pf);\n sections.appendChild(ps);\n sections.appendChild(button);\n pf.appendChild(type);\n ps.appendChild(price);\n button.appendChild(btn);\n \n return li;\n}", "title": "" }, { "docid": "4a6e09cef362e891e8d92528249d6d4b", "score": "0.6118898", "text": "createItems(e) {\n e.preventDefault()\n\n const loader = document.createElement('div')\n loader.className = 'loader'\n e.target.parentElement.appendChild(loader)\n\n const [name, price, quantity, _] = e.target.querySelectorAll('input')\n const itemName = name.value\n const itemPrice = price.value\n const itemQuantity = quantity.value\n const storeId = e.target.dataset.id\n\n this.itemsAdapter.createItem(itemName, itemPrice, itemQuantity, storeId).then(item => {\n const store = this.stores.find(s => s.id == storeId)\n e.target.parentElement.removeChild(loader)\n store.items.push(new Item(item))\n e.target.hidden = true\n this.renderStore()\n })\n }", "title": "" }, { "docid": "40c75a9c713e01616504df6f99a11d97", "score": "0.61175287", "text": "function addItemToInventory(item) {\n\tif (inventory.length === 0) {\n\t\tinventory.push(item);\n\t} else {\n\t\tinventory.push(item);\n\t}\n}", "title": "" }, { "docid": "54e5dea351ace89de88e8f91982ca251", "score": "0.61104465", "text": "function addLikedItem(item) {\n\n\tlet key = 'requestDrawerMenu' + ConfigApp.version;\n\titem = {\n thumb: \"lighthouse_bass\",\n index: 6,\n label: \"Bass Harbor Head Station, Maine\"\n\t};\n\t\n\tAsyncStorage.getItem(key).then((value) => {\n \n if(value !== null) {\n\n let data = JSON.parse(value);\n\n \tdata.items.push(item);\n\n \tAsyncStorage.setItem(key, JSON.stringify(data));\n } else {\n\n\n }\n });\n\n}", "title": "" }, { "docid": "26d7c578a8ad999e5efd68091db97703", "score": "0.6099371", "text": "function addItem(itemName, isDone = false) {\n // If the input is not empty then add an item into the list else display the alert\n if(itemName && itemName != '') {\n var item = new Universal(isDone, itemName);\n item.displayIt();\n playSound('added');\n }\n}", "title": "" }, { "docid": "51348c566c6d975e03da68a18e9b506c", "score": "0.6097798", "text": "function createItem(id, value) {\n\t// Create new element\n\tconst item = document.createElement(\"div\");\n\t// add a class\n\titem.className = \"item\";\n\t// add a data-id attribute\n\titem.setAttribute(\"data-id\", id);\n\t// add html\n\titem.innerHTML = `\n <p class=\"itemName\">${value}</p>\n <div class=\"btn-group\">\n <button class=\"editBtn\" title='Edit item'>\n <i class=\"fas fa-edit\"></i>\n </button>\n <button class=\"deleteBtn\" title='Remove item'>\n <i class=\"fas fa-trash\"></i>\n </button>\n </div>`;\n\n\t// append to itemsContainer to display in DOM\n\titemsContainer.appendChild(item);\n\n\t// item elements\n\tconst editBtn = item.querySelector(\".editBtn\");\n\tconst deleteBtn = item.querySelector(\".deleteBtn\");\n\n\t/* Event listeners */\n\t// edit item\n\teditBtn.addEventListener(\"click\", editItem);\n\t// remove item\n\tdeleteBtn.addEventListener(\"click\", removeItem);\n}", "title": "" }, { "docid": "e27b8f497120b2b87c7b3c6a05055dce", "score": "0.6093044", "text": "static addItem(item, toAdd) {\n if (toAdd._id) toAdd = toAdd._id\n\n let itemIndex = item._meta.items.indexOf(toAdd)\n if (itemIndex > -1) return\n\n let newItem = { ...item }\n let newMeta = { ...newItem._meta }\n let newItems = [...newItem._meta.items]\n newItems.push(toAdd)\n newMeta.items = newItems\n newMeta.modifiedOn = Date.now()\n newItem._meta = newMeta\n\n return newItem\n }", "title": "" }, { "docid": "01d199ce568388be3a1dab949065067c", "score": "0.60913855", "text": "function addItem(e) {\n e.preventDefault();\n\n let el = document.createElement('div');\n\n el.className = 'item';\n el.id = `div${elementsCount() + 1}`;\n el.innerHTML = `Div #${elementsCount() + 1}`;\n el.setAttribute('draggable', 'true');\n\n setElementListeners(el);\n getContainer().appendChild(el);\n saveState();\n}", "title": "" }, { "docid": "2981ff67bf5d0ebb144de7b76dda1bfb", "score": "0.6091286", "text": "function createNewItem(){\n\n // We select the section containing all items generated using the class\n // \"items-list\"\n var itemsList = document.getElementById('items-list');\n\n // Here, we generate an HTMLCollection that consists of all item rows.\n // We then pull the length of the list.\n var itemRowsLength = itemsList.getElementsByClassName('item').length;\n\n // We dynamically determine the last item row by subtracting one from the\n // total length of items, yielding us the last item row.\n var lastItemRow = itemsList.getElementsByClassName('item')[itemRowsLength-1];\n\n // We pull the value from the 'new-item-name' input.\n var itemName = document.getElementById('new-item-name').value;\n\n // We pull the value from the 'new-item-unit-price' input.\n var itemUnitPrice = document.getElementById('new-item-unit-price').value;\n\n // We use \"createNewItemRow\" to generate a full product row based on\n // the name and price specified\n var itemRow = createNewItemRow(itemName, itemUnitPrice);\n\n // Finally, we append the fully generated item row to the last place\n // in the vertical list of items.\n itemsList.insertBefore(itemRow, lastItemRow);\n }", "title": "" }, { "docid": "73b8dbc797204fd349e3483367ebcb21", "score": "0.60901463", "text": "onAddNewItem() {\n this.selectedItem = {\n title: null,\n description: null,\n price: null,\n close_dt: null\n };\n this.mode = _item__WEBPACK_IMPORTED_MODULE_5__[\"MainView\"].ItemAddNew;\n }", "title": "" }, { "docid": "2e9cd0bdc97d516cc5d468d714e2af6e", "score": "0.6089441", "text": "function addItem() {\n console.log(\"new item added\");\n}", "title": "" }, { "docid": "14dac5fec59c940d4685e63d180821ad", "score": "0.608699", "text": "function create() {\n if (_this.status === 'uninitialized') {\n _this.status = 'initialized';\n _this.showItem({itemId: 'main'});\n }\n var Main = require(\"exercise/Main\");\n Main.setActiveExercise(_this);\n }", "title": "" }, { "docid": "83a388e44a5c6f1b61a3a992c037cee3", "score": "0.6084801", "text": "addItem(state, item) {\n\t\t\titem.id = state.items.reduce((acc, val) => acc > val.id ? acc : val.id, 0) + 1;\n\t\t\titem.timestamp = formatTime(Date.now());\n\t\t\titem.done = false;\n\n\t\t\tstate.items.unshift(item);\n\t\t\tthis.dispatch(\"saveData\");\n\t\t}", "title": "" }, { "docid": "90153e13c584c63daf97b95a545ebd6e", "score": "0.6080176", "text": "function addToOrder(item){\n\tif(!showOrderList) toggleOrderDisplay();\n\torder.push(item);\n\tvar newItem = document.createElement('section');\n\tnewItem.classList.add('orderItem');\n\tvar newItemImg = document.createElement('img');\n\tnewItemImg.src = item.url;\n\tvar newItemName = document.createElement('span');\n\tnewItemName.textContent = item.name;\n\tvar newItemPrice = document.createElement('span');\n\tnewItemPrice.textContent = item.price;\n\tvar closeButton = document.createElement('button');\n\tcloseButton.textContent = \"x\";\n\tcloseButton.addEventListener('click',removeFromOrder);\n\tnewItem.appendChild(newItemImg); newItem.appendChild(closeButton); newItem.appendChild(newItemName); newItem.appendChild(newItemPrice); \n\torderList.appendChild(newItem);\n\t\n\tupdatePlaceOrderButton(item.price, 1);\n}", "title": "" }, { "docid": "7c7504787cade01fe917ce21b2fa09ce", "score": "0.60731006", "text": "function addObject(item,x,y) {\n if (item.type == 'static'){\n statics.push(new staticObj({x:x,y:y},item.dim,{shape:'quadrilateral'}))\n } else if (item.type == 'dynamic') {\n if (item.shape =='e' || item.shape == \"ellipse\") {\n movers.push(new dynObj(\n {x:x,y:y},\n {diam:item.dim.diam},\n {u:item.suvat.u,a:item.suvat.a},\n {mass:item.mass, efficiency:collisionEfficiency, shape:'ellipse', start:{x:x,y:y}}\n ))\n } else if (item.shape == 'q' || item.shape == \"quadrilateral\"){\n movers.push(new dynObj(\n {x:x,y:y},\n {x:item.dim.x,y:item.dim.y},\n {u:item.suvat.u,a:item.suvat.a},\n {mass:item.mass, efficiency:collisionEfficiency, shape:'quadrilateral', start:{x:x,y:y}}\n ))\n }\n }\n}", "title": "" }, { "docid": "325dd172ca7cd103726c429b9f5610de", "score": "0.60728145", "text": "function addItem(item) {\n // Thumbnails go from most recent to least recent.\n items.unshift(item);\n\n // Create an image element for this new thumbnail and display it\n item.element = new Image();\n item.element.src = URL.createObjectURL(item.thumbnail);\n item.element.classList.add('thumbnail');\n filmstrip.insertBefore(item.element, filmstrip.firstElementChild);\n\n // If we have too many thumbnails now, remove the oldest one from\n // the array, and remove its element from the filmstrip and release\n // its blob url\n if (items.length > MAX_THUMBNAILS) {\n var oldest = items.pop();\n filmstrip.removeChild(oldest.element);\n URL.revokeObjectURL(oldest.element.src);\n }\n\n // Now update the index associated with each of the remaining elements\n // so that the click event handle knows which one it clicked on\n items.forEach(function(item, index) {\n item.element.dataset.index = index;\n });\n }", "title": "" }, { "docid": "18cb71d584046e740da7c51d301583e1", "score": "0.60574234", "text": "function addItemToShoppingList(itemName){\n STORE.items.push({name: itemName, checked: false, id: cuid(), edit:false});\n}", "title": "" }, { "docid": "4cf681dcddc501fbe747bdd5c40ed581", "score": "0.60564303", "text": "function addItem() {\n var d = new Date();\n toDoList.unshift(new ToDoItem(inputText, d));\n mainInput.value = \"\";\n setInputWidth(mainInput, 100);\n mainInput.focus();\n inputText = \"\";\n saveToDoLocal();\n drawToDoList();\n}", "title": "" }, { "docid": "9a06e9429b4c37da608726cb0c9f0411", "score": "0.60514724", "text": "addItem(item){\n if(!this.searchItem(item)){\n console.log('Adding item to the inventory...');\n this.items.push(item);\n }else{\n console.log('The item already exists in the inventory');\n }\n }", "title": "" }, { "docid": "7e7905db9efbba9bda0fd4acfda96523", "score": "0.60466677", "text": "function add(item){\n _data.push(item);\n }", "title": "" }, { "docid": "20d1fa3ade0eccb680be52628d4f8989", "score": "0.60405266", "text": "function addItem(imgurl, center, scale) {\n\tvar id = newID();\n\t\n var item =\n { \n\tid: id\n\t, imgurl: imgurl\n , center: copyPoint(center)\n , scale: scale\n , selected: false\n , locked: false\n , faceDown: false };\n items.push(item);\n ensureItemImage(item);\n sortItems();\n return item;\n}", "title": "" }, { "docid": "9cd0e69625c93f7366190aee92107231", "score": "0.60288835", "text": "addNavigationItem(item, id) {\n // Get the current navigation\n const navigation = this.getCurrentNavigation();\n // Add to the end of the navigation\n if (id === 'end') {\n navigation.push(item);\n // Trigger the observable\n this._onNavigationItemAdded.next(true);\n return;\n }\n // Add to the start of the navigation\n if (id === 'start') {\n navigation.unshift(item);\n // Trigger the observable\n this._onNavigationItemAdded.next(true);\n return;\n }\n // Add it to a specific location\n const parent = this.getNavigationItem(id);\n if (parent) {\n // Check if parent has a children entry,\n // and add it if it doesn't\n if (!parent.children) {\n parent.children = [];\n }\n // Add the item\n parent.children.push(item);\n }\n // Trigger the observable\n this._onNavigationItemAdded.next(true);\n }", "title": "" }, { "docid": "9cd0e69625c93f7366190aee92107231", "score": "0.60288835", "text": "addNavigationItem(item, id) {\n // Get the current navigation\n const navigation = this.getCurrentNavigation();\n // Add to the end of the navigation\n if (id === 'end') {\n navigation.push(item);\n // Trigger the observable\n this._onNavigationItemAdded.next(true);\n return;\n }\n // Add to the start of the navigation\n if (id === 'start') {\n navigation.unshift(item);\n // Trigger the observable\n this._onNavigationItemAdded.next(true);\n return;\n }\n // Add it to a specific location\n const parent = this.getNavigationItem(id);\n if (parent) {\n // Check if parent has a children entry,\n // and add it if it doesn't\n if (!parent.children) {\n parent.children = [];\n }\n // Add the item\n parent.children.push(item);\n }\n // Trigger the observable\n this._onNavigationItemAdded.next(true);\n }", "title": "" }, { "docid": "a7af9664add36f7c54fbe52afe7a1f2b", "score": "0.6028613", "text": "function addItemToCategory (item, category, type) {\n\tlet container = document.createElement(\"div\");\n\tcontainer.classList.add(\"phrase-container-\"+type);\n\tcontainer.classList.add(\"phrase-container\");\n\t// TODO eventually give each data and HTML item a numerical, generated ID \n\t// so we don't need to worry about names with spaces, special characters,\n\t// or duplicate names.\n\tcontainer.id = item.id;\n\tcontainer.draggable = true;\n\tlet element = document.createElement(\"button\");\n\telement.classList.add(\"phrase\");\n\telement.classList.add(type);\n\tlet p = document.createElement(\"p\");\n\tp.innerHTML = item.name;\n\telement.append(p);\n\tupdatePhraseListeners(container,\"library\");\n\tcontainer.append(element);\n\tdocument.querySelector('#'+category).append(container);\n}", "title": "" }, { "docid": "a1afbdd74ed385288322485b2a43dea4", "score": "0.60218835", "text": "function addItems(name, price, img, id) {\n\n let item = {\n name: name,\n price: price,\n img: img,\n id: id\n }\n storeItems.push(item);\n\n}", "title": "" }, { "docid": "94540fb9ee21d6238e21916274ca56b7", "score": "0.60201985", "text": "function addItemToItems(itemElement) {\n items.insertAdjacentHTML('afterbegin', itemElement);\n\n slideInAddedItem(items.firstElementChild);\n}", "title": "" }, { "docid": "1f588b05eee69155901a9405dc7218f8", "score": "0.60136026", "text": "function addNewItemObjectToStore(newItem) {\n const newShoppingItemObj = { item: newItem, checked: false };\n store.items.push(newShoppingItemObj);\n}", "title": "" }, { "docid": "5e24924a203e9cbbfefc07cb1b69dcf9", "score": "0.5999947", "text": "function addItem() {\n todos.push(\n \t{\n \t\tcontent : addText.value,\n \t\tcompleted : false\n \t});\n addText.value = '';\n display();\n}", "title": "" }, { "docid": "54cc76147f40ba9d91bacf1d27855dab", "score": "0.59834933", "text": "function AddItems() {\n\tModPE.setItem(Bomb.StandardBomb, \"StandardBomb\", 0, \"普通の爆弾\", 1);\n\tModPE.setItem(Bomb.FireBomb, \"snowball\", 0, \"炎の爆弾\", 1);\n}", "title": "" }, { "docid": "b5577d2b645a0100c7a549068982def1", "score": "0.59814876", "text": "addItemByMetaData(metadata) {\n let itemMetaData = metadata;\n let item = new (0, _floorItem.FloorItem)(itemMetaData, this);\n if (itemMetaData.itemType === 1) this.__floorItems.push(item);\n this.__roomItems.push(item);\n this.dispatchEvent({\n type: (0, _eventsJs.EVENT_NEW_ITEM),\n item: item\n });\n }", "title": "" }, { "docid": "dd2fba23aef09ae2c67b3f2b1365c7a8", "score": "0.59743065", "text": "function addItemAt(xpos, ypos, text)\n\t\t{\n\t\t$('<h1 />').text(text).appendTo(\n\t\t\t\t$('<div />', {class: 'item'})\n\t\t\t\t\t\t\t\t\t.css('top', ypos+'px')\n\t\t\t\t\t\t\t\t\t.css('left', xpos+'px')\n\t\t\t\t\t\t\t\t\t.appendTo($('#presentation')\n\t\t\t\t\t)\n\t\t);\n\t\t\t\n\t\t}", "title": "" }, { "docid": "37cf18899fd2c01ae6a83d5f11009aea", "score": "0.5966159", "text": "addItem(item) {\n this.itemSet.unshift(item);\n }", "title": "" }, { "docid": "dbf50b247d363fd9ff4c38dd7b748649", "score": "0.5952587", "text": "addNode(node) {\n this.items.push(node);\n node.setLayer(this);\n }", "title": "" }, { "docid": "1b40f51fd96c261d28706f02fbde4c71", "score": "0.59476525", "text": "function addNewObjectToProject(object, type){\r\n //Set object in global object array\r\n objects[objects_count] = object;\r\n //Set object type\r\n objects_types[objects_count] = type;\r\n //Init object animation array\r\n //objects_anim[objects_count] = 0;\r\n selected_object = objects_count;\r\n objects_count++;\r\n //Add to scene and control\r\n scene.add( object );\r\n control.attach( object );\r\n showControlledObjectOptions();\r\n render();\r\n}", "title": "" }, { "docid": "66d45f372cb23cf4ea8e5c2281228d8a", "score": "0.59423023", "text": "addNewItem() {\n const itemName = ui.UISelectors.itemInput.value;\n\n if (itemName === '') {\n alert(\"Item input cannot be empty\");\n return;\n }\n\n let item = new ItemModel(itemName, 1, \"false\", 2);\n\n httplib.request('POST', this.apiUrl, item)\n .then(returnedJson => {\n item.id = returnedJson.id;\n ui.addItem(item);\n ui.UISelectors.itemInput.value = '';\n })\n .catch(error => console.log(error));\n }", "title": "" }, { "docid": "d3a7b3164897769dc322b31e1c54f579", "score": "0.5939185", "text": "function createItem(id, value) {\n const element = document.createElement(\"article\");\n element.classList.add(\"grocery-item\");\n const attr = document.createAttribute(\"data-id\");\n attr.value = id;\n element.setAttributeNode(attr);\n element.innerHTML = `\n <p class=\"title\">${value}</p>\n <div class=\"btn-container\">\n <button type=\"button\" class=\"edit-btn\">\n <i class=\"fas fa-edit\"></i>\n </button>\n <button type=\"button\" class=\"del-btn\">\n <i class=\"fas fa-trash\"></i>\n </button>\n </div>`;\n // access del-btn and edit-btn\n const delBtn = element.querySelector(\".del-btn\");\n const editBtn = element.querySelector(\".edit-btn\");\n delBtn.addEventListener(\"click\", delItem);\n editBtn.addEventListener(\"click\", editItem);\n\n list.appendChild(element);\n}", "title": "" }, { "docid": "af6f1dd5d2d315325748a7e3784ac5bb", "score": "0.5935926", "text": "function createItem() {\n console.log(\"items\", items);\n\n items.forEach((item, index) => {\n const itemDiv = createItemElement(item.isImportant, item.isComplete, index);\n itemDiv.appendChild(createItemText(item.item));\n itemDiv.appendChild(createImportantIcon());\n itemDiv.appendChild(createEditIcon());\n itemDiv.appendChild(createDeleteIcon());\n itemDiv.appendChild(createDoneIcon());\n\n results.appendChild(itemDiv);\n counter();\n });\n}", "title": "" }, { "docid": "2f40440ffa10b21fa1ec1a0ac961bfeb", "score": "0.5933371", "text": "addItem(item) {\n this.isEditing ? this.editData.push(item) : this.source.push(item);\n this.onDataChange(new CollectionEvent(CollectionEvent.ADD, [item]));\n this.refresh();\n }", "title": "" }, { "docid": "e71e2e7347b98e910a0908c0b9009098", "score": "0.59309953", "text": "function addItem (state, name) {\n\tvar item = {\n\t\titemName: name,\n\t\tchecked: false\n\t}\n\tstate.items.push(item);\n}", "title": "" }, { "docid": "221760fa9573c42fde758963bdaa2d6a", "score": "0.59216696", "text": "function pushItem(item) {\n // pushes item to array\n itemArray.push(item);\n \n storagePush(item);\n }", "title": "" }, { "docid": "d06db9d41eb9e915c5d7d7baf34e34ce", "score": "0.5916937", "text": "addItem(item) {\n\n // Get the entry of the image from the inventory list\n var details = inventoryItems.find(function(entry){return entry.title == item})\n\n // Check whether item is already in inventory\n var itemInInventory = $('#'+item+'-inventory').length\n\n if (itemInInventory == 0) {\n // Add the image to the modal \n $('#inventory-modal').find('.modal-body')\n .append($('<img class=\"img-fluid inventory-item '+details.useability+'\" id='+item+'-inventory src='+details.path+' alt='+item+'>')\n .attr('data-item',item)\n // Include an on-click method for that specific item\n .on(\"click\",function(){inventory.itemClicked($(this).attr('data-item'))})\n )\n }\n\n }", "title": "" }, { "docid": "ee5d59baf660654fd29565640f1b5ca8", "score": "0.59155506", "text": "function Scene_Item() {\n this.initialize(...arguments);\n}", "title": "" }, { "docid": "7d865f3bc318a3ef5c0b090979ebf408", "score": "0.5909142", "text": "push(item) {\n this.items.push(item);\n }", "title": "" }, { "docid": "31019cf94d5e21b3f4138b9429eb72c8", "score": "0.59062284", "text": "function AddItem(item) {\n var length = 1;\n var j = 0;\n var id = tids++;\n // var group = 03;\n// var start = options.start;\n var start = item.dt;\n var end = options.end;\n var content = item.content;\n for (; j < length;) {\n items.add([\n {\n id: id\n // , group: group\n \n , start: start\n , content: content\n }\n , ]);\n // items.remove(1);\n j++;\n }; // End For While Loop\n}", "title": "" }, { "docid": "4737b2fe35e1b447732b9b66098c00a7", "score": "0.58983034", "text": "addEntry() {\n firebaseApp.database().ref('/items').push({\n Title: this.state.Title,\n Colour: this.state.Colour,\n Description: this.state.Description,\n ImageURL: this.state.ImageURL,\n Price: this.state.Price,\n Size: this.state.Size,\n Type: this.state.Type\n });\n }", "title": "" }, { "docid": "37f5173400df378853ff7d03cb26f0a3", "score": "0.58939797", "text": "function Item() { }", "title": "" }, { "docid": "86f3a3c2cdc46c8a846b6b09ef53cb5e", "score": "0.5891889", "text": "addItem() {\n const item = {\n id: this.generateItemKey(),\n numberStructure: null,\n quantity: 0\n }\n const items = this.state.items.slice(0);\n items.push(item);\n this.setState({ items })\n }", "title": "" }, { "docid": "d8ea19c0c59d1bd2500f36bc0bf9ff20", "score": "0.58886474", "text": "static addItemToCart() {\n MenuStore.cart.push({\n item: MenuStore.activeItem,\n quantity: MenuStore.addCartItemForm.form.quantity,\n });\n }", "title": "" }, { "docid": "dbfa8d45ee4c0cc393a9ebc175e7a6e1", "score": "0.58879346", "text": "function createItem(id, value){\n //create tag 'article\n const element = document.createElement('article')\n //add class\n element.classList.add('grocery-item')\n //add id\n const attr = document.createAttribute('data-id')\n attr.value = id\n element.setAttributeNode(attr)\n //the same as element.setAttribute('data-id', id)\n element.innerHTML = ` <p class=\"title\">${value}</p>\n <div class=\"btn-container\">\n <button type='button' class=\"edit-btn\">\n <i class=\"fas fa-edit\"></i>\n </button>\n <button type='button' class=\"delete-btn\">\n <i class=\"fas fa-trash\"></i>\n </button>\n </div>`\n //add event listeners for delete and edit btns\n const deleteBtn = element.querySelector('.delete-btn')\n const editBtn = element.querySelector('.edit-btn')\n deleteBtn.addEventListener('click', deleteItem)\n editBtn.addEventListener('click', editItem)\n //append child\n list.appendChild(element)\n}", "title": "" }, { "docid": "4d5f8a1e3e7d149f48aa287ac833f2b2", "score": "0.58876646", "text": "add (object) {\n this.container.addChild(object)\n }", "title": "" }, { "docid": "2c46d72789d3dc086cf380397b074a03", "score": "0.5878934", "text": "addItem(node){\n var data = this.state.data;\n var worker = this.findObjectById(data, node.id, \"add\", data);\n worker.children.push({\n name: \"New\",\n id: v4(),\n children: []\n });\n this.setState({\n data: data,\n })\n this.saver(data);\n }", "title": "" }, { "docid": "58e4b8ffed323ca2541660a9a01bfbfb", "score": "0.58751506", "text": "function add(item) {\n const li = document.createElement('li');\n li.classList.add('item-collection');\n li.textContent = item;\n\n const i1 = document.createElement('i');\n i1.classList = 'far fa-edit';\n\n const i2 = document.createElement('i');\n i2.classList = 'fas fa-trash';\n\n const span = document.createElement('span');\n\n span.appendChild(i1);\n span.appendChild(i2);\n li.appendChild(span);\n\n ul.appendChild(li);\n}", "title": "" } ]
8f8fa477560b6d9b39b2fd68a15a4c85
For a directions route, returns the time it would take to traverse the route in seconds.
[ { "docid": "b97d3ed461ad4027ec8c4994994c30af", "score": "0.72935814", "text": "function getRouteDuration(route) {\n // For each route, display summary information.\n var routeDuration = 0;\n for (var i = 0; i < route.legs.length; i++) {\n \trouteDuration += route.legs[i].duration.value;\n }\t\t\t \n console.log(\"route length: \" + routeDuration + \" seconds\");\n return routeDuration;\n}", "title": "" } ]
[ { "docid": "422632b3f12cf76b1803129f1869f96f", "score": "0.73040694", "text": "function getRouteTraveltime() {\n if ((routes !== [])) {\n for (let i = 0; i < routes.length; i++) {\n if (routes[i].route === selectedRoute) {\n return `Estimated travel time: ${routes[i].traveltime}`;\n }\n }\n }\n return \"\";\n }", "title": "" }, { "docid": "61ca74a9ab04e86bcfd814040a0b4cf7", "score": "0.6647472", "text": "getTotalTravelTime(from, to) {\n // var dist = this.getDistanceInKm(\n // from.latitude,\n // from.longitude,\n // to.latitude,\n // to.longitude\n // );\n var totalTime =\n (Properties.STATION_HALT_TIME + Properties.TIME_BETWEEN_STATIONS) *\n this.getStationsBetween(from, to).length +\n Properties.TIME_BETWEEN_STATIONS/2;\n console.log(totalTime + \" sec\");\n \n return totalTime;\n }", "title": "" }, { "docid": "a6cc7bc6836349daf6fb4e9a44b9f32e", "score": "0.66071296", "text": "get timeTraveling() {\n //Using as distance stuff atm\n var time = this._time[this._time.length - 1] - this._time[0];\n return time/1000;\n }", "title": "" }, { "docid": "f4f3dd597855ee6ebfe7072a0d14f508", "score": "0.5942667", "text": "function getTransitTime(origin, destination, departure_time, functionToCall){\n var cache_driving_time = getTimeFromCache(origin, destination, google.maps.TravelMode.TRANSIT);\n if (cache_driving_time != null){\n // if already in cache\n functionToCall(cache_driving_time);\n }\n else{\n // if not in cache\n // make new directions request and store it in cache\n \n var request = {\n origin:origin,\n destination:destination,\n transitOptions: {departureTime: departure_time},\n travelMode: google.maps.DirectionsTravelMode.TRANSIT // this is the default type of directions shown on map\n };\n\n if (!isRequestOutstanding(origin, destination, google.maps.DirectionsTravelMode.TRANSIT)){\n addOutstandingRequest(origin, destination, google.maps.DirectionsTravelMode.TRANSIT);\n console.log(\"Making Google maps TRANSIT distance request. Origin:\" + origin + \" Destination:\" + destination);\n\n directionsService.route(request, \n\n function (response, status) {\n if (status == google.maps.DirectionsStatus.OK) {\n addDirectionsToCache(origin, destination, response);\n\n addTimeToCache(origin, destination, google.maps.TravelMode.TRANSIT, response.routes[0].legs[0].duration)\n functionToCall(response.routes[0].legs[0].duration); \n }\n else{\n if (status!=\"OVER_QUERY_LIMIT\")\n console.log(DIRECTIONS_NOT_FOUND_ERROR + \" (Errorcode - \" + status + \")\");\n else\n console.log(\"Query limit. Origin: \" + origin + \" Destination: \" + destination); \n }\n removeOutstandingRequest(origin, destination, google.maps.DirectionsTravelMode.TRANSIT); \n });\n }\n }\n}", "title": "" }, { "docid": "6836109d797a4b412ff472a227831c28", "score": "0.59295344", "text": "function getDistance(graph, route){\n var rd = new RouteDistances(graph);\n var distance = 0;\n for(var i=1; i<route.length; i++){\n var singleDist;\n singleDist = rd.directPathDistance(route[i-1], route[i]);\n if(singleDist === -1) return 'NO SUCH ROUTE';\n else distance = distance + parseInt(singleDist);\n }\n return distance;\n}", "title": "" }, { "docid": "4a2aaa5b084828e27efa611d66e09eaf", "score": "0.5919297", "text": "function getDistance(speed, time) {\n var result = speed * time;\n return result;\n}", "title": "" }, { "docid": "5d114d998091c08fb686f4ba5c4b70ef", "score": "0.5893638", "text": "function findShortDist(data) {\n var distArray = [];\n var routes = data.routes;\n for (i in data.routes) {\n leg = routes[i].legs;\n dist = 0;\n for (j in leg) {\n steps_1 = leg[j].steps;\n for (k in steps_1) {\n dist += steps_1[k].duration.value;\n }\n }\n distArray.push(dist);\n }\n //Using javascript mathematical function to find min of list of calculated time.\n fastRouteIndex = distArray.indexOf(Math.min.apply(null, distArray));\n console.log(\"Fast route time \" + Math.min.apply(null, distArray));\n console.log(\"Fast route index \" + fastRouteIndex);\n}", "title": "" }, { "docid": "25f69f21085846c2c52c374b40c18c76", "score": "0.58545166", "text": "function howLong(myTravelInfo) {\n\n let mySpeed = travelInformation.speed;\n let myDistance = travelInformation.distance;\n let resultInMinutes = myDistance * 60 / mySpeed; // common knowledge: if we cover 50 km in 60 mins, then we cover 432 km in 518,4 mins \n // console.log(`Your journey will take ${resultInMinutes} minutes`); \n\n // formatting: https://www.w3resource.com/javascript-exercises/javascript-date-exercise-13.php\n let hours = (resultInMinutes / 60); let rhours = Math.floor(hours);\n let minutes = (hours - rhours) * 60; let rminutes = Math.round(minutes);\n\n console.log(`Your journey will take ${rhours} hour(s) and ${rminutes} minute(s)`);// <--- final result\n\n}", "title": "" }, { "docid": "343ddce96c6fb54dfc90ac05aef6dfb1", "score": "0.57959723", "text": "function elapsedTime(flow)\n{\n var millis = 0;\n if (flow.$.return == '-1') // This flow has a finite time and returns\n {\n var units = flow.units[0].unit;\n units.forEach(function (unit)\n {\n var pageName = unit.$.main;\n var steps = pageData[pageName].steps[0].step;\n var lastFrame = Number(steps[steps.length - 1].$.frame);\n millis += (lastFrame * MILLIS_PER_FRAME + UNIT_PADDING_TIME) * unit.$.exitSpeed * unit.$.loop;\n millis += RECOVERY_TIME;\n });\n }\n return millis;\n}", "title": "" }, { "docid": "5caee2c92b4f3d20005bf81e5b4bfb4d", "score": "0.57796675", "text": "function get_game_duration() {\n if (timer > 0) {\n return Math.round((window.performance.now() - timer)/1000)\n } else {\n return 0\n }\n }", "title": "" }, { "docid": "16e038ad8771b308c9a57515d9436388", "score": "0.5768331", "text": "function computeTotals(result) {\n var meters = 0;\n var seconds = 0;\n var myroute = result.routes[0];\n for (i = 0; i < myroute.legs.length; i++) {\n meters += myroute.legs[i].distance.value;\n seconds += myroute.legs[i].duration.value;\n }\n\n if (Drupal.settings.getdirections.show_distance) {\n distance = meters * 0.001;\n if (unitsys == 'imperial') {\n distance = distance * 0.6214;\n distance = distance.toFixed(2) + ' mi';\n }\n else {\n distance = distance.toFixed(2) + ' km';\n }\n $(\"#getdirections_show_distance\").html(Drupal.settings.getdirections.show_distance + ': ' + distance);\n }\n\n if (Drupal.settings.getdirections.show_duration) {\n mins = seconds * 0.016666667;\n minutes = mins.toFixed(0);\n // hours\n hours = 0;\n while (minutes >= 60 ) {\n minutes = minutes - 60;\n hours++;\n }\n // days\n days = 0;\n while (hours >= 24) {\n hours = hours - 24;\n days++;\n }\n duration = '';\n if (days > 0) {\n duration += Drupal.formatPlural(days, '1 day', '@count days') + ' ';\n }\n if (hours > 0) {\n //duration += hours + ' ' + (hours > 1 ? 'hours' : 'hour') + ' ';\n duration += Drupal.formatPlural(hours, '1 hour', '@count hours') + ' ';\n }\n if (minutes > 0) {\n //duration += minutes + ' ' + (minutes > 1 ? 'minutes' : 'minute');\n duration += Drupal.formatPlural(minutes, '1 minute', '@count minutes');\n }\n if (seconds < 60) {\n duration = Drupal.t('About 1 minute');\n }\n $(\"#getdirections_show_duration\").html(Drupal.settings.getdirections.show_duration + ': ' + duration );\n }\n }", "title": "" }, { "docid": "964e81c7f97f356a53b3ce463be6b526", "score": "0.57539356", "text": "async getArrivalTime(rideInfo){\n const { startAddr, endAddr } = rideInfo;\n const startLoc = await getGeocodingData(startAddr);\n const endLoc = await getGeocodingData(endAddr);\n const directions = await getRoute(startLoc, endLoc);\n return [ \n directions.routes[0].legs[0].duration.value,\n startLoc,\n endLoc\n ]\n }", "title": "" }, { "docid": "0b059f7f39483da903ca020f775a7de7", "score": "0.572177", "text": "getTime(firstLat, firstLong, secondLat, secondLong, index) {\n let getDirections = new google.maps.DirectionsService();\n let requestObject = {\n origin: firstLat + \",\" + firstLong,\n destination: secondLat + \",\" + secondLong,\n travelMode: \"DRIVING\"\n };\n getDirections.route(requestObject, function(response){\n $(\"#travel\" + index).html(`\n <div class='chip'>\n <i class=\"tiny material-icons nomargin\">airport_shuttle</i>\n ${response.routes[0].legs[0].duration.text}\n </div>\n `);\n });\n }", "title": "" }, { "docid": "4ae837c0493522a6d2d754f161302b22", "score": "0.5703179", "text": "function getTravelTime(longitude, latitude) {\n\n var urlMapBox = \"https://api.mapbox.com/directions/v5/mapbox/driving/\"\n\n var request2 = urlMapBox + longitude + ',' + latitude + ';-80.65, 28.56?geometries=geojson&access_token=' + mapboxgl.accessToken;\n\n fetch(request2).then(function(response) {\n if(!response.ok) {\n throw Error(response.statusText);\n }\n return response.json();\n })\n .then(function(response) {\n console.log(response);\n\n var seconds = response.routes[0].duration;\n var minutes = Math.round(seconds/60);\n\n if(minutes > 59) {\n hours = Math.floor(minutes/60);\n document.getElementById('travelTime').innerHTML = 'Travel Time: ' + hours + 'h';\n }\n else {\n document.getElementById('travelTime').innerHTML = 'Travel Time: ' + minutes + 'min';\n }\n })\n // I disabled the error message, otherwise it would put out an error each time you click overseas\n}", "title": "" }, { "docid": "8fe84f0ee247777888cdaa0156e1dae7", "score": "0.56953204", "text": "function detect_latency(tt) {\n var adjusted_time = utils.rnow() - TIME_DRIFT;\n return adjusted_time - tt / 10000;\n }", "title": "" }, { "docid": "bd9c17c2aeb1f9ae4ad852df3dd2bc21", "score": "0.5692665", "text": "function getTimeFromCache(origin, destination, type){\n for (var i in directions_cache){\n var cache_entry = directions_cache[i];\n if (origin.equals(cache_entry.origin) && destination.equals(cache_entry.destination)){\n if (type == google.maps.TravelMode.WALKING){\n if (cache_entry.time.walking != null)\n return cache_entry.time.walking\n }\n if (type == google.maps.TravelMode.DRIVING){\n if (cache_entry.time.driving != null)\n return cache_entry.time.driving\n }\n if (type == google.maps.TravelMode.TRANSIT){\n if (cache_entry.time.transit != null)\n return cache_entry.time.transit\n }\n }\n }\n return null;\n}", "title": "" }, { "docid": "ee0baf5375e0bc8bc9721ffc673c4c70", "score": "0.5677675", "text": "function TravelTimeRoute (json) {\n /** @member {int} TravelTimeID Unique ID that is specific to a route. */\n this.TravelTimeID = json ? getNumberOrNull(json.TravelTimeID) : null\n /** @member {string} Name A friendly name for the route. */\n this.Name = json ? json.Name || null : null\n /** @member {string} Description A description for the route. */\n this.Description = json ? json.Description || null : null\n /** @member {DateTime} TimeUpdated The last time that the data for this route was updated. */\n this.TimeUpdated = json ? parseDate(json.TimeUpdated) : null\n /** @member {RoadwayLocation} StartPoint The location where this route begins. */\n this.StartPoint = json ? RoadwayLocation.toRoadwayLocation(json.StartPoint) : null\n /** @member {RoadwayLocation} EndPoint The location where this route ends. */\n this.EndPoint = json ? RoadwayLocation.toRoadwayLocation(json.EndPoint) : null\n /** @member {decimal} Distance Total distance of this route in miles. */\n this.Distance = json ? getNumberOrNull(json.Distance) : null\n /** @member {int} AverageTime The average time in minutes that it takes to complete this route. */\n this.AverageTime = json ? getNumberOrNull(json.AverageTime) : null\n /** @member {int} CurrentTime The current estimated time in minutes that it takes to complete this route. */\n this.CurrentTime = json ? getNumberOrNull(json.CurrentTime) : null\n }", "title": "" }, { "docid": "b82e3c533037e22423faeb534e3fae2b", "score": "0.56714594", "text": "function detect_latency(tt) {\n var adjusted_time = rnow() - TIME_DRIFT;\n return adjusted_time - tt / 10000;\n }", "title": "" }, { "docid": "ebb2eca73dfc27fa5e7478366aa5755d", "score": "0.56388175", "text": "function elapsedTimeInSecondsToTransferPage() {\n\tvar timeForTransmission = timeStart - timeRenderEnd;\n\treturn timeForTransmission;\n}", "title": "" }, { "docid": "58560b696dac786395b5e2d4f24760e5", "score": "0.56379485", "text": "function findRouteDist(cities, route){\r\n var distance = 0;\r\n for (var i = 0; i < route.length - 1; i++){\r\n distance = distance + cities[route[i]][route[i + 1]];\r\n }\r\n return distance;\r\n}", "title": "" }, { "docid": "ed1145e879c11082830e90c351ff6bbb", "score": "0.5622734", "text": "function getElapsedTime(){\n\t\treturn performance.now() - _start;\n\t}", "title": "" }, { "docid": "75e216edbec9e08d0e0712a4a5d14427", "score": "0.5577142", "text": "calcSpeed(){\n this.speed = this.distance / (this.duration / 60); //Convert to hr\n return this.speed;\n }", "title": "" }, { "docid": "17e0a3d7c7d4121a624c563a19ce286c", "score": "0.55660164", "text": "function getTravelTimeBetween(start, end, method) {\n // TODO: Replace this with API call to google distance matrix to get actual travel time\n const distance = haversineDistance(start, [end])[0]\n const speed = { 'car': 40, 'bicycle': 10, 'foot': 3, 'public': 30 }[method]\n return speed / distance\n}", "title": "" }, { "docid": "d92eccaf4f30a42edf19e6847704c20d", "score": "0.5552748", "text": "function calculateTimeout() {\n return __.sec2ms(_loopTimeToNextStep - _context.currentTime - (__.ms2sec(_loopInterval * _loopTolerance)));\n}", "title": "" }, { "docid": "36d66b40aef7a39cd6812042be0309dc", "score": "0.5530461", "text": "function getWalkingTime(origin, destination, functionToCall){\n var cache_walking_time = getTimeFromCache(origin, destination, google.maps.TravelMode.WALKING);\n if (cache_walking_time != null){\n // if already in cache\n functionToCall(cache_walking_time);\n }\n else{\n // if not in cache\n var service = new google.maps.DistanceMatrixService();\n\n if (!isRequestOutstanding(origin, destination, google.maps.DirectionsTravelMode.WALKING)){\n addOutstandingRequest(origin, destination, google.maps.DirectionsTravelMode.WALKING);\n console.log(\"Making Google maps WALKING distance request. Origin:\" + origin + \" Destination:\" + destination);\n \n service.getDistanceMatrix(\n {\n origins: [origin],\n destinations: [destination],\n travelMode: google.maps.TravelMode.WALKING,\n avoidHighways: false,\n avoidTolls: false\n }, \n\n function (response, status) {\n if (status == google.maps.DistanceMatrixStatus.OK) {\n addTimeToCache(origin, destination, google.maps.TravelMode.WALKING, response.rows[0].elements[0].duration)\n functionToCall(response.rows[0].elements[0].duration);\n }\n else{\n if (status!=\"OVER_QUERY_LIMIT\") \n console.log(DIRECTIONS_NOT_FOUND_ERROR + \" (Errorcode - \" + status + \")\");\n else\n console.log(\"Query limit. Origin: \" + origin + \" Destination: \" + destination); \n }\n removeOutstandingRequest(origin, destination, google.maps.DirectionsTravelMode.WALKING); \n });\n }\n }\n}", "title": "" }, { "docid": "68f08a43ae2d96fbbc31b5849243f43d", "score": "0.5490542", "text": "function replaceRouteTravelTime(route, routeEstimations) {\n if (\n !route.hasChildNodes() ||\n !route.children[0].classList.contains(\"adp-summary-duration\")\n ) {\n displayErrorMessageToUser();\n return;\n }\n const routeDurationDiv = route.children[0];\n routeDurationDiv.innerText = routeEstimations.route_duration;\n const routeInitalTime = route.children[2].children[0];\n routeInitalTime.innerText = routeEstimations.journey_starts;\n const routeEndTime = route.children[2].children[1];\n routeEndTime.innerText = routeEstimations.journey_ends;\n}", "title": "" }, { "docid": "e97368bd587c88a21da9ba0234bfd223", "score": "0.5469094", "text": "function getDistanceAndTime() {\n //\n // <td class=\"timedist ul\" align=\"right\" nowrap=\"nowrap\">3.4\n // this sucks, I'll replace with xpath later\n //\n tds = document.getElementsByTagName(\"td\");\n if (!tds || tds.length == 0) return;\n td = 0;\n for (i in tds) {\n if (tds[i].className && tds[i].className.match(/timedist/)) {\n td = tds[i];\n break;\n }\n }\n if (!td) return;\n dist = -1;\n time = -1;\n //\n // 3.4&nbsp;mi&nbsp;(about&nbsp;15 mins)\n //\n if (td.innerHTML) {\n if (res = td.innerHTML.match(/^([^&]+)&/)) {\n dist = res[1];\n }\n if (res = td.innerHTML.match(/\\(.*;(\\d[^\\)]+)\\)/)) {\n timeStr = res[1];\n time = convertTimeToMinutes(timeStr);\n }\n } \n return [dist,time];\n}", "title": "" }, { "docid": "6688ac620a61630babb5a7375c0db160", "score": "0.5436984", "text": "calcSpeed(prevTimestamp, newTimestamp, distance) {\n //get delta time in milliseconds\n const unix_time = new Date(newTimestamp).getTime() - new Date(prevTimestamp).getTime()\n \n var speed = 0\n if(distance != 0){\n //speed = distance / time\n speed = distance / ((((unix_time)/1000)/60)/60) //convert to km/hr\n }\n\n return speed\n }", "title": "" }, { "docid": "7e55da77467dd41d899080264fc5e341", "score": "0.54287624", "text": "calcSpeed() {\n // km/hr\n this.speed = this.distance / (this.duration / 60);\n return this.speed;\n }", "title": "" }, { "docid": "40a8121cda57e8494ed6e1b8b93b5a36", "score": "0.54275334", "text": "function timeflow(time, speedoftime){\n if (frameCount % (speedoftime * 60) == 0){\n //colorLocations();\n return time += 1;\n } else {\n return time\n }\n }", "title": "" }, { "docid": "01269d2d19663b62660a4b792d9b09ed", "score": "0.5408189", "text": "getPassDuration(recap) {\n if (recap.passingYards() >= 0.4) {\n return 1.4;\n } else if (recap.passingYards() >= 0.3) {\n return 1.2;\n } else if (recap.passingYards() >= 0.2) {\n return 1;\n }\n\n return 0.6;\n }", "title": "" }, { "docid": "e5ab3d7fc3bc94e4309c957a946c76ff", "score": "0.54034185", "text": "function elapsed() {\r\n\tvar thisDate = new Date();\r\n\tvar thisTime = thisDate.getTime();\r\n\treturn ((thisTime - startTime) / 1000)\r\n}", "title": "" }, { "docid": "9368d17169cd2d094d28de4875aacd76", "score": "0.5363455", "text": "function getDrivingTime(origin, destination, functionToCall){\n var cache_driving_time = getTimeFromCache(origin, destination, google.maps.TravelMode.DRIVING);\n if (cache_driving_time != null){\n // if already in cache\n functionToCall(cache_driving_time);\n }\n else{\n // if not in cache\n var service = new google.maps.DistanceMatrixService();\n\n if (!isRequestOutstanding(origin, destination, google.maps.DirectionsTravelMode.DRIVING)){\n addOutstandingRequest(origin, destination, google.maps.DirectionsTravelMode.DRIVING);\n console.log(\"Making Google maps DRIVING distance request. Origin:\" + origin + \" Destination:\" + destination);\n\n service.getDistanceMatrix(\n {\n origins: [origin],\n destinations: [destination],\n travelMode: google.maps.TravelMode.DRIVING,\n avoidHighways: false,\n avoidTolls: false\n }, \n\n function (response, status) {\n if (status == google.maps.DistanceMatrixStatus.OK) {\n addTimeToCache(origin, destination, google.maps.TravelMode.DRIVING, response.rows[0].elements[0].duration)\n functionToCall(response.rows[0].elements[0].duration);\n }\n else{\n if (status!=\"OVER_QUERY_LIMIT\") \n console.log(DIRECTIONS_NOT_FOUND_ERROR + \" (Errorcode - \" + status + \")\");\n else\n console.log(\"Query limit. Origin: \" + origin + \" Destination: \" + destination); \n }\n removeOutstandingRequest(origin, destination, google.maps.DirectionsTravelMode.DRIVING); \n });\n }\n }\n}", "title": "" }, { "docid": "c488430e2429e2c555e2aea66a63d481", "score": "0.5334034", "text": "getDistanceOfSpecificRoute (pathArray) {\n var totalDistance = 0\n for (var i = 1; i < pathArray.length; i++) {\n var startIndex = this.getIndex(pathArray[i - 1])\n var endIndex = this.getIndex(pathArray[i])\n var weight = this.adjacencyMatrix[startIndex][endIndex]\n if (weight === undefined) return null\n totalDistance += this.adjacencyMatrix[startIndex][endIndex]\n }\n return totalDistance\n }", "title": "" }, { "docid": "ec9eab064965f8397cb46bf72c00bf15", "score": "0.53222317", "text": "function measureTime(legs) {\n return legs.reduce((time, leg) => time + leg.time, 0);\n}", "title": "" }, { "docid": "76cd89d1250e745290c1ab2bc3edd60b", "score": "0.5283156", "text": "function distanceTravelledInFeet(start, destination){\n if (start > destination){\n return ((start - destination) * 264)\n } else if (destination > start){\n return ((destination - start) * 264)\n}}", "title": "" }, { "docid": "f47ad47126eebf5cc7d6c6bf49a2a9c8", "score": "0.52691066", "text": "function elapsed(time) {\n // order time calculation\n time /= 1000;\n var seconds = Math.round(time);\n if(seconds >= 60 * 60) {\n let hours = Math.round(seconds / (60 * 60));\n if(hours == 1) return `${hours} hours`;\n else return `${hours} hour`;\n }\n else if(seconds >= 60) {\n let minutes = Math.round(seconds / 60);\n if(minutes == 1) return `${minutes} minute`;\n else return `${minutes} minutes`;\n }\n else {\n return `${seconds} seconds`;\n }\n}", "title": "" }, { "docid": "a3b2d8bffad0aa7edaf37e25d7378f85", "score": "0.52664304", "text": "function estimatedServerTime() {\n\treturn Date.now() + offset\n}", "title": "" }, { "docid": "74a9e32b6185768f51d2a4a06abefef0", "score": "0.525106", "text": "function getWaitingTime(step, callback) {\n\n if (step.travel_mode == \"TRANSIT\" && step.transit_details.type == \"Tram\") {\n request.getRTPI('LUAS', step, callback);\n }\n else if (step.travel_mode == \"TRANSIT\" && step.transit_details.type == \"Bus\") {\n request.getRTPI('BUS', step, callback);\n }\n else if (step.travel_mode == \"TRANSIT\" && step.transit_details.type == \"Train\" && step.transit_details.name == \"Dart\") {\n request.getRTPI('DART',step, callback);\n }\n else if (step.travel_mode == \"MOCK\" && step.transit_details.type == \"Tram\") {\n request.getMockRTPI('luas', callback);\n }\n else if (step.travel_mode == \"MOCK\" && step.transit_details.type == \"Bus\") {\n request.getMockRTPI('bus', callback);\n }\n else {\n callback(null, -1);\n }\n}", "title": "" }, { "docid": "bf054d2e5f0b061cba23f8b4fb5c5471", "score": "0.52399504", "text": "function calcRoute(start, end) {\n var request = {\n origin: start,\n destination: end,\n travelMode: 'DRIVING'\n };\n directionsService.route(request, function(result, status) {\n if (status == 'OK') {\n directionsDisplay.setDirections(result);\n r = result;\n $(\"#dis\").html(\"<span>Distance:\"+ r.routes[0].legs[0].distance.text+\"</span><br><span>Duration:\"+ r.routes[0].legs[0].duration.text+\"</span>\");\n }\n });\n}", "title": "" }, { "docid": "d6adcc430393117cdead3ad8c775609d", "score": "0.5230535", "text": "getTimeElapsed() {\n this.lastElapsedTimeCheck = new Date();\n return (this.lastElapsedTimeCheck - this.startTime) / 1000;\n }", "title": "" }, { "docid": "ff1c3ab95c7e31a1b9470ecc74e7e25f", "score": "0.52303934", "text": "function distance_of_time_in_words(minutes) {\n if (minutes.isNaN) return \"\";\n minutes = Math.abs(minutes);\n if (minutes < 1) return ('less than a minute');\n if (minutes < 50) return (minutes + ' minute' + (minutes == 1 ? '' : 's'));\n if (minutes < 90) return ('about one hour');\n if (minutes < 1080) return (Math.round(minutes / 60) + ' hours');\n if (minutes < 1440) return ('one day');\n if (minutes < 2880) return ('about one day');\n else return (Math.round(minutes / 1440) + ' days')\n}", "title": "" }, { "docid": "d914c9e6879b74ee189cf3d0c0b17073", "score": "0.5219671", "text": "get elapsedMilliseconds() {\n\n if (this._timeStarted === null) {\n return 0;\n }\n\n if (this._running) {\n return (new Date() - this._timeStarted);\n }\n\n return (this._timeStoped - this._timeStarted);\n }", "title": "" }, { "docid": "cbd56e76b5f2436ac06df849570a7ad0", "score": "0.5211734", "text": "function getDistanceAcrossPath(slatlng,tlatlng,rpath){\n\tvar times1 = 0;\n\tvar times2 = 0;\n\t\n\tvar res1 = closestPointOnPath(slatlng,rpath);\n\tvar res2 = closestPointOnPath(tlatlng,rpath);\n\t\n\tvar index1 = res1.index;\n\tvar index2 = res2.index;\n\n\tvar coords1 = [];\n\tvar coords2 = [];\n\n\tif(res1.dist > 20 | res2.dist > 20){\t\n\t\tconsole.log(\"The coordinate(s) are too far away from path, cannot continue.\");\n\t\treturn;\n\t}\n\n\twhile(index1 != res2.index && times1 <= rpath.length){\n\t\tindex1 = ((index1 + 1) % rpath.length);\n\t\tcoords1.push(rpath[index1]);\n\t\ttimes1++;\n\t}\n\n\twhile(index2 != res1.index && times2 <= rpath.length){\n\t\tindex2 = ((index2 + 1) % rpath.length);\n\t\tcoords2.push(rpath[index2]);\n\t\ttimes2++;\n\t}\n\t\n\tvar length1 = google.maps.geometry.spherical.computeLength(coords1);\n\tvar length2 = google.maps.geometry.spherical.computeLength(coords2);\n\t\n\treturn {\"len1\":length1,\"len2\":length2};\n}", "title": "" }, { "docid": "9484ec45894f74dfe5d2358b917c00c2", "score": "0.5208235", "text": "function TravelTime() {\n\tif ((document.getElementById('map'))&&(document.getElementById('TimeDistance'))) { \n\t\tvar service = new google.maps.DistanceMatrixService();\n\t\treturn service.getDistanceMatrix(\n\t {\n\t // arrivalTime: Date,\n\t \t// departureTime: Date,\n\t \ttravelMode: document.getElementById('mode').value,\n\t \torigins: [document.getElementById('origin').value],\n\t \tdestinations: [document.getElementById('destination').value] \n\t }, function(response,status){\n\t \tconsole.log(response,status)\n\t \tdocument.getElementById('travelDistance').innerText = response.rows[0].elements[0].distance.text\n\t \tdocument.getElementById('travelDuration').innerText = response.rows[0].elements[0].duration.text\n\t })\n\t}\n}", "title": "" }, { "docid": "697f88df99d792ff4f6ef5699cfdb078", "score": "0.5208166", "text": "function calculateSpeed( time )\n {\n if ( time > 2000 )\n {\n return 2;\n }\n else if( time > 4000 )\n {\n return 4;\n }\n else\n {\n return 1;\n }\n }", "title": "" }, { "docid": "8cc1b156e7e77d703ccef70e3581506b", "score": "0.52063316", "text": "function _simTime () {\n\tvar t = simTimeAtLastManipulation + isRunning() * o.speed * _realTimeSinceLastManipulation();\n\treturn _bounded(t);\n}", "title": "" }, { "docid": "2feb875c017af49534c339ffbf8d1669", "score": "0.52039856", "text": "function calcRoute() {\n var request = {\n origin: new google.maps.LatLng(start_marker.getPosition().k, start_marker.getPosition().D),\n destination: new google.maps.LatLng(finish_marker.getPosition().k, finish_marker.getPosition().D),\n travelMode: google.maps.DirectionsTravelMode.DRIVING\n };\n directionsService.route(request, function (response, status) {\n if (status == google.maps.DirectionsStatus.OK) {\n current_direction_route = response;\n directionsDisplay.setDirections(response);\n directionsDisplay.setMap(map);\n $scope.trip_route.distance = directionsDisplay.getDirections().routes[0].legs[0].distance.value;\n }\n });\n }", "title": "" }, { "docid": "f23c2422cbf86d2bec0aaee28a6720b6", "score": "0.52012426", "text": "get secondsSpentFighting() {\n if (this.attacker.status === MORALE_SUCCESS) {\n if (this.melee) {\n return this.secondsAvailableAfterOrder - this.secondsToReachDefender;\n } else {\n return this.secondsAvailableAfterOrder;\n }\n } else {\n return 0;\n }\n }", "title": "" }, { "docid": "72e439ca641fd1fd0e8fdc6dc3971298", "score": "0.5199838", "text": "getTimeUntilHostShouldSeat() {\n\t\tvar MILISECONDS_IN_MINUTE = 1*60*1000;\n\t\treturn this.estimatedWaitInMins * MILISECONDS_IN_MINUTE;\n\t}", "title": "" }, { "docid": "cc46befae7ce37ae6dad0d137fec3a8e", "score": "0.5194803", "text": "function travelTime(hkDist, elvGain) {\n const dt = (((hkDist / 2) + (elvGain / 1000)) + ((((hkDist / 2) + (elvGain / 1000)) * 5) / 60)).toString().split('.'), // split to convert to whole minutes\n h = dt[0], // whole number hours\n m = Math.ceil(('.' + dt[1]) * 60); // convert to whole number minutes and round up to nearest whole\n\n return `${h} hours ${m} minutes`;\n}", "title": "" }, { "docid": "5be78714c28e197d89a9a527cfce6880", "score": "0.5187374", "text": "function calculateShortestRoute(routes) {\n var routeLengths = [];\n routes.forEach(route => {\n var length = 0;\n for (let i = 1; i < route.length; i ++ ) {\n json.tiet.forEach(road => {\n if ((route[i-1] === road.mista && route[i] === road.mihin) || (route[i-1] === road.mihin && route[i] === road.mista)) {\n length += road.kesto;\n }\n });\n }\n routeLengths.push({\n route: route,\n length: length\n });\n });\n routeLengths.sort((a,b) => (a.length > b.length) ? 1 : ((b.length > a.length) ? -1 : 0));\n return routeLengths;\n}", "title": "" }, { "docid": "7544fafdb071ac483587a5970addf74f", "score": "0.5185947", "text": "function calculateDuration() {\n return endTime - startTime;\n }", "title": "" }, { "docid": "7544fafdb071ac483587a5970addf74f", "score": "0.5185947", "text": "function calculateDuration() {\n return endTime - startTime;\n }", "title": "" }, { "docid": "7544fafdb071ac483587a5970addf74f", "score": "0.5185947", "text": "function calculateDuration() {\n return endTime - startTime;\n }", "title": "" }, { "docid": "41973053f61a866e6e83fdc5a3ac3f10", "score": "0.5182403", "text": "function getCallDistanceAlongRoute (tripKey, stop_id) {\n /* jshint validthis: true */\n var dist = parseFloat(this.GTFS.getStopDistanceAlongRouteForTripInMeters(tripKey, stop_id)) ,\n prec = parseInt(this.config && this.config.callDistanceAlongRouteNumOfDigits);\n\n if (isNaN(dist)) {\n return null;\n } else if (prec) {\n return dist.toFixed(prec);\n } else {\n return dist.toFixed(3); \n }\n}", "title": "" }, { "docid": "4d11014b3f597741097fbde951376958", "score": "0.51783216", "text": "function calcTime(dist){\n\t//Get duration of the video\n\tvar dur = Popcorn(\"#video\").duration();\n\t//Get width of timeline in pixels\n\tvar wdth = document.getElementById(\"visualPoints\").style.width;\n\t//Trim for calculations\n\twdth = wdth.substr(0,wdth.length - 2);\n\t//Calculate pixel/total ratio\n\tvar ratio = dist / wdth;\n\t//Return time value in seconds calculated using ratio\n\treturn (ratio * dur);\n}", "title": "" }, { "docid": "a958fcdabb69a8e910a3004049348c32", "score": "0.5175506", "text": "function dragReturnAnimationTime(fromCoords, toCoords) {\n var squareDistance = _.reduce(fromCoords, function(squareD, coord, i) {\n var diff = toCoords[i] - coord;\n return squareD + diff * diff;\n }, 0);\n var distance = Math.sqrt(squareDistance);\n return Math.max(15 * Math.sqrt(distance), 1);\n}", "title": "" }, { "docid": "c36c6422a864a8858896c956604e2530", "score": "0.51747805", "text": "function countDuration(lon1, lat1, lon2, lat2, speed, unit) {\n\tvar origin,\n\t\tdestination,\n\t\tline,\n\t\tdistance,\n\t\tkmph,\n\t\tduration;\n\t\t\n\tunit = unit || 'knot'; // default unit\n\torigin = new OpenLayers.Geometry.Point(lon1, lat1);\n\tdestination = new OpenLayers.Geometry.Point(lon2, lat2);\n\tline = new OpenLayers.Geometry.LineString([origin, destination]);\n\t// distance in meters\n\tdistance = line.getGeodesicLength(new OpenLayers.Projection(\"EPSG:4326\")); // HARDCODED! map projection\n\t// convert speed\n\t// 1 knot = 1.85200 kilometers / hour\n\tif (unit === 'knot') {\n\t\tkmph = 1.852 * speed;\n\t} else if (unit === 'kmph') {\n\t\tkmph = speed;\n\t} else {\n\t\t// what unit?\n\t\tkmph = speed; // assume kmph\n\t}\n\t// count duration\n\t// s = v.t ; t = s/v\n\tvar duration = distance / (1000 * kmph);\n\treturn duration;\n}", "title": "" }, { "docid": "601075e761542d6e96eb294d494e2e9f", "score": "0.5169125", "text": "function calculateDuration() {\n\t\t\treturn endTime - startTime;\n\t\t}", "title": "" }, { "docid": "601075e761542d6e96eb294d494e2e9f", "score": "0.5169125", "text": "function calculateDuration() {\n\t\t\treturn endTime - startTime;\n\t\t}", "title": "" }, { "docid": "1b3a3c3d0bd02236acf9752745ab8509", "score": "0.5166937", "text": "function seconds_elapsed () \n{ \nvar date_now = new Date (); \nvar time_now = date_now.getTime (); \nvar time_diff = time_now - startTime; \nvar seconds_elapsed = Math.floor ( time_diff / 1000 ); \n\nreturn ( seconds_elapsed ); \n}", "title": "" }, { "docid": "0c585febd3343e306269d4f49814f7a7", "score": "0.5163696", "text": "calculateDistance() {}", "title": "" }, { "docid": "4a64acf8b366b74a1d2cd5937bb2362e", "score": "0.51578236", "text": "function getGameTimeTaken() {\n\tif (SG.gameendtimestamp) {\n\t\treturn SG.gameendtimestamp - SG.gamestarttimestamp;\n\t} else {\n\t\treturn new Date().getTime() - SG.gamestarttimestamp;\n\t}\n}", "title": "" }, { "docid": "db273de31cef50ec108da26ee8358c97", "score": "0.51556146", "text": "function calculateDuration()\n\t\t{\n\t\t\treturn endTime - startTime;\n\t\t}", "title": "" }, { "docid": "fa819a116a0f67780c61c4fe4b52eba2", "score": "0.5152012", "text": "function timeElapsed(time) {\n return (time[0] * 1000000000 + time[1]) / 1000000;\n}", "title": "" }, { "docid": "17249534c51918b98948533ffafe1839", "score": "0.5111686", "text": "function calculateDuration() {\n return endTime - startTime;\n }", "title": "" }, { "docid": "17249534c51918b98948533ffafe1839", "score": "0.5111686", "text": "function calculateDuration() {\n return endTime - startTime;\n }", "title": "" }, { "docid": "c9938e7d54203d638e48f14b72f20095", "score": "0.5108524", "text": "function routesAssessingRobot(state, route) {\n if (route.length === 0) {\n let routes = state.undelParcels.map(p => {\n if (p.place !== state.rPlace) {\n return {\n route: findOptRoute(roadGraph, state.rPlace, p.place),\n pickUp: true\n }\n } else {\n return {\n route: findOptRoute(roadGraph, state.rPlace, p.address),\n pickUp: false\n }\n }\n }\n );\n function score({route, pickUp}) {\n return (pickUp ? 0.5 : 0) - route.length;\n }\n route = routes.reduce((a,b) => score(a) > score(b) ? a : b).route; \n }\n return {\n direction: route[0],\n memory: route.slice(1)\n };\n }", "title": "" }, { "docid": "09aa257d89925df605b3da235590b566", "score": "0.5106642", "text": "function computeElapsed()\r\n\t{\r\n\t\tif (self.startTime != 0)\r\n\t\t{\r\n\t\t\treturn new Date().getTime() - self.startTime;\r\n\t\t}\r\n\t\treturn 0;\r\n\t}", "title": "" }, { "docid": "75f3d97d5f9cc885ad5724fe3eba4229", "score": "0.50989544", "text": "function seconds_elapsed() {\n var date_now = new Date();\n var time_now = date_now.getTime();\n var time_diff = time_now - startTime;\n var seconds_elapsed = Math.floor(time_diff / 1000);\n\n return (seconds_elapsed);\n}", "title": "" }, { "docid": "f4d4cfdb8517ac6c38bb1cf625090e55", "score": "0.50914454", "text": "function getTime() {\n return performance.now() / 1000;\n}", "title": "" }, { "docid": "058e4130f9b206ea0681b6dc81af732c", "score": "0.5081621", "text": "async function timeDiff(timeA, timeB){\n\t//var r = Math.ceil((timeB - timeA) / 1000); // seconds.\n\treturn Math.abs(timeB - timeA); // milliseconds.\n}", "title": "" }, { "docid": "0f1bc2c63badaf4eeb252b3fbe2ab6dc", "score": "0.507952", "text": "function calculateAndDisplayRoute(origin, destination, directionsService, directionsDisplay, map) {\n directionsService.route({\n origin: origin,\n destination: destination,\n travelMode: google.maps.TravelMode.DRIVING,\n unitSystem: google.maps.UnitSystem.METRIC,\n provideRouteAlternatives: true,\n avoidHighways: false,\n avoidTolls: false,\n drivingOptions: { // shows optimistic path under current traffic conditions\n departureTime: new Date(Date.now()),\n trafficModel: 'optimistic'\n }\n }, function(response, status) {\n if (status == google.maps.DirectionsStatus.OK) {\n for (var i = response.routes.length - 1, len = response.routes.length; i > -1; i--) {\n var strokeColor = (i > 0) ? '#726f68' : 'blue';\n\n /* infowindow with duration and distance for each route*/\n /* doesn't update dynamically when a route is dragged. Needs to be fixed */\n var distance = response.routes[i].legs[0].distance.text;\n var duration = response.routes[i].legs[0].duration.text;\n\n var step = 5;\n var infowindow2 = new google.maps.InfoWindow();\n infowindow2.setContent(\n \"<img src='./images/car.png' alt='for info window' style='width: 20px; height: 20px; padding-right: 1px;'>\"+\n \"<span style='color: #d96042; font-size: 14px;'>\"+duration+\"</span><br>\"+\n \"<span style='font-size: 10px; font-weight: 700;'>\"+distance+\"</span>\");\n infowindow2.setPosition(response.routes[i].legs[0].steps[step].end_location);\n infowindow2.open(map);\n\n /* render all routes */\n new google.maps.DirectionsRenderer({\n map: map,\n directions: response,\n routeIndex: i,\n draggable: true,\n polylineOptions: {\n strokeColor: strokeColor,\n strokeOpacity: 0.9,\n strokeWeight: 5}\n });\n }\n } else {\n window.alert('Unable to find the distance via road. Directions request failed due to - ' + status);\n }\n });\n}", "title": "" }, { "docid": "57a1081a477e97bd09321fd581ea26d8", "score": "0.5078568", "text": "shortestRouteDistance(start, end){\n let route = this.shortestRoute(start, end);\n return this.magnitude.apply(this, route);\n }", "title": "" }, { "docid": "b706ba6948c60f02880b82e54ca368bc", "score": "0.5070348", "text": "function calculateTime (){\n//Getting average speed/seconds and length of the drive/seconds\n var speedInSecond = avgSpeed/3600;\n var time = distanceToStop/ speedInSecond;\n time = Math.round(time);\n\n var finishTime = getCurrentDate();\n finishTime = finishTime.toString().split(':');\n\n//Converting seconds to minutes, hours and adding it to starting time\n var min = 0;\n var h = 0;\n var d =0;\n\n var finishSeconds = (+finishTime[2]+ +time );\n if(finishSeconds >=60){\n min = parseInt(finishSeconds / 60);\n finishSeconds = finishSeconds - (min*60);\n console.log(min);\n if(finishSeconds<10){\n finishSeconds = \"0\"+finishSeconds;\n }\n}\n\nvar finishMinutes = (+finishTime[1]+ +min);\n if(finishMinutes >=60){\n h = parseInt(finishMinutes / 60);\n finishMinutes = finishMinutes - (h*60);\n if(finishMinutes<10){\n finishMinutes = \"0\"+finishMinutes;\n }\n}\n\nvar finishHours = (+finishTime[0]+ +h);\n\n if(finishHours >=24){\n d = parseInt(finishHours / 24);\n finishHours = finishHours - (d*24);\n if(finishHours<10){\n finishHours = \"0\"+finishHours;\n }\n}\n\n document.getElementById('stopTime').innerHTML = finishHours +\":\"+ finishMinutes +\":\"+ finishSeconds;\n\n //console.log(finishTime[2]);\n}", "title": "" }, { "docid": "4c825c365b3e657e36524506b8be3db2", "score": "0.5058693", "text": "function getDistanceAcrossPath(slatlng,tlatlng,rpath,rtype,tdir){\n\tvar stop = closestPointOnPath(rpath,slatlng);\n\tvar trolley = closestPointOnPath(rpath,tlatlng);\n\tvar length = 0;\n\tvar found = false;\n\t\n\tif(trolley.dist > 40){\n\t\tconsole.log(\"The trolley is too far away from the path, cannot continue.\");\n\t\treturn;\n\t}\n\n\tvar coords = [];\n\t\n\tif(rtype == \"linear\"){\n\t\tif(tdir == 1){\n\t\t\tfor(var i=trolley.index; i < rpath.length; i++){\n\t\t\t\tcoords.push(rpath.getAt(i));\n\t\t\t\tif(i == stop.index){\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(!found){\n\t\t\t\tlength = google.maps.geometry.spherical.computeLength(coords)*2;\n\t\t\t\tcoords.length = 0;\n\t\t\t\t\n\t\t\t\tfor(var i=trolley.index; i >= 0; i--){\n\t\t\t\t\tcoords.push(rpath.getAt(i));\n\t\t\t\t\tif(i == stop.index){\n\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if(tdir == -1){\n\t\t\tfor(var i=trolley.index; i >= 0; i--){\n\t\t\t\tcoords.push(rpath.getAt(i));\n\t\t\t\tif(i == stop.index){\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(!found){\n\t\t\t\tlength = google.maps.geometry.spherical.computeLength(coords)*2;\n\t\t\t\tcoords.length = 0;\n\t\t\t\n\t\t\t\tfor(var i=trolley.index; i < rpath.length; i++){\n\t\t\t\t\tcoords.push(rpath.getAt(i));\n\t\t\t\t\tif(i == stop.index){\n\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t}\t\t\n\t\t}\n\t}\n\t\n\telse if(rtype == \"circular\"){\n\t\tvar j=0;\n\t\t\n\t\tif(tdir == 1){\n\t\t\tfor(var i=trolley.index; j < rpath.length; i = (i+1)%rpath.length,j++){\n\t\t\t\tcoords.push(rpath.getAt(i));\n\t\t\t\tif(i == stop.index){\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if(tdir == -1){\n\t\t\tfor(var i=trolley.index; j < rpath.length; i = (((i-1)%rpath.length)+rpath.length)%rpath.length,j++){\n\t\t\t\tcoords.push(rpath.getAt(i));\n\t\t\t\tif(i == stop.index){\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\telse if(\"weird\"){\n\t\treturn {\"len\":-1};\n\t}\n\n\tlength += google.maps.geometry.spherical.computeLength(coords);\n\t\n\treturn {\"len\":length};\n}", "title": "" }, { "docid": "4c403e2b4d15eaff1a0ab8c90aa3e846", "score": "0.5058524", "text": "function compute_passed_time() {\n\t\tvar ccount = SAEV_Events_currcycle - SAER_Events_eventtab[SAEC_Events_EV_CIA].oldcycles + div10;\n\t\tvar ciaclocks = ccount / DIV10 >>> 0;\n\n\t\tciaata_passed = ciaatb_passed = ciabta_passed = ciabtb_passed = 0;\n\n\t\t/* CIA A timers */\n\t\tif ((ciaacra & 0x21) == 0x01) {\n\t\t\tvar cc = ciaclocks;\n\t\t\tif (cc > ciaastarta)\n\t\t\t\tcc -= ciaastarta;\n\t\t\telse\n\t\t\t\tcc = 0;\n\t\t\tSAEF_assert((ciaata + 1) >= cc);\n\t\t\tciaata_passed = cc;\n\t\t}\n\t\tif ((ciaacrb & 0x61) == 0x01) {\n\t\t\tvar cc = ciaclocks;\n\t\t\tif (cc > ciaastartb)\n\t\t\t\tcc -= ciaastartb;\n\t\t\telse\n\t\t\t\tcc = 0;\n\t\t\tSAEF_assert((ciaatb + 1) >= cc);\n\t\t\tciaatb_passed = cc;\n\t\t}\n\n\t\t/* CIA B timers */\n\t\tif ((ciabcra & 0x21) == 0x01) {\n\t\t\tvar cc = ciaclocks;\n\t\t\tif (cc > ciabstarta)\n\t\t\t\tcc -= ciabstarta;\n\t\t\telse\n\t\t\t\tcc = 0;\n\t\t\tSAEF_assert((ciabta + 1) >= cc);\n\t\t\tciabta_passed = cc;\n\t\t}\n\t\tif ((ciabcrb & 0x61) == 0x01) {\n\t\t\tvar cc = ciaclocks;\n\t\t\tif (cc > ciabstartb)\n\t\t\t\tcc -= ciabstartb;\n\t\t\telse\n\t\t\t\tcc = 0;\n\t\t\tSAEF_assert((ciabtb + 1) >= cc);\n\t\t\tciabtb_passed = cc;\n\t\t}\n\t}", "title": "" }, { "docid": "9d444d8451add12e9950856ec11fd74b", "score": "0.5052022", "text": "function timePassed(state, dt){\n return { elapsedTime: state.elapsedTime + dt}\n }", "title": "" }, { "docid": "1910bcc04a298031be630a8952a0439c", "score": "0.5047032", "text": "function elapsedTimeInSecondsForRender() {\n\tvar timeForRender = timeRenderEnd - timeRenderStart;\n\treturn timeForRender;\n}", "title": "" }, { "docid": "9ec1c8771cf2e6f5d07cae2705a3e96c", "score": "0.5039448", "text": "function speedInMeterPerHour() {\n\tlet totalMiliSec = 0;\n\tlet totalMetres = 0;\n\n\t//berechnet den Abstand zwischen der aktuellsten und der zweitaktuellsten Position\n\t//denn dieser Abstand ist in den gesamtMetern noch nicht mit einberechnet\n\tlet distance = distanceOnGeoidInMetres(1);\n\t//mit Abstand NaN kann der Compiler nicht rechnen\n\tif (!isNaN(distance)) {\n\t\t//für den aktuellsten Abstand die Meter auf die Gesamtmeterzahl addieren\n\t\ttotalDistance += distance;\t\n\t}\n\n\tfor (let x = strokesAreAverage - 1; x > 0; x--) {\n\t\t//berechnet den Abstand zwischen der aktuellsten und der ältesten gespeicherten Position\n\t\t//denn darüber gemittelt ist die Fehlerwahrscheinlichkeit des GPS am unauffälligsten\n\t\tdistance = distanceOnGeoidInMetres(x);\n\t\t//wenn eine der Daten keine Nummer ist, kann sie nicht zum Durchschnitt beitragen\n\t\tif (!(isNaN(positions[0][2]) || isNaN(positions[x][2]) || isNaN(distance))) {\n\t\t\t//zähle alle Meter zusammen\n\t\t\ttotalMetres += distance;\n\t\t\n\t\t\t//berechne den zeitlichen Abstand zwischen der Ermittlung der aktuellsten und\n\t\t\t//der ältesten gespeicherten Positionen in Milliekunden und zähle alle Millisekunden zusammen\n\t\t\ttotalMiliSec += positions[0][2] - positions[x][2];\n\n\t\t\tx = 0;\n\t\t}\n\t}\n\t\n\n/*\tlet totalMiliSec = 0;\n\tlet totalMetres = 0;\n\n\t//Schleife zur Geschwindigkeitsberechnung von jeweils der aktuellsten und den letzten 24 ermittelten Positionen\n\tfor (let strokes = 1; strokes < strokesAreAverage; strokes++) {\n\n\t\t//berechnet den Abstand zwischen der aktuellsten und der <strokes>ten Position\n\t\tlet distance = distanceOnGeoidInMetres(strokes);\n\t\t\n\t\t//wenn eine der Daten keine Nummer ist, kann sie nicht zum Durchschnitt beitragen\n\t\tif (!(isNaN(positions[0][2]) || isNaN(positions[strokes][2]) || isNaN(distance))) {\n\t\t\t//zähle alle Meter zusammen\n\t\t\ttotalMetres += distance;\n\t\t\t\n\t\t\t//berechne den zeitlichen Abstand zwischen der Ermittlung der aktuellsten und\n\t\t\t//der <strokes>ten Positionen in Milliekunden und zähle alle Millisekunden zusammen\n\t\t\ttotalMiliSec += positions[0][2] - positions[strokes][2];\n\n\t\t\t//für den aktuellsten Abstand die Meter auf die Gesamtmeterzahl addieren\n\t\t\tif (strokes == 1) {\n\t\t\t\ttotalDistance += distance;\n\t\t\t}\t\n\n\t\t}\n\t}\n*/\n\treturn Math.floor((totalMetres * 3600000) / totalMiliSec);\n\n}", "title": "" }, { "docid": "feaff756ab9307187aa9216b95d33a97", "score": "0.5036716", "text": "function elapsedTimeInSeconds() {\n\ttimeLast = (new Date()).getTime() - timeStart;\n\treturn timeLast;\n}", "title": "" }, { "docid": "9c926d082c2be8f9636334839be2ca45", "score": "0.50246596", "text": "calcHeuristic() {\n let heuristic = 0;\n\n if (this.previousWaypoint !== null) {\n heuristic += this.distance(this.previousWaypoint, this.currentWaypoint);\n }\n\n for(let i = 0; i < this._currentWaypoints.length; i++) {\n heuristic += this.distance(this._currentWaypoint, this._currentWaypoints[i].end);\n }\n\n heuristic += this.distance(this._visited[0], this._currentWaypoint);\n\n // Add 1 for every start waypoint (User) that has not been visited\n for (let i = 0; i < this.unvisited.length; i++) {\n if (this.unvisited[i].start === undefined) {\n heuristic++;\n }\n }\n\n return heuristic;\n }", "title": "" }, { "docid": "29d384c014e2c37f0cc46e0a8174eb01", "score": "0.5024521", "text": "function timeCalc() {\n var convertedTime = moment(startTimeStr, \"HH:mm\").subtract(1, \"years\");\n var currentTime = moment();\n var diffTime = moment().diff(moment(convertedTime), \"minutes\");\n var timeModulo = diffTime % frequencyRateStr;\n minsAway = frequencyRateStr - timeModulo;\n nextArrival = moment().add(minsAway, \"minutes\");\n nextArrival = moment(nextArrival).format(\"HH:mm\");\n }", "title": "" }, { "docid": "00c97797fcb2b1960015ec58f7f6deeb", "score": "0.5016737", "text": "function TimeHorizCalc(distHoriz){\n if(distHoriz==0){\n return 0;}\n else if(distHoriz <= Math.pow(velocityHoriz,2)/accHoriz){ \n return Math.sqrt(distHoriz *2/accHoriz);\n }\n else {\n let distanceAcc = Math.pow(velocityHoriz,2) / accHoriz;\n let timeFullSpeed = (distHoriz-distanceAcc)/velocityHoriz;\n let timeHoriz = Math.sqrt(distanceAcc*2/accHoriz) + timeFullSpeed;\n //console.log(timeHoriz);\n return timeHoriz;\n }\n}", "title": "" }, { "docid": "d34c7e697eb5714e54c4d5ea5a43cfdd", "score": "0.5015632", "text": "getDeltaTime() {\n let d = new Date();\n let time = d.getTime();\n return (time - this.time) / 1000;\n }", "title": "" }, { "docid": "e6f9cd3cdb70bb1f82e0357623da673d", "score": "0.50070286", "text": "function calculateFullResultsDurationSec() {\n var phaseKeys = Object.keys(ResultsPhase);\n var duration = 0;\n phaseKeys.forEach(function (key) {\n duration += getPhaseDurationSec(key);\n });\n return duration;\n}", "title": "" }, { "docid": "266878e4024681a00a8a73358330154b", "score": "0.49866897", "text": "function computeTotalDistance(result) {\n var total = 0;\n var myroute = result.routes[0];\n for (var i = 0; i < myroute.legs.length; i++) {\n total += myroute.legs[i].distance.value;\n }\n total = total / 1000.0;\n //Write distance to the Dom\n document.getElementById('total').innerHTML = total + ' km';\n}", "title": "" }, { "docid": "97dd40832482131f77b1349f33a7fb88", "score": "0.49848118", "text": "get averageSpeed()\n {\n var time = this._time[this._time.length - 1] - this._time[0];\n \n return this._distanceTravelled/(time/1000);\n }", "title": "" }, { "docid": "7c7c591d96d89999508734ec46978869", "score": "0.49818376", "text": "function calcTimeSpeed(){\n // distance\n var dst = $(\"#distanceSpd\").val();\n var dstUnit = $(\"#dstUnit\").val();\n var unitSpeed = $(\"#unitSpd\").val();\n var speed = $(\"#speed\").val();\n var totalTime = 0;\n\n if(dst != 0 && speed != 0){\n if(dstUnit == \"mile\"){\n if(unitSpeed == \"mph\"){\n totalTime = (dst / speed);\n } else {\n totalTime = (dst / (speed * km2miles));\n }\n } else {\n if(unitSpeed == \"kmh\"){\n totalTime = (dst / speed);\n } else {\n totalTime = (dst / (speed * miles2km));\n }\n }\n\n var time = hoursToTime(totalTime, splitSeconds);\n\n $(\"#outputSpd\").text(time);\n } else {\n $(\"#outputSpd\").text(\"00:00:00\");\n }\n}", "title": "" }, { "docid": "56c7de5a168e1cef79465a3b99ffae32", "score": "0.497703", "text": "function calcDistanceBetweenObjects([speedA, speedB, time]) {\n [speedA, speedB, time] = [speedA, speedB, time].map(Number);\n speedA = speedA * 1000 / 3600; // converts the speed from km/h to m/s\n speedB = speedB * 1000 / 3600;\n let s1 = speedA * time;\n let s2 = speedB * time;\n let distance = Math.abs(s1 - s2);\n distance = Math.round(distance * 100000000000000) / 100000000000000;\n console.log(distance);\n}", "title": "" }, { "docid": "dca5758546b1ca8a53f7d5a3a691f3ce", "score": "0.49742618", "text": "function getTime() {\n return Math.floor(gameTimer);\n }", "title": "" }, { "docid": "1e90c8e28bcb027660c39fe6cc8bac82", "score": "0.49680042", "text": "function addWaitingTime(res, data) {\n\n var now = new Date();\n var minTilActivation = Math.round((data.timeStamp - now.getTime()) / 1000 / 60);\n var steps = data.steps;\n if (steps[0].travel_mode == 'MOCK') {\n minTilActivation = 20;\n }\n var travel_time = 0;\n\n async.map(steps, getWaitingTime, function(err, results) {\n if (!err) {\n console.log(\"=============================================\");\n console.log(\"===========Calculating Travel Time===========\");\n console.log(\"=============================================\");\n\n\n for (var i = 0; i < results.length; i++) {\n var duration = helper.convertDuration(steps[i].duration) / 1000 / 60\n if (results[i] == -1) {\n console.log(\"Walking\");\n console.log(\"Mins Before: \" +minTilActivation);\n travel_time += Number(duration);\n minTilActivation += Number(duration);\n console.log(\"Duration: \"+ duration);\n console.log(\"Mins After: \" +minTilActivation);\n console.log(\"---------------------------------------------\");\n } else {\n console.log(\"Transit\");\n console.log(\"Mins Before \" +minTilActivation);\n var waiting_time = helper.calcWaitingTime(results[i], minTilActivation);\n travel_time += (Number(waiting_time) + Number(duration));\n minTilActivation += (Number(waiting_time) + Number(duration));\n console.log(\"Duration: \"+ duration);\n console.log(\"Min After: \" +minTilActivation);\n console.log(\"---------------------------------------------\");\n data.steps[i].transit_details['waiting_time'] = waiting_time + \" mins\";\n }\n }\n console.log(\"Travel Time from Activation: \"+travel_time);\n console.log(\"Travel Time from Now: \"+ minTilActivation);\n console.log(\"=============================================\");\n\n\n data = helper.updateDataTime(data, travel_time);\n } else {\n console.log(results);\n data = helper.setErrorJson(err, results);\n }\n sendResponse(res, data);\n });\n}", "title": "" }, { "docid": "5fc5dc92d00e82a46c02c81668cdf3ec", "score": "0.49635676", "text": "function howManySeconds(hours) {\n return hours*3600;\n\t\n}", "title": "" }, { "docid": "88eb83fc407f3996d0a2a52f23ae066f", "score": "0.49574596", "text": "get duration(){\n if(this.startTime && this.endTime){\n return this.endTime - this.startTime;\n }else{\n return undefined;\n }\n }", "title": "" }, { "docid": "88eb83fc407f3996d0a2a52f23ae066f", "score": "0.49574596", "text": "get duration(){\n if(this.startTime && this.endTime){\n return this.endTime - this.startTime;\n }else{\n return undefined;\n }\n }", "title": "" }, { "docid": "cd15d347e525e976cf33a3bfbef0afb0", "score": "0.4950858", "text": "function shortestTime(speed){\n const sortedTimes = speed.sort( (a, b) => b - a);\n const [fastest, nextFastest] = [sortedTimes.pop(), sortedTimes.pop()];\n \n return nextFastest + fastest + Math.min(\n sortedTimes[0] + sortedTimes[1] + fastest,\n sortedTimes[0] + nextFastest * 2\n )\n \n}", "title": "" }, { "docid": "a1b5cb558d7a4f05342ce52609e04958", "score": "0.49507082", "text": "async getDirections(\n startPos,\n endPos,\n placeIds,\n fuelLeft,\n fuelCap,\n mpg,\n calcOnGas,\n numStops,\n mpgCity = mpg,\n mpgHighway = mpg\n ) {\n try {\n var url = `${ROOT_URL}/api/${placeIds.length > 0 ? \"custom-\" : \"\"}directions/`;\n url = url + `${startPos}/${endPos}/${fuelLeft}/${fuelCap}/${mpg}/${calcOnGas}`;\n if (!calcOnGas) url += `/${numStops}`;\n else url += `?mpgCity=${mpgCity}&mpgHighway=${mpgHighway}`;\n\n if (placeIds.length > 0){\n url += `${calcOnGas ? \"&\" : \"?\"}stop=${placeIds[0]}`\n for (let i = 1; i < placeIds.length; i++) {\n url += `&stop=${placeIds[i]}`\n }\n }\n\n let resp = await fetch(url);\n\n if (resp.status == 422) {\n this.setState({ showingError: true });\n }\n else {\n let respJson = await resp.json();\n let segments = respJson.route;\n\n let stopsList = respJson.stopsList;\n\n let start = segments[0].coords[0];\n let lastSeg = segments[segments.length - 1];\n let end = lastSeg.coords[lastSeg.coords.length - 1];\n\n let timeLeft = 0;\n segments.forEach((seg) => {\n timeLeft += seg.duration;\n });\n\n this.setState({ segments, start, end, stopsList, timeLeft });\n // Zoom out the map\n this.mapComponent.animateToRegion(respJson.zoomBounds);\n this.getPositionUpdate(this.state.fineLocation);\n return segments;\n\n }\n } catch (error) {\n console.log(error);\n return error;\n }\n }", "title": "" }, { "docid": "7c74288f29e9015a1b1e45a79550625e", "score": "0.49404636", "text": "function calculateDeltaTime() {\n let now;\n //Get time in ms\n now = performance.now();\n //Get capped instant FPS (from last frame to this frame)\n st.fps = a.utils.clamp(1000 / (now - st.lastTime), 5, 60);\n //Store this frame time\n st.lastTime = now;\n //Return the last frame's time (delta time) in seconds\n return 1 / st.fps;\n }", "title": "" }, { "docid": "d76e9ad2166a367923d4699b976bcad5", "score": "0.49393594", "text": "function getEstimatedTime() {\n\tif (currentStatus.playerState == 'PLAYING' && 0 <= currentStatus.lastUpdate) {\n\t\t// Time since last update\n\t\tvar a = (now() - currentStatus.lastUpdate) / 1000;\n\t\t// currentTime + (playbackRate * timeSinceStart)\n\t\ta = currentStatus.currentTime + currentStatus.playbackRate * a;\n\n\t\tif (currentStatus.media && currentStatus.media.duration != null && a > currentStatus.media.duration) {\n\t\t\ta = currentStatus.media.duration;\n\t\t}\n\n\t\t0 > a && (a = 0);\n\t\treturn a;\n\t}\n\treturn currentStatus.currentTime;\n}", "title": "" } ]
8e1276f5abf70aebccf5202117f3f3c6
getUser() returns the currentUserData which contains both the uid and userName.
[ { "docid": "4477018e48ae4bf80e66ecda5704dd3f", "score": "0.66482216", "text": "getUser () {\n return new Promise(function (resolve, reject) {\n $http.get(`${firebaseURL}/user_data/${currentUserData}.json`)\n .success(\n userObj => resolve(userObj),\n error => reject(error)\n )\n });\n }", "title": "" } ]
[ { "docid": "4e09e012bb585829692be8860802497b", "score": "0.7255582", "text": "function getUser() {\n return $http.get('users/current').then(\n function(res) {\n return currentUser = res.data[0];\n }, function(err) {\n notify.error(model, err);\n return $q.reject(err);\n }\n );\n }", "title": "" }, { "docid": "729a9a6fcd67b15d65aae2973ae211aa", "score": "0.7123436", "text": "function getUserInfo() {\n return user;\n }", "title": "" }, { "docid": "eb27933a5ae66d3f37dc10d2d3117e8d", "score": "0.6992579", "text": "get user() {\n return new User(this._data.user, this._client);\n }", "title": "" }, { "docid": "9a59e68c4d26caf3bfe4ff5cad59b09f", "score": "0.69697225", "text": "get user() {\n this._logger.debug(\"user[get]\");\n return this._user;\n }", "title": "" }, { "docid": "8850e0c91e05898d5b43254a9318744f", "score": "0.6882118", "text": "function getUserData() {\n var currentUser = storage.currentUser;\n if(currentUser === undefined) {\n return false;\n } else {\n return JSON.parse($window.atob(storage.currentUser));\n }\n }", "title": "" }, { "docid": "30082ffc7112a1b05e61125327a9eca9", "score": "0.68770665", "text": "getUser() {\n var res = null;\n if(_user === null) {\n if(CookieHandler.getUser().user !== undefined && CookieHandler.getUser().token !== undefined) {\n res = CookieHandler.getUser();\n _user = res;\n }\n } else {\n res = _user;\n }\n return res;\n }", "title": "" }, { "docid": "cdd147b6c59eff0070a135ec4d14b747", "score": "0.6860556", "text": "get user() {\n return new User_1.User(this._data.user, this._client);\n }", "title": "" }, { "docid": "caf0f1bcd972edf6ebc9d8487c8d1a6e", "score": "0.6859988", "text": "async getUser() {\n return (await this._client.helix.users.getUserById(this._data.user));\n }", "title": "" }, { "docid": "77e620327d53540296993e20287e43c1", "score": "0.679446", "text": "function getCurrentUser() {\n if ($rootScope.globals.hasOwnProperty('currentUser')) {\n return $rootScope.globals.currentUser;\n } else {\n return {};\n }\n }", "title": "" }, { "docid": "172c3abaf05bd200289b7899b3de2e57", "score": "0.67785", "text": "async getUser() {\n return (await this._client.helix.users.getUserById(this._data.user_id));\n }", "title": "" }, { "docid": "172c3abaf05bd200289b7899b3de2e57", "score": "0.67785", "text": "async getUser() {\n return (await this._client.helix.users.getUserById(this._data.user_id));\n }", "title": "" }, { "docid": "6e561d25dfbd62cad23701162c11f281", "score": "0.6766655", "text": "function getCurrentUser() {\n if (currentUser != null) {\n return currentUser;\n } else {\n currentUser = $http.get(\"/api/v1/currentUser\")\n .then(getCurrentUserComplete)\n .catch(getCurrentUserFailed);\n\n return currentUser;\n }\n\n function getCurrentUserComplete(response) {\n if (response.data['user']) {\n serverConfig.then(function(config) {\n if (config['fullstoryId']) {\n FS.identify(response.data['user'], {});\n }\n });\n\n return response.data['user'];\n } else {\n return null;\n }\n }\n\n function getCurrentUserFailed(error) {\n console.error(\"API call to get open current user. \" + error.status + \" \" + error.statusText);\n }\n }", "title": "" }, { "docid": "de1652d8623519183957137580708005", "score": "0.6753038", "text": "function getUserInfo() {\n\treturn Hull.currentUser();\n}", "title": "" }, { "docid": "ec8436662637609c73ee9de3398571b8", "score": "0.6720034", "text": "function getCurrentUser() {\n let storage = LocalStorageManager.getStorage();\n\n if (storage.currentLoggedInUserEmail !== null) {\n // the email was not null, so there is a logged in user\n for (let i in storage.users) {\n // loop through all users and find the one with the currentLoggedInUserEmail\n let user = storage.users[i];\n if (user.email == storage.currentLoggedInUserEmail) {\n return user;\n }\n }\n }\n\n // user was not found in users list\n return null;\n }", "title": "" }, { "docid": "61ce417bed23cc892fb0a9ab2cde4d7a", "score": "0.670141", "text": "static getUser() {\r\n var ret;\r\n if (Connection.instance && Connection.instance.user) {\r\n ret = Connection.instance.user;\r\n }\r\n else {\r\n ret = null;\r\n }\r\n return ret;\r\n }", "title": "" }, { "docid": "7b44025e8f9a8899374b8b8f7ea67f16", "score": "0.66840494", "text": "function getCurrentUser(){\n return User.current();\n }", "title": "" }, { "docid": "8dec6ac4b50f5fd150aaacd299bd9ae8", "score": "0.666629", "text": "static getCurrentUser() {\n return this.checkAuthIsVaild() ? localDB.get(USER_STORE_KEY) : null;\n }", "title": "" }, { "docid": "1e25cee1f073c6b5f60cd9d90f44d747", "score": "0.6643433", "text": "getUser() {\n return JSON.parse(localStorage.getItem('currentUser', null));\n }", "title": "" }, { "docid": "d34f92e3614c02467769381d724bdaab", "score": "0.6575548", "text": "static getUser() {\n const data = localStorage.getItem('user');\n return data ? JSON.parse(data) : null;\n }", "title": "" }, { "docid": "668bd833d2c0560280bcf071ebddfd8e", "score": "0.6575491", "text": "function getUser() {\n return JSON.parse(localStorage.getItem(USER_KEY));\n}", "title": "" }, { "docid": "841d6cd724e88e0e7abc518a2d729812", "score": "0.6565018", "text": "async getUser() {\n return new Promise(async resolve => {\n let dbInstance = await this.getDBInstance();\n let transaction = this.getDBTransaction(dbInstance, 'readonly');\n let store = transaction.objectStore('info');\n let user = await store.get('username');\n dbInstance.close();\n resolve(user);\n });\n }", "title": "" }, { "docid": "3262ecb7e8f7fd19f1d46b96c1236247", "score": "0.65433526", "text": "async getCurrentUser() {\n\t\tconst response = await axios.post('/api/auth/user');\n\t\treturn response.data.user;\n\t}", "title": "" }, { "docid": "e1e1085db77f3e0e019f0b6e8535c45f", "score": "0.65231985", "text": "async function getUser()\n\t{\n\t\tawait awaitPending();\n\t\tif(!(user || {}).loggedin)\n\t\t{\n\t\t\ttry\n\t\t\t{\t\t\t\t\n\t\t\t\tconst res = await HTTP.post(\"api/public/who_am_i\");\n\t\t\t\tuser = { username: res.body.username, level: res.body.level, loggedin: true };\n\t\t\t}\n\t\t\tcatch(e)\n\t\t\t{\n\t\t\t\tuser = { username: \"\", level: \"\", loggedin: false };\n\t\t\t}\n\t\t}\n\t\treturn Object.assign({}, user);\n\t}", "title": "" }, { "docid": "369c5b6423d318bd45b2184b575df3dc", "score": "0.6512208", "text": "function getUser() {\n return user;\n}", "title": "" }, { "docid": "f1e1389a10e7e277dc63a62b76fe0aa6", "score": "0.65054893", "text": "getUser() {\n // Returns information on the currently logged in user\n return new Promise((resolve, reject) => {\n this._get('/user').then((response) => { resolve(response) });\n });\n }", "title": "" }, { "docid": "bc2fe1bfc108f946ad57008b3b26a862", "score": "0.6466528", "text": "function getUser() {\n var users = getComponentAccessor().getUserSearchService().findUsersByEmail(authorEmail);\n if (users.isEmpty()) {\n jiraLog.debug(\"Unknown Jira user\");\n } else if (users.size() > 1) {\n jiraLog.debug(\"Ambiguous jira user\");\n } else {\n return users.get(0);\n }\n return null;\n }", "title": "" }, { "docid": "1903603d8d9b8af7a6f50f7edb37e576", "score": "0.64628327", "text": "function currentUser() {\n return baseAuth().one('currentProfil').get();\n }", "title": "" }, { "docid": "ff0a876fc0ee43b9d3a26c0035ba1ee7", "score": "0.6429323", "text": "function getCurrentUser() {\n let config = getAuthConfig();\n return axios.get(constants.CURRENT_USER_URL, config)\n .then(response => response.data)\n}", "title": "" }, { "docid": "21b79c12361f8cf1e2862a451b902115", "score": "0.6427413", "text": "getCurrentUser () { // this . whatever attribute\n return currentUserObject;\n }", "title": "" }, { "docid": "dda39d13f981eaa826003f341357ce42", "score": "0.64197445", "text": "function getUser() {\n var userInSession = apejs.session.getAttribute('user');\n if(userInSession) {\n return userInSession;\n } else { // let's use the remember-me cookie to get user from db\n var cookies = apejs.cookies;\n\n if(!cookies)\n return false;\n \n // find the user cookie\n var userCookie = false;\n for(var i=0; i<cookies.length; i++) {\n if(cookies[i].getName().equals(\"user\")) {\n userCookie = cookies[i];\n }\n }\n\n if(!userCookie) // no user cookie found\n return false;\n\n // get the token (value of cookie)\n var token = userCookie.getValue();\n\n // make sure the token is not an empty string :)\n if(token.equals(\"\") || !token)\n return false;\n\n var t = token.split(':');\n var username = t[0];\n var hashedPassword = t[1];\n\n // check if it exists in datastore\n var arr = rdf.query('users.ttl', 'select * where { ?s a foaf:Person; cov:username ?username; cov:password ?password. FILTER(?username = '+JSON.stringify(''+username)+' && ?password = '+JSON.stringify(''+hashedPassword)+')}')\n\n if(!arr.length) // doesn't exist\n return false;\n\n apejs.session.setAttribute('user', arr[0]);\n\n return arr[0];\n }\n }", "title": "" }, { "docid": "20d30e675f44d118c3687dec0304bf6f", "score": "0.64083064", "text": "currentUser() {\n const storedUser = localStorage.getItem(key);\n if (storedUser === null) {\n return null;\n }\n return JSON.parse(storedUser);\n }", "title": "" }, { "docid": "a4ba79c3ff0a3892580763a25de19316", "score": "0.64028406", "text": "GetUserData() {\n return this.m_userData;\n }", "title": "" }, { "docid": "a4ba79c3ff0a3892580763a25de19316", "score": "0.64028406", "text": "GetUserData() {\n return this.m_userData;\n }", "title": "" }, { "docid": "a4ba79c3ff0a3892580763a25de19316", "score": "0.64028406", "text": "GetUserData() {\n return this.m_userData;\n }", "title": "" }, { "docid": "58a3a183c2ac0f5bacbf185098e82faa", "score": "0.6393273", "text": "function getUser() {\n // Perform a server request to get the user information\n // This request pulls in a JSON with {name: 'Max'}\n // If you're using IdentityVaultInterceptor, the token header will get added automatically for you\n // const userInfoResult = await this.http.get('https://api.myjson.com/bins/7xoye', { observe: 'response' }).toPromise();\n return new Promise(function(resolve){\n setTimeout(() => {\n const user = {\n name: 'Max'\n }\n // Save the user info\n this.setInfo(user);\n resolve(user);\n }, 1000);\n });\n }", "title": "" }, { "docid": "20bfe600136d48fe7efd131459392a67", "score": "0.638341", "text": "getUser() {\n return user;\n }", "title": "" }, { "docid": "6a31d0a60bcfab124e36786a799f2607", "score": "0.6381986", "text": "getCurrentUser() {\n let currentUser = JSON.parse(localStorage.getItem(\"LOGGED_IN_USER\"));\n return currentUser;\n }", "title": "" }, { "docid": "90157bb488afa36d4a23845e67e23c5c", "score": "0.63594174", "text": "getCurrentUser() {\n return JSON.parse(localStorage.getItem('user'));\n }", "title": "" }, { "docid": "94edf858b4b20ec4c840b4d97d64ac6e", "score": "0.6336283", "text": "function getCurrentUser() {\n\t\t\t\n\t\t\t\t// Call the api get current user method..\n\t\t\t\tAPI.getCurrentUser()\n\n\t\t\t\t// then set the current user state to the currente user alaong with their liked names\n\t\t\t\t.then(res => {\n\t\t\t\t\tsetCurrentUser(res.data);\n\t\t\t\t\tsetMyNames(res.data.userLikedNames);\n\t\t\t\t})\n\n\t\t\t\t// If error log error\n\t\t\t\t.catch(error => {\n\t\t\t\t\tconsole.log(error);\n\t\t\t\t});\n\t\t\t\t\n\t\t\t}", "title": "" }, { "docid": "dffd836f977bb4db627b853d133a3e42", "score": "0.62991405", "text": "function getUserData() {\n $.ajax({\n type: \"GET\",\n url: '/current_user.json'\n }).done( function( data ) {\n if ( data !== null ){\n userName = data.name;\n userImageURL = data.image;\n customUserGraphics = true;\n getUserPicture( userImageURL );\n }\n })\n}", "title": "" }, { "docid": "4830eea3cff6eb60b4eabe0d3a9fbe30", "score": "0.62772834", "text": "function getCurrentUser() {\n var _user;\n var _currentUser = store.get('user');\n if(_currentUser) {\n switch (_currentUser.sessionExpiration < Date.now()) {\n // Token expired\n case true:\n store.remove('user');\n _user = null;\n $rootScope.$broadcast('unauthorized');\n break;\n // Token is valid\n case false:\n _user = _currentUser;\n break;\n default:\n store.remove('user');\n _user = null;\n $rootScope.$broadcast('unauthorized');\n }\n }\n return _user;\n }", "title": "" }, { "docid": "6146aea1a025a8bcfcf2bb4f3b8b82f2", "score": "0.6272868", "text": "function getUserObject() {\n\tvar user = {\n\t\t\"id\":elementAPI.user().data.id,\n\t\t\"first_name\":elementAPI.user().data.first_name,\n\t\t\"last_name\":elementAPI.user().data.last_name,\n\t\t\"has_partner\":elementAPI.user().data.has_partner,\n\t\t\"relationship_id\":elementAPI.user().data.partner_relationship_id,\n\t\t\"gender\":elementAPI.user().gender(),\n\t\t\"avatar\":elementAPI.user().avatar()\n\t}\n\n\treturn user;\n}", "title": "" }, { "docid": "ec1e8164c794ca48dcb9890c1e7cf296", "score": "0.62602746", "text": "function getUser () {\r\n if (!user) {\r\n user = helpers.getUser()\r\n }\r\n return user\r\n}", "title": "" }, { "docid": "c9360c8ddd758072fdb0237e8e351af5", "score": "0.623034", "text": "get user() {\n this._logService.debug(\"gsDiggEvent.user[get]\");\n return this._user;\n }", "title": "" }, { "docid": "03df2bff57e793bdb83a17d4a9b4a7e3", "score": "0.6220329", "text": "getCurrentUser() {\n\n return JSON.parse(localStorage.getItem('user'));\n\n }", "title": "" }, { "docid": "1f769b0e05c807c1b733267140fcb425", "score": "0.6211949", "text": "GetUserById(uid) {\n\n let bu = this.DashCore.getuserbyid(uid);\n return bu;\n }", "title": "" }, { "docid": "1c4cd1c695b8ead7b95f30b08db81815", "score": "0.62089306", "text": "function currentUser(user) { \t\n \tvar uploadUrl = \"http://localhost:8081/joinme/user/myProfile\"; \t\n \t\n \tvm.current = $http.get(uploadUrl, {\n \ttransformRequest : angular.identity,\n \theaders : {\n \t'Content-Type' : undefined\n \t}\n \t}).success(function(data) {\n \tconsole.log('success');\n \t$scope.user=data;\n \tconsole.log($scope.user.user_id)\n \t$localStorage.userLogged = $scope.user.userName\n \t$localStorage.userLoggedId = $scope.user.user_id\n \t$localStorage.userRole = $scope.user.userRole\n \tconsole.log(\"current userid\"+$localStorage.userLoggedId)\n \tconsole.log(\"current Role\"+$localStorage.userRole)\n \tconsole.log($localStorage.userLogged)\n //\tvm.updateUserStatus();\n \t\n \t}).error(function() {\n \tconsole.log('error');\n \t});\n \t}", "title": "" }, { "docid": "c12fc9738d464fcc843b98e735593f80", "score": "0.6173785", "text": "function getUser() {\n var user = firebase.auth().currentUser;\n var uid = user.uid;\n return firebase\n .database()\n //Node level user and fetching record where node key = uid\n .ref('/user/' + uid)\n .once(\"value\")\n .then(function(snapshot) {\n var loggedInUser = snapshot.val();\n var username = loggedInUser.uname;\n\n /* .ref(\"user\")\n .once(\"value\")\n .then(function(snapshot) {\n var allUsers = snapshot.val();\n var username = allUsers[user.uid].uname;\n */\n document.getElementById(\"userinfo\").innerHTML = username;\n \n })\n .catch(function(error) {\n console.error('Error reading data from Realtime Database:', error);\n });\n \n}", "title": "" }, { "docid": "da2dc2969761489e197388e3b5687c3d", "score": "0.6134834", "text": "function getCurrentUserData() {\n var found = userData.find(function (userData, index) {\n if (userData.id == user.uid) return true;\n });\n const map = new Map(Object.entries(found.multiCount));\n\n // Magic\n const extra = Array.from(\n [...map.entries()]\n .filter((v) => {\n if (v[1] != 0) {\n return v[0];\n }\n })\n .map(([k]) => k)\n );\n\n found.completed = found.completed.concat(extra);\n setCurrentUserData(found);\n setLoading(false);\n }", "title": "" }, { "docid": "db14f18b72d5be633ac6f4ab7f53878c", "score": "0.61264116", "text": "function getLoggedInUser(userName) {\n \"use strict\";\n\n if (userName !== undefined) {\n return JSON.parse(localStorage.getItem(userName));\n }\n return JSON.parse(localStorage.getItem(\"me\"));\n}", "title": "" }, { "docid": "b0d053d8973b95559a8bc7326f5a3f72", "score": "0.6121312", "text": "getUser () {\n return fireApp.auth().currentUser\n }", "title": "" }, { "docid": "52fc4c42c0c623e51001d6eb36979cca", "score": "0.6116578", "text": "static async getCurrentUser(username) {\n\t\tlet res = await this.request(`users/${username}`);\n\t\treturn res.user;\n\t}", "title": "" }, { "docid": "57b85ee0f665b1124421afed0a632ac6", "score": "0.61059815", "text": "get currentUser() {\n const activeUsers = this.users.filter(user => user.state === exports.UserState.Active);\n if (activeUsers.length === 0) {\n return null;\n }\n else {\n // Current user is the top of the stack\n return activeUsers[0];\n }\n }", "title": "" }, { "docid": "bf3efbfadeff49bc08fc8548142320ba", "score": "0.6104951", "text": "async getUser() {\n if(!this.dn) this.launcher.debugger.error(`This isn't a member state!`);\n return this.launcher.getAccount(this.dn);\n }", "title": "" }, { "docid": "bd06f27e0b97866dd3b6480be6e7888f", "score": "0.6099621", "text": "function getUser(uid) {\n for (var i = 0; i < chatUsers.length; i++) {\n if (chatUsers[i].uid == uid) return chatUsers[i];\n }\n}", "title": "" }, { "docid": "5c1079fdd727c06c5ee78149cf3c53d5", "score": "0.60962236", "text": "function getUserProfile(userId) {\n var deferred = cmnSvc.$q.defer();\n\n fbaseDb.ref('/users/' + userId).once('value')\n .then(function(snapshot) {\n var val = snapshot.val();\n deferred.resolve(val);\n }, function(err) {\n deferred.reject(err);\n })\n\n return deferred.promise;\n }", "title": "" }, { "docid": "b8ebf918045a702fbdf007d5c750229a", "score": "0.60840887", "text": "async getMe() {\n return new PrivilegedUser(await this._client.callApi({ url: 'user', scope: 'user_read' }), this._client);\n }", "title": "" }, { "docid": "75f8ab228f639a34eb4e14fb2d11f875", "score": "0.6082881", "text": "getUserById(userId) { //singleton!\n\t\treturn this._getSingleObject(\n\t\t\t(\n\t\t\t\t'SELECT * FROM user u ' + \n\t\t\t\t'WHERE u.id = :id'\n\t\t\t), \n\t\t\t{\n\t\t\t\tid: userId\n\t\t\t}\n\t\t);\n\t}", "title": "" }, { "docid": "b1b982de00356c79553ebbb66e326a4a", "score": "0.608258", "text": "function getUserLocal(){\n try\n {\n return LocalStorage.getObject(Constants.USER);\n \n }\n catch(err)\n {\n return {};\n }\n }", "title": "" }, { "docid": "10222d7693c6d3b3eacdf6ba1cc6ea82", "score": "0.60782975", "text": "getCurrentUser() {\n return JSON.parse(localStorage.getItem('user'));\n }", "title": "" }, { "docid": "73fb36ae61ba0c9da6d3342dfc817c7d", "score": "0.6068114", "text": "retrieveUser () {\n return apiClient.retrieveUser(storage.getToken())\n }", "title": "" }, { "docid": "656315935afaeb549d0b1c0815626f48", "score": "0.6059733", "text": "function getUser() {\n if (AuthToken.getToken()) {\n return $http.get('/api/me', {cache: true});\n } else {\n return $q.reject({message: 'User has no token.'});\n }\n }", "title": "" }, { "docid": "dbf0180e88156fc6a89d5a9e24f88cb4", "score": "0.6059278", "text": "function currentUser(){\n vm.user = auth.currentUser();\n return vm.user.fullName;\n }", "title": "" }, { "docid": "60c79d5a457344bc5759daecb41440df", "score": "0.60583514", "text": "function getUserId() {\n return firebase.auth().currentUser.uid;\n}", "title": "" }, { "docid": "815885d3bb665ba45d932fbfe4f45c70", "score": "0.6051543", "text": "get user() {\n return this._user;\n }", "title": "" }, { "docid": "158d1c1849befdaf3442f761ce443e7b", "score": "0.6051449", "text": "get currentUser() {\n\t\tthrow new Error(\"currentUser is now accessible via this.context.user in components that specify 'user' in contextTypes\");\n\t}", "title": "" }, { "docid": "5662a5a28e5863efb824388ea5a5cae9", "score": "0.60474", "text": "function get_Current_User(id) {\n return c_users[id];\n}", "title": "" }, { "docid": "710563967bb35ff7a5b02cf6fe707e12", "score": "0.60428244", "text": "getUser(state) {\n\t\treturn state.user;\n\t}", "title": "" }, { "docid": "ca8860c8735afe417645fa77def03108", "score": "0.6042145", "text": "function getUser(context, opt, next) {\n var AccessTokenModel = Member.app.models.AccessToken;\n AccessTokenModel.findForRequest(context.req, {}, function (aux, accesstoken) {\n if (aux || accesstoken === undefined) {\n var err = new Error('Unauthorized user');\n err.status = err.statusCode = 401;\n err.code = 'UNAUTHORIZED_USER';\n next(err);\n } else {\n Member.findById(accesstoken.userId, function (err, user) {\n if(err) {\n next(err);\n }\n if(user.status !== 1) {\n err = new Error('User either inactive or deleted');\n err.status = err.statusCode = 422;\n err.code = 'INACTIVE_OR_DELETED_USER';\n next(err);\n }\n else if(!user.emailVerified) {\n err = new Error('User not verified');\n err.status = err.statusCode = 422;\n err.code = 'UNVERIFIED_USER';\n next(err);\n }\n else {\n context.req.body.user = user;\n next();\n }\n });\n }\n });\n }", "title": "" }, { "docid": "0e820e9aefefb96089f2f9a6bf3dde56", "score": "0.6040514", "text": "getSelectedUser() {\n if (myself.selectedUser) {\n return myself.selectedUser;\n } else {\n return myself.selectUser();\n }\n }", "title": "" }, { "docid": "ebe36ad12de79182e7895f59657070b1", "score": "0.6039263", "text": "function retrieveUser() {\n userService.getUser().then(function (user) {\n vm.user = user;\n });\n }", "title": "" }, { "docid": "290a03b96644fe228bc32d8bf2e010c4", "score": "0.6029979", "text": "function getUserData() {\n \tvar url = getHost() + '/api/me.json';\n\n \t$.ajax({\n \t\turl: url,\n \t\tcontentType: 'application/json',\n \t\tdataType: 'json'\n \t}).success(function(data) {\n \t\trefreshDashboardData(data);\n \t\tgetDataAboutMe(data);\n \t}).error(function(data) {\n \t\tconsole.log(\"Could not retrieve user data\");\n \t});\n }", "title": "" }, { "docid": "f711fba8b184d2f199e1506f05f10fa1", "score": "0.60206556", "text": "function getUser() {\n return $cookies.get('red-hat-cplant-user');\n }", "title": "" }, { "docid": "4c5743be3aa17c283738b3b7af7b334f", "score": "0.6011543", "text": "function getCurrentUser(){\n //var currentUser = sessionStorage['currentUser'];\n //var isLoggedIn = localStorage[IDENTITY_STORAGE_KEY];\n //localStorage[IDENTITY_STORAGE_KEY] = JSON.stringify(response.data);\n if (isAuthenticated()) {\n return JSON.parse(localStorage[IDENTITY_STORAGE_KEY]);\n // return JSON.parse(sessionStorage['currentUser']);\n }\n else{\n $location.path('/');\n }\n }", "title": "" }, { "docid": "966aa8e0e33ca2f51baa13713ea33c57", "score": "0.60100186", "text": "function currentUser(parent, args, context) {\n return User.findById(context.user.id)\n .lean()\n .exec();\n}", "title": "" }, { "docid": "f8ec72969ede88bcd440ce6f98ef2a72", "score": "0.6008261", "text": "async getUserInfo() {\n await this._ensureToken();\n return this.userInfo;\n }", "title": "" }, { "docid": "ad376a76de66fbd2039d63ae0960254a", "score": "0.5980517", "text": "function getUser() {\n\t FB.api('/me', function(response) {\n\t //console.log('getUser', response);\n\t });\n\t}", "title": "" }, { "docid": "ccb94cfeb5fa30bd7964c8238e261c30", "score": "0.59693384", "text": "static async getCurrentUser(username) {\r\n let res = await this.request(`users/${username}`);\r\n return res.user;\r\n }", "title": "" }, { "docid": "ca6b315a1428378d6a97fe25972e64dc", "score": "0.5950015", "text": "static myUser () {\n\n\t\t//TODO: criar no server algo que retorne o user e salvar na localStorage\n\t\t\t// null quando nao estiver logado\n\t\t\n\t\treturn {\n\t\t\tusername: 'mauricionero',\n\t\t\ttoken: 'ttt12345678'\n\t\t};\n\n\t}", "title": "" }, { "docid": "24008c6ec8a61b0307a56684b223c34f", "score": "0.5931719", "text": "static getUser(userName) {\n return userMap.get(userName);\n }", "title": "" }, { "docid": "efdb2e545ec36139ac6b3aea6fe0fc90", "score": "0.59089404", "text": "function retrieveUsername(){\n var userData = firebase.database().ref('users/' + currentUser.uid)\n userData.on('value', (snapshot) => {\n if(snapshot.val()){\n setUsername(snapshot.val().username)\n }\n })\n }", "title": "" }, { "docid": "77f36f64c682ef5f865f3c949d59e7ce", "score": "0.59065187", "text": "static currentUser() {\n return new Promise(function (resolve, reject) {\n try {\n const user = AsyncStorage.getItem('user');\n if(user) {\n resolve(user);\n }\n else {\n Firebase.auth().onAuthStateChanged(function (user) {\n if (user) {\n resolve(this.storeUser(user, 'email'));\n } else {\n reject(Error('No current user'));\n }\n });\n }\n } catch (e) {\n reject(Error(e));\n }\n });\n }", "title": "" }, { "docid": "3b8dea1aaf3ef504bd31b036f616ba85", "score": "0.590496", "text": "getCurrentUser() {\n this.items = this.angularfireDatabase.object(\"/users/\" + this.CLIENTUID).valueChanges();\n return this.items;\n }", "title": "" }, { "docid": "329046a1bc743d0ec5c9637f568549d2", "score": "0.5903883", "text": "function currentUser() {\n return firebase.auth().currentUser;\n}", "title": "" }, { "docid": "1a1673d75932170c61d5b402d3c81210", "score": "0.5884402", "text": "async getUser (userID) {\n\t\tconst method = 'get_user/';\n\t\tconst url = this.host + method + userID;\n\t\tconst options = {\n\t\t\tmethod: 'GET',\n\t\t\theaders: this.headers\n\t\t};\n\n\t\tconst data = await this.myFetch(url, options, 'Provided user ID is not valid');\n\t\treturn await data;\n\t}", "title": "" }, { "docid": "e1c52ea85f58279a231c8f59807fa939", "score": "0.5883239", "text": "_handleRequestUser()\n {\n return this._user;\n }", "title": "" }, { "docid": "04f63b06ea5763a38983f511f219f81e", "score": "0.58823496", "text": "async function getUserInfo(uid) {\r\n\tvar con;\r\n\ttry {\r\n\t\tcon = await pool.aGet();\r\n\t\tvar res = await pool.aQuery(con, 'select id, username, nickname, email, portrait from `user` where id=' + con.escape(uid));\r\n\t\tif(res.length > 0)\r\n\t\t\treturn res[0];\r\n\t\telse\r\n\t\t\treturn null;\r\n\t} catch (err) {\r\n\t\tconsole.error('[Error][MySQL] getuserinfo failed.', uid);\r\n\t\tthrow err;\r\n\t} finally {\r\n\t\tpool.release(con);\r\n\t}\r\n}", "title": "" }, { "docid": "0c3134cf65dc3a4c1f568151bdddcd1f", "score": "0.5863331", "text": "static async getCurrentUser(username) {\r\n let res = await this.request(`users/${username}`);\r\n return res.user;\r\n }", "title": "" }, { "docid": "98e1039717380f026d96fbd9861e3cb1", "score": "0.58605814", "text": "function getUser(req, res) {\n try {\n logActivity(\"getUser\", req.get('userId'), req.get('elevatorID'));\n var objUser = {\n 'countryId': req.query.countryId,\n 'currentUserId': req.get('userId')\n };\n\n dbUser.getUsers(objUser, function (result) {\n if (result.recordset.length > 0) {\n res.send({ \"status\": true, data: result.recordset });\n }\n else {\n res.send({ \"status\": false, data: undefined });\n }\n });\n }\n catch (exception) {\n logException(\"getUser\", exception.message, req.get('userId'));\n res.send({ \"status\": false, \"code\": \"\", data: undefined });\n }\n}", "title": "" }, { "docid": "eaa0cdf89be56ef9a8f3e0b308f821b4", "score": "0.5854178", "text": "function getUserData() {\n \t$('#loginInfo').empty();\n \tvar url = getHost() + '/api/me.json';\n\n \t$.ajax({\n \t\turl: url,\n \t\tcontentType: 'application/json',\n \t\tdataType: 'json'\n \t}).success(function(data) {\n \t\tcheckUserCredentials(data);\n \t\twriteLoggedInUser(data);\n \t}).error(function(data) {\n \t\tconsole.log(\"Error...\");\n \t});\n }", "title": "" }, { "docid": "2e22e456c1d66937a02645e7685cd10e", "score": "0.5847466", "text": "function getUser() {\r\n var user = localStorage.getItem(\"user\");\r\n if(user != null) {\r\n return JSON.parse(user);\r\n }\r\n else {\r\n return false;\r\n }\r\n}", "title": "" }, { "docid": "33dc007897fa633eca10c394b618703d", "score": "0.58432645", "text": "function getUser() {\n loginRedirect()\n .then(resp=>{\n if (resp){\n const [user,error] = resp\n setUser({\n user,\n error\n })\n }else{\n console.log(\"getUser...empty response...\", resp)\n }\n })\n }", "title": "" }, { "docid": "9599e7ac37eeecf3f2dd5d2adfaa6c9e", "score": "0.5841458", "text": "getCurrentUserFromContext(ctx) {\n return ctx.currentUser;\n }", "title": "" }, { "docid": "3aa64c30f5bec1b464fc18f263c11b26", "score": "0.5835009", "text": "currentUser () {\n return this._libraryInit('auth2')\n .then(auth => {\n if (auth.isSignedIn.get()) {\n return Promise.resolve(_formatUser(auth.currentUser.get()))\n } else {\n return Promise.resolve(null)\n }\n })\n }", "title": "" }, { "docid": "3aa64c30f5bec1b464fc18f263c11b26", "score": "0.5835009", "text": "currentUser () {\n return this._libraryInit('auth2')\n .then(auth => {\n if (auth.isSignedIn.get()) {\n return Promise.resolve(_formatUser(auth.currentUser.get()))\n } else {\n return Promise.resolve(null)\n }\n })\n }", "title": "" }, { "docid": "1bffa9f35be08181e1496bc06fafadb3", "score": "0.58341503", "text": "get userId() {\n return this._data.user;\n }", "title": "" }, { "docid": "841457a7b76556c0e1e026ed782220ae", "score": "0.5829332", "text": "getCurrentUser() {\n return new Promise((resolve, reject) => {\n fetch(`${env.base_url}/api/user`, {\n credentials: 'include',\n })\n .then((response) => response.json())\n .then((user) => {\n return resolve(user)\n })\n .catch(() => {\n return reject()\n })\n })\n }", "title": "" }, { "docid": "09fc8768329a368b303581d9a818bfb0", "score": "0.5823015", "text": "async function getUser() {\r\n\t\tconst {query = {}} = props;\r\n\t\tconst {data: {success, user}} = await api.get(\"/user\", {\r\n\t\t\tparams: {...query}\r\n\t\t});\r\n\r\n\t\tif (success && user) {\r\n\t\t\tsetUser(user);\r\n\t\t\tprops.foundUser && props.foundUser(user);\r\n\t\t}\r\n\t\tsetLoading(false);\r\n\t}", "title": "" }, { "docid": "d7ad098bca9208be43b8239db8affe73", "score": "0.58223397", "text": "getAuthUser(isLocalStorage){\n if (isLocalStorage && this.isLoggedIn()) {\n try {\n return JSON.parse(CryptoJS.AES.decrypt(localStorage.getItem(\"AUDS\"), 'kskfdste').toString(CryptoJS.enc.Utf8));\n } catch (Exception) {\n this.logout();\n }\n }else if(this.isLoggedIn() && !this.authUser){\n this.setAuthUser();\n }\n\n return this.authUser;\n }", "title": "" }, { "docid": "a08a7cfa3d6c7387c48b7b7ad1d066f9", "score": "0.58219653", "text": "function _getUser() {\n if (AuthToken.getToken())\n return $http.get('http://localhost:8888/api/me', {\n cache: true\n });\n else\n return $q.reject({\n message: 'User has no token.'\n });\n }", "title": "" } ]
ee32b32206f5a9fff26ce24361a3fba3
TODO rather than specialcase polygons, simply handle them separately. Ideally, coincident intersection points should be jittered to avoid clipping issues.
[ { "docid": "9eea9eb0268381c986d65534acef947c", "score": "0.0", "text": "function lineEnd() {\n if (segments) {\n linePoint(x__, y__);\n if (v__ && v_) bufferStream.rejoin();\n segments.push(bufferStream.result());\n }\n clipStream.point = point;\n if (v_) activeStream.lineEnd();\n }", "title": "" } ]
[ { "docid": "9a4021709bff000bb41a14820ff67192", "score": "0.7063792", "text": "function intersectsPolygon(a, b) {\n var p = a;\n do {\n if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n intersects(p, p.next, a, b)) return true;\n p = p.next;\n } while (p !== a);\n\n return false;\n }", "title": "" }, { "docid": "096126a9de78f82fcbd254863a2c343a", "score": "0.70030093", "text": "intersects(shape)\r\n {\r\n let thisPoly = new Polygon(this.getPoints())\r\n if(shape instanceof Polygon)\r\n {\r\n return thisPoly.intersects(shape)\r\n }\r\n else\r\n {\r\n let rangePoly = new Polygon(this.getPoints())\r\n return thisPoly.intersects(rangePoly)\r\n }\r\n \r\n }", "title": "" }, { "docid": "8591135c0debbfd64b1af36e1e19b35c", "score": "0.698029", "text": "intersectsWith(other) {\n let axis = { x: 0, y: 0 };\n let tmp, minA, maxA, minB, maxB;\n let side, i;\n let smallest = null;\n let overlap = 99999999;\n\n /* test polygon A's sides */\n for (side = 0; side < this.getNumberOfSides(); side++) {\n /* get the axis that we will project onto */\n if (side == 0) {\n axis.x = this.points[this.getNumberOfSides() - 1].y - this.points[0].y;\n axis.y = this.points[0].x - this.points[this.getNumberOfSides() - 1].x;\n } else {\n axis.x = this.points[side - 1].y - this.points[side].y;\n axis.y = this.points[side].x - this.points[side - 1].x;\n }\n\n /* normalize the axis */\n tmp = Math.sqrt(axis.x * axis.x + axis.y * axis.y);\n axis.x /= tmp;\n axis.y /= tmp;\n\n /* project polygon A onto axis to determine the min/max */\n minA = maxA = this.points[0].x * axis.x + this.points[0].y * axis.y;\n for (i = 1; i < this.getNumberOfSides(); i++) {\n tmp = this.points[i].x * axis.x + this.points[i].y * axis.y;\n if (tmp > maxA) maxA = tmp;\n else if (tmp < minA) minA = tmp;\n }\n /* correct for offset */\n tmp = this.center.x * axis.x + this.center.y * axis.y;\n minA += tmp;\n maxA += tmp;\n\n /* project polygon B onto axis to determine the min/max */\n minB = maxB = other.points[0].x * axis.x + other.points[0].y * axis.y;\n for (i = 1; i < other.getNumberOfSides(); i++) {\n tmp = other.points[i].x * axis.x + other.points[i].y * axis.y;\n if (tmp > maxB) maxB = tmp;\n else if (tmp < minB) minB = tmp;\n }\n /* correct for offset */\n tmp = other.center.x * axis.x + other.center.y * axis.y;\n minB += tmp;\n maxB += tmp;\n\n /* test if lines intersect, if not, return false */\n if (maxA < minB || minA > maxB) {\n return false\n } else {\n let o = maxA > maxB ? maxB - minA : maxA - minB;\n if (o < overlap) {\n overlap = o;\n smallest = { x: axis.x, y: axis.y };\n }\n }\n }\n\n /* test polygon B's sides */\n for (side = 0; side < other.getNumberOfSides(); side++) {\n /* get the axis that we will project onto */\n if (side == 0) {\n axis.x = other.points[other.getNumberOfSides() - 1].y - other.points[0].y;\n axis.y = other.points[0].x - other.points[other.getNumberOfSides() - 1].x;\n } else {\n axis.x = other.points[side - 1].y - other.points[side].y;\n axis.y = other.points[side].x - other.points[side - 1].x;\n }\n\n /* normalize the axis */\n tmp = Math.sqrt(axis.x * axis.x + axis.y * axis.y);\n axis.x /= tmp;\n axis.y /= tmp;\n\n /* project polygon A onto axis to determine the min/max */\n minA = maxA = this.points[0].x * axis.x + this.points[0].y * axis.y;\n for (i = 1; i < this.getNumberOfSides(); i++) {\n tmp = this.points[i].x * axis.x + this.points[i].y * axis.y;\n if (tmp > maxA) maxA = tmp;\n else if (tmp < minA) minA = tmp;\n }\n /* correct for offset */\n tmp = this.center.x * axis.x + this.center.y * axis.y;\n minA += tmp;\n maxA += tmp;\n\n /* project polygon B onto axis to determine the min/max */\n minB = maxB = other.points[0].x * axis.x + other.points[0].y * axis.y;\n for (i = 1; i < other.getNumberOfSides(); i++) {\n tmp = other.points[i].x * axis.x + other.points[i].y * axis.y;\n if (tmp > maxB) maxB = tmp;\n else if (tmp < minB) minB = tmp;\n }\n /* correct for offset */\n tmp = other.center.x * axis.x + other.center.y * axis.y;\n minB += tmp;\n maxB += tmp;\n\n /* test if lines intersect, if not, return false */\n if (maxA < minB || minA > maxB) {\n return false\n } else {\n let o = maxA > maxB ? maxB - minA : maxA - minB;\n if (o < overlap) {\n overlap = o;\n smallest = { x: axis.x, y: axis.y };\n }\n }\n }\n return { overlap: overlap + 0.001, axis: smallest }\n }", "title": "" }, { "docid": "98a233cc4b9c70f992908dad9a0bd098", "score": "0.69431394", "text": "function intersectsPolygon(a, b) {\n\t\t var p = a;\n\t\t do {\n\t\t if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n\t\t intersects(p, p.next, a, b)) { return true; }\n\t\t p = p.next;\n\t\t } while (p !== a);\n\n\t\t return false;\n\t\t}", "title": "" }, { "docid": "94c56eb70482417785891c6bb3af077d", "score": "0.6929379", "text": "function clipPolygon(segments, compareIntersection, startInside, interpolate, stream) {\n\t\t var subject = [],\n\t\t clip = [],\n\t\t i,\n\t\t n;\n\n\t\t segments.forEach(function(segment) {\n\t\t if ((n = segment.length - 1) <= 0) return;\n\t\t var n, p0 = segment[0], p1 = segment[n], x;\n\n\t\t // If the first and last points of a segment are coincident, then treat as a\n\t\t // closed ring. TODO if all rings are closed, then the winding order of the\n\t\t // exterior ring should be checked.\n\t\t if (pointEqual(p0, p1)) {\n\t\t stream.lineStart();\n\t\t for (i = 0; i < n; ++i) stream.point((p0 = segment[i])[0], p0[1]);\n\t\t stream.lineEnd();\n\t\t return;\n\t\t }\n\n\t\t subject.push(x = new Intersection(p0, segment, null, true));\n\t\t clip.push(x.o = new Intersection(p0, null, x, false));\n\t\t subject.push(x = new Intersection(p1, segment, null, false));\n\t\t clip.push(x.o = new Intersection(p1, null, x, true));\n\t\t });\n\n\t\t if (!subject.length) return;\n\n\t\t clip.sort(compareIntersection);\n\t\t link$1(subject);\n\t\t link$1(clip);\n\n\t\t for (i = 0, n = clip.length; i < n; ++i) {\n\t\t clip[i].e = startInside = !startInside;\n\t\t }\n\n\t\t var start = subject[0],\n\t\t points,\n\t\t point;\n\n\t\t while (1) {\n\t\t // Find first unvisited intersection.\n\t\t var current = start,\n\t\t isSubject = true;\n\t\t while (current.v) if ((current = current.n) === start) return;\n\t\t points = current.z;\n\t\t stream.lineStart();\n\t\t do {\n\t\t current.v = current.o.v = true;\n\t\t if (current.e) {\n\t\t if (isSubject) {\n\t\t for (i = 0, n = points.length; i < n; ++i) stream.point((point = points[i])[0], point[1]);\n\t\t } else {\n\t\t interpolate(current.x, current.n.x, 1, stream);\n\t\t }\n\t\t current = current.n;\n\t\t } else {\n\t\t if (isSubject) {\n\t\t points = current.p.z;\n\t\t for (i = points.length - 1; i >= 0; --i) stream.point((point = points[i])[0], point[1]);\n\t\t } else {\n\t\t interpolate(current.x, current.p.x, -1, stream);\n\t\t }\n\t\t current = current.p;\n\t\t }\n\t\t current = current.o;\n\t\t points = current.z;\n\t\t isSubject = !isSubject;\n\t\t } while (!current.v);\n\t\t stream.lineEnd();\n\t\t }\n\t\t }", "title": "" }, { "docid": "3199b7890f371e561a7e6333a8db1e91", "score": "0.69278437", "text": "function intersectsPolygon(a, b) {\n\t\t var p = a;\n\t\t do {\n\t\t if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n\t\t intersects(p, p.next, a, b)) return true;\n\t\t p = p.next;\n\t\t } while (p !== a);\n\t\n\t\t return false;\n\t\t}", "title": "" }, { "docid": "266cb139245441bb9652eaad5d18967d", "score": "0.68857735", "text": "function intersectsPolygon$4(a, b) {\n var p = a;\n do {\n if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n intersects$5(p, p.next, a, b)) return true;\n p = p.next;\n } while (p !== a);\n\n return false;\n}", "title": "" }, { "docid": "d9b5f2c4dfb3d1aefd90c2738d69cd88", "score": "0.68739295", "text": "function intersectsPolygon(a, b) {\n var p = a;\n do {\n if (\n p.i !== a.i &&\n p.next.i !== a.i &&\n p.i !== b.i &&\n p.next.i !== b.i &&\n intersects(p, p.next, a, b)\n )\n return true;\n p = p.next;\n } while (p !== a);\n \n return false;\n }", "title": "" }, { "docid": "941b77d64b60b974b12df1acca6da288", "score": "0.68600774", "text": "function intersectsPolygon(a, b) {\n\t var p = a;\n\t do {\n\t if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n\t intersects(p, p.next, a, b)) { return true; }\n\t p = p.next;\n\t } while (p !== a);\n\n\t return false;\n\t}", "title": "" }, { "docid": "afc52f9728b7d30730f58d18a621d170", "score": "0.6850942", "text": "function intersectsPolygon(a, b) {\n\t var p = a;\n\t do {\n\t if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n\t intersects(p, p.next, a, b)) return true;\n\t p = p.next;\n\t } while (p !== a);\n\n\t return false;\n\t}", "title": "" }, { "docid": "afc52f9728b7d30730f58d18a621d170", "score": "0.6850942", "text": "function intersectsPolygon(a, b) {\n\t var p = a;\n\t do {\n\t if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n\t intersects(p, p.next, a, b)) return true;\n\t p = p.next;\n\t } while (p !== a);\n\n\t return false;\n\t}", "title": "" }, { "docid": "afc52f9728b7d30730f58d18a621d170", "score": "0.6850942", "text": "function intersectsPolygon(a, b) {\n\t var p = a;\n\t do {\n\t if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n\t intersects(p, p.next, a, b)) return true;\n\t p = p.next;\n\t } while (p !== a);\n\n\t return false;\n\t}", "title": "" }, { "docid": "d30eae306db7056ed80cf30037140c3e", "score": "0.68361056", "text": "function intersectsPolygon(a, b) {\n var p = a;\n\n do {\n if (\n p.i !== a.i &&\n p.next.i !== a.i &&\n p.i !== b.i &&\n p.next.i !== b.i &&\n intersects(p, p.next, a, b)\n ) {\n return true;\n }\n\n p = p.next;\n } while (p !== a);\n\n return false;\n }", "title": "" }, { "docid": "26258cc70da989d50e2c0e0528e82644", "score": "0.6832306", "text": "function intersectsPolygon(a, b) {\n var p = a;\n do {\n if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i && intersects(p, p.next, a, b))\n { return true; }\n p = p.next;\n } while (p !== a);\n return false;\n}", "title": "" }, { "docid": "a848519d141d0d630564ab25d08e660f", "score": "0.6832048", "text": "function PolyIntersect(polyArray)\n{\n var pUnion = polyArray[0]; //Using npm Polygon.clip package\n for(var p in polyArray)\n {\n var pC = clip(p);\n pUnion = pC.clip(pUnion, 'union');\n }\n return pUnion;\n}", "title": "" }, { "docid": "a96b2f2cf4c3fc0d69ca7284228754a8", "score": "0.6827409", "text": "function intersectsPolygon(a, b) {\n\t var p = a;\n\t do {\n\t if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n\t intersects(p, p.next, a, b)) return true;\n\t p = p.next;\n\t } while (p !== a);\n\t\n\t return false;\n\t}", "title": "" }, { "docid": "a96b2f2cf4c3fc0d69ca7284228754a8", "score": "0.6827409", "text": "function intersectsPolygon(a, b) {\n\t var p = a;\n\t do {\n\t if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n\t intersects(p, p.next, a, b)) return true;\n\t p = p.next;\n\t } while (p !== a);\n\t\n\t return false;\n\t}", "title": "" }, { "docid": "e64d583bfe0830fcd8ecd4d527ce86af", "score": "0.6812073", "text": "function clipPolygon(segments, compareIntersection, startInside, interpolate, stream) {\n \t var subject = [],\n \t clip = [],\n \t i,\n \t n;\n\n \t segments.forEach(function(segment) {\n \t if ((n = segment.length - 1) <= 0) return;\n \t var n, p0 = segment[0], p1 = segment[n], x;\n\n \t // If the first and last points of a segment are coincident, then treat as a\n \t // closed ring. TODO if all rings are closed, then the winding order of the\n \t // exterior ring should be checked.\n \t if (pointEqual(p0, p1)) {\n \t stream.lineStart();\n \t for (i = 0; i < n; ++i) stream.point((p0 = segment[i])[0], p0[1]);\n \t stream.lineEnd();\n \t return;\n \t }\n\n \t subject.push(x = new Intersection(p0, segment, null, true));\n \t clip.push(x.o = new Intersection(p0, null, x, false));\n \t subject.push(x = new Intersection(p1, segment, null, false));\n \t clip.push(x.o = new Intersection(p1, null, x, true));\n \t });\n\n \t if (!subject.length) return;\n\n \t clip.sort(compareIntersection);\n \t link(subject);\n \t link(clip);\n\n \t for (i = 0, n = clip.length; i < n; ++i) {\n \t clip[i].e = startInside = !startInside;\n \t }\n\n \t var start = subject[0],\n \t points,\n \t point;\n\n \t while (1) {\n \t // Find first unvisited intersection.\n \t var current = start,\n \t isSubject = true;\n \t while (current.v) if ((current = current.n) === start) return;\n \t points = current.z;\n \t stream.lineStart();\n \t do {\n \t current.v = current.o.v = true;\n \t if (current.e) {\n \t if (isSubject) {\n \t for (i = 0, n = points.length; i < n; ++i) stream.point((point = points[i])[0], point[1]);\n \t } else {\n \t interpolate(current.x, current.n.x, 1, stream);\n \t }\n \t current = current.n;\n \t } else {\n \t if (isSubject) {\n \t points = current.p.z;\n \t for (i = points.length - 1; i >= 0; --i) stream.point((point = points[i])[0], point[1]);\n \t } else {\n \t interpolate(current.x, current.p.x, -1, stream);\n \t }\n \t current = current.p;\n \t }\n \t current = current.o;\n \t points = current.z;\n \t isSubject = !isSubject;\n \t } while (!current.v);\n \t stream.lineEnd();\n \t }\n \t}", "title": "" }, { "docid": "bd95efb666483b8552b6384445bbe025", "score": "0.67967457", "text": "function intersectsPolygon ( a, b )\r\n {\r\n var p = a;\r\n do\r\n {\r\n if ( p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\r\n intersects( p, p.next, a, b ) ) {return true;}\r\n p = p.next;\r\n } while ( p !== a );\r\n\r\n return false;\r\n }", "title": "" }, { "docid": "531d4e77ae5f81db56a9c8c4281d0473", "score": "0.67937934", "text": "function intersectsPolygon( a, b ) {\n\n \tvar p = a;\n \tdo {\n\n \t\tif ( p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n \t\t\t\tintersects( p, p.next, a, b ) ) return true;\n \t\tp = p.next;\n\n \t} while ( p !== a );\n\n \treturn false;\n\n }", "title": "" }, { "docid": "3c7960ef67450b5e5a23f259cb4a79c4", "score": "0.6773428", "text": "function intersectsPolygon(a, b) {\n var p = a;\n do {\n if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n intersects(p, p.next, a, b)) return true;\n p = p.next;\n } while (p !== a);\n\n return false;\n}", "title": "" }, { "docid": "3c7960ef67450b5e5a23f259cb4a79c4", "score": "0.6773428", "text": "function intersectsPolygon(a, b) {\n var p = a;\n do {\n if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n intersects(p, p.next, a, b)) return true;\n p = p.next;\n } while (p !== a);\n\n return false;\n}", "title": "" }, { "docid": "3c7960ef67450b5e5a23f259cb4a79c4", "score": "0.6773428", "text": "function intersectsPolygon(a, b) {\n var p = a;\n do {\n if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n intersects(p, p.next, a, b)) return true;\n p = p.next;\n } while (p !== a);\n\n return false;\n}", "title": "" }, { "docid": "3c7960ef67450b5e5a23f259cb4a79c4", "score": "0.6773428", "text": "function intersectsPolygon(a, b) {\n var p = a;\n do {\n if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n intersects(p, p.next, a, b)) return true;\n p = p.next;\n } while (p !== a);\n\n return false;\n}", "title": "" }, { "docid": "3c7960ef67450b5e5a23f259cb4a79c4", "score": "0.6773428", "text": "function intersectsPolygon(a, b) {\n var p = a;\n do {\n if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n intersects(p, p.next, a, b)) return true;\n p = p.next;\n } while (p !== a);\n\n return false;\n}", "title": "" }, { "docid": "3c7960ef67450b5e5a23f259cb4a79c4", "score": "0.6773428", "text": "function intersectsPolygon(a, b) {\n var p = a;\n do {\n if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n intersects(p, p.next, a, b)) return true;\n p = p.next;\n } while (p !== a);\n\n return false;\n}", "title": "" }, { "docid": "3c7960ef67450b5e5a23f259cb4a79c4", "score": "0.6773428", "text": "function intersectsPolygon(a, b) {\n var p = a;\n do {\n if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n intersects(p, p.next, a, b)) return true;\n p = p.next;\n } while (p !== a);\n\n return false;\n}", "title": "" }, { "docid": "3c7960ef67450b5e5a23f259cb4a79c4", "score": "0.6773428", "text": "function intersectsPolygon(a, b) {\n var p = a;\n do {\n if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n intersects(p, p.next, a, b)) return true;\n p = p.next;\n } while (p !== a);\n\n return false;\n}", "title": "" }, { "docid": "3c7960ef67450b5e5a23f259cb4a79c4", "score": "0.6773428", "text": "function intersectsPolygon(a, b) {\n var p = a;\n do {\n if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n intersects(p, p.next, a, b)) return true;\n p = p.next;\n } while (p !== a);\n\n return false;\n}", "title": "" }, { "docid": "3c7960ef67450b5e5a23f259cb4a79c4", "score": "0.6773428", "text": "function intersectsPolygon(a, b) {\n var p = a;\n do {\n if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n intersects(p, p.next, a, b)) return true;\n p = p.next;\n } while (p !== a);\n\n return false;\n}", "title": "" }, { "docid": "3c7960ef67450b5e5a23f259cb4a79c4", "score": "0.6773428", "text": "function intersectsPolygon(a, b) {\n var p = a;\n do {\n if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n intersects(p, p.next, a, b)) return true;\n p = p.next;\n } while (p !== a);\n\n return false;\n}", "title": "" }, { "docid": "3c7960ef67450b5e5a23f259cb4a79c4", "score": "0.6773428", "text": "function intersectsPolygon(a, b) {\n var p = a;\n do {\n if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n intersects(p, p.next, a, b)) return true;\n p = p.next;\n } while (p !== a);\n\n return false;\n}", "title": "" }, { "docid": "3c7960ef67450b5e5a23f259cb4a79c4", "score": "0.6773428", "text": "function intersectsPolygon(a, b) {\n var p = a;\n do {\n if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n intersects(p, p.next, a, b)) return true;\n p = p.next;\n } while (p !== a);\n\n return false;\n}", "title": "" }, { "docid": "3c7960ef67450b5e5a23f259cb4a79c4", "score": "0.6773428", "text": "function intersectsPolygon(a, b) {\n var p = a;\n do {\n if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n intersects(p, p.next, a, b)) return true;\n p = p.next;\n } while (p !== a);\n\n return false;\n}", "title": "" }, { "docid": "3c7960ef67450b5e5a23f259cb4a79c4", "score": "0.6773428", "text": "function intersectsPolygon(a, b) {\n var p = a;\n do {\n if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n intersects(p, p.next, a, b)) return true;\n p = p.next;\n } while (p !== a);\n\n return false;\n}", "title": "" }, { "docid": "3c7960ef67450b5e5a23f259cb4a79c4", "score": "0.6773428", "text": "function intersectsPolygon(a, b) {\n var p = a;\n do {\n if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n intersects(p, p.next, a, b)) return true;\n p = p.next;\n } while (p !== a);\n\n return false;\n}", "title": "" }, { "docid": "3c7960ef67450b5e5a23f259cb4a79c4", "score": "0.6773428", "text": "function intersectsPolygon(a, b) {\n var p = a;\n do {\n if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n intersects(p, p.next, a, b)) return true;\n p = p.next;\n } while (p !== a);\n\n return false;\n}", "title": "" }, { "docid": "3c7960ef67450b5e5a23f259cb4a79c4", "score": "0.6773428", "text": "function intersectsPolygon(a, b) {\n var p = a;\n do {\n if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n intersects(p, p.next, a, b)) return true;\n p = p.next;\n } while (p !== a);\n\n return false;\n}", "title": "" }, { "docid": "3c7960ef67450b5e5a23f259cb4a79c4", "score": "0.6773428", "text": "function intersectsPolygon(a, b) {\n var p = a;\n do {\n if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n intersects(p, p.next, a, b)) return true;\n p = p.next;\n } while (p !== a);\n\n return false;\n}", "title": "" }, { "docid": "3c7960ef67450b5e5a23f259cb4a79c4", "score": "0.6773428", "text": "function intersectsPolygon(a, b) {\n var p = a;\n do {\n if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n intersects(p, p.next, a, b)) return true;\n p = p.next;\n } while (p !== a);\n\n return false;\n}", "title": "" }, { "docid": "3f85d475581d1c0df8bcaa69d6fe7385", "score": "0.67687804", "text": "function checkPolygonPolygonIntersections(pol0, pol1){\n\tvar intersections = [];\n\tfor(var i=0, j=pol0.length-1; i<pol0.length; j=i,i++){\n\t\tvar nlin = PointPoint2Line(pol0[i], pol0[j]);\n\t\tvar r = checkPolygonLineIntersections(pol1, nlin);\n\t\tintersections = intersections.concat(r);\n\t}\n\treturn intersections;\n}", "title": "" }, { "docid": "a3515c8ad32d36482fc3c72800ec9aa4", "score": "0.6764667", "text": "function intersectsPolygon(a, b) {\n var p = a;\n do {\n if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n intersects(p, p.next, a, b)) return true;\n p = p.next;\n } while (p !== a);\n\n return false;\n }", "title": "" }, { "docid": "b52319594eb808d2e1314ec3afe2ffde", "score": "0.67643285", "text": "function intersectsPolygon(a, b) {\n var p = a;\n do {\n if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n intersects$2(p, p.next, a, b)) return true;\n p = p.next;\n } while (p !== a);\n\n return false;\n}", "title": "" }, { "docid": "fca6a91475fd08a6c5e44987f9d4055c", "score": "0.6762244", "text": "function intersectsPolygon(a, b) {\n var p = a;\n do {\n if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n intersects(p, p.next, a, b)) return true;\n p = p.next;\n } while (p !== a);\n\n return false;\n }", "title": "" }, { "docid": "fca6a91475fd08a6c5e44987f9d4055c", "score": "0.6762244", "text": "function intersectsPolygon(a, b) {\n var p = a;\n do {\n if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n intersects(p, p.next, a, b)) return true;\n p = p.next;\n } while (p !== a);\n\n return false;\n }", "title": "" }, { "docid": "42c5b1b8e0a7c073cf7a95e48a1ecf06", "score": "0.6748235", "text": "function intersectsPolygon$1(a, b) {\n var p = a;\n do {\n if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n intersects$2(p, p.next, a, b)) return true;\n p = p.next;\n } while (p !== a);\n\n return false;\n}", "title": "" }, { "docid": "be30928da856ad9bc7f46a35523f09f0", "score": "0.67292106", "text": "function intersectsPolygon$3(a, b) {\n var p = a;\n do {\n if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n intersects$2$1(p, p.next, a, b)) return true;\n p = p.next;\n } while (p !== a);\n\n return false;\n}", "title": "" }, { "docid": "1e101e83974c3048ecda0faf18e74ba4", "score": "0.6665732", "text": "function intersectsPolygon(a, b) {\n\n\tvar p = a;\n\n\tdo {\n\n\t\tif (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i && intersects(p, p.next, a, b)) {\n\n\t\t\treturn true;\n\t\t}\n\n\t\tp = p.next;\n\t} while (p !== a);\n\n\treturn false;\n}", "title": "" }, { "docid": "b713df90dbc79bdda3134cd2e3d9e7c5", "score": "0.66617954", "text": "function intersectsPolygon( a, b ) {\n\n\tlet p = a;\n\tdo {\n\n\t\tif ( p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n\t\t\t\tintersects( p, p.next, a, b ) ) return true;\n\t\tp = p.next;\n\n\t} while ( p !== a );\n\n\treturn false;\n\n}", "title": "" }, { "docid": "b713df90dbc79bdda3134cd2e3d9e7c5", "score": "0.66617954", "text": "function intersectsPolygon( a, b ) {\n\n\tlet p = a;\n\tdo {\n\n\t\tif ( p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n\t\t\t\tintersects( p, p.next, a, b ) ) return true;\n\t\tp = p.next;\n\n\t} while ( p !== a );\n\n\treturn false;\n\n}", "title": "" }, { "docid": "2623979f4eb31d6198ab2bd337344e75", "score": "0.66598743", "text": "function intersectsPolygon( a, b ) {\n\n\tlet p = a;\n\tdo {\n\n\t\tif ( p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n\t\t\tintersects( p, p.next, a, b ) ) return true;\n\t\tp = p.next;\n\n\t} while ( p !== a );\n\n\treturn false;\n\n}", "title": "" }, { "docid": "7e27f60a383408485944da51cebac397", "score": "0.664243", "text": "function intersectsPolygon( a, b ) {\n\n\t\tvar p = a;\n\t\tdo {\n\n\t\t\tif ( p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n\t\t\t\t\tintersects( p, p.next, a, b ) ) { return true; }\n\t\t\tp = p.next;\n\n\t\t} while ( p !== a );\n\n\t\treturn false;\n\n\t}", "title": "" }, { "docid": "7e27f60a383408485944da51cebac397", "score": "0.664243", "text": "function intersectsPolygon( a, b ) {\n\n\t\tvar p = a;\n\t\tdo {\n\n\t\t\tif ( p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n\t\t\t\t\tintersects( p, p.next, a, b ) ) { return true; }\n\t\t\tp = p.next;\n\n\t\t} while ( p !== a );\n\n\t\treturn false;\n\n\t}", "title": "" }, { "docid": "7e27f60a383408485944da51cebac397", "score": "0.664243", "text": "function intersectsPolygon( a, b ) {\n\n\t\tvar p = a;\n\t\tdo {\n\n\t\t\tif ( p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n\t\t\t\t\tintersects( p, p.next, a, b ) ) { return true; }\n\t\t\tp = p.next;\n\n\t\t} while ( p !== a );\n\n\t\treturn false;\n\n\t}", "title": "" }, { "docid": "7e27f60a383408485944da51cebac397", "score": "0.664243", "text": "function intersectsPolygon( a, b ) {\n\n\t\tvar p = a;\n\t\tdo {\n\n\t\t\tif ( p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n\t\t\t\t\tintersects( p, p.next, a, b ) ) { return true; }\n\t\t\tp = p.next;\n\n\t\t} while ( p !== a );\n\n\t\treturn false;\n\n\t}", "title": "" }, { "docid": "5b2d1395fefcedd56dc2d68886804adc", "score": "0.6615902", "text": "function intersectsPolygon( a, b ) {\n\n\tvar p = a;\n\tdo {\n\n\t\tif ( p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n\t\t\t\tintersects( p, p.next, a, b ) ) return true;\n\t\tp = p.next;\n\n\t} while ( p !== a );\n\n\treturn false;\n\n}", "title": "" }, { "docid": "5b2d1395fefcedd56dc2d68886804adc", "score": "0.6615902", "text": "function intersectsPolygon( a, b ) {\n\n\tvar p = a;\n\tdo {\n\n\t\tif ( p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n\t\t\t\tintersects( p, p.next, a, b ) ) return true;\n\t\tp = p.next;\n\n\t} while ( p !== a );\n\n\treturn false;\n\n}", "title": "" }, { "docid": "5b2d1395fefcedd56dc2d68886804adc", "score": "0.6615902", "text": "function intersectsPolygon( a, b ) {\n\n\tvar p = a;\n\tdo {\n\n\t\tif ( p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n\t\t\t\tintersects( p, p.next, a, b ) ) return true;\n\t\tp = p.next;\n\n\t} while ( p !== a );\n\n\treturn false;\n\n}", "title": "" }, { "docid": "bd86964ad718da6afee41a961cae14a2", "score": "0.6574627", "text": "function intersectsPolygon(data, start, a, b) {\n var node = start;\n do {\n var p1 = node.i,\n p2 = node.next.i;\n\n if (p1 !== a && p2 !== a && p1 !== b && p2 !== b && intersects(data, p1, p2, a, b)) return true;\n\n node = node.next;\n } while (node !== start);\n\n return false;\n}", "title": "" }, { "docid": "685b61e9e22aeff0844c53a22638762f", "score": "0.6569151", "text": "function intersectsPolygon( a, b ) {\n\n\t\tvar p = a;\n\n\t\tdo {\n\n\t\t\tif ( p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n\t\t\t\t\t\t\tintersects( p, p.next, a, b ) ) {\n\n\t\t\t\treturn true;\n\n\t\t\t}\n\n\t\t\tp = p.next;\n\n\t\t} while ( p !== a );\n\n\t\treturn false;\n\n\t}", "title": "" }, { "docid": "685b61e9e22aeff0844c53a22638762f", "score": "0.6569151", "text": "function intersectsPolygon( a, b ) {\n\n\t\tvar p = a;\n\n\t\tdo {\n\n\t\t\tif ( p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n\t\t\t\t\t\t\tintersects( p, p.next, a, b ) ) {\n\n\t\t\t\treturn true;\n\n\t\t\t}\n\n\t\t\tp = p.next;\n\n\t\t} while ( p !== a );\n\n\t\treturn false;\n\n\t}", "title": "" }, { "docid": "685b61e9e22aeff0844c53a22638762f", "score": "0.6569151", "text": "function intersectsPolygon( a, b ) {\n\n\t\tvar p = a;\n\n\t\tdo {\n\n\t\t\tif ( p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n\t\t\t\t\t\t\tintersects( p, p.next, a, b ) ) {\n\n\t\t\t\treturn true;\n\n\t\t\t}\n\n\t\t\tp = p.next;\n\n\t\t} while ( p !== a );\n\n\t\treturn false;\n\n\t}", "title": "" }, { "docid": "685b61e9e22aeff0844c53a22638762f", "score": "0.6569151", "text": "function intersectsPolygon( a, b ) {\n\n\t\tvar p = a;\n\n\t\tdo {\n\n\t\t\tif ( p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n\t\t\t\t\t\t\tintersects( p, p.next, a, b ) ) {\n\n\t\t\t\treturn true;\n\n\t\t\t}\n\n\t\t\tp = p.next;\n\n\t\t} while ( p !== a );\n\n\t\treturn false;\n\n\t}", "title": "" }, { "docid": "49209a824082506f109627ff73a1d4b6", "score": "0.6544361", "text": "function polygonIntersect(c, d, a, b) {\n var x1 = c[0],\n x3 = a[0],\n x21 = d[0] - x1,\n x43 = b[0] - x3,\n y1 = c[1],\n y3 = a[1],\n y21 = d[1] - y1,\n y43 = b[1] - y3,\n ua = (x43 * (y1 - y3) - y43 * (x1 - x3)) / (y43 * x21 - x43 * y21);\n return [x1 + ua * x21, y1 + ua * y21];\n }", "title": "" }, { "docid": "340d38b036bac1b5ed90fc07fb9ac7ea", "score": "0.6534881", "text": "intersect(poly, min) {\n if (!this.overlaps(poly)) return null;\n\n let clip = new clib.Clipper(),\n ctre = new clib.PolyTree(),\n sp1 = this.toClipper(),\n sp2 = poly.toClipper(),\n minarea = min >= 0 ? min : 0.1;\n\n if (this.isInside(poly)) {\n return [this];\n }\n\n clip.AddPaths(sp1, ptyp.ptSubject, true);\n clip.AddPaths(sp2, ptyp.ptClip, true);\n\n if (clip.Execute(ctyp.ctIntersection, ctre, cfil.pftNonZero, cfil.pftNonZero)) {\n let inter = POLY\n .fromClipperTreeUnion(ctre, poly.getZ(), minarea)\n // .filter(p => p.isEquivalent(this) || p.isInside(this))\n .filter(p => p.isInside(this));\n return inter;\n }\n\n return null;\n }", "title": "" }, { "docid": "346327bcbcae036811d183ab263a6fd3", "score": "0.653041", "text": "function intersectsPolygon( a, b ) {\n\n\tvar p = a;\n\n\tdo {\n\n\t\tif ( p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n\t\t\t\t\t\tintersects( p, p.next, a, b ) ) {\n\n\t\t\treturn true;\n\n\t\t}\n\n\t\tp = p.next;\n\n\t} while ( p !== a );\n\n\treturn false;\n\n}", "title": "" }, { "docid": "346327bcbcae036811d183ab263a6fd3", "score": "0.653041", "text": "function intersectsPolygon( a, b ) {\n\n\tvar p = a;\n\n\tdo {\n\n\t\tif ( p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n\t\t\t\t\t\tintersects( p, p.next, a, b ) ) {\n\n\t\t\treturn true;\n\n\t\t}\n\n\t\tp = p.next;\n\n\t} while ( p !== a );\n\n\treturn false;\n\n}", "title": "" }, { "docid": "346327bcbcae036811d183ab263a6fd3", "score": "0.653041", "text": "function intersectsPolygon( a, b ) {\n\n\tvar p = a;\n\n\tdo {\n\n\t\tif ( p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n\t\t\t\t\t\tintersects( p, p.next, a, b ) ) {\n\n\t\t\treturn true;\n\n\t\t}\n\n\t\tp = p.next;\n\n\t} while ( p !== a );\n\n\treturn false;\n\n}", "title": "" }, { "docid": "346327bcbcae036811d183ab263a6fd3", "score": "0.653041", "text": "function intersectsPolygon( a, b ) {\n\n\tvar p = a;\n\n\tdo {\n\n\t\tif ( p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n\t\t\t\t\t\tintersects( p, p.next, a, b ) ) {\n\n\t\t\treturn true;\n\n\t\t}\n\n\t\tp = p.next;\n\n\t} while ( p !== a );\n\n\treturn false;\n\n}", "title": "" }, { "docid": "346327bcbcae036811d183ab263a6fd3", "score": "0.653041", "text": "function intersectsPolygon( a, b ) {\n\n\tvar p = a;\n\n\tdo {\n\n\t\tif ( p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n\t\t\t\t\t\tintersects( p, p.next, a, b ) ) {\n\n\t\t\treturn true;\n\n\t\t}\n\n\t\tp = p.next;\n\n\t} while ( p !== a );\n\n\treturn false;\n\n}", "title": "" }, { "docid": "6b31cafa5aa5979bccf3e7832bd03e92", "score": "0.64700776", "text": "function linePolygonIntersect(a1x, a1y, a2x, a2y, points) {\n for (var i = 0, p2 = points[points.length - 1]; i < points.length; i++) {\n var p = points[i];\n\n if (lineLineIntersect(a1x, a1y, a2x, a2y, p[0], p[1], p2[0], p2[1])) {\n return true;\n }\n\n p2 = p;\n }\n }", "title": "" }, { "docid": "8edaa6470b94a53e65d9c88e2af61a66", "score": "0.63777554", "text": "function do_polygons_collide(poly1, poly2) {\n // Use the SAT theorem for determining if the two convex polygons collide.\n return no_separation_axis(poly1, poly2) && no_separation_axis(poly2, poly1);\n}", "title": "" }, { "docid": "7423752e9f22e8869e9841c44d6f9047", "score": "0.63772386", "text": "parseGeom(geometry){\n let polyLineCollection = [];\n let polyLineCollectionOtherWorld = [];\n let edgeOfMap = 10 \n let leftEdge=false // close to left edge\n let rightEdge = false // close to right edge\n \n // convert \n geometry.coordinates.forEach(feature => {\n feature.forEach(polygon => {\n let lineCoord = {\n \"type\": \"LineString\",\n \"coordinates\": []\n }\n let lineCoordCopy = {\n \"type\": \"LineString\",\n \"coordinates\": []\n }\n let crossed22 = false\n for(let i=0; i < polygon.length; i++){\n let coordinates = polygon[i]\n if ((coordinates[0] < -179.99 || coordinates[0] > 179.99) && lineCoord.coordinates.length) {\n if(lineCoord.coordinates.length > 1){\n polyLineCollection.push(lineCoord)\n if (crossed22) {\n lineCoordCopy = {\n \"type\": \"LineString\",\n \"coordinates\": []\n }\n // eslint-disable-next-line \n lineCoord.coordinates.forEach((coordinates) => {\n lineCoordCopy.coordinates.push([coordinates[0] - 360, coordinates[1]])\n })\n polyLineCollectionOtherWorld.push(lineCoordCopy)\n }\n }\n lineCoord = {\n \"type\": \"LineString\",\n \"coordinates\": []\n }\n }\n if (coordinates[0] > -179.99 && coordinates[0] < 179.99) {\n lineCoord.coordinates.push(coordinates)\n if (coordinates[0] > 22.5) crossed22 = true\n if (coordinates[0] > 180 - edgeOfMap) rightEdge = true\n if (coordinates[0] < -180 + edgeOfMap) leftEdge = true\n }\n else{\n if(i+1 < polygon.length && polygon[i+1][0] > -179.99 && polygon[i+1][0] < 179.99){\n lineCoord.coordinates.push(coordinates)\n }\n }\n \n }\n\n polyLineCollection.push(lineCoord)\n if (crossed22) {\n lineCoordCopy = {\n \"type\": \"LineString\",\n \"coordinates\": []\n }\n lineCoord.coordinates.forEach(coordinates => {\n lineCoordCopy.coordinates.push([coordinates[0] - 360, coordinates[1]])\n })\n polyLineCollectionOtherWorld.push(lineCoordCopy)\n }\n })\n });\n \n if(rightEdge && leftEdge){ // if its close to both edges draw on both sides of map\n polyLineCollectionOtherWorld.forEach(line =>{\n polyLineCollection.push(line)\n })\n }\n let lines = polyLineCollection.map((p)=>{\n return p.coordinates\n })\n let result = {\n type: 'MultiLineString',\n coordinates : lines\n }\n return result\n }", "title": "" }, { "docid": "31a96509b730cd0cda3b73d8dd5222f0", "score": "0.63668406", "text": "function simplifyPolygon(points) {\n\t\tif (points.length < 4) {\n\t\t\treturn null;\n\t\t}\n\n\t\tvar slices = [];\n\t\tvar bestSlice = null;\n\t\tvar addPoint = null;\n\t\tfunction updateBestSlice(begin, end, intersection) {\n\t\t\tif (!bestSlice) {\n\t\t\t\t// First slice, so it's the best slice so far\n\t\t\t\tbestSlice = [begin, end];\n\t\t\t\taddPoint = intersection;\n\t\t\t} else {\n\t\t\t\t// Check if this slice overlaps a known intersecting slice\n\t\t\t\tvar overlaps = false;\n\t\t\t\tfor (var i = 0; i < slices.length; ++i) {\n\t\t\t\t\tif (begin <= slices[i][1] && slices[i][0] <= end) {\n\t\t\t\t\t\toverlaps = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (!overlaps && (end - begin) > bestSlice[1] - bestSlice[0]) {\n\t\t\t\t\t/* Does not contain a subslice with an intersection, and\n\t\t\t\t\t contains more points than the best slice, so this is our\n\t\t\t\t\t new best slice. Using actual distance rather than\n\t\t\t\t\t number of points may make more sense here, but this\n\t\t\t\t\t seems to work well and is much less expensive. */\n\t\t\t\t\tbestSlice = [begin, end];\n\t\t\t\t\taddPoint = intersection;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add to slices list for overlap checking next time around\n\t\t\tslices.push([begin, end]);\n\t\t}\n\n\t\tfor (var i = 0; i < points.length - 3; ++i) {\n\t\t\tvar p0 = points[i];\n\t\t\tvar p1 = points[i + 1];\n\n\t\t\tvar foundIntersection = false;\n\t\t\tfor (var j = i + 2; j < points.length - 1 && !foundIntersection; ++j) {\n\t\t\t\tvar p2 = points[j];\n\t\t\t\tvar p3 = points[j + 1];\n\n\t\t\t\t// Check for an actual line intersection\n\t\t\t\tvar intersection = lineIntersection(p0, p1, p2, p3);\n\t\t\t\tif (intersection) {\n\t\t\t\t\tupdateBestSlice(i, j, intersection);\n\t\t\t\t\tfoundIntersection = true;\n\t\t\t\t} else if (j > i + 4) {\n\t\t\t\t\t// Check if endpoints are close enough to be considered intersecting\n\t\t\t\t\tif (distance(p0.x, p0.y, p2.x, p2.y) <= polyDistance) {\n\t\t\t\t\t\tupdateBestSlice(i, j, null);\n\t\t\t\t\t\tfoundIntersection = true;\n\t\t\t\t\t} else if (distance(p1.x, p1.y, p2.x, p2.y) <= polyDistance) {\n\t\t\t\t\t\tupdateBestSlice(i + 1, j, null);\n\t\t\t\t\t\tfoundIntersection = true;\n\t\t\t\t\t} else if (distance(p0.x, p0.y, p3.x, p3.y) <= polyDistance) {\n\t\t\t\t\t\tupdateBestSlice(i, j + 1, null);\n\t\t\t\t\t\tfoundIntersection = true;\n\t\t\t\t\t} else if (distance(p1.x, p1.y, p3.x, p3.y) <= polyDistance) {\n\t\t\t\t\t\tupdateBestSlice(i + 1, j + 1, null);\n\t\t\t\t\t\tfoundIntersection = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (foundIntersection) {\n\t\t\t\t// Found an intersection, so no point in checking overlapping intervals\n\t\t\t\ti = j;\n\t\t\t\tfoundIntersection = false;\n\t\t\t}\n\t\t}\n\n\t\tif (bestSlice) {\n\t\t\tvar poly = points.slice(bestSlice[0], bestSlice[1]);\n\t\t\tif (addPoint) {\n\t\t\t\tpoly.push(addPoint);\n\t\t\t}\n\t\t\treturn poly;\n\t\t}\n\n\t\treturn null;\n\t}", "title": "" }, { "docid": "e5f3603664f19fbb5870dad04e5f0d6b", "score": "0.63302964", "text": "function collided_polygon_polygon(polygonA, polygonB) {\n // NB: the clipping library expects polygons to be explicitly closed lists of pairs of numbers\n let A = polygonA.concat(polygonA[0]);\n let B = polygonB.concat(polygonB[0]);\n /* Note that the clipping library expects geometry of the form [number, number][][] \n * The reason is that it works with multipolygons, where rings after the first represent holes \n */\n let result = GreinerHormann.intersection([A], [B]);\n /* I have no idea why, but sometimes the intersection function rejects with a null, and sometimes it rejects with an empty array \n * ¯\\_(ツ)_/¯\n */\n return result !== null && result.length > 0;\n}", "title": "" }, { "docid": "2408c09f15ba9593380b463adc24f7ce", "score": "0.6319244", "text": "intersect(p1, p2, p3, p4, dir) {\n let x1 = p1.x\n let y1 = p1.y\n let x2 = p2.x\n let y2 = p2.y\n let x3 = p3.x\n let y3 = p3.y\n let x4 = p4.x\n let y4 = p4.y\n\n let denom = ((y4-y3) * (x2-x1)) - ((x4-x3) * (y2-y1))\n if (denom != 0) {\n let ua = (((x4-x3) * (y1-y3)) - ((y4-y3) * (x1-x3))) / denom\n if ((ua >= 0) && (ua <= 1)) {\n let ub = (((x2-x1) * (y1-y3)) - ((y2-y1) * (x1-x3))) / denom\n if ((ub >= 0) && (ub <= 1)) {\n var x = x1 + (ua * (x2-x1))\n var y = y1 + (ua * (y2-y1))\n return { x: x, y: y, dir: dir }\n }\n }\n }\n return null\n }", "title": "" }, { "docid": "82d9cd6fe6fbf66f444de52ff5f4f9ea", "score": "0.63071746", "text": "static intersection(hs: Halfspace[]): Polytope { throw new NotImplementedError(); }", "title": "" }, { "docid": "e565a0a0e86a9751b9658619edba4734", "score": "0.6271381", "text": "static slice(poly, intersections) {\n // if (intersections.length <= 1) return [poly];\n if (intersections.length == 2) return this.sliceSimplePolygonIntersection( poly, intersections);\n if (intersections.length > 2) return this.sliceComplexPolygonIntersection(poly, intersections);\n return [poly];\n }", "title": "" }, { "docid": "e0108084ce711af04879ff4d6129951e", "score": "0.6256869", "text": "function d3_geom_polygonIntersect(c, d, a, b) {\n var x1 = c[0], x2 = d[0], x3 = a[0], x4 = b[0],\n y1 = c[1], y2 = d[1], y3 = a[1], y4 = b[1],\n x13 = x1 - x3,\n x21 = x2 - x1,\n x43 = x4 - x3,\n y13 = y1 - y3,\n y21 = y2 - y1,\n y43 = y4 - y3,\n ua = (x43 * y13 - y43 * x13) / (y43 * x21 - x43 * y21);\n return [x1 + ua * x21, y1 + ua * y21];\n}", "title": "" }, { "docid": "0866e1cbb40820930258369d439db548", "score": "0.6256282", "text": "function replicaPoly(p1){\n \nvar p2 = p1.map(function (p) {return [p[0], p[1], p[2]-4]});\nvar p3 = p2.map(function (p) {return [p[0], p[1], p[2]-4]});\nvar p4 = p3.map(function (p) {return [p[0], p[1], p[2]-4]});\nvar p5 = p4.map(function (p) {return [p[0], p[1], p[2]-4]});\nvar p6 = p5.map(function (p) {return [p[0], p[1], p[2]-4]});\nvar p7 = p6.map(function (p) {return [p[0], p[1], p[2]-4]});\nvar p8 = p7.map(function (p) {return [p[0], p[1], p[2]-4]});\n\nvar poly1 = POLYLINE(p1);\nvar poly2 = POLYLINE(p2);\nvar poly3 = POLYLINE(p3);\nvar poly4 = POLYLINE(p4);\nvar poly5 = POLYLINE(p5);\nvar poly6 = POLYLINE(p6);\nvar poly7 = POLYLINE(p7);\nvar poly8 = POLYLINE(p8);\nvar str_poly =STRUCT([poly1,poly2,poly3,poly4,poly5,poly6,poly7,poly8]);\nDRAW(str_poly);\n}", "title": "" }, { "docid": "ff24118afc4364f15044b029ade2841d", "score": "0.62405753", "text": "function determineIntersect(userShapes)\n{\n for (var i = 0; i < userShapes.length; i++){\n var userShape = userShapes[i];\n for (var j = 0; j < tracts.features.length; j++){\n var tract = tracts.features[j];\n var intersection = turf.intersect(userShape, tract['geometry']);\n if (intersection != null){\n tract.properties.intersection = true;\n var tractArea = turf.area(tract);\n var intersectionArea = turf.area(intersection);\n tract.properties.overlap = intersectionArea / tractArea;\n }\n }\n }\n}", "title": "" }, { "docid": "546205f0cc7c185eba2a6fbad1f6f5d5", "score": "0.6211785", "text": "createPolygon(cornerPoints) {\n // Shorthand varibles\n let cs = game.cellSize; // Cell width and height are always the same\n\n // Prepare the point data\n let pointsObj = {};\n\n for (let i = 0; i < cornerPoints.length; i++) {\n let key = cornerPoints[i][0] + \"_\" + cornerPoints[i][1];\n if (pointsObj[key]) {\n pointsObj[key]++;\n } else {\n pointsObj[key] = 1;\n }\n\n if (pointsObj[key] == 4)\n delete pointsObj[key]; // Remove internal points (which have four instances)\n }\n\n // Make a point set from point object (removes duplicates)\n let pointsSet = new Set(Object.keys(pointsObj).map(key => key));\n\n // Convert the set of strings into an array of numbers\n let points = [];\n for (let value of pointsSet)\n points.push(value.split(\"_\").map(Number));\n\n // Find the polygon points of the shape\n let polygonArray = [];\n let firstPoint = points[0];\n\n // Add the first point to polygon\n polygonArray.push(firstPoint);\n let lastAddedPoint = firstPoint;\n points.splice(0, 1); // Remove the first point\n\n // Does the points array contain this point\n function hasPoint(x, y) {\n for (let p of points)\n if (p[0] === x && p[1] === y)\n return true;\n return false;\n }\n\n // Helper function used inside the loop\n function addNextPolygonPoint(horDir, verDir) {\n let x = lastAddedPoint[0] + horDir * cs;\n let y = lastAddedPoint[1] + verDir * cs;\n\n if (firstPoint[0] === x && firstPoint[1] === y) {\n polygonDone = true;\n return true;\n }\n\n // Special case if direction is up\n // Do not go up if there is a cell on the left\n if (verDir === -1) {\n if (hasPoint(x - cs, y) && hasPoint(x - cs, y + cs))\n return false;\n }\n\n for (let i = 0; i < points.length; i++) {\n if (x === points[i][0] && y === points[i][1]) {\n polygonArray.push(points[i]); // Next point\n lastAddedPoint = points[i];\n points.splice(i, 1); // Remove the added point\n return true; // Found and added\n }\n }\n return false; // Not found\n }\n\n let polygonDone = false;\n let i = 0; // Counter\n while (!polygonDone) {\n\n if (++i > 50) {\n if (points.length !== 0)\n console.log(\"Bad Shape! Points left.\");\n console.log(\"Bad Shape! Max iterations of 50 reached.\");\n polygonDone = true; // Just of safety. This should never happen with correct shapes!\n }\n\n // Above\n if (addNextPolygonPoint(0, -1))\n continue;\n\n // Right\n if (addNextPolygonPoint(1, 0))\n continue;\n\n // Below\n if (addNextPolygonPoint(0, 1))\n continue;\n\n // Right\n if (addNextPolygonPoint(-1, 0))\n continue;\n\n }\n\n /*\n // Debug. Draw the points and order\n for (let i = 0; i < polygonArray.length; i++) {\n let circle = game.s.circle(polygonArray[i][0], polygonArray[i][1], 4);\n circle.attr({\n fill: \"red\"\n });\n let text = game.s.text(polygonArray[i][0] + 5, polygonArray[i][1] - 5, i + 1);\n }\n */\n return polygonArray;\n }", "title": "" }, { "docid": "84240d8a2aa6727de3e6fb2dc40810f8", "score": "0.61476344", "text": "function calcIntersect(vertices){\r\n var newArr = [];\r\n var count = 0;\r\n \r\n for(var i = 0; i<12; i++) newArr.push(vertices[i]); \r\n\r\n //Calculate the intersecting circle using points with matching z axis from \r\n //each of the 4 unit circles forming 2 connecting cylinders.\r\n for(var i = 0; i < (points.length-2)*24; i++){\r\n var Ax = vertices[i].x; var Ay = vertices[i].y;\r\n var Bx = vertices[i+12].x; var By = vertices[i+12].y;\r\n var Cx = vertices[i+24].x; var Cy = vertices[i+24].y;\r\n var Dx = vertices[i+36].x; var Dy = vertices[i+36].y;\r\n \r\n var a = Bx - Ax; var d = Dy - Cy;\r\n var b = Dx - Cx; var e = Cx - Ax;\r\n var c = By - Ay; var f = Cy - Ay;\r\n\r\n var h = (1/(a*d-b*c))*(d*e+(-b)*f);\r\n \r\n var Lx = Ax+(Bx-Ax)*h; \r\n var Ly = Ay+(By-Ay)*h;\r\n \r\n newArr.push(new coord(Lx,Ly,vertices[i+12].z)); \r\n\r\n if((i+1)%12 == 0){\r\n i+=12;\r\n }\r\n }\r\n \r\n for(var i = 12; i>0; i--) newArr.push(vertices[vertices.length-i]);\r\n \r\n //Duplicate each vertex for flat shading\r\n var arr = newArr;\r\n newArr = [];\r\n for(var i = 0; i < arr.length; i++){\r\n newArr.push(arr[i]);\r\n if(i!=0 && i%12 != 0){ \r\n newArr.push(arr[i]);\r\n }\r\n if(i!=0 && (i+1)%12 == 0){\r\n newArr.push(arr[i-11]);\r\n //change the last one to not duplicate if its the last set. HOW TO!?\r\n if(count!=0 && count%2!=0 && (count/2) < points.length-2) i-=12;\r\n count++; \r\n }\r\n } \r\n \r\n return newArr;\r\n}", "title": "" }, { "docid": "d01e56e327ac5aca505c47fbfeaa7f06", "score": "0.61339337", "text": "_intersectPolytope<T: Polytope>(other: T): T {\n return other.constructor.intersection([...this.halfspaces, ...other.halfspaces]);\n }", "title": "" }, { "docid": "d10de95f114c7a59314cf0cd8ef03060", "score": "0.6100022", "text": "function splitone(shape, p0, p1) {\n var l = shape.length;\n var isect_indecies = [];\n var newPoints = [];\n\n // Find intersection points\n for (let i = 0; i < l; i++) {\n newPoints.push(shape[i]);\n begin_index = i;\n end_index = ((i + 1) % l);\n\n print(\"testing p\" + begin_index + \" - p\" + end_index);\n\n let newp = lineLine(p0.x, p0.y, p1.x, p1.y,\n shape[begin_index].x, shape[begin_index].y,\n shape[end_index].x, shape[end_index].y)\n\n if (newp) {\n newPoints.push(newp);\n isect_indecies.push(i + 1 + isect_indecies.length);\n }\n }\n\n // If the line intersects with the shape, make resultant shapes. \n // TODO, more complicated is this shape negative space of the other shape logic\n if (isect_indecies.length) {\n\n let newShapeArrays = [];\n newShapeArrays[0] = [];\n\n let start = isect_indecies[0]\n for (let i = start; i < newPoints.length + start; ++i) {\n let index = i % newPoints.length\n let thisPoint = newPoints[index]\n\n // Add this point to the last shape\n newShapeArrays[newShapeArrays.length - 1].push(thisPoint)\n\n // If this point is an intersection, make a new array, and begin it with this point.\n if (isect_indecies.indexOf(index) != -1) {\n let a = []\n a.push(thisPoint);\n newShapeArrays.push(a);\n }\n }\n\n let fix = newShapeArrays.shift();\n newShapeArrays[newShapeArrays.length - 1].push(fix[0]);\n\n // subshapeinfo[j] == the shape I belong to.\n subshapeinfo = new Map();\n for (let i = 0; i < newShapeArrays.length; i++) {\n for (let j = 0; j < newShapeArrays.length; j++) {\n if (i != j) {\n if (isSubShape(newShapeArrays[i], newShapeArrays[j])) {\n subshapeinfo.set(j, i);\n }\n }\n }\n }\n finalShapeArrays = []\n\n newShapeArrays.forEach(function(item, index) {\n let finalshape = item;\n\n // if this shape index is a key in the map,\n // don't do anything with it.\n if (subshapeinfo.has(index)) {} else {\n subshapeinfo.forEach(function(value, key, map) {\n if (index == value) {\n finalshape = finalshape.concat(newShapeArrays[key])\n }\n })\n f = deepCopyShape(finalshape)\n finalShapeArrays.push(f)\n }\n // if this shape index appears as a value for any keys in the map,\n // concatinate those shapes onto this shape.\n })\n\n //\n // Some debug code:\n\n finalShapeArrays.forEach(function(item, index) {\n print(\"SHAPE \" + index + \"!!!!!\");\n shiftShape(item, 10, true);\n shapeArrayDraw(item);\n })\n\n }\n}", "title": "" }, { "docid": "1c82e28a87f4b6943012ac8a219e0e2f", "score": "0.6084591", "text": "function splitPolygon (geoPts)\r\n{\r\n var retPolys = []\r\n \r\n}", "title": "" }, { "docid": "501a2a9f59ce976623deeb2cc6822231", "score": "0.60716444", "text": "function get_line_intersection(p0_x, p0_y, p1_x, p1_y, \r\n\t\tp2_x, p2_y, p3_x, p3_y) {\r\n\t\t\r\n\t\tvar inter_points = {\r\n\t\t\tinter_x: null,\r\n\t\t\tinter_y: null \r\n\t\t}\r\n\t\t\r\n\t\tvar s1_x, s1_y, s2_x, s2_y;\r\n\t\ts1_x = p1_x - p0_x; \r\n\t\ts1_y = p1_y - p0_y;\r\n\t\ts2_x = p3_x - p2_x; \r\n\t\ts2_y = p3_y - p2_y;\r\n\r\n\t\tvar s, t;\r\n\t\ts = (-s1_y * (p0_x - p2_x) + s1_x * (p0_y - p2_y)) / (-s2_x * s1_y + s1_x * s2_y);\r\n\t\tt = ( s2_x * (p0_y - p2_y) - s2_y * (p0_x - p2_x)) / (-s2_x * s1_y + s1_x * s2_y);\r\n\r\n\t\tif (s >= 0 && s <= 1 && t >= 0 && t <= 1)\r\n\t\t{\r\n\t\t\t// Collision detected\r\n\t\t\tinter_points.inter_x = p0_x + (t * s1_x);\r\n\t\t\tinter_points.inter_y = p0_y + (t * s1_y);\r\n\t\t\treturn inter_points; \r\n\t\t}\r\n\r\n\t\treturn 0; // No collision\r\n\t}", "title": "" }, { "docid": "3525f858161b747d9007281bd83a8e58", "score": "0.60589087", "text": "function patchIntersects(intersections, event) {\n const {\n internal\n } = store.getState(); // If the interaction is captured, make all capturing targets part of the\n // intersect.\n\n if ('pointerId' in event && internal.capturedMap.has(event.pointerId)) {\n for (let captureData of internal.capturedMap.get(event.pointerId).values()) {\n intersections.push(captureData.intersection);\n }\n }\n\n return intersections;\n }", "title": "" }, { "docid": "b82f08560b69e9e5e5954ddd25f825dd", "score": "0.6057803", "text": "function generateIntersections(intersectionDatas){\n var x = [], y = [], r = [];\n for(var i=0;i<3;i++){\n x[i] = intersectionDatas['x'][i];\n y[i] = intersectionDatas['y'][i];\n r[i] = intersectionDatas['r'][i];\n //console.log('x : '+x[i]+' y : '+y[i]+' r : '+r[i]);\n }\n var interPoints = [];\n interPoints[0] = intersection(x[0], y[0], r[0], x[1], y[1], r[1]);\n interPoints[1] = intersection(x[1], y[1], r[1], x[2], y[2], r[2]);\n interPoints[2] = intersection(x[0], y[0], r[0], x[2], y[2], r[2]);\n\n //We need to send the radius data too\n interPoints[3] = r[0];\n interPoints[4] = r[1];\n interPoints[5] = r[2];\n\n //If there is an intersection\n if(interPoints[0] && interPoints[1] && interPoints[2]){\n return interPoints;\n }\n return false;\n}", "title": "" }, { "docid": "11cf1733125f41521f6338425074815b", "score": "0.6053105", "text": "clip() {\n if (!this.visible)\n return;\n if (this.shapesManager == null)\n return;\n const A = new math.Vector2();\n const C = new math.Vector2();\n const b = this.shapesManager.getWorldBounds();\n const xmin = b[0];\n const ymin = b[1];\n const xmax = b[2];\n const ymax = b[3];\n const pts = (new java.util.ArrayList());\n const line = geom.Conic2D.TMP_SEGMENT_$LI$();\n line.set$math_Vector2$math_Vector2(A.set$double$double(xmin, ymin), C.set$double$double(xmin, ymax));\n let intersections = this.intersections(line);\n for (let index = 0; index < intersections.length; index++) {\n let d = intersections[index];\n pts.add(d);\n }\n line.set$math_Vector2$math_Vector2(A.set$double$double(xmin, ymax), C.set$double$double(xmax, ymax));\n intersections = this.intersections(line);\n for (let index = 0; index < intersections.length; index++) {\n let d = intersections[index];\n pts.add(d);\n }\n line.set$math_Vector2$math_Vector2(A.set$double$double(xmax, ymax), C.set$double$double(xmax, ymin));\n intersections = this.intersections(line);\n for (let index = 0; index < intersections.length; index++) {\n let d = intersections[index];\n pts.add(d);\n }\n line.set$math_Vector2$math_Vector2(A.set$double$double(xmax, ymin), C.set$double$double(xmin, ymin));\n intersections = this.intersections(line);\n for (let index = 0; index < intersections.length; index++) {\n let d = intersections[index];\n pts.add(d);\n }\n const posBranch = (new java.util.ArrayList());\n const negBranch = (new java.util.ArrayList());\n for (let index = pts.iterator(); index.hasNext();) {\n let t = index.next();\n {\n if (Math.abs(t) < 1)\n posBranch.add(t);\n else\n negBranch.add(1 / t);\n }\n }\n java.util.Collections.sort(posBranch);\n java.util.Collections.sort(negBranch);\n if (posBranch.size() > 1) {\n this.clipt0 = posBranch.get(0);\n this.clipt1 = posBranch.get(posBranch.size() - 1);\n }\n else {\n this.clipt0 = 0;\n this.clipt1 = 0;\n }\n if (negBranch.size() > 1) {\n this.clipt2 = negBranch.get(0);\n this.clipt3 = negBranch.get(negBranch.size() - 1);\n }\n else {\n this.clipt2 = 1;\n this.clipt3 = 1;\n }\n }", "title": "" }, { "docid": "e21fcdc5979bb47a75612ba94924c185", "score": "0.60433304", "text": "function clipPolygon(coordinates) {\n var polygons = [],\n ring = [],\n unvisited = 0, // number of unvisited entering intersections\n intersections = [];\n // Clip each ring into segments.\n var segments = [];\n coordinates.forEach(function(ring) {\n var ringSegments = clipLine(ring);\n // Since these are closed rings, we join segments if necessary.\n var n = ringSegments.length;\n if (n > 1) {\n var firstSegment = ringSegments[0],\n lastSegment = ringSegments[n - 1],\n p0 = firstSegment[0],\n p1 = lastSegment[lastSegment.length - 1];\n if (p0[0] === p1[0] && p0[1] === p1[1]) {\n ringSegments.shift();\n ringSegments.pop();\n ringSegments.push(lastSegment.concat(firstSegment));\n }\n }\n segments = segments.concat(ringSegments);\n });\n // Create a circular linked list using the intersected segment start and\n // end points, sorted by relative angles.\n segments.forEach(function(segment) {\n var p0 = segment[0],\n p1 = segment[segment.length - 1];\n if (p0[0] !== p1[0] || p0[1] !== p1[1]) {\n var b = {xyz: clipCartesian(p1, center), points: []},\n a = {xyz: clipCartesian(p0, center), points: segment, other: b};\n intersections.push(a, b);\n unvisited++;\n } else {\n // TODO attach subsumed holes to the correct Polygons. For now, we can\n // add these as separate Polygons, since typically we draw everything\n // as a subpath in SVG so it doesn't matter if the holes don't match\n // their polygons. This would be done by calculating some kind of\n // winding number.\n polygons.push([segment]);\n }\n });\n if (!unvisited) return polygons;\n // Sort intersection points by relative angles.\n intersections.forEach(function(intersection, i) {\n intersection.angle = angle(intersection.xyz, reference);\n });\n var start = intersections[0];\n intersections.sort(function(a, b) {\n return b.angle - a.angle;\n });\n // Construct circular linked list.\n for (var i = 0; i < intersections.length;) {\n intersections[i].next = intersections[++i % intersections.length];\n }\n while (unvisited) {\n // Look for unvisited entering intersections.\n while (start.visited || !start.other) start = start.next;\n var intersection = start;\n do {\n intersection.visited = true;\n ring = ring.concat(intersection.points);\n intersection = intersection.other;\n var from = intersection.angle;\n intersection = intersection.next;\n var to = intersection.angle;\n ring = ring.concat(interpolate(from, to));\n unvisited--;\n } while (intersection !== start);\n if (ring.length) {\n polygons.push([ring]);\n ring = [];\n }\n start = start.next;\n }\n return polygons;\n }", "title": "" }, { "docid": "01b5201bf2a7bc49a9e0886751b7a6dc", "score": "0.6040053", "text": "function insidePolygon(P, transformed) {\n var ref = crossProduct(transformed[transformed.length-1], transformed[0], P);\n for (var i = 0; i < transformed.length-1; i++) {\n if (vec3.dot(ref, crossProduct(transformed[i], transformed[i+1], P)) <= 0) {\n //// no intersection if P on the line of an edge (when crossProduct==0)\n return false;\n }\n } \n return true;\n}", "title": "" }, { "docid": "b5e0e008021a424206c2f3662e824ed1", "score": "0.6036691", "text": "function detect_collision(corner, polygon) {\n var x = corner[0], y = corner[1]; \n var found = false;\n for (var i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {\n var xi = polygon[i][0], yi = polygon[i][1];\n var xj = polygon[j][0], yj = polygon[j][1];\n \n var intersection = ((yi > y) != (yj > y))\n && (x < (xj - xi) * (y - yi) / (yj - yi) + xi);\n if (intersection){\n found = !found;\n } \n } \n return found;\n}", "title": "" }, { "docid": "fac94367bddab2ec7e8745465b846bd9", "score": "0.603625", "text": "function computeIntersections(px,py,lx,ly)\r\n\t{\r\n\t var X=Array();\r\n\r\n\t var A=ly[1]-ly[0];\t //A=y2-y1\r\n\t\tvar B=lx[0]-lx[1];\t //B=x1-x2\r\n\t\tvar C=lx[0]*(ly[0]-ly[1]) +\r\n\t\t ly[0]*(lx[1]-lx[0]);\t//C=x1*(y1-y2)+y1*(x2-x1)\r\n\r\n\t\tvar bx = bezierCoeffs(px[0],px[1],px[2],px[3]);\r\n\t\tvar by = bezierCoeffs(py[0],py[1],py[2],py[3]);\r\n\r\n\t var P = Array();\r\n\t\tP[0] = A*bx[0]+B*by[0];\t\t/*t^3*/\r\n\t\tP[1] = A*bx[1]+B*by[1];\t\t/*t^2*/\r\n\t\tP[2] = A*bx[2]+B*by[2];\t\t/*t*/\r\n\t\tP[3] = A*bx[3]+B*by[3] + C;\t/*1*/\r\n\r\n\t\tvar r=cubicRoots(P);\r\n\r\n\t /*verify the roots are in bounds of the linear segment*/\r\n\t for (var i=0;i<3;i++)\r\n\t {\r\n\t\tt=r[i];\r\n\r\n\t\tX[0]=bx[0]*t*t*t+bx[1]*t*t+bx[2]*t+bx[3];\r\n\t\tX[1]=by[0]*t*t*t+by[1]*t*t+by[2]*t+by[3];\r\n\r\n\t\t/*above is intersection point assuming infinitely long line segment,\r\n\t\t make sure we are also in bounds of the line*/\r\n\t\tvar s;\r\n\t\tif ((lx[1]-lx[0])!=0) /*if not vertical line*/\r\n\t\t s=(X[0]-lx[0])/(lx[1]-lx[0]);\r\n\t\telse\r\n\t\t s=(X[1]-ly[0])/(ly[1]-ly[0]);\r\n\r\n\t\t/*in bounds?*/\r\n\t\tif (t<0 || t>1.0 || s<0 || s>1.0)\r\n\t\t{\r\n\t\t X[0]=-100; /*move off screen*/\r\n\t\t X[1]=-100;\r\n\t\t}\r\n\r\n\t\t/*move intersection point*/\r\n\t\tI[i].setAttributeNS(null,\"cx\",X[0]);\r\n\t\tI[i].setAttributeNS(null,\"cy\",X[1]);\r\n\t }\r\n\r\n\t}", "title": "" }, { "docid": "a912310a7ceb1823814b3f47949f264a", "score": "0.603405", "text": "cut(polys, inter) {\n let target = this;\n\n if (!target.open) {\n target = this.clone(true).setOpen();\n target.push(target.first());\n if (target.inner) {\n target.inner.forEach(ip => {\n ip.setOpen();\n ip.push(ip.first());\n });\n }\n }\n\n let clip = new clib.Clipper(),\n ctre = new clib.PolyTree(),\n type = inter ? ctyp.ctIntersection : ctyp.ctDifference,\n sp1 = target.toClipper(),\n sp2 = POLY.toClipper(polys);\n\n clip.AddPaths(sp1, ptyp.ptSubject, false);\n clip.AddPaths(sp2, ptyp.ptClip, true);\n\n if (clip.Execute(type, ctre, cfil.pftEvenOdd, cfil.pftEvenOdd)) {\n let cuts = POLY.fromClipperTree(ctre, target.getZ(), null, null, 0);\n cuts.forEach(no => {\n // heal open but really closed polygons because cutting\n // has to open the poly to perform the cut. but the result\n // may have been no intersection leaving an open poly\n if (no.open && no.first().distTo2D(no.last()) < 0.001) {\n no.open = false;\n no.points.pop();\n }\n no.depth = this.depth;\n });\n return cuts;\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "75cf313ddc816514af86c36d06a7bbc7", "score": "0.60271895", "text": "function offsetPolygon( polygon, offset, output ){\n var tmp = [];\n var points = polygon.points;\n var count = points.length;\n for(var j = 0; j < count; j++){\n\n // finds the previous, current and next point\n var i = (j - 1);\n if (i < 0) i += count;\n var k = (j + 1) % count;\n\n var pre = points[ i ];\n var cur = points[ j ];\n var nex = points[ k ];\n\n //create 2 lines, parallel to both edges at a given distance 'offset'\n\n //computes a normal vector to the direction of the: prev -> current edge of length offset\n var l1 = distance(cur, pre);\n var n1 = [\n -( ( cur[1] - pre[1] ) / l1 ) * offset,\n ( ( cur[0] - pre[0] ) / l1 ) * offset\n ];\n\n //does the same for the : current -> next edge\n var l2 = distance(cur, nex);\n var n2 = [\n -( ( nex[1] - cur[1] ) / l2 ) * offset,\n ( ( nex[0] - cur[0] ) / l2 ) * offset\n ];\n\n //and create 2 points at both ends of the edge to obtain a parallel line\n var p1 = [ pre[0]+n1[0], pre[1]+n1[1]];\n var p2 = [ cur[0]+n1[0], cur[1]+n1[1]];\n var p3 = [ cur[0]+n2[0], cur[1]+n2[1]];\n var p4 = [ nex[0]+n2[0], nex[1]+n2[1]];\n\n // console.log( p1, p2, p3, p4 );\n var ip = lineIntersection( p1, p2, p3, p4 );\n if( ip != null ) {\n tmp.push( ip );\n }\n\n }\n polygon.points = tmp;\n return tmp;\n}", "title": "" }, { "docid": "b0673ac6dc75b02ee7cd4c3cc13cee67", "score": "0.6025368", "text": "clip() {\n if (!this.visible)\n return;\n if (this.shapesManager == null)\n return;\n const A = new math.Vector2();\n const C = new math.Vector2();\n const b = this.shapesManager.getWorldBounds();\n const xmin = b[0];\n const ymin = b[1];\n const xmax = b[2];\n const ymax = b[3];\n const pts = (new java.util.ArrayList());\n const line = geom.Conic2D.TMP_SEGMENT_$LI$();\n line.set$math_Vector2$math_Vector2(A.set$double$double(xmin, ymin), C.set$double$double(xmin, ymax));\n let intersections = this.intersections(line);\n for (let index = 0; index < intersections.length; index++) {\n let d = intersections[index];\n pts.add(d);\n }\n line.set$math_Vector2$math_Vector2(A.set$double$double(xmin, ymax), C.set$double$double(xmax, ymax));\n intersections = this.intersections(line);\n for (let index = 0; index < intersections.length; index++) {\n let d = intersections[index];\n pts.add(d);\n }\n line.set$math_Vector2$math_Vector2(A.set$double$double(xmax, ymax), C.set$double$double(xmax, ymin));\n intersections = this.intersections(line);\n for (let index = 0; index < intersections.length; index++) {\n let d = intersections[index];\n pts.add(d);\n }\n line.set$math_Vector2$math_Vector2(A.set$double$double(xmax, ymin), C.set$double$double(xmin, ymin));\n intersections = this.intersections(line);\n for (let index = 0; index < intersections.length; index++) {\n let d = intersections[index];\n pts.add(d);\n }\n if (pts.size() > 1) {\n java.util.Collections.sort(pts);\n this.clipt0 = pts.get(0);\n this.clipt1 = pts.get(pts.size() - 1);\n }\n }", "title": "" }, { "docid": "54bfb487192aec563900ccd57632c27e", "score": "0.60164773", "text": "clip() {\n if (!this.visible)\n return;\n this.clipt0 = 0;\n this.clipt1 = 2 * Math.PI;\n if (this.shapesManager == null)\n return;\n let A = new math.Vector2();\n const C = new math.Vector2();\n const b = this.shapesManager.getWorldBounds();\n const xmin = b[0];\n const ymin = b[1];\n const xmax = b[2];\n const ymax = b[3];\n const pts = (new java.util.ArrayList());\n const line = geom.Conic2D.TMP_SEGMENT_$LI$();\n line.set$math_Vector2$math_Vector2(A.set$double$double(xmin, ymin), C.set$double$double(xmin, ymax));\n let intersections = this.intersections(line);\n for (let index = 0; index < intersections.length; index++) {\n let d = intersections[index];\n pts.add(d);\n }\n line.set$math_Vector2$math_Vector2(A.set$double$double(xmin, ymax), C.set$double$double(xmax, ymax));\n intersections = this.intersections(line);\n for (let index = 0; index < intersections.length; index++) {\n let d = intersections[index];\n pts.add(d);\n }\n line.set$math_Vector2$math_Vector2(A.set$double$double(xmax, ymax), C.set$double$double(xmax, ymin));\n intersections = this.intersections(line);\n for (let index = 0; index < intersections.length; index++) {\n let d = intersections[index];\n pts.add(d);\n }\n line.set$math_Vector2$math_Vector2(A.set$double$double(xmax, ymin), C.set$double$double(xmin, ymin));\n intersections = this.intersections(line);\n for (let index = 0; index < intersections.length; index++) {\n let d = intersections[index];\n pts.add(d);\n }\n if (pts.size() === 2) {\n java.util.Collections.sort(pts);\n this.clipt0 = pts.get(0);\n this.clipt1 = pts.get(pts.size() - 1);\n let t = (this.clipt0 + this.clipt1) / 2;\n A = this.point(t);\n if (xmin >= A.x || xmax <= A.x || ymin >= A.y || ymax <= A.y) {\n t = this.clipt0;\n this.clipt0 = this.clipt1;\n this.clipt1 = t + 2 * Math.PI - this.clipt1 + this.clipt0;\n }\n }\n }", "title": "" }, { "docid": "856069753d0ffc45c9379d1a2eea7171", "score": "0.60014707", "text": "getLineIntersections (a, b) {\n const l = [{}, {}]\n l[0].y = a + b * this.upperLeft.x\n l[0].y = Math.max(l[0].y, this.upperLeft.y)\n l[0].y = Math.min(l[0].y, this.bottomRight.y)\n l[0].x = (l[0].y - a) / b\n\n l[1].y = a + b * this.bottomRight.x\n l[1].y = Math.max(l[1].y, this.upperLeft.y)\n l[1].y = Math.min(l[1].y, this.bottomRight.y)\n l[1].x = (l[1].y - a) / b\n return l\n }", "title": "" }, { "docid": "a79717569a0289853c9f3fa2824de464", "score": "0.59907234", "text": "function PolygonOverlap(p1, p2)\n{\n var points = p2.toArray();\n for(var v in points)\n {\n if(p1.containsPoint(v))\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "2f0f7a73de430d2ea12d4a3b55beaba3", "score": "0.5986664", "text": "intersects(other: Region): boolean {\n for (let p of other.polytopes) {\n if (!this.intersect(p).isEmpty) return true;\n }\n return false;\n }", "title": "" } ]
1a16346c58b65dde3933a0e96c3e8ead
Set New Slideshow Ad Properties
[ { "docid": "55e37799fdf628b8db6595a3f8c0bc48", "score": "0.0", "text": "function replaceOrd(adCallPrefix, ordNew) {\n var adCallHtml = '';\n\n if ($(\"div[data-prefix|='\" + adCallPrefix + \"']\") != null) {\n\n $(\"div[data-prefix|='\" + adCallPrefix + \"'] * iframe\").length ? adCallHtml = $(\"div[data-prefix|='\" + adCallPrefix + \"'] * iframe\")[0].src : adCallHtml = unescapeHtml($(\"div[data-prefix|='\" + adCallPrefix + \"']\").html()); //get ad call string from DOM\n var ordExp = new RegExp('ord=(.*)\\?', 'gi'); //\n adCallHtml = adCallHtml.replace(ordExp, 'ord=' + ordNew + \"?\");\n\n }\n\n return adCallHtml;\n}", "title": "" } ]
[ { "docid": "673dff68e9b9ac060fa39f6e625bdda4", "score": "0.72938085", "text": "function set_digitalData_slideshow_ad() {\n\tdigitalData.slideshowAdEvent = true;\n}", "title": "" }, { "docid": "5893aa9a323920dde948536517d27667", "score": "0.60257316", "text": "function ManageSlide() {}", "title": "" }, { "docid": "29b2ec0fe6605baf946e0291aeb70170", "score": "0.5833029", "text": "function startSlides() {\r\n\r\n\t//MULTIPLE FACTS New for the about page\r\n \tbuildControls();\r\n}", "title": "" }, { "docid": "c79165dc2b5c58cbd1c1d372b61880fd", "score": "0.5812064", "text": "function AddSlide(slide) {\r\n \r\n }", "title": "" }, { "docid": "be8427a3ba7d51b1dbee490a66f3a006", "score": "0.57826704", "text": "function setSlide(n) {\n SlideIndex = n;\n slideShow();\n}", "title": "" }, { "docid": "659b071661d38a60aa1240af9012789b", "score": "0.5730567", "text": "initSlides() {\n this.container = $('[data-slideshow]');\n this.slides = this.container.find('img');\n this.slides.each((idx, slide) => $(slide).attr('data-slide', idx));\n }", "title": "" }, { "docid": "ffe8d105464d57d0f931490f9423293e", "score": "0.56841296", "text": "setup(carouselWidth, slides, options) {\n this.setCarouselWidth(carouselWidth);\n this.setItems(slides);\n this._defineSlidesData();\n this.setOptions(options);\n this.settings = Object.assign({}, this._options);\n this.setOptionsForViewport();\n this._trigger('change', { property: { name: 'settings', value: this.settings } });\n this.invalidate('settings'); // must be call of this function;\n this._trigger('changed', { property: { name: 'settings', value: this.settings } });\n }", "title": "" }, { "docid": "ffe8d105464d57d0f931490f9423293e", "score": "0.56841296", "text": "setup(carouselWidth, slides, options) {\n this.setCarouselWidth(carouselWidth);\n this.setItems(slides);\n this._defineSlidesData();\n this.setOptions(options);\n this.settings = Object.assign({}, this._options);\n this.setOptionsForViewport();\n this._trigger('change', { property: { name: 'settings', value: this.settings } });\n this.invalidate('settings'); // must be call of this function;\n this._trigger('changed', { property: { name: 'settings', value: this.settings } });\n }", "title": "" }, { "docid": "b9331deb075aab186f5ea01766352b82", "score": "0.56703436", "text": "initSlides() {\n let arr = this.container.querySelectorAll(this.settings.slides)\n\n arr.forEach(slide => {\n let obj = {\n name: slide.dataset.name,\n container: slide,\n }\n this.slides.push(obj)\n })\n }", "title": "" }, { "docid": "85b674f22a008a44e113a40ff1094948", "score": "0.55887204", "text": "function setSlides(n){\n slideNumber = n;\n showSlides(slideIndex);\n}", "title": "" }, { "docid": "b5177caa5f3bdfb1893196a81808bcf7", "score": "0.5572236", "text": "function setHtmlObjectsProperties(){\n\t\t \n\t\t\tvar optionWidth = g_functions.getCssSizeParam(g_options.gallery_width);\n\t\t\t\n\t\t //set size\t\t\n\t\t var objCss = {\n\t\t\t\t //\"width\":optionWidth,\t\t//make it work within tabs\n\t\t\t\t \"max-width\":optionWidth,\n\t\t\t\t\t\"min-width\":g_functions.getCssSizeParam(g_options.gallery_min_width)\n\t\t\t};\n\t\t \n\t\t if(g_temp.isFreestyleMode == false){\n\t\t\t \n\t\t\t var galleryHeight = g_functions.getCssSizeParam(g_options.gallery_height);\n\t\t\t objCss[\"height\"] = galleryHeight;\n\t\t \n\t\t }else{\n\t\t\t objCss[\"overflow\"] = \"visible\";\t\t\t \n\t\t }\n\t\t \n\t\t //set background color\n\t\t if(g_options.gallery_background_color)\n\t\t\t objCss[\"background-color\"] = g_options.gallery_background_color;\n\t\t \n\t\t \n\t\t g_objWrapper.css(objCss);\n\t\t \n\t}", "title": "" }, { "docid": "8d63a071ddae7d680d82317cee1c7a41", "score": "0.5555695", "text": "function autoShow() {\n plusSlides(1);\n setTimeout(autoShow, 30000); //Change slide every xx seconds\n}", "title": "" }, { "docid": "d84ba565b32388b42c725e4d08581c7e", "score": "0.5543197", "text": "function Slideshow(options) {\n this._BANNER_NUM = 3;\n\n this.elem = options.elem;\n this.elem.onclick = this.onclick.bind(this);\n }", "title": "" }, { "docid": "2e9027a33caf8d1b382255ac38d1beee", "score": "0.550668", "text": "addNewSlide () {\n const props = this.props\n const latestSettings = props.latestSettings\n const slides = latestSettings.slides || []\n props.dispatchEdition('slides', [...slides, {}])\n this.unactivateAllEditors()\n }", "title": "" }, { "docid": "57c419d3ab75ab9bbb97438f9121da35", "score": "0.5499885", "text": "function init(slidesJson) {\n $.each(slidesJson, function(i, obj) {\n slideId = obj.pk;\n obj.fields.vanhentuu = moment(obj.fields.vanhentuu).format(\"DD/MM/YYYY-HH.mm.ss\");\n SLIDES[slideId] = slidesJson[i];\n });\n SLIDES[-1] = 'slide-trello';\n SLIDES[-2] = 'slide-restaurant';\n SLIDES[-3] = 'slide-events';\n }", "title": "" }, { "docid": "754b06e68e907fd9bda0807da7cf658d", "score": "0.5488033", "text": "function setSlides(num){\n\n displaySlides(currentindex+=num) //updating which slides to display\n\n}", "title": "" }, { "docid": "8ee8ebd6cc2274bde316c87017b74433", "score": "0.5447762", "text": "function addVideo() {\n myPresentation.getCurrentSlide().addVideo(inTxt.value);\n inTxt.value = \"\";\n}", "title": "" }, { "docid": "faa8daccc7c9d288d1d9138f880a07e0", "score": "0.5414887", "text": "function Slidepanel( $element, options ) {\n this.$element = $element;\n this.options = $.extend( {}, defaults, options) ;\n this._defaults = defaults;\n this.init();\n }", "title": "" }, { "docid": "8eff1685a70e69d142ee3f118496b749", "score": "0.54118603", "text": "function addSlide() {\n\t/* create a new slide object */\n\tvar slide = new SlideSet(nextSlideType);\n\tslideSetArray[numSlide] = slide;\n\tnumSlide = numSlide + 1;\n}", "title": "" }, { "docid": "03cc913398ff4ca01525ddd3e119d4b2", "score": "0.5400409", "text": "function VisualSlideShow(a){if(a.effect&&a.effect.toLowerCase()==\"fade\"){a.effect=\"\"}var c=\"\";var b=/^(.*)visualslideshow\\.js$/;Array.each($$(\"script\"),function(i,g,f){if(b.test(i.src)){var h=b.exec(i.src);c=h[1]}});function e(g,f){document.write('<script type=\"text/javascript\"'+(g?' src=\"'+c+g+'\"':\"\")+\">\"+(f||\"\")+\"<\\/script>\")}e(\"slideshow.js\");if(a.effect){e(\"slideshow.\"+a.effect.toLowerCase()+\".js\")}if(a.sound){e(\"swfobject.js\")}window.addEvent(\"domready\",function(){if(a.sound){var l;if(window.Audio){l=new Audio();if(!l.canPlayType||!l.canPlayType(\"audio/mp3\")){l=0}}if(l){l.src=a.sound;if(a.loop){l.loop=\"loop\"}if(!a.paused){l.play()}}else{var h=\"vssSound\"+a.id;var f=\"vssSL\"+a.id;window[f]={onInit:function(){}};$(a.id).grab(new Element(\"div\",{id:h}));swfobject.createSWF({data:c+\"player_mp3_js.swf\",width:\"1\",height:\"1\"},{allowScriptAccess:\"always\",loop:true,FlashVars:\"listener=\"+f+\"&loop=\"+(a.loop?1:0)+\"&autoplay=\"+(a.paused?0:1)+\"&mp3=\"+a.sound},h)}a.onPause=function(){if(l){l.pause()}else{$(h).SetVariable(\"method:pause\",\"\")}};a.onResume=function(){if(l){l.play()}else{$(h).SetVariable(\"method:play\",\"\")}}}$$(\"#\"+a.id+\" div.slideshow-images img\").set({styles:{position:\"absolute\"}});var k=new Element(\"a\",{href:\"#\",styles:{border:\"none\",display:\"block\",height:\"100%\",width:\"100%\"}});$$(\"#\"+a.id+\" .slideshow-frame\").grab(k);a.onStart=function(){k.href=this.image.parentNode.href||\"#\";k.target=this.image.parentNode.target||\"_self\"};var g;if(a.effect){g=new Slideshow[a.effect](a.id,null,a)}else{g=new Slideshow(a.id,null,a)}if(!window.visualslideshow){window.visualslideshow=[]}window.visualslideshow[window.visualslideshow.length]=g;var j=$$(\"#\"+a.id+\" div.slideshow-images\");var i=\"\";if(j&&i){var m=new Element(\"div\",{styles:{position:\"absolute\",right:0,bottom:0,padding:\"0 3px 2px\",\"background-color\":\"#EEE\",\"z-index\":999999},events:{contextmenu:function(n){return false}}});j.grab(m);d=new Element(\"a\",{href:\"http://\"+i.toLowerCase(),html:i,styles:{color:\"#555\",font:\"10px Arial,Verdana,sans-serif\",padding:\"0 6px 3px\",width:\"auto\",height:\"auto\",margin:\"0 0 0 0\",outline:\"none\"}});m.grab(d)}})}", "title": "" }, { "docid": "f1a43d6daa31b9c4ead80a076aea403a", "score": "0.53589183", "text": "get validateConfigAutoPlay() {\n const {\n active,\n ctrlPlay,\n ctrlStop,\n timeAutoPlay,\n } = this.configSlide;\n\n if (active) {\n const CONFIG = {\n timeAutoPlay: (timeAutoPlay * 1000),\n ctrlPlay: Utils.getElementDom(ctrlPlay),\n ctrlStop: Utils.getElementDom(ctrlStop),\n };\n Object.assign(this.configSlide, CONFIG);\n }\n return this;\n }", "title": "" }, { "docid": "51aeaaeba9da7efd3636bbf6a38b0469", "score": "0.53384113", "text": "function setSlide(slide) {\n //autoPlay.restart(true);\n\n if (slide === currentSlide) {\n return;\n }\n\n if (currentSlide.index === 0 && slide.index === slides.length - 1) {\n currentSlide.setPrevInactive();\n currentSlide = slide;\n currentSlide.setPrevActive();\n } else if (currentSlide.index === slides.length - 1 && slide.index === 0) {\n currentSlide.setInactive();\n currentSlide = slide;\n currentSlide.setActive();\n } else if (slide.index < currentSlide.index) {\n currentSlide.setPrevInactive();\n currentSlide = slide;\n currentSlide.setPrevActive();\n } else {\n currentSlide.setInactive();\n currentSlide = slide;\n currentSlide.setActive();\n }\n }", "title": "" }, { "docid": "6acf2e18b033b980f4b8af28c8072330", "score": "0.533452", "text": "function setElemsAttr() {\n var slide_position = document.getElementsByClassName('slider')[2].querySelectorAll('.slide');\n if (slide_position[0]) {\n slide_position[0].setAttribute('data-slide-position', 'left');\n }\n if (slide_position[1]) {\n slide_position[1].setAttribute('data-slide-position', 'top');\n }\n if (slide_position[2]) {\n slide_position[2].setAttribute('data-slide-position', 'right');\n }\n if (slide_position[3]) {\n slide_position[3].setAttribute('data-slide-position', 'right_bottom');\n }\n }", "title": "" }, { "docid": "ec05a6cfa1a76aa28743f31336cbb233", "score": "0.5324059", "text": "function pcjsSlideshow(width,height,paddingTop,paddingRight,paddingLeft,parent,background,crop){\n this.width = width;\n this.height = height;\n \n this.viewport = s('<div id=\"slideshow-viewport\"></div>');\n this.viewport.css({\n \"position\":\"absolute\",\n \"width\": width,\n \"height\": height,\n \"margin-left\":paddingLeft,\n \"margin-right\":paddingRight,\n \"top\":paddingTop,\n \"overflow\":\"hidden\",\n \"z-index\":10\n });\n parent.append(this.viewport);\n \n this.slideContainer = s('<div id=\"slideshow-container\"></div>');\n this.slideContainer.css({\n \"position\":\"absolute\",\n \"width\": width*3,\n \"height\": height*3,\n \"top\":-height,\n \"left\":-width,\n \"overflow\":\"hidden\",\n \"z-index\":10,\n });\n this.viewport.append(this.slideContainer);\n \n this.active = new pcjsSlide(width,height,width,this.slideContainer,background,crop);\n this.prev = new pcjsSlide(width,height,width*2,this.slideContainer,background,crop); \n this.next = new pcjsSlide(width,height,0,this.slideContainer,background,crop); \n \n s('img',this.slideContainer).css({\"max-width\":width,\"vertical-align\":\"bottom\",});\n }", "title": "" }, { "docid": "049d123a0a9c326454c97723bd70bad1", "score": "0.532326", "text": "function _createSlide() {\n var slide = {};\n\n slide[MEASURE.FAILURE] = 0;\n slide[MEASURE.SUCCESS] = 0;\n slide[MEASURE.TIMEOUT] = 0;\n slide[MEASURE.OUTAGE] = 0;\n\n return slide;\n }", "title": "" }, { "docid": "ad46839d3433b78ca4a6f69b8aade385", "score": "0.5319321", "text": "function displayChangeSettings(index, content) {\n let slide = slides[index];\n if (content.length == 2) {\n let key = content[0];\n let val = content[1];\n\n slide.style[key] = val;\n }\n else if (content.length > 2) {\n let key = content[0];\n let tag = content[1];\n let val = content[2];\n\n let elements = slide.getElementsByTagName(tag);\n // apply styling\n for (let i = 0; i < elements.length; i++) {\n elements[i].style[key] = val;\n }\n }\n}", "title": "" }, { "docid": "1fd4d363d7c47138ca80ecb6bfdb46b9", "score": "0.52972275", "text": "function editGallery(property, value) {\n gallery[property] = value\n}", "title": "" }, { "docid": "c2e649c8ef62bed84e9c16a9d6c4c9c4", "score": "0.5290395", "text": "function setupCarousel() {\n defaultSettings = {\n instance: $(\".benefits\"),\n slideSelector: \".benefit\"\n };\n\n defaultSettings = $.extend(defaultSettings, getBreakpointSettings());\n carousel = new Carousel(defaultSettings);\n }", "title": "" }, { "docid": "ba721eb6502681c978b0528a2ad232f8", "score": "0.52802485", "text": "initSlides() {\n\t\t\tconst slider = this;\n\t\t\tslider.slides = slider.$el.children(slider.options.slide);\n\t\t}", "title": "" }, { "docid": "daa1991909f58261277c88e71082baf5", "score": "0.52641773", "text": "function initWebControl() {\n mobileClientCount = 0;\n defaultUrl = \"https://docs.google.com/presentation/d/\" + presentation.presentationId + \"/embed?start=false&loop=false&delayms=3000\";\n slides = presentation.slides;\n currentSlideNo = 0;\n maxSlidesNo = presentation.slides.length;\n currentSlide = slides[0];\n speakerNote = \"\";\n sendNotes();\n isInitialised = true;\n}", "title": "" }, { "docid": "2da517cca4db1493eb2638cd77761bb8", "score": "0.52195567", "text": "function AddNewSlide() {\n myPresentation.addSlide(myPresentation.getCurrentSlideIndex() + 1);\n //myPresentation.setCurrentSlideIndex(myPresentation.getCurrentSlideIndex() + 1);\n updateSlideselector();\n goToNextSlide();\n}", "title": "" }, { "docid": "ecfc080227aca85b723793aa11f3df8e", "score": "0.52089703", "text": "function showSlides() {\n var i;\n var slides = document.getElementsByClassName(\"mySlides\");\n \tfor (i = 0; i < slides.length; i++) {\n \tslides[i].style.display = \"none\"; \n \t}\n slideIndex++;\n if (slideIndex > slides.length) {slideIndex = 1} //sets like slide index\n slides[slideIndex-1].style.display = \"block\"; \n setTimeout(showSlides, 4000); // Change image every 4 seconds\n}", "title": "" }, { "docid": "87f118cddb2198c1194ecfbfb1a921c2", "score": "0.5199937", "text": "function setSlideImages() {\n formatWindow();\n}", "title": "" }, { "docid": "523cac4d7ca9d96ad91f35ed31d1505d", "score": "0.5191421", "text": "function AddSlide(aHTML) {\n FN.CoreAddSlide(aHTML, index)\n }", "title": "" }, { "docid": "15d438ecb5ba5e347e9b36da386de432", "score": "0.5187813", "text": "function setAutoControlsVars(){\n\t\t\t// check if text or images should be used for controls\n\t\t\t// check \"start\"\n\t\t\tif(options.startImage != ''){\n\t\t\t\tstartContent = options.startImage;\n\t\t\t\tstartType = 'image';\n\t\t\t}else{\n\t\t\t\tstartContent = options.startText;\n\t\t\t\tstartType = 'text';\n\t\t\t}\n\t\t\t// check \"stop\"\n\t\t\tif(options.stopImage != ''){\n\t\t\t\tstopContent = options.stopImage;\n\t\t\t\tstopType = 'image';\n\t\t\t}else{\n\t\t\t\tstopContent = options.stopText;\n\t\t\t\tstopType = 'text';\n\t\t\t}\n\t\t\t// show the controls\n\t\t\tshowAutoControls(startType, startContent, stopType, stopContent);\n\t\t}", "title": "" }, { "docid": "7359766cc45b166a8c908ede42ede54e", "score": "0.5186947", "text": "function changeSlides(data) {\n\tvar firstSlide = document.getElementById('firstSlide');\n\tvar secSlide = document.getElementById('secSlide');\n\tvar thirdSlide = document.getElementById('thirdSlide');\n\n\tfirstSlide.src = data[\"0\"].info.logo;\n\tfirstSlide.class = \"carPic\";\n\n\tsecSlide.src = data[\"1\"].info.logo;\n\tsecSlide.class = \"carPic\";\n\n\tthirdSlide.src = data[\"2\"].info.logo;\n\tthirdSlide.class = \"carPic\";\n}", "title": "" }, { "docid": "426514c7260dbe3fc3c036c14cad06da", "score": "0.51793027", "text": "function plusSlides(n) { //the keyword plusSlides refers to the keyword defined in the html product files.\n showSlides(slideIndex += n); // the slideindex will either be increased or decreased by 1. E.g. if the user clicks 'next', 1 will be added. \n}", "title": "" }, { "docid": "8bc6a54965827cd41460442e8179b4c9", "score": "0.5176524", "text": "function setDartEnterpriseBanner(adType, sync_banner, tracking_url, resource_obj) {\n var $bigbox = $('#bigbox');\n if (adType == 'LEADERBOARD') {\n //not relevant- this is for leaderboard...\n } else {\n if ($bigbox.length > 0) {\n var boxW = 300;\n var boxH = 250;\n var isPG = (mdManager.getParameter('DelvFrmt') === 'ARTICLE_BUILDER_PHOTOGALLERY') ? true : false;\n var frameStyle = '';\n if (isPG) {\n boxH = 600;\n frameStyle = ' allowTransparency=\"true\" style=\"background-color:#303030 !important;\" ';\n sync_banner += '&PARAMS.STYLES=SNI_PHOTOGALLERY_BIGBOX';\n }\n if (sync_banner.indexOf(\"336x850\") > -1) {\n boxW = 336;\n boxH = 850;\n } else if (sync_banner.indexOf(\"300x600\") > -1) {\n boxW = 300;\n boxH = 600;\n }\n if (mdManager.getParameter('DelvFrmt') === 'PORTFOLIO_DETAIL') {\n boxH = 600;\n }\n var html = '';\n resource_obj = resource_obj || {\n \"nodeName\": \"IFrameResource\"\n };\n switch (resource_obj.nodeName) {\n case \"HTMLResource\":\n html += sync_banner;\n break;\n case \"StaticResource\":\n if (resource_obj.creativeType === 'image/jpeg')\n html += '<a><img src=\"' + sync_banner + '\" width=\"' + (resource_obj.width ? resource_obj.width : boxW) + '\" height=\"' + (resource_obj.height ? resource_obj.height : boxH) + '\"></a>';\n else\n html += '<embed src=\"' + sync_banner + '\" width=\"' + (resource_obj.width ? resource_obj.width : boxW) + '\" height=\"' + (resource_obj.height ? resource_obj.height : boxH) + '\"></embed>';\n break;\n default:\n html += '<iframe src=\"' + sync_banner + '\" width=\"' + boxW + '\" height=\"' + boxH + '\" frameborder=\"0\" scrolling=\"no\" marginheight=\"0\" ' + frameStyle + '\" marginwidth=\"0\"></iframe>';\n break;\n }\n if (SNI.Ads.SafeFrame.isActive()) {\n SNI.Ads.SafeFrame.renderSyncBanner(html);\n } else {\n $bigbox.html(html);\n }\n if (tracking_url) {\n $bigbox.append('<img src=\"' + tracking_url + '\" class=\"cvTrackingPixel hide\">');\n }\n }\n }\n return;\n}", "title": "" }, { "docid": "0d36cf801b91ddb22e7ce3a7eeb7be68", "score": "0.51552755", "text": "function setSlideImg(slide, slideType) {\n var imgSize = getScreenSize();\n if(slideType == \"highlow\") {\n $(slide).attr({src: \"../../assets/highlow\" + imgSize + \".png\", alt: \"high-low\"});\n } else if (slideType == \"rockpaperscissors\") {\n $(slide).attr({src: \"../../assets/rockpaperscissors\" + imgSize + \".png\", alt: \"rock-paper-scissors\"});\n } else {\n $(slide).attr({src: \"../../assets/crownanchor\" + imgSize + \".png\", alt: \"crown-and-anchor\"});\n }\n}", "title": "" }, { "docid": "6a2a8183dd480d82c9ea7d5cebf4a40a", "score": "0.51549846", "text": "static set resolutionDialogBanner(value) {}", "title": "" }, { "docid": "08c8dc036f91423fd308fb4d79330340", "score": "0.51537377", "text": "function setHtmlSlider(objParent){\n\t\t\n\t\tif(objParent)\n\t\t\tg_objWrapper = objParent;\n\t\t\n\t\t//get if the slide has controls\n\t\tvar loaderClass = getLoaderClass();\n\t\tvar galleryOptions = g_gallery.getOptions();\n\t\t\n\t\tvar html = \"<div class='ug-slider-wrapper'>\";\n\t\t\n\t\thtml += \"<div class='ug-slider-inner'>\";\n\t\thtml += getHtmlSlide(loaderClass,1);\n\t\thtml += getHtmlSlide(loaderClass,2);\n\t\thtml += getHtmlSlide(loaderClass,3);\n\t\t\t\t\n\t\thtml += \"</div>\";\t//end inner\n\t\t\n\t\t//----------------\n\t\t\t\t\n\t\t//add arrows\n\t\tif(g_options.slider_enable_arrows == true){\n\t\t\thtml += \"<div class='ug-slider-control ug-arrow-left ug-skin-\"+g_options.slider_arrows_skin+\"'></div>\";\n\t\t\thtml += \"<div class='ug-slider-control ug-arrow-right ug-skin-\"+g_options.slider_arrows_skin+\"'></div>\";\n\t\t}\n\t\t\n\t\t//add play button\n\t\tif(g_options.slider_enable_play_button == true){\n\t\t\thtml += \"<div class='ug-slider-control ug-button-play ug-skin-\"+g_options.slider_play_button_skin+\"'></div>\";\n\t\t}\n\t\t\n\t\t//add fullscreen button\n\t\tif(g_options.slider_enable_fullscreen_button == true){\n\t\t\thtml += \"<div class='ug-slider-control ug-button-fullscreen ug-skin-\"+g_options.slider_fullscreen_button_skin+\"'></div>\";\n\t\t}\n\t\t\n\t\t\n\t\thtml +=\t\"</div>\";\t//end slider\n\t\t\n\t\t\n\t\tg_objWrapper.append(html);\n\t\t\n\t\t//----------------\n\t\t\n\t\t//set objects\n\t\tg_objSlider = g_objWrapper.children(\".ug-slider-wrapper\");\n\t\tg_objInner = g_objSlider.children(\".ug-slider-inner\");\n\t\t\n\t\t\n\t\tg_objSlide1 = g_objInner.children(\".ug-slide1\");\n\t\tg_objSlide2 = g_objInner.children(\".ug-slide2\");\n\t\tg_objSlide3 = g_objInner.children(\".ug-slide3\");\n\t\t\n\t\t//set slides data\n\t\tg_objSlide1.data(\"slidenum\",1);\n\t\tg_objSlide2.data(\"slidenum\",2);\n\t\tg_objSlide3.data(\"slidenum\",3);\n\t\t\t\t\n\t\t//add bullets\n\t\tif(g_objBullets)\n\t\t\tg_objBullets.appendHTML(g_objSlider);\n\t\t\n\t\t//----------------\n\t\t\n\t\t//get arrows object\n\t\tif(g_options.slider_enable_arrows == true){\n\t\t\tg_objArrowLeft = g_objSlider.children(\".ug-arrow-left\");\n\t\t\tg_objArrowRight = g_objSlider.children(\".ug-arrow-right\");\n\t\t}\n\t\t\t\t\n\t\t//get play button\n\t\tif(g_options.slider_enable_play_button == true){\n\t\t\tg_objButtonPlay = g_objSlider.children(\".ug-button-play\");\n\t\t}\n\t\t\n\t\t//get fullscreen button\n\t\tif(g_options.slider_enable_fullscreen_button == true){\n\t\t\tg_objButtonFullscreen = g_objSlider.children(\".ug-button-fullscreen\");\n\t\t}\n\t\t\n\t\t\n\t\t//----------------\n\t\t\n\t\t//add progress indicator\n\t\tif(g_options.slider_enable_progress_indicator == true){\n\t\t\t\n\t\t\tg_objProgress = g_functions.initProgressIndicator(g_options.slider_progress_indicator_type, g_options, g_objSlider);\n\t\t\t\n\t\t\tvar finalType = g_objProgress.getType();\n\t\t\t\n\t\t\t//change options in case of type change\n\t\t\tif(finalType == \"bar\" && g_options.slider_progress_indicator_type == \"pie\"){\n\t\t\t\tg_options.slider_progress_indicator_type = \"bar\";\n\t\t\t\tg_options = jQuery.extend(g_options, g_defaultsProgressBar);\n\t\t\t}\t\n\t\t\t\n\t\t\tg_gallery.setProgressIndicator(g_objProgress);\n\t\t}\n\t\t\n\t\t//----------------\n\t\t\n\t\t//add text panel (hidden)\n\t\tif(g_options.slider_enable_text_panel == true){\n\t\t\t\n\t\t\t\tg_objTextPanel.appendHTML(g_objSlider);\n\t\t\t\t\t\t\t\t\n\t\t\t\t//hide panel saparatelly from the controls object\n\t\t\t\tif(g_options.slider_textpanel_always_on == false){\n\t\t\t\t\t\n\t\t\t\t\t//hide the panel\n\t\t\t\t\tvar panelElement = g_objTextPanel.getElement();\n\t\t\t\t\tpanelElement.hide().data(\"isHidden\", true);\n\t\n\t\t\t\t\tg_temp.isTextPanelSaparateHover = true;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t}\n\t\t\t\n\t\t//----------------\n\t\t\n\t\t//add zoom buttons panel:\n\t\tif(g_options.slider_enable_zoom_panel == true){\n\t\t\tg_objZoomPanel.appendHTML(g_objSlider);\n\t\t}\n\t\n\t\t\n\t\t//add video player\n\t\tg_objVideoPlayer.setHtml(g_objInner);\n\t}", "title": "" }, { "docid": "a9b379de45851cbc9a13186e3a50d3f7", "score": "0.5150731", "text": "function handlePlayNow (){\n introSlide.hidden = true;\n infoSlide.hidden = false;\n \n}", "title": "" }, { "docid": "3b19051ba58598872172b3656c6f705c", "score": "0.5149954", "text": "function setImg()\r\n{\r\n return slide.setAttribute(\"src\",\"Images/\"+images[i]);\r\n}", "title": "" }, { "docid": "4e3bf8b0885fc571fc103337e2c9e70f", "score": "0.51454836", "text": "function plusSlides(n){ // poluchaet argument n // \r\n showSlides(slideIndex += n ); // vizivaem function showSlides i peredaem tuda index i argument polucheni v function plusSlides,dobavlyaa 1 ili otnimaya 1 ot obsheg indexa // \r\n }", "title": "" }, { "docid": "74f6e41394c821ee1fd5ec32594d7e3f", "score": "0.513625", "text": "newPropertiesSheet() {\n this.properties_sheet = new VisualBuilderInstanceProperties(this.artefact)\n }", "title": "" }, { "docid": "4ba47c7d88931345d62ad4f450abcd09", "score": "0.51348084", "text": "getSlides() {\n return this.slides;\n }", "title": "" }, { "docid": "b839ce56bb4948572bc3e7485447b495", "score": "0.51298124", "text": "function switchs(){\n ypp.reSetAd({\n video:vMid,\n mid:'4338674',\n cpid:'9',\n resolution:'440000'\n });\n }", "title": "" }, { "docid": "6e31b7f8d0b0d9e938c1452c11574d3a", "score": "0.5122676", "text": "function currentSlide(n) { //aktuelle Seite\r\n showSlides(slideIndex= n);\r\n}", "title": "" }, { "docid": "52869bec886761f0549e87824f2820fe", "score": "0.5122365", "text": "setSlideIndexs() {\n this.slidertrack.children().each(function (index) {\n $(this).attr(\"data-kslider-index\", index);\n });\n }", "title": "" }, { "docid": "c83b9728d96723ee4918fbc934720cff", "score": "0.5116795", "text": "function setItemToSlide(objSlide, objItem){\n\t\t\n\t\ttry{\n\n\t\t\tvar objItemWrapper = objSlide.children(\".ug-item-wrapper\");\n\t\t\t\t\t\n\t\t\t//if the item is empty, remove the image from slide\n\t\t\tif(objItem == null){\n\t\t\t\tobjItemWrapper.html(\"\");\n\t\t\t\tobjSlide.removeData(\"index\");\n\t\t\t\tobjSlide.removeData(\"type\");\n\t\t\t\tobjSlide.removeData(\"urlImage\");\n\t\t\t\treturn(false);\n\t\t\t}\n\t\t\t\n\t\t\tvar currentIndex = objSlide.data(\"index\");\n\t\t\t\n\t\t\tobjSlide.data(\"index\",objItem.index);\n\t\t\tobjSlide.data(\"type\", objItem.type);\n\t\t\t\n\t\t\t//set link class\n\t\t\tif(g_options.slider_enable_links == true && objItem.type == \"image\"){\n\t\t\t\t\n\t\t\t\tif(objItem.link)\n\t\t\t\t\tobjSlide.addClass(\"ug-slide-clickable\");\n\t\t\t\telse\n\t\t\t\t\tobjSlide.removeClass(\"ug-slide-clickable\");\n\t\t\t}\n\t\t\t\n\t\t\tsetImageToSlide(objSlide, objItem);\n\t\t\t\n\t\t\t//show type related elements\n\t\t\tvar objVideoPlayButton = getSlideVideoPlayButton(objSlide);\n\t\t\tswitch(objItem.type){\n\t\t\t\tcase \"image\":\n\t\t\t\t\tobjVideoPlayButton.hide();\n\t\t\t\tbreak;\n\t\t\t\tdefault:\t\t//video\n\t\t\t\t\tobjVideoPlayButton.show();\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}catch(error){\n\t\t\t\n\t\t\tif(typeof error.fileName != \"undefined\" && error.fileName == \"showbig\")\n\t\t\t\tg_gallery.showErrorMessageReplaceGallery(error.message);\n\t\t\t\n\t\t\tobjItemWrapper.html(\"\");\n\t\t\tthrow new Error(error);\n\t\t\treturn(true);\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "74f63598e580ff5af18daa042991a7b1", "score": "0.5107683", "text": "function addNewSlide(slideId, slideJson) {\n title = slideJson[0].fields.otsikko;\n description = slideJson[0].fields.teksti;\n duration = slideJson[0].fields.näyttöaika_sekunteina;\n expiresAt = slideJson[0].fields.vanhentuu;\n\n // Django returns datetimes in this weird +02:00 format so we have to parse it correctly\n expiresAt = moment(expiresAt, \"YYYY-MM-DDTHH:mm:ss+02:00\").format(\"DD/MM/YYYY-HH.mm.ss\");\n slideJson[0].fields.vanhentuu = expiresAt;\n SLIDES[slideId] = slideJson[0];\n\n // Setup basic elements\n var header = '<h2 class=\"title\">' + title + '</h2>';\n var text = '<p>' + description +'</p>';\n var descriptionWrapper = '<div class=\"description-wrapper\">' + text + '</div>';\n var contentContainer = '<div class=\"content-container\">' + header + '<hr>' + descriptionWrapper + '</div>';\n var slideFade = '<div class=\"contentslide-' + slideId +' fade\">' + contentContainer + '</div>';\n\n $('.content-slide-container').append(slideFade);\n }", "title": "" }, { "docid": "45e5900f3ba019de28eef3bd69ba2120", "score": "0.5103982", "text": "function init(){\n let page = data.pages.page1,\n titleCss = page.title.css,\n descriptionCss = page.description.css;\n\n SLIDER.addSlide(uiMain, data);//generate first empty slideshow - canvas\n\n let dragableItem = $('.dragableText');\n dragableItem.click(clickTextOnCanvassListener);\n\n //generate general settings tool tab\n GS.generateGlobalSettings( ui, data.story)\n\n }", "title": "" }, { "docid": "8f757e64b4382d88fa2f002f16d615ab", "score": "0.50977397", "text": "function setupSlideshow() {\n // Fjern alle children fra slideshowet.\n while (navigation.firstChild) {\n navigation.removeChild(navigation.firstChild);\n }\n // Loop gennem slideshowets billeder.\n for (let i = 0; i < images.length; i++) {\n // Opret 'dot'.\n let dot = document.createElement(\"span\");\n // Giv elementet en klik event listener til at saette det viste billede.\n dot.addEventListener('click', () => {\n setSlide(i);\n });\n // Gem dotten.\n dots.push(dot);\n navigation.appendChild(dots[i]);\n }\n // Opdater til sidst slideshhowet.\n updateSlideshow();\n}", "title": "" }, { "docid": "e8bf4affcdd576d51dc63d889a7ad524", "score": "0.5097494", "text": "_setSlideHeight(height) {\n this.$slides.each(function() {\n $(this).css('max-height', height);\n });\n }", "title": "" }, { "docid": "350aa4d56901a9c66cc51b5c0bd59315", "score": "0.5094375", "text": "function configure( options ) {\n\n\t\t\tvar numberOfSlides = document.querySelectorAll( SLIDES_SELECTOR ).length;\n\n\t\t\tdom.wrapper.classList.remove( config.transition );\n\n\t\t\t// New config options may be passed when this method\n\t\t\t// is invoked through the API after initialization\n\t\t\tif( typeof options === 'object' ) extend( config, options );\n\n\t\t\t// Force linear transition based on browser capabilities\n\t\t\tif( features.transforms3d === false ) config.transition = 'linear';\n\n\t\t\tdom.wrapper.classList.add( config.transition );\n\n\t\t\tdom.wrapper.setAttribute( 'data-transition-speed', config.transitionSpeed );\n\t\t\tdom.wrapper.setAttribute( 'data-background-transition', config.backgroundTransition );\n\n\t\t\tdom.controls.style.display = config.controls ? 'block' : 'none';\n\t\t\tdom.progress.style.display = config.progress ? 'block' : 'none';\n\n\t\t\tif( config.rtl ) {\n\t\t\t\tdom.wrapper.classList.add( 'rtl' );\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdom.wrapper.classList.remove( 'rtl' );\n\t\t\t}\n\n\t\t\tif( config.center ) {\n\t\t\t\tdom.wrapper.classList.add( 'center' );\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdom.wrapper.classList.remove( 'center' );\n\t\t\t}\n\n\t\t\tif( config.mouseWheel ) {\n\t\t\t\tdocument.addEventListener( 'DOMMouseScroll', onDocumentMouseScroll, false ); // FF\n\t\t\t\tdocument.addEventListener( 'mousewheel', onDocumentMouseScroll, false );\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdocument.removeEventListener( 'DOMMouseScroll', onDocumentMouseScroll, false ); // FF\n\t\t\t\tdocument.removeEventListener( 'mousewheel', onDocumentMouseScroll, false );\n\t\t\t}\n\n\t\t\t// Rolling 3D links\n\t\t\tif( config.rollingLinks ) {\n\t\t\t\tenableRollingLinks();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdisableRollingLinks();\n\t\t\t}\n\n\t\t\t// Iframe link previews\n\t\t\tif( config.previewLinks ) {\n\t\t\t\tenablePreviewLinks();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdisablePreviewLinks();\n\t\t\t\tenablePreviewLinks( '[data-preview-link]' );\n\t\t\t}\n\n\t\t\t// Auto-slide playback controls\n\t\t\tif( numberOfSlides > 1 && config.autoSlide && config.autoSlideStoppable && features.canvas && features.requestAnimationFrame ) {\n\t\t\t\tautoSlidePlayer = new Playback( dom.wrapper, function() {\n\t\t\t\t\treturn Math.min( Math.max( ( Date.now() - autoSlideStartTime ) / autoSlide, 0 ), 1 );\n\t\t\t\t} );\n\n\t\t\t\tautoSlidePlayer.on( 'click', onAutoSlidePlayerClick );\n\t\t\t\tautoSlidePaused = false;\n\t\t\t}\n\t\t\telse if( autoSlidePlayer ) {\n\t\t\t\tautoSlidePlayer.destroy();\n\t\t\t\tautoSlidePlayer = null;\n\t\t\t}\n\n\t\t\t// Load the theme in the config, if it's not already loaded\n\t\t\tif( config.theme && dom.theme ) {\n\t\t\t\tvar themeURL = dom.theme.getAttribute( 'href' );\n\t\t\t\tvar themeFinder = /[^\\/]*?(?=\\.css)/;\n\t\t\t\tvar themeName = themeURL.match(themeFinder)[0];\n\n\t\t\t\tif( config.theme !== themeName ) {\n\t\t\t\t\tthemeURL = themeURL.replace(themeFinder, config.theme);\n\t\t\t\t\tdom.theme.setAttribute( 'href', themeURL );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tsync();\n\n\t\t}", "title": "" }, { "docid": "0b7ec67954530034f796e55332087c3d", "score": "0.50940573", "text": "getSlides(){\r\n return this.slides;\r\n }", "title": "" }, { "docid": "0afad6ad0761456eafe7a52b3abc115d", "score": "0.5076301", "text": "function JetpackSlideshow( element, transition, autostart ) {\n\tthis.element = element;\n\tthis.images = [];\n\tthis.controls = {};\n\tthis.transition = transition || 'fade';\n\tthis.autostart = autostart;\n}", "title": "" }, { "docid": "c3546cff2edb2eeefbead8b387f71eda", "score": "0.5073747", "text": "init() {\n\t\t\tthis.slides[this.current].setCurrent();\n\t\t\tthis.initEvents();\n\t\t}", "title": "" }, { "docid": "9b3fe693f348fa9b25f9c44ed1af4bb7", "score": "0.50727403", "text": "function Slide(title, subtitle, background, link, link2 ) {\n\tthis.title = title;\n\tthis.subtitle = subtitle;\n\tthis.background = background;\n this.link = link;\n this.link2 = link2\n\t// we need an id to target later using getElementById\n\tthis.id = \"slide\" + slideIndex;\n\t// Add one to the index for the next slide number\n\tslideIndex++;\n\t// Add this Slide to our array\n\tslideArray.push(this);\n}", "title": "" }, { "docid": "f62e16f1fe2793a986e4605fe57fe0d4", "score": "0.50673854", "text": "function TVNextPrevSlide(newValue){\n var name = '../Images/TVScreen/PV_' + (newValue + 1).toString() +'.png';\n\n console.log(name);\n\n var elements = document.getElementsByClassName(\"PPTPanelImage\");\n\n for (var i = 0, len = elements.length; i < len; i++) {\n elements[i].setAttribute('src', name); \n if(currPPTSlide == 4){\n elements[i].hidden = true;\n $('.PPTPanelVideo').show(); \n }\n else{\n elements[i].hidden = false;\n $('.PPTPanelVideo').hide();\n }\n }\n}", "title": "" }, { "docid": "2cdc1fdfef4e42fd3345589d44605226", "score": "0.50627834", "text": "function showMemSlide() {\n document.getElementById('mem-slide').style['display'] = 'block'\n}", "title": "" }, { "docid": "237233001d1215d931bf8857e4512855", "score": "0.5060626", "text": "function slideShowInit () {\n\n var controls = document.getElementsByClassName(\"slideshow-controls\")[0];\n\n showFirstSlide();\n slideShowPlay();\n\n if (controls) {\n\n controls.addEventListener(\"click\", slideControlsClickHandler , false);\n\n }\n \n}", "title": "" }, { "docid": "b45979654ab195d4cfc6ca37f05ee782", "score": "0.50521034", "text": "function setCurrentSlide(idx) {\n slideIndex = idx;\n showCurrentSlide(slideIndex);\n}", "title": "" }, { "docid": "121a5589a85392bafca7c067e408f63e", "score": "0.50513816", "text": "function setShowSlider(primitive, showSlider) {\n\n\tmap(primitive, function(primitive) {\n\t\tsetAttributeUndoable(primitive, \"ShowSlider\", showSlider);\n\t});\n\n}", "title": "" }, { "docid": "a91f2c18b3f5e874ee35ac2c78dff955", "score": "0.50507075", "text": "function setSlide(imageIndex) {\n // Saet nuvarende billed nummer.\n this.imageIndex = imageIndex;\n // Gem alle billeder.\n for (let i = 0; i < images.length; i++) {\n images[i].style.display = 'none';\n dots[i].classList.remove(\"selected\");\n }\n // Goer det nuvarende billede synligt.\n images[this.imageIndex].style.display = 'block';\n dots[this.imageIndex].classList.add(\"selected\");\n}", "title": "" }, { "docid": "212f0dd5ddd2206416a2e4d12403fd37", "score": "0.50476325", "text": "function createSlideshowControls() {\r\n var slideshowControls = $('<div class=\"slideshow-controls\"></div>').appendTo(slideWrapper),\r\n currentClass = self.settings.slideshow ? 'pause' : 'play';\r\n\r\n slideshowState = self.settings.slideshow ? 'playing' : 'stopped';\r\n\r\n slideshowControls\r\n .addClass(currentClass)\r\n .click(function () {\r\n toggleSlideshow();\r\n });\r\n\r\n\r\n if (self.settings.slideshowControlsToggle)\r\n if (isOldIE)\r\n slideshowControls.hide();\r\n else\r\n slideshowControls.css('opacity', 0);\r\n }", "title": "" }, { "docid": "6392866bba336ce3a02fd57fa7dc1775", "score": "0.5035144", "text": "function digi_slideshow(conf){\n\n var me = this;// create self reference\n \n me.current = 0; // current gallery\n me.next = 1; // next gallery\n me.hidden = 1; // hidden box\n me.uid = 'tx-digislideshow-pi1-'+conf[0];\n me.number = conf[1];\n me.interval = conf[2];\n me.duration = conf[3];\n me.galleries = conf[4];\n me.options = {property:'opacity',duration:me.duration,transition:Fx.Transitions.linear};\n me.box = [$(me.uid+'-1'),$(me.uid+'-2')];\n me.img = [$$('#'+me.uid+'-1 img'),$$('#'+me.uid+'-2 img')];\n if(Fx.Tween){\n me.fx = [new Fx.Tween(me.box[0],me.options),new Fx.Tween(me.box[1],me.options)];/* mootools 1.12 */\n }else{\n me.fx = [me.box[0].effect('opacity',me.options),me.box[1].effect('opacity',me.options)];/* mootools 1.11 */\n }\n me.fx[0].addEvent(\"onComplete\",function(){ me.step(); });\n me.box[0].setStyle('visibility','visible');// show box 0\n me.box[1].setStyle('visibility','hidden');// hide box 1\n \n me.init = function(){\n me.load(0,0); // init box 0 with gallery 0\n me.load(1,1); // init box 1 with gallery 1\n me.toggle.delay(me.interval,me);\n };\n \n me.toggle = function(){// toggle boxes visibility\n me.fx[1-me.hidden].start('1','0');//fadeout\n me.fx[me.hidden].start('0','1');//fadein\n /*me.debug('Fading...');/**/\n };\n \n me.step = function(){// advance gallery\n me.box[1-me.hidden].setStyle('visibility','hidden');//hide\n me.box[me.hidden].setStyle('visibility','visible');//show\n me.hidden = ( me.hidden + 1 ) % 2;//toggle\n me.current = ((me.current+1)%me.galleries.length);//cycle\n me.next = ((me.current+1)%me.galleries.length);//cycle\n me.load( me.hidden, me.next );\n me.toggle.delay(me.interval,me);\n };\n \n me.load = function(box,gallery){// load gallery into box\n /*me.debug('Loaded gallery '+gallery+' into box '+box+'. Showing gallery '+me.current+' in box '+(1-me.hidden)+'.');/**/\n for( var i = 0 ; i < me.number ; i++ )if(me.galleries[gallery][i]){// if image present\n me.img[box][i].src = me.galleries[gallery][i];// load image\n }else{// if image missing\n me.img[box][i].src = 'typo3conf/ext/digi_slideshow/res/digitage.gif';// load default image\n }\n };\n \n me.debug = function(msg){\n var now = new Date();\n window.status = '['+('0'+now.getHours()).substr(-2)+':'+('0'+now.getMinutes()).substr(-2)+':'+('0'+now.getSeconds()).substr(-2)+'] '+msg;\n };\n \n me.init();\n \n}", "title": "" }, { "docid": "5fd8453ba4553e17b80e710b92a419b9", "score": "0.50325143", "text": "function addPreview() {\n\t/* create a new Slide object */\n\tvar slidePreview = new SlidePreview(validID, nextSlideType);\n\tpreviewArray[numSlide-1] = slidePreview;\n}", "title": "" }, { "docid": "e14b8c7293baddaf289cf5f0d14e93fc", "score": "0.50281405", "text": "setSlides(nodes)\n {\n if (this.options.debugdimensions)\n console.info(this.logprefix, \"setSlides\")\n\n let posx = 0;\n let largestheight = 0;\n this.width_content = 0;\n\n var fixedslidewidth = Math.round(this.options.slidewidth);\n\n for (let node of nodes)\n {\n var width = node.offsetWidth;\n var height = node.offsetHeight;\n\n if (height > largestheight)\n largestheight = height;\n\n var positionwidth = fixedslidewidth > 0 ? fixedslidewidth : width;\n\n var iteminfo =\n { node: node\n , width: positionwidth\n , width_real: width\n , height: height\n\n , left: posx\n , right: posx + positionwidth\n\n , usecount: 0 // how many times this slide is shown in the current drawn frame\n , nodecopies: [node] // cache of all copies of the slide (including the original node)\n };\n\n if (fixedslidewidth > 0)\n iteminfo.left += (positionwidth - width) / 2;\n\n this.items.push(iteminfo);\n\n this.items_onscreen.push(node); // push so refresh() will move these out of view if needed\n\n posx += positionwidth + this.options.gap;\n\n this.width_content += positionwidth + this.options.gap;\n\n node.__iteminfo = iteminfo;\n }\n\n if (this.options.randomizeslides)\n this._randomizeSlides();\n\n this.largestslideheight = largestheight;\n\n if (this.options.debugdimensions)\n this._logSlides();\n\n this.__relayoutViewport();\n }", "title": "" }, { "docid": "4eb949669971cbfe0022e00422dfd997", "score": "0.5023667", "text": "function dockedState() {\r\n with (document.body.style)\r\n width = 130;\r\n with (slideshowBg.style)\r\n width = 130;\r\n slideshowBg.src = \"url(images/background.png)\";\r\n}", "title": "" }, { "docid": "730609e26d9d2d9b451e782690fe4d69", "score": "0.5014297", "text": "function showSlides() {\n\t//Makes all the images invisible\n\tfor ( i = 0; i < slides.length; i++)\n\t\tslides[i].style.display = \"none\";\n\t//selects the next image\n\tindex++;\n\t//returns the index of the slides back to 0\n\tif (index > slides.length)\n\t\tindex = 1;\n\t//make the correct image display\n\tslides[index - 1].style.display = \"block\";\n\t//define a pause length, and what to do after\n\ttimeout = setTimeout(showSlides, 3000);\n}", "title": "" }, { "docid": "e03144bc46b0cdd7aa1c72bbbaa9a43e", "score": "0.5014003", "text": "function changeSlide ( obj, slide_idx ) {\n\tvar widgetdata = obj.data('widgetsettings');\n\tvar myindexstart = widgetdata.idx_start;\t// get stored starting index for widget\n\tvar newposition = '' + ( -1 * (slide_idx - myindexstart) * settings.slideWidth + 0) ; \t// constant at end is a correction for padding, margin, etc.\n\tobj.find('.ccimages').animate( { 'left': newposition } );\n\tchangeCaption( obj, slide_idx );\n}", "title": "" }, { "docid": "c464d9e6d51576ef2c2e46dcb16c7d03", "score": "0.5009823", "text": "function Slide(title, subtitle, background) {\n this.title = title;\n this.subtitle = subtitle;\n this.background = background;\n // we need an id to target later using getElementById\n this.id = \"slide\" + slideIndex;\n // Add one to the index for the next slide number\n slideIndex++;\n // Add this Slide to our array\n slideArray.push(this);\n}", "title": "" }, { "docid": "2b127f449bfe6afcbde829ff50c161b9", "score": "0.5009008", "text": "function setPresentation(){\n\t\t$( \"#setppt\" ).dialog();\n\t}", "title": "" }, { "docid": "705634ccd5e56893f2b14d74db782449", "score": "0.5000923", "text": "function updateSlide(slideId, updatedSlideJson) {\n\n title = updatedSlideJson[0].fields.otsikko;\n description = updatedSlideJson[0].fields.teksti;\n duration = updatedSlideJson[0].fields.näyttöaika_sekunteina;\n expiresAt = updatedSlideJson[0].fields.vanhentuu;\n expiresAt = moment(expiresAt).format(\"DD/MM/YYYY-HH.mm.ss\");\n\n // This is unnecessary\n slide = SLIDES[slideId];\n\n slide.fields.otsikko = title;\n slide.fields.teksti = description;\n slide.fields.näyttöaika_sekunteina = duration;\n slide.fields.vanhentuu = expiresAt;\n //\n\n slide = $('.contentslide-' + slideId);\n oldTitle = slide.find(\"h2[class=title]\");\n oldDescription = slide.find(\"div[class=description-wrapper]\");\n\n oldTitle.html(title);\n oldDescription.html(description);\n }", "title": "" }, { "docid": "ff8a3df6fa8daa4fd3a5ebb3eb0022d6", "score": "0.5000837", "text": "function setSlideObject(currentImage) {\n $('#immg').attr(\"src\", \"image/background/story/\" + story[currentImage]);\n $('#tell1').text(tell1[currentImage]);\n $('#tell2').text(tell2[currentImage]);\n $(\".numbertext\").text(currentImage + 1 + \"/18\");\n}", "title": "" }, { "docid": "0240459aceb5d6fb22563348f294ac08", "score": "0.49989676", "text": "function JetpackSlideshow(e,t,i){this.element=e,this.images=[],this.controls={},this.transition=t||\"fade\",this.autostart=i}", "title": "" }, { "docid": "2e9f72bec5e1fd386044374334ee4045", "score": "0.49955112", "text": "function setHtmlProperties() {\n\n\t\t// set panel background color\n\t\tif (g_options.strippanel_background_color != \"\")\n\t\t\tg_objPanel.css(\"background-color\",\n\t\t\t\t\tg_options.strippanel_background_color);\n\n\t}", "title": "" }, { "docid": "43708842ea186b471ba10ff4f1a9e92b", "score": "0.49945813", "text": "start() {\n // Inits\n this.initMediaSlideshow()\n }", "title": "" }, { "docid": "63e22ae36ee9b7a382430dd681070687", "score": "0.49940246", "text": "function setControlsVars(){\n\t\t\t// check if text or images should be used for controls\n\t\t\t// check \"next\"\n\t\t\tif(options.nextImage != ''){\n\t\t\t\tnextContent = options.nextImage;\n\t\t\t\tnextType = 'image';\n\t\t\t}else{\n\t\t\t\tnextContent = options.nextText;\n\t\t\t\tnextType = 'text';\n\t\t\t}\n\t\t\t// check \"prev\"\n\t\t\tif(options.prevImage != ''){\n\t\t\t\tprevContent = options.prevImage;\n\t\t\t\tprevType = 'image';\n\t\t\t}else{\n\t\t\t\tprevContent = options.prevText;\n\t\t\t\tprevType = 'text';\n\t\t\t}\n\t\t\t// show the controls\n\t\t\tshowControls(nextType, nextContent, prevType, prevContent);\n\t\t}", "title": "" }, { "docid": "eb811db51dbc5112fdd4848c270399ce", "score": "0.49932507", "text": "function createSettings(focalPoint, width, height)\n {\n const result =\n {\n width: width || 500,\n height: height || 500,\n focal:\n {\n x: 0,\n y: 0,\n width: width || 500,\n height: height || 500\n }\n };\n if (focalPoint)\n {\n result.focal = focalPoint;\n }\n return result;\n }", "title": "" }, { "docid": "8e20b0ee7b3b5b9100684af0b38fb5d1", "score": "0.49907216", "text": "function addSlide(target, style) {\n var i = target.length;\n target.push({\n id: (i + 1),\n name: style + ' slide #' + (i + 1),\n href: 'http://lorempixel.com/450/300/' + style + '/' + ((i + 1) % 10) ,\n color: colors[ (i*10) % colors.length],\n odd: (i % 2 === 0)\n });\n }", "title": "" }, { "docid": "a91a54afe3ced451319bc49693391061", "score": "0.4987367", "text": "function setImageDesign(objImage, slideType, imageData){\n\t\t\n\t\tvar css = {};\n\t\tif(g_options.slider_image_border == true){\n\t\t\tcss[\"border-style\"] = \"solid\";\n\t\t\t\n\t\t\tvar borderWidth = getImageBorderWidth(objImage, imageData);\n\t\t\t\n\t\t\tcss[\"border-width\"] = borderWidth+\"px\";\n\t\t\tcss[\"border-color\"] = g_options.slider_image_border_color;\n\t\t\tcss[\"border-radius\"] = g_options.slider_image_border_radius;\n\t\t}\n\t\t\n\t\tif(slideType != \"image\" && g_options.slider_video_constantsize == true)\n\t\t\tcss[\"background-color\"] = \"#000000\";\n\t\t\n\t\tif(g_options.slider_image_shadow == true){\n\t\t\tcss[\"box-shadow\"] = \"3px 3px 10px 0px #353535\";\n\t\t}\n\t\t\n\t\tobjImage.css(css);\n\t}", "title": "" }, { "docid": "533ac7a5dc0e6e69ce14abf4bc02432f", "score": "0.49864992", "text": "function showSlideShow(replace){\r\n\tdebug(\"AutoSlideshow: showSlideshow.\\n\");\r\n\t//alert(\"show slideshow: \" + images.length);\r\n\tindex = -1;\r\n\tindex_enabled = -1;\r\n\tgoFullscreen();\r\n\tsetTimeout(initSlideShow, 100);\r\n}", "title": "" }, { "docid": "952c330836fd7ded06b9db0bfcf7e557", "score": "0.49815193", "text": "init() {\n\n this.overwriteOptions(this.options);\n this.registerBreakpoints();\n this.checkResponsive();\n this.setActiveSlides();\n this.addFlexToRails();\n this.setSliderWidth();\n this.setSlideWidth();\n this.setSlideIndex();\n this.setActiveSlides();\n this.selectParallaxElements();\n this.setParallaxPosition();\n this.initEvents();\n this.startInterval();\n\n }", "title": "" }, { "docid": "f34483b0f71930dbcd483c923d88ac06", "score": "0.498107", "text": "function init() {\n Layout.init();\n applyStyle(Splide.root, {\n maxWidth: unit(Splide.options.width)\n });\n Elements.each(function (Slide) {\n Slide.slide.style[Layout.margin] = unit(Layout.gap);\n });\n resize();\n }", "title": "" }, { "docid": "f67e1ecc621634899a1340c3c53f5887", "score": "0.49800214", "text": "function loadMe() {\n //===== LOAD PHOTO CAPTIONS\n document.getElementById(\"Text_1\").innerHTML = document.getElementById(\"Img_1\").alt;\n document.getElementById(\"Text_2\").innerHTML = document.getElementById(\"Img_2\").alt;\n document.getElementById(\"Text_3\").innerHTML = document.getElementById(\"Img_3\").alt;\n document.getElementById(\"Text_4\").innerHTML = document.getElementById(\"Img_4\").alt;\n \n //===== LOAD slideList, dotlist | START slideShow() at first slide | console log\n SlideList = document.getElementsByClassName(\"slide\"); // finds all slides by class and puts them in a list\n DotList = document.getElementsByClassName(\"dot\"); // finds all dots by class and puts them in a list\n SlideCount = SlideList.length;\n console.log(\"Number of slides: \" + SlideCount);\n setSlide(1); // set to first slide then calls --> slideShow() \n //===== SLIDESHOW -autoplay\n setInterval(function() {changeSlide(1);}, 5000); \n}", "title": "" }, { "docid": "38553ebe3fdd12ee4527f0853b8b36e5", "score": "0.49784657", "text": "function setSlideDown(detail){\n var id = getTitleWithoutSpace(detail.title);\n var divContent = document.getElementById(id + \"Content\");\n var divBox = document.getElementById(id + \"Box\");\n var title = document.getElementById(id + \"Title\");\n\n divContent.className += \" slideDown\";\n divBox.className += \" openPanel\";\n title.className += \" openTitle\";\n}", "title": "" }, { "docid": "9e45ede06af7f0a64b1a9e30c9f3f376", "score": "0.49714917", "text": "setParallaxPosition() {\n\n // Calculate the with of each slide\n this.slideWidth = this.sliderWidth / this.defaults.amountOfSlides;\n\n // If parallax is normal. This is the ideal setting for having 1 slide visible\n if (this.isParallaxActive()) {\n\n if (this.defaults.amountOfSlides === 1) {\n\n // Loop over the slides per amount of slides shown on screen\n this.eachSlide((slide, i) => {\n\n // Set the style of the parallaxElement\n slide.parallaxElement.style.right = (this.slideWidth / this.defaults.parallaxIntensity) * i + 'px';\n slide.parallaxElement.style.width = this.slideWidth + 'px';\n\n });\n\n } else {\n\n // Loop over the slides per amount of slides shown on screen\n this.eachSlide((slide, i) => {\n\n // Set the style of the parallaxElement\n slide.parallaxElement.style.right = 0;\n slide.parallaxElement.style.width = this.slideWidth + ((this.slideWidth / this.defaults.parallaxIntensity) * i) + 'px';\n\n });\n\n }\n\n }\n\n }", "title": "" }, { "docid": "71e6ecd5cc8409f9f5b62cda6c499488", "score": "0.49713108", "text": "_setSlideHeight(height) {\n this.$slides.each(function() {\n $(this).css('max-height', height);\n });\n }", "title": "" }, { "docid": "098923dceae190b74f2e1bdeaffcfea4", "score": "0.49693292", "text": "function ShowProperties()\n{\n if(IE)\n {\n Element.hide('list');\n Element.show('folder_rights');\n }\n else\n {\n new Effect.SlideUp('list', {queue: 'front'});\n new Effect.SlideDown('folder_rights', {queue: 'end'});\n }\n Element.show('list_link');\n Element.hide('rights_link');\n return false;\n}", "title": "" }, { "docid": "d01505effb458b074bd6e2a586ae4cef", "score": "0.4969227", "text": "function imageSlideShow() {\n memoryGameApp.revealedImageIndex = memoryGameApp.revealedImageIndex + 1;\n memoryGameApp.revealImage.src =\n memoryGameApp.revealedBackgroundImages[memoryGameApp.revealedImageIndex];\n\n if (memoryGameApp.revealedImageIndex === 5) {\n memoryGameApp.revealedImageIndex = 0;\n memoryGameApp.revealImage.src =\n memoryGameApp.revealedBackgroundImages[memoryGameApp.revealedImageIndex];\n }\n}", "title": "" }, { "docid": "ea8461af0a7e6feb9b0657739441317a", "score": "0.49685508", "text": "set_duration(duration)\n\t{\n\t\tthis.duration = duration;\n\t}", "title": "" }, { "docid": "b1ed0832c111a8942eb4043afddf7609", "score": "0.49670774", "text": "function showSlide(n) {\r\n slideBeingUsed = n;\r\n showSlides();\r\n}", "title": "" }, { "docid": "5df729b7edf8d416b0a45f835594eb26", "score": "0.49632022", "text": "function showSlides() {\r\n var i;\r\n var slides = document.getElementsByClassName(\"mySlides\"); // Gets the element and makes it easily repeatable with just \"slides\"\r\n for (i = 0; i < slides.length; i++) {\r\n slides[i].style.display = \"none\"; // Makes those who shouldn't be visible not visible\r\n }\r\n slideIndex++;\r\n if (slideIndex > slides.length) {slideIndex = 1}\r\n slides[slideIndex-1].style.display = \"block\"; //Makes it visible\r\n setTimeout(showSlides, 5000); // Change image every 5 seconds\r\n}", "title": "" }, { "docid": "3e82acc1a00a23868b49f6d441f43ea6", "score": "0.4958956", "text": "function setStyleMobile(){\n\t\t$slides.hide();\n\t\t$('.slide-mobile').show();\n\t\tbegin = 0;\n\t\tclearInterval(timer);\n\t\t$btnPrev.prop('disabled', true);\n\t\t$btnNext.prop('disabled', false);\n\t\tconsole.log('mob');\n\t}", "title": "" }, { "docid": "72c072d2e909fe9e0361202f7715e059", "score": "0.495471", "text": "function updateSlideshow(selectedGender,selectedAge) {\n\t//alert('gender is: ' + selectedGender + ' and age is: ' + selectedAge);\n\tif (selectedGender == 'notSet') {\n\t\t$('div.genderError').show().siblings().hide();\n\t}else if (selectedAge == 'notSet') {\n\t\t$('div.ageError').show().siblings().hide();\n\t}else{\n\t\t//alert('gender is: ' + selectedGender + ' and age is: ' + selectedAge);\n\n\t\t// next we show the correct slideshow and reset it then hide all others\n\t\t$('div#slideShow-' + selectedGender + '-' + selectedAge).siblings().hide();\n\t\t$('div#slideShow-' + selectedGender + '-' + selectedAge).show().flexslider(0);\n\n\t\t// load the first slide's description in the HTML\n\t\tvar slideDescription = $('.tdSlideShow:visible img:visible').attr('data-description');\n\t\tif (slideDescription== \"\") {\n\t\t\tslideDescription = \"Missing description! Please add one in the manager.\";\n\t\t}\n\t\t $('.slideDescription').html( '<p>' + slideDescription + '</p>');\n\n\t\t$('#tdSlideShowNav').removeClass();// this makes the \"Inactive\" styling go away\n\t\t$('div.tdSlideshowNavCover').css(\"display\", \"none\"); // and moves the blinder div up so we can now click on the nav buttons\n\t\t// we show the slide description and vertically align the text within\n\t\t$('div.slideDescription').show().children('p').vAlign();\n\t\t// also make the previous and next buttons visible now\n\t\t$('a#prev2, a#next2').show();\n\n\t\t// we trigger the preloading of the images inside of the slideshow\n\t\t$('#slideShow-' + selectedGender + '-' + selectedAge + ' img').click();\n\t\t// and we make the first nav button active.\n\t\t$('#tdSlideShowNav li:first').addClass('activeSlide').siblings().removeClass();\n\t};\n\n}", "title": "" }, { "docid": "c6922d22df96d4658ded9dd692a06587", "score": "0.4952886", "text": "function startSlide() {\n reset();\n\n sliderImages[0].style.display = 'block'\n}", "title": "" }, { "docid": "431077e6366c93860b9b267caa304224", "score": "0.49521574", "text": "function SlideShow()\n{\n\ndocument.imgLarge.filters[0].Duration=2.5;\ndocument.imgLarge.filters[0].Apply();\n//alert(document.getElementById(\"listImg\").options[i].text);\ndocument.getElementById('hdr').innerText=document.getElementById(\"listImg\").options[i].text;\ndocument.imgLarge.src=document.getElementById(\"listImg\").options[i].text;\ndocument.imgLarge.filters[0].Play();\nif (i>=((document.getElementById(\"listImg\").length)-1))\n\t{i=0;}\nelse\n\t{\n\ti=i+1;\n\t}\n\n}", "title": "" }, { "docid": "4b78c48ca4b7b6590764570a2598e5ea", "score": "0.49449113", "text": "function beginSlides() {\r\n // shiftSlides: 2\r\n clearScrollingInterval(); //clear already existing timer before restarting it\r\n $('.hslide, .thumbnail-slide').removeClass('selected');\r\n $('.hslide#hslide' + options.currentSlide + ', .thumbnail-slide#thumbnail-slide-' + options.currentSlide).addClass('selected');\r\n beginScrollingInterval();\r\n }", "title": "" }, { "docid": "5414ea45a629f794e2a5875c05891359", "score": "0.4944178", "text": "function AddFirstSlide() {\n myPresentation.setCurrentSlideIndex(0);\n myPresentation.addSlide(0);\n updateSlideselector();\n updateNote();\n}", "title": "" } ]
4aa41fa3829a279587e2061883316b57
Here I set an onchange function who calculates the subtotal when qty input field changes and print it in the HTML
[ { "docid": "90d72b00bc786fe8b0a9d5c08a6ddbf0", "score": "0.7201709", "text": "function setOnChanges () {\n let price, rowSubtotal;\n document.querySelectorAll(`.product`).forEach(product => { \n product.querySelector(`.qty label input`).onchange = function (e) {\n price = +product.querySelector(`.pu span`).innerText;\n rowSubtotal = +(e.target.value * price).toFixed(2);\n product.querySelector(`.subtot span`).innerHTML = rowSubtotal;\n };\n });\n}", "title": "" } ]
[ { "docid": "3f6407086e8d319e2d62dfc6d7dd0319", "score": "0.79077506", "text": "function updateQty() {\n let val = document.getElementById(\"bunQuantity\").value;\n document.getElementById(\"qty\").innerHTML = val;\n updateSubtotal(val)\n}", "title": "" }, { "docid": "b20a74bc08e0d5ff0955eb6958c883c2", "score": "0.75752884", "text": "function updateTotal(event){\n number_of_items = event.target // fetch each of the quantity field\n // get parent element of the quantity field\n number_of_items_parent = number_of_items.parentElement.parentElement // parentElement twice mean parent and grand parent\n // fetch the price field\n price_field = number_of_items_parent.getElementsByClassName('item-price')[0] // it the first element in the parent field which is called : number_of_items_parent that why its [0]\n total_field = number_of_items_parent.getElementsByClassName('total-price')[0] \n // price_field_content = price_field.children[0].innerText\n // dont need dollard at front\n price_field_content = price_field.children[0].innerText.replace('$', '')// it replace dollard to empty string\n console.log(price_field_content)\n\n // total_field.children[0].innerText = number_of_items.value * price_field_content\n\n // append dollar sign again \n total_field.children[0].innerText ='$' + number_of_items.value * price_field_content\n\n // \n if (isNaN(number_of_items.value) || number_of_items.value <=0){\n number_of_items.value = 1\n }\n\n // new3\n // update price must also updateing grand total by calling it here \n grandTotal()\n\n}", "title": "" }, { "docid": "2f59df7ac0878118ef6353ce720fc30e", "score": "0.7460217", "text": "function calcQuantity(event){\n let noofItems = event.target;\n let noofItemsParent = noofItems.parentElement.parentElement;\n let price = noofItemsParent.getElementById(\"price\");\n let total = noofItemsParent.getElementById(\"total\");\n let totalPrce = noofItems.value * price.value;\n let grandTotal = calcGrandTotal();\n }", "title": "" }, { "docid": "64324fa0560eb83006f02954ad4a3c2a", "score": "0.73548037", "text": "function calculateTotal(){\n const firstClassTicketCount = getInputValue('firstClass');\n const economyTicketCount = getInputValue('economy');\n const subTotal = firstClassTicketCount * 150 + economyTicketCount * 100;\n document.getElementById('subTotal').innerText = '$' + subTotal;\n\n const tax = Math.round(subTotal * 0.1);\n document.getElementById('tax-amount').innerText = '$' + tax;\n const totalAmount = subTotal + tax;\n document.getElementById('total-amount').innerText = '$' + totalAmount;\n\n}", "title": "" }, { "docid": "51f6f85731f85e075c7e0addee9b5cf0", "score": "0.73019147", "text": "function updateSubtotal(element) {\n let thisFoodQty = $(element).parent().siblings(\".qty-input\").val();\n let thisFoodPrice = $(element).parents(\".qty-form\").siblings(\".food-price\").children().html();\n thisFoodPrice = thisFoodPrice.split(\"€\").pop();\n let calcFoodSubtotal = `€${(parseFloat(thisFoodPrice) * parseInt(thisFoodQty)).toFixed(2)}`;\n $(element).parents(\".qty-form\").siblings(\".food-subtotal\").children(\".subtotal\").html(calcFoodSubtotal);\n updateGrandAndBagTotals();\n }", "title": "" }, { "docid": "8d6ecdc8b9f64de1bb458edd6a36c067", "score": "0.72614133", "text": "function updateSubtot($product) {\n // Iteration 1.1\n // get quantity out of input field hint: do not use .innerHTML but .value\n // get price out of span tag do use innerHTML\n // multiply and assign to a variable\n // select subtotal span and manipulate with value from variable\n var quantity = $product.getElementsByClassName(\"qty-input\")[0].value;\n var unitPrice = $product.getElementsByClassName(\"price\")[0].innerHTML;\n var $subTotal = $product.getElementsByClassName(\"subtotal\")[0]; // eerste element [0] erbij is essentieel omdat je het element wil hebben en niet de array met 1 element.\n $subTotal.innerHTML = quantity * unitPrice; // displayen van subtotal behorende bij het element zodra functie wordt aangeroepen.\n return quantity * unitPrice; // return betreffende subtotal (wat gebeurt hiermee? Hoe maak ik gebruik van deze?)\n}", "title": "" }, { "docid": "e74941ceb54813a12b53fe4d2d1051cb", "score": "0.7219199", "text": "function updateTotal() {\r\n\t// STEP ONE - GET THE QUANTITIES\r\n\t\r\n\t// Declare variables for the Beer,wine,shot quantity.\r\n\r\nvar quaBeer,quaWine,quaShot;\r\n\t \r\n\t// Get the values of quantities from the input boxes (\"qtyBeer\", \"qtyWine\",\"qtyShot\")\r\n\tquaBeer=$(\"#qtyBeer\").val();\r\n quaWine=$(\"#qtyWine\").val();\r\n quaShot=$(\"#qtyShot\").val();\r\n\r\n\t// Parse the values to number types\r\n\tquaBeer=parseFloat(quaBeer);\r\n quaWine=parseFloat(quaWine);\r\n quaShot=parseFloat(quaShot);\r\n\t\r\n\t\r\n\t// STEP TWO - GET THE UNIT PRICES\r\n\t\r\n\t\r\n\t// Declare variables for the beer,wine,shot unit price\r\n\tvar alcoholBeer,alcoholWine,alcoholShot;\r\n\r\n\t\r\n\t// Get the values of unit prices from the spans (\"priceBook\" and \"priceDonation\")\r\n\talcoholBeer=$(\"#beerAlcohol\").html();\r\n\talcoholWine=$(\"#wineAlcohol\").html();\r\n alcoholShot=$(\"#shotAlcohol\").html();\r\n\r\n\t// Parse the values to number types\r\n\talcoholBeer=parseFloat(alcoholBeer);\r\n alcoholWine=parseFloat(alcoholWine);\r\n alcoholShot=parseFloat(alcoholShot);\r\n\r\n\t\r\n\t\r\n\t\r\n\t// STEP THREE - CALCULATE AND SHOW SUBTOTALS\r\n\r\n\t\r\n\t// Declare variables for the beer,wine,shot subtotal \r\n\tvar subBeerAlcohol,subWineAlcohol,subShotAlcohol;\r\n\r\n\t// Calculate the beer,wine,shot subtotal and assigning to variables\r\n\tsubBeerAlcohol=quaBeer*alcoholBeer;\r\n subWineAlcohol=quaWine*alcoholWine;\r\n subShotAlcohol=quaShot*alcoholShot;\r\n\t// Update the text of the subtotal spans (\"totalBeer\", \"totalWine &totalShot\") with the calculated subtotal values\r\n\t\r\n\t$(\"#totalBeerAlcohol\").html(subBeerAlcohol.toFixed(2));\r\n $(\"#totalWineAlcohol\").html(subWineAlcohol.toFixed(2));\r\n $(\"#totalShotAlcohol\").html(subShotAlcohol.toFixed(2));\r\n\r\n\r\n\r\n\t\r\n\t// STEP FOUR - CALCULATE AND SHOW TOTAL\r\n\t\r\n\t// Declare a variable for the grand total\r\n\tvar grandTotal;\r\n\t\r\n\t\r\n\t// Calculate the grand total, assigning it to the variable\r\n\tgrandTotal=subBeerAlcohol+subWineAlcohol+subShotAlcohol;\r\n\t// Update the text of the grand total span (\"grandTotal\") with the calculated total\r\n\t$(\"#grandTotal\").html(grandTotal.toFixed(2));\r\n\t\r\n\r\n}", "title": "" }, { "docid": "32a9cf0cf6431bfe61dc10142af4472c", "score": "0.72045285", "text": "function subtot() \r\n{\r\n var popupQty = document.getElementById(\"popup-quantity\");\r\n var price = document.getElementById(\"price\").innerHTML;\r\n let quantity = document.getElementById(\"quantity\").value;\r\n\r\n var total = parseFloat(price) * quantity\r\n if (!isNaN(total))\r\n document.getElementById(\"subtotal\").innerHTML = total.toFixed(2)\r\n\r\n popupQty.innerHTML = quantity;\r\n\r\n}", "title": "" }, { "docid": "c55c9028eb63af0de122b36601a4faa3", "score": "0.7138859", "text": "function CalculateTotal(){\n const firstClassQuantity = getInputTicketClass('first');\n const economyClassQuantity = getInputTicketClass('economy'); \n\n const subTotalPrice = firstClassQuantity * 150 + economyClassQuantity * 100;\n document.getElementById('sub-total-price').innerText = subTotalPrice ;\n\n const taxPayPrice = Math.round(subTotalPrice * 0.10);\n document.getElementById('vat-price').innerText = taxPayPrice;\n \n const totalPrice = subTotalPrice + taxPayPrice;\n document.getElementById(\"total-price\").innerText = totalPrice;\n}", "title": "" }, { "docid": "b6d70af6733dfb57781223de90635cbd", "score": "0.7135443", "text": "function calculateTotalPrice() {\n const phoneTotal = getInputValue(\"phone\") * 1219;\n const caseTotal = getInputValue(\"case\") * 59;\n const subTotalAmount = phoneTotal + caseTotal;\n const taxAmount = subTotalAmount / 10;\n const totalAmount = subTotalAmount + taxAmount;\n\n //update to html\n document.getElementById(\"sub-total\").innerText = subTotalAmount;\n document.getElementById(\"tax-amount\").innerText = taxAmount;\n document.getElementById(\"total\").innerText = totalAmount;\n}", "title": "" }, { "docid": "0f02560ccd9eb0332f2a5ae10908db9f", "score": "0.7117045", "text": "function updateSubtotal(product) {\n console.log('Calculating subtotal, yey!');\n\n //PRUEBA DE QUE EL ARRA ENTRA\n //console.log(`este debería ser el array ${product[0]}`)\n\n //ALMACENAR PRECIO\n const price = document.querySelectorAll('.price span')//.innerText\n //ALMACER CANTIDAD\n const quantity = document.querySelectorAll('.quantity input')//.value\n\n const subtotalInput = document.querySelectorAll('.subtotal span')\n\n let subtotal = 0\n\n let total = 0\n\n\n for (let index = 0; index < product.length; index++) {\n\n //GENERAR SUBTOTAL DE CADA ELEMENTO\n subtotal = price[index].innerHTML * quantity[index].value\n console.log(\"subtotal de cada\" + subtotal)\n //PINTAR SUBTOTAL EN HTML\n subtotalInput[index].innerHTML = subtotal\n //SUMAR A TOTAL\n total += subtotal\n console.log(`AHORA MISMO TU CARRITO TE SALE A: ${total}`)\n }\n\n\n //PINTAR TOTAL \n document.querySelector('#total-value').innerHTML = (`${total} moneys`)\n\n return total //NECESARIO???\n\n}", "title": "" }, { "docid": "f75d97fb865b8ec5dbcd7ed748938fb6", "score": "0.7088638", "text": "function calculateTotal() {\nconst firstClassTicketInput = document.getElementById('firstClass-input').value;\nconst firstClassTicketCount = parseInt(firstClassTicketInput);\nconst economyClassTicketInput = document.getElementById('economy-input').value;\nconst economyClassTicketCount = parseInt(economyClassTicketInput);\n\nlet total = firstClassTicketCount * 150 + economyClassTicketCount * 100;\nlet vat = total * .1;\nlet grandTotal = total + vat;\n\nconst subTotalValue = document.getElementById('subtotal').innerText = total;\nconst subTotalAmount = parseFloat(subTotalValue);\n\nconst vatTotalValue = document.getElementById('vat').innerText = vat;\nconst vatTotalAmount = parseFloat(vatTotalValue);\n\nconst totalValue = document.getElementById('total').innerText = grandTotal;\nconst totalAmount = parseFloat(totalValue);\n}", "title": "" }, { "docid": "f364c98d7525ab882cd4b2a08a8bc75a", "score": "0.7073449", "text": "function updateSubtot(product) {\n console.log(product)\n\n let sum = 0\n\n let price1 = product.querySelector('.pu span').innerText\n let input1 = product.querySelector('.quantity').value\n sum = price1 * input1\n\n product.querySelector(\".subtot span\").innerText = sum\n\n return sum\n\n\n\n}", "title": "" }, { "docid": "dd7b702a5ef66e0fab0803d5985f2dc7", "score": "0.70497906", "text": "function economySubTotal(id) {\n const firstInput = document.getElementById(id).innerText;\n const firstInputNumber = parseFloat(firstInput); \n const calculate = firstInputNumber + 100;\n document.getElementById(\"subTotal\").innerText = calculate;\n}", "title": "" }, { "docid": "c4c65c0c5d941f726589ef5d9b585e7d", "score": "0.703658", "text": "function subTotal (q,i){\n\tvar sub = sub_outputs[i];\n\tvar newSub = prices[i] * q;\n\tsub.value = newSub + \".00\";\n\ttotal();\n}", "title": "" }, { "docid": "65c22dddc99c36aa8758492e1eff3344", "score": "0.7028109", "text": "function quantityChanged(event) {\r\n let input = event.target\r\n if (isNaN(input.value) || input.value <= 0) {\r\n input.value = 1//ensures the qty of items\r\n }\r\n updateCartTotal()\r\n}", "title": "" }, { "docid": "9d55774ba24c85bd1b5e86864b24a8db", "score": "0.70064807", "text": "function quantitychanged(event) {\n input = event.target;\n if (isNaN(input.value) || input.value <= 0) {\n input.value = 1;\n }\n UpdateCartTotal();\n}", "title": "" }, { "docid": "126e975ca2de75ca0cde4125708f221e", "score": "0.69924945", "text": "function calculateTotal(){\n let exclusiveTicketInputCount = getInputUpdate('exclusive');\n let economyTicketInputCount = getInputUpdate('economy');\n let totalTicketCost = exclusiveTicketInputCount * 150 + economyTicketInputCount * 100;\n\n\n\n document.getElementById('gross-total').innerHTML = totalTicketCost;\n let tax_vat = Math.round( totalTicketCost * 0.1);\n document.getElementById('vat').innerHTML = tax_vat;\n let finalTotal = totalTicketCost + tax_vat;\n document.getElementById('grand-total').innerHTML = finalTotal;\n return finalTotal;\n}", "title": "" }, { "docid": "e0e95e2779945e5d4504380f832c6088", "score": "0.6992249", "text": "function quantityChanged(event) {\n var key = event.target\n if (isNaN(key.value) || key.value <= 0){\n key.value = 1\n }\n //!calcul total Price on change\n UpdateTotalPriceItems()\n }", "title": "" }, { "docid": "1380bb8fd570f0efa8553e067eff207c", "score": "0.6989119", "text": "function calculateTotal(){\n const fClassTicketInput = document.getElementById('fClassTicket');\n const fClassTicketCount = parseInt(fClassTicketInput.value);\n const eClassTicketInput = document.getElementById('eClassTicket');\n const eClassTicketCount = parseInt(eClassTicketInput.value);\n\n const subTotalFare = fClassTicketCount * 150 + eClassTicketCount * 100;\n document.getElementById('subTotal').innerText = subTotalFare + '.00';\n\n const vatAmount = subTotalFare * 10 / 100;\n document.getElementById('vatAmount').innerText = vatAmount + '.00';\n\n const totalAmount = subTotalFare + vatAmount;\n document.getElementById('totalAmount').innerText = totalAmount + '.00';\n\n \n}", "title": "" }, { "docid": "5c41359b9f39b3e2c5b3788fe23d0fae", "score": "0.6930613", "text": "function CalItemTotal(){\r\n var qty = document.getElementById('txt_item_qty').value;\r\n var price = document.getElementById('txt_item_price').value;\r\n var disc = document.getElementById('txt_item_disc').value;\r\n var tax1 = document.getElementById('txt_item_tax1').value;\r\n var tax2 = document.getElementById('txt_item_tax2').value;\r\n// var tax3 = document.getElementById('txt_item_tax3').value;\r\n \r\n if(qty == 0 || qty == '' || isNaN(qty) == true || qty == null) {\r\n qty = 1;\r\n }\r\n price = CheckNumeric(price);\r\n disc = CheckNumeric(disc);\r\n if(eval(disc) > eval(price)) {\r\n document.getElementById('txt_item_disc').value = price;\r\n disc = price;\r\n }\r\n tax1=parseFloat(tax1).toFixed(2);\r\n tax2=parseFloat(tax2).toFixed(2);\r\n// tax3=parseFloat(tax3).toFixed(2);\r\n var tax=parseFloat(tax1)+parseFloat(tax2);\r\n if(tax1!=0.00){\r\n document.getElementById(\"item_tax1\").innerHTML = parseFloat(((eval(price)-eval(disc))*tax1/100)).toFixed(2);\r\n }\r\n if(tax2!=0.00){\r\n document.getElementById(\"item_tax2\").innerHTML = parseFloat(((eval(price)-eval(disc))*tax2/100)).toFixed(2);\r\n }\r\n// document.getElementById(\"item_tax3\").innerHTML = parseFloat(((eval(price)-eval(disc))*tax3/100)).toFixed(2);\r\n document.getElementById(\"item_total\").innerHTML = parseFloat(((eval(price)-eval(disc))*qty*tax/100)+((eval(price)-eval(disc))*qty)).toFixed(2);\r\n document.getElementById(\"txt_item_total\").value = parseFloat(((eval(price)-eval(disc))*qty*tax/100)+((eval(price)-eval(disc))*qty)).toFixed(2);\r\n}", "title": "" }, { "docid": "472f6704ba6e19af32cf675eaa466f72", "score": "0.69301695", "text": "function calculateTotal() {\n const firstClassNumber = makeInteger(\"first-class\");\n const economyNumber = makeInteger(\"economy\");\n //Sub-total\n const subTotal = firstClassNumber * 150 + economyNumber * 100;\n document.getElementById(\"sub-total\").innerText = \"$\" + subTotal;\n //vat\n const vat = subTotal * 0.1;\n document.getElementById(\"vat\").innerText = \"$\" + vat;\n //total\n document.getElementById(\"total\").innerText = \"$\" + (subTotal + vat);\n }", "title": "" }, { "docid": "79ba660fa09cbc6e2c9ca0cad550615a", "score": "0.6926178", "text": "function updateItemTotalViatico() {\n var quantity = $(\"#ac_item_quantity\").val();\n \n if(isNumeric(quantity) ) {\n var total = quantity ;\n \n\n $(\"#ac_item_total\").html(total);\n } else {\n $(\"#ac_item_total\").html(\"0.00\");\n }\n }", "title": "" }, { "docid": "ed7945a59462a234531174e6ffc6ebe0", "score": "0.6913653", "text": "function totalOutput() {\n const totalPrice = calculateTotalPrice();\n document.getElementById('subtotal').innerText = '$' + totalPrice;\n\n const vatAmount = calculateTotalVat();\n document.getElementById('vat').innerText = '$' + vatAmount;\n\n const grandTotal = calculateGrandTotal();\n document.getElementById('total').innerText = '$' + grandTotal;\n}", "title": "" }, { "docid": "5aa97221266dfc13993279c211d07e08", "score": "0.6871714", "text": "function setTotal() {\n sumTotal = subSize + subMeat + subCheese + subCrust + subSauce + subVeggies;\n document.getElementById('finalTotal').innerHTML = \"$\" + sumTotal + \".00\";\n}", "title": "" }, { "docid": "f45cc8a781404cbc1e22bd65bedd31db", "score": "0.6857406", "text": "function net_total(){\n\t\tvar net_total = 0;\n\t\t$('.qty').each(function(){\n\t\t\tvar row = $(this).parent().parent();\n\t\t\tvar price = row.find('.price').val();\n\t\t\tvar total = price * $(this).val()-0;\n\t\t\trow.find('.total').val(total);\n\t\t})\n\t\t$('.total').each(function(){\n\t\t\tnet_total += ($(this).val()-0);\n\t\t})\n\t\t$('.net_total').html(\"Total : Rs \" +net_total);\n\t}", "title": "" }, { "docid": "014be18b7d5829e8d90f5f69da39162c", "score": "0.68270606", "text": "function calculateTotal(){\n var itemPrice=price.value;\n var itemQuantity=quantity.value;\n var cost=itemPrice*itemQuantity;\n \n //As soon as the cost is calculated the display will be updated\n display.innerHTML=\"$\"+cost;\n //this will update the quantity\n quantityDisplay.innerHTML=itemQuantity;\n return cost;\n \n}", "title": "" }, { "docid": "70412d65d97ef270cec4d701e1dc73de", "score": "0.68246734", "text": "function calculateSubtotal() {\n\t\tvar $costs = $('.cost span'),\n\t\t\tsubtotal = 0;\n\n\t\t//Go through each cost span, get the amount and add it on to the subtotal to give the subtotal of each item in the basket.\n\t\t$costs.each(function(i, el) {\n\t\t\tvar $el = $(el);\n\t\t\tvar amount = parseFloat($el.text().replace(/\\u00A3/g, ''));\n\t\t\tsubtotal = subtotal + amount;\n\t\t});\n\t\tvar newSub = parseFloat(subtotal);\n\n\t\t//Update the subtotal field and also the span that is shown on the cart.\n\t\t$('.subtotal input').val(newSub.toFixed(2));\n\t\t$('.subtotal span').text('£' + newSub.toFixed(2));\n\t\tvalueAddedTax(newSub);\n\t}", "title": "" }, { "docid": "f0af2650c1c9c8c2a5ed4bd7e6517e47", "score": "0.6822639", "text": "function updateSubtotals() {\n const subtotalh1 = document.querySelector(\".checkoutPageSubtotal__h1\");\n subtotalh1.textContent = `Subtotal: $${subtotal}.00`;\n const subtotalP = document.querySelector(\".subtotal__p\");\n subtotalP.textContent = `Subtotal: $${subtotal}.00`;\n}", "title": "" }, { "docid": "45dcf649bd8c27f7ece0424adac57e37", "score": "0.6801505", "text": "function updateTotal(e) {\n // DVARL: gets the values needed and calculated\n var targetedItemID = e.target.className,\n itemInformation = document.getElementsByClassName(targetedItemID),\n currentCount = parseFloat(document.getElementById('itemCount').value),\n currentCost = parseFloat(document.getElementById('itemCost').value.replace('$', \"\")),\n selectedItemCost = parseFloat(itemInformation[0].value.replace('$', \"\")),\n selectedItemCount = parseFloat(itemInformation[1].value),\n runCount = parseFloat(itemInformation[3].value),\n itemCostValue = currentCost + (selectedItemCost * selectedItemCount) - (selectedItemCost * runCount);\n // DDOES: Applies the values to their respective input element\n document.getElementById('itemCount').value = currentCount + selectedItemCount - runCount;\n document.getElementById('itemCost').value = `$${itemCostValue.toFixed(2)}`\n itemInformation[3].value = selectedItemCount;\n}", "title": "" }, { "docid": "b702848c3f236da6f29f95b7dc8fba14", "score": "0.6801181", "text": "function subtotal() {\n let sum = 0;\n props.price.forEach((price, i) => sum += (price * props.qty[i]));\n return sum;\n }", "title": "" }, { "docid": "98921246cb6cad026eda5aeecbd4cdc4", "score": "0.6797925", "text": "function quantityChanged(event) {\n var input = event.target\n if (isNaN(input.value) || input.value <= 0) {\n input.value = 1\n }\n updateCartTotal()\n}", "title": "" }, { "docid": "98921246cb6cad026eda5aeecbd4cdc4", "score": "0.6797925", "text": "function quantityChanged(event) {\n var input = event.target\n if (isNaN(input.value) || input.value <= 0) {\n input.value = 1\n }\n updateCartTotal()\n}", "title": "" }, { "docid": "98921246cb6cad026eda5aeecbd4cdc4", "score": "0.6797925", "text": "function quantityChanged(event) {\n var input = event.target\n if (isNaN(input.value) || input.value <= 0) {\n input.value = 1\n }\n updateCartTotal()\n}", "title": "" }, { "docid": "79b078765f19605d29d97087c7c25cb5", "score": "0.6796266", "text": "function qtyCalcTotal() {\n var qtyTotal = totalQtyCheck.reduce((a, b) => a + b, 0);\n return (document.getElementById(\"totalQty\").innerHTML = qtyTotal);\n}", "title": "" }, { "docid": "6720d2218bf8e5f5bb6a0c6854f381db", "score": "0.6791952", "text": "function calculateLineTotal() {\n $.each($(\".orderLines\"), function (index, line) {\n let quantity = $(this).find($(\"input[name='itemQuantity']\")).val();\n let price = $(this).find($(\"input[name='itemPrice']\")).val();\n $(this).find($(\"input[name='lineTotal']\")).val(\n quantity * price\n )\n });\n }", "title": "" }, { "docid": "831814d7f7b06764a0f35d9c82819cc9", "score": "0.67894286", "text": "function valorUnitario(identificador){\r\n var porcentaje= parseInt(document.getElementById('ItemPresupuesto_FACTOR_TOTAL_UNIT').value)/100;\r\n\r\n if(identificador>1){\r\n var total_unitario= parseInt(document.getElementById('SubItemPresupuesto_TOTAL_UNITARIO'+identificador).value);\r\n if(isNaN(porcentaje)) porcentaje =0;\r\n if(isNaN(total_unitario)) total_unitario = 0;\r\n var total = (1 + porcentaje)* total_unitario;\r\n total = total.toFixed(2)\r\n document.getElementById('SubItemPresupuesto_VALOR_UNITARIO'+identificador).value = total +\"\";\r\n valorSubItem(identificador);\r\n }else\r\n {\r\n var total_unitario= parseInt(document.getElementById('SubItemPresupuesto_TOTAL_UNITARIO').value);\r\n if(isNaN(porcentaje)) porcentaje =0;\r\n if(isNaN(total_unitario)) total_unitario = 0;\r\n var total = (1 + porcentaje)* total_unitario;\r\n total = total.toFixed(2)\r\n document.getElementById('SubItemPresupuesto_VALOR_UNITARIO').value = total +\"\";\r\n valorSubItem(identificador);\r\n }\r\n }", "title": "" }, { "docid": "6a0cc0dd42d2a1b235c29e2a600d3096", "score": "0.6780375", "text": "function calcAmt() {\n var qty = document.getElementById(\"origqty\").value;\n var mult = document.getElementById(\"multiplier\").value;\n newTotal = qty * mult;\n document.getElementById(\"estimate\").innerHTML = newTotal;\n\n}", "title": "" }, { "docid": "f11142cdb101a81c945e9f863a6d0baf", "score": "0.67734206", "text": "function updateItemTotalOutput() {\n var quantity = $(\"#ac_item_quantity\").val();\n var price = $(\"#ac_item_price\").val();\n \n \n if(isNumeric(quantity) && isNumeric(price)) {\n var total = quantity * price; \n\n $(\"#ac_item_total\").html(total);\n } else {\n $(\"#ac_item_total\").html(\"0.00\");\n }\n }", "title": "" }, { "docid": "47037cac95420571de20eb444a9fc0f5", "score": "0.6771202", "text": "function totalTicketPrice() {\n var firstClassCount = getInputValue('firstClass');\n var economyClassCount = getInputValue('economyClass');\n\n var totalPrice = firstClassCount * 150 + economyClassCount * 100;\n document.getElementById('total').innerText = \"$\" + totalPrice;\n\n var vat = totalPrice * 0.1;\n document.getElementById('vat').innerText = \"$\" + vat;\n\n var grandTotal = totalPrice + vat;\n document.getElementById('grand-total').innerText = \"$\" + grandTotal;\n\n var totalTicket = firstClassCount + economyClassCount;\n document.getElementById('total-ticket').innerText = totalTicket;\n document.getElementById('total-ticket-price').innerText = grandTotal;\n document.getElementById('total-vat').innerText = vat;\n\n}", "title": "" }, { "docid": "eeaf674d2980753b6100fc114d4ba2bc", "score": "0.6769122", "text": "function updateTotal (){\n inputVal = $('.input-val');\n inputQty = $('.input-qty');\n var totalAmount = 0;\n\n for (var i = 0; i < document.rowNumber; i++) {\n if (inputVal.eq(i).val() && inputQty.eq(i).val()){\n totalAmount += (inputVal.eq(i).val() * inputQty.eq(i).val());\n }\n }\n $('#total-amount').text(formatNumber(totalAmount.toFixed(2)));\n}", "title": "" }, { "docid": "1b680154256f33cb4522294a12a61214", "score": "0.6762308", "text": "function totalByCostoTotal(target){\r\n var str = target.id;\r\n var porcentaje= 1 +parseInt(document.getElementById('ItemPresupuesto_FACTOR_TOTAL_UNIT').value)/100;\r\n var strId= \"SubItemPresupuesto_\";\r\n var identificador = str.split(strId,2);\r\n var indice = identificador[1].charAt(0);\r\n //si es actualizar \r\n if(indice == 'u'){\r\n var strId= \"SubItemPresupuesto_u___\";\r\n var identificador = str.split(strId,2);\r\n identificador= identificador[1].split(\"_COSTO_TOTAL\",2);\r\n var costo_total=parseInt(target.value);\r\n \r\n if(isNaN(costo_total)) costo_total =0;\r\n if(isNaN(porcentaje)) porcentaje = 0;\r\n var total = ((costo_total * porcentaje));\r\n total = total.toFixed()\r\n document.getElementById('SubItemPresupuesto_u___'+identificador[0]+'_VALOR_UNITARIO').value = total+\"\";\r\n //this.costoAstilleroUpdate(identificador[0]);\r\n } //si es crear\r\n\r\n else{\r\n var strId= \"SubItemPresupuesto_VALOR_UNITARIO\";\r\n var identificador = str.split(strId,2);\r\n if(identificador[1]>1){\r\n\r\n var costo_total= parseInt(target.value);\r\n \r\n if(isNaN(costo_total)) costo_total =0;\r\n if(isNaN(porcentaje)) porcentaje = 0;\r\n var total = ((costo_total * porcentaje));\r\n total = total.toFixed()\r\n document.getElementById('SubItemPresupuesto_VALOR_ITEM'+identificador[1]).value = total+\"\";\r\n //this.costoAstillero(identificador[1]);\r\n }else\r\n {\r\n var costo_total= parseInt(target.value);\r\n \r\n if(isNaN(costo_total)) costo_total =0;\r\n if(isNaN(porcentaje)) porcentaje = 0;\r\n var total = ((costo_total * porcentaje));\r\n total = total.toFixed()\r\n document.getElementById('SubItemPresupuesto_VALOR_ITEM').value = total +\"\";\r\n // this.costoAstillero(identificador[1]);\r\n }\r\n } \r\n }", "title": "" }, { "docid": "ddf725e3c9b21e2871acf7bdf8721d56", "score": "0.67603105", "text": "function calculateAndDisplayTotal() {\n const firstClassTotal = getPriceOverQuantity(\"first\");\n const economyClassTotal = getPriceOverQuantity(\"economy\");\n\n // calculate total and display\n const subTotalPrice = handleAllCalcuation(firstClassTotal, economyClassTotal, true);\n displayValueToUser(\"subtotal\", subTotalPrice);\n\n // calculate tax and display\n const taxTotal = handleAllCalcuation(subTotalPrice, 0.1, false);\n displayValueToUser(\"tax\", taxTotal);\n\n // calculate grandTotal and display\n const grandTotal = handleAllCalcuation(subTotalPrice, taxTotal, true);\n displayValueToUser(\"grand-total\", grandTotal);\n}", "title": "" }, { "docid": "09c49dcbc86b812cc9b2015fab8442d1", "score": "0.6743753", "text": "function updatePrices() {\r\n $(\"select\").on(\"input\", function() {\r\n var subTot = 0;\r\n $(\"select option:selected\").each(function(idx) {\r\n let qty = $(this).val();\r\n let c = qty * theMenu[foodKey[idx]];\r\n\r\n // update each Total Cost Field\r\n $(\"input[name='cost[]']:eq(\" + idx + \")\").attr(\"value\", (c).toFixed(2));\r\n subTot += c;\r\n });\r\n MassTax = subTot * TAX;\r\n\r\n // update Subtotal, Tax, and Total\r\n $(\"input[name='subtotal']\").attr(\"value\", (subTot).toFixed(2));\r\n $(\"input[name='tax']\").attr(\"value\", (MassTax).toFixed(2));\r\n $(\"input[name='total']\").attr(\"value\", (subTot + MassTax).toFixed(2));\r\n });\r\n}", "title": "" }, { "docid": "8aed2432020a75fec7ad794e4f8747e6", "score": "0.6732151", "text": "function calcSub(){\n \n if(document.getElementById('salesforce').checked) {\n argSubTotal = 100;\n }\n else if(document.getElementById('cloud9').checked){\n argSubTotal = 200;\n }\n else if(document.getElementById('aws').checked){\n argSubTotal = 300;\n } \n else {\n argSubTotal = 400;\n }\n \n calcDisVatTotal(argSubTotal)\n}", "title": "" }, { "docid": "bbb3a569bb85dbccd3af88a000846267", "score": "0.6728126", "text": "function calculateTotalInPurchaseTab(){\n\tvar quantityPT = $('#purchaseDetailsQuantity').val();\n\tvar unitPricePT = $('#purchaseDetailsUnitPrice').val();\n\t$('#purchaseDetailsTotal').val(Number(quantityPT) * Number(unitPricePT));\n}", "title": "" }, { "docid": "5ce742c03cc8b7e6de88572a376ca3cb", "score": "0.6713249", "text": "function onSelecteSangkatChangeTotal() {\n currentTotal = parseFloat( $('#total-price').text().replace(/\\,/g , '') );\n \n $('#select-sangkat').on('change', function () {\n sangkatPrice = parseFloat($(this).children(':selected').attr('id'));\n total = currentTotal + sangkatPrice;\n\n $('#dilvery-fee').text(sangkatPrice + ' $');\n $('#total-price').text(total.toFixed(2));\n });\n}", "title": "" }, { "docid": "e8e5e5551707759dc233882e1fa4b12f", "score": "0.67118365", "text": "function subTotal(mobile,cover){\n //get subtotal amount \n const sub_total = mobile + cover;\n document.getElementById('sub-total').innerText = sub_total;\n\n //get the tax amount \n const tax = parseFloat((sub_total*0.05).toFixed(2));\n document.getElementById('tax').innerText = tax;\n\n //get the Total amount \n const allTotal = sub_total + tax;\n document.getElementById('all-total').innerText = allTotal;\n}", "title": "" }, { "docid": "da4c6bdb86c3860793c5f68fbc0c9146", "score": "0.6702537", "text": "function getgodontrnsfrcala(id) {\n var sum = 0;\n // alert('hello');\n $('.actualamt').each(function () {\n if ($(this).val())\n sum += parseFloat($(this).val());\n })\n $('#tot_amtso').val(sum.toFixed(2));\n getQtyPackcal(id);\n getNetQtyTotal();\n}", "title": "" }, { "docid": "12b1457ed800a94bbdb052de07a136d4", "score": "0.6702027", "text": "function calculateAll() {\n const $cart = document.querySelectorAll('#cart tr.product');\n let $total = 0;\n for (let $item of $cart) {\n $total += updateSubtotal($item);\n }\n document.getElementById('total-value').querySelector('span').innerText = $total;\n}", "title": "" }, { "docid": "290444f3c0d205d6b64e7bc1d248c4de", "score": "0.6697148", "text": "function calculateTotalInSaleTab(){\n\tvar quantityST = $('#saleDetailsQuantity').val();\n\tvar unitPriceST = $('#saleDetailsUnitPrice').val();\n\tvar discountST = $('#saleDetailsDiscount').val();\n\t$('#saleDetailsTotal').val(Number(unitPriceST) * ((100 - Number(discountST)) / 100) * Number(quantityST));\n}", "title": "" }, { "docid": "090467245aa528bbc059b49e851e1970", "score": "0.6689689", "text": "function order_update_total_prices () {\n var subtotal = order_subtotal_price();\n \n if (subtotal > 0) {\n var shipping = order_shipping_price();\n var vat = Number( ( ( subtotal + shipping ) / 100 ) * order_vat_rate() );\n var total = Number( subtotal + shipping + vat );\n \n $('input#subtotal').val( subtotal.formatMoney(2,'.','') );\n $('input#shipping').val( shipping.formatMoney(2,'.','') );\n $('input#vat').val( vat.formatMoney(2,'.','') );\n $('input#total').val( total.formatMoney(2,'.','') );\n }\n}", "title": "" }, { "docid": "3106f44bfe8f7d7c955fb112ed09c401", "score": "0.6682368", "text": "function calculateTotalAmount() {\n const firstClassPrice = getQuantityValue(\"first\");\n const economyClassPrice = getQuantityValue(\"economy\");\n\n const total = firstClassPrice * 150 + economyClassPrice * 100;\n document.getElementById(\"total\").innerText = \"$\" + total;\n\n const vat = Math.round(total * 0.1);\n document.getElementById(\"vat\").innerText = \"$\" + vat;\n\n const grandTotal = total + vat;\n document.getElementById(\"grand-total\").innerText = \"$\" + grandTotal;\n}", "title": "" }, { "docid": "ea068d72a707e8139f9069072cdfbbb2", "score": "0.6675714", "text": "function getQtyPackcal(id) {\n // alert('hello');\n var prod = 0;\n var x = $('#stdqty'+id+'').val();\n var y = $('#qtyrecadd'+id+'').val();\n // alert(x+' '+y);\n prod = x*y;\n if(prod != NaN)\n $('#net_Wt'+id).val((prod/100).toFixed(2));\n \n getNetQtyTotal();\n}", "title": "" }, { "docid": "09b85fb2ca2e5acbdb6e918fd9688a88", "score": "0.6669287", "text": "function getReceipt() {\n var text1 = \"<h3>You Ordered:</h3>\";\n var runningTotal = 0;\n var sizeTotal = 0;\n var sizeArray = document.getElementsByClassName('Size');\n for (let i = 0; i < sizeArray.length; i++) {\n if (sizeArray[i].checked) { // checks if input checkbox is clicked \n var selectedSize = sizeArray[i].value;\n text1 += selectedSize + \"<br>\";\n }\n }\n switch (selectedSize) {\n case \"Personal Pizza\":\n sizeTotal = 6;\n break;\n case \"Small Pizza\":\n sizeTotal = 8;\n break;\n case \"Medium Pizza\":\n sizeTotal = 10;\n break;\n case \"Large Pizza\":\n sizeTotal = 14;\n break;\n case \"Extra Large Pizza\":\n sizeTotal = 16;\n break;\n default:\n console.log(\"Unexpected value: \" + selectedSize);\n }\n runningTotal = sizeTotal;\n console.log(selectedSize + \" = $\" + sizeTotal + \".00\");\n console.log(\"size text1: \" + text1);\n console.log(\"subtotal: $\" + runningTotal + \".00\");\n getVegi(runningTotal, text1);\n}", "title": "" }, { "docid": "0569ef429d89d65642600989e7db7958", "score": "0.6668469", "text": "function writeSummary() {\n var y = document.getElementsByClassName(\"userSquare\");\n //removed with keyup event listener\n // //while there are nodes with the class userSquare, remove self-referential child from it's parent node.\n // while (y[0]) {\n // y[0].parentNode.removeChild(y[0]);\n // }\n //reset input value fields\n document.getElementById('subTotal').value = \"\";\n document.getElementById('tax').value = \"\";\n document.getElementById('orderTotal').value = \"\";\n\n //select value from qty input\n var qty = document.getElementById('qty').value;\n //switch statement: when value returns true, either return validation error message or proper results.\n switch (true) {\n //case : no discernable input, null value\n case (!qty.length > 0):\n alert.setAttribute('style', 'font-size:1.4em; color:red; font-weight:800');\n alert.innerHTML = \"Please enter a valid quantity.\";\n document.getElementById('qty').focus();\n document.getElementById('qty').value= \"\";\n break;\n //case : is not a number\n case (isNaN(qty)):\n alert.setAttribute('style', 'font-size:1.4em; color:red; font-weight:800');\n alert.innerHTML = \"Please enter a valid numerical quantity.\";\n document.getElementById('qty').focus();\n document.getElementById('qty').value = \"\";\n break;\n //case: is a number, value is less than zero (negative)\n case (!isNaN(qty) && parseFloat(qty) < 0):\n alert.setAttribute('style', 'font-size:1.4em; color:red; font-weight:800');\n alert.innerHTML = \"Please enter a valid positive quantity.\"\n document.getElementById('qty').focus();\n document.getElementById('qty').value= \"\";\n break;\n //default case: everything is working!\n default:\n //call fix()-> which returns a number.tofixed(2) for the value\n var st = fix(259.99 * parseFloat(qty)); //unit price* float qty (Assuming partial units may be purchased)\n var tx = fix(parseFloat(st) * .06); //subtotal * 6% tax\n var ot = fix(parseFloat(st) + parseFloat(tx)); // order total = subtotal + tax\n //return to original style for proper input\n alert.setAttribute('style', 'font-size:1.0em; color:cornflowerblue; font-weight:300');\n //declare combiner variable to aggregate invoice totals\n var combined = 0;\n //call post receipt \n postReceipt(st, tx, ot, qty);\n //iterate through receipts, pull order totals, variable combined remains outside the scope of the loop and\n //is then used to display the aggregated total.\n for (var i = 0; i < receipts.length; i++) {\n var add = parseFloat(receipts[i].orderTotal);\n combined += add;\n }\n //display order totals in alert\n alert.innerHTML = \"Your order total(s) come to <span class='fn'>$\" +\n\n combined.toFixed(2) + \"</span>.\";\n //display order totals in input fields.\n document.getElementById('subTotal').value = \"$\" + st;\n document.getElementById('tax').value = \"$\" + tx;\n document.getElementById('orderTotal').value = \"$\" + ot;\n\n\n }\n}", "title": "" }, { "docid": "e7199a7c88e0e29afa04bef8753f43f0", "score": "0.66630954", "text": "function reserMgrItemDetail() {\n var tbodySelector = $('#tblOrderItemDetail tbody tr');\n $('#txtTotalItemDetail').val(tbodySelector.length);\n var number = 1;\n var total = $('#total');\n var sub_total = parseFloat(0);\n $(tbodySelector).each(function() {\n $(this).find('td:eq(0)').text(number+'.');\n $(this).find('td input.txtItemSKU').attr({id: 'txtItemSKU_'+number, name: 'txtItemSKU_'+number});\n $(this).find('td input.txtPartNo').attr({id: 'txtPartNo_'+number, name: 'txtPartNo_'+number});\n $(this).find('td input.txtItemName').attr({id: 'txtItemName_'+number, name: 'txtItemName_'+number});\n $(this).find('td input.txtItemRemark').attr({id: 'txtItemRemark_'+number, name: 'txtItemRemark_'+number});\n $(this).find('td input.txtUomName').attr({id: 'txtUomName_'+number, name: 'txtUomName_'+number});\n $(this).find('td input.txtQuantity').attr({id: 'txtQuantity_'+number, name: 'txtQuantity_'+number});\n $(this).find('td input.txtUnitPrice').attr({id: 'txtUnitPrice_'+number, name: 'txtUnitPrice_'+number});\n $(this).find('td input.txtTotalPrice').attr({id: 'txtTotalPrice_'+number, name: 'txtTotalPrice_'+number});\n $(this).find('td input.txtUomId').attr({id: 'txtUomId_'+number, name: 'txtUomId_'+number});\n sub_total += parseFloat($(this).find('td input.txtTotalPrice').val());\n number++;\n });\n \n if(sub_total !== parseFloat(0)) {\n var gst = $('#txtOrderGST');\n var tdGst = $('#gstTd');\n total.val(sub_total);\n var gstValue = parseFloat(0);\n if(!$('#chkInclusiveGST').is(':checked')) {\n $('td#subTotal').text(getPriceFormattedNumber(sub_total, 2));\n $('#txtOrderSubTotal').val(sub_total);\n gstValue = parseFloat((parseFloat(0.07) * parseFloat(sub_total)).toFixed(2));\n gst.val(gstValue);\n tdGst.text(getPriceFormattedNumber(gstValue, 2));\n var grandTotal = parseFloat($('#txtOrderSubTotal').val()); \n grandTotal = grandTotal + gstValue;\n $('td#grandTotal').text(getPriceFormattedNumber(grandTotal, 2));\n $('#txtOrderGrandTotal').val(grandTotal);\n } else {\n $('td#grandTotal').text(getPriceFormattedNumber(total.val(), 2));\n $('#txtOrderGrandTotal').val(total.val());\n gstValue = parseFloat((parseFloat(0.07) * parseFloat(total.val())).toFixed(2));\n gst.val(gstValue);\n tdGst.text(getPriceFormattedNumber(gstValue, 2));\n var grandTotal = parseFloat(total.val()) - gstValue;\n $('td#subTotal').text(getPriceFormattedNumber(grandTotal, 2));\n $('#txtOrderSubTotal').val(grandTotal);\n }\n } else {\n $('td#subTotal').text('');\n $('#txtOrderSubTotal').val('');\n $('#gstTd').text('');\n $('#txtOrderGST').val('0');\n $('td#grandTotal').text('');\n $('#txtOrderGrandTotal').val('');\n $('#btnDeleteAllItem').hide();\n } \n}", "title": "" }, { "docid": "877189288a0b2d24cd29ed97b265a0f5", "score": "0.66578966", "text": "function calculateTotalPrice(newSub, vat){\n\t\tvar $total = $('.total-cost span');\t\t\n\t\tvar total = newSub + vat;\n\n\t\t//Update the total cost input field and also the span that is shown on the cart.\n\t\t$('.total-cost input').val(total.toFixed(2));\n\t\t$total.text('£' + total.toFixed(2));\n\t}", "title": "" }, { "docid": "59a2e6242c6f7845aabf00a1a4b60892", "score": "0.6646339", "text": "function updateOrder(value,productElem) {\n\n let productInputElem = $(productElem).find(\"input\");\n let newQuantity = parseInt(productInputElem.val()) + value;\n\n if (newQuantity >= 0) {\n \n //update the input value\n productInputElem.val(newQuantity);\n\n \n let productName = productElem.slice(1,productElem.length-6);\n let price = PRICES[productName];\n\n //update the subtotal\n let subtotalElem = $(productElem).find(\".subtotal\");\n\n if (newQuantity == 0) {\n subtotalElem.html(\"\");\n } else {\n subtotalElem.html(numFormat(price*newQuantity));\n }\n\n //recalculate the total\n let total = 0;\n\n $(\"[type='number']\").each((index,element)=>{\n\n let productElemId = $(element).closest(\".form-group\").attr(\"id\");\n let productPrice = PRICES[productElemId.slice(0,productElemId.length-6)];\n total += parseInt($(element).val() * productPrice);\n });\n\n $(\"#total\").html(numFormat(total));\n }\n}", "title": "" }, { "docid": "89025e454b604a1f1c9f2520db93756e", "score": "0.66319615", "text": "function changeTotalPrice(qty) {\n if (qty == 0) {\n $(\"td.quantity\").text(\"0\");\n $(\"td.ticket_price\").text(\"0.00\");\n $(\".total_price\").text(\"0.00\")\n }\n else {\n $(\"td.quantity\").text(`${qty}`);\n $(\"td.ticket_price\").text(`${qty*7.00}.00`);\n $(\".total_price\").text(`${qty*7.00}.00`) \n }\n \n}", "title": "" }, { "docid": "9270661a4e3a8d8056eb1705d29bed10", "score": "0.66211385", "text": "function totalUpdatePrice(isAdd) {\r\n const totalPrice = document.getElementById('totalPrice');\r\nconst defaultPrice = parseInt(document.getElementById('defaultCost').innerText);\r\nconst memoryPrice = parseInt(document.getElementById('defaultMemory').innerText);\r\n const storagePrice = parseInt(document.getElementById('defaultStorage').innerText);\r\n const deliveryCost = parseInt(document.getElementById('defaultDelivery').innerText);\r\n totalPrice.innerText = defaultPrice + memoryPrice + storagePrice + deliveryCost;\r\n const finalTotal = parseInt(document.getElementById('final-total').innerText = totalPrice.innerText);\r\n}", "title": "" }, { "docid": "6ed34ff682d3ba8381097f07cb8ea70b", "score": "0.66117185", "text": "function updateTotal(quantity, dingus) {\r\n\r\n\t// if quantity is greater than 1 then enable order button\r\n\tif (quantity > 0) {\r\n\t\tdocument.getElementsByClassName(\"button-success pure-button\")[0].disabled = false; \r\n\t} \r\n\t\r\n\t// some edge cases for inputs\r\n\tlet d = document.getElementById(\"dingus\").value;\r\n\tlet w = document.getElementById(\"widget\").value;\r\n\t\r\n\tlet dingusTotal = 0;\r\n\tlet widgetTotal = 0;\r\n\r\n\t// if quantity is from dingus field\r\n\tif (dingus==true) {\r\n\t\tdingusTotal = (quantity * DINGUS_PRICE).toFixed(2);\r\n\t\tdocument.getElementById(\"dtotal\").value = dingusTotal;\r\n\t\tstore.currDingusQuantity = Number(quantity);\r\n\t}\r\n\t// if quantity is from widget field\r\n\tif (dingus==false) {\r\n\t\twidgetTotal = (quantity * WIDGET_PRICE).toFixed(2);\r\n\t\tdocument.getElementById(\"wtotal\").value = widgetTotal;\r\n\t\tstore.currWidgetQuantity = Number(quantity);\r\n\t}\r\n\t// calculate total field\r\n\tlet totalVal = Number(document.getElementById(\"dtotal\").value) + Number(document.getElementById(\"wtotal\").value);\r\n\tdocument.getElementById(\"total\").value = totalVal.toFixed(2);\r\n\r\n}", "title": "" }, { "docid": "8dbdbdef5c2b26126186d9b121931216", "score": "0.6603843", "text": "function gettingTotal() {\n // best price\n const bestPrice = 1299;\n // extraMemory total price\n const extraMemoryTotal = parseFloat(document.getElementById('extra-memory').innerText)\n // extrastorage total price\n const extraStorageTotal = parseFloat(document.getElementById('extra-storage').innerText);\n // delivery cost \n const deliveryCostTotal = parseFloat(document.getElementById('delivery-cost').innerText);\n // getting total price\n document.getElementById('total-price').innerText = bestPrice + extraMemoryTotal + extraStorageTotal + deliveryCostTotal;\n // getting total for last total\n document.getElementById('final-total').innerText = bestPrice + extraMemoryTotal + extraStorageTotal + deliveryCostTotal;\n}", "title": "" }, { "docid": "a5e62d878c4ed74b59d8a2c30a00a526", "score": "0.6602054", "text": "function calc() {\n $('#tab_logic tbody tr').each(function (i, element) {\n var html = $(this).html();\n if (html != '') {\n var qty = $(this).find('.qty').val();\n var price = $(this).find('.price').val();\n var sgst = $(this).find('.sgst').val();\n //var cgst = $(this).find('.igst').val();\n var cgst = $(this).find('.cgst').val();\n $(this).find('.total').val(qty * price);\n var inline_tottal = qty * price;\n var sgst_totl = inline_tottal * (sgst / 100);\n var cgst_total = inline_tottal * (cgst / 100);\n //console.log(cgst + sgst);\n // console.log(inline_tottal);\n var final_inline_tax_total = sgst_totl + cgst_total + inline_tottal;\n $(this).find('.inline_tax').val(final_inline_tax_total.toFixed(2));\n console.log(final_inline_tax_total);\n var tax_amt_new_inline = sgst_totl + cgst_total;\n $(this).find('.inline_tax_amount').val(tax_amt_new_inline.toFixed(2));\n calc_total();\n }\n });\n}", "title": "" }, { "docid": "7449a8ea2cef0476131ef6dc57bcc44d", "score": "0.6599998", "text": "function getTotalPrice() {\n let productRow = document.getElementsByClassName(\"productRow\");\n let totalPrice = document.getElementsByClassName('totalPrice')[0];\n totalPrice.innerHTML = 0.00;\n\n for (let i = 0; i < productRow.length; i++) {\n let rows = productRow[i]\n let qtyTotal = rows.getElementsByClassName('qtyTotal')[0];\n let productPrice = rows.getElementsByClassName(\"productPrice\")[0].innerHTML;\n console.log(rows, productPrice)\n let quantity = rows.getElementsByClassName(\"qty\")[0].value;\n let subTotal = Number(productPrice) * Number(quantity);\n let total = subTotal + Number(totalPrice.innerHTML)\n\n qtyTotal.innerHTML = subTotal.toFixed(2)\n totalPrice.innerHTML = total.toFixed(2)\n }\n}", "title": "" }, { "docid": "e286928d7d4aedd64e339d904ce1307c", "score": "0.6592379", "text": "function UpdateTotalPriceItems() {\n var container = document.getElementsByClassName('item-purchase-drop')[0]\n var elements = container.getElementsByClassName('item-purchase')\n var totalP = 0\n for (let i = 0; i < elements.length; i++) {\n var elem = elements[i]\n var currentPrice = elem.getElementsByClassName('item-purchase-price')[0]\n var quantityelem = elem.getElementsByClassName('item-purchase-quantity')[0]\n var priceelem = parseFloat(currentPrice.innerHTML.replace('$',''))\n var quantity1 = quantityelem.value\n totalP = totalP + (priceelem*quantity1)\n \n }\n totalP = Math.round(totalP * 100) / 100 //* arround the Total //\n document.getElementsByClassName('total')[0].innerHTML='$ '+totalP\n}", "title": "" }, { "docid": "28aaa4cb6be6d1805a14b094c785b9ef", "score": "0.65865535", "text": "function updateIncreaseSubtotal(Price){\n let subTotalPrice = document.getElementById('subTotal').innerText;\n const subTotalPriceNumber = parseInt(subTotalPrice);\n subTotalPrice = subTotalPriceNumber + Price;\n document.getElementById('subTotal').innerText = subTotalPrice;\n return subTotalPrice;\n}", "title": "" }, { "docid": "d49c4cec95a8ae252e93729318131f42", "score": "0.6584911", "text": "function updateCost() {\r\n var unitPrice = setUnitPrice();\r\n var qty = getId('qty').value;\r\n // 2 decimal places\r\n var cost = (qty*unitPrice).toFixed(2);\r\n getId('cost').innerHTML = \"$\"+cost;\r\n}", "title": "" }, { "docid": "0124766b2ad265acdec49d0d2b07a66e", "score": "0.6583784", "text": "function total() {\n // here i capture the shipping value by checking through the shipping list similarly to above.\n var shipping;\n for (var i = 0, length = shippinglist.length; i < length; i++) {\n if (shippinglist[i].checked) {\n shipping = parseInt(shippinglist[i].value);\n }\n }\n // then i capture the total costs of everything\n var lamptotal = parseInt(document.getElementById(\"l\").value) * 300;\n var mirrortotal = parseInt(document.getElementById(\"m\").value) * 500;\n var tax = (lamptotal + mirrortotal) * 0.0875;\n var total = lamptotal + mirrortotal + shipping + tax;\n \n // finall i update the costs onto the receipt by changing the html there\n document.getElementById(\"lampcost\").innerHTML = \"Lamps: $\" + lamptotal;\n document.getElementById(\"mirrorcost\").innerHTML = \"Mirrors: $\" + mirrortotal;\n document.getElementById(\"tax\").innerHTML = \"Tax: $\" + tax;\n document.getElementById(\"shippingcost\").innerHTML = \"Shipping Cost: $\" + shipping;\n document.getElementById(\"totalcost\").innerHTML = \"Grand Total: $\" + total;\n}", "title": "" }, { "docid": "168434352621f9e471c43296b12a021a", "score": "0.6579972", "text": "function update_total(row, qty){\n let unit_price = parseInt(row.attr(\"unit-price\"))\n let new_price = unit_price*qty\n let price_str = row.find(\".price\")[0].textContent\n let price = parseInt(price_str.substring(0, price_str.length-3));\n row.find(\".price\")[0].textContent = new_price.toString() + \" kr\"\n let total_str = $(\"#cart-total\")[0]\n let total = parseInt(total_str.textContent.substring(0, total_str.textContent.length-3));\n total_str.textContent = ((total-price)+new_price).toString() + \" kr\"\n}", "title": "" }, { "docid": "cf07cf8d29ff321c86ba13519d2befc4", "score": "0.6574428", "text": "function updateItemTotal6() {\n \n var price = $(\"#ac_item_total\").val();\n\n if( isNumeric(price)) {\n var total = price *1;\n \n $(\"#ac_item_total\").html(total);\n \n } else {\n \n $(\"#ac_item_total\").html(\"0.00\");\n }\n\n }", "title": "" }, { "docid": "d68bc19d00b111a6d0d0687f7ee7ffc7", "score": "0.6573062", "text": "function updateTotal() {\n var total = 0;\n let lineItems = lineItemContainer.children\n for (let i = 0; i < lineItems.length; i++) {\n let child = lineItems[i]\n total += parseInt(child.children[2].firstElementChild.value)\n }\n totalOutput.innerText = total\n}", "title": "" }, { "docid": "f7c8437d4bd45f005f8bdf24110f4c63", "score": "0.65728194", "text": "function ActionComputeAmount(me) {\n var qty = $(me).closest(\"tr\").find(\".qty\").val();\n var price = $(me).closest(\"tr\").find(\".price\").val();\n var total = Number(price) * Number(qty);\n $(me).closest(\"tr\").find(\".total_amount\").val(total);\n ActionComputeSubtotal();\n}", "title": "" }, { "docid": "f8762fea328fdf3ac9175f48eef7bc5f", "score": "0.65643215", "text": "function totalTicketPrice() {\n const firstClassTicketCount = getTicketInput('firstClass');\n const economyTicketCount = getTicketInput('economy');\n const subtotalTicketPrice = firstClassTicketCount * 150 + economyTicketCount * 100;\n document.getElementById('subtotalTicketPrice').innerText = subtotalTicketPrice;\n\n const ticketTax = subtotalTicketPrice * 0.1;\n document.getElementById('ticketTax').innerText = Math.round(ticketTax)\n\n const totalTicketPrice = subtotalTicketPrice + ticketTax;\n document.getElementById('totalTicketPrice').innerText = totalTicketPrice;\n}", "title": "" }, { "docid": "260d7c35bf4b420d51adb96290c51616", "score": "0.65602875", "text": "function finalTotalPrice(){\r\n\r\n\tlet besttotal = document.getElementById(\"subtotalPrice\").innerText;\r\n\tlet memoryPrice = document.getElementById(\"memoryPrice\").innerText;\r\n\tlet storagePrice = document.getElementById(\"storagePrice\").innerText;\r\n\tlet deliveryPrice = document.getElementById(\"deliveryPrice\").innerText;\r\n\r\n\tlet convtTotalPrice = (parseInt(besttotal) + parseInt(memoryPrice) + parseInt(storagePrice) + parseInt(deliveryPrice));//Convert All Of Prices From String To Intiger\r\n\r\n\tlet subtotalPrice = document.getElementById(\"totalPrice\");//Get The SubTotal Price Tag\r\n\tsubtotalPrice.innerText = convtTotalPrice;//Set Sub Total Price\r\n\r\n//****************************************************************\r\n//Let's Make Bonus Part For Getting Bonus Marks\r\n//****************************************************************\t\r\n\r\n\t//***********Dynamic Grand Total In Footer************\r\n //Get The Grand Total Tag\r\n let grandTotalPrice = document.getElementById(\"grandTotalPrice\");\r\n\r\n grandTotalPrice.innerText = subtotalPrice.innerText;//Set The Grand Total Price Of The MAC \r\n\r\n}", "title": "" }, { "docid": "377eb89312d99395925d0e6a9c001d88", "score": "0.6556925", "text": "function updateCheckoutTotal ( price, quantity ) {\n\n checkout.total += price * quantity;\n checkout.total_to_pay += price * quantity;\n \n document.getElementById('checkout-total').innerHTML = checkout.total.toFixed(2);\n document.getElementById('checkout-total-to-pay').innerHTML = checkout.total_to_pay.toFixed(2);\n\n}", "title": "" }, { "docid": "395a0d1b52c2ea62ea04d5442e648fff", "score": "0.65562856", "text": "function updateTotal(subtotal, taxes){\n $(\".cart-list__subtotal-number\").text(\"$ \"+ subtotal.toFixed(2));\n $(\".cart-list__tax-rate-number\").text(\"$ \"+ taxes.toFixed(2));\n $(\".cart-list__total-number\").text(\"$ \"+ (subtotal+taxes).toFixed(2));\n }", "title": "" }, { "docid": "cf10151cd0966e11c6b0d86d79023cec", "score": "0.6556245", "text": "function setSize() {\n sizeObject = document.getElementsByName('size');\n selection = \"\";\n\n //Find which radio button was selected\n for(var i=0;i<sizeObject.length;i++){\n if (sizeObject[i].checked == true){\n selection = sizeObject[i].value;\n }\n }\n\n //Update subtotal and webpage based on user selection\n switch(selection) {\n case 'Personal':\n subSize = 6;\n document.getElementById('sizeTotal').innerHTML = \"+ $\" + subSize;\n break;\n case 'Medium':\n subSize = 10;\n document.getElementById('sizeTotal').innerHTML = \"+ $\" + subSize;\n break;\n case 'Large':\n subSize = 14;\n document.getElementById('sizeTotal').innerHTML = \"+ $\" + subSize;\n break;\n case 'Extra Large':\n subSize = 16;\n document.getElementById('sizeTotal').innerHTML = \"+ $\" + subSize;\n break;\n }\n document.getElementById('sizeA').innerHTML = selection + \" Pizza\";\n document.getElementById('sizeB').innerHTML = \"$\" + subSize + \".00\";\n\n //Call setTotal()\n setTotal();\n}", "title": "" }, { "docid": "b0656b37d8b3215f51b7b7719440c5e9", "score": "0.6545519", "text": "function calculateTotal() {\n const fClassTicket = getTicketCount(\"f-class\");\n const economyTicket = getTicketCount(\"economy\");\n\n const subTotal = fClassTicket * 150 + economyTicket * 100;\n document.getElementById(\"sub-total\").innerText = subTotal;\n\n const vatAmount = subTotal * 0.1;\n document.getElementById(\"vat-amount\").innerText = vatAmount;\n\n const totalAmount = subTotal + vatAmount;\n document.getElementById(\"total-amount\").innerText = totalAmount;\n\n return totalAmount;\n}", "title": "" }, { "docid": "f492bcfffa5e3a89b502da6c51c9c8be", "score": "0.654498", "text": "function updateTotalField (totalFieldId ,updateAmount){\n \n const updateTotal = document.getElementById(totalFieldId);\n const updateText = updateTotal.innerText;\n\n \n updateTotal.innerText = parseFloat(updateAmount)+parseFloat(updateText);\n\n}", "title": "" }, { "docid": "95165b929dff9832d6160a56e4d1e008", "score": "0.6536894", "text": "function firstSubTotal(id) {\n const a = document.getElementById(id);\n const aa = a.innerText;\n const aaa = parseFloat(aa);\n const aaaa = aaa + 150;\n document.getElementById('subTotal').innerText = aaaa;\n}", "title": "" }, { "docid": "18018a5c3ef8902502249eb82f4c2b28", "score": "0.652838", "text": "function doneTyping () {\n\t\t \t\n\t\t \tquantity = parseInt(document.getElementById('quantity_final_purchase').value);\n\n\t\t \ttotalPrice = price * quantity;\n\n\t\t \tconsole.log(totalPrice);\n\n\t\t \tdocument.getElementById('total_final_purchase').value = \"Rp \"+comma_digits(totalPrice);\n\t\t \n\t\t}", "title": "" }, { "docid": "361d176b3d448cfa149fc79adfb7d2ff", "score": "0.6527615", "text": "function calPrice() {\n sum = 0;\n console.log(\"calPrice\");\n $(\".item\").each((i, val) => {\n let qty = $(val).find(\".qty\").val();\n console.log($(val).find(\".price\").text());\n let price = parseFloat($(val).find(\".price\").text().replace(\"$\",\"\"));\n let total = parseFloat(qty * price).toFixed(2);\n sum += (qty * price);\n $(val).find(\".total\").text(\"$\" + total);\n });\n console.log(\"sum\", sum);\n $(\"#sum\").text(\"$\" + parseFloat(sum).toFixed(2));\n }", "title": "" }, { "docid": "d9e1f8ce76a98b3f7eacce809a8034a0", "score": "0.6526446", "text": "function net_total(){\n\t\tvar net_total = 0;\n\t\t$('.quantidade').each(function(){\n\t\t\tvar row = $(this).parent().parent();\n\t\t\tvar price = row.find('.price').val();\n\t\t\tvar total = price * $(this).val()-0;\n\t\t\trow.find('.total').val(total);\n\t\t})\n\t\t$('.total').each(function(){\n\t\t\tnet_total += ($(this).val()-0);\n\t\t})\n\t\t$('.net_total').html(\"Total : \" +net_total+ \"€\");\n\t}", "title": "" }, { "docid": "2484e65b1e128e4fbbb4fbd4b4a6d4f3", "score": "0.6526006", "text": "function checkInputField() {\n $(\".amount-changed\").on(\"keyup change\", function () {\n let newValue = Number(this.value.match(/^\\d+$/));\n let id = Number($(this).closest(\".quantity-tr\").attr(\"id\"));\n let inStock = checkQuantity(id);\n let item = allProducts.find((item) => item.id == id);\n\n if (newValue == 0) {\n setNewQuantity(id, 1);\n $(this).closest(\".quantity-td\").find(\"input\").val(1);\n newValue = 1;\n $(this)\n .closest(\"tr\")\n .find(\".cart-table-item-total\")\n .html(unitFormatter(item.price * newValue));\n } else if (newValue <= 99 && inStock >= newValue) {\n setNewQuantity(id, newValue);\n $(this).closest(\".quantity-td\").find(\"input\").val(newValue);\n $(this)\n .closest(\"tr\")\n .find(\".cart-table-item-total\")\n .html(unitFormatter(item.price * newValue));\n } else if (inStock <= 99) {\n setNewQuantity(id, inStock);\n $(this).closest(\".quantity-td\").find(\"input\").val(inStock);\n newValue = inStock;\n $(this)\n .closest(\"tr\")\n .find(\".cart-table-item-total\")\n .html(unitFormatter(item.price * newValue));\n alert(\"Aktuella lagersaldot för denna produkt är: \" + inStock);\n } else {\n setNewQuantity(id, checkQuantity(id));\n newValue = 99;\n $(this).closest(\".quantity-td\").find(\"input\").val(99);\n $(this)\n .closest(\"tr\")\n .find(\".cart-table-item-total\")\n .html(unitFormatter(item.price * newValue));\n alert(\n \"Högsta kvantitet man kan beställa online är 99.\\nFör större kvantitet kontakta butiken.\"\n );\n }\n });\n}", "title": "" }, { "docid": "9e3dccce1ffcbdda410bf256c9b9dd32", "score": "0.6517022", "text": "function updatePrice(){\n totalPrice.value = \"$\" + (ITEM_PRICE * quantity.value);\n}", "title": "" }, { "docid": "8ae6af89113e95a436a66ec43b8d0e83", "score": "0.6512432", "text": "function calcularTotal() {\n \n}", "title": "" }, { "docid": "d6554f323a001a829e9f0134dd7afd2d", "score": "0.6511259", "text": "function handleChange(e) {\n\t\tsetQty(Number(e.target.value));\n\t}", "title": "" }, { "docid": "04175fbb96b08caf53e24a11c372287d", "score": "0.65104014", "text": "function simpleCalc() {\n let labelP = document.getElementById(\"pantsQty\");\n let labelS = document.getElementById(\"shirtQty\");\n\n var x = parseInt(labelP.innerHTML) * 40.99;\n pantsTotal.innerHTML = x.toFixed(2);\n\n var y = parseInt(labelS.innerHTML) * 10.99;\n shirtTotal.innerHTML = y.toFixed(2);\n\n var z = x + y;\n subTotal.innerHTML = z.toFixed(2);\n\n var t = z * .13;\n tax.innerHTML = t.toFixed(2)\n\n var q = t + z;\n total.innerHTML = q.toFixed(2)\n}", "title": "" }, { "docid": "dc9c65cf6c2e79adf314c2f09550102f", "score": "0.65076923", "text": "function valorSubItem(identificador){\r\n if(identificador>1){\r\n var valor_unitario= parseInt(document.getElementById('SubItemPresupuesto_VALOR_UNITARIO'+identificador).value);\r\n var cantidad = parseInt(document.getElementById('SubItemPresupuesto_CANTIDAD'+identificador).value);\r\n if(isNaN(cantidad)) cantidad =1;\r\n if(isNaN(valor_unitario)) valor_unitario = 0;\r\n var total = cantidad* valor_unitario;\r\n total = total.toFixed(2)\r\n arrayPrices[identificador]= total;\r\n document.getElementById('SubItemPresupuesto_VALOR_ITEM'+identificador).value = total +\"\";\r\n setTotal(identificador);\r\n }else\r\n {\r\n var valor_unitario= parseInt(document.getElementById('SubItemPresupuesto_VALOR_UNITARIO').value);\r\n var cantidad = parseInt(document.getElementById('SubItemPresupuesto_CANTIDAD'+identificador).value);\r\n if(isNaN(cantidad)) cantidad =1;\r\n if(isNaN(valor_unitario)) valor_unitario = 0;\r\n var total = cantidad* valor_unitario;\r\n total = total.toFixed(2)\r\n identificador=0;\r\n arrayPrices[identificador]= total;\r\n document.getElementById('SubItemPresupuesto_VALOR_ITEM').value = total +\"\";\r\n setTotal(identificador);\r\n }\r\n }", "title": "" }, { "docid": "b8479e7e46bc2b843880837590c29278", "score": "0.6495695", "text": "function calculateTotalPrice() {\n\tconsole.log(\"bentoCustomize.calculateTotalPrice\" + \" start\");\n\tvar totalPrice = 0;\n\n\t// adding the values of the 'price' input fields.\n\ttotalPrice += Number(document.getElementById(\"mainDishPrice\").value);\n\ttotalPrice += Number(document.getElementById(\"soupPrice\").value);\n\t\n\t// traversing through the 'tblSideDish' table to add all the values of 'price' input fields.\n\tvar tblSideDish = document.getElementById(\"tblSideDish\");\n\tvar priceInputFields = tblSideDish.getElementsByTagName(\"input\");\n\n\tfor (var i = 0; i < (tblSideDish.rows.length-1); i++) {\n\t\ttotalPrice += Number(priceInputFields[i].value);\n\t}\n\t\n\t// updating the value of the 'bentoTotalPrice' input field\n\tdocument.getElementById(\"bentoTotalPrice\").value = totalPrice;\n\tconsole.log(\"bentoCustomize.calculateTotalPrice\" + \" end\");\n}", "title": "" }, { "docid": "9c1fcb17c49761dba5134fac849f7bfe", "score": "0.64945334", "text": "function updateTotalField(totalFieldId, amount) {\n // debugger;\n // get and update current by calling id \n const totalElement = document.getElementById(totalFieldId);\n // taking the text\n const totalText = totalElement.innerText;\n //convert\n const previousTotal = parseFloat(totalText); \n // calculation\n totalElement.innerText = previousTotal + amount;\n \n\n}", "title": "" }, { "docid": "6b3abde348b10e7d4367749bb07475e2", "score": "0.6493983", "text": "function updateTotalFiled( totalFieldId, inputAmount ) {\n const totalField = document.getElementById( totalFieldId );\n const previousTotalFieldText = totalField.innerText;\n const previousTotalFieldAmount = parseFloat( previousTotalFieldText );\n totalField.innerText = previousTotalFieldAmount + inputAmount;\n}", "title": "" }, { "docid": "83a97c93fbff1fe7505a0008ea97e6ef", "score": "0.6492417", "text": "function updateItemTotalAjust() {\n var quantity = $(\"#ac_item_quantity\").val();\n \n \n \n if(isNumeric(quantity)) {\n var total = quantity; \n\n $(\"#ac_item_total\").html(total);\n } else {\n $(\"#ac_item_total\").html(\"0.00\");\n }\n }", "title": "" }, { "docid": "27d52a15a2d2f8e5b1867e4c9c677c52", "score": "0.6492156", "text": "function quantityChanged(event)\n{\n var qty = event.target;\n if(isNaN(qty.value) || qty.value <= 0)\n {\n qty.value = 1;\n }\n updateCart();\n}", "title": "" }, { "docid": "3d050fdd9a05e8987f6f56a22f6658ba", "score": "0.64857525", "text": "function calcAll() {\n let price = 0;\n let productPrice, productQty, rowSubtotal;\n \n document.querySelectorAll(`.product`).forEach(product => {\n productPrice = +product.querySelector(`.pu span`).innerText;\n productQty = product.querySelector(`.qty label input`).value;\n rowSubtotal = productPrice * productQty;\n product.querySelector(`.subtotal`).innerHTML = `${rowSubtotal}$`;\n price += rowSubtotal;\n });\n document.querySelector(`h2 span`).innerHTML = `${price}`;\n}", "title": "" }, { "docid": "988c1d27297730fea35306bdc2fc3ee3", "score": "0.6482899", "text": "function updateCartBoxTotal() {\r\n // Get cartBox totals section elements\r\n var totalNotax = document.querySelector('#cartBox-totals-section #cartBox-total-notax span');\r\n var deliveryFee = parseFloat(document.querySelector('#cartBox-totals-section #cartBox-delivery-fee span').textContent);\r\n var totalGST = document.querySelector('#cartBox-totals-section #cartBox-tax span');\r\n var totalTaxed = document.querySelector('#cartBox-totals-section #cartBox-total-taxed span');\r\n\r\n // Get the original cart total\r\n var subtotals = parseFloat(document.querySelector('#cart-checkout #total span').textContent).toFixed(2);\r\n\r\n // Calculate and update each total details\r\n totalNotax.textContent = subtotals;\r\n totalGST.textContent = ((parseFloat(subtotals) + deliveryFee) * 0.06).toFixed(2);\r\n totalTaxed.textContent = ((parseFloat(subtotals) + deliveryFee) * 1.06).toFixed(2);\r\n\r\n // Update the totals displayed at the submit button\r\n var s3Total = document.querySelector('#slide2-sub3 #submit-total span:nth-of-type(2)');\r\n s3Total.textContent = totalTaxed.textContent;\r\n}", "title": "" }, { "docid": "3d8bc0f83df64f7bace59301cd69e724", "score": "0.6480088", "text": "function loadQty() {\r\n var productName = document.getElementById(\"product-name\").innerHTML;\r\n var qty = document.getElementById(\"quantity\");\r\n if (sessionStorage.getItem(productName)) {\r\n qty.value = sessionStorage.getItem(productName);\r\n }\r\n subtot();\r\n }", "title": "" }, { "docid": "bc0ef2c8442fb787675685142402f7a1", "score": "0.64781225", "text": "function updateTotals() {\n let sub = document.getElementById(\"subtotal\")\n let tot = document.getElementById(\"total\")\n let cart = JSON.parse(localStorage.getItem(\"cart\"))\n let sum = 0\n for (let i = 0; i < cart.length; i++) {\n sum += parseInt(cart[i].quantity)\n }\n let subtotal = (Math.round(sum * 2.5 * 100) / 100)\n sub.innerHTML = \"$\" + subtotal.toFixed(2)\n tot.innerHTML = \"$\" + subtotal.toFixed(2)\n}", "title": "" }, { "docid": "59291ec3464d49d730adf4a1e96089ad", "score": "0.6474772", "text": "function CalItemTotalAmount(tax_id, rate_id, quantity_id, amount_id, total_amount_id){\n $('#'+quantity_id).change(function(){\n var quantity = Number($(this).val());\n var rate = $('#'+rate_id).val() ? Number($('#'+rate_id).val()) : 0\n var amount = quantity * rate;\n if (amount > 99999999999999999){\n alert('Invalid Amount')\n $(this).val('');\n return false\n }\n var tax = Number($('#'+tax_id).val());\n \n $('#'+amount_id).val(amount.toFixed(3));\n \n if (tax == 0){\n var total_amount = amount;\n }\n else{\n var total_amount = amount + (amount * (tax/100));\n }\n \n $('#'+total_amount_id).val(total_amount.toFixed(3));\n\n var cate_table_id = $(this).parents('table').attr('class').replace(/[^0-9]/g, '');\n var cate_form_id = $('#cate_form_'+cate_table_id).find('input[type=hidden]').attr('id').replace(/[^0-9]/g, '');\n if ($('#id_category-'+cate_form_id+'-tax').val() == null){\n changeCateAmount(cate_table_id, cate_form_id);\n }\n\n show_taxes();\n });\n \n $('#'+rate_id).change(function(){\n var rate = Number($(this).val());\n calculateItemRate(rate, $(this), quantity_id, tax_id, amount_id, total_amount_id);\n });\n\n $('#'+tax_id).change(function(){\n var tax = Number($(this).val());\n calculateItemTax(tax, $(this), amount_id, total_amount_id);\n });\n}", "title": "" } ]
918ba5721771da4ddbe6eeb4dbfa5de1
function that handles response from Google containint the profiles information. It is called by Passport after the second time passport.authenticate is called (in /auth/accepted/)
[ { "docid": "52c13a1424018c457a435aab7be9e60c", "score": "0.6674523", "text": "function gotProfile(accessToken, refreshToken, profile, done) {\n //console.log(\"Google profile\",profile);\n console.log(\"Google Id: \", profile.id);\n \n // here is a good place to check if user is in DB,\n // and to store him in DB if not already there. \n // Second arg to \"done\" will be passed into serializeUser,\n // should be key to get user out of database.\n googleId = profile.id; //temporarily save the user google id to use as rowId when submit id clicked\n let dbRowID = profile.id; // temporary! Should be the real unique\n // key for db Row for this user in DB table.\n // Note: cannot be zero, has to be something that evaluates to\n // True. \n\n done(null, dbRowID); \n}", "title": "" } ]
[ { "docid": "71809c9129b1091a6878906fb21b3e41", "score": "0.6918533", "text": "function responseGoogle(response) {\n\t\tif (response.AccessToken) {\n\t\t\tlocalStorage.setItem('googleToken', response.accessToken);\n\t\t} else {\n\t\t\tlocalStorage.setItem('googleToken', response.Zi.access_token)\n\t\t}\n localStorage.setItem('googleId', response.googleId);\n let userData = {\n firstName: response.profileObj.givenName,\n lastName: response.profileObj.familyName,\n fullName: response.profileObj.name,\n profileImage: response.profileObj.imageUrl,\n email: response.profileObj.email\n }\n props.updateUser(userData);\n\t}", "title": "" }, { "docid": "1c833409e8c3ca77344a8529fe9da035", "score": "0.6876027", "text": "googleSuccessResponse(response) {\n localStorage.setItem(\"token\", response.accessToken)\n localStorage.setItem(\"name\", response.profileObj.name)\n location.href = \"/overview\"\n }", "title": "" }, { "docid": "ec33c5aa20faf34794be7981cc3c0cfa", "score": "0.67863774", "text": "function gotProfile(accessToken, refreshToken, profile, done) {\n console.log(\"Google profile\" , profile);\n // here is a good place to check if user is in DB,\n // and to store him in DB if not already there. \n // Second arg to \"done\" will be passed into serializeUser,\n // should be key to get user out of database.\n let email = profile.emails[0].value;\n\n let dbRowID = 1; // temporary! Should be the real unique\n // key for db Row for this user in DB table.\n // Note: cannot be zero, has to be something that evaluates to\n // True. \n\n // Edited by George Lin\n // Line 198 - 204: To search for if the log in email contain ucdavis.edu, if not throw the token away and make the user re log in\n\n if(email.includes('ucdavis.edu')) {\n dbRowID = 2;\n } else {\n dbRowID = 1;\n // Throw away that token\n request.get('https://accounts.google.com/o/oauth2/revoke', {\n qs:{token: accessToken }}, function (err, res, body) {\n console.log(\"revoked token\");\n}) \n }\n done(null, dbRowID); \n}", "title": "" }, { "docid": "5ac81a3d7c99b0897256f1cac2effb82", "score": "0.67628425", "text": "function webGoogleDetails(data, callback) {\n\n var accessTokenUrl = config.get('webGoogle').webGoogle;\n var peopleApiUrl = config.get('webGoogle').peopleApiUrl;\n var params = {\n code: data.payload.code,\n client_id: data.payload.clientId,\n client_secret: config.get('webGoogle').secret,\n redirect_uri: data.redirectUri,\n grant_type: 'authorization_code'\n };\n\n // Step 1. Exchange authorization code for access token.\n request.post(accessTokenUrl, {\n json: true,\n form: params\n }, function(err, response, token) {\n var accessToken = token.access_token;\n var headers = {\n Authorization: 'Bearer ' + accessToken\n };\n\n // Step 2. Retrieve profile information about the current user.\n request.get({\n url: peopleApiUrl,\n headers: headers,\n json: true\n }, function(err, response, profile) {\n if (profile.error) {\n return callback({\n\n statusCode: 400,\n success: false,\n type: 'INVALID_GOOGLE_CLIENT',\n customMessage: profile.error.message\n\n\n });\n }\n\n data.profile = profile;\n callback(null, data);\n\n });\n });\n}", "title": "" }, { "docid": "8f2d4dfb794367252f0bbc61f1bc53de", "score": "0.6659871", "text": "async function responseGoogle(response){\n //if the google login is succeeded\n if (response.tokenId) {\n console.log(response.profileObj);\n let user = {\"email\": response.profileObj.email, \n \"name\": response.profileObj.givenName, \n \"surname\": response.profileObj.familyName, \n \"image\": response.profileObj.imageUrl};\n\n // set the user data in context provider\n appConsumer.setUser(user);\n //and save the token as string in localStorage\n storage.setItem(\"userToken\", response.tokenId);\n\n \n }\n }", "title": "" }, { "docid": "6e5270c9f98ad0dd0890e932d94d58c6", "score": "0.64889944", "text": "function onSignIn(googleUser) {\n\n console.log(\"chamou\");\n //console.log(authResult);\n\n var profile = googleUser.getBasicProfile();\n\n var id_token = googleUser.getAuthResponse().id_token;\n console.log('ID: ' + profile.getId()); // Do not send to your backend! Use an ID token instead.\n console.log('Name: ' + profile.getName());\n console.log('Image URL: ' + profile.getImageUrl());\n console.log('Email: ' + profile.getEmail()); // This is null if the 'email' scope is not present.\n console.log('Token: ' +id_token); // This is null if the 'email'\n\n if (googleUser) {\n\n $.ajax({\n type: 'POST',\n url: '/login/gplus',\n processData: false,\n data: {token: id_token},\n contentType: 'application/octet-stream; charset=utf-8',\n success: function (result) {\n\n console.log(result);\n // // Handle or verify the server response if necessary.\n // if (result) {\n // $('#result').html('Login Successful!</br>' + result + '</br>Redirecting...')\n // setTimeout(function () {\n // window.location.href = \"/\";\n // }, 4000);\n //\n // } else if (authResult['error']) {\n // console.log('There was an error: ' + authResult['error']);\n // } else {\n // $('#result').html('Failed to make a server-side call. Check your configuration and console.');\n // }\n }\n\n });\n }\n}", "title": "" }, { "docid": "130c8e64613254f99113382596ea358b", "score": "0.63440293", "text": "function gotProfile(accessToken, refreshToken, profile, done) {\n console.log(\"Inside gotProfile: Google profile id is \", profile.id);\n\n // Idea: We declared the id column as UNIQUE. Therefore,\n // if the user id already exists in the table, then the\n // callback will return an error message and the user will not\n // get re-inserted into the table. Else, insert into table,\n // and output the table to the console.\n let sqliteQuery = `INSERT INTO profiles VALUES (\"${profile.id}\", \"${profile.displayName}\")`;\n db.run(sqliteQuery, function(err) {\n if (err) {\n return console.log(err.message);\n }\n dumpDB();\n });\n\n // Second arg to \"done\" will be passed into serializeUser,\n // should be key to get user out of database.\n let dbRowID = profile.id;\n done(null, dbRowID);\n}", "title": "" }, { "docid": "59dca39c153f3a34e17bbb339db9c386", "score": "0.6300289", "text": "function gotProfile(accessToken, refreshToken, profile, done) {\n console.log(\"Google profile\",profile);\n const search_query = `SELECT * FROM users WHERE googleID = @0`;\n\n db.get(search_query, profile.id, (err, row) => {\n if (err) {\n console.log('Error:', err);\n }\n else if (typeof row == 'undefined') { // user not in table\n const insert_query = `INSERT INTO users\n (firstName, lastName, googleID) VALUES(@0, @1, @2)`;\n db.run(insert_query, profile.name.givenName, profile.name.familyName, \n profile.id, (err) => {\n if (err) {\n console.log('Error:', err);\n }\n else {\n console.log('Data inserted');\n }\n })\n }\n })\n\n let dbRowID = profile.id;\n id = dbRowID;\n done(null, dbRowID);\n}", "title": "" }, { "docid": "766c72e58e889fd288a02c0953aeaae8", "score": "0.6252482", "text": "function onSignIn(googleUser) {\n var profile = googleUser.getBasicProfile();\n console.log('ID: ' + profile.getId());\n // Do not send to backend! Use an ID token\n console.log('Name: ' + profile.getName());\n console.log('Image URL: ' + profile.getImageUrl());\n console.log('Email: ' + profile.getEmail());\n // This is null if the 'email' scope is not present.\n var id_token = googleUser.getAuthResponse().id_token;\n var name = profile.getName()\n var imgurl = profile.getImageUrl()\n var email = profile.getEmail()\n // var usertype = document.getElementById('userType').value\n//send sign in post to server\n\n// gapi.auth2.getAuthInstance().disconnect().then(function () {\n\n //Do stuff here after the user has been signed out, you can still authenticate the token with Google on the server side\n\n\n $.ajax({\n type: 'POST',\n url: URL + '/signin',\n data: { id_token: id_token, name: name, imgurl: imgurl, email:email },\n dataType: 'json',\n async: true,\n error: function(XMLHttpRequest, textStatus, errorThrown) {\n alert(\"some error\");\n },\n success: function (data) {\n console.log(\"Sign in Success!\")\n console.log(data)\n //redirect page to given URL\n window.location.assign(data.url);\n }\n });\n // }\n}", "title": "" }, { "docid": "4717a1bca09e4d930c4b3323d804cdfc", "score": "0.6241934", "text": "function oauth2Callback(type, accessToken, refreshToken, profile, next) {\n\n console.info('\\n\\nsocial media profile: ', profile);\n\n User.findOne({\n 'username': profile._json.id\n }).exec(function(err, user) {\n if (err) {\n next(err);\n } else if (user) {\n next(null, user);\n } else {\n var userData = {\n username: profile._json.id,\n passports: [{\n type: type,\n accessToken: accessToken,\n profileId: profile._json.id\n }]\n };\n\n switch(type) {\n case 'google':\n userData.name = profile._json.displayName;\n if (profile._json.image &&\n profile._json.image.url) {\n userData.avatarUrl = profile._json.image.url;\n }\n break;\n case 'facebook':\n userData.name = profile._json.name;\n if (profile._json.picture &&\n profile._json.picture.data &&\n profile._json.picture.data.url) {\n userData.avatarUrl = profile._json.picture.data.url;\n }\n break;\n default:\n console.error('unrecognized third party: ', type);\n return next('unrecognized third party \\'' + type + '\\'');\n }\n\n User.create(userData, next);\n }\n });\n}", "title": "" }, { "docid": "35c325615b2a2584297e7bec1cfdded8", "score": "0.622986", "text": "function getUserProfileSucces(response) {\n var appContext = {};\n appContext.user = response;\n if(req.session.appContext) {\n appContext.authMethod = req.session.appContext.AUTH_METHOD;\n }\n res.send(appContext);\n }", "title": "" }, { "docid": "6afbd21e7a72dcdf3987db436d34b0f0", "score": "0.61927986", "text": "function gotProfile(accessToken, refreshToken, profile, done) {\n console.log(\"Google profile\", profile);\n // here is a good place to check if user is in DB,\n // and to store him in DB if not already there.\n // Second arg to \"done\" will be passed into serializeUser,\n // should be key to get user out of database.\n\n let userID = profile.id;\n let firstName = profile.name.givenName;\n let lastName = profile.name.familyName;\n\n console.log(\"GOT THE PROFILE ID:\", userID);\n\n // let searchCmdStr = `SELECT count(google_id) FROM UserInfo WHERE google_id = ${userID}`;\n let searchCmdStr = `SELECT * FROM UserInfo WHERE google_id = ${userID}`;\n flashcardDb.get(searchCmdStr, searchGoogleIDCallback);\n\n let dbRowID;\n\n function searchGoogleIDCallback(err, rowData) {\n if (err) {\n console.log(\n \"Error occurred in searchGoogleIDCallback function. Error is:\",\n err\n );\n console.log(\"rowData is:\", rowData);\n } else {\n console.log(\n \"Successfully found whether or not user exists in database:\",\n rowData\n );\n\n if (rowData) {\n console.log(\"User already exists\");\n dbRowID = userID;\n done(null, dbRowID);\n } else {\n // insert new user into database\n console.log(\"User does not exist\");\n\n flashcardDb.run(\n `INSERT into UserInfo(google_id, first_name, last_name) VALUES (?, ?, ?)`,\n [userID, firstName, lastName],\n function(err) {\n if (err) {\n console.log(\n \"Inserting new user into database error\",\n err.message\n );\n } else {\n console.log(\"Inserting new user into database successful\");\n dbRowID = userID;\n done(null, dbRowID);\n }\n }\n );\n }\n }\n }\n\n //let dbRowID = 1; // temporary! Should be the real unique\n // key for db Row for this user in DB table.\n // Note: cannot be zero, has to be something that evaluates to\n // True.\n}", "title": "" }, { "docid": "024004b330808d7098a00696e320b4a2", "score": "0.61844695", "text": "async function getProfile(req, res) {\n // get the user id\n const userGID = req.headers['x-wapp-user'];\n // look up access token in the db\n const findUser = await User.findOne(\n {\n google_id: userGID,\n },\n { access_token: true, _id: false }\n )\n .limit(1)\n .catch(() => null);\n\n if (!findUser) {\n console.log(\"cant find user\")\n unauthorized(res);\n } else {\n // get the user's information\n const userInfo = await axios\n .get(\n `https://www.googleapis.com/oauth2/v3/userinfo?access_token=${findUser.access_token}`\n )\n .catch((err) => {\n console.log(err);\n return null;\n });\n\n if (!userInfo) {\n unauthorized(res);\n } else {\n res.status(200).json(userInfo.data);\n }\n }\n}", "title": "" }, { "docid": "1914493493a76c969eef51c5a82b748e", "score": "0.61746234", "text": "function profileCallback(profiles) {\n\t\tvar member = profiles.values[0];\n\t\t_this.profile = {\n\t\t\t'id':member.id,\n\t\t\t'education' : member.educations.values,\n\t\t\t'name' : member.firstName+' '+member.lastName,\n\t\t\t'industry' : member.industry,\n\t\t\t'work' : member.positions.values,\n\t\t\t'contacts' : member.connections\n\t\t};\n\t\tIN.API.Connections(\"me\")\n\t\t\t.fields(\"firstName\", \"lastName\", \"id\", \"pictureUrl\")\n\t\t\t.result(connectionsCallback);\n\t}", "title": "" }, { "docid": "8ce22c624749f44a97a42f19158e1e6e", "score": "0.6161777", "text": "function makeApiCall() {\n //console.log(\"Loading client data...\");\n /*gapi.client.load('people', 'v1', function() {\n var request = gapi.client.people.people.get({\n resourceName: 'people/me'\n });\n request.execute(function(resp) {\n //console.log(resp);\n });\n });*/\n gapi.client.load('plus','v1', function(){\n var request = gapi.client.plus.people.get({\n 'userId': 'me'\n });\n //console.log(request);\n request.execute(function(resp) {\n //console.log(resp);\n // console.log('Retrieved profile for:' + resp.displayName);\n //console.log('Response:');\n //console.log(resp.emails[0].value);\n var credentials = {\n \"id\": resp.emails[0].value,\n \"token\": resp.id,\n \"name\": resp.displayName,\n \"loggingInBy\": \"GOOGLE\"\n };\n AuthService.login(credentials).then(function (user) {\n $rootScope.$broadcast(AUTH_EVENTS.loginSuccess);\n $scope.setCurrentUser(user);\n Session.setItem(\"userInfo\",user);\n //alert(\"Setted user to session\");\n //console.log(user + \" user\");\n if(user.data.phone==null){\n \t$state.go(\"phoneVerify\");\n }else if($rootScope.previousState != \"\"){\n $state.go($rootScope.previousState);\n }else{\n $state.go('default');\n }\n });\n });\n});\n //console.log(\"Client data loaded....\");\n // Note: In this example, we use the People API to get the current\n // user's name. In a real app, you would likely get basic profile info\n // from the GoogleUser object to avoid the extra network round trip.\n //console.log(gapi.auth2.getAuthInstance().currentUser.get().getBasicProfile().getGivenName());\n}", "title": "" }, { "docid": "7f0edfc00daef51efdbf2770a0db83bd", "score": "0.6140106", "text": "function onSignIn(googleUser) {\n // Get the Google profile data (basic)\n //var profile = googleUser.getBasicProfile();\n \n // Retrieve the Google account data\n gapi.client.load('oauth2', 'v2', function () {\n var request = gapi.client.oauth2.userinfo.get({\n 'userId': 'me'\n });\n request.execute(function (resp) {\n // Display the user details\n var profileHTML = '<h3>Welcome '+resp.given_name+'! <a href=\"javascript:void(0);\" onclick=\"signOut();\">Sign out</a></h3>';\n profileHTML += '<img src=\"'+resp.picture+'\"/><p><b>Google ID: </b>'+resp.id+'</p><p><b>Name: </b>'+resp.name+'</p><p><b>Email: </b>'+resp.email+'</p><p><b>Gender: </b>'+resp.gender+'</p><p><b>Locale: </b>'+resp.locale+'</p><p><b>Google Profile:</b> <a target=\"_blank\" href=\"'+resp.link+'\">click to view profile</a></p>';\n document.getElementsByClassName(\"userContent\")[0].innerHTML = profileHTML;\n \n document.getElementById(\"gSignIn2\").style.display = \"none\";\n document.getElementsByClassName(\"userContent\")[0].style.display = \"block\";\n });\n });\n}", "title": "" }, { "docid": "1efa272c2be42c1c6efbbcb2b683bd31", "score": "0.6135762", "text": "function signinCallback(resp) {\n gapi.client.load('plus', 'v1', apiClientLoaded);\n if (resp['status']['signed_in']) {\n var access_token = resp['access_token'];\n console.log(\"access token = \" + access_token);\n localStorage.setItem(\"accessToken\", access_token);\n console.log(\"Access Token = \" + access_token);\n //alert(\"getAccessToken() = \" + access_token);\n }\n\n gapi.client.load('oauth2', 'v2', function() {\n gapi.client.oauth2.userinfo.get().execute(function(resp) {\n var access_token = resp['access_token'];\n // Shows user email\n localStorage.setItem(\"email\", resp.email);\n localStorage.setItem(\"id\", resp.id);\n\n console.log(JSON.stringify(resp));\n console.log(\" email in oauth2 = \" + resp.email);\n console.log(JSON.stringify(localStorage));\n console.log(JSON.stringify(resp));\n\n if (localStorage.getItem(\"id\") != \"\" && localStorage.getItem(\"id\") != null && localStorage.getItem(\"id\") != 'undefined') {\n //alert(\"Welcome!\");\n window.open(\"main.html\", \"_self\");\n\n } else {\n //alert(\"Please Log in\");\n }\n\n });\n });\n //set cal colour\n //localStorage.setItem(\"colour\", \"grey\");\n}", "title": "" }, { "docid": "410bb7994de65892e07ac894bc35ad21", "score": "0.61000276", "text": "async handleAuthCallback() {\n const urlPath = `${window.location.origin}${window.location.pathname}`;\n if (urlPath === this.authCallbackUrl) {\n const { account, errors, state } = await this.oreId.handleAuthResponse(\n window.location.href\n );\n if (state) console.log(`state returned with request:${state}`);\n if (!errors) {\n this.loadUserFromApi(account);\n }\n }\n }", "title": "" }, { "docid": "8c616f9c94162e8d50b1207473115988", "score": "0.6013645", "text": "function signinCallback(authResult) {\n console.log(\" (+) Call Callback\");\n auth = authResult;\n if (authResult['status']['signed_in']) {\n // Update the app to reflect a signed in user\n // Hide the sign-in button now that the user is authorized, for example:\n gapi.client.load('plus','v1', function() {\n var request = gapi.client.plus.people.get({\n 'userId': 'me'\n });\n\n request.execute(function(obj) {\n profile = obj;\n\n // Filter the emails object to find the user's primary account, which might\n // not always be the first in the array. The filter() method supports IE9+.\n email = obj['emails'].filter(function(v) {\n return v.type === 'account'; // Filter out the primary email\n })[0].value; // get the email from the filtered results, should always be defined.\n\n displayProfile(profile);\n document.getElementById('signinButton').setAttribute('style', 'display: none;');\n });\n });\n\n gapi.client.load('drive','v2', function() {\n var request = gapi.client.drive.files.list();\n\n request.execute(function(obj){ \n var listItems = obj[\"items\"];\n\n document.getElementById('profile').innerHTML += br();\n document.getElementById('profile').innerHTML += \"Documents:\";\n\n for(var i = 0; i < listItems.length; i++) {\n var docObject = listItems[i];\n\n document.getElementById('profile').innerHTML += \"\"\n + \"<li>\"\n + \"<img src='\" \n + (docObject[\"iconLink\"] ? docObject[\"iconLink\"] : \"#\") // Icon Link\n + \"'> \"\n + \"<a href='\" \n + docObject[\"webContentLink\"] // Web content Link\n + \"' target='_blank'>\" \n + docObject[\"title\"] // Title\n + \"</a></li>\";\n }\n });\n });\n } else {\n // Update the app to reflect a signed out user\n // Possible error values:\n // \"user_signed_out\" - User is signed-out\n // \"access_denied\" - User denied access to your app\n // \"immediate_failed\" - Could not automatically log in the user\n document.getElementById('signinButton').removeAttribute('style');\n console.log('Sign-in state: ' + authResult['error']);\n }\n}", "title": "" }, { "docid": "4fde5ac8bd1ebaf5dd9c2893f1e9552a", "score": "0.6010249", "text": "function onLoadGoogleCallback(){\n gapi.load('auth2', function() {\n auth2 = gapi.auth2.init({\n client_id: '1052498260626-4dq7d16dnr5egsej74f0e4p89c349vc2.apps.googleusercontent.com',\n cookiepolicy: 'single_host_origin',\n scope: 'profile email'\n });\n\n auth2.attachClickHandler(element, {},\n function(googleUser) {\n \tvar name = googleUser.getBasicProfile().getName();\n \tvar email = googleUser.getBasicProfile().getEmail();\n \tvar accesstoken = googleUser.getBasicProfile().getId();\n \tvar submit = 'google';\n // console.log('response' + name + email);\n \t$.post('admin/process.php', {name:name,email:email,accesstoken:accesstoken,'action':'1',submit:submit}, function(data){\n\t\t if(data=='200')\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t // $('#poup-form').modal('toggle');\n\t\t\t\t\t\t\t\t alert('Thanks our representative will contact you soon.');\n\t\t\t\t\t\t\t\t}else\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t // $('#poup-form').modal('toggle');\n\t\t\t\t\t\t\t\t\talert('something goes wrong');\n\t\t\t\t\t\t\t\t}\n\n\t\t });\n\n\n\n }, function(error) {\n console.log('Sign-in error', error);\n }\n );\n });\n\n element = document.getElementById('googleSignIn');\n}", "title": "" }, { "docid": "660d2cc6effe4beff50d1f1c065aeab3", "score": "0.60076004", "text": "function fetch_profile(callback) {\n\t\t// if we need to fetch friends?\n\t\tif (options.need_fetch) {\n\t\t\tlog('fetch profile and friends');\n\t\t\tvar fields_param = '\"fields\": \"' + options.profile_fields + '\"';\n\t\t\t// Code in VKScript lang\n\t\t\tvar code =\n\t\t\t'var friends = API.getFriends();' +\n\t\t\t'var friendsProfiles = API.getProfiles({\"uids\": friends, ' + fields_param + '});' +\n\t\t\t'var myProfile = API.getProfiles({\"uids\": ' + VK.params.viewer_id + ', ' + fields_param + '});' +\n\t\t\t'return {\"friendsProfiles\": friendsProfiles, \"myProfile\": myProfile };';\n\n\t\t\tVK.api('execute', {'code': code}, function(data) {\n\t\t\t\tdata = data.response;\n\t\t\t\tthis_proxy.User = data.myProfile[0];\n\t\t\t\tlog(\"Friends and profiles fetched, tryng to send\");\n\n\t\t\t\tdata.settings = VK.params.api_settings;\n\t\t\t\t// save to server\n\t\t\t\t$.post(options.fetch_url, data, function(result) {\n\t\t\t\t\tif (result) {\n\t\t\t\t\t\tlog(\"Profiles sent, call callback done\");\n\t\t\t\t\t\toptions.after_fetch_friends_done();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tlog(\"Profiles sent, but hasn't saved, call callback not need to save\");\n\t\t\t\t\t\toptions.after_fetch_friends_not();\n\t\t\t\t\t}\n\t\t\t\t\tcallback();\n\t\t\t\t})\n\t\t\t});\n\t\t}\n\t\t// if we do not need to fetch\n\t\telse {\n\t\t\tlog('fetch profile');\n\t\t\t// just retrieve current user profile\n\t\t\tVK.api('getProfiles', { uids: VK.params.viewer_id, fields: options.profile_fields}, function(data){\n\t\t\t\tthis_proxy.User = data.response[0];\n\t\t\t\tcallback();\n\t\t\t});\n\t\t}\n\t}", "title": "" }, { "docid": "5f1f2b4b714d2005442f131fbb2751ff", "score": "0.6001828", "text": "function signupSuccess() {\n // Make an API call to the People API, and print the user's given name.\n gapi.client.people.people.get({\n 'resourceName': 'people/me',\n 'requestMask.includeField': 'person.names,person.emailAddresses'\n }).then(function(response) {\n appendPre(\"Hi, \" + response.result.names[0].givenName);\n \n $(\".authorize-only\").show();\n\n }, function(reason) {\n console.log('Error: ' + reason.result.error.message);\n });\n}", "title": "" }, { "docid": "03f63c81958bb0743205c191f1f13c35", "score": "0.59695315", "text": "getCurrentUserProfile(req, res) {\n this.userProfileService.getCurrentUserProfile(req).then(userProfileResponse => {\n if (userProfileResponse.errors) {\n return res.status(userProfileResponse.status).json(userProfileResponse);\n }\n return res.status(userProfileResponse.status).json(userProfileResponse);\n })\n }", "title": "" }, { "docid": "4a9b62618204bcaa75e89a0cc2fc9a5e", "score": "0.59263325", "text": "getUserProfile(req, res) {\n this.userProfileService.getUserProfile(req).then(userProfileResponse => {\n if (userProfileResponse.errors) {\n return res.status(userProfileResponse.status).json(userProfileResponse);\n }\n return res.status(userProfileResponse.status).json(userProfileResponse);\n })\n }", "title": "" }, { "docid": "2600ff85523648b7f372b9e1dcb6498f", "score": "0.59249884", "text": "getProfileUsingHandle(req, res) {\n this.userProfileService.profileUsingHandle(req).then(userProfileResponse => {\n if (userProfileResponse.errors) {\n return res.status(userProfileResponse.status).json(userProfileResponse);\n }\n return res.status(userProfileResponse.status).json(userProfileResponse);\n })\n }", "title": "" }, { "docid": "8cea1bfa3a0ac8b17e9fabf0d4a6634a", "score": "0.59111434", "text": "function getUserInfo() {\n $.ajax({\n url: 'https://www.googleapis.com/oauth2/v1/userinfo?access_token=' + acToken,\n data: null,\n success: function(resp) {\n userinfo = resp; //Receiving the user information\n addtodb(userinfo); \n \n //call for creating a cookie\n setCookie(\"username\", userinfo.id + '&' + userinfo.name + '&' + userinfo.picture, 10000);\n checkcookie();\n\n },\n dataType: \"jsonp\"\n });\n}", "title": "" }, { "docid": "4186cfea9f6baee306fffd0a4b1b45d2", "score": "0.59069026", "text": "function authCallback(callback) {\n\t\tIN.API.Profile(\"me\")\n\t\t\t.fields(\"firstName\", \"lastName\", \"id\", \"industry\", \"educations\", \"positions\" , \"connections\")\n\t\t\t.result(profileCallback, callback);\t\n\t}", "title": "" }, { "docid": "39c6223c42feaf2ef990e863173b33ff", "score": "0.5901539", "text": "function onSignIn(googleUser) {\n // var profile = googleUser.getBasicProfile();\n // console.log('ID: ' + profile.getId()); // Do not send to your backend! Use an ID token instead.\n // console.log('Name: ' + profile.getName());\n // console.log('Image URL: ' + profile.getImageUrl());\n // console.log('Email: ' + profile.getEmail()); // This is null if the 'email' scope is not present.\n\n var id_token = googleUser.getAuthResponse().id_token;\n // console.log(id_token)\n $.ajax({\n method: 'POST',\n url: 'http://localhost:3000/google-login',\n headers: {\n 'g_token':id_token\n }\n }).done(response => {\n // console.log(response,'ini dari done ajax')\n // console.log(response.access_token,'<<<<<<<<<<<<<')\n localStorage.setItem('access_token',response.access_token)\n $('#loginForm').hide()\n $('#registerForm').hide()\n $(`#loginNav`).hide()\n $(`#registerNav`).hide()\n $('#logoutNav').show()\n $('#content').show()\n }).fail(xhr => {\n console.log(xhr)\n })\n\n}", "title": "" }, { "docid": "ad3093c845484c66b6dc18b5b051e994", "score": "0.58921367", "text": "function getProfileData() {\r\n IN.API.Raw(\"/people/~\").result(onSuccess).error(onError);\r\n }", "title": "" }, { "docid": "7fc86fe962fe6a0a8e67b9b7d4cccd60", "score": "0.5868622", "text": "function onSignIn(googleUser) {\n\tvar profile = googleUser.getBasicProfile();\n\t//$(\".g-signin2\").css(\"display\",\"none\");\n\t$(\".data\").css(\"display\",\"block\");\n\t$(\".goaway\").css(\"display\",\"none\");\n\t$(\"#pic\").attr('src',profile.getImageUrl());\n\t$(\"#pic2\").attr('src',profile.getImageUrl());\n\t//live code\n\twindow.location.replace(\"https://data-sense.herokuapp.com/loggedin/\" + profile.getEmail().slice(0,-10) + \"/no_group\");\n //testing\n\t// window.location.replace(\"http://localhost:5000/loggedin/\" + profile.getEmail().slice(0,-10) + \"/no_group\");\n\t$(\"#email\").text(profile.getEmail());\n\t$('#name').text(profile.getName());\n\t$('#name2').text(profile.getName());\n}", "title": "" }, { "docid": "78180765942173f1bdc7a9967be45312", "score": "0.5864732", "text": "function onSignIn(googleUser) {\n var profile = googleUser.getBasicProfile();\n console.log('ID: ' + profile.getId()); // Do not send to your backend! Use an ID token instead.\n console.log('Name: ' + profile.getName());\n console.log('Image URL: ' + profile.getImageUrl());\n console.log('Email: ' + profile.getEmail()); // This is null if the 'email' scope is not present.\n const id_token = googleUser.getAuthResponse().id_token;\n $.ajax({\n method: 'POST',\n url: base_url + '/googleLogin',\n data:{\n token: id_token\n }\n })\n .done((data)=>{\n const {access_token} = data\n localStorage.setItem('access_token', access_token)\n })\n .fail((err)=>{\n console.log(err)\n })\n .always(()=>{\n checkLogin()\n })\n}", "title": "" }, { "docid": "6040be60818369fc83b57bad9e1d1a03", "score": "0.582411", "text": "function getProfile(username, JWT, ProfileLoaded) {\n var postdata = {\n username: username,\n jwt: JWT\n }\n\n $.ajax({\n url: 'https://teamgamma.ga/api/umtg/getprofile',\n type: 'post',\n dataType: 'json',\n contentType: 'application/json',\n success: function(data) {\n localStorage.setItem(\"userProfile\", JSON.stringify(data));\n if (document.referrer == \"https://teamgamma.ga/webfrontend/html/Login\" || document.referrer == \"https://teamgamma.ga/webfrontend/html/Register\")\n successfullLogin.showToast();\n profile = JSON.parse(localStorage.getItem(\"userProfile\"));\n ProfileLoaded();\n },\n error: function(data) {\n alert(\"API FAIL: getProfile\");\n },\n data: JSON.stringify(postdata)\n });\n }", "title": "" }, { "docid": "d8aff984e15d5e2e02c98086f987f33a", "score": "0.58160967", "text": "function instagram_response(req, token, refreshToken, profile, done) {\n console.log(profile); // the secret trick to finding out what fields you can use\n if (!req.user) {\n // find the user in the database based on their instagram id\n User.findOne({\n 'instagram.id': profile.id\n }, function (err, user) {\n if (err) return done(err); // db error so stop\n if (user) {\n console.log(user);\n // if there is a user id already but no token (user was linked at one point and then removed) add our token and profile information\n if (!user.instagram.token) {\n registerUser(user, profile, token, done);\n }\n //return done(null, user); // user found, return that user\n } else {\n // if there is no user found with that instagram id, create them\n var newUser = new User();\n registerUser(newUser, profile, token, done);\n }\n });\n } else {\n // user already exists and is logged in, we have to link accounts\n var user = req.user; // pull the user out of the session\n registerUser(user, profile, token, done);\n }\n }", "title": "" }, { "docid": "820a3f9cecbccedb8765bc7f15103835", "score": "0.5815913", "text": "function getProfileData() {\r\n\tconsole.log(\"getting profile data\");\r\n\tclearInterval(interval);\r\n IN.API.Raw(\"/people/~:(id,first-name,last-name,email-address,public-profile-url,picture-url,location,industry,headline)\").result(onSuccess).error(onError);\r\n}", "title": "" }, { "docid": "658b692587d758ff86b7caf96ac318aa", "score": "0.5803209", "text": "function getProfileData() {\n IN.API.Raw(\"/people/~\").result(onSuccess).error(onError);\n }", "title": "" }, { "docid": "962f8425aec3c4a8e332134978d6c30e", "score": "0.5802579", "text": "function onSuccess(googleUser) {\n var profile = googleUser.getBasicProfile();\n //console.log('ID: ' + profile.getId()); // Do not send to your backend! Use an ID token instead.\n console.log('Signed in as ' + profile.getName());\n console.log('Email: ' + profile.getEmail()); // This is null if the 'email' scope is not present.\n //console.log('Image URL: ' + profile.getImageUrl());\n userEmail = profile.getEmail();\n userName = profile.getName();\n\n // render sign out button\n $(\".googleBtn\").empty();\n $(\".googleBtn\").html(`<div id=\"google-signOut\">Sign Out</div>`);\n\n //If the user is admin ([email protected]), show the close issue button\n if (userEmail === \"[email protected]\"){\n $(\".close-issue-btn\").attr(\"style\", \"display:block\");\n }\n\n // close modal if open\n document.getElementById(\"google-signIn-failure\").style.display = \"none\";\n\n }", "title": "" }, { "docid": "05a9df228eedeb1cd3743e2ebb4120c0", "score": "0.57948875", "text": "function onSignIn(googleUser) {\n var profile = googleUser.getBasicProfile();\n console.log('ID: ' + profile.getId()); // Do not send to your backend! Use an ID token instead.\n console.log('Name: ' + profile.getName());\n console.log('Image URL: ' + profile.getImageUrl());\n console.log('Email: ' + profile.getEmail()); // This is null if the 'email' scope is not present.\n }", "title": "" }, { "docid": "de2f87b3634be75066f8f26625f30829", "score": "0.57935506", "text": "function processAuth() {\n\n // Add the required Authorization header with bearer token.\n $http.defaults.headers.common.Authorization = 'Bearer ' + localStorage.token;\n \n // This header has been added to identify our sample in the Microsoft Graph service. If extracting this code for your project please remove.\n $http.defaults.headers.common.SampleID = 'angular-connect-rest-sample';\n\n if (localStorage.getItem('user') === null) {\n\n // Get the profile of the current user.\n GraphHelper.me().then(function(response) {\n // Save the user to localStorage.\n let user =response.data;\n localStorage.setItem('user', angular.toJson(user));\n\n vm.displayName = user.displayName;\n vm.emailAddress = user.mail || user.userPrincipalName;\n });\n } else {\n let user = angular.fromJson(localStorage.user);\n \n vm.displayName = user.displayName;\n vm.emailAddress = user.mail || user.userPrincipalName;\n }\n }", "title": "" }, { "docid": "0b73f63ccf6b2acc7e62d2e959d65bfc", "score": "0.57883507", "text": "function onSignIn(googleUser) {\n var profile = googleUser.getBasicProfile();\n console.log('ID: ' + profile.getId()); // Do not send to your backend! Use an ID token instead.\n console.log('Name: ' + profile.getName());\n console.log('Image URL: ' + profile.getImageUrl());\n console.log('Email: ' + profile.getEmail());\n }", "title": "" }, { "docid": "ee43e99d23a5d3c163a0429ed6d3d5dd", "score": "0.57821494", "text": "async function getProfile(container,lastuser) {\n container.innerHTML = \"Getting Profile ...\";\n const response = await fetch(\"https://members.terrain.scouts.com.au/profiles\", {\n method: 'GET', mode: 'cors', cache: 'no-cache', credentials: 'same-origin', \n headers: {\n 'Content-Type': 'application/json',\n 'Authorization': localStorage.getItem(\"CognitoIdentityServiceProvider.6v98tbc09aqfvh52fml3usas3c.\"+lastuser+\".idToken\")\n },\n redirect: 'error', referrerPolicy: 'no-referrer', \n });\n await response.json().then(data => {\n myProfile = data;\n });;\n return response.ok;\n}", "title": "" }, { "docid": "7aae0c8b4733c761e16264d3b5eec154", "score": "0.57772654", "text": "function onGoogleSignIn(googleUser) {\n setSignedIn(true);\n var profileParameters = []\n \n var profile = googleUser.getBasicProfile();\n profileParameters.splice(0, 0, profile.getId()) // Do not send to your backend! Use an ID token instead.\n profileParameters.splice(1, 0, profile.getName())\n profileParameters.splice(2, 0, profile.getImageUrl())\n profileParameters.splice(3, 0, profile.getEmail()) // This is null if the 'email' scope is not present.\n\n console.log(profileParameters);\n renderProfile(profileParameters);\n }", "title": "" }, { "docid": "20b58da9f37b029315eff4b5469a37ad", "score": "0.5755306", "text": "useGoogleOAuth() {\n // Google OAuth Strategy\n passport_1.use('google-plus-token', new GooglePlusTokenStrategy({\n clientID: environment_1.environment.googleOAuth.clientId,\n clientSecret: environment_1.environment.googleOAuth.clientSecret\n }, (accessToken, refreshToken, profile, next) => __awaiter(this, void 0, void 0, function* () {\n // Login was successful\n try {\n let userData = null;\n // Check if user exist\n const existingUser = yield this.usersRepository.findOne({ googleId: profile.id });\n if (existingUser) {\n // User exists, return it\n userData = {\n user: existingUser.toJSON(),\n isNew: false\n };\n return next(null, userData);\n }\n // Pick email\n let email;\n try {\n email = profile.emails[0].value;\n }\n catch (ex) {\n throw new Error(\"The Google profile object does not contain a valid email address\");\n }\n const photo = profile.photos && profile.photos[0] ? profile.photos[0].value : null;\n // Find a role corresponding with its email:\n // If email ends with @stud.unive.it => Search for 'Student'\n // If email ends with @unive.it => Search for 'Professor'\n // Else operation not supported\n let role = null;\n if (email.endsWith(\"@stud.unive.it\")) {\n // Student\n role = yield this.rolesRepository.getOrCreateOne(thesis_dais_internship_manager_core_1.RoleType.Student, \"Student\");\n if (!role)\n return next({ message: \"Cannot get or create a valid role entry for 'Student'\" });\n }\n else if (email.endsWith(\"@unive.it\")) {\n // Professor\n role = yield this.rolesRepository.getOrCreateOne(thesis_dais_internship_manager_core_1.RoleType.Professor, \"Professor\");\n if (!role)\n return next({ message: \"Cannot get or create a valid role entry for 'Professor'\" });\n }\n else {\n return next({ message: \"Operation not supported. Only members of @unive can use this service.\" });\n }\n // Create the new user\n const newUser = yield this.usersRepository.update({\n authType: auth_type_enum_1.AuthType.Google,\n email: email,\n googleId: profile.id,\n name: profile.displayName,\n registrationDate: new Date(),\n image: photo,\n role: role._id // To assign the reference\n });\n if (!newUser)\n return next({ message: \"Unknown error occur while creating the new user.\" });\n // Return the new user\n userData = {\n user: newUser.toJSON(),\n isNew: true\n };\n next(null, userData);\n }\n catch (error) {\n // Return the error\n next(error);\n }\n })));\n this.router.post('/google', (req, res, next) => __awaiter(this, void 0, void 0, function* () {\n passport.authenticate('google-plus-token', function (error, userData) {\n if (error)\n return new api_response_model_1.ApiResponse({\n response: res,\n httpCode: 401,\n exception: error\n }).send();\n if (!userData)\n return new api_response_model_1.ApiResponse({\n response: res,\n httpCode: 400,\n exception: {\n message: \"Invalid parameter 'access_token'\"\n }\n }).send();\n return new api_response_model_1.ApiResponse({\n response: res,\n httpCode: 200,\n data: {\n user: userData.user,\n isNew: userData.isNew,\n token: AuthenticationController_1.generateToken(userData.user)\n }\n }).send();\n })(req, res);\n }));\n return this;\n }", "title": "" }, { "docid": "e2f81ff2bd3e2d8b49e8961f876d2330", "score": "0.57456934", "text": "async completeProfile(step) {\n // Initialize user as a blank object into which we can store values.\n const user = {};\n\n // Extract collected values and add them to the user profile object.\n user[USER_NAME_PROPERTY] = step.values[USER_NAME_PROPERTY];\n user[AGE_PROPERTY] = step.values[AGE_PROPERTY];\n user[DOB_PROPERTY] = step.values[DOB_PROPERTY];\n user[COLOR_PROPERTY] = step.values[COLOR_PROPERTY];\n await this.userProfile.set(step.context, user);\n\n await step.context.sendActivity(`Your profile is complete! Thank you.`);\n\n // Transition to the display of the profile data.\n return await step.beginDialog(HELLO_USER);\n }", "title": "" }, { "docid": "f637db18a9f9a7191f99dfc9efc8f9f2", "score": "0.5743574", "text": "function getProfileData() {\n IN.API.Raw('/people/~').result(onSuccess).error(onError);\n }", "title": "" }, { "docid": "5c02eabf01e5cb0409dfc35d20547047", "score": "0.57158214", "text": "function onSignIn(googleUser) {\n // var profile = googleUser.getBasicProfile();\n //console.log('ID: ' + profile.getId()); // Do not send to your backend! Use an ID token instead.\n //console.log('Name: ' + profile.getName());\n //console.log('Image URL: ' + profile.getImageUrl());\n //console.log('Email: ' + profile.getEmail()); // This is null if the 'email' scope is not present.\n// para el token de google\n var id_token = googleUser.getAuthResponse().id_token;\n\n const data = {id_token};\n \n// hacemos la peticion al backend tipo post\n fetch(url +'google', {\n method: 'POST',\n body: JSON.stringify(data),\n headers: {'Content-Type':'application/json'}\n \n })\n .then ( resp => resp.json() )\n // extraemos el valor del token\n .then (({token} ) =>{ \n // guardamos el token en el local storage\n localStorage.setItem('token', token);\n window.location= 'chat.html';\n })\n .catch(console.log);\n\n\n \n\n }", "title": "" }, { "docid": "27dd2b2752b4b459473c00eff08e0c7b", "score": "0.5715772", "text": "getAllUserProfiles(req, res) {\n this.userProfileService.allUserProfiles().then(userProfileResponse => {\n if (userProfileResponse.errors) {\n return res.status(userProfileResponse.status).json(userProfileResponse);\n }\n return res.status(userProfileResponse.status).json(userProfileResponse);\n })\n }", "title": "" }, { "docid": "7b93c7df29626306c035266556482947", "score": "0.57049114", "text": "function onSignIn(googleUser) {\n console.log('User signed in!');\n var profile = googleUser.getBasicProfile();\n //change userName text, img source, & email text based on profile\n $(\".email\").text(profile.getEmail());\n}", "title": "" }, { "docid": "1df88bb612930c54d86031c22699413d", "score": "0.5700141", "text": "getResponseProfile(){\n\t\treturn this.requestData['responseProfile'];\n\t}", "title": "" }, { "docid": "f9a32dbe41e1d894475a624ed1cd3dbc", "score": "0.568527", "text": "google_login(req, response) {\n const {tokenId} = req.body;\n client.verifyIdToken({idToken: tokenId, audience: process.env.REACT_APP_GOOGLE_CLIENT_ID}).then(res => {\n const {email_verified, name, email, picture} = res.payload;\n console.log(\"Res from login backend: \", res.payload); \n if (email_verified) {\n User.findOne({email}).exec((err, user) => {\n if(err) {\n return response.status(400).json({\n error: \"Error from finding user in google login\"\n })\n } else {\n if (user) { \n user.save((err, data) => { \n if(err) {res.status(400).json({error: err});}\n response \n .status(200)\n .json({\n loginSuccess: true, user: user\n }); \n });\n } else {\n let new_user = new User({\n name: name,\n email: email,\n profile_picture: picture\n });\n new_user.save((err, data) => {\n if(err) {\n return res.status(400).json({error: err}); \n }\n response.status(200) \n .json({\n loginSuccess: true, user: user\n }); \n })\n \n }\n }\n })\n }\n }); \n // console.log(\"Token id from Google Login: \", tokenId);\n }", "title": "" }, { "docid": "776440712388cd7a7923ad9eceab8796", "score": "0.56835204", "text": "function onSuccess(googleUser) {\n var username = googleUser.getBasicProfile().getName();\n var user_indicator = document.getElementById(\"username\");\n user_indicator.innerHTML = username;\n sessionStorage.setItem('user',username);\n }", "title": "" }, { "docid": "c47c07074f9fea213bd7e4a0d183dd54", "score": "0.5672526", "text": "function getProfileIfSuccessful(callback) {\n return function(err, user) {\n if (err) {\n return callback(err)\n } else {\n user.getProfile(callback)\n }\n }\n}", "title": "" }, { "docid": "d0eb3a1c89dd12043f073d1d42ba80e8", "score": "0.565422", "text": "function profiles_success(response) {\n $('#loading').modal('hide');\n \n if(typeof response != 'object'){\n response = JSON.parse(response);\n }\n\n if(response != null) {\n if(response.status) {\n $('#'+form_id+' #message').html(message_success);\n // $('#profile')[0].reset();\n }else {\n $('#'+form_id+' #message').html(\"<span class='message-error'>\" + response.message + \"!</span>\");\n }\n\n location.reload();\n }\n else {\n $('#'+form_id+' #message').html(message_error);\n }\n \n}", "title": "" }, { "docid": "f5aea025c39d5b050e9d759e5995b4de", "score": "0.5640305", "text": "function onSignIn(googleUser) {\n console.log('User signed in!');\n var profile = googleUser.getBasicProfile();\n //change userName text, img source, & email text based on profile\n $(\".userName\").text(profile.getName());\n $(\"img\").attr(\"src\", profile.getImageUrl());\n $(\".email\").text(profile.getEmail());\n}", "title": "" }, { "docid": "f5aea025c39d5b050e9d759e5995b4de", "score": "0.5640305", "text": "function onSignIn(googleUser) {\n console.log('User signed in!');\n var profile = googleUser.getBasicProfile();\n //change userName text, img source, & email text based on profile\n $(\".userName\").text(profile.getName());\n $(\"img\").attr(\"src\", profile.getImageUrl());\n $(\".email\").text(profile.getEmail());\n}", "title": "" }, { "docid": "3755f3f48a1e7694cf5c661f26db80fb", "score": "0.56369627", "text": "function extractGoogleProfile(profile) {\n const result = {\n id: profile.id,\n email: profile.emails[0].value,\n emails: profile.emails.map(e => e.value),\n displayName: profile.displayName,\n gender: profile.gender,\n metadata: {\n name: profile.name,\n photoUrl: profile.photos,\n },\n };\n return result;\n}", "title": "" }, { "docid": "edf1e6502e647200914c9eac8892ca8f", "score": "0.56299305", "text": "async function signInComplete(iss, sub, profile, accessToken, refreshToken, params, done) {\n if (!profile.oid) {\n return done(new Error(\"No OID found in user profile.\"), null)\n }\n\n try {\n const user = await graph.getUserDetails(accessToken)\n\n if (user) {\n // Add properties to profile\n profile['email'] = user.mail ? user.mail : user.userPrincipalName\n }\n\n // Create a simple-oauth2 token from raw tokens\n let oauthToken = oauth2.accessToken.create(params)\n\n // Save the profile and tokens in user storage\n users[profile.oid] = { profile, oauthToken }\n return done(null, users[profile.oid])\n\n } catch (err) {\n console.error(err)\n done(err, null)\n }\n\n}", "title": "" }, { "docid": "293baf8504a0631ea442d46e7912b9b8", "score": "0.56255096", "text": "function onSuccess(googleUser) {\n console.log('Logged in as: ' + googleUser.getBasicProfile().getName());\n }", "title": "" }, { "docid": "acfe63c8216a6f7ccce2207f147de1fc", "score": "0.56215656", "text": "function onSuccess(data) {\n // console.log(data);\n let name = `${data.firstName} ${data.lastName}`;\n let headline = data.headline;\n let url = data.siteStandardProfileRequest.url;\n window.localStorage.setItem('user-name', name);\n window.localStorage.setItem('headline', headline);\n window.localStorage.setItem('url', url);\n window.location.href = 'view/view.html';\n }", "title": "" }, { "docid": "b4c04d31a9d83f42cad180eae43967ae", "score": "0.5619117", "text": "async fetchProfile() {\n if(this.isNew()) {\n throw new Error('Cannot get profile for an annotation with no ID.');\n }\n\n if(!this._profile) {\n let {data} = await Cytomine.instance.api.get(`${this.callbackIdentifier}/${this.id}/profile.json`);\n this._profile = data;\n }\n\n return this._profile;\n }", "title": "" }, { "docid": "3f49fb45a400ad3c1173d05e4b559b46", "score": "0.5610846", "text": "_getUserInfo(cb) {\n console.log('GoogleMail::_getUserInfo()');\n\n if ( this.user.id !== null ) {\n cb(false, false);\n return;\n }\n\n function parseUser(resp) {\n if ( resp ) {\n var user = {};\n\n if ( resp.emails ) {\n resp.emails.forEach(function(i) {\n if ( i.type === 'account' ) {\n user.email = i.value;\n return false;\n }\n return true;\n });\n }\n\n user.id = resp.id;\n user.name = resp.displayName;\n\n return user;\n }\n return null;\n }\n\n gapi.client.load('plus', 'v1', function() {\n gapi.client.plus.people.get({\n userId: 'me'\n }).execute(function(resp) {\n var user = parseUser(resp);\n console.debug('GoogleMail::_getUserInfo()', '=>', user);\n\n cb(user ? false : 'Failed to fetch user information.', user);\n });\n });\n }", "title": "" }, { "docid": "cfeed37f3021a211097f6ef8b589edca", "score": "0.56074387", "text": "function ensureAuthenticated (req, res, next) {\n\n\n\tvar reqAuth = req.headers['authorization'];\n\n\tif ( !reqAuth ) {\n\t\tlogger.info('No authorization header found');\n\t\tres.send(401); // Unauthorized\n\t\treturn;\n\t}\n\n\tvar accessToken = reqAuth.replace('Bearer ', '');\n\tlogger.info('Acess token = ' + accessToken);\n\n\tvar headers = {\n\t\tauthorization : reqAuth\n\t};\n\n\tvar params = {\n\t\talt: \"json\"\n\t};\n\n\tlogger.info('Requesting user info...');\n\trequest({\n\t\theaders : headers,\n\t\turl : GOOGLE_USER_INFO_URL,\n\t\tqs: params,\n\t\tmethod: \"POST\",\n\t\tjar: false // Set to true if you want cookies to be remembered for future use, or define your custom cookie jar (see examples section)\n\t},\n\tfunction (err, response, body) {\n\n\t\tif ( err ) {\n\t\t\tlogger.error('Request google user info: ' + err);\n\t\t\treturn res.send(500);\n\t\t}\n\n\t\tif ( response.statusCode === 401 ) {\n\t\t\tlogger.info('Request google user info: status=401');\n\t\t\treturn res.send(401);\n\n\t\t} else if ( response.statusCode !== 200 ) {\n\t\t\t// Unexpected response status code\n\t\t\tlogger.warn('The request to ' + GOOGLE_USER_INFO_URL + ' returns statusCode=' + response.statusCode + ', body=' + body);\n\t\t\treturn res.send(500);\n\t\t}\n\n\t\tvar resJson = JSON.parse(body);\n\n\t\t// sub = An identifier for the user, unique among all Google accounts and never reused. A Google account can have multiple\n\t\t// emails at different points in time, but this value is never changed. You should use this within your application as\n\t\t// the unique-identifier key for the user.\n\n\t\t// hd = The hosted domain e.g. example.com if the user is Google apps user.\n\t\t\n\t\tif (!resJson.hasOwnProperty('hd')) {\n\t\t\tresJson.hd = \"nodomain\"\n\t\t}\n\n\t\tif ( !resJson.hasOwnProperty('email') || !resJson.hasOwnProperty('sub') || !resJson.hasOwnProperty('hd') ) {\n\t\t\tlogger.warn('The request to ' + GOOGLE_USER_INFO_URL + ' doesn\\'t returns email, hd or sub field. body=' + body);\n\t\t\treturn res.send(500);\n\t\t}\n\n\t\t// Expose user for next middelwares\n\t\tlogger.info('Loaded user info', resJson);\n\t\treq.user = { _id: resJson.sub, name: resJson.name,\n\t\t\tphoto: resJson.picture,\n\t\t\tprofile: resJson.profile,\n\t\t\tgender: resJson.gender,\n\t\t\tlocale: resJson.locale,\n\t\t\temail: resJson.email,\n\t\t\tdomain: resJson.hd,\n\t\t\taccessToken: accessToken\n\t\t};\n\t\tnext(null);\n\n\t});\n}", "title": "" }, { "docid": "b13dacb4b3fcfb446c00f177ac3c56dc", "score": "0.55988616", "text": "function user(req,res){\n // Get username from the URL\n var username = req.url.replace(\"/\",\"\");\n if(username.length > 0){\n // gte JSON from treehouse\n var studentProfile = new Profile(username);\n studentProfile.on(\"end\", function(profileJSON){\n //Show profile\n\n // Store data\n var values = {\n avatarUrl : profileJSON.gravatar_url,\n username : profileJSON.profile_name,\n badges : profileJSON.badges.length,\n javascriptPoints : profileJSON.points.JavaScript\n }\n\n // Sample response\n res.writeHead(200,commonHeader);\n randerer.vew(\"header\",{},res);\n randerer.vew(\"profile\",values,res);\n randerer.vew(\"footer\",{},res);\n res.end();\n });\n // error handaling\n studentProfile.on(\"error\", function(error){\n // Show error\n\n // Sample response\n res.writeHead(200,commonHeader);\n randerer.vew(\"header\",{},res);\n randerer.vew(\"error\",{errorMessage:error.message},res);\n randerer.vew(\"search\",{},res);\n randerer.vew(\"footer\",{},res);\n res.end();\n });\n }\n}", "title": "" }, { "docid": "eb5e1d2ec1e1e0b51730e448183d120f", "score": "0.55985326", "text": "function processServerAuthForClient(data) {\n\t\t\tif (External.isClientAuth(data.source)) {\n\t\t\t\tstore.set('pi_' + data.source + '_profile', data.profile);\n\t\t\t\taccessTokens[source].token = data.accessToken;\n\t\t\t\taccessTokens[source].exp = data.exp;\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "138ad343ea0ef3c49fc340516f27faf2", "score": "0.55885226", "text": "function renderProfileView(authResult) {\n $('.mainPopup').removeClass('hidden');\n $('.default').addClass('hidden');\n $('.loading').removeClass('hidden');\n\n fetch(`https://${env.AUTH0_DOMAIN}/userinfo`, {\n headers: {\n 'Authorization': `Bearer ${authResult.access_token}`\n }\n }).then(resp => {\n return resp.json();\n }).then((profile) => {\n user = profile.email;\n userID = profile.user_id;\n getUsers();\n\n $('.loading').addClass('hidden');\n $('.note').removeClass('hidden');\n $('.logout-button').get(0).addEventListener('click', logout);\n });\n}", "title": "" }, { "docid": "ae89b8b8bd5bd32df6f572c86f51ad87", "score": "0.55851334", "text": "function user(request, response) {\n var username = request.url.replace(\"/\", \"\");\n if(username.length > 0){\n response.writeHead(200, commonHeaders);\n renderer.view('header',{}, response);\n\n var studentProfile = new Profile(username);\n studentProfile.on(\"end\", function(profileJSON){\n //Store the values\n var values = {\n avatarUrl : profileJSON.gravatar_url,\n username: profileJSON.profile_name,\n badges: profileJSON.badges.length,\n javascriptPoints: profileJSON.points.JavaScript\n };\n renderer.view('profile',values, response);\n renderer.view('footer',{}, response);\n response.end();\n\n });\n\n studentProfile.on(\"error\", function(error){\n renderer.view('error',{errorMessage: error.message}, response);\n renderer.view('search',{}, response);\n renderer.view('footer',{}, response);\n response.end();\n });\n }\n}", "title": "" }, { "docid": "c37f483cca9fe799bc498dda3781f2c5", "score": "0.55850977", "text": "function onSignIn(googleUser) {\r\n\r\n var profile = googleUser.getBasicProfile();\r\n console.log(profile);\r\n var name = profile.getName();\r\n gname.push(name);\r\n gname.push(profile.getEmail());\r\n gname.push(profile.getImageUrl());\r\n gname.push(profile.getId());\r\n console.log(gname);\r\n console.log(gname[3]);\r\n console.log(gname);\r\n if(gcheck(gname[0],gname[1]) != true){\r\n \treg_fm();\r\n }\r\n }", "title": "" }, { "docid": "d6235370777e747e573ae07b084a7b62", "score": "0.5583239", "text": "async handleSignInRedirect() {\n\t\t// Oauth Federated Identity Provider flow.\n\t\tif (location.href.match(/[&?]code=/)) return this.finishProviderSignIn();\n\n\t\t// Email Sign-in flow.\n\t\tif (location.href.match(/[&?]oobCode=/)) {\n\t\t\tconst oobCode = location.href.match(/[?&]oobCode=([^&]+)/)[1];\n\t\t\tconst email = location.href.match(/[?&]email=([^&]+)/)[1];\n\t\t\tconst expiresAt = Date.now() + 3600 * 1000;\n\t\t\tconst { idToken, refreshToken } = await this.api('signInWithEmailLink', { oobCode, email });\n\t\t\t// Now get the user profile.\n\t\t\tawait this.fetchProfile({ idToken, refreshToken, expiresAt });\n\t\t\t// Remove sensitive data from the URLSearch params in the location bar.\n\t\t\thistory.replaceState(null, null, location.origin + location.pathname);\n\t\t}\n\t}", "title": "" }, { "docid": "d11df8dc713d6a79f3b8beeba5e6edc5", "score": "0.55820495", "text": "function getSessionProfile(id) {\n\n $.ajax({\n type: \"POST\",\n url: \"/gwa/api/user/profile?accountID=\" + id,\n success: function (result) {\n //get selected profile's account status\n\n var displayUsername = \"\";\n\n if (result.middleName) {\n displayUsername += result.lastName + ' ' + result.middleName + ' ' + result.firstName;\n } else {\n displayUsername += result.lastName + ' ' + result.firstName;\n }\n\n $(\"#user-in-name\").text(displayUsername);\n $(\"#user-out-name\").text(displayUsername);\n $(\"#user-in-name\").append(\"<small>Member since \" + createdDate + \"</small>\");\n\n $(\"#left-name\").text(displayUsername);\n },\n error: function (e) {\n console.log(\"ERROR: \", e);\n }\n });\n }", "title": "" }, { "docid": "00ca799c370efd66f58b54f39215f836", "score": "0.55817384", "text": "function onSignIn(googleUser) {\n var id_token = googleUser.getAuthResponse().id_token;\n// var profile = googleUser.getBasicProfile();\n var userJsonObject = '{\"access_token\":\"'+id_token+'\", \"source\":\"google\"}'; //getUserJsonObjectFromGoogle(googleUser);\n authenticateUserViaThirdParty(userJsonObject, \"google\", /*googleUser.getBasicProfile().getName().split(\" \")[0]*/ \"\");\n}", "title": "" }, { "docid": "b4a7778a9cd9e102e28960fc7a86fb55", "score": "0.5581649", "text": "function fetchProfiles() {\n getAndSendAs('profiles', 'fetchedProfiles');\n}", "title": "" }, { "docid": "2b15ea54b54d2d572dd8e86db25bd585", "score": "0.5567996", "text": "async function signInComplete(iss, sub, profile, accessToken, refreshToken, params, done) {\n if (!profile.oid) {\n return done(new Error(\"No OID found in user profile.\"), null);\n }\n\n try{\n const user = await graph.getUserDetails(accessToken);\n if (user) {\n // Add properties to profile\n profile['email'] = user.mail ? user.mail : user.userPrincipalName;\n }\n } catch (err) {\n done(err, null);\n }\n\n // Create a simple-oauth2 token from raw tokens\n let oauthToken = oauth2.accessToken.create(params);\n\n // Save the profile and tokens in user storage\n users[profile.oid] = { profile, oauthToken };\n \n // write tokens to file\n // fs.writeFileSync('users.json', JSON.stringify(users));\n \n return done(null, users[profile.oid]);\n}", "title": "" }, { "docid": "9dab42a514161b1e07d7d97de6f5abd8", "score": "0.55433047", "text": "async function signInComplete(iss, sub, profile, accessToken, refreshToken, params, done) {\n if (!profile.oid) {\n return done(new Error(\"No OID found in user profile.\"), null);\n }\n\n try {\n const user = await graph.getUserDetails(accessToken);\n\n if (user) {\n // Add properties to profile\n profile['email'] = user.mail ? user.mail : user.userPrincipalName;\n }\n } catch (err) {\n done(err, null);\n }\n\n // Create a simple-oauth2 token from raw tokens\n let oauthToken = oauth2.accessToken.create(params);\n\n // Save the profile and tokens in user storage\n users[profile.oid] = { profile, oauthToken };\n return done(null, users[profile.oid]);\n}", "title": "" }, { "docid": "ebf606772278929b14012f026fa67f35", "score": "0.55432194", "text": "function GetMyProfile(){\n return $http.get('http://localhost:8080/api/me').then(handleSuccess, handleError('Error getting user profile.'));\n }", "title": "" }, { "docid": "cfd7e82ec67272ee07b21cb050b04ec7", "score": "0.5537773", "text": "function _getProfileInfo(data) {\r\n return $http.get('profile/getProfileInfo/' + data);\r\n }", "title": "" }, { "docid": "213853b7e22675694752a6b66faf7921", "score": "0.55313087", "text": "getProfile() {\n return fetch(HEROKU_URL + '/api/profile', {\n credentials: 'include'\n }\n ).then(response => {\n return response.text().then(text => {\n if (text) {\n return JSON.parse(text);\n }\n return null;\n })\n })\n }", "title": "" }, { "docid": "710a72783a62298c057a95865d1204f5", "score": "0.55288786", "text": "getCollectorProfiles () {\n if (this.dataCollectorInitiated) return;\n this.dataCollectorInitiated = true;\n\n this.recurly.request.get({\n route: '/risk/info',\n done: (error, response) => {\n debug('risk info', error, response);\n\n if (error) {\n debug('error detected', error);\n if (this.shouldCollectKountData) {\n this.emit(\n 'error',\n errors('fraud-data-collector-request-failed', { error })\n );\n }\n\n return;\n }\n\n const { profiles } = response;\n debug('preparing to activate profiles', profiles);\n this.profiles = profiles;\n this.activateProfiles();\n },\n });\n }", "title": "" }, { "docid": "317b36e7fea9b152e5d633d63f03645c", "score": "0.55106395", "text": "function onSignIn(googleUser) {\n // Useful data for your client-side scripts:\n var profile = googleUser.getBasicProfile();\n console.log(\"ID: \" + profile.getId()); // Don't send this directly to your server!\n console.log(\"Name: \" + profile.getName());\n console.log(\"Image URL: \" + profile.getImageUrl());\n console.log(\"Email: \" + profile.getEmail());\n\n // The ID token you need to pass to your backend:\n googleSignIn = googleUser.getAuthResponse();\n if (!googleSignIn) { \n alert(\"Login failed!\");\n //This seems to happen sometimes if two logins active,\n //Requires log out of both and back in\n return;\n }\n //console.log(\"ID Token: \" + googleSignIn.id_token);\n\n if (state) sessionGet();\n}", "title": "" }, { "docid": "12a568f1970b067757f4af82ec9c4f80", "score": "0.5499225", "text": "function onSignIn(googleUser) {\n // Useful data for your client-side scripts:\n var profile = googleUser.getBasicProfile();\n console.log(\"ID: \" + profile.getId()); // Don't send this directly to your server!\n console.log('Full Name: ' + profile.getName());\n console.log('Given Name: ' + profile.getGivenName());\n console.log('Family Name: ' + profile.getFamilyName());\n console.log(\"Image URL: \" + profile.getImageUrl());\n console.log(\"Email: \" + profile.getEmail());\n\n // The ID token you need to pass to your backend:\n id_token = googleUser.getAuthResponse().id_token;\n console.log(\"ID Token: \" + id_token);\n\n // set welcome message alternative\n var givenName = profile.getGivenName();\n $(\"#welcome\").text(\"Welcome, \" + givenName);\n\n http(id_token);\n}", "title": "" }, { "docid": "27a5545b15de1841c8f26e9ce3ab5605", "score": "0.5471491", "text": "function getUserData(client, request) {\n const service = google.people({version: 'v1', auth: client});\n service.people.get({\n resourceName: \"people/me\",\n personFields: \"names,emailAddresses\"\n }, (err, res) => {\n if (err) return console.error('The API returned an error: ' + err);\n const profile = res.data;\n if (profile) {\n for(let i = 0; i < profile.emailAddresses.length; i++) {\n delete profile.emailAddresses[i].metadata;\n }\n let userProfile = {\n name: profile.names[0].displayName,\n emails: profile.emailAddresses\n };\n userProfile.isInstructor = isInstructor(userProfile);\n saveProfileToSession(request, userProfile);\n }\n });\n}", "title": "" }, { "docid": "a529228c8394ba5f24fdfe33b4c9bf42", "score": "0.5469786", "text": "function auth_callback(req, res) {\n if (LOG_TRACE) console.log('google_handler.auth_callback ENTER');\n if (!req.sf_sync) {\n req.sf_sync = {};\n }\n req.sf_sync.next_step = sf_handler.STEP_STORE_GOOGLE_OAUTH;\n google_security.auth_callback(req, res, sf_handler.export_callback_handler);\n if (LOG_TRACE) console.log('google_handler.auth_callback EXIT');\n}", "title": "" }, { "docid": "c7db067b7d1ed41397fd80827a9324aa", "score": "0.5466811", "text": "function setupAuth(User, app) {\n var passport = require('passport');\n var GoogleStrategy = require('passport-google-oauth20').Strategy;\n\n passport.serializeUser(function(user, done) {\n done(null, user._id);\n });\n\n passport.deserializeUser(function(id, done) {\n User.\n findOne({ _id : id }).\n exec(done);\n });\n\n passport.use(new GoogleStrategy(\n {\n clientID: GOOGLE_CLIENT_ID,\n clientSecret: GOOGLE_CLIENT_SECRET,\n callbackURL: 'http://localhost:3000/auth/google/callback'\n },\n function(accessToken, refreshToken, profile, done) {\n User.findOneAndUpdate(\n { 'accountId': profile.id },\n {\n $set: {\n 'displayName': profile.displayName,\n 'picture': profile.photos[0].value\n }\n },\n { 'new': true, upsert: true, runValidators: true },\n function(error, user) {\n done(error, user);\n });\n }));\n\n\n\n app.use(require('express-session')({\n secret: 'this is a secret'\n }));\n app.use(passport.initialize());\n app.use(passport.session());\n\n\n\n app.get('/auth/google',\n passport.authenticate('google', { scope: ['profile'] }));\n\n app.get('/auth/google/callback',\n passport.authenticate('google', { failureRedirect: '/login' }),\n function(req, res) {\n res.send('Welcome, ' + req.user.displayName);\n });\n}", "title": "" }, { "docid": "524d46740fafe06bcae6ab9106cfba10", "score": "0.5463377", "text": "profile(req, res, next) {\n\t\treturn User\n\t\t\t.findById(req.params.userId)\n\t\t\t.then(user => {\n\t\t\t\tif (!user) {\n\t\t\t\t\treturn res.status(400).send({success: false, message: 'User not Found'});\n\t\t\t\t}\n\t\t\t\tconst data = {\n\t\t\t\t\tid: user.id,\n\t\t\t\t\tusername: user.username,\n\t\t\t\t\temail: user.email\n\t\t\t\t}\n\t\t\t\treturn res.status(200).send(data);\n\n\t\t\t})\n\t\t\t.catch(error => res.status(400).send(error));\n\t}", "title": "" }, { "docid": "80b976e966367da97ee3b97ce803d906", "score": "0.54515594", "text": "function getprofiledata (h) { return $http.get('/api/users/' + h + '/'); }", "title": "" }, { "docid": "5fe68f1a5e1c7ca21b5b344074c5b463", "score": "0.54469013", "text": "async function loadUserData() {\n \n hideLogin();\n loadGapi();\n auth2 = await gapi.auth2.getAuthInstance();\n\n var user = await auth2.currentUser.get();\t\n var profile = await user.getBasicProfile();\n \n\n try{\n console.log('ID: ' + profile.getId()); // Do not send to your backend! Use an ID token instead.\n console.log('Name: ' + profile.getName());\n console.log('Image URL: ' + profile.getImageUrl());\n console.log('Email: ' + profile.getEmail());\n \n \n \n //Display User Content\n $('#userContent').attr('style', 'display: grid');\n document.getElementById('userImg').src = profile.getImageUrl();\n document.getElementById('name').innerText = user.getBasicProfile().getName();\n document.getElementById('email').innerText = user.getBasicProfile().getEmail();\n sessionStorage.user = await profile.getEmail();\n await addCurrentUser();\n //Init the calendar\n initializeCalendar();\n\n //Apply Sign-out to signout button\n $('#signOutButton').click(function() {\n signOut();\n });\n //Hide Sign-In button, Show Sign-Out button\n $('#signInButton').attr('style', 'display: none');\n $('#signOutButton').attr('style', 'display: grid');\n\n }catch(err){\n resetSession();\n window.location.reload();\n }\n}", "title": "" }, { "docid": "8bd16188ce66da3b692046e914e735d7", "score": "0.5446476", "text": "function getUserInfo() {\n var url = configs.api.oauth + \"/user/info\";\n var req = {\n method: 'GET',\n url: url,\n headers: configs.api.headers\n };\n $http(req).success(function(data) {\n $scope.oauth = {\n result: \"success\",\n name: data.info.name,\n email: data.info.email,\n type: data.type,\n id: data.info.id,\n hash: data.info.hash,\n salt: data.info.salt\n };\n }).error(function() {\n $scope.oauth = {\n result: \"none\",\n name: null,\n email: null,\n type: null,\n id: null,\n hash: null,\n salt: null\n };\n });\n }", "title": "" }, { "docid": "afb0269dd4e9cdfadc39955a555fb8b5", "score": "0.544607", "text": "async finishAuthProviderSignIn(callbackResult) {\n if (!this.client.isReady) {\n await this.client.ready();\n }\n const details = await this.client.api.finishAuthProviderSignIn(callbackResult);\n const isOtherUser = !this.user || this.user.uid !== details.user.uid;\n isOtherUser && this.eventCallback('signout', { source: 'oauth_signin', user: this.user });\n this.accessToken = details.accessToken;\n this.user = new user_1.AceBaseUser(details.user);\n isOtherUser && this.eventCallback('signin', { source: 'oauth_signin', user: this.user, accessToken: this.accessToken });\n return { user: this.user, accessToken: this.accessToken, provider: details.provider }; // success: true,\n }", "title": "" }, { "docid": "b4b2a07fd2b3c21be374e7e4f2551f87", "score": "0.5432372", "text": "getProfile() {\n const {getProfile, user, auth, translate} = this.props;\n Spinner.start();\n getProfile().then(() => {\n this.setValidations({\n ...auth,\n ...user\n });\n this.setProfileImage(user.photoURL);\n Spinner.stop();\n }).catch((err) => {\n Spinner.stop();\n Toast.fail(translate(\"profile.error\"), 0.5);\n })\n }", "title": "" }, { "docid": "c3fb97a0fe93eb547dfb9a6a4fc5bb85", "score": "0.54323065", "text": "function getProfileData() {\n //IN.API.Raw(\"/people/~\").result(onSuccess).error(onError);\n\n IN.API.Profile(\"me\").fields(\"first-name\", \"last-name\", \"maiden-name\", \"email-address\", \"phone-numbers\", \"location\")\n .result(onSuccess)\n .error(onError);\n }", "title": "" }, { "docid": "fdc76413fa09b6a54496add4390a5ee8", "score": "0.5432004", "text": "function loadProfile(session, auth) {\n request({\n url: 'https://www.googleapis.com/plus/v1/people/me?' +\n 'fields=displayName%2Cimage',\n json: true,\n headers: {\n 'Authorization': (auth.token_type+' '+auth.access_token)\n }\n }, function(err, response, body) {\n var i;\n if(err) {\n /* it might be a good idea to regenerate session when\n * session.error is set. there is currently no path to\n * clear out an error set on a session, except logging\n * out which may or may not be intuitive to the user\n * Or we can leave this responsibility as it currently is\n * to the front-end */\n session.error = 'There was an error loading the ' +\n 'profile from googleapis: ' + err + ' - ' + body;\n console.error(session.error);\n session.authenticated = false;\n session.save();\n }\n else {\n /* Add the items we requested to the user */\n session.user.displayName = body.displayName;\n session.user.imageUrl = body.image.url; /* this change\n * is important for storing the user in redis */\n session.loading = false; /* all done loading */\n session.save();\n saveUser(session.user);\n }\n });\n }", "title": "" }, { "docid": "cde0a746c5120e99cdde594f2b0a8eea", "score": "0.5431451", "text": "saveUserInfo(authResult) {\n this.auth0.client.userInfo(authResult.accessToken, (err, res) => {\n localStorage.setItem('sub', res.sub);\n fetch(`${API_URL}/users/registration`, {\n method: \"POST\",\n body: JSON.stringify(res),\n headers: {\n \"Content-Type\": \"application/json\"\n },\n credentials: \"same-origin\"\n }).then(function(response) {\n response.status //=> number 100–599\n response.statusText //=> String\n response.headers //=> Headers\n response.url //=> String\n \n }, function(error) {\n error.message //=> String\n })\n })\n }", "title": "" }, { "docid": "64df405b1e367091c076bae9d43e217f", "score": "0.542695", "text": "function getProfiles(){\n return $.ajax({\n url: 'https://randomuser.me/api/?nat=US&results=12',\n dataType: 'json',\n success: function(data) {\n return data;\n }\n });\n}", "title": "" }, { "docid": "01fba507c4d8f65627cafb571c7a4c75", "score": "0.5420807", "text": "function onSignIn(googleUser) {\n var id_token = googleUser.getAuthResponse().id_token;\n\n $.get(\n \"https:/www.googleapis.com/oauth2/v3/tokeninfo\",\n {id_token : id_token},\n function(data) {\n if(data['aud']==client_id){\n console.log(data);\n }\n\n }\n );\n\n}", "title": "" }, { "docid": "a9d305fa60c98665209c0d0e66ab2874", "score": "0.54192466", "text": "async refreshProfile() {\n // Fetch the latest profile\n const response = await this.fetcher.fetchJSON({\n method: \"GET\",\n path: routes.api().auth().profile().path,\n });\n // Create a profile instance\n this._profile = new UserProfile(response);\n // Store this for later hydration\n this.storage.profile = this._profile;\n }", "title": "" }, { "docid": "4458ac42a47dc34253127f2caf3519fe", "score": "0.54105127", "text": "function getUserComplete(response){\n\t\t\t$log.info(\"getUserComplete(), returning response...\");\n\t\t\t$log.info(response.data); \n\t\t\treturn response.data; \n\t\t}", "title": "" }, { "docid": "c3ab6a0d0c9a21f4609cedd9808e997b", "score": "0.5408428", "text": "retrieveMyProfile() {\n const url = `${URL_PREFIX}profiles/my/`;\n return rest.get(url);\n }", "title": "" }, { "docid": "8397a1c9faa163f4e43a366e9180709f", "score": "0.5408173", "text": "function normalizeUserProfile(googleUser, authResponse) {\n const userProfile = googleUser.getBasicProfile();\n\n // Normalize user data (idea is common format across identity providers)\n return {\n email: userProfile && userProfile.getEmail(),\n domain: googleUser.getHostedDomain(),\n imageUrl: userProfile && userProfile.getImageUrl(),\n\n name: userProfile && userProfile.getName(),\n givenName: userProfile && userProfile.getGivenName(),\n familyName: userProfile && userProfile.getFamilyName(),\n\n scopes: googleUser && googleUser.getGrantedScopes().split(' '),\n\n accessToken: authResponse.access_token,\n idToken: authResponse.id_token\n };\n}", "title": "" }, { "docid": "9fcd0357dabce48385a02279816b3f4c", "score": "0.5404085", "text": "function statusChangeCallback(response) {\n if (response.status === 'connected') {\n // Logged into your app and Facebook.\n $(\"#fb-logout\").show(); \n $(\"#profile\").show();\n $(\"#list\").show();\n $(\"#fb-login\").hide(); \n $(\"#fb-signup\").hide();\n document.getElementById(\"user_status\").value=1;\n getUserInfo(GetPic);\n\n } else if (response.status === 'not_authorized') {\n // The person is logged into Facebook, but not your app.\n $(\"#fb-signup\").show(); \n $(\"#fb-login\").hide(); \n $(\"#profile\").hide();\n $(\"#list\").hide();\n $(\"#fb-logout\").hide(); \n $('#portrait').hide();\n $('#more').show();\n $('#portrait').removeAttr('src');\n document.getElementById(\"user_status\").value=0;\n document.getElementById(\"user_photo\").style= \"padding-top: 14px; padding-bottom: 2px;\"; \n } else {\n // The person is not logged into Facebook, so we're not sure if\n // they are logged into this app or not.\n $(\"#fb-signup\").show(); \n $(\"#fb-login\").show();\n $(\"#fb-logout\").hide(); \n $(\"#profile\").hide();\n $(\"#list\").hide();\n $('#portrait').hide();\n $('#more').show();\n $('#portrait').removeAttr('src');\n document.getElementById(\"user_status\").value=0;\n document.getElementById(\"user_photo\").style= \"padding-top: 14px; padding-bottom: 2px;\";\n }\n }", "title": "" }, { "docid": "87836a82fe713878d896c47f9464d274", "score": "0.539545", "text": "function requestComplete() {\r\n if (this.status == 401 && retry) {\r\n retry = false;\r\n chrome.identity.removeCachedAuthToken({ token: access_token },\r\n getToken);\r\n } else {\r\n callback(null, this.status, this.response);\r\n }\r\n }", "title": "" }, { "docid": "9993b1fd46f601565d1af7343a99c096", "score": "0.5390168", "text": "async getProfile() {\n try {\n const { data } = await client.query({\n query: GET_PROFILE,\n });\n console.log('saveProfile: ', data.profile);\n this.props.saveProfile(data.profile);\n } catch (e) {\n if (e.message.replace(\"GraphQL error:\", \"\").trim().substr(0, 8) == \"Login to\") {\n await AsyncStorage.removeItem(\"authtoken1\");\n await AsyncStorage.removeItem(\"loggedIn\");\n this.props.saveProfile(null);\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "dd472699ce0753a8e32182592e5ca001", "score": "0.538628", "text": "function grabUserFavorites( email, password, userMap ) {\n return users.signin( email, password, userMap )\n .then(function(res) {\n var token = res.body.accessToken;\n var userID = res.body.profileId;\n return getFavorites(userID, token)\n }) \n .then(function(res){\n //console.log(res.body);\n return res;\n })\n .catch(function(err) {\n console.log(err.response.body);\n })\n .catch( function(err) {\n console.log(err.body);\n });\n}", "title": "" } ]
6f744723cf20dc0b4d4283c80273b26f
to payment for event
[ { "docid": "5942c7a2c9b50e15edf941a9f7caec1f", "score": "0.6252284", "text": "function eventMemPayment(token){\n \n // Insert the token ID into the form so it gets submitted to the server\n var form = document.getElementById('payment-form');\n var hiddenInput = document.createElement('input');\n hiddenInput.setAttribute('type', 'hidden');\n hiddenInput.setAttribute('name', 'stripeToken');\n hiddenInput.setAttribute('value', token.id);\n\n form.appendChild(hiddenInput);\n \n var paymentType = $('#getPaymentType').val(),\n eventIdPay = $('#eventIdPay').val(),\n memberIdPay = $('#memberIdPay').val(),\n eventMemIdPay = $('#eventMemIdPay').val(),\n eventAmount = $('#eventAmtPay').val(),\n groupChat = $('#groupChat').val();\n \n if(paymentType == 4){\n\n var url = BASE_URL+'home/event/eventPayment';\n\n }else if(paymentType == 5){\n\n var url = BASE_URL+'home/event/eventPayment';\n }\n\n $.ajax({\n\n type: \"POST\",\n url: url,\n data: {'stripeToken':token.id,eventIdPay:eventIdPay,memberIdPay:memberIdPay,eventMemIdPay:eventMemIdPay,eventAmount:eventAmount}, //only input\n dataType: \"json\",\n beforeSend: function () {\n $('#tl_admin_loader').show(); \n },\n complete:function(){\n \n },\n success: function (data, textStatus, jqXHR) { \n\n switch(data.status) {\n case 1:\n $('#stripepopup').modal('hide'); //hide payment modal\n // $('#successpayment').modal('show'); //show success modal\n card.clear(); //clear card values\n toastr.success(data.msg);\n\n if(groupChat == 1){\n\n joinEventMember(eventIdPay,memberIdPay,eventMemIdPay); // sending member while accepting request acc to event in firebase\n } \n\n if(data.url){\n window.setTimeout(function () {\n window.location.href = data.url;\n }, 2000);\n }\n break;\n default:\n $('#tl_admin_loader').hide();\n toastr.error(data.msg);\n }\n },\n error: function (jqXHR, textStatus, errorThrown){\n $('#tl_admin_loader').hide();\n toastr.error(commonMsg);\n }\n });\n }", "title": "" } ]
[ { "docid": "0ca01f3bb9eb5f8fa0bbdbbfd2affb74", "score": "0.6741485", "text": "handlePaymentConfirm(event) {\n console.log('Confirm Payment', event);\n }", "title": "" }, { "docid": "6220be71890bd9fbbd4cdf349e56645e", "score": "0.6190144", "text": "function event(e, info) {\n // Se evento exisitr\n if (eventsNames.indexOf(e) > -1) {\n callGA(e, info);\n if (checkout.events) {\n checkout.events.push({\n type: e,\n time: new Date(),\n info: info || \"\"\n });\n } else {\n checkout.events = [];\n checkout.events.push({\n type: e,\n time: new Date(),\n info: info || \"\"\n });\n }\n }\n\n saveCheckout();\n }", "title": "" }, { "docid": "17def3d27a86afc43171d5bba2d91946", "score": "0.60806674", "text": "function eventCompPayment(token){\n \n // Insert the token ID into the form so it gets submitted to the server\n var form = document.getElementById('payment-form');\n var hiddenInput = document.createElement('input');\n hiddenInput.setAttribute('type', 'hidden');\n hiddenInput.setAttribute('name', 'stripeToken');\n hiddenInput.setAttribute('value', token.id);\n\n form.appendChild(hiddenInput);\n \n var paymentType = $('#getPaymentType').val(),\n eventIdPay = $('#eventIdPay').val(),\n compIdPay = $('#compIdPay').val(),\n eventMemIdPay = $('#eventMemIdPay').val(),\n eventAmount = $('#eventAmtPay').val(),\n compMemId = $('#compMemIdPay').val(),\n groupChat = $('#groupChat').val() ? $('#getGroupChat').val() : $('#getGroupChat').val();\n \n if(paymentType == 4){\n\n var url = BASE_URL+'home/event/eventPayment';\n\n }else if(paymentType == 5){\n\n var url = BASE_URL+'home/event/companionPayment';\n }\n\n $.ajax({ \n type: \"POST\",\n url: url,\n data: {'stripeToken':token.id,eventIdPay:eventIdPay,compIdPay:compIdPay,eventMemIdPay:eventMemIdPay,eventAmount:eventAmount}, //only input\n dataType: \"json\",\n beforeSend: function () {\n $('#tl_admin_loader').show(); \n },\n complete:function(){\n \n },\n success: function (data, textStatus, jqXHR) {\n\n switch(data.status) {\n case 1:\n $('#stripepopup').modal('hide'); //hide payment modal\n // $('#successpayment').modal('show'); //show success modal\n card.clear(); //clear card values\n toastr.success(data.msg);\n\n if(groupChat == 1){\n\n joinEventMember(eventIdPay,compMemId,eventMemIdPay,compIdPay); // sending member while accepting request acc to event in firebase\n }\n\n if(data.url){\n window.setTimeout(function () {\n window.location.href = data.url;\n }, 2000);\n }\n break;\n default:\n $('#tl_admin_loader').hide();\n toastr.error(data.msg);\n }\n },\n error: function (jqXHR, textStatus, errorThrown){\n $('#tl_admin_loader').hide();\n toastr.error(commonMsg);\n }\n });\n }", "title": "" }, { "docid": "15ff029baaddd00ebeb150e4db66ba3a", "score": "0.6057575", "text": "function onPaymentReminder(reminder){\n _meetingpaymentreminder(reminder);\n }", "title": "" }, { "docid": "4fbd21e58bf0b57433c4819cab096240", "score": "0.5986664", "text": "toPay(){\n return this.calculateTotalWithoutDelivery() + this.deliveryFee()\n }", "title": "" }, { "docid": "103fc9324ad4a28a007d2eadaeae514e", "score": "0.5977371", "text": "function onPayment(invoice) {\n store.commit(SET_INVOICE, invoice)\n handleDelayed(invoice)\n store.commit(CLOSE_INVOICE_MODAL)\n // todo: if delayed show the token\n Notify.create(\"Invoice paid\")\n }", "title": "" }, { "docid": "e6fd6d1c55dff526ec953c13e9ab00cb", "score": "0.5934588", "text": "function sendToQuantServ() {\r\n\tif (_qevents) {\r\n\t\t_qevents.push({qacct:\"p-E4hpL7mL2PFtu\",event:\"refresh\",labels:\"_fp.event.Winterlicious Restaurant Button\"});\r\n\t}\r\n}", "title": "" }, { "docid": "71225b41ca55876764480b96b7b7cd42", "score": "0.5888635", "text": "onBuy(ev) {\n observer.trigger(observer.events.notification, {\n type: 'success',\n message: 'Product is added to your order.'\n });\n }", "title": "" }, { "docid": "1bcdbf1e73422804143be587ba090740", "score": "0.5856437", "text": "onDonation(eventData){\n eventData.message.forEach(element => {\n var name = element['from'];\n var amount = element['formattedAmount'];\n var currency = element['currency'];\n var message = element['currency'];\n // Eventually send this to control Layer\n var response = {\n \"sender\": name,\n \"amount\": amount,\n \"currency\": currency,\n \"message\": message,\n \"type\": \"donation\"\n }\n this.eventHandlerFunc(response);\n console.log(`Received donation from ${name} for ${amount} ${currency}`);\n });\n }", "title": "" }, { "docid": "b87c0ce6f63b0fc25367c4ba2cc3c6fb", "score": "0.5824719", "text": "toCartHandle(evt) {\n console.log('list event')\n this.dispatchEvent(new CustomEvent('tothecart', {\n detail: evt.detail\n }));\n }", "title": "" }, { "docid": "fb162995416061754db0ecc1765eb07c", "score": "0.5778041", "text": "function processPayment(req,res)\n{ \n getNewId(function (err,newId)\n {\n if (err) res.status(500).send({ messsage: \"Error de base de datos\" });\n\n let ticket = Ticket();\n\n ticket.charge = req.body.charge;\n ticket.date = new Date().toISOString();\n ticket.event = req.body.event;\n ticket.idInvoice = newId;\n ticket.price = req.body.price;\n ticket.row = req.body.row;\n ticket.seat = req.body.seat; \n ticket.section = req.body.section; \n ticket.status = 1;\n ticket.subtotal = req.body.subtotal;\n ticket.total = req.body.total; \n ticket.used = false; \n ticket.user = req.body.user;\n ticket.stageLocation = req.body.stageLocation\n\n var signature = []; \n \n signature.push(config.customerIdEpayco);\n signature.push(config.pKeyEpayco);\n signature.push (newId);\n signature.push (ticket.total);\n signature.push('COP'); \n let md5_signature = md5(signature.join('^')); \n\n ticket.save((err, newTicket) => {\n if (err) return res.status(500).send({ message: `Error de base de datos`})\n return res.status(200).send({ ticket:newTicket,signature:md5_signature })\n })\n });\n}", "title": "" }, { "docid": "5557cdaef598a6dd96856f209fb6347c", "score": "0.5774806", "text": "function curBtnPayment(btn) {\n var p = +btn.id;\n doPayment(p);\n}", "title": "" }, { "docid": "dd629e67b00536f65314c8b27cdae94d", "score": "0.5762907", "text": "function payment() {\n var r = require('*/cartridge/scripts/util/Response');\n onRequest.setResponseHeaders(r);\n var req = request;\n\n if (req.httpParameterMap.requestBodyAsString && req.httpMethod === 'POST') {\n var bodyObject = JSON.parse(req.httpParameterMap.requestBodyAsString);\n // If it comes from katapult\n if (bodyObject.zibby_id) {\n var basket = req.httpParameterMap.basket.stringValue;\n var isRecordExist = CustomObjectMgr.getCustomObject(\n 'katapult_transactions',\n basket\n );\n if (!isRecordExist) {\n Transaction.begin();\n var transaction = CustomObjectMgr.createCustomObject(\n 'katapult_transactions',\n basket\n );\n transaction.custom.KAT_customer_id = bodyObject.customer_id;\n transaction.custom.KAT_zibby_id = bodyObject.zibby_id;\n transaction.custom.KAT_uid = bodyObject.uid;\n Transaction.commit();\n } else {\n Transaction.begin();\n isRecordExist.custom.KAT_customer_id = bodyObject.customer_id;\n isRecordExist.custom.KAT_zibby_id = bodyObject.zibby_id;\n isRecordExist.custom.KAT_uid = bodyObject.uid;\n Transaction.commit();\n }\n r.renderJSON({ message: 'OK' });\n }\n // return;\n } else if (req.httpHeaders.origin !== KatEnvironment) {\n sleep(5000);\n var basketUUID = BasketMgr.getCurrentBasket().UUID;\n var placeOrderResult = app.getController('COPlaceOrder').Start();\n if (!placeOrderResult.error) {\n showConfirmation(placeOrderResult.Order, basketUUID);\n }\n } else {\n r.renderJSON({\n success: 'OK',\n message: 'Teste'\n });\n }\n\n // response.redirect(dw.web.URLUtils.https('COBilling-Billing'));\n // https://zzrn-013.sandbox.us01.dx.commercecloud.salesforce.com/on/demandware.store/Sites-SiteGenesis-Site/en_US/KatapultOK-Payment\n}", "title": "" }, { "docid": "367a0009fb163054710cf0ec233cdf2a", "score": "0.5755952", "text": "function donate(event) {\n let account = web3.eth.defaultAccount;\n console.log('account: ', account);\n myContract.methods.donate().send({\n from: account,\n value: web3.utils.toWei(DONATE_AMOUNT_ETH, \"ether\")\n }, (err, data) => {\n if (err) return console.error(err);\n console.log('>>> donate ok.');\n });\n}", "title": "" }, { "docid": "ba8ab8b0d64fb3dee0d79ea7cdb3bed3", "score": "0.5746877", "text": "function subnmitCardOrder() {\n // Find the value of the total price of the order\n let submitPrice = $('div#ctl00_cph1_orderList_pnlOrder td:last b').html();\n pushSubmitOrder.push(submitPrice);\n\n // Will send purchase order to Facebook\n fbq('track', 'Purchase', {\n value: pushSubmitOrder,\n currency: 'USD',\n });\n }", "title": "" }, { "docid": "7a688a0183572826ef1a51f5a35b1dbc", "score": "0.5697131", "text": "async handleFormEvent(event) {\n // stop default behaviour\n event.preventDefault();\n\n const a1 = accounts[0];\n const a2 = accounts[1];\n\n // collect form data\n let account = a1.name;\n let account2 = a2.name;\n let privateKey = a1.privateKey;\n let privateKey2 = a2.privateKey;\n\n // prepare variables for the switch below to send transactions\n let actionName = \"\";\n let actionData = {};\n\n\n let encrypt = new jsencrypt();\n encrypt.setPublicKey(user1private);\n\n // define actionName and action according to event type\n switch (event.target.type.value) {\n case \"store\":\n actionName = \"addasset\";\n actionData = {\n _usr: account,\n _asset_name: '{WEB_RESOURCE}',\n _encrypted_asset_content: encrypt.encrypt(event.target.credentials.value)\n };\n break;\n case \"transfer\":\n actionName = \"transfer\";\n actionData = {\n _account_from: account,\n _account_to: account2,\n _uid: event.target.uid.value\n };\n break;\n case \"accept\":\n actionName = \"accept\";\n actionData = {\n _account_from: account,\n _account_to: account2,\n _uid: event.target.uid.value\n };\n break;\n default:\n return;\n }\n\n // // eosjs function call: connect to the blockchain\n const eos = Eos({\n httpEndpoint: endpoint,\n keyProvider: privateKey,\n });\n\n // console.log(actionData);\n const result = await eos.transaction({\n actions: [{\n account: \"testh\",\n name: actionName,\n authorization: [{\n actor: account,\n permission: 'active',\n }],\n data: actionData,\n }],\n });\n\n this.getTable();\n this.getAsset();\n }", "title": "" }, { "docid": "ead491030883c60a879fbe9eeff0ccbc", "score": "0.5694937", "text": "async handleBuy(history, to) {\n // collect form data\n let account1 = accounts[0].name;\n let account2 = accounts[1].name;\n let contract = 'repeos';\n let privateKey = '5JD9AGTuTeD5BXZwGQ5AtwBqHK21aHmYnTetHgk1B3pjj7krT8N';\n\n // eosjs function call: connect to the blockchain\n const eos = Eos({keyProvider: [privateKey, accounts[0].privateKey]});\n const result = await eos.transaction({\n actions: [{\n account: \"repeos\",\n name: 'create',\n authorization: [{\n actor: contract,\n permission: 'active',\n }],\n data: {id: this.props.tx, user1: account1, user2: account2},\n }],\n });\n\n console.log(result);\n\n const result1 = await eos.transaction({\n actions: [{\n account: \"repeos\",\n name: 'approve1',\n authorization: [{\n actor: contract,\n permission: 'active',\n },{\n actor: account1,\n permission: 'active',\n }],\n data: {id: this.props.tx},\n }],\n });\n\n console.log(result1);\n\n history.push(to);\n }", "title": "" }, { "docid": "449ca6e5eee84f5759937deefc3dc123", "score": "0.5681412", "text": "function sendNotificationOnPaidWithTemplate(context,vpBillInfo){\n log.debug(\"sendNotificationOnPaidWithTemplate\", \"rec:\" + JSON.stringify(vpBillInfo));\n \n var newrecord = context.newRecord;\n var objVPRef = vpLib.vpPreference(context);\n \n if(!vpLib.isEmpty(newrecord.id)){\n newrecord = record.load({\n type: newrecord.type,\n id: newrecord.id\n });\n }\n\n if(objVPRef.notifyVendorWhenPaid && !vpLib.isEmpty(objVPRef.vendorEmailFieldId) && !vpLib.isEmpty(objVPRef.emailTemplateOnPaid) ){\n var intPurchaseOrderId = null;\n var arrPurchaseOrder = [];\n \n var bIsvptrans = false;\n if(!vpLib.isEmpty(vpBillInfo.data)){\n for (var ii in vpBillInfo.data){\n var intBillPOId = vpBillInfo.data[ii].createdfrom;\n if(!vpLib.isEmpty(intBillPOId)){\n arrPurchaseOrder.push(intBillPOId);\n intPurchaseOrderId = intBillPOId;\n }\n \n if(vpBillInfo.data[ii].isvptrans == true){\n bIsvptrans = true;\n }\n }\n }\n \n if(!bIsvptrans){\n log.debug('SENDNOTIFICATIONONPAIDWITHTEMPLATE',\"bIsvptrans is false\");\n return;\n }\n \n if(vpLib.isEmpty(intPurchaseOrderId)){\n log.debug('SENDNOTIFICATIONONPAIDWITHTEMPLATE',\"PO is null!\");\n return;\n }\n\n var stEmailTemplate = record.load({\n type: 'emailtemplate',\n id: objVPRef.emailTemplateOnPaid\n });\n \n var stWhenPaidBody = '';\n var serverFeature = new vpLib.featureServer();\n var stVendorName = newrecord.getValue('entity');\n stVendorName = vpLib.isEmpty(stVendorName)? \"\": stVendorName + \" \";\n var stSubject = stEmailTemplate.getValue('subject');\n var stContent = stEmailTemplate.getValue('content');\n stContent = vpLib.isEmpty(stContent)? \"\": stContent;\n stSubject = vpLib.isEmpty(stSubject)? \"\": stSubject;\n //stSubject = stVendorName + stSubject;\n\n var arrColumns = [\"entity\",'custbody_nsts_vp_po_employee_email'];\n if(!vpLib.isEmpty(objVPRef.vendorEmailFieldId)){\n arrColumns.push(objVPRef.vendorEmailFieldId);\n }\n \n var arrPOFill = [];\n var ArrVendorEmail = [];\n var arrPoEmployee = [];\n \n arrPOFill.push('internalid','anyof',arrPurchaseOrder);\n var objSearchTrans = search.create({\n type: 'transaction',\n filters: arrPOFill,\n columns: arrColumns\n }).run().each(function(result){\n var intVendor = result.getValue('entity');\n var stVenEmail = (!vpLib.isEmpty(objVPRef.vendorEmailFieldId))? result.getValue(objVPRef.vendorEmailFieldId): \"\";\n var stpoEmployee = result.getValue('custbody_nsts_vp_po_employee_email');\n \n if(vpLib.isEmpty(stVenEmail)){\n if( !vpLib.isEmpty(intVendor) && ArrVendorEmail.indexOf(intVendor) < 0){\n ArrVendorEmail.push(intVendor);\n }\n }else{\n if(ArrVendorEmail.indexOf(stVenEmail) < 0){\n ArrVendorEmail.push(stVenEmail);\n }\n }\n\n if(!vpLib.isEmpty(stpoEmployee)){\n if(arrPoEmployee.indexOf(stpoEmployee) < 0){\n arrPoEmployee.push(stpoEmployee);\n }\n\n }\n return true\n });\n \n\n \n var relateRec = (arrPurchaseOrder.length == 1)?{\n transactionId : arrPurchaseOrder[0],\n recordtype : \"purchaseorder\",\n entityId : objVPRef.vendorEmailSender\n }:{\n entityId : objVPRef.vendorEmailSender\n }\n\n stContent = stContent.replace(/\\<\\#assign +vpinfoline( *=.*?)\\>/g,\"\");\n stContent = stContent.replace(/\\<\\#assign +vendorpayment( *=.*?)\\>/g,\"\");\n stContent = stContent.trim();\n\n log.debug(\"SENDNOTIFICATIONONPAIDWITHTEMPLATE\",\"stContent:\" + stContent)\n var objRenderer = render.create();\n objRenderer.templateContent = stContent;\n objRenderer.addRecord( HC_TRANS_RECORDS.COMMON.RECORDS.VENDORPAYMENT,newrecord);\n objRenderer.addCustomDataSource({format : render.DataSource.OBJECT, alias: \"vpinfoline\", data: vpBillInfo});\n \n stWhenPaidBody = objRenderer.renderAsString();\n \n var objSubRenderer = render.create();\n objSubRenderer.templateContent = stSubject;\n objSubRenderer.addRecord(HC_TRANS_RECORDS.COMMON.RECORDS.TRANSACTION,newrecord);\n stSubject = objSubRenderer.renderAsString();\n \n vpLib.sendEmail({\n author : objVPRef.vendorEmailSender,\n cc : arrPoEmployee,\n subject : stSubject,\n body : stWhenPaidBody,\n recipients : ArrVendorEmail,\n internalOnly : false,\n relatedRecords : relateRec\n });\n \n }\n }", "title": "" }, { "docid": "e6399888a897c1ecc4137e4ab4324786", "score": "0.5677204", "text": "function onClickedCheckout()\n{\n\n}", "title": "" }, { "docid": "f10c672fb9dbd9e46a8289e6f66f8233", "score": "0.5661998", "text": "_order_accepted(event) {\n const order = event.detail;\n if (order.pcode == this.pcode)\n return;\n\n this.$.modal.modal_text = `Do you want to ${order.is_bid ? 'sell' : 'buy'} for ${order.price}?`\n this.$.modal.on_close_callback = (accepted) => {\n if (!accepted)\n return;\n\n this.$.trader_state.accept_order(order);\n };\n this.$.modal.show();\n }", "title": "" }, { "docid": "119b2eeb3494922ac44f30e54825663e", "score": "0.5661497", "text": "function createPaymentTransaction(){\n\n server.accounts()\n .accountId(source.publicKey())\n .call()\n .then(({ sequence }) => {\n const account = new StellarSdk.Account(source.publicKey(), sequence)\n const transaction = new StellarSdk.TransactionBuilder(account, {\n fee: StellarSdk.BASE_FEE\n })\n .addOperation(StellarSdk.Operation.payment({\n destination: 'GDC5GAHZF75VJY276SUZAWQKJ2OY777LY5URRSDXX3FH2RFBQPRMFDMR', //destination.publicKey()\n asset: StellarSdk.Asset.native(),\n amount: '1.5'\n }))\n .setTimeout(30)\n .build()\n transaction.sign(StellarSdk.Keypair.fromSecret(source.secret()))\n return server.submitTransaction(transaction)\n })\n .then(results => {\n console.log('Transaction', results._links.transaction.href)\n //console.log('New Keypair', destination.publicKey(), destination.secret())\n })\n\n }", "title": "" }, { "docid": "bfa09f03efdd899913d709262b0fabb9", "score": "0.5658034", "text": "function onBuyClicked() {\n if (!window.PaymentRequest) {\n console.log('Web payments are not supported in this browser.');\n return;\n }\n \n // Create supported payment method.\n const supportedInstruments = [\n {\n supportedMethods: ['https://tez.google.com/pay'],\n data: {\n pa: 'audittyasae@oksbi',\n pn: 'Merchant Name Adi',\n tr: '1234ABCD', // Your custom transaction reference ID\n url: 'http://localhost:3001/services#gzEejbcdi6d3pUQkiISb4qFLtdi1',\n mc: '1234', //Your merchant category code\n tn: 'Purchase in Merchant',\n },\n }\n ];\n \n // Create order detail data.\n const details = {\n total: {\n label: 'Total',\n amount: {\n currency: 'INR',\n value: '10.01', // sample amount\n },\n },\n displayItems: [{\n label: 'Original Amount',\n amount: {\n currency: 'INR',\n value: '10.01',\n },\n }],\n };\n \n // Create payment request object.\n let request = null;\n try {\n request = new PaymentRequest(supportedInstruments, details);\n } catch (e) {\n console.log('Payment Request Error: ' + e.message);\n return;\n }\n if (!request) {\n console.log('Web payments are not supported in this browser.');\n return;\n }\n \n var canMakePaymentPromise = checkCanMakePayment(request);\n canMakePaymentPromise\n .then((result) => {\n alert(request);\n alert(result);\n showPaymentUI(request, result);\n })\n .catch((err) => {\n console.log('Error calling checkCanMakePayment: ' + err);\n });\n }", "title": "" }, { "docid": "09eaced95883e09ef1c9737318485709", "score": "0.565434", "text": "payment() {\n return this.currentCheckout ? this.currentCheckout.payment : {}\n }", "title": "" }, { "docid": "ea035c6fd8b8ebc080fad3e3b0b87b85", "score": "0.565373", "text": "processPayment(paymentData) {\n // @todo pass payment token to your gateway to process payment\n\n const requestConfig = {\n //response data passed to Hybris for Cybersource authentication\n\n data: {\n apiVersion: paymentData.apiVersion,\n apiVersionMinor: paymentData.apiVersionMinor,\n email: paymentData.email,\n paymentMethodData: paymentData.paymentMethodData,\n },\n };\n\n this.$refs.spinner.showSpinner();\n // this.googlePayService.saveGooglePayResponse(\n // //connect to Hybris API\n\n // requestConfig,\n // this.saveGooglePayResponseSuccess(),\n // error,\n // paymentData,\n // );\n\n this.googlePayService.saveGooglePayResponse(requestConfig, (data) => {\n // console.log('Sending payment authorization to Google pay');\n // data is returned from hybris, we need to check for success condition in data\n if (data) {\n console.log(data);\n checkoutEventBus.$emit('google-pay-status', data)\n } else {\n }\n this.$refs.spinner.hideSpinner();\n }, (data) => {\n if (data) {\n checkoutEventBus.$emit('google-pay-status', false)\n }\n this.$refs.spinner.hideSpinner();\n });\n }", "title": "" }, { "docid": "a40b770cd426a04eaaf0706390cccb60", "score": "0.5649729", "text": "sellProject(to, id){\n this.state.w3irdsTokens.methods.sellProject(to, id).send({from: this.state.account}).on('transactionHash', hash => {\n window.alert(\"Transfered successfully\")\n })\n}", "title": "" }, { "docid": "feb168d3927009b4d0240033cb642b88", "score": "0.5649512", "text": "function onclickPaymentType() {\n\t\tselected_payment_type = $(this).data('payment-type');\n\n\t\tfunction startAccountTransactionPromise() {\n\t\t\tvar selected_date_unixtime = (new Date(selected_year + '-' + selected_month + '-' + selected_day)).getTime() / 1000;\n\t\t\tvar unixtime_from = selected_date_unixtime - (60 * 60 * 24 * 10);\n\t\t\tvar unixtime_to = selected_date_unixtime + (60 * 60 * 24 * 10);\n\t\t\taccountTransactionPromise = fetch('/account_transactions_api/' + selected_source.accounts.join(',') + '/' + unixtime_from + '/' + unixtime_to);\n\t\t}\n\n\t\tif (selected_payment_type === 'INVOICE') {\n\t\t\tstartAccountTransactionPromise();\n\t\t\tupdateHtml(htmlYears('invoice_date_year_selector'));\n\t\t}\n\t\telse if (selected_payment_type === 'BANK_TRANSFER') {\n\t\t\tstartAccountTransactionPromise();\n\t\t\tupdateWithSelectTransaction();\n\t\t}\n\t\telse {\n\t\t\tupdateHtml(htmlAccountingPost());\n\t\t}\n\t}", "title": "" }, { "docid": "e07ccbbcff7ffcfb7f49a31ba57f95ad", "score": "0.5609118", "text": "conformorderagian(event) {\n if (\n event !== \"\" &&\n typeof event !== undefined &&\n typeof event !== \"undefined\"\n ) {\n event.preventDefault();\n }\n\n var orderID = this.state.orderID;\n var customerId =\n typeof cookie.load(\"UserId\") === \"undefined\" ? \"\" : cookie.load(\"UserId\");\n console.log(orderID, \"orderIDorderID\");\n\n var postObject = {\n app_id: appId,\n order_id: orderID,\n customer_id: customerId,\n };\n\n axios\n .post(apiUrl + \"cart/order_again\", qs.stringify(postObject))\n .then((res) => {\n if (res.data.status === \"ok\") {\n var result_set = res.data.result_set;\n var tat = 0;\n if (result_set.order_availability_id === deliveryId) {\n tat = result_set.outlet_delivery_tat;\n this.findOutletBasedZone(\n result_set.order_customer_postal_code,\n result_set.order_availability_id\n );\n } else if (result_set.order_availability_id === pickupId) {\n this.pickOutlet(result_set);\n }\n } else if (res.data.status === \"error\") {\n var errMsgtxt =\n res.data.message !== \"\"\n ? res.data.message\n : \"Sorry! order again can`t add your cart.\";\n showCustomAlert(\"error\", errMsgtxt);\n }\n return false;\n });\n }", "title": "" }, { "docid": "439ef9e16b6ba1648a020eebf1dad542", "score": "0.56023127", "text": "function onGooglePaymentButtonClicked() {\n pushTrackingEvents(createGooglePayEvent(\"GooglePayChosen\"));\n\n var paymentDataRequest = getGooglePaymentDataRequest();\n paymentDataRequest.transactionInfo = getGoogleTransactionInfo();\n\n var paymentsClient = getGooglePaymentsClient();\n paymentsClient.loadPaymentData(paymentDataRequest)\n .then(function (paymentData) {\n // handle the response\n processPayment(paymentData);\n }, function (rejectData) {\n var rejectReason = \"\";\n if (rejectData) {\n rejectReason = rejectData.statusCode;\n }\n dataLayerService.pushEvent(\"GooglePayReject\", { \"google_status_code\": rejectReason });\n pushTrackingEvents(createGooglePayEvent(\"GooglePayReject\", \"GooglePayReject\", { \"google_status_code\": rejectReason }));\n if (Logger) {\n Logger.Error({ message: \"Google Pay - client wallet rejected. Rejection status code: \" + rejectReason });\n }\n }).catch(function (e) {\n console.error(e);\n\n if (Logger) {\n Logger.Error({ message: \"Error occured in onGooglePaymentButtonClicked method \", exception: e });\n }\n });\n}", "title": "" }, { "docid": "8c2dbd0ec9457bb65a5b9bafdd058031", "score": "0.5600374", "text": "switchPayee($event, transaction) {\n\t\tthis.switchTo($event, \"payees.payee\", transaction.payee.id, transaction);\n\t}", "title": "" }, { "docid": "358a007e18e2540f661d5b2078b5c96b", "score": "0.5592645", "text": "function makeItem(res) {\n let item = {};\n utility.getURL(config.etherscanAPI + '/api?module=proxy&action=eth_getTransactionByHash&txhash=' + res.transactionHash + '&apikey=KF9ADFTHP4WJF1GV3WHJZCTFZIN5XZUXG1', (err, response) => {\n if (!err) {\n const responseFromURL = JSON.parse(response);\n item = {\n address: res.address,\n blockNumber: res.blockNumber,\n timeStamp: Date.now().toString(16),\n gasPrice: responseFromURL.result.gasPrice,\n gasUsed: responseFromURL.result.gas,\n logIndex: res.logIndex,\n transactionHash: res.transactionHash,\n transactionIndex: res.transactionIndex,\n event: res.event,\n args: res.returnValues,\n txLink: config.etherscanUrl + \"/tx/\" + res.transactionHash,\n };\n console.log('ITEM = ', item);\n if (item.event === 'Trade') {\n const query = {\n $and: [\n { \"order.tokenGet\": item.args.tokenGet },\n { \"order.tokenGive\": item.args.tokenGive },\n { \"order.amountGet\": item.args.amountGet },\n { \"order.amountGive\": item.args.amountGive },\n ]\n };\n // in args we have tokenGet , tokenGive ,amount GEt , amount give (get address , give address are of no use to us )\n Order.update(query, { $set: { \"amountFilled\": \"true\" } }, { multi: true }, function (err, post) {\n if (err) throw err;\n console.log(\"this is post from makeItem\" + post);\n });\n }\n console.log(\"from make Item the item formed is \" + JSON.stringify(item));\n Event.create(item, function (err, post) {\n if (err) throw err;\n console.log(\" event posted \" + post);\n });\n }\n });\n}", "title": "" }, { "docid": "4d892b09fc3f41338932e7f88a9bb1f9", "score": "0.55916965", "text": "function saveWISE5Event(event) {\n event.messageType = 'event';\n sendMessage(event);\n}", "title": "" }, { "docid": "44797b95411fdae6dbdbca1e6e3a4942", "score": "0.55765915", "text": "function allEventsCallback(error, result) {\n\n // Transform amount to ether\n result.value = {}\n result.gas = {}\n\n /*\n Small corner case--transaction below is both deposit and withdrawal. Functionality disabled going forward.\n if (result.transactionHash == '0xb4ec00040aab8e021aaf94b0a99d1a7eb3a158f64c9b1d5098071d36e2645c02') {\n console.log(result);\n }\n */\n \n var transaction;\n\n // Instantiate promise derived from async web3 methods\n web3Promise(web3.eth.getTransactionReceipt, result.transactionHash) \n // Use transaction to get gas used\n .then(function (receipt) { \n transaction = receipt;\n result.gas.used = transaction.gasUsed; \n\n // Convert gas to BigNumber\n result.gas.usedBig = web3.toBigNumber(result.gas.used);\n // Get gas price\n return web3Promise(web3.eth.getGasPrice, null);\n })\n // Use transaction to get block\n .then(function(price) {\n result.gas.price = price;\n result.gas.wei = result.gas.usedBig.times(result.gas.price); \n convertToEthUsd(result.gas);\n return web3Promise(web3.eth.getBlock, transaction.blockHash);\n })\n // Get price of gas\n // Use block to get timestamp\n .then(function success(block) {\n\n // Transform amount to ether\n result.value.wei = result.args.amount\n convertToEthUsd(result.value);\n\n // Update transfer with sign\n if (result.event == 'DepositEvent') {\n result.sign = '+';\n result.to_from = result.args._sender;\n result.type = 'deposit';\n\n self.transfer.deposit.processing = false;\n self.transfer.deposit.message = '';\n } else if (result.event == 'WithdrawalEvent') {\n result.to_from = result.args.recipient;\n result.sign = '—';\n result.type = 'withdrawal';\n\n self.transfer.withdrawal.processing = false;\n self.transfer.withdrawal.message = '';\n }\n\n // Update status of transaction\n result.mined = true;\n result.pending = false;\n \n let hash = transaction.transactionHash;\n\n // If transaction is not in transfer map (not pending)\n if (!self.transactionHashToId.hasOwnProperty(hash)) {\n // Add a time\n result.timestamp = block.timestamp;\n result.time = new Date(result.timestamp * 1000);\n\n // Map id to transaction\n self.transactionHashToId[hash] = self.transferId;\n\n // Add transaction to transfer map\n self.transferMap[self.transferId] = result;\n\n // Increment transfer map\n self.transferId++;\n } else {\n // Get the id \n let id = self.transactionHashToId[hash];\n\n // Update transfer object\n let transfer = self.transferMap[id];\n\n // Transaction is both deposit and withdrawal\n if (transfer.mined) {\n delete self.transferMap[id];\n return;\n }\n transfer.mined = result.mined;\n transfer.pending = result.pending;\n transfer.blockNumber = result.blockNumber;\n transfer.gas = result.gas;\n }\n })\n // Update balances of demo accounts\n .then(function() {\n return updateDemoBalances();\n })\n // Update wallet balance and deposit/withdraw summary\n .then(function() {\n updateDepositWithdraw();\n return updateWalletBalance();\n })\n // Update scope\n .then(function() {\n $rootScope.$apply();\n })\n // Catch errors\n .catch(function(error) {\n self.error = true;\n console.error(error);\n });\n\n }", "title": "" }, { "docid": "23e66c0721f522da0493dfd8a5503d22", "score": "0.5568336", "text": "function logPaidAfterTrialEvent() {\n FB.AppEvents.logEvent('PaidAfterTrial');\n}", "title": "" }, { "docid": "d9342b8a08bc5844850771efa520718d", "score": "0.5564001", "text": "function createTransaction(buttEl, data){\n\n \n generateTransactionDiv(buttEl, data)\n\n addTransactionToStorage(sessionStorage.getItem('setDate'), data)\n\n}", "title": "" }, { "docid": "ac07cf216d317172634db36ae6ce7ea3", "score": "0.5546686", "text": "function stripeCheckoutHandler() {\n if (!date || !startTime || !endTime) {\n setPickDate(true);\n setPickFuture(false);\n return;\n }\n const today = new Date();\n if (date < today) {\n setPickDate(false);\n setPickFuture(true);\n return;\n }\n if (!user || !user.attributes) {\n setDisplayLogin(true);\n return;\n }\n try {\n stripePromise\n .then((stripe) => {\n stripe.redirectToCheckout({\n lineItems: [\n {\n price: biz.stripe_price_id,\n quantity: hoursHandler(),\n },\n ],\n mode: \"payment\",\n successUrl: `${frontUrl}/profile`,\n cancelUrl: `${frontUrl}`,\n });\n })\n .then((result) => {\n reservationHandler();\n });\n } catch {\n alert(\"Payment Error\");\n }\n }", "title": "" }, { "docid": "fc32780f168c72f948b66dad489495f6", "score": "0.55418754", "text": "async shipOrder(idOrder,destination,location,dateTime)\r\n {\r\n console.log(\"START SHIPPING\");\r\n const provider=new HDWalletProvvider(\"DEFINIRE IL PROVIDER\",\r\n \"CHIAVE PRIVATA ACCOUNT\")\r\n const web3 =new Web3(provider); \r\n let c = new web3.eth.Contract(this.abi,this.addr);\r\n var r=await c.methods._shipOrder(idOrder,destination,location,dateTime).send({from :\"CHIAVE PUBBLICA ACCOUNT\"})\r\n .on(\"receipt\",function(d){\r\n return r\r\n });\r\n console.log(\"GAS USED : \"+r.gasUsed);\r\n console.log(\"PUSHBASED INBOUND TIMING :\"+((Date.now()-(dateTime))/1000));\r\n process.exit();\r\n }", "title": "" }, { "docid": "d3a0b87b5065f92825ebbfb2e78ea761", "score": "0.55335456", "text": "async handleFormEvent(event) {\n // stop default behaviour\n event.preventDefault();\n\n // collect form data i.e. account, private key and note\n let account = this.state.account;\n let privateKey = this.state.privateKey;\n let note = this.state.note;\n\n // prepare variables for the switch below to send transactions\n let actionName = \"update\";\n let actionData = {\n user: account,\n note: note,\n };\n\n // define actionName and action according to event type\n // switch (event.type) {\n // case \"submit\":\n // actionName = \"update\";\n // actionData = {\n // user: account,\n // note: note,\n // };\n // break;\n // default:\n // return;\n // }\n console.log(actionName);\n\n // eosjs function call: connect to the blockchain\n const rpc = new JsonRpc(endpoint);\n const signatureProvider = new JsSignatureProvider([privateKey]);\n const api = new Api({rpc, signatureProvider, textDecoder: new TextDecoder(), textEncoder: new TextEncoder()});\n try {\n const result = await api.transact({\n actions: [{\n account: \"notechainacc\",\n name: actionName,\n authorization: [{\n actor: account,\n permission: 'active',\n }],\n data: actionData,\n }]\n }, {\n blocksBehind: 3,\n expireSeconds: 30,\n });\n\n console.log(result);\n this.getTable();\n } catch (e) {\n console.log('Caught exception: ' + e);\n if (e instanceof RpcError) {\n console.log(JSON.stringify(e.json, null, 2));\n }\n }\n }", "title": "" }, { "docid": "3d54986ee1c1b3727d185c781097d7e4", "score": "0.5508366", "text": "static addBill(event)\r\n {\r\n\r\n const userInfo =\r\n {\r\n user_id: Auth.currentUser.id,\r\n bills_title: event.target.parentNode.children[0][0].value,\r\n bill_cost: event.target.parentNode.children[0][1].value,\r\n bill_date: event.target.parentNode.children[0][2].value\r\n }\r\n\r\n ApiAdapter.postRequest(`/users/${Auth.currentUser}/bills`, userInfo)\r\n .then(user=> Dom.updateBills(user))\r\n \r\n }", "title": "" }, { "docid": "884d8dca989023434d288ed22ac8c3b5", "score": "0.55044097", "text": "static updatePaymentStatus(data, event)\r\n {\r\n\r\n let bill = data.bills.find(e=> e.id == event.target.id)\r\n\r\n if (bill.paid !== false)\r\n {\r\n event.target.style.backgroundColor = \"#3EF3D3\";\r\n event.target.style.color = \"black\";\r\n event.target.innerText = \"Paid\";\r\n } \r\n else \r\n {\r\n event.target.style.backgroundColor = \"#21264B\";\r\n event.target.style.color = \"white\";\r\n event.target.innerText = \"Mark Paid\";\r\n }\r\n this.getBillsValue(data);\r\n Dom.updateBars.call(this, data);\r\n }", "title": "" }, { "docid": "ca25a5ef1bab566f84c87d869a9de66b", "score": "0.54949707", "text": "function addtocart() {\n \n onEvent(\"bjAC\", \"click\", function () {\n bjATC();\n });\n \n onEvent(\"eotAC\", \"click\", function () {\n eotATC();\n });\n \n onEvent(\"mlAC\", \"click\", function () {\n mlATC();\n });\n \n onEvent(\"deAC\", \"click\", function () {\n deATC();\n });\n}", "title": "" }, { "docid": "3b9f07cf8fc7b69af84a35aee399a527", "score": "0.5482885", "text": "async function markPaymentComplete(req, res) {\n try {\n const stripeEndpointSecret =\n process.env.STRIPE_PAYMENT_COMPLETE_ENDPOINT_SECRET;\n\n const sig = req.headers[\"stripe-signature\"];\n\n let event = null;\n try {\n event = stripe.webhooks.constructEvent(\n req.rawBody,\n sig,\n stripeEndpointSecret\n );\n } catch (err) {\n // invalid signature\n return res.status(400).json({\n success: false,\n message: \"Invalid stripe signature\",\n });\n }\n\n const intent = event.data.object;\n\n if (event.data.object.metadata.instance !== process.env.HOST) {\n return res.status(200).send();\n }\n\n if (event[\"type\"] === \"payment_intent.payment_failed\") {\n const message =\n intent.last_payment_error && intent.last_payment_error.message;\n // TODO change model to enum. If failed, chance status to failed so that user\n // knows. Else succeded or pending.\n // So I'm not sure what can be done in case payment fails\n // the same payment intent is valid, so there is no point in setting the hasCompletetedPayment property to false or deleting the booking or something\n // Perhaps we'll have to add some mecahnism to notify the customer that the payment failed, and the customer can try again (this was suggested in the stripe webhook docs\n // https://stripe.com/docs/payments/payment-intents/verifying-status#webhooks\n\n // This will be a status 200 because though the webhook informs us of failure, the HTTP request issued by the webhook still succeeds\n return res.status(200).json({\n success: false,\n message: `Payment with ID ${intent.id} failed with message ${message}`,\n });\n } else if (event[\"type\"] === \"payment_intent.succeeded\") {\n // Quickly send the 200 status code as recommended by stripe docs\n res.status(200).json({\n success: true,\n message: `Payment with ID ${intent.id} successful`,\n });\n // If the payment is successful, we can update the booking and create the invoice\n // TODO move this entire block of code into a helper function while refactoring. This is ugly.\n\n let booking = await Booking.findOne({\n stripePaymentIntentId: intent.id,\n }).exec();\n\n // Now that the payment is done and the invoice is ready, we update the booking thingy\n // booking.hasCompletetedPayment = true;\n // booking.save();\n\n if (event.data.object.metadata.type === \"extend\") {\n const newId = event.data.object.metadata.newBookingId;\n const rentalId = event.data.object.metadata.rentalId;\n const existingBooking = await Booking.findByIdAndUpdate(\n newId,\n { hasCompletetedPayment: true },\n { new: true }\n );\n await extendBooking(\n rentalId,\n existingBooking.endDate,\n existingBooking.charges,\n newId\n );\n await pushToInvoiceQueue(rentalId);\n const licenseeId = await Invoice.findById(\n { _id: rentalId },\n { licenseeId: 1 }\n );\n const fcmToken = await Employee.findOne(\n { licenseeId, isOwner: true },\n { fcmDeviceToken: 1 }\n );\n await licenseeNotification(\n \"Extention Request\",\n \"Extention Request for a Booking\",\n \"Extend\",\n rentalId,\n fcmToken.fcmDeviceToken\n );\n } else if (event.data.object.metadata.type === \"reschedule\") {\n const newId = event.data.object.metadata.newBookingId;\n const rentalId = event.data.object.metadata.rentalId;\n const existingBooking = await Booking.findByIdAndUpdate(\n newId,\n { hasCompletetedPayment: true },\n { new: true }\n ).lean();\n await reschedule(\n rentalId,\n existingBooking.startDate,\n existingBooking.endDate,\n existingBooking.charges,\n newId\n );\n const licenseeId = await Invoice.findById(\n { _id: rentalId },\n { licenseeId: 1 }\n );\n const fcmToken = await Employee.findById(\n { licenseeId: licenseeId.licenseeId },\n { fcmDeviceToken: 1 }\n );\n const refundAmount = event.data.object.metadata.refundAmount;\n const refundStripeId = event.data.object.metadata.refundStripeId;\n\n await stripe.refunds.create({\n amount: refundAmount,\n payment_intent: refundStripeId,\n metadata: {\n // reqId: bookingReq._id.toString(),\n type: \"reschedule\",\n newBookingId: newId.toString(),\n rentalId: rentalId.toString(),\n },\n });\n await pushToInvoiceQueue(rentalId);\n await licenseeNotification(\n \"Reschedule Request\",\n \"Reschedule Request for a Booking\",\n \"Reschedule\",\n rentalId,\n fcmToken.fcmDeviceToken\n );\n } else {\n const {\n upsellItems,\n licenseeId,\n trailerId,\n startDate,\n endDate,\n isPickup,\n customerLocation,\n customerId,\n } = booking.toObject();\n\n let upsellItemDetails = [];\n if (upsellItems) {\n upsellItemDetails = upsellItems.map((item) => ({\n itemType: \"upsellitem\",\n id: item.id,\n quantity: item.quantity,\n }));\n }\n\n const invoiceData = {\n objRental: {\n description: \"\",\n licenseeId,\n trailerId: trailerId,\n upsellItems: upsellItemDetails,\n rentalPeriod: {\n start: startDate,\n end: endDate,\n },\n doChargeDLR: booking.doChargeDLR, // TODO confirm whether this is sensible, or if something else needs to be done\n isPickup,\n bookingId: booking._id,\n pickUpLocation: customerLocation, // TODO confirm whether this is accurate\n dropoffLocation: customerLocation, // TODO confirm whether this is accurate\n },\n userId: customerId,\n };\n\n console.log(\"invoice data\", JSON.stringify(invoiceData));\n\n let invoice = await createInvoice(invoiceData);\n console.log(`Created invoiceId ${invoice._id}`);\n await pushToInvoiceQueue(invoice._id);\n let financial = new Financials({\n customerId: customerId,\n licenseeId: licenseeId,\n bookingId: booking._id,\n rentalId: invoice._id,\n incoming: [\n {\n revisionType: \"booking\",\n amount: invoice.charges.totalPayableAmount,\n revisedAt: new Date(),\n },\n ],\n outgoing: [],\n });\n const employeeData = await Employee.findOne({licenseeId:licenseeId,isOwner:true},{fcmDeviceToken:1})\n await licenseeNotification(\"Booking Complete\",`Booking Made for Booking ID ${booking._id}`,'booking',`${invoice._id}`,employeeData.fcmDeviceToken)\n await financial.save();\n // All the stuff until here is a part of the invoice creation thingy and must be moved into a helper function\n }\n } else if (event[\"type\"] === \"payout.paid\") {\n res.status(200).json({\n success: true,\n message: `Payment with ID ${intent.id} successful`,\n });\n\n let licenseePayout = await LicenseePayout.findOne({\n stripePayoutId: intent.id,\n }).exec();\n\n licenseePayout.completed = true;\n licenseePayout.save();\n } else if (event[\"type\"] === \"payout.failed\") {\n //TODOdo something here, ideally set complteted to enum\n } else {\n // Nothing else to do here I suppose\n return res.status(200).json({\n success: true,\n });\n }\n } catch (err) {\n console.error(err);\n res.status(500).json({\n success: false,\n message: `${err}`,\n });\n }\n}", "title": "" }, { "docid": "8bcc82be21b1cda3c11fb594f5791537", "score": "0.545098", "text": "onGooglePaymentButtonClicked() {\n if (this.paymentType != this.allPaymentTypes.googlePay) {\n // button is only clickable if google pay is not paymentType\n\n let paymentDataRequest = {};\n const that = this;\n\n checkoutEventBus.$emit('payment-method-unselect');\n this.paymentType = this.allPaymentTypes.googlePay;\n // hides the Place Order button upon google pay button click\n\n checkoutEventBus.$emit('update-payment-type', this.paymentType);\n paymentDataRequest = this.getGooglePaymentDataRequest();\n paymentDataRequest.transactionInfo = this.getGoogleTransactionInfo();\n this.paymentsClient = this.getGooglePaymentsClient();\n\n this.paymentsClient\n .loadPaymentData(paymentDataRequest)\n .then(function (paymentData) {\n that.processPayment(paymentData);\n\n })\n .catch(function (err) {\n // change payment type back to credit/debit if any error occurs\n console.log(err)\n if (err.statusCode = \"CANCELED\") {\n checkoutEventBus.$emit('payment-method-default');\n }\n });\n }\n\n }", "title": "" }, { "docid": "77a0a9d77104a11011b1fcc895dd1b67", "score": "0.543348", "text": "function _0001485874443487_Payments_Cash_payment_type()\n{\n // InitializationEnviornment.initiliaze();\n //AppLoginLogout.login();\n //placeOrder(\"Daily Admission\",\"Date/Time\",\"Adult\",2,CommonCalender.getTodaysDate(),\"Cash\");\n var verifyText =\"Refund due: $\"+\"0\";\n Button.clickOnButton(Refund_Button);\n WrapperFunction.setTextValue(refundReservationConfReasontext,\"Test Cancel and refund amount\"); \n Button.clickOnButton(refundReservationConfOK);\n aqUtils.Delay(2000);\n var refundText = confirmationChangeDue.Caption;\n \n if(refundText.startsWith(verifyText)){\n Log.Message(\"The payment summary on the bottom right shows correct values.\");\n }\n else{\n merlinLogError(\"The payment summary is not correctly displayed.\");\n }\n \n // AppLoginLogout.logout(); \n}", "title": "" }, { "docid": "f7bed7d65402489e3c19d043d1cff843", "score": "0.5427535", "text": "processCheckout(event) {\n this.action = event.target.getAttribute('data-url')\n this.formIsLoading = true\n\n if (this.currentCheckout.payment.provider === 'free' || this.currentCheckout.payment.provider === 'paypal') {\n this.submitCheckoutToServer()\n } else {\n /**\n * Client-side process the checkout and get a stripe token. See the watch\n * section for the 'payment' watch which acts as a callback when stripe\n * has returned a token or error.\n */\n this.currentCheckout.payment.error = {}\n this.waitingForResult = true\n this.emit('createToken', this.stripeData)\n }\n }", "title": "" }, { "docid": "ec4352c51e349543d61ca6b6bb0bc696", "score": "0.54131365", "text": "function makePayment(){\n // get user payment\n // update current balance\n // change style of table row for month payed.\n}", "title": "" }, { "docid": "e0990a1f8a0e8856d947bf70ef830cb5", "score": "0.5412716", "text": "setCheckoutStagePayment() {\n this.prepareNextStage(Stage.PAYMENT, Stage.COMPLETE)\n }", "title": "" }, { "docid": "c50872affcd7e7f6d9286717c68c268f", "score": "0.5411805", "text": "async onBuy() {\n if (!(await BaseViewModel.isAuthorised())) {\n await EventBus.emit(Events.ChangePath, {path: Routes.Login});\n return;\n }\n\n const selectedPlacesDataset = Array.from(document.getElementsByClassName('button-seat-selected')).map((place) => {\n return place.dataset;\n });\n\n const ticketViewModel = new TicketViewModel();\n for (const selectedPlace of selectedPlacesDataset) {\n const item = {};\n item.place = Number(selectedPlace.place);\n item.row = Number(selectedPlace.row);\n ticketViewModel.state.placeFields.push(item);\n }\n ticketViewModel.state.login = (await Getter.getProfile()).login;\n ticketViewModel.state.scheduleID = selectedPlacesDataset[0].session;\n\n EventBus.emit(Events.ChangePath, {path: Routes.TicketPay, ticketViewModel});\n }", "title": "" }, { "docid": "db963d7c67f2f6651caafde6c97ae08a", "score": "0.54050463", "text": "handleRowAction(event) {\n const row = event.detail.row;\n voidPayments({accountId : row.Id}).then(() => {\n return refreshApex(this.accountData);\n });\n }", "title": "" }, { "docid": "2bb6b54b3f291f467f8d85bde2e44f42", "score": "0.5401071", "text": "function otpAddDataSave(event, addOtpData, config, client) {\n //console.log(addFormOtp);\n delete addOtpData.province;\n delete addOtpData.Tehsil;\n delete addOtpData.district;\n delete addOtpData.province;\n delete addOtpData.ddHealthHouseOTP;\n delete addOtpData.uc;\n addOtpData.client_id = client;\n addOtpData.username = config.usernameL;\n addOtpData.org_name = config.org_nameL;\n addOtpData.project_name = config.project_nameL;\n const addFormOtp = addOtpData;\n console.log(addFormOtp);\n knex('tblOtpAdd')\n .insert(addFormOtp)\n .then(result => {\n console.log(result + 'OTP addmision added')\n sucMsg(event, '', 'OTP admission added successfully')\n // addOtp.webContents.send(\"resultSentOtpAdd\", {\n // 'msg': 'records added'\n // });\n var interimData = {\n otp_id: addOtpData.otp_id,\n interim_id: _uuid(),\n client_id: imran.client,\n muac: addFormOtp.muac,\n weight: addFormOtp.weight,\n ration1: addFormOtp.ration1,\n quantity1: addFormOtp.quantity1,\n ration2: (addFormOtp.ration2 ? addFormOtp.ration2 : ''),\n quantity2: addFormOtp.quantity2,\n ration3: (addFormOtp.ration3 ? addFormOtp.ration3 : ''),\n quantity3: addFormOtp.quantity3,\n curr_date: localDate(),\n created_at: localDate(),\n status: 'open',\n next_followup: function () {\n var myDate = new Date(addOtpData.reg_date);\n myDate.setDate(myDate.getDate() + (addOtpData.prog_type == 'sfp' ? 14 : 7))\n return toJSONLocal(myDate)\n }()\n }\n console.log(interimData)\n return knex('tblInterimOtp')\n .insert(interimData)\n })\n .then(result => {\n console.log('interim ID: ', result);\n })\n .catch(e => {\n console.log(e)\n console.log(e + 'OTP add error');\n errMsg(event, '', 'OTP Addmision not added, plz try again or contact admin');\n // addOtp.webContents.send(\"resultSentOtpAdd\", {\n // 'err': 'records not added, plz try again'\n // });\n })\n // addFormOtp = null;\n}", "title": "" }, { "docid": "c2629d969b35c63e0b4e413e239a6213", "score": "0.53937316", "text": "async handleFormEvent(event) {\n // stop default behaviour\n event.preventDefault()\n\n console.log()\n // collect form data\n let account = \"notechainacc\"\n let privateKey = \"5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3\"\n\n // prepare variables for the switch below to send transactions\n let actionName = \"devsetjobdone\"\n let actionData = {\n timestamp: (Date.now() / 1000) | 0,\n jobid: this.state.jobId,\n rating: event.target.score.value,\n developer: \"janesmith\",\n appraisal: event.target.desc.value\n }\n\n // eosjs function call: connect to the blockchain\n const rpc = new JsonRpc(endpoint)\n const signatureProvider = new JsSignatureProvider([privateKey])\n const api = new Api({\n rpc,\n signatureProvider,\n textDecoder: new TextDecoder(),\n textEncoder: new TextEncoder()\n })\n try {\n const result = await api.transact(\n {\n actions: [\n {\n account: \"notechainacc\",\n name: actionName,\n authorization: [\n {\n actor: \"notechainacc\",\n permission: \"active\"\n }\n ],\n data: actionData\n }\n ]\n },\n {\n blocksBehind: 3,\n expireSeconds: 30\n }\n )\n\n console.log(result)\n\n let path = \"/balance/janesmith\"\n this.props.history.push(path)\n } catch (e) {\n console.log(\"Caught exception: \" + e)\n if (e instanceof RpcError) {\n console.log(JSON.stringify(e.json, null, 2))\n }\n }\n }", "title": "" }, { "docid": "e12ddefe0571e98beed0809bc17e7966", "score": "0.5391467", "text": "doPayout(amount){\n\t\tassert(loaded, \"Not Loaded\");\n\t\treturn new Promise((resolve, reject) => {\n\t\t\ttheCouncil.doPayout(amout, (err, txHash) => {\n\t\t\t\tif (err) {\n\t\t\t\t\treject(err);\n\t\t\t\t} else {\n\t\t\t\t\tresolve(txHash);\n\t\t\t\t\t// You can say something like \"Visit https://ropsten.etherscan.io/tx/\"+txHash\n\t\t\t\t}\n\t\t\t});\n\t\t})\n\t}", "title": "" }, { "docid": "4562af84ae5b7de61a0a8f6f636b26a2", "score": "0.5390717", "text": "@action payUpayment(){\n if (this.payUvalidation()){\n this.inProgressPU = true;\n return Api('/payu', {method: 'post', body: {\n card_holder: this.payu.cardHolder,\n card_number: this.payu.cardNumber,\n card_cvc: this.payu.cvc,\n card_month: this.payu.cardMonth,\n card_year: this.payu.cardYear,\n buyer_email: this.payu.email,\n buyer_country: this.payu.country,\n buyer_city: this.payu.city,\n buyer_address: this.payu.address,\n buyer_idcard: this.payu.documentType,\n buyer_dni_number: this.payu.documentNumber,\n buyer_phone: this.payu.phone,\n product_id: this.product.product_id,\n device_session_id: this.deviceSessionId\n }\n })\n .then(action('then', (data) => {\n if(data.status) {\n this.inProgressPU = false;\n this.payUafter(data.transaction_id);\n } else {\n this.payu.cardHolder = '';\n this.payu.cardNumber = '';\n this.payu.cvc = '';\n this.payu.cardMonth = '0';\n this.payu.cardYear = '0';\n\n this.inProgressPU = false;\n this.errorDescription = '';\n if(data.error_code){\n this.errorDescription = data.error_code;\n }\n if(data.error_description){\n this.errorDescription = this.errorDescription +' '+data.error_description;\n }\n }\n }))\n .catch(action('catch', ({error}) => {\n this.inProgressPU = false;\n this.error = error;\n }))\n }\n }", "title": "" }, { "docid": "4d226751c8b81fdde3318943867975d6", "score": "0.5388843", "text": "@action payPalAfter(tx) {\n if(viewerStore.token) {\n // check and show success page\n this.payPalCheck(tx);\n\n viewerStore.AfterBuy = false;\n viewerStore.isAfterPaymentPopup = false;\n window.localStorage.removeItem('tx');\n } else {\n viewerStore.AfterBuy = true;\n viewerStore.isAfterPaymentPopup = true;\n window.localStorage.setItem('tx', tx);\n }\n }", "title": "" }, { "docid": "8b9111900f3790e7ef9b035f7fa4384e", "score": "0.5385903", "text": "function onBuyClicked() {\n var supportedInstruments = [\n {\n supportedMethods: 'https://android.com/pay',\n data: {\n merchantName: 'Rouslan Solomakhin',\n merchantId: '00184145120947117657',\n allowedCardNetworks: ['AMEX', 'MASTERCARD', 'VISA', 'DISCOVER'],\n paymentMethodTokenizationParameters: {\n tokenizationType: 'GATEWAY_TOKEN',\n parameters: {\n 'gateway': 'stripe',\n 'stripe:publishableKey': 'pk_live_lNk21zqKM2BENZENh3rzCUgo',\n 'stripe:version': '2016-07-06',\n },\n },\n },\n },\n {\n supportedMethods: 'basic-card',\n },\n ];\n\n var details = {\n total: {\n label: 'Donation',\n amount: {\n currency: 'USD',\n value: '55.00',\n },\n },\n displayItems: [\n {\n label: 'Original donation amount',\n amount: {\n currency: 'USD',\n value: '65.00',\n },\n },\n {\n label: 'Friends and family discount',\n amount: {\n currency: 'USD',\n value: '-10.00',\n },\n },\n ],\n shippingOptions: [\n {\n id: 'standard',\n label: 'Standard shipping',\n amount: {\n currency: 'USD',\n value: '0.00',\n },\n selected: true,\n },\n {\n id: 'express',\n label: 'Express shipping',\n amount: {\n currency: 'USD',\n value: '12.00',\n },\n },\n ],\n };\n\n var options = {\n requestShipping: true,\n requestPayerName: true,\n requestPayerPhone: true,\n requestPayerEmail: true,\n };\n\n if (!window.PaymentRequest) {\n error('PaymentRequest API is not supported.');\n return;\n }\n\n try {\n var request = new PaymentRequest(supportedInstruments, details, options);\n\n request.addEventListener('shippingaddresschange', function(e) {\n e.updateWith(new Promise(function(resolve) {\n window.setTimeout(function() {\n // No changes in price based on shipping address change.\n resolve(details);\n }, 2000);\n }));\n });\n\n request.addEventListener('shippingoptionchange', function(e) {\n e.updateWith(new Promise(function(resolve) {\n resolve(updateDetails(details, request.shippingOption));\n }));\n });\n\n request.show()\n .then(function(instrumentResponse) {\n window.setTimeout(function() {\n instrumentResponse.complete('success')\n .then(function() {\n done(\n 'This is a demo website. No payment will be processed.',\n instrumentResponse);\n })\n .catch(function(err) {\n error(err);\n });\n }, 2000);\n })\n .catch(function(err) {\n error(err);\n });\n } catch (e) {\n error('Developer mistake: \\'' + e.message + '\\'');\n }\n}", "title": "" }, { "docid": "2b6c276df251c5704a60fbdfca8de000", "score": "0.53714305", "text": "async updateInvitePayment({ state, commit }, payload) {\n // poast the data\n await this.$axios.post(`/invites/${state.invite.id}/payment`, {\n new_invite: {\n payment: payload.data\n }\n })\n .then(result => {\n // set the order\n commit('SET_INVITE', {invite: result.data.data})\n })\n }", "title": "" }, { "docid": "c78f4301d645d36ee2bd1b94e2e6a77f", "score": "0.5370352", "text": "function _submitPayment() {\n\n vm.$jobsService.InsertBringgJob(vm.jobId, vm.insertBringgJobSuccess, vm.insertBringgJobFail);\n\n\n //update service in here to update the job nonce\n var jobPayload = {\n 'PaymentNonce': vm.customerCards.externalCardIdNonce\n\n }\n\n vm.$jobsService.updatePaymentNonce(vm.jobId, jobPayload, vm.updateSuccess, vm.commonErrorHandler);\n\n }", "title": "" }, { "docid": "ef11ef8c2801819d6f607e15df7e2a4a", "score": "0.53701544", "text": "function generatePayment (req, res) {\n \n /*\n * Mercadopago\n */\n\n let userData = { \n user_fullname: req.body.user_fullname,\n user_email: req.body.email,\n user_id: req.body.user_id,\n total_amount: req.body.total_amount\n }\n \n console.log(\"++++++++++++++++++++++++++++++++++++++++++++++++++++\", process.env.MP_CLIENT_ID, process.env.MP_CLIENT_SECRET, userData)\n let mp = new MP (process.env.MP_CLIENT_ID, process.env.MP_CLIENT_SECRET)\n\n let preference = {\n \"items\": [\n {\n \"id\": Date.now(),\n \t\t\t\"title\": \"Gestione su garantía inmobiliaria con mínimos requisitos, en menos de 48hs y desde la comodidad de su casa.\",\n \t\t\t\"description\": \"Garantía inmobiliara\",\n \t\t\t\"currency_id\": \"ARS\",\n \t\t\t\"picture_url\": process.env.FRONTEND_DOMAIN + \"/api/logo.png\",\n \t\t\t\"category_id\": \"others\", // Available categories at https://api.mercadopago.com/item_categories\n \t\t\t\"quantity\": 1,\n \t\t\t\"unit_price\": 1 // Number(userData.total_amount)\n }\n ],\n \t\"back_urls\": {\n \t\t\"success\": \"https://cyc.dmarcote.avatarla.io/pago/\",\n \t\t\"failure\": \"https://cyc.dmarcote.avatarla.io/pago/\",\n \t\t\"pending\": \"https://cyc.dmarcote.avatarla.io/pago/\"\n \t},\n \t\"auto_return\": \"all\",\n \t\"notification_url\": \"https://cyc.dmarcote.avatarla.io/api/notifications\",\n \t\"external_reference\": userData.user_id,\n \t\"expires\": true,\n \t\"expiration_date_from\": \"2020-02-01T12:00:00.000-04:00\",\n \t\"expiration_date_to\": \"2020-02-28T12:00:00.000-04:00\"\n }\n\n mp.createPreference (preference, function (err, preferenceResult){\n if (err) {\n console.log('Error!')\n } else {\n \n let updateData = { \n name: req.body.name,\n last_name: req.body.last_name,\n status: req.body.status,\n nosis: req.body.nosis,\n comments: req.body.comments,\n preferences: JSON.stringify(preferenceResult.response),\n url: process.env.FRONTEND_DOMAIN,\n tems: 'https://cycwp.dmarcote.avatarla.io/app/uploads/2018/06/cyc-demo.pdf'\n }\n \n User.findOneAndUpdate({ '_id': userData.user_id }, updateData, {new: true} ).then((updatedData) => {\n if(updatedData === null){\n console.log('User Not Found');\n }\n \n let dataForm = {\n user_fullname: userData.user_fullname,\n link: preferenceResult.response.init_point,\n url: process.env.FRONTEND_DOMAIN\n }\n \n /*\n * Mail\n */\n Mailer.paymentGenerated(userData.user_email, dataForm)\n \n return res.status(200).send({\n message: `Preference saved!`,\n responseStatus: `success`,\n data: updatedData\n })\n \n }).catch( (error) => {\n return res.status(200).send({\n message: `${error}`,\n responseStatus: `danger`\n })\n })\n \n \n }\n })\n \n}", "title": "" }, { "docid": "4287ab639ff50c640ffd3f3e47bd7bfa", "score": "0.53634197", "text": "infoPlacerPayment(evt) {\n //find the object name with the same name\n this.state.debtDetail.forEach((object) => {\n if (evt.target.name === object.name) {\n object.payment = evt.target.value;\n }\n })\n }", "title": "" }, { "docid": "30c626a34df1434cd5f1594925de33c6", "score": "0.5360114", "text": "function C17318_Confirmation_Screen_dollor_0_Purchases_()\n{\n \n InitializationEnviornment.initiliaze();\n AppLoginLogout.login();\n try {\n Log.AppendFolder(\"C17318_Confirmation_Screen_dollor_0_Purchases_\");\n var keyWordNm =\"Daily Admission\";\n var packageNm = \"Dated\";\n var subPakNm =\"Children (Ages 3-12)\"; \n var dateD = CommonCalender.getTodaysDate();\n var givenPaymentType =\"Cash\"; \n OrderInfo.prototype.OrderID = 0;\n WrapperFunction.selectKeywordName(keyWordNm);\n selectPackage(packageNm,subPakNm); \n if(datetimeformSubWindow.Exists){ \n selectDateFromSubWindow(dateD); //mm-dd-yyyy \n selectNextButtonFromSubWindow(); \n } \n finilizeOrder();\n aqUtils.Delay(2000); \n var settlementTotal =orderDetailsTotal.Caption;\n Log.Message(\"Verified order details on settlement page\"); \n CashButton.Click(); \n applyAmount= aqString.Replace(settlementTotal,\"$\",\"\"); \n OrderInfo.prototype.OrderTotalAmount = applyAmount.trim();\n Log.Message(\"Order total amount is set:\",OrderInfo.prototype.OrderTotalAmount); \n WrapperFunction.setTextValue(PayamountTextBox,applyAmount);\n Button.clickOnButton(applyButton); \n Log.Message(\"Complete the order\");\n aqUtils.Delay(1000);\n WrapperFunction.settlementCompleteOrder();\n aqUtils.Delay(2000);\n validateTicket(\"Don't Validate\");\n Log.Message(\"Don't Validate the order\"); \n verifyTotalOnConfirmationPage(settlementTotal);\n var orderId = cnf_orderID1.Caption;\n if (orderId == null){\n merlinLogError(\"Order id is not present\");\n } \n \n Button.clickOnButton(NewOrder_Button);\n \n var subPakNm =\"Under 3\"; \n \n WrapperFunction.selectKeywordName(keyWordNm);\n selectPackage(packageNm,subPakNm); \n if(datetimeformSubWindow.Exists){ \n selectDateFromSubWindow(dateD); //mm-dd-yyyy \n selectNextButtonFromSubWindow(); \n } \n finilizeOrder();\n aqUtils.Delay(2000); \n var settlementTotal1 =orderDetailsTotal.Caption;\n Log.Message(\"Verified order details on settlement page\"); \n if(settlementTotal == settlementTotal1){\n merlinLogError(\"getting previous values\");\n } \n Log.Message(\"Complete the order\");\n WrapperFunction.settlementCompleteOrder();\n aqUtils.Delay(2000);\n validateTicket(\"Don't Validate\");\n Log.Message(\"Don't Validate the order\"); \n verifyTotalOnConfirmationPage(settlementTotal1);\n if(cnf_orderDetailsTotal.Caption != \"$0.00\" ){\n merlinLogError(\"The $0 payment details are not displayed correctly.\");\n }else{\n Log.Message(\"The $0 payment details are displayed correctly.\");\n } \n } catch (e) {\n\t merlinLogError(\"Oops! There's some glitch in the script: \" + e.message);\n\t return;\n }\n finally { \n\t Log.PopLogFolder();\n } \n AppLoginLogout.logout(); \n}", "title": "" }, { "docid": "83329fdfaf2ef75d3c67e0540851b91c", "score": "0.53585523", "text": "function pay(from_id, to_id, value){\n let id_pagamento_from = bd[from_id].id_pagamento;\n let id_pagamento_to = bd[to_id].id_pagamento;\n let username_from = bd[from_id].username;\n let number_to = bd[to_id].numero;\n transferP2P(id_pagamento_from, id_pagamento_to, value);\n sendMessage(to_id, \"Você recebeu \" + String(value) + \" reais de @\" + username_from);\n sendSMS(\"Você recebeu \" + String(value) + \" reais de \" + username_from, number_to);\n}", "title": "" }, { "docid": "8b801a3161ca5f72c999ad2d743f29d6", "score": "0.5355405", "text": "callRowAction(event){\n if(event.detail.action.name === 'Send Opportunity'){\n this.opp = {\n id: event.detail.row.Id,\n name: event.detail.row.Name,\n accName: event.detail.row.AccountName__c,\n stage: event.detail.row.StageName,\n type: event.detail.row.Type,\n amount: event.detail.row.Amount\n }\n this.openModal = true;\n }\n }", "title": "" }, { "docid": "1b07090b49a2841be1fc55d1327537a3", "score": "0.534737", "text": "postOrder(paymentMode, captureID = '', payGetWayType = '',Paymentpop = 'No') {\n\t\t\n\t\tlet currentUserAuthToken = cookie.load('UserAuthToken');\n\t\t\n if (currentUserAuthToken === '' || currentUserAuthToken === undefined) {\n window.location.href = \"/\";\n }\n var qs = require('qs')\n \n var postObject = {};\n postObject = {\n /* cart details */\n 'app_name': appName,\n 'transaction_topup_id': this.state.packageId,\n 'transaction_promo_id': this.state.promo_id,\n 'transaction_user_Token': currentUserAuthToken, \n 'transaction_payment_mode': paymentMode,\n 'transaction_payment_type': payGetWayType,\n 'transaction_currency': this.state.getstripeCurrency,\n \"transaction_amount\": parseFloat(this.state.packageAmout).toFixed(2),\n \"transaction_payment_status\": '',\n \"transaction_percentage\": this.state.promo_percentage,\n \"transaction_points\": this.state.packagePoints,\n \"transaction_promo_points\": this.state.promo_points,\n \"transaction_order_source\": 'Web',\n \"transaction_payment_getway_status\": 'Yes',\n }\n this.setState({ repeatMode : 2})\n this.props.topupPoints(qs.stringify(postObject));\n\t}", "title": "" }, { "docid": "b231d9d4b8ab45e620e69a54ae6c978e", "score": "0.53406054", "text": "function _createPayment(order, user,advance) {\n\n var data = {\n documentId : order.id,\n currencyId : order.currencyId,\n paymentDocumentType : 1,\n cashierId : user.id,\n cashierOfficeId : parseInt(user.settings.cashierOffice),\n paymentType : \"payment\",\n amount : parseFloat(advance),\n paymentMethod : \"bank\",\n note : \"&nbsp\"\n };\n console.log(\"paymentCreate\",data);\n RestFactory.request(config.API.host + \"payment/create\", \"POST\", data).then(function(response){\n if(_.has(response,\"id\")){\n messageCenterService.add(\"success\",\"Payment created\",{timeout:1000});\n }\n else{\n messageCenterService.add(\"danger\",\"Payment is not created\",{timeout:1000});\n }\n });\n }", "title": "" }, { "docid": "284b5be9a0ed1a63cca7696d719771a7", "score": "0.5331994", "text": "handler(){\n var sum = 0;\n if(this.transactions == null) this.totalPayed = sum;\n this.transactions.forEach(e => {\n sum += e.amount;\n });\n this.totalPayed = sum;\n this.total = this.totalPrice - this.totalPayed;\n\n }", "title": "" }, { "docid": "3f2a9dca0b14cf2ef5c67b6dda0d0460", "score": "0.5330696", "text": "function addListenerForSubmitPayment(){\n\t\tvar submit_elements = document.getElementsByClassName(\"submit-payment\");\n\t\tfor(var i = 0; i < submit_elements.length; i++){\n\t\t\tsubmit_elements[i].addEventListener(\"click\", function(e){\n\t\t\t\t\n\t\t\t\tvar transaction = validateTranscationDetails(e);\n\t\t\t\t\n\t\t\t\tif(!transaction){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttransaction['subscribed_items'] = subscribed_items;\n\n\t\t\t\tvar xhr = new XMLHttpRequest();\n\t\t\t\t\n\t\t\t\txhr.onreadystatechange = function() {\n\t\t\t\t if(xhr.readyState == 4 && xhr.status == 200) {\n\t\t\t\t \t\n\t\t\t\t \tvar response = JSON.parse(xhr.responseText);\n\t\t\t\t \tvar result = \"fail\";\n\t\t\t\t \tif(response['status'] > 0){\n\t\t\t\t \t\tresult = \"pass\";\n\t\t\t\t \t\tif(checkoutType == \"cart\"){\n\t\t\t\t \t\t\tmodifyCartItem({'cust_id': user.id}, \"delete\", result);\n\t\t\t\t \t\t}\n\t\t\t\t \t\telse{\n\t\t\t\t \t\t\tnavigateToConfirmation(result);\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\tnavigateToConfirmation(result);\n\t\t\t\t \t}\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\txhr.open(\"POST\", \"CustomerSubscriptions\", true);\n\t\t\t\txhr.setRequestHeader('Content-Type', 'application/json');\n\t\t\t\txhr.send(JSON.stringify(transaction));\n\t\t\t});\n\t\t}\n\t}", "title": "" }, { "docid": "736bb98c1685ea44f4441658dcc58e08", "score": "0.5329132", "text": "pushDataLayer(paymentMethod) {\n // If the event has already been sent to GA4 once,\n // do not send another event.\n window.dataLayer = window.dataLayer || [];\n if (window.dataLayer.find((e) => e.event === 'add_payment_info')) {\n return;\n }\n\n if (this.paymentForm) {\n this.pushDataLayerForDonation(paymentMethod);\n } else {\n this.pushDataLayerForEventRegistration(paymentMethod);\n }\n }", "title": "" }, { "docid": "09ae1ca1db29691ca9371d1ea46c1442", "score": "0.53268343", "text": "function archiveOrder (inObj) {\n var obj = CartService.getAcceptedOrder();\n var currentTime = DateFormatter.formatAMPM();\n var todaysDate = DateFormatter.formatMMDDYYYY();\n var day = DateFormatter.formatDD();\n var month = DateFormatter.formatMM();\n var year = DateFormatter.formatYYYY();\n var orderTotal = CartService.getOrderTotal(obj.order);\n var order = {\n vid: AppGlobals.getVenueId(),\n sid: AppGlobals.getUserId(),\n uid: obj.uId,\n userOrder: obj.order,\n orderStatus: inObj.status,\n orderAction: inObj.statusMsg,\n transTime: currentTime,\n transDate: todaysDate,\n transTotal: orderTotal,\n m: month,\n d: day,\n yr: year,\n directMessage: ''\n };\n var messages = MessageService.forDirectMessage(AppGlobals.getDirectChannelId());\n messages.$loaded( function (msgs) {\n order.directMessage = msgs;\n VenueService.archiveVenueOrder(order);\n if (inObj.status === 'completed') {\n ProfileService.archivePatronsOrder(order);\n }\n\n\n }, function (error) {\n //handle error\n $log.log('forDirectMessage : error ', error);\n });\n\n }", "title": "" }, { "docid": "ceb058bf93f2a9e1106c14ddb4d5aec0", "score": "0.5315848", "text": "async function addPaymentObject(config) {\n try {\n const FEE_PERCENTAGE = 10; // e.g. 100 = 100%, 52 = 52%, 0 = 0%\n\n const orderId = config.obNotice.notification.orderId;\n\n const orderInfo = await openbazaar.getOrder(config, orderId);\n //console.log(`orderInfo: ${JSON.stringify(orderInfo, null, 2)}`);\n\n // Payment in Satoshis.\n const contractPrice = orderInfo.paymentAddressTransactions[0].value;\n\n // Subtract fee\n const fee = Math.floor((contractPrice * FEE_PERCENTAGE) / 100);\n const net = contractPrice - fee;\n\n console.log(`contractPrice: ${contractPrice}, fee: ${fee}, net: ${net}`);\n\n // construct the payment object.\n const paymentObj = {\n payTime: config.expiration,\n payQty: net,\n refundAddr: orderInfo.contract.buyerOrder.refundAddress,\n };\n\n // Add the payment object to the payments array.\n config.devicePrivateData.payments.push(paymentObj);\n\n // Persist the payment array.\n const options = {\n method: \"PUT\",\n uri: `${config.server}:${config.port}/api/deviceprivatedata/${config.devicePrivateData._id}`,\n json: true, // Automatically stringifies the body to JSON\n body: {\n devicePrivateData: {\n payments: config.devicePrivateData.payments,\n },\n },\n headers: {\n Authorization: `Bearer ${config.jwt}`,\n },\n };\n\n const data = await rp(options);\n //console.log(`devicePrivateModel: ${JSON.stringify(data, null, 2)}`);\n\n return data.devicePrivateData;\n } catch (err) {\n config.logr.error(`Error in util.js/addPaymentObject(): ${err}`);\n throw err;\n }\n}", "title": "" }, { "docid": "1fb316c7a5dba8d11dbb6909e191b46f", "score": "0.5313569", "text": "function onVisaCheckoutReady(){\n V.init( {\"apikey\": \"SHFXEEENG1DRM9V4G3JH21uxRhUQ0i6a_hIpXk4FJCDC7CIzc\",\"paymentRequest\":{\"currencyCode\": \"GBP\",\"total\": \"58.72\",\"orderId\": \"29027503\"},\"settings\": {\"locale\": \"en_GB\",\"displayName\": \"Funky Pigeon\"}});\n \n V.on(\"payment.success\", function(payment)\n {\n $.ajax({\n type: \"POST\",\n url: \"/Pages/payment/PaymentReview.aspx/GetVisaPaymentData\",\n data: JSON.stringify({ visaPayment: JSON.stringify(payment) }),\n contentType: \"application/json; charset=utf-8\",\n dataType: \"json\",\n success: function (msg) {\n console.log(msg);\n var res = eval(msg.d);\n if (res.ErrorCode == \"1\") {\n location.href = \"/pages/payment/PaymentReview.aspx\";\n }\n else\n { \n var errorString = res.Error;\n location.href = \"/pages/payment/PaymentError.aspx?IssueDetails=&ErrorDetails=\" + errorString;\n }\n }\n }); \n });\n\n V.on(\"payment.cancel\", function(payment)\n {\n //\n });\n\n V.on(\"payment.error\", function(payment, error)\n {\n var errorString = error;\n // location.href = \"/pages/payment/PaymentError.aspx?IssueDetails=&ErrorDetails=\" + errorString;\n });\n }", "title": "" }, { "docid": "61a78f46e90d51e2d57a387309d4abbd", "score": "0.530773", "text": "function receivedDeliveryConfirmation(event){var senderID=event.sender.id;var recipientID=event.recipient.id;var delivery=event.delivery;var messageIDs=delivery.mids;var watermark=delivery.watermark;var sequenceNumber=delivery.seq;senderID=parseInt(senderID);recipientID=parseInt(recipientID);if(messageIDs){messageIDs.forEach(function(messageID){//console.log(\"Received delivery confirmation for message ID: %s\", messageID);\n});}//console.log(\"All message before %d were delivered.\", watermark);\n}", "title": "" }, { "docid": "8d4a011db759992b01f89de0835c54bd", "score": "0.53045416", "text": "function addProductstoCart(evento){\n // add card to Cart\n carrito.push(evento.target.getAttribute('marcador'));\n // Calculo el total\n calcularTotal();\n // actualizar Cart\n addItemtoCart();\n}", "title": "" }, { "docid": "6f7955cb41922934025bf5a907a1e438", "score": "0.5300811", "text": "async handleSubmit(e) {\n const items = this.props.cart.toJS();\n const products = items.map(n => ({ ...n.item,\n quantity: n.quantity\n }));\n let data = null;\n\n if (e.toJS) {\n data = e.toJS();\n } else {\n data = e;\n }\n\n return this.props.onPlaceOrder({\n items,\n ...data\n }).then(placeOrderResponse => {\n this.props.onSetPaymentDetails(placeOrderResponse);\n Object(_analytics__WEBPACK_IMPORTED_MODULE_9__[\"trackPurchase\"])({ ...data,\n products\n });\n this.props.history.push({\n pathname: Object(_server_helpers_routing__WEBPACK_IMPORTED_MODULE_13__[\"getUrl\"])(_constants__WEBPACK_IMPORTED_MODULE_8__[\"PAYMENT_SUCCESS_PAGE\"])\n });\n }).catch(error => {\n console.error(error);\n this.props.history.push({\n pathname: Object(_server_helpers_routing__WEBPACK_IMPORTED_MODULE_13__[\"getUrl\"])(_constants__WEBPACK_IMPORTED_MODULE_8__[\"PAYMENT_FAILED_PAGE\"])\n });\n });\n }", "title": "" }, { "docid": "eb981e452b7f05e793cca5be83ab3f82", "score": "0.52903336", "text": "async _onOnlinePayment() {\n const responseTicketViewModel = this._ticketViewModel.buyTicketCommand.exec();\n\n await responseTicketViewModel\n .then(() => {\n document.querySelector('.payment__crypto').style.display = 'none';\n document.querySelector('.payment__options').style.display = 'none';\n document.querySelector('.payment__success').style.display = 'block';\n setTimeout(() => {\n EventBus.emit(Events.ChangePath, {path: Routes.ProfilePage});\n }, 2000);\n }).catch((err) => {\n const validation = document.querySelector('.validation-block');\n validation.innerHTML = err.message;\n validation.classList.remove('validation-display-none');\n });\n }", "title": "" }, { "docid": "718840eadbbda45f52b78076453d6268", "score": "0.52887136", "text": "function doSale(e) {\n // get form data\n const formData = new FormData(document.querySelector(\"form[name=sale]\"))\n const sale = {}\n\n const holder = formData.get(\"holder\")\n sale.buyer = {\n a_code: formData.get(\"a_code\"),\n salutation: formData.get(\"salutation\"),\n family: formData.get(\"family\"),\n first_name: formData.get(\"first_name\"),\n name: formData.get(\"name\"),\n address: formData.get(\"address\"),\n email: formData.get(\"email\"),\n post_code: formData.get(\"post_code\"),\n city: formData.get(\"city\"),\n }\n sale.transaction = {\n comment: formData.get(\"comment\"),\n booking_date: formData.get(\"transaction\"),\n cert_type: formData.get(\"cert_type\"),\n transaction_type: formData.get(\"transaction-type\"),\n shares: getSelectedShares(SALE_TYPE),\n }\n\n // extract a_code\n let reg = /.+ \\((.+)\\)$/\n let matches = reg.exec(holder)\n if (matches) {\n sale.buyer.a_code = matches[1]\n } else {\n sale.buyer.a_code = null\n }\n\n ipcRenderer.send(\"sale:execute\", sale)\n}", "title": "" }, { "docid": "e9ace083097227095f9211896f4343ee", "score": "0.52765507", "text": "Approve(_spender, _amount){\n\n Utils.contract.approve(_spender, _amount).send({\n shouldPollResponse: true,\n callValue: 0\n }).then(res => Swal({\n title:'Approval Successful',\n type: 'success'\n })).catch(err => Swal({\n title:'Approval Failed',\n type: 'error'\n\n }));\n }", "title": "" }, { "docid": "852f38d7461a293af13f873bc727c46e", "score": "0.5274066", "text": "function sendNewEvent() {\n var formData = serializeForm(\"#add-event\");\n formData.id_campus = connected_user.id_campus;\n formData.id_user = connected_user.id;\n formData.approved = 'approved';\n\n var verification = [\n ['name','Pas de caractères spéciaux.','^[_A-z0-9]*((-|\\\\s)*[_A-z0-9])*$'],\n ['description','required',''],\n ['date','required',''],\n ['image','required',''],\n ['price',' Le prix doit être un nombre.','[+-]?([0-9]*[.])?[0-9]+']\n ];\n\n if(!fieldsVerification('#add-event', verification)) {\n apiAJAXSend('/events', formData, null,'POST');\n $(\"#add-event\").trigger(\"reset\");\n }\n}", "title": "" }, { "docid": "da55160e9dd339e3727e5cb287a16e54", "score": "0.52620876", "text": "function publishFollowEvent (folllowActivity, approvalActivity) {\n\n return new Promise((resolve, reject) => {\n wolkenkit\n .then((eventStore) => {\n eventStore.activityPub.activity().follow(folllowActivity)\n .failed(err => reject(err))\n .delivered(() => {\n if(approvalActivity != null){\n eventStore.activityPub.activity().follow(approvalActivity)\n .failed(err => reject(err))\n .delivered(() => resolve(folllowActivity))\n }\n else resolve(folllowActivity)\n })\n\n }).catch((error) => {\n console.log(error);\n })\n });\n}", "title": "" }, { "docid": "bd0d36b2f1286b23f78bbaaa2bfdc0ad", "score": "0.5253574", "text": "function getPayments(){\n\n\n var options = salesNavigator.getCurrentPage().options;\n \n var queryFilter=\"SELECT * FROM ORCT T0 \" ;\n\n\n if (options.businessPartner.cardCode != null && typeof(options.businessPartner.cardCode) != 'undefined')\n {\n\n queryFilter = queryFilter +\" WHERE T0.cardCode='\"+options.businessPartner.cardCode+\"'\";\n\n }\n\n var payments=new Array();\n\n dataBase.transaction(function(tx) {\n\n \n tx.executeSql(queryFilter, \n [],\n function(tx, results)\n {\n \n var nLength = results.rows.length;\n \n \n for(var c=0;c<nLength;c++)\n {\n \n var payment = new Payment();\n var date = results.rows.item(c).docDate;\n var anio = date.substring(4,0);\n var mes= date.substring(6,4);\n var dia= date.substring(8,6); \n var concat = (anio+\"-\"+ mes +\"-\"+ dia);\n var mtd ='No aplica';\n\n payment.docEntry= results.rows.item(c).docEntry;\n payment.cardCode=results.rows.item(c).cardCode;\n payment.cardName=results.rows.item(c).cardName;\n payment.docDate=concat;\n payment.docTotal=results.rows.item(c).docTotal;\n\n // Methods\n payment.cashSum= results.rows.item(c).cashSum;\n payment.transferSum= results.rows.item(c).transferSum;\n payment.checkSum= results.rows.item(c).checkSum;\n payment.transferDate = results.rows.item(c).transferDate;\n payment.cashAcct = results.rows.item(c).cashAcct;\n payment.transferAcct = results.rows.item(c).transferAcct;\n payment.transferRef = results.rows.item(c).transferRef;\n\n\n if (payment.cashSum != 0){\n payment.methods ='Efectivo';\n payment.methodsDate = payment.transferDate;\n payment.methodsAcct = payment.cashAcct;\n payment.methodsRef = mtd;\n payment.methodsTotal= payment.cashSum;\n }\n\n if (payment.transferSum != 0){\n payment.methods ='Transferencia';\n payment.methodsDate =payment.transferDate;\n payment.methodsAcct=payment.transferAcct;\n payment.methodsRef=payment.transferRef;\n payment.methodsTotal = payment.transferSum;\n }\n\n if (payment.checkSum != 0){\n payment.methods ='Cheque';\n payment.methodsDate = payment.transferDate;\n payment.methodsAcct = mtd;\n payment.methodsRef = mtd;\n payment.methodsTotal = payment.checkSum;\n }\n\n \n \n payments.push(payment);\n \n }\n \n $scope.payments=payments;\n \n $scope.$apply();\n \n },\n function(tx, error)\n {\n alert(error.message); \n }\n );\n });\n }", "title": "" }, { "docid": "962bb52f8a0518dbc6e5cafbb9956c92", "score": "0.5250488", "text": "sendToDelighted(record) {\n delighted.person.create({\n email: record.Email,\n name: record.Name,\n properties: { \"kantoor\": record.accountName }\n }).then(person => {\n console.log(person.survey_scheduled_at)\n this.upateInSalesforce(record)\n }, error => console.log(error.type))\n }", "title": "" }, { "docid": "12635fb2bc81219145c8032b782576b3", "score": "0.52433515", "text": "paymentCallback(isThreeD, jobId) {\n let product = \"\",\n portal = [],\n candidateId = _this.AuthService.user.userId,\n type = \"paymentBycandidate\";\n\n let data = {\n \"paymentType\": type,\n \"sourceId\": \"\",\n \"portalPlans\": portal,\n \"productPlan\": product,\n \"candidateId\": candidateId,\n \"positionId\": \"\",\n \"jobCode\": jobId,\n \"cardStatus\": \"x1ssdf1112dfdf1111df\",\n \"cardExpMonth\": \"\",\n \"cardExpYear\": \"\",\n \"cardLast4digit\": \"\",\n \"threed_secure\": \"\",\n \"owner\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"postal_code\": \"\",\n \"state\": \"\"\n },\n \"email\": \"\",\n \"name\": \"\",\n \"phone\": \"\",\n \"verified_address\": null,\n \"verified_email\": null,\n \"verified_name\": null,\n \"verified_phone\": null\n }\n };\n let onSuccess = (response) => {\n console.log(response.data);\n if (isThreeD === \"supported\") {\n _this.paymentIframeCallback(response.data);\n } else {\n _this.makePayment(response.data);\n }\n },\n onError = (error) => {\n console.log(error);\n _this.UtilsService.notify('Something went wrong, Please try again in sometime. If problem persist please contact customer support.', true, 6000);\n };\n if (isThreeD === \"supported\") {\n _this.AdminPaymentPlanService.getThreeDSecureSource(data);\n _this.AdminPaymentPlanService.activePromise.then(onSuccess, onError);\n } else {\n _this.AdminPaymentPlanService.getPaymentObject(data);\n _this.AdminPaymentPlanService.activePromise.then(onSuccess, onError);\n }\n\n }", "title": "" }, { "docid": "aa7c8f230758804c1066ff846e86dcd7", "score": "0.52369803", "text": "function transaction() {}", "title": "" }, { "docid": "b525a35a84ccb416ccd2523be9e52637", "score": "0.5227746", "text": "onTransferSubmit(event) {\n event.preventDefault();\n\n const {contract, to, from, accounts} = this.state;\n console.log(accounts[0]);\n console.log(from);\n console.log(to);\n contract.methods.transferNFT(from, to, 1).send({from: from }).then((r) => {\n console.log('transfered to', contract.methods.balanceOf(to).call())\n })\n }", "title": "" }, { "docid": "42b5be9541f35530bb2d76d063451e18", "score": "0.52242434", "text": "handleAction(evt) {\n evt.stopPropagation();\n\n addToCart({\n communityId: communityId,\n productId: evt.detail.productId,\n quantity: '1',\n effectiveAccountId: this.resolvedEffectiveAccountId\n })\n .then(() => {\n this.dispatchEvent(\n new CustomEvent('cartchanged', {\n bubbles: true,\n composed: true\n })\n );\n this.dispatchEvent(\n new ShowToastEvent({\n title: 'Success',\n message: 'Your cart has been updated.',\n variant: 'success',\n mode: 'dismissable'\n })\n );\n })\n .catch(() => {\n this.dispatchEvent(\n new ShowToastEvent({\n title: 'Error',\n message:\n '{0} could not be added to your cart at this time. Please try again later.',\n messageData: [evt.detail.productName],\n variant: 'error',\n mode: 'dismissable'\n })\n );\n });\n }", "title": "" }, { "docid": "89dd74b9170b3b32e20e97de705e147e", "score": "0.52216655", "text": "function CheckOut(){\n check(); //must be logged-in;\n // var payed = \"Payed\"; //status 1 means payed\n // bookTickets(payed);\n alert(\"Prezzo totale da pagare: \" + totalPrice + \"€ per l'evento: \" +id_evento_global);\n}", "title": "" }, { "docid": "558e0910661845ed65fbc0c45da2115a", "score": "0.5209411", "text": "nextActions(actions) {\n for (let actionName in actions) {\n if (actions.hasOwnProperty(actionName)) {\n // If current action is valid\n if (actions[actionName]) {\n // Emit the action related event from its name with the action specific data\n this.emit(\"payment\", actions[actionName]);\n }\n }\n }\n }", "title": "" }, { "docid": "d4455b507d3e952371a518bcf8372e9a", "score": "0.5209089", "text": "function kn_object2event(obj, opt)\n{\n var e = new Object();\n var ret;\n\n e[\"content-type\"] = \"text/xml\";\n e[\"soapaction\"] = \"true\";\n\n if (opt) // Pump my lemma\n {\n for (var i in opt) {\n e[i] = opt[i];\n }\n }\n\n e.do_method = 'notify';\n e.kn_payload = Object2Soap(obj);\n e.kn_payload.replace(/</g, \"&lt;\");\n e.kn_payload.replace(/>/g, \"&gt;\");\n e.kn_payload.replace(/&/g, \"&amp;\");\n e.kn_payload.replace(/\\\"/g, \"&quot;\");\n\n return e;\n}", "title": "" }, { "docid": "9b904149f0f9cb71924edd70f242b7c8", "score": "0.5202685", "text": "async signReceipt(params) {\n const receipt = this.getReceiptById(params.receiptId);\n let receiptStateM = new Receipt({...receipt});\n\n let party = \"\";\n if (params.address === receiptStateM.from_address) party = \"from\";\n if (params.address === receiptStateM.to_address) party = \"to\";\n\n\n console.log(party, typeof params.address, typeof receiptStateM.from_address, receiptStateM.to_address);\n\n let signature = await _signReceipt(receiptStateM.from_address, receiptStateM.to_address, receiptStateM.amount,\n receiptStateM.receiptId, this.web3, party);\n\n console.log(\"signature \", signature);\n\n receiptStateM[RECEIPT_EVENTS.SIGN_RECEIPT]({party, signature});\n this.saveReceipt(receiptStateM);\n\n // checking if both parties have signed the latest receipt\n const readyToCommit = await this.checkReceiptForCommit(receiptStateM);\n if (readyToCommit) {\n receiptStateM[RECEIPT_EVENTS.COMMIT_RECEIPT]();\n this.saveReceipt(receiptStateM);\n await this.commitReceiptTransaction(receiptStateM);\n }\n\n return receiptStateM;\n }", "title": "" }, { "docid": "7214e079239ce6ed82be5d53de59d62c", "score": "0.52012986", "text": "static send_custom_code(e, data) {\n if (e.keyCode == 13 || e == \"FORCE\") {\n var ids = [\"manual_command\", \"manual_payload\"]\n var data = []\n var element\n\n for (var item of ids) {\n element = document.getElementById(item)\n data.push(element.value)\n element.value = \"\"\n }\n\n data = this.payloader(data[0], data[1])\n console.log(data)\n WS.ws.send(data)\n } else if (e == \"GRB\") {\n data = this.payloader(\"GRB\", data)\n WS.ws.send(data)\n }\n }", "title": "" }, { "docid": "8f0573630d9b1f18564e26fba3cf0b22", "score": "0.51993424", "text": "addPayment({ data={}, callback=()=>{} }) {\n userId = User.getUserId();\n data.sender = userId;\n axios.post(`${host}/users/${userId}/payments`, data, {\n withCredentials: true\n })\n .then((response) => {\n callback(null, response);\n })\n .catch((response) => {\n let error = response.data.errorMessage;\n console.log(`Error in Api.addPayment(): ${error}`);\n callback(new Error(error), response);\n });\n }", "title": "" }, { "docid": "303802bb52b0d78bbd81c2e70c964e9e", "score": "0.51982725", "text": "function onBurnForm() {\n buildTemplate(\"pending\");\n burnSignatures();\n }", "title": "" }, { "docid": "f84f4311046e24506a2202d2f5192649", "score": "0.51978624", "text": "function payment() {\n // оплатить можно только с непустым заказом\n if (order.length){\n unpayed = false;\n var btn = document.querySelector('.make-order');\n btn.disabled = true;\n btn.innerHTML = 'заказ оплачен';\n }\n }", "title": "" }, { "docid": "952b0ad3788638aa01ebe53c02b408bf", "score": "0.5193363", "text": "function subscribeOnClick() {\n var planId = $(this).data(\"planId\");\n\n chargebeeInstance.openCheckout({\n hostedPage: function() {\n // Make a fetch call to get the hosted checkout page\n return fetch(\n \"/paywall?mode=get_hosted_checkout_page&plan_id=\" +\n planId +\n \"&return_url=\" +\n location.href,\n { credentials: \"same-origin\" }\n ).then(function(resp) {\n return resp.json();\n });\n },\n error: function(error) {\n // Optional\n // will be called if the promise passed causes an error\n },\n success: function(hostedPageId) {\n // Optional\n // will be called when a successful checkout happens.\n // return fetch(\n // \"/paywall?mode=checkout_success&hosted_page_id=\" + hostedPageId,\n // { credentials: \"same-origin\" }\n // ).then(function() {\n // // Reload the window to display the actual content the customer\n // // just paid for.\n // location.reload();\n // });\n }\n });\n }", "title": "" }, { "docid": "f35ea9458cc807862776c42f8a85ed5a", "score": "0.5191312", "text": "function marshalDepositEvent(data) {\n var slot = data.slot, blockNumber = data.blockNumber, denomination = data.denomination, from = data.from, contractAddress = data.contractAddress;\n return {\n slot: new bn_js_1.default(slot),\n blockNumber: new bn_js_1.default(blockNumber),\n denomination: new bn_js_1.default(denomination),\n from: from,\n contractAddress: contractAddress\n };\n}", "title": "" }, { "docid": "0c8bd5a69541622f287edeeab9670a48", "score": "0.51874065", "text": "async function stripePayIntent(_parent, args, context) {\n const { amount, currency, source, on_behalf_of } = args;\n\n const userid = getUserId(context);\n const user = await context.prisma.user({ id: userid });\n\n console.log('hey', user.stripeCusId);\n console.log('no', user.stripeId);\n\n stripe.paymentIntents.create(\n {\n amount,\n currency,\n source,\n on_behalf_of,\n\n // application_fee_amount: 0,\n },\n { stripe_account: user.stripeCusId }\n ).then(function (paymentIntent) {\n // asynchronously called\n console.log('here', paymentIntent);\n })\n .catch(function (err) {\n console.log(err);\n });;\n\n return user;\n}", "title": "" }, { "docid": "bb36d450e7b52ce7207c5add5e5e0298", "score": "0.5181442", "text": "function convertPesa(e, currencies){\n //get the items from the user input\n let amount = document.getElementById('amountInput');\n let fromCurrency = document.getElementById('fromCurrencyInput');\n let toCurrency = document.getElementById('toCurrencyInput');\n let inputId = chance.getId();\n\n let request = {\n \"id\":inputId,\n \"amount\":amount,\n \"fromCurrency\":fromCurrency,\n \"toCurrency\":toCurrency\n }\n\n}", "title": "" }, { "docid": "c53761f2c7791a28b13b0faaa5dc8bdd", "score": "0.51797754", "text": "function addDataQ(producto,fecha,costo,cantidad){\n App.contracts.Facturas.deployed().then(function(instancia){\n var instanciaFacturas =instancia;\n return instanciaFacturas.addFactura(App.account,producto,fecha,costo,cantidad, {\n from: App.account,\n gas: 500000\n }).then(function(nomFact){\n //Como el tiempo para que se termine de agregar es variante asi como las transacciones que tienen que pasar preferi mostrarlo con un alert\n window.alert(\"TRANSACCION EJECUTADA CORRECTAMENTE!!\");\n });\n });\n}", "title": "" }, { "docid": "7c39045fa9ee103fa9b49a03d991a7a2", "score": "0.5171752", "text": "function cardPayment(){\n \n // Hide div if not hidden\n if (!$errors_div.hasClass('hide')) {\n $errors_div.addClass('hide');\n }\n // Get payload\n payload = {\n \"invoice\": String(invoice),\n \"action\": $('#card_action').val(),\n \"type\": \"telephoneorder\"\n }\n // Check if amount filed is present and has value has value\n if ($('#card_amount').val()) {\n payload[\"amount\"] = $('#card_amount').val();\n }\n // Check if the pay by stroed cards checkbox is selected\n if ($('#use_stored').is(':checked')){\n payload['using_token'] = true;\n payload['token'] = $('input[name=card]:checked').val();\n }\n else{\n var card= {\n \"number\": $('#card_number').val(),\n \"cvn\": $('#card_cvn').val(),\n \"expiry\": $('#month_expiry').val()+$('#year_expiry').val(),\n }\n payload[\"card\"] = card;\n }\n // POST\n $.ajax ({\n beforeSend: function(xhrObj){\n xhrObj.setRequestHeader(\"Content-Type\",\"application/json\");\n xhrObj.setRequestHeader(\"Accept\",\"application/json\");\n },\n type: \"POST\",\n url: \"/ledger/payments/api/bpoint/payment\",\n data: JSON.stringify(payload),\n dataType: \"json\",\n success: function(resp){\n success(resp,invoice,'card');\n },\n error: function(resp){\n error(resp);\n },\n complete: function(resp){\n checkInvoiceStatus(); \n }\n });\n }", "title": "" }, { "docid": "775eaa9a69f1d9f8faf714a19766c025", "score": "0.5159662", "text": "function sendPaymentTransaction(account, to, amount) {\n var p = new Promise(function (resolve) {\n // use closeRemainderTo paramerter when you want to close an account\n let closeRemainderTo = undefined;\n // use note parameter when you want to attach a string to the transaction\n let note = undefined;\n algodclient.getTransactionParams().do().then((params) => {\n let txn = algosdk.makePaymentTxnWithSuggestedParams(account.addr, to, amount, closeRemainderTo, note, params);\n // sign the transaction\n var signedTxn = algosdk.signTransaction(txn, account.sk);\n algodclient.sendRawTransaction(signedTxn.blob).do().then((tx) => {\n waitForConfirmation(algodclient, tx.txId)\n .then(resolve)\n .catch(console.log);\n }).catch(console.log);\n }).catch(console.log);\n })\n return p;\n}", "title": "" }, { "docid": "906e8a55a3eddab11ed6d1283f5c0ad2", "score": "0.51581347", "text": "function pickupOrder (){\n let order = {\n store: store_name,\n orderID: faker.random.uuid(),\n customer: faker.name.findName(),\n address: faker.address.city(),\n };\n // i am sending the order object to the caps\n // strigify the data before sending it \n let pickupMsg = JSON.stringify({event:'pickup',payload:order})\n client.write(pickupMsg);\n}", "title": "" }, { "docid": "5743eaa026019703074999cd19019538", "score": "0.5157324", "text": "async contractMessage(eventName){\n await this.state.deployedHealthPass.getPastEvents(eventName,{\n fromBlock : 'latest'\n }, function(error, events){\n if(eventName === 'Registered'){\n window.alert('User is registered successfully!!');\n }\n\n if(eventName === 'Updated'){\n window.alert('User vaccination status is updated successfully');\n }\n\n if(eventName === 'healthPassToWorkplace'){\n window.alert('HealthPass is allocated to the user. You are allowed to enter to workplace.');\n }\n\n if(eventName === 'healthPassToMall'){\n window.alert('HealthPass is allocated to the user. You are allowed to enter to Public Mall.');\n }\n });\n }", "title": "" } ]
218063bec230bce0d45e433076a80a20
Throws a `Cancel` if cancellation has been requested.
[ { "docid": "6a0fca937f07778677fe281b073d49b6", "score": "0.71672016", "text": "function throwIfCancellationRequested(config){\nif(config.cancelToken){\nconfig.cancelToken.throwIfRequested();\n}\n}", "title": "" } ]
[ { "docid": "4a8d73b7484d09f67bf9a661ab6df83b", "score": "0.7674247", "text": "function throwIfCancellationRequested(config){if(config.cancelToken){config.cancelToken.throwIfRequested();}if(config.signal&&config.signal.aborted){throw new Cancel$1('canceled');}}", "title": "" }, { "docid": "ef1e5aae47576a057920553a923ae50f", "score": "0.7423634", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new Cancel('canceled');\n }\n}", "title": "" }, { "docid": "ef1e5aae47576a057920553a923ae50f", "score": "0.7423634", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new Cancel('canceled');\n }\n}", "title": "" }, { "docid": "ef1e5aae47576a057920553a923ae50f", "score": "0.7423634", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new Cancel('canceled');\n }\n}", "title": "" }, { "docid": "ef1e5aae47576a057920553a923ae50f", "score": "0.7423634", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new Cancel('canceled');\n }\n}", "title": "" }, { "docid": "ef1e5aae47576a057920553a923ae50f", "score": "0.7423634", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new Cancel('canceled');\n }\n}", "title": "" }, { "docid": "57ffd95e0306641b96ca336af1fe72b0", "score": "0.73854464", "text": "function throwIfCancellationRequested(config){if(config.cancelToken){config.cancelToken.throwIfRequested();}}", "title": "" }, { "docid": "57ffd95e0306641b96ca336af1fe72b0", "score": "0.73854464", "text": "function throwIfCancellationRequested(config){if(config.cancelToken){config.cancelToken.throwIfRequested();}}", "title": "" }, { "docid": "57ffd95e0306641b96ca336af1fe72b0", "score": "0.73854464", "text": "function throwIfCancellationRequested(config){if(config.cancelToken){config.cancelToken.throwIfRequested();}}", "title": "" }, { "docid": "57ffd95e0306641b96ca336af1fe72b0", "score": "0.73854464", "text": "function throwIfCancellationRequested(config){if(config.cancelToken){config.cancelToken.throwIfRequested();}}", "title": "" }, { "docid": "921be10b4ee284d39688b4e51bee0d3a", "score": "0.7205521", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n }", "title": "" }, { "docid": "d8962bf0df20f76e288fcfd914af34f6", "score": "0.7179494", "text": "function canceled() {\r\n return new Error('Canceled');\r\n }", "title": "" }, { "docid": "439e34cbe4ed3fcdee6f4623aa829f95", "score": "0.7161273", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n }", "title": "" }, { "docid": "439e34cbe4ed3fcdee6f4623aa829f95", "score": "0.7161273", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n }", "title": "" }, { "docid": "439e34cbe4ed3fcdee6f4623aa829f95", "score": "0.7161273", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n }", "title": "" }, { "docid": "439e34cbe4ed3fcdee6f4623aa829f95", "score": "0.7161273", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n }", "title": "" }, { "docid": "439e34cbe4ed3fcdee6f4623aa829f95", "score": "0.7161273", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n }", "title": "" }, { "docid": "439e34cbe4ed3fcdee6f4623aa829f95", "score": "0.7161273", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n }", "title": "" }, { "docid": "439e34cbe4ed3fcdee6f4623aa829f95", "score": "0.7161273", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n }", "title": "" }, { "docid": "439e34cbe4ed3fcdee6f4623aa829f95", "score": "0.7161273", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n }", "title": "" }, { "docid": "439e34cbe4ed3fcdee6f4623aa829f95", "score": "0.7161273", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n }", "title": "" }, { "docid": "31f7f1efae96be56b6ed9507b32f6868", "score": "0.71493906", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n }", "title": "" }, { "docid": "31f7f1efae96be56b6ed9507b32f6868", "score": "0.71493906", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n }", "title": "" }, { "docid": "6dcf894d5ca2e6d18cd14b7e0cd70b1c", "score": "0.71383584", "text": "function throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}", "title": "" }, { "docid": "6dcf894d5ca2e6d18cd14b7e0cd70b1c", "score": "0.71383584", "text": "function throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}", "title": "" }, { "docid": "6dcf894d5ca2e6d18cd14b7e0cd70b1c", "score": "0.71383584", "text": "function throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}", "title": "" }, { "docid": "6dcf894d5ca2e6d18cd14b7e0cd70b1c", "score": "0.71383584", "text": "function throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}", "title": "" }, { "docid": "6dcf894d5ca2e6d18cd14b7e0cd70b1c", "score": "0.71383584", "text": "function throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}", "title": "" }, { "docid": "6dcf894d5ca2e6d18cd14b7e0cd70b1c", "score": "0.71383584", "text": "function throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}", "title": "" }, { "docid": "6dcf894d5ca2e6d18cd14b7e0cd70b1c", "score": "0.71383584", "text": "function throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}", "title": "" }, { "docid": "6dcf894d5ca2e6d18cd14b7e0cd70b1c", "score": "0.71383584", "text": "function throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}", "title": "" }, { "docid": "6dcf894d5ca2e6d18cd14b7e0cd70b1c", "score": "0.71383584", "text": "function throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}", "title": "" }, { "docid": "6dcf894d5ca2e6d18cd14b7e0cd70b1c", "score": "0.71383584", "text": "function throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}", "title": "" }, { "docid": "6dcf894d5ca2e6d18cd14b7e0cd70b1c", "score": "0.71383584", "text": "function throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}", "title": "" }, { "docid": "6dcf894d5ca2e6d18cd14b7e0cd70b1c", "score": "0.71383584", "text": "function throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}", "title": "" }, { "docid": "6dcf894d5ca2e6d18cd14b7e0cd70b1c", "score": "0.71383584", "text": "function throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}", "title": "" }, { "docid": "6dcf894d5ca2e6d18cd14b7e0cd70b1c", "score": "0.71383584", "text": "function throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}", "title": "" }, { "docid": "f624b439614bbb131fddc977a9841c70", "score": "0.7078898", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n }", "title": "" }, { "docid": "f624b439614bbb131fddc977a9841c70", "score": "0.7078898", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n }", "title": "" }, { "docid": "21aae52252a9a6ee34678cb8e08a904e", "score": "0.70724815", "text": "function cancel() {\n /* jshint validthis: true */\n this.call.cancel();\n}", "title": "" }, { "docid": "77d6d94a2ce7655d66b452376a642026", "score": "0.705751", "text": "function cancel() {\n return invoke(\"cancel\");\n }", "title": "" }, { "docid": "e44397180c662e24a400bc1650b97c30", "score": "0.7036254", "text": "function throwIfCancellationRequested(config) {\n\tif (config.cancelToken) {\n\t\tconfig.cancelToken.throwIfRequested();\n\t}\n}", "title": "" }, { "docid": "cb5dc6ecfcba35f9d0cf6713d41e4286", "score": "0.7023319", "text": "function throwIfCancellationRequested(config) {\r\n if (config.cancelToken) {\r\n config.cancelToken.throwIfRequested();\r\n }\r\n}", "title": "" }, { "docid": "cb5dc6ecfcba35f9d0cf6713d41e4286", "score": "0.7023319", "text": "function throwIfCancellationRequested(config) {\r\n if (config.cancelToken) {\r\n config.cancelToken.throwIfRequested();\r\n }\r\n}", "title": "" }, { "docid": "cb5dc6ecfcba35f9d0cf6713d41e4286", "score": "0.7023319", "text": "function throwIfCancellationRequested(config) {\r\n if (config.cancelToken) {\r\n config.cancelToken.throwIfRequested();\r\n }\r\n}", "title": "" }, { "docid": "184435f09de6af95f5710adf10ef0062", "score": "0.7002713", "text": "cancel() {}", "title": "" }, { "docid": "184435f09de6af95f5710adf10ef0062", "score": "0.7002713", "text": "cancel() {}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" }, { "docid": "22ccc36626c1d874d5d7f4501fa2ade3", "score": "0.70009476", "text": "function throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}", "title": "" } ]
7435a546e351e74f5530aadaef51a457
DESCRIPTION: Retrieves saved data for a player servant PARAMS: playerData (I,REQ) Saved player data servants (I,REQ) Servant unit to check for RETURNS: Servant data object (see addServant)
[ { "docid": "31ec3647936515729436587610e43785", "score": "0.75526154", "text": "function getServantData(playerData, servant) {\n if (!playerData) { return; }\n if (!servant) { return; }\n var load = servant.load + \"\";\n if (!load) { return; }\n\n // Check for Servant\n for (const servantObj of playerData.servantData) {\n if (servantObj.load == load) {\n return servantObj;\n }\n }\n return null;\n}", "title": "" } ]
[ { "docid": "90af240a212af8da19fc152639d282ac", "score": "0.65286094", "text": "function addServant(playerData, servant) {\n if (!playerData) { return; }\n if (!servant) { return; }\n var load = servant.load + \"\";\n if (!load) { return; }\n if (playerData.servants.includes(servant.load)) { return; }\n\n // Add Servant\n playerData.servants.push(servant.load);\n\n playerData.servantData.push({\n load: servant.load,\n mapsCleared: [],\n strength: 1,\n bondPoints: 0,\n });\n\n // Save\n savePlayerData(playerData);\n}", "title": "" }, { "docid": "b25dd37d3affb309beb21d75bdd51dc4", "score": "0.6269227", "text": "function savePlayerData(playerData) {\n if (playerData) {\n playerData.lastSave = curDateTime();\n localStorage.setItem(\"playerData\", JSON.stringify(playerData));\n }\n}", "title": "" }, { "docid": "ab28d01a90b189f1c5b52f65d90a9a14", "score": "0.6081598", "text": "getPlayerData(playerName) {\n return this.DynamoDBDocumentClient.get(\n {\n Key: {\n PlayerName: playerName\n },\n TableName: Constants.PLAYER_TABLE_NAME\n }).promise();\n }", "title": "" }, { "docid": "54087d05418380afc558af762626a80d", "score": "0.5835981", "text": "function saveData(player){\n\n\tvar newJSON = JSON.stringify(player); \n localStorage.setItem(\"localsaveRPG\", newJSON);\n\t$('#endOfBattleMenu-button-save').html(\"Saved!\");\n\t\n}", "title": "" }, { "docid": "d07e0189780653709bfd9ecd4075e618", "score": "0.5824266", "text": "function save(){\n\t\t\tvar pdata = {};\n\t\t\tif (self.tiller) pdata.tiller = self.tiller;\n\t\t\tif (self.agriculturist) pdata.agriculturist = self.agriculturist;\n\t\t\tpdata.settings = self.settings;\n\t\t\tpdata.level = self.level;\n\t\t\tSAVE_JSON(\"player\", pdata);\n\t\t}", "title": "" }, { "docid": "e9c020a2568a795a6dcf51e6557422d8", "score": "0.57812744", "text": "function playerStat(data,gServer,gClient){\n\t/*\n\t\toutput message json format\n\t\t[\n\t\t\t[playerName} : \"name'\n\t\t\t[playerLevel]:\"Integer\"\n\t\t\t[win]:\"Integer\"\n\t\t\t[lose]:\"Integer\"\n\t\t]\n\t*/\n\t\n\t//Query from DBMS\n\n\ttry{\n\t\tvar mysqlConnection = require('./node-mysql').createConnection();\t\n\t\tvar _name = gClient.username;\t\n\t\tvar query = 'SELECT id, level, win, loss FROM bbm_account WHERE id=' + mysqlConnection.escape(_name);\n\t\tmysqlConnection.query(query, function(err, rows){\n\t\t\tif (rows.length > 0){\n\t\t\t\t//case: player exist\n\t\t\t\tvar id = rows[0].id;\n\t\t\t\tvar level = rows[0].level;\n\t\t\t\tvar win = rows[0].win;\n\t\t\t\tvar lose = rows[0].loss;\t\t\t\t\n\t\t\t\t\n\t\t\t\tvar _out = {\n\t\t\t\t\tplayerName: id,\n\t\t\t\t\tplayerLevel: level,\n\t\t\t\t\twin: win,\n\t\t\t\t\tlose: lose\n\t\t\t\t};\n\t\t\t\tgClient.sendData('statACK', JSON.stringify(_out));\t\t\t\t\t\n\t\t\t}\n\t\t\n\t\t\tif (err){\n\t\t\t\tconsole.log('[wsRequestHandler] MySQL mysqlConnection error code:' + err.code);\n\t\t\t}\n\t\t});\n\t\t\n\t//--------------------------------------\n\t}catch(e){console.error(\"Lobby.playerState:err=\",e);}\n}", "title": "" }, { "docid": "516876d2fdbe438706167c52f83ebe3b", "score": "0.5771363", "text": "function SendNewData(){\n playerData[0].playerId = 12;\n serverWriteJson(playerData);\n}", "title": "" }, { "docid": "92d3435805c6dfeb4e54e44363a9a1a7", "score": "0.57079583", "text": "async function retrievePlayerData(playerName) {\n var playerData = await DB.getPlayerByName(playerName);\n}", "title": "" }, { "docid": "8df33b8e3f6f73bb1578d90e3cf49a3c", "score": "0.5658334", "text": "function getData()\t{\t\n\t\tCORE.LOG.addInfo(\"TRAINING_SYNCH:getData\");\n\t\t_this_.socket.emit('trainingGetData',\n\t\t\t{ \t\t\n\t\t\t\tplayerID:gameData.data.player.playerID\n\t\t\t}\n\t \t);\n\t}", "title": "" }, { "docid": "edbd27b123e012f660680f15e91dafa5", "score": "0.5633177", "text": "function _getDataFromClientDevice() {\r\n return __data_from_devices_players;\r\n}", "title": "" }, { "docid": "5ff6facfbbf1d1eb9cbe1b5910881841", "score": "0.5558447", "text": "function _sendDataForPlayers(data) {\r\n __data_sendto_devices_players = data;\r\n}", "title": "" }, { "docid": "49ed85d7d503abeb5109d476a48f926a", "score": "0.5539016", "text": "function getPlayerInfoCallback(playerData) {\r\n playerName = playerData.name;\r\n playerRank = playerData.rank;\r\n playerSorties = playerData.sorties;\r\n playerKills = playerData.currentKills + playerData.boardKills;\r\n}", "title": "" }, { "docid": "874267d6aab2cd0ecdbed4f0045ff018", "score": "0.5494544", "text": "function serializePlayer(player) {\r\n var toReturn = {\r\n food: player.food,\r\n turn: player.turn,\r\n team: player.team,\r\n unitSet: player.unitSet,\r\n upkeep: player.upkeep,\r\n buildings: [],\r\n units: [],\r\n lastSeen: player.lastSeen\r\n };\r\n\r\n // TODO: player buffs\r\n for (var b = 0; b < player.buildings.length; b++) {\r\n var building = player.buildings[b];\r\n var btile = $em(building).comp('MapElement');\r\n\r\n //TODO: building buffs\r\n var buffArr = undefined;\r\n //if (building.Buffable && building.Buffable.buffs.length > 0) {\r\n // buffArr = [];\r\n // for (var z = 0; z < building.Buffable.buffs.length; z++) {\r\n // var jsonBuff = BuffUtils.getBuffJson(building.Buffable.buffs[z]);\r\n // buffArr.push(jsonBuff);\r\n // } // z\r\n //}\r\n var debuffArr = undefined;\r\n //if (building.Debuffable && building.Debuffable.debuffs.length > 0) {\r\n // debuffArr = [];\r\n // for (var z = 0; z < building.Debuffable.debuffs.length; z++) {\r\n // var jsonDebuff = BuffUtils.getDebuffJson(building.Debuffable.debuffs[z]);\r\n // debuffArr.push(jsonDebuff);\r\n // } // z\r\n //}\r\n var bstate = {\r\n type: $em(building).comp('Building').type.replace(/\\s/g, ''),\r\n location: { x: btile.x, y: btile.y },\r\n turnsUntilCapture: $em(building).comp('Building').turnsUntilCapture,\r\n buffs: buffArr,\r\n debuffs: debuffArr\r\n };\r\n toReturn.buildings.push(bstate);\r\n } // b\r\n\r\n for (var u = 0; u < player.units.length; u++) {\r\n var unit = player.units[u];\r\n var utile = $em(unit).comp('MapElement');\r\n var uoptions = {};\r\n if ($em(unit).comp('Unit').type == 'Harvester') {\r\n uoptions.gatherTarget = $em(unit).has('Gather');\r\n uoptions.captureTarget = $em(unit).has('Capture');\r\n }\r\n uoptions.kills = $em(unit).comp('Unit').kills;\r\n\r\n // TODO: unit buffs\r\n var buffArr = undefined;\r\n //if (unit.Buffable && unit.Buffable.buffs.length > 0) {\r\n // buffArr = [];\r\n // for (var z = 0; z < unit.Buffable.buffs.length; z++) {\r\n // var jsonBuff = BuffUtils.getBuffJson(unit.Buffable.buffs[z]);\r\n // buffArr.push(jsonBuff);\r\n // } // z\r\n //}\r\n var debuffArr = undefined;\r\n //if (unit.Debuffable && unit.Debuffable.debuffs.length > 0) {\r\n // debuffArr = [];\r\n // for (var z = 0; z < unit.Debuffable.debuffs.length; z++) {\r\n // var jsonDebuff = BuffUtils.getDebuffJson(unit.Debuffable.debuffs[z]);\r\n // debuffArr.push(jsonDebuff);\r\n // } // z\r\n //}\r\n var ustate = {\r\n type: $em(unit).comp('Unit').type.replace(/\\s/g, ''),\r\n location: { x: utile.x, y: utile.y },\r\n state: $em(unit).comp('Unit').state,\r\n hp: $em(unit).comp('Health').current,\r\n options: uoptions,\r\n buffs: buffArr,\r\n debuffs: debuffArr\r\n }\r\n toReturn.units.push(ustate);\r\n } // u\r\n\r\n return toReturn;\r\n } // serializePlayer", "title": "" }, { "docid": "4a9bd55b43d1bc0d8013dc02ebd939c2", "score": "0.5448377", "text": "async function getPlayersData(player) {\n try {\n const repos = await getRepos(player.login);\n const totalStars = await getTotalStars(repos);\n return {\n followers: player.followers,\n totalStars,\n };\n } catch (error) {\n console.warn('Error in githubHelpers', error);\n }\n}", "title": "" }, { "docid": "04e42eeef56977a96a3214ec85e1de95", "score": "0.541661", "text": "function extractRelevantPlayerPageDataByID(players) {\r\n const player_info = players[0].data.data;\r\n const {player_id ,fullname, image_path, position_id, common_name, nationality, birthdate, birthcountry, height, weight } = player_info;\r\n \r\n if(player_info){ \r\n return {\r\n player_id: player_id,\r\n name: fullname,\r\n image: image_path,\r\n position: position_id,\r\n team_name: player_info.team? player_info.team.data.name : \"unkown\",\r\n common_name: common_name,\r\n nationality: nationality,\r\n birthdate: birthdate,\r\n birthcountry: birthcountry, \r\n height: height,\r\n weight: weight,\r\n }; \r\n } \r\n}", "title": "" }, { "docid": "2f643154ba3154cb5858393112050a56", "score": "0.5330374", "text": "function getPlayerData(){\n var playerData = {};\n var playerNum = prompt(\"Please enter your guess: \");\n var playerBet = prompt(\"Please enter your bet: \");\n playerData.playerNum = playerNum;\n playerData.playerBet = playerBet;\n return playerData;\n}", "title": "" }, { "docid": "edb47560c27a61cdf20ef2154b7d59a8", "score": "0.53258944", "text": "function saveGameData () {\n const defaultName = 'Игрок 1';\n const defaultScore = 0;\n if(firstGamer.getName() !== defaultName && (firstGamer.getScore() !== defaultScore || secondGamer.getScore() !== defaultScore)) {\n const commandLockget = 'LOCKGET';\n const commandUpdate = 'UPDATE';\n const dataName = 'NOVIKOVA_EKATERINA_TENNIS_2020';\n const ajaxScript = \"https://fe.it-academy.by/AjaxStringStorage2.php\";\n const methodPost = 'post';\n const password = getPassword();\n const maxNumSaves = 20;\n const controlString = 'OK';\n const startElementToSave = 0;\n\n var insertNumber = 0;\n var dataFromServer = {};\n var currentGameData = {};\n var dataForSave = {};\n\n var requestParameters = new URLSearchParams();\n requestParameters.append('f', commandLockget);\n requestParameters.append('n', dataName);\n requestParameters.append('p', password);\n fetch(ajaxScript, { method: methodPost, body: requestParameters })\n .then( response => response.json() )\n .then( data => {\n if(data.error) {\n warnError();\n return;\n }else {\n dataFromServer = JSON.parse(data.result);\n insertNumber = dataFromServer.insertionPosition;\n }\n } )\n .then(() => {\n currentGameData = createSaveObject();\n dataForSave = dataFromServer;\n dataForSave.preservation[insertNumber] = currentGameData;\n if(dataForSave.insertionPosition === maxNumSaves - 1) {\n dataForSave.insertionPosition = startElementToSave;\n } else {\n dataForSave.insertionPosition = insertNumber + 1;\n }\n\n var dataForSaveJson = JSON.stringify(dataForSave);\n\n requestParameters.set('f', commandUpdate);\n requestParameters.append('v', dataForSaveJson);\n \n fetch(ajaxScript, { method: methodPost, body: requestParameters })\n .then( response => response.text() )\n .then( data => {\n if(data.error) {\n warnError();\n return;\n } else {\n if(data.result === controlString) {\n warnDataSaved();\n } else {\n warnError();\n }\n }\n })\n .catch( (error) => { warnError(); console.log(error); } )\n })\n .catch( (error) => { warnError(); console.log(error); } );\n\n } else {\n warnNothingToSave();\n }\n }", "title": "" }, { "docid": "177959b5b898e44bc6dc321cb3b371c8", "score": "0.5310708", "text": "function processPlayerData({\n uuid,\n playername,\n firstLogin,\n lastLogin = null,\n lastLogout = null,\n rank = null,\n packageRank = null,\n newPackageRank = null,\n prefix = null,\n monthlyPackageRank = null,\n rankPlusColor = 'RED',\n karma = 0,\n networkExp = 0,\n achievementPoints = 0,\n mcVersionRp = null,\n mostRecentGameType = null,\n userLanguage = 'ENGLISH',\n giftingMeta: { realBundlesGiven = 0, realBundlesReceived = 0 } = {},\n rewardScore = 0,\n rewardHighScore = 0,\n totalRewards = 0,\n totalDailyRewards = 0,\n adsense_tokens = 0,\n socialMedia: { links = {} } = {},\n stats = {},\n}) {\n const defaultLinks = {\n TWITTER: null,\n YOUTUBE: null,\n INSTAGRAM: null,\n TWITCH: null,\n MIXER: null,\n DISCORD: null,\n HYPIXEL: null,\n };\n const defaultStatsObject = {\n Arcade: {},\n Arena: {},\n Battleground: {},\n Bedwars: {},\n BuildBattle: {},\n Duels: {},\n GingerBread: {},\n HungerGames: {},\n MCGO: {},\n MurderMystery: {},\n Paintball: {},\n Quake: {},\n SkyClash: {},\n SkyWars: {},\n SpeedUHC: {},\n SuperSmash: {},\n TNTGames: {},\n TrueCombat: {},\n UHC: {},\n VampireZ: {},\n Walls: {},\n Walls3: {},\n };\n const statsObject = {};\n const fullStats = Object.assign(defaultStatsObject, stats);\n Object.keys(fullStats).forEach((game) => {\n if (Object.hasOwnProperty.call(processStats, game)) {\n const standardName = utility.DBToStandardName(game);\n statsObject[standardName] = processStats[game](fullStats[game]);\n }\n });\n return {\n uuid,\n username: playername,\n online: lastLogin > lastLogout,\n rank: getPlayerRank(rank, packageRank, newPackageRank, monthlyPackageRank),\n rank_plus_color: utility.colorNameToCode(rankPlusColor),\n prefix: utility.betterFormatting(prefix),\n karma,\n exp: networkExp,\n level: Number(calculateLevel.getExactLevel(networkExp).toFixed(2)),\n achievement_points: achievementPoints,\n // totals here\n mc_version: mcVersionRp,\n first_login: firstLogin,\n last_login: lastLogin,\n last_game: utility.typeToStandardName(mostRecentGameType),\n language: userLanguage,\n gifts_sent: realBundlesGiven,\n gifts_received: realBundlesReceived,\n is_contributor: utility.isContributor(uuid),\n rewards: {\n streak_current: rewardScore,\n streak_best: rewardHighScore,\n claimed: totalRewards,\n claimed_daily: totalDailyRewards,\n tokens: adsense_tokens,\n },\n links: Object.assign(defaultLinks, links),\n stats: statsObject,\n };\n}", "title": "" }, { "docid": "bcd22243079aa5a7c01dcb5a0c4f1cf2", "score": "0.5296595", "text": "function handleGetRequestForPlayers(playerDataResponse) {\n var body = '';\n playerDataResponse.on('data', function(d) {\n body += d;\n });\n playerDataResponse.on('end', function() {\n extractPlayerInfo(body);\n playerHttpRequestCompleteCount++;\n if(playerHttpRequestCompleteCount >= playerHttpRequestCount)\n {\n if(sort)\n {\n sortWholeJSON();\n }\n response.json(playerJSON);\n response.end();\n }\n });\n}", "title": "" }, { "docid": "7526b52dd0f516e9839eeb065444b8aa", "score": "0.5270076", "text": "function handleSuccess(res){\n data.players = res.data\n }", "title": "" }, { "docid": "512c6d42e73e3a31d07c170622701697", "score": "0.524855", "text": "persist() {\n const playerData = JSON.stringify(this.player);\n localStorage.setItem('player', playerData);\n }", "title": "" }, { "docid": "9145a08f9a87b727536992ed6aee6fd6", "score": "0.5213932", "text": "function load() {\n let savegame = JSON.parse(atob(localStorage.getItem(\"save\"))); // Grabs save and decodes from base64\n\n data.money = savegame[\"money\"]; // Sets money\n data.ticks = savegame[\"ticks\"]; // Sets ticks\n \n data.servers = []; // Re-initializes server array\n data.currentServer = savegame[\"currentServer\"]; // Sets current server\n\n let servers = savegame[\"servers\"]; // Shorthand for servers in saved game\n for(let i = 0; i < servers.length; i++) { // Iterates through each saved server\n \n let sgs = savegame.servers[i]; // Shorthand for current savegame server\n\n data.servers.push(new Server(sgs[\"name\"], sgs[\"type\"], sgs[\"host\"], sgs[\"firstVer\"]));\n \n let cs = data.servers[i]; // Shorthand for current server\n\n // Iterates through each field in server object to load data\n // This is done to preserve functions and class structure\n for(let field in cs) {\n let selector = cs[field]; // Selected field in server\n \n if(selector instanceof Array) { // Meaning admin for now\n cs[\"admins\"] = []; // Re-initializes admin array\n\n for(let j = 0; j < sgs[\"admins\"].length; j++) { // Iterates through admins\n let sga = sgs[\"admins\"][j]; // Current savegame admin\n\n cs[\"admins\"].push(new Admin(sga.name, sga.specialty)); // Adds admin\n \n let ca = cs[\"admins\"][j]; // Current admin\n \n ca[\"skills\"] = sga[\"skills\"]; // Overwrites skills, should be fine bc it's an array\n ca[\"task\"] = sga[\"task\"]; // Overwrites task\n }\n }else if(selector instanceof Resource) selector.value = sgs[field]; // Sets value to relative field\n else selector = sgs[field]; // Sets field to field\n }\n }\n}", "title": "" }, { "docid": "d1f9ac2cccdf558e486b1f8e6c49d706", "score": "0.521234", "text": "function saveMatchData(player, match) {\n fs.writeFileSync(`${player}-FullGameStats-${match.data.id}.json`, JSON.stringify(match, null, 4), function(err) {\n console.log('File successfuly written!!!');\n });\n}", "title": "" }, { "docid": "e1b4764a63cbaaf31c0b7a20820d5821", "score": "0.5204476", "text": "prepareForDatabase(player) {\n const currentTime = server.clock.monotonicallyIncreasingTime();\n\n this.hasRequestedUpdate_ = false;\n return {\n user_id: this.userId_,\n custom_color: player.colors.customColor?.toNumberRGBA() ?? 0,\n // TODO: include |online_time|\n kill_count: player.stats.enduring.killCount,\n death_count: player.stats.enduring.deathCount,\n money_bank: this.bankAccountBalance_,\n money_cash: this.cashBalance_,\n skin_decorations: this.skinDecorations_.join(','),\n stats_reaction: this.reactionTests_,\n stats_damage_given: player.stats.enduring.damageGiven,\n stats_damage_taken: player.stats.enduring.damageTaken,\n stats_shots_hit: player.stats.enduring.shotsHit,\n stats_shots_missed: player.stats.enduring.shotsMissed,\n stats_shots_taken: player.stats.enduring.shotsTaken,\n muted: Math.max(Math.floor(((this.mutedUntil_ || currentTime) - currentTime) / 1000), 0),\n };\n }", "title": "" }, { "docid": "3dba45045d6bd4c3a3acb8a2d9098492", "score": "0.5197822", "text": "processPlayerData(data) {\n if (data.type === 'data') {\n let player = this.players.find((playerTmp) => playerTmp.id === data.user.playerId);\n if (!player) {\n player = {\n id: data.user.playerId,\n name: data.user.username,\n score: 0,\n };\n this.players.push(player);\n }\n player.score += Math.abs(data.datas.x);\n this.dataProcessed++;\n }\n }", "title": "" }, { "docid": "ca7dcff3f1b8cd0b1e6e93afebe7d472", "score": "0.51855564", "text": "function addedPlayerData() { return {\n\tinfo: false,\n}}", "title": "" }, { "docid": "0d6f8e759b4ef1ad5e67bfdb906df6b7", "score": "0.5174225", "text": "function GetPlayerDataForKeys( keys )\n{\n var playerData = server.GetUserInternalData(\n {\n PlayFabId : currentPlayerId,\n Keys : keys\n }\n );\n\n return playerData.Data;\n}", "title": "" }, { "docid": "482316552a5fe45222ea2e2209ed0d84", "score": "0.517114", "text": "function loadData(){\n\n\tvar lsave = localStorage.getItem(\"localsaveRPG\");\n var playerTemp =JSON.parse(lsave);\n\t$('#battleWindow').empty();\n\t$('#battleWindow').html('Game loaded successfully!');\n\t$('#titleScreenMenu-button-loadGame').addClass('element-hide');\n\t$('#titleScreenMenu-button-newGame').addClass('element-hide');\n\t$('#titleScreenMenu-button-play').removeClass('element-hide');\n\t$('#titleScreenMenu-button-play').html(\"Continue\");\n\treturn playerTemp;\n\t\n}", "title": "" }, { "docid": "af53e5fe6a49672c9c1c149b36087f4f", "score": "0.51454955", "text": "function getData()\t{\t\n\t\tCORE.LOG.addInfo(\"PROFILE_SYNCH:getData\");\n\t\t_this_.socket.emit('profileGetData',\n\t\t\t{ \t\t\n\t\t \t\tplayerID:gameData.data.player.playerID\n\t\t\t}\n\t \t);\n\t}", "title": "" }, { "docid": "ef91e870d83785613a61284b5190d728", "score": "0.51406485", "text": "function savePlayer(playerName, playerNum){\n fetch('/api/setup/savePlayerName/' + playerNum,\n {\n method:'post',\n headers: {\n \"Content-type\": \"application/json\"\n },\n body: '{\"name\": \"' + playerName + '\"}'\n\n\t}).then(function(response) {\n if (response.status !== 200) {\n console.log('your request is not good');\n return;\n }\n console.log(\"player \" + (playerNum+1) + \", \" + playerName + \", saved!\");\n });\n}", "title": "" }, { "docid": "5f6ae34b1bc346ff0c32fd1d6583555b", "score": "0.5137324", "text": "currentPlayerData() {\n return this.getPlayerDataForHandIdx(this.currentHandIdx)\n }", "title": "" }, { "docid": "8bfb88fc3d610ea90c6ea70d4b938e89", "score": "0.51352215", "text": "addPlayer(playerId,playerData) {\n this.players[playerId] = new Player(playerId,playerData.username,playerData.color)\n this.numPlayers++\n\n this.sendLobbyUpdateToAll() \n\n if (this.game) {\n this.game.addPlayer(playerId)\n }\n\n if (this.host === null) {\n this.assignHost(playerId)\n }\n }", "title": "" }, { "docid": "58a7478f613123165b4cb064e50da7c6", "score": "0.5121312", "text": "function locatePlayer(player){\n var id=player.playerId;\n for(var i=0; i<data.players.length; i++){\n if(parseInt(id) == parseInt(data.players[i].playerid)){\n return data.players[i];\n }\n }\n return player;\n}", "title": "" }, { "docid": "5a97f3a178f30a0c770a6781b00dc373", "score": "0.5099045", "text": "function updateThisPlayerData(){\n\tlet p = Players.findOne({id : getThisPlayerID()})\n\t// Add more stuff?\n\n\tp.sign = p.sign // TODO Hooks for possible sign change?\n\tp.maxHP = getMaxHP(p)\n\tp.maxMana = getMaxMana(p)\n\tp.maxPA = getMaxPA(p)\n\tp.defences = getDefences(p)\n\n\tMeteor.call('player.updateFull', p.id, p)\n}", "title": "" }, { "docid": "86d024568a635104d369b2f8bbb444aa", "score": "0.50978994", "text": "function addedPlayerData() { return {\n}}", "title": "" }, { "docid": "86d024568a635104d369b2f8bbb444aa", "score": "0.50978994", "text": "function addedPlayerData() { return {\n}}", "title": "" }, { "docid": "099eb50d24c1d81774d46376cf9dba26", "score": "0.5096479", "text": "function saveData() {\n //Set variable\n var players;\n\n //Set object\n var player = {\n initials: initials,\n score: score,\n };\n\n //Creates new array and save the first player\n if (localStorage.getItem('players') === null) {\n players = [];\n players.push(player);\n localStorage.setItem('players', JSON.stringify(players));\n } else { //If the array exist just push the new player's object\n players = JSON.parse(localStorage.getItem('players'));\n players.push(player);\n localStorage.setItem('players', JSON.stringify(players));\n }\n}", "title": "" }, { "docid": "61c6fe07653ab4a28f23ba7e3eefa4d1", "score": "0.5071244", "text": "function _addPlayer(p) {\n return dataservice.addPlayer(p).then(function(resp) {\n //self.players.push(p);\n }).catch(function(err) {\n console.error(err);\n });\n }", "title": "" }, { "docid": "ea3e3f23bbf079377a7e9f54cf33d98c", "score": "0.50677025", "text": "function SummonerData(summonerName) {\n api.Summoner.gettingByName(summonerName).then(account => {\n const sID = account.id;\n const aID = account.accountId;\n const name = account.name;\n const lvl = account.summonerLevel;\n console.log('sID: ', sID);\n console.log('aID: ', aID);\n console.log('name: ', name);\n console.log('lvl: ', lvl);\n api.Summoner.gettingByName(summonerName).then(account => {\n api.Match.gettingRecentListByAccount(account.accountId).then(match => {\n console.log('--RECENT GAMES--');\n console.log(match.matches.length);\n console.log(match.matches[0]);\n for (let m = 0; m < match.matches.length; ++m) {\n const role = match.matches[m].role;\n const lane = match.matches[m].lane;\n const champID = match.matches[m].champion;\n console.log('----- game ' + m + '------');\n console.log('role:', role);\n console.log('lane:', lane);\n console.log('champ:', champID);\n test(champID);\n }\n });\n });\n });\n}", "title": "" }, { "docid": "65c57df91ce53fa81a81c35ed6da579f", "score": "0.50499654", "text": "function saveToLocal(data) {\r\n localStorage.setItem(\"player-list\", JSON.stringify(data));\r\n}", "title": "" }, { "docid": "15f7bd89c95ff659fbe1d034d8f45b1a", "score": "0.50357884", "text": "function reconcilePlayerData(playerData) {\n // Require the basics be set already\n if (!playerData) { return; }\n if (!playerData.name) { return; }\n if (!playerData.image) { return; }\n\n // Get fresh player data for comparison\n var freshData = createNewPlayerData(\"Ritsuka\", \"Ritsuka-Female-Mage\");\n var entries = Object.entries(freshData);\n\n // Go through each property in the fresh data\n // and set it to the default if it doesn't already exist\n for (const [property, value] of entries) {\n if (!playerData.hasOwnProperty(property)) {\n playerData[property] = value;\n }\n }\n}", "title": "" }, { "docid": "5556abdc13b798eae816ab24bca7714c", "score": "0.5020903", "text": "function PlayerMatchDataCtrl($scope, PlayerDetailService, playerEvents) {\n\n this.data = [];\n var controller = this;\n\n $scope.$on(playerEvents.found, function(event, data) {\n\n PlayerDetailService.buildDataTable(data.player).then(function (data) {\n controller.data = data;\n });\n\n });\n }", "title": "" }, { "docid": "b05cf61da8b495a1d5b156984f6336da", "score": "0.5006821", "text": "function getPlayerData(pid) {\n\t\t\treturn $http.get(\"http://cricapi.com/api/playerStats?pid=\" + pid);\n\t\t}", "title": "" }, { "docid": "e982743ea64c0fcf29f2bc9a5e573e81", "score": "0.4994411", "text": "function getCurrentMatchBySummonerId(sumId) {\n\tvar data;\n\t$.ajax({\n\t\turl: \"https://euw.api.pvp.net/observer-mode/rest/consumer/getSpectatorGameInfo/EUW1/\"+sumId+\"?api_key=\" + API_KEY,\n\t\tdataType: 'json',\n\t\tdata: data,\n\t\tasync: false,\n\t\tsuccess: function(json){\n\t\t\tdata = json;\n\t\t},\n\t\terror: function (XMLHttpRequest, textStatus, errorThrown) {\n\t\t\t//alert(\"Summoner is not playing\");\n\t\t\t$(\"#tabs-2\").html(\"Summoner is not playing at this moment\");\n\t\t\t$(\"#tabs-3\").html(\"Summoner is not playing at this moment\");\n\t\t}\n\n\t});\n\treturn data;\n}", "title": "" }, { "docid": "16b8969c758b0fd971673a37bce94bdf", "score": "0.49941528", "text": "function syncStore(data) {\n fs.writeFileSync(\n \"player.json\",\n JSON.stringify(data),\n { flag: \"w+\" },\n function (err) {\n if (err) {\n return console.log(err);\n }\n }\n )\n}", "title": "" }, { "docid": "effdad6027f1e8be037d6b6478d58623", "score": "0.49849024", "text": "async function getPlayerPersonalPageByID(player_id){\r\n let promises = [];\r\n promises.push(\r\n await axios.get(`${api_domain}/players/${player_id}`, {\r\n params: {\r\n api_token: process.env.api_token,\r\n include: \"team\",\r\n },\r\n })\r\n )\r\n let players_info = await Promise.all(promises);\r\n console.log(\"player info: \");\r\n console.log(players_info[0].data.data);\r\n return extractRelevantPlayerPageDataByID(players_info)\r\n}", "title": "" }, { "docid": "e9fa7eb3db4af5e22c408e8fcdbfcc0c", "score": "0.49734277", "text": "function publicInfo(player) {\n return {\n name: player.info.name\n };\n }", "title": "" }, { "docid": "dbdb4eef2f963d7cabd2569ae3a0c597", "score": "0.49727917", "text": "function deletePlayerData() {\n localStorage.setItem(\"playerData\", JSON.stringify(null));\n}", "title": "" }, { "docid": "e74eab26471cf8bcd28703b0e0cd20a1", "score": "0.49711818", "text": "function clientPlayerInfo(player) {\n\treturn {\n\t\tsteamid : player.steamid,\n\t\tdisplay_name : player.display_name,\n\t\tavatar : player.avatar,\n\t\twins : player.wins,\n\t\tlosses : player.losses,\n\t\tihmmr : player.ihmmr,\n\t};\n}", "title": "" }, { "docid": "a69dd2d5f4d239878fbadd456de07841", "score": "0.49617893", "text": "function loadGameSave() {\n // Parse json back to object and return from function\n return JSON.parse(localStorage.getItem('3-in-A-Row-Game-Data'));\n }", "title": "" }, { "docid": "2b9b19ba8e8b2c70d5538805c2795b5e", "score": "0.4952105", "text": "function loadSummonerData(matches) {\n\tdataset = [];\n\tconsole.log(\"LOADING SUMMONER DATA\");\n\n\t\t// array of all the objects for match data\n\t\tfor (var i = 0; i < matches.length; i++) {\n\t\t\tvar team = matches[i].player.teamId;\n\n\t\t\tvar participants = matches[i].participants;\n\t\t\tvar win = matches[i].player.winner;\n\n\t\t\t// skip matches that don't match the settings\n\t\t\tif (!filterByChampion(matches[i])) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (!filterByTeam(matches[i])) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (!filterByRole(matches[i])) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (!filterBySeason(matches[i])) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfor (var j = 0; j < participants.length; j++) {\n\t\t\t\tif (participants[j].teamId == team) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tvar champion = participants[j].championId;\n\n\t\t\t\tif (champion in dataset) {\n\t\t\t\t\tdataset[champion].value++;\n\t\t\t\t} else {\n\t\t\t\t\tdataset[champion] = {name : champion, value : 1, win : 0};\n\t\t\t\t} \n\t\t\t\tif (win) {\n\t\t\t\t\tdataset[champion].win++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tdataset = dataset.filter(function (d) {\n\t\t\treturn d !== undefined;\n\t\t});\n\n\t\tconsole.log(sumDataset(dataset));\n\n\t\t// if there is no data, create 404 teemo graph\n\t\tif (dataset.length == 0) {\n\t\t\tdataset.push({name : 17, value : 100, win : 404});\n\t\t\t$(\"#graphtitle\").html(\"No data for this selection\");\n\t\t} else {\n\t\t\t$(\"#graphtitle\").html(\"Played against\");\n\t\t}\n\t\tloadList(dataset);\n\n\t\tvisualizeData({\"children\" : dataset});\n}", "title": "" }, { "docid": "0e51367c4a39bab4bce5cccd1d3087d1", "score": "0.49455228", "text": "getPlayer(playerId) {\n\t\treturn this.players.filter((player) => player.playerId === playerId)[0];\n\t}", "title": "" }, { "docid": "601ebf9d7eb941c267e2c51fadd16c17", "score": "0.49274462", "text": "getGameData() {\n return { name: this._nameStore, description: this._descriptionStore, price: this._priceStore };\n }", "title": "" }, { "docid": "faebfb88428d80be346b6ea66e0c2c25", "score": "0.49214447", "text": "function updateDriverInfo() { \r\n\tconst driverData = JSON.parse(localStorage.getItem('driverData'));\r\n\tsocket.emit('updateDriverData',driverData);\r\n\tconsole.log('Calling for driver update');\r\n\tupdateDriverStatus(driverData);\r\n\t//Driver object\r\n\t//socket.emit('updateDriverInfo',{ id: driverID, occupiedSeats: occupiedseats, colorCode: colorCode });\r\n}", "title": "" }, { "docid": "b465f24b63e37c27eceacfcb2a2877ca", "score": "0.49208748", "text": "function nameChange(){\r\n wg.getPlayerData(selectedPlayer.value,serverName.value)\r\n .then(player =>{\r\n //console.log(player.playerData.data[selectedPlayer.value]);\r\n ui.playerData(player.playerData.data[selectedPlayer.value]);\r\n })\r\n}", "title": "" }, { "docid": "6a20c679a3aed2944af08a45ee481d78", "score": "0.4916201", "text": "function make_player_data() {\n var p_data = new GameEntity(player_startPosX, player_startPosY, 150, 20, Phaser.RIGHT, Phaser.NONE, new Phaser.Point(), new Phaser.Point());\n p_data.powered_up = 0;\n return p_data;\n}", "title": "" }, { "docid": "dab72d6ea2d98c4e81cb9cd96340a45d", "score": "0.49080226", "text": "function extractRelevantPlayerDataByName(players, player_pos, group_name) {\r\n let players_data = players[0].data.data;\r\n \r\n players_data = players_data.filter(function (elem) {\r\n return elem != null;\r\n });\r\n\r\n // Filter by player's position\r\n if(player_pos != \"\")\r\n players_data = players_data.filter((player_info) => player_info.position_id == player_pos)\r\n\r\n // Filter by group's name\r\n if(group_name != \"\"){\r\n players_data = players_data.filter((player_info) => player_info.team && (player_info.team.data.name.toString().toLowerCase()).includes(group_name.toLowerCase()))\r\n }\r\n \r\n // Extract relevant data \r\n return players_data.map((player_info) => {\r\n const { player_id, fullname, image_path, position_id } = player_info;\r\n var team_name = \"\";\r\n try{\r\n team_name = player_info.team.data.name\r\n }\r\n catch{\r\n team_name = \"not define\";\r\n }\r\n \r\n if(player_info){\r\n return {\r\n player_id: player_id,\r\n name: fullname,\r\n image: image_path,\r\n position: position_id? position_id.toString() : \"unknown\",\r\n team_name: team_name,\r\n }; \r\n } \r\n });\r\n}", "title": "" }, { "docid": "fba5ab20e1fdaed4f7724de4d8bd3f6e", "score": "0.49059275", "text": "function getUserData(match,client,done){\n var match = match;\n var path = 'https://na.api.pvp.net/api/lol/na/v1.3/game/by-summoner/' + match.user_summoner_id + '/recent?api_key=' + API_KEY;\n request.get(path, function(err, response) {\n if (!err) {\n var userJson = JSON.parse(response.body);\n var userGamesPlayed = 0;\n var userOldGameReached = false;\n var userNewLastGameId = 0;\n for (var userKey in userJson){\n if (!userJson.hasOwnProperty(userKey)) continue;\n var userGame = userJson[userKey];\n for(var userAttr in userGame){\n if(!userGame.hasOwnProperty(userAttr)) continue;\n\n //set new value for last_game_played\n if (userNewLastGameId === 0) {\n userNewLastGameId = userGame[0].gameId;\n }\n //set userOldGameReached to true if gameId is the same as the last_game_played\n if(userGame[userAttr].gameId === match.user_last_game_id){\n userOldGameReached = true;\n } \n //update game count if game isnt old and champion is the same\n else if(userGame[userAttr].championId === match.champion_id){\n userGamesPlayed ++;\n }\n } \n }\n\n getOppData(match,client,done,userNewLastGameId,userOldGameReached,userGamesPlayed);\n } else {\n console.error(err);\n }\n });\n }", "title": "" }, { "docid": "1148afc996194db9c43ec53c8b502b66", "score": "0.49033782", "text": "function loadPlayerDataFile(game, dataText, music) {\n if (!dataText) { return; }\n\n // Load and validate player data\n var playerData;\n try { playerData = decryptPlayerData(dataText); }\n catch (exception) { invalidPlayerData(); return; }\n\n if (!playerData) { invalidPlayerData(); return; }\n if (!playerData.name) { invalidPlayerData(); return; }\n if (!playerData.image) { invalidPlayerData(); return; }\n if (!playerData.lastSave) { invalidPlayerData(); return; }\n if (!playerData.servants) { invalidPlayerData(); return; }\n if (playerData.servants.length == 0) { invalidPlayerData(); return; }\n\n // Confirmation\n var confirmed = confirm(\"Are you sure you want to replace your current game data with this one?\" +\n \"\\n\\t\" + playerData.name +\n \"\\n\\tServants: \" + playerData.servants.length +\n \"\\n\\tLast saved: \" + playerData.lastSave +\n \"\\n\\nThis will restart the game.\" );\n\n if (confirmed) {\n playerData.lastLoad = curDateSlashes();\n savePlayerData(playerData);\n music.stop();\n game.scene.start(\"MenuScene\");\n }\n}", "title": "" }, { "docid": "4425c0f9dd90ff073e9f2d936a9350b0", "score": "0.48949945", "text": "function refreshPlayerData()\n{\t\n\tplayerData.gameX = playersTank.gameX/scale;\n\tplayerData.gameY = playersTank.gameY/scale;\n\t// playerData.x = playersTank.xPosition;\n\t// playerData.y = playersTank.yPosition;\n\t// playerData.xOnMyScreen = playersTank.xOnScreen;\n\t// playerData.yOnMyScreen = playersTank.yOnScreen;\n\t\n\tplayerData.isMoving = playersTank.isMoving;\n\tplayerData.moveAngle = playersTank.moveAngle;\n\tplayerData.turretAngle = playersTank.turretAngle;\n\tplayerData.mouseX = mouseX/scale;\n\tplayerData.mouseY = mouseY/scale;\n\tplayerData.currentHealth = playersTank.currentHealth;\n\t// playerData.cameraX = camera[0];\n\t// playerData.cameraY = camera[1];\t\n}", "title": "" }, { "docid": "ff116aa62de95c3bf92f508326df76bf", "score": "0.48941848", "text": "function playerById( id, data ) {\n var i;\n for (i = 0; i < data.length; i++) {\n if (data[i].getId() == id)\n return data[i];\n };\n\n return false;\n }", "title": "" }, { "docid": "267d3ffbf857e8c10af255aea1339d59", "score": "0.48862875", "text": "function GetPlayerProxy(player) {\n\n console.log(player);\n console.log(app.playerList);\n\n return GetPlayerProxyById(player.get(\"id\"));\n }", "title": "" }, { "docid": "9886933a0c9fe1082629408a79ad0765", "score": "0.4881677", "text": "function storeLocal() {\n var playersJSON = JSON.stringify(parsedlclStrgObjArr);\n localStorage.setItem('players', playersJSON);\n}", "title": "" }, { "docid": "0029f9858d6d03d6585cbd5484f1d330", "score": "0.48736992", "text": "function retrieveLocal() {\n if (localStorageObjArr) {\n parsedLclStrgNameArr = JSON.parse(localStorageNameArr);\n parsedlclStrgObjArr = JSON.parse(localStorageObjArr);\n }\n if (localPreviousPlayerObj) {\n parsedPrevPlayerObj = JSON.parse(localPreviousPlayerObj);\n }\n}", "title": "" }, { "docid": "31f77394baf2c3a26ce05bd28efa3c2a", "score": "0.48736304", "text": "function getPlayers(){\n $http.get('/players').then(handleSuccess, handleFailure);\n }", "title": "" }, { "docid": "c85bbd21a878cf1a6ab232512f293ead", "score": "0.4869552", "text": "function extractRelevantPlayerData(players_info) {\r\n return players_info.map((player_info) => {\r\n const { player_id, fullname, image_path, position_id } = player_info.data.data;\r\n const { name } = player_info.data.data.team.data;\r\n return {\r\n player_id: player_id,\r\n name: fullname,\r\n image: image_path,\r\n position: position_id,\r\n team_name: name,\r\n };\r\n });\r\n}", "title": "" }, { "docid": "0319d7e401cca0c96685ef6e07d319c1", "score": "0.48614657", "text": "function checkDataAvailability() {\n if(playerId === 'null' || playerId === 'undefined' || playerId === null || playerId === undefined || playerId === ''){\n playerId = '';\n }\n if(playerName === 'null' || playerName === 'undefined' || playerName === null || playerName === undefined || playerName === ''){\n playerName = '';\n }\n if(playerTeam === 'null' || playerTeam === 'undefined' || playerTeam === null || playerTeam === undefined || playerTeam === ''){\n playerTeam = '';\n }\n if(playerPosition === 'null' || playerPosition === 'undefined' || playerPosition === null || playerPosition === undefined || playerPosition === ''){\n playerPosition = '';\n }\n if(playerNumber === 'null' || playerNumber === 'undefined' || playerNumber === null || playerNumber === undefined || playerNumber === ''){\n playerNumber = '';\n }\n if(playerPersonalImage === 'null' || playerPersonalImage === 'undefined' || playerPersonalImage === null || playerPersonalImage === undefined || playerPersonalImage === ''){\n playerPersonalImage = '';\n }\n if(playerTImg === 'null' || playerTImg === 'undefined' || playerTImg === null || playerTImg === undefined || playerTImg === ''){\n playerTImg = '';\n }\n}", "title": "" }, { "docid": "b7630a649264117bd2c0441ead513c37", "score": "0.485923", "text": "function getTeamInfo(player) {\n\tconsole.log('get team info called');\n\tconsole.log('player_', player);\n\tlet teamInfoKeys = [\"pt_league\", \"pt_league_full\", \"pt_league_short\", \"pt_org\", \"pt_org_abbrev\", \"pt_org_full\", \"pt_org_short\", \"pt_season_state\", \"pt_team\", \"pt_team_abbrev\", \"pt_team_brief\", \"pt_team_short\", \"pt_league_full\"];\n\tlet query = utils.createQuery(`players/${player.player_id}`);\n\tlet teamObj = {};\n\treturn new Promise(function(resolve, reject) {\n\t\tresolve(utils.createSnapshot(query, function(snapshot) {\n\t\t\t\tlet teamData = (snapshot.val().player_team);\n\t\t\t\tteamInfoKeys.forEach(function(teamInfoKey) {\n\t\t\t\t\tObject.defineProperty(teamObj, [`${teamInfoKey}`], {\n\t\t\t\t\t\tvalue: teamData[teamInfoKey] !== undefined ? teamData[teamInfoKey] : \"\",\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t\tObject.defineProperty(teamObj, 'pt_org_link', {\n\t\t\t\t\tvalue: teamObj.pt_org_abbrev === 'WSH' ? 'WAS' : teamObj.pt_org_abbrev,\n\t\t\t\t});\n\t\t\treturn teamObj;\n\t\t}));\n\t});\n}", "title": "" }, { "docid": "ed42b6f0e829f69cb55a8b67b366a24b", "score": "0.48550245", "text": "getSaveState() {\n let players = this.getPlayers().map((player) => {\n return {\n deck: player.deckData.identity,\n houses: player.houses,\n keys: player.keys,\n name: player.name,\n turn: player.turn,\n wins: player.wins\n };\n });\n\n return {\n adaptive: this.adaptive,\n challonge: this.challonge,\n finishedAt: this.finishedAt,\n gameFormat: this.gameFormat,\n gameId: this.id,\n gamePrivate: this.gamePrivate,\n gameType: this.gameType,\n id: this.savedGameId,\n players: players,\n previousWinner: this.previousWinner,\n startedAt: this.startedAt,\n swap: this.swap,\n winReason: this.winReason,\n winner: this.winner ? this.winner.name : undefined\n };\n }", "title": "" }, { "docid": "577a69154a629b105139fe46a5e11649", "score": "0.48508206", "text": "getPlayerId(player) {\n return this.players[player].id;\n }", "title": "" }, { "docid": "1892298619b665dfcb56f57199d73976", "score": "0.48492625", "text": "function storePlayerLocalStorage() {\n localStorage.setItem(\"player1\", JSON.stringify(player1))\n localStorage.setItem(\"player2\", JSON.stringify(player2))\n}", "title": "" }, { "docid": "33af8b2b4f23282a0c32e0066bb57b89", "score": "0.48467758", "text": "function get_player_info(player, res){\n const player_endpoint = `https://www.balldontlie.io/api/v1/players?search=${player}`;\n\n\thttps.request(player_endpoint, {method:\"GET\"}, process_stream).end();\t\n\t\n\tfunction process_stream (player_stream){\t\n\t\tlet player_data = \"\";\n\t\tplayer_stream.on(\"data\", chunk => player_data += chunk);\t\n player_stream.on(\"end\", () => get_player_id(player_data, player, res));\n }\n \n}", "title": "" }, { "docid": "0eed4aadf724bd40a3954ab052131f02", "score": "0.48458216", "text": "async getOurworkForService(shortname){\n //Access all the speaker.json data\n const data = await this.getData();\n //Find the data for the speaker we are after and store it in speaker\n const service = data.find((service) => {\n return service.shortname === shortname;\n });\n //If no data found return null\n if(!service || !service.ourwork) return null;\n return service.ourwork; \n }", "title": "" }, { "docid": "41b4ac1614f4f9e52ea21a3d7cae603f", "score": "0.48408306", "text": "function updateID(data){\n localPlayer.id = data.id;\n localPlayer.playerNumber = data.playerNumber;\n}", "title": "" }, { "docid": "e1aa15056a6d05bf87ec61f36be92788", "score": "0.48323077", "text": "function getPlayer() {\n\treturn player;\n}", "title": "" }, { "docid": "1414b30b2c09dce1f0e6e4b7b3e4bbf3", "score": "0.4820397", "text": "function StoreTrackDataOverCurrentClient (ReferralCode)\r\n{\r\n\r\n\r\nvar GetCurrentClientReadOnlyDataRequest = {\"PlayFabId\": currentPlayerId}; \r\n\r\nvar GetCurrentClientReadOnlyDataResult = server.GetUserReadOnlyData(GetCurrentClientReadOnlyDataRequest);\r\n\r\nvar UpdateCurrentClientReadOnlyDataRequest = {\r\n\"PlayFabId\": currentPlayerId ,\r\n\"Data\": {}\r\n};\r\n\r\nUpdateCurrentClientReadOnlyDataRequest.Data [\"ReferralPending\"] = ReferralCode;\r\n\r\n\r\nvar UpdateCurrentClientReadOnlyDataResult = server.UpdateUserReadOnlyData(UpdateCurrentClientReadOnlyDataRequest);\r\n\r\n\r\n\r\nif(UpdateCurrentClientReadOnlyDataResult ) \r\n{\r\n\r\nIssueCurrentClientReferralBadge ();\r\n\r\nStoreTrackDataOveReferrer (ReferralCode)\r\n;\r\n\r\n}\r\n\r\n} // END OF THE FUNCTION ! ", "title": "" }, { "docid": "4d72bad116957a5e5a5d614a973a7420", "score": "0.48202217", "text": "function findComparePlayer(playerName){\n\n\tfor(obj in playerData){\n\t\tfor(key in playerData[obj]){\n\t\t\tif(playerData[obj].name == playerName)\n\t\t\t\treturn playerData[obj];\n\t\t}\n\t}\n}", "title": "" }, { "docid": "7d21cc21e5752c02d6e13c0dfcc6308d", "score": "0.4820095", "text": "function createPlayer(playerData, emitterMessage, onSuccess) {\n var userDoc = {\n phone: playerData.phone,\n current_game_id: playerData.docId,\n updated_at: Date.now()\n };\n\n // Don't set name if it's null or undefined.\n if (playerData.name) {\n userDoc.name = playerData.name;\n }\n\n userModel.update(\n {phone: playerData.phone},\n {$set: userDoc},\n {upsert: true}\n ).exec().then(function(num, raw) {\n emitter.emit(emitterMessage);\n if (raw && raw.upserted) {\n logger.info(emitterMessage, JSON.stringify(raw.upserted));\n }\n if (typeof onSuccess === 'function') {\n onSuccess();\n }\n }, utility.promiseErrorCallback('Unable to create player, this event did not happen: ' + emitterMessage)\n )\n }", "title": "" }, { "docid": "fef1e08b02de9188b0945540e8441a83", "score": "0.4816065", "text": "function getPointsFromSession(player) {\n console.log(\"At start of getPointsFromSession(\"+player+\"), session:\"+JSON.stringify(session));\n session = getSessionFromStorage();\n console.log(\"In getPointsFromSession(\"+player+\") after getSessionFromStorage() call, session:\"+JSON.stringify(session));\n if(player == 'human') {\n console.log(\"Player is human. session.humanPoints:\"+session.humanPoints);\n return session.humanPoints;\n } else {\n console.log(\"Player is machine. session.machinePoints:\"+session.machinePoints);\n return session.machinePoints;\n }\n}", "title": "" }, { "docid": "c813e33bb8e1c08f5c6e22603971b267", "score": "0.48066917", "text": "async getCurrentPlayer() {\n return await (await fetch(\"/players\")).json();\n }", "title": "" }, { "docid": "5d8cb5f37bb5db64ea19903b32ab7fba", "score": "0.4790094", "text": "addPlayer(player) {\n var data = {\"data\": {\n \"player\" : player,\n \"user\" : localStorage.email,\n \"team\" : this.props.activeTeam }};\n\n data = JSON.stringify(data);\n\n var url = \"http://localhost:3000/team/registerPlayer\";\n var request = new Request (url, {\n method : 'POST',\n body : data,\n headers : new Headers ({'Content-Type' : 'application/json'})\n });\n\n fetch(request).then(function(response){\n return response.json();\n }).then(function(j){\n console.log(j);\n }).catch((error) => {\n console.warn(error);\n });\n }", "title": "" }, { "docid": "8f5ddce2188eac8f07a211cd63c07e6b", "score": "0.47846964", "text": "function saveToService(data) {\n let localUrl =ip+'/updateHearing?hearingID=' + _id;\n\n request.open('POST', localUrl, true);\n request.send(JSON.stringify(data));\n}", "title": "" }, { "docid": "bed12b3acaf3544e68fb791a320a1a63", "score": "0.47722915", "text": "function persistPlayer(handle, playerId) {\n const player = { handle: handle, playerId: playerId }\n localStorage.setItem('player', JSON.stringify(player))\n}", "title": "" }, { "docid": "4dff0520d5512f9aab1eb8cdc9d7deae", "score": "0.4771449", "text": "function getAvengerDataSucess(data){\n fs.writeFile(__dirname + \"/tmp/data.json\", JSON.stringify(data), function(err) {\n if(err) {\n return console.log(err);\n }\n console.log(\"Data fetched and processed successfully!\");\n\n fs.writeFile(__dirname + \"/tmp/errors.json\", \"\", function(err) {\n if(err) {\n return console.log(err);\n }\n });\n\n fs.writeFile(__dirname + \"/tmp/last_date.txt\", new Date().getTime(), function(err) {\n if(err) {\n return console.log(err);\n }\n dataForClients = data\n dataReady();\n });\n });\n}", "title": "" }, { "docid": "e6ce57b870d6d7ec6215c3db4caf83de", "score": "0.47635877", "text": "getLocalSessionData (dat) {\n var {watcher} = this.getWatcher(dat)\n if (watcher) {\n return watcher.localSessionData\n }\n }", "title": "" }, { "docid": "1623e31e2e56a90d21c93bad0ab765e0", "score": "0.47554988", "text": "function parseMatchData(match, accountId) {\n // Locate the player identity\n const playerIdentity = extractParticipantIdFromIdentitiesArray(\n match.participantIdentities,\n accountId\n );\n\n // console.log(playerIdentity);\n\n // Retrieve player object from match\n var playerData = undefined;\n try {\n playerData = match.participants[playerIdentity - 1]; // offset the id to match participant array\n } catch (err) {\n console.log(err);\n }\n // console.log(playerData);\n //Create Meta object\n const meta = {\n gameMode: match.gameMode,\n gameCreation: match.gameCreation,\n gameDuration: match.gameDuration,\n winStatus: playerData.stats.win\n };\n // console.log(meta);\n\n const player = {\n summonerName: \"\",\n champion: new Champion(playerData.championId),\n spell: [new Spell(playerData.spell1Id), new Spell(playerData.spell2Id)],\n rune: [\n new Rune(playerData.stats.perkPrimaryStyle, playerData.stats.perk0),\n new Rune(playerData.stats.perkSubStyle)\n ]\n };\n // console.log(player);\n // calculate cs\n var creepScore =\n playerData.stats.totalMinionsKilled + playerData.stats.neutralMinionsKilled;\n // calculate cspm\n var gameDurationInMinutes = match.gameDuration / 60;\n var creepScorePerMin = creepScore / gameDurationInMinutes;\n\n const stats = {\n kills: playerData.stats.kills,\n deaths: playerData.stats.deaths,\n assists: playerData.stats.assists,\n champLevel: playerData.stats.champLevel,\n creepScore: creepScore,\n creepScorePerMin: creepScorePerMin\n };\n\n // console.log(playerData.stats);\n // Find a way to do this in a loop if possible\n const item = [\n new Item(playerData.stats.item0),\n new Item(playerData.stats.item1),\n new Item(playerData.stats.item2),\n new Item(playerData.stats.item3),\n new Item(playerData.stats.item4),\n new Item(playerData.stats.item5),\n new Item(playerData.stats.item6)\n ];\n\n const matchData = {\n meta: meta,\n player: player,\n stats: stats,\n item: item\n };\n return matchData;\n // console.log(item);\n}", "title": "" }, { "docid": "d4d0a550b577b54200e5f11ee271049f", "score": "0.4755469", "text": "function getData() {\n //Starts the process of creating data on the given game\n\n //Get statistics on the leagues of each player\n DataHandler.fetchLeagueData(getSummonerList(), cache.core.gameType).catch(function(error) {\n return handleErrorMessage(error, \"league\");\n \n //Send league data and proceed\n }).then(function(data) {\n //If \"data\" is \"false\", do not send data, as there was a non-crucial error in a previous promise\n //We continue because it is not crucial data, and the rest should still be sent.\n if(data !== false) {\n //Store data\n cache.league = DataFormatter.formatLeagueData(data, getSummonerList());\n emitData(\"league\", cache.league);\n }\n\n //Get statistics on the champions each play plays\n return DataHandler.fetchChampionData(getSummonerList());\n\n }).catch(function(error) {\n return handleErrorMessage(error, \"champion\");\n\n //Send champ data and proceed\n }).then(function(data) {\n //If \"data\" is \"false\", do not send data, as there was a non-crucial error in a previous promise\n //We continue because it is not crucial data, and the rest should still be sent.\n if(data !== false) {\n //Store data\n cache.champion = DataFormatter.formatChampData(data, getSummonerList());\n emitData(\"champion\", cache.champion);\n }\n\n //Send the match history of each player\n return DataHandler.fetchMatchHistory(getSummonerList(), champData);\n\n }).catch(function(error) {\n return handleErrorMessage(error, \"matchhistory\");\n\n //Send match history data\n }).then(function(data) {\n //If \"data\" is \"false\", do not send data, as there was a non-crucial error in a previous promise\n //We continue because it is not crucial data, and the rest should still be sent.\n if(data !== false) {\n //Store data\n cache.matchhistory = data; //Is already formatted\n emitData(\"matchhistory\", cache.matchhistory);\n }\n\n //Fetch the most played champions of each player\n return DataHandler.fetchMostPlayedChampions(getSummonerList(), config.numberOfTopChampions);\n \n }).catch(function(error) {\n return handleErrorMessage(error, \"most played champions\");\n\n //Handle the most played champion data\n }).then(function(data) {\n //If \"data\" is \"false\", do not send data, as there was a non-crucial error in a previous promise\n //We continue because it is not crucial data, and the rest should still be sent.\n if(data !== false) {\n //Store data\n cache.mostplayed = DataFormatter.formatMostPlayedChampions(data, getSummonerList(), champData);\n emitData(\"mostplayed\", cache.mostplayed);\n }\n\n return DataHandler.fetchMostPlayedRole(getSummonerList());\n \n }).catch(function(error) {\n return handleErrorMessage(error, \"most played roles\");\n\n }).then(function(data) {\n //If \"data\" is \"false\", do not send data, as there was a non-crucial error in a previous promise\n //We continue because it is not crucial data, and the rest should still be sent.\n if(data !== false) {\n //Store data\n cache.roles = DataFormatter.formatRoleData(data, getSummonerList());\n emitData(\"roles\", cache.roles);\n }\n\n }).catch(function(error) {\n //Handle errors that are passed all the way down\n console.log(error.stack);\n if(typeof errorMessage != 'undefined') {\n //Do not send an error if we just get a new game\n emitData(\"error\", {\n type: \"crucial\",\n error: error\n });\n }\n });\n }", "title": "" }, { "docid": "b81f2ae0941dede10894457fa7e4ee30", "score": "0.4750183", "text": "function load(){\n\t\t\tvar pdata = LOAD_JSON(\"player\");\n\t\t\tif (!pdata) return;\n\t\t\t\n\t\t\tif (pdata.tiller) self.tiller = true;\n\t\t\tif (pdata.agriculturist) self.agriculturist = true;\n\t\t\tif (pdata.level) self.level = pdata.level;\n\t\t\tif (pdata.settings) self.settings = pdata.settings;\n\t\t}", "title": "" }, { "docid": "9480226c0a73053b9386e89ccc40605e", "score": "0.47488266", "text": "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 spiel.setAlienFormation(playerData.alienFormation);\n spiel.setCoverBelt(playerData.coverFormation);\n }\n }", "title": "" }, { "docid": "f9bc509ac352cf71d8b006991c858830", "score": "0.47408694", "text": "async function getPlayerById (pId) {\n const funcName = 'getPlayerById: '\n try {\n // validate input params: pId\n await validationUtil.validateStringTypeParamList([pId])\n // load playerDB.json file from S3\n const s3BucketObjectKey = configsJSON.playerDBS3ObjectKey\n console.log(`${funcName}s3BucketObjectKey = ${s3BucketObjectKey}`)\n const awsS3Util = new AWSS3Util(configsJSON.playerDBS3BucketName)\n const playerList = await awsS3Util.getJSONObjectFromBucket(s3BucketObjectKey)\n console.log(`${funcName}playerList = ${JSON.stringify(playerList)}`)\n if (!(playerList && Array.isArray(playerList))) {\n console.log(`${funcName}invalid db json, dbJson = ${JSON.stringify(playerList)}}`)\n throw (new Error(`${funcName}invalid db json`))\n }\n // iterate to get player by id\n let playerFound = null\n for (const player of playerList) {\n if (player.id === pId) {\n console.log(`${funcName}player matched = ${pId}`)\n playerFound = player\n break\n }\n }\n console.log(`${funcName}playerFound = ${JSON.stringify(playerFound)}`)\n return playerFound\n } catch (error) {\n console.log(`${funcName}error = ${error}`)\n throw (error)\n }\n}", "title": "" }, { "docid": "9cf3b70b16b9ab2dfd142d9dbc68be0d", "score": "0.47349295", "text": "updateInfo(player) {\n notifService2.updateNotif(NOTIF_PLAYER_INFO_REQUEST, player);\n }", "title": "" }, { "docid": "b6ba31c7a51008efdffcdfa8230b2e92", "score": "0.47348657", "text": "function plLocalSave() {\n localStorage.setItem('pl', app.playerlist.work);\n console.log(localStorage.getItem('pl'));\n}", "title": "" }, { "docid": "2ce39b4603ada1f8d2491d9a19c01a70", "score": "0.47341126", "text": "getPlayer(playerId){\n for(var index=0; index<this.players.length; index++){\n if(this.players[index].playerId == playerId){\n return this.players[index];\n }\n }\n }", "title": "" }, { "docid": "e61432107972840245b41ba29f960461", "score": "0.47229484", "text": "function getServerData(id, name) {\n var guildObject = db.get(\"guilds\").find({ \"id\": id }).value();\n if (guildObject === undefined) return undefined;\n else return guildObject[name];\n}", "title": "" }, { "docid": "048c2b2d81c399bdbaf34fa1b4d2ef01", "score": "0.4722888", "text": "function saveTeamBets(data) {\r\n if (!teams) {\r\n alert(\"Please enter teams first\");\r\n throw new Error(\"Please enter teams first\");\r\n }\r\n localStorage.setItem(\"teamBets\", data);\r\n var betsArr = data.split(\"\\n\").filter(bet => !!bet);\r\n\r\n bets = betsArr.map(bet => {\r\n return bet.split(\" \").filter(item => !!item);\r\n }).filter(item => item.length === 4);\r\n\r\n calculateWinningPrediction();\r\n }", "title": "" }, { "docid": "4f201a38548f1aeb9db10e005feffc30", "score": "0.47171548", "text": "function saveVar(){\r\n localStorage.playerName = playerStats.name;\r\n localStorage.playerKeyCode = playerStats.keyCode;\r\n localStorage.playerImg = playerStats.img;\r\n\r\n\r\n localStorage.playerLevelValue = playerStats.level;\r\n localStorage.playerClass = playerStats.class;\r\n localStorage.playerExp = playerStats.experience;\r\n localStorage.playerSpores = playerStats.spores;\r\n\r\n localStorage.healthStatValue = playerStats.health;\r\n localStorage.staminaStatValue = playerStats.stamina;\r\n localStorage.rotStatValue = playerStats.rot;\r\n\r\n localStorage.strengthStatValue = playerStats.strength;\r\n localStorage.dexterityStatValue = playerStats.dexterity;\r\n localStorage.perceptionStatValue = playerStats.perception;\r\n\r\n localStorage.vigorStatValue = playerStats.vigor;\r\n localStorage.agilityStatValue = playerStats.agility;\r\n localStorage.luckStatValue = playerStats.speed;\r\n\r\n localStorage.move0 = playerStats.move0;\r\n localStorage.move1 = playerStats.move1;\r\n localStorage.move2 = playerStats.move2;\r\n localStorage.move3 = playerStats.move3;\r\n\r\n localStorage.playerEquippedWpn = playerStats[16];\r\n}", "title": "" }, { "docid": "ad290b89e2c293e3d837b229153a53ab", "score": "0.4688629", "text": "function _initPlayers() {\n return dataservice.getPlayers().then(function(players) {\n self.players = players;\n $rootScope.$broadcast('modelservice::players_loaded');\n }).catch(function(err) {\n console.error(err);\n }); \n }", "title": "" }, { "docid": "21fa73568de8c0690f3c1f5fbd718e58", "score": "0.4684211", "text": "function MonitorPlayers() {\n var Players = scene.EntitiesOfGroup('Player');\n\n for (var i in Players) {\n var json = null;\n var x = this.me.placeable.Position().x;\n var z = this.me.placeable.Position().z;\n\n //Calculating distance.\n var distance = Math.sqrt(Math.pow((x - Players[i].placeable.Position().x), 2) + \n Math.pow((z - Players[i].placeable.Position().z), 2));\n\n if (Players[i].dynamiccomponent.GetAttribute('spraying')) {\n if (distance < 15) {\n playerToBeBusted = Players[i];\n\n http.client.Get(\"http://vm0063.virtues.fi/gangsters/\").Finished.connect(function(req, status, error) {\n if (status == 200) {\n UploadBustedPlayers(req.body);\n }\n });\n } else\n continue; \n }\n }\n}", "title": "" }, { "docid": "0eeccbbffc7d0ffc9e60ae2ab122ba98", "score": "0.4682222", "text": "function addPlayer(player) {\n\tvar request = false;\n\tvar result = null;\n\trequest = new XMLHttpRequest();\n\tif (request) {\n\t\trequest.open(\"GET\", \"team/\" + player);\n\t\trequest.onreadystatechange = function() {\n\t\t\tif (request.readyState == 4 && request.status == 200) {\n\t\t\t\tresult = JSON.parse(request.responseText);\n\t\t\t\t// Problem\n\t\t\t\tif (result == null) {\n\t\t\t\t\talert(\"PROBLEMO\");\n\t\t\t\t\treturn;\n\t\t\t\t} else {\n\t\t\t\t\t//Game is Full or player was not IN the game\n\t\t\t\t\tif (result == false) {\n\t\t\t\t\t\t//Send to Full PopUp\n\t\t\t\t\t\t//Make 'attending' just so we can make him NOT attending\n\t\t\t\t\t\t//localStorage.setItem('attending', 1);\n\t\t\t\t\t\t$('#fullGamePopup').popup();\n\t\t\t\t\t\t$(\"#fullGamePopup\").popup(\"open\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlocalStorage.setItem('attending', 1);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\trequest.send(null);\n\t}\n\n}", "title": "" }, { "docid": "ec915e52f4ba488ef415dd6db9af8aed", "score": "0.46819282", "text": "function isGoodServer(data)\n{\n\t/* Checks. */\n\tif (!data)\n\t\treturn false;\n\t\t\n\tif (data.max_players < 1)\n\t\treturn false;\n\t\t\n\tif (!data.map || data.map.trim() == '')\n\t\treturn false;\n\t\n\treturn true;\n}", "title": "" } ]
2ea0a6c2428ef62b3fda548282ab63e1
Transforms a target DOM node to match the output of a new render, keeping subtrees that are unchanged.
[ { "docid": "ce5b55549efafdd2980732637a8c11fa", "score": "0.52948284", "text": "transplantDom (into, from, isroot) {\n let self = this;\n \n if (! isroot) {\n if (into.getAttribute) {\n let vstatic = into.getAttribute(\"v-static\");\n if (vstatic == \"keep\") return;\n if (vstatic == \"non-interactive\") {\n into.parentNode.replaceChild (from, into);\n return;\n }\n }\n \n if (! self.compareNodes (into, from)) {\n let hasfocus = false;\n if (into == document.activeElement) {\n if (into.tagName == \"INPUT\" || into.tagName == \"TEXTAREA\") {\n if (into.value != from.value) {\n into.value = from.value;\n }\n return;\n }\n hasfocus = true;\n }\n if (Vidi.debug) {\n console.log (\"[Vidi] replace: \",into);\n console.log (\"[Vidi] with: \",from);\n }\n if (from.parentNode) {\n // We swap out the original for an inferior clone, so we\n // can keep its event listeners, but don't mess up the\n // number of elements in the original's parent while we're\n // iterating over them, which is considered bad form.\n let sup = self.cloneElement (from, {});\n from.parentNode.replaceChild (sup, from);\n }\n into.parentNode.replaceChild (from, into);\n if (hasfocus) from.focus();\n return;\n }\n }\n \n for (let i=0; i<from.childNodes.length; ++i) {\n self.transplantDom (into.childNodes[i], from.childNodes[i]);\n }\n }", "title": "" } ]
[ { "docid": "d9f3084769fccbc7ccf725177b14c54e", "score": "0.6206981", "text": "render(node, domDestination) {\n while (domDestination.firstChild) {\n domDestination.removeChild(domDestination.firstChild);\n };\n \n domDestination.appendChild(this.renderNode(node));\n }", "title": "" }, { "docid": "35ef8671360a16b25da210c079725100", "score": "0.6014685", "text": "function prepareRenderScheme(reconciledVdom) { // Constructs the \n let result;\n result = walkSubTree(reconciledVdom);\n\n function walkSubTree(vNode) {\n let target;\n if (typeof vNode === 'object') {\n switch (vNode.__$type$__) {\n case _customTypes.VirtualElement:\n // console.log('VirtualElement');\n target = vNode;\n target.children = vNode.children.map(function (child) {\n return walkSubTree(child);\n });\n break;\n case _customTypes.FunctionalComponent:\n // console.log('FunctionalComponent');\n target = walkSubTree(vNode.componentSubTree);\n break;\n case _customTypes.ClassComponent:\n // console.log('ClassComponent');\n target = walkSubTree(vNode.componentSubTree);\n break;\n default:\n throw new ReferenceError('__$$type$$__ property does not exist for this virtual node');\n }\n } else {\n target = vNode;\n }\n return target;\n }\n return result;\n}", "title": "" }, { "docid": "6de78ce9b757261638dcdc4ffb9a24b2", "score": "0.58843267", "text": "function modifyNodes() {\n output.innerHTML = '';\n let div = document.createElement('div');\n log('Modifying nodes:');\n log('');\n log('tested div: ' + div.outerHTML);\n log('');\n log(\"document.createElement('div') = \" + document.createElement('div'));\n log('div.outerHTML = ' + div.outerHTML);\n div.appendChild(document.createElement('p'));\n log(\"EXECUTED: div.appendChild(document.createElement('p'))\");\n log('div.outerHTML = ' + div.outerHTML);\n div.insertBefore(document.createElement('h1'), div.firstElementChild);\n log(\"EXECUTED: div.insertBefore(document.createElement('h1'), div.firstElementChild)\");\n log('div.outerHTML = ' + div.outerHTML);\n div.replaceChild(document.createElement('span'), div.lastElementChild);\n log(\"EXECUTED: div.replaceChild(document.createElement('span'), div.lastElementChild)\");\n log('div.outerHTML = ' + div.outerHTML);\n div.removeChild(div.lastElementChild);\n log(\"EXECUTED: div.removeChild(div.lastElementChild)\");\n log('div.outerHTML = ' + div.outerHTML);\n div.appendChild(div.cloneNode(true));\n log(\"EXECUTED: div.appendChild(div.cloneNode(true));\");\n log('div.outerHTML = ' + div.outerHTML);\n div.appendChild(div.cloneNode());\n log(\"EXECUTED: div.appendChild(div.cloneNode());\");\n log('div.outerHTML = ' + div.outerHTML);\n}", "title": "" }, { "docid": "0b40a78e0c93d45869e1fb965fa90500", "score": "0.5587111", "text": "function reconcileVirtualDOM(newVirtualDOM, oldVirtualDOM) {\n let result;\n // if (!oldVirtualDOM) {\n // console.log(\"!oldVirtualDOM\");\n // result = (newVirtualDOM);\n // } else {\n // result = walkAndReconcile(newVirtualDOM, oldVirtualDOM);\n // // console.log(result);\n // }\n result = walkAndReconcile(newVirtualDOM, oldVirtualDOM);\n function walkAndReconcile(newNode, oldNode) {\n let target;\n\n if (!newNode.__$type$__) {\n // Fill out non-component value handling here...\n if (!oldNode || typeof newNode !== typeof oldNode) {\n target = newNode;\n }\n switch (typeof newNode) {\n case \"object\":\n if (Array.isArray(newNode) === true) {\n console.log('--- non-component array ??');\n if (Array.isArray(oldNode) === false) { target = newNode; }\n else {\n target = [];\n const maxLength = (newNode.length >= oldNode.length ? newNode.length : oldNode.length);\n for (let i; i < maxLength; i++) {\n const item = walkAndReconcile(newNode[i], oldNode[i]);\n if (!!item) {\n target.push(item);\n }\n }\n }\n } else {\n // regular objects:\n if (Array.isArray(oldNode) === true) { target = newNode; }\n target = {};\n const props = Object.assign({}, newNode, oldNode);\n const propKeys = Object.keys(props);\n for (let i = 0; i < propKeys.length; i++) {\n target[propKeys[i]] = walkAndReconcile(newNode[propKeys[i]], oldNode[propKeys[i]]);\n }\n }\n break;\n default:\n if (newNode !== oldNode) {\n target = newNode;\n }\n }\n } else {\n switch (newNode.__$type$__) {\n case _customTypes.VirtualElement:\n target = reconcileVirtualElements(newNode, oldNode);\n break;\n case _customTypes.ClassComponent:\n target = reconcileClassComponents(newNode, oldNode)\n break;\n case _customTypes.FunctionalComponent:\n target = reconcileFunctionalComponents(newNode, oldNode);\n break;\n default:\n throw new TypeError(\"Invalid value for property '__$type$__' on component\");\n }\n\n }\n // console.log('target:', target);\n return target;\n\n // ======================== Helper methods for Reconciler ========================\n\n function reconcileChildren(newChildren, oldChildren) {\n let result;\n if (!oldChildren) {\n result = newChildren.map(function (child) {\n return walkAndReconcile(child, undefined);\n });\n } else {\n // determine which node's 'children' array has the most children, so we can iterate through ALL of them.\n const maxLength = (newChildren.length >= oldChildren.length ? newChildren.length : oldChildren.length);\n result = [];\n for (let i = 0; i < maxLength; i++) {\n const child = walkAndReconcile(newChildren[i], oldChildren[i]);\n if (child) { // undefined children should not be pushed to the new children array.\n result.push(child);\n }\n }\n\n }\n return result;\n }\n function reconcileVirtualElements(newNode, oldNode) {\n // console.log(newNode, oldNode);\n // Input is expected to be VirtualElement instances for both arguments.\n let resultNode;\n if (\n !oldNode\n || typeof newNode !== typeof oldNode\n || typeof newNode.type !== typeof oldNode.type\n ) {\n resultNode = newNode;\n resultNode.children = reconcileChildren(newNode.children, undefined);\n }\n else {\n if (typeof newNode.type === 'string') {\n if (\n newNode.type !== oldNode.type\n || propsHaveChanged(newNode.props, oldNode.props) === true\n ) {\n resultNode = newNode;\n resultNode.children = reconcileChildren(newNode.children, oldNode.children);\n }\n else { resultNode = oldNode; }\n }\n else { // the node types look the same!\n // So let's check the props!\n if (propsHaveChanged(newNode.props, oldNode.props) === true) {\n resultNode = newNode;\n // resultNode.type = walkAndReconcile(newNode.type, oldNode.type);\n resultNode.children = reconcileChildren(newNode.children, oldNode.children);\n }\n // if props have changed, then we will use the new node, but we still need to compare children.\n else { resultNode = oldNode; }\n }\n }\n return resultNode;\n }\n function reconcileClassComponents(newNode, oldNode) {\n let resultNode;\n if (!oldNode || typeof newNode !== typeof oldNode) {\n resultNode = newNode;\n resultNode.updateComponent(resultNode.inheritedProps, resultNode.inheritedChildren);\n resultNode.componentSubTree = walkAndReconcile(newNode.componentSubTree, undefined);\n }\n else if (\n !!oldNode\n && typeof newNode === typeof oldNode\n && newNode.archetype === oldNode.archetype\n && propsHaveChanged(newNode.inheritedProps, oldNode.inheritedProps) === false\n ) { resultNode = oldNode; }\n else {\n resultNode = newNode;\n resultNode.updateComponent(resultNode.inheritedProps, resultNode.inheritedChildren);\n resultNode.componentSubTree = walkAndReconcile(newNode.componentSubTree, oldNode.componentSubTree);\n }\n return resultNode;\n }\n function reconcileFunctionalComponents(newNode, oldNode) {\n let resultNode;\n if (!oldNode || typeof newNode !== typeof oldNode) {\n resultNode = newNode;\n resultNode.updateComponent(resultNode.inheritedProps, resultNode.inheritedChildren);\n resultNode.componentSubTree = walkAndReconcile(newNode.componentSubTree, undefined)\n }\n else if (\n newNode.archetype === oldNode.archetype\n && propsHaveChanged(newNode.inheritedProps, oldNode.inheritedProps) === false\n ) {\n resultNode = oldNode;\n } else {\n resultNode = newNode;\n resultNode.updateComponent(resultNode.inheritedProps, resultNode.inheritedChildren);\n resultNode.componentSubTree = walkAndReconcile(newNode.componentSubTree, oldNode.componentSubTree);\n }\n return resultNode;\n }\n }\n return result;\n}", "title": "" }, { "docid": "bc85f0c8486b83da81f4d8d7d8bac503", "score": "0.55306417", "text": "handleNodeRendered() {}", "title": "" }, { "docid": "24cb93c7be9f7b8498a753e09431e170", "score": "0.5462577", "text": "function idiff(dom, vnode, component, updateSelf) {\n if (dom && vnode && dom.props) {\n dom.props.children = vnode.children\n }\n let out = dom,\n prevSvgMode = isSvgMode,\n prevForeignObject = isForeignObject\n\n // empty values (null, undefined, booleans) render as empty Text nodes\n if (vnode == null || typeof vnode === 'boolean') vnode = ''\n\n // Fast case: Strings & Numbers create/update Text nodes.\n if (typeof vnode === 'string' || typeof vnode === 'number') {\n // update if it's already a Text node:\n if (\n dom &&\n dom.splitText !== undefined &&\n dom.parentNode &&\n (!dom._component || component)\n ) {\n /* istanbul ignore if */ /* Browser quirk that can't be covered: https://github.com/developit/preact/commit/fd4f21f5c45dfd75151bd27b4c217d8003aa5eb9 */\n if (dom.nodeValue != vnode) {\n dom.nodeValue = vnode\n }\n } else {\n // it wasn't a Text node: replace it with one and recycle the old Element\n out = document.createTextNode(vnode)\n if (dom) {\n if (dom.parentNode) dom.parentNode.replaceChild(out, dom)\n recollectNodeTree(dom, true)\n }\n }\n\n out[ATTR_KEY] = true\n\n return out\n }\n\n // If the VNode represents a Component, perform a component diff:\n let vnodeName = vnode.nodeName\n if (typeof vnodeName === 'function') {\n for (let key in options.mapping) {\n if (options.mapping[key] === vnodeName) {\n vnodeName = key\n vnode.nodeName = key\n break\n }\n }\n }\n // Tracks entering and exiting SVG namespace when descending through the tree.\n isForeignObject = vnodeName === 'foreignObject'\n isSvgMode =\n vnodeName === 'svg'\n ? true\n : isForeignObject\n ? false\n : isSvgMode\n\n // If there's no existing element or it's the wrong type, create a new one:\n vnodeName = String(vnodeName)\n if (!dom || !isNamedNode(dom, vnodeName)) {\n // foreignObject 自身 isSvgMode 设置成 true,内部设置成 false\n out = createNode(vnodeName, isForeignObject || isSvgMode)\n\n if (dom) {\n // move children into the replacement node\n while (dom.firstChild) out.appendChild(dom.firstChild)\n\n // if the previous Element was mounted into the DOM, replace it inline\n if (dom.parentNode) dom.parentNode.replaceChild(out, dom)\n\n // recycle the old element (skips non-Element node types)\n recollectNodeTree(dom, true)\n }\n }\n\n let fc = out.firstChild,\n props = out[ATTR_KEY],\n vchildren = vnode.children\n\n if (props == null) {\n props = out[ATTR_KEY] = {}\n for (let a = out.attributes, i = a.length; i--; )\n props[a[i].name] = a[i].value\n }\n\n // Optimization: fast-path for elements containing a single TextNode:\n if (\n !hydrating &&\n vchildren &&\n vchildren.length === 1 &&\n typeof vchildren[0] === 'string' &&\n fc != null &&\n fc.splitText !== undefined &&\n fc.nextSibling == null\n ) {\n if (fc.nodeValue != vchildren[0]) {\n fc.nodeValue = vchildren[0]\n }\n }\n // otherwise, if there are existing or new children, diff them:\n else if ((vchildren && vchildren.length) || fc != null) {\n if (!(out.constructor.is == 'WeElement' && out.constructor.noSlot)) {\n innerDiffNode(\n out,\n vchildren,\n hydrating || props.unsafeHTML != null || props.dangerouslySetInnerHTML != null,\n component,\n updateSelf\n )\n }\n }\n\n // Apply attributes/props from VNode to the DOM Element:\n diffAttributes(out, vnode.attributes, props, component, updateSelf)\n if (out.props) {\n out.props.children = vnode.children\n }\n // restore previous SVG mode: (in case we're exiting an SVG namespace)\n isSvgMode = prevSvgMode\n isForeignObject = prevForeignObject\n return out\n}", "title": "" }, { "docid": "e78bcec7c096651752b33e757d80e54e", "score": "0.5458487", "text": "localRender(...args) {\r\n const el = this.el\r\n const children = el.parentElement.children\r\n for (let i = children.length; --i >= 0; ) {\r\n if (children[i] === el) {\r\n replaceChild(\r\n {},\r\n DEFAULT_IMPL,\r\n this.el.parentElement,\r\n i,\r\n normalizeTree({}, [this, ...args]),\r\n true\r\n )\r\n return\r\n }\r\n }\r\n }", "title": "" }, { "docid": "c958d03c8851cd5187ddf87d5b511dec", "score": "0.54535705", "text": "_transformChildren() {\n }", "title": "" }, { "docid": "60885704206657dcd401317ea3d138c6", "score": "0.54210997", "text": "static relinkElements(domConfig, targetElement) {\n // Hands off when retaining element (it is for some reason taken out of the normal rendering flow, for example\n // by dragging it)\n if (!domConfig.retainElement) {\n domConfig._element = targetElement;\n\n // Since there was no change detected, there is a 1 to 1 ratio between new config and last config, should be\n // safe to do a straight mapping\n domConfig.children && domConfig.children.forEach((childDomConfig, i) => {\n // Skip null entries, allowed for convenience, neat with map.\n // Also skip text nodes\n if (childDomConfig && typeof childDomConfig !== 'string') {\n this.relinkElements(childDomConfig, targetElement.lastDomConfig.children[i]._element);\n }\n });\n }\n }", "title": "" }, { "docid": "2406b74bf9ef0758ce301d5096236b9e", "score": "0.5389087", "text": "function re_render(root_node, initial_render=false) {\n\tg.graph().transition = function(selection) {\n return selection.transition().duration(1000);\n };\n\n\n\t// re-render\n\tvar render = new dagreD3.render();\n render(inner, g);\n\n \tif(initial_render) {\n\t\t//zoom_handler.translateBy(svg, (width/2) - g.graph().width + 200, (height/2) - (g.node(root_node).y)); //g.node(root_node).y\n\t\tzoom_handler.transform(svg, d3.zoomIdentity.scale(1));\n\n\t\tzoom_handler.scaleBy(svg, DEFAULT_SCALE);\n\t\tzoom_handler.translateBy(svg, (width*DEFAULT_SCALE/2) - g.node(root_node).x + 200, (height*DEFAULT_SCALE/2) - (g.node(root_node).y));\n\t} else {\n\t\tcenterGraphOnPoint(root_node);\n\t}\n\n\tzoom_handler.on('start', function() {\n\t\thide_tooltip();\n\t})\n\n\tset_node_listeners();\n}", "title": "" }, { "docid": "b4fac47c769d78397d8e587ae7079312", "score": "0.5388512", "text": "function mutate(node) {\n return node;\n}", "title": "" }, { "docid": "e47bd74e0a99c8688e89b038bd042917", "score": "0.53623337", "text": "static rerenderComponent(domNode) {\n const nextProps = createProps(domNode);\n\n domNode.props = nextProps;\n diffhtml.innerHTML(domNode.shadowRoot, domNode.render());\n domNode.componentDidUpdate();\n }", "title": "" }, { "docid": "777a6c2fd2dde92f013bccd74e8d1e68", "score": "0.5351821", "text": "function wipeSlate(objectTarget) {\n var rootDiv = document.getElementById(\"contents\");\n while (rootDiv.firstChild) {\n rootDiv.removeChild(rootDiv.firstChild);\n }\n const newPage = React.createElement(objectTarget);\n ReactDOM.render(newPage, document.getElementById(\"contents\"));\n}", "title": "" }, { "docid": "713275bcc2469d79e76cda85e369bf5b", "score": "0.5287203", "text": "function _transform (node, callback) {\n\t return node.map(function(child, path, parent) {\n\t var replacement = callback(child, path, parent);\n\t return _transform(replacement, callback);\n\t });\n\t }", "title": "" }, { "docid": "7330735d397e4eac9b38bac10ee830bc", "score": "0.52862424", "text": "_reparentNode(node, target) {\n const element = {};\n element[node.key] = this._getTreeElement(node.key);\n const elementCopy = { ...element };\n this._removeNode(node);\n const targetElement = this._getTreeElement(target.key);\n if (Object.keys(element).length === 0) {\n targetElement[node.key] = {};\n }\n else {\n Object.assign(targetElement, elementCopy);\n }\n }", "title": "" }, { "docid": "ba93f4ccc1e1d65af5290dfa30322b71", "score": "0.5280806", "text": "function runTransform()\n{\n // Run the transform, creating a fragment output subtree that can\n // be inserted back into the main page document object (given in\n // the second argument) If you want to create a full output\n // document rather than a subtree for insertion into another\n // document, use the transformToDocument method rather than\n // transformToFragment.\n processor.setParameter(null, \"filename\", document.baseURI);\n var doc = processor.transformToDocument(source, document);\n\n var root = document.documentElement;\n if (true) {\n\tvar childNodes = root.childNodes;\n\t// dbg.pr(\"removing count: \" + childNodes.length);\n\twhile (childNodes.length > 0) {\n\t // dbg.pr(\"removing: \" + childNodes[0].nodeName);\n\t root.removeChild(childNodes[0]);\n\t}\n }\n\n var frag = doc.documentElement;\n childNodes = frag.childNodes;\n var count = childNodes.length;\n for (var i = 0; i < count; i++) {\n\t// dbg.pr(\"appending: \" + childNodes[0].nodeName);\n\troot.appendChild(childNodes[0]);\n }\n\n dbg.close();\n dbg.pr(\"beginning debug output\");\n\n var files = getLoadFiles(document)\n\n for (var i = 0; i < files.length; i++) {\n\tvar fn = files[i].getAttribute(\"filename\");\n\tvar id = files[i].getAttribute(\"target\");\n\n\tdbg.pr(\"load-file: \" + fn + \" -> \" + id);\n\tvar obj = new loadFile.loadFile(fn, id);\n }\n\n var title = document.getElementById(\"title\");\n if (title && title.childNodes) {\n\tdocument.title = \"JUNOScriptorium: \" + title.childNodes[0].nodeValue;\n }\n}", "title": "" }, { "docid": "870698828a41cf24553cf2953b7fbf18", "score": "0.52748305", "text": "function er(t,e){function n(t){c||(c=!0,ql(t))}function i(t){\n// check pre state\nt.pre&&(l=!1),Zl(t.tag)&&(u=!1);\n// apply post-transforms\nfor(var n=0;n<Kl.length;n++)Kl[n](t,e)}ql=e.warn||Nn,Zl=e.isPreTag||Mo,Gl=e.mustUseProp||Mo,tu=e.getTagNamespace||Mo,Ql=Pn(e.modules,\"transformNode\"),Jl=Pn(e.modules,\"preTransformNode\"),Kl=Pn(e.modules,\"postTransformNode\"),Xl=e.delimiters;var r,o,a=[],s=!1!==e.preserveWhitespace,l=!1,u=!1,c=!1;return Gi(t,{warn:ql,expectHTML:e.expectHTML,isUnaryTag:e.isUnaryTag,canBeLeftOpenTag:e.canBeLeftOpenTag,shouldDecodeNewlines:e.shouldDecodeNewlines,shouldDecodeNewlinesForHref:e.shouldDecodeNewlinesForHref,shouldKeepComment:e.comments,start:function(t,s,c){function d(t){\"slot\"!==t.tag&&\"template\"!==t.tag||n(\"Cannot use <\"+t.tag+\"> as component root element because it may contain multiple nodes.\"),t.attrsMap.hasOwnProperty(\"v-for\")&&n(\"Cannot use v-for on stateful component root element because it renders multiple elements.\")}\n// check namespace.\n// inherit parent ns if there is one\nvar f=o&&o.ns||tu(t);\n// handle IE svg bug\n/* istanbul ignore if */\nzo&&\"svg\"===f&&(s=wr(s));var p=tr(t,s,o);f&&(p.ns=f),xr(p)&&!Go()&&(p.forbidden=!0,ql(\"Templates should only be responsible for mapping the state to the UI. Avoid placing tags with side-effects in your templates, such as <\"+t+\">, as they will not be parsed.\"));\n// apply pre-transforms\nfor(var h=0;h<Jl.length;h++)p=Jl[h](p,e)||p;if(l||(nr(p),p.pre&&(l=!0)),Zl(p.tag)&&(u=!0),l?ir(p):p.processed||(\n// structural directives\nsr(p),ur(p),pr(p),\n// element-scope stuff\nrr(p,e)),\n// tree management\nr?a.length||(\n// allow root elements with v-if, v-else-if and v-else\nr.if&&(p.elseif||p.else)?(d(p),fr(r,{exp:p.elseif,block:p})):n(\"Component template should contain exactly one root element. If you are using v-if on multiple elements, use v-else-if to chain them instead.\")):(r=p,d(r)),o&&!p.forbidden)if(p.elseif||p.else)cr(p,o);else if(p.slotScope){// scoped slot\no.plain=!1;var v=p.slotTarget||'\"default\"';(o.scopedSlots||(o.scopedSlots={}))[v]=p}else o.children.push(p),p.parent=o;c?i(p):(o=p,a.push(p))},end:function(){\n// remove trailing whitespace\nvar t=a[a.length-1],e=t.children[t.children.length-1];e&&3===e.type&&\" \"===e.text&&!u&&t.children.pop(),\n// pop stack\na.length-=1,o=a[a.length-1],i(t)},chars:function(e){if(!o)return void(e===t?n(\"Component template requires a root element, rather than just text.\"):(e=e.trim())&&n('text \"'+e+'\" outside root element will be ignored.'));\n// IE textarea placeholder bug\n/* istanbul ignore if */\nif(!zo||\"textarea\"!==o.tag||o.attrsMap.placeholder!==e){var i=o.children;if(e=u||e.trim()?_r(o)?e:bu(e):s&&i.length?\" \":\"\"){var r;!l&&\" \"!==e&&(r=qi(e,Xl))?i.push({type:2,expression:r.expression,tokens:r.tokens,text:e}):\" \"===e&&i.length&&\" \"===i[i.length-1].text||i.push({type:3,text:e})}}},comment:function(t){o.children.push({type:3,text:t,isComment:!0})}}),r}", "title": "" }, { "docid": "79185f60509d5b6375d5dc051a6e6c81", "score": "0.52640855", "text": "render(renderTarget) {\n if (!renderTarget) {\n throw Exception('InvalidArgumentException: Render target not specified for Component.render()');\n }\n\n if (renderTarget instanceof Element) {\n renderTarget.appendChild(this.__root.dom());\n } else {\n renderTarget.dom().appendChild(this.__root.dom());\n }\n }", "title": "" }, { "docid": "a23b2beae8366d2c480142f098784826", "score": "0.5262201", "text": "function attachRenderNodeElementToDOM(renderNode) {\n var originalElement = arguments.length <= 1 || arguments[1] === undefined ? null : arguments[1];\n\n var element = renderNode.element;\n var hasRendered = !!originalElement;\n\n if (hasRendered) {\n var parentElement = renderNode.parent.element;\n parentElement.replaceChild(element, originalElement);\n } else {\n var parentElement = undefined,\n nextSiblingElement = undefined;\n if (renderNode.prev) {\n var previousElement = renderNode.prev.element;\n parentElement = previousElement.parentNode;\n nextSiblingElement = previousElement.nextSibling;\n } else {\n parentElement = renderNode.parent.element;\n nextSiblingElement = parentElement.firstChild;\n }\n parentElement.insertBefore(element, nextSiblingElement);\n }\n }", "title": "" }, { "docid": "44df36e7ad1e42fc72a2056535858e78", "score": "0.52504134", "text": "function idiff(dom, vnode, context, mountAll, componentRoot) {\n var out = dom,\n prevSvgMode = isSvgMode;\n\n // empty values (null, undefined, booleans) render as empty Text nodes\n if (vnode == null || typeof vnode === 'boolean') vnode = '';\n\n // Fast case: Strings & Numbers create/update Text nodes.\n if (typeof vnode === 'string' || typeof vnode === 'number') {\n\n // update if it's already a Text node:\n if (dom && dom.splitText !== undefined && dom.parentNode && (!dom._component || componentRoot)) {\n /* istanbul ignore if */\n /* Browser quirk that can't be covered: https://github.com/developit/preact/commit/fd4f21f5c45dfd75151bd27b4c217d8003aa5eb9 */\n if (dom.nodeValue != vnode) {\n dom.nodeValue = vnode;\n }\n } else {\n // it wasn't a Text node: replace it with one and recycle the old Element\n out = document.createTextNode(vnode);\n if (dom) {\n if (dom.parentNode) dom.parentNode.replaceChild(out, dom);\n recollectNodeTree(dom, true);\n }\n }\n\n out['__preactattr_'] = true;\n\n return out;\n }\n\n // If the VNode represents a Component, perform a component diff:\n var vnodeName = vnode.nodeName;\n if (typeof vnodeName === 'function') {\n return buildComponentFromVNode(dom, vnode, context, mountAll);\n }\n\n // Tracks entering and exiting SVG namespace when descending through the tree.\n isSvgMode = vnodeName === 'svg' ? true : vnodeName === 'foreignObject' ? false : isSvgMode;\n\n // If there's no existing element or it's the wrong type, create a new one:\n vnodeName = String(vnodeName);\n if (!dom || !isNamedNode(dom, vnodeName)) {\n out = createNode(vnodeName, isSvgMode);\n\n if (dom) {\n // move children into the replacement node\n while (dom.firstChild) {\n out.appendChild(dom.firstChild);\n } // if the previous Element was mounted into the DOM, replace it inline\n if (dom.parentNode) dom.parentNode.replaceChild(out, dom);\n\n // recycle the old element (skips non-Element node types)\n recollectNodeTree(dom, true);\n }\n }\n\n var fc = out.firstChild,\n props = out['__preactattr_'],\n vchildren = vnode.children;\n\n if (props == null) {\n props = out['__preactattr_'] = {};\n for (var a = out.attributes, i = a.length; i--;) {\n props[a[i].name] = a[i].value;\n }\n }\n\n // Optimization: fast-path for elements containing a single TextNode:\n if (!hydrating && vchildren && vchildren.length === 1 && typeof vchildren[0] === 'string' && fc != null && fc.splitText !== undefined && fc.nextSibling == null) {\n if (fc.nodeValue != vchildren[0]) {\n fc.nodeValue = vchildren[0];\n }\n }\n // otherwise, if there are existing or new children, diff them:\n else if (vchildren && vchildren.length || fc != null) {\n innerDiffNode(out, vchildren, context, mountAll, hydrating || props.dangerouslySetInnerHTML != null);\n }\n\n // Apply attributes/props from VNode to the DOM Element:\n diffAttributes(out, vnode.attributes, props);\n\n // restore previous SVG mode: (in case we're exiting an SVG namespace)\n isSvgMode = prevSvgMode;\n\n return out;\n }", "title": "" }, { "docid": "72771de2cb320b3ed23465dd36acfec7", "score": "0.52250856", "text": "function nodeToLine(node, outArray){\n var flattened = null;\n\n // handle different node types\n if (node.nodeType === 1)\n {\n // Structural nodes are recreated here. The recreated node structure is not identical to the source HTML, as\n // JSDOM doesn't parse 100% accurately, however, JSOM is always consistent in how it parses. Identical markup\n // always parses the same, and we are interested in differences only.\n\n flattened = '<' + node.tagName.toLowerCase();\n\n // transfer node attribute values - if options.attributes are set, only attributes which match that list\n if (node.attributes)\n for (var j = 0 ; j < node.attributes.length ; j ++){\n var attribute = node.attributes[j],\n attributeAllowed = false;\n\n if (options.attributes.length)\n for (var k = 0 ; k < options.attributes.length ; k ++){\n var reg = new RegExp(options.attributes[k]);\n if (attribute.name.match(reg)){\n attributeAllowed = true;\n break;\n }\n }\n else\n attributeAllowed = true;\n\n if (attributeAllowed)\n flattened += ' ' + attribute.name+'=\"' + attribute.value + '\"' ;\n }\n\n flattened += '>';\n }\n else if (node.nodeType === 3 && options.processInnerText){\n // replace inner text content with a standard element - we want to test for presence, not content, of\n // innertext\n var nodeValue = node.nodeValue.trim();\n nodeValue = nodeValue.replace(/\\n/, '');\n if (nodeValue.length > 0)\n flattened = '<innertext/>';\n }\n else if (node.nodeType === 8){\n // recreate comments\n flattened = '<!--' + node.nodeValue + '-->';\n }\n\n if (flattened)\n outArray.push(flattened);\n\n // recurse for children\n for (var i = 0 ; i < node.childNodes.length ; i ++)\n nodeToLine(node.childNodes[i], outArray);\n\n // close node off if structural\n if (node.nodeType === 1)\n outArray.push('</' + node.tagName.toLowerCase() + '>');\n }", "title": "" }, { "docid": "d9e1d4e453f189dc96ffd0c47131190d", "score": "0.5218273", "text": "function reconcile(targetId, html) {\n (0,_directives__WEBPACK_IMPORTED_MODULE_0__.changingDirectives)(() => {\n const target = document.getElementById(_constants__WEBPACK_IMPORTED_MODULE_1__.componentIdPrefix + targetId);\n if (!target) {\n return;\n }\n const parent = target.parentElement;\n const htmlDom = document.createElement(parent.tagName);\n htmlDom.innerHTML = html;\n const included = [];\n let current = target.nextSibling;\n while (current != null) {\n const currentDirective = (0,_directives__WEBPACK_IMPORTED_MODULE_0__.asShadeDirective)(current);\n if (currentDirective instanceof _directives__WEBPACK_IMPORTED_MODULE_0__.ComponentEnd && currentDirective.id == \"\" + targetId) {\n break;\n }\n included.push(current);\n current = current.nextSibling;\n }\n patchChildren(parent, target, included, htmlDom.childNodes);\n });\n}", "title": "" }, { "docid": "0e8a5084616f59b35994d6497b4ad154", "score": "0.5207791", "text": "function escalate(target) {\n let parent = target._parent;\n if (parent)\n for (let i in parent._refs)\n if (target.isSameNode(parent._refs[i]._raw)) {\n // Parent has a Ref pointing to this element\n for (let j in target._props)\n if (target._props.hasOwnProperty(j))\n parent._refs[i][j] = target._props[j];\n if (target.isSameNode(parent)) escalate(parent);\n break;\n }\n }", "title": "" }, { "docid": "cd14323724ec344de7f82bef9bb0cd9a", "score": "0.5193564", "text": "function nanomorph (oldTree, newTree) {\n // if (DEBUG) {\n // console.log(\n // 'nanomorph\\nold\\n %s\\nnew\\n %s',\n // oldTree && oldTree.outerHTML,\n // newTree && newTree.outerHTML\n // )\n // }\n assert.equal(typeof oldTree, 'object', 'nanomorph: oldTree should be an object')\n assert.equal(typeof newTree, 'object', 'nanomorph: newTree should be an object')\n var tree = walk(newTree, oldTree)\n // if (DEBUG) console.log('=> morphed\\n %s', tree.outerHTML)\n return tree\n}", "title": "" }, { "docid": "380bf6ac1738cc9a4dc72230048bfb29", "score": "0.5189475", "text": "function idiff(dom, vnode, context, mountAll, componentRoot) {\n\tvar out = dom,\n\t prevSvgMode = isSvgMode;\n\n\t// empty values (null, undefined, booleans) render as empty Text nodes\n\tif (vnode == null || typeof vnode === 'boolean') vnode = '';\n\n\t// Fast case: Strings & Numbers create/update Text nodes.\n\tif (typeof vnode === 'string' || typeof vnode === 'number') {\n\n\t\t// update if it's already a Text node:\n\t\tif (dom && dom.splitText !== undefined && dom.parentNode && (!dom._component || componentRoot)) {\n\t\t\t/* istanbul ignore if */ /* Browser quirk that can't be covered: https://github.com/developit/preact/commit/fd4f21f5c45dfd75151bd27b4c217d8003aa5eb9 */\n\t\t\tif (dom.nodeValue != vnode) {\n\t\t\t\tdom.nodeValue = vnode;\n\t\t\t}\n\t\t} else {\n\t\t\t// it wasn't a Text node: replace it with one and recycle the old Element\n\t\t\tout = document.createTextNode(vnode);\n\t\t\tif (dom) {\n\t\t\t\tif (dom.parentNode) dom.parentNode.replaceChild(out, dom);\n\t\t\t\trecollectNodeTree(dom, true);\n\t\t\t}\n\t\t}\n\n\t\tout['__preactattr_'] = true;\n\n\t\treturn out;\n\t}\n\n\t// If the VNode represents a Component, perform a component diff:\n\tvar vnodeName = vnode.nodeName;\n\tif (typeof vnodeName === 'function') {\n\t\treturn buildComponentFromVNode(dom, vnode, context, mountAll);\n\t}\n\n\t// Tracks entering and exiting SVG namespace when descending through the tree.\n\tisSvgMode = vnodeName === 'svg' ? true : vnodeName === 'foreignObject' ? false : isSvgMode;\n\n\t// If there's no existing element or it's the wrong type, create a new one:\n\tvnodeName = String(vnodeName);\n\tif (!dom || !isNamedNode(dom, vnodeName)) {\n\t\tout = createNode(vnodeName, isSvgMode);\n\n\t\tif (dom) {\n\t\t\t// move children into the replacement node\n\t\t\twhile (dom.firstChild) {\n\t\t\t\tout.appendChild(dom.firstChild);\n\t\t\t} // if the previous Element was mounted into the DOM, replace it inline\n\t\t\tif (dom.parentNode) dom.parentNode.replaceChild(out, dom);\n\n\t\t\t// recycle the old element (skips non-Element node types)\n\t\t\trecollectNodeTree(dom, true);\n\t\t}\n\t}\n\n\tvar fc = out.firstChild,\n\t props = out['__preactattr_'],\n\t vchildren = vnode.children;\n\n\tif (props == null) {\n\t\tprops = out['__preactattr_'] = {};\n\t\tfor (var a = out.attributes, i = a.length; i--;) {\n\t\t\tprops[a[i].name] = a[i].value;\n\t\t}\n\t}\n\n\t// Optimization: fast-path for elements containing a single TextNode:\n\tif (!hydrating && vchildren && vchildren.length === 1 && typeof vchildren[0] === 'string' && fc != null && fc.splitText !== undefined && fc.nextSibling == null) {\n\t\tif (fc.nodeValue != vchildren[0]) {\n\t\t\tfc.nodeValue = vchildren[0];\n\t\t}\n\t}\n\t// otherwise, if there are existing or new children, diff them:\n\telse if (vchildren && vchildren.length || fc != null) {\n\t\t\tinnerDiffNode(out, vchildren, context, mountAll, hydrating || props.dangerouslySetInnerHTML != null);\n\t\t}\n\n\t// Apply attributes/props from VNode to the DOM Element:\n\tdiffAttributes(out, vnode.attributes, props);\n\n\t// restore previous SVG mode: (in case we're exiting an SVG namespace)\n\tisSvgMode = prevSvgMode;\n\n\treturn out;\n}", "title": "" }, { "docid": "380bf6ac1738cc9a4dc72230048bfb29", "score": "0.5189475", "text": "function idiff(dom, vnode, context, mountAll, componentRoot) {\n\tvar out = dom,\n\t prevSvgMode = isSvgMode;\n\n\t// empty values (null, undefined, booleans) render as empty Text nodes\n\tif (vnode == null || typeof vnode === 'boolean') vnode = '';\n\n\t// Fast case: Strings & Numbers create/update Text nodes.\n\tif (typeof vnode === 'string' || typeof vnode === 'number') {\n\n\t\t// update if it's already a Text node:\n\t\tif (dom && dom.splitText !== undefined && dom.parentNode && (!dom._component || componentRoot)) {\n\t\t\t/* istanbul ignore if */ /* Browser quirk that can't be covered: https://github.com/developit/preact/commit/fd4f21f5c45dfd75151bd27b4c217d8003aa5eb9 */\n\t\t\tif (dom.nodeValue != vnode) {\n\t\t\t\tdom.nodeValue = vnode;\n\t\t\t}\n\t\t} else {\n\t\t\t// it wasn't a Text node: replace it with one and recycle the old Element\n\t\t\tout = document.createTextNode(vnode);\n\t\t\tif (dom) {\n\t\t\t\tif (dom.parentNode) dom.parentNode.replaceChild(out, dom);\n\t\t\t\trecollectNodeTree(dom, true);\n\t\t\t}\n\t\t}\n\n\t\tout['__preactattr_'] = true;\n\n\t\treturn out;\n\t}\n\n\t// If the VNode represents a Component, perform a component diff:\n\tvar vnodeName = vnode.nodeName;\n\tif (typeof vnodeName === 'function') {\n\t\treturn buildComponentFromVNode(dom, vnode, context, mountAll);\n\t}\n\n\t// Tracks entering and exiting SVG namespace when descending through the tree.\n\tisSvgMode = vnodeName === 'svg' ? true : vnodeName === 'foreignObject' ? false : isSvgMode;\n\n\t// If there's no existing element or it's the wrong type, create a new one:\n\tvnodeName = String(vnodeName);\n\tif (!dom || !isNamedNode(dom, vnodeName)) {\n\t\tout = createNode(vnodeName, isSvgMode);\n\n\t\tif (dom) {\n\t\t\t// move children into the replacement node\n\t\t\twhile (dom.firstChild) {\n\t\t\t\tout.appendChild(dom.firstChild);\n\t\t\t} // if the previous Element was mounted into the DOM, replace it inline\n\t\t\tif (dom.parentNode) dom.parentNode.replaceChild(out, dom);\n\n\t\t\t// recycle the old element (skips non-Element node types)\n\t\t\trecollectNodeTree(dom, true);\n\t\t}\n\t}\n\n\tvar fc = out.firstChild,\n\t props = out['__preactattr_'],\n\t vchildren = vnode.children;\n\n\tif (props == null) {\n\t\tprops = out['__preactattr_'] = {};\n\t\tfor (var a = out.attributes, i = a.length; i--;) {\n\t\t\tprops[a[i].name] = a[i].value;\n\t\t}\n\t}\n\n\t// Optimization: fast-path for elements containing a single TextNode:\n\tif (!hydrating && vchildren && vchildren.length === 1 && typeof vchildren[0] === 'string' && fc != null && fc.splitText !== undefined && fc.nextSibling == null) {\n\t\tif (fc.nodeValue != vchildren[0]) {\n\t\t\tfc.nodeValue = vchildren[0];\n\t\t}\n\t}\n\t// otherwise, if there are existing or new children, diff them:\n\telse if (vchildren && vchildren.length || fc != null) {\n\t\t\tinnerDiffNode(out, vchildren, context, mountAll, hydrating || props.dangerouslySetInnerHTML != null);\n\t\t}\n\n\t// Apply attributes/props from VNode to the DOM Element:\n\tdiffAttributes(out, vnode.attributes, props);\n\n\t// restore previous SVG mode: (in case we're exiting an SVG namespace)\n\tisSvgMode = prevSvgMode;\n\n\treturn out;\n}", "title": "" }, { "docid": "380bf6ac1738cc9a4dc72230048bfb29", "score": "0.5189475", "text": "function idiff(dom, vnode, context, mountAll, componentRoot) {\n\tvar out = dom,\n\t prevSvgMode = isSvgMode;\n\n\t// empty values (null, undefined, booleans) render as empty Text nodes\n\tif (vnode == null || typeof vnode === 'boolean') vnode = '';\n\n\t// Fast case: Strings & Numbers create/update Text nodes.\n\tif (typeof vnode === 'string' || typeof vnode === 'number') {\n\n\t\t// update if it's already a Text node:\n\t\tif (dom && dom.splitText !== undefined && dom.parentNode && (!dom._component || componentRoot)) {\n\t\t\t/* istanbul ignore if */ /* Browser quirk that can't be covered: https://github.com/developit/preact/commit/fd4f21f5c45dfd75151bd27b4c217d8003aa5eb9 */\n\t\t\tif (dom.nodeValue != vnode) {\n\t\t\t\tdom.nodeValue = vnode;\n\t\t\t}\n\t\t} else {\n\t\t\t// it wasn't a Text node: replace it with one and recycle the old Element\n\t\t\tout = document.createTextNode(vnode);\n\t\t\tif (dom) {\n\t\t\t\tif (dom.parentNode) dom.parentNode.replaceChild(out, dom);\n\t\t\t\trecollectNodeTree(dom, true);\n\t\t\t}\n\t\t}\n\n\t\tout['__preactattr_'] = true;\n\n\t\treturn out;\n\t}\n\n\t// If the VNode represents a Component, perform a component diff:\n\tvar vnodeName = vnode.nodeName;\n\tif (typeof vnodeName === 'function') {\n\t\treturn buildComponentFromVNode(dom, vnode, context, mountAll);\n\t}\n\n\t// Tracks entering and exiting SVG namespace when descending through the tree.\n\tisSvgMode = vnodeName === 'svg' ? true : vnodeName === 'foreignObject' ? false : isSvgMode;\n\n\t// If there's no existing element or it's the wrong type, create a new one:\n\tvnodeName = String(vnodeName);\n\tif (!dom || !isNamedNode(dom, vnodeName)) {\n\t\tout = createNode(vnodeName, isSvgMode);\n\n\t\tif (dom) {\n\t\t\t// move children into the replacement node\n\t\t\twhile (dom.firstChild) {\n\t\t\t\tout.appendChild(dom.firstChild);\n\t\t\t} // if the previous Element was mounted into the DOM, replace it inline\n\t\t\tif (dom.parentNode) dom.parentNode.replaceChild(out, dom);\n\n\t\t\t// recycle the old element (skips non-Element node types)\n\t\t\trecollectNodeTree(dom, true);\n\t\t}\n\t}\n\n\tvar fc = out.firstChild,\n\t props = out['__preactattr_'],\n\t vchildren = vnode.children;\n\n\tif (props == null) {\n\t\tprops = out['__preactattr_'] = {};\n\t\tfor (var a = out.attributes, i = a.length; i--;) {\n\t\t\tprops[a[i].name] = a[i].value;\n\t\t}\n\t}\n\n\t// Optimization: fast-path for elements containing a single TextNode:\n\tif (!hydrating && vchildren && vchildren.length === 1 && typeof vchildren[0] === 'string' && fc != null && fc.splitText !== undefined && fc.nextSibling == null) {\n\t\tif (fc.nodeValue != vchildren[0]) {\n\t\t\tfc.nodeValue = vchildren[0];\n\t\t}\n\t}\n\t// otherwise, if there are existing or new children, diff them:\n\telse if (vchildren && vchildren.length || fc != null) {\n\t\t\tinnerDiffNode(out, vchildren, context, mountAll, hydrating || props.dangerouslySetInnerHTML != null);\n\t\t}\n\n\t// Apply attributes/props from VNode to the DOM Element:\n\tdiffAttributes(out, vnode.attributes, props);\n\n\t// restore previous SVG mode: (in case we're exiting an SVG namespace)\n\tisSvgMode = prevSvgMode;\n\n\treturn out;\n}", "title": "" }, { "docid": "380bf6ac1738cc9a4dc72230048bfb29", "score": "0.5189475", "text": "function idiff(dom, vnode, context, mountAll, componentRoot) {\n\tvar out = dom,\n\t prevSvgMode = isSvgMode;\n\n\t// empty values (null, undefined, booleans) render as empty Text nodes\n\tif (vnode == null || typeof vnode === 'boolean') vnode = '';\n\n\t// Fast case: Strings & Numbers create/update Text nodes.\n\tif (typeof vnode === 'string' || typeof vnode === 'number') {\n\n\t\t// update if it's already a Text node:\n\t\tif (dom && dom.splitText !== undefined && dom.parentNode && (!dom._component || componentRoot)) {\n\t\t\t/* istanbul ignore if */ /* Browser quirk that can't be covered: https://github.com/developit/preact/commit/fd4f21f5c45dfd75151bd27b4c217d8003aa5eb9 */\n\t\t\tif (dom.nodeValue != vnode) {\n\t\t\t\tdom.nodeValue = vnode;\n\t\t\t}\n\t\t} else {\n\t\t\t// it wasn't a Text node: replace it with one and recycle the old Element\n\t\t\tout = document.createTextNode(vnode);\n\t\t\tif (dom) {\n\t\t\t\tif (dom.parentNode) dom.parentNode.replaceChild(out, dom);\n\t\t\t\trecollectNodeTree(dom, true);\n\t\t\t}\n\t\t}\n\n\t\tout['__preactattr_'] = true;\n\n\t\treturn out;\n\t}\n\n\t// If the VNode represents a Component, perform a component diff:\n\tvar vnodeName = vnode.nodeName;\n\tif (typeof vnodeName === 'function') {\n\t\treturn buildComponentFromVNode(dom, vnode, context, mountAll);\n\t}\n\n\t// Tracks entering and exiting SVG namespace when descending through the tree.\n\tisSvgMode = vnodeName === 'svg' ? true : vnodeName === 'foreignObject' ? false : isSvgMode;\n\n\t// If there's no existing element or it's the wrong type, create a new one:\n\tvnodeName = String(vnodeName);\n\tif (!dom || !isNamedNode(dom, vnodeName)) {\n\t\tout = createNode(vnodeName, isSvgMode);\n\n\t\tif (dom) {\n\t\t\t// move children into the replacement node\n\t\t\twhile (dom.firstChild) {\n\t\t\t\tout.appendChild(dom.firstChild);\n\t\t\t} // if the previous Element was mounted into the DOM, replace it inline\n\t\t\tif (dom.parentNode) dom.parentNode.replaceChild(out, dom);\n\n\t\t\t// recycle the old element (skips non-Element node types)\n\t\t\trecollectNodeTree(dom, true);\n\t\t}\n\t}\n\n\tvar fc = out.firstChild,\n\t props = out['__preactattr_'],\n\t vchildren = vnode.children;\n\n\tif (props == null) {\n\t\tprops = out['__preactattr_'] = {};\n\t\tfor (var a = out.attributes, i = a.length; i--;) {\n\t\t\tprops[a[i].name] = a[i].value;\n\t\t}\n\t}\n\n\t// Optimization: fast-path for elements containing a single TextNode:\n\tif (!hydrating && vchildren && vchildren.length === 1 && typeof vchildren[0] === 'string' && fc != null && fc.splitText !== undefined && fc.nextSibling == null) {\n\t\tif (fc.nodeValue != vchildren[0]) {\n\t\t\tfc.nodeValue = vchildren[0];\n\t\t}\n\t}\n\t// otherwise, if there are existing or new children, diff them:\n\telse if (vchildren && vchildren.length || fc != null) {\n\t\t\tinnerDiffNode(out, vchildren, context, mountAll, hydrating || props.dangerouslySetInnerHTML != null);\n\t\t}\n\n\t// Apply attributes/props from VNode to the DOM Element:\n\tdiffAttributes(out, vnode.attributes, props);\n\n\t// restore previous SVG mode: (in case we're exiting an SVG namespace)\n\tisSvgMode = prevSvgMode;\n\n\treturn out;\n}", "title": "" }, { "docid": "55fec588e21daa390cc93d88733223aa", "score": "0.516749", "text": "function _transform (node, callback) {\n return node.map(function(child, path, parent) {\n var replacement = callback(child, path, parent);\n return _transform(replacement, callback);\n });\n }", "title": "" }, { "docid": "55fec588e21daa390cc93d88733223aa", "score": "0.516749", "text": "function _transform (node, callback) {\n return node.map(function(child, path, parent) {\n var replacement = callback(child, path, parent);\n return _transform(replacement, callback);\n });\n }", "title": "" }, { "docid": "55fec588e21daa390cc93d88733223aa", "score": "0.516749", "text": "function _transform (node, callback) {\n return node.map(function(child, path, parent) {\n var replacement = callback(child, path, parent);\n return _transform(replacement, callback);\n });\n }", "title": "" }, { "docid": "55fec588e21daa390cc93d88733223aa", "score": "0.516749", "text": "function _transform (node, callback) {\n return node.map(function(child, path, parent) {\n var replacement = callback(child, path, parent);\n return _transform(replacement, callback);\n });\n }", "title": "" }, { "docid": "55fec588e21daa390cc93d88733223aa", "score": "0.516749", "text": "function _transform (node, callback) {\n return node.map(function(child, path, parent) {\n var replacement = callback(child, path, parent);\n return _transform(replacement, callback);\n });\n }", "title": "" }, { "docid": "55fec588e21daa390cc93d88733223aa", "score": "0.516749", "text": "function _transform (node, callback) {\n return node.map(function(child, path, parent) {\n var replacement = callback(child, path, parent);\n return _transform(replacement, callback);\n });\n }", "title": "" }, { "docid": "55fec588e21daa390cc93d88733223aa", "score": "0.516749", "text": "function _transform (node, callback) {\n return node.map(function(child, path, parent) {\n var replacement = callback(child, path, parent);\n return _transform(replacement, callback);\n });\n }", "title": "" }, { "docid": "2b680cd37e74ec028252fac7ef826ba7", "score": "0.51577705", "text": "function patch(oldNode, newNode) {\n // different tags\n if (oldNode.tag !== newNode.tag) {\n mount(newNode, oldNode.$el.parentNode);\n unmount(oldNode);\n } else {\n newNode.$el = oldNode.$el;\n\n if (typeof newNode.children === 'string') {\n newNode.$el.textContent = newNode.children;\n } else {\n while (newNode.$el.attributes.length > 0) {\n newNode.$el.removeAttribute(newNode.$el.attributes[0].name);\n }\n\n for (const key in newNode.props) {\n newNode.$el.setAttribute(key, newNode.props[key]);\n }\n\n if (typeof oldNode.children === 'string') {\n newNode.$el.textContent = null;\n newNode.children.forEach((child) => {\n mount(child, newNode.$el);\n });\n } else {\n const commonLength = Math.min(\n oldNode.children.length,\n newNode.children.length\n );\n\n for (let i = 0; i < commonLength; i++) {\n patch(oldNode.children[i], newNode.children[i]);\n }\n\n if (oldNode.children.length > newNode.children.length) {\n oldNode.children\n .slice(newNode.children.length)\n .forEach((child) => unmount(child));\n } else if (newNode.children.length > oldNode.children.length) {\n newNode.children\n .slice(oldNode.children.length)\n .forEach((child) => mount(child));\n }\n }\n }\n }\n}", "title": "" }, { "docid": "d83e6370ce38ed0eaeefa3ac01502913", "score": "0.5156062", "text": "function outputReplace (target, content) { //Replaces existing target content with new content\n document.getElementById(target).innerHTML = content;\n}", "title": "" }, { "docid": "309aeab328f34f57543fe7940f886089", "score": "0.5154113", "text": "update() {\n morphdom(this.rootElement, this.render());\n }", "title": "" }, { "docid": "7a938f19e961e85a3c576091d511a6cc", "score": "0.5147124", "text": "function transformValue(target,value) {\n\t\t$(target).html(value);\n\t}", "title": "" }, { "docid": "ee5454252a6530b083598d503498ee0d", "score": "0.5134777", "text": "transformChildNodesIntoView(): void {\n let parent = this.anchor;\n\n this.children.push({\n fragment: parent,\n firstChild: parent.firstChild,\n lastChild: parent.lastChild,\n returnToCache() {},\n removeNodes() {\n let last;\n\n while (last = parent.lastChild) {\n parent.removeChild(last);\n }\n },\n created() {},\n bind() {},\n unbind() {},\n attached() {},\n detached() {}\n });\n }", "title": "" }, { "docid": "45e23f40fc93fe3e55512e4f2cf77edd", "score": "0.5086937", "text": "function traverseDOM() {\n output.innerHTML = '';\n let div = document.getElementById('1');\n log('Traversing the DOM:');\n log('');\n log('tested div: ' + div.outerHTML);\n log('');\n log('div.parentNode = ' + div.parentNode);\n log('div.childNodes = ' + div.childNodes);\n log('div.childNodes[0].nodeValue = ' + div.childNodes[0].nodeValue);\n log('div.firstChild.nodeValue = ' + div.firstChild.nodeValue);\n log('div.lastChild.outerHTML = ' + div.lastChild.outerHTML);\n log('div.firstChild.nextSibling.outerHTML = ' + div.firstChild.nextSibling.outerHTML);\n log('div.lastChild.previousSibling.nodeValue = ' + div.lastChild.previousSibling.nodeValue);\n log('');\n log('ParentNode mixin and ElementChild methods:');\n log('div.children = ' + div.children);\n log('div.children[0] = ' + div.children[0].outerHTML);\n log('div.firstElementChild.outerHTML = ' + div.firstElementChild.outerHTML);\n log('div.firstElementChild.nextElementSibling.outerHTML = ' + div.firstElementChild.nextElementSibling.outerHTML);\n log('div.lastElementChild.outerHTML = ' + div.lastElementChild.outerHTML);\n log('div.lastElementChild.previousElementSibling.outerHTML = ' + div.lastElementChild.previousElementSibling.outerHTML);\n}", "title": "" }, { "docid": "6707e899548186975158168986804503", "score": "0.50722915", "text": "convertNode (node) {\n if (substance.isString(node)) {\n // Assuming this.state.doc has been set by convertDocument\n node = this.state.doc.get(node);\n } else {\n this.state.doc = node.getDocument();\n }\n var converter = this.getNodeConverter(node);\n // special treatment for annotations, i.e. if someone calls\n // `exporter.convertNode(anno)`\n if (node.isPropertyAnnotation() && (!converter || !converter.export)) {\n return this._convertPropertyAnnotation(node)\n }\n if (!converter) {\n throw new Error(`No converter found for node type '${node.type}'`)\n }\n var el;\n if (converter.tagName) {\n el = this.$$(converter.tagName);\n } else {\n el = this.$$('div');\n }\n el.attr(this.idAttribute, node.id);\n if (converter.export) {\n el = converter.export(node, el, this) || el;\n }\n return el\n }", "title": "" }, { "docid": "a03411bc41f2490cb9693777458732a3", "score": "0.5070659", "text": "function cloneNodes(sourceNode, targetNode) {\n var newNode = sourceNode.cloneNode(false);\n targetNode.appendChild(newNode);\n if (!sourceNode.tagName) return;\n // skip inner text\n // compare computed styles at this node and apply the differences directly\n applyStyles(sourceNode, newNode);\n _.each(sourceNode.childNodes, function(childNode) {\n // clone each child node and apply styles\n cloneNodes(childNode, newNode);\n });\n }", "title": "" }, { "docid": "4f984462498799503ef9583478a887b1", "score": "0.50561935", "text": "function transform(node) {\n /**\n * Combine adjacent text and inline nodes before processing so they can\n * share marks.\n */\n const combinedChildren = node.nodes && combineTextAndInline(node.nodes);\n\n /**\n * Call `transform` recursively on child nodes, and flatten the resulting\n * array.\n */\n const children = !isEmpty(combinedChildren) && flatMap(combinedChildren, transform);\n\n /**\n * Run individual nodes through conversion factories.\n */\n return ['text'].includes(node.object) ? convertTextNode(node) : convertNode(node, children);\n}", "title": "" }, { "docid": "8f0452ee2720b87bef04bc30f7055e36", "score": "0.50531936", "text": "function transformXML(trgId){\n\t\t// code for IE\n\t\tif (window.ActiveXObject){\n\t\t var ex = t.data.transformNode(t.template);\n\t\t document.getElementById(trgId).innerHTML = ex;\n\t\t}\n\t\t// code for Mozilla, Firefox, Opera, etc.\n\t\telse if (document.implementation && \n\t\t document.implementation.createDocument){\n\t\t var xsltProcessor = new XSLTProcessor();\n\t\t xsltProcessor.importStylesheet(t.template);\n\t\t resultDocument = xsltProcessor.transformToFragment(t.data,document);\n\t\t document.getElementById(trgId).appendChild(resultDocument);\n\t }\n\t}", "title": "" }, { "docid": "a9bf0d9999394c35b9ebee56dea04f56", "score": "0.50495523", "text": "replace(target, replacement) {\n var _ref5 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n _ref5$recurse = _ref5.recurse,\n recurse = _ref5$recurse === void 0 ? false : _ref5$recurse,\n _ref5$allDerived = _ref5.allDerived,\n allDerived = _ref5$allDerived === void 0 ? true : _ref5$allDerived;\n\n try {\n this.index(target);\n } catch (err) {\n if (err instanceof StreamException) {\n return;\n } else {\n throw err;\n }\n }\n\n var targetOffset = this.elementOffset(target);\n this.remove(target);\n this.insert(targetOffset, replacement);\n this.coreElementsChanged({\n clearIsSorted: false\n });\n }", "title": "" }, { "docid": "a1e6ed699a06db9b679e55f1f7f84003", "score": "0.50449175", "text": "replaceRight(aPattern,aReplacement){const lastChild=this.children[this.children.length-1];if(lastChild[isSourceNode]){lastChild.replaceRight(aPattern,aReplacement);}else if(typeof lastChild===\"string\"){this.children[this.children.length-1]=lastChild.replace(aPattern,aReplacement);}else{this.children.push(\"\".replace(aPattern,aReplacement));}return this;}", "title": "" }, { "docid": "c402fd7b9e1bd760f2f742dc9fe6ac50", "score": "0.5035577", "text": "function hydrateNode(transferNode, node, worker) {\n const transferIsText = isTextNode(transferNode);\n const nodeIsText = isTextNode(node);\n\n if (!transferIsText && !nodeIsText) {\n const childNodes = transferNode[4\n /* childNodes */\n ] || [];\n\n if (childNodes.length !== node.childNodes.length) {\n // If this parent node has an unequal number of childNodes, we need to ensure its for an allowable reason.\n if (allTextNodes(childNodes) && allTextNodes(node.childNodes)) {\n // Offset due to a differing number of text nodes.\n // replace the current DOM with the text nodes from the hydration.\n replaceNodes(childNodes, node, worker);\n } else {\n const filteredTransfer = childNodes.filter(childNode => !isTextNode(childNode));\n const filteredNodes = [].filter.call(node.childNodes, childNode => !isTextNode(childNode)); // Empty text nodes are used by frameworks as placeholders for future dom content.\n\n if (filteredTransfer.length === filteredNodes.length) {\n storeNode(node, transferNode[7\n /* _index_ */\n ]);\n replaceNodes(childNodes, node, worker);\n }\n }\n } else {\n storeNode(node, transferNode[7\n /* _index_ */\n ]);\n applyDefaultChangeListener(worker, node); // Same number of children, hydrate them.\n\n childNodes.forEach((childNode, index) => hydrateNode(childNode, node.childNodes[index], worker));\n }\n } else if (transferIsText && nodeIsText) {\n // Singular text node, no children.\n storeNode(node, transferNode[7\n /* _index_ */\n ]);\n node.textContent = getString(transferNode[5\n /* textContent */\n ]);\n applyDefaultChangeListener(worker, node);\n }\n}", "title": "" }, { "docid": "316ea49684df5ecc7ae0327cebc5c2e5", "score": "0.5034981", "text": "function replaceNodes(nodes, from, to, view, replacement) {\n var result = [];\n\n for (var i = 0, off = 0; i < nodes.length; i++) {\n var child = nodes[i],\n start = off,\n end = off += child.size;\n\n if (start >= to || end <= from) {\n result.push(child);\n } else {\n if (start < from) {\n result.push(child.slice(0, from - start, view));\n }\n\n if (replacement) {\n result.push(replacement);\n replacement = null;\n }\n\n if (end > to) {\n result.push(child.slice(to - start, child.size, view));\n }\n }\n }\n\n return result;\n }", "title": "" }, { "docid": "bf06384ee68d0f6b4d1732db3a35508d", "score": "0.5034673", "text": "function rewriteTopLevel$$1(article,$){// I'm not using context here because\n// it's problematic when converting the\n// top-level/root node - AP\n$=convertNodeTo$$1($('html'),$,'div');$=convertNodeTo$$1($('body'),$,'div');return $;}", "title": "" }, { "docid": "8abe4c16540afc86de0cc5cda5b45444", "score": "0.50204825", "text": "function walkNode(node, result) {\n\n if (node.nodeType === 1) {\n let attribs = getAttributes(node);\n let elem = new YngwieElement(node.tagName, attribs);\n result = result === undefined\n ? elem\n : result.append(elem);\n }\n\n if (node.nodeType === 3) {\n let textNode = new YngwieTextNode(node.nodeValue);\n result = result === undefined\n ? textNode\n : result.append(textNode);\n }\n\n node = node.firstChild;\n\n while (node) {\n let child = walkNode(node);\n if (child !== undefined) {\n result.append(child);\n }\n node = node.nextSibling;\n }\n\n return result;\n\n}", "title": "" }, { "docid": "02bb68a8078eb2b4fcdae17627dac403", "score": "0.5020384", "text": "function _patchKoTemplateSourceDomElement() {\n const proto = templateSources.domElement.prototype;\n const method = 'nodes';\n const delegate = proto[method];\n\n proto[method] = function () {\n const nodes = delegate.apply(this, arguments);\n return nodes && nodes.nodeType === 11 ? document.importNode(nodes, true) : nodes;\n };\n }", "title": "" }, { "docid": "0b165919b06cc71aea1d8425db01eead", "score": "0.5001371", "text": "function cleanNode(node) {\n if (!node) {\n return;\n }\n if (node && node.instance) {\n node.instance = null;\n }\n if (node && node.props && node.props.children) {\n // eslint-disable-next-line no-unused-vars\n const { children, ...props } = node.props;\n node.props = props;\n }\n if (Array.isArray(node.rendered)) {\n node.rendered.forEach(cleanNode);\n } else if (typeof node.rendered === 'object') {\n cleanNode(node.rendered);\n }\n}", "title": "" }, { "docid": "fc3b6714c535b91f88aa69a53ce53539", "score": "0.5001173", "text": "function morph (newNode, oldNode) {\n var nodeType = newNode.nodeType\n var nodeName = newNode.nodeName\n\n if (nodeType === ELEMENT_NODE) {\n copyAttrs(newNode, oldNode)\n }\n\n if (nodeType === TEXT_NODE || nodeType === COMMENT_NODE) {\n if (oldNode.nodeValue !== newNode.nodeValue) {\n oldNode.nodeValue = newNode.nodeValue\n }\n }\n\n // Some DOM nodes are weird\n // https://github.com/patrick-steele-idem/morphdom/blob/master/src/specialElHandlers.js\n if (nodeName === 'INPUT') updateInput(newNode, oldNode)\n else if (nodeName === 'OPTION') updateOption(newNode, oldNode)\n else if (nodeName === 'TEXTAREA') updateTextarea(newNode, oldNode)\n\n copyEvents(newNode, oldNode)\n}", "title": "" }, { "docid": "ae4862f0bfd6f9c8d1ff4283af4a7cba", "score": "0.50001603", "text": "function replaceNodes(nodes, from, to, view, replacement) {\n var result = [];\n for (var i = 0, off = 0; i < nodes.length; i++) {\n var child = nodes[i], start = off, end = off += child.size;\n if (start >= to || end <= from) {\n result.push(child);\n } else {\n if (start < from) { result.push(child.slice(0, from - start, view)); }\n if (replacement) {\n result.push(replacement);\n replacement = null;\n }\n if (end > to) { result.push(child.slice(to - start, child.size, view)); }\n }\n }\n return result\n}", "title": "" }, { "docid": "ae4862f0bfd6f9c8d1ff4283af4a7cba", "score": "0.50001603", "text": "function replaceNodes(nodes, from, to, view, replacement) {\n var result = [];\n for (var i = 0, off = 0; i < nodes.length; i++) {\n var child = nodes[i], start = off, end = off += child.size;\n if (start >= to || end <= from) {\n result.push(child);\n } else {\n if (start < from) { result.push(child.slice(0, from - start, view)); }\n if (replacement) {\n result.push(replacement);\n replacement = null;\n }\n if (end > to) { result.push(child.slice(to - start, child.size, view)); }\n }\n }\n return result\n}", "title": "" }, { "docid": "ae4862f0bfd6f9c8d1ff4283af4a7cba", "score": "0.50001603", "text": "function replaceNodes(nodes, from, to, view, replacement) {\n var result = [];\n for (var i = 0, off = 0; i < nodes.length; i++) {\n var child = nodes[i], start = off, end = off += child.size;\n if (start >= to || end <= from) {\n result.push(child);\n } else {\n if (start < from) { result.push(child.slice(0, from - start, view)); }\n if (replacement) {\n result.push(replacement);\n replacement = null;\n }\n if (end > to) { result.push(child.slice(to - start, child.size, view)); }\n }\n }\n return result\n}", "title": "" }, { "docid": "ae4862f0bfd6f9c8d1ff4283af4a7cba", "score": "0.50001603", "text": "function replaceNodes(nodes, from, to, view, replacement) {\n var result = [];\n for (var i = 0, off = 0; i < nodes.length; i++) {\n var child = nodes[i], start = off, end = off += child.size;\n if (start >= to || end <= from) {\n result.push(child);\n } else {\n if (start < from) { result.push(child.slice(0, from - start, view)); }\n if (replacement) {\n result.push(replacement);\n replacement = null;\n }\n if (end > to) { result.push(child.slice(to - start, child.size, view)); }\n }\n }\n return result\n}", "title": "" }, { "docid": "ae4862f0bfd6f9c8d1ff4283af4a7cba", "score": "0.50001603", "text": "function replaceNodes(nodes, from, to, view, replacement) {\n var result = [];\n for (var i = 0, off = 0; i < nodes.length; i++) {\n var child = nodes[i], start = off, end = off += child.size;\n if (start >= to || end <= from) {\n result.push(child);\n } else {\n if (start < from) { result.push(child.slice(0, from - start, view)); }\n if (replacement) {\n result.push(replacement);\n replacement = null;\n }\n if (end > to) { result.push(child.slice(to - start, child.size, view)); }\n }\n }\n return result\n}", "title": "" }, { "docid": "ae4862f0bfd6f9c8d1ff4283af4a7cba", "score": "0.50001603", "text": "function replaceNodes(nodes, from, to, view, replacement) {\n var result = [];\n for (var i = 0, off = 0; i < nodes.length; i++) {\n var child = nodes[i], start = off, end = off += child.size;\n if (start >= to || end <= from) {\n result.push(child);\n } else {\n if (start < from) { result.push(child.slice(0, from - start, view)); }\n if (replacement) {\n result.push(replacement);\n replacement = null;\n }\n if (end > to) { result.push(child.slice(to - start, child.size, view)); }\n }\n }\n return result\n}", "title": "" }, { "docid": "ee4e4becce6a99771eb8e718bc46488c", "score": "0.4996357", "text": "function transform(element, rootClass, suffixClasses='') {\n if (typeof element !== 'object' || element.props['data-pacomoskip']) return element\n\n const changes = transformElementProps(\n element.props,\n childTransform,\n typeof element.type !== 'function'\n )\n\n if (element.props.className) {\n changes.className = `${rootClass || ''} ${prefixedClassNames(prefix, element.props.className)} ${suffixClasses}`.trim()\n }\n else if (rootClass) {\n changes.className = `${rootClass} ${suffixClasses}`.trim()\n }\n\n return (\n Object.keys(changes).length === 0\n ? element\n : cloneElement(element, changes, changes.children || element.props.children)\n )\n }", "title": "" }, { "docid": "5f6d6f278d04ba045ddaf946163738d8", "score": "0.49863142", "text": "function transform(target,value,changeType) {\n\t\t$(target).css(changeType,value);\n\t}", "title": "" }, { "docid": "a5dbbafaec3ffc6fa68dedc6c3adbcc4", "score": "0.49858055", "text": "convertNode(node) {\n if (isString(node)) {\n // Assuming this.state.doc has been set by convertDocument\n node = this.state.doc.get(node);\n } else {\n this.state.doc = node.getDocument();\n }\n var converter = this.getNodeConverter(node);\n // special treatment for annotations, i.e. if someone calls\n // `exporter.convertNode(anno)`\n if (node.isPropertyAnnotation() && (!converter || !converter.export)) {\n return this._convertPropertyAnnotation(node);\n }\n if (!converter) {\n throw new Error(`No converter found for node type '${node.type}'`);\n }\n var el;\n if (converter.tagName) {\n el = this.$$(converter.tagName);\n } else {\n el = this.$$('div');\n }\n el.attr(this.idAttribute, node.id);\n if (converter.export) {\n el = converter.export(node, el, this) || el;\n }\n return el;\n }", "title": "" }, { "docid": "ac833070cd0cedf05fe169152c2bca8f", "score": "0.49722445", "text": "function goThroughTree (node) {\n\t\t\n\t\tvar child_nodes = node.childNodes;\n\n\t\t\n\t\tfor(var i = 0;i < child_nodes.length;i++) {\n\n\t\t\tif(child_nodes[i].nodeType == 1) { //if DOM Node is an element\t\t\t\n\t\t\t\t\t\t\n\t\t\t\tgoThroughTree(child_nodes[i]);\n\t\t\t}\n\t\t}\n\n\t\tif(change_style_att == true) applyNewStyleAttributColors(node); //process html style attribute\n\t\tif(change_html_color_att == true) processOldHTMLColorAttributes(node); //process html color attributes\n\t\tif( ((node.nodeName).toLowerCase() == \"img\") && change_img ) {\t//process img elements\t\t\t \n\n\t\t\tchangeHtmlImageElement(node); \t\n\t\t}\n\t\tif( ((node.nodeName).toLowerCase() == \"input\") && change_img ) {\t//process input elements\t\t\t \n\t\t\tvar changedNode = changeHtmlInputElement(node);\n\t\t\tif(changedNode) {\n\t\t\t\tnode.parentNode.replaceChild(changedNode,node);\n\t\t\t}\n\t\t}\n\t\tif(frames && (node.nodeName).toLowerCase() == \"frame\") {\n\t\t\t\n\t\t\t(new AlgorithmChangeColors(node.contentDocument, _simulation_algorithm, _s_a_parameterlist, \n\t\t\t\t\t\t\t\t\t\tchangeExt_Int_Stylesheets, change_style_att, change_html_color_att, \n\t\t\t\t\t\t\t\t\t\tchange_img, change_css_background_img, frames))\n\t\t\t\t\t\t\t\t\t\t.computeAlgorithm();\n\t\t}\n\t\tif(html_background && node.hasAttribute(\"background\") != null) changeHTMLBackground(node);\n\t}", "title": "" }, { "docid": "a4132695eb14fe46565302db12dc79c7", "score": "0.4970427", "text": "function traverse(Id) {\n if (Id == null) return;\n stack.push(modelViewMatrix);\n modelViewMatrix = mult(modelViewMatrix, figure[Id].transform); //apply current transformations\n figure[Id].render(0, 0, 0, dimentions[Id][0], dimentions[Id][1], dimentions[Id][2], color[Id]); //render current node\n if (figure[Id].child != null) traverse(figure[Id].child); //check and render children of node\n modelViewMatrix = stack.pop();\n if (figure[Id].sibling != null) traverse(figure[Id].sibling); //check and render siblings of current node\n}", "title": "" }, { "docid": "c755adc381a4b0af1b9f3dd82286d5f5", "score": "0.4957406", "text": "function render(result, container, templateFactory$$1 = templateFactory) {\n let part = parts.get(container);\n if (part === undefined) {\n removeNodes(container, container.firstChild);\n parts.set(container, part = new NodePart(templateFactory$$1));\n part.appendInto(container);\n }\n part.setValue(result);\n part.commit();\n }", "title": "" }, { "docid": "4a9c87aa351974667bfc6921b342ac33", "score": "0.4956929", "text": "function update(source) {\n\n // Compute the new tree layout.\n var nodes = tree.nodes(this.root).reverse(),\n links = tree.links(nodes);\n\n // Normalize for fixed-depth.\n nodes.forEach(function(d) { d.y = d.depth * 140; });\n\n // Update the nodes…\n var node = this.svg.selectAll(\"g.node\")\n .data(nodes, function(d) { return d.id || (d.id = ++i); });\n\n // Enter any new nodes at the parent's previous position.\n var nodeEnter = node.enter().append(\"g\")\n .attr(\"class\", \"node\")\n .attr(\"transform\", function(d) { return \"translate(\" + source.y0 + \",\" + source.x0 + \")\"; })\n// .on(\"click\", click);\n\n nodeEnter.append(\"circle\")\n .attr(\"r\", 1e-6)\n .style(\"fill\", function(d) { return d._children ? \"lightsteelblue\" : \"#fff\"; });\n\n nodeEnter.append(\"text\")\n .attr(\"x\", function(d) { return d.children || d._children ? 5 : 13; })\n .attr('y', -18)\n .attr(\"dy\", \".35em\")\n .attr(\"text-anchor\", function(d) { return d.children || d._children ? \"end\" : \"start\"; })\n .text(function(d) { return d.name; })\n .style(\"fill-opacity\", 1e-6)\n .style(\"fill\",function (d) {\n if(d.type == 'entity') return \"slateblue\";\n if(d.type == 'attribute') return \"steelblue\";\n });\n\n // Transition nodes to their new position.\n var nodeUpdate = node.transition()\n .duration(duration)\n .attr(\"transform\", function(d) { return \"translate(\" + d.y + \",\" + d.x + \")\"; });\n\n nodeUpdate.select(\"circle\")\n .attr(\"r\", 10)\n .style(\"fill\", function(d) {\n if(d.type == 'entity') return \"slateblue\";\n if(d.type == 'attribute') return \"steelblue\";\n //return d._children ? \"lightsteelblue\" : \"#fff\";\n });\n\n nodeUpdate.select(\"text\")\n .style(\"fill-opacity\", 1);\n\n // Transition exiting nodes to the parent's new position.\n var nodeExit = node.exit().transition()\n .duration(duration)\n// .attr(\"transform\", function(d) { return \"translate(\" + source.y + \",\" + source.x + \")\"; })\n .remove();\n\n nodeExit.select(\"circle\")\n .attr(\"r\", 1e-6);\n\n nodeExit.select(\"text\")\n .style(\"fill-opacity\", 1e-6);\n\n // Update the links…\n var link = this.svg.selectAll(\"path.link\")\n .data(links, function(d) { return d.target.id; });\n\n // Enter any new links at the parent's previous position.\n link.enter().insert(\"path\", \"g\")\n .attr(\"class\", \"link\")\n .attr(\"d\", function(d) {\n var o = {x: source.x0, y: source.y0};\n return diagonal({source: o, target: o});\n });\n\n // Transition links to their new position.\n link.transition()\n .duration(duration)\n .attr(\"d\", diagonal);\n\n // Transition exiting nodes to the parent's new position.\n link.exit().transition()\n .duration(duration)\n .attr(\"d\", function(d) {\n var o = {x: source.x, y: source.y};\n return diagonal({source: o, target: o});\n })\n .remove();\n\n // Stash the old positions for transition.\n nodes.forEach(function(d) {\n d.x0 = d.x;\n d.y0 = d.y;\n });\n}", "title": "" }, { "docid": "69dcbab6e43e317cfae83cf5b50b632d", "score": "0.49395987", "text": "move(sourceIndex, targetIndex) {\n if (sourceIndex === targetIndex) {\n return;\n }\n\n const children = this.children;\n const view = children[sourceIndex];\n\n view.removeNodes();\n view.insertNodesBefore(children[targetIndex].firstChild);\n children.splice(sourceIndex, 1);\n children.splice(targetIndex, 0, view);\n }", "title": "" }, { "docid": "3ddbf813005f043b6b538b6a697d7a85", "score": "0.49340823", "text": "function appendProjectedNode(node, currentParent, currentView) {\n if (node.type !== 0 /* Container */) {\n appendChild(currentParent, node.native, currentView);\n }\n else {\n // The node we are adding is a Container and we are adding it to Element which\n // is not a component (no more re-projection).\n // Alternatively a container is projected at the root of a component's template\n // and can't be re-projected (as not content of any component).\n // Assignee the final projection location in those cases.\n var lContainer = node.data;\n lContainer.renderParent = currentParent;\n var views = lContainer.views;\n for (var i = 0; i < views.length; i++) {\n addRemoveViewFromContainer(node, views[i], true, null);\n }\n }\n if (node.dynamicLContainerNode) {\n node.dynamicLContainerNode.data.renderParent = currentParent;\n }\n}", "title": "" }, { "docid": "84d36e7a20617ef1619b42cdd3be3a65", "score": "0.49270445", "text": "function patchNode(domElem, oldVnode, newVnode, context) {\n\t context = context || {};\n\t newVnode.parentComponent = context.component;\n\t // Skip updating this whole sub-tree\n\t if (oldVnode === newVnode) {\n\t return domElem;\n\t }\n\n\t // Remove the DOM\n\t if (!(0, _index.isUndefined)(oldVnode) && (0, _index.isUndefined)(newVnode)) {\n\t // Unmount the components\n\t unmountThunk(oldVnode);\n\t nodeOp.removeChild(domElem.parentNode, domElem);\n\t return domElem;\n\t }\n\n\t // Replace the DOM\n\t if (!(0, _index.isNull)(oldVnode) && (0, _index.isNull)(newVnode) || (0, _index.isNull)(oldVnode) && !(0, _index.isNull)(newVnode) || !oldVnode.isSameType(newVnode)) {\n\t return replaceNode(domElem, oldVnode, newVnode, context);\n\t }\n\n\t // Two nodes with the same type reaching this point\n\n\t // Element\n\t var newDomElem = domElem;\n\t if (newVnode.isElement()) {\n\t if (oldVnode.tagName !== newVnode.tagName) {\n\t // Replace the whole DOM element\n\t newDomElem = replaceNode(domElem, oldVnode, newVnode, context);\n\t } else {\n\t // Same tagName, update the attributes\n\t updateAttributes(domElem, oldVnode, newVnode);\n\t newVnode.updated(domElem, oldVnode);\n\t patchChildren(domElem, oldVnode, newVnode, context);\n\t }\n\t } else if (newVnode.isText()) {\n\t // Text\n\t if (oldVnode.nodeValue !== newVnode.nodeValue) {\n\t (0, _set_attribute.setAttribute)(domElem, 'nodeValue', newVnode.nodeValue, oldVnode.nodeValue);\n\t }\n\t } else if (newVnode.isThunk()) {\n\t newDomElem = updateThunk(domElem, oldVnode, newVnode, context);\n\t }\n\t return newDomElem;\n\t}", "title": "" }, { "docid": "f9c973835065867ee5e969a7ebdc0491", "score": "0.49266726", "text": "function update(source) {\r\n var duration = 500;\r\n if (!(source != null)) {\r\n return;\r\n }\r\n\r\n\r\n // Compute the new tree layout.\r\n\r\n var nodes = tree.nodes(root).reverse();\r\n\r\n\r\n // Normalize for fixed-depth.\r\n var deepest = 0,\r\n generationGutter = width;\r\n nodes.forEach(function(d) {\r\n if (deepest < d.depth) {\r\n deepest = d.depth;\r\n }\r\n });\r\n generationGutter = Math.floor(width / (deepest + 1));\r\n nodes.forEach(function(d) {\r\n d.y = d.depth * generationGutter;\r\n\r\n });\r\n\r\n // Update the nodes…\r\n var node = vis.selectAll(\"g.node\")\r\n .data(nodes, function(d) {\r\n return d.id || (d.id = ++i);\r\n\r\n });\r\n\r\n // Enter any new nodes at the parent's previous position.\r\n var nodeEnter = node.enter().append(\"svg:g\")\r\n .attr(\"class\", \"node\")\r\n .attr(\"transform\", function(d) {\r\n return \"translate(\" + source.y0 + \",\" + source.x0 + \")\";\r\n });\r\n\r\n //inject content to node\r\n InjectNodeContent(nodeEnter);\r\n\r\n // Transition nodes to their new position.\r\n var nodeUpdate = node.transition()\r\n .duration(duration)\r\n .attr(\"transform\", function(d) {\r\n return \"translate(\" + d.y + \",\" + d.x + \")\";\r\n });\r\n\r\n nodeUpdate.select(\"circle\")\r\n .attr(\"r\", 4.5)\r\n .style(\"fill\", function(d) {\r\n return d._children ? \"lightsteelblue\" : \"#fff\";\r\n });\r\n\r\n\r\n function wrap(text,width) {\r\n text.each(function() {\r\n\r\n var text = d3.select(this),\r\n words = text.text().split(/\\s+/).reverse(),\r\n word,\r\n line = [],\r\n lineNumber = 0,\r\n lineHeight = 0.4, // ems\r\n y = text.attr(\"y\"),\r\n dy = parseFloat(text.attr(\"dy\")),\r\n tspan = text.text(null).append(\"tspan\").attr(\"x\", 10).attr(\"y\", y).attr(\"dy\", lineHeight + \"em\");\r\n while (word = words.pop()) {\r\n line.push(word);\r\n tspan.text(line.join(\" \"));\r\n if (tspan.node().getComputedTextLength() > width) {\r\n line.pop();\r\n tspan.text(line.join(\" \"));\r\n line = [word];\r\n tspan = text.append(\"tspan\").attr(\"x\", 10).attr(\"y\", y).attr(\"dy\", ++lineNumber * lineHeight + dy + \"em\").text(word);\r\n }\r\n }\r\n });\r\n }\r\n\r\n\r\n\r\n nodeUpdate.selectAll(\"text.name\")\r\n // .text(function(d) {\r\n // return d.name;\r\n // })\r\n .call(wrap,80)\r\n .style(\"fill-opacity\", 1);\r\n\r\n nodeUpdate.selectAll(\"text.sf\")\r\n .text(function(d) {\r\n var name=(d.name).trim();\r\n var arr=name.split(' ');\r\n\r\n var sform=\"\";\r\n for(var i=0;i<arr.length;i++)\r\n {\r\n sform+=(arr[i].charAt(0)).toUpperCase();\r\n\r\n\r\n }\r\n return sform;\r\n })\r\n .style(\"fill-opacity\", 1);\r\n\r\n // Transition exiting nodes to the parent's new position.\r\n var nodeExit = node.exit().transition()\r\n .duration(duration)\r\n .attr(\"transform\", function(d) {\r\n return \"translate(\" + source.y + \",\" + source.x + \")\";\r\n })\r\n .remove();\r\n\r\n nodeExit.select(\"circle\")\r\n .attr(\"r\", 1e-6);\r\n\r\n nodeExit.select(\"text\")\r\n .style(\"fill-opacity\", 1e-6);\r\n\r\n // Update the links…\r\n var link = vis.selectAll(\"path.link\")\r\n .data(tree.links(nodes), function(d) {\r\n return d.target.id;\r\n });\r\n\r\n // Enter any new links at the parent's previous position.\r\n link.enter().insert(\"svg:path\", \"g\")\r\n .attr(\"class\", \"link\")\r\n .attr(\"d\", function(d) {\r\n var o = {\r\n x: source.x0,\r\n y: source.y0\r\n };\r\n return diagonal({\r\n source: o,\r\n target: o\r\n });\r\n })\r\n .transition()\r\n .duration(duration)\r\n .attr(\"d\", diagonal);\r\n\r\n // Transition links to their new position.\r\n link.transition()\r\n .duration(duration)\r\n .attr(\"d\", diagonal);\r\n\r\n // Transition exiting nodes to the parent's new position.\r\n link.exit().transition()\r\n .duration(duration)\r\n .attr(\"d\", function(d) {\r\n var o = {\r\n x: source.x,\r\n y: source.y\r\n };\r\n return diagonal({\r\n source: o,\r\n target: o\r\n });\r\n })\r\n .remove();\r\n\r\n // Stash the old positions for transition.\r\n nodes.forEach(function(d) {\r\n d.x0 = d.x;\r\n d.y0 = d.y;\r\n });\r\n }", "title": "" }, { "docid": "43c0edccad865add1bc28cacb1df2f35", "score": "0.4926119", "text": "function removeAllChildren(targetNode){\r\n\t// Checks targetNode\r\n\tvar iNode=$ref(targetNode);\r\n\tif (!iNode) return null;\r\n\t// Selects the contents of the node with a range and extracts them from the DOM tree into a document fragment\r\n\tvar contentsRange=document.createRange();\r\n\tcontentsRange.selectNodeContents(iNode);\r\n\tvar contentsFrag=contentsRange.extractContents();\r\n\tcontentsRange.detach();\r\n\t// Returns the document fragment\r\n\treturn contentsFrag;\r\n}", "title": "" }, { "docid": "b02968faf0aba43c41b1964346e726b4", "score": "0.49236286", "text": "function renderRoot (root, node) {\n // Clone root to the new node\n objectClone(root, node)\n\n // Create the blessed element for the bscript node\n create(root, null)\n\n return root\n}", "title": "" }, { "docid": "d2f7990b7f798a80779a185fd6898508", "score": "0.4922875", "text": "function nodeTransform(d) {\n return \"translate(\" + d.x + \",\" + d.y + \")\";\n}", "title": "" }, { "docid": "56a2d53bd7bbda4daf0e0bde10df7d68", "score": "0.4909152", "text": "function render(that, dom, options) {\n if (!that)\n return '';\n return that(dom !== null && dom !== void 0 ? dom : that._root.children, null, undefined, options).toString();\n}", "title": "" }, { "docid": "56a2d53bd7bbda4daf0e0bde10df7d68", "score": "0.4909152", "text": "function render(that, dom, options) {\n if (!that)\n return '';\n return that(dom !== null && dom !== void 0 ? dom : that._root.children, null, undefined, options).toString();\n}", "title": "" }, { "docid": "2094a77724b8e85abb1cc72d1ecde263", "score": "0.49073893", "text": "function appendProjectedNode(node, currentParent, currentView, renderParent) {\n appendChild(currentParent, node.native, currentView);\n if (node.tNode.type === 0 /* Container */) {\n // The node we are adding is a container and we are adding it to an element which\n // is not a component (no more re-projection).\n // Alternatively a container is projected at the root of a component's template\n // and can't be re-projected (as not content of any component).\n // Assign the final projection location in those cases.\n var lContainer = node.data;\n lContainer[RENDER_PARENT] = renderParent;\n var views = lContainer[VIEWS];\n for (var i = 0; i < views.length; i++) {\n addRemoveViewFromContainer(node, views[i], true, node.native);\n }\n }\n if (node.dynamicLContainerNode) {\n node.dynamicLContainerNode.data[RENDER_PARENT] = renderParent;\n appendChild(currentParent, node.dynamicLContainerNode.native, currentView);\n }\n }", "title": "" }, { "docid": "644506e8b5cc4389520089b3a1f2819d", "score": "0.49015793", "text": "function walk(target, child) {\n var children = target.children,\n i;\n if (children) {\n i = children.length;\n while (i--) {\n\n if (children[i] === child) {\n return children.splice(i, 1);\n } else {\n walk(children[i], child);\n }\n }\n }\n }", "title": "" }, { "docid": "b528cf04911b26f79b5a0c0c82c7d099", "score": "0.48985416", "text": "haxChangeTagName(node, tagName, maintainContent = true) {\n // Create a replacement tag of the desired type\n var replacement = document.createElement(tagName);\n // Grab all of the original's attributes, and pass them to the replacement\n for (var i = 0, l = node.attributes.length; i < l; ++i) {\n let nodeName = node.attributes.item(i).nodeName;\n let value = node.attributes.item(i).value;\n try {\n replacement.setAttribute(nodeName, value);\n } catch (e) {\n console.warn(node.attributes);\n console.warn(e);\n }\n }\n // Persist contents\n // account for empty list and ordered list items\n if (maintainContent) {\n replacement.innerHTML = node.innerHTML.trim();\n }\n if (tagName == \"ul\" || tagName == \"ol\") {\n if (replacement.innerHTML == \"<br />\") {\n replacement.innerHTML = \"<li><br /></li>\";\n } else if (\n !(\n node.tagName.toLowerCase() == \"ul\" ||\n node.tagName.toLowerCase() == \"ol\"\n )\n ) {\n replacement.innerHTML =\n \"<li>\" +\n node.innerHTML\n .trim()\n .replace(/<br\\/>/g, \"</li>\\n<li>\")\n .replace(/<br>/g, \"</li>\\n<li>\") +\n \"</li>\";\n }\n } else if (\n node.tagName.toLowerCase() == \"ul\" ||\n node.tagName.toLowerCase() == \"ol\"\n ) {\n // if we're coming from ul or ol strip out the li tags\n replacement.innerHTML = replacement.innerHTML\n .replace(/<ul>/g, \"\")\n .replace(/<\\/ul>/g, \"\")\n .replace(/<li><\\/li>/g, \"\")\n .replace(/<li>/g, \"\")\n .replace(/<\\/li>/g, \"<br/>\");\n }\n // Switch!\n try {\n node.replaceWith(replacement);\n if (maintainContent) {\n // focus on the thing switched to\n setTimeout(() => {\n let children = replacement.children;\n // see if there's a child element and focus that instead if there is\n if (children[0] && children.tagName) {\n children[0].focus();\n } else {\n replacement.focus();\n }\n }, 10);\n }\n } catch (e) {\n console.warn(e);\n console.warn(replacement);\n console.warn(node);\n }\n return replacement;\n }", "title": "" }, { "docid": "577fb4fd0190edba5907539a128ee294", "score": "0.48890185", "text": "render(component, target, callback) {\n\t\tconst type = (typeof target);\n\t\tif (type === \"string\") {\n\t\t\ttarget = document.querySelectorAll(target);\n\t\t\ttarget[ 0 ].appendChild(component.node);\n\t\t} else if (type === \"object\") {\n\t\t\tif (target instanceof HTMLElement) {\n\t\t\t\ttarget = [target];\n\t\t\t}\n\t\t\ttarget.forEach((node) => {\n\t\t\t\tcomponent.node.appendChild(element);\n\t\t\t});\t\n\t\t} else {\n\t\t\tconsole.error(\"COMPONENT ERROR: Needs to be a valid DOM element or string selector.\");\n\t\t}\n\t\t//store the render target in the component\n\t\tComponent.renderTarget = target;\n\t\t\n\t\t//optional callback\n\t\tif(callback) {\n\t\t\tcallback();\n\t\t}\n\t}", "title": "" }, { "docid": "c4d459979ccdbb226fb00d97569601c7", "score": "0.48880783", "text": "function rstNodeFromDOMElementOrComponent(domElement) {\n var component = preact8_internals_1.componentForNode(domElement);\n if (component) {\n return rstNodeFromComponent(component);\n }\n else {\n return rstNodeFromDOMElement(domElement);\n }\n}", "title": "" }, { "docid": "3b05deed690e973c07cbb64be94e7d17", "score": "0.48847455", "text": "function patchDOMForGoogleTranslate() {\n if (typeof Node !== 'function' || Node.prototype == null) {\n return;\n } // $FlowFixMe Intentionally monkepatching.\n\n\n var originalRemoveChild = Node.prototype.removeChild; // $FlowFixMe Intentionally monkepatching.\n\n Node.prototype.removeChild = function (child) {\n if (child.parentNode !== this) {\n if (typeof console !== 'undefined') {\n console.error('Cannot remove a child from a different parent', child, this);\n }\n\n return child;\n }\n\n return originalRemoveChild.apply(this, arguments);\n }; // $FlowFixMe Intentionally monkepatching.\n\n\n var originalInsertBefore = Node.prototype.insertBefore; // $FlowFixMe Intentionally monkepatching.\n\n Node.prototype.insertBefore = function (newNode, referenceNode) {\n if (referenceNode && referenceNode.parentNode !== this) {\n if (typeof console !== 'undefined') {\n console.error('Cannot insert before a reference node from a different parent', referenceNode, this);\n }\n\n return newNode;\n }\n\n return originalInsertBefore.apply(this, arguments);\n };\n}", "title": "" }, { "docid": "77590ddc8477e30db837e2b5217ac927", "score": "0.48788953", "text": "toNode() {\n const frag = document.createDocumentFragment();\n\n for (let i = 0; i < this.children.length; i++) {\n frag.appendChild(this.children[i].toNode());\n }\n\n return frag;\n }", "title": "" }, { "docid": "2dab1f24255944945ece852c6a22e4ba", "score": "0.48665607", "text": "appendRoot (target) {\n target.parentNode.insertBefore(this.body.root, target.nextSibling);\n this.modules.eventizer.trigger('modules/renderer:rootAppended');\n }", "title": "" }, { "docid": "ba1667489203c22692aa36074012d64b", "score": "0.48583043", "text": "function overrideChildrenChars(sourceComponentChildren, targetComponentChildren, sourceChildren, targetChildren) {\n for (let a = 0; a < targetChildren.length; a++) {\n for (let b = 0; b < sourceChildren.length; b++) {\n // If layer has children then run function again\n if (sourceComponentChildren[a].children && targetComponentChildren[a].children && targetChildren[a].children && sourceChildren[a].children) {\n overrideChildrenChars(sourceComponentChildren[a].children, targetComponentChildren[b].children, sourceChildren[b].children, targetChildren[b].children);\n }\n // If layer is a text node then check if the main components share the same name\n else if (sourceChildren[a].type === \"TEXT\") {\n if (sourceComponentChildren[a].name === targetComponentChildren[b].name) {\n changeText(targetChildren[a], sourceChildren[a].characters, sourceChildren[a].fontName.style);\n }\n }\n }\n }\n}", "title": "" }, { "docid": "7a221eb8524a81a03d79ea374df21e8d", "score": "0.48573098", "text": "updateTransform() {\n super.updateTransform();\n\n // Reset childHash & re-add all the children. This will\n // make the spatial hash re-evaluate the coverage of each child.\n this.childHash.reset();\n for (let i = 0; i < this.children.length; i++) {\n const child = this.children[i];\n\n this.childHash.put(child);\n child.refIndex = i;\n }\n }", "title": "" }, { "docid": "15b5a13c4cae2caf4efce5762ab0b916", "score": "0.4856883", "text": "function useDerivedTransform(_ref) {\n let {\n disabled,\n index,\n node,\n rect\n } = _ref;\n const [derivedTransform, setDerivedtransform] = React.useState(null);\n const previousIndex = React.useRef(index);\n utilities.useIsomorphicLayoutEffect(() => {\n if (!disabled && index !== previousIndex.current && node.current) {\n const initial = rect.current;\n\n if (initial) {\n const current = core.getClientRect(node.current, {\n ignoreTransform: true\n });\n const delta = {\n x: initial.left - current.left,\n y: initial.top - current.top,\n scaleX: initial.width / current.width,\n scaleY: initial.height / current.height\n };\n\n if (delta.x || delta.y) {\n setDerivedtransform(delta);\n }\n }\n }\n\n if (index !== previousIndex.current) {\n previousIndex.current = index;\n }\n }, [disabled, index, node, rect]);\n React.useEffect(() => {\n if (derivedTransform) {\n setDerivedtransform(null);\n }\n }, [derivedTransform]);\n return derivedTransform;\n}", "title": "" }, { "docid": "a19a6dfaf70c4d7cd48f1264ee75a381", "score": "0.48538676", "text": "_setView(renderOutput) {\n let view = renderOutput;\n\n // If ShadowDom NOT supported, then on first render, we prepare the template\n // which means styles will get scoped using ShadyCSS.\n if (!supportsNativeShadowDom() && !this._polyfillDone) {\n this._polyfillDone = true;\n view = prepareRenderedContent(renderOutput, this) || renderOutput;\n }\n\n // If it looks like html, then use innerHTML\n if (\"string\" === typeof view) {\n this.$ui.innerHTML = view;\n } else {\n this.$ui.textContent = \"\";\n this.$ui.appendChild(view);\n }\n\n if (!supportsNativeShadowDom()) {\n reStyleComponentInstanceSubtree(this);\n }\n }", "title": "" }, { "docid": "3865ec9f1367d78e9044ef0a6d0360eb", "score": "0.4851592", "text": "function appendProjectedNode(node, currentParent, currentView, renderParent) {\n appendChild(currentParent, node.native, currentView);\n if (node.tNode.type === 0 /* Container */) {\n // The node we are adding is a container and we are adding it to an element which\n // is not a component (no more re-projection).\n // Alternatively a container is projected at the root of a component's template\n // and can't be re-projected (as not content of any component).\n // Assign the final projection location in those cases.\n var lContainer = node.data;\n lContainer[RENDER_PARENT] = renderParent;\n var views = lContainer[VIEWS];\n for (var i = 0; i < views.length; i++) {\n addRemoveViewFromContainer(node, views[i], true, node.native);\n }\n }\n if (node.dynamicLContainerNode) {\n node.dynamicLContainerNode.data[RENDER_PARENT] = renderParent;\n appendChild(currentParent, node.dynamicLContainerNode.native, currentView);\n }\n}", "title": "" }, { "docid": "3865ec9f1367d78e9044ef0a6d0360eb", "score": "0.4851592", "text": "function appendProjectedNode(node, currentParent, currentView, renderParent) {\n appendChild(currentParent, node.native, currentView);\n if (node.tNode.type === 0 /* Container */) {\n // The node we are adding is a container and we are adding it to an element which\n // is not a component (no more re-projection).\n // Alternatively a container is projected at the root of a component's template\n // and can't be re-projected (as not content of any component).\n // Assign the final projection location in those cases.\n var lContainer = node.data;\n lContainer[RENDER_PARENT] = renderParent;\n var views = lContainer[VIEWS];\n for (var i = 0; i < views.length; i++) {\n addRemoveViewFromContainer(node, views[i], true, node.native);\n }\n }\n if (node.dynamicLContainerNode) {\n node.dynamicLContainerNode.data[RENDER_PARENT] = renderParent;\n appendChild(currentParent, node.dynamicLContainerNode.native, currentView);\n }\n}", "title": "" }, { "docid": "3865ec9f1367d78e9044ef0a6d0360eb", "score": "0.4851592", "text": "function appendProjectedNode(node, currentParent, currentView, renderParent) {\n appendChild(currentParent, node.native, currentView);\n if (node.tNode.type === 0 /* Container */) {\n // The node we are adding is a container and we are adding it to an element which\n // is not a component (no more re-projection).\n // Alternatively a container is projected at the root of a component's template\n // and can't be re-projected (as not content of any component).\n // Assign the final projection location in those cases.\n var lContainer = node.data;\n lContainer[RENDER_PARENT] = renderParent;\n var views = lContainer[VIEWS];\n for (var i = 0; i < views.length; i++) {\n addRemoveViewFromContainer(node, views[i], true, node.native);\n }\n }\n if (node.dynamicLContainerNode) {\n node.dynamicLContainerNode.data[RENDER_PARENT] = renderParent;\n appendChild(currentParent, node.dynamicLContainerNode.native, currentView);\n }\n}", "title": "" }, { "docid": "29c761228017894f633e702fa01c82f3", "score": "0.48478812", "text": "function innerDiffNode(dom, vchildren, context, mountAll) {\n\tlet originalChildren = dom.childNodes,\n\t\tchildren = [],\n\t\tkeyed = {},\n\t\tkeyedLen = 0,\n\t\tmin = 0,\n\t\tlen = originalChildren.length,\n\t\tchildrenLen = 0,\n\t\tvlen = vchildren && vchildren.length,\n\t\tj, c, vchild, child;\n\n\tif (len) {\n\t\tfor (let i=0; i<len; i++) {\n\t\t\tlet child = originalChildren[i],\n\t\t\t\tkey = vlen ? ((c = child._component) ? c.__key : (c = child[ATTR_KEY]) ? c.key : null) : null;\n\t\t\tif (key || key===0) {\n\t\t\t\tkeyedLen++;\n\t\t\t\tkeyed[key] = child;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tchildren[childrenLen++] = child;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (vlen) {\n\t\tfor (let i=0; i<vlen; i++) {\n\t\t\tvchild = vchildren[i];\n\t\t\tchild = null;\n\n\t\t\t// if (isFunctionalComponent(vchild)) {\n\t\t\t// \tvchild = buildFunctionalComponent(vchild);\n\t\t\t// }\n\n\t\t\t// attempt to find a node based on key matching\n\t\t\tlet key = vchild.key;\n\t\t\tif (key!=null) {\n\t\t\t\tif (keyedLen && key in keyed) {\n\t\t\t\t\tchild = keyed[key];\n\t\t\t\t\tkeyed[key] = undefined;\n\t\t\t\t\tkeyedLen--;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// attempt to pluck a node of the same type from the existing children\n\t\t\telse if (!child && min<childrenLen) {\n\t\t\t\tfor (j=min; j<childrenLen; j++) {\n\t\t\t\t\tc = children[j];\n\t\t\t\t\tif (c && isSameNodeType(c, vchild)) {\n\t\t\t\t\t\tchild = c;\n\t\t\t\t\t\tchildren[j] = undefined;\n\t\t\t\t\t\tif (j===childrenLen-1) childrenLen--;\n\t\t\t\t\t\tif (j===min) min++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!child && min<childrenLen && isFunction(vchild.nodeName) && mountAll) {\n\t\t\t\t\tchild = children[min];\n\t\t\t\t\tchildren[min++] = undefined;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// morph the matched/found/created DOM child to match vchild (deep)\n\t\t\tchild = idiff(child, vchild, context, mountAll);\n\n\t\t\tif (child && child!==dom && child!==originalChildren[i]) {\n\t\t\t\tdom.insertBefore(child, originalChildren[i] || null);\n\t\t\t}\n\t\t}\n\t}\n\n\n\tif (keyedLen) {\n\t\tfor (let i in keyed) if (keyed[i]) recollectNodeTree(keyed[i]);\n\t}\n\n\t// remove orphaned children\n\tif (min<childrenLen) {\n\t\tremoveOrphanedChildren(children);\n\t}\n}", "title": "" }, { "docid": "db261095c478d2d127562f6f15fc951a", "score": "0.48466328", "text": "function walk (newNode, oldNode) {\n // if (DEBUG) {\n // console.log(\n // 'walk\\nold\\n %s\\nnew\\n %s',\n // oldNode && oldNode.outerHTML,\n // newNode && newNode.outerHTML\n // )\n // }\n if (!oldNode) {\n return newNode\n } else if (!newNode) {\n return null\n } else if (newNode.isSameNode && newNode.isSameNode(oldNode)) {\n return oldNode\n } else if (newNode.tagName !== oldNode.tagName) {\n return newNode\n } else {\n morph(newNode, oldNode)\n updateChildren(newNode, oldNode)\n return oldNode\n }\n}", "title": "" }, { "docid": "a0fb314f79318bfda3dd6a46a752d411", "score": "0.48465392", "text": "function renderToNodeStream(element) {\n return new ReactMarkupReadableStream(element, false);\n }", "title": "" }, { "docid": "d1a6f73371f9f9e096f4578380eb6b6a", "score": "0.48442078", "text": "function _replaceNode(e)\n {\n rebindNode(e, e.newObjectValue);\n e.newObjectValue= null;\n DC.Animator.removeClassName(e, DC.Style.kReplacingClass, {\n duration: 250,\n discreteTransitionPoint: 1\n });\n }", "title": "" }, { "docid": "4f3ac2d6ff6ebcfa3d7d66074bd87691", "score": "0.48431167", "text": "function MimicNode(element) {\n this.element = element;\n this.replacer = document.createElement('div');\n this.replacer.style.visibility = 'hidden';\n this.hide();\n element.parentNode.insertBefore(this.replacer, element);\n }", "title": "" }, { "docid": "5f11b8e43252e3a0cb9dc60215756136", "score": "0.48385736", "text": "function sourceElementVisitor(node) {\n return saveStateAndInvoke(node, sourceElementVisitorWorker);\n }", "title": "" }, { "docid": "fbe18866304eb99f3f3ea23475f729a5", "score": "0.48370776", "text": "function renderToNodeStream(element) {\n return new ReactMarkupReadableStream(element, false);\n}", "title": "" }, { "docid": "fbe18866304eb99f3f3ea23475f729a5", "score": "0.48370776", "text": "function renderToNodeStream(element) {\n return new ReactMarkupReadableStream(element, false);\n}", "title": "" }, { "docid": "fbe18866304eb99f3f3ea23475f729a5", "score": "0.48370776", "text": "function renderToNodeStream(element) {\n return new ReactMarkupReadableStream(element, false);\n}", "title": "" } ]
edc2cbe8013e01e15d0c7a00aa00de57
export the chart to CSV file and let users download
[ { "docid": "2d7e186e08c68fb9f83da1b8c9767a09", "score": "0.8269307", "text": "function downloadCSV()\n{\n 'use strict';\n chart.downloadCSV();\n}", "title": "" } ]
[ { "docid": "7a4e21e59d6de21920acd93d9fc5bfd1", "score": "0.81715083", "text": "function chartToCSV() {\n function zip(arrays) {\n return arrays[0].map(function (_, i) {\n return arrays.map(function (array) {\n return array[i]\n })\n });\n }\n if (chartdata === {}) {\n alert('There is no data in the chart. Please plot some data first.');\n return\n }\n let data = zip([chartdata.x, chartdata.y]);\n let csv = \"data:text/csv;charset=utf-8,\" + data.map(e => e.join(\",\")).join(\"\\n\");\n let link = document.createElement('a');\n link.setAttribute('href', encodeURI(csv));\n link.setAttribute('target', '_blank');\n link.setAttribute('download', 'extracted_time_series.csv');\n document.body.appendChild(link);\n link.click();\n $(\"#a\").remove()\n}", "title": "" }, { "docid": "c22fd7df9c0f0c592e7a5c0a167d4ed8", "score": "0.7516193", "text": "download() {\n //ask for filename\n var filename = prompt('File name (*.csv):', 'data.csv');\n\n if (filename) {\n //adds csv as extension\n if (!filename.endsWith('.csv')) filename = filename.concat('.csv'); //labels first row\n\n var content = 'Time,' + this.labels + '\\n'; //transpose each row = variable in specific time\n\n for (var i = 0; i < this.chart.data.labels.length; i++) {\n var row = this.chart.data.labels[i];\n\n for (var j = 0; j < this.chart.data.datasets.length; j++) {\n row += ',' + this.chart.data.datasets[j].data[i];\n }\n\n content += row + '\\n';\n }\n\n var blob = new Blob([content], {\n type: 'text/csv;charset=utf-8;'\n });\n saveAs(blob, filename);\n }\n }", "title": "" }, { "docid": "08341aef69d93e9b143318904ea1b4f2", "score": "0.74493605", "text": "function downloadCsv(){\r\n let curDrop = m_DropDataList[m_activeDropIndex]\r\n // split the comma sep data to insert new lines instead\r\n const rows = curDrop.chartData.split(',');\r\n let csvContent = \"data:text/csv;charset=utf-8,\";\r\n rows.forEach(function(rowArray){\r\n csvContent += row + \"\\r\\n\"; // add carriage return\r\n }); \r\n\r\n // Create a hidden ele and click it to download the data\r\n var encodedUri = encodeURI(csvContent);\r\n var link = document.createElement(\"a\");\r\n link.setAttribute(\"href\", encodedUri);\r\n link.setAttribute(\"download\", \"my_data.csv\");\r\n document.body.appendChild(link); // Required for FF\r\n\r\n link.click(); // This will download the data file named \"my_data.csv\".\r\n\r\n}", "title": "" }, { "docid": "0f4f9a93a65baab79090424f0e625f13", "score": "0.7286927", "text": "function export_product_chart_detail(){\n\tvar href = window.location.href.split('?')[0];\n\tvar product_id = $('#product_ids').val();\n\tvar orderbyVal = $('#orderby_product_detail').val();\n\tvar chartby = $('#aBtnGroup').val();\n\tvar range_picker = $('#product_detail_range').val();\n\tvar start_date = moment(range_picker.split('-')[0]).format('YYYY-MM-DD');\n\tvar end_date = moment(range_picker.split('-')[1]).format('YYYY-MM-DD');\n\t$(\".graph-loading\").show();\n\t$.ajax({\t\t\t\n\t\theaders:{'X-CSRF-TOKEN':$('meta[name=\"csrf_token\"]').attr('content')},\n\t\turl:site_url+'/export_product_chart_detail',\n\t\ttype:'post',\n\t\tdata:{\n\t\t\t\torderbyValP:orderbyVal, \n\t\t\t\tproduct_id:product_id, \n\t\t\t\tchartby:chartby, \n\t\t\t\texport_for:\"group\", \n\t\t\t\trange_picker:range_picker,\n\t\t\t\tdata:'text/csv;charset=utf-8',\n\t\t\t},\n\t\tsuccess:function(data){\n\t\t\tvar str = data;\n\t\t\tvar uri = 'data:text/csv;charset=utf-8,' + str;\n\t\t\t$(\".graph-loading\").hide();\n\t\t\tvar downloadLink = document.createElement(\"a\");\n\t\t\tdownloadLink.href = uri;\n\t\t\tdownloadLink.download = downloadLink.download = \"groups-sales-report-\"+start_date+\"-\"+end_date+\".csv\";\n\n\t\t\tdocument.body.appendChild(downloadLink);\n\t\t\tdownloadLink.click();\n\t\t\tdocument.body.removeChild(downloadLink);\n\t\t},error:function(e){\n\t\t\t$(\".graph-loading\").hide();\n\t\t\tshow_error_msg(msg_export_couldnot_process_please_try_again);\n\t\t}\n\t})\n}", "title": "" }, { "docid": "b557a26ea25eb22d29b0c2deb8174e38", "score": "0.70575625", "text": "static exportCSV() {\n const mapClickPointsOfInterest = store.getStateItem('mapClickPointsOfInterest');\n // make sure there is data.\n if (checkValidObject(mapClickPointsOfInterest)) {\n // this.removeMapMarker();\n const csv = PointsOfInterest.convertDataToCSV(mapClickPointsOfInterest);\n const blob = new Blob([csv], { type: 'text/plain;charset=utf-8' });\n saveAs(blob, 'pointsofinterest.csv');\n return csv;\n }\n return null;\n }", "title": "" }, { "docid": "83726017d20464468da318ab00a305c0", "score": "0.70297676", "text": "function exportToCSV(event) {\n try {\n event.preventDefault();\n tables.exportToCSV(view.title);\n } catch (error) {\n console.log(error);\n errors.handleError(error);\n }\n }", "title": "" }, { "docid": "c0044b3572ae99825c83dbedc04dc60c", "score": "0.7010377", "text": "function chartGenerateCSV(chart) {\n\t\tvar records = [];\n\t\trecords.push(['Date (' + chart.aggregate() +')', 'Source', 'Energy (kWh)', 'CO2 (kg)']);\n\t\tchart.enumerateDataOverTime(function timeIterator(data, date) {\n\t\t\tvar keys = Object.keys(data).sort();\n\t\t\tvar localDate;\n\t\t\tkeys.forEach(function sourceIterator(sourceId) {\n\t\t\t\tvar d = data[sourceId],\n\t\t\t\t\trow;\n\t\t\t\tif ( localDate === undefined ) {\n\t\t\t\t\tlocalDate = d.localDate + ' ' + d.localTime;\n\t\t\t\t}\n\t\t\t\trow = [localDate, sourceId];\n\t\t\t\trow.push(d.wattHours / 1000);\n\t\t\t\trow.push((d.wattHours * co2GramsPerWattHour) / 1000);\n\t\t\t\trecords.push(row);\n\t\t\t});\n\t\t});\n\t\treturn d3.csv.format(records);\n\t}", "title": "" }, { "docid": "5b19b7db7509b08f732e79471fad5fbe", "score": "0.6974011", "text": "function saveAsCSV(id, name) {\n\n // Transform the data first\n let data = [];\n\n data.push(Object.keys(graphOptions[id]['binsData']));\n\n graphOptions[id]['binsData']['x'].forEach((x, i) => {\n data.push([x, graphOptions[id]['binsData']['y_count'][i], graphOptions[id]['binsData']['y_perc'][i]]);\n });\n\n // Rest of this function was taken on internet\n // No reference, sorry, again. =P\n\n // Building the CSV from the Data two-dimensional array\n // Each column is separated by \";\" and new line \"\\n\" for next row\n let csvContent = '';\n data.forEach(function(infoArray, index) {\n dataString = infoArray.join(';');\n csvContent += index < data.length ? dataString + '\\n' : dataString;\n });\n\n // The download function takes a CSV string, the filename and mimeType as parameters\n // Scroll/look down at the bottom of this snippet to see how download is called\n var download = function(content, fileName, mimeType) {\n let a = document.createElement('a');\n mimeType = mimeType || 'application/octet-stream';\n\n if (navigator.msSaveBlob) { // IE10\n navigator.msSaveBlob(new Blob([content], {\n type: mimeType\n }), fileName);\n } else if (URL && 'download' in a) { //html5 A[download]\n a.href = URL.createObjectURL(new Blob([content], {\n type: mimeType\n }));\n a.setAttribute('download', fileName);\n document.body.appendChild(a);\n a.click();\n document.body.removeChild(a);\n } else {\n location.href = 'data:application/octet-stream,' + encodeURIComponent(content); // only this mime type is supported\n }\n };\n\n download(csvContent, name + '.csv', 'text/csv;encoding:utf-8');\n\n}", "title": "" }, { "docid": "f0b179af174ce8e611ef26c3f036e467", "score": "0.69667715", "text": "function doExport(){\r\n\tsendForm(\"exportCSV\",\"csv\");\r\n}", "title": "" }, { "docid": "a2e12b844f095687ca1e4dfe63200d89", "score": "0.6945142", "text": "function exportFile() {\n //https://stackoverflow.com/questions/14964035/how-to-export-javascript-array-info-to-csv-on-client-side\n let csvContent = \"data:text/csv;charset=utf-8,\" + source.map(e => e.join(\",\")).join(\"\\n\");\n var encodedUri = encodeURI(csvContent);\n var link = document.createElement(\"a\");\n link.setAttribute(\"href\", encodedUri);\n link.setAttribute(\"download\", \"my_data.csv\");\n document.body.appendChild(link); // Required for FF\n link.click();\n}", "title": "" }, { "docid": "ea2f27957aaa80b1d8fee28a81e2bace", "score": "0.6865074", "text": "attachExportEvent() {\n const {metadata: {processingColumns: columns, processingData: data}} = this;\n $('#export-btn').click(() => {\n const exportedData = [];\n data.forEach(row => {\n let arr = [];\n for (let [index, value] of columns.entries()) {\n let str = row[value.cdata] + \"\";\n str && str.includes(',') && (str = str.replace(',', ','));\n arr.push(str);\n if (index == columns.length - 1) {\n exportedData.push(arr + '\\n')\n }\n }\n })\n exportedData.unshift((columns.map(row => row.cname)) + '\\n');\n const blob = new Blob(exportedData, {type: \"text/plain;charset=utf-8\"});\n saver.saveAs(blob, \"download.csv\");\n });\n }", "title": "" }, { "docid": "c7065bc1792dff6fbb78cb35f5be4826", "score": "0.68566376", "text": "function downloadCSV(){\n console.log('downloading CSV') \n }", "title": "" }, { "docid": "4fa829a006ecb22c7bff8dd80f2d2e3e", "score": "0.6816577", "text": "function doExportCSV() {\n if (bigdata.length > 2) {\n var d = new Date();\n exportToCsv(gCaseName.toLowerCase().replace(/ /g,\"_\")+\"_spc_data_\"+d.getTime()+\".csv\", bigdata);\n } else {\n console.log(\"[SPC] not enough data to export!\");\n }\n}", "title": "" }, { "docid": "8dfd6098414ed592e77c41fff7a8e34e", "score": "0.678858", "text": "function saveFileWithDownload() {\n // use FileSaver to export file\n var BOM = \"\\uFEFF\"; //%EF%BB%BF\n var blob = new Blob([BOM + fileResult.join('\\n')], {type: \"text/csv;charset=utf-8\"});\n saveAs(blob, currentFile.name.split('.')[0] + '_' + moment().format(\"YYYY-MM-DD_HH-mm-ss\") + '_resultat.csv');\n}", "title": "" }, { "docid": "034e2b2be3c63e06fb31d3526e3cd38f", "score": "0.6777774", "text": "function CSVExport(data, title) {\n if (!title)\n title = 'Marketcloud_export_' + String(Date.now()) + '.csv';\n\n var encodedUri = encodeURI('data:text/csv;charset=utf-8,' + data )\n var link = document.createElement('a')\n link.setAttribute('href', encodedUri)\n link.setAttribute('download', title)\n document.body.appendChild(link) // Required for FF\n\n link.click() // This will download the data file named \"my_data.csv\".\n }", "title": "" }, { "docid": "855a74481d977faa774183c546b2d640", "score": "0.67528224", "text": "function downloadTable() {\n\t\t\n\t\tvar csvContent = null;\n\n\t\tif ( measurementDataTable.rows().count() > 1 ) {\n\t\t\tcsvContent = tableToCSV(createCombinedTable());\n\t\t}\n\t\telse {\n\t\t\tcsvContent = tableToCSV(lesionDataMap[currentKey].ratios,['area', '%','mm']);\n\t\t}\n\n\t\tvar fileName = 'areas';\n\t\t\n\t\tif(isIE()){\n\t\t\twindow.navigator.msSaveOrOpenBlob(new Blob( [csvContent],{type: \"text/csv;charset=utf-8;\"}), fileName+\".csv\");\n\t\t} else {\n\t\t\tvar encodedUri = encodeURI(csvContent);\n\t\t\tvar link = document.createElement(\"a\");\n\t\t\tlink.href = encodedUri;\n\t\t\tlink.style = \"visibility:hidden\";\n\t\t\tlink.download = fileName + \".csv\";\n\t\t\tdocument.body.appendChild(link);\n\t\t\tlink.click();\n\t\t\tdocument.body.removeChild(link);\t\t\t\t\t\t\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "ffd70f4586311ad56ed97857fd32e5ee", "score": "0.6721263", "text": "downloadflat() {\n //ask for filename\n var filename = prompt('File name (*.csv):', 'data.csv');\n\n if (filename) {\n //adds csv as extension\n if (!filename.endsWith('.csv')) filename = filename.concat('.csv'); //labels first row - each row is then all data per variable - transposition might be needed\n\n var content = 'variable name,values ...' + '\\n';\n var labels = this.labels.split(','); // variable per row\n //chart labels - usually time\n\n content = content + 'Time,' + this.chart.data.labels.join(',') + '\\n'; //dataset data on other rows\n\n for (var i = 0; i < this.chart.data.datasets.length; i++) {\n content = content + labels[i] + ',' + this.chart.data.datasets[i].data.join(',') + '\\n';\n }\n\n var blob = new Blob([content], {\n type: 'text/csv;charset=utf-8;'\n });\n saveAs(blob, filename);\n }\n }", "title": "" }, { "docid": "9526ee1f7bb5871d70a21db47e416b88", "score": "0.66880614", "text": "function downloadMeasurements() {\n\n\t\tlet currentLesionData = lesionDataMap[currentKey]; \n\n\t\tvar csvContent = tableToCSV(currentLesionData.measurementTable);\n\n\t\tvar fileName = 'measurements';\n\t\t\n\t\tif(isIE()){\n\t\t\twindow.navigator.msSaveOrOpenBlob(new Blob( [csvContent],{type: \"text/csv;charset=utf-8;\"}), fileName+\".csv\");\n\t\t} else {\n\t\t\tvar encodedUri = encodeURI(csvContent);\n\t\t\tvar link = document.createElement(\"a\");\n\t\t\tlink.href = encodedUri;\n\t\t\tlink.style = \"visibility:hidden\";\n\t\t\tlink.download = fileName + \".csv\";\n\t\t\tdocument.body.appendChild(link);\n\t\t\tlink.click();\n\t\t\tdocument.body.removeChild(link);\n\t\t\t\t\t\t\t\t\n\t\t}\t\t\n\t\t\n\t}", "title": "" }, { "docid": "c64bfb696a2c3dd77df864ef5001197e", "score": "0.66802305", "text": "function saveChart(){\r\n\tdownload(chart.getImageURI(), 'fileName.png', \"image/png\");\r\n}", "title": "" }, { "docid": "ea8824fb4cd9f63187ccb433cd5fd538", "score": "0.66662216", "text": "function exportCSV()\r\n{\r\n\tif(currentActionId!=3){\r\n\t\tvar element=createCsv(currentActionId);\r\n \tdocument.body.appendChild(element);\r\n \t\telement.click();\r\n \t\tdocument.body.removeChild(element);\r\n\t}\r\n\telse if(currentActionId==3)\r\n\t{\r\n\t\tfor(i=0;i<3;i++)\r\n\t\t{\r\n\t\t\tvar element=createCsv(i);\r\n \t\tdocument.body.appendChild(element);\r\n \t\t\telement.click();\r\n \t\t\tdocument.body.removeChild(element);\t\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "f4aa79da8676bdcc4fd3c74a7705a495", "score": "0.6665116", "text": "function saveTableCsv(){\n\t$('#Resultado').tableExport({type:'csv',escape:'false'});\t\n}", "title": "" }, { "docid": "8d5b08b3c6965f7504133449293e65df", "score": "0.66578245", "text": "function exportDetail(){\t\t\n\t\n\t$('#export_chart_data').addClass('is-loading');\n\t$('#export_chart_data').attr('disabled','disabled');\n\tlet thisBtn=$(\".orders-four-btn-grp\").find('active').find('button').val();\n\tfilterdata_detail_chart(thisBtn,true)\n\t\n}", "title": "" }, { "docid": "97199da788352cf69f9db2ab90a4b9f1", "score": "0.662719", "text": "function download_csv() {\n let csv = ''\n for(keys of Object.keys(localStorage)) {\n csv += `${keys};${localStorage.getItem(keys)}\\n`\n }\n\n var hiddenElement = document.createElement('a');\n hiddenElement.href = 'data:text/csv;charset=utf-8,' + encodeURI(csv);\n hiddenElement.target = '_blank';\n hiddenElement.download = 'overview.csv';\n hiddenElement.click();\n\n}", "title": "" }, { "docid": "8dab125b133973804f80de3d817a482f", "score": "0.66063815", "text": "function downloadDataAsCSV() {\n let csvData = 'Image MD5 Hash, Filenames, Tags\\n'\n\n for(let i=0; i < rows.length; i++){\n\n const t = (typeof rows[i].tags[0] !== \"undefined\")?rows[i].tags[0]:\"\"\n csvData += rows[i].hash_md5 + ',\"' + rows[i].file_names + '\",\"' + t + '\"\\n'\n }\n\n var blob = new Blob([csvData], { type: \"text/csv;charset=utf-8\" });\n FileSaver.saveAs(blob, \"Search Results.csv\");\n }", "title": "" }, { "docid": "b6bd673df4b2acf9e2c33976fe0bfca8", "score": "0.65899974", "text": "function download_csv_file() {\n console.log(urls);\n //define the heading for each row of the data\n var csv = 'Name\\n';\n //merge the data with CSV \n urls.forEach(function(row) {\n // csv += row.join(',');\\\n csv=csv+row;\n csv += \"\\n\";\n });\n //display the created CSV data on the web browser \n document.write(csv);\n var hiddenElement = document.createElement('a');\n hiddenElement.href = 'data:text/csv;charset=utf-8,' + encodeURI(csv);\n hiddenElement.target = '_blank'; \n \n //provide the name for the CSV file to be downloaded\n hiddenElement.download = 'ExtensionPosts.csv';\n document.body.appendChild(hiddenElement);\n hiddenElement.click();\n \n }", "title": "" }, { "docid": "7ca65c24e6c076150427bb8d7ce1a788", "score": "0.6587876", "text": "function dataToCSV() {\r\n var data = loadVolData(id);\r\n var dataArr = [];\r\n // convert JSON to JS array\r\n dataArr = data.map(function (e, hh) {\r\n return [e.centreline_id, e.dir_bin, data[hh].volume, e.hh, e.year];\r\n });\r\n // add key property names to top of array\r\n dataArr.unshift(Object.getOwnPropertyNames(data[0]));\r\n // establish csv\r\n var csvContent = \"data:text/csv;charset=utf-8,\";\r\n // load data into csv\r\n dataArr.forEach(function(infoArray, index){\r\n dataString = infoArray.join(\",\");\r\n csvContent += index < dataArr.length ? dataString+ \"\\n\" : dataString;\r\n });\r\n var encodedUri = encodeURI(csvContent);\r\n var link = document.createElement(\"a\");\r\n link.setAttribute(\"href\", encodedUri);\r\n link.setAttribute(\"download\", id + name + \".csv\");\r\n document.body.appendChild(link); // Required for FF\r\n\r\n link.click(); // This will download the data file named \"my_data.csv\".\r\n}", "title": "" }, { "docid": "b0f5e3fd76f8e3ddbf7e8273d9914b7e", "score": "0.6551212", "text": "downloadCSV() { //https://stackoverflow.com/questions/14964035/how-to-export-javascript-array-info-to-csv-on-client-side\n let rows = [];\n let i = 0;\n rows[i++] = [\"Workshop Name\", \"Workshop ID\", \"Attendee ID\", \"Attendee Kerberos ID\", \"Attended\"];\n this.state.workshops.forEach(w => {\n if (w.registrants){\n w.registrants.forEach((r) => {\n let attendance_record = this.state.attendance[w.id + \"-\" + r.kerberos_id];\n rows[i] = [];\n rows[i].push(w.name);\n rows[i].push(w.id);\n rows[i].push(r.id);\n rows[i].push(r.kerberos_id);\n rows[i].push(attendance_record.checked_out);\n i++;\n })\n }\n })\n\n let csvContent = \"data:text/csv;charset=utf-8,\";\n rows.forEach(function(rowArray){\n let row = rowArray.join(\",\");\n csvContent += row + \"\\r\\n\";\n });\n var encodedUri = encodeURI(csvContent);\n window.open(encodedUri);\n }", "title": "" }, { "docid": "11257d167947d916c36bb6e1af13892b", "score": "0.6527246", "text": "function download_csv(data) {\n var csv = 'Bush_id,Exploit,Reward\\n'\n data.forEach(\n row => \n {\n csv += row.join(',')\n csv += \"\\n\"\n }\n )\n \n var hiddenElement = document.createElement('a');\n hiddenElement.href = 'data:text/csv;charset=utf-8,' + encodeURI(csv);\n hiddenElement.target = '_blank';\n hiddenElement.download = 'data.csv';\n hiddenElement.click();\n}", "title": "" }, { "docid": "e0b29b5dffb471d1f99ce13db29221a7", "score": "0.65259206", "text": "exportSelection() {\n this.disableExportButton();\n let data = this.exportPrepareData();\n let filename =\n \"export\" + this.exportHandler.getExportFileName() + \".zip\";\n this.downloadZippedCsv(filename, data);\n }", "title": "" }, { "docid": "e111f4afe0d3a082dadb1a0745decc5f", "score": "0.6511406", "text": "exportCsv() {\n this.export('csv');\n }", "title": "" }, { "docid": "93149e66f9deed5d18a55db554d61d0a", "score": "0.6497198", "text": "function exportTableToCSV(filename) {\n var csv = [];\n var rows = document.getElementById(\"data\").rows;\n for (var i = 0; i < rows.length; i++) {\n var row = []\n var cols = rows[i].querySelectorAll(\"td, th\");\n for (var j = 0; j < cols.length; j++) \n row.push(`\"${cols[j].innerText}\"`);\n csv.push(row.join(\",\")); \n }\n // Download CSV file\n downloadCSV(csv.join(\"\\n\"), filename);\n}", "title": "" }, { "docid": "641ad7de597232a2cc705e1e4f490756", "score": "0.6481231", "text": "exportToCSV(viewXml) {\n return spPost(Tenant(this, \"ExportToCSV\"), body({\n viewXml,\n }));\n }", "title": "" }, { "docid": "af1a6ef854e09f3fcdc958ad0101862f", "score": "0.645135", "text": "function downloadCSV(query_id, metric_name, chart_title) {\n $('#download-csv-dialog input[name=query_id]').val(query_id);\n $('#download-csv-dialog input[name=metric_name]').val(dashboard_title);\n $('#download-csv-dialog input[name=chart_title]').val(chart_title);\n $('#download-csv-dialog').modal();\n}", "title": "" }, { "docid": "e080f069b51265d3e62bba435f4a5112", "score": "0.6448601", "text": "function exportDataAsCsv(e){\n\te.preventDefault();\n\tvar params = {allColumns: true};\n\tgridOptions.api.exportDataAsCsv(params);\n}", "title": "" }, { "docid": "4b239467db9f4c1fba2fed08f13de488", "score": "0.6404174", "text": "function prepareDownload(){self.disabled=false;var csv=CsvService.toCsv(CsvService.flatten(self.content));if(csv){var _downloadBlob=new Blob([csv],{type:'text/csv;charset=utf-8;'});self.downloadUrl=window.URL.createObjectURL(_downloadBlob);}else{// Disable button if there is no data\nself.disabled=true;}}", "title": "" }, { "docid": "655849092ae375352473ded2d48786a4", "score": "0.63846564", "text": "function export_as_csv() {\n var table_id = 'maintable';\n // Select all rows from table\n var rows = document.querySelectorAll(\"table tr\");\n // Construct csv\n var csv = [];\n for (var i = 0; i < rows.length; i++) {\n var row = [];\n var cols = rows[i].querySelectorAll('td, th');\n for (var j = 0; j < cols.length - 1; j++) {\n // Get rid of text from icons\n var data = cols[j].innerText.replace('arrow_drop_down', '').replace('double_arrow', '');\n row.push('\"' + data + '\"');\n }\n csv.push(row.join(','));\n }\n var csv_string = csv.join('\\n');\n // Download it\n var filename = 'potholes_' + new Date().toLocaleDateString() + '.csv';\n var link = document.createElement('a');\n link.style.display = 'none';\n link.setAttribute('href', 'data:text/csv;charset=utf-8,' + encodeURIComponent(csv_string));\n link.setAttribute('download', filename);\n document.body.appendChild(link);\n link.click();\n window.URL.revokeObjectURL(a.href);\n document.body.removeChild(link);\n}", "title": "" }, { "docid": "723658a0de8ceec99705af00f950c180", "score": "0.637044", "text": "function downloadUserReport() {\n downloadFile(\"api/users/csv\");\n }", "title": "" }, { "docid": "a4b4f6dc5f9fa84473b7a5fcf8879bcb", "score": "0.6335747", "text": "function downloadCSVFile(csv){\n var textEncoder = new CustomTextEncoder('windows-1252', {NONSTANDARD_allowLegacyEncoding: true});\n var csvContentEncoded = textEncoder.encode([csv]);\n var blob = new Blob([csvContentEncoded]);\n var a = window.document.createElement(\"a\");\n a.href = window.URL.createObjectURL(blob, {type: 'text/csv;charset=windows-1252;'});\n a.download = omsid + \".csv\";\n document.body.appendChild(a);\n a.click();\n document.body.removeChild(a);\n $('#downloadCSVButton').html('<i class=\"fa fa-check-square-o\"></i>&emsp;Dowload Complete').prop(\"disabled\", true);\n }", "title": "" }, { "docid": "977e76289007748dddf261f7d9983f5a", "score": "0.63339347", "text": "function downloadCsv(csv, filename) {\n var csvFile;\n var downloadLink;\n\n // csv file\n csvFile = new Blob([csv], {type: \"text/csv\"});\n // download link\n downloadLink = document.createElement(\"a\");\n // file name\n downloadLink.download = filename;\n // create a link to the file\n downloadLink.href = window.URL.createObjectURL(csvFile);\n // make sure that the link is not displayed\n downloadLink.style.display = \"none\";\n // add the link to your DOM\n document.body.appendChild(downloadLink);\n // click event to open the csv file\n downloadLink.click();\n}", "title": "" }, { "docid": "8a2dc14f669b326f32221d8113f88c39", "score": "0.6315659", "text": "function exportreportcsv_onclick(){\n\tconsole.log(arguments.callee.name + \" --> \");\n\t\n\t$(\"#cdrtablecsv\").tableToCSV();\n\t\n}", "title": "" }, { "docid": "da9ba3db8c47f4c46cceb82ca0bea387", "score": "0.6307099", "text": "function downloadCSV(args) {\r\n var data, filename, link;\r\n\r\n var csv = convertArrayOfObjectsToCSV({\r\n data: taskList\r\n });\r\n if (csv == null) return;\r\n filename = args.filename || 'export.csv';\r\n\r\n if (!csv.match(/^data:text\\/csv/i)) {\r\n csv = 'data:text/csv;charset=utf-8,' + csv;\r\n }\r\n data = encodeURI(csv);\r\n\r\n link = document.createElement('a');\r\n link.setAttribute('href', data);\r\n link.setAttribute('download', filename);\r\n link.click();\r\n}", "title": "" }, { "docid": "b27891cb55986b9ac6ee8ddf48a859c8", "score": "0.6297752", "text": "function ConvertExportToCSV(objDataArray, objHeaderArray, filename) {\n\t\tvar dataArray = typeof objDataArray != 'object' ? JSON.parse(objDataArray) : objDataArray;\n\t\tvar headerArray = typeof objHeaderArray != 'object' ? JSON.parse(objHeaderArray) : objHeaderArray;\n\n\t\tvar str = '';\n\n\t\t// printing header \n\t\tfor (var i = 0; i < headerArray.length; i++) {\n\t\t\tvar line = '';\n\t\t\tfor (var index in headerArray[i]) {\n\t\t\t\tif (line != '') line += ','\n\n\t\t\t\t\tline += headerArray[i][index];\n\t\t\t}\n\t\t\tstr += line + '\\r\\n';\n\t\t}\n\n\t\t// printin data\n\t\tfor (var i = 0; i < dataArray.length; i++) {\n\t\t\tvar line = '';\n\t\t\tfor (var index in dataArray[i]) {\n\t\t\t\tif (line != '') line += ','\n\n\t\t\t\t\tline += dataArray[i][index];\n\t\t\t}\n\n\t\t\tstr += line + '\\r\\n';\n\t\t}\n\n\t\tvar csv = str;\n\n\t\tvar blob = new Blob([csv],{type: \"text/csv;charset=utf-8;\"});\n\n\t\tif (navigator.msSaveBlob) { // IE 10+\n\t\t\tnavigator.msSaveBlob(blob, filename)\n\t\t} else {\n\t\t\tvar link = document.createElement(\"a\");\n\t\t\tif (link.download !== undefined) { // feature detection\n\t\t\t\t// Browsers that support HTML5 download attribute\n\t\t\t\tvar url = URL.createObjectURL(blob);\n\t\t\t\tlink.setAttribute(\"href\", url);\n\t\t\t\tlink.setAttribute(\"download\", filename);\n\t\t\t\tlink.style = \"visibility:hidden\";\n\t\t\t\tdocument.body.appendChild(link);\n\t\t\t\tlink.click();\n\t\t\t\tdocument.body.removeChild(link);\n\t\t\t} \n\t\t}\n\t}", "title": "" }, { "docid": "a29d04001c6a3b04c6e23950a017ff06", "score": "0.62949294", "text": "function draw_chart(data) {\n\n var ctx = document.getElementById(data['view_type']);\n\n var timeChart = new Chart(ctx, {\n type: 'line',\n data: {\n labels: data['time_array'],\n datasets: [{\n label: 'Number of edits',\n data: data['edits_array'],\n backgroundColor: 'rgba(255, 99, 132, 0.2)',\n borderColor: 'rgba(255, 99, 132, 1)',\n borderWidth: 1,\n fill: false\n }]\n },\n options: {\n scales: {\n yAxes: [{\n ticks: {\n beginAtZero: true,\n callback: function(value) {\n if (Number.isInteger(value)) {\n return value;\n }\n }\n }\n }]\n },\n maintainAspectRatio: false,\n // When chart is rendered, change download and href atribute of anchor 'Download JPG' to allow users to download charts as image\n // toDataURL function gets url of chart in type of jpeg image\n animation: {\n onComplete: function() {\n // sets download jpg button\n let time_link = document.getElementById(data['view_type']).toDataURL(\"image/jpeg\");\n document.getElementById(data['view_type']+'-jpg').href = time_link;\n document.getElementById(data['view_type']+'-jpg').setAttribute('download', 'edits_over_time.jpg');\n // sets download csv button\n document.getElementById(data['view_type']+'-csv').href = '/time_csv/?' + url_param + '&amp;view_type=' + data['view_type'] ;\n }\n }\n }\n });\n}", "title": "" }, { "docid": "457d0eb303ec8d474007902a1136585a", "score": "0.62775445", "text": "function downloadCSV(csv, filename) {\n let csvFile;\n let downloadLink;\n\n // CSV file\n csvFile = new Blob([csv], {\n type: \"text/csv\"\n });\n if (navigator.msSaveBlob) { \n navigator.msSaveBlob(csvFile, filename);\n } else {\n\n // Download link\n downloadLink = document.createElement(\"a\");\n\n // File name\n downloadLink.download = filename;\n\n // Create a link to the file\n downloadLink.href = window.URL.createObjectURL(csvFile);\n\n // Hide download link\n downloadLink.style.display = \"none\";\n\n // Add the link to DOM\n document.body.appendChild(downloadLink);\n\n // Click download link\n downloadLink.click();\n }\n}", "title": "" }, { "docid": "457d0eb303ec8d474007902a1136585a", "score": "0.62775445", "text": "function downloadCSV(csv, filename) {\n let csvFile;\n let downloadLink;\n\n // CSV file\n csvFile = new Blob([csv], {\n type: \"text/csv\"\n });\n if (navigator.msSaveBlob) { \n navigator.msSaveBlob(csvFile, filename);\n } else {\n\n // Download link\n downloadLink = document.createElement(\"a\");\n\n // File name\n downloadLink.download = filename;\n\n // Create a link to the file\n downloadLink.href = window.URL.createObjectURL(csvFile);\n\n // Hide download link\n downloadLink.style.display = \"none\";\n\n // Add the link to DOM\n document.body.appendChild(downloadLink);\n\n // Click download link\n downloadLink.click();\n }\n}", "title": "" }, { "docid": "db9b72b3832f4aa63fe94797b1bf49be", "score": "0.6264926", "text": "function GenerateChart(){\n chart=Highcharts.chart('myChart',{\n chart:{\n type:'pie'\n },\n \n title:{\n text:'Style and Smile Salon House Yearly Sales Report'\n },\n \n\n series:[{\n name:'Total Earn in RM ',\n showInLegend:true,\n data:Total\n \n }],\n exporting: {\n //disable the mini menu button on top right of the chart.\n enabled:false,\n \n //enable Labels\n chartOptions:{\n plotOptions:{\n series:{\n dataLabels: {\n enabled: true\n }\n }\n }\n\n }\n \n// csv: {\n// itemDelimiter: ' ; '\n// },\n }\n \n \n });\n}", "title": "" }, { "docid": "995bfb1765ec03b8f07f1ca8a567e739", "score": "0.62615025", "text": "function download_csv(times, readings) {\n var csv = 'Time,Reading\\n';\n var datas = [];\n for (let i = 0; i < readings.length; i++) {\n datas.push([times[i], readings[i]])\n }\n datas.forEach(function(row) {\n csv += row.join(',');\n csv += \"\\n\";\n });\n\n var hiddenElement = document.createElement('a');\n hiddenElement.href = 'data:text/csv;charset=utf-8,' + encodeURI(csv);\n hiddenElement.target = '_blank';\n hiddenElement.download = 'SensorData.csv';\n hiddenElement.click();\n}", "title": "" }, { "docid": "311ac29664348a4345a477ad82791c89", "score": "0.6258722", "text": "function JSONExport(data, title) {\n if (!title)\n title = 'Marketcloud_export_' + String(Date.now()) + '.json';\n\n var encodedUri = encodeURI('data:application/json;charset=utf-8,' + JSON.stringify(data))\n var link = document.createElement('a')\n link.setAttribute('href', encodedUri)\n link.setAttribute('download', title)\n document.body.appendChild(link) // Required for FF\n\n link.click() // This will download the data file named \"my_data.csv\".\n }", "title": "" }, { "docid": "b1a4cf1199e317f6eb45a6bff3a37270", "score": "0.6252864", "text": "function downloadFile(dataset){\n let a = document.createElement('a');\n a.href = 'data:attachment/csv,' + encodeURIComponent(dataset);\n a.target = '_blank';\n a.download = 'projectFile.csv';\n document.body.appendChild(a);\n a.click();\n}", "title": "" }, { "docid": "a383b1aa1185381d50bfbee1eb046152", "score": "0.6246999", "text": "function exportToCsv(filename, rows) {\n var processRow = function (row) {\n var finalVal = '';\n for (var j = 0; j < row.length; j++) {\n var innerValue = row[j] === null ? '' : row[j].toString();\n if (row[j] instanceof Date) {\n innerValue = row[j].toLocaleString();\n };\n var result = innerValue.replace(/\"/g, '\"\"');\n if (result.search(/(\"|,|\\n)/g) >= 0)\n result = '\"' + result + '\"';\n if (j > 0)\n finalVal += '|';\n finalVal += result;\n }\n return finalVal + '\\n';\n };\n\n var csvFile = '';\n for (var i = 0; i < rows.length; i++) {\n csvFile += processRow(rows[i]);\n }\n\n if(false){//turn on and off downloading\n\t var blob = new Blob([csvFile], { type: 'text/csv;charset=utf-8;' });\n\t if (navigator.msSaveBlob) { // IE 10+\n\t navigator.msSaveBlob(blob, filename);\n\t } else {\n\t var link = document.createElement(\"a\");\n\t if (link.download !== undefined) { // feature detection\n\t // Browsers that support HTML5 download attribute\n\t var url = URL.createObjectURL(blob);\n\t link.setAttribute(\"href\", url);\n\t link.setAttribute(\"download\", filename);\n\t link.style = \"visibility:hidden\";\n\t document.body.appendChild(link);\n\t link.click();\n\t document.body.removeChild(link);\n\t }\n\t }\n\t}\n}", "title": "" }, { "docid": "5b6f850465cde73a73a940c5ac6e3b77", "score": "0.6245762", "text": "function downloadCSV(csv, filename) {\n var csvFile;\n var downloadLink;\n\n // CSV file\n csvFile = new Blob([csv], {type: \"text/csv\"});\n\n // Download link\n downloadLink = document.createElement(\"a\");\n\n // File name\n downloadLink.download = filename;\n\n // Create a link to the file\n downloadLink.href = window.URL.createObjectURL(csvFile);\n\n // Hide download link\n downloadLink.style.display = \"none\";\n\n // Add the link to DOM\n document.body.appendChild(downloadLink);\n\n // Click download link\n downloadLink.click();\n}", "title": "" }, { "docid": "0b922dbb1446e2ce43203390ad3a9205", "score": "0.6242454", "text": "function downloadCSV(csv, filename) {\n var csvFile;\n var downloadLink;\n\n // Archivo CSV\n csvFile = new Blob([csv], {type: \"text/csv\"});\n\n // link de descarga\n downloadLink = document.createElement(\"a\");\n\n // Nombre del archivo, se puede cambiar en la enterior fc\n downloadLink.download = filename;\n\n // Crea un enlace al archivo\n downloadLink.href = window.URL.createObjectURL(csvFile);\n\n // Ocultar enlace de descarga\n downloadLink.style.display = \"none\";\n\n // Agrega el enlace a DOM\n document.body.appendChild(downloadLink);\n\n // clickea en el enlace de descarga, para que inicie la descarga\n downloadLink.click();\n}", "title": "" }, { "docid": "d82d259ad61b03ae6a590e25e3d8924f", "score": "0.6240682", "text": "function exportDashboardEntity() {\n\t$.ajax({\n\t\ttype : \"Get\",\n\t\turl : \"exportdashboard.html\",\n\t\tcontentType : \"text/csv; charset=utf-8\",\n\t\tdata : {\n\t\t\t\"type\" : \"entity\"\n\t\t},\n\t\tsuccess : function() {\n\t\t},\n\t\terror : function(e) {\n\t\t\talert('Error: ' + e +' \\n Click OK to return');\n\t\t}\n\t});\n}", "title": "" }, { "docid": "d28c243e7b49b6e20a63646663f4d1ba", "score": "0.6236188", "text": "function downloadCSV() {\n var csv = Papa.unparse(csvArray);\n\n var csvData = new Blob([csv], {\n type: 'text/csv;charset=utf-8;'\n });\n var csvURL = null;\n if (navigator.msSaveBlob) {\n csvURL = navigator.msSaveBlob(csvData, 'download.csv');\n } else {\n csvURL = window.URL.createObjectURL(csvData);\n }\n\n var tempLink = document.createElement('a');\n tempLink.href = csvURL;\n tempLink.setAttribute('download', 'LandingPageImport-1.csv');\n tempLink.click();\n}", "title": "" }, { "docid": "19fe0697aaf635853fb8c01c768d0100", "score": "0.62336355", "text": "function saveResultsToCSVFile() {\n const createCSVWriter = require(\"csv-writer\").createObjectCsvWriter;\n\n if (configuration.saveToCSV != null && configuration.saveToCSV.length > 0) {\n const header = [\n {id: \"url\", title: \"URL\"},\n {id: \"status\", title: \"Status Code\"},\n {id: \"score\", title: \"Page Score\"},\n {id: \"title\", title: \"Title\"},\n {id: \"description\", title: \"Description\"},\n {id: \"keywords\", title: \"Keywords\"},\n {id: \"product\", title: \"Product\"},\n {id: \"lastModified\", title: \"Last Modified\"},\n {id: \"analysis\", title: \"Page Analysis\"},\n {id: \"terms\", title: \"Terms\"}\n ];\n const csvWriter = createCSVWriter({\n path: configuration.saveToCSV,\n header: header\n })\n let row;\n let records = [];\n for (var URL in pagesVisited) {\n let pageDetails = pagesVisited[URL];\n row = {\n url: URL,\n status: pageDetails.statusCode,\n score: 0,\n title: \"\",\n description: \"\",\n keywords: \"\",\n product: \"\",\n lastModified: \"\",\n analysis: \"\",\n terms: \"\"\n };\n if (pageDetails.analyze) {\n row.score = pageDetails.pageScore;\n row.title = pageDetails.title;\n row.description = pageDetails.description;\n row.keywords = pageDetails.keywords;\n row.product = pageDetails.product + \" / \" + pageDetails.version;\n row.lastModified = pageDetails.lastModified;\n row.analysis = pageDetails.pageAnalysis;\n row.terms = frequencyToString(pageDetails.wordFrequencyList);\n }\n records.push(row);\n }\n csvWriter.writeRecords(records)\n .then(function() {\n debugLog(\"CSV file saved to \" + configuration.saveToCSV);\n })\n }\n }", "title": "" }, { "docid": "188c1c43457778a85a8fe475f2cb70b4", "score": "0.62167966", "text": "_csv() {\n if (this._csvBlob) {\n URL.revokeObjectURL(this._csvBlob);\n this._csvBlob = null;\n }\n let csv = [];\n let line = ['id'];\n this._dataframe.header.forEach((_,i) => {\n // TODO(jcgregorio) Look up the git hash and use that as the header.\n line.push(i);\n });\n csv.push(line.join(','));\n for (const traceId in this._dataframe.traceset) {\n if (traceId === ZERO_NAME) {\n continue\n }\n line = [`\"${traceId}\"`];\n this._dataframe.traceset[traceId].forEach((f) => {\n if (f !== MISSING_DATA_SENTINEL) {\n line.push(f);\n } else {\n line.push('');\n }\n });\n csv.push(line.join(','));\n }\n this._csvBlob = new Blob([csv.join('\\n')], {type: 'text/csv'});\n this._csv_download.href = URL.createObjectURL(this._csvBlob);\n this._csv_download.click();\n }", "title": "" }, { "docid": "974789f8100cdb0bde5b53b0758c9f53", "score": "0.62031144", "text": "function evoExportData() {\r\n\r\n}", "title": "" }, { "docid": "fe65af4eca32cf600acf960ea179f6d9", "score": "0.61988425", "text": "function exportCsv1(tableToExport){ \r\n var data = $(tableToExport).table2CSV({delivery:'value'});\r\n var base64data = base64encode(utf16to8(data));//if not utf16to8,chinese char will error\r\n var uri = 'data:text/plain;base64,' + base64data;\r\n var downloadLink = document.createElement(\"a\");\r\n downloadLink.download = \"mytabledata.csv\";\r\n downloadLink.href=uri;\r\n document.body.appendChild(downloadLink);\r\n downloadLink.click();\r\n document.body.removeChild(downloadLink);\r\n}", "title": "" }, { "docid": "eaa28f94eae649504d3e5513e2f1a4ee", "score": "0.6181541", "text": "function onDownloadDatasetCSVButtonClicked(){\n downloadButtonFunction(that.downloadDatasetCSV);\n }", "title": "" }, { "docid": "bca1c1dc862717f27acc03c23d9d2976", "score": "0.61778194", "text": "function exportToCsv(filename, rows) {\r\n\tvar processRow = function (row) {\r\n\t\tvar finalVal = '';\r\n\t\tfor (var j = 0; j < row.length; j++) {\r\n\t\t\tvar innerValue = row[j] === null ? '' : row[j].toString();\r\n\t\t\tif (row[j] instanceof Date) {\r\n\t\t\t\tinnerValue = row[j].toLocaleString();\r\n\t\t\t};\r\n\t\t\tvar result = innerValue.replace(/\"/g, '\"\"');\r\n\t\t\tif (result.search(/(\"|,|\\n)/g) >= 0)\r\n\t\t\tresult = '\"' + result + '\"';\r\n\t\t\tif (j > 0)\r\n\t\t\tfinalVal += ',';\r\n\t\t\tfinalVal += result;\r\n\t\t}\r\n\t\treturn finalVal + '\\n';\r\n\t};\r\n\r\n\tvar csvFile = '';\r\n\tfor (var i = 0; i < rows.length; i++) {\r\n\t\tcsvFile += processRow(rows[i]);\r\n\t}\r\n\r\n\tvar blob = new Blob([csvFile], { type: 'text/csv;charset=utf-8;' });\r\n\tif (navigator.msSaveBlob) { // IE 10+\r\n\t\tnavigator.msSaveBlob(blob, filename);\r\n\t} else {\r\n\t\tvar link = document.createElement(\"a\");\r\n\t\tif (link.download !== undefined) { // feature detection\r\n\t\t\t// Browsers that support HTML5 download attribute\r\n\t\t\tvar url = URL.createObjectURL(blob);\r\n\t\t\tlink.setAttribute(\"href\", url);\r\n\t\t\tlink.setAttribute(\"download\", filename);\r\n\t\t\tlink.style.visibility = 'hidden';\r\n\t\t\tdocument.body.appendChild(link);\r\n\t\t\tlink.click();\r\n\t\t\tdocument.body.removeChild(link);\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "e226407d6f178900e2a70503d51eb821", "score": "0.6177248", "text": "function exportGraph(id) {\n\n // Get the input where the name of the file is\n const name = document.getElementById(\"exportName_\" + id).value;\n\n // Check if a name was given\n if (name === \"\") {\n window.alert(\"Please, specify a name!\")\n } else {\n let type = \"png\";\n\n // For the histograms, we can also export them as CSV\n if (id === \"tt\" || id === \"density\") {\n type = document.getElementById(\"exportType_\" + id).value;\n }\n\n // Save the file as PNG or CSV\n if (type === 'png') {\n // Defined below\n saveAsPNG(id, name);\n } else if (type == 'csv') {\n // Defined below\n saveAsCSV(id, name);\n }\n }\n}", "title": "" }, { "docid": "5f56411345b8fa3f361521a03be7b53b", "score": "0.6176041", "text": "function downloadCSV(csv, filename) {\n var csvFile = csvFile = new Blob([\"\\ufeff\" + csv], {type: \"text/csv\"});\n var downloadLink = downloadLink = document.createElement(\"a\");\n // File name\n downloadLink.download = filename;\n // Create a link to the file\n downloadLink.href = window.URL.createObjectURL(csvFile);\n // Hide download link\n downloadLink.style.display = \"none\";\n // Add the link to DOM\n document.body.appendChild(downloadLink);\n // Click download link\n downloadLink.click();\n}", "title": "" }, { "docid": "a128bed351044a6051309a43ea71ddf9", "score": "0.61738145", "text": "function exportRushees() {\n // get appropriate dataset based on which set of rushees is being viewed\n // asyncs with readFile are out of whack.. I tried for a while but ended up cheating. Sorry.\n var roundID = remote.getGlobal('sharedObject').selectedRusheeTable;\n var roundDictionary = getRusheeDictionary(path.resolve(__dirname, '../data/rushee-profiles'));\n\n // cool download code from https://stackoverflow.com/questions/3665115/create-a-file-in-memory-for-user-to-download-not-through-server\n setTimeout(function(){ \n var dataset = roundDictionary[roundID];\n \n // clean dataset to only include rushee information\n var formattedDataSet = [];\n var rusheeProfile = {};\n for (var i = 0; i<dataset.length; i++) {\n rusheeProfile = dataset[i].rusheeProfile;\n rusheeProfile.comments = dataset[i].comments;\n formattedDataSet.push(rusheeProfile);\n }\n \n var xls = json2xls(formattedDataSet);\n fs.writeFileSync('data.xlsx', xls, 'binary');\n \n var a = window.document.createElement('a');\n a.href = window.URL.createObjectURL(new Blob(['Test,Text'], {type: 'text/csv'}));\n a.download = 'rushee-data.csv';\n \n // Append anchor to body.\n document.body.appendChild(a);\n a.click();\n // Remove anchor from body\n document.body.removeChild(a);\n\n }, 500); \n}", "title": "" }, { "docid": "112b4fb9439ed34313782ddd5a7fae9e", "score": "0.6171542", "text": "function convertToCSV(){\n \n if(!statAdjust)\n\tvar line = csvHeaders + '\\r\\n';\n else\n\tvar line = csvHeadersImp + '\\r\\n';\n\n for (var i = 0; i < homtot.length; i++) {\n var hom = monthlyData[i].hom == null ? \"NA\" : monthlyData[i].hom;\n\tvar drh = monthlyData[i].drh == null ? \"NA\" : monthlyData[i].drh;\n line += (monthlyData[i].date).getFullYear() + \"-\" + monthName[monthlyData[i].date.getMonth()] + \",\" + hom + \",\" + drh + \",\" + monthlyData[i].pop + '\\r\\n';\n }\n if(currentCity != \"Polygon\")\n\tline += location_text + currentCity;\n else\n line += all_municipalities_text + polyString.replace(/,/g, \"/\").replace(/ /g, \":\");\n return Base64.encode(line);\n}", "title": "" }, { "docid": "ed6159cf3bcc24ee45baf8f5a06d1b9d", "score": "0.6164601", "text": "function getCSV(filename) {\n if (arguments.length < 1) {\n filename = \"data.csv\";\n }\n \n var pom = document.createElement('a'), text = [], i, savedata = data.experiment;\n text = '\"event\", \"task\", \"trial\", \"train\", \"test\", \"stimuli\", \"labels\", \"isTestItem\", \"value\", \"trueCat\", \"bestChoice\", \"response\", \"RT\", \"correct\", \"version\"\\n';\n for (i = 0; i < savedata.event.length; i = i + 1) {\n text = text + '\"' + savedata.event[i].toString() + '\", ';\n text = text + '\"' + savedata.task[i].toString() + '\", ';\n text = text + '\"' + savedata.trial[i].toString() + '\", ';\n text = text + '\"' + savedata.train[i].toString() + '\", ';\n text = text + '\"' + savedata.test[i].toString() + '\", ';\n text = text + '\"' + savedata.stimuli[i].toString() + '\", ';\n text = text + '\"' + savedata.labels[i].toString() + '\", ';\n text = text + '\"' + savedata.isTestItem[i].toString() + '\", ';\n text = text + '\"' + savedata.value[i].toString() + '\", ';\n text = text + '\"' + savedata.trueCat[i].toString() + '\", ';\n text = text + '\"' + savedata.bestChoice[i].toString() + '\", ';\n text = text + '\"' + savedata.response[i].toString() + '\", ';\n text = text + '\"' + savedata.RT[i].toString() + '\", ';\n text = text + '\"' + savedata.correct[i].toString() + '\", ';\n text = text + '\"' + savedata.version[i].toString() + '\"\\n';\n }\n \n pom.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text));\n pom.setAttribute('download', filename);\n pom.click();\n}", "title": "" }, { "docid": "c58ced847d2866bd310a19a38653341f", "score": "0.61606604", "text": "function exportData() {\n \n}", "title": "" }, { "docid": "b781d373b6d3c2692349b177927ce544", "score": "0.61429715", "text": "function exportDataForXYPlot(jqPlotter) {\n var dataToExport = \"\";\n var maxDataLength = 0;\n\n jqPlotter.visibleSeries.forEach(function (series) {\n dataToExport += \"Timestamp Quality Value: \";\n dataToExport += series.itemIdY;\n dataToExport += \" Value: \";\n dataToExport += series.itemIdX;\n dataToExport += \" \";\n\n if (series.originalXYData.length > maxDataLength)\n maxDataLength = series.originalXYData.length;\n });\n\n for (var i = 0; i < maxDataLength; i++) {\n jqPlotter.visibleSeries.forEach(function (series) {\n if (i < series.originalXYData.length) {\n dataToExport += getStringOfDataPointForXYPlot(series.originalXYData[i], series.numDecimalsX, series.numDecimalsY);\n }\n });\n }\n\n var dataWindow = window.open('', '', '');\n dataWindow.document.write(dataToExport);\n dataWindow.focus();\n}", "title": "" }, { "docid": "4d04c5e20fd093fed8271a80b548ae9d", "score": "0.61316997", "text": "function createCSV(){\n var csvContent = \"data:text/csv;charset=utf-8,\";\n var lineArray = [];\n var lineArray = [];\n csv_data.forEach(function (infoArray, index) {\n var line = infoArray.join(\",\");\n lineArray.push(index == 0 ? \"Value,Longitude,Latitude\\n\" + line : line);\n });\n var csvContent = lineArray.join(\"\\n\");\n\n var csvContent = lineArray.join(\"\\n\");\n\n window.URL = window.webkitURL || window.URL;\n\n var contentType = 'text/csv';\n\n var csvFile = new Blob([csvContent], {type: contentType});\n\n var a = document.createElement('a');\n switch(current_layer){\n case 0:\n a.download = \"TSurfAir.csv\";\n break;\n case 1:\n a.download = \"CO_total_column.csv\";\n break;\n case 2:\n a.download = \"totH2OStd.csv\";\n break;\n case 3:\n a.download = \"CldFrcTot.csv\";\n break;\n }\n a.href = window.URL.createObjectURL(csvFile);\n a.textContent = 'Download CSV';\n\n a.dataset.downloadurl = [contentType, a.download, a.href].join(':');\n\n document.body.appendChild(a);\n a.click();\n}", "title": "" }, { "docid": "77e3102305d53a6038d92694511e3bce", "score": "0.6129809", "text": "function changeFilename() {\n var name = document.getElementById(\"intext\").value;\n var newopts = {\n chart: {\n toolbar: {\n export: {\n // CSV file name, works with current Apex V3.22.1\n csv: {\n filename: name\n },\n // requires a modified version of Apex Charts, see HTML\n // for resource.\n svg: {\n filename: name\n },\n png: {\n filename: name\n }\n }\n }\n }\n };\n chart.updateOptions(newopts);\n}", "title": "" }, { "docid": "39b968063cd11d633b722e927ebe045d", "score": "0.61219186", "text": "function JSONToCSVConvertor(JSONData, ReportTitle, ShowLabel) {\n \n //If JSONData is not an object then JSON.parse will parse the JSON string in an Object\n var arrData = typeof JSONData != 'object' ? JSON.parse(JSONData) : JSONData;\n \n //Set Report title in first row or line of CSV file\n var CSV = ''; \n \n CSV += ReportTitle + '\\r\\n\\n';\n \n //This condition will generate the Label/Header\n if (ShowLabel) {\n var row = \"\";\n \n //This loop will extract the label from 1st index of on array\n for (var index in arrData[0]) {\n \n //Now convert each value to string and comma-seprated\n row += index + ',';\n }\n \n row = row.slice(0, -1);\n \n //append Label row with line break\n CSV += row + '\\r\\n';\n }\n \n //1st loop is to extract each row\n for (var i = 0; i < arrData.length; i++) {\n var row = \"\";\n \n //2nd loop will extract each column and convert it in string comma-seprated\n for (var index in arrData[i]) {\n row += '\"' + arrData[i][index] + '\",';\n }\n \n row.slice(0, row.length - 1);\n \n //add a line break after each row\n CSV += row + '\\r\\n';\n }\n \n if (CSV == '') { \n alert(\"Invalid data\");\n return;\n } \n \n //Generate a file name\n var fileName = \"Hive Report_\";\n //this will remove the blank-spaces from the title and replace it with an underscore\n fileName += ReportTitle.replace(/ /g,\"_\"); \n \n //Initialize file format you want csv or xls\n var uri = 'data:text/csv;charset=utf-8,' + escape(CSV);\n \n // Now the little tricky part.\n // you can use either>> window.open(uri);\n // but this will not work in some browsers\n // or you will not get the correct file extension \n \n //this trick will generate a temp <a /> tag\n var link = document.createElement(\"a\"); \n link.href = uri;\n \n //set the visibility hidden so it will not effect on your web-layout\n link.style = \"visibility:hidden\";\n link.download = fileName + \".csv\";\n \n //this part will append the anchor tag and remove it after automatic click\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n }", "title": "" }, { "docid": "c943ee4214b799a76ef56bf672889bf1", "score": "0.6116274", "text": "function enrollment_department(file, mytitle) {\n $.get(file, function (csv) {\n $('#enrollment').highcharts({\n chart: {\n type: 'spline'\n },\n data: {\n csv: csv\n },\n title: {\n text: mytitle,\n style: {\n fontSize: 22\n }\n },\n legend: {\n itemStyle: {\n fontSize: 22,\n fontWeight: 400\n }\n },\n exporting: {\n buttons: {\n customButton: {\n text: '<< Back',\n x: -50,\n onclick: function () {\n display_button();\n total_enrollment();\n }\n }\n }\n },\n xAxis: {\n categories: ['2013', '2014', '2015', '2016', '2017', '2018'],\n crosshair: true,\n tickmarkPlacement: 'on',\n labels: {\n style: {\n fontSize: '22px'\n }\n },\n title: {\n enabled: false\n }\n },\n yAxis: {\n title: {\n text: 'Revenue'\n },\n labels: {\n style: {\n fontSize: 16\n }\n }\n }\n });\n });\n\n}", "title": "" }, { "docid": "5e2d8b5bbda7ed4051a47ad5d5d2cf32", "score": "0.6115273", "text": "function generateCSV(req, res, next) {\n const jsonData = req.body;\n const fileName = `csvData/out/taggedCSV_${Date.now()}.csv`;\n\n // convert to csv\n let csvData = json2csv({ data: jsonData });\n\n // store in file\n writeFile(fileName, csvData, 'binary')\n .then(() => {\n res.status(200).send({\n fileName: fileName\n });\n })\n .catch((err) => {\n console.log('Error downloading file!!', err);\n res.status(400).send('Failed to download file!!');\n });\n}", "title": "" }, { "docid": "c025322680e9b5356126e338942d1c49", "score": "0.61062574", "text": "function exportarDatos() {\n /* Enviar archivo creado */\n window.plugins.socialsharing.share('Here is your CSV file', 'Your CSV', cordova.file.externalDataDirectory + fileName)\n}", "title": "" }, { "docid": "b19aa4c52e8b4a334ae6d5008d0bc289", "score": "0.6090407", "text": "function export2csv(target_id) {\n\n var data = {};\n\n if (target_id == 'biz2csv') {\n var bizTable = $('#businesses').table2CSV({delivery:'value'});\n data = {\n 'action': 'exp2csv', //this hooks into wp_ajax_[exp2csv] action so wordpress uses my server-side ajax responder\n 'table': bizTable\n };\n } else if (target_id == 'trx2csv') {\n var trxTable = $('#trx').table2CSV({delivery:'value'});\n data = {\n 'action': 'exp2csv',\n 'table': trxTable\n };\n }\n\n // since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php\n // WPURLS.siteurl comes from wp_localize_script() inside enqueue scripts function\n $.post(ajaxurl, data, function() {\n location.href= WPURLS.siteurl + \"/wp-admin/data.csv\";\n });\n }", "title": "" }, { "docid": "0f1a3c6a68b836ea07cfc970a771e818", "score": "0.60884315", "text": "function ExportJsontoCSV() {\n\n $.ajax({\n //Double check baseURL if you have it, otherwise use your own code, this is simple JQuery POST\n url: baseURL + \"CSVExport/ExporttoCSV/\",\n type: \"POST\",\n data: { 'data': CSVDataIE },\n\n success: function () {\n window.location = baseURL + \"CSVExport/DownloadCSVFile/\";\n }\n\n });\n\n}", "title": "" }, { "docid": "173658930e180af40a8e2a8565132381", "score": "0.608683", "text": "function exportToCsv(filename, rows) {\n var processRow = function (row) {\n var finalVal = '';\n for (var j = 0; j < row.length; j++) {\n var innerValue = row[j] === null ? '' : row[j].toString();\n if (row[j] instanceof Date) {\n innerValue = row[j].toLocaleString();\n };\n var result = innerValue.replace(/\"/g, '\"\"');\n if (result.search(/(\"|,|\\n)/g) >= 0)\n result = '\"' + result + '\"';\n if (j > 0)\n finalVal += ',';\n finalVal += result;\n }\n return finalVal + '\\n';\n };\n\n var csvFile = '';\n for (var i = 0; i < rows.length; i++) {\n csvFile += processRow(rows[i]);\n }\n\n var blob = new Blob([csvFile], { type: 'text/csv;charset=utf-8;' });\n if (navigator.msSaveBlob) { // IE 10+\n navigator.msSaveBlob(blob, filename);\n } else {\n var link = document.createElement(\"a\");\n if (link.download !== undefined) { // feature detection\n // Browsers that support HTML5 download attribute\n var url = URL.createObjectURL(blob);\n link.setAttribute(\"href\", url);\n link.setAttribute(\"download\", filename);\n link.style.visibility = 'hidden';\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n }\n }\n}", "title": "" }, { "docid": "173658930e180af40a8e2a8565132381", "score": "0.608683", "text": "function exportToCsv(filename, rows) {\n var processRow = function (row) {\n var finalVal = '';\n for (var j = 0; j < row.length; j++) {\n var innerValue = row[j] === null ? '' : row[j].toString();\n if (row[j] instanceof Date) {\n innerValue = row[j].toLocaleString();\n };\n var result = innerValue.replace(/\"/g, '\"\"');\n if (result.search(/(\"|,|\\n)/g) >= 0)\n result = '\"' + result + '\"';\n if (j > 0)\n finalVal += ',';\n finalVal += result;\n }\n return finalVal + '\\n';\n };\n\n var csvFile = '';\n for (var i = 0; i < rows.length; i++) {\n csvFile += processRow(rows[i]);\n }\n\n var blob = new Blob([csvFile], { type: 'text/csv;charset=utf-8;' });\n if (navigator.msSaveBlob) { // IE 10+\n navigator.msSaveBlob(blob, filename);\n } else {\n var link = document.createElement(\"a\");\n if (link.download !== undefined) { // feature detection\n // Browsers that support HTML5 download attribute\n var url = URL.createObjectURL(blob);\n link.setAttribute(\"href\", url);\n link.setAttribute(\"download\", filename);\n link.style.visibility = 'hidden';\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n }\n }\n}", "title": "" }, { "docid": "812ab8c50c18cdcd7b2227e987e542ed", "score": "0.6083748", "text": "function exportToCsv(filename, rows) {\n var processRow = function (row) {\n var finalVal = '';\n for (var j = 0; j < row.length; j++) {\n var innerValue = row[j] === null ? '' : row[j].toString();\n if (row[j] instanceof Date) {\n innerValue = row[j].toLocaleString();\n };\n var result = innerValue.replace(/\"/g, '\"\"');\n if (result.search(/(\"|,|\\n)/g) >= 0)\n result = '\"' + result + '\"';\n if (j > 0)\n finalVal += ',';\n finalVal += result;\n }\n return finalVal + '\\n';\n };\n\n var csvFile = '';\n for (var i = 0; i < rows.length; i++) {\n csvFile += processRow(rows[i]);\n }\n\n var blob = new Blob([csvFile], {\n type: 'text/csv;charset=utf-8;'\n });\n if (navigator.msSaveBlob) { // IE 10+\n navigator.msSaveBlob(blob, filename);\n } else {\n var link = document.createElement(\"a\");\n if (link.download !== undefined) { // feature detection\n // Browsers that support HTML5 download attribute\n var url = URL.createObjectURL(blob);\n link.setAttribute(\"href\", url);\n link.setAttribute(\"download\", filename);\n link.style = \"visibility:hidden\";\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n }\n }\n}", "title": "" }, { "docid": "d3dd7ac84f5191781400404d8bddb285", "score": "0.6078697", "text": "function JSONToCSVConverter(JSONData, ReportTitle, ShowLabel) {\n //If JSONData is not an object then JSON.parse will parse the JSON string in an Object\n var arrData = typeof JSONData != 'object' ? JSON.parse(JSONData) : JSONData;\n\n var CSV = '';\n //Set Report title in first row or line\n\n CSV += ReportTitle + '\\r\\n\\n';\n\n //This condition will generate the Label/Header\n if (ShowLabel) {\n var row = \"\";\n\n //This loop will extract the label from 1st index of on array\n for (var index in arrData[0]) {\n\n //Now convert each value to string and comma-seprated\n row += index + ',';\n }\n\n row = row.slice(0, -1);\n\n //append Label row with line break\n CSV += row + '\\r\\n';\n }\n\n //1st loop is to extract each row\n for (var i = 0; i < arrData.length; i++) {\n var row = \"\";\n\n //2nd loop will extract each column and convert it in string comma-seprated\n for (var index in arrData[i]) {\n row += '\"' + arrData[i][index] + '\",';\n }\n\n row.slice(0, row.length - 1);\n\n //add a line break after each row\n CSV += row + '\\r\\n';\n }\n\n if (CSV == '') {\n alert(\"Invalid data\");\n return;\n }\n\n //Generate a file name\n var fileName = \"MyReport_\";\n //this will remove the blank-spaces from the title and replace it with an underscore\n fileName += ReportTitle.replace(/ /g,\"_\");\n\n //Initialize file format you want csv or xls\n var uri = 'data:text/csv;charset=utf-8,' + escape(CSV);\n\n // Now the little tricky part.\n // you can use either>> window.open(uri);\n // but this will not work in some browsers\n // or you will not get the correct file extension\n\n //this trick will generate a temp <a /> tag\n var link = document.createElement(\"a\");\n link.href = uri;\n\n //set the visibility hidden so it will not effect on your web-layout\n link.style = \"visibility:hidden\";\n link.download = fileName + \".csv\";\n\n //this part will append the anchor tag and remove it after automatic click\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n}", "title": "" }, { "docid": "b0d2d1101977e305b0cfe6a47899349b", "score": "0.607093", "text": "exportToCSVAndTSV(data, formatOptions, fileName) {\r\n const that = this,\r\n datafields = that.datafields;\r\n let stringResult = '';\r\n\r\n for (let i = 0; i < data.length; i++) {\r\n const currentRecord = data[i];\r\n let stringifiedCurrentRecord = '';\r\n\r\n for (let j = 0; j < datafields.length; j++) {\r\n if (that.actualHierarchy && j === 0) {\r\n stringifiedCurrentRecord += ('\"\"' + formatOptions.delimiter).repeat(currentRecord._level - 1) +\r\n '\"' + currentRecord[datafields[j]] + '\"' + formatOptions.delimiter +\r\n ('\"\"' + formatOptions.delimiter).repeat(that.maxLevel - currentRecord._level);\r\n continue;\r\n }\r\n\r\n stringifiedCurrentRecord += '\"' + currentRecord[datafields[j]] + '\"' + formatOptions.delimiter;\r\n }\r\n\r\n stringifiedCurrentRecord = stringifiedCurrentRecord.slice(0, stringifiedCurrentRecord.length - formatOptions.toRemove) + '\\n';\r\n stringResult += stringifiedCurrentRecord;\r\n }\r\n\r\n return this.downloadFile(stringResult, formatOptions.MIME, fileName);\r\n }", "title": "" }, { "docid": "8139176089121931dd26f0e986bdeac2", "score": "0.60645527", "text": "function exportToPNG(graphName, target) {\n var plot = $(\"#\"+graphName).data('plot');\n var flotCanvas = plot.getCanvas();\n var image = flotCanvas.toDataURL();\n image = image.replace(\"image/png\", \"image/octet-stream\");\n \n var downloadAttrSupported = (\"download\" in document.createElement(\"a\"));\n if(downloadAttrSupported === true) {\n target.download = graphName + \".png\";\n target.href = image;\n }\n else {\n document.location.href = image;\n }\n \n}", "title": "" }, { "docid": "8139176089121931dd26f0e986bdeac2", "score": "0.60645527", "text": "function exportToPNG(graphName, target) {\n var plot = $(\"#\"+graphName).data('plot');\n var flotCanvas = plot.getCanvas();\n var image = flotCanvas.toDataURL();\n image = image.replace(\"image/png\", \"image/octet-stream\");\n \n var downloadAttrSupported = (\"download\" in document.createElement(\"a\"));\n if(downloadAttrSupported === true) {\n target.download = graphName + \".png\";\n target.href = image;\n }\n else {\n document.location.href = image;\n }\n \n}", "title": "" }, { "docid": "8139176089121931dd26f0e986bdeac2", "score": "0.60645527", "text": "function exportToPNG(graphName, target) {\n var plot = $(\"#\"+graphName).data('plot');\n var flotCanvas = plot.getCanvas();\n var image = flotCanvas.toDataURL();\n image = image.replace(\"image/png\", \"image/octet-stream\");\n \n var downloadAttrSupported = (\"download\" in document.createElement(\"a\"));\n if(downloadAttrSupported === true) {\n target.download = graphName + \".png\";\n target.href = image;\n }\n else {\n document.location.href = image;\n }\n \n}", "title": "" }, { "docid": "8139176089121931dd26f0e986bdeac2", "score": "0.60645527", "text": "function exportToPNG(graphName, target) {\n var plot = $(\"#\"+graphName).data('plot');\n var flotCanvas = plot.getCanvas();\n var image = flotCanvas.toDataURL();\n image = image.replace(\"image/png\", \"image/octet-stream\");\n \n var downloadAttrSupported = (\"download\" in document.createElement(\"a\"));\n if(downloadAttrSupported === true) {\n target.download = graphName + \".png\";\n target.href = image;\n }\n else {\n document.location.href = image;\n }\n \n}", "title": "" }, { "docid": "8139176089121931dd26f0e986bdeac2", "score": "0.60645527", "text": "function exportToPNG(graphName, target) {\n var plot = $(\"#\"+graphName).data('plot');\n var flotCanvas = plot.getCanvas();\n var image = flotCanvas.toDataURL();\n image = image.replace(\"image/png\", \"image/octet-stream\");\n \n var downloadAttrSupported = (\"download\" in document.createElement(\"a\"));\n if(downloadAttrSupported === true) {\n target.download = graphName + \".png\";\n target.href = image;\n }\n else {\n document.location.href = image;\n }\n \n}", "title": "" }, { "docid": "8139176089121931dd26f0e986bdeac2", "score": "0.60645527", "text": "function exportToPNG(graphName, target) {\n var plot = $(\"#\"+graphName).data('plot');\n var flotCanvas = plot.getCanvas();\n var image = flotCanvas.toDataURL();\n image = image.replace(\"image/png\", \"image/octet-stream\");\n \n var downloadAttrSupported = (\"download\" in document.createElement(\"a\"));\n if(downloadAttrSupported === true) {\n target.download = graphName + \".png\";\n target.href = image;\n }\n else {\n document.location.href = image;\n }\n \n}", "title": "" }, { "docid": "8139176089121931dd26f0e986bdeac2", "score": "0.60645527", "text": "function exportToPNG(graphName, target) {\n var plot = $(\"#\"+graphName).data('plot');\n var flotCanvas = plot.getCanvas();\n var image = flotCanvas.toDataURL();\n image = image.replace(\"image/png\", \"image/octet-stream\");\n \n var downloadAttrSupported = (\"download\" in document.createElement(\"a\"));\n if(downloadAttrSupported === true) {\n target.download = graphName + \".png\";\n target.href = image;\n }\n else {\n document.location.href = image;\n }\n \n}", "title": "" }, { "docid": "8139176089121931dd26f0e986bdeac2", "score": "0.60645527", "text": "function exportToPNG(graphName, target) {\n var plot = $(\"#\"+graphName).data('plot');\n var flotCanvas = plot.getCanvas();\n var image = flotCanvas.toDataURL();\n image = image.replace(\"image/png\", \"image/octet-stream\");\n \n var downloadAttrSupported = (\"download\" in document.createElement(\"a\"));\n if(downloadAttrSupported === true) {\n target.download = graphName + \".png\";\n target.href = image;\n }\n else {\n document.location.href = image;\n }\n \n}", "title": "" }, { "docid": "8139176089121931dd26f0e986bdeac2", "score": "0.60645527", "text": "function exportToPNG(graphName, target) {\n var plot = $(\"#\"+graphName).data('plot');\n var flotCanvas = plot.getCanvas();\n var image = flotCanvas.toDataURL();\n image = image.replace(\"image/png\", \"image/octet-stream\");\n \n var downloadAttrSupported = (\"download\" in document.createElement(\"a\"));\n if(downloadAttrSupported === true) {\n target.download = graphName + \".png\";\n target.href = image;\n }\n else {\n document.location.href = image;\n }\n \n}", "title": "" }, { "docid": "8139176089121931dd26f0e986bdeac2", "score": "0.60645527", "text": "function exportToPNG(graphName, target) {\n var plot = $(\"#\"+graphName).data('plot');\n var flotCanvas = plot.getCanvas();\n var image = flotCanvas.toDataURL();\n image = image.replace(\"image/png\", \"image/octet-stream\");\n \n var downloadAttrSupported = (\"download\" in document.createElement(\"a\"));\n if(downloadAttrSupported === true) {\n target.download = graphName + \".png\";\n target.href = image;\n }\n else {\n document.location.href = image;\n }\n \n}", "title": "" }, { "docid": "8139176089121931dd26f0e986bdeac2", "score": "0.60645527", "text": "function exportToPNG(graphName, target) {\n var plot = $(\"#\"+graphName).data('plot');\n var flotCanvas = plot.getCanvas();\n var image = flotCanvas.toDataURL();\n image = image.replace(\"image/png\", \"image/octet-stream\");\n \n var downloadAttrSupported = (\"download\" in document.createElement(\"a\"));\n if(downloadAttrSupported === true) {\n target.download = graphName + \".png\";\n target.href = image;\n }\n else {\n document.location.href = image;\n }\n \n}", "title": "" }, { "docid": "8139176089121931dd26f0e986bdeac2", "score": "0.60645527", "text": "function exportToPNG(graphName, target) {\n var plot = $(\"#\"+graphName).data('plot');\n var flotCanvas = plot.getCanvas();\n var image = flotCanvas.toDataURL();\n image = image.replace(\"image/png\", \"image/octet-stream\");\n \n var downloadAttrSupported = (\"download\" in document.createElement(\"a\"));\n if(downloadAttrSupported === true) {\n target.download = graphName + \".png\";\n target.href = image;\n }\n else {\n document.location.href = image;\n }\n \n}", "title": "" }, { "docid": "8139176089121931dd26f0e986bdeac2", "score": "0.60645527", "text": "function exportToPNG(graphName, target) {\n var plot = $(\"#\"+graphName).data('plot');\n var flotCanvas = plot.getCanvas();\n var image = flotCanvas.toDataURL();\n image = image.replace(\"image/png\", \"image/octet-stream\");\n \n var downloadAttrSupported = (\"download\" in document.createElement(\"a\"));\n if(downloadAttrSupported === true) {\n target.download = graphName + \".png\";\n target.href = image;\n }\n else {\n document.location.href = image;\n }\n \n}", "title": "" }, { "docid": "8139176089121931dd26f0e986bdeac2", "score": "0.60645527", "text": "function exportToPNG(graphName, target) {\n var plot = $(\"#\"+graphName).data('plot');\n var flotCanvas = plot.getCanvas();\n var image = flotCanvas.toDataURL();\n image = image.replace(\"image/png\", \"image/octet-stream\");\n \n var downloadAttrSupported = (\"download\" in document.createElement(\"a\"));\n if(downloadAttrSupported === true) {\n target.download = graphName + \".png\";\n target.href = image;\n }\n else {\n document.location.href = image;\n }\n \n}", "title": "" }, { "docid": "8139176089121931dd26f0e986bdeac2", "score": "0.60645527", "text": "function exportToPNG(graphName, target) {\n var plot = $(\"#\"+graphName).data('plot');\n var flotCanvas = plot.getCanvas();\n var image = flotCanvas.toDataURL();\n image = image.replace(\"image/png\", \"image/octet-stream\");\n \n var downloadAttrSupported = (\"download\" in document.createElement(\"a\"));\n if(downloadAttrSupported === true) {\n target.download = graphName + \".png\";\n target.href = image;\n }\n else {\n document.location.href = image;\n }\n \n}", "title": "" }, { "docid": "8139176089121931dd26f0e986bdeac2", "score": "0.60645527", "text": "function exportToPNG(graphName, target) {\n var plot = $(\"#\"+graphName).data('plot');\n var flotCanvas = plot.getCanvas();\n var image = flotCanvas.toDataURL();\n image = image.replace(\"image/png\", \"image/octet-stream\");\n \n var downloadAttrSupported = (\"download\" in document.createElement(\"a\"));\n if(downloadAttrSupported === true) {\n target.download = graphName + \".png\";\n target.href = image;\n }\n else {\n document.location.href = image;\n }\n \n}", "title": "" }, { "docid": "8139176089121931dd26f0e986bdeac2", "score": "0.60645527", "text": "function exportToPNG(graphName, target) {\n var plot = $(\"#\"+graphName).data('plot');\n var flotCanvas = plot.getCanvas();\n var image = flotCanvas.toDataURL();\n image = image.replace(\"image/png\", \"image/octet-stream\");\n \n var downloadAttrSupported = (\"download\" in document.createElement(\"a\"));\n if(downloadAttrSupported === true) {\n target.download = graphName + \".png\";\n target.href = image;\n }\n else {\n document.location.href = image;\n }\n \n}", "title": "" }, { "docid": "8139176089121931dd26f0e986bdeac2", "score": "0.60645527", "text": "function exportToPNG(graphName, target) {\n var plot = $(\"#\"+graphName).data('plot');\n var flotCanvas = plot.getCanvas();\n var image = flotCanvas.toDataURL();\n image = image.replace(\"image/png\", \"image/octet-stream\");\n \n var downloadAttrSupported = (\"download\" in document.createElement(\"a\"));\n if(downloadAttrSupported === true) {\n target.download = graphName + \".png\";\n target.href = image;\n }\n else {\n document.location.href = image;\n }\n \n}", "title": "" }, { "docid": "8139176089121931dd26f0e986bdeac2", "score": "0.60645527", "text": "function exportToPNG(graphName, target) {\n var plot = $(\"#\"+graphName).data('plot');\n var flotCanvas = plot.getCanvas();\n var image = flotCanvas.toDataURL();\n image = image.replace(\"image/png\", \"image/octet-stream\");\n \n var downloadAttrSupported = (\"download\" in document.createElement(\"a\"));\n if(downloadAttrSupported === true) {\n target.download = graphName + \".png\";\n target.href = image;\n }\n else {\n document.location.href = image;\n }\n \n}", "title": "" }, { "docid": "8139176089121931dd26f0e986bdeac2", "score": "0.60645527", "text": "function exportToPNG(graphName, target) {\n var plot = $(\"#\"+graphName).data('plot');\n var flotCanvas = plot.getCanvas();\n var image = flotCanvas.toDataURL();\n image = image.replace(\"image/png\", \"image/octet-stream\");\n \n var downloadAttrSupported = (\"download\" in document.createElement(\"a\"));\n if(downloadAttrSupported === true) {\n target.download = graphName + \".png\";\n target.href = image;\n }\n else {\n document.location.href = image;\n }\n \n}", "title": "" } ]
b1a0f38fa4fdc351e0332af90695e881
sets loading progressbar progress or hides it
[ { "docid": "fba299ef9a95dddc7af64741e66ae61b", "score": "0.7172986", "text": "function setLoading(progress) {\n \"use strict\";\n var loading = document.getElementById('loading');\n if (loading.MaterialProgress !== undefined) {\n if (progress === -1 || progress > 100) {\n loading.style.height = '0px';\n loading.MaterialProgress.setProgress(0);\n } else {\n loading.style.height = '4px';\n loading.MaterialProgress.setProgress(progress);\n }\n } else {\n loading.style.height = '0px';\n }\n}", "title": "" } ]
[ { "docid": "1ebf62922adfbbf626d5a562445ea7d8", "score": "0.7786244", "text": "loading (evt) {\r\n var progbar = document.getElementById(\"progressBar\");\r\n var perctext = document.getElementById(\"percentText\");\r\n progressBar.hidden= false;\r\n progressBackground.hidden = false;\r\n ldBg.hidden = false;\r\n progbar.style.width = this.preload.progress * 100 + '%';\r\n perctext.innerHTML = (Math.floor(this.preload.progress * 100)).toString() + '%';\r\n if(this.preload.progress * 100 >= 100)\r\n {\r\n progressBar.hidden = true;\r\n progressBackground.hidden = true;\r\n ldBg.hidden = true;\r\n }\r\n }", "title": "" }, { "docid": "31f955d83afe73da936f89afe149cf2e", "score": "0.7565181", "text": "function setUpLoaderProgresBar() {\n const loadingBox = document.getElementById('loading-box');\n const progressBar = document.getElementById('progress-bar');\n\n loader.onProgress.add(() => {\n progressBar.style.width = `${loader.progress}%`;\n });\n loader.onComplete.add(() => {\n if (!loadingBox.classList.contains('hidden')) {\n loadingBox.classList.add('hidden');\n }\n });\n}", "title": "" }, { "docid": "282773cd40abc9098dc0ad637ee53764", "score": "0.74922085", "text": "function initialiseLoadBar() {\n $(\"#progressBar\").progressbar({\n value: 0,\n create: function(event, ui) {\n $(\"#map3d\").hide();\n $(\"#sideBar\").hide();\n $(\"#sideBarToggle\").hide();\n }\n });\n }", "title": "" }, { "docid": "b5bf2535986026cbd928d7c58ada6389", "score": "0.7401851", "text": "function OnSuccess() {\n clearTimeout(loadTimer);\n $(\"#progress_bar\").addClass(\"hidden\");\n}", "title": "" }, { "docid": "63099528f62b5e5823159d9c15d15135", "score": "0.71863544", "text": "showProgressBar() {\n if (this.progressBar_ || this.showProcessingTimeout_) {\n return;\n }\n this.showProcessingTimeout_ = window.setTimeout(() => {\n this.disposeCurrentComponent_();\n this.progressBar_ = new Spinner();\n this.currentComponent_ = this.progressBar_;\n this.progressBar_.render(this.container_);\n this.showProcessingTimeout_ = null;\n }, SHOW_PROCESSING_DELAY);\n }", "title": "" }, { "docid": "8c59d6670512f31f8ffb57c14fed9634", "score": "0.70688945", "text": "function displayLoadingState() {\n LEXUS.loadingAnimation.start();\n\n hideDrillDown();\n $(\"#resultsLoader\").addClass(\"show\");\n\n $(\".trim-selector-drawer\").hide();\n $(\".dimmer\").unbind(\"click\").addClass(\"on\").css({\n opacity: 0.6\n });\n }", "title": "" }, { "docid": "46a6e9cc794a7bdc9410a3c966e77e7f", "score": "0.7063164", "text": "function showloading() {\n\t$(\"#dvloading\").css(\"display\", \"block\");\n}", "title": "" }, { "docid": "eda0ea613b11950b98feea99828412b2", "score": "0.70433575", "text": "function load() {\n g.loadingBar();\n}", "title": "" }, { "docid": "bd106485b32cd2023ce9f4444f617647", "score": "0.70420283", "text": "function handleProgress() {\n\t$('#mainLoader').html(Math.round(loader.progress/1*100)+'%');\n}", "title": "" }, { "docid": "3446135c275949829828a9e3c0ee82eb", "score": "0.70324457", "text": "_setLoadingIndicatorVisibility() {\r\n const that = this;\r\n\r\n if ( that.appearance.displayLoadingIndicator ) {\r\n that.$.loadingIndicatorContainer.classList.remove( 'lw-visibility-hidden' );\r\n return;\r\n }\r\n\r\n that.$.loadingIndicatorContainer.classList.add( 'lw-visibility-hidden' );\r\n }", "title": "" }, { "docid": "772f3c2abd6c611ab7275489acc8ac2c", "score": "0.70094305", "text": "function hideLoadingView() {\n\t//selecting progress bar and emptying it out before calling fill table\\reset\n\tlet $progressDiv = $('#progress');\n\t$progressDiv.empty();\n\tfillTable();\n}", "title": "" }, { "docid": "d2aadd15d25c4a3512214b7d7a8d07a3", "score": "0.698418", "text": "function loadingProgressBar() {\n var elem = document.getElementById(\"bar\");\n var width = 1;\n var id = setInterval(frame, 1);\n\n function frame() {\n if (width >= 100) {\n clearInterval(id);\n // Hide the progress bar when the app is loaded.\n setTimeout(function(){document.getElementById(\"progress\").style.display = \"none\";}, 3000)\n } else {\n width = percentLoaded;\n elem.style.width = width + '%';\n }\n }\n}", "title": "" }, { "docid": "774e9a53d77d59989f917ebf74a085ed", "score": "0.69812226", "text": "function loading(){\n\tdocument.getElementById(\"loading\").style.visibility = \"hidden\";\n}", "title": "" }, { "docid": "13f077ff95197c1ba784b543078fde67", "score": "0.6978598", "text": "function load() {\n\tg.loadingBar();\n}", "title": "" }, { "docid": "13f077ff95197c1ba784b543078fde67", "score": "0.6978598", "text": "function load() {\n\tg.loadingBar();\n}", "title": "" }, { "docid": "edc45a68437c37db46a67d73fd5d8582", "score": "0.69137675", "text": "hideProgressBar() {}", "title": "" }, { "docid": "3921d188deaca91abd21cb25876fd99b", "score": "0.6875004", "text": "function showLoading() {\n $('.loading').css({\n visibility: 'visible'\n })\n}", "title": "" }, { "docid": "1488d2d2432f835c66175ae64a57400c", "score": "0.6872384", "text": "function startLoading(){\n var states = \" . .. ... .... .....\".split(\" \");\n\n loading_bar_time_id = setInterval(function loading(){\n var old_state = states.shift();\n states.push(old_state);\n $('#progress').html(old_state);\n return loading;\n }(), 250);\n\n $('#overlay, #loading').show();\n }", "title": "" }, { "docid": "680f86c9e79f370f204e65e2611a3ca4", "score": "0.6852895", "text": "function updateProgress() {\n loadProgress = assets.progress;\n loadingBar.scaleX = loadProgress * 500;\n stage.update();\n}", "title": "" }, { "docid": "4b54437ea6ba150a0dd94928fddd5f6a", "score": "0.68485904", "text": "function _set(n) {\n\t if (!started) {\n\t return;\n\t }\n\t var pct = (n * 100) + '%';\n\t loadingBar.css('width', pct);\n\t status = n;\n\t\n\t // increment loadingbar to give the illusion that there is always\n\t // progress but make sure to cancel the previous timeouts so we don't\n\t // have multiple incs running at the same time.\n\t if (autoIncrement) {\n\t $timeout.cancel(incTimeout);\n\t incTimeout = $timeout(function() {\n\t _inc();\n\t }, 250);\n\t }\n\t }", "title": "" }, { "docid": "4b54437ea6ba150a0dd94928fddd5f6a", "score": "0.68485904", "text": "function _set(n) {\n\t if (!started) {\n\t return;\n\t }\n\t var pct = (n * 100) + '%';\n\t loadingBar.css('width', pct);\n\t status = n;\n\t\n\t // increment loadingbar to give the illusion that there is always\n\t // progress but make sure to cancel the previous timeouts so we don't\n\t // have multiple incs running at the same time.\n\t if (autoIncrement) {\n\t $timeout.cancel(incTimeout);\n\t incTimeout = $timeout(function() {\n\t _inc();\n\t }, 250);\n\t }\n\t }", "title": "" }, { "docid": "5c14836cf1076005008853e46ce14325", "score": "0.6836083", "text": "function loadingDone(){\n $('#loading-status').hide();\n}", "title": "" }, { "docid": "44b85a44647377a6dd8233bcc89a05c2", "score": "0.6820282", "text": "function seemyLoading(){ \n document.getElementById(\"spinner\").style.visibility = \"visible\";\n }", "title": "" }, { "docid": "da618359c0ae193298c06c01d08dc4c3", "score": "0.68152094", "text": "showProgressBar() {}", "title": "" }, { "docid": "216215f07aaeb4ce86b40d030797eef2", "score": "0.68145025", "text": "function showLoadingSpinner(){\n loader.hidden = false;\n quoteContainer.hidden = true;\n}", "title": "" }, { "docid": "b52436b13b797d839705065c6995a238", "score": "0.6811645", "text": "function initLoadingProgress(el, pbclass) {\r\n\r\n let pBarHtml = '<div class=\"' + pbclass + ' progress-bar-striped progress-bar-animated\" style=\"width:5%\"></div>';\r\n el.html(pBarHtml);\r\n\r\n let pBarIntervalId = setInterval(function() {\r\n let v = parseInt(el.find(\".\" + pbclass).attr(\"width\").split(\"%\")[0]);\r\n el.find(\".\" + pbclass).attr(\"width\", (v + 0.5) + \"%\");\r\n }, 200);\r\n\r\n //save the interval id\r\n el.find(\".\" + pbclass).data(\"intervalId\", pBarIntervalId);\r\n }", "title": "" }, { "docid": "0dc79ef2738d1748dfe6e8cc338e8530", "score": "0.6807948", "text": "function _set(n) {\n\t if (!started) {\n\t return;\n\t }\n\t var pct = (n * 100) + '%';\n\t loadingBar.css('width', pct);\n\t status = n;\n\n\t // increment loadingbar to give the illusion that there is always\n\t // progress but make sure to cancel the previous timeouts so we don't\n\t // have multiple incs running at the same time.\n\t if (autoIncrement) {\n\t $timeout.cancel(incTimeout);\n\t incTimeout = $timeout(function() {\n\t _inc();\n\t }, 250);\n\t }\n\t }", "title": "" }, { "docid": "0dc79ef2738d1748dfe6e8cc338e8530", "score": "0.6807948", "text": "function _set(n) {\n\t if (!started) {\n\t return;\n\t }\n\t var pct = (n * 100) + '%';\n\t loadingBar.css('width', pct);\n\t status = n;\n\n\t // increment loadingbar to give the illusion that there is always\n\t // progress but make sure to cancel the previous timeouts so we don't\n\t // have multiple incs running at the same time.\n\t if (autoIncrement) {\n\t $timeout.cancel(incTimeout);\n\t incTimeout = $timeout(function() {\n\t _inc();\n\t }, 250);\n\t }\n\t }", "title": "" }, { "docid": "5f6b93c32355a855b677bb4208c68fd8", "score": "0.68031687", "text": "function showLoading() {\n // remove existing loaders\n $('.loading-container').remove();\n $('<div id=\"orrsLoader\" class=\"loading-container\"><div><div class=\"mdl-spinner mdl-js-spinner is-active\"></div></div></div>').appendTo(\"body\");\n\n componentHandler.upgradeElements($('.mdl-spinner').get());\n setTimeout(function () {\n $('#orrsLoader').css({ opacity: 1 });\n }, 1);\n}", "title": "" }, { "docid": "2adfb57dd2166f5768c91fc163d54801", "score": "0.68031627", "text": "function loadProgress(){ \r\n var atribuicao = \"div#loading span\";\r\n var loadRet = setInterval(function(){$(atribuicao).append('.');}, 2000);\r\n var cor = setInterval(function(){$(\"div#loading\").css('color','#777');}, 2000);\r\n setInterval(function(){\r\n clearInterval(loadRet);\r\n clearInterval(cor);\r\n $(atribuicao).html('')\r\n $(\"div#loading\").css('color','#000');\r\n }, 4000);\r\n }", "title": "" }, { "docid": "fe6e1b7c96495b1eb5ce930732fa612f", "score": "0.67877877", "text": "function handleProgress() {\n\t$('#mainLoader span').html(Math.round(loader.progress/1*100)+'%');\n}", "title": "" }, { "docid": "b098f3aa2dda7726e297a2e9a260d313", "score": "0.67767495", "text": "function setProgressBar() {\n $('.steps_done').text(((currentPage - 1) / bonusSteps.length) * 100);\n $('#modal-calculate .progress-bar').css('width', ((currentPage - 1) / bonusSteps.length) * 100 + '%');\n $('.discount__value').text(((currentPage - 1) / bonusSteps.length) * 25);\n }", "title": "" }, { "docid": "0b4027c269000148b268d5f83f018b4c", "score": "0.67733157", "text": "function loadingFunction() {\n var x = document.getElementById(\"loadingDiv\");\n if (x.style.display === \"none\") {\n x.style.display = \"block\";\n }\n }", "title": "" }, { "docid": "1e36af3e635e18e57dd8712fcb2f83f6", "score": "0.67694813", "text": "function _set(n) {\n if (!started) {\n return;\n }\n var pct = (n * 100) + '%';\n loadingBar.css('width', pct);\n status = n;\n\n // increment loadingbar to give the illusion that there is always\n // progress but make sure to cancel the previous timeouts so we don't\n // have multiple incs running at the same time.\n $timeout.cancel(incTimeout);\n incTimeout = $timeout(function() {\n _inc();\n }, 250);\n }", "title": "" }, { "docid": "1e36af3e635e18e57dd8712fcb2f83f6", "score": "0.67694813", "text": "function _set(n) {\n if (!started) {\n return;\n }\n var pct = (n * 100) + '%';\n loadingBar.css('width', pct);\n status = n;\n\n // increment loadingbar to give the illusion that there is always\n // progress but make sure to cancel the previous timeouts so we don't\n // have multiple incs running at the same time.\n $timeout.cancel(incTimeout);\n incTimeout = $timeout(function() {\n _inc();\n }, 250);\n }", "title": "" }, { "docid": "1e36af3e635e18e57dd8712fcb2f83f6", "score": "0.67694813", "text": "function _set(n) {\n if (!started) {\n return;\n }\n var pct = (n * 100) + '%';\n loadingBar.css('width', pct);\n status = n;\n\n // increment loadingbar to give the illusion that there is always\n // progress but make sure to cancel the previous timeouts so we don't\n // have multiple incs running at the same time.\n $timeout.cancel(incTimeout);\n incTimeout = $timeout(function() {\n _inc();\n }, 250);\n }", "title": "" }, { "docid": "a9ccfd77620685b106adaf74d9d2f940", "score": "0.67618877", "text": "function loader() {\n\n var progress = document.getElementById(\"progbar\");\n\n progress.style.display = \"block\";\n\n var width = 10;\n var id = setInterval(frame, 1);\n\n function frame() {\n if (width >= 100) {\n clearInterval(id);\n progress.style.width = 0;\n } else {\n width++;\n progress.style.width = width + '%';\n }\n }\n\n}", "title": "" }, { "docid": "db64ee8864faa3767ac364fc47bdfaf1", "score": "0.67521125", "text": "function showLoading() {\n loadingEl.style.display = 'block';\n}", "title": "" }, { "docid": "84cf0d90cee5fd36dc7f981074f49d11", "score": "0.6744891", "text": "function _set(n) {\n if (!started) {\n return;\n }\n var pct = (n * 100) + '%';\n loadingBar.css('width', pct);\n status = n;\n\n // increment loadingbar to give the illusion that there is always\n // progress but make sure to cancel the previous timeouts so we don't\n // have multiple incs running at the same time.\n if (autoIncrement) {\n $timeout.cancel(incTimeout);\n incTimeout = $timeout(function() {\n _inc();\n }, 250);\n }\n }", "title": "" }, { "docid": "84cf0d90cee5fd36dc7f981074f49d11", "score": "0.6744891", "text": "function _set(n) {\n if (!started) {\n return;\n }\n var pct = (n * 100) + '%';\n loadingBar.css('width', pct);\n status = n;\n\n // increment loadingbar to give the illusion that there is always\n // progress but make sure to cancel the previous timeouts so we don't\n // have multiple incs running at the same time.\n if (autoIncrement) {\n $timeout.cancel(incTimeout);\n incTimeout = $timeout(function() {\n _inc();\n }, 250);\n }\n }", "title": "" }, { "docid": "5b17808fed21b7fad7ed9db949404f45", "score": "0.67389715", "text": "function handleProgress() {\n $('#mainLoader span').html(Math.round(loader.progress / 1 * 100) + '%');\n}", "title": "" }, { "docid": "21f4fdf31ccfb267c746240617dd345c", "score": "0.67305857", "text": "function _set(n) {\n if (!started) {\n return;\n }\n var pct = (n * 100) + '%';\n loadingBar.css('width', pct);\n status = n;\n\n // increment loadingbar to give the illusion that there is always\n // progress but make sure to cancel the previous timeouts so we don't\n // have multiple incs running at the same time.\n if (autoIncrement) {\n $timeout.cancel(incTimeout);\n incTimeout = $timeout(function() {\n _inc();\n }, 200);\n }\n }", "title": "" }, { "docid": "580cea7bc427d15f18cb7e35b9a2874d", "score": "0.6717029", "text": "function showLoadingProgress(el, pbclass, pct) {\r\n\r\n el.find(\".\" + pbclass).attr(\"width\", pct + \"%\");\r\n }", "title": "" }, { "docid": "462f86450ac94d3a71f94e198b9e2937", "score": "0.67107993", "text": "function showProgress() {\n progressBar.removeClass(\"force-collapse\");\n }", "title": "" }, { "docid": "6a8875689a177985e3d7fa032f588d27", "score": "0.67068154", "text": "function incrementLoadingProgress() {\n ++loadCount;\n document.getElementById('loading-percent').innerHTML = (loadCount * 100 / loadTotal).toFixed(0);\n document.getElementById('loading-bar-fill').style.width = (loadCount * 100 / loadTotal).toFixed(0) + '%';\n\n if (loadCount == loadTotal) {\n window.setTimeout(onLoadFinish, 500, false);\n }\n}", "title": "" }, { "docid": "a54f3418dbc63f26f6a96f4e732dddb8", "score": "0.6699162", "text": "function loading(){\n loader.hidden = false;\n quoteContainer.hidden = true;\n}", "title": "" }, { "docid": "b7a7877d6edb2f97ab8aba93be1d41c1", "score": "0.6691978", "text": "function showLoadingOverlay() {\n toggleHidden(getLoadingOverlay(), false);\n }", "title": "" }, { "docid": "ee8cada06c28590ac16eaec64d95ee15", "score": "0.6689308", "text": "function showLoader() {\n $(\"#loading-gif\").show();\n }", "title": "" }, { "docid": "5cf667ad57a052d25285d76f07dd659d", "score": "0.66891307", "text": "function loading()\r\n{\r\n\t$(\"#loading\").show('fast');\r\n\tdocument.body.style.cursor = 'wait';\r\n}", "title": "" }, { "docid": "a69aeb7a4cd530a92411aeec0080f92d", "score": "0.66888016", "text": "function ShowGlobalLoader() {\n // $('.preloader').fadeIn(600);\n NProgress.start();\n}", "title": "" }, { "docid": "1d8d01dda1fd18b5999a0d0a51c3c32c", "score": "0.66849524", "text": "function spinnerOn() {\n $(\".loader\").css(\"visibility\", \"visible\");\n $(\"body\").css(\"overflow-y\", \"hidden\");\n}", "title": "" }, { "docid": "7e5f1a5b8d864215b175f1e79b4e7dd2", "score": "0.66778094", "text": "function completeFunction() {\n var x = document.getElementById(\"loadingDiv\");\n if (x.style.display !== \"none\") {\n x.style.display = \"none\";\n }\n }", "title": "" }, { "docid": "0e4538a1686f00a2943f22f954f9642f", "score": "0.6665499", "text": "function setProgress(prog) {\n if((prog > 100) || (prog < 0)) {\n return;\n }\n\n document.getElementById(\"prog-bar\").style.width = prog + \"%\";\n}", "title": "" }, { "docid": "4a0512278c47b3e31d0a6b4dfc3b4c0e", "score": "0.6660911", "text": "function showLoadingView() {\n\tconst $col = $('#tableLocation');\n\t$col.empty();\n\t//selecting progress bar div I created\n\tlet $progressDiv = $('#progress');\n\tlet $progressBar = $(\n\t\t`<div class=\"container progress-bar progress-bar-striped bg-success progress-bar-animated\" id=\"myProgress\">LOADING!<div id=\"myBar\"></div></div>`\n\t);\n\t//appending progress bar to the progress div\n\t$progressDiv.append($progressBar);\n\tsetTimeout(hideLoadingView, 1000);\n\tcategories = [];\n}", "title": "" }, { "docid": "2b9d8d9032080b94eebbdccff46d8cf5", "score": "0.6641127", "text": "showLoadingOverlay() {\n toggleHidden(this.loadingOverlay, false);\n }", "title": "" }, { "docid": "e20e5235bb4310ea5b72d3888ad4d643", "score": "0.66373533", "text": "function watchAsyncLoad() {\r\n if (opts.loadingAsync && !opts.isRemoved) {\r\n scope.$$loadingAsyncDone = false;\r\n scope.progressMode = 'indeterminate';\r\n\r\n $q.when(opts.loadingAsync)\r\n .then(function() {\r\n scope.$$loadingAsyncDone = true;\r\n scope.progressMode = '';\r\n delete opts.loadingAsync;\r\n }).then(function() {\r\n $$rAF(positionAndFocusMenu);\r\n });\r\n }\r\n }", "title": "" }, { "docid": "ec9757567dbd1a484cd75504248d2959", "score": "0.66358685", "text": "function showLoading() {\r\n\tdocument.querySelector(\"#upload-loader\").style.display = \"flex\";\r\n}", "title": "" }, { "docid": "7e3f586c936d577c80f0c1f722efa60d", "score": "0.6624799", "text": "showLoadingAnimation() {\n let elem = document.getElementById('LoadingProgressBarCount');\n\n if (!elem) {\n return;\n }\n\n if (elem.innerText.length >= 3) {\n elem.innerText = '';\n } else {\n elem.innerText += '.';\n }\n\n setTimeout(() => {\n if (this.loading) {\n this.showLoadingAnimation();\n }\n }, 800);\n }", "title": "" }, { "docid": "3fb4fa6f1ceb20c989686d58014455c5", "score": "0.66189635", "text": "function onloading_indicator(flag) {\n\t\t if(flag==true)\n\t\t\t {\n\t\t\t\tdocument.getElementById('busy_indicator').style.display='block';\n\t\t\t }\n\t\t else\n\t\t\t {\n\t\t\t\tdocument.getElementById('busy_indicator').style.display='none';\n\t\t\t }\n\t}", "title": "" }, { "docid": "49d08a134fb07c33201e31861236578b", "score": "0.6608432", "text": "function loading() {\n $(\"#loading\").show();\n}", "title": "" }, { "docid": "6f778d4225ef4bdf5369d6196eb52faf", "score": "0.6607721", "text": "function changeLoader() {\n $timeout(function () {\n $scope.appModel.isLoading = false;\n }, 3000);\n }", "title": "" }, { "docid": "f859bd0908b40d1c12454b8f9ecb238c", "score": "0.6605993", "text": "function d2tInitProgress() {\n $(\"#processer\").show();\n}", "title": "" }, { "docid": "0a91d4eeced79c3b2011c1a362a202d9", "score": "0.65978575", "text": "function setLoading(show, message) {\n if (message) console.log(message); \n document.getElementById(\"loading-msg\").innerHTML = message?message:\"\";\n if (show) document.getElementById(\"loading\").classList.add(\"shown\");\n else document.getElementById(\"loading\").classList.remove(\"shown\");\n document.body.style.cursor = show?\"wait\":\"default\";\n}", "title": "" }, { "docid": "f31189b592ab0b3216768c1567d8a12d", "score": "0.6597599", "text": "startLoader() {\n this.loading = true;\n if (this.button) {\n let buttonContent = this.button.html();\n if (buttonContent !== this.loadingContent) {\n this.originalLoadingContent = buttonContent;\n }\n this.button.html(this.loadingContent);\n this.button.prop('disabled', true);\n }\n }", "title": "" }, { "docid": "a29f502c7a23e00d0e2ccc7b9d926cdf", "score": "0.6594578", "text": "function handleProgress() {\n\t$('#mainLoader span').html(Math.round(loader.progress/1*100)+' Betöltés');\n}", "title": "" }, { "docid": "64a2f1873d1f76ce1b5477cddf02dc97", "score": "0.6594405", "text": "function showLoader() {\n $(\"#divLoadingMask\").show();\n //scrollTop();\n }", "title": "" }, { "docid": "4d4730604b91b6f87ed907c35fe7069d", "score": "0.6588765", "text": "function updatePreloader(perc) {\n\t\t\n\t\t// updates percentage text\t\t\n\t\tprogress.text(perc + '%');\n\t\t\n\t\t// if percentage equals 100, preloading has finished\n\t\tif(perc === 100) {\n\t\t\t\n\t\t\t// visual pause to show that preloading has finished\n\t\t\tsetTimeout(function() {\n\t\t\t\t\n\t\t\t\t// hide the preloader\n\t\t\t\tpreloader.addClass('cj-hide-preloader');\n\t\t\t\t\n\t\t\t\t// cleanup\n\t\t\t\tpreloader = progress = null;\n\t\t\t\t\n\t\t\t}, 500);\n\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "54a3f3eb21633f6238745512afb10821", "score": "0.6588283", "text": "function loading(isLoading, view) {\n if (isLoading) {\n $('.loading-wrp').show();\n } else {\n $('.loading-wrp').hide();\n }\n }", "title": "" }, { "docid": "54a3f3eb21633f6238745512afb10821", "score": "0.6588283", "text": "function loading(isLoading, view) {\n if (isLoading) {\n $('.loading-wrp').show();\n } else {\n $('.loading-wrp').hide();\n }\n }", "title": "" }, { "docid": "f2866e008fad715fcf9babe1d1d86a24", "score": "0.6587245", "text": "function setProgressbarEnabled(b) {\n if(progressbarEnabled) {\n if(b) {\n $('#progressback').show();\n $('.menu-wrap').css('top', $('#navigation').height() + \"px\");\n $('.section-overview').css('top', $('#nav-bar').outerHeight() + \"px\");\n $('.section-overview').css('height', \"calc(100% - \" + $('.section-overview').css(\"top\") + \")\");\n }\n else {\n $('#progressback').hide();\n $('.menu-wrap').css('top', $('#navigation').height() + \"px\");\n $('.section-overview').css('top', $('#nav-bar').outerHeight() + \"px\");\n $('.section-overview').css('height', \"calc(100% - \" + $('.section-overview').css(\"top\") + \")\");\n }\n }\n}", "title": "" }, { "docid": "ea582ec97d8b284629111b063b388d5e", "score": "0.6585612", "text": "_setLoadingIndicatorVisibility() {\n const that = this;\n\n if (that.displayLoadingIndicator) {\n that.$loadingIndicatorContainer.hasClass('jqx-visibility-hidden') ?\n that.$loadingIndicatorContainer.removeClass('jqx-visibility-hidden') : that.$loadingIndicatorContainer.removeClass('jqx-hidden');\n return;\n }\n\n //Check for old browsers.\n that._areCSSVarsSupported ?\n that.$loadingIndicatorContainer.addClass('jqx-hidden') : that.$loadingIndicatorContainer.addClass('jqx-visibility-hidden');\n }", "title": "" }, { "docid": "d4571f853d3ecd50f7cc0685705fdffa", "score": "0.6582966", "text": "function updateProgressBar() {\n if (progress < 100) {\n progress = progress += updateVal; //6 calls\n $rootScope.$broadcast('loading-bar-updated', progress, map);\n }\n }", "title": "" }, { "docid": "5ed63fe5741f72ad6984dfab2069a827", "score": "0.6571654", "text": "function hideLoadBar(){\r\n if(document.getElementById){\r\n document.getElementById('loading').style.display=\"none\";\r\n }\r\n}", "title": "" }, { "docid": "9420ae2fca8e481c49605d449b0d36b4", "score": "0.6568152", "text": "function watchAsyncLoad() {\n if (opts.loadingAsync && !opts.isRemoved) {\n scope.$$loadingAsyncDone = false;\n scope.progressMode = 'indeterminate';\n\n $q.when(opts.loadingAsync)\n .then(function() {\n scope.$$loadingAsyncDone = true;\n scope.progressMode = '';\n delete opts.loadingAsync;\n }).then(function() {\n $$rAF(positionAndFocusMenu);\n });\n }\n }", "title": "" }, { "docid": "9420ae2fca8e481c49605d449b0d36b4", "score": "0.6568152", "text": "function watchAsyncLoad() {\n if (opts.loadingAsync && !opts.isRemoved) {\n scope.$$loadingAsyncDone = false;\n scope.progressMode = 'indeterminate';\n\n $q.when(opts.loadingAsync)\n .then(function() {\n scope.$$loadingAsyncDone = true;\n scope.progressMode = '';\n delete opts.loadingAsync;\n }).then(function() {\n $$rAF(positionAndFocusMenu);\n });\n }\n }", "title": "" }, { "docid": "083a2a710f8d108f8f8b8384db3be92a", "score": "0.65648615", "text": "function triggerLoading() {\n let loadingState = document.getElementById(loadingId).style.display;\n document.getElementById(loadingId).style.display = loadingState === \"none\" ? \"inline-block\" : \"none\";\n}", "title": "" }, { "docid": "b42466654d71d547cf213642b59b0da1", "score": "0.6562268", "text": "function setComplete() {\n\t $timeout.cancel(startTimeout);\n\t cfpLoadingBar.complete();\n\t reqsCompleted = 0;\n\t reqsTotal = 0;\n\t }", "title": "" }, { "docid": "b42466654d71d547cf213642b59b0da1", "score": "0.6562268", "text": "function setComplete() {\n\t $timeout.cancel(startTimeout);\n\t cfpLoadingBar.complete();\n\t reqsCompleted = 0;\n\t reqsTotal = 0;\n\t }", "title": "" }, { "docid": "b42466654d71d547cf213642b59b0da1", "score": "0.6562268", "text": "function setComplete() {\n\t $timeout.cancel(startTimeout);\n\t cfpLoadingBar.complete();\n\t reqsCompleted = 0;\n\t reqsTotal = 0;\n\t }", "title": "" }, { "docid": "b42466654d71d547cf213642b59b0da1", "score": "0.6562268", "text": "function setComplete() {\n\t $timeout.cancel(startTimeout);\n\t cfpLoadingBar.complete();\n\t reqsCompleted = 0;\n\t reqsTotal = 0;\n\t }", "title": "" }, { "docid": "5f1a137c5588e57890aefccce26fa7a3", "score": "0.6561673", "text": "function showProgressBar() {\n if (!$('#progbarId').is(\":visible\")) {\n $('#progbarId').show();\n }\n}", "title": "" }, { "docid": "e14c3b435f6ecdb3d65a8fb5899f96bf", "score": "0.6546269", "text": "async showSpinner() {\n this.isLoading = true;\n }", "title": "" }, { "docid": "f228c31392eb89a5faa280883a43de49", "score": "0.6545367", "text": "function showLoading()\n{\n\tdocument.getElementById(\"loadingImage\").style.visibility = \"visible\";\n\tdocument.getElementById(\"synchBtn\").disabled = true;\n}", "title": "" }, { "docid": "4fd914e121d21f511ad0587b27cb19d6", "score": "0.653836", "text": "function MostrarDivCargando(data) {\n $('#loading').css(\"display\", \"block\");\n}", "title": "" }, { "docid": "ccec934402445ca13281d6478fce6888", "score": "0.6535459", "text": "function updateLoadingBar() {\n var progress = document.getElementById(\"progress-filled\");\n var percentageDone = 100 * (originalLength-questionsToDo.length) / originalLength;\n progress.style.width = percentageDone + \"%\";\n}", "title": "" }, { "docid": "ba8efbfca9452e1a07287519d88d6974", "score": "0.6529219", "text": "function watchAsyncLoad() {\n if (opts.loadingAsync && !opts.isRemoved) {\n scope.$$loadingAsyncDone = false;\n scope.progressMode = 'indeterminate';\n\n $q.when(opts.loadingAsync)\n .then(function() {\n scope.$$loadingAsyncDone = true;\n scope.progressMode = '';\n delete opts.loadingAsync;\n }).then(function() {\n $$rAF(positionAndFocusMenu);\n });\n }\n }", "title": "" }, { "docid": "d628597fa46c12908ea21c4068748261", "score": "0.6525975", "text": "function loading(status) {\n if (status == true) {\n $(\".loading\").removeClass(\"hidden\");\n $(\".content\").addClass(\"hidden\");\n }\n else if (status == false) {\n $(\".loading\").addClass(\"hidden\");\n $(\".content\").removeClass(\"hidden\");\n }\n }", "title": "" }, { "docid": "dc140fd73ebdb750a02f45445af28c33", "score": "0.6514967", "text": "function resetLoader() {\n setTimeout(function() {\n updatePercentage(0);\n }, 2000);\n }", "title": "" }, { "docid": "a2dcda191eff6440516c41c68dac402c", "score": "0.6513667", "text": "function showloading() {\r\n //$(\".loader-fadeout\").css(\"visibility\", \"visible\");\r\n //$(\".loader-fadeout\").css(\"opacity\", \"0.8\");\r\n $(\"#loading\").show();\r\n}", "title": "" }, { "docid": "d2c0180172e24c4e43c7dab897f2b6e2", "score": "0.65098995", "text": "function showLoader() {\n $(\"loader\").style.display = \"block\";\n}", "title": "" }, { "docid": "35ab3338b352ab19bc8d9fede080adaa", "score": "0.65070915", "text": "function doStartLoading(){\n\tdocument.body.style.cursor = \"wait\";\n\t// objViewer.className = \"visHide\";\n\tif(document.getElementById(\"loadingMessage\")!=null)\n\t\tdocument.getElementById(\"loadingMessage\").className = \"visShow\";\n\tif(document.getElementById(\"instructionText\")!=null)\n\t\tdocument.getElementById(\"instructionText\").className = \"visHide\";\n\tvar temp_warning_obj = document.getElementById(\"warningMessage\");\n\tif(temp_warning_obj!=null)\n\t\ttemp_warning_obj.className = \"visHide\";\n}", "title": "" }, { "docid": "b1bca564d175c3aabc6f9db8daedfaa0", "score": "0.65039706", "text": "function loading() {\n Load.style.display = 'flex'; \n Load.visibility = 'visible'; \n setTimeout(() => {\n Load.style.display = 'none'; \n }, 400);\n}", "title": "" }, { "docid": "2ba4a4b2e746203859252d734294bb6e", "score": "0.64909554", "text": "function OnProgress(evt) {\n if (evt.lengthComputable) {\n var percent = parseInt( (evt.loaded / evt.total * 100), 10);\n if (!loadTimer_called) {\n loadTimer = setTimeout(function() {\n if (percent < 80)\n $(\"#progress_bar\").removeClass(\"hidden\");\n }, loadTimeout);\n loadTimer_called = true;\n }\n $(\"#progress\").width(percent + \"%\");\n }\n else {\n console.log(\"Length not computable.\");\n }\n}", "title": "" }, { "docid": "b85afec8621cb45e470fcc69d6ab3f7a", "score": "0.64893377", "text": "function setComplete() {\n $timeout.cancel(startTimeout);\n cfpLoadingBar.complete();\n reqsCompleted = 0;\n reqsTotal = 0;\n }", "title": "" }, { "docid": "b85afec8621cb45e470fcc69d6ab3f7a", "score": "0.64893377", "text": "function setComplete() {\n $timeout.cancel(startTimeout);\n cfpLoadingBar.complete();\n reqsCompleted = 0;\n reqsTotal = 0;\n }", "title": "" }, { "docid": "b85afec8621cb45e470fcc69d6ab3f7a", "score": "0.64893377", "text": "function setComplete() {\n $timeout.cancel(startTimeout);\n cfpLoadingBar.complete();\n reqsCompleted = 0;\n reqsTotal = 0;\n }", "title": "" }, { "docid": "b85afec8621cb45e470fcc69d6ab3f7a", "score": "0.64893377", "text": "function setComplete() {\n $timeout.cancel(startTimeout);\n cfpLoadingBar.complete();\n reqsCompleted = 0;\n reqsTotal = 0;\n }", "title": "" }, { "docid": "b85afec8621cb45e470fcc69d6ab3f7a", "score": "0.64893377", "text": "function setComplete() {\n $timeout.cancel(startTimeout);\n cfpLoadingBar.complete();\n reqsCompleted = 0;\n reqsTotal = 0;\n }", "title": "" }, { "docid": "b85afec8621cb45e470fcc69d6ab3f7a", "score": "0.64893377", "text": "function setComplete() {\n $timeout.cancel(startTimeout);\n cfpLoadingBar.complete();\n reqsCompleted = 0;\n reqsTotal = 0;\n }", "title": "" }, { "docid": "98409d825b6a991d54f41bae68262ae1", "score": "0.64808553", "text": "function showProgressBar() {\n\t$(\"#progressBar\").progressbar(\"value\", 0);\n\tvar width, height;\n\tif (map) {\n\t\theight = map.getSize().h;\n\t\twidth = map.getSize().w;\n\t} else {\n\t\theight = document.body.clientHeight;\n\t\twidth = document.body.clientWidth;\n\t}\n\t$(\"#progressBar\").css(\"top\", (height / 2 - (height * 0.05)) + 'px');\n\t$(\"#progressBar\").css(\"left\", (width / 2 - (width * 0.05)) + 'px');\n\t$(\"#progressBar\").css(\"visibility\", \"visible\");\n}", "title": "" } ]
d8e993b5cbd9b4a2d2a55c31f5f3431d
Resetting the object's ID property
[ { "docid": "6a4a964473cc5e555ec73ce65fac374e", "score": "0.0", "text": "function applyID() {\n for (i = 0; i < myLibrary.length; i++) {\n myLibrary[i].bookID = i;\n }\n}", "title": "" } ]
[ { "docid": "2f22059a8a5d3afdfa0855fd8d713fcf", "score": "0.74124146", "text": "reset() {\n this.ids.clear()\n }", "title": "" }, { "docid": "37c1acf37d2c028c2cec35bd0390832f", "score": "0.72321385", "text": "set ID(value) {\n this.__id = value;\n }", "title": "" }, { "docid": "b5f637dd584e905a48ed6cbd766c725f", "score": "0.7224973", "text": "clear(){\n this.id = '';\n }", "title": "" }, { "docid": "a3bdcb6cfe656fbfe7d1d2694d6a93f2", "score": "0.72017235", "text": "function resetIdCounter() {\n idCounter = 0;\n}", "title": "" }, { "docid": "a3bdcb6cfe656fbfe7d1d2694d6a93f2", "score": "0.72017235", "text": "function resetIdCounter() {\n idCounter = 0;\n}", "title": "" }, { "docid": "a3bdcb6cfe656fbfe7d1d2694d6a93f2", "score": "0.72017235", "text": "function resetIdCounter() {\n idCounter = 0;\n}", "title": "" }, { "docid": "a3bdcb6cfe656fbfe7d1d2694d6a93f2", "score": "0.72017235", "text": "function resetIdCounter() {\n idCounter = 0;\n}", "title": "" }, { "docid": "be3202e9efd3e2570d9933803abbd206", "score": "0.7137866", "text": "function resetLastId() {\n\t lastId = 0;\n\t}", "title": "" }, { "docid": "be3202e9efd3e2570d9933803abbd206", "score": "0.7137866", "text": "function resetLastId() {\n\t lastId = 0;\n\t}", "title": "" }, { "docid": "be3202e9efd3e2570d9933803abbd206", "score": "0.7137866", "text": "function resetLastId() {\n\t lastId = 0;\n\t}", "title": "" }, { "docid": "be3202e9efd3e2570d9933803abbd206", "score": "0.7137866", "text": "function resetLastId() {\n\t lastId = 0;\n\t}", "title": "" }, { "docid": "be3202e9efd3e2570d9933803abbd206", "score": "0.7137866", "text": "function resetLastId() {\n\t lastId = 0;\n\t}", "title": "" }, { "docid": "f4144254d6e9a6463ed8f1808eb1ab40", "score": "0.69937474", "text": "_resetSequenceId() {\n this.sequenceId = 0;\n this.compressedSequenceId = 0;\n }", "title": "" }, { "docid": "f4144254d6e9a6463ed8f1808eb1ab40", "score": "0.69937474", "text": "_resetSequenceId() {\n this.sequenceId = 0;\n this.compressedSequenceId = 0;\n }", "title": "" }, { "docid": "f4144254d6e9a6463ed8f1808eb1ab40", "score": "0.69937474", "text": "_resetSequenceId() {\n this.sequenceId = 0;\n this.compressedSequenceId = 0;\n }", "title": "" }, { "docid": "da46f47fe181fa9584a7bb53d66c5a73", "score": "0.69745004", "text": "function _setID(id){\n _id = id;\n }", "title": "" }, { "docid": "fef976d0dd7b0bd27584cdd79b2d6165", "score": "0.6931237", "text": "clear() {\n this.id = null;\n this.attributes = {};\n }", "title": "" }, { "docid": "c038d920a67470b530b9b17d345ba207", "score": "0.6885156", "text": "setId( value ){\n this.ID = value;\n }", "title": "" }, { "docid": "c038d920a67470b530b9b17d345ba207", "score": "0.6885156", "text": "setId( value ){\n this.ID = value;\n }", "title": "" }, { "docid": "c038d920a67470b530b9b17d345ba207", "score": "0.6885156", "text": "setId( value ){\n this.ID = value;\n }", "title": "" }, { "docid": "c038d920a67470b530b9b17d345ba207", "score": "0.6885156", "text": "setId( value ){\n this.ID = value;\n }", "title": "" }, { "docid": "6382c797dd7d82eaf2369af999259488", "score": "0.6780232", "text": "setId(id) {\n this.id = id;\n }", "title": "" }, { "docid": "79fa6901514cb23fe34914f33fa23d9d", "score": "0.677417", "text": "setId(id) {\n this.id = id;\n }", "title": "" }, { "docid": "3b712574010ac332a864b128b7ea076f", "score": "0.67391825", "text": "reset() {\n this.selfId = -1;\n this.participantId = -1;\n this.hasParticipant = false;\n }", "title": "" }, { "docid": "9331b5cf718f3faaaf9f78135b530aa3", "score": "0.66886884", "text": "clearId(){\n this.setState({ id: ''});\n }", "title": "" }, { "docid": "c9b0b88c264d6fee62c69b24abdd3dd6", "score": "0.6621728", "text": "function reset() {\n TUPLE_ID = 1;\n}", "title": "" }, { "docid": "c9b0b88c264d6fee62c69b24abdd3dd6", "score": "0.6621728", "text": "function reset() {\n TUPLE_ID = 1;\n}", "title": "" }, { "docid": "c9b0b88c264d6fee62c69b24abdd3dd6", "score": "0.6621728", "text": "function reset() {\n TUPLE_ID = 1;\n}", "title": "" }, { "docid": "c9b0b88c264d6fee62c69b24abdd3dd6", "score": "0.6621728", "text": "function reset() {\n TUPLE_ID = 1;\n}", "title": "" }, { "docid": "c9b0b88c264d6fee62c69b24abdd3dd6", "score": "0.6621728", "text": "function reset() {\n TUPLE_ID = 1;\n}", "title": "" }, { "docid": "ac049d265096f6f95f7e42e90f57dba8", "score": "0.6559322", "text": "function resetReflectionID() {\n REFLECTION_ID = 0;\n }", "title": "" }, { "docid": "1a623a55858cac58b6bbba2e0f1b6a9f", "score": "0.652618", "text": "function setID(i) {\n id = i;\n }", "title": "" }, { "docid": "20ad172655377414756bd2ce8d6a7aca", "score": "0.64961433", "text": "set id(v) {\n this.updateProp('id', v);\n }", "title": "" }, { "docid": "b01a9180ed8e7b87c1f2b14a93a4f75f", "score": "0.6476519", "text": "function resetIds(counter) {\r\n if (counter === void 0) { counter = 0; }\r\n _global[CURRENT_ID_PROPERTY] = counter;\r\n}", "title": "" }, { "docid": "b01a9180ed8e7b87c1f2b14a93a4f75f", "score": "0.6476519", "text": "function resetIds(counter) {\r\n if (counter === void 0) { counter = 0; }\r\n _global[CURRENT_ID_PROPERTY] = counter;\r\n}", "title": "" }, { "docid": "b01a9180ed8e7b87c1f2b14a93a4f75f", "score": "0.6476519", "text": "function resetIds(counter) {\r\n if (counter === void 0) { counter = 0; }\r\n _global[CURRENT_ID_PROPERTY] = counter;\r\n}", "title": "" }, { "docid": "dd64c43b3e1e35df95cc1d2746a9d9f6", "score": "0.644816", "text": "function resetIds(counter) {\n if (counter === void 0) { counter = 0; }\n _global[CURRENT_ID_PROPERTY] = counter;\n}", "title": "" }, { "docid": "dd64c43b3e1e35df95cc1d2746a9d9f6", "score": "0.644816", "text": "function resetIds(counter) {\n if (counter === void 0) { counter = 0; }\n _global[CURRENT_ID_PROPERTY] = counter;\n}", "title": "" }, { "docid": "dd64c43b3e1e35df95cc1d2746a9d9f6", "score": "0.644816", "text": "function resetIds(counter) {\n if (counter === void 0) { counter = 0; }\n _global[CURRENT_ID_PROPERTY] = counter;\n}", "title": "" }, { "docid": "dd64c43b3e1e35df95cc1d2746a9d9f6", "score": "0.644816", "text": "function resetIds(counter) {\n if (counter === void 0) { counter = 0; }\n _global[CURRENT_ID_PROPERTY] = counter;\n}", "title": "" }, { "docid": "81d84c7f2f9add00876702dd6f5213b3", "score": "0.6438168", "text": "function resetIds(counter) {\n if (counter === void 0) {\n counter = 0;\n }\n\n _global[CURRENT_ID_PROPERTY] = counter;\n}", "title": "" }, { "docid": "30f29044e7875cdc925a7f477923aa4f", "score": "0.6428127", "text": "function resetIdCounter() {\n cov_4v2lelsd.f[13]++;\n cov_4v2lelsd.s[49]++;\n\n idCounter = 0;\n}", "title": "" }, { "docid": "7435211d0175ba747734ee0e163818f9", "score": "0.63984543", "text": "get id() {\n return this._obj.id;\n }", "title": "" }, { "docid": "d1dff60a97a742c88af57473c77f77a5", "score": "0.63946503", "text": "function convertId(obj) {\n if(obj instanceof Object && obj._id) {\n\n // add id property\n obj.id = obj._id;\n delete obj._id;\n\n // reorder remaining properties\n for(var prop in obj) {\n if(prop !== 'id') {\n var val = obj[prop];\n delete obj[prop];\n obj[prop] = val;\n }\n }\n\n }\n}", "title": "" }, { "docid": "5154f4e42c323dca3bcdfb47d6b67da5", "score": "0.6355254", "text": "get id() { return this._id; }", "title": "" }, { "docid": "5154f4e42c323dca3bcdfb47d6b67da5", "score": "0.6355254", "text": "get id() { return this._id; }", "title": "" }, { "docid": "5154f4e42c323dca3bcdfb47d6b67da5", "score": "0.6355254", "text": "get id() { return this._id; }", "title": "" }, { "docid": "5154f4e42c323dca3bcdfb47d6b67da5", "score": "0.6355254", "text": "get id() { return this._id; }", "title": "" }, { "docid": "5154f4e42c323dca3bcdfb47d6b67da5", "score": "0.6355254", "text": "get id() { return this._id; }", "title": "" }, { "docid": "5154f4e42c323dca3bcdfb47d6b67da5", "score": "0.6355254", "text": "get id() { return this._id; }", "title": "" }, { "docid": "5154f4e42c323dca3bcdfb47d6b67da5", "score": "0.6355254", "text": "get id() { return this._id; }", "title": "" }, { "docid": "5154f4e42c323dca3bcdfb47d6b67da5", "score": "0.6355254", "text": "get id() { return this._id; }", "title": "" }, { "docid": "5154f4e42c323dca3bcdfb47d6b67da5", "score": "0.6355254", "text": "get id() { return this._id; }", "title": "" }, { "docid": "5154f4e42c323dca3bcdfb47d6b67da5", "score": "0.6355254", "text": "get id() { return this._id; }", "title": "" }, { "docid": "741ca56729be10992a29113b00eb4e51", "score": "0.6325461", "text": "get id() { return this.#id_; }", "title": "" }, { "docid": "5455beb30a2b4e7baef37b1a5d9aff16", "score": "0.6314639", "text": "createIdForObject() {\n this.state.location.concept.metadata.object['@id'] = idGenerator()\n }", "title": "" }, { "docid": "5e7c32308f4321918af18647d4f2cc83", "score": "0.6216612", "text": "get id() {\r\n return this._id;\r\n }", "title": "" }, { "docid": "3feca684a6a1425c551f6199dae1c5c5", "score": "0.6200961", "text": "get id() {\n return this._id;\n }", "title": "" }, { "docid": "f7b31bf606d3638ea7db5af3001936ea", "score": "0.6195376", "text": "function reset() {\n\t _id_map2.default.clear();\n\t _object2.default.clearChangeQueue();\n\t}", "title": "" }, { "docid": "acfe70d139db8afd594892e601619be7", "score": "0.61613613", "text": "reset () {\n\t\tthis.queryData.session_id = uuid.v1();\n\t}", "title": "" }, { "docid": "b94444598d28430173f7ea0165e6113a", "score": "0.6159779", "text": "get id() {\n return this._id;\n }", "title": "" }, { "docid": "b94444598d28430173f7ea0165e6113a", "score": "0.6159779", "text": "get id() {\n return this._id;\n }", "title": "" }, { "docid": "b94444598d28430173f7ea0165e6113a", "score": "0.6159779", "text": "get id() {\n return this._id;\n }", "title": "" }, { "docid": "b94444598d28430173f7ea0165e6113a", "score": "0.6159779", "text": "get id() {\n return this._id;\n }", "title": "" }, { "docid": "8acf886a37063e7bfa0e7c632309fbb4", "score": "0.61499596", "text": "function resetID(user) {\r\n module.exports.userToUUID.set(user.id, generateUUID())\r\n}", "title": "" }, { "docid": "0c4531165ddf45d8ef5ac84968956153", "score": "0.6128896", "text": "_reset() {\n this._update({})\n }", "title": "" }, { "docid": "3e08210e25765a76d8fa67b222b76294", "score": "0.6124226", "text": "function set_id(o, id) {\n o.uint.id = id;\n o.uint.id_mask = feedback_peer_to_mask(id);\n}", "title": "" }, { "docid": "8c5abb507b40e9924482d856769d32d1", "score": "0.6099486", "text": "function resetIDs(mqlProperties) {\n debug('>>> inside resetIDs'); // for testing only \n mqlProperties.tAliasID = 0;\n mqlProperties.cAliasID = 0;\n mqlProperties.pID = 0;\n debug('>>> leaving resetIDs'); // for testing only \n return mqlProperties;\n}//eof resetIDs", "title": "" }, { "docid": "7446bea368ef36bb4c641a1ae2de73b3", "score": "0.6088257", "text": "function setCurrentObjectID(val) {\r\n currentObjectID = val;\r\n}", "title": "" }, { "docid": "80df21e8b0ea51df2a5f754bde2f3da1", "score": "0.6067033", "text": "function idTarget() {\n for (i = 0; i < notes.length; i ++) {\n notes[i].id = i;\n }\n }", "title": "" }, { "docid": "dfe427c2835658e53e07941650218563", "score": "0.60624146", "text": "get id() {\n return this._id;\n }", "title": "" }, { "docid": "dfe427c2835658e53e07941650218563", "score": "0.60624146", "text": "get id() {\n return this._id;\n }", "title": "" }, { "docid": "b3a46b22f915a253c000811890e34666", "score": "0.60426646", "text": "setID(theID){\n this._ID = theID; //sets the id of the user\n }", "title": "" }, { "docid": "f499600666be4186750341a039189c74", "score": "0.6036684", "text": "set(id) {\n if (this.ids.has(id)) {\n throw new Error(`ID ${id} has already been used.`)\n }\n \n this.ids.add(id)\n }", "title": "" }, { "docid": "7aa7d7ef8bbf6dd32f71587c9dc86993", "score": "0.60114723", "text": "get id(){return this._id}", "title": "" }, { "docid": "192c21508ceb094ade687868db4438e8", "score": "0.6008683", "text": "issueID(){\n if(this.parent === null){ //its the root node\n this._id = this.name;\n } else { //its not the root node\n this._id = this.parent.id + '.' + this.name;\n }\n }", "title": "" }, { "docid": "43f03607875e207d60ee941396af0f30", "score": "0.6000084", "text": "SetID(val) {\n\t\tcc.assert((val >= BaseGameEntity.m_iNextValidID), \"<BaseGameEntity::SetID>: invalid ID\");\n\t\tthis.m_ID = val;\n\t\tthis.m_iNextValidID = this.m_ID + 1;\n\t}", "title": "" }, { "docid": "47f2341c68357449814b763dd4d5004f", "score": "0.5972179", "text": "function setCurrentObjectID(val){\n currentObjectID = val;\n}", "title": "" }, { "docid": "83ffd4f09681c7774849d521711b30b1", "score": "0.5971015", "text": "function getID() {\n return this.id || this._id;\n}", "title": "" }, { "docid": "226ef2e0b9882e46d376d45be5874c26", "score": "0.59572077", "text": "get id() {\n return this._id\n }", "title": "" }, { "docid": "e02be9e58979ad0f0a65dcc16afaeffa", "score": "0.5926877", "text": "updateId(newId) {\n if (this.id == newId) {\n return;\n }\n let oldId = this.id;\n if (!this.hasTemporaryId()) {\n console.error(\"This is only meant to replace temporary ids!\");\n }\n this.id = newId;\n this.dispatch(\"updateId\", {\n oldId: oldId,\n });\n }", "title": "" }, { "docid": "c6998e3a0401c3b0c5942d8bdc4b6c42", "score": "0.59188545", "text": "function objectId(o) {\r\n var prop = \"|**objectid**|\"; // Private property name for storing ids\r\n if (!o.hasOwnProperty(prop)) // If the object has no id\r\n o[prop] = Set._v2s.next++; // Assign it the next available\r\n return o[prop]; // Return the id\r\n }", "title": "" }, { "docid": "d683cd49079957959f739c1d8f330635", "score": "0.58959913", "text": "function id(obj) {\n var type = typeof obj\n // We can only tag objects, functions, and arrays with ids.\n // For all primitive values we instead return -1.\n if (!obj || !(type === 'object' || type === 'function')) return -1\n if (obj === window) return 0\n\n return getOrSet(obj, prop, function () {\n return index++\n })\n }", "title": "" }, { "docid": "2aaa0b09641adaea5f742c4aa1499932", "score": "0.58830225", "text": "function remove( id ) {\n objects[ id ] = 'deleted';\n }", "title": "" }, { "docid": "dfc0a9a91dde1159f489aa59def0c7b9", "score": "0.58823305", "text": "function deleteId(){\n\tdelete avenger.id;\n\tconsole.log(avenger);\n}", "title": "" }, { "docid": "828ae7f9ee73a6cfae98d6d2fff8ed37", "score": "0.5877427", "text": "function assignID(object) {\n // Assign a unique ID to an object.\n if (!object.base2ID) object.base2ID = \"b2_\" + _counter++;\n return object.base2ID;\n}", "title": "" }, { "docid": "421853f08f40021dfd5a83601fb4a718", "score": "0.5871144", "text": "clearIdInput() {\n this.idInput.value = \"\";\n }", "title": "" }, { "docid": "bb12673cf467f358db041d97b444b284", "score": "0.58647424", "text": "function unregisterObjectId(id) {\n delete scribbol.id2ObjMap[id];\n}", "title": "" }, { "docid": "8a56b8ba6514d5a2ceaa85d4fe2adb93", "score": "0.5857966", "text": "function getId () {\n return _id++;\n }", "title": "" }, { "docid": "1ce090795066d0ffb5fc4a8076958fbd", "score": "0.5850308", "text": "getId() {\n uniqueId++\n return uniqueId;\n }", "title": "" }, { "docid": "6cd0fd1499f0351a9c974e511c9ec237", "score": "0.5849071", "text": "function RepeatedId() {\n this.nextIdLookup = {};\n}", "title": "" }, { "docid": "928b9bb956ce27e028587f948e55161c", "score": "0.5821915", "text": "clearObjectCache(id) {\n this.objects_by_id.delete(id);\n }", "title": "" }, { "docid": "f884aef04c8821afa5ca16f26567dea5", "score": "0.58162403", "text": "reset() {\n // Reset the heading handler so that id uniqueness is guarateed and reset\n this._headingHandler.reset();\n }", "title": "" }, { "docid": "0d1a24cce7232ca3c2d614d54fe1a810", "score": "0.58156985", "text": "function resetIds(aNode, aId) {\n if (aNode.children) {\n for (var i = 0; i < aNode.children.length; i++) {\n aNode.children[i].id = ++aId;\n resetIds(aNode.children[i], aId);\n }\n return aId;\n }\n}", "title": "" }, { "docid": "d194230dbde23d207b63fe4d67256575", "score": "0.58075655", "text": "get id(){\n return this._id;\n }", "title": "" }, { "docid": "d194230dbde23d207b63fe4d67256575", "score": "0.58075655", "text": "get id(){\n return this._id;\n }", "title": "" }, { "docid": "84fa3eb8261b6d0533b951cf0bc2d39f", "score": "0.58041805", "text": "function _resetCarrierID() {\n\t\tselectedCarrier = undefined;\n\t}", "title": "" }, { "docid": "9fa983ff6abf76c85f1f5c7eafd469d6", "score": "0.5780157", "text": "function populateId(data) {\n if (data['@id']) {\n var iriParts = data['@id'].split('/');\n data.id = iriParts[iriParts.length - 1];\n }\n }", "title": "" }, { "docid": "47a6d53f1847770bd1217550f1e4e8c5", "score": "0.5765376", "text": "function r(t){return Object.defineProperty(t.data(),\"id\",{value:t.id})}", "title": "" }, { "docid": "47a6d53f1847770bd1217550f1e4e8c5", "score": "0.5765376", "text": "function r(t){return Object.defineProperty(t.data(),\"id\",{value:t.id})}", "title": "" }, { "docid": "92741d0350324458188a96e175566522", "score": "0.57639045", "text": "constructor(id = 0) {\n this.id = id;\n }", "title": "" } ]
3bd502a8b938e932721da6b3c83cb094
//////////////////////////////////////////////// call api url / routing /////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////// functions
[ { "docid": "ecac8ff0a6e2baab02c1c99608599ac5", "score": "0.0", "text": "async function getUser() { \n const client = await mongodb.MongoClient.connect(process.env.MONGO_URL, {useNewUrlParser: true});\n return client.db('vue_express').collection('user');\n}", "title": "" } ]
[ { "docid": "fe169ba483b0c1d54d70cfd515e84623", "score": "0.7371816", "text": "function UrlApiController() {\n\t}", "title": "" }, { "docid": "a3026384d615475e8524cc17b2f17edc", "score": "0.69568735", "text": "function manageRouting()\n{\n\tfor(var url in rippleAPI)\n\t{\n\t\tapp.route(path.join(\"/rippleAPI\", url, \":account?\"))\n\t\t.get(\n\t\t(function(urlToCall){\t\t\t// generating listeners\n\t\t\treturn function(req, res){\n\t\t\t\tres.contentType(\"application/json\");\n\t\t\t\trippleAPI[urlToCall](req, res);\n\t\t\t}\n\t\t})(url)\n\t\t);\n\t}\n}", "title": "" }, { "docid": "14a9139c11256c5544d0cbbc9a28c4b4", "score": "0.6515461", "text": "function route(url) {\n}", "title": "" }, { "docid": "26a6f0203cdd58039d6af52f04a81599", "score": "0.6505709", "text": "get(uri){\n\n }", "title": "" }, { "docid": "481089d4486147dd50449247f7064337", "score": "0.6475893", "text": "function router(api, options) {\n\n console.log(`REQUESTED API: ${options.path}`);\n\n /**\n * **************************\n * GETTER SERVICES\n * **************************\n */\n\n /**\n * @path\n * /v1/zipcode/pin\n */\n api.METHOD(`GET`, `/pin/:text`, async (request, response) => {\n return handler.getAddressByZipCode(request).then(result => {\n console.log({ result });\n response.status(result.code || 200);\n return JSON.stringify(result.data);\n }).catch(error => {\n console.error(error);\n return error;\n })\n });\n\n /**\n * @path\n * /v1/zipcode/city\n */\n api.METHOD(`GET`, `/city/:text`, async (request, response) => {\n return handler.getAddressByCity(request).then(result => {\n response.status(result.code || 200);\n return JSON.stringify(result.data);\n }).catch(error => {\n console.error(error);\n return error;\n })\n });\n\n /**\n * @path\n * /v1/zipcode/geo\n */\n api.METHOD(`GET`, `/geo/:lat/:long`, async (request, response) => {\n return handler.getAddressByGeo(request).then(result => {\n response.status(result.code || 200);\n return JSON.stringify(result.data);\n }).catch(error => {\n console.error(error);\n return error;\n })\n });\n\n /**\n * **************************\n * END OF GETTER SERVICES \n * **************************\n */\n\n}", "title": "" }, { "docid": "04fbfcc5aa6186582498512b87051a20", "score": "0.636711", "text": "apiCall() {\n\t\tlet pageUrl = this.state.url\n\t\tlet city = pageUrl.split(\"city=\")\n\t\tcity = city[1].substring(0, city[1].length)\n\n\t\tvar url = WEATHERAPI + city + WEATHERAPIKEY;\n\n\t\tfetch(url)\n\t\t.then(response =>\n\t\t{\n\t\t\tif ( response.status >= 200 && response.status <299) {\n\t\t\t\treturn response.json();\n\t\t\t} else {\n\t\t\t\tthrow Error(response.statusText);\n\t\t\t}\n\n\t\t}).then(data => {\n\t\t\tthis.determineIndex(data, city)\n\t\t}).catch((error) => {\n\t\t\tconsole.log(error);\n\t\t});\n\n\t}", "title": "" }, { "docid": "8ed67dbfcedec2ce15eb43d896dd1376", "score": "0.6361555", "text": "routes() {\n this.app.use('/api/users', users_1.usersRouter);\n this.app.use('/api/betForm', betForm_1.betFormRouter);\n this.app.use('/api/odds', odds_1.oddsRouter);\n this.app.use('/api/comment', comment_1.commentRouter);\n this.app.use('/api/players', players_1.playersRouter);\n this.app.use('/api/teams', teams_1.teamsRouter);\n this.app.use('/api/articles', articles_1.articlesRouter);\n this.app.use('/api/admin', admin_1.adminRouter);\n this.app.use('/api/bets', bet_1.betRouter);\n this.app.use('/api/timeline', timeline_1.timelineRouter);\n this.app.use('/api/forwards', forward_1.forwardRouter);\n this.app.use('/api/forecast', forecast_1.forecastRouter),\n this.app.use('/', (req, res) => {\n console.log(req.url);\n res.status(200).send({ message: `node-api is working!` });\n });\n }", "title": "" }, { "docid": "8164c61118a1519683e1e25ac83e0156", "score": "0.6299705", "text": "api() {\n this.app.use(`${main_1.CONST_PARAMS.API_ROOT}/v${main_1.CONST_PARAMS.API_VERSION}/user`, (new userInfo_route_1.UserInfoAPIRouter(passport)).router);\n this.app.use(`${main_1.CONST_PARAMS.API_ROOT}/v${main_1.CONST_PARAMS.API_VERSION}/department`, (new department_route_1.DepartmentAPIRouter(passport)).router);\n this.app.use(`${main_1.CONST_PARAMS.API_ROOT}/v${main_1.CONST_PARAMS.API_VERSION}/workDayLog`, (new workDayLogs_route_1.WorkDayLogsAPIRouter(passport)).router);\n }", "title": "" }, { "docid": "6b711ed6aa77d7f74d5dae5b7667a318", "score": "0.6264798", "text": "function initREST() {\n app.get('/api', (req, res) => {\n res.send({\n message: 'An API for use with your Dapp!'\n });\n });\n // for all the active Airlines available\n app.get(\"/activeAirlines\", (req, res) => {\n FlightSuretyApp.methods.getActiveAirlines().call().then(airlines => {\n console.log(airlines);\n return res.status(200).send(airlines);\n // if there's an error, catch it and send back err message\n }).catch(err => {\n return res.status(500).send(err);\n });\n });\n}", "title": "" }, { "docid": "621fdded3df3e2fc6444bba6eb4d7392", "score": "0.6159099", "text": "_routes() {\n return [\n {\n route: '/api/v1/nearby-stops',\n method: 'get',\n handler: this.index\n }\n ];\n }", "title": "" }, { "docid": "d2daec641595671a24ea283bca830dee", "score": "0.6141112", "text": "function makeApiCall (path) {\n\t\tvar urlOrigin = window.location.origin;\n\t\treturn lib.fetchApi(urlOrigin+path);\n\t}", "title": "" }, { "docid": "6c18965448f9680ccd865384c47d5885", "score": "0.61407477", "text": "routes() {\n this.router.get(\"/\", this.all);\n this.router.get(\"/bymakerid/:id\", this.oneById);\n // this.router.get(\"/bybuyerpassword/:base64\", this.byPassword);\n this.router.post(\"/\", this.create);\n this.router.put(\"/:id\", this.update);\n this.router.delete(\"/:id\", this.delete);\n }", "title": "" }, { "docid": "0c916d6d600db1f56b0c654c66fb1df4", "score": "0.61365175", "text": "function routeApi(resource) {\n return function(req, res) {\n console.log('[HTTP] API request for ' + resource + '.');\n var queries = url.parse(req.url, true).query;\n res.writeHead(200, {\n \"Content-Type\":\"application/json\"\n });\n var json = api[resource];\n if (queries.platform) {\n json = json[queries.platform];\n }\n if (queries.sha) {\n json = json[queries.sha];\n }\n res.write(JSON.stringify(json), 'utf-8');\n res.end();\n };\n}", "title": "" }, { "docid": "34478f33676066fa5be70f48443271a5", "score": "0.6130459", "text": "routes() {\n this.router.get(\"/\", this.all);\n this.router.get(\"/bycreditid/:id\", this.oneById);\n // this.router.get(\"/bybuyerpassword/:base64\", this.byPassword);\n this.router.post(\"/\", this.create);\n this.router.put(\"/:id\", this.update);\n this.router.delete(\"/:id\", this.delete);\n }", "title": "" }, { "docid": "2e7d9af68b24927dca430c31c5aa7e85", "score": "0.61286736", "text": "function routes( app ){\n\n // URL parameters\n app.param('id', /^\\d+$/); //job_id\n app.param('sourceHandlerId', /^\\d+$/); //job_id\n app.param('returnType', /^(data|interactive|png|svg)$/); //Export types for graphs\n\n\n // Graphs\n app.post('/plot', controllers.graph.create);\n app.get('/plot/:id/status', controllers.graph.status);\n app.post('/plot/:id/download', controllers.graph.download);\n app.get('/plot/:id/:returnType', controllers.graph.show);\n\n // Legacy support, to be removed\n app.get('/job/:id/status', controllers.graph.status);\n app.get('/job/:id/:returnType', controllers.graph.show);\n\n\n // SVG Converts\n app.post('/svg-to/:format', controllers.svgConverter.convertTo);\n\n //Testing route\n app.get('/', function(req, res) {\n res.render('test-suite');\n });\n\n}", "title": "" }, { "docid": "043c0e830091c097b60023f89f95fafb", "score": "0.61280835", "text": "routes() {\n this.router.get(\"/bycompanyid/:companyId\", this.all);\n this.router.get(\"/byconsultantid/:consultantId\", this.oneById);\n this.router.get(\"/byconsultantpassword/:base64\", this.byPassword);\n this.router.post(\"/\", this.create);\n this.router.put(\"/:consultantId\", this.update);\n this.router.delete(\"/:consultantId\", this.delete);\n }", "title": "" }, { "docid": "4a1dd2c0fe18d371755138c17710dc41", "score": "0.6125382", "text": "function urlRoute(req, res, callback) {\n\tmyUrl = url.createUrl(req.params[0]);\n\tif(req.params[0]){\n\t term = url.recordHistory(req.params[0]);\n\t history.push(term);\n\t}\n\tconsole.log(history);\n\tcallback(); //callback is queryApi or displayHistory depending on route\n}", "title": "" }, { "docid": "0e11b574b8185a0fb0521315d5ad6d52", "score": "0.61242616", "text": "apiGetVerbHandler (req, res, chain, params) {}", "title": "" }, { "docid": "e70e360a3b0d98c5981b23d7f20004fb", "score": "0.61137307", "text": "function entrypoint(req, res) {\n const swaggerDoc = getSwaggerDoc();\n \n if (req.url=='/') {\n var linksObject = {}\n linksObject.self = {\n \"href\": swaggerDoc.basePath\n };\n // add swagger info details to self link\n for (var infoKey in swaggerDoc.info) {\n linksObject.self[infoKey] = swaggerDoc.info[infoKey];\n }\n // go through every operation in every path to create additional links\n for (var pathKey in swaggerDoc.paths) {\n for (var methodKey in swaggerDoc.paths[pathKey]) {\n linksObject[swaggerDoc.paths[pathKey][methodKey].operationId] = {\n \"href\": stripTrailingSlash(swaggerDoc.basePath) + pathKey,\n \"method\" : methodKey.toUpperCase(),\n \"description\" : swaggerDoc.paths[pathKey][methodKey].description\n }\n }\n }\n var responseJSON = {\n \"_links\": linksObject\n }\n res.end(JSON.stringify(responseJSON)); \n }\n else {\n console.log('Return 404 error for url ' + req.url);\n res.statusCode=404;\n res.end('Endpoint not found. Try ' + swaggerDoc.basePath);\n }\n}", "title": "" }, { "docid": "44751940aaa570abeb2703251667795c", "score": "0.6082072", "text": "routes() {\n if (!this.apiDoc) {\n return super.routes();\n }\n spec(this.apiDoc, this.logger)\n .then(async (api) => {\n if (Array.isArray(api)) {\n // 多个目录合并一个 api\n // this.api = await this.apiCooker(api.reduce((accumulator, currentValue) => {\n // Object.assign(accumulator.paths, currentValue.paths);\n // return accumulator;\n // }, api[0]));\n\n // 多个目录保持多个 api\n this.api = await Promise.all(api.map((item) => {\n return this.apiCooker(item);\n }));\n } else {\n this.api.push(await this.apiCooker(api));\n }\n\n\n await this.registerRoutes();\n await this.registerApiExplorer();\n\n debug('router is ready...');\n this.emit('ready');\n })\n .catch((error) => {\n console.error('router boot error: ', error);\n\n this.emit('error', error);\n });\n\n return super.routes();\n }", "title": "" }, { "docid": "df355a333645c5e8ff583099a4d5e12b", "score": "0.6062041", "text": "async function api(ctx, next) {\n p.info(`Caught request for: ${ctx.originalUrl} from ${ctx.ip}`);\n await next();\n }", "title": "" }, { "docid": "aad127a10183ffb990deb3693cc3e40c", "score": "0.60555255", "text": "callController(_userCntr){\n var userCntr = _userCntr.split(',');\n var rout = new Router().getRouter();\n for(let b in rout){\n if(Object.keys(rout[b]) == userCntr[0]){\n for(let a in rout[b]){\n for(let c in rout[b][a]){\n \n let _controler = rout[b][a][c].method;\n let controler = _controler.split(',');\n let namespace = rout[b][a][c].class;\n \n if (typeof namespace[controler[0]] == 'function'){\n \n let params = [''];\n \n if(controler[1]){\n params = controler[1].split(',');\n }\n else if(userCntr[1]){\n params = userCntr[1].split(',');\n }\n \n namespace[controler[0]](params[0].split('/'));\n }\n else{\n console.log('Error: function \"' + namespace + '.' + controler[0] + '\" does not exist.');\n }\n }\n }\n }\n }\n }", "title": "" }, { "docid": "a2fa881c3ad9f14dd707b0ee58f97bf0", "score": "0.60389906", "text": "function apiURL(service) { //Función para formar la ruta completa a la API \n return BaseApiUrl + service;\n}", "title": "" }, { "docid": "6eb4a1c3c9671457fc6809cac79c865b", "score": "0.6034012", "text": "function Api(){}", "title": "" }, { "docid": "8760b8342d3bec9768a9c66fbbffd52a", "score": "0.6030061", "text": "function handleRoute() {\n switch (true) {\n case url.includes('/login'):\n return login();\n case url.includes('/logout'):\n return logout();\n case url.includes('/users/register') && method === 'POST':\n return registerNewUser(body);\n case url.includes('/users/list'):\n return getUsers();\n default:\n // pass through any requests not handled above\n return error('configureFakeBackend.handleRoute(), incorrect url : ' + url);\n }\n }", "title": "" }, { "docid": "ba081b096e2310e68efa4e37f78f02ba", "score": "0.6018794", "text": "_routes() {\n let router = express.Router();\n router.get('/', (req, res, next) => {\n res.json({\n message: 'Hello world!'\n });\n });\n this.express.use('/', router);\n this.express.use('/api/v1', BaseRouter.routes);\n this.express.use('/api/v1/ai', AIRouter.routes);\n }", "title": "" }, { "docid": "f5ecfdb1cb738f184971e8dcd6c87804", "score": "0.6003173", "text": "function handleApiCall(params){\n\t\t// console.log(`💬현재 roadApiParams`);\n\t\t// console.log(roadApiParams);\n\t\t// console.log(`💬추가할 params`);\n\t\t// console.log(params);\n\t\t// console.log(`✅결과물`);\n\t\t// console.log(Object.assign({},roadApiParams,params));\n\n\t\troadApiCall(Object.assign({},roadApiParams,params))\n\t}", "title": "" }, { "docid": "aa460b6a28ddfb7e4b5c4809061d718c", "score": "0.599065", "text": "function connectApi(){\n\n}", "title": "" }, { "docid": "e5f06a68191f7c1c8739825d338c072d", "score": "0.598821", "text": "handleWithAPI(url) {\n return url.indexOf('/api/') === 0;\n }", "title": "" }, { "docid": "2bbd918a423bffd298e8ab011731785d", "score": "0.5982761", "text": "function searchRoutesAPI(route, successCallback, errorCallback) {\n const data = {\n req1: route\n };\n $.ajax({\n url: SEPTA_SCHEDULES_URL, data,\n dataType: 'jsonp',\n success: successCallback,\n error: errorCallback\n });\n }", "title": "" }, { "docid": "1cbd0809a4c98b071cf7a355961108ef", "score": "0.5956656", "text": "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: \"Only GET Operation is supported, \" +\n\t\t\t\t\t\"with parameters sapDocument, fiscalYear(YYYY), \" +\n\t\t\t\t\t\"companyCode, postingDate(YYYYMMDD), optionally\"\n\t\t\t}));\n\t\t} else if ($.request.method === $.net.http.GET) {\n\t\t\t//Perform Read to get entries\n\t\t\ttry {\n\t\t\t\t_getEntries();\n\t\t\t} catch (errorObj) {\n\t\t\t\t$.response.status = 200;\n\t\t\t\t$.response.setBody(JSON.stringify({\n\t\t\t\t\tmessage: \"API Called\",\n\t\t\t\t\tresult: gvErrorMessage\n\t\t\t\t}));\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "92df68be3eb68b755517f8093fb13641", "score": "0.5950791", "text": "apiRoutes() {\n\t\tfs.readdirSync(__dirname + '/api/').forEach((file, i, allRoutes) => {\n\t\t\tif (allRoutes.length > 0) {\n\t\t\t\trequire(`./api/${file.substr(0, file.indexOf('.'))}`)(this.app, this.logger, this.serviceName);\n\t\t\t}\n\t\t});\n\t}", "title": "" }, { "docid": "369f4b0e19b9aea24938aaac92ac93cd", "score": "0.59500945", "text": "function addRoutes(api) {\n api.post('/api/v2/accounts', create);\n api.get('/api/v2/accounts/:name', item);\n api.get('/api/v2/accounts/:name/tiers', tiers);\n api.get('/api/v2/accounts?:domain', list);\n api.put('/api/v2/accounts/:name', update);\n api.delete('/api/v2/accounts/:name', remove);\n\n // V1\n api.post('/api/v1/accounts?', createV1);\n api.delete('/api/v1/accounts?/:name', removeV1);\n\n // Channel actions\n api.post('/api/v2/accounts/:id/spy', spy);\n}", "title": "" }, { "docid": "461c98dfdaa9bae81d29725988e8bf4d", "score": "0.5945682", "text": "routes() {\r\n this.router.get('/', (req, res) => this.all(req, res))\r\n .get('/:star/:name?', (req, res) => this.filters(req, res))\r\n .post('/', (req, res) => this.create(req, res))\r\n .put('/:id', (req, res) => this.update(req, res))\r\n .delete('/:id', (req, res) => this.delete(req, res));\r\n }", "title": "" }, { "docid": "1df318345cd067fc5f1e5ac98e864939", "score": "0.59400386", "text": "function constructUrl() {\n var resource = $('#inputresource').val();\n var id = $('#inputid').val();\n var url = '/api/';\n if (resource != undefined && resource != \"\")\n url += resource + '/' + id;\n return url;\n }", "title": "" }, { "docid": "0ea9f417d40a0a0d92dfbe57c5a73ae1", "score": "0.5936343", "text": "function routesForAgency(r) {\n var req = {\n key: 'TEST'\n };\n\n $.ajax({\n url: 'http://52.88.188.196:8080/api/api/where/routes-for-agency/STA.json',\n type: \"GET\",\n crossDomain: true,\n data: req,\n dataType: \"jsonp\",\n success: gotRoutesForAgency,\n error: function (xhr, status) {\n alert(\"error\");\n }\n });\n\n}", "title": "" }, { "docid": "653a74cfb6109f22cb261c0ef78286ae", "score": "0.5922588", "text": "function Route() {}", "title": "" }, { "docid": "78988630bceca6e691f71ca94e784f54", "score": "0.59107405", "text": "function route(params) {\n console.log(\"About to route a request for \"+pathname);\n}", "title": "" }, { "docid": "a5fef7517b6bf1d98f2009513609908f", "score": "0.5906774", "text": "function regRoute(route, i, modelName){\n var path = i.split(':');\n var method = path.shift().toLowerCase();\n path = path.join(':');\n console.log(\"Registering api paths\",method,path);\n app[method](\"/api/\" + path,function(req,res){\n if(!route.query){\n route.response({},res,req,models);\n return;\n }\n var args = route.query(req);\n if(!args.push){args = [args];}\n args.push(function(err,obj){\n if(err){\n console.log(\"API error\",err);\n res.json([]);\n }\n else {\n route.response(obj,res,req,models);\n }\n });\n models[modelName][route.queryType || \"find\"].apply(\n models[modelName], args\n );\n });\n}", "title": "" }, { "docid": "802838eecf1f3199e4d535b6d491a5e8", "score": "0.59057176", "text": "function router(app)\n{\n app.use(bp.json())\n\n app.get('/api/cakes', api.cakes)\n\n app.get('/api/cakes/:id', api.getCakeById)\n\n app.post('/api/cakes', api.createCake)\n\n app.post('/api/rates/:id', api.addRatingToCake)\n\n app.delete('/api/cakes/:id', api.deleteCake)\n\n // app.get('/', page.index)\n}", "title": "" }, { "docid": "fa61bc653faa74f5c3e832c89decd069", "score": "0.5902799", "text": "get(route, ...callbacks) { this._addRoute(\"GET\", route, callbacks); }", "title": "" }, { "docid": "d55672297c886d273fb0c3cb62c3ef06", "score": "0.58888686", "text": "makeAPIRequest (apiName, url, requestRegion, parameters) { // default args pls nodeJS :(\n if (!apiName) { return } // gotta have an api name\n requestRegion = requestRegion || this.region\n url = url.length > 1 ? url.join('/') : url[0]\n parameters = Object.assign({}, parameters, { api_key: this.apiKey }) // null and undefined are ignored, in case parameters is null\n let fullURL\n\n if (apiName === 'championmastery') {\n fullURL = `${this.championmasteryBaseURL}/${this.platformID[requestRegion]}/${url}`\n } else if (apiName === 'current-game' || apiName === 'featured-games') {\n fullURL = `${this.observerModeBaseURL}/${this.platformID[requestRegion]}/${url}`\n } else if (apiName === 'lol-static-data') {\n fullURL = `${this.globalBaseURL}/lol/static-data/${requestRegion}/${this.apiVersion[apiName]}/${url}`\n } else if (apiName === 'lol-status') {\n fullURL = `http://status.leagueoflegends.com/${url}`\n } else {\n fullURL = `${this.baseURL}/${requestRegion}/${apiName}/${this.apiVersion[apiName]}/${url}`\n }\n\n console.log(fullURL)\n\n return request(Object.assign({}, parameters, { uri: fullURL, json: true }))\n }", "title": "" }, { "docid": "f347b6bba253afad1d798a0a688ca991", "score": "0.58870685", "text": "function bindGetRequestRouteToFunction(routes) {\n let requestFunctions = {};\n\n // With multiple node instances, want to have the option of deploying an instance\n // where only 'public' routes are defined.\n if (config.publicRoutesOnly !== true) {\n requestFunctions[routes.APPS] = getApps;\n requestFunctions[routes.APP_USERS] = getAppUsers;\n requestFunctions[routes.APP_ROLES] = getAppRoles;\n requestFunctions[routes.APP_COMPONENTS] = getAppComponents;\n requestFunctions[routes.FEATURE_STATES] = getFeatureStates;\n\n requestFunctions[routes.PAGE_MOCK] = getMockPage;\n /***\n * CRUD on feature switches unused until this epic is worked on :\n * https://quickbase.atlassian.net/browse/MC-1189\n */\n requestFunctions[routes.FEATURE_SWITCHES] = getFeatureSwitches;\n\n requestFunctions[routes.FORM_COMPONENTS] = fetchFormComponents;\n requestFunctions[routes.FORM_AND_RECORD_COMPONENTS] = fetchFormAndRecordComponents;\n\n requestFunctions[routes.RECORD] = fetchSingleRecord;\n requestFunctions[routes.RECORDS] = fetchAllRecords;\n\n requestFunctions[routes.REPORT_META] = fetchReportMeta;\n requestFunctions[routes.REPORT_RESULTS] = fetchReportResults;\n requestFunctions[routes.REPORT_INVOKE_RESULTS] = fetchReportInvokeResults;\n requestFunctions[routes.REPORT_RECORDS_COUNT] = fetchReportRecordsCount;\n requestFunctions[routes.FACET_EXPRESSION_PARSE] = resolveReportFacets;\n\n requestFunctions[routes.TABLE_HOMEPAGE_REPORT] = fetchTableHomePageReport;\n\n requestFunctions[routes.REQ_USER] = getReqUser;\n\n requestFunctions[routes.GOVERNANCE_ACCOUNT_USERS] = getAccountUsers;\n requestFunctions[routes.GOVERNANCE_CONTEXT] = getGovernanceContext;\n }\n\n requestFunctions[routes.QBUI_HEALTH] = getHealthCheck;\n requestFunctions[routes.SWAGGER_CORE] = forwardApiRequest;\n requestFunctions[routes.SWAGGER_EE] = forwardApiRequest;\n requestFunctions[routes.SWAGGER_WE] = forwardApiRequest;\n\n requestFunctions[routes.SWAGGER_RESOURCES] = forwardApiRequest;\n requestFunctions[routes.SWAGGER_V2] = forwardApiRequest;\n\n return requestFunctions;\n }", "title": "" }, { "docid": "70354632dd8e364e8d00ee0212d0645e", "score": "0.5885252", "text": "function apititular(command){\n\treturn apiURL(titular, command);\n}", "title": "" }, { "docid": "254e7bc2b3c2304406b678769ac14d39", "score": "0.58475816", "text": "function addRoutes(api) {\n api.post('/families', createFamily);\n api.get('/families', getFamilies);\n}", "title": "" }, { "docid": "8bd4e376026a4adaa7d73c0b32a71260", "score": "0.58426464", "text": "function buildURL(api) {\n var resource = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"\";\n return URL_API + resource;\n}", "title": "" }, { "docid": "1d1dc558e0277a1298316573d917ee67", "score": "0.5835374", "text": "routes(app) {}", "title": "" }, { "docid": "73a14a10636970708b83dcb8bcb0a422", "score": "0.58304316", "text": "function apiEndpoint (app) {\n// app.use('/endpointName', endpointName);\n}", "title": "" }, { "docid": "cc22c7ee73fb9ab8b3015e15d2404baa", "score": "0.58297575", "text": "function routes(request, response, serve) {\n var path = request.uri.path;\n\n switch (path) {\n\n case '/api/open':\n robot1.finger1.open();\n break;\n\n case '/api/close':\n robot1.finger1.close();\n break;\n\n case '/api/sweep':\n robot1.finger1.sweep();\n break;\n }\n\n if (path.indexOf(\"/api/goto?angle=\") > -1) { // If \"?angle=\" exists in the string 'path' then...\n var angle = path.substr(16); //takes the characters from the string starting from the 16th characters until the end of the string\n robot1.finger1.goto(angle); // This needs to be able to handle things if it isnt an integer\n }\n}", "title": "" }, { "docid": "c225cdb2bd060d43b2e733fe675ebdfd", "score": "0.58141583", "text": "function procede()\n{\n $.ajaxPrefilter( \"json script\", function( options ) {\n options.crossDomain = true;\n });\n//jQuery commands are loaded (do your magic)\n // var ip = '104.154.90.207:3000';\n //route = ip + '/api/getRoutes'\n var ip = 'localhost:3000';\n\n\n $.get( '/', function(data) {\n //$('#results').html(data);\n console.log('TESTING');\n console.log(data);\n\n });\n\n\n\n}", "title": "" }, { "docid": "3debfc7824d9b31794d43863c9fdc599", "score": "0.58051777", "text": "function handleRoute() {\n switch (true) {\n case url.endsWith('/api/artists/userlogin') && method === 'POST':\n return authenticate();\n case url.endsWith('/api/artists') && method === 'POST':\n return register();\n case url.endsWith('/api/artists') && method === 'GET':\n return getUsers();\n case url.endsWith('/changepassword') && method === 'PUT':\n return updateUser();\n case url.match(/\\/artists\\/\\d+$/) && method === 'DELETE':\n return deleteUser();\n default:\n // pass through any requests not handled above\n return realFetch(url, opts)\n .then(response => resolve(response))\n .catch(error => reject(error));\n }\n }", "title": "" }, { "docid": "a144f01bbd42061019526d77fafbfe47", "score": "0.580165", "text": "route(name, params, absolute) {\n const routeObject = route(name, params, absolute, this.config.routes);\n\n return {\n method: routeObject.urlBuilder.route.methods[0],\n url: routeObject.toString()\n }\n }", "title": "" }, { "docid": "e2e7e1ceb23101d65437e3de8a6f82b6", "score": "0.5771099", "text": "function route(URI, res) {\n // res.writeHead(200, { 'Content-Type': 'text/html' });\n switch (URI) {\n case \"/\":\n getFileForUrl(res, fileMap.default);\n break;\n case '/getUsers':\n var data = {\n users: [\n { name: \"shakir\", Email: \"[email protected]\" }\n ]\n };\n getCustomOutput(res, JSON.stringify(data, null, 4));\n break;\n case \"/userlist\":\n getFileForUrl(res, fileMap.userList);\n break;\n default:\n res.end(\"<h1>404 - page not found</h1>\");\n break;\n }\n}", "title": "" }, { "docid": "97aa0d5ba71a063760a6f2b8bff5c643", "score": "0.575679", "text": "function main() {\n\t\t//Check the Method\n\t\tif ($.request.method === $.net.http.POST) {\n\t\t\tif (gvMethod === \"DELETE\") {\n\t\t\t\t//Perform Table Entry to be deleted from GL Routing Table\n\t\t\t\ttry {\n\t\t\t\t\t_deleteRoutingEntry();\n\t\t\t\t} catch (errorObj) {\n\t\t\t\t\tgvTableUpdate = \"Error during table entry deletion:\" + errorObj.message;\n\t\t\t\t}\n\t\t\t} else if (gvMethod === \"UPDATE\") {\n\t\t\t\ttry {\n\t\t\t\t\t_updateEntry();\n\t\t\t\t} catch (errorObj) {\n\t\t\t\t\tgvTableUpdate = \"Error during table update:\" + errorObj.message;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t//Perform Table Entry to be created in GL Routing Table\n\t\t\t\ttry {\n\t\t\t\t\t_createRoutingEntry();\n\t\t\t\t} catch (errorObj) {\n\t\t\t\t\tgvTableUpdate = \"Error during table insert:\" + errorObj.message;\n\t\t\t\t}\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\n\t\t} else if ($.request.method === $.net.http.GET) {\n\t\t\t//Read Entries from the Table\n\t\t\ttry {\n\t\t\t\t_getEntries();\n\t\t\t} catch (errorObj) {\n\t\t\t\t$.response.status = 200;\n\t\t\t\t$.response.setBody(JSON.stringify({\n\t\t\t\t\tmessage: \"API Called\",\n\t\t\t\t\tresult: gvErrorMessage\n\t\t\t\t}));\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "3ef86c7550efe8bd5b00eb593049b2ea", "score": "0.5754545", "text": "get(apiCall, callback) {\n this.request(apiCall, 'GET', callback);\n }", "title": "" }, { "docid": "9527c5ff44e687c4f6a7164d05c9d04d", "score": "0.57431895", "text": "function ChangedURI(callback)\n{\n //console.log(\"ChangedURI\");\n\n // identify new link\n var hash = location.hash.replace(/^#/, '');\n if(hash == \"\")\n {\n window.location.href = \"/#/home\";\n return;\n }\n var bookmark = hash.substring(hash.indexOf(\"/\") + 1);\n //console.log(\"ChangedURI bookmark = \" + bookmark);\n // find first level parameter\n\n if (bookmark == \"\")\n bookmark = \"home\";\n\n // call first level API\n Service_Root(bookmark, function(){\n if (callback)\n callback();\n });\n\n}", "title": "" }, { "docid": "87e263dfdfe8727a571bf761e9dbc516", "score": "0.5726833", "text": "function buildURL(api) {\n var resource = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"\";\n\n if (api == \"URL_API_CENTRAL\") {\n return URL_API_CENTRAL + resource;\n } else {\n return URL_API_SUBASTA + resource;\n }\n}", "title": "" }, { "docid": "ecefe89e2747a48efe7e598ed5205397", "score": "0.5725248", "text": "function consumeAPI() {\n\t//Get table data from the API\n\t$.getJSON(\"http://ec2-54-201-29-242.us-west-2.compute.amazonaws.com:80/rest/ehr/company?order=sort_by_nbr&app_name=ehrSelect\", callback);\n\tfunction callback(json) {\n\t\tcompany_data = json;\n\t\tcompanyButtons();\n\t\tif (window.location.hash.substring(1) > 40) {\n\t\t\tsetActiveCompany(window.location.hash.substring(1));\n\t\t} else {\n\t\t\tsetActiveCompany(47);\n\t\t}\n\t}\n\treturn;\n}", "title": "" }, { "docid": "9adf5b5e71e51092ac67d07a272a10fb", "score": "0.5724561", "text": "function RESTController(i,o,a,r){\n var fn\n\n for (var j=0; j < RESTController.filters.length; j++) {\n fn = RESTController.filters[j]\n if (typeof fn === 'function')\n fn(i,o,a,r)\n }\n fn = RESTController[i.method.toLowerCase()]\n if (fn)\n fn(i,o,a,r)\n else\n r.error('404')\n }", "title": "" }, { "docid": "ee979004163ac7346a60cbe12d372020", "score": "0.5721652", "text": "function apiGet( resourceUrl, successCallback, data=null){\n apiRequest(\"get\",resourceUrl, successCallback, data)\n}", "title": "" }, { "docid": "c2361223db5a8cc75aea7865cc8e9437", "score": "0.5720929", "text": "function apiURL(root, command){\n\treturn root.concat(command);\n}", "title": "" }, { "docid": "752f77ae68954cd19dd5c4958a659329", "score": "0.5718318", "text": "function initRoutes(apiBaseUrl, apiObject, apiArray) {\n let objKeys = Object.keys(apiObject);\n\n\n // Runs on all of the cur namespace functions\n // and for each checks if there is a lower level in the namespace\n // if there is then does the same for it \n for (let curObjectPropertyIndex = 0;\n curObjectPropertyIndex < objKeys.length;\n curObjectPropertyIndex++) {\n\n if (typeof apiObject[objKeys[curObjectPropertyIndex]] === \"object\") {\n initRoutes(apiBaseUrl + '/' + objKeys[curObjectPropertyIndex].toLocaleLowerCase(), apiObject[objKeys[curObjectPropertyIndex]], apiArray);\n }\n else {\n apiObject[objKeys[curObjectPropertyIndex]] = apiBaseUrl + '/' + objKeys[curObjectPropertyIndex].toLocaleLowerCase();\n apiArray.push(apiBaseUrl + '/' + objKeys[curObjectPropertyIndex].toLocaleLowerCase());\n }\n }\n}", "title": "" }, { "docid": "2ce432220181de12de14bdfa9457c55d", "score": "0.5704073", "text": "function moduleApiCall(req, res, next){\n console.log(\"API Call\");\n var defaultApiConfig = {\n path: '',\n verb: 'get',\n params: {},\n };\n var apiCallArg = _.assign(_.cloneDeep(defaultApiConfig), req.currentModule.apiCall);\n apiCallArg.paramMethod = apiCallArg.verb !== 'get' ? 'send' : 'query';\n console.log(apiCallArg);\n var saCall = sa[apiCallArg.verb](apiCallArg.path)[apiCallArg.paramMethod](apiCallArg.params).type('json');\n saCall.set('Accept', 'application/json');\n saCall.end(function(err, response){\n if (!err && response.body) {\n res.apiData = response.body;\n res.apiData.statusCode = response.statusCode;\n next();\n } else {\n console.log(\"There is an error in api call\" +err);\n res.apiData = err;\n next();\n }\n });\n }", "title": "" }, { "docid": "db2a88cedc51f397176605799d966aa1", "score": "0.5700669", "text": "function sendToAPIs(id){\n getToRESTApi(id);\n // postToGraphQLApi(id);\n}", "title": "" }, { "docid": "8a20fa5afbc4f2b5acf5db6afba63930", "score": "0.5699892", "text": "_get_api_url () {\n return `${this.protocol}://${this.host}:${this.port}/gui`;\n }", "title": "" }, { "docid": "06d077ab1ee241d22534046e81ec90b7", "score": "0.5691153", "text": "function registerApiCall (name, method, path) {\n if (arguments.length === 2 && typeof method === 'function') {\n var ctx = {\n api: function (type, url, params, success, error, complete, extend) {\n return $.ajax(ajaxParams(type, url, params, success, error, complete, extend));\n }\n };\n var bound = method.bind(ctx);\n _api[name] = bound;\n site.commands.define('api:' + name, bound);\n return;\n }\n _api[name] = apiCall;\n site.commands.define('api:' + name, apiCall);\n return;\n function ajaxParams (type, url, params, success, error, complete, extend) {\n //var headers = _.extend(site.me.authHeaders(), {\n //'x-appwl': 'localhost'\n //});\n if (!type) type = httpMethod.get;\n var obj = {\n type: type,\n url: apiRoot + url.replace(/^\\/+/, ''),\n data: type === httpMethod.get ? $.param(params || {}) : JSON.stringify(params),\n processData: false,\n contentType: 'application/json',\n dataType: 'json',\n // cache: false,\n xhrFields: {\n withCredentials: false\n },\n //headers: headers,\n crossDomain: true,\n success: _makeCallback('response', success),\n error: _makeCallback('error', error),\n complete: _makeCallback('complete', complete)\n };\n if (extend) _.extend(obj, extend);\n return obj;\n }\n\n function apiCall (params, success, error, complete) {\n var realPath = path.replace(/\\/:(\\w+)\\b/g, function (match, name) {\n if (!(name in params)) throw new Error('api:' + name + ' requires parameter ' + name);\n var val = params[name];\n delete params[name];\n return '/' + val;\n });\n return $.ajax(ajaxParams(method, realPath, params, success, error, complete));\n }\n function _makeCallback (eventType, callback) {\n var fullEvent = 'api:' + eventType + ':' + name;\n return function () {\n var evArgs = [fullEvent].concat([].slice.call(arguments));\n site.events.emit.apply(site.events, evArgs);\n (callback || noop).apply(null, arguments);\n };\n }\n }", "title": "" }, { "docid": "f73fd6e27b790fa06a68893fecf01bce", "score": "0.56905454", "text": "function testAPI() {\n console.log('Welcome! Fetching your information.... ');\n \n }", "title": "" }, { "docid": "e4222ce8e69832e7b1e01c7bfc25f535", "score": "0.5687417", "text": "go(url){\n riot.route(url);\n return this; \n }", "title": "" }, { "docid": "f92ea1a030bfcb5a6d33dec54e9ff036", "score": "0.56851006", "text": "function routerApi(app) {\n const router = express.Router();\n app.use('/api/v1', router);\n router.use('/products', productsRouter);\n router.use('/categories', categoriesRouter);\n router.use('/users', usersRouter);\n}", "title": "" }, { "docid": "43e307e68e3e7ae115f8b9ccdec3a33e", "score": "0.5684174", "text": "function call_api(input,functionName) {\n // Step 1\n // console.log(input);\n var request = new XMLHttpRequest(); // Prep to make an HTTP request\n\n // Step 2\n request.onreadystatechange = function() {\n if( this.readyState == 4 && this.status == 200 ) {\n actionFunction(this, functionName);\n }\n }\n // Step 3\n url=urlFunction(input,functionName);\n request.open(\"GET\", url, true);\n // Step 4\n request.send();\n}", "title": "" }, { "docid": "0868e70499c8dce5edf930d5b6d962ae", "score": "0.56804055", "text": "createPhoneRoute() {\n this._webApp.get('/phone', (request, response) => {\n const sensorData = this._sensors.getSensorDataSet();\n const botStatus = this._botActions.getBotStatus();\n const sensorKeys = this._sensors.getSensorKeys();\n\n response.render('phone', {\n data: sensorData,\n status: botStatus,\n sensors: this._sensors.getSensorDataSet(),\n intents: BotIntents\n })\n })\n this._webApp.route('/phone/:channel-:newValueX-:newValueY-:newValueZ')\n .post((request, response) => {\n const phoneSensorChannel = request.params.channel;\n\t const sensorValueX = request.params.newValueX;\n\t const sensorValueY = request.params.newValueY;\n\t const sensorValueZ = request.params.newValueZ;\n this._sensors.setDataValue(`phone${phoneSensorChannel}X`, sensorValueX);\n this._sensors.setDataValue(`phone${phoneSensorChannel}Y`, sensorValueY);\n this._sensors.setDataValue(`phone${phoneSensorChannel}Z`, sensorValueZ);\n const sensorData = this._sensors.getSensorDataSet();\n const botStatus = this._botActions.getBotStatus();\n response.json({\n data: sensorData,\n status: botStatus,\n })\n })\n }", "title": "" }, { "docid": "0595862058ac5024380a6f223f4b61a0", "score": "0.5668477", "text": "function appRouting(key, req, res) {\n // Processes the request\n var pathname = url.parse(req.url).pathname;\n var q = pathname.match(this.pattern) || []; // => [URL, route, id, ext]\n var route = q[1], id = q[2], ext = q[3];\n // Routes the request\n var actions = this.actions;\n if (route in actions) {\n if (id && ext) {\n // Adds the image ID and extension to the request parameters\n req.imgId = id;\n req.imgExt = ext;\n }\n this[actions[route]](key, /*params=*/req);\n }\n else\n this.notFound(key, pathname);\n}", "title": "" }, { "docid": "43fe226eae810bf574dc95b2ac3c4c2a", "score": "0.56660455", "text": "function makeHttpRoutingRequest(dateOffsetInMinutes) {\n var http = new XMLHttpRequest()\n\n // add or substract X minutes from target time\n if (timeType === \"arrival\") dateOffsetInMinutes = dateOffsetInMinutes * -1\n\n var pastDatetime = JS.addMinutesToDatestamp(selectedDate + selectedTime, dateOffsetInMinutes)\n\n // the actual url. Concatenating FTW\n var url = \"http://api.reittiopas.fi/hsl/prod/?request=route&user=\" + credentials.hslUsername + \"&pass=\" + credentials.hslPassword + \"&format=xml&show=5&from=\" +\n encodeURI(sourceCoords) + \"&to=\" + encodeURI(destinationCoords)\n + \"&timetype=\" + timeType\n\n + \"&date=\" + JS.hslDate(pastDatetime)\n + \"&time=\" + JS.hslTime(pastDatetime)\n\n console.log(url)\n\n // debugging url\n //var url=\"http://riippuliito.net/files/routing-esimerkki.xml\"\n //var url = \"http://api.reittiopas.fi/hsl/prod/?request=route&user=aikaopas&pass=agjghsra&format=xml&show=5&from=2552335,6673660&to=2546489,6675524&date=\" +\n\n //var url =\"http://api.reittiopas.fi/hsl/prod/?request=route&user=aikaopas&pass=agjghsra&format=xml&show=5&from=2550765,6672886&to=2553250,6674203&date=\" +\n // JS.hslDate(pastDatetime) + \"&time=\" + JS.hslTime(pastDatetime) + \"&timetype=arrival\"\n\n http.open(\"GET\", url, true)\n\n\n\n // Now we're searching\n httpQueryStatus = 1\n\n http.onreadystatechange = function() { // Call a function when the state changes.\n if (http.readyState == 4) {\n if (http.status == 200) {\n\n hslXml = http.responseText\n httpQueryStatus = 2\n\n } else {\n httpQueryStatus = -1\n }\n }\n }\n http.send(null);\n}", "title": "" }, { "docid": "196f103b1be73b2116a794bee7bfc8a1", "score": "0.565778", "text": "function showSingleBand() {\n console.log('hey there');\n console.log(\"id?: \", window.location);\n var url = window.location.pathname;\n console.log(\"the url\", url);\n\n $.ajax({\n method: 'GET',\n url: \"/api\"+url,\n success: renderSingleBand,\n error: renderSingleBandError\n });\n}", "title": "" }, { "docid": "e05204eaf460d284a6fa1a124f7fb1e4", "score": "0.5652621", "text": "function main() {\n\n\t\t//Check the Method\n\t\tif ($.request.method === $.net.http.GET) {\n\t\t\ttry {\n\t\t\t\tswitch (gvArea) {\n\t\t\t\t\tcase \"HEADER\":\n\t\t\t\t\t\t_getHeader();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"ITEM\":\n\t\t\t\t\t\t_getItem();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"ITEM_AMOUNT\":\n\t\t\t\t\t\t_getItemAmount();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t_getHeader();\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} catch (errorObj) {\n\t\t\t\t//Set the Response\n\t\t\t\t$.response.status = 200;\n\t\t\t\t$.response.setBody(JSON.stringify({\n\t\t\t\t\tmessage: \"API Called\",\n\t\t\t\t\tresult: gvErrorMessage\n\t\t\t\t}));\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}", "title": "" }, { "docid": "0037842dbcd7df4f5ca3898327a5383d", "score": "0.5649881", "text": "function callRemoteAPI(initalizing, siteURL, apikey) {\r\n\t var xhr = new XMLHttpRequest();\r\n\t xhr.open(\"GET\", siteURL, true); \r\n\t xhr.setRequestHeader(\"x-api-key\", apikey);\r\n\t // want to get their list of available segments\r\n\t xhr.send();\r\n\t \r\n\t // This will process results and update HTML as appropriate. \r\n\t \r\n\t xhr.onloadend = function () {\r\n\t if (xhr.readyState == XMLHttpRequest.DONE) {\r\n\t console.log (\"XHR:\" + xhr.responseText);\r\n\t processRemoteSegmentsListResponse(initalizing, xhr.responseText);\r\n\t } else {\r\n\t \tprocessRemoteSegmentsListResponse(initalizing, \"N/A\");\r\n\t }\r\n\t };\r\n\t}", "title": "" }, { "docid": "301bccfc47d94da1eeec1aab45618861", "score": "0.5649478", "text": "async _handle(req) {\n const routes = this.routes[req.method] || [];\n if (!routes.length) {\n return new Response(\"Not Found\", { status: 404 });\n }\n const url = new URL(req.url);\n // iterate over all potential routes in the order they were added\n for (const { matcher, callbacks } of routes) {\n const matches = matcher(url.pathname);\n // we always return inside this block\n // which means that only the first matching route executes\n if (matches) {\n // set the values that may be needed on req\n req.pathname = url.pathname;\n req.params = matches.params;\n req.query = query(url.searchParams);\n // iterate through all the callbacks\n // returning the first non-null response\n for (const cb of callbacks) {\n // resolve any promises first if res is a promise\n const result = await Promise.resolve(cb(req));\n if (result !== undefined) {\n // support 3 types of values for response:\n // 1. Response\n if (result instanceof Response) {\n return result;\n }\n // 2. String\n if (typeof result === \"string\") {\n return new Response(result);\n }\n // 3. JSON\n const headers = new Headers({});\n headers.append(\"Content-Type\", \"application/json\");\n return new Response(JSON.stringify(result), { headers });\n }\n }\n }\n }\n }", "title": "" }, { "docid": "d2a1a827d3c4cc04a34cf8e5c21885bd", "score": "0.5649006", "text": "setupRoutes(app) {\n app.post('/api/storage', storage_controller_server_1.default.uploadControl);\n app.get('/getFile', storage_controller_server_1.default.getFile);\n }", "title": "" }, { "docid": "11e7d3733fc8a9f230480cf20da8fb97", "score": "0.564741", "text": "function processRequest(req, res) {\n\n\tvar apiObj;\n\n\tlogger(\"REQUEST URL: \" + req.url);\n\tlogger(req.query);\n\n\t// look in the routing table for an api match\n\tapiObj = _.find(NPMLPB_ENDPOINTS, function(rec){; return ( (\"/npmapi/\"+rec.key) === req.path)});\n\n\tif (exists(apiObj)) {\n\t\t// call the configured API\n\t\treturn apiObj.func(req, res);\n\t} else {\n\t\t//------------ DEFAULT ROUTE is to try and load the requested file -------------\n\t\t// attempt to serve the request as a static asset\n\t\treq.url = req.url.replace(\"/npmapi/\", \"/\");\n\t\tlogger (\"LOADING STATIC: \" + __dirname + \"/docroot\" + req.url);\n\t\tvar done = finalhandler(req, res);\n\t\tSERVE(req,res, done);\n\t\treturn;\n\t}\n}", "title": "" }, { "docid": "e6ec18a0aaf2fa12dac35bded231ec2a", "score": "0.56435263", "text": "allapps (cbk) {\n _get('api/config/allapps', cbk, null, { baseURL: 'http://192.168.20.186:80' })\n }", "title": "" }, { "docid": "999cc9f33d8e0336afc3588cb27c0dc9", "score": "0.56412643", "text": "function getApi(city, dateTime) {\n\n const host = \"http://apier.vackertvader.se\"\n const path = {\n nextTwoDays: \":2052/talk/next_two_days?location=\",\n tenDay: \":2052/talk/ten_day?location=\",\n tenDayDate: \"&date=\"\n }\n\n function formatDateString(date) {\n let month = '' + (date.getMonth() + 1)\n let day = '' + date.getDate()\n let year = date.getFullYear()\n\n if (month.length < 2) month = '0' + month;\n if (day.length < 2) day = '0' + day;\n\n return [year, month, day].join('-');\n }\n\n let api = {\n name: converters.translateDateTime(dateTime).name,\n type: converters.translateDateTime(dateTime).type,\n url: \"\"\n }\n\n if (api.type === \"nextTwoDays\") {\n api.url = encodeURI(host + path.nextTwoDays + city)\n }\n else if (api.type === \"tenDay\") {\n api.url = encodeURI(host + path.tenDay + city + path.tenDayDate + formatDateString(dateTime))\n }\n return api\n}", "title": "" }, { "docid": "e7f161b08f4ee5a93adf5f81201107a6", "score": "0.5639659", "text": "function ApiResourceEndpoint(url){\n this.url = url;\n }", "title": "" }, { "docid": "8714039425dca7d3633c2433efd198d4", "score": "0.5639085", "text": "function call_api(rest_url) { // advance users can define api_config for advance calls\n// the api_config variable defaults to {method:'GET', header:[], body:{}}\nvar xhttp = new XMLHttpRequest(); xhttp.open(api_config.method, rest_url, false);\nfor (var item=0;item<api_config.header.length;item++) { // process headers\nif (api_config.header[item] == '') continue; // skip if header is not defined\nvar header_value_pair = api_config.header[item].split(':'); // format is 'Header_name: header_value'\nxhttp.setRequestHeader(header_value_pair[0].trim(),header_value_pair[1].trim());}\nxhttp.send(JSON.stringify(api_config.body)); return xhttp.responseText;}", "title": "" }, { "docid": "c03cee1dd7646c03c43285d4d8cf6e20", "score": "0.56236064", "text": "function buildApi(api) {\n // console.log(api.url)\n var tempUrl = api.url.replace(/\\$/g, 'By');\n tempUrl = tempUrl.replace(/((\\/|\\{)|\\})/g, '');\n var re = /\\{([a-zA-Z]+)\\}/g;\n var ar = api.url.match(re);\n // console.log(ar)\n var str = \"export function \" + api.method + tempUrl + \"(\" + (!!ar ? array2string(ar) : '') + ((api.data === \"1\") ? 'data' : '') + \"){return request({url: \" + (!!ar ? '\\`' : '\\'') + api.url + \" \" + (!!ar ? '\\`' : '\\'') + \",method:'\" + api.method + \"',\" + ((api.data === \"1\") ? 'data' : '') + \"})}\";\n return str;\n}", "title": "" }, { "docid": "cd03ad90a3f9a0964c0ab56a918b725d", "score": "0.56177896", "text": "function getApiPath(apitype) {\n var path = [];\n if (typeof (apitype) == 'undefined') {\n for (var p in minfin_api.path) {\n path.push(minfin_api.path[p]);\n }\n return '/' + path.join('/');\n } else {\n switch (apitype) {\n case 'rijksfinancien_triple':\n case 'rijksfinancien_single':\n /*\n // TEST LOCAL\n // IMPORTANT NOTICE\n */\n // /tracking/ is for test purpose only!\n minfin_api.api_url[0] = apitype == 'rijksfinancien_triple' ? '/json/v2/triple' : '/json/single';\n //console.log(minfin_api);\n for (let p in minfin_api.api_url) {\n\n var part = minfin_api.map[minfin_api.path[minfin_api.api_url[p]]] ? minfin_api.map[minfin_api.path[minfin_api.api_url[p]]] : minfin_api.path[minfin_api.api_url[p]];\n var part2 = minfin_api.map[minfin_api.path[minfin_api.api_url[p]]] ? minfin_api.map[minfin_api.path[minfin_api.api_url[p]]] : minfin_api.path[minfin_api.api_url[p]];\n if (!parseInt(p)) { // domain\n path.push(minfin_api.api_url[p]);\n }\n else if (part) { // part\n path.push(part);\n }\n }\n return encodeURI(minfin_api.api_root + path.join('/'));\n break;\n default:\n console.warn('Wrong api type ' + apitype + 'specified for getApiPath');\n return false;\n break;\n }\n }\n }", "title": "" }, { "docid": "f7bc7c481b4fd0b87553d9bf8b868352", "score": "0.5609236", "text": "function doGet( request, response ) {\n var split\n , op\n , arg\n ;\n split = request.url.split('?');\n op = split[0];\n arg = split[1];\n try {\n switch( op ) {\n case '/Materias':\n getSubjects( response );\n break;\n case '/Examenes':\n getExams( qs.parse( arg ), response );\n break;\n case '/Examen':\n getExam( qs.parse( arg ), response );\n break;\n case '/Apuntes':\n getNotes( qs.parse( arg ), response );\n break;\n case '/Apunte':\n getNote( qs.parse( arg ), response );\n break;\n default:\n http.badRequest( response, request.url );\n }\n } catch ( e ) {\n http.internalError( response, e );\n console.log( e );\n }\n}", "title": "" }, { "docid": "ee36791a3b26d23adcf47ba6d7c6c524", "score": "0.5607829", "text": "function routerInit(app, dbFull) {\n var db = dbFull.DA_HR\n\n app.get('/department_attendance', /*isAuthenticated,*/ function(req, res){\n department_attendance_list(db, req.query, function(d){\n res.setHeader('Content-Type', 'application/json');\n res.send(d);\n })\n });\n\n app.get('/attendance_report/:DEPARTMENT_ID', /*isAuthenticated,*/ function(req, res){\n var DEPARTMENT_ID = req.params.DEPARTMENT_ID;\n attendance_report(db, DEPARTMENT_ID, req.query, function(d){\n res.setHeader('Content-Type', 'application/json');\n res.send(d);\n })\n });\n\n app.get('/daily_report/:DEPARTMENT_ID', /*isAuthenticated,*/ function(req, res) {\n var DEPARTMENT_ID = req.params.DEPARTMENT_ID;\n daily_report(db, DEPARTMENT_ID, req.query, function(d) {\n res.setHeader('Content-Type', 'application/json');\n res.send(d);\n })\n });\n\n app.get('/department', /*isAuthenticated,*/ function(req, res){\n department_list(db,function(d){\n res.setHeader('Content-Type', 'application/json');\n res.send(d);\n })\n });\n\n app.get('/getDepartment', /*isAuthenticated,*/ function(req, res){\n getDepartment(db, req.query, function(d){\n res.setHeader('Content-Type', 'application/json');\n res.send(d);\n })\n });\n}", "title": "" }, { "docid": "785fcc7f86f40f4ee94d2e4ff0e11680", "score": "0.5607426", "text": "_getUrl(...args) {\n const parts = args.map(path => coreutils_1.URLExt.encodeParts(path));\n const baseUrl = this.serverSettings.baseUrl;\n return coreutils_1.URLExt.join(baseUrl, this._apiEndpoint, ...parts);\n }", "title": "" }, { "docid": "cff99ea39dec7a417b4d4c3c95f39d44", "score": "0.56045276", "text": "function onRequest(request, response) {\n var pathname = url.parse(request.url).pathname;\n console.log(\"-GET [\" + pathname + \"]\");\n\n route(handle,pathname,response);\n }", "title": "" }, { "docid": "7d95166a5c442d3b547915215468e412", "score": "0.5598014", "text": "init() {\n this.router.get('/', this.getAll);\n this.router.get('/:id', this.getOne);\n }", "title": "" }, { "docid": "7d95166a5c442d3b547915215468e412", "score": "0.5598014", "text": "init() {\n this.router.get('/', this.getAll);\n this.router.get('/:id', this.getOne);\n }", "title": "" }, { "docid": "0f8052aa26fcbfdb46d20311990ede76", "score": "0.55960315", "text": "objectUrl(type) {\n // map type to service\n for(let [service, types] of Object.entries(this.apiMap)) {\n if(types.includes(type)) {\n // found matching service & type in api map \n const objectUrl = `${this.apiRoot}/${service}/${type}`;\n return objectUrl;\n }\n }\n \n throw new Error(`API: Unknown api type: ${type}`);\n }", "title": "" }, { "docid": "38451e8ff0c1106e22c129888fb966c8", "score": "0.5592276", "text": "function _apiview(req,res,next){\n\t\tres.render('apiview');\n}", "title": "" }, { "docid": "bb70cef9b73ac493898ea7e9dca2ab87", "score": "0.559191", "text": "apiRestTest(){}", "title": "" }, { "docid": "1728bc867cfd8b08f9132b51076db0d2", "score": "0.5589946", "text": "function makeCall(req, res){\n console.log('Hey, I caught that info. Sending to api now.')\n\n var url= req.body.url\n var path=req.body.path\n var query= req.body.query\n\n var options = { method: 'GET',\n url: url ,//'https://sharpspring.zendesk.com/api/v2/search.json/'\n qs: { query: query },//'type:ticket created<2017-02-15 created>2017-02-13 status>=solved'\n headers:\n { //'postman-token': 'b1fb188a-8f33-1d57-d44b-f98bc90ab4e9',\n 'cache-control': 'no-cache',\n authorization: 'Basic '+api_key } };\n\n\n request(options, function (error, res, body) {\n if (error) throw new Error(error);\n // console.log(\"api queried\")\n\n }).pipe(res)\n\n\n }", "title": "" }, { "docid": "e49ebaf83f30b47f37dcc09712a2fe25", "score": "0.558195", "text": "function dispatcher(url, requestBody) {\n\n console.log('Got request for URL: ' + url);\n\n usageStatisticsDao.incrementUsageCount(url);\n\n if (url === '/') {\n return serveClient();\n } else if (url === '/robots.txt') {\n return {type: 'PROMISE/TEXT', data: q.resolve('User-agent: *\\nDisallow:\\n'), contentType: 'text/plain'}\n } else if (url === '/api/translate') {\n return translateAPI.translate(requestBody);\n } else if (url === '/api/tts') {\n return translateAPI.tts(requestBody);\n } else if (url === '/api/languages') {\n return translateAPI.getLanguagesList();\n } else {\n return q.reject(`Unknown URL: ${url}`);\n }\n}", "title": "" }, { "docid": "841c3725613b79502a4ef4bf16b4715f", "score": "0.5580592", "text": "function RefreshAllRoutes(a){\n\t////console.log(\"Refresing all Routes\");\n\tfor(var i = 0; i<MonuApp.instances.length; i++){\n\t\tMonuApp.instances[i].ProcessUrl();\n\t}\n}", "title": "" }, { "docid": "b11e277cb032adf0650245d414c8fbe0", "score": "0.557844", "text": "function ApiUrl(param) {\r\n Url.call(this);\r\n this.setDefaultParams();\r\n\tthis.apiList = {\r\n\t\t'aSpot': settings.get('urls.apiBaseUrl') + 'webservice.php?controller=bestseller&type=bestsellerwomanday_product',\r\n\t\t'category': settings.get('urls.apiBaseUrl') + 'webservice.php?controller=category',\r\n\t\t'productInCategory': settings.get('urls.apiBaseUrl') + 'webservice.php?controller=product',/*&categoryID=59*/\r\n\t\t'productDetail': settings.get('urls.apiBaseUrl') + 'webservice.php?controller=product',/*&productID=270*/\r\n\t\t'shoppingCart': settings.get('urls.apiBaseUrl') + 'webservice.php?controller=shoppingcart&method=getBasket&customername=user',\r\n\t};\r\n}", "title": "" }, { "docid": "fc8ce372c0c64e62e41d3aa42003a270", "score": "0.5576958", "text": "function api(path) {\n if (/^http/.test(path)) {\n return path;\n }\n return `${API_PREFIX}${path}`;\n}", "title": "" }, { "docid": "c429b57ef0bf03d2ae7a095235a877b0", "score": "0.5576184", "text": "baseRouteParam() {\n this.router.route('/:id')\n .get(this.authenticate, (req, res) => {\n this.userCtrl.getUser(req, res);\n })\n .put(this.authenticate, (req, res) => {\n this.userCtrl.updateUser(req, res);\n })\n .delete(this.authenticate, (req, res) => {\n this.userCtrl.deleteUser(req, res);\n });\n }", "title": "" }, { "docid": "3cdc300b020ce2d856761b5a48459537", "score": "0.55699193", "text": "static setupRoutes() {\n // this is a route. the asterisk denotes that the route applies to \n // all incoming path requests.\n Server.app.all('*', function(req, res, next) {\n console.log('Requested path: ', req.path); // the reuested URI\n console.log('Query string: ', req.query); // the querystring for GET requests\n\n // our req object tells about the HTTP request.\n // our res object gives us access to control the response.\n // our next object allows us to programmatically goto the next route\n next(); // goto the next routes\n\n // if we didn't call next, we'd never fulfill the request!\n });\n }", "title": "" } ]
7c1c4667069332ce8dec0a1761f2eb3e
This assumes forms generate timestamps and which is in first column
[ { "docid": "740a0179747c189c79786ea5ba98ad01", "score": "0.0", "text": "function deleteOldLogs() {\n //Get active spreadsheet. Add this function into sheet script editor\n var ss = SpreadsheetApp.getActiveSpreadsheet();\n var sheet = ss.getSheets()[0];\n var data = sheet.getDataRange().getValues(); //Get all data\n var today = new Date(); //Get current date \n var now = today.getTime(); //Get time in milliseconds\n// Leaves row 0 as it is header\n for(n=data.length-1;n>0;--n){\n var newDate = new Date(data[n][0]) //Create new date with timestamp. Change '0' if timestamp is not in first column\n var dataTime = newDate.getTime(); \n if ( dataTime < now) { //check if it is less than current time\n data.splice(n,1); //Clear cells\n }\n }\n sheet.clearContents(); // Get rid of old contents, then write new\n sheet.getRange(1, 1, data.length, data[0].length).setValues(data);\n}", "title": "" } ]
[ { "docid": "23eb82901c4e2aaea19945dd3aaa9b91", "score": "0.5729284", "text": "function setTimeStamp() {\r\n\t//timestamp is required for DuplicateClickFilter to avoid sending duplicate requests (ex. doubleclick)\r\n\tvar date = new Date();\r\n\t//expecting a form with id \"Form\", sometimes may not be available (ex error page)\r\n\tif (document.getElementById(\"Form\")) {\r\n\t\t//form found, check if timestamp exists\r\n\t\tvar timeStamp = document.getElementById(\"Form:TimeStamp\");\r\n\t\tif (timeStamp == null) {\r\n\t\t\t//no timestamp, create one\r\n\t\t\ttimeStamp = document.createElement(\"input\");\r\n\t\t\ttimeStamp.setAttribute(\"type\", \"hidden\");\r\n\t\t\ttimeStamp.setAttribute(\"id\", \"Form:TimeStamp\");\r\n\t\t\ttimeStamp.setAttribute(\"name\", \"Form:TimeStamp\");\r\n\t\t\ttimeStamp.setAttribute(\"value\", \"\");\r\n\t\t\tdocument.getElementById(\"Form\").appendChild(timeStamp);\r\n\t\t}\r\n\t\t//set timestamp value to current time\r\n\t\ttimeStamp.value = date.getTime();\r\n\t}\r\n}", "title": "" }, { "docid": "41b4b51e2b71fd93824797fb7db63e7d", "score": "0.56970376", "text": "addTimestampField() {\n const definition = {};\n definition.$class = `${MetaModelNamespace}.DateTimeProperty`;\n definition.name = '$timestamp';\n this.properties.push(new Field(this, definition));\n }", "title": "" }, { "docid": "b1efd412837c9920ff9d186d60d1849e", "score": "0.56038123", "text": "function render_timestamp(data, type, row, meta) {\r\n if (type == \"display\") return gui.date.format_timestamp(data)\r\n else return data\r\n }", "title": "" }, { "docid": "ab2c23df916c59eceded13b1b11e80fd", "score": "0.5597296", "text": "function createAndSaveTimestamp() {\n\tsetTimestamp(newTimestamp);\n}", "title": "" }, { "docid": "40f09bc38fed7063f1a337920a262745", "score": "0.55712974", "text": "set timestamp(value) {}", "title": "" }, { "docid": "40f09bc38fed7063f1a337920a262745", "score": "0.55712974", "text": "set timestamp(value) {}", "title": "" }, { "docid": "3164be0524088d0615ec947f63cdddd5", "score": "0.5519598", "text": "renderForm() {\n return (\n <form onSubmit={this.submitTimestamp}>\n <FieldGroup name=\"email_address\" id=\"formsControlsEmail\" label=\"Email address\" type=\"email\"\n value={this.state.email_address} placeholder=\"[email protected]\" help=\"\"\n onChange={this.handleChange}/>\n <FieldGroup name=\"repeat_email\" id=\"formsControlsEmail\" label=\"Repeat Email address\" type=\"email\"\n value={this.state.repeat_email} placeholder=\"[email protected]\" help=\"\"\n onChange={this.handleChange}\n validation={validateEmail(this.state.email_address, this.state.repeat_email)}/>\n <FieldGroup name={Constants.FILE} id=\"formsControlsFile\" label=\"File\" type=\"file\" placeholder=\"\"\n help=\"File you wish to timestamp\" onChange={this.handleChange}/>\n <SubmitButton running={this.state.waitingFeedback}/>\n </form>\n );\n }", "title": "" }, { "docid": "cd3687790b2d02bb677aa2e8812b1cc8", "score": "0.5423529", "text": "timestamp () {\n return moment().format('YYYYMMDD-HH:mm:ss')\n }", "title": "" }, { "docid": "264ef49364ed4ccf070a1b709b2d48e3", "score": "0.54190934", "text": "function addTreatmentDateRange( rows ) {\n if( 0 === rows.length ) {\n formData.from = '';\n formData.to = '';\n } else {\n formData.from = -1;\n formData.to = -1;\n\n for( i = 0; i < rows.length; i++ ) {\n formData.from = (-1 === formData.from) ? rows[i].timestamp : formData.from;\n formData.to = (-1 === formData.to) ? rows[i].timestamp : formData.to;\n\n formData.from = (rows[i].timestamp < formData.from) ? rows[i].timestamp : formData.from;\n formData.to = (rows[i].timestamp > formData.to) ? rows[i].timestamp : formData.to;\n }\n\n formData.from = moment.utc( formData.from ).local().format( 'DD.MM.YYYY' );\n formData.to = moment.utc( formData.to ).local().format( 'DD.MM.YYYY' );\n }\n }", "title": "" }, { "docid": "c0305a35ee98127c1106fdc60e36e424", "score": "0.5410327", "text": "function get_ts($scope)\n{\n return \"?timestamp>=\" + $scope.form_data.min_date + \"&timestamp<\" + $scope.form_data.max_date;\n}", "title": "" }, { "docid": "03dfafcf7b03e2fd919d97e54fe8096a", "score": "0.5400691", "text": "function stamping(field)\n{\n\n\tTable.getStamp(field);\n\n}", "title": "" }, { "docid": "29ed9af0f876b0f0b90c6c6bbea3dfcd", "score": "0.5386323", "text": "enterTimestampValue(ctx) {\n\t}", "title": "" }, { "docid": "1f3d81b691d864385fae366999be7bd8", "score": "0.53451735", "text": "getCurrentTimestampSQL(length) {\n return 'current_timestamp' + (length ? `(${length})` : '');\n }", "title": "" }, { "docid": "8c451cb7dcd55bb3bcc600fd082b020b", "score": "0.53190416", "text": "reformatTimestamp() {\n if (!this.date) return;\n\n const { timestamp, title } = this.formatTimestamp(this.date, this.timestampElement.textContent);\n if (timestamp) {\n this.reformattedTimestamp = timestamp;\n this.timestampTitle = title;\n if (!settings.get('reformatComments') || this.extraSignatures.length) {\n this.timestampElement.textContent = timestamp;\n this.timestampElement.title = title;\n (new LiveTimestamp(this.timestampElement, this.date, !settings.get('hideTimezone'))).init();\n this.extraSignatures.forEach((sig) => {\n const { timestamp, title } = this.formatTimestamp(sig.date, sig.timestampText);\n sig.timestampElement.textContent = timestamp;\n sig.timestampElement.title = title;\n (new LiveTimestamp(sig.timestampElement, sig.date, !settings.get('hideTimezone'))).init();\n });\n }\n }\n }", "title": "" }, { "docid": "3d3a41b4c9e6ec36a0377791b9d50c4e", "score": "0.5313991", "text": "updateDateChanges(rowIndex, field, e){\n let tmpRows = this.state.rowData;\n let row = tmpRows[rowIndex];\n row[field] = e.value;\n tmpRows[rowIndex] = row;\n if(this.state.rowData.length === rowIndex+1){\n let line = {'from': '', 'until': ''};\n tmpRows.push(line);\n }\n this.setState({\n rowData: tmpRows\n });\n }", "title": "" }, { "docid": "e8fdb2f289f84a062147c355c0e9d1b5", "score": "0.52963394", "text": "get createTimestamp() {\n return this.getStringAttribute('create_timestamp');\n }", "title": "" }, { "docid": "8d8aee6be6e43b70e4b7bc7815465914", "score": "0.52836704", "text": "function timeStamp(e) {\n // store in an array the input values of the three input elements\n let inputValues = [];\n inputs.forEach((input) => inputValues.push(input.value));\n // console.log(inputValues);\n\n // create three variables out of the three items of the array (destructuring the first, second, third item in respective variables)\n let [day, month, year] = inputValues;\n // dedcrement the month value (as the date object in the year-month-day format accepts month values ranging from 0 to 11)\n month = month - 1;\n // console.log(day, month, year);\n\n // create an instance of the date object\n let date = new Date(year, month, day);\n\n // include the instance in the heading and visualize it changing its opacity\n heading.textContent = date;\n heading.style.opacity = 0.9;\n\n // potentially populate the input elements with new, random values\n // ! this makes for less intuitive user interaction, motivating the commented line (but it is useful for testing different values)\n // includeRandomValues();\n}", "title": "" }, { "docid": "e0a3f6e374be468328bceb80ce85d3a4", "score": "0.52614594", "text": "function submitHandler() {\n d3.event.preventDefault();\n\n var inputValue = d3.select(\"#datetime\").property(\"value\");\n var filteredData = tableData.filter(tableData => tableData.datetime === inputValue);\n\n buildTable(filteredData);\n}", "title": "" }, { "docid": "faebd78cdbf2db9a8877edb0493e4465", "score": "0.5254988", "text": "function userSpecifiedTime(){\n // Define the correct format for time and date\n let regexTimeFormat = new RegExp('^([0-1][0-9]|[2][0-3]):([0-5][0-9])$'); // Valid HH:MM\n let regexDateFormat = new RegExp('^(19|20)\\\\d\\\\d[- /.](0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])$') // Valid yyyy-mm-dd\n\n // Get all the values from the form\n let fromTime = document.forms[\"time-picker\"][\"time-from\"].value;\n let fromDate = document.forms[\"time-picker\"][\"date-from\"].value;\n let toTime = document.forms[\"time-picker\"][\"time-to\"].value;\n let toDate = document.forms[\"time-picker\"][\"date-to\"].value;\n\n // Check the format for time\n if (!regexTimeFormat.test(fromTime) || !regexTimeFormat.test(toTime)){\n alert('Bruk riktig format for tid: HH:MM');\n } else if (!regexDateFormat.test(fromDate) || !regexDateFormat.test(toDate)){\n // Check the format for date\n alert('Bruk riktig format for dato: yyyy-mm-dd');\n } else {\n // Check the start time is before end time\n let startTime = new Date(fromDate +'T' + fromTime)\n let stopTime = new Date(toDate +'T' + toTime)\n if (startTime > stopTime){\n alert(\"Fra tiden må være før til tiden\")\n } else {\n let dataToSend = {\n startTime: startTime.getTime(),\n stopTime: stopTime.getTime(),\n sensorID: sensorID,\n dataType: 'SensorID'\n }\n console.log(dataToSend)\n // Send data request for sensor data\n socket.emit(\"getData\", JSON.stringify(dataToSend));\n if (sensorSettings[Object.keys(sensorSettings)[0]]['controlledItem'] === true) {\n // Send data request for controlled item if it is used\n dataToSend.dataType = 'ControlledItemID';\n socket.emit(\"getData\", JSON.stringify(dataToSend));\n }\n }\n }\n\n // console.log(regexDateFormat.test(fromDate))\n // console.log(regexTimeFormat.test(toTime))\n // console.log(toDate)\n // console.log(regexDateFormat.test(toDate))\n}", "title": "" }, { "docid": "4f86f3637b0ce2b2c82e78b50e0f72ff", "score": "0.52467805", "text": "handlecreatedAtChange(e) {\n const createdAt = e.target.value \n this.setState(() => ({ createdAt }))\n }", "title": "" }, { "docid": "30d4279abc6f80004c6f936d6f711286", "score": "0.52200437", "text": "function insertTimeStamp(pin) {\n pin.timestamp = Date.now();\n}", "title": "" }, { "docid": "5b2d4c0812ab3915b558758175809b4c", "score": "0.5211486", "text": "function renderTemporal(){\n for (i=0; i<24; i++) {\n if (i<hour){\n $(\"#\"+ i + \"Input\").attr(\"temporal\", \"past\")\n }\n else if (i==hour){\n $(\"#\"+ i + \"Input\").attr(\"temporal\", \"present\")\n }\n else {\n $(\"#\"+ i + \"Input\").attr(\"temporal\", \"future\")\n }\n }\n}", "title": "" }, { "docid": "796e072635a41e4c1afa156a97599236", "score": "0.52062833", "text": "submit(data, formRef) {\n const { name, className, reason, date, description, findGroup } = data;\n const owner = Meteor.user().username;\n const time = date.getTime();\n const offset = date.getTimezoneOffset() * 60 * 1000;\n const newTime = time + offset;\n const newDate = new Date(newTime);\n let hours = date.getHours();\n let minutes = date.getMinutes();\n const ampm = hours >= 12 ? 'pm' : 'am';\n hours %= 12;\n hours = hours || 12; // the hour '0' should be '12'\n minutes = minutes < 10 ? `0${minutes}` : minutes;\n const timeStr = `${hours}:${minutes} ${ampm}`;\n\n // eslint-disable-next-line no-console\n console.log(timeStr);\n\n const monthNames = ['January', 'February', 'March', 'April', 'May', 'June',\n 'July', 'August', 'September', 'October', 'November', 'December',\n ];\n Stuffs.collection.insert({\n name,\n className,\n reason,\n time: timeStr,\n month: monthNames[newDate.getMonth()],\n day: newDate.getDate().toString(),\n year: newDate.getFullYear().toString(),\n description,\n findGroup,\n owner,\n },\n (error) => {\n if (error) {\n swal('Error', error.message, 'error');\n } else {\n swal('Success', 'Session added successfully', 'success');\n formRef.reset();\n }\n });\n }", "title": "" }, { "docid": "21855bab4da54d2423b378b55790c516", "score": "0.5196867", "text": "function setdatefields() {\r\n var start_date = document.getElementById(\"startdate\");\r\n var start_time = document.getElementById(\"starttime\");\r\n var end_date = document.getElementById(\"enddate\");\r\n var end_time = document.getElementById(\"endtime\");\r\n start_date.value = moment().subtract(1,'days').format(\"YYYY-MM-DD\");\r\n end_date.value = moment().format(\"YYYY-MM-DD\");\r\n\r\n var now = moment();\r\n var ago = moment().subtract(24,'hours');\r\n start_date.value = ago.format(\"YYYY-MM-DD\");\r\n start_time.value = ago.format(\"HH:mm\");\r\n end_date.value = now.format(\"YYYY-MM-DD\");\r\n end_time.value = now.format(\"HH:mm\");\r\n}", "title": "" }, { "docid": "4ec756ada5cdd6c29e0071ce3e30c1f9", "score": "0.5193041", "text": "function timeIndField(thisform, prefix)\r\n{\r\n return thisform.elements[prefix + timeIndSuffix];\r\n}", "title": "" }, { "docid": "6798af0c218d69329254f464d2cbd8f1", "score": "0.5170655", "text": "get timestamp() {}", "title": "" }, { "docid": "6798af0c218d69329254f464d2cbd8f1", "score": "0.5170655", "text": "get timestamp() {}", "title": "" }, { "docid": "b0b59dd934930aa03f964886ef1be620", "score": "0.5160814", "text": "_refreshInputs() {\n // Set Time -- assuming 12-hour time for the input fields and ISO 24-hour time for the field\n const hours = PrimeDate.getHourOfDay(this.date);\n this.hourInput.setValue(hours);\n\n const minutes = this.date.getMinutes();\n this.minuteInput.setValue((\"00\" + minutes).slice(-2));\n\n const seconds = this.date.getSeconds();\n this.secondInput.setValue((\"00\" + seconds).slice(-2));\n\n if (this.date.getHours() >= 12) {\n this.ampmInput.setValue(DateTimePicker.AM_PM[1]);\n } else {\n this.ampmInput.setValue(DateTimePicker.AM_PM[0]);\n }\n\n this.monthInput.setValue(this.date.getMonth() + 1);\n this.dayInput.setValue(this.date.getDate());\n this.yearInput.setValue(this.date.getFullYear());\n }", "title": "" }, { "docid": "fb86ab9969da7f7125f96ffcd4cec51c", "score": "0.5144951", "text": "render() {\n return (\n <div className=\"Addentry-Container\">\n <form >\n <div className=\"addEntry-form\">\n <input \n type=\"text\" \n id=\"activity\" \n value={this.state.activity} \n placeholder={\"Activity Name\"}\n name={\"activity\"}\n onChange={e => this.onChange(e.target)}\n />\n <input \n type=\"time-local\" \n id=\"starttime\" \n name=\"starttime\" \n value={this.state.starttime} \n placeholder={\"Start Time\"}\n onChange={e => this.onChange(e.target)}\n />\n <input \n type=\"time-local\" \n id=\"endtime\" \n name=\"endtime\" \n value={this.state.endtime} \n placeholder={\"End Time\"}\n onChange={e => this.onChange(e.target)}\n />\n\n <button className=\"Button\" type=\"submit\" onClick={(event) => this.handleSubmit(event)}\n >\n Go</button>\n </div>\n </form>\n </div>\n );\n }", "title": "" }, { "docid": "c8eae1fdcea3a39d6098eb0dd8ca4221", "score": "0.5121658", "text": "getTimestamp() {\n return firebase.firestore.Timestamp.now().toDate();\n }", "title": "" }, { "docid": "df85981648ce236b5bdfecd4d62cd190", "score": "0.5097582", "text": "render() {\n \tconst inputProps = {name: 'appt_time'};\n return(\n\t <div>\n <h2>\n {this.state.editing ?\n 'Edit appointment' : 'Make a new appointment'}\n\t </h2>\n\t <FormErrors formErrors={this.state.formErrors} />\n\t <Label label= \"Enter Date and Time of Appointment\" />\n\t {/*Create the form and call the handleSubmit on submit*/}\n\t <form onSubmit={this.handleFormSubmit}>\n\t {/*Input for appointment title/description*/}\n\t {/*when changed we call the handleChange function*/}\n\t <input name='title' placeholder=\"Quick description\" \n\t \n\t value={this.state.title.value}\n\t onChange={this.handleChange} />\n\t \n\t\t {/*Input for appointment datetime*/}\t \n\t\t {/*This is a DateTime React component from datetime-react*/}\t \n\t\t {/*We dont want it as an input field input={false} */}\t \n\t\t {/*But rather as an opened calendar open={true} */}\n\t\t {/*We pass the input name as inputProps */}\t \t \n\t\t {/*We call setApptTime when input is changed */}\t \t \n\t <Datetime inputProps={inputProps} \n\t value={moment(this.state.appt_time.value)}\n\t input={false} open={true} \n\t onChange={this.setApptTime} />\n\t <input type=\"submit\" value={this.state.editing ? 'Update Appointment' : 'Save Appointment'}\n\t className=\"submit-button\" disabled={!this.state.formValid}/>\n\t </form>\n {this.state.editing && (\n <p>\n <button onClick={this.deleteAppointment}>\n Delete Appointment\n </button>\n </p>\n )\n }\n\t </div> \n \t)\n }", "title": "" }, { "docid": "49e1d424b8879202ddfacb8a6e074ed3", "score": "0.5081363", "text": "function getNow() {\r\n timestamp = Date.parse(document.getElementById('textDate').value);\r\n GetNowPressed = true;\r\n if (isNaN(timestamp) == false) {\r\n time = parseDateString(document.getElementById('textDate').value)\r\n //console.log(time)\r\n callServerTime(time, FilterType);\r\n }\r\n else {\r\n //console.log(time)\r\n var dt = time.toISOString().slice(0, 19).replace('T', ' ');\r\n document.getElementById('textDate').value = dt;\r\n }\r\n}", "title": "" }, { "docid": "12eb642d33d7a20178cfe36528723060", "score": "0.5072119", "text": "handleFormSubmit(e) {\n const { bookingDates, startTime, endTime } = e || {};\n if (!bookingDates.date) {\n e.preventDefault();\n } else {\n this.props.onSubmit({ bookingDates: this.getDateTimeBooking(bookingDates.date, startTime, endTime) });\n }\n }", "title": "" }, { "docid": "7f69125004f73eac16bb8ea653397b69", "score": "0.5031775", "text": "function dateTimeBlank(thisform, prefix)\r\n{\r\n return (dateBlank(thisform, prefix) && timeBlank(thisform, prefix));\r\n}", "title": "" }, { "docid": "9cec3afc68ca3cfe40071ad2c9c165a7", "score": "0.50273937", "text": "function bootstrap1() {\n var x = $(\"#begin_time\").val();\n var y = $(\"#end_time\").val();\n console.log(x, y);\n var ux = moment(x).valueOf();\n var uy = moment(y).valueOf();\n uxs = moment(ux).unix();\n uys = moment(uy).unix();\n console.log(uxs, uys);\n}", "title": "" }, { "docid": "034b3ae3a0bbe138eff5616c56ce6776", "score": "0.5024622", "text": "function recordTime (startOrStop) {\n var timeField = document.getElementById(startOrStop);\n var now = new Date();\n timeField.value = now.toLocalISOString();\n}", "title": "" }, { "docid": "fa61ffa56784dc4f42884c1036e52e48", "score": "0.5022088", "text": "handleTextUpdate(event) {\r\n\t\tconst\tform\t\t= this.state.form,\r\n\t\t\t\tfieldName\t= event.target.name;\r\n\r\n\t\tform[fieldName] = event.target.value;\r\n\r\n\t\tthis.setState({\r\n\t\t\tform\r\n\t\t});\r\n\r\n\t\t// Separate function for publish at field, to format a proper date\r\n\t\tif([\"publishYear\", \"publishMonth\", \"publishDay\", \"publishHour\", \"publishMinute\"].indexOf(fieldName) > -1) {\r\n\t\t\tthis.setPublishAtDate();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "175267228c7ea8b514f337f4973b6d7e", "score": "0.5017041", "text": "static timestamp(timestamp) { return new WaitTime({ Timestamp: timestamp }); }", "title": "" }, { "docid": "06e354a15e8d756350517da2d958a0b8", "score": "0.5011092", "text": "getFormattedTime(timestamp) {\n if(! timestamp) return '';\n return moment.unix(timestamp).format(\"YYYY-MM-DD HH:mm\");\n }", "title": "" }, { "docid": "e7f0f2e075fd946334bfb7d60063620d", "score": "0.50099", "text": "insertTimeNowToField(keyPath) {\n this.changeField(keyPath, '{iso}');\n }", "title": "" }, { "docid": "772f507a866ffe4bf917087b5271a0f2", "score": "0.5009483", "text": "async function getDateTime(taskId,user){\r\n const taskDoc=await db.collection(\"tasks\").doc(taskId).get()\r\n document.getElementById('task').innerText+=\" \"+taskDoc.get('title')\r\n document.getElementById('student_rp').innerText+=\" \"+taskDoc.get('assignedTo').join(', ')\r\n document.getElementById('duedate').innerText+=\" \"+Date(taskDoc.get('dueDate'))\r\n\r\n const timeDoc= await db.collection(\"tasks\").doc(taskId).collection(\"time_entry\").\r\n doc(user).get()\r\n if(timeDoc.get('startDate')!=null && timeDoc.get('endDate')){\r\n const startDate= timeDoc.get('startDate').toDate();\r\n const endDate = timeDoc.get('endDate').toDate();\r\n \r\n //add offset so it matches local time\r\n const offset = startDate.getTimezoneOffset()\r\n local_startDate = new Date(startDate.getTime() - (offset*60*1000))\r\n local_endDate = new Date(endDate.getTime() - (offset*60*1000))\r\n //get date from ISO string\r\n enterTimeForm['startDate'].value=local_startDate.toISOString().split('T')[0]\r\n enterTimeForm['endDate'].value=local_endDate.toISOString().split('T')[0]\r\n\r\n //get time from ISO string\r\n enterTimeForm['startTime'].value=local_startDate.toISOString().split('T')[1].slice(0,5)\r\n enterTimeForm['endTime'].value=local_endDate.toISOString().split('T')[1].slice(0,5)\r\n }\r\n \r\n}", "title": "" }, { "docid": "1c9d7178ec1aeef818efeba6b42bb37e", "score": "0.5007369", "text": "handleSubmit(event) {\n event.preventDefault();\n var timeString;\n\n\n let tsValue = document.getElementById(\"tsInput\").value;\n if (isNaN(tsValue)) {\n this.setState({ TSError: true })\n }\n else {\n this.setState({ TSError: false })\n this.setState({\n nanoTime: this.convertTime(Math.floor(tsValue / 1000000)),\n });\n this.setState({\n microTime: this.convertTime(Math.floor(tsValue / 1000)),\n });\n this.setState({ miliTime: this.convertTime(Math.floor(tsValue)) });\n\n if (tsValue < 8640000000000) {\n this.setState({ secondTime: this.convertTime(tsValue * 1000) });\n } else {\n this.setState({ secondTime: \"out of range\" });\n }\n }\n }", "title": "" }, { "docid": "354d0860ad1db9960f3f37b8d7374e2b", "score": "0.50063276", "text": "render() {\n this.timekeyConfigure = {\n enter: 'enter',\n escape: 'escape',\n end: 'end',\n tab: 'tab',\n home: 'home',\n down: 'downarrow',\n up: 'uparrow',\n left: 'leftarrow',\n right: 'rightarrow',\n open: 'alt+downarrow',\n close: 'alt+uparrow'\n };\n this.valueWithMinutes = null;\n this.previousDateTime = null;\n this.isPreventBlur = false;\n this.cloneElement = this.element.cloneNode(true);\n this.dateTimeFormat = this.cldrDateTimeFormat();\n this.initValue = this.value;\n super.updateHtmlAttributeToElement();\n this.checkAttributes(false);\n let localeText = { placeholder: this.placeholder };\n this.l10n = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"L10n\"]('datetimepicker', localeText, this.locale);\n this.setProperties({ placeholder: this.placeholder || this.l10n.getConstant('placeholder') }, true);\n super.render();\n this.createInputElement();\n super.updateHtmlAttributeToWrapper();\n this.bindInputEvents();\n this.setValue();\n this.previousDateTime = this.value && new Date(+this.value);\n if (this.element.tagName === 'EJS-DATETIMEPICKER') {\n this.tabIndex = this.element.hasAttribute('tabindex') ? this.element.getAttribute('tabindex') : '0';\n this.element.removeAttribute('tabindex');\n if (!this.enabled) {\n this.inputElement.tabIndex = -1;\n }\n }\n this.renderComplete();\n }", "title": "" }, { "docid": "247807164bf513f99e50fb25c8397096", "score": "0.50049955", "text": "function logSubmit(event){\n log.textContent = `Form Submitted! Time stamp: ${event.timeStamp}`;\n event.preventDefault();\n}", "title": "" }, { "docid": "11b0e8b354ee464d659ee09105c856e0", "score": "0.49988985", "text": "function validateTimeForHansonTable(element) { \n var time_format = /^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$/;\n var time_value = element.val();\n \n if(time_value.match(time_format) == null) {\n if(time_value != \"\") {\n element.val(\"\");\n }\n }\n \n return element.val();\n}", "title": "" }, { "docid": "643eec0210539b127179ffe70aa1890f", "score": "0.49794635", "text": "function parseToTimeOld(counter, rangemodifier){\n\tvar unformatedStringDate = document.getElementById('Date'+rangemodifier+counter);\n\tvar unformatedStringTime = document.getElementById('Time'+rangemodifier+counter); \n\t\n if (unformatedStringTime.value.length == 0 && unformatedStringDate.value.length == 10){ // for Date\n \tvar date = unformatedStringDate.value.split('.'); \n for (var i=0; i<date.length; i++){ \n \tdate[i] = makeNumbers(date[i]); \n } \n var formatedString = 'Date(' + date[0] + ',' + date[1] + ',' + date[2] + ')'; \n var temp = document.getElementById('DateTime'+rangemodifier+counter);\n temp.value = formatedString; \n\t}\n if (unformatedStringTime.value.length == 8 && unformatedStringDate.value.length == 0){ // for Time\n var time = unformatedStringTime.value.split(':'); \n for (var i=0; i<time.length; i++){ \n time[i] = makeNumbers(time[i]); \n } \n var formatedString = 'Time(' + time[0] + ',' + time[1] + ',' + time[2] + ')'; \n var temp = document.getElementById('DateTime'+rangemodifier+counter);\n temp.value = formatedString; \n }\n if (unformatedStringTime.value.length == 8 && unformatedStringDate.value.length == 10){ \n var time = unformatedStringTime.value.split(':'); \n var date = unformatedStringDate.value.split('.'); \n for (var i=0; i<time.length; i++){ \n time[i] = makeNumbers(time[i]); \n } \n for (var i=0; i<date.length; i++){ \n date[i] = makeNumbers(date[i]); \n } \n var formatedString = 'DateTime(' + date[0] + ',' + date[1] + ',' + date[2] + ',' + time[0] + ',' + time[1] + ',' + time[2] + ')'; \n var temp = document.getElementById('DateTime'+rangemodifier+counter); \n temp.value = formatedString; \n } \n}", "title": "" }, { "docid": "1a597cadef3b5ba621ada6f572115c46", "score": "0.49745134", "text": "function validTimestamp(input) {\n // eslint-disable-next-line no-restricted-globals\n if (!isNaN(input)) return false;\n return new Date(input).getTime() > 0;\n}", "title": "" }, { "docid": "c3b0dfc0bf2ac92b07bbcd092854e624", "score": "0.49700963", "text": "function influxFIXTIMSTAMPS(tableName) {\n dosisInflux.query(`\n select * from ${tableName}\n order by time asc\n `).then(results => {\n //\n results.forEach(rslt => {\n //\n var reactionId = rslt.reaction,\n module = null,\n OD = rslt.OD,\n Temp = rslt.Temp,\n ts = rslt.id;\n influxWriteSensorDatum(reactionId,module,OD,Temp,ts)\n });\n });\n}", "title": "" }, { "docid": "d8a9481474d2c522707e1ed5abb5efb4", "score": "0.4960401", "text": "submit(e) {\n let newValidationErrors = [];\n let startTime = Date.parse(this.state.date);\n if (!startTime) {\n newValidationErrors.push(\"datetimeBefore\");\n this.setState({\n validationErrors: newValidationErrors\n })\n return;\n }\n startTime = new Date(startTime);\n startTime.setHours(this.state.time.substr(0, 2), this.state.time.substr(3, 2));\n // Ensures the time is still in the future\n let d = new Date();\n if (d > startTime) {\n newValidationErrors.push(\"datetimeBefore\");\n this.setState({\n validationErrors: newValidationErrors\n })\n } else {\n startTime = startTime.getTime();\n let objToSend = {\n title: this.state.title,\n startTime: startTime,\n duration: this.state.duration,\n questions: this.state.questions\n };\n // Sends the data to the server\n fetch((process.env.REACT_APP_HTTP_ADDRESS || \"\") + `/api/events`, {\n method: \"POST\",\n headers: {\n 'Accept': 'application/json',\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(objToSend),\n credentials: \"include\"\n }).then(e => e.json()).then(data => {\n if (data.status == 'success') {\n this.setState({\n status: 'success',\n eventCode: data.data.eventCode\n });\n // Redirects to the event\n this.props.history.push(`/event/${data.data.eventCode}`);\n }\n else { //Stores the error to show to the user\n this.setState({\n status: 'error',\n error: data.message\n })\n }\n }).catch(e => {\n this.setState({\n status: 'error'\n })\n });\n }\n }", "title": "" }, { "docid": "59dbca34ebec63eb50b46b23ed1459d0", "score": "0.49565303", "text": "get_timestamp() {\r\n return Math.floor(Date.now() / 1000)\r\n }", "title": "" }, { "docid": "32c81f6a9969420fb31d0e8942711319", "score": "0.49519622", "text": "function onDateTimeEntered() {\n let from = document.querySelector('input[name=\"from\"]');\n let to = document.querySelector('input[name=\"to\"]');\n from = new Date(from.value).getTime()/1000.0; // Epoch time in seconds\n to = new Date(to.value).getTime()/1000.0; // Epoch time in seconds\n\n get('/log/' + app.device_name + queryParams({from: from, to: to}), drawChart);\n \n return false;\n}", "title": "" }, { "docid": "dfe092d9cc5796265e0a1a9eedada5b8", "score": "0.49455935", "text": "function formDate() {\n if (hour < 10) {\n hour = `0${hour}`;\n }\n if (minute < 10) {\n minute = `0${minute}`;\n }\n console.log(`${hour}:${minute}`);\n}", "title": "" }, { "docid": "94777c3b682a990580fb1b9e0342d93e", "score": "0.4939122", "text": "function timeBlank(thisform, prefix)\r\n{\r\n if(!timeExists(thisform, prefix))\r\n return true;\r\n\r\n if(fieldEmpty(hourField(thisform, prefix)) && fieldEmpty(minuteField(thisform, prefix)))\r\n return true;\r\n else\r\n return false;\r\n}", "title": "" }, { "docid": "64811ac8f9e2515f4ebf472b62cdc422", "score": "0.49348277", "text": "function save_row(no)\n {\n //save the new values entered by the user\n var train_val = document.getElementById(\"train_name_text\"+no).value;\n var destination_val = document.getElementById(\"destination_text\"+no).value;\n var arrival_val = document.getElementById(\"arrival_time_text\"+no).value;\n\n var update_key = $(\"#row\"+no).attr(\"value\");\n\n document.getElementById(\"name\"+no).innerHTML = train_val;\n document.getElementById(\"dest\"+no).innerHTML = destination_val;\n document.getElementById(\"arrival\"+no).innerHTML = arrival_val;\n\n document.getElementById(\"edit_link\"+no).style.display = \"block\";\n document.getElementById(\"save_link\"+no).style.display = \"none\";\n\n var current_time = moment();\n \n var next_arrival = arrival_val;\n \n var diffTime1 = moment(arrival_val,\"hh:mm A\").diff(moment(current_time,\"hh:mm A\"),\"minutes\");\n\n document.getElementById(\"mins\"+no).innerHTML = diffTime1+1;\n \n database.ref(update_key).update({\n trainName: train_val,\n destination:destination_val,\n\n });\n\n }", "title": "" }, { "docid": "95e2f822b30e0979cc1dbe18dee7b40f", "score": "0.49287018", "text": "function toggleClientSideInputTimestamp() {\n document.querySelector(\".client-side-input-timestamp\").classList.toggle(\"client-side-input-timestamp-active\");\n document.querySelector(\".client-side-input-timestamp\").classList.toggle(\"client-side-input-timestamp-inactive\");\n}", "title": "" }, { "docid": "148db1292054bbf67b6944b2230dbb79", "score": "0.4922148", "text": "function createSectionTimeStampElement(section) {\n var sectionTimestampElement = $('<input type=\"text\" size=\"12\" maxlength=\"16\" class=\"section-timestamp\" value=\"' + formatStartTime(section.startTime) + '\" />');\n\n sectionTimestampElement.on('change textInput input', function() {\n var newStartTime = hmsToSeconds(this.value);\n\n if (newStartTime) {\n section.startTime = newStartTime;\n }\n });\n\n sectionTimestampElement.focusout(function () {\n var newStartTime = hmsToSeconds(this.value);\n\n if (!newStartTime) {\n this.value = secondsToHms(section.startTime);\n }\n });\n\n section.addEventListener(gapi.drive.realtime.EventType.VALUE_CHANGED, function(event){\n if (event.property === 'startTime' && !event.isLocal) {\n sectionTimestampElement.val(formatStartTime(event.newValue));\n }\n });\n\n return sectionTimestampElement;\n}", "title": "" }, { "docid": "5de8da019242c57646c516f99d46c3ac", "score": "0.4921039", "text": "function tellTime() {\n\n if (moment(num).isBefore(timeNow, \"hour\")) {\n var columnTwo = $(\"<div class='col-sm-8 mx-auto mt-n5 row'>\").append(\"<textarea class='form-control past'>Too Late\");\n } else if (moment(num).isSame(timeNow, \"hour\")) {\n var columnTwo = $(\"<div class='col-sm-8 mx-auto mt-n5 row'>\").append(\"<textarea class='form-control present'>Right on Time\");\n } else {\n var columnTwo = $(\"<div class='col-sm-8 mx-auto mt-n5 row'>\").append(\"<textarea class='form-control future'>Coming Soon\");\n }\n \n row.append(columnTwo);\n\n}", "title": "" }, { "docid": "2cd1c548e7c3229bf87b4e44837b2310", "score": "0.4885169", "text": "function TimePicker(props) {\n const currentDate = new Date();\n currentDate.setSeconds(0);\n\n const [dateTime, setDateTime] = useState(currentDate)\n const [epochTime, setEpochTime] = useState(dateToEpoch(currentDate))\n\n const updateTime = (newTime) => {\n if (newTime == null || isNaN(newTime)) {\n // handles invalid input from datepicker and timeinput\n setDateTime(currentDate)\n setEpochTime(dateToEpoch(currentDate))\n }\n else {\n const timeToEpoch = dateToEpoch(newTime);\n setDateTime(newTime)\n setEpochTime(timeToEpoch)\n props.setParentTimestamp(timeToEpoch)\n }\n }\n\n return (\n <>\n <DatePicker\n value={dateTime}\n valueEditFormat={{ dateStyle: \"short\" }}\n valueDisplayFormat={{ dateStyle: \"short\" }}\n onChange={newTime => updateTime(newTime)}\n />\n\n <TimeInput\n value={dateTime}\n precision=\"seconds\"\n use12HourClock={true}\n onChange={newTime => updateTime(newTime)}\n />\n\n <h4>Timestamp: {epochTime}</h4>\n </>\n )\n}", "title": "" }, { "docid": "03302b15ac03ead8db027eef47073475", "score": "0.48761052", "text": "initSetupDate() {\n let dateObj = new Date();\n let month = dateObj.getMonth() + 1; //months from 1-12\n month = parseInt(month, 10) > 9 ? month : '0' + month;\n let day = dateObj.getDate();\n day = parseInt(day, 10) > 9 ? day : '0' + day;\n let year = dateObj.getFullYear();\n\n this.form['from'] = year + \"-\" + month + \"-\" + day;\n this.form['to'] = year + \"-\" + month + \"-\" + day;\n }", "title": "" }, { "docid": "9f75ab11a17ffa1cf2242b449f402954", "score": "0.48720944", "text": "_onChangeTime(event, index) {\n this.props.onChangeTime(index, event.target.value);\n }", "title": "" }, { "docid": "b16a3984aa64c76b4f659061793a1261", "score": "0.4862847", "text": "_safelySetTimestamp(timestamp) {\n const min = this._minDate.valueOf() / 1000;\n const max = this._maxDate.valueOf() / 1000;\n if (timestamp < min) {\n timestamp = min;\n }\n if (timestamp > max) {\n timestamp = max;\n }\n this.timestamp = timestamp;\n }", "title": "" }, { "docid": "7c157c9ae0b7c01069d5c720e2ed3992", "score": "0.4859441", "text": "function checkTimeValidation(event){\n\tvar dob = $m.juci.dataset(\"newPlanningForm\").Activity_Date;\n\tvar newdob = new Date(dob).toString(\"dd MM yyyy\");\n\tvar currentDate = new Date().toString(\"dd MM yyyy\");\n\tvar date = new Date();\n\tcurrentime = date.getTime();\n\tif (newdob == currentDate) {\n\t activitytime = event.value;\n\t var today = date;\n\t var hours = today.setHours(convertTimeFormat(activitytime));\n var minutes = today.setMinutes(activitytime.minute);\n var seconds = today.setSeconds(00);\n\t\tvar timePicker = today.getTime();\n\t\tif(timePicker < currentime){\n\t\t\t$m.alert(\"Activity Time should be more than current time\")\n\t\t\t$m.juci.getDataset(\"newPlanningForm\")().Activity_Time(null);\n\t\t }\n\t} \n}", "title": "" }, { "docid": "6aca3746aeca071168cdeab134704bcc", "score": "0.4847178", "text": "function ts()\n{ \n return \"[\"+ moment().format(\"YYYY/MM/DD HH:MM:SS\") +\"] \" \n}", "title": "" }, { "docid": "dff9d23c6bd711b8eb49bf0b00ad1524", "score": "0.48405087", "text": "function resetTable() {\n renderTable(data);\n document.getElementById('datetime').value = ''\n}", "title": "" }, { "docid": "cb72785c329e534089689419f8df2110", "score": "0.48403403", "text": "updateTimestamp() {\n this.timestamp = getCurrentTime();\n }", "title": "" }, { "docid": "17859fbb03af3e9c262705dba0397bb6", "score": "0.4831477", "text": "handleDateTimeSelect(selectedDate){\n\t\tlet hoursFormat=null;\n\t\tlet minutesFormat=null;\n\t\tthis.state.hours=new Date(selectedDate._d).getHours();\n\t\tthis.state.minutes=new Date(selectedDate._d).getMinutes();\n\t\thoursFormat=new Date(selectedDate._d).getHours();\n\t\tminutesFormat=new Date(selectedDate._d).getMinutes();\n\t\tlet selectedHour = hoursFormat%12;\n\t\tif(selectedHour==0){\n\t\t\tselectedHour=12;\n\t\t}\n\t\tthis.setState({\n\t\t\ttime:`${(selectedHour < 10) ? \"0\" + selectedHour : selectedHour}:${(minutesFormat < 10)? \"0\"+minutesFormat : minutesFormat}`,\n\t\t\tselectedTime:`${(selectedHour < 10) ? \"0\" + selectedHour : selectedHour}:${(minutesFormat < 10)? \"0\"+minutesFormat : minutesFormat} ${(hoursFormat < 12)?'AM':'PM'}`\n\t\t})\n\t\tif(this.state.firstTimeFormSubmit) {\n\t\t\tthis.isValid();\n\t\t}\n\t}", "title": "" }, { "docid": "e31c1a13089e29fd7bccefe59291cc4a", "score": "0.48226303", "text": "function OnTimeFromChanged() {\n if ($('input-event-from-time').checkValidity()) {\n var minutes = popupData.previousTimeFrom.subTime($('input-event-from-time').value);\n var myTimeTmp = new MyTime();\n myTimeTmp.setFromInputValue( $('input-event-to-time').value);\n myTimeTmp.addTime(0, -1 * minutes, 0);\n $('input-event-to-time').value = myTimeTmp.toInputValue();\n popupData.previousTimeFrom.setFromInputValue($('input-event-from-time').value);\n }\n}", "title": "" }, { "docid": "f88fcb71f61f3cafaecf37d75273cb95", "score": "0.48225933", "text": "function addInvoiceRowsDateTime( toRows ) {\n for( i = 0; i < toRows.length; i++ ) {\n toRows[i].dateTime = tableRows[i].date + '';\n if( '1' === toRows[i].quantity || 1 === toRows[i].quantity ) {\n if( '' !== toRows[i].time ) {\n toRows[i].dateTime = toRows[i].dateTime + ' (' + toRows[i].time + ')';\n }\n }\n }\n return toRows;\n }", "title": "" }, { "docid": "c321be61b275976d12f046d765f1b943", "score": "0.48205563", "text": "function iB(t){var e=Ke(t),n=e.value,r=e.modelValue,a=Vt(n,r,t.defaultValue,t.onChange),o=Le(a,2),i=o[0],l=o[1],u=A(function(){return po({mode:t.mode,format:t.format,enableTimePicker:t.enableTimePicker})});t.enableTimePicker&&(jw(u.value.format)||console.error(\"format: \".concat(u.value.format,\" \\u4E0D\\u89C4\\u8303\\uFF0C\\u5305\\u542B\\u65F6\\u95F4\\u9009\\u62E9\\u5FC5\\u987B\\u8981\\u6709\\u65F6\\u95F4\\u683C\\u5F0F\\u5316 HH:mm:ss\"))),Ue(i.value)?yr(i.value,u.value.format)||console.error(\"value: \".concat(i.value,\" is invalid dateTime! Check whether the value is consistent with format: \").concat(u.value.format)):console.error(\"typeof value: \".concat(i.value,\" must be Array!\"));var s=X(!1),c=X(Zp({value:i.value,mode:t.mode,format:u.value.format,timeFormat:u.value.timeFormat}).time),f=X(Zp({value:i.value,mode:t.mode,format:u.value.format,enableTimePicker:t.enableTimePicker}).month),d=X(Zp({value:i.value,mode:t.mode,format:u.value.format}).year),v=X(Pt(i.value,{format:u.value.format}));return Fo(function(){if(!i.value){v.value=[];return}!yr(i.value,u.value.format)||(v.value=Pt(i.value,{format:u.value.format}),c.value=Js(i.value,u.value.format,u.value.timeFormat,t.defaultTime))}),{year:d,month:f,value:i,time:c,isFirstValueSelected:s,cacheValue:v,onChange:l}}", "title": "" }, { "docid": "519df20d4de9fdbce55ec293176722a9", "score": "0.4820115", "text": "handleTimeChange(ts){\n if(ts){\n this.props.onChange(ts)\n } else {\n this.props.onChange(0)\n }\n }", "title": "" }, { "docid": "5cc6c14415b6ca4acd94236f33518c07", "score": "0.48063698", "text": "function addItemThirdOne(event) {\n var lossTime = document.getElementById(\"loss-time-third-one\").value;\n var reasonLossTime = document.getElementById(\"reason-loss-time-third-one\").value;\n\n// ***** adding the date and time to the title *******\n \n tmonth = new Array(\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\");\n \n var d = new Date();\n var nday = d.getDay(),nmonth = d.getMonth(),ndate=d.getDate(),nyear=d.getYear();\n if(nyear<1000) nyear += 1900;\n var nhour=d.getHours(),nmin = d.getMinutes(),nsec=d.getSeconds(),ap;\n\n if(nhour==0){ap =\" AM\";nhour=12;}\n else if(nhour<12){ap=\" AM\";}\n else if(nhour==12){ap=\" PM\";}\n else if(nhour>12){ap=\" PM\";nhour-=12;}\n\n if(nmin<=9) nmin=\"0\"+nmin;\n if(nsec<=9) nsec=\"0\"+nsec;\n\n var date = \"\"+tmonth[nmonth]+\" \"+ndate+\", \"+nyear+\" \"+nhour+\":\"+nmin+\":\"+nsec+ap+\"\";\n var dateAndTime = document.getElementById('date-time-third-one')\n var title = document.createElement('title')\n title.appendChild(document.createTextNode(date))\n\n// ***** Create a new table row on the fly *****\n\n var newRow = document.createElement(\"tr\");\n newRow.setAttribute('title', date)\n\n var fields = [\n lossTime + \" mins\", \n reasonLossTime\n ]; \n\n for (var i = 0; i < fields.length; i++) {\n newRow.innerHTML += \"<td>\" + fields[i] + \"</td>\";\n } \n\n var fieldIds = [\n \"loss-time-third-one\",\n \"reason-loss-time-third-one\"\n ];\n// ***** Clear up the form fields *****\n\n for (var i = 0; i < fieldIds.length; i++) {\n document.getElementById(fieldIds[i]).value = '';\n }\n\n// ***** Finally add the new record (new row) to the end of the table\n\n document.getElementById(\"list-third-one\").appendChild(newRow);\n}", "title": "" }, { "docid": "959302ae7303186ec3ef323e0f20395b", "score": "0.48056737", "text": "function PreProcessSchema(obj) {\n obj[\"CreateDate\"] = types.time\n obj[\"UpdateDate\"] = types.time\n return obj\n}", "title": "" }, { "docid": "d6dd8cc8d5b0372208a56a4e4a2b5b4f", "score": "0.48053968", "text": "function validateTimeStamps(name,start,end){\n if(Number(start) || Number(end) == 0){\n console.log(name + \" has no start or end time stamps requested\")\n }else{ \n console.log(name + \" \" + new Date(Number(start.slice(7,start.length))/1000)) //to validate timestamps in console\n console.log(name + \" \" + new Date(Number(end.slice(5,end.length))/1000)) // you can validate timestamps in consloe}\n }\n }", "title": "" }, { "docid": "faaedd9f7cc078f3df8e68a764848e94", "score": "0.47908917", "text": "function getTimestamp(timestamp) {\n return (timestamp || Date.now()) + config_1.default.getTimeDiff();\n}", "title": "" }, { "docid": "d1a6c61657cef61ae6d85e8a6ff3995f", "score": "0.47878352", "text": "submitTimestamp(e) {\n e.preventDefault();\n if (this.validateForm()) {\n let form = new FormData();\n form.append(Constants.EMAIL, this.state.email_address);\n form.append(Constants.HASH, this.state.hash);\n form.append(Constants.NAME, this.state.fileName);\n this.setState({waitingFeedback: true});\n axios({\n method: Constants.POST,\n url: SERVER_ADDRESS,\n data: form\n }).then(res => { //If response code is 200 OK\n window.dialog.showAlert(res.data);\n this.resetForm()\n }).catch(e => { //If response code is else than 200 OK\n serverError(e);\n this.resetForm();\n });\n } else {\n window.dialog.showAlert(INVALID_FORM);\n this.resetForm();\n }\n }", "title": "" }, { "docid": "3896c7858266d16cea2e04ac0cdfb083", "score": "0.4776434", "text": "function formatTimeInserted(day) {\n\t\tfor (var y of day.workLogs) {\n\t\t\t$scope.createTimepickerStringFromNumber(y);\n\t\t}\n\t}", "title": "" }, { "docid": "b7e973878841b51ff1cb5f720cdf977c", "score": "0.47721505", "text": "function getFormData() {\n\t\t\tlet inputData = timeInput.value;\n\t\t\tif(!inputData) return false;\n\t\t\tlet date = new Date(chrono.parseDate(inputData));\n\t\t\treturn {\n\t\t\t\tdesc: inputData,\n\t\t\t\tdate: dateFormat(date, \"mmm d\"),\n\t\t\t\ttime: dateFormat(date, \"HH:MM\"),\n\t\t\t\tfulldate: dateFormat(date, \"yyyymmddHHMM\")\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "328f96aec918b193fcf77ae275690319", "score": "0.47709236", "text": "function is_checktime_begin() {\n var err = 0\n\n a = document.a_log.fTimeBegin.value\n if (a == \"\") {\n return true\n }\n\n if (a.length != 8) err = 1\n b = a.substring(0, 2)// hour\n c = a.substring(2, 3)// ':'\n d = a.substring(3, 5)// minute\n e = a.substring(5, 6)// ':'\n f = a.substring(6, 8)// second\n if (b < 0 || b > 24) err = 1\n if (c != ':') err = 1\n if (d < 0 || d > 60) err = 1\n if (e != ':') err = 1\n if (f < 0 || f > 60) err = 1\n\n if (err == 1) {\n //alert('Bạn nhập sai định dạng thời gian!');\n //document.a_log.fTimeBegin.focus();\t\t\n return false\n }\n else {\n return true\n //document.a_log.submit();\n }\n}", "title": "" }, { "docid": "8be84986613706ff9b584c0c0dc68f53", "score": "0.47671342", "text": "function getTimestamp() {\n\treturn dateformat(new Date(), \"yyyy-mm-dd hh:MM:ss\");\n}", "title": "" }, { "docid": "2c7f20b69d4f8cb1c5108985fdcfc76d", "score": "0.4765301", "text": "function renderInitialSchedule() {\n for (i=0; i<9; i++) {\n const newRow = $(\"<tr>\");\n newRow.addClass(\"row\");\n timeBlocks.append(newRow);\n\n const hourBlock = $(\"<td>\");\n if ((i+9)<12) {\n hourBlock.text((i+9) + \" AM\");\n }\n else if ((i+9)==12) {\n hourBlock.text((i+9) + \" PM\");\n } else {\n hourBlock.text((i-3) + \" PM\");\n }\n hourBlock.addClass(\"hour\");\n newRow.append(hourBlock);\n\n const entryBlock = $(\"<td>\");\n entryBlock.addClass(\"time-block\")\n if ((i+9)<currentHour) {\n entryBlock.addClass(\"past\");\n } else if ((i+9) == currentHour) {\n entryBlock.addClass(\"present\");\n } else {\n entryBlock.addClass(\"future\");\n }\n newRow.append(entryBlock);\n\n const textEntry = $(\"<textarea>\");\n textEntry.addClass(\"select-text\");\n textEntry.val(textEntryArray[i]);\n entryBlock.append(textEntry);\n\n const saveEl = $(\"<td>\");\n saveEl.addClass(\"save-line\");\n newRow.append(saveEl);\n const btn = $(\"<button>\");\n btn.text(\"SAVE\");\n btn.addClass(\"saveBtn\");\n saveEl.append(btn);\n }\n}", "title": "" }, { "docid": "6b9b7c0cade2971f7c69f34c49c61772", "score": "0.47643092", "text": "enterCurrentTimestamp(ctx) {\n\t}", "title": "" }, { "docid": "16023be4b103725e76d6de59570a8479", "score": "0.47602847", "text": "function date_time_datatable_format_render_seconds(data, type, row, meta) {\n\tif (moment(data).isValid()) {\n\t\tdate_format = moment(data).format(\"MM/DD/YY hh:mm:ssA (dd)\")\n\t\tdate_format_from = moment(data).fromNow()\n\t} else {\n\t\tdate_format = moment(data, \"MM-DD-YYYY h:mm a\").format(\"MM/DD/YY hh:mmA (dd)\")\n\t\tdate_format_from = moment(data, \"MM-DD-YYYY h:mm a\").fromNow()\n\t}\n\treturn '<span title=\"' + date_format_from + '\">' + date_format + '</span>'\n\t//$(td).attr('title',moment(cellData).fromNow())\n\t//$(td).html(date_format);\n}", "title": "" }, { "docid": "16023be4b103725e76d6de59570a8479", "score": "0.47602847", "text": "function date_time_datatable_format_render_seconds(data, type, row, meta) {\n\tif (moment(data).isValid()) {\n\t\tdate_format = moment(data).format(\"MM/DD/YY hh:mm:ssA (dd)\")\n\t\tdate_format_from = moment(data).fromNow()\n\t} else {\n\t\tdate_format = moment(data, \"MM-DD-YYYY h:mm a\").format(\"MM/DD/YY hh:mmA (dd)\")\n\t\tdate_format_from = moment(data, \"MM-DD-YYYY h:mm a\").fromNow()\n\t}\n\treturn '<span title=\"' + date_format_from + '\">' + date_format + '</span>'\n\t//$(td).attr('title',moment(cellData).fromNow())\n\t//$(td).html(date_format);\n}", "title": "" }, { "docid": "8bc443abfe7e5c79e5cd711b5800d30f", "score": "0.47564268", "text": "function setDateAndTime(){\n let date = new Date();\n let d = date.toLocaleDateString();\n \n let arr = d.split('/');\n if(arr[0].length < 2){\n arr[0] = '0' + arr[0]\n }\n if(arr[1].length < 2){\n arr[1] = '0' + arr[1]\n }\n d = `${arr[2]}-${arr[0]}-${arr[1]}`;\n setCurrentDate(d);\n let t = date.toLocaleTimeString();\n arr = t.split(':');\n if(arr[0].length < 2){\n arr[0] = '0' + arr[0]\n }\n if(arr[1].length < 2){\n arr[1] = '0' + arr[1]\n }\n setCurrentTime(arr[0] + \":\" + arr[1]);\n updateForm(fData =>({\n ...fData,['end_date']:d\n }));\n }", "title": "" }, { "docid": "70c14814fb2f856e9f73151cd675cc07", "score": "0.47525305", "text": "function fillPageErrors()\n{\n $('#Errors').append(\n '<div class=\"large_text\">Time Frame:</div>' +\n '<div id=\"dateInstructDiv\">Start Date:</div>' +\n '<input id=\"errors_startdate\" type=\"text\"> ' +\n '<input id=\"errors_starttime\" type=\"text\"></div>' +\n '<div id=\"dateInstructDiv\">End Date:</div>' +\n '<input class=\"dateselector\" id=\"errors_enddate\" type=\"text\">' +\n '<input class=\"dateselector\" id=\"errors_endtime\" type=\"text\">' +\n '<br/><br/>' +\n '<table id=\"error_table\">' +\n '<thead><tr><th>Date-Time</th><th>Error Message</th></tr></thead>' +\n '</table><br/>'\n );\n $('#error_table').DataTable({\n columns: [\n {title: \"Date-Time\"},\n {title: \"Error Message\"}\n ],\n \"order\": [[ 0, \"desc\" ]]\n });\n\n\n var date = new Date();\n $(\"#errors_enddate\").datetimepicker({\n controlType: 'select',\n oneLine: true,\n altField: \"#errors_endtime\"\n })\n .datepicker(\"setDate\", date);\n\n date.setMonth(date.getMonth() - 1);\n $(\"#errors_startdate\").datetimepicker({\n controlType: 'select',\n oneLine: true,\n altField: \"#errors_starttime\"\n })\n .datepicker(\"setDate\", date);\n\n filterErrors();\n}", "title": "" }, { "docid": "150944099721bfe97cac9545ad8f860b", "score": "0.4748431", "text": "get _timestamp() {\n let timestamp = this.timestamp !== undefined ? this.timestamp : (0, _getTodayUTCTimestamp.default)(this._primaryCalendarType);\n if (timestamp < this._minTimestamp || timestamp > this._maxTimestamp) {\n timestamp = this._minTimestamp;\n }\n return timestamp;\n }", "title": "" }, { "docid": "7d86498fd7d274c3575ea51001147352", "score": "0.47454453", "text": "static getTimeText(postCreationTimestamp){let millis=Date.now()-postCreationTimestamp;const ms=millis%1000;millis=(millis-ms)/1000;const secs=millis%60;millis=(millis-secs)/60;const mins=millis%60;millis=(millis-mins)/60;const hrs=millis%24;const days=(millis-hrs)/24;var timeSinceCreation=[days,hrs,mins,secs,ms];let timeText='Now';if(timeSinceCreation[0]!==0){timeText=timeSinceCreation[0]+'d'}else if(timeSinceCreation[1]!==0){timeText=timeSinceCreation[1]+'h'}else if(timeSinceCreation[2]!==0){timeText=timeSinceCreation[2]+'m'}return timeText}", "title": "" }, { "docid": "6940e255b5be3569c0da6e0b8d7a7635", "score": "0.47448716", "text": "function saveNoteForm() { \n\tvar input = $('#note-edit-text').html();\n\tvar notecontent = $('#edit-note-content').val();\n\tvar notetimestamp = $(\"#note-timestamp\").html(); \n\tvar oldstamp = parseInt(notetimestamp); \n\tvar newstamp = convertDate();\n\tif (notecontent != '') {\t\n\t\tdb.transaction(function (tx) {\n\t\t\ttx.executeSql(\"UPDATE notes SET noteContent =?, noteTimestamp =? WHERE noteTimestamp = ? and classId =?;\", [notecontent, newstamp, oldstamp,classID]);\n\t\t});\t\t\n\t\tbtnReturn();\t\n\t}\n}", "title": "" }, { "docid": "e689b1ee926b9d4769bf29f94fe8b76f", "score": "0.47439244", "text": "function convert_to_mysql(jsontime) {\n return jsontime ? jsontime.replace(/^.*T/, '') : jsontime;\n}", "title": "" }, { "docid": "1bcbce9120a9aca7f25c18bff32ce39a", "score": "0.47422156", "text": "function submitFunction(event)\n{\n //first checks if the form has valid input\n if (validatePost(event) == false)\n {\n event.preventDefault();\n }\n //creating todays Date\n let todaysDateTime = new Date();\n //getting the day and month from the todaysDateTime object\n if(todaysDateTime.getDate() == 1 || todaysDateTime.getDate() == 21 || todaysDateTime.getDate() == 31)\n {\n var day = todaysDateTime.getDate() + \"st\";\n }\n else{\n if(todaysDateTime.getDate() == 2 || todaysDateTime.getDate() == 22)\n {\n var day = todaysDateTime.getDate() + \"nd\";\n }\n else{\n if(todaysDateTime.getDate() == 3 || todaysDateTime.getDate() == 23)\n {\n var day = todaysDateTime.getDate() + \"rd\";\n }\n else{\n var day = todaysDateTime.getDate() + \"th\";\n }\n }\n }\n let monthName = [\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"];\n //getting the minutes\n if((todaysDateTime.getMinutes()+1) < 10)\n {\n var minute = \"0\"+(todaysDateTime.getMinutes()+1);\n }\n else{\n var minute = (todaysDateTime.getMinutes()+1);\n }\n //outputting the datetime\n let dateTime = day+\"-\"+(monthName[todaysDateTime.getMonth()])+\"-\"+todaysDateTime.getFullYear()+\", \"+todaysDateTime.getHours()+\":\"+minute+\" \"+\"UTC\";\n //setting the Date value to todaysDate\n document.getElementById(\"DateTime\").value = dateTime;\n //setting the Month value to this month\n let month = (todaysDateTime.getMonth()+1);\n document.getElementById(\"Month\").value = month;\n}", "title": "" }, { "docid": "c3545ec3490509d6ad0a0ada74d16756", "score": "0.47417903", "text": "function validationAndConvertionDateAndTime(fieldName, bPagedLoaded)\n{\n\tvar objForm = document.forms[afmInputsFormName];\n\t//var strField = objForm.elements[fieldName].value;\n\tvar objValue = objForm.elements[fieldName];\n\tif(objValue.value != \"\")\n\t{\n\t\tvar type = arrFieldsInformation[fieldName][\"type\"];\n\t\tvar typeUpperCase = type.toUpperCase();\n\t\tvar bRequired = arrFieldsInformation[fieldName][\"required\"];\n\t\tvar field_value = objValue.value;\n\t\tif(typeUpperCase == \"JAVA.SQL.DATE\")\n\t\t{\n\t\t\t//since initially sever sends date in ISO format\n\t\t\t//\"YYY-MM-DD\"\n\t\t\tvar dateArrayObj = new Array();\n\t\t\tif(bPagedLoaded && field_value != null && field_value != \"\")\n\t\t\t\tdateArrayObj = field_value.split(\"-\");\n\t\t\telse\n\t\t\t\tdateArrayObj = null;\n\t\t\tvalidationAndConvertionDateInput(objValue, fieldName, dateArrayObj,bRequired, false, true);\n\t\t}\n\t\telse if(typeUpperCase == \"JAVA.SQL.TIME\")\n\t\t{\n\t\t\t//since initially sever sends time in the format \"HH:MM\"\n\t\t\tvar TimeArrayObj = new Array();\n\t\t\tif(bPagedLoaded && field_value != null && field_value != \"\")\n\t\t\t\tTimeArrayObj = field_value.split(\":\");\n\t\t\telse\n\t\t\t\tTimeArrayObj = null;\n\t\t\tvalidationAndConvertionTimeInput(objValue, fieldName, TimeArrayObj,bRequired, false, true);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "c3545ec3490509d6ad0a0ada74d16756", "score": "0.47417903", "text": "function validationAndConvertionDateAndTime(fieldName, bPagedLoaded)\n{\n\tvar objForm = document.forms[afmInputsFormName];\n\t//var strField = objForm.elements[fieldName].value;\n\tvar objValue = objForm.elements[fieldName];\n\tif(objValue.value != \"\")\n\t{\n\t\tvar type = arrFieldsInformation[fieldName][\"type\"];\n\t\tvar typeUpperCase = type.toUpperCase();\n\t\tvar bRequired = arrFieldsInformation[fieldName][\"required\"];\n\t\tvar field_value = objValue.value;\n\t\tif(typeUpperCase == \"JAVA.SQL.DATE\")\n\t\t{\n\t\t\t//since initially sever sends date in ISO format\n\t\t\t//\"YYY-MM-DD\"\n\t\t\tvar dateArrayObj = new Array();\n\t\t\tif(bPagedLoaded && field_value != null && field_value != \"\")\n\t\t\t\tdateArrayObj = field_value.split(\"-\");\n\t\t\telse\n\t\t\t\tdateArrayObj = null;\n\t\t\tvalidationAndConvertionDateInput(objValue, fieldName, dateArrayObj,bRequired, false, true);\n\t\t}\n\t\telse if(typeUpperCase == \"JAVA.SQL.TIME\")\n\t\t{\n\t\t\t//since initially sever sends time in the format \"HH:MM\"\n\t\t\tvar TimeArrayObj = new Array();\n\t\t\tif(bPagedLoaded && field_value != null && field_value != \"\")\n\t\t\t\tTimeArrayObj = field_value.split(\":\");\n\t\t\telse\n\t\t\t\tTimeArrayObj = null;\n\t\t\tvalidationAndConvertionTimeInput(objValue, fieldName, TimeArrayObj,bRequired, false, true);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "3e30fb09371729e9dfe3f5890b4123e4", "score": "0.47364298", "text": "dateFormatter(fieldValue, row, rowIdx, colIdx) {\n let a = fieldValue.split('.');\n let b = a[0].split(':');\n let Dat1 = new Date();\n let Dat2 = Date.UTC(Dat1.getUTCFullYear(), Dat1.getUTCMonth(), Dat1.getUTCDate(), b[0], b[1], b[2], a[1]);\n return Number(Dat1) - Dat2 > 2 * 60 * 1000 ? 'danger_text' : '';\n }", "title": "" }, { "docid": "fc698e535f61c980057aa1a7db1671ff", "score": "0.47354212", "text": "function updateTimetable() {\n\n DeleteRows();\n\n //adding an initial dropdown option with instructions\n var editContentOptionBlank = $(\"<option></option>\");\n editContentOptionBlank.attr('value', \"Select Train Schedule to Edit\");\n editContentOptionBlank.text(\"Select Train Schedule to Edit\");\n\n $(\".input-name-current\").append(editContentOptionBlank);\n\n database.ref().on(\"child_added\", function (childSnapshot) {\n\n // Store everything into a variable.\n var trainName = childSnapshot.val().name;\n var destination = childSnapshot.val().destination;\n var firstTrainTime = childSnapshot.val().firstTrainTime;\n var frequency = childSnapshot.val().frequency;\n\n var id = childSnapshot.val().autoID;\n\n //creating the buttons to be added to each row\n var deleteButton = $(\"<button id='deleteButton'>Delete</button>\");\n\n var editContentOption = $(\"<option></option>\");\n editContentOption.attr({\n 'label': trainName,\n 'value': trainName,\n 'data-selected': trainName,\n 'data-id-delete': id\n });\n editContentOption.text(trainName);\n\n $(\".input-name-current\").append(editContentOption);\n\n //add a data attribute containing the 'document id' (the auto generated number for each row)\n deleteButton.attr('data-id-delete', id);\n\n // First Time (pushed back 1 year to make sure it comes before current time)\n var firstTimeConverted = moment(firstTrainTime, \"HH:mm\").subtract(1, \"years\");\n\n // Difference between the times\n var diffTime = moment().diff(moment(firstTimeConverted), \"minutes\");\n\n // Time apart (remainder)\n var tRemainder = diffTime % frequency;\n\n // Minute Until Train\n var tMinutesTillTrain = frequency - tRemainder;\n\n // Next Train\n var nextTrain = moment().add(tMinutesTillTrain, \"minutes\");\n var nextTrainFormatted = moment(nextTrain).format('LT');\n\n // Create the new row\n var newRow = $(\"<tr>\").append(\n $(\"<td>\").text(trainName),\n $(\"<td>\").text(destination),\n $(\"<td>\").text(frequency),\n $(\"<td id='next-train'>\").text(nextTrainFormatted),\n $(\"<td id='minutes-away'>\").text(tMinutesTillTrain),\n $(\"<td>\").html(deleteButton),\n );\n\n // Append the new row to the table\n $(\"tbody\").append(newRow);\n });\n }", "title": "" }, { "docid": "0805610b3fcdc633acc368ecc87008ec", "score": "0.47347605", "text": "function getTimestamp(inputDate) {\n return (inputDate ? new Date(inputDate) : new Date()).getTime();\n}", "title": "" }, { "docid": "7798ee5aafd4ba698ed42adae25ebdeb", "score": "0.47339505", "text": "function GenerateTimestamps()\n{\n // Get the current hour.\n var oDate = new Date();\n var lNow = oDate.getTime();\n var lCurrentHour = parseInt(lNow / 3600000);\n// lCurrentHour++;\n lCurrentHour *= 3600000;\n \n for (var i = 0; i < MAX_HOURS; i++)\n {\n m_oTimestamps[i] = lCurrentHour;\n lCurrentHour -= 3600000;\n }\n}", "title": "" }, { "docid": "34448e3b55483b9f9201e8b525f2c236", "score": "0.47264254", "text": "getFormatedDate(value) {\n const date = moment(value)\n return date.isValid() ? date.format(this.state.format) : null\n }", "title": "" }, { "docid": "bceac05eddd096498ce62904584dbfeb", "score": "0.47182953", "text": "function isTimestampStillValid(timestamp) {\n var now = new Date();\n var timestampDate = new Date(timestamp);\n\n console.log(\"TIMESTAMP IS: \", timestampDate, \". CURRENT DATE IS: \", now);\n console.log(\"VERIFY NOT EXPIRED IS: \", timestampDate > now);\n return timestampDate > now;\n}", "title": "" }, { "docid": "a569ea758101a0e1e3c3d7beadb2c47b", "score": "0.47180092", "text": "changeEventProp(prop, e) {\n // Removes related errors to the prop being checked\n let newValidationErrors = this.state.validationErrors.slice(0).filter(e => e != prop && e != prop + \"Min\" && e != prop + \"Max\" && e != prop + \"Before\");\n // Checks title is not empty\n if (prop == \"title\") {\n if (e.target.value.trim().length == 0) {\n newValidationErrors.push(\"title\");\n }\n }\n // Checks duration is between 5 minutes and 12 hours\n else if (prop == \"duration\") {\n if (parseInt(e.target.value) < 5 || isNaN(parseInt(e.target.value))) {\n newValidationErrors.push(\"durationMin\");\n }\n else if (parseInt(e.target.value) > 60 * 12) {\n newValidationErrors.push(\"durationMax\");\n }\n // Checks the start date is in the future\n } else if (prop == \"date\" || prop == \"time\") {\n newValidationErrors = this.state.validationErrors.slice(0).filter(e => e != \"datetimeBefore\");\n let d = new Date();\n let d2;\n if (prop == \"date\") {\n d2 = Date.parse(e.target.value);\n } else {\n d2 = Date.parse(this.state.date);\n }\n if (d2) {\n d2 = new Date(d2);\n console.log(d2);\n let time = this.state.time;\n if (prop == \"time\") {\n time = e.target.value;\n }\n d2.setHours(time.substr(0, 2), time.substr(3, 2));\n if (d > d2) {\n newValidationErrors.push(\"datetimeBefore\");\n }\n }\n else {\n newValidationErrors.push(\"datetimeBefore\");\n }\n\n\n\n }\n // Updates the state with the new errors\n this.setState({\n [prop]: e.target.value,\n validationErrors: newValidationErrors\n });\n }", "title": "" }, { "docid": "57587b6622022e4d07f4563759a0779d", "score": "0.4709906", "text": "function addItemThirdTwo(event) {\n var scrap = document.getElementById(\"scrap-third-shift\").value;\n var reasonScrapLoss = document.getElementById(\"reason-scrap-third-shift\").value;\n\n// ***** adding the date and time to the title *******\n\n tmonth = new Array(\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\");\n\n \n var d = new Date();\n var nday = d.getDay(),nmonth = d.getMonth(),ndate=d.getDate(),nyear=d.getYear();\n if(nyear<1000) nyear += 1900;\n var nhour=d.getHours(),nmin = d.getMinutes(),nsec=d.getSeconds(),ap;\n\n if(nhour==0){ap =\" AM\";nhour=12;}\n else if(nhour<12){ap=\" AM\";}\n else if(nhour==12){ap=\" PM\";}\n else if(nhour>12){ap=\" PM\";nhour-=12;}\n\n if(nmin<=9) nmin=\"0\"+nmin;\n if(nsec<=9) nsec=\"0\"+nsec;\n\n var date = \"\"+tmonth[nmonth]+\" \"+ndate+\", \"+nyear+\" \"+nhour+\":\"+nmin+\":\"+nsec+ap+\"\";\n var dateAndTime = document.getElementById('date-time-third-shift-two')\n var title = document.createElement('title')\n title.appendChild(document.createTextNode(date))\n\n\n\n// ***** Create a new table row on the fly *****\n\n var newRow = document.createElement(\"tr\");\n newRow.setAttribute('title', date)\n\n var fields = [\n scrap + \" lbs\", \n reasonScrapLoss\n ]; \n\n for (var i = 0; i < fields.length; i++) {\n newRow.innerHTML += \"<td>\" + fields[i] + \"</td>\";\n } \n\n var fieldIds = [\n \"scrap-third-shift\",\n \"reason-scrap-third-shift\"\n ];\n\n// ***** Clear up the form fields *****\n\n for (var i = 0; i < fieldIds.length; i++) {\n document.getElementById(fieldIds[i]).value = '';\n }\n\n// ***** Finally add the new record (new row) to the end of the table *****\n\n document.getElementById(\"list-third-shift-two\").appendChild(newRow);\n}", "title": "" }, { "docid": "f8dd56d27f77acb303ab7ff5de863e33", "score": "0.47074586", "text": "init() {\n this._super(...arguments);\n const timestamp = this.get('timestamp');\n if (timestamp === null) {\n this.set('timestamp', moment().valueOf()); // set the timestamp as the current unix timestamp in milliseconds\n }\n }", "title": "" } ]
c3d7ff18b9fa457c23f1bd366bff2f5d
en este caso no devuelve, solo cuando es invocada
[ { "docid": "d04954cc9e152a69270bf9ab0c32b362", "score": "0.0", "text": "function fibonacci(mes){\n\tvar n1= 0;\n\tvar n2= 1;\n\tvar n3;\n\n\tfor (var i =0; i<mes; i++){\n\t\tn3=n1+n2; /* X= fibonacci(mes-1)+fibonacci(mes-2)*/\n\t\tn1=n2;\n\t\tn2=n3;\n\t\t\n\t}\n\treturn n3;\n}", "title": "" } ]
[ { "docid": "7fe980773c997c0939708ed5013ec5bc", "score": "0.6119069", "text": "rejected() {\n }", "title": "" }, { "docid": "9e56fd3571dd240fd0df02faaa68a6d5", "score": "0.59084535", "text": "function confermaInvioValutazione(){\n\treturn confirm(\"Sei sicuro di voler inviare la valutazione\");\n}", "title": "" }, { "docid": "2256215b0fe71531e0d81de7ca1aceea", "score": "0.5748568", "text": "function onConfirm() {\n if (cartList.length <= 0) {\n message.error(\"Hiện không có sản phẩm nào!\");\n }\n }", "title": "" }, { "docid": "b8bdca96d5eea23a040ce14760975a62", "score": "0.57054704", "text": "check(){\n\n\t\t\tif(this.Naam == \"\" || this.Type == \"0\" || this.SendAddr == \"\") {\n\t\t\t\tthis.sendBlocked = true;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.sendBlocked = false;\n\n\t\t}", "title": "" }, { "docid": "b9084882f7366c8e639dc04ea8b7b408", "score": "0.5686096", "text": "async alertEmptyResponse(titulo_principal, texto, tipo) {\n return await Swal.fire({\n allowOutsideClick: false,\n\n icon: tipo,\n title: titulo_principal,\n text: texto,\n confirmButtonText: '<i class=\"fa fa-check\"></i> Aceptar',\n showCloseButton: false,\n focusConfirm: true,\n footer: process.env.REACT_APP_FOOTER_ALERTAS,\n }).then((result) => {\n if (result.value) {\n return true;\n } else {\n return false;\n }\n });\n }", "title": "" }, { "docid": "1ab5e187cedc0b76b327db5ecf1bdc10", "score": "0.5685802", "text": "isValid() {\n return this.allProminentMsgs().length === 0\n }", "title": "" }, { "docid": "bb69a80fdf18674bc43464d08ce1fb11", "score": "0.56754774", "text": "function checkDescuento() {\n\n}", "title": "" }, { "docid": "827d18f621c786a5866bbbfe10d2e0c1", "score": "0.56617093", "text": "qualityUserNeed(_type) {\n console.log(_type);\n let txtModal;\n switch (_type) {\n case 'role':\n txtModal = \"Vous n'avez pas le bon rôle pour effectuer cette opération\";\n break;\n case 'status':\n txtModal = \"Cette opération est déjà réalisée\";\n break;\n default:\n break;\n }\n const msgModal = new ModalBox('ALERT', txtModal, 'QUALITY');\n const role = this.view.getElement('#role').innerHTML;\n this.view.getElement('.text-footer').innerHTML = `Votre rôle est : ${role}`;\n msgModal.okButton.setAction(() => {\n msgModal.removeBox();\n });\n msgModal.btnQualityScan.setAction(() => {\n msgModal.btnQualityScan.btn.classList.add('flashScan');\n this.view.getElement('.divSecondaryUser').focus();\n msgModal.getResponse().then(response => {\n console.log(response);\n if (response.ROLE == 'CONTROLE') {\n msgModal.removeBox();\n this.alternateUser = response;\n this.view.displayOperation(this.operation);\n return true;\n } else {\n return false;\n }\n });\n });;\n }", "title": "" }, { "docid": "4b2e555b7e566944f68e056f32a12006", "score": "0.5656506", "text": "function aceptarNotificacion(){\r\n\r\n}", "title": "" }, { "docid": "4c2f5bd364b7d3743c171fe5e8d2f02a", "score": "0.56558734", "text": "Confirm() {}", "title": "" }, { "docid": "0b6c690414049071a26e83dd60c1d795", "score": "0.5639012", "text": "rejected() {\n }", "title": "" }, { "docid": "90530131240780fffef4428955775f40", "score": "0.55916315", "text": "function testOk() {\n //datos dados para su verificacion.\n const resultadoType = saveUser(true);\n //resultado que se espera.\n const esperadoType = '';\n //se verifica si el resultado es el deseado o no.\n if (resultadoType != esperadoType) {\n console.log('No hay es vacio.');\n }\n else {\n //Se presenta que el resultado no es el esperado.\n throw new Error('Hay datos vacios')\n }\n}", "title": "" }, { "docid": "7d02777a748501c53bf73f99f7cc92c2", "score": "0.5578209", "text": "function controlloInvia(){\n\n\tvar ok = controlloValidita(\"iNome\") && controlloValidita(\"iIngredienti\") && controlloValidita(\"iAllergeni\");\n\tif(ok){\n\t\tif(document.getElementById('iCuriosita').value == '' ){\n\t\t\tdocument.getElementById('iCuriosita').value='Non ci sono curiosita\\'';\n\t\t}\n\t\tdocument.getElementById(\"modulo\").submit();\n\t}\n\telse\n\t\talert(\"Form incompleto\");\t\n}", "title": "" }, { "docid": "3d0ff89f434d9d0dab614a2348b8e099", "score": "0.5566933", "text": "positiveClick(event) {\n this.props.updateParticipantResponseAndSendToServer(1);\n this.props.hideDialog(event);\n }", "title": "" }, { "docid": "b2e21a88485e0dba23f7f970e261ceca", "score": "0.55107677", "text": "confirmAcceptRejectPrescreen(e, status) {\n var other_name = e.currentTarget.dataset.other_name;\n var id = e.currentTarget.id;\n var user_id = this.authUser.ID;\n\n const confirmUpdate = () => {\n this.acceptRejectPrescreen(id, user_id, status);\n };\n\n // create confirm message\n var mes = \"\";\n if (status === PrescreenEnum.STATUS_APPROVED) {\n mes += \"Approving\";\n }\n if (status === PrescreenEnum.STATUS_REJECTED) {\n mes += \"Rejecting\";\n }\n\n mes += ` Scheduled Call with ${other_name} ?`;\n layoutActions.confirmBlockLoader(mes, confirmUpdate);\n }", "title": "" }, { "docid": "c4d263940157ebd5f1170e029ed21bc1", "score": "0.5507744", "text": "function checkSendable(param) {\n\n if (!checkManipulate({})) return;\n var supp_id = gw_com_api.getValue(\"frmData_MAIN\", 1, \"supp_id\");\n if (supp_id == null || supp_id == \"\") {\n gw_com_api.messageBox([{ text: \"전송자를 선택 후 처리할 수 있습니다.\" }]);\n return;\n }\n var args = {\n handler: processAct,\n param: {\n act: \"Reject\", option: \"NeedRmk\"\n }\n };\n gw_com_api.messageBox([\n { text: \"자료 요청을 반려처리하시겠습니까?\" },\n { text: \"※ 반려처리 후에는 내용을 변경할 수 없습니다.\" }\n ], 550, gw_com_api.v_Message.msg_confirmSend, \"YESNO\", args);\n\n}", "title": "" }, { "docid": "80b3bb3cd469fd1a47b0b6763270bbc9", "score": "0.549731", "text": "function s0000_Started_2_Started_X_iINVITE(ao_args){\n var o_dialog = ao_args[0];\n o_dialog.b_is_client = false;\n return 0;\n}", "title": "" }, { "docid": "3a3d1484481443714c16b275479c039c", "score": "0.54905605", "text": "exchangeRequired () {\n\t\treturn true;\n\t}", "title": "" }, { "docid": "cee225c0437135a5aaf22db077ffafbc", "score": "0.54901755", "text": "lobby(e){\n //recuperamos texto del mensaje\n const nombre = this.refs.nombre.value.trim();\n //prevenimos el comportamiento por default\n e.preventDefault(); \n //verificamos si existe el mensaje\n if(nombre){\n Meteor.call('lobbies.insert', nombre, (err, res) => {\n if (!err) { //mensaje enviado\n this.refs.nombre.value = '';\n } else { //error al enviar mensaje\n console.log(err.reason);\n }\n });\n }\n\n }", "title": "" }, { "docid": "e1912fa37faa816113874a6f6837c6b5", "score": "0.5486416", "text": "firstAccess(){\n this.onlyReceived(); \n }", "title": "" }, { "docid": "7414e2cd069b4dbca1299a41e49f3a8b", "score": "0.54724234", "text": "function EnviarMensajeUsuario() {\r\n if (msjAbierto == 0) {\r\n msjAbierto = 1;\r\n bootbox.alert(msgNoTienePermiso, function () {\r\n history.go(-1);\r\n msjAbierto = 0;\r\n return false;\r\n });\r\n }\r\n}", "title": "" }, { "docid": "bf2a7eacc42d759844ef32edd1381f04", "score": "0.5470905", "text": "function usuarioIntruso(){\n\tif (nombreUsuario==\"Intruso\"){\n\t\talert(\"Lo sentimos, Usted no tiene permitido realizar la operación\");\n\t\treturn true;\n\t}\n}", "title": "" }, { "docid": "c1d7262136c364585910968a5889da16", "score": "0.54595286", "text": "function meInteresaOferta() {\n\t\t\n\t\tvar context;\n\t\tvar latestResponse = watson_Watson.getResponsePayload();\n\n\t\tif (latestResponse) {\n\t\t\tcontext = latestResponse.context;\n\t\t\tcontext.noesmidireccion = true;\n\t\t}\n\t\t// -Inicio- Redirección cuando se introduce el número fijo\n\t\tvar enlaceaTienda; // Enlace al que redirigir\n\t\tif (context && context != \"undefined\" && context != ''){\n\t\t\t\tenlaceaTienda = context.enlaceaTienda;\t\t\n\t\t}\n//\t\tif (includes(codPromo,\"PROMO_CODE\")){\n\t\t\tenlaceaTienda = enlaceaTienda+\"&\"+codPromo;\n//\t\t}\n//\t\tfunction includes(codPromo, value) {\n//\t\t\tvar returnValue = false;\n//\t\t\tvar pos = codPromo.indexOf(value);\n//\t\t\tif (pos >= 0) {\n//\t\t\t\treturnValue = true;\n//\t\t\t}\n//\t\t\treturn returnValue;\n//\t\t}\n\t\t\t$('#watson__input__btn').addClass(\"enlaceInhabilitado\");\n\t\t\t$('#textInputchat').addClass(\"enlaceInhabilitado\");\n\t\t\tvar data = {};\n\t\t\tdata.output = {};\n\t\t\tdata.output.text = [\"¡Ya tenemos todo lo necesario! te estamos redirigiendo a la tienda para continuar con el proceso de contrataci&oacute;n\"];\n\t\t\tvar type = 'watson';\n\t\t\twatson_ConversationPanel.displayMessage(data, type);\n\t\t\twatson_ConversationPanel.showLoading();\n\t\t\tsetTimeout(delay, 3000);\n\t\t\tfunction delay() {\n\t\t\t\twindow.open(enlaceaTienda, '_self');\n\t\t\t\t}\n\t}", "title": "" }, { "docid": "5b45ff15f830c117c4e17ca52a5c0e73", "score": "0.54555213", "text": "wrongStatusAction() {\n const msgModal = new ModalBox('ALERT', \"Cette opération est déjà effectuée. Vous devez avoir un rôle CONTROLE pour pouvoir la modifier\");\n this.view.getElement('.text-footer').innerHTML = `Votre rôle est : ${role}`;\n msgModal.okButton.setAction(() => {\n msgModal.removeBox();\n });\n return 'wrong status';\n }", "title": "" }, { "docid": "b9c08efb7bc4aa193e3485f6f0f523f1", "score": "0.5450428", "text": "verificationAlert(){\n if(!this.props.status){\n\n }\n }", "title": "" }, { "docid": "706bd51e889cc5fec4b12370738f767e", "score": "0.54483616", "text": "function irAAgregarCliente() {\r\n var msg = \"Desea Agregar un NUEVO REGISTRO?.. \";\r\n //Obtengo el valor que define si el formulario a sufrido cambios, para definir el mensaje de confirmacion\r\n var cambiosSinGuardar = $(\"#c_cambios\").val();\r\n if (cambiosSinGuardar == \"true\")\r\n msg =\r\n \"Puede haber cambios sin guardar en el formulario, ¿Desea agregar un NUEVO Registro de todas formas?.\";\r\n if (confirm(msg)) Cons_cliente(\"\", \"agregar\");\r\n}", "title": "" }, { "docid": "9ed273f52ebbfae0d6a75009e14eb8d1", "score": "0.5444577", "text": "function irAAgregarProducto(){\r\n\tvar msg = \"Desea Agregar un NUEVO REGISTRO?.. \";\r\n\tif(confirm(msg)) Cons_producto('', 'AGREGAR');\r\n}", "title": "" }, { "docid": "608bd06e43d278f4be48b4ac6b632480", "score": "0.5440707", "text": "function s0000_Started_2_Terminated_X_iINVITE(ao_args){\n\treturn 0;\n}", "title": "" }, { "docid": "aa6c237c5e3692b0f7ef2e8aeaf36c02", "score": "0.54338086", "text": "function alertDismissed_contributionSuccess() {\n return; // todo\n }", "title": "" }, { "docid": "8e911ed180d790485f4760a610faa120", "score": "0.54274744", "text": "verificar() {\n var idIngresado = document.getElementById(\"id\").value;\n if (!idVer && idIngresado != \"\") {\n if (alertarCorreo(\"El id ingresado ¡No está asociado a ningún dato!\",true,idIngresado)) {\n validacion(true, \"<p>Se ha enviado el aviso al administrador, puedes seguir cargando.</p>\", \"validador\");\n metodoParaCargar.id.disabled;\n document.getElementById(\"botonCargar\").focus();\n return idVer = true;\n } else {\n validacion(false, \"<p>El ID ingresado no está asociado en la base de datos.</p>\", \"validador\");\n idVer = 3;\n document.getElementById(\"pesoEntrada\").value = \"\";\n document.getElementById(\"id\").value = \"\";\n return document.getElementById(\"pesoEntrada\").focus();\n }\n } else if (idVer && document.getElementById(\"id\").value != \"\") {\n validacion(true, \"<p>El id está asociado a: \" + nombre + \"</p>\", \"validador\");\n }\n\n document.getElementById(\"botonCargar\").disabled = !(idVer && pesoVer && idVer != 3);\n }", "title": "" }, { "docid": "d3dad09b69a064f58bb59c7df02c6681", "score": "0.54261214", "text": "function testNok() {\n //datos dados para su verificacion.\n const resultadoType = saveUser(true);\n //resultado que se espera.\n const esperadoType = '';\n //se verifica si el resultado es el deseado o no.\n if (resultadoType == esperadoType) {\n //Se presenta que el resultado no es el esperado.\n console.log('Hay datos vacios');\n }\n else {\n throw new Error('No hay datos vacios')\n }\n}", "title": "" }, { "docid": "a792195c8c3d3baa2f5c7203cc6c223f", "score": "0.54150957", "text": "isEmpty() {\n return this.invokingState === -1;\n }", "title": "" }, { "docid": "2a1fcbe5755df963c14bcaa091d70240", "score": "0.5412165", "text": "clckAceptar() {\n\n\n if (this.items.nombre == \"\" || this.items.compania == \"\" || !this.files2.length || this.items.clave == \"\") {\n this.println(\"Hay que llenar todos los campos\");\n return;\n }\n\n this.barra = true;\n this.subirImag(this.files2[0]); //con est estoy subiendo la imagen al servidor \n\n }", "title": "" }, { "docid": "c7510f62a1711b9b8df3c02c60361e33", "score": "0.5402031", "text": "function iniciarSesion() {\n\tcodigoSeguridadIngreso = obtenerCodigo();\n\tif (codigoSeguridad == codigoSeguridadIngreso) {\n\t\treturn alert('Bienvenido '+ nombreUsuario + ' ya puedes realizar operaciones');\n\t}\n\telse {\n\t\tsaldoCuenta = 0;\n\t\treturn alert('Codigo incorrecto. Tu dinero ha sido retenido por medidas de seguridad');\t\n\t}\n}", "title": "" }, { "docid": "b8dcc222dccf6edab8563724f085358d", "score": "0.5397345", "text": "function addArgCorso(idArg) {\n $(\"#msgCercaArg\").text(\"\").removeClass(\"alert alert-danger\");\n\n let chkToken = inviaRichiesta('/api/insNuovoArgCorso', 'POST', { \"idCorso\": $(\"#descCorso\").attr(\"idCorso\"), \"idArg\": idArg });\n chkToken.fail(function (jqXHR, test_status, str_error) {\n if (jqXHR.status == 612) // argomento già presente in corso\n $(\"#msgCercaArg\").show().text(JSON.parse(jqXHR.responseText)[\"message\"]).addClass(\"alert alert-danger\");\n else\n printErrors(jqXHR, \"#msgCercaArg\");\n });\n chkToken.done(function (data) {\n if (data == \"insArgCorsoOk\")\n window.location.reload();\n else\n $(\"#msgCercaArg\").text(\"Si è verificato un errore durante l'aggiunta dell'argomento al corso\").addClass(\"alert alert-danger\");\n });\n}", "title": "" }, { "docid": "2c2bbf48009cc53ee4b3b9d6d81254cb", "score": "0.53793335", "text": "confirmDelivery() {\n dialog.showMessageBox(dialogOptions, i => {\n if (i === 0) {\n for (let bike of this.bikes) {\n orderService.updateBikeStatus(bike.sykkel_id, \"Ledig\", this.location, () => {});\n }\n for (let equip of this.equipment) {\n orderService.updateEquipStatus(equip.utstyr_id, \"Ledig\", this.location, () => {});\n }\n history.push(\"/order/overview\");\n orderService.updateOrderStatusDelivered(this.order.id, () => {});\n }\n });\n }", "title": "" }, { "docid": "d32cf09b335eb8d2da7616899657695a", "score": "0.5367521", "text": "if(!ok) // inventory is full\n\t\t{\n\t\t\tOpenDialogMessage(\"YOUR HANDS\\nARE FULL!\");\n\t\t\treturn;\n\t\t}", "title": "" }, { "docid": "78104507e987efb90f67727b8b5ca768", "score": "0.5364836", "text": "function clientExitpas(nomDuClient){\n var creationCompt=confirm('Desole Ce Client '+nomDuClient+' Existe pas dans la liste des client\\nvoulez vous cree un compt pour ce client');\n if(creationCompt)\n {\n $('#creationCompt').click();\n }\n return creationCompt;\n }", "title": "" }, { "docid": "689ee2ce02c7ae4a3722ad9e01a5037d", "score": "0.5360682", "text": "enviarSing(e) {\n e.preventDefault();\n //Si la validacion de los campos es del formulario ha sido realizada \n if(this.validadarSingUp()){\n //Cambio el estado de 'enviado' a 'True'\n this.setState({\n enviado: true\n });\n\n //Muestro el mensaje que se encuentra en la funcion mensajEnviado\n return this.mensajeEnviado();\n }\n }", "title": "" }, { "docid": "5a1385c147af67232a9c8675ceed16a2", "score": "0.53472835", "text": "approve_member_online_chat(js) {\n let deferred = Q.defer();\n let msg = js.client.data.msg;\n try {\n this.findTagetByTargetId(msg.targetid).then(r => {\n let res = r;\n if (res.length) {\n let s_target = res[0];\n this.findUserByUsername(js.client.data.user.username).then(r => {\n let res = r;\n if (res.length) {\n let u = res[0];\n if (s_target.membergui.indexOf(u.gui) > -1) {\n throw new Error('ERROR exist member');\n }\n if (js.client.auth.gui !== s_target.usergui)\n throw new Error('ERROR you have no permission to add this user');\n if (s_target.pendingmemberapproval.indexOf(u.username) > -1) {\n s_target.membergui.push(u.gui);\n s_target.memberusername.push(u.username);\n this.updateTarget(s_target).then(res => {\n js.client.data.message = 'OK update approved member joining request!';\n // getPendingRequestByUserGui(js).then(res=>{\n // if(res)\n // })\n this.updatePendingRequest(js).then(res => {\n deferred.resolve(js);\n });\n });\n }\n else if (s_target.deniedapprovlalist.indexOf(u.username) > -1) {\n this.updateTarget(s_target).then(res => {\n js.client.data.message = 'OK update deny member joining request!';\n let pendingrequest = {\n gui: uuidV4(),\n usergui: s_target.usergui,\n createdtime: this.convertTZ(moment().format()),\n requesttype: 'arppove',\n requestto: u.username,\n isdone: true,\n result: 'deny member joining',\n };\n js.client.data.pendingrequest = pendingrequest;\n this.updatePendingRequest(js).then(res => {\n deferred.resolve(js);\n });\n });\n }\n else {\n throw new Error('ERROR please subscribe first');\n }\n }\n else {\n throw new Error('ERROR not found invited user');\n }\n });\n }\n else {\n throw new Error('ERROR targetid now found');\n }\n });\n }\n catch (error) {\n js.client.data.message = error;\n deferred.reject(js);\n }\n return deferred.promise;\n }", "title": "" }, { "docid": "9d5d8f8215aaeaa3922f382a4c9e1124", "score": "0.5336011", "text": "excute () {\n\t\t$('.props-list').find('li.dropdown-select').find('div.btn-group').find('button[data-drop-type='+this.dropType+']').first().html(sceneClass.locTypeMap[this.newBindLocType]);\n\n\t\t// 更改本地数据\n\t\teditor.setProperValue(this.object, 'type_id', this.newBindLocType);\n\n\t\t// 提交接口数据\n\t\tvar submitData = {\n\t\t\ttype_id: this.newBindLocType\n\t\t};\n\t\tsceneClass.submitRolePropsInfo(submitData, this.bindID); // 向后台提交数据\n\t}", "title": "" }, { "docid": "d1170fd9d031a716b677a3c683f15767", "score": "0.53168464", "text": "_handleClickDataStatus()\n {\n if (this._lastErrorCode !== '' || this._lastErrorDetails !== '')\n { \n this.rodanChannel.request(Rodan.RODAN_EVENTS.REQUEST__MODAL_SHOW, {title: \"ERROR\", content: \"Error code: \" + this._lastErrorCode + \" \" + this._lastErrorDetails});\n }\n }", "title": "" }, { "docid": "95d16264f589580eb921981a76af16d8", "score": "0.53160435", "text": "function arancelGuardado() {\n\t// Mensaje de se guardo o actualizo bien \n\tif ($(\"#id\").val() != null && $(\"#id\").val() != \"\") {\n\t\talert(\"Se actualizo el Arancel\");\n\t} else {\n\t\talert(\"Se creo el Arancel\");\t\n\t}\n\t// cierro el popUp\n\tcerrarVentana();\n\t// Recargo la pantalla\n\twindow.location.reload();\n}", "title": "" }, { "docid": "d8ae85b978aa8088e3038d776dc105ac", "score": "0.5314732", "text": "handleInvoiceDialogSubmit(event, invoice) {\n if (event !== null) {\n event.preventDefault();\n }\n this.setState({\n invoiceDialogLoading: true\n });\n if (!invoice._id) {\n delete invoice._id;\n this.socket.emit('create', invoice, () => {\n this.setState({\n invoiceDialogLoading: false,\n invoiceDialogShow: false,\n messageShow: true,\n messageMessage: `Created invoice ${invoice.invoice_number}`,\n messageVariant: 'success'\n });\n });\n } \n }", "title": "" }, { "docid": "8769a59155587712c1366da8bfa5e365", "score": "0.5312871", "text": "function draft() {\n if (e.target.value === \"send\") {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "de5b0cf676ba0859ede23c2e70b0f622", "score": "0.5301479", "text": "function check_scommessa() {\n\tif (!getQuota()){\n\t\twriteAlert(\"Devi prima inserire una quota!\");\n\t\treturn false;\n\t}\n\tvar importo_scommesso = getBet();\n\tif (importo_scommesso == \"\") {\n\t\twriteAlert(\"Inserisci importo\");\n\t\treturn false;\n\t}\n\twriteAlert(\"\");\n\treturn true;\n}", "title": "" }, { "docid": "a14373ccb7f5290d3d4b34be7b1b127a", "score": "0.5298228", "text": "function checkForDelete(){\n if(message.title ==\"na\" && message.link == \"na\" ){\n sendEmail();\n putDynamoAsync();\n }\n else{\n getFromDynamoAsync();\n putDynamoAsync();\n \n }\n }", "title": "" }, { "docid": "536e211c3c3e78da17516635598297d1", "score": "0.5291871", "text": "function confirmarVendedorActualizacion() {\n var idVendedorEditar = $(\"#idVendedorEditar\").val();\n if (idVendedorEditar == \"\" || idVendedorEditar == null) {\n alert(\"Por favor seleccione un usuario en la pantalla anterior.\");\n $(\"#modalEditarVendedorNuevo\").modal('hide');//ocultamos el modal\n $('body').removeClass('modal-open');//eliminamos la clase del body para poder hacer scroll\n $('.modal-backdrop').remove();//eliminamos el backdrop del modal\n $(\"#btnEditar\").prop('disabled', true);\n\n } else {\n alertify.confirm('Actualizar',\n 'Confirme actualizacion del vendedor.',\n function () {\n actualizarVendedor();\n },\n function () {\n alertify.error('Cancelado.');\n });\n }\n\n}", "title": "" }, { "docid": "ebe762dc53372fd7de49af9a166d4e49", "score": "0.5280586", "text": "static lockGuard(sendResponse, cb){\n // TODO: Change failure to a more explanatory message\n if(!seed.length) sendResponse(null);\n else cb();\n }", "title": "" }, { "docid": "df4c4be7fcb734f28792ef1873b1d295", "score": "0.5278378", "text": "async __checkMsg() {\n let res = await requestWechatApi.checkMsg(this.data).catch(error => {\n this.emit('error', error);\n });\n if (!res) res = {};\n if (res.retcode == 1101) return this.emit('logout');\n if (res.retcode == 1102) return;\n //\n if (+res.selector < 7) {\n await this.getMsg().catch(error => {\n this.emit('error', error);\n });\n }\n this.__checkMsg();\n }", "title": "" }, { "docid": "0494cc636a20025de5e99bb3f83291c7", "score": "0.52717257", "text": "function irAAgregarTurno(){\r\n\tvar msg = \"Desea Agregar un NUEVO REGISTRO?.. \";\r\n\t//Obtengo el valor que define si el formulario a sufrido cambios, para definir el mensaje de confirmacion\r\n\tvar cambiosSinGuardar = $(\"#t_cambios\").val();\r\n\tif(cambiosSinGuardar == \"true\") msg = 'Puede haber cambios sin guardar en el formulario, ¿Desea agregar un NUEVO Registro de todas formas?.';\r\n\tif(confirm(msg)) Cons_turno('', 'agregar');\r\n}", "title": "" }, { "docid": "40bf0c8f93eeaed2bd7be53a5f41405d", "score": "0.5268366", "text": "onConfirm() {\n this.setState({isCreatingEdition: true});\n const name = this.state.editionName;\n const savedThis = this;\n\n this.props.onCreateEdition(name).then(() => {\n savedThis.setState({\n isCreatingEdition: false,\n createEditionError: null,\n didCreateEdition: true\n });\n savedThis.props.onDismiss();\n }, error => {\n savedThis.setState({\n isCreatingEdition: false,\n createEditionError: error\n });\n });\n }", "title": "" }, { "docid": "db15a332c845310f6e127c360c835518", "score": "0.5266249", "text": "_onStoreReply()\n\t{\n\t\treturn;\n\t}", "title": "" }, { "docid": "fbacd19c4c59b09f2672eef8ffb9bd10", "score": "0.5258743", "text": "function notSavedForm(err){\r\n\talert('La tua guida purtroppo non può essere salvata! Riprova, se il problema persiste riprova più tardi');\r\n\tconsole.error(\"Execute error\", err);\r\n}", "title": "" }, { "docid": "c68b439086dc7914c60c8556f9688290", "score": "0.5255794", "text": "enterSend (prm) {\n try {\n return this.confmng(\"enterSend\", prm);\n\t} catch (e) {\n console.error(e.stack);\n throw e;\n\t}\n }", "title": "" }, { "docid": "a5191572816b376f89e4c77fd8c296ef", "score": "0.52383727", "text": "function excluir() {\n\t\tconfirmacaoModal(\"Confirma a exclusão deste registro?\", \"Confirmação\", excluirConfirmado);\n\t}", "title": "" }, { "docid": "a11a4279baef31c6758966979c54a548", "score": "0.52355117", "text": "function errorNoActivity(e) {\n $activitiesLocation = $(\"fieldset.activities\");\n if (!($activitiesLocation.children(\":eq(0)\").hasClass(\"error\"))) {\n createErrorMessage($activitiesLocation[0]);\n }\n if (!(e.type === 'submit')) {\n $('html, body').animate({\n scrollTop: $activitiesLocation.offset().top\n }, 700);\n }\n // Validation failed.\n return false;\n }", "title": "" }, { "docid": "7c07e975e31544cdddc642c135c87338", "score": "0.5234335", "text": "function handleOk() {\n setConfirmLoading(true);\n form.validateFields(\n (err, values) => {\n if (!err) {\n processTransaction(values)\n .then(() => {\n setConfirmLoading(false);\n setVisible(false);\n })\n .catch(error => {\n console.log(error)\n });\n }\n }\n );\n }", "title": "" }, { "docid": "606f8a73514f164e4d424d80a10e19fb", "score": "0.5233943", "text": "callDenied (sender) {\n alert(\"Can't call \" + sender + ', the line is busy...');\n }", "title": "" }, { "docid": "9f4de5318ca12e9eb5897793e51ed410", "score": "0.5232133", "text": "function newAction(){\n inquirer.prompt([{\n type: \"confirm\",\n name: \"confirm\",\n message: \"Would you like to do anything else?\"\n }]).then( function( answer ){\n if ( answer.confirm ){\n supervisorActions();\n }\n else{\n console.log( \"\" );\n console.log(\"----------------------------------------------------------------------\");\n console.log(\" \");\n console.log(\" Thank you for supervising Bamazon \");\n console.log(\" \");\n console.log(\"----------------------------------------------------------------------\");\n process.exit(0);\n }\n })\n}", "title": "" }, { "docid": "e5b553169a84fc9dc7d52bd0e436f159", "score": "0.52321094", "text": "function verificarAutenticacion(peticion, respuesta, next){\n\tif(peticion.session.correo)\n\t\treturn next();\n\telse\n\t\trespuesta.send(\"ERROR, ACCESO NO AUTORIZADO\");\n}", "title": "" }, { "docid": "adf10dde968b9a79d55c5ea6c795af06", "score": "0.5228098", "text": "function viewBackFromOther() {\n logInfo('Back send info user approve');\n flagCreSearch = false;\n\tgTrans.isBack = true;\n flagAccFinalize = false;\n}", "title": "" }, { "docid": "4b789f211b7db48135d5f1925db9af5c", "score": "0.52248716", "text": "validateResponse (data) {\n\t\tconst user = data.user;\n\t\tAssert(user.id !== this.existingUserData.user.id, 'user returned should be different than invited user, under one-user-per-org');\n\t\tAssert(!user.isRegistered, 'invited user should not be registered, under one-user-per-org');\n\t\tsuper.validateResponse(data);\n\t}", "title": "" }, { "docid": "f01049387f98ab4e26421b0cb02b8da6", "score": "0.52224004", "text": "renderContent() {\n if (!this.props.order) {\n return \"There seems to be no order to delete...\";\n }\n return \"Are you sure you want to delete your entire order?\";\n }", "title": "" }, { "docid": "9cadae4d61f75c7c8ade2d470dd8b8f9", "score": "0.52210164", "text": "realizarSuprimento(context, valorSuprimento){\n if (valorSuprimento === null) {\n context.openAlert('O valor do suprimento deve ser maior que zero!')\n } else {\n request.get({\n url: BACKEND_URL + 'suprir/' + valorSuprimento + '/credenciais/' + context.credentials.username + '/' + context.credentials.password\n }, (err, res, body) => {\n let response = JSON.parse(res.body)\n\n if (response.status === true) {\n context.closeDialog('dialog-realizarSuprimento')\n context.isSuprimentoMinimo = false\n context.valorSuprimento = 0\n context.credentials = {\n username: '',\n password: ''\n }\n context.errors.clear()\n }\n\n context.sync()\n context.openAlert(response.message)\n })\n }\n }", "title": "" }, { "docid": "f8c19466ab32cf8df62ecbf3c8d589e4", "score": "0.521991", "text": "function addLezCorso(idLez) {\n $(\"#msgCercaLez\").text(\"\").removeClass(\"alert alert-danger\");\n\n let chkToken = inviaRichiesta('/api/insNuovaLezCorso', 'POST', { \"idCorso\": $(\"#descCorso\").attr(\"idCorso\"), \"idLez\": idLez });\n chkToken.fail(function (jqXHR, test_status, str_error) {\n if (jqXHR.status == 613) // lezione già presente in corso\n $(\"#msgCercaLez\").show().text(JSON.parse(jqXHR.responseText)[\"message\"]).addClass(\"alert alert-danger\");\n else\n printErrors(jqXHR, \"#msgCercaLez\");\n });\n chkToken.done(function (data) {\n if (data == \"insLezCorsoOk\")\n window.location.reload();\n else\n $(\"#msgCercaLez\").text(\"Si è verificato un errore durante l'aggiunta della lezione al corso\").addClass(\"alert alert-danger\");\n });\n}", "title": "" }, { "docid": "4d561942039abdb3eb7b8dd56302b02e", "score": "0.52130085", "text": "function verificarCampoAlterado() {\n\n\t\t\t\tvar ret = false;\n\n\t\t\t\tif (\n\t\t\t\t \t(ctrl.infoGeral.infoGeral.PEDIDO_CLIENTE !== undefined && ctrl.infoGeral.infoGeral.PEDIDO_CLIENTE !== '')\n\t\t\t\t ||\t(ctrl.infoGeral.infoGeral.OBSERVACAO \t !== undefined && ctrl.infoGeral.infoGeral.OBSERVACAO \t !== '')\n\t\t\t\t ||\tctrl.pedidoItemEscolhido.pedidoItemEscolhido.length > 0\n\t\t\t\t)\n\t\t\t\t\tret = true;\n\n\t\t\t\treturn ret;\n\t\t\t}", "title": "" }, { "docid": "5c67cc5efa5c0caead84ab5d8ca02645", "score": "0.5211112", "text": "function enviar_senha(){\n\n if($('#usuario_id').val() == \"\"){\n\n alertify.warning('Selecione um usuário!');\n return;\n\n } else {\n\n $('.gif').prop('hidden',false);\n $.post('enviar_senha.php',{usuario_id:$('#usuario_id').val()}).done(function(data){\n\n if(data == 'true'){\n $('.gif').prop('hidden',true);\n alertify.success('Senha enviada para o email do usuário!');\n $('#usuario_id').val(\"\");\n $('#usuario_id').trigger('chosen:updated');\n $('#usuario_email').val(\"\");\n return;\n\n } else {\n alertify.error('Erro ao enviar a senha para o email do usuário!');\n return;\n }\n });\n }\n}", "title": "" }, { "docid": "b399c41ff23f9f6c3f2622051269b2d2", "score": "0.520964", "text": "function navigationConfirmSale() {\n\n if (selectItems.length != 0) {\n props.navigation.navigate(\"ConfirmSale\", {\n sale: {\n idStore,\n matrix_id: idMatrix,\n user_id,\n client,\n selectItems,\n total,\n listItems,\n valueDiscounts: 0,\n percentualDiscounts: 0,\n discountedValues: 0\n }\n });\n } else {\n alert(\"Desculpe, você precisa selecionar pelo menos um produto!\")\n };\n }", "title": "" }, { "docid": "c026477c7306c686bf21f79f63766cc3", "score": "0.52092975", "text": "async handleSubmit() {\n // Guests cant create item > error popup\n if (this.props.account !== \"guest\") {\n let type = TYPES_INT[this.props.addingItem];\n let data = [];\n\n // Creating an array with the fields\n for (const i of Object.keys(IF[this.props.addingItem])) {\n data.push(this.state[i] || \"\"); // If null set to empty string (avoid errors)\n }\n\n // Getting the number of items the user has to set appropiate id\n let nextId = await this.props.contract.methods\n .numObjects(this.props.account)\n .call();\n\n // Format item into string to save to state\n let newItem = formatItem(type, data, this.props.items.length, nextId);\n\n this.props.saveItems(this.props.items.concat([newItem]));\n this.props.changeItem(newItem);\n\n // Format encrypted item to save to IPFS\n let toSend = await formatSend(encrypt(data, this.props.password));\n\n let res = await ipfs.add(toSend);\n\n // Save response hash to contract\n this.props.contract.methods\n .saveObject(type, nextId, res.path)\n .send({ from: this.props.account })\n .on(\n \"transactionHash\",\n function (hash) {\n // Save txs to pending txs menu\n this.props.saveTx([...this.props.pendingTxs, hash]);\n }.bind(this)\n )\n .on(\n \"receipt\",\n function (receipt) {\n // Remove tx from pending txs list\n let copyTxs = [...this.props.pendingTxs];\n\n for (const i in copyTxs) {\n if (copyTxs[i] === receipt.transactionHash) {\n copyTxs.splice(i, 1);\n break;\n }\n }\n this.props.saveTx(copyTxs);\n }.bind(this)\n );\n this.setState({ render: <Redirect to=\"/unlocked\" /> });\n } else {\n // Display error popup when guest\n this.setState({\n render: (\n <GuestTriedAction onClose={() => this.setState({ render: null })} />\n ),\n });\n }\n }", "title": "" }, { "docid": "979c9af8a960dbdf318ba3516bbce14a", "score": "0.5206867", "text": "add(){\n var item = prompt(\"Title: \", \"\");\n\tvar description = prompt(\"Description: \", \"\");\n\tif ((item != \"\" && item!=null) && (description !=\"\" && description!=null)) { //if cancelled or not entered anything\n\t this.props.onUpdate(item, description);\n\t}\n\telse{\n\t alert(\"Title or Description Missing!!!!\");\n\t}\n }", "title": "" }, { "docid": "d769ee28d34e7a005f31e63e1b7b28f0", "score": "0.5206278", "text": "function FailIfRejected() {}", "title": "" }, { "docid": "d769ee28d34e7a005f31e63e1b7b28f0", "score": "0.5206278", "text": "function FailIfRejected() {}", "title": "" }, { "docid": "d769ee28d34e7a005f31e63e1b7b28f0", "score": "0.5206278", "text": "function FailIfRejected() {}", "title": "" }, { "docid": "d769ee28d34e7a005f31e63e1b7b28f0", "score": "0.5206278", "text": "function FailIfRejected() {}", "title": "" }, { "docid": "d769ee28d34e7a005f31e63e1b7b28f0", "score": "0.5206278", "text": "function FailIfRejected() {}", "title": "" }, { "docid": "d769ee28d34e7a005f31e63e1b7b28f0", "score": "0.5206278", "text": "function FailIfRejected() {}", "title": "" }, { "docid": "d769ee28d34e7a005f31e63e1b7b28f0", "score": "0.5206278", "text": "function FailIfRejected() {}", "title": "" }, { "docid": "d769ee28d34e7a005f31e63e1b7b28f0", "score": "0.5206278", "text": "function FailIfRejected() {}", "title": "" }, { "docid": "d769ee28d34e7a005f31e63e1b7b28f0", "score": "0.5206278", "text": "function FailIfRejected() {}", "title": "" }, { "docid": "d769ee28d34e7a005f31e63e1b7b28f0", "score": "0.5206278", "text": "function FailIfRejected() {}", "title": "" }, { "docid": "d769ee28d34e7a005f31e63e1b7b28f0", "score": "0.5206278", "text": "function FailIfRejected() {}", "title": "" }, { "docid": "d769ee28d34e7a005f31e63e1b7b28f0", "score": "0.5206278", "text": "function FailIfRejected() {}", "title": "" }, { "docid": "d769ee28d34e7a005f31e63e1b7b28f0", "score": "0.5206278", "text": "function FailIfRejected() {}", "title": "" }, { "docid": "d769ee28d34e7a005f31e63e1b7b28f0", "score": "0.5206278", "text": "function FailIfRejected() {}", "title": "" }, { "docid": "d769ee28d34e7a005f31e63e1b7b28f0", "score": "0.5206278", "text": "function FailIfRejected() {}", "title": "" }, { "docid": "d769ee28d34e7a005f31e63e1b7b28f0", "score": "0.5206278", "text": "function FailIfRejected() {}", "title": "" }, { "docid": "1c8a1079c8415405dfca0caf75715c72", "score": "0.52038294", "text": "function confirmarModificarMaestro(){\r\n\t\t\r\n\t\tvar idBoton = $(\"#btnConfirmarModificarMaestro\");\r\n\t\tvar idLoader = $(\"#loaderModificarMaestro\");\r\n\t\r\n\t\tidBoton.click(function(){\r\n\t\r\n\t\t\tif($(\"#formModificarMaestro\").valid()){\r\n\t\r\n\t\t\t\tefectoProcesamiento(idBoton,idLoader,true);\r\n\t\r\n\t\t\t\tvar idMaestro = $(\"#txtIdMaestro\").val();\r\n\t\r\n\t\r\n\t\t\t\tvar nombre = $.trim($(\"#txtNombreMaestroMod\").val());\r\n\t\t\t\tvar descripcion = $.trim($(\"#txtDescripcionMaestroMod\").val());\r\n\t\r\n\t\r\n\t\t\t\tvar maestro = {\t\t\r\n\t\t\t\t\t\t\"id\" : idMaestro,\r\n\t\t\t\t\t\t\"nombre\" : nombre,\r\n\t\t\t\t\t\t\"descripcion\" : descripcion\r\n\t\t\t\t}\r\n\t\r\n\t\r\n\t\t\t\tguardar(\"maestro\",maestro,\"PUT\",false).done(function(){\r\n\t\r\n\t\t\t\t\t\tefectoProcesamiento(idBoton,idLoader,false);\r\n\t\t\t\t\t\t$('#modalModificarMaestro').modal('hide');\r\n\t\t\t\t\t\tlistarTodosMaestro();\r\n\t\t\t\t\t\ttostadaActualizar();\t\r\n\t\r\n\t\t\t\t}).fail(function(){\r\n\t\t\t\t\t\tefectoProcesamiento(idBoton,idLoader,false);\r\n\t\t\t\t\t\ttostadaError();\r\n\t\t\t\t});\r\n\t\r\n\t\t\t}\t\t\r\n\t\t})\r\n\t}", "title": "" }, { "docid": "072936bd331f3956a7fb8c99ea4dcd3c", "score": "0.5201024", "text": "async handleAddUser() {\n const { goBack } = this.props.navigation;\n const { nom, prenom, sex, date, distance } = this.state;\n if (nom!=\"\" && prenom!=\"\" && date!=\"\" && distance!=\"\"){\n await User.addUser(nom, prenom, sex, date.toISOString(), distance);\n goBack();\n }else{\n showAlert(\"Veuillez remplir tous les champs\", null, [], \"Erreur lors de l'ajout du patient\")\n }\n }", "title": "" }, { "docid": "eb6f8170c241eb5c68067ffc7b5d9c37", "score": "0.5199778", "text": "function resultadoNotificacion() {\n\treturn true;\n}", "title": "" }, { "docid": "c3e9773af49061521f0fa5206fd026af", "score": "0.51863235", "text": "onSubmit(e){\n //recuperamos texto del mensaje\n const msj = this.refs.mensaje.value.trim();\n //prevenimos el comportamiento por defautl\n e.preventDefault(); \n //verificamos si existe el mensaje\n if(msj){\n Meteor.call('mensajes.insert', msj, Session.get('lobby'), (err, res) => {\n if (!err) { //mensaje enviado\n this.refs.mensaje.value = '';\n } else { //error al enviar mensaje\n console.log(err.reason);\n }\n });\n }\n }", "title": "" }, { "docid": "2bd574ab770d4ec8545a4378106bf2f5", "score": "0.51841086", "text": "sendMessage(e) {\n // Detiene la acción predeterminada del elemento\n e.preventDefault();\n \n // Creamos un objeto con los valores obtenidos de los inputs\n const params = {\n tipocliente: this.tipocliente.value,\n tipodoc: this.tipodoc.value,\n numdoc: this.numdoc.value,\n nombre: this.nombre.value,\n direccion: this.direccion.value\n };\n \n // Validamos que no se encuentren vacios los principales elementos de nuestro formulario\n if (params.tipocliente && params.tipodoc && params.numdoc && params.nombre && params.direccion) {\n // enviamos nuestro objeto \"params\" a firebase database\n firebaseConf.database().ref('cliente').push(params).then(() => {\n swalert.fire({\n title: 'Cliente registrado',\n text: 'Cliente registrado exitosamente',\n icon: 'success',\n confirmButtonColor: '#f00946',\n confirmButtonText: 'Aceptar'\n })\n }).catch(() => {\n swalert.fire({\n title: 'Error',\n text: 'Los datos no se lograron guardar',\n icon: 'error',\n confirmButtonColor: '#f00946',\n confirmButtonText: 'Aceptar'\n })\n });\n\n// limpiamos nuestro formulario llamando la funcion resetform\nthis.resetForm();\n} else {\nswalert.fire({\n title: 'Error',\n text: 'Por favor ingrese todos los datos',\n icon: 'warning',\n confirmButtonColor: '#f00946',\n confirmButtonText: 'Aceptar'\n})\n };\n }", "title": "" }, { "docid": "41436d6498fd69f27a82f3009a073f6d", "score": "0.51811314", "text": "function noSubmitForm() {\n\t\tscrollRepeat = true;\n\t\tvar context;\n\t\tvar textoFormFeed = \"EVENT_NO_GRACIAS_FORMULARIO\";\n\t\tvar latestResponse = watson_Watson.getResponsePayload();\n\n\t\tif (latestResponse) {\n\t\t\tcontext = latestResponse.context;\n\t\t}\n\n\t\t// Send the user message\n\t\twatson_Watson.sendRequest(textoFormFeed, context);\n\t\tdocument.getElementById(\"nameFeedback\").disabled = true;\n\t\tdocument.getElementById(\"phoneFeedback\").disabled = true;\n\t\tdocument.getElementById(\"feedbackSmartFormNo\").disabled = true;\n\t\t$(\"#feedbackSmartFormNo\").addClass(\"enlaceInhabilitado\");\n\t\tdocument.getElementById(\"feedbackSmartFormSi\").disabled = true;\n\t\t$(\"#feedbackSmartFormSi\").addClass(\"enlaceInhabilitado\");\n\t}", "title": "" }, { "docid": "49b4e4d5b81566abcf43cc1e65d7f36a", "score": "0.5179844", "text": "confirmationFailure() {\n this.uiCommunicator(\n this.lifeCycle.Failed,\n this.lifeCycle.confirmationFailedEvent\n );\n debug('confirmation Failed: invalid confirmation');\n }", "title": "" }, { "docid": "ec60f2a75d1ae727bb99cb61918eb13c", "score": "0.5178796", "text": "function ok() {\n\n if(type == 'won') {\n //create won reason\n WonReason.prototype$patchAttributes({id: $scope.data.reason.id}, $scope.data.reason).$promise\n .then(function(results){\n Logger.info(\"Created New Reason\")\n $uibModalInstance.close(results);\n })\n .catch(function(err){\n Logger.error(\"Error Creating Reason\", \"Please try again in a moment\");\n })\n } else {\n\n //create won reason\n LostReason.prototype$patchAttributes({id: $scope.data.reason.id}, $scope.data.reason).$promise\n .then(function(results){\n Logger.info(\"Created New Reason\")\n $uibModalInstance.close(results);\n })\n .catch(function(err){\n Logger.error(\"Error Creating Reason\", \"Please try again in a moment\");\n })\n\n }\n\n }", "title": "" }, { "docid": "0cf408e1653cf29b30136c230c7e06b6", "score": "0.51771545", "text": "sendMessage(){\n // all condition for add a quote in the new message\n if (this.isHiddenQuote == true){\n this.insertQuote = this.contacts[this.actualIndex].messages[this.indexQuote].message; \n\n // add author quote in message object is the only solution I find for not change the author every time I click to open the message menu \n if (this.contacts[this.actualIndex].messages[this.indexQuote].status == \"sent\"){\n this.author = 'tu';\n } else {\n this.author = this.contacts[this.actualIndex].name;\n };\n };\n if (this.insertMessage.trim() != ''){\n this.contacts[this.actualIndex].messages.push(\n {\n date: dayjs().format('DD/MM/YYYY HH:mm:ss'),\n message: this.insertMessage,\n status: 'sent',\n quote: this.insertQuote,\n authorQuote: this.author,\n }\n );\n setTimeout(this.botMessage, 1000);\n };\n this.insertMessage = '';\n this.scrollToEnd();\n this.insertQuote = '';\n this.isHiddenQuote = false;\n }", "title": "" }, { "docid": "cd7d7a053d3803a85a6074100c165c32", "score": "0.5173847", "text": "function onSubmit() {\n let username = addUserModal.$element.find('input.username').val();\n\n // Check if username was email\n let emailRegex = /^(([^<>()\\[\\]\\\\.,;:\\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 let isEmail = emailRegex.test(username);\n\n // Check if en existing user has the same information\n let existingUser = users.filter((user) => {\n return user.username == username || user.email == username;\n })[0];\n\n // The user was found\n if(existingUser) {\n UI.errorModal(new Error('User \"' + username + '\" already exists'));\n return;\n }\n \n // An email was provided, send invitation \n if(isEmail) {\n let modal = UI.confirmModal(\n 'invite',\n 'Add user',\n 'Do you want to invite a new user with email \"' + username + '\"?',\n () => {\n customApiCall('post', '/api/user/invite', {\n email: username,\n })\n .then(() => {\n UI.messageModal('Invite user', 'Invitation was sent to ' + username);\n })\n .catch(errorModal);\n\n let $buttons = modal.$element.find('button').attr('disabled', true).addClass('disabled');\n\n return false;\n }\n );\n\n return;\n }\n \n // User doesn't exist, create it\n let $passwd;\n\n let modal = UI.confirmModal(\n 'create',\n 'Add user',\n [\n _.p('Set password for new user \"' + username + '\"'),\n $passwd = _.input({required: true, pattern: '.{6,}', class: 'form-control', type: 'text', value: generatePassword(), placeholder: 'Type new password'})\n ],\n () => {\n let password = $passwd.val() || '';\n let scopes = {};\n\n apiCall('post', 'user/new', {\n username: username,\n password: password,\n scopes: {}\n })\n .then(() => {\n UI.messageModal('Create user', 'User \"' + username + '\" was created with password \"' + password + '\".', () => { location.reload(); });\n })\n .catch(errorModal);\n\n let $buttons = modal.$element.find('button').attr('disabled', true).addClass('disabled');\n\n return false;\n }\n );\n }", "title": "" }, { "docid": "2244fa9b957d5afddd2f019843b6ebfb", "score": "0.5169464", "text": "pwConfirmError() {\n return (this.pwNew !== this.pwConfirm);\n }", "title": "" }, { "docid": "4526224c73b121c3f9f6a9349513a23e", "score": "0.516713", "text": "handleAddPrecuratedListResponse() {\n this.$emit('list-saved');\n }", "title": "" }, { "docid": "8b6006e433af666dbca8d79b8f830596", "score": "0.51656866", "text": "cargar() {\n this.cargaOk = true;\n this.setear();\n }", "title": "" }, { "docid": "e420daacfdde3c401def64b1541ed8b5", "score": "0.515966", "text": "function aplicarCambios() { \n var msgValida = get('frmCrearPeriodo.msgValidaDatos'); \n if ( msgValida != '') { \n cdos_mostrarAlert(msgValida);\n\t\t\t\t\t\t\tset('frmCrearPeriodo.msgValidaDatos','');\n\t\t\t\t\t\t\treturn false;\n }\n\t\t\t\treturn true;\n }", "title": "" } ]
3634d458210cbbe59d6252418442ace8
Writes device and/or agent source files depending on the options. Parameters: options : Options impt options of the corresponding command Returns: Promise that resolves if the operation succeeded, or rejects with an error
[ { "docid": "3ed638cff2b370b93d2c7bdd66356177", "score": "0.7948661", "text": "_saveSourceFiles(options) {\n const writeDeviceCode = (!options.agentOnly) ? \n Utils.writeFile(this._deviceFileName, this.deviceCode) :\n Promise.resolve();\n const writeAgentCode = (!options.deviceOnly) ? \n Utils.writeFile(this._agentFileName, this.agentCode) :\n Promise.resolve();\n return writeDeviceCode.\n then(() => writeAgentCode).\n then(() => UserInteractor.printInfo(UserInteractor.MESSAGES.BUILD_DOWNLOADED, this.identifierInfo));\n }", "title": "" } ]
[ { "docid": "d16e1f9162daf64af1dedd78901dc70b", "score": "0.623327", "text": "_setFileOptions(options) {\n this._deviceFileName = options.deviceFile || (this._projectConfig.exists() ? this._projectConfig.deviceFile : null);\n this._agentFileName = options.agentFile || (this._projectConfig.exists() ? this._projectConfig.agentFile : null);\n return Promise.resolve();\n }", "title": "" }, { "docid": "5e1ce894fb8a002a8b48cf192235a71f", "score": "0.59614176", "text": "* writeFile (options) {\n let flag = yield RNFS.exists(options.path);\n if (!flag) {\n yield RNFS.writeFile(options.path, options.body, options.encode);\n } else if (options.overwrite === true) {\n yield RNFS.unlink(options.path);\n yield RNFS.writeFile(options.path, options.body, options.encode);\n }\n }", "title": "" }, { "docid": "a635e3556a604f048633b0c6bc14ea97", "score": "0.5957287", "text": "_deploy(options) {\n return this._setFileOptions(options).\n then(() => this._readSourceFiles()).\n then((sources) => {\n\n // Builder variables in project file\n if(this._projectConfig.localBuilderJSON) {\n var projectBuilder = deepmerge(this._projectConfig.builderJSON, this._projectConfig.localBuilderJSON);\n } else {\n var projectBuilder = this._projectConfig.builderJSON;\n }\n\n // Buidler variables in secrets file\n if(this._projectConfig.localProjectSecrets) {\n var secretBuilder = deepmerge(this._projectConfig.globalProjectSecrets, this._projectConfig.localProjectSecrets);\n } else {\n var secretBuilder = this._projectConfig.globalProjectSecrets;\n }\n\n // Merging project and secret builders\n if(projectBuilder && secretBuilder) {\n var newBuilder = deepmerge(projectBuilder, secretBuilder);\n } else {\n var newBuilder = projectBuilder;\n }\n\n // execute the pre-build commands\n if(newBuilder[\"preBuild\"]) {\n for (var command of newBuilder[\"preBuild\"]) {\n Shell.exec(command);\n }\n }\n\n // build\n sources.agentCode = this._Builder.machine.execute(sources.agentCode, newBuilder[\"variables\"]);\n sources.deviceCode = this._Builder.machine.execute(sources.deviceCode, newBuilder[\"variables\"]);\n\n // execute the post-build commands\n if(newBuilder[\"postBuild\"]){\n for (var command of newBuilder[\"postBuild\"]) {\n Shell.exec(command);\n }\n }\n\n return this._create(options, sources.deviceCode, sources.agentCode);\n \n });\n }", "title": "" }, { "docid": "d5cc83d0d1f9deb93b22bce304ac5eb5", "score": "0.59473926", "text": "get(options) {\n return super.getEntity(true).\n then(() => this._checkFileOptions(options)).\n then(() => {\n const existingFiles = [];\n if (Utils.existsFileSync(this._deviceFileName) && !options.agentOnly) {\n existingFiles.push(this._deviceFileName);\n }\n if (Utils.existsFileSync(this._agentFileName) && !options.deviceOnly) {\n existingFiles.push(this._agentFileName);\n }\n return UserInteractor.processCancelContinueChoice(\n Util.format(UserInteractor.MESSAGES.BUILD_SOURCE_FILES_EXIST, existingFiles.join(', ')),\n this._saveSourceFiles.bind(this),\n options,\n options.confirmed || existingFiles.length === 0);\n }).\n then(() => this._getInfoData(options)).\n then((data) => UserInteractor.printResultWithStatus(data)).\n catch(error => UserInteractor.processError(error));\n }", "title": "" }, { "docid": "f97632371b2c404610e06cdf71e55b45", "score": "0.5657941", "text": "async function createLicense(options) {\n const targetPath = path.join(options.targetDirectory, 'LICENSE');\n const licenseContent = license.licenseText\n .replace('<year>', new Date().getFullYear())\n .replace('<copyright holders>', `${options.author_name} (${options.author_email})`);\n return writeFile(targetPath, licenseContent, 'utf8');\n}", "title": "" }, { "docid": "aa5bb1c02ad3f05e7c6c2c2636304460", "score": "0.5632268", "text": "_checkFileOptions(options) {\n if (!this._deviceFileName && !options.agentOnly) {\n return Promise.reject(new Errors.NoOptionError(Options.DEVICE_FILE));\n }\n if (!this._agentFileName && !options.deviceOnly) {\n return Promise.reject(new Errors.NoOptionError(Options.AGENT_FILE));\n }\n return Promise.resolve();\n }", "title": "" }, { "docid": "f823d42c89ef33a9077b5e71bdecf423", "score": "0.5479921", "text": "_setOptions(options) {\n options = options || {};\n return this._setFileOptions(options).then(() => {\n if (options.buildIdentifier) {\n this.initByIdentifier(options.buildIdentifier);\n }\n else if (this._projectConfig.exists()) {\n return this._projectConfig.checkConfig().then(() => {\n const deviceGroup = new DeviceGroup().initByIdFromConfig(this._projectConfig.deviceGroupId, this._projectConfig.type);\n return deviceGroup.getEntity().then(() => {\n if (deviceGroup.currentDeploymentId) {\n this.initById(deviceGroup.currentDeploymentId);\n }\n return Promise.resolve();\n });\n });\n }\n return Promise.resolve();\n });\n }", "title": "" }, { "docid": "04ab6e0b9f97912e5583ffdfbf57b601", "score": "0.5193571", "text": "async writeFile(fileName, data, options) {\n return util.promisify(fs.writeFile)(path.join(this.location, fileName), data, options);\n }", "title": "" }, { "docid": "43440995d997a4710507222b66c95698", "score": "0.51524454", "text": "async function normalizeOptions(context, projectName, options) {\n const workspaceRoot = context.workspaceRoot;\n const projectMetadata = await context.getProjectMetadata(projectName);\n const projectRoot = normalizeDirectoryPath(node_path_1.default.join(workspaceRoot, projectMetadata.root ?? ''));\n const projectSourceRoot = normalizeDirectoryPath(node_path_1.default.join(workspaceRoot, projectMetadata.sourceRoot ?? 'src'));\n // Gather persistent caching option and provide a project specific cache location\n const cacheOptions = (0, normalize_cache_1.normalizeCacheOptions)(projectMetadata, workspaceRoot);\n cacheOptions.path = node_path_1.default.join(cacheOptions.path, projectName);\n const entryPoints = normalizeEntryPoints(workspaceRoot, options.main, options.entryPoints);\n const tsconfig = node_path_1.default.join(workspaceRoot, options.tsConfig);\n const outputPath = normalizeDirectoryPath(node_path_1.default.join(workspaceRoot, options.outputPath));\n const optimizationOptions = (0, utils_1.normalizeOptimization)(options.optimization);\n const sourcemapOptions = (0, utils_1.normalizeSourceMaps)(options.sourceMap ?? false);\n const assets = options.assets?.length\n ? (0, utils_1.normalizeAssetPatterns)(options.assets, workspaceRoot, projectRoot, projectSourceRoot)\n : undefined;\n const outputNames = {\n bundles: options.outputHashing === schema_1.OutputHashing.All || options.outputHashing === schema_1.OutputHashing.Bundles\n ? '[name].[hash]'\n : '[name]',\n media: options.outputHashing === schema_1.OutputHashing.All || options.outputHashing === schema_1.OutputHashing.Media\n ? '[name].[hash]'\n : '[name]',\n };\n if (options.resourcesOutputPath) {\n outputNames.media = node_path_1.default.join(options.resourcesOutputPath, outputNames.media);\n }\n let fileReplacements;\n if (options.fileReplacements) {\n for (const replacement of options.fileReplacements) {\n fileReplacements ?? (fileReplacements = {});\n fileReplacements[node_path_1.default.join(workspaceRoot, replacement.replace)] = node_path_1.default.join(workspaceRoot, replacement.with);\n }\n }\n const globalStyles = [];\n if (options.styles?.length) {\n const { entryPoints: stylesheetEntrypoints, noInjectNames } = (0, helpers_1.normalizeGlobalStyles)(options.styles || []);\n for (const [name, files] of Object.entries(stylesheetEntrypoints)) {\n globalStyles.push({ name, files, initial: !noInjectNames.includes(name) });\n }\n }\n const globalScripts = [];\n if (options.scripts?.length) {\n for (const { bundleName, paths, inject } of (0, helpers_1.globalScriptsByBundleName)(options.scripts)) {\n globalScripts.push({ name: bundleName, files: paths, initial: inject });\n }\n }\n let tailwindConfiguration;\n const tailwindConfigurationPath = await (0, tailwind_1.findTailwindConfigurationFile)(workspaceRoot, projectRoot);\n if (tailwindConfigurationPath) {\n // Create a node resolver at the project root as a directory\n const resolver = (0, node_module_1.createRequire)(projectRoot + '/');\n try {\n tailwindConfiguration = {\n file: tailwindConfigurationPath,\n package: resolver.resolve('tailwindcss'),\n };\n }\n catch {\n const relativeTailwindConfigPath = node_path_1.default.relative(workspaceRoot, tailwindConfigurationPath);\n context.logger.warn(`Tailwind CSS configuration file found (${relativeTailwindConfigPath})` +\n ` but the 'tailwindcss' package is not installed.` +\n ` To enable Tailwind CSS, please install the 'tailwindcss' package.`);\n }\n }\n let serviceWorkerOptions;\n if (options.serviceWorker) {\n // If ngswConfigPath is not specified, the default is 'ngsw-config.json' within the project root\n serviceWorkerOptions = options.ngswConfigPath\n ? node_path_1.default.join(workspaceRoot, options.ngswConfigPath)\n : node_path_1.default.join(projectRoot, 'ngsw-config.json');\n }\n let indexHtmlOptions;\n if (options.index) {\n indexHtmlOptions = {\n input: node_path_1.default.join(workspaceRoot, (0, webpack_browser_config_1.getIndexInputFile)(options.index)),\n // The output file will be created within the configured output path\n output: (0, webpack_browser_config_1.getIndexOutputFile)(options.index),\n // TODO: Use existing information from above to create the insertion order\n insertionOrder: (0, package_chunk_sort_1.generateEntryPoints)({\n scripts: options.scripts ?? [],\n styles: options.styles ?? [],\n }),\n };\n }\n // Initial options to keep\n const { allowedCommonJsDependencies, aot, baseHref, buildOptimizer, crossOrigin, externalDependencies, extractLicenses, inlineStyleLanguage = 'css', outExtension, poll, polyfills, preserveSymlinks, statsJson, stylePreprocessorOptions, subresourceIntegrity, verbose, watch, progress, externalPackages, } = options;\n // Return all the normalized options\n return {\n advancedOptimizations: buildOptimizer,\n allowedCommonJsDependencies,\n baseHref,\n cacheOptions,\n crossOrigin,\n externalDependencies,\n extractLicenses,\n inlineStyleLanguage,\n jit: !aot,\n stats: !!statsJson,\n polyfills: polyfills === undefined || Array.isArray(polyfills) ? polyfills : [polyfills],\n poll,\n progress: progress ?? true,\n externalPackages,\n // If not explicitly set, default to the Node.js process argument\n preserveSymlinks: preserveSymlinks ?? process.execArgv.includes('--preserve-symlinks'),\n stylePreprocessorOptions,\n subresourceIntegrity,\n verbose,\n watch,\n workspaceRoot,\n entryPoints,\n optimizationOptions,\n outputPath,\n outExtension,\n sourcemapOptions,\n tsconfig,\n projectRoot,\n assets,\n outputNames,\n fileReplacements,\n globalStyles,\n globalScripts,\n serviceWorkerOptions,\n indexHtmlOptions,\n tailwindConfiguration,\n };\n}", "title": "" }, { "docid": "9bc509acc98612e2dcf09e99e2d941c6", "score": "0.5148942", "text": "async publish(options) {\n options = this.getOptions(options);\n if (!options.host) {\n throw new errors.MissingRequiredOptionError('must specify the host for the Roku device');\n }\n //make sure the outDir exists\n await this.fsExtra.ensureDir(options.outDir);\n let zipFilePath = this.getOutputZipFilePath(options);\n let readStream;\n try {\n if ((await this.fsExtra.pathExists(zipFilePath)) === false) {\n throw new Error(`Cannot publish because file does not exist at '${zipFilePath}'`);\n }\n readStream = this.fsExtra.createReadStream(zipFilePath);\n //wait for the stream to open (no harm in doing this, and it helps solve an issue in the tests)\n await new Promise((resolve) => {\n readStream.on('open', resolve);\n });\n let requestOptions = this.generateBaseRequestOptions('plugin_install', options, {\n mysubmit: 'Replace',\n archive: readStream\n });\n //attach the remotedebug flag if configured\n if (options.remoteDebug) {\n requestOptions.formData.remotedebug = '1';\n }\n //attach the remotedebug_connect_early if present\n if (options.remoteDebugConnectEarly) {\n // eslint-disable-next-line camelcase\n requestOptions.formData.remotedebug_connect_early = '1';\n }\n //try to \"replace\" the channel first since that usually works.\n let response;\n try {\n response = await this.doPostRequest(requestOptions);\n }\n catch (replaceError) {\n //fail if this is a compile error\n if (this.isCompileError(replaceError.message) && options.failOnCompileError) {\n throw new errors.CompileError('Compile error', replaceError, replaceError.results);\n }\n else {\n requestOptions.formData.mysubmit = 'Install';\n response = await this.doPostRequest(requestOptions);\n }\n }\n if (options.failOnCompileError) {\n if (this.isCompileError(response.body)) {\n throw new errors.CompileError('Compile error', response, this.getRokuMessagesFromResponseBody(response.body));\n }\n }\n if (response.body.indexOf('Identical to previous version -- not replacing.') > -1) {\n return { message: 'Identical to previous version -- not replacing', results: response };\n }\n return { message: 'Successful deploy', results: response };\n }\n finally {\n //delete the zip file only if configured to do so\n if (options.retainDeploymentArchive === false) {\n await this.fsExtra.remove(zipFilePath);\n }\n //try to close the read stream to prevent files becoming locked\n try {\n readStream === null || readStream === void 0 ? void 0 : readStream.close();\n }\n catch (e) {\n this.logger.info('Error closing read stream', e);\n }\n }\n }", "title": "" }, { "docid": "34d9281dc2d1f90a044823a3366a84a3", "score": "0.51184857", "text": "download(options) {\n return this.client.sendOperationRequest({ options }, downloadOperationSpec);\n }", "title": "" }, { "docid": "2a1ebd135b67c439300aacf828fdd29f", "score": "0.5102318", "text": "function start(options) {\n if (options[Opt.DETACH].getBoolean()) {\n return detachedRun(options);\n }\n let osType = config_1.Config.osType();\n let stdio = options[Opt.QUIET].getBoolean() ? 'pipe' : 'inherit';\n let binaries = files_1.FileManager.setupBinaries();\n let seleniumPort = options[Opt.SELENIUM_PORT].getString();\n let appiumPort = options[Opt.APPIUM_PORT].getString();\n let avdPort = options[Opt.AVD_PORT].getNumber();\n let android = options[Opt.ANDROID].getBoolean();\n let outputDir = config_1.Config.getSeleniumDir();\n if (options[Opt.OUT_DIR].getString()) {\n if (path.isAbsolute(options[Opt.OUT_DIR].getString())) {\n outputDir = options[Opt.OUT_DIR].getString();\n }\n else {\n outputDir = path.resolve(config_1.Config.getBaseDir(), options[Opt.OUT_DIR].getString());\n }\n }\n try {\n // check if folder exists\n fs.statSync(outputDir).isDirectory();\n }\n catch (e) {\n // if the folder does not exist, quit early.\n logger.warn('the out_dir path ' + outputDir + ' does not exist, run webdriver-manager update');\n return;\n }\n let chromeLogs = null;\n let loggingFile = null;\n if (options[Opt.CHROME_LOGS].getString()) {\n if (path.isAbsolute(options[Opt.CHROME_LOGS].getString())) {\n chromeLogs = options[Opt.CHROME_LOGS].getString();\n }\n else {\n chromeLogs = path.resolve(config_1.Config.getBaseDir(), options[Opt.CHROME_LOGS].getString());\n }\n }\n binaries[binaries_1.Standalone.id].versionCustom = options[Opt.VERSIONS_STANDALONE].getString();\n binaries[binaries_1.ChromeDriver.id].versionCustom = options[Opt.VERSIONS_CHROME].getString();\n binaries[binaries_1.GeckoDriver.id].versionCustom = options[Opt.VERSIONS_GECKO].getString();\n if (options[Opt.VERSIONS_IE]) {\n binaries[binaries_1.IEDriver.id].versionCustom = options[Opt.VERSIONS_IE].getString();\n }\n binaries[binaries_1.AndroidSDK.id].versionCustom = options[Opt.VERSIONS_ANDROID].getString();\n binaries[binaries_1.Appium.id].versionCustom = options[Opt.VERSIONS_APPIUM].getString();\n let downloadedBinaries = files_1.FileManager.downloadedBinaries(outputDir);\n if (downloadedBinaries[binaries_1.Standalone.id] == null) {\n logger.error('Selenium Standalone is not present. Install with ' +\n 'webdriver-manager update --standalone');\n process.exit(1);\n }\n let promises = [];\n let args = [];\n if (osType === 'Linux') {\n // selenium server may take a long time to start because /dev/random is BLOCKING if there is not\n // enough entropy the solution is to use /dev/urandom, which is NON-BLOCKING (use /dev/./urandom\n // because of a java bug)\n // https://github.com/seleniumhq/selenium-google-code-issue-archive/issues/1301\n // https://bugs.openjdk.java.net/browse/JDK-6202721\n promises.push(Promise.resolve(args.push('-Djava.security.egd=file:///dev/./urandom')));\n }\n if (options[Opt.LOGGING].getString()) {\n if (path.isAbsolute(options[Opt.LOGGING].getString())) {\n loggingFile = options[Opt.LOGGING].getString();\n }\n else {\n loggingFile = path.resolve(config_1.Config.getBaseDir(), options[Opt.LOGGING].getString());\n }\n promises.push(Promise.resolve(args.push('-Djava.util.logging.config.file=' + loggingFile)));\n }\n if (downloadedBinaries[binaries_1.ChromeDriver.id] != null) {\n let chrome = binaries[binaries_1.ChromeDriver.id];\n promises.push(chrome.getUrl(chrome.versionCustom)\n .then(() => {\n args.push('-Dwebdriver.chrome.driver=' +\n path.resolve(outputDir, binaries[binaries_1.ChromeDriver.id].executableFilename()));\n if (chromeLogs != null) {\n args.push('-Dwebdriver.chrome.logfile=' + chromeLogs);\n }\n })\n .catch(err => {\n console.log(err);\n }));\n }\n if (downloadedBinaries[binaries_1.GeckoDriver.id] != null) {\n let gecko = binaries[binaries_1.GeckoDriver.id];\n promises.push(gecko.getUrl(gecko.versionCustom)\n .then(() => {\n args.push('-Dwebdriver.gecko.driver=' +\n path.resolve(outputDir, binaries[binaries_1.GeckoDriver.id].executableFilename()));\n })\n .catch(err => {\n console.log(err);\n }));\n }\n if (downloadedBinaries[binaries_1.IEDriver.id] != null) {\n let ie = binaries[binaries_1.IEDriver.id];\n promises.push(ie.getUrl(ie.versionCustom)\n .then(() => {\n binaries[binaries_1.IEDriver.id].osarch = 'Win32'; // use Win 32 by default\n if (options[Opt.IE64].getBoolean()) {\n binaries[binaries_1.IEDriver.id].osarch =\n config_1.Config.osArch(); // use the system architecture\n }\n args.push('-Dwebdriver.ie.driver=' +\n path.resolve(outputDir, binaries[binaries_1.IEDriver.id].executableFilename()));\n })\n .catch(err => {\n console.log(err);\n }));\n }\n if (options[Opt.EDGE] && options[Opt.EDGE].getString()) {\n // validate that the file exists prior to adding it to args\n try {\n let edgeFile = options[Opt.EDGE].getString();\n if (fs.statSync(edgeFile).isFile()) {\n promises.push(Promise.resolve(args.push('-Dwebdriver.edge.driver=' + options[Opt.EDGE].getString())));\n }\n }\n catch (err) {\n // Either the default file or user specified location of the edge\n // driver does not exist.\n }\n }\n Promise.all(promises).then(() => {\n let standalone = binaries[binaries_1.Standalone.id];\n standalone.getUrl(standalone.versionCustom)\n .then(() => {\n // starting android\n if (android) {\n if (downloadedBinaries[binaries_1.AndroidSDK.id] != null) {\n let avds = options[Opt.AVDS].getString();\n startAndroid(outputDir, binaries[binaries_1.AndroidSDK.id], avds.split(','), options[Opt.AVD_USE_SNAPSHOTS].getBoolean(), avdPort, stdio);\n }\n else {\n logger.warn('Not starting android because it is not installed');\n }\n }\n if (downloadedBinaries[binaries_1.Appium.id] != null) {\n startAppium(outputDir, binaries[binaries_1.Appium.id], binaries[binaries_1.AndroidSDK.id], appiumPort, stdio);\n }\n args.push('-jar');\n args.push(path.resolve(outputDir, binaries[binaries_1.Standalone.id].filename()));\n })\n .catch(err => {\n console.log(err);\n })\n .then(() => {\n // Add the port parameter, has to declared after the jar file\n if (seleniumPort) {\n args.push('-port', seleniumPort);\n }\n let argsToString = '';\n for (let arg in args) {\n argsToString += ' ' + args[arg];\n }\n logger.info('java' + argsToString);\n let seleniumProcess = utils_1.spawn('java', args, stdio);\n if (options[Opt.STARTED_SIGNIFIER].getString()) {\n signalWhenReady(options[Opt.STARTED_SIGNIFIER].getString(), options[Opt.SIGNAL_VIA_IPC].getBoolean(), outputDir, seleniumPort, downloadedBinaries[binaries_1.Appium.id] ? appiumPort : '', binaries[binaries_1.AndroidSDK.id], avdPort, androidActiveAVDs);\n }\n logger.info('seleniumProcess.pid: ' + seleniumProcess.pid);\n seleniumProcess.on('exit', (code) => {\n logger.info('Selenium Standalone has exited with code ' + code);\n shutdownEverything();\n process.exit(process.exitCode || code);\n });\n seleniumProcess.on('error', (error) => {\n logger.warn('Selenium Standalone server encountered an error: ' + error);\n });\n process.stdin.resume();\n process.stdin.on('data', (chunk) => {\n logger.info('Attempting to shut down selenium nicely');\n shutdownEverything(seleniumPort);\n });\n process.on('SIGINT', () => {\n logger.info('Staying alive until the Selenium Standalone process exits');\n shutdownEverything(seleniumPort);\n });\n });\n });\n}", "title": "" }, { "docid": "73e478b5e679a44a8e156aabce1aefeb", "score": "0.5076778", "text": "async function download(options = {}) {\n let version = options === null || options === void 0 ? void 0 : options.version;\n const { platform = util_2.systemDefaultPlatform, cachePath = exports.defaultCachePath, reporter = new progress_1.ConsoleReporter(process.stdout.isTTY), timeout = 15000, } = options;\n if (version === 'stable') {\n version = await fetchTargetStableVersion({ timeout, cachePath, platform });\n }\n else if (version) {\n /**\n * Only validate version against server when no local download that matches version exists\n */\n if (!fs.existsSync(path.resolve(cachePath, `vscode-${platform}-${version}`))) {\n if (!(await isValidVersion(version, platform, timeout))) {\n throw Error(`Invalid version ${version}`);\n }\n }\n }\n else {\n version = await fetchTargetInferredVersion({\n timeout,\n cachePath,\n platform,\n extensionsDevelopmentPath: options.extensionDevelopmentPath,\n });\n }\n reporter.report({ stage: progress_1.ProgressReportStage.ResolvedVersion, version });\n const downloadedPath = path.resolve(cachePath, makeDownloadDirName(platform, version));\n if (fs.existsSync(downloadedPath)) {\n if (util_2.isInsiderVersionIdentifier(version)) {\n reporter.report({ stage: progress_1.ProgressReportStage.FetchingInsidersMetadata });\n const { version: currentHash, date: currentDate } = util_2.insidersDownloadDirMetadata(downloadedPath, platform);\n const { version: latestHash, timestamp: latestTimestamp } = version === 'insiders'\n ? await util_2.getLatestInsidersMetadata(util_2.systemDefaultPlatform)\n : await util_2.getInsidersVersionMetadata(util_2.systemDefaultPlatform, version);\n if (currentHash === latestHash) {\n reporter.report({ stage: progress_1.ProgressReportStage.FoundMatchingInstall, downloadedPath });\n return Promise.resolve(util_2.insidersDownloadDirToExecutablePath(downloadedPath, platform));\n }\n else {\n try {\n reporter.report({\n stage: progress_1.ProgressReportStage.ReplacingOldInsiders,\n downloadedPath,\n oldDate: currentDate,\n oldHash: currentHash,\n newDate: new Date(latestTimestamp),\n newHash: latestHash,\n });\n await fs.promises.rm(downloadedPath, { force: true, recursive: true });\n }\n catch (err) {\n reporter.error(err);\n throw Error(`Failed to remove outdated Insiders at ${downloadedPath}.`);\n }\n }\n }\n else if (util_2.isStableVersionIdentifier(version)) {\n reporter.report({ stage: progress_1.ProgressReportStage.FoundMatchingInstall, downloadedPath });\n return Promise.resolve(util_2.downloadDirToExecutablePath(downloadedPath, platform));\n }\n else {\n reporter.report({ stage: progress_1.ProgressReportStage.FoundMatchingInstall, downloadedPath });\n return Promise.resolve(util_2.insidersDownloadDirToExecutablePath(downloadedPath, platform));\n }\n }\n for (let i = 0;; i++) {\n try {\n // Use a staging directory and rename after unzipping so partially-\n // downloaded/unzipped files aren't \"stuck\" being used.\n const downloadStaging = `${downloadedPath}.tmp`;\n await fs.promises.rm(downloadStaging, { recursive: true, force: true });\n const { stream, format } = await downloadVSCodeArchive({\n version,\n platform,\n cachePath,\n reporter,\n timeout,\n });\n // important! do not put anything async here, since unzipVSCode will need\n // to start consuming the stream immediately.\n await unzipVSCode(reporter, downloadStaging, stream, platform, format);\n await fs.promises.rename(downloadStaging, downloadedPath);\n reporter.report({ stage: progress_1.ProgressReportStage.NewInstallComplete, downloadedPath });\n break;\n }\n catch (error) {\n if (i++ < DOWNLOAD_ATTEMPTS) {\n reporter.report({\n stage: progress_1.ProgressReportStage.Retrying,\n attempt: i,\n error: error,\n totalAttempts: DOWNLOAD_ATTEMPTS,\n });\n }\n else {\n reporter.error(error);\n throw Error(`Failed to download and unzip VS Code ${version}`);\n }\n }\n }\n reporter.report({ stage: progress_1.ProgressReportStage.NewInstallComplete, downloadedPath });\n if (util_2.isStableVersionIdentifier(version)) {\n return util_2.downloadDirToExecutablePath(downloadedPath, platform);\n }\n else {\n return util_2.insidersDownloadDirToExecutablePath(downloadedPath, platform);\n }\n}", "title": "" }, { "docid": "8d00ad46c7c28d62c9f7646cf86ff033", "score": "0.5070818", "text": "async takeScreenshot(options) {\n var _a, _b, _c;\n options.outDir = (_a = options.outDir) !== null && _a !== void 0 ? _a : this.screenshotDir;\n options.outFile = (_b = options.outFile) !== null && _b !== void 0 ? _b : `screenshot-${dayjs().format('YYYY-MM-DD-HH.mm.ss.SSS')}`;\n let saveFilePath;\n // Ask for the device to make an image\n let createScreenshotResult = await this.doPostRequest(Object.assign(Object.assign({}, this.generateBaseRequestOptions('plugin_inspect', options)), { formData: {\n mysubmit: 'Screenshot',\n archive: ''\n } }));\n // Pull the image url out of the response body\n const [_, imageUrlOnDevice, imageExt] = (_c = /[\"'](pkgs\\/dev(\\.jpg|\\.png)\\?.+?)['\"]/gi.exec(createScreenshotResult.body)) !== null && _c !== void 0 ? _c : [];\n if (imageUrlOnDevice) {\n saveFilePath = util_1.util.standardizePath(path.join(options.outDir, options.outFile + imageExt));\n await this.getToFile(this.generateBaseRequestOptions(imageUrlOnDevice, options), saveFilePath);\n }\n else {\n throw new Error('No screen shot url returned from device');\n }\n return saveFilePath;\n }", "title": "" }, { "docid": "f4e80164b3f8d6d297acd062d1c11693", "score": "0.50373113", "text": "writing() {\n this.log(`${chalk.green(\"writing!\")}`);\n\n this.fs.copyTpl(\n this.templatePath(\"_package.json\"),\n this.destinationPath(\"package.json\"),\n {\n name: this.answers.name\n }\n );\n\n this.fs.copy(\n this.templatePath(\"_.babelrc\"),\n this.destinationPath(\".babelrc\")\n );\n this.fs.copy(\n this.templatePath(\"_.gitignore\"),\n this.destinationPath(\".gitignore\")\n );\n this.fs.copy(\n this.templatePath(\"_README.md\"),\n this.destinationPath(\"README.md\")\n );\n this.fs.copyTpl(this.templatePath(\"_.env\"), this.destinationPath(\".env\"), {\n databaseURI: this.answers.databaseURI,\n testDatabaseURI: this.answers.testDatabaseURI,\n port: this.answers.port,\n jwtSecret: this.answers.jwtSecret,\n jwtExpiray: this.answers.jwtExpiray\n });\n\n // Server.js\n this.fs.copy(\n this.templatePath(\"_server.js\"),\n this.destinationPath(\"server.js\")\n );\n\n // Write entire /src directory\n this.fs.copy(this.templatePath(\"src\"), this.destinationPath(\"src\"));\n }", "title": "" }, { "docid": "dcf80663b0ffd8354e6ed1299a5ed085", "score": "0.5013088", "text": "execSync(options) {\n var defer = Q.defer();\n this._debug('exec tool: ' + this.toolPath);\n this._debug('Arguments:');\n this.args.forEach((arg) => {\n this._debug(' ' + arg);\n });\n var success = true;\n options = options || {};\n var ops = {\n cwd: options.cwd || process.cwd(),\n env: options.env || process.env,\n silent: options.silent || false,\n outStream: options.outStream || process.stdout,\n errStream: options.errStream || process.stderr,\n failOnStdErr: options.failOnStdErr || false,\n ignoreReturnCode: options.ignoreReturnCode || false\n };\n var argString = this.args.join(' ') || '';\n var cmdString = this.toolPath;\n // Using split/join to replace the temp path\n cmdString = this.ignoreTempPath(cmdString);\n if (argString) {\n cmdString += (' ' + argString);\n }\n if (!ops.silent) {\n ops.outStream.write('[command]' + cmdString + os.EOL);\n }\n var r = mock.getResponse('exec', cmdString);\n if (r.stdout && r.stdout.length > 0) {\n ops.outStream.write(r.stdout);\n }\n if (r.stderr && r.stderr.length > 0) {\n ops.errStream.write(r.stderr);\n }\n return { code: r.code, stdout: (r.stdout) ? r.stdout.toString() : null, stderr: (r.stderr) ? r.stderr.toString() : null };\n }", "title": "" }, { "docid": "7ccd4e1a55650288568d39d24e8a2b08", "score": "0.49893594", "text": "run(options) {\n if(options.all) {\n const deviceGroups = this._projectConfig.getJSON()[\"deviceGroups\"];\n for (var deviceGroup in deviceGroups) {\n Shell.exec(`impt build run --ac ${deviceGroups[deviceGroup][\"accountID\"]} --dg ${deviceGroup}`)\n }\n } else {\n const deviceGroup = new DeviceGroup(options);\n this._deploy(options).\n then(() => {\n return deviceGroup._restart(options);\n }).\n then(() => {\n if (options.log && deviceGroup._assignedDevices && deviceGroup._assignedDevices.length > 0) {\n UserInteractor.printInfo(UserInteractor.MESSAGES.BUILD_RUN, this.identifierInfo);\n new Log()._stream(deviceGroup._assignedDevices);\n }\n else {\n UserInteractor.printResultWithStatus();\n }\n }).\n catch(error => UserInteractor.processError(error));\n }\n }", "title": "" }, { "docid": "d22094bdbe138a331f2210f9a2e02146", "score": "0.4951725", "text": "writing() {\n /**\n * Fill the package.json file\n */\n this.fs.copyTpl(this.templatePath('_package.json'), this.destinationPath('package.json'), {\n name: this.answers.name,\n description: this.answers.description,\n });\n\n /**\n * Add a .gitignore file\n */\n this.fs.copy(this.templatePath('_.gitignore'), this.destinationPath('.gitignore'));\n\n /**\n * Add a prettier\n */\n this.fs.copy(this.templatePath('_.prettierrc.yaml'), this.destinationPath('.prettierrc.yaml'));\n\n /**\n * Add sonarqube if the user wants it\n */\n this.fs.copyTpl(this.templatePath('_.releaserc.json'), this.destinationPath('.releaserc.json'), {\n hasSonarQube: this.answers.wantsSonarQube,\n });\n if (this.answers.wantsSonarQube) {\n this.fs.copy(this.templatePath('_bumpSonarQube.js'), this.destinationPath('bumpSonarQube.js'));\n this.fs.copyTpl(\n this.templatePath('_sonar-project.properties'),\n this.destinationPath('sonar-project.properties'),\n {\n name: this.answers.name,\n },\n );\n }\n\n /**\n * Add ts configuration\n */\n this.fs.copy(this.templatePath('_tsconfig.json'), this.destinationPath('tsconfig.json'));\n this.fs.copy(this.templatePath('_tslint.json'), this.destinationPath('tslint.json'));\n }", "title": "" }, { "docid": "deace02a398aea5c6b36e8d7d4e10440", "score": "0.49113476", "text": "async function build(inputOptions, outputOptions) {\n try {\n if (isWatch) {\n const watcher = rollup.watch({\n ...inputOptions,\n output: [outputOptions]\n });\n onWatch(watcher);\n } else {\n // create a bundle\n const bundle = await rollup.rollup(inputOptions);\n\n // or write the bundle to disk\n //\n await bundle.write(outputOptions);\n }\n } catch (e) {\n error(e);\n }\n}", "title": "" }, { "docid": "b91f9f5788f4d7b66dc2ac4fe754ce35", "score": "0.48772314", "text": "async write (filepath, contents, options = {}) {\n try {\n await this._writeFile(filepath, contents, options);\n return\n } catch (err) {\n // Hmm. Let's try mkdirp and try again.\n await this.mkdir(dirname(filepath));\n await this._writeFile(filepath, contents, options);\n }\n }", "title": "" }, { "docid": "0ec11603a9dd268d4f859f5befed01c7", "score": "0.486647", "text": "async convertToSquashfs(options) {\n options = this.getOptions(options);\n if (!options.host) {\n throw new errors.MissingRequiredOptionError('must specify the host for the Roku device');\n }\n let requestOptions = this.generateBaseRequestOptions('plugin_install', options, {\n archive: '',\n mysubmit: 'Convert to squashfs'\n });\n let results = await this.doPostRequest(requestOptions);\n if (results.body.indexOf('Conversion succeeded') === -1) {\n throw new errors.ConvertError('Squashfs conversion failed');\n }\n }", "title": "" }, { "docid": "6e80557b099392ee5c2f390e72eb9575", "score": "0.48558825", "text": "export(options = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const dump = yield this.run();\n // Grabs exporting promise to be awaited\n const exporter = this.exporter.export(dump.stdout, Object.assign({ fileName: this.fileName }, options));\n // Wrap dump child process in a promise to handle failure properly\n const exit = new Promise((resolve, reject) => {\n dump.on('error', error => {\n this.logger.error('Unknown export error', error);\n reject(error);\n });\n dump.on('exit', (code) => __awaiter(this, void 0, void 0, function* () {\n this.logger.debug('Dump child process exited', { code });\n if (code !== 0) {\n if (this.exporter instanceof exporters_1.FileExporter && this.options.deleteFileOnFail !== false) {\n yield Utils.File.delete({ fileName: this.fileName, baseDir: this.options.baseDir });\n }\n reject(new ts_framework_common_1.BaseError('Unknown error in dump child process', { code }));\n }\n else {\n resolve();\n }\n }));\n });\n // Await for both of them in parallel\n return Promise\n .all([exit, exporter])\n .then(([exitResult, exporterResult]) => exporterResult);\n });\n }", "title": "" }, { "docid": "0e6fad099552954071c1f063d4ab85b2", "score": "0.48500213", "text": "async function write() {\n await fs.rmdir(dest, {recursive: true});\n\n for (let [path, data] of files) {\n const destPath = Path.join(dest, path);\n const destDir = Path.dirname(destPath);\n const upDir = \"../\".repeat(depth(path));\n\n // Create a single import statement for each file in which symbols were defined,\n // making it slightly easier for a human to view the file.\n const symbolsUsedImport =\n Array.from(createImports(path).entries())\n .map(\n ([definition, symbolEntries]) =>\n `import {${Array.from(symbolEntries)\n .map(([symbol]) => symbol)\n .join(\", \")}} from '${Path.normalize(Path.join(upDir, definition))}';\\n`\n )\n .join(\"\") + \"\\n\";\n\n // Create export statement for symbols defined here, to insert at bottom of file.\n const symbolsDefined = [...symbols.entries()]\n .filter(([symbol, {definition}]) => definition === path)\n .map(([symbol]) => symbol);\n const symbolsDefinedExport = symbolsDefined.length\n ? `\\n\\nexport {${symbolsDefined.join(\", \")}};\\n`\n : \"\";\n\n const destData =\n (filename ? filenameComment(path) : \"\") + symbolsUsedImport + data + symbolsDefinedExport;\n\n await fs.mkdir(destDir, {recursive: true});\n await fs.writeFile(destPath, destData);\n if (debug) console.info(`Wrote ${destPath}`);\n }\n\n await writeIndexJs();\n\n async function writeIndexJs() {\n const indexJsPath = Path.join(dest, indexjs);\n const imports = [...files.keys()].map(file => `import './${file}';\\n`).join(\"\");\n\n await fs.writeFile(indexJsPath, \"// Automatically generated by es6ify\\n\\n\" + imports);\n\n if (verbose) console.info(\"Wrote index file\", chalk.yellow(indexJsPath));\n }\n\n function filenameComment(path) {\n return `function ${path.replace(/\\W/g, \"_\")}() { return \"This is the path\"; }\\n`;\n }\n }", "title": "" }, { "docid": "01917ac9fb664b0ecb7255b17a69555f", "score": "0.48271924", "text": "save(opts) {\n\t\tif (typeof opts === 'string') {\n\t\t\topts = { file: opts };\n\t\t}\n\t\tthis.modified = new Date();\n\t\tlet buff = this.toBuffer(opts);\n\t\treturn fs.writeFileSync(opts.file, buff);\n\t\t// return fs.promises.writeFile(opts.file, buff);\n\t}", "title": "" }, { "docid": "0f6dbfd39828f867aed8785df6a4b94c", "score": "0.4810643", "text": "async function write(options, preview, contents) {\n\tif (options.dryRun || options.version.endsWith(PLACEHOLDER_VERSION)) {\n\t\tif (options.dryRun) {\n\t\t\tinfo(`[--dry-run] Preview of changes 👀`);\n\t\t}\n\t\telse if (options.interactive) {\n\t\t\tinfo(`[--interactive] Preview of changes 👀`);\n\t\t}\n\n\t\tprocess.stdout.write(preview + '\\n');\n\t}\n\telse {\n\t\tawait writeFileAsync(options.outfile, contents);\n\n\t\tyarn('format');\n\t}\n}", "title": "" }, { "docid": "f2cdcc052827ab2d2c647cae661130b4", "score": "0.4804204", "text": "getOptions(options = {}) {\n let fileOptions = {};\n const fileNames = ['rokudeploy.json', 'bsconfig.json'];\n if (options.project) {\n fileNames.unshift(options.project);\n }\n for (const fileName of fileNames) {\n if (this.fsExtra.existsSync(fileName)) {\n let configFileText = this.fsExtra.readFileSync(fileName).toString();\n let parseErrors = [];\n fileOptions = (0, jsonc_parser_1.parse)(configFileText, parseErrors, {\n allowEmptyContent: true,\n allowTrailingComma: true,\n disallowComments: false\n });\n if (parseErrors.length > 0) {\n throw new Error(`Error parsing \"${path.resolve(fileName)}\": ` + JSON.stringify(parseErrors.map(x => {\n return {\n message: (0, jsonc_parser_1.printParseErrorCode)(x.error),\n offset: x.offset,\n length: x.length\n };\n })));\n }\n break;\n }\n }\n let defaultOptions = {\n outDir: './out',\n outFile: 'roku-deploy',\n retainDeploymentArchive: true,\n incrementBuildNumber: false,\n failOnCompileError: true,\n deleteInstalledChannel: true,\n packagePort: 80,\n remotePort: 8060,\n timeout: 150000,\n rootDir: './',\n files: [...exports.DefaultFiles],\n username: 'rokudev',\n logLevel: Logger_1.LogLevel.log\n };\n //override the defaults with any found or provided options\n let finalOptions = Object.assign(Object.assign(Object.assign({}, defaultOptions), fileOptions), options);\n this.logger.logLevel = finalOptions.logLevel;\n //fully resolve the folder paths\n finalOptions.rootDir = path.resolve(process.cwd(), finalOptions.rootDir);\n finalOptions.outDir = path.resolve(process.cwd(), finalOptions.outDir);\n finalOptions.retainStagingDir = (finalOptions.retainStagingDir !== undefined) ? finalOptions.retainStagingDir : finalOptions.retainStagingFolder;\n //sync the new option with the old one (for back-compat)\n finalOptions.retainStagingFolder = finalOptions.retainStagingDir;\n let stagingDir = finalOptions.stagingDir || finalOptions.stagingFolderPath;\n //stagingDir\n if (stagingDir) {\n finalOptions.stagingDir = path.resolve(process.cwd(), stagingDir);\n }\n else {\n finalOptions.stagingDir = path.resolve(process.cwd(), util_1.util.standardizePath(`${finalOptions.outDir}/.roku-deploy-staging`));\n }\n //sync the new option with the old one (for back-compat)\n finalOptions.stagingFolderPath = finalOptions.stagingDir;\n return finalOptions;\n }", "title": "" }, { "docid": "0c31dc9e532a3552c82b6f8dafd7359a", "score": "0.47961357", "text": "deploy(options) {\n if(options.all) {\n const deviceGroups = this._projectConfig.getJSON()[\"deviceGroups\"];\n for (var deviceGroup in deviceGroups) {\n Shell.exec(`impt build deploy --ac ${deviceGroups[deviceGroup][\"accountID\"]} --dg ${deviceGroup}`)\n }\n } else {\n this._deploy(options).\n then(() => this._collectShortListData()).\n then(() => UserInteractor.printResultWithStatus(this._displayData)).\n catch(error => UserInteractor.processError(error));\n }\n }", "title": "" }, { "docid": "a36edca173152028ce01ab6abd94206c", "score": "0.47767487", "text": "async writing () {\n console.log('Generating benchmark files...');\n this._workloadWrite();\n answersObject.rateController = promptAnswers.rateController;\n\n switch(promptAnswers.rateController) {\n case 'fixed-rate':\n answersObject.opts = 'tps: 10';\n this._configWrite();\n break;\n case 'fixed-backlog':\n answersObject.opts = 'unfinished_per_client: 5';\n this._configWrite();\n break;\n case 'linear-rate':\n answersObject.opts = 'startingTps: 25, finishingTps: 75';\n this._configWrite();\n break;\n case 'fixed-feedback-rate':\n answersObject.opts = 'tps: 100, unfinished_per_client: 100';\n this._configWrite();\n break;\n }\n }", "title": "" }, { "docid": "7328c7eb59a801240039685c3ea1c1fb", "score": "0.47561282", "text": "download(options) {\n const operationArguments = {\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, downloadOperationSpec);\n }", "title": "" }, { "docid": "128abccffcbda13a120d96cfffe5a5a1", "score": "0.47451356", "text": "function build(options, done) {\n log('Building...');\n\n if (options.web) {\n return web(options, done);\n }\n\n var babel = require('babel-core');\n var mkdirp = require('mkdirp').sync;\n var path = require('path');\n\n var babelOpts = {\n ast: false\n };\n\n if (options.sourcemaps) {\n babelOpts.sourceMaps = true;\n }\n\n glob.sync('src/**/*.{js,es6}').forEach(function(filename) {\n var newname = filename.replace(/^src/, 'lib').replace(/es6$/, 'js');\n var result;\n\n if (newer(filename, newname)) {\n console.log(filename + ' -> ' + newname);\n\n result = babel.transformFileSync(filename, babelOpts);\n\n mkdirp(path.dirname(newname));\n\n if (options.sourcemaps) {\n var sourcemap = newname.replace(/js$/, 'map');\n result.code += '\\n//# sourceMappingURL=' + path.basename(sourcemap);\n fs.writeFileSync(sourcemap, JSON.stringify(result.map), 'utf8');\n }\n\n fs.writeFileSync(newname, result.code, 'utf8');\n }\n });\n\n done();\n}", "title": "" }, { "docid": "c3a6c38ed63a3d92948c1b429ee811e2", "score": "0.4743706", "text": "function run(options) {\n // sets the default values for those properties not set in the options\n setDefaults(options, schema);\n\n // check for valid configuration\n if (options.includeOnlyMappedFiles) {\n let isEmptyMapping = JSON.stringify(options.mapping) === JSON.stringify({});\n if (isEmptyMapping) {\n console.log(\"Warning: There is nothing to generate. The mapping is empty \"\n + \"and the 'includeOnlyMappedFiles' flag is true\"); \n process.exit(0);\n }\n }\n if (!fse.existsSync(options.input)) {\n console.log(\"Error: missing input folder: \" + options.input);\n process.exit(1);\n }\n\n var ngTranslationGen = require(\"./ng-translation-gen.js\");\n ngTranslationGen(options);\n}", "title": "" }, { "docid": "5a74bb0fb77a3ec6c4eac967cd75c853", "score": "0.4718406", "text": "render(code, file, options = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const execRenderer = (options) => __awaiter(this, void 0, void 0, function* () {\n try {\n const path = yield util.tmpName({\n postfix: '.stl'\n });\n const args = ` -o ${path}`\n + (options.colorScheme ? ' --colorscheme=' + options.colorScheme : '')\n + ' ' + options.inputFile;\n yield util.exec(options.binaryPath\n + args);\n return util.readFile(path, 'utf8');\n }\n catch (err) {\n throw err;\n }\n });\n let _options = Object.assign({ binaryPath: '/usr/bin/openscad', viewAll: true, autoCenter: true }, options);\n if (file) {\n try {\n return yield execRenderer(Object.assign({}, _options, { inputFile: file }));\n }\n catch (err) {\n console.log(err);\n }\n }\n else if (code) {\n const path = yield util.tmpName({\n postfix: '.scad'\n });\n yield util.writeFile(path, code);\n try {\n return yield execRenderer(Object.assign({}, _options, { inputFile: path }));\n }\n catch (err) {\n console.log(err);\n }\n }\n throw new Error('Neither code or file supplied!');\n });\n }", "title": "" }, { "docid": "6024b3d951ce9d3380743c7111523bb3", "score": "0.4692293", "text": "async function create (projectName, options) {\n console.log(projectName, options)\n const cwd = process.cwd(); // 获取当前命令执行时的工作目录\n const targetDir = path.join(cwd,projectName); // 目标目录\n console.log(targetDir)\n}", "title": "" }, { "docid": "16577471d02fdb284a18f76e6d6752b9", "score": "0.46900648", "text": "exec (command, options) {\n command = utils.safeFileName(command);\n let action = require('./actions/' + command + '.js');\n return action.exec(options);\n }", "title": "" }, { "docid": "2e66ea3792776b42590745e95f8b39ef", "score": "0.46679485", "text": "function fileTools() {\n var folderName = defaultConfig.folderName; // default foldername\n\n function getFolderName() {\n return folderName;\n }\n // set new foldername\n // if new foldername emppty or exist, return false\n // else set foldername and return true\n function setFolderName(newFolderName) {\n if (newFolderName != '' && !fs.existsSync(newFolderName)) {\n return false;\n }\n folderName = newFolderName;\n return true;\n }\n\n // create directory for c files if not exists when server starts\n // if exists the same name file, displays error and exit\n // if exists the same name directory, continue\n function createCFolder() {\n if (!fs.existsSync(folderName)) {\n fs.mkdirSync(folderName, 0777);\n console.log('Create folder \"' + folderName + '\" successfully.');\n } else if (!fs.lstatSync(folderName).isDirectory()) {\n console.log('[ERROR]: Fail to create folder \"' + folderName + '\".');\n process.exit(1);\n }\n else {\n console.log('Folder \"' + folderName + '\" has existed.');\n }\n }\n\n // create and write c file\n // need a error callback\n function writeCFileAsync(filename, userCode) {\n return new Promise(function (resolve, reject) {\n var result = getResult();\n fs.writeFile(folderName + path.sep + filename + '.c', userCode, (err) => {\n if (err) {\n result.success = false;\n } else {\n result.success = true;\n }\n resolve(result);\n });\n });\n }\n\n // get a filename by a random string with 32 characters\n function getRandomFilename(len = 32) {\n const chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890';\n const max = chars.length;\n let filename = '';\n for (let i = 0; i < len; i += 1) {\n filename += chars.charAt(Math.floor(Math.random() * max));\n }\n return filename;\n }\n\n // gcc compile: gcc filename.c -o filename\n // if exited with 1 means that fail to compile\n function compileCFileByFilenameAsync(filename) {\n const gcc = spawn('gcc', [folderName + path.sep + filename + '.c', '-o', folderName + path.sep + filename]);\n return new Promise(function (resolve, reject) {\n var result = getResult();\n gcc.stderr.on('data', (data) => {\n result.stderr += data.indexOf(':') == -1 ? data : data.slice(data.indexOf(':') + 1); // remove filename.c\n if (result.success) {\n result.success = false;\n }\n });\n gcc.on('close', (code) => {\n result.success = code === 1 ? false : true;\n while(result.stderr.indexOf(folderName + path.sep + filename + '.c') != -1) { // remove filename.c\n result.stderr = result.stderr.replace(folderName + path.sep + filename + '.c:', '');\n }\n resolve(result);\n });\n });\n }\n\n // run code: windows: $ filename / ubuntu: $ ./filename\n function execCFileByFilenameAsync(filename) {\n return new Promise(function (resolve, reject) {\n const execExe = isWin ? spawn(folderName + path.sep + filename) : spawn('./' + folderName + path.sep + filename);\n var result = getResult();\n execExe.stdout.on('data', (data) => {\n result.output += data;\n });\n\n execExe.stderr.on('data', (data) => {\n result.stderr += data;\n if (result.success) {\n result.success = false;\n }\n });\n\n execExe.on('close', (code) => {\n result.stderr += `program exited with code ${code}`;\n resolve(result);\n });\n });\n }\n\n function getResult(success = true, stderr = '', output = '') {\n return { success: success, stderr: stderr, output: output };\n }\n\n return {\n getFolderName: getFolderName,\n setFolderName: setFolderName,\n createCFolder: createCFolder,\n getRandomFilename: getRandomFilename,\n writeCFileAsync: writeCFileAsync,\n compileCFileByFilenameAsync: compileCFileByFilenameAsync,\n execCFileByFilenameAsync: execCFileByFilenameAsync,\n getRandomFilename: getRandomFilename,\n }\n}", "title": "" }, { "docid": "7d58f7b612ae2cdd5bdf1e22e4f6d6ed", "score": "0.46629503", "text": "async run(options) {\n isDev = !!options.isDev;\n try {\n // 1. Get all scss files within project\n let files = targetDirectory.map(file => {\n return recursive(file).then(files => files)\n })\n files = await Promise.all(files).then(res => res)\n files = files.flat(Infinity)\n\n files = files.map(file => {\n return {\n path: file,\n ...extractFileInPath(file)\n }\n }).filter(f => f.ext === 'scss')\n\n const outputDir = extractDirInPath(outputPath).str\n\n if (!fs.existsSync(outputDir)) {\n fs.mkdirSync(outputDir)\n }\n\n // 2. Merge all files to one file\n const outputMerged = `${outputDir}/merged.scss`\n await mergeFiles(files.map(f => f.path), outputMerged).then((status) => {\n // 3. Compile scss to css.\n [outputMerged].forEach(async file => {\n const data = await render(file)\n\n // Temporary write css file\n fs.writeFile(`${outputDir}/temp.css`, data.css, () => {})\n\n // Merge and adjust CSS and remove duplications\n postcss([combineSelectors({removeDuplicatedProperties: true})])\n .process(data.css, {from: `${outputDir}/temp.css`, to: outputPath})\n .then((result) => {\n fs.writeFileSync(outputPath, result.css);\n });\n\n // remove merged source\n try {\n fs.unlink(outputMerged, (err) => {\n if (err) {\n console.error(err)\n return\n }\n })\n fs.unlink(`${outputDir}/temp.css`, (err) => {\n if (err) {\n console.error(err)\n return\n }\n })\n } catch(err) {\n console.error(err)\n }\n })\n })\n\n return\n } catch (err) {\n console.error(err)\n }\n }", "title": "" }, { "docid": "dfe50c8cf5a30d5f21a829329f3ef6bd", "score": "0.46487162", "text": "execSync(options) {\r\n console.log('##[debug]exec tool: ' + this.toolPath);\r\n console.log('##[debug]arguments:');\r\n this.args.forEach((arg) => {\r\n console.log('##[debug] ' + arg);\r\n });\r\n var success = true;\r\n options = this._cloneExecOptions(options);\r\n if (!options.silent) {\r\n options.outStream.write(this._getCommandString(options) + os.EOL);\r\n }\r\n var r = child.spawnSync(this._getSpawnFileName(), this._getSpawnArgs(options), this._getSpawnSyncOptions(options));\r\n if (!options.silent && r.stdout && r.stdout.length > 0) {\r\n options.outStream.write(r.stdout);\r\n }\r\n if (!options.silent && r.stderr && r.stderr.length > 0) {\r\n options.errStream.write(r.stderr);\r\n }\r\n var res = { code: r.status, error: r.error };\r\n res.stdout = (r.stdout) ? r.stdout.toString() : '';\r\n res.stderr = (r.stderr) ? r.stderr.toString() : '';\r\n return res;\r\n }", "title": "" }, { "docid": "ba5896f326af8a82d8df1473052f367d", "score": "0.46429536", "text": "function promptFinish() {\n console.log(`All Done! Generating HTML...`);\n // Build the HTML Strings\n const sCards = buildCardString(team);\n const sHTML = buildHTMLString(sCards);\n const sStyle = buildStyleSheet();\n\n // Write the html file\n writeFileAsync(\"./generated/index.html\", sHTML)\n .then(() => console.log(\"Success\"))\n .catch(err => console.log(err));\n\n // Write the CSS file\n writeFileAsync(\"./generated/style.css\", sStyle)\n .then(() => console.log(\"Success\"))\n .catch(err => console.log(err));\n\n // Copy over assets\n // Creates /tmp/a/apple, regardless of whether `/tmp` and /tmp/a exist.\n fs.copyFile(\"./assets/images/bg.gif\", \"./generated/bg.gif\", (err) => {\n if (err) throw err;\n console.log(\"Successfully copied BG image!\");\n });\n\n}", "title": "" }, { "docid": "3f734534510be119f436724c6acdf8f7", "score": "0.46286026", "text": "print(options = {}) {\r\n if (options.newLineKind == null)\r\n options.newLineKind = this._context.manipulationSettings.getNewLineKind();\r\n if (this.getKind() === typescript_1.SyntaxKind.SourceFile)\r\n return utils_1.printNode(this.compilerNode, options);\r\n else\r\n return utils_1.printNode(this.compilerNode, this._sourceFile.compilerNode, options);\r\n }", "title": "" }, { "docid": "a91d0227cd183f5931bcf9749b848123", "score": "0.46227655", "text": "async function installDependencies(commandOptions) {\n const { config } = commandOptions;\n const installTargets = await install_1.getInstallTargets(config);\n if (installTargets.length === 0) {\n logger_1.logger.info('Nothing to install.');\n return;\n }\n // 2. Install dependencies, based on the scan of your final build.\n const installResult = await install_1.run({\n ...commandOptions,\n installTargets,\n config,\n shouldPrintStats: true,\n shouldWriteLockfile: false,\n });\n await util_2.updateLockfileHash(util_2.DEV_DEPENDENCIES_DIR);\n return installResult;\n}", "title": "" }, { "docid": "1def6e762c05f009f359ffbf63a07e6b", "score": "0.46156782", "text": "createSourceFile(filePath, sourceFileText, options) {\r\n sourceFileText = sourceFileText instanceof Function ? utils_2.getTextFromStringOrWriter(this.context.createWriter(), sourceFileText) : sourceFileText || \"\";\r\n if (typeof sourceFileText === \"string\")\r\n return this.createSourceFileFromText(filePath, sourceFileText, options);\r\n const writer = this.context.createWriter();\r\n const structurePrinter = this.context.structurePrinterFactory.forSourceFile({\r\n isAmbient: utils_2.FileUtils.getExtension(filePath) === \".d.ts\"\r\n });\r\n structurePrinter.printText(writer, sourceFileText);\r\n return this.createSourceFileFromText(filePath, writer.toString(), options);\r\n }", "title": "" }, { "docid": "5ed022f84511a69cc47c494706a1f8f7", "score": "0.4611867", "text": "get writeFile() {\n return (fileName, data, _writeByteOrderMark, onError, _sourceFiles) => {\n const p = this.resolve(fileName);\n try {\n this._memoryHost.write(p, core_1.virtualFs.stringToFileBuffer(data));\n }\n catch (e) {\n if (onError) {\n onError(e.message);\n }\n }\n };\n }", "title": "" }, { "docid": "c9b9f94292a3df2abba8be4e47dcfdb4", "score": "0.46106893", "text": "function run( options ) {\n\n return new Promise( function(resolve, reject) {\n\n setUp( options );\n\n var driver = new WebDriverFactory( BROWSER_TYPE ).driver;\n\n var promise = driver.get( dwURL );\n\n promise\n .then( function () {\n\n return add_Owners_In_one_page( driver );\n })\n .then( function () {\n\n PropelCommand.takeScreenShot( driver, 'add_owner_in_DW_' );\n PropelCommand.tearDown( driver, promise );\n\n var msg = new message.ConfigSuccessMessage(\"Update Company Code Successfully\", options.propelObj);\n resolve(msg);\n })\n .catch( function ( error ) {\n\n log.debug(\" ==> Oops, fail to review one org permissions...\");\n log.error( error );\n\n PropelCommand.takeScreenShot( driver, 'failedTo_add_owner_in_DW_' );\n PropelCommand.tearDown( driver, promise);\n\n var msg = new message.ConfigFailMessage( error.name, options.propelObj );\n resolve( msg );\n })\n });\n}", "title": "" }, { "docid": "3afa233ff31b46e082a613559c030ca9", "score": "0.4584783", "text": "copyDirectory(options) {\n // TODO(benjamn) Remove this wrapper when Builder#enter is no longer\n // implemented using ridiculous hacks.\n return this._copyDirectory(options);\n }", "title": "" }, { "docid": "c7c76d607dbfc0b25aeabaae8fbf341c", "score": "0.45805186", "text": "function writeCFileAsync(filename, userCode) {\n return new Promise(function (resolve, reject) {\n var result = getResult();\n fs.writeFile(folderName + path.sep + filename + '.c', userCode, (err) => {\n if (err) {\n result.success = false;\n } else {\n result.success = true;\n }\n resolve(result);\n });\n });\n }", "title": "" }, { "docid": "098392d662a1e48090201b76241a3359", "score": "0.4564874", "text": "async function installDependencies(commandOptions) {\n const { config } = commandOptions;\n const installTargets = await install_1.getInstallTargets(config);\n if (installTargets.length === 0) {\n logger_1.logger.info('Nothing to install.');\n return;\n }\n // 2. Install dependencies, based on the scan of your final build.\n const installResult = await install_1.run({\n ...commandOptions,\n installTargets,\n config,\n shouldPrintStats: true,\n shouldWriteLockfile: false,\n });\n await util_1.updateLockfileHash(util_1.DEV_DEPENDENCIES_DIR);\n return installResult;\n}", "title": "" }, { "docid": "6a8aabf874769b2a7dc645f7b7ec0f54", "score": "0.45600376", "text": "async function copyTemplateFiles(options) {\n return copy(options.templateDirectory, options.targetDirectory, {\n clobber: false,\n });\n}", "title": "" }, { "docid": "6f5edea76e467100026a9b731799d602", "score": "0.454749", "text": "install(options) {}", "title": "" }, { "docid": "028d00d3f3e885fcb7849d612ed00873", "score": "0.4542563", "text": "async function doJob(options) {\n const conv_param = convertArgsToOptions(options);\n const mbds = [];\n // Converts images\n for (const file of options.files) {\n mbds.push(await convert(await fs.readFile(file), conv_param));\n }\n // Wipes old datas on MBrush\n let res = await node_fetch_1.default(`http://${options.ipaddr}/cgi-bin/cmd?cmd=rm_upload`, {\n method: \"GET\",\n timeout: 3000,\n });\n let ret = await res.json();\n options.verbose(ret);\n if (!ret || ret.status !== 'ok')\n throw new Error('Failed to prepare upload; Printer respond not ok');\n // Sends new data\n for (let i = 0; i < mbds.length; i++) {\n const form = new FormData();\n form.append('file', mbds[i], { filename: i + '.mbd', contentType: 'application/octet-stream' });\n res = await node_fetch_1.default(`http://${options.ipaddr}/cgi-bin/upload`, {\n method: \"POST\",\n body: form,\n timeout: 3000,\n });\n ret = await res.json();\n options.verbose(ret);\n if (!ret || ret.status !== 'ok')\n throw new Error('Failed to upload; Printer respond not ok');\n }\n}", "title": "" }, { "docid": "fb6f3aea44d49b6a6b4e24c06c52b573", "score": "0.4536083", "text": "function instrumentDir(options) {\n if (!options.outputDir) {\n options.outputDir = temp.mkdirSync();\n }\n if (options.instHandler) {\n setupConfig(options.instHandler);\n }\n var deferred = Q.defer();\n instDir.instrument(options, function (err) {\n clearConfig();\n if (err) {\n deferred.reject(err);\n } else {\n deferred.resolve({ outputDir: options.outputDir});\n }\n });\n return deferred.promise;\n}", "title": "" }, { "docid": "9e1670998f9c838fcc5ef6df2c22b54c", "score": "0.45309857", "text": "getOutputPkgFilePath(options) {\n options = this.getOptions(options);\n let pkgFileName = options.outFile;\n if (pkgFileName.toLowerCase().endsWith('.zip')) {\n pkgFileName = pkgFileName.replace('.zip', '.pkg');\n }\n else {\n pkgFileName += '.pkg';\n }\n let outFolderPath = path.resolve(options.outDir);\n let outPkgFilePath = path.join(outFolderPath, pkgFileName);\n return outPkgFilePath;\n }", "title": "" }, { "docid": "d9a4d880d41633a8ca2b52808ad3af0d", "score": "0.45167962", "text": "async function compileWithCtx(options) {\n const ctx = await compileWithLog(options)\n\n const { exec, absoluteBaseDir, filter, watch } = ctx.options\n\n restart(exec)\n\n if (!watch) {\n return\n }\n\n const statusBuffer = createFileStatusBuffer()\n\n fileUpdateStream(filter, absoluteBaseDir, (event, filePath) => {\n // mutate statusBuffer\n updateBuffer(statusBuffer, event, filePath)\n\n tryToConsume(statusBuffer, () => consume(ctx, statusBuffer, () => {\n restart(exec)\n }))\n })\n}", "title": "" }, { "docid": "6921da755b28fd07b7d36522703e43e4", "score": "0.45132715", "text": "async writeRcFile(outDir) {\n await fs_extra_1.outputJSON(path_1.join(outDir, paths_1.RCFILE_NAME), Object.assign({}, this.rcFile.getDiskContents(), {\n typescript: false,\n lastCompiledAt: new Date().toISOString(),\n }), { spaces: 2 });\n }", "title": "" }, { "docid": "18e17b4a843585376aadfdf275f0acbd", "score": "0.45118588", "text": "writeToGeneratedFilename(relPath, writeOptions) {\n const generated = this.generateFilename(relPath);\n this.write(generated, writeOptions);\n return generated;\n }", "title": "" }, { "docid": "a40e3d2b690ebfd5cd3fb52b2db38b43", "score": "0.45095536", "text": "outputOptions(options) { }", "title": "" }, { "docid": "a15240145b8598d1cc4dcf81348d7864", "score": "0.45047253", "text": "writing() {\n this.log(\"Copying over files...\");\n \n return new Promise( (resolve, reject) => {\n // Copy over the template files.\n ncp(this.sourceRoot(), this.destinationRoot(), (err) => {\n let mainFile = fs.readFileSync(path.join(this.destinationRoot(), 'src/main.js'), 'utf8');\n\n // Apply vuex templating.\n if (this.extras.includes(CHOICE_VUEX)) {\n \n let importVuex = `import Vuex from 'vuex'`,\n createStore = `const store = new Vuex.Store({})`,\n useVuex = `Vue.use(Vuex)`,\n configStore = `store`;\n\n mainFile = mainFile.replace('{{import_vuex}}', importVuex);\n mainFile = mainFile.replace('{{create_store}}', createStore);\n mainFile = mainFile.replace('{{vue_use_vuex}}', useVuex);\n mainFile = mainFile.replace('{{vue_config_store}}', configStore);\n\n } else {\n mainFile = mainFile.replace('{{import_vuex}}', '');\n mainFile = mainFile.replace('{{create_store}}', '');\n mainFile = mainFile.replace('{{vue_use_vuex}}', '');\n mainFile = mainFile.replace('{{vue_config_store}}', '');\n }\n\n // Apply themeing templating.\n if (this.extras.includes(CHOICE_THEME)) {\n let importVuetify = `import Vuetify from 'vuetify'`,\n importThemeingPlugin = `import { ThemePlugin } from 'jscatalyst'`,\n useVuetify = `Vue.use(Vuetify)`,\n useThemeingPlugin = `Vue.use(ThemePlugin, {store, custom: true})`;\n\n mainFile = mainFile.replace('{{import_vuetify}}', importVuetify);\n mainFile = mainFile.replace('{{import_themeing_plugin}}', importThemeingPlugin);\n mainFile = mainFile.replace('{{vue_use_vuetify}}', useVuetify);\n mainFile = mainFile.replace('{{vue_use_themeing_plugin}}', useThemeingPlugin);\n } else {\n mainFile = mainFile.replace('{{import_vuetify}}', '');\n mainFile = mainFile.replace('{{import_themeing_plugin}}', '');\n mainFile = mainFile.replace('{{vue_use_vuetify}}', '');\n mainFile = mainFile.replace('{{vue_use_themeing_plugin}}', '');\n }\n\n fs.writeFileSync(path.join(this.destinationRoot(), 'src/main.js'), mainFile);\n \n this.log(\"Done copying files!\");\n resolve();\n })\n });\n }", "title": "" }, { "docid": "3b8363ec4b724caee1988951fd88080a", "score": "0.45028776", "text": "async function updateBuildAndDebugFiles(firmwareName, targetName, workspacePath, armPath) {\n // first get the launch and task json files\n // console.log('updating build and debug files with', firmwareName, targetName);\n const vscodeDirErr = await dirGuard(`${workspacePath}/.vscode`);\n if (vscodeDirErr) {\n vscode.window.showWarningMessage('Something went wrong with creating the .vscode directory');\n return new Promise((resolve, reject) => {\n reject(vscodeDirErr);\n });\n }\n // now get or directly write to the launch.json files and the task.json files\n const launchProm = getTextFile(`${workspacePath}/.vscode/launch.json`).then((launchString) => {\n const launchFile = parseConfigFile(launchString);\n const launchConfig = getConfigFiles('debug', firmwareName, targetName, workspacePath);\n\n // now should check for the entry and if not present update the launch file\n _.set(launchFile, 'configurations', _.get(launchFile, 'configurations', [])); // to make sure that is an array\n const hasConfig = checkForConfig(launchFile.configurations, launchConfig, 'name');\n if (hasConfig) {\n return new Promise((resolve, reject) => {\n resolve();\n });\n }\n // else the launch file config should be added and written\n launchFile.configurations.push(launchConfig);\n return new Promise((resolve, reject) => {\n fs.writeFile(`${workspacePath}/.vscode/launch.json`, JSON.stringify(launchFile, null, 2), (err) => {\n if (err) {\n reject(err);\n return;\n }\n resolve();\n });\n });\n });\n\n const tasksProm = getTextFile(`${workspacePath}/.vscode/tasks.json`).then((tasksString) => {\n const buildTask = getConfigFiles('build', firmwareName, targetName, workspacePath, armPath);\n const uploadTask = getConfigFiles('upload', firmwareName, targetName, workspacePath);\n\n const taskFile = parseConfigFile(tasksString);\n _.set(taskFile, 'tasks', _.get(taskFile, 'tasks', []));\n const hasBuildTask = checkForConfig(taskFile.tasks, buildTask, 'label');\n const hasLoadTask = checkForConfig(taskFile.tasks, uploadTask, 'label');\n if (hasBuildTask && hasLoadTask) {\n return new Promise((resolve, reject) => {\n resolve();\n });\n }\n if (!hasBuildTask) {\n taskFile.tasks.push(buildTask);\n }\n if (!hasLoadTask) {\n taskFile.tasks.push(uploadTask);\n }\n return new Promise((resolve, reject) => {\n fs.writeFile(`${workspacePath}/.vscode/tasks.json`, JSON.stringify(taskFile, null, 2), (err) => {\n if (err) {\n reject(err);\n return;\n }\n resolve();\n });\n });\n });\n\n return new Promise((resolve, reject) => {\n Promise.all([launchProm, tasksProm]).then((values) => {\n resolve(values);\n }).catch((err) => {\n reject(err);\n });\n });\n}", "title": "" }, { "docid": "cfd1344122ba5440ee42b6886c8749d9", "score": "0.44978616", "text": "toString(options) {\n return this.options.writer.declaration(this, this.options.writer.filterOptions(options));\n }", "title": "" }, { "docid": "f9b940b0f251a65b882ceb280fb8fc30", "score": "0.44965285", "text": "async function runTests(options) {\n var _a;\n const config = {\n extensionDevelopmentPath: options.extensionDevelopmentPath,\n extensionTestsPath: options.extensionTestsPath,\n build: await getBuild(options.version),\n folderUri: options.folderUri\n };\n const port = 3000;\n const server = await main_1.runServer(port, config);\n const endpoint = `http://localhost:${port}`;\n const result = await openInBrowser({\n browserType: options.browserType,\n endpoint,\n headless: (_a = options.headless) !== null && _a !== void 0 ? _a : true,\n devTools: options.devTools,\n waitForDebugger: options.waitForDebugger,\n });\n server.close();\n if (result) {\n return;\n }\n throw new Error('Test failed');\n}", "title": "" }, { "docid": "579a42096451cfae0e0c1ae1bc5c0412", "score": "0.44882086", "text": "function writeSpec(ctx, cb){\n \n var specOpts = ctx.spec;\n var args = {\n summary: specOpts.summary,\n name: specOpts.name,\n buildArch: ctx.buildArch,\n installScript: ctx.installScript.join('\\n'),\n version: specOpts.version,\n release: specOpts.release,\n description: specOpts.description,\n files: specOpts.files.join('\\n'),\n url: specOpts.url,\n license: specOpts.license,\n group: specOpts.group,\n rpmRootDir: ctx.rpmRootDir,\n sources: specOpts.sources.map(function(item, idx){ return 'SOURCE' + idx + ': ' + item; }).join('\\n'),\n requires: specOpts.requires.map(function(item, idx){ return 'Requires: ' + item; }).join('\\n')\n };\n var spec = strings.format(SPEC_TEMPLATE, args);\n\n var specFileName = path.join(ctx.rpmRootDir, 'SPECS', ctx.fullname + '.spec');\n mod.emit('message', 'writeSpec', specFileName);\n\n fs.writeFile(specFileName, spec, { encoding: 'utf8' }, function(err){\n if (err) return cb(err);\n ctx.specFileName = specFileName;\n cb(null, ctx);\n });\n}", "title": "" }, { "docid": "c3b988dbcd3d54536d5de1b822342482", "score": "0.4482631", "text": "exec(options) {\n var defer = Q.defer();\n this._debug('exec tool: ' + this.toolPath);\n this._debug('Arguments:');\n this.args.forEach((arg) => {\n this._debug(' ' + arg);\n });\n var success = true;\n options = options || {};\n var ops = {\n cwd: options.cwd || process.cwd(),\n env: options.env || process.env,\n silent: options.silent || false,\n outStream: options.outStream || process.stdout,\n errStream: options.errStream || process.stderr,\n failOnStdErr: options.failOnStdErr || false,\n ignoreReturnCode: options.ignoreReturnCode || false\n };\n var argString = this.args.join(' ') || '';\n var cmdString = this.toolPath;\n if (argString) {\n cmdString += (' ' + argString);\n }\n // Using split/join to replace the temp path\n cmdString = this.ignoreTempPath(cmdString);\n if (!ops.silent) {\n if (this.pipeOutputToTool) {\n var pipeToolArgString = this.pipeOutputToTool.args.join(' ') || '';\n var pipeToolCmdString = this.ignoreTempPath(this.pipeOutputToTool.toolPath);\n if (pipeToolArgString) {\n pipeToolCmdString += (' ' + pipeToolArgString);\n }\n cmdString += ' | ' + pipeToolCmdString;\n }\n ops.outStream.write('[command]' + cmdString + os.EOL);\n }\n // TODO: filter process.env\n var res = mock.getResponse('exec', cmdString);\n //console.log(JSON.stringify(res, null, 2));\n if (res.stdout) {\n this.emit('stdout', res.stdout);\n if (!ops.silent) {\n ops.outStream.write(res.stdout + os.EOL);\n }\n }\n if (res.stderr) {\n this.emit('stderr', res.stderr);\n success = !ops.failOnStdErr;\n if (!ops.silent) {\n var s = ops.failOnStdErr ? ops.errStream : ops.outStream;\n s.write(res.stderr + os.EOL);\n }\n }\n var code = res.code;\n ops.outStream.write('rc:' + res.code + os.EOL);\n if (code != 0 && !ops.ignoreReturnCode) {\n success = false;\n }\n ops.outStream.write('success:' + success + os.EOL);\n if (success) {\n defer.resolve(code);\n }\n else {\n defer.reject(new Error(this.toolPath + ' failed with return code: ' + code));\n }\n return defer.promise;\n }", "title": "" }, { "docid": "99fd84bdeaa877f525e23b4cfd502c21", "score": "0.446004", "text": "function generateRJava(execSync, options) {\r\n const AAPT_LIBS = PLATFORM_LIB\r\n\r\n const aapt_options = AAPT_GEN_R_OPTIONS\r\n .replace('$AAPT_LIBS', AAPT_LIBS)\r\n .replace(/\\$PROJ/g, '.')\r\n .replace('$PLATFORM_LIB', PLATFORM_LIB)\r\n .replace(/\\$TARGET_SDK_VERSION/g, options.sdktarget)\r\n\r\n const cmd = AAPT_PRG + aapt_options\r\n\r\n return showRun(execSync, cmd)\r\n}", "title": "" }, { "docid": "f80d7a4f15852664546b6b5e59d8efca", "score": "0.445582", "text": "constructor(options) {\n const opts = options || {};\n this.options = {\n existsSync: opts.existsSync || fs__WEBPACK_IMPORTED_MODULE_0__[\"existsSync\"].bind(fs__WEBPACK_IMPORTED_MODULE_0__),\n pnpFileName: opts.pnpFileName || '.pnp.js'\n };\n this.checkTree = new Map();\n }", "title": "" }, { "docid": "1a46b2c2e7eed638c33b23f27acd73af", "score": "0.44510195", "text": "writing() {\n const sLibName = this.answers.libraryName;\n const sLibNameOnly = sLibName.split(\".\")[sLibName.split(\".\").length - 1];\n const sControlName = this.answers.controlName;\n const sDir = sLibName.split(\".\").join(\"/\");\n const oProps = {\n libraryName: sLibName,\n controlName: sControlName,\n baseDir: sDir,\n srcCodeDir: `src/${sDir}`,\n libraryNameOnly: sLibNameOnly,\n gitRepository: \"\" // TODO: Obtain from user\n };\n\n this.log(\"\\n\\n Buzzing the engines\");\n\n // create library\n this._createTemplateLibrary(oProps);\n\n // create development setup\n this._createDevelopmentSetup(oProps);\n\n // copy sandbox html\n this.fs.copyTpl(\n this.templatePath(\"demo.html\"),\n this.destinationPath(`test/demo.html`),\n oProps\n );\n }", "title": "" }, { "docid": "23bb314edd777f4429bc2f744c4145fa", "score": "0.4433655", "text": "async function cloneTemplateFiles(options) {\n if (options.projectPath == 'create') { shell.mkdir(options.targetDirectory); }\n await shell.cd(options.targetDirectory)\n let { code } = await shell.exec(`git clone ${FRAMEWORKS[(options.framework).toUpperCase()].GIT_REPO} ${options.targetDirectory}`)\n if (code !== 0) {\n console.error(`%s ${MESSAGES.ERROR_MESSAGES.GIT_CLONE_FAIL}`, chalk.red.bold('ERROR'));\n process.exit(1);\n }\n return await shell.exec(`rm -rf ${path.join(options.targetDirectory, '.git')} `);\n}", "title": "" }, { "docid": "f65de2ad632b8362043fc921b8489065", "score": "0.44257763", "text": "async compileCode({ target, followSymlinks, saveTo, params: { deviceType, files } }){\n\t\ttry {\n\t\t\tif (files.length === 0) {\n\t\t\t\tfiles.push('.'); // default to current directory\n\t\t\t}\n\n\t\t\tlet platformId;\n\t\t\tif (deviceType in PLATFORMS) {\n\t\t\t\tplatformId = PLATFORMS[deviceType];\n\t\t\t} else {\n\t\t\t\tthrow new Error([\n\t\t\t\t\t`Target device ${deviceType} is not valid`,\n\t\t\t\t\t'\teg. particle compile boron xxx',\n\t\t\t\t\t'\teg. particle compile p2 xxx'\n\t\t\t\t].join('\\n'));\n\t\t\t}\n\n\t\t\tthis.ui.stdout.write(`Compiling code for ${deviceType}${os.EOL}`);\n\n\t\t\tconst { filename, isBundle } = await this.compileCodeImpl({ target, followSymlinks, saveTo, deviceType, platformId, files });\n\n\t\t\tthis.ui.stdout.write(`Saved ${isBundle ? 'bundle' : 'firmware' } to: ${filename}${os.EOL}`);\n\t\t} catch (error) {\n\t\t\tconst message = 'Compile failed';\n\t\t\tthrow createAPIErrorResult({ error, message });\n\t\t}\n\t}", "title": "" }, { "docid": "0c630941d2e2bc6b79d2448a7c8440ad", "score": "0.4423589", "text": "function exportOutputFiles() {\n if (option_materialize === false) {\n writeDataInLocalFile(\"sdo_classes.json\", stringifyJSON(outputData_classes));\n writeDataInLocalFile(\"sdo_properties.json\", stringifyJSON(outputData_properties));\n writeDataInLocalFile(\"sdo_dataTypes.json\", stringifyJSON(outputData_dataTypes));\n writeDataInLocalFile(\"sdo_enumerations.json\", stringifyJSON(outputData_enumerations));\n writeDataInLocalFile(\"sdo_enumerationMembers.json\", stringifyJSON(outputData_enumerationMembers));\n } else {\n writeDataInLocalFile(\"sdo_classesMaterialized.json\", stringifyJSON(outputData_classesMaterialized));\n }\n}", "title": "" }, { "docid": "1d85a5dfb971dc588135ec12f29b3e65", "score": "0.44120413", "text": "function tryWriteFile(){\n return writeFile(buildingOutPath, buildingBuffers[id]).fail(function(err){\n if(String(err).indexOf('EMFILE') !== -1){\n console.error('tryWriteFile EMFILE', selectionName, x, y, tile3dsPath, err)\n var def = Q.defer();\n \n // retry later\n setTimeout(function(){\n def.resolve(tryWriteFile());\n }, 100);\n\n return def.promise;\n }\n else{// forward error\n throw err;\n }\n })\n }", "title": "" }, { "docid": "9ed15c8c19fc9a61550803d6d0144dac", "score": "0.44086996", "text": "function generateFromOpts(opt) {\n var code = \"\";\n\n if (opt.moduleType === 'commonjs') {\n code = generateCommonJSModule(opt);\n } else if (opt.moduleType === 'amd') {\n code = generateAMDModule(opt);\n } else {\n code = generateModule(opt);\n }\n\n return code;\n}", "title": "" }, { "docid": "b4f57a0865fcaeaa74ca9b0b121268f7", "score": "0.4407504", "text": "async function runUpgrades(options, timeout) {\n var _a;\n const [selectedPackageInfos, workspacePackages] = await (0, getAllPackages_1.default)(options);\n const packageFilepaths = selectedPackageInfos.map((packageInfo) => packageInfo.filepath);\n // enable deep mode if --deep, --workspace, --workspaces, or if multiple package files are found\n const isWorkspace = options.workspaces || !!((_a = options.workspace) === null || _a === void 0 ? void 0 : _a.length);\n options.deep = options.deep || isWorkspace || selectedPackageInfos.length > 1;\n let analysis;\n if (options.global) {\n const analysis = await (0, runGlobal_1.default)(options);\n clearTimeout(timeout);\n return analysis;\n }\n else if (options.deep) {\n analysis = await selectedPackageInfos.reduce(async (previousPromise, packageInfo) => {\n const packages = await previousPromise;\n // copy object to prevent share .ncurc options between different packageFile, to prevent unpredictable behavior\n const rcResult = await (0, getNcuRc_1.default)({ packageFile: packageInfo.filepath, color: options.color });\n let rcConfig = rcResult && rcResult.config ? rcResult.config : {};\n if (options.mergeConfig && Object.keys(rcConfig).length) {\n // Merge config options.\n rcConfig = (0, mergeOptions_1.default)(options, rcConfig);\n }\n const pkgOptions = {\n ...options,\n ...rcConfig,\n packageFile: packageInfo.filepath,\n workspacePackages,\n };\n const { pkgData, pkgFile } = await (0, findPackage_1.default)(pkgOptions);\n return {\n ...packages,\n // index by relative path if cwd was specified\n [pkgOptions.cwd\n ? path_1.default\n .relative(path_1.default.resolve(pkgOptions.cwd), pkgFile)\n // convert Windows path to *nix path for consistency\n .replace(/\\\\/g, '/')\n : pkgFile]: await (0, runLocal_1.default)(pkgOptions, pkgData, pkgFile),\n };\n }, Promise.resolve({}));\n if (options.json) {\n (0, logging_1.printJson)(options, analysis);\n }\n }\n else {\n // mutate packageFile when glob pattern finds only single package\n if (selectedPackageInfos.length === 1 &&\n selectedPackageInfos[0].filepath !== (options.packageFile || 'package.json')) {\n options.packageFile = selectedPackageInfos[0].filepath;\n }\n const { pkgData, pkgFile } = await (0, findPackage_1.default)(options);\n analysis = await (0, runLocal_1.default)(options, pkgData, pkgFile);\n }\n clearTimeout(timeout);\n // suggest install command or auto-install\n if (options.upgrade) {\n // deno does not have an install command\n // The closest equivalent is deno cache, but it is optional.\n // See: https://deno.land/[email protected]/references/cheatsheet#nodejs---deno-cheatsheet\n if (options.packageManager === 'deno') {\n (0, logging_1.print)(options, '');\n }\n else {\n // if workspaces, install from root project folder\n await npmInstall(isWorkspace ? ['package.json'] : packageFilepaths, analysis, options);\n }\n }\n return analysis;\n}", "title": "" }, { "docid": "a1141afc829411f9a0c4225373850100", "score": "0.44071466", "text": "writing() {\n // This will not match in callback of\n // getBuild so store it here.\n var _this = this;\n var done = this.async();\n app.getBuild(this, function (e, result) {\n var build = _this.templatePath(result);\n\n if (_this.type === `custom`) {\n build = path.join(_this.customFolder, result);\n }\n \n var args = {\n pat: _this.pat,\n tfs: _this.tfs,\n buildJson: build,\n queue: _this.queue,\n target: _this.target,\n appName: _this.applicationName,\n project: _this.applicationName,\n };\n\n if (util.isDocker(_this.target)) {\n args.dockerHost = _this.dockerHost;\n args.dockerRegistry = _this.dockerRegistry;\n args.dockerRegistryId = _this.dockerRegistryId;\n }\n else if (util.isKubernetes(_this.target)) {\n args.kubeEndpoint = _this.kubeEndpoint;\n args.serviceEndpoint = _this.serviceEndpoint;\n args.azureRegistryName = _this.azureRegistryName;\n args.azureRegistryResourceGroup = _this.azureRegistryResourceGroup;\n args.azureSubId = _this.azureSubId;\n args.kubeName = _this.kubeName;\n args.kubeResourceGroup = _this.kubeResourceGroup;\n }\n\n app.run(args, _this, done);\n });\n }", "title": "" }, { "docid": "73e01e13eb5742d38b08707894a7d092", "score": "0.43980986", "text": "writing() {\n if (this.apptype === 'starter-app') {\n for (let x = 0; x < this.dbFolders.length; x++) {\n if (this.dbFolders[x] === this.defaultDb) {\n this.fs.copy( // if default, copy the database folder\n this.templatePath(this.dbFolders[x]),\n this.destinationPath(`server/${this.dbFolders[x]}`)\n );\n } else {\n this.fs.copy( //copy the database specific index file\n this.templatePath(`${this.dbFolders[x]}/index.ts`),\n this.destinationPath(`server/${this.dbFolders[x]}/index.ts`)\n );\n this.fs.copy( // copy the empty seed file template\n this.templatePath('seed.ts'),\n this.destinationPath(`server/${this.dbFolders[x]}/seed.ts`)\n );\n }\n }\n\n // Write the generic config templates\n this.fs.copyTpl(\n this.templatePath('common_config'),\n this.destinationPath('config'),\n this.dbs\n );\n\n // Write the generic server templates\n this.fs.copyTpl(\n this.templatePath('server_files'),\n this.destinationPath('server'),\n this.dbs\n );\n }\n\n if (this.serverrender === true) {\n // Write the necessary universal server files\n this.fs.copyTpl(\n this.templatePath('server_render_files/server'),\n this.destinationPath('server'),\n this.dbs\n );\n // Write the necessary universal client files\n this.fs.copyTpl(\n this.templatePath('server_render_files/client'),\n this.destinationPath('client/modules'),\n this.dbs\n );\n }\n \n // Write the application template\n this.fs.copyTpl(\n glob.sync(`${this.templatePath()}/${this.apptype}/**/**/**/*.!(svg|jpg|png|woff|woff2)`),\n this.destinationPath(),\n this.config.getAll()\n );\n\n // Copy over the application assets\n this.fs.copy(\n glob.sync(`${this.templatePath()}/${this.apptype}/public/*`),\n this.destinationPath('public')\n );\n }", "title": "" }, { "docid": "82ec5f35749fb78ea8aeca29099c247b", "score": "0.43901628", "text": "async write() {\n await fsExtra.writeFile(this.destPath, this.bscFile.fileContents);\n }", "title": "" }, { "docid": "37236bf114eaead83f208782b75b4b83", "score": "0.43829083", "text": "function prepareOutput (cb) {\n const path = self.getOption('output')\n try {\n fs.accessSync(path)\n fs.open(path, 'a', cb)\n } catch (err) {\n fs.open(path, 'a', function (err, fd) {\n if (err) {\n cb(err)\n return\n }\n\n fs.writeSync(fd, ['timestamp', 'status', 'connect', 'processing', 'waiting', 'total', 'response', 'completed/failed', 'test'].join(',') + '\\n')\n cb(null, fd)\n })\n }\n }", "title": "" }, { "docid": "c7d0f660a624ef6c59ea4c831681d61c", "score": "0.43823734", "text": "async function solutionOnly(opts) {\n const code = `${opts.setup ? opts.setup + ';\\n' : ''}${opts.solution}`;\n return execNode(opts, code);\n}", "title": "" }, { "docid": "f50cc2541e6115310fa9c0cd3b741ebf", "score": "0.43562853", "text": "async function setUpOptions () {\n program\n .description('Upload assets from a local checkout to the github-images bucket in Amazon S3.')\n .option('-c, --core', 'upload assets for core docs at help.github.com')\n .option('-d, --developer <path to dev checkout>', 'upload assets for dev docs at developer.github.com')\n .option('-s, --single <image path> <GHE version>', 'upload a single local asset file to an existing Enterprise bucket in S3')\n .option('-b, --batch <GHE version>', 'upload all local assets to a new Enterprise bucket in S3')\n\n program.on('--help', () => {\n console.log('')\n console.log('Examples:')\n console.log(' $ script/upload-enterprise-images-to-s3.js --core --single assets/images/foo/bar.png 2.15')\n console.log(' $ script/upload-enterprise-images-to-s3.js --developer ~/checkouts/dev-docs --batch 2.17')\n })\n\n program.parse(process.argv)\n\n return program\n}", "title": "" }, { "docid": "36fbb75d77b6f8e2c9e21c01a7d44b3f", "score": "0.4334986", "text": "function _build( srcArray, destFile, options ) {\n\n try {\n grunt.log.writeln( 'Launching HackMyResume...' );\n\n // Going through the low-level HMR interface. Set up a verb\n var v = new HMR.verbs.build();\n\n // Add error / output handlers so HMR colored output displays in Grunt.\n v.on('hmr:error', function(ex) {\n HMRERR.err.apply(HMRERR, arguments);\n grunt.warn('An error occurred during HackMyResume resume generation.');\n });\n v.on('hmr:status', function() {\n _out.do.apply(_out, arguments);\n });\n options.errHandler = v;\n\n // Invoke the verb and kick off resume generation\n v.invoke.call( v, srcArray, [destFile], options, function() { } );\n if( v.errorCode ) {\n grunt.warn('HackMyResume exited with error ' + v.errorCode + '.');\n }\n\n // TODO: Use grunt.file.write|read against the string version of the\n // HackMyResume API.\n }\n catch( ex ) {\n\n var msg = ex.toString();\n if( ex.stack )\n msg += ex.stack;\n grunt.warn( msg );\n\n return;\n }\n\n // Print a success message.\n grunt.log.writeln('Resume(s) successfully generated to \"' + destFile + '\".');\n }", "title": "" }, { "docid": "1b1c98ebd1842038a09ba372083a21f3", "score": "0.43261296", "text": "function config(options) {\n var src = options.src,\n allowTypeScript = options.allowTypeScript || false,\n allowScss = options.allowScss || false,\n assetsToCopy = [],\n assetsToCopyIfExternal = options.assetsToCopyIfExternal,\n assetsToCopyIfSibling = options.assetsToCopyIfSibling,\n cssFallbackLoader = options.cssFallbackLoader || \"style-loader\",\n dirs = options.dirs,\n devtool = options.devtool || \"inline-source-map\",\n entryFiles = options.entryFiles,\n extensions = options.extensions || [\n \".js\", \".ts\", \".jsx\", \".es\", // typical JS extensions\n \".jsm\", \".esm\", // jsm is node's ES6 module ext\n \".json\", // some modules require json without an extension\n \".css\", \".scss\", // CSS & SASS extensions\n \"*\"\n ], // allow extensions on imports\n indexes = options.indexes,\n mode = options.mode || process.env.NODE_ENV || \"development\",\n operatingMode = \"external\",\n outputFile = options.outputFile,\n outputPaths = options.outputPaths,\n sourcePaths = options.sourcePaths,\n transpiler = options.transpiler || (allowTypeScript ? \"ts-loader\" : \"babel-loader\"),\n vendor = options.vendor;\n\n /*\n * determine operating mode (external vs sibling)\n *****************************************************************************/\n if (!src) {\n src = path.resolve(__dirname, dirs.external);\n assetsToCopy = assetsToCopyIfExternal;\n operatingMode = \"external\";\n }\n if (!fs.existsSync(src)) {\n src = path.resolve(__dirname, dirs.www);\n assetsToCopy = assetsToCopyIfSibling;\n operatingMode = \"sibling\"\n }\n\n /*\n * it is assumed that you will be using \"es/*.js\" for ES2015+, \"ts/*.ts\" for\n * TypeScript, and \"scss/*.scss\" for SASS. You can change these as needed.\n ******************************************************************************/\n sourcePaths = Object.assign({}, {\n src: src,\n es: dirs.es,\n ts: dirs.ts,\n css: dirs.css,\n scss: dirs.scss\n }, sourcePaths ? sourcePaths : {});\n\n /*\n * It is assumed that your output is going to \"www\", and that the JavaScript\n * (or TypeScript) should be stored in \"www/js\", and that any generated CSS\n * should be stored in \"www/css\".\n ******************************************************************************/\n outputPaths = Object.assign({}, {\n www: dirs.www,\n js: dirs.js,\n css: dirs.css\n }, outputPaths ? outputPaths : {});\n\n /*\n * Feel free to change the following if these assumptions are incorrect:\n * - If you are using SASS, the entry file will be named \"styles.scss\" and\n * will be copied to bundle.css\n * - If you are using ES2015+, the entry file will be named \"index.js\" and\n * will be copied to bundle.js\n * - If you are using TypeScript, the entry file will be named \"index.ts\"\n * and will be copied to bundle.js\n ******************************************************************************/\n indexes = Object.assign({}, {\n css: { from: path.join(sourcePaths.css, \"styles.css\"), to: path.join(outputPaths.css, \"bundle.css\") },\n scss: { from: path.join(sourcePaths.scss, \"styles.scss\"), to: path.join(outputPaths.css, \"bundle.css\") },\n es: { from: path.join(sourcePaths.es, \"index.js\"), to: path.join(outputPaths.js, \"bundle.js\") },\n ts: { from: path.join(sourcePaths.ts, \"index.ts\"), to: path.join(outputPaths.js, \"bundle.js\") },\n vendor: { js: path.join(outputPaths.js, \"vendor.js\"), css: path.join(outputPaths.css, \"vendor.css\") }\n }, indexes ? indexes : {});\n\n // if allowTypeScript is true AND the typescript path in sourcePaths exists,\n // we'll assume we're using typescript\n var usingTypeScript = allowTypeScript && fs.existsSync(path.resolve(sourcePaths.src, sourcePaths.ts));\n\n // set up our entry files\n var jsEntryFile = usingTypeScript ? indexes.ts.from : indexes.es.from,\n cssEntryFile = allowScss ? indexes.scss.from : indexes.css.from;\n\n // define our extract plugins for CSS; if allowScss is true, we assume using scss/styles.scss\n var extractCss = new ExtractTextPlugin(allowScss ? indexes.scss.to : indexes.css.to),\n extractVendorCss = new ExtractTextPlugin(indexes.vendor.css);\n\n // If no output file specified, default to indexes.(es|ts).to\n if (!outputFile) {\n outputFile = usingTypeScript ? indexes.ts.to : indexes.es.to;\n }\n\n // if no entry files passed in, we need to come up with suitable defaults\n if (!entryFiles) {\n // include the javascript file\n entryFiles = { app: [\"./\" + jsEntryFile] };\n\n // and the (s)css file, if present\n if (fs.existsSync(path.resolve(sourcePaths.src, cssEntryFile))) {\n entryFiles.app.push(\"./\" + cssEntryFile);\n }\n }\n\n // if vendors have been provided, add them to entryFiles\n if (vendor.length > 0) {\n entryFiles.vendor = vendor;\n }\n\n return {\n context: sourcePaths.src,\n entry: entryFiles,\n devtool: devtool,\n output: {\n filename: outputFile,\n path: outputPaths.www,\n },\n resolve: {\n extensions: extensions,\n modules: [\n path.resolve(sourcePaths.src, dirs.es, \"lib\"),\n path.resolve(sourcePaths.src, dirs.es, \"vendor\"),\n path.resolve(sourcePaths.src, dirs.ts, \"lib\"),\n path.resolve(sourcePaths.src, dirs.ts, \"vendor\"),\n path.resolve(sourcePaths.src, \"lib\"),\n path.resolve(sourcePaths.src, \"vendor\"),\n \"node_modules\"\n ],\n alias: Object.assign({}, (function getAliases() {\n var k, v, obj = {}, p;\n for (k in dirs.aliases) {\n if (Object.prototype.hasOwnProperty.call(dirs.aliases, k)) {\n v = dirs.aliases[k];\n p = v;\n if (v.substr(0,4) === \"$JS/\") {\n p = path.join(usingTypeScript ? dirs.ts : dirs.es, v.substr(4));\n }\n obj[\"$\" + k.toUpperCase()] = p;\n obj[k] = p;\n }\n }\n return obj;\n }()))\n },\n module: {\n rules: [\n // HTML & TEXT files should just be loaded as raw (included in bundle)\n { test: /\\.(html|txt)$/, use: \"raw-loader\" },\n // Images and web fonts should be copied & file path returned\n // note: copying only occurs when in external mode\n {\n test: /\\.(png|jpe?g|svg|gif|eot|ttf|woff|woff2)$/,\n use: [\"file-loader?name=[path][name].[ext]&emitFile=\" +\n (operatingMode === \"external\" ? \"true\" : \"false\")]\n },\n // JSON/JSON5 should use the JSON5 loader and be included in bundle\n { test: /\\.(json|json5)$/, use: \"json5-loader\" },\n // Extract our app's CSS into the bundle\n {\n test: extractCss ? /\\.s?css$/ : /\\.css$/,\n exclude: /node_modules\\/.*\\.css$/,\n use: extractCss.extract({\n fallback: cssFallbackLoader,\n publicPath: \"../\",\n use: ((function () {\n var arr = [\n { loader: \"css-loader?sourceMap=true\" },\n { loader: \"resolve-url-loader?sourceMap=true\" },\n ];\n if (cssEntryFile === indexes.scss.from && allowScss) {\n arr.push({ loader: \"sass-loader?sourceMap=true\" });\n }\n return arr;\n })())\n })\n },\n // css files in node_modules are put into a vendor bundle\n {\n test: /node_modules\\/.*\\.css$/,\n use: extractVendorCss.extract({\n fallback: cssFallbackLoader,\n publicPath: \"../\",\n use: [\n { loader: \"css-loader?sourceMap=true\" },\n { loader: \"resolve-url-loader?sourceMap=true\" },\n ]\n })\n },\n // JavaScript / TypeScript code\n {\n test: allowTypeScript ? /\\.(js|jsx|ts|tsx)$/ : /\\.(js|jsx)$/,\n use: [transpiler + (allowTypeScript ? (usingTypeScript ? \"\" : \"?entryFileIsJs\") : \"\")],\n exclude: /node_modules/\n },\n ]\n },\n plugins: (function () {\n var plugins = [\n new CopyWebpackPlugin(assetsToCopy),\n extractCss\n ];\n\n // only generate index.html with dependencies IF we're in external mode --\n // otherwise we'd overwrite our user's own index.html in www\n if (operatingMode === \"external\") {\n plugins.push(new HtmlWebpackPlugin({\n filename: \"index.html\",\n template: \"index.html\",\n inject: true,\n chunksSortMode: \"dependency\"\n }));\n }\n\n // only create the JS vendor chunk if we've been given vendors\n if (vendor.length > 0) {\n plugins.push(new webpack.optimize.CommonsChunkPlugin({\n name: \"vendor\",\n filename: indexes.vendor.js\n }));\n }\n\n return plugins;\n }())\n };\n}", "title": "" }, { "docid": "2ea4d519813a683936c65a628c94cb9d", "score": "0.43215355", "text": "function writeToFile() {\n //FUNCTION FOR INQUIRER PROMPT\n inquirer \n .prompt(questions)\n .then(function(user) {\n console.log(\"USER:\", user); //success\n fs.writeFile(\"./build/README.md\", generateMarkdown(user), function(err) { //this function will create this file in this directory (if it doesn't already exist), and write content inside of generateMarkdown\n console.log(\"File Written. Please check the build folder\");\n });\n })\n \n}", "title": "" }, { "docid": "f2219508626ddcb46dfa5b5b46ef4655", "score": "0.43130085", "text": "async function createGitignore(options) {\n const file = fs.createWriteStream(\n path.join(options.targetDirectory, '.gitignore'),\n { flags: 'a' }\n );\n return writeGitignore({\n type: 'Node',\n file: file,\n });\n}", "title": "" }, { "docid": "390f9a8bf76b26bae97129738770ffe2", "score": "0.43076295", "text": "if (config && config.customOpts && config.customOpts.help) {\n return Promise.resolve(`\nThese are all the available arguments:\n--out [String]: specifies where the generated code is stored into. Default \"./build\"\n--icons [String]: specifies the directory that contains the SVG icons for which you want to generate the font. Default \"./icons\"\n--fontname [String]: the name for your brand new font. Default \"dcsIconFont\"\n--baseSelector [String]: specifies the base css class name. Default \"dcs-icon\"\n--cssFontsUrl [String]: the font URL to be defined into the resulting CSS file. Default: the --fontname specified\n--cssDest [String]: the destination path for the resulting CSS file. Default: The --out specified\n--classprefix [String]: specifies the css class prefix for all your icons. Default \"dcs-icon-\"\n--html: enables the generation of a html file with a preview for all the icons in the generated font\n--normalize: enables font normalization webfonts-generator option, possible values: \"true\", \"false\"\n--sass: generates a SCSS file instead of a CSS file\n--htmlTemplate: for providing a custom HTML template\n--cssTemplate: for providing a custom CSS template\n--scssTemplate: for providing a custom SCSS template\n--codepoints: for providing a custom codepoints json\n--cssExt [String]: extension of css file, default: \"css\"\n `)\n }", "title": "" }, { "docid": "848f1504cd3b6803dddc295fbfab415c", "score": "0.43018332", "text": "async function writeThenDirMT(path, contents, from, opt={}) {\n\t// path - platform path of file to write\n\t// from - platform path of dir to make from\n\t// contents -\n\t// opt - see `optd`\n\n\t// tries to writeAtomic\n\t// if it fails due to dirs not existing, it creates the dir\n\t// then writes again\n\t// if fail again for whatever reason it rejects with `osfileerr`\n\t// on success resolves with `undefined`\n\n\tlet optd = {\n\t\tencoding: 'utf-8',\n\t\tnoOverwrite: false\n\t\t// tmpPath: path + '.tmp'\n\t};\n\n\topt = Object.assign(optd, opt);\n\n\tlet writeTarget = () => OS.File.writeAtomic(path, contents, opt);\n\n\ttry {\n\t\tawait writeTarget();\n\t} catch(osfileerr) {\n\t\tif (osfileerr.becauseNoSuchFile) { // this happens when directories dont exist to it\n\t\t\t// TODO: verify this again: // im pretty sure i tested, if contents was a Uint8Array it will not be netuered. it is only neutered on success.\n\t\t\tawait OS.File.makeDir(OS.Path.dirname(path), {from}); // can throw\n\t\t\tawait writeTarget(); // can throw\n\t\t} else {\n\t\t\tthrow osfileerr;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "5df000c81db674790c2bf289fec784d0", "score": "0.430056", "text": "async start () {\n try {\n // Download index.json\n const repo = 'scratch-arduino-link';\n const indexPath = path.resolve(this.toolsPath);\n const filterAsset = asset => (asset.name.indexOf('index.json') >= 0);\n await downloadRelease(user, repo, indexPath, filterRelease, filterAsset, leaveZipped)\n .then(() => {\n console.log('index.json download complete.');\n })\n .catch(err => {\n console.error(err.message);\n });\n const linkPackages = await loadJsonFile(path.join(indexPath, 'index.json'));\n\n // scratch-arduino-libraries\n const librariesRepo = 'scratch-arduino-libraries';\n const libraryPath = path.join(path.resolve(this.toolsPath), '/Arduino/libraries');\n const oldLibraryVersionPath = path.join(libraryPath, 'library-version.json');\n const oldLibraryVersion = await loadJsonFile(oldLibraryVersionPath);\n for (const library of linkPackages['libraries']) {\n if (!fs.existsSync(path.join(libraryPath, library['folderName']))) {\n const libraryFilterAsset = asset => (asset.name.indexOf(library['libraryName']) >= 0);\n await downloadRelease(user, librariesRepo, libraryPath, filterRelease, libraryFilterAsset, leaveZipped)\n .then(() => {\n console.log(library['fileName'], ' download complete.');\n }).catch(err => {\n console.error(err.message);\n });\n } else {\n if (!oldLibraryVersion.hasOwnProperty(library['libraryName']) || (library['version'] > oldLibraryVersion[library['libraryName']])) {\n fs.rmdir(path.join(libraryPath, library['folderName']), { recursive: true }, (error) => {console.error(error);});\n const libraryFilterAsset = asset => (asset.name.indexOf(library['libraryName']) >= 0);\n await downloadRelease(user, librariesRepo, libraryPath, filterRelease, libraryFilterAsset, leaveZipped)\n .then(() => {\n console.log(library['fileName'], ' download complete.');\n }).catch(err => {\n console.error(err.message);\n });\n }\n }\n }\n let libraryData = {}; // Save current arduino library version\n for (const library of linkPackages['libraries']) {\n libraryData[library['libraryName']] = library['version'];\n }\n fs.writeFileSync(oldLibraryVersionPath, JSON.stringify(libraryData)); \n \n // scratch-arduino-firmwares\n const firmwaresRepo = 'scratch-arduino-firmwares';\n const firmwarePath = path.join(path.resolve(this.toolsPath), '../firmwares');\n const oldFirmwareVersionPath = path.join(firmwarePath, 'firmware-version.json');\n if (!fs.existsSync(firmwarePath)) {\n fs.mkdirSync(firmwarePath, {recursive: true});\n }\n if (!fs.existsSync(oldFirmwareVersionPath)) {\n for (const firmware of linkPackages['firmwares']) {\n const libraryFilterAsset = asset => (asset.name.indexOf(firmware['firmwareName']) >= 0);\n await downloadRelease(user, firmwaresRepo, firmwarePath, filterRelease, libraryFilterAsset, leaveZipped)\n .then(() => {\n console.log(firmware['fileName'], ' download complete.');\n }).catch(err => {\n console.error(err.message);\n });\n }\n } else {\n const oldFirmwareVersion = await loadJsonFile(oldFirmwareVersionPath);\n for (const firmware of linkPackages['firmwares']) {\n if (!oldFirmwareVersion.hasOwnProperty(firmware['firmwareName']) || (firmware['version'] > oldFirmwareVersion[firmware['firmwareName']])) {\n const libraryFilterAsset = asset => (asset.name.indexOf(firmware['firmwareName']) >= 0);\n await downloadRelease(user, firmwaresRepo, firmwarePath, filterRelease, libraryFilterAsset, leaveZipped)\n .then(() => {\n console.log(firmware['fileName'], ' download complete.');\n }).catch(err => {\n console.error(err.message);\n });\n }\n }\n }\n let firmwareData = {}; // Save current firmware version\n for (const firmware of linkPackages['firmwares']) {\n firmwareData[firmware['firmwareName']] = firmware['version'];\n }\n fs.writeFileSync(oldFirmwareVersionPath, JSON.stringify(firmwareData)); \n } catch(err) {\n dialog.showMessageBox({\n title: 'Scratch Arduino Link',\n type: 'error',\n buttons: ['Close'],\n message: 'Update error - ' + err.message\n });\n }\n }", "title": "" }, { "docid": "6907ef43afa38a2b80f9b5db7dd3966b", "score": "0.4293407", "text": "async function normalizeOptions(context, projectName, options) {\n const workspaceRoot = context.workspaceRoot;\n const projectMetadata = await context.getProjectMetadata(projectName);\n const projectRoot = node_path_1.default.join(workspaceRoot, projectMetadata.root ?? '');\n const browserTarget = (0, architect_1.targetFromTargetString)(options.browserTarget);\n const i18nOptions = (0, i18n_options_1.createI18nOptions)(projectMetadata);\n // Normalize xliff format extensions\n let format = options.format;\n switch (format) {\n case undefined:\n // Default format is xliff1\n case schema_1.Format.Xlf:\n case schema_1.Format.Xlif:\n case schema_1.Format.Xliff:\n format = schema_1.Format.Xliff;\n break;\n case schema_1.Format.Xlf2:\n case schema_1.Format.Xliff2:\n format = schema_1.Format.Xliff2;\n break;\n }\n let outFile = options.outFile || getDefaultOutFile(format);\n if (options.outputPath) {\n outFile = node_path_1.default.join(options.outputPath, outFile);\n }\n outFile = node_path_1.default.resolve(context.workspaceRoot, outFile);\n return {\n workspaceRoot,\n projectRoot,\n browserTarget,\n i18nOptions,\n format,\n outFile,\n progress: options.progress ?? true,\n };\n}", "title": "" }, { "docid": "e849b7aebc9b345a9fd48d0df81afb34", "score": "0.42843834", "text": "async function splendorWrite(){\n // COMPILES DECK AND NOBLES\n deck = await gatherCardValues();\n nobles = await gatherNobles();\n\n // COMBINES DECK/NOBLE AND WRITE TO JSON\n writeToJSON(deck, nobles)\n console.log(\"=========================================\")\n console.log(\"DONE CREATING MASTERDECK JSON............\");\n console.log(\"=========================================\")\n rl.close();\n}", "title": "" }, { "docid": "ef06fdf1540d2e20bce3ea4980a25852", "score": "0.42774218", "text": "function writeAsset(outputPath, filename, source) {\n if (!outputPath) return;\n\n outputPath = (typeof outputPath === 'string') ? outputPath : compiler.options.output.path;\n var templatePath = path.resolve(outputPath, filename);\n\n pendingTasks++;\n mkdirp(path.dirname(templatePath), function(err) {\n if (err) {\n self.addError(err, templatePath, 'template output directory could not be created');\n return done();\n }\n fs.writeFile(templatePath, source, function(err) {\n if (err) self.addError(err, templatePath, 'template could not be written');\n return done();\n });\n });\n }", "title": "" }, { "docid": "94039408eb140a19569ad9111c0fd04b", "score": "0.4276166", "text": "function build() {\n\treturn Promise.all(this.inputPaths.map(inputPath => {\n\t\treturn Promise.all(walkSync(inputPath)\n\t\t\t.map(p => ({\n\t\t\t\tin: path.join(inputPath, p),\n\t\t\t\tout: path.join(this.outputPath, p),\n\t\t\t}))\n\t\t\t.map(p => {\n\t\t\t\tif(p.in.endsWith('/')) {\n\t\t\t\t\tfs.mkdirSync(p.out);\n\t\t\t\t} else if(p.in.endsWith('.js')) {\n\t\t\t\t\treturn babel.transformFileAsync(p.in, this.options)\n\t\t\t\t\t\t.then(data => fs.writeFileAsync(p.out, data.code, {\n\t\t\t\t\t\t\tencoding: 'utf8'\n\t\t\t\t\t\t}));\n\t\t\t\t} else {\n\t\t\t\t\tsymlinkOrCopySync(p.in, p.out)\n\t\t\t\t}\n\t\t\t}));\n\t}));\n}", "title": "" }, { "docid": "a0f8b6aefb05552dcee9fa62e6446ab3", "score": "0.42741823", "text": "function writeFile(fileName, data) {\n return new Promise((resolve, reject) => {\n fs.writeFile(fileName, data, err => {\n if(err) {\n reject(err);\n return;\n }\n resolve ({\n ok: true,\n message: 'Success! README.md file has been genereated!'\n });\n });\n }); \n}", "title": "" }, { "docid": "b9b740170e09ef4aec3e4d4cffc8b9c4", "score": "0.42659664", "text": "async function init() {\n inquirer\n .prompt(questions)\n .then(answers => {\n\n var readMeOptions = generateMarkdown(answers);\n // call the writetToFile function here\n writeToFile(\"./Output/README.md\", readMeOptions);\n console.log(\"successful\");\n });\n}", "title": "" }, { "docid": "bc9329aa4a8f50c8b3125e486b024889", "score": "0.42613783", "text": "writeProgram() {\n // console.log(this.teamData);\n\n const initHtml = generatePage();\n // write initial index.html with out cards\n fs.writeFile('./dist/index.html', initHtml, err => {\n if (err) {\n console.log(err);\n }\n });\n\n // read new index.html to replace <div></div> with generated cards.\n fs.readFile('./dist/index.html', 'utf8', (err, htmlCard) => {\n\n // replaces <div></div> with html from generateEmployeeCards\n htmlCard = htmlCard.split(\"<div><div>\").join(this.generateEmployeeCards())\n\n // write the html file with the data from generateEmployeeCards\n fs.writeFile('./dist/index.html', htmlCard, err => {\n \n if (err) {\n console.log(err);\n return;\n }\n console.log(`\n ___________________________________________________________________________________\n \n Team Directory Created! Check Out index.html In The \"dist\" Directory To See It!\n ___________________________________________________________________________________\n `);\n \n });\n })\n\n \n }", "title": "" }, { "docid": "d524ef14c262b8fabe27611233afcf16", "score": "0.42577094", "text": "async move(location, options) {\n if (!this.tmpPath) {\n throw new utils_1.Exception('tmpPath must be set on the file before moving it', 500, 'E_MISSING_FILE_TMP_PATH');\n }\n options = Object.assign({ name: this.clientName, overwrite: true }, options);\n const filePath = path_1.join(location, options.name);\n try {\n await fs_extra_1.move(this.tmpPath, filePath, { overwrite: options.overwrite });\n this.filePath = filePath;\n this.fileName = options.name;\n this.state = 'moved';\n }\n catch (error) {\n if (error.message.includes('dest already exists')) {\n throw new utils_1.Exception(`\"${options.name}\" already exists at \"${location}\". Set \"overwrite = true\" to overwrite it`, 500);\n }\n throw error;\n }\n }", "title": "" }, { "docid": "36f748a6043702cb56b9164ec4fb3eae", "score": "0.42459962", "text": "async zipPackage(options) {\n options = this.getOptions(options);\n //make sure the output folder exists\n await this.fsExtra.ensureDir(options.outDir);\n let zipFilePath = this.getOutputZipFilePath(options);\n //ensure the manifest file exists in the staging folder\n if (!await util_1.util.fileExistsCaseInsensitive(`${options.stagingDir}/manifest`)) {\n throw new Error(`Cannot zip package: missing manifest file in \"${options.stagingDir}\"`);\n }\n //create a zip of the staging folder\n await this.zipFolder(options.stagingDir, zipFilePath);\n //delete the staging folder unless told to retain it.\n if (options.retainStagingDir !== true) {\n await this.fsExtra.remove(options.stagingDir);\n }\n }", "title": "" }, { "docid": "3800561d071f89718d6773cd2e17ea1a", "score": "0.42447868", "text": "function getEcosystemForTest(options) {\n if (options.unmanaged) {\n return 'cpp';\n }\n if (options.code) {\n return 'code';\n }\n return null;\n}", "title": "" }, { "docid": "4ba37f7ddfb5289f402270a4de9b5b6a", "score": "0.42346054", "text": "createSnapshot(options) {\n return this.client.sendOperationRequest({ options }, createSnapshotOperationSpec);\n }", "title": "" }, { "docid": "d9765def2c2711661c52808705b9f27b", "score": "0.4234041", "text": "async function solcCompiler() {\n const allPromises = [];\n deleteFolderRecursive(BUILDS_FOLDER);\n let files = [];\n try {\n files = fs.readdirSync(CONTRACTS_FOLDER);\n } catch (err) {\n logger.log('error', 'fs.readdirSync error: %s', err);\n }\n const input = {};\n files.forEach(file => {\n if (file.endsWith('.sol')) {\n input[file] = fs.readFileSync(`${CONTRACTS_FOLDER}${file}`, 'utf8');\n }\n });\n logger.log(\n 'info',\n !isEmpty(input) ? 'Solidity input successfully prepared' : 'Solidity input is Empty',\n );\n\n const output = solc.compile({ sources: input }, 1);\n if (output.errors) {\n logger.log('error', 'Output Errors: %s', output.errors);\n process.exit(1);\n }\n\n // TODO Not the best code: get rid of for in loop, make it more function e.g. Promise.all(.map(async))\n for (const key in output.contracts) {\n if (Object.prototype.hasOwnProperty.call(output.contracts, key)) {\n const contractName = key.substring(key.indexOf(':') + 1);\n const abi = JSON.parse(output.contracts[key].interface);\n const binary = output.contracts[key].bytecode;\n const events = output.contracts[key].allEvents;\n const contractData = {\n contract_name: contractName,\n abi,\n binary,\n events,\n l,\n };\n\n allPromises.push(\n artifactor\n .save(contractData, `${BUILDS_FOLDER}${contractName}`)\n .catch(error => logger.log('error', 'Contract artifacts saving failed: %s', error)),\n );\n }\n }\n await Promise.all(allPromises).catch(error =>\n logger.log('error', 'Contract artifacts saving failed: %s', error),\n );\n logger.log('info', 'Contracts successfuly compiled!');\n}", "title": "" }, { "docid": "91964c53d6bfe2484827f88914e73bc0", "score": "0.42303887", "text": "function build (options, cb) {\n // optimisation settings\n // note that the paths/includes below will need to change in when we drop those\n // older dependencies\n version = options.version || version;\n var config = {\n baseUrl: pth.join(__dirname, \"../js\")\n , optimize: options.optimize || \"uglify2\"\n , paths: {\n requireLib: \"./require\"\n }\n , shim: {\n \"shortcut\": {\n exports: \"shortcut\"\n }\n }\n , name: \"profile-w3c-common\"\n , include: \"requireLib\".split(\" \")\n , out: options.out\n , inlineText: true\n , preserveLicenseComments: false\n };\n r.optimize(config, function () {\n // add header\n try {\n fs.writeFileSync(config.out\n , \"/* VO-ReSpec \" + version +\n \" - Alexander Salas, http://alexandersalas.name/ (@ajsb85) */\\n\" +\n \"/* ReSpec 3.2.58\" +\n \" - Robin Berjon, http://berjon.com/ (@robinberjon) */\\n\" +\n \"/* Documentation: http://w3.org/respec/. */\\n\" +\n \"/* See original source for licenses: https://github.com/darobin/respec. */\\n\" +\n \"respecVersion = '\" + version + \"';\\n\" +\n fs.readFileSync(config.out, \"utf8\") + \"\\nrequire(['profile-w3c-common']);\\n\");\n }\n catch (e) {\n console.log(\"ERROR\", e);\n }\n cb();\n });\n}", "title": "" }, { "docid": "dbe133f65471366384ec3cd67017e278", "score": "0.42169586", "text": "function generateBuildOptions(metadata, options) {\r\n const results = filterByIntent(metadata, options);\r\n // Serve specific options not related to the actual run or emulate code\r\n return Object.assign({}, results, { 'iscordovaserve': true, 'nobrowser': true });\r\n}", "title": "" }, { "docid": "7bfcc4aba5c76b2581819dff5bfca2eb", "score": "0.42150185", "text": "async function writePackageFiles() {\n await Promise.all([\n create('.', packageJson.call(this, this.packageJsonContents)), // eslint-disable-line no-invalid-this, max-len\n create('.', eslintrc()),\n create('.', gitignore()),\n create('.', tpl('general/**')),\n ].map((stream) => toPromise(stream)));\n }", "title": "" }, { "docid": "d10492095b8edd263ef9b221b897bd2a", "score": "0.42117262", "text": "buildStart(options) { }", "title": "" }, { "docid": "cb2aa261cb6e66ca2c9a4e1e718f8208", "score": "0.4210388", "text": "async compile(stopOnError = true, extraFiles) {\n const config = this.ts.parseConfig();\n if (!config) {\n return false;\n }\n /**\n * Bundle frontend assets when encore is installed\n */\n const encore = await new AssetsBundler_1.AssetsBundler(this.appRoot, this.encoreArgs, this.buildAssets, this.logger).build();\n /**\n * Skipped, coz of frontend errors\n */\n if (encore.hasErrors) {\n return false;\n }\n /**\n * Always cleanup the out directory\n */\n await this.cleanupBuildDirectory(config.options.outDir);\n /**\n * Build typescript source\n */\n const ts = this.buildTypescriptSource(config);\n /**\n * Do not continue when output was skipped\n */\n if (ts.skipped) {\n return false;\n }\n /**\n * Do not continue when has errors and \"stopOnError\" is true\n */\n if (stopOnError && ts.hasErrors) {\n return false;\n }\n /**\n * Begin by copying meta files\n */\n await this.copyMetaFiles(config.options.outDir, extraFiles);\n /**\n * Copy `.adonisrc.json` file\n */\n await this.copyAdonisRcFile(config.options.outDir);\n /**\n * Manifest instance to generate ace manifest file\n */\n const manifest = new Manifest_1.Manifest(config.options.outDir, this.logger);\n const created = await manifest.generate();\n /**\n * Do not continue when unable to generate the manifest file as commands\n * won't be available\n */\n if (!created) {\n return false;\n }\n this.logger.success('built successfully');\n return true;\n }", "title": "" } ]
ae7ed68df629cd817c599b19ea5114b7
try and connect to mongodb
[ { "docid": "4026030be175e4f43c88e37e524cca11", "score": "0.7987715", "text": "function connect_to_mongo() {\n mongoose.connect(configDB.url, function (err) {\n if(err) {\n console.error(\"Failed to connect to MongoDB, retrying ...\");\n setTimeout(connect_to_mongo, 1000);\n }\n });\n}", "title": "" } ]
[ { "docid": "aab76e10d0fe4205ee5c92fbe23719e4", "score": "0.7815185", "text": "function connectWithMongo(){\n client.connect('mongodb://localhost:27017/stockscrapper', options, (error, mongodb) => {\n if(error){\n console.log('DB is Unavailable: '+error);\n db=null;\n }else{\n db = mongodb;\n clearInterval(connection);\n }\n });\n}", "title": "" }, { "docid": "cabf93f0bd9d5b3e3a073920085552c7", "score": "0.77850664", "text": "function setupMongo() { // connect to mongo db\n MongoClient.connect(config.mongouri, function (err, db) {\n if (err != null) {\n console.dir(err);\n process.exit();\n }\n \n server.db = db;\n config.collections.forEach(function (name) {\n server.db[name] = db.collection(name);\n });\n \n console.log('mongodb connected');\n \n callback();\n });\n }", "title": "" }, { "docid": "d2d3af18c71837657ca83ebc8281643d", "score": "0.7756217", "text": "async function StartMongo() {\n const uri = choopa_config.MONGO_URI || null;\n if (uri != null) {\n const mongoose = require('mongoose');\n try {\n await mongoose.connect(uri)\n console.log('Mongodb Connected' )\n } catch (error) {\n console.log(error);\n }\n }\n}", "title": "" }, { "docid": "a3779a81e78dcc2b04c2a0ddff1c5775", "score": "0.76918834", "text": "async _connectToMongo() {\n\t\tconst collectionCacheKey = this._buildMongoCollectionCacheKey();\n\t\tif (this.mongoClient) {\n\t\t\t// we're already connected\n\t\t\treturn;\n\t\t}\n\t\telse if (collectionCacheKey && mongoConnections[collectionCacheKey]) {\n\t\t\tthis.logger.log('using cached mongo connection');\n\t\t\tthis.mongoClient = mongoConnections[collectionCacheKey].mongoClient;\n\t\t\tthis.db = mongoConnections[collectionCacheKey].db;\n\t\t\treturn;\n\t\t}\n\t\tthis.logger.log(`connecting to ${this.options.mongoUrl}`);\n\t\ttry {\n\t\t\tthis.mongoClient = await MongoClient.connect(this.options.mongoUrl, {\n\t\t\t\treconnectTries: 0,\n\t\t\t\tuseNewUrlParser: true,\n\t\t\t\tuseUnifiedTopology: true\n\t\t\t});\n\t\t\tthis.db = this.mongoClient.db();\n\t\t\tmongoConnections[collectionCacheKey] = {\n\t\t\t\tmongoClient: this.mongoClient,\n\t\t\t\tdb: this.db\n\t\t\t};\n\t\t}\n\t\tcatch (error) {\n\t\t\tthis.logger.warn(`mongo connect error '${error}'. Will retry...`);\n\t\t\tawait waitABit();\n\t\t\tawait this._connectToMongo(this.options.mongoUrl);\n\t\t}\n\t}", "title": "" }, { "docid": "7749d415eec38ebe63f024ebd091cc39", "score": "0.7672329", "text": "async connectToMongo () {\n\t\tthis.log('Connecting to mongo...');\n\t\tconst collections = ['users', 'streams', 'messages'];\n\t\tthis.mongoClient = new MongoClient({ \n\t\t\ttryIndefinitely: true,\n\t\t\tcollections,\n\t\t\tlogger: this\n\t\t});\n\t\ttry {\n\t\t\tawait this.mongoClient.openMongoClient(this.config.storage.mongo);\n\t\t\tthis.data = this.mongoClient.mongoCollections;\n\t\t}\n\t\tcatch (error) {\n\t\t\tconst message = error instanceof Error ? error.message : JSON.stringify(error);\n\t\t\tthis.warn(`Unable to open mongo client: ${message}`);\n\t\t\tthrow 'internal database error';\n\t\t}\n\t\treturn this.mongoClient;\n\t}", "title": "" }, { "docid": "38f1b22e4224dae33bd6720108cb8295", "score": "0.76234144", "text": "async init() {\n //TODO\n\t this.client = await mongo.connect(this.mongoUrl,{useNewUrlParser: true});\n\t this.db=this.client.db(this.dbname);\n }", "title": "" }, { "docid": "39f8dd928edea8fb7995b3f8a8453ac0", "score": "0.7591534", "text": "function connectWithMongo() {\n mongoose.connect(config.mongodb);\n mongoose.Promise = Promise;\n const connection = mongoose.connection;\n\n connection.on('error', () => {\n console.error('Databse connection error');\n });\n\n connection.once('open', () => {\n console.log('Database connection established');\n });\n}", "title": "" }, { "docid": "bde06bc2c8c0b88dd40390e69f038806", "score": "0.7525659", "text": "async openMongoClient () {\n\t\tthis.mongoClient = new MongoClient({ collections: ['__all'] });\n\t\ttry {\n\t\t\tawait this.mongoClient.openMongoClient(ApiConfig.getPreferredConfig().storage.mongo);\n\t\t\tthis.data = this.mongoClient.mongoCollections;\n\t\t}\n\t\tcatch (error) {\n\t\t\tthrow `unable to open mongo client: ${JSON.stringify(error)}`;\n\t\t}\n\t}", "title": "" }, { "docid": "625fcf6baf6a49b899091f1b019bca99", "score": "0.7514473", "text": "async function connectMongo() {\n try {\n await client.connect();\n } catch (e) {\n console.log(e);\n }\n}", "title": "" }, { "docid": "d8144c8b7a0af8788ef7af4e0ff16cf9", "score": "0.74974674", "text": "function connect(){\n console.log(\"trying to connect to \" + process.env.MONGODB_URI);\n mongoose.connect((process.env.MONGODB_URI),function(err){\n \tif (err) {\n \t\tconsole.error(err);\n \t\tprocess.exit(1);\n \t}\n \tconsole.log(\"connected to \" + process.env.MONGODB_URI);\n });\n}", "title": "" }, { "docid": "6a848b398bfd5cf6e02ab85863a13de2", "score": "0.7495202", "text": "async function connectMongo() {\n try{\n\n const client = await MongoClient.connect(uri, { useUnifiedTopology: true })\n console.log(\"connected\")\n collection = client.db(process.env.DB_NAME).collection(process.env.DB_COLLECTION)\n }\n catch(err){\n console.log(\"error\", err)\n }\n}", "title": "" }, { "docid": "612b18dfbc544fd4e1ecb1d673f8f75d", "score": "0.74935305", "text": "async connect() {\n if (this.isConnected) {\n return Promise.reject(new Error('Mongo client is already connected'));\n }\n\n try {\n await this._mongoClient.connect();\n } catch (err) {\n return Promise.reject(err);\n }\n }", "title": "" }, { "docid": "d4200801280df1483d49ff6a859a847f", "score": "0.7483159", "text": "async connect() {\n\t\tconst mongoConfig = {\n\t\t\tuseNewUrlParser: true\n\t\t};\n\t\tconst client = await MongoClient.connect(this.dbUrl,mongoConfig);\n\t\tlogger.info(\"Connected to database successfully\");\n\t\tthis.dbConn = client.db(this.dbName);\n\t\t//logger.info(`connect to:${dbConn}`)\n\t}", "title": "" }, { "docid": "e2ca69ca6a765235219858657b2664f4", "score": "0.74688727", "text": "async init() {\n this.client = await mongo.connect(this.db_url);\n this.db = await this.client.db(this.db_name);\n }", "title": "" }, { "docid": "b5fb7b28d6de9f867e51416a9abe0ae3", "score": "0.74664086", "text": "async function dbConnect() {\n /* check if we already have connection to mongodb */\n if (mongoose.connection.readyState) {\n return;\n } else {\n /* connecting to database */\n console.info(\"initializing connection to db\");\n await mongoose.connect(process.env.MONGODB_URI, {\n useNewUrlParser: true,\n useUnifiedTopology: true,\n useFindAndModify: false,\n });\n }\n}", "title": "" }, { "docid": "3f5cc521f88d35a993419be57be0b39a", "score": "0.74214536", "text": "function connect(){\n mongoose.connect('mongodb://127.0.0.1:27017/DNGMobile');\n mongoose.connection.on(\"error\", console.error.bind(console, \"connection error:\"));\n mongoose.connection.once('open',function(){\n console.log('Connection successfully!');\n }).on('error',function(err){\n console.log('Connection error:'+err);\n });\n}", "title": "" }, { "docid": "ccf38715a423954554b96802b00d3390", "score": "0.7418543", "text": "function mongodb_connect (cb) {\n var mongoUrl = 'mongodb://'+ (mongoConfig.dbHost ? mongoConfig.dbHost : 'localhost') + ':'+(mongoConfig.dbPort ? mongoConfig.dbPort : '27017') +'/' + mongoConfig.dbName;\n mongo.connect(mongoUrl, function(err, mongodb) {\n if (err) {\n return cb(err);\n }\n\n console.log('mongodb is connected');\n cb(null, mongodb);\n\n });\n}", "title": "" }, { "docid": "884c78cbd4d2e216c5ee2aff7399a188", "score": "0.7387439", "text": "function connectDB() {\n let db;\n mongoose.connect(\"mongodb://db-mongo:27017\", { useNewUrlParser: true, useUnifiedTopology: true});\n db = mongoose.connection;\n db.on(\"error\", console.error.bind(console, \"connection error:\"));\n \n db.once(\"open\", function () {\n // we're connected!\n console.log(\"Connect to mongo database sucessfully\");\n });\n }", "title": "" }, { "docid": "c8d15848ed2726dde4c959e1004df811", "score": "0.73275864", "text": "function mongoConnect() {\n mongoose.connection.openUri(\n MONGO_DB_CONNECTION_URL,\n function(err) {\n if (err) {\n console.error(\"Error: \", err);\n }\n console.log(\"Connected.... Unless You See An Error The Line Before This..!!\");\n });\n mongoose.set('debug', true);\n}", "title": "" }, { "docid": "d8bae01d64eb97ea351b88313db568f0", "score": "0.7281608", "text": "initDbConnection() {\n const me = this;\n\n // Create a new MongoClient\n me.client = new MongoClient(me.url, {\n useNewUrlParser: true,\n useUnifiedTopology: true\n });\n\n // Use connect method to connect to the Server\n return me.client.connect().then(db => {\n me.db = me.client.db(me.dbName);\n me.collection = me.db.collection(me.dbCollection);\n });\n }", "title": "" }, { "docid": "8ab48ea8379569bcd9ca782ea221fa41", "score": "0.7265272", "text": "function connect(cb) {\n if(DB) cb(null)\n mongo.connect(url, function(err, db) {\n if(err)\n throw Error(\"Connection failed\");\n DB = db;\n cb(db);\n })\n}", "title": "" }, { "docid": "e2711d4f522db0d60dc82c6e63e15f01", "score": "0.7251894", "text": "async function connect(){\n \n let uri = await mongoDatabase.getUri()\n try {\n var connection = await mongoose.connect(uri, {\n useNewUrlParser: true,\n useUnifiedTopology: true,\n useFindAndModify: false,\n useCreateIndex: true\n })\n if(connection){\n return {success: \"Connected to database\"}\n }\n } catch {\n return {success: \"Connection to database failed\"}\n }\n}", "title": "" }, { "docid": "afc6418d4b3f532f8f75cfc68050ee2f", "score": "0.72259533", "text": "function connect(MONGO_PATH) {\n mongoose.connect(MONGO_PATH, { useNewUrlParser: true });\n var db = mongoose.connection;\n db.on(\"error\", console.error.bind(console, \"MongoDB connection error:\"));\n db.once(\"open\", () => {\n l.info(\"Conected to MongoDB.\");\n });\n}", "title": "" }, { "docid": "28c482cb3b78bdf24e4065fbd62fdf55", "score": "0.7187726", "text": "async function connect() {\n await mongoose.connect(mongoURI, {\n useNewUrlParser: true,\n useCreateIndex: true,\n useFindAndModify: false,\n });\n}", "title": "" }, { "docid": "0ead06d226610bc0ad8571437d6974d0", "score": "0.7145549", "text": "function setUpConnection(){\n mongoose.connect(`mongodb://localhost/hillel_final`);\n}", "title": "" }, { "docid": "79f54a837c43a1a28f323bff29f802ef", "score": "0.713743", "text": "async function connectMongoose() {\n if (connected) {\n //mongoose already connected\n return;\n }\n\n await mongoose.connect(process.env.MONGO_URI, {\n useNewUrlParser: true,\n useUnifiedTopology: true,\n useCreateIndex: true,\n });\n\n connected = true;\n\n let db = mongoose.connection;\n db.once(\"open\", () => {\n console.log(\"Connected to mongoose; good to go!\");\n });\n\n db.on(\"error\", () => {\n throw Error(\"Could not connect to mongoose\");\n });\n}", "title": "" }, { "docid": "091c529e22599a8e1735a5bb5feb0e83", "score": "0.71334624", "text": "connect() {\n mongoose.connect(\n `mongodb+srv://${process.env.DB_USER}:${process.env.DB_PASSWORD}@${process.env.DB_HOST}/kat?retryWrites=true`,\n {useNewUrlParser: true} \n )\n }", "title": "" }, { "docid": "cbbf1ecd1d9f50a333190ea21d11a8d8", "score": "0.7127866", "text": "function open(){\n // Connection URL. This is where your mongodb server is running.\n // TODO : pass it directly through a env variable\n let url = \"mongodb://localhost:27017/test\"\n return new Promise((resolve, reject)=>{\n // Use connect method to connect to the Server\n mongoClient.connect(url, (err, conn) => {\n if (err) {\n reject(err);\n } else {\n resolve(conn);\n }\n });\n });\n}", "title": "" }, { "docid": "9c583ee460f89c4a06ccdf72c4cc7de5", "score": "0.71113354", "text": "function connect(){\n if (!isConnected()) {\n mongoose.connect(dburi, {\n useNewUrlParser : true\n });\n mongoose.Promise = global.Promise;\n }\n}", "title": "" }, { "docid": "314363043dc6cb8bcc684825dbdb5293", "score": "0.7111238", "text": "async function connect () {\n // Prevent MongooseError: Can't call `openUri()` on\n // an active connection with different connection strings\n await mongoose.disconnect()\n\n const mongoUri = await mongoServer.getUri()\n await mongoose.connect(mongoUri, {\n useNewUrlParser: true,\n useCreateIndex: true,\n useUnifiedTopology: true\n }, err => {\n if (err) {\n console.error(err)\n }\n })\n}", "title": "" }, { "docid": "f316a78313decad18acf90b3241b5cee", "score": "0.71037126", "text": "async function connect(){\n try {\n await mongoose.connect(`mongodb://localhost:27017/${api}`, {\n useNewUrlParser: true,\n useUnifiedTopology: true, \n useCreateIndex: true,\n useFindAndModify: true,\n });\n } catch (error) {\n throw error;\n }\n console.log(`Conexíon con la base de datos: ${api}`);\n}", "title": "" }, { "docid": "e5e1ad81578e4147ef4d51494020d0af", "score": "0.70956814", "text": "async function connect(){\n await mongoose.connect('mongodb://localhost/flutter-node',{\n useNewUrlParser:true\n });\n console.log('DB connect sucess');\n}", "title": "" }, { "docid": "4fc96e4e5fdf7f59d79923c35e9ea15a", "score": "0.7074067", "text": "async function connectToDatabase() {\n try {\n await mongoose.connect(MONGODB_URI, {\n autoIndex: false,\n useNewUrlParser: true,\n useUnifiedTopology: true,\n useFindAndModify: false\n });\n console.log(`${APP_NAME} successfully connected to database.`);\n } catch (error) {\n console.log(error);\n process.exit(1);\n }\n}", "title": "" }, { "docid": "ee26b3130d9b163d3b06555713a3a1bd", "score": "0.70570534", "text": "function setUpMongooseConnection() {\n const connectionString = process.env.MONGODB_URI;\n if (!connectionString) {\n throw new Error('Connection string is not defined. ' +\n 'Set process.env.MONGODB_URI');\n }\n mongoose.connect(connectionString,\n {useNewUrlParser: true, useUnifiedTopology: true});\n mongoose.Promise = global.Promise;\n mongoose.connection.on('error',\n console.error.bind(console, 'MongoDB connection error:'));\n}", "title": "" }, { "docid": "bbfcb54085f5742108ce1b320b22e502", "score": "0.704132", "text": "async function connectToDbServer(url){\n\tlet mongoConnection;\n\ttry {\n\t\tmongoConnection = await mongoClient.connect(url, { useNewUrlParser: true });\n\t\tconsole.log('mongoConnection', mongoConnection);\n\t} catch (error) {\n\t\tconsole.error(error);\n\t}\n\treturn mongoConnection;\n}", "title": "" }, { "docid": "be13d09057c060ae9d184964e4850677", "score": "0.7030717", "text": "async init() {\n //TODO\n\n this.client = await mongo.connect(this.dbUrl);\n this.db = this.client.db();\n}", "title": "" }, { "docid": "c926a1341321c33f9f7d59ed44eae7ed", "score": "0.70256644", "text": "function connectDb() {\n return MongoClient.connect(url);\n}", "title": "" }, { "docid": "9cd55d68feafb80263bc6d67af807ca7", "score": "0.7021914", "text": "async openConnect() {\n if (!this.isConnected) {\n const client = new MongoClient(this.url, { useUnifiedTopology: true });\n await client.connect();\n const dataBase = client.db(this.dbName);\n const collection = dataBase.collection(this.collectionName);\n this.isConnected = client;\n return collection;\n } else {\n const dataBase = this.isConnected.db(this.dbName);\n const collection = dataBase.collection(this.collectionName);\n return collection;\n }\n }", "title": "" }, { "docid": "438aeb1d9f6808388998c87b058d2f71", "score": "0.702154", "text": "function connect() {\r\n databaseUrl = \"mongodb+srv://student:[email protected]/studentdb?retryWrites=true&w=majority\"\r\n mongoose.connection\r\n .on('error', console.log) //if error happened when connecting to db we log the error\r\n .on('disconnected', connect) //if we got disconnected to the datbase we will call again the connect function \r\n .once('open', listen); //if sucessfully connected to db we call the listen function \r\n return mongoose.connect(databaseUrl, {\r\n keepAlive: 1,\r\n useNewUrlParser: true, //flag that allows parsing of the databaseurl properly\r\n useUnifiedTopology: true //prevents deprecation warnings from popping up https://mongoosejs.com/docs/deprecations.html \r\n });\r\n}", "title": "" }, { "docid": "23318ec87b716be0e131070b41f5175d", "score": "0.6972987", "text": "async connect() {\r\n if (!this.#client) {\r\n // Attempting the connection\r\n try {\r\n this.#client = new MongoClient(this.#uri, { useUnifiedTopology: true });\r\n await this.#client.connect()\r\n }\r\n catch (e) {\r\n throw Error('Failed to fetch mongo connection');\r\n }\r\n }\r\n\r\n if (this.#dbName) {\r\n this.#db = this.#client.db(this.#dbName);\r\n }\r\n else {\r\n throw Error('Database name is mandatory and cannot be ommitted');\r\n }\r\n\r\n return this;\r\n }", "title": "" }, { "docid": "2569ea9403dbe1827be34bbcec65b22e", "score": "0.6930122", "text": "_connectDatabase() {\n mongoose.connect(process.env.MONGODB_CONNECT_URL); \n }", "title": "" }, { "docid": "7c3cd01c2eeeef53369035cdc2566345", "score": "0.6923583", "text": "initConnection() {\n mongoose\n .connect(dbURL)\n .then(res => {\n console.log(`Mongoose default connection is open to: ${dbURL}`);\n })\n .catch(err => {\n console.log(\"Mongoose Connection Error:\", err);\n });\n }", "title": "" }, { "docid": "09fc63b20fa86c359647ef927a201f55", "score": "0.6917251", "text": "async function main() {\n await mongoose.connect('mongodb://localhost:27017/shopApp');\n}", "title": "" }, { "docid": "9927ef7bdcfe4627d782558ca60773a4", "score": "0.69158024", "text": "function databaseInit () {\n\tmongoConnection = mongoose.connect('mongodb://localhost/slapdashdb');\n\tmongoose.Promise = blueBird;\n\tdebug('Initialized MongoDB: ' + mongoConnection);\n}", "title": "" }, { "docid": "5c520430e0469840e542d15f2bfc075e", "score": "0.69023883", "text": "async function startDB() {\n await mongo.init\n}", "title": "" }, { "docid": "57040b87e4a42e082313b3ced7116c96", "score": "0.6893634", "text": "async function connectDatabase() {\n return await MongoClient.connect(databaseHost, { useNewUrlParser: true });\n}", "title": "" }, { "docid": "8931ef01e165c956e55fcdf84095140c", "score": "0.68935996", "text": "function Client_Mongo(config) {\n Client.apply(this, arguments);\n if (config.debug) this.isDebugging = true;\n if (config.connection) {\n this.initDriver();\n this.initRunner();\n this.connectionSettings = _.clone(config.connection);\n this.initPool();\n this.pool = new this.Pool(config.pool);\n }\n}", "title": "" }, { "docid": "a6c9a245ec6b92a306d3390917879367", "score": "0.688218", "text": "function connectToDB(name, password)\n{\n\tmongoose.connect(\"mongodb+srv://Pratyush:\"+password+\"@cluster0-yxbyk.mongodb.net/\"+name_of_db+\"?retryWrites=true&w=majority\", {useNewUrlParser: true, useCreateIndexclear:true, useUnifiedTopology: true, useFindAndModify:false}).then(()=>\n{console.log(\"Connected to DB!\");}).catch(err => \n{\n\tconsole.log(\"Error:\", err.message);\n});\n}", "title": "" }, { "docid": "29e1238f0537514d9a9a51212552723c", "score": "0.6869229", "text": "async function conectar(){\n await mongoose.connect('mongodb://10.128.35.136:27017/curso',{iseNewUrlParser: true}) // para usarlo en tu pc usarias 'localhost'\n console.log('Conectado!');\n}", "title": "" }, { "docid": "2f64bf2ba70de3cf7acd1f99489bc187", "score": "0.68617016", "text": "function mongoConnectionFailed( error )\n{\n global.mongoClient = null\n console.log( \"Unable to connect to mongo server. Could not start nodejs.\" )\n}", "title": "" }, { "docid": "e24e4dfaec61079d32ba58a4c76a8326", "score": "0.6846732", "text": "testConnection(url, port, name) {\n let uri = `mongodb://${url}:${port}/${name}`;\n this.mongoClient.connect(uri, { useNewUrlParser: true }, function (err, db) {\n if (err) {\n console.log('fail');\n main_1.settingsWindow.webContents.send('test-db-connection', false);\n }\n else {\n console.log('success');\n main_1.settingsWindow.webContents.send('test-db-connection', true);\n }\n });\n }", "title": "" }, { "docid": "932c6ae6beaa0a422dbf1c8382b85c86", "score": "0.68141276", "text": "async function connectToMainDatabase() {\n let dbUrl = \"mongodb://\" + databaseConfig.host + \":\" + databaseConfig.port + '/';\n let dbs = await mongoClient.connect(dbUrl,{ useNewUrlParser: true }).catch(error => {\n log.fatal(\"Cannot Connect to database\",error);\n });\n if (dbs === undefined) {\n return null;\n } else {\n let done = () => {\n dbs.close();\n };\n let db = dbs.db(databaseConfig.main);\n return {\n db: db,\n done: done\n };\n }\n}", "title": "" }, { "docid": "a783c68b64233bcefb1fb7f3c30b667d", "score": "0.68086433", "text": "static async connectDb() {\n //If MongoDB is already connected, return db object\n if (this.dbClient) {\n const currDbClient = Promise.resolve(this.dbClient);\n console.log(`MongoDB already connected!`);\n return currDbClient;\n }\n //Otherwise connect using 'await', the whole method is async\n else {\n try {\n const newDbClient = await MongoClient.connect(this.url, this.options);\n console.log(`DB is connected? ${newDbClient.isConnected()}`);\n this.dbClient = newDbClient;\n return newDbClient;\n } catch (error) {\n console.error(`MongoDB connection failed with > ${error}`);\n throw error;\n }\n }\n }", "title": "" }, { "docid": "c7e053aa44d98e4a04cd228a37e93660", "score": "0.6780125", "text": "async function dbcon(){\n try{\n MongoClient.connect(url, (err, client)=> {\n console.log(\"COnnected database\");\n global.db = client.db(dbName);\n // model.user.collection();\n // model.job.collection();\n });\n}catch(err){\n throw(err);\n}\n}", "title": "" }, { "docid": "7b77b8f7d3929afbb33fc675ba8fca75", "score": "0.67793095", "text": "function mongoConnectionCallback( error ) {\n if ( error ) {\n var message = \"error establishing connection to mongo \" + nconf.get( \"mongodbConnectionUrl\" ) + \" : \" + error;\n logger.log( \"error\", message );\n throw message;\n }\n else {\n logger.log( \"info\", \"connection to mongo \" + nconf.get( \"mongodbConnectionUrl\" ) + \" opened\" );\n }\n}", "title": "" }, { "docid": "837dadff2b32539f627500f11fb4ce60", "score": "0.6772333", "text": "async function loadTasksCollection(){\n const url=\"mongodb+srv://navin:[email protected]/mytasklist?retryWrites=true&w=majority\";\n const client=new MongoClient(url,{useNewUrlParser:true,useUnifiedTopology: true});\n try {\n await client.connect();\n console.log(\"sucess\")\n } catch (error) {\n console.log(error);\n \n }\n return client.db(\"tasklist\").collection(\"task\");\n}", "title": "" }, { "docid": "9c0fc75c5018352c7523b3f3e30f149d", "score": "0.67707074", "text": "static init() {\n const dsn = config.database;\n const options = config.databaseOption;\n\n mongoose.Promise = bluebird;\n mongoose.connect(dsn, options, (error) => {\n // handle the error case\n if (error) {\n console.info('Failed to connect to the Mongo');\n console.error(error);\n throw error;\n }\n else {\n console.info('Connected to mongo: ' + dsn);\n }\n });\n }", "title": "" }, { "docid": "b911aa7508fa754d553f823f3137b47b", "score": "0.6755907", "text": "async connect() {\n // check if connection already exists\n if (this.connection && this.connection.isConnected()) {\n return this.connection;\n\n // if not, create connection and return it\n } else {\n const client = await MongoClient.connect(this.url, {\n useUnifiedTopology: true,\n });\n this.connection = client;\n return this.connection;\n }\n }", "title": "" }, { "docid": "4cf96bc1a638063be5dc06e758e0f8ce", "score": "0.6753804", "text": "function mongoConnectAndAuthenticate(callback) {\n var MongoClient = require('mongodb').MongoClient;\n MongoClient.connect(mongourl, function(err, db) {\n (db.collection(config.matchescollection)).ensureIndex( { requester_id: 1 }, function(err, idxName) { });\n (db.collection(config.matchescollection)).ensureIndex( { provider_id: 1 }, function(err, idxName) { });\n (db.collection(config.rideRequestsCollection)).ensureIndex( { start_time: 1, end_time: 1 }, function(err, idxName) { });\n (db.collection(config.rideRequestsCollection)).ensureIndex( { user_id: 1 }, function(err, idxName) { });\n (db.collection(config.usersCollection)).ensureIndex( { facebook_id: 1 }, function(err, idxName) { });\n });\n}", "title": "" }, { "docid": "f71d62745646c210cf94f3676f14ccda", "score": "0.6733696", "text": "async function connectDB() {\n try {\n await mongoose.connect(dbString);\n console.log(\"Mongodb connected......\");\n } catch (err) {\n console.log(\"DB Error: \", err.message);\n process.exit(1);\n }\n}", "title": "" }, { "docid": "5175b93a844bc56d916b2575fcc9a9e7", "score": "0.6732", "text": "connect() {\n mongoose.connect(server + database).then(res => {\n console.log(res);\n }).catch(error => {\n console.error(error);\n })\n }", "title": "" }, { "docid": "42e00470fd196cd7dce73acf7a670f1c", "score": "0.6731535", "text": "function buildMongoURL() { \n\tif(c.dbs.auth.dbUsername && c.dbs.auth.dbPassword) {\n\t\treturn 'mongodb://' + c.dbs.auth.dbUsername + ':' + c.dbs.auth.dbPassword + '@' + c.dbs.auth.dbHost + ':' + c.dbs.auth.dbPort + '/' + c.dbs.auth.dbName + '?auto_reconnect=true&safe=true';\n\t} else { \n\t\treturn 'mongodb://' + c.dbs.auth.dbHost + ':' + c.dbs.auth.dbPort + '/' + c.dbs.auth.dbName + '?auto_reconnect=true&safe=true'; \n\t}\n}", "title": "" }, { "docid": "bce6431ed375b01a6fb43ec54b44d2c6", "score": "0.6696737", "text": "establishDatabaseConnection() {\n return Mongoose.connect(process.env.MONGODB_URL, this.config.mongoose)\n }", "title": "" }, { "docid": "a01480fdebdc9735fa8ea16af3992a1f", "score": "0.66945535", "text": "function MongoConnection() {\n this.servidor = \"localhost\"\n this.porta = 27017\n this.banco = \"mycustomers\"\n}", "title": "" }, { "docid": "c80ea6c1f29e441112b50e0654a121bd", "score": "0.6693928", "text": "function connectWithRetry () {\n console.log('\\n\\n\\n * * * * MongoDB connection with retry * * * * \\n\\n\\n');\n\n return mongoClient.connect(MONGO_URL, function(err, connection) {\n if (err) {\n console.error('\\n\\n\\nConnection failed, retrying in 5 seconds', err);\n setTimeout(connectWithRetry, 5000);\n } else {\n initiateDB(connection);\n }\n });\n}", "title": "" }, { "docid": "050fd38c79381ef0c276a1e3c91bba56", "score": "0.66760015", "text": "function getTestMongoUrl() {\n\t\treturn 'mongodb://localhost:27017/test'; // requires mongo installed locally\n\t}", "title": "" }, { "docid": "712e523ec8aaa9185698264734322f3c", "score": "0.66630477", "text": "function connect_db(callback, throw_err) {\n var server, db;\n\n function parse_server(uri) {\n var tmp = uri.split(':');\n return new mongo.Server(tmp[0], tmp[1] || mongo.Connection.DEFAULT_PORT);\n }\n\n if (conf.mongo.url) {\n mongo.MongoClient.connect(conf.mongo.url, callback);\n } else {\n if (conf.mongo.servers.length === 1) {\n server = parse_server(conf.mongo.servers[0]);\n } else {\n var ss = [];\n conf.mongo.servers.forEach(function(item) {\n ss.push(parse_server(item));\n });\n server = new mongo.ReplSetServers(ss);\n }\n db = new mongo.Db(conf.mongo.dbname, server, { w: 1 });\n db.open(function(err, mongoClient) {\n if (err !== null) {\n error('db open failed: %s', err);\n console.trace(err);\n if (throw_err) throw err;\n //return callback(err, db);\n }\n\n if (conf.mongo.username) {\n db.authenticate(conf.mongo.username, conf.mongo.password, function(err, result) {\n verbose('mongodb pool connected database');\n callback(err, mongoClient);\n });\n } else {\n verbose('mongodb pool connected database');\n callback(err, mongoClient);\n }\n });\n db.on('close', function() {\n db.closed = true;\n });\n }\n}", "title": "" }, { "docid": "5b4baf7c8c48949e4f3c94bf2b6a7526", "score": "0.6658257", "text": "function tryReconnect() {\n reconnTimer = null;\n winston.warm(\"try to connect: %d\".grey, mongoose.connection.readyState);\n db = mongoose.connect(config.mongodb_development,function(err){\n\t if(err) {\n\t winston.error('connect mongodb error'.red,err);\n\t\t onConnectUnexpected(err);\n\t }\n\t else winston.log('mongodb connect success'.yellow,mongoose.connection.readyState);\n });\n}", "title": "" }, { "docid": "5296907528cf57d6fde3380c529bb847", "score": "0.662459", "text": "function connect() {\n\t mongoose.Promise = bluebird;\n\t mongoose.connect(db, function(err) {\n\t if (err) {\n\t console.log(`===> Error connecting to ${db}`);\n\t console.log(`Reason: ${err}`);\n\t } else {\n\t console.log(`===> Succeeded in connecting to ${db}`);\n\t }\n\t });\n\t }", "title": "" }, { "docid": "5111e7b20e378fee011bf3646c36b5c3", "score": "0.6621151", "text": "function connectMongoDb() {\n\n // connect to MongoDB and use database \"routeDB\":\n // asynchronous scope\n (async () => {\n\n // try to connect to mongodb on localhost:27017\n try {\n // await blocks and waits for connection, because here synchronous execution is desired\n app.locals.dbConnection = await mongodb.MongoClient.connect(\n // connectionString / connection URL:\n \"mongodb://localhost:27017\",\n {\n useNewUrlParser: true,\n autoReconnect: true,\n useUnifiedTopology: true\n }\n );\n\n // connect to and use database \"routeDB\" (create this database, if it does not exist)\n app.locals.db = await app.locals.dbConnection.db(\"routeDB\");\n // tell the user that the connection is established and databse \"routeDB\" will be used for following operations\n console.log(\"Using DB: \" + app.locals.db.databaseName);\n\n // tell the user the URL for starting the application / where the routes are shown\n console.log(\"URL for starting the app: http://localhost:\" + port + \"/\");\n\n // catch possible errors and tell the user about them:\n } catch (error) {\n\n // for using docker:\n // try to connect to mongodb on mongodbservice:27017\n try {\n // await blocks and waits for connection, because here synchronous execution is desired\n app.locals.dbConnection = await mongodb.MongoClient.connect(\n // connectionString / connection URL: docker container \"mongodbservice\"\n \"mongodb://mongodbservice:27017\",\n {\n useNewUrlParser: true,\n autoReconnect: true,\n useUnifiedTopology: true\n }\n );\n\n // connect to and use database \"routeDB\" (create this database, if it does not exist)\n app.locals.db = await app.locals.dbConnection.db(\"routeDB\");\n // tell the user that the connection is established and databse \"routeDB\" will be used for following operations\n console.log(\"Using DB: \" + app.locals.db.databaseName);\n\n // tell the user the URL for starting the application / where the routes are shown\n console.log(\"URL for starting the app: http://localhost:\" + port + \"/\");\n\n\n // if it is not possible to connect on localhost:27017 or mongodbservice:27017,\n // catch possible errors and print them in the console:\n } catch (error) {\n console.log(error.message);\n console.dir(error);\n\n // retry until db-server is up\n setTimeout(connectMongoDb, 3000);\n }\n }\n }\n)();\n}", "title": "" }, { "docid": "a9c945bd1de43b0e06eee00dc3eb4b17", "score": "0.65976477", "text": "async function connectAtStart(){\n let connectDB = await mongoose.connect(process.env.DB, { useNewUrlParser: true, useUnifiedTopology: true })\n .then(() => {\n console.log(`Connection to the Atlas Cluster db is successful!`)\n //let Issue = mongoose.model('Issue', issueSchema);\n })\n .catch((err) => console.error(err));\n mongoose.set('useFindAndModify', false);\n }", "title": "" }, { "docid": "ee3a22fc344f660a9eecff5c80c73de2", "score": "0.6567197", "text": "function mongoConnect(res, params, dbCallback, mongoCallback) { mongoClient.connect(mongoURL, function(err, db){\n if(err){\n console.log('error connecting to MongoDB')\n } else {\n console.log('MongoDB connection successful')\n var collection = db.collection('urlShortener')\n mongoCallback(res, params, collection, db, dbCallback)\n }\n })\n}", "title": "" }, { "docid": "79129b2efc06458e24c5b1e581e1be49", "score": "0.6566012", "text": "async function start() {\r\n\ttry {\r\n\t\tawait mongoose.connect(process.env.SOCKET_MONGO_DB, {\r\n\t\t\tuseCreateIndex: true,\r\n\t\t\tuseNewUrlParser: true,\r\n\t\t\tuseFindAndModify: false,\r\n\t\t\tuseUnifiedTopology: true,\r\n\t\t});\r\n\r\n\t\tio.listen(port);\r\n\t\tconsole.log('listening on port ', port);\r\n\t} catch (error) {\r\n\t\tconsole.log(error);\r\n\t}\r\n}", "title": "" }, { "docid": "54602b86c757e0e6560a6d14f3716112", "score": "0.65628344", "text": "function connected2(err, db) {\n if(err) { console.log(\"Could not connect to mongod, check config.\"); throw err;}\n \n // use db;\n mydb = db;\n dbspaces = db.collection('spacemap');\n dbeventlog = db.collection('eventlog');\n dbathomepref = db.collection('athomeprefs');\n console.log(\"db up\", dbspaces);\n \n setInterval(IdleTimeout, 60000);\n \n // make sure we have indexes\n// mydb.collection('schedule-events').ensureIndex({prgSvcId:1, startTime:1}, function (err, val) {});\n// mydb.collection('programs').ensureIndex({TMSid : 1 }, function (err, val) {});\n// mydb.collection('lineups').ensureIndex({headendId:1}, function (err, val) {});\n// mydb.collection('sources').ensureIndex({prgSvcId : 1}, function (err, val) {});\n \n \n // load space metadata (until in DB)\n // should also set up hooks if any\n readspacemetadata();\n}", "title": "" }, { "docid": "9a5f5ab2373750522bf7a31ab8da950e", "score": "0.655083", "text": "async function db() {\n if(dbrep == undefined) {\n var client = await MongoClient.connect(dburl).catch(e => console.error(\"Could not connect to MongoDB at \" + dburl + \", cause: \" + e.message));\n dbrep = client.db(dbname);\n console.log(\"Using database \" + dbrep);\n }\n return dbrep;\n}", "title": "" }, { "docid": "aa74695e6be83724f49e5b6a9b1f5fef", "score": "0.65328306", "text": "connectToDatabase(){\n if(db){\n console.log('Already connected to database.');\n return Promise.resolve();\n }\n\n \n return MongoClient.connect(privateDbUrl)\n .then((connectedDb)=>{\n console.log(\"Connected to database.\");\n db=connectedDb;\n users = db.collection(\"users\");\n })\n }", "title": "" }, { "docid": "68c1c5c4a0d697e2b8d7c3eca6e0b374", "score": "0.65246177", "text": "async function loadPostsCollection() {\n const client = await mongodb.MongoClient.connect('mongodb+srv://abc123:[email protected]/vue_express_blog?retryWrites=true&w=majority', {\n useNewUrlParser: true\n });\n\n return client.db('vue_express_blog').collection('posts')\n}", "title": "" }, { "docid": "2aeada5d63ae94159294b8d501c6fdac", "score": "0.6520548", "text": "function connect() {\n const options = {\n useMongoClient: true\n };\n mongoose.Promise = global.Promise;\n mongoose.connect(process.env.MONGODB_URI, options);\n return mongoose.connection;\n}", "title": "" }, { "docid": "95f43387cadcae3b5c7508893bbdedd9", "score": "0.6519719", "text": "function connect () {\n return new Promise((resolve, reject) => {\n MongoClient.connect(config.database.address, { useNewUrlParser: true }, (err, server) => {\n if (err) {\n console.error(err);\n process.exit(10);\n } else {\n console.log('Database connected.');\n __conn = server.db(config.database.db);\n resolve();\n }\n });\n });\n}", "title": "" }, { "docid": "72a1de5b9d729803642b19e1adb4827b", "score": "0.6506373", "text": "function connect() {\n mongoose.connect('mongodb://localhost:' + port + '/' + dbName, function() {\n mongoose.connection.db.dropDatabase();\n });\n}", "title": "" }, { "docid": "8ea70848b32d0cdd8b0db1f945b61ab4", "score": "0.65059525", "text": "async client() {\n if (this.dbClient && this.dbClient.isConnected()) {\n return this.dbClient;\n } else {\n // http://mongodb.github.io/node-mongodb-native/3.1/api/MongoClient.html\n console.log(`Connecting to ${this.dbUrl}...`)\n this.dbClient = await MongoClient.connect(this.dbUrl, { useNewUrlParser: true })\n console.log(\"Connected to database.\");\n return this.dbClient;\n }\n }", "title": "" }, { "docid": "b73699660132c9e7161d2243afbc53e4", "score": "0.6493204", "text": "function dbconnection() {\n mongoose.promise;\n const CONNECTION_URL= 'mongodb://localhost:27017/fundoo-notes';\n mongoose.connect(CONNECTION_URL, { \n useNewUrlParser : true,\n useUnifiedTopology : true , \n useCreateIndex : true, \n useFindAndModify : false,\n // userCreateIndex: true,\n autoIndex : true\n})\nreturn mongoose.connection\n .then(() => { console.log(\"Successfully connected to the database\"); })\n .catch(err => { console.log('Could not connect to the database', error);\n process.exit();\n });\n}", "title": "" }, { "docid": "02c055302c5231ba833e106ab62f1743", "score": "0.64926875", "text": "function connect() {\n var options = { keepAlive: 1 };\n mongoose.connect(config.Mongo.URL, options, ()=>{\n console.log(\"connected to database\")\n \n });\n return mongoose.connection;\n}", "title": "" }, { "docid": "cb85d74100112c8bb73cef6fecf1fe7d", "score": "0.64886075", "text": "function connect(callback) {\n if (settings) {\n var url = 'mongodb://' + settings.username + ':' + settings.password + '@' +\n settings.host + ':' + settings.port + '/' + settings.databaseName;\n\n MongoClient.connect(url, function(err, db) {\n if(err) { return callback(err); }\n console.log('Connected to database...');\n callback(null, db);\n });\n } else {\n callback('Config file error.');\n }\n}", "title": "" }, { "docid": "070f019e7923f8766845bfd3b8970d44", "score": "0.64784175", "text": "async function getClient() {\n const client = await MongoClient.connect('mongodb://127.0.0.1:27017')\n return client\n}", "title": "" }, { "docid": "86d23f6b52fb0f4cdb1197a379e33d81", "score": "0.6477149", "text": "function open(){\n return new Promise((resolve, reject)=>{\n mongo.connect(MongoDB_URL, {useUnifiedTopology:true}, (err, db) => {\n if (err) {\n reject(err);\n } else {\n resolve(db);\n }\n });\n });\n}", "title": "" }, { "docid": "9846289e06446a81ac512f4f33b5cdd9", "score": "0.6473035", "text": "open() {\n\t\tvar db = mongoose.connection;\n\t\tdb.on('error', console.error.bind(console, 'connection error:'));\n\t\tdb.once('open', function() {\n\t\t console.log(\"Connected to \" + mongoUrl);\n\t\t});\n\t\tmongoose.connect(mongoUrl);\n\t\tthis.checkData();\n\t}", "title": "" }, { "docid": "5dd939a47b1f587b416e96579ff73e6c", "score": "0.6468983", "text": "async client() {\n if (this.dbClient && this.dbClient.isConnected()) {\n return this.dbClient;\n } else {\n console.log(`Connecting to ${this.dbUrl}`);\n this.dbClient = await MongoClient.connect(this.dbUrl, {\n useNewUrlParser: true,\n useUnifiedTopology: true,\n });\n console.log(\"Connected to database!\");\n return this.dbClient;\n }\n }", "title": "" }, { "docid": "c479b31126fbdd0a582bc5a1f327b0f4", "score": "0.64682454", "text": "function connect() {\n var options = {server: {socketOptions: {keepAlive: 1}}};\n return mongoose.connect(mongoconnection, options).connection;\n}", "title": "" }, { "docid": "63bf9560763df43addfb814d7c68cd2b", "score": "0.64670146", "text": "async function main() {\n try {\n await mongoose.connect(url, {\n useNewUrlParser: true,\n useUnifiedTopology: true,\n useCreateIndex: true,\n });\n } catch (error) {\n console.log(error);\n }\n}", "title": "" }, { "docid": "a3fba016178962f134e1e3639dc3d535", "score": "0.64662445", "text": "async function initDataBase(){\n const data=await readFile(path.join(__dirname,\"../../credentials.txt\"),\"utf8\");\n const lines=data.split(\"\\n\");\n const password=lines[0].replace(\"\\r\",\"\");\n const dataBaseName=lines[1].replace(\"\\r\",\"\");\n mongoose.connect(`mongodb+srv://edgar:${password}@cluster0.uldfg.mongodb.net/${dataBaseName}?retryWrites=true&w=majority`, {useNewUrlParser: true, useUnifiedTopology: true});\n}", "title": "" }, { "docid": "f7cfbd30880902b387060159786a8712", "score": "0.64631367", "text": "constructor() { \n this.client = new MongoClient(MONGO_URI, { useNewUrlParser: true, useUnifiedTopology: true });\n this.dbName = DB_NAME ; \n }", "title": "" }, { "docid": "9e6a46e15a2f1f550b1f13db72896212", "score": "0.6441806", "text": "function makeMongoUrl(params) {\n const host = params.mongoDbHost;\n const port = parseInt(params.mongoDbPort);\n const user = params.mongoDbAuthUser;\n const password = params.mongoDbAuthPassword;\n const db = params.mongoDbDatabase; // ?w=0\n const auth =\n user || password\n ? `${encodeURIComponent(user)}:${encodeURIComponent(password)}@`\n : '';\n return `mongodb://${auth}${host}:${port}/${db}`;\n}", "title": "" }, { "docid": "8b83c51dd3ede09b90435570487e0a84", "score": "0.6434422", "text": "async function get(){\n let db = await MongoClient.connect(mongourl, {useNewUrlParser: true, useUnifiedTopology: true}).catch(e=>console.log(e));\n return db;\n}", "title": "" }, { "docid": "bb984e0f4e56ff12e300c81ccfde812e", "score": "0.6429628", "text": "function MongoUtils() {\n const mu = {};\n let user=process.env.user,\n password=process.env.password,\n dbName= process.env.dbName;\n\n mu.getDatabases= ()=>{\n const url = `mongodb+srv://daniella:[email protected]/test?retryWrites=true&w=majority`;\n const client = new MongoClient(url, { useUnifiedTopology: true }); // useUnifiedTopology removes a warning\n\n// Connectgit remote add origin https://github.com/dartm05/exam1.git\n return client.connect()\n .then(client =>\n { return client\n .db()\n .admin()\n .listDatabases() // Returns a promise that will resolve to the list of databases\n .finally(() => client.close()); \n });\n };\n\n\n\n mu.getCollections= (dbNam)=>{\n const url = `mongodb+srv://daniella:[email protected]/test?retryWrites=true&w=majority`;\n const client = new MongoClient(url, { useUnifiedTopology: true }); // useUnifiedTopology removes a warning\n \n return client.connect()\n .then(\n client =>{\n return client\n .db(dbNam)\n .listCollections()\n .toArray() // Returns a promise that will resolve to the list of the collections\n .finally(() => client.close());\n });};\n\n\n mu.getColdocs= (dbNam,col)=>{\n const url = `mongodb+srv://daniella:[email protected]/test?retryWrites=true&w=majority`;\n const client = new MongoClient(url, { useUnifiedTopology: true }); // useUnifiedTopology removes a warning\n \n return client.connect()\n .then(\n client =>{\n return client\n .db(dbNam)\n .collection(col)\n .find({ })\n .sort({_id:-1})\n .toArray() // Returns a promise that will resolve to the list of the collections\n .finally(() => client.close());\n });\n};\n\n mu.insert= (dbNam, collect,query)=>{\n const url = `mongodb+srv://daniella:[email protected]/test?retryWrites=true&w=majority`;\n const client = new MongoClient(url, { useUnifiedTopology: true }); // useUnifiedTopology removes a warning\n \n client.connect()\n .then(\n client =>{\n return client\n .db(dbNam)\n .collection(collect)\n .insertOne({name: query})\n .finally(() => client.close());\n }); \n\n};\n\n\nmu.deleteinfo= (dbName, colName, info) =>{\nconst url = `mongodb+srv://daniella:[email protected]/test?retryWrites=true&w=majority`;\nconst client = new MongoClient(url, { useUnifiedTopology: true }); // useUnifiedTopology removes a warning\nclient.connect().then(client => {\n client.db(dbName).collection(colName).deleteOne({ name: info }).finally(() => client.close());\n});\n};\n\nmu.updateinfo = (dbName, collectionName, named, newname) =>{\nconst url = `mongodb+srv://daniella:[email protected]/test?retryWrites=true&w=majority`;\nconst client = new MongoClient(url, { useUnifiedTopology: true }); // useUnifiedTopology removes a warning\nclient.connect().then(client => {\n client.db(dbName).collection(collectionName)\n .updateOne({ name: named }, { $set: { name: newname } })\n .finally(() => client.close());\n});\n};\n\n\n\nmu.update= (dbNam, collect,query)=>{\n const url = `mongodb+srv://daniella:[email protected]/test?retryWrites=true&w=majority`;\n const client = new MongoClient(url, { useUnifiedTopology: true }); // useUnifiedTopology removes a warning\n \n client.connect()\n .then(\n client =>{\n return client\n .db(dbNam)\n .collection(collect)\n .update(query)\n .finally(() => client.close());\n }); \n\n};\n\n\n\nmu.delete= (dbNam, collect,query)=>{\n const url = `mongodb+srv://daniella:[email protected]/test?retryWrites=true&w=majority`;\n const client = new MongoClient(url, { useUnifiedTopology: true }); // useUnifiedTopology removes a warning\n \n client.connect()\n .then(\n client =>{\n return client\n .db(dbNam)\n .collection(collect)\n .deleteOne(query)\n .finally(() => client.close());\n }); \n\n};\n return mu;\n}", "title": "" }, { "docid": "a2b8458b354f7267a8b510d7be8e4008", "score": "0.6422411", "text": "async function loadLessonsCollection() {\n const client = await mongodb.MongoClient.connect('mongodb+srv://dbAdmin:[email protected]/<Coursework2>?retryWrites=true&w=majority', {\n useUnifiedTopology: true\n });\n\n // returns connected collection from db\n return client.db('Coursework2').collection('Lessons');\n}", "title": "" }, { "docid": "27754eaa1d5f549ec505891500f2e678", "score": "0.63979053", "text": "function conn (callback) {\n MongoClient.connect(CONN_DB_STR, (err, db) => {\n if (err) {\n console.log(err);\n callback(err, null);\n } else {\n callback(null, db);\n }\n })\n}", "title": "" }, { "docid": "af37b90743faf6ec17a3467a4f4350ed", "score": "0.63653684", "text": "static get connection() {\n let username = process.env.MONGODB_USERNAME;\n let password = process.env.MONGODB_PASSWORD;\n let url = process.env.MONGODB_URL;\n let port = process.env.MONGODB_PORT;\n let db = process.env.MONGODB_DATABASE;\n return 'mongodb://' + username + ':' + password + '@' + url + ':' + port + '/' + db;\n }", "title": "" }, { "docid": "062918a481f9cbf26090ccb1206ec155", "score": "0.6365331", "text": "function connectionDB(run_server){\n MongoClient.connect(url, function(err, db) {\n if(err) throw err;\n console.log(\"Connected successfully to server\");\n obj=db;\n run_server();\n });\n}", "title": "" }, { "docid": "7603e191981540ef9386d9044512e23e", "score": "0.6358318", "text": "async connectToDatabases() {\n\t\tawait Promise.all([\n\t\t\tmongoDb({\n\t\t\t\tdbUri: process.env.MQ_MONGODB_URL,\n\t\t\t\tdbName: process.env.MQ_MONGODB_NAME\n\t\t\t})\n\t\t]);\n\t}", "title": "" } ]
583d92eeb44956b3c71e19f23078a2a6
Untuk validasi input email
[ { "docid": "da0b72004d7098e35c42d3ee9b547339", "score": "0.0", "text": "function isEmail(isi) {\n\tvar myExp = /^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$/\n\treturn myExp.test(isi)\n}", "title": "" } ]
[ { "docid": "cb3be0cf2e6514b60a865e3d84bc5022", "score": "0.7176512", "text": "function verificationInputEmail(alerteElement, input) {\n let condition = !emailRegExp.test(input.value);\n alertInput(condition, alerteElement, input, verificationMessages.inputEmail);\n}", "title": "" }, { "docid": "dde7679739c53ac0727902be9dbe5f65", "score": "0.7131335", "text": "function confereEmail (input){ \n if (input.value != document.getElementById('email').value) {\n input.setCustomValidity('Email não correspondente');\n } else {\n input.setCustomValidity('');\n }\n}", "title": "" }, { "docid": "31747856305efd1b48504ba1465a3072", "score": "0.7124734", "text": "function validateEmail(){\n\tvar re = /^([\\w-]+(?:\\.[\\w-]+)*)@((?:[\\w-]+\\.)*\\w[\\w-]{0,66})\\.([a-z]{2,6}(?:\\.[a-z]{2})?)$/i;\n var result = re.test($.txtfieldMail.value);\n if(result == 0){\n \t$.txtfieldMail.value = \"\";\n \tutilities.showAlert(Alloy.Globals.selectedLanguage.forgotUsername,Alloy.Globals.selectedLanguage.invalidmail,function(){});\n }\n}", "title": "" }, { "docid": "014a40ebbe4fff037697ca058d09fe5d", "score": "0.70780915", "text": "function validarEmail(){\n\tif(expresiones.email.test(email.value)){\n\t\tcampos['email'] = true;\n\t\tdocument.getElementById('email_error').style.visibility = \"hidden\";\n\t}else{\n\t\tcampos['email'] = false;\n\t\tdocument.getElementById('email_error').style.visibility = \"visible\";\n\t\tdocument.getElementById('email_error').style.color = \"red\";\n\t}\n}", "title": "" }, { "docid": "78401d0d164e71a8d8046c97e916d635", "score": "0.70449257", "text": "function validateMail() {\n\tvalue = document.getElementById(\"emailInput\").value;\n\t//El correo electronico debe respetar el formato tipico de los correos (la @) y terminar en .com\n\tregex=/^.+@{1}.+(.com)$/;\n\n\tif (value.match(regex)) {\n\t\tlabels[2].innerHTML = \"Correo electronico\";\n\t\tgoodLabel(2);\n\t\tclient.mail = value;\n\t} else {\n\t\tlabels[2].innerHTML = \"Formato del correo electronico incorrecto\";\n\t\tbadLabel(2);\n\t}\n}", "title": "" }, { "docid": "3a39acae606e6ba030e3288a8f839bad", "score": "0.70445704", "text": "function validateEmailField(){\n const emailField = document.querySelector('#mail');\n const email = emailField.value;\n const emailLabel = document.querySelector(\"label[for='mail']\");\n\n\n return validateInputWithLabelAndField(emailField, email, emailLabel,!email.match(/[a-z0-9._-]+@[a-z]+.com/)\n , 'Email:', 'Must be a valid email address');\n }", "title": "" }, { "docid": "9d02107e3a1145d147b73566180acbb8", "score": "0.7043948", "text": "clickChEmail() {\n\t\tlet newEmail = this.refs.email.value;\n\n\t\tif(newEmail.indexOf('@') <= 0) {\n\t\t\talert('Input valid Email!')\n\t\t} else {\n\t\t\tMeteor.call('changeEmail', Meteor.userId(), newEmail);\n\t\t}\n\t\tthis.refs.email.value = '';\n\t}", "title": "" }, { "docid": "ee2f48139c8f2263897528484614816e", "score": "0.70302105", "text": "function v_mail(evento){\n var patron = /^([a-z]+[a-z1-9._-]*)@{1}([a-z1-9\\.]{2,})\\.([a-z]{2,3})$/;\n\tif(evento.target.value!=\"\"){ \n\t if(!patron.test(evento.target.value)){\n\t \talert('El correo no es valido (mail)');\n\t \tevento.target.value='';\n\t }\n\t}\n}", "title": "" }, { "docid": "7810e8afcdd40b71da678076ab51eba5", "score": "0.7022153", "text": "function validEmail() {\r\n\r\n inputEmail.onblur = () => testEmailBlur();\r\n \r\n testEmailFocus(); \r\n }", "title": "" }, { "docid": "d6e7ff69b06fc6e60289ee99c3f6d5fc", "score": "0.7020222", "text": "function test_email(){\r\n var add=new RegExp('@aueb.gr','i');\r\n if(add.test(email.value)==false){\r\n email.setCustomValidity('Not an aueb address');\r\n email.reportValidity();\r\n }else{\r\n email.setCustomValidity('');\r\n }\r\n}", "title": "" }, { "docid": "261e016cdcc59e5f2a853887fbafb0ce", "score": "0.7019491", "text": "function checkValidEmail(inputUserEmail){\n\n (regexEmail.test(inputUserEmail))? hideValidationError('mail','mailError') : showValidationError('mail','Please enter a valid email.','mailError');\n\n}", "title": "" }, { "docid": "79e97bd8ec65cc4153a5ac308ae2bc82", "score": "0.69824415", "text": "function checkEmail(input) {\n const re = /^(([^<>()\\[\\]\\\\.,;:\\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 if (re.test(input.value.trim())) {\n showSuccess(input);\n }\n else {\n showError(input, 'E-mail inválido');\n }\n}", "title": "" }, { "docid": "9878678bcd565c99b1dd3cdff1e93c61", "score": "0.69713134", "text": "function checkEmail (input) {\n if (input.value.length > 0){\n const re = /^(([^<>()[\\]\\\\.,;:\\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 if (re.test(String(input.value.trim()).toLowerCase())) {\n showSuccess(input);\n } else {\n showError(input,'Email is not valid');\n }\n }\n}", "title": "" }, { "docid": "de48aaa415bd2c537e2f67fab754c582", "score": "0.69672316", "text": "validateEmail(email){\r\n const emailRegX = /\\S+@\\S+\\.\\S+/i\r\n if(emailRegX.test(email)){\r\n this.cleanedData = email;\r\n return true;\r\n };\r\n this.error = \"invalid email\"\r\n //have to return true, because email can only be verified on submission, not onChange\r\n return true;\r\n }", "title": "" }, { "docid": "a3ea2c9d9e1fe283eb2d251c78082cd6", "score": "0.69491863", "text": "function checkEmail(input) {\n const re = /^(([^<>()[\\]\\\\.,;:\\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 if (re.test(input.value.trim())) {\n showSuccess(input);\n } else {\n showError(input, 'Este email no es válido');\n }\n}", "title": "" }, { "docid": "e2887a6a9ca49ad00af3d2e979bdecdf", "score": "0.69203156", "text": "function checkEmail(input) {\n const re = /^(([^<>()\\[\\]\\\\.,;:\\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 if (!re.test(input.value.trim())) {\n showError(input, ' Email is not valid')\n }\n else {\n showSuccess(input);\n }\n}", "title": "" }, { "docid": "3820a388b345c6f49a2c7e3f4a41e307", "score": "0.6914316", "text": "function checkEmail(input) {\n const re = /^(([^<>()\\[\\]\\\\.,;:\\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 if (re.test(input.value.trim())) {\n showSuccess(input);\n } else {\n showError(input, 'Email ist nicht korrekt');\n }\n}", "title": "" }, { "docid": "68d82a62b0e44d5d0163b4449c2312b1", "score": "0.68863404", "text": "function checkEmail(input) {\n const re = /^(([^<>()\\[\\]\\\\.,;:\\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 if(re.test(input.value.trim())) {\n showSuccess(input);\n } else {\n showError(input, 'Email is not valid')\n }\n}", "title": "" }, { "docid": "ed5ba47df0ac8c16b1f20b90812bf410", "score": "0.68792206", "text": "function removesOrAddsAlertWhileTypingEmail() {\n let thestringemail = youremail.value;\n if (thestringemail.indexOf('@') === -1 || thestringemail.indexOf('.com') === -1) {\n emailValMesg.textContent = \"Please enter Email and format correctly\";\n youremail.before(emailValMesg);\n youremail.style.border = 'none'\n // changeElemDisplay(button, 'none')\n }\n else if (thestringemail.indexOf('@') > thestringemail.indexOf('.com') || thestringemail.indexOf('.com') !== thestringemail.length - 4) {\n emailValMesg.textContent = \"Please enter Email and format correctly\";\n youremail.style.border = 'none';\n youremail.before(emailValMesg);\n // changeElemDisplay(button, 'none');\n } else if (thestringemail.includes('@') && thestringemail.includes('.com')) {\n youremail.style.border = '3px solid lightgreen';\n nameEmailActivitiesValidationBlock(emailValMesg); // validation block for other sections\n }\n}", "title": "" }, { "docid": "3a03cac2d1b7b608533d81f1fcdce8be", "score": "0.68744266", "text": "function checkEmail(input) {\n const re = /^(([^<>()[\\]\\\\.,;:\\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 if (re.test(input.value.trim())) {\n showSuccess(input);\n } else {\n showError(input, `${getInputId(input)}'s value is invalid`);\n }\n}", "title": "" }, { "docid": "4ccf466f78b40ca2d6db4e8995b96dbd", "score": "0.68675905", "text": "function emailValidate () {\n\tvar email = document.getElementById(\"email\");\n\n\t// Regex for validation inputed data\n\tvar email_check = /^([a-zA-Z0-9_\\.\\-])+\\@(([a-zA-Z0-9\\-])+\\.)+([a-zA-Z0-9]{2,4})+$/;\n\t\n\t// check for valid email using filter\n\tif (!email_check.test(email.value)) {\n\t\tdocument.getElementById(\"emailMsg\").innerHTML = \"Будь ласка, введіть реальну емейл-адресу.\";\n\t} else {\n\t\tdocument.getElementById(\"emailMsg\").innerHTML = \" \";\n\t}\n\n}", "title": "" }, { "docid": "e2aa4d1666aa9eed9d5ee6ebe118c150", "score": "0.68572366", "text": "function emailcheck(e){\n if(e.value != '')\n e.setCustomValidity(\"Enter a valid email.\");\n else\n e.setCustomValidity('Please fill out this field.'); \n}", "title": "" }, { "docid": "28fcd290776579d41c3ccd4cd82f7984", "score": "0.68369424", "text": "function checkEmail(input) {\n const re = /^(([^<>()\\[\\]\\\\.,;:\\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 if (!re.test(input.value)) {\n showError(input, \"Please insert a valid email\");\n } else {\n showSuccess(input);\n }\n }", "title": "" }, { "docid": "706f70a03f650c4f70d1e15a8495f58a", "score": "0.683664", "text": "function validaEmail() {\n // Se declara la variable y se le asigna el nodo donde se ejecuto el evento.\n // con la funcion \"indexOf\" le pasamos como parametro un caracter y verificará si existe en el campo, en el caso\n // que no exista nos devolvera como resultado \"-1\" y en el caso que exista devolvera \"0\".\n var errorDiv = document.querySelector('.seccion #error_email'); // Ejemplo: .seccion #error_nombre p \n var texto = document.querySelector('.seccion #error_email span:nth-child(2)');\n if (this.value != '') {\n if (this.value.indexOf('@') == -1) {\n //Insertamos el siguiente texto en el nodo antes de mostrarlo\n texto.innerText = 'El campo debe tener una \"@\"';\n errorDiv.style.display = 'block';\n } else {\n errorDiv.style.display = 'none';\n\n }\n }\n }", "title": "" }, { "docid": "312f5f4c1323035b6fda2cf47e9c7254", "score": "0.68322504", "text": "function checkEmail(input) {\n const re = /^(([^<>()\\[\\]\\\\.,;:\\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 if (re.test(input.value.trim())) {\n showSuccess(input);\n } else {\n showError(input, 'Email is not valid');\n }\n}", "title": "" }, { "docid": "e0117178840775e0ee5d639467334bb3", "score": "0.6830605", "text": "function checkEmail(input) {\n const re = /^(([^<>()[\\]\\\\.,;:\\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 if (re.test(input.value.trim())) {\n showSuccess(input)\n } else {\n showError(input, 'Email is not valid')\n }\n}", "title": "" }, { "docid": "8b1ff21b56d7c63f300e63d283d4ca0a", "score": "0.68276197", "text": "function isValidEmail(input) {\n const re = /^(([^<>()[\\]\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@(([^<>()[\\]\\.,;:\\s@\\\"]+\\.)+[^<>()[\\]\\.,;:\\s@\\\"]{2,})$/i;\n\n if (re.test(input.value.trim())) {\n showSuccess (input)\n } else {\n showError (input, \"Email is not valid\")\n\n }\n}", "title": "" }, { "docid": "d4b20cab131e9dba7e8ab68cbf82007d", "score": "0.6827415", "text": "function validEmail(emailInput = document.getElementById('email')) {\n let email = emailInput.value;\n var re = /^(([^<>()\\[\\]\\\\.,;:\\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 if (!re.test(String(email).toLowerCase())) {\n return false\n }\n\n //if user entered valid email, remove any potential errors, shown when user submitted\n emailInput.classList.remove('usa-input--error');\n document.getElementById('emailError').style.display = 'none';\n\n return true;\n}", "title": "" }, { "docid": "2e0b74f2a3cdd21488a8727855f9b7c6", "score": "0.68119884", "text": "function checkEmail(input) {\r\n const re = /^(([^<>()\\[\\]\\\\.,;:\\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,}))$/;\r\n if (re.test(input.value.trim())) {\r\n showSuccess(input);\r\n } else {\r\n showError(input, 'Email is not valid');\r\n }\r\n}", "title": "" }, { "docid": "c91cb2ef3bc3054dfd8beb496c9fa306", "score": "0.6810912", "text": "function checkEmail(input){\n const re = /^(([^<>()\\[\\]\\\\.,;:\\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 if(re.test(input.value.trim())){\n showSuccess(input);\n }else{\n showError(input, 'Email is not valid');\n }\n}", "title": "" }, { "docid": "5a45108f047742c98312564b2e86b7b5", "score": "0.6809966", "text": "function checkEmail(input){\r\n \r\n const re = /^(([^<>()\\[\\]\\\\.,;:\\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,}))$/;\r\n \r\n if(re.test(input.value.trim())){\r\n showSuccess(input);\r\n }\r\n else {\r\n showError(input, 'Email is not valid');\r\n }\r\n }", "title": "" }, { "docid": "8da7cb5936ef6901a5c01c54fe7a68c7", "score": "0.6808008", "text": "function checkEmail(input){\r\n const regex = /^(([^<>()[\\]\\\\.,;:\\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,}))$/;\r\n if(regex.test(input.value)){\r\n showSuccess(input);\r\n }else{\r\n showError(input,'Email is not valid');\r\n }\r\n}", "title": "" }, { "docid": "3980d814c65c73cdc5a676ba1e71ddd6", "score": "0.68002206", "text": "function checkEmail(input) {\n const re = /^(([^<>()\\[\\]\\\\.,;:\\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 if (re.test(input.value.trim())) {\n console.log(\"yes\");\n //showSuccess(input);\n } else {\n console.log(\"error\");\n //showError(input, \"Email, is not valid\");\n }\n}", "title": "" }, { "docid": "1dfd4d6cc8036a2a1b5c92eab83330fe", "score": "0.67899626", "text": "function caracteresCorreoValido(){\n var errorcorreo=document.getElementById(\"paccorreo-error\");\n var texto=document.getElementById(\"paccorreo\").value;\n \n //var email = $(email).val();\n var regex = /^[-\\w.%+]{1,64}@(?:[A-Z0-9-]{1,63}\\.){1,125}[A-Z]{2,63}$/i;\n \n if (!regex.test(texto)) {\n document.getElementById(\"paccorreo-error\").innerHTML = \"Correo invalido\";\n } else {\n document.getElementById(\"paccorreo-error\").innerHTML = \"\";\n }\n \n}", "title": "" }, { "docid": "1bc7ae2659799eb500eb9823cfbe9f1b", "score": "0.6786667", "text": "function checkEmailAddress() {\n var parttern = new RegExp(/^\\b[A-Z0-9._%-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}\\b$/i);\n if (parttern.test($('#email').val())) {\n $('#emailtext').text('');\n }\n else {\n $('#emailtext').text('Email Address Is Invalid');\n }\n }", "title": "" }, { "docid": "e0e949466d5c486a13129e3eb2ec60e4", "score": "0.67791706", "text": "function ValidateEmail(campo) {\r\n\tvar mailformat = /^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,3})+$/;\r\n\tif(!campo.match(mailformat)) {\r\n\t\tdocument.getElementById('erroridatipers').innerHTML = \"Il campo EMAIL non &egrave; valido.\";\r\n\t\tdocument.getElementById('email').focus();\r\n\t\treturn false;\r\n\t}\r\n\treturn true;\r\n}", "title": "" }, { "docid": "7304f5c170cbfe26e921a62a64499dc1", "score": "0.6778596", "text": "function checkValidEmail(input){\n const re = /^(([^<>()[\\]\\\\.,;:\\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 if(re.test(input.value.trim())){\n showSuccess(input);\n }\n else {\n showError(input,`please provide a valid email`);\n }\n}", "title": "" }, { "docid": "971444ad950f4f1e58094c25e1a58d2a", "score": "0.6772131", "text": "emailAddress (email) {\n // Make sure the user enters something.\n if (!email || typeof email !== 'string') {\n return 'Please enter an email address.';\n }\n\n // And make sure that something is a valid email address ('[email protected]').\n else if (!regex.emails.test(email)) {\n return 'Please enter a valid email address.';\n }\n\n // Good.\n return '';\n }", "title": "" }, { "docid": "95b0b48c8807bb4ff901fc5b62af564a", "score": "0.6771508", "text": "function checkEmail(input) {\n\tconst re = /^(([^<>()\\[\\]\\\\.,;:\\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\tif (re.test(input.value.trim())) {\n\t\tshowSuccess(input);\n\t} else {\n\t\tshowError(input, 'Email is not valid');\n\t}\n\t//return;\n}", "title": "" }, { "docid": "c01e1942d4fb570deb1678a8fecef59c", "score": "0.6766692", "text": "function validateEmail(){\n var email = document.getElementById(\"email\");\n var regexmail = /^\\w+@[a-zA-Z_]+?\\.[a-zA-Z]{2,3}$/;\n if(regexmail.test(email.value)==false ){ \n alert(\"Enter a valid email id..!\");\n email.value=\"\";\n email.focus();\n return false;\n }\n}", "title": "" }, { "docid": "a42090fc85a5649db7f2fd8b7ae89d02", "score": "0.6755644", "text": "function checkEmail(input) {\n const regex = /^(([^<>()\\[\\]\\\\.,;:\\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 if(regex.test(input.value.trim())){\n showSuccess(input);\n }\n else {\n showError(input,`${getFieldName(input)} is not valid!`);\n }\n }", "title": "" }, { "docid": "4132312d34d3c9e69ab225d14ab8defa", "score": "0.6740359", "text": "function email(){\n\n\tvar patron = /^[0-9a-z_\\-\\.]+@([a-z0-9\\-]+\\.?)*[a-z0-9]+\\.([a-z]{2,4})$/;\n\t// ponemos el patron para detectar si esta vaio o si cumple la regla dada\n\tif (!patron.test(document.getElementById(\"email\").value)){//comprobamos el email si es falso\n\t\talert(\"email no válido.\");\n\t\t// mostramos el error\n\t\tdocument.getElementById(\"email\").focus();//ponemos el foco en el email\n\t\treturn false;//y paramos el formulario\n\t}\n\t// si todo fue bien continuamos mandando el formulario\t\n\treturn true;\n}", "title": "" }, { "docid": "eec70ab6820d334141e7cb2c0e024186", "score": "0.6728749", "text": "function _email(element) {\r\n var status = true;\r\n var email = element.attr('value');\r\n var filter = /^([a-zA-Z0-9_\\.\\-])+\\@(([a-zA-Z0-9\\-])+\\.)+([a-zA-Z0-9]{2,4})+$/;\r\n if (!filter.test(email)) {\r\n status = false;\r\n }\r\n if(!status){\r\n isError = true;\r\n promptText = promptText + '必须是一个有效的电子邮件地址';\r\n }\r\n }", "title": "" }, { "docid": "7f9cc6c0919fb2e07fd1ce7864434e71", "score": "0.67240644", "text": "function verifEmail(id) {\n var error = $(\"span.error-\" + id);\n var champ = $(\"input#\" + id);\n var checkEmail = champ.val();\n\n var testEmail = /.+@.+\\..+/;\n\n if (champ.val().length == 0) {\n error.html(\"Veuillez remplir le champ\");\n } else if (!testEmail.test(checkEmail)) {\n error.html(\"Email non valide\");\n } else {\n error.html('<i class=\"fas fa-check\" style=\"color: #51cf66;\"></i>');\n }\n}", "title": "" }, { "docid": "3d0e773b6ca43870f1cdd44dc943469e", "score": "0.6719748", "text": "function checkEmail(input) {\n const re = /^(([^<>()[\\]\\\\.,;:\\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 if(re.test(input.value.trim())) {\n showSuccess(input);\n } else {\n showError(input);\n }\n}", "title": "" }, { "docid": "c1145c99717cda35f184c7d3c0b5f7a6", "score": "0.67166793", "text": "function checkEmail(input) {\n const re = /^(([^<>()\\[\\]\\\\.,;:\\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 if (re.test(input.value.trim())) {\n showSuccess(input);\n } else {\n showError(input, \"Email is not valid\");\n }\n}", "title": "" }, { "docid": "5c4b25f7f01f9bf9b6be173f77cd2c03", "score": "0.67058295", "text": "function errorEmail() {\r\n var idEmail = document.getElementById('yourmail');\r\n var regExp = /^[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,4}$/;\r\n var email = document.getElementById('yourmail').value;\r\n if (regExp.test(email) == true) {\r\n idEmail.setCustomValidity(\"\");\r\n } else {\r\n idEmail.setCustomValidity('nhap sai email. Mail phai co \"@\", \".com\"');\r\n }\r\n return true;\r\n}", "title": "" }, { "docid": "7e44af0a31c11771ffe79f30c4d62cc1", "score": "0.67043424", "text": "function checkEmail(input) {\n const re = /^(([^<>()\\[\\]\\\\.,;:\\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 if (re.test(input.value.trim())) {\n showSuccess(input);\n checks.checkEmail = true;\n } else {\n showError(input, 'Email is not valid');\n }\n}", "title": "" }, { "docid": "ca94a4c10a450b85bbe8e2709590d3cf", "score": "0.66977", "text": "function checkEmail() {\r\n var email = elE.value;\r\n let elMsg = document.getElementById('email-msg');\r\n console.log(\"Var email \" + email);\r\n if (email.length < 4 || !email.includes(\"@\")) {\r\n document.className = 'warning';\r\n elMsg.textContent = '...and your email silly';\r\n } else {elMsg.textContent = '';}\r\n }", "title": "" }, { "docid": "f69a00b0b6e293acd269b7f9709572df", "score": "0.66952163", "text": "function checkEmail(input) {\n const re = /^(([^<>()\\[\\]\\\\.,;:\\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 if (re.test(input.value.trim())) {\n showSuccess(input);\n } else {\n showError(input, 'Email is not valid');\n }\n}", "title": "" }, { "docid": "f69a00b0b6e293acd269b7f9709572df", "score": "0.66952163", "text": "function checkEmail(input) {\n const re = /^(([^<>()\\[\\]\\\\.,;:\\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 if (re.test(input.value.trim())) {\n showSuccess(input);\n } else {\n showError(input, 'Email is not valid');\n }\n}", "title": "" }, { "docid": "f69a00b0b6e293acd269b7f9709572df", "score": "0.66952163", "text": "function checkEmail(input) {\n const re = /^(([^<>()\\[\\]\\\\.,;:\\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 if (re.test(input.value.trim())) {\n showSuccess(input);\n } else {\n showError(input, 'Email is not valid');\n }\n}", "title": "" }, { "docid": "449348a82aae95df4af356f233de5dfb", "score": "0.66907007", "text": "function verifEmail() {\n let div_email = document.querySelector('#js-email')\n let email = div_email.querySelector('.js-input-email')\n let tooltipStyleEmail = getTooltip(div_email).style;\n var regex = /^[a-zA-Z0-9._-]+@[a-z0-9._-]{2,}\\.[a-z]{2,4}$/;\n if(!regex.test(email.value)) {\n email.style.border = \"1px solid #cd5353\";\n tooltipStyleEmail.display = \"block\";\n return false;\n } else {\n email.classList.add('valid');\n email.style.border = \"\";\n tooltipStyleEmail.display = \"none\";\n return true;\n }\n}", "title": "" }, { "docid": "e8bbd9581d836a1955f99ad5200ab9a2", "score": "0.6690074", "text": "function checkEmail(input) {\n const re = /^(([^<>()\\[\\]\\\\.,;:\\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 if (re.test(input.value.trim())) {\n showSuccess(input)\n } else {\n showError(input, 'Email is not valid');\n }\n}", "title": "" }, { "docid": "47b74a8d18e78c21c6d97fd75f5a875b", "score": "0.66816235", "text": "function test_mail(mail_test,vitri) {\t \n var dangmail = /^[\\w.-]+@[\\w.-]+\\.[A-Za-z]{2,4}$/; \n mail_test.focusout(function(){\n var email = mail_test.val(); \n var ktMail = dangmail.test(email);\n if ((!ktMail) && (email.length >=1)) {\n message('warning','Phải nhập đúng định dạng mail hoặc bỏ trống',vitri); \n mail_test.focus();\n return false;\n }else {\n vitri.find(\"div.alert\").addClass('flipOutX').removeClass('flipInX').fadeOut('5000');\n vitri.children().remove();\n } \n });\n}", "title": "" }, { "docid": "deb8a9f666298bf13686d6a1802fa888", "score": "0.66776913", "text": "static validateEmail(value){\n value = value.toLowerCase();\n const re = /^[a-z0-9](?!.*?[^\\na-z0-9]{2})[^\\s@]+@[^\\s@]+\\.[^\\s@]+[a-z0-9]$/;\n if(!re.test(value)){\n return Resources.ValidateError.Email;\n }\n }", "title": "" }, { "docid": "0dd1803222e5fea366f88b4ad9c8a4da", "score": "0.6671739", "text": "function verifyEmail(field) {\r\n\r\n var email = (Trim(field.value));\r\n if (!(/^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,3})+$/.test(email))) {\r\n alert(\"Email invalido. Por favor, verifique!\");\r\n }\t\t\r\n}", "title": "" }, { "docid": "791852daf5255ce768a045d34b006d40", "score": "0.6661431", "text": "function validemail(){\n var email = document.getElementById('email').value;\n var er = document.getElementById('erreur2');\n if (email.match(/^[A-Za-z\\._\\-[0-9]*[@][A-Za-z]*[\\.][a-z]{2,4}$/)){\n text = \"email est valide\";\n er.innerHTML = text;\n er.style.color = \"green\";\n return true;\n }else{\n text = \"email est invalide\";\n er.innerHTML = text;\n er.style.color = \"red\";\n return false;\n \n }\n\n}", "title": "" }, { "docid": "7326e2231010fdc5c5c43bc6d1ccac41", "score": "0.6645875", "text": "function ValidateMail()\n{\n\tvar mail=document.getElementById('email').value;\n\tvar atpos=mail.indexOf(\"@\");\n\tvar dotpos=mail.lastIndexOf(\".\");\n\tif(mail==\"\")\n\t{\n\t\tdocument.getElementById('errormail').innerHTML=\"Enter Email-id\";\n\t\treturn false;\n\t}\n\telse if(atpos<1 || dotpos<atpos+2 || dotpos+2>=mail.length)\n\t{\n\t\tdocument.getElementById('errormail').innerHTML=\"Not a valid e-mail address\";\n\t\treturn false;\n\t}\n\telse\n\t\tdocument.getElementById('errormail').innerHTML=\"\";\n}", "title": "" }, { "docid": "45d6cec1d0517d2d9f5781bbc4411208", "score": "0.66342384", "text": "function comprobarEmail(campo) {\r\n /*comprobacion permite validar que la estructura del email es correcta*/\r\n var comprobacion = /^[-\\w.%+]{1,64}@(?:[A-Z0-9-]{1,63}\\.){1,125}[A-Z]{2,63}$/i;\r\n /*si no cumple el formato correcto salta la alerta*/\r\n if (comprobacion.test(campo.value) == false) {\r\n /*Para controlar bucle infinito del onblur*/\r\n if (!avisado) {\r\n alert(i18nMessages['El atributo no sigue el formato correcto. Pruebe [email protected]']);\r\n avisado = true;\r\n setTimeout('avisado=false', 50);\r\n campo.focus();\r\n return false;\r\n }\r\n }\r\n return true;\r\n}", "title": "" }, { "docid": "b6c8885b1f16ddebe11945ade2852e88", "score": "0.6634116", "text": "function validateEmail() {\r\n\tvar email = $(\"input#email\").attr(\"value\");\r\n\tvar re = /^\\w+([\\.-]?\\w+)*@(((([a-z0-9]{2,})|([a-z0-9][-][a-z0-9]+))[\\.][a-z0-9])|([a-z0-9]+[-]?))+[a-z0-9]+\\.([a-z]{2}|(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum|mobi|travel))$/i;\r\n\tif(re.test(email)) $(\"input#email\").removeClass(\"invalid\");\r\n \telse $(\"input#email\").addClass(\"invalid\");\r\n}", "title": "" }, { "docid": "28cd170feb1ff28b6f75e82ab536fc18", "score": "0.6617937", "text": "function validarEmail( email ) {\r\n \r\n \r\n expr = /^([a-zA-Z0-9_\\.\\-])+\\@(([a-zA-Z0-9\\-])+\\.)+([a-zA-Z0-9]{2,4})+$/;\r\n if(email==\"\" || email==\"Email (con @extension. )\"){\r\n\t\tdocument.getElementById('email').style=\"border-color:#F00\";\r\n\t\talert(\"Tiene que tener una direccion de E-mail\");\r\n\t\treturn false;\r\n\t\t}\r\n\t \r\n\t\r\n\tif ( !expr.test(email) ){\r\n\t\tdocument.getElementById('email').style=\"border-color:#F00\";\r\n alert(\"Error: La dirección de correo es incorrecta.\");\r\n\t\t\r\n\t return false;\r\n\t}\r\n\r\n\r\n}", "title": "" }, { "docid": "4f206ea937bf2a135f06ab27df56427f", "score": "0.66173327", "text": "function checkEmail(input) {\n const re = /^(([^<>()\\[\\]\\\\.,;:\\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 if (re.test(String(input.value.trim()).toLowerCase())) {\n showSussessMsg(input);\n } else {\n showErrorMsg(input, \"Email is not valid!\");\n }\n}", "title": "" }, { "docid": "3ffa97a0dcd5fe070757a93721de4130", "score": "0.661556", "text": "function validateEmail() {\n if (!validEmailRegEx.test($('#mail').val()) && $('.emailError').length === 0) {\n $('#mail').after($(emailInputError));\n return false;\n }\n if (!(validEmailRegEx.test($('#mail').val()))) {\n return false;\n }\n if ($('#mail').val().length > 0 && $('.emailError').length > 0) {\n $('.emailError').remove();\n return true;\n }\n return true;\n}", "title": "" }, { "docid": "bf9083bb2fd959c3087ddd8d28d9a516", "score": "0.6601372", "text": "function esMail(elemento,idERROR) \n{\n\tvalor = elemento.value;\n\tif(!(/\\S+@\\S+\\.\\S+/.test(valor))) \n\t{\n\t\tdocument.getElementById(idERROR).style.display = 'inline';\n\t\tdocument.getElementById('validForm').disabled = true;\n\t\tif (document.getElementById('validForm').value.indexOf(elemento.name)==-1)\n\t\t\tdocument.getElementById('validForm').value += elemento.name;\n\t}\n\telse\n\t{\n\t\tdocument.getElementById(idERROR).style.display = 'none';\n\t\tdocument.getElementById('validForm').value = document.getElementById('validForm').value.replace(elemento.name,\"\");\n\t\tif (document.getElementById('validForm').value == \"\")\n\t\t\tdocument.getElementById('validForm').disabled = false;\n\t}\n}", "title": "" }, { "docid": "b8b3b1be8232006c8385a0afe77ccb49", "score": "0.6600088", "text": "function checkEmail(input) {\r\n const re = /^(([^<>()[\\]\\\\.,;:\\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,}))$/; \r\n // re.test will check if the input and re are similar or not\r\n if (re.test(input.value)) {\r\n showSuccess(input)\r\n }\r\n else {\r\n showEror(input,\"Email is not valid\")\r\n }\r\n}", "title": "" }, { "docid": "ac6d412ca13233e5e46b2b3a3943c55e", "score": "0.6596754", "text": "function validateEmail(){\n\tconst isEmail = (text) =>{\n\t\treturn /^.+@.+$/.test(text);\n\t}\n\n\tconst emailForm = document.querySelector(\"#email-form\");\n\temailForm.addEventListener(\"submit\", (e)=>{\n\t\te.preventDefault();\n\t\tconst email = document.querySelector(\"#email\").value;\n\t\talert((isEmail(email) ? \"Registrado\" : \"E-mail Invalido!\"));\n\t});\n}", "title": "" }, { "docid": "d4057eb31bdaeb1d3b19d4f8d67697d3", "score": "0.6585923", "text": "function validarCorreo() {\nvar email = document.getElementById('mail');\nvar filter = /^([a-zA-Z0-9_\\.\\-])+\\@(([a-zA-Z0-9\\-])+\\.)+([a-zA-Z0-9]{2,4})+$/;\n\nif (!filter.test(email.value)) {\n\temail.focus;\n\treturn false;\n}\n}", "title": "" }, { "docid": "14d91b51d88860c219d46babda2d5ee5", "score": "0.65795875", "text": "function checkEmail(input) {\n const re =\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 if (re.test(input.value.trim())) {\n showSuccess(input);\n } else {\n showError(input, `${getFieldId(input)} is Invalid`);\n }\n}", "title": "" }, { "docid": "757a8ff9dcde8554404155bae9d4f93c", "score": "0.6577056", "text": "function emailValidation(field){\n field.focusout(function() {\n if (!/^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,3})+$/.test(field.val())) {\n field.addClass('border border-danger');\n var helpField = field.next();\n helpField.text('You have entered an invalid email address!').addClass('text-danger');\n }\n });\n }", "title": "" }, { "docid": "67518778d0f0a911c59fb5071ee80f9b", "score": "0.6572808", "text": "function emailIsValid(input) {\n const re = /^(([^<>()\\[\\]\\\\.,;:\\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 if(re.test(input.value.trim())) {\n showSuccess(input);\n } else {\n showError(input, 'Not a valid Email');\n }\n}", "title": "" }, { "docid": "5ddfc649c500edb01cf40f39cc4c41a3", "score": "0.65682757", "text": "validate(value){\n if(!validator.isEmail(value))\n throw new Error(\"email is not valid\");\n }", "title": "" }, { "docid": "5a0da67323749643093145e5a1658d9f", "score": "0.6567254", "text": "function emailIsValid(input) {\n if (input.value.match(/^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$/)) {\n input.classList.remove(\"invalid\");\n input.classList.add(\"valid\");\n return true;\n } else {\n input.classList.remove(\"valid\");\n input.classList.add(\"invalid\");\n return false;\n }\n}", "title": "" }, { "docid": "1f3bffc7c506e5c072f77d9b71497c72", "score": "0.6563667", "text": "validate(value){\n if(!validator.isEmail(value)){//using validator pkg from npm\n throw new Error(\"Email is not valid\")\n }\n }", "title": "" }, { "docid": "c2cdebb18e1bd30eccb5427c5c1a6eb3", "score": "0.65597004", "text": "function emailTest(input) {\n return !/^[-a-zA-Z0-9!#$%&'*+/=?^_`{|}~]+(?:\\.[-a-z0-9!#$%&'*+/=?^_`{|}~]+)*@(?:[a-z0-9]([-a-z0-9]{0,61}[a-z0-9])?\\.)*(?:aero|arpa|asia|biz|cat|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|name|net|org|pro|tel|travel|[a-z][a-z])$/.test(input.value);\n } // return !/^((([0-9A-Za-z]{1}[-0-9A-z\\.]{1,}[0-9A-Za-z]{1})|([0-9А-Яа-я]{1}[-0-9А-я\\.]{1,}[0-9А-Яа-я]{1}))@([-0-9A-Za-z]{1,}\\.){1,2}[-A-Za-z]{2,})$/.test(input.value);", "title": "" }, { "docid": "11a4d0c659464fedd875e8ac63f4018c", "score": "0.65521014", "text": "function check_email(){\n var pattern = new RegExp(/([a-zA-Z0-9_\\-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})/i);\n \n if(pattern.test($('#email').val())){\n $(\"#email_error_msg\").hide();\n } else{\n $(\"#email_error_msg\").html(\"Please enter a valid email address !!\");\n $(\"#email_error_msg\").show();\n error_email = true;\n }\n }", "title": "" }, { "docid": "209d38b93e8d097353c5ac2bdc71bc65", "score": "0.6549709", "text": "function checkEmail(input){\n const re = /^(([^<>()[\\]\\\\.,;:\\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 // return re.test(String(email).toLowerCase());\n if(re.test(input.value.trim())){\n showSuccess(input);\n }else{\n showError(input, `Email is not valids`)\n }\n}", "title": "" }, { "docid": "f7fc0112f8f8d58711dd331b799ba0ff", "score": "0.6545541", "text": "function validacion(dire)\n{\nvar email = dire;\nvar verif = /^[A-Za-z][A-Za-z0-9_]*@[A-Za-z0-9_]+\\.[A-Za-z0-9_.]+[A-za-z]$/;\nif (verif.exec(email) == null)\n{\nalert(\"Su email es incorrecto\");\ndocument.usuarios.mail_usuarios.focus();\nreturn false;\n}\nelse\n{\n//alert(\"Su email es correcto\");\n\nreturn true;\n}\n\n}", "title": "" }, { "docid": "f7fc0112f8f8d58711dd331b799ba0ff", "score": "0.6545541", "text": "function validacion(dire)\n{\nvar email = dire;\nvar verif = /^[A-Za-z][A-Za-z0-9_]*@[A-Za-z0-9_]+\\.[A-Za-z0-9_.]+[A-za-z]$/;\nif (verif.exec(email) == null)\n{\nalert(\"Su email es incorrecto\");\ndocument.usuarios.mail_usuarios.focus();\nreturn false;\n}\nelse\n{\n//alert(\"Su email es correcto\");\n\nreturn true;\n}\n\n}", "title": "" }, { "docid": "8e0673c2d5a23623ec0dcb7113c409c5", "score": "0.65447485", "text": "function checkMail(e) {\n if (emailField.value.length == 0) {\n errorStyles(emailField)\n emailField.nextElementSibling.innerHTML = \"Pflichtfeld\"\n } else {\n emailField.previousElementSibling.style.color = \"white\"\n emailField.classList.remove(\"error\")\n formError.push(false)\n emailField.nextElementSibling.innerHTML = \"\"\n }\n}", "title": "" }, { "docid": "c4c10f9115c0238aac6e5b6c7b8b7aac", "score": "0.6542833", "text": "function submit(validEmail){\n\t\t\n\t}", "title": "" }, { "docid": "e9a7e66d3bd3b8303c7120c44435d22b", "score": "0.6539796", "text": "function checkUserEmail(){\n var userEmail = document.getElementById(\"email\").value;\n //var userEmailFormate = /^[a-zA-Z0-9+_.-]+@[a-zA-Z0-9.-]+$/;\n alert(\"Invalid Email \"+userEmail);\n}", "title": "" }, { "docid": "a0f0c330322d20a6c2bde20db436adad", "score": "0.653813", "text": "function forgotpvalidateemail(part){\t\n\n\tif($('#email').val() == '')\n\t {\n\t\t inlineMsg('email','<strong>Email required.</strong>',2);\n\t\t return false;\n\t }\n\t if(tagValidate($('#email').val()) == true){\n\t\t inlineMsg('email','<strong>Please dont use script tags.</strong>',2);\n\t\t return false; \n\t } \n\n \t\n return true; \n}", "title": "" }, { "docid": "1d02447051c5ecd2657d3895f424aa38", "score": "0.65380335", "text": "function isEmail(form, idInput, mail){\n\n\tvar email = document.forms[form].elements[mail].value;\n\t\n var exclude=/[^@\\-\\.\\w]|^[_@\\.\\-]|[\\._\\-]{2}|[@\\.]{2}|(@)[^@]*\\1/;\n var check=/@[\\w\\-]+\\./;\n var checkend=/\\.[a-zA-Z]{2,3}$/;\n if(((email.search(exclude) != -1)||(email.search(check)) == -1)||(email.search(checkend) == -1))\n {\n \tdocument.forms[form].elements[mail].focus();\n \tshowTip('tipInvalidEmail', idInput);\n return false;\n }\n else \n {\n \thideTip('tipInvalidEmail');\n return true;\n }\n}", "title": "" }, { "docid": "21ace56296bc19d462806e33833aa0e4", "score": "0.6534286", "text": "function checkEmail(input) {\n\tconst re = /^(([^<>()\\[\\]\\\\.,;:\\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\t// return re.test(String(email).toLowerCase());\n\tif (re.test(input.value.trim())) {\n\t\tshowSuccess(input);\n\t} else {\n\t\tshowError(input, 'Email is not valid');\n\t}\n}", "title": "" }, { "docid": "f212b7c4f0840b0509eae4c50df5b0f0", "score": "0.65323573", "text": "function emailCorrect(){\n var b = $(this).val();\n var ut,vt,wt,xt;\n if(/outlook|gmail|live|facebook|yahoo|ymail|rediff|fravashitech/g.test(b)){\t\n\t ut = b.replace(/([#~!`$%\\^&*\\-\\+=\\\\{\\}\\?\\/\\,(\\)[\\]\"|;:'<>@]+)/g,\"\");\n\t \tvt = ut.search(/outlook|gmail|live|facebook|yahoo|ymail|rediff|fravashitech/)\n wt = ut.slice(0,vt);\n\t\t\txt = ut.slice(vt,ut.length);\n\t\t\tyt = wt + \"@\" + xt;\n\t\t\t$(this).val(yt);\n\t\t\tif(yt != b){\n $(\".userval\").html(b);\n $(\"#msg-success\").show();\n }\t\t\t \n }\n\telse{\n\t $(this).val(\"\");\n\t $(\".userval\").html(b);\n\t $(\"#msg-error\").show();\n\t} \n }", "title": "" }, { "docid": "8a2cf4d74a6866251fdae85d6b4eb63f", "score": "0.65322876", "text": "function validarEmail(){\r\n const mensaje = campo.value;\r\n if(mensaje.indexOf('@') !== -1 ){\r\n campo.style.borderBottomColor = 'green';\r\n campo.classLista.remove('error'); \r\n }else{\r\n campo.style.borderBottomColor = 'red';\r\n campo.classLista.add('error');\r\n alert(' Verify you Email Address Please');\r\n \r\n }\r\n \r\n}", "title": "" }, { "docid": "c1897c07782cbd56ec7a8bd6f0a0dfef", "score": "0.6528614", "text": "function validateEmail(){\n const emailInput = document.getElementById('email');\n const reEmail = /^([a-zA-Z0-9_\\-\\.]+)@([a-zA-Z0-9_\\-\\.]+)\\.([a-zA-Z]{2,5})$/i;\n\n if(!reEmail.test(emailInput.value)){\n emailInput.classList.add('is-invalid');\n } else {\n emailInput.classList.remove('is-invalid');\n }\n}", "title": "" }, { "docid": "22926116f49da0e2ff328d5f0c3f8aff", "score": "0.65225935", "text": "function validateEmail() {\n return /[a-zA-Z][a-zA-Z0-9._-]+?[@][a-zA-Z]+[.][a-zA-Z]+/g.test(document.querySelector(\"#email\").value);\n}", "title": "" }, { "docid": "0d0510715cf5f7693b15bce6aecf9fe1", "score": "0.6520135", "text": "function validaMail(el) {\n let regex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)*$/;\n if (el.value === \"\") {\n errorMsg(el);\n return isInvalid(el);\n } else if (!regex.test(el.value)) {\n errorMsg(el, \"Has d'introduïr un email vàlid (ex: [email protected])\");\n return isInvalid(el);\n } else {\n if (action.login) {\n user = users.find(user => user.mail === el.value);\n // busca si l'usuari existeix\n if (user === undefined) {\n errorMsg(el, \"L'usuari no existeix!\");\n return isInvalid(el);\n }\n } else if (action.register) {\n // busca si l'usuari existeix\n if (users.find(user => user.mail === el.value) !== undefined) {\n errorMsg(el, \"L'usuari ja existeix!\");\n return isInvalid(el);\n } else {\n newUser.mail = el.value;\n }\n }\n return isValid(el);\n }\n}", "title": "" }, { "docid": "459f88c610fbf5b84212594178c66037", "score": "0.65172607", "text": "function emailAddress(){\n var elem = document.getElementById('emailAddress');\n if((elem.value!= elem.value.replace(/[^a-zA-Z@-.]+/,''))){\n alert(\"Enter Valid Email Address\");\n }\n}", "title": "" }, { "docid": "611b0999dfaed87167687029f439c57a", "score": "0.65152484", "text": "function verificaEmailFunc()\n\t{\n\t\tvar email = document.CadastroFuncionario.txtEmail.value; \n\t\tif ((email.length != 0) && ((email.indexOf(\"@\") < 1) || (email.indexOf('.') < 2)))\n\t\t {\n\t\t\t\tdocument.getElementById(\"msg\").innerHTML=\"E-mail incorreto!\";\n\t\t\t\tdocument.CadastroFuncionario.txtEmail.focus(); \n\t\t }\n\t\t else\n\t\t {\n\t\t\t\tdocument.getElementById(\"msg\").innerHTML=\"\";\n\t\t }\n\t}", "title": "" }, { "docid": "515b7825aa88ab814026bb3a1629c6a4", "score": "0.6514708", "text": "function validateEmail() {\n if (email.value.length < 1) {\n emailError.style.visibility = 'visible';\n emailError.innerHTML = \"<p>Enter a valid email! Email field cannot be empty</p>\";\n email.classList.add('wrong-input');\n email.classList.remove('valid-input');\n validEmail = false;\n\n } else if (!(re.test(email.value))) {\n emailError.style.visibility = 'visible';\n emailError.innerHTML = \"<p>Enter a valid email! Example [email protected] </p>\";\n email.classList.add('wrong-input');\n email.classList.remove('valid-input');\n validEmail = false;\n } else {\n emailError.style.visibility = 'hidden';\n email.classList.add('valid-input');\n validEmail = true;\n }\n validate()\n}", "title": "" }, { "docid": "962fc201459821e4576cee467320c93a", "score": "0.65027064", "text": "function ForceEmail(objField,displayFieldName)\r\n{\r\n // var strField = new String(objField.attr(\"value\"));\r\n var strField = new String(objField.val());\r\n \r\n\tif (!(isEmail(strField))) {\r\n //errorMessage = \"Invalid Email for\" + displayFieldName;\r\n errorMessage =\"Invalid Email\" ;\r\n DisplayError(objField,errorMessage)\r\n\t\tobjField.focus();\r\n\t\tobjField.select();\r\n\t\treturn false;\r\n\t}\r\n\t return true;\r\n\r\n}", "title": "" }, { "docid": "f49faeb82ba2aeec4a46fb0dc6de51dd", "score": "0.64866817", "text": "function emailValidator(control) {\n if (isEmptyInputValue(control.value)) {\n return null; // don't validate empty values to allow optional controls\n }\n return EMAIL_REGEXP.test(control.value) ? null : { 'email': true };\n}", "title": "" }, { "docid": "f49faeb82ba2aeec4a46fb0dc6de51dd", "score": "0.64866817", "text": "function emailValidator(control) {\n if (isEmptyInputValue(control.value)) {\n return null; // don't validate empty values to allow optional controls\n }\n return EMAIL_REGEXP.test(control.value) ? null : { 'email': true };\n}", "title": "" }, { "docid": "f49faeb82ba2aeec4a46fb0dc6de51dd", "score": "0.64866817", "text": "function emailValidator(control) {\n if (isEmptyInputValue(control.value)) {\n return null; // don't validate empty values to allow optional controls\n }\n return EMAIL_REGEXP.test(control.value) ? null : { 'email': true };\n}", "title": "" }, { "docid": "f49faeb82ba2aeec4a46fb0dc6de51dd", "score": "0.64866817", "text": "function emailValidator(control) {\n if (isEmptyInputValue(control.value)) {\n return null; // don't validate empty values to allow optional controls\n }\n return EMAIL_REGEXP.test(control.value) ? null : { 'email': true };\n}", "title": "" }, { "docid": "e9218ca66ae9c0fe11c124df3843673c", "score": "0.647322", "text": "function validation_mail(){\n var filter = /^([a-zA-Z0-9_\\.\\-])+\\@(([a-zA-Z0-9\\-])+\\.)+([a-zA-Z0-9]{2,4})+$/;\n if (!filter.test(inputMail.value)) {\n return false;\n }\n else{\n return true;\n }\n}", "title": "" }, { "docid": "8ba2aec523d157eba25cf3c57c2f4f3b", "score": "0.646744", "text": "function validateInput(){\r\n var email = document.getElementById(\"input-email\").value;\r\n var regex = new RegExp(/^(([^<>()\\[\\]\\\\.,;:\\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,}))$/);\r\n if (!email) setState(\"error\");\r\n else {\r\n var emailStatus = regex.test(String(email).toLowerCase());\r\n if (emailStatus) setState(\"success\");\r\n else setState(\"error\");\r\n }\r\n}", "title": "" }, { "docid": "f673c08bec0be5ac0eabb1bff15b5874", "score": "0.64671385", "text": "function validirajMainMail(){\n let email = $(\"#mail\").val();\n let mailprovera = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zAZ]{2,}))$/;\n\n if(!mailprovera.test(email)){\n $(\"#mail\").css({\n \"border\":\"0.2px solid red\"\n });\n $(\"#obavestenja_mail\").html(\"Email * (Invalid mail input)\");\n }\n else{\n $(\"#mail\").css({\n \"border\":\"none\"\n });\n $(\"#obavestenja_mail\").html(\"Email *\")\n alert(\"Message sent\");\n }\n}", "title": "" } ]
720eaab9a90084c7c21a85fa615ba863
Assign creeps an EntityCreep object
[ { "docid": "7c1d0fa67e7ffac520604f9e91fedf69", "score": "0.5757713", "text": "getCreepsAsEntities()\n {\n let creepEntities = [];\n \n let creepsInRoom = this.room.find(FIND_MY_CREEPS);\n \n for(let creepKey in creepsInRoom) {\n let creepEntity = new EntityCreep(creepsInRoom[creepKey]);\n creepEntities.push(creepEntity);\n }\n \n return creepEntities;\n }", "title": "" } ]
[ { "docid": "7c07556c251626bc08af1aea65bcf69f", "score": "0.5538679", "text": "relocate(creep) {\n if (creep.memory.city !== this.room.name) {\n creep.memory.city = this.room.name;\n this.citizens.push(creep);\n }\n }", "title": "" }, { "docid": "4b21376b1dbbf094e28077649880442c", "score": "0.5486059", "text": "init() {\n this.creepTypes.forEach((creepType) => creepType.creeps.length = 0);\n\n for (let name of Object.keys(Game.creeps)) {\n let creep = Game.creeps[name];\n let creepType = this.creepTypes.get(creep.memory.role);\n creepType.creeps.push(creepType.create(name, creep));\n }\n }", "title": "" }, { "docid": "444d00917a85adcfda1102707abc726d", "score": "0.54766065", "text": "function spawnCreeps(){\n\t//console.log(\"Spawning Creeps\");\n\ttempCreep = new Creep(wave,\"Basic\",imgSize*getRandomArbitrary(0,1),imgSize*getRandomArbitrary(spacing,spacing+1),modifierTestArray,airdragon);\n\ttempCreep.dir = 1;\n\ttempCreep.currentImg = getRandomInt(0,7);\n\tCreeps.push(tempCreep);\n\ttempCreep = new Creep(wave,\"Basic\",imgSize*getRandomArbitrary(GRID_WIDTH-2,GRID_WIDTH-1),imgSize*getRandomArbitrary(GRID_HEIGHT-(spacing*2+1),GRID_HEIGHT-(spacing*2)),modifierTestArray,airdragon);\n\ttempCreep.dir = 3;\n\ttempCreep.currentImg = getRandomInt(0,7);\n\tCreeps.push(tempCreep);\n\t\n\tCreeps.sort(function(a,b) { return parseFloat(a.locY) - parseFloat(b.locY) } );\n}", "title": "" }, { "docid": "e3dc40937e944e826ea1526edf3871aa", "score": "0.5263677", "text": "function Build(creep){\n const target = creep.pos.findClosestByRange(FIND_CONSTRUCTION_SITES);\n if(target) {\n if(creep.build(target) == ERR_NOT_IN_RANGE) {\n creep.moveTo(target);\n }\n }\n}", "title": "" }, { "docid": "20be86f23b21e6fae49648c5d2fc18b3", "score": "0.5124328", "text": "function create(){\n creepElement.x = creepSettings.x;\n creepElement.y = creepSettings.y;\n\n creepElement.speedX = creepSettings.speedX;\n creepElement.speedY = creepSettings.speedY;\n\n creepElement.size = creepSettings.size;\n creepElement.bodyColor = creepSettings.bodyColor;\n creepElement.hatColor = creepSettings.hatColor;\n\n creepElement.direction = creepSettings.direction;\n creepElement.health = creepSettings.health;\n creepElement.speedModifier = creepSettings.speedModifier;\n creepElement.reward = creepSettings.reward;\n creepElement.escaped = 0;\n }", "title": "" }, { "docid": "d14e5384f49f15c55a2d81ce0a3a76a4", "score": "0.49998924", "text": "assignJobs()\n {\n /**\n * First, check if there are any creeps at all!\n */\n if(!this.creepEntities.length) {\n return;\n }\n \n /**\n * Define the variable that will hold the next required job.\n */\n let nextJob = null;\n \n /**\n * Get unassigned job instructions\n * \n * These are jobs that have 0 assignees\n */\n const unassignedJobInstructions = Helper.findUnassignedJobs(this.room.name);\n \n /**\n * Check whether there are any unassigned jobs.\n * \n * If there are not any jobs, check for jobs that creeps\n * could help out on\n */\n if(unassignedJobInstructions.length) {\n \n /**\n * Set the next job to the very first unnassigned job instruction in the list\n */\n nextJob = unassignedJobInstructions[0];\n \n } else {\n \n /**\n * If no unassigned jobs were found, search for jobs that creeps\n * could help out on\n */\n const assistanceJobInstructions = Helper.findAssistanceJobs(this.room.name);\n \n if(assistanceJobInstructions.length) {\n \n nextJob = assistanceJobInstructions[0];\n }\n }\n \n /**\n * If by this point there are no appointable jobs, exit out of this\n * method\n */\n if(!nextJob) {\n return false;\n }\n \n const idealCreep = this.getMostIdealCreep(nextJob);\n \n if(idealCreep) {\n nextJob.assignees.push(idealCreep.creep.id);\n }\n }", "title": "" }, { "docid": "487701ccd7d87f8bb276eb01f0126dff", "score": "0.49704927", "text": "function set_state(creep, state, target) {\n creep.memory.state = state;\n creep.memory.state_data = target;\n}", "title": "" }, { "docid": "f4d5e0541a57596e6701554e47c4a7e2", "score": "0.49633637", "text": "init(creep) {\n creep.memory.action = 'go_remote_room';\n creep.memory.homeroom = creep.room.name;\n creep.memory.remoteMining = creep.memory.remoteMining || _.isString(creep.room.memory.remoteMining) ? creep.room.memory.remoteMining : creep.room.memory.remoteMining[0];\n if (!creep.memory.remoteRoom && creep.room.memory.remoteMining) {\n creep.memory.remoteRoom = _.isString(creep.room.memory.remoteMining) ? creep.room.memory.remoteMining : creep.room.memory.remoteMining[0];\n }\n\n }", "title": "" }, { "docid": "4398889982d08d9c25df92eb04518aa6", "score": "0.493325", "text": "static run(creep) {\n //If we're not on top of our claimed container, move to it\n var container = Game.getObjectById(creep.memory.container);\n\n if (container == null) {\n creep.memory.action = null;\n creep.memory.target = null;\n return;\n }\n\n if (!creep.pos.isEqualTo(container.pos)) {\n creep.moveTo(container.pos);\n }\n else {\n //If container is full, just chill\n if (_.sum(container.store) == container.storeCapacity) {\n return;\n }\n\n //Harvest from target source\n var source = Game.getObjectById(creep.memory.target);\n\n if (source == null) {\n creep.memory.action = null;\n creep.memory.target = null;\n }\n\n if (source.cooldown && source.cooldown > 0) {\n return;\n }\n creep.harvest(source);\n }\n }", "title": "" }, { "docid": "d0825b89c73ad3203c1fa421dcb0fc4b", "score": "0.49219677", "text": "static setupAction(creep) {\n\n if (creep.memory.action == null) {\n creep.memory.action = 'ContainerMine';\n //Console.log(creep.name + ': Container Mining');\n }\n\n if (creep.memory.target == null) {\n creep.memory.target = this.claimContainer(creep);\n }\n\n }", "title": "" }, { "docid": "61e459245b99c74bc282d1d0b944a96c", "score": "0.49192613", "text": "function assignCards(data) {\n card1 = new Card(data.value1, data.suit1, data.owner);\n card2 = new Card(data.value2, data.suit2, data.owner);\n}", "title": "" }, { "docid": "7148e4f4941ff92615ae57026fdba605", "score": "0.48978883", "text": "constructor() {\n this.addPricing = (args) => {\n CustomersModel.findOne({ _id: args.custid })\n .then((customer) => {\n if (!customer.pricing) {\n customer.pricing = [];\n }\n customer.pricing.push(args.price);\n customer.save();\n });\n };\n }", "title": "" }, { "docid": "9c4d881dccfe82858507ab8c38cbb651", "score": "0.48215315", "text": "function RouteGiftCreep (room, targetRoom, policyId, body, role, respawnRate, taskList) {\n this.type = gc.ROUTE_GIFT_CREEP;\n this.owner = room;\n this.targetRoom = targetRoom;\n this.policyId = policyId;\n this.respawnRate = respawnRate;\n this.body = body;\n this.role = role;\n this.taskList = taskList;\n if (undefined == body) {\n this.body = raceSwordsman.body(1);\n }\n if (undefined === respawnRate) {\n this.respawnRate = CREEP_LIFE_TIME;\n }\n this.due = 0;\n}", "title": "" }, { "docid": "46b1b299617448893608b18e4b794b54", "score": "0.47726175", "text": "function givePendant() {\n grindelwald.inventory.push(inventory.pendant);\n\n}", "title": "" }, { "docid": "60db934f686a32ec438585629b09b87a", "score": "0.4755488", "text": "set objectives(newObjectives) {\n this._objectives = newObjectives;\n for (i = 0; i < this.newObjectives.length; i++) {\n scorm.set(`cmi.interactions.${this.index}.objectives.${this._objectives.length - 1}.id`, this._objectives[i].id);\n }\n scorm.save();\n }", "title": "" }, { "docid": "4b215e412a6a9e373bc5e37f6e93705b", "score": "0.46990797", "text": "setNewCardsToPlayers() {\n for (let trade of this.trades) {\n _player = trade.player;\n _otherPlayer = trade.playerToSteal;\n cardId = trade.cardToSteal\n _player.hand.push(new Card(trade.cardToSteal))\n _otherPlayer.hand = _otherPlayer.hand.filter(card => { return card.id != cardId })\n }\n }", "title": "" }, { "docid": "1357e4647dc380ebc815914bfe91e16c", "score": "0.4675831", "text": "set cliente(cliente){\n if(cliente instanceof Cliente){\n this._cliente = cliente;\n } \n }", "title": "" }, { "docid": "7b2c7cf8f33b6f851fe6522a3b4b0d88", "score": "0.46515673", "text": "set cenpoint(pt) {\r\n this.cenpt = pt;\r\n }", "title": "" }, { "docid": "1cd0a462b3adcc3917e115c60e7c45a1", "score": "0.46094748", "text": "spawnChest(chestObject) {\r\n // getFirstDead method gets the first inactive game object\r\n let chest = this.chests.getFirstDead();\r\n // if no inactive chest object then create one\r\n if (!chest) {\r\n chest = new Chest(\r\n this,\r\n chestObject.x * 2, // xpos is chestObject.x * 2\r\n chestObject.y * 2, // ypos is chestObject.y * 2\r\n 'items', // select sprite 'items'\r\n 0, // from spritesheet first element '0'\r\n chestObject.gold,\r\n chestObject.id\r\n );\r\n // add chest to chests group\r\n this.chests.add(chest);\r\n } else {\r\n chest.coins = chestObject.gold; // pass the amount of gold\r\n chest.id = chestObject.id; // pass the chest id\r\n chest.setPosition(chestObject.x * 2, chestObject.y * 2);\r\n chest.makeActive();\r\n }\r\n\r\n }", "title": "" }, { "docid": "a3ee8050cdbfc3aba75ddc455ddc4e5d", "score": "0.45570204", "text": "registerMovement(creep) {\n /*\n const gridPos = this.movementGrid[creep.pos.y][creep.pos.x];\n gridPos.steps += gridPos.cost;\n gridPos.totalSteps += gridPos.cost;\n return gridPos.steps;\n */\n }", "title": "" }, { "docid": "1be9debde59b46e174d3f6c7c422ed73", "score": "0.45356888", "text": "assignSeat(seat, wind) {\n this.seat = seat;\n this.wind = wind;\n this.client.game.assignSeat({ seat, wind });\n }", "title": "" }, { "docid": "0a735512726867e5adf048c4a41b3dcc", "score": "0.45227593", "text": "constructor(id, name, rentPrice, mortgagePrice, price, tile, houseCost, hotelCost, buildings, color) {\n super(id, name, rentPrice, mortgagePrice, price, tile);\n this.houseCost = houseCost;\n this.hotelCost = hotelCost;\n this.buildings = buildings;\n this.color = color;\n this.houseCount = 0;\n this.hotelCount = 0;\n this.type = \"CityModel\";\n }", "title": "" }, { "docid": "36c024c0d27b05c5c465110e37c8f678", "score": "0.45053035", "text": "populate(cart) {\n cart.forEach( (item) => this.addToCart(item));\n }", "title": "" }, { "docid": "093ba9b38441994ac7ec7881c9998533", "score": "0.45033762", "text": "set cliente (cliente) {\n if (cliente instanceof Cliente) {\n this._cliente = cliente\n }\n }", "title": "" }, { "docid": "ca65d3c463065472a173d8ddf2d056e3", "score": "0.44826764", "text": "function IncreasePearBranches (){\n var increasePearBranches = Math.round(Math.random()*3)\n PearTree.grow.call(PearTree, increasePearBranches)\n console.log(\"Pear Branches\", PearTree.branches)\n\n}", "title": "" }, { "docid": "3f1a4bcff3cf318775c4b8be531a5d3a", "score": "0.44754708", "text": "reproduction() {\n if (this.matingPool.length > 0) {\n // Refill the population with children from the mating pool\n for (let i = 0; i < this.clusters.length; i++) {\n // Sping the wheel of fortune to pick two parents\n let m = floor(random(this.matingPool.length));\n let d = floor(random(this.matingPool.length));\n // Pick two parents\n let mom = this.matingPool[m];\n let dad = this.matingPool[d];\n //Cluster dad = matingPool.get(m);\n\n // Get their genesgggg\n let momgenes = mom.getDNA();\n let dadgenes = dad.getDNA();\n // Mate their genes\n let child = momgenes.crossover(dadgenes);\n // Mutate their genes\n child.mutate(this.mutationRate);\n // Fill the new population with the new child\n let y = (i / xCount);\n //PVector pos=new PVector(margin/(xCount)/2+(i*cellR*scale) % (width-margin)+i%xCount*(margin/(xCount)), margin/(xCount)/2+y*cellR*scale + y*(margin/xCount));\n this.clusters[i] = new Cluster(this.clusters[i].pos, child);\n }\n this.generations++;\n }\n }", "title": "" }, { "docid": "7e362bef81b6561d15a10ae2cf22364d", "score": "0.44718948", "text": "create_pen(data, c) {\n console.log(data);\n console.log(c.pens);\n c.pens.insert().then((instance) => {\n c.write(JSON.stringify({\n path: 'pen',\n request: task.NEW,\n id: instance.id\n }));\n c.write(JSON.stringify({\n path: 'pen',\n request: task.ENUMERATE\n }));\n if (c.active == null) {\n c.active = instance;\n }\n }, (err) => {\n console.log(err);\n });\n }", "title": "" }, { "docid": "2b3407ecc0e16d39aaef028bce7ce3a8", "score": "0.44717667", "text": "set(p) {\n this.x=p.x;\n this.y=p.y;\n return this;\n }", "title": "" }, { "docid": "4a2096f3ec73629d98591cdb2e9e7b16", "score": "0.44573542", "text": "create(entity) {\n return this.normalizeClient(entity.client)\n .then((client_id) => {\n entity.client = client_id;\n let rep = new Representative(entity);\n return rep.savePromise();\n });\n }", "title": "" }, { "docid": "2d1d4d6ec40edfa6f34c61b1fbd7ce49", "score": "0.44571787", "text": "function confereCartas() {\n carta1 = null;\n carta2 = null;\n cartaParabaixo();\n}", "title": "" }, { "docid": "efd5c5763483f7322677daf9dacd467e", "score": "0.44530225", "text": "initMemory()\n {\n // On the very first ticket, the creep will not have a defined id.\n if (this.instance.id === undefined)\n return;\n\n super.initMemory();\n\n const sourceData = this.instance.room.memory.sources[this.memory.source];\n sourceData.harvester = this.instance.id;\n\n const targetSource = Game.getObjectById(sourceData.id);\n this.memory.sourceId = targetSource.id;\n this.memory.sourcePos = targetSource.pos;\n this.memory.targetPos = targetSource.pos;\n }", "title": "" }, { "docid": "2e63a901d0ceff6402ec120a4ce18333", "score": "0.44523883", "text": "function Coffee(price){\r\n this.price = price;\r\n}", "title": "" }, { "docid": "c1d2f4006730458bbff0aa06b62309db", "score": "0.44276345", "text": "function updateProductWithProviders (productToBuy, productFromStore, corticonDataManager) {\n\tconst allProviders = productFromStore[\"providers\"];\n\tfor ( let i=0; i<allProviders.length; i++ ) {\n\t\tconst oneProvider = allProviders[i];\n\t\tproductToBuy['_debug'] += \" - Provider: \" + oneProvider[\"name\"];\n\t\tconst providerEntity = corticonDataManager.createEntity('Provider', oneProvider);\n \tlogger.logDebug('one Provider entity created for '+ oneProvider[\"name\"]);\n\t\tcorticonDataManager.addAssociation(productToBuy, providerEntity, 'provider');\n \tlogger.logDebug('one Provider association added for ' + productToBuy[\"sku\"]);\n\t}\n}", "title": "" }, { "docid": "27e3228ea5a8e173e73a6b716b401f0a", "score": "0.44211128", "text": "function replaceMiner(creep) {\n\tif (!(creep.memory.replacementQueued == true)) {\n\t\tif (creep.ticksToLive <= ((creep.body.length * 3) - 1)) {\n\t\t\tcreep.memory.retire = true;\n\t\t}\n\t}\n\tif (creep.memory.retire === true) {\n\t\tvar assignedSource = creep.memory.sourceId;\n\t\tfor (let spawn in creep.room.memory.spawns) {\n\t\t\tconst spawnObject = Game.getObjectById(creep.room.memory.spawns[spawn])\n\t\t\tif (spawnObject != null) {\n\t\t\t\tvar spawnName = spawnObject.name;\n\t\t\t\tif (Game.spawns[spawnName].spawning == null) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\tcreep.memory.retire = false;\n\t\tcreep.memory.replacementQueued = false;\n\t}\n\tif (creep.memory.replacementQueued == false) {\n\t\tGame.spawns[spawnName].spawnMiner(assignedSource, creep.room.energyAvailable);\n\t\tcreep.memory.replacementQueued = true;\n\t}\n}", "title": "" }, { "docid": "ef79b2e6881f2ffa3642f51121cc5341", "score": "0.4404128", "text": "constructDeck() {\n let xPos = 50;\n let yPos = 30;\n const deck = [];\n suits.forEach(suit => {\n values.forEach(value => {\n const inNewCard = new Card(suit, value, xPos, yPos);\n deck.push(inNewCard);\n yPos -= .05;\n });\n });\n return deck;\n }", "title": "" }, { "docid": "080afdfa3f773fecf408edb2b051d7ad", "score": "0.4403178", "text": "function quickerMoveToPriced(){\n this.currentZone = 'Priced';\n this.status = \"priced\";\n CorbisUI.Cart.UpdatePriceLink(this, 'priceTag');\n this.reset();\n}", "title": "" }, { "docid": "a1370e607bdfb8d8c3bcbdbae81b9f58", "score": "0.4388279", "text": "function cloneCobweb(cobweb, cw){\n\tfor(i=0;i<cw.countPoints;i++)\n\t\tcw.cobwebInit[i] = new Nest(cobweb[i][0].x,cobweb[i][0].y);\n}", "title": "" }, { "docid": "fe0676c005b363f29c70288cac7ee7ce", "score": "0.43878266", "text": "function Customer(map)\r\n{\r\n\tAgent.call(this\r\n\t\t,map \r\n\t\t,Customer.prototype.DEFAULT_WIDTH\r\n\t\t,Customer.prototype.DEFAULT_HEIGHT);\r\n\t\t\r\n\tthis.basket = [];\r\n}", "title": "" }, { "docid": "346e5391d6f7c7971ddbfb7cd485912c", "score": "0.43839377", "text": "constructor(n,p,s){\r\n this.name = n;\r\n this.price = p;\r\n this.shipping = s;\r\n }", "title": "" }, { "docid": "459c46c82a22f9885430955c156bb349", "score": "0.43831015", "text": "static async insert({ name, roast, price }) {\n const { rows } = await pool.query(\n 'INSERT INTO coffees (name, roast, price) VALUES ($1, $2, $3) RETURNING *',\n [name, roast, price]\n );\n return new Coffee(rows[0]);\n }", "title": "" }, { "docid": "bcc679fd3e24eebb2efffd53502b89c7", "score": "0.43830204", "text": "function AddCandy(obj, name, id, price)\n{\n obj.candies.push({name: name, id: id, price: price, amount: 1});\n}", "title": "" }, { "docid": "1c1ad663be60ca6b39031b091ac5b7a8", "score": "0.43771887", "text": "setCenas() {\n\n // set all mines\n for (var i = 0; i < this.minesCount; i++) {\n\n // get random positions\n let randX = rand(0, this.x);\n let randY = rand(0, this.y);\n\n // find field\n let field = this.board.get(randX).get(randY);\n\n // if field isn't already mine, set it, else rerun step\n if (field.cena === true) {\n i--;\n } else {\n field.cena = true;\n this.mines.push(field);\n }\n\n }\n\n }", "title": "" }, { "docid": "0d3338ad9c5bce05bf5a8058b1c14525", "score": "0.43771058", "text": "function AddCandy(obj, name, id, price)\n{\n obj.candies.push({name: name, id: id, price: price, amount: 1 });\n}", "title": "" }, { "docid": "b793bf1c22c66440508a9400cca72b6e", "score": "0.4376794", "text": "setCost(cost) {\n this.cost = cost; // cost so far\n }", "title": "" }, { "docid": "f03024c3761c1e04c6851564c860527d", "score": "0.43767938", "text": "function Coffee() {\n this.price = 1;\n}", "title": "" }, { "docid": "ff0d93d4b84bd27b2700c8ea1fa0c148", "score": "0.43709904", "text": "constructor() {\n var suit, pip;\n\n this.cards = [];\n\n suits.map(suit => {\n pips.map(pip => {\n this.cards.push(new Card(pip, suit));\n })\n });\n }", "title": "" }, { "docid": "b0daf2828530b5df4be9ef50eea4d26f", "score": "0.43682662", "text": "function SetCoins(amt : int){ this.coins = amt; }", "title": "" }, { "docid": "dcec4a65362167975acbd9bd2b961330", "score": "0.43637457", "text": "choose_actions(){\n this.chosen_actions = new Deck()\n for (let cardClass of this.AllCards.AllActions) {\n this.chosen_actions.add_to(cardClass)\n } \n this.chosen_actions.shuffle()\n this.chosen_actions.cards.length = this.numActionCards\n // console.log(\"from choose actions the chosen_actions are\", this.chosen_actions)\n for (let card of this.chosen_actions.cards){\n // let thiscard = new card\n let pile = new Deck(card, \"store\")\n // for(let i=0; i < thiscard.pile_count; i++){\n // pile.add_to(new card)\n // }\n this.action_cards.push(pile)\n // console.log(\"from choose actions the action_cards are\", this.action_cards)\n }\n }", "title": "" }, { "docid": "4a34f0edd34e5f8778510b4016eb6f27", "score": "0.4356951", "text": "place(tileGrid, entityList) {\n this.setTileData(tileGrid);\n this.parseConnections(entityList);\n return this;\n }", "title": "" }, { "docid": "ab9b66ec5083f2d80fbd492b81969fca", "score": "0.43536463", "text": "constructor(initialCash) {\n this.cash = initialCash;\n }", "title": "" }, { "docid": "6192a21e725159c5b7178be31b5de473", "score": "0.43444046", "text": "constructor(n,p,s){\n this.name = n;\n this.price = p;\n this.shipping = s;\n }", "title": "" }, { "docid": "c7b9c90b4371dfb6655c804839cee87f", "score": "0.4342152", "text": "function addCoffee(id,store, type, price) {\n var coffee = new Coffee(id,store, type, price);\n coffees.push(coffee);\n}", "title": "" }, { "docid": "ab7c1ca5af9a20045876394408c542f4", "score": "0.43352458", "text": "constructor() {\n this.decks = new Deck(6);\n this.players = [];\n for(let i = 0; i < 7; i++) {\n this.players.push(new Player(this, i));\n }\n this.croupier = new Croupier(this);\n }", "title": "" }, { "docid": "b230d0cf9be99c8fbf37c61ba368212e", "score": "0.4328049", "text": "assign(e, name, cmpt) {\n return this.component(name).assign(e, cmpt);\n }", "title": "" }, { "docid": "981aec60597b650d9402811bb5c65477", "score": "0.43277085", "text": "function newOrder(){\n order.items = [];\n getProducts()\n}", "title": "" }, { "docid": "3fca097242595f91001f85a697ce6fbe", "score": "0.43252942", "text": "static spawnCreep(spawn, maxEnergy) {\n //Harvester is 2 MOVE parts and then the rest is filled with WORK parts, up to 5\n var numWorkParts = parseInt((maxEnergy - 100) / 100);\n if (numWorkParts > 12) {\n numWorkParts = 12;\n }\n\n var body = [];\n\n for (var i = 0; i < numWorkParts; i++) {\n body.push(WORK);\n }\n\n body.push(MOVE, MOVE);\n\n var creepName = 'Harvester' + Game.time;\n\n var opts = {\n memory: {\n role: 'RoleHarvester',\n home: spawn.room.name\n }\n };\n\n if (spawn.spawnCreep(body, creepName, opts) == OK) {\n Utils.log('Spawning new creep: ' + Utils.createHtmlLinkToObject(Game.creeps[creepName]));\n }\n }", "title": "" }, { "docid": "079b1e6cb1a7f23d1479aca52acf7829", "score": "0.43215677", "text": "function set_stock_charges()\n\t\t{\n\t\t\tretail \t\t = $('#stock_item_id option:selected').attr('data-retail');\n\t\t\tpurchase \t = $('#stock_item_id option:selected').attr('data-purchase');\n\t\t\tpackretail \t = $('#stock_item_id option:selected').attr('data-packretail');\n\t\t\tpackpurchase = $('#stock_item_id option:selected').attr('data-packpurchase');\n\n\t\t\t$('#cost').val(purchase);\n\n\t\t\t$('#retial').val(retail);\n\t\t\t\n\t\t\t$('#pack_retail').val(packretail);\n\t\t\t\n\t\t\t$('#pack_cost').val(packpurchase);\n\t\t\t\n\t\t}", "title": "" }, { "docid": "9c9bc0c93f4e134b4f5af58eecffe395", "score": "0.4319113", "text": "actionCost(creep, action)\n {\n return this.cost(creep)\n }", "title": "" }, { "docid": "9c9bc0c93f4e134b4f5af58eecffe395", "score": "0.4319113", "text": "actionCost(creep, action)\n {\n return this.cost(creep)\n }", "title": "" }, { "docid": "6f4d285d3beaac5bcd1d8d3df13a8329", "score": "0.43138853", "text": "function createEquipObjects() {\n for(i=0; i<QuoteGen.gear.length; i++){\n QuoteGen.gear[i] = new EquipObject\n QuoteGen.gear[i].name = QuoteGen.gearName[i]\n }\n\n}", "title": "" }, { "docid": "d900fa9b702a407ef5997ad2d1c48399", "score": "0.43121317", "text": "set cliente(novoValor){\n if(novoValor instanceof Cliente){\n this._cliente = novoValor;\n } \n }", "title": "" }, { "docid": "df281b3655bb1744ac7556d08c3cc833", "score": "0.4298754", "text": "function PizzaShop() {\n this.pizza = []\n}", "title": "" }, { "docid": "3037a37d5b011991e425b9a1fba2ebb7", "score": "0.42987183", "text": "function setCart(newCart) { //provided function\n cart = newCart;\n}", "title": "" }, { "docid": "520a563bda79e204baa93a8477125a42", "score": "0.4289391", "text": "function patrol(creep) {\n while(!fightMode) {\n creep.moveTo(21,23);\n creep.moveTo(34,31);\n creep.moveTo(37,10);\n }\n return;\n}", "title": "" }, { "docid": "173988ccf56f69e5012624df310e27ad", "score": "0.4289087", "text": "function CP(agencia, conta, saldo){\r\n Conta.call(this, agencia, conta, saldo);\r\n}", "title": "" }, { "docid": "d83b3a37df6410b818aa8592793f9c59", "score": "0.42875332", "text": "function Harvest(creep){\n const targets = creep.room.find(FIND_SOURCES);\n let target;\n if(targets.length){\n if(creep.memory.role == \"Worker\"){\n target = targets[0];\n }\n else {\n target = targets[0];\n }\n if(creep.harvest(target) == ERR_NOT_IN_RANGE){\n creep.moveTo(target);\n }\n }\n}", "title": "" }, { "docid": "3ebccc8d1e3cb25d1cb75fdbc54f54a4", "score": "0.42857957", "text": "callCities() {\n this.cityCategory.idCategoriaType = '104002';\n this.cityCategory.nombreTree = 'Region';\n this.categoryService.create(this.cityCategory).subscribe(response => {\n this.listCities = response.content;\n });\n }", "title": "" }, { "docid": "7f202562b0dcc244c7e00955706beb12", "score": "0.4284244", "text": "function Cijfer(opdracht, cijfer) {\n let cijferObj = this;\n\n cijferObj.opdracht = opdracht;\n cijferObj.cijfer = cijfer;\n\n cijfers.push(cijferObj);\n}", "title": "" }, { "docid": "92047292461bffbf411d2c7ba3f69208", "score": "0.42793497", "text": "constructor (n,p,s){\nthis.name=n\nthis.price=p\nthis.shipping=s\n\n}", "title": "" }, { "docid": "3cf948f24fe95f96c7381e637cda17ff", "score": "0.42645735", "text": "function selectCohete() {\n var size_data = Object.keys(data).length;\n var values_cohete = Object.values(data)[count];\n if (count < size_data) {\n var codigo = values_cohete.codigo;\n var propulsores = values_cohete.propulsores;\n var potencia = values_cohete.potencia;\n cohete = new Cohete(codigo, propulsores, potencia);\n console.log(cohete);\n // save cohete in a MAP()\n nombre = \"cohete\" + count;\n cohetes_libreria.set(nombre, { \"codigo\": cohete.codigo, \"propulsores\": cohete.propulsores, \"potencia\": cohete.potencia });\n console.log(cohetes_libreria);\n create_cohete.disabled = true;\n print_cohete.disabled = false;\n }\n count += 1;\n}", "title": "" }, { "docid": "1dc4362e2af82cecb04b3eaebaa4fb2b", "score": "0.42614582", "text": "createDimCoverActionSpace(domSelect, x_samples, x_dot_samples, theta_samples, theta_dot_samples, comparison_policy=null) {\n let mainObjct = this;\n $(domSelect+\" .title\").html(\"Communicate Policy Through Examples\")\n\n let cartpoles_tmp = cartesian(x_samples, x_dot_samples, theta_samples, theta_dot_samples);\n let cartpoles = [];\n // add cartpoles to be updated by COACH\n for (let i = 0; i < cartpoles_tmp.length*2; i++) {\n let cp = new CartPole(mainObjct.cartpole_thresholds);\n cp.reset(cartpoles_tmp[Math.floor(i/2)])\n\n if (i % 2 === 0) {\n all_cartpoles[cp.id] = {\"divId\": `cart_${i}`,\n \"cartpole\": cp}\n this.cartpoleSim.simulation_from_action_sequence(cp, [], 0)\n }\n else {\n cp.setTitle(i+\"_Comparison\")\n this.cartpoleSim.simulation_from_policy(cp, comparison_policy, 100, 0)\n }\n cartpoles.push(cp)\n }\n\n UI_Blocks.state_grid(domSelect+\" .animation-container\", cartpoles.length/2, 2, cartpoles, this.cartpole_display_args)\n }", "title": "" }, { "docid": "ee52dedb14cb811353fc937b096ffd46", "score": "0.4261448", "text": "function setTask(creep, task)\n{\n creep.memory.lockedTask = task;\n}", "title": "" }, { "docid": "ee52dedb14cb811353fc937b096ffd46", "score": "0.4261448", "text": "function setTask(creep, task)\n{\n creep.memory.lockedTask = task;\n}", "title": "" }, { "docid": "22da615129f798a1b57b0ab2e1dc02ad", "score": "0.4252036", "text": "copy(cord){\n this.x=cord.x;\n this.y=cord.y;\n }", "title": "" }, { "docid": "ae959a92d8167f1b5a05067e7c38e4f4", "score": "0.42475906", "text": "function setCities(city) {\n const resultPromise = session.run(\n ' CREATE (city : CITY {name :$name , asciiname : $asciiname ,' +\n ' longitude : $longitude , latitude : $latitude ,' +\n ' countryCode : $countryCode , population : $population }) RETURN city',\n {\n name: city.name,\n asciiname: city.asciiname,\n longitude: city.longitude,\n latitude: city.latitude,\n countryCode: city.countryCode,\n population: city.population,\n }\n );\n return resultPromise.then(result => {\n session.close();\n return result.records.map(r => {\n return new City(r.get('city'))\n });\n })\n .catch((error) => {\n console.error(\"no cities: \" + error);\n });\n}", "title": "" }, { "docid": "aeea431ff63e9e308d0098eccbdae1f7", "score": "0.42395702", "text": "constructor(mealId, neighborhoodId, customerId) {\n // Returns an object that has attributes of mealId, neighborhoodId,\n // customerId, and id\n this.id = ++deliveryId;\n this.mealId = mealId;\n this.neighborhoodId = neighborhoodId;\n this.customerId = customerId;\n store.deliveries.push(this);\n }", "title": "" }, { "docid": "87e089a3684bec6a935415ed5451e5ad", "score": "0.4239557", "text": "function ChasePackSet(sprite) {\r\n GameObjectSet.call(this);\r\n this.kSpriteSheet = sprite;\r\n var i, x, y, c;\r\n for(i=0; i<30; i++){\r\n x = 100 + 900*Math.random();\r\n y = 10 + 60 * Math.random();\r\n c = new ChasePack(this.kSpriteSheet, x, y);\r\n \r\n this.addToSet(c);\r\n }\r\n}", "title": "" }, { "docid": "d102856540de623d7dc5acc06265e61d", "score": "0.42326757", "text": "agregarCita(cita){\n this.citas = [...this.citas, cita];\n console.log(this.citas);\n }", "title": "" }, { "docid": "11ec81ba581c3750e72019ef8167fe2f", "score": "0.4228913", "text": "putRockInNest() {\n console.log(this.rock);\n this.rock.inNest();\n this.rock = null;\n }", "title": "" }, { "docid": "fa4ee70b19511d96bcf0958cb2c13eda", "score": "0.42265287", "text": "callCities() {\n this.cityCategory.idCategoriaType = \"104002\";\n this.cityCategory.nombreTree = \"Region\";\n this.categoryService.create(this.cityCategory).subscribe(response => {\n this.listCities = response.content;\n });\n }", "title": "" }, { "docid": "e8b66a7a17dba3319693bad403ebb7df", "score": "0.42199904", "text": "function _setPets(pPet){\n //users.push(pUser);\n return $http.post('http://localhost:3000/api/save_pet',pPet)\n\n }", "title": "" }, { "docid": "513e9d748abf7d155af6e25e1e8d4780", "score": "0.4214757", "text": "populateCart(cart) {\n cart.forEach(item =>this.addCartItem(item));\n }", "title": "" }, { "docid": "5cf3dc0c68348e311d19761ac8db8751", "score": "0.42132404", "text": "function setPickaxePenetration(pp){ PickaxePenetration = pp;}", "title": "" }, { "docid": "109aebbc15c4ecb93188cf5f633684b4", "score": "0.42120072", "text": "function insertVegetables() {\n console.log('In insertVegetables()');\n let vegetable = new Vegetable({\n name: 'Squash',\n color: 'Green',\n planted_on: new Date().toLocaleString(),\n });\n\n return vegetable.save()\n .then(() => {\n console.log('Saved a vegetable!');\n })\n .catch(error => {\n console.error(error);\n\n })\n\n}", "title": "" }, { "docid": "4b7dea764870f3252d01f0432d5ab3ac", "score": "0.42075536", "text": "assign(X, Y) {\n\t\tconst { chip, chip: {registers} } = this\n\n\t\tregisters[X] = registers[Y]\n\t\tchip.pc += 2\n\t}", "title": "" }, { "docid": "54c29ab4f633071eaf5fc3f7f3556690", "score": "0.42071062", "text": "function Pizza(size, crust, sauce, toppings, cost, id) {\n this.size = size,\n this.crust = crust,\n this.sauce = sauce,\n this.toppings = toppings,\n this.cost = cost,\n this.id = id\n}", "title": "" }, { "docid": "b9b6114d109573664523bac9699e0d52", "score": "0.42063454", "text": "function deliverCow() {\n var dx = (Math.floor(Math.random() * 10000) % 3) - 1;\n var cow = {\n id: generateId(),\n type: 'Cow',\n x: Math.round(cowZone.x + cowZone.width * Math.random()),\n y: Math.round(cowZone.y + cowZone.height * Math.random()),\n animation: 'idle',\n direction: {x: dx, y: 1, name: directionName(dx, 1)},\n currentHP: 50,\n aggro: {}\n };\n cows.push(cow);\n objects[cow.id] = cow;\n return cow;\n}", "title": "" }, { "docid": "b64a89b7109aec239beac5d6ce470c0e", "score": "0.42025062", "text": "addEntity(entity){\n this.entity_list.push(entity);\n }", "title": "" }, { "docid": "2b3f7d383bcaa08ce75aff176c3dba38", "score": "0.42001355", "text": "function plantTheMine(bombs, setBombs, fieldX, fieldY) {\n let newBombs = bombs;\n newBombs[fieldY][fieldX] = !newBombs[fieldY][fieldX];\n setBombs({bombs: newBombs});\n}", "title": "" }, { "docid": "1d7b84333f24cc8ec7b1df6c4f1b3adc", "score": "0.4199251", "text": "changeCozySeller(addr) {\n if (!addr) this.query.delete(\"cozy-seller\");\n else this.query.set(\"cozy-seller\", addr);\n }", "title": "" }, { "docid": "58056d640b872c2418d5a48c9429c1d6", "score": "0.41991797", "text": "findMyBees(){\n this.bees = [];\n for(let c in Game.creeps){\n let creep = Game.creeps[c];\n\n if(creep.memory.queenDirectly){\n this.bees.push(new Bee(creep, this.homeComb));\n //console.log(`${Game.time}|${this.homeComb.combName}: Find Queen's Bee [${creep.name}], memory is \\n`+\n // `${JSON.stringify(creep.memory)}!`);\n }\n }\n }", "title": "" }, { "docid": "5a188226a9748dd83b5aa841e1294480", "score": "0.4197536", "text": "sell(tower) {\n this.gainMoney(tower.cost / 2);\n //Destroy object here.\n }", "title": "" }, { "docid": "f6bc393b7abf0f9ca484f72fcea71ccb", "score": "0.4194625", "text": "function createCandy(x, y) {\n let candy = {\n x: x,\n y: y,\n size: 50,\n speed: 2,\n vx: 0,\n vy: 0,\n img: candyImg,\n eaten: false\n };\n return candy;\n}", "title": "" }, { "docid": "41bd34f7a7227f64af2a588a364b8112", "score": "0.41928583", "text": "set CPM(C){\n\t\tsuper.CPM = C\n\t\t\n\t\tif( this.C.ndim != 2 ){\n\t\t\tthrow(\"You are trying to add a SoftLocalConnectivityConstraint to a 3D CPM, but this constraint is currently only supported in 2D!\")\n\t\t}\n\t}", "title": "" }, { "docid": "293abe01d80062a3c9ff2aaf695d5e28", "score": "0.41891354", "text": "constructor (prices) {\n super({});\n this.prices = [...prices];\n }", "title": "" }, { "docid": "6a1d6a65541858f2db2c856d97fc8fb0", "score": "0.4186555", "text": "newItem(data, prio, opts = {}) {\n let creepMemory = data.memory || {}\n if(!_.isUndefined(opts.assignItem)) {\n creepMemory.item = creepMemory.item || {}\n let itemId = hiveMind.push(opts.assignItem.data)\n creepMemory.item.id = itemId\n if(!_.isUndefined(opts.assignItem.priority)) {\n creepMemory.item.prio = opts.assignItem.priority\n }\n else {\n creepMemory.item.prio = 0\n }\n }\n if(_.isUndefined(creepMemory.myRoomName)) {\n creepMemory.myRoomName = this.room.name\n }\n if(_.isUndefined(creepMemory.role)) {\n creepMemory.role = this._roleOrDefaultOf(data)\n }\n\n // Set the data\n const hiveMindData = {\n memory: creepMemory,\n kind: data.kind || $.KIND_ZERGLING,\n role: this._roleOrDefaultOf(data),\n body: data.body || undefined\n }\n return super.newItem(hiveMindData, prio)\n }", "title": "" }, { "docid": "6d89e2698d8963f8d4050e0d5de905c8", "score": "0.4182152", "text": "function init(){\n create();\n this.health = creepElement.health;\n declareStatus(this.health);\n draw();\n }", "title": "" }, { "docid": "a731704c8aba7cff616bc4a42b9848e9", "score": "0.41767764", "text": "function setEnemies() {\n for(var i=0; i<enemiesQty; i++) {\n allEnemies.push(new Enemy());\n }\n}", "title": "" }, { "docid": "b62bf294366c8fec5c72ee7c34aff6c4", "score": "0.41741148", "text": "initBatiment(nombreEtage){\n for (let i=0 ; i< nombreEtage ; i++){\n var etage =new Etage(i);\n this.addEtage(etage);\n }\n\n }", "title": "" }, { "docid": "b62bf294366c8fec5c72ee7c34aff6c4", "score": "0.41741148", "text": "initBatiment(nombreEtage){\n for (let i=0 ; i< nombreEtage ; i++){\n var etage =new Etage(i);\n this.addEtage(etage);\n }\n\n }", "title": "" } ]
1527c8d510aad802a641a48a797514fb
SNE Vx, Vy Skip next instruction if Vx != Vy. The values of Vx and Vy are compared, and if they are not equal, the program counter is increased by 2.
[ { "docid": "6be51906624b5972d58d845d9a52e342", "score": "0.66050404", "text": "function OP_9xy0(opcode) {\n if (debug) console.log((PC-2).toString(16).padStart(3,'0').toUpperCase() + ' - ', numberToHexString(opcode), ` - SNE Vx, Vy`);\n if (V[(opcode & 0x0F00) >> 8] != V[(opcode & 0x00F0) >> 4])\n PC += 2;\n}", "title": "" } ]
[ { "docid": "6a59ddcbda8956564ef323def046dcb0", "score": "0.7129275", "text": "skipEqualRegisters(registerX,registerY){\n if(this.vReg[registerX] === this.vReg[registerY]){\n this._skipInstruction();\n }\n }", "title": "" }, { "docid": "9f55eeb7885c2e415be3b7f1b1ce0ba6", "score": "0.7076516", "text": "skipNotEqualRegisters(registerX,registerY){\n if(this.vReg[registerX] != this.vReg[registerY]){\n this._skipInstruction()\n }\n }", "title": "" }, { "docid": "171bf32a3adbcbd8e14b7404e46098e5", "score": "0.65555006", "text": "skipEqualValue(registerX, value){\n if(this.vReg[registerX] === value){\n this._skipInstruction();\n\n }\n }", "title": "" }, { "docid": "badc7d4f1f53ef9d81b2a4bdd4341ca9", "score": "0.6489466", "text": "skipNotEqualValue(registerX,value){\n if(this.vReg[registerX] !== value){\n this._skipInstruction();\n }\n }", "title": "" }, { "docid": "8fba65c2583faa6115f5d5d654b7e622", "score": "0.6129998", "text": "SNE_Vx_Vy(op) {\n\t\tthis.pc += (this.V[(op & 0xF00) >> 8] === this.V[(op & 0xF0) >> 4])? 2: 4;\n\t}", "title": "" }, { "docid": "a4f7bd7f7826bb5ce604fb1f6ce80bb5", "score": "0.61206746", "text": "function OP_4xkk(opcode) {\n if (debug) console.log((PC-2).toString(16).padStart(3,'0').toUpperCase() + ' - ', numberToHexString(opcode), ` - SNE Vx, byte`);\n if (V[(opcode & 0x0F00) >> 8] !== (opcode & 0x00FF))\n PC += 2;\n}", "title": "" }, { "docid": "c8ea05cd8614ad4e85fbd3d21639bcf3", "score": "0.585691", "text": "function ne(v1, v2)\n{\n \"tachyon:static\";\n \n // Perform the negation of the equality comparison\n return !eq(v1, v2);\n}", "title": "" }, { "docid": "56606d526d2c00dafc7afed4a3321442", "score": "0.5709246", "text": "function OP_5xy0(opcode) {\n if (debug) console.log((PC-2).toString(16).padStart(3,'0').toUpperCase() + ' - ', numberToHexString(opcode), ` - SE Vx, Vy`);\n if (V[(opcode & 0x0F00) >> 8] === V[(opcode & 0x00F0) >> 4])\n PC += 2;\n}", "title": "" }, { "docid": "69d927ce8f4674b3809b19aadff4226d", "score": "0.56417483", "text": "ne (a, b) { return new instr_pre(0x62, this, [a, b]) }", "title": "" }, { "docid": "f16e6d50ad18445ec6e8a14eaa909124", "score": "0.56025285", "text": "ne (a, b) { return new instr_pre(0x5c, this, [a, b]) }", "title": "" }, { "docid": "24e069782137c0f669068ecf09b09acd", "score": "0.5593476", "text": "ne (a, b) { return new instr_pre(0x47, this, [a, b]) }", "title": "" }, { "docid": "2af098dfdd6b5f2ce7f06a474212f512", "score": "0.5564576", "text": "ne (a, b) { return new instr_pre(0x52, this, [a, b]) }", "title": "" }, { "docid": "faec0222830526ed1e426b1d3b88cf10", "score": "0.53874326", "text": "opcode0x4XKK (x) {\n if (this.register_V[x] != (this.opcode & 0x00FF) ) {\n this.program_counter += 2;\n }\n\n if (debugMode == true) {\n console.log(\"Opcode 0x\" + this.opcode.toString(16).toUpperCase() + \": Skip next instruction if Vx != kk.\");\n }\n }", "title": "" }, { "docid": "5a70b994c817dcc7a05327749eb96311", "score": "0.53526855", "text": "XOR_Vx_Vy(op) {\n\t\tthis.V[(op & 0xF00) >> 8] ^= this.V[(op & 0xF0) >> 4];\n\t\tthis.pc += 2;\n\t}", "title": "" }, { "docid": "32904026701b88e4c3827a862b3c7d46", "score": "0.5350494", "text": "function ne(a,b) {\n return !eq(a, b)\n }", "title": "" }, { "docid": "c166b4e72220d73070203ab77ceae4a5", "score": "0.5335668", "text": "function NEQ(state) {\n var stack = state.stack;\n var e2 = stack.pop();\n var e1 = stack.pop();\n\n if (exports.DEBUG) {\n console.log(state.step, 'NEQ[]', e2, e1);\n }\n\n stack.push(e2 !== e1 ? 1 : 0);\n }", "title": "" }, { "docid": "948ee7657e25a4d65bcf7f8ac9b6a977", "score": "0.5283986", "text": "SNE_Vx_byte(op) {\n\t\tthis.pc += (this.V[(op & 0xF00) >> 8] !== (op & 0xFF))? 4: 2;\n\t}", "title": "" }, { "docid": "6d628d746b432ad42c224414df26eab3", "score": "0.523929", "text": "SE_Vx_Vy(op) {\n\t\tthis.pc += (this.V[(op & 0xF00) >> 8] === this.V[(op & 0xF0) >> 4])? 4: 2;\n\t}", "title": "" }, { "docid": "9cdf0219eb4549dd528c53c09f6fa523", "score": "0.5231526", "text": "function NEQ(state) {\n var stack = state.stack;\n var e2 = stack.pop();\n var e1 = stack.pop();\n\n if (exports.DEBUG) { console.log(state.step, 'NEQ[]', e2, e1); }\n\n stack.push(e2 !== e1 ? 1 : 0);\n }", "title": "" }, { "docid": "873bba9ec3b18ed1d8c5dfd46381528d", "score": "0.5225795", "text": "function skipY(da) {\n var skipYes = false;\n var cond1 = visMode === ZOOMY || visMode === ZOOMX;\n var numberNodes = rootSelection.select(\"g.sankeyFrame.single\").selectAll(\"g.node\").filter(function (d) {\n return d.nameY === da;\n }).size();\n var cond2 = numberNodes === 0;\n var cond3 = percentages[0] === \"%sameTime\" && corrCategories().indexOf(da) === -1;\n\n skipYes = cond1 || cond2 || cond3;\n return skipYes;\n }", "title": "" }, { "docid": "775b9b475d6649b69679a21756befbee", "score": "0.52027243", "text": "function NEQ(state) {\n var stack = state.stack;\n var e2 = stack.pop();\n var e1 = stack.pop();\n\n if (DEBUG) console.log(state.step, 'NEQ[]', e2, e1);\n\n stack.push(e2 !== e1 ? 1 : 0);\n}", "title": "" }, { "docid": "294394479c172467dae6951e7e9c49f1", "score": "0.5128939", "text": "function xor(x, y) {\n return !x != !y\n}", "title": "" }, { "docid": "7e2a63a6a82b8814ef19fbf3af7488ee", "score": "0.50847894", "text": "function CompareNegate(a, b) {\n a = a | 0;\n b = b | 0;\n var sub = 0 - b;\n return a < (sub | 0);\n}", "title": "" }, { "docid": "333914b8cb3b9a42ded61fe41cc0f0dd", "score": "0.502856", "text": "opcode0x8XY2 (x, y) {\n this.register_V[x] &= this.register_V[y];\n\n if (debugMode == true) {\n console.log(\"Opcode 0x\" + this.opcode.toString(16).toUpperCase() + \": Performs a bitwise AND on the values of Vx and Vy, then stores the result in Vx. A bitwise AND compares the corrseponding bits from two values, and if both bits are 1, then the same bit in the result is also 1. Otherwise, it is 0. \");\n }\n }", "title": "" }, { "docid": "2f88ced39148ea528ad99e81feab968a", "score": "0.502656", "text": "_skipInstruction(){\n this.pc +=4;\n this._incrementPC = false;\n }", "title": "" }, { "docid": "bac0d86344e3bd8bbd7bb62a81be92e4", "score": "0.499473", "text": "function testStrictNotEqual(val) {\n // Only Change Code Below this Line\n \n if (val !== 17) {\n\n // Only Change Code Above this Line\n\n return \"Not Equal\";\n }\n return \"Equal\";\n}", "title": "" }, { "docid": "318dfab20c4e663bdc52551cb5cf1d44", "score": "0.49936077", "text": "function notincover2(i2) {\n for (var i1 = 0; i1 < n; ++i1) {\n if (e[i1][i2] > 0 || v1[i1].used) continue;\n v1[i1].used = true;\n notincover2(v1[i1].matched);\n }\n }", "title": "" }, { "docid": "d7a058197ab92533af224e2f6c3bb984", "score": "0.49702385", "text": "xor (a, b) { return new instr_pre(0x73, this, [a, b]) }", "title": "" }, { "docid": "9e75206fd5d74997f92f8fd507719129", "score": "0.49609843", "text": "skipKeyNotPressed(registerX){\n let key = this.vReg[registerX];\n if(!this.pressedKeys[key]){\n this._skipInstruction();\n }\n }", "title": "" }, { "docid": "587a25811cf07db4e93986f16394a77f", "score": "0.49458036", "text": "continue(x, y, lc) {}", "title": "" }, { "docid": "a6b281b098ef172e05b6d7aec576dd35", "score": "0.48939842", "text": "function notincover1(i1) {\n for (var i2 = 0; i2 < n; ++i2) {\n if (e[i1][i2] > 0 || v2[i2].used) continue;\n v2[i2].used = true;\n notincover1(v2[i2].matched);\n }\n }", "title": "" }, { "docid": "fbf75bd631e85c005449a73387d5b475", "score": "0.48425028", "text": "xor (a, b) { return new instr_pre(0x85, this, [a, b]) }", "title": "" }, { "docid": "da0c59c369555492db81eaf0368963f6", "score": "0.48406136", "text": "function op_xor(x, y) {\n return x ^ y;\n }", "title": "" }, { "docid": "522dc0592c0e23dccbe1287cc8c748ed", "score": "0.48345286", "text": "function OP_8xy3(opcode) {\n if (debug) console.log((PC-2).toString(16).padStart(3,'0').toUpperCase() + ' - ', numberToHexString(opcode), ` - XOR Vx, Vy`);\n V[(opcode & 0x0F00) >> 8] ^= V[(opcode & 0x00F0) >> 4];\n emitChange()\n}", "title": "" }, { "docid": "f7a2b2c0c5537e9ccf3623a9142209d1", "score": "0.48273885", "text": "function SSIsNotSSElement(node)\r\n {\r\n return !SSIsSSElement(node);\r\n }", "title": "" }, { "docid": "ff88c564eda2186bead94746db1713e0", "score": "0.48136845", "text": "function op_xor(x, y) { return x ^ y; }", "title": "" }, { "docid": "ff88c564eda2186bead94746db1713e0", "score": "0.48136845", "text": "function op_xor(x, y) { return x ^ y; }", "title": "" }, { "docid": "ff88c564eda2186bead94746db1713e0", "score": "0.48136845", "text": "function op_xor(x, y) { return x ^ y; }", "title": "" }, { "docid": "ff88c564eda2186bead94746db1713e0", "score": "0.48136845", "text": "function op_xor(x, y) { return x ^ y; }", "title": "" }, { "docid": "ff88c564eda2186bead94746db1713e0", "score": "0.48136845", "text": "function op_xor(x, y) { return x ^ y; }", "title": "" }, { "docid": "ff88c564eda2186bead94746db1713e0", "score": "0.48136845", "text": "function op_xor(x, y) { return x ^ y; }", "title": "" }, { "docid": "d1f05c5b70ec2484426cdcc589dd92f0", "score": "0.48046875", "text": "function OP_8xy2(opcode) {\n if (debug) console.log((PC-2).toString(16).padStart(3,'0').toUpperCase() + ' - ', numberToHexString(opcode), ` - AND Vx, Vy`);\n V[(opcode & 0x0F00) >> 8] &= V[(opcode & 0x00F0) >> 4];\n emitChange()\n}", "title": "" }, { "docid": "9d7f827969f8884387c5670aed47d12d", "score": "0.47940144", "text": "function op_xor(x, y) {\n\t return x ^ y\n\t}", "title": "" }, { "docid": "9d7f827969f8884387c5670aed47d12d", "score": "0.47940144", "text": "function op_xor(x, y) {\n\t return x ^ y\n\t}", "title": "" }, { "docid": "1e84230e9fbde409da712154e2d5fa88", "score": "0.4791298", "text": "function op_xor(x, y) {\n return x ^ y;\n }", "title": "" }, { "docid": "8f7249872dfadb2fd340c344d222f3d1", "score": "0.47879422", "text": "function op_xor(x, y)\n {\n return x ^ y;\n }", "title": "" }, { "docid": "8d571dd2643d235aeb9bdd1a59ca661c", "score": "0.47665688", "text": "function secondMirror() {\n let d = n2x * x + n2y * y;\n if (d < 0) {\n d += d;\n x -= d * n2x;\n y -= d * n2y;\n inversions += 1;\n change = true;\n }\n}", "title": "" }, { "docid": "916b2253743a1d58ad29ccbb718cd247", "score": "0.47652507", "text": "function op_xor(x, y) {\n return x ^ y;\n }", "title": "" }, { "docid": "916b2253743a1d58ad29ccbb718cd247", "score": "0.47652507", "text": "function op_xor(x, y) {\n return x ^ y;\n }", "title": "" }, { "docid": "21eaeb27791ffb62c3e5b2250cba9a35", "score": "0.4760285", "text": "skipKeyPressed(registerX){\n let key = this.vReg[registerX];\n if(this.pressedKeys[key]){\n this._skipInstruction();\n }\n }", "title": "" }, { "docid": "04c0f7fc2a833b7caaa35d61eec533c5", "score": "0.47491792", "text": "function ne(t, e, n, r, i, o, u, s) {\n return new ee(t, e, n, r, i, o, u, s);\n}", "title": "" }, { "docid": "8c551d4aa194084cb3189dee9c2b6b0d", "score": "0.47431794", "text": "function op_xor(x, y) {\n\treturn x ^ y;\n}", "title": "" }, { "docid": "0994ca9331f34611b7c162574a181ca5", "score": "0.47228128", "text": "function skip(event) {\n if (event.target.dataset.skip) {\n video.currentTime += Number(event.target.dataset.skip)\n }\n}", "title": "" }, { "docid": "8e455b4ca8aa28eaaf35355086490ace", "score": "0.47188723", "text": "function skip(state, handleElse) {\n var prog = state.prog;\n var ip = state.ip;\n var nesting = 1;\n var ins;\n\n do {\n ins = prog[++ip];\n if (ins === 0x58) {\n // IF\n nesting++;\n } else if (ins === 0x59) {\n // EIF\n nesting--;\n } else if (ins === 0x40) {\n // NPUSHB\n ip += prog[ip + 1] + 1;\n } else if (ins === 0x41) {\n // NPUSHW\n ip += 2 * prog[ip + 1] + 1;\n } else if (ins >= 0xb0 && ins <= 0xb7) {\n // PUSHB\n ip += ins - 0xb0 + 1;\n } else if (ins >= 0xb8 && ins <= 0xbf) {\n // PUSHW\n ip += (ins - 0xb8 + 1) * 2;\n } else if (handleElse && nesting === 1 && ins === 0x1b) {\n // ELSE\n break;\n }\n } while (nesting > 0);\n\n state.ip = ip;\n }", "title": "" }, { "docid": "e3714f4a1c1063dfbd082e2babae432c", "score": "0.47138676", "text": "DRW_Vx_Vy_nibble(op) {\n\t\tconst x = this.V[(op & 0xF00) >> 8];\n\t\tconst y = this.V[(op & 0xF0) >> 4];\n\t\tconst height = op & 0xF;\n\t\tlet row, spriteRow, col;\n\t\tthis.V[0xF] = 0;\n\t\tfor (col = 0; col < height; col++) {\n\t\t\tspriteRow = this.memory[this.I + col];\n\t\t\tfor (row = 0; row < 8; row++) {\n\t\t\t\tif (spriteRow & (0x80 >> row)) {\n\t\t\t\t\tif (this.graphics[x + row + 64*(y + col)])\n\t\t\t\t\t\tthis.V[0xF] = 1;\n\t\t\t\t\tthis.graphics[x + row + 64*(y + col)] ^= 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.drawFlag = true;\n\t\tthis.pc += 2;\n\t}", "title": "" }, { "docid": "9112f3000c6333e917e93450c34d199d", "score": "0.47030607", "text": "function isAdjacent(x1, y1, x2, y2, tileSize) {\n //TODO complete this\n return false;\n}", "title": "" }, { "docid": "e4f2edbc0c9c53fe87d43f68ffb11622", "score": "0.47022238", "text": "function ishidden(fromx, fromy, x, y, skip) {\n var i;\n for (i = 0; i < lines.length; ++i) {\n var line = lines[i];\n \n if (line.x1 == skip.x1 && line.y1 == skip.y1 && line.x2 == skip.x2 && line.y2 == skip.y2) {\n // skip\n continue;\n }\n \n var cross = linecross(fromx, fromy, x, y, line.x1, line.y1, line.x2, line.y2);\n if (cross) return true;\n }\n \n return false;\n}", "title": "" }, { "docid": "09ff37916c3993ad7ab7d5301593261c", "score": "0.47007358", "text": "function $1831e702d86f54be$var$op_xor(x, y) {\n return x ^ y;\n}", "title": "" }, { "docid": "8479e46ea92b2354809c13ecdd0f2639", "score": "0.4697693", "text": "function skip(state, handleElse)\n{\n var prog = state.prog;\n var ip = state.ip;\n var nesting = 1;\n var ins;\n\n do {\n ins = prog[++ip];\n if (ins === 0x58) // IF\n nesting++;\n else if (ins === 0x59) // EIF\n nesting--;\n else if (ins === 0x40) // NPUSHB\n ip += prog[ip + 1] + 1;\n else if (ins === 0x41) // NPUSHW\n ip += 2 * prog[ip + 1] + 1;\n else if (ins >= 0xB0 && ins <= 0xB7) // PUSHB\n ip += ins - 0xB0 + 1;\n else if (ins >= 0xB8 && ins <= 0xBF) // PUSHW\n ip += (ins - 0xB8 + 1) * 2;\n else if (handleElse && nesting === 1 && ins === 0x1B) // ELSE\n break;\n } while (nesting > 0);\n\n state.ip = ip;\n}", "title": "" }, { "docid": "6bedde4d30fb792ef70f846844942f60", "score": "0.46922132", "text": "function swap2() {\n\tvar a = 1, b = 2;\n\n\ta = a ^ b;\n\tb = a ^ b;\n\ta = a ^ b;\n\n\tif(a !== 2 || b !== 1)\n\t\tconsole.error('swap fail: ', a, b);\n}", "title": "" }, { "docid": "90266e7346db495c2753c1fdd25b5829", "score": "0.46879312", "text": "function OP_3xkk(opcode) {\n if (debug) console.log((PC-2).toString(16).padStart(3,'0').toUpperCase() + ' - ', numberToHexString(opcode), ` - SE Vx, byte`);\n if (V[(opcode & 0x0F00) >> 8] === (opcode & 0x00FF))\n PC += 2;\n}", "title": "" }, { "docid": "0a33796ed298c5e4e3ddbb504d5f6e06", "score": "0.46774197", "text": "isAdjacent(nodeX, nodeY){\n return(-1 < this.getNeighbors(nodeX).indexOf(String(nodeY)));\n }", "title": "" }, { "docid": "695ffca9c7cd7bfeca04931ceb3450eb", "score": "0.46699807", "text": "function skipX(da) {\n var skipYes = false;\n var cond1 = visMode === ZOOMY || visMode === ZOOMX;\n var numberNodes = rootSelection.select(\"g.sankeyFrame.single\").selectAll(\"g.node\").filter(function (d) {\n return d.nameX === da;\n });\n var cond2 = numberNodes.size() === 0;\n var numberNodes2 = numberNodes.filter(function (d) {\n return corrCategories().indexOf(d.nameY) !== -1;\n }).size();\n var cond3 = numberNodes2 === 0;\n\n skipYes = cond1 || cond2 || cond3;\n return skipYes;\n }", "title": "" }, { "docid": "fb62fab79dbbb257f9c06fda46a5cdb1", "score": "0.46592826", "text": "rem_s (a, b) { return new instr_pre(0x81, this, [a, b]) }", "title": "" }, { "docid": "40328faa450627c58dba5bf9b62b90c0", "score": "0.46552044", "text": "function testStrictNotEqual(val) {\n if (val !== 17) { // Change this line\n return \"Not Equal\";\n }\n return \"Equal\";\n}", "title": "" }, { "docid": "ce8c756e1dd66d8d082baad4a5f6df83", "score": "0.46547967", "text": "AND_Vx_Vy(op) {\n\t\tthis.V[(op & 0xF00) >> 8] &= this.V[(op & 0xF0) >> 4];\n\t\tthis.pc += 2;\n\t}", "title": "" }, { "docid": "5e1bd68a8827b5d607c20b8a9957d3e1", "score": "0.46543014", "text": "function NOT_OP(x) {\n return ~x + 2;\n }", "title": "" }, { "docid": "d752cc26a9bb4652bc390cd5ab157503", "score": "0.46505356", "text": "function op_xor(x, y) {\n return x ^ y;\n}", "title": "" }, { "docid": "d752cc26a9bb4652bc390cd5ab157503", "score": "0.46505356", "text": "function op_xor(x, y) {\n return x ^ y;\n}", "title": "" }, { "docid": "001010e977494701ddc4025cd57ca932", "score": "0.4645527", "text": "function skip() {\r\n video.currentTime += parseFloat(this.dataset.skip);\r\n}", "title": "" }, { "docid": "fb36e4ffdabc0560cf40c2aa82f54981", "score": "0.46439233", "text": "function skip(state, handleElse)\n {\n var prog = state.prog;\n var ip = state.ip;\n var nesting = 1;\n var ins;\n\n do {\n ins = prog[++ip];\n if (ins === 0x58) // IF\n { nesting++; }\n else if (ins === 0x59) // EIF\n { nesting--; }\n else if (ins === 0x40) // NPUSHB\n { ip += prog[ip + 1] + 1; }\n else if (ins === 0x41) // NPUSHW\n { ip += 2 * prog[ip + 1] + 1; }\n else if (ins >= 0xB0 && ins <= 0xB7) // PUSHB\n { ip += ins - 0xB0 + 1; }\n else if (ins >= 0xB8 && ins <= 0xBF) // PUSHW\n { ip += (ins - 0xB8 + 1) * 2; }\n else if (handleElse && nesting === 1 && ins === 0x1B) // ELSE\n { break; }\n } while (nesting > 0);\n\n state.ip = ip;\n }", "title": "" }, { "docid": "df93d4605e8d5de828fdec354c9980ef", "score": "0.46432713", "text": "function op_xor(x, y) {\n return x ^ y\n}", "title": "" }, { "docid": "df93d4605e8d5de828fdec354c9980ef", "score": "0.46432713", "text": "function op_xor(x, y) {\n return x ^ y\n}", "title": "" }, { "docid": "df93d4605e8d5de828fdec354c9980ef", "score": "0.46432713", "text": "function op_xor(x, y) {\n return x ^ y\n}", "title": "" }, { "docid": "df93d4605e8d5de828fdec354c9980ef", "score": "0.46432713", "text": "function op_xor(x, y) {\n return x ^ y\n}", "title": "" }, { "docid": "df93d4605e8d5de828fdec354c9980ef", "score": "0.46432713", "text": "function op_xor(x, y) {\n return x ^ y\n}", "title": "" }, { "docid": "df93d4605e8d5de828fdec354c9980ef", "score": "0.46432713", "text": "function op_xor(x, y) {\n return x ^ y\n}", "title": "" }, { "docid": "df93d4605e8d5de828fdec354c9980ef", "score": "0.46432713", "text": "function op_xor(x, y) {\n return x ^ y\n}", "title": "" }, { "docid": "df93d4605e8d5de828fdec354c9980ef", "score": "0.46432713", "text": "function op_xor(x, y) {\n return x ^ y\n}", "title": "" }, { "docid": "df93d4605e8d5de828fdec354c9980ef", "score": "0.46432713", "text": "function op_xor(x, y) {\n return x ^ y\n}", "title": "" }, { "docid": "df93d4605e8d5de828fdec354c9980ef", "score": "0.46432713", "text": "function op_xor(x, y) {\n return x ^ y\n}", "title": "" }, { "docid": "df93d4605e8d5de828fdec354c9980ef", "score": "0.46432713", "text": "function op_xor(x, y) {\n return x ^ y\n}", "title": "" }, { "docid": "df93d4605e8d5de828fdec354c9980ef", "score": "0.46432713", "text": "function op_xor(x, y) {\n return x ^ y\n}", "title": "" }, { "docid": "df93d4605e8d5de828fdec354c9980ef", "score": "0.46432713", "text": "function op_xor(x, y) {\n return x ^ y\n}", "title": "" }, { "docid": "df93d4605e8d5de828fdec354c9980ef", "score": "0.46432713", "text": "function op_xor(x, y) {\n return x ^ y\n}", "title": "" }, { "docid": "df93d4605e8d5de828fdec354c9980ef", "score": "0.46432713", "text": "function op_xor(x, y) {\n return x ^ y\n}", "title": "" }, { "docid": "f856e2429a507e99e085694b5839a85c", "score": "0.4641136", "text": "function XOR_OP(x, y) {\n return x ^ y;\n }", "title": "" }, { "docid": "4dc801584b18329d6e8b214b5d371571", "score": "0.46113935", "text": "opcode0xEX9E (){\n let num = this.register_V[(this.opcode & 0x0F00) >> 8];\n if (this.key[num] === 1){\n this.program_counter += 2;\n if (debugMode == true) {\n }\n }\n\n if (debugMode == true) {\n console.log(\"Opcode 0x\" + this.opcode.toString(16).toUpperCase() + \": Skip next instruction if key with value of Vx is pressed.\");\n }\n }", "title": "" }, { "docid": "9c07fffebebf5df907dd86ae4961b8ee", "score": "0.4588178", "text": "function op_xor(x,y) { return x^y; }", "title": "" }, { "docid": "9c07fffebebf5df907dd86ae4961b8ee", "score": "0.4588178", "text": "function op_xor(x,y) { return x^y; }", "title": "" }, { "docid": "9c07fffebebf5df907dd86ae4961b8ee", "score": "0.4588178", "text": "function op_xor(x,y) { return x^y; }", "title": "" }, { "docid": "9c07fffebebf5df907dd86ae4961b8ee", "score": "0.4588178", "text": "function op_xor(x,y) { return x^y; }", "title": "" }, { "docid": "9c07fffebebf5df907dd86ae4961b8ee", "score": "0.4588178", "text": "function op_xor(x,y) { return x^y; }", "title": "" }, { "docid": "9c07fffebebf5df907dd86ae4961b8ee", "score": "0.4588178", "text": "function op_xor(x,y) { return x^y; }", "title": "" }, { "docid": "9c07fffebebf5df907dd86ae4961b8ee", "score": "0.4588178", "text": "function op_xor(x,y) { return x^y; }", "title": "" }, { "docid": "9c07fffebebf5df907dd86ae4961b8ee", "score": "0.4588178", "text": "function op_xor(x,y) { return x^y; }", "title": "" }, { "docid": "9c07fffebebf5df907dd86ae4961b8ee", "score": "0.4588178", "text": "function op_xor(x,y) { return x^y; }", "title": "" }, { "docid": "9c07fffebebf5df907dd86ae4961b8ee", "score": "0.4588178", "text": "function op_xor(x,y) { return x^y; }", "title": "" }, { "docid": "9c07fffebebf5df907dd86ae4961b8ee", "score": "0.4588178", "text": "function op_xor(x,y) { return x^y; }", "title": "" }, { "docid": "9c07fffebebf5df907dd86ae4961b8ee", "score": "0.4588178", "text": "function op_xor(x,y) { return x^y; }", "title": "" } ]
574480742ce5658fad221f03181c60c2
extension bar functions to change name, links, rank, discovery points, and regions, respectively (this functionality is not yet implemented in the system itself.)
[ { "docid": "267f56f2350459669637a5e2bdbf6cd4", "score": "0.0", "text": "function setName(name)\n{\n document.getElementById(\"name\").innerHTML = name;\n}", "title": "" } ]
[ { "docid": "06530278a7d0b800be6768cab2c58f5c", "score": "0.6440348", "text": "setBarLabel(text) { this._behavior('set bar label(text)'); }", "title": "" }, { "docid": "9ec459ddeda01ace3aa51bfb5ffbb472", "score": "0.61653614", "text": "function modifyBar(uiName, barName, varName, args){\n\t\tvar bar = uiElements.find(uiName).subElements.find(barName);\n\t\tswitch(varName){\n\t\t\tcase(\"all\"):\n\t\t\t\tbar.setName(args.name);\n\t\t\t\tbar.setOffset(args.xOff, args,yOff);\n\t\t\t\tbar.setBounds(args.width, args.height);\n\t\t\t\tbar.setBorder(args.color, args.width);\n\t\t\t\tbar.setFill(args.color);\n\t\t\t\tbar.setImage(args.image);\n\t\t\t\tbar.setText(args.string, args.css, args.color);\n\t\t\t\tbar.setTarget(args.tgtVar, args.tgtMax, args.tgtMin);\n\t\t\t\tbreak;\n\t\t\tcase(\"name\"):\n\t\t\t\tbar.setName(args.name);\n\t\t\t\tbreak;\n\t\t\tcase(\"offset\"):\n\t\t\t\tbar.setOffset(args.xOff, args,yOff);\n\t\t\t\tbreak;\n\t\t\tcase(\"position\"):\n\t\t\t\tbut.setPosition(args.xPos, args.yPos);\n\t\t\t\tbreak;\n\t\t\tcase(\"bounds\"):\n\t\t\t\tbar.setBounds(args.width, args.height);\n\t\t\t\tbreak;\n\t\t\tcase(\"border\"):\n\t\t\t\tbar.setBorder(args.color, args.width);\n\t\t\t\tbreak;\n\t\t\tcase(\"fill\"):\n\t\t\t\tbar.setFill(args.backColor, args.foreColor);\n\t\t\t\tbreak;\n\t\t\tcase(\"image\"):\n\t\t\t\tbar.setImage(args.backImage, args.foreImage);\n\t\t\t\tbreak;\n\t\t\tcase(\"text\"):\n\t\t\t\tbar.setText(args.string, args.css, args.color);\n\t\t\t\tbreak;\n\t\t\tcase(\"target\"):\n\t\t\t\tbar.setTarget(args.tgtVar, args.tgtMax, args.tgtMin);\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "31302c277577ff9b5a7a4d2a528b4ad6", "score": "0.5771949", "text": "function drawBarUpdate(ob){\n var width = ob.width;\n console.log(ob);\n d3.select(\".bar-rect-\"+ob.k).selectAll(\"rect\").data(data.genomicProfileList[ob.k].mutationList)\n .attr({\n width:width-5,\n x:function(d,i){ return i*(width)},\n });\n\n d3.select(\".bar-text-\"+ob.k).selectAll(\"text\").data(data.genomicProfileList[ob.k].mutationList).text(function(d){\n if (ob.val == \"geneSymbol\") {\n return d.geneSymbol;\n } else if (ob.val == \"strand\") {\n return d.strand;\n } else {\n return d.chromosome.substring(3,5);\n }\n })\n .attr({\n \"font-size\":\"10px\",\n x:function(d,i){ return i*(width)+ob.offset},\n })\n .on(\"click\",function(d,i){\n d3.select(\".bar-rect-\"+ob.k).select(\"rect:nth-child(\"+(i+1)+\")\").style(\"fill\",\"red\");\n var obAnalyticDet = {\n entrezGeneId: d.entrezGeneId,\n geneSymbol: d.geneSymbol,\n referenceGenome: d.referenceGenome,\n chromosome: d.chromosome,\n dnaStartPosition: d.dnaStartPosition,\n dnaEndPosition: d.dnaEndPosition,\n strand: d.strand,\n variantClassification: d.variantClassification,\n referenceAllele: d.referenceAllele,\n variantAllele: d.variantAllele,\n alternativeAlleleReads: d.alternativeAlleleReads,\n referenceAlleleReads: d.referenceAlleleReads,\n dbSnpRsId: d.dbSnpRsId,\n dbSnpRsValStatus: d.dbSnpRsValStatus,\n annotationTranscript: d.annotationTranscript,\n transcriptStrand: d.transcriptStrand,\n cDnaChange: d.cDnaChange,\n codonChange: d.codonChange,\n aaChange: d.aaChange,\n otherTranscript: d.otherTranscript,\n refseqMrnaId: d.refseqMrnaId,\n refseqProtId: d.refseqProtId,\n swissprotAccession: d.swissprotAccession,\n swissprotEntry: d.swissprotEntry,\n uniprotAaPosition: d.uniprotAaPosition,\n uniprotRegion: d.uniprotRegion,\n uniprotSite: d.uniprotSite,\n vertebrateAaAlignment: d.vertebrateAaAlignment\n }\n analyticDetails(obAnalyticDet);\n });\n }", "title": "" }, { "docid": "cc74e7bbfffbd8a00c8a711340f2168a", "score": "0.56370544", "text": "function optionChanged(new_name) {\n build_barchart(new_name);\n build_table(new_name);\n\n}", "title": "" }, { "docid": "dcff8b99505706154b1f7bfb595b6f40", "score": "0.55483764", "text": "function addMinimizedBar() {\r\n\tvar url = document.location.href;\r\n\tvar names = ['main','barracks','stable','garage','church','snob','smith','place','statue','market','wood','stone','iron','farm','storage','hide','wall'];\r\n\t\r\n\tconst decreaseIcon = '<img alt=\"هدم مستوى واحد: \" src=\"data:image/gif;base64,' + \r\n\t'iVBORw0KGgoAAAANSUhEUgAAAAkAAAAQAQMAAAD+hscAAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAA' + \r\n\t'BlBMVEXsHOUAAACAUKm/AAAAAXRSTlMAQObYZgAAACRJREFUeF5dyLENAAAERcFfGsIsVmNzvEIj' + \r\n\t'uerk+rqQQqx7wwCKiAVpyLisFQAAAABJRU5ErkJggg==\" />';\r\n\t\r\n\tconst increaseIcon = '<img alt=\"هدم مستوى واحد: \" src=\"data:image/gif;base64,' + \r\n\t'iVBORw0KGgoAAAANSUhEUgAAAAkAAAAQAQMAAAD+hscAAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAA' + \r\n\t'BlBMVEXsHOUAAACAUKm/AAAAAXRSTlMAQObYZgAAACNJREFUeF5dyLENAAAIAjBGj/AWXtPPFRlN' + \r\n\t'OhWBk0Yrmxbls3zABWlcjOpjAAAAAElFTkSuQmCC\" />';\r\n\t\r\n\tvar result = {};\r\n\t\r\n\t// Add placeholders\r\n\tfor(var x = 0; x < names.length; x++) {\r\n\t\tresult[names[x]] = '--';\r\n\t}\r\n\t\r\n\t// Get 'Decrease' Buildings\r\n\tvar list = _evaluate('//a[.=\"هدم مستوى واحد\"]/parent::td');\r\n\tfor(var x = 0; x < list.length; x++) {\r\n\t\tvar a = list[x].getElementsByTagName(\"a\")[0];\r\n\t\tvar name = a.href.match(/building_id=(\\w+)/)[1];\r\n\t\t\r\n\t\tvar display = _trim(list[x].parentNode.getElementsByTagName(\"a\")[0].textContent);\r\n\t\t\r\n\t\t// Walk through the building queue to get next level\r\n\t\tvar build_queue = _evaluate('//table[@id=\"build_queue\"]/tbody/tr/td');\r\n\t\tvar level = 0;\r\n\t\tfor(var y = 0; y < build_queue.length; y++) {\r\n\t\t\tif(build_queue[y].textContent.indexOf(display) != -1) {\r\n\t\t\t\tlevel = (build_queue[y].textContent.match(/(\\d{1,2})/)) ? RegExp.$1 : level-1;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Was not in building queue\r\n\t\tif(level <= 0) {\r\n\t\t\tlevel += parseInt(list[x].parentNode.getElementsByTagName('span')[0].textContent.match(/(\\d{1,2})/)[1], 10);\r\n\t\t}\r\n\t\t\r\n\t\tresult[name] = '<a href=\"' + a.href + '\">' + decreaseIcon + ' ' + (parseInt(level)-1) + '</a>';\r\n\t}\r\n\t\r\n\t// Get 'Increase' Buildings\r\n\tvar list = _evaluate('//a[contains(., \"Ausbau auf Stufe\")]/parent::td');\r\n\tfor(var x = 0; x < list.length; x++) {\r\n\t\tvar a = list[x].getElementsByTagName(\"a\")[0];\r\n\t\tvar name = a.href.match(/id=(\\w+)/)[1];\r\n\t\t\r\n\t\tvar display = _trim(list[x].parentNode.getElementsByTagName(\"a\")[0].textContent);\r\n\t\t\r\n\t\t// Walk through the building queue to get next level\r\n\t\tvar build_queue = _evaluate('//table[@id=\"build_queue\"]/tbody/tr/td');\r\n\t\tvar level = false;\r\n\t\tfor(var y = 0; y < build_queue.length; y++) {\r\n\t\t\tif(build_queue[y].textContent.indexOf(display) != -1) {\r\n\t\t\t\tlevel = build_queue[y].textContent.match(/(\\d{1,2})/)[1];\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Was not in building queue\r\n\t\tif(level === false) {\r\n\t\t\tlevel = list[x].parentNode.getElementsByTagName('span')[0].textContent.match(/(\\d{1,2})/)[1];\r\n\t\t}\r\n\t\t\r\n\t\tresult[name] = '<a href=\"' + a.href + '\">' + increaseIcon + ' ' + (parseInt(level)+1) + '</a>';\r\n\t}\r\n\t\r\n\t// Get Not Exist Buildings\r\n\tvar list = _evaluate('//table[@id=\"buildings\"]/tbody/tr/td/a[.=\"Bauen\"]/parent::td');\r\n\tfor(var x = 0; x < list.length; x++) {\r\n\t\tvar a = list[x].getElementsByTagName(\"a\")[0];\r\n\t\tvar name = a.href.match(/id=(\\w+)/)[1];\r\n\t\tlevel = 0; \r\n\t\t\r\n\t\tresult[name] = '<a href=\"' + a.href + '\">' + increaseIcon + ' ' + (parseInt(level)+1) + '</a>';\r\n\t}\r\n\t\r\n\t// Add bar\r\n\tvar table = document.createElement(\"table\");\r\n\ttable.id = \"minimizeBar\";\r\n\ttable.style.display = \"block\";\r\n\ttable.className = \"vis\";\r\n\tdocument.getElementById(\"content_value\").insertBefore(table, document.getElementById(\"content_value\").getElementsByTagName('table')[0].nextSibling);\r\n\tdocument.getElementById(\"content_value\").insertBefore(document.createElement(\"br\"), table);\r\n\t\r\n\tvar span = document.createElement(\"span\");\r\n\tdocument.getElementById(\"content_value\").insertBefore(span, table);\r\n\t\r\n\tvar colgroup = table.appendChild(document.createElement(\"colgroup\"));\r\n\tcolgroup.width = \"50\";\r\n\tcolgroup.span = names.length+1;\r\n\t\r\n\tvar tr0 = table.appendChild(document.createElement(\"tr\"));\r\n\tvar tr1 = table.appendChild(document.createElement(\"tr\"));\r\n\t\r\n\tfor(var x = 0; x < names.length; x++) {\r\n\t\tvar th = tr0.appendChild(document.createElement(\"th\"));\r\n\t\tth.style.textAlign = \"center\";\r\n\t\t\r\n\t\tvar img = th.appendChild(document.createElement(\"img\"));\r\n\t\timg.src = \"/graphic/buildings/\" + names[x] + \".png\";\r\n\t\t\r\n\t\tvar td = tr1.appendChild(document.createElement(\"td\"));\r\n\t\ttd.innerHTML = result[names[x]];\r\n\t\ttd.style.textAlign = \"center\";\r\n\t\tif(result[names[x]] != \"--\") {\r\n\t\t\ttd.style.backgroundColor = \"#fadc9b\";\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "78938a1cd80b66278f232560ba26f6e2", "score": "0.5461991", "text": "function handleHover(centered, d){\n mediumlightBar(mapObj[d.properties.ID].realname);\n}", "title": "" }, { "docid": "b79b6f081bb0d8571ac87c09774a2849", "score": "0.54585236", "text": "function optionChanged(id) {\n barBubbleDemo(id);\n}", "title": "" }, { "docid": "ea6208f05d9234bf9ad743fad238fc0e", "score": "0.54504925", "text": "function updateSubGraph(name, status) {\r\n var keys = [];\r\n var data = [];\r\n if (name === \"Hochregallager\") {\r\n keys = [\"1 -Referenztaster horizontal\", \"2 - Referenztaster vertikal\", \"3 - Referenztaster Ausleger vorne\", \"4 - Referenztaster Ausleger hinten\", \"5 - Lichtschranke innen\", \"6 - Lichtschranke aussen\", \"7 - H-horizontal\", \"8 - H-vertikal\"]\r\n for (var i = keys.length - 1; i >= 0; i--) {\r\n data.unshift({ key: i + 1, count: status.details[i], name: keys[i] })\r\n }\r\n } else if (name === \"Bearbeitungsstation\") {\r\n keys = [\"1 - B-Referenzschalter Drehkranz (Pos. Sauger)\", \"2 - B-Referenzschalter Drehkranz (Pos. Foerderband)\", \"3 - B-Lichtschranke Ende Foerderband\", \"4 - B-Referenzschalter Drehkranz (Pos. Saege)\", \"5 - B-Referenzschalter Sauger (Pos. Drehkranz)\", \"6 - B-Referenzschalter Ofenschieber Innen\", \"7 - B-Referenzschalter Ofenschieber Aussen\", \"8 - B-Referenzschalter Sauger (Pos. Brennofen)\", \"9 - B-Lichtschranke Brennofen\", \"10 - B-Motor Drehkranz im Uhrzeigersinn\", \"11 - B-Motor Drehkranz gegen Uhrzeigersinn\", \"12 - B-Motor Foerderband vorwaerts\", \"13 - B-Motor Saege\", \"14 - B-Motor Ofenschieber Einfahren\", \"15 - B-Motor Ofenschieber Ausfahren\", \"16 - B-Motor Sauger zum Ofen\", \"17 - B-Motor Sauger zum Drehkranz\"]\r\n for (var i = keys.length - 1; i >= 0; i--) {\r\n data.unshift({ key: i + 1, count: status.details[i], name: keys[i] })\r\n }\r\n } else if (name === \"Sortierstrecke\") {\r\n keys = [\"1 - S-Lichtschranke Eingang\", \"2 - S-Lichtschranke nach Farbsensor\", \"3 - S-Lichtschranke weiss\", \"4 - S-Lichtschranke rot\", \"5 - S-Lichtschranke blau\", \"6 - S-Motor Foerderband\"]\r\n for (var i = keys.length - 1; i >= 0; i--) {\r\n data.unshift({ key: i + 1, count: status.details[i], name: keys[i] })\r\n }\r\n } else {\r\n keys = [\"1 - V-Referenzschalter vertikal\", \"2 - V-Referenzschalter horizontal\", \"3 - V-Referenzschalter drehen\", \"4 - V-vertikal\", \"5 - V-horizontal\", \"6 - V-drehen\"]\r\n for (var i = keys.length - 1; i >= 0; i--) {\r\n data.unshift({ key: i + 1, count: status.details[i], name: keys[i] })\r\n }\r\n }\r\n // delete current content of div\r\n d3.select(\"#Subgraph\").html(null);\r\n\r\n // set the dimensions and margins of the graph\r\n var StatuschangeDiv = document.getElementById(\"Subgraph\")\r\n console.log(StatuschangeDiv);\r\n console.log(StatuschangeDiv.getBoundingClientRect().width);\r\n\r\n var margin = { top: 10, right: 10, bottom: 30, left: 40 },\r\n width = StatuschangeDiv.getBoundingClientRect().width - margin.left - margin.right,\r\n height = StatuschangeDiv.getBoundingClientRect().height - margin.top - margin.bottom;\r\n\r\n // append the svg object to the body of the page\r\n var subsvg = d3.select(\"#Subgraph\")\r\n .append(\"svg\")\r\n .attr(\"width\", width + margin.left + margin.right)\r\n .attr(\"height\", height + margin.top + margin.bottom)\r\n .attr(\"style\", \"outline: thin solid black;\")\r\n .attr(\"class\", \"Statussub\")\r\n .append(\"g\")\r\n .attr(\"transform\", `translate(${margin.left},${margin.top})`);\r\n\r\n // X axis\r\n var x = d3.scaleBand()\r\n .range([0, width])\r\n .padding(0.2);\r\n\r\n var xAxis = subsvg.append(\"g\")\r\n .attr(\"transform\", `translate(0,${height})`)\r\n\r\n // Update X Axis\r\n x.domain(data.map(d => d.key))\r\n xAxis.call(d3.axisBottom(x))\r\n .selectAll(\"text\")\r\n .attr(\"transform\", \"translate(0,0)rotate(-10)\")\r\n .style(\"text-anchor\", \"middle\")\r\n .style(\"font-size\", Math.round(width / 30) + \"px\");\r\n\r\n // Add Y axis\r\n var y = d3.scaleLinear()\r\n .range([height, 0]);\r\n\r\n var yAxis = subsvg.append(\"g\")\r\n .attr(\"class\", \"YAxis\");\r\n\r\n // Update Y Axis\r\n y.domain([0, d3.max(data, d => d.count) + 50])\r\n yAxis.transition().duration(1000).call(d3.axisLeft(y))\r\n\r\n // Create the u variable\r\n var u = subsvg.selectAll(\"rect\")\r\n .data(data)\r\n\r\n\r\n u\r\n .join(\"rect\") // Add a new rect for each new elements\r\n .attr(\"x\", d => x(d.key))\r\n .attr(\"y\", d => y(d.count))\r\n .attr(\"width\", x.bandwidth())\r\n .attr(\"height\", d => height - y(d.count))\r\n .attr(\"fill\", \"#69b3a2\")\r\n\r\n u.join(\"text\")\r\n .attr(\"text-anchor\", \"middle\")\r\n .attr(\"x\", function(d) { return x(d.key) + x.bandwidth() / 2; })\r\n .attr(\"y\", function(d) { return y(d.count) - 05; })\r\n .style(\"font-size\", Math.round(width / 25) + \"px\")\r\n .text(function(d) { return d.count; });\r\n\r\n d3.select(\"#SubgraphInfo\")\r\n .html('<h4>Legende</h4>' + keys.join('<br/>'))\r\n .style(\"font-size\", Math.round(document.getElementById(\"Subgraph\").getBoundingClientRect().width / 30) + \"px\");\r\n}", "title": "" }, { "docid": "ca7579133e0b0bed842330fb2fc2c21d", "score": "0.54406846", "text": "function updateDetails(){\n\t// Title\n\td3.select(\"#region-name\")\n\t\t.text(regionSelected.name);\n}", "title": "" }, { "docid": "ca2db1a013d9e8bb0fbab14061577907", "score": "0.542777", "text": "function generateBar(classToAdd, cursor, left, top, height, width, indexAttr, index) {\n var bar = {\n 'data-mce-bogus': 'all',\n 'class': RESIZE_BAR_CLASS + ' ' + classToAdd,\n 'unselectable': 'on',\n 'data-mce-resize': false,\n style: 'cursor: ' + cursor + '; ' +\n 'margin: 0; ' +\n 'padding: 0; ' +\n 'position: absolute; ' +\n 'left: ' + left + 'px; ' +\n 'top: ' + top + 'px; ' +\n 'height: ' + height + 'px; ' +\n 'width: ' + width + 'px; '\n };\n\n bar[indexAttr] = index;\n\n return bar;\n }", "title": "" }, { "docid": "390c1d7d56406e7a1e14da6e6268a469", "score": "0.5389597", "text": "setNewBarValue(buttonLabel, barValue) {\n return barValue + buttonLabel;\n }", "title": "" }, { "docid": "34a00790d067703f4689d351cb1080cb", "score": "0.5385493", "text": "function statBar (s)\r\n{ window.status = s\r\n}", "title": "" }, { "docid": "29211ee3e2bfbdda629e89fe59b350e5", "score": "0.53734636", "text": "_updateAriaForLayers() {\n var translations = this.Options.translations;\n\n this._dataAreaLayers.setAriaProperty('label', translations.areasRegion, true);\n this._dataPointLayers.setAriaProperty('label', translations.markersRegion, true);\n this._linkLayers.setAriaProperty('label', translations.linksRegion, true);\n }", "title": "" }, { "docid": "155040e08c978a713b513fad59d09938", "score": "0.5339545", "text": "function updateUtilsBar() {\r\n if(sigs_toggle.checked) {\r\n sigs_bar.e.style.display = 'block';\r\n } else {\r\n sigs_bar.e.style.display = 'none'; \r\n }\r\n if(snips_toggle.checked) {\r\n snips_bar.e.style.display = 'block';\r\n } else {\r\n snips_bar.e.style.display = 'none'; \r\n }\r\n if(markersCount() > 1) {\r\n multiform.e.style.display = 'block';\r\n } else {\r\n multiform.e.style.display = 'none';\r\n }\r\n}", "title": "" }, { "docid": "d10f1ff857ae66187dd8dd96d02cfac9", "score": "0.52968556", "text": "function levelbar(assesstype,category,data,options,title)\n{\n var count=0;\n var classcount=0;\n var classnames=[];\n var grid=12;\n for(classname in assesstype)\n {\n classnames.push(classname);\n classcount=classcount+1;\n }\n classnames.sort();\n grid=grid/2;\n var width=400;\n var numgraphs=2;\n if(info['type']=='preschool'|| info['type']=='project' || info['type']=='circle' || info['type']=='preschooldistrict')\n {\n width=650;\n numgraphs=1\n }\n if(info[\"programme\"][\"pid\"]==6 || info[\"programme\"][\"pid\"]==15)\n {\n width=700;\n numgraphs=1\n }\n var height=300;\n\n var count=0;\n \n for(var i = 0; i < classnames.length; i++)\n {\n count=count+1;\n var classname=classnames[i];\n var colors=[];\n var chartdata={};\n var graphdata=[];\n\n data[classname]=new google.visualization.DataTable();\n data[classname].addColumn('string',\"Domain-Text\");\n for(type in info[\"base\"][category])\n {\n data[classname].addColumn('number',type);\n if(type in color)\n {\n colors.push(color[type]);\n }\n }\n for(domain in assesstype[classname]) \n {\n for(text in assesstype[classname][domain])\n { \n var datarow=[];\n if( text=='order')\n continue;\n if(domain !='')\n datarow.push(domain+\" (\"+text+\")\");\n else\n datarow.push(text);\n value=Math.round(info[\"baseline\"][classname][domain][text][\"value\"]);\n for(type in info[\"base\"][category])\n {\n if(type in assesstype[classname][domain][text][category])\n datarow.push(assesstype[classname][domain][text][category][type]);\n else\n datarow.push(0);\n }\n index=info[\"baseline\"][classname][domain][\"order\"]*info[\"base\"][\"classes\"][classname][\"assesstext\"].length+info[\"baseline\"][classname][domain][text][\"order\"];\n graphdata[index]=datarow;\n }\n }\n for(datacount in graphdata)\n {\n data[classname].addRow(graphdata[datacount]);\n }\n options[classname]=fillOptions(options[classname],classname,title,width,height);\n if(colors.length >0 )\n options[classname]['colors']=colors;\n }\n}", "title": "" }, { "docid": "d24bbf788a6c2719de19e5cdad04c7a8", "score": "0.529338", "text": "function drawBar(k){\n var bar_height = 20;\n d3.select(\"#chart svg\").append(\"g\").attr(\"class\",\"bar-rect-\"+k).attr(\"transform\",\"translate(\"+(margin.left)+\",\"+(k*bar_height+margin.top)+\")\").selectAll(\"rect\").data(data.genomicProfileList[k].mutationList).enter().append(\"rect\")\n .on(\"click\",function(d){\n d3.select(this).style(\"fill\",\"red\")\n var obAnalyticDet = {\n entrezGeneId: d.entrezGeneId,\n geneSymbol: d.geneSymbol,\n referenceGenome: d.referenceGenome,\n chromosome: d.chromosome,\n dnaStartPosition: d.dnaStartPosition,\n dnaEndPosition: d.dnaEndPosition,\n strand: d.strand,\n variantClassification: d.variantClassification,\n referenceAllele: d.referenceAllele,\n variantAllele: d.variantAllele,\n alternativeAlleleReads: d.alternativeAlleleReads,\n referenceAlleleReads: d.referenceAlleleReads,\n dbSnpRsId: d.dbSnpRsId,\n dbSnpRsValStatus: d.dbSnpRsValStatus,\n annotationTranscript: d.annotationTranscript,\n transcriptStrand: d.transcriptStrand,\n cDnaChange: d.cDnaChange,\n codonChange: d.codonChange,\n aaChange: d.aaChange,\n otherTranscript: d.otherTranscript,\n refseqMrnaId: d.refseqMrnaId,\n refseqProtId: d.refseqProtId,\n swissprotAccession: d.swissprotAccession,\n swissprotEntry: d.swissprotEntry,\n uniprotAaPosition: d.uniprotAaPosition,\n uniprotRegion: d.uniprotRegion,\n uniprotSite: d.uniprotSite,\n vertebrateAaAlignment: d.vertebrateAaAlignment\n }\n analyticDetails(obAnalyticDet);\n })\n // .on(\"mouseover\",function(d){\n // d3.select(this).style(\"opacity\",\".8\");\n // tooltip.transition().style(\"opacity\",\"1\")\n // // console.log(d)\n // tooltip.html(d.geneSymbol)\n // .style(\"left\",(d3.event.pageX)+\"px\")\n // .style(\"top\",(d3.event.pageY)-15+\"px\")\n // })\n // .on(\"mouseout\",function(d){\n // d3.select(this).style(\"opacity\",\"1\");\n // tooltip.transition().style(\"opacity\",\"0\")\n // })\n .attr({\n width:width/(data.genomicProfileList[k].mutationList.length)-5,\n x:function(d,i){ return i*(width/(data.genomicProfileList[k].mutationList.length))},\n height:bar_height,\n y:k*bar_height+5\n }).style(\"fill\",\"#575757\").style(\"cursor\",\"pointer\");\n\n d3.select(\"svg\").append(\"g\").attr(\"class\",\"bar-text-\"+k).attr(\"transform\",\"translate(\"+(margin.left)+\",\"+(k*bar_height+margin.top)+\")\").selectAll(\"text\").data(data.genomicProfileList[k].mutationList).enter().append(\"text\").text(function(d){\n return d.chromosome.substring(3,5);\n }).attr({\n \"text-anchor\":\"middle\",\n \"font-size\":\"10px\",\n x:function(d,i){ return i*(width/(data.genomicProfileList[k].mutationList.length))+8},\n y:k*bar_height+19,\n \"fill\":\"#FFF\",\n \"font-weight\":\"bold\",\n \"cursor\":\"pointer\"\n })\n .on(\"click\",function(d,i){\n d3.select(\".bar-rect-\"+k).select(\"rect:nth-child(\"+(i+1)+\")\").style(\"fill\",\"red\");\n var obAnalyticDet = {\n entrezGeneId: d.entrezGeneId,\n geneSymbol: d.geneSymbol,\n referenceGenome: d.referenceGenome,\n chromosome: d.chromosome,\n dnaStartPosition: d.dnaStartPosition,\n dnaEndPosition: d.dnaEndPosition,\n strand: d.strand,\n variantClassification: d.variantClassification,\n referenceAllele: d.referenceAllele,\n variantAllele: d.variantAllele,\n alternativeAlleleReads: d.alternativeAlleleReads,\n referenceAlleleReads: d.referenceAlleleReads,\n dbSnpRsId: d.dbSnpRsId,\n dbSnpRsValStatus: d.dbSnpRsValStatus,\n annotationTranscript: d.annotationTranscript,\n transcriptStrand: d.transcriptStrand,\n cDnaChange: d.cDnaChange,\n codonChange: d.codonChange,\n aaChange: d.aaChange,\n otherTranscript: d.otherTranscript,\n refseqMrnaId: d.refseqMrnaId,\n refseqProtId: d.refseqProtId,\n swissprotAccession: d.swissprotAccession,\n swissprotEntry: d.swissprotEntry,\n uniprotAaPosition: d.uniprotAaPosition,\n uniprotRegion: d.uniprotRegion,\n uniprotSite: d.uniprotSite,\n vertebrateAaAlignment: d.vertebrateAaAlignment\n }\n analyticDetails(obAnalyticDet);\n\n\n })\n // .on(\"mouseover\",function(d){\n // d3.select(this).style(\"opacity\",\".8\");\n // tooltip.transition().style(\"opacity\",\"1\")\n // // console.log(d)\n // tooltip.html(d.geneSymbol)\n // .style(\"left\",(d3.event.pageX)+\"px\")\n // .style(\"top\",(d3.event.pageY)-15+\"px\")\n // })\n // .on(\"mouseout\",function(d){\n // d3.select(this).style(\"opacity\",\"1\");\n // tooltip.transition().style(\"opacity\",\"0\")\n // })\n }", "title": "" }, { "docid": "140795dce813d9ebecc89586767f5cd1", "score": "0.52456856", "text": "function makeBar(uiName, barName, offsetX, offsetY, width, height, tgtVar, tgtMax, tgtMin){\n\t\tuiElements.find(uiName).subElements.push(new Bar(uiName, barName, offsetX, offsetY, width, height, tgtVar, tgtMax, tgtMin));\n\t}", "title": "" }, { "docid": "8b1e2f588513f6ea61de71a10c3f1734", "score": "0.5239065", "text": "function updateBar(name, offset) {\n document.querySelector('#' + name + '-time-bar').style.left = offset + \"px\";\n}", "title": "" }, { "docid": "5838b46fb13cb9f98be70140d2b6398d", "score": "0.52335745", "text": "redoAllTabTitles() { this.redoTabTitle('gid'); this.redoTabTitle('rid'); this.redoTabTitle('custom'); }", "title": "" }, { "docid": "7c90f805442a28dd3dbe7701e7182923", "score": "0.5221254", "text": "function optionChanged(name) {\n showBubble(name);\n showBars(name);\n showDemo(name);\n showGauge(name);\n}", "title": "" }, { "docid": "8d502d08aa0dcab4d679b21bbdd1fd9a", "score": "0.5214455", "text": "function barColor(color) {\n}", "title": "" }, { "docid": "4092a7f6ffb219ef38e2c2ab65e6dca8", "score": "0.5200732", "text": "function visBildeinfo() {\n \n}", "title": "" }, { "docid": "a9a0e9a3076336457768f2586682b021", "score": "0.51953334", "text": "function updateHT() {\n\t\t\tvar label = b.hasClass('hi-visible')\n\t\t\t\t? 'Hide search term highlighting'\n\t\t\t\t: 'Show search term highlighting';\n\t\t\tht.children().text(label);\n\t\t\tht.attr('title', label);\n\t\t}", "title": "" }, { "docid": "2d46dc645659cafbf08c996a6bfb2def", "score": "0.5184135", "text": "function clickedBar(id) {\n\tappendText(\"you clicked on bar \" + id,\"debug\");\n}", "title": "" }, { "docid": "b2aa4b48be45ce86fd0a9bfcf8b61239", "score": "0.5180966", "text": "function bar(d, svg, x, xAxis, width, height,index) {\n var bar = svg.insert(\"g\", \".y.axis\")\n .attr(\"class\", \"enter\")\n .attr(\"transform\", \"translate(0,5)\")\n \t .selectAll(\"g\")\n .data(d.children)\n\t\t.enter().append(\"g\")\n .style(\"cursor\", function(d) { return !d.children ? null : \"pointer\"; })\n .on(\"mouseover\",function(d,i){\n \t\tif(index==currentPos){\n\t\t\t\tvar txt=d3.select(\"#\"+d.id);\n\t\t\t\ttxt.style('color',colorSelected);\n\t\t\t}\n })\n .on(\"mouseout\",function(d,i){\n \t\tif(index==currentPos){\n\t\t\t\tvar txt=d3.select(\"#\"+d.id);\n\t\t\t\ttxt.style('color',null);\n \t\t}\n })\n .on(\"click\", function(d,i){\n down(d, i, svg, x, xAxis, width, height,1,index);\n });\n\n bar.append(\"text\")\n .attr(\"x\", -6)\n .attr(\"y\", barHeight / 2)\n .attr(\"dy\", \".35em\")\n .style(\"text-anchor\", \"end\")\n .text(function(d) { return d.name; });\n\n bar.append(\"rect\")\n .attr(\"width\", function(d) { return x(d.value); })\n .attr(\"height\", barHeight);\n\t //.attr(\"title\",function(d){return d.value});\n\n return bar;\n}", "title": "" }, { "docid": "4732a8c64e200bfba5d6094fb514d4b5", "score": "0.5180427", "text": "DXbar_1() {\n // TODO: implement\n }", "title": "" }, { "docid": "7a00de091cbad1063e0d56d74a56ca6c", "score": "0.516775", "text": "function customize({options, element}) {\n\n if (options !== null){\n\n /*** CHART specifc customizations ***/\n\n let chart = options.chart;\n if (chart.height) {chartHeight = chart.height;}\n if (chart.width) {chartWidth = chart.width;}\n\n rootDims(element, chartWidth, chartHeight);\n\n\n /*** TITLE specifc customizations ***/\n\n let title = options.title;\n\n $('#title').html(title.titleName);\n $('#title').css('color', title.titleColor);\n $('#title').css('font-family', title.titleFont);\n\n\n /*** BAR specifc customizations ***/\n\n let bars = options.bars;\n\n let labels = $('div.bar-num').map(function() {\n\n //bar color:\n $(this).css('background-color', bars.barColor);\n\n //bar space:\n let newMargin = bars.barSpace + \"%\";\n barWidth = barFraction - bars.barSpace + \"%\";\n $(this).css('width', barWidth);\n $(this).css('margin-left', newMargin);\n\n //label colour:\n $(this.children[0]).css('color', bars.labelColour);\n\n //label position:\n function adjustBarLabels(barDiv){\n barDiv.map(function() {\n\n let moveBarLabel = bars.labelLocation;\n let changeLabel;\n\n if (moveBarLabel === \"center\") {\n changeLabel = \"center\";\n } else if (moveBarLabel === \"bottom\"){\n changeLabel = \"flex-end\";\n } else if (moveBarLabel === \"top\"){\n changeLabel = \"flex-start\";\n }\n\n $(this).css('align-items', changeLabel);\n });\n return;\n }\n\n adjustBarLabels($(this.children[0]));\n\n });// fn labels\n\n } //end of if not null\n\nreturn;\n}", "title": "" }, { "docid": "64a3949077797ed5161a1405afbd2d15", "score": "0.51659167", "text": "function showMemberBar(index) {\n memberBars[index].classList.add('member-bar-open');\n}", "title": "" }, { "docid": "392178f52bc6af9db3282d8371688efe", "score": "0.5164111", "text": "function updatePlotly(newdata) {\n Plotly.restyle(\"bar\", newdata);\n}", "title": "" }, { "docid": "546ef19c37e510387baa3f92ad69156e", "score": "0.5161954", "text": "function change_labels(x){\n switch(x) {\n case \"e_bikes\":\n labels1 = markers1_label_e_bikes\n labels0 = markers0_label_e_bikes\n break;\n case \"spaces\":\n labels1 = markers1_label_spaces\n labels0 = markers0_label_spaces\n break;\n default:\n labels1 = markers1_label_bikes\n labels0 = markers0_label_bikes\n }\n for (let i = 0; i < markers1.length; i++) {\n markers1[i].setLabel(labels1[i]);\n }\n for (let i = 0; i < markers0.length; i++) {\n markers0[i].setLabel(labels0[i]);\n }\n}", "title": "" }, { "docid": "488ab92e04448f6bf84cbf95a861b87e", "score": "0.51610774", "text": "function bar(svg, down, d, selector) {\n const g = svg.insert(\"g\", selector)\n .attr(\"class\", \"enter\")\n .attr(\"transform\", `translate(0,${bar_margin.top + barStep * barPadding})`)\n .attr(\"text-anchor\", \"end\")\n .style(\"font\", \"10px sans-serif\");\n \n const bar = g.selectAll(\"g\")\n .data(d.children)\n .join(\"g\")\n .attr(\"cursor\", d => !d.children ? null : \"pointer\")\n .on(\"click\", (event, d) => down(svg, d))\n .on(\"mouseover\", showBarTooltip)\n .on(\"mousemove\", moveBarTooltip)\n .on(\"mouseleave\", hideBarTooltip);\n \n bar.append(\"text\")\n .attr(\"x\", bar_margin.left - 6)\n .attr(\"y\", barStep * (1 - barPadding) / 2)\n .attr(\"dy\", \".35em\")\n .text(d => {\n newname = d.data.name.replace(/ *\\([^)]*\\) */g, \"\");;\n return d.data.name;\n });\n \n bar.append(\"rect\")\n .attr(\"x\", x(0))\n .attr(\"width\", d => x(d.value) - x(0))\n .attr(\"height\", barStep * (1 - barPadding));\n \n return g;\n }", "title": "" }, { "docid": "d3c4111f448b1c98029028d4573ab4db", "score": "0.5149594", "text": "function updateLabelName(cat, oldLabel, label) {\t// should we allow for change of category also ??\n\t// update color legend cell reverse lookup\t\t\t\t\n\tif (catLegend[cat][label] == null) {\n\t\t//catLegend[cat][label] = {};\n\t\t//catLegend[cat][label][\"cellref\"] = [];\n\t\tcatLegend[cat][label] = catLegend[cat][oldLabel];\n\n\t\tconsole.log(\"Old color:\"+catLegend[cat][oldLabel]['color']);\n\t\tconsole.log(\"New color:\"+catLegend[cat][label]['color']);\n\t\t// remove old label\n\t\tdelete catLegend[cat][oldLabel];\n\t\t\n\t\t// referesh category elements\n\t\tupdateCategoryList();\n\t} else {\n\t\t// other label already exists , can't rename on label to another existing label !!\n\t\t// throw exception or something !!!\n\t\t// ERROR!!\n\t\tconsole.log(\"stop it !\");\n\t}\n}", "title": "" }, { "docid": "6ad1b5200d003f6326bd6afbda6c1d1f", "score": "0.51466054", "text": "function updateSidebar(){\r\n //linearly a bad idea? since upgrades not that many?\r\n updateUpgradeInfo(\"strafeIcon\", playerShip.strafeEnabled);\r\n updateUpgradeInfo(\"speedIcon\", playerShip.speedIncrease);\r\n updateUpgradeInfo(\"damageIcon\", playerShip.weaponDamageIncrease);\r\n updateUpgradeInfo(\"tractorIcon\", playerShip.tractorEnabled);\r\n updateUpgradeInfo(\"gunIcon\", playerShip.gunEnabled);\r\n \r\n}", "title": "" }, { "docid": "8fc78f69f6045379348a67716a891d15", "score": "0.5144266", "text": "function updateBar(otus) {\n\n otus.reverse();\n var x = otus.map( (d) => d.sample_values );\n var y = otus.map( (d) => `OTU-${d.otu_ids}` );\n var text= otus.map( (d) => d.otu_labels );\n\n\n Plotly.restyle(\"bar\", \"x\", [x]);\n Plotly.restyle(\"bar\", \"y\", [y]);\n Plotly.restyle(\"bar\", \"text\", [text]);\n\n}", "title": "" }, { "docid": "9b0a7e6192ce190a66c46705bda6eda4", "score": "0.5139269", "text": "function addTitleIcons () {\n var iconBar = $('#va-titleicons');\n var previewBar = $('#va-titleicons-preview');\n \n if (skin != 'monobook' && skin != 'oasis' && skin != 'wikia') {\n return;\n }\n \n if (iconBar.length > 0 && $('a', previewBar).length > 0) {\n if (skin == 'oasis' || skin == 'wikia') {\n var articleDiv = $('#WikiaArticle');\n \n if (articleDiv.length > 0) {\n iconBar.css('display', 'block').prependTo(articleDiv);\n }\n } else if (skin == 'monobook') {\n var firstHeading = $('#firstHeading').css('position', 'relative');\n \n if (firstHeading.length > 0) {\n iconBar.css('display', 'block').appendTo(firstHeading.css('padding-right', previewBar.width() + 25));\n }\n }\n \n $('#va-titleicons-more').append('<img width=\"0\" height=\"0\" class=\"va-titleicons-chevron\" src=\"https://images.wikia.nocookie.net/common/skins/common/blank.gif\">');\n \n iconBar.hover(\n function () {\n $(this).addClass('va-titleicons-hover');\n }, function () {\n $(this).removeClass('va-titleicons-hover');\n });\n }\n}", "title": "" }, { "docid": "f920416c676720d2e3fd8020f09f9f70", "score": "0.5133416", "text": "function updatePlotly() {\r\n // Use D3 to select the dropdown menu\r\n var dropdownMenu = d3.select(\"#selDataset\");\r\n // Assign the value of the dropdown menu option to a variable\r\n var dataset = dropdownMenu.property(\"value\");\r\n\r\n barname(dataset);\r\n buildMetadata(dataset);\r\n }", "title": "" }, { "docid": "36ce460147eb8166df5cef5aec55a0c2", "score": "0.5130331", "text": "function updateInkBarClassName(){var elements=getElements();var newIndex=ctrl.selectedIndex,oldIndex=ctrl.lastSelectedIndex,ink=angular.element(elements.inkBar);if(!angular.isNumber(oldIndex))return;ink.toggleClass('md-left',newIndex<oldIndex).toggleClass('md-right',newIndex>oldIndex);}", "title": "" }, { "docid": "c92f639bbb4408f40c2d98ef7cf58376", "score": "0.51156574", "text": "function swap_graph_bars(bar_index1, bar_index2){\n //change indexes\n let temp_graph_data_index = graph_data_indexes[bar_index1];\n graph_data_indexes[bar_index1] = graph_data_indexes[bar_index2];\n graph_data_indexes[bar_index2] = temp_graph_data_index;\n}", "title": "" }, { "docid": "120dc9f5302197fa111cf6c6364552f5", "score": "0.51155716", "text": "prepareBasicBarGraph(spec, data) {\r\n /** Basic graph tool tip visibility check */\r\n if (spec.showToolTip) {\r\n if (this.barMarks && this.barMarks.encode && this.barMarks.encode.update) {\r\n this.barMarks.encode.update['tooltip'] = {\r\n 'signal': `{\\\"${this.xAxisField}\\\": ''+datum[\\\"${this.xAxisField}\\\"], \\\"${this.yAxisField}\\\": format(datum[\\\"${this.yAxisField}\\\"], \\\"\\\")}`\r\n };\r\n }\r\n }\r\n /** Basic graph legend check */\r\n if (spec.showLegend) {\r\n this.barLegend = [{\r\n 'title': spec.legendTitle,\r\n 'orient': spec.legendOrient,\r\n 'direction': spec.legendDirection,\r\n 'fill': 'color',\r\n 'gradientLength': { 'signal': 'clamp(height, 64, 200)' },\r\n 'symbolType': 'square'\r\n }];\r\n }\r\n /** Basic graph tool tip orientation check */\r\n if (spec.orientation === 'horizontal') {\r\n this.barScales = [\r\n {\r\n 'name': 'yscale',\r\n 'type': 'band',\r\n 'domain': { 'data': this.dataField, 'field': this.xAxisField },\r\n 'range': 'height',\r\n 'paddingOuter': 0.2,\r\n 'paddingInner': 0.1,\r\n 'reverse': true\r\n },\r\n {\r\n 'name': 'xscale',\r\n 'domain': { 'data': this.dataField, 'field': this.yAxisField },\r\n 'nice': true,\r\n 'range': [0, { 'signal': 'width' }],\r\n },\r\n {\r\n 'name': 'color',\r\n 'type': 'ordinal',\r\n 'domain': [spec.xaxis],\r\n 'range': [this.barConfig.barColourScheme[0]]\r\n }\r\n ];\r\n this.barAxes = [\r\n { 'orient': 'bottom', 'scale': 'xscale', 'title': spec.xaxis, 'grid': true },\r\n { 'orient': 'left', 'scale': 'yscale', 'title': spec.yaxis }\r\n ];\r\n this.barMarks = {\r\n 'type': 'rect',\r\n 'from': { 'data': this.dataField },\r\n 'encode': {\r\n 'update': {\r\n 'fill': { 'value': this.barConfig.barColourScheme[0] },\r\n 'fillOpacity': { 'value': 1 },\r\n 'y': { 'scale': 'yscale', 'field': this.xAxisField },\r\n 'height': { 'scale': 'yscale', 'band': 1 },\r\n 'x': { 'scale': 'xscale', 'field': this.yAxisField },\r\n 'x2': { 'scale': 'xscale', 'value': 0 }\r\n },\r\n 'hover': {\r\n 'fillOpacity': { 'value': 0.7 }\r\n }\r\n }\r\n };\r\n if (spec.showToolTip) {\r\n if (this.barMarks && this.barMarks.encode && this.barMarks.encode.update) {\r\n this.barMarks.encode.update['tooltip'] = {\r\n 'signal': `{\\\"${this.xAxisField}\\\": ''+datum[\\\"${this.xAxisField}\\\"], \\\"${this.yAxisField}\\\": format(datum[\\\"${this.yAxisField}\\\"], \\\"\\\")}`\r\n };\r\n }\r\n }\r\n }\r\n this.barGraphData.data = data;\r\n }", "title": "" }, { "docid": "4fc0f4f75a9baa64a4381fc0b8c6e29e", "score": "0.5115246", "text": "set branchLabelAnnotationName(annotationName) {\n throw new Error(\"Don't call this method from the parent layoutInterface class. It must be implemented in the child class\")\n }", "title": "" }, { "docid": "d066baa68d94b38957d30d3aaa3d57de", "score": "0.5103558", "text": "function displayItemInformation(item) {\n var fullInfo = item.split(\"*\");\n \n let ratios =getRatios(fullInfo[0]);\n let backgroundStyle = returnLinearGradient(parseInt(ratios[0]),parseInt(ratios[1]),parseInt(ratios[2]),parseInt(ratios[3]));\n \n bar = element(\"ratiosBar\" + barCounter);\n bar.style.background=backgroundStyle;\n bar.classList.add(\"movingBar\");\n bar.style.width=\"100%\";\n\n \n barCounter++;\n bar2 = document.createElement(\"bar\");\n bar2.setAttribute(\"id\",\"ratiosBar\" + barCounter);\n element(\"factory_descriptions\").appendChild(bar2);\n let oldBarCounter = barCounter -3;\n if(oldBarCounter>=1){\n element(\"ratiosBar\"+ oldBarCounter).style.height=0;\n if(oldBarCounter>=2){\n oldBarCounter = barCounter -4;\n element(\"factory_descriptions\").removeChild(element(\"ratiosBar\"+ oldBarCounter));\n }\n }\n \n \n}", "title": "" }, { "docid": "9d469b47f8c7a542b0cc4e53bb20f811", "score": "0.5083608", "text": "async updateRankPlotBarSize(newBarSize, callRemakeRankPlot) {\n this.rankPlotJSON.encoding.x.scale.rangeStep = newBarSize;\n if (newBarSize < 1) {\n document\n .getElementById(\"barSizeWarning\")\n .classList.remove(\"invisible\");\n } else {\n document\n .getElementById(\"barSizeWarning\")\n .classList.add(\"invisible\");\n }\n if (callRemakeRankPlot) {\n await this.remakeRankPlot();\n }\n }", "title": "" }, { "docid": "ed974c12ea3fdcb089354e82bd7d005b", "score": "0.5077081", "text": "function scUpdateNavBar(machine) {\n\tvar node = document.getElementById('scReserved');\n\tvar text = \"Goal: \"+machine\n\tif (node) {\n\t\tnode.innerText = text;\n\t\tnode.title = scCrumbs.join(\", \");\n\t} else {\n\t\tnode = document.querySelector('div.navbar-header');\n\t\tnode.insertAdjacentHTML('beforeend', '<span id=\"scReserved\" class=\"navbar-brand text-muted small\">'+text+'</span>');\n\t}\n\tif (contains(unlockedResources, 'energy')) {\n\t\tvar node = document.getElementById(\"energyNav\");\n\t\tif (node) {node.title = \"Energy Production: \"+parseInt(scResources.energy.ps()+scCalcEnergyReserve())+\" - Buffer: \"+parseInt(scCalcEnergyReserve())+\" - Usable: \"+parseInt(scResources.energy.ps());}\n\t}\n}", "title": "" }, { "docid": "55d5405eb411ed399e5eced2da5265aa", "score": "0.5069709", "text": "function updateDataRegion(type, in1, in2){\n //get Chart to update\n var tmp = createGeneralBarSeries(getData());\n var color= false;\n var chart = $('#container3').highcharts();\n //remove all series :\n while(chart.series.length > 0)\n chart.series[0].remove(true);\n/** _____________________________________________ BAR CHART update GENERAL ____________________________________________________________________________________________ **/\n if(type == 'General'){\n //title\n chart.setTitle({ text: 'Detalle de avance por regiones (%)'});\n //TODO set names of Regions \n //chart.xAxis[0].setCategories(['region1', 'region2', 'region3']);\n //set data\n chart.addSeries( {\n name: 'Avanzando',\n data: tmp[0],\n },false);\n \n chart.addSeries( {\n name: 'Sin Avance',\n data: tmp[2],\n },false);\n chart.addSeries( {\n name: 'Terminado',\n data: tmp[1],\n },false);\n \n\n \n \n \n //set Color \n chart.series[0].update({\n color: color ? null : colorType[0] \n });\n chart.series[1].update({\n color: color ? null : colorType[1] \n });\n chart.series[2].update({\n color: color ? null : colorType[2] \n });\n }\n/** _____________________________________________ BAR CHART update GENERO ____________________________________________________________________________________________ **/\n\n if(type == 'Genero'){\n //resize Chart :\n //chart.setSize(400, 300);\n //title\n chart.setTitle({ text: 'detalle de finalizados segun region sexo (%)'});\n //TODO set names of Regions \n //chart.xAxis[0].setCategories(['region1', 'region2', 'region3']);\n\n //set data:\n var sumArray = [], out1 = [], out2 = [];\n //TODO test for equal length \n for (var i = 0; i < in1.length; i++) {\n sumArray.push(in1[i] + in2[i]);\n out1.push(round((in1[i]/sumArray[i]*100),2));\n out2.push(round((in2[i]/sumArray[i]*100),2));\n }\n var tmp1, tmp2;\n var tmpData1=[], tmpData2 =[];\n //update y.value and myData\n for (var i = 0; i < in1.length; i++) {\n tmp = {'y': out1[i], 'myData' : in1[i]};\n tmpData1.push(tmp);\n tmp = {'y': out2[i], 'myData' : in2[i]};\n tmpData2.push(tmp);\n }\n //add series:\n chart.addSeries({\n name: 'masculino',\n data: tmpData1,\n },false);\n\n chart.addSeries({\n name: 'feminino',\n data: tmpData2,\n },false);\n\n //color:\n chart.series[0].update({\n color: color ? null : colorGender[0]\n });\n chart.series[1].update({\n color: color ? null : colorGender[1]\n }); \n }\n/** _____________________________________________BAR CHART update TYPO ____________________________________________________________________________________________ **/\n\n if(type == 'Typo'){\n //title\n chart.setTitle({ text: 'Prcentaje de finalizados segun region y tipo de establecimiento (%) '});\n\n //TODO set names of Regions \n //chart.xAxis[0].setCategories(['region1', 'region2', 'region3']);\n\n chart.addSeries( {\n name: 'Muncipal',\n data: [{\n /**[feminino in % ,masculino in % ,sumArray, feminino, masculino] **/\n y: dataArray[0][0],\n myData: dataArray[3][0],\n }, {\n y: dataArray[0][1],\n myData: dataArray[3][1]\n }, {\n y: dataArray[0][2],\n myData: dataArray[3][2]\n }, {\n y: dataArray[0][3],\n myData: dataArray[3][2]\n }, {\n y: dataArray[0][4],\n myData: dataArray[3][4]\n }]\n },false);\n\n chart.addSeries( {\n name: 'Particular Sub.',\n data: [{\n y: dataArray[1][0],\n myData: dataArray[4][0]\n }, {\n y: dataArray[1][1],\n myData: dataArray[4][1]\n }, {\n y: dataArray[1][2],\n myData: dataArray[4][2]\n }, {\n y: dataArray[1][3],\n myData: dataArray[4][3]\n }, {\n y: dataArray[1][4],\n myData: dataArray[4][4]\n }]\n },false);\n \n chart.addSeries( {\n name: 'Particular',\n data: [{\n y: dataArray[1][0],\n myData: dataArray[4][0]\n }, {\n y: dataArray[1][1],\n myData: dataArray[4][1]\n }, {\n y: dataArray[1][2],\n myData: dataArray[4][2]\n }, {\n y: dataArray[1][3],\n myData: dataArray[4][3]\n }, {\n y: dataArray[1][4],\n myData: dataArray[4][4]\n }]\n },false);\n \n chart.series[0].update({\n color: color ? null : colorSchools[0] \n });\n chart.series[1].update({\n color: color ? null : colorSchools[1] \n });\n chart.series[2].update({\n color: color ? null : colorSchools[2] \n }); \n }\n else{\n return;\n } \n //for all : \n color = !color; \n //apply changes and redraw() \n chart.redraw(); \n}", "title": "" }, { "docid": "bd9ca437e133fc23db49fdb202a726a0", "score": "0.5065787", "text": "function updateGeneLinkage(newLinkage) { \n if(newLinkage == 'Complete') {\n saveGENELinkage=clusterfck.COMPLETE_LINKAGE;\n } else if(newLinkage == 'Single') {\n saveGENELinkage=clusterfck.SINGLE_LINKAGE;\n }else if(newLinkage == 'Average') {\n saveGENELinkage=clusterfck.AVERAGE_LINKAGE;\n } else {\n saveAHeatmapPlot=null;\n return;\n }\n saveAHeatmapPlot=updateHeatmapPlot();\n if(withContour) {\n addStyleChangesHeatmapType(saveAHeatmapPlot, \"contour\", null);\n }\n}", "title": "" }, { "docid": "d62444aa7c3b33e3abfbe6ffc5966c6c", "score": "0.50596535", "text": "function updateLabels(){\n\t\t$rpNames.each(function(index, el) {\n\t\t\t$(this).text(rpCategory.name);\n\t\t});\n\t\t$rpNamesAll.each(function(index, el) {\n\t\t\t$(this).text(rpCategory.nameAll);\n\t\t});\t\t\n\t}", "title": "" }, { "docid": "8b5da74cd76cfeef0729e50ad4a925df", "score": "0.50594753", "text": "function Barrel(descr) {\n\tfor (var property in descr) {\n this[property] = descr[property];\n \t}\n\n spatialManager.register(this);\n}", "title": "" }, { "docid": "a7a02f630eaa07f22d628915b4f9a97d", "score": "0.50475913", "text": "function updatePlotly(otu, otustring, value, label, freq) {\n Plotly.restyle(\"bar\", \"x\", [value]);\n Plotly.restyle(\"bar\", \"y\", [otustring]);\n Plotly.restyle(\"bar\", \"text\", [label]);\n Plotly.restyle(\"bubble\", \"x\", [otustring]);\n Plotly.restyle(\"bubble\", \"y\", [value]);\n Plotly.restyle(\"bubble\", \"text\", [label]);\n Plotly.restyle(\"bubble\", \"marker.color\", [otu]);\n Plotly.restyle(\"gauge\", \"value\", [freq]);\n}", "title": "" }, { "docid": "186b8d87950be057870998a6321f0864", "score": "0.5044405", "text": "function changeLabelsToEdit(assignmentInstance) {\n document.getElementById('headerText').innerHTML = \"Edit: \" + assignmentInstance.name;\n}", "title": "" }, { "docid": "31689a00a4c5aa5baa0657fb36e0f8f0", "score": "0.5043472", "text": "function updateArenaLegendTitle(actor) {\r\n\tif (isAI(actor))\r\n\t\treturn;\r\n\tif (arrContains(global.arenaLegends, actor.name) && actor.checkTitle(\"Gladiator\") == false) {\r\n\t\tactor.unlockTitle(\"Gladiator\",\"prefix\",\"arena\");\r\n\t}\r\n\telse if (!arrContains(global.arenaLegends, actor.name) && actor.checkTitle(\"Gladiator\") == true) {\r\n\t\tactor.lockTitle(\"Gladiator\",\"prefix\");\r\n\t}\r\n}", "title": "" }, { "docid": "c1f9192c31553087206c240cecb54294", "score": "0.50426364", "text": "function changeBarChartToShowMoeilijkheidsgraad(){\r\n // CASE 1: the bar chart already shows the moeilijkheidsgraad\r\n if (! showScorePerCategorie)\r\n closeMenu();\r\n // CASE 2: the bar chart does not yet show the moeilijkheidsgraad\r\n else {\r\n // update bar chart\r\n showScorePerCategorie = false;\r\n svgBc.selectAll(\"*\").remove();\r\n svgBc = barChartScorePerCategorie(dataBarChart);\r\n // recreate menu, else it's no longer on top\r\n closeMenu();\r\n svgOptionMenu.selectAll('*').remove();\r\n createMenuToChangeBarchart();\r\n // recreate tooltip layer, else it's no longer on top\r\n bodylayer.select('#tooltipLayer').remove();\r\n tooltipLayer = bodylayer\r\n .append(\"svg\");\r\n }\r\n }", "title": "" }, { "docid": "f46a2b40418a199c98730e7afd8fa345", "score": "0.5032042", "text": "function barHover() {\n var $bar = $('.header .health-professionals-info');\n var $link = $bar.find('a');\n $link.each(function() {\n var $link = $(this);\n $link.on('mouseenter', function() {\n $bar.addClass('active');\n }).on('mouseleave', function() {\n $bar.removeClass('active');\n });\n });\n }", "title": "" }, { "docid": "ff18c9d4af900bca8770c7b6eeb52b88", "score": "0.50308263", "text": "function showTabBreweries()\n{\n showTab('brewery-results');\n}", "title": "" }, { "docid": "3f7b3429d36ee3e9144871d16f4e8677", "score": "0.50272316", "text": "function updateAllGraphsCellName(cellRenamed){\n\t\t\n\t\tvar curTabId = $(\".ui-tabs-active\").find(\"a\").attr(\"id\");\n\t\t\n\t\tif(curTabId == GLOBAL.currentTab){\n\t\t\tGLOBAL.graphs[GLOBAL.currentTab] = graph.toJSON();\n\t\t}\n\t\t\n\t\t$.each(GLOBAL.graphs, function(index, g){\n\t\t\t\n\t\t\tvar graphChanged = new joint.dia.Graph; \n\t\t\tgraphChanged.fromJSON(GLOBAL.graphs[index]);\n\t\t\tcell = graphChanged.getCell(cellRenamed.id);\n\t\t\tif (cell){\n\t\t\t\tcell.set('name', cellRenamed.get('name'));\n\t\t\t}\n\t\t\tGLOBAL.graphs[index] = graphChanged.toJSON();\n\t\t\t\n\t\t});\n\t\t\n\t\tgraph.fromJSON(GLOBAL.graphs[GLOBAL.currentTab]);\n\t}", "title": "" }, { "docid": "4af21b82c6529d7f984d519d16fc3893", "score": "0.5015359", "text": "function colorBars(a, b) {\n a.color = iColor\n b.color = jColor\n}", "title": "" }, { "docid": "2cbec532761ac50d272350dd0b9f7884", "score": "0.50062406", "text": "setup( gs, manga ) {\n if ( gs.barMode === \"micro\" ) return; // Doesn't need instance, no bar is rendered\n\n if ( gs.barMode === \"extended\" ) {\n gs.bar = progress( { width: gs.width, total: manga.pagesTotal, incomplete: \"░\", complete: \"█\" } );\n gs.pagesTotal = manga.pagesTotal;\n gs.chapter = manga.chapter;\n gs.page = manga.page;\n }\n }", "title": "" }, { "docid": "16f8593677a0058471e8c2a1e5ed1c8b", "score": "0.5001077", "text": "function NavBarElemView_update(itemName) {\n with (this) {\n switch (itemName) {\n case \"elemName\":\n elem.setName(elemName.value);\n elemName.value = elem.imgName;\n break;\n case \"upImg\":\n elem.setUpImage(upImg.value);\n display(true);\n break;\n case \"overImg\":\n elem.overImg = overImg.value;\n break;\n case \"downImg\":\n elem.downImg = downImg.value;\n break;\n case \"overDownImg\":\n elem.overDownImg = overDownImg.value;\n break;\n case \"theURL\":\n elem.URL = theURL.value;\n break;\n case \"theAltText\":\n elem.altText = theAltText.value;\n break;\n case \"theTarget\":\n elem.targetWindow = theTarget.getValue();\n break;\n case \"preloadImages\":\n elem.preloadImages = preloadImages.checked;\n break;\n case \"isDown\":\n elem.isDown = isDown.checked;\n break;\n default:\n //alert(\"ERROR: UI Update Error - \" + itemName);\n break;\n }\n }\n}", "title": "" }, { "docid": "9ad7d123b2b6b36cc07ad732b3559905", "score": "0.499477", "text": "function bar(d) {\n var bar = svg.insert(\"g\", \".y.axis\")\n .attr(\"class\", \"enter\")\n .attr(\"transform\", \"translate(0,5)\")\n .selectAll(\"g\")\n .data(d.children)\n .enter().append(\"g\")\n .attr(attrName, \"\")\n .style(\"cursor\", function (d) { return !d.children ? null : \"pointer\"; })\n .on(\"click\", down);\n bar.append(\"text\")\n .attr(attrName, \"\")\n .attr(\"x\", -6)\n .attr(\"y\", barHeight / 2)\n .attr(\"dy\", \".35em\")\n .style(\"text-anchor\", \"end\")\n .text(function (d) { return d.name; });\n bar.append(\"rect\")\n .attr(attrName, \"\")\n .attr(\"width\", function (d) { return x(d.value); })\n .attr(\"height\", barHeight);\n return bar;\n }", "title": "" }, { "docid": "e3fd97d5ba3ea2a792e7a2d10f0b8ed1", "score": "0.4985851", "text": "function optionChanged(newID) {\r\n barChart(newID);\r\n bubbleChart(newID);\r\n metaData(newID);\r\n gaugeChart(newID)\r\n }", "title": "" }, { "docid": "d1477833f16fae6940e76245ae3a1f96", "score": "0.4984995", "text": "function showFillerTitle() {\n hideAxis();\n g.selectAll(\".openvis-title\")\n .transition()\n .duration(600)\n .attr(\"opacity\", 0);\n\n g.selectAll(\".count-title\")\n .transition()\n .duration(600)\n .attr(\"opacity\", 0);\n\n g.selectAll(\".value-title\")\n .transition()\n .duration(600)\n .attr(\"opacity\", 1.0);\n\n g.selectAll(\".value-sub\")\n .transition()\n .duration(600)\n .attr(\"opacity\", 1.0);\n\n g.selectAll(\".tree\")\n .transition()\n .attr(\"height\", 0)\n .attr(\"width\", 0);\n\n g.selectAll(\".tree-text\")\n .transition()\n .duration(600)\n .attr(\"opacity\", 0);\n\n g.selectAll(\".tree-num\")\n .transition()\n .duration(600)\n .attr(\"opacity\", 0);\n\n g.selectAll(\".top\")\n .transition()\n .duration(600)\n .attr(\"r\", 0);\n\n g.selectAll(\".top-text\")\n .transition()\n .duration(600)\n .attr(\"opacity\", 0);\n\n g.selectAll(\".legend\")\n .transition()\n .duration(600)\n .attr(\"width\", 0)\n .attr(\"height\", 0);\n\n g.selectAll(\".legend-text\")\n .transition()\n .duration(600)\n .attr(\"opacity\", 0);\n\n g.selectAll(\".bar\")\n .transition()\n .duration(600)\n .attr(\"width\", 0);\n\n g.selectAll(\".bar-text\")\n .transition()\n .duration(600)\n .attr(\"opacity\", 0);\n\n g.selectAll(\".fast\")\n .transition()\n .duration(600)\n .attr(\"width\", 0);\n\n g.selectAll(\".fast-text\")\n .transition()\n .duration(600)\n .attr(\"opacity\", 0);\n\n g.selectAll(\".fast-num\")\n .transition()\n .duration(600)\n .attr(\"opacity\", 0);\n }", "title": "" }, { "docid": "87d0e8a84fc2c9ef4afb7970222b1762", "score": "0.4983646", "text": "function setSelectedFeature(title, description, id) {\r\n document.getElementById(\"selected-feature-name\").innerText = title;\r\n document.getElementById(\"selected-feature-descr\").innerText = description;\r\n featureBar.select(id);\r\n}", "title": "" }, { "docid": "0e4aa4c36a5ae473d96e181085981851", "score": "0.49834716", "text": "function tshbar() { ;\n var bar1=createBar(300,15,'white',1,'black','blue',85,7,3,'')\n bar1.hideBar() ;\n}", "title": "" }, { "docid": "77c6314a02bc5b894a932d1d92c78146", "score": "0.4982776", "text": "_declareDefaults () {\n super._declareDefaults();\n this._defaults.icon = 'bounds';\n this._defaults.title = 'progress bounds (alt + b)';\n }", "title": "" }, { "docid": "50cdd2e274324919bb8750ebe560fd57", "score": "0.49730542", "text": "function optionChanged(value) {\n var indOfID = window.data.names.findIndex(element => element === value); // use arrow fun to find index of list value\n var demoData = window.data.metadata[indOfID]; // using window.var as a prepend to access data as a global variable\n console.log(demoData); // debug log\n\n // update bardata\n updatePage(indOfID);\n\n // update demographic info\n // select html\n var selection = d3.select(\"#sample-metadata\");\n selection.html(\"\");\n\n // iterate through data and add to Demographic info\n Object.entries(demoData).forEach(([key, val]) => {\n // n = n + 1;\n // console.log(n)\n // console.log(demoData)\n // console.log(`${key}: ${val}`);\n selection.append(\"h6\").text(`${key}: ${val}`);\n });\n}", "title": "" }, { "docid": "75f4402da87757875f3c5f6ffc30cf6f", "score": "0.49727413", "text": "function panelBarExpand(e) {\n var panelItem = $(e.item).find(\"> .k-header\").text().replace(/\\s/g, \"\");\n if (panelItem.toLowerCase() == \"tips\") {\n $(e.item).find(\"> .k-header\").addClass(\"panelbaritemselected\");\n $(e.item).find(\"> .k-header\").css('color', '#cf102d');\n $(e.item).find(\"> .k-header\").css('background-color', '#CECECE');\n $(e.item).find(\"> .k-header\").removeClass(\"k-state-selected\");\n SetPanelBarHeight(true, false);\n } else {\n $(e.item).find(\"> .k-header\").addClass(\"panelbaritemselected\");\n $(e.item).find(\"> .k-header\").css('background-color', '#CECECE');\n \n SetPanelBarHeight(false, false);\n }\n var oldClass = '';\n if (panelItem.indexOf('Account') > -1) {\n oldClass = 'AccountExplorer';\n } else if (panelItem.indexOf('Report') > -1) {\n oldClass = 'Reports';\n } else if (panelItem.indexOf('Asset') > -1) {\n oldClass = 'AssetExplorer';\n }\n $(e.item).find(\"> .k-header > .k-sprite\").removeClass(oldClass);\n $(e.item).find(\"> .k-header > .k-sprite\").addClass(oldClass + 'selected');\n ResizeGreyedOutBackground('expanded');\n}", "title": "" }, { "docid": "8ddaca3099fc09791d592f0f8a5497de", "score": "0.49714917", "text": "function changeName(){\n changeGeneral(\"name\");\n}", "title": "" }, { "docid": "14d1aa0b2d7f607b32b2218fb936d8ba", "score": "0.49705225", "text": "function optionChanged() {\n displaygraph(),\n displayMetadata()\n washingGauge();\n}", "title": "" }, { "docid": "890ef7fdac9554d93cbd0d89273b6262", "score": "0.49668837", "text": "_updateResolutionDescription( lvl, prefix=\"\" ){\n this._resolutionDescription = prefix + this._quadScene.getLevelManager().getLevelInfo(lvl, \"key\");\n this._mainPanel.setValue(\"Resolution\", this._resolutionDescription);\n\n }", "title": "" }, { "docid": "890ef7fdac9554d93cbd0d89273b6262", "score": "0.49668837", "text": "_updateResolutionDescription( lvl, prefix=\"\" ){\n this._resolutionDescription = prefix + this._quadScene.getLevelManager().getLevelInfo(lvl, \"key\");\n this._mainPanel.setValue(\"Resolution\", this._resolutionDescription);\n\n }", "title": "" }, { "docid": "dc8be9d1dc15326d23ebbff575b85c5f", "score": "0.4963646", "text": "function newBlockBar(elem) {\n var editor = elem.editor, active = elem.active;\n var doc = editor.cm.getDoc();\n var cursor = doc.getCursor();\n var top = editor.cm.cursorCoords(cursor, undefined).top;\n var left = 0;\n return { id: \"new-block-bar\", c: \"new-block-bar \" + (active ? \"active\" : \"\"), top: top, left: left, children: [\n { c: \"new-block-bar-toggle ion-plus\", click: function () {\n elem.active = !elem.active;\n editor.cm.focus();\n editor.queueUpdate();\n } },\n { c: \"flex-row controls\", children: [\n { text: \"Eve\", click: function () { return editor.format({ type: \"code_block\" }, true); } },\n { text: \"CSS\", click: function () { return editor.format({ type: \"code_block\", info: \"css\" }, true); } },\n { text: \"list\", click: function () { return editor.format({ type: \"item\" }, true); } },\n { text: \"H1\", click: function () { return editor.format({ type: \"heading\", level: 1 }, true); } },\n { text: \"H2\", click: function () { return editor.format({ type: \"heading\", level: 2 }, true); } },\n { text: \"H3\", click: function () { return editor.format({ type: \"heading\", level: 3 }, true); } }\n ] }\n ] };\n}", "title": "" }, { "docid": "04aa4db497cf0163599678b6f2fc58ce", "score": "0.49573964", "text": "function updateData(name, value, units) {\n\t// Get trend lines from history\n\tif (typeof value !== 'undefined' && value !== null) {\n\t\t$('#' + name).html( value + (units || '') ).css({ color: 'black' }).show();\n\t} else {\n\t\t$('#' + name).css({ color: 'red' });\n\t}\n}", "title": "" }, { "docid": "8a8fc32ab2c367d56fc64f65a72bddf4", "score": "0.4942978", "text": "function updateInkBarClassName () {\n var newIndex = ctrl.selectedIndex,\n oldIndex = ctrl.lastSelectedIndex,\n ink = angular.element(elements.inkBar);\n if (!angular.isNumber(oldIndex)) return;\n ink\n .toggleClass('md-left', newIndex < oldIndex)\n .toggleClass('md-right', newIndex > oldIndex);\n }", "title": "" }, { "docid": "8a8fc32ab2c367d56fc64f65a72bddf4", "score": "0.4942978", "text": "function updateInkBarClassName () {\n var newIndex = ctrl.selectedIndex,\n oldIndex = ctrl.lastSelectedIndex,\n ink = angular.element(elements.inkBar);\n if (!angular.isNumber(oldIndex)) return;\n ink\n .toggleClass('md-left', newIndex < oldIndex)\n .toggleClass('md-right', newIndex > oldIndex);\n }", "title": "" }, { "docid": "8a8fc32ab2c367d56fc64f65a72bddf4", "score": "0.4942978", "text": "function updateInkBarClassName () {\n var newIndex = ctrl.selectedIndex,\n oldIndex = ctrl.lastSelectedIndex,\n ink = angular.element(elements.inkBar);\n if (!angular.isNumber(oldIndex)) return;\n ink\n .toggleClass('md-left', newIndex < oldIndex)\n .toggleClass('md-right', newIndex > oldIndex);\n }", "title": "" }, { "docid": "65ef982176d2ff5c6198ea72dd7c4f2e", "score": "0.49421448", "text": "__DrawGBars(o){\r\n const\r\n set = o.dataset.extract(x => x.status ? x : null)\r\n , serie = set.extract((item, i) => item.plot ? item.plot.calc(SUM) || .001 : .001)\r\n , ymax = Math.max(1, serie.calc(MAX) * o.roof)\r\n , xpace = o.rects.width / serie.length\r\n , h = o.rects.height\r\n , w = Math.min(xpace / 2, o.barWidth || o.fsize)\r\n ;;\r\n serie.each((n, i) => {\r\n const\r\n rec = set[i]\r\n , color = rec.color ? rec.color : PRISM.array()[i % PRISM.array().length]\r\n , y = Math.max(o.fsize, Math.min(h - h * n / ymax, h))\r\n , x = xpace / 2 + i * xpace\r\n ;;\r\n o.node.app(SVG(\"rect\", \"-avoid-pointer --bar\", { width: w, height: h - y, x: x - w / 2, y: y }, { fill: color }))\r\n })\r\n }", "title": "" }, { "docid": "417b1ac8017253284a8fe890a4dd00fc", "score": "0.494098", "text": "function reposVmCtrlBar(e) {\r\n var t = getTrgt(e);\r\n vmCtrlBar.ibp(absPos(t).x + parseInt(objDim(t).w / 2),\r\n absPos(t).y + parseInt(objDim(t).h / 2) + tabs.dim().h, 999);\r\n}", "title": "" }, { "docid": "79c5deac97500557c8a6dd853c3f1778", "score": "0.4935936", "text": "function updateInkBarClassName () {\r\n var newIndex = ctrl.selectedIndex,\r\n oldIndex = ctrl.lastSelectedIndex,\r\n ink = angular.element(elements.inkBar);\r\n if (!angular.isNumber(oldIndex)) return;\r\n ink\r\n .toggleClass('md-left', newIndex < oldIndex)\r\n .toggleClass('md-right', newIndex > oldIndex);\r\n }", "title": "" }, { "docid": "200f158c6764fa49f1947427ef7763a1", "score": "0.49307954", "text": "function displayBrand(item, brand) {\n displayItems(item); \n}", "title": "" }, { "docid": "09cccc34252ecd3f1eedb70e59f28f62", "score": "0.49293292", "text": "drawInfo(text, x, offset=5) {\n // Draw the vertical line \n this.svg.append(\"line\")\n .attr(\"id\", this.name+\"_histbin\")\n .attr(\"x1\", x)\n .attr(\"y1\", this.y + this.maxHeight + 15 + offset)\n .attr(\"x2\", x)\n .attr(\"y2\", this.y)\n .attr(\"stroke-width\", 1)\n .attr(\"stroke\", this.colour.highlight)\n .attr(\"stroke-dasharray\", (\"3,3\"));\n\n this.svg.append(\"text\")\n .attr(\"id\", this.name+\"_histbin\")\n .attr(\"font-family\", \"sans-serif\")\n .attr(\"font-size\", \"12px\")\n .attr(\"fill\", this.colour.highlight)\n .attr(\"x\", x - 10)\n .attr(\"y\", this.y + this.maxHeight + 30 + offset)\n .text(text);\n }", "title": "" }, { "docid": "ed36b8656737f7a5e5b0d968402345a7", "score": "0.49262783", "text": "function ModifyMark(sectionName) {\n var tab = Ext.getCmp(Ext.Const.OpenedId);\n setChangedItem(sectionName);\n \n if(tab != undefined)\n { \n if(tab.title.indexOf('*') == -1)\n { \n var btnSave = Ext.getCmp(\"btnSave\");\n btnSave.enable();\n tab.setTitle(tab.title + ' *');\n }\n }\n}", "title": "" }, { "docid": "73862ed1e1d8ca33ee6701d5656c6e87", "score": "0.49260017", "text": "function updateLabels() {\n\n\t\tvar tagtype = $('#tagtype').val();\n\t\tvar tagtext = $(\"#tagtype option:selected\").text();\n\t\t$(\"#stagtype\").val(tagtext);\n\t\t$.each(tagtype.split(','), function(i, v) {\n\n\t\t\t$('#label' + (i + 1)).html(v);\n\t\t\t/*if(tagtext=='Pet Tag')\n\t\t\t{\n\t\t\t\t$('#line' + (i + 1)).attr('name',v);;\n\t\t\t}*/\n\n\t\t});\n\n\t}", "title": "" }, { "docid": "66d8919f791c2ddcf67504e8f72a2e56", "score": "0.4924256", "text": "function updateChart(bars, n, colorScale){\n //position bars\n bars.attr(\"x\", function(d, i){\n return i * (chartInnerWidth / n) + leftPadding;\n })\n //size/resize bars\n .attr(\"height\", function(d, i){\n return 463 - yScale(parseFloat(d[expressed]));\n })\n .attr(\"y\", function(d, i){\n return yScale(parseFloat(d[expressed])) + topBottomPadding;\n })\n //color/recolor bars\n .style(\"fill\", function(d){\n return choropleth(d, colorScale);\n });\n\n\n var newExpressed = expressed.replace(/_/g, \" \");\n\n var chartTitle = d3.select(\".chartTitle\")\n .text(newExpressed);\n}", "title": "" }, { "docid": "fdddf33e1e27af96b5b7279fcf8a97b5", "score": "0.4920162", "text": "function changeSkin(val) {\n if (!val) return;\n theme.skin(val);\n viz.selection().selectAll(\".vz-bar\").attr(\"height\", 0).attr(\"y\", viz.height());\n changeZoom(1);\n viz.update();\n}", "title": "" }, { "docid": "3b2a86f51d4a12d4e3171a1d0c60b07d", "score": "0.491456", "text": "function changeName(value) {\n y = value;\n}", "title": "" }, { "docid": "07ced936df90546cf75b07f21bf54846", "score": "0.49111298", "text": "function BarLink() {\n go.Link.call(this);\n}", "title": "" }, { "docid": "b520b81fd68e09ad08eec1a0ecbad466", "score": "0.4910818", "text": "updateData() {\n this[_svgName].text(this.name);\n this[_svgRect].attr(\"fill\", this[_color]);\n }", "title": "" }, { "docid": "637b3fdd31ecd58c90313b0cfa9d2327", "score": "0.49097088", "text": "function updateInkBarClassName () {\n var elements = getElements();\n var newIndex = ctrl.selectedIndex,\n oldIndex = ctrl.lastSelectedIndex,\n ink = angular.element(elements.inkBar);\n if (!angular.isNumber(oldIndex)) return;\n ink\n .toggleClass('md-left', newIndex < oldIndex)\n .toggleClass('md-right', newIndex > oldIndex);\n }", "title": "" }, { "docid": "637b3fdd31ecd58c90313b0cfa9d2327", "score": "0.49097088", "text": "function updateInkBarClassName () {\n var elements = getElements();\n var newIndex = ctrl.selectedIndex,\n oldIndex = ctrl.lastSelectedIndex,\n ink = angular.element(elements.inkBar);\n if (!angular.isNumber(oldIndex)) return;\n ink\n .toggleClass('md-left', newIndex < oldIndex)\n .toggleClass('md-right', newIndex > oldIndex);\n }", "title": "" }, { "docid": "bc6e891cfe627b4f5bafe139b9a168b2", "score": "0.49070185", "text": "function addTooltipToBars(leftRight) {\r\n \r\n // select correct secction\r\n d3.selectAll(leftRight)\r\n \r\n // add tooltip\r\n .on(\"mouseover\", function(d) { \r\n \r\n // search for correct country and return tooltip\r\n if (currentConflictCountryName == countryTwoSided) { \r\n \r\n // calculate absolute value\r\n var abs = Math.round(d * amountOfRefugees / 100); \r\n enableTooltipTwoSided(abs);\r\n } \r\n else { \r\n dataBarchartCountry.forEach(function(e) {\r\n if (e.country == countryTwoSided) {\r\n \r\n // calculate absolute value\r\n var abs = Math.round(d * e.amount / 100); \r\n enableTooltipTwoSided(abs);\r\n };\r\n });\r\n };\r\n })\r\n .on(\"mousemove\", function() { return tooltipBarchart.style(\"top\", (event.pageY - 10)+\"px\").style(\"left\",(event.pageX + 10)+\"px\"); })\r\n .on(\"mouseout\", function() { return tooltipBarchart.style(\"visibility\", \"hidden\"); })\r\n \r\n // change two sided barchart on click\r\n .on(\"click\", function(d) { \r\n if (youngTotal == \"total\") {\r\n changeTwoSided(0); \r\n }\r\n else if (youngTotal == \"young\") {\r\n changeTwoSided(1);\r\n };\r\n });\r\n}", "title": "" }, { "docid": "b3e0029886a759ff76e9f97726c0bf6e", "score": "0.4894522", "text": "function statusbar(text) { gebi(\"status\").innerHTML = text; }", "title": "" }, { "docid": "96cf27ab832dae573dd11a4236cea535", "score": "0.48927152", "text": "function update_cell_label(area, row_index, cell_index)\n {\n var region_type = areas[area]['rows'][row_index]['cells'][cell_index]['region_type'];\n var region_name = prepare_content_for_html(areas[area]['rows'][row_index]['cells'][cell_index]['region_name']);\n var page_region_number = areas[area]['rows'][row_index]['cells'][cell_index]['page_region_number'];\n\n var row = row_index + 1;\n var col = cell_index + 1;\n \n var cell_label = '';\n \n // prepare cell label\n switch (region_type) {\n case '':\n cell_label = '&nbsp;<br /><span class=\"theme_fold_css\" style=\"padding: 0\"> .r' + row + 'c' + col + ' .c' + col + '</span>';\n break;\n \n case 'ad':\n cell_label = 'Ad Region: ' + region_name + '<br /><span class=\"theme_fold_css\" style=\"padding: 0\"> .r' + row + 'c' + col + ' .ad_' + region_name + ' .c' + col + '</span>';\n break;\n \n case 'cart':\n cell_label = 'Cart Region<br /><span class=\"theme_fold_css\" style=\"padding: 0\"> .r' + row + 'c' + col + ' .cart .c' + col + '</span>';\n break;\n \n case 'common':\n cell_label = 'Common Region: ' + region_name + '<br /><span class=\"theme_fold_css\" style=\"padding: 0\"> .r' + row + 'c' + col + ' .cregion_' + region_name + ' .c' + col + '</span>';\n break;\n \n case 'designer':\n cell_label = 'Designer Region: ' + region_name + '<br /><span class=\"theme_fold_css\" style=\"padding: 0\"> .r' + row + 'c' + col + ' .cregion_' + region_name + ' .c' + col + '</span>';\n break;\n \n case 'dynamic':\n cell_label = 'Dynamic Region: ' + region_name + '<br /><span class=\"theme_fold_css\" style=\"padding: 0\"> .r' + row + 'c' + col + ' .dregion_' + region_name + ' .c' + col + '</span>';\n break;\n \n case 'login':\n cell_label = 'Login Region: ' + region_name + '<br /><span class=\"theme_fold_css\" style=\"padding: 0\"> .r' + row + 'c' + col + ' .login_' + region_name + ' .c' + col + '</span>';\n break;\n \n case 'menu':\n cell_label = 'Menu Region: ' + region_name + '<br /><span class=\"theme_fold_css\" style=\"padding: 0\"> .r' + row + 'c' + col + ' .menu_' + region_name + ' .c' + col + '</span>';\n break;\n \n case 'menu_sequence':\n cell_label = 'Menu Sequence Region: ' + region_name + '<br /><span class=\"theme_fold_css\" style=\"padding: 0\"> .r' + row + 'c' + col + ' .menu_sequence_' + region_name + ' .c' + col + '</span>';\n break;\n\n case 'mobile_switch':\n cell_label = 'Mobile Switch<br /><span class=\"theme_fold_css\" style=\"padding: 0\"> .r' + row + 'c' + col + ' .mobile_switch .c' + col + '</span>';\n break;\n \n case 'page':\n cell_label = 'Page Region #' + page_region_number + '<br /><span class=\"theme_fold_css\" style=\"padding: 0\"> .r' + row + 'c' + col + ' .pregion .c' + col + '</span>';\n break;\n \n case 'pdf':\n cell_label = 'PDF Region <sup>beta</sup><br /><span class=\"theme_fold_css\" style=\"padding: 0\"> .r' + row + 'c' + col + ' .pdf .c' + col + '</span>';\n break;\n \n case 'system':\n var region_name_for_label = '';\n var region_name_for_label_css = '';\n \n // if there is a region name, then output it next to the label\n if (region_name != '') {\n region_name_for_label = region_name;\n region_name_for_label_css = ' .system_' + region_name;\n \n // else just output the basic label\n } else {\n region_name_for_label = 'Use Page';\n region_name_for_label_css = ' .system'\n }\n \n cell_label = 'System Region: ' + region_name_for_label + '<br /><span class=\"theme_fold_css\" style=\"padding: 0\"> .r' + row + 'c' + col + region_name_for_label_css + ' .c' + col + '</span>';\n break;\n \n case 'tag_cloud':\n var output_region_name = '';\n var output_region_name_css = '';\n \n // if there is a region name for this tag cloud, then prepare to output it\n if (region_name != '') {\n output_region_name = ': ' + region_name;\n output_region_name_css = ' .tcloud_' + region_name;\n } else{\n output_region_name_css = ' .tcloud';\n }\n \n cell_label = 'Tag Cloud Region' + output_region_name + '<br /><span class=\"theme_fold_css\" style=\"padding: 0\"> .r' + row + 'c' + col + output_region_name_css + ' .c' + col + '</span>';\n break;\n }\n \n // update the label\n $('#' + area + '_row_' + row_index + '_cell_' + cell_index + ' .cell_label')[0].innerHTML = cell_label;\n }", "title": "" }, { "docid": "89d3b495235bebb0aa56a2a890d972c0", "score": "0.48892286", "text": "function updateChart(bars, n, colorScale){\n //position bars\n bars.attr(\"x\", function(d, i){\n return i * (chartInnerWidth / n) + leftPadding;\n })\n //size/resize bars\n .attr(\"height\", function(d, i){\n return 463 - yScale(parseFloat(d[expressed]));\n })\n .attr(\"y\", function(d, i){\n return yScale(parseFloat(d[expressed])) + topBottomPadding;\n })\n //color/recolor bars\n .style(\"fill\", function(d){\n return choropleth(d, colorScale);\n });\n //at the bottom of updateChart()...add text to chart title\n var chartTitle = d3.select(\".chartTitle\")\n .text(\"Number of Variable \" + expressed + \" in each region\");\n}", "title": "" }, { "docid": "4db617cd57d41f6d9cfd3c70835b0dd8", "score": "0.48782533", "text": "function click(d)\r\n{\r\n if (d.depth == 2)\r\n {\r\n type2 = d.data.key;\r\n type1 = d.parent.data.key;\r\n }\r\n else if (d.depth == 1)\r\n {\r\n type1 = d.data.key;\r\n type2 = undefined;\r\n }\r\n updatebar({type1: type1, type2: type2})\r\n return\r\n}", "title": "" }, { "docid": "b9a170af8899bd8ff3f05ef8ab6d3473", "score": "0.48708382", "text": "function baseline(programme)\n{\n basegeneral();\n levelbar(info[\"baseline\"],\"gender\",baselinegenderdata,baselinegenderoptions,\"By Gender\");\n levelbar(info[\"baseline\"],\"mt\",baselinemtdata,baselinemtoptions,\"By Mother tongue\");\n}", "title": "" }, { "docid": "dee54a4789846917d31f827518d07acd", "score": "0.4868994", "text": "update_info(d,context) {\n if (d.munip_votes) {\n var value = d.munip_votes;\n }\n else {\n var value = 0;\n }\n\n\n d3.select(context).classed(\"highlighted\", true);\n\n var name;\n if(d.properties.KTNAME) {\n name = d.properties.KTNAME;\n }\n else if(d.properties.GMDNAME) {\n name = d.properties.GMDNAME;\n }\n\n\n d3.selectAll(this.map_id).select(\".value_map\").text(name);\n\n\n }", "title": "" }, { "docid": "060ce85aa4df73dc3ffffd5f81827590", "score": "0.48664048", "text": "function updateInfoBarAttributes () {\n var game = getGame(self);\n\n var parent = self.base.parent;\n\n if (!parent || !game) return;\n\n //If our parent is selected, we are probably\n //being displayed\n if (game.selection() == parent) {\n game.infobar.updateAllAttributes();\n }\n }", "title": "" }, { "docid": "50fba235f1f56dd80c5d7edc97bb407c", "score": "0.4865834", "text": "drawBars() {\n if (!this.location || (this.data.displayBars === CONST.TOKEN_DISPLAY_MODES.NONE)) return;\n [\"bar1\", \"bar2\"].forEach((b, i) => {\n const bar = this.bars[b];\n const attr = this.getBarAttribute(b);\n if (!attr || (attr.type !== \"bar\")) return bar.visible = false;\n this._drawBar(i, bar, attr);\n bar.visible = true;\n });\n }", "title": "" }, { "docid": "74043ccf9fb3f048c54f5ea3a9cbb742", "score": "0.48642159", "text": "function AddLabelAuto(heading){\n AddItemGeneral(heading);\n}", "title": "" }, { "docid": "6bc9b4b3950d6e81d11d0047d2ce181b", "score": "0.48614413", "text": "function populate_info(slot_idx1, slot_idx2, hide_detail) {\n // Check arguments, assign default values when missing.\n if (slot_idx2 === undefined) slot_idx2 = slot_idx1+1;\n if (hide_detail === undefined) hide_detail = false;\n\n // Consolidate the selected range into a single structure of review items.\n var si;\n var si1 = Math.min(slot_idx1, slot_idx2);\n var si2 = Math.max(slot_idx1, slot_idx2);\n var hinfo = $('#graph-bar-info');\n var slot_sum = {radicals:[], kanji:[], vocabulary:[], item_count:0, has_current:false, has_burn:false};\n for (si = si1; si < si2; si++) {\n var slot = timeline[si];\n if (slot === undefined) continue;\n slot_sum.radicals = slot_sum.radicals.concat(slot.radicals);\n slot_sum.kanji = slot_sum.kanji.concat(slot.kanji);\n slot_sum.vocabulary = slot_sum.vocabulary.concat(slot.vocabulary);\n slot_sum.item_count += slot.item_count;\n slot_sum.has_current |= slot.has_current;\n slot_sum.has_burn |= slot.has_burn;\n }\n\n // If no items are in the range, hide the detail window.\n if (slot_sum.item_count === 0) {\n hinfo.addClass('hidden');\n return;\n }\n\n // Save a global copy of the consolidated info for use in support functions.\n graph_detail_items = slot_sum;\n\n // Print the date or date range).\n var str = format_date(new Date(calc_time + si1 * graph_unit));\n if (si2-si1 > 1) str += ' to ' + format_date(new Date(calc_time + si2 * graph_unit));\n\n // Populate item type summaries.\n str += '<div class=\"summary\">';\n str += '<div class=\"tot\">'+(slot_sum.radicals.length+slot_sum.kanji.length+slot_sum.vocabulary.length)+' reviews</div>';\n str += '<div class=\"indent\">';\n str += '<div class=\"rad\">'+slot_sum.radicals.length+' radicals</div>';\n str += '<div class=\"kan\">'+slot_sum.kanji.length+' kanji</div>';\n str += '<div class=\"voc\">'+slot_sum.vocabulary.length+' vocabulary</div>';\n str += '</div>';\n if (slot_sum.has_current) str += '<div class=\"cur\">Current Level</div>';\n if (slot_sum.has_burn) str += '<div class=\"bur\">Burn Items</div>';\n str += '</div>';\n\n // If details are enabled, populate the review-item list.\n var idx, item;\n var show_detail = get_setting('show_detail') && !hide_detail;\n if (show_detail) {\n str += '<ul class=\"detail\">';\n for (idx = 0; idx < slot_sum.radicals.length; idx++) {\n item = slot_sum.radicals[idx];\n str += '<li class=\"rad\" lang=\"ja\" data-type=\"rad\" data-idx=\"'+idx+'\">';\n if (item.character !== null)\n str += item.character+'</li>';\n else\n str += '<i class=\"radical-'+item.meaning+'\"></i></li>';\n }\n for (idx = 0; idx < slot_sum.kanji.length; idx++) {\n item = slot_sum.kanji[idx];\n str += '<li class=\"kan\" lang=\"ja\" data-type=\"kan\" data-idx=\"'+idx+'\">'+item.character+'</li>';\n }\n for (idx = 0; idx < slot_sum.vocabulary.length; idx++) {\n item = slot_sum.vocabulary[idx];\n str += '<li class=\"voc\" lang=\"ja\" data-type=\"voc\" data-idx=\"'+idx+'\">'+item.character+'</li>';\n }\n str += '</ul>';\n }\n\n // We are done building the info box. Add it to the DOM.\n hinfo.css('max-width', $('#timeln-graph').width()/2 - 15);\n hinfo.html(str);\n\n // Add event handlers for hovering review items.\n if (show_detail) {\n $('#timeln .detail').on('mouseenter', 'li', item_info_event);\n $('#timeln .detail').on('mouseleave', item_info_event);\n }\n\n // If we are displaying a range, position the info box below the timeline.\n // If the user is just hovering over a timeslot, the info box is positioned in a different function.\n if (graph_hilight_mode != 0) {\n var tlpos = $('#timeline')[0].getBoundingClientRect();\n if (si1 <= graph_hours*2)\n hinfo.css('left', tlpos.left + Math.floor(Math.min(graph_hilight_x1,graph_hilight_x2)));\n else\n hinfo.css('left', tlpos.left + Math.floor(Math.max(graph_hilight_x1,graph_hilight_x2)) - hinfo.outerWidth());\n hinfo.css('top', tlpos.top + window.scrollY + graph_height_panel);\n }\n hinfo.removeClass('hidden');\n }", "title": "" }, { "docid": "6bbb7603ac66d3b3c52b92ee70ba56cb", "score": "0.4858625", "text": "function init () {\n var bar = createBar(rm)\n el.appendChild(bar.el)\n applyGo = bar.go\n }", "title": "" }, { "docid": "2f719b08ac03c1a780f92613714ec911", "score": "0.48585096", "text": "function PetsitterTitlebar(petsitter) {\n\n if (petsitter.ImgPath == null) {\n petsitter.ImgPath = 'images/default-profile.png'\n }\n var str = '<div class=\"avatar\"><img src=\"' + petsitter.ImgPath + '\" alt=\"\" /> <div class=\"im im-icon-Pencil\" style=\"width:27px;\" onclick=\"EditProfileImg()\"></div> </div>'\n + '<h2>' + petsitter.FirstName + \" \" + petsitter.LastName + '</h2>'\n\n if (petsitter.CityName != null) {\n document.getElementById(\"CityName\").value = petsitter.CityName;\n document.getElementById(\"StreetName\").value = petsitter.Street;\n document.getElementById(\"HouseNumber\").value = petsitter.HouseNumber;\n\n str += '<span>'\n + '<a href=\"#listing-location\" class=\"listing-address\">'\n + '<i class=\"fa fa-map-marker\"></i>'\n + ' ' + petsitter.CityName \n if (petsitter.Street != \"\") {\n str += ', ' + petsitter.Street + ' ';\n if (petsitter.HouseNumber != \"\") {\n str += petsitter.HouseNumber + ''\n }\n }\n \n + '</a>'\n + '</span>'\n }\n\n str += '<div class=\"star-rating\" data-rating=\"' + petsitter.Rate + '\">'\n + '<div class=\"rating-counter\"><a href=\"#listing-reviews\">(' + petsitter.ReviewCount + ' ביקורות )</a></div>'\n + '</div>'\n $('#titlebar').append(str);\n\n if (petsitter.About != null) {\n str = '<p>' + petsitter.About + '</p>';\n $('#listing-overview').append(str);\n }\n numericalRating('.numerical-rating');\n starRating('.star-rating');\n}", "title": "" } ]
c54ff8842d2e19670fa01e190f4fab5e
! moment.js locale configuration
[ { "docid": "7a3f267d70e175ebc12d8443ebc330d0", "score": "0.0", "text": "function plural(word, num) {\n var forms = word.split('_');\n return num % 10 === 1 && num % 100 !== 11\n ? forms[0]\n : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)\n ? forms[1]\n : forms[2];\n }", "title": "" } ]
[ { "docid": "eba7a54915599f144e0f867b7640f6f1", "score": "0.81141967", "text": "function ys(e,t,n){var a={ss:t?\"секунда_секунди_секунд\":\"секунду_секунди_секунд\",mm:t?\"хвилина_хвилини_хвилин\":\"хвилину_хвилини_хвилин\",hh:t?\"година_години_годин\":\"годину_години_годин\",dd:\"день_дні_днів\",MM:\"місяць_місяці_місяців\",yy:\"рік_роки_років\"};return\"m\"===n?t?\"хвилина\":\"хвилину\":\"h\"===n?t?\"година\":\"годину\":e+\" \"+\n//! moment.js locale configuration\nfunction(e,t){var n=e.split(\"_\");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}(a[n],+e)}", "title": "" }, { "docid": "d93cbc384ec5ca2395ed91c55ffe637e", "score": "0.7849099", "text": "function yt(e,t,n){var r={ss:t?\"секунда_секунди_секунд\":\"секунду_секунди_секунд\",mm:t?\"хвилина_хвилини_хвилин\":\"хвилину_хвилини_хвилин\",hh:t?\"година_години_годин\":\"годину_години_годин\",dd:\"день_дні_днів\",MM:\"місяць_місяці_місяців\",yy:\"рік_роки_років\"};return\"m\"===n?t?\"хвилина\":\"хвилину\":\"h\"===n?t?\"година\":\"годину\":e+\" \"+\n//! moment.js locale configuration\nfunction(e,t){var n=e.split(\"_\");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}(r[n],+e)}", "title": "" }, { "docid": "157f60aa42f6cc835675896915a22a65", "score": "0.7548106", "text": "function localizeMoment(mom) {\n\t\tif ('_locale' in mom) { // moment 2.8 and above\n\t\t\tmom._locale = localeData;\n\t\t}\n\t\telse { // pre-moment-2.8\n\t\t\tmom._lang = localeData;\n\t\t}\n\t}", "title": "" }, { "docid": "83aee654a8d97aa81bf251da5968faeb", "score": "0.71984273", "text": "function localizeMoment(mom) {\n\t\tmom._locale = localeData;\n\t}", "title": "" }, { "docid": "83aee654a8d97aa81bf251da5968faeb", "score": "0.71984273", "text": "function localizeMoment(mom) {\n\t\tmom._locale = localeData;\n\t}", "title": "" }, { "docid": "5d472c89985829e78746dd2ccee6a636", "score": "0.71400195", "text": "function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=getLocale(key)}else{data=defineLocale(key,values)}if(data){// moment.duration._locale = moment._locale = data;\nglobalLocale=data}else{if(typeof console!==\"undefined\"&&console.warn){//warn user if arguments are passed but the locale could not be set\nconsole.warn(\"Locale \"+key+\" not found. Did you forget to load it?\")}}}return globalLocale._abbr}", "title": "" }, { "docid": "96429cc3f1ee77f92477a1c0f838fa77", "score": "0.69832134", "text": "function locale_locales__getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=locale_locales__getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\nglobalLocale=data;}}return globalLocale._abbr;}", "title": "" }, { "docid": "96429cc3f1ee77f92477a1c0f838fa77", "score": "0.69832134", "text": "function locale_locales__getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=locale_locales__getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\nglobalLocale=data;}}return globalLocale._abbr;}", "title": "" }, { "docid": "62948c6d3b3137c8820915b199eba8cd", "score": "0.66978", "text": "function locale_locales__getSetGlobalLocale(key,values){var data;if(key){if(typeof values === 'undefined'){data = locale_locales__getLocale(key);}else {data = defineLocale(key,values);}if(data){ // moment.duration._locale = moment._locale = data;\n\tglobalLocale = data;}}return globalLocale._abbr;}", "title": "" }, { "docid": "2c83a51fb5077040656e855f9655f4e9", "score": "0.6690814", "text": "function locale_locales__getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=locale_locales__getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\n\tglobalLocale=data;}}return globalLocale._abbr;}", "title": "" }, { "docid": "2c83a51fb5077040656e855f9655f4e9", "score": "0.6690814", "text": "function locale_locales__getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=locale_locales__getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\n\tglobalLocale=data;}}return globalLocale._abbr;}", "title": "" }, { "docid": "2c83a51fb5077040656e855f9655f4e9", "score": "0.6690814", "text": "function locale_locales__getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=locale_locales__getLocale(key);}else{data=defineLocale(key,values);}if(data){// moment.duration._locale = moment._locale = data;\n\tglobalLocale=data;}}return globalLocale._abbr;}", "title": "" }, { "docid": "fe8cccfeb08a82911f2984d5a476dcd7", "score": "0.62765163", "text": "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "title": "" }, { "docid": "fe8cccfeb08a82911f2984d5a476dcd7", "score": "0.62765163", "text": "function ignoreMomentLocale(webpackConfig) {\n delete webpackConfig.module.noParse;\n webpackConfig.plugins.push(new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/));\n}", "title": "" }, { "docid": "4a6f10cf3c829e810d9763057a3eee1b", "score": "0.6203053", "text": "function ApexLocale() {}", "title": "" }, { "docid": "ce1aeb6bf552ec523ba14d3bcc01a368", "score": "0.61849964", "text": "function E(a,b){var c;\n// moment.duration._locale = moment._locale = data;\nreturn a&&(c=m(b)?H(a):F(a,b),c&&(ld=c)),ld._abbr}", "title": "" }, { "docid": "c8b0d3e3931c4dde93f5a594281ffb21", "score": "0.61835414", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n \n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n \n return globalLocale._abbr;\n }", "title": "" }, { "docid": "d58238f1806d55b8423ac5277b4f92ae", "score": "0.61600935", "text": "function initialize_date() {\n format = 'L<br/>LTS';\n datetime = document.getElementById(\"datetime\");\n moment.locale( window.navigator.languages );\n datetime.innerHTML = moment().format( format );\n setInterval( () => { datetime.innerHTML = moment().format( format ); }, 1000 );\n}", "title": "" }, { "docid": "9c0d0ea8dd2f120115abd8f0b67c7bdd", "score": "0.6134753", "text": "function configureGlobalMomentLocale(localeOverride = \"system-default\", weekStart = \"locale\") {\n var _a;\n const obsidianLang = localStorage.getItem(\"language\") || \"en\";\n const systemLang = (_a = navigator.language) === null || _a === void 0 ? void 0 : _a.toLowerCase();\n let momentLocale = langToMomentLocale[obsidianLang];\n if (localeOverride !== \"system-default\") {\n momentLocale = localeOverride;\n }\n else if (systemLang.startsWith(obsidianLang)) {\n // If the system locale is more specific (en-gb vs en), use the system locale.\n momentLocale = systemLang;\n }\n const currentLocale = window.moment.locale(momentLocale);\n console.debug(`[Calendar] Trying to switch Moment.js global locale to ${momentLocale}, got ${currentLocale}`);\n overrideGlobalMomentWeekStart(weekStart);\n return currentLocale;\n}", "title": "" }, { "docid": "c4ca5e41a4aa0b61bf1d78f076ca18f7", "score": "0.61138785", "text": "function getSetGlobalLocale(key, values) {\n var data;\n // moment.duration._locale = moment._locale = data;\n return key && (data = isUndefined(values) ? getLocale(key) : defineLocale(key, values)) && (globalLocale = data), \n globalLocale._abbr;\n }", "title": "" }, { "docid": "fefc97e58de5fe47afa0204064b1ddcf", "score": "0.61022425", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n }", "title": "" }, { "docid": "fefc97e58de5fe47afa0204064b1ddcf", "score": "0.61022425", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n }", "title": "" }, { "docid": "d78e40e4c179feb443dc862e37dfc94c", "score": "0.60929024", "text": "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "title": "" }, { "docid": "d78e40e4c179feb443dc862e37dfc94c", "score": "0.60929024", "text": "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "title": "" }, { "docid": "d78e40e4c179feb443dc862e37dfc94c", "score": "0.60929024", "text": "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "title": "" }, { "docid": "d78e40e4c179feb443dc862e37dfc94c", "score": "0.60929024", "text": "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "title": "" }, { "docid": "d78e40e4c179feb443dc862e37dfc94c", "score": "0.60929024", "text": "function getSetGlobalLocale (key, values) {\n\t var data;\n\t if (key) {\n\t if (isUndefined(values)) {\n\t data = getLocale(key);\n\t }\n\t else {\n\t data = defineLocale(key, values);\n\t }\n\t\n\t if (data) {\n\t // moment.duration._locale = moment._locale = data;\n\t globalLocale = data;\n\t }\n\t }\n\t\n\t return globalLocale._abbr;\n\t}", "title": "" }, { "docid": "e2a7564a9c663b294087790912e16fb4", "score": "0.60782045", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "e2a7564a9c663b294087790912e16fb4", "score": "0.60782045", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "e2a7564a9c663b294087790912e16fb4", "score": "0.60782045", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n else {\n if ((typeof console !== 'undefined') && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" }, { "docid": "813d721eb66e5ce45a251a61322ae26f", "score": "0.6073029", "text": "function getSetGlobalLocale (key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n }\n else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n }\n }\n\n return globalLocale._abbr;\n}", "title": "" } ]
c693be17243a5c619903c12d712a9eb2
Bubble Sort For every pair of adjacent indicies swap them if the item on the left is larger than the item on the right continue until array is fully sorted
[ { "docid": "6c818407cbc475752e1c5573da29bb1e", "score": "0.0", "text": "function bubbleSort(arr){ }", "title": "" } ]
[ { "docid": "4e8cc2520600ea7b60e7b7fd2f4bc6e9", "score": "0.7616863", "text": "function bubbleSortOptimized(arr){\n //iterate over array and keep moving largest value to the end\n for(let i=arr.length; i > 0; i--){ \n let anySwap = false;\n for(let j =0; j<i-1; j++){\n if(arr[j] > arr[j+1])\n {\n let temp = arr[j];\n arr[j] = arr[j+1];\n arr[j+1] = temp; \n anySwap = true;\n }\n }\n if(!anySwap)\n break;\n console.log(\"Pass\");\n }\n\n return arr;\n}", "title": "" }, { "docid": "f322efa0072cc09acdd73c29f7a0719f", "score": "0.76020664", "text": "function bubbleSort(arr) {\n var length = arr.length;\n for (var i = 0; i < length; i++) { //Number of passes\n for (var j = 0; j < (length - i - 1); j++) { //Notice that j < (length - i)\n //Compare the adjacent positions\n if(arr[j] > arr[j+1]) {\n //Swap the numbers\n var tmp = arr[j]; //Temporary variable to hold the current number\n arr[j] = arr[j+1]; //Replace current number with adjacent number\n arr[j+1] = tmp; //Replace adjacent number with current number\n }\n }\n }\n return arr;\n}", "title": "" }, { "docid": "caab37c5e5db33e95d58670a0a7deca0", "score": "0.759962", "text": "function question27(arr) {\n var temp = 0\n var thereWasASwap = true\n while (thereWasASwap) {\n thereWasASwap = false\n for (var i = 0; i < arr.length - 1; i++) {\n if (arr[i] > arr[i + 1]) {\n temp = arr[i]\n arr[i] = arr[i + 1]\n arr[i + 1] = temp\n thereWasASwap = true\n }\n }\n }\n return arr\n}", "title": "" }, { "docid": "34406d46e7fdeedabbb1dea6e689e3f5", "score": "0.75917965", "text": "function optimizedBubbleSort(arr){\n let noSwaps;\n for(let i = arr.length; i > 0; i--){ \n let noSwaps = true \n for(let j = 0; j < i - 1; j++){ \n if(arr[j] > arr[j+1]){\n swap(arr, j, j+1)\n noSwaps = false\n }\n }\n if(noSwaps) break\n }\n return arr\n}", "title": "" }, { "docid": "8980886ce8081b5cb3c53365ff9237f5", "score": "0.75493807", "text": "function bubbleSortMoreOptimized(arr) {\n let noSwaps;\n\n for (let i = arr.length; i > 0; i--) {\n noSwaps = true;\n for (let j = 0; j < i - 1; j++) {\n if (arr[j] > arr[j + 1]) {\n let temp = arr[j];\n arr[j] = arr[j + 1];\n arr[j + 1] = temp;\n noSwaps = false;\n }\n }\n if (noSwaps) break;\n }\n return arr;\n}", "title": "" }, { "docid": "b9dde32202b7b1051f2de03ac6cc68c0", "score": "0.7544806", "text": "function bubbleSort(arr) {\n // each iteration will reduce on node to inspect.\n for (let nodesToInspect = arr.length; nodesToInspect > 1; nodesToInspect--) {\n // start comparison from 0th element and go till the remaining nodeToInspect.\n // since the nodeToInspect will be reached by the \"next\" element inner can remain \n // <= nodesToInspect - 1\n for (let inner = 0; inner <= nodesToInspect - 1; inner++) {\n let currElem = arr[inner];\n let nextElem = arr[inner + 1];\n if (currElem > nextElem) {\n swapArrayElem(arr, inner, inner + 1);\n }\n }\n console.log(arr);\n }\n}", "title": "" }, { "docid": "09df05b4451c380aaa52b35eab06e7e7", "score": "0.75446874", "text": "function bubbleSort(arr) {\n for (let i = 0; i < arr.length; i++) {\n for (let j = 0; j < arr.length - i - 1; j++) {\n if (arr[j] > [j + 1]) {\n const swap = arr[j];\n arr[j] = arr[j + 1];\n arr[j + 1] = swap;\n }\n }\n }\n}", "title": "" }, { "docid": "6b1568b2ff91af67a84b95103ec3cb6d", "score": "0.7509131", "text": "function bubble_sort(array){\n //outer loop is number of passes\n for (i=0; i < array.length; i++){\n //iterates through array per pass and decreases length of array checked because largest element already bubbled to end\n for (j=0; j < array.length-i-1; j++){\n if (array[j+1] < array[j]){\n var temp = array[j]\n array[j] = array[j+1]\n array[j+1] = temp\n }\n }\n }\n return array;\n}", "title": "" }, { "docid": "85213ad5a3601bf433b84a279a5804ef", "score": "0.74750555", "text": "function bubbleSort(arr) {\n let noSwaps;\n for (let i = 0; i < arr.length; i++) {\n // restrict window to (arr.length - i) because i elements are at sorted position already\n // restrict window -1 to prevent breaking out arr.length (only when i=0 first outer loop basically)\n for (let j = 0; j < arr.length - i - 1; j++) {\n console.log(`[${arr}] \\t${arr[j]} ? ${arr[j + 1]} \\tj=${j} i=${i}`);\n if (arr[j] > arr[j + 1]) {\n // swap elements\n [arr[j], arr[j + 1]] = [arr[j + 1], arr[j]];\n noSwaps = false;\n }\n }\n // nearly sorted array short circuit\n if (noSwaps) break;\n }\n return console.log(`Sorted: [${arr}]`);\n}", "title": "" }, { "docid": "f8e957a71de8616c0544e23bb1d00398", "score": "0.74529517", "text": "function shortBubbleSort(arr) {\n let noSwaps;\n for (let i = arr.length; i > 0; i--) {\n noSwaps = true;\n for (let j = 0; j < i - 1; j++) {\n if (arr[j] > arr[j+1]) {\n let temp = arr[j];\n arr[j] = arr[j+1];\n arr[j+1] = temp;\n noSwaps = false;\n }\n }\n if (noSwaps) break;\n }\n return arr;\n}", "title": "" }, { "docid": "fa02958b25a8fa9a02b8af942041bf36", "score": "0.7443961", "text": "function bubbleSort(array) {\n for (let i = 0; i < array.length; i++) {\n for (let j = 0; j < array.length - i; j++) {\n if (array[j + 1] < array[j]) {\n const temp = array[j + 1];\n\n array[j + 1] = array[j];\n\n array[j] = temp;\n }\n }\n }\n}", "title": "" }, { "docid": "c0c5cf6fb8d617ad67bf14b465660217", "score": "0.7441795", "text": "function bubbleSort(arr){\n var noSwaps;\n for (var i = arr.length; i > 0; i--){\n noSwaps = true\n for (var j = 0; j< i-1; j++){\n console.log(arr, arr[j], arr[j+1]);\n if (arr[j] > arr[j+1]){\n // SWAP!\n var temp = arr[j];\n arr[j] =arr[j+1];\n arr[j+1] = temp;\n noSwaps = false;\n\n }\n }\n if (noSwaps) break;\n }\n return arr;\n }", "title": "" }, { "docid": "ae4fab7cb70e8a5d90d25370a3430142", "score": "0.7436035", "text": "function bubbleSort(arr) {\n for (let i = 0; i < arr.length; i++) {\n for (let j = 0; j < arr.length; j++) {\n if (arr[j] > arr[j+1]) {\n // SWAP!\n let temp = arr[j];\n arr[j] = arr[j+1];\n arr[j+1] = temp;\n }\n }\n }\n return arr;\n}", "title": "" }, { "docid": "27f896ec751332d0e12d5568599fb5ef", "score": "0.74303097", "text": "function bubble_sort(arr) {\n\t\tvar temp, exchange;\n\t\tfor(var i = 0; i < arr.length; i++) {\n\t\t\texchange = false;\n\t\t\tfor(var j = arr.length - 2; j >= i; j--) {\n\t\t\t\tif((arr[j + 1].length) > (arr[j]).length) {\n\t\t\t\t\ttemp = arr[j + 1]; arr[j + 1] = arr[j]; arr[j] = temp;\n\t\t\t\t\texchange = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(!exchange) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn arr;\n\t}", "title": "" }, { "docid": "2e51ed5257e119a5b1397eabf9ca78ca", "score": "0.7426063", "text": "function bubbleSort(array) {\n while (true) {\n let swapped = false;\n for (let idx = 1; idx < array.length; idx++) {\n if (array[idx - 1] <= array[idx]) continue; // if..else is doing opposite to mine\n [array[idx - 1], array[idx]] = [array[idx], array[idx - 1]];\n swapped = true;\n }\n if (!swapped) break;\n }\n}", "title": "" }, { "docid": "d130ee8f8580b5160c2af5759fec14cf", "score": "0.73686266", "text": "function bubbleSort(arr) {\n for (let i = 0; i < arr.length; i++) {\n for (let j = 0; j < (arr.length - i - 1); j++) {\n if (arr[j] > arr[j+1]) {\n const lesser = arr[j+1];\n arr[j+1] = arr[j];\n arr[j] = lesser;\n }\n }\n }\n\n return arr;\n}", "title": "" }, { "docid": "bd2ec076903a63016aade8c74b98958c", "score": "0.7367115", "text": "function bubbleSort(arr) {\n for (let i = arr.length; i > 0; i--) {\n for (let j = 0; j < i-1; j++) {\n if (arr[j] > arr[j+1]) {\n // SWAP!\n let temp = arr[j];\n arr[j] = arr[j+1];\n arr[j+1] = temp;\n }\n }\n }\n return arr;\n}", "title": "" }, { "docid": "8121ed773b29c40ad87b783ddc6140c6", "score": "0.7364163", "text": "function bubbleSort(arr) {\n // create short-circuit \n var noSwaps;\n // decreasing loop\n for (var i = arr.length; i > 0; i--) {\n // set the noswap to true automatically \n noSwaps = true;\n // nested loop with i as lenght to get shorter array each time round\n for (var j = 0; j < i - 1; j++) {\n // Compare j and what comes next: j+1\n if (arr[j] > arr[j + 1]) {\n // SWAP!\n var temp = arr[j];\n arr[j] = arr[j + 1];\n arr[j + 1] = temp;\n // if swap has happened change noswap to false\n noSwaps = false;\n }\n }\n // as soon as a loop does not perform a swap it will stop iterating.\n if (noSwaps) break;\n }\n return arr;\n}", "title": "" }, { "docid": "ede5a55625fae1cb5b0bffc83908d926", "score": "0.7350104", "text": "function bubbleSort(arr) {\n let noSwaps;\n for (let i = arr.length; i > 0; i--) {\n noSwaps = true;\n for (let j = 0; j < i-1; j++) {\n if (arr[j] > arr[j+1]) {\n // SWAP!\n let temp = arr[j];\n arr[j] = arr[j+1];\n arr[j+1] = temp;\n noSwaps = false;\n }\n }\n if(noSwaps) break;\n }\n return arr;\n}", "title": "" }, { "docid": "f460e1a96e4a14a62f4460fb9c9e324f", "score": "0.73259324", "text": "function _bubbleSort() {\r\n n = sortingArray.length;\r\n for (var i = n - 1; i >= 0; i--) {\r\n for (var j = 0; j < i; j++) {\r\n if (sortingArray.getItem(j).getValue() > sortingArray.getItem(j + 1).getValue()) {\r\n // Bubble the larger element up\r\n _swap(j, j + 1);\r\n }\r\n }\r\n }\r\n}", "title": "" }, { "docid": "7ca35728038b8c7a1b2369f54746338c", "score": "0.73234344", "text": "function sortArr( comparator, array ){ //ref: https://www.youtube.com/watch?v=stt26Ia2IDk\n sorted = array; //duplicates unsorted array, the new array will be sorted then returned using bubble sort \n var changed; //bool to see if last iteration had an element swap\n\n for (var i=0; i<array.length-1; i++) { //outer loop -> iterate array one less time than its length -> left to right\n for (var j=0; j<array.length-1; j++) { //inner loop -> iterate array one less time than its length -> pushes largest item left each iteration\n if (!comparator(sorted[j], sorted[j+1])) { //useses comapritor function to get bool value, if it is false\n changed = true; //set change var to true because a swap will now happen\n var temp = sorted[j]; //create a temp var to hold the current element in the array\n sorted[j] = sorted[j+1]; //set the current element in the array to that of the element to its right\n sorted[j+1] = temp; //set the element to the right of the current element to the value of temp (what was the current elemente)\n }\n }\n if (!changed) { //if an intire iteration happens on the inner loop without a change, than the array has been sorted\n return sorted; //return the sorted array\n }\n }\n return sorted; //if all outer loop iterations finish, return the sorted array\n}", "title": "" }, { "docid": "f38656ed80533dcb3634178fd55d71e2", "score": "0.73188645", "text": "function bubbleSortBetter(arr){\n for(let i = arr.length; i > 0; i--){\n for(let j = 0; j < i - 1; j++){\n if(arr[j] > arr[j+1]){\n swap(arr, j, j+1)\n }\n }\n }\n return(arr); \n}", "title": "" }, { "docid": "c1306fdb1ca7b301755afeb500fe7a58", "score": "0.73183024", "text": "function bubbleSort(arr){\n const loop = arr.length; \n\n //loop for loop length\n for(let i = 0; i < loop; i++){\n \n //cycle through arr items \n for(let j = 0; j < loop; j++){\n\n //compare adjecent items \n \n if(arr[j] > arr[j+1]) {\n //swap\n let temp = arr[j]; \n arr[j] = arr[j+1]; \n arr[j+1] = temp; \n }\n }\n }\n console.log(arr)\n return arr; \n }", "title": "" }, { "docid": "1584751608d53539b591f35059679406", "score": "0.7310768", "text": "function bubbleSort(array){\n let endPoint = array.length;\n let index = 0;\n let ordered = false;\n \n while(!ordered){\n if(array[index] > array[index+1]){\n [array[index], array[index+1]] = [array[index+1], array[index]];\n }\n \n [index,endPoint] = (index === endPoint-2) ? [0, --endPoint] : [++index, endPoint];\n \n ordered = ((endPoint === 2) ? true : false);\n }\n return array;\n}", "title": "" }, { "docid": "b6da9c16857efcdec1603aa071463db3", "score": "0.7304441", "text": "function bubbleSort(arr){\n //1st loop starts from ending element\n for (var i = arr.length; i > 0; i--){\n //2nd loop starts from 1st element till i value\n for(var j=0; j< i-1; j++){\n // compare with adjacent and if it is smaller, swap it\n if(arr[j] > arr[j+1]){\n var temp = arr[j];\n arr[j] = arr[j+1];\n arr[j+1] = temp;\n } \n }\n }\n return arr;\n}", "title": "" }, { "docid": "c5e4719b7a57aedf905bb9ca815d28d6", "score": "0.7298538", "text": "async bubbleSort() {\n let i, j; \n for (i = 0; i < this.arr.length; i++){\n // Last i elements are already in place \n for (j = 0; j < this.arr.length - i - 1; j++) {\n if (this.arr[j].value > this.arr[j+1].value){\n await this.swap(j, j + 1, true);\n }\n }\n }\n }", "title": "" }, { "docid": "a7dfe477bfd2ec2eaa353d971986e829", "score": "0.72920156", "text": "function bubbleSort(arr) {\n for (let i = arr.length - 1; i > 0; i--) {\n let swap = false;\n for (let j = 0; j < i; j++) {\n if (arr[j] > arr[j + 1]) {\n [arr[j], arr[j + 1]] = [arr[j + 1], arr[j]];\n swap = true;\n }\n }\n if (!swap) break;\n }\n\n return arr;\n}", "title": "" }, { "docid": "f2f8bea26205d606c34d6be835711da4", "score": "0.72858316", "text": "function bubbleSort(array) {\n var countOuter = 0;\n var countInner = 0;\n var countSwap = 0;\n var swapped;\n do {\n countOuter++;\n swapped = false;\n for(var i=0;i<array.length;i++){\n countInner++;\n if(array[i] && array[i+1] && array[i] > array[i+1]) {\n countSwap ++;\n swap(array, i, i+1);\n swapped = true;\n }\n }\n } while(swapped);\n console.log('outer:', countOuter, 'inner:', countInner, 'swap:', countSwap);\n return array;\n}", "title": "" }, { "docid": "5b2e06f80ba5ae9ea6f62a0f43b5e3ff", "score": "0.7283239", "text": "function bubbleSort(arr) {\n for (let i = 0; i < arr.length; i++) {\n for (let j = 1; j < arr.length; j++) {\n if (arr[j - 1] > arr[j]) {\n const auxiliar = arr[j];\n [arr[j], arr[j - 1]] = [arr[j - 1], auxiliar];\n }\n }\n }\n return arr;\n}", "title": "" }, { "docid": "8c55858bbc19153951f0e684492706f5", "score": "0.7280526", "text": "function bubbleSort(arr) {\n for (let i=0; i < arr.length; i++) {\n for (let j=0; j < (arr.length - i - 1); j++ ) {\n if (arr[j] > arr[j+1]) {\n const lesser = arr[j+1];\n arr[j+1] = arr[j];\n arr[j] = lesser;\n }\n }\n }\n return arr\n}", "title": "" }, { "docid": "cff22b3007bb20b3539388ad6ef25ca0", "score": "0.72794956", "text": "function bubbleSort(arr) {\n let noSwaps;\n const swap = (arr, idx1, idx2) => [arr[idx1], arr[idx2]] = [arr[idx2], arr[idx1]];\n for (let i = arr.length; i > 0; i--) {\n noSwaps = true;\n for (let j = 0; j < i-1; j++) {\n if (arr[j] > arr[j+1]) {\n swap(arr, j, j+1);\n noSwaps = false;\n }\n }\n if(noSwaps) break;\n }\n return arr;\n}", "title": "" }, { "docid": "50f79de07a39aa245ff0b78a6adf3ee8", "score": "0.7266238", "text": "function bubbleSort(arr){\n swapped = false;\n let end = arr.length - 1;\n for (let i = 0; j =1; i < end; i++; j++){\n if (arr[i] > arr[j]){\n swapped = true;\n [arr[i], arr[j] = arr[j], arr[i]]];\n}\n}\nend--\n}", "title": "" }, { "docid": "323e41f82a7f871953618953ac0238ba", "score": "0.72642374", "text": "function bubbleSort(arr) {\n let noSwaps;\n\n const swap = (arr, idx1, idx2) => {\n [arr[idx1], arr[idx2]] = [arr[idx2], arr[idx1]];\n }\n\n for (let i = arr.length; i > 0; i--) {\n noSwaps = true;\n for (let j = 0; j < i-1; j++) {\n if (arr[j] > arr[j+1]) {\n // SWAP!\n swap(arr, j, j+1);\n noSwaps = false;\n }\n }\n if(noSwaps) break;\n }\n return arr;\n}", "title": "" }, { "docid": "cf8987fb813d90a404459aa2c01be451", "score": "0.7260704", "text": "function bubbleSort(optimized) {\n\n let n = items.length;\n\n // go over all items\n for (let i = 0; i < n; i++) {\n\n let swapped = false;\n\n // compare the pair, bubble the largest to the end\n for (let j = 0; j < (n - i - 1); j++) {\n\n if (items[j] > items[j+1]) {\n // swap\n let temp = items[j];\n items[j] = items[j+1];\n items[j+1] = temp;\n\n swapped = true;\n }\n }\n console.log('OuterIter#: ', i, items);\n\n\n if (optimized && !swapped) {\n // asked to run optimized version\n console.log('There were no swaps in last iteration, so array is sorted. Returning.');\n return;\n }\n }\n\n}", "title": "" }, { "docid": "7ad0656c2531e486a285f6f6125bbf57", "score": "0.7242145", "text": "function bubbleSort(arr){\n let noSwaps;\n for(let i = arr.length; i > 0; i--){\n noSwaps = true;\n for(let j = 0; j < i - 1; j++){\n if(arr[j] > arr[j+1]){\n let temp = arr[j]\n arr[j] = arr[j + 1]\n arr[ j+ 1] = temp\n noSwaps = false; \n }\n }\n if(noSwaps) break;\n }\n return arr;\n}", "title": "" }, { "docid": "9a9b7581f8ea3463bf07792959cfcfc5", "score": "0.72415364", "text": "function bubbleSort(array) {\n\tvar sorting = true;\n\n\twhile (sorting) {\n\t\tsorting = false;\n\n\t\tfor (var i = 0; i < array.length; i++) {\n\t\t\tvar cur = array[i];\n\t\t\tvar next = array[i + 1];\n\n\t\t\tif (cur > next) {\n\t\t\t\tlet temp = next;\n\t\t\t\tarray[i + 1] = cur;\n\t\t\t\tarray[i] = temp;\n\t\t\t\tsorting = true;\n\t\t\t}\n\t\t}\n\t}\n return array;\n}", "title": "" }, { "docid": "7778013fdf534b5d1ae7af9259fe2db5", "score": "0.7241442", "text": "function whileBubble(arr) {\n let isSorted = false;\n let didSwap = false;\n\n while (!isSorted) {\n for (let i = 0; i < arr.length; i++) {\n if (arr[i] > arr[i + 1]) {\n const temp = arr[i];\n arr[i] = arr[i + 1];\n arr[i + 1] = temp;\n\n didSwap = true;\n }\n if (i === arr.length - 1) {\n if (didSwap) {\n } else {\n isSorted = true;\n }\n }\n }\n }\n}", "title": "" }, { "docid": "3cb3c57c2c738fabd571b753248fb65c", "score": "0.72410715", "text": "function bubbleSort(arr) {\n for(let i=0;i<arr.length;i++){\n for(let j=0 ;i<arr.length-i;j++){\n if(arr[j]>arr[j+1]){\n const lesser = arr[j+1];\n arr[j+1]= arr[i];\n arr[i]= lesser\n }\n }\n }\n return arr;\n}", "title": "" }, { "docid": "849b43fb7ca6663727e061bcd5876208", "score": "0.72401285", "text": "function bubbleSort(arr) {\n for(let i = arr.length; i > 0; i--){\n// console.log(arr[i])\n for (let j = 0; j < i - 1; j++) {\n if(arr[j] > arr[j+1]) {\n // SWAP VALUES\n let temp = arr[j]\n arr[j] = arr[j+1]\n arr[j+1] = temp\n }\n }\n }\n return arr\n}", "title": "" }, { "docid": "98c9c433216ce7ebf5e8af0b2b30f9e5", "score": "0.72276753", "text": "function bubbleSort(arr) {\n let noSwaps;\n for (let i = arr.length; i > 0; i--) {\n noSwaps = true;\n for (let j = 0; j < i - 1; j++) {\n if (arr[j] > arr[j+1]) {\n let temp = arr[j];\n arr[j] = arr[j+1];\n arr[j+1] = temp;\n noSwaps = false;\n }\n }\n if (noSwaps) break;\n }\n return arr;\n}", "title": "" }, { "docid": "5dc674e01abfb1cf1e36b644519e8efa", "score": "0.72038215", "text": "function bubbleSort(array) { \n for (var i = array.length; i > 0; i--) { //created array.length - 1 loops for us, and loops backwards\n for (var j = 0; j < i; j++) { //loop thru whole array and on each loop stop 1 shorter than the previous loop, because the largest element has 'bubbled' up already\n if (array[j] > array[j + 1]) {\n var temp = array[j]; //switch elements if neccessary\n array[j] = array[j + 1];\n array[j + 1] = temp;\n }\n }\n }\n return array;\n}", "title": "" }, { "docid": "abc689b21ffff88cb639540125585a4b", "score": "0.71936435", "text": "function bubble(arr){\n for(let i = 0; i < arr.length ; i++){\n for(let j = 0; j < arr.length; j++ ){\n if(arr[j] > arr [j+1]){\n temp = arr[j]\n arr[j] = arr[j+1]\n arr[j+1] = temp\n }\n }\n }\n return arr\n}", "title": "" }, { "docid": "7a0b8468e866cdeddda2fde2b87e410d", "score": "0.71914816", "text": "function bubbleSort(arr) {\n let noSwaps = false;\n\n for (let i = arr.length; i > 0; i--) {\n noSwaps = true;\n for (let j = 0; j < i - 1; j++) {\n if (arr[j] > arr[j + 1]) {\n let temp = arr[j];\n arr[j] = arr[j + 1];\n arr[j + 1] = temp;\n noSwaps = false;\n }\n }\n if (noSwaps) break;\n }\n return arr;\n}", "title": "" }, { "docid": "a23a5aa3a780850e7891fc7450c09b5b", "score": "0.7183911", "text": "function bubbleSort(array) {\n let swapped = false;\n do {\n swapped = false;\n\n array.forEach((item, index) => {\n // console.log(item, index, array[index + 1], (item > array[index + 1]))\n if (item > array[index + 1]) {\n const temp = item;\n\n // swap array values\n array[index] = array[index + 1];\n array[index + 1] = temp;\n\n swapped = true;\n }\n });\n } while (swapped);\n\n return array;\n}", "title": "" }, { "docid": "33e7a6e6e62b10e4fc86632f77d2ca80", "score": "0.7175038", "text": "function bubbleSort(arr){\n var noSwaps;\n for(var i = arr.length; i > 0; i--){\n noSwaps = true;\n for(var j = 0; j < i - 1; j++){\n if(arr[j] > arr[j+1]){\n var temp = arr[j];\n arr[j] = arr[j+1];\n arr[j+1] = temp;\n noSwaps = false; \n }\n }\n if(noSwaps) break;\n }\n return arr;\n }", "title": "" }, { "docid": "d1fb3d25d06367089c75bacdb357571d", "score": "0.717204", "text": "function bubbleSort(array) {\n var swapped;\n while (true) {\n swapped = false;\n\n for (var i = 0; i < array.length - 1; i++) {\n if (array[i] > array[i + 1]) {\n exchange(array, i, i + 1);\n swapped = true;\n }\n }\n\n if (!swapped) {\n break;\n }\n }\n}", "title": "" }, { "docid": "d61a0bf61dcb86eab94e31e533a2c020", "score": "0.7170868", "text": "function bubbleSort(arr){}// Bubble Sort", "title": "" }, { "docid": "83035ea0aa69154fa8e0b6b773da124b", "score": "0.7165251", "text": "function bubbleSort(array) {\n \n// We will have two loops, one nested inside of the other. Our outer loop dictates how many times we want to do what is inside the inner for loop. Specifically, we want to do this 'array.length - 1' times. \n \n// This is how we dictate array.length-1. \n for (var i = array.length; i > 0; i--) {\n \n// Our inner loop is where we will manage the sorting of each pari of numbers. We will create a new variable called j that will go left to right through the array for as long as it's less than i. This allows us to stop the loop one less each time. \n for (var j = 0; j < i; j++) {\n\n// Now the last thing to do is to build functionality to switch neigboring numbers if the one on the left is greater than the one on the right. \n \n// If the first number is greater than the number to it's right, then we will switch the order. \n if (array[j] > array[j + 1]) {\n \n// To make the switch we will create this temporary variable. \n var temp = array[j];\n \n// Now we will change the location of this temporary variable by adding 1 to j. \n array[j] = array[j + 1];\n array[j + 1] = temp;\n }\n }\n }\n\n// Last thing to do is return our array here. \n return array;\n}", "title": "" }, { "docid": "4e5dcae7d7f436feb7943a5041dca7f3", "score": "0.7160361", "text": "function BubbleSort(arr) {\n\t//Swap values\n\tconst swap = (arr, idx1, idx2) => {\n\t\t[arr[idx1], arr[idx2]] = [arr[idx2], arr[idx1]]; //=\n\t};\n\tlet noSwaps;\n\tfor (let i = arr.length; i > 0; i--) {\n\t\tnoSwaps = true;\n\t\tfor (let j = 0; j < i - 1; j++) {\n\t\t\tif (arr[j] > arr[j + 1]) {\n\t\t\t\tswap(arr, j, j + 1);\n\t\t\t\tnoSwaps = false;\n\t\t\t}\n\t\t}\n\t\tif (noSwaps) break;\n\t}\n\treturn arr;\n}", "title": "" }, { "docid": "7e4cc18ad051366d075894f1571a2bb9", "score": "0.7157097", "text": "function bubbleSort(arr) {\n let noSwaps;\n for (let i = arr.length; i > 0; i--) {\n noSwaps = true;\n for (let j = 0; j < i - 1; j++) {\n console.log(arr, arr[j], arr[j + 1]);\n if (arr[j] > arr[j + 1]) {\n // swap\n var temp = arr[j];\n arr[j] = arr[j + 1];\n arr[j + 1] = temp;\n noSwaps = false;\n }\n }\n if (noSwaps) break;\n }\n return arr;\n}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" }, { "docid": "01656f284ee540b57fa32164d0c2b761", "score": "0.71503216", "text": "function bubbleSort(arr){}", "title": "" } ]
c4d59e4ca0670dd64422a1b1768313c4
Get the value for a attribute on a node. Only used in DEV for SSR validation. The third argument is used as a hint of what the expected value is. Some attributes have multiple equivalent values.
[ { "docid": "d5a8f2cc54a2dc106639f17b03b2e0ad", "score": "0.0", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "title": "" } ]
[ { "docid": "322f21af2f1aefdc309b00a1d09dd84f", "score": "0.74279034", "text": "function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){return expected;}return value;}}", "title": "" }, { "docid": "322f21af2f1aefdc309b00a1d09dd84f", "score": "0.74279034", "text": "function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){return expected;}return value;}}", "title": "" }, { "docid": "322f21af2f1aefdc309b00a1d09dd84f", "score": "0.74279034", "text": "function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){return expected;}return value;}}", "title": "" }, { "docid": "322f21af2f1aefdc309b00a1d09dd84f", "score": "0.74279034", "text": "function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){return expected;}return value;}}", "title": "" }, { "docid": "322f21af2f1aefdc309b00a1d09dd84f", "score": "0.74279034", "text": "function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){return expected;}return value;}}", "title": "" }, { "docid": "322f21af2f1aefdc309b00a1d09dd84f", "score": "0.74279034", "text": "function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){return expected;}return value;}}", "title": "" }, { "docid": "322f21af2f1aefdc309b00a1d09dd84f", "score": "0.74279034", "text": "function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){return expected;}return value;}}", "title": "" }, { "docid": "322f21af2f1aefdc309b00a1d09dd84f", "score": "0.74279034", "text": "function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){return expected;}return value;}}", "title": "" }, { "docid": "322f21af2f1aefdc309b00a1d09dd84f", "score": "0.74279034", "text": "function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){return expected;}return value;}}", "title": "" }, { "docid": "322f21af2f1aefdc309b00a1d09dd84f", "score": "0.74279034", "text": "function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){return expected;}return value;}}", "title": "" }, { "docid": "322f21af2f1aefdc309b00a1d09dd84f", "score": "0.74279034", "text": "function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){return expected;}return value;}}", "title": "" }, { "docid": "322f21af2f1aefdc309b00a1d09dd84f", "score": "0.74279034", "text": "function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){return expected;}return value;}}", "title": "" }, { "docid": "322f21af2f1aefdc309b00a1d09dd84f", "score": "0.74279034", "text": "function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){return expected;}return value;}}", "title": "" }, { "docid": "322f21af2f1aefdc309b00a1d09dd84f", "score": "0.74279034", "text": "function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){return expected;}return value;}}", "title": "" }, { "docid": "dbc906ec8c205d7fac3483fc4f802302", "score": "0.74155194", "text": "function getValueForAttribute(node,name,expected){\n{\nif(!isAttributeNameSafe(name)){\nreturn;\n}\n\nif(!node.hasAttribute(name)){\nreturn expected===undefined?undefined:null;\n}\n\nvar value=node.getAttribute(name);\n\nif(value===''+expected){\nreturn expected;\n}\n\nreturn value;\n}\n}", "title": "" }, { "docid": "8be9da12398efcc0873adb80ec1bc9c9", "score": "0.7348719", "text": "function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}// If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n if(isOpaqueHydratingObject(expected)){return expected;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){return expected;}return value;}}", "title": "" }, { "docid": "61031df7a4ca370a3cf2a04eb05f6b57", "score": "0.7330516", "text": "function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}// If the object is an opaque reference ID, it's expected that\n// the next prop is different than the server value, so just return\n// expected\nif(isOpaqueHydratingObject(expected)){return expected;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){return expected;}return value;}}", "title": "" }, { "docid": "61031df7a4ca370a3cf2a04eb05f6b57", "score": "0.7330516", "text": "function getValueForAttribute(node,name,expected){{if(!isAttributeNameSafe(name)){return;}// If the object is an opaque reference ID, it's expected that\n// the next prop is different than the server value, so just return\n// expected\nif(isOpaqueHydratingObject(expected)){return expected;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);if(value===''+expected){return expected;}return value;}}", "title": "" }, { "docid": "1806eae55c43d479617fcdf0692e0347", "score": "0.73242146", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "title": "" }, { "docid": "1806eae55c43d479617fcdf0692e0347", "score": "0.73242146", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "title": "" }, { "docid": "1806eae55c43d479617fcdf0692e0347", "score": "0.73242146", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "title": "" }, { "docid": "1806eae55c43d479617fcdf0692e0347", "score": "0.73242146", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "title": "" }, { "docid": "1806eae55c43d479617fcdf0692e0347", "score": "0.73242146", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "title": "" }, { "docid": "1806eae55c43d479617fcdf0692e0347", "score": "0.73242146", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "title": "" }, { "docid": "1806eae55c43d479617fcdf0692e0347", "score": "0.73242146", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "title": "" }, { "docid": "1806eae55c43d479617fcdf0692e0347", "score": "0.73242146", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "title": "" }, { "docid": "1806eae55c43d479617fcdf0692e0347", "score": "0.73242146", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "title": "" }, { "docid": "1806eae55c43d479617fcdf0692e0347", "score": "0.73242146", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "title": "" }, { "docid": "1806eae55c43d479617fcdf0692e0347", "score": "0.73242146", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "title": "" }, { "docid": "1806eae55c43d479617fcdf0692e0347", "score": "0.73242146", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "title": "" }, { "docid": "1806eae55c43d479617fcdf0692e0347", "score": "0.73242146", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "title": "" }, { "docid": "1806eae55c43d479617fcdf0692e0347", "score": "0.73242146", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "title": "" }, { "docid": "1806eae55c43d479617fcdf0692e0347", "score": "0.73242146", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "title": "" }, { "docid": "1806eae55c43d479617fcdf0692e0347", "score": "0.73242146", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}", "title": "" }, { "docid": "c525922883bab4610f7e79b3ecff9107", "score": "0.73172265", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n }", "title": "" }, { "docid": "c525922883bab4610f7e79b3ecff9107", "score": "0.73172265", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n }", "title": "" }, { "docid": "7a8d8167cbebb1d8bc722050230e7ca6", "score": "0.7266323", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n }", "title": "" }, { "docid": "7a8d8167cbebb1d8bc722050230e7ca6", "score": "0.7266323", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n }", "title": "" }, { "docid": "176d9b92ae534873ad1292c53a28dbaa", "score": "0.7070373", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }var value = node.getAttribute(name);if (value === '' + expected) {\n return expected;\n }return value;\n }\n }", "title": "" }, { "docid": "0c4f252efd07f4ab81006b3ba76bb21e", "score": "0.7067589", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n }", "title": "" }, { "docid": "0c4f252efd07f4ab81006b3ba76bb21e", "score": "0.7067589", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n }", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "148e371478ef1cd735359e8c8bd95b1d", "score": "0.7044157", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}", "title": "" }, { "docid": "774d34828ba02ca690fa382c57abe043", "score": "0.70365745", "text": "function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n }", "title": "" } ]
9ec10876ed5a55ec109a60d1256abb2c
Show the file table of selected files for upload
[ { "docid": "abbeb42e01d61a2847c53f350e33136b", "score": "0.0", "text": "handleShow() {\n this.setState({ show: true });\n }", "title": "" } ]
[ { "docid": "1d847284f4a10a00436736eb4ea31ef5", "score": "0.7822107", "text": "function displayFiles() {\n var filesDf = [];\n for (var i=0; i<$scope.files.length; i++) {\n var file = {\n id: $scope.files[i]._id,\n fileName: $scope.files[i].originalName,\n date: $scope.files[i].date,\n processed: $scope.files[i].processedFile.contract.extracted,\n contractId: $scope.files[i].processedFile.contract.fileRef\n };\n filesDf.push(file);\n }\n\n $scope.filesTable = new NgTableParams({}, { dataset: filesDf });\n\n }", "title": "" }, { "docid": "b7aec83a6f34217c1cdef40ee98b63c8", "score": "0.6976156", "text": "function displayTable(){\n\t// items has the file list\n\tvar filelist = '';\n\tvar i = (current_page-1)*items_per_page;\n\tvar max_index = items_per_page*current_page;\n\twhile(i<total_items && i<max_index){\n\t\tvar item_id = items[i].id;\n\t\tfilelist += '<tr class=\"entry-' + item_id + '\">\\n';\n\t\tfilelist += '<td class=\"filename\">';\n\t\tif(items[i].metadata.thumbnail_available){\n\t\t\t// insert the thumbnail\n\t\t\tfilelist += '<img src=\"' + 'http://wme.lehre.imld.de:8080/wme14-15/api/items/' + item_id + '/thumbnail' + '\" alt=\"\">';\n\t\t}\n\t\tfilelist += items[i].filename + '</td>\\n';\n\t\tfilelist += '<td class=\"size\">' + formatSize(items[i].metadata.size) + '</td>\\n';\n\t\tfilelist += '<td class=\"mimetype\">' + formatType(items[i].metadata.mimetype) + '</td>\\n';\n\t\tfilelist += '<td class=\"creation_date\">' + formatDate(items[i].metadata.creation_date) + '</td>\\n';\n\t\tfilelist += '<td class=\"actions\">\\n';\n\t\tfilelist += '<a class=\"icon preview\" href=\"\" value=\"' + i + '\"><i class=\"fa fa-eye fa-lg\"></i></a>&nbsp;\\n';\n\t\tfilelist += '<a class=\"icon\" href=\"\"><i class=\"fa fa-share fa-lg\"></i></a>&nbsp;&nbsp;|&nbsp;\\n';\n\t\tfilelist += '<a class=\"icon\" href=\"\"><i class=\"fa fa-pencil fa-lg\"></i></a>&nbsp;\\n';\n\t\tfilelist += '<a class=\"icon\" href=\"\"><i class=\"fa fa-lock fa-lg\"></i></a>&nbsp;\\n';\n\t\tfilelist += '<a class=\"icon\" href=\"\"><i class=\"fa fa-trash-o fa-lg\"></i></a>\\n';\n\t\tfilelist += '</tr>\\n';\n\t\ti++;\n\t}\n\t$(\"#files\").html(filelist);\n\trefreshHidden();\n\t$(\"a.preview\").click(showPreview);\n}", "title": "" }, { "docid": "4e4c1252f626cbd532dd5dbb34c71c6a", "score": "0.6722149", "text": "showFilesNumber() {\n let numFiles = this.files ? this.files.length : 1;\n this.$el.find(\"#cb-lf-filesselected\").text(numFiles + \" files selected\");\n this.$el.trigger(\"cb-fl-chosen\");\n }", "title": "" }, { "docid": "55f8c4951fe21ea8800369a3672aaf14", "score": "0.672067", "text": "function showFiles(fileObj) {\n\tvar tfiles = fileObj._filelist;\n\tvar str = '';\n\tfor(var i = 0; i < tfiles.length; i++) {\n\t\tstr += \"sn:\" + i + \" || SS:\" + tfiles[i].status + \" || point:\" + fileObj.pointer + \" || File:\" + tfiles[i].fileName + \" || Size:\" + tfiles[i].fileSize + \" || length:\" + tfiles.length + \"<br>\\n\";\n\t\tstr += '<div class=\"lwhUpload-progressbar lwhUpload-progressbar-hide\" uid=\"' + i + '\"></div>';\n\t}\n\treturn str;\n}", "title": "" }, { "docid": "c02ec288b7fa5cab4906f4f469863b71", "score": "0.67205507", "text": "function fileSelected() {\n\n var count = document.getElementById('myFile').files.length;\n document.getElementById('details').innerHTML = \"\";\n\n for (var index = 0; index < count; index++)\n {\n var file = document.getElementById('myFile').files[index];\n var fileSize = 0;\n if (file.size > 1024 * 1024)\n fileSize = (Math.round(file.size * 100 / (1024 * 1024)) / 100)\n .toString()\n + 'MB';\n else\n fileSize = (Math.round(file.size * 100 / 1024) / 100)\n .toString()\n + 'KB';\n\n document.getElementById('details').innerHTML += 'Name: '\n + file.name + '<br>Size: ' + fileSize + '<br>Type: '\n + file.type;\n document.getElementById('details').innerHTML += '<p>';\n }\n }", "title": "" }, { "docid": "d0c5166c3c9507b6f8a6ed28bd552015", "score": "0.6672746", "text": "function UploadShowFiles() {\n UploadFilesFunction();\n ShowUploadedFilesFunction();\n }", "title": "" }, { "docid": "8684cfd466ef1c395fc995b764a55dac", "score": "0.6623691", "text": "function file_selected(e) {\n if (e.files.length == 1) {\n $('#upload_button').button('enable');\n $('#new_file_name_container').html('<span id=\"new_file_name\">' + e.files[0].name + '</span>');\n } else {\n $('#upload_button').button('disable');\n $('#new_file_name_container').html('(Use \\'pick file\\' to select a tradition file to upload.)');\n }\n}", "title": "" }, { "docid": "35d3936bb32cb64cde94fa92f97fe8a6", "score": "0.66024464", "text": "function handleFileSelect (e) {\r\n var files = e.target.files;\r\n\r\n console.log(files);\r\n}", "title": "" }, { "docid": "4d9ec455342f8842dfb15f4d69961a6b", "score": "0.6559833", "text": "function displayFiles(transport) {\n var contentDiv = $('main_content_div');\n contentDiv.innerHTML = transport.responseText;\n document.body.style.cursor = \"default\";\n\n initSubtab(\"files\");\n\n // Update the report-level contextual help content\n theHelpWindow.updateContent($(\"help-files\"));\n loadedForQA(\"true\");\n}", "title": "" }, { "docid": "a98e708cd082ae6f2bab29edcb944d98", "score": "0.651917", "text": "function fileSelected () {\n // Get the seected file\n var file = document.getElementById('uploadedFile').files[0];\n \n // Show the file information\n document.getElementById('fileName').innerHTML = 'Name: ' + file.name;\n document.getElementById('fileSize').innerHTML = 'Size: ' + bytesToSize(file.size);\n document.getElementById('fileType').innerHTML = 'Type: ' + file.type;\n}", "title": "" }, { "docid": "52af7cfe69c9dbfec0b777d12cc65ac6", "score": "0.65091383", "text": "function refreshFiles() {\n\tconst checkBoxColumnFunc = (json) =>\n\t\t$('<input>')\n\t\t\t.addClass('table-checkbox')\n\t\t\t.attr('type', 'checkbox')\n\t\t\t.attr('id', json['id']);\n\n\tconst headerCheckBox =\n\t\t$('<input>')\n\t\t\t.attr('type', 'checkbox')\n\t\t\t.on('click', () => $('.table-checkbox').click());\n\n\tconst tableSpec = [\n\t\t{ th: headerCheckBox, fn: checkBoxColumnFunc },\n\t\t{ th: 'File Name', fn: (json) => json['name'] },\n\t\t{ th: 'File Size', fn: (json) => json['bytes'] },\n\t\t{ th: 'Last Updated', fn: (json) => json['last_updated'] },\n\t]\n\n\t// construct and insert the resulting table at '#files'\n\tUtil.ajaxTablify('ajax/files.php', tableSpec, '#files');\n}", "title": "" }, { "docid": "3313930a67ade1ca0ff9ae4916e3b8e1", "score": "0.64946616", "text": "function show_content(path, files) {\n PATH = path;\n set_breadcrumb();\n $('#filter-text').val('');\n FILES = files;\n show_table(files);\n}", "title": "" }, { "docid": "5a71fb5828224d5feba22b2e60b496b1", "score": "0.6491531", "text": "function handleFileSelect(evt) {\n var files = evt.target.files; // FileList object\n\n for (var i = 0, f; f = files[i]; i++) {\n cars.push(f.name);\n plates.push(\"\");\n }\n \n lenCars = cars.length\n\n \n var firstImg = root_path.concat(cars[0])\n // files is a FileList of File objects. List some properties.\n document.getElementById(\"plateImg\").src = firstImg;\n\n\n document.getElementById(\"nextBtn\").disabled = false;\n //document.getElementById(\"saveBtn\").disabled = false;\n \n //console.log(cars)\n //document.getElementById('list').innerHTML = '<ul>' + output.join('') + '</ul>';\n }", "title": "" }, { "docid": "8db6ebf19da59ebbb92fd0a72e496cf2", "score": "0.64799446", "text": "function handleFileSelect() {\n loadQueryFileList(this.files);\n }", "title": "" }, { "docid": "5ae7e27e3331d55ad30d6bf35afb8a9c", "score": "0.64285386", "text": "function displayfiles() {\r\n var ppreapp = [];\r\n if (preapp){\r\n ppreapp = Object.entries(preapp);\r\n }\r\n $('filesbox').innerHTML = \"\";\r\n for (var k = 0; k < ppreapp.length; k++) {\r\n if (ppreapp[k][0] != \"name\" && ppreapp[k][0] != \"version\" && ppreapp[k][0] != \"flag\") {\r\n var file = document.createElement('div');\r\n var filename = ppreapp[k][0].replace(/\\?/g, \".\");\r\n file.className = \"file\";\r\n file.innerHTML = '<div class=\"filename\">' + filename + '</div><div onclick=\"deletefile(\\'' + ppreapp[k][0] + '\\')\" class=\"deletefile\">✖</div>';\r\n $('filesbox').appendChild(file);\r\n }\r\n }\r\n}", "title": "" }, { "docid": "5c134298b1fcc50fb9b4bd9317607297", "score": "0.6404019", "text": "function handleFileSelect(e) {\n\t\t\tvar files = e.target.files; // Là một đối tượng\n\t\t\tvar filesArr = Array.prototype.slice.call(files); // Mảng chứa các phần tử file\n\n\t\t\t// Duyệt mảng để lưu giá trị và fileReader\n\t\t\tfilesArr.forEach(function(f) {\n\n\t\t\t\t// Kiểm tra nếu không phải là file ảnh thì trả về\n\t\t\t\tif(!f.type.match(\"image.*\")) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Lưu các phần tử hợp lệ vào một mảng mới (chỉ gồm các file ảnh)\n\t\t\t\tstoredFiles.push(f);\n\n\t\t\t\t// Khởi tạo đối tượng đọc file\n\t\t\t\tvar reader = new FileReader();\n\t\t\t\t// reader.onload = function (e) {\n\t\t\t\t// \t// Khai báo phần html chứa ảnh preview\n\t\t\t\t// \tvar html = \"<div><img src=\\\"\" + e.target.result + \"\\\" class='selFile' title='Click to remove'>\" + f.name + \"<br clear=\\\"left\\\"/></div>\";\n\t\t\t\t// \t// var html = \"<div><img src=\\\"\" + e.target.result + \"\\\" class='selFile' title='Click to remove'>\" + f.name + \"<br clear=\\\"left\\\"/></div>\";\n\t\t\t\t//\n\t\t\t\t// \t// Hiển thị kết quả ra màn hình\n\t\t\t\t// \tselDiv.append(html);\n\t\t\t\t// }\n\n\t\t\t\t// Tiến hành đọc nội dung file\n\t\t\t\treader.readAsDataURL(f);\n\t\t\t});\n\t\t}", "title": "" }, { "docid": "b5bd0be32eab3870489ec43d94ee2fee", "score": "0.64010584", "text": "function onFileSelect(e) {\n let files = e.target.files;\n let output = [];\n fileCount = files.length;\n totalFileLength = 0;\n for (let i = 0; i < fileCount; i++) {\n let file = files[i];\n output.push(file.name, ' (', file.size, ' bytes, ',\n file.lastModifiedDate.toLocaleDateString(), ')');\n output.push('<br/>');\n debug('add ' + file.size);\n totalFileLength += file.size;\n }\n document.getElementById('selectedFiles').innerHTML = output.join('');\n}", "title": "" }, { "docid": "4c925a44e31028bdb5ac15b9ce532c45", "score": "0.63897794", "text": "function show_content(path, files) {\n PATH = path;\n set_breadcrumb();\n\n $('table#filemanager').empty();\n\n for (var i = 0; i < files.length; i++) {\n var f = files[i];\n\n if (f.folder) {\n f.icon = 'carpeta';\n f.name = $('<a />').attr('href', f.link).text(f.name).click(function (e) {\n e.preventDefault();\n browse($(this).attr('href'));\n });\n } else {\n var extension = f.name.substr( (f.name.lastIndexOf('.') +1) );\n if (f.thumb == 'pdf') {\n f.icon = $('<i class=\"fa fa-file-pdf-o\"></i>');\n }else if (f.thumb == 'doc' || f.thumb == 'docx') {\n f.icon = $('<i class=\"fa fa-file-word-o\"></i>');\n }else if (f.thumb == 'xls' || f.thumb == 'xlsx') {\n f.icon = $('<i class=\"fa fa-file-excel-o\"></i>');\n }else if (f.thumb == 'ppt' || f.thumb == 'pptx') {\n f.icon = $('<i class=\"fa fa-file-powerpoint-o\"></i>');\n }else if ( extension == 'gif' || extension == 'png' || extension == 'jpg' || extension == 'jpeg' ) {\n f.icon = $('<a class=\"fancybox\"/>').attr('href', asset_url+f.link).append($('<img src=\"'+asset_url+f.thumb+'\" />'));\n }\n\n f.name = $('<a />').attr('href', f.link).text(f.name).click(function (e) {\n e.preventDefault();\n var imagen = $(this).attr('href'),\n retornar = $('table#filemanager').attr('data-retornar'),\n file = $(this).text(),\n extension = file.substr( (file.lastIndexOf('.') +1) );\n $('#'+retornar).attr('value', imagen);\n $('#t_'+retornar).find('.fancybox').attr('href', asset_url+imagen);\n $('#t_'+retornar).find('.nombre-img').text(imagen.substr(8));\n $('#t_'+retornar).find('.trash, .nombre-img').removeClass('hide');\n if ( extension == 'gif' || extension == 'png' || extension == 'jpg' || extension == 'jpeg' ) {\n $('#t_'+retornar).find('.fancybox').removeClass('hide');\n }else{\n $('#t_'+retornar).find('.fancybox').addClass('hide');\n }\n $('#gallerybrowser').modal('hide');\n unsaved = true;\n });\n }\n\n // remove action\n f.remove = $('<a class=\"btn btn-default btn-xs\" />').attr('href', f.link).html('<i class=\"fa fa-trash\"></i>').click(function (e) {\n e.preventDefault();\n $('div#remove input#remove-path').val($(this).attr('href'));\n $('div#remove').modal('show');\n });\n\n $('table#filemanager').append(\n $('<tr />').append(\n $('<td class=\"text-center\" />').append(f.icon),\n $('<td />').append(f.name).append((f.medidas=='')?'':'<p class=\"help-block\">'+f.medidas+'</p>'),\n $('<td class=\"hidden-xs\"/>').text(f.size),\n $('<td class=\"hidden-xs\"/>').text(f.date),\n $('<td style=\"text-align:right\">').append(f.remove)\n )\n );\n }\n // $.unblockUI();\n}", "title": "" }, { "docid": "30e3511967eba003c7b36dbf3f4bea8e", "score": "0.6375336", "text": "function SelectedFileInfo()\n{\n\tthis.filelist = '';\n\tthis.numSel\t= 0;\n\tthis.totalSize = 0;\n\tthis.lastId\t= 0;\n\tvar ids\t\t= getSelectedItems();\n\n\tfor ( var j = 0; j < ids.length; j++ ) {\n\t\tthis.filelist += files[ids[j]].title + \"<br />\";\n\t\tthis.totalSize += files[ids[j]].size;\n\t\tthis.numSel++;\n\t\tthis.lastId = ids[j];\n\t}\n\n\tthis.info = '<h4>Information</h4><ul><li><strong>'\n\t\t\t+ this.numSel + ' items selected</strong><br />'\n\t\t\t+ formatBytes( this.totalSize ) + '</li></ul>';\n\n\tthis.info += ( this.numSel < maxInspFileList ) ? '<ul><li>'\n\t\t\t+ this.filelist + '</li></ul>' : '';\n}", "title": "" }, { "docid": "3f6d3ecb0632a942263a0681e17d0af1", "score": "0.6362504", "text": "function showFileList(files) {\n var listFragment = d.createDocumentFragment();\n\n // Create HTML list elements for each file\n for (var i in files) {\n var fileInfo = files[i];\n var listItem = d.createElement('li');\n // Download link\n var fileLink = d.createElement('a');\n fileLink.href = DOWNLOAD_URL + '/' + fileInfo.id;\n fileLink.textContent = fileInfo.name;\n listItem.appendChild(fileLink);\n // File size label\n var sizeElem = d.createElement('span');\n sizeElem.textContent = getReadableFileSize(fileInfo.size);\n var sizeContainer = d.createElement('div');\n sizeContainer.className = 'size-container right';\n sizeContainer.appendChild(sizeElem);\n // Delete link\n var delLink = d.createElement('a');\n delLink.href = 'javascript:void(0)';\n delLink.innerHTML = '&times;';\n var deleteFunc = deleteFile.bind(this, fileInfo.id);\n delLink.addEventListener('click', deleteFunc);\n var delContainer = d.createElement('div');\n delContainer.className = 'del-container right';\n delContainer.appendChild(delLink);\n // Append in reverse order\n listItem.appendChild(delContainer);\n listItem.appendChild(sizeContainer);\n listFragment.appendChild(listItem);\n }\n\n // Replace contents of file list\n var container = d.getElementById('fileList');\n container.innerHTML = '';\n container.appendChild(listFragment);\n }", "title": "" }, { "docid": "dc7f7327fc76082d73679e6e0ff72b7f", "score": "0.6359843", "text": "function showFiles(error, contents) {\n if (error) {\n $(\"#contenidorepo\").html(\"<p>Error code: \" + error.error + \"</p>\");\n } else {\n\n var files = [];\n for (var i = 0, len = contents.length; i < len; i++) {\n files.push(contents[i].name);\n };\n $(\"#Repo\").html(\"<p>Juegos:</p>\" + \"<ul id='files'><li>\" + files.join(\"</li><li>\") + \"</li></ul>\");\n\n };\n }", "title": "" }, { "docid": "6e6e8db02bea0e3524804eb5b1cec183", "score": "0.63401985", "text": "function handlerDisplay(){\n\n if(count === 1){\n for (let m of models) {\n if(m.sel === true){\n setaux([m.file]);\n }\n }\n }else{\n setOpen(true);\n }\n }", "title": "" }, { "docid": "a1ab83f0f337727c208f6cb318aae93f", "score": "0.62917715", "text": "function fileSelect(evt) {\n if (window.File && window.FileReader && window.FileList && window.Blob) {\n var files = evt.target.files;\n var result = '';\n var file;\n for (var i = 0; file = files[i]; i++) {\n // if the file is not an image, continue\n if (!file.type.match('image.*')) {\n continue;\n }\n\n reader = new FileReader();\n reader.onload = (function (tFile) {\n return function (evt) {\n var div = document.createElement('div');\n div.className = \"img-preview-wrapper\";\n div.innerHTML = '<img class=\"img-preview\" src=\"' + evt.target.result + '\" />';\n $('.preview-uploader').html(div);\n };\n }(file));\n reader.readAsDataURL(file);\n }\n } else {\n alert('The File APIs are not fully supported in this browser.');\n }\n}", "title": "" }, { "docid": "32661728ad115e16c50589c3ea203e8d", "score": "0.6289993", "text": "function uploadEvent(){\n var listContainer = document.getElementById(\"songtable\");\n var vizContainer = document.getElementById(\"canvasholder\");\n var uploadContainer = document.getElementById(\"uploadform\");\n\n listContainer.style.display = \"none\";\n vizContainer.style.display = \"none\";\n uploadContainer.style.display = \"inline\";\n}", "title": "" }, { "docid": "3f88f00a6117bf2472d40cad85a1760e", "score": "0.625291", "text": "function handleFileSelect(evt) {\n evt.stopPropagation();\n evt.preventDefault();\n\n var files = evt.dataTransfer.files; // FileList object.\n\n // files is a FileList of File objects. List some properties.\n var output = [];\n for (var i = 0, f; f = files[i]; i++) {\n alert(f.name);\n }\n }", "title": "" }, { "docid": "b3896db8b0a01a6d78a4b0d7c48a8436", "score": "0.62483096", "text": "function displayFileList()\n{\n\tsortByCookie = readCookie( 'sortby' );\n\n\tif ( sortByCookie != 'null' && sortByCookie != null ) {\n\t\tsortBy = sortByCookie;\n\t}\n\n\tsortDecending = readCookie( 'sortDecending' );\n\t\tfiles.sort( sortFunc );\n\n\t// Display the file list\n\tcreateFileList();\n\tselectColumn( sortBy );\n}", "title": "" }, { "docid": "401c6c709aae2063b5f2857c59cfbd84", "score": "0.62462157", "text": "function fileSelected(file, name) {\r\n\treadFileToArrayBuffer(file, renderFile);\r\n\tdisplayBlob(file, name);\r\n\tdocument.getElementById(\"fileName\").innerText = (file.name) ? file.name: name;\r\n\tdocument.getElementById(\"mimeType\").innerHTML = file.type;\r\n\tdocument.getElementById(\"fileSize\").innerHTML = file.size;\r\n\tif (file.lastModifiedDate) {\r\n\t\tvar d = new Date(file.lastModifiedDate);\r\n\t\tdocument.getElementById(\"lastModified\").innerHTML = d.toDateString();\r\n\t}\r\n\telse {\r\n\t\tvar lastMod = document.getElementById('lastModifiedItem');\r\n\t\tlastMod.style.display = \"none\";\r\n\t}\r\n}", "title": "" }, { "docid": "85c0ceeb7b5420e59ce45ac6c5e9e4a4", "score": "0.6203597", "text": "function uploadTips() {\n\t$(\"input[type='file']\").on(\"change\",function(){\n\t\tvar filePath = $(this).val();\n\t\tvar arr = filePath.split('\\\\');\n\t\tvar fileName = arr[arr.length-1];\n\t\t/* $(this).siblings(\"i\").html(\"您未上传文件,或者您上传文件类型有误!\"); */\n\t\t$(this).siblings(\"small\").html('已选择:' + fileName);\n\t});\n}", "title": "" }, { "docid": "9ede496ab05cac8f593c0b181222cbcb", "score": "0.6185737", "text": "function fileSelected(input) {\n document.getElementById(\"btnAttachment\").innerHTML = input.files[0].name;\n}", "title": "" }, { "docid": "0d8bc7e03f4764085315db207303d64e", "score": "0.6164798", "text": "renderFileList() {\n this.fileList.innerHTML = '';\n\n let keys = Object.keys(this.state.files);\n let size = 0;\n\n keys.forEach((name) => {\n let file = this.state.files[name];\n size += file.size;\n let li = document.createElement('li');\n li.innerHTML = `<span class=\"file-name\">${name}</span>\\\n <small>${humanize.filesize(file.size)}</small>\\\n <span class=\"file-progress\"></span>`;\n li.id = encodeURIComponent(name);\n this.fileList.appendChild(li);\n });\n\n this.fileNum.innerHTML = keys.length;\n this.fileSize.innerHTML = humanize.filesize(size);\n }", "title": "" }, { "docid": "ffe98ae7081643bef81a9582b19fba42", "score": "0.61549765", "text": "function onFileSelect(event, numFiles, label) {\n var input = $('#file-select-text'),\n log = numFiles > 1 ? numFiles + ' files selected' : label;\n if( input.length ) {\n input.val(log);\n }\n // refresh submit button state\n refreshSubmitButtonState();\n}", "title": "" }, { "docid": "225eccda6bf6b0df9eec798f77d04ae8", "score": "0.61338586", "text": "function activeMenu(event) {\n console.log(\"event.......\", event);\n var x =\" \"; \n var id = event.target.id;\n x = document.getElementById(id);\n var txt = \"\";\n \n if ('files' in x) {\n if (x.files.length == \" \") {\n txt = \"Select one or more files.\";\n } else {\n\n for (var i = 0; i < x.files.length; i++) {\n txt += \"<br><strong>\" + (i+1) + \". file</strong><br>\";\n var file = x.files[i];\n console.log(\"...............files\", file);\n if ('name' in file) {\n txt += \"name: \" + file.name + \"<br>\";\n }\n // $.ajax ({\n // url: \"http://localhost:3000/upload?type=pro\",\n // type: 'POST',\n // data: file,\n // success: function(response) {console.log(\"sucess.....................\");},\n // contentType: false,\n // processData: false,\n // cache: false\n \n // });\n }\n }\n } \n else {\n if (x == \" \") {\n txt += \"Select one or more files.\";\n } else {\n txt += \"The files property is not supported by your browser!\";\n txt += \"<br>The path of the selected file: \" + x.value; // If the browser does not support the files property, it will return the path of the selected file instead. \n }\n }\n var id1= id+1;\n document.getElementById(id1).innerHTML = txt;\n}", "title": "" }, { "docid": "6eac1f20b6881d99406b1759e8429785", "score": "0.61337334", "text": "function creaTabla(files) {\n var tabla = null;\n \n tabla = \"<div id='img_tabla' class='w3-container w3-small' style='width:40%;margin:auto'>\";\n tabla += \"<table class='w3-table-all'>\";\n tabla += \"<tr><th class='w3-center w3-theme-d3'>Imagenes seleccionadas para enviar</th></tr>\";\n for (var i = 0; i < files.length; i++) {\n tabla += \"<tr><td>\" + files[i].name + \"</td></tr>\"; \n }\n tabla += \"</table></div>\";\n return tabla;\n}", "title": "" }, { "docid": "2cac190ecb06d18650793c768ceebf64", "score": "0.61213976", "text": "function localfileSelected() {\r\n\t// Update UI\r\n\tvar details = document.getElementById('detailedView');\r\n\tdetails.style.display = \"block\";\r\n\tvar lastMod = document.getElementById('lastModifiedItem');\r\n\tlastMod.style.display = \"block\";\r\n\tvar serverFiles = document.getElementById('serverFiles');\r\n\tserverFiles.selectedIndex = 0;\r\n\t// Get file\r\n\tvar fileInput = document.getElementsByName(\"fileInput\")[0];\r\n\tif (fileInput && fileInput.files && fileInput.files[0]) {\r\n\t\tfileSelected(fileInput.files[0], fileInput.files[0].name);\r\n\t}\r\n\telse {\r\n\t\talert(\"Please select another file.\");\r\n\t}\r\n}", "title": "" }, { "docid": "ca66c789e08d1ed988f051a6171dcdaa", "score": "0.6086829", "text": "function handleUploadButtonClick() {\n showUploadDialog()\n }", "title": "" }, { "docid": "30a0d57fbb72ac68960beaf62922a675", "score": "0.60745513", "text": "function _fileListHandler(data, textStatus, jqXHR, containerDivId, rootPath) {\n $('#'+containerDivId).empty();\n var sel = $('<select>').appendTo('#'+containerDivId);\n sel.append($(\"<option>\").attr('value',\"\").text(\"-- Select a Resource --\"));\n \n $(data).find('file').each (function() {\n var fileTitle = $(this).find('title').text();\n var filePath = $(this).find('path').text();\n if (filePath != rootPath) { // ignore the root.\n \n sel.append($(\"<option>\").attr('value',filePath).text(fileTitle));\n \n }\n });\n \n sel.change(function() {\n if(this.value===\"\"){\n $(\"#div_dashboard_2\").attr('src', \"\");\n }else{\n pentahoSrv.loadResourceInDiv(this.value,\"view\",\"div_dashboard_2\");\n \n }\n $( \"#div_dashboard_2\").addClass(\"show\");\n });\n}", "title": "" }, { "docid": "6d9ae1e2dbdf5c25c8335222991efed8", "score": "0.60672593", "text": "filePreview(event) {\n // Naviagation Service to the show preview\n this[NavigationMixin.Navigate]({\n type: 'standard__namedPage',\n attributes: {\n pageName: 'preview'\n },\n state : {\n // assigning ContentDocumentId to show the preview of file\n selectedRecordId:event.currentTarget.dataset.id\n }\n })\n }", "title": "" }, { "docid": "6c2732a79aefaefcd6d5318dba62b2e2", "score": "0.60643566", "text": "function _display(){\n try{\n var file_obj = Titanium.Filesystem.getFile(_file_folder,_file_name);\n if(!file_obj.exists()){\n var option_dialog = Ti.UI.createOptionDialog({\n options:(self.is_ipad())?['YES','NO','']:['YES','NO'],\n buttonNames:['No'],\n destructive:0,\n cancel:1,\n title:L('message_not_exist_in_job_display_file')\n });\n option_dialog.show();\n option_dialog.addEventListener('click',function(e){\n if(e.index == 0){\n if(!Ti.Network.online){\n self.show_message(L('message_offline'),L('message_unable_to_connect'));\n return;\n }else{\n _download_invoice_file(); \n }\n }\n });\n }else{\n _play_pdf();\n }\n }catch(err){\n self.process_simple_error_message(err,window_source+' - _display');\n return;\n } \n }", "title": "" }, { "docid": "67eb925cfe02a69f302e678327c18652", "score": "0.60481334", "text": "function processFileUpload(event) {\n var files = event.target.files;\n\n var f = files[0]; // gets the first file\n\n // Setup event handler for file reader\n fileReader.addEventListener('load', function(event) {\n $('.upload-area').hide();\n $('.show-area').show();\n\n var allowed = ['pdf', 'txt', 'zip', 'rar'];\n\n $('#filename').html(\" \"+f.name);\n $('#size').html(\" \"+f.size+\"MB\");\n $('#type').html(\" \"+f.type);\n\n }, false);\n\n fileReader.readAsText(f);\n }", "title": "" }, { "docid": "2484c5f0c5c7903dbce22e199e55cf42", "score": "0.6033693", "text": "function handleFileSelect(evt) {\n\t\tif (! (evt && evt.target && evt.target.files)) {\n\t\t\tUtils.error('Not supported in this browser.');\n\t\t\treturn;\t\n\t\t}\n\t\tvar files = evt.target.files; // FileList object\n\t\t//$('ul#custom-mod-list').hide().html('');\n\t\t\n\t\t// Loop through the FileList\n\t\tfor (var i = 0, f; f = files[i]; i++) {\n\t\t\tvar reader = new FileReader();\n\t\t\t\n\t\t\t//callback in closure with file details\n\t\t\treader.onload = (function(f) {\n\t\t\treturn function(e) {\n\t\t\t\tif (e && e.target && e.target.result) {\n\t\t\t\t\tg_data.upload_mods_to_load.push(f.name);\n\t\t\t\t\tg_data.upload_data[f.name] = e.target.result;\n\t\t\t\n\t\t\t\t\t$('ul#custom-mod-list li[title=\\''+f.name+'\\']').remove();\n\t\t\t\t\t$('ul#custom-mod-list').show().append('<li title=\"'+f.name+'\">'+f.name+'</li>');\n\t\t\t\t\t$('#clear-custom-mods-btn').css('visibility', 'visible');\n\t\t\t\t} else {\n\t\t\t\t\tDMI.Utils.error('Error reading local file: '+f.name);\t\n\t\t\t\t}\n\t\t\t};\n\t\t\t})(f);\n\t\t\t// Read in the file as a data URL.\n\t\t\treader.readAsText(f);\n\t\t}\n\t}", "title": "" }, { "docid": "fb4757760c96d075e3e838d577fb807d", "score": "0.6026011", "text": "function viewInputFile(status)\n\t{\n\tif (status=='on')\n\t\t{\n\t\t$('#imageChange1').fadeIn();\n\t\t}\n\tif (status=='off')\n\t\t{\n\t\t$('#imageChange1').fadeOut();\n\t\t}\n\t}", "title": "" }, { "docid": "82e73f37d7bc9865d7e703277ca57beb", "score": "0.6017744", "text": "function getFileInfo() {\n const fileSelector = document.getElementById('fileSelect');\n fileSelector.addEventListener('change', (event) => {\n const fileList = event.target.files;\n console.log(fileList);\n });\n}", "title": "" }, { "docid": "9add16f8b3502d167d9594a8aa923bfd", "score": "0.6002809", "text": "function displayFiles(files, element) {\n for (var i = 0; i < files.length; i++) {\n li = document.createElement('li');\n li.appendChild(document.createTextNode(files[i].name));\n element.appendChild(li);\n }\n}", "title": "" }, { "docid": "aaa1dd506ea124416a64415e557d2434", "score": "0.6000442", "text": "function fileHandler(files)\n{\t\t\n\t//files = (e.dataTransfer.files);\n\t//console.log(files);\n\t//console.log(files.length)\n\t\n\tfor(var i = 0; i <= (files.length - 1); i++)\n\t\t{\n\t\t\tupload(files[i]);\n\t\t\t//console.log(files[i]); // Testing log\n\t\t}\n\t\n\t//imageDisplay(files[0].name);\n}", "title": "" }, { "docid": "6e0a1a7065c8dbeb31e3d60e0911fda4", "score": "0.59929407", "text": "function onResumeFileSelect() {\n $('#profileResumeLabel').text(this.files[0].name);\n}", "title": "" }, { "docid": "225c9f327e1ca70ac557aef7eb501903", "score": "0.59855264", "text": "setFilesOnSelect(e) {\n this.files = e.target.files;\n\n }", "title": "" }, { "docid": "b4572776800d9cc111db419e694e9b74", "score": "0.59798276", "text": "function RecordUploader(props) {\n const classes=useStyles()\n\n const [selectedFiles, setSelectedFiles] = useState([]);\n\n const { uploadRecords } = props;\n\n const onChangeHandler = event => {\n setSelectedFiles([...event.target.files]);\n }\n\n const onClickHandler = (e) => {\n e.preventDefault();\n console.log(\"Uploading \" + selectedFiles.length + \" files\")\n setSelectedFiles([])\n uploadRecords(selectedFiles);\n };\n\n\n return(\n <Container className={classes.root}> \n <h1> Upload files </h1>\n <p> Select the summary and docket files you wish to analyze.</p>\n <FileList selectedFiles={selectedFiles}/>\n <form encType=\"multipart/form-data\" onSubmit={onClickHandler}>\n <input multiple type=\"file\" name=\"file\" onChange={onChangeHandler}/>\n <Button type=\"submit\"> Upload </Button>\n </form>\n {/*<div>Here is the information which you need to proceed.</div>*/}\n </Container>\n )\n}", "title": "" }, { "docid": "a79c78dcf341e02431926a5bdf7428bb", "score": "0.5978199", "text": "function fileInput() {\n\t$('.upload-file').each(function () {\n\t\t$(this).filer({\n\t\t\t// limit: 3,\n\t\t\tchangeInput: '' +\n\t\t\t'<div class=\"jFiler-input-dragDrop\">' +\n\t\t\t'<div class=\"jFiler-input-inner\">' +\n\t\t\t'<div class=\"jFiler-input-icon\">' +\n\t\t\t'<i class=\"icon-jfi-cloud-up-o\"></i>' +\n\t\t\t'</div>' +\n\t\t\t'<div class=\"jFiler-input-text\">' +\n\t\t\t'<strong>Чтобы добавить файл, перетащите его сюда</strong>' +\n\t\t\t'</div>' +\n\t\t\t'</div>' +\n\t\t\t'</div>',\n\t\t\tshowThumbs: true,\n\t\t\ttheme: \"dragdropbox\",\n\t\t\tcaptions: {\n\t\t\t\tbutton: \"Выберите файлы\",\n\t\t\t\tfeedback: \"Выберите файлы для загрузки\",\n\t\t\t\tfeedback2: \"Файлы выбраны\",\n\t\t\t\tdrop: \"Чтобы добавить файл, перетащите его сюда\",\n\t\t\t\tremoveConfirmation: \"Вы уверены, что хотите удалить этот файл?\",\n\t\t\t\terrors: {\n\t\t\t\t\tfilesLimit: \"Максиальное количество файлов: {{fi-limit}}\",\n\t\t\t\t\tfilesType: \"Загружать можно только изображения!\",\n\t\t\t\t\tfilesSize: \"{{fi-name}} слишком велик! Пожалуйста, загрузите файл до {{fi-maxSize}} MB.\",\n\t\t\t\t\tfilesSizeAll: \"Файлы, которые Вы выбрали слишком велики! Пожалуйста, загружайте файлы до {{fi-maxSize}} MB.\"\n\t\t\t\t}\n\t\t\t},\n\t\t\ttemplates: {\n\t\t\t\tbox: '<ul class=\"jFiler-items-list jFiler-items-default list-reset\"></ul>'\n\t\t\t},\n\t\t\t// captions: {\n\t\t\t// \tbutton: \"Choose Files\",\n\t\t\t// \tfeedback: \"Choose files To Upload\",\n\t\t\t// \tfeedback2: \"files were chosen\",\n\t\t\t// \tdrop: \"Drop file here to Upload\",\n\t\t\t// \tremoveConfirmation: \"Вы уверены, что хотите удалить этот файл?\",\n\t\t\t// \terrors: {\n\t\t\t// \t\tfilesLimit: \"Only {{fi-limit}} files are allowed to be uploaded.\",\n\t\t\t// \t\tfilesType: \"Only Images are allowed to be uploaded.\",\n\t\t\t// \t\tfilesSize: \"{{fi-name}} is too large! Please upload file up to {{fi-maxSize}} MB.\",\n\t\t\t// \t\tfilesSizeAll: \"Files you've choosed are too large! Please upload files up to {{fi-maxSize}} MB.\"\n\t\t\t// \t}\n\t\t\t// },\n\t\t\taddMore: true,\n\t\t\tallowDuplicates: false,\n\t\t\tclipBoardPaste: true,\n\t\t\tdragDrop: {\n\t\t\t\tdragEnter: null,\n\t\t\t\tdragLeave: null,\n\t\t\t\tdrop: null,\n\t\t\t\tdragContainer: null\n\t\t\t}\n\t\t});\n\t});\n}", "title": "" }, { "docid": "1cd29b4a507abaafcf00c0a08ea700e7", "score": "0.5975056", "text": "async function fillFileTable(){\n if (!_fileIndexer){\n _allFilesTable.innerHTML = ''\n return;\n }\n \n let allFiles = _fileIndexer.getAllFiles(),\n errors = 0,\n count = 1,\n html = ''\n\n _updateFileCountLabel(allFiles)\n\n errors = allFiles.filter(file => !file.isValid).length\n allFiles = allFiles.sort((a,b) => \n a.mtime < b.mtime ? 1 :\n a.mtime > b.mtime ? -1 :\n 0\n )\n allFiles = allFiles.slice(0, 10)\n\n if (allFiles.length)\n html += `<li class=\"allFilesTableRow allFilesTa_bleRow--error\">${allFiles.length} most recent changes</li>`\n\n for (let file of allFiles){\n let filePath = file.file\n\n if (_storageRootFolder)\n filePath = filePath.substring(_storageRootFolder.length)\n\n html += `<li class=\"allFilesTableRow allFilesTa_bleRow--error\">${count} - ${filePath} (${_sago(new Date(file.mtime))})</li>`\n count ++\n }\n\n if (_fileIndexer){\n const lastIndexDate = await _fileIndexer.getLastIndexDate()\n \n if (lastIndexDate)\n document.querySelector('.lastReindexTime').innerHTML = `Last indexed ${_sago(lastIndexDate)}`\n }\n \n _allFilesTable.innerHTML = html\n\n if (_fileIndexer)\n _updateErrorLogLink(errors, _fileIndexer.logPath)\n}", "title": "" }, { "docid": "89619e7fe82cf42ae9fd85c9c643def0", "score": "0.59688824", "text": "function handleFileSelect(evt) {\r\n evt.stopPropagation();\r\n evt.preventDefault();\r\n\r\n // Get the FileList object that contains the list of files that were dropped\r\n const files = evt.dataTransfer.files;\r\n\r\n // this UI is only built for a single file so just dump the first one\r\n file = files[0];\r\n const imageId = cornerstoneWADOImageLoader.wadouri.fileManager.add(file);\r\n loadAndViewImage(imageId);\r\n}", "title": "" }, { "docid": "23d0bfe9293b0daa6c1103e60cd6e1a7", "score": "0.5962263", "text": "function load_files(id) {\r\n $.post(urlaction, { notebookid: id, order: orderfiles, action: 'loadfiles' }, function(result) {\r\n $('#code').empty();\r\n $('#output').empty();\r\n currentfile = -1;\r\n $('#files').empty();\r\n $('#files').append(result);\r\n $('#files li:first').click();\r\n })\r\n }", "title": "" }, { "docid": "52633d82985b7855d2fa58c644fb7987", "score": "0.5957062", "text": "function showFile() {\n clearMenus();\n d3.select(\"#fileMenuList\").classed(\"show\", !d3.select(\"#fileMenuList\").classed(\"show\"));\n}", "title": "" }, { "docid": "992848337d5115c525c9ef3a671ab0e1", "score": "0.5951527", "text": "function showFile( uuid , element , fileurl , filename , filetype ){\n $(\"#\"+element).html( getFileElementDisplayByType(filetype , fileurl , filename));\n}", "title": "" }, { "docid": "e6d59ccce0243fe198b28e922500767f", "score": "0.59512085", "text": "async function showFiles() {\n\n pushChat('These are the documents located within your Drive','bot');\n\n var data = await getFiles();\n\n let listHTML = '<div><h3 class=\"m-2 text-center\">Files</h3></div><div class=\"row row-cols-1 row-cols-sm-2 row-cols-md-3 row-cols-lg-4 row-cols-xl-5 p-3\">';\n\n // Construct string for files\n for (const files of data.value) {\n listHTML += '<div class=\"col mb-4\"><div class=\"card border-dark mb-3\" style=\"max-width: 18rem;\"> <div class=\"card-header fs-6\">' + files.name + '</div><div class=\"card-body text-dark\"><small class=\"text-muted\">Size:</small><p class=\"card-text\">' + (files.size / 1024).toFixed(2) + ' KB</p><small class=\"text-muted\">Date created:</small><p class=\"card-text\">' + moment(files.createdDateTime).format(\"DD MMM YYYY HH:mm\") + '</p><div class=\"d-grid gap-2\"><a href=\"' + files.webUrl + '\" class=\"btn btn-secondary btn-sm\" target=\"_blank\">Link</a></div></div></div></div>';\n }\n listHTML += '</div>';\n // Display constructed string\n document.getElementById(\"display-panel\").innerHTML = listHTML;\n}", "title": "" }, { "docid": "222ce8dd82650555f2616ea28889ec5b", "score": "0.59447193", "text": "function updateFileListDisplay(fileListObj, targetElm) {\n var files = fileListObj;\n var list = '';\n\n //Determine checkAll id\n switch(targetElm) {\n case 'localFileList':\n checkAllId = 'checkAll-localFileList';\n break;\n case 'remoteFileList':\n checkAllId = 'checkAll-remoteFileList';\n break;\n }//End determine checkall id\n if(files)\n {\n console.log(\"There are \" + files.length + \" \" + targetElm + \" files\");\n }\n\n //Loop through each\n for(var i=0;i<files.length;i++) {\n\n var fileId = files[i].fileId;\n var fileName = files[i].fileName;\n var mimeType = files[i].fileType;\n var checkBoxClass = targetElm == 'localFileList' ? 'localFileCheckBox' : 'remoteFileCheckBox';\n\n //Open <li>\n list += '<li class=\"list-group-item file-item row\">\\n';\n //Checkbox\n list += '<input class=\"col-xs-1 ' + checkBoxClass + '\" type=\"checkbox\" id=\"' + fileId + '\" data-id=\"' + fileId + '\">\\n';\n //Checkbox label & file name\n\n list += '<label class=\"col-xs-6 table-border name-label\" for=\"' + fileId + '\">' + fileName + '</label>\\n';\n //Filetype\n list += '<label class=\"col-xs-2 name-label\" for=\"' + fileId + '\"><i class=\"fa ' + getFileTypeIcon(mimeType) + '\"></i></label>';\n if (targetElm != 'remoteFileList' ) //Only show action buttons (delete, play, download) on the local file list side)\n {\n //Delete button\n list += '<div class=\"col-xs-1 hidden-xs\"><i title=\"Delete\" onclick=\"deleteFile(event)\" data-id=\"' + fileId + '\" class=\"fa fa-trash \"></i></div>';\n //Play button\n //Only show play button if file is playable\n if(Seshi.isPlayable(mimeType, fileName))\n {\n list += '<div class=\"col-xs-1 playoptions\"><a title=\"Play\"><i onclick=\"play(event)\" data-id=\"' + fileId + '\" class=\"fa fa-play\"></i></a></div>';\n }else {\n list += '<div class=\"col-xs-1 \"></div>';\n }//End only show play button if file is playable\n //Download button\n list += '<div class=\"col-xs-1 \"><i onclick=\"download(event)\" title=\"Download\" data-id=\"' + fileId + '\" class=\"fa fa-arrow-down\"></i></div>';\n }//End if targetElm != 'remoteFileList'\n\n //Close </li>\n list += '</li>';\n }//End loop through each local file list (cached) and build list items\n //Update display with local files list\n var fileBoxList = document.getElementById(targetElm);//Get reference to file box\n var numFilesInList = fileBoxList.children.length;\n\n for(var i=1; i < numFilesInList; i++) //Remove all current items from local file list\n {\n fileBoxList.removeChild(fileBoxList.children[0]);\n }//End remove all current items in list ready for replacement\n\n //Update table with file list:\n fileBoxList.innerHTML = list;\n\n}//updateFileListDisplay()", "title": "" }, { "docid": "7e45d68a1999a88881c539f4fd967c2d", "score": "0.59416795", "text": "function handleFileSelect(evt) {\n evt.stopPropagation();\n evt.preventDefault();\n\n // Get the FileList object that contains the list of files that were dropped\n const files = evt.dataTransfer.files;\n\n // this UI is only built for a single file so just dump the first one\n file = files[0];\n const imageId = cornerstoneWADOImageLoader.wadouri.fileManager.add(file);\n loadAndViewImage(imageId);\n}", "title": "" }, { "docid": "8aef242e8aa14180a27c0ee68debca73", "score": "0.5931629", "text": "function show_item_filebox(){\n\t \t /*start start start start start*/\t\t\t\t\t\t\t\t\t\t\t \t \n\t\t xmlhttp=$.ajax({\n\t\t \t//set the request url\n\t\t \turl:PROJECTDIR+\"filebox/picture/show_public.php?action=filebox_show\",\n\t\t \t//set the request way\n\t\t \ttype:'GET',\n\t\t \t//set return data type\n\t\t \tdataType:'html',\t\t \n\t\t //set function for success\t\t \n\t\t /*end end end end end*/\n\t\t success:function(){\n\t\t\t //return the data\n\t\t\t result=xmlhttp.responseText;\n\t\t\t //deal the data\n\t\t \t result_show_filebox(result);\n\t\t \t \n\t\t \t /*Select the item*/\n\t\t \t item_select_filebox();\n//\t\t\t Fscroll();\n\t\t \t /*hide the filebox*/\n\t\t\t Selectdone();\t\t \t \t\t\n\t\t \t},\n\t\t });\t\n}", "title": "" }, { "docid": "f30496cad2fefb9dadc8cb4a472ceffa", "score": "0.59305966", "text": "function selectFiles() {\n dialog.showOpenDialog({\n filters: [{name: 'svg', extensions: ['svg']}],\n properties: ['openFile', 'multiSelections']},\n function (filePaths) {\n let numReloaded = 0\n if (filePaths !== undefined) {\n let numTiles = tiles.length\n result = loadTiles(filePaths);\n // If new tiles were added then update the display.\n // Always show the first tile in the set just loaded\n //if (tiles.length > numTiles) {\n if (result.added > 0) {\n let idx = (numTiles > 0) ? numTiles : 0\n showTile(idx);\n }\n statusMessage(`Added: ${result.added}, Reloaded: ${result.reloaded}`, \"left\")\n statusMessage(`Tiles: ${tiles.length}`, \"right\")\n }\n });\n}", "title": "" }, { "docid": "c58f30dd0d411465c9d66c97a0d14767", "score": "0.59296423", "text": "printFiles(files) {\n console.log('All files', files);\n }", "title": "" }, { "docid": "ecddc7b4422078ae3252be3f0e3749e6", "score": "0.59153736", "text": "function tableFromFileList(data) {\n\tlet tab = document.createElement(\"table\");\n\ttab.class = \"fileview\";\n\tlet head = tab.appendChild(document.createElement(\"thead\"));\n\tlet dictArray = JSON.parse(data);\n\tlet keys = {\"name\":\"\",\"date\":\"\",\"size\":\"\"};\n\t// Build header based on keys in first dictionary\n\tfor (let key in keys) {\n\t\tlet label = document.createElement(\"th\");\n\t\tlabel.appendChild(document.createTextNode(key));\n\t\thead.appendChild(label);\n\t}\n\ttab.appendChild(head);\n\tfor (let i = 0; i<dictArray.length; i++) {\n\t\tvar row = document.createElement(\"tr\");\n\t\trow.class = \"fileview\";\n\t\tfor (let key in keys) {\n\t\t\tlet value;\n\t\t\tlet cell = document.createElement(\"td\");\n\t\t\tcell.className = \"fileview\";\n\t\t\t\n\t\t\tif (key == \"name\") {\n\t\t\t\tlet name = dictArray[i][key];\n\t\t\t\tlet link = document.createElement(\"a\");\t\n\t\t\t\tif (dictArray[i][\"is_dir\"]) {\n\t\t\t\t\tname = \"/\" + name;\n\t\t\t\t\tlet dirName = (dictArray[i][\"fileLoc\"]).slice(4);\n\t\t\t\t\tlet dirLoc = \"http://www.pinckert.com/cgi-bin/dir.py?path=\" + dirName;\n\t\t\t\t\tlink.dirLoc = dirLoc;\n\t\t\t\t\tlink.onclick = function() {\n\t\t\t\t\t\tgoFiles(this.dirLoc);\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tlink.href = dictArray[i][\"link\"];\n\t\t\t\t}\n\t\t\t\tlink.appendChild(document.createTextNode(name));\n\t\t\t\tvalue = link;\n\t\t\t}\n\t\t\tif (key == \"date\") {\n\t\t\t\tlet fromUnixEpoch = dictArray[i][key] * 1000;\n\t\t\t\tlet d = new Date(fromUnixEpoch);\n\t\t\t\tvalue = document.createTextNode(formatDate(d));\n\t\t\t}\n\t\t\tif (key == \"size\") {\n\t\t\t\tvalue = document.createTextNode(dictArray[i][key]);\n\t\t\t\tcell.style.textAlign = \"right\";\n\t\t\t}\n\t\t\tcell.appendChild(value);\n\t\t\trow.appendChild(cell);\n\t\t}\n\t\ttab.appendChild(row);\t\n\t}\n\treturn tab;\n}", "title": "" }, { "docid": "28874525a42972d5ac4acf70b3aa94f3", "score": "0.5914255", "text": "function handleFileSelect(evt) {\n var files;\n var output = [];\n if(evt.type=='drop'){\n evt.stopPropagation();\n evt.preventDefault();\n files = evt.dataTransfer.files\n }else{\n files = evt.target.files; // FileList object\n }\n \n document.getElementById(evt.target.dataset.outputImage).innerHTML = '';\n document.getElementById(evt.target.dataset.outputImage).style.display = 'none';\n document.getElementById(evt.target.dataset.initialImage).style.display = 'block';\n \n // Loop through the FileList and render image files as thumbnails.\n for (var i = 0, f; f = files[i]; i++) {\n\n // Only process image files.\n if (!f.type.match('image.*')) {\n continue;\n }\n \n var reader = new FileReader();\n\n // Closure to capture the file information.\n reader.onload = (function(theFile) {\n return function(e) {\n // Render thumbnail.\n /*\n var span = document.createElement('span');\n span.innerHTML = ['<img class=\"thumb\" src=\"', e.target.result,\n '\" title=\"', escape(theFile.name), '\"/>'].join('');\n document.getElementById(evt.target.dataset.outputImage).insertBefore(span, null);\n */\n var div = document.createElement('div');\n div.className = 'thumbnail';\n div.innerHTML = ['<img src=\"', e.target.result,'\" />'].join('');\n document.getElementById(evt.target.dataset.outputImage).insertBefore(div, null);\n document.getElementById(evt.target.dataset.outputImage).style.display = 'block';\n document.getElementById(evt.target.dataset.initialImage).style.display = 'none';\n \n };\n })(f);\n\n // Read in the image file as a data URL.\n reader.readAsDataURL(f);\n }\n \n }", "title": "" }, { "docid": "6236acd7ee1ee90a536c3acec8e1a323", "score": "0.5910991", "text": "function prepareUpload(event) {\n $('#status_csv_file').html('');\n $('#csvFileList').html('');\n files = event.target.files;\n var fileName = this.files[0].name;\n var fileSize = this.files[0].size;\n var fileType = this.files[0].type;\n var size = fileSize / 1048576;\n var fsize = size.toFixed(2);\n if (this.files && this.files.length > 0) {\n $('#displayfile').html('<img src=\"' + baseurl + 'assets/img/loader.gif\"> loading...');\n filesArray = this.files;\n $.each(this.files, function (index, value) {\n if (value.type == 'text/csv' || value.type=='application/csv') {\n var reader = new FileReader();\n var link_reg = /(http:\\/\\/|https:\\/\\/)/i;\n reader.readAsText(value);\n reader.onload = function (file) {\n var content = file.target.result;\n var rows = file.target.result.split(/\\r\\n|\\n/);\n document.getElementById(\"csvFileList\").innerHTML = \"\";\n var table = document.createElement('table');\n table.className = \"table table-bordered\";\n var tbody = document.createElement('tbody');\n for (var i = 0; i < rows.length; i++) {\n var tr = document.createElement('tr');\n tr.id = \"tr_\" + i;\n var arr = rows[i].split(',');\n if (arr.length == colLength) {\n var tmpArr = [];\n for (var j = 0; j < arr.length; j++) {\n if (i == 0) {\n var td = document.createElement('th');\n } else {\n var td = document.createElement('td');\n tmpArr.push(arr[j]);\n }\n\n if (link_reg.test(arr[j])) {\n var a = document.createElement('a');\n a.href = arr[j];\n a.target = \"_blank\";\n a.innerHTML = arr[j];\n td.appendChild(a);\n } else {\n td.innerHTML = arr[j];\n }\n\n tr.appendChild(td);\n }\n if (i != 0) {\n csvFilesArr.push(tmpArr);\n }\n tbody.appendChild(tr);\n }\n }\n table.appendChild(tbody);\n document.getElementById('csvFileList').appendChild(table);\n }\n } else {\n var row_data1 = \"\";\n row_data1 += '<section class=\"content\"><div class=\"col-xs-12\"><div class=\"alert alert-danger alert-dismissable\"><i class=\"fa fa-ban\"></i>Only .csv file accepted</div><div></section>';\n $('#msgftp').html(row_data1).fadeTo(3000, 500).slideUp(3000);\n $('#displayfile').hide();\n return false;\n }\n });\n }\n $('#displayfile').html('');\n\n}", "title": "" }, { "docid": "fa0d0f0a7e9149586f75ba1488727155", "score": "0.59086406", "text": "render() {\n\n $(this.target).append(this.$el);\n\n this.$el.modal('show');\n\n if (window.File && window.FileReader && window.FileList && window.Blob) {\n // noop\n } else {\n // not tested\n this.$el.find('.modal-body').html(\"File upload not supported in your browser :(\");\n return 0;\n }\n\n }", "title": "" }, { "docid": "2884af8f39a5d6e83a49c380d320afa9", "score": "0.5906225", "text": "async function uploadFileTobrowser() {\n const files = $( '#fileUploadBtn' ).prop( 'files' );\n if(files.length == 0) return;\n Array.from( files ).forEach( async file => {\n \n const reader = new FileReader();\n let content = '';\n /** reads each line of the file and joins them */\n \n reader.onerror = ( error ) => alert( error.target.error.name );\n \n reader.readAsText( file );\n /** Adds the file to the viewer */\n const fileElement = document.createElement( 'li' );\n fileElement.className = 'fileElement';\n fileElement.innerText = file.name ;\n fileElement.dataset.fileName = file.name ;\n fileElement.dataset.fileContent = content ;\n reader.onload = ( e ) => {\n const file = e.target.result;\n const lines = file.split( /\\r\\n|\\n/ );\n content = lines.join( '\\n' );\n fileElement.dataset.fileContent = content ;\n };\n\n\n fileElement.onclick = () => {\n $( '#fileContentDisplayer' ).text( content );\n highlight(); \n }\n $( '#fileList' ).append( fileElement ); \n\n } );\n}", "title": "" }, { "docid": "45e194d666064430cebfaf05af7c0c74", "score": "0.58933157", "text": "commonChooseFile() {\n const jud = this.beforeChoose()\n if (jud != true && jud != undefined) return\n this.refs['ajax_upload_file_input'].click()\n }", "title": "" }, { "docid": "666c41895ff3af15f0172b049641397f", "score": "0.5892922", "text": "function showreview(event) {\n if (event.target.files.length > 0) {\n var src = URL.createObjectURL(event.target.files[0]);\n var preview = document.getElementById('file-ip-1-preview');\n preview.src = src;\n preview.style.display = \"block\";\n }\n}", "title": "" }, { "docid": "c2d7e29d1d98a7ada085673bb26570c5", "score": "0.5891851", "text": "displayFileMenu() {\n //TO DO\n }", "title": "" }, { "docid": "b3153ff1a784340a1378a8f165fa8764", "score": "0.5889064", "text": "function previewFiles() {\n\n var preview = document.querySelector('#preview');\n var files = document.querySelector('input[type=file]').files;\n\n function readAndPreview(file) {\n\n // Make sure `file.name` matches our extensions criteria\n if ( /\\.(jpe?g|png|gif)$/i.test(file.name) ) {\n var reader = new FileReader();\n\n reader.addEventListener(\"load\", function () {\n var image = new Image();\n image.height = 150;\n image.title = file.name;\n image.src = this.result;\n preview.appendChild( image );\n }, false);\n\n reader.readAsDataURL(file);\n }\n\n }\n\n if (files) {\n [].forEach.call(files, readAndPreview);\n }\n\n}", "title": "" }, { "docid": "384172fe2ad9450d253cb9536f314d54", "score": "0.5887271", "text": "function showModal_uploadNewFile(){\n $('#container_modalUploadNewFile').show();\n}", "title": "" }, { "docid": "e2e237161cf36da68ff253cad2f5dd06", "score": "0.5885155", "text": "function displayImageUploadDialog() {\n return dialog.showOpenDialog({\n properties: ['openFile'], // users can only upload one file at a time\n filters: [{ name: 'Images', extensions: ['jpg', 'png'] }],\n });\n}", "title": "" }, { "docid": "84270f1b2ba2c4f98e13cb6a733a1845", "score": "0.58846736", "text": "function list_files(){\n\t//storage not supported, give up (no files possible)\n\tif(!storage_supported){\n\t\treturn;\n\t}\n\t\n\tvar output_string='';\n\t\n\t//look through all the keys in the local storage object\n\tfor(var n=0;n<localStorage.length;n++){\n\t\tkey=localStorage.key(n);\n\t\t\n\t\t//name and edit functionality\n\t\toutput_string+=('<a href=\"javascript:open_file(\\''+key+'\\');\">'+key+'</a>');\n\t\t\n\t\toutput_string+=' ';\n\t\t\n\t\t//delete functionality\n\t\toutput_string+=('<a href=\"javascript:delete_file(\\''+key+'\\');\">'+'[delete]'+'</a>');\n\t\t\n\t\toutput_string+=('<br>'+\"\\n\");\n\t}\n\t\n\t//output the file list to a pre-defined div\n\tdocument.getElementById('file_list_div').innerHTML=output_string;\n}", "title": "" }, { "docid": "50df39e39f0e366a7b12dcfa5ac060d5", "score": "0.58829874", "text": "function initUploadedTable(file_list_id) {\n var list = $('#' + file_list_id);\n var i = list.find('tr:not(:first)').length;\n\n if (i > 0) {\n list.find('tr').hover(function () {\n $(this).addClass('hovered');\n }, function () {\n $(this).removeClass('hovered');\n });\n } else {\n list.hide();\n list.prev().show();\n }\n ;\n}", "title": "" }, { "docid": "6c6bef9373b4b621d9283c291fb9d03f", "score": "0.5863103", "text": "function showUploadDialog() {\n setShouldShowUploadDialog(true);\n }", "title": "" }, { "docid": "e62edd46da1b9bfce505d3e7a359250d", "score": "0.5860277", "text": "function docsSelected(myFiles) {\n\n var counter = 0;\n var numFiles = myFiles.length;\n\n staticDiv.css(\"display\", \"none\");\n\n for (var i = 0, f; f = myFiles[i]; i++) {\n var fileReader = new FileReader();\n\n fileReader.onload = (function(fileRead) {\n\n //this is the html for successFiles and errorFiles are written\n var successHtml = ['<div id=\"successFile\" name=\"' + fileRead.name + '\" value=\"' + fileRead.size + '\"><img id=\"fileType\" src=\"' + srcIconFiles[0] + '\"/>' + fileRead.name + '<img id=\"success\" src=\"images/success.png\" /></div>',\n '<div id=\"successFile\" name=\"' + fileRead.name + '\" value=\"' + fileRead.size + '\"><img id=\"fileType\" src=\"' + srcIconFiles[1] + '\"/>' + fileRead.name + '<img id=\"success\" src=\"images/success.png\" /></div>'];\n var errorHtml = '<div id=\"errorFile\" value=\"' + fileRead.size + '\">' + fileRead.name + '<img id=\"error\" src=\"images/error.png\" /></div>';\n\n //every file has a MIME type. the following are for files with file extensions .pdf, .docx & .doc\n //i'm considering adding .ppt, .pptx, .zip \n if (!fileRead.type.match(\"application/vnd.openxmlformats-officedocument.wordprocessingml.document\") &&\n !fileRead.type.match(\"application/pdf\") &&\n !fileRead.type.match(\"application/msword\"))\n {\n if (!duplicateFiles(fileRead))\n {\n mainDiv.append(errorHtml);\n }\n\n //we dont want a line divider on the top for the first item\n if (mainDiv.children().length == 0)\n {\n errorFile.first().css(\"border-top\",\"none\");\n }\n numFiles -= 1;\n }\n\n //if the file is bigger that 5mb\n else if (fileRead.size > 5242880)\n {\n if (!duplicateFiles(fileRead))\n {\n mainDiv.append(errorHtml);\n }\n \n //we dont want a line divider on the top for the first item\n if (mainDiv.children().length == 0)\n {\n errorFile.css(\"border-top\",\"none\");\n }\n numFiles -= 1;\n }\n\n //if all is well return the file as a success\n else\n {\n return function(e) {\n\n //reading the name and value (content) of file\n var name = escape(fileRead.name);\n var value = e.target.result;\n\n //ajax request sent to uploader.php\n $.ajax({\n type: 'POST',\n url: 'uploader.php',\n data: {'name': name, 'value': value},\n async: true,\n success: function(data) {\n counter++;\n\n //this will check for duplicate files listed (client side) but will upload the file regardless (server side)\n if (!duplicateFiles(fileRead))\n {\n if (i == 0)\n {\n loadingBarAmountDiv.css(\"width\", \"1%\");\n }\n mainDiv.children().not(staticDiv).css(\"border-top\",\"1px solid #555\");\n if (fileRead.type.match(\"application/vnd.openxmlformats-officedocument.wordprocessingml.document\"))\n {\n mainDiv.prepend(successHtml[0]);\n }\n else if (fileRead.type.match(\"application/pdf\"))\n {\n mainDiv.prepend(successHtml[1]);\n }\n else if (fileRead.type.match(\"application/msword\"))\n {\n mainDiv.prepend(successHtml[0]);\n }\n }\n \n //we dont want a line divider on the top for the first item (which is ALWAYS a successFile)\n \n //TODO: find out why $(\"#successFile:first\") cannot be in variable\n mainDiv.children().first().css(\"border-top\",\"none\");\n\n var amount = counter*100/numFiles + \"%\";\n\n if (amount == \"100%\")\n {\n amount = \"99%\";\n }\n\n loadingBarAmountDiv.css(\"width\", amount);\n }\n });\n };\n }\n })(f);\n fileReader.readAsDataURL(f);\n }\n }", "title": "" }, { "docid": "55daffc60db622b03bc7062bcdbfb405", "score": "0.58361614", "text": "function initialUploadBox(key, type='image')\n{\n\n window.fileInputID = key + \"-upload\";\n window.fileDragID = key + \"-drag\";\n window.labelID = key + \"-hide\";\n window.uploadType = type;\n window.uploadKey = key;\n \n // Check for the various File API support.\n if (window.File && window.FileList && window.FileReader) {\n Init();\n } else { \n document.getElementById(window.fileDragID).style.display = \"none\"; \n }\n\n}", "title": "" }, { "docid": "ad51b84fc0589c382b3af4f223f1929e", "score": "0.58276844", "text": "function previewBeforeUpload(event){\n preview.innerHTML = \"\"\n files = Array.from(event.target.files)\n uploadButton.addEventListener(\"click\", () => uploadRecognizeHandler(files))\n files.forEach(file => {\n if (!file.type.match(\"image\")) {\n return\n }\n //insert upload button when have files to upload\n headerUpload.insertAdjacentElement(\"beforeend\", uploadButton)\n uploadButton.style.display = \"block\"\n\n //Add previews of opened pictures\n const reader = new FileReader\n reader.onload = ev => {\n preview.insertAdjacentHTML(\"beforeend\",\n `<div class=\"img-preview-container\">\n <div class=\"remove-img\" data-name=\"${file.name}\">\n &times;\n </div>\n <div class=\"img-info\">${file.name} , ${formatBytes(file.size)}</div>\n <img src=\"${ev.target.result}\" alt=\"${file.name}\">\n </div>\n `\n )\n }\n reader.readAsDataURL(file)\n })\n\n }", "title": "" }, { "docid": "4dcf787b215852c1b2e27f1c4ec3f445", "score": "0.5826182", "text": "function handleFiles(files) {\n\t//jQuery('#input').fileupload({\n\t\t//url: '/file_upload_handler',\n\t////dataType: 'json',\n //done: function (e, data) {\n //jQuery.each(data.result, function (index, file) {\n //jQuery('<p/>').text(file.name).appendTo(document.body);\n //});\n //},\n //add:function (e, data) {\n\t\t\t\n //jQuery(\"#uploadBtn\").off('click').on('click',function () { \n //data.submit();\n //});\n //}\t\n\t//})\n\t////.fileupload('add', {\n\t\t//files: files,\n\t\t//url: '/file_upload_handler'\n\t//});\n\t//for (var i = 0; i < files.length; i++) {\n\t\t//var file = files[i];\n\t\t//var imageType = /image.*/;\n\t\t\n\t\t//if (!file.type.match(imageType)) {\n\t\t //continue;\n\t\t//}\n\t\t\n\t\t////var img = document.createElement(\"img\");\n\t\t////img.classList.add(\"obj\");\n\t\t////img.file = file;\n\t\t\n\t\t//var reader = new FileReader();\n\t\t//reader.onload = function(theFile) { \n\t\t\t//var image = new Image(), data = {};\n\t\t\t//image.src = theFile.target.result;\n\n\t\t\t//image.onload = function() {\n\t\t\t\t//data.width = image.width;\n\t\t\t\t//data.height = image.height;\n\t\t\t\t//add_image(theFile.target.result, data);\n\t\t\t//};\n\t\t//};\n\t\t\n\t\t//reader.readAsDataURL(file);\n\t//}\n}", "title": "" }, { "docid": "2ae7176832ea715bccb2848b1f1610a3", "score": "0.58212024", "text": "function uploadCompleteInfo(numFilesUploaded) {\n\tvar filesStatus = $$(this.customSettings.filesStatusId);\n\tif (filesStatus){\n\t\tfilesStatus.innerHTML = '<span class=\"num_selected\">' + numFilesUploaded + '</span> 个文件上传成功.';\n\t}\n}", "title": "" }, { "docid": "58a71e51dd964fc4240bb157f9bc23a3", "score": "0.58135194", "text": "function handleFiles(fileUploadBox) {\n //Create custom form data object for file list\n let rawFileList = [];\n rawFileList = fileUploadBox.files;\n\n let filteredFileList = [];\n if (rawFileList.length > 0) {\n const allowedExtensions = [\"pdf\", \"doc\", \"docx\", \"jpg\", \"png\", \"ppt\"];\n for (let i = 0; i <= rawFileList.length - 1; i++) {\n let fileType = rawFileList[i].name.split('.').pop().toLowerCase();\n if (!allowedExtensions.filter(e => e.includes(fileType)).length) {\n alert(`File ${rawFileList[i].name} is not the correct type, files must have an extension of .pdf/.doc/.jpg/.png/.ppt only.`);\n return\n }\n\n //Check file size\n const fileSize = Math.round((rawFileList[i].size / 1024));\n if (fileSize >= 4096) {\n alert(\n `File ${rawFileList[i].name} is too Big, please select a file less than 4mb`);\n return\n } else {\n filteredFileList.push(rawFileList[i]);\n }\n }\n }\n\n var form_data = new FormData();\n\n for (let i = 0; i < filteredFileList.length; i++) {\n form_data.append(filteredFileList[i].name, filteredFileList[i]);\n }\n\n //Post files to server\n $.ajax({\n url: \"/Item/PostFiles\",\n cache: false,\n contentType: false,\n processData: false,\n data: form_data,\n type: 'post',\n success: function (data) {\n let newFileNameString = $(\"#file-names\").val() + data;\n $(\"#file-names\").val(newFileNameString);\n\n //Update file list html\n if (data) {\n let newFileNames = data.split(\",\");\n newFileNames.pop();\n let filesHtml = \"\";\n for (let i = 0; i < newFileNames.length; i++) {\n let downloadLink = \"/Item/GetDownloadedFile/?filePath=\\\\files\\\\documents\\\\items\\\\temp\\\\\" + newFileNames[i];\n filesHtml +=\n `<div class=\"field\">\n <div class=\"field__input field__input-file\">\n <a href=\"${downloadLink}\" class=\"file-name link\">${newFileNames[i]}</a>\n <button onclick=\"removeFile(this)\" class=\"button--icon button--icon-delete align-right\">\n <img src=\"../images/svgs/cross.svg\" alt=\"remove_file\">\n </button>\n </div>\n </div>`;\n };\n\n $(\"#files-list\").append(filesHtml);\n }\n },\n error: function (error) {\n console.log(error);\n }\n });\n event.preventDefault();\n}", "title": "" }, { "docid": "5a36f46895a2c40c118dd807d2cfc5c6", "score": "0.58094555", "text": "function fileChanged() {\n\n this.file = document.getElementById(\"selectedFile\").files[0]; \n if(this.file && this.file.name)\n document.getElementById(\"fileName\").innerHTML = \"Archivo:\"+this.file.name;\n else\n document.getElementById(\"fileName\").innerHTML = \"\";\n }", "title": "" }, { "docid": "95f07034ef01909e284f41d6cfcec0d0", "score": "0.58067816", "text": "function upload_button(el, callback) {\n var uploader = document.getElementById(el); \n var reader = new FileReader();\n \n reader.onload = function(e) {\n var contents = e.target.result;\n callback(contents);\n };\n \n uploader.addEventListener(\"change\", handleFiles, false); \n \n function handleFiles() {\n d3.select(\"#table\").text(\"loading...\");\n var file = this.files[0];\n reader.readAsText(file);\n };\n }", "title": "" }, { "docid": "c3a01e2c479319958b72473a24df5ce8", "score": "0.5786432", "text": "function file_upload(){\n\tvar report = language('Report');\n\tvar result = language('Result');\n\tvar theme = language('Configuration Files Upload');\n\t\n\tvar str = '';\n\tif(_type == 'file_upload'){\n\t\tif(_tip == 'true'){\n\t\t\tstr += language('Configuration Files Upload Succeeded');\n\t\t}else{\n\t\t\tstr += language('Configuration Files Upload Failed');\n\t\t}\n\t}else{\n\t\tstr += language('Configuration Files Uploading')+' ......<br>'+'<img src=\"/images/loading1.gif\" />';\n\t}\n\t\n\t$(\"#restore_configuration\").after(\n\t\t'<br>'+\n\t\t'<b>'+report+'</b>'+\n\t\t'<table style=\"width:100%;font-size:12px;border:1px solid rgb(59,112,162);\">'+\n\t\t\t'<tr style=\"background-color:#D0E0EE;height:26px;\">'+\n\t\t\t\t'<td align=\"center\" style=\"width:100%\">'+\n\t\t\t\t\t'<b>'+theme+'</b>'+\n\t\t\t\t'</td>'+\n\t\t\t'</tr>'+\n\t\t\t'<tr align=\"left\" style=\"background-color: rgb(232, 239, 247);\">'+\n\t\t\t\t'<td>'+\n\t\t\t\t\tstr+\n\t\t\t\t'</td>'+\n\t\t\t'</tr>'+\n\t\t'</table>'\n\t);\n}", "title": "" }, { "docid": "c667e7431cb28994d34c141a9c7a30ee", "score": "0.5785647", "text": "function file_on_change(){\n var filename = $('#file')[0].files[0].name;\n $('#drag_here').html(filename);\n $('#upload_progress').width('0%');\n $('#upload_progress').addClass('active');\n $('#upload_progress').addClass('progress-bar-info');\n $('#upload_progress').addClass('progress-bar-striped');\n $('#upload_progress').removeClass('progress-bar-success');\n}", "title": "" }, { "docid": "321e628971f2e210e7f92707a40da721", "score": "0.5783309", "text": "function handleFiles(files) {\n files = [...files]\n let delete_button = document.getElementById(\"remove\")\n delete_button.disabled = false\n files.forEach(previewFile)\n \n\n }", "title": "" }, { "docid": "e8f12fa5292a09bdcf2a9faa74b7241d", "score": "0.577131", "text": "function handleFileInput(e) {\n console.log(e.target.files);\n setSelectedFile(e.target.files[0]);\n }", "title": "" }, { "docid": "a3244e02aae19004dee664046760c152", "score": "0.5768808", "text": "function handlerUpload(e) {\n\n let counter = models.length;\n let items = [];\n\n for(let m of models){\n items.push(m);\n }\n var UpModels = Array.from(e.target.files)\n \n for (let um of UpModels) {\n if(contain(um.name)!==true){\n items.push({\n value: um.name,\n sel: false,\n file: um,\n id: counter\n })\n counter++;\n }\n }\n setModels(items)\n }", "title": "" }, { "docid": "604bac5053020a17b099ab9dbaef759f", "score": "0.5767142", "text": "function upload_tdms_files() {\n\n // call to server\n\n // turn off continue button\n $(\".browser-continue\").prop(\"disabled\", true);\n $(\".browser-continue\").toggleClass(\"disabled\", true);\n\n // get parameters for file list upload\n var filelist = component.browser_tdms_files.selection()\n var parser = \"dac-tdms-file-parser\";\n var progress = component.browser_tdms_files.progress;\n\n // upload filelist\n var fileObject ={\n pid: component.project._id(),\n mid: component.model._id(),\n file: filelist,\n aids: [],\n parser: parser,\n progress: progress,\n progress_increment: 100,\n success: function(){\n\n // turn off continue button\n $(\".browser-continue\").toggleClass(\"disabled\", false);\n $(\".browser-continue\").prop(\"disabled\", false);\n\n // go to model\n component.go_to_model();\n\n },\n error: function(){\n\n $(\"#dac-finish-model-error\").text(\"There was a problem uploading the selected file(s).\");\n $(\"#dac-finish-model-error\").show();\n\n $('.browser-continue').toggleClass(\"disabled\", false);\n $(\".browser-continue\").prop(\"disabled\", false);\n\n }\n };\n fileUploader.uploadMultipleFiles(fileObject);\n\n // show message\n $(\".dac-do-not-close-browser\").show();\n\n // show upload\n component.tab(tabs[\"tdms\"]);\n }", "title": "" }, { "docid": "2d4ca3e9e278f17f22dda61337f5ea5e", "score": "0.5742364", "text": "function showButtons(){\n $('#upload_data_button').show();\n $('#insert_data_button').show();\n $('#remove_data_button').show();\n }", "title": "" }, { "docid": "45b46c2de6410cad888bec69eabe2582", "score": "0.5740128", "text": "displayFilePreview() {\n const inputText = document.getElementById(\"input-text\"),\n fileSlice = this.fileBuffer.slice(0, 4096);\n\n inputText.style.overflow = \"hidden\";\n inputText.classList.add(\"blur\");\n inputText.value = Utils.printable(Utils.arrayBufferToStr(fileSlice));\n if (this.fileBuffer.byteLength > 4096) {\n inputText.value += \"[truncated]...\";\n }\n }", "title": "" }, { "docid": "c6a4f19537c3a2a8b870dde5fe68dcd7", "score": "0.573375", "text": "function handleFileSelect(evt, prev_id) {\n if (!evt) // i.e. the argument is undefined or null\n evt = window.event;\n var files = evt.target.files; // FileList object\n // Loop through the FileList and render image files as thumbnails.\n for (var i = 0, f; f = files[i]; i++) {\n\n // Only process image files.\n if (!f.type.match('image.*')) {\n continue;\n }\n\n var reader = new FileReader();\n\n // Closure to capture the file information.\n reader.onload = (function (theFile) {\n return function (e) {\n // Render thumbnail.\n // var span = document.createElement('span');\n var span = document.getElementById(prev_id);\n span.innerHTML = ['<img class=\"thumb\" src=\"', e.target.result,\n '\" title=\"', escape(theFile.name), '\"/>'].join('');\n //document.getElementById(prev_id).insertBefore(span, null);\n };\n })(f);\n\n // Read in the image file as a data URL.\n reader.readAsDataURL(f);\n }\n}", "title": "" }, { "docid": "fcc1937a6cec6113f186e7bb70795fbb", "score": "0.573094", "text": "function handleFileSelect(evt) {\n\t\t\t var files = evt.target.files; // FileList object\t\t\t\n\t\t\t // files is a FileList of File objects. List some properties.\n\t\t\t for (var i = 0, f; f = files[i]; i++) {\t\t\t\t\t\n\t\t\t\t\tvar reader = new FileReader();\n\t\t\t\t\treader.onload = (function(theFile) {\n\t\t\t\t return function(e) {\n\t\t\t\t \tvar xmlHttp = null;\n\t\t\t\t\t\t xmlHttp = new XMLHttpRequest();\n\t\t\t\t\t\t xmlHttp.open( \"POST\", \"http://\" + host + \":\" + port+ \"/WantCore/rest/fileUpload/\", true );\n\t\t\t\t\t\t xmlHttp.send(theFile);\n\t\t\t\t\t\t\tdispenseTask(theFile,agent);\n\t\t\t\t\t\t\t//dispenseTask(reader.readAsText(f),agent);\n\t\t\t\t };\n\t\t\t\t })(f);\n\t\t\t\t \n\t\t\t\t reader.readAsText(f);\n\t\t\t }\n\t\t\t }", "title": "" }, { "docid": "4ec9b730f45afa8bf4634b7830d7b2e1", "score": "0.57283306", "text": "function handleFileSelect(evt) {\n var files = evt.target.files; // FileList object\n files = Array.prototype.filter.call(files, function filterer(f){console.log(f.type); if(f.type == \"audio/mp3\" || f.type == \"audio/ogg\" || f.type == \"audio/wav\") return true; else{return false;}});\n var a = new CustomEvent('filesLoaded', {detail: files});\n window.dispatchEvent(a);\n\n var table = document.getElementById('songList');\n // files is a FileList of File objects. List some properties.\n for (var i = 0, f; f = files[i]; i++) {\n var output = [];\n var reader = new FileReader();\n var source;\n\n reader.onload = (function(theFile){\n var fileName = theFile.name;\n return function(f){\n context.decodeAudioData(this.result, function(audio) {\n var sound = {\n audio: audio,\n name: fileName};\n var el = document.createElement('tr');\n new SoundElement(el, sound);\n table.appendChild(el);\n initColumns();\n });\n };\n })(f);\n reader.readAsArrayBuffer(f);\n }\n}", "title": "" }, { "docid": "925ac67c83b75a80c9922a454b17e944", "score": "0.57255703", "text": "function init() {\n\t//define variables now that the page is loaded\n\tft = document.getElementsByTagName('table')[0];\n\tftRows = ft.getElementsByTagName('tr');\n\tftPaths = ft.getElementsByClassName('file');\n\tftThumbnails = ft.getElementsByClassName('thumbnail');\n\tftSizes = ft.getElementsByClassName('size');\n\tftMimes = ft.getElementsByClassName('mime');\n\tftAdds = ft.getElementsByClassName('add');\n\n\tst = document.getElementsByTagName('table')[1];\n\tstRows = st.getElementsByTagName('tr');\n\tstMoves = st.getElementsByClassName('move');\n\tstPaths = st.getElementsByClassName('selectedFiles')\n\tstRemoves = st.getElementsByClassName('remove')\n\tstURIs = st.getElementsByClassName('uri');\n\t\n\tinfo = document.getElementById('info');\n\t\n\tfor (var i = 1; i < ftRows.length; i++) { //i = 1 because first row is not data\n\t\t\n\t\t//shorten file path if needed\n\t\tif (ftPaths[i].children[0] != null) { //if path is a link\n\t\t\tftPaths[i].children[0].innerHTML = trimFilePath(ftPaths[i].children[0].innerHTML);\n\t\t} else { //if path is not a link\n\t\t\tftPaths[i].innerHTML = trimFilePath(ftPaths[i].innerHTML);\n\t\t}\n\t\t\n\t\t//condense displayed file size\n\t\tvar fileSize = parseInt(ftSizes[i].innerHTML);\n\t\tif (!isNaN(fileSize)) {\n\t\t\tif (fileSize > 999999999) {\n\t\t\t\tftSizes[i].innerHTML = Math.round((fileSize / 1073741824) * 10) / 10 + \"GB\";\n\t\t\t} else if (fileSize > 999999) {\n\t\t\t\tftSizes[i].innerHTML = Math.round((fileSize / 1048576) * 10) / 10 + \"MB\";\n\t\t\t} else if (fileSize > 999) {\n\t\t\t\tftSizes[i].innerHTML = Math.round((fileSize / 1024) * 10) / 10 + \"KB\";\n\t\t\t} else {\n\t\t\t\tftSizes[i].innerHTML = Math.round(fileSize * 10) / 10 + \"B\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t//if item isn't an image disable 'Add' button\n\t\tif (!ftMimes[i].innerHTML.startsWith(\"image\")) {\n\t\t\tftAdds[i].children[0].removeAttribute('onclick');\n\t\t\tftAdds[i].children[0].setAttribute('class', 'disabled');\n\t\t\tftAdds[i].children[0].children[0].setAttribute('src', '/img/disabled.png');\n\t\t}\n\t\t\n\t}\n\t\n\tdocument.getElementById('imageSetName').value = \"\"; //keep browser from filling in cached value\n\t\n\t//load image set if parameters are present\n\tvar parameters = getParameters();\n\tif (parameters !== null\n\t\t\t&& parameters.get(\"edit\") !== undefined\n\t\t\t&& parameters.get(\"imageSetUri\") !== undefined) {\n\t\timageSetId = parameters.get(\"edit\");\n\t\timageSetUri = parameters.get(\"imageSetUri\");\n\t\t\n\t\t//get image set for the given id, load images into table\n\t\tvar xhr = new XMLHttpRequest();\n\t\txhr.onreadystatechange = function() {\n\t\t\tif (xhr.readyState == 4 && this.status != 200) { //failure\n\t\t\t\tinfo.innerHTML = \"Error retrieving image set: Status code \" + this.status + \".\";\n\t\t\t} else if (xhr.readyState == 4 && this.status == 200) { //success\n\t\t\t\tvar images = JSON.parse(xhr.responseText);\n\t\t\t\tdocument.getElementById('imageSetName').value = decodeURI(imageSetId);\n\t\t\t\t\n\t\t\t\tfor (var i = 0; i < images.length; i++) {\n\t\t\t\t\taddRow(images[i][\"filename\"].toString(), images[i][\"uri\"].toString(), images[i][\"mimetype\"].toString());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\twindow.history.pushState(\"state\", \"\", window.location.href.substring(0, window.location.href.indexOf(\"?\"))); //trim off parameters so this doesn't trigger again if refreshed\n\t\t\t\t\n\t\t\t\ttoggleCreator();\n\t\t\t\tinfo.innerHTML = \"\";\n\t\t\t}\n\t\t}\n\t\t\n\t\txhr.open(\"GET\", \"/accessions/image-sets/\" + imageSetId, true);\n\t\txhr.send();\n\t\t\n\t\tinfo.innerHTML = \"Working...\";\n\t}\n\t\n\tnoImageCheck(); //initially generate \"-None-\" row\n}", "title": "" }, { "docid": "e9093835e004d4c144b929a3006a413d", "score": "0.57236385", "text": "function openfile() {\n/*opens sidebar \n/*dispalys list of saved files*/\n}", "title": "" }, { "docid": "0831ff0075da4bd4e21f374ab7e24b9a", "score": "0.57220346", "text": "function requestFiles() {\n var contentType = \"files\";\n new Ajax.Request(\"Files\", {\n parameters: {\n requestingMethod: \"FilesInfo.requestFiles\",\n datasetId: dataset,\n ajaxRequest: \"true\",\n files_request: \"content\",\n files_content: contentType\n },\n\tbeforeSend : showStatusIndicator(\"Loading...\"),\n onSuccess : hideStatusIndicator,\n onComplete: displayFiles,\n onException: function (request, exception) {\n throw(exception);\n }\n });\n}", "title": "" }, { "docid": "97018ca09c3cfef7c57887a2268b485b", "score": "0.57100046", "text": "function createHtmlFileList(files, view) {\n\tlet html = \"<ul id=\\\"files\\\" class=\\\"view-\" + escapeHtml(view) + \"\\\">\" +\n\t\t(view === \"details\" ? (\n\t\t\t\"<li class=\\\"header\\\">\" +\n\t\t\t\"<span class=\\\"name\\\">Name</span>\" +\n\t\t\t\"<span class=\\\"size\\\">Size</span>\" +\n\t\t\t\"<span class=\\\"date\\\">Modified</span>\" +\n\t\t\t\"</li>\") : \"\");\n\n\thtml += files.map(function(file) {\n\t\tconst classes = [];\n\t\tconst isDir = file.isDir;\n\t\tconst path = file.path;\n\n\t\tclasses.push(\"icon\");\n\n\t\tif (isDir) {\n\t\t\tclasses.push(\"icon-directory\");\n\t\t} else {\n\t\t\tconst ext = extname(file.name);\n\t\t\tconst icon = iconLookup(file.name);\n\n\t\t\tclasses.push(\"icon\");\n\t\t\tclasses.push(\"icon-\" + ext.substring(1));\n\n\t\t\tif (classes.indexOf(icon.className) === -1) {\n\t\t\t\tclasses.push(icon.className);\n\t\t\t}\n\t\t}\n\n\t\tconst date = file.lastModified;\n\t\tconst size = file.size;\n\n\t\treturn \"<li><a href=\\\"\" +\n\t\t\tescapeHtml(normalizeSlashes(normalize(path))) +\n\t\t\t\"\\\" class=\\\"\" + escapeHtml(classes.join(\" \")) + \"\\\"\" +\n\t\t\t\" title=\\\"\" + escapeHtml(file.name) + \"\\\">\" +\n\t\t\t\"<span class=\\\"name\\\">\" + escapeHtml(file.name) + \"</span>\" +\n\t\t\t\"<span class=\\\"size\\\">\" + escapeHtml(size) + \"</span>\" +\n\t\t\t\"<span class=\\\"date\\\">\" + escapeHtml(date) + \"</span>\" +\n\t\t\t\"</a></li>\";\n\t}).join(\"\\n\");\n\n\thtml += \"</ul>\";\n\n\treturn html;\n}", "title": "" }, { "docid": "df77ea4753d0a70f59626eba1cf85776", "score": "0.570743", "text": "function displayImageStoreUploadDialog() {\n return dialog.showOpenDialog({\n properties: ['openFile'],\n filters: [{ name: 'JSON', extensions: ['json'] }],\n });\n}", "title": "" }, { "docid": "2d520ed392922a50cd60f3da8a569ce1", "score": "0.5704412", "text": "function handleFileSelect(evt) {\n // These are the files\n var files = evt.target.files;\n // Load each one and trigger a callback\n for (var i = 0; i < files.length; i++) {\n var f = files[i];\n var reader = new FileReader();\n function makeLoader(theFile) {\n // Making a p5.File object\n var p5file = new p5.File(theFile);\n return function(e) {\n p5file.data = e.target.result;\n callback(p5file);\n };\n };\n reader.onload = makeLoader(f);\n\n // Text or data?\n // This should likely be improved\n if (f.type.indexOf('text') > -1) {\n reader.readAsText(f);\n } else {\n reader.readAsDataURL(f);\n }\n }\n }", "title": "" }, { "docid": "f0f92838539ecda9ea6f186cdc3653f4", "score": "0.570094", "text": "function showTextUpload()\n\t\t\t\t\t\t{\n //init();//clear all\n var filename=file;\n\n $.ajax({\n url:\"/showdata_ajax/\",\n data:{'filename':filename},\n success: function (data) {\n $(\"#textarea\").val(data);\n $('#textarea_div').show();\n }\n })\n\n\t\t\t\t\t\t}", "title": "" }, { "docid": "430e7d4662e5966a44190c1e27c821d1", "score": "0.5700659", "text": "function updateTotalFileCount(fileCount, table) {\r\n\tvar fileRef = $(\"#\" + table.data(\"target-file-id\"));\r\n\tfileRef.siblings(\".counts\").text(\r\n\t\t\t\"* file selected \" + fileCount + \"/\" + maxFileUploadCount);\r\n\tfileRef.prop('disabled', fileCount >= maxFileUploadCount).siblings(\r\n\t\t\t\"label.fileuploadLabel\").css(\"cursor\",\r\n\t\t\tfileCount >= maxFileUploadCount ? 'not-allowed' : 'pointer')\r\n}", "title": "" }, { "docid": "104fe3db0e4df979bb79341f45707858", "score": "0.5697501", "text": "function fetchFileList() {\n var xhr = new XMLHttpRequest();\n xhr.open('POST', FILELIST_URL, true);\n\n xhr.onreadystatechange = function () {\n // Show uploaded files\n if (xhr.readyState == xhr.DONE) {\n var fileList = JSON.parse(xhr.responseText);\n showFileList(fileList);\n }\n };\n\n xhr.send(null);\n }", "title": "" } ]
00f14518cdb3518ea710e8ac10f445ad
Merges `src` `TAttributes` into `dst` `TAttributes` removing any duplicates in the process. This merge function keeps the order of attrs same.
[ { "docid": "cb25ec57372618d03ca2ed71727d56ab", "score": "0.64879304", "text": "function mergeHostAttrs(dst, src) {\n if (src === null || src.length === 0) {\n // do nothing\n }\n else if (dst === null || dst.length === 0) {\n // We have source, but dst is empty, just make a copy.\n dst = src.slice();\n }\n else {\n let srcMarker = -1 /* ImplicitAttributes */;\n for (let i = 0; i < src.length; i++) {\n const item = src[i];\n if (typeof item === 'number') {\n srcMarker = item;\n }\n else {\n if (srcMarker === 0 /* NamespaceURI */) {\n // Case where we need to consume `key1`, `key2`, `value` items.\n }\n else if (srcMarker === -1 /* ImplicitAttributes */ ||\n srcMarker === 2 /* Styles */) {\n // Case where we have to consume `key1` and `value` only.\n mergeHostAttribute(dst, srcMarker, item, null, src[++i]);\n }\n else {\n // Case where we have to consume `key1` only.\n mergeHostAttribute(dst, srcMarker, item, null, null);\n }\n }\n }\n }\n return dst;\n}", "title": "" } ]
[ { "docid": "61830fc7c9fa308b46a15e5747611bbd", "score": "0.74229634", "text": "function mergeAttributes(src, dst) {\n Object.keys(src).forEach(function(k) { dst[k] = src[k]; });\n}", "title": "" }, { "docid": "ef769b3a7570d948c880c00a5e3adf07", "score": "0.67006963", "text": "function copyAttributes(src, dst)\n\t{\n\t\tvar attrs = src.attributes;\n\n\t\tfor(var i = 0; attrs!= null && i < attrs.length; i++) \n\t\t{\n\t\t\tdst.setAttribute(attrs[i].name, attrs[i].value);\n\t }\n\t}", "title": "" }, { "docid": "70df2e3a604986b58fe134c44c4c95fc", "score": "0.66569114", "text": "function mergeHostAttrs(dst, src) {\n if (src === null || src.length === 0) {// do nothing\n } else if (dst === null || dst.length === 0) {\n // We have source, but dst is empty, just make a copy.\n dst = src.slice();\n } else {\n var srcMarker = -1\n /* ImplicitAttributes */\n ;\n\n for (var i = 0; i < src.length; i++) {\n var item = src[i];\n\n if (typeof item === 'number') {\n srcMarker = item;\n } else {\n if (srcMarker === 0\n /* NamespaceURI */\n ) {// Case where we need to consume `key1`, `key2`, `value` items.\n } else if (srcMarker === -1\n /* ImplicitAttributes */\n || srcMarker === 2\n /* Styles */\n ) {\n // Case where we have to consume `key1` and `value` only.\n mergeHostAttribute(dst, srcMarker, item, null, src[++i]);\n } else {\n // Case where we have to consume `key1` only.\n mergeHostAttribute(dst, srcMarker, item, null, null);\n }\n }\n }\n }\n\n return dst;\n }", "title": "" }, { "docid": "70df2e3a604986b58fe134c44c4c95fc", "score": "0.66569114", "text": "function mergeHostAttrs(dst, src) {\n if (src === null || src.length === 0) {// do nothing\n } else if (dst === null || dst.length === 0) {\n // We have source, but dst is empty, just make a copy.\n dst = src.slice();\n } else {\n var srcMarker = -1\n /* ImplicitAttributes */\n ;\n\n for (var i = 0; i < src.length; i++) {\n var item = src[i];\n\n if (typeof item === 'number') {\n srcMarker = item;\n } else {\n if (srcMarker === 0\n /* NamespaceURI */\n ) {// Case where we need to consume `key1`, `key2`, `value` items.\n } else if (srcMarker === -1\n /* ImplicitAttributes */\n || srcMarker === 2\n /* Styles */\n ) {\n // Case where we have to consume `key1` and `value` only.\n mergeHostAttribute(dst, srcMarker, item, null, src[++i]);\n } else {\n // Case where we have to consume `key1` only.\n mergeHostAttribute(dst, srcMarker, item, null, null);\n }\n }\n }\n }\n\n return dst;\n }", "title": "" }, { "docid": "b0be37933c6ac17436caef0b32d99b7e", "score": "0.65354323", "text": "function mergeHostAttrs(dst, src) {\n if (src === null || src.length === 0) {\n // do nothing\n } else if (dst === null || dst.length === 0) {\n // We have source, but dst is empty, just make a copy.\n dst = src.slice();\n } else {\n let srcMarker = -1 /* AttributeMarker.ImplicitAttributes */;\n for (let i = 0; i < src.length; i++) {\n const item = src[i];\n if (typeof item === 'number') {\n srcMarker = item;\n } else {\n if (srcMarker === 0 /* AttributeMarker.NamespaceURI */) {\n // Case where we need to consume `key1`, `key2`, `value` items.\n } else if (srcMarker === -1 /* AttributeMarker.ImplicitAttributes */ || srcMarker === 2 /* AttributeMarker.Styles */) {\n // Case where we have to consume `key1` and `value` only.\n mergeHostAttribute(dst, srcMarker, item, null, src[++i]);\n } else {\n // Case where we have to consume `key1` only.\n mergeHostAttribute(dst, srcMarker, item, null, null);\n }\n }\n }\n }\n return dst;\n}", "title": "" }, { "docid": "31c904b2f0ee1fa80b3d2dbf166acc86", "score": "0.6535282", "text": "function mergeHostAttrs(dst, src) {\n if (src === null || src.length === 0) {// do nothing\n } else if (dst === null || dst.length === 0) {\n // We have source, but dst is empty, just make a copy.\n dst = src.slice();\n } else {\n let srcMarker = -1\n /* ImplicitAttributes */\n ;\n\n for (let i = 0; i < src.length; i++) {\n const item = src[i];\n\n if (typeof item === 'number') {\n srcMarker = item;\n } else {\n if (srcMarker === 0\n /* NamespaceURI */\n ) {// Case where we need to consume `key1`, `key2`, `value` items.\n } else if (srcMarker === -1\n /* ImplicitAttributes */\n || srcMarker === 2\n /* Styles */\n ) {\n // Case where we have to consume `key1` and `value` only.\n mergeHostAttribute(dst, srcMarker, item, null, src[++i]);\n } else {\n // Case where we have to consume `key1` only.\n mergeHostAttribute(dst, srcMarker, item, null, null);\n }\n }\n }\n }\n\n return dst;\n}", "title": "" }, { "docid": "7ecb908e96c2297b88345d61ff8341be", "score": "0.6511109", "text": "function mergeHostAttrs(dst, src) {\n if (src === null || src.length === 0) {\n // do nothing\n }\n else if (dst === null || dst.length === 0) {\n // We have source, but dst is empty, just make a copy.\n dst = src.slice();\n }\n else {\n var srcMarker = -1 /* ImplicitAttributes */;\n for (var i = 0; i < src.length; i++) {\n var item = src[i];\n if (typeof item === 'number') {\n srcMarker = item;\n }\n else {\n if (srcMarker === 0 /* NamespaceURI */) {\n // Case where we need to consume `key1`, `key2`, `value` items.\n }\n else if (srcMarker === -1 /* ImplicitAttributes */ ||\n srcMarker === 2 /* Styles */) {\n // Case where we have to consume `key1` and `value` only.\n mergeHostAttribute(dst, srcMarker, item, null, src[++i]);\n }\n else {\n // Case where we have to consume `key1` only.\n mergeHostAttribute(dst, srcMarker, item, null, null);\n }\n }\n }\n }\n return dst;\n}", "title": "" }, { "docid": "e02fb336ebed59309da386d4ead7e220", "score": "0.6207485", "text": "function copyIfExisty (src, trgt) {\n\t\teach(src, function (attr, key) {\n\t\t\tif ( isObject(attr) && isObject(trgt[key]) ) {\n\t\t\t\tcopyIfExisty(attr, trgt[key]);\n\t\t\t} else if (trgt[key] != null && !isObject(src[key])) {\n\t\t\t\tsrc[key] = trgt[key];\n\t\t\t}\n\t\t});\n\t}", "title": "" }, { "docid": "b788bb5af571bb7641ec802bcc4bc26e", "score": "0.6045187", "text": "function copyIfExisty(src, trgt) {\r\n each(src, function(attr, key) {\r\n if (isObject(attr) && isObject(trgt[key])) {\r\n copyIfExisty(attr, trgt[key]);\r\n } else if (trgt[key] != null && !isObject(src[key])) {\r\n src[key] = trgt[key];\r\n }\r\n });\r\n }", "title": "" }, { "docid": "00717e0f5b2404c784dcc29956e95c23", "score": "0.5979884", "text": "function copyAttributes(source, destination, extraAttrs) {\n var copiedAttrs = $mdUtil.prefixer([\n 'ng-if', 'ng-click', 'ng-dblclick', 'aria-label', 'ng-disabled', 'ui-sref',\n 'href', 'ng-href', 'target', 'ng-attr-ui-sref', 'ui-sref-opts'\n ]);\n\n if (extraAttrs) {\n copiedAttrs = copiedAttrs.concat($mdUtil.prefixer(extraAttrs));\n }\n\n angular.forEach(copiedAttrs, function(attr) {\n if (source.hasAttribute(attr)) {\n destination.setAttribute(attr, source.getAttribute(attr));\n source.removeAttribute(attr);\n }\n });\n }", "title": "" }, { "docid": "a0f877576e60b1ecc307b9c93513dfe7", "score": "0.59568566", "text": "function copyAttributes(source, destination, extraAttrs) {\n var copiedAttrs = $mdUtil.prefixer([\n 'ng-if', 'ng-click', 'ng-dblclick', 'aria-label', 'ng-disabled', 'ui-sref',\n 'href', 'ng-href', 'rel', 'target', 'ng-attr-ui-sref', 'ui-sref-opts', 'download'\n ]);\n\n if (extraAttrs) {\n copiedAttrs = copiedAttrs.concat($mdUtil.prefixer(extraAttrs));\n }\n\n angular.forEach(copiedAttrs, function(attr) {\n if (source.hasAttribute(attr)) {\n destination.setAttribute(attr, source.getAttribute(attr));\n source.removeAttribute(attr);\n }\n });\n }", "title": "" }, { "docid": "ba7a602e6fe7b1f1d36a24a97c3605ad", "score": "0.5861967", "text": "function copyAttributes(source, destination, extraAttrs) {\n\t var copiedAttrs = $mdUtil.prefixer([\n\t 'ng-if', 'ng-click', 'ng-dblclick', 'aria-label', 'ng-disabled', 'ui-sref',\n\t 'href', 'ng-href', 'target', 'ng-attr-ui-sref', 'ui-sref-opts'\n\t ]);\n\t\n\t if (extraAttrs) {\n\t copiedAttrs = copiedAttrs.concat($mdUtil.prefixer(extraAttrs));\n\t }\n\t\n\t angular.forEach(copiedAttrs, function(attr) {\n\t if (source.hasAttribute(attr)) {\n\t destination.setAttribute(attr, source.getAttribute(attr));\n\t source.removeAttribute(attr);\n\t }\n\t });\n\t }", "title": "" }, { "docid": "952b9ba61d1644138c283d63e9c9db8d", "score": "0.5732076", "text": "function copyAttributes(source, target) {\r\n _Array__WEBPACK_IMPORTED_MODULE_5__[\"each\"](source.attributes, function (attr) {\r\n // TODO what if it's null ?\r\n if (attr.value != null) {\r\n target.setAttribute(attr.name, attr.value);\r\n }\r\n });\r\n}", "title": "" }, { "docid": "4c71f8503a28f6505cebd4f3394fe2df", "score": "0.5479211", "text": "function merge(dst) {\n var objs = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n objs[_i - 1] = arguments[_i];\n }\n forEach(objs, function (obj) {\n forEach(obj, function (value, key) {\n if (!dst.hasOwnProperty(key))\n dst[key] = value;\n });\n });\n return dst;\n}", "title": "" }, { "docid": "07f528d7d0a9c0c163c76fb19daf2084", "score": "0.5455341", "text": "function merge(dst, src) {\n const keys = Object.keys(src);\n for (let i = 0; i < keys.length; ++i) {\n const key = keys[i];\n if (typeOf(dst[key]) === 'object' && typeOf(src[key]) === 'object') {\n Vue.set(dst, key, merge(dst[key], src[key]));\n } else {\n Vue.set(dst, key, src[key]);\n }\n }\n return dst;\n}", "title": "" }, { "docid": "e97e15b74af63d754a7ea01a35997499", "score": "0.53759205", "text": "function merge_attributes(obj1,obj2){\n var obj3 = {};\n for (var attrname in obj1) { obj3[attrname] = obj1[attrname]; }\n for (var attrname in obj2) { obj3[attrname] = obj2[attrname]; }\n return obj3;\n}", "title": "" }, { "docid": "9c8a6afc5d4dddaa48ca5c11109e5518", "score": "0.53552306", "text": "function mergeAttributes(attrList,attrName) {\n if (attrList.length < 2) return attrList;\n\n var toMerge = [];\n var indices = [];\n\n for (var i=0; i<attrList.length; i++) {\n if (attrList[i].name.value === attrName) {\n toMerge.push(attrList[i]);\n indices.push(i);\n }\n }\n\n if (toMerge.length == 0) return attrList;\n\n var newAttrVal = \"\";\n for (var i=0; i<toMerge.length; i++) {\n newAttrVal += toMerge[i].value.value + \" \";\n }\n newAttrVal = newAttrVal.trim();\n toMerge[0].value.value = newAttrVal;\n\n for (var i=1; i<toMerge.length; i++) {\n attrList.splice(indices[i],1);\n }\n\n return attrList;\n}", "title": "" }, { "docid": "ded7c4d7bb96cbb793e8acda35df31a5", "score": "0.5323762", "text": "function combineObjectsAndAddAttribute(obj1,obj2) {}", "title": "" }, { "docid": "6866230f9816da1f6997f2f64ce37ebd", "score": "0.52937007", "text": "resetAttributes(...excludeAttributes) {\n for (let attribute in this.originalAttributes) {\n if (excludeAttributes.includes(attribute)) continue;\n this.originalElement.setAttribute(attribute, this.originalAttributes[attribute]);\n }\n }", "title": "" }, { "docid": "b923007f5784023d4f5133e66376fe60", "score": "0.5249041", "text": "function mergeConfigs(dst, src) {\n _.forEach(src || {}, function (value, key) {\n\n // if destination exists & already has `~override` flag, keep it intact\n if (_.isObject(dst[key]) && dst[key]['~override']) {\n return;\n }\n\n // if source has `~override` flag - override whole value in destination\n if (value && value['~override']) {\n dst[key] = value;\n return;\n }\n\n // if both nodes are objects - merge recursively\n if (_.isObject(value) && _.isObject(dst[key])) {\n mergeConfigs(dst[key], value);\n return;\n }\n\n // destination node does not exist - create\n // or both nodes are of different types - override.\n dst[key] = value;\n return;\n });\n\n return dst;\n}", "title": "" }, { "docid": "ab311ba1bc49617794d8bbfca7fb75fa", "score": "0.5231344", "text": "function extend(dst, src) {\n\tObject.keys(src).forEach(function (p) {\n\t\tdst[p] = src[p];\n\t});\n}", "title": "" }, { "docid": "ff3a59495fe6722aecc30297b42ef037", "score": "0.52283657", "text": "function mergeHostAttribute(dst, marker, key1, key2, value) {\n let i = 0;\n // Assume that new markers will be inserted at the end.\n let markerInsertPosition = dst.length;\n // scan until correct type.\n if (marker === -1 /* AttributeMarker.ImplicitAttributes */) {\n markerInsertPosition = -1;\n } else {\n while (i < dst.length) {\n const dstValue = dst[i++];\n if (typeof dstValue === 'number') {\n if (dstValue === marker) {\n markerInsertPosition = -1;\n break;\n } else if (dstValue > marker) {\n // We need to save this as we want the markers to be inserted in specific order.\n markerInsertPosition = i - 1;\n break;\n }\n }\n }\n }\n // search until you find place of insertion\n while (i < dst.length) {\n const item = dst[i];\n if (typeof item === 'number') {\n // since `i` started as the index after the marker, we did not find it if we are at the next\n // marker\n break;\n } else if (item === key1) {\n // We already have same token\n if (key2 === null) {\n if (value !== null) {\n dst[i + 1] = value;\n }\n return;\n } else if (key2 === dst[i + 1]) {\n dst[i + 2] = value;\n return;\n }\n }\n // Increment counter.\n i++;\n if (key2 !== null) i++;\n if (value !== null) i++;\n }\n // insert at location.\n if (markerInsertPosition !== -1) {\n dst.splice(markerInsertPosition, 0, marker);\n i = markerInsertPosition + 1;\n }\n dst.splice(i++, 0, key1);\n if (key2 !== null) {\n dst.splice(i++, 0, key2);\n }\n if (value !== null) {\n dst.splice(i++, 0, value);\n }\n}", "title": "" }, { "docid": "7ccd6cdba843b7f6362a96351b5e2ab6", "score": "0.5226816", "text": "function extend(dst, source) {\n\t\tfor (var o in source) {\n\t\t\tif (hasOwn.call(source,o)) {\n\t\t\t\tdst[o] = source[o];\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "7493867dcdb9ac9f5b3385dd0fb79d83", "score": "0.5225584", "text": "function mergeHostAttribute(dst, marker, key1, key2, value) {\n let i = 0; // Assume that new markers will be inserted at the end.\n\n let markerInsertPosition = dst.length; // scan until correct type.\n\n if (marker === -1\n /* ImplicitAttributes */\n ) {\n markerInsertPosition = -1;\n } else {\n while (i < dst.length) {\n const dstValue = dst[i++];\n\n if (typeof dstValue === 'number') {\n if (dstValue === marker) {\n markerInsertPosition = -1;\n break;\n } else if (dstValue > marker) {\n // We need to save this as we want the markers to be inserted in specific order.\n markerInsertPosition = i - 1;\n break;\n }\n }\n }\n } // search until you find place of insertion\n\n\n while (i < dst.length) {\n const item = dst[i];\n\n if (typeof item === 'number') {\n // since `i` started as the index after the marker, we did not find it if we are at the next\n // marker\n break;\n } else if (item === key1) {\n // We already have same token\n if (key2 === null) {\n if (value !== null) {\n dst[i + 1] = value;\n }\n\n return;\n } else if (key2 === dst[i + 1]) {\n dst[i + 2] = value;\n return;\n }\n } // Increment counter.\n\n\n i++;\n if (key2 !== null) i++;\n if (value !== null) i++;\n } // insert at location.\n\n\n if (markerInsertPosition !== -1) {\n dst.splice(markerInsertPosition, 0, marker);\n i = markerInsertPosition + 1;\n }\n\n dst.splice(i++, 0, key1);\n\n if (key2 !== null) {\n dst.splice(i++, 0, key2);\n }\n\n if (value !== null) {\n dst.splice(i++, 0, value);\n }\n}", "title": "" }, { "docid": "f4412d38fbbf1759d4ef395ef6a0b65b", "score": "0.51922816", "text": "function mergeHostAttribute(dst, marker, key1, key2, value) {\n var i = 0; // Assume that new markers will be inserted at the end.\n\n var markerInsertPosition = dst.length; // scan until correct type.\n\n if (marker === -1\n /* ImplicitAttributes */\n ) {\n markerInsertPosition = -1;\n } else {\n while (i < dst.length) {\n var dstValue = dst[i++];\n\n if (typeof dstValue === 'number') {\n if (dstValue === marker) {\n markerInsertPosition = -1;\n break;\n } else if (dstValue > marker) {\n // We need to save this as we want the markers to be inserted in specific order.\n markerInsertPosition = i - 1;\n break;\n }\n }\n }\n } // search until you find place of insertion\n\n\n while (i < dst.length) {\n var item = dst[i];\n\n if (typeof item === 'number') {\n // since `i` started as the index after the marker, we did not find it if we are at the next\n // marker\n break;\n } else if (item === key1) {\n // We already have same token\n if (key2 === null) {\n if (value !== null) {\n dst[i + 1] = value;\n }\n\n return;\n } else if (key2 === dst[i + 1]) {\n dst[i + 2] = value;\n return;\n }\n } // Increment counter.\n\n\n i++;\n if (key2 !== null) i++;\n if (value !== null) i++;\n } // insert at location.\n\n\n if (markerInsertPosition !== -1) {\n dst.splice(markerInsertPosition, 0, marker);\n i = markerInsertPosition + 1;\n }\n\n dst.splice(i++, 0, key1);\n\n if (key2 !== null) {\n dst.splice(i++, 0, key2);\n }\n\n if (value !== null) {\n dst.splice(i++, 0, value);\n }\n }", "title": "" }, { "docid": "f4412d38fbbf1759d4ef395ef6a0b65b", "score": "0.51922816", "text": "function mergeHostAttribute(dst, marker, key1, key2, value) {\n var i = 0; // Assume that new markers will be inserted at the end.\n\n var markerInsertPosition = dst.length; // scan until correct type.\n\n if (marker === -1\n /* ImplicitAttributes */\n ) {\n markerInsertPosition = -1;\n } else {\n while (i < dst.length) {\n var dstValue = dst[i++];\n\n if (typeof dstValue === 'number') {\n if (dstValue === marker) {\n markerInsertPosition = -1;\n break;\n } else if (dstValue > marker) {\n // We need to save this as we want the markers to be inserted in specific order.\n markerInsertPosition = i - 1;\n break;\n }\n }\n }\n } // search until you find place of insertion\n\n\n while (i < dst.length) {\n var item = dst[i];\n\n if (typeof item === 'number') {\n // since `i` started as the index after the marker, we did not find it if we are at the next\n // marker\n break;\n } else if (item === key1) {\n // We already have same token\n if (key2 === null) {\n if (value !== null) {\n dst[i + 1] = value;\n }\n\n return;\n } else if (key2 === dst[i + 1]) {\n dst[i + 2] = value;\n return;\n }\n } // Increment counter.\n\n\n i++;\n if (key2 !== null) i++;\n if (value !== null) i++;\n } // insert at location.\n\n\n if (markerInsertPosition !== -1) {\n dst.splice(markerInsertPosition, 0, marker);\n i = markerInsertPosition + 1;\n }\n\n dst.splice(i++, 0, key1);\n\n if (key2 !== null) {\n dst.splice(i++, 0, key2);\n }\n\n if (value !== null) {\n dst.splice(i++, 0, value);\n }\n }", "title": "" }, { "docid": "ea72afd4211ae189791f731a9ee93502", "score": "0.51768285", "text": "function mergePair(dest, src) {\n for (var key in src) {\n dest[key] = [].concat(dest[key] || [], src[key]);\n }\n}", "title": "" }, { "docid": "3e641df7782dcc0430ef8a047e873585", "score": "0.51750684", "text": "function extend(dst, src) {\n var k;\n for (k in src) {\n if (src.hasOwnProperty(k)) {\n dst[k] = src[k];\n }\n }\n return dst;\n}", "title": "" }, { "docid": "c725da580965ff377e7e6c9ca6151eed", "score": "0.5120743", "text": "function merge(e,a,i){if(!e)throw new TypeError(\"argument dest is required\");if(!a)throw new TypeError(\"argument src is required\");return void 0===i&&(i=!0),Object.getOwnPropertyNames(a).forEach((function(n){if(i||!hasOwnProperty$1.call(e,n)){var t=Object.getOwnPropertyDescriptor(a,n);Object.defineProperty(e,n,t)}})),e}", "title": "" }, { "docid": "6c032938989156d4cc80385afd3acbd6", "score": "0.5111097", "text": "function mergeHostAttribute(dst, marker, key1, key2, value) {\n var i = 0;\n // Assume that new markers will be inserted at the end.\n var markerInsertPosition = dst.length;\n // scan until correct type.\n if (marker === -1 /* ImplicitAttributes */) {\n markerInsertPosition = -1;\n }\n else {\n while (i < dst.length) {\n var dstValue = dst[i++];\n if (typeof dstValue === 'number') {\n if (dstValue === marker) {\n markerInsertPosition = -1;\n break;\n }\n else if (dstValue > marker) {\n // We need to save this as we want the markers to be inserted in specific order.\n markerInsertPosition = i - 1;\n break;\n }\n }\n }\n }\n // search until you find place of insertion\n while (i < dst.length) {\n var item = dst[i];\n if (typeof item === 'number') {\n // since `i` started as the index after the marker, we did not find it if we are at the next\n // marker\n break;\n }\n else if (item === key1) {\n // We already have same token\n if (key2 === null) {\n if (value !== null) {\n dst[i + 1] = value;\n }\n return;\n }\n else if (key2 === dst[i + 1]) {\n dst[i + 2] = value;\n return;\n }\n }\n // Increment counter.\n i++;\n if (key2 !== null)\n i++;\n if (value !== null)\n i++;\n }\n // insert at location.\n if (markerInsertPosition !== -1) {\n dst.splice(markerInsertPosition, 0, marker);\n i = markerInsertPosition + 1;\n }\n dst.splice(i++, 0, key1);\n if (key2 !== null) {\n dst.splice(i++, 0, key2);\n }\n if (value !== null) {\n dst.splice(i++, 0, value);\n }\n}", "title": "" }, { "docid": "f27213111a75951df654c59c4ead94e9", "score": "0.5100062", "text": "function copyProps (src, dst) {\n\t\t for (var key in src) {\n\t\t dst[key] = src[key]\n\t\t }\n\t\t}", "title": "" }, { "docid": "fee6d93f0259d81b4cffe5b1d6980a23", "score": "0.5084306", "text": "function mergeHostAttribute(dst, marker, key1, key2, value) {\n let i = 0;\n // Assume that new markers will be inserted at the end.\n let markerInsertPosition = dst.length;\n // scan until correct type.\n if (marker === -1 /* ImplicitAttributes */) {\n markerInsertPosition = -1;\n }\n else {\n while (i < dst.length) {\n const dstValue = dst[i++];\n if (typeof dstValue === 'number') {\n if (dstValue === marker) {\n markerInsertPosition = -1;\n break;\n }\n else if (dstValue > marker) {\n // We need to save this as we want the markers to be inserted in specific order.\n markerInsertPosition = i - 1;\n break;\n }\n }\n }\n }\n // search until you find place of insertion\n while (i < dst.length) {\n const item = dst[i];\n if (typeof item === 'number') {\n // since `i` started as the index after the marker, we did not find it if we are at the next\n // marker\n break;\n }\n else if (item === key1) {\n // We already have same token\n if (key2 === null) {\n if (value !== null) {\n dst[i + 1] = value;\n }\n return;\n }\n else if (key2 === dst[i + 1]) {\n dst[i + 2] = value;\n return;\n }\n }\n // Increment counter.\n i++;\n if (key2 !== null)\n i++;\n if (value !== null)\n i++;\n }\n // insert at location.\n if (markerInsertPosition !== -1) {\n dst.splice(markerInsertPosition, 0, marker);\n i = markerInsertPosition + 1;\n }\n dst.splice(i++, 0, key1);\n if (key2 !== null) {\n dst.splice(i++, 0, key2);\n }\n if (value !== null) {\n dst.splice(i++, 0, value);\n }\n}", "title": "" }, { "docid": "fee6d93f0259d81b4cffe5b1d6980a23", "score": "0.5084306", "text": "function mergeHostAttribute(dst, marker, key1, key2, value) {\n let i = 0;\n // Assume that new markers will be inserted at the end.\n let markerInsertPosition = dst.length;\n // scan until correct type.\n if (marker === -1 /* ImplicitAttributes */) {\n markerInsertPosition = -1;\n }\n else {\n while (i < dst.length) {\n const dstValue = dst[i++];\n if (typeof dstValue === 'number') {\n if (dstValue === marker) {\n markerInsertPosition = -1;\n break;\n }\n else if (dstValue > marker) {\n // We need to save this as we want the markers to be inserted in specific order.\n markerInsertPosition = i - 1;\n break;\n }\n }\n }\n }\n // search until you find place of insertion\n while (i < dst.length) {\n const item = dst[i];\n if (typeof item === 'number') {\n // since `i` started as the index after the marker, we did not find it if we are at the next\n // marker\n break;\n }\n else if (item === key1) {\n // We already have same token\n if (key2 === null) {\n if (value !== null) {\n dst[i + 1] = value;\n }\n return;\n }\n else if (key2 === dst[i + 1]) {\n dst[i + 2] = value;\n return;\n }\n }\n // Increment counter.\n i++;\n if (key2 !== null)\n i++;\n if (value !== null)\n i++;\n }\n // insert at location.\n if (markerInsertPosition !== -1) {\n dst.splice(markerInsertPosition, 0, marker);\n i = markerInsertPosition + 1;\n }\n dst.splice(i++, 0, key1);\n if (key2 !== null) {\n dst.splice(i++, 0, key2);\n }\n if (value !== null) {\n dst.splice(i++, 0, value);\n }\n}", "title": "" }, { "docid": "90ee317b8ed17c7bcd9fc35eca7cce74", "score": "0.5076121", "text": "function copyProps(src, dst) {\n for (var key in src) {\n dst[key] = src[key];\n }\n }", "title": "" }, { "docid": "90ee317b8ed17c7bcd9fc35eca7cce74", "score": "0.5076121", "text": "function copyProps(src, dst) {\n for (var key in src) {\n dst[key] = src[key];\n }\n }", "title": "" }, { "docid": "e0025f5d1cdc17da7e8fe2e337b2bb88", "score": "0.50701976", "text": "function copyProps(src, dst) {\n for (var key in src) {\n dst[key] = src[key];\n }\n }", "title": "" }, { "docid": "1354378a03a55f8b7fa0340e85855cea", "score": "0.5065586", "text": "function copyProps(src, dst) {\n for (var key in src) {\n dst[key] = src[key];\n }\n }", "title": "" }, { "docid": "e975dcebc0b9910e1ea289b959cdc889", "score": "0.5060082", "text": "function copyProps (src, dst) {\n\t\t\t for (var key in src) {\n\t\t\t dst[key] = src[key]\n\t\t\t }\n\t\t\t}", "title": "" }, { "docid": "38aa945b3da100f0a4febac544631a5c", "score": "0.50559586", "text": "function copyProps(src, dst) {\n for (var key in src) {\n dst[key] = src[key];\n }\n }", "title": "" }, { "docid": "38aa945b3da100f0a4febac544631a5c", "score": "0.50559586", "text": "function copyProps(src, dst) {\n for (var key in src) {\n dst[key] = src[key];\n }\n }", "title": "" }, { "docid": "38aa945b3da100f0a4febac544631a5c", "score": "0.50559586", "text": "function copyProps(src, dst) {\n for (var key in src) {\n dst[key] = src[key];\n }\n }", "title": "" }, { "docid": "691444a101319cebfb03c3b7a9a9f55c", "score": "0.504441", "text": "function diffAttributes (prev, next, el, entityId, path) {\n\t var nextAttrs = next.attributes\n\t var prevAttrs = prev.attributes\n\n\t // add new attrs\n\t forEach(nextAttrs, function (value, name) {\n\t if (events[name] || !(name in prevAttrs) || prevAttrs[name] !== value) {\n\t setAttribute(entityId, path, el, name, value)\n\t }\n\t })\n\n\t // remove old attrs\n\t forEach(prevAttrs, function (value, name) {\n\t if (!(name in nextAttrs)) {\n\t removeAttribute(entityId, path, el, name)\n\t }\n\t })\n\t }", "title": "" }, { "docid": "61ef93388f6f6162970d3b93ce6ef06d", "score": "0.5012994", "text": "function merge_attr(obj1,obj2){\n var obj3 = {};\n for (var attrname in obj1) {\n if (obj3[attrname] === undefined) obj3[attrname] = {};\n for (var attrVal in obj1[attrname]) {\n obj3[attrname][attrVal] = obj1[attrname][attrVal] || obj3[attrname][attrVal];\n }\n }\n for (var attrname in obj2) {\n if (obj3[attrname] === undefined) obj3[attrname] = {};\n for (var attrVal in obj2[attrname]) {\n obj3[attrname][attrVal] = obj2[attrname][attrVal] || obj3[attrname][attrVal];\n }\n }\n return obj3;\n}", "title": "" }, { "docid": "2c5b15b2a5a781ae74bb751b543ca360", "score": "0.5008313", "text": "function populate(dst, src) {\n for (var prop in src) {\n if (!dst[prop]) dst[prop] = src[prop];\n }\n return dst;\n }", "title": "" }, { "docid": "d6ec11bc20032c5129489e8e91d734a3", "score": "0.50078005", "text": "function copyProps (src, dst) {\n\t for (var key in src) {\n\t dst[key] = src[key];\n\t }\n\t}", "title": "" }, { "docid": "d6ec11bc20032c5129489e8e91d734a3", "score": "0.50078005", "text": "function copyProps (src, dst) {\n\t for (var key in src) {\n\t dst[key] = src[key];\n\t }\n\t}", "title": "" }, { "docid": "3426bbaf6bf074d1c04f3234f20cd06f", "score": "0.5002699", "text": "function copyProps (src, dst) {\n\t for (var key in src) {\n\t dst[key] = src[key]\n\t }\n\t}", "title": "" }, { "docid": "3426bbaf6bf074d1c04f3234f20cd06f", "score": "0.5002699", "text": "function copyProps (src, dst) {\n\t for (var key in src) {\n\t dst[key] = src[key]\n\t }\n\t}", "title": "" }, { "docid": "3426bbaf6bf074d1c04f3234f20cd06f", "score": "0.5002699", "text": "function copyProps (src, dst) {\n\t for (var key in src) {\n\t dst[key] = src[key]\n\t }\n\t}", "title": "" }, { "docid": "3426bbaf6bf074d1c04f3234f20cd06f", "score": "0.5002699", "text": "function copyProps (src, dst) {\n\t for (var key in src) {\n\t dst[key] = src[key]\n\t }\n\t}", "title": "" }, { "docid": "3426bbaf6bf074d1c04f3234f20cd06f", "score": "0.5002699", "text": "function copyProps (src, dst) {\n\t for (var key in src) {\n\t dst[key] = src[key]\n\t }\n\t}", "title": "" }, { "docid": "3426bbaf6bf074d1c04f3234f20cd06f", "score": "0.5002699", "text": "function copyProps (src, dst) {\n\t for (var key in src) {\n\t dst[key] = src[key]\n\t }\n\t}", "title": "" }, { "docid": "094d4fb66787d1d14828a7a622ad380e", "score": "0.49738413", "text": "function extend(dst /* , ...src */) {\n if (!dst) {\n dst = {};\n }\n var src = Array.prototype.slice.call(arguments, 1);\n for (var i = 0, len = src.length; i < len; i++) {\n var o = src[i];\n if (o) {\n var l = Object.keys(o);\n for (var i = 0, len = l.length; i < len; i++) {\n var k = l[i];\n dst[k] = o[k];\n }\n }\n }\n return dst;\n}", "title": "" }, { "docid": "72788da401ee8c4a4bada26003b5a237", "score": "0.49670875", "text": "function extendThese(dst, src, properties) {\n\tfor (var i = 0, l = properties.length, prop; prop = properties[i], i < l; i++) {\n\t\tdst[prop] = src[prop];\n\t}\n\treturn dst;\n}", "title": "" }, { "docid": "21ed14bb3554d024cb16cbd1da3eb39d", "score": "0.49655366", "text": "function _applyAttributes(target) {\n\t for (var n in this.attributes) {\n\t target.setAttribute(n, this.attributes[n]);\n\t }\n\t }", "title": "" }, { "docid": "386aa3c4c811be454cc4e5fbb88ac67a", "score": "0.49641022", "text": "function merge(dst) {\n\t var objs = [];\n\t for (var _i = 1; _i < arguments.length; _i++) {\n\t objs[_i - 1] = arguments[_i];\n\t }\n\t exports.forEach(objs, function (obj) {\n\t exports.forEach(obj, function (value, key) {\n\t if (!dst.hasOwnProperty(key))\n\t dst[key] = value;\n\t });\n\t });\n\t return dst;\n\t}", "title": "" }, { "docid": "db1b8282f03adb3555304d2a68be8313", "score": "0.49557713", "text": "function mergeDeep(dest, ...src) {\n for (const s of src) {\n deepMerge_(dest, s !== null && s !== void 0 ? s : {});\n }\n\n return dest;\n }", "title": "" }, { "docid": "72fe443bddc2be49a2daab8633cac8e5", "score": "0.49544096", "text": "function merge(obj1, obj2) {\n\t\tfor (var attrname in obj2) { obj1[attrname] = obj2[attrname]; }\n\t\treturn obj1;\n\t}", "title": "" }, { "docid": "ea6b8c62a96ee79df99203578cef960b", "score": "0.49326608", "text": "function minimalCopy(src, dst) {\n dst.className = src.className;\n for (let s = src.firstChild, d = dst.firstChild, sNext, dNext;\n s && d;\n s = sNext, d = dNext) {\n sNext = s.nextSibling;\n dNext = d.nextSibling;\n // First, sync up the class names.\n d.className = s.className = s.className;\n // Only replace the whole node if something changes.\n // That way, we avoid stomping on the user's selected text.\n if (!d.isEqualNode(s)) {\n dst.replaceChild(s, d);\n }\n }\n}", "title": "" }, { "docid": "ad81352683a8ad6130908b071a02aa32", "score": "0.4924255", "text": "function populate(dst, src) {\n\t for (var prop in src) {\n\t if (!dst[prop]) dst[prop] = src[prop];\n\t }\n\t return dst;\n\t}", "title": "" }, { "docid": "d3bd3f5c2b2837e051dc4af17872b3a2", "score": "0.4915818", "text": "function copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key];\n }\n}", "title": "" }, { "docid": "d3bd3f5c2b2837e051dc4af17872b3a2", "score": "0.4915818", "text": "function copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key];\n }\n}", "title": "" }, { "docid": "d3bd3f5c2b2837e051dc4af17872b3a2", "score": "0.4915818", "text": "function copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key];\n }\n}", "title": "" }, { "docid": "d3bd3f5c2b2837e051dc4af17872b3a2", "score": "0.4915818", "text": "function copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key];\n }\n}", "title": "" }, { "docid": "d3bd3f5c2b2837e051dc4af17872b3a2", "score": "0.4915818", "text": "function copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key];\n }\n}", "title": "" }, { "docid": "d3bd3f5c2b2837e051dc4af17872b3a2", "score": "0.4915818", "text": "function copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key];\n }\n}", "title": "" }, { "docid": "d3bd3f5c2b2837e051dc4af17872b3a2", "score": "0.4915818", "text": "function copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key];\n }\n}", "title": "" }, { "docid": "6b33ca73a685f0dba977347820f17dbb", "score": "0.49032918", "text": "function copyProps(src, dst) {\n for (var key in src) {\n dst[key] = src[key];\n }\n}", "title": "" }, { "docid": "6b33ca73a685f0dba977347820f17dbb", "score": "0.49032918", "text": "function copyProps(src, dst) {\n for (var key in src) {\n dst[key] = src[key];\n }\n}", "title": "" }, { "docid": "6b33ca73a685f0dba977347820f17dbb", "score": "0.49032918", "text": "function copyProps(src, dst) {\n for (var key in src) {\n dst[key] = src[key];\n }\n}", "title": "" }, { "docid": "6b33ca73a685f0dba977347820f17dbb", "score": "0.49032918", "text": "function copyProps(src, dst) {\n for (var key in src) {\n dst[key] = src[key];\n }\n}", "title": "" }, { "docid": "6b33ca73a685f0dba977347820f17dbb", "score": "0.49032918", "text": "function copyProps(src, dst) {\n for (var key in src) {\n dst[key] = src[key];\n }\n}", "title": "" }, { "docid": "6b33ca73a685f0dba977347820f17dbb", "score": "0.49032918", "text": "function copyProps(src, dst) {\n for (var key in src) {\n dst[key] = src[key];\n }\n}", "title": "" }, { "docid": "6b33ca73a685f0dba977347820f17dbb", "score": "0.49032918", "text": "function copyProps(src, dst) {\n for (var key in src) {\n dst[key] = src[key];\n }\n}", "title": "" }, { "docid": "6b33ca73a685f0dba977347820f17dbb", "score": "0.49032918", "text": "function copyProps(src, dst) {\n for (var key in src) {\n dst[key] = src[key];\n }\n}", "title": "" }, { "docid": "6b33ca73a685f0dba977347820f17dbb", "score": "0.49032918", "text": "function copyProps(src, dst) {\n for (var key in src) {\n dst[key] = src[key];\n }\n}", "title": "" }, { "docid": "6b33ca73a685f0dba977347820f17dbb", "score": "0.49032918", "text": "function copyProps(src, dst) {\n for (var key in src) {\n dst[key] = src[key];\n }\n}", "title": "" }, { "docid": "6b33ca73a685f0dba977347820f17dbb", "score": "0.49032918", "text": "function copyProps(src, dst) {\n for (var key in src) {\n dst[key] = src[key];\n }\n}", "title": "" }, { "docid": "6b33ca73a685f0dba977347820f17dbb", "score": "0.49032918", "text": "function copyProps(src, dst) {\n for (var key in src) {\n dst[key] = src[key];\n }\n}", "title": "" }, { "docid": "6b33ca73a685f0dba977347820f17dbb", "score": "0.49032918", "text": "function copyProps(src, dst) {\n for (var key in src) {\n dst[key] = src[key];\n }\n}", "title": "" }, { "docid": "6b33ca73a685f0dba977347820f17dbb", "score": "0.49032918", "text": "function copyProps(src, dst) {\n for (var key in src) {\n dst[key] = src[key];\n }\n}", "title": "" }, { "docid": "6b33ca73a685f0dba977347820f17dbb", "score": "0.49032918", "text": "function copyProps(src, dst) {\n for (var key in src) {\n dst[key] = src[key];\n }\n}", "title": "" }, { "docid": "6b33ca73a685f0dba977347820f17dbb", "score": "0.49032918", "text": "function copyProps(src, dst) {\n for (var key in src) {\n dst[key] = src[key];\n }\n}", "title": "" }, { "docid": "6b33ca73a685f0dba977347820f17dbb", "score": "0.49032918", "text": "function copyProps(src, dst) {\n for (var key in src) {\n dst[key] = src[key];\n }\n}", "title": "" }, { "docid": "a6496c10c3ae6f25bd369aae5687b8f3", "score": "0.48988676", "text": "function copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}", "title": "" }, { "docid": "a6496c10c3ae6f25bd369aae5687b8f3", "score": "0.48988676", "text": "function copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}", "title": "" }, { "docid": "a6496c10c3ae6f25bd369aae5687b8f3", "score": "0.48988676", "text": "function copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}", "title": "" }, { "docid": "a6496c10c3ae6f25bd369aae5687b8f3", "score": "0.48988676", "text": "function copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}", "title": "" }, { "docid": "a6496c10c3ae6f25bd369aae5687b8f3", "score": "0.48988676", "text": "function copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}", "title": "" }, { "docid": "a6496c10c3ae6f25bd369aae5687b8f3", "score": "0.48988676", "text": "function copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}", "title": "" }, { "docid": "a6496c10c3ae6f25bd369aae5687b8f3", "score": "0.48988676", "text": "function copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}", "title": "" }, { "docid": "a6496c10c3ae6f25bd369aae5687b8f3", "score": "0.48988676", "text": "function copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}", "title": "" }, { "docid": "a6496c10c3ae6f25bd369aae5687b8f3", "score": "0.48988676", "text": "function copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}", "title": "" }, { "docid": "a6496c10c3ae6f25bd369aae5687b8f3", "score": "0.48988676", "text": "function copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}", "title": "" }, { "docid": "a6496c10c3ae6f25bd369aae5687b8f3", "score": "0.48988676", "text": "function copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}", "title": "" }, { "docid": "a6496c10c3ae6f25bd369aae5687b8f3", "score": "0.48988676", "text": "function copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}", "title": "" }, { "docid": "a6496c10c3ae6f25bd369aae5687b8f3", "score": "0.48988676", "text": "function copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}", "title": "" }, { "docid": "a6496c10c3ae6f25bd369aae5687b8f3", "score": "0.48988676", "text": "function copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}", "title": "" }, { "docid": "a6496c10c3ae6f25bd369aae5687b8f3", "score": "0.48988676", "text": "function copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}", "title": "" } ]
9123914e85fd1a5441af2da6a7e27089
Numbers should preserve their sign; i.e. a negative number should still be negative when reversed.
[ { "docid": "ee61f615360d795e21c494b942d603b5", "score": "0.7339734", "text": "function reverseNumber(n) {\n let num = parseFloat(n.toString().split('').reverse().join(''))\n //multiply the reversed with the positive or negative of the original number passed through the function to keep the sign\n return num *Math.sign(n)\n}", "title": "" } ]
[ { "docid": "e101edb90769a602109b9c915d72cba5", "score": "0.74190664", "text": "function reverseSign(num){\n return num * (-1);\n}", "title": "" }, { "docid": "7aaaf6d3950d5e821d3340f962b619d4", "score": "0.723753", "text": "function opposite(number) {\n return(-number);\n }", "title": "" }, { "docid": "f2cf254ad0eec91390a03ec222f7e3bc", "score": "0.7210455", "text": "function opposite(number) {\n return(-number);\n\n}", "title": "" }, { "docid": "3eaadfed261127b3f4439b2dc5fd63cd", "score": "0.7203123", "text": "function opposite(number) {\n return -number;\n}", "title": "" }, { "docid": "86bc4b45f0df1aef87bc5d8af3e1530b", "score": "0.71727324", "text": "function invertSign(number) {\n if(number > 0 || number < 0) {\n return number * -1\n } else\n return false\n }", "title": "" }, { "docid": "7c436a3ef60278a0bfd80526c4c07f17", "score": "0.7136846", "text": "function opposite(number) {\n return - number\n}", "title": "" }, { "docid": "65dd7f15ff11f2a7250a6c6f38d71beb", "score": "0.7100153", "text": "function invert_negatives(input) {\n if(input > 0) {\n return -input;\n }\n if(input < 0) {\n return input;\n }\n if(isNaN(input)) {\n return false;\n }\n}", "title": "" }, { "docid": "9053ce767114392d752a27f8136e586a", "score": "0.7072352", "text": "function makeNegative(num) {\n return Math.abs(num) * -1\n }", "title": "" }, { "docid": "10b7809f2ad02a1917a05e3b1bd43e6f", "score": "0.7036071", "text": "function opposite(number) {\n return number = -number;\n}", "title": "" }, { "docid": "23f166dc3e898d2cc4434e34c032bc06", "score": "0.70216304", "text": "function makeNegative(num) {\n if (num > 0) {\n num = -num;\n }\n return num\n }", "title": "" }, { "docid": "7cf8321b927dd3149025493ceb16f56f", "score": "0.692588", "text": "function opposite(number) {\n return number * -1\n}", "title": "" }, { "docid": "ec7156ad5e4966a0ec0cd6983825dd12", "score": "0.6879454", "text": "function makeNegative(num) {\n return 0-Math.abs(num);\n}", "title": "" }, { "docid": "9e50f151822e7fbf4c20d1851cdd4c2c", "score": "0.6844902", "text": "function reversedNum(n){\n const reversed = n.toString().split(\"\").reverse().join(\"\"); \n return Math.sign(n) * parseInt(reversed) \n}", "title": "" }, { "docid": "3ff89bb8d7314c76f9b3bf5a5b5ff28b", "score": "0.6816037", "text": "function negative(num) {\n return Math.abs(num) * -1;\n}", "title": "" }, { "docid": "1aaa7492ff7e201b01c8a3fb38af7524", "score": "0.6811165", "text": "function reverseSign() {\n if (numArray[0] === \"-\") {\n numArray.shift();\n } else {\n numArray.unshift(\"-\");\n }\n displayInput(numArray);\n}", "title": "" }, { "docid": "5086ead3f0b88d30eab9a31d4367e715", "score": "0.67793715", "text": "function negate(num) {\n const swapSign = num > 0 ? -1 : 1;\n let negatedNum = 0;\n let count = num;\n\n while (count !== 0) {\n negatedNum += swapSign;\n count += swapSign;\n }\n\n return negatedNum;\n}", "title": "" }, { "docid": "514bdd6b31dc368bf649678b0d96d457", "score": "0.6778326", "text": "function reverseNumber(n) {\n\t// make sure there is no negative number on n\n\tlet num = Math.abs(n);\n\t// convert the num to a string then an array then reverse then back to a string\n\tnum = num.toString().split('').reverse().join('');\n\t// then to a number again\n\tnum = Number.parseInt(num);\n\t// if the original number is negative\n\tif (n < 0) {\n\t\t// return -with reversenum\n\t\treturn -num;\n\t\t// otherwise\n\t} else {\n\t\t// return the reverse num\n\t\treturn num;\n\t}\n}", "title": "" }, { "docid": "26abcaf3a063a9d111426c38fdfafb9e", "score": "0.675972", "text": "function opposite(number) {\n //your code here\n return number * (-1);\n}", "title": "" }, { "docid": "9694abbc0b74c87d0d2f0cc6466b54f1", "score": "0.6755427", "text": "function opposite(number) {\n if (number > 0){\n return(-1 * number)\n }\n else if (number < 0) {\n return(number * -1)\n }\n else\n return 0\n }", "title": "" }, { "docid": "91d0fefea40129d79edd171c1e1571af", "score": "0.67527616", "text": "function Number(num) {\n console.log(num.reverse())\n\n}", "title": "" }, { "docid": "99f930c3049a1e0eb2ffbdaf625ab5e7", "score": "0.67312413", "text": "function sign(val){return val>=0?1:-1;}", "title": "" }, { "docid": "662e84c365dec5d7a484df74247e6b87", "score": "0.6692885", "text": "function NegativeToPositive(num){\r\n if(num <= -1){\r\n return (num * -1);\r\n }\r\n return num;\r\n }", "title": "" }, { "docid": "de07c0a9eaf75d5179dd8c597251ecaa", "score": "0.6660792", "text": "function invertNum(num)\n{\n\treturn num *= -1;\n}", "title": "" }, { "docid": "802fbbcac19e384363d7899f93e4ee66", "score": "0.6659125", "text": "function sign(x) { return x > 0 ? 1 : x < 0 ? -1 : 0; }", "title": "" }, { "docid": "fd0973d7f64ba30284f5b27aa6463bda", "score": "0.6652103", "text": "function negative(number) {\n return -Math.abs(number);\n}", "title": "" }, { "docid": "fa31e85df477d805428acedd11b4b005", "score": "0.6629367", "text": "function sign(x) { return x ? x < 0 ? -1 : 1 : 0; }", "title": "" }, { "docid": "fa31e85df477d805428acedd11b4b005", "score": "0.6629367", "text": "function sign(x) { return x ? x < 0 ? -1 : 1 : 0; }", "title": "" }, { "docid": "8072d3c5bc01eab2c0ad9ad57014ac01", "score": "0.6625848", "text": "function reverses(x) {\n var y, z = Math.abs(x), sum = [], flag = false, reverseRes = 0;\n if (z > Math.pow(2, 31) - 1)\n return reverseRes;\n for (var i = 0; i >= 0; i++) {\n y = z % 10;\n z = parseInt((z / 10).toString());\n if (z == 0) {\n sum.push(y);\n break;\n }\n if (y > 0) {\n flag = true;\n }\n if (flag) {\n sum.push(y);\n }\n else {\n continue;\n }\n }\n reverseRes = parseInt(sum.join(''));\n if (reverseRes > Math.pow(2, 31) - 1)\n return 0;\n if (x < 0)\n reverseRes = 0 - reverseRes;\n return reverseRes;\n}", "title": "" }, { "docid": "bd3f2897b29e75bf6fb038e986e242db", "score": "0.66191465", "text": "function abs(n){ return n < 0 ? -n : n; }", "title": "" }, { "docid": "9120664d58be642e7bd7c0f316861b28", "score": "0.66041255", "text": "function reverse(x) {\n let isNegative = false;\n\n if (x < 0) {\n isNegative = true;\n x = x * -1;\n }\n\n let reversed = 0;\n\n while (x > 0) {\n reversed = (reversed * 10) + (x % 10);\n x = Math.floor(x / 10);\n }\n\n if (reversed > (2 ** 31 - 1)) {\n return 0;\n }\n\n return isNegative ? (reversed * -1) : reversed;\n}", "title": "" }, { "docid": "608bd011c698d1b57af7ca1a25a6b428", "score": "0.6595285", "text": "function removeNegatives(arr) {\n\tfor (var i = arr.length - 1; i > 0; i--) {\n\t\tconsole.log(arr[i])\n\t\tif (arr[i] < 0) {\n\t\t\tarr[i] = arr[arr.length - 1];\n\t\t\tarr.length--;\n\t\t\ti++;\n\t\t}\n\t}\n\treturn arr;\n}", "title": "" }, { "docid": "088a76818ba2b1440fbd4b786f6f6522", "score": "0.6595093", "text": "function reverseInt(n){\n const reversed = n.toString().split(\"\").reverse().join(\"\");\n\n // Math.sign(if_negetive_no) then returns -1 \n // Math.sign(if_postive_no) then return +1\n return parseInt(reversed) * Math.sign(n);\n}", "title": "" }, { "docid": "bb9c78a0ca77e96015da501f9bce1d95", "score": "0.65848684", "text": "function reverseInt(num){\n return parseInt(num.toString().split('').reverse().join('')) * Math.sign(num);\n}", "title": "" }, { "docid": "d5e4c50d6d8a190edf3778760db332cf", "score": "0.6569784", "text": "function makeNegative(num) {\n if (num > 0) {\n return num * -1;\n }else {\n return num * 1\n }\n}", "title": "" }, { "docid": "cb9404e6befa473ae8e03764263ef2bb", "score": "0.6562022", "text": "function sign(x)\r\n{\r\n return (x > 0) - (x < 0);\r\n}", "title": "" }, { "docid": "6399a6a3448f842ecf46ebe3118ba44e", "score": "0.6557074", "text": "function\nats2jspre_neg_int0(x) { return ( -x ); }", "title": "" }, { "docid": "6399a6a3448f842ecf46ebe3118ba44e", "score": "0.6557074", "text": "function\nats2jspre_neg_int0(x) { return ( -x ); }", "title": "" }, { "docid": "6399a6a3448f842ecf46ebe3118ba44e", "score": "0.6557074", "text": "function\nats2jspre_neg_int0(x) { return ( -x ); }", "title": "" }, { "docid": "79a11670faad8d5d338018a099e993c7", "score": "0.6512457", "text": "function inverseNumber() {\n if (calculator.displayNumber === 0) {\n return;\n }\n\n calculator.displayNumber = calculator.displayNumber * -1;\n}", "title": "" }, { "docid": "72e94cc329444335114bf23f759a3fb3", "score": "0.65086764", "text": "function sign(val) {\n return val >= 0 ? 1 : -1;\n}", "title": "" }, { "docid": "e689b11738dd79f6872e62a27218e123", "score": "0.65038615", "text": "function negativeToPositive() {\n\n}", "title": "" }, { "docid": "0412c7e4efd108d114fb81ac9c97d6c9", "score": "0.6503373", "text": "function reverseInt(x){\n if (x > (Math.pow(2,31)-1) || x < (Math.pow(2,31)*-1)) {\n return 0; \n } \nlet sign = x < 0? -1 : 1;\nlet posTarget = Math.abs(x);\nlet reversedVal = 0;\nwhile(Math.floor(posTarget)){\n let remainder = posTarget % 10;\n reversedVal = reversedVal*10 + remainder;\n posTarget = Math.floor(posTarget/10);\n}\nlet result = reversedVal*sign;\nif(result> (Math.pow(2,31)-1) || result < (Math.pow(2,31)*-1)){\n return 0;\n}\nreturn result;\n}", "title": "" }, { "docid": "94469c732982a573de77dfa5ef41a2aa", "score": "0.6503277", "text": "function sign(val) {\n\t return val >= 0 ? 1 : -1;\n\t}", "title": "" }, { "docid": "ab6ee37387f227aea5105e03e175c634", "score": "0.649646", "text": "function reverseInt(n) {\n\n\t//// CM Solution #1\n\t// if(Math.sign(n) > 0) {\n\t// \treturn parseInt(n.toString().split('').reverse().join(''));\t\n\t// } else {\n\t// \treturn parseInt(Math.abs(n).toString().split('').reverse().join('')*-1);\t\n\t// }\n\n\t//// CM Solution #2\n\t// There is a lot going on here...I'd probably go with Stephen's solution below\n\treturn (parseInt(n.toString().split('').reverse().join(''))*Math.sign(n));\t\n\n\t//// Solution #1\n\t// Instead of the extra logic, I can just multiply the result by Math.sign(n) which returns 1 if\n\t// positive, -1 if negative, 0 if 0, and NaN if not a number\n\t// const reversed = n.toString().split('').reverse().join('');\n\t// return parseInt(reversed) * Math.sign(n);\n}", "title": "" }, { "docid": "51c8122b01777e729619735445b82412", "score": "0.64867306", "text": "function sign(x) {\n\t return x < 0 ? -1 : 1;\n\t}", "title": "" }, { "docid": "a7998e786523fe2bfe86a1bbb41f8367", "score": "0.6482252", "text": "function reverseNumber(n) {\n return (n>0?1:-1)*Math.abs(n).toString().split('').reverse().join('');\n}", "title": "" }, { "docid": "cd061eafae8f9fd4cebf0e275f52402c", "score": "0.6479421", "text": "function sign(val) {\n return val >= 0 ? 1 : -1;\n}", "title": "" }, { "docid": "4588c2cfaad4ed1cad237ccca9d2e123", "score": "0.6476881", "text": "function invert(arr) {\n // let inverted = [];\n // for (let i = 0; i < arr.length; i++) {\n // if (arr[i] >= 0) {\n // inverted.push(-Math.abs(arr[i]));\n // } else {\n // inverted.push(Math.abs(arr[i]));\n // }\n // }\n // return inverted;\n let newArr = [];\n for (let i = 0; i < arr.length; i++) {\n newArr.push(-arr[i]);\n }\n return newArr;\n}", "title": "" }, { "docid": "8cb567d415868fbf2cf55c68ff88d0da", "score": "0.646958", "text": "function sign(x) {\n return x < 0 ? -1 : 1;\n}", "title": "" }, { "docid": "8cb567d415868fbf2cf55c68ff88d0da", "score": "0.646958", "text": "function sign(x) {\n return x < 0 ? -1 : 1;\n}", "title": "" }, { "docid": "8cb567d415868fbf2cf55c68ff88d0da", "score": "0.646958", "text": "function sign(x) {\n return x < 0 ? -1 : 1;\n}", "title": "" }, { "docid": "8cb567d415868fbf2cf55c68ff88d0da", "score": "0.646958", "text": "function sign(x) {\n return x < 0 ? -1 : 1;\n}", "title": "" }, { "docid": "8cb567d415868fbf2cf55c68ff88d0da", "score": "0.646958", "text": "function sign(x) {\n return x < 0 ? -1 : 1;\n}", "title": "" }, { "docid": "8cb567d415868fbf2cf55c68ff88d0da", "score": "0.646958", "text": "function sign(x) {\n return x < 0 ? -1 : 1;\n}", "title": "" }, { "docid": "b4be3d68763bb557ec298c3d42c40c82", "score": "0.6459444", "text": "function reverseInt(no){\n let number = no.toString().split('').reverse().join('');\n return parseInt(number) * Math.sign(no);\n}", "title": "" }, { "docid": "cef085249ee5991d2fb6108976de6181", "score": "0.64481795", "text": "function sign(x) {\n return x < 0 ? -1 : 1;\n}", "title": "" }, { "docid": "0f023abe8cbeb5d7f560d6c00b8de1d8", "score": "0.64257437", "text": "function sign(val) {\n\t return val >= 0 ? 1 : -1;\n\t }", "title": "" }, { "docid": "0f023abe8cbeb5d7f560d6c00b8de1d8", "score": "0.64257437", "text": "function sign(val) {\n\t return val >= 0 ? 1 : -1;\n\t }", "title": "" }, { "docid": "2045768f3a91a8ce6b12ccc667d92933", "score": "0.6413807", "text": "function sign(number) {\n if (number >= 0) {\n return 1;\n } else {\n return -1;\n }\n}", "title": "" }, { "docid": "ac9bde622218eb14fbfbc777f2b25ac3", "score": "0.64091784", "text": "function inverseNumber(){\n if(calculator.displayNumber ==='0'){\n return;\n }\n calculator.displayNumber = calculator.displayNumber * - 1;\n}", "title": "" }, { "docid": "492f503351c05a04bf3967087be2e9ff", "score": "0.639118", "text": "function sign(a, b) {\n return b >= 0 ? a >= 0 ? a : -a : a >= 0 ? -a : a;\n}", "title": "" }, { "docid": "ef0c85adc3d60474725078c1356fd443", "score": "0.63881326", "text": "function reverse(a) {\n switch (a) {\n case 0:\n return 0;\n\n case -1:\n return 1;\n\n case 1:\n return -1;\n }\n }", "title": "" }, { "docid": "86932575b7e5976b2f2b0723fb660b8f", "score": "0.6357777", "text": "function invert(array) {\r\n\r\n for (let i = 0; i < array.length; i++) {\r\n if (array[i] > 0) {\r\n array[i] = (Math.abs(array[i]) * -1)\r\n } else\r\n array[i] = Math.abs(array[i]);\r\n }\r\n return array;\r\n}", "title": "" }, { "docid": "e7c9ecc7f115d4735a644d004deb7575", "score": "0.63359934", "text": "function sign(val) {\n return val >= 0 ? 1 : -1;\n }", "title": "" }, { "docid": "6e3a3aa527c7b20ed4ef30a6a0aeac7f", "score": "0.63329417", "text": "function Negativa(x) {\n for (i = 0; i < x.length; i++) {\n x[i] = x[i] * -1;\n if (x[i] > 0) {\n x[i] = x[i] * -1;\n }\n }\n return (x);\n\n}", "title": "" }, { "docid": "97e3d2e24cdf38bda48509e95008de2c", "score": "0.6326221", "text": "function reverseNumber(num) {\n return Math.abs(num).toString().split``.reverse().join`` * (num > 0 ? 1 : -1);\n}", "title": "" }, { "docid": "f46480702385b2390e890d0fccf88222", "score": "0.6314971", "text": "function reverseInt(n) {\n const reversed = n.toString().split('').reverse().join('');\n\n return parseInt(reversed) * Math.sign(n);\n}", "title": "" }, { "docid": "19e0e14080aaf6de84c13b33277b937c", "score": "0.6297738", "text": "function neg_num(num){\n return num < 0\n}", "title": "" }, { "docid": "84a6d2907a800fb2e993bcc19953af5e", "score": "0.6290174", "text": "function sign(v) {\n return Math.abs(v) < 1e-10 ? 0 :\n v > 0 ? 1 : -1;\n}", "title": "" }, { "docid": "856fbd9ad4111c8a6f5aa8b54dfc2eeb", "score": "0.6283036", "text": "function sign(x) {\r\n // sign: R -> {-1,+1} | specifically 1 if x > 0 and -1 otherwise.\r\n return x >= 0 ? 1 : -1; \r\n}", "title": "" }, { "docid": "80beca6640af992cb12fc5703d0d785c", "score": "0.62821776", "text": "function returnNegative(n){\n return n > 0 ? -n : n;\n}", "title": "" }, { "docid": "5875a5925227bc7b49d47f6a4c71b29c", "score": "0.6273167", "text": "function outlookNegative(arr) {\n for (var i = 0; i < arr.length - 1; i++) {\n if (arr[i] > 0) {\n arr[i] = arr[i] - arr[i] * 2;\n }\n }\n return arr;\n }", "title": "" }, { "docid": "4aa63a12bd863f59e08370f75980095b", "score": "0.62409806", "text": "function abs(num) {\n if (num < 0) {\n return num * -1;\n } else {\n return num;\n }\n}", "title": "" }, { "docid": "1a29e80ec79908fbb171d9b3c1183ae8", "score": "0.6238483", "text": "function replaceNeg(arr){\n\tfor(var i=0; i<arr.length; i++){\n\t\tif (arr[i]<0){\n\t\t\tarr[i]=0;\n\t\t}\n\t}return arr;\n}", "title": "" }, { "docid": "c04ee807447d18252faa94fb2ad0f364", "score": "0.6228041", "text": "function isNegative (num) {\n return Number(num) < 0;\n}", "title": "" }, { "docid": "fb913acde9bfddf43e44db16f05590b7", "score": "0.6226649", "text": "function abs(x) {\n return x < 0 ? -x : x\n}", "title": "" }, { "docid": "75cf231d378e5384e790226ca3c4b247", "score": "0.6219903", "text": "function removeNegatives(arr){\n var count = 0;\n \n for (var i = 0; i < arr.length; i++){\n if (arr[i] < 0){\n count++;\n }\n else {\n arr[i - count] = arr[i];\n }\n }\n arr.length = arr.length - count;\n console.log(arr);\n}", "title": "" }, { "docid": "2a532f352ad1c7d64929c12ae69c67d1", "score": "0.62167835", "text": "function replace_negatives(arr) {\n for(var j = 0; j < arr.length; j++) {\n if(arr[j] < 0) {\n arr[j] = 0;\n }\n else {\n continue;\n }\n }\n return arr;\n}", "title": "" }, { "docid": "8ed88d6bb8125d74b582536f40d66abf", "score": "0.6207137", "text": "function opposite(number) {\n return (number - number * 2)\n}", "title": "" }, { "docid": "2660b8675d1f2059cac76c0d12bb1b5e", "score": "0.6200718", "text": "function sign(x) {\n x = +x; // force to a Number \n if (x === 0 || isNaN(x)) {\n return x;\n }\n return (x > 0) ? 1 : -1;\n}", "title": "" }, { "docid": "09c4123794c97f4221ef383deae1ab6c", "score": "0.6184248", "text": "function isNegativeNumber (thing) {\n return isNumber(thing) && thing < 0;\n }", "title": "" }, { "docid": "8889ce1d5701d081a917bcc5ceaadd10", "score": "0.6179624", "text": "function getOpposite(num) {\n // condition to check for 0\n if(num==0)\n {\n return 0\n }\n // else return the opposite of the number\n else\n return -(num)\n \n}", "title": "" }, { "docid": "e705e73d528ae881152189c5e1757cda", "score": "0.61788833", "text": "function reversedNum(num) {\n return (\n parseFloat(\n num\n .split('')\n .reverse()\n .join('')\n ) \n ) \n }", "title": "" }, { "docid": "624b8eafaa14258fc3982c8d8760c352", "score": "0.61723757", "text": "function rmNeg(arr){\n\tvar removed = 0;\n\tfor(var i=0; i<arr.length; i++){\n\t\tif(arr[i] < 0){\n\t\t\tarr[i] = arr[i+1+removed]\n\t\t\tif(arr[i] < 0){\n\t\t\t\ti--;\n\t\t\t\tremoved++;\n\t\t\t}\n\t\t}\n\t\tconsole.log(arr, i, removed)\n\t}\n\treturn arr;\n}", "title": "" }, { "docid": "9065f892f134b7f73d817c01f48967b7", "score": "0.61674047", "text": "function negate(arr){\n for (var i = 0; i < arr.length; i++){\n arr[i] = -(arr[i])\n }\n return arr;\n}", "title": "" }, { "docid": "857f25ef1373fe9bf7ad1303af3f9923", "score": "0.6158968", "text": "function reverse(x) {\n let array = x.toString(10).split('');\n let reverse = '';\n if (array[0] === '-') reverse = array.shift();\n for (let i = array.length - 1; i >= 0; i--) {\n reverse += array[i];\n }\n console.log(parseInt(reverse));\n}", "title": "" }, { "docid": "c7918f8b8303be7ee14d32badacd0fe6", "score": "0.6157077", "text": "function negatives(arr) {\n for (var i = 0; i < arr.length; ++i) {\n if (arr[i] < 0) {\n arr[i] = 0;\n }\n }\n}", "title": "" }, { "docid": "834509e17a1ed9222ef29b23dcb4e483", "score": "0.6151617", "text": "sign(number) {\n if (number === 0) {\n return 0;\n }\n else if (number > 0) {\n return 1;\n }\n else {\n return -1;\n }\n }", "title": "" }, { "docid": "0b0b6004e9c38bb00997dddbd80d93f6", "score": "0.61300397", "text": "function reverseAndNot(i) {\n return parseInt(i.toString().split(\"\").reverse().join(\"\") + i);\n}", "title": "" }, { "docid": "66af78e9516f8d1e1d57965b13949de2", "score": "0.6126839", "text": "function isNegative(number) {\n return number < 0;\n}", "title": "" }, { "docid": "c047a6dd1f443c59b2a486e6288f60af", "score": "0.6121101", "text": "function negative(x) {\n return x < 0;\n}", "title": "" }, { "docid": "c6404028e4bd758c19bb9aeed549f0e4", "score": "0.60893625", "text": "function negative (arr) {\n newarr = [];\n for (var i = 0; i < arr.length; i++){\n \n if (arr[i]>0){\n newarr.push( arr[i]= 0 -arr[i]);\n }else \n {\n newarr.push(arr[i]);\n }\n }\n return newarr;\n}", "title": "" }, { "docid": "655d7eac5441b92b6bf6673c10c14afa", "score": "0.60845816", "text": "function negative(arr){\n for(i=0;i<arr.length;i++){\n if(arr[i]<0){\n arr[i] = 0;\n }\n }\n return arr;\n}", "title": "" }, { "docid": "3ce4a773c42c34dfa7c19df34211ee49", "score": "0.60802174", "text": "reverse() {}", "title": "" }, { "docid": "12fd22211359e1ca471077561dec8d28", "score": "0.60781693", "text": "function reverseNumberCompare(a, b) {\n return -1 * numberCompare(a, b);\n}", "title": "" }, { "docid": "e5598d6db701d61db626df9bf829133d", "score": "0.60706514", "text": "function reverseInt(n){\n const reversed = n.toString().split('').reverse().join('');\n\n if(n < 0) {\n return parseInt(reverse) * -1;\n }\n return parseInt(reversed);\n \n}", "title": "" }, { "docid": "c79246d30b18ed03eb1bb696009922d2", "score": "0.6067771", "text": "function sign(n) {\n\tif (n < 0){\n\tconsole.log(\"negative\");\n\t} else if (n > 0) {\n\t\tconsole.log(\"postive\");\n\t}\telse if (n === 0) {\n\t\tconsole.log(\"zero\");\n\t}\n}", "title": "" }, { "docid": "c0ad48cce77f69a41c446677a4fadbdd", "score": "0.6051937", "text": "function negativeNumber (thing) {\n return number(thing) && thing < 0;\n }", "title": "" }, { "docid": "56e3cdde573e53e030b9f21082adb178", "score": "0.6050919", "text": "function minus(x, y) {\n if (is_number(x) && is_number(y)) {\n return x - y;\n } else {\n return -x;\n }\n}", "title": "" }, { "docid": "7e5ffaf8814cf30526345a9cdef36b11", "score": "0.6046962", "text": "function sign(hx) { \nreturn hx ? hx < 0 ? -1 : 1 : 0;\n}", "title": "" } ]
61c7ea805efa229cd68d378cff179e9b
Determine if the argument is shaped like a Promise
[ { "docid": "d0befaac1a535fb92345bb557c91545e", "score": "0.64602005", "text": "function isPromise(obj) {\n // allow any Promise/A+ compliant thenable.\n // It's up to the caller to ensure that obj.then conforms to the spec\n return !!obj && typeof obj.then === 'function';\n}", "title": "" } ]
[ { "docid": "83405184c74d480246787a7e6c09627e", "score": "0.71709746", "text": "function isPromise(input){return typeof Promise!=='undefined'&&input instanceof Promise||input!==null&&typeof input==='object'&&typeof input.then==='function'&&typeof input.catch==='function';}", "title": "" }, { "docid": "5fc33f66da3e2a9d663dea16605ba162", "score": "0.69779503", "text": "function isPromise (o) { return o && typeof o.then === 'function' }", "title": "" }, { "docid": "5fc33f66da3e2a9d663dea16605ba162", "score": "0.69779503", "text": "function isPromise (o) { return o && typeof o.then === 'function' }", "title": "" }, { "docid": "5fc33f66da3e2a9d663dea16605ba162", "score": "0.69779503", "text": "function isPromise (o) { return o && typeof o.then === 'function' }", "title": "" }, { "docid": "5fc33f66da3e2a9d663dea16605ba162", "score": "0.69779503", "text": "function isPromise (o) { return o && typeof o.then === 'function' }", "title": "" }, { "docid": "59b44f08c7992f864eaf279a87e3af44", "score": "0.69299096", "text": "function isPromise(input) {\n return typeof Promise !== 'undefined' && input instanceof Promise || input !== null && _typeof(input) === 'object' && typeof input.then === 'function' && typeof input[\"catch\"] === 'function';\n}", "title": "" }, { "docid": "59b44f08c7992f864eaf279a87e3af44", "score": "0.69299096", "text": "function isPromise(input) {\n return typeof Promise !== 'undefined' && input instanceof Promise || input !== null && _typeof(input) === 'object' && typeof input.then === 'function' && typeof input[\"catch\"] === 'function';\n}", "title": "" }, { "docid": "59b44f08c7992f864eaf279a87e3af44", "score": "0.69299096", "text": "function isPromise(input) {\n return typeof Promise !== 'undefined' && input instanceof Promise || input !== null && _typeof(input) === 'object' && typeof input.then === 'function' && typeof input[\"catch\"] === 'function';\n}", "title": "" }, { "docid": "ac952638e53b56b891712079fa9902c3", "score": "0.69243276", "text": "function IsPromise ( x ) {\n if ( Type(x) !== 'object' ) {\n return false;\n }\n if ( Type(x['[[PromiseStatus]]']) === 'undefined' ) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "b3e49f95d46183644d54ea43c76e082a", "score": "0.6897504", "text": "function resultIsAPromiseCondition () {\n return arguments[arguments.length - 2] instanceof Promise // MUDO too strict; use duck typing, to also allow objects from Q, e.g.\n}", "title": "" }, { "docid": "d209515d198ad4ac8c2a4c172f2a7df9", "score": "0.68881726", "text": "function isPromise(input) {\n\t\treturn (\n\t\t\t(\n\t\t\t\ttypeof Promise !== 'undefined' &&\n\t\t\t\tinput instanceof Promise\n\t\t\t) ||\n\t\t\t(\n\t\t\t\tinput !== null &&\n\t\t\t\ttypeof input === 'object' &&\n\t\t\t\ttypeof input.then === 'function' &&\n\t\t\t\ttypeof input.catch === 'function'\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "d209515d198ad4ac8c2a4c172f2a7df9", "score": "0.68881726", "text": "function isPromise(input) {\n\t\treturn (\n\t\t\t(\n\t\t\t\ttypeof Promise !== 'undefined' &&\n\t\t\t\tinput instanceof Promise\n\t\t\t) ||\n\t\t\t(\n\t\t\t\tinput !== null &&\n\t\t\t\ttypeof input === 'object' &&\n\t\t\t\ttypeof input.then === 'function' &&\n\t\t\t\ttypeof input.catch === 'function'\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "d209515d198ad4ac8c2a4c172f2a7df9", "score": "0.68881726", "text": "function isPromise(input) {\n\t\treturn (\n\t\t\t(\n\t\t\t\ttypeof Promise !== 'undefined' &&\n\t\t\t\tinput instanceof Promise\n\t\t\t) ||\n\t\t\t(\n\t\t\t\tinput !== null &&\n\t\t\t\ttypeof input === 'object' &&\n\t\t\t\ttypeof input.then === 'function' &&\n\t\t\t\ttypeof input.catch === 'function'\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "43b6f743c49e2290e2206fa1e63d6496", "score": "0.6878156", "text": "function isPromise(input) {\n\treturn (\n\t\t(\n\t\t\ttypeof Promise !== 'undefined' &&\n\t\t\tinput instanceof Promise\n\t\t) ||\n\t\t(\n\t\t\tinput !== null &&\n\t\t\ttypeof input === 'object' &&\n\t\t\ttypeof input.then === 'function' &&\n\t\t\ttypeof input.catch === 'function'\n\t\t)\n\t);\n}", "title": "" }, { "docid": "43b6f743c49e2290e2206fa1e63d6496", "score": "0.6878156", "text": "function isPromise(input) {\n\treturn (\n\t\t(\n\t\t\ttypeof Promise !== 'undefined' &&\n\t\t\tinput instanceof Promise\n\t\t) ||\n\t\t(\n\t\t\tinput !== null &&\n\t\t\ttypeof input === 'object' &&\n\t\t\ttypeof input.then === 'function' &&\n\t\t\ttypeof input.catch === 'function'\n\t\t)\n\t);\n}", "title": "" }, { "docid": "43b6f743c49e2290e2206fa1e63d6496", "score": "0.6878156", "text": "function isPromise(input) {\n\treturn (\n\t\t(\n\t\t\ttypeof Promise !== 'undefined' &&\n\t\t\tinput instanceof Promise\n\t\t) ||\n\t\t(\n\t\t\tinput !== null &&\n\t\t\ttypeof input === 'object' &&\n\t\t\ttypeof input.then === 'function' &&\n\t\t\ttypeof input.catch === 'function'\n\t\t)\n\t);\n}", "title": "" }, { "docid": "43b6f743c49e2290e2206fa1e63d6496", "score": "0.6878156", "text": "function isPromise(input) {\n\treturn (\n\t\t(\n\t\t\ttypeof Promise !== 'undefined' &&\n\t\t\tinput instanceof Promise\n\t\t) ||\n\t\t(\n\t\t\tinput !== null &&\n\t\t\ttypeof input === 'object' &&\n\t\t\ttypeof input.then === 'function' &&\n\t\t\ttypeof input.catch === 'function'\n\t\t)\n\t);\n}", "title": "" }, { "docid": "43b6f743c49e2290e2206fa1e63d6496", "score": "0.6878156", "text": "function isPromise(input) {\n\treturn (\n\t\t(\n\t\t\ttypeof Promise !== 'undefined' &&\n\t\t\tinput instanceof Promise\n\t\t) ||\n\t\t(\n\t\t\tinput !== null &&\n\t\t\ttypeof input === 'object' &&\n\t\t\ttypeof input.then === 'function' &&\n\t\t\ttypeof input.catch === 'function'\n\t\t)\n\t);\n}", "title": "" }, { "docid": "43b6f743c49e2290e2206fa1e63d6496", "score": "0.6878156", "text": "function isPromise(input) {\n\treturn (\n\t\t(\n\t\t\ttypeof Promise !== 'undefined' &&\n\t\t\tinput instanceof Promise\n\t\t) ||\n\t\t(\n\t\t\tinput !== null &&\n\t\t\ttypeof input === 'object' &&\n\t\t\ttypeof input.then === 'function' &&\n\t\t\ttypeof input.catch === 'function'\n\t\t)\n\t);\n}", "title": "" }, { "docid": "43b6f743c49e2290e2206fa1e63d6496", "score": "0.6878156", "text": "function isPromise(input) {\n\treturn (\n\t\t(\n\t\t\ttypeof Promise !== 'undefined' &&\n\t\t\tinput instanceof Promise\n\t\t) ||\n\t\t(\n\t\t\tinput !== null &&\n\t\t\ttypeof input === 'object' &&\n\t\t\ttypeof input.then === 'function' &&\n\t\t\ttypeof input.catch === 'function'\n\t\t)\n\t);\n}", "title": "" }, { "docid": "43b6f743c49e2290e2206fa1e63d6496", "score": "0.6878156", "text": "function isPromise(input) {\n\treturn (\n\t\t(\n\t\t\ttypeof Promise !== 'undefined' &&\n\t\t\tinput instanceof Promise\n\t\t) ||\n\t\t(\n\t\t\tinput !== null &&\n\t\t\ttypeof input === 'object' &&\n\t\t\ttypeof input.then === 'function' &&\n\t\t\ttypeof input.catch === 'function'\n\t\t)\n\t);\n}", "title": "" }, { "docid": "43b6f743c49e2290e2206fa1e63d6496", "score": "0.6878156", "text": "function isPromise(input) {\n\treturn (\n\t\t(\n\t\t\ttypeof Promise !== 'undefined' &&\n\t\t\tinput instanceof Promise\n\t\t) ||\n\t\t(\n\t\t\tinput !== null &&\n\t\t\ttypeof input === 'object' &&\n\t\t\ttypeof input.then === 'function' &&\n\t\t\ttypeof input.catch === 'function'\n\t\t)\n\t);\n}", "title": "" }, { "docid": "43b6f743c49e2290e2206fa1e63d6496", "score": "0.6878156", "text": "function isPromise(input) {\n\treturn (\n\t\t(\n\t\t\ttypeof Promise !== 'undefined' &&\n\t\t\tinput instanceof Promise\n\t\t) ||\n\t\t(\n\t\t\tinput !== null &&\n\t\t\ttypeof input === 'object' &&\n\t\t\ttypeof input.then === 'function' &&\n\t\t\ttypeof input.catch === 'function'\n\t\t)\n\t);\n}", "title": "" }, { "docid": "43b6f743c49e2290e2206fa1e63d6496", "score": "0.6878156", "text": "function isPromise(input) {\n\treturn (\n\t\t(\n\t\t\ttypeof Promise !== 'undefined' &&\n\t\t\tinput instanceof Promise\n\t\t) ||\n\t\t(\n\t\t\tinput !== null &&\n\t\t\ttypeof input === 'object' &&\n\t\t\ttypeof input.then === 'function' &&\n\t\t\ttypeof input.catch === 'function'\n\t\t)\n\t);\n}", "title": "" }, { "docid": "43b6f743c49e2290e2206fa1e63d6496", "score": "0.6878156", "text": "function isPromise(input) {\n\treturn (\n\t\t(\n\t\t\ttypeof Promise !== 'undefined' &&\n\t\t\tinput instanceof Promise\n\t\t) ||\n\t\t(\n\t\t\tinput !== null &&\n\t\t\ttypeof input === 'object' &&\n\t\t\ttypeof input.then === 'function' &&\n\t\t\ttypeof input.catch === 'function'\n\t\t)\n\t);\n}", "title": "" }, { "docid": "43b6f743c49e2290e2206fa1e63d6496", "score": "0.6878156", "text": "function isPromise(input) {\n\treturn (\n\t\t(\n\t\t\ttypeof Promise !== 'undefined' &&\n\t\t\tinput instanceof Promise\n\t\t) ||\n\t\t(\n\t\t\tinput !== null &&\n\t\t\ttypeof input === 'object' &&\n\t\t\ttypeof input.then === 'function' &&\n\t\t\ttypeof input.catch === 'function'\n\t\t)\n\t);\n}", "title": "" }, { "docid": "484d5f80da8ff11012e9ba430b5b1250", "score": "0.68117774", "text": "function isPromise(x) {\n\t return x != null && typeof x === 'object' && x.constructor === Future;\n\t}", "title": "" }, { "docid": "4c8c799d794f5e346e26ecc4645ef5a4", "score": "0.67607564", "text": "function isPromise(p) {\n /* eslint-disable no-new-object */\n return new Object(p) === p && typeof p.then === \"function\";\n /* eslint-enable non-new-object */\n}", "title": "" }, { "docid": "dcac7ace8676bb240b69a67c196b5663", "score": "0.6735251", "text": "function isPromiseLike(value) {\n return !!value && typeof value.then === 'function';\n }", "title": "" }, { "docid": "7cfc862d906612ddb4fc5df3c77280d9", "score": "0.6730547", "text": "function isPromise(obj){// allow any Promise/A+ compliant thenable.\n// It's up to the caller to ensure that obj.then conforms to the spec\nreturn!!obj&&typeof obj.then===\"function\"}", "title": "" }, { "docid": "35cd14dcc81ad3092772cb35bd9bc3d9", "score": "0.6708669", "text": "function IsPromise(x) {\n if (Type(x) !== 'object') return false;\n if (!('[[PromiseState]]' in x)) return false;\n if (x['[[PromiseState]]'] === undefined) return false;\n return true;\n }", "title": "" }, { "docid": "d52fa00bff30d240dadd77a5f4e8f5fc", "score": "0.668885", "text": "function isPromise(p)\n{\n return (p && typeof p.catch == \"function\" && typeof p.then == \"function\");\n}", "title": "" }, { "docid": "85546f8261bfc818915ffabc25ce0cf1", "score": "0.6666675", "text": "function isPromise(p) {\n return !!p && typeof p.then === 'function';\n}", "title": "" }, { "docid": "85546f8261bfc818915ffabc25ce0cf1", "score": "0.6666675", "text": "function isPromise(p) {\n return !!p && typeof p.then === 'function';\n}", "title": "" }, { "docid": "85546f8261bfc818915ffabc25ce0cf1", "score": "0.6666675", "text": "function isPromise(p) {\n return !!p && typeof p.then === 'function';\n}", "title": "" }, { "docid": "4f73d75b81fbfaa7829576b0cf7fe30b", "score": "0.661929", "text": "function isPromise(p) {\n return p && typeof p.then === 'function';\n}", "title": "" }, { "docid": "32edc64e096f1ae0b9c5a30e41c1a2ee", "score": "0.65830725", "text": "function isPromise(p) {\n return p !== null && typeof p === 'object' && typeof p.then === 'function';\n}", "title": "" }, { "docid": "099fd5a3469f9231a8fd618353748e83", "score": "0.65418434", "text": "function isPromise(p) {\n return p !== null && typeof p === 'object' && typeof p.then === 'function';\n }", "title": "" }, { "docid": "fb47966132d5149be11756452aa796c7", "score": "0.65289915", "text": "function isPromise(value) {\n return value && \"function\" != typeof value.subscribe && \"function\" == typeof value.then;\n }", "title": "" }, { "docid": "c032266c5df12c2d661e528024428cac", "score": "0.64633083", "text": "function isPromise(obj) {\n if (obj && typeof obj.then === 'function') {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "0ac5cead203657de73b07d616b08e960", "score": "0.6446941", "text": "function isPromise(result) {\n return exports._.isObject(result) &&\n typeof result.then === 'function';\n}", "title": "" }, { "docid": "946401b654e9624d0de2cbbb67827c93", "score": "0.64460325", "text": "function isPromise(result) {\n return exports._.isObject(result) && typeof result.then === 'function';\n}", "title": "" }, { "docid": "f6cd58e41d4f1ac2454e1c752ce50919", "score": "0.6438499", "text": "function isPromise(o) {\n // Shamelessly copied from every open-source project out there.\n return o && typeof o.then === 'function';\n}", "title": "" }, { "docid": "dc5175ca188f0cc4b5eab8b6399b587b", "score": "0.6434122", "text": "function isPromise(object) {\n return object && typeof object.then === 'function';\n}", "title": "" }, { "docid": "ee5b431b87352e755e22da15610f3963", "score": "0.6429024", "text": "function isPromise(value) {\n return Boolean(value && typeof value.then === 'function');\n}", "title": "" }, { "docid": "ee5b431b87352e755e22da15610f3963", "score": "0.6429024", "text": "function isPromise(value) {\n return Boolean(value && typeof value.then === 'function');\n}", "title": "" }, { "docid": "ee5b431b87352e755e22da15610f3963", "score": "0.6429024", "text": "function isPromise(value) {\n return Boolean(value && typeof value.then === 'function');\n}", "title": "" }, { "docid": "ee5b431b87352e755e22da15610f3963", "score": "0.6429024", "text": "function isPromise(value) {\n return Boolean(value && typeof value.then === 'function');\n}", "title": "" }, { "docid": "ead2df932781d053d5ea7b43cbb8d3d8", "score": "0.64173853", "text": "function isPromise(obj) {\n if (obj && typeof obj.then === 'function') {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "e96db04801173c7fec03346ace99d2f0", "score": "0.63514197", "text": "function isPromise(value) {\n return util.isFunction(value.then);\n}", "title": "" }, { "docid": "9826f2acb6ee5d309f99bea3b3bc6b87", "score": "0.63231516", "text": "function isPromise(value) {\n return value && typeof value.subscribe !== 'function' && typeof value.then === 'function';\n}", "title": "" }, { "docid": "8f07e31ad73028e7acd358196387d473", "score": "0.62799513", "text": "function isPromise(obj) {\n return (!!obj && (typeof obj === 'object' || typeof obj === 'function')\n && typeof obj.then === 'function'\n );\n }", "title": "" }, { "docid": "f181806f94325ccd45584ac8841d8abc", "score": "0.62515545", "text": "function isPromise(obj) {\n return (typeof obj === 'object' && obj !== null || typeof obj === 'function') && typeof obj.then === 'function';\n }", "title": "" }, { "docid": "517dd544aa808454efbfb37bf9c12d76", "score": "0.62402225", "text": "function isPromise(value) {\r\n return Promise.resolve(value) === value;\r\n}", "title": "" }, { "docid": "6f15751dc5783410aa93eb57ea32531a", "score": "0.61726636", "text": "function isPromise (obj) {\n if (obj !== null && typeof obj !== 'undefined') {\n if (obj === Promise || obj instanceof Promise || obj instanceof BluebirdPromise || obj === BluebirdPromise)\n return true;\n else if (obj.hasOwnProperty('name') && typeof obj.name !== 'undefined' && obj.name !== null && obj.name === 'Promise')\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "d71a9bef0f4e14662214acf3dbab0281", "score": "0.61102945", "text": "function isPromise(promiseOrValue) {\n\t\treturn promiseOrValue && typeof promiseOrValue.then === 'function';\n\t}", "title": "" }, { "docid": "4110e3bb1d77cdb9175944b50898bec2", "score": "0.60986114", "text": "function isPromise(value) {\n return typeof (value === null || value === void 0 ? void 0 : value.then) === 'function';\n}", "title": "" }, { "docid": "4110e3bb1d77cdb9175944b50898bec2", "score": "0.60986114", "text": "function isPromise(value) {\n return typeof (value === null || value === void 0 ? void 0 : value.then) === 'function';\n}", "title": "" }, { "docid": "4110e3bb1d77cdb9175944b50898bec2", "score": "0.60986114", "text": "function isPromise(value) {\n return typeof (value === null || value === void 0 ? void 0 : value.then) === 'function';\n}", "title": "" }, { "docid": "d7b9be5284c49666d35959347e345def", "score": "0.6074996", "text": "function isPromise(result) {\n cov_1x4tdstmam.f[279]++;\n cov_1x4tdstmam.s[1415]++;\n\n return (cov_1x4tdstmam.b[465][0]++, exports._.isObject(result)) && (cov_1x4tdstmam.b[465][1]++, typeof result.then === 'function');\n }", "title": "" }, { "docid": "5a3648f49cfdfe5468e5708dd39bb0be", "score": "0.6071548", "text": "function isPromise(object) {\n // We chose to not use 'obj instanceOf Promise' for two reasons:\n // 1. It only reliably works for es6 Promise, not other Promise\n // implementations.\n // 2. It doesn't work with framework that uses zone.js. zone.js monkey patch\n // the async calls, so it is possible the obj (patched) is comparing to a\n // pre-patched Promise.\n return object && object.then && typeof object.then === 'function';\n}", "title": "" }, { "docid": "d150a8bda05b6142b480af8060f6ebd9", "score": "0.599947", "text": "function isResolve(value){return isObject(value) && value.then && value.$$promises;}", "title": "" }, { "docid": "5f6b9d308c4b5f30e3d06abc573dfaba", "score": "0.59909666", "text": "function isPromise(object) {\n // We chose to not use 'obj instanceOf Promise' for two reasons:\n // 1. It only reliably works for es6 Promise, not other Promise\n // implementations.\n // 2. It doesn't work with framework that uses zone.js. zone.js monkey patch\n // the async calls, so it is possible the obj (patched) is comparing to a\n // pre-patched Promise.\n return object && object.then && typeof object.then === 'function';\n}", "title": "" }, { "docid": "5f6b9d308c4b5f30e3d06abc573dfaba", "score": "0.59909666", "text": "function isPromise(object) {\n // We chose to not use 'obj instanceOf Promise' for two reasons:\n // 1. It only reliably works for es6 Promise, not other Promise\n // implementations.\n // 2. It doesn't work with framework that uses zone.js. zone.js monkey patch\n // the async calls, so it is possible the obj (patched) is comparing to a\n // pre-patched Promise.\n return object && object.then && typeof object.then === 'function';\n}", "title": "" }, { "docid": "5f6b9d308c4b5f30e3d06abc573dfaba", "score": "0.59909666", "text": "function isPromise(object) {\n // We chose to not use 'obj instanceOf Promise' for two reasons:\n // 1. It only reliably works for es6 Promise, not other Promise\n // implementations.\n // 2. It doesn't work with framework that uses zone.js. zone.js monkey patch\n // the async calls, so it is possible the obj (patched) is comparing to a\n // pre-patched Promise.\n return object && object.then && typeof object.then === 'function';\n}", "title": "" }, { "docid": "be2629da1edd7a4112f3ad1bae00fdf2", "score": "0.5960774", "text": "function ifIsObjectAndHasAPromiseIsHandledInternalSlotSetPromiseIsHandledToTrue(promise) {\n try {\n // This relies on the brand-check that is enforced by Promise.prototype.then(). As with the rest of the reference\n // implementation, it doesn't attempt to do the right thing if someone has modified the global environment.\n Promise.prototype.then.call(promise, undefined, () => {});\n } catch (e) {\n // The brand check failed, therefore the internal slot is not present and there's nothing further to do.\n }\n}", "title": "" }, { "docid": "94ee98ea2f9388fd52cc2f9981f7651c", "score": "0.59070516", "text": "function ifIsObjectAndHasAPromiseIsHandledInternalSlotSetPromiseIsHandledToTrue(promise) {\n try {\n // This relies on the brand-check that is enforced by Promise.prototype.then(). As with the rest of the reference\n // implementation, it doesn't attempt to do the right thing if someone has modified the global environment.\n Promise.prototype.then.call(promise, undefined, function () {});\n } catch (e) {\n // The brand check failed, therefore the internal slot is not present and there's nothing further to do.\n }\n}", "title": "" }, { "docid": "37c5405d71d3dd7cd0028a87218cf385", "score": "0.5875504", "text": "function testPromise(res) {\n return checkGeneral(res) && checkSpecific(res);\n }", "title": "" }, { "docid": "9d1d8e253f040697b361cbd3986fdcfa", "score": "0.58175826", "text": "static isPromisedArray (array) {\n return array instanceof Promise && typeof array.map === 'function'\n }", "title": "" }, { "docid": "1b6a92b8c104cf0c7132202c92600e0e", "score": "0.5802476", "text": "function isResolve(value) {\n\t return isObject(value) && value.then && value.$$promises;\n\t }", "title": "" }, { "docid": "1b6a92b8c104cf0c7132202c92600e0e", "score": "0.5802476", "text": "function isResolve(value) {\n\t return isObject(value) && value.then && value.$$promises;\n\t }", "title": "" }, { "docid": "1b6a92b8c104cf0c7132202c92600e0e", "score": "0.5802476", "text": "function isResolve(value) {\n\t return isObject(value) && value.then && value.$$promises;\n\t }", "title": "" }, { "docid": "1b6a92b8c104cf0c7132202c92600e0e", "score": "0.5802476", "text": "function isResolve(value) {\n\t return isObject(value) && value.then && value.$$promises;\n\t }", "title": "" }, { "docid": "29d2ba6c2299439fa9b75db7758b808c", "score": "0.57210827", "text": "function isResolve(value) {\n return isObject(value) && value.then && value.$$promises;\n }", "title": "" }, { "docid": "29d2ba6c2299439fa9b75db7758b808c", "score": "0.57210827", "text": "function isResolve(value) {\n return isObject(value) && value.then && value.$$promises;\n }", "title": "" }, { "docid": "29d2ba6c2299439fa9b75db7758b808c", "score": "0.57210827", "text": "function isResolve(value) {\n return isObject(value) && value.then && value.$$promises;\n }", "title": "" }, { "docid": "29d2ba6c2299439fa9b75db7758b808c", "score": "0.57210827", "text": "function isResolve(value) {\n return isObject(value) && value.then && value.$$promises;\n }", "title": "" }, { "docid": "29d2ba6c2299439fa9b75db7758b808c", "score": "0.57210827", "text": "function isResolve(value) {\n return isObject(value) && value.then && value.$$promises;\n }", "title": "" }, { "docid": "29d2ba6c2299439fa9b75db7758b808c", "score": "0.57210827", "text": "function isResolve(value) {\n return isObject(value) && value.then && value.$$promises;\n }", "title": "" }, { "docid": "29d2ba6c2299439fa9b75db7758b808c", "score": "0.57210827", "text": "function isResolve(value) {\n return isObject(value) && value.then && value.$$promises;\n }", "title": "" }, { "docid": "29d2ba6c2299439fa9b75db7758b808c", "score": "0.57210827", "text": "function isResolve(value) {\n return isObject(value) && value.then && value.$$promises;\n }", "title": "" }, { "docid": "29d2ba6c2299439fa9b75db7758b808c", "score": "0.57210827", "text": "function isResolve(value) {\n return isObject(value) && value.then && value.$$promises;\n }", "title": "" }, { "docid": "29d2ba6c2299439fa9b75db7758b808c", "score": "0.57210827", "text": "function isResolve(value) {\n return isObject(value) && value.then && value.$$promises;\n }", "title": "" }, { "docid": "29d2ba6c2299439fa9b75db7758b808c", "score": "0.57210827", "text": "function isResolve(value) {\n return isObject(value) && value.then && value.$$promises;\n }", "title": "" }, { "docid": "29d2ba6c2299439fa9b75db7758b808c", "score": "0.57210827", "text": "function isResolve(value) {\n return isObject(value) && value.then && value.$$promises;\n }", "title": "" }, { "docid": "29d2ba6c2299439fa9b75db7758b808c", "score": "0.57210827", "text": "function isResolve(value) {\n return isObject(value) && value.then && value.$$promises;\n }", "title": "" }, { "docid": "29d2ba6c2299439fa9b75db7758b808c", "score": "0.57210827", "text": "function isResolve(value) {\n return isObject(value) && value.then && value.$$promises;\n }", "title": "" }, { "docid": "29d2ba6c2299439fa9b75db7758b808c", "score": "0.57210827", "text": "function isResolve(value) {\n return isObject(value) && value.then && value.$$promises;\n }", "title": "" }, { "docid": "29d2ba6c2299439fa9b75db7758b808c", "score": "0.57210827", "text": "function isResolve(value) {\n return isObject(value) && value.then && value.$$promises;\n }", "title": "" }, { "docid": "29d2ba6c2299439fa9b75db7758b808c", "score": "0.57210827", "text": "function isResolve(value) {\n return isObject(value) && value.then && value.$$promises;\n }", "title": "" }, { "docid": "29d2ba6c2299439fa9b75db7758b808c", "score": "0.57210827", "text": "function isResolve(value) {\n return isObject(value) && value.then && value.$$promises;\n }", "title": "" }, { "docid": "29d2ba6c2299439fa9b75db7758b808c", "score": "0.57210827", "text": "function isResolve(value) {\n return isObject(value) && value.then && value.$$promises;\n }", "title": "" }, { "docid": "29d2ba6c2299439fa9b75db7758b808c", "score": "0.57210827", "text": "function isResolve(value) {\n return isObject(value) && value.then && value.$$promises;\n }", "title": "" }, { "docid": "29d2ba6c2299439fa9b75db7758b808c", "score": "0.57210827", "text": "function isResolve(value) {\n return isObject(value) && value.then && value.$$promises;\n }", "title": "" }, { "docid": "29d2ba6c2299439fa9b75db7758b808c", "score": "0.57210827", "text": "function isResolve(value) {\n return isObject(value) && value.then && value.$$promises;\n }", "title": "" } ]
9eb543f59e761fbafcd95996dbb7732a
HELPER METHODS & CONSTRUCTORS (INTERNAL)
[ { "docid": "1f04dc177c5a2e808a7525a14e23cbfa", "score": "0.0", "text": "function b(){return k.defaultDifficulty?k.defaultDifficulty:i((k.highestDifficulty-k.lowestDifficulty)/2)}// save the current deck to localStorage", "title": "" } ]
[ { "docid": "ceb3ab2a13a15b84371e068984913a68", "score": "0.6277497", "text": "function Utils() {}", "title": "" }, { "docid": "ceb3ab2a13a15b84371e068984913a68", "score": "0.6277497", "text": "function Utils() {}", "title": "" }, { "docid": "a14a82fc30745b59820199a46d30b5e7", "score": "0.60927236", "text": "constructor(_) { return (_ = super(_)).init(), _; }", "title": "" }, { "docid": "d588b4437f06c3807eac1bc17c01d016", "score": "0.6073267", "text": "function Utils() {\n\n}", "title": "" }, { "docid": "0dc730151e0577c872a397c39299c9f6", "score": "0.6066485", "text": "function Helpers() {\r\n }", "title": "" }, { "docid": "250b014811d7113169507b60623f6f76", "score": "0.5955831", "text": "function Util() { }", "title": "" }, { "docid": "d6aa4852c18130f8ea757f1d1b269dcd", "score": "0.58942854", "text": "function utility() {}", "title": "" }, { "docid": "59d3beeaa84f482085e491e2542c80f9", "score": "0.57248795", "text": "constructor() {\n\t\t//\n\t}", "title": "" }, { "docid": "cf579ea131eefc1dc9fb9ba71ae42536", "score": "0.5671642", "text": "function KocoUtilities() {}", "title": "" }, { "docid": "12244f7aa148d44cd17f21f265ad7bb9", "score": "0.56245416", "text": "function UserRecordUtil() {}", "title": "" }, { "docid": "aa02566922a43c52bcf3b10a5b46748f", "score": "0.56244963", "text": "function Util() {\n}", "title": "" }, { "docid": "6c763d8731cad7189659792c4b2c0199", "score": "0.5618556", "text": "function Internal(){\n\n\t}", "title": "" }, { "docid": "5d17173e010cdeb70f5b74fbcc5643de", "score": "0.5489841", "text": "_initialize() {}", "title": "" }, { "docid": "c5714a0a6f6c367952052af5b1c4b3f0", "score": "0.54795146", "text": "function createDefaultUtils(){\n return {\n runCallbacksInSequence:helper.runCallbacksInSequence,\n get:_.get,\n set:_.set\n }\n}", "title": "" }, { "docid": "13df25260e4440a35d55566645faf853", "score": "0.54026884", "text": "function mifuncion(){}", "title": "" }, { "docid": "73770e2e161bb800078fcd70b4f0231b", "score": "0.5350159", "text": "toObject() {\n let self = this;\n let retVal = null;\n\n switch (self.Type.toUpperCase()) {\n case \"SHELF\": {\n retVal = {\n RelativePosition: {\n x: self.Group.getX(),\n y: self.Group.getY(),\n },\n AbsolutePosition: {\n x: self.Group.getAbsolutePosition().x,\n y: self.Group.getAbsolutePosition().y\n },\n ClientRect: {\n x: self.ClientRect.getX(),\n y: self.ClientRect.getX(),\n width: self.ClientRect.getWidth(),\n height: self.ClientRect.getHeight()\n },\n Data: {\n FixtureData: self.FixtureData,\n ID: self.ID,\n GondolaID: self.GondolaID,\n FixtureConfig: self.FixtureConfig,\n ProductGroupCount: self.ProductGroupArray.length,\n FixtureNumber: self.FixtureNumber\n }\n }\n }\n break;\n case \"BASE\":\n ; {\n retVal = {\n RelativePosition: {\n x: self.Group.getX(),\n y: self.Group.getY(),\n },\n AbsolutePosition: {\n x: self.Group.getAbsolutePosition().x,\n y: self.Group.getAbsolutePosition().y\n },\n ClientRect: {\n x: self.ClientRect.getX(),\n y: self.ClientRect.getX(),\n width: self.ClientRect.getWidth(),\n height: self.ClientRect.getHeight()\n },\n Data: {\n FixtureData: self.FixtureData,\n ID: self.ID,\n GondolaID: self.GondolaID,\n FixtureConfig: self.FixtureConfig,\n ProductGroupCount: self.ProductGroupArray.length\n }\n }\n }\n break;\n case \"PEGBOARD\": {\n retVal = {\n RelativePosition: {\n x: self.Group.getX(),\n y: self.Group.getY(),\n },\n AbsolutePosition: {\n x: self.Group.getAbsolutePosition().x,\n y: self.Group.getAbsolutePosition().y\n },\n // ClientRect: {\n // x: self.ClientRect.getX(),\n // y: self.ClientRect.getX(),\n // width: self.ClientRect.getWidth(),\n // height: self.ClientRect.getHeight()\n // },\n Data: {\n FixtureData: self.FixtureData,\n ID: self.ID,\n GondolaID: self.GondolaID,\n FixtureConfig: self.FixtureConfig,\n ProductGroupCount: self.ProductGroupArray.length\n }\n }\n }\n break;\n case \"PEGBAR\": {\n retVal = {\n RelativePosition: {\n x: self.Group.getX(),\n y: self.Group.getY(),\n },\n AbsolutePosition: {\n x: self.Group.getAbsolutePosition().x,\n y: self.Group.getAbsolutePosition().y\n },\n ClientRect: {\n x: self.ClientRect.getX(),\n y: self.ClientRect.getX(),\n width: self.ClientRect.getWidth(),\n height: self.ClientRect.getHeight()\n },\n Data: {\n FixtureData: self.FixtureData,\n ID: self.ID,\n GondolaID: self.GondolaID,\n FixtureConfig: self.FixtureConfig,\n ProductGroupCount: self.ProductGroupArray.length\n }\n }\n }\n break;\n }\n\n return JSON.stringify(retVal);\n }", "title": "" }, { "docid": "fe245218da135955c86edea9b347b5fc", "score": "0.53498405", "text": "function Utility() {}", "title": "" }, { "docid": "ea0e93a54ae3c0e7264288df823c6b90", "score": "0.53487796", "text": "static initialize() {\n return {};\n }", "title": "" }, { "docid": "c5d42b106b4d3e8833f91d1c8497f85d", "score": "0.5335163", "text": "initialize(){\n//Not using this class for now\n\t}", "title": "" }, { "docid": "a3cc7c5e70da4671a3a904ef120d54a1", "score": "0.53343546", "text": "prepare() {}", "title": "" }, { "docid": "28ac5520325b548b0551c934e7165a41", "score": "0.5321686", "text": "constructor() {\n\t super();\n\t }", "title": "" }, { "docid": "7b61db5a7ac8e2fb3d7b9a0ec6631976", "score": "0.5317573", "text": "function wHELPERS() {}", "title": "" }, { "docid": "6679e3924428876ad73f49e5f7b3c701", "score": "0.531042", "text": "static GetGenericData() {}", "title": "" }, { "docid": "8be6001e076d254494e9ee30bf650966", "score": "0.53096694", "text": "__init() {this.forcePublic = null}", "title": "" }, { "docid": "df0abca52080e8bf244751bc2c4e1555", "score": "0.5297288", "text": "static setUp(Array, Object, String) {\n\t\tif (Array.prototype.unique === undefined) {\n\t\t\tArray.prototype.unique = function () {\n\t\t\t\treturn this.filter(function (value, index, self) {\n\t\t\t\t\treturn self.indexOf(value) === index;\n\t\t\t\t});\n\t\t\t};\n\t\t}\n\n\t\tif (Array.prototype.toObject === undefined) {\n\t\t\tArray.prototype.toObject = function (keyFunc, valFunc) {\n\t\t\t\tif (keyFunc === undefined) {\n\t\t\t\t\tkeyFunc = (val, idx) => idx;\n\t\t\t\t}\n\t\t\t\tif (valFunc === undefined) {\n\t\t\t\t\tvalFunc = (val, idx) => val;\n\t\t\t\t}\n\t\t\t\tvar obj = {};\n\t\t\t\tvar arr = this;\n\t\t\t\tfor (var idx = 0; idx < arr.length; idx++) {\n\t\t\t\t\tvar item = arr[idx];\n\t\t\t\t\tobj[keyFunc(item, idx)] = valFunc(item, idx);\n\t\t\t\t}\n\t\t\t\treturn obj;\n\t\t\t};\n\t\t}\n\n\t\tif (Array.prototype.extend === undefined) {\n\t\t\tArray.prototype.extend = function () {\n\t\t\t\tvar otherArrays = arguments;\n\n\t\t\t\tfor (var i = 0; i < otherArrays.length; i++) {\n\t\t\t\t\tArray.prototype.push.apply(this, otherArrays[i]);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t};\n\t\t}\n\n\t\tif (Object.toArray === undefined) {\n\t\t\tObject.toArray = function (obj, valFunc) {\n\t\t\t\tvar keys = Object.keys(obj);\n\t\t\t\tvar arr = [];\n\t\t\t\tfor (var i = 0; i < keys.length; i++) {\n\t\t\t\t\tvar key = keys[i];\n\t\t\t\t\tvar val = obj[key];\n\t\t\t\t\tarr.push(valFunc(key, val));\n\t\t\t\t}\n\t\t\t\treturn arr;\n\t\t\t};\n\t\t}\n\n\t\tif (Object.values === undefined) {\n\t\t\tObject.values = function (obj) {\n\t\t\t\treturn Object.toArray(obj, function (key, val) {\n\t\t\t\t\treturn val;\n\t\t\t\t});\n\t\t\t};\n\t\t}\n\n\t\tif (Object.deepClone === undefined) {\n\t\t\tObject.deepClone = function (obj) {\n\t\t\t\tif (obj == null || typeof obj != \"object\") {\n\t\t\t\t\treturn obj;\n\t\t\t\t}\n\n\t\t\t\tif (obj instanceof Date) {\n\t\t\t\t\tlet copy = new Date();\n\t\t\t\t\tcopy.setTime(obj.getTime());\n\t\t\t\t\treturn copy;\n\t\t\t\t} else if (obj instanceof Array) {\n\t\t\t\t\tlet copy = obj.constructor();\n\t\t\t\t\tfor (let key in obj) {\n\t\t\t\t\t\tcopy[key] = Object.deepClone(obj[key]);\n\t\t\t\t\t}\n\t\t\t\t\treturn copy;\n\t\t\t\t} else if (obj instanceof Object) {\n\t\t\t\t\tlet copy = obj.constructor();\n\t\t\t\t\tfor (let key in obj) {\n\t\t\t\t\t\tif (Object.prototype.hasOwnProperty.call(obj, key)) {\n\t\t\t\t\t\t\tcopy[key] = Object.deepClone(obj[key]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn copy;\n\t\t\t\t}\n\n\t\t\t\treturn obj;\n\t\t\t};\n\t\t}\n\n\t\tif (Array.create === undefined) {\n\t\t\tArray.create = function (size, value) {\n\t\t\t\treturn Array.apply(null, Array(size)).map(function () {\n\t\t\t\t\treturn value;\n\t\t\t\t});\n\t\t\t};\n\t\t}\n\n\t\tif (String.compare === undefined) {\n\t\t\tString.compare = function (str1, str2) {\n\t\t\t\tif (str1 == str2) {\n\t\t\t\t\treturn 0;\n\t\t\t\t} else if (str1 > str2) {\n\t\t\t\t\treturn 1;\n\t\t\t\t} else {\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t}", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.52423906", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.52423906", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.52423906", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.52423906", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.52423906", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.52423906", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.52423906", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.52423906", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.52423906", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.52423906", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.52423906", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.52423906", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.52423906", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.52423906", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.52423906", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.52423906", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.52423906", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.52423906", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.52423906", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.52423906", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.52423906", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.52423906", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.52423906", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.52423906", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.52423906", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.52423906", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.52423906", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.52423906", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.52423906", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.52423906", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.52423906", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.52423906", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.52423906", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.52423906", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.52423906", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.52423906", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.52423906", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.52423906", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "dfbdc7a3daa3b9223c53834a26dedc70", "score": "0.5239804", "text": "initialize() {}", "title": "" }, { "docid": "dfbdc7a3daa3b9223c53834a26dedc70", "score": "0.5239804", "text": "initialize() {}", "title": "" }, { "docid": "dfbdc7a3daa3b9223c53834a26dedc70", "score": "0.5239804", "text": "initialize() {}", "title": "" }, { "docid": "dfbdc7a3daa3b9223c53834a26dedc70", "score": "0.5239804", "text": "initialize() {}", "title": "" }, { "docid": "c3aad09c1a3914006c44617bb7eb3340", "score": "0.5228578", "text": "getData() { }", "title": "" }, { "docid": "9b6cde66c4752b670374bb5219aea8e5", "score": "0.5224022", "text": "constructor() { return; }", "title": "" }, { "docid": "9b6cde66c4752b670374bb5219aea8e5", "score": "0.5224022", "text": "constructor() { return; }", "title": "" }, { "docid": "70819e26b9be24469d6ab99960275ffb", "score": "0.5216365", "text": "parse () {\n throw new Error('Not yet implemented');\n }", "title": "" }, { "docid": "17f371d4547356fc5b1437ee881d26a7", "score": "0.5197887", "text": "init (){ throw new Error('Program: must override this method.') }", "title": "" }, { "docid": "3f33847e7cd5e7686fee61252ff8d947", "score": "0.51930666", "text": "static initialize(obj, errorCode, status) { \n obj['errorCode'] = errorCode;\n obj['status'] = status;\n }", "title": "" }, { "docid": "e20d36a8b26e163da19fe04ae884c878", "score": "0.5192864", "text": "constructor() {\n throw new Error('Not implemented');\n }", "title": "" }, { "docid": "e20d36a8b26e163da19fe04ae884c878", "score": "0.5192864", "text": "constructor() {\n throw new Error('Not implemented');\n }", "title": "" }, { "docid": "f5900e45cade50bd56827ba77146ec3d", "score": "0.5190187", "text": "function _o(){}", "title": "" }, { "docid": "1efd35500d74088fe70786e3ac5190c5", "score": "0.5175553", "text": "function internals(){\n return {a: acc, b: brs, c: cnt, m: m, r: r};\n }", "title": "" }, { "docid": "c2a211a84dbf6e87a948da8397cc31fc", "score": "0.5163239", "text": "function CardUtilities() {\n }", "title": "" }, { "docid": "642b6f0f33109354fb910dbf1a4103b3", "score": "0.5145666", "text": "prepareData() {\n }", "title": "" }, { "docid": "2d0b0d06a77d38e465f532b1cf2e1118", "score": "0.51413214", "text": "__initialize() {}", "title": "" }, { "docid": "a8876659b1e84c5ba6d6559d3711e02e", "score": "0.51202893", "text": "function ValidationUtilities() {\n}", "title": "" }, { "docid": "c072101034c1862096135ed1b59ccdc3", "score": "0.5117332", "text": "constructor(from) {\n // Required, no polyfill\n this.Object = Object;\n this.Array = Array;\n this.Uint8Array = Uint8Array;\n this.Headers = Headers;\n this.Date = Date;\n this.console = console;\n const fill = transfer(from, this);\n // this below is mostly to make typescript happy.\n this.TextDecoder = fill.TextDecoder;\n this.TextEncoder = fill.TextEncoder;\n this.textDecoder = new this.TextDecoder('utf-8');\n this.textEncoder = new this.TextEncoder();\n this.fs = fill.fs;\n this.process = fill.process;\n this.crypto = fill.crypto;\n this.performance = fill.performance;\n }", "title": "" }, { "docid": "ca7e030a166b1aa263567eeea2b87587", "score": "0.51054245", "text": "static GetTransforms() {}", "title": "" }, { "docid": "f519383365e3977dc0df9482f3fd4c61", "score": "0.51042855", "text": "static getHelpers() {}", "title": "" }, { "docid": "7f5667c00d20b93d0daeb6b090bfbfe6", "score": "0.51039666", "text": "constructor() {\n\t\t// Lets load and expose the util librarie\n\t\tthis.util = ConfigamiContextUtils;\n\t}", "title": "" }, { "docid": "cbe30cbbffbe20e264f1c4f542dc4b30", "score": "0.50887686", "text": "getInfo() { return {}; }", "title": "" }, { "docid": "3918d7a7b9639eef1a78d424ef7ffe6e", "score": "0.507697", "text": "function lotSerializer() {\n}", "title": "" }, { "docid": "683cfd267e73f296f6978f79f644eb4f", "score": "0.50600964", "text": "function initConst() { \n///// \n\tlet { assign, create } = Object \n\t\n\treturn { 이보게젊은이, 대략, 대충 } \n\n// .. functions .. \nvar 받아왔어요 \nfunction 이보게젊은이( 널널한공간, 받아적어, ... 거시기 ) { \n\tlet 남은값 = [] \n\tassign( \n\t\t 받아왔어요 = 받아왔어요 || {} \n\t\t, ... 널널한공간 .map( t => 범위로뽑기( t, 남은값 ) ) \n\t\t) \n\tlet [ 시작값 ] = 남은값 \n\t시작값 && assign( 받아왔어요, new class { \n\t\t[ 시작값 ] = 받아적어 \n\t\t} ) // remain original function \n\tassign( \n\t\t 받아왔어요 \n\t\t, ... 거시기 .map( ( v, i ) => new class { \n\t\t\t[ 남은값[ i + 1 ] ] = ForV( v ) // extract one time \n\t\t\t} ) \n\t\t) \n\t\n\treturn `${ ForV( \n\t\t 시작값 ? 받아왔어요[ 시작값 ] : 받아적어 \n\t\t, ... 거시기 \n\t\t) }` \n\t} // -- 이보게젊은이() \n\nfunction 대략( ... ar ) { \n\treturn { toString } \n\t\n\tfunction toString() { // lazy loader with fix value .. \n\t\treturn `${ assign( this, 글자로뽑기( `${ 대충( ... ar ) }` ) ) }` \n\t\t} // -- toString() < 대략() \n\t} // -- 대략() \n\nfunction 대충( raw, ... ar ) { \n\treturn { toString } \n\t\n\tfunction toString() { // lazy loader with fix value .. \n\t\tvar rawa = [], ara = [] \n\t\tfor ( let [ p, v ] of raw .entries() ) { \n\t\t\tlet [ ra, ... aa ] = ttoraw( \n\t\t\t\t v \n\t\t\t\t, /(?<꾸밈>[\\s\\S]*?)(?<치환곽>\\{\\s*(?<치환자>[\\s\\S]+?)\\s*\\}|$)/g \n\t\t\t\t, ( traw, tar ) => ( \n\t\t\t\t\t\t all, rawv, arv, arvv, origin, position \n\t\t\t\t\t\t, { 꾸밈, 치환곽, 치환자 } \n\t\t\t\t\t\t) => { \n\t\t\t\t\ttraw .push( 꾸밈 ) \n\t\t\t\t\ttar .push( \n\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} \n\t\t\t\t) \n\t\t\tlet arp = ar[ p ] \n\t\t\t\n\t\t\trawa .push( ... ra ) \n\t\t\tara .push( ... aa, '' ) // continue with next \n\t\t\tarp && ( \n\t\t\t\t rawa .push( '' ) \n\t\t\t\t, ara .push( arp ) \n\t\t\t\t) \n\t\t\t} \n\t\tara .pop() // cut about pack \n\t\trawa = assign( create( rawa ), new class { \n\t\t\traw = rawa \n\t\t\t} ) \n\t\t\n\t\treturn getsetToString( this, String .raw( rawa, ... ara ) ) \n\t\t} // -- toString() < 대충() \n\t} // -- 대충() \n\nfunction getsetToString( o, t ) { \n\tlet F = o .toString = q => t \n\treturn F( t ) \n\t} // -- getsetToString() \n\nfunction 있는대로만( { raw }, ... ar ) { \n\tlet printIndex = -1 \n\treturn new class { \n\t\ttoString = q => String .raw( { raw }, ( \n\t\t\t printIndex += 1 \n\t\t\t, ar .map( a => a ?.[ printIndex ] || '' ) \n\t\t\t) ) \n\t\tsourceFrom = [ raw, ... ar ] \n\t\t} \n\t} // -- 있는대로만() \n\nfunction ttoraw( t, regv, regF ) { \n\tlet raw = [] \n\tlet ar = [] \n\tlet rpop, apop \n\t\n\tt .replace( regv, regF( raw, ar ) ) \n\twhile ( \n\t\t\t[ rpop = raw .pop(), apop = ar .pop() ] \n\t\t\t\t.every( v => ! v ) \n\t\t\t&& raw .length \n\t\t\t) { \n\t\t} \n\t\n\t apop ? ( raw .push( rpop, '' ), ar .push ( apop ) ) \n\t: rpop && ( raw .push( rpop ), ar .push ( apop ) ) \n\t\n\traw .raw = raw \n\t raw .length ? ( ar .length = raw .length - 1 ) \n\t: raw .push( '' ) \n\t\n\treturn [ raw, ... ar ] \n\t} // -- ttoraw() \n\nfunction 글자로뽑기( t ) { \n\treturn 있는대로만( ... ttoraw( t \n\t\t, /(?<꾸밈>[^[]*)(?<돌돌이곽>\\[(?<돌돌이>[^\\]]*?)\\])?/g \n\t\t, ( raw, ar ) => ( \n\t\t\t\t all, rawv, arv, arvv, origin, position \n\t\t\t\t, { 꾸밈, 돌돌이곽, 돌돌이 } \n\t\t\t\t) => { \n\t\t\traw .push( 꾸밈 ) \n\t\t\tar .push( 돌돌이곽 && 돌돌이 .split( ',' ) ) \n\t\t\t} \n\t\t) ) \n\t} // -- 글자로뽑기() \n\nfunction 범위로뽑기( t, 남은값 ) { \n\tlet [ raw, ... ar ] = ttoraw( t \n\t\t, /\\s*(?<제목>[^{]*?)\\s*(?<내용칸>\\{\\s*(?<내용>[^}]*?)\\s*\\}|$)/g \n\t\t, ( raw, ar ) => ( \n\t\t\t\t all, rawv, arv, arvv, origin, position \n\t\t\t\t, { 제목, 내용칸, 내용 } \n\t\t\t\t) => { \n\t\t\traw .push( 제목 ) \n\t\t\tar .push( 내용칸 && 내용 ) \n\t\t\t} \n\t\t) \n\t남은값 .push( raw[ ar .length ] ) \n\treturn ar .length ? assign( ... ar .map( ( t, p ) => new class { \n\t\t\t[ raw[ p ] ] = 글자로뽑기( t ) \n\t\t\t} ) ) \n\t\t: {} \n\t} // -- 범위로뽑기() \n\nfunction ForV( o, ... ar ) { return o instanceof Function ? new class { \n\ttoString = q => `${ o( 받아왔어요, ... ar ) }` \n\t} : o } // -- ForV() \n\n///// \n} // -- initConst() ", "title": "" }, { "docid": "04b1e91b71527eabd31ee448abf91b48", "score": "0.5049633", "text": "static initialize(obj, info, stats, executions, failures) { \n obj['info'] = info;\n obj['stats'] = stats;\n obj['executions'] = executions;\n obj['failures'] = failures;\n }", "title": "" }, { "docid": "dfce9b4a03c1fdba5ecfd598c0bd8749", "score": "0.5034589", "text": "function ResourceFetcher(){\n\t\t\n\t}", "title": "" }, { "docid": "4b3ff4bbc27c9cdec421c78e176a9ecc", "score": "0.5034446", "text": "function Wrapper(){\n}", "title": "" }, { "docid": "8e0d47c54af8e39572800bc9124ead10", "score": "0.5034091", "text": "initialize() { }", "title": "" }, { "docid": "2485935986fec9e0b189e3f949573e19", "score": "0.5032587", "text": "static initialize(obj, amount, convertedAmount, exchangeRateUnit, name, recipient, sender, symbol, tokenDecimals, type) { \n obj['amount'] = amount;\n obj['convertedAmount'] = convertedAmount;\n obj['exchangeRateUnit'] = exchangeRateUnit;\n obj['name'] = name;\n obj['recipient'] = recipient;\n obj['sender'] = sender;\n obj['symbol'] = symbol;\n obj['tokenDecimals'] = tokenDecimals;\n obj['type'] = type;\n }", "title": "" }, { "docid": "71f84ccc1e3e500def02f0b333f25ec0", "score": "0.50296146", "text": "function TMP(){}", "title": "" }, { "docid": "71f84ccc1e3e500def02f0b333f25ec0", "score": "0.50296146", "text": "function TMP(){}", "title": "" }, { "docid": "71f84ccc1e3e500def02f0b333f25ec0", "score": "0.50296146", "text": "function TMP(){}", "title": "" }, { "docid": "71f84ccc1e3e500def02f0b333f25ec0", "score": "0.50296146", "text": "function TMP(){}", "title": "" }, { "docid": "71f84ccc1e3e500def02f0b333f25ec0", "score": "0.50296146", "text": "function TMP(){}", "title": "" }, { "docid": "71f84ccc1e3e500def02f0b333f25ec0", "score": "0.50296146", "text": "function TMP(){}", "title": "" }, { "docid": "098b638b02e39c8926f6ae353a9592f6", "score": "0.5022748", "text": "function TMP() {}", "title": "" }, { "docid": "098b638b02e39c8926f6ae353a9592f6", "score": "0.5022748", "text": "function TMP() {}", "title": "" } ]
511515438b60ea3065a23d471c902b39
get Icon for HTMLWindow
[ { "docid": "c6d22352fe923988bda5fb8f87d2f319", "score": "0.61823535", "text": "function getInfoicon(url) {\n // var url = url zum Icon\n if (url) {\n var inconhtml = \"<img src=\\\"\"+url+\"\\\" width=\\\"28\\\" height=\\\"40\\\" border=\\\"0\\\" alt=\\\"\\\" title=\\\"\\\" align=\\\"left\\\" style=\\\"margin-right:10px;\\\"/>\";\n } else {\n var inconhtml = \"\";\n }\n return inconhtml;\n }", "title": "" } ]
[ { "docid": "ee121e2070ae32c66c11dc4f73565893", "score": "0.70071995", "text": "getIcon() {\r\n return undefined;\r\n }", "title": "" }, { "docid": "17cd8ac97272db430381feed79458591", "score": "0.6905634", "text": "get icon() {\n const { ORIGIN, EXTENSION_MAIN_FOLDER } = GLOBAL_CONSTANTS;\n return `${ORIGIN}${EXTENSION_MAIN_FOLDER}/${this.currentParameters.icon}`;\n }", "title": "" }, { "docid": "0eb725ff30dc2ad5143abb3ffc57a564", "score": "0.6607517", "text": "get icon() {\n return getPropertyFromData(this, 'icon');\n }", "title": "" }, { "docid": "5e74ace9bda74aecfaaa687aad9d693e", "score": "0.6516903", "text": "getIconPath(){\n\t\tconst icon = this.icon.split('.svg').shift();\n\t\treturn 'media/wrapper_icons/'+esc(icon)+'.svg';\n\t}", "title": "" }, { "docid": "dfa1f4fefcb661ee78dc332fef3f3eaf", "score": "0.64742225", "text": "function icon(data) {\n return ele('img class=\"icon\" alt=\"\" src=\"{0}\"'.i(data));\n }", "title": "" }, { "docid": "bbafa79ab7e5df332702bb613a3e9a2e", "score": "0.6446701", "text": "findIcon() {\n const iconset = document.iconMap[this._iconset];\n if (!iconset) return;\n\n // Create a temporary template to find new created icons\n const _tpl = document.createElement('template');\n iconset.forEach(icon => _tpl.appendChild(icon));\n let icon = _tpl.querySelector(`#${this._icon}`);\n if (!icon) return console.error(`[lit-icon] Icon '${this._icon}' no found in iconset`);\n\n this.shadowRoot.querySelector(\"i\").innerHTML = \"\";\n this._cloneIcon(icon);\n }", "title": "" }, { "docid": "9695c922b86dad39236936ba735db37a", "score": "0.63753915", "text": "function MatIconLocation() { }", "title": "" }, { "docid": "e9320576a2435e66f2f614b1dbce7dcf", "score": "0.63515025", "text": "function getPaletteIcon(){}", "title": "" }, { "docid": "2ca151eeaec6dffec1778148c90982a4", "score": "0.63079304", "text": "function _getIconName(icon) {\n return (shell_version[1] < 6 ? icon : icon + '-symbolic');\n}", "title": "" }, { "docid": "f743dfd23acefe78c179437dc1e76836", "score": "0.63000154", "text": "function getBookmarkIcon(b)\n{\n\tvar icon = $('<img>', {src: b.icon, class: 'icon'});\n\n\tif (!b.icon)\n\t{\n\t\tvar standardIcon = getIconSrc(b.url);\n\t\tif (!standardIcon)\n\t\t\ticon = $('<h1 class=\"icon\">').html(getDomainName(b.url, -1).slice(0,2).toUpperCase());\n\t\telse\n\t\t\ticon.attr({src: _iconsDir + '/' + standardIcon});\n\t}\n\treturn icon;\n}", "title": "" }, { "docid": "0551065cb2a818cfb17e77e1d8a59d69", "score": "0.6299021", "text": "function iconPicker()\r\n{\r\n\tvar\t\tgif = encodeURIComponent( document.InfoPropertiesFrm.nodeGIF.value );\r\n\tvar\t\tname = encodeURIComponent( document.InfoPropertiesFrm.docName.value );\r\n\tvar\t\tw = window.open( oscriptValues.urlPrefix + \"?func=ll.iconpicker&form=InfoPropertiesFrm&defIcon=\" + gif+\"&docName=\" + name, 'IconPicker','width=460,height=335,resizable=yes,scrollbars=yes,menubar=no');\r\n}", "title": "" }, { "docid": "8897c7ba5f39e6be949b06f9d8de5aa9", "score": "0.62644655", "text": "get iconUrl() {\n return this.isFolder ? './img/folder.png' : `chrome://favicon/${this.url}`;\n }", "title": "" }, { "docid": "2ecfb31eeffaa5ed1f69ebc6880a7897", "score": "0.62522006", "text": "function Icon({name}) {\n\t if (name === \"home\") return Baseline_home_24px;\n\t if (name === \"add\") return Baseline_add_24px;\n\t if (name === \"remove\") return Baseline_remove_24px;\n\t}", "title": "" }, { "docid": "f7406c7337c42f2a2a614f2548e21c44", "score": "0.6202115", "text": "getIcon(row, col){}", "title": "" }, { "docid": "570f64998c7c3748a573cd1f78ab7888", "score": "0.61819535", "text": "function SetIconLocation()\r\n {\r\n var icon = new GIcon();\r\n \r\n icon.image = _XmlMarkerIcon; //\"<% =WebResource(\"ZimWeb.Web.UI.Resources.Flagicon.png\") %>\";\r\n SetIconProperties(icon);\r\n\r\n return icon;\r\n }", "title": "" }, { "docid": "7d8b3095019c404a0b92f8f019c0aef0", "score": "0.61102235", "text": "function getIconHtml(name) {\n\treturn \"<i class='\" + name + \"'></i>\";\n}", "title": "" }, { "docid": "ae24caa31cadc6df9ced6ea44eebc3bc", "score": "0.61034185", "text": "get svgIcon() { return this._svgIcon; }", "title": "" }, { "docid": "ae24caa31cadc6df9ced6ea44eebc3bc", "score": "0.61034185", "text": "get svgIcon() { return this._svgIcon; }", "title": "" }, { "docid": "ae24caa31cadc6df9ced6ea44eebc3bc", "score": "0.61034185", "text": "get svgIcon() { return this._svgIcon; }", "title": "" }, { "docid": "6f4638511345eded80667a27e0c92739", "score": "0.6100719", "text": "function getIconHTML(icon_id) {\n if (!icon_id) {\n return \"\";\n }\n const icon_container = document.body.createEl(\"div\"); // A temporary element, will be deleted soon. Not nice to create a temporary element in the body, but I don't know any better way.\n obsidian.setIcon(icon_container, icon_id);\n const icon_html = icon_container.innerHTML;\n icon_container.remove();\n return icon_html;\n}", "title": "" }, { "docid": "715c2dc2f100504ee59d721c8b179b31", "score": "0.60495365", "text": "function addAddressBarIcon(window) {\n if (!window) return;\n\n let icon = window.document.createElement('image')\n icon.id = \"ofm-icon\";\n icon.src = 'chrome://jid1-tk1zvlzoqnphua-at-jetpack/swag_fm/data/apple-touch-icon.png';\n\n let urlbarIcons = window.document.getElementById('urlbar-icons');\n urlbarIcons.insertBefore(icon, urlbarIcons.firstChild);\n\n console.log(icon.src);\n\n}", "title": "" }, { "docid": "666de0b5b3e27de740687c7044cd4f88", "score": "0.6014947", "text": "function icon( css=null, tip=null, inner=\"\", id=null, style=null, click=null ) {\n var s='<i';\n if ( tip ) s+= ' alt=\"'\n if ( id ) s+=' id=\"'+id+'\"';\n if ( css ) s+=' class=\"'+css+'\"';\n if ( style ) s+=' style=\"'+style+'\"';\n if ( click ) s+=' onclick=\"javascript:'+click+'\"';\n s+='>';\n return s+inner+'</i>';\n}", "title": "" }, { "docid": "1864f6fe0e87b6d8eb5de31336cd8e1e", "score": "0.5999724", "text": "createNotificationIcon() {\n\t\treturn Icon.createStatusIcon('jenkins_headshot_notify');\n\t}", "title": "" }, { "docid": "ac77c97c142544879d64845bdb7a0312", "score": "0.59984756", "text": "get icon() {\n return this.detail.icon || this.defaultIcon;\n }", "title": "" }, { "docid": "29c8a779bfd32cf5820311944d89c0a0", "score": "0.59973705", "text": "getIcon(icon) {\n return `//openweathermap.org/img/w/${icon}.png`;\n }", "title": "" }, { "docid": "49ffaf7161242898f03eb6658d511c6c", "score": "0.59886485", "text": "getSVGIconName(icon) {\n return `spectrum-icon-${icon}`;\n }", "title": "" }, { "docid": "80adb8405e985bf56a4948d787eeabc5", "score": "0.59381545", "text": "function getIconTitleAndUpdateIcon(){\n iconTitle = browser.browserAction.getTitle({tabId: currentTabId});\n iconTitle.then(updateIcon);\n}", "title": "" }, { "docid": "94fedce79f2f758868b333de0a958469", "score": "0.5928332", "text": "function image(oIcon) {\n\t\t\t\tvar oImage = new Image({\n\t\t\t\t\tid: sDialogId + \"--icon\",\n\t\t\t\t\ttooltip: rb && rb.getText(\"MSGBOX_ICON_\" + oIcon),\n\t\t\t\t\tdecorative: true\n\t\t\t\t});\n\t\t\t\toImage.addStyleClass(\"sapUiMboxIcon\");\n\t\t\t\toImage.addStyleClass(mIconClass[oIcon]);\n\t\t\t\treturn oImage;\n\t\t\t}", "title": "" }, { "docid": "d3a90528352f408c127bf718b7f06568", "score": "0.59127593", "text": "static get tag() {\n return \"simple-icon\";\n }", "title": "" }, { "docid": "065a989fe85e05f42b4801bab92ee58f", "score": "0.58357763", "text": "get fontIcon() { return this._fontIcon; }", "title": "" }, { "docid": "065a989fe85e05f42b4801bab92ee58f", "score": "0.58357763", "text": "get fontIcon() { return this._fontIcon; }", "title": "" }, { "docid": "065a989fe85e05f42b4801bab92ee58f", "score": "0.58357763", "text": "get fontIcon() { return this._fontIcon; }", "title": "" }, { "docid": "963039c142aa94b4e8e27173d5183ef9", "score": "0.5834049", "text": "function RResource_iconUrlPath(path, type){\n var o = this;\n //var rc = top.RContext;\n path = RString.nvl(path, 'n').replace(/\\./g, '/') + '.' + RString.nvl(type, 'gif');\n //if(RString.startsWith(path, '#')){\n // path = path.substr(1);\n // return 'url(' + rc.context(rc.uriIcon + '/' + path) + ')';\n //}\n return RBrowser.contentPath('/ars/icon/' + path);\n //return 'url(' + rc.context('/ars/icon/' + path) + ')';\n}", "title": "" }, { "docid": "3dc7117cd27b8ae007b04472ba5c32be", "score": "0.58045954", "text": "function getIcon() {\n var _icons$options$0$icon;\n\n if (buttonIcon) {\n return buttonIcon;\n }\n\n var activeOption = options.find(function (control) {\n return control.value === currentValue;\n });\n\n if (activeOption) {\n var _icons$activeOption$i;\n\n return (_icons$activeOption$i = _eightshift_frontend_libs_scripts__WEBPACK_IMPORTED_MODULE_5__[\"icons\"][activeOption.icon]) !== null && _icons$activeOption$i !== void 0 ? _icons$activeOption$i : activeOption.icon;\n }\n\n return (_icons$options$0$icon = _eightshift_frontend_libs_scripts__WEBPACK_IMPORTED_MODULE_5__[\"icons\"][options[0].icon]) !== null && _icons$options$0$icon !== void 0 ? _icons$options$0$icon : options[0].icon;\n } // Get the right container component and options", "title": "" }, { "docid": "bd465a329a3a1379f425aa32f298e232", "score": "0.58044404", "text": "getButtonIcon() {\n let svg = document.createElement( 'svg' );\n svg.innerHTML = `<svg width=\"18\" height=\"4\" viewBox=\"0 0 18 4\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M2.5 0C1.39543 0 0.5 0.89543 0.5 2C0.5 3.10457 1.39543 4 2.5 4C3.60457 4 4.5 3.10457 4.5 2C4.5 0.89543 3.60457 0 2.5 0ZM9 0C7.89543 0 7 0.89543 7 2C7 3.10457 7.89543 4 9 4C10.1046 4 11 3.10457 11 2C11 0.89543 10.1046 0 9 0ZM15.5 0C14.3954 0 13.5 0.89543 13.5 2C13.5 3.10457 14.3954 4 15.5 4C16.6046 4 17.5 3.10457 17.5 2C17.5 0.89543 16.6046 0 15.5 0Z\" fill=\"#333333\"/>\n </svg>`;\n return svg;\n }", "title": "" }, { "docid": "336694497201fe5fbe0745f7ea7cb1dc", "score": "0.58003545", "text": "mapToIcon(filename, size = 0, progId = \"\") {\n return (0,_operations_js__WEBPACK_IMPORTED_MODULE_8__.spGet)(this.clone(Web, `maptoicon(filename='${(0,_utils_escapeQueryStrValue_js__WEBPACK_IMPORTED_MODULE_9__.escapeQueryStrValue)(filename)}', progid='${(0,_utils_escapeQueryStrValue_js__WEBPACK_IMPORTED_MODULE_9__.escapeQueryStrValue)(progId)}', size=${size})`));\n }", "title": "" }, { "docid": "f1773240819b94b9e1082a5e63fc6edd", "score": "0.579621", "text": "function createIcon()\r\n {\r\n isIconDefault= true;\r\n var icon = new GIcon();\r\n \r\n //if user does not specify the icon's path\r\n if(_iconPath.length == 0)\r\n { \r\n //default\r\n if(_icon == \"default\")\r\n {\r\n isIconDefault=true;\r\n \r\n SetIconProperties(icon);\r\n }\r\n else if(_icon == \"flag\")\r\n {\r\n isIconDefault=false;\r\n //flag icon\r\n icon.image = \"<% =WebResource(\"ZimWeb.Web.UI.Resources.Flagicon.png\") %>\";\r\n SetIconProperties(icon);\r\n }\r\n else if(_icon == \"home\")\r\n {\r\n isIconDefault=false;\r\n //home icon\r\n icon.image = \"<% =WebResource(\"ZimWeb.Web.UI.Resources.homeicon.png\") %>\";\r\n //icon.image = \"http://maps.google.com/mapfiles/kml/pal3/icon56.png\";\r\n SetIconProperties(icon);\r\n }\r\n else if(_icon == \"bubble\")\r\n {\r\n isIconDefault=false;\r\n //bubble icon\r\n icon.image = \"<% =WebResource(\"ZimWeb.Web.UI.Resources.bubbleicon.png\") %>\";\r\n SetIconProperties(icon);\r\n }\r\n else if(_icon == \"building\")\r\n {\r\n isIconDefault=false;\r\n //Building icon\r\n icon.image = \"<% =WebResource(\"ZimWeb.Web.UI.Resources.buildingicon.png\") %>\";\r\n SetIconProperties(icon);\r\n }\r\n else if(_icon == \"info\")\r\n {\r\n isIconDefault=false;\r\n //info icon\r\n icon.image = \"<% =WebResource(\"ZimWeb.Web.UI.Resources.Info_icon.png\") %>\";\r\n\r\n SetIconProperties(icon);\r\n }\r\n else if(_icon == \"smiley\")\r\n {\r\n isIconDefault=false;\r\n //smiley icon\r\n icon.image = \"<% =WebResource(\"ZimWeb.Web.UI.Resources.smiley01.png\") %>\";\r\n\r\n SetIconProperties(icon);\r\n }\r\n }\r\n //if user specify the path where the icon is located\r\n else\r\n {\r\n isIconDefault=false;\r\n icon.image = _iconPath;\r\n SetIconProperties(icon);\r\n }\r\n return icon;\r\n }", "title": "" }, { "docid": "60799fb9b89c81609bf4de29b368ba7a", "score": "0.5777357", "text": "get minimizeIconTemplate() {\n\t\treturn this.nativeElement ? this.nativeElement.minimizeIconTemplate : undefined;\n\t}", "title": "" }, { "docid": "2d15f8359c096ef21c44df2801f4ad74", "score": "0.576335", "text": "getIconForMimeType(mimetype) {\n var icon = Cats.IDE.icons.mimetype[mimetype] || Cats.IDE.icons.mimetype[\"text/plain\"];\n return icon;\n }", "title": "" }, { "docid": "f1af718a2bd7c05bcf955d0f5d75bda5", "score": "0.57534677", "text": "setSrcByIcon(context) {\n this.src = window.SimpleIconset.requestAvailability().getIcon(this.icon, context);\n return this.src;\n }", "title": "" }, { "docid": "cfd1d350c02913755024d5dcb7339f36", "score": "0.57369596", "text": "function getIcon(code) {\n\treturn `http://openweathermap.org/img/wn/${code}@2x.png`\n}", "title": "" }, { "docid": "e7675c62c9b9b45df8b3a03abbbe846a", "score": "0.5728549", "text": "mapToIcon(filename, size = 0, progId = \"\") {\n return Object(_operations_js__WEBPACK_IMPORTED_MODULE_9__[\"spGet\"])(this.clone(Web, `maptoicon(filename='${Object(_utils_escapeQueryStrValue_js__WEBPACK_IMPORTED_MODULE_10__[\"escapeQueryStrValue\"])(filename)}', progid='${Object(_utils_escapeQueryStrValue_js__WEBPACK_IMPORTED_MODULE_10__[\"escapeQueryStrValue\"])(progId)}', size=${size})`));\n }", "title": "" }, { "docid": "afdb22afaae2507356c61ec0fc543284", "score": "0.5725995", "text": "_getIconPixBuf() {\n let iconTexture = this._app.create_icon_texture(16);\n\n if (themeLoader === null) {\n let ifaceSettings = new Gio.Settings({ schema: \"org.gnome.desktop.interface\" });\n\n themeLoader = new Gtk.IconTheme(),\n themeLoader.set_custom_theme(ifaceSettings.get_string('icon-theme')); // Make sure the correct theme is loaded\n }\n\n // Unable to load the icon texture, use fallback\n if (iconTexture instanceof St.Icon === false) {\n return null;\n }\n\n iconTexture = iconTexture.get_gicon();\n\n // Unable to load the icon texture, use fallback\n if (iconTexture === null) {\n return null;\n }\n\n if (iconTexture instanceof Gio.FileIcon) {\n // Use GdkPixBuf to load the pixel buffer from the provided file path\n return GdkPixbuf.Pixbuf.new_from_file(iconTexture.get_file().get_path());\n }\n\n // Get the pixel buffer from the icon theme\n let icon_info = themeLoader.lookup_icon(iconTexture.get_names()[0], DOMINANT_COLOR_ICON_SIZE, 0);\n if (icon_info !== null)\n return icon_info.load_icon();\n else\n return null;\n }", "title": "" }, { "docid": "b7fa845f461968be601626b9fa1eaea6", "score": "0.5714114", "text": "function createIcon(name, size) {\n\timg = new Image();\n\timg.src = 'http://img.tweetimag.es/i/' + name + '_' + size;\n\treturn img;\n}", "title": "" }, { "docid": "af989eab0c36a49f8d729850fd6553d0", "score": "0.57055324", "text": "getIconClass() {\n return 'layer-poll-message-view-icon';\n }", "title": "" }, { "docid": "5cb5c15dea70311ccccfe7bfbd46a4c3", "score": "0.570523", "text": "function icon(cmd) {\n\n return (typeof cmd.icon !== 'undefined') ? 'fa fa-' + cmd.icon : '';\n\n}", "title": "" }, { "docid": "052e447d73c5043cd39efbff09501641", "score": "0.569965", "text": "function IoIosCopy(props){return GenIcon({\"tag\":\"svg\",\"attr\":{\"viewBox\":\"0 0 512 512\"},\"child\":[{\"tag\":\"path\",\"attr\":{\"d\":\"M352 115h90c3.3 0 6-2.7 6-6 0-8.2-3.7-16-10-21.3l-77.1-64.2c-4.9-4.1-14.2-7.4-20.6-7.4-4.1 0-7.4 3.3-7.4 7.4V96c.1 10.5 8.6 19 19.1 19z\"}},{\"tag\":\"path\",\"attr\":{\"d\":\"M307 96V16H176c-17.6 0-32 14.4-32 32v336c0 17.6 14.4 32 32 32h240c17.6 0 32-14.4 32-32V141h-96c-24.8 0-45-20.2-45-45z\"}},{\"tag\":\"path\",\"attr\":{\"d\":\"M116 412V80H96c-17.6 0-32 14.4-32 32v352c0 17.6 14.4 32 32 32h256c17.6 0 32-14.4 32-32v-20H148c-17.6 0-32-14.4-32-32z\"}}]})(props);}", "title": "" }, { "docid": "a49daf46bd47e7bd0175b9b3d177cf66", "score": "0.5698741", "text": "function getIconSrc(url)\n{\n\tvar domain = getDomainName(url, 1);\n\n\t// TODO: look into getting JSON listing of a directory\n\tfor (var i = 0; i < ICONS.length; i++)\n\t{\n\t\tif (ICONS[i].indexOf(domain) !== -1)\n\t\t\treturn ICONS[i];\n\t}\n\treturn null;\n}", "title": "" }, { "docid": "70f7cf5a86c2d0e253eb94141bc5ee5e", "score": "0.56920373", "text": "function _getIcon(opts, type){\n\treturn opts.map[type];\n}", "title": "" }, { "docid": "f72d31d80869089c367007373173a4e7", "score": "0.56793463", "text": "function renderFileUploadCancelIcon() {\r\n\t\tvar $icon = $('div#jfu_markup_templates').find('div.jfu_uploads_cancel').clone();\r\n\t\treturn $icon;\r\n\t}", "title": "" }, { "docid": "9e20a360aba9fb51355dbc064460bdb3", "score": "0.56765616", "text": "function getWeatherIcon(felix){\n return 'wi-' + felix.toLowerCase();\n }", "title": "" }, { "docid": "732599569752b19afc7681d71ec5a754", "score": "0.56370735", "text": "function showBrokenImageIcon(){I.contentStyles.push(\"img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}\")}", "title": "" }, { "docid": "93c06d62a1f47b3de78bd831c2266fb3", "score": "0.56199145", "text": "function SetIconProperties(icon)\r\n {\r\n icon.iconAnchor = new GPoint(6,20);\r\n icon.infoWindowAnchor = new GPoint(5, 2);\r\n }", "title": "" }, { "docid": "d9a65362403ee7874fb959e889fba12b", "score": "0.5604841", "text": "function get_external_icon (lrg_status) {\n var src=\"img/external_link_green.png\";\n if (lrg_status != 0) {\n src = \"../\"+src\n }\n return '<img src=\"'+src+'\" class=\"external_link\" alt=\"External link\" title=\"External link\" />';\n}", "title": "" }, { "docid": "5a8d23d3ac1558ce3dcd774ef0b48833", "score": "0.5597202", "text": "function displayIcon(n){\n\tswitch(n) {\n\t\tcase \"clear-day\":\n \t\treturn \"img/Sun.svg\";\n \t\tbreak;\n \tcase \"clear-night\":\n \t\treturn \"img/clearnight.svg\";\n \t\tbreak;\n \tcase \"rain\":\n \t\treturn \"img/rain.svg\";\n \t\tbreak;\n \tcase \"snow\":\n \t\treturn \"img/snow.svg\";\n \t\tbreak;\n \tcase \"sleet\":\n \t\treturn \"img/sleet.svg\";\n \t\tbreak;\n \tcase \"wind\":\n \t\treturn \"img/windy.svg\";\n \t\tbreak;\n \tcase \"fog\":\n \t\treturn \"img/fog.svg\";\n \t\tbreak;\n \tcase \"cloudy\":\n \t\treturn \"img/cloudy.svg\";\n \t\tbreak;\n \tcase \"partly-cloudy-day\":\n \t\treturn \"img/partlycloudyday.svg\";\n \t\tbreak;\n \tcase \"partly-cloudy-night\":\n \t\treturn \"img/partlycloudynight.svg\";\n \t\tbreak;\n \tcase \"hail\":\n \t\treturn \"img/hail.svg\";\n \t\tbreak;\n \tcase \"thunderstorm\":\n \t\treturn \"img/lightning.svg\";\n \t\tbreak;\n \tcase \"tornado\":\n \t\treturn \"img/tornado.svg\";\n \t\tbreak;\n \t\tdefault:\n \t\t// code block\n\t}\n}", "title": "" }, { "docid": "068f809538d597ecd77dab1274db99c0", "score": "0.5578501", "text": "async validateIcon() {\n // TODO: maybe recommend the icon builder website.\n try {\n var _this$manifest$ios$ic, _this$manifest$ios2;\n\n const icon = (_this$manifest$ios$ic = (_this$manifest$ios2 = this.manifest.ios) === null || _this$manifest$ios2 === void 0 ? void 0 : _this$manifest$ios2.icon) !== null && _this$manifest$ios$ic !== void 0 ? _this$manifest$ios$ic : this.manifest.icon;\n\n if (!icon) {\n // icon is optional\n return;\n }\n\n await (0, _image().ensurePNGIsNotTransparent)(icon);\n } catch (err) {\n if (err instanceof _xdl().XDLError) {\n throw err;\n } else {// something weird happened, let's assume the icon is correct\n }\n }\n }", "title": "" }, { "docid": "d2da9776e8859e07e1cd09caedc7bddb", "score": "0.5569568", "text": "function getIcon(data) {\n if (data.green) {\n // Green\n if (data.icon) {\n // Special icon\n return data.icon;\n }\n return 'green';\n }\n\n if (data.data === false) {\n // Not enough data for the domain, show question\n return 'greenquestion';\n }\n return 'grey';\n}", "title": "" }, { "docid": "b86a63b7ae39b80352680a181bc7d04d", "score": "0.55652136", "text": "function getIconUrl(name) {\n return name\n ? path.join(\n __dirname,\n '../../icons/',\n name.split('-')[0] + '.svg#' + name\n )\n : ''\n}", "title": "" }, { "docid": "ff7f8aae408faea55df5aeb82d19d735", "score": "0.556134", "text": "setIcon(row, col, icon){}", "title": "" }, { "docid": "f98d7cd5db71b1c8ee9231c48ce92d85", "score": "0.5559934", "text": "getMarkerIcon() {\n throw new Error('The `getMarkerIcon` method must be implemented.');\n }", "title": "" }, { "docid": "7b4621c160ab8fd76d93ddb72a968b5a", "score": "0.55560046", "text": "function touchIcon() {\n for(var i = 0; i < document.getElementsByTagName(\"link\").length; i++) {\n if(document.getElementsByTagName(\"link\")[i].rel == 'apple-touch-icon') {\n var orig = document.getElementsByTagName(\"link\")[i];\n }\n }\n document.getElementsByTagName(\"head\")[0].removeChild(orig);\n var icon = document.createElement(\"link\");\n icon.rel = \"apple-touch-icon\";\n icon.href = \"https://images.wikia.nocookie.net/__cb20110401032707/shrek/images/archive/b/bc/20111029054549%21Wiki.png\";\n document.getElementsByTagName(\"head\")[0].appendChild(icon);\n }", "title": "" }, { "docid": "486e2b104988e4cd7759f26249e3fe5c", "score": "0.55429024", "text": "async function getIcon(name) {\n var primaryPath = ALLIEQPZM_ICONS_MAP[name];\n return {\n path: primaryPath,\n viewBox: \"0 0 24 24\"\n };\n return { path: ALLIEQPZM_ICONS_MAP[name] };\n}", "title": "" }, { "docid": "ed2dc70596fd94bfb08e76be9bf3e0db", "score": "0.553927", "text": "function getAppIcon(activityType) {\n return Configuration.getBaseUrl() + 'style/images/' + activityType + '.png';\n }", "title": "" }, { "docid": "008211e879da1845075225f4ae4a9a52", "score": "0.5538398", "text": "function usingIcon(icon) {\n let iconPath = \"https://openweathermap.org/img/w/\" + icon + \".png\";\n return iconPath;\n}", "title": "" }, { "docid": "7a60ce7c84271d0fe413dc4896f17169", "score": "0.5529944", "text": "function get_elearning_remote_iconuri(iconname)\n{\n if (iconname.startsWith(\"filetype-\")) {\n switch (iconname.substring(9).toLowerCase()) {\n case \"ppt\": case \"pptx\": return \"https://elearning.fudan.edu.cn/library/image/sakai/ppt.gif\";\n case \"doc\": case \"docx\": return \"https://elearning.fudan.edu.cn/library/image/sakai/word.gif\";\n case \"xls\": case \"xlsx\": return \"https://elearning.fudan.edu.cn/library/image/sakai/excel.gif\";\n case \"pdf\": return \"https://elearning.fudan.edu.cn/library/image/sakai/pdf.gif\";\n case \"jpg\": case \"jpeg\": case \"png\": case \"gif\": case \"bmp\": case \"tif\": case \"tiff\":\n return \"https://elearning.fudan.edu.cn/library/image/sakai/image.gif\";\n case \"zip\": case \"rar\": case \"dmg\": case \"7z\": case \"tar\": case \"xz\": case \"gz\": case \"bz2\":\n return \"https://elearning.fudan.edu.cn/library/image/sakai/compressed.gif\";\n case \"txt\": case \"c\": case \"cpp\": case \"h\": case \"java\": case \"py\": case \"sh\": case \"sql\":\n return \"https://elearning.fudan.edu.cn/library/image/sakai/text.gif\";\n case \"htm\": case \"html\": case \"js\": case \"css\": case \"json\":\n return \"https://elearning.fudan.edu.cn/library/image/sakai/html.gif\";\n case \"exe\": case \"jar\": case \"class\": case \"o\": case \"a\":\n return \"https://elearning.fudan.edu.cn/library/image/sakai/binary.gif\";\n default: return \"https://elearning.fudan.edu.cn/library/image/sakai/generic.gif\";\n }\n }\n\n if (iconname == \"famfamfam\") {\n return \"https://elearning.fudan.edu.cn/library/image/silk/fff-sprites/images/famfamfam.png\";\n }\n\n console.log(\"icon not found: \", iconname);\n return \"https://elearning.fudan.edu.cn/library/image/sakai/generic.gif\"; // fallback\n}", "title": "" }, { "docid": "68c333d487e41eed23ca4a65aaa6c2b4", "score": "0.5525584", "text": "function readIcon(input) {\n if (input.files && input.files[0]) {\n var reader = new FileReader();\n reader.onload = function (e) {\n $('#icon_file_preview')\n .attr('src', e.target.result)\n .width(100)\n .height(auto);\n };\n reader.readAsDataURL(input.files[0]);\n }\n }", "title": "" }, { "docid": "a3974e96a95581997e3a8a7d51f1557a", "score": "0.5521368", "text": "function getFaIcon(name){\n var i = document.createElement(\"i\");\n i.setAttribute(\"class\", \"fa fa-\"+name);\n return i;\n}", "title": "" }, { "docid": "4681bff9f05473d72a28f92052576336", "score": "0.55147576", "text": "createIconClass(data) {\n let name = 'jp-Dialog-buttonIcon';\n let extra = data.iconClass;\n return extra ? `${name} ${extra}` : name;\n }", "title": "" }, { "docid": "796cf19f5907993b5cd72ee9005942ad", "score": "0.5513214", "text": "getPaletteIcon () { \n console.error(`${this.class} getPaletteIcon is undefined`);\n\n return {\n key: \"svg\",\n val: this.display({\n id: `template-palette-icon`,\n class: this.class,\n x: 10,\n y: 10,\n text: \"template\"\n })\n }\n\n }", "title": "" }, { "docid": "89bd11f9ffb8398a8b666aa482edd745", "score": "0.5505595", "text": "function setIcon(val){\r\n let icon = val == true ? \"link\" : \"defekter-link\";\r\n browser.browserAction.setIcon({path: `icons/icons8-${icon}-26.png`});\r\n}", "title": "" }, { "docid": "cfbe0bc1d5a8a21359379d29e9d31aff", "score": "0.5505036", "text": "function iconKey(namespace, name) {\n return namespace + ':' + name;\n}", "title": "" }, { "docid": "cfbe0bc1d5a8a21359379d29e9d31aff", "score": "0.5505036", "text": "function iconKey(namespace, name) {\n return namespace + ':' + name;\n}", "title": "" }, { "docid": "cfbe0bc1d5a8a21359379d29e9d31aff", "score": "0.5505036", "text": "function iconKey(namespace, name) {\n return namespace + ':' + name;\n}", "title": "" }, { "docid": "e8635b71df1630f16de22c74ab1389ac", "score": "0.5504568", "text": "function getIcons(frequency, i){\n // icon url\n // console.log(frequency, i);\n // console.log(data[frequency][i].weather[0].icon);\n let iconCode = data[frequency][i].weather[0].icon;\n // console.log(iconCode);\n let iconURL = `http://openweathermap.org/img/w/${iconCode}.png`;\n let icon = document.querySelector(`.${frequency}-icon${i}`);\n icon.setAttribute(\"src\", iconURL);\n // console.log(icon);\n }", "title": "" }, { "docid": "3ebbc808b7e1e14bdbf0bfd0d774d8f6", "score": "0.5489645", "text": "function svgIconHtml(name) {\n return /*html*/`<div class=\"icon icon--ei-${name} icon--s\"><svg class=\"icon__cnt\"><use xlink:href=\"/sprite.svg#ei-${name}-icon\"></use></svg></div>`;\n}", "title": "" }, { "docid": "5f211e777e2d8c4c6f30965377b3dd40", "score": "0.54874325", "text": "function IconSymbol(name) {\n return {\n type: \"web-style\", // autocasts as new WebStyleSymbol()\n name: name,\n styleName: \"EsriIconsStyle\"//EsriRealisticTransportationStyle, EsriIconsStyle\n };\n }", "title": "" }, { "docid": "c115ff30a95ae64cc516e5e11aeabf23", "score": "0.5485636", "text": "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 }", "title": "" }, { "docid": "d439acb258b99183ee549913c558dc6d", "score": "0.5477272", "text": "function getIcon(name) {\n var icon = undefined;\n var options = _iconSettings.__options;\n name = name ? normalizeIconName(name) : '';\n name = _iconSettings.__remapped[name] || name;\n if (name) {\n icon = _iconSettings[name];\n if (icon) {\n var subset = icon.subset;\n if (subset && subset.fontFace) {\n if (!subset.isRegistered) {\n Object(_uifabric_merge_styles__WEBPACK_IMPORTED_MODULE_2__[\"fontFace\"])(subset.fontFace);\n subset.isRegistered = true;\n }\n if (!subset.className) {\n subset.className = Object(_uifabric_merge_styles__WEBPACK_IMPORTED_MODULE_2__[\"mergeStyles\"])(subset.style, {\n fontFamily: subset.fontFace.fontFamily,\n fontWeight: subset.fontFace.fontWeight || 'normal',\n fontStyle: subset.fontFace.fontStyle || 'normal',\n });\n }\n }\n }\n else {\n // eslint-disable-next-line deprecation/deprecation\n if (!options.disableWarnings && options.warnOnMissingIcons) {\n Object(_uifabric_utilities__WEBPACK_IMPORTED_MODULE_1__[\"warn\"])(\"The icon \\\"\" + name + \"\\\" was used but not registered. See https://github.com/microsoft/fluentui/wiki/Using-icons for more information.\");\n }\n }\n }\n return icon;\n}", "title": "" }, { "docid": "b701abf429ef88e14d9caefeaf8be19b", "score": "0.5474954", "text": "async getSrc(iconName) {\n return iconName ? `${await this.getCdnPrefix()}${iconName}.svg` : '';\n }", "title": "" }, { "docid": "c9c0474ed507a701adcaa3b34d79a793", "score": "0.54727405", "text": "function findIpaIconPath(info) {\n if (info.CFBundleIcons && info.CFBundleIcons.CFBundlePrimaryIcon && info.CFBundleIcons.CFBundlePrimaryIcon.CFBundleIconFiles && info.CFBundleIcons.CFBundlePrimaryIcon.CFBundleIconFiles.length) {\n return info.CFBundleIcons.CFBundlePrimaryIcon.CFBundleIconFiles[info.CFBundleIcons.CFBundlePrimaryIcon.CFBundleIconFiles.length - 1];\n } else if (info.CFBundleIconFiles && info.CFBundleIconFiles.length) {\n return info.CFBundleIconFiles[info.CFBundleIconFiles.length - 1];\n } else {\n return '.app/Icon.png';\n }\n}", "title": "" }, { "docid": "996f67f741a356c07f92abbcec011dfe", "score": "0.5463742", "text": "function getIcon(name) {\n var icon = undefined;\n var options = _iconSettings.__options;\n name = name ? normalizeIconName(name) : '';\n name = _iconSettings.__remapped[name] || name;\n if (name) {\n icon = _iconSettings[name];\n if (icon) {\n var subset = icon.subset;\n if (subset && subset.fontFace) {\n if (!subset.isRegistered) {\n Object(_uifabric_merge_styles__WEBPACK_IMPORTED_MODULE_2__[\"fontFace\"])(subset.fontFace);\n subset.isRegistered = true;\n }\n if (!subset.className) {\n subset.className = Object(_uifabric_merge_styles__WEBPACK_IMPORTED_MODULE_2__[\"mergeStyles\"])(subset.style, {\n fontFamily: subset.fontFace.fontFamily,\n fontWeight: subset.fontFace.fontWeight || 'normal',\n fontStyle: subset.fontFace.fontStyle || 'normal'\n });\n }\n }\n }\n else {\n if (!options.disableWarnings && options.warnOnMissingIcons) {\n Object(_uifabric_utilities__WEBPACK_IMPORTED_MODULE_1__[\"warn\"])(\"The icon \\\"\" + name + \"\\\" was used but not registered. See http://aka.ms/fabric-icon-usage for more information.\");\n }\n }\n }\n return icon;\n}", "title": "" }, { "docid": "996f67f741a356c07f92abbcec011dfe", "score": "0.5463742", "text": "function getIcon(name) {\n var icon = undefined;\n var options = _iconSettings.__options;\n name = name ? normalizeIconName(name) : '';\n name = _iconSettings.__remapped[name] || name;\n if (name) {\n icon = _iconSettings[name];\n if (icon) {\n var subset = icon.subset;\n if (subset && subset.fontFace) {\n if (!subset.isRegistered) {\n Object(_uifabric_merge_styles__WEBPACK_IMPORTED_MODULE_2__[\"fontFace\"])(subset.fontFace);\n subset.isRegistered = true;\n }\n if (!subset.className) {\n subset.className = Object(_uifabric_merge_styles__WEBPACK_IMPORTED_MODULE_2__[\"mergeStyles\"])(subset.style, {\n fontFamily: subset.fontFace.fontFamily,\n fontWeight: subset.fontFace.fontWeight || 'normal',\n fontStyle: subset.fontFace.fontStyle || 'normal'\n });\n }\n }\n }\n else {\n if (!options.disableWarnings && options.warnOnMissingIcons) {\n Object(_uifabric_utilities__WEBPACK_IMPORTED_MODULE_1__[\"warn\"])(\"The icon \\\"\" + name + \"\\\" was used but not registered. See http://aka.ms/fabric-icon-usage for more information.\");\n }\n }\n }\n return icon;\n}", "title": "" }, { "docid": "996f67f741a356c07f92abbcec011dfe", "score": "0.5463742", "text": "function getIcon(name) {\n var icon = undefined;\n var options = _iconSettings.__options;\n name = name ? normalizeIconName(name) : '';\n name = _iconSettings.__remapped[name] || name;\n if (name) {\n icon = _iconSettings[name];\n if (icon) {\n var subset = icon.subset;\n if (subset && subset.fontFace) {\n if (!subset.isRegistered) {\n Object(_uifabric_merge_styles__WEBPACK_IMPORTED_MODULE_2__[\"fontFace\"])(subset.fontFace);\n subset.isRegistered = true;\n }\n if (!subset.className) {\n subset.className = Object(_uifabric_merge_styles__WEBPACK_IMPORTED_MODULE_2__[\"mergeStyles\"])(subset.style, {\n fontFamily: subset.fontFace.fontFamily,\n fontWeight: subset.fontFace.fontWeight || 'normal',\n fontStyle: subset.fontFace.fontStyle || 'normal'\n });\n }\n }\n }\n else {\n if (!options.disableWarnings && options.warnOnMissingIcons) {\n Object(_uifabric_utilities__WEBPACK_IMPORTED_MODULE_1__[\"warn\"])(\"The icon \\\"\" + name + \"\\\" was used but not registered. See http://aka.ms/fabric-icon-usage for more information.\");\n }\n }\n }\n return icon;\n}", "title": "" }, { "docid": "996f67f741a356c07f92abbcec011dfe", "score": "0.5463742", "text": "function getIcon(name) {\n var icon = undefined;\n var options = _iconSettings.__options;\n name = name ? normalizeIconName(name) : '';\n name = _iconSettings.__remapped[name] || name;\n if (name) {\n icon = _iconSettings[name];\n if (icon) {\n var subset = icon.subset;\n if (subset && subset.fontFace) {\n if (!subset.isRegistered) {\n Object(_uifabric_merge_styles__WEBPACK_IMPORTED_MODULE_2__[\"fontFace\"])(subset.fontFace);\n subset.isRegistered = true;\n }\n if (!subset.className) {\n subset.className = Object(_uifabric_merge_styles__WEBPACK_IMPORTED_MODULE_2__[\"mergeStyles\"])(subset.style, {\n fontFamily: subset.fontFace.fontFamily,\n fontWeight: subset.fontFace.fontWeight || 'normal',\n fontStyle: subset.fontFace.fontStyle || 'normal'\n });\n }\n }\n }\n else {\n if (!options.disableWarnings && options.warnOnMissingIcons) {\n Object(_uifabric_utilities__WEBPACK_IMPORTED_MODULE_1__[\"warn\"])(\"The icon \\\"\" + name + \"\\\" was used but not registered. See http://aka.ms/fabric-icon-usage for more information.\");\n }\n }\n }\n return icon;\n}", "title": "" }, { "docid": "afc199f02bc200f9ba4c0b6da86e42a0", "score": "0.54611814", "text": "function getWeatherIcon(iconCode) {\n return `http://openweathermap.org/img/wn/${iconCode}@2x.png`;\n}", "title": "" }, { "docid": "33cca9c2d6713b696b10adcc1d22e1e0", "score": "0.5458537", "text": "function setExternalLinkIcon(url) {\n return '<a href=\"'+url+'\" class=\"glyphicon glyphicon-new-window external-link\" title=\"External link\" target=\"_blank\"></a>';\n}", "title": "" }, { "docid": "5030847d3366f3245772635b61822df8", "score": "0.54563856", "text": "_getIconContext() {\n return {\n index: this.index,\n active: this.active,\n optional: this.optional\n };\n }", "title": "" }, { "docid": "ad587ca8ab5d6d1bfe63bc405cd74e18", "score": "0.54551715", "text": "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 }", "title": "" }, { "docid": "694ae3fc38d808b01b0ca69f161691c3", "score": "0.5453472", "text": "getIcon(name, messageNode) {\n const action = this.actions[name];\n if (this.baseOptions.fake) {\n return '';\n }\n if (!messageNode.icon) {\n return this.getWhitespace(3);\n }\n if (!messageNode.color) {\n return `${action.badge}${this.getWhitespace(2)}`;\n }\n return `${this.colors[action.color](action.badge)}${this.getWhitespace(2)}`;\n }", "title": "" }, { "docid": "fc08e86655806560a6383071fae0e547", "score": "0.5452622", "text": "function get_svg_icon(p_icon,p_width,p_height,p_color,p_is_css_background) {\n var C_icon = {};\n var l_svg = '';\n\n p_width = p_width || 16;\n p_height = p_height || 16;\n p_color = p_color || '#000000';\n\n\n // Moon\n C_icon.moon = '<svg width=\"%%\" height=\"%%\" viewBox=\"0 0 1792 1792\"'\n + ' xmlns=\"http://www.w3.org/2000/svg\"><path fill=\"%%\" d=\"M1390 1303q-54 9-110 9-182'\n + ' 0-337-90t-245-245-90-337q0-192 104-357-201 60-328.5 229t-127.5 384q0 130 51'\n + ' 248.5t136.5 204 204 136.5 248.5 51q144 0 273.5-61.5t220.5-171.5zm203-85q-94'\n + ' 203-283.5 324.5t-413.5 121.5q-156 0-298-61t-245-164-164-245-61-298q0-153'\n + ' 57.5-292.5t156-241.5 235.5-164.5 290-68.5q44-2 61 39 18 41-15 72-86 78-131.5'\n + ' 181.5t-45.5 218.5q0 148 73 273t198 198 273 73q118 0 228-51 41-18 72 13 14 14'\n + ' 17.5 34t-4.5 38z\"/></svg>';\n\n // Sun\n C_icon.sun = '<svg width=\"%%\" height=\"%%\" viewBox=\"0 0 1792 1792\"'\n + ' xmlns=\"http://www.w3.org/2000/svg\"><path fill=\"%%\" d=\"M1472'\n + ' 896q0-117-45.5-223.5t-123-184-184-123-223.5-45.5-223.5 45.5-184 123-123 184-45.5'\n + ' 223.5 45.5 223.5 123 184 184 123 223.5 45.5 223.5-45.5 184-123 123-184'\n + ' 45.5-223.5zm276 277q-4 15-20 20l-292 96v306q0 16-13 26-15 10-29 4l-292-94-180'\n + ' 248q-10 13-26 13t-26-13l-180-248-292 94q-14'\n + ' 6-29-4-13-10-13-26v-306l-292-96q-16-5-20-20-5-17 4-29l180-248-180-248q-9-13-4-29'\n + ' 4-15 20-20l292-96v-306q0-16 13-26 15-10 29-4l292 94 180-248q9-12 26-12t26 12l180'\n + ' 248 292-94q14-6 29 4 13 10 13 26v306l292 96q16 5 20 20 5 16-4 29l-180 248 180'\n + ' 248q9 12 4 29z\"/></svg>';\n\n // Horizontal arrows\n C_icon.arrows_h\n = '<svg version=\"1.1\" viewBox=\"0 0 477.427 477.427\" style=\"enable-background:new 0 0 477.427 477.427;\"'\n + ' xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"'\n + ' xml:space=\"preserve\">'\n + '<g>'\n + '<polygon points=\"101.82,187.52 57.673,143.372 476.213,143.372 476.213,113.372 57.181,113.372 101.82,68.733 80.607,47.519 '\n + '0,128.126 80.607,208.733 \t\"/>'\n + '<polygon points=\"396.82,268.694 375.607,289.907 420,334.301 1.213,334.301 1.213,364.301 420,364.301 375.607,408.694 '\n + ' 396.82,429.907 477.427,349.301 \t\"/>'\n + '</g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g>'\n + '</svg>';\n\n // Forbidden icons\n C_icon.forbidden\n = ' <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 500 500\" width=\"%%\" height=\"%%\"> '\n + ' <path fill=\"#FFF\" stroke-width=\"45\" stroke=\"#F00\" d=\"M86,88a230,230 0 1,0 1-1zL412,412\"/> '\n + ' </svg>';\n\n // Arrow left\n C_icon.arrow_left\n = '<svg width=\"%%\" height=\"%%\" viewBox=\"0 0 792 792\"'\n + ' xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.1\"'\n + ' style=\"enable-background:new 0 0 792 792;\" xml:space=\"preserve\"><rect id=\"backgroundrect\" width=\"100%\" height=\"100%\" x=\"0\" y=\"0\" fill=\"none\" stroke=\"none\"/>'\n + '<g class=\"currentLayer\">'\n + '<g id=\"svg_1\" class=\"\" transform=\"rotate(90,396,396) \">'\n + '<g id=\"svg_2\">'\n + ' <path d=\"M371.671,649.763c6.019,6.849,14.499,11.316,24.29,11.316c0.081,0,0.188-0.08,0.294-0.08c0.08,0,0.187,0.08,0.294,0.08 '\n + ' c8.373,0,16.746-3.184,23.14-9.577l270.537-270.563c12.787-12.76,12.787-33.493,0-46.253c-12.787-12.787-33.467-12.787-46.254,0 '\n + ' L428.679,550.008V32.69c0-18.083-14.634-32.69-32.717-32.69c-18.084,0-32.717,14.606-32.717,32.69v516.408L147.977,334.686 '\n + ' c-12.814-12.787-33.52-12.573-46.28,0.134c-12.76,12.787-12.68,33.466,0.107,46.253L371.671,649.763z\" id=\"svg_3\"/>'\n + ' <path d=\"M667.086,726.593H124.89c-18.084,0-32.717,14.553-32.717,32.69c0,18.004,14.633,32.717,32.717,32.717h542.223 '\n + ' c18.084,0,32.717-14.713,32.717-32.717C699.803,741.146,685.17,726.593,667.086,726.593z\" id=\"svg_4\"/>'\n + '</g></g></g>'\n + '</svg>';\n\n\n\n // Arrow right\n C_icon.arrow_right = C_icon.arrow_left;\n C_icon.arrow_right = C_icon.arrow_right.replace('rotate(90','rotate(270');\n\n\n // Determine width, height & color\n l_svg = C_icon[p_icon] || '';\n l_svg = l_svg.replace('%%',p_width);\n l_svg = l_svg.replace('%%',p_height);\n l_svg = l_svg.replace('%%',p_color);\n\n if (p_is_css_background) return '{ background : url(data:image/svg+xml;base64,' + btoa(l_svg) + ') no-repeat; }';\n\n return l_svg;\n} // get_svg_icon", "title": "" }, { "docid": "518cb9661c35f75e4ae2188c0876394b", "score": "0.5442438", "text": "function getIcon(name) {\r\n var icon = undefined;\r\n var options = _iconSettings.__options;\r\n name = name ? name.toLowerCase() : '';\r\n name = _iconSettings.__remapped[name] || name;\r\n if (name) {\r\n icon = _iconSettings[name];\r\n if (icon) {\r\n var subset = icon.subset;\r\n if (subset.fontFace && !subset.isRegistered) {\r\n // Register font face for given icons.\r\n index_1.fontFace(subset.fontFace);\r\n // Generate a base class name for the given font.\r\n subset.className = index_1.mergeStyles(subset.style, {\r\n fontFamily: subset.fontFace.fontFamily,\r\n fontWeight: subset.fontFace.fontWeight || 'normal',\r\n fontStyle: subset.fontFace.fontStyle || 'normal'\r\n }).toString();\r\n subset.isRegistered = true;\r\n }\r\n }\r\n else {\r\n if (!options.disableWarnings && options.warnOnMissingIcons) {\r\n warn_1.warn(\"The icon \\\"\" + name + \"\\\" was used but not registered. See http://aka.ms/fabric-icon-usage for more information.\");\r\n }\r\n }\r\n }\r\n return icon;\r\n}", "title": "" }, { "docid": "518cb9661c35f75e4ae2188c0876394b", "score": "0.5442438", "text": "function getIcon(name) {\r\n var icon = undefined;\r\n var options = _iconSettings.__options;\r\n name = name ? name.toLowerCase() : '';\r\n name = _iconSettings.__remapped[name] || name;\r\n if (name) {\r\n icon = _iconSettings[name];\r\n if (icon) {\r\n var subset = icon.subset;\r\n if (subset.fontFace && !subset.isRegistered) {\r\n // Register font face for given icons.\r\n index_1.fontFace(subset.fontFace);\r\n // Generate a base class name for the given font.\r\n subset.className = index_1.mergeStyles(subset.style, {\r\n fontFamily: subset.fontFace.fontFamily,\r\n fontWeight: subset.fontFace.fontWeight || 'normal',\r\n fontStyle: subset.fontFace.fontStyle || 'normal'\r\n }).toString();\r\n subset.isRegistered = true;\r\n }\r\n }\r\n else {\r\n if (!options.disableWarnings && options.warnOnMissingIcons) {\r\n warn_1.warn(\"The icon \\\"\" + name + \"\\\" was used but not registered. See http://aka.ms/fabric-icon-usage for more information.\");\r\n }\r\n }\r\n }\r\n return icon;\r\n}", "title": "" }, { "docid": "518cb9661c35f75e4ae2188c0876394b", "score": "0.5442438", "text": "function getIcon(name) {\r\n var icon = undefined;\r\n var options = _iconSettings.__options;\r\n name = name ? name.toLowerCase() : '';\r\n name = _iconSettings.__remapped[name] || name;\r\n if (name) {\r\n icon = _iconSettings[name];\r\n if (icon) {\r\n var subset = icon.subset;\r\n if (subset.fontFace && !subset.isRegistered) {\r\n // Register font face for given icons.\r\n index_1.fontFace(subset.fontFace);\r\n // Generate a base class name for the given font.\r\n subset.className = index_1.mergeStyles(subset.style, {\r\n fontFamily: subset.fontFace.fontFamily,\r\n fontWeight: subset.fontFace.fontWeight || 'normal',\r\n fontStyle: subset.fontFace.fontStyle || 'normal'\r\n }).toString();\r\n subset.isRegistered = true;\r\n }\r\n }\r\n else {\r\n if (!options.disableWarnings && options.warnOnMissingIcons) {\r\n warn_1.warn(\"The icon \\\"\" + name + \"\\\" was used but not registered. See http://aka.ms/fabric-icon-usage for more information.\");\r\n }\r\n }\r\n }\r\n return icon;\r\n}", "title": "" }, { "docid": "518cb9661c35f75e4ae2188c0876394b", "score": "0.5442438", "text": "function getIcon(name) {\r\n var icon = undefined;\r\n var options = _iconSettings.__options;\r\n name = name ? name.toLowerCase() : '';\r\n name = _iconSettings.__remapped[name] || name;\r\n if (name) {\r\n icon = _iconSettings[name];\r\n if (icon) {\r\n var subset = icon.subset;\r\n if (subset.fontFace && !subset.isRegistered) {\r\n // Register font face for given icons.\r\n index_1.fontFace(subset.fontFace);\r\n // Generate a base class name for the given font.\r\n subset.className = index_1.mergeStyles(subset.style, {\r\n fontFamily: subset.fontFace.fontFamily,\r\n fontWeight: subset.fontFace.fontWeight || 'normal',\r\n fontStyle: subset.fontFace.fontStyle || 'normal'\r\n }).toString();\r\n subset.isRegistered = true;\r\n }\r\n }\r\n else {\r\n if (!options.disableWarnings && options.warnOnMissingIcons) {\r\n warn_1.warn(\"The icon \\\"\" + name + \"\\\" was used but not registered. See http://aka.ms/fabric-icon-usage for more information.\");\r\n }\r\n }\r\n }\r\n return icon;\r\n}", "title": "" }, { "docid": "518cb9661c35f75e4ae2188c0876394b", "score": "0.5442438", "text": "function getIcon(name) {\r\n var icon = undefined;\r\n var options = _iconSettings.__options;\r\n name = name ? name.toLowerCase() : '';\r\n name = _iconSettings.__remapped[name] || name;\r\n if (name) {\r\n icon = _iconSettings[name];\r\n if (icon) {\r\n var subset = icon.subset;\r\n if (subset.fontFace && !subset.isRegistered) {\r\n // Register font face for given icons.\r\n index_1.fontFace(subset.fontFace);\r\n // Generate a base class name for the given font.\r\n subset.className = index_1.mergeStyles(subset.style, {\r\n fontFamily: subset.fontFace.fontFamily,\r\n fontWeight: subset.fontFace.fontWeight || 'normal',\r\n fontStyle: subset.fontFace.fontStyle || 'normal'\r\n }).toString();\r\n subset.isRegistered = true;\r\n }\r\n }\r\n else {\r\n if (!options.disableWarnings && options.warnOnMissingIcons) {\r\n warn_1.warn(\"The icon \\\"\" + name + \"\\\" was used but not registered. See http://aka.ms/fabric-icon-usage for more information.\");\r\n }\r\n }\r\n }\r\n return icon;\r\n}", "title": "" }, { "docid": "665695a6a3edc223ec29b0e79990675e", "score": "0.5428411", "text": "function iconClass(iconName) {\n if (iconName == null) {\n return undefined;\n }\n return iconName.indexOf(NS + \"-icon-\") === 0 ? iconName : NS + \"-icon-\" + iconName;\n}", "title": "" }, { "docid": "665695a6a3edc223ec29b0e79990675e", "score": "0.5428411", "text": "function iconClass(iconName) {\n if (iconName == null) {\n return undefined;\n }\n return iconName.indexOf(NS + \"-icon-\") === 0 ? iconName : NS + \"-icon-\" + iconName;\n}", "title": "" }, { "docid": "665695a6a3edc223ec29b0e79990675e", "score": "0.5428411", "text": "function iconClass(iconName) {\n if (iconName == null) {\n return undefined;\n }\n return iconName.indexOf(NS + \"-icon-\") === 0 ? iconName : NS + \"-icon-\" + iconName;\n}", "title": "" }, { "docid": "2b13f4b4033fff2755949a2c584b23a2", "score": "0.54275525", "text": "get iconTypes() {\n return {\n anchor: \"hax:anchor\",\n page: \"lrn:content\",\n pdf: \"hax:file-pdf\",\n doc: \"hax:file-doc\",\n docx: \"hax:file-docx\",\n ppt: \"hax:file-ppt\",\n pptx: \"hax:file-ppt\",\n csv: \"hax:file-csv\",\n xls: \"hax:file-xls\",\n xlsx: \"hax:file-xls\",\n url: \"icons:language\",\n file: \"hax:file-blank\",\n mp4: \"av:movie\",\n mov: \"av:movie\",\n webm: \"av:movie\",\n mp3: \"av:volume-up\",\n wav: \"av:volume-up\",\n html: \"icons:language\",\n tel: \"communication:phone\",\n email: \"icons:mail\",\n };\n }", "title": "" }, { "docid": "353dd95013871347bb668d03163bde85", "score": "0.5426444", "text": "function makeIcon () {\n var title = widget.getTitleText();\n var td = tag('td');\n td.text(title);\n\n //\n var interior = dock.getInteriorContainer();\n interior.append(td);\n \n // \n td.data('boat', widget);\n dock._register(td, widget);\n \n // when click, release the boat\n td.click(function () {\n\tdock.release($(this).data('boat'));\n });\n }", "title": "" } ]
c01fbf32591f1fd2bfd81da567b948e6
Validates the email address from an input. The parameter is the input object, in format: document.formName.inputName.
[ { "docid": "a0889d9baed37506378bc7876dca0a38", "score": "0.66638845", "text": "function ValidateEmailAddress(objEmail) {\r\n\tvar strEmail = Trim(objEmail.value);\r\n\tif (strEmail == \"\"){\r\n\t\talert(\"Please fill in the E-mail field.\");\r\n\t\tobjEmail.focus();\r\n\t\treturn false;\r\n\t} else {\r\n\t\t// checking \"@\" character:\r\n\t\tif (strEmail.indexOf(\"@\")==-1) {\r\n\t\t\talert(\"Error:\\nE-mail field must contain @ character for an e-mail address.\");\r\n\t\t\tobjEmail.focus();\r\n\t\t\treturn false;\r\n\r\n\t\t} else {\r\n\t\t\t// \"@\" cannot be the first character:\r\n\t\t\tif (strEmail.indexOf(\"@\")==0) {\r\n\t\t\t\talert(\"Error:\\n@ cannot be the first character for an e-mail address.\");\r\n\t\t\t\tobjEmail.focus();\r\n\t\t\t\treturn false;\r\n\t\t\t} else {\r\n\t\t\t\t// Caracterul \"@\" sa nu fie ultimul:\r\n\t\t\t\tif (strEmail.lastIndexOf(\"@\") == strEmail.length-1) {\r\n\t\t\t\t\talert(\"Error:\\n@ cannot be the last character for an e-mail address.\");\r\n\t\t\t\t\tobjEmail.focus();\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// \"@\" can appear only once:\r\n\t\t\tvar emailSplited=strEmail.split(\"@\");\r\n\t\t\tif (emailSplited.length>2) {\r\n\t\t\t\talert(\"Error:\\n@ can be appear only once for an e-mail address.\");\r\n\t\t\t\tobjEmail.focus();\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// \".\" must be present:\r\n\t\t\tif (strEmail.indexOf(\".\")==-1) {\r\n\t\t\t\talert(\"Error:\\nCharacter . must appear at least once for an e-mail address.\");\r\n\t\t\t\tobjEmail.focus();\r\n\t\t\t\treturn false;\r\n\t\t\t} else {\r\n\t\t\t\t// \".\" cannot be the first character:\r\n\t\t\t\tif (strEmail.indexOf(\".\")==0) {\r\n\t\t\t\t\talert(\"Error:\\nCharacter . cannot be the first for an e-mail address.\");\r\n\t\t\t\t\tobjEmail.focus();\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// \".\" cannot be the last character:\r\n\t\t\t\t\tif (strEmail.lastIndexOf(\".\")==strEmail.length-1) {\r\n\t\t\t\t\t\talert(\"Error:\\nCharacter . cannot be the last for an e-mail address.\");\r\n\t\t\t\t\t\tobjEmail.focus();\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// \".\" cannot appear one after another.\r\n\t\t\t\tif (strEmail.indexOf(\"..\")>-1) {\r\n\t\t\t\t\talert(\"Error:\\nInvalid e-mail address.\");\r\n\t\t\t\t\tobjEmail.focus();\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// \"@.\" or \".@\" cannot appear:\r\n\t\t\t\tif ((strEmail.indexOf(\"@.\")>-1) || (strEmail.indexOf(\".@\")>-1)) {\r\n\t\t\t\t\talert(\"Error:\\nInvalid e-mail address.\");\r\n\t\t\t\t\tobjEmail.focus();\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// Sa nu contina alte caractere decat litere (mari si mici), cifre, @ , . , - si _\r\n\t\t\t\tvar carValide=new String(\"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@.-_\");\r\n\t\t\t\tvar carEmail=new String(\"\");\r\n\t\t\t\tfor (var i=0; i<strEmail.length; i++) {\r\n\t\t\t\t\tcarEmail = \"\" + strEmail.substring(i, i+1);\r\n\t\t\t\t\tif (carValide.indexOf(carEmail) == \"-1\") {\r\n\t\t\t\t\t\talert(\"Error:\\nInvalid e-mail address.\\nPlease use only digits, letters, _ . -\");\r\n\t\t\t\t\t\tobjEmail.focus();\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n}", "title": "" } ]
[ { "docid": "135eabf8f35cf1b957c49577b126038f", "score": "0.7742196", "text": "function validateEmail(input){\n var re = /\\S+@\\S+\\.\\S+/;\n if(re.test(input.value)){\n success(input);\n }\n else{\n error(input, `Email is not valid. `);\n }\n}", "title": "" }, { "docid": "2ec66d1466bd74925799f7b26e293dfb", "score": "0.7526271", "text": "function validateAux(input){\n var mailformat = /^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,3})+$/;\n var val = input.value.trim();\n if (val == \"\") {return false;}\n if ((input.type == 'email') && (!(val.match(mailformat)))) {return false;}\n return true;\n} //end validateAux", "title": "" }, { "docid": "d288a16f3f10ef481bbfc308e3db349d", "score": "0.7486616", "text": "function validateEmail(email){}", "title": "" }, { "docid": "a619a0f16c920f77a8f86254806f2e5a", "score": "0.74854666", "text": "function emailValidityCheck(input) {\n const regex = /^(([^<>()\\[\\]\\\\.,;:\\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 if(input.value.trim() === ''){\n showError(input, `Please enter a valid ${input.name} address.`);\n } else {\n showSuccess(input);\n }\n}", "title": "" }, { "docid": "302a8fed868f8ddec47c4e5b83dd41af", "score": "0.74765784", "text": "function checkEmail(input) {\r\n const regExEmail = /^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,3})+$/;\r\n\r\n //if (regular expression representing a valid email, then true else false)\r\n if (regExEmail.test(input.value.trim())) {\r\n showSuccess(input);\r\n } else {\r\n showError(input, 'enter valid email-id');\r\n }\r\n}", "title": "" }, { "docid": "ae4c7ebb1dd87a3640bc0fad6b42e95c", "score": "0.745782", "text": "validEmail(input) {\n if (validEmail.test(input)) return true;\n else return false;\n }", "title": "" }, { "docid": "1a9fd06d655940230df6258d5d200e25", "score": "0.7438163", "text": "function checkEmail($input) {\n\tif($input.selector !== undefined) $input = $input[0];\n\t\n\tvar email = trim($input.value),\n\tregex = /^[a-zA-Z0-9.!#$%&'*+\\/=?\\^_`{|}~\\-]+@[a-zA-Z0-9\\-]+(?:\\.[a-zA-Z0-9\\-]+)*$/;\n\t\n\tif(USE_BETTER_VALIDATION) {\n\t\tregex = /^[-a-z0-9~!$%^&*_=+}{\\'?]+(\\.[-a-z0-9~!$%^&*_=+}{\\'?]+)*@([a-z0-9_][-a-z0-9_]*(\\.[-a-z0-9_]+)*\\.(aero|arpa|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|pro|travel|mobi|xxx|[a-z][a-z])|([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}))(:[0-9]{1,5})?$/i;\n\t} //'\n\t\n\tif(!regex.test(email)){\n\t\tthrow {type: 'typeMismatch', msg: 'This is not a valid email address.'};\n\t}\n\treturn;\n}", "title": "" }, { "docid": "e23962aba7971039f61fa4192d0f5aca", "score": "0.736786", "text": "function isValidEmail(input) {\n if (input.value.length > 0) { //safety net to make sure blank input is not tested\n const REGEX = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)*$/; //reg expression for valid email address\n return REGEX.test(input.value); //checking if input value is a valid email address\n }\n return false;\n}", "title": "" }, { "docid": "37abbb795b12848e6ef7fc0cbfdade65", "score": "0.73661023", "text": "function validateEmail(inputText) {\n var mailformat = /^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,3})+$/;\n if(inputText.value.match(mailformat)) {\n correctVisualization(mailField, emailError);\n } else {\n errorVisualization(mailField, emailError, mailDiv, \"Please enter a valid email adress.\");\n }\n}", "title": "" }, { "docid": "f05c9831af351b4bff75d640b7471e84", "score": "0.7363705", "text": "function isEmailAddress(objInput)\r\n{\r\n\tif (isEmpty(objInput))\r\n\t{\r\n\t\treturn false;\r\n\t}\r\n\r\n\ttheInput = trimValue(objInput);\r\n\ttheLength = theInput.length;\r\n\r\n \t// there must be >= 1 character before @, so\r\n \t// start looking from character[1]\r\n \t// (i.e. second character in the text field)\r\n \t// look for '@'\r\n\tvar i = 1;\r\n\tvar cnt = 0;\r\n\r\n\tfor(j=0;j<=theLength;j++)\r\n\t{\r\n\t\tif (theInput.charAt(j) == '@')\r\n\t\t\tcnt += 1;\r\n\t}\r\n\r\n\tif (cnt != 1)\r\n\t{\r\n\t\t//This cant be a email address\r\n\t\treturn(false);\r\n\t}\r\n\r\n\twhile ((i < theLength) && (theInput.charAt(i) != \"@\"))\r\n\t{\r\n\t\t// search till the last character\r\n\t\ti++ ;\r\n\t}\r\n\r\n\tif ((i >= theLength) || (theInput.charAt(i) != \"@\"))\r\n\t{\r\n\t\t// did not find the '@' character hence can't be email address.\r\n\t\treturn (false);\r\n\t}\r\n\telse\r\n\t{\r\n\t\t// go 2 characters forward so that '@' and . are not simultaneous.\r\n\t\ti += 2;\r\n\t}\r\n\r\n\t// look for . (dot)\r\n\twhile ((i < theLength) && (theInput.charAt(i) != \".\"))\r\n\t{\r\n\t\t// keep searching for '.'\r\n\t\ti++ ;\r\n\t}\r\n\r\n\t// there must be at least one character after the '.'\r\n\tif ((i >= theLength - 1) || (theInput.charAt(i) != \".\"))\r\n\t{\r\n\t\t// didn't find a '.' so its not a valid email ID\r\n\t\treturn (false);\r\n\t}\r\n\tif(hasSpecialCharactersEmail(objInput))\r\n\t{\r\n\t\treturn false;\r\n\t}\r\n\telse\r\n\t{\r\n\t\t// finally its got to be email ID\r\n\t\treturn (true);\r\n\t}\r\n}", "title": "" }, { "docid": "6b89bc6ca98490c8ab96a79aa6f26ca0", "score": "0.7360317", "text": "function checkEmail(input) {\n const re = /^(([^<>()[\\]\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@(([^<>()[\\]\\.,;:\\s@\\\"]+\\.)+[^<>()[\\]\\.,;:\\s@\\\"]{2,})$/i;\n\n if (re.test(input.value.trim())) {\n showSuccess(input);\n } else {\n showError(input, \"show-error messages\");\n }\n}", "title": "" }, { "docid": "8fa44f2f0f8ac3c3f90f87b80b6671a7", "score": "0.73453766", "text": "function looksLikeEmail(doc, input) {\n if (doc == null || input == null || !(input.type =='text' || input.type == 'email')) {\n return false;\n }\n \n if (input.type == 'email') {\n return true;\n }\n\n var regexp = new RegExp(lpgs('ff_email_regexp'), 'i');\n if(regexp.exec(input.name)){\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "392de4b0cda1cfa0c8199afc2f8309a0", "score": "0.733609", "text": "function checkEmail(input) {\r\n const re = /^(([^<>()\\[\\]\\\\.,;:\\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,}))$/;\r\n if (re.test(input.value.trim())) {\r\n showSuccess(input);\r\n } else {\r\n showError(input, \"Email is not valid\");\r\n }\r\n}", "title": "" }, { "docid": "b1db00910d9464b1f7dd55e02b0b39ad", "score": "0.7333328", "text": "function validateEmail(input) {\n const re = /^(([^<>()[\\]\\\\.,;:\\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 if(re.test(input.value.trim())) {\n showSuccess(input);\n\n } else {\n showError(input, 'Email is not valid')\n }\n}", "title": "" }, { "docid": "a447848fdfcc5e2906973fc3f23530c8", "score": "0.73270255", "text": "function checkEmail(input) {\n const re = /^(([^<>()\\[\\]\\\\.,;:\\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 if (re.test(input.value)) {\n showSuccess(input);\n } else {\n showError(input, \"Eamil in not valid\");\n }\n}", "title": "" }, { "docid": "1bbd38e42af007128bd364d327cd0a44", "score": "0.7319102", "text": "function checkEmail(input) {\n\tconst re = /^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$/\n\tif (input.value.length < 7) {\n\t\tdisplayError(input, `${fieldName(input)} must be at least 7 characters`);\n\t} else if (input.value.length > 254) {\n\t\tdisplayError(input, `${fieldName(input)} must be less than 254 characters`);\n\t} else {\n\t\tif(re.test(input.value.trim())) {\n\t\t\tdisplaySuccess(input);\n\t\t} else {\n\t\t\tdisplayError(input, \"Email is not valid\")\n\t\t}\n\t}\n}", "title": "" }, { "docid": "60bbd6389dc77946b23d0d933095cfef", "score": "0.7313295", "text": "function checkEmail(input) {\n \n const regexp = /^(\\w[-._+\\w]*\\w@\\w[-._\\w]*\\w\\.\\w{2,3})$/;\n if (regexp.test(input.value.trim())) {\n showSuccess(input)\n } else {\n showError(input, 'Email is not invalid');\n }\n}", "title": "" }, { "docid": "fccbefa8784a2ab89f6c14409d9b1feb", "score": "0.7294621", "text": "function validEmail(obj) {\n\tif ((obj.value.indexOf(\".\") < 0) || (obj.value.indexOf(\"@\") < 0)) {\n\t\talert(\"Please enter a valid e-mail address.\");\n\t\treturn false;\n\t} else {\n\t\treturn true;\n\t}\n}", "title": "" }, { "docid": "356fae17b868a446033a4bbdf83547b6", "score": "0.7291944", "text": "function checkEmail(input) {\n const re = /^(([^<>()\\[\\]\\\\.,;:\\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 // .test is a regex method to test whether the specified string is a match. Returns true or false\n if (re.test(input.value.trim())) {\n showSuccess(input)\n } else {\n showError(input, 'Please enter a valid email address')\n }\n}", "title": "" }, { "docid": "facb66ea94e9d6ecf9625ccc71d78cb3", "score": "0.7275174", "text": "function checkEmail(input) {\n const re = /^(([^<>()\\[\\]\\\\.,;:\\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 if (re.test(input.value.trim())) {\n showSucess(input);\n } else {\n showError(input, 'Email is not valid');\n }\n}", "title": "" }, { "docid": "7aa03e04e14ce62f424df8a159d8f6f1", "score": "0.7272658", "text": "function checkEmail(input){\n var re = /^(([^<>()\\[\\]\\\\.,;:\\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 if(re.test(input.value)){\n showSuccess(input)\n }else{\n showError(input, 'Email is not valid')\n }\n \n }", "title": "" }, { "docid": "07212817664c0e4edada3a44072d91bb", "score": "0.726644", "text": "function validateEmailInput(input) {\n let message = \"Please enter a valid email address\";\n if (input.length > 0) {\n return input.match(\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 ? true\n : message;\n } else return message;\n}", "title": "" }, { "docid": "07212817664c0e4edada3a44072d91bb", "score": "0.726644", "text": "function validateEmailInput(input) {\n let message = \"Please enter a valid email address\";\n if (input.length > 0) {\n return input.match(\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 ? true\n : message;\n } else return message;\n}", "title": "" }, { "docid": "c8ec5d1729a7dab617a9688392916e11", "score": "0.72572273", "text": "function checkEmail(input) {\n const re = /^(([^<>()\\[\\]\\\\.,;:\\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 if(re.test(input.value.trim())) {\n showSucces(input)\n }else {\n showError(input,'Email is not invalid');\n }\n}", "title": "" }, { "docid": "b087505f689af911175f87e7948159a5", "score": "0.72569364", "text": "function checkEmail(input) {\n const re = /^(([^<>()[\\]\\\\.,;:\\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 if (re.test(input.value.trim())) {\n showSuccess(input);\n } else {\n showError(input, \"Email is not valid\");\n }\n}", "title": "" }, { "docid": "0a778fc63febd054ef609ab62f60f534", "score": "0.72504187", "text": "function checkEmail(input){\n const re = /^(([^<>()[\\]\\\\.,;:\\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 if (re.test(input.value.trim() )){\n showSuccess(input);\n } else {\n showError(input, `Please provide a valid email`)\n }\n}", "title": "" }, { "docid": "79dcf8d82f175e4366f5f88e62813c53", "score": "0.7246677", "text": "function checkEmail(input) {\r\n const emailValidation = /^(([^<>()\\[\\]\\\\.,;:\\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,}))$/;\r\n if (emailValidation.test(input.value.trim())) {\r\n showSuccess(input);\r\n } else {\r\n showError(input, \"Email is not valid\");\r\n }\r\n}", "title": "" }, { "docid": "9599ebd92960de3450a3d4a70e542277", "score": "0.7246484", "text": "function validateEmail(inputID, description) {\r\n\r\n\tif($(\"#\"+inputID).val() == '') validateFailed(inputID,description);\r\n\t\r\n\telse {\r\n\t\t// get the location of the @ in the string\r\n\t\tvar atLocation= $(\"#\"+inputID).val().indexOf('@');\r\n\t\t\r\n\t\t// get the location of the period after the @\r\n\t\tvar periodLocation= $(\"#\"+inputID).val().indexOf('.',atLocation);\r\n\t\t\r\n\t\t// check the general syntax: Word characters before an '@', word characters betweeen '@' and '.', and word characters after the '.'\r\n\t\tif(!(/^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w+)$/.test($(\"#\"+inputID).val()))) validateFailed(inputID,description);\r\n\t\t\r\n\t\t//make sure the characters after the period after the @ match a top level domain\r\n\t\telse if(!isValidTLD($(\"#\"+inputID).val().substring(periodLocation+1, $(\"#\"+inputID).val().length))) {alert($(\"#\"+inputID).val().substring(periodLocation+1, $(\"#\"+inputID).val().length)); validateFailed(inputID,description)};\r\n\t}\r\n}", "title": "" }, { "docid": "c097afa666c1c4bf15f3fea929bf0b74", "score": "0.7244324", "text": "function checkEmail(input) {\n const re = /^(([^<>()\\[\\]\\\\.,;:\\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 if (re.test(input.value.trim())) {\n showSuccess(input);\n } else {\n showError(input, `Please enter a valid email address`);\n }\n}", "title": "" }, { "docid": "173765b3134ab350cfbb4c6dd61e42c0", "score": "0.723282", "text": "function checkEmail(input) {\n if(input.value.trim() !== ''){\n const re = /^(([^<>()\\[\\]\\\\.,;:\\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 if (re.test(input.value.trim())) {\n showSuccess(input);\n } else {\n showError(input, 'Email is not valid');\n input.value = \"email@example/com\";\n }\n }\n }", "title": "" }, { "docid": "f69a00b0b6e293acd269b7f9709572df", "score": "0.72328043", "text": "function checkEmail(input) {\n const re = /^(([^<>()\\[\\]\\\\.,;:\\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 if (re.test(input.value.trim())) {\n showSuccess(input);\n } else {\n showError(input, 'Email is not valid');\n }\n}", "title": "" }, { "docid": "819ec351d9dcd8804b290846df9e78db", "score": "0.7229146", "text": "function checkEmail(input) {\n\tconst re = /^(([^<>()\\[\\]\\\\.,;:\\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\tif (re.test(input.value.trim())) {\n\t\tshowSuccess(input);\n\t} else {\n\t\tshowError(input, 'Email is not valid');\n\t}\n}", "title": "" }, { "docid": "039319f1555f53d5cbc87f5740226162", "score": "0.7227399", "text": "function checkEmail(input) {\n\tconst re = /^(([^<>()[\\]\\\\.,;:\\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\tif (re.test(input.value.trim())) {\n\t\tshowSuccess(input);\n\t} else {\n\t\tshowError(input, 'Email is not valid');\n\t}\n}", "title": "" }, { "docid": "30fc12f8862fe2793dfd387a37593281", "score": "0.720871", "text": "function checkEmail(input) {\n console.log('email',formElememt[0]);\n const re = /^(([^<>()\\[\\]\\\\.,;:\\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 if (re.test(input.trim())) {\n showSuccess( formElememt[0]);\n } else {\n showError( formElememt[0], 'Email is not valid');\n }\n}", "title": "" }, { "docid": "28f53d6a791df35e5686a191f4ef27ca", "score": "0.7175779", "text": "function emailAddress(input_string) {\n if (input_string.match(/\\b([^\\s]+@[^\\s]+)\\b/g)) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "0a3fdef4e71a009e636c930dfa74c453", "score": "0.7167433", "text": "function emailValidate(input) {\n\tvar emailFilter = /^[^@]+@[^@.]+\\.[^@]*\\w\\w$/ ;\n var illegalChars= /[\\(\\)\\<\\>\\,\\;\\:\\\\\\\"\\[\\]]/ ;\n\tif(!emailFilter.test(input) || illegalChars.test(input)) {\n\t\treturn false;\t\n\t}\n\telse return true;\n\t\n}", "title": "" }, { "docid": "4d64028675554f4f248719111f99e330", "score": "0.7098944", "text": "function checkEmail(input) {\n const re = /^(([^<>()\\[\\]\\\\.,;:\\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 if (re.test(String(input.value).toLowerCase())) {\n showSuccess(input);\n return true;\n } else {\n showError(input, 'Email is not valid');\n return false;\n }\n}", "title": "" }, { "docid": "f15606009c09eae19e737446824c8824", "score": "0.7088121", "text": "function emailCheck(input) {\n\tif (!/^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,3})+$/.test(input.value)) {\n\t\tinput.setCustomValidity('Must be a valid email address.');\n\t\t$('#em-feedback').html('Must be a valid email address');\n\t} else {\n\t\tvar url = '/api/account/check/' + input.value;\n\t\t$.getJSON(url, function(result) {\n\t\t\tif (result.found) {\n\t\t\t\tinput.setCustomValidity('An account with this email already exists.');\n\t\t\t\t$('#em-feedback').html('An account with this email already exists');\n\t\t\t} else {\n\t\t\t\tinput.setCustomValidity('');\n\t\t\t}\n\t\t});\n\t}\n}", "title": "" }, { "docid": "c3fd9b35d00493edfe04c4ef21873dc4", "score": "0.7050834", "text": "function checkemail(input) {\n const re = /^(([^<>()[\\]\\\\.,;:\\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 // return re.test(String(email).toLowerCase());\n\n if(re.test(input.value)){\n showsuccess(input);\n }else{\n showerror(input,'Email is not valid');\n }\n}", "title": "" }, { "docid": "5e3e469974dc0408bea27d1d768c1760", "score": "0.70430934", "text": "function validateEmail() {\n var x = v3.value;\n var atpos = x.indexOf(\"@\");\n var dotpos = x.lastIndexOf(\".\");\n if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length) {\n window.alert(\"Not a valid e-mail address!\");\n return true;\n }\n}", "title": "" }, { "docid": "5b3b089aa0bfb05ab7ec89471111870d", "score": "0.7038396", "text": "function checkEmail(input) {\n\tconst re = /^([A-Za-z0-9_\\-\\.])+\\@([A-Za-z0-9_\\-\\.])+\\.([A-Za-z]{2,4})$/;\n\tif(re.test(input.value.trim())) {\n\t\tshowSuccess(input);\n\t} else {\n\t\tshowError(input, \"邮箱格式不正确\");\n\t}\n}", "title": "" }, { "docid": "50ca267e12ef6f235bae50955a26b289", "score": "0.70177794", "text": "function validEmail(Input) {\r\n if (/^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,3})+$/.test(Input)) {\r\n return \"valid Email\";\r\n }\r\n return \"You have entered an invalid email address!\";\r\n}", "title": "" }, { "docid": "6e42f876c1cce97dd4052725ca92ad5b", "score": "0.70162", "text": "function validateEmail(input) {\n var re = /^(([^<>()\\[\\]\\\\.,;:\\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 return re.test(input);\n}", "title": "" }, { "docid": "0cbb1bb447add5deffd41c43fb29aa57", "score": "0.6996678", "text": "function checkemail(input) {\n const re = /^(([^[<>()[\\]\\\\.,;:\\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 // return re.test(String(email).toLowerCase());\n\n if(re.test(input.value)){\n showsuccess(input);\n }else{\n shwoerror(input, \"Email is not valid\");\n }\n}", "title": "" }, { "docid": "968805ddf1725d76cd6dc527efa6e4be", "score": "0.6965034", "text": "function checkEmail(input){\n const re = /^[A-Za-z0-9\\u4e00-\\u9fa5]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$/;\n if(re.test(input.value.trim())){\n showSuccess(input)\n }else{\n showError(input,'邮箱格式错误')\n }\n}", "title": "" }, { "docid": "a22aa892a370e0b0dc4425d9908a0f43", "score": "0.6961483", "text": "function emailAddress(email) {\r\n\r\n let address = /^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,3})+$/;\r\n\r\n if (email.value.match(address)) {\r\n return true;\r\n } else {\r\n alert(\"Please enter a valid email address\")\r\n }\r\n window.location = \"form.html\"\r\n}", "title": "" }, { "docid": "ea26afa8b87add51a8b7f6339f3da9ea", "score": "0.69604677", "text": "function emailvalidation(uemail) {\n var mailformat = /^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,3})+$/;\n if (uemail.value.match(mailformat)) {\n return true;\n } else if (uemail.value == null || uemail.value == '') {\n\n alert(\"Please enter an email address!\");\n uemail.focus();\n return false;\n } else {\n\n alert(\"Please enter a valid email address!\");\n uemail.focus();\n return false;\n }\n}", "title": "" }, { "docid": "728c7d6897394dff3cbc0ed30d6c0eda", "score": "0.6960217", "text": "function isEmail(input) {\n\treturn input.match(/^([a-z0-9_.\\-+]+)@([\\da-z.\\-]+)\\.([a-z\\.]{2,})$/);\n}", "title": "" }, { "docid": "1892cfd76748eed035a2bfb7d8da1432", "score": "0.69566095", "text": "function checkEmail(id, input) {\r\n //Default: is valid\r\n let result = {\r\n isNotValid: false,\r\n msg: showSuccess(id)\r\n }\r\n const re = /^(([^<>()\\[\\]\\\\.,;:\\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,}))$/;\r\n if (!re.test(input.trim())) {\r\n result = {\r\n isNotValid: true,\r\n msg: showError(id, 'Email is not valid')\r\n }\r\n }\r\n return result;\r\n}", "title": "" }, { "docid": "49b612ca936a8052ec813bcf7e2c7a7c", "score": "0.6929553", "text": "function checkEmail(myForm) {\n \n var email = myForm.value;\n email = email.replace(/^\\s+|\\s+$/g,'');\n \n if(/^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,3})+$/.test(myForm.value)){\n return (true)\n }\n\n document.getElementById(\"empEmailId\").value=\"\";\n // alert(\"Invalid E-mail Address! Please re-enter.\");\n x0p( '','Invalid E-mail Address! Please re-enter.','info');\n \n return (false)\n}", "title": "" }, { "docid": "4d74a4e8ed1c3989ca0521b3e135c160", "score": "0.6927796", "text": "function isEmail(input){\n\tconst isValidEmail = validator.isEmail(input);\n\n\tconst errorMessage = isValidEmail ? undefined : \"Error! Email is not valid.\";\n\treturn errorMessage;\t\n}", "title": "" }, { "docid": "4aeab2178925f5c61d407a06dc8433de", "score": "0.6926134", "text": "validateEmailInput(input) {\n /** */\n input = input.toLowerCase();\n\n // define unwanted and structural patterns\n let unwantedCharPattern = /[^\\w[-]*\\@\\.[-]*]/, \n structurePattern = /\\w+[-]*\\.*\\@(\\w+[-]*\\w+\\.)+[^(\\.\\.)]([A-Za-z0-9]*)$/;\n\n // check variable length\n if(input.length > 6){\n //check the variable against the pattern\n if(!unwantedCharPattern.test(input) && structurePattern.test(input)){\n return true;\n }\n }\n\n //\n return false;\n }", "title": "" }, { "docid": "1228ccc52e2bd2ffe34dc16c59baf0c8", "score": "0.6918118", "text": "function validate(input) {\r\n if ($(input).attr('type') == 'email' || $(input).attr('name') == 'email') {\r\n if ($(input).val().trim().match(/^([a-zA-Z0-9_\\-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{1,5}|[0-9]{1,3})(\\]?)$/) == null) {\r\n return false;\r\n }\r\n } else {\r\n if ($(input).val().trim() == '') {\r\n return false;\r\n }\r\n }\r\n }", "title": "" }, { "docid": "b4aa65926fdf2d32fb1939f5b24246d0", "score": "0.6915161", "text": "function validateEmail(inputField, helpText) {\r\n // Non-Empty Check\r\n if (!validateNonEmpty(inputField, helpText)) {\r\n return false;\r\n } else {\r\n var RegExpEmail = /^[\\w\\-_\\.]+@[\\w-]+(\\.\\w{2,4})+$/;\r\n return validateRegExp(RegExpEmail, inputField.value, helpText, \"Enter valid email (e.g [email protected])\");\r\n }\r\n}", "title": "" }, { "docid": "5e123902a1a6a98b3df98a70a5dbf6a4", "score": "0.6908657", "text": "function checkEmail(element){if(/^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,3})+$/.test(element.value)){return(true);\r\n }element.value=\"\";\r\n alert(\"Invalid E-mail Address! Please re-enter.\");\r\n return(false);\r\n }", "title": "" }, { "docid": "66f9f3c9dbdbd58ac2a9a8f158e63759", "score": "0.69045824", "text": "function ValidateEmail(uemail)\r\n{\r\n// Declaring a variable mailfort\r\nvar mailformat = /^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,3})+$/;\r\n// Check if uemail match with the mailformat used\r\nif(uemail.value.match(mailformat))\r\n{\r\nreturn true;\r\n}\r\nelse\r\n{\r\nalert(\"You have entered an invalid email address!\");\r\nuemail.focus();\r\nreturn false;\r\n}\r\n}", "title": "" }, { "docid": "833329fadc6e9916b780ed3e184e192f", "score": "0.68977106", "text": "function validationEmailAddress(tempObj){\n\t//var value\t= tempObj.value;\n\t//var objRegExp = /^([a-zA-Z0-9_\\.\\-])+\\@(([a-zA-Z0-9\\-])+\\.)+([a-zA-Z0-9]{2,4})+$/;\n\t//return objRegExp.test(value);\n}", "title": "" }, { "docid": "63a993f36ef96b23dbe589d3daacfa96", "score": "0.6892288", "text": "function validateEmail(eMailInput){\r\n\t\r\n\tvar regex = /([a-z0-9][-a-z0-9_\\+\\.]*[a-z0-9])@([a-z0-9][-a-z0-9\\.]*[a-z0-9]\\.(arpa|root|aero|biz|cat|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|name|net|org|pro|tel|travel|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw)|([0-9]{1,3}\\.{3}[0-9]{1,3}))/;\r\n\t// regex that checks string if it has valid email + domain.\r\n\t\r\n\treturn regex.test(eMailInput);\r\n}", "title": "" }, { "docid": "4f8d04212c45ee4b20512812916ef880", "score": "0.68657833", "text": "function validateEmail(){\r\n\tvar emailID = document.queryForm.email.value;\r\n\tatpos = emailID.indexOf(\"@\");\r\n\tdotpos = emailID.lastIndexOf(\".\");\r\n\t// the 3 conditions you are testing\r\n\tif (atpos < 1 || ( dotpos - atpos < 2) || dotpos+2 >= emailID.length)\r\n\t{\r\n\t\t\r\n\t\talert(\"Please enter email in the format [email protected]\");\r\n\t\tdocument.queryForm.email.focus();\r\n\t\treturn false;\r\n\t}\r\n\t\treturn (true) ;\r\n }// end function ValidateEmail\t", "title": "" }, { "docid": "ce2e66311179791e9ea08f215f04f9b5", "score": "0.68392277", "text": "function ValidateEmail(uemail) {\n var mailformat = /^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,3})+$/;\n if (uemail.value.match(mailformat)) {\n return true;\n }\n else {\n alert(\"You have entered an invalid email address!\");\n uemail.focus();\n return false;\n }\n}", "title": "" }, { "docid": "4ed24d2887fcd580abcd33ecc98fb04b", "score": "0.68245363", "text": "function verifyEmail(controller, input) {\n var\n value = input.value.trim().toLowerCase(),\n email = input.data('email'),\n xhr\n ;\n if (RE_EMAIL.test(value) && value !== email) {\n // avoid further pointless checks\n // for the same address\n input.data('email', value);\n controller.xhr = xhr = new XMLHttpRequest;\n xhr.target = controller;\n xhr.open('get', 'cgi/verify.php?email=' + encodeURIComponent(value), true);\n xhr.on('readystatechange', verifyEmailRequest).send(null);\n // save the user.email for further operations\n user.email = value;\n }\n }", "title": "" }, { "docid": "4b2f3e0915ae58701882500f1a195e24", "score": "0.6823816", "text": "function ValidateEmail(uemail)\n{\nvar mailformat = /^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,3})+$/;\nvar uemail_len = uemail.value.length;\nif(uemail_len ==0){\n\talert(\"You have entered an invalid email address!\");\n\tuemail.focus();\n\treturn false;\n}else if(uemail.value.match(mailformat)){\n\treturn true;\n}else{\n\talert(\"You have entered an invalid email address!\");\n\tuemail.focus();\n\treturn false;\n}\n}", "title": "" }, { "docid": "13e80098216e03ee09760acad881e894", "score": "0.6820421", "text": "function validateEmail()\n{\n\n var x = document.forms[\"create\"][\"email\"].value;\n var atpos = x.indexOf(\"@\");\n var dotpos = x.lastIndexOf(\".\");\n if (atpos < 1 || dotpos < atpos + 2 || dotpos + 2 >= x.length)\n {\n alert(\"e-mail address is not valid\");\n return false;\n }\n\n}", "title": "" }, { "docid": "6a4351becc8463041eaeee59fb0c5c40", "score": "0.6819515", "text": "function validateEmail() {\n\t\tlet $email = $('#mail').val();\n\t\tlet checkEmailRegExp = /[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/;\n\t\tlet validEmail = $email.match(checkEmailRegExp);\n\t\tif (!validEmail) {\n\t\t\t$('#mail').before('<span class=\"formError\">Enter a valid email: example ([email protected])</span>');\n\t\t\tevent.preventDefault();\n\t\t}\n\t}", "title": "" }, { "docid": "66ecc9cde3595679703fac5c1be8fad3", "score": "0.6815876", "text": "function checkEmail(id,input) {\n //Default: is valid\n let result = {\n isNotValid: false,\n msg: showSuccess(id)\n }\n const re = /^(([^<>()\\[\\]\\\\.,;:\\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 if (!re.test(input.trim())) {\n result = {\n isNotValid: true,\n msg: showError(id, 'Email ist nicht gültig.')\n }\n }\n return result;\n}", "title": "" }, { "docid": "2db9be92d6aa9f683cbfb898e371c83e", "score": "0.6811506", "text": "function checkEmail(input)\n{\n const re = /^(([^<>()\\[\\]\\\\.,;:\\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 // return re.test(String(input).toLowerCase());\n if(re.test(input.value.trim())){\n showSuccess(input);\n }else{\n showError(input, 'Email is not valid');\n }\n}", "title": "" }, { "docid": "91f3fb0c42d1ad001752a70e7beb9f49", "score": "0.6804956", "text": "function isemail(input) {\n document.getElementById('email').value = document.getElementById('email').value.trim();\n input = input.trim();\n\n let email1 = /^[^\\s]+([a-zA-Z0-9._-])+\\@([a-zA-Z0-9])+\\.([a-zA-Z]{2,4})$/;\n let email2 = /^[^\\s]([a-zA-Z0-9._-])+\\@([a-zA-Z0-9])+\\.([a-zA-Z]{2,4})+\\.([a-zA-Z]{2,4})$/;\n\n\n if (input.match(email1) || input.match(email2) || input.length == 0) {\n setSuccessMsg('email');\n val_data[2] = 1;\n return true;\n }\n else {\n setErrorMsg('email');\n val_data[2] = 0;\n return false;\n }\n}", "title": "" }, { "docid": "57ea6019e33ec2090d39ed70bd2ae899", "score": "0.67948365", "text": "function validate (input) {\n //Valid Email Regex https://stackoverflow.com/questions/46155/how-to-validate-an-email-address-in-javascript\n if($(input).attr('name') === 'email') {\n if($(input).val().trim().match(/^([a-zA-Z0-9_\\-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{1,5}|[0-9]{1,3})(\\]?)$/) == null) {\n return false;\n }\n }else if($(input).attr('name') === 'name'){\n if($(input).val().trim().match(/^[a-zA-Z ]+$/) == null) {\n return false;\n }\n }else if($(input).attr('name') === 'phone'){\n if($(input).val().trim().match(/^[0-9]+$/) == null) {\n return false;\n }\n }\n else {\n if($(input).val().trim() === ''){\n return false;\n }\n }\n}", "title": "" }, { "docid": "2f34df362480cd97ce32aa42083aebbc", "score": "0.6788233", "text": "function emailValidation(inputtext, alertMsg) {\n\tvar emailExp = /^[w-.+]+@[a-zA-Z0-9.-]+.[a-zA-z0-9]{2,4}$/;\n\tif (inputtext.value.match(emailExp)) {\n\t\treturn true;\n\t} else {\ndocument.getElementById('p3').innerText = alertMsg; // This segment displays the validation rule for email.\ninputtext.focus();\nreturn false;\n}\n}", "title": "" }, { "docid": "46049f9733167f10e634ad103782d1b3", "score": "0.6780848", "text": "function validateEmail(elementsInputs, intCounter)\n{\n var emailFilter=/^.+@.+\\..{2,3}$/;\n if (!emailFilter.test(elementsInputs[intCounter].value)) \n { \n return true; \n } \n}", "title": "" }, { "docid": "55c396a667e8bfe3f0178cc76d119405", "score": "0.6764072", "text": "isValidEmailAddress( email ){\r\n var pattern = new RegExp(\"^[a-zA-Z0-9\\\\-_]+(\\\\.[a-zA-Z0-9\\\\-_]+)*@[a-z0-9]+(\\\\-[a-z0-9]+)*(\\\\.[a-z0-9]+(\\\\-[a-z0-9]+)*)*\\\\.[a-z]{2,4}$\")\r\n if (pattern.test(email)) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }", "title": "" }, { "docid": "8e391040219dd0f25ffff28e20407f49", "score": "0.67625713", "text": "function validateEmail(email)\r\n{\r\n//convert our parameter to a string\r\nemail = String(email);\r\n\r\n//make sure it only contains letters without spaces\r\nvar stringIndex = email.search(/^\\w*\\@\\w*\\.[A-Za-z]{2,4}$/);\r\n\r\n//stringIndex holds the position of the search. We want it at 0\r\nif (stringIndex == \"0\")\r\n return true;\r\nelse\r\n return false;\r\n}", "title": "" }, { "docid": "ea476b462e1ed4c8e12b5b2a2c9d58ce", "score": "0.6752598", "text": "function isValidEmail(input) {\n var atPos = input.indexOf('@'),\n dotPos = input.lastIndexOf('.');\n if (atPos < 1 || dotPos < atPos + 2 || dotPos + 2 >= input.length) {\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "ea476b462e1ed4c8e12b5b2a2c9d58ce", "score": "0.6752598", "text": "function isValidEmail(input) {\n var atPos = input.indexOf('@'),\n dotPos = input.lastIndexOf('.');\n if (atPos < 1 || dotPos < atPos + 2 || dotPos + 2 >= input.length) {\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "acdc6e06e3c87afe35bf52668ed4b5b0", "score": "0.6744789", "text": "function ValEmail(name) \n{if (/^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,3})+$/.test(name))\n {\n return (true)\n }\n return(\"You have entered an invalid email address!\")\n}", "title": "" }, { "docid": "9122efc04db5de52d3b432f365b63a53", "score": "0.67419505", "text": "function validate_email() {\n var email = document.getElementById(\"email\").value;\n var remail_pattern = /^([A-z])+(\\.?\\w+)*@[A-z]+(\\.[A-z]{2,4}){1,2}/;\n return (remail_pattern.test(email));\n}", "title": "" }, { "docid": "c29850394a897b4608b84a4c08d58a65", "score": "0.67381424", "text": "function isEmailStringValid(){\n\treturn true;\n}", "title": "" }, { "docid": "67e8184b939fc7ca00cef464ee4989dc", "score": "0.67331815", "text": "function ValidateEmail()\n {\n var uemail = document.registration.email;\n var mailformat = /^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,3})+$/;\n if(uemail.value.match(mailformat))\n {\n document.registration.desc.focus();\n return true;\n }\n else\n {\n alert(\"You have entered an invalid email address!\");\n uemail.focus();\n return false;\n }\n }", "title": "" }, { "docid": "3a36c94b07c895c5b65423bb17b0b04e", "score": "0.67226297", "text": "function validateUserInputEmail(email_address) {\n let message = message_panel.querySelector('.message');\n let email_exp = pattern = /^(([^<>()\\[\\]\\\\.,;:\\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 if (email_exp.test(email_address)) {\n return true;\n }\n\n // invalid input\n input_value_error = true;\n\n // error message to user\n message_panel.setAttribute(\"class\", \"subscription-message\");\n message.innerHTML = \"Sorry, your email is not acceptable.\";\n return false;\n }", "title": "" }, { "docid": "46a6c59991aafb95ffbff6713988d887", "score": "0.671267", "text": "email() {\r\n // regex from https://html.spec.whatwg.org/multipage/forms.html#valid-e-mail-address\r\n /* tslint:disable:max-line-length */\r\n return this.matches(/^[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])?)*$/)\r\n /* tslint:enable:max-line-length */\r\n .withMessageKey('email');\r\n }", "title": "" }, { "docid": "8530935435ccf8f0e1226615d9e6977d", "score": "0.6712398", "text": "function checkEmail(inputvalue) {\n var pattern = /^([a-zA-Z0-9_.-])+@([a-zA-Z0-9_.-])+\\.([a-zA-Z])+([a-zA-Z])+/;\n if (pattern.test(inputvalue)) {\n return true;\n } else {\n return false;\n }\n\n}", "title": "" }, { "docid": "109e6a2dc9bc4393e9d95241f0fdee1b", "score": "0.6698144", "text": "email(elem) {\n // If field is not required, then return \"true\".\n if (false === elem.required) return true;\n let status = false;\n let email = elem.value;\n if (typeof email === 'undefined') return false;\n // To Validate Email.\n // Convert to Native String Format.\n email = email.toString();\n // To Check it as String or Not.\n if (/^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,3})+$/.test(email)) {\n // Valid Email.\n status = true;\n }\n if (!email) status = false;\n return status;\n }", "title": "" }, { "docid": "fc38e74ebeab76c15f19ad42fa618e96", "score": "0.66936284", "text": "function checkEmail() {\r\n const email = document.querySelector(\"input[name='email']\");\r\n\r\n // Checks if email is valid when an email address was entered\r\n if (email.value != \"\") {\r\n if (email.value.trim().length == 0) { // trim() not needed since pattern doesn't have spaces affect the length of characters very much\r\n alert(\"An email cannot be just spaces\");\r\n errCtr++;\r\n } else {\r\n if (email.validity.tooLong) {\r\n alert(\"Email is too long, it shouldn't exceed 30 characters\");\r\n errCtr++;\r\n } else if (email.validity.tooShort) {\r\n alert(\"Email is too short, it shouldn't be below 9 characters\");\r\n errCtr++;\r\n } else if (email.validity.patternMismatch) {\r\n alert(\"Email is in the wrong format, it should look something like this: [email protected]\");\r\n errCtr++;\r\n }\r\n }\r\n }\r\n}", "title": "" }, { "docid": "4e43e786becd2eab865904106490ecff", "score": "0.6689678", "text": "validateEmail(emailInput) {\n const regEx =\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 return regEx.test(String(emailInput).toLowerCase());\n }", "title": "" }, { "docid": "01b29d45c6f86e79502fb2906777c1aa", "score": "0.6686055", "text": "function emailCheck() {}", "title": "" }, { "docid": "099ea152065cc2c5ebfabfca619ed66e", "score": "0.6681264", "text": "function isInvalidEmail (input) {\n\tvar emailRegExp = new RegExp(/^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,3})+$/);\n\tif (!emailRegExp.test(input)) return Messages.fieldErrors.isInvalid;\n\treturn null;\n}", "title": "" }, { "docid": "12cb041e1c4ebd4e73ede5fbba4c1e96", "score": "0.66692334", "text": "function validate_email()\n{\n doError(\"Start validate_email, email = |\" + document.main.email.value + \"|\");\n\n if(isemailReq) \n {\n document.main.email.value = document.main.email.value.trim();\n \n if(document.main.email.value==\"\")\n {\n errormsg+='Please enter a valid E-mail Address: (e.g. [email protected])\\n';\n error_m=true;\n if((!error_n)&&(!error_ad)&&(!error_c))\n {\n document.main.email.focus();\n document.main.email.select();\n return;\n }\n }\n else\n { /* e-mail is not blank */\n doError(\"starting to really validate |\" + document.main.email.value + \"|\");\n\n /* 1+@3+ [or [email protected]] is as close as we will test */\n\n if(document.main.email.value.length<5) \n {\n error_m=true;\n }\n\n if(document.main.email.value.indexOf(\"@\")<1) \n {\n error_m=true;\n }\n \n if((document.main.email.value.length - document.main.email.value.indexOf(\"@\")) < 4) \n {\n error_m=true;\n }\n\n if(error_m)\n {\n if((!error_n)&&(!error_ad)&&(!error_c))\n {\n errormsg+='Please enter a valid E-mail Address: (e.g. [email protected])\\n';\n document.main.email.focus(); /* select highlights the existing data, focus just activates the box */\n document.main.email.select();\n }\n }\n }\n }\n else /* e-mail is not required, so just return */\n { \n return;\n }\n}", "title": "" }, { "docid": "c6955d558684bb16109468d36c194ba9", "score": "0.66633505", "text": "function emailIdValidation()\n{\n var uemail = document.registration.emailid;\n var mailformat = /^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,3})+$/;\n if(uemail.value.match(mailformat))\n {\n document.registration.telephone.focus();\n return true;\n }\n else\n {\n alert(\"You have entered an invalid email address!\");\n uemail.focus();\n return false;\n }\n}", "title": "" }, { "docid": "189092b6378e357a1d71b2fa2fd8d2a4", "score": "0.6663005", "text": "function validateEmail() {\n\n// Gets reference to form email\n\n var email = document.getElementById(\"Email\").value;\n var checkemail = /^([\\w.-])+@([\\w]+\\.){1,3}([\\w]){2,3}$/;\n // email field contains a user name part follows by “@” and a domain name part\n // The user name contains word characters including hyphen (“-”) and period (“.”)\n // The domain name contains two to four address extensions. \n // Each extension is string of word characters and separated from the others by a period (“.”). \n // The last extension must have two to three characters.\n\n if (checkemail.test(email)) {\n return true;\n }\n else {\n alert(\"The email address you entered is not valid. Please enter the correct email address!\");\n return false;\n }\n}", "title": "" }, { "docid": "42aa234a20887bcf2ecb6bbfc886d62d", "score": "0.6661821", "text": "function validateEmailAddress() {\n var email = $.email.getValue().trim();\n if (email_regex.test(email)) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "e297101a0a635957c329701882244ccd", "score": "0.6646438", "text": "function ValidateEmail(uemail)\r\n{\r\n//It is a regular expression......... done during buffer\r\n//Declaring a variable mailformat that stores the regular expression that will be matched against \r\nvar mailformat = /^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,3})+$/;\r\n//A statement to check whether the value input matches mailformat\r\nif(uemail.value.match(mailformat))\r\n{\r\n//Returning true\r\nreturn true;\r\n}\r\nelse\r\n{\r\n//Make an alert when the condition is not fulfilled with a popup\r\nalert(\"You have entered an invalid email address!\");\r\nuemail.focus();\r\n//Returning false\r\nreturn false;\r\n}\r\n}", "title": "" }, { "docid": "458161763480630b9bd5b7045ebcd813", "score": "0.66298413", "text": "function validEmail(event){\r\n\tvar email = addForm.Email.value;\r\n\tat = email.indexOf(\"@\");\r\n\tdot = email.lastIndexOf(\".\");\r\n\r\n\tif( at < 1 || (dot - at < 2) || dot == email.length ){\r\n\t\tdocument.getElementById(\"addEmail\").innerHTML = \"Provided email is incorrect\";\r\n\t\treturn false;\r\n\t}\r\n\r\n\treturn true;\r\n}", "title": "" }, { "docid": "d5c52e15f42dd057eddca3ab59e678ce", "score": "0.6627737", "text": "function validateEmail (emailAddress) {\n if (!isValidEmail(emailAddress)) {\n throw new InvalidPropertyError('Invalid contact email address.')\n }\n }", "title": "" }, { "docid": "433beccb8fd08e11037fb0de4d78894f", "score": "0.65991575", "text": "function validateEmail(){\r\n\tvar email = document.forms[\"infoForm\"][\"email\"].value;\r\n\tvar atPos = email.indexOf(\"@\");\r\n\tvar dotPos = email.indexOf(\".\");\r\n\t\r\n\tif(atPos < 1 || dotPos < atPos+2 || dotPos+2 > email.length){\r\n\t\talert(\"Email address is invalid. Please try again.\");\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\talert(\"Email validation successful!\");\r\n\treturn true;\r\n}\t// End validateEmail", "title": "" }, { "docid": "126984deb3ac5934f682a5fba70b49ea", "score": "0.65932506", "text": "function validateEmail(){\n // get value of input email\n var email=$(\"#email_2\").val();\n // use reular expression\n var reg = /^\\w+([-+.']\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$/\n if(reg.test(email)){\n return true;\n }else{\n return false;\n }\n\n }", "title": "" }, { "docid": "600dc9fab8131850d3afbfaa13076441", "score": "0.6589464", "text": "function validateEmail(){\n var emailAdd = document.getElementById(\"eMail\");\n \n if(emailAdd.validity.valueMissing){\n emailAdd.setCustomValidity(\"Please Enter your email address\");\n } else if(/^[a-z.]{4,15}\\d?\\w+\\@[a-z.]+\\w{2,3}$/ig.test(emailAdd.value)===false){\n emailAdd.setCustomValidity(\"Please enter a valid Email address\");\n } else {\n emailAdd.setCustomValidity(\"\");\n }\n}", "title": "" }, { "docid": "e83438fe28cf1723744e43212577b7ee", "score": "0.65812814", "text": "function validateEmail(addr,man,db) {\nif (addr == '' && man) {\n if (db) alert('email address is mandatory');\n return false;\n}\nif (addr == '') return true;\nvar invalidChars = '\\/\\'\\\\ \";:?!()[]\\{\\}^|';\nfor (i=0; i<invalidChars.length; i++) {\n if (addr.indexOf(invalidChars.charAt(i),0) > -1) {\n if (db) alert('email address contains invalid characters');\n return false;\n }\n}\nfor (i=0; i<addr.length; i++) {\n if (addr.charCodeAt(i)>127) {\n if (db) alert(\"email address contains non ascii characters.\");\n return false;\n }\n}\n\nvar atPos = addr.indexOf('@',0);\nif (atPos == -1) {\n if (db) alert('email address must contain an @');\n return false;\n}\nif (atPos == 0) {\n if (db) alert('email address must not start with @');\n return false;\n}\nif (addr.indexOf('@', atPos + 1) > - 1) {\n if (db) alert('email address must contain only one @');\n return false;\n}\nif (addr.indexOf('.', atPos) == -1) {\n if (db) alert('email address must contain a period in the domain name');\n return false;\n}\nif (addr.indexOf('@.',0) != -1) {\n if (db) alert('period must not immediately follow @ in email address');\n return false;\n}\nif (addr.indexOf('.@',0) != -1){\n if (db) alert('period must not immediately precede @ in email address');\n return false;\n}\nif (addr.indexOf('..',0) != -1) {\n if (db) alert('two periods must not be adjacent in email address');\n return false;\n}\nvar suffix = addr.substring(addr.lastIndexOf('.')+1);\nif (suffix.length != 2 && suffix != 'com' && suffix != 'net' && suffix != 'org' && suffix != 'edu' && suffix != 'int' && suffix != 'mil' && suffix != 'gov' & suffix != 'arpa' && suffix != 'biz' && suffix != 'aero' && suffix != 'name' && suffix != 'coop' && suffix != 'info' && suffix != 'pro' && suffix != 'museum') {\n if (db) alert('invalid primary domain in email address');\n return false;\n}\nreturn true;\n}", "title": "" }, { "docid": "7f12dbc1cb041682b723cfb059a1f950", "score": "0.65805185", "text": "function validateEmail(email) {\nvar re = /^(([^<>()\\[\\]\\\\.,;:\\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,}))$/;\nvar email = document.getElementById('emailValue').value\nreturn re.test(String(email).toLowerCase());\n}", "title": "" }, { "docid": "4f12f35d3148e912b2ce918bb774df9f", "score": "0.65798366", "text": "function validateEmail() {\n \n var form = document.frmEmailAction;\n var addr = form.hidShareUserEmail.value;\n \n\n var yemail = form.emailfrom.value;\n var subEmail = \"\";\n\n if (addr.length == 0 || (yemail.length == 0 && myform.hidAddMe.checked )){ \n alert(\"Email Address(es) is empty.\");\n return false;\n } else{\n while (addr.length>0) {\n addrIndex = addr.lastIndexOf(',');\n if ( addrIndex == 0) {\n return validateEmailAddr(subEmail);\n } else { \n subEmail = addr.substr(addrIndex+1);\n addr = addr.substr(0,addrIndex);\n if (!validateEmailAddr(subEmail)) {\n return false;\n }\n }\n }\n }\n \n return true;\n}", "title": "" }, { "docid": "e3757d9ad033ed63e20658608c76e0f6", "score": "0.65729195", "text": "email() {\n // regex from https://html.spec.whatwg.org/multipage/forms.html#valid-e-mail-address\n /* tslint:disable:max-line-length */\n return this.matches(/^[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 .withMessageKey('email');\n }", "title": "" } ]
cb6c4b9941305ff49572ab224b93869f
Implements a host component that allows setting `value`, and `defaultValue`. This differs from the traditional DOM API because value is usually set as PCDATA children. If `value` is not supplied (or null/undefined), user actions that affect the value will trigger updates to the element. If `value` is supplied (and not null/undefined), the rendered element will not trigger updates to the element. Instead, the `value` prop must change in order for the rendered element to be updated. The rendered element will be initialized with an empty value, the prop `defaultValue` if specified, or the children content (deprecated).
[ { "docid": "3213657b6e25b54806538ea7ea5ca5d7", "score": "0.0", "text": "function getHostProps$3(element, props) {\n var node = element;\n if (!(props.dangerouslySetInnerHTML == null)) throw Error(\"`dangerouslySetInnerHTML` does not make sense on <textarea>.\");\n // Always set children to the same thing. In IE9, the selection range will\n // get reset if `textContent` is mutated. We could add a check in setTextContent\n // to only set the value if/when the value differs from the node value (which would\n // completely solve this IE9 bug), but Sebastian+Sophie seemed to like this\n // solution. The value can be a boolean or object so that's why it's forced\n // to be a string.\n var hostProps = _assign({}, props, {\n value: undefined,\n defaultValue: undefined,\n children: toString(node._wrapperState.initialValue)\n });\n return hostProps;\n }", "title": "" } ]
[ { "docid": "f09f4d0f65eb41487bc50d2b59cc4799", "score": "0.62822247", "text": "_initializeInputValueProperty() {\n this._hostElement.value = `${this.value}`;\n }", "title": "" }, { "docid": "7943213bc14c2564bf215fd70935ab79", "score": "0.6239278", "text": "_delegateInitialValueAttr() {\n const valueAttr = this.getAttribute('value');\n if (valueAttr !== null) {\n this.value = valueAttr;\n }\n }", "title": "" }, { "docid": "a7c7f83ca2f7ded39f03bdb487a6c634", "score": "0.6148884", "text": "setValue(value) {\n //TODO\n this.value = value;\n let temp = this._createDisplay();\n this.container.replaceWith(temp);\n this.container = temp;\n }", "title": "" }, { "docid": "a40f123123414beeca49e89fb267a9f9", "score": "0.6096023", "text": "constructor(props) {\n super(props);\n let defaultValue = this.props.defaultValue || '';\n this.state = { value: defaultValue, renderedValue: defaultValue};\n\n }", "title": "" }, { "docid": "ef5437d2f89b44832e00a397010aa9d0", "score": "0.60844797", "text": "_initializeInputValueAttribute() {\n // Only set the default value if an initial value has not already been provided.\n if (!this._hostElement.hasAttribute('value')) {\n this.value = this._hostElement.hasAttribute('matSliderEndThumb')\n ? this._slider.max\n : this._slider.min;\n }\n }", "title": "" }, { "docid": "f58939ea3b80820397d9660bdc118c65", "score": "0.60404295", "text": "setDOMValue(value) {\n this.inputElement().value = value;\n }", "title": "" }, { "docid": "ca806c20477f86b205675df25bfd6a02", "score": "0.60114783", "text": "function ObservableValue(defaultValue) {\n\n /**\n * Value that can be watched\n * @field\n * @type Object\n * @default undefined\n\n */\n this.value = defaultValue;\n\n /**\n * Sets the value and dispaches a \"change\" event if the value changed\n * @function\n * @param {Object} value The value to use\n * @returns {void}\n\n */\n this.setValue = function (value) {\n if (this.value != value) {\n this.value = value;\n this.dispatchEvent(\"change\");\n }\n };\n}", "title": "" }, { "docid": "0794af11de708f2f5d1f903a601e78ca", "score": "0.59778804", "text": "writeValue(value) {\n const normalizedValue = value == null ? '' : value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n }", "title": "" }, { "docid": "0794af11de708f2f5d1f903a601e78ca", "score": "0.59778804", "text": "writeValue(value) {\n const normalizedValue = value == null ? '' : value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n }", "title": "" }, { "docid": "0794af11de708f2f5d1f903a601e78ca", "score": "0.59778804", "text": "writeValue(value) {\n const normalizedValue = value == null ? '' : value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n }", "title": "" }, { "docid": "827a4a181c0343302f542202af44d1af", "score": "0.59652865", "text": "writeValue(value) {\n const normalizedValue = value == null ? '' : value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n }", "title": "" }, { "docid": "99cb5ba2690ffa106245e157e214b9c0", "score": "0.59404427", "text": "set value(value) {\n this.nativeElement.value = value !== null && value !== void 0 ? value : '';\n this.updateValidityState();\n }", "title": "" }, { "docid": "34a75b0bf645a56f0e4d03dee3f86e91", "score": "0.5939157", "text": "val(value) {\n var _a, _b;\n if (value === undefined) {\n return (_a = this.getFirstEl()) === null || _a === void 0 ? void 0 : _a.getAttribute('value');\n }\n else {\n (_b = this.getFirstEl()) === null || _b === void 0 ? void 0 : _b.setAttribute('value', value);\n return this;\n }\n }", "title": "" }, { "docid": "e8ed7101f693da897e285f78977cf9f7", "score": "0.5896162", "text": "function setDefaultValue(node, type, value) {\n if (type !== \"number\" || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) node.defaultValue = toString(node._wrapperState.initialValue);\n else if (node.defaultValue !== toString(value)) node.defaultValue = toString(value);\n }\n }", "title": "" }, { "docid": "427e203d5168db6d1dbabc07af7917c1", "score": "0.5890078", "text": "writeValue(value) {\n // The value needs to be normalized for IE9, otherwise it is set to 'null' when null\n const normalizedValue = value == null ? '' : value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n }", "title": "" }, { "docid": "13230d93df07fe96533cd41878b7e580", "score": "0.58803374", "text": "writeValue(value) {\n // The value needs to be normalized for IE9, otherwise it is set to 'null' when null\n const normalizedValue = value == null ? '' : value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n }", "title": "" }, { "docid": "13230d93df07fe96533cd41878b7e580", "score": "0.58803374", "text": "writeValue(value) {\n // The value needs to be normalized for IE9, otherwise it is set to 'null' when null\n const normalizedValue = value == null ? '' : value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n }", "title": "" }, { "docid": "13230d93df07fe96533cd41878b7e580", "score": "0.58803374", "text": "writeValue(value) {\n // The value needs to be normalized for IE9, otherwise it is set to 'null' when null\n const normalizedValue = value == null ? '' : value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n }", "title": "" }, { "docid": "287577363c21e512127d2403d21344a0", "score": "0.5799458", "text": "withValue(value) {\n this.value = value;\n let valueProp;\n // in case type attribute is bound to dynamic model, need to determine input type at runtime\n function setInputType() {\n let inputType = this.element.getAttribute(\"type\");\n valueProp = inputType == \"checkbox\" || inputType == \"radio\" ? \"checked\" : \"value\";\n }\n if (value instanceof ModelElement_1.default) {\n value.registerCallback(this, this.updateValue.bind(this));\n this.element.onchange = function () {\n setInputType.call(this);\n value.set(this.element[valueProp]);\n }.bind(this);\n }\n else if (this.value instanceof Binding_1.TwoWayBinding) {\n let binding = value;\n binding.model.registerCallback(this, this.updateValue.bind(this));\n this.element.onchange = function () {\n setInputType.call(this);\n binding.model.set(binding.onUserUpdate(this.element[valueProp]));\n }.bind(this);\n }\n return this;\n }", "title": "" }, { "docid": "813cfde02fed5963a0896d81639f4989", "score": "0.578466", "text": "set value(value) {\n // if not yet connected to dom can't change the value\n if (this.inputElement) {\n this._setValueAndPreserveCaret(value);\n }\n this._onValueChanged({ value });\n }", "title": "" }, { "docid": "402fe5a172f5829e7f9cfae95ac183c4", "score": "0.5772688", "text": "setValue(value){\r\n\t\tif (value!=undefined){\r\n\t\t\tvar convertValue=this.type.convert(value);\r\n\t\t\tswitch(this.use){\r\n\t\t\t\tcase 'optional' :\r\n\t\t\t\t\tif (this.type.holds(convertValue)){\r\n\t\t\t\t\t\tif (this.fixedValue==undefined ||value==this.fixedValue){\r\n\t\t\t\t\t\t\tthis.value=convertValue;\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\tcase 'required' :\r\n\t\t\t\t\tif (this.type.holds(convertValue)){\r\n\t\t\t\t\t\tif (this.fixedValue==undefined ||value==this.fixedValue){\r\n\t\t\t\t\t\t\tthis.value=convertValue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else if (this.value==undefined && this.defaultValue!=undefined){\r\n\t\t\t\t\t\tthis.value=this.defaultValue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'prohibited':\r\n\t\t\t\t\talert(this.name+' is prohibited here.');\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tswitch(this.use){\r\n\t\t\t\tcase 'optional' :\r\n\t\t\t\t\tthis.value=undefined;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'required' :\r\n\t\t\t\t\tif (this.fixedValue!=undefined){\r\n\t\t\t\t\t\tthis.value=this.fixedValue;\r\n\t\t\t\t\t}else if (this.defaultValue!=undefined){\r\n\t\t\t\t\t\tthis.value=this.defaultValue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (this.value==undefined){\r\n\t\t\t\t\t\tconsole.log(this.name +' should have a value.');\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'prohibited':\r\n\t\t\t\t\tthis.value=undefined;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "a38443935a8695dfb6dad62029bd1815", "score": "0.5715011", "text": "setValue(value) {\n this.value = value;\n return;\n }", "title": "" }, { "docid": "24cb13bc123816331f9c61980bc4f5b1", "score": "0.5713862", "text": "function patchDOMProp(el, key, value, \r\n // the following args are passed only due to potential innerHTML/textContent\r\n // overriding existing VNodes, in which case the old tree must be properly\r\n // unmounted.\r\n prevChildren, parentComponent, parentSuspense, unmountChildren) {\r\n if (key === 'innerHTML' || key === 'textContent') {\r\n if (prevChildren) {\r\n unmountChildren(prevChildren, parentComponent, parentSuspense);\r\n }\r\n el[key] = value == null ? '' : value;\r\n return;\r\n }\r\n if (key === 'value' && el.tagName !== 'PROGRESS') {\r\n // store value as _value as well since\r\n // non-string values will be stringified.\r\n el._value = value;\r\n var newValue = value == null ? '' : value;\r\n if (el.value !== newValue) {\r\n el.value = newValue;\r\n }\r\n return;\r\n }\r\n if (value === '' && typeof el[key] === 'boolean') {\r\n // e.g. <select multiple> compiles to { multiple: '' }\r\n el[key] = true;\r\n }\r\n else if (value == null && typeof el[key] === 'string') {\r\n // e.g. <div :id=\"null\">\r\n el[key] = '';\r\n el.removeAttribute(key);\r\n }\r\n else {\r\n // some properties perform value validation and throw\r\n try {\r\n el[key] = value;\r\n }\r\n catch (e) {\r\n if ((process.env.NODE_ENV !== 'production')) {\r\n warn(\"Failed setting prop \\\"\" + key + \"\\\" on <\" + (el.tagName.toLowerCase()) + \">: \" +\r\n \"value \" + value + \" is invalid.\", e);\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "4755730c9828b9cf638b2a3704e0335a", "score": "0.5699409", "text": "function Value(value) {\n var _this = _super.call(this, value) || this;\n _this._cssProperties = {};\n _this._isInitialized = false;\n _this._value = value;\n _this._animations = {};\n _this._listeners = {};\n _this._animationId = 0;\n _this._listenerId = 0;\n _this._animatedValueUniqueId = ++animatedValueUniqueId;\n return _this;\n }", "title": "" }, { "docid": "de8d1cc1c80fb998e4e1e2366a44040b", "score": "0.5645305", "text": "function Value(elmnt) {\n\tthis.element = elmnt;\n\tUX.addStyle(this.element, \"display\", \"none\");\n}", "title": "" }, { "docid": "a145178f514cb2ecf0c44d53bbf98303", "score": "0.5631427", "text": "constructor(value) {\n super();\n this.value = value;\n }", "title": "" }, { "docid": "22145a2edca7e23aedb10dd43aaabd3c", "score": "0.5630934", "text": "setOutputValues() {\n const els = Array.from(this.shadowRoot.querySelectorAll('[data-output-value], [data-outputvalue]'));\n els.forEach((el) => {\n const attr = el.getAttribute('data-output-value') || el.getAttribute('data-outputvalue');\n const type = el.getAttribute('type');\n\n // set the default value\n const value = this.data[attr];\n if (value) {\n if (type === 'checkbox' && el.getAttribute('value') === value) {\n el.checked = true;\n } else if (el.nodeName === 'SELECT') {\n Array.from(el.querySelectorAll('option')).forEach((option) => {\n if ((option.getAttribute('value') || option.textContent) === value) {\n option.selected = true;\n } else {\n option.selected = false;\n }\n });\n } else if (el.nodeName === 'TEXTAREA') {\n el.innerHTML = '';\n el.appendChild(document.createTextNode(value));\n el.value = value;\n } else {\n el.setAttribute('value', value);\n el.value = value;\n }\n } else if (value === undefined) {\n if (type === 'checkbox') {\n el.checked = false;\n } else {\n this.data[attr] = el.value;\n }\n }\n });\n }", "title": "" }, { "docid": "7d2baf1d691ee2ccb64d0a175a381372", "score": "0.5606721", "text": "set dom_value(v) {\n if (!this._status.updating_from_widget) {\n // console.log(\"SET:DOM:VALUE:\", v, this._status);\n this.node.value = this.stringify(v);\n // this is wrong per the html standard, but useful for debugging.\n // if (env.DEBUG) this.node.setAttribute('value', this.stringify(v));\n }\n }", "title": "" }, { "docid": "7f90385f6253c02c238b8d1dc099bc90", "score": "0.55796415", "text": "setValue(value, options = {}) {\n return super.setValue(value, options);\n }", "title": "" }, { "docid": "0e0f9d227b2fae96a2dac90ce532db06", "score": "0.5565268", "text": "function patchDOMProp(el, key, value, \r\n// the following args are passed only due to potential innerHTML/textContent\r\n// overriding existing VNodes, in which case the old tree must be properly\r\n// unmounted.\r\nprevChildren, parentComponent, parentSuspense, unmountChildren) {\r\n if (key === 'innerHTML' || key === 'textContent') {\r\n if (prevChildren) {\r\n unmountChildren(prevChildren, parentComponent, parentSuspense);\r\n }\r\n el[key] = value == null ? '' : value;\r\n return;\r\n }\r\n if (key === 'value' && el.tagName !== 'PROGRESS') {\r\n // store value as _value as well since\r\n // non-string values will be stringified.\r\n el._value = value;\r\n const newValue = value == null ? '' : value;\r\n if (el.value !== newValue) {\r\n el.value = newValue;\r\n }\r\n return;\r\n }\r\n if (value === '' || value == null) {\r\n const type = typeof el[key];\r\n if (value === '' && type === 'boolean') {\r\n // e.g. <select multiple> compiles to { multiple: '' }\r\n el[key] = true;\r\n return;\r\n }\r\n else if (value == null && type === 'string') {\r\n // e.g. <div :id=\"null\">\r\n el[key] = '';\r\n el.removeAttribute(key);\r\n return;\r\n }\r\n else if (type === 'number') {\r\n // e.g. <img :width=\"null\">\r\n el[key] = 0;\r\n el.removeAttribute(key);\r\n return;\r\n }\r\n }\r\n // some properties perform value validation and throw\r\n try {\r\n el[key] = value;\r\n }\r\n catch (e) {\r\n {\r\n runtimeCore.warn(`Failed setting prop \"${key}\" on <${el.tagName.toLowerCase()}>: ` +\r\n `value ${value} is invalid.`, e);\r\n }\r\n }\r\n}", "title": "" }, { "docid": "3145f024fdd4c950ee82b1b83d942e05", "score": "0.5563887", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "3145f024fdd4c950ee82b1b83d942e05", "score": "0.5563887", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "3145f024fdd4c950ee82b1b83d942e05", "score": "0.5563887", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "3145f024fdd4c950ee82b1b83d942e05", "score": "0.5563887", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "bbd2455754e7e03fba0575183664d4b7", "score": "0.55588067", "text": "function setContent(value) {\n\t\treturn this.element.innerHTML = value;\n\t}", "title": "" }, { "docid": "688fd74ef949ca4df029854511fc79dc", "score": "0.5549375", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "9ddd385a18c00aef5251508d68ee4342", "score": "0.55489784", "text": "initialValueChanged(previous, next) {\n // If the value is clean and the component is connected to the DOM\n // then set value equal to the attribute value.\n if (!this.dirtyValue) {\n this.value = this.initialValue;\n this.dirtyValue = false;\n }\n }", "title": "" }, { "docid": "8ed128c3f8f488eeec25efcd337d9e3e", "score": "0.55477995", "text": "setValue(value) {\n this.value = value;\n }", "title": "" }, { "docid": "f72b87f4e50a23e5c2abd1888eac7223", "score": "0.5547359", "text": "function setValue(el, value) {\n //console.log(\"setValue\", el.nodeName, \"[\"+value+\"]\");\n if (isInputOrTextAreaElement(el)) {\n el.value = value;\n }\n else {\n el.textContent = value;\n }\n}", "title": "" }, { "docid": "2c8f5b350d6b9c85614819708dfb9657", "score": "0.55421424", "text": "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' ||\n node.ownerDocument.activeElement !== node\n ) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "22e76b61da797c9124b368026a5f3ba4", "score": "0.5537713", "text": "function setDefaultValue(node, type, value) {\n if (// Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "22e76b61da797c9124b368026a5f3ba4", "score": "0.5537713", "text": "function setDefaultValue(node, type, value) {\n if (// Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "22e76b61da797c9124b368026a5f3ba4", "score": "0.5537713", "text": "function setDefaultValue(node, type, value) {\n if (// Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "b7cd2eec616476742a87504c6c7b389e", "score": "0.55316037", "text": "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== \"number\" ||\n node.ownerDocument.activeElement !== node\n ) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "acff4b594b34c40bb8164a9cd4851c88", "score": "0.55290717", "text": "function setDefaultValue(node, type, value) {\n\t if (\n\t // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n\t type !== 'number' || node.ownerDocument.activeElement !== node) {\n\t if (value == null) {\n\t node.defaultValue = '' + node._wrapperState.initialValue;\n\t } else if (node.defaultValue !== '' + value) {\n\t node.defaultValue = '' + value;\n\t }\n\t }\n\t }", "title": "" }, { "docid": "8bd52b8c487ecd1e49f1a3532daa67ed", "score": "0.5522538", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "title": "" }, { "docid": "8bd52b8c487ecd1e49f1a3532daa67ed", "score": "0.5522538", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "title": "" }, { "docid": "8bd52b8c487ecd1e49f1a3532daa67ed", "score": "0.5522538", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "title": "" }, { "docid": "8bd52b8c487ecd1e49f1a3532daa67ed", "score": "0.5522538", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "title": "" }, { "docid": "8bd52b8c487ecd1e49f1a3532daa67ed", "score": "0.5522538", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "title": "" }, { "docid": "8bd52b8c487ecd1e49f1a3532daa67ed", "score": "0.5522538", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "title": "" }, { "docid": "8bd52b8c487ecd1e49f1a3532daa67ed", "score": "0.5522538", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "title": "" }, { "docid": "8bd52b8c487ecd1e49f1a3532daa67ed", "score": "0.5522538", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "title": "" }, { "docid": "8bd52b8c487ecd1e49f1a3532daa67ed", "score": "0.5522538", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "title": "" }, { "docid": "8bd52b8c487ecd1e49f1a3532daa67ed", "score": "0.5522538", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "title": "" }, { "docid": "8bd52b8c487ecd1e49f1a3532daa67ed", "score": "0.5522538", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "title": "" }, { "docid": "8bd52b8c487ecd1e49f1a3532daa67ed", "score": "0.5522538", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "title": "" }, { "docid": "8bd52b8c487ecd1e49f1a3532daa67ed", "score": "0.5522538", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "title": "" }, { "docid": "8bd52b8c487ecd1e49f1a3532daa67ed", "score": "0.5522538", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "title": "" }, { "docid": "8bd52b8c487ecd1e49f1a3532daa67ed", "score": "0.5522538", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "title": "" }, { "docid": "8bd52b8c487ecd1e49f1a3532daa67ed", "score": "0.5522538", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "title": "" }, { "docid": "8bd52b8c487ecd1e49f1a3532daa67ed", "score": "0.5522538", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}", "title": "" }, { "docid": "56882f1e5595a2d953f178b168e059e2", "score": "0.5512121", "text": "function setDefaultValue(node, type, value) {\n\t if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n\t type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n\t if (value == null) {\n\t node.defaultValue = toString(node._wrapperState.initialValue);\n\t } else if (node.defaultValue !== toString(value)) {\n\t node.defaultValue = toString(value);\n\t }\n\t }\n\t}", "title": "" }, { "docid": "1bda032ca3c8ce24bce05687cf937a0d", "score": "0.5501439", "text": "setPropertyValue(value) {\n this._value = value;\n }", "title": "" }, { "docid": "786afce84cfb8772dcd401ee03bce444", "score": "0.5497373", "text": "setValue (value) {\n if (this.props.input && this.props.input.value !== value) { // if the value to select is not the current value of this component\n // notify our listeners that the user wants the value of this component to change\n if (this.props.input.onChange) this.props.input.onChange(value);\n }\n }", "title": "" }, { "docid": "bee72191c2334c78320a0316f5de9eff", "score": "0.54854876", "text": "function writeToElement(el, value) {\n var binding = util.parseXBind(el),\n attribute = binding.attribute;\n\n if (attribute === 'value') {\n if (el.type === 'checkbox') {\n el.checked = !!value;\n } else {\n el.value = value;\n }\n } else if(attribute === '') {\n if (el.innerHTML !== value) {\n el.innerHTML = value;\n }\n } else {\n attr(el).set(attribute, value);\n }\n }", "title": "" }, { "docid": "4ccaa8217ba3dfd464dc861f55866bb0", "score": "0.5481238", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "5e705f5810ff58b5d3702b3a2b95771a", "score": "0.5472785", "text": "function patchDOMProp(el, key, value, \n// the following args are passed only due to potential innerHTML/textContent\n// overriding existing VNodes, in which case the old tree must be properly\n// unmounted.\nprevChildren, parentComponent, parentSuspense, unmountChildren) {\n if (key === 'innerHTML' || key === 'textContent') {\n if (prevChildren) {\n unmountChildren(prevChildren, parentComponent, parentSuspense);\n }\n el[key] = value == null ? '' : value;\n return;\n }\n if (key === 'value' && el.tagName !== 'PROGRESS') {\n // store value as _value as well since\n // non-string values will be stringified.\n el._value = value;\n const newValue = value == null ? '' : value;\n if (el.value !== newValue) {\n el.value = newValue;\n }\n return;\n }\n if (value === '' || value == null) {\n const type = typeof el[key];\n if (value === '' && type === 'boolean') {\n // e.g. <select multiple> compiles to { multiple: '' }\n el[key] = true;\n return;\n }\n else if (value == null && type === 'string') {\n // e.g. <div :id=\"null\">\n el[key] = '';\n el.removeAttribute(key);\n return;\n }\n else if (type === 'number') {\n // e.g. <img :width=\"null\">\n el[key] = 0;\n el.removeAttribute(key);\n return;\n }\n }\n // some properties perform value validation and throw\n try {\n el[key] = value;\n }\n catch (e) {\n if ((true)) {\n (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(`Failed setting prop \"${key}\" on <${el.tagName.toLowerCase()}>: ` +\n `value ${value} is invalid.`, e);\n }\n }\n}", "title": "" }, { "docid": "5e705f5810ff58b5d3702b3a2b95771a", "score": "0.5472785", "text": "function patchDOMProp(el, key, value, \n// the following args are passed only due to potential innerHTML/textContent\n// overriding existing VNodes, in which case the old tree must be properly\n// unmounted.\nprevChildren, parentComponent, parentSuspense, unmountChildren) {\n if (key === 'innerHTML' || key === 'textContent') {\n if (prevChildren) {\n unmountChildren(prevChildren, parentComponent, parentSuspense);\n }\n el[key] = value == null ? '' : value;\n return;\n }\n if (key === 'value' && el.tagName !== 'PROGRESS') {\n // store value as _value as well since\n // non-string values will be stringified.\n el._value = value;\n const newValue = value == null ? '' : value;\n if (el.value !== newValue) {\n el.value = newValue;\n }\n return;\n }\n if (value === '' || value == null) {\n const type = typeof el[key];\n if (value === '' && type === 'boolean') {\n // e.g. <select multiple> compiles to { multiple: '' }\n el[key] = true;\n return;\n }\n else if (value == null && type === 'string') {\n // e.g. <div :id=\"null\">\n el[key] = '';\n el.removeAttribute(key);\n return;\n }\n else if (type === 'number') {\n // e.g. <img :width=\"null\">\n el[key] = 0;\n el.removeAttribute(key);\n return;\n }\n }\n // some properties perform value validation and throw\n try {\n el[key] = value;\n }\n catch (e) {\n if ((true)) {\n (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(`Failed setting prop \"${key}\" on <${el.tagName.toLowerCase()}>: ` +\n `value ${value} is invalid.`, e);\n }\n }\n}", "title": "" }, { "docid": "5e705f5810ff58b5d3702b3a2b95771a", "score": "0.5472785", "text": "function patchDOMProp(el, key, value, \n// the following args are passed only due to potential innerHTML/textContent\n// overriding existing VNodes, in which case the old tree must be properly\n// unmounted.\nprevChildren, parentComponent, parentSuspense, unmountChildren) {\n if (key === 'innerHTML' || key === 'textContent') {\n if (prevChildren) {\n unmountChildren(prevChildren, parentComponent, parentSuspense);\n }\n el[key] = value == null ? '' : value;\n return;\n }\n if (key === 'value' && el.tagName !== 'PROGRESS') {\n // store value as _value as well since\n // non-string values will be stringified.\n el._value = value;\n const newValue = value == null ? '' : value;\n if (el.value !== newValue) {\n el.value = newValue;\n }\n return;\n }\n if (value === '' || value == null) {\n const type = typeof el[key];\n if (value === '' && type === 'boolean') {\n // e.g. <select multiple> compiles to { multiple: '' }\n el[key] = true;\n return;\n }\n else if (value == null && type === 'string') {\n // e.g. <div :id=\"null\">\n el[key] = '';\n el.removeAttribute(key);\n return;\n }\n else if (type === 'number') {\n // e.g. <img :width=\"null\">\n el[key] = 0;\n el.removeAttribute(key);\n return;\n }\n }\n // some properties perform value validation and throw\n try {\n el[key] = value;\n }\n catch (e) {\n if ((true)) {\n (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(`Failed setting prop \"${key}\" on <${el.tagName.toLowerCase()}>: ` +\n `value ${value} is invalid.`, e);\n }\n }\n}", "title": "" }, { "docid": "5e705f5810ff58b5d3702b3a2b95771a", "score": "0.5472785", "text": "function patchDOMProp(el, key, value, \n// the following args are passed only due to potential innerHTML/textContent\n// overriding existing VNodes, in which case the old tree must be properly\n// unmounted.\nprevChildren, parentComponent, parentSuspense, unmountChildren) {\n if (key === 'innerHTML' || key === 'textContent') {\n if (prevChildren) {\n unmountChildren(prevChildren, parentComponent, parentSuspense);\n }\n el[key] = value == null ? '' : value;\n return;\n }\n if (key === 'value' && el.tagName !== 'PROGRESS') {\n // store value as _value as well since\n // non-string values will be stringified.\n el._value = value;\n const newValue = value == null ? '' : value;\n if (el.value !== newValue) {\n el.value = newValue;\n }\n return;\n }\n if (value === '' || value == null) {\n const type = typeof el[key];\n if (value === '' && type === 'boolean') {\n // e.g. <select multiple> compiles to { multiple: '' }\n el[key] = true;\n return;\n }\n else if (value == null && type === 'string') {\n // e.g. <div :id=\"null\">\n el[key] = '';\n el.removeAttribute(key);\n return;\n }\n else if (type === 'number') {\n // e.g. <img :width=\"null\">\n el[key] = 0;\n el.removeAttribute(key);\n return;\n }\n }\n // some properties perform value validation and throw\n try {\n el[key] = value;\n }\n catch (e) {\n if ((true)) {\n (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(`Failed setting prop \"${key}\" on <${el.tagName.toLowerCase()}>: ` +\n `value ${value} is invalid.`, e);\n }\n }\n}", "title": "" }, { "docid": "5e705f5810ff58b5d3702b3a2b95771a", "score": "0.5472785", "text": "function patchDOMProp(el, key, value, \n// the following args are passed only due to potential innerHTML/textContent\n// overriding existing VNodes, in which case the old tree must be properly\n// unmounted.\nprevChildren, parentComponent, parentSuspense, unmountChildren) {\n if (key === 'innerHTML' || key === 'textContent') {\n if (prevChildren) {\n unmountChildren(prevChildren, parentComponent, parentSuspense);\n }\n el[key] = value == null ? '' : value;\n return;\n }\n if (key === 'value' && el.tagName !== 'PROGRESS') {\n // store value as _value as well since\n // non-string values will be stringified.\n el._value = value;\n const newValue = value == null ? '' : value;\n if (el.value !== newValue) {\n el.value = newValue;\n }\n return;\n }\n if (value === '' || value == null) {\n const type = typeof el[key];\n if (value === '' && type === 'boolean') {\n // e.g. <select multiple> compiles to { multiple: '' }\n el[key] = true;\n return;\n }\n else if (value == null && type === 'string') {\n // e.g. <div :id=\"null\">\n el[key] = '';\n el.removeAttribute(key);\n return;\n }\n else if (type === 'number') {\n // e.g. <img :width=\"null\">\n el[key] = 0;\n el.removeAttribute(key);\n return;\n }\n }\n // some properties perform value validation and throw\n try {\n el[key] = value;\n }\n catch (e) {\n if ((true)) {\n (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(`Failed setting prop \"${key}\" on <${el.tagName.toLowerCase()}>: ` +\n `value ${value} is invalid.`, e);\n }\n }\n}", "title": "" }, { "docid": "f31b24ec52b33533eff27aaf9a31d2d7", "score": "0.54600847", "text": "function updateElementValue(element,attr,value){// Support: IE9 only\n// In IE9 values are converted to string (e.g. `input.value = null` results in `input.value === 'null'`).\nvar propValue=isDefined(value)?value:msie===9?'':null;element.prop('value',propValue);attr.$set('value',value);}", "title": "" }, { "docid": "f31b24ec52b33533eff27aaf9a31d2d7", "score": "0.54600847", "text": "function updateElementValue(element,attr,value){// Support: IE9 only\n// In IE9 values are converted to string (e.g. `input.value = null` results in `input.value === 'null'`).\nvar propValue=isDefined(value)?value:msie===9?'':null;element.prop('value',propValue);attr.$set('value',value);}", "title": "" }, { "docid": "f31b24ec52b33533eff27aaf9a31d2d7", "score": "0.54600847", "text": "function updateElementValue(element,attr,value){// Support: IE9 only\n// In IE9 values are converted to string (e.g. `input.value = null` results in `input.value === 'null'`).\nvar propValue=isDefined(value)?value:msie===9?'':null;element.prop('value',propValue);attr.$set('value',value);}", "title": "" }, { "docid": "b26afec9eb07776e305afda06a1175d2", "score": "0.54540104", "text": "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n }", "title": "" }, { "docid": "b26afec9eb07776e305afda06a1175d2", "score": "0.54540104", "text": "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = '' + node._wrapperState.initialValue;\n } else if (node.defaultValue !== '' + value) {\n node.defaultValue = '' + value;\n }\n }\n }", "title": "" }, { "docid": "2184c5607c9af134791373d7fa48a5bc", "score": "0.5452813", "text": "setModelValue(value) {\n\t\t\t// if (!this.nodeSchema.values) {\n\t\t\t// \tif (!this.nodeSchema.values) {\n\t\t\t// \t\tthis.nodeSchema.values = [];\n\t\t\t// \t\tthis.nodeSchema.values.push({\n\t\t\t// \t\t\tpropertyName: this.nodeSchema.attributes.model,\n\t\t\t// \t\t\tpropertyValue: '',\n\t\t\t// \t\t});\n\t\t\t// \t}\n\t\t\t// }\n\n\t\t\tthis.nodeSchema.values[0].propertyValue = value;\n\t\t}", "title": "" }, { "docid": "27996dc6d189ae5a8c0d516527e96784", "score": "0.5445485", "text": "set value(value) {\n if (typeof value !== \"string\") {\n value = this.default;\n }\n else {\n value = value.trim();\n }\n super.value = value;\n }", "title": "" }, { "docid": "1a9affcb1870e6a80980f1ad3781f8cd", "score": "0.54439163", "text": "function ValueLabelComponent(props) {\n const { children, open, value } = props;\n \n return (\n <Tooltip open={open} enterTouchDelay={0} placement=\"top\" title={value}>\n {children}\n </Tooltip>\n );\n }", "title": "" }, { "docid": "c52293a9efcf0167e11a2fa08a6e0b8c", "score": "0.54412365", "text": "set value(value) {\n this.set(value);\n }", "title": "" }, { "docid": "790e64c54a824a99fd62427c89598f49", "score": "0.5436874", "text": "if (!!value && value !== this.props.value) {\n this._handleControlledValue(children, value);\n }", "title": "" }, { "docid": "e1379c5598c9a4721621c2de7c7e2060", "score": "0.54328746", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "e1379c5598c9a4721621c2de7c7e2060", "score": "0.54328746", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "e1379c5598c9a4721621c2de7c7e2060", "score": "0.54328746", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "e1379c5598c9a4721621c2de7c7e2060", "score": "0.54328746", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "e1379c5598c9a4721621c2de7c7e2060", "score": "0.54328746", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "e1379c5598c9a4721621c2de7c7e2060", "score": "0.54328746", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "e1379c5598c9a4721621c2de7c7e2060", "score": "0.54328746", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "e1379c5598c9a4721621c2de7c7e2060", "score": "0.54328746", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "e1379c5598c9a4721621c2de7c7e2060", "score": "0.54328746", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "e1379c5598c9a4721621c2de7c7e2060", "score": "0.54328746", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "e1379c5598c9a4721621c2de7c7e2060", "score": "0.54328746", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "e1379c5598c9a4721621c2de7c7e2060", "score": "0.54328746", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "e1379c5598c9a4721621c2de7c7e2060", "score": "0.54328746", "text": "function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "6e680eab5f6b1030cffd25212c554dfc", "score": "0.54310733", "text": "constructor(value) {\n super();\n if (value) {\n this.value = new adaptive_expressions_1.ValueExpression(value);\n }\n }", "title": "" }, { "docid": "8cda0db73709adc9bf91ea0816206b05", "score": "0.5421852", "text": "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "8cda0db73709adc9bf91ea0816206b05", "score": "0.5421852", "text": "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "8cda0db73709adc9bf91ea0816206b05", "score": "0.5421852", "text": "function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }", "title": "" }, { "docid": "f161c5b409812943c8818a2707a2e178", "score": "0.5421644", "text": "set value(value) {\n const slot = Control.getChildByType(this.viewerSlot, HTMLElement);\n this.setEditorProperty('value', (this.states.value = value));\n DOM.append(DOM.clear(slot), (this.viewer = this.renderViewer()));\n this.enableHandler();\n }", "title": "" }, { "docid": "c82e4354ae91b17884f1d5f2762217e6", "score": "0.54210985", "text": "function patchDOMProp(el,key,value,// the following args are passed only due to potential innerHTML/textContent\n\t// overriding existing VNodes, in which case the old tree must be properly\n\t// unmounted.\n\tprevChildren,parentComponent,parentSuspense,unmountChildren){if(key==='innerHTML'||key==='textContent'){if(prevChildren){unmountChildren(prevChildren,parentComponent,parentSuspense);}el[key]=value==null?'':value;return;}if(key==='value'&&el.tagName!=='PROGRESS'&&// custom elements may use _value internally\n\t!el.tagName.includes('-')){// store value as _value as well since\n\t// non-string values will be stringified.\n\tel._value=value;const newValue=value==null?'':value;if(el.value!==newValue||// #4956: always set for OPTION elements because its value falls back to\n\t// textContent if no value attribute is present. And setting .value for\n\t// OPTION has no side effect\n\tel.tagName==='OPTION'){el.value=newValue;}if(value==null){el.removeAttribute(key);}return;}let needRemove=false;if(value===''||value==null){const type=typeof el[key];if(type==='boolean'){// e.g. <select multiple> compiles to { multiple: '' }\n\tvalue=includeBooleanAttr(value);}else if(value==null&&type==='string'){// e.g. <div :id=\"null\">\n\tvalue='';needRemove=true;}else if(type==='number'){// e.g. <img :width=\"null\">\n\tvalue=0;needRemove=true;}}// some properties perform value validation and throw,\n\t// some properties has getter, no setter, will error in 'use strict'\n\t// eg. <select :type=\"null\"></select> <select :willValidate=\"null\"></select>\n\ttry{el[key]=value;}catch(e){// do not warn if value is auto-coerced from nullish values\n\tif(!needRemove){warn$1(`Failed setting prop \"${key}\" on <${el.tagName.toLowerCase()}>: `+`value ${value} is invalid.`,e);}}needRemove&&el.removeAttribute(key);}// Async edge case fix requires storing an event listener's attach timestamp.", "title": "" } ]
9b10d986d20516de233f67131deafb6c
Function for special characters
[ { "docid": "94db5e5e783d1f1ec1a356ecfdffb08c", "score": "0.59902287", "text": "function special() {\n let specialInput = prompt(\"Include special characters? Y or N\");\n \n switch(specialInput) {\n case \"Y\", \"y\":\n characters.push(\"!\", \"\\\"\", \"#\", \"$\", \"%\", \"&\", \"\\'\", \"(\", \")\", \"*\", \"+\", \",\", \"-\", \".\", \"/\", \":\", \";\", \"<\", \"=\", \">\", \"?\", \"@\", \"[\", \"\\\\\", \"]\", \"^\", \"_\", \"\\`\", \"{\", \"|\", \"}\", \"~\");\n confirm(\"Special characters selected.\");\n break;\n\n case \"N\", \"n\":\n confirm(\"O.K.\");\n break;\n\n default:\n confirm(\"Invalid input.\");\n special();\n break;\n }\n }", "title": "" } ]
[ { "docid": "0057d8b8ecf0bb6607d16abf87c576f6", "score": "0.7466165", "text": "function special_characters(input){\n if(input == '&' || input== '=' || input== '_'\n || input== '\\''||input== '-'||input== '+'\n ||input== ','||input== '<'||input== '>'){\n return true;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "c3b6be6455136e1804aa622a35378a34", "score": "0.7329462", "text": "function specialChar(pswd) {\n return /[!@#$%^&*]/g.test(pswd);\n}", "title": "" }, { "docid": "a00fb7828ad6678a8529f9bb941501fa", "score": "0.73150605", "text": "function check_special_chars(mes)\n{\n var myreg=/&amp;/g;\n mes=mes.replace(myreg, \"&\");\n mes=mes.replace(/&quot;/g, \"\\\"\");\n mes=mes.replace(/&#039;/g, \"'\");\n mes=mes.replace(/&lt;/g, \"<\");\n mes=mes.replace(/&gt;/g,\">\");\n return mes;\n\n\n}", "title": "" }, { "docid": "349021d6261ee1d4f1ebda22418c7498", "score": "0.7156677", "text": "validateSpecialCharacter(str){\n var re = /^[0-9a-zA-Z]+$/\n return re.test(str);\n }", "title": "" }, { "docid": "2cf1b1efec0314c2ba13151e9a6f8495", "score": "0.71505076", "text": "function checkSpecialChar2(controlId)\n{\n var splArr = [ \"=\", \"<\", \">\", \"\\\\\",\"\\\"\",\"--\" ];\n //var splArr = [\"%\", \"<\", \">\", \"\\\\\", \"\\\"\"];\n var str = $('#' + controlId).val();\n for (var i = 0; i < splArr.length; i++)\n {\n if (str.indexOf(splArr[i]) > 0) {\n viewAlert(\"Special character \" + splArr[i] + \" is not allowed !!!\", controlId);\n $('#' + controlId).focus();\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "6c3e31331cf28608f79b2673a109e903", "score": "0.71392506", "text": "function checkSpecialCharCustome(controlId)\n{\n var splArr = [\"%\", \"=\", \"<\", \">\", \"\\\\\",\"\\\"\",\"--\",\"$\",\"^\",\"/*\",\"*/\" ];\n //var splArr = [\"%\", \"<\", \">\", \"\\\\\", \"\\\"\"];\n var str = $('#' + controlId).val();\n for (var i = 0; i < splArr.length; i++)\n {\n if (str.indexOf(splArr[i]) > 0) {\n viewAlert(\"Special character \" + splArr[i] + \" is not allowed !!!\", controlId);\n $('#' + controlId).focus();\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "036cbe97ca8fe3d7b10d540ca440815d", "score": "0.70808244", "text": "function checkSpecialChar(controlId)\n{\n var splArr = [ \"'\", \"%\", \"=\", \"<\", \">\", \"\\\\\",\"\\\"\",\"--\" ];\n //var splArr = [\"%\", \"<\", \">\", \"\\\\\", \"\\\"\"];\n var str = $('#' + controlId).val();\n for (var i = 0; i < splArr.length; i++)\n {\n if (str.indexOf(splArr[i]) > 0) {\n viewAlert(\"Special character \" + splArr[i] + \" is not allowed !!!\", controlId);\n $('#' + controlId).focus();\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "ce4633f44c86322999dd9db8dfda1d0a", "score": "0.707987", "text": "function isSpecial( /*char*/ a) {\r\n\tvar str = \"GgHhRrYy\"; //untuk bikonsonan th, dh, ng (nga dan cecak), ny, -r- (cakra), -y- (pengkal)\r\n\treturn findstr(str,a);\r\n\t}", "title": "" }, { "docid": "ae8aac2a43a89b50c1882257b81c9ff6", "score": "0.6989274", "text": "function special() {\n var spe = confirm(\"Would you like to use special characters?\");\n return spe;\n}", "title": "" }, { "docid": "770077173523fc8410df5a8f05b4b5ad", "score": "0.6952096", "text": "function escapeSpecialCharacterInString(sText)\r\n{\r\n\r\n\ttry\r\n\t{\r\n\t\t//Create method that will handle special characters\r\n\t\tRegExp.escape = function(text){\r\n\t\tif (!arguments.callee.sRE) {\r\n\t\t\tvar specials = [\r\n\t\t\t'/', '.', '*', '+', '?', '|',\r\n\t\t\t'(', ')', '[', ']', '{', '}', '\\\\'\r\n\t\t\t];\r\n\t\t\targuments.callee.sRE = new RegExp(\r\n\t\t\t'(\\\\' + specials.join('|\\\\') + ')', 'g'\r\n\t\t\t);\r\n\t\t}\r\n\t\t return text.replace(arguments.callee.sRE, '\\\\$1');\r\n\t\t}\r\n\t\tvar sNewText = RegExp.escape(sText)\r\n\t\treturn sNewText\r\n\t}\r\n\tcatch(e)\r\n\t{\r\n\t\t//debugger\r\n\t\talert(e.description);\r\n\t} \r\n}", "title": "" }, { "docid": "f0a029c57364a68c5d12ae9d52b6cd46", "score": "0.6920215", "text": "static replaceSpecialCharacters(txt) {\n return encodeURI(txt)\n .replace(/'/g, \"''\")\n //.replace(/%/g, \"%25\")\n .replace(/\\+/g, \"%2B\")\n .replace(/\\//g, \"%2F\")\n .replace(/\\?/g, \"%3F\")\n .replace(/#/g, \"%23\")\n .replace(/&/g, \"%26\")\n .replace(/\\(/g, \"%28\")\n .replace(/\\)/g, \"%29\");\n }", "title": "" }, { "docid": "31e747eda7ca7d0fbd3645127021ec7c", "score": "0.691051", "text": "function getSpecialCharacter() {\n const specialCharacters = \"!@#+:;$%^&*(~){|}?[]=<>/,.\";\n return specialCharacters[\n Math.floor(Math.random() * specialCharacters.length)\n ];\n}", "title": "" }, { "docid": "2cbb167449161517d2aeda60846064e3", "score": "0.6854063", "text": "function isSpecialCharacter(string) {\n var format = /(?=[-+*\\/])/;\n \n if(format.test(string)){\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "f53d1f216e9a38bfe03629e1d0789bbe", "score": "0.682528", "text": "function containsSpecial(value) {\n return /.*[`!@#$%^&*()_+\\-=\\[\\]{};':\"\\\\|,.<>\\/?~].*/.test(value);\n}", "title": "" }, { "docid": "6260f091c2c71dcd87bd689e2ede3a58", "score": "0.6800581", "text": "function encodeSpecialChars(str, specialCharsReg) {\n // encodeURI( ) is intended to encode complete URIs,\n // the following ASCII punctuation characters,\n // which have special meaning in URIs, are not escaped either:\n // ; / ? : @ & = + $ , #\n return encodeURI(str).replace(specialCharsReg, function (m) {\n return '%' + padding2(m.charCodeAt(0).toString(16));\n });\n }", "title": "" }, { "docid": "c0e1eb1890008bbcc492e1f4dfd794d2", "score": "0.67897505", "text": "function validate_special_char(textbox,msg)\r\n{\r\n var amtinv = textbox.value;\r\n var validStr = \" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.0123456789/-?(),\\\"+\\n\\r\";\r\n\t \r\n for(i=0;i<=textbox.value.length-1;i++)\r\n {\r\n //alert(validStr.indexOf(amtinv.charAt(i)));\r\n if(validStr.indexOf(amtinv.charAt(i))==-1)\r\n {\r\n add_error_msg(\"Invalid character \"+amtinv.charAt(i)+\" entered for \"+msg);\r\n break;\r\n }\r\n }\r\n}", "title": "" }, { "docid": "93a2b363e419175d51eb432870b41875", "score": "0.6764288", "text": "function getSpecialCharcter() {\n return specialChar[Math.floor(Math.random() * specialChar.length)];\n}", "title": "" }, { "docid": "d7e2a9eae9092f5b48e8d68381da35f6", "score": "0.6738233", "text": "function hasSpecialChar(fieldTxtValue) {\n return /[<>.?%#,;]|&#/.test(fieldTxtValue) ? true : false;\n}", "title": "" }, { "docid": "bddf49a6c0769cfce3b36a0b5eb36502", "score": "0.66567564", "text": "function encodeSpecial(text) {\n\treturn escape(text.replace(/\\\"/g, \"'\"));\n}", "title": "" }, { "docid": "5d1ddd3b58bcf520a8ad9c9c43a685d6", "score": "0.6619484", "text": "function specialValid(val){\n if( /[^a-zA-Z0-9\\-\\/]/.test(val)) {\n // alert('Input is not alphanumeric');\n return false;\n }\n return true; \n}", "title": "" }, { "docid": "5d1ddd3b58bcf520a8ad9c9c43a685d6", "score": "0.6619484", "text": "function specialValid(val){\n if( /[^a-zA-Z0-9\\-\\/]/.test(val)) {\n // alert('Input is not alphanumeric');\n return false;\n }\n return true; \n}", "title": "" }, { "docid": "4bba5cca2692042b2f2c708b56bd8b28", "score": "0.65848655", "text": "function a() {\n \n //place special character in user text\n input.value += \"\\xE1\";\n \n}", "title": "" }, { "docid": "4bba5cca2692042b2f2c708b56bd8b28", "score": "0.65848655", "text": "function a() {\n \n //place special character in user text\n input.value += \"\\xE1\";\n \n}", "title": "" }, { "docid": "4bba5cca2692042b2f2c708b56bd8b28", "score": "0.65848655", "text": "function a() {\n \n //place special character in user text\n input.value += \"\\xE1\";\n \n}", "title": "" }, { "docid": "385c4977ef49b8189cc0ec9f32e28646", "score": "0.6569635", "text": "function doubleChar() {\n //...code here\n }", "title": "" }, { "docid": "1d4ac24eefe1b0e4a8fe82e5d2788be3", "score": "0.65086687", "text": "function testSpecial (string) {\n\tif (!string)\n\t\treturn (false);\n\t\t\n\tvar regexp = new RegExp('[!@#$%^&*=+-]+');\n\n\treturn regexp.test(string);\n}", "title": "" }, { "docid": "4764f4a581682a426c04bddabcbdecac", "score": "0.6499945", "text": "function decodeSpecialCharacters(text){return text.replace( /\\&amp;/g, '&' ).replace( /\\&quot;/g, '\"' );}", "title": "" }, { "docid": "15f899055a7a8fdafb8e3bfa9fda7e5a", "score": "0.647712", "text": "function _(e){return unescape(encodeURIComponent(e))}", "title": "" }, { "docid": "ab483c138c26add6697ed94e68c06825", "score": "0.6465252", "text": "function convertSepecialCharacters() {\n\t// Validate if the code is HTML\n\tif (!genFunc.isHTMLcode()) {\n\t\treturn;\n\t}\n\n\t// Select the current editor, if no one available then show an error message and exit\n\tconst myEditor = genFunc.getActiveEditor();\n\tif (!myEditor) {\n\t\treturn false;\n\t}\n\n\t// Define the whole document as range. Range is required to update the Editor's content\n\tconst SelectedTextRange = genFunc.getRangeSelected(true);\n\n\t// Get the selected text in the Active Editor\n\tlet docText = genFunc.getTextSelected(true);\n\n\t// ****** MAIN PROCESS - Apply replacement ****** \n\t// Pass through out all characters and replace their name (&#####;) by their character (x) in the selected part of text\n\t// Only the name is replaced. Special characters coded with their number is kept in the code.\n\tfor (let i = 0; i < listChars.accentedCharacters.length; i++) {\n\t\t// Define the RegEx partern \n\t\tlet tmpPatern = listChars.accentedCharacters[i].name;\n\t\t// Create a temporary RegEx object\n\t\tlet tmpRegEx = new RegExp(tmpPatern, \"g\");\n\t\t// Proceed to replacement of all instances of the character's name by the caracter itself\n\t\tdocText = docText.replace(tmpRegEx, listChars.accentedCharacters[i].character);\n\t}\n\n\t// Replace the content of the Active Editor with the new one cleanned\n\tgenFunc.updateEditor(docText, SelectedTextRange);\n}", "title": "" }, { "docid": "145f95e88ad30b586e34ee7c0a92f33c", "score": "0.6430708", "text": "function hasSpaceOrSpecialCharacter(username){\n let filter = /[ !@#$%^&*()_+\\-=\\[\\]{};':\"\\\\|,.<>\\/?]/;\n if(filter.test(username)){\n return true;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "ec41d30072c0b47a147d9e46f7875842", "score": "0.6429312", "text": "function alphanum(c) { // char code of alphanumeric encoding\r\n\t\treturn \"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:\".indexOf(String.fromCharCode(c));\r\n\t}", "title": "" }, { "docid": "f0be77a2f266804ea46fc9bfc106777a", "score": "0.64264864", "text": "function Restrictspecialchar(e) {\n var key;\n key = e.which ? e.which : e.keyCode;\n if ((key > 64 && key < 91) || (key > 96 && key < 123) || key == 8 || key == 32 || (key >= 48 && key <= 57) || (key == 009)) {\n return true;\n }\n else {\n return false;\n }\n}", "title": "" }, { "docid": "5916d8b29cdb0b3b5836de8c3dfee92c", "score": "0.6418849", "text": "function randomSpecialChar(){\n const specialChar = \"!@#$*%+-&~|/\"\n return specialChar[Math.floor(Math.random()*specialChar.length)];\n}", "title": "" }, { "docid": "c77bc6bf3e32625d35077192ae0eb851", "score": "0.63953775", "text": "function EscapeRegExpSpecialChar(vc7b20){ var vef453 =\"\\^$*+?{}()|.:=![]-,\",tempVal=\"\",tempChar; for(var v68642=0;v68642<vc7b20.length;v68642++) { tempChar =vc7b20.charAt(v68642); if (vef453.indexOf(tempChar)>-1) tempChar =\"\\\\\" +tempChar; else { if (tempChar ==\" \") tempChar =\"\\\\s\"; } tempVal +=tempChar; } return tempVal;}", "title": "" }, { "docid": "0b1591ef24ed39927e0c31c9d012192c", "score": "0.6378662", "text": "function escapeSpecialChars(str) {\n return str.replace(/\\\\n/g, \"\\\\n\")\n .replace(/\\\\'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\\\\\"')\n .replace(/\\\\&/g, \"\\\\&\")\n .replace(/\\\\r/g, \"\\\\r\")\n .replace(/\\\\t/g, \"\\\\t\")\n .replace(/\\\\b/g, \"\\\\b\")\n .replace(/\\\\f/g, \"\\\\f\");\n}", "title": "" }, { "docid": "7482726d5cff984cd8a716653d4fff56", "score": "0.6377509", "text": "function searchEncode(string){\n return string.replace(/\\W/g, '+'); // Removes all non-alphanumeric characters\n // return out.replace(/ /g, '+'); // Replaces all spaces with a plus sign\n }", "title": "" }, { "docid": "6b03ac75e9ff75cf1b11624c501c39ac", "score": "0.63763887", "text": "function escapeRegExpCharacters(value){return value.replace(/[\\-\\\\\\{\\}\\*\\+\\?\\|\\^\\$\\.\\[\\]\\(\\)\\#]/g,'\\\\$&');}", "title": "" }, { "docid": "c83a7b8440d8bb862b1115b217ad9b23", "score": "0.6372577", "text": "function isSpecialCharValidation(validateFields,FieldName)\n{\n\tvar chkSchar = new Array(\"<\",\">\",\"%\",\"'\",\"=\",\"(\",\")\",\"^\");\n\tfor(var i=0; i<=chkSchar.length;i++)\n\t{\n\t\tif($('#'+validateFields).val().lastIndexOf(chkSchar[i])>=0)\n\t\t{\n\t\t\tErrorAlert($('#'+validateFields), ispecialcharFirst+' ('+chkSchar+\") \"+ispecialcharLast+FieldName);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}\n\t\n\t\n}", "title": "" }, { "docid": "c4f92645bfc5bcfe04e5c580b67bcd07", "score": "0.63651955", "text": "function isnotSpecial(str){\n\tstringSpecialCheck=\"!#$%^&*()+|<>?/=-~,;:][{}\"+\"\\\\\"+\"\\'\";\n\tf4=1;\n\tfor(j=0;j<str.length;j++){\n\t\tif(stringSpecialCheck.indexOf(str.charAt(j))!=-1){\n\t\t\tf4=0;\n\t\t}\n\t}\n\tif(f4==0){\n\t\treturn true;\n\t}\n\telse{\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "a4aa1bcccf536d343ecbc04c323b1c73", "score": "0.63430524", "text": "function mysql_escape_chars(keyword) {\r\n\tkeyword = keyword.replace(/[\\$]/g, '\\\\$')\r\n\t.replace(/[\\^]/g, '\\\\^')\r\n\t.replace(/[\\\\]/g, '\\\\\\\\')\r\n\t.replace(/[\\*]/g, '\\\\*')\r\n\t.replace(/[\\.]/g, '\\\\.')\r\n\t.replace(/[\\+]/g, '\\\\+')\r\n\t.replace(/[\\-]/g, '\\\\-')\r\n\t.replace(/[\\%]/g, '\\\\%')\r\n\t.replace(/[\\(]/g, '\\\\(')\r\n\t.replace(/[\\{]/g, '\\\\{')\r\n\t.replace(/[\\[]/g, '\\\\[')\r\n\t.replace(/[\\|]/g, '\\\\|')\r\n\t.replace(/[\\?]/g, '\\\\?')\r\n\t.replace(/[\\<]/g, '\\\\<')\r\n\t.replace(/[\\>]/g, '\\\\>')\r\n\t;\r\n\treturn keyword;\r\n}", "title": "" }, { "docid": "66f0f15bbf9c6d0c9d6ecf05b89bec6c", "score": "0.6319987", "text": "function isAlphaNumericWithSpecialChar(strValue, strExpChrs)\n{\n var chrValue = '';\n for (var index = 0; index < strValue.length; ++index)\n {\n chrValue = strValue.charAt(index);\n if ((chrValue < 'a' || chrValue > 'z') &&\n (chrValue < 'A' || chrValue > 'Z') &&\n (chrValue < '0' || chrValue > '9'))\n {\n\t\t\tif ((strExpChrs.length > 0) && (strValue.charCodeAt(index) != \"13\") && (strValue.charCodeAt(index) != \"160\") && (strExpChrs.indexOf(chrValue) == -1) )\n {\n\n return false;\n\t\t\t}\n if(strExpChrs.length == 0)\n {\n return false;\n\t\t\t}\n }\n }\n return true;\n}", "title": "" }, { "docid": "b5e5ae4e17e4697b370de2b5ab966ac2", "score": "0.6315519", "text": "function isnotSpecial(str){\n\tstringSpecialCheck=\"!#$%^&*()+|<>?/=~,;:][{}\"+\"\\\\\";\n\tf4=1;\n\tfor(j=0;j<str.length;j++){\n\t\tif(stringSpecialCheck.indexOf(str.charAt(j))!=-1){\n\t\t\tf4=0;\n\t\t}\n\t}\n\tif(f4==0){\n\t\treturn true;\n\t}\n\telse{\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "b5e5ae4e17e4697b370de2b5ab966ac2", "score": "0.6315519", "text": "function isnotSpecial(str){\n\tstringSpecialCheck=\"!#$%^&*()+|<>?/=~,;:][{}\"+\"\\\\\";\n\tf4=1;\n\tfor(j=0;j<str.length;j++){\n\t\tif(stringSpecialCheck.indexOf(str.charAt(j))!=-1){\n\t\t\tf4=0;\n\t\t}\n\t}\n\tif(f4==0){\n\t\treturn true;\n\t}\n\telse{\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "b11d9bc21e475d17908b31ae08ff3d9b", "score": "0.63087547", "text": "function specialCharsPass(input) {\r\n let isRequired = false;\r\n const specRegex = new RegExp (\"^(?=.*[-_!@#\\$%\\^&\\*])\");\r\n if(specRegex.test(input.value)) {\r\n showSuccess(input);\r\n isRequired = true;\r\n } else {\r\n showFailure(input, \"Password must have at least 1 special character (-_!@#$%^&*)\");\r\n }\r\n return isRequired;\r\n}", "title": "" }, { "docid": "ee9935a395718c02803b40a2415c49cb", "score": "0.63084424", "text": "function specialCharactersWeakness(password) {\n //regex for special Character is \"/[^0-9a-zA-z\\s]/g\" and match function is used to match it in the password or any string.\n // this regex is checking tht no numbers no uppercase no lowercase character is allowed and '^' is used for no in regex\n\n return charaterTypeWeakness(\n password,\n /[^0-9a-zA-z\\s]/g,\n \"special characters\"\n );\n}", "title": "" }, { "docid": "6fb14221fff92b1af5ac9dd0030ce9fe", "score": "0.62905467", "text": "function hasSpecial(text) {\n var regex = /[^a-zA-Z0-9]/;\n return exists(text) && regex.test(text);\n}", "title": "" }, { "docid": "9db9db60d3d699a258ecb6f6cb5f96f1", "score": "0.62823737", "text": "function noSpecialChars(input) {\n var ipt = /[^a-z ^0-9 @._]/g;\n input.value = input.value.replace(ipt, \"\");\n}", "title": "" }, { "docid": "b8f46766e627c6354b43de89dc248c63", "score": "0.62703323", "text": "function schar(){\n var special = confirm(\"Please select whether you would like special characters in your password.\");\n return special;\n}", "title": "" }, { "docid": "0f80de79b44b8085e2e3e8c85cf2cf5d", "score": "0.6255048", "text": "function invalidCharacterCheck(string) {\n\n var invalidCharacters='\\'<>?';\n\n\tfor(i=0;i<string.length;i++){\n for(j=0;j<invalidCharacters.length;j++){\n\n if(string.charAt(i) == invalidCharacters.charAt(j)){\n alert('Characters \\' < > ? are not allowed ');\n return false;\n }\n\n }\n\t}\n\n return true;\n\n}", "title": "" }, { "docid": "b9d4c4383fb4fe1901abd434581a863e", "score": "0.62546784", "text": "function encodingByChar(character){\n\t\tfor(var i=0;i<code39.length;i++){\n\t\t\tif(code39[i][1]==character){\n\t\t\t\treturn code39[i][2];\n\t\t\t}\n\t\t}\n\t\treturn \"\";\n\t}", "title": "" }, { "docid": "3af1f92b5b0c56ac5e3e092e6e32e88d", "score": "0.62536776", "text": "function specialChar() {\r\n let x = String.fromCharCode(Math.floor(Math.random() * 9 + 35))\r\n return x\r\n}", "title": "" }, { "docid": "49deb12dfb39a8ab46928298c8a5a3c3", "score": "0.62515616", "text": "function filterSpecialCharacter(Input) {\r\n var Output = Input.replace(/[^\\w\\s\\n\\r]/gi, '');\r\n return Output;\r\n}", "title": "" }, { "docid": "907a419715d415b210033310c8a75a85", "score": "0.62496346", "text": "function badChars(theStr){\n return theStr.search(/[ ~!@#$%^&*()_+|`\\-=\\\\{}[\\]:\";'<>,.\\/?]/) != -1;\n}", "title": "" }, { "docid": "b9a06ee76f65eba9ed1071f144f4bc7d", "score": "0.6232513", "text": "function getSpecial() {\n var special = '!@#$%^&*(){}[]+<>/,.?';\n return special[Math.floor(Math.random() * special.length)];\n}", "title": "" }, { "docid": "21c23dcc70ec0e6b9faa430a472bfb91", "score": "0.62322515", "text": "function alphanumeric(param) {\n var str, words, txt = \"\";\n //Decode the escape characters to check for 'Enter' key i.e. %0D%0A\n str = escape(param)\n if (str.indexOf(\"%0D%0A\")) {\n //Split into an array of words with \"%0D%0A\" as the delimiter\n words = str.split(\"%0D%0A\")\n for (var i = 0; i < words.length; i++) {\n txt = txt.concat(words[i]);\n }\n //Encode other escape characters back\n str = unescape(txt)\n }\n else\n //Encode the escape characters back if enter was not pressed\n str = unescape(param)\n\n for (var i = 0; i < str.length; i++) {\n var chr = str.charAt(i);\n var code = chr.charCodeAt(0);\n //if((code>47 && code<58) || (code>64 && code<91) || (code>96 && code<123) ||(code==32)||(code==46))\n if (code == 39)\n return false;\n else\n continue;\n }\n return true;\n /*var n = param;\n for(var j=0; j<n.length; j++)\n {\n var str = n.charAt(j);\n var chr = str.charCodeAt(0);\n\t\t\t\t\n if((chr>47 && chr<58) || (chr>64 && chr<91) || (chr>96 && chr<123) ||(chr==32)||(chr==46))\n continue;\n else\n return false;\n }\n return true;*/\n}", "title": "" }, { "docid": "ee97a58d82633f1962bd3ca23d0c90e8", "score": "0.62266105", "text": "function sinCaracteresEspeciales(objLimpiar) {\n var txtTexto = objLimpiar.value;\n var txtResultado = \"\";\n var txtCaracter = \"\";\n for (i = 0; i < txtTexto.length; i++) {\n txtCaracter = txtTexto.charAt(i);\n\n if (\n txtCaracter.toString().charCodeAt(0) != 225 && // a\n txtCaracter.toString().charCodeAt(0) != 233 && // e\n txtCaracter.toString().charCodeAt(0) != 237 && // i\n txtCaracter.toString().charCodeAt(0) != 243 && // o\n txtCaracter.toString().charCodeAt(0) != 250 && // u\n txtCaracter.toString().charCodeAt(0) != 252 && // u + dieresis\n txtCaracter.toString().charCodeAt(0) != 241 && // � (enie)\n txtCaracter.toString().charCodeAt(0) != 193 && // A\n txtCaracter.toString().charCodeAt(0) != 201 && // E\n txtCaracter.toString().charCodeAt(0) != 205 && // I\n txtCaracter.toString().charCodeAt(0) != 211 && // O\n txtCaracter.toString().charCodeAt(0) != 218 && // U\n txtCaracter.toString().charCodeAt(0) != 220 && // U + dieresis\n txtCaracter.toString().charCodeAt(0) != 209 // � (enie mayuscula)\n ) {\n txtResultado += txtCaracter.replace(/[^a-zA-Z0-9\\-\\_\\.\\@\\ \\/]/, \"\");\n } else {\n txtResultado += txtCaracter;\n }\n\n }\n objLimpiar.value = txtResultado;\n}", "title": "" }, { "docid": "77781cfba8675e9d06b2c22db821f679", "score": "0.6215083", "text": "function safe(char){\r\n if (char === \"\\\\''\"){\r\n return \"'\"\r\n }\r\n if (char === '\"'){\r\n return '\\\\\"'\r\n }\r\n if (char === \"\\n\"){\r\n return \"\\\\n\";\r\n }\r\n if (char === \"\\t\"){\r\n return \"\\\\t\";\r\n }\r\n if (char === \"\\r\"){\r\n return \"\\\\r\";\r\n }\r\n if (char === \"\\b\"){\r\n return \"\\\\b\";\r\n }\r\n if (char === \"\\f\"){\r\n return \"\\\\f\";\r\n }\r\n return char;\r\n }", "title": "" }, { "docid": "9e7b9d70f88e4d89d38fbb74851a99ca", "score": "0.6214795", "text": "function checkSpecialCharWithSpace(string)\r\n{\r\n\t\tvar vPwdFlag = 0; \r\n\t\tfor (var i = 0; i < string.length; i++) \r\n\t\t{\r\n\t\t\tvar specialChars = \"!@#$%^&*()+=-[]\\\\\\';,./{}|\\\":<>?~_\";\r\n\t\t\tif (specialChars.indexOf(string.charAt(i)) != -1) \r\n\t\t\t{\r\n\t\t\t\tvPwdFlag = 1;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\t\r\n\r\n\t\tif(vPwdFlag == 0)\r\n\t\t\treturn false;\r\n\t\telse if(vPwdFlag == 1)\r\n\t\t\treturn true;\r\n}", "title": "" }, { "docid": "6c69a7db3ec3adbd7b90364cab963bdc", "score": "0.62124985", "text": "function customAlphaNum(event,regx,chars,showCode){\n\tvar eCharCode = event.which;\n\tvar allChars = [];\n\tfor(var i in chars){\n\t\tallChars[i] = chars[i].charCodeAt(0);\n\t}\n\tif(showCode)console.log(eCharCode);\n\treturn (String.fromCharCode(eCharCode).match('^['+regx+']*$') || allChars.indexOf(eCharCode) >= 0 || eCharCode == 8 || eCharCode == 0 || eCharCode == 13 )?true:false;\n}", "title": "" }, { "docid": "c50da3adbeb94fe4d4c0210ecc202d56", "score": "0.6184855", "text": "function RegexEscape(str) {\n\treturn String(str).replace(/\\W/g,\"\\\\$&\");\n}", "title": "" }, { "docid": "4075fa401b5a616de7e5af8006adaf48", "score": "0.61794525", "text": "isLetter(character) {\n return 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'.indexOf(character) >= 0;\n }", "title": "" }, { "docid": "fc63a1ea42fb33bb7cfdc2b78c108a13", "score": "0.6175333", "text": "function replaceSpecialChars(string) {\n return string.replaceAll(\"%20\", \" \").replaceAll(\"%C3%B6\", \"ö\").replaceAll(\"%C3%BC\", \"ü\").replaceAll(\"%C3%A4\", \"ä\")\n}", "title": "" }, { "docid": "1604e1da90e9c40fd80e9363e3523ddf", "score": "0.6166616", "text": "function ename(t){ return encodeURIComponent(t).replace(/\\*/g, '%2A') }", "title": "" }, { "docid": "3f20f7cc0c9c7f95051cbed948c8fb76", "score": "0.6165457", "text": "isValid(str){\n return !/[~`!@#$%\\^&*+=\\[\\]\\\\';,/{}|\\\\\":<>\\?]/g.test(str);\n }", "title": "" }, { "docid": "098127e003be511397aff14ce0326ede", "score": "0.61601275", "text": "function hasSpecialChars(objEntry, searchChars)\r\n{\r\n\tif (isEmpty(objEntry))\r\n\t{\r\n\t\treturn false;\r\n\t}\r\n\r\n\ttheInput = trimValue(objEntry);\r\n\ttheLength = theInput.length;\r\n\r\n\t// theNoisyString Is a special Characters String\r\n\tvar theNoisyString;\r\n\r\n\tif (searchChars == \"\")\r\n\t\ttheNoisyString = \"\";\t//everything allowed\r\n\telse\r\n\t\ttheNoisyString = searchChars;\r\n\r\n\r\n\tfor (var i = 0; i < theLength+2 ; i++)\r\n\t{\r\n\t\t// Check that current character isn't noisy.\r\n\t\ttheChar = theInput.charAt(i);\r\n\t\t//(\") was not checked due to String constraint\r\n\t\t// check it first\r\n\r\n\t\tif(theChar =='\"')\r\n\t\t{\r\n\t\t\treturn(true);\r\n\t\t}\r\n\r\n\t\tif ((theNoisyString.indexOf(theChar) != -1) )\r\n\t\t{\r\n\t\t\treturn (true);\r\n\t\t}\r\n\t}//for loop ends\r\n\r\n\treturn (false);\r\n }", "title": "" }, { "docid": "f6eced471321a36f9e9cc309c9fc616b", "score": "0.61532634", "text": "function checkSpecialChar(string)\r\n{\r\n\t\tvar vPwdFlag = 0; \r\n\t\tfor (var i = 0; i < string.length; i++) \r\n\t\t{\r\n\t\t\tvar specialChars = \" !@#$%^&*()+=-[]\\\\\\';,./{}|\\\":<>?~_\";\r\n\t\t\tif (specialChars.indexOf(string.charAt(i)) != -1) \r\n\t\t\t{\r\n\t\t\t\tvPwdFlag = 1;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\t\r\n\r\n\t\tif(vPwdFlag == 0)\r\n\t\t\treturn false;\r\n\t\telse if(vPwdFlag == 1)\r\n\t\t\treturn true;\r\n}", "title": "" }, { "docid": "d2abde59899996cb66411bbbc060f603", "score": "0.615302", "text": "function alpha(character) {\n var code = charCode(character)\n return code >= 65 && code <= 90\n}", "title": "" }, { "docid": "800c2119fe5cf3a1c1bddd1521ea0a2e", "score": "0.6143386", "text": "function username_checker2(input) {\n var schc = 0;\n\n for (var i = 1; i < input.length-1; i++) {\n //Check if the username contains special characters\n if (special_characters(input.charAt(i))) {\n schc++;\n }\n }\n //If a special character was found show an error message\n if (schc > 0) {\n message=\"Username can't contain (&, =, _, ', -, +, ,, <, >)\";\n error(index,message,id);\n return false;\n } else {\n return true;\n }\n }", "title": "" }, { "docid": "5dc5b21f6504b5dd6a757db12db21dff", "score": "0.6139757", "text": "function removeSpecialChars(node) {\r\n node.value=filterSpecial(node.value);\r\n\r\n function filterSpecial(str) {\r\n re = /\\ |$|,|@|#|~|`|\\%|\\*|\\^|\\&|\\(|\\)|\\+|\\=|\\[|\\-|\\_|\\]|\\[|\\}|\\{|\\;|\\:|\\'|\\\"|\\<|\\>|\\?|\\||\\\\|\\!|\\$|\\./g;\r\n return str.replace(re, \"\");\r\n }\r\n}", "title": "" }, { "docid": "1f01af77225a25fde8f226502f206032", "score": "0.6139545", "text": "function escape (input) {\n var escape = ''\n \n var i = 0\n \n //for every word in the string iterate and try to escape the words\n for (i = 0; i < input.length; i++) {\n escape = escape + javascriptEscapeCode(input.charAt(i), false)\n }\n \n return escape\n }", "title": "" }, { "docid": "378a509d223e6f690f9559c2b07250cf", "score": "0.6136128", "text": "function exports(str)\n {\n return str.replace(/\\W/g, '\\\\$&');\n }", "title": "" }, { "docid": "cc20c67f8f3e1a40061bad9b204ee772", "score": "0.612445", "text": "function esc(text) {\n return text.replace(specialsRegExp, '\\\\$1');\n}", "title": "" }, { "docid": "bbe545545ba22b7586a2fb6dbf6ba46e", "score": "0.61054105", "text": "function removeSpecialChars(str) {\n str = str.replace(/[^a-zA-Z 0-9]+/g, \"\");\n return str;\n }", "title": "" }, { "docid": "15e5ca5a7c370105c876c037d964bd42", "score": "0.61049837", "text": "function translateSpecials(str) {\n str = str.replace(('&ldquo;', 'gi'), '\"')\n str = str.replace(('&rdquo;', 'gi'), '\"')\n str = str.replace(('&quot;', 'gi'), '\"')\n str = str.replace('&ldquo;', '\"')\n str = str.replace('&rdquo;', '\"')\n str = str.replace('&aring;', 'å')\n str = str.replace('&hellip;', '...')\n str = str.replace('&auml;', 'ä')\n str = str.replace('&amp;', '&')\n str = str.replace('&rsquo;', '`')\n str = str.replace('&quot;', '\"')\n str = str.replace('&quot;', '\"')\n str = str.replace('&quot;', '\"')\n str = str.replace('&quot;', '\"')\n str = str.replace('&quot;', '\"')\n str = str.replace('&quot;', '\"')\n str = str.replace(('&ocirc;', 'gi'), 'ô')\n str = str.replace('&ocirc;', 'ô')\n str = str.replace(('&atilde;', 'gi'), 'ã')\n str = str.replace('&atilde;', 'ã')\n str = str.replace(('&oacute;', 'gi'), 'ó')\n str = str.replace('&oacute;', 'ó')\n str = str.replace('&Eacute;', 'É')\n str = str.replace(('&lt;', 'gi'), '<')\n str = str.replace(('&gt;', 'gi'), '>')\n str = str.replace(('&shy;', 'gi'), '-')\n str = str.replace('&shy;', '-')\n str = str.replace('&shy;', '-')\n str = str.replace('&shy;', '-')\n str = str.replace('&shy;', '-')\n str = str.replace('&shy;', '-')\n str = str.replace('&shy;', '-')\n str = str.replace('&shy;', '-')\n str = str.replace('&shy;', '-')\n str = str.replace(('&deg;', 'gi'), '°')\n str = str.replace('&deg;', '°')\n str = str.replace(('&iacute;', 'gi'), 'í')\n str = str.replace('&oacute;', 'ó')\n str = str.replace('&uuml;', 'ü')\n str = str.replace('&ouml;', 'ö')\n str = str.replace('&Nu;', 'ν')\n str = str.replace('&pi;', 'π')\n str = str.replace('&aacute', 'á')\n str = str.replace('&Sigma;', 'Σ')\n str = str.replace(('&#039;', 'gi'), '`')\n str = str.replace('&#039;', '`')\n str = str.replace('&#039;', '`')\n str = str.replace('&#039;', '`')\n str = str.replace('&#039;', '`')\n str = str.replace('&#039;', '`')\n str = str.replace('&#039;', '`')\n return str\n}", "title": "" }, { "docid": "f9aefb8299257640745cc8d6167e8d4b", "score": "0.6103707", "text": "function alpha(param) {\n var n = param;\n for (var j = 0; j < n.length; j++) {\n var str = n.charAt(j);\n var chr = str.charCodeAt(0);\n if ((chr > 64 && chr < 91) || (chr > 96 && chr < 123) || (chr == 32) || (chr == 46))\n //if((chr==39)\n continue;\n else\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "2f38a002de5ea307f50e01724249ebd9", "score": "0.6100195", "text": "function rescape(str) {\n return str.replace(/[^A-Za-z0-9 \\u0080-\\uffff]/ig, '\\\\$&');\n}", "title": "" }, { "docid": "7b11ebc1e34da247e5927da764fb5919", "score": "0.6079497", "text": "function sinCaracteresEspeciales(objLimpiar) {\n var txtTexto = objLimpiar.value;\n var txtResultado = \"\";\n var txtCaracter = \"\";\n for (i = 0; i < txtTexto.length; i++) {\n txtCaracter = txtTexto.charAt(i);\n if (\n txtCaracter.toString().charCodeAt(0) != 225 && // a\n txtCaracter.toString().charCodeAt(0) != 233 && // e\n txtCaracter.toString().charCodeAt(0) != 237 && // i\n txtCaracter.toString().charCodeAt(0) != 243 && // o\n txtCaracter.toString().charCodeAt(0) != 250 && // u\n txtCaracter.toString().charCodeAt(0) != 252 && // u + dieresis\n txtCaracter.toString().charCodeAt(0) != 241 && // (enie)\n txtCaracter.toString().charCodeAt(0) != 193 && // A\n txtCaracter.toString().charCodeAt(0) != 201 && // E\n txtCaracter.toString().charCodeAt(0) != 205 && // I\n txtCaracter.toString().charCodeAt(0) != 211 && // O\n txtCaracter.toString().charCodeAt(0) != 218 && // U\n txtCaracter.toString().charCodeAt(0) != 220 && // U + dieresis\n txtCaracter.toString().charCodeAt(0) != 209 // (enie mayuscula)\n ) {\n txtResultado += txtCaracter.replace(/[^a-zA-Z0-9\\-\\_\\.\\@\\ \\/]/, \"\");\n } else {\n txtResultado += txtCaracter;\n }\n }\n objLimpiar.value = txtResultado;\n}", "title": "" }, { "docid": "c5195703c8a8df16ec0d20e0642ba380", "score": "0.60695416", "text": "function escape2(av_cadena){\n var wv_cadena = '';\n\n wv_cadena = av_cadena;\n wv_cadena = wv_cadena.replace(/\\+/gi,'%2B');\n wv_cadena = wv_cadena.replace(\"\\u2013\",\"-\");\n wv_cadena = escape(wv_cadena);\n return wv_cadena;\n \n}", "title": "" }, { "docid": "fb9a09114f255431a64b3eb3712d4576", "score": "0.6065004", "text": "function regexEscape(txt, omit) {\n var specials = ['/', '.', '*', '+', '?', '|',\n '(', ')', '[', ']', '{', '}', '\\\\'];\n \n if (omit) {\n for (var i = 0; i < specials.length; i++) {\n if (specials[i] === omit) { specials.splice(i,1); }\n }\n }\n \n var escapePatt = new RegExp('(\\\\' + specials.join('|\\\\') + ')', 'g');\n return txt.replace(escapePatt, '\\\\$1');\n }", "title": "" }, { "docid": "d5f803ac96ee1f846b632c362c294a19", "score": "0.6063396", "text": "function testSpecialChar (testChar) {\n\n\n\t\t\tvar scFlag = false;\n\n\n\t\t\tfor (sc = 0; sc < specialChars.length; sc++) {\n\n\t\t\t//\t$log.debug(\"scArrayChar \" + specialChars[sc]);\n\n\t\t\t\tif (testChar == specialChars[sc]) {\n\n\t\t\t\t\tif (debugThis) {\n\t\t\t\t\t\t$log.debug(\"testSpecialChar function - testChar is \" + testChar + \" special char array item match is \" + specialChars[sc]);\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t\tscFlag = true;\n\t\t\t\t} \n\n\n\t\t\t}\n\n\t\t\treturn scFlag;\n\n\t\t}", "title": "" }, { "docid": "d06ec7177dd7ec463ba4481664835e75", "score": "0.6048373", "text": "function hasSearchSpecialChars(objEntry)\r\n{\r\n\treturn hasSpecialChars(objEntry, NOISE_STRING);\r\n}", "title": "" }, { "docid": "d8a8b9b4f113c247215bc937da36cc5f", "score": "0.6012002", "text": "function isLetter(character) {\r\n if (character.search(/[a-zA-Z'-]/) === -1) return false;\r\n return true;\r\n }", "title": "" }, { "docid": "44b94d618ccf5b0813c5cf034d6d57b7", "score": "0.6011457", "text": "function gpb_escape(text)\n{\n\tvar ahdtop=get_ahdtop();\n\ttext=nx_escape(text);\n\n\t// nx_escape() does not get everything!\n\ttext=text.replace(/\\*/g, \"%2a\");\n\ttext=text.replace(/\\+/g, \"%2b\");\n\ttext=text.replace(/\\-/g, \"%2d\");\n\ttext=text.replace(/\\./g, \"%2e\");\n\ttext=text.replace(/\\//g, \"%2f\");\n\ttext=text.replace(/\\@/g, \"%40\");\n\ttext=text.replace(/\\_/g, \"%5f\");\n\treturn text;\n}", "title": "" }, { "docid": "3895e99518974a23cd845868f74a5ac9", "score": "0.5998712", "text": "function restrictSuggestedCharacters(obj,restictCharString)\n{\n\tvar result\t \t= true;\t\n\tvar string\t \t= obj.value.length;\t\n\tvar val\t \t \t= obj.value;\t\t\n\tvar iChars\t \t= restictCharString;\n\tfor (var i = 0; i < string; i++) \n\t{\n\t\t\tif (iChars.indexOf(val.charAt(i)) != -1)\n\t\t\t{\n\t\t\t\tbootbox.alert('Special Characters '+restictCharString+' Not Allowed.');\n\t\t\t\tobj.focus();\n\t\t\t\tobj.select();\n\t\t\t\tresult = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t}\n\treturn result;\t\n}", "title": "" }, { "docid": "a61d924408b306200f071ed14630fac7", "score": "0.5998536", "text": "function encode(character)\n\t{\n\t\treturn character in entity ? entity[character] : '&#' + character.charCodeAt() + ';';\n\t}", "title": "" }, { "docid": "1010e219a472cdab25e8a65cedd5aef8", "score": "0.5997994", "text": "urlEncode() {\n return this.encoded.replace(/\\+/g, '-').replace(/\\//g, '_');\n }", "title": "" }, { "docid": "f90508733c2bcbb3989f7e1428502fe1", "score": "0.5978806", "text": "function rescape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n }", "title": "" }, { "docid": "31ccfc2ecbca55a1f700bc8709cb9b84", "score": "0.5942646", "text": "function hasSpecialCharactersEmail(field){ \r\n\tvar SpecialCharacters=\"`~!$^&*()=+><{}[]+|=?':;\\\\\\\" \";\r\n\tif (field.value.length >= 0)\t{\r\n\t\tfor(i=0; i<SpecialCharacters.length; i++)\t{\r\n\t\t\tif(field.value.indexOf(SpecialCharacters.substr(i, 1))>= 0)\t{ \r\n\t\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}\t\r\n\treturn false;\r\n}", "title": "" }, { "docid": "695f3291b697dc3b4b3930bd8328e97f", "score": "0.59403104", "text": "function decodeChar(s, start, end, special, result) {\n Debug.assert(start >= 0);\n Debug.assert(start < end);\n Debug.assert(end <= s.length);\n if (s.charAt(start) != '\\\\') {\n result.push(checkChar(s, start++));\n } else if (start + 1 === end) {\n ++start;\n result.push(\"\\\\\"); // trailing backslash\n } else {\n var c = s.charAt(++start);\n switch (c) {\n case '\\\\':\n case '\\'':\n case '\"':\n case '?':\n {\n ++start;\n result.push(c);\n break;\n }\n case 'a':\n {\n ++start;\n result.append(\"\\x07\");\n break;\n }\n case 'b':\n {\n ++start;\n result.push(\"\\b\");\n break;\n }\n case 'f':\n {\n ++start;\n result.push(\"\\f\");\n break;\n }\n case 'n':\n {\n ++start;\n result.push(\"\\n\");\n break;\n }\n case 'r':\n {\n ++start;\n result.push(\"\\r\");\n break;\n }\n case 't':\n {\n ++start;\n result.push(\"\\t\");\n break;\n }\n case 'v':\n {\n ++start;\n result.push(\"\\v\");\n break;\n }\n case 'u':\n case 'U':\n {\n var codePoint = 0;\n var inBMP = c === 'u';\n var size = inBMP ? 4 : 8;\n ++start;\n while (size > 0 && start < end) {\n var charVal = s.charCodeAt(start++);\n if (charVal >= 0x30 && charVal <= 0x39) {\n charVal -= 0x30;\n } else if (charVal >= 0x61 && charVal <= 0x66) {\n charVal += 10 - 0x61;\n } else if (charVal >= 0x41 && charVal <= 0x46) {\n charVal += 10 - 0x41;\n } else {\n break; // while\n }\n\n codePoint = codePoint * 16 + charVal;\n --size;\n }\n if (size > 0) {\n throw new RangeError(\"Invalid universal character name: too few hex digits\");\n }\n if (codePoint >= 0xD800 && codePoint <= 0xDFFF) {\n throw new RangeError(\"A universal character name cannot designate a surrogate\");\n }\n if (inBMP || codePoint <= 0xFFFF) {\n result.push(String.fromCharCode(codePoint));\n } else {\n result.push(String.fromCodePoint(codePoint));\n }\n break;\n }\n case '0':\n case '1':\n case '2':\n case '3':\n case '4':\n case '5':\n case '6':\n case '7':\n case 'x':\n {\n // UTF-8 byte sequence encoded with octal or hex escapes\n\n var arr = [];\n var more = true;\n while (more) {\n var val = 0;\n if (c === 'x') {\n var _size = 2;\n ++start;\n while (_size > 0 && start < end) {\n var _charVal = s.charCodeAt(start++);\n if (_charVal >= 0x30 && _charVal <= 0x39) {\n _charVal -= 0x30;\n } else if (_charVal >= 0x61 && _charVal <= 0x66) {\n _charVal += 10 - 0x61;\n } else if (_charVal >= 0x41 && _charVal <= 0x46) {\n _charVal += 10 - 0x41;\n } else {\n break; // while\n }\n\n val = val * 16 + _charVal;\n --_size;\n }\n if (_size === 2) {\n throw new RangeError(\"Invalid \\\\x escape sequence: no hex digit\");\n }\n } else {\n for (var j = 0; j < 3 && start < end; ++j) {\n var _charVal2 = s.charCodeAt(start++) - '0'.charCodeAt(0);\n if (_charVal2 < 0 || _charVal2 > 7) {\n --start; // move back\n Debug.assert(j !== 0); // must be at least one digit\n break; // for\n }\n\n val = val * 8 + _charVal2;\n }\n if (val > 255) {\n throw new RangeError(\"octal value \\\\\" + val.toString(8) + \" (\" + val + \") is out of range\");\n }\n }\n arr.push(String.fromCharCode(val));\n more = false;\n if (start + 1 < end && s.charAt(start) === '\\\\') {\n c = s.charAt(start + 1);\n var _charVal3 = s.charCodeAt(start + 1);\n if (c === 'x' || _charVal3 >= 0x30 && _charVal3 <= 0x39) {\n start++;\n more = true;\n }\n }\n }\n\n // Decode UTF-8 arr into string\n result.push(decodeURIComponent(escape(arr.join(\"\"))));\n break;\n }\n default:\n {\n if (special === null || special.length === 0 || special.indexOf(c) === -1) {\n result.push(\"\\\\\"); // not in special, so we keep the backslash\n }\n\n result.push(checkChar(s, start++));\n break;\n }\n }\n }\n return start;\n }", "title": "" }, { "docid": "3634cdd6fb642febeca5f97311028454", "score": "0.5937987", "text": "function hasSpecialChar(fieldTxtValue) {\n /* dot sign is allowed because is the decimal separator */\n return /[<>?%#,;]|&#/.test(fieldTxtValue) ? true : false;\n }", "title": "" }, { "docid": "f307f6cf74c51d9ee9c240eb0f1318d0", "score": "0.59319955", "text": "function MTB_IsLiteral(chMaskChar)\n{\n return /[^09#L\\?Aa&C]/.test(chMaskChar);\n}", "title": "" }, { "docid": "95b5239d820df27a3ffcb39f41981e9b", "score": "0.5927318", "text": "function _regExpEscape(str) {\n var specials = new RegExp(\"[.*+?|()\\\\[\\\\]{}\\\\\\\\]\", \"g\"); // .*+?|()[]{}\\\n return str.replace(specials, \"\\\\$&\");\n }", "title": "" }, { "docid": "4b4493c058e27748221ff85b630e02f0", "score": "0.5925651", "text": "function escapeString(CurString) {\r\n\t\tvar CurRegEx;\r\n\t\tfor ( var CurChar in EncodedChars ) {\r\n\t\t\tif (typeof EncodedChars[CurChar] != \"function\") {;\r\n\t\t\t\tif ( CurChar != \"\\\\\" ) {\r\n\t\t\t\t\tCurRegEx = new RegExp(CurChar, \"g\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tCurRegEx = /\\\\/g;\r\n\t\t\t\t};\r\n\t\t\t\tCurString = CurString.replace(CurRegEx, EncodedChars[CurChar]);\r\n\t\t\t};\r\n\t\t};\r\n\t\treturn CurString;\t\r\n\t}", "title": "" }, { "docid": "58f8e3f2ee04a22943d71263e634ce89", "score": "0.5920938", "text": "function char(char){\n return String(char);\n}", "title": "" }, { "docid": "31a4205f1525ca7b4c3907452e47e07c", "score": "0.5897777", "text": "function checkChars() {\n if (lower === true) {\n return result;\n } else {\n }\n if (upper === true) {\n return result;\n } else {\n } \n if (numbers === true) {\n return result;\n } else {\n }\n if (special === true) {\n return result;\n } else {\n } \n}", "title": "" }, { "docid": "aed8274b756c77cff29006e12c847c00", "score": "0.5893521", "text": "function t(e){return encodeURIComponent(e).replace(a,l)}", "title": "" }, { "docid": "6fc6c0f3a918d5ce84784d0fe23ebccf", "score": "0.58931565", "text": "function computeSpecial() {\n var promptResponse = prompt(\n \"Do you want special characters in your password?\");\n\n if (promptResponse === null) {\n return undefined;\n }\n\n promptResponse = promptResponse.toLowerCase();\n return promptResponse === \"yes\";\n}", "title": "" }, { "docid": "1165b759e93152f51736725a4124c83d", "score": "0.5882563", "text": "function removeSpecialCharacters(textString) {\n var invalidCharString = \"^!@#$%_+=~?&{}/:|*\\\"?<>\\\\\";\n var validText = \"\";\n for (var i = 0; i < textString.length; i++) {\n if (invalidCharString.indexOf(textString[i]) == -1) {\n if (Browser.Version() < 9) {\n // if client is using IE6 or lower, run this code\n validText += textString.charAt(i);\n }\n else {\n validText += textString[i];\n }\n }\n }\n return validText;\n}", "title": "" }, { "docid": "a28a0fafb650bb46d93cecb952454e80", "score": "0.58823174", "text": "function _string(s) { return '\"' + s.replace(_SPECIAL_CHARS, _char) + '\"'; }", "title": "" }, { "docid": "9e3c7b53ad819b1987b2021745dc2de6", "score": "0.58669955", "text": "function alphanumeric(inputtxt)\n{\n var letterNumber = /^[0-9a-zA-Z\\-'_]+$/;\n if((inputtxt.match(letterNumber))) \n {\n return true;\n }\n else\n { \n return false; \n }\n}", "title": "" } ]
d9dab7f5b461aa4d6393dd1af751a086
Constructor for the Timer.
[ { "docid": "31b4c805063fa0993ebdbb7dcca722bc", "score": "0.61512667", "text": "function Timer(countDownLength, $clock, $play, $pause, $stop){\n\t//Expected to be in minutes.\n\tvar _countDownLength = countDownLength;\n\t//Cache DOM\n\tvar _$clock = $($clock);\n\tvar _$play = $($play);\n\tvar _$pause = $($pause);\n\tvar _$stop = $($stop);\n\n//Revealing Module Pattern\n//A self-calling anonymous function.\n//All methods and variables of innerTime are private except for those returned.\nvar innerTimer = (function(){\n\t\n\tconst MS = 1000;\n\tconst MINUTE_IN_MS = MS * 60;\n\tconst HOUR_IN_MS = MINUTE_IN_MS * 60;\n\n\tvar countDownLengthMS = countDownLength * MINUTE_IN_MS;\n\t\n\tvar intervalID = null;\n\tvar intervalCounter = 0;\n\n\t//bind events\n\t_$play.on(\"click\", start);\n\t_$pause.on(\"click\", pause);\n\t_$stop.on(\"click\", stop);\n\n\tfunction start(){\n\t\tif(intervalID == null){\n\t\t\tintervalID = setInterval(countDown,MS);\n\t\t\tintervalCounter++;\n\t\t}\n\t}\n\n\tfunction countDown(){\n\t\tcountDownLengthMS -= MS;\n\t\trender();\n\t}\n\n\tfunction pause(){\n\t\tclearInterval(intervalID);\n\t\tif(intervalCounter > 0)\n\t\t\tintervalCounter--;\n\t\tintervalID = null;\n\t}\n\n\tfunction stop(){\n\t\tpause();\n\t\tresetTime();\n\t\trender();\n\t}\n\n\tfunction resetTime(){\n\t\tcountDownLengthMS = _countDownLength * MINUTE_IN_MS;\n\t}\n\n\tfunction render(){\n\t\t_$clock.text(getTime());\n\t}\n\n\tfunction getTime(){\n\t\tvar second = '0' + extractSeconds();\n\t\tvar minute = '0' + extractMinutes();\n\t\tvar hour = '0' + extractHours();\n\t\tvar sizeOfString = 2;\n\t\t\n\n\t\treturn hour.substring(hour.length - sizeOfString, hour.length) + ':' \n\t\t\t + minute.substring(minute.length - sizeOfString, minute.length) + ':' \n\t\t\t + second.substring(second.length - sizeOfString, second.length);\n\t}\n\n\tfunction extractSeconds(){\n\t\treturn (countDownLengthMS % MINUTE_IN_MS) / MS;\n\t}\n\n\tfunction extractMinutes(){\n\t\treturn Math.floor((countDownLengthMS % HOUR_IN_MS) / MINUTE_IN_MS);\n\t}\n\n\tfunction extractHours(){\n\t\treturn Math.floor(countDownLengthMS / HOUR_IN_MS); \n\t}\n\n\tfunction setLength(newCountDownLength){\n\t\tcountDownLengthMS = newCountDownLength * MINUTE_IN_MS;\n\t\trender();\n\t}\n\n\tfunction getRemainingMinutes(){\n\t\treturn extractMinutes();\n\t}\n\n\tfunction getIntervalCounter(){\n\t\treturn intervalCounter;\n\t}\n\n\trender();\n\n\treturn {\n\t\tsetLength : setLength,\n\t\tgetRemainingMinutes : getRemainingMinutes,\n\t\tgetIntervalCounter : getIntervalCounter\n\t}; \n\t\n\n\n})();\n\t//Time in minutes.\n\tthis.setLength = function(newCountDownLength){\n\t\tif(newCountDownLength >= 1){\n\t\t\t_countDownLength = newCountDownLength;\n\t\t\treturn innerTimer.setLength(newCountDownLength);\n\t\t}\n\t\t_countDownLength = 0;\n\t\treturn innerTimer.setLength(_countDownLength);\n\t}\n\n\tthis.getLength = function(){\n\t\treturn _countDownLength;\n\t}\n\n\tthis.getRemainingMinutes= function(){\n\t\treturn innerTimer.getRemainingMinutes();\n\t}\n\n\tthis.getIntervalCounter = function(){\n\t\treturn innerTimer.getIntervalCounter();\n\t}\n\t\n}", "title": "" } ]
[ { "docid": "8cfca74bed616cad2fdc2d959730f72a", "score": "0.81365323", "text": "constructor() {\n super('Timer', ['OnTimer']);\n this.success();\n this.timerNames = [];\n this.timers = {};\n this.intervals = {};\n }", "title": "" }, { "docid": "bd609de6faba072b6ca5a307aef7527f", "score": "0.80471385", "text": "constructor() {\n // timer update rate in ms\n this.TIMER_UPDATE_INTERVAL = 10;\n // the interval that updates the timer\n this.interval = undefined;\n // current time on the timer\n this.time = undefined;\n // keeps track of whether timer is running; true is ON, false is OFF\n this.running = false;\n // keeps track of when the timer started\n this.start = undefined;\n }", "title": "" }, { "docid": "242c7fe6f329bfc5e1c0843ed3da3662", "score": "0.7820979", "text": "function Timer() {\n\tthis.startTime = 0; // the time that this timer was started\n\t\n\tthis.Reset(); // initially reset our timer\n}", "title": "" }, { "docid": "30251d6d1b7af62477ceb5ef061cccb4", "score": "0.78169996", "text": "function Timer()\n\t{\n\t\t// Auto instantiate the Timer\n\t\tif (!(this instanceof Timer))\n\t\t\treturn new Timer();\n\n\t\tthis._started = mInvalid;\n\t}", "title": "" }, { "docid": "6cefc0a73dd5cf86d90dc892c940de15", "score": "0.77686095", "text": "constructor() {\n this.timer = null;\n }", "title": "" }, { "docid": "48136177a0c758ce06007b45e8dd8d88", "score": "0.75599456", "text": "function Timer() {\r\n this.defaultTime = minutesDelay * 60;\r\n this.currentTime = this.defaultTime;\r\n this.cancelId = null;\r\n}", "title": "" }, { "docid": "35d950de37abf03c878d810ec58a5788", "score": "0.7426051", "text": "constructor() {\n super();\n this.timeInterval = null;\n this.state = { time: 0 };\n this.start = this.start.bind(this);\n }", "title": "" }, { "docid": "306e83b550dfd329ec3e0538f8049fa4", "score": "0.7391229", "text": "constructor(props) {\n super(props)\n this.updateTimer(props)\n }", "title": "" }, { "docid": "36101c1228824644b04bd6ee2b7675f8", "score": "0.73310745", "text": "function Timer(callback) {\n this.handle = null;\n this.callback = callback;\n this.ticks = 0;\n}", "title": "" }, { "docid": "c4c6423dce3ccddc746bf44b5e7aeb55", "score": "0.7295756", "text": "function Timer() {\n /*\n * PRIVATE variables and Functions\n */\n var counters = new TimeCounter();\n var totalCounters = new TimeCounter();\n var intervalId;\n var eventEmitter = hasDOM() ? document.createElement('span') : hasEventEmitter() ? new events.EventEmitter() : undefined;\n var running = false;\n var paused = false;\n var precision;\n var timerTypeFactor;\n var customCallback;\n var timerConfig = {};\n var currentParams;\n var targetValues;\n var startValues;\n var countdown;\n var startingDate;\n var targetDate;\n var eventData = {\n detail: {\n timer: this\n }\n };\n\n function updateCounters(precision, roundedValue) {\n totalCounters[precision] = roundedValue;\n\n if (precision === DAYS) {\n counters[precision] = roundedValue;\n } else if (roundedValue >= 0) {\n counters[precision] = mod(roundedValue, groupedUnits[precision]);\n } else {\n counters[precision] = groupedUnits[precision] - mod(roundedValue, groupedUnits[precision]);\n }\n }\n\n function updateDays(value) {\n return updateUnitByPrecision(value, DAYS);\n }\n\n function updateHours(value) {\n return updateUnitByPrecision(value, HOURS);\n }\n\n function updateMinutes(value) {\n return updateUnitByPrecision(value, MINUTES);\n }\n\n function updateSeconds(value) {\n return updateUnitByPrecision(value, SECONDS);\n }\n\n function updateSecondTenths(value) {\n return updateUnitByPrecision(value, SECOND_TENTHS);\n }\n\n function updateUnitByPrecision(value, precision) {\n var previousValue = totalCounters[precision];\n updateCounters(precision, calculateIntegerUnitQuotient(value, unitsInMilliseconds[precision]));\n return totalCounters[precision] !== previousValue;\n }\n\n function stopTimerAndResetCounters() {\n stopTimer();\n resetCounters();\n }\n\n function stopTimer() {\n clearInterval(intervalId);\n intervalId = undefined;\n running = false;\n paused = false;\n }\n\n function setParamsAndStartTimer(params) {\n if (!isPaused()) {\n setParams(params);\n } else {\n startingDate = calculateStartingDate();\n targetValues = setTarget(currentParams.target);\n }\n\n startTimer();\n }\n\n function startTimer() {\n var interval = unitsInMilliseconds[precision];\n\n if (isTargetAchieved(roundTimestamp(Date.now()))) {\n return;\n }\n\n intervalId = setInterval(updateTimerAndDispatchEvents, interval);\n running = true;\n paused = false;\n }\n\n function calculateStartingDate() {\n return roundTimestamp(Date.now()) - totalCounters.secondTenths * unitsInMilliseconds[SECOND_TENTHS] * timerTypeFactor;\n }\n\n function updateTimerAndDispatchEvents() {\n var currentTime = roundTimestamp(Date.now());\n var valuesUpdated = updateTimer();\n dispatchEvents(valuesUpdated);\n customCallback(eventData.detail.timer);\n\n if (isTargetAchieved(currentTime)) {\n stop();\n dispatchEvent('targetAchieved', eventData);\n }\n }\n\n function updateTimer() {\n var currentTime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : roundTimestamp(Date.now());\n var elapsedTime = timerTypeFactor > 0 ? currentTime - startingDate : startingDate - currentTime;\n var valuesUpdated = {};\n valuesUpdated[SECOND_TENTHS] = updateSecondTenths(elapsedTime);\n valuesUpdated[SECONDS] = updateSeconds(elapsedTime);\n valuesUpdated[MINUTES] = updateMinutes(elapsedTime);\n valuesUpdated[HOURS] = updateHours(elapsedTime);\n valuesUpdated[DAYS] = updateDays(elapsedTime);\n return valuesUpdated;\n }\n\n function roundTimestamp(timestamp) {\n return Math.floor(timestamp / unitsInMilliseconds[precision]) * unitsInMilliseconds[precision];\n }\n\n function dispatchEvents(valuesUpdated) {\n if (valuesUpdated[SECOND_TENTHS]) {\n dispatchEvent('secondTenthsUpdated', eventData);\n }\n\n if (valuesUpdated[SECONDS]) {\n dispatchEvent('secondsUpdated', eventData);\n }\n\n if (valuesUpdated[MINUTES]) {\n dispatchEvent('minutesUpdated', eventData);\n }\n\n if (valuesUpdated[HOURS]) {\n dispatchEvent('hoursUpdated', eventData);\n }\n\n if (valuesUpdated[DAYS]) {\n dispatchEvent('daysUpdated', eventData);\n }\n }\n\n function isTargetAchieved(currentDate) {\n return targetValues instanceof Array && currentDate >= targetDate;\n }\n\n function resetCounters() {\n for (var counter in counters) {\n if (counters.hasOwnProperty(counter) && typeof counters[counter] === 'number') {\n counters[counter] = 0;\n }\n }\n\n for (var _counter in totalCounters) {\n if (totalCounters.hasOwnProperty(_counter) && typeof totalCounters[_counter] === 'number') {\n totalCounters[_counter] = 0;\n }\n }\n }\n\n function setParams(params) {\n params = params || {};\n precision = checkPrecision(params.precision);\n customCallback = typeof params.callback === 'function' ? params.callback : function () {};\n countdown = params.countdown === true;\n timerTypeFactor = countdown === true ? -1 : 1;\n\n if (_typeof(params.startValues) === 'object') {\n setStartValues(params.startValues);\n } else {\n startValues = null;\n }\n\n startingDate = calculateStartingDate();\n updateTimer();\n\n if (_typeof(params.target) === 'object') {\n targetValues = setTarget(params.target);\n } else if (countdown) {\n params.target = {\n seconds: 0\n };\n targetValues = setTarget(params.target);\n } else {\n targetValues = null;\n }\n\n timerConfig = {\n precision: precision,\n callback: customCallback,\n countdown: _typeof(params) === 'object' && params.countdown === true,\n target: targetValues,\n startValues: startValues\n };\n currentParams = params;\n }\n\n function checkPrecision(precision) {\n precision = typeof precision === 'string' ? precision : SECONDS;\n\n if (!isValidInputValue(precision)) {\n throw new Error(\"Error in precision parameter: \".concat(precision, \" is not a valid value\"));\n }\n\n return precision;\n }\n\n function isValidInputValue(value) {\n return VALID_INPUT_VALUES.indexOf(value) >= 0;\n }\n\n function configInputValues(inputValues) {\n var secondTenths, seconds, minutes, hours, days, values;\n\n if (_typeof(inputValues) === 'object') {\n if (inputValues instanceof Array) {\n if (inputValues.length !== 5) {\n throw new Error('Array size not valid');\n }\n\n values = inputValues;\n } else {\n for (var value in inputValues) {\n if (VALID_INPUT_VALUES.indexOf(value) < 0) {\n throw new Error(\"Error in startValues or target parameter: \".concat(value, \" is not a valid input value\"));\n }\n }\n\n values = [inputValues.secondTenths || 0, inputValues.seconds || 0, inputValues.minutes || 0, inputValues.hours || 0, inputValues.days || 0];\n }\n }\n\n secondTenths = values[SECOND_TENTHS_POSITION];\n seconds = values[SECONDS_POSITION] + calculateIntegerUnitQuotient(secondTenths, SECOND_TENTHS_PER_SECOND);\n minutes = values[MINUTES_POSITION] + calculateIntegerUnitQuotient(seconds, SECONDS_PER_MINUTE);\n hours = values[HOURS_POSITION] + calculateIntegerUnitQuotient(minutes, MINUTES_PER_HOUR);\n days = values[DAYS_POSITION] + calculateIntegerUnitQuotient(hours, HOURS_PER_DAY);\n values[SECOND_TENTHS_POSITION] = secondTenths % SECOND_TENTHS_PER_SECOND;\n values[SECONDS_POSITION] = seconds % SECONDS_PER_MINUTE;\n values[MINUTES_POSITION] = minutes % MINUTES_PER_HOUR;\n values[HOURS_POSITION] = hours % HOURS_PER_DAY;\n values[DAYS_POSITION] = days;\n return values;\n }\n\n function calculateIntegerUnitQuotient(unit, divisor) {\n var quotient = unit / divisor;\n return quotient < 0 ? Math.ceil(quotient) : Math.floor(quotient);\n }\n\n function setTarget(inputTarget) {\n if (!inputTarget) {\n return;\n }\n\n targetValues = configInputValues(inputTarget);\n var targetCounter = calculateTotalCounterFromValues(targetValues);\n targetDate = startingDate + targetCounter.secondTenths * unitsInMilliseconds[SECOND_TENTHS] * timerTypeFactor;\n return targetValues;\n }\n\n function setStartValues(inputStartValues) {\n startValues = configInputValues(inputStartValues);\n counters.secondTenths = startValues[SECOND_TENTHS_POSITION];\n counters.seconds = startValues[SECONDS_POSITION];\n counters.minutes = startValues[MINUTES_POSITION];\n counters.hours = startValues[HOURS_POSITION];\n counters.days = startValues[DAYS_POSITION];\n totalCounters = calculateTotalCounterFromValues(startValues, totalCounters);\n }\n\n function calculateTotalCounterFromValues(values, outputCounter) {\n var total = outputCounter || {};\n total.days = values[DAYS_POSITION];\n total.hours = total.days * HOURS_PER_DAY + values[HOURS_POSITION];\n total.minutes = total.hours * MINUTES_PER_HOUR + values[MINUTES_POSITION];\n total.seconds = total.minutes * SECONDS_PER_MINUTE + values[SECONDS_POSITION];\n total.secondTenths = total.seconds * SECOND_TENTHS_PER_SECOND + values[[SECOND_TENTHS_POSITION]];\n return total;\n }\n /*\n * PUBLIC functions\n */\n\n /**\n * [stop stops the timer and resets the counters. Dispatch stopped event]\n */\n\n\n function stop() {\n stopTimerAndResetCounters();\n dispatchEvent('stopped', eventData);\n }\n /**\n * [stop stops and starts the timer. Dispatch stopped event]\n */\n\n\n function reset() {\n stopTimerAndResetCounters();\n setParamsAndStartTimer(currentParams);\n dispatchEvent('reset', eventData);\n }\n /**\n * [start starts the timer configured by the params object. Dispatch started event]\n * @param {object} params [Configuration parameters]\n */\n\n\n function start() {\n var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n if (isRunning()) {\n return;\n }\n\n setParamsAndStartTimer(params);\n dispatchEvent('started', eventData);\n }\n /**\n * [pause stops the timer without resetting the counters. The timer it can be restarted with start function.\n * Dispatch paused event]\n * @return {type} [description]\n */\n\n\n function pause() {\n stopTimer();\n paused = true;\n dispatchEvent('paused', eventData);\n }\n /**\n * [addEventListener Adds event listener to the timer]\n * @param {string} event [event to listen]\n * @param {function} listener [the event listener function]\n */\n\n\n function addEventListener(event, listener) {\n if (hasDOM()) {\n eventEmitter.addEventListener(event, listener);\n } else if (hasEventEmitter()) {\n eventEmitter.on(event, listener);\n }\n }\n /**\n * [removeEventListener Removes event listener to the timer]\n * @param {string} event [event to remove listener]\n * @param {function} listener [listener to remove]\n */\n\n\n function removeEventListener(event, listener) {\n if (hasDOM()) {\n eventEmitter.removeEventListener(event, listener);\n } else if (hasEventEmitter()) {\n eventEmitter.removeListener(event, listener);\n }\n }\n /**\n * [dispatchEvent dispatches an event]\n * @param {string} event [event to dispatch]\n */\n\n\n function dispatchEvent(event, data) {\n if (hasDOM()) {\n eventEmitter.dispatchEvent(new CustomEvent(event, data));\n } else if (hasEventEmitter()) {\n eventEmitter.emit(event, data);\n }\n }\n /**\n * [isRunning return true if the timer is running]\n * @return {Boolean}\n */\n\n\n function isRunning() {\n return running;\n }\n /**\n * [isPaused returns true if the timer is paused]\n * @return {Boolean}\n */\n\n\n function isPaused() {\n return paused;\n }\n /**\n * [getTimeValues returns the counter with the current timer values]\n * @return {TimeCounter}\n */\n\n\n function getTimeValues() {\n return counters;\n }\n /**\n * [getTotalTimeValues returns the counter with the current timer total values]\n * @return {TimeCounter}\n */\n\n\n function getTotalTimeValues() {\n return totalCounters;\n }\n /**\n * [getConfig returns the configuration parameters]\n * @return {type}\n */\n\n\n function getConfig() {\n return timerConfig;\n }\n /**\n * Public API\n * Definition of Timer instance public functions\n */\n\n\n if (typeof this !== 'undefined') {\n this.start = start;\n this.pause = pause;\n this.stop = stop;\n this.reset = reset;\n this.isRunning = isRunning;\n this.isPaused = isPaused;\n this.getTimeValues = getTimeValues;\n this.getTotalTimeValues = getTotalTimeValues;\n this.getConfig = getConfig;\n this.addEventListener = addEventListener;\n this.on = addEventListener;\n this.removeEventListener = removeEventListener;\n this.off = removeEventListener;\n }\n }", "title": "" }, { "docid": "21c26fe991f6fe9db49771be1d60f9c4", "score": "0.72268784", "text": "constructor(x, y, width, height, startTime) {\n //Position\n this.x = x;\n this.y = y;\n //Display properties\n this.width = width;\n this.height = height;\n // Timer properties\n this.startTime = startTime;\n this.timePassed = 0;\n this.startInterval = .5;\n this.\n }", "title": "" }, { "docid": "1cddd28531084d7ac9b410f03344193f", "score": "0.7215529", "text": "function Timer () {\n\n this.clocks = {};\n this.enterFrame = false;\n\n this.clocks['default'] = new buildClock(1/60);\n\n return this.API() \n}", "title": "" }, { "docid": "50268751887c1420625c7c27aa1559b6", "score": "0.71891326", "text": "construct() {\n this.timerContainer = this.minutesElement = this.secondsElement = null;\n }", "title": "" }, { "docid": "aa35c4aa1ac69ee9569fd9053c3878b2", "score": "0.71772075", "text": "function Timer() {\n ///<summary>Simple timer object created around a timeout.</summary>\n var t = this;\n t.id = null;\n t.busy = false;\n t.start = function (code, milliseconds) {\n ///<summary>Starts the timer and waits the specified amount of <paramref name=\"milliseconds\"/> before executing the supplied <paramref name=\"code\"/>.</summary>\n ///<param name=\"code\">The code to execute once the timer runs out.</param>\n ///<param name=\"milliseconds\">The time in milliseconds to wait before executing the supplied <paramref name=\"code\"/>.</param>\n\n if (t.busy) {\n return;\n }\n t.stop();\n t.id = setTimeout(function () {\n code();\n t.id = null;\n t.busy = false;\n }, milliseconds);\n t.busy = true;\n };\n t.stop = function () {\n ///<summary>Stops the timer if its runnning and resets it back to its starting state.</summary>\n\n if (t.id !== null) {\n clearTimeout(t.id);\n t.id = null;\n t.busy = false;\n }\n };\n }", "title": "" }, { "docid": "aa35c4aa1ac69ee9569fd9053c3878b2", "score": "0.71772075", "text": "function Timer() {\n ///<summary>Simple timer object created around a timeout.</summary>\n var t = this;\n t.id = null;\n t.busy = false;\n t.start = function (code, milliseconds) {\n ///<summary>Starts the timer and waits the specified amount of <paramref name=\"milliseconds\"/> before executing the supplied <paramref name=\"code\"/>.</summary>\n ///<param name=\"code\">The code to execute once the timer runs out.</param>\n ///<param name=\"milliseconds\">The time in milliseconds to wait before executing the supplied <paramref name=\"code\"/>.</param>\n\n if (t.busy) {\n return;\n }\n t.stop();\n t.id = setTimeout(function () {\n code();\n t.id = null;\n t.busy = false;\n }, milliseconds);\n t.busy = true;\n };\n t.stop = function () {\n ///<summary>Stops the timer if its runnning and resets it back to its starting state.</summary>\n\n if (t.id !== null) {\n clearTimeout(t.id);\n t.id = null;\n t.busy = false;\n }\n };\n }", "title": "" }, { "docid": "aa35c4aa1ac69ee9569fd9053c3878b2", "score": "0.71772075", "text": "function Timer() {\n ///<summary>Simple timer object created around a timeout.</summary>\n var t = this;\n t.id = null;\n t.busy = false;\n t.start = function (code, milliseconds) {\n ///<summary>Starts the timer and waits the specified amount of <paramref name=\"milliseconds\"/> before executing the supplied <paramref name=\"code\"/>.</summary>\n ///<param name=\"code\">The code to execute once the timer runs out.</param>\n ///<param name=\"milliseconds\">The time in milliseconds to wait before executing the supplied <paramref name=\"code\"/>.</param>\n\n if (t.busy) {\n return;\n }\n t.stop();\n t.id = setTimeout(function () {\n code();\n t.id = null;\n t.busy = false;\n }, milliseconds);\n t.busy = true;\n };\n t.stop = function () {\n ///<summary>Stops the timer if its runnning and resets it back to its starting state.</summary>\n\n if (t.id !== null) {\n clearTimeout(t.id);\n t.id = null;\n t.busy = false;\n }\n };\n }", "title": "" }, { "docid": "d4df623bd4637b5f9a9c051a9cdf73eb", "score": "0.7164707", "text": "function TimeScheduler() {\n this.timer = new Timer();\n\n /**\n * Holds an Array of timeouts : [timeout time, callback function]\n */\n this.timeouts = [];\n this.nTimeouts = 0;\n /**\n * Holds an Array of intervals : [interval starting time, interval time, callback function]\n */\n this.intervals = [];\n this.nIntervals = 0;\n\n this.clear();\n this.reset();\n }", "title": "" }, { "docid": "d70bc246120504c066a85071b967deae", "score": "0.710572", "text": "function Timer(timeout) {\n this.timeout = timeout || 0;\n\n this.reset();\n }", "title": "" }, { "docid": "32a19727a3647204077ed9917adca85e", "score": "0.71049434", "text": "function Timer() {\n this.ticks = -1;\n this.status = TIMER.STOPPED;\n this.start = function() { this.timer = setInterval('OnTick()',1000); this.status = TIMER.STARTED;};\n this.stop = function() {clearInterval(this.timer); this.status = TIMER.STOPPED};\n this.reset = function() {this.stop();this.ticks=-1;OnTick();}\n }", "title": "" }, { "docid": "b9fc7ae21c52790110f9a866068d2893", "score": "0.7018381", "text": "function Sprite_CooldownTimer() { this.initialize(...arguments); }", "title": "" }, { "docid": "3d8477b9e56bf9e13aca15a28f5d9d13", "score": "0.70141816", "text": "function ClassTimer(){\n this.tasks = [];\n this.addingTasks = [];\n this.adding = 0;\n this.running = false;\n}", "title": "" }, { "docid": "b86d67a86fc0662c485346f4ce43bc68", "score": "0.69925046", "text": "function Timer() {\n\t\tthis.started = false;\n\t\tthis.paused = false;\n\t\tthis.startTime = 0;\n\t\tthis.stopTime = 0;\n\n\t\tTimer.prototype.start = function() {\n\t\t\tvar now = new Date();\n\t\t\tthis.startTime = now.getTime();\n\t\t\tthis.started = true;\n\t\t\tthis.stopTime = 0;\n\t\t}\n\n\t\tTimer.prototype.elapsed = function() {\n\t\t\tif (!this.started) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\tvar now = new Date();\n\t\t\treturn now.getTime() - this.startTime;\n\t\t}\n\n\t\tTimer.prototype.stop = function() {\n\t\t\tthis.stopTime = this.elapsed();\n\t\t\tthis.started = false;\n\t\t}\n\n\t\tTimer.prototype.pause = function() {\n\t\t\tif (this.paused) return;\n\n\t\t\tvar now = new Date();\n\t\t\tthis.pauseTime = now.getTime();\n\t\t\tthis.paused = true;\n\t\t}\n\n\t\tTimer.prototype.resume = function() {\n\t\t\tif (!this.paused) return;\n\n\t\t\tvar now = new Date();\n\t\t\tthis.startTime += now.getTime() - this.pauseTime;\n\t\t\tthis.paused = false;\n\t\t\tthis.pauseTime = 0;\n\t\t}\n\t}", "title": "" }, { "docid": "e79e74e364b51a71ad001a2407d09d4e", "score": "0.69750744", "text": "function Timer( options ) {\n // options is expected to have optional\n // callback and element properties\n\n options = options || {};\n\n // Ensure an id is created for this Timer instance\n this.id = options.id || Abacus.guid();\n\n // Instance tracking properties\n this.lastTick = 0;\n this.lastStart = 0;\n this.until = 0;\n this.isPaused = false;\n this.timing = {\n delta: 0,\n sinceStart: 0,\n\n // how many times callback is called\n ticks: 0\n };\n\n // Define own property loop() function closure\n this.loop = (function() {\n var now = Date.now();\n\n this.timing.delta = now - this.lastTick;\n this.timing.sinceStart = now - this.lastStart;\n this.lastTick = now;\n\n // Check to see if the timer is paused, or run over until time but ran\n // at least once\n if ( this.isPaused ||\n ( this.until != null && this.lastTick - this.lastStart > this.until ) &&\n this.timing.ticks !== 0 ) {\n\n this.stop();\n\n if ( options.complete ) {\n options.complete( this.timing );\n }\n } else {\n\n // If there is a callback pass the timing to it\n if ( options.callback ) {\n // Set the callback's context to this Timer instance\n options.callback.call( this, this.timing );\n }\n\n // zero index, add after call\n this.timing.ticks++;\n }\n\n }).bind( this );\n\n\n // Define own property stop() function closure\n this.stop = (function() {\n\n callbackQueue.splice( callbackQueue.indexOf( this.loop || Abacus.noop ), 1 );\n\n }).bind( this );\n\n return this;\n }", "title": "" }, { "docid": "ce571aa995248af5fc823af845749e66", "score": "0.6955481", "text": "function Timer(){\n this.gameTime = 0;\n this.maxStep = 0.05;\n this.wallLastTimestamp = 0;\n}", "title": "" }, { "docid": "735e4b266c101fccdcb3a06e40b712ed", "score": "0.69478893", "text": "function Timer(){\n this.obj = (arguments.length)?arguments[0]:window;\n return this;\n}", "title": "" }, { "docid": "b0ede98a0cb05fcfd62be95bc5178375", "score": "0.69425917", "text": "constructor(props){\n\t\tsuper(props);\n\t\tthis.state={\n\t\t //keep track of if timer is paused or not\n\t\t\ttimerPaused : true,\n //keep track of if timer is finished or not\n timerFinished: false\n\t\t}\n\t}", "title": "" }, { "docid": "fadbdb9146b0638a055fb42f559b592e", "score": "0.69255906", "text": "function Timer() {\n this.callbacks = new Array();\n \n this.AddCallback = function( time, callback, callParam ) {\n var cb = new TimerCallback( time, callback, callParam );\n this.callbacks.push(cb);\n };\n \n \n this.Tick = function() {\n //laaaaammmeeee (way to much iterating over stuff, should only have to subtract a bit off the first one\n for( var i = 0; i < this.callbacks.length; i++ )\n {\n //we're just gonna assume the window setInterval function is doing\n //what it's supposed to\n this.callbacks[i].time -= window.tickLength;\n \n if(this.callbacks[i].time < 0)\n {\n var resetLength = this.callbacks[i].callFunc();\n if( resetLength != 0 )\n {\n this.callbacks[i].time = resetLength;\n }\n else\n {\n this.callbacks.splice(i,1); //if we don't get a new length, remove it\n }\n }\n }\n };\n }", "title": "" }, { "docid": "ec821591b67f64fa02f579a2eb1140bc", "score": "0.6902883", "text": "function Clock(){this._time=0;this._frame=0;this._timerQueue=[];this._updatingIndex=0;this._scale=1;this._scaledTime=this._time;}", "title": "" }, { "docid": "69625f80abcb1f4055178d2919afec64", "score": "0.68967825", "text": "function CountdownTimer(elm,tl,mes){\n this.initialize.apply(this,arguments);\n}", "title": "" }, { "docid": "3748c74a7923250060ab5301abf877ec", "score": "0.68896997", "text": "constructor() {\r\n\t\tsuper();\r\n\r\n\t\tthis._timeout = DEFAULT_TIMEOUT;\r\n\t}", "title": "" }, { "docid": "1dbd40a65c693119f94003a6e569e8ba", "score": "0.68469197", "text": "function Timer(el) {\n if (window === this) {\n return new Timer(el);\n }\n\n this.$el = $(el);\n this.pausedTime = 0;\n this.state = 'stop';\n\n return this;\n}", "title": "" }, { "docid": "452568e8876c15e77b0f5afffc6e13cf", "score": "0.68010724", "text": "constructor(){\n super();\n this.state = {\n time :{},\n seconds:20 \n };\n this.timer = 0;\n this.startTime = this.startTime.bind(this);\n this.countDown = this.countDown.bind(this);\n }", "title": "" }, { "docid": "d94ebc052064bbc864fbe40348ec6f37", "score": "0.67945325", "text": "function TimerEvent()\r\n{\r\n\tthis.addProperty(\"interval\", 1000);\r\n\tthis.addProperty(\"event\", \"tick\");\r\n\tthis.addOutput(\"on_tick\", LiteGraph.EVENT);\r\n\tthis.time = 0;\r\n\tthis.last_interval = 1000;\r\n\tthis.triggered = false;\r\n}", "title": "" }, { "docid": "061e5dfc342e9b687dbdfb2838f40454", "score": "0.678974", "text": "construct(){\n this.timerContainer = this.minutes_element = this.seconds_element = null\n }", "title": "" }, { "docid": "25b023150e1a63606523f4d010e89b38", "score": "0.6770376", "text": "constructor(counterDuration) {\n\t\tthis.counter = counterDuration;\n\t\tthis.counterDur = counterDuration;//this\n\t\tthis.intervalDur = 100; // must be 100 for seconds\n\n\t\tthis.myInterval = {};\n\n\t\tdisplayCounter(counterDuration);//display initial remaining time\n\t}", "title": "" }, { "docid": "409abca08b2e30568968aff1ab6287ef", "score": "0.6762043", "text": "function Timer (second , minute, hour){\n this.timerSecond = second;\n this.timerMinute = minute;\n this.timerHour = hour;\n this.setTimer = function(){\n return this.timerHour + \" : \" + this.timerMinute + \" : \" + this.timerSecond;}\n }", "title": "" }, { "docid": "44f077e28ae63e0478fb6205d55cb8e8", "score": "0.6744201", "text": "constructor(time) {\n super();\n this.delay = time;\n }", "title": "" }, { "docid": "3d8bcd09a7ec789ba3724a4c59e2b7c1", "score": "0.67349", "text": "constructor(props) {\n super(props);\n // class component requires .this keyword \n this.state = { \n seconds: 0,\n clearId: null,\n };\n\n // include a bind\n // 3. binds are needed to reference the \".this\" keyword --> to reference what's in the component\n // 3. particularly they bind the \".this\" keyword to the rest of the code\n this.timer = this.timer.bind(this);\n this.startTimer = this.startTimer.bind(this);\n }", "title": "" }, { "docid": "bfcf33aaf1a5b318c42b6d171fbb024b", "score": "0.67298144", "text": "startTimer(){\n\t\tthis.timer = 5000;\n\t\tthis.timerM = 5000;\n\t\tthis.ready = true;\n\t}", "title": "" }, { "docid": "6a50a8aca4615d2b08780b6f7e46d58c", "score": "0.6680964", "text": "function Clock () {\n this._time = 0;\n this._frame = 0;\n this._timerQueue = [];\n this._updatingIndex = 0;\n\n this._scale = 1;\n this._scaledTime = this._time;\n}", "title": "" }, { "docid": "85e63d5e142fc2c5e9fb233b9c9fc452", "score": "0.6637744", "text": "function _instance()\n\t\t\t{\n\t\t\t\tif ($count++ >= $steps)\n\t\t\t\t{\n\t\t\t\t\t$ondone($steps, $count);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$oninterval($steps, $count, $fps);\n\t\t\t\t\tvar diff = ((new Date().getTime() - $start) - ($count * $speed));\n\t\t\t\t\tthis['timer']=setTimeout(_instance, ($speed - diff));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "title": "" }, { "docid": "79d8040f31b9fd048a9360a98976acf2", "score": "0.65988535", "text": "static startTimer() {\n return new Timer();\n }", "title": "" }, { "docid": "5811220c688b902a65a475d7ed2218c9", "score": "0.6597038", "text": "function Timer(timer) {\n // console.log(`new Timer(${timer})`);\n if (timer) {\n this.times = Array.from(timer.times);\n this.previousTime = timer.previousTime;\n } else {\n this.times = [];\n this.previousTime = (new Date()).getTime();\n }\n this.top = function(stepName) {\n let newTime = (new Date()).getTime();\n this.times.push({\n stepName: stepName,\n time: newTime - this.previousTime\n });\n this.previousTime = newTime;\n }\n this.logTimes = function() {\n console.log(this.times.map(t => `[TIMER] ${t.stepName}: ${t.time} ms`).join('\\n'));\n }\n}", "title": "" }, { "docid": "b0c9ae5ff8cbd59026265a04db6ed415", "score": "0.65671265", "text": "function Timer() {\n}", "title": "" }, { "docid": "652793429a38a55f638c970414b4c516", "score": "0.65624756", "text": "constructor() {\n this._t = performance.now() / 1000;\n\n Object.seal(this);\n }", "title": "" }, { "docid": "b89880d1a9e78562bd9118d4c25d6f60", "score": "0.65381455", "text": "newTimer() {\n console.log(\"timering\");\n }", "title": "" }, { "docid": "6fcba7c30761710a36c518c5ffd2748a", "score": "0.65306604", "text": "constructor(): void {\n // Determine method for retrieving now\n this._now =\n (typeof performance !== 'undefined' && /*global performance */ performance.now.bind(performance)) ||\n (typeof process !== 'undefined' && /*global process */ process.hrtime && ((): number => {\n const now: [number, number] = process.hrtime();\n return now[0] * 1e3 + now[1] / 1e6;\n })) ||\n Date.now;\n\n // Current state\n this._previousTime = 0;\n this._previousNow = this._now();\n\n // Flow of time configuration\n this._rate = 1.0;\n this._running = false;\n\n // Minimum / maximum / looping configuration\n this._minimum = -Infinity;\n this._maximum = Infinity;\n this._loop = false;\n\n // Event and time listeners\n this._eventListeners = new Map();\n this._timeListeners = new Map();\n\n // Create unique TimeoutID to track non-scheduled timers\n this._nullTimeoutID = setTimeout(() => {}, 0);\n\n // Make private properties non-enumerable\n for (const prop in this) {\n if (prop.startsWith('_')) {\n Object.defineProperty(this, prop, { enumerable: false });\n }\n }\n\n // Bind methods to this object\n for (const prop of Object.getOwnPropertyNames(VirtualClock.prototype)) {\n const descriptor = Object.getOwnPropertyDescriptor(VirtualClock.prototype, prop);\n if (descriptor && 'value' in descriptor && typeof descriptor.value === 'function') {\n Object.defineProperty(this, prop, { value: descriptor.value.bind(this) });\n }\n }\n }", "title": "" }, { "docid": "9379d1e225efe84394f118df71b8ca5d", "score": "0.6522092", "text": "constructor () {\n super()\n\n this.gestation = setTimeout(this._hatch, this.phenotype.gestationPeriod)\n this.consumption = setInterval(this._consume, this.phenotype.consumptionRate)\n\n return this\n }", "title": "" }, { "docid": "14ad5c83da79734f96d21775472db491", "score": "0.65084356", "text": "function createTimer(seconds) {\n //get timer length, apply this length to module 1 class/object/whatever\n }", "title": "" }, { "docid": "f6a24c8cce4a89567b2d2707d8caf0e6", "score": "0.65041506", "text": "startTimer(){\n\t\tlet seconds = 0\n\t\tthis.totSec = 0 \n\t\tlet minutes = 0\n\t\tthis.timerInterval = setInterval(() => {\n\t\t\t// update the countdown span tag number\n\t\t\tthis.totSec++\n\t\t\tseconds++\n\t\t\t\n\t\t\t// increment minutes when seconds hit 60\n\t\t\tif(seconds == 60){\n\t\t\t\tseconds = 0\n\t\t\t\tminutes++;\t\n\t\t\t}\n\t\t\t\n\t\t\tlet s = seconds;\n\t\t\tlet m = minutes\n\t\t\tif(seconds < 10 ){\n\t\t\t\ts = '0' + seconds;\n\t\t\t} \n\t\t\t\n\t\t\tif(minutes < 10){\n\t\t\t\tm = '0' + minutes;\n\t\t\t}\n\t\t\t\n\t\t\t// timer output\n\t\t\tthis.timer.innerHTML = m + ':' + s;\n\t\t\t\n\t\t}, 1000) // end timerInterval\n\n\t}", "title": "" }, { "docid": "a5e2db4048c682d4aebc0b6c361f48c5", "score": "0.6501283", "text": "function Timer() {\r\n\t\t\r\n\t\t// log('AGO_Module - Timer' );\r\n\t}", "title": "" }, { "docid": "bc669425ad98b5839e551263f36de4fd", "score": "0.6496996", "text": "constructor() {\n super();\n this.state = {\n hasTimerStarted: false,\n timerStart: 0,\n currentTime: 0,\n splitTime : []\n }\n }", "title": "" }, { "docid": "e89d26bfa56315b0b9e5b6e03cb872e0", "score": "0.64744925", "text": "function _init()\n\t{\n\t\tvar fn = new EZtimer();\n\t\tfor (var key in fn)\n\t\t\tEZtimer[key] = fn[key];\n\t\t\t\n\t\tEZ.event.add(window, 'onload', function()\t//_init() initialize options plus...\n\t\t{\n\t\t\tvar _ = EZ.timer._;\n\t\t\tvar options = _.options = EZ.timer.options = EZ.options.call(EZ.defaultOptions.timer);\n\t\t\toptions.tracker = EZ.options.call(options.tracker || {});\n\t\t\t_.tracker = new EZ.timer();\t\t\t\t//default time tracker object\n\t\t\t\n\t\t\t_.queues = {\n\t\t\t\tpaused: new Queue('paused'),\n\t\t\t\tpending: new Queue('pending'),\n\t\t\t\trunning: new Queue('running', _.options.queueSize),\n\t\t\t\tfinished: new Queue('finished', _.options.queueSize)\t\n\t\t\t};\n\n\t\t\tEZ.setTimeout = EZ.timer.setTimeout;\t//convenience abbreviations\n\t\t\tEZ.clearTimeout = EZ.timer.clearTimeout;\n\t\t});\n\t\treturn EZtimer;\n\t}", "title": "" }, { "docid": "cad517a2303b187c2451066915c94080", "score": "0.6457744", "text": "function TickTimer (options) {\n extend(this, eventMixin);\n this.lastTickTime = Date.now();\n}", "title": "" }, { "docid": "ac418ac184c99ed4cdc3dce8120043af", "score": "0.6449127", "text": "constructor(time, timeInput) {\n this.timediv = time\n this.timeinput = timeInput\n this.isPaused = true;\n this.isReseted = true;\n this.tickAudio = document.getElementById(\"tic\")\n this.tickWTF = document.getElementById(\"wtf\")\n this.tickDate = 0\n console.log('Created timer');\n console.log(this.timeinput)\n\n }", "title": "" }, { "docid": "2ed51c778b01815eb7d818c5ae572dd5", "score": "0.6448231", "text": "constructor(fn, ms, repeat) {\n this.fn = fn;\n this.ms = ms;\n this.remaining = ms;\n this.repeat = repeat || false;\n GAME.timers.push(this);\n\n if (!GAME.paused) {\n this.resume();\n }\n }", "title": "" }, { "docid": "62b5a8c9590836dff4678cb38e146072", "score": "0.64446867", "text": "init () {\n\t\tif (this._inited) { return; }\n\t\tthis._inited = true;\n\t\tthis._times = [];\n\t\tthis._tickTimes = [];\n\t\tthis._startTime = this._getTime();\n\t\tthis._times.push(this._lastTime = 0);\n\t\tthis._setupTick();\n\t}", "title": "" }, { "docid": "39fd772df2019e0ff4a3b72562b3ecdc", "score": "0.64382654", "text": "function Timer(min) {\n this.counter = 0;\n this.minIn = Math.floor(min * 60);\n}", "title": "" }, { "docid": "a66dbe03605056b3c4c04ee24a1b2ea0", "score": "0.6433853", "text": "function ED_Timer( ) {\n\t//===========================================\n\t// Timer's Attributes\n\t//===========================================\n\tvar _seconds = 0;\n\tvar _timer = \"\";\n\tconst _fps = 1000;\n\n\tfunction createFromJSON( storageObj ) {\n\t\t_seconds = storageObj;\t\t\n\t}\n\n\tfunction seconds( ) { return _seconds;\t}\n\n\tfunction toJSON( ) {\n\t\treturn { \"second\" : _seconds };\n\t}\n\n\tfunction start( ) {\n\t\t_timer = setInterval( function( ) {\n\t\t\t_seconds += 1;\t\t\n\t\t}, _fps );\n\t}\n\n\tfunction end( ) {\n\t\tclearInterval(_timer);\n\t}\n\n\tfunction elapsedToString( ) {\n\t\tlet seconds = 0;\n\t\tlet minutes = 0;\n\t\tlet hours = 0;\n\t\tlet days = 0;\n\t\tlet years = 0;\n\n\t\tseconds = _seconds % 60;\t\t\t\t\t\t\t//Total Seconds\n\t\tminutes = Math.floor( _seconds / 60 );\t\t\t\t//Total Minutes\n\t\thours = Math.floor( _seconds / 3600 );\n\t\tdays = Math.floor( _seconds / 86400 );\n\t\tyears = Math.floor( _seconds / 31536000 );\n\n\t\tif( years >= 1 ) { \n\t\t\tif( years >=2 ) { return ( years + \" Years Ago\" ); }\n\t\t\telse { return ( years + \" Year Ago\" ); }\n\n\t\t} else if( days >= 1 ) {\n\t\t\tif( days >=2 ) { return ( days + \" Days Ago\" ); }\n\t\t\telse { return ( days + \" Day Ago\" ); }\n\n\t\t} else if( hours >= 1 ) {\n\t\t\tif( hours >=2 ) { return ( hours + \" Hours Ago\" ); }\n\t\t\telse { return ( hours + \" Hour Ago\" ); }\n\n\t\t} else if( minutes >= 1 ) {\n\t\t\tif( minutes >=2 ) { return ( minutes + \" Minutes Ago\" ); }\n\t\t\telse { return ( minutes + \" Minute Ago\" ); }\n\n\t\t} else {\n\t\t\tif( seconds >=2 ) { return ( seconds + \" Seconds Ago\" ); }\n\t\t\telse { return ( seconds + \" Second Ago\" ); }\n\t\t}\n\t}\n\n\treturn {\n\t\tcreateFromJSON : createFromJSON,\n\t\tseconds \t : seconds,\n\t\telapsedToString: elapsedToString,\n\t\ttoJSON : toJSON,\n\n\t\tstart : start,\n\t\tend\t \t\t : end\n\t};\n}", "title": "" }, { "docid": "83c02bf6efdd6faa95bbecb0b4f96722", "score": "0.6432402", "text": "function CountDownTimer(duration, granularity) {\r\n this.duration = duration;\r\n this.granularity = granularity || 1000;\r\n this.tickFtns = [];\r\n this.running = false;\r\n }", "title": "" }, { "docid": "d5e4f47bffd16aba126cc7e0765add2b", "score": "0.6426705", "text": "constructor(timeout_in_secs){\n this.initial_timeout_in_secs = timeout_in_secs\n\n this.reset()\n }", "title": "" }, { "docid": "85178bb4729681974177bff4e2111d0b", "score": "0.6418624", "text": "constructor(props) {\n super (props);\n console.log('constructor child');\n this.timeout = {}\n }", "title": "" }, { "docid": "a1b7bcc7dcdd5f9622cffb1a7ac7a842", "score": "0.6402718", "text": "constructor(timerObj) {\n /*\n * Input:\n * timerObj:\n * origin\n * invalid\n * type\n * time\n * timerCard - can be null\n * id - can be undefined if timerCard is null\n */\n this.audio = new AudioObj;\n this.origin = timerObj.origin;\n this.invalid = timerObj.invalid;\n this.type = timerObj.type;\n this.timerCard = timerObj.timerCard;\n this.time = timerObj.time;\n this.timerID = timerObj.id;\n\n this.id = bindedThis.cards[3].add(this);\n bindedThis.notifications.push(this);\n bindedThis.onLeave();\n }", "title": "" }, { "docid": "f9f9abd235c9fd9623d9b05a2a6572fa", "score": "0.6347553", "text": "constructor(tick, task) {\n super()\n this.tick = Object.assign({}, baseTick, tick)\n this.task = task\n this.inProgress = false\n this.timer = null\n }", "title": "" }, { "docid": "70b387edded4bf7785b233c1e795fb2e", "score": "0.6334439", "text": "function TimerInit()\n{\n\treturn new Date().valueOf();\n}", "title": "" }, { "docid": "34aad826f499028b65e0304ff84f43fe", "score": "0.6332292", "text": "setTimeout() {\n\n // Clearing\n this.clearTimeout();\n\n // Setting\n this.timerId = this.setTimeout(this.handler, this.nextDate - Date.now());\n }", "title": "" }, { "docid": "a7727bd2f8ec55a02384ddb94f97ee6b", "score": "0.63280976", "text": "constructor() {\n this.totalElapsedTimeInMs = 0;\n this.elapsedTimeInMs = 0;\n\n this.startTimeInMs = 0;\n this.lastAnimationFrameTimeInMs = 0;\n }", "title": "" }, { "docid": "87f607734f4f7ae9d1acc4b95d132188", "score": "0.6322994", "text": "constructor() {\n this.timeSpan = undefined;\n this.elapsedGameTime = {};\n this.elapsedGameTime.totalMilliseconds = 0;\n this.elapsedGameTime.totalSeconds = 0;\n }", "title": "" }, { "docid": "99bb2c653083ae97b5b49cb6efcbeabf", "score": "0.6309702", "text": "timerTick() {\n\n }", "title": "" }, { "docid": "0701f9bcefc9282ac4ac673a174e6d42", "score": "0.6309372", "text": "constructor (ctx, width, height, options) {\n this.timer = null;\n this.ctx= ctx;\n this.w = width;\n this.h = height;\n this._opts = options;\n this.status = STATUS_STOP;\n\n this._init();\n }", "title": "" }, { "docid": "0dcade30dff78c96f915fc7b29b8c10b", "score": "0.63085145", "text": "hungerTimer(tamagotchi){\n this.a = window.setInterval(function(){tamagotchi.cry()}, 6000)\n }", "title": "" }, { "docid": "75b624a34c881b960ddff76ffb52609c", "score": "0.63082165", "text": "start(t) {\n this.timerHandle = setTimeout((() => this.handleDelayElapsed()), t);\n }", "title": "" }, { "docid": "bb94bac146badcca42a2db32ed8fbae6", "score": "0.6308146", "text": "function timer() {\n\tvar time = 0;\n\tvar running = false;\n\tvar interval_id;\n\t// start the timer\n\tthis.start = function() {\n\t\t// interval is 1 second\n\t\tif(!running) {\n\t\t\trunning = true;\n\t\t\tinterval_id = setInterval(function() {\n\t\t\t\ttime++;\n\t\t\t\tconvertTime();\n\t\t\t}, SECOND);\n\t\t}\n\t}\n\t// stop/pause the timer\n\tthis.stop = function() {\n\t\tif(running) {\n\t\t\trunning = false;\n\t\t\tclearInterval(interval_id);\n\t\t}\n\t}\n\t// reset the timer\n\tthis.reset = function() {\n\t\ttime = 0;\n\t\tconvertTime(time);\n\t}\n\t// convert seconds to time in hour/minute/second\n\tfunction convertTime() {\n\t\tvar second = time % 60;\n\t\tvar minute = Math.floor(time / 60) % 60;\n\t\tvar hour = Math.floor(time / 3600) % 60;\n\t\tsecond = (second < 10) ? '0'+second : second;\n\t\tminute = (minute < 10) ? '0'+minute : minute;\n\t\thour = (hour < 10) ? '0'+hour : hour;\n\t\tvar display = hour + ':' + minute + ':' + second;\n\t\tvar timer_display = $(\"#timer\");\n timer_display.innerHTML = display;\n\t}\n}", "title": "" }, { "docid": "8f17847d63d61a0b964ab23b79ab1cbf", "score": "0.6307424", "text": "constructor(name, enabled = false) {\n this.name = name;\n this.enabled = enabled;\n this.timers = new Map();\n this.nullTimer = new SimpleTimer(this, \"<null>\");\n }", "title": "" }, { "docid": "8f17847d63d61a0b964ab23b79ab1cbf", "score": "0.6307424", "text": "constructor(name, enabled = false) {\n this.name = name;\n this.enabled = enabled;\n this.timers = new Map();\n this.nullTimer = new SimpleTimer(this, \"<null>\");\n }", "title": "" }, { "docid": "9867e31397c0f224857ee8dda6392afc", "score": "0.63040745", "text": "function TimeDuration() {\n this.start = new Date();\n}", "title": "" }, { "docid": "d1ad3cb6e6c5da1ba8a36ceae298395b", "score": "0.62902224", "text": "function Timer() {\n this.events = new Array(); /* { ticks: int, func: func() { ... } } */\n this.now = 0;\n this.doPause = false;\n\n var PERIOD = 10;\n var timer = this;\n function loop() {\n if (timer.doPause) {\n return;\n }\n for (var i = timer.events.length - 1; i >= 0; --i) {\n if (timer.events[i] != undefined &&\n timer.now >= timer.events[i].ticks) {\n timer.events[i].func();\n timer.events.splice(i, 1);\n }\n }\n timer.now += PERIOD;\n }\n\n this.interval = setInterval(loop, PERIOD);\n\n this.secs = function () { return this.now / 1000; }\n this.play = function () { this.doPause = false; }\n this.pause = function () { this.doPause = true; }\n this.stop = function () { clearInterval(this.interval); }\n this.addEvent = function (func, secs) {\n var ticks = secs * 1000;\n this.events.push({ ticks: this.now + ticks, func: func });\n }\n}", "title": "" }, { "docid": "1da004d25d05c67984d02c8d19d9eaa4", "score": "0.6286124", "text": "constructor(timeoutInSecs) {\n this.initialTimeoutInSecs = timeoutInSecs;\n this.reset();\n }", "title": "" }, { "docid": "5550284d677dab974aa654eb60522293", "score": "0.6282165", "text": "setTimer () {\n\t\tthis.intervalID = setInterval( () => {\n\t\t\tthis.time.seconds++;\n\n\t\t\t// every 60 seconds, increase the minute by 1\n\t\t\tif (this.time.seconds === 60) {\n\t\t\t\tthis.time.minutes++\n\t\t\t\tthis.time.seconds = 0;\n\t\t\t}\n\n\t\t\t// every 60 minutes, increase the hour by 1\n\t\t\tif (this.time.minutes === 60) {\n\t\t\t\tthis.time.hours++\n\t\t\t}\n\n\t\t\t$('#time').text(`TIME:${this.time.hours}h ${this.time.minutes}m ${this.time.seconds}s`)\n\t\t}, 1000)\n\t}", "title": "" }, { "docid": "b7eefc6c3fdacf9e3cfa66a6114c3aba", "score": "0.6279585", "text": "function timerNew(element, tp, start, stop, step, pause, startDelay, stopDelay, callback) {\n\t\tvar i = owl.Property.Get(element, tp);\n\t\tif (i == null) i = timer.length;\n\t\towl.Property.Set(element, tp, i);\n\t\ttimer[i] = new owl.Timer(start, stop, step, pause, startDelay, stopDelay, callback);\n\t\treturn timer[i];\n\t}", "title": "" }, { "docid": "2b5e58dac917ff05f1068d67376ed7d1", "score": "0.6252614", "text": "function CountdownFactory() {}", "title": "" }, { "docid": "17e7719047af7cc3da9238475e14c4f1", "score": "0.6245776", "text": "constructor(ctx, w, h, opts) {\n this.timer = null;\n this.ctx= ctx;\n this.w = w;\n this.h = h;\n this._opts = opts;\n this.status = STATUS_STOP;\n\n this._init();\n }", "title": "" }, { "docid": "3117eca0b2f138f17a53dc82e25cad07", "score": "0.62308407", "text": "constructor(props) {\n super(props);\n // Load at the beginning to avoid race condition with .play\n // (would even be better to load it once at the beginning of the app, if we only have one alarm sound)\n this.alarm = new Sound('alarm.mp3', Sound.MAIN_BUNDLE, (error) => {\n if (error) {\n console.log(error);\n return;\n }\n this.alarm.setNumberOfLoops(-1);\n });\n this.state = {\n timer: setInterval(() => {\n const newString = formatMilliseconds(this.props.duration - (new Date()).getTime() + this.state.timeStarted.getTime());\n if (newString.startsWith('-') && !this.state.timeString.startsWith('-')) {\n // Timer just expired\n this.alarm.play();\n }\n this.setState({\n timeString: newString,\n })\n }, 10),\n timeStarted: new Date(),\n duration: this.props.duration,\n timeString: '',\n touched: false,\n isPaused: false,\n };\n\n this.resume = this.resume.bind(this);\n this.pause = this.pause.bind(this);\n }", "title": "" }, { "docid": "84166d52a5b047762d5b207d21e6c06e", "score": "0.6198494", "text": "function Stopwatch() {}", "title": "" }, { "docid": "e135790d412f4495292cc103175e3188", "score": "0.6198462", "text": "startTimer() {\n this.interval = TimerMixin.setInterval(\n () => this.setState((prevState)=> ({ timer: prevState.timer - 1 })),\n 1000\n );\n }", "title": "" }, { "docid": "e6c8d398039cb44fda3263d5f584a9a1", "score": "0.61972916", "text": "startTimer() {\n this.stopTimer();\n\n this.lastIntervalTime = Date.now();\n\n this._handleInterval();\n }", "title": "" }, { "docid": "11c56da50ded7d1431b86cd9031eaa3b", "score": "0.6187709", "text": "function Timer(name) {\n\treturn {\n\t\tname: name,\n\t\ttime: undefined,\n\t\tc: { // shortened version of 'cache'\n\t\t\tdays: undefined,\n\t\t\thours: undefined,\n\t\t\tminutes: undefined,\n\t\t\tseconds: undefined,\n\t\t\tnegative: undefined,\n\t\t\tformatted: undefined\n\t\t},\n\t\t\n\t\t// Stored for performance\n\t\tneg_sign: '-',\n\t\tseparator: ':',\n\t\tzero: '0',\n\t\ttnd_error: \"Time Not Defined Error\",\n\t\t\n\t\tdays: function() {\n\t\t\tif (this.time == undefined) throw tnd_error;\n\t\t\tif (this.c.days == undefined) this.c.days = Math.abs( ~~(this.time / 60 / 24) );\n\t\t\treturn this.c.days;\n\t\t},\n\t\thours: function() {\n\t\t\tif (this.time == undefined) throw tnd_error;\n\t\t\tif (this.c.hours == undefined) this.c.hours = Math.abs( ~~(this.time / 60) )%24;\n\t\t\treturn this.c.hours;\n\t\t},\n\t\tminutes: function() {\n\t\t\tif (this.time == undefined) throw tnd_error;\n\t\t\tif (this.c.minutes == undefined) this.c.minutes = Math.abs( ~~this.time)%60;\n\t\t\treturn this.c.minutes;\n\t\t},\n\t\tseconds: function() {\n\t\t\tif (this.time == undefined) throw tnd_error;\n\t\t\tif (this.c.seconds == undefined) this.c.seconds = Math.abs( ~~((this.time%1)*60) ) + (this.negative()?1:0);\n\t\t\treturn this.c.seconds;\n\t\t},\n\t\tnegative: function() {\n\t\t\tif (this.time == undefined) throw tnd_error;\n\t\t\tif (this.c.negative == undefined) this.c.negative = (this.time < 0);\n\t\t\treturn this.c.negative;\n\t\t},\n\t\t\n\t\tformatted: function() {\n\t\t\tif (this.time == undefined) throw tnd_error;\n\t\t\tthis.c.formatted = '';\n\t\t\t\n\t\t\tif (this.negative()) this.c.formatted += this.neg_sign;\n\t\t\tif (this.days() != 0) this.c.formatted += this.days()+this.separator;\n\t\t\tif (this.hours() != 0) this.c.formatted += this.hours()+this.separator;\n\t\t\tif (this.hours() != 0 && this.minutes() < 10) this.c.formatted += this.zero;\n\t\t\tthis.c.formatted += this.minutes()+this.separator;\n\t\t\tif (this.seconds() < 10) this.c.formatted += this.zero;\n\t\t\tthis.c.formatted += this.seconds();\n\t\t\t\n\t\t\treturn this.c.formatted;\n\t\t},\n\t\t\n\t\tchangeTo: function(time) {\n\t\t\tthis.time = time;\n\t\t\t\n\t\t\tthis.c.days = undefined;\n\t\t\tthis.c.hours = undefined;\n\t\t\tthis.c.minutes = undefined;\n\t\t\tthis.c.seconds = undefined;\n\t\t\tthis.c.negative = undefined;\n\t\t\tthis.c.formatted = undefined;\n\t\t}\n\t\t\n\t}\n}", "title": "" }, { "docid": "d793cc12c94bd4ad83dd4d41dbf57566", "score": "0.61825585", "text": "function createTimer() {\n\t\tvar start, split;\n\n\t\tstart = new Date().getTime();\n\t\tsplit = start;\n\n\t\t/**\n\t\t * Returns the total elapsed time since this timer was created, and the\n\t\t * split time since this getTime was last called.\n\t\t *\n\t\t * @returns Object containing total and split times in milliseconds, plus a\n\t\t * toString() function that is useful in logging the time.\n\t\t */\n\t\treturn function getTime() {\n\t\t\tvar now, total, splitTime;\n\n\t\t\tnow = new Date().getTime();\n\t\t\ttotal = now - start;\n\t\t\tsplitTime = now - split;\n\t\t\tsplit = now;\n\n\t\t\treturn {\n\t\t\t\ttotal:total,\n\t\t\t\tsplit:splitTime,\n\t\t\t\ttoString:function () {\n\t\t\t\t\treturn '' + splitTime + 'ms / ' + total + 'ms';\n\t\t\t\t}\n\t\t\t};\n\t\t};\n\t}", "title": "" }, { "docid": "7496f4768647d081d886c382aa0c3a5b", "score": "0.6175646", "text": "constructor() {\n this.work_time = DEFAULT_WORK_TIME;\n this.rest_time = DEFAULT_REST_TIME;\n this.last_update = Date.now();\n this.finish_time = null;\n this.__completed = false;\n this.remaining = 0;\n this.__status = POMODORO_STOPPED;\n this.phase = POMODORO_WORK;\n\n // Reset the timer by default\n this.reset();\n }", "title": "" }, { "docid": "5a9edd4c99cd902b89739b8051eb90dc", "score": "0.6164818", "text": "start() {\n if (this.state === GuiTimer.State.RUNNING)\n return;\n this.state = GuiTimer.State.RUNNING;\n this.num_ticks = 0;\n this.elapsedTime = 0;\n }", "title": "" }, { "docid": "b3973dbfbd10dcf8ef0dbb5073e5881b", "score": "0.61578834", "text": "constructor(minutes) { this.interval = minutes * 60 * 1000 }", "title": "" }, { "docid": "1af3cc71aa4d34c42bad51cfd55945a1", "score": "0.61562186", "text": "timerG() {\n // TODO\n }", "title": "" }, { "docid": "a4ffa8e89bf26c88a3dd9bd1f894bcab", "score": "0.6137911", "text": "function Time() {}", "title": "" }, { "docid": "7af5520fb8a132acf7858eb04dd8393a", "score": "0.613325", "text": "constructor(schedule) {}", "title": "" }, { "docid": "7af5520fb8a132acf7858eb04dd8393a", "score": "0.613325", "text": "constructor(schedule) {}", "title": "" }, { "docid": "a081f1081af745373c5ce645740ac6dd", "score": "0.61323047", "text": "function SimulatedTime()\n{\n this.s = 0;\n this.m = 0;\n this.h = 0;\n this.d = 0;\n this.y = 0;\n} // SimulatedTime", "title": "" }, { "docid": "a8b873e9989944678ecc920266147a1a", "score": "0.61309695", "text": "setStartupTimer() {\n let self = this;\n //+ coerces the result to a number, making typescript happy.\n this.startupTimer = +setTimeout(() => {\n self.emit(\"timeout\");\n }, STARTUP_TIMEOUT_DURATION);\n }", "title": "" }, { "docid": "945bad8dafb73fc5a0f8c7a9fec40f42", "score": "0.6126438", "text": "function initTimerFunction() {\n absoluteStartTime = getNow();\n setTimerColors();\n setElementDisabled(\"f-b-reset\", true);\n //setInterval(timerHandler, 250);\n setInterval(timerHandler, 100);\n}", "title": "" }, { "docid": "21cba55dc9b218ec9d0424e0da20a642", "score": "0.6122443", "text": "function timer( settings ){\n settings = settings || {};\n \n // Update settings with those provided\n var timerKeys = getKeys(timer_settings);\n for (var kdx in timerKeys){\n var key = timerKeys[kdx];\n if (settings.hasOwnProperty(key)){\n timer_settings[key] = settings[key];\n }\n }\n\n // Scaffold timer for each applied div\n this.each(function(){\n // $( this ).html(\"hello\"); // Clear out contents of container\n scaffoldTimer($( this ));\n });\n\n // Kill timer if it is running\n if (intervalId != ''){ \n kill();\n }\n\n // startTimer\n // if \n startTimer(this);\n \n return this; // we support chaining\n }", "title": "" }, { "docid": "5be653e3d8b1b48c2604e6c4a7fdb87c", "score": "0.6121404", "text": "timer(){\n //This sets the time for the seconds based upon the update speed\n this.secondCount = this.secondCount + 1;\n //A variable thats assigned the seconds to calculate the minutes\n this.secHolder = Math.trunc(this.secondCount/60)\n\n}", "title": "" } ]
d4b19da1590e57d00887a77ef8805d27
Parse the Accept header.
[ { "docid": "6da633414024929ad7aa1f9f7f9a07a2", "score": "0.69132143", "text": "function parseAccept(accept) {\n var accepts = splitMediaTypes(accept);\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var mediaType = parseMediaType(accepts[i].trim(), i);\n\n if (mediaType) {\n accepts[j++] = mediaType;\n }\n } // trim accepts\n\n\n accepts.length = j;\n return accepts;\n}", "title": "" } ]
[ { "docid": "19aa324b40274402bb932b00583eb94d", "score": "0.68859637", "text": "function parseAccept(accept) {\n\t var accepts = splitMediaTypes(accept);\n\n\t for (var i = 0, j = 0; i < accepts.length; i++) {\n\t var mediaType = parseMediaType(accepts[i].trim(), i);\n\n\t if (mediaType) {\n\t accepts[j++] = mediaType;\n\t }\n\t }\n\n\t // trim accepts\n\t accepts.length = j;\n\n\t return accepts;\n\t}", "title": "" }, { "docid": "19aa324b40274402bb932b00583eb94d", "score": "0.68859637", "text": "function parseAccept(accept) {\n\t var accepts = splitMediaTypes(accept);\n\n\t for (var i = 0, j = 0; i < accepts.length; i++) {\n\t var mediaType = parseMediaType(accepts[i].trim(), i);\n\n\t if (mediaType) {\n\t accepts[j++] = mediaType;\n\t }\n\t }\n\n\t // trim accepts\n\t accepts.length = j;\n\n\t return accepts;\n\t}", "title": "" }, { "docid": "19aa324b40274402bb932b00583eb94d", "score": "0.68859637", "text": "function parseAccept(accept) {\n\t var accepts = splitMediaTypes(accept);\n\n\t for (var i = 0, j = 0; i < accepts.length; i++) {\n\t var mediaType = parseMediaType(accepts[i].trim(), i);\n\n\t if (mediaType) {\n\t accepts[j++] = mediaType;\n\t }\n\t }\n\n\t // trim accepts\n\t accepts.length = j;\n\n\t return accepts;\n\t}", "title": "" }, { "docid": "19aa324b40274402bb932b00583eb94d", "score": "0.68859637", "text": "function parseAccept(accept) {\n\t var accepts = splitMediaTypes(accept);\n\n\t for (var i = 0, j = 0; i < accepts.length; i++) {\n\t var mediaType = parseMediaType(accepts[i].trim(), i);\n\n\t if (mediaType) {\n\t accepts[j++] = mediaType;\n\t }\n\t }\n\n\t // trim accepts\n\t accepts.length = j;\n\n\t return accepts;\n\t}", "title": "" }, { "docid": "8d140d5cbfef35921df74a600b3ff392", "score": "0.68576384", "text": "function parseAccept(accept) {\n var accepts = splitMediaTypes(accept);\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var mediaType = parseMediaType(accepts[i].trim(), i);\n\n if (mediaType) {\n accepts[j++] = mediaType;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "8d140d5cbfef35921df74a600b3ff392", "score": "0.68576384", "text": "function parseAccept(accept) {\n var accepts = splitMediaTypes(accept);\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var mediaType = parseMediaType(accepts[i].trim(), i);\n\n if (mediaType) {\n accepts[j++] = mediaType;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "8d140d5cbfef35921df74a600b3ff392", "score": "0.68576384", "text": "function parseAccept(accept) {\n var accepts = splitMediaTypes(accept);\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var mediaType = parseMediaType(accepts[i].trim(), i);\n\n if (mediaType) {\n accepts[j++] = mediaType;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "8d140d5cbfef35921df74a600b3ff392", "score": "0.68576384", "text": "function parseAccept(accept) {\n var accepts = splitMediaTypes(accept);\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var mediaType = parseMediaType(accepts[i].trim(), i);\n\n if (mediaType) {\n accepts[j++] = mediaType;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "8d140d5cbfef35921df74a600b3ff392", "score": "0.68576384", "text": "function parseAccept(accept) {\n var accepts = splitMediaTypes(accept);\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var mediaType = parseMediaType(accepts[i].trim(), i);\n\n if (mediaType) {\n accepts[j++] = mediaType;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "8d140d5cbfef35921df74a600b3ff392", "score": "0.68576384", "text": "function parseAccept(accept) {\n var accepts = splitMediaTypes(accept);\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var mediaType = parseMediaType(accepts[i].trim(), i);\n\n if (mediaType) {\n accepts[j++] = mediaType;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "8d140d5cbfef35921df74a600b3ff392", "score": "0.68576384", "text": "function parseAccept(accept) {\n var accepts = splitMediaTypes(accept);\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var mediaType = parseMediaType(accepts[i].trim(), i);\n\n if (mediaType) {\n accepts[j++] = mediaType;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "8d140d5cbfef35921df74a600b3ff392", "score": "0.68576384", "text": "function parseAccept(accept) {\n var accepts = splitMediaTypes(accept);\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var mediaType = parseMediaType(accepts[i].trim(), i);\n\n if (mediaType) {\n accepts[j++] = mediaType;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "8d140d5cbfef35921df74a600b3ff392", "score": "0.68576384", "text": "function parseAccept(accept) {\n var accepts = splitMediaTypes(accept);\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var mediaType = parseMediaType(accepts[i].trim(), i);\n\n if (mediaType) {\n accepts[j++] = mediaType;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "8d140d5cbfef35921df74a600b3ff392", "score": "0.68576384", "text": "function parseAccept(accept) {\n var accepts = splitMediaTypes(accept);\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var mediaType = parseMediaType(accepts[i].trim(), i);\n\n if (mediaType) {\n accepts[j++] = mediaType;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "8d140d5cbfef35921df74a600b3ff392", "score": "0.68576384", "text": "function parseAccept(accept) {\n var accepts = splitMediaTypes(accept);\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var mediaType = parseMediaType(accepts[i].trim(), i);\n\n if (mediaType) {\n accepts[j++] = mediaType;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "8d140d5cbfef35921df74a600b3ff392", "score": "0.68576384", "text": "function parseAccept(accept) {\n var accepts = splitMediaTypes(accept);\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var mediaType = parseMediaType(accepts[i].trim(), i);\n\n if (mediaType) {\n accepts[j++] = mediaType;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "8d140d5cbfef35921df74a600b3ff392", "score": "0.68576384", "text": "function parseAccept(accept) {\n var accepts = splitMediaTypes(accept);\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var mediaType = parseMediaType(accepts[i].trim(), i);\n\n if (mediaType) {\n accepts[j++] = mediaType;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "8d140d5cbfef35921df74a600b3ff392", "score": "0.68576384", "text": "function parseAccept(accept) {\n var accepts = splitMediaTypes(accept);\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var mediaType = parseMediaType(accepts[i].trim(), i);\n\n if (mediaType) {\n accepts[j++] = mediaType;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "d6ab998e4bc736d48115085db448d638", "score": "0.64957774", "text": "function parseAcceptEncoding(accept) {\n var accepts = accept.split(',');\n var hasIdentity = false;\n var minQuality = 1;\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var encoding = parseEncoding(accepts[i].trim(), i);\n\n if (encoding) {\n accepts[j++] = encoding;\n hasIdentity = hasIdentity || specify('identity', encoding);\n minQuality = Math.min(minQuality, encoding.q || 1);\n }\n }\n\n if (!hasIdentity) {\n /*\n * If identity doesn't explicitly appear in the accept-encoding header,\n * it's added to the list of acceptable encoding with the lowest q\n */\n accepts[j++] = {\n encoding: 'identity',\n q: minQuality,\n i: i\n };\n } // trim accepts\n\n\n accepts.length = j;\n return accepts;\n}", "title": "" }, { "docid": "110bb272de9b4369f06f6f0a9abf729f", "score": "0.64756083", "text": "function parseAcceptEncoding(accept) {\n var accepts = accept.split(',');\n var hasIdentity = false;\n var minQuality = 1;\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var encoding = parseEncoding(accepts[i].trim(), i);\n\n if (encoding) {\n accepts[j++] = encoding;\n hasIdentity = hasIdentity || specify('identity', encoding);\n minQuality = Math.min(minQuality, encoding.q || 1);\n }\n }\n\n if (!hasIdentity) {\n /*\n * If identity doesn't explicitly appear in the accept-encoding header,\n * it's added to the list of acceptable encoding with the lowest q\n */\n accepts[j++] = {\n encoding: 'identity',\n q: minQuality,\n i: i\n };\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "110bb272de9b4369f06f6f0a9abf729f", "score": "0.64756083", "text": "function parseAcceptEncoding(accept) {\n var accepts = accept.split(',');\n var hasIdentity = false;\n var minQuality = 1;\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var encoding = parseEncoding(accepts[i].trim(), i);\n\n if (encoding) {\n accepts[j++] = encoding;\n hasIdentity = hasIdentity || specify('identity', encoding);\n minQuality = Math.min(minQuality, encoding.q || 1);\n }\n }\n\n if (!hasIdentity) {\n /*\n * If identity doesn't explicitly appear in the accept-encoding header,\n * it's added to the list of acceptable encoding with the lowest q\n */\n accepts[j++] = {\n encoding: 'identity',\n q: minQuality,\n i: i\n };\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "110bb272de9b4369f06f6f0a9abf729f", "score": "0.64756083", "text": "function parseAcceptEncoding(accept) {\n var accepts = accept.split(',');\n var hasIdentity = false;\n var minQuality = 1;\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var encoding = parseEncoding(accepts[i].trim(), i);\n\n if (encoding) {\n accepts[j++] = encoding;\n hasIdentity = hasIdentity || specify('identity', encoding);\n minQuality = Math.min(minQuality, encoding.q || 1);\n }\n }\n\n if (!hasIdentity) {\n /*\n * If identity doesn't explicitly appear in the accept-encoding header,\n * it's added to the list of acceptable encoding with the lowest q\n */\n accepts[j++] = {\n encoding: 'identity',\n q: minQuality,\n i: i\n };\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "110bb272de9b4369f06f6f0a9abf729f", "score": "0.64756083", "text": "function parseAcceptEncoding(accept) {\n var accepts = accept.split(',');\n var hasIdentity = false;\n var minQuality = 1;\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var encoding = parseEncoding(accepts[i].trim(), i);\n\n if (encoding) {\n accepts[j++] = encoding;\n hasIdentity = hasIdentity || specify('identity', encoding);\n minQuality = Math.min(minQuality, encoding.q || 1);\n }\n }\n\n if (!hasIdentity) {\n /*\n * If identity doesn't explicitly appear in the accept-encoding header,\n * it's added to the list of acceptable encoding with the lowest q\n */\n accepts[j++] = {\n encoding: 'identity',\n q: minQuality,\n i: i\n };\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "110bb272de9b4369f06f6f0a9abf729f", "score": "0.64756083", "text": "function parseAcceptEncoding(accept) {\n var accepts = accept.split(',');\n var hasIdentity = false;\n var minQuality = 1;\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var encoding = parseEncoding(accepts[i].trim(), i);\n\n if (encoding) {\n accepts[j++] = encoding;\n hasIdentity = hasIdentity || specify('identity', encoding);\n minQuality = Math.min(minQuality, encoding.q || 1);\n }\n }\n\n if (!hasIdentity) {\n /*\n * If identity doesn't explicitly appear in the accept-encoding header,\n * it's added to the list of acceptable encoding with the lowest q\n */\n accepts[j++] = {\n encoding: 'identity',\n q: minQuality,\n i: i\n };\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "110bb272de9b4369f06f6f0a9abf729f", "score": "0.64756083", "text": "function parseAcceptEncoding(accept) {\n var accepts = accept.split(',');\n var hasIdentity = false;\n var minQuality = 1;\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var encoding = parseEncoding(accepts[i].trim(), i);\n\n if (encoding) {\n accepts[j++] = encoding;\n hasIdentity = hasIdentity || specify('identity', encoding);\n minQuality = Math.min(minQuality, encoding.q || 1);\n }\n }\n\n if (!hasIdentity) {\n /*\n * If identity doesn't explicitly appear in the accept-encoding header,\n * it's added to the list of acceptable encoding with the lowest q\n */\n accepts[j++] = {\n encoding: 'identity',\n q: minQuality,\n i: i\n };\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "110bb272de9b4369f06f6f0a9abf729f", "score": "0.64756083", "text": "function parseAcceptEncoding(accept) {\n var accepts = accept.split(',');\n var hasIdentity = false;\n var minQuality = 1;\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var encoding = parseEncoding(accepts[i].trim(), i);\n\n if (encoding) {\n accepts[j++] = encoding;\n hasIdentity = hasIdentity || specify('identity', encoding);\n minQuality = Math.min(minQuality, encoding.q || 1);\n }\n }\n\n if (!hasIdentity) {\n /*\n * If identity doesn't explicitly appear in the accept-encoding header,\n * it's added to the list of acceptable encoding with the lowest q\n */\n accepts[j++] = {\n encoding: 'identity',\n q: minQuality,\n i: i\n };\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "110bb272de9b4369f06f6f0a9abf729f", "score": "0.64756083", "text": "function parseAcceptEncoding(accept) {\n var accepts = accept.split(',');\n var hasIdentity = false;\n var minQuality = 1;\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var encoding = parseEncoding(accepts[i].trim(), i);\n\n if (encoding) {\n accepts[j++] = encoding;\n hasIdentity = hasIdentity || specify('identity', encoding);\n minQuality = Math.min(minQuality, encoding.q || 1);\n }\n }\n\n if (!hasIdentity) {\n /*\n * If identity doesn't explicitly appear in the accept-encoding header,\n * it's added to the list of acceptable encoding with the lowest q\n */\n accepts[j++] = {\n encoding: 'identity',\n q: minQuality,\n i: i\n };\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "110bb272de9b4369f06f6f0a9abf729f", "score": "0.64756083", "text": "function parseAcceptEncoding(accept) {\n var accepts = accept.split(',');\n var hasIdentity = false;\n var minQuality = 1;\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var encoding = parseEncoding(accepts[i].trim(), i);\n\n if (encoding) {\n accepts[j++] = encoding;\n hasIdentity = hasIdentity || specify('identity', encoding);\n minQuality = Math.min(minQuality, encoding.q || 1);\n }\n }\n\n if (!hasIdentity) {\n /*\n * If identity doesn't explicitly appear in the accept-encoding header,\n * it's added to the list of acceptable encoding with the lowest q\n */\n accepts[j++] = {\n encoding: 'identity',\n q: minQuality,\n i: i\n };\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "110bb272de9b4369f06f6f0a9abf729f", "score": "0.64756083", "text": "function parseAcceptEncoding(accept) {\n var accepts = accept.split(',');\n var hasIdentity = false;\n var minQuality = 1;\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var encoding = parseEncoding(accepts[i].trim(), i);\n\n if (encoding) {\n accepts[j++] = encoding;\n hasIdentity = hasIdentity || specify('identity', encoding);\n minQuality = Math.min(minQuality, encoding.q || 1);\n }\n }\n\n if (!hasIdentity) {\n /*\n * If identity doesn't explicitly appear in the accept-encoding header,\n * it's added to the list of acceptable encoding with the lowest q\n */\n accepts[j++] = {\n encoding: 'identity',\n q: minQuality,\n i: i\n };\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "110bb272de9b4369f06f6f0a9abf729f", "score": "0.64756083", "text": "function parseAcceptEncoding(accept) {\n var accepts = accept.split(',');\n var hasIdentity = false;\n var minQuality = 1;\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var encoding = parseEncoding(accepts[i].trim(), i);\n\n if (encoding) {\n accepts[j++] = encoding;\n hasIdentity = hasIdentity || specify('identity', encoding);\n minQuality = Math.min(minQuality, encoding.q || 1);\n }\n }\n\n if (!hasIdentity) {\n /*\n * If identity doesn't explicitly appear in the accept-encoding header,\n * it's added to the list of acceptable encoding with the lowest q\n */\n accepts[j++] = {\n encoding: 'identity',\n q: minQuality,\n i: i\n };\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "110bb272de9b4369f06f6f0a9abf729f", "score": "0.64756083", "text": "function parseAcceptEncoding(accept) {\n var accepts = accept.split(',');\n var hasIdentity = false;\n var minQuality = 1;\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var encoding = parseEncoding(accepts[i].trim(), i);\n\n if (encoding) {\n accepts[j++] = encoding;\n hasIdentity = hasIdentity || specify('identity', encoding);\n minQuality = Math.min(minQuality, encoding.q || 1);\n }\n }\n\n if (!hasIdentity) {\n /*\n * If identity doesn't explicitly appear in the accept-encoding header,\n * it's added to the list of acceptable encoding with the lowest q\n */\n accepts[j++] = {\n encoding: 'identity',\n q: minQuality,\n i: i\n };\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "110bb272de9b4369f06f6f0a9abf729f", "score": "0.64756083", "text": "function parseAcceptEncoding(accept) {\n var accepts = accept.split(',');\n var hasIdentity = false;\n var minQuality = 1;\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var encoding = parseEncoding(accepts[i].trim(), i);\n\n if (encoding) {\n accepts[j++] = encoding;\n hasIdentity = hasIdentity || specify('identity', encoding);\n minQuality = Math.min(minQuality, encoding.q || 1);\n }\n }\n\n if (!hasIdentity) {\n /*\n * If identity doesn't explicitly appear in the accept-encoding header,\n * it's added to the list of acceptable encoding with the lowest q\n */\n accepts[j++] = {\n encoding: 'identity',\n q: minQuality,\n i: i\n };\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "110bb272de9b4369f06f6f0a9abf729f", "score": "0.64756083", "text": "function parseAcceptEncoding(accept) {\n var accepts = accept.split(',');\n var hasIdentity = false;\n var minQuality = 1;\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var encoding = parseEncoding(accepts[i].trim(), i);\n\n if (encoding) {\n accepts[j++] = encoding;\n hasIdentity = hasIdentity || specify('identity', encoding);\n minQuality = Math.min(minQuality, encoding.q || 1);\n }\n }\n\n if (!hasIdentity) {\n /*\n * If identity doesn't explicitly appear in the accept-encoding header,\n * it's added to the list of acceptable encoding with the lowest q\n */\n accepts[j++] = {\n encoding: 'identity',\n q: minQuality,\n i: i\n };\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "637ddb8d82f5407dacf1fa6dc6415975", "score": "0.6435248", "text": "function parseAcceptEncoding(accept) {\n\t var accepts = accept.split(',');\n\t var hasIdentity = false;\n\t var minQuality = 1;\n\n\t for (var i = 0, j = 0; i < accepts.length; i++) {\n\t var encoding = parseEncoding(accepts[i].trim(), i);\n\n\t if (encoding) {\n\t accepts[j++] = encoding;\n\t hasIdentity = hasIdentity || specify('identity', encoding);\n\t minQuality = Math.min(minQuality, encoding.q || 1);\n\t }\n\t }\n\n\t if (!hasIdentity) {\n\t /*\n\t * If identity doesn't explicitly appear in the accept-encoding header,\n\t * it's added to the list of acceptable encoding with the lowest q\n\t */\n\t accepts[j++] = {\n\t encoding: 'identity',\n\t q: minQuality,\n\t i: i\n\t };\n\t }\n\n\t // trim accepts\n\t accepts.length = j;\n\n\t return accepts;\n\t}", "title": "" }, { "docid": "637ddb8d82f5407dacf1fa6dc6415975", "score": "0.6435248", "text": "function parseAcceptEncoding(accept) {\n\t var accepts = accept.split(',');\n\t var hasIdentity = false;\n\t var minQuality = 1;\n\n\t for (var i = 0, j = 0; i < accepts.length; i++) {\n\t var encoding = parseEncoding(accepts[i].trim(), i);\n\n\t if (encoding) {\n\t accepts[j++] = encoding;\n\t hasIdentity = hasIdentity || specify('identity', encoding);\n\t minQuality = Math.min(minQuality, encoding.q || 1);\n\t }\n\t }\n\n\t if (!hasIdentity) {\n\t /*\n\t * If identity doesn't explicitly appear in the accept-encoding header,\n\t * it's added to the list of acceptable encoding with the lowest q\n\t */\n\t accepts[j++] = {\n\t encoding: 'identity',\n\t q: minQuality,\n\t i: i\n\t };\n\t }\n\n\t // trim accepts\n\t accepts.length = j;\n\n\t return accepts;\n\t}", "title": "" }, { "docid": "637ddb8d82f5407dacf1fa6dc6415975", "score": "0.6435248", "text": "function parseAcceptEncoding(accept) {\n\t var accepts = accept.split(',');\n\t var hasIdentity = false;\n\t var minQuality = 1;\n\n\t for (var i = 0, j = 0; i < accepts.length; i++) {\n\t var encoding = parseEncoding(accepts[i].trim(), i);\n\n\t if (encoding) {\n\t accepts[j++] = encoding;\n\t hasIdentity = hasIdentity || specify('identity', encoding);\n\t minQuality = Math.min(minQuality, encoding.q || 1);\n\t }\n\t }\n\n\t if (!hasIdentity) {\n\t /*\n\t * If identity doesn't explicitly appear in the accept-encoding header,\n\t * it's added to the list of acceptable encoding with the lowest q\n\t */\n\t accepts[j++] = {\n\t encoding: 'identity',\n\t q: minQuality,\n\t i: i\n\t };\n\t }\n\n\t // trim accepts\n\t accepts.length = j;\n\n\t return accepts;\n\t}", "title": "" }, { "docid": "637ddb8d82f5407dacf1fa6dc6415975", "score": "0.6435248", "text": "function parseAcceptEncoding(accept) {\n\t var accepts = accept.split(',');\n\t var hasIdentity = false;\n\t var minQuality = 1;\n\n\t for (var i = 0, j = 0; i < accepts.length; i++) {\n\t var encoding = parseEncoding(accepts[i].trim(), i);\n\n\t if (encoding) {\n\t accepts[j++] = encoding;\n\t hasIdentity = hasIdentity || specify('identity', encoding);\n\t minQuality = Math.min(minQuality, encoding.q || 1);\n\t }\n\t }\n\n\t if (!hasIdentity) {\n\t /*\n\t * If identity doesn't explicitly appear in the accept-encoding header,\n\t * it's added to the list of acceptable encoding with the lowest q\n\t */\n\t accepts[j++] = {\n\t encoding: 'identity',\n\t q: minQuality,\n\t i: i\n\t };\n\t }\n\n\t // trim accepts\n\t accepts.length = j;\n\n\t return accepts;\n\t}", "title": "" }, { "docid": "57ca5204c453d2d08de5e7cd2b2d4efe", "score": "0.61167514", "text": "function parseAcceptCharset(accept) {\n\t var accepts = accept.split(',');\n\n\t for (var i = 0, j = 0; i < accepts.length; i++) {\n\t var charset = parseCharset(accepts[i].trim(), i);\n\n\t if (charset) {\n\t accepts[j++] = charset;\n\t }\n\t }\n\n\t // trim accepts\n\t accepts.length = j;\n\n\t return accepts;\n\t}", "title": "" }, { "docid": "57ca5204c453d2d08de5e7cd2b2d4efe", "score": "0.61167514", "text": "function parseAcceptCharset(accept) {\n\t var accepts = accept.split(',');\n\n\t for (var i = 0, j = 0; i < accepts.length; i++) {\n\t var charset = parseCharset(accepts[i].trim(), i);\n\n\t if (charset) {\n\t accepts[j++] = charset;\n\t }\n\t }\n\n\t // trim accepts\n\t accepts.length = j;\n\n\t return accepts;\n\t}", "title": "" }, { "docid": "57ca5204c453d2d08de5e7cd2b2d4efe", "score": "0.61167514", "text": "function parseAcceptCharset(accept) {\n\t var accepts = accept.split(',');\n\n\t for (var i = 0, j = 0; i < accepts.length; i++) {\n\t var charset = parseCharset(accepts[i].trim(), i);\n\n\t if (charset) {\n\t accepts[j++] = charset;\n\t }\n\t }\n\n\t // trim accepts\n\t accepts.length = j;\n\n\t return accepts;\n\t}", "title": "" }, { "docid": "57ca5204c453d2d08de5e7cd2b2d4efe", "score": "0.61167514", "text": "function parseAcceptCharset(accept) {\n\t var accepts = accept.split(',');\n\n\t for (var i = 0, j = 0; i < accepts.length; i++) {\n\t var charset = parseCharset(accepts[i].trim(), i);\n\n\t if (charset) {\n\t accepts[j++] = charset;\n\t }\n\t }\n\n\t // trim accepts\n\t accepts.length = j;\n\n\t return accepts;\n\t}", "title": "" }, { "docid": "7201584b0509ab082dfa68992807d3ef", "score": "0.61154795", "text": "function parseAcceptCharset(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var charset = parseCharset(accepts[i].trim(), i);\n\n if (charset) {\n accepts[j++] = charset;\n }\n } // trim accepts\n\n\n accepts.length = j;\n return accepts;\n}", "title": "" }, { "docid": "1b0c2c621b78b4618afb04b06a90157d", "score": "0.6080105", "text": "function parseAcceptCharset(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var charset = parseCharset(accepts[i].trim(), i);\n\n if (charset) {\n accepts[j++] = charset;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "1b0c2c621b78b4618afb04b06a90157d", "score": "0.6080105", "text": "function parseAcceptCharset(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var charset = parseCharset(accepts[i].trim(), i);\n\n if (charset) {\n accepts[j++] = charset;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "1b0c2c621b78b4618afb04b06a90157d", "score": "0.6080105", "text": "function parseAcceptCharset(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var charset = parseCharset(accepts[i].trim(), i);\n\n if (charset) {\n accepts[j++] = charset;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "1b0c2c621b78b4618afb04b06a90157d", "score": "0.6080105", "text": "function parseAcceptCharset(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var charset = parseCharset(accepts[i].trim(), i);\n\n if (charset) {\n accepts[j++] = charset;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "1b0c2c621b78b4618afb04b06a90157d", "score": "0.6080105", "text": "function parseAcceptCharset(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var charset = parseCharset(accepts[i].trim(), i);\n\n if (charset) {\n accepts[j++] = charset;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "1b0c2c621b78b4618afb04b06a90157d", "score": "0.6080105", "text": "function parseAcceptCharset(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var charset = parseCharset(accepts[i].trim(), i);\n\n if (charset) {\n accepts[j++] = charset;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "1b0c2c621b78b4618afb04b06a90157d", "score": "0.6080105", "text": "function parseAcceptCharset(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var charset = parseCharset(accepts[i].trim(), i);\n\n if (charset) {\n accepts[j++] = charset;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "1b0c2c621b78b4618afb04b06a90157d", "score": "0.6080105", "text": "function parseAcceptCharset(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var charset = parseCharset(accepts[i].trim(), i);\n\n if (charset) {\n accepts[j++] = charset;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "1b0c2c621b78b4618afb04b06a90157d", "score": "0.6080105", "text": "function parseAcceptCharset(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var charset = parseCharset(accepts[i].trim(), i);\n\n if (charset) {\n accepts[j++] = charset;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "1b0c2c621b78b4618afb04b06a90157d", "score": "0.6080105", "text": "function parseAcceptCharset(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var charset = parseCharset(accepts[i].trim(), i);\n\n if (charset) {\n accepts[j++] = charset;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "1b0c2c621b78b4618afb04b06a90157d", "score": "0.6080105", "text": "function parseAcceptCharset(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var charset = parseCharset(accepts[i].trim(), i);\n\n if (charset) {\n accepts[j++] = charset;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "1b0c2c621b78b4618afb04b06a90157d", "score": "0.6080105", "text": "function parseAcceptCharset(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var charset = parseCharset(accepts[i].trim(), i);\n\n if (charset) {\n accepts[j++] = charset;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "1b0c2c621b78b4618afb04b06a90157d", "score": "0.6080105", "text": "function parseAcceptCharset(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var charset = parseCharset(accepts[i].trim(), i);\n\n if (charset) {\n accepts[j++] = charset;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "1b0c2c621b78b4618afb04b06a90157d", "score": "0.6080105", "text": "function parseAcceptCharset(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var charset = parseCharset(accepts[i].trim(), i);\n\n if (charset) {\n accepts[j++] = charset;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "2b106b52bb86840de44ac917b4e770a2", "score": "0.5819828", "text": "function parseAcceptLanguage(accept) {\n\t var accepts = accept.split(',');\n\n\t for (var i = 0, j = 0; i < accepts.length; i++) {\n\t var langauge = parseLanguage(accepts[i].trim(), i);\n\n\t if (langauge) {\n\t accepts[j++] = langauge;\n\t }\n\t }\n\n\t // trim accepts\n\t accepts.length = j;\n\n\t return accepts;\n\t}", "title": "" }, { "docid": "2b106b52bb86840de44ac917b4e770a2", "score": "0.5819828", "text": "function parseAcceptLanguage(accept) {\n\t var accepts = accept.split(',');\n\n\t for (var i = 0, j = 0; i < accepts.length; i++) {\n\t var langauge = parseLanguage(accepts[i].trim(), i);\n\n\t if (langauge) {\n\t accepts[j++] = langauge;\n\t }\n\t }\n\n\t // trim accepts\n\t accepts.length = j;\n\n\t return accepts;\n\t}", "title": "" }, { "docid": "2b106b52bb86840de44ac917b4e770a2", "score": "0.5819828", "text": "function parseAcceptLanguage(accept) {\n\t var accepts = accept.split(',');\n\n\t for (var i = 0, j = 0; i < accepts.length; i++) {\n\t var langauge = parseLanguage(accepts[i].trim(), i);\n\n\t if (langauge) {\n\t accepts[j++] = langauge;\n\t }\n\t }\n\n\t // trim accepts\n\t accepts.length = j;\n\n\t return accepts;\n\t}", "title": "" }, { "docid": "2b106b52bb86840de44ac917b4e770a2", "score": "0.5819828", "text": "function parseAcceptLanguage(accept) {\n\t var accepts = accept.split(',');\n\n\t for (var i = 0, j = 0; i < accepts.length; i++) {\n\t var langauge = parseLanguage(accepts[i].trim(), i);\n\n\t if (langauge) {\n\t accepts[j++] = langauge;\n\t }\n\t }\n\n\t // trim accepts\n\t accepts.length = j;\n\n\t return accepts;\n\t}", "title": "" }, { "docid": "a1462e50147d14eaf3a94bd794f6527f", "score": "0.5808898", "text": "getAccept() {\n if (this.producesJSON()) {\n return \"application/json\";\n }\n if (this.produces.indexOf(\"text/plain\") !== -1) {\n return \"text/plain\";\n }\n if (this.produces.indexOf(\"text/html\") !== -1) {\n return \"text/html\";\n }\n return this.produces[0];\n }", "title": "" }, { "docid": "ceb6819e2cca96fdd2c39edb50cc5743", "score": "0.57740605", "text": "function negotiate(accept) {\n var htmlType = \"text/html\";\n var xhtmlType = \"application/xhtml+xml\";\n var accepts = accept.split(\",\");\n if (accepts.indexOf(xhtmlType) >= 0) return xhtmlType;\n else return htmlType;\n}", "title": "" }, { "docid": "5ca165ea62e4ea13d276339b0ba82e97", "score": "0.57531756", "text": "function parseAcceptLanguage(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var langauge = parseLanguage(accepts[i].trim(), i);\n\n if (langauge) {\n accepts[j++] = langauge;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "5ca165ea62e4ea13d276339b0ba82e97", "score": "0.57531756", "text": "function parseAcceptLanguage(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var langauge = parseLanguage(accepts[i].trim(), i);\n\n if (langauge) {\n accepts[j++] = langauge;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "5ca165ea62e4ea13d276339b0ba82e97", "score": "0.57531756", "text": "function parseAcceptLanguage(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var langauge = parseLanguage(accepts[i].trim(), i);\n\n if (langauge) {\n accepts[j++] = langauge;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "5ca165ea62e4ea13d276339b0ba82e97", "score": "0.57531756", "text": "function parseAcceptLanguage(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var langauge = parseLanguage(accepts[i].trim(), i);\n\n if (langauge) {\n accepts[j++] = langauge;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "5ca165ea62e4ea13d276339b0ba82e97", "score": "0.57531756", "text": "function parseAcceptLanguage(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var langauge = parseLanguage(accepts[i].trim(), i);\n\n if (langauge) {\n accepts[j++] = langauge;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "5ca165ea62e4ea13d276339b0ba82e97", "score": "0.57531756", "text": "function parseAcceptLanguage(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var langauge = parseLanguage(accepts[i].trim(), i);\n\n if (langauge) {\n accepts[j++] = langauge;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "5ca165ea62e4ea13d276339b0ba82e97", "score": "0.57531756", "text": "function parseAcceptLanguage(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var langauge = parseLanguage(accepts[i].trim(), i);\n\n if (langauge) {\n accepts[j++] = langauge;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "5ca165ea62e4ea13d276339b0ba82e97", "score": "0.57531756", "text": "function parseAcceptLanguage(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var langauge = parseLanguage(accepts[i].trim(), i);\n\n if (langauge) {\n accepts[j++] = langauge;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "5ca165ea62e4ea13d276339b0ba82e97", "score": "0.57531756", "text": "function parseAcceptLanguage(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var langauge = parseLanguage(accepts[i].trim(), i);\n\n if (langauge) {\n accepts[j++] = langauge;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "6868de8476213ebe53aab10a0386df36", "score": "0.5717102", "text": "function parseAcceptLanguage(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var language = parseLanguage(accepts[i].trim(), i);\n\n if (language) {\n accepts[j++] = language;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "6868de8476213ebe53aab10a0386df36", "score": "0.5717102", "text": "function parseAcceptLanguage(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var language = parseLanguage(accepts[i].trim(), i);\n\n if (language) {\n accepts[j++] = language;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "6868de8476213ebe53aab10a0386df36", "score": "0.5717102", "text": "function parseAcceptLanguage(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var language = parseLanguage(accepts[i].trim(), i);\n\n if (language) {\n accepts[j++] = language;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "6868de8476213ebe53aab10a0386df36", "score": "0.5717102", "text": "function parseAcceptLanguage(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var language = parseLanguage(accepts[i].trim(), i);\n\n if (language) {\n accepts[j++] = language;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "6868de8476213ebe53aab10a0386df36", "score": "0.5717102", "text": "function parseAcceptLanguage(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var language = parseLanguage(accepts[i].trim(), i);\n\n if (language) {\n accepts[j++] = language;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "4beacd0731b271930166292b5fd13429", "score": "0.57139623", "text": "function parseAcceptLanguage(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var language = parseLanguage(accepts[i].trim(), i);\n\n if (language) {\n accepts[j++] = language;\n }\n } // trim accepts\n\n\n accepts.length = j;\n return accepts;\n}", "title": "" }, { "docid": "c1e95ae7aab46ac0ad5c02cbc8ccfce4", "score": "0.5618142", "text": "function negotiate(req, res, next) {\n var accepts = req.headers.accept.split(\",\");\n if (accepts.indexOf(\"application/xhtml+xml\") >= 0) res.acceptsXHTML = true;\n next();\n}", "title": "" }, { "docid": "7ef8c8da72640b8915e8e320b55c0bf9", "score": "0.55759937", "text": "function replaceExcelAcceptHeader(req, res, next) {\n console.log('===> replaceExcelAcceptHeader' )\n console.log(req.headers.accept)\n if(req.headers.accept === 'application/atomsvc+xml,application/atom+xml') {\n req.headers.accept = 'application/json'\n }\n /*\n */\n next()\n}", "title": "" }, { "docid": "6d2c29101e85a08345935dd9f2e5ab7a", "score": "0.52876866", "text": "function fileAccepted(file, accept) {\n return file.type === 'application/x-moz-file' || __WEBPACK_IMPORTED_MODULE_0_attr_accept___default()(file, accept);\n }", "title": "" }, { "docid": "e46bc764f64a0aef684fc7e1ffbbea04", "score": "0.5278156", "text": "function parseHeader(input) {\n\t parseOptions(input, function (k, v) {\n\t switch (k) {\n\t case 'Region':\n\t // 3.3 WebVTT region metadata header syntax\n\t console.log('parse region', v);\n\t //parseRegion(v);\n\t break;\n\t }\n\t }, /:/);\n\t }", "title": "" }, { "docid": "f12312638a2ce9ec7a03946f5beb1993", "score": "0.52676827", "text": "function parseHeader(input) {\n\t parseOptions(input, function (k, v) {\n\t switch (k) {\n\t case \"Region\":\n\t // 3.3 WebVTT region metadata header syntax\n\t parseRegion(v);\n\t break;\n\t }\n\t }, /:/);\n\t }", "title": "" }, { "docid": "f12312638a2ce9ec7a03946f5beb1993", "score": "0.52676827", "text": "function parseHeader(input) {\n\t parseOptions(input, function (k, v) {\n\t switch (k) {\n\t case \"Region\":\n\t // 3.3 WebVTT region metadata header syntax\n\t parseRegion(v);\n\t break;\n\t }\n\t }, /:/);\n\t }", "title": "" }, { "docid": "f12312638a2ce9ec7a03946f5beb1993", "score": "0.52676827", "text": "function parseHeader(input) {\n\t parseOptions(input, function (k, v) {\n\t switch (k) {\n\t case \"Region\":\n\t // 3.3 WebVTT region metadata header syntax\n\t parseRegion(v);\n\t break;\n\t }\n\t }, /:/);\n\t }", "title": "" }, { "docid": "7f7975b36fea94f59ce9beca2514b2f0", "score": "0.5243778", "text": "function callHeader(media, callback){\n var id = callback;\n var url = 'http://eloquentjavascript.net/author';\n var request = new XMLHttpRequest();\n request.open(\"GET\", url, true);\n request.addEventListener(\"load\", function(){\n if(request.status < 400)\n callback(request, id);\n });\n request.setRequestHeader('Accept', media);\n request.send(null);\n }", "title": "" }, { "docid": "b6a0e9f18ab637a07094da97190256d5", "score": "0.51935107", "text": "function acceptJSON(req, res, next)\n{\n var err;\n\n if (!req.header(\"accept\") || !req.accepts(\"json\"))\n {\n err = new Error(INVALID_ACCEPT);\n res.statusCode = 406;\n return(next(err));\n }\n\n return(next());\n}", "title": "" }, { "docid": "cc636f7ac23c477219c4dcb48e501a55", "score": "0.5188106", "text": "function parseHeader(input) {\n parseOptions(input, function (k, v) {\n switch (k) {\n case \"Region\":\n // 3.3 WebVTT region metadata header syntax\n parseRegion(v);\n break;\n }\n }, /:/);\n }", "title": "" }, { "docid": "cc636f7ac23c477219c4dcb48e501a55", "score": "0.5188106", "text": "function parseHeader(input) {\n parseOptions(input, function (k, v) {\n switch (k) {\n case \"Region\":\n // 3.3 WebVTT region metadata header syntax\n parseRegion(v);\n break;\n }\n }, /:/);\n }", "title": "" }, { "docid": "a492924af1211cbede635eed82afd390", "score": "0.5172303", "text": "function fileAccepted(file, accept) {\n return file.type === 'application/x-moz-file' || __WEBPACK_IMPORTED_MODULE_0_attr_accept___default()(file, accept);\n}", "title": "" }, { "docid": "a492924af1211cbede635eed82afd390", "score": "0.5172303", "text": "function fileAccepted(file, accept) {\n return file.type === 'application/x-moz-file' || __WEBPACK_IMPORTED_MODULE_0_attr_accept___default()(file, accept);\n}", "title": "" }, { "docid": "13b64c96f85338736d300b69087d2e85", "score": "0.5141734", "text": "function getHttpAcceptPref() {\n return Application.prefs.get('network.http.accept.default').value;\n}", "title": "" }, { "docid": "e220097936372a52642cd7a1559954ec", "score": "0.5117965", "text": "function preferredMediaTypes(accept, provided) {\n\t // RFC 2616 sec 14.2: no header = */*\n\t var accepts = parseAccept(accept === undefined ? '*/*' : accept || '');\n\n\t if (!provided) {\n\t // sorted list of all types\n\t return accepts.filter(isQuality).sort(compareSpecs).map(getFullType);\n\t }\n\n\t var priorities = provided.map(function getPriority(type, index) {\n\t return getMediaTypePriority(type, accepts, index);\n\t });\n\n\t // sorted list of accepted types\n\t return priorities.filter(isQuality).sort(compareSpecs).map(function getType(priority) {\n\t return provided[priorities.indexOf(priority)];\n\t });\n\t}", "title": "" }, { "docid": "e220097936372a52642cd7a1559954ec", "score": "0.5117965", "text": "function preferredMediaTypes(accept, provided) {\n\t // RFC 2616 sec 14.2: no header = */*\n\t var accepts = parseAccept(accept === undefined ? '*/*' : accept || '');\n\n\t if (!provided) {\n\t // sorted list of all types\n\t return accepts.filter(isQuality).sort(compareSpecs).map(getFullType);\n\t }\n\n\t var priorities = provided.map(function getPriority(type, index) {\n\t return getMediaTypePriority(type, accepts, index);\n\t });\n\n\t // sorted list of accepted types\n\t return priorities.filter(isQuality).sort(compareSpecs).map(function getType(priority) {\n\t return provided[priorities.indexOf(priority)];\n\t });\n\t}", "title": "" }, { "docid": "221772d587a1355f4d641d5d914f82be", "score": "0.5115964", "text": "static headers() {\n return {\n 'Accept': 'application/json',\n 'Content-Type': 'application/json'\n }\n }", "title": "" }, { "docid": "91194976eeb80f32dbe98a813682cbd9", "score": "0.51096934", "text": "function fileAccepted(file, accept) {\n var isAcceptable = file.type === 'application/x-moz-file' || es_default()(file, accept);\n return [isAcceptable, isAcceptable ? null : getInvalidTypeRejectionErr(accept)];\n}", "title": "" }, { "docid": "f6971dbc9403805bb71298f076d6f9cd", "score": "0.509179", "text": "function preferredMediaTypes(accept, provided) {\n // RFC 2616 sec 14.2: no header = */*\n var accepts = parseAccept(accept === undefined ? '*/*' : accept || '');\n\n if (!provided) {\n // sorted list of all types\n return accepts.filter(isQuality).sort(compareSpecs).map(getFullType);\n }\n\n var priorities = provided.map(function getPriority(type, index) {\n return getMediaTypePriority(type, accepts, index);\n });\n\n // sorted list of accepted types\n return priorities.filter(isQuality).sort(compareSpecs).map(function getType(priority) {\n return provided[priorities.indexOf(priority)];\n });\n}", "title": "" }, { "docid": "f6971dbc9403805bb71298f076d6f9cd", "score": "0.509179", "text": "function preferredMediaTypes(accept, provided) {\n // RFC 2616 sec 14.2: no header = */*\n var accepts = parseAccept(accept === undefined ? '*/*' : accept || '');\n\n if (!provided) {\n // sorted list of all types\n return accepts.filter(isQuality).sort(compareSpecs).map(getFullType);\n }\n\n var priorities = provided.map(function getPriority(type, index) {\n return getMediaTypePriority(type, accepts, index);\n });\n\n // sorted list of accepted types\n return priorities.filter(isQuality).sort(compareSpecs).map(function getType(priority) {\n return provided[priorities.indexOf(priority)];\n });\n}", "title": "" }, { "docid": "056c6c3debc2b93249c97529a0d670d3", "score": "0.50660604", "text": "function preferredMediaTypes(accept, provided) {\n // RFC 2616 sec 14.2: no header = */*\n var accepts = parseAccept(accept === undefined ? '*/*' : accept || '');\n\n if (!provided) {\n // sorted list of all types\n return accepts.filter(isQuality).sort(compareSpecs).map(getFullType);\n }\n\n var priorities = provided.map(function getPriority(type, index) {\n return getMediaTypePriority(type, accepts, index);\n }); // sorted list of accepted types\n\n return priorities.filter(isQuality).sort(compareSpecs).map(function getType(priority) {\n return provided[priorities.indexOf(priority)];\n });\n}", "title": "" }, { "docid": "d549edb683d09e83c0a83b068c84a00d", "score": "0.50547844", "text": "function preferredMediaTypes(accept, provided) {\n\t // RFC 2616 sec 14.2: no header = */*\n\t var accepts = parseAccept(accept === undefined ? '*/*' : accept || '');\n\n\t if (!provided) {\n\t // sorted list of all types\n\t return accepts\n\t .filter(isQuality)\n\t .sort(compareSpecs)\n\t .map(getFullType);\n\t }\n\n\t var priorities = provided.map(function getPriority(type, index) {\n\t return getMediaTypePriority(type, accepts, index);\n\t });\n\n\t // sorted list of accepted types\n\t return priorities.filter(isQuality).sort(compareSpecs).map(function getType(priority) {\n\t return provided[priorities.indexOf(priority)];\n\t });\n\t}", "title": "" }, { "docid": "d549edb683d09e83c0a83b068c84a00d", "score": "0.50547844", "text": "function preferredMediaTypes(accept, provided) {\n\t // RFC 2616 sec 14.2: no header = */*\n\t var accepts = parseAccept(accept === undefined ? '*/*' : accept || '');\n\n\t if (!provided) {\n\t // sorted list of all types\n\t return accepts\n\t .filter(isQuality)\n\t .sort(compareSpecs)\n\t .map(getFullType);\n\t }\n\n\t var priorities = provided.map(function getPriority(type, index) {\n\t return getMediaTypePriority(type, accepts, index);\n\t });\n\n\t // sorted list of accepted types\n\t return priorities.filter(isQuality).sort(compareSpecs).map(function getType(priority) {\n\t return provided[priorities.indexOf(priority)];\n\t });\n\t}", "title": "" } ]
fc941ee7ed14d17bad6d7a9de1aa56a5
Fibonacci Recursive (This runtime is exponential 2^n)
[ { "docid": "3d04087ed7c27ed3db952b16ff6d8793", "score": "0.78416634", "text": "function fibonacci(n){\n if (n === 0){\n return 0;\n }\n if (n === 1 || n === 2){\n return 1;\n }\n\n return fibonacci(n - 1) + fibonacci(n - 2);\n}", "title": "" } ]
[ { "docid": "e63e9a16be43c08b34e881866a5647ad", "score": "0.81980413", "text": "function recursiveFibonacci(n) {\n if(n==1 || n==2){\n return 1;\n } else {\n return recursiveFibonacci(n-1) + recursiveFibonacci(n-2)\n }\n}", "title": "" }, { "docid": "8fcda79a9987ab62ac9009d142a29270", "score": "0.8176393", "text": "function fib(n){\n if(n === 1) return 0;\n if(n === 2) return 1;\n return fib(n-1)+fib(n-2);\n}", "title": "" }, { "docid": "e03ec788deea5695aa9c488f97d65a7d", "score": "0.81660837", "text": "function getFibonacci(n) {\n if (n == 1) return 0;\n if (n == 2) return 1;\n if (n > 2) return getFibonacci(n - 1) + getFibonacci(n - 2);\n}", "title": "" }, { "docid": "31497ac56c6b5545ff55956d543c8197", "score": "0.8154965", "text": "function fib(n) {\n\tif(n === 0) {\n\t\treturn 0\n\t} else if(n === 1) {\n\t\treturn 1\n\t}\n\treturn fib(n - 1) + fib(n - 2)\n}", "title": "" }, { "docid": "1db111b9a4bc0095b38b83806e0e97e4", "score": "0.81426835", "text": "function Fibonacci(n){\n if (n == 0) {\n return 0;\n }\n\n if (n == 1) {\n return 1;\n }\n else{\n return Fibonacci(n-1) + Fibonacci(n-2);\n }\n}", "title": "" }, { "docid": "f068a6b98e9682dcfdbfecaca22c1085", "score": "0.8112236", "text": "function fibonacciRecursive(n) { //O(2^n), large number of operations\n if (n < 2) {\n return n;\n }\n return fibonacci(n - 1) + fibonacci(n - 2);\n}", "title": "" }, { "docid": "8ddda31e08d26ed8fee08b48c6b6a056", "score": "0.8110373", "text": "function fibb(n) {\n function recursive(n, a, b) {\n console.log(b);\n if (n == 0) {\n return b;\n }\n return recursive(n-1, a+b, a);\n }\n return recursive(n, 1, 0);\n}", "title": "" }, { "docid": "62da67c475cb5daefc117228649ffcf0", "score": "0.8103316", "text": "function fib(num){\n let total1 = 1\n let total2 = 1\n let newtotal = 1\n function recursive(t1, t2){\n newtotal = t1 +t2\n total2 = t1\n total1 = newtotal\n }\n \n \n for (let i = 0; i < num - 2; i++){\n recursive(total1, total2)\n }\n \n return newtotal\n // add whatever parameters you deem necessary - good luck! \n }", "title": "" }, { "docid": "008603a3002497e43761f6d97b719a93", "score": "0.80993503", "text": "function fib(n){\r\n if (n <= 2) return 1;\r\n return fib(n-1) + fib(n-2)\r\n}", "title": "" }, { "docid": "916fe7767dc6aeafa8ea1f344d6ba8a2", "score": "0.8089126", "text": "function fib(n){\n if (n <=2) return 1\n return fib(n - 1) + fib(n - 2)\n}", "title": "" }, { "docid": "6b9576c512b5d6c98babad7f18210f41", "score": "0.80877835", "text": "function fib(n) {\n let a = 1;\n let b = 0;\n let temp = 0;\n\n while (n >= 0) {\n temp = a;\n a = a + b;\n b = temp;\n n--;\n }\n return b;\n}", "title": "" }, { "docid": "92185df9b2aa3bc4fd2f9b5b0587a70f", "score": "0.80794823", "text": "function fibonacci(num) {}", "title": "" }, { "docid": "e71fa075ff1a93c2af571f27576253a3", "score": "0.8067446", "text": "function fib(n) {\n if (n === 1) return 1;\n if (n === 2) return 1;\n \n return fib(n-1) + fib(n-2)\n}", "title": "" }, { "docid": "1e88e4430b11684fe4d600cc9d88782a", "score": "0.80585235", "text": "function fib(n){\n if (n <= 2) return 1;\n return fib(n-1) + fib(n-2);\n}", "title": "" }, { "docid": "1e88e4430b11684fe4d600cc9d88782a", "score": "0.80585235", "text": "function fib(n){\n if (n <= 2) return 1;\n return fib(n-1) + fib(n-2);\n}", "title": "" }, { "docid": "06d937c71ac936b611b50bbee12c76d6", "score": "0.8044306", "text": "function fib(n) {\n if (n <= 2) return 1\n return fib(n - 1) + fib(n - 2)\n}", "title": "" }, { "docid": "f86301d79045b03f6c703866b88524a8", "score": "0.8036432", "text": "function recFibonacci (n) {\n if (n < 1) {\n return 0;\n }\n if (n <= 2) {\n return 1;\n }\n else {\n return recFibonacci(n - 1) + recFibonacci(n - 2);\n }\n}", "title": "" }, { "docid": "d7edf9f179398906d44e1525d8a62cdb", "score": "0.80334026", "text": "function fib(n) {\n\tif (n <= 2) return 1;\n\treturn fib(n - 1) + fib(n - 2);\n}", "title": "" }, { "docid": "2884aee8c37c9a11e3999a23f9ff85ff", "score": "0.8026676", "text": "function fib(n) {\n\t// TODO:\n}", "title": "" }, { "docid": "20be8e9799d9cbd17b91ee301bd0f49f", "score": "0.8019743", "text": "function Fibonacci (num) {\n if(num==0){\n return 0;\n }\n else if(num==1){\n return 1;\n }\n else {\n return Fibonacci(num-1)+Fibonacci(num-2);\n }\n }", "title": "" }, { "docid": "8b87cacf974bd55a46f4fb7908b1530e", "score": "0.8017164", "text": "function fibonaci(n){\n if(n == 1){\n return 1;\n }\n if(n == 2) {\n return 1;\n }\n return fibonaci(n -1) + fibonaci(n-2);\n\n }", "title": "" }, { "docid": "b6aa147feb63003707d0813de4a33493", "score": "0.80139804", "text": "function fib(n) {\n if ( n===0 ) {\n return 0\n } else if ( n === 1 ) {\n return 1\n } else {\n return fib(n-1) + fib(n-2)\n }\n}", "title": "" }, { "docid": "5376f748ff9aa15c7625371430a8b7bf", "score": "0.8001839", "text": "function fib(n)\n{\n if (n == 0)\n {\n return 0;\n }\n else if (n == 1)\n {\n return 1;\n }\n else\n {\n return fib(n - 1) + fib(n - 2);\n }\n}", "title": "" }, { "docid": "05496c30122caa986f1c2f5ff4d257b7", "score": "0.79993695", "text": "function fib(n) {\n if (n === 0) {return 1;}\n else if (n === 1) {return 1;}\n else return fib(n - 1) + fib(n - 2);\n}", "title": "" }, { "docid": "c427ba9dffebf8c7194ae3db8650f6eb", "score": "0.7991315", "text": "function fib(n) {\n if (n <= 2) return 1;\n return fib(n - 1) + fib(n - 2);\n}", "title": "" }, { "docid": "c427ba9dffebf8c7194ae3db8650f6eb", "score": "0.7991315", "text": "function fib(n) {\n if (n <= 2) return 1;\n return fib(n - 1) + fib(n - 2);\n}", "title": "" }, { "docid": "c427ba9dffebf8c7194ae3db8650f6eb", "score": "0.7991315", "text": "function fib(n) {\n if (n <= 2) return 1;\n return fib(n - 1) + fib(n - 2);\n}", "title": "" }, { "docid": "c427ba9dffebf8c7194ae3db8650f6eb", "score": "0.7991315", "text": "function fib(n) {\n if (n <= 2) return 1;\n return fib(n - 1) + fib(n - 2);\n}", "title": "" }, { "docid": "c427ba9dffebf8c7194ae3db8650f6eb", "score": "0.7991315", "text": "function fib(n) {\n if (n <= 2) return 1;\n return fib(n - 1) + fib(n - 2);\n}", "title": "" }, { "docid": "b0678b9801544147bc04d0ee2b48830c", "score": "0.7978268", "text": "function findFiboRe(n) {\n if (n <= 1) {\n return n;\n }\n let fibo = findFiboRe(n - 1) + findFiboRe(n - 1)\n return fibo;\n //uses : console.log(findFibo(10))\n //it will be like this =0+1+1+3+5..= 512\n}", "title": "" }, { "docid": "0952cd86d76035e3673ae2fbf4c1aea5", "score": "0.79720294", "text": "function fib(n) {\n if (n <= 2) return 1;\n return fib(n - 1) + fib(n-2);\n}", "title": "" }, { "docid": "be0368327713d8ab38fba6b5c967e0f6", "score": "0.79670686", "text": "function fib(n){\n if( n == 0 || n == 1){\n return n;\n }\n return (fib(n-2) + fib(n-1));\n}", "title": "" }, { "docid": "16f57dc3e222ecc5acd22f48bee0401c", "score": "0.7963714", "text": "function recursiveFibonnacci(num) {\n if (num <= 1) return num; \n return fibonacci(num - 2) + fibonacci(num - 1);\n}", "title": "" }, { "docid": "ec8daad84e90b703d2c4bcb60bbb4629", "score": "0.79592025", "text": "function fib(n){\n\n var n1 = 0\n var n2 = 1\n var res = 0\n\n if(n == 0)\n return 0\n else if(n == 1)\n return 1\n \n for(var m=2; m <= n; m++){\n res = n1+n2\n n1 = n2\n n2 = res\n }\n return res\n\n}", "title": "" }, { "docid": "73b4a39d99dfa10170d0318f4b908b59", "score": "0.79578084", "text": "function fib(n){\n if (n==1 or n==0){\n return n;\n }\n\n return fib(n-1)+fib(n-2);\n}", "title": "" }, { "docid": "846908fc0b980331ec9b97df637de9b9", "score": "0.79545885", "text": "function fib(n){\n if(n > 1)\n return fib(n-1) + fib(n-2);\n else if(n==1)\n return 1;\n else if(n==0)\n return 0;\n else\n return 0;\n}", "title": "" }, { "docid": "daa39a38928560501947602ae2cf478e", "score": "0.79463947", "text": "function fib(n) {\n if (n === 0 || n === 1) return n;\n return fib(n - 1) + fib(n - 2);\n}", "title": "" }, { "docid": "81f7a83491739414c0320daadd478f5f", "score": "0.7940446", "text": "function fib(n) {\n if (n < 2) {\n return n;\n } else {\n return fib(n-1) + fib(n-2)\n }\n }", "title": "" }, { "docid": "7c92758a06f49615eab3879338f03d82", "score": "0.7929729", "text": "function fib(num){\n if(num === 0 || num === 1) return 1;\n \n\n return fib(num - 1) + fib(num - 2);\n}", "title": "" }, { "docid": "6efbb485914b6c1e5a52cbcaef1f373f", "score": "0.7927345", "text": "function fibonacciRecursive(n) { // O(2*n)\n if (n < 2) return n;\n return fibonacciRecursive(n-1) + fibonacciRecursive(n-2);\n}", "title": "" }, { "docid": "5ebfd27ae4393518d88517ce595494d0", "score": "0.7926325", "text": "function recursiveFibonnacci(num) {\n if (num <= 1) return num;\n return fibonacci(num - 2) + fibonacci(num - 1);\n}", "title": "" }, { "docid": "5d1df5b2680b7f95fd3cd668c8264143", "score": "0.7924437", "text": "function fib(n) {\n if (n < 2) {\n return 1;\n } else {\n return fib(n - 2) + fib(n - 1);\n }\n}", "title": "" }, { "docid": "bba9b809727f1cb44f3eb4acc4cae041", "score": "0.7908499", "text": "function fibonacci(n) {\n if (n <= 2) {\n return 1;\n }\n return fibonacci(n - 1) + fibonacci(n - 2);\n }", "title": "" }, { "docid": "2044ed9dfa27fd4ddad0af3a98376a0d", "score": "0.7906914", "text": "function fibonacci(n) {\n if (n < 2) return 1;\n else return fibonacci(n - 2) + fibonacci(n - 1);\n }", "title": "" }, { "docid": "d983880c0ee949775e3603cd929f6b5a", "score": "0.7902195", "text": "function fibonacci(n) {\n // Base case\n if (n <= 0) {\n return 0;\n }\n // Base case\n if (n <= 2) {\n return 1;\n }\t\n // Recursive case\n return fibonacci(n - 1) + fibonacci(n - 2);\t\n}", "title": "" }, { "docid": "80e5496481b1bec825facc35eb9d8e2b", "score": "0.7889661", "text": "function fib(n) {\n}", "title": "" }, { "docid": "3e2e3c241aebec7361174e276aa97d5b", "score": "0.78888035", "text": "function fibonacci(n) {\n var a = 0,\n b = 1,\n sum = 1;\n \n for (var i = 2; i <= n; i++) {\n sum = a + b;\n a = b;\n b = sum;\n}\nreturn sum;\n}", "title": "" }, { "docid": "0940ce551c7738db1d44e152416c656a", "score": "0.7879529", "text": "function fibonacci(n){\n if(n<2)\n return n\n return fibonacci(n-1)+fibonacci(n-2)\n}", "title": "" }, { "docid": "0ad19260e1d818ccfad997630aa4394d", "score": "0.7876843", "text": "function fibo(n){\n let a = 0;\n let b = 1;\n let c = 0;\n\n while (n > 0){\n c = a + b;\n a = b;\n b = c;\n n--;\n }\n return a;\n}", "title": "" }, { "docid": "4b5c62518bbfc5090fe0e48d529f611d", "score": "0.78766584", "text": "function findFibonacciNumber(num) {\r\n if (num <= 1) {\r\n return num;\r\n }\r\n return findFibonacciNumber(num - 1) + findFibonacciNumber(num - 2);\r\n}", "title": "" }, { "docid": "42daee09a7969c84a76e0e7391f5ec73", "score": "0.7873976", "text": "function recursiveFibonnaci(num){\n // your code here\n if(num == 0){\n return 0\n }\n var y = 0\n var z = 1\n var fibonnaci = 1\n for (var x = 1; x < num; x++){\n fibonnaci = y + z\n y = z\n z = fibonnaci\n }\n return fibonnaci\n}", "title": "" }, { "docid": "949b514bf725f9463933e908cb018dae", "score": "0.7869561", "text": "function fibonacci(n) {\n\n}", "title": "" }, { "docid": "c9d1e1eba6711683ef1c433d390b1ec6", "score": "0.7863714", "text": "function fibonacci(n){\r\n var prev_1 = 1;\r\n var prev_2 = 0;\r\n var fib_n = prev_1 + prev_2;\r\n if (n == 0 || n == 1){\r\n return n;\r\n }\r\n else {\r\n for (var i = 0; i < n-1; i++){\r\n fib_n = prev_1 + prev_2;\r\n prev_2 = prev_1;\r\n prev_1 = fib_n;\r\n }\r\n return fib_n\r\n }\r\n}", "title": "" }, { "docid": "abb1c02d22b1e9eba0760e781d5bfd26", "score": "0.7862404", "text": "function recursiveFibonnacci(num) {\n if (num <= 1) return num;\n return fibonacci(num - 2) + fibonacci(num - 1);\n }", "title": "" }, { "docid": "878c864802aaf1370bcb0399d0bc76a2", "score": "0.7848249", "text": "function fib(n){\n if (n <= 1) {\n return n;\n } else {\n return fib(n-2) + fib(n-1);\n }\n}", "title": "" }, { "docid": "8be6018b019808e665365acf5b2607d2", "score": "0.7843749", "text": "function fib(number) { \n if (number<2) \n {\n return number;\n } else\n {\n return fib(number-2) + fib(number-1);\n } \n}", "title": "" }, { "docid": "6f3cefafbb8e5af482edaa4d19ba9799", "score": "0.78390825", "text": "function fibonacci(n) {\n calculations++;\n if (n < 2) {\n return n;\n }\n return fibonacci(n - 1) + fibonacci(n - 2);\n}", "title": "" }, { "docid": "29c41137931bea284b3e52df2d426c9f", "score": "0.78345007", "text": "function fibonacci(n) {\n if (n < 2) return 1;\n return fibonacci(n - 1) + fibonacci(n - 2);\n}", "title": "" }, { "docid": "c280509bc6be585fb20c9a4d2f3a1dba", "score": "0.783151", "text": "function fib(num) {\n if (num === 0) return 0;\n if (num === 1 || num === 2)\n return 1;\n else\n return fib(num - 1) + fib(num - 2);\n}", "title": "" }, { "docid": "81b8738bd563c770b10a11d5367633b9", "score": "0.7827523", "text": "function fibonacci(n) {\n if(n <= 0){\n return 0;\n }\n\n if (n <= 2) {\n return 1;\n }\n return fibonacci(n - 1) + fibonacci(n - 2);\n}", "title": "" }, { "docid": "6d39d826b5c84b93be18b721e29775f1", "score": "0.7813486", "text": "function fib(num){\n if(num <= 2) return 1;\n return fib(num-1) + fib(num-2);\n}", "title": "" }, { "docid": "107ce23c21e236b8f1b68d7a03a5c123", "score": "0.7812822", "text": "function fib(n){\n if (n < 2){\n return n;\n } else{\n return n * fib(n-1);\n }\n}", "title": "" }, { "docid": "e5c37ed7df0a09512bb116fa4524eb6a", "score": "0.7811526", "text": "function Fibonacci(num, total = 0) {\n if (num === 1) {\n return 1;\n }\n if (num <= 0) {\n return 0;\n }\n return Fibonacci(num - 1) + Fibonacci(num - 2);\n}", "title": "" }, { "docid": "84355da37ca5db5d1a75723178a6055f", "score": "0.780583", "text": "function fibonacci(n) {\n if (n === 0) {\n return 0;\n } else if (n === 1 || n === 2) {\n return 1;\n }\n return fibonacci(n - 1) + fibonacci(n - 2);\n}", "title": "" }, { "docid": "ff8e677362a297e5285534f944d1a0ca", "score": "0.78057003", "text": "function fibonacci(n) {\n if (n === 1 || n === 2) return 1;\n return fibonacci(n - 1) + fibonacci(n - 2);\n}", "title": "" }, { "docid": "587ed3cb567b0103743a18a0e37213d3", "score": "0.7804248", "text": "function Fib(n) {\n if (n == 1 || n == 0) {\n return 1\n }\n return Fib(n - 1) + Fib(n - 2)\n}", "title": "" }, { "docid": "345ea5c1aba7acfaa068cc2faac1ca74", "score": "0.7803329", "text": "function fibonacci(n) {\n if (n <= 2) {return 1}\n \n let counter = n;\n let result;\n let firstPrevious = 1;\n let secondPrevious = 1;\n \n while (counter > 2) {\n result = firstPrevious + secondPrevious;\n \n secondPrevious = firstPrevious;\n firstPrevious = result;\n \n counter--;\n }\n \n return result;\n }", "title": "" }, { "docid": "51a9ee97b3f0b964a7a4d5b461ea1916", "score": "0.7795837", "text": "function recursFib(num) {\n if(num === 0)\n return 0;\n if(num === 1)\n return 1;\n return recursFib(num - 1) + recursFib(num - 2);\n}", "title": "" }, { "docid": "7770b950a1f3e32ea8608be1fb4b54fd", "score": "0.77901924", "text": "function fibonacci(n) {\n if (n <= 2) return 1;\n\n return fibonacci(n - 1) + fibonacci(n - 2);\n}", "title": "" }, { "docid": "193ce198e004ecc081e891fd213c1b57", "score": "0.77841747", "text": "function fib(num){\n // add whatever parameters you deem necessary - good luck! \n if(num===0) return 0;\n if(num===1) return 1;\n return fib(num-1)+fib(num-2);\n}", "title": "" }, { "docid": "c9df12cc84b14c4c94d102751d688cc9", "score": "0.77794015", "text": "function fibonacci(n) {\n if (n === 0) {\n return 0;\n } else if (n === 1) {\n return 1;\n } else {\n return fibonacci(n - 1) + fibonacci(n - 2);\n }\n}", "title": "" }, { "docid": "1d9bc9482187207f4837104cd0503279", "score": "0.77740455", "text": "function fibanacci(n) {\n if (n < 2) return n;\n return (fibanacci(n - 1) + fibanacci(n - 2))\n}", "title": "" }, { "docid": "2fb40de9af6af2eb4951f8fa5224a7f5", "score": "0.77707803", "text": "function fibonacci(n) {\n if (n == 0 || n == 1) return n;\n else return fibonacci(n - 1) + fibonacci(n - 2);\n}", "title": "" }, { "docid": "0bd40d7b7256841743126da387ee7523", "score": "0.77705705", "text": "function fibonacci(n) {\n // Base case\n if (n <= 0) {\n return 0;\n }\n // Base case\n if (n <= 2) {\n return 1;\n }\n // Recursive case\n return fibonacci(n - 1) + fibonacci(n - 2);\n}", "title": "" }, { "docid": "c6a5addc948bc3f274fa0a1a859e81cb", "score": "0.7768146", "text": "function btmUpFibonacci(n) {\n var idx = 1;\n var last1 = 1;\n var last2 = 1;\n while (idx <= n) {\n var f = idx <= 2 ? 1 : last1 + last2;\n last2 = last1;\n last1 = f;\n idx += 1;\n }\n return f;\n}", "title": "" }, { "docid": "a5301f29f1306711f2a6894479257e1a", "score": "0.77678347", "text": "function fibonacci(n){\n if (n === 0 || n === 1){\n return 1;\n }else{\n return fibonacci(n-1) + fibonacci(n-2)\n }\n}", "title": "" }, { "docid": "69cf1dfe53eb94b65c0cbfc2b7dbd638", "score": "0.77671516", "text": "function fibonacci(n) {\n\n if (n == 1) {\n return 1;\n }\n else if (n == 2) {\n return 1;\n }\n\n return fibonacci(n - 1) + fibonacci(n - 2);\n}", "title": "" }, { "docid": "f85d825b36b98cdbac8dc7013a7173dc", "score": "0.7766886", "text": "function fibonacci(n){\n if (n <= 1) {\n return n\n }\n return (fibonacci(n - 1) + fibonacci(n -2))\n}", "title": "" }, { "docid": "05cf534088730bff1eb7582671a7783a", "score": "0.77571493", "text": "function fibonacci(n) {\n if (n == 0 || n == 1)\n return n;\n else\n return fibonacci(n - 1) + fibonacci(n - 2);\n}", "title": "" }, { "docid": "c10792f536e2cfc414c07a5a085d0c03", "score": "0.7752901", "text": "function fib1(n) {\r\n\tlet a =0;\r\n\tlet b =1,c=0;\r\n\tif(n==1)\r\n\t\treturn 1;\r\n\tfor(let i=2;i<=n;i++){\r\n\t\tc= a+b;\r\n\t\ta=b;\r\n\t\tb=c;\r\n\t}\r\n\treturn c\r\n}", "title": "" }, { "docid": "219c0ec256195a11afb80609108399f2", "score": "0.7739813", "text": "function fibonacciRecursive(n){\n if(n == 0){\n return 0;\n }else if(n == 1){\n return 1;\n }else{\n return fibonacciRecursive(n-1) + fibonacciRecursive(n -2)\n }\n}", "title": "" }, { "docid": "1275aaf2cf3552187232d7e4ec026c17", "score": "0.7737098", "text": "function fibs(n) {\n if (n === 0) {\n return 0;\n }\n if (n === 1) {\n return 1;\n }\n return fibs(n - 1) + fibs(n - 2);\n}", "title": "" }, { "docid": "9d9fb5e3880ec17a862cba16d43e3a24", "score": "0.7735817", "text": "function fib(n) {\n\n const result = [0, 1];\n if (n === 0) {\n return 0;\n } else {\n for (var i = 2; i < n + 1; i++) {\n result.push(result[i-2] + result[i-1]);\n }\n }\nreturn result[result.length - 1];\n}", "title": "" }, { "docid": "e70bd8eb47f962ed339abc1e5e6649a3", "score": "0.7735064", "text": "function fib(i) {\n if (i < 2) return i;\n return fib(i - 2) + fib(i - 1);\n}", "title": "" }, { "docid": "e3bef0e0b24150ce9e90318c6b43f9ba", "score": "0.7728603", "text": "function fibSequence() {\n var a = 1, b = 1, sum = 0;\n\n while (a < 4000000) {\n var fib = a + b;\n \n if (fib % 2 === 0) {\n sum += fib;\n }\n b = a;\n a = fib;\n }\n\n return sum; \n}", "title": "" }, { "docid": "0ce20220bcfcb8ea0bc837b75ba66b9b", "score": "0.7723444", "text": "function findNthFibonacci(n) {\n //if index is less the 0 , function to return 0\n if (n < 0) {\n return 0;\n }\n //if index =0 or 1, first and second number to be 1\n if (n === 0 || n === 1) {\n return 1;\n }\n\n //for any other value in the sequence of fibonacci\n return findNthFibonacci(n - 1) + findNthFibonacci(n - 2);\n\n}", "title": "" }, { "docid": "a7c775c267699b5f26c4d7e34906fd88", "score": "0.7718651", "text": "function fibonacci(n) {\n if (n === 1 || n === 2) {\n return 1;\n } else {\n return fibonacci(n - 1) + fibonacci(n - 2);\n }\n}", "title": "" }, { "docid": "831649248eed1bd89bac9f6140985f94", "score": "0.7713511", "text": "function nthFibonacci(n){\n var result;\n\n function searchFib(index){\n if(index < 2){\n return index;\n } else {\n return searchFib(index-2) + searchFib(index-1);\n }\n }\n\n result = searchFib(n);\n return result;\n}", "title": "" }, { "docid": "c763498ec02de18065e31af868eeed44", "score": "0.77106816", "text": "function fibonacci (n) {\n if (n < 0) throw Error('fibonacci:n < 0')\n if (n === 0) return 0\n if (n === 1) return 1\n return 3*(fibonacci(n - 1)) + 2*(fibonacci(n - 2))\n }", "title": "" }, { "docid": "98afaf7f5e8fcd43776ecd1366e4c206", "score": "0.77094877", "text": "function fib(n) {\n\n if (n == 1 | n == 2) {\n\n return 1;\n\n } else {\n\n return fib(n-1) + fib(n-2);\n\n }\n\n}", "title": "" }, { "docid": "f1d58e2b9d64773917b3bc423cd0e05f", "score": "0.770765", "text": "function fibonacci(num) {\n if (num <= 1) return 1;\n \n return fibonacci(num - 1) + fibonacci(num - 2);\n}", "title": "" }, { "docid": "c3781f90e6224078a568b811a721e72b", "score": "0.7707027", "text": "function fib_2(n){\n if (n < 1){\n return 0\n }\n var prev = 0;\n var counter = 1;\n var current = 1;\n var temp;\n while(n-1){\n temp = current;\n current = (prev + current);\n prev = temp;\n n--;\n }\n return current\n}", "title": "" }, { "docid": "f557bb7f2b7458f3b26db83a4a95642b", "score": "0.7693246", "text": "function fibonacci(number) {\n \n var a = 0, b = 1, temp;\n while (number >= 0){\n temp = a;\n a = a + b;\n b = temp;\n number--;\n }\n return b;\n\n }", "title": "" }, { "docid": "8c4f123f7499ea155c45cd7c4b4d2a8e", "score": "0.7691019", "text": "function fib(n) {\n\t// Base case of when n is less than 2 return 1.\n\tif (n < 2){\n\t\treturn 1;\n\t} else {\n\t\t// Recurse on n - 2 and n - 1.\n\t\treturn fib(n-2) + fib(n-1);\n\t}\n}", "title": "" }, { "docid": "3f1404408fa581c583ab86b33fcdc115", "score": "0.7687659", "text": "function fib(num) {\n let a = 1;\n let b = 0;\n let temp;\n\n while( num > 0) {\n temp = a;\n a += b;\n b = temp;\n num --;\n }\n return b;\n}", "title": "" }, { "docid": "485131e690223600259d93a69713ade6", "score": "0.7681345", "text": "function fib(n) {\n // TERMINATION\n if (typeof n !== 'number' || n < 0) {\n return;\n }\n\n // BASE\n if (n <= 1) {\n return n;\n }\n\n // RECURSION\n return fib(n - 1) + fib(n - 2);\n}", "title": "" }, { "docid": "ebb5c6596de5097e0a922d32c281f58a", "score": "0.76783097", "text": "function fib_1(n) {\n if (n == 1 || n == 2)\n return 1;\n else\n return fib_1(n-1) + fib_1(n-2);\n}", "title": "" }, { "docid": "471e840069bcd203559c0b92cba752b6", "score": "0.7671884", "text": "function fibonacci(num){\n // add whatever parameters you deem necessary - good luck! \n if (num === 1 || num == 2) {\n return 1;\n }\n return fibonacci(num - 1) + fibonacci(num - 2); \n }", "title": "" }, { "docid": "2b3f1f17e33aeac6ed7168d241dcc67f", "score": "0.7669864", "text": "function fib(n) {\n return n <= 1 ? n : fib(n - 1) + fib(n - 2);\n}", "title": "" }, { "docid": "9d17d219cddc8abfe1b157e5d141fe7d", "score": "0.76671463", "text": "function TheFib(n) {\n if (n < 0) {\n return 0; // throw an error maybe?\n }\n\n if (n === 0 || n === 1) {\n return n;\n }\n\n return TheFib(n-1) + TheFib(n-2);\n}", "title": "" } ]
c40295d10211765356dc5313470b9756
URL Stringify from lecture code
[ { "docid": "36203b3115800b39200022c61fabeb94", "score": "0.0", "text": "function urlStringify(obj, i){\n\tvar str = []\n\tfor(var prop in obj){\n\t\tvar s = encodeURIComponent(prop) + '=' + encodeURIComponent(i);\n\t\tstr.push(s);\n\t}\n\treturn str.join('&');\n}", "title": "" } ]
[ { "docid": "6248c3bf6e5262497a81f7ac75675f59", "score": "0.7669644", "text": "static stringRepresentURL(url){if(typeof url==='string')return url.replace(/^(https?)?:?\\/+/,'').replace(/\\/+$/,'').trim();return''}", "title": "" }, { "docid": "63e90f538185c49c741fc14cbcb796ab", "score": "0.70154536", "text": "function URLify(str) {\n\tlet out = str.trim().split(' ').join('%20');\n\tconsole.log(out);\n}", "title": "" }, { "docid": "380877d04004df56fa0d93c4cd4ae524", "score": "0.69037986", "text": "function extractUrlFromString(str){\n\n}", "title": "" }, { "docid": "429d0fb8973377b5a1753ab04a916262", "score": "0.67965007", "text": "function urlify(string) {\n return \"https://example.com/\" + string.toLowerCase().split(/\\s+/).join(\"-\");\n}", "title": "" }, { "docid": "db8cb75e3b5e716d67ebeb4045546b98", "score": "0.6791834", "text": "function url(str) {\n// const re = new RegExp(/' '/g);\n const newStr = str.replace(/ /g, '%20');\n return newStr;\n\n}", "title": "" }, { "docid": "faf364e18cdf95532536b22d85b45446", "score": "0.67602515", "text": "function URLify(str){\n return str.replace(/ /g,\"%20\");\n}", "title": "" }, { "docid": "330512c8a0ef0b079e2bf607fad974d8", "score": "0.67208004", "text": "static stringNormalizeURL(url){if(url){url=url.replace(/^:?\\/+/,'').replace(/\\/+$/,'').trim();if(url.startsWith('http'))return url;return`http://${url}`}return''}", "title": "" }, { "docid": "86b2f391386fa25ebfdbcf38968cb392", "score": "0.67024964", "text": "function URLify(str) {\n return str.trim().split(' ').join('%20');\n}", "title": "" }, { "docid": "fe7e2fc9d436fae1dcbf3bd155d6829a", "score": "0.6673482", "text": "function fullUrlify( string ) {\n\treturn `https://example.com/${string.toLowerCase().split(/\\s+/).join(\"-\")}`;\n}", "title": "" }, { "docid": "b61908edb5fb6473dbede4e38b48946a", "score": "0.66248935", "text": "function URLify(str){ //space complexity is O(1), time is O(n)\n if(!str || str.length === 0){\n return false;\n }\n var resultingString = '';\n str = str.trim(); //remove the white spaces from the beginning and end of the string\n for(var i = 0; i < str.length; i++){ //O(n)\n if(str[i] === ' '){\n resultingString += '%20';\n }else{\n resultingString += str[i];\n }\n } //replace all spaces with %20;\n return resultingString;\n}", "title": "" }, { "docid": "85232973e87e337a615aec92803765af", "score": "0.66037697", "text": "function URLify(str) { \n if (typeof str !== 'string') {\n return false;\n }\n let spaced = str.split('');\n for (let i = spaced.length - 1; i >= 0; i--) {\n if (spaced[i] == ' ') {\n spaced[i] = '%20';\n }\n }\n return spaced.join('');\n}", "title": "" }, { "docid": "a4a72405a35ca12b211ec9786197d992", "score": "0.6586011", "text": "function URLUtils() {}", "title": "" }, { "docid": "a4a72405a35ca12b211ec9786197d992", "score": "0.6586011", "text": "function URLUtils() {}", "title": "" }, { "docid": "4ed98a1c7e6fbd5ad1848b8365d2ccfd", "score": "0.65317345", "text": "url(u) {\n\t\tif(!u) return;\n\t\tlet url = u.toString().trim().substring(1).toLowerCase();\n\t\t\t\turl = decodeURI(url).replace(/['\"]+/g, '');\n\t\t\t\turl = url.replace(/&/g, \"\\\",\\\"\").replace(/=/g,\"\\\":\\\"\");\n\t\t\t\turl = JSON.parse('{\"' + url + '\"}');\n\n\t\treturn url;\n\t}", "title": "" }, { "docid": "f7d34bc2b4faa63638e68d1831a3d200", "score": "0.652261", "text": "function urlify(string){\n let url = \"\"\n for(let i = 0; i < string.length -1; i++){\n if(string[i] === ' '){\n url += '%20';\n } else {\n url += string[i]\n }\n }\n return url;\n}", "title": "" }, { "docid": "09821ed066f2f4b93b0a403d6281f562", "score": "0.65160424", "text": "function URLify(string, length) {\n\tlet out = \"\";\n for(let i = 0; i < string.length; i++) {\n if(string[i] === ' ' && length > 0) {\n out += '%20';\n length = length - 1;\n }\n else if(length > 0) {\n out += string[i];\n length = length - 1;\n }\n }\n return out;\n}", "title": "" }, { "docid": "3ad93fd7f439eb8dc7fb594d5d442ba9", "score": "0.6502751", "text": "function urlify(str) {\n\tlet splitStr = str.split(' ');\n\treturn splitStr.join('%20');\n}", "title": "" }, { "docid": "fa8d684d9a2b145f8bfba764b8715d6e", "score": "0.64953476", "text": "function URLify(string, integer){\n let output = ''\n for (i = 0; i < integer; i++){\n if(string.split('')[i] === ' ') {\n output += '%20'\n } else {\n output += string.split('')[i];\n }\n }\n return output;\n}", "title": "" }, { "docid": "c1e33f9cfd1d3d304d91dd2b0e76d4a5", "score": "0.6483162", "text": "function urlify( string ) {\n\treturn string.toLowerCase().split(/\\s+/).join(\"-\");\n}", "title": "" }, { "docid": "b34ffd7cfd9b5064ae0038916dd49c72", "score": "0.64781713", "text": "function SafeUrl() {}", "title": "" }, { "docid": "b34ffd7cfd9b5064ae0038916dd49c72", "score": "0.64781713", "text": "function SafeUrl() {}", "title": "" }, { "docid": "7e7348474285d16095f211464e0ca2a1", "score": "0.64612883", "text": "function prepare_url(url)\n{\n\tif (!url) return '';\n\turl = url.replace('[', '%5B').replace(']', '%5D');\n\tif (url.charAt(0) == '/' && url.charAt(1) == '/') return 'http:' + url;\n\tif (url.match(/^[\\w\\d]+(\\.php|\\/|$)/i)) return './' + url;\n\tif (!url.match(/^[\\w\\d]+:/i) && !url.match(/^[.]?\\//i)) return 'http://' + url;\n\treturn url;\n}", "title": "" }, { "docid": "fe67a0d7ca6c9b230c618f186f007cb5", "score": "0.6455461", "text": "function prepareUrl(url) {\r\n\r\n url = url.substring(0, 2000);\r\n url = url.replace(/ % \\ w ? $ /, '');\r\n return url != null ? '\"' + url + '\"' : '\"\"'\r\n }", "title": "" }, { "docid": "b397c283daf082c3dc7a662d86762e33", "score": "0.64513093", "text": "function SafeUrl() { }", "title": "" }, { "docid": "b397c283daf082c3dc7a662d86762e33", "score": "0.64513093", "text": "function SafeUrl() { }", "title": "" }, { "docid": "b397c283daf082c3dc7a662d86762e33", "score": "0.64513093", "text": "function SafeUrl() { }", "title": "" }, { "docid": "8e544000f06219de83e36db9d9290f26", "score": "0.6436411", "text": "function SafeUrl(){}", "title": "" }, { "docid": "5b24264abe49f9f4dac1e4d002a6662e", "score": "0.64031065", "text": "function urify(d) {\n var splitted = (''+d).split(':');\n if(splitted.length != 2 || splitted[0] == 'http')\n return d;\n else\n return prefixes[splitted[0]] + splitted[1];\n }", "title": "" }, { "docid": "6415b73d256d064fd296f1eec770fc04", "score": "0.63993037", "text": "function urlify(str) {\n\tlet newStr = '';\n\tfor (let i = 0; i < str.length; i++) {\n\t\tif (str.charAt(i) === ' ') {\n\t\t\tnewStr += '%20';\n\t\t} else {\n\t\t\tnewStr += str.charAt(i);\n\t\t}\n\t}\n\treturn newStr;\n}", "title": "" }, { "docid": "4d8ca9160b7666e0ee5bb82084de6bc6", "score": "0.63837475", "text": "function cleanURL (u) {\n u = u.replace(/^http:/, 'https:')\n u = u.replace(/\\/\\/www\\./, '//')\n u = u.replace(/\\/$/, '')\n // hacks! for bad zhang18 expert data\n u = u.replace('?ocid=fbert', '')\n u = u.replace('/about/family', '')\n u = u.replace('/family', '')\n return u\n}", "title": "" }, { "docid": "32b0aca5fcb1c1d8226f479512d3a96a", "score": "0.63830954", "text": "function urlify(str){\n var urlifyStr = str.trim().toLowerCase();\n urlifyStr = urlifyStr.replace(/ /g,'-');\n // handle for ? & - \n return urlifyStr;\n}", "title": "" }, { "docid": "32b0aca5fcb1c1d8226f479512d3a96a", "score": "0.63830954", "text": "function urlify(str){\n var urlifyStr = str.trim().toLowerCase();\n urlifyStr = urlifyStr.replace(/ /g,'-');\n // handle for ? & - \n return urlifyStr;\n}", "title": "" }, { "docid": "8bd3372712d84e14ab53e99e70453cae", "score": "0.6378029", "text": "function URLify(string) {\n let newStringArray = [];\n let newString = '';\n for (let i = 0; i < string.length; i++) {\n if (string[i] !== ' ') {\n newStringArray[i] = string[i];\n } else {\n newStringArray[i] = '%20';\n }\n }\n\n for (let i = 0; i < newStringArray.length; i++) {\n newString += newStringArray[i];\n }\n return newString;\n}", "title": "" }, { "docid": "31c2a189fc79fbcaf8ceb26e8b7dffd0", "score": "0.63512874", "text": "function urlify(string) {\n\treturn string.toLowerCase().split(/\\s+/).join(\"-\");\n}", "title": "" }, { "docid": "d3820a1253202fe662a0d1239de0fe7f", "score": "0.6313762", "text": "function urlify(str) {\n let newStr = [];\n let finalStr = \"\";\n for (let i = 0; i < str.length; i++) {\n if (str[i] === \" \") {\n newStr[newStr.length] = \"%20\";\n } else {\n newStr[newStr.length] = str[i];\n }\n }\n for (let i = 0; i < newStr.length; i++) {\n finalStr += newStr[i];\n }\n return finalStr;\n }", "title": "" }, { "docid": "ef3f2140681bd95641d77284c54b63cb", "score": "0.63132644", "text": "function createUrl(textInput, url){\n // make input lowercase\n var textInputLower = textInput.toLowerCase();\n\n //replace all of the spaces with dashes\n var newUrl = textInputLower.replace(/ /g, \"-\");\n //combine the global url to the search query\n var finalUrl= url+newUrl;\n //return the final url to the fetch statement\n return finalUrl;\n\n}", "title": "" }, { "docid": "5ae80e54d01fafb3ac24253b18a2aa9f", "score": "0.63119256", "text": "function urlify(string) {\n return string.toLowerCase().split(/\\s+/).join('-');\n }", "title": "" }, { "docid": "227a79a34eafdd465d410ab996e864ed", "score": "0.630329", "text": "function UrlShortener() {\n /* The idea of this solution is that there 84\n * allowed symbols and each of them can be represented\n * with 7 bits. Besides, one Unicode character has 16 bits\n * length, so we can store only two allowed characters in one\n * Unicode character. \n *\n * Also, every url begins with 'https://', so we can\n * just cut it from url during encode, and add it to\n * result during decode.\n */\n this.urlAllowedChars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"+\n \"abcdefghijklmnopqrstuvwxyz\"+\n \"0123456789-_.~!*'();:@&=+$,/?#[]\";\n}", "title": "" }, { "docid": "747c4bf929365744b7d523137c390ddc", "score": "0.62888545", "text": "function urlify(name) {\n return name.toLowerCase().split(/\\s+/).join(\"-\");\n}", "title": "" }, { "docid": "57e0d000095251fdf5c3d84c65aa2b40", "score": "0.6284989", "text": "function convertirURL(url){\r\n var ID = '';\r\n url = url.replace(/(>|<)/gi,'').split(/(vi\\/|v=|\\/v\\/|youtu\\.be\\/|\\/embed\\/)/);\r\n if(url[2] !== undefined) {\r\n ID = url[2].split(/[^0-9a-z_\\-]/i);\r\n ID = ID[0];\r\n }\r\n else {\r\n ID = url;\r\n }\r\n return ID;\r\n }", "title": "" }, { "docid": "4705e3b08d20ac95b843a1fe332fbb94", "score": "0.62720096", "text": "standardizeURL(url) {\n const defaultPrefix = 'http://';\n const isHTTP = url.startsWith(\"http://\");\n const isHTTPS = url.startsWith(\"https://\");\n if (isHTTP || isHTTPS) {\n return url;\n } else {\n return defaultPrefix+url;\n }\n }", "title": "" }, { "docid": "079c26ecd961b64a5efa039880a81972", "score": "0.62495935", "text": "function urlify(string) {\n return string.toLowerCase().split(/\\s+/).join(\"-\");\n}", "title": "" }, { "docid": "079c26ecd961b64a5efa039880a81972", "score": "0.62495935", "text": "function urlify(string) {\n return string.toLowerCase().split(/\\s+/).join(\"-\");\n}", "title": "" }, { "docid": "6ebdf279131db96e9656412801209978", "score": "0.62444085", "text": "function editURL(url){\n if (url.startsWith('https://') || url.startsWith('http://')){\n return url;\n } else {\n return 'https://' + url;\n }\n}", "title": "" }, { "docid": "ed5a59d3f8ae57fc4c12986388df8b2f", "score": "0.6238254", "text": "function urlify(string) {\n return string.toLowerCase().split(/\\s+/).join(\"-\");\n}", "title": "" }, { "docid": "08cb154982cfe6ce0d46cfaef66b080f", "score": "0.623736", "text": "function buildurl(input) {\n return input ? `'${input}'`.replace(/([^:]\\/)\\/+/g, '$1') : '';\n}", "title": "" }, { "docid": "3542058c3684b6b77bc5efaea21a5e7e", "score": "0.6234686", "text": "function friendlyURL(url) {\n // TODO: probably more substitutions should be here\n return url.replace(/%3A/g, ':');\n }", "title": "" }, { "docid": "362ea6642fa7afbdd22bb736349fb635", "score": "0.6218801", "text": "function makeURLFriendly(text) {\n\t//replace all dashes ('-') with a space\n\ttext = text.replace(/-/g, ' ');\n\t//remove all characters that are neither alphanumeric nor white space (special characters)\n\ttext = text.replace(/([^\\sA-Za-z0-9]+)/g, '');\n\t//remove whitespace from the start and end of the string\n\ttext = text.replace(/^\\s+|\\s+$/g, '');\n\t//now replace all remaining groups of whitespace with '-' (a dash)\n\ttext = text.replace(/\\s+/g, '-');\n\t//make all capital letters lowercase\n\ttext = text.toLowerCase();\n\treturn text;\n}", "title": "" }, { "docid": "52191da97ac736ed3b2515a769213faa", "score": "0.6216118", "text": "function urlify(input, stringLength) {\n debugger;\n let output = '';\n\n for(var i = stringLength - 1; i >= 0; i--) {\n let currentCharacter = input[i];\n if (currentCharacter === ' ') {\n output = '%20' + output;\n } else {\n output = currentCharacter + output;\n }\n }\n\n return output;\n}", "title": "" }, { "docid": "48388f5b6796df9c46c0fe4cea071fc8", "score": "0.6174501", "text": "urlShorten(url) {\n\t\tlet name = url;\n\t\tif (url.length > 50){\n\t\t\tname = url.substr(0,33);\n\t\t\tname += \"...\";\n\t\t\tname += url.substr(-14);\n\t\t}\n\t\treturn name;\n\t}", "title": "" }, { "docid": "bf079e0ff705b77037395859256e6e83", "score": "0.6171003", "text": "function toUrl(string) {\n return (string.indexOf('//') === -1) ? ('//' + string) : string\n}", "title": "" }, { "docid": "999843c7442732971a9c951c1b907e89", "score": "0.61567265", "text": "function gup( name ){\r\n\tname = name.replace(/[\\[]/,\"\\\\\\[\").replace(/[\\]]/,\"\\\\\\]\");\r\n\tvar regexS = \"[\\\\?&]\"+name+\"=([^&#]*)\";\r\n\tvar regex = new RegExp( regexS );\r\n\tvar results = regex.exec( window.location.href );\r\n\tif( results == null )\r\n\t\treturn \"\";\r\n\telse{\r\n\t\treturn decodeURI(results[1]);\r\n\t}\r\n}", "title": "" }, { "docid": "906094d34af05b76e9a590cae933608a", "score": "0.6137774", "text": "function urlify(str) {\n let newStr = '';\n for (let i = 0; i < str.length; i++) {\n if (str[i] === ' ') {\n i++;\n newStr = newStr.concat('%20');\n }\n newStr = newStr + str[i];\n }\n\n return newStr;\n\n //return str.replace(' ', '%20');\n}", "title": "" }, { "docid": "d5120d7947a1fe9ccb94189a75187f83", "score": "0.61369056", "text": "function createContentURL() {\r\n scope.name = element.text()\r\n .trim() // Trim text due to browsers extra whitespace.\r\n .replace(/'/g, '') // Transform apostrophes words to a single one.\r\n .replace(unsafeCharRegex, '-') // Replace unsafe chars with a dash symbol.\r\n .replace(/-{2,}/g, '-') // Remove repeating dash symbols.\r\n .replace(/^-|-$/g, '') // Remove preceding or ending dashes.\r\n .toLowerCase(); // Link should be lower-case for accessible URL.\r\n }", "title": "" }, { "docid": "c73b80d995cb22af2058cecae6330c48", "score": "0.6132353", "text": "function URLify2(str) {\n let answer = \"\";\n let foundSpace = false;\n\n for(let i = 0; i < str.length; i++) {\n let currChar = str[i];\n\n if(currChar !== \" \") {\n answer = answer.concat(currChar);\n foundSpace = false;\n } else if(!foundSpace && currChar === \" \"){\n answer = answer.concat(\"%20\");\n foundSpace = true;\n }\n }\n\n return answer;\n}", "title": "" }, { "docid": "4c92170d8bbee0a331253abf80a5f06d", "score": "0.6132273", "text": "protocolForURL(s) {\n return s;\n }", "title": "" }, { "docid": "fa953b68d93f6410f327a98daa105f8c", "score": "0.61205375", "text": "function resemblesURL(str) {\n return typeof str === 'string' && (str === '' || str.charAt(0) === '/');\n }", "title": "" }, { "docid": "ba3d852ddf6335519cf27925a1ecb247", "score": "0.61146575", "text": "function urlify(string) {\n return string.replace(/\\s/g,'%20');\n}", "title": "" }, { "docid": "5f530dce262f9f9dc7adb70b16f88f0c", "score": "0.6094399", "text": "function translatedUrl(input) {\n return serverUrl+ \"?\" + \"text=\" +input;\n}", "title": "" }, { "docid": "18e950abb122665a1350be5a75cb2e93", "score": "0.6091798", "text": "function parseUrl(url,labelTitle) {\n\tvar urlPath = url.substring(0,url.lastIndexOf('/')+1);\n\tvar urlFile = url.substring(url.lastIndexOf('/')+1);\n\tencodeChars(urlFile,labelTitle+' FILE',labelTitle+'FILE');\n\tencodeChars(urlPath,labelTitle+' PATH',labelTitle+'PATH');\n}", "title": "" }, { "docid": "44b4bd68f64d49df6139432678cb4a45", "score": "0.60778004", "text": "function Url(s){\r\n if (!s) return;\r\n\r\n // While this implementation seemingly has a few more steps than using a regular expression,\r\n // fixing the regular expression result to get the port number, if any, as well as the \"context\"\r\n // (as I call it here) ended up having as many steps. Thus, for now, this implementation seems simpler.\r\n // However, I have not considered the relative performances yet.\r\n var qs, parts, host, protocol, pathinfo;\r\n s = stripDblSlashes(s);\r\n parts = s.split(\"?\");\r\n qs = parts.length > 1 ? parts[1] : null;\r\n parts = parts[0].split(\"/\");\r\n if (s.contains(\"://\")){\r\n protocol = parts[0];\r\n parts.shift();\r\n if (parts[0].trim() == \"\") parts.shift();\r\n }\r\n host = parts[0].split(\":\").toEach({ name: \"\", port: \"\"});\r\n parts.shift();\r\n $.extend(this, {\r\n protocol: protocol.replace(\":\",\"\"),\r\n hostname: host.name,\r\n port: $.notEmpty(host.port) ? $.parseInt(host.port) : null,\r\n file: $re.extension.test(parts[parts.length - 1]) ? parts.pop() : null,\r\n context: $.notEmpty(parts[0]) ? parts[0] : null,\r\n pathinfo: (pathinfo = parts.slice(1).join(\"/\")).notEmpty() ? pathinfo : null,\r\n search: qs ? \"?\" + qs : null,\r\n query: qs,\r\n current: s\r\n });\r\n }", "title": "" }, { "docid": "8da89cca89fb6f91b015ff3c5e56d02a", "score": "0.60752535", "text": "function constructURL(subtext){\n var trans=\"https://lessonfourapi.tanaypratap.repl.co/translate/yoda.json?text=\"+subtext;\n return trans;\n}", "title": "" }, { "docid": "07037b4c856c6c1cb8e3e88287cd2ac3", "score": "0.6061269", "text": "function formatUrl(url) {\n url = url.replace(/((https)|(http)):\\/\\//g, \"\");\n url = url.substr(0, url.indexOf(\"/\"));\n return url;\n}", "title": "" }, { "docid": "c4b40c92df3a5dc111ffc8e2f4391f3e", "score": "0.60322666", "text": "function resemblesURL(str) {\n return typeof str === 'string' && (str === '' || str[0] === '/');\n }", "title": "" }, { "docid": "c4b40c92df3a5dc111ffc8e2f4391f3e", "score": "0.60322666", "text": "function resemblesURL(str) {\n return typeof str === 'string' && (str === '' || str[0] === '/');\n }", "title": "" }, { "docid": "95258dc44fe84e6e35d074d4ccdcc703", "score": "0.60305774", "text": "urlShorten(url) {\n\t\tlet name = url;\n\t\tif (url.length > 50) {\n\t\t\tname = url.substr(0, 33);\n\t\t\tname += \"...\";\n\t\t\tname += url.substr(-14);\n\t\t}\n\t\treturn name;\n\t}", "title": "" }, { "docid": "1dbb4a923ea6096b0af4ca22e0095a97", "score": "0.602937", "text": "function urlify(str, len) {\n const strArr = str.trim().split('');\n return strArr\n .map((val, index) => {\n if (val === ' ') return '%20';\n else return val;\n })\n .join('');\n}", "title": "" }, { "docid": "821613a6f4d81867c6c1cf01154732a8", "score": "0.60259426", "text": "function url64 (text) {\n return text.replace(/\\+/g, '-').replace(/\\//g, '_')\n}", "title": "" }, { "docid": "83ac7ace0a463575babdc4a1d5876c70", "score": "0.6022381", "text": "function parse_url(full_url) {\n var reg_0 = /\\/[^\\/]*\\/[^\\/]*\\/[^\\/]*\\//g;//4 '/'\n var reg = /\\/[^\\/]*\\/[^\\/]*\\//g;\n var domain_name = '';\n var resource_name = full_url.substr(full_url.lastIndexOf('/') + 1);\n var start_index = full_url.indexOf('//') + 2;\n\n if (reg.test(full_url)) {\n domain_name = full_url.substring(start_index, reg.lastIndex - 1);\n } else {\n\n }\n if (resource_name.indexOf('?') !== -1) {\n resource_name = resource_name.substring(0, resource_name.indexOf('?'));\n }\n if (reg_0.test(full_url)) {\n return '~/' + resource_name;//domain_name+'/~/'+resource_name;\n } else {\n return '~/' + resource_name;//domain_name+'/'+resource_name;\n }\n}", "title": "" }, { "docid": "5f5149b0639ee214076fa91070e3f7a4", "score": "0.60180473", "text": "function getURL(){\n\t\tvar targetURL = \"/?\";\n\t\tvar location = $(\"#locationInput\").val();\n\t\tvar date = $(\"#dateInput\").val();\n\t\tvar shape = $(\"#shapeInput\").val();\n\t\tvar id = $(\"#idInput\").val();\n\n\t\tif(location){\n\t\t\tlocation = location.split(\",\");\n\t\t\tlocation = (location[0]+\", \"+location[1].trim()).toLowerCase();\n\t\t\ttargetURL = appendURL(targetURL,\"l\",location);\n\t\t}\n\n\t\tif(date){\n\t\t\tdate = date.split(\"/\");\n\t\t\tdate = (+date[0])+\"/\"+(+date[1])+\"/\"+(+date[2]);\n\t\t\ttargetURL = appendURL(targetURL,\"o\",date);\n\t\t}\n\n\t\tif(shape){\n\t\t\ttargetURL = appendURL(targetURL,\"s\",shape.toLowerCase())\n\t\t}\n\n\t\tif(id){\n\t\t\ttargetURL = appendURL(targetURL,\"i\",id);\n\t\t}\n\n\t\treturn encodeURI(targetURL);\n\t}", "title": "" }, { "docid": "587373451048762eea90780e6cc63303", "score": "0.6008496", "text": "function _canchePath( url ){\n \n return url.replace( rePath, \"https://\" );\n \n }", "title": "" }, { "docid": "2281be26be32a3d32bc2d1904e7b8c2f", "score": "0.5996176", "text": "function urlify(title) {\n const punctuation = /[.,/#!$^&%*+@;:{}=\\-_`´~'\"|]/g;\n let titleWithoutPunctuation = title.replace(punctuation, \"\");\n return titleWithoutPunctuation.toLowerCase().trim().replaceAll(\" \", \"-\");\n}", "title": "" }, { "docid": "c3e01210399e2f8e289f549d030acf16", "score": "0.59936595", "text": "_checkUrl(subject)\n {\n let parsed = url.parse(subject);\n\n if(\n parsed.protocol != 'http:' &&\n parsed.protocol != 'https:'\n ) {\n return false;\n }\n\n // Removing any white spaces from pathname\n parsed.pathname = querystring.unescape(parsed.pathname);\n parsed.pathname = parsed.pathname.split('/').map(\n part => querystring.escape(part)\n ).join('/');\n\n // Process querystring\n if(parsed.search && parsed.search.length > 1) {\n parsed.search = querystring.encode(\n querystring.decode(parsed.search.substring(1))\n );\n }\n\n if(parsed.hostname.match(/^[0-9a-zA-Z]+$/)) {\n return false;\n }\n\n // We don't want a hash. lol.\n parsed.hash = '';\n\n return url.format(parsed);\n }", "title": "" }, { "docid": "2e64eb4049704b67e40391715aa4710b", "score": "0.5990828", "text": "function shorturl(url){\n var nohttpmach = new RegExp(\"^(https?://[^/]+)?(.*)$\");\n var noneedexpert = new RegExp(\"^(/expert/[^/])\");\n var myurl;\n myurl=url.match (nohttpmach)[2];\n if(myurl.match (noneedexpert)){\n\tmyurl=myurl.substr(7);\n }\n return myurl;\n}", "title": "" }, { "docid": "594477c3f51558ebc842ed4c7534c076", "score": "0.5975591", "text": "function formatQueryUrl(url){\r\n if (url.substring(0, 4).toLowerCase() === '/api') {\r\n url = url.replace(/\\/api/gi, '');\r\n }\r\n\r\n if (url.substring(0, 3).toLowerCase() === 'api') {\r\n url = url.replace(/api/gi, '');\r\n }\r\n\r\n if (url.charAt(0) !== '/') {\r\n url = '/' + url;\r\n }\r\n\r\n return url;\r\n }", "title": "" }, { "docid": "20fcff2cd7095d4481deca940f028906", "score": "0.596521", "text": "url(...args){\n const string = args.join(' ') + ` #100DaysOfCode`;\n const urlStart = \"https://twitter.com/search?f=tweets&vertical=default&q=\"\n const url = encodeURI(string).replace(/[(]/g, '%28').replace(/[)]/g, '%29').replace(/[#]/g, '%23').replace(/[:]/g, '%3A')\n return urlStart + url;\n }", "title": "" }, { "docid": "f7953bb909aab8296ffdbda25cbfb9a6", "score": "0.5964259", "text": "function encodeUri(mangaUrl) {\n\tvar path = url.parse(mangaUrl).pathname.substr(1);\n\tif (path.indexOf('/') != -1) //old style url ex: http://www.mangareader.net/94/bleach.html\n\t\treturn path.substr(0, path.indexOf('.')).replace('/', '.');\n\telse //new style url ex: http://www.mangareader.net/bloody-monday-last-season\n\t\treturn path;\n}", "title": "" }, { "docid": "b3634b9f4c2fe8d4008fe64033cdb3d0", "score": "0.5960187", "text": "function generatePrettyUrl(url) {\n\turl = url.replace(/^(?:https?:\\/\\/)?(?:www\\.)?/i, '');\n\t// Remove / and # from url if last characters\n\tif (url.substring(url.length - 1) === '/' || url.substring(url.length - 1) === '#') {\n\t\turl = url.substring(0, url.length - 1);\n\t}\n\treturn url;\n}", "title": "" }, { "docid": "924e186eb99663e44af3505a67ef0ee3", "score": "0.5955538", "text": "function convertStringUrl(title) {\n var newTitle = title.toLowerCase().trim().split(\" \");\n // console.log(newTitle);\n var newerTitle = newTitle.filter((i) => i.length > 0).join(\"-\");\n console.log(newerTitle);\n return newerTitle;\n}", "title": "" }, { "docid": "53037bb455cd76ebe59e0d9cbb402b71", "score": "0.59544545", "text": "function SafeResourceUrl(){}", "title": "" }, { "docid": "83c2168deb102254995b70ba3e0dd3bb", "score": "0.59544194", "text": "function fixUpOnURLetc(onURL) {\n var val;\n\n val = onURL.length ? onURL.replace(/&amp;/g, '&') : null;\n\n // get rid of question mark in rrr val\n val = val !== null ? val.replace(/\\/\\?/g, '') : null;\n val = val !== null ? val.replace(/\\?/g, '') : null;\n return val;\n}", "title": "" }, { "docid": "b21330278ea531798877c435729c0e94", "score": "0.59542304", "text": "function SafeResourceUrl() {}", "title": "" }, { "docid": "b21330278ea531798877c435729c0e94", "score": "0.59542304", "text": "function SafeResourceUrl() {}", "title": "" }, { "docid": "c5923c45123f986e9408d64bb955e861", "score": "0.59524167", "text": "static decodeURL(url) {\n let key;\n if (url.indexOf('#') >= 0) {\n key = url.indexOf('?') >= 0 ? url.substring(url.indexOf('#'), url.indexOf('?')) : url.substring(url.indexOf('#'));\n } else {\n window.location.href = \"initialtask.com#department_list\";\n }\n return key;\n }", "title": "" }, { "docid": "2cf45cc841c7110ce086bcf70770d125", "score": "0.5951434", "text": "function correctUrl(url) {\n url = url.split('/'); // Url does start with http\n\n if (url[0] === 'http:' || url[0] === 'https:') {\n // is invalid for injections, but do nothing\n return url.join('/');\n } // first item is empty, means there already is a leading slash\n\n\n if (url[0] === '') {\n url.shift();\n } // Url does not start with / or http\n\n\n return '/' + url.join('/');\n }", "title": "" }, { "docid": "40848ba7d6e62d890fc2896bbf58695f", "score": "0.59512573", "text": "function urlify(STR) {\n let str_arr = STR.split('');\n let arr = '';\n for(let i = 0; i < str_arr.length; i++) {\n if (str_arr[i] === ' '){\n str_arr[i] = '%20%'\n arr = str_arr.join('');\n }\n }\n return arr\n}", "title": "" }, { "docid": "480b4de6128ee98b5c5bd45ebac06817", "score": "0.5936872", "text": "getUrl(name) { return \"\"; }", "title": "" }, { "docid": "8abe8e27832c8fe77d7c784f720ddef0", "score": "0.5922655", "text": "rw(url) {\n if (!url.match(/^(?:http|mailto|file|\\/|#).*$/)) {\n return this.base + url;\n } else {\n return url;\n }\n }", "title": "" }, { "docid": "4329534c74a961932dffeda454c316e3", "score": "0.59222394", "text": "function encodeUriSegment(val){return encodeUriQuery(val,true).replace(/%26/gi,'&').replace(/%3D/gi,'=').replace(/%2B/gi,'+');}", "title": "" }, { "docid": "8ae693f4e3008f3f9cd6e91d05cbc106", "score": "0.59099054", "text": "function RegExURLify(str) {\n return str.trim().replace(/[\\s]+/gi, '%20');\n}", "title": "" }, { "docid": "b9e28dd294658ea06eb5c872c9971ed0", "score": "0.5909136", "text": "function createUrl(){\r\n let origin = location.origin;\r\n let host = location.host;\r\n let pathname = location.pathname.split(\"/\")[1];\r\n let cont = origin + \"/\" + pathname;\r\n return cont;\r\n }", "title": "" }, { "docid": "bc2c5a8b71d94cd22df271fb0de1d9e5", "score": "0.59075445", "text": "function UrlShortener() {\n this.urlAllowedChars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"+\n \"abcdefghijklmnopqrstuvwxyz\"+\n \"0123456789-_.~!*'();:@&=+$,/?#[]\";\n}", "title": "" }, { "docid": "d4330742d7024d02a70c50bf574e96c8", "score": "0.590369", "text": "function encode(url){\r\nvar encoded=escape(url);\r\nreturn encoded;\r\n}", "title": "" }, { "docid": "fdab2508b9dae3fb65afcd158ed6ba86", "score": "0.5901107", "text": "static stringEncodeURIComponent(url,encodeSpaces){return encodeURIComponent(url).replace(/%40/gi,'@').replace(/%3A/gi,':').replace(/%24/g,'$').replace(/%2C/gi,',').replace(/%20/g,encodeSpaces?'%20':'+')}", "title": "" }, { "docid": "1e19f4b5e484e587cc1bf2ac54ecbffc", "score": "0.5893179", "text": "updateUrlString(uri, key, value) {\n const re = new RegExp(`([?&])${key}=.*?(&|$)`, 'i');\n const separator = uri.indexOf('?') !== -1 ? '&' : '?';\n if (uri.match(re)) {\n return uri.replace(re, `$1${key}=${value}$2`);\n }\n return `${uri + separator + key}=${value}`;\n }", "title": "" }, { "docid": "95fddb72819da0f8115e85ce036cb48a", "score": "0.58931786", "text": "function Url(){this.protocol=null;this.slashes=null;this.auth=null;this.port=null;this.hostname=null;this.hash=null;this.search=null;this.pathname=null;}// Reference: RFC 3986, RFC 1808, RFC 2396", "title": "" }, { "docid": "a092224f8295d2494efe0ab6309e8ee1", "score": "0.5891027", "text": "function main() {\n const rUrl = new URL(\n \"http://user_name:[email protected]/first/second/last?query=ab&param=12\"\n );\n\n console.log(rUrl.host);\n console.log(rUrl.lastPathComponent);\n console.log(rUrl.pathComponents);\n console.log(rUrl.port);\n console.log(rUrl.query);\n console.log(rUrl.scheme);\n console.log(rUrl.isFileUrl);\n console.log(rUrl.user);\n console.log(rUrl.password);\n console.log(rUrl.absoluteString);\n\n // rUrl.appendPathComponent(\"hello\");\n\n // var zumurl = new URL(\"<http://[email protected]/#!/home?query=zum>\");\n\n // var naverurl = new URL(\"<http://m.naver.com>\");\n // console.log(zumurl.isEqual(naverurl));\n\n // var url1 = new URL(\"<http://[email protected]/#!/home?query=zum>\");\n // console.log(zumurl.isEqual(url1));\n\n // var url2 = new URL(\"<http://[email protected]/#!/home>\");\n // console.log(zumurl.isEqual(url2));\n\n // var url3 = new URL(\"<http://[email protected]/?param=zum>\");\n // console.log(zumurl.isEqual(url3));\n\n // var url4 = new URL(\"<http://zum.com/#!/home>\");\n // console.log(zumurl.isEqual(url4));\n}", "title": "" }, { "docid": "c61a3575953548b4c48008baf4a4f580", "score": "0.58882046", "text": "function shortUrl() {\n // Here is the AlphaNumeric String\n var alphaNumeric = 'ABCDEEFGHIJKLMNOPQRSTUVWXYZabcdeefghijklmnopqrstuvwxyz1234567890';\n var urlLength = 6;\n\n let genURL = '';\n\n for (let i = 0; i < urlLength; i += 1) {\n var rand = Math.round(Math.random() * alphaNumeric.length - 1);\n genURL += alphaNumeric.charAt(rand);\n }\n\n\n return genURL;\n}", "title": "" }, { "docid": "058423a6d9e39e8ddffb5e81cb155cd0", "score": "0.5880848", "text": "updateURL() {\n\t\t// convert main inputs to binary\n\t\tlet encodedW = (+BOARD.width).toString(2).padStart(12, '0');\n\t\tlet encodedH = (+BOARD.height).toString(2).padStart(12, '0');\n\t\tlet encodedS = (+BOARD.squareSize).toString(2).padStart(12, '0');\n\t\t// convert to b64\n\t\tlet encodedMain = this.encodeOne(encodedH.substring(0, 6)) \n\t\t\t+ this.encodeOne(encodedH.substring(6, 12))\n\t\t\t+ this.encodeOne(encodedW.substring(0, 6)) \n\t\t\t+ this.encodeOne(encodedW.substring(6, 12))\n\t\t\t+ this.encodeOne(encodedS.substring(0, 6)) \n\t\t\t+ this.encodeOne(encodedS.substring(6, 12));\n\n\t\tconst newURL = window.location.href.split('?')[0] \n\t\t\t+ '?r=' + UI.encodeRules()\n\t\t\t+ '&a=' + UI.encodeAnts()\n\t\t\t+ '&m=' + encodedMain\n\t\t\t+ ((BOARD.wrap) ? '&p=' : '');\n $('#url-text').html(newURL);\n \n this.updateHaskell();\n\n\t\treturn newURL;\n\t}", "title": "" }, { "docid": "4a2498864f0c819c9e5e7696e251e7ed", "score": "0.5880619", "text": "parseUrl (id) {\n var x = this.endpoint + '/' + id\n return x\n }", "title": "" }, { "docid": "b8aab53ea891daf9c284cee4070a9931", "score": "0.58744264", "text": "function URLencode(inputString) {\n var encodedInputString=escape(inputString);\n encodedInputString=encodedInputString.replace(\"+\", \"%2B\");\n encodedInputString=encodedInputString.replace(\"/\", \"%2F\"); \n encodedInputString=encodedInputString.replace(\"%20\", \"+\"); \n return encodedInputString;\n\t} // end function URLencode", "title": "" } ]
570a5d0b0b3528980ec092f157de5870
showing the tooltip of information for the graphs when user hovers mouse over a point on the graph.
[ { "docid": "579aa653ca4c9c5976c2fc226404f0e6", "score": "0.67423373", "text": "function setOnHoverForGraph(id,tableId,label,equakeType) {\r\n\r\n var previousPoint = null;\r\n\r\n $(\"[id='\" + id + \"Graph\" + tableId + \"']\").bind('plothover',function(event,pos,item){\r\n if(item){\r\n if(previousPoint != item.dataIndex){\r\n previousPoint = item.dataIndex;\r\n $(\"#tooltip\").remove();\r\n var x = new Date(item.datapoint[0]);\r\n var currentTime = item.datapoint[0];\r\n var index = 0;\r\n x = x.getUTCDate() + \"/\" + (x.getUTCMonth() + 1) + \"/\" + x.getUTCFullYear() + \" \" + x.getUTCHours() + \":\" + x.getUTCMinutes() + \":\" + x.getUTCSeconds();\r\n var content = \"Time: \" + x + \" UTC\";\r\n var id = this.id;\r\n index = id.indexOf(\"Graph\");\r\n id = id.substr(0,index);\r\n for(index in graphs){\r\n if(tableId){\r\n var j = index.length;\r\n j = parseInt(index.substring(j-1,j));\r\n if(j != tableId){\r\n continue;\r\n }\r\n }\r\n graphs[index].unhighlight();\r\n }\r\n for(index in graphs){\r\n if(tableId){\r\n var j = index.length;\r\n j = parseInt(index.substring(j-1,j));\r\n if(j != tableId){\r\n continue;\r\n }\r\n }\r\n var data = graphs[index].getData();\r\n data = data[0].data;\r\n var currentIndex = -1;\r\n if(index == id){\r\n graphs[index].highlight(0,item.dataIndex);\r\n currentIndex = item.dataIndex;\r\n }\r\n else{\r\n // searching for the value at the position x of\r\n // graphs[index] using binary search\r\n var start = 0, end = data.length - 1;\r\n var mid = Math.floor((start + end) / 2);\r\n if(currentTime < data[end][0] || currentTime > data[start][0]){\r\n end = start - 1;\r\n currentIndex = -1;\r\n }\r\n while(start <= end){\r\n if(currentTime == data[mid][0]){\r\n graphs[index].highlight(0,mid);\r\n currentIndex = mid;\r\n break;\r\n }else{\r\n if(currentTime > data[mid][0]){\r\n end = mid - 1;\r\n }else{\r\n start = mid + 1;\r\n }\r\n }\r\n mid = Math.floor((start + end) / 2);\r\n if(end < start){\r\n currentIndex = -1;\r\n }\r\n }\r\n }\r\n if(currentIndex > 0){\r\n var m = side(index);\r\n index = index.substring(0,index.length-1);\r\n\r\n //var k = document.getElementById(index + 'Row' + m).getElementsByTagName('td')[0];\r\n // the text of the graph is the second child node of the row\r\n content += \"<br/>\" + label + \": \" + data[currentIndex][1];\r\n if(equakeType) {\r\n content += \"<br/>\" + \"Earthquake type: \" + equakeType;\r\n }\r\n }\r\n }\r\n Wovodat.showTooltip(pos.pageX, pos.pageY,content);\r\n }\r\n }else{\r\n for(index in graphs){\r\n if(tableId){\r\n var j = index.length;\r\n j = parseInt(index.substring(j-1,j));\r\n if(j != tableId){\r\n continue;\r\n }\r\n }\r\n graphs[index].unhighlight();\r\n }\r\n $(\"#tooltip\").remove();\r\n previousPoint = null;\r\n }\r\n });\r\n}", "title": "" } ]
[ { "docid": "e2fc93998f9ba89782d273cff31d72d1", "score": "0.7788339", "text": "function showTooltip() {}", "title": "" }, { "docid": "dba98c7fb8ffc8ca3beafedd6b49d69b", "score": "0.77166593", "text": "function tipMouseover(clientX, clientY, d) {\n var html = \"<span > Manufacturer: \" + manu(d) + \"</span><br/>\" +\n \"<b>\" + d.Weight + \"</b> KG, <b/>\" + d.MPG + \"</b> MPG\";\n\n tooltip.html(html)\n .style('font-family','serif')\n .style(\"left\", (clientX + 15) + \"px\")\n .style(\"top\", (clientY - 28) + \"px\")\n .transition()\n .duration(200) // ms\n .style(\"opacity\", .9)\n\n }", "title": "" }, { "docid": "0e39061db6c6402b95d5ed5d7f7bbc31", "score": "0.7597207", "text": "function mouseover(d) {\n\t \ttooltip.style(\"display\", \"inline\");\n\t}", "title": "" }, { "docid": "8af6830223aab7b46243f37e9487a105", "score": "0.7431993", "text": "function ApexTooltip() { }", "title": "" }, { "docid": "8af6830223aab7b46243f37e9487a105", "score": "0.7431993", "text": "function ApexTooltip() { }", "title": "" }, { "docid": "9036f3d0bf3346184be658ce33cc32fb", "score": "0.73722494", "text": "function ApexTooltip() {}", "title": "" }, { "docid": "151685bde9801641fc9e78222ca768c7", "score": "0.7355667", "text": "function synchronizedMouseOver(d) {\n tip.show(d);\n }", "title": "" }, { "docid": "064915d560f8bace2acdca3dbee712c2", "score": "0.7348607", "text": "function mouseoverHandler (d) {\n tooltip.transition().style('opacity', .9)\n tooltip.html('<p>' + d[\"country\"] + '</p>' );\n }", "title": "" }, { "docid": "a778414f13a7bb0199512887bce619a1", "score": "0.7313053", "text": "_onmouseover() {\n if (this.showTooltip) {\n this._tooltipVisibility = SliderBase_1.TOOLTIP_VISIBILITY.VISIBLE;\n }\n }", "title": "" }, { "docid": "0b128f2f260a127d68fff22bcffac7a8", "score": "0.730713", "text": "function tooltipOn(d) {\r\n d3.event.preventDefault();\r\n tooltip\r\n .style(\"left\", `${d3.event.x}px`)\r\n .style(\"top\", `${d3.event.y - 40}px`) // positions tip above hover point\r\n .style(\"opacity\", \"0.95\")\r\n .html(`<p>${d.country}</p>`); // country name\r\n }", "title": "" }, { "docid": "e360e695efab3483f25cda18b2a5de50", "score": "0.7215854", "text": "function showTempTooltip(d){\n tempToolTipDiv.transition() \n .duration(200) \n .style(\"opacity\", .9); \n tempToolTipDiv.html('')\n tempToolTipDiv.append(\"p\").text(d.Name);\n tempToolTipDiv.append(\"p\").text(\"avg. high: \" + d.avgMaxTemp_F)\n tempToolTipDiv.append(\"p\").text(\"avg. low: \" + d.avgMinTemp_F)\n tempToolTipDiv\n .style(\"left\", (d3.event.pageX) + \"px\") \n .style(\"top\", (d3.event.pageY - 28) + \"px\"); \n}", "title": "" }, { "docid": "a0b3dcc30e7a1570fbcdff0f1bdcc0ad", "score": "0.7212075", "text": "function showTooltip(d) {\n tooltip.transition()\n .duration(200)\n .style('opacity', .9); // makes it visible\n tooltip.html('<p>' + d['Area name'] + '</p>') // shows the state\n .style('left', (d3.event.pageX) + 'px')\n .style('top', (d3.event.pageY - 28) + 'px');\n}", "title": "" }, { "docid": "a1da8d93a55b341c95bf65c6aca871c4", "score": "0.7173577", "text": "function setShowTooltipOnMouseover(m) {\r\n\tGEvent.addListener(m,\"mouseover\", function() {\r\n\t showTooltip(m);\r\n\t}); \r\n\tGEvent.addListener(m,\"mouseout\", function() {\r\n\t\thideTooltip();\r\n\t}); \r\n}", "title": "" }, { "docid": "40f476252352a00a44aa7821034602ca", "score": "0.7164647", "text": "function addTooltipOnMouseover(e, mi) {\r\n\te.setAttribute(\"onmouseover\",\"showTooltip(gMarkers['\"+mi+\"'])\");\r\n\te.setAttribute(\"onmouseout\",\"hideTooltip()\");\r\n}", "title": "" }, { "docid": "9b22d5867c06b91f045810880529e9b0", "score": "0.71588016", "text": "function showTooltip(d,details,offsetX,offsetY) {\n\t\t//console.log(\"on mouse over: \"+d3.event.pageX+\" \"+d3.event.pageY);\n\t\tdiv.transition() \n\t\t .duration(200) \n\t\t .style(\"opacity\", .9); \n\t\tdiv.html(d.name) \n\t\t .style(\"left\", (d3.event.pageX+offsetX) + \"px\") \n\t\t .style(\"top\", (d3.event.pageY+offsetY ) + \"px\"); \n\t \n\t}", "title": "" }, { "docid": "2ffa662d1c0df0dfc031bfe42ebbc0ff", "score": "0.71361256", "text": "function showTooltip(content, event) {\n tt.style('opacity', 1.0)\n .style('pointer-events', 'all')\n .html(content);\n\n updatePosition(event);\n }", "title": "" }, { "docid": "83d69d067429d4eebc0dae4d9e901663", "score": "0.71300894", "text": "function showTooltip(content, event) {\n tt.style('opacity', 1.0)\n .html(content);\n \n updatePosition(event);\n }", "title": "" }, { "docid": "68a158f354785ef2d1a7343e963c5bcb", "score": "0.71096396", "text": "function showtip(current, e, text) {\n\tif (!document.layers) {\n\t\tthetitle = text.split('<br>');\n\t\tif (thetitle.length > 1) {\n\t\t\tthetitles = \"\";\n\t\t\tfor (i = 0; i < thetitle.length; i++){\n\t\t\t\tthetitles += thetitle[i] + \"\\r\\n\";\n\t\t\t}\n\t\t\tcurrent.title = thetitles;\n\t\t} else {\n\t\t\tcurrent.title = text;\n\t\t}\n\t} else {\n\t\tdocument.tooltip.document.write(\n\t\t\t\t\t\t'<layer bgColor=\"#FFFFE7\" style=\"border:1px ' +\n\t\t\t\t\t\t'solid black; font-size:12px;color:#000000;\">' + text + '</layer>');\n\t\tdocument.tooltip.document.close();\n\t\tdocument.tooltip.left = e.pageX + 5;\n\t\tdocument.tooltip.top = e.pageY + 5;\n\t\tdocument.tooltip.visibility = \"show\";\n\t}\n}", "title": "" }, { "docid": "37688aa04f18d53e1a79688c186388fe", "score": "0.7091149", "text": "function displayTooltip(event, data, id) {\n const tooltip = d3.select(id);\n const ttWidth = $(id).outerWidth();\n\n // populating the tooltip info with data from the point hovered over\n tooltip.select('.tt-season').text(data.season);\n tooltip.select('.tt-opponent').text(data.opp);\n tooltip.select('.tt-week').text(data.week);\n tooltip.select('.tt-quarter').text(data.quarter);\n tooltip.select('.tt-time').text(data.time);\n tooltip.select('.tt-detail').text(data.detail);\n\n // use the clientX position in relation to the window width to position the\n // tooltip to the left or right of the point hovered over.\n const w = $(window).width();\n let xPos = 0;\n if (event.clientX > w / 2.1) {\n xPos = event.clientX - (ttWidth - 10);\n tooltip.attr('class', 'tooltip');\n } else {\n xPos = event.clientX - 10;\n tooltip.attr('class', 'tooltip');\n }\n\n const yPos = event.clientY + 15;\n\n tooltip.attr('style', `left: ${xPos}px; top: ${yPos}px`);\n }", "title": "" }, { "docid": "d5230c8fa54cc01b97e26ff4c789a648", "score": "0.7087163", "text": "function showTooltip (d) {\n\t $(this).popover({\n\t\tplacement: 'auto top',\n\t\tcontainer: '#chart',\n\t\ttrigger: 'manual',\n\t\thtml : true,\n\t\tcontent: function() { \n\t\t return \"<p class='nodeTooltip'>\" + d.name + \"</p>\"; }\n\t });\n\t $(this).popover('show')\n\t}", "title": "" }, { "docid": "252de1aeb6f97c24f9005e3cb96000ec", "score": "0.708659", "text": "function tooltip_mouseover(cell_value) {\n tooltip_div.transition()\n .duration(100)\n .style(\"opacity\", 1) \n .text(cell_value)\n .style(\"left\", (d3.event.pageX - 20) + \"px\")\n .style(\"top\", (d3.event.pageY + 20) + \"px\");\n}", "title": "" }, { "docid": "aeb94ebbe285495536b449958cec1af5", "score": "0.707333", "text": "function showTooltip(d) {\n moveTooltip();\nconsole.log('here');\n tooltip.style(\"display\",\"block\")\n .html(d.value.properties[\"Name\"]+\"<br/>\"+\n \"Age: \"+d.value.properties[\"Age\"]+\"<br/>\");\n \n highlightThumb(Math.floor(Math.random() * 60));\n}", "title": "" }, { "docid": "27ddf3e7edf089120d448fc1a2c333e0", "score": "0.70725954", "text": "function showTooltip(e, d, tooltip, tooltipText) {\n // Display tooltip and set to mouse location\n tooltip\n .style(\"left\", e.clientX + \"px\")\n .style(\"top\", (e.clientY - tooltip.style(\"height\").replace(\"px\", \"\")) + \"px\")\n .transition()\n .duration(50)\n .style(\"opacity\", 0.95);\n\n // Add information to tooltip\n tooltip.html(tooltipText);\n}", "title": "" }, { "docid": "0eef3de3e69622a2ac1c658a2bed4e95", "score": "0.7064373", "text": "function verticesTooltipShow(d) \n {\n \n\n vis.verticesTooltip.style(\"opacity\", 0.9) .style(\"position\", \"absolute\")\t\n .html(\"<strong>Value</strong>: \" + d + \"<br />\" +\n \"<strong>Description</strong>: \" + d + \"<br />\")\n .style(\"left\", (d3.event.pageX) + \"px\")\n .style(\"top\", (d3.event.pageY) + \"px\");\n }", "title": "" }, { "docid": "abc001773698c793fcd73562d0d016f7", "score": "0.70526576", "text": "function cirmouseoverFunc(d) {\n // Adding a subtle animation to increase the dot size when over it!\n d3.select(this)\n .transition()\n .duration(50)\n .style(\"opacity\", 1)\n .attr(\"r\", dotRadius+2);\n d3tooltip\n .style(\"display\", null) // this removes the display none setting from it\n .html(\"<p>\" + d.values[0].description +\n// \"<br>Play: \" + d.values[0].play_id +\n// \"<br> Yardplot: \"+d.values[0].yardplot +\n// \"<br>Team: \" + d.values[0].pos_team+ \n \"</p>\");\n \n }", "title": "" }, { "docid": "721f5b63291745eaa4cf0662d119ad22", "score": "0.70422626", "text": "show() {\r\n const {left, top, width, height} = this.node.getBoundingClientRect();\r\n Reflection.modules.Tooltips.show(this.id, {\r\n position: this.side,\r\n text: this.label,\r\n color: this.style,\r\n targetWidth: width,\r\n targetHeight: height,\r\n windowWidth: Screen.width,\r\n windowHeight: Screen.height,\r\n x: left,\r\n y: top\r\n });\r\n }", "title": "" }, { "docid": "70d5247fc8c9cdd7f9e90bb5e8abbc3a", "score": "0.69997036", "text": "function mouseover(d) {\n tooltip.transition()\n .duration(200)\n .style('opacity', .9);\n\n // Show either a constructed tooltip, or override with one from the data\n tooltip.html(\n d.data.tooltip || d.data.name + '<br>' +\n options.attribute + ': ' + d.data.WeightOfNode\n )\n // Make the tooltip font size just a little bit bigger\n .style('font-size', (options.fontSize + 1) + 'px')\n .style('left', (d3.event.layerX) + 'px')\n .style('top', (d3.event.layerY - 30) + 'px');\n }", "title": "" }, { "docid": "c44fabf2d4227e52a3ceecb9b1d2904b", "score": "0.6975798", "text": "function showTooltip(d) {\n moveTooltip();\n\n tooltip.style(\"display\",\"block\")\n .text(d.properties.City+', '+d.properties.State+'\\n'+\"Death Number: \"+d.properties.NumberofDeaths+'\\n'+\"M: \"+d.properties.NumberofMale+\" F: \"+d.properties.NumberofFemale);\n}", "title": "" }, { "docid": "a7cd804f233842f9d11557860a4f6d68", "score": "0.6969834", "text": "function showTooltip(content, event) {\n tt.style('opacity', 1.0)\n .html(content);\n\n updatePosition(event);\n }", "title": "" }, { "docid": "a7cd804f233842f9d11557860a4f6d68", "score": "0.6969834", "text": "function showTooltip(content, event) {\n tt.style('opacity', 1.0)\n .html(content);\n\n updatePosition(event);\n }", "title": "" }, { "docid": "e20bd51ed9f68d02cb5cd09a96168c9d", "score": "0.6947025", "text": "function hover_show(d) {\n var mouse = d3.mouse(svg.node()).map(function(d) {\n return parseInt(d);\n });\n\n tooltip.classed('hidden', false)\n .attr('style', 'left:' + (mouse[0] + 15) + 'px; top:' + (mouse[1] - 35) + 'px')\n .html(d.properties.name);\n}", "title": "" }, { "docid": "8a992e6acdaf6f29d8bae585cbd97303", "score": "0.68914723", "text": "function mouseover(){\n tooltipMap.transition()\n .duration(200)\n .style(\"opacity\", .9);\n}", "title": "" }, { "docid": "6dae60ab208529e70ca0930a55fa363c", "score": "0.6866752", "text": "function showTooltip(content, event) {\n\t\t\t\n\t\t\ttt.style(\"opacity\", 1.0)\n\t\t\t.html(content);\n\n\t\t\tupdatePosition(event);\n\t\t}", "title": "" }, { "docid": "73a517a01cb82f7b149ba9d393bd3cae", "score": "0.6850596", "text": "function handleMouseOver(d, i) {\n let current = d3.select(this);\n\n // Set stroke of dot to steelblue to mimick zoom\n current.style('stroke', 'steelblue');\n \n // Determine location of text\n let xText = current.attr('cx');\n let yText = current.attr('cy') - 25;\n\n // Initialize transition for tooltip\n div.transition()\n .duration(200)\n .style(\"opacity\", 0.9);\n\n // Determine text of tooltip\n div.html(i[\"Year\"] + \"<br/>\" + numberFormat(i[\"Happiness Score\"]))\n .style(\"left\", xText + \"px\")\n .style(\"top\", yText + \"px\");\n\n }", "title": "" }, { "docid": "36a67c7d47ee4733927cabd9c3b7a12e", "score": "0.6843272", "text": "function plotData()\n {\n if (!rows) {\n console.log(\"no rows to plot.\")\n return;\n }\n\n var x = scales[0], y = scales[1], z = scales[2];\n\n // Draw a sphere at each x,y,z coordinate.\n var datapoints = scene.selectAll(\".datapoint\").data( rows );\n datapoints.exit().remove()\n\n var newDatapoints = datapoints.enter()\n .append(\"transform\")\n .attr(\"class\", \"datapoint\")\n .attr(\"scale\", function(row) {return [row[\"opt__size\"], row[\"opt__size\"], row[\"opt__size\"]];})\n .append(\"shape\");\n newDatapoints\n .append(\"appearance\")\n .append(\"material\");\n newDatapoints\n .append(\"sphere\")\n\n// Trying to figure out how to add mouse-over tooltips. Anyone know how? XXX\n newDatapoints\n .append(\"svg:title\").text(function(d){ return \"This doesn't work :<\";})\n\n datapoints.selectAll(\"shape appearance material\")\n .attr(\"diffuseColor\", function(row) {return row[\"opt__color\"];})\n\n datapoints.transition().ease(\"linear\").duration(1)\n .attr(\"translation\", function(row) {\n return x(row[axisKeys[0]]) + \" \" + y(row[axisKeys[1]]) + \" \" + z(row[axisKeys[2]])})\n }", "title": "" }, { "docid": "6bbe892c53ebe183c0a36bdd8e6f5d61", "score": "0.68396854", "text": "function showTooltip(d) {\r\n moveTooltip();\r\n\r\n tooltip.style(\"display\", \"block\")\r\n .text(\"School District: \" + d.properties.school_dist);\r\n tooltip.color(\"purple\");\r\n }", "title": "" }, { "docid": "973d499a0e5e1f5a1649ce35490ae3ad", "score": "0.6830175", "text": "addToolTip(selection, renderText) {\n this.svgSelection.selectAll(selection).on(\"mouseover\",\n function (d,i,n) {\n const tooltip = document.getElementById(\"tooltip\");\n tooltip.innerHTML = renderText(d,i,n);\n \n tooltip.style.display = \"block\";\n tooltip.style.left =event.pageX + 10 + \"px\";\n tooltip.style.top = event.pageY + 10 + \"px\";\n tooltip.style.visibility =\"visible\";\n }\n );\n this.svgSelection.selectAll(selection).on(\"mouseout\", function () {\n const tooltip = document.getElementById(\"tooltip\");\n tooltip.style.visibility = \"hidden\";\n });\n }", "title": "" }, { "docid": "1d5c3e837802d8b11437433ffd9e1673", "score": "0.6826103", "text": "function draw_tooltip(container, x, y, date, max_temp) {\n\tdraw_date_label(container, x, y, date);\n\tdraw_temperature_label(container, x, y, max_temp);\n}", "title": "" }, { "docid": "9e788ec8cc649a04393510d45d454b78", "score": "0.6824606", "text": "function draw() {\n // + UPDATE TOOLTIP\n\n if (state.hover){\n toolTip\n .html(\n `\n <div>Name:${state.hover.name}</div>\n <div>Value:${state.hover.value}</div>\n <div>Ancestors:${state.hover.title}</div>\n `\n )\n .transition()\n .duration(500)\n .style(\"transform\",`translate(${state.hover.translate[0]}px,${state.hover.translate[1]}px)`);\n }\n}", "title": "" }, { "docid": "fb6ca888a9038c45e1a48e6d377eae68", "score": "0.6822803", "text": "function showTooltip(d) {\n var tip = d3.select(\".tooltip\");\n\n // Move the tooltip to the datapoint.\n tip.attr(\"transform\", \"translate(\" + (xMap(d) + 10 ) +\n \",\" + yMapTotal(d) + \")\")\n .style(\"display\", \"block\");\n\n // Update the text.\n tip.select(\".name\")\n .text(d.key);\n tip.select(\".total\")\n .text(\"Total: \" + d.value.get(\"Total\") + \"%\");\n tip.select(\".urban\")\n .text(\"Urban: \" + d.value.get(\"Urban\") + \"%\");\n tip.select(\".rural\")\n .text(\"Rural: \" + d.value.get(\"Rural\") + \"%\");\n\n // Size the background.\n var bbox = tip.select(\"text\").node().getBBox();\n tip.select(\"rect\")\n .attr(\"width\", bbox.width)\n .attr(\"height\", bbox.height + 10);\n }", "title": "" }, { "docid": "054c09cf3b8db58ef098923eb21bf60d", "score": "0.6822032", "text": "function showTooltip(d, i){\n tooltipText(d);\n tooltip.style(\"left\", (d3.event.pageX - 75) + \"px\")\n .style(\"top\", (d3.event.pageY + 11) + \"px\")\n .transition()\n .duration(300)\n .style(\"opacity\", 1)\n .style(\"display\", \"block\");\n\n $(this).css(\"stroke\", \"#FF0000\")\n .css(\"stroke-width\", 1.5 + \"px\");\n }", "title": "" }, { "docid": "fe2c61314e533618240819e599345eb8", "score": "0.6820018", "text": "function graphMouseOver(d) {\n\td3.select(this).style('fill','#45b1cb'); // highlight hovered over bar\n\n\tlet tooltipData = \"<div class='tooltip-title center'>\"+d['displayName']+\"</div>\\\n\t\t<div class='tooltip-subtitle center'>\"+d['city']+', '+d['state']+\"</div>\";\n\n\tif (d['overallRank'] != null && d['overallRank'] > 0) { // format overall rank\n\t\ttooltipData += \"<div>Overall Rank: \"+d['overallRank']+\"</div>\";\n\t} else {\n\t\ttooltipData += \"<div>Overall Rank: Not Ranked</div>\";\n\t}\n\n\tif (d['act-avg'] != null) { // format ACT score\n\t\ttooltipData += \"<div>Average ACT Score: \"+d['act-avg']+\"</div>\";\n\t}\n\n\tif (d['enrollment'] != null) { // format enrollment\n\t\ttooltipData += \"<div>Enrollment: \"+d['enrollment']+\"</div>\";\n\t}\n\n\tif (d['cost-after-aid'] != null) { // format cost after aid\n\t\ttooltipData += \"<div>Tuition: $\"+d['tuition']+\" ($\"+d['cost-after-aid']+\" after aid)</div>\";\n\t}\n\n\tif (d['acceptance-rate'] != null) { // format acceptance rate\n\t\ttooltipData += \"<div>Acceptance Rate: \"+d['acceptance-rate']+\"%</div>\";\n\t}\n\n\t// add image and click instruction\n\ttooltipData += \"<img onerror='this.src=\\\"img/collegeCap.png\\\"' class='thumbnail' src=\"+d['primaryPhotoThumb']+\">\\\n\t\t<div class='text click-instruction'>Click to add to your school list</div>\";\n\n\ttooltip.html(tooltipData);\n\ttooltip.style(\"visibility\", \"visible\");\n}", "title": "" }, { "docid": "da813cc2980f26009191139110d1a3e5", "score": "0.6814668", "text": "function onMouseOver(d, i) {\n d3.select(this).attr(\"class\", \"highlight\");\n const formatDate = d3.timeFormat(\"%B %d, %Y\");\n tooltip.select(\".tooltip-chart-date\").html(`Date: ${formatDate(d.date)}`);\n if (flag) {\n tooltip\n .select(\".tooltip-chart-num\")\n .html(`Daily deaths: ${d.deaths.toLocaleString()}`);\n } else {\n tooltip\n .select(\".tooltip-chart-num\")\n .html(`Daily cases: ${d.cases.toLocaleString()}`);\n }\n tooltip.style(\"display\", \"block\");\n }", "title": "" }, { "docid": "71794a218ebffa83a530a729d31d3833", "score": "0.6810846", "text": "function verticesTooltipShow(d) {\n var series= $(this.outerHTML).attr('textcontent');\n if(series)\n {\n series=\"<span style='font-size: smaller;'>\"+data[series].group+\"<br></span>\";\n }\n else{\n series=\"\";\n }\n\n var str=series +\"<strong>\"+ d.axis+\"</strong>: \" +(d.value==config.maxValue?\"&ge;\":\"\")+ d.value + \"<br />\" +\n (d.description==undefined?\"\":\"<strong>Description</strong>: \" + d.description );\n\n vis.verticesTooltip.style(\"opacity\", 0.8)\n .html(str)\n .style(\"left\", (d3.event.pageX) + \"px\")\n .style(\"top\", (d3.event.pageY) + \"px\");\n }", "title": "" }, { "docid": "81ff30b4620b321e523d2e652290cc52", "score": "0.6810155", "text": "function showTooltip(d) {\n moveTooltip();\n\n tooltip.style(\"display\",\"block\")\n .text(d.properties.NOM_MUN);\n}", "title": "" }, { "docid": "5846c6fbf4ade7764c5555419b02ee08", "score": "0.67934424", "text": "function showTooltip(d) {\n moveTooltip();\n\n tooltip.style(\"display\",\"block\")\n .text(d.properties.LAD13NM + \"\\n\" + d.properties.LAD13CD);\n}", "title": "" }, { "docid": "c2b57b9cc9c8fe71f73d7269552e6554", "score": "0.6791316", "text": "function add_mouseover(svg, message, place_name,place_name_with_spaces,aantal_mensen){\n\tvar selected_place = svg.select('#'+place_name).style('fill', colour).attr(\"class\",\"selected_place\")\n\t\t.on(\"mouseover\", function(d){\n\t\t\t tooltip.text(\" \" + message + place_name_with_spaces+ \" reizen \"+ aantal_mensen + \" mensen \")\n\t\t\t\t.style(\"visibility\", \"visible\");\n\t\t});\n}", "title": "" }, { "docid": "c2f61ca68b2b5c8fc58bcc55f634cbee", "score": "0.67908335", "text": "function pointMouseEnter(event) {\n map.getCanvas().style.cursor = 'move';\n map.getCanvas().title = event.lngLat.lat + ', ' + event.lngLat.lng;\n}", "title": "" }, { "docid": "63d35838fd1c48526e9f1da0cd2c3db1", "score": "0.67903775", "text": "function mousemove(d){\n tooltipMap.html(d.properties.name + \"<br/>\" + data[d.properties.name].positivo + \"% Positivos\" + \"<br/>\" + data[d.properties.name].negativo + \"% Negativos\" )\n .style(\"left\", (d3.event.pageX+20) + \"px\")\n .style(\"top\", (d3.event.pageY - 55) + \"px\");\n}", "title": "" }, { "docid": "18872d70489491eaff156bbaec8a7b75", "score": "0.678417", "text": "function hovered(datum) {\n tooltip.classed('hidden', false)\n .select('val')\n .text(datum.id)\n }", "title": "" }, { "docid": "6b0a64cefabac283aad25f0d6e2bcf2a", "score": "0.67841065", "text": "function showTooltip() {\n if (angular.isDefined(_tooltip)) {\n return;\n }\n\n _tooltip = angular.element('<div/>', {\n class: `${CSS_PREFIX}-tooltip`,\n });\n\n _tooltipArrow = angular.element('<div/>', {\n class: `${CSS_PREFIX}-tooltip__arrow`,\n });\n\n _tooltipInner = angular.element('<span/>', {\n class: `${CSS_PREFIX}-tooltip__inner`,\n text: lumx.text,\n });\n\n LumXDepthService.increase();\n\n _tooltip\n .append(_tooltipArrow)\n .append(_tooltipInner)\n .css('z-index', LumXDepthService.get())\n .appendTo('body');\n\n _hoverTimeout = $timeout(_setTooltipPosition, _HOVER_DELAY);\n }", "title": "" }, { "docid": "610bf6208aa62fcbd3b9c88b69b6139a", "score": "0.6782931", "text": "function mouseOver(d, i) {\n\n d3.select(this)\n .transition()\n .style('opacity', 0.3);\n\n tooltip\n .style('display', null)\n .html('<p>Number of calls in advantage: ' + d.advantage + '<br>' + 'Number of calls in disadvantage: ' + d.disadvantage + '<br>Seconds left: ' + (+d.seconds_left + 5) + '</p>');\n }", "title": "" }, { "docid": "5d610b502fd4688a6cd81e90ef173443", "score": "0.6748307", "text": "function onMouseOver(e) {\n var currentTarget = e.currentTarget;\n if (!currentTarget.hasAttribute(\"data-plugin-vs-tooltip\")) {\n // If this element no longer has a 'data-plugin-vs-tooltip' attribute, un-initialize it.\n currentTarget.removeEventListener(\"mouseover\", onMouseOver);\n currentTarget.removeEventListener(\"mouseout\", onMouseOut);\n currentTarget.removeEventListener(\"mousedown\", onMouseDown);\n currentTarget.__plugin_tooltip_initialized = false;\n return;\n }\n // If the tooltip for this element is already active, the target element's own tooltip is already \n // active (the most specific tooltip), or a tooltip belonging to a child element\n // that is also a parent of the target element is active (a more specific tooltip), do not \n // show this tooltip.\n if (tooltipObject && !tooltipReset && tooltipObject.parent &&\n ((tooltipObject.parent === e.currentTarget) || (tooltipObject.parent === e.target) ||\n (hasChild(tooltipObject.parent, e.target) && hasChild(e.currentTarget, tooltipObject.parent)))) {\n return;\n }\n // Create the tooltip based on the value of the element's 'data-plugin-vs-tooltip' attribute\n var tooltipConfigStr = currentTarget.getAttribute(\"data-plugin-vs-tooltip\");\n var config;\n if ((typeof tooltipConfigStr === \"string\") && (tooltipConfigStr.length > 0) && (tooltipConfigStr[0] === \"{\")) {\n config = JSON.parse(tooltipConfigStr);\n }\n else {\n config = tooltipConfigStr;\n }\n showTooltip(config, e.currentTarget);\n }", "title": "" }, { "docid": "903a4af9a341135c9aadf81c2270b91c", "score": "0.67214274", "text": "function handleMouseOver(d, i) { // Add interactivity\n\n // Use D3 to select element, change color and size\n d3.select(this).attr({\n r: this.getAttribute('r') * 1.2\n });\n\n // Specify where to put label of text (tooltip)\n d3.select('.main-panel').append(\"div\").attr({\n id: \"map_tooltip\"\n })\n .style(\"opacity\", 0.9)\n .style('font', '16px sans-serif')\n .html(d.values.airport)\n .style(\"left\", (d3.event.clientX) + \"px\")\n .style(\"top\", (d3.event.clientY) + \"px\");\n \n }", "title": "" }, { "docid": "30b119bb34f9006c080cf69e22da41a5", "score": "0.67196065", "text": "function onChartTooltip(focusedChart, e) {\n\tvar chart, point, pointDate = null, i, savedFrom, eChart;\n\n\t// find and save the point position for the hovered chart\n\teChart = focusedChart.pointer.normalize(e); // Find coordinates within the chart\n\tpoint = focusedChart.series[0].searchPoint(eChart, true); // Get the hovered point\n\n\tif (point) {\n\t\tpointDate = point.category;\n\t\tsavedFrom = focusedChart.renderTo.id;\n\t}\n\n\tfor (i = 0; i < syncCharts.length; i++) {\n\t\tchart = syncCharts[i];\n\t\teChart = chart.pointer.normalize(e); // Find coordinates within the chart\n\t\tpoint = chart.series[0].searchPoint(eChart, true); // Get the hovered point\n\n\t\t//For 2 graphs on same chart (we don't treat the case with more than 2). This is done because shared tooltip\n\t\t//mode doesn't work properly when we call mouseOver/drawCrosshair on sync charts\n\t\tif (point) {\n\t\t\t//Only show corresponding date tooltips as searchPoint() return closest available one\n\t\t\tif (pointDate !== null) {\n\t\t\t\tif (point.category != pointDate) {\n\t\t\t\t\tchart.tooltip.hide(); //hide any previous selected tooltips;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar secondPoint = null;\n\t\t\tif (chart.series.length > 1){\n\t\t\t\tsecondPoint = chart.series[1].searchPoint(eChart, true);\n\t\t\t}\n\n\t\t\tpoint.onMouseOver(); // Show the hover marker\n\t\t\tchart.xAxis[0].drawCrosshair(eChart, point); // Show the crosshair\n\t\t\tpoint.secondPoint = secondPoint;\n\t\t\tchart.tooltip.refresh(point); // Show the tooltip\n\t\t}\n\t}\n}", "title": "" }, { "docid": "470b42f521101d609927f74d551a7493", "score": "0.6707442", "text": "function switchToolTip() { \r\n document.getElementById('qmark').onmouseover = function() {\r\n var toolTip = document.getElementById('ttip');\r\n toolTip.style.display='block';\r\n } \t \r\n document.getElementById('qmark').onmouseout = function() {\r\n var toolTip = document.getElementById('ttip');\r\n toolTip.style.display='none';\r\n } \t\r\n}", "title": "" }, { "docid": "106a01a286dbd57710097f66c27eadbe", "score": "0.66748697", "text": "addToolTip(selection, text) {\n this.svgSelection.selectAll(selection).on(\"mouseover\",\n function (selectedNode) {\n let tooltip = document.getElementById(\"tooltip\");\n if (typeof text === typeof \"\") {\n tooltip.innerHTML = text;\n } else {\n tooltip.innerHTML = text(selectedNode);\n }\n tooltip.style.display = \"block\";\n tooltip.style.left = event.pageX + 10 + \"px\";\n tooltip.style.top = event.pageY + 10 + \"px\";\n }\n );\n this.svgSelection.selectAll(selection).on(\"mouseout\", function () {\n let tooltip = document.getElementById(\"tooltip\");\n tooltip.style.display = \"none\";\n });\n }", "title": "" }, { "docid": "0fe2d29fb248890e7925d1213f743b80", "score": "0.66703403", "text": "function showLabel(evt){\n\tdocument.getElementById(\"tooltip2\").style.visibility=\"visible\";\n\tdocument.getElementById(\"tooltip2\").style.display=\"block\";\n\tif(evt.target.name==\"POF\"){\n\tdocument.getElementById(\"tooltip2\").style.top=((document.getElementById(\"POF\").offsetTop) - 22)+\"px\";\n\tdocument.getElementById(\"tooltip2\").style.left=((document.getElementById(\"POF\").offsetLeft))+\"px\";\t\n\tdocument.getElementById(\"tooltip2\").innerHTML=\"Number of position in flowers \";\n\t}else if(evt.target.name==\"ND\"){\n\tdocument.getElementById(\"tooltip2\").style.top=((document.getElementById(\"ND\").offsetTop) - 32)+\"px\";\n\tdocument.getElementById(\"tooltip2\").style.left=((document.getElementById(\"ND\").offsetLeft))+\"px\";\t\n\tdocument.getElementById(\"tooltip2\").innerHTML=\"P:Probability that the plant has not been drained \";\t\n\t}else if(evt.target.name==\"EB\"){\n\tdocument.getElementById(\"tooltip2\").style.top=((document.getElementById(\"EB\").offsetTop) - 32)+\"px\";\n\tdocument.getElementById(\"tooltip2\").style.left=((document.getElementById(\"EB\").offsetLeft))+\"px\";\t\n\tdocument.getElementById(\"tooltip2\").innerHTML=\"eb:Energy spent flying from one plant to another \";\t\n\t}else if(evt.target.name==\"TB\"){\n\tdocument.getElementById(\"tooltip2\").style.top=((document.getElementById(\"TB\").offsetTop) - 32)+\"px\";\n\tdocument.getElementById(\"tooltip2\").style.left=((document.getElementById(\"TB\").offsetLeft))+\"px\";\n\tdocument.getElementById(\"tooltip2\").innerHTML=\"tb:Time spent in flying from one plant to another \";\t\n\t}else if(evt.target.name==\"EW\"){\n\tdocument.getElementById(\"tooltip2\").style.top=((document.getElementById(\"EW\").offsetTop) +65)+\"px\";\n\tdocument.getElementById(\"tooltip2\").style.left=((document.getElementById(\"EW\").offsetLeft)+250)+\"px\";\t\n\tdocument.getElementById(\"tooltip2\").innerHTML=\"ew:Energy spent in flying on same stalk\";\t\n\t}else if(evt.target.name==\"TW\"){\n\tdocument.getElementById(\"tooltip2\").style.top=((document.getElementById(\"TW\").offsetTop) +65)+\"px\";\n\tdocument.getElementById(\"tooltip2\").style.left=((document.getElementById(\"TW\").offsetLeft)+250)+\"px\";\t\n\tdocument.getElementById(\"tooltip2\").innerHTML=\"tw:Time spent in flying on same stalk\";\t\n\t}else if(evt.target.name==\"EF\"){\n\tdocument.getElementById(\"tooltip2\").style.top=((document.getElementById(\"EF\").offsetTop) +65)+\"px\";\n\tdocument.getElementById(\"tooltip2\").style.left=((document.getElementById(\"EF\").offsetLeft)+250)+\"px\";\t\n\tdocument.getElementById(\"tooltip2\").innerHTML=\"ef:Energy spent in emptying a full flower\";\t\n\t}else if(evt.target.name==\"TF\"){\n\tdocument.getElementById(\"tooltip2\").style.top=((document.getElementById(\"TF\").offsetTop) +65)+\"px\";\n\tdocument.getElementById(\"tooltip2\").style.left=((document.getElementById(\"TF\").offsetLeft)+250)+\"px\";\t\n\tdocument.getElementById(\"tooltip2\").innerHTML=\"tf:Time spent in emptying a full flower \";\t\n\t}else if(evt.target.name==\"EE\"){\n\tdocument.getElementById(\"tooltip2\").style.top=((document.getElementById(\"EE\").offsetTop) +65)+\"px\";\n\tdocument.getElementById(\"tooltip2\").style.left=((document.getElementById(\"EE\").offsetLeft)+250)+\"px\";\n\tdocument.getElementById(\"tooltip2\").innerHTML=\"ee:Energy spent in sampling an empty flower\";\t\n\t}else if(evt.target.name==\"TE\"){\n\tdocument.getElementById(\"tooltip2\").style.top=((document.getElementById(\"TE\").offsetTop) +65)+\"px\";\n\tdocument.getElementById(\"tooltip2\").style.left=((document.getElementById(\"TE\").offsetLeft)+250)+\"px\";\n\tdocument.getElementById(\"tooltip2\").innerHTML=\"te:Time spent in sampling an empty flower\";\t\n\t}else if(evt.target.name==\"POS\"){\n\tdocument.getElementById(\"tooltip2\").style.top=((document.getElementById(\"POS\").offsetTop) +65)+\"px\";\n\tdocument.getElementById(\"tooltip2\").style.left=((document.getElementById(\"POS\").offsetLeft)+250)+\"px\";\n\tdocument.getElementById(\"tooltip2\").innerHTML=\"n:Last flower position visited by a bee\";\t\n\t}\n}", "title": "" }, { "docid": "3d1a0015ead13849f27f8c4362d04fd2", "score": "0.66658515", "text": "function tipEnter(d) {\n tooltip.style('visibility', 'visible')\n .style('font-size', '11px')\n .html(\n '<strong>' + sampleID + '</strong>: ' + d[sampleID] + '<br/>' +\n '<strong>' + xColumn + '</strong>: ' + d3.format('.2f')(d[xColumn]) + '<br/>' +\n '<strong>' + yColumn + '</strong>: ' + d[yColumn]\n );\n }", "title": "" }, { "docid": "224dfc618c2da4784417f48bfb050c01", "score": "0.6663625", "text": "function fcafox_showTooltip(e,id){\r\n\tif(fcafox_nodeTooltipsVisible){\r\n\t\t// we could also use the data from currentNode-variable but it is sometimes \r\n\t\t// still null when using it here (event to set it is sometimes too slow)\r\n\t\t// this explicite way seems better to me\r\n\t\tvar d = fcafox_nodes[fcafox_getNodeArrayPositionById(id)];\r\n\t\tvar xpos = e.pageX + 10;\r\n\t\tvar ypos = e.pageY + 10;\r\n\t\tvar html = \"\";\r\n\t\t\thtml += \"<b>Intent: </b><br>\";\r\n\t\tfor(var i=0;i<d.intent.length;i++)\r\n\t\t\thtml += d.intent[i].name + \"<br>\";\r\n\t\t\r\n\t\thtml += \"<b>Extent: </b><br>\"; \r\n\t\tfor(var i=0;i<d.extent.length;i++)\r\n\t\t\thtml += d.extent[i].name + \"<br>\";\r\n\t\t\r\n\t\t$(\".tooltipDiv\").css(\"top\",ypos).css(\"left\",xpos).css(\"visibility\",\"visible\").html(html);\r\n\t}\r\n}", "title": "" }, { "docid": "56b7e8c7c17079cd2b34e477dcab3c9f", "score": "0.66603094", "text": "function toolTip(selection) {\n\n // add tooltip (svg circle element) when mouse enters label or slice\n selection.on('mouseenter', function (data) {\n //rend l'image trnasparente\n //d3.select('#imgCard'+data.data.id).style('opacity', 0.35);\n //affiche le texte\n d3.select(\"#messageHover\").text(data.data.prop + \" : \" + data.data.expression);\n\n });\n\n // remove the tooltip when mouse leaves the slice/label\n selection.on('mouseout', function (data) {\n d3.select(\"#messageHover\").text(\"\");\n });\n }", "title": "" }, { "docid": "be81214d9174994c37e3feda773a9303", "score": "0.6658872", "text": "function onHover(){\n\t\t\t\t\tvar checkID = vis.data.id;\n\t\t\t\t\tif (id == checkID){\n\t\t\t\t\t\tvar people = vis.data[d].object[d].people[0].displayname;\n\t\t\t\t\t\tconsole.log(\"people: \" + people);\n\t\t\t\t\t}\n\n\t\t\t\t\t circle.bindPopup(d.name);\n\n circle.on('mouseover', function (e) {\n this.openPopup();\n });\n circle.on('mouseout', function (e) {\n this.closePopup();\n });\n\t\t\t\t}", "title": "" }, { "docid": "13bfdff01caf806b06170d7563ddd348", "score": "0.66458744", "text": "function showToolTip() {\n tooltip.style('visibility', 'visible')\n}", "title": "" }, { "docid": "7f4d971043be6b4e17bda4526647aa6f", "score": "0.66376853", "text": "onMouseEnter(evt) {\n\t\tconst coordinates = evt.target.getBoundingClientRect();\n\t\tthis.setState({\n\t\t\ttoolTip: {\n\t\t\t\tdisplay: 'block',\n\t\t\t\tleft: (parseInt(coordinates.left)+parseInt(coordinates.right))/2-20,\n\t\t\t\ttop: parseInt(coordinates.top) + 35,\n\t\t\t},\n\t\t});\n\t}", "title": "" }, { "docid": "94dcd62c2e705e41f222d10be0aeb69f", "score": "0.6630319", "text": "function mouseoverFunc(d) {\n\n\n\t\td3.selectAll(\"path.line\").classed(\"unfocused\", true);\n\t\t// now undo the unfocus on the current line and set to focused.\n\t\td3.select(this).select(\"path.line\").classed(\"unfocused\", false).classed(\"focused\", true);\n\t\ttooltip\n\t\t\t.style(\"display\", null) // this removes the display none setting from it\n\t\t\t.html(\"<p>\" + d.drug+ \"</p>\");\n\t}", "title": "" }, { "docid": "bd199f2139b398e5f60f231bee4e6fc2", "score": "0.66231084", "text": "handleBarMouseover(event) {\n const target = event.target;\n const index = Number(target.getAttribute('id'));\n this.tooltipTargets[index].style.display = 'block';\n }", "title": "" }, { "docid": "2ce7cd0c41b6d5cb0dbb10dc284fa8f7", "score": "0.66116595", "text": "function show_tooltip(f) {\n\tvar id = f.id; // country id (iso3 code)\n\tvar d = data_by_country['$'.concat(id)]; \n\t// mouse contains a list containing the x and y pixel locations\n\t// of the cursor, to use in positioning the tooltip\n\tvar mouse = d3.mouse(d3.select('#choropleth').node()).map(\n\t\tfunction(d) { return parseInt(d); });\n\tvar ctry_name = get_country_name(f); \n\tvar left = Math.min( w - 4 * ctry_name.length, mouse[0] + 5);\n\tvar top = mouse[1] + 35;\n\tvar tt_deaths = format_value(get_value_of_year_datum(id, current_year, current_key));\n\ttooltip.classed('hidden', false)\n\t\t\t.attr(\"style\", \"left:\" + left + \"px; top:\" + top + \"px\")\n\t\t\t.html(ctry_name + '<br>' +\n\t\t\t'Death rate by ' + current_key.replace('_', ' ') + ': '\n\t\t\t+ tt_deaths);\n}", "title": "" }, { "docid": "3c0c2051bb708a25be0f217413bccebc", "score": "0.6603261", "text": "function showDetail(d) {\n\n\t\t//Indicate hover state\n\t\td3.select(this)\n\t\t.attr(\"stroke\", \"black\");\n\n\t var content = '<span class=\"value\" style=\"color: black; font-weight: bold; font-size: 0.9em;\">' +\n d.name.toUpperCase() +\n '</span>' +\n '<span class=\"value\" style=\"font-size: 0.9em; padding-left: 25px; padding-right: 5px; font-weight: bold; color: white;\">' +\n (d.value - 1) +\n '</span>' +\n '</span>';\n\n \ttooltip.showTooltip(content, d3.event);\n\t}", "title": "" }, { "docid": "0a96662e3ab5bc8f5eb15c3db9f43629", "score": "0.6580964", "text": "get showToolTip() {\n return this.i.be;\n }", "title": "" }, { "docid": "a3fd3dc4a3cea03d6c3b4319154d0b3b", "score": "0.6580675", "text": "function showTooltip(elem) {\n elem = elem[0]\n var tooltip = elem.getAttribute(\"tt\") + \"-tooltip\"\n g(tooltip).innerHTML = elem.getAttribute(\"message\")\n g(tooltip).style.left = elem.getBoundingClientRect().left + elem.getBoundingClientRect().width / 2 + \"px\"\n g(tooltip).style.top = elem.getBoundingClientRect().top - window.innerHeight / 22 + \"px\"\n g(tooltip).style.opacity = .92\n}", "title": "" }, { "docid": "d36a9bd9ed336a58b75b5c15c59ddcef", "score": "0.6575297", "text": "function toolTipObs(tooltip,formatTime,d) {\r\n\ttooltip.html(formatTime(d.Day) + \"<br/>mean: \" + d.Temperature + \"&degF\" + \"<br/>min: \" + d.Min + \"&degF\" + \"<br/>max: \" + d.Max + \"&degF\")\r\n\treturn tooltip.style(\"visibility\", \"visible\");\r\n}", "title": "" }, { "docid": "08a2a613ee3954885beabd8e48668202", "score": "0.65724987", "text": "function showTooltip(f) {\n // Get the ID of the feature.\n let id = f.properties.GEOID10;\n // Use the ID to get the data entry.\n //var d = dataById[id];\n\n // Get the current mouse position (as integer)\n var mouse = d3.mouse(d3.select('#map').node()).map(\n function(f) { return parseInt(f); }\n );\n\n var left = Math.min(width - 4 * id.length, mouse[0] + 5);\n var top = mouse[1] + 25;\n\n tooltip.classed('hidden', false)\n .attr(\"style\", \"left:\" + left + \"px; top:\" + top + \"px\")\n .html(id);\n }", "title": "" }, { "docid": "60f6163adde86f1092e387ab53296004", "score": "0.6568461", "text": "function displayTooltip() {\n clearTooltip();\n if ( currentElement.length > 0 && currentContent.content ) {\n tooltipElement = $( \"<div>\" ).addClass( \"nicer-tooltip\" ).css( {\n display: \"inline-block\",\n position: \"fixed\",\n top: \"0\",\n left: \"0\"\n } );\n if ( currentContent.text ) {\n tooltipElement.text( currentContent.text );\n } else if ( currentContent.html ) {\n tooltipElement.html( currentContent.html );\n }\n rootElement.append( tooltipElement );\n\n basicPositioning( tooltipElement );\n }\n }", "title": "" }, { "docid": "5e794c6068f8d6efef476da7b635e0e5", "score": "0.6567531", "text": "showTooltip(content, top, left) {\n this.tooltip.innerHTML = content;\n this.tooltip.style.left = `${left + 10}px`;\n this.tooltip.style.top = `${top + 10}px`;\n this.tooltip.style.display = 'block';\n }", "title": "" }, { "docid": "bd86486d569f74cf951567d4c1efcff0", "score": "0.6564037", "text": "function handleMouseOver(d, i) {\n d3.select(this).\n style(\"fill\", \"#0e4d44\");\n tooltip.style(\"opacity\", 1).\n attr(\"id\", \"tooltip\").\n style(\"fill\", \"#0e4d44\").\n attr(\"data-date\", d[0]).\n html(function () {\n let toolTip = '<b>Date</b>: ' + d[0] + '<br/><b>GDP</b>: $';\n let unit = ' billion';\n let GDPstring = Math.round(d[1]).toString();\n let l = GDPstring.length;\n if (l > 3) {\n toolTip += GDPstring.substring(0, l - 3) + ',' + GDPstring.substring(l - 3);\n if ((l == 4 && GDPstring[0] != 1) | l > 4)\n {unit += 's';}\n } else\n {\n toolTip += GDPstring;\n }\n return toolTip + unit;\n }).\n style(\"left\", i * barWidth + 20 + \"px\").\n style(\"top\", yScale(d[1]) + 30 + \"px\");\n }", "title": "" }, { "docid": "277e444121af96ba1d5b890cf7ff7a4f", "score": "0.6563058", "text": "function handleMouseOver(event, data) {\n // Update the output panel text\n d3.select(\"#output\")\n .selectAll(\"*\")\n .remove();\n\n d3.select(\"#output\")\n .append(\"div\")\n .attr(\"class\", \"output\")\n .html(\"ID: \" + data[\"Patient ID\"]);\n\n d3.select(\"#output\")\n .append(\"div\")\n .attr(\"class\", \"output\")\n .html(\"x: \" + data[attributes.x.attr]);\n\n d3.select(\"#output\")\n .append(\"div\")\n .attr(\"class\", \"output\")\n .html(\"y: \" + data[attributes.y.attr]);\n\n if (attributes.color) {\n d3.select(\"#output\")\n .append(\"div\")\n .attr(\"class\", \"output\")\n .html(attributes.color + \": \" + data[attributes.color]);\n }\n // reduce opacity of all dots, except legend dots\n d3.selectAll(\"circle\").attr(\"opacity\", 0.1);\n legend.selectAll(\"circle\").attr(\"opacity\", 1);\n\n // increase dot size on mouse entering and increase opacity only of selected dot\n d3.select(this).transition()\n .duration('30')\n .attr(\"r\", 5.5)\n .attr(\"opacity\", 1);\n }", "title": "" }, { "docid": "06530fde70401e59abd9e2fcff9f95f3", "score": "0.6556806", "text": "function mouseOver(d, i){\r\n\r\n console.log('hi')\r\n d3.select(this)\r\n .transition('mouseover').duration(100)\r\n .attr('opacity', .4)\r\n\r\n d3.select('#tooltip')\r\n .style('left', (d3.event.pageX + 10)+ 'px')\r\n .style('top', (d3.event.pageY - 25) + 'px')\r\n .style('display', 'inline-block')\r\n .html(`<strong>Candidate:</strong> ${d.Candidate} \r\n <br> <strong>Amount Spent:</strong> $${d.Spent} million\r\n <br> <strong>Won Election?:</strong> ${d.wonElection}`)\r\n \r\n }", "title": "" }, { "docid": "9f064eb4243ef10bb603f90f82b290d4", "score": "0.65559405", "text": "addToolTip(selection, text) {\n this.svgSelection.selectAll(selection).on(\"mouseover\",\n function (selected) {\n let tooltip = document.getElementById(\"tooltip\");\n if (typeof text === typeof \"\") {\n tooltip.innerHTML = text;\n } else {\n tooltip.innerHTML = text(selected.node);\n }\n tooltip.style.display = \"block\";\n tooltip.style.left =event.pageX + 10 + \"px\";\n tooltip.style.top = event.pageY + 10 + \"px\";\n }\n );\n this.svgSelection.selectAll(selection).on(\"mouseout\", function () {\n let tooltip = document.getElementById(\"tooltip\");\n tooltip.style.display = \"none\";\n });\n return this;\n\n }", "title": "" }, { "docid": "09eae9f578d2e4c9652f9b3b6e421cc7", "score": "0.6554955", "text": "function showTooltip(chart, elem, indexChartSegment) {\n var helpers = Chart.helpers;\n\n var segments = chart.segments;\n //Only chart with segments\n if (typeof segments != 'undefined') {\n helpers.addEvent(elem, 'mouseover', function () {\n var segment = segments[indexChartSegment];\n segment.save();\n segment.fillColor = segment.highlightColor;\n chart.showTooltip([segment]);\n segment.restore();\n });\n\n helpers.addEvent(elem, 'mouseout', function () {\n chart.draw();\n });\n }\n}", "title": "" }, { "docid": "74fe01cf21bac630c2449a5e8332779f", "score": "0.65456396", "text": "function handleTooltipMouseOver(event, userId) {\n setTooltipData(prevState => {\n //slice out the '@' sign from userId to retrieve the data from Database as it's stored with out '@'\n return {...prevState, userId: userId.slice(1)}\n })\n // controls where the tooltip to be displayed horizontally \n Tooltip.current.style.left = event.clientX + 'px';\n // controls where the tooltip to be displayed vertically \n Tooltip.current.style.top = event.clientY+ 'px';\n Tooltip.current.style.display = 'flex';\n }", "title": "" }, { "docid": "317cc9d65575591d78d4ed6fe3c9c2c2", "score": "0.6536037", "text": "function showHover(tooltip,hover){\n if (tooltip == true) {\n $(hover).children('.tooltiptext').css('visibility','visible');\n $(hover).siblings('span.tooltiptext').addClass('superHidden');\n }\n }", "title": "" }, { "docid": "d8a5ffc9d48a01488eaf629917831f40", "score": "0.6519279", "text": "function handleMouseOver(d) {\n\n svg.selectAll('.dot')\n .attr(\"fill-opacity\", \"0.01\")\n\n let data1 = d3.select(this).data()\n\n svg.selectAll('.' + data1[0].pin)\n .raise()\n .attr(\"fill-opacity\", \"1\")\n\n label.select(\"text\").text(data1[0].des);\n labelD.select('text').text(data1[0].y.toFixed(2) + 'm , ' + data1[0].x)\n\n }", "title": "" }, { "docid": "27c9e4d684d802f4794be67e4c0dfdfd", "score": "0.6515048", "text": "function tooltip_info(d) {\n console.log(\"tooltip\", d);\n return \"country: \" + d.country + \"<br>\" + \"confirmed: \" + d.number \n}", "title": "" }, { "docid": "d380c9ff5cfd9a97d00253a7b587f2e9", "score": "0.65122175", "text": "function tooltip(theSourceElement, tooltipText) {\n if (isTooltipActive()) {\n if (theSourceElement == tooltipInfo.sourceElement) {\n // This tooltip is already visible\n return;\n }\n\n // Initialize new tooltip when current tooltip vanishes\n // (Note that this function can only be called when the user is hovering\n // over another element, so we know that the current tooltip will\n // dissappear soon, unless the user hovers back)\n tooltipInfo.nextSourceElement = theSourceElement;\n tooltipInfo.nextTooltipText = tooltipText;\n return;\n }\n\n tooltipInfo.sourceElement = theSourceElement;\n\n // Make sure tooltip is initialized\n if (!tooltipInfo.tooltipElement) {\n tooltipInfo.tooltipElement = createTooltip();\n }\n\n populateTooltip(tooltipText);\n}", "title": "" }, { "docid": "bfa876f6ff3b123d645ed25ca351d482", "score": "0.6487196", "text": "function onmousemove (e) {\n\t\t\tvar point,\n\t\t\t\tpoints,\n\t\t\t\thoverPoint = chart.hoverPoint,\n\t\t\t\thoverSeries = chart.hoverSeries,\n\t\t\t\ti,\n\t\t\t\tj,\n\t\t\t\tdistance = chartWidth,\n\t\t\t\tindex = inverted ? e.chartY : e.chartX - plotLeft; // wtf?\n\n\t\t\t// shared tooltip\n\t\t\tif (tooltip && options.shared && !(hoverSeries && hoverSeries.noSharedTooltip)) {\n\t\t\t\tpoints = [];\n\n\t\t\t\t// loop over all series and find the ones with points closest to the mouse\n\t\t\t\ti = series.length;\n\t\t\t\tfor (j = 0; j < i; j++) {\n\t\t\t\t\tif (series[j].visible &&\n\t\t\t\t\t\t\tseries[j].options.enableMouseTracking !== false &&\n\t\t\t\t\t\t\t!series[j].noSharedTooltip && series[j].tooltipPoints.length) {\n\t\t\t\t\t\tpoint = series[j].tooltipPoints[index];\n\t\t\t\t\t\tpoint._dist = mathAbs(index - point.plotX);\n\t\t\t\t\t\tdistance = mathMin(distance, point._dist);\n\t\t\t\t\t\tpoints.push(point);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// remove furthest points\n\t\t\t\ti = points.length;\n\t\t\t\twhile (i--) {\n\t\t\t\t\tif (points[i]._dist > distance) {\n\t\t\t\t\t\tpoints.splice(i, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// refresh the tooltip if necessary\n\t\t\t\tif (points.length && (points[0].plotX !== hoverX)) {\n\t\t\t\t\ttooltip.refresh(points);\n\t\t\t\t\thoverX = points[0].plotX;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// separate tooltip and general mouse events\n\t\t\tif (hoverSeries && hoverSeries.tracker) { // only use for line-type series with common tracker\n\n\t\t\t\t// get the point\n\t\t\t\tpoint = hoverSeries.tooltipPoints[index];\n\n\t\t\t\t// a new point is hovered, refresh the tooltip\n\t\t\t\tif (point && point !== hoverPoint) {\n\n\t\t\t\t\t// trigger the events\n\t\t\t\t\tpoint.onMouseOver();\n\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "85f1d926f5610c9ec2b032ff31e74175", "score": "0.64812094", "text": "function createToolTip(currentChartInfo){\n// Create the tool tip - Display data on mouseover event \n \n // xTTLabel & yTTLabel will hold the label for tool tip text based on currentX & currentY selected\n var xTTLabel = \"\";\n xTTLabel = setXTTLabel(currentChartInfo);\n var yTTLabel = \"\";\n yTTLabel = setYTTLabel(currentChartInfo);\n // Prefix & Suffix for tool tip values (Like $ for income, Yrs for Age and % for Poverty)\n var xTTLabelPrefix = \"\";\n var xTTLabelSuffix = \"\";\n var yTTLabelPrefix = \"\";\n var yTTLabelSuffix = \"\";\n xTTLabelPrefixSuffix = setXTTLabelPrefixSuffix(currentChartInfo);\n yTTLabelPrefixSuffix = setYTTLabelPrefixSuffix(currentChartInfo);\n var xTTLabelPrefix = xTTLabelPrefixSuffix[0];\n var xTTLabelSuffix = xTTLabelPrefixSuffix[1];\n var yTTLabelPrefix = yTTLabelPrefixSuffix[0];\n var yTTLabelSuffix = yTTLabelPrefixSuffix[1];\n\n // Set the HTML for D3 Tip Text \n var toolTip = d3.tip()\n .attr(\"class\", \"d3-tip\")\n .offset([80, -60])\n .html(function (d) {\n var html = d.state\n + \"<br> \" + xTTLabel + \": \"\n + xTTLabelPrefix\n + d[currentChartInfo.currentX]\n + xTTLabelSuffix\n // + \"%\"\n + \"<br> \" + yTTLabel + \": \"\n + yTTLabelPrefix\n + d[currentChartInfo.currentY]\n + yTTLabelSuffix\n // + \"%\"\n return html;\n });\n\n // Call D3 Tool Tip \n chartGroup.call(toolTip);\n\n // Display the tool tip text on mouseover event \n var circles = d3.selectAll(\"circle\");\n circles.on(\"mouseover\", function (data) {\n toolTip.show(data);\n })\n\n // Hide the tool tip text on mouseout event\n circles.on(\"mouseout\", function (data, index) {\n toolTip.hide(data);\n });\n\n // Return\n return;\n\n}", "title": "" }, { "docid": "dfca1ebec779faf0c715559f2eb91424", "score": "0.64743745", "text": "function ShowTooltip(e) {\n var elm = e.target;\n var key = elm.textContent;\n if (notes.hasOwnProperty(key)) {\n tooltip.textContent = notes[key];\n TextToLink(tooltip);\n tooltip.style.left = elm.getBoundingClientRect().left + window.pageXOffset + 'px';\n tooltip.style.top = (elm.getBoundingClientRect().top + window.pageYOffset + elm.offsetHeight + 5) + 'px';\n tooltip.classList.remove(\"invisible\");\n }\n}", "title": "" }, { "docid": "99156acce31b8787619305df3788462f", "score": "0.6467716", "text": "function tipMouseOut() {\n tooltip\n .transition()\n .duration(500) // ms\n .style(\"opacity\", 0); // don't care about position!\n }", "title": "" }, { "docid": "79025da02733b9e107efbf9aee7d1bc0", "score": "0.64646447", "text": "function hoverOn(_evt, d) {\n link.classed(\n \"highlight\",\n (e) => e.source.id === d.id || e.target.id === d.id\n );\n const neighbors = get_neighbors_of(d.id);\n node.classed(\"neighbor\", (e) => neighbors.has(e.id));\n\n const plural = d.numPapers > 1 ? \"papers\" : \"paper\";\n tooltip\n .classed(\"clickedactive\", clickedAuthors.getActive() === d.id)\n .classed(\"clicked\", clickedAuthors.has(d.id))\n .html(`<span>${d.name}</span><span>${d.numPapers} ${plural}</span>`)\n .transition()\n .duration(200)\n .style(\"opacity\", 1);\n }", "title": "" }, { "docid": "11f113aac277c6c8436c0e790861aa36", "score": "0.64571685", "text": "static showTooltip(message) {\n instance.tooltip.showTooltip(message);\n }", "title": "" }, { "docid": "948fd5513153f2c529d56e6b8fffd04e", "score": "0.6440819", "text": "function tipMouseOut(){\n tooltip\n .transition()\n .duration(500) // ms\n .style(\"opacity\", 0); // don't care about position!\n d3.select(this)\n .attr(\"r\", 5);\n }", "title": "" }, { "docid": "53e904b9075a2a1ab4ec79541da1df55", "score": "0.6424973", "text": "showHoverData(event) {\n this.top = 0;\n this.left = 0;\n this.hoverId = event.currentTarget.dataset.id;\n this.left = event.clientX - 780;\n this.top = event.clientY - 730;\n }", "title": "" }, { "docid": "b853459a42ecef084651c935a657bd1f", "score": "0.6423796", "text": "function hover(event, ownerId) {\r\n if (ownerMetadataMap[ownerId]) {\r\n return populateTooltip(event.target, ownerMetadataMap[ownerId]);\r\n }\r\n\r\n fetch(\"/owner?id=\" + ownerId)\r\n .then(function(response) {\r\n return response.json();\r\n })\r\n .then(function(data) {\r\n ownerMetadataMap[ownerId] = data.owner;\r\n return populateTooltip(event.target, ownerMetadataMap[ownerId]);\r\n });\r\n}", "title": "" }, { "docid": "15b222012d8b2efaff26b574a6ac604e", "score": "0.6420418", "text": "function mouseIn(d){\n\t\t\tvar d = d3.select(this).text() || d;\n\t\t\tvar content = \"\";\n\t\t\tif(d == \"Campus\") content = \": H1, H2\";\n\t\t\telse if(d == \"Web Server\") \n\t\t\t\tcontent = \":<br />Web Server 1(负载均衡前)<br />Web Server 1,Web Server 2(负载均衡后)\";\n\t\t\telse if(d == \"Students\") content = \": H1\";\n\t\t\telse if(d == \"Teachers\") content = \": H2\";\n\t\t\telse if(d == \"DB\") content = \": Database\";\n\t\t\telse content = \": Unknown.\"\n\t\t\ttooltip.html(d+content)\n\t\t\t\t.style({\n\t\t\t\t\t'left': d3.event.pageX + 'px',\n\t\t\t\t\t'top': (d3.event.pageY+20) + 'px',\n\t\t\t\t\t'opacity': 1\n\t\t\t\t});\n\t\t}", "title": "" }, { "docid": "125f864f2389c237c98b714592f33a1a", "score": "0.6420145", "text": "function updateHoverText(){\n\t\t// TODO: Only do for the properties?\n\t\tcurrentZoomLevel=pompeiiMap.getZoom();\n\t\tinfo.update = function (props) {\n\t\t\tif(showHover){\n\t\t\t\tif(!props && currentZoomLevel<19)\n\t\t\t\t\tthis._div.innerHTML = 'Hover over insula to see name';\n\t\t\t\telse if(!props && currentZoomLevel>=19)\n\t\t\t\t\tthis._div.innerHTML = 'Hover over property to see name';\n\t\t\t\telse if(props.insula_full_name && currentZoomLevel<19)\n\t\t\t\t\tthis._div.innerHTML = props.insula_full_name;\n\t\t\t\telse if (props.PRIMARY_DOOR && currentZoomLevel>=19)\n\t\t\t\t\tthis._div.innerHTML = 'Property ' + props.PRIMARY_DOOR;\n\t\t\t}\n\t\t};\n\t\tinfo.addTo(pompeiiMap);\n\t}", "title": "" }, { "docid": "466dece4984ba490d72c6ce5c7c44bd6", "score": "0.64175105", "text": "function moveTooltip() {\n var xPos = mouse(this)[0];\n var yPos = mouse(this)[1];\n\n //Map is 25% from the left\n var xPosWin = window.innerWidth / 4 + 20 + xPos;\n\n tooltip.text(select(this).attr(\"country-name\"))\n .style(\"left\", xPosWin + \"px\")\n .style(\"top\", yPos + 55 + \"px\")\n}", "title": "" }, { "docid": "81250abeedcbad1b1a5feb76ec1134b6", "score": "0.6416603", "text": "getTooltip(){return this.__tooltip}", "title": "" }, { "docid": "43c500cac99eedf1b7468bb9c7f3c3f3", "score": "0.6412129", "text": "function mouseoverPPR(d) {\n highlight.call(this, d);\n var item = d3.select(this);\n var p = item[0][0].__data__;\n fillPPRTooltip(p);\n pprTooltip\n .style(\"display\", \"block\");\n }", "title": "" }, { "docid": "47da8248958567101d20503c9e9f3fca", "score": "0.63899285", "text": "function showTooltip(d) {\n thead.text(d.year);\n maleCell.text(Object.keys(d)[0] + \": \" + numberFormat(d.male));\n femaleCell.text(Object.keys(d)[1] + \": \" + numberFormat(d.female));\n\n d3.selectAll(\".y\" + d.year)\n .transition()\n .ease(d3.easeLinear)\n .duration(\"200\")\n .attr(\"r\", dims.bigRadius);\n tooltip\n .transition()\n .duration(tShort)\n .style(\"opacity\", 0.9);\n }", "title": "" }, { "docid": "47da8248958567101d20503c9e9f3fca", "score": "0.63899285", "text": "function showTooltip(d) {\n thead.text(d.year);\n maleCell.text(Object.keys(d)[0] + \": \" + numberFormat(d.male));\n femaleCell.text(Object.keys(d)[1] + \": \" + numberFormat(d.female));\n\n d3.selectAll(\".y\" + d.year)\n .transition()\n .ease(d3.easeLinear)\n .duration(\"200\")\n .attr(\"r\", dims.bigRadius);\n tooltip\n .transition()\n .duration(tShort)\n .style(\"opacity\", 0.9);\n }", "title": "" } ]
e134e2f3810dd76a09806ceda20e38a3
this traps enters in input fields
[ { "docid": "c24c1b9357f72668477cc1f47c77042e", "score": "0.0", "text": "function enterpressed(event){\n var keycode;\n if (window.event) keycode = window.event.keyCode;\n else if (event) keycode = event.which;\n else return false;\n\n if (keycode == 13)\n {\n return true;\n }\n else return false;\n}", "title": "" } ]
[ { "docid": "b22f83c8b94c02d4d87da1dd35e2bed2", "score": "0.65953606", "text": "function initInputs() {\n $('#wizard-body').find('input[type=\"text\"]').keydown(function (event) {\n if (event.which == 13) {\n event.preventDefault();\n $(this).blur();\n }\n });\n }", "title": "" }, { "docid": "a681bef616c76f0837d93ee344e647f4", "score": "0.6237275", "text": "handleKeyPress(e) {\n if ((e.keyCode === 13 && this.state.fieldsString.length) || e.keyCode === 9) {\n e.preventDefault();\n this.handleSelection();\n this.handleBlur();\n } else if (e.keyCode === 38) {\n e.preventDefault();\n this.higherSuggestion();\n } else if (e.keyCode === 40) {\n e.preventDefault();\n this.lowerSuggestion();\n } else if (e.keyCode === 27) {\n e.preventDefault();\n this.handleBlur();\n } else {\n this.updateFieldKv(e);\n }\n }", "title": "" }, { "docid": "fb74e5cc36ceab9155d1705e53735076", "score": "0.6149757", "text": "_inputFocusHandler() {\n const that = this;\n\n if (that.spinButtons) {\n that.$.spinButtonsContainer.setAttribute('focus', '');\n }\n if (that.radixDisplay) {\n that.$.radixDisplayButton.setAttribute('focus', '');\n }\n if (that.showUnit) {\n that.$.unitDisplay.setAttribute('focus', '');\n }\n\n if (that.opened) {\n that._closeRadix();\n }\n\n that.setAttribute('focus', '');\n\n if (that.outputFormatString) {\n that.$.input.value = that._editableValue;\n }\n }", "title": "" }, { "docid": "8da6e8e53869b274f38e32f57c461619", "score": "0.60484916", "text": "function cleanUpInputFields() {\n // Replace values\n firstNameInput.value = \"\";\n lastNameInput.value = \"\";\n titleInput.value = \"\";\n ratingInput.value = \"\";\n}", "title": "" }, { "docid": "03fd61fb952b67a742e25b72eb878ad4", "score": "0.60457426", "text": "function inputHandling(e) {\n setInputFields((input) => ({ ...input, [e.target.name]: e.target.value }));\n console.log(inputFields);\n }", "title": "" }, { "docid": "cc6980174ebf0a0f493fe352ecb0fb0a", "score": "0.5985302", "text": "function inputKeydown(e)\n {\n // Pressing enter or space bar or comma while focused on input\n if(e.keyCode == 13 || e.keyCode == 32 || e.keyCode == 188)\n {\n inputKeydownEnter();\n }\n\n // Pressing backspace while focused on input\n if(e.keyCode == 8)\n {\n hideIfUndefined(input);\n }\n }", "title": "" }, { "docid": "90ca7c5c4bda12c6754e2104a5913779", "score": "0.59385246", "text": "_handleInputKeyPress(e) {\n if (e.key === 'Enter') {\n this.df_text_query(e.target.value);\n e.target.value = '';\n }\n }", "title": "" }, { "docid": "e750f0a7ac99631a977de5c6fe8c1335", "score": "0.59332883", "text": "function prepareInputs() {\n $(\".draft-title\").focus(\n function () {\n $(this).select();\n }\n ).blur(\n function () {\n renameDraft(parseInt($(this).parent().attr('id').split('-')[1]), $(this).val());\n }\n ).keyup(\n function (e) {\n if (e.keyCode == 13) {\n $(this).trigger('blur');\n }\n }\n );\n}", "title": "" }, { "docid": "e376e2da4fd69f1dbcda7691eb2f3617", "score": "0.5910311", "text": "function emptyBadOrderFields() {\n\t\t\t\tctrl.badOrderQuestion = '';\n\t\t\t\tctrl.placeBadOrder = ctrl.refuseBadOrder = function () {};\n\t\t\t}", "title": "" }, { "docid": "f674020f231b5ba5046b18e02c9bf4b3", "score": "0.5887547", "text": "handleAllInputs() {\r\n this.limitInputTo(this.inputBill, 99999);\r\n this.limitInputTo(this.inputCustom, 100);\r\n this.limitInputTo(this.inputPeople, 100);\r\n }", "title": "" }, { "docid": "2b03a8bfca7fe70e8b1062695a32893d", "score": "0.5868609", "text": "keyPress(e) {\n if ((this.type != 'string' || !this.props.p.multiline) && e.key == 'Enter') {\n this.paramChanged(e.target.value);\n e.preventDefault(); // eat the Enter so it doesn't get in our input field\n }\n }", "title": "" }, { "docid": "6156ccdc10f660506c6e211a1242df50", "score": "0.5864458", "text": "internalOnInput(event) {\n const me = this,\n inputLen = me.input.value.length;\n\n // IE11 triggers input event on focus for some reason, ignoring it if not editable\n if (!me.editable) return;\n\n me.updateEmpty();\n\n if (inputLen >= me.minChars) {\n me.filterList(me.input.value);\n } else {\n if (me.validateFilter) {\n me[inputLen ? 'setError' : 'clearError'](fieldvalidateFilterErrorName);\n }\n me.hidePicker();\n }\n\n /**\n * User typed into the field. Please note that the value attached to this event is the raw input field value and\n * not the combos value\n * @event input\n * @param {Common.widget.Combo} source - The combo\n * @param {String} value - Raw input value\n */\n me.trigger('input', { value: me.input.value, event });\n }", "title": "" }, { "docid": "1d8ba775516eff781ffeb72e16c3567f", "score": "0.57685983", "text": "handleAddItemInput(event) {\n if (event.charCode === 13) {\n this.createListItems(event.target.value);\n event.target.value = \"\";\n }\n }", "title": "" }, { "docid": "0021b725d0d0e5d61f3bfa6f461f437d", "score": "0.5750144", "text": "function cleanInputs() {\n document.getElementById(\"nameInput\").value = \"\";\n document.getElementById(\"latitudeInput\").value = \"\";\n document.getElementById(\"longitudeInput\").value = \"\";\n }", "title": "" }, { "docid": "25053b682e57948d06da835ddf34fe28", "score": "0.5739896", "text": "function cleanInps() {\n bookTitleInp.value = \"\";\n authorInp.value = \"\";\n isbnInp.value = \"\";\n}", "title": "" }, { "docid": "038c9f560b2ab00de0fd622d5759e508", "score": "0.5735401", "text": "onEnter() {\n // Avoid white spaces at beginning and end.\n let val = this.state.value.trim();\n if (!val) {\n this.setState({value: ''})\n return;\n }\n this.props.onUpdate(val);\n this.setState({value: ''});\n }", "title": "" }, { "docid": "4cfbad3ec1dc7d07f04a44bd435d0a13", "score": "0.57153594", "text": "internalOnInput(event) {\n const me = this,\n value = me.input.value,\n inputLen = value.length; // IE11 triggers input event on focus for some reason, ignoring it if not editable\n\n if (!me.editable) {\n return;\n }\n\n me.updateEmpty();\n me.syncInputWidth();\n me.inputting = true;\n\n if (inputLen >= me.minChars) {\n me.filterList(value);\n } else {\n // During typing, the field is invalid\n if (me.validateFilter && !me.filterParamName) {\n me[inputLen ? 'setError' : 'clearError'](errorValidateFilter);\n }\n\n me.hidePicker();\n }\n\n me.inputting = false;\n /**\n * User typed into the field. Please note that the value attached to this event is the raw input field value and\n * not the combos value\n * @event input\n * @param {Core.widget.Combo} source - The combo\n * @param {String} value - Raw input value\n */\n\n me.trigger('input', {\n value,\n event\n });\n }", "title": "" }, { "docid": "307100e2299dab6621519e9b2bfa30f8", "score": "0.5711681", "text": "function clearInputFields() {\n zipcodeInput.val('');\n cityInput.val('');\n stateInput.val('');\n} //end clearInputFields", "title": "" }, { "docid": "21a0b5755a0d0705860bfc916b1ac76b", "score": "0.5702094", "text": "_textBoxKeyDownHandler(event) {\n const that = this,\n key = event.key;\n\n if (that._scrollView) {\n that._handleScrollbarsDisplay();\n }\n\n that._autoExpandUpdate();\n that.value && that.value.length > 0 ? that.$.addClass('has-value') : that.$.removeClass('has-value');\n\n if (['Enter', 'Escape'].indexOf(key) === -1) {\n that._preventProgramaticValueChange = true;\n }\n\n if (['ArrowLeft', 'ArrowUp', 'ArrowDown', 'ArrowRight'].indexOf(key) > -1) {\n that._scrollView.scrollTo(that.$.input.scrollTop);\n }\n\n if (['PageUp', 'PageDown'].indexOf(key) > -1 && JQX.Utilities.Core.Browser.Chrome) {\n if (event.key === 'PageUp') {\n that.$.input.setSelectionRange(0, 0);\n that.$.input.scrollTop = 0;\n }\n\n if (event.key === 'PageDown') {\n that.$.input.setSelectionRange(that.$.input.value.length, that.$.input.value.length);\n that.$.input.scrollTop = that._scrollView.verticalScrollBar.max;\n }\n\n event.preventDefault();\n }\n }", "title": "" }, { "docid": "dce2e9a811dcd05d90135599e2008223", "score": "0.5690645", "text": "function checkInput(e) {\n\t\tswitch (e.which) {\n\t\t\tcase 69:\n\t\t\tcase 187:\n\t\t\tcase 189:\n\t\t\tcase 190:\n\t\t\t\te.preventDefault();\n\t\t}\n\t}", "title": "" }, { "docid": "f3638a3d33c87a37959405cafe6fd915", "score": "0.56591445", "text": "function onFocusHdlr() {\t// on 'focus' handler\n\tvar newV = $(this).val().trim().replace( /<br>$/gm, '');\n\tvar pmptV = $(this).attr(\"data-pmptv\").trim().replace( /<br>$/gm, '');\n\tif ( pmptV.length > 0 ) return; // Already done once; user has input data & comes back to it\n\t$(this).attr( 'data-pmptv', newV ); // save it before blanking out\n\t$(this).val( '' ); // blank out the field for input\n\treturn;\n}", "title": "" }, { "docid": "8730f1f2a85337643540df5c2237045c", "score": "0.5649637", "text": "function suppressFields()\n {\n $inputFields = $('input[id^=\"' + baseId + '\"], textarea[id^=\"' + baseId + '\"], select[id^=\"' + baseId + '\"]');\n\n for (var key in fields) {\n var val = fields[key];\n\n // Find matching field(s) if it's in the DOM\n $field = $inputFields.filter(function () {\n return $(this).attr('id').match(new RegExp(key)) != null;\n });\n\n // Set field value\n $field.val(val);\n\n // Hide field from view\n $field.closest(parentSelectorForHiding).hide();\n }\n }", "title": "" }, { "docid": "6f368d1766998be62fe53d26542b7011", "score": "0.56484383", "text": "function no_around_spaces( selector )\n{\n\t$( selector+\">input[type=text]\" ).keyup(function(){\n\t\tthis.value=this.value.trim();\n\t});\n}", "title": "" }, { "docid": "43b1204e51cae9bbd8e6c5aaceec3065", "score": "0.5647782", "text": "function handleKeyDown(event) {\n if (!inputText) {\n return\n }\n switch (event.key) {\n case ' ':\n case ',':\n syncGeneArrayToInputText()\n setTimeout(() => {setInputText(' ')}, 0)\n }\n }", "title": "" }, { "docid": "e0618762d03d5b55791d75b96d085627", "score": "0.56467503", "text": "function handle(e) {\r\n if (e.keyCode === 13) {\r\n e.preventDefault();\r\n getInput();\r\n clearValueInput();\r\n }\r\n}", "title": "" }, { "docid": "a68074d20d482525230d5779b1ce4bf6", "score": "0.5639288", "text": "update() {\n\t if (this.originalInputValue === '') {\n\t this._reset();\n\t }\n\t }", "title": "" }, { "docid": "b4b035631d1063c33ecd6aa01e6133a6", "score": "0.563837", "text": "function resetInputs() {\n inputs.forEach(input => {\n if (!(/^\\s*$/.test(input.value))) {\n input.classList.add('searched-input');\n input.addEventListener('focus', (e) => {\n e.target.value = '';\n e.target.classList.remove('searched-input');\n })\n }\n input.blur();\n })\n}", "title": "" }, { "docid": "021a62b601fb86fac0c1ac5f438a78b0", "score": "0.56372714", "text": "onInputChange( evt ) {\n\t\tconst inputFields = this.state.inputFields\n\t\tinputFields[evt.target.name] = evt.target.value\n\n\t\tthis.setState({ inputFields })\n\t}", "title": "" }, { "docid": "ac56640d39eb350e86a17de4fd79f8b2", "score": "0.5624366", "text": "function inputKeydownEnter()\n {\n if(checkRegex())\n {\n inputClearError();\n addTokenToList();\n updateTextarea();\n return;\n }\n inputError();\n }", "title": "" }, { "docid": "06d6fbd0bfb48342eefe0e36bf9d3b57", "score": "0.56072825", "text": "function prepareInput() {\n var text = [];\n var from = Math.max(0, sel.from.line - 1), to = Math.min(lines.length, sel.to.line + 2);\n for (var i = from; i < to; ++i) text.push(lines[i].text);\n text = input.value = text.join(lineSep);\n var startch = sel.from.ch, endch = sel.to.ch;\n for (var i = from; i < sel.from.line; ++i)\n startch += lineSep.length + lines[i].text.length;\n for (var i = from; i < sel.to.line; ++i)\n endch += lineSep.length + lines[i].text.length;\n editing = {text: text, from: from, to: to, start: startch, end: endch};\n setSelRange(input, startch, reducedSelection ? startch : endch);\n }", "title": "" }, { "docid": "06d6fbd0bfb48342eefe0e36bf9d3b57", "score": "0.56072825", "text": "function prepareInput() {\n var text = [];\n var from = Math.max(0, sel.from.line - 1), to = Math.min(lines.length, sel.to.line + 2);\n for (var i = from; i < to; ++i) text.push(lines[i].text);\n text = input.value = text.join(lineSep);\n var startch = sel.from.ch, endch = sel.to.ch;\n for (var i = from; i < sel.from.line; ++i)\n startch += lineSep.length + lines[i].text.length;\n for (var i = from; i < sel.to.line; ++i)\n endch += lineSep.length + lines[i].text.length;\n editing = {text: text, from: from, to: to, start: startch, end: endch};\n setSelRange(input, startch, reducedSelection ? startch : endch);\n }", "title": "" }, { "docid": "06d6fbd0bfb48342eefe0e36bf9d3b57", "score": "0.56072825", "text": "function prepareInput() {\n var text = [];\n var from = Math.max(0, sel.from.line - 1), to = Math.min(lines.length, sel.to.line + 2);\n for (var i = from; i < to; ++i) text.push(lines[i].text);\n text = input.value = text.join(lineSep);\n var startch = sel.from.ch, endch = sel.to.ch;\n for (var i = from; i < sel.from.line; ++i)\n startch += lineSep.length + lines[i].text.length;\n for (var i = from; i < sel.to.line; ++i)\n endch += lineSep.length + lines[i].text.length;\n editing = {text: text, from: from, to: to, start: startch, end: endch};\n setSelRange(input, startch, reducedSelection ? startch : endch);\n }", "title": "" }, { "docid": "0889cc78ed99d7058c9f42ac61a618a6", "score": "0.56061226", "text": "function inputGotFocus() {\r\n\tthis.value = '';\r\n\tsetSearchButtonEnabled(false);\r\n}", "title": "" }, { "docid": "6b026691ea6c8c74910fa024aa7751db", "score": "0.5594493", "text": "_setFocusOnInvalidInput() {\n\t\t\tvar oData = this._oJSONModel.getData();\n\t\t\t_aNumericInputFields.some(function(sFieldName) {\n\t\t\t\tif (oData[sFieldName].valueState === ValueState.Error) {\n\t\t\t\t\tvar oElement = sap.ui.getCore().byId(oData[sFieldName].id);\n\t\t\t\t\toElement.focus();\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}, this);\n\t\t}", "title": "" }, { "docid": "a605c162f3f095d8fa71ae5826db4cdd", "score": "0.5592199", "text": "onMsgSubmission(event) {\n if(event.which === 13) {\n this.props.addMessage(event.target.value);\n event.target.value = '';\n }\n }", "title": "" }, { "docid": "1072bce643f5b6707eafbd31bcc244d2", "score": "0.5574891", "text": "function enterInput(event) {\n\t(0, _submitButton.resetCalc)();\n\tvar _event$target = event.target;\n\tvar name = _event$target.name;\n\tvar value = _event$target.value;\n\t// Substracts 3 character code...\n\n\tvalue = value.substring(0, 3).toUpperCase();\n\t// If value has content ...\n\tif (value.length > 0) {\n\t\tvar targetedParam = _parameters.params[name];\n\t\t// Finds value in airports or returns -1\n\t\tvar i = getAirportIndex(value, _airports.airports);\n\t\t// If value is in airports...\n\t\tif (airportIsValid(i)) {\n\t\t\tvar airport = _airports.airports[i];\n\t\t\t// Checks opposite value is not the same...\n\t\t\tif (isDifferentFromOpposite(name, value)) {\n\t\t\t\t// Checks is there is a value to replace and prevents reseting from autocomplete...\n\t\t\t\tif (!paramIsEmpty(targetedParam) && isDifferentFromCurrentParam(targetedParam.code, value)) {\n\t\t\t\t\t(0, _parameters.resetParam)(name);\n\t\t\t\t}\n\t\t\t\t(0, _parameters.setParams)(event.target, airport);\n\t\t\t} else {\n\t\t\t\t(0, _library.displayError)(event.target, 'Origin and Destination can\\'t be the same');\n\t\t\t}\n\t\t} else {\n\t\t\t(0, _library.displayError)(event.target, 'Airport is not valid');\n\t\t}\n\t} else {\n\t\t(0, _parameters.resetParam)(name);\n\t}\n}", "title": "" }, { "docid": "bc53f3c520d2c39714cf17eae23b0c05", "score": "0.55691993", "text": "handleTextFieldInteraction() {\n if (this.adapter_.getNativeInput().disabled) {\n return;\n }\n this.receivedUserInput_ = true;\n }", "title": "" }, { "docid": "bc53f3c520d2c39714cf17eae23b0c05", "score": "0.55691993", "text": "handleTextFieldInteraction() {\n if (this.adapter_.getNativeInput().disabled) {\n return;\n }\n this.receivedUserInput_ = true;\n }", "title": "" }, { "docid": "bc53f3c520d2c39714cf17eae23b0c05", "score": "0.55691993", "text": "handleTextFieldInteraction() {\n if (this.adapter_.getNativeInput().disabled) {\n return;\n }\n this.receivedUserInput_ = true;\n }", "title": "" }, { "docid": "5f39d28a91f5a234a85bdf986c9c841f", "score": "0.5556552", "text": "function MUA_InputKeyup(el_input, event_key) {\n //console.log( \"===== MUA_InputKeyup ========= \");\n //console.log( \"event_key\", event_key);\n\n const fldName = get_attr_from_el(el_input, \"data-field\");\n if(el_input){\n if(event_key === \"Shift\"){\n // pass\n } else if(event_key === \"Enter\" && fldName === \"username\"){\n el_MUA_last_name.focus();\n } else if(event_key === \"Enter\" && fldName === \"last_name\"){\n el_MUA_email.focus();\n } else {\n let field_value = el_input.value;\n //console.log( \"fldName\", fldName);\n //console.log( \"field_value\", field_value);\n // fldName is 'username', 'last_name' or 'email' . fldName \"schoolname\" is handled in MUA_InputSchoolname\n if (fldName === \"username\" && field_value){\n field_value = field_value.replace(/, /g, \"_\"); // replace comma or space with \"_\"\n field_value = replaceChar(field_value)\n if (field_value !== el_input.value) { el_input.value = field_value}\n }\n mod_MUA_dict[fldName] = (field_value) ? field_value : null\n mod_MUA_dict[\"has_changed_\" + fldName] = true;\n\n MUA_ResetElements();\n // send schoolbase, username and email to server after 1000 ms\n // abort if within that period a new value is entered.\n // checked by comparing the timestamp\n //time_stamp = Number(Date.now())\n //setTimeout(MUA_Save, 1500, time_stamp); // time_stamp is an argument passed to the function MUA_Save.\n\n MUA_DisableBtnSave()\n\n }\n }\n }", "title": "" }, { "docid": "d7d784fe207ba43226d21c076e9f396b", "score": "0.55563825", "text": "_handleKeyDown (event) {\n if(event.target.type === 'textarea' || event.target.type === 'input'){\n return;\n }\n switch( event.keyCode ) {\n case 37:\n this.back();\n event.preventDefault();\n break;\n case 38:\n this.unstep();\n event.preventDefault();\n break;\n case 39:\n this.forward();\n event.preventDefault();\n break;\n case 40:\n this.step();\n event.preventDefault();\n break;\n default: \n break;\n }\n }", "title": "" }, { "docid": "9dd14212fc46e96cddab6c5fcea6b57f", "score": "0.5555977", "text": "function inhibitKeyboardEntryForIEMobile(inputbox){\r\n\tinputbox.value = \"\";\r\n}", "title": "" }, { "docid": "6630f0c1971469e26703adee867fbf4e", "score": "0.55547017", "text": "update() {\n if (this.originalInputValue === '') {\n this._reset();\n }\n }", "title": "" }, { "docid": "1b606df190009a40d317ca88dada4a41", "score": "0.5552834", "text": "_reflectBackFormattedValueToUser() {\n super._reflectBackFormattedValueToUser();\n if (this._reflectBackOn() && this.focused) {\n try {\n // try/catch, because Safari is a bit sensitive here\n this._inputNode.selectionStart = this._inputNode.value.length;\n // eslint-disable-next-line no-empty\n } catch (_) {}\n }\n }", "title": "" }, { "docid": "21f70fbeac671e06012daa6ac3e5a46f", "score": "0.5551884", "text": "_inputKeyupHandler(event) {\n const that = this;\n\n if (event.keyCode === 13) {\n // when Enter is pressed, validation occurs\n that._suppressBlurEvent = true;\n\n if (that.$.input.value !== that._cachedInputValue) {\n that._triggerChangeEvent = true;\n that._validate();\n that._triggerChangeEvent = false;\n that.$.input.blur();\n }\n }\n else if (event.keyCode === 27) {\n // when Escape is pressed, changes are discarded\n that.$.input.value = that._editableValue;\n }\n else {\n const inputValue = that.$.input.value;\n\n if (inputValue !== '' && that._regex[that._radixNumber].test(inputValue)) {\n that.$.upButton.disabled = false;\n that.$.downButton.disabled = false;\n }\n else if (inputValue === '') {\n that.$.upButton.disabled = true;\n that.$.downButton.disabled = true;\n }\n\n if (that._keydownInfo &&\n that._keydownInfo.value !== inputValue &&\n !that._keydownInfo.specialKey &&\n !event.altKey && !event.ctrlKey && !event.shiftKey &&\n event.key !== 'Control') {\n that.$.fireEvent('changing', { 'currentValue': inputValue, 'validValue': that.value, 'radix': that._radixNumber });\n }\n }\n\n event.preventDefault();\n }", "title": "" }, { "docid": "51a947d4452278522139c78d35bda275", "score": "0.5542398", "text": "_inputChangeHandler(event) {\n event.stopPropagation();\n event.preventDefault();\n }", "title": "" }, { "docid": "16d6aff3c92c58d63ca310dc87efc226", "score": "0.5539674", "text": "onExcludeFieldKeyUp(event) {\n if (!this.validateExcludeField(event))\n return;\n if (event.keyCode === 13) {\n this.addItemToExcludeList(event);\n }\n }", "title": "" }, { "docid": "26f4e8ae378390dc16c8b708f71cbec7", "score": "0.5524224", "text": "_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 }", "title": "" }, { "docid": "387d65777af8a09d31387fd54d97390d", "score": "0.55240566", "text": "filterInput(e) {\n e.target.value = e.target.value.replace(/[^0-9]+/g, '');\n }", "title": "" }, { "docid": "f11a18197efa724b9edde6ae944b0b2e", "score": "0.5513739", "text": "function newUpdateUnformattedPhoneNumberField(enteredField, originalField) {\r\n var phnumEntry = enteredField.value;\r\n originalField.value = phnumEntry.replace(/[^\\d]/g, '');\r\n}", "title": "" }, { "docid": "5dc8b60934426723bcefffa6ab25b4b6", "score": "0.5507126", "text": "function focusOnInput(input) {\r\n\t\tif(input != null){\r\n\t\t\t$(input).val(\"\"); // reset it\r\n\t\t\t$(input).focus();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "6c7bd59c4b1de1e9740dbf62d8980130", "score": "0.5490201", "text": "function cleanSimpleQueryForm() {\n $(':focus').blur()\n $('#simple-search input').val('')\n }", "title": "" }, { "docid": "559268cecc49c676507ae48bcb47597d", "score": "0.5489825", "text": "function validateAndMoveName(event){\n\n if(!(document.getElementById('dri-name').value == undefined || document.getElementById('dri-name').value ==\"\") && event.keyCode == 13){\n\n document.getElementById(\"dri-num\").focus();\n\n }\n\n else{\n //continue;\n if(event.keyCode != 13){\n document.getElementById(\"dri-name\").focus();\n }\n else{\n\n alert(\"Driver Name field cannot be empty\");\n return false;\n }\n\n\n }\n\n}", "title": "" }, { "docid": "77b30a21fbbec7e4afad89d7daa06963", "score": "0.54797614", "text": "function keyChanges(e) {\n\t\t\t\te = e || window.event;\n\t\t\t\tvar key = e.keyCode || e.which;\n\t\t\t\tif (key == 13) {\n\t\t\t\t\tif (e.type == \"keyup\") {\n\t\t\t\t\t\tsendLine();\n\t\t\t\t\t\tsetVisitorTyping(false);\n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t} else {\n\t\t\t\t\tvar text = getTrimmedValue(lpChatID_lpChatInputTextField, false);\n\t\t\t\t\tif(!lpVisitorTypingMsg && text != \"\"){\n\t\t\t\t\t\tsetVisitorTyping(true);\n\t\t\t\t\t} else if(lpVisitorTypingMsg && text == \"\"){\n\t\t\t\t\t\tsetVisitorTyping(false);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}", "title": "" }, { "docid": "e3f3d52c742dbc96e1b894f87df7a73e", "score": "0.54777557", "text": "internalOnInput(event) {\n const me = this; // Keep the value synced with the inputValue at all times.\n\n me.inputting = true;\n me.value = me.input.value;\n me.inputting = false;\n me.trigger('input', {\n value: me.value,\n event\n });\n me.changeOnKeyStroke && me.changeOnKeyStroke(event); // since Widget has Events mixed in configured with 'callOnFunctions' this will also call onInput\n }", "title": "" }, { "docid": "f497c9eef39f8258d5bfd98a1d8c60f2", "score": "0.54758465", "text": "function inputKeyDown(event, inputBox) {\n // Submit on enter key, dis-allowing blank messages\n if (event.keyCode === 13 && inputBox.value) {\n // Retrieve the context from the previous server response \n var context;\n var latestResponse = Api.getResponsePayload();\n if (latestResponse) {\n context = latestResponse.context;\n }\n\n // Send the user message \n Api.sendRequest(inputBox.value, context);\n \n //hide pincode on html\n var responseText = $(\"#scrollingChat .segments:eq(-2) .message-inner\").text();\n if(responseText.split('.').length>1){\n responseText = responseText.split('.')[1].trim();\n }\n if(inputBox.value.match(/^\\d+$/) && inputBox.value.length < 5 &&\n responseText == \"Please enter your 4-digit PIN\"\n || responseText == \"Please enter your PIN again\") {\n var tx = inputBox.value.replace(/./g,'*'); \n $(\"#scrollingChat .segments:last .message-inner p\").html(tx)\n }\n \n // Clear input box for further messages\n inputBox.value = '';\n Common.fireEvent(inputBox, 'input');\n }\n }", "title": "" }, { "docid": "b5903b73a358757bd223c6e30de69731", "score": "0.5467109", "text": "function enter_detector(e) {\r\n\t// if enter key is pressed lose focus\r\n\tif(e.which==13||e.keyCode==13){\r\n\t$(this).blur();\r\n\t}\r\n\t}", "title": "" }, { "docid": "886c691618fe08acf9e4ba2a4fff70e6", "score": "0.54650414", "text": "handleSubmit(e) {\n e.preventDefault();\n let firstValue, secondValue;\n const [firstInput, secondInput] = e.target.elements;\n firstValue = firstInput.value.trim().split(' ').join('');\n secondValue = secondInput.value.trim().split(' ').join('');\n\n this.checkValues(firstValue,secondValue);\n\n firstInput.value = '' ;\n secondInput.value = '' ;\n firstInput.focus();\n\n }", "title": "" }, { "docid": "305c3f9777e876296781f43cd56e7228", "score": "0.5464926", "text": "function handleInput() {\n let inputField = document.querySelector(\".tagGenerator__input\");\n if (inputField.value.includes(\",\")) {\n let valuesArray = inputField.value.split(\",\");\n for (let value of valuesArray) {\n if (!value.trim().length) {\n continue;\n }\n addTag(value);\n }\n inputField.value = \"\";\n }\n let inputValue = inputField.value;\n if (!inputValue) return\n if (!inputValue.trim().length) {\n inputField.value = \"\";\n }\n else {\n addTag(inputValue);\n inputField.value = \"\";\n }\n}", "title": "" }, { "docid": "909eb454242e23fbe5e8c9bf20e74924", "score": "0.546325", "text": "function space(event){\r\n \r\n if (event.keyCode == 32 || event.which == 32){\r\n textoEntrada.value=\"\";\r\n alert('no lo haga compa'); \r\n textoEntrada.value.trim();\r\n }\r\n \r\n}", "title": "" }, { "docid": "1a87645adf1af6a4f77d82237270da71", "score": "0.5460277", "text": "function nullValues() {\n\n\tif (document.getElementById('udAttackTitle').value == '') {\n\t\tdocument.getElementById('udAttackTitle').focus();\n\t\treturn true;\n\t}\n\tif (document.getElementById('attackCode').value == '') {\n\t\tdocument.getElementById('attackCode').focus();\n\t\treturn true;\n\t\n\t}\n\tif (document.getElementById('description').value == '') {\n\t\tdocument.getElementById('description').focus();\n\t\treturn true;\n\t}\n\t\n\treturn false;\n}", "title": "" }, { "docid": "b19e126af245132276ac93e3a484862d", "score": "0.5453992", "text": "function keyUp(event) {\n event.preventDefault();\n //return if edit text contains only whitespaces\n if (inputText.val().trim() == \"\") {\n inputText.val('');\n return;\n }\n if (event.key === 'Enter') {\n addToDo();\n }\n}", "title": "" }, { "docid": "cd9e8bb3880d4a038d3cd08ae6c6dd63", "score": "0.54468274", "text": "handleInput(oldState) {\n const { tr } = this;\n const { $cursor } = tr.selection;\n if ($cursor) {\n const { pos } = $cursor;\n const type = this.hasPlaceholder(oldState);\n const note = this.currentNote;\n if (!note && type) {\n const addedChars = charsAdded(oldState, tr);\n if (addedChars > 0) {\n const from = pos - addedChars;\n const to = pos;\n return this.addNotes([{ from, to, meta: { type } }], false, true);\n }\n }\n }\n\n return this;\n }", "title": "" }, { "docid": "99a41a10527700f040f083c60c2e21c9", "score": "0.5445033", "text": "function gatherInputs() {\n\t // Nothing to do here!\n\t // The event handlers do everything we need for now.\n}", "title": "" }, { "docid": "b11882726fbf30867e5c3dba727b808a", "score": "0.5444652", "text": "function trimInput(field){\n if(vm.paste){\n if(vm.questionFocus)\n field.question = field.question.substring(0, 1000);\n else if(vm.answerFocus)\n field.answer = field.answer.substring(0, 1000);\n vm.paste = false;\n }\n }", "title": "" }, { "docid": "02e64cfe594f3dc5635f6bc23f917192", "score": "0.54436725", "text": "function handleInputNumber() {\n $('input[type=number]').on('wheel', function (e) {\n e.preventDefault();\n });\n\n $('input[type=number]').keyup(function (event) {\n // skip for arrow keys\n if (event.which >= 37 && event.which <= 40) return;\n\n // format number\n $(this).val(function (index, value) {\n return value\n .replace(/\\D/g, \"\");\n });\n });\n }", "title": "" }, { "docid": "f71271e307905591991bafd79be1b8b7", "score": "0.54435307", "text": "function clearRepairAgentInputs()\r\n {\r\n $('#claimdetails-repairagentid-input').val('');\r\n $('#claimdetails-repairagentname-input').val('');\r\n $('#claimdetails-repairagentphone-input').val('');\r\n $('#claimdetails-repairagentemail-input').val('');\r\n $('#claimdetails-repairagentunithouse-input').val('');\r\n $('#claimdetails-repairagentstreet-input').val('');\r\n $('#claimdetails-repairagentsuburbcity-input').val('');\r\n $('#claimdetails-repairagentstate-input').val('');\r\n $('#claimdetails-repairagentpostcode-input').val('');\r\n }", "title": "" }, { "docid": "f71271e307905591991bafd79be1b8b7", "score": "0.54435307", "text": "function clearRepairAgentInputs()\r\n {\r\n $('#claimdetails-repairagentid-input').val('');\r\n $('#claimdetails-repairagentname-input').val('');\r\n $('#claimdetails-repairagentphone-input').val('');\r\n $('#claimdetails-repairagentemail-input').val('');\r\n $('#claimdetails-repairagentunithouse-input').val('');\r\n $('#claimdetails-repairagentstreet-input').val('');\r\n $('#claimdetails-repairagentsuburbcity-input').val('');\r\n $('#claimdetails-repairagentstate-input').val('');\r\n $('#claimdetails-repairagentpostcode-input').val('');\r\n }", "title": "" }, { "docid": "ffb6c4a94ac2b5fc513108bed007854b", "score": "0.5439468", "text": "_keyup(event) {\n // Allow user to move focus to chips next time he presses backspace\n if (!this._focusLastChipOnBackspace && event.keyCode === BACKSPACE && this.empty) {\n this._focusLastChipOnBackspace = true;\n event.preventDefault();\n }\n }", "title": "" }, { "docid": "7191622e92385a12b3dc0e4631791c0d", "score": "0.543865", "text": "function initializeInputOutputFields() {\n \"use strict\";\n document.getElementById(\"listInput\").value = \"\";\n document.getElementById(\"separatorInput\").value = \"\";\n document.getElementById(\"resultNumberCount\").value = \"\";\n document.getElementById(\"resultNumberTotal\").value = \"\";\n document.getElementById(\"resultWordCount\").value = \"\";\n}", "title": "" }, { "docid": "0556279fc60aecc2a3b040d57f43b119", "score": "0.5438262", "text": "function autoTrimTextInput() {\n $('input[type=text], textarea').blur(function() {\n var value = $.trim($(this).val());\n $(this).val(value);\n });\n }", "title": "" }, { "docid": "a4d513c0a7899f033371cb3498b28ee5", "score": "0.5437387", "text": "function keyupHandler() {\n\n var type;\n\n if (this.value !== valueKeyDown) {\n\n // Remove the placeholder\n this.className = this.className.replace(classNameRegExp, \"\");\n this.value = this.value.replace(this.getAttribute(\"placeholder\"), \"\");\n\n // Check if we need to switch the input type (this is the case if it's a password input)\n type = this.getAttribute(\"data-placeholdertype\");\n if (type) {\n this.type = type;\n }\n }\n if (this.value === \"\") {\n\n blurHandler.call(this);\n cursorToStart(this);\n }\n }", "title": "" }, { "docid": "35b20218a8641f82d66d76df3bdd01e5", "score": "0.54261833", "text": "onKeyPress(e) {\n if (e.which === 13 /* Enter */) {\n e.preventDefault();\n }\n }", "title": "" }, { "docid": "265f2ee575ad369f3617ee8d58fbd023", "score": "0.54225117", "text": "onPropertyDictChanged_() {\n // Do not proceed if the user has not opted for manual edit, or has\n // already made an edit.\n if (this.allFieldsReadOnly || this.hasAnyInputFocused_) {\n return;\n }\n\n this.attemptToFocusFirstEditableCrInput_();\n }", "title": "" }, { "docid": "c3d8fafd72ae39f89dc4e4fe6ba10e1e", "score": "0.5421235", "text": "handleButtonPress(e) {\n if (e.which === 13) {\n const val = e.target.value;\n\n // No blank items allowed!\n if (val === '') { alert('Type in the item first'); return; }\n this.props.onAddItem({ id: this.props.id, value: val, status: false });\n e.target.value = '';\n }\n }", "title": "" }, { "docid": "3126426f91eb4b02fa8ec21c5152ef44", "score": "0.54206115", "text": "function limparInput(){\n input.value = ' ';\n input.focus();\n \n}", "title": "" }, { "docid": "63563cb4d6ce3c48deebb616893a1cc8", "score": "0.5418521", "text": "function Input(){\n\tvar inputFields=$('[type=\"text\"]')\n\tfor(var i=0;i<inputFields.length;i++){\n\t\tinputFields[i].value=randomString({maxLen:30,minLen:1,charSet:nums.splice(centerKybd.splice(centerKybd.splice(centerKybd.splice(centerKybd)))),embed:''});\n\t}\n}", "title": "" }, { "docid": "3c2f68c66d20343f690bf66cbe920534", "score": "0.5418419", "text": "function eventcheck(event) {\n if (!event)\n return;\n try {\n var obj = event.target;\n if (obj.mozIsTextField) {\n if (event.keyCode == 9 || event.keyCode == 13) {\n if (obj.id == gtGrdObj(event.target.parentNode).editCtrl) {\n event.preventDefault(true);\n event.stopPropagation();\n }\n else if (obj.value == \"\" && getIAttribute(event.target.nextSibling, \"q\") == \"t\") {\n event.preventDefault(true);\n event.stopPropagation();\n }\n }\n }\n }\n catch (ex) { }\n}", "title": "" }, { "docid": "ecd5e712de88ac5cf4d11c2fe970126b", "score": "0.54178727", "text": "handleEditInput(event) {\n event.preventDefault();\n return false;\n }", "title": "" }, { "docid": "a2234fe71d62edd82f811a62b444bd2b", "score": "0.5414671", "text": "function spacePrevent(event)\r\n\t{\r\n\t\tvar key = event.charCode;\r\n\t\tvar address=$(\"#addressInput\").val();\r\n\r\n\t\tif(key==32 && !isEmpty(address))\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t}", "title": "" }, { "docid": "301befa307efbe2e295bc4f7cfca837d", "score": "0.54131794", "text": "function inputOnchange()\n {\n if(checkRegex())\n {\n inputClearError();\n addTokenToList();\n updateTextarea();\n return;\n }\n inputError();\n }", "title": "" }, { "docid": "a2c59a2613f3fd434a65fd561d25dd5e", "score": "0.5413025", "text": "clearInputFieldValue() {\r\n /** HTMLInputElement : To make the element as HTMLInputElement and provides special properties and methods for manipulating the layout and presentation of input elements */\r\n const inputElement = this.getInputElement();\r\n if (inputElement) {\r\n inputElement.value = '';\r\n this.searchValue = '';\r\n this.showSearchBoxList = !this.showSearchBoxList;\r\n }\r\n }", "title": "" }, { "docid": "b2b144f05215820609e9c265d2e2c78a", "score": "0.5412141", "text": "onKeyDown(event: React.KeyboardEvent<HTMLDivElement>) {\n\t\tif (event.key === 'Enter') {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\tif (this.state.shift) {\n\t\t\t\tthis.setState({\n\t\t\t\t\tvalue:this.state.value+'\\n',\n\t\t\t\t})\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.handleSubmit();\n\t\t\t}\n\t\t} else if (event.key === 'Shift') {\n\t\t\t\tthis.setState({\n\t\t\t\t\tshift: true,\n\t\t\t\t});\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "9a6fcf131eaa3d54630a42501d8b012e", "score": "0.5410674", "text": "function emptyExtraFields(fieldsToEmpty){\n if(fieldsToEmpty){\n Array.from(fieldsToEmpty.split(',')).forEach(function(selector){\n let fields = document.querySelectorAll(selector);\n Array.from(fields).forEach(function(field){\n if(field){\n field.value = '';\n }\n });\n });\n Array.from(document.querySelectorAll('[data-click-bind]')).forEach(function(binding){\n renderState(binding);\n });\n }\n }", "title": "" }, { "docid": "7898562824660e66b418769378379fb2", "score": "0.54104173", "text": "function avoidEnter(e){\n if(e.keyCode==13){\n e.preventDefault();\n }\n}", "title": "" }, { "docid": "ea2657aa5c5f062a5c9bfaaab13e7f63", "score": "0.54051423", "text": "function restore_inputs () {\n\n\t\t\t\tparse_variables();\n\n\t\t\t\t$('.form-w').val(W);\n\t\t\t\t$('.form-b').val(B);\n\t\t\t\t$('.form-mf').val(Mf);\n\t\t\t\t$('.form-mt').val(Mt);\n\n\t\t\t}", "title": "" }, { "docid": "5267cf3dd3735544153eaef77e7d08b4", "score": "0.5393594", "text": "function cleanInput() {\r\n $('#fetch-one-character').val('');\r\n $('#new-name').val('');\r\n $('#new-occupation').val('');\r\n $('#new-weapon').val('');\r\n $('#new-debt').val('');\r\n $('#edit-id').val('');\r\n $('#edit-name').val('');\r\n $('#edit-occupation').val('');\r\n $('#edit-weapon').val('');\r\n $('#edit-debt').val('');\r\n $('#delete-one-character').val('');\r\n }", "title": "" }, { "docid": "9c972df7d989fd2789cabd0fb3b4c847", "score": "0.53898215", "text": "handlePCInputKeyDown(ev){\n EventUtils.filterNumericInput(ev)\n }", "title": "" }, { "docid": "7b138cc0af7b59b632a00bda36cd607a", "score": "0.5387271", "text": "_inputKeydownHandler(event) {\n const that = this,\n keyCode = !event.charCode ? event.which : event.charCode;\n\n if (keyCode === 40 && that._isIncrementOrDecrementAllowed()) {\n // decrement when Down Arrow is pressed\n that._incrementOrDecrement('subtract');\n }\n else if (keyCode === 38 && that._isIncrementOrDecrementAllowed()) {\n // increment when Up Arrow is pressed\n that._incrementOrDecrement('add');\n }\n\n that._keydownInfo = { value: that.$.input.value, specialKey: event.altKey || event.ctrlKey || event.shiftKey };\n }", "title": "" }, { "docid": "f86a6eeb5473c6255e8da1bfbc081181", "score": "0.5384253", "text": "function backupInput() {\n lastInput = ELEMENTS.UPDATE_TEXTAREA.val();\n }", "title": "" }, { "docid": "b59ddfc25118271ef834534ab3bff45c", "score": "0.5375738", "text": "_inputBlurHandler() {\n const that = this;\n\n if (that._suppressBlurEvent === true) {\n // suppresses validation because it was already handled in \"_incrementOrDecrement\" function\n that._suppressBlurEvent = false;\n\n if (that._formattedValue) {\n that._cachedInputValue = that._formattedValue;\n that.$.input.value = that._formattedValue;\n delete that._formattedValue;\n }\n }\n else if (that.$.input.value !== that._editableValue) {\n that._triggerChangeEvent = true;\n that._validate();\n that._triggerChangeEvent = false;\n }\n else {\n that.$.input.value = that._cachedInputValue;\n }\n\n if (that.radixDisplay) {\n that.$.radixDisplayButton.removeAttribute('focus');\n }\n\n if (that.opened) {\n that._closeRadix();\n }\n\n if (that.spinButtons) {\n that.$.spinButtonsContainer.removeAttribute('focus');\n }\n if (that.showUnit) {\n that.$.unitDisplay.removeAttribute('focus');\n }\n\n that.removeAttribute('focus');\n }", "title": "" }, { "docid": "c634a5231067edf3d3519078d4203982", "score": "0.53746337", "text": "function setUpInputBindings() {\n //Called when setting the input field\n //_data.attachChangeEventHandler();\n return;\n}", "title": "" }, { "docid": "addd35d9c380de52a68bde23ffa5e82b", "score": "0.53695405", "text": "function inputKeyDown(event, inputBox) {\n // Submit on enter key, dis-allowing blank messages\n if (event.keyCode === 13 && inputBox.value) {\n Api.sendRequest(inputBox.value);\n\n // Clear input box for further messages\n inputBox.value = '';\n Common.fireEvent(inputBox, 'input');\n }\n}", "title": "" }, { "docid": "13cb9aaac4da5898ce61da63efff2dc2", "score": "0.53680193", "text": "componentDidMount() {\n super.componentDidMount();\n\n if (Object.keys(inputFields).length > 0) {\n const fields = Object.entries(inputFields);\n for (let i = 0; i < fields.length - 1; i++) {\n const el = document.getElementById(fields[i][1].id);\n if (fields[i][1].defaultValue) {\n el.firstElementChild.value =\n validators.isFunction(fields[i][1].defaultValue) ?\n fields[i][1].defaultValue(this) : fields[i][1].defaultValue;\n }\n if(fields[i][1].update) {\n el.addEventListener('keyup', e => {\n el.firstElementChild.value = fields[i][1].update(el, e.target.value);\n });\n }\n if (el.firstElementChild.nodeName === 'INPUT') {\n el.addEventListener('keypress', (e) => {\n if (e.key === 'Enter') {\n const next = document.getElementById(fields[i + 1][1].id);\n next.firstElementChild.focus();\n }\n });\n el.addEventListener('keydown', (e) => {\n if (i !== 0 && (e.key === 'Backspace' && !e.target.value) || e.key === 'ArrowUp') {\n const prev = document.getElementById(fields[i - 1][1].id);\n prev.firstElementChild.focus();\n }\n if (e.key === 'ArrowDown') {\n const next = document.getElementById(fields[i + 1][1].id);\n next.firstElementChild.focus();\n }\n });\n }\n }\n const lastEl = document.getElementById(fields[fields.length - 1][1].id);\n if(fields[fields.length - 1][1].update) {\n lastEl.addEventListener('keyup', e => {\n lastEl.firstElementChild.value = fields[fields.length - 1][1].update(lastEl, e.target.value);\n });\n }\n if (fields[fields.length - 1][1].defaultValue) {\n lastEl.firstElementChild.value =\n validators.isFunction(fields[fields.length - 1][1].defaultValue) ?\n fields[fields.length - 1][1].defaultValue(this) : fields[fields.length - 1][1].defaultValue;\n }\n if (lastEl.firstElementChild.nodeName === 'INPUT') {\n lastEl.addEventListener('keypress', (e) => {\n if (e.key === 'Enter') {\n const next = document.getElementById(submitField.id);\n next.click();\n }\n });\n if (fields.length > 1) {\n lastEl.addEventListener('keydown', (e) => {\n if (e.key === 'Backspace' && !e.target.value) {\n const prev = document.getElementById(fields[fields.length - 2][1].id);\n prev.firstElementChild.focus();\n }\n if (e.key === 'ArrowUp') {\n const prev = document.getElementById(fields[fields.length - 2][1].id);\n prev.firstElementChild.focus();\n }\n });\n }\n }\n }\n document.getElementById(submitField.id).addEventListener('click', (e) => {\n e.preventDefault();\n const inputData = this.validate();\n if (inputData) {\n const arg = inputData.reduce((acc, v) => {\n acc[v.field] = v.value;\n return acc;\n }, {});\n onValid && onValid(arg, this, e, submitField.id);\n } else {\n onInvalid && onInvalid(this, e, submitField.id);\n }\n });\n }", "title": "" }, { "docid": "05be28a0050318b229fb885d2ad5449b", "score": "0.53606886", "text": "_handleAddFromValue() {\n this._focusedField = VALUE;\n this._addPair();\n }", "title": "" }, { "docid": "46cb56fc11c99cfabbd1d428468a71ca", "score": "0.5357149", "text": "function stopSubmitTriggering() {\r\n $('#submission-form .form-field').on(\"focus\", \"input[type='text']\", function(e) {\r\n $('html').keydown(function(e) {\r\n if (e.keyCode == 13) {\r\n e.preventDefault();\r\n return false;\r\n }\r\n });\r\n });\r\n}", "title": "" }, { "docid": "84edf37afeeb8ca1ad6425feeeff6bbb", "score": "0.5356328", "text": "function resetInputs(inp){\n var ri = function(input){\n if ($(input).next().hasClass('input-tip')){\n var $parent = $(input).parent().parent();\n $(input).next().remove();\n $parent.css('height',$parent.outerHeight() - 20 + 'px');\n }\n $(input).removeClass('bd-red');\n };\n if (typeof inp != \"undefined\"){\n ri(inp);\n return;\n }\n $('#signup_form input').each(function(index,input){\n ri(input);\n });\n }", "title": "" }, { "docid": "3e6eb81b93b434cc64dbc0e19e8432b8", "score": "0.5355549", "text": "static controlEnter(e){\n if (e.keyCode == 13) {\n e.preventDefault();\n }\n }", "title": "" }, { "docid": "1b9198a047b8ee655f4cad62bbae43da", "score": "0.53553057", "text": "function PrepareDefaultEventHandlers() {\r\n $(\":text\").focus(textboxHighlight).blur(textboxRemoveHighlight);\r\n $(\":password\").focus(textboxHighlight).blur(textboxRemoveHighlight);\r\n $(\"textarea\").focus(textboxHighlight).blur(textboxRemoveHighlight);\r\n }", "title": "" }, { "docid": "9cc14d69fe59b46475b26b7a34fc4f8a", "score": "0.5348466", "text": "handleKey(ev) {\n if (['Backspace', 'Delete'].includes(ev.key)) {\n this.isBackspace = true;\n if (!this.value) {\n if (this.required) {\n this.isValid = false;\n this.element ?\n this.element.querySelector('textarea').setAttribute(ARIA_INVALID, 'true')\n :\n this.element.querySelector('textarea').setAttribute(ARIA_INVALID, 'true');\n }\n }\n }\n }", "title": "" }, { "docid": "f9c1b394a4f7352b410dee58515d454c", "score": "0.5338002", "text": "function addbyEnter(event) {\r\n\tif (inputValueLength() && event.keyCode === 13) \r\n\t{\r\n\tinputItemsName()\r\n\t}\r\n}", "title": "" } ]