query_id
stringlengths
32
32
query
stringlengths
7
29.6k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
bb72d27d0e57849c6d6ef46ffab447de
Name the dommodule ID that should be targeted for the element template
[ { "docid": "8affce6005f04681877dc32df796ea3c", "score": "0.0", "text": "static get is() { return 'lingo-live-text-chat'; }", "title": "" } ]
[ { "docid": "ff353667b54457341508aedc671b8df0", "score": "0.6370663", "text": "function set_id (component_reference, idname)\n {\n component_reference.style.idName = idname;\n }", "title": "" }, { "docid": "a57ba4b1ca5a4821049f63192bfc2043", "score": "0.63467485", "text":...
4f4e1f6d24c076fc6e503c3bb5899d36
check if user came to BR from a SR/BR
[ { "docid": "951b2154e6c843696698722b6a273d24", "score": "0.4711564", "text": "function checkUserEntry(user) {\n\tvar promise = onBreakRef.once('value');\n\tvar ms = 1000 * 5;\n\tsetPromiseTimeout(ms, promise)\n\t.then((snapshot) => {\n\t\tif (snapshot.child(user.uid).exists()) { // user record exists un...
[ { "docid": "905c8d4ed0ff12a987a6aa37bd79e676", "score": "0.5576734", "text": "function originIsAllowed(origin, r) {\n console.log(\"r:\" , r);\n logit(\"originIsAllowed: \" + origin);\n if(r.BLP == '8653') return true;\n return false;\n}", "title": "" }, { "docid": "8015fed7454b9df5d1678...
e2aba2a5a20cd89139018fafb10094a8
Handles selectmenu input/chosen option
[ { "docid": "7f7f45742b9e6440136f71760c06f2f1", "score": "0.0", "text": "function parseSelect(elementTag) {\r\n const selectItems = document.querySelector(elementTag);\r\n const item = selectItems.options[selectItems.selectedIndex];\r\n\r\n if (!item.value) {\r\n return \"...
[ { "docid": "4b151012fa9403a1d353c24a359c81cb", "score": "0.68471575", "text": "_onSelectedOptionClick(event) {\n this._openSelect()\n this._toggleHide()\n this.input.focus()\n }", "title": "" }, { "docid": "d03de2a5c1381d82041f94d96233a333", "score": "0.65849483", "text": "...
86d3ce19f5eaa5ccf4709e8eaf299a57
addNumbersAPI() This function should perform the calculation in the app.py file Write a function that will retrieve the values from the text box elements on the page form a url string with the values as arguments Use callAPI() function to form and send a request object
[ { "docid": "76fdcdbfe89d7b24480271f06a7e6176", "score": "0.8423562", "text": "function addNumbersAPI(){\n let num1 = Number(document.getElementById(\"add1\").value);\n let num2 = Number(document.getElementById(\"add2\").value);\n let pythonRoute = \"http://127.0.0.1:5000/api/add?num1=\" + num1 ...
[ { "docid": "bf90d96e44bc02c69f7ffbe7dbea5bcf", "score": "0.7718387", "text": "function multiplyNumbersAPI(){\n let num1 = Number(document.getElementById(\"multi1\").value);\n let num2 = Number(document.getElementById(\"multi2\").value);\n let pythonRoute = \"http://127.0.0.1:5000/api/multiply?n...
1918e405a967a53236ce177e34de3273
Turn duration of the movies from hours to minutes
[ { "docid": "2964be2780ac5eecc109d8f8726b2b80", "score": "0.76044226", "text": "function turnHoursToMinutes(movies) {\n //creamos el array para pasar a minutos\n return movies.map(elm => {\n const newMovies = { ...movies };\n //llamamos a la segunda función para tener mas clean la principal\n ...
[ { "docid": "2e7ca6101d4603cafeaad2ea1a678050", "score": "0.8222426", "text": "function turnHoursToMinutes(movies) {\n\t\n\tmovies.forEach(function(movie){\n\t\tvar theDuration = [];\n\n\t\ttheDuration[0] = movie.duration.split(\"h\");\n\t\ttheDuration[1] = movie.duration[1].split(\"min\")\n\n\t\t// plai...
40eae1ca585b68352d6a11ae735bd46d
Iterates over all items in the DialerQueue and executes there callback with an error. This causes the entire DialerQueue to be drained
[ { "docid": "0dfad77c8250092ca85ae3ed412c64c0", "score": "0.0", "text": "stop () {\n this.isRunning = false\n // Clear the general queue\n this._queue.clear()\n // Clear the cold call queue\n this._coldCallQueue.clear()\n\n this._cleanInterval.clear()\n\n // Abort the individual peer...
[ { "docid": "daedb1e4a0be6ad9cc53e7b0fa4e1f91", "score": "0.61996436", "text": "run () {\n if (!this.isRunning) return\n\n if (this._dialingQueues.size < this.switch.dialer.MAX_PARALLEL_DIALS) {\n let nextQueue = { done: true }\n // Check the queue first and fall back to the cold call que...
7e7daba198d8d8ef95677b7e2a88745e
calculate the password strength
[ { "docid": "f3756d756b5ba6c079acf74ad3d4d646", "score": "0.6813081", "text": "function score_password(pass) {\n var score = 0;\n if (!pass)\n return score;\n\n // award every unique letter until 5 repetitions\n var letters = new Object();\n for (var i=0; i<pass.length; i+...
[ { "docid": "cdf41c7768072abc72d2d7ba6dad4a2d", "score": "0.8608523", "text": "function passwordStrength() {\n\tlet pass = this.value;\n\n\tlet lengthWeight = pass.length * 4;\n\tlet uppercaseWeight = pass.replace(/[A-Z]/g, '').length * 2;\n\tlet lowercaseWeight = pass.replace(/[a-z]/g, '').length * 2;\n...
af95e535b53426e9efd989cff8a4ad36
Get value of style to Prolog object
[ { "docid": "0ae1f7e7714525c72b4decb203ff9076", "score": "0.0", "text": "function styleToProlog( str ) {\n\t\tif( str === undefined || str === null )\n\t\t\treturn\n\t\telse if( /^-?[0-9]*\\.?[0-9]*\\s*px\\s*$/.test( str ) )\n\t\t\treturn new pl.type.Term( \"px\", [new pl.type.Num( parseInt( str ) )] );\...
[ { "docid": "4973247a13acd7bde2bc4dda856023fd", "score": "0.70587105", "text": "function getStyle(si) {\n\treturn getObj(si).style;\n}", "title": "" }, { "docid": "86aeb2784e62e15ae84cd352b791012b", "score": "0.7022757", "text": "get style() {\n return this.__style.get();\n...
78503d1ba34c9761d0e2fa56dce9e9ef
$Build static map ============================================================
[ { "docid": "7f0c635d6a3c6acb3c34e7c93410d120", "score": "0.74311787", "text": "function buildStatic() {\n\t// https://maps.google.com/maps?q=225+delaware+avenue,+Buffalo,+NY&hl=en&sll=42.746632,-75.770041&sspn=5.977525,8.591309&t=h&hnear=225+Delaware+Ave,+Buffalo,+Erie,+New+York+14202&z=16\n\t// API key...
[ { "docid": "3d3e707fc4e5d4274d599a164a633bef", "score": "0.7036467", "text": "function makeStaticMap() {\n calculateCenterOfMap();\n if(windowWidth < 1280) {\n staticOptions.width = windowWidth;\n }\n if(windowHeight < 1280) {\n staticOptions.height = windowHeight;\n }\n staticOptions.bearin...
6d12bc53de75cee42d4e29a5fffb7463
Just to save space.
[ { "docid": "8bc7632dcabece5ac2a51e8c900aea16", "score": "0.0", "text": "function $(id) {\r\n\r\n return document.getElementById(id);\r\n\r\n}", "title": "" } ]
[ { "docid": "44dfde9906fa1c183245d889a94dcfc2", "score": "0.73703647", "text": "private internal function m248() {}", "title": "" }, { "docid": "650ff554859977bab92401016e1b7806", "score": "0.7116535", "text": "private public function m246() {}", "title": "" }, { "docid": ...
4c9ff39aec6bc7074d7e6bf555fe0e8e
handle the Indeed returning data from the api to objects with data we need
[ { "docid": "0f87341429928a25e3b4756a9c069f51", "score": "0.0", "text": "handleIndeedData(indeedData) {\n const img = \"https://ya-webdesign.com/images/job-vector-4.png\";\n const parsedIndeedData = indeedData.map(job => {\n return {\n title: job.jobtitle,\n ...
[ { "docid": "bed9636c1b0da8edd651d330f467742e", "score": "0.6344902", "text": "prepareResponseContent(data) {\n if (type.object(data)) {\n if (data.Response) delete data.Response;\n\n Object.keys(data).forEach((propertyName) => {\n var newName =...
b4c35f81f166c97f347720f15dee1dec
Copyright (C) 19912018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your...
[ { "docid": "db5f414c15d065e60b5a2470ed11acc5", "score": "0.0", "text": "function h$Set(s) {\n this._vals = [];\n this._keys = [];\n this._size = 0;\n}", "title": "" } ]
[ { "docid": "01ae7617b120cfc247579c6fd3d1def3", "score": "0.6270356", "text": "function polyfillSet() {\n mix(Set.prototype, SetStd.prototype);\n}", "title": "" }, { "docid": "fd5646c462542d58532dcfb9179f23be", "score": "0.54811925", "text": "function polyfill() {\n if (navi...
2037bff52f4deabd1b1bb78d98bce0d4
It generates shape data with random size and xposition
[ { "docid": "f2f3de34463fedcd81db8c847f813c48", "score": "0.6214518", "text": "_generateShapes(containerSize, amount) {\n const ms = new Date().getTime();\n for (let i = 0; i < amount; i++) {\n const width = random(SHAPE_SIZE_LIMIT.WIDTH.MIN, SHAPE_SIZE_LIMIT.WIDTH.MAX);\n ...
[ { "docid": "a1f339f5ac0fe96588e00602de50b8b7", "score": "0.71093976", "text": "generateShapes() {\n const x = Math.floor(Math.random() * APP_WIDTH);\n const y = this.appHeight - 450;\n this.createRandomShape(x, y);\n }", "title": "" }, { "docid": "a4ff61300b1a290c063...
b25aeac1d511ddf27e8c9ff08fba796d
creates a dialog box when picture is clicked
[ { "docid": "268c94f5f821646c23b0bd9115df6b26", "score": "0.5761532", "text": "function createDialog(){\n $( \"#resizeLeft\" ).click(function() {\n $('#dialogLeft' ).dialog();\n $( \"#dialogMiddle\" ).dialog( \"close\" );\n $( \"#dialogRight\" ).dialog( \"close\" );\n });\n ...
[ { "docid": "8438f34853a65c97b82aac6eef5ebca1", "score": "0.69458735", "text": "function imageDialog() {\n // Dynamically create a div and store it in a variable.\n let $dialog3 = $('<div></div>').attr(`title`, ``);\n //use image source to append gif image\n $dialog3.append(\"<img src='\" + gifStr + ...
a838365e4d9e0fbbabb6607682f4bcc3
Attempts to complete a multibyte UTF8 character using bytes from a Buffer.
[ { "docid": "c17497bb303000ed2dfcfdb7d8f99eb1", "score": "0.0", "text": "function utf8FillLast(buf) {\n var p = this.lastTotal - this.lastNeed;\n var r = utf8CheckExtraBytes(this, buf, p);\n if (r !== undefined) return r;\n if (this.lastNeed <= buf.length) {\n buf.copy(this.lastChar, p, 0, this.la...
[ { "docid": "30e2ed4439b89e26be27040d7737452b", "score": "0.7112214", "text": "function utf8CheckExtraBytes(self,buf,p){if((buf[0]&0xC0)!==0x80){self.lastNeed=0;return'\\ufffd';}if(self.lastNeed>1&&buf.length>1){if((buf[1]&0xC0)!==0x80){self.lastNeed=1;return'\\ufffd';}if(self.lastNeed>2&&buf.length>2){i...
d65dc736dd4c965d82895c9a6f5132ed
handle update has a lot of moving parts, thats why so many console.logs
[ { "docid": "ce31446395fcc36a86404698223e1dd3", "score": "0.0", "text": "function handleUpdateClicked(){\n $('.js-bookmark-list').on('click','.js-update-bookmark-button', event =>{\n event.preventDefault();\n console.log('update clicked');\n const title = $('.js-add-updatedbookmark-titl...
[ { "docid": "7d2da88beefe791ac8ddc4fd49eb3f38", "score": "0.74115723", "text": "function update() {}", "title": "" }, { "docid": "7d2da88beefe791ac8ddc4fd49eb3f38", "score": "0.74115723", "text": "function update() {}", "title": "" }, { "docid": "7d2da88beefe791ac8ddc4fd49...
c4d3ee4061efd5cc49f41ce4700ce414
setting and clearing timer for the start and reset of the game prompting for initials, and storing user information into userScores array on localStorage
[ { "docid": "250c47a0e9396956c591c9dfcdb11eae", "score": "0.7512541", "text": "function setTime() {\n secondsLeft = 30 \n intervalTimer = setInterval(function() {\n secondsLeft--;\n countDown.textContent = secondsLeft-1;\n\n if(secondsLeft === 0 || currentQuestionIndex === 5) {\n va...
[ { "docid": "8d80dbfa2b16cc395dab494991a88b02", "score": "0.751326", "text": "function endOfGame() {\r\n if (test) { console.log(\"--- endOfGame ---\"); }\r\n stopTime();\r\n clearDetails();\r\n\r\n timerTab.setAttribute(\"style\", \"visibility: hidden;\");\r\n\r\n let heading = document.createEleme...
45fa6d681fb11cfaf111650f0ca10ad0
it is a backbone objectc
[ { "docid": "d301c187120aa21c599bf5de7b10c8f8", "score": "0.0", "text": "function Signaler(root, roomid) {\n var socket;\n\n // unique identifier for the current user\n var userid = root.userid || getToken();\n\n if (!root.userid) {\n root.userid = userid;\n ...
[ { "docid": "74f6e306bfe175a621970adb831ef55b", "score": "0.6628317", "text": "function get_backbone_obj(id){\n /* XXX nikita/arik: need better way */\n var main = E.is_rmt || id!='be_bg_main' ? bg.RMT : bg.be_bg_main;\n return main && main.be_browser.backbone.server.obj[id];\n}", "title": "...
d2b5c4142bd510b9635f192d006ffbea
Checks each side of the current character, returns an object with values showing if they are on an unexplored edge
[ { "docid": "47902dd928128d8449bf03993850ddda", "score": "0.6215952", "text": "checkSidesOfCharacter() {\r\n let sides = { top: false, right: false, bottom: false, left: false }\r\n let playerPos = this.getTileAndSquareForCharacter(this.state.players[0])\r\n for (let side = 0; side <...
[ { "docid": "bf527d7026c79dfc1c7e26695053d25f", "score": "0.58354115", "text": "function isGameOver(state) {\n //if no blank spaces left, game over\n if (state[0].indexOf('blank') < 0) {\n return true;\n }//end if\n //check the rows\n for (var row = 0; row < state.length; row++) {\...
bc9b3275db00dbc9ae7b1c817e0cb844
checks a cache object for emptiness
[ { "docid": "27554deac3f0bb7e34b795783bc800ca", "score": "0.0", "text": "function isEmptyDataObject( obj ) {\n\tvar name;\n\tfor ( name in obj ) {\n\n\t\t// if the public data object is empty, the private is still empty\n\t\tif ( name === \"data\" && jQuery.isEmptyObject( obj[name] ) ) {\n\t\t\tcontinue;...
[ { "docid": "a186382e59f7e564fe14ab81da132afa", "score": "0.71035826", "text": "getCacheEmpty() {\n return gKeyIndex.length === 0;\n }", "title": "" }, { "docid": "843fc1b61d052f5fb962cf1941162cfa", "score": "0.6533182", "text": "function clearCache() {\n _cache = {};\n }", ...
26215f314490898b27d28285cc7ae3bd
Determine if we're running in a standard browser environment This allows axios to run in a web worker, and reactnative. Both environments support XMLHttpRequest, but not fully standard globals. web workers: typeof window > undefined typeof document > undefined reactnative: navigator.product > 'ReactNative'
[ { "docid": "bba7d95c60ccb50ccde6908b3ea4d54a", "score": "0.0", "text": "function isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );...
[ { "docid": "d161f518ca5b59e0865b8b3c6a2f81f5", "score": "0.81490695", "text": "function isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' || navigator.product === 'NativeScript' || navigator.product === 'NS')) {\n return false;\n }\n...
e35515cffeb00103939822a363caa4a9
Get URL to network IP where the server is alive.
[ { "docid": "66a0edd72cdde7f8def730c316a4db1f", "score": "0.0", "text": "getServerUrl() {\n return `http:${this.webpackConfig.getServerUrl()}`;\n }", "title": "" } ]
[ { "docid": "0c2f7273ae608e1812447d35944ecd2a", "score": "0.66243184", "text": "get serverUrl(){\n\t\tif (!$server.request) return \"\";\n\t\tif ($req.headers.getKeys().join().listContains(\"x-forwarded-host\")){\n\t\t\t\t\n\t\t\tvar proto = \"http\";\n\t\t\tif (\"x-forwarded-proto\" in $req.headers){\n\...
3096962b342d6eccb4f9b6941fcb267a
Checks if agents have correct plugins versions, if not install them
[ { "docid": "5b3d862c6bd817914a3b0451e1fb225c", "score": "0.6584409", "text": "function validate_plugin_installation(map, structure, runId, agentKey) {\n const agents = agentsService.agentsStatus();\n return new Promise((resolve, reject) => {\n let plugins = executions[runId].executionContex...
[ { "docid": "7edda7c0796b3532e6a476d9f99d8196", "score": "0.6700149", "text": "_checkPluginsCompatible() {\n const pluginIds = Object.getOwnPropertyNames(this.room._plugins);\n\n for (let pluginId of pluginIds) {\n let pluginRoom = this.getPluginById(pluginId);\n let pluginSpec = pluginRo...
1b463ed5865a980b0e92713229d30972
Function for liking/unliking genres
[ { "docid": "91c43021dff4bdf84f424d5d2fd41b97", "score": "0.6196855", "text": "async function handleGenreClick(e) {\n let target = Array.from(e.target.classList)\n //like genre\n if (this.dataset.liked === 'false' && target.includes(\"like-btn\")) {\n let res = await Genre.likeGenre(this....
[ { "docid": "de428a6d87daf2f858c63e9d51789fdb", "score": "0.6162079", "text": "function like(liked){\n //pic.liked recibe si e strue o false\n pic.liked=liked;\n //condicion if en una linea donde recibe el parametro like\n //si es verdadero se aumenta 1 si no (:) se resta 1\n pic.likes+= l...
c54ff8842d2e19670fa01e190f4fab5e
! moment.js locale configuration
[ { "docid": "cf31bfb59e388d54f98be84a6b29c324", "score": "0.0", "text": "function t(e,t,n,r){var a={m:[\"eine Minute\",\"einer Minute\"],h:[\"eine Stunde\",\"einer Stunde\"],d:[\"ein Tag\",\"einem Tag\"],dd:[e+\" Tage\",e+\" Tagen\"],w:[\"eine Woche\",\"einer Woche\"],M:[\"ein Monat\",\"einem Monat\"],MM...
[ { "docid": "d8460bf77dfc9523fd479119f87673fb", "score": "0.81861687", "text": "function b(e,t,n){return e+\" \"+function(e,t){return 2===t?function(e){var t={m:\"v\",b:\"v\",d:\"z\"};return void 0===t[e.charAt(0)]?e:t[e.charAt(0)]+e.substring(1)}(e):e}({mm:\"munutenn\",MM:\"miz\",dd:\"devezh\"}[n],e)}//...
6191aac083bb67950abf9bb03920e97b
r = gcd(b1,b2) BigNat > BigNat > BigNat
[ { "docid": "dc5092efe9536dd95615d7e8c7e85c65", "score": "0.772072", "text": "function h$ghcjsbn_gcd_bb(b1, b2) {\n h$ghcjsbn_assertValid_b(b1, \"gcd_bb b1\");\n h$ghcjsbn_assertValid_b(b2, \"gcd_bb b2\");\n var r;\n if(h$ghcjsbn_cmp_bb(b1, b2) === 2) {\n r = b1;\n b1 = b2;\n b2 = r;\n }\n ...
[ { "docid": "526cf3ba6c3e93a087d81f95fd76f985", "score": "0.77312136", "text": "function gcd(a, b) {\n var R;\n var e = 0.1;\n while ((a % b) > e) {\n R = a % b;\n a = b;\n b = R;\n }\n return b;\n}", "title": "" }, { "docid": "0c34b9b93e007e71677acf2094d6...
d3b9224a6c05bae7be74c53073402a3b
Remove words from the sentence if it contains one exclamation mark. Words are separated by spaces in the sentence. Please remember, one. Examples: remove("Hi!") === "" remove("Hi! Hi!") === "" remove("Hi! Hi! Hi!") === "" remove("Hi Hi! Hi!") === "Hi" remove("Hi! !Hi Hi!") === "" remove("Hi! Hi!! Hi!") === "Hi!!" remov...
[ { "docid": "49ddb840fd882062c2102c2aa7e587fc", "score": "0.72430944", "text": "function remove(s) {\n var sSplit = s.split(' ');\n var output = [];\n var bangCount = 0;\n for (var i=0; i<sSplit.length; i++) {\n for (var a=0; a<sSplit[i].length; a++) {\n if (sSplit[i][a] === '!') {\n b...
[ { "docid": "2e657119ee259f826ba3584a0db41d60", "score": "0.7178903", "text": "function removeExclamation(s) {\n return s.replace(/\\b!+/g, '');\n}", "title": "" }, { "docid": "8eadbad5450225370ba1a69f2095a274", "score": "0.7144812", "text": "function removeExclamationMarks(s) {\n /...
4cae002d21b28c2ade04f7321f7be363
Constructor de Nodo para estructura del CST
[ { "docid": "daf39ce90e18ab22e481eef2c60a962b", "score": "0.0", "text": "function Nodo(id, name, list, content) {\r\n this.node_id = id;\r\n this.node_name = name;\r\n this.node_content = (content != undefined) ? content : '';\r\n this.node_list = (list != undefined) ? list : ...
[ { "docid": "f22cb981733d75c2bc34bdb791b93657", "score": "0.7061665", "text": "Constructor(){}", "title": "" }, { "docid": "de4ae0d9ba162d2e6b26ee3e79159735", "score": "0.70607257", "text": "constructor(n,c) {\n this.nome = n;\n this.codigo = c;\n }", "title": "" },...
2c959b0a7c86ad6a9c676c9caa57666e
funzione da linkare al onchange del select
[ { "docid": "f32bfc258e30406a210c3d513c2e96b3", "score": "0.0", "text": "function order_select_handler(index){\r\n\tvar type = index.id;\r\n\tconsole.log(\"reorder_mysql called with order = \"+type);\r\n\tclear_childs(document.querySelector(\".content\"));\r\n\toffset = 0;\r\n\tord = type;\r\n\tloading =...
[ { "docid": "e7f190c284994920c0443016b12ffe3c", "score": "0.7420202", "text": "changeSelect(event){\n\t\tApi.getEquipos({id_servicio:this._id_servicio.value});\n\t}", "title": "" }, { "docid": "18ff1d8e67d6beb686cafa5ed161cbb9", "score": "0.7350391", "text": "function onselectchange(o...
e3c9691fe2c7f451a783485659ffb65c
daca lasam asa functioneaza in schimb daca schimbam var catName in let catName ne da eroare COMPARE SCOPES >o diferenta majora intre var si let este ca atunci cand declarati o variabila cu VAR este declarat global sau local daca este declarat in interiorul unei functii; LETdomeniul de aplicare al lui LET este limitat l...
[ { "docid": "6dc560e8c089ba49f7a7b0e8e263e116", "score": "0.0", "text": "function checkScope() {\n \"use strict\";\n var i = \"function scope\";\n if (true) {\n i = \"block scope\";\n console.log(\"Block scope i is: \", i);\n }\n console.log(\"Function scope i is: \", i);\n ...
[ { "docid": "f5fd5a45b0c5d80f81347127dc602455", "score": "0.6855026", "text": "function fn3() {\n // myName poate fi accesata oriunde \n // chiar daca este declarata in if,for,while\n let vizibilaInToataFunctia = 10;\n if (true) {\n let myName = 'test'; // doar local in if\n console.log(vizibil...
58b4bd5e6e4bfd4b0d54c2fb691b7824
get every possible 3digit combination of every element in array
[ { "docid": "b01be719135dd77d7f3a892e2927e817", "score": "0.7128582", "text": "function getCombinations(chars) {\n let result = [];\n let f = function(prefix, chars) {\n for (let i = 0; i < chars.length; i++) {\n result.push(prefix + chars[i]);\n f(prefix + chars[i], chars.slice(...
[ { "docid": "007a18524a26581a94bc12f7c8cd83a3", "score": "0.69721353", "text": "function createCombination() {\n for (let i = 0; i < 9; i++) {\n arr.forEach(function (char) {\n temp.push(temp[i] + char);\n });\n }\n temp.reverse(); // Comment if using record object, unco...
73cd4ca226ca95d912a038130dc8d061
Add `node` to `parent`s children or to `tokens`. Performs merges where possible.
[ { "docid": "3ebdc3562409f1de1240c31a2d0d556a", "score": "0.78504187", "text": "function add(node, parent) {\n\t var children = parent ? parent.children : tokens;\n\t var prev = children[children.length - 1];\n\n\t if (\n\t prev &&\n\t node.type === prev.type &&\n\t no...
[ { "docid": "5069e8ce3a42b616dda8395635b6230a", "score": "0.78128934", "text": "function add(node, parent) {\n var children = parent ? parent.children : tokens;\n var prev = children[children.length - 1];\n\n if (\n prev &&\n node.type === prev.type &&\n node.type in M...
591aa7444e7e9dfbe47ff22882bede0e
get image file => return object with image properties
[ { "docid": "1434c43df9163aecb257ad942e7cd9c8", "score": "0.0", "text": "function parseImage(image) {\n var result = {};\n var img = image\n\n return new Promise(function (resolve) {\n jimp.read(img)\n .then(function (imageItem) {\n var brightness;\n var vector = [];\n var...
[ { "docid": "7ccf0da8e704b5021fd8870f6145ad05", "score": "0.78192383", "text": "get image() {}", "title": "" }, { "docid": "f8e161ebd891bf442154a0e94cef9c8d", "score": "0.6708578", "text": "function getPhoto() {\n\t return {\n\t url: '',\n\t mediaType: '',...
ce98a01dbd9d3b7ce540522fe3d237f6
formats dates from being in totalmillisecondsfromepoch format into a humanreadable, presentable format.
[ { "docid": "7feb7e4c7f7af8bb12bd9438089fa12c", "score": "0.0", "text": "function formatDate(date) {\n if (date == null) {\n return \"\";\n }\n var d = new Date(date);\n var min = d.getMinutes() < 10 ? '0' + d.getMinutes() : d.getMinutes();\n return (d.getMonth() + 1) + \"/\" + d.ge...
[ { "docid": "4a9266ada0f4e5219c29ad32a7f4a5a7", "score": "0.6201448", "text": "function dateEpochToHuman(pythonDate) {\n var d = new Date(Math.floor(pythonDate * 1000));\n var datestring = d.getFullYear() + \"-\" + (\"0\"+(d.getMonth()+1)).slice(-2) + \"-\" + (\"0\" + d.getDate()).slice(-2) + \" \"...
8065685fac1cd9d3397fe7435f9cd247
supports only 2.0style add(1, 's') or add(duration)
[ { "docid": "62e73b56182fcc56d1a4aab89525f7aa", "score": "0.0", "text": "function add$1 (input, value) {\n return addSubtract$1(this, input, value, 1);\n }", "title": "" } ]
[ { "docid": "9f52187b925af5a789a58cbb5807f630", "score": "0.6559725", "text": "function durationValue(value) {\n\t\t\t return value + 's';\n\t\t\t }", "title": "" }, { "docid": "0be56c97c948a4bfa3c3263a5e0480de", "score": "0.6238", "text": "function _addSeconds(numbe...
b8b5888ae8a3ae0936856be01c142e3a
init rectangle except for ONE player
[ { "docid": "fe881449b0beb189951ef83592c6a39b", "score": "0.0", "text": "function initRects(idExcept = -1){ // idExcept -- winner, if -1, then clear all\n\t// if(idExcept == -1){ clearAllRects(); }\n\tfor(var p = 0; p < 120; p++){\n\t\tfor(var q = 0; q < 120; q++){\n\t\t\tif(idExcept == -1){\n\t\t\t\tcle...
[ { "docid": "ff2b4321a2e6418596ba28e978d2f384", "score": "0.70648897", "text": "function init(){\n\n // Instanciamos cada uno de nuestros rectangulos\n rect[0] = new Rectangule({\n x: 100, \n y: 100, \n color: 'blue'\n })\n\n rect[1] = new Rectangule({\n x: ...
32d685c3c103c6a503c7a339a55352db
Hard coded function to return list of tables with records
[ { "docid": "6cd03ec3d58f8f11f47794633e979f79", "score": "0.55612105", "text": "getTablesWithData(){\n\treturn this.query(\"CREATE TABLE #temp (table_name sysname, row_count INT, reserved_size VARCHAR(50), data_size VARCHAR(50), index_size VARCHAR(50), unused_size VARCHAR(50)) SET NOCOUNT ON INSERT #temp...
[ { "docid": "2ca4c94f2d94ab8b56ababa74886d3d2", "score": "0.6917445", "text": "itemsList(tableName){\n\t\ttableName = this.idCorrection(tableName);\n\t\tvar res = {isPresent: false, table: []};\n\t\tlet index = this.globalTables.search(tableName);\n\t\tif (index!=-1){\n\t\t\tres.isPresent = true;\t\t\t\n...
3dc2cc14cf5cb8a76873bd9efe38f785
This function checks if alternating chicken cross the way of the character.
[ { "docid": "882bfff2296efc39dcf3a8c18d2bdef4", "score": "0.58648485", "text": "function checkForAlternatingHenCollision() {\n for (let index = 0; index < alternatingHens.length; index++) {\n let hen = alternatingHens[index];\n let hen_x = hen.position_x + bg_ground;\n let hen_y = hen.position_...
[ { "docid": "47acfa0a8f458c50dad4630abae34c67", "score": "0.62914777", "text": "function checkStraight() {}", "title": "" }, { "docid": "4a7457a990a23d353d734b76a472b934", "score": "0.62337446", "text": "checkLine(a, b, c) {\n if (a === b && b === c && c === a && a !== \"\")\n ...
3b0a56d8323aaf1e86e0fb793cc1b033
Compatible with repeat class, Discard after can be deleted Compatible with repeat class, Discard after can be deleted
[ { "docid": "2b76bc350cf26ab4588d8411b659706e", "score": "0.0", "text": "function ActionInterval(d) {\n var _this;\n\n _this = _FiniteTimeAction.call(this) || this;\n _this.MAX_VALUE = 2;\n _this._elapsed = 0;\n _this._firstTick = false;\n _this._ease...
[ { "docid": "8ee927d2808a070b7d5da6b331c0b257", "score": "0.5770758", "text": "removed() {}", "title": "" }, { "docid": "50ec68c9ed22ae9177b2dca59a3ab20f", "score": "0.5660337", "text": "removeAll() {\n return this.ensureNonAliasedItems(), this.items.length = 0, this;\n }", "t...
41e005957560859d247c6f39bab1a405
create option changed event
[ { "docid": "32ac32187f9145b36c4cd0dd0abd4128", "score": "0.66811687", "text": "function optionChanged(id) {\n getPlots(id);\n getDemoInfo(id);\n}", "title": "" } ]
[ { "docid": "2c7d7865fe8be44c80c5d912bf71b832", "score": "0.7469466", "text": "function optionChanged(select) {\r\n metaData(select);\r\n bar(select);\r\n bubble(select);\r\n}", "title": "" }, { "docid": "1821ba86c9667d0ad4becf82e05b1f43", "score": "0.73629975", "text": "func...
205b3c72288579d0a5de0e6f85c95568
Creates a new React class that is idempotent and capable of containing other React components. It accepts event listeners and DOM properties that are valid according to `DOMProperty`. Event listeners: `onClick`, `onMouseDown`, etc. DOM properties: `className`, `name`, `title`, etc. The `style` property functions differ...
[ { "docid": "6e9f0e9f9e122292370d21b10a445e81", "score": "0.0", "text": "function ReactDOMComponent(element) {\n var tag = element.type;\n validateDangerousTag(tag);\n this._currentElement = element;\n this._tag = tag.toLowerCase();\n this._namespaceURI = null;\n this._renderedChildren = null;\n t...
[ { "docid": "14624c287638c8e9714103ce3b24c36e", "score": "0.5600523", "text": "function Style (displayName, style, options) {\n\toptions = options || {};\n\t\n\tthis.displayName = displayName;\n\n\tthis._prefix = 'react-' + toHyphenDelimited(displayName) + '_';\n\t\n\tthis._selectorPrefix = '.react-view....
53224800b110f1218e29497ded9d1649
Takes in max and min, returns a number between them
[ { "docid": "2cd84b4fff93b3ab3e9ea27ab88137ac", "score": "0.0", "text": "function getRndNum(min, max) {\n return Math.random() * (max - min) + min;\n}", "title": "" } ]
[ { "docid": "ed1ccda23affb9c46011dd4372812d32", "score": "0.8340923", "text": "function between(n, min, max) {\n return Math.max(min, Math.min(n, max));\n}", "title": "" }, { "docid": "83e8451b94cd26ce54c4256deab1130e", "score": "0.8238361", "text": "function range(num, min, max) {\n...
c1f78d8bccff7ae4b09616116ead5d02
This file is automatically included by javascript_include_tag :defaults
[ { "docid": "eb018d66c824d2d5a99d3b202da8bae2", "score": "0.0", "text": "function validate_result_entry_form() {\n var place = $('place').value;\n if (place == \"\" || isNaN(place)) {\n alert('Place must be a valid number.');\n return false;\n }\n if ($('player_id').value == \"\") {\n alert(...
[ { "docid": "967b26509e67c21f1fbf615d3da43353", "score": "0.570756", "text": "function updatesDefaultJS(js) { defaults = js; }", "title": "" }, { "docid": "4334fa358fe0f5500351e2b8222ed817", "score": "0.56326157", "text": "function js() {\n}", "title": "" }, { "docid": "43...
36aa21af692349ba272291328aff6064
Removes all keyvalue entries from the list cache.
[ { "docid": "051c6c475583233022517635de972be3", "score": "0.0", "text": "function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}", "title": "" } ]
[ { "docid": "710ba5667baf4287d422d5134b7cbf61", "score": "0.7397746", "text": "function listCacheClear(){this.__data__=[]}", "title": "" }, { "docid": "710ba5667baf4287d422d5134b7cbf61", "score": "0.7397746", "text": "function listCacheClear(){this.__data__=[]}", "title": "" }, ...
103b419c3dba959bac9aced4fe336daa
Make a map and return a function for checking if a key is in that map.
[ { "docid": "32ec2fe2e8e0eb82c673835fea0a4ce6", "score": "0.52073896", "text": "function makeMap(str, expectsLowerCase) {\n var map = Object.create(null)\n var list = str.split(\",\")\n for (var i = 0; i < list.length; i++) {\n map[list[i]] = true\n }\n retur...
[ { "docid": "3b6a7dd8409d51326c1461a18263c7e5", "score": "0.6569246", "text": "contains(key) {\n let hash = this.hash(key);\n let target = this.map[hash];\n if(target){\n return true;\n }else {\n return false;\n };\n }", "title": "" }, { "docid": "f69e888ad9b25c46f22...
f2563c170ba07ec6225526a3608182ff
Handles responses to an ajax request: finds the right dataType (mediates between contenttype and expected dataType) returns the corresponding response
[ { "docid": "92a6ba65594b728ee12534efa6e63ea3", "score": "0.0", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar ct, type, finalDataType, firstDataType,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhi...
[ { "docid": "797faa51731407d12006ffd2af716cc9", "score": "0.78497916", "text": "function ajaxHandleResponses(s,jqXHR,responses){var firstDataType,ct,finalDataType,type,contents=s.contents,dataTypes=s.dataTypes;// Remove auto dataType and get content-type in the process\nwhile(dataTypes[0]===\"*\"){dataTy...
3970845f658a42798983c0dc732a883d
Finish an operation, updating the display and signalling delayed events
[ { "docid": "e40d39aa1fcc8e4429fe6f469bc66c5b", "score": "0.0", "text": "function endOperation(cm) {\r\n var op = cm.curOp, doc = cm.doc, display = cm.display;\r\n cm.curOp = null;\r\n\r\n if (op.updateMaxLine) findMaxLine(cm);\r\n\r\n // If it looks like an update might be needed, call updat...
[ { "docid": "ea30011afdc4fab464348287d37eb77e", "score": "0.6974197", "text": "function finishDisplay(){\r\n //TODO #3\r\n }", "title": "" }, { "docid": "e5a8a463b4107709d73b5fbf5f1dfd2e", "score": "0.6969287", "text": "function finishDisplay() {\r\n //TODO #3 implementation...\r...
2f7f996683e00831b050e15987b649ff
dynamic funtion to create text
[ { "docid": "2bd69aeb857281c2351b556ccfaaa990", "score": "0.0", "text": "function createTextNode(nodeName) {\n return document.createTextNode(nodeName);\n}", "title": "" } ]
[ { "docid": "3b2256c2655e9355586cbc2341377a0f", "score": "0.72537094", "text": "function createText(text) {\n return document.createTextNode(text);\n }", "title": "" }, { "docid": "72a5e0c18c668ff2cd3f3ff51c712615", "score": "0.7074068", "text": "function createText(text) {\n ret...
5a45b170acd4e304cdd7389c1023528e
RLC n Description Rotate n left. Old bit 7 to Carry flag. Use with: n = A, B, C, D, E, H, L, (HL) Flags affected: Z Set if result is zero. N Reset. H Reset. C Contains old bit 7 data. Opcodes: Instruction Parameters Opcode Cycles RLC A CB 07 8 RLC B CB 00 8 RLC C CB 01 8 RLC D CB 02 8 RLC E CB 03 8 RLC H CB 04 8 RLC L ...
[ { "docid": "f1c4c843d3d11dd168408e0e90d0e005", "score": "0.6787506", "text": "function rlc (cpu, n) {\n const r = n << 1 | n >> 7;\n\n cpu.f = 0;\n if ((r & 0xff) == 0) cpu.f |= FLAG_Z;\n if ((n & 0x80) != 0) cpu.f |= FLAG_C;\n\n return r;\n}", "title": "" } ]
[ { "docid": "31d8b5cca8cc22e5b231f39d7d86d791", "score": "0.68349147", "text": "function bnpLShiftTo(n,r){var i,bs=n%this.DB,cbs=this.DB-bs,bm=(1<<cbs)-1,ds=Math.floor(n/this.DB),c=this.s<<bs&this.DM;for(i=this.t-1;i>=0;--i)r[i+ds+1]=this[i]>>cbs|c,c=(this[i]&bm)<<bs;for(i=ds-1;i>=0;--i)r[i]=0;r[ds]=c,r....
8d28c53885650480e4634a97396a3605
Add items in list;
[ { "docid": "35b1e97b81cd429b9d40c1d9708c0a4a", "score": "0.0", "text": "function addListItem(){\n const removeBtn = document.createElement('span');\n const li = document.createElement('li');\n li.textContent = input.value;\n list.appendChild(li);\n input.value = '';\n removeBtn.textCon...
[ { "docid": "43f56fe215c05c895321884b01941ffe", "score": "0.7758941", "text": "function addItemsToList(items, list)\n{\n\tfor (name in items)\n\t{\n\t\tlist.append(\"<li>\" + name + \"</li>\");\n\t}\n}", "title": "" }, { "docid": "84c8bdb570ee532928ca7f19136774ae", "score": "0.75165045", ...
5af26f044d2798f4fc00bc556df5fbed
Update function, repeats indefinitely
[ { "docid": "f5f62fb8b984b93be10636a35aa22722", "score": "0.0", "text": "update() {\n\n\n if (!isPaused) {\n\n\t\t// Variable to see what fire is being clicked\n\t\tvar clickedFire;\n\t\t\n\t\t// Variable for 'this'\n var th = this;\n\t\t\n\t\tvar gameOverTrees = allTrees.length / 2;\n\n ...
[ { "docid": "7d2da88beefe791ac8ddc4fd49eb3f38", "score": "0.8171977", "text": "function update() {}", "title": "" }, { "docid": "7d2da88beefe791ac8ddc4fd49eb3f38", "score": "0.8171977", "text": "function update() {}", "title": "" }, { "docid": "99d03e96344cffed47d59f45fd61...
b174139747694432eef60734cc7b43df
Takes in one parameter (object) and returns it
[ { "docid": "d1ec93ab0b6519f6e9c167a4cbd90c8c", "score": "0.58254665", "text": "identity(obj) {\n return obj;\n }", "title": "" } ]
[ { "docid": "3be5cc2a65a8b427f726a8cd5b8a98ac", "score": "0.80315024", "text": "function returnObject(object){\n return object;\n}", "title": "" }, { "docid": "a8f66ba07c2c43212f36f85bda760f1e", "score": "0.70973676", "text": "function getObject (args, obj) {\n return obj\n}", ...
7b5f791cc04e6fc99632f33001d2d6d0
Returns the last selected element index in the `HostBindingOpCodes` For perf reasons we don't need to update the selected element index in `HostBindingOpCodes` only if it changes. This method returns the last index (or '0' if not found.) Selected element index are only the ones which are negative.
[ { "docid": "8725fbb29aa66866d5c53a3b9d0dbc0e", "score": "0.8697368", "text": "function lastSelectedElementIdx(hostBindingOpCodes) {\n let i = hostBindingOpCodes.length;\n while (i > 0) {\n const value = hostBindingOpCodes[--i];\n if (typeof value === 'number' && value < 0) {\n ...
[ { "docid": "aa97a3396d54546ca1a4d9eb38b52327", "score": "0.62695533", "text": "get lastIndex() {\n return this.indexes.length ? Math.max(...this.indexes) : undefined;\n }", "title": "" }, { "docid": "7c91eaef5656d69fe9d8f8f456b64cc5", "score": "0.6256298", "text": "async getFocus...
9fda656924a60682590c7f281031607d
Returns the caret (cursor) position of the specified text field. Return value range is 0oField.value.length.
[ { "docid": "69d013ac508f04343a37e155437ccd32", "score": "0.80857897", "text": "function doGetCaretPosition (oField) {\n\tvar iCaretPos = 0;\n try{\n\t \t// IE Support\n\t\tif (document.selection) {\n\t\t // Set focus on the element\n\t\t oField.focus ();\n\n\t\t // To get cursor position, g...
[ { "docid": "fa5f994210848929c367e514be705670", "score": "0.8301414", "text": "function doGetCaretPosition(oField) {\n var iCaretPos = 0;\n\n if (document.selection) {\n oField.focus();\n var oSel = document.selection.createRange();\n oSel.moveStart('character', -oField.value.length)...
5306c7be2c3851d890cee4354726ac3b
Initializes the controlfile handlers, including dealing with the possibility that the server is getting started up in a state where the control files indicate it shouldn't be running.
[ { "docid": "b6226d70357f6a1285edcb78ccb440f3", "score": "0.5851176", "text": "init() {\n // If the `shutdown` or `stopped` files exist, then this server shouldn't\n // start up in the first place.\n if (fs.existsSync(this._stoppedPath)) {\n log.event.alreadyStopped();\n this._shutdown...
[ { "docid": "f0f1b5e2fec7c2fc2be5a9f0d323b3b7", "score": "0.6254941", "text": "function initWebServer() {\n\t// create routing for files and serve files\n\tfunction route(path, request, response) {\n\t\t// file extension header definitions\n\t\tvar extensions = {\n\t\t\t'css' : 'text/css',\n\t\t\t'gif' :...
4c2afb96e6f40c62da65dc9272230f03
8 kyu Closest elevator/Solution
[ { "docid": "ad3f711245edbe530c5c0921c7349370", "score": "0.0", "text": "function elevator(left, right, call) {\n\treturn Math.abs(call - left) < Math.abs(call - right) ? 'left' : 'right';\n}", "title": "" } ]
[ { "docid": "581c5bda999e2fd17a4d18c921ad4f66", "score": "0.6564081", "text": "function nearestEpic() {\n dlog('nearestEpic');\n const epics = ['master', 'develop', 'origin/master', 'origin/develop']; // TODO: consider adding others\n return P.reduce(epics, (best, committish) => {\n dlog('best:', b...
c4ad225bbc4e224dfa8fb5b7f0c07042
Raytracer class gets registered to the window by the Animation object that owns it
[ { "docid": "f49d77893e5b6eeb63cc02e2f6d917da", "score": "0.6976717", "text": "function Raytracer( parent ) \n{\n //var defaults = { width: 32, height: 32, near: 1, left: -1, right: 1, bottom: -1, top: 1, scanline: 0, visible: true, anim: parent, ambient: vec3( .1, .1, .1 ) };\n var defaults = { width...
[ { "docid": "992c89ea26b637d6156f0061f0844225", "score": "0.6538977", "text": "function RayHelper(ray){this.ray=ray;}", "title": "" }, { "docid": "def0f7e4d0059cfc5d9fe3956aa05e26", "score": "0.63762635", "text": "function lookToClick() {\n // create the raycaster\n this...
56670c99603a804042f2389fdd0fd1f0
Get an array of properties that you want to store
[ { "docid": "d8952578e618c7b2a9bc2dd64260b0eb", "score": "0.6503266", "text": "getPreferencesProperties() {\n return this.preferenceProperties.slice();\n }", "title": "" } ]
[ { "docid": "71e47b0cd38603dc7ab8034b95051356", "score": "0.74572885", "text": "static get properties () {\n\t\treturn [\n\t\t\t...this.access,\n\t\t\t...this.activate,\n\t\t\t...this.ammunition,\n\t\t\t...this.area,\n\t\t\t...this.bulk,\n\t\t\t...this.cast,\n\t\t\t...this.cost,\n\t\t\t...this.duration,\...
80d968c86e151f9adb16ca61593efa1a
make changes to current timer when needed
[ { "docid": "e226a5d75933e215fa90ef7aaf2d8cee", "score": "0.0", "text": "function update(section) {\n $(section).empty();\n \n if(section == \"#bl\"){\n $(section).append(breakLength);\n } else {\n $(section).append(sessionLength);\n }\n \n //update if the tomato is showin...
[ { "docid": "8a2e4b16461d44340e6ecb3d1bd2e0a4", "score": "0.70488346", "text": "timerStart(){\n clock = setInterval(this.updateTimer , 1000)\n this.timer = 15\n $(\"#timer\").html(this.timer)\n }", "title": "" }, { "docid": "071ea938ad40bbcad308b06cab5d49e2", "scor...
3dcddf3352f1a39b9d194debebdf11d4
Finds and removes the bordertop of the top most element on this page
[ { "docid": "37ab1bbbcb7d6317cc6562edd6cff1a0", "score": "0.7993172", "text": "function removeTopBorder() {\n $('.features-content div').first().css({\n 'border-top': '0px'\n });\n }", "title": "" } ]
[ { "docid": "319f93335c57421485032a335cce5a03", "score": "0.6306857", "text": "top() {\n return (\n this.br.twoPage.coverExternalPadding +\n this.br.twoPage.coverInternalPadding\n ); // $$$ + border?\n }", "title": "" }, { "docid": "b4c00e30fa94154ae6ed8ca8473f64ff", "sco...
c533da0f0da57186cf3e1464f6cbc287
unlisten processes with pids
[ { "docid": "68e91ae750c412a58abc56a9e3f77c53", "score": "0.83634716", "text": "unlisten(pids) {\n pids = (pids instanceof Array) ? pids : [pids];\n this.pidList = this.pidList.filter(pid => !pids.includes(pid));\n }", "title": "" } ]
[ { "docid": "1479b41e26eeeb4422a4a88dd85dfdea", "score": "0.6475331", "text": "_detachFromProcess(instance) {\n process.removeListener('exit', instance._endSelf);\n process.removeListener('SIGINT', instance._endSelf);\n process.removeListener('SIGTERM', instance._endSelf);\n p...
aab3174b68db398c44f6cdfb2aa9976d
Attaches a simple dirty flag (one shot change detection) to the supplied model, then once the model changes, autosaves the model using the supplied key every autoSaveIntervalInSeconds seconds.
[ { "docid": "30c7d516f3d89063e076cf77119f8019", "score": "0.54642534", "text": "function autoSaveModel(viewModel, saveUrl, options) {\n\n var defaults = {\n storageKey:window.location.href+'.autosaveData',\n autoSaveIntervalInSeconds:60,\n restoredDataWarningSelector:\"#restoredDa...
[ { "docid": "ac8d1709595685dfe712b822daacd4cf", "score": "0.6007879", "text": "function autosave() {\r\n\tif(!changes){\r\n\t\tsetTimeout(save,30000);\r\n\t\tchanges=true;\r\n\t}\r\n}", "title": "" }, { "docid": "03368293a1ec59fdbe0725acee885705", "score": "0.56064135", "text": "funct...
a1d99ec01d280086fdfd1f353a5ba5d9
The label for the checkbox on the passed row
[ { "docid": "2112415789d891c8feb4ac6383c60c5c", "score": "0.8742206", "text": "checkboxLabel(row) {\n if (!row) {\n return `${this.isAllSelected() ? 'deselect' : 'select'} all`;\n }\n return `${this.selection.isSelected(row) ? 'deselect' : 'select'} row ${row.position + 1}...
[ { "docid": "7b8217eff0a0a4ea7f780977a0f78a67", "score": "0.8777864", "text": "checkboxLabel(row) {\n if (!row) {\n return `${this.isAllSelected() ? 'select' : 'deselect'} all`;\n }\n return `${this.selection.isSelected(row) ? 'deselect' : 'select'} row ${row.position + 1}...
7d14a0fd8bcc54794fd64c1c1298ef1c
numResults str number of searchresults
[ { "docid": "bf54b6bc93793a9823bf4a6605b55c42", "score": "0.0", "text": "function Leaderboard(props) {\n return(\n <>\n <HeaderLeaderboard />\n <div className=\"leaderboard_search-section\">\n <h3 className=\"leaderboard_title\">Find any member.</h3>\n\n ...
[ { "docid": "3b4cad5c18b1ba64484f64c9db47cbb6", "score": "0.70394474", "text": "function getResultsCount() {\n const resultsReturned = $('.facetwp-template .row').children().length;\n\n $('.archive-header__count span').text(resultsReturned);\n }", "title": "" }, { "do...
5a4d2a21d9a8b58d8857d4aac9e54197
Clone and return a new ReactElement using element as the starting point. See
[ { "docid": "32218d3188f78fb856a639594bb5fd9b", "score": "0.0", "text": "function cloneElement(element, config, children) {\n !!(element === null || element === undefined) ? invariant(false, 'React.cloneElement(...): The argument must be a React element, but you passed %s.', element) : void 0;\n\n var ...
[ { "docid": "0dac755a461c5f0bb66ed677f0d446c3", "score": "0.6698122", "text": "function cloneElement(element, config, children) {\n (function () {\n if (!!(element === null || element === undefined)) {\n {\n throw ReactError(Error('React.cloneElement(...): The argument mus...
2f590f5cf69ddf4d9525a7636d097ed7
Iterate over all items in the store.
[ { "docid": "2d80cda63987f3bf8c9fed176955b5c3", "score": "0.0", "text": "function iterate$2(iterator, callback) {\n var self = this;\n\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var keyPrefix = dbInfo.keyPrefix;\n var keyPrefixLength = keyPre...
[ { "docid": "d63eb6665d870f83c9ea8ce15db6d8fa", "score": "0.66622674", "text": "function forEach(callback) {\n forEachPropertyIn(store, callback);\n }", "title": "" }, { "docid": "c4629b08cc1ddbcb83bf2df2f63bd288", "score": "0.6608123", "text": "*[Symbol.iterator] () {\n for ( ...
09c105ab6464fb4b824ef4477b7e33fb
returns a properly formated Note timestamp.
[ { "docid": "afefef3ca4346495f4890c569a38ba95", "score": "0.0", "text": "get timestamp(){\n return $filter('date')(this.createdAt, 'yy-MM-dd, H:mm')\n }", "title": "" } ]
[ { "docid": "758a7ceac0bdc62b899cff4b5abb8044", "score": "0.76603556", "text": "function formatNoteDate ( timestamp )\n{\n // Use the timestamp's toDate function to get a JS date object\n const date = timestamp.toDate()\n const day = date.getDate()\n const month = date.getMonth() + 1\n con...
0e7912d67d5b662d3c5120cdae898b10
Generate Appointment StartDate and EndDate By Slot and AppointmentDate
[ { "docid": "7de1eae5ecf3be181cfae845ad76c746", "score": "0.749594", "text": "function GenerateStartTimeAndEndTime(timeSlot, appointmentDate) {\n var result = new Object();\n // splitting string by operator (-); will return for two arraylist only\n var timeSlots = timeSlot.split(\"-\...
[ { "docid": "74f990b6919e0f582978603a154f3245", "score": "0.69994897", "text": "function GenerateDoctorSlots() {\n var Appointments = new Array();\n\n // =======get date range=====\n var fromDt = new Date($(\"#dtFrom\").val());\n var toDt = new Date($(\"#toDT\").val());\n\n var newend = toDt.setDate...
9a44510c46cb7dabf65daff744c464f8
Merge two blockquotes: `node` into `prev`, unless in CommonMark or gfm modes.
[ { "docid": "906e985ae08fbc14615c5e84673f3acf", "score": "0.8373044", "text": "function mergeBlockquote(previous, node) {\n if (this.options.commonmark || this.options.gfm) {\n return node\n }\n\n previous.children = previous.children.concat(node.children);\n\n return previous\n}", "title": ""...
[ { "docid": "f77eab48fe6be901bec186091412c801", "score": "0.8341298", "text": "function mergeBlockquote(previous, node) {\n\t\tif (this.options.commonmark || this.options.gfm) {\n\t\t\treturn node\n\t\t}\n\n\t\tprevious.children = previous.children.concat(node.children);\n\n\t\treturn previous\n\t}", ...
61348fe46314866daf75b84e79149684
Warn the user about overwrite before importing
[ { "docid": "b5e491cf51277d61dc17f348a74db23e", "score": "0.5548852", "text": "function importWarn( fileInput ){\n\t\n\tvar input = fileInput;\n\tDECK.dialog.show( {\n\t\ttitle:\"Import Deck List\",\n\t\tbody:\"Importing a new deck list will replace all cards currently in your deck list. Would you like t...
[ { "docid": "3788b417e61444b93d657b002c7bcdd7", "score": "0.66005516", "text": "function forceImport() { }", "title": "" }, { "docid": "3f0038cf59e4d86fbca3ed88d98da41a", "score": "0.61282504", "text": "onFileExists() {\n this.abortImport('File named \"' + this.file.getFileName() +...
916c48951ce155afbd8c5f0244e5a7f5
Toggle full screen of the editor.
[ { "docid": "7570d49a6286e48c21973340971600d2", "score": "0.8254641", "text": "function toggleFullScreen(editor) {\n\t// Set fullscreen\n\tvar cm = editor.codemirror;\n\tcm.setOption(\"fullScreen\", !cm.getOption(\"fullScreen\"));\n\n\n\t// Prevent scrolling on body during fullscreen active\n\tif(cm.getO...
[ { "docid": "0875567e63521a911c2f42c288932015", "score": "0.8180682", "text": "function toggleFullScreen(editor) {\n // Set fullscreen\n var cm = editor.codemirror;\n cm.setOption('fullScreen', !cm.getOption('fullScreen'));\n\n\n // Prevent scrolling on body during fullscreen active\n if (...
3671b6e7832b6dee7352b6b84df01f3b
Truncate the document to a given length, placing the top matching term at the center, or as close to it as possible if the match is near the beginning or end of the string.
[ { "docid": "f99ac73769383751bf795ddca33d35fa", "score": "0.52381223", "text": "createExcerpt(str, rawMatches) {\n // rawMatches is ordered by score so the first match is the best. The first\n // value is the start position in the string and the second is the length\n\n // Create some brain frie...
[ { "docid": "510e9099ab20b47dc9d4a23559664125", "score": "0.5920064", "text": "function truncate(inputString, targetLength){\n return inputString.substr(0, targetLength); \n}", "title": "" }, { "docid": "0775465beeccdf48bf7b5db41df363c0", "score": "0.5705149", "text": "function ...
f25dd55727fcd20843e23f34785a633c
We can do this relatively easily by leveraging the code used for 32bit unsigned code.
[ { "docid": "bee8c84ac6d1ab38bb0bf9d0c5584261", "score": "0.0", "text": "function wsint32(value, endian, buffer, offset)\n{\n\tvar val;\n\n\tif (value === undefined)\n\t\tthrow (new Error('missing value'));\n\n\tif (endian === undefined)\n\t\tthrow (new Error('missing endian'));\n\n\tif (buffer === undef...
[ { "docid": "2d7afbe8da7b696318bc7a400bc64727", "score": "0.7124602", "text": "function unsigned32(n1) // returns a 32-bits unsiged integer from an operand to which applied a bit operator.\n {\n return n1 < 0 ? (n1 ^ UPPER_MASK) + UPPER_MASK : n1;\n }", "title": "" }, { "docid": "d7e2867...
0a46d3e0eced76e1cf70e85fddabf5a7
Parse URL hash tag
[ { "docid": "d9b3df31e6d9dfe2c1aa6004479fa805", "score": "0.0", "text": "function readHashTag()\n{\n\tvar tags = location.hash.split('&');\n\tfor ( var i=0; i<tags.length; ++i ) {\n\t\tvar tag = tags[i].split('=');\n\t\tvar key = tag[0];\n\t\tvar val = tag[1];\n\n\t\tswitch ( key ) {\n\t\t\tcase '#zoom':...
[ { "docid": "b4d51a177c18d2a063c569cac04e0e0c", "score": "0.73131025", "text": "function parseHash(){\n return this.parseQuery( this.hash() );\n }", "title": "" }, { "docid": "30c9a2bd5a9982a702783e18495a4b9b", "score": "0.72896147", "text": "function getHash(url) {\n var...
bfe456aefc5118abfc53e31b0f6c11bc
Picks a random key from the db TODO: maybe create a cache table
[ { "docid": "ccf8d518d5c7ef1a6791c28588f3ed62", "score": "0.0", "text": "pickRandomWord(opts, cb) {\n if (typeof opts == 'function') {\n cb = opts;\n opts = {\n order: 1\n };\n }\n else if (typeof opts == 'number') {\n opts =...
[ { "docid": "910954c4f82676ead8451e9c7b55db09", "score": "0.7553286", "text": "function getRandomKey() {\n return Math.floor(Math.random() * 4);\n}", "title": "" }, { "docid": "ff0e56bb625986bb35a5ea3b0f139ccd", "score": "0.75284845", "text": "function generateKey() {\n var i = Ma...
20e0c194b15c927e6dddc6a00d6f65cd
TXT SHOULD LINK TO JSON FILE FOR DISPLAYING
[ { "docid": "3cac92e6e6775a4ef972347257f9c82a", "score": "0.0", "text": "constructor(txt, font = 'Georgia') {\n\n super();\n\n this.text = txt;\n this.color = 0;\n this.textSize = 30;\n this.font = font;\n }", "title": "" } ]
[ { "docid": "44764762feaab6742231771bd67a8d7c", "score": "0.613222", "text": "function download(filename, text) {\n\t var element = document.createElement('a');\n\t element.setAttribute('href', 'data:text/json;charset=utf-8,' + encodeURIComponent(text));\n\t element.setAttribute('download', filename);...
e6fae1776e9180c7e61f1e8582f30ad1
must be called for forEach where this is the bubble object
[ { "docid": "ecf3868b84b38c4938fc719cd08fffdf", "score": "0.0", "text": "function drawBubble(self, index){\n if(index == 0){\n context.clearRect(0, 0, canvas.width, canvas.height);\n initCanvas();\n\n }\n self.context.save();\n self.context.beginPath();\n // console.log(this.y);\n var complet...
[ { "docid": "e1dc158da05991a06f9017dc016cd296", "score": "0.6483872", "text": "get bubbles() {\n return $(this).bubbles;\n }", "title": "" }, { "docid": "2c09494da2ded11f4eb8c3dd776c052e", "score": "0.634729", "text": "renderMessages()\n {\n let bubbles = [];\n ...
4be08a515fbf461774a2b6d0935fa914
Kraft, J. Regular Expressions in JavaScript[snippet]
[ { "docid": "4f9c26207965b6961a6599f76aca5149", "score": "0.0", "text": "function createListener(validator, spanIdToHide) {\n return e => {\n const text = e.target.value;\n const valid = validator(text);\n const showTip = text !== \"\" && !valid;\n const tooltip = e.target.nextElem...
[ { "docid": "e9c9a3fa27f297acf64824e89a2520c3", "score": "0.71696377", "text": "function RegExpHandler() { }", "title": "" }, { "docid": "920e955ecc72cffb2944412e244f3803", "score": "0.6515879", "text": "function build_regex(search_text) {\n\n /* Remove parenthesised content */\n p...
9fedc4aec4ebacad9a933b5339bd0fa5
definition of the function sortUser
[ { "docid": "7c7961b6c9aefcf2fec8751e2ff69102", "score": "0.69088304", "text": "function sortUser(){\n data.sort((a,b) => a.balance - b.balance);\n//update DOM after sorting the data array \n updateUI();\n }", "title": "" } ]
[ { "docid": "dc73388bb35f5167ed471f65c9208616", "score": "0.7457347", "text": "function sortUsers(){\n uasort($this->users, array($this,\"cmp\"));\n\n //if 'total' is set, sort by total time spent on server instead of default\n if(isset($_GET['total'])){\n uasort($this->users, array($this,\"cmpTime\...
83702563ad4525222399c00dda7096e5
Creates a property accessor on the element prototype if one does not exist. The property setter calls the property's `hasChanged` property option or uses a strict identity check to determine whether or not to request an update.
[ { "docid": "bf486c939d9384f99e877132f0f43eff", "score": "0.6280112", "text": "static createProperty(name, options = defaultPropertyDeclaration) {\n // Note, since this can be called by the `@property` decorator which\n // is called before `finalize`, we ensure storage exists for property\n // m...
[ { "docid": "8fe0699ba99b340eced982c62ffd4efc", "score": "0.6794266", "text": "function internalProperty(options){return property({attribute:!1,hasChanged:null===options||void 0===options?void 0:options.hasChanged})}", "title": "" }, { "docid": "35d88ceb88ee95991ad5675d912a8e03", "score":...
bbe21cbf0d72c9c4f498298f8c1f8614
======= ======= ======= makeAggregator ======= ======= =======
[ { "docid": "3062fb546cedc177042669df002224e9", "score": "0.58744735", "text": "function makeAggregator(displayObject) {\n console.log(\"makeAggregator\");\n\n // == make aggregator arrays for aggregated zone data\n zoneGeojson = displayObject.zoneGeojson ;\n displayObject.zoneNameArray = [];...
[ { "docid": "a48a3f9be47d5c71aec688a6c61d3121", "score": "0.6552619", "text": "function createAggregator(aggregateType) {\n switch (aggregateType) {\n case \"Average\":\n return new AverageAggregator();\n case \"Count\":\n return new CountAggregator();\n case...
98b9cad5018ba7909b3f8463609bff08
Reverse String adalah cara yang digunakan untuk membalikkan sebuah string atau kata di dalam bahasa pemrograman join => adalah method yang digunakan untuk menggabungkan seluruh array menjadi sebuah string split => Split digunakan untuk membagi string menjadi array substring dan mengembalikan array baru tanpa mengubah s...
[ { "docid": "d1a54181c303c787e761f67c4ab249e5", "score": "0.0", "text": "function kebalikan(){\n let cek= ['Saya','Belajar','Java Scirpt']\n console.log(cek.reverse()) \n}", "title": "" } ]
[ { "docid": "c4b2b479468cd54f449d16b2be288c6d", "score": "0.78768533", "text": "reverse(str){\n var splitString = str.split(\"\");\n var reverseArray = splitString.reverse();\n var joinArray = reverseArray.join(\"\");\n\n return joinArray;\n }", "title": "" }, { ...
26056bb738ca798b7ffc4ab8398692f0
Method to load a 221 Lego block object
[ { "docid": "ea5221fa08dfa7430c9e1235ed0f8af9", "score": "0.6147977", "text": "function modelo_221(modelo_color, partcode){\n\t\t//Verifies if there is no piece to be set and if there is a chassis object\n\t\tif( ok1 && bChasis ){\n\t\t\t//As this is a new piece to be set, ok1 becomes false\n\t\t\tok1 = ...
[ { "docid": "6cadd08fffa5cf9c7311e7dca057acbd", "score": "0.69626015", "text": "load() {\n try {\n this.blocks = Serializer_1.deserialize(block_1.Block, JSON.parse(fs.readFileSync(this.storagePath, \"utf8\")));\n }\n catch (err) {\n if (err.code !== \"ENOENT\") ...
70a7791f0dbc752b8fce506e556c0703
This class defines a complete generic visitor for a parse tree produced by JsonParser.
[ { "docid": "d625767e87aa6742e0d499da3b5993eb", "score": "0.73271865", "text": "function JsonParserVisitor() {\r\n\tantlr4.tree.ParseTreeVisitor.call(this);\r\n\treturn this;\r\n}", "title": "" } ]
[ { "docid": "1bfd22669a244706da780f068f9439f9", "score": "0.57969797", "text": "visitFunction(tree) {}", "title": "" }, { "docid": "b2b651460d604a87137dab670227ec1a", "score": "0.5716304", "text": "function traverse(node, visitor) {\n if (Array.isArray(node)) {\n node.forEach(elem...
1958375fa83f15ec8ab4517fbdd0bcab
for picking random properties in an object
[ { "docid": "18cc32819272dff55a3e4b2027590f42", "score": "0.8232631", "text": "function pickRandomProperty(obj) {\n\tvar result;\n\tvar count = 0;\n\tfor (var prop in obj)\n\t\tif (Math.random() < 1/++count)\n\t\t result = prop;\n\treturn result;\n}", "title": "" } ]
[ { "docid": "7e586057748cccb1163016894ac257c9", "score": "0.8237616", "text": "function pickRandomProperty(obj) {\r\n var result;\r\n var count = 0;\r\n for (var prop in obj)\r\n if (Math.random() < 1/++count)\r\n result = prop;\r\n return result;\r\n}", "title": "" }, ...
e7a8caafb67c24def6044ebb6f0d8f75
Function to make the graph
[ { "docid": "9d6b13bfea291938682d3218d96967fb", "score": "0.0", "text": "function generate_graph (csvData) {\n // Variables for min and max to handle scales for axes\n var xMin;\n var xMax;\n var yMin;\n var yMax;\n \n // initial default selections\n var selected...
[ { "docid": "8b12a78a37ba62abd0354033f68e783b", "score": "0.8721621", "text": "function makeGraph() {\n \n }", "title": "" }, { "docid": "45d76af169c2274e0a962613b41132cd", "score": "0.6952016", "text": "function buildGraph(edges) {\n let graph = Object.create(null...
2a10c54c53f04a997cb28eac22906bff
End of constructor getters ...........................................................
[ { "docid": "2a3d3e6ffec70f4f1c2800166698de3a", "score": "0.0", "text": "get width(){ return this._width ; }", "title": "" } ]
[ { "docid": "e7f9245fb860b55c330e752823771ca2", "score": "0.672476", "text": "constructor()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "0a6f77832d7f956d06ce4e6cc283a6aa", "score": "0.65788275", "text": "__init() {\n\n\t}", "title": "" }, { "docid": "8320aca1d0dee89091818a...
9a76db45cf1ff49bf014f550c43c2f7b
This function uses redwrap to call and parse the Reddit Api for the search term in the request.
[ { "docid": "0a49571e8de7021323c01fc3b865bf1d", "score": "0.6945382", "text": "function get_reddit_posts(req, resp){\n var search_term = req.body.search_term;\n reddit.r(search_term, function(err, data, res){\n if(err)\n return resp.send({error: true, payload: err});\n resp.send({error...
[ { "docid": "46040d13edf72d33336ad0eb73a37cb2", "score": "0.71292895", "text": "function getRedditApi () {\n //Takes a keyword (if existing and greater than a length of one) and adds it to the searchLocation, the reddit query allows for 250 chracters in the q= parameter\n if(redditKeyWord && redditKeyW...
c41e7ef8ce73c9a3aa6d13e1fd3ed39b
Q.12 Slice and Splic
[ { "docid": "77fc7a387b87488f83b7febfa9fcd29d", "score": "0.6180477", "text": "function frankenSplice(arr1, arr2, n) {\r\n let newArr1 = arr2.slice(0,n);\r\n let newArr2 = arr2.slice(n);\r\n for(let i = 0; i < arr1.length; i++) {\r\n newArr1.push(arr1[i]);\r\n\r\n }\r\n newArr1 = newArr1.concat(n...
[ { "docid": "f3773b4ec9b37d304c4269e962901424", "score": "0.6739316", "text": "function sliceList(inpt,startPosition,endPosition)\r\n{\r\n\tvar index=0;\r\n\tvar finalOutput=[];\r\n\tfor(var i=startPosition-1;i<endPosition;i++)\r\n\t{\r\n\t\tfinalOutput[index]=inpt[i];\r\n\t\tindex++;\r\n\t\t\r\n\t}\r\n\...
548a38d968ad825f9085f4e31f98b370
Function: serverStart Description: This is the function called immediately once the server is opened and listening on a port. Parameters: None Preconditions: The server is started up and is listening on a port Postconditions: Status of the server is ouputted to the console
[ { "docid": "56fa2603679277ba19226ecfef26d3e2", "score": "0.77496266", "text": "function serverStart () {\n\tconsole.log(\"Server is running on port 3000\");\n}", "title": "" } ]
[ { "docid": "3badeceb05d1fd812650887dff62fcbf", "score": "0.80536366", "text": "function serverStart() {\n var port = server.address().port;\n console.log('Server listening on port '+ port);\n}", "title": "" }, { "docid": "ccd19a1b0e82183d51a06b3cab487bdd", "score": "0.7998612", "te...
78cb1006f8b34db8c8134572d43a76b1
Get the offset for numbering generated subgroups. This is best explained by an example: A learner group 'Foo' has three similarly named subgroups 'Foo 1', 'Foo 2', and 'Foo 4'. The highest identified subgroup number is 4, so the offset for generating new subgroups is 5. If no subgroups exist, or none of the subgroup na...
[ { "docid": "68bd9a651b625c6023813eb2c4ecd1cb", "score": "0.73951745", "text": "async getSubgroupNumberingOffset() {\n const regex = new RegExp('^' + escapeRegExp(this.title) + ' ([0-9]+)$');\n const groups = await this.children;\n let offset = groups.reduce((previousValue, item) => {\n let...
[ { "docid": "e45283242090a46cf0bfa0c6b4d73871", "score": "0.54446423", "text": "_endIndexForKnownLayerGroup(layerGroup) {\n const groupIndex = layerGroup.groupIndex;\n\n if (groupIndex === this._groupOrdering.length - 1) {\n return this._drawList.length;\n }\n\n return this._layerGroups[...
faf9c0171f8eeae0da5c44583e376bb4
Prioritize URLs, lowest to highest: Some optional URL parameters, but none matched No optional parameters in URL Some optional parameters, some matched Some optional parameters, all matched
[ { "docid": "5ef0ed5b59416b6db0f5fb8256ac8a68", "score": "0.58170503", "text": "function matchPriority(params) {\n var optional = urlMatcher.parameters().filter(function (param) { return param.isOptional; });\n if (!optional.length)\n return 0.000001;\n var...
[ { "docid": "283c164c1be2a115bf1afe279d1906dc", "score": "0.60202533", "text": "function matchPriority(params) {\n\t var optional = urlMatcher.parameters().filter(function (param) { return param.isOptional; });\n\t if (!optional.length)\n\t return 0.000001;\n\t ...
397d981bcbf593d6ae7c1dfa7917fb2b
Iterates through array elements and swaps the current and current2 flags
[ { "docid": "4c24285ad1a24a596ee88c402f8aa3f1", "score": "0.7268629", "text": "swapCurrents() {\n let current = -1;\n let current2 = -1;\n\n for (let i = 0; i < this.array.length; i++) {\n if (this.array[i].current) {\n current = i;\n if (curr...
[ { "docid": "8baf70ea69fe9688f9933902438ea2dc", "score": "0.6686318", "text": "function switchVals(arr, idxA, idxB) {\r\n var temp = arr[idxA];\r\n arr[idxA] = arr[idxB];\r\n arr[idxB] = temp;\r\n}", "title": "" }, { "docid": "ad1ce34aa6a6610df42491358532fa55", "score": "0.6677465", ...
d2fe372ebb27cec3bc86d463ae94e1f1
5. (...) spread oparator;
[ { "docid": "08cc8a4a9f5a7bdc1b3cbd53aebf5a13", "score": "0.0", "text": "function maxNumber( array = [] ){ //==> Default parameter;\n const max = Math.max(...array); //==> ... spread oparator;\n return max;\n}", "title": "" } ]
[ { "docid": "86dd9b14459befc9136cccd15db785f1", "score": "0.6113124", "text": "function pruebaSpread(a,b,c){\n return a+b+c;\n}", "title": "" }, { "docid": "55cf7426ae7673030eb420f742e7a01a", "score": "0.57349116", "text": "function MULTIPLYBY5(x) {\n // Custom 함수 만들기\n var r...
9dc027b127b49935bd629ceba05f77f5
This javascript function validates the text box is not empty, atleast one check box is checked, and one radio button is selected
[ { "docid": "41f427332fbde324d28e8467da9cb265", "score": "0.72073984", "text": "function validate() \r\n{\r\n // Checks if checkbox and radio fields are valid\r\n var checkBoxCheck = valCheckBoxes();\r\n var radioCheck = valRadio();\r\n\r\n // Flag for validity\r\n var OK=false;\r\n\r\n ...
[ { "docid": "5a600df89a12555ba759cb195c0e3362", "score": "0.72778606", "text": "function validation(event) {\n var radio_check = document.getElementsByName('gender'); // Fetching radio button by name.\n var input_field = document.getElementsByClassName('text_field'); // Fetching all inputs with sam...
392f1ed1f7a4c7790e3f25907f0b848c
Parse ingredients and measurements for card, returns an unordered list with the ingredients and measurements
[ { "docid": "6f999205e2451b8ee1aba64d828feb0d", "score": "0.69928354", "text": "parseIngMeasure(drink) {\n\t\tlet listIngredients = [];\n\t\tlet listMeasures = [];\n\t\tfor (var ingredient in drink) {\n\t\t\tvar ingTemp = ingredient.split(\"strIngredient\");\n\t\t\tvar measureTemp = ingredient.split(\"st...
[ { "docid": "1e8f4d37c1da8fa274fba4d23c5d62f1", "score": "0.6321043", "text": "parseIngredients(ingredients) {\n return ingredients.map((ingredient) => ({\n quantity: this.parseAmount(\n ingredient.measures.metric.amount,\n ingredient.measures.metric.unitShort.toLowerCase()\n )...
50a2a60b617d189967bb49e9dff7f5e0
Add integers, wrapping at 2^32. This uses 16bit operations internally to work around bugs in some JS interpreters. //dominictarr: this is 10 years old, so maybe this can be dropped?)
[ { "docid": "713d17a29bd1a024d91c0e361f89285c", "score": "0.0", "text": "function add(x, y) {\n\t return (x + y ) | 0\n\t //lets see how this goes on testling.\n\t // var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n\t // var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n\t // return (msw << 16) | (lsw & ...
[ { "docid": "949cd3a4e14f291fe0fb4a2e3e4d96fa", "score": "0.7971375", "text": "function add32(a, b) {\nreturn (a + b) & 0xFFFFFFFF;\n}", "title": "" }, { "docid": "949cd3a4e14f291fe0fb4a2e3e4d96fa", "score": "0.7971375", "text": "function add32(a, b) {\nreturn (a + b) & 0xFFFFFFFF;\n}...
1e35ed751b079e57911952de708fd918
(protected) return x s.t. r^x < DV
[ { "docid": "0917058b298b138879582679ce383382", "score": "0.0", "text": "function bnpChunkSize(r) { return Math.floor(Math.LN2*this.DB/Math.log(r)); }", "title": "" } ]
[ { "docid": "72909d10e2fb935cfc4b7cfea4df89d6", "score": "0.6147511", "text": "static approxEq(x, y) {\nvar DIFF, EPS, SIZE;\n//--------\nEPS = 5e-5;\nDIFF = Math.abs(x - y);\nSIZE = Math.max(Math.abs(x), Math.abs(y));\nif (SIZE <= 1) {\nreturn DIFF < EPS;\n} else {\nreturn DIFF / SIZE < EPS;\n}\n}", ...
d953848eb34e748439261eeb3a5d94d7
Renders multiple countries at once
[ { "docid": "ac8db87ee85b6a4b9641dabf6d4c775e", "score": "0.0", "text": "render() {\n // The sorting method\n const countries = this.state.countries.sort((a, b) => (\n b.votes - a.votes\n ));\n const countryComponents = countries.map((country) => (\n <Country\n key={'country-...
[ { "docid": "d791c5554a5335b5534b4694deeb56c8", "score": "0.696196", "text": "function displayAllCountries(data) {\r\n\r\n allCountriesNumber = data.length;\r\n\r\n for (var i = 0; i < data.length; i++)\r\n displayCountry(data[i], i);\r\n}", "title": "" }, { "docid": "630b3bb6bf5...
b729dcbb60a2e72d96dc54762d824115
defaults vars Game building functions
[ { "docid": "ca3557e36a8e9058d76ba18c1d2f05c2", "score": "0.68795526", "text": "function build_game() {\n\t//update_engine();\n\tbuild_header();\n\tbuild_objects();\n\tbuild_main();\n\tbuild_screen();\n\tbuild_screen_manager();\n\tbuild_screen_draw();\n\tbuild_analyse_event();\n\tbuild_engine_functions()...
[ { "docid": "6f0b4a794222febe09db84dedc81d922", "score": "0.6853064", "text": "buildGameEnvironment() {}", "title": "" }, { "docid": "74e52c02f332eb0ddb0ab985326854ee", "score": "0.6384329", "text": "function setupGame() {\r\n\r\n}", "title": "" }, { "docid": "2043452f1630...