query_id
stringlengths
32
32
query
stringlengths
7
29.6k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
4aaf731cf535a52ed67974d12cf96068
[120, 60, 40, 30, 24] / 2) without division
[ { "docid": "6262cf143deb45cbe6a899ad58499dbc", "score": "0.0", "text": "function multiply_arr_no_div(arr) {\n let new_arr = [];\n for (var i = 0; i < arr.length; i++) {\n let multiply = 1;\n for (var j = 0; j < arr.length; j++) {\n // multiply all items except items it sel...
[ { "docid": "89592c124f02bb53e9a3e46a14b1b10c", "score": "0.64487517", "text": "function iWantToGet(ammountRequired) {\n // console.log(Math.floor(ammountRequired / 100) + \" \" + ammountRequired % 100)\n let avaleble = [100,50,20,10]\n let res = []\n\n if(ammountRequired > 0){\n for (...
7b2b2b683ba0bcbc6fd57ef2bd2f5521
Function that updates the wins and losses of the player.
[ { "docid": "ed986968da93f5a1367ab259edb8fbf2", "score": "0.0", "text": "function status1() {\n\n\n if(guest === computer) {\n wins++;\n $(\"#wins\").html(\"Wins: \" + wins);\n $('#status').html(\"You win!\");\n \n game = false;\n }\n\n else if(guest > computer) {\n losses++;\n $(...
[ { "docid": "f081e878a5167bf33552892e4853052b", "score": "0.7647888", "text": "function updateWins() {\n\tdocument.querySelector(\"#wins\").innerHTML = \"Wins: \" + wins;\n}", "title": "" }, { "docid": "e05206ea0ecc9bbe4840b95a58562158", "score": "0.7599585", "text": "function winsAnd...
a13062a69d00a18b377318c3c52436e2
function to create and update serving slider pulled from NoUiSlider
[ { "docid": "eb5dcb36868013ef18513be0de02684e", "score": "0.7163097", "text": "function servingSlider() {\n var servingSlider = document.getElementById('serving-slider');\n\n noUiSlider.create(servingSlider, {\n start: [ 2, 30 ],\n connect: true,\n step: 1,\n range: {\n 'min': 2,\n ...
[ { "docid": "0bf96397f810d71e90714f2f11d7e6e8", "score": "0.68118757", "text": "function update_slider_list() {\n\t\tvar select_slider_markup = '';\n\t\tvar slider = {};\n\t\tif ( jQ('.aurel-panel-slider').length > 0 ) {\n\t\t\tselect_slider_markup = '<option value=\"no-slider\">Do not display a slider</...
4922c14349191dcf74b19020fa27e712
Elimina il messaggio aperto
[ { "docid": "5584124057c80249ae4fc9716e18ddae", "score": "0.5618131", "text": "function inboxDeleteOpenedMessage(){\n\tnavigator.notification.confirm('Il messaggio verrà cancellato.\\nSei sicuro?', function(button){\n if (button == 1) {\n var l_active_message = $('.inbox_list_container_...
[ { "docid": "6408efc7441e1e093cd0bd1b2a2e8c57", "score": "0.7371141", "text": "function clean (message) {\n if (message.length == 1){\n if (message[0].charAt(0) == config.prefix) \n message[0] = message[0].slice(1);\n\n } \n let cleanPerm = new Discord.RichE...
a794e0170ddfe49f816454d51963fb62
Life Cycle Hook This function is Called immediately after a component is mounted. Setting state here will trigger rerendering.
[ { "docid": "571b711e8c75f46fa0e58fea97661be9", "score": "0.0", "text": "componentDidMount() {\n this.props.getEtudiants();\n }", "title": "" } ]
[ { "docid": "e7f5b479d2640b06e004f3d9713a7cf6", "score": "0.6761786", "text": "componentDidMount() {\r\n this.initState();\r\n }", "title": "" }, { "docid": "78395161b213733dd7c71ad41a702e8c", "score": "0.67454046", "text": "componentDidMount() {\n this.initializeState()\n }",...
5c8521cd11066e0515c1cc86e29c0312
They say that only the name is long enough to attract attention. They also said that only a simple Kata will have someone to solve it. This is a sadly story. series 32: Count with your fingers Description John's each hand has five fingers(If you are surprised, please tell me how many fingers you have ;) Even more amazi...
[ { "docid": "ccdf8d1717439e490c4ca0f3c7e9ed48", "score": "0.7797212", "text": "function whichFinger(n){\n var hand = ['Thumb','Index finger','Middle finger','Ring finger','Little finger']\n while (n > 5) {\n n -= 4;\n hand = hand.reverse();\n }\n return hand[n - 1];\n}", "title": "" } ]
[ { "docid": "2844801f019ca75500334a9fe50bfa3e", "score": "0.6473948", "text": "function fingerCount(){\n if(fingers == 0){\n alert(\"Finally you get it--I am a computer! I don't have fingers.\"); //alert if variable fingers is equal to 0\n }else if (fingers == 10){\n alert(\"humans ha...
cbaf20f61e8743d728d990168d07e138
Generate a New Titanium Project
[ { "docid": "cb423767b54aa1a84cb6ec7427dcac57", "score": "0.6546035", "text": "function createTiApp(name, id, url, dir, callback){\n\n var platform = generatePlatformOptions();\n if(platform.length>0){\n\n console.log('----- CREATING TITANIUM APP -----');\n var ticmd = util.format('ti create ...
[ { "docid": "34ddd1afdfdc8834ecb6f57d7f2cc123", "score": "0.7329862", "text": "function createapp(){\n var project = getProjectInfo()\n createTiApp(project.appname, atom.config.get(\"ti-atom.id\"), atom.config.get(\"ti-atom.url\"), project.dirname);\n}", "title": "" }, { "docid": "c45a3f831...
9c1d1cee114cee615d2350c4e54d87df
seperate function for Player two so boyh players do not share same randomized number
[ { "docid": "13b2f27479ba19a48e5ef7ee42b9242c", "score": "0.60942096", "text": "function isShipInRangeHPlayerTwo(boat) {\n n = Math.floor(Math.random() * 64);\n let c = n % 8;\n if (c + 2 >= 8) {\n isShipInRangeHPlayerTwo(boat);\n } else {\n placeHorizontalPlayerTwo(n, boat);\n }\n}", "tit...
[ { "docid": "53565e1e20d68cf0fcd3fe43d53b5238", "score": "0.7095769", "text": "willCooperateWithPlayer(playerId) {\n return Math.floor(Math.random() * 100) % 2 == 0;\n }", "title": "" }, { "docid": "fff5121ecd292bb794756ee232f2784d", "score": "0.7057502", "text": "function generat...
e8eb3a9b9aea42e514ee89be22ecae1e
send new emptey ingredient id to ingredientChanged
[ { "docid": "c10f07a57397b84f35a66a69fd6838eb", "score": "0.6619134", "text": "function addIngredient(evt){\n evt.preventDefault()\n props.onRecipeUpdated(props.id, {\n ...recipeBody,\n uniqueIngredient: recipeBody.uniqueIngredient + 1,\n ingredients: {\n ...recipeBody.ingredi...
[ { "docid": "b8d46a19450e04781ad8392775edaf89", "score": "0.76831925", "text": "function ingredientChanged(ingredientId, updatedIngredient){\n updateIngredients({\n ...recipeBody.ingredients,\n [ingredientId]: updatedIngredient\n })\n }", "title": "" }, { "docid": "0e5dfa7b9a...
39424805c574aeb8db963a69fbffdeac
XXX: this is destructive it modifies tree nodes.
[ { "docid": "4a35847cc062fdc897302071c3d00c4f", "score": "0.0", "text": "function sequencesize(statements) {\n var prev = null, last = statements.length - 1;\n if (last) statements = statements.reduce(function(a, cur, i){\n if (prev instanceof AST_SimpleStatement\n ...
[ { "docid": "210e3574034b667b1bd21ff50e9e6eec", "score": "0.6963827", "text": "function updateTree() {\n $elem.simpleTree('swapNodes', history.getValues());\n }", "title": "" }, { "docid": "7110d9bb2973fff473d20697744aec4b", "score": "0.6900025", "text": "function treeSetVal...
095683048169f69eebfde24eec09c392
Creates a 0xAARRGGBB from values / Overdrive is not permitted, so values over 255 (0xff) will get clipped.
[ { "docid": "4774b26251e76bde65169922730b16cd", "score": "0.50510806", "text": "function makecol(r,g,b,a)\n{\n\ta = typeof a !== 'undefined' ? a : 255;\n\treturn (a<<24)|((r&0xff)<<16)|((g&0xff)<<8)|((b&0xff));\n}", "title": "" } ]
[ { "docid": "07d006a8a2a3d0becd96046419dcdce6", "score": "0.56806916", "text": "function rgb(r, g, b) \n{ return 'rgb('+clamp(Math.round(r),0,255)+', '+clamp(Math.round(g),0,255)+', '+clamp(Math.round(b),0,255)+')';}", "title": "" }, { "docid": "07d006a8a2a3d0becd96046419dcdce6", "score":...
e285d1525d2a5a7998e3db38d3f5e7ed
DigitClassifier constructor, mirrors that of a NeuralNetwork, except output count is always
[ { "docid": "a93964b9778ee083839f3f686001a741", "score": "0.7888375", "text": "function DigitClassifier(inputCount, layers) {\r\n if (layers === void 0) { layers = []; }\r\n this.outputCount = layers.length > 0 ? layers[layers.length - 1].neuronCount : inputCount;\r\n this.neuralNetw...
[ { "docid": "67da17cc1dd5c8f3106a70764c4b8ad6", "score": "0.6347335", "text": "constructor(n,c) {\n this.weights = new Array (n);\n for (let i = 0; i < this.weights.length; i++) {\n this.weights[i] = random(-1, 1);\n }\n\n // this.inputs = [i0, i1];\n this.c = c; // learning rate/cons...
2325c236c676bc3d94db93c66677450c
Returns page to state before media click
[ { "docid": "a62c42302a06f7924e2d7f230b01c23b", "score": "0.0", "text": "function restore(){\n output.innerHTML = OldOutput; \n manageFilterOpts()\n displayMedia(library_content);\n}", "title": "" } ]
[ { "docid": "d526511643c21d096f1b219bc2801cde", "score": "0.64066887", "text": "function goto_mymusic( e ){\r\n\r\n\te.preventDefault();\r\n\tif( current_page != 1 ){\r\n\t\tcurrent_page = 1;\r\n\t\t$(\"#contain\").css(\"opacity\",0);\r\n\t\t$(\"#action_buttons\").css(\"opacity\",\"0\");\r\n\t\t$(\"#acti...
72c081edf05762fa949c245c43977439
ax^2 + bx + c
[ { "docid": "0f30f8f049f97c6e24322de542511128", "score": "0.0", "text": "function Raices(a, b, c){\n\n var Discriminante = b*b - 4 * a * c;\n var RaizDiscriminante;\n var RaizReal1, RaizReal2, RaizImaginaria1, RaizImaginaria2;\n var DobleA = 2 * a;\n\n if(Discriminante > 0){\n var RaizDiscriminan...
[ { "docid": "dddde6c00046672bff4e05f73f27e1c5", "score": "0.676662", "text": "function prodEsc(_ax1, _ay1, _bx1, _by1) \n{\n\tvar resultado =\t(_ax1 * _bx1) +\t(_ay1 * _by1 );\n\treturn resultado;\n}", "title": "" }, { "docid": "0ef7257c7812bf39daec48379c5e76b6", "score": "0.64559036", ...
97925516cb75cb99f4f7c7fc55422519
Instantiates a new ArcFollowCamera
[ { "docid": "1de35eeab04ed0c0238b40010e37c1b7", "score": "0.7607265", "text": "function ArcFollowCamera(name,/** The longitudinal angle of the camera */alpha,/** The latitudinal angle of the camera */beta,/** The radius of the camera from its target */radius,/** Define the camera target (the messh it sho...
[ { "docid": "90252696967553b7eb8de4a3523578f9", "score": "0.6811691", "text": "function createFollowCamera(scene,target)\r\n{\r\n var camera = new BABYLON.FollowCamera(\"tankFollowCamera\",target.position, scene, target);\r\n camera.radius = 80;\r\n camera.heightOffset = 30;\r\n camera.rotati...
5f18dad2e47e66a2b45bb81faab8b126
set de json naar de nieuwe events
[ { "docid": "6dd0c7ad914fee1b36f49152fc3a5628", "score": "0.7118701", "text": "function set_events_from_json(new_events) {\n fs.writeFile('events.json', JSON.stringify(new_events), function(err) {\n if(err) throw err;\n });\n}", "title": "" } ]
[ { "docid": "ed17a0f8781ed634ed754cd941001cf2", "score": "0.621933", "text": "async setEvents() {\n let prevEvents = await AsyncStorage.getItem('prevEvents'); \n AsyncStorage.setItem('events', prevEvents);\n this.changeEvents(); \n }", "title": "" }, { "docid": "e87...
bd8e8c81373c842fd0d610393c072e58
Performs feature detection on the deprecated Microsoft Internet Explorer outdated SubtleCrypto interface. This function should only be used after checking for the modern, standard SubtleCrypto interface.
[ { "docid": "1e4f629817b6214c1d4b6e53b82d84e6", "score": "0.6503122", "text": "function _detectSubtleMsCrypto(fn) {\n return (typeof window !== 'undefined' &&\n typeof window.msCrypto === 'object' &&\n typeof window.msCrypto.subtle === 'object' &&\n typeof window.msCrypto.subtle[fn] === 'functi...
[ { "docid": "11682336425fad264d067130f47c2408", "score": "0.673446", "text": "function _detectSubtleCrypto(fn) {\n\t return (typeof window !== 'undefined' &&\n\t typeof window.crypto === 'object' &&\n\t typeof window.crypto.subtle === 'object' &&\n\t typeof window.crypto.subtle[fn] === 'functio...
54d63afef17dbd29cf59dcc61a560992
The game has a leaderboard which is initialized with various names. During a game it will be necessary to update this leaderboard regularly. Create a function called `updateLeaderBoard` which accepts two parameters, the first is an array of player names, the first ten of which should be inserted into the leaderboard as...
[ { "docid": "fff2c59b53c1de471f546581658a6422", "score": "0.8108902", "text": "function updateLeaderBoard(playerNames, userName) {\n // Clear the current list\n while (window.top10.firstChild) {\n window.top10.removeChild(window.top10.firstChild);\n }\n\n if (playerNames.length > 0) {\...
[ { "docid": "4d5194a89a0abae12fa4ef8c2fc4098a", "score": "0.7009063", "text": "function updateLeaderboard()\n{\n\tlet leaderboard = Engine.GetGUIObjectByName(\"leaderboardBox\");\n\tlet boardList = Engine.GetBoardList().sort((a, b) => b.rating - a.rating);\n\n\tlet list = [];\n\tlet list_name = [];\n\tle...
e3901fb905f8754cd3e03e5e51740175
Runtime helper for resolving filters
[ { "docid": "ad6377ff5ebc9b0df681353611350406", "score": "0.0", "text": "function resolveFilter (id) {\n return resolveAsset(this.$options, 'filters', id, true) || identity\n}", "title": "" } ]
[ { "docid": "6bae1fd43896c5c160d7c20054711668", "score": "0.6792624", "text": "function resolveFilter(id){return resolveAsset(this.$options,'filters',id,true)||identity;}", "title": "" }, { "docid": "6bae1fd43896c5c160d7c20054711668", "score": "0.6792624", "text": "function resolveFil...
af93eaa32d8529f6f3f673fbb8ffb389
`path` exists and is a file.
[ { "docid": "a80c608cd695d50454ea15939e99b40a", "score": "0.7497974", "text": "function fileExists(path) {\n return stat(path).then(function (stat) { return stat.isFile(); }, function () { return false; });\n }", "title": "" } ]
[ { "docid": "d395a91b581925f8439044e10acedfab", "score": "0.7861006", "text": "function isFile(path){\n try{ return fs.statSync(path).isFile(); }\n catch(e){ return false; }\n}", "title": "" }, { "docid": "817a63d523006a0de9860dedccdcdc13", "score": "0.78478193", "text": "functi...
e38f46c85c5e8c7eaf3ae83e14d5ae86
funcao menu de opcaoes para pedido
[ { "docid": "ac8e8db82f8f4bcb27bcee1e7133a7e3", "score": "0.0", "text": "function TelaConfigurarSerial() {\r\n let codigoHTML = ``;\r\n\r\n codigoHTML += `<h4 class=\"text-center\">Serial Atual</h4>\r\n <h5 class=\"text-center\" style=\"margin-top:50px\">Data Atual: <span class=\"badge badge...
[ { "docid": "60834d823622e14214d6ebc4634d585f", "score": "0.6412877", "text": "function menuOptions() {}", "title": "" }, { "docid": "7c16b9913537cb746c7d6391cff7fe71", "score": "0.63729167", "text": "function menu_paquet(){\n\t\taction=prompt(\"F fin de tour | P piocher une carte\");...
0046deb6fd384030b5025773865cc851
Gets the item that is the best match for the specified world coordinates.
[ { "docid": "a14f68544fb315f4575bfdcd122efed3", "score": "0.5729363", "text": "getItem(world) {\n let iv = this.i.fp(toPoint(world));\n return (iv);\n }", "title": "" } ]
[ { "docid": "7147d8b57c7e1c69fe71498bbe7ecfd6", "score": "0.623523", "text": "function findBestItem(items) {\n var bestItem = null;\n var bestValue = 0;\n var itemsIndex = 0;\n \n // Loop over the items array.\n // Find the item with the highest valueOverDistance()\n for(var i=0; i <...
53d78a6171125753dbb4fa6f9bb23643
The function whose prototype chain sequence wrappers inherit from.
[ { "docid": "60b30758ec0905a9c7b4f2306c8a97b3", "score": "0.0", "text": "function baseLodash() {\n // No operation performed.\n }", "title": "" } ]
[ { "docid": "f2e3cca60066d0b870b9a7ed23d27c1f", "score": "0.63196474", "text": "function func4() {\n return new.target.prototype;\n}", "title": "" }, { "docid": "2048650359104c60f434c750f1627b73", "score": "0.6050515", "text": "function m(t){return\"function\"===typeof t.prototype....
95e954ed5c4ab20f7d2d45ac43015e3f
This function loops through all the Create User error messages and sets form error messages to show in the form when repopulating
[ { "docid": "b89523677fba1688e446dc4661514097", "score": "0.6005047", "text": "function handleUserErrorMessages(req, err)\n{\n for (var i = 0; i < err.errors.length; i++) {\n switch(err.errors[i].message) {\n case 'emptyUsername':\n req.session.errUsername = 1;\n ...
[ { "docid": "528b01792e2b037d817f8728be034acb", "score": "0.6940007", "text": "function prepFormErrors() {\n // log();\n var forms = document.querySelectorAll('form')\n for (var i = 0; i < forms.length; i++) {\n forms[i].addEventListener('blur', function(e) {\n if (e.target.value) {\...
723db303d59f4d5281d70b84283e1764
LLENADO DE LA TABLA COMPRAS DE FECHA ELEGIDA
[ { "docid": "86a8e248cdb681e0d7b2e70f01314fba", "score": "0.0", "text": "async function cajas_dia_especifico() {\n const datos = new FormData();\n //Se obtiene el valor del dia\n const fecha = document.querySelector(\"#fecha_elegida\").value;\n console.log(\"fecha \"+fecha);\n if(fecha != 0){\n d...
[ { "docid": "28bd6696d68d8ef3174205c659659aec", "score": "0.6286964", "text": "function agregarColumnaUnidadYCorrerFilas(){\n \t//Si el material a agregar tiene unidad\n \tif(unidadMat){\n\t\t\t$('#item' + cantMat).prepend(\n\t\t\t\t'<td id=\"uni' + cantMat + '\">' + $('#unidad1').val() + ' ' + uni...
e18a45b0cb543d21db2b25de06ebab82
hashing input, shorter output unique each time, also consistent create math op, take index of given character string.length of original allCharaters.length => choices num let url =
[ { "docid": "30f6f3282ff447b560598b5e6b2278d1", "score": "0.5896071", "text": "function myUrlShortener(url){\n let allCharacters = 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890'\n let urlMid = Math.floor(url.length / 3)\n let halfUrl = url.slice(urlMid * 2)\n // store origin...
[ { "docid": "db449cd6781671a68c86902754c82d22", "score": "0.63104194", "text": "function hash(input)\n{\n\t//variabelen\n\tvar tehashen = input;\n\tvar hash = \"Hash mislukt\";\n\tvar lijst = [\"p\",\"q\",\"t\",\"a\",\"z\",\"b\",\"y\",\"m\",\"e\",\"w\",\"s\",\"l\",\"j\",\"d\",\"c\",\"r\",\"h\",\"f\",\"k\...
8e51b6619a21a64ac2d5bc17a9aa91d4
(protected) divide this by m, quotient and remainder to q, r (HAC 14.20) r != q, this != m. q or r may be null.
[ { "docid": "bf2ecb7739f3364692e85782f1ae7ee8", "score": "0.0", "text": "function bnpDivRemTo(m,q,r) {\n var pm = m.abs();\n if(pm.t <= 0) return;\n var pt = this.abs();\n if(pt.t < pm.t) {\n if(q != null) q.fromInt(0);\n if(r != null) this.copyTo(r);\n return;\n }\n if(r == null) r = nbi(...
[ { "docid": "c6fbb2d28a9f767f3d2390c17031669a", "score": "0.7393537", "text": "function bnpDivRemTo(m,q,r) {\n var pm = m.abs();\n if(pm.t <= 0) return;\n var pt = this.abs();\n if(pt.t < pm.t) {\n if(q != null) q.fromInt(0);\n if(r != null) this.copyTo(r...
20e5318233e1f230420906713a46ab64
Get what they intersect with...
[ { "docid": "5f099f60a156e588f01053b7ee8a44da", "score": "0.0", "text": "function Collision_Manager( ){\n\n\n\n}", "title": "" } ]
[ { "docid": "4d63d0a9eaba1bdd7ef422ce7e537113", "score": "0.7855951", "text": "get intersection() {}", "title": "" }, { "docid": "cbfac027213be0a7e251ba540dcb45a6", "score": "0.7115639", "text": "Intersect() {\n\n }", "title": "" }, { "docid": "76503ad3e7510c647ff8ff9de...
c30286f5e4bf33f0699632c0c925b597
Handle the DOM events for the widget.
[ { "docid": "250e1fcde8011e70241563add4b0ce49", "score": "0.0", "text": "handleEvent(event) {\n switch (event.type) {\n case 'paste':\n this._evtPaste(event);\n break;\n case 'dragenter':\n event.preventDefault();\n ...
[ { "docid": "67bb676ef0a109c147735d1bcb522df1", "score": "0.70530957", "text": "function handleDomEvent () {\n\t\t\tthis._ractive.binding.handleChange();\n\t\t}", "title": "" }, { "docid": "d655b25ecca2d477f6f641cd85174874", "score": "0.66538393", "text": "function handleDomEvent() {\...
18497e4a08e7d97317f71bb692158172
Copyright (c) 2016present, Nicolas Gallagher. Copyright (c) 2015present, Facebook, Inc. All rights reserved. This source code is licensed under the BSDstyle license found in the LICENSE file in the root directory of this source tree.
[ { "docid": "777b8ed53e4b63fbd1e0430e26d98cab", "score": "0.0", "text": "function emptyFunction() {}", "title": "" } ]
[ { "docid": "d0397bee367c92d401d7b158927d4cc0", "score": "0.59543705", "text": "function FacebookGraph() {}", "title": "" }, { "docid": "062442a86816f7def17d43e9692e63f9", "score": "0.54704374", "text": "function facebookInit() {\n\n window.fbAsyncInit = function() {\n FB.init({\...
b5f83787c6c7713cc536cc0e78ac3f9b
defines an instance method with the same name as a prototype mehtod
[ { "docid": "67bacf798ec7946a1d0bbad17275cfc8", "score": "0.0", "text": "function Ninja() {\n this.swung = true;\n this.swingSword = function() {\n return !this.swung;\n };\n}", "title": "" } ]
[ { "docid": "1694907e949908190a62aade7709b0d6", "score": "0.6638741", "text": "function MyFunc() {\n this.message = \"Hello from prototype declared function\";\n}", "title": "" }, { "docid": "7591d13c0222ab6afdd5daaaf9a9c180", "score": "0.64807415", "text": "function Emp(id, name) ...
19b7da72a7a2f210f256e49f276e3a79
Applies the saturate effect to a sprite, saturates the color according to hsl
[ { "docid": "bb85046c28073577c757b7458234b291", "score": "0.6704035", "text": "saturate(factor = 0.1) {\n this.addEffect(new _SpriteEffects__WEBPACK_IMPORTED_MODULE_0__[\"Saturate\"](factor));\n }", "title": "" } ]
[ { "docid": "ebb037e7a12f9d4b6cd8f3bc6718e00c", "score": "0.64732206", "text": "function calculateColorFilter(color) {\n var spriteBase = \"f89850\"; // Assumes a base color of a reddish orange\n var spriteHSL = hexToHsl(spriteBase);\n var targetColorHSL = hexToHsl(color); // User's selected col...
c7befd6fadb88a9bf6f10dece18a2eb8
BigO (3 + 4n) =>> (n)
[ { "docid": "b7bb907f23a87d4f09eeca738bf22bfa", "score": "0.6204027", "text": "function anotherFunChallenge(input) {\n let a = 5; // O(1)\n let b = 10; // O(1)\n let c = 50; // O(1)\n for (let i = 0; i < input; i++) { // O(n)\n let x = i + 2; // O(n)\n let y = i + 3; // O(n)\n let z = i + 1;...
[ { "docid": "bd410f16cc549b471207c74b26abf3c9", "score": "0.7270963", "text": "function n$4O(n){return n}", "title": "" }, { "docid": "cc24423315e1885ae5091983f626afff", "score": "0.6905368", "text": "function solution(n) {\n\n}", "title": "" }, { "docid": "e36e331f57cb226...
1c5d6ab1d0fd1d6d3a206ff3df6b8d68
In an async function, you can await for any Promise or catch its rejection cause. Implementation with promises:
[ { "docid": "ef7a58f4106fac5baf84d431a2f164d0", "score": "0.0", "text": "function handler (req, res) {\n return request('https://user-handler-service')\n .catch((err) => {\n logger.error('Http error', err)\n error.logged = true\n throw err\n })\n .then((response) =>...
[ { "docid": "598dee011784641dd06b27f5924abb13", "score": "0.73036313", "text": "async function something(){\n try{\n\n }\n catch(err){\n\n }\n}", "title": "" }, { "docid": "c239a8b7df2ece8a79d373537621dce2", "score": "0.7258817", "text": "async function test() {\n try {\n...
b8916db9046bc8115fe458f5ed7e0f88
simple class the "Employee" function used here to define the class is called the constructor function
[ { "docid": "2ac8571d907f68b733ee96b13dd5a3d6", "score": "0.77861685", "text": "function Employee() {\n this.fname = \"\";\n this.lname = \"\";\n this.getName = function(){\n \treturn this.fname+' ' +this.lname;\n }\n}", "title": "" } ]
[ { "docid": "85a9a6f98c812b2c8b3c3513162b4cca", "score": "0.8268099", "text": "function Employee(name){this.name=name;}", "title": "" }, { "docid": "6cfb7d6fe6554542a04129521553edc6", "score": "0.81458527", "text": "function Employee(name,age,salary){\n // this.name = name; // Bura...
e8eefb9a52a74ebab564a7729f53b94b
save editor current content to state
[ { "docid": "65076d7410916be2395fcf5f4aaa5e6a", "score": "0.64058226", "text": "onEditorContentChange(content) {\n this.setState({ content });\n }", "title": "" } ]
[ { "docid": "57c4d125b236d05ae823bb9371f1084f", "score": "0.770521", "text": "function save() {\n // Set chrome storage with data\n chrome.storage.local.set({\n editorState:JSON.stringify(element.editor)\n });\n }", "title": "" }, { "docid": "88fddf94d641e74eb34f45ad266e45e6", ...
75644ca16517414874ea148841a7c5a5
Write a program that prints a staircase of size . Input Format A single integer, , denoting the size of the staircase. Output Format Print a staircase of size using symbols and spaces. Note: The last line must have spaces in it.
[ { "docid": "cd71e95e4cb509103506fb157b2b6850", "score": "0.5447455", "text": "function staircase(n) {\nvar i = 1;\nwhile (i<=n){\n console.log(\" \".repeat(n-i) + \"#\".repeat(i));\n i++;\n}\n}", "title": "" } ]
[ { "docid": "f588c7c4d0079322a1e978d9a1331c67", "score": "0.641146", "text": "function staircase(n) {\n const zeroBasedLength = n - 1;\n for (let i = 0, len = n; i < len; i++) {\n // let spaces = Array(12 + 1).join(\" \")\n // make 1 based fit with 0 based\n const spaces = \" \...
357785e1c598310a70c2f1bfa261bbd3
Filters row numbers by time (if applicable) for a given region mapped ImageryLayer
[ { "docid": "8b3d83fb0a055f0cfadbf411df1d2487", "score": "0.64128035", "text": "getImageryLayerFilteredRows(input, currentTimeRows, rowNumbers) {\n if (!isDefined(rowNumbers))\n return;\n if (!isDefined(currentTimeRows)) {\n return Array.isArray(rowNumb...
[ { "docid": "2f3f2c72c31e3b21ddd2a68ef6e12cea", "score": "0.5623865", "text": "getImageryLayerFeatureInfo(input, feature, currentTimeRows) {\n var _a;\n if (isDefined(input.style.regionColumn) &&\n isDefined(input.style.regionColumn.regionType) &&\n isD...
844b3e0c5f584e79c4438d6d6fd10904
save email to cookies
[ { "docid": "ab49bdc43d521d15ae2df3b41b705b89", "score": "0.7702611", "text": "function saveToCookies(data) {\n var d = new Date();\n d.setMonth(d.getMonth() + 1);\n document.cookie = \"Email=\" + data + \";expires=\" + d.toUTCString();\n }", "title": "" } ]
[ { "docid": "4e8d07f2d714d16b1203ccc1ffdc71fc", "score": "0.7365653", "text": "function criarCookie(email){\n var emailCookie = 'email='+email+';path=/;expires=never';\n document.cookie = emailCookie;\n}", "title": "" }, { "docid": "9c59bafe12df7e2d88cf200d7a03554f", "score": "0.727...
0e6d3f585a36a17181072b4b10650906
end of the StartGame Function
[ { "docid": "026805d1d5898829fe1948ddd35dad49", "score": "0.0", "text": "function NextQuestions () {\n\t\tCurrentQuestion = Math.floor(Math.random()*RemainingQuestionsArray.length);\n\t\tconsole.log(QuestionsArray[CurrentQuestion].Question);\n\t\tshuffle(QuestionsArray[CurrentQuestion].Answers.PossibleAn...
[ { "docid": "5584661b3748eb9a31e0d8d3764a8755", "score": "0.80638015", "text": "function startGame() {}", "title": "" }, { "docid": "5584661b3748eb9a31e0d8d3764a8755", "score": "0.80638015", "text": "function startGame() {}", "title": "" }, { "docid": "8503bcffcb51949aa79e...
d266ed8909d0a4f48b2575a34c554006
Changes the document type to indicate that it doesn't exist at the given version.
[ { "docid": "aba6e46df9eb5ad7c8b78b8ade9724b6", "score": "0.4999741", "text": "convertToNoDocument(t) {\n return this.version = t, this.documentType = 2 /* NO_DOCUMENT */ , this.data = bt.empty(), \n this.documentState = 0 /* SYNCED */ , this;\n }", "title": "" } ]
[ { "docid": "3ee0805029f87fea9c3a728e1be830c6", "score": "0.5567615", "text": "function t(\n /**\n * Set to an instance of DbUnknownDocument if the data for a document is\n * not known, but it is known that a document exists at the specified\n * version (e.g. it had a successful update app...
4747a4fbb44c22cdd78d0a53fd88adf5
This returns the first server it can find in the servers section, mainly to support the streetlights tutorial.
[ { "docid": "1cae1aaead74f410bfb26decea60214d", "score": "0.49020654", "text": "function server(asyncapi) {\n return templateUtil.getServer(asyncapi)\n}", "title": "" } ]
[ { "docid": "64b6111f4cfd9d2e48d490c9c97e981f", "score": "0.6570335", "text": "getApiServer() {\n // we may use different servers for different farms (geographical regions)\n // if a server is specified explicitly, use it. otherwise, use farm specific server.\n let server = config.getConfig('app...
c54ff8842d2e19670fa01e190f4fab5e
! moment.js locale configuration
[ { "docid": "9d5282520792f7326f4ae0ce42cacbf2", "score": "0.0", "text": "function t(e,t,n){var r,a;return\"m\"===n?t?\"хвилина\":\"хвилину\":\"h\"===n?t?\"година\":\"годину\":e+\" \"+(r=+e,a={ss:t?\"секунда_секунди_секунд\":\"секунду_секунди_секунд\",mm:t?\"хвилина_хвилини_хвилин\":\"хвилину_хвилини_хвил...
[ { "docid": "83aee654a8d97aa81bf251da5968faeb", "score": "0.7198731", "text": "function localizeMoment(mom) {\n\t\tmom._locale = localeData;\n\t}", "title": "" }, { "docid": "b0d4c1b699e678f87040e762f40a7ead", "score": "0.7170552", "text": "function getSetGlobalLocale(key,values){var ...
3a1310edb931c95b83ff4a660c5d17ed
56 / Use parseInt() in the convertToInteger function so it converts a binary number to an integer and returns it.
[ { "docid": "09c22e0a23c915437058fc198fbf1465", "score": "0.7070979", "text": "function convertToInteger(str) {\n return parseInt(str,2)\n }", "title": "" } ]
[ { "docid": "e8e6f2b93cb64f28abdc20d574cad487", "score": "0.7221441", "text": "function binaryToDec(binary){\n let number = parseInt(binary, 2);\n\n console.log(number);\n}", "title": "" }, { "docid": "f69c2ee27ba1f2d7faeb73cf573a9d3c", "score": "0.7083178", "text": "function co...
c7a0ead1494d960232348a18cffbfe54
Puts a new message in the queue. Will also trigger a processing in the queue so this message might be processed instantly.
[ { "docid": "d1375e089125f316ad36a7bcba191f36", "score": "0.6610056", "text": "enqueue(message) {\n this.redisClient.llen(config.redis.keys.events(this.id), (error, reply) => {\n const length = reply;\n if (length < config.hooks.queueSize && this.queue.length < config.hooks.queueSize) {\n ...
[ { "docid": "4c8f68a0fc3dd75ee7ceabe3ff29c8ae", "score": "0.7482252", "text": "_enqueue(message) {\n this.msgQueue.push(message);\n this._dequeue(); // Attempt to dequeue the message\n }", "title": "" }, { "docid": "d030d3b43fcd9375303239664006113f", "score": "0.70494044", "tex...
25a83c9164cc2def47a332e2da58c58f
Read the actual heights of the rendered lines, and update their stored heights to match.
[ { "docid": "a2ebdb3f40d801d1aee4f9d737dd6184", "score": "0.0", "text": "function updateHeightsInViewport(cm) {\n\t var display = cm.display;\n\t var prevBottom = display.lineDiv.offsetTop;\n\t for (var i = 0; i < display.view.length; i++) {\n\t var cur = display.view[i], height = (void 0);\n\t ...
[ { "docid": "ecb99a0c8432aab7abf0fd5933278567", "score": "0.6686384", "text": "function updateLineHeight(line,height){var diff=height-line.height;if(diff)for(var n=line;n;n=n.parent){n.height+=diff;}} // Given a line object, find its line number by walking up through", "title": "" }, { "docid...
966767f7abc61f752a956de849fde8cc
change of end angle
[ { "docid": "12c756e530527a24ad106dce20ac3d54", "score": "0.7458542", "text": "function outputEndAngle(size){\n\tvar intSize = parseInt(size);\n\n\tif(startAngle < intSize)\n\t{\n\t\tEndAngle = intSize;\n\t}\n\tif(startAngle == 0 && EndAngle == 0)\n\t\tEndAngle = 1;\n\telse if(startAngle == 360 && EndAng...
[ { "docid": "b08def3c5873bfe66d36c81828b40440", "score": "0.74540544", "text": "function outputEndAngle(size){\n\tvar intSize = parseInt(size);\n\n\tif(startAngle < intSize)\n\t{\n\t\tEndAngle = intSize;\n\t}\n\tif(startAngle == 0 && EndAngle == 0)\n\t\tEndAngle = 1;\n\telse if(startAngle == 360 && EndAn...
2bf38d2ad707dcde2e80f159b4d3a72f
Deletes (empties) questionnaire response from Interests section.
[ { "docid": "cb224e3c085688848e61a2073eb9a02e", "score": "0.0", "text": "deleteInterest(questionnaireTopic) {\n console.log(\"remove\", questionnaireTopic, \"for\", this.state.username);\n axios.put(`http://localhost:3010/v0/removeqresponse/${this.state.username}/${questionnaireTopic}`, [th...
[ { "docid": "099af4e33678d74d2f1cba5e963c241a", "score": "0.6469646", "text": "removeResponseField(e){\n const formGroup = $(e.target).closest('.response-li');\n const responseTextArea = $(e.target).siblings('.response-text')[0];\n\n const index = this.responsesArray.indexOf(response...
a315fdb6d1f4d441494f378cba25c5eb
pass down the min size
[ { "docid": "2030eec1c8f9dfb1d9090d25306128b4", "score": "0.0", "text": "split_leaf(m_leaf) {\n var max, split, splitHorizontally;\n // begin\n if (this.lchild !== void 0 && this.rchild !== void 0) {\n return false; // this leaf has already been split\n }\n \n // determine split\n ...
[ { "docid": "8f4116e99ae3a0b9165ccee2a5d189bd", "score": "0.6895785", "text": "CalcMinMaxWidth() {}", "title": "" }, { "docid": "5a5982f92978aef00b912968b662da76", "score": "0.6769247", "text": "function computeMinLaneSize(lane) {\r\n if (!lane.isSubGraphExpanded) return ...
71aecc4dff51f1948674a370a60e4579
logs: a[0] = 2 a[1] = 5 a[3] = 9 ///// my trial of array and forEach method
[ { "docid": "7800928f5ec2a82ec69cd6f53fca88f4", "score": "0.0", "text": "function outPut (element, index, array) {\n\tconsole.log('array[' + index + '] = ' + element);\n}", "title": "" } ]
[ { "docid": "bcfdf34f740106065dbe66ee2c12240e", "score": "0.68904316", "text": "function pa ( a){ for(let i=0; i< a.length; i++) { console.log(a[i]); } }", "title": "" }, { "docid": "d21efb7f30a800ca17bc918e054ce097", "score": "0.6719701", "text": "function arrList(arr) {\n\t\tfuncti...
de884a4264377d0933e45512c16ef52f
Store all data into layout and exit
[ { "docid": "5a14e0ba37937379af17c40b4bb90162", "score": "0.59707373", "text": "function saveLayout() {\n if (layoutModeGet()) {\n for (let i = 0; i < tempBuffer.Input.length; i++) {\n tempBuffer.Input[i].parent.layoutProperties.x = tempBuffer.Input[i].x;\n tempBuffer.Inpu...
[ { "docid": "11ef384c139609b0e9fb93d9f5890370", "score": "0.6066716", "text": "function enter() {\n clearNotMine();\n if (!initView()) return;\n fetchFrontData();\n }", "title": "" }, { "docid": "129c15f2d77b5dab408a94e9de6f51b4", "score": "0.5942777", "text": "renderLayout ...
b9624d7b996b97b53112ed999ad00b98
Function that builds the popup contents and displays them into the DOM Content.
[ { "docid": "9b0fe77e2cbdc5f98257bd9036db6715", "score": "0.0", "text": "async function generateSalesNotification() {\n var fullname = await generateFullName();\n var selectedProduct = availableProducts[generateRandomNumber(availableProducts.length)];\n var whenBought ...
[ { "docid": "645ddb52d1d6f507334e48047e103bef", "score": "0.70582736", "text": "function show_popup(content) {\n $('.popup').html(content);\n $('.popup').show();\n}", "title": "" }, { "docid": "a040a4511da89cdfd906296ff26676fe", "score": "0.6945006", "text": "static buildDynamic...
b16449265a3c0bab9e439279bc301f3f
Focus in input field
[ { "docid": "1d07892d19b2c97c96b8cd8e5b2af6db", "score": "0.0", "text": "onMouseEnter(value) {\n this.updatePasswordOptions();\n this.show();\n this.checkPassword(value);\n }", "title": "" } ]
[ { "docid": "cd25118e927b5c54562cfec2a7cf4cc9", "score": "0.83781904", "text": "function focus() {\n\t\t$input.focus();\n\t}", "title": "" }, { "docid": "5be0998d0701bb0eba516930fba03713", "score": "0.8278289", "text": "focusIn() {\n this._input.focus()\n }", "title": "" }, ...
dfddc435e19f57bf1de3b6d1012c2eb1
This function adds the event listeners to the html elements
[ { "docid": "53b2d4edf0841af080f15a303170748f", "score": "0.0", "text": "function addEvent(elements, type, functionality, value) {\n if (value != undefined && elements.length > 1) {\n elements.forEach(function(element) {\n element.addEventListener(type, function() { functionality(value) })...
[ { "docid": "7f8180b60aa48e5abcaf00337dda3adf", "score": "0.73579615", "text": "function addEventListeners() {\r document.getElementById(\"clickTag\").addEventListener(\"click\", clickthrough);\r\tdocument.getElementById(\"clickTag\").addEventListener(\"mouseover\", mouseOver);\r\tdocument.getElementB...
52316aaf82146a47c213ec8c871d73bc
ChunkStreamer is the base prototype for various streamer implementations.
[ { "docid": "bf6cc5dac5ced31635c283856498a911", "score": "0.6637304", "text": "function ChunkStreamer(config)\n\t{\n\t\tthis._handle = null;\n\t\tthis._paused = false;\n\t\tthis._finished = false;\n\t\tthis._input = null;\n\t\tthis._baseIndex = 0;\n\t\tthis._partialLine = '';\n\t\tthis._rowCount = 0;\n\t...
[ { "docid": "f7f0596b4a7404eaaeb5df8a38d86ccf", "score": "0.66855365", "text": "function Stream() {\n this.head = new Chunk(this);\n }", "title": "" }, { "docid": "f7f0596b4a7404eaaeb5df8a38d86ccf", "score": "0.66855365", "text": "function Stream() {\n this.head = new Chunk(thi...
307ff6095ed825e4d4591a71c22f76a3
La idea es crear aqui un array manejable de resultados. Funcion para manejar y extraer los datos Json resultado de una consulta sparQL. Se le pasan como parametros str, que es el JSON y el tipo de recurso que se esta mostrando Devuelve solamente los que estan dentro de una distancia dada.
[ { "docid": "da12dc2f56c4b0e7080ad15a7e5c1f28", "score": "0.5599957", "text": "function extractJsonCercanos(str,informacion_de) {\r\n ini_milayer(informacion_de);\r\n var html ='<table class=\"table-striped table-condensed mitable\" id=\"tabladatos\">';\r\n var json= eval('(' + str +...
[ { "docid": "5bb721de2b6efc46e15bc46721dec9b9", "score": "0.56008303", "text": "function resultBuscar(res){ \n var arry = [];\n console.log(from)\n console.log(to)\n\n if(city && type){ \n for (var i = 0; i < res.length; i++) {\n var precio = res[i].Precio.substring(1,res[i].Precio.le...
e2f057c5979032b3ba4f7a9be4fae3ec
bottom of the barrel
[ { "docid": "c6da0d88f1e47033a12409dba92d74bf", "score": "0.0", "text": "function eval_s(code) // this is how snippets are eval'ed if they include \"output=\"/\"json_output=\" - so if they include these, the scope of eval isn't global - doesn't matter much [13/07/18]\n{\n\tvar output=undefined,json_outpu...
[ { "docid": "4418a973f6ab547731b4c50f8952d73b", "score": "0.76063585", "text": "getBottom() {\n return this.y + this.height - 15;\n }", "title": "" }, { "docid": "a4ae9a8039c0839a0f3a59e165184e08", "score": "0.75805163", "text": "bottom() {\n return this.y + this.height;\...
f8ba7dd19d362c3a62239ba5e9ee30f9
Is there an active session?
[ { "docid": "80f506335cbd5bb31de3440176921f0d", "score": "0.635358", "text": "function checkForSessionCookie() {\n return document.cookie.split(\";\").some(function (item) {\n return item.trim().indexOf(\"session=\") == 0;\n });\n}", "title": "" } ]
[ { "docid": "194f0894a10cd15f4ff22c0493e70edd", "score": "0.8536298", "text": "function activeSession() {\n return (Session.isActive());\n }", "title": "" }, { "docid": "5defaffc71e7dad4615da96e78789b1f", "score": "0.7960123", "text": "isSessionActive() {\n return this._.se...
97a39cacb15768f650c1d49d9113d87d
Run the key handlers registered for a given scope. Returns true if / any of them handled the event.
[ { "docid": "1054a79eca78f66e65cec25c91ce0647", "score": "0.7007115", "text": "function runScopeHandlers(view, event, scope) {\n return runHandlers(view.state.facet(keymaps), event, view, scope);\n}", "title": "" } ]
[ { "docid": "9c1c65c962c4ce8b938f1196dda83901", "score": "0.71154004", "text": "function runScopeHandlers(view, event, scope) {\n return runHandlers(getKeymap(view.state), event, view, scope)\n }", "title": "" }, { "docid": "cca76504142f1d04bf98c5dd8d6fc852", "score": "0.71036196"...
22ebe0c10709519fde53feb7acba2010
FIN CONTROLES DE CLIENTE
[ { "docid": "2c1329b4e2d6e5adf75facc1f1f416eb", "score": "0.0", "text": "function indicarFamiliaTodas() {\n $.ajax({\n url: '/Familia/ChangeFamilia',\n type: 'POST',\n dataType: 'JSON',\n data: {\n familia: \"Todas\"\n }\n ...
[ { "docid": "c1e001e8a19ecaecf64f13136789b749", "score": "0.6987415", "text": "function preencheDados() {\n\n}", "title": "" }, { "docid": "2eb0094b81a9ceb5c7db96cca352692e", "score": "0.6785103", "text": "function stProprieteCompo()\n{\n\tthis.Action_en_cours=null;\n\tthis.NewCle=nul...
e2951227e4a17a00b7153c306205a690
compute the mass of of list of modifications (undefiend is possible). It's just the sum of the modif masses
[ { "docid": "93ed67c4b73a7ccce0bd2e1b601b6895", "score": "0.8205836", "text": "function computeMassModifArray(modifications) {\n\n if (modifications === undefined || modifications.length == 0) {\n return 0;\n }\n var tot = 0;\n _.each(modifications, function(m) {\n tot += m.get('mas...
[ { "docid": "7b27a385c0be11df8f783adc75244bb1", "score": "0.7192389", "text": "calculateMass(){\n var m = this.solute.getMass();\n let solvs = this.solvents;\n for(var i = 0; i < solvs.length; i++){\n m += solvs[i].getMass();\n }\n return m;\n }", "tit...
0861473f60bdfa0b27e2b5688e9ee459
Calculates SHA2 (SHA384) hash
[ { "docid": "6eba569fb6e64f665f8b6b3c7862dc11", "score": "0.6793977", "text": "function sha384(data) {\n if (wasmCache$8 === null) {\n return lockedCreate(mutex$8, wasmJson$9, 48)\n .then((wasm) => {\n wasmCache$8 = wasm;\n return wasmCache$8...
[ { "docid": "40c37ad74e14d66f56a29da70e653a38", "score": "0.6712332", "text": "function SHA256(b){function h(j,k){return(j>>e)+(k>>e)+((p=(j&o)+(k&o))>>e)<<e|p&o}function f(j,k){return j>>>k|j<<32-k}var g=[],d,c=3,l=[2],p,i,q,a,m=[],n=[];i=b.length*8;for(var e=16,o=65535,r=\"\";c<312;c++){for(d=l.length;...
f451051739742e007662c8b0e14191bc
Gets if the node is an AnyKeyword.
[ { "docid": "46253f632fbd77a8e2603d914db8fb6f", "score": "0.810285", "text": "static isAnyKeyword(node) {\r\n return node.getKind() === typescript_1.SyntaxKind.AnyKeyword;\r\n }", "title": "" } ]
[ { "docid": "447b0846870b6f02efadd2700c8d82f0", "score": "0.6248842", "text": "static isTrueKeyword(node) {\r\n return node.getKind() === typescript_1.SyntaxKind.TrueKeyword;\r\n }", "title": "" }, { "docid": "1f8bd10ff69acd242a0acadcb3c623d6", "score": "0.5995059", "text": ...
3b205fac695b4fa57d2b4ba3a5582b9c
Pull letters from display spans. Also accept optional argument for tab completion purposes. Returns array of characters.
[ { "docid": "c65cb0638db81ff931d6c55b8173f9a6", "score": "0.6552284", "text": "function extractLetters(spanList,last){\n\tvar strArr = new Array();\n\t\n\tif(spanList.length>1){\n\t\tif(!last){\n\t\t\tfor(var i=0;i<spanList.length;i++){\n\t\t\t\tstrArr.push(spanList[i].innerHTML);\n\t\t\t}\n\t\t}\n\t\tel...
[ { "docid": "3674c3dda08d80e4a1e0d67d5e76db63", "score": "0.6128563", "text": "function splitTextInSpans(elem) {\n var letters = elem.textContent.split('');\n elem.innerHTML = '';\n return letters.map(function (letter) {\n var span = document.createElement('span');\n span.textContent = letter;\n...
db60035b247f03de8dc73fc906331a0a
format a parsed object into a url string
[ { "docid": "e64db141e0d32566c44c162029664f09", "score": "0.0", "text": "function urlFormat(obj) {\n // ensure it's an object, and not a string url.\n // If it's an obj, this is a no-op.\n // this way, you can call url_format() on strings\n // to clean up potentially wonky urls.\n if (util.isString(...
[ { "docid": "74ed7fbd973e1194a5d6b8dbc5ffd50f", "score": "0.7649171", "text": "function urlFormat(obj) {\n // ensure it's an object, and not a string url.\n // If it's an obj, this is a no-op.\n // this way, you can call url_format() on strings\n // to clean up potentially wonky urls.\n if...
8a2a81fb08521b3d21c886e18b2e3459
Focuses the list item.
[ { "docid": "fa6887bc9c9fddc7e49f558a556224e8", "score": "0.65629125", "text": "focus() {\n\t\tthis.children.first.focus();\n\t}", "title": "" } ]
[ { "docid": "7aa17574c2182c8913f5fcf9b4d13e3c", "score": "0.70693845", "text": "function changeListItemFocus(itemList) {\r\n\t//If there is an item to focus on\r\n\tif (itemList.length > 0) {\r\n\t\t//Focus on item and scroll to it (presumably there is one item to focus on)\r\n\t\t$('.ui-focus').removeCl...
ef15d6826486f68b69dc56262eca7ab6
Function gets current time and invokes the view to reset the chatbox
[ { "docid": "0e2ff0daf2c13b512b176014a6f62669", "score": "0.72537154", "text": "clearChatMessages() {\n let currentTime = this.getTime(new Date());\n this.view.clearChatMessages(currentTime);\n }", "title": "" } ]
[ { "docid": "0a525abb7013f66027817f8c5068a5a6", "score": "0.69788855", "text": "function handleResetChat() {\n\t\t\t\tdocument.getElementById('div_chat').innerHTML = '';\n\t\t\t\tgetChatText();\n\t\t\t}", "title": "" }, { "docid": "b006ac24c519cf4673aefb578a0c51dc", "score": "0.6622595", ...
8216e1b99a30d8481f2e15641e65762e
The "insertData(offset,arg)" method will insert a string at the specified character offset. Insert the data at the beginning of the character data. Retrieve the character data from the second child of the first employee. The "insertData(offset,arg)" method is then called with offset=0 and arg="Mss.". The method should ...
[ { "docid": "fd9b7f3b1e2e4290bc4e07b6ab4775c0", "score": "0.6804069", "text": "function hc_characterdatainsertdatabeginning() {\n var success;\n if(checkInitialization(builder, \"hc_characterdatainsertdatabeginning\") != null) return;\n var doc;\n var elementList;\n var nameNode;\n ...
[ { "docid": "a2fcde3e176ad3e00dc0c370b02c974a", "score": "0.74118805", "text": "function hc_characterdatainsertdatamiddle() {\n var success;\n var doc;\n var elementList;\n var nameNode;\n var child;\n var childData;\n doc = load(\"hc_staff\");\n elementList = doc.getEl...
03231c23e6a2ca4f3991fc8430ecb936
circle1 = new Bubble(300,300); circle2 = new Bubble(250,250);
[ { "docid": "fb59e7a6ced40bee378b5904cf26649a", "score": "0.7039615", "text": "function Bubble (x,y,rad,col) {\n\tthis.posX = x;\n\tthis.posY = y;\n\tthis.radius = rad;\n\tthis.color = col;\n\n\tthis.display = function() {\n\t\tstroke('white');\n\t\tstrokeWeight(2);\n\t\tfill(this.color);\n\t\tellipse(th...
[ { "docid": "3639a50bcf82b4e46b683b573573dcca", "score": "0.75721323", "text": "function Bubble() {\n this.x = 0;\n this.y = 0;\n this.radius = 100.0;\n this.radiusScaling = 12;\n this.radiusRate = 18;\n this.drawRadius = this.radius;\n}", "title": "" }, { "docid": "9d31a9dd...
3ab212d67275632838c26facaff8cace
Removes all keyvalue entries from the map.
[ { "docid": "a1c16153d9285b507b13d1c4bf2b381b", "score": "0.0", "text": "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}", "title": "" } ]
[ { "docid": "633172b04674f7d1a88db79a9adb1021", "score": "0.6949329", "text": "function flushMap(map) {\n var values = map.v;\n var keys = map.k;\n\n for (var ndx = values.length; --ndx >= 0; ) {\n if (flushMap(values[ndx])) {\n // remove map\n ...
11cc61ff02d8bd176297417fd1431ccc
Converts the possible Proto types for numbers into a JavaScript number. Returns 0 if the value is not numeric.
[ { "docid": "540d948e777da758fbced3b89c935390", "score": "0.0", "text": "function yt(t) {\n // TODO(bjornick): Handle int64 greater than 53 bits.\n return \"number\" == typeof t ? t : \"string\" == typeof t ? Number(t) : 0;\n }", "title": "" } ]
[ { "docid": "dcf5c5acf37eeaf669e9c4349784753a", "score": "0.7374579", "text": "asNumber() {\n switch (this.type) {\n case types.NUMBER:\n return this.value;\n case types.STRING:\n if (this.value.indexOf('.') !== -1) {\n return parseFloat(this.value, 10);\n }\n return p...
2d52bca69a876ebe1989ca476b4bbb2c
computes center of mass of digit, for centering note 1 stands for black (0 white) so we have to invert.
[ { "docid": "c3c8ade090d438bc44ff1be8afd414c4", "score": "0.5224272", "text": "function centerImage(img) {\n var meanX = 0;\n var meanY = 0;\n var rows = img.length;\n var columns = img[0].length;\n var sumPixels = 0;\n for (var y = 0; y < rows; y++) {\n ...
[ { "docid": "347345bd300274f82a4b780ea52ec5ca", "score": "0.62586963", "text": "calcCenter() {\n this.center = new Vector((this.p1.x + this.p2.x + this.p3.x) / 3, (this.p1.y + this.p2.y + this.p3.y) / 3);\n }", "title": "" }, { "docid": "0bf40b0f942532717aa4554299a593ae", "score...
2735a354ce45b732cc3a58821002c226
function that places the navigation in the center of the window
[ { "docid": "67e305f9c01a5da01d19ea1c6b6576ce", "score": "0.62396955", "text": "function RepositionNav(){\n\n\t\tvar windowHeight = $window.height(); //get the height of the window\n\n\t\tvar navHeight = $('#nav').height() / 2;\n\n\t\tvar windowCenter = (windowHeight / 2); \n\n\t\tvar newtop = windowCent...
[ { "docid": "3da4cafd68943505ebf46470cf730246", "score": "0.69623005", "text": "function resizeAndCenterWindow() {\n\tresizeWindow();\n\tcenterWindow();\n}", "title": "" }, { "docid": "abf7599091da632567b1cd3201f57997", "score": "0.6727748", "text": "function center_pg(){\r\n ...
bada4f9741769cb02be5f752f75b9d8f
Store Customer Data in localStorage
[ { "docid": "7b033964a3d8bf0560869bd01eb39d43", "score": "0.71793616", "text": "function storeCustomerData(customerOrders, currentCustomersCount, index){\r\n localStorage.setItem(\"customerOrders\", JSON.stringify(customerOrders));\r\n localStorage.setItem(index, \"inTheQueue\");\r\n ...
[ { "docid": "240f731e8ac8b77ebbe125dd4d95800a", "score": "0.8721325", "text": "function setCustomerData(data) {\n localStorage.setItem(\"customerData\", JSON.stringify(data));\n}", "title": "" }, { "docid": "8844ec64aaf5bca67d6d14eddfd4bd3d", "score": "0.7712512", "text": "function...
76ff4d54dfd48acbd6e47caa50a3375a
get location from user
[ { "docid": "6ab1db1077a55a9b04617e7b54effa8f", "score": "0.0", "text": "function fetchWeather () {\n const input = document.querySelector('input[type=\"text\"]');\n const userLocation = input.value;\n getWeatherData(userLocation);\n }", "title": "" } ]
[ { "docid": "c35e8ad47999852c54d9f279bfa45733", "score": "0.78977704", "text": "function getLocationFromUser() {\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(showPosition);\n }\n else {\n pinStringContainer.append(\"Geolocation is not supported by this ...
1d9a7e2ec3638173c314490a3b742049
create a popup window
[ { "docid": "25f6641863a239d6eaf8b52e07cf3077", "score": "0.0", "text": "function inputBox(title,html,fun){\n\tvar mask=document.createElement(\"div\");\n\tmask.setAttribute(\"id\",\"mask\");\n var frame=document.createElement(\"div\");\n\tframe.setAttribute(\"id\",\"inputbox\");\n\tdocument.body.appe...
[ { "docid": "feb461fd0c98a58ebf56dc3a8bae753a", "score": "0.81346166", "text": "function newPopup(url) {\n popupWindow = window.open(\n url,'popUpWindow','height=700,width=700,left=120,top=100,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no,status=yes')\n}", "title"...
9bf7479c4e47fdb222e270dd0fc47ff3
After user rates a post, jQuery updates the rating background on the current page to show the user the new rating
[ { "docid": "b8c7ea8419a724bf67a0d79e379664bb", "score": "0.68375933", "text": "function changeRatingBackground(e){\n\tvar mX = e.pageX;\n\tvar post_id = e.target.id;\n var distance;\n\t\n\tjQuery(document).ready(function($) {\n\t\tvar id_name = '#' + String(post_id);\n\t\tvar element = $(id_name);\n...
[ { "docid": "6a77d4cc656d402c4172fb0f7540aada", "score": "0.7842683", "text": "function rate_post_success(data) {\n\tjQuery('#post-ratings-' + post_id).html(data);\n\tif(ratingsL10n.show_loading) {\n\t\tjQuery('#post-ratings-' + post_id + '-loading').hide();\n\t}\n\tif(ratingsL10n.show_fading) {\n\t\tjQu...
141d438079d76884ab0c971a5f2da33b
Update Left hand fields.
[ { "docid": "47308f710cefce1fd37a80ce4b55ffb4", "score": "0.0", "text": "function getFields_click(key, opt) {\n \t var element = opt.$trigger.attr(\"connFieldId\");\n \t //element = element.substring(0, element.indexOf(\"-clone\"));\n \t getFieldsForContainer(element);\n ...
[ { "docid": "010f46d98362be60cafbae1d7e2dad5a", "score": "0.58439755", "text": "updateToStore() {\r\n if (this.props.formSetValue)\r\n this.props.formSetValue(this.props.inputProps.name, this.fieldStatus.value, this.fieldStatus.valid, this.fieldStatus.dirty, this.fieldStatus.visited);\r...
c54ff8842d2e19670fa01e190f4fab5e
! moment.js locale configuration
[ { "docid": "8efd6fcbb0a6a40b3758afa4ca9597b2", "score": "0.0", "text": "function t(e){return e%100==11||e%10!=1}", "title": "" } ]
[ { "docid": "ebb5f27bdb5dc355a9b06d43593649ed", "score": "0.8263063", "text": "function cl(e,t,n){return\"m\"===n?t?\"минута\":\"минуту\":e+\" \"+\n//! moment.js locale configuration\n//! locale : Russian [ru]\n//! author : Viktorminator : https://github.com/Viktorminator\n//! Author : Menelion Elensúle ...
da7281f3c9d89ece91d18c52a14ce398
this function adds a msg (line) to the frequency table if the message doesn't exist it makes an entry for it else, it updates the frequency
[ { "docid": "c5b0c44d6dffdb6181e2cd5951260636", "score": "0.58941686", "text": "function addLineToTable(table, l){\n if (table != emoteTable){\n \tvar line = l.toLowerCase()\n } else {\n \tvar line = l\n }\n if(table[line]){\n table[line].freq++;\n } else {\n table[line] = {'freq':1, 'used':...
[ { "docid": "594f86feebae2ba3a12c77aba788950d", "score": "0.57308185", "text": "add(message) {\r\n let count = this._messages[message];\r\n if (!count) {\r\n count = 0;\r\n }\r\n count++;\r\n this._messages[message] = count;\r\n }", "title": "" }, ...
26cd7354f0a443fc8aef0c13abb84b27
Examines the CloudFormation resource and discloses attributes.
[ { "docid": "025f14352269e87f30d3ca49d5b48184", "score": "0.0", "text": "inspect(inspector) {\n try {\n jsiiDeprecationWarnings.aws_cdk_lib_TreeInspector(inspector);\n }\n catch (error) {\n if (process.env.JSII_DEBUG !== \"1\" && error.name === \"DeprecationErro...
[ { "docid": "d628e09f23d5cf170bc6a351cf50d308", "score": "0.5161213", "text": "function closeResources() {\n _.each(AACtrlResourcesService.getCtrlKeys(), function (key) {\n cleanResourceFieldIndex('saved', 0, key);\n delete resources[key];\n });\n }", "title": "" }, { ...
6679dcb889009de5ba2259462e8fecb5
\briefobserve a specific resource.
[ { "docid": "431c95215e10f65c0be522b04a3e3747", "score": "0.0", "text": "function observe(endpoint, Oid, i, Rid, handle, callback)\n{\n\tlwm2mServer.getDevice(endpoint, function (num, device) {\n\t\tif (device === undefined) {\n\t\t\treturn;\n\t\t}\n\t\tlwm2mServer.observe(device.id, Oid, i, Rid, handle,...
[ { "docid": "ac8c099a32786eecb291928f4a4b5fdd", "score": "0.5814095", "text": "function isResource(req, res, next) {\n let uri = req._parsedOriginalUrl.path;\n if (uri.includes('/api')){\n uri = uri.substring(4);\n }\n if (uri.includes('?')){\n uri = uri.substring(0, uri.indexOf...
2afef6b13786769e35dd28fee189d766
Translate a coordinate in the document to a percentage on the slider
[ { "docid": "58f91e8b366393d571aad7da9c412592", "score": "0.56402516", "text": "function calcPointToPercentage ( calcPoint ) {\r\n\t\tvar location = calcPoint - offset(scope_Base, options.ort);\r\n\t\tvar proposal = ( location * 100 ) / baseSize();\r\n\r\n\t\t// Clamp proposal between 0% and 100%\r\n\t\t...
[ { "docid": "2bab4aaf95fe0cd62ffba56914365d19", "score": "0.69370776", "text": "function set_perc(e){\n return ((e.pageX-railStart)/(railEnd-railStart)); // calculates how far the slider is on the rail\n }", "title": "" }, { "docid": "2c1db9bf7c44f902ed05f598ee4758a1", "score": "...
093a0354bafde94a34f3eccdedacea33
Decode the "FD" prefix (IY instructions).
[ { "docid": "1b79bb95f9d3bdf6d7f2a9f2442095c4", "score": "0.72053105", "text": "function decodeFD(z80) {\n const inst = fetchInstruction(z80);\n const func = decodeMapFD.get(inst);\n if (func === undefined) {\n console.log(\"Unhandled opcode in FD: \" + toHex(inst, 2));\n }\n else {...
[ { "docid": "dd27446bc8942d5b8f75eb8f25f94440", "score": "0.721388", "text": "function decodeFD(z80) {\n const inst = fetchInstruction(z80);\n const func = decodeMapFD.get(inst);\n if (func === undefined) {\n console.log(\"Unhandled opcode in FD: \" + toHex(inst, 2));\n ...
f482eac3c38051c3dc5181d5c6414d1e
Duplicates a OrientedBoundingBox instance.
[ { "docid": "de550e92c81fb486e01daf12a281ccad", "score": "0.70331895", "text": "clone(result) {\n return new OrientedBoundingBox(this.center, this.halfAxes);\n }", "title": "" } ]
[ { "docid": "d6d7c92f56f5cf28d8a07569f885f58a", "score": "0.5994103", "text": "_resetBoundingBoxStyles() {\n extendStyles(this._boundingBox.style, {\n top: '0',\n left: '0',\n right: '0',\n bottom: '0',\n height: '',\n width: '',\n ...
320719e391eb4754ef406764eacdcb95
Open subnavigation in mobile
[ { "docid": "c7efdd31b9b96c4319826ed8be81d6f9", "score": "0.63505226", "text": "openSubNav(e, subitem, siblings) {\n let parent = subitem;\n\n siblings.forEach(sibling => {\n if(sibling !== parent) {\n sibling.classList.remove('open');\n }\n })\n\...
[ { "docid": "0f47930d4ff1e1450ef689c659447ed3", "score": "0.70208126", "text": "function toggleMobileNavSubmenu(e) {\n var listItem = e.delegateTarget;\n var id = $(listItem).attr('id');\n var levelPrefix = id.substr(0, id.indexOf('-'));\n\n e.preventDefault();\n e.stopPropagation();\n ...
8eff60e907f59b5e76abc95eb3f17aa7
This function determines the radius of the earthquake marker based on its magnitude. Earthquakes with a magnitude of 0 were being plotted with the wrong radius.
[ { "docid": "3a715576d6e1886cb7b5e2b04a762a20", "score": "0.0", "text": "function getRadius(ratio) {\r\n if (ratio === 0) {\r\n return 1;\r\n }\r\n\r\n return ratio;\r\n }", "title": "" } ]
[ { "docid": "2e85eb7e52d44b8e8f06c0e358b7ef52", "score": "0.78650624", "text": "function markerRadius(magnitude) {\n return magnitude*5;\n}", "title": "" }, { "docid": "cb78335cf9c1887a68da24dbde05e830", "score": "0.78305435", "text": "function getEarthquakeCircleRadius(pMagnitude)...
6481335e7afa3947799c19069b0568cf
Function finds what pagination link is clicked, then shows the corresponding students. Shows students 1 10 by default.
[ { "docid": "5c5e909d056eaa09c646db9531ad3d10", "score": "0.6620696", "text": "function displayStudents(perPage, currentPage) {\n\tconst low = ((currentPage * perPage) - perPage)\n\tconst high = (currentPage * perPage)\n\n\tfor (let i = 0; i < studentArray.length; i++) {\n\t\tif (i < low || i >= high) {\...
[ { "docid": "19b88507d3e7badd709c9e40b5ad3cea", "score": "0.7711573", "text": "function paginationLinks() {\n\tdocument.addEventListener(\"click\", (e) => {\n\t\tif (e.target.parentNode.parentNode.className === 'pagination') {\n\t\t\tcurrentPage = e.target.textContent;\n\t\t\tdisplayStudents(perPage, cur...
a27045eb78606ec8c284964502c4fa9b
TODO: Optimize groups of rules with nonempty prefix into some sort of decision tree
[ { "docid": "878696d4883d1de06840dab57c1f800d", "score": "0.0", "text": "function update(evt) {\n if (evt && evt.defaultPrevented) return;\n var ignoreUpdate = lastPushedUrl && $location.url() === lastPushedUrl;\n lastPushedUrl = undefined;\n // TODO: Re-implement this in 1.0 for http...
[ { "docid": "8405b80c0144aa16094c93ae23a66da7", "score": "0.5767434", "text": "prefixed (str) {\n let rule = this.virtual(str)\n if (this.disabled(rule.first)) {\n return rule.nodes\n }\n\n let result = { warn: () => null }\n\n let prefixer = this.prefixer().add[rule.first.prop]\n ...
8e21cb66337a6b91b778b55f99b86973
Constructor should define this.numComps, this.defaultColor, this.name
[ { "docid": "8540b37edff0eb9df32f568dc8a23682", "score": "0.0", "text": "function ColorSpace() {\n error('should not call ColorSpace constructor');\n }", "title": "" } ]
[ { "docid": "e9caf0ada2efd89eaa2b071214b88d45", "score": "0.70134425", "text": "constructor(color, name){\n // color is coming from parent class.\n super(color);\n \n this.name = name;\n }", "title": "" }, { "docid": "e85c94031d91e81b99895b5bca89302b", "score...
042e6fda295ada951802898df0ba793a
Positions returned by coordsChar contain some extra information. xRel is the relative x position of the input coordinates compared to the found position (so xRel > 0 means the coordinates are to the right of the character position, for example). When outside is true, that means the coordinates lie outside the line's ve...
[ { "docid": "0b80b5dc359f5d08bd7b5f0ed9799985", "score": "0.0", "text": "function PosWithInfo(line, ch, sticky, outside, xRel) {\n var pos = Pos(line, ch, sticky);\n pos.xRel = xRel;\n if (outside) { pos.outside = true; }\n return pos\n }", "title": "" } ]
[ { "docid": "f1bd116e8697789de8aced346754dc39", "score": "0.6561227", "text": "function PosWithInfo(line, ch, sticky, outside, xRel) {\n var pos = Pos(line, ch, sticky);\n pos.xRel = xRel;\n\n if (outside) {\n pos.outside = true;\n }\n\n return pos;\n } // Compute the c...
29a5731e6d576a982a4c998ecbc6406f
get files only for given folder id
[ { "docid": "add4f1e07b5d1d0c3d0dc2d1029e9020", "score": "0.6659671", "text": "getSubTasksWithTaskId(folderId) {\n let realm = new Realm({schema: [TaskSchema, SubTaskSchema, NotesSchema]});\n const files = realm.objects('SUBTASK').filtered('taskId = $0', folderId);\n return files;\n }", "ti...
[ { "docid": "8868fa3224a120882872664b29dfb193", "score": "0.7237807", "text": "async function getFolderContent(id, userid) {\n var files;\n if (id) {\n files = await db.readDataPromise('file', { parent: id });\n } else {\n //Home directory\n files = await db.readDataPromise(...
91fec091e4de65a2c724528a35ea00bb
Callback for when everything is done
[ { "docid": "27162f072b734b2273d27770126165f9", "score": "0.0", "text": "function done( status, nativeStatusText, responses, headers ) {\n\t\t\tvar isSuccess, success, error, response, modified,\n\t\t\t\tstatusText = nativeStatusText;\n\n\t\t\t// Ignore repeat invocations\n\t\t\tif ( completed ) {\n\t\t\...
[ { "docid": "38eb9f8ebf69bead70844bc1805c903e", "score": "0.8006051", "text": "onDone () {}", "title": "" }, { "docid": "ce60cd1c4b9152a056372c50b14bc6b2", "score": "0.7320223", "text": "onEnd() {}", "title": "" }, { "docid": "b049ed07c7ffe24e296145d99c1ff92d", "score"...
263c06c4d9c8791bc538c5426fdd4a58
==== FEATURE: ORION CHAT ====
[ { "docid": "ea32035ac4333a4a9c99117a298cf3fb", "score": "0.0", "text": "function orionChatIntegration() {\n $(\"html\").css({\n paddingTop : \"150px\"\n });\n var ad = $(\"#ad\");\n ad.css({\n margin : \"0px\",\n left : \"5px\",\n width : \"900px\",\n textA...
[ { "docid": "e7fc993e758e87dbcbd197d21a67ed97", "score": "0.656805", "text": "function showChatHelp() {\n\tcreateModal('Chat Commands');\n\tif (UI_FontsBtn==\"1\") {\n\t\tbody.append('<strong>Fonts commands</strong><br /><br />');\n\t\thtml='<li><code>[white]</code>, <code>[yellow]</code>, <code>[orange]...
87d5865390406b100cdf8f10204a02ba
Receives N CSS class names as arguments, and returns a selector in the format: path('ngimodelobject', [ngimodel, 3]); .ngiscope > .ngidrawer > .ngimodelobject > .ngidrawer > .ngimodel:nthchild(3)
[ { "docid": "0fc7b4263365d3fb30abcb192f231388", "score": "0.64780396", "text": "function path() {\n\tvar sel = '.ngi-scope > .ngi-drawer ';\n\tfor (var i = 0; i < arguments.length; i++) {\n\t\tif (typeof arguments[i] == 'object' && arguments[i].length == 2)\n\t\t\tsel += ' > .' + arguments[i][0] + ':nth-...
[ { "docid": "f2a04e0c0230f4c9106c7b12c62973a1", "score": "0.5806202", "text": "function querySelectorFunc(selector,classPrototype,methodOrAttributeName,index){null!==selector?\"number\"!=typeof index?addToObjectProps(classPrototype,\"querySelectors\",{attributeName:methodOrAttributeName,querySelector:sel...
1b448437014f5178fe8178c83f8e9246
Component for listing reviews
[ { "docid": "c23b72518c30778aedd87831d4881ba6", "score": "0.7268636", "text": "function ReviewList(props) {\n const { reviews } = props;\n return (\n <ul className=\"review-list\">\n {\n reviews.map((review, i) => {\n return (\n ...
[ { "docid": "cd18122da44486b6d10e222086042cff", "score": "0.6896434", "text": "static getAllReviews() {\r\n return new Promise((resolve, reject) => {\r\n fetch(`http://localhost:1337/reviews/`,\r\n { method: 'GET'})\r\n .then(response => response.json())\r\n .then(reviews => {\r\n ...
52937d3f697707232a18943a9f46324a
if the dest has an error, then stop piping into it. however, don't suppress the throwing behavior for this.
[ { "docid": "39f5c5776a64f0e27e59f62d1d564031", "score": "0.0", "text": "function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);\n }", "title": "" } ]
[ { "docid": "667d2deaba1ef4c20ac5828518eddff1", "score": "0.74918973", "text": "function onerror(er){debug('onerror',er);unpipe();dest.removeListener('error',onerror);if(EE.listenerCount(dest,'error') === 0)dest.emit('error',er);} // This is a brutally ugly hack to make sure that our error handler", ...
863231fbf92ec36fde413e1e6aeab0b9
The maximum is exclusive and the minimum is inclusive
[ { "docid": "1d83e63fdf2c6ff3c273f75d647cb191", "score": "0.0", "text": "function getRandomInt(min, maxExcl) {\n min = Math.ceil(min);\n maxExcl = Math.floor(maxExcl);\n return Math.floor(Math.random() * (maxExcl - min) + min);\n}", "title": "" } ]
[ { "docid": "a9c6de05af084fa4e6fc36c8f8e404ca", "score": "0.7476248", "text": "function value_limit(val, min, max) {\r\nreturn val < min ? false : (val > max ? false : true);\r\n}", "title": "" }, { "docid": "e39a3d3db767a1e5e4bf50d6efd6797a", "score": "0.7349672", "text": "constructo...
e6d1f2d798c704726a00fdf0d1f914d5
valida os dados digitados pelo usuario
[ { "docid": "7883024f8efc491a72927a2683bc517f", "score": "0.5929449", "text": "ValidacaoDeDados()\n\t{\t\t\t\n\t\tvar returnValue = true;\n\t\talert (this.cep.length);\n\n\t\t//verificar quantidade de casas no cep\n\t\tif(this.cep.length > 8)\n\t\t{\n\t\t\treturnValue = false;\n\t\t\talert('Cep informado...
[ { "docid": "45a18d649f676d7bd912b41c7f8ff3a9", "score": "0.6874098", "text": "function validarDNI(campo) {\n var input = campo.value; //input: valor del campo pasado\n var numero //numero del dni pasado\n var letr //letra del dni pasado\n var letra //letras posibles\n var expresion_regular_dni //ex...
f9b89232840feb0f221d7927770d98d1
Coerce animation to None if popup is not transparent private static object
[ { "docid": "243c5c1979a06497763299c15689a1a2", "score": "0.75167894", "text": "function CoercePopupAnimation(/*DependencyObject*/ o, /*object*/ value)\r\n {\r\n return o.AllowsTransparency ? value : PopupAnimation.None;\r\n }", "title": "" } ]
[ { "docid": "dd1c862b4572dc7a8f6f1799cafe11ca", "score": "0.62027305", "text": "function swowFramePopup() {\n $('.slider-frame-popup-holder').css({\n 'opacity' : '1',\n 'z-index' : '100'\n });\n }", "title": "" }, { "docid": "5a01f4f00a5782208831af266343...