Search is not available for this dataset
query
stringlengths
7
355k
document
stringlengths
9
341k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Show display form to create a new movie.
function openFormCreate(elem) { //Clean form data document.getElementById('formEnreg').reset(); //Cache table list film rendreInvisible(elem); //Display form $("#divFormFilm").show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createMovie() {\n var title = document.querySelector(\"#movie-title\").value.trim();\n var length = document.querySelector(\"#movie-length\").value;\n var formSelect = document.querySelector(\"#movie-genre\");\n var genre = formSelect.options[formSelect.selectedIndex].value;\n\n var movie =...
[ "0.63396037", "0.62122834", "0.62056434", "0.60521144", "0.60251373", "0.6016761", "0.58753943", "0.58725035", "0.5866391", "0.58543557", "0.5850208", "0.5819645", "0.58051586", "0.5787938", "0.57829034", "0.5768415", "0.5765634", "0.5744349", "0.5734794", "0.5734146", "0.573...
0.595443
6
Get ID from button supprimer from template/tablefilms.php
function supprimerFilm(id) { //alert(id);//get id ok var action = 'action=delete'; var idFilm = 'idFilm='+id; $.ajax({ method: "POST", url:"../../controller/filmController.php", data: action+'&'+idFilm }).done(()=>{ listerFilms();//Call this one to refresh page document.getElementById("divMsg")....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteController_removeTable(){\n\tvar id = +this.querySelector(\".id\").innerHTML;\n\ttableId = deleteController_tableId(id);\n\t$(\"#section .hoverEffect\").removeClass(\"selectEffect\");\n\t$(this).addClass(\"selectEffect\");\n\tmainController_messageBox({status: 'delete', message: 'Видалити таблицю з ...
[ "0.6226424", "0.6012422", "0.5974093", "0.5904009", "0.5858294", "0.583422", "0.57944596", "0.57911193", "0.5786972", "0.5782929", "0.57542884", "0.5741004", "0.5729814", "0.5729078", "0.5726407", "0.572224", "0.5718802", "0.5713648", "0.5685685", "0.5672053", "0.56660336", ...
0.5418931
81
Adffiche le form editer avec les champs courrants
function showFormEditer(id) { //alert(id);//get id ok var action = 'action=showForm'; var idFilm = 'idFilm='+id; $.ajax({ method: "POST", url:"../../controller/filmController.php", //data: action+'&'+idFilm, data: action+'&'+idFilm, }).done((jsonString)=>{ //Va creer le template $.ajax({ method: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function affiche_formulaire() {\r\n\r\n\tif (document.choix.choix_type.selectedIndex == 0)\r\n\tdocument.getElementById('form_base').style.display = 'block';\r\n\telse\r\n\tdocument.getElementById('form_base').style.display = 'none';\r\n\r\n\t// Chat\r\n\tif (document.choix.choix_type.selectedIndex == 1)\r\n\tdocu...
[ "0.6466444", "0.64376533", "0.63932127", "0.6179007", "0.6158416", "0.61522233", "0.6138788", "0.6120929", "0.6108846", "0.6089854", "0.6085156", "0.6063285", "0.60554445", "0.6052868", "0.60490966", "0.60235566", "0.60036033", "0.59840506", "0.5979766", "0.59782815", "0.5977...
0.0
-1
End of cooldown implement
function randomItem(array) { return array[Math.floor(Math.random() * array.length)]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cooldown() {\r\n t = T_MAX;\r\n t_cooldown = COOLDOWN_MAX;\r\n }", "function GoOnCooldown() {\n\tonCooldown = true;\n\tSetImage(\"cooldown\");\n\tChangeKanaText(this.hirigana);\n\tthis.timeLastUsed = Time.time;\n\thudAbilities.timeLastUsed = Time.time;\n\t//Invoke(\"GoOffCooldown\", coo...
[ "0.82395214", "0.7528132", "0.74774015", "0.7374349", "0.72695047", "0.7145635", "0.7066373", "0.70283544", "0.6890081", "0.6855375", "0.6855375", "0.6535885", "0.64391035", "0.64391035", "0.6334193", "0.63078123", "0.62818956", "0.62657994", "0.62190396", "0.62151486", "0.61...
0.0
-1
! The buffer module from node.js, for the browser.
function i(e, t) { if (e === t) return 0; for (var r = e.length, n = t.length, i = 0, a = Math.min(r, n); i < a; ++i) if (e[i] !== t[i]) { r = e[i], n = t[i]; break } return r < n ? -1 : n < r ? 1 : 0 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function typedBuffer() {\n}", "function typedBuffer() {\n}", "function typedBuffer() {\n}", "function typedBuffer() {\n}", "function typedBuffer() {\n}", "function typedBuffer() {\n}", "function createBuffer() {\n var ptr = exports.hb_buffer_create();\n return {\n ptr: ptr,\n /**\n ...
[ "0.7284428", "0.7284428", "0.7284428", "0.7284428", "0.7284428", "0.7284428", "0.7242275", "0.72009933", "0.71086955", "0.7015804", "0.68968946", "0.68760246", "0.6799534", "0.67715156", "0.67568755", "0.67568755", "0.67568755", "0.67568755", "0.67568755", "0.67568755", "0.67...
0.0
-1
! Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at THIS CODE IS PROVIDED ON AN AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITH...
function h() { for (var e = 0, t = 0, r = arguments.length; t < r; t++) e += arguments[t].length; var n = Array(e), i = 0; for (t = 0; t < r; t++) for (var a = arguments[t], o = 0, s = a.length; o < s; o++, i++) n[i] = a[o]; return n ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SBRecordsetPHP_analyzePlatformSpecific()\r\n{\r\n\r\n\r\n}", "function getClientVersion() { return '0.14.4'; }", "_getPageMetadata() {\n return undefined;\n }", "createObjectContext2() {\n console.log('deprecated')\n return C.extension\n }", "function test_crosshair_op_azone_azure() {}"...
[ "0.50573444", "0.50256354", "0.49675283", "0.49640542", "0.49535468", "0.49464145", "0.48981807", "0.48899832", "0.4858086", "0.48150742", "0.48150742", "0.4785633", "0.47548887", "0.47473934", "0.47311622", "0.47305244", "0.47280687", "0.47175774", "0.47086903", "0.47086903", ...
0.0
-1
When we join a game
function gameJoined(context, payload) { const { playerId, username } = payload; const state = context.getState(); if (!state.game) { return; } const { game } = state; // Player is already within the state if (game.players[playerId] !== undefined) { return; } game.players[playerId] = { user...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function joinGameAsPlayer() {\n // check if ingame true\n\n}", "function JoinGame() {\n\t// Your code goes here for joining a game\n\tprint(\"Complete this method in Multiplayer.js\");\n}", "handleJoining() {\r\n\t\tthis.setState({\r\n\t\t\t...this.state,\r\n\t\t\tjoinedGame: true\r\n\t\t})\r\n\t}", "functi...
[ "0.77787805", "0.7713063", "0.7569093", "0.7289581", "0.7095143", "0.7063759", "0.6982935", "0.6917514", "0.68822855", "0.68355787", "0.67673856", "0.67228097", "0.66906166", "0.6681339", "0.66437405", "0.66294986", "0.66120076", "0.6608336", "0.6606167", "0.6578514", "0.6569...
0.62095845
59
When game phases are updated
function gamePhase(context, payload) { const { game } = context.getState(); if (!game) { return; } // Update the game with the current phase game.phase = payload; context.setState({ game }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onPhaseChange( e ){\n console.log( e.oldPhase + \" -> \" + e.newPhase );\n //command pattern\n phaseHandler[ e.newPhase ]( e );\n }", "passPhase1Clicked() {\n \tthis.model.gamePhase = 2;\n \tthis.view.changeButtons(this.model.gamePhase);\n }", "function onUpdate(framew...
[ "0.71728706", "0.66386443", "0.65697366", "0.654155", "0.64756906", "0.64270645", "0.6299703", "0.62826955", "0.62747025", "0.6262524", "0.6255077", "0.62296605", "0.6200025", "0.6190593", "0.6175136", "0.61731267", "0.6170939", "0.61138254", "0.60963917", "0.6077046", "0.607...
0.6675742
1
When the new game scores are published
function gameScore(context, payload) { const { score } = payload; const { game } = context.getState(); if (!game) { return; } game.teams = game.teams.map((team, index) => { team.score = score[index]; return team; }); context.setState({ game }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function storeScore(event) {\n scores.push({\n initials: userInitials.value,\n score: secondsLeft\n })\n event.preventDefault();\n localStorage.setItem(\"scores\", JSON.stringify(scores))\n clearInterval(timeInterval);\n window.location = \"highscore.html\"\n}", "function addScore...
[ "0.6422979", "0.6379925", "0.6350015", "0.63033545", "0.62556887", "0.62376463", "0.6197008", "0.61589146", "0.614927", "0.61274993", "0.61251205", "0.611781", "0.6111073", "0.6073577", "0.6064195", "0.6054208", "0.6053989", "0.60461116", "0.60364795", "0.6026602", "0.6026198...
0.0
-1
When a game ends or you leave one
function gameOver(context) { context.setState({ player: null, game: null, racks: [] }); context.clearTimers(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleEndGame() {\n\n}", "end() {\n this.isOver = true;\n this.isRunning = false;\n\n if (typeof this.onGameOver === 'function') {\n this.onGameOver();\n }\n }", "function endGame() {\r\n\t\tgameOver = true;\r\n\t\tsetMessage2(\"Game Over\");\r\n\t}", "funct...
[ "0.8554635", "0.8347367", "0.83377075", "0.8178497", "0.80685204", "0.8017093", "0.79829735", "0.79721785", "0.79699945", "0.7958719", "0.78724986", "0.7868436", "0.7865864", "0.78410095", "0.7821306", "0.7799064", "0.7766526", "0.7750016", "0.7742", "0.7728313", "0.7724343",...
0.0
-1
funcao que vai pegar os atributos 'wminclude' do body da 'index.html'
function loadIncludes(parent){ //se o parametro for vazio, o parametro recebe o 'body' todo if(!parent) parent = 'body' //senao, executa o codigo abaixo //aqui eu configurei o parent para usar a funcao find(de busca) do jquery //para buscar o atributo 'wm-include' dentro do parametro(parent) $(p...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function includeHTML() {\r\n var z, i, elmnt, file, xhttp;\r\n /*loop through a collection of all HTML elements:*/\r\n z = document.getElementsByTagName(\"*\");\r\n for (i = 0; i < z.length; i++) {\r\n elmnt = z[i];\r\n /*search for elements with a certain atrribute:*/\r\n file = elmnt.getAttribute(\"...
[ "0.62805766", "0.622871", "0.6125194", "0.6122075", "0.58051723", "0.5760491", "0.57077247", "0.5644137", "0.56426525", "0.56191874", "0.56031257", "0.5573647", "0.5550529", "0.5549719", "0.5539703", "0.55280644", "0.55280644", "0.54474527", "0.53875685", "0.5342336", "0.5314...
0.65728986
0
se a chamada for bem sucedida
success(data){ //insiro os dados do arquivo(data) que a url indicou no html do wm-include(e) //que esta na pagina index.html $(e).html(data) //agora excluo o atributo para que nao aja nehuma nova //interpretacao dela. //se caso e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function chequeo(){\n \n contador(preguntas);\n\n if(palabrasTotales == 27){\n final = true;\n alert('No quedan mas letras en el abecedario. :(');\n } else {\n proxturno = confirm('Desea seguir con la siguiente ronda?');\n ...
[ "0.63806343", "0.62666875", "0.625831", "0.624222", "0.61751294", "0.60347617", "0.6001791", "0.595151", "0.59472317", "0.592742", "0.59106684", "0.5907434", "0.5906925", "0.5886062", "0.5858211", "0.58477086", "0.5798114", "0.5777724", "0.5774086", "0.5773953", "0.5751602", ...
0.0
-1
Resize canvas size to current display
function resizeRendererToDisplaySize(renderer) { const canvas = renderer.domElement; const pixelRatio = window.devicePixelRatio; const width = canvas.clientWidth * pixelRatio | 0; const height = canvas.clientHeight * pixelRatio | 0; const needResize = canvas.width !== width || ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function adjustCanvasSize() {\n CANVAS.width = CANVAS_WIDTH;\n CANVAS.height = window.innerHeight;\n}", "function resizeCanvas() {\n\t\tcanvas.width = (window.innerWidth) * .67;\n\t\tcanvas.height = (window.innerHeight) * .69;\n\t\tredraw();\n\t}", "function resizeCanvas() {\n\t\tcanvas.width = (window.i...
[ "0.8294717", "0.8283315", "0.8245283", "0.8179441", "0.81780946", "0.81148636", "0.80691403", "0.80677384", "0.8044897", "0.8044111", "0.8035364", "0.8025303", "0.8007159", "0.7950593", "0.79449135", "0.7936576", "0.79293543", "0.79293543", "0.79223686", "0.7907114", "0.79016...
0.0
-1
Resize canvas side to current display
function resizePageCanvasToDisplaySize() { const pageCanvas = document.querySelector('#page-canvas'); //const context = pageCanvas.getContext('2d'); const pixelRatio = window.devicePixelRatio; const width = pageCanvas.clientWidth * pixelRatio | 0; const height = pageCanvas.clie...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "canvasResize()\n {\n View.canvas.setAttribute(\"width\", this.floatToInt(window.innerWidth*0.95));\n View.canvas.setAttribute(\"height\",this.floatToInt(window.innerHeight*0.95));\n\n //update objects with the new size\n this.updateCharacterDim();\n this.updateVirusDim();\n ...
[ "0.7991524", "0.7959696", "0.792971", "0.7919952", "0.7908766", "0.7872765", "0.78640175", "0.7856178", "0.78349304", "0.7828807", "0.77979225", "0.77451503", "0.77411485", "0.7724107", "0.77208257", "0.77157724", "0.77157724", "0.7713745", "0.7708487", "0.7700701", "0.766927...
0.0
-1
Write keyPressed function and apply force on pressing up_arrow key on the first bob.
function keyPressed() { if (keyCode === UP_ARROW) { Matter.Body.applyForce(bob1,bob1.position,{x:-50,y:-45}); } console.log(keyPressed); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function keyPressed() {\n if keyCode(up_arrow){\n Matter.Body.applyForce(bob1.body,bob1.body.position,{x:-30,y:155});\n }\n}", "function keyPressed(){\n\tif(keyCode === UP_ARROW){\n\t\tMatter.Body.applyForce(bob1.body,bob1.body.position,{x:-30,y:155})\n\t}\n}", "function keyPressed(){\n\tif(keyCode === UP...
[ "0.74914134", "0.74478686", "0.7391834", "0.73884743", "0.73236", "0.73127955", "0.72961867", "0.7256227", "0.7243058", "0.7147987", "0.7084839", "0.70289415", "0.6973381", "0.6962052", "0.6849921", "0.6849921", "0.6848168", "0.6808625", "0.6796354", "0.6718853", "0.66966414"...
0.8027342
0
Update the enemy's position, required method for game Parameter: dt, a time delta between ticks
update(dt) { this.x+=5 if (this.x >= 500) { this.x = -100; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "update(dt) {\n\t\t//Set enemy speed\n \tthis.x += this.s*dt;\n\n \tthis.checkOutside();\n\t}", "update(dt) {\n // You should multiply any movement by the dt parameter\n // which will ensure the game runs at the same speed for\n // all computers.\n // handles enemy movement- use dt(time delta) t...
[ "0.8167309", "0.8016065", "0.7930656", "0.79088753", "0.7806539", "0.77856165", "0.77516097", "0.7749673", "0.7710863", "0.77099365", "0.76912856", "0.7676019", "0.766606", "0.7660789", "0.75971395", "0.7563211", "0.75325185", "0.7495626", "0.74832314", "0.7439779", "0.739831...
0.0
-1
Move the character on the screen and check if player has won
handleInput(input) { if (input == "up" && this.y >= 45) { this.y-=85 } else if (input == "right" && this.x <= 300) { this.x+=100 } else if (input == "down" && this.y <= 300) { this.y+=85 } else if (input == "left" && this.x >= 50) { this.x-...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkForWin() {\n\n var d = $vast.MathUtil.getPointDistance(mainPlayer.x, mainPlayer.y, goal.x, goal.y);\n if (d <= 1) {\n mainPlayer.setPosition(64, 64);\n }\n }", "function isGameWon () {\n console.log('checking if you won the game')\n return gameState.enemiesLeft ...
[ "0.77274", "0.7062721", "0.6947308", "0.6887084", "0.6851183", "0.679767", "0.6779098", "0.67648035", "0.6763713", "0.6745452", "0.67310786", "0.6723905", "0.67234844", "0.6703313", "0.6697042", "0.669019", "0.667219", "0.665585", "0.6627031", "0.6596212", "0.65659326", "0....
0.0
-1
Clear the placeholder for the Options in the dedicated space in the UI.
clearOptions(){ let element = p5Instance.select(`#div_${this.id}`); if(element){ element.remove(); this.command.context.chain.strokeWeight(1); } //clear tips div let tipDiv = document.getElementById(`tip_${this.id}`); if(tipDiv){ tipDi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clearOptions(){\n let element = p5Instance.select(`#div_${this.id}`);\n if(element){\n element.remove();\n this.command.context.chain.strokeWeight(1);\n }\n }", "function clearOptions(element) {\n element.empty();\n}", "function maybeClearOptText() {\n\t\t/*jshint...
[ "0.7022165", "0.6971155", "0.6939147", "0.68081534", "0.67634803", "0.67151976", "0.6671987", "0.6603846", "0.6564628", "0.6562114", "0.65453297", "0.6529336", "0.65238595", "0.64828926", "0.6466092", "0.64414126", "0.6434418", "0.6427542", "0.63985395", "0.63960725", "0.6395...
0.6911541
3
Gets authorizations for a user in a tv group and a digital media group. If the groups area changes any tests may return 403(forbidden), in this case, define another users
function getAuthTv() { return axios.post(`${url}/login`, {"username": "teste","password": "teste"}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function internal_getGroupAccessAll(acpData) {\n return internal_getActorAccessAll$1(acpData, acp.group);\n}", "function internal_getGroupAccess(acpData, groupUrl) {\n return internal_getActorAccess$1(acpData, acp.group, groupUrl);\n}", "function getListGeneralUserAuthorized() {\n var ListGeneralUserAuthori...
[ "0.5331072", "0.5160356", "0.5090821", "0.5035672", "0.49889287", "0.49850455", "0.49805194", "0.48995593", "0.48759183", "0.48685917", "0.4866507", "0.48652008", "0.4836435", "0.4832743", "0.4821489", "0.48103452", "0.4805403", "0.47895005", "0.47865033", "0.47686458", "0.47...
0.0
-1
Bands In Town Api Function
function concerts(){ axios.get("https://rest.bandsintown.com/artists/" + argString + "/events?app_id=" + bandApiKey) .then(function(response){ var data = response.data; for (var i = 0; i < data.length; i++){ var venue = data[i].venue.name; var location = data[i].venue.city + " " + data[i].venue....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bands(input) {\n\n var bandName;\n if (input === undefined) {\n bandName = \"Judah & the Lion\";\n } else {\n bandName = input;\n }\n\n //Setting the Bandsintown API query URL \n var queryURL = \"https://rest.bandsintown.com/artists/\" + bandName + \"/events?app_id=codingbo...
[ "0.66956365", "0.64765286", "0.6467938", "0.61082023", "0.6024266", "0.6017073", "0.5997577", "0.59697145", "0.5957528", "0.59574", "0.58969235", "0.58288807", "0.581519", "0.57430005", "0.5731445", "0.5721416", "0.5707235", "0.56771404", "0.56390935", "0.5629193", "0.5625642...
0.0
-1
If no movie title is passed through
function noMovie (){ axios.get("http://www.omdbapi.com/?t=" + argString + "&apikey=trilogy") .then(function(response){ var data = response.data; var title = data.Title; var year = data.Year; var imdbRating = data.imdbRating; var country = data.Country; var language = data.Langu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showMovieTitle() {\r\n if(unsafeWindow.amazonMovieName) {\r\n // AJAX request is run only if the movie has been found\r\n // RMQ : Doesn't work in Chrome because it can't access javascript var in unsafeWindow\r\n new unsafeWindow.Ajax.Request(\r\n '/shot/' + shotId + '/showsolutio...
[ "0.6889117", "0.67964053", "0.6704116", "0.66353494", "0.6556633", "0.64927644", "0.6355213", "0.63469017", "0.6331583", "0.6280528", "0.62577385", "0.62127364", "0.6193011", "0.6188158", "0.60465586", "0.60067606", "0.5997755", "0.59931314", "0.5987639", "0.59837735", "0.597...
0.59844184
19
Mock challenge response with Pebble CTS
async function challengeCreateFn(authz, challenge, keyAuthorization) { if (challenge.type === 'http-01') { return cts.addHttp01ChallengeResponse(challenge.token, keyAuthorization); } if (challenge.type === 'dns-01') { return cts.addDns01ChallengeResponse(`_acme-challenge...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "respond2faChallenge(user_input, challenge_id) {\n var sixDigits = new RegExp(\"\\\\d{6}\");\n var self = this\n return new Promise((resolve, reject) => {\n if(sixDigits.test(user_input)){ // validate format of the sms token\n self.post(\n {\n uri: _apiUrl + \"challenge/\"+...
[ "0.632297", "0.6100107", "0.6100107", "0.60459536", "0.5830268", "0.5778937", "0.5689422", "0.5632871", "0.5591315", "0.5588934", "0.5584783", "0.5542288", "0.54948175", "0.54818314", "0.5480927", "0.5464857", "0.5459336", "0.54121053", "0.54117286", "0.5406734", "0.5374875",...
0.49168375
95
bits per input character. 8 ASCII; 16 Unicode
function hex_sha1(s) { return binb2hex(core_sha1(str2binb(s), s.length * chrsz)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function char(x) { return parseInt(x, 16); }", "function bits(ch) {\n return bitsInByte[index(ch)];\n }", "function format8Bit(input) {\n\n while (input.length < 8) {\n\tinput = 0 + input;\n }\n \n return input;\n}", "function onConvertToCharCode () {\n var input = document.getElemen...
[ "0.6880279", "0.6668545", "0.6398907", "0.6376961", "0.6363346", "0.63252723", "0.6296759", "0.6189471", "0.6118864", "0.60699433", "0.60573614", "0.6055808", "0.6037337", "0.6030091", "0.600675", "0.5998754", "0.5998497", "0.59878325", "0.5967428", "0.59634733", "0.5937768",...
0.0
-1
Perform a simple selftest to see if the VM is working
function sha1_vm_test() { return hex_sha1("abc") == "a9993e364706816aba3e25717850c26c9cd0d89d"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function test_candu_graphs_vm_compare_host_vsphere65() {}", "function test_crosshair_op_vm_vsphere65() {}", "function test_utilization_host() {}", "function test_crosshair_op_host_vsphere65() {}", "function test_service_bundle_vms() {}", "function test_candu_graphs_vm_compare_cluster_vsphere65() {}", "...
[ "0.69926953", "0.6805168", "0.6566065", "0.6418344", "0.6155626", "0.61495024", "0.598581", "0.5978368", "0.5838692", "0.58075494", "0.5783117", "0.57159674", "0.5695201", "0.5676138", "0.56674623", "0.5637526", "0.5632943", "0.560383", "0.5567749", "0.55570406", "0.55471957"...
0.5369142
37
Calculate the SHA1 of an array of bigendian words, and a bit length
function core_sha1(x, len) { /* append padding */ x[len >> 5] |= 0x80 << (24 - len % 32); x[((len + 64 >> 9) << 4) + 15] = len; var w = Array(80); var a = 1732584193; var b = -271733879; var c = -1732584194; var d = 271733878; var e = -1009589776; for (var i = 0; i ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function core_sha1(x, len) {\r\n /* append padding */\r\n x[len >> 5] |= 0x80 << (24 - len % 32);\r\n x[((len + 64 >> 9) << 4) + 15] = len;\r\n\r\n var w = Array(80);\r\n var a = 1732584193;\r\n var b = -271733879;\r\n var c = -1732584194;\r\n var d = 271733878;\r\n var e = -100958...
[ "0.7920356", "0.79138136", "0.78841376", "0.787909", "0.7875131", "0.7844819", "0.78437805", "0.7837321", "0.7837321", "0.7837321", "0.7837321", "0.7837321", "0.7837321", "0.7837321", "0.7837321", "0.7837321", "0.7837321", "0.7837321", "0.78131413", "0.7813075", "0.7800452", ...
0.78533524
5
Perform the appropriate triplet combination function for the current iteration
function sha1_ft(t, b, c, d) { if (t < 20) return (b & c) | ((~b) & d); if (t < 40) return b ^ c ^ d; if (t < 60) return (b & c) | (b & d) | (c & d); return b ^ c ^ d; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function combination_Function(a, b) { //Function returns a and b*c\n return (a + b) *c;\n}", "function combination() {\n \n var res = ''\n \n for (var i = 1; i <= 7; i++) {\n for (var j = 1; j <= 7; j++) {\n if (i !== j) {\n res += '(' + i + ',' + j + '), ';\n ...
[ "0.643168", "0.6278779", "0.6066197", "0.60255903", "0.5973827", "0.5862584", "0.5797127", "0.5763191", "0.5724173", "0.56884295", "0.5661291", "0.56214863", "0.5562148", "0.55612254", "0.55457866", "0.5537", "0.5534775", "0.55291915", "0.5511814", "0.5508229", "0.5486157", ...
0.0
-1
Determine the appropriate additive constant for the current iteration
function sha1_kt(t) { return (t < 20) ? 1518500249 : (t < 40) ? 1859775393 : (t < 60) ? -1894007588 : -899497514; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "add(val) {\r\n let a = ((this.a * val.b) + (val.a * this.b));\r\n let b = (this.b * val.b);\r\n if(a==0){ return new Rational(0,1) }\r\n return new Rational(a,b)\r\n }", "AdditiveExpression() {\n return this._BinaryExpression('MultiplicativeExpression', 'ADDITIVE_OPERATOR');\n }", "function ad...
[ "0.55291027", "0.5522805", "0.5429875", "0.5429875", "0.53979003", "0.5386429", "0.5297519", "0.5296085", "0.5286087", "0.5244989", "0.52254766", "0.52130187", "0.5212157", "0.52089643", "0.52005714", "0.5183492", "0.5164956", "0.51491934", "0.5086753", "0.5035489", "0.503520...
0.0
-1
Calculate the HMACSHA1 of a key and some data
function core_hmac_sha1(key, data) { var bkey = str2binb(key); if (bkey.length > 16) bkey = core_sha1(bkey, key.length * chrsz); var ipad = Array(16), opad = Array(16); for (var i = 0; i < 16; i++) { ipad[i] = bkey[i] ^ 0x36363636; opad[i] = bkey[i] ^ 0x5C5C5C5C; } va...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function b64_hmac_sha1(key, data) { return binb2b64(core_hmac_sha1(key, data));}", "function core_hmac_sha1(key, data)\n{\n var bkey = str2binb(key);\n if(bkey.length > 16) bkey = core_sha1(bkey, key.length * chrsz);\n\n var ipad = Array(16), opad = Array(16);\n for(var i = 0; i < 16; i++)\n {\n ipad[i] ...
[ "0.813993", "0.81239206", "0.81239206", "0.81239206", "0.81239206", "0.81239206", "0.81239206", "0.8113423", "0.80990356", "0.809098", "0.8067647", "0.8059161", "0.80563265", "0.80402124", "0.80209196", "0.7841355", "0.75538254", "0.7398958", "0.73936826", "0.6856762", "0.656...
0.8045415
13
Add integers, wrapping at 2^32. This uses 16bit operations internally to work around bugs in some JS interpreters.
function safe_add(x, y) { var lsw = (x & 0xFFFF) + (y & 0xFFFF); var msw = (x >> 16) + (y >> 16) + (lsw >> 16); return (msw << 16) | (lsw & 0xFFFF); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function add32(a, b) {\n return (a + b) & 0xFFFFFFFF;\n }", "function add32(a, b) {\n return (a + b) & 0xFFFFFFFF;\n }", "function add32(a, b) {\n return (a + b) & 0xFFFFFFFF;\n}", "function add32(a, b) {\n return a + b & 0xFFFFFFFF;\n }", "function add32(a, b) {\n return (a + b...
[ "0.78001654", "0.78001654", "0.77585024", "0.77419", "0.7737297", "0.7730642", "0.7730642", "0.77222997", "0.77206266", "0.7697171", "0.76934385", "0.76934385", "0.7681885", "0.7681885", "0.7681885", "0.7523042", "0.7447594", "0.72898716", "0.7155196", "0.7139378", "0.7062012...
0.0
-1
Bitwise rotate a 32bit number to the left.
function rol(num, cnt) { return (num << cnt) | (num >>> (32 - cnt)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bitRotateLeft(num,cnt){return num<<cnt|num>>>32-cnt;}", "function bitRotateLeft (num, cnt) {\n return (num << cnt) | (num >>> (32 - cnt))\n }", "function bitRotateLeft (num, cnt) {\n return (num << cnt) | (num >>> (32 - cnt))\n }", "function bitRotateLeft (num, cnt) {\n return (num << cnt...
[ "0.87508583", "0.8438198", "0.8438198", "0.8438198", "0.8438198", "0.8341921", "0.8341921", "0.8341921", "0.8341921", "0.8341921", "0.8341921", "0.8341921", "0.8341921", "0.8341921", "0.8341921", "0.8341921", "0.8341921", "0.8341921", "0.8334637", "0.83200794", "0.8303131", ...
0.0
-1
Convert an 8bit or 16bit string to an array of bigendian words In 8bit function, characters >255 have their hibyte silently ignored.
function str2binb(str) { var bin = Array(); var mask = (1 << chrsz) - 1; for (var i = 0; i < str.length * chrsz; i += chrsz) bin[i >> 5] |= (str.charCodeAt(i / chrsz) & mask) << (32 - chrsz - i % 32); return bin; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function strToBigEndianArray(str) {\n var x = Array();\n var mask = (1 << charBit) - 1;\n\n var len = str.length;\n\n var i = 0;\n\n for (var j = 0; j < len; i += charBit) {\n x[i >> 5] |= (str.charCodeAt(j++) & mask) << (32 - charBit - (i & 0x1f));\n }\n\n return x;\n}", "function st...
[ "0.6939543", "0.651265", "0.63960713", "0.633276", "0.6314533", "0.62759405", "0.62615126", "0.6259513", "0.6220869", "0.6180411", "0.6156388", "0.61289835", "0.6128436", "0.6116644", "0.61094844", "0.60822", "0.60822", "0.60822", "0.60822", "0.60822", "0.60822", "0.6077342...
0.58036673
95
Convert an array of bigendian words to a string
function binb2str(bin) { var str = ""; var mask = (1 << chrsz) - 1; for (var i = 0; i < bin.length * 32; i += chrsz) str += String.fromCharCode((bin[i >> 5] >>> (32 - chrsz - i % 32)) & mask); return str; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bin2string(array){\n var result = \"\";\n for(var i = 0; i < array.length; ++i){\n result += (String.fromCharCode(array[i]));\n }\n return result;\n}", "function utf8ArrayToStr(array) {\n\t\tvar out, i, len, c;\n\t\tvar char2, char3;\n\n\t\tout = '';\n\t\tlen = array.length;\n\t\ti = 0;...
[ "0.726426", "0.7187463", "0.71498364", "0.711951", "0.6977769", "0.6977769", "0.6971402", "0.68705326", "0.6647314", "0.6593271", "0.6491531", "0.64564764", "0.64535403", "0.6393004", "0.6356756", "0.62407553", "0.62230414", "0.6216595", "0.62056994", "0.62056994", "0.6194664...
0.0
-1
Convert an array of bigendian words to a hex string.
function binb2hex(binarray) { var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef"; var str = ""; for (var i = 0; i < binarray.length * 4; i++) { str += hex_tab.charAt((binarray[i >> 2] >> ((3 - i % 4) * 8 + 4)) & 0xF) + hex_tab.charAt((binarray[i >> 2] >> ((3 - i % 4) * 8...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bytes2hex(array) {\n let result = '';\n for (let i = 0; i < array.length; ++i)\n result += ('0' + (array[i] & 0xFF).toString(16)).slice(-2);\n return result;\n}", "function bigEndianArrayToHex(ar) {\n var charHex = new Array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', ...
[ "0.7356771", "0.7324078", "0.7300991", "0.72575945", "0.7250055", "0.7235008", "0.7235008", "0.7235008", "0.7230283", "0.7225271", "0.7214049", "0.7189577", "0.7189577", "0.7183515", "0.7182286", "0.7162271", "0.7162271", "0.7113626", "0.7067372", "0.69931984", "0.69585985", ...
0.6879409
23
Convert an array of bigendian words to a base64 string
function binb2b64(binarray) { var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; var str = ""; for (var i = 0; i < binarray.length * 4; i += 3) { var triplet = (((binarray[i >> 2] >> 8 * (3 - i % 4)) & 0xFF) << 16) | (((binarray[i + 1 >> 2] >> 8 * (3 -...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function binl2b64(binarray) \n{ \n var tab = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\" \n var str = \"\" \n for(var i = 0; i < binarray.length * 32; i += 6) \n { \n str += tab.charAt(((binarray[i>>5] << (i%32)) & 0x3F) | \n ((binarray[i>>5+1] >> (32-i%32)) & 0x3F)) \n ...
[ "0.77499086", "0.761088", "0.75898224", "0.7583865", "0.7583865", "0.7583865", "0.7560104", "0.7548764", "0.75395995", "0.75340176", "0.75330895", "0.75169355", "0.7500678", "0.7500678", "0.7495592", "0.747698", "0.7471697", "0.7471697", "0.7463195", "0.7453664", "0.7445105",...
0.7516289
12
Find Style object based on title
function findPreferredStyle(styleName, styles) { var styleLen = styles.length; for(var i = 0; i<=styleLen; i++) { console.log(styles[i]); var name = styles[i].title; if(name === styleName) { return styles[i]; } } return null...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getStyleSheetByTitle(title) {\n for (var i = 0; i < document.styleSheets.length; i++) {\n var sheet = document.styleSheets[i];\n if (sheet.title && sheet.title == title) return sheet;\n }\n return null;\n }", "function getStyle(element, styleName){\n\n var styleText=d3.select(elem...
[ "0.6756964", "0.66888773", "0.6687617", "0.6540491", "0.63723797", "0.61138976", "0.61002177", "0.60661006", "0.60397774", "0.6010672", "0.5973252", "0.5925592", "0.5925592", "0.5902177", "0.5831519", "0.57083535", "0.57068455", "0.56305593", "0.56192017", "0.556109", "0.5542...
0.691256
0
INFO474 Donut Chart Reusable Example Adopted from as well as from as well as from
function donutChart() { var width = 960, height = 500, radius, margin = { left: 10, bottom: 30, top: 100, right: 10, }, color = d3.scaleOrdinal(d3.schemeCategory20c), variable, title = 'Dank Donuts', category, floatFormat = d3.format('.4r'), percentFormat = d3.format(',.2%'); function chart(s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get Charting() {}", "function BuildCharts(id) {\n \n //********Declare Local Variables *********/\n //Variables for Series and Axis Arrays\n var years = [];\n var acres_burned = [];\n var avg_acres_burned = [];\n var fatalities = [];\n var structures_destroyed = [];\n var structures_da...
[ "0.6736022", "0.64727044", "0.64598435", "0.63291276", "0.62793213", "0.6253892", "0.6247733", "0.6218141", "0.62143576", "0.6207279", "0.61989534", "0.6195296", "0.61893725", "0.61797786", "0.61670333", "0.61658126", "0.61528224", "0.6147035", "0.6137043", "0.612795", "0.611...
0.0
-1
import columns from "../inventoryschema.js";
function TableCell(props){ function handleChange(event){ var changedText = event.target.value; props.handleChange(props.name,changedText); } function highlight(event){ event.target.select(); } function style() { return { width: props.schema[props.id+1]....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function models() {\n return {\n number: __WEBPACK_IMPORTED_MODULE_2__NumberColumn__[\"c\" /* default */],\n string: __WEBPACK_IMPORTED_MODULE_3__StringColumn__[\"a\" /* default */],\n link: __WEBPACK_IMPORTED_MODULE_17__LinkColumn__[\"a\" /* default */],\n stack: __WEBPACK_IMPORTED_...
[ "0.62672573", "0.6092994", "0.59983885", "0.58674395", "0.56358856", "0.5541572", "0.54921645", "0.5465549", "0.54202616", "0.53983223", "0.5392704", "0.53642404", "0.53575134", "0.5346632", "0.52536535", "0.523427", "0.5216971", "0.51687986", "0.5166479", "0.51026076", "0.51...
0.0
-1
Help Information Window Object function to selectTask
function fnselectTask () { for (var i = 0; i < objFrmTask.elements.length; i++) { if (objFrmTask.elements[i].checked) { if(objFrmTask.elements[i].type="radio") strAssigndTask=objFrmTask.elements[i].value; boolTaskStatus=true; if(boolTaskStatus){ objMessageContent.style.color="#00000...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function selectTask(task) {\n selectedTask = task;\n deselectOtherTasks();\n task.style.border = 'thick solid rgb(212, 96, 64)';\n showButtons();\n}", "function toggleSelectTask(task) {\n // Control click toggles selection state.\n const isMacOS = navigator.platform.toUpperCase().indexOf('MAC')...
[ "0.7261543", "0.6749511", "0.6526367", "0.6416417", "0.6320444", "0.6225877", "0.6133628", "0.6051981", "0.594612", "0.59029484", "0.5884061", "0.5869753", "0.5822239", "0.5778995", "0.5741059", "0.5723975", "0.569912", "0.5693684", "0.56856686", "0.5676398", "0.5674918", "...
0.57186055
16
functions to assign task to member
function fnchangeStatus(obj){ var objStatus=document.getElementById("status_"+ obj); objMessageContent.style.color="#000000"; fnselectTask (); strMemberName=obj; if (strAssigndTask!="") { if(strPlayerStatus=="available") { fnAssignTask(strMemberName); strAssigndTask=""; //fnassignedTask(st...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateTask() { \r\n\r\n }", "function createTask(v,t){\r\n \r\n }", "function task(task) {\n\treturn task;\n}", "function setTask(creep, task)\n{\n creep.memory.lockedTask = task;\n}", "function setTask(creep, task)\n{\n creep.memory.lockedTask = task;\n}", "function Task(taskname, tas...
[ "0.6665926", "0.6570124", "0.6389817", "0.62847817", "0.62847817", "0.6233226", "0.6164475", "0.61234283", "0.6117299", "0.6021407", "0.60007864", "0.5934813", "0.5913934", "0.5911282", "0.5861853", "0.58008647", "0.5785416", "0.57509965", "0.5724836", "0.5714879", "0.5705958...
0.0
-1
function to add array item "member Name" & assignedTask Label
function fnassignedTask(member, taskLabel){ ataskAssigned[member] = taskLabel; if (taskLabel!="") { currentTask=document.getElementById(taskLabel); currentTask.style.backgroundColor="#CFBA81"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addTask(title) {\n info.tasks.push({title: title, added: new Date()});\n }", "addTask(name, description, assignedTo, dueDate, status) {\n // increment id\n let id = this.currentId++;\n\n // push to tasks array\n this.tasks.push({\n id,\n name,\n description,\n assigne...
[ "0.5983302", "0.59419096", "0.5936371", "0.59328127", "0.5901691", "0.58832735", "0.5867439", "0.5831789", "0.58216155", "0.57763547", "0.5775162", "0.5735454", "0.5719476", "0.5661287", "0.5647498", "0.56212556", "0.56200844", "0.5588558", "0.55773747", "0.5574252", "0.55723...
0.6045763
0
functions to call changeStatus
function fndoAction(obj){ fnchangeStatus(obj); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateStatus(){\n getStatus();\n }", "function updateStatus(newStatus) {\n console.log(\"PX: UPDATE STATUS:\" + newStatus + \"\\n\");\n }", "function checkStatus() {\n\n }", "statusChanged() {\n this.emit('statusChanged', this.status);\n }", "onChangeStatus(newStatus) {\n...
[ "0.76070154", "0.73274344", "0.7060376", "0.70340383", "0.6934431", "0.6909431", "0.6889126", "0.67629594", "0.6737724", "0.66911304", "0.6678912", "0.6663432", "0.6655796", "0.6629122", "0.6599731", "0.6595306", "0.6534676", "0.6527258", "0.6527103", "0.6511375", "0.64873296...
0.7048322
3
functions to show & hide information window function to retrieve mouse xy pos
function fngetMouseXY(e) { // x-y pos.s if browser is IE if (IE) { var position=getScrollingPosition(); mintXPos = event.clientX + position[0]; mintYPos = event.clientY + position[1]; } else { // x-y pos if browser is NS mintXPos = e.pageX; mintYPos = e.pageY; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showXY(ev) {\n\tif (document.all) { ev = event; } \n\twindow.status = 'X: ' + ev.screenX + ' Y: ' + ev.screenY;\n\t}", "function show_showinfo() {\n\t//alert( \"pageX: \" + event.pageX + \", pageY: \" + event.pageY );\n\tvar showinfo_width = $('#showinfo').width();\n\tvar showinfo_height = $('#showinfo'...
[ "0.71207863", "0.70656705", "0.69740766", "0.68609715", "0.67769796", "0.6752498", "0.67092323", "0.66772926", "0.6655761", "0.66543365", "0.6621777", "0.6526614", "0.6435414", "0.64226615", "0.63165134", "0.62733966", "0.6243653", "0.62397254", "0.62153697", "0.6202475", "0....
0.75740737
0
end // To fix information window position bug in Ie6 & Ie7,
function getScrollingPosition() { var position = [0, 0]; if (typeof window.pageYOffset != 'undefined') { position = [ window.pageXOffset, window.pageYOffset ]; } else if (typeof document.documentElement.scrollTop != 'undefined' && document.documentElement.scrollTop >...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _infoboxPos(){\r\n\r\n\t\t\tvar _infobox = $('.info-wrap#iw'+isolaIndex);\r\n\r\n\t\t\tvar _linee = $('.line-wrap#lw'+isolaIndex);\r\n\t\t\tvar _arcTop = Math.round($('.arcipelago').offset().top);\r\n\t\t\tvar _arcleft = Math.round($('.arcipelago').offset().left);\r\n\t\t\tvar _boxH = _infobox.outerHeight...
[ "0.67288405", "0.6393513", "0.62909645", "0.6259279", "0.6236101", "0.6189884", "0.6189795", "0.6158752", "0.6149145", "0.59767413", "0.5965264", "0.5962836", "0.59231514", "0.5921546", "0.59135985", "0.59089935", "0.590471", "0.590327", "0.586407", "0.5863734", "0.58620036",...
0.0
-1
function to hide information window
function fnhideInformation() { mblnOnInfoWindow = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hideInfo() {\r\n\r\n $('#info_window').hide();\r\n}", "function fHideInfoWindow(){\n\tmyInfoWindow.close();\n\treturn true;\n//\tmyLock.noredraw = false;\n}", "function closeInfo() {\n infomodal.style.display = 'none';\n}", "function hide_info()\r\n{\r\n $('info_div').hide();// = 'hidden';\r\n}...
[ "0.8736786", "0.81874347", "0.7948513", "0.7737324", "0.7692685", "0.75886214", "0.75188583", "0.74442554", "0.7443276", "0.7397087", "0.73781306", "0.7338097", "0.73223525", "0.7266966", "0.7257701", "0.7226894", "0.72065383", "0.71817154", "0.7162894", "0.71606654", "0.7146...
0.8674107
1
Clear Display Call If Moved Out Before Display Interval
function fnClear() { var objInfoWindow; try { mstrInformationTargetID = ''; window.clearTimeout(mintPreviousTimeout); } catch(e){alert("Error: " + e.message);} mblnOnInfoRaiser = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "stopDisplayTimer() {\n if (this.timeoutHandle) {\n clearTimeout(this.timeoutHandle);\n this.timeoutHandle = undefined;\n }\n this.display();\n }", "stopDisplayTimer() {\n if (this.timeoutHandle) {\n clearTimeout(this.timeoutHandle);\n thi...
[ "0.75788224", "0.75788224", "0.6963311", "0.69609576", "0.69411105", "0.6914811", "0.68918186", "0.6850789", "0.6809287", "0.6784891", "0.6752296", "0.66977686", "0.6670158", "0.6652597", "0.6625427", "0.6620959", "0.65576017", "0.6553301", "0.65453506", "0.653216", "0.653129...
0.5953292
62
call Ajax and set response of ajax request into div innerHTML
function fnRequestwinStatusChanged() { if (http_request.readyState == 4) { if (http_request.status == 200) { var myText = http_request.responseText; var objxmlPlaceHolder=document.getElementById("textResponce"); objxmlPlaceHolder.innerHTML = myText; // Load Data From XML File To ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function success(response){\n //div1.innerHTML = response;\n }", "function getResponse(data) {\n responseDiv.innerHTML = data;\n}", "function functionCallBack() {\r\n\tif (xhr.status == 200) {\r\n\t\tdocument.getElementById(\"divRes\").innerHTML += xhr.responseText;\r\n\t}\r\n}", "function simpl...
[ "0.76876664", "0.7421365", "0.7033998", "0.7011751", "0.69797146", "0.6943831", "0.6895974", "0.68544644", "0.6843866", "0.680973", "0.68011093", "0.666624", "0.6632288", "0.6618906", "0.65310574", "0.6507881", "0.6505922", "0.64942616", "0.6493618", "0.64894027", "0.6471794"...
0.0
-1
Send Request Using Ajax to python controller
function fncallxmlAjaxFunction() { var senddata = mstrInformationTargetID; var url = "/loadData?senddata="+senddata; // To remove firefox bug : if (navigator.appName =="Netscape") { http_request.open("GET", url, true); } else { http_request....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "perform() {\r\n $.ajax(this.REQUEST)\r\n }", "function servletPost(xx) {\r\n\t$.ajax({\r\n\t\ttype : \"POST\",\r\n\t\turl : \"/\" + xx\r\n\t});\r\n\treturn false;\r\n}", "function ajax() {\r\n return $.ajax({\r\n url: 'http://127.0.0.1:5000/send_url',\r\n data: {\r\...
[ "0.67664933", "0.660051", "0.6481897", "0.6433929", "0.6413726", "0.6331433", "0.6317938", "0.6309952", "0.62908167", "0.6270301", "0.6251974", "0.6244362", "0.62197226", "0.6216455", "0.6202165", "0.61895955", "0.61019456", "0.6096128", "0.6092031", "0.6091488", "0.60912234"...
0.0
-1
function to Create object to call Ajax
function fncreatexhrObject() { var http_request = false; try { http_request = new XMLHttpRequest(); } catch (err1) { try { http_request = new ActiveXObject("Msxml2...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_makeAjax(url, method, postObj) {\n let ajax = this.$.ajax;\n ajax.method = method;\n ajax.url = url;\n ajax.body = postObj ? JSON.stringify(postObj) : undefined;\n ajax.generateRequest();\n }", "_makeAjax(url, method, postObj) {\n let ajax = this.$.ajax;\n aja...
[ "0.728805", "0.728805", "0.69982547", "0.6983247", "0.6928333", "0.69176394", "0.6848322", "0.683908", "0.68311125", "0.6827369", "0.6729611", "0.669764", "0.6650921", "0.6582964", "0.65722847", "0.6559168", "0.6505465", "0.64919376", "0.64625305", "0.6423644", "0.6421517", ...
0.62494844
39
Disapering the msg window
function fndisapWindow(){ Effect.fadeOut(windowObj); Effect.setOpacity(parentWindow, 1); // objTurn.innerHTML=intTurnNO; // fnresetmemberStatus(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hideWorkingMessage() {\n psc().hideLayer();\n}", "function ClearMessagePane() {}", "function hideMessage () {\n if (uiOnboarding.messageHolder.is(\":visible\")) uiOnboarding.messageHolder.hide();\n }", "function removeMSG(msg) {\n setTimeout(function () {\n var Idx ...
[ "0.6581087", "0.6489195", "0.6352962", "0.6226107", "0.6223623", "0.6058567", "0.60460776", "0.6041136", "0.6000807", "0.59886736", "0.5963192", "0.59393424", "0.5933686", "0.58940554", "0.58772624", "0.5863619", "0.58436424", "0.58160514", "0.5764119", "0.57492757", "0.57266...
0.0
-1
change msg in msg window
function fnchangeMsg(){ var msgObj=getElement("msgendTurn"); msgObj.innerHTML="Three Days Later..."; clearTimeout(intID); objMessageContent.innerHTML=""; fnSendRequest(endTaskReq); indId1= setTimeout(fndisapWindow, 2000); boolendTurn=false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setMessage(msg) {\n\t\tdocument.getElementById(\"message\").innerText = msg;\n\t}", "function message(msg){\n document.getElementById('message').innerHTML = msg;\n }", "function setMessage(msg) {\r\n\t\tdocument.getElementById(\"message\").innerHTML = msg;\r\n\t\tdocument.getElementB...
[ "0.7553137", "0.7428704", "0.7332055", "0.7306665", "0.7289676", "0.7270689", "0.7214323", "0.7176618", "0.71278757", "0.7058379", "0.7026881", "0.7014531", "0.700323", "0.69790214", "0.69496554", "0.69496554", "0.6913985", "0.6910121", "0.6910121", "0.6900182", "0.6889985", ...
0.0
-1
Get All Page Object According to requirement & call function according to events get object objFrmTask get object objLabel get object objMessageContent get object objTurn get object objCanvas get object btnEndTurn get object objhelpCheck get object btnCloseinformation get object btnQuit
function fngetPageobject(){ objFrmTask = getElement("frmTask"); var objLabel=fngetElementsByClass('labelText',document,'label'); var aPlayerNameav=fngetElementsByClass('player_Name available',document,'div'); var aPlayerNamebus=fngetElementsByClass('player_Name busy',document,'div'); objMessageContent=getElem...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function GoPage(strPageName)\n{\n // Class to define how to get to a specific page\n // funLoad is a function which loads the desired page (starting on the prereq page)\n // strPrereq indicates whether we should start from a simpler page\n // funTest is a function which determines whether we a...
[ "0.6164479", "0.5898348", "0.58970165", "0.5787591", "0.5735017", "0.5649503", "0.56153136", "0.55933183", "0.55877686", "0.55700886", "0.5546145", "0.5540027", "0.5507595", "0.5507595", "0.5472892", "0.5457853", "0.54310626", "0.54273385", "0.5420921", "0.5418216", "0.540459...
0.7146007
0
End Get All Page Object According to requirement & events call
function fnshowHideGraph(){ var graphObj=getElement("population"); if (graphObj.style.visibility!="visible") { graphObj.style.visibility="visible"; }else{ graphObj.style.visibility="hidden"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onAfterLoadPage(data_obj) {\n\t\t//TODO: Override this as needed;\n\t}", "onAfterLoadPage(data_obj) {\n\t\t//TODO: Override this as needed;\n\t}", "function fetchPagesAfterBackButton(){\n // LS.urlParams filters mpage, so read the arguments fresh\n var args = LS.getUrlParams();\n\n if (arg...
[ "0.671894", "0.671894", "0.59291035", "0.5904829", "0.5904695", "0.58779055", "0.5826825", "0.580279", "0.57382387", "0.5726512", "0.5706111", "0.5658229", "0.563897", "0.56129915", "0.5609802", "0.55451435", "0.554363", "0.5526338", "0.5526071", "0.5523103", "0.55049497", ...
0.0
-1
Check Page is loaded Complete....
function fndoload () { if (document.getElementsByTagName && document.getElementsByTagName ('body')) { //fngetPageobject(); document.onmouseover = fngetMouseXY; fnSendRequest("newGame"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pageFullyLoaded () {}", "function isPageLoaded() {\n lp ++;\n\n /*if (typeof evt == 'object') {\n src = evt.target.src;\n var pl = src.lastIndexOf('/');\n src = src.substr(pl + 1);\n }else src = evt;\n\n get('say').innerHTML += src + ', ' + lp...
[ "0.8070971", "0.7727723", "0.7414462", "0.7414462", "0.7414462", "0.7414462", "0.73768234", "0.72394204", "0.71812797", "0.7137735", "0.7137216", "0.70941263", "0.7082264", "0.70324713", "0.6998707", "0.6993624", "0.69886047", "0.6952005", "0.6952005", "0.6952005", "0.6952005...
0.0
-1
Calling fndoload function function Search Class by Name return array of classEmenets
function fngetElementsByClass(searchClass,node,tag) { var aclassElements = new Array(); if ( node == null ) node = document; if ( tag == null ) tag = '*'; var els = node.getElementsByTagName(tag); var elsLen = els.length; var pattern = new RegExp("(^|\\\\s)"+searchClass+"(\\\\s|$)"); for (i = 0, j...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAllClasses() {\n return readObject('classes');\n\n }", "function byClass( className ){ return document.getElementsByClassName( className ); }", "function getByClass (className) {\n if (document.getElementsByClassName) {\n var elements = document.getElementsByClassName(className)\n } else {...
[ "0.6316381", "0.6171829", "0.6146807", "0.6116157", "0.6111142", "0.60143864", "0.60059375", "0.6003874", "0.5980902", "0.5980902", "0.59788615", "0.5950603", "0.5898775", "0.5891402", "0.58850545", "0.5837434", "0.58325523", "0.58245766", "0.5806826", "0.57948256", "0.579482...
0.60521686
5
Search Class by Name end Select Member to assign the task
function fnselectMember(){ astrMemberName=fngetElementsByClass('btn_assign_unassign',document,'div'); fnteamStatus(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function searchTask(e) {\n\tconst text = e.target.value.toLowerCase();\n\tdocument.querySelectorAll(\".taskEach\").forEach(function (task) {\n\t const item = task.firstChild.textContent;\n\t if (item.toLowerCase().indexOf(text) != -1) {\n\t\t task.style.display = \"block\";\n }\n else {\n\t\t task.style....
[ "0.6025463", "0.54563147", "0.5394472", "0.53921086", "0.53920245", "0.5357682", "0.533316", "0.53150713", "0.5247791", "0.52199614", "0.5180793", "0.5157138", "0.51323664", "0.51305795", "0.51087296", "0.5107992", "0.5067648", "0.50619966", "0.5053534", "0.50447047", "0.5034...
0.55256724
1
End Select Member to assign Function to set Team Status
function fnteamStatus(){ var astrmemberStatus=fngetElementsByClass('assign',document,'img'); for (var counter = 0; counter < astrmemberStatus.length; counter++) { var arrMemberStat=astrmemberStatus[counter]; // roolover Image src arrMemberStat.onmouseover=function(){ btnPath=this.src; arr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fnselectMember(){\r\n\tastrMemberName=fngetElementsByClass('btn_assign_unassign',document,'div'); \r\n\tfnteamStatus();\r\n}", "function updateTeam(team) {\n console.log(\"update team: \", team);\n if (team === \"Trail Blazers\") {\n teamSelected = \"blazers\";\n } else {\n team...
[ "0.6826416", "0.6531763", "0.6266482", "0.611128", "0.59745353", "0.5973284", "0.596653", "0.59310204", "0.59079206", "0.58892876", "0.5851324", "0.5819013", "0.57788354", "0.57786953", "0.5767467", "0.576202", "0.57275105", "0.57159334", "0.5693496", "0.567481", "0.56643647"...
0.5693168
19
End Function to set Team Status Function to change Image of assign/ unassign button
function fnchangeImageStatus(strBtnSource){ arrBtnSource=strBtnSource.split("/"); strBtnSource=arrBtnSource.pop(); if(strBtnSource!="btn_assign_over.gif") { if (boolTaskStatus) { boolBtnstatus=false; fnError(); }else{ boolBtnstatus=true; } } else { boolBtnstatus=false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fnteamStatus(){\r\n\tvar astrmemberStatus=fngetElementsByClass('assign',document,'img'); \r\n\tfor (var counter = 0; counter < astrmemberStatus.length; counter++)\r\n\t\t{\r\n\t\t\tvar arrMemberStat=astrmemberStatus[counter];\r\n\t\t\t// roolover Image src\r\n\t\t\t\tarrMemberStat.onmouseover=function(){\...
[ "0.7344045", "0.63218075", "0.6318936", "0.6139159", "0.6087314", "0.6080717", "0.6080096", "0.60571176", "0.60043645", "0.59977067", "0.59851205", "0.59552556", "0.59403557", "0.587872", "0.5867963", "0.58660305", "0.58506423", "0.5829582", "0.5809922", "0.57871443", "0.5782...
0.6620497
1
End Function to change Image of assign/ unassign button Function to set tolltip visible / hide return boolean value for boolShowHelp
function fntoggleHelp(){ if(boolShowHelp) { boolShowHelp=false; objhelpCheck.title="Help On"; objhelpCheck.src="../static/images/helpbutton_On.gif"; objinforMationWindow.style.display="none"; } else { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clickBtnHelp(){\n if($('help').visible()){\n hideInicio('help');\n }else{\n showInicio('help');\n }\n showHelp();\n}", "function toggleHelp(checked) {\r\n\t$('.help-btn').css('display', (checked ? 'block' : 'none'));\r\n}", "function toggleVisibility() {\r\n\t\tif (designImag...
[ "0.6752863", "0.6604432", "0.6600305", "0.6572802", "0.64457214", "0.6403605", "0.6387066", "0.63621545", "0.6346173", "0.6314426", "0.6304571", "0.62995654", "0.62347186", "0.62333775", "0.62312096", "0.62225395", "0.6199138", "0.6193357", "0.6192169", "0.61874956", "0.61656...
0.79991424
0
End Function to set tolltip visible / hide
function fnError(){ objMessageContent.innerHTML="This user is already busy to perform the task.<br/>To assign the task please unassign first." objFrmTask.reset(); boolTaskStatus=false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static set visible(value) {}", "function toggleVisible() {\n setVisible(false)\n\n }", "function hideTip() {\r\n\tif (v_visible == 1) {\r\n\t\tif (v_layer != null) {\r\n\t\t\tv_layer.style.visibility = 'hidden';\r\n\t\t\tv_visible = 0;\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n}", "function xHide(e){ret...
[ "0.75018334", "0.7371944", "0.7074083", "0.70229095", "0.6993536", "0.6969049", "0.69414026", "0.69383323", "0.69383323", "0.69306445", "0.69290686", "0.6901112", "0.68345064", "0.6788987", "0.67829275", "0.6760495", "0.6746209", "0.67276967", "0.670598", "0.66901875", "0.666...
0.0
-1
Reset Value for the Prototype after EndTurn in actual this will change Dynamicaly
function fnresetmemberStatus(){ var objDws=getElement("dws"); var objDfs=getElement("dfs"); objFrmTask.reset(); if (intTurnNO){ function fngetXhr(xmlhttp) { fndrawGraph(); if (intTurnNO==3) { objDfs.value="16000k"; objDfs.style.backgroundColor="#ef969c"; objDfs.st...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "reset(){\n this.playing = false;\n this.die = 0;\n this.players[0].spot = 0;\n this.players[1].spot = 0;\n this.currentTurn.winner = false;\n this.currentSpot = null;\n this.spot = null;\n this.currentTurn = this.players[0];\n \n }", "endTurn(){\n this.turn = false;\n }", ...
[ "0.7069794", "0.7056173", "0.6987134", "0.6976701", "0.680733", "0.6794267", "0.6757011", "0.6671689", "0.6671499", "0.6632903", "0.6627395", "0.6620224", "0.6607361", "0.66013646", "0.6577626", "0.6519425", "0.65135163", "0.6501118", "0.64897513", "0.64848316", "0.6465808", ...
0.0
-1
End Reset Value for the Prototype after EndTurn in actual this will change Dynamicaly
function xTicksval() { var arrxTicks = new Array(); currentGraphXval = new graphXObject("" , 0); arrxTicks.push(currentGraphXval); for (var i = 1; i<= intTurnNO ; i++ ) { currentGraphXval = new graphXObject(objSystemDate[i-1] , i); arrxTicks.push(currentGraphXval); } return arrxTicks...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "endTurn(){\n this.turn = false;\n }", "function resetValue() {\n\t\t\t}", "resetCastle(){\n this.health = this.maxHealth;\n }", "reset() {\n this.isFiring = false;\n this.y = 431;\n }", "reset(){\n this.isFiring = false;\n this.y = 431;\n }", "reset()...
[ "0.69858575", "0.69311774", "0.6862846", "0.6799447", "0.67971367", "0.6782639", "0.6776397", "0.66637695", "0.66082454", "0.65662193", "0.656191", "0.655822", "0.65286905", "0.65271413", "0.6521664", "0.65207595", "0.6501914", "0.64907205", "0.64562356", "0.6455454", "0.6423...
0.0
-1
Prototyping for the Xticks Object
function graphXObject(name, value) { this.label = name; this.v = value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function XTimeAxis(min, max, majorUnit, minorUnit,title){\r\n\tthis.init(min, max, majorUnit, minorUnit,title);\r\n}", "addGaugeCustomTicks() {\n const numericProcessor = this,\n that = numericProcessor.context,\n distance = that._distance,\n majorTickWidth = that._measure...
[ "0.6805631", "0.66834635", "0.6553165", "0.6360099", "0.6339014", "0.6338636", "0.6318943", "0.6080668", "0.60602355", "0.60389876", "0.6003956", "0.59138346", "0.59138346", "0.5867532", "0.586462", "0.5840264", "0.5823177", "0.581667", "0.5799717", "0.5793599", "0.5783951", ...
0.0
-1
Function to Draw Graph
function fndrawGraph() { setOptionValue(); layout = new Layout("line", options); // alert("called.........fngraph............"); var atempDataPopulation; var atempPopulationlefive; var atemparrPopulationbetFive; var atemparrpopulationlabovefifteen; atempDataPopu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawGraph() {\n\tpath.attr(\"d\", function (d) {\n\t\tvar dx = d.target.x - d.source.x,\n\t\t\tdy = d.target.y - d.source.y,\n\t\t\tdr = Math.sqrt(dx * dx + dy * dy);\n\t\treturn \"M\" + d.source.x + \",\" + d.source.y + \"A\" + dr + \",\" + dr + \" 0 0,1 \" + d.target.x + \",\" + d.target.y;\n\t});\n\n\t...
[ "0.7180264", "0.713049", "0.68608075", "0.6858922", "0.6843726", "0.67826307", "0.6703598", "0.66755366", "0.66322535", "0.65628976", "0.65608215", "0.6543558", "0.6537392", "0.6512833", "0.647817", "0.6477588", "0.6475264", "0.6460855", "0.64366907", "0.6432096", "0.6426244"...
0.59468055
85
Function to Quit Game
function fnquitGame() { objfrmEndTurn=document.getElementById("quitForm"); objfrmEndTurn.action="/quit" ; objfrmEndTurn.method="get"; objfrmEndTurn.submit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function quitGame() {\r\n //add exit logic\r\n \texitGame();\r\n}", "function quitFunction(){\r\n\tgame.destroy();\r\n}", "function quitGame() {\n let gameTab = document.querySelector(\"#punto input[name='punto-frame']:checked + .game\");\n if (gameTab) {\n let id = gameTab.dataset.gameid;\n so...
[ "0.86466616", "0.8273863", "0.79298574", "0.7885711", "0.7728474", "0.74605834", "0.7383716", "0.7335909", "0.7327357", "0.73260176", "0.73068094", "0.72654146", "0.7261306", "0.7259342", "0.7258892", "0.7243796", "0.7221556", "0.7214056", "0.7206869", "0.71836615", "0.715539...
0.673496
89
GCD for 62 and 72
function gcd_two_numbers(x, y) { if ((typeof x !== 'number') || (typeof y !== 'number')) return false; x = Math.abs(x); y = Math.abs(y); while(y) { var t = y; y = x % y; x = t; } return x; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function GCD(a, b){\n while (b != 0) {\n var c = a % b;\n a = b;\n b = c;\n }\n return a;\n }", "function getGCD(a,b) {\n if (b > a) {var temp = a; a = b; b = temp;}\n while (true) {\n if (b == 0) \n\t\t\treturn a;\n a %= b;\n if (a == 0) \n\t\t\treturn b;\n ...
[ "0.7868654", "0.77915186", "0.7679999", "0.7679999", "0.7679999", "0.7679999", "0.7679999", "0.7679999", "0.7679999", "0.76371735", "0.7634285", "0.7565569", "0.7559137", "0.75579005", "0.7555466", "0.7530363", "0.7477399", "0.74747014", "0.74722016", "0.74722016", "0.7454454...
0.0
-1
delete table data, keep headers
function deleteTable() { $("tbody").children().remove(); var table = document.getElementById("resultsTable"); var row = table.insertRow(0); var cell1 = row.insertCell(0); var cell2 = row.insertCell(1); cell1.innerHTML = "Rank"; cell2.innerHTML = "Details"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clearTable(data) {\n let tab = document.getElementById(data.tableIdName);\n for (let i = tab.childNodes.length - 1; i >= 0; i--) {\n tab.childNodes[i].remove();\n }\n }", "deleteTable(table) {\n\t\twhile (table.rows.length > 0) {\n\t\t\ttable.deleteRow(0);\n\t\t}\n\t}", "func...
[ "0.76262444", "0.7325605", "0.714365", "0.7056075", "0.70557696", "0.70205903", "0.69993526", "0.6970032", "0.69648063", "0.6873418", "0.6855049", "0.685458", "0.684771", "0.6834735", "0.68313885", "0.6791631", "0.6787613", "0.6786106", "0.67471963", "0.67470187", "0.6744296"...
0.656619
38
TODO interpolators TODO variable y0 TODO horizontal / vertical orientation
function area(d) { var a = [], i = 0, p = d[0]; a.push("M", x.call(this, p, i), "," + y0 + "V", y1.call(this, p, i)); while (p = d[++i]) a.push("L", x.call(this, p, i), ",", y1.call(this, p, i)); a.push("V" + y0 + "Z"); return a.join(""); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set y(value) {}", "y() {\n\t\t\treturn this.data.y;\n\t\t}", "get y() { return init.h - inProptn(1, 7) * 1.5; }", "function punto_y(){\n var y;\n y = height / 5;\n\n return(y);\n}", "set y(value) {this._y = value;}", "convertY(y)\n\t{\n\t\treturn Dimensioning.cmToPixel(y - Dimensioning.pixelToCm(thi...
[ "0.63911915", "0.61334527", "0.6009518", "0.60081464", "0.5965238", "0.59602", "0.595092", "0.593436", "0.5918832", "0.5853006", "0.5842929", "0.5821131", "0.58119583", "0.5787245", "0.5759869", "0.5750044", "0.5733585", "0.57110363", "0.5704464", "0.5703432", "0.569364", "...
0.0
-1
asynchronous function async function are supposed to return promises Synchronous behaviour
async function print() { // await use to promise let value = await getValue(); value = await getNewValue(value); return value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function asyncPromiseAll() {\n //PLACE YOUR CODE HERE:\n}", "async function asyncFn(){\n\n return 1;\n}", "async function asyncFunction(arg) {\r\n return arg;\r\n}", "function callsASyncFunction() {\n var deferred = Q.defer();\n db.ConnectAndQuery(\"select * from UserGroup\", function () {\n...
[ "0.66333795", "0.65766186", "0.65456635", "0.65434945", "0.6516433", "0.65130883", "0.6509251", "0.6509251", "0.6505819", "0.6388819", "0.6383564", "0.63674605", "0.6341395", "0.6340678", "0.6256113", "0.62477595", "0.6231192", "0.622617", "0.6218444", "0.61701506", "0.616425...
0.0
-1
Pascal's Triangle Pascal's Triangle Wikipedia article on Pascal's Triangle: Write a function that, given a depth (n), returns a singledimensional array representing Pascal's Triangle to the nth level. For example: pascalsTriangle(4) == [1,1,1,1,2,1,1,3,3,1] My Solution PatrickSile:
function pascalsTriangle(n) { var pasTriDict = {'1':[1],'2':[1,1]}; // Initial 2 rows of Pascal Triangle. var temp = []; // Temporary rows if(n > 2){ let x = 3; // Setting x to 3 to go backward and increment. while(x <= n){ for(let i = 0; i < x-2; i++){ temp.push(pasTriDict[String(x-1)][i] + pasTriDict[S...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pascals(n) {\n var prevRow, myTriangle = [];\n for (var i = 0; i < n; i++) {\n var currentRow = []; \n for (var e = 0; e <= i; e++) {\n if (e == 0 || e == i) {\n currentRow.push(1);\n if (e == i) myTriangle.push(currentRow);\n } el...
[ "0.7883922", "0.7853603", "0.7655108", "0.7620343", "0.7579235", "0.7543964", "0.7477351", "0.6953861", "0.68507713", "0.6793064", "0.6669666", "0.6402391", "0.6299111", "0.62258303", "0.6187313", "0.6181133", "0.6181133", "0.6166103", "0.6164188", "0.61134017", "0.60793823",...
0.7924198
0
Other Solutions: Solution: By warriorsdanielmcq, mrlinn69, suva, testtest123, Sagobunny, jwong483 (plus 12 more warriors)
function pascalsTriangle(n) { var pascal = []; var idx = 0; for ( var i = 0; i < n; i++ ) { idx = pascal.length - i; for ( var j = 0; j < i+1; j++ ) { if ( j === 0 || j === i ) { pascal.push(1); } else { pascal.push( pascal[ idx+j ] + pascal[ idx+j-1 ] ); } } } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function solution(s) {\n\n}", "function test(str) {\r\n if (testRun == 100) {\r\n testRun = 0;\r\n falseFound = 0;\r\n }\r\n testRun++;\r\n \r\n //---------All types of strings tests------------\r\n //console.log('in test');\r\n //search if found whole word\r\n if (heuristic...
[ "0.61423135", "0.56353104", "0.55565906", "0.5536026", "0.55330604", "0.5526486", "0.5511464", "0.55095315", "0.547871", "0.5444014", "0.5427834", "0.54216856", "0.5410901", "0.5410255", "0.53883016", "0.53816545", "0.53542686", "0.535213", "0.5340716", "0.5335527", "0.533509...
0.0
-1
Solution: Bytjwudi, matrixorz, Ulisses
function pascalsTriangle(n) { if (n === 1) { return [1]; } var prev = pascalsTriangle(n - 1), len = prev.length; prev.push(1); for (var i = len - n + 1; i < len - 1; i ++) { prev.push(prev[i] + prev[i + 1]); } prev.push(1); return prev; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function matrix(n) {\n\n// USSR\n// Understand\n // reword - given a number, return an evenly-spiraled matrix \n // inputs - integer\n // outputs - arrays of arrays of integers\n // examples - see above\n// Sudo Chop\n // create empty array of arrays of integers 'results'\n let results = []\n ...
[ "0.7020606", "0.6763793", "0.6603458", "0.6518286", "0.639338", "0.6217922", "0.61893404", "0.61626405", "0.6078572", "0.60641336", "0.60608643", "0.60524166", "0.6013518", "0.6010743", "0.6005776", "0.6004182", "0.59991753", "0.59991753", "0.59991753", "0.5980806", "0.597042...
0.0
-1
it causes some flicker when reloading or navigating grid it may be possible to have some custom formatter to do this as the grid is being created to prevent this or go back to default browser checkbox styles for the grid
function styleCheckbox(table) { /** $(table).find('input:checkbox').addClass('ace') .wrap('<label />') .after('<span class="lbl align-top" />') $('.ui-jqgrid-labels th[id*="_cb"]:first-child') .find('inpu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function superCheckboxFormatter (cellValue, options) {\n\t \t var op = $.extend({}, $.jgrid.formatter.checkbox, options.colModel.formatoptions);\n\t \t if ($.fmatter.isEmpty(cellValue) || cellValue === undefined) {\n\t \t cellValue = $.fn.fmatter.defaultFormat(cellValue, op);\n\t \t }\n\t \t cellValue = ...
[ "0.6498894", "0.64726037", "0.63700503", "0.63700503", "0.6337255", "0.6291744", "0.6282037", "0.6252675", "0.6212862", "0.61778027", "0.61669326", "0.6142459", "0.60715103", "0.6054045", "0.6005279", "0.59969586", "0.5990679", "0.5984214", "0.5927174", "0.5927174", "0.587163...
0.6304576
5
unlike navButtons icons, action icons in rows seem to be hardcoded you can change them like this in here if you want
function updateActionIcons(table) { /** var replacement = { 'ui-ace-icon fa fa-pencil' : 'ace-icon fa fa-pencil blue', 'ui-ace-icon fa fa-trash-o' : 'ace-icon fa fa-trash-o red', 'u...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateActionIcons(table) {\n\n }", "function updateActionIcons(table) {\r\n\r\n\t}", "function updateActionIcons(table) {\n /**\n var replacement = \n {\n 'ui-icon-pencil' : 'icon-pencil blue',\n 'ui-icon-trash' : 'icon-trash red',\n 'ui-icon-disk'...
[ "0.6911716", "0.6840789", "0.6737374", "0.67284006", "0.670607", "0.66896576", "0.66789216", "0.6664356", "0.6657608", "0.6657608", "0.6657608", "0.66489476", "0.6648085", "0.6558121", "0.6252977", "0.62094873", "0.6200749", "0.6119735", "0.6112399", "0.6086171", "0.6082265",...
0.67065024
4
replace icons with FontAwesome icons like above
function updatePagerIcons(table) { var replacement = { 'ui-icon-seek-first' : 'ace-icon fa fa-angle-double-left bigger-140', 'ui-icon-seek-prev' : 'ace-icon fa fa-angle-left bigger-140', 'ui-icon-seek-next' : 'ace-icon fa fa-angle-right bigger-140', ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getIcons(text) {\n switch (text) {\n case 'Frigate':\n case 'Galleon':\n case 'Skiff':\n case 'Pinnace':\n case 'Flute':\n return 'fas fa-ship';\n case 'Tax increase':\n return 'fas fa-balance-scale';\n case 'Expedition':\n ...
[ "0.6857723", "0.660942", "0.6480685", "0.6420761", "0.6381144", "0.6375341", "0.63529575", "0.634563", "0.6340878", "0.6317268", "0.6313305", "0.6313305", "0.6313305", "0.6285106", "0.62508243", "0.62480927", "0.6237024", "0.62350476", "0.6216371", "0.62131643", "0.61826944",...
0.58533245
50
show message in the popup for a very short period
function print (s) { let el = $('message'); el.innerHTML = messages[s] ? messages[s] : s; lockUi(true); setTimeout(() => { el.innerHTML = ''; lockUi(false); }, MESSAGE_TIMER); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayMessage(text) {\n message=text;\n document.getElementById(\"text\").innerHTML = message;\n //var n = new Notification(\"Attention\", {body: \"BANG! Back to the island!\"});\n setTimeout(function() {message=\"Hey! Look here!\";\n ...
[ "0.71889824", "0.71541613", "0.70573485", "0.70437765", "0.7015238", "0.6987256", "0.69643885", "0.69631493", "0.69495416", "0.69445026", "0.6924285", "0.69237053", "0.6919907", "0.6916049", "0.69122136", "0.6901425", "0.687422", "0.68704975", "0.68701893", "0.68485934", "0.6...
0.0
-1
colorize number input, lock submit button
function setInputStyle () { let input = $('timer'); let value = parseInt(input.value, 10) || 0; if (value <= TIMER_OFF) { input.classList.add('off'); input.classList.remove('warning'); } else if (value > TIMER_OFF && value < TIMER_MIN) { input.classList.remove('off'); input.classList.add('warnin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function colorElementInput() {\n if (colorInput.active) {\n let color = colorInput.colorElement.value;\n if (colorInput.hasAlpha) { // combine rgb with alpha from range (all elements are synchro)\n color += hexString(colorInput.rangeElement.value);\n }\n ...
[ "0.6620532", "0.64351577", "0.6323759", "0.6298299", "0.612808", "0.61256194", "0.610081", "0.60879105", "0.6084148", "0.60772705", "0.6056268", "0.5999926", "0.5993852", "0.59734255", "0.596289", "0.592597", "0.5917916", "0.5886782", "0.5863058", "0.58527136", "0.5852643", ...
0.5566747
56
get current tab with promise, because getSelected was too logical in Chromeland
function getCurrentTab () { return new Promise((resolve, reject) => { chrome.tabs.query({active: true, currentWindow: true}, tabs => { let tab = tabs[0]; if (!tab || typeof tab.id === 'undefined' || (tab.url || '').startsWith('chrome://')) { reject('notAllowed'); } resolve(tab); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function getCurrentTab() {\n \"use strict\";\n const queryInfo = {\n active: true,\n lastFocusedWindow: true\n };\n // New Syntax\n const tabs = await new Promise(resolve => chrome.tabs.query(queryInfo, tabs => resolve(tabs)))\n var currentTab = tabs[0];\n if (currentTab ===...
[ "0.7930624", "0.79285043", "0.77459604", "0.7734017", "0.7533766", "0.7518338", "0.7449208", "0.72757226", "0.7129488", "0.711915", "0.711915", "0.711915", "0.7097204", "0.6975978", "0.6907331", "0.6843628", "0.6843124", "0.68403107", "0.677792", "0.6736254", "0.6723465", "...
0.7971367
0
on submit button clicked
async function onSubmit () { if (isLocked) { return; } try { let tab = await getCurrentTab(); let input = $('timer'); let value = parseInt(input.value, 10) || 0; let isDereg = value === TIMER_OFF; let tabId = tab.id; if (isDereg) { chrome.runtime.sendMessage({message: 'deregister...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function submitPressed() {\n \n}", "submit() {\r\n\r\n this.inputsCheck();\r\n this.submitBtn.click(() => {\r\n this.pushToLocal();\r\n this.clearForm();\r\n\r\n })\r\n }", "function submitClick() {\n updateDBUser(currentUser.email, newName, newCountry, pi...
[ "0.76599973", "0.7544219", "0.7461559", "0.74256337", "0.7251838", "0.7227156", "0.7155441", "0.71401346", "0.70916986", "0.7038798", "0.7014627", "0.6960023", "0.69123507", "0.6898127", "0.68632627", "0.6859613", "0.6831704", "0.6831301", "0.68245107", "0.681562", "0.6803825...
0.0
-1
timer input value changed
function onTimerInput () { setInputStyle(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setTimer (input, value) {\n input.value = value = Math.floor(value)\n clearTimeout(this.timer)\n if (!value || value <= 0) {\n input.classList.remove('active')\n input.value = 0\n this.pauseAll()\n } else {\n input.classList.add('active')\n this.timer = setTimeout(() => this.se...
[ "0.71788377", "0.70793647", "0.69829535", "0.69323933", "0.6782689", "0.6782689", "0.67366254", "0.6551889", "0.6511724", "0.64218485", "0.64152616", "0.6407315", "0.6384619", "0.6279181", "0.6278275", "0.6275586", "0.6256947", "0.6222948", "0.6218442", "0.6211872", "0.618634...
0.68266255
4
Looks like the "use strict" pragma doesn't work if it is indented. Weird.
function foo(a) { "use strict"; return ns5.pick(arguments); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function foo() {\n \"use strict\";\n}", "function forUseStrict() {\n \"use strict\";\n // start coding from here\n console.log(\"hello world\");\n}", "function bar() {\n // this code is also strict mode.\n }", "function strictMode() {\n 'use strict';\n\n //..\n //..\n }", "function strictly...
[ "0.76562643", "0.75669104", "0.73915863", "0.73702896", "0.72351056", "0.7167984", "0.71333224", "0.68221384", "0.6820749", "0.6663854", "0.6627478", "0.6580675", "0.65370035", "0.64713854", "0.64072764", "0.63579506", "0.63344586", "0.63335496", "0.6330315", "0.6330315", "0....
0.0
-1
This material is proprietary to Lawson Software, and is not to be reproduced or disclosed except in accordance with software contract provisions, or upon written authorization from Lawson Software. Copyright (C) 20012007 by Lawson Software. All Rights Reserved. Saint Paul, Minnesota ////////////////////////////////////...
function findME(startHere) { if (eval(startHere) == self) return eval(startHere) else return searchframe(startHere) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findRelay() {\n\t var loc = window.location;\n\t var frames = window.opener.frames;\n\t for (var i = frames.length - 1; i >= 0; i--) {\n\t try {\n\t if (frames[i].location.protocol === window.location.protocol &&\n\t frames[i].location.host === window.location.host &&\n\t ...
[ "0.6370763", "0.6370763", "0.6370763", "0.6370763", "0.6370763", "0.6227547", "0.6220643", "0.6220643", "0.6220643", "0.6220643", "0.6220643", "0.6220643", "0.62151474", "0.61853373", "0.6110957", "0.6064391", "0.60494494", "0.60376227", "0.59730804", "0.59730804", "0.5973080...
0.6926519
0
Checking whether the car hit the pipe.
hit (car) { if(car.y < this.y + this.pipeHeight && car.y > this.y) { if(car.x < this.left || car.x > width - this.right) { this.highlight = true; return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkIfOnPipe() {\n for (var i = 0; i < pipes.length; i++) {\n var pipe = pipes[i];\n if (mario.x + 32 >= pipe.x && mario.x + 32 <= pipe.x + 60)\n return true;\n\n if (mario.x >= pipe.x && mario.x <= pipe.x + 60)\n return true;\n }\n return false;\n}", "function checkCollition(){\n...
[ "0.72976136", "0.6644886", "0.62195843", "0.605984", "0.5872135", "0.58698326", "0.5846187", "0.58418816", "0.5828485", "0.58258057", "0.58048177", "0.5763789", "0.5740527", "0.572495", "0.57174575", "0.5701625", "0.5694574", "0.5673015", "0.5665858", "0.5636404", "0.5622087"...
0.7097889
1
Moving the pipe downward.
update () { this.y += this.speed; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onclose() {\n\t dest.removeListener('finish', onfinish);\n\t unpipe();\n\t }", "function onclose() {\n\t dest.removeListener('finish', onfinish);\n\t unpipe();\n\t }", "function onclose() {\n\t dest.removeListener('finish', onfinish);\n\t unpipe();\n\t }", "function onclose() {\...
[ "0.59654194", "0.59654194", "0.59654194", "0.59654194", "0.59654194", "0.59654194", "0.59654194", "0.59654194", "0.59654194", "0.59654194", "0.59654194", "0.59654194", "0.59654194", "0.59654194", "0.59654194", "0.59654194", "0.59654194", "0.59654194", "0.59654194", "0.59654194"...
0.0
-1
Checking whether the pipe will be on screen or not.
offscreen () { if(this.y > height + this.pipeHeight) return true; return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkIfOnPipe() {\n for (var i = 0; i < pipes.length; i++) {\n var pipe = pipes[i];\n if (mario.x + 32 >= pipe.x && mario.x + 32 <= pipe.x + 60)\n return true;\n\n if (mario.x >= pipe.x && mario.x <= pipe.x + 60)\n return true;\n }\n return false;\n}", "function checkHeadsetConnect...
[ "0.646023", "0.64087707", "0.6371065", "0.62049645", "0.60981005", "0.6053924", "0.60070515", "0.60064656", "0.5940032", "0.5913249", "0.5882877", "0.58546436", "0.58425045", "0.5799858", "0.57946813", "0.5791557", "0.57543314", "0.5753729", "0.57323194", "0.57317126", "0.572...
0.6167512
4
Function Constructor (Creates an employee object that contains relevant information).
function employee(id, firstName, lastName, title) { this.id = id; this.firstName = firstName; this.lastName = lastName; this.title = title; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Employee(name, email, hireDate) {\n this.name = name;\n this.email = email;\n this.hireDate = hireDate;\n}", "function Employee(name, salary, experience){\n this.name = name;\n this.salary = salary;\n this.experience = experience;\n}", "function Employee(name) {\n this.employeeName ...
[ "0.7995441", "0.7816149", "0.7787527", "0.77802", "0.7743668", "0.7682947", "0.76703465", "0.75584924", "0.75352305", "0.7520778", "0.75081766", "0.750248", "0.75023216", "0.749927", "0.74714977", "0.74118185", "0.73967886", "0.7374646", "0.7368065", "0.7368065", "0.735414", ...
0.7576539
8
return file extension by file name Ryan Yang
function getFileExt(fileName) { // todo: handle special file names (eg. .gitignore .babelrc) let arr = fileName.split('.'); if (arr.length == 1) return ''; else return arr[arr.length - 1]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getExtension(filename) {\n const dot = filename.lastIndexOf('.');\n if (dot === -1) return '';\n return filename.substring(dot + 1, filename.length);\n }", "function getFileExtension(filename){\t\n\treturn filename.substr(filename.lastIndexOf('.')+1);\n}", "function getExtensi...
[ "0.8474474", "0.8423272", "0.84213716", "0.8288532", "0.8277025", "0.82690847", "0.82662433", "0.8239265", "0.82213485", "0.822006", "0.821323", "0.82121813", "0.8197041", "0.8189127", "0.8165264", "0.8146884", "0.8133687", "0.8126963", "0.8095354", "0.80720776", "0.8036319",...
0.7742119
35
return css class by file extension Ryan Yang
function getCssClassByFileExt(ext) { switch (ext.toUpperCase()) { case 'JS': return 'seti-javascript'; case 'JSX': return 'seti-react'; case 'CSS': return 'seti-css'; case 'LESS': return 'seti-less'; case 'SASS': case 'SCSS': return 'seti-sass'; case 'JSON': ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCssClassByFileExt(ext) {\n switch (ext.toUpperCase()) {\n case \"JS\":\n return \"seti-javascript\";\n case \"JSX\":\n return \"seti-react\";\n case \"CSS\":\n return \"seti-css\";\n case \"LESS\":\n return \"seti-less\";\n case \"SASS\":\n case \"SCSS\":\n r...
[ "0.80199", "0.6774117", "0.6734687", "0.6729427", "0.62852645", "0.60661256", "0.6055278", "0.6047178", "0.596336", "0.5921074", "0.5865575", "0.5824839", "0.58145887", "0.58145887", "0.5751598", "0.57082146", "0.57077485", "0.57034457", "0.56999683", "0.56936264", "0.566215"...
0.79874265
1
recurseThroughFileTree is called and passed the object that exists at fileTree
function recurseThroughFileTree(directory) { //Loop through files and fill files property array //fs.readdir reads the contents of a directory //entire directory exists at directory.path fs.readdir(directory.path, (err, files) => { //I'm not sure what the purpose of pending is pending += fi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function walkObjectProcess()\n\t\t{\n\t\t\t// the function to process the children\n\t\t\t\tfunction process(element, index, depth)\n\t\t\t\t{\n\t\t\t\t\ttrace (indent(depth) + '/' + element.name);\n\t\t\t\t}\n\n\t\t\t// the function to identify the children\n\t\t\t\tfunction getContents(element)\n\t\t\t\t{\n\t\t\...
[ "0.698452", "0.62992597", "0.629728", "0.61467934", "0.5965852", "0.5837864", "0.5738831", "0.5738554", "0.57368255", "0.57184774", "0.57120746", "0.5637711", "0.56325996", "0.5624721", "0.56033176", "0.55679923", "0.55569744", "0.5511625", "0.5510036", "0.5505217", "0.550490...
0.6069803
4
The following are examples of expected output values: rgb(255, 255, 255) // returns FFFFFF rgb(255, 255, 300) // returns FFFFFF rgb(0,0,0) // returns 000000 rgb(148, 0, 211) // returns 9400D3 put the params into an iterable array iterate the items early return value of items outside the RGB range (0255) convert the rem...
function rgb(r,g,b){ return [r,g,b] .map(x => { if(x >= 255) return 'FF'; if(x <= 0) return '00'; const hex = x.toString(16); return hex.length === 1 ? `0${hex}` : hex; }).join('').toUpperCase(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rgb(...values) {\n let hex = [];\n for (let val of values) {\n if (val > 255) {\n hex.push('FF');\n } else if (val < 0) {\n hex.push('00');\n } else {\n hex.push(val.toString(16).toUpperCase());\n }\n }\n \n return hex.map(a => {\n return a.length < 2 ? a = 0 + a : a;\n ...
[ "0.74129564", "0.7407456", "0.69027424", "0.6887616", "0.68319786", "0.6816063", "0.6697694", "0.6695459", "0.6685507", "0.6663782", "0.6635172", "0.663213", "0.66224337", "0.66133714", "0.66018486", "0.65722185", "0.6570115", "0.65467507", "0.6507559", "0.6441815", "0.643554...
0.71478575
2
Attempt to fetch all the data for this project a few times before giving up.
function fetchRetry(githubClient, sourceProject, index, total, cb) { const logPrefix = `${colors.gray( `[${index + 1}/${total}]` )} ${sourceProject.githubPath}`; let attemptNumber = 0; async.retry( 3, taskCallback => { attemptNumber += 1; createFullProject(githubClient, sourceProject, (e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "fetchData() {\n this.initLoading();\n\n this.setFilters(this.qs_url, this.generateBaseFilters());\n this.data.filters = this.getFilters(this.qs_url);\n\n let qs = this.setQuerySet(this.view, this.qs_url).filter(this.getFiltersPrepared(this.qs_url)).prefet...
[ "0.63566524", "0.63321453", "0.6296862", "0.62464064", "0.6110721", "0.60949343", "0.60773504", "0.6039005", "0.5991799", "0.59875154", "0.5959831", "0.59595543", "0.59212804", "0.58837354", "0.5846031", "0.5846031", "0.58419544", "0.58278054", "0.58278054", "0.5768461", "0.5...
0.0
-1
Update is called once per frame
function Update (){ transform.Rotate(Vector3(0,rotationSpeed * 10,0) * Time.deltaTime); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "update() { }", "update() { }", "function onFrame() \n{\n\tupdate();\n}", "update() {\r\n this.paint();\r\n }", "update () {\n\n\n\n }", "updateFrame() {\n this._drawFrame();\n }", "didUpdate() { }", "update () {\n\n\n }", "update () {\n this.render();\n }", "update()\n ...
[ "0.7908809", "0.7908809", "0.7851269", "0.77980703", "0.7796564", "0.77876556", "0.76898044", "0.7664787", "0.7621066", "0.759802", "0.7574958", "0.75645936", "0.7557167", "0.7557167", "0.7557167", "0.7535631", "0.7492923", "0.74922395", "0.74922395", "0.74922395", "0.7492239...
0.0
-1
function that has all shared functions & methods for the rovers
function sharedMethods() { assignRoverChoice(); getMaxsol(roverChoice); $(".camera-choices").children().remove(); $(".submitbtn").attr('disabled', false); $(".camera-choices").attr('disabled', false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _____SHARED_functions_____(){}", "function Overlord() {\n \n this.overseers = this.linkOverseers();\n this.requestHelp = this.getRequestHelpRooms();\n this.sendHelp = this.getSendHelpRooms();\n \n}", "router() { return rtr; }", "function Burnisher () {}", "bindFunctions () {\n th...
[ "0.6217228", "0.56585586", "0.5572081", "0.5507502", "0.5453011", "0.5401094", "0.5353751", "0.5287676", "0.52747476", "0.5272684", "0.52683985", "0.52615464", "0.52509826", "0.5242768", "0.52378315", "0.5218832", "0.5180415", "0.5156678", "0.51382524", "0.5131486", "0.510768...
0.48616964
72
update roverChoice with current selection
function assignRoverChoice() { roverChoice = $("input:radio[name=inlineRadioOptions]:checked").val(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetChoice() {\n\n var choice = \"\";\n var update_p1_Choice = database.ref('players/1/choice');\n var update_p2_Choice = database.ref('players/2/choice');\n update_p1_Choice.set(choice);\n update_p2_Choice.set(choice);\n }", "updateChoice(choice) {\n this.setSt...
[ "0.6629713", "0.6479294", "0.64748925", "0.6209841", "0.61800015", "0.61794007", "0.61773115", "0.61465687", "0.61151135", "0.60554874", "0.6014187", "0.5983213", "0.59561896", "0.5952385", "0.5951178", "0.5914506", "0.5914506", "0.59086746", "0.5905002", "0.58759046", "0.587...
0.62585795
3
update placeholder text with max solar day value of selected rover
function updatePlaceholder(maxsolarDay) { $(".solar-day").attr({ placeholder: 'Enter number from 0 to ' + maxsolarDay, disabled: false }); $(".help_block_days").html(""); $(".help_block_days").html( "Enter from 0 to " + maxsolarDay + "<br>" + "Tip: 0 (zero) was the day it...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setMax() {\n var cd = curDay();\n var input = document.getElementById('date');\n input.setAttribute(\"max\", this.value);\n input.max = cd;\n input.setAttribute(\"value\", this.value);\n input.value = cd;\n}", "function setStationEndDate(maxData) {\r\n sensorEndDate = maxData[\"table...
[ "0.62195873", "0.58554924", "0.5853115", "0.5756226", "0.5753182", "0.5739375", "0.5727423", "0.5724695", "0.5689116", "0.56704134", "0.563911", "0.5626647", "0.5469593", "0.54599935", "0.5382186", "0.53719324", "0.5358668", "0.5345494", "0.5334735", "0.5309814", "0.52980787"...
0.70510715
0
function to GET max_sol value from endpoint for selected rover
function getMaxsol(roverChoice) { var maxparams = { rover: roverChoice, api_key: 'I4dfNHxd1LPVg6P96qNQlu9cJNz50UNBIAyR2LXO' }; $.ajax({ url: 'https://api.nasa.gov/mars-photos/api/v1/rovers/' + roverChoice + '/photos?sol=1&api_key=' + maxparams.api_key }).done(function (dateresult...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMax() {\n var max = Math.max.apply(null, config.values);\n max += 10 - max % 10;\n return max;\n console.log(max);\n }", "get actualMaximumValue() {\r\n return this.i.actualMaximumValue;\r\n }", "Max_E_IG(){\n var max_IG = 0;\n var search = t...
[ "0.6271974", "0.62022835", "0.6196288", "0.6171046", "0.61397254", "0.6108106", "0.60485977", "0.60350215", "0.60313493", "0.5992061", "0.59665996", "0.59620565", "0.59620565", "0.59620565", "0.59620565", "0.59620565", "0.59620565", "0.59572303", "0.5954628", "0.59488565", "0...
0.6853742
0
2. write function to sum up all values in the range array
function sum(x){ let total = 0; for ( let i = 0; i < x.length; i++ ){ total += x[i]; } return total; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sumRange(range){\n var sum= 0 ;\n for(var i=0; i<=range.length-1; i+=1){\n\t sum+= range[i];\n }\n return sum;\n}", "function sumRange(start, end) { \n let myArr = [];\n for (let i = start; i <= end; i++)\n myArr.push(i);\n return myArr.reduce(function(a, b){\n return a + b; \n });\...
[ "0.81016546", "0.7930664", "0.7568252", "0.7520953", "0.746198", "0.73855954", "0.7360095", "0.73007256", "0.71983945", "0.7142624", "0.7110751", "0.70944774", "0.709297", "0.7048813", "0.7044121", "0.70419985", "0.70193326", "0.6958876", "0.6928909", "0.6926843", "0.6904337"...
0.0
-1
3. write a recursive function to determine if a number is even or not
function isEven(x){ if ( x === 0 ) return true; else if ( x === 1 ) return false; else { if( x < 0 ) return isEven( x + 2 ); return isEven( x - 2 ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isEven(number) {\n\nif (number < 0) {\n return false;\n} else if (number === 0) {\n return true;\n} else if (number === 1) {\n return false;\n}\n\nreturn isEven(number -= 2);\n\n\n\n}", "function isEven(n){\n if ( n === 0 ) return true;\n if ( n === 1) return false; \n return isEven(n-2);\n\n ...
[ "0.84607494", "0.8410174", "0.83971685", "0.8289938", "0.8277685", "0.8275768", "0.8242574", "0.82313204", "0.82114804", "0.8205052", "0.81919825", "0.8184479", "0.8184479", "0.8183703", "0.8180495", "0.815886", "0.8148304", "0.81476915", "0.81449497", "0.81411076", "0.812871...
0.81167537
24
4. write a function to determine the minimum of two numbers
function min(a, b){ if ( a < b ) return a; else return b; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function min(num1, num2){\n return Math.min(num1, num2);\n}", "function min(a, b) { return Math.floor(Math.min(a, b)); }", "function min(a, b) { return Math.floor(Math.min(a, b)); }", "function min(a, b) { return Math.floor(Math.min(a, b)); }", "function min(num1, num2) {\n return Math.min(num1, num2);\...
[ "0.8791839", "0.8723474", "0.8723474", "0.8723474", "0.8703664", "0.8700551", "0.8690488", "0.86684966", "0.866542", "0.86616766", "0.865127", "0.86452144", "0.8608973", "0.86081594", "0.8578346", "0.85724527", "0.85724527", "0.85724527", "0.85527784", "0.8547375", "0.8542473...
0.8491955
29
5. write a function that creates a chess board using "" and spaces and takes a parameter to determine size of board
function gridSystem(size){ var pattern = ""; for(var i = 0; i < size; i++){ if( i % 2 === 0 ){ for (var k = 0; k < size; k++){ if( k % 2 === 0 ) pattern += " "; else pattern += "#"; } pattern += "\n"; } else { for (var k = 0; k < siz...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawChessboard(size) {\n var left = \"\";\n var right = \"\";\n var final = [];\n if (size % 2 === 0) {\n for (let r = 0; r < (size / 2); r++) {\n right += \" #\";\n \n }\n for (let l = 0; l < (size / 2); l++) {\n left += \"# \";\n }\n for (let f = 0; f < (size / 2); f++)...
[ "0.7506529", "0.7159029", "0.71092", "0.7104106", "0.7065822", "0.698399", "0.68977565", "0.6894678", "0.68886214", "0.6857708", "0.68186927", "0.67950064", "0.6791747", "0.6784218", "0.6780415", "0.67634666", "0.6758844", "0.67066264", "0.6702289", "0.6696131", "0.66755503",...
0.64340377
53
6. write a function that takes a string as a parameter and returns the number of uppercase "B's" in it
function countBs(x){ var count = 0; for(let i = 0; i < x.length; i++){ if(x[i] === "B") count++; } return count; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function countBs(input){\r\n return countChar(input, \"B\");\r\n}", "function countBs(string) {\n return countChar(string, \"B\");\n}", "function countBs(x){\n var score=0;\n ////the final position of the string is length - 1\n\tfor(i=0; i<x.length; i+=1){\n\t ////loop through each position of the str...
[ "0.7878756", "0.7847718", "0.7827346", "0.76666147", "0.75890183", "0.7570979", "0.7569035", "0.749888", "0.74902886", "0.7477467", "0.7423313", "0.741443", "0.73663604", "0.73550034", "0.7229221", "0.71838593", "0.71123767", "0.70837295", "0.7068439", "0.7047194", "0.702052"...
0.6610333
40