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
generate a random student ID
function generateStudentID() { return "ID#" + Math.floor(Math.random()*10000); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function random_id() {\n\treturn ('' + Math.floor((Math.random() * 100000) + 1));\n}", "generateID() {\n return Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15)\n }", "function generateID() {\n return Math.random().toString(36).substr(2, 6)\n}", "function gen...
[ "0.75569504", "0.7410064", "0.7398751", "0.73608834", "0.73599607", "0.7351308", "0.73507243", "0.7350393", "0.7342532", "0.73396635", "0.73270714", "0.7321644", "0.73130816", "0.7308532", "0.72979176", "0.72905165", "0.727782", "0.7270247", "0.72620445", "0.7260681", "0.7252...
0.9049205
0
!!! Can be ins,del,swap !!! this is a basic calculation!
function calcDistance(w1, w2) { let len1 = w1.length, len2 = w2.length; let len = Math.min(len1, len2), result = Math.abs(len1 - len2); for (let i = 0; i < len; i++) { if (w1[i] !== w2[len]) { result++; } } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static setSubtractQV(qv, qq) {\n//-------------\nqv[0] -= qq[0];\nqv[1] -= qq[1];\nqv[2] -= qq[2];\nqv[3] -= qq[3];\nreturn qv;\n}", "reduce (){\n this.hunger -= 2\n this.energy -= 1\n this.hygiene -= 1\n this.fun -= 2\n }", "updatePrice(){\n if( this.price > 0 ){\n this.price ...
[ "0.58066034", "0.5751547", "0.5734684", "0.5658927", "0.5614057", "0.5562325", "0.5551842", "0.55157554", "0.55157554", "0.5483318", "0.5474214", "0.54700935", "0.5467593", "0.5465588", "0.5458195", "0.5451487", "0.5441781", "0.5430973", "0.5429884", "0.54291934", "0.54246306...
0.0
-1
Randomize array element order inplace. Using Durstenfeld shuffle algorithm.
function shuffleArray(array) { for (var i = array.length - 1; i > 0; i--) { var j = Math.floor(Math.random() * (i + 1)); var temp = array[i]; array[i] = array[j]; array[j] = temp; } return array; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function shuffleInplace (arr) {\n var j, tmp;\n for (var i = arr.length - 1; i > 0; i--) {\n j = baseRandInt(i + 1);\n tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n }\n }", "fu...
[ "0.81988966", "0.81082255", "0.8102646", "0.7790582", "0.7741094", "0.7739341", "0.77220273", "0.7701147", "0.7691279", "0.7678224", "0.7664312", "0.76552373", "0.7653649", "0.7650624", "0.76444644", "0.763942", "0.76370066", "0.76369107", "0.76337177", "0.76310635", "0.76176...
0.0
-1
Clears the error message board
function clearerror(){ $("#error").html("<p></p>"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearErrorMsg() {\n\t// Make error message container invisible\n\tdocument.querySelector('#error-msg-container').style.display = 'none';\n\tdocument.querySelector('#error-header').value = ''; // Clear error message\n\n\t// Remove list items of error message\n\tconst errorlist = document.querySelector('#er...
[ "0.7317377", "0.730661", "0.73044664", "0.72730225", "0.72730225", "0.72505826", "0.7249244", "0.7171231", "0.7154024", "0.7136286", "0.70619285", "0.70486206", "0.7009652", "0.69837385", "0.6962778", "0.69047344", "0.6903162", "0.6898461", "0.68915075", "0.6882933", "0.68785...
0.6252877
76
Clears the message board
function clearmessage(){ $("#message").html("<p></p>"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearBoard(){\n sendChatMessage(\"Clearing game board...\");\n lives = 1;\n current = 0;\n modifiers = [];\n board = [];\n sendChatMessage(\"Everything cleared! Ready for new game... Please rechoose tags.\");\n}", "function clearBoard(){\n\t\tclientService.emit(ServerMessagesConstant.C...
[ "0.8176131", "0.8122533", "0.7813023", "0.7802978", "0.76031077", "0.74677235", "0.7398961", "0.7376076", "0.7375186", "0.73625046", "0.7351595", "0.7341137", "0.7268696", "0.72436565", "0.7229297", "0.72245914", "0.7218861", "0.718562", "0.7133485", "0.7131495", "0.71101505"...
0.0
-1
Function printing message if player has won
function haswon(player){ $("#message").html("<p>Congratulations "+player+"! You have won</br> "); clearerror(); $("#again").toggle(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function playerWins() {\n $(\"#message\").html(\"<p>Player wins!</p>\");\n gameStarted = false;\n resetGame = true;\n }", "function whoWon(){\n\tif(gameOver() == true){\n\t\tmodal.style.display = \"block\";\n\t\t$(\".modalContent\").removeClass(\"closeModal\");\n\t\t$(\".modalContent\").addClass(\"open...
[ "0.77758104", "0.77360314", "0.7730136", "0.76976234", "0.76879114", "0.7588739", "0.7556465", "0.7524758", "0.74911857", "0.74604625", "0.74131405", "0.74001086", "0.73825634", "0.73511", "0.73447794", "0.72992086", "0.72920465", "0.7291964", "0.7284328", "0.7276952", "0.726...
0.8037135
0
Function reading from server if game action is legal or not, and responding with a relevant message to the screen
function Readplay(response){ if(response.indexOf("Illegal") != -1){ $("#error").html("<p>You have made an illegal move. Try again"); clearmessage(); } if(response.indexOf("exist") != -1){ $("#error").html("<p>You have to insert your names before you can play"); clearmessage(); } if (response.indexOf("won"...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function callActionSocketGame(message) {\t\r\n\tif(message==\"\"){\r\n\t\t//console.log(\"Peticion Action # \" + GAME_PORT + \" # \" + actualMessage);\r\n\t\t\r\n\t\tvar ab = str2ab(ACTION + \";\" + ROOM_ID + \";\" + actualMessage + \";\" + USER_ID + \";\" + currentLatency + \";\" + APP_ID);\r\n\t\tgameSocketUdp.w...
[ "0.65720576", "0.64853364", "0.63537717", "0.63395226", "0.62797666", "0.62261814", "0.6178068", "0.61443484", "0.6107666", "0.608391", "0.6052375", "0.6032362", "0.60068893", "0.6006853", "0.59822136", "0.5968155", "0.59457237", "0.59320056", "0.5930073", "0.59298456", "0.59...
0.5659726
59
Function sending a game action to the server and retreiving the result, takes in "gameid" and "field" desired to play
function gameaction(game_id,field){ $.ajax({ type: "GET", url:server+"/action/"+game_id+"/"+field, async:false, crossDomain:true, success: function(response){ Readplay(response); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _handleRequestGames(data) {\r\n\tconsole.log('REQUESTED GAMES:', data.toString().trim());\r\n\tstate = SELECT_GAME;\r\n\r\n\tauthServer.write('N\\t' + game + '\\n');\r\n}", "function callActionSocketGame(message) {\t\r\n\tif(message==\"\"){\r\n\t\t//console.log(\"Peticion Action # \" + GAME_PORT + \" # ...
[ "0.6298565", "0.605842", "0.6007989", "0.59237164", "0.59184605", "0.59177536", "0.5898515", "0.57943356", "0.57915765", "0.5779921", "0.57748544", "0.5717197", "0.571331", "0.56860024", "0.5648501", "0.5646669", "0.5639624", "0.56269014", "0.5573792", "0.55593735", "0.555188...
0.7641361
0
function updating the on screen board based on the latest fetch from the server
function refresh_board(loadedboard){ counter = 1; for (i=0; i<3; i++){ for (j=0; j<3; j++){ if (loadedboard[i][j] == "X" || loadedboard[i][j] == "O"){ $("#"+counter+" p").replaceWith("<p>"+loadedboard[i][j]+"</p>"); } else{ $("#"+counter+" p").replaceWith("<p>+</p>"); } counter++; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateScreen(){\n\tconsole.log(\"update screen\");\n\tObject.keys(state.stops).forEach(function(item){\n\t\tgetDataFromApi(item.substring(2), updateData);\n\t});\n\tdisplayData();\n}", "function updateDisplay() {\n\n crawlerModel.user = _useVenueData ? _venueData.messages : _deviceData.messag...
[ "0.66968435", "0.6607937", "0.64330924", "0.6377011", "0.6368934", "0.6344032", "0.6306555", "0.62436503", "0.61665976", "0.614124", "0.60892147", "0.60760576", "0.6054101", "0.6051199", "0.60232127", "0.59946716", "0.59839743", "0.5978108", "0.5977479", "0.59728366", "0.5951...
0.0
-1
Function fetching the current game board for a certain game
function board(game_id){ $.ajax({ type: "GET", url: server+"/board/"+game_id, async:false, crossDomain:true, success: function(response){ refresh_board(response); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getBoard() {\n console.log(\"getBoard was called\");\n \n return globalBoard;\n}", "function showBoard() {\n let id = $(this).data('id');\n $.get('/games/' + id, function (game) {\n let state = game.data.attributes.state\n let $tds = $('td');\n for (let index = 0; index < state.lengt...
[ "0.7120618", "0.710363", "0.6912194", "0.6903314", "0.67830527", "0.676573", "0.6764122", "0.6720992", "0.6651764", "0.66161335", "0.65911406", "0.65826154", "0.6537369", "0.6510511", "0.64899063", "0.64777005", "0.6311159", "0.628596", "0.62757295", "0.6261523", "0.6252629",...
0.609336
30
Function initiating a new game taking in player names from the screen
function new_game(player_1,player_2){ $.ajax({ type: "GET", url: server+"/newgame/"+player_1+"/"+player_2, async:false, crossDomain:true, success: function(response){ game = response.game; board(Number(game)); }, error: function(){ $("#error").html("<p>Something went wrong. T...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startNewGame(text){\n\n\t//console.log('start new game!');\n\n\ttext.destroy();\n\n\t//not very elegant but it does the job\n\tvar playerName = prompt(\"What's your name?\", \"Cloud\");\n\n\t//store player name in cache to be shown on in-game HUD\n\tlocalStorage.setItem(\"playerName\", playerName);\n\n\tt...
[ "0.7499092", "0.71185035", "0.70200783", "0.69175607", "0.6861589", "0.68360436", "0.6802777", "0.6797735", "0.67655224", "0.67458534", "0.67157763", "0.6692181", "0.66493756", "0.6637591", "0.66329455", "0.66196746", "0.66094154", "0.6608633", "0.6600234", "0.65888625", "0.6...
0.0
-1
Crea una nueva fila para poner la informacion de un nuevo horario Por defecto, las opciones son de grupos. Si se pasa false como parametro, las opciones son de items de laboratorios.
function añadirHorario(esMateria = true) { $("#cuerpo-tabla").append(`<tr id ="`+numFilas+`"> </tr>`); if (esMateria) { $("#"+numFilas).append( `<td class="border border-dark"> <select name ="dia" id= "dia"> <option value="LUNES">LUNES</o...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CrearNota() {\n var id = document.getElementById(\"idArticulo\").value; //Obtiene el valor de Clave\n var FechaRecibo = document.getElementById(\"FechaRecibo\").value; //Obtiene el valor de Clave\n var Recibe = document.getElementById(\"Recibe\").value; //Obtiene el valor de Clave\n var Produc...
[ "0.57365733", "0.5724143", "0.55594903", "0.5533282", "0.5480705", "0.5449643", "0.54204977", "0.5397664", "0.53766537", "0.5363038", "0.5342354", "0.5335989", "0.5335035", "0.53339386", "0.5331023", "0.52708405", "0.52679527", "0.52585447", "0.5248301", "0.5237212", "0.52193...
0.5876108
0
Habilita las opciones para editar la informacion de un horario Funciona tanto para grupos como para horarios
function camposEdicionHorarioDeGrupo(horarioId, horario) { var esMateria = true; if (horario['rol_id'] == 1) esMateria = false; // Vaciamos los elementos de la fila y añadimos las opciones $("#horario" + horarioId + ", #dia" + horarioId) .children("p") .hide(); if (esMateria) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function aceptarEdicionHorarioDeGrupo(horarioId) {\n // Llenamos el form de actualizacion con los datos ingresados\n $(\"#horaInicioForm\" + horarioId).val($(\"#horaInicio\" + horarioId).val());\n $(\"#horaFinForm\" + horarioId).val($(\"#horaFin\" + horarioId).val());\n $(\"#diaForm\" + horarioId).val(...
[ "0.61702687", "0.61625654", "0.5813522", "0.57709193", "0.57193863", "0.5686955", "0.5677675", "0.56539357", "0.56492865", "0.56161857", "0.5582591", "0.5547519", "0.5469406", "0.5469406", "0.5391904", "0.53661126", "0.5335935", "0.533486", "0.5281705", "0.52798027", "0.52796...
0.6460515
0
Cancela la edicion de un horario
function cancelarEdicionHorarioDeGrupo(horarioId) { // Eliminamos los elemtnos para editar horario y mostramos los que tienen informacion $("#horario" + horarioId) .children("p") .show(); $("#dia" + horarioId) .children("p") .show(); $("#horario" + horarioId + " :not(:fir...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cancelaOperacionHotelAgencia(){ \n\t\n\tvar no_de_itinerario = $(\"#no_itinerario\").html();\n\tvar no_de_hoteles=parseInt($(\"#hotel_table\"+no_de_itinerario+\">tbody >tr\").length);\n\t//Eliminamos la ultima operacion realizada\n\tif(banderaCancelaHotel == 1){\n\t\tvar eliminaProceso=no_de_hoteles-1;\t\...
[ "0.6743464", "0.6633424", "0.6479564", "0.6436402", "0.64108783", "0.6367507", "0.6357953", "0.63550484", "0.6333225", "0.6316872", "0.6313873", "0.630965", "0.630965", "0.63010657", "0.6297271", "0.6228454", "0.62037224", "0.61999726", "0.61807215", "0.61799043", "0.6165695"...
0.7280187
0
Aceptar la edicion del horario enviando el form
function aceptarEdicionHorarioDeGrupo(horarioId) { // Llenamos el form de actualizacion con los datos ingresados $("#horaInicioForm" + horarioId).val($("#horaInicio" + horarioId).val()); $("#horaFinForm" + horarioId).val($("#horaFin" + horarioId).val()); $("#diaForm" + horarioId).val( $("#dias" ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function editarFormulario(){\n //Trae la grid para poder actualizar al editar\n listadoCamposFormulario = Ext.getCmp('listadoCamposFormulario');\n if (listadoCamposFormulario.getSelectionModel().hasSelection()) {\n var row = listadoCamposFormulario.getSelectionModel().getSelection()...
[ "0.6772813", "0.6664232", "0.6574562", "0.6349108", "0.63240546", "0.6226635", "0.61927646", "0.6103821", "0.60537195", "0.6032583", "0.59935004", "0.59820575", "0.59480536", "0.5938198", "0.59200144", "0.58955866", "0.5880753", "0.585311", "0.5852522", "0.5851883", "0.585123...
0.6609155
2
Creates an instance of ImageProvider
function ImageProvider() { var _this = _super.call(this) || this; _this.imageDatas = new Map(); // Preload images at the initialization // Images for common topics _this.loadSvg("../app/widgets/common/style/images/disconnected.svg"); _this.l...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static createGoogleImageryLayer(options) {\n return new GoogleImageryProvider(options)\n }", "createSingleImageProvider(ol_lyr) {\n var src = ol_lyr.getSource();\n var params = src.getParams();\n params.VERSION = params.VERSION || '1.1.1';\n if (par...
[ "0.6636218", "0.6294066", "0.62721133", "0.62241113", "0.61810565", "0.613189", "0.6064728", "0.6011738", "0.58706623", "0.5867706", "0.582557", "0.5816406", "0.58067554", "0.58067554", "0.57980555", "0.5651401", "0.5650338", "0.5634494", "0.56138986", "0.5608161", "0.5544190...
0.64764345
1
TEMPLATE GENERATION FUNCTIONS / This function will create the HTML for the initial start screen of the quiz
function startScreen() { return ` <div class="starter"> <p>This quiz will determine whether or not you are a true fan of The Office.</p> <p>There will be 5 questions total.</p> <p>If you can get every question right, you may label yourself a Super Fan!</p> ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderStartQuiz() {\n //console.log('Generating start of quiz');\n $('.intro').html(generateStartPage());\n}", "function startTemplate(){\r\n return (\r\n `<form>\r\n <p>Industrial automation is the use of control systems, computers, robots, information technologies and intrumentation f...
[ "0.805417", "0.77423596", "0.7725005", "0.75793594", "0.7534106", "0.7520777", "0.74746346", "0.7432535", "0.73701316", "0.7363281", "0.7348468", "0.73212403", "0.73212403", "0.73212403", "0.7303838", "0.7284168", "0.7270073", "0.7254379", "0.7221587", "0.7174505", "0.7165256...
0.6855578
46
This function is creating the HTML that displays which question the user is on
function questionNumbers() { return ` <div class="question-current"> <p id="question-number"> Question Number: ${store.questionNumber + 1} out of ${store.questions.length} </p> </div> `; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showQuizTemplate(correctAnswers, question, questionNumber) {\n// question per my function nextQuestion() is from the questionList array of objects\n\treturn `\n\t<form title=\"American Government Quiz\"> <h2 id=\"question\">${question.text}</h2>\n <fieldset role=\"radiogroup\">\n <legend>Select ...
[ "0.7684773", "0.7532742", "0.75273794", "0.7494966", "0.74277425", "0.74214137", "0.74100894", "0.7400564", "0.73952264", "0.73891866", "0.7344291", "0.73272693", "0.7313797", "0.7313797", "0.73024917", "0.72492653", "0.72386634", "0.7238064", "0.72306794", "0.72254837", "0.7...
0.0
-1
This function is creating the HTML that displays the score for the user at whichever question they are currently on
function overallScore() { return ` <div class="current-score"> <p id="score"> Current Score: ${store.score} out of ${store.questions.length} </p> </div> `; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayScore() {\n var score = $('<p>',{id: 'question'});\n \n var numCorrect = 0;\n for (var i = 0; i < selections.length; i++) {\n if (selections[i] === questions[i].correctAnswer) {\n numCorrect++;\n }\n }\n\n var numIncorrect = 0;\n for (var i = 0; i < selections....
[ "0.8121782", "0.80028325", "0.7982459", "0.79575795", "0.7919779", "0.7915604", "0.7887549", "0.78768575", "0.78663325", "0.7854752", "0.7844477", "0.78355247", "0.7819724", "0.7817792", "0.7810649", "0.7793321", "0.7784238", "0.7749702", "0.7716737", "0.77081233", "0.7702849...
0.7071491
94
This function is creating the HTML that displays the list of answers to a given question
function showAnswers() { const answersArray = store.questions[store.questionNumber].answers; let answersHtml = ''; let index = 0; answersArray.forEach(answer => { answersHtml += ` <div id="choice-container-${index}"> <input type="radio" name="choices" id="choice${ind...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayAnswers() {\n const answersArray = STORE.questions[STORE.questionNumber].answers\n let answersHtml = '';\n let i=0;\n\n answersArray.forEach (answer => {\n answersHtml += `\n <div id=\"option-container-${i}\">\n <input type=\"radio\" name=\"options\" id=\"option${i+...
[ "0.7804266", "0.77813137", "0.7692959", "0.7668944", "0.7599189", "0.75896764", "0.75583285", "0.7536918", "0.7495616", "0.74553233", "0.742512", "0.74226266", "0.74042654", "0.7396173", "0.7390031", "0.738441", "0.7364974", "0.7364934", "0.7358574", "0.734019", "0.7331339", ...
0.76639414
4
This function is creating the HTML that displays a given question. Also note that the showAnswers() function will need to be called here in order to get the answers to reflect
function showQuestion() { let questionNumber = store.questions[store.questionNumber]; let thisQuestion = '' thisQuestion += ` <div class="question-number"> ${questionNumbers()} </div> <form id="questions-form"> <fieldset> <div class="quest...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeQuestionHTML(questionObject) {\n\n // This variable captures user responses. I set it\n // blank at first (so I can reference it) and fill it exists already\n\n // Stores them in browser so they can be found if the page is refreshed\n var responses = [];\n if (JSON.parse(sessionStorage.getItem('r...
[ "0.75784403", "0.75572336", "0.7552033", "0.7547626", "0.7490286", "0.74858296", "0.74836856", "0.7478385", "0.74519235", "0.7447", "0.7431352", "0.7409122", "0.74058175", "0.74018854", "0.7384964", "0.737513", "0.7368113", "0.7364336", "0.73614174", "0.7305091", "0.72969157"...
0.71618557
42
This function is creating the HTML that will reflect on the results page
function resultsPage() { return ` <div class="results"> <fieldset> <legend>Final Score: ${store.score} out of ${store.questions.length}</legend> <button type="button" id="redo"> Try Quiz Again </button> </fieldset> ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function htmlWriteResults(cases) {\r\n var myHTML = '';\r\n myHTML +=\r\n `<article><div class=\"col-md-4\">\r\n <div class=\"well text-center\">`;\r\n if (filterMovies(cases.imdbID)) {\r\n myHTML +=\r\n `<div class=\"alert alert-success\" id=\"${cases.imdbID}inCollection\"><p><i class=\"f...
[ "0.72110224", "0.70186603", "0.6962041", "0.684094", "0.6744052", "0.6742382", "0.6680632", "0.66768056", "0.6676182", "0.6590366", "0.65823174", "0.65738916", "0.65603644", "0.6552741", "0.6550452", "0.65346754", "0.6523427", "0.652327", "0.6512382", "0.65064543", "0.6504152...
0.7020039
1
This function renders all of the functions onto the screen for the user
function render() { if (store.quizStarted === false){ $('main').html(startScreen()); } else if (store.quizStarted === true){ // $('main').html(showAnswers()) $('main').html(showQuestion()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderEverything() {\n renderPepperoni();\n renderMushrooms();\n renderGreenPeppers();\n renderWhiteSauce();\n renderGlutenFreeCrust();\n renderButtons();\n renderPrice();\n renderReceipt()\n}", "function render() {\r\n\r\n}", "function render() {\r\n\r\n}", "function render() {\n\t\t\n\t}",...
[ "0.6968965", "0.68512416", "0.68512416", "0.6831926", "0.67995", "0.6771864", "0.6771864", "0.6771864", "0.6771864", "0.6771864", "0.6771864", "0.6771864", "0.67437327", "0.67276824", "0.67226464", "0.671029", "0.6676094", "0.6675679", "0.666747", "0.66581196", "0.66581196", ...
0.596356
76
EVENT HANDLER functions below
function restartTheQuiz() { store.quizStarted = false; store.questionNumber = 0; store.score = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleEvent() {}", "handleEvent() {}", "handleEvents() {\n }", "function handleEvent(event) {\n\n }", "onEvent() {\n \n }", "onrecord() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers()...
[ "0.71400243", "0.71400243", "0.7113297", "0.68396395", "0.6680913", "0.65542555", "0.65293837", "0.65293837", "0.65293837", "0.65293837", "0.65293837", "0.65293837", "0.65293837", "0.65293837", "0.65293837", "0.65293837", "0.65293837", "0.65293837", "0.65293837", "0.65293837", ...
0.0
-1
This function handles when a user clicks 'Start The Quiz'
function handleStartQuiz() { $('main').on('click', '#start', function(){ store.quizStarted = true; render(); }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startQuiz () {}", "function startQuiz() {\n handleAnswerClick();\n displayInterface();\n \n timer();\n}", "function startQuiz() {\n displayNo('startBtn');\n displayYes('card');\n displayYes('answers');\n nextQuestion();\n}", "function startQuiz() {\n hide(\"start-button\")...
[ "0.84254616", "0.8147289", "0.81448877", "0.8014086", "0.8011039", "0.79519194", "0.79299295", "0.7856472", "0.7798013", "0.77778184", "0.7738265", "0.7720727", "0.77193695", "0.7717067", "0.7700542", "0.76992977", "0.7696192", "0.76912665", "0.7681581", "0.7671733", "0.76402...
0.7177188
79
This function handles when a user clicks on "Next Button"
function handleNextQuestion() { $('main').on('click', '#next-question-button', function(evt){ evt.preventDefault(); if (store.questionNumber >= store.questions.length) { $('main').html(resultsPage()); } else { render(); } }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleNextButton() {\r\n $('#container').on('click', '#js-next-button', function(event) {\r\n\r\n if(questionNum === 10) {\r\n createResultsPage(correctAnswers);\r\n } else {\r\n iterateQuestion();\r\n nextQuestion();\r\n }\r\n });\r\n}", "function handleNextButton() {\n //when ...
[ "0.81010115", "0.8095233", "0.7989662", "0.7971477", "0.7964368", "0.79634684", "0.78896296", "0.78519326", "0.7851218", "0.78504646", "0.78391576", "0.78196025", "0.775901", "0.7730504", "0.7712424", "0.77013445", "0.7655279", "0.7632216", "0.7621924", "0.7581114", "0.757697...
0.70714307
76
This function will effectively show everything on the screen by linking to the main HTML div
function main() { handleStartQuiz(); render(); handleAnswerSubmission(); handleNextQuestion(); resultsPage(); handleRestartQuiz(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async show() {\n // Anzuzeigenden Seiteninhalt nachladen\n let html = await fetch(\"page-overview/page-overview.html\");\n let css = await fetch(\"page-overview/page-overview.css\");\n\n if (html.ok && css.ok) {\n html = await html.text();\n css = await css.text();...
[ "0.7138003", "0.6869457", "0.68068314", "0.6769361", "0.6616863", "0.6536908", "0.64531195", "0.64472574", "0.6442653", "0.64248955", "0.6416159", "0.6411321", "0.64059293", "0.6395312", "0.6386405", "0.63423866", "0.6342164", "0.6320836", "0.6316676", "0.6316072", "0.6311638...
0.0
-1
Function for collection of data sourced on
function collectRequestData(req, callback) { var FORM_URLENCODED = 'application/x-www-form-urlencoded'; if(req.headers['content-type'] === FORM_URLENCODED) { var body = ''; req.on('data', input => { body += input.toString(); }); req.on('end', () => { c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resolve_data_source(element, name) { // 246\n\tvar fn = resolve_template_function(element, name); // 247\n\tif ($.isFunction(fn)) { ...
[ "0.6207382", "0.6174502", "0.6172985", "0.6090958", "0.60337055", "0.6025044", "0.6013268", "0.5972636", "0.5949317", "0.5934205", "0.58972424", "0.5896579", "0.58820117", "0.5851109", "0.5757125", "0.57570744", "0.5752503", "0.57238835", "0.57143694", "0.5709085", "0.5692273...
0.0
-1
Converting the data to database ready input
function convertData(data) { var firstName = data['Voornaam*']; var lastName = data['Achternaam*']; var email = data['Email*']; var education = data['Opleiding*']; var opleidingsInstelling = data['Opleidingsinstelling*']; var geslacht = data['geslacht']; var know = data['kennis']; var jeBericht ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function convertDBData2UserData(dbData) {\n debug && console.log(\"convertDBData2UserData().\");\n for (var i = 0; i < dbData.length; i++) {\n var arr = dbData[i][\"id\"].propName.split(\"-\");\n if (arr.length != 3) {\n // for templateName, categoryTemplateName, ...
[ "0.6299624", "0.6195855", "0.6075627", "0.6023477", "0.59260434", "0.5922354", "0.59196174", "0.5904917", "0.5819105", "0.57192177", "0.5616895", "0.5591815", "0.5578585", "0.55735403", "0.5563739", "0.55511653", "0.5536356", "0.5534076", "0.549229", "0.5481317", "0.546786", ...
0.67105556
0
Putting the data into the database
function insertToDB(firstName, lastName, email, education, opleidingsInstelling, know, jeBericht, ervaring, date) { // open database var db = new sqlite3.Database('admissions.db', (err) => { if (err) { return console.error(err.message); } }); // create table for storage db.run('CREATE ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "save() {\n this.db.write();\n }", "function insertdata() {\n getData.getAllData().then(function() {});\n }", "function putEntry(data) {\n db.get(\"data_entries_point\").push(data).write();\n}", "function storeDataInDatabase(surveyId, controlId, value, db) {\n\tvar query = \"INSERT INTO...
[ "0.6767077", "0.67009556", "0.6664629", "0.6613386", "0.6604627", "0.6599988", "0.65742844", "0.65548015", "0.6536579", "0.6476785", "0.64536613", "0.64520127", "0.6424887", "0.64233196", "0.64226174", "0.64080983", "0.6390509", "0.63863504", "0.6370735", "0.6365673", "0.6316...
0.65597486
7
Fin Declaraciones de estado Inicio funciones auxiliares
function removeDuplicity(array) { let hash = Object.create(null) return array.reduce((result, value) => { if (!hash[value.groupDictate.nameGroup]) { hash[value.groupDictate.nameGroup] = true result.push(value) } return result }, []) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init(){\n\tentidades();\n ramas();\n armarArbol();\n}", "reiniciarConteo() {\n this.ultimo = 0;\n this.tickets = [];\n this.grabarArchivo();\n this.ultimos4 = []\n console.log('Se ha inicializado el sistema');\n \n }", "limpiar() {\n this.nuevoRegi...
[ "0.6927689", "0.6676474", "0.6515041", "0.6449172", "0.6364343", "0.63629186", "0.63342226", "0.6321364", "0.6286676", "0.6285366", "0.6264374", "0.6238451", "0.6218034", "0.62170804", "0.61744434", "0.6157674", "0.6141273", "0.6132804", "0.6124284", "0.6115739", "0.61082023"...
0.0
-1
Fin funciones auxiliares Inicio Fecth information
function getGroups(teacher_id) { fetch(api + `/${teacher_id}`, { method: 'GET', headers: { Accept: 'application/json', 'Content-Type': 'application/json', }, }) .then((response) => response.json()) .then((data) => { let depuredArray = removeDuplici...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "reiniciarConteo() {\n this.ultimo = 0;\n this.tickets = [];\n this.grabarArchivo();\n this.ultimos4 = []\n console.log('Se ha inicializado el sistema');\n \n }", "function visualizar_info_oi(id) {\n visualizar_facturacion(id);\n id_oi = id;\n $.ajax({\n ...
[ "0.66557086", "0.64489216", "0.6371281", "0.6369949", "0.63230366", "0.63230366", "0.6300285", "0.6253151", "0.6215693", "0.6136352", "0.6132294", "0.61116576", "0.6106555", "0.61057985", "0.60908633", "0.60890335", "0.60609674", "0.60346687", "0.6017174", "0.6002921", "0.600...
0.0
-1
Fin Fecth information Inicio post request
function createSecction(body) { fetch(apiSecction, { method: 'POST', headers: { Accept: 'application/json', 'Content-Type': 'application/json', }, body: JSON.stringify(body), }) .then((response) => response.json()) .then((data) => { addLink(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleSubmit(){\n let paddock = {name,description,meassure}\n console.log(paddock);\n const api = `${URL}${idSelecter}/paddocks/`; \n console.log(api);\n axios.post(api ,paddock,{ headers: {\"Content-type\": \"application/json\", \"Authorization\" : `Token ${token}`} })\...
[ "0.67798567", "0.66657025", "0.66331273", "0.66284734", "0.66182697", "0.64215773", "0.64046425", "0.6381529", "0.63668853", "0.6364387", "0.6363696", "0.63515455", "0.63383275", "0.6337378", "0.6334786", "0.6322892", "0.63194233", "0.6312437", "0.6298782", "0.62751734", "0.6...
0.0
-1
Function that enables or disables child inputs of a "checkable" based on whether the checkable input (a radio button or checkbox) is checked. `this` must refer to the actual input element representing the checkable. Called from a click handler installed globally, and also when a modal popup is shown (see effRegModal.js...
function enableChildren() { console.log('Checkable.enableChildren'); var $children = $(this).parents('.pnl-Checkable').find('input,select,textarea').not(this); if (this.checked) { // TODO only re-enable if we don't have the 'disabled' class $children.not('.disabled').removeAttr('disabled'); $child...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function custom_checkbox_radiobutton(on_element){\n\tvar checkedClass = 'custom-input-checked';\n\tvar disabledClass = 'custom-input-disabled';\n\tvar inputSelector = $(on_element).find('.custom-checkbox input, .custom-radio input');\n\t\n\t$(inputSelector)\n\t\t.each(function() {\n\t\t\tvar input = this;\n\t\t\t\...
[ "0.59954447", "0.5951709", "0.5906785", "0.5726401", "0.56856334", "0.55295223", "0.5393783", "0.53929776", "0.5355065", "0.5346721", "0.5346721", "0.5346721", "0.5346721", "0.5346721", "0.5346721", "0.53421074", "0.5335981", "0.5324113", "0.5317606", "0.5314211", "0.52742785...
0.7424696
0
Install doclevel click handler on checkables to run enableChildren
function init() { $(document).on('click', '.pnl-Checkable-input', enableChildren); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function attachClickHandlers() {\r\n $('.tree > ul').attr('role', 'tree').find('ul').attr('role', 'group');\r\n // Find element class tree, find all sub elements li that \"has(ul)\",\r\n // add class parent_li to those elements, looks for attribute role\r\n // 'treeitem' find direct children sub-elemen...
[ "0.6155298", "0.58738834", "0.57265943", "0.5708189", "0.5691787", "0.5690447", "0.56769073", "0.5631785", "0.56132156", "0.55433875", "0.55102605", "0.5496663", "0.5437903", "0.5414667", "0.53617895", "0.53580016", "0.5324803", "0.5308418", "0.5304284", "0.5301391", "0.52976...
0.68944496
0
constructor Handles options to run a single generator instance
constructor(options = {}) { // Assigns this.options this.options = options; // Assigns this.generators this.generators = []; // Assigns this.options.cwd this.options.cwd = process.cwd(); // Returns the runtime instance return this }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(generator) {\n this.generator = generator;\n }", "constructor(args, opts) {\n // Calling the super constructor is important so our generator is correctly set up\n super(args, opts);\n }", "constructor( args, opts ) {\n\n // Calling the super constructor is important so our g...
[ "0.7501722", "0.7423481", "0.7315112", "0.69102824", "0.6773963", "0.67678386", "0.6701796", "0.66350913", "0.66350913", "0.66350913", "0.66350913", "0.66350913", "0.66350913", "0.65574443", "0.64763194", "0.64763194", "0.64763194", "0.64763194", "0.64763194", "0.64763194", "...
0.7264814
3
registerGenerator Registers an individual generator by it's node_modules name i.e. 'codotypegeneratornuxt' in `node_modules/codotypegeneratornuxt'`
registerGenerator ({ module_path, relative_path, absolute_path }) { // Resolves path to generator let engine_path = '' // Generator is located in node_modules if (module_path) { engine_path = path.join(this.options.cwd, MODULES_ROOT, module_path) } else if (relative_path) { engine_path...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setupGenerators() {\n const env = yeoman.createEnv();\n env.register(path.join(__dirname, '../generators/app'), PREFIX + 'app');\n env.register(\n path.join(__dirname, '../generators/extension'),\n PREFIX + 'extension',\n );\n env.register(\n path.join(__dirname, '../generators/controller'),...
[ "0.598932", "0.5661764", "0.55476964", "0.52603865", "0.5221236", "0.52148545", "0.5184446", "0.5073637", "0.50024205", "0.4991709", "0.49678192", "0.4960836", "0.4954651", "0.4903635", "0.4903635", "0.49028236", "0.48810342", "0.48768693", "0.4854912", "0.48516145", "0.48443...
0.69000894
0
writeBuildManifest Writes the build and the blueprint data to the destination directory
async writeBuildManifest ({ build }) { let output_directory = build.id || '' const dest = path.join(this.options.cwd, OUTPUT_DIRECTORY, output_directory, build.blueprint.identifier); await this.ensureDir(dest) return new Promise((resolve, reject) => { fs.writeFileSync(path.join(dest + '/codotype-...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function writeManifestToFile() {\n var jsonContent = JSON.stringify(this.manifest, null, \" \");\n var strFileName = io.appendPath(conf.manifestPath, this.strManifestFileName);\n io.writeFile(strFileName, jsonContent);\n}", "function generateManifest() {\n var stream = gulp.src(MANIFEST_SOURCE_FILES)\n ....
[ "0.6928249", "0.6371739", "0.6095998", "0.60653263", "0.6005129", "0.56655574", "0.56111515", "0.5476279", "0.54131335", "0.54123765", "0.5336306", "0.5318002", "0.5282031", "0.52477103", "0.5244205", "0.5181955", "0.5152685", "0.5143774", "0.51346666", "0.51249826", "0.50932...
0.813215
0
ensureDir Ensures presence of directory for template compilation
async ensureDir (dir) { return new Promise((resolve, reject) => { return fsExtra.ensureDir(dir, (err) => { if (err) return reject(err) return resolve() }) }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ensureDirForFile( path ) {\n return ensureDir( Path.dirname( path ) )\n}", "ensureMigrationDirectory() {\r\n try {\r\n fs.statSync(this.config.directory);\r\n }\r\n catch (error) {\r\n mkdirp.sync(this.config.directory);\r\n }\r\n }", "async _ens...
[ "0.71061385", "0.6885778", "0.64891845", "0.6384211", "0.6342809", "0.6164554", "0.61635715", "0.5998683", "0.59567297", "0.593666", "0.59348756", "0.5920972", "0.5896048", "0.5877814", "0.5802011", "0.5778845", "0.576461", "0.57227147", "0.5688892", "0.5687067", "0.5635208",...
0.65630823
2
getGenerators Returns an array of generators registered to this runtime instance
getGenerators () { return this.generators; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getToGenerateArray() {\n const self = this;\n let\n iterator, next,\n items = [];\n\n // go over each item in toGenerate\n iterator = self.toGenerate.keys();\n next = iterator.next();\n\n while ( !next.done ) {\n ...
[ "0.590516", "0.58170223", "0.56553227", "0.5527991", "0.5527991", "0.5527991", "0.5527991", "0.5527991", "0.5527991", "0.5527991", "0.5527991", "0.5527991", "0.5527991", "0.5527991", "0.5527991", "0.5527991", "0.5527991", "0.5527991", "0.5527991", "0.5527991", "0.5527991", ...
0.78182685
0
write Method for write files to the filesystem
async execute ({ build }) { // Pulls attributes out of build object // TODO - accept OUTPUT_DIRECTORY override let { id, blueprint, stages } = build // Inflates blueprint metadata // TODO - handle missing blueprint object blueprint = inflate({ blueprint }); await thi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function write(name, data) {\n var target_dir = public + \"/\" + name;\n try {\n fse.outputFile(target_dir, data, function(err) {\n if (err) {\n console.log(err)\n } else {\n console.log(\"writted \" + target_dir)\n }\n });\n } c...
[ "0.7017265", "0.70005435", "0.70005435", "0.70005435", "0.70005435", "0.70005435", "0.70005435", "0.70005435", "0.70005435", "0.70005435", "0.70005435", "0.6947603", "0.6945739", "0.68987817", "0.6834521", "0.6781255", "0.6781255", "0.6773559", "0.67590904", "0.67590904", "0....
0.0
-1
ATAQUE AUTOMATICO DEL ENEMIGO // (Ataque del enemigo al atacar DESACIVADO, SOLO ataca automaticamente)
function attackEnemy() { enemyLife.value -= miPersonaje.ataques[0].poderAtaque; miPersonaje.atacar(Rival, 'puñetazo'); //Accion de ataque / Nombre del ataque // var combatLogUpdate = document.createElement("p"); var enemyCombatLogText = document.createTextNode('Ataco con ' + miPersonaje.ataques[0].nomb...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function actualizaEnemigos(){\n\tif(!modo_pruebas){\n\t\tfunction agregarDisparos(enemigo,posicion_x,posicion_y){\n\n\t\t\treturn {\n\t\t\t\tx: posicion_x,\n\t\t\t\ty: posicion_y,\n\t\t\t\twidth: 10,\n\t\t\t\theight: 30,\n\t\t\t\tcontador: 0\n\t\t\t}\n\t\t}\n\t}\n\n\tif(juego.estado == 'iniciando'){\n\n\t\tif(nive...
[ "0.6505147", "0.6346522", "0.62995476", "0.62896186", "0.62784857", "0.62146753", "0.6204855", "0.6170727", "0.61700755", "0.61596125", "0.6150405", "0.6146825", "0.6130761", "0.61120063", "0.6111015", "0.61019015", "0.6087504", "0.6083479", "0.6025978", "0.6025978", "0.60150...
0.0
-1
Boton de ataque en HTML / funcion de ataque
function heal() { myLife.value += 10; //Curarme cierta cantidad de vida / PARTE GRAFICA // miPersonaje.vidaActual += 10; // Vida actual del personaje / Cantidad a curar // var healLogUpdate = document.createElement("p"); var myHealthLogText = document.createTextNode('Comí una hamburguesa para curarme. M...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clicou(){\n //alert(\"Botao clicado\");\n\n //manipulando elementos no html\n document.getElementById(\"agradecimento\").innerHTML = \"Obrigado por clicar\";\n document.getElementById(\"agradecimento2\").innerHTML = \"<b>Obrigado por clicar</b>\";\n\n}", "function oiPesquisa()\n{\n\t$('#nome...
[ "0.63057464", "0.61863846", "0.605217", "0.6016474", "0.5997136", "0.59724027", "0.5968521", "0.59261316", "0.5917891", "0.5912899", "0.58889735", "0.5883093", "0.58718044", "0.5851255", "0.5846532", "0.58457786", "0.5843873", "0.58424896", "0.5838296", "0.5837624", "0.582143...
0.0
-1
interact with users followers ids
function getFollowersIds (screenName) { bot.get('followers/ids', { screen_name: screenName }, (err, data, response) => { if (err) console.log(err) console.log(data) }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMyFollowers() {\n console.log(\"Here are the Walkers!\");\n client.get('followers/list', {\n screen_name: 'fully_coded',\n count: 200,\n\n\n }, function (error, followers, response) {\n console.log(followers.users.length);\n for (i = 0; i < followers.users.length; i++) {\n\n\n\n }\n\n...
[ "0.7285221", "0.7233625", "0.7141825", "0.7048571", "0.700345", "0.69805896", "0.6883431", "0.68829054", "0.68270993", "0.6826479", "0.6814285", "0.6795293", "0.67514354", "0.67186695", "0.6698893", "0.6689516", "0.6682908", "0.66323864", "0.65946895", "0.658987", "0.6589246"...
0.6905338
6
list of users who follow us
function getListFollowers (screenName) { bot.get('followers/list', { screen_name: screenName }, (err, data, response) => { if (err) console.log(err) data.users.forEach(user => console.log(user.screen_name));// log screen names (usernames) }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function getFollowings() {\n console.log('Getting users which are followed by you')\n let hash = 'd04b0a864b4b54837c0d870b0e77e076'\n let body = await rp.get({\n url: 'https://www.instagram.com/graphql/query/',\n headers: {\n 'cookie': `sessionid=${sessionId};`\n },\n...
[ "0.7490562", "0.73816216", "0.7362717", "0.73234355", "0.72581637", "0.7247774", "0.7213427", "0.72003615", "0.7185678", "0.71618384", "0.7154947", "0.7121501", "0.710805", "0.70952594", "0.7077539", "0.7074409", "0.7067363", "0.6907914", "0.6888368", "0.68667257", "0.6836152...
0.70235914
17
how to follow people
function followUser(screenName) { bot.post('friendships/create', { screen_name: screenName }, (err, data, response) => { if (err) console.log(err) console.log(data) }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function follow() {\n UserService.follow(vm.currentUser, vm.user)\n .then(res => {\n vm.user.followers.push(vm.currentUser._id);\n vm.isFollowed = true;\n\n // send notification to the server that user is followed\n socket.emit('notifica...
[ "0.73516715", "0.71567094", "0.7081948", "0.7079054", "0.6986184", "0.6984271", "0.69123405", "0.6803181", "0.6712376", "0.6684887", "0.666616", "0.66491526", "0.66434747", "0.6639845", "0.6622119", "0.66216063", "0.6583642", "0.65728074", "0.6544431", "0.6529981", "0.6491493...
0.66828454
10
lookup ids of people we follow
function listIdsForFollowedUsers (screenName) { bot.get('friends/ids', { screen_name: screenName }, (err, data, response) => { if (err) console.log(err) console.log(data) }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getFollowings(userid,maxid = null, callback) {\n var endpoint = 'friendships/' + userid + '/following/?'\n Instaifunctions.sendRequest(endpoint, null,\n (data) =>\n callback(data)\n )\n }", "async function followUserIds(use...
[ "0.6298715", "0.6135527", "0.61352384", "0.6124555", "0.5942024", "0.5922988", "0.592188", "0.5877364", "0.5819026", "0.580164", "0.57993", "0.5785491", "0.5783391", "0.57510555", "0.5742688", "0.5698977", "0.5667777", "0.55986094", "0.5598589", "0.55790395", "0.5550548", "...
0.62277097
1
lookup list of people we follow
function listFollowedUsers (screenName) { bot.get('friends/list', { screen_name: screenName }, (err, data, response) => { if (err) console.log(err) console.log(data) }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listNames() {\r\n for (let u1 in pplUserFollows) {\r\n for (let u2 in pplThatFollowUser) {\r\n if (u1 === u2) {\r\n console.log(u1 + \" follows: \" + pplUserFollows[u1] + \"; and is followed by: \" + pplThatFollowUser[u2]);\r\n break;\r\n }\r\n }\r\n }\r\n}", "function li...
[ "0.69497734", "0.6824056", "0.67248476", "0.66318256", "0.6491176", "0.64298004", "0.64041764", "0.63733226", "0.62752575", "0.6179584", "0.6166059", "0.6139015", "0.6119636", "0.6117449", "0.6085424", "0.6057365", "0.6040412", "0.6008676", "0.59928644", "0.5989402", "0.59844...
0.613994
11
get if we follow user and if they follow back (connections)
function getUserConnection (screenName) { bot.get('friendships/lookup', { screen_name: screenName }, (err, data, response) => { if (err) console.log(err) console.log(data) }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "can_follow() {\n return true\n }", "async is_follow() {\n const {id} = this.state;\n const followings = await get_object('@storage_following');\n if (followings) {\n let follow = followings.find(item => item.id === id);\n this.setState({is_follow: follow ? true : false});\n }\n }...
[ "0.69632393", "0.6618552", "0.65305734", "0.6514963", "0.6446691", "0.64174074", "0.6409699", "0.6364897", "0.6345073", "0.6338493", "0.6337687", "0.63030744", "0.627749", "0.62527776", "0.62271273", "0.6178661", "0.61615956", "0.6093191", "0.6052493", "0.60502905", "0.604445...
0.0
-1
see the tweets from people we follow (most recent 5)
function getBotTimeline () { bot.get('statuses/home_timeline', { count: 5 }, (err, data, response) => { if (err) console.log(err) data.forEach(d => { console.log(d.text) console.log(d.user.screen_name) console.log(d.id_str) console.log('\n') }); }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function twitter20(){\nconsole.log(msg.SimpleMessage);\n \nvar params = {screen_name: 'ninja_cbc'};\nclient.get('statuses/user_timeline', params, function(error, tweets, response) {\n if (!error) {\n console.log(tweets);\n }\n});\n\n//PSUEDO CODE:\n// find specific user's 20 recent tweets\n// Output data to c...
[ "0.72115666", "0.71371496", "0.7003429", "0.6991577", "0.69709754", "0.6951837", "0.6900831", "0.6878764", "0.6878407", "0.68774945", "0.6874157", "0.687271", "0.6872294", "0.68647224", "0.6858684", "0.6853066", "0.6832706", "0.682343", "0.6812218", "0.68103594", "0.6805712",...
0.0
-1
reply to a tweet
function replyToTweet(replyMessage, inReplyToStatusId) { bot.post('statuses/update', { status: replyMessage, in_reply_to_status_id: inReplyToStatusId }, (err, data, response) => { if (err) console.log(err) console.log(data) }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tweetReply(txt) {\n var myReply = {\n status: txt\n }\n\n T.post('statuses/update', myReply, replyFunction);\n\n // Function for my reply post. Checks and see if there is an error\n function replyFunction(err, data, response) {\n if(err) {\n console.log(\"Unable to to post reply!\");\n ...
[ "0.7973561", "0.7807597", "0.77569425", "0.7324289", "0.7259258", "0.7000274", "0.6962234", "0.6960685", "0.6915186", "0.6852659", "0.6787929", "0.6738733", "0.67264104", "0.671248", "0.67015624", "0.6657719", "0.6616893", "0.66115534", "0.66100776", "0.6599735", "0.6595155",...
0.7392166
3
Twitter Search API query and count parameters to get the search term(s) and number of tweets that we want q: 'happy birthday anniversary' look up tweets with the string happy but without birthday. hashtags :(, :)
function searchTweets (query, count) { bot.get('search/tweets', { q: query, count: count }, (err, data, response) => { if (err) console.log(err) data.statuses.forEach((s) => { console.log(s.text) console.log(s.user.screen_name) console.log('\n') }) }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tweets() {\n\n var params = {\n q: 'hzoba',\n count: 2\n\n } // this is the param variable which will have key and value \n // ,the key is the keyword which we are interested in searching and count \n // is the count of it\n client.get('search/tweets', params, searchedData); /...
[ "0.76483387", "0.74339175", "0.73927176", "0.726973", "0.71466696", "0.7119604", "0.71190876", "0.71127266", "0.7032799", "0.70304805", "0.7021027", "0.69879276", "0.6979625", "0.69696575", "0.6831234", "0.6781445", "0.67175984", "0.6698748", "0.6636955", "0.6608139", "0.6426...
0.7721847
0
can use result_type as parameter to search for 'recent' or 'popular' tweets
function searchTweetsByResultType (query, count, resultType) { bot.get('search/tweets', { q: query, result_type: resultType, count: count }, (err, data, response) => { if (err) console.log(err) data.statuses.forEach((s) => { console.log(s.text) console.log(s.user.screen_name) console.log('\n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function search(hashtag, resultType){\n\tvar params = {\n\t\tq: hashtag, // REQUIRED\n\t\tresult_type: resultType, //mixed,recent or popular\n\t\tlang: 'en'\n\t} \n\tTwitter.get('search/tweets', params, function(err, data) {\n\t\tif (!err) {\n\t\t\tconsole.log('Found tweets: ' + data.statuses.length);\n\t\t\tconso...
[ "0.7731629", "0.6768603", "0.67549765", "0.65267795", "0.6483413", "0.6455932", "0.644594", "0.6441844", "0.6159272", "0.6134793", "0.60450464", "0.600428", "0.5990645", "0.59725183", "0.5929922", "0.59254056", "0.5912308", "0.59120715", "0.59107393", "0.58997", "0.58772016",...
0.7834298
0
geo_code parameter, which takes the format latitude, longitude, and then a radius in miles, which will look for tweets originating from that area. geoCode example '33.9735637,83.380579,1mi'
function searchTweetsByGeoCode(query, count, geoCode) { bot.get('search/tweets', { q: query, geo_code: geoCode, count: count }, (err, data, response) => { if (err) console.log(err) data.statuses.forEach((s) => { console.log(s.text) console.log(s.user.screen_name) console.log('\n') }) }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function geocode(search, token) {\n var baseUrl = 'https://api.mapbox.com';\n var endPoint = '/geocoding/v5/mapbox.places/';\n return fetch(baseUrl + endPoint + encodeURIComponent(search) + '.json' + \"?\" + 'access_token=' + token)\n .then(function (res) {\n return res.json();\n // to ...
[ "0.59313506", "0.5902805", "0.581782", "0.57735497", "0.5760769", "0.56012625", "0.5596707", "0.5544538", "0.55064046", "0.5485894", "0.5464303", "0.5448077", "0.5432804", "0.5423059", "0.54046285", "0.53749996", "0.5357298", "0.5351713", "0.5348025", "0.53459126", "0.5332646...
0.6198368
0
lang parameter to lookup for tweets in a language other than english ex. 'es'
function searchTweetsByLanguage(query, count, lang) { bot.get('search/tweets', { q: query, count: count, lang: lang }, (err, data, response) => { if (err) console.log(err) data.statuses.forEach((s) => { console.log(s.text) console.log(s.user.screen_name) console.log('\n') }) }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function translateLanTags(lang) {\n if (lang == \"Russian\") {\n return \"russo\";\n } else if(lang == \"Italian\") {\n return \"italiano\";\n } else if (lang == \"German\") {\n return \"tedesco\";\n } else {\n return lang;\n };\n}", "function findLanguage(lang) {\n LanguageService.get({ ...
[ "0.65779334", "0.6123697", "0.6107484", "0.60716265", "0.6060634", "0.5995929", "0.59283495", "0.5877929", "0.5808139", "0.57996964", "0.57996964", "0.57573575", "0.57456803", "0.5743371", "0.5722874", "0.5712936", "0.5712936", "0.5712936", "0.570865", "0.570865", "0.570038",...
0.6886407
0
Twitter Stream API realtime stream of tweets. There are two ways to do this. The first is a sampling of random public tweets from the last seven days. Stream random sampling of tweets
function streamRandomSamplingOfTweets () { const stream = bot.stream('statuses/sample') stream.on('tweet', (tweet) => { console.log(tweet.text + '\n') }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "startTweetStream () {\n const options = {\n hostname: this.TWT_API_HOST,\n path: '/2/tweets/search/stream',\n method: 'GET',\n headers: {\n Authorization: `Bearer ${process.env.TWITTER_BEARER_TOKEN}`\n }\n }\n\n const req = ...
[ "0.7265968", "0.69962144", "0.682098", "0.6739047", "0.6640142", "0.6626303", "0.6614348", "0.6582205", "0.6578511", "0.6562914", "0.65073067", "0.649859", "0.6494107", "0.6490324", "0.64782876", "0.64727724", "0.64665824", "0.64352524", "0.64267", "0.6422344", "0.6415142", ...
0.8326075
0
for more specific information you can pass a parameter for example track (keeps track of a specific string) 'win', 'win, lose' (multiple words) 'win lose' both words spaces act as the logical AND (&&) and comas as the logical OR (||)
function streamTweetsOfSpecificString(stringToTrack) { const stream = bot.stream('statuses/filter', { track: stringToTrack }) stream.on('tweet', (tweet) => { console.log(tweet.text + '\n') }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function suggestFilter(msg, arg){\r\n\t\tstate = 3;\r\n\t\thasTheWord = arg;\r\n\t\topenPanel(msg);\r\n\t}", "function getCondition(PHRASE){\n if (PHRASE.toLowerCase().includes(\"cloud\") || PHRASE.toLowerCase().includes(\"overcast\")) {return \"Cloudy\";}\n if (PHRASE.toLowerCase().includes(\"rain...
[ "0.5998911", "0.5944163", "0.59312963", "0.5903399", "0.5835828", "0.5711121", "0.569721", "0.5665289", "0.5615511", "0.5473341", "0.5464571", "0.5456578", "0.545416", "0.5440965", "0.5395471", "0.53859115", "0.53806365", "0.5343203", "0.5337604", "0.53293294", "0.53145516", ...
0.49309552
96
filter by location two coordinates which represent a bounding box, with the first set of coordinates being the southwest corner. ex. locations: '74,40,73,41'
function streamByLocation(locations) { const stream = bot.stream('statuses/filter', { locations: locations }) stream.on('tweet', (tweet) => { console.log(tweet.text + '\n') }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function boundsFiltering(val,bounds){\n return bounds.contains([val.lat,val.lng]);\n }", "function splitLoc(fc, bound) {\n\n var fbound = ee.Feature(bound);\n\n var fc_inside = function(f){\n return ee.Feature(f).set('inbound',ee.Feature(f).intersects(fbound));\n };\n \n fc = ...
[ "0.6105269", "0.6037432", "0.5926062", "0.5885452", "0.5857291", "0.5823128", "0.58135444", "0.58088326", "0.58076173", "0.58076173", "0.58076173", "0.5746995", "0.57431304", "0.57256705", "0.5719542", "0.5717249", "0.571655", "0.571655", "0.5716392", "0.5710643", "0.5707861"...
0.0
-1
filter by specific user follow: user id
function streamTweetsForUserId () { const stream = bot.stream('statuses/filter', { follow: '191100226'}) stream.on('tweet', (tweet) => { console.log(tweet.text + '\n') }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findUsersToFollow(user) {\n return travelyaarUserModel.find({_id: {$nin: user.following}});\n }", "followUser(state, userId) {\n state.loading.following = true;\n state.loading.follow = true;\n\n let user = state.userList.find((user) => user._idUser === userId);\n if (user) {\n ...
[ "0.733778", "0.69991314", "0.6750833", "0.66448146", "0.64786863", "0.64605063", "0.6438413", "0.64259773", "0.64064926", "0.63528013", "0.63354945", "0.63249904", "0.62159824", "0.6215671", "0.62120557", "0.61796117", "0.6171482", "0.6145965", "0.6145761", "0.61245584", "0.6...
0.59148926
29
Tweet Media Files with Twit.js
function getNasaPhoto() { const parameters = { url: 'https://api.nasa.gov/planetary/apod', qs: { api_key: process.env.NASA_KEY }, encoding: 'binary' } request.get(parameters, (err, response, body) => { if (err) console.log(err) else body = JSON.parse(body) saveFile(body,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function uploaded(err, data, response) {\n var id = data.media_id_string;\n var picTweet = {\n status: 'Here is a picture I drew! Yay!',\n media_ids: [id]\n }\n T.post('statuses/update', picTweet, picFunc);\n\n // Function for T.post. Checks for error\n function picFunc(...
[ "0.6785907", "0.67494863", "0.65181017", "0.6494119", "0.64277047", "0.63991016", "0.638248", "0.632647", "0.6267502", "0.62630194", "0.6227692", "0.61770755", "0.6170422", "0.6156917", "0.61333805", "0.60086644", "0.59930676", "0.5988506", "0.59343266", "0.5924391", "0.59157...
0.0
-1
The purpose of this function is to set initially page control value afete opening of mapping page
function loadRoleToAccountMappingPage() { if(sessionStorage.tabName == "Role"){ createRoleToAccountMappingTable(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initPage(sMode) {\n \n bindConfigurationTemplate();\n setFocusToField(\"lkpDepotCode\");\n hideDiv(\"lnkReset\");\n hideDiv(\"divDetail\");\n}", "function setCurrentPage(value) {\n txtCurrentPage.val(value);\n }", "function setPage() {\n setNavigation();\n $('#tab...
[ "0.68033767", "0.666434", "0.64344925", "0.6385104", "0.6286365", "0.6280015", "0.62573093", "0.6191868", "0.6185095", "0.6180951", "0.6152023", "0.6150558", "0.6141678", "0.61113185", "0.60655683", "0.6037255", "0.60127413", "0.6009683", "0.59929276", "0.59666127", "0.596290...
0.0
-1
The purpose of this function is to check if a role already exists or not.
function isRoleBoxExist() { var selectedAccountName = getSelectedAccount(); var baseUrl = getClientStore().baseURL; var accessor = objCommon.initializeAccessor(baseUrl, cellName); var context = objCommon.initializeAbstractDataContext(accessor); var objLinkManager = objCommon.initializeLinkManager(accessor, conte...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isExist(check, accessor, objJRole, objRoleManager) {\n\t//If role is new.\n\tif (check === true) {\n\t\tobjRoleManager.create(objJRole);\n\t\tremoveSpinner(\"modalSpinnerRole\");\n\t\treturn true;\n\t}\n\tvar existMessage = getUiProps().MSG0007;\n\tdocument.getElementById(\"popupRoleErrorMsg\").innerHTML ...
[ "0.77104735", "0.75179744", "0.7058213", "0.6839606", "0.67944694", "0.6741079", "0.66836226", "0.6479097", "0.64585763", "0.6456362", "0.6439232", "0.63806856", "0.63510317", "0.6338789", "0.6220796", "0.62094843", "0.61911356", "0.6098109", "0.60714257", "0.6047788", "0.604...
0.71341246
2
The purpose of this function is to reload the top most panel.
function reloadPanel() { var accountMappedSuccessMessage = getUiProps().MSG0035; addSuccessClass('#roleToAccountMessageIcon'); //inlineMessageBlock(212,'#roleToAccountMessageBlock'); $("#roleToAccountMessageBlock").css("display", 'table'); document.getElementById("roleToAccountSuccessmsg").innerHTML = accountMappe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function refreshContent(){\n $('#gap_fluxo').load(document.URL + ' #gap_fluxo');\n $('#panel0').load(document.URL + ' #panel0');\n $('#panel1').load(document.URL + ' #panel1');\n $('#panelEspera').load(document.URL + ' #panelEspera');\n }", "function updateTopPanel() {\n let isP...
[ "0.6811515", "0.66847837", "0.6571418", "0.63360816", "0.62148494", "0.6200902", "0.61980563", "0.6161565", "0.6135523", "0.61338127", "0.6118339", "0.6080772", "0.6042066", "0.6027638", "0.60176843", "0.6002639", "0.59599584", "0.5938501", "0.59360623", "0.5903929", "0.58833...
0.57892996
28
The purpose of this function is to establish a link between a role and an account.
function linkRoleAndAccount() { showSpinner("modalSpinnerRoleAccountLink"); var baseUrl = getClientStore().baseURL; var accessor = objCommon.initializeAccessor(baseUrl, cellName); var context = objCommon.initializeAbstractDataContext(accessor); var selectedAccountName = getSelectedAccount(); if (selectedAccount...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "linkAccount() {}", "getRole(){}", "addLink(name1, name2, ...domain) {\n return __awaiter(this, void 0, void 0, function* () {\n if (domain.length === 1) {\n name1 = domain[0] + '::' + name1;\n name2 = domain[0] + '::' + name2;\n }\n else if ...
[ "0.68544006", "0.6160994", "0.5906481", "0.58073115", "0.5794487", "0.5790085", "0.5781932", "0.57218605", "0.56809163", "0.56750983", "0.5669419", "0.56586254", "0.56573164", "0.5654121", "0.56512207", "0.56512207", "0.5642305", "0.5637357", "0.5636402", "0.5614078", "0.5610...
0.79020995
0
The purpose of this function is to prevent drop down from loading values again on page reload.
function refreshAssignRoleToAccountDropDown() { var select = document.getElementById("ddlAccount"); select.options.length = 0; var newOption = document.createElement('option'); newOption.value = 0; newOption.innerHTML = getUiProps().MSG0349; select.insertBefore(newOption, select.options[-1]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hide_dropdown () {\n dropdown.hide().empty();\n selected_dropdown_item = null;\n }", "function hide_dropdown () {\n dropdown.hide().empty();\n selected_dropdown_item = null;\n }", "function hide_dropdown () {\n dropdown.hide().empty();\n selected_dropdow...
[ "0.63722324", "0.63722324", "0.63722324", "0.63722324", "0.63722324", "0.6279651", "0.6256814", "0.62562823", "0.6242329", "0.6184415", "0.6133396", "0.60908496", "0.60715604", "0.60688263", "0.60267353", "0.60106313", "0.6002865", "0.59873855", "0.59663194", "0.5964736", "0....
0.0
-1
The purpose of this function is to get account details.
function getAccountDetails() { var baseUrl = getClientStore().baseURL; var accessor = objCommon.initializeAccessor(baseUrl, cellName); var objAccountManager = new _pc.AccountManager(accessor); var count = retrieveAccountRecordCount(); var uri = objAccountManager.getUrl(); uri = uri + "?$orderby=__updated desc &...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getAccountInfo() {\n return request(`${this.locationPrefix}/account/info`, 'GET', this.config);\n }", "getAccountDetails(accountId) {\n if (lock.isBusy(accountId)) throwError('Service Unavailable', 503);\n this.logger.info('Getting account details...', accountId);\n return { ...accountDatabase[accou...
[ "0.777605", "0.7735324", "0.7587626", "0.7564656", "0.7540046", "0.73451453", "0.72396404", "0.72181654", "0.7174863", "0.71403074", "0.7081607", "0.7064088", "0.7012266", "0.69697165", "0.69510436", "0.6945026", "0.6945026", "0.69259775", "0.69259775", "0.6913862", "0.689998...
0.81442654
0
The purpose of this function is to fetch the values of selected account.
function getSelectedAccount() { var selectedAccount = null; var dropDown = document.getElementById("ddlAccount"); if (dropDown.selectedIndex > 0 ) { selectedAccount = dropDown.options[dropDown.selectedIndex].title; } return selectedAccount; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async get_user_accounts(uuid) {\n\n var accounts = await this.database.select('settings', {uuid: uuid, mainkey: 'accounts'});\n if (accounts.length == 0) \n return [];\n var result = [];\n accounts.forEach(item => {\n result.push(JSON.parse(item.value));\n }...
[ "0.65950304", "0.6452852", "0.641866", "0.6409474", "0.6372654", "0.6183645", "0.617839", "0.612343", "0.60811925", "0.60802615", "0.6059224", "0.6056813", "0.6042789", "0.6040416", "0.600646", "0.60057116", "0.5992154", "0.5989959", "0.5985031", "0.5955581", "0.5934494", "...
0.593495
20
The purpose of this function is to bind the account drop down.
function bindAccountDropDown() { refreshAssignRoleToAccountDropDown(); var jsonString = getAccountDetails(); var select = document.getElementById("ddlAccount"); for(var count = 0; count < jsonString.length; count++) { var option = document.createElement("option"); var objAccount = jsonString[count]; var accNa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fromAccountEditor(container, options) {\n $('<input type=\"text\" id=\"fromAccount\" data-bind=\"value:' + options.field + '\"/>')\n .appendTo(container)\n .kendoDropDownList({\n dataSource: accts,\n dataValueField: \"acct_id\",\n dataTextField: \"acc_name\",\n filter:...
[ "0.6681092", "0.65250826", "0.6184673", "0.6139529", "0.5928078", "0.5887253", "0.5883489", "0.58317494", "0.57201064", "0.57119083", "0.5690709", "0.56487626", "0.56298935", "0.5619462", "0.558349", "0.5551277", "0.5546708", "0.5542482", "0.554143", "0.5517587", "0.55083483"...
0.76237553
0
The purpose of this function is to create row for RoleAccountLink Table .
function createRowForRoleAccountLinkTable (dynamicRoleAccountLinkTable, count, accountName, accountNameToolTip, roleAccountLinkCount,etag) { dynamicRoleAccountLinkTable += '<td style="width:1%;"><input id = "txtRoleToAccountMappingEtagId'+roleAccountLinkCount+'" value='+etag+' type = "hidden" /><input title="'+roleAc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function linkRoleAndAccount() {\n\tshowSpinner(\"modalSpinnerRoleAccountLink\");\n\tvar baseUrl = getClientStore().baseURL; \n\tvar accessor = objCommon.initializeAccessor(baseUrl, cellName);\n\tvar context = objCommon.initializeAbstractDataContext(accessor);\n\tvar selectedAccountName = getSelectedAccount();\n\t...
[ "0.65086675", "0.60809565", "0.6076156", "0.60059786", "0.6003409", "0.5922895", "0.58949816", "0.5894353", "0.58892584", "0.583778", "0.57014096", "0.5598625", "0.5571991", "0.5543109", "0.55313545", "0.5517859", "0.550161", "0.5498573", "0.5476139", "0.54392195", "0.5406653...
0.73369634
0
The purpose of this function is to create dynamic table.
function createRoleToAccountMappingTableChunked(json, recordSize) { $('#checkAllRoleAccountAssign').attr('checked', false); objCommon.disableButton('#btnDeleteAssignRoleAccount'); var dynamicRoleAccountLinkTable = ""; refreshRoleToAccountMappingTable(); if(typeof json === "string"){ json = JSON.parse(json); if...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildTable(){\n\n}", "function createTable() {\r\n $tbody.innerHTML = \"\";\r\n \r\n var sighting, sightingKeys;\r\n var dom;\r\n var columnValue;\r\n \r\n for (var i = 0; i < ufoData.length; i++) {\r\n sighting = ufoData[i];\r\n sightingKeys = Object.keys(sighting);\r\n\t\r\n $dom = $tb...
[ "0.7603367", "0.73546827", "0.7234598", "0.72229373", "0.72229373", "0.71691644", "0.71551585", "0.71108264", "0.7102615", "0.70770615", "0.7014023", "0.6998332", "0.6969697", "0.6957641", "0.69339544", "0.69202214", "0.69063807", "0.68770236", "0.68696153", "0.68651366", "0....
0.0
-1
The purpose of this method is refresh pagination button on table reload.
function refreshRoleToAccountMappingTable() { $(".pagination").remove(); $(".dynamicRoleToAccountMappingRow").remove(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reload(count){\n objData.page = count;\n let tableBody = document.getElementById(\"tablebody\");\n tableBody.remove();\n loadPagination(objData.pageData,objData.page,objData.rows,false);\n}", "refreshPage() {\n $(\"#tableMasterHeader tr\").last().remove();\n this.drawFilterForT...
[ "0.71642977", "0.7072148", "0.6968735", "0.67806435", "0.66866535", "0.655507", "0.65487725", "0.65439963", "0.6519838", "0.65166414", "0.65166414", "0.6509913", "0.64792216", "0.64491165", "0.6446949", "0.6425985", "0.6410982", "0.6328126", "0.63129765", "0.6306949", "0.6306...
0.0
-1
The purpose of this method is to select all checkboxes on click of header checkbox.
function checkAllSelect(cBox){ var buttonId = '#btnDeleteAssignRoleAccount'; objCommon.assignEntityCheckBoxSelect(cBox, buttonId, '', 'chkBoxRoleAccountAssign', 49, document.getElementById("checkAllRoleAccountAssign")); objCommon.showSelectedRow(document.getElementById("checkAllRoleAccountAssign"),"row","rowidRoleAc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function selectALL(headerCheckbox, gridID, columnIndex) {\n var grid = el(gridID);\n var checkedStatus = headerCheckbox.checked;\n for (i = 0; i < grid.rows.length; i++) {\n var cell = grid.rows[i].cells[columnIndex];\n for (j = 0; j < cell.childNodes.length; j++) {\n //if childNo...
[ "0.7869593", "0.7459283", "0.730345", "0.71967727", "0.7156689", "0.7006257", "0.6985181", "0.6975682", "0.691222", "0.6862717", "0.68500024", "0.6782682", "0.67388844", "0.6719619", "0.67166007", "0.67128366", "0.6710745", "0.6668602", "0.66540706", "0.6653601", "0.66375303"...
0.0
-1
The purpose of this function is to display popup window for single or multiple delete
function openRoleAccountAssignPopUp(){ var response = objCommon.getMultipleSelections('mainRoleAccountLinkTable','input','case'); sessionStorage.accountNames = response; $('#roleAccountMultipleDeleteModalWindow').fadeIn(0); var windowHeight = $(window).height(); var windowWidth = $(window).width(); $('#roleAccoun...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function openDelete(){\n $('#modalWindow').css('display', 'block');\n $('#confirmDelete').css('display', 'block');\n var domElement = $(this).parent().parent();\n var id = $(domElement).attr(\"id\");\n $('#aceptDelete').click(function(){\n remove(id);\n clos...
[ "0.74816686", "0.71754014", "0.7170054", "0.69398427", "0.6933242", "0.69153535", "0.6863848", "0.6841914", "0.6800705", "0.6773075", "0.67669374", "0.672404", "0.6684549", "0.6684544", "0.6644143", "0.66273755", "0.66126096", "0.6600133", "0.6598976", "0.65917665", "0.654871...
0.0
-1
handle single/multiple mapping delete operation
function delRoleAccMapping() { showSpinner("modalSpinnerRoleAccountLink"); var etagIDOfPreviousRecord = "txtRoleToAccountMappingEtagId"; var arrEtag = new Array(); var etagValue = ''; var tableID = $('#mainRoleAccountLinkTable'); var idCheckAllChkBox = "#checkAllRoleAccountAssign"; if (!$(idCheckAllChkBox).is(':...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteIndividualMapping (req, res, next) {\n debug('DELETE /map/individual/:id')\n let id = req.params.id\n let populateId = req.query.populateId\n service.deleteIndividualMapping(id, populateId, (err) => {\n if (err) return next(err)\n res.end()\n })\n}", "function deleteIndividualMappingPro...
[ "0.6614524", "0.64045405", "0.633099", "0.6322968", "0.6303771", "0.6263999", "0.6257976", "0.62025166", "0.6063568", "0.6043552", "0.6008341", "0.60077906", "0.5993537", "0.59584796", "0.5941506", "0.5927249", "0.5894329", "0.58939964", "0.58800405", "0.5869265", "0.58662385...
0.5798375
27
core mapping delete operation
function deleteMapping(accountName){ var roleName = sessionStorage.roleName; var boxName = sessionStorage.boxName; var baseUrl = getClientStore().baseURL; var cellName = sessionStorage.selectedcell; var accessor = objCommon.initializeAccessor(baseUrl, cellName); var objLinkManager = new _pc.LinkManager(accessor)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "delete(key) {\n this.map[key] = undefined;\n if (this.store) this.store.removeItem(key);\n }", "delete(name) {\n\t\tname = `${name}`;\n\t\tvalidateName$1(name);\n\t\tconst key = find$1(this[MAP$1], name);\n\t\tif (key !== undefined) {\n\t\t\tdelete this[MAP$1][key];\n\t\t}\n\t}", "function deleteObjects...
[ "0.6545385", "0.6427694", "0.6398551", "0.6397614", "0.6372148", "0.63130695", "0.62968683", "0.62968683", "0.62968683", "0.62968683", "0.62968683", "0.62968683", "0.62968683", "0.62968683", "0.62968683", "0.62968683", "0.62968683", "0.62968683", "0.62968683", "0.62968683", "...
0.5707173
79
Following method fetches all role to account mapping data.
function retrieveAllRoleToAccountMappingJsonData() { var cellName = sessionStorage.selectedcell; var baseUrl = getClientStore().baseURL; var accessor = objCommon.initializeAccessor(baseUrl, cellName); var objRoleManager = new _pc.RoleManager(accessor); var uri = objRoleManager.getUrl(); var mainBoxValue = getUiPr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function retrieveAllRoleData() {\n\tvar baseUrl = getClientStore().baseURL;\n\tvar cellName = sessionStorage.selectedcell;\n\tvar totalRecordCount = retrieveRoleRecordCount();\n\tvar accessor = objCommon.initializeAccessor(baseUrl, cellName);\n\tvar objRoleManager = new _pc.RoleManager(accessor);\n\tvar dataUri = ...
[ "0.65687424", "0.6448371", "0.62792474", "0.6246176", "0.6150045", "0.61097026", "0.60648334", "0.6059374", "0.60483223", "0.6042561", "0.603044", "0.6021135", "0.60135525", "0.6008964", "0.5968289", "0.596045", "0.5936162", "0.5920313", "0.5914445", "0.58645296", "0.58348167...
0.77815014
0
gets or sets whether or not to output debugging information
get debugMode() { return this.state.debugMode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get debug() {\n return this.args.debug || false;\n }", "function isDebug() {\n return debug;\n }", "toggleDebugMode() {\n debug = !debug;\n }", "set debug(val) {\n this._debug = val;\n }", "setDebug() {\n this.debug = true;\n }", "get enableOutputDebugL...
[ "0.74305516", "0.7075523", "0.70492566", "0.703477", "0.7027851", "0.70135325", "0.69663334", "0.68702036", "0.6769723", "0.67269903", "0.66920197", "0.6682624", "0.66759574", "0.6578888", "0.6553525", "0.6548383", "0.6518362", "0.64328074", "0.64099556", "0.6393574", "0.6393...
0.6476405
17
gets the remaining number of characters to lex.
get remainingCharCount() { return (this.state.sourceEnd - this.state.sourcePosition); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function yylength() {\n return zzMarkedPos-zzStartRead;\n }", "get length() {\n // Assume that every newline is a keystroke, and that whitespace is stripped.\n const lines = this.code.split('\\n');\n const total_characters = lines.map(line => line.trim().length).reduce((a, b) => a + b);\...
[ "0.6397194", "0.6171551", "0.60145146", "0.5949375", "0.59050155", "0.57819504", "0.57313", "0.57233655", "0.57233566", "0.57106346", "0.5701549", "0.5683376", "0.5632092", "0.56273687", "0.5613082", "0.5594138", "0.5589553", "0.55763423", "0.5559112", "0.55547446", "0.552459...
0.66093636
0
gets or sets the lexers current position within the buffer
get position() { return this.state.sourcePosition; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Assign_Lex_Stack() {\r\n}", "function lex(source) {\n\t var prevPosition = 0;\n\t return function nextToken(resetPosition) {\n\t var token = readToken(source, resetPosition === undefined ? prevPosition : resetPosition);\n\t prevPosition = token.end;\n\t return token;\n\t };\n\t}", "current...
[ "0.5881039", "0.58107567", "0.58024263", "0.58023363", "0.5762304", "0.573632", "0.5677994", "0.56269467", "0.5626037", "0.558941", "0.5577596", "0.55675435", "0.555145", "0.5509954", "0.5496742", "0.5479962", "0.5462529", "0.5460409", "0.54294574", "0.54090816", "0.5390113",...
0.0
-1
gets or sets the start position of a line
get lineBegin() { return this.state.lineBegin; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "moveToLineStart() {\n if (isNullOrUndefined(this.start)) {\n return;\n }\n this.updateBackwardSelection();\n this.start.moveToLineStartInternal(this, false);\n this.end.setPositionInternal(this.start);\n this.upDownSelectionLength = this.start.location.x;\n ...
[ "0.7399883", "0.7071564", "0.6999726", "0.6941755", "0.6923312", "0.68684757", "0.6714184", "0.66374683", "0.6633332", "0.6633332", "0.6628789", "0.6626464", "0.6617487", "0.64359456", "0.63464034", "0.63046265", "0.6269799", "0.6224132", "0.6220393", "0.6209861", "0.6206895"...
0.70273304
2
gets or sets the current line number
get lineNumber() { return this.state.lineNumber; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get lineNumber() {\n return this._lineNum;\n }", "function go_to(line_number) {\r\n\tPC = line_number;\r\n}", "line() { return this.program.currentLine(); }", "get lastLineNumber() {\n\t\treturn this.state.lastLineNumber;\n\t}", "getRealCurrentLineNb() {\n return this.currentLineNb + this.offs...
[ "0.70945853", "0.69195205", "0.67659694", "0.6533633", "0.63856494", "0.6310914", "0.62657857", "0.60936296", "0.6089324", "0.60836506", "0.60381556", "0.6008719", "0.5987539", "0.5964146", "0.5964146", "0.5935785", "0.58972174", "0.58419317", "0.5838695", "0.5836861", "0.582...
0.7019483
1
gets or sets the last line number
get lastLineNumber() { return this.state.lastLineNumber; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get lineNumber() {\n return this._lineNum;\n }", "line() { return this.program.currentLine(); }", "evictOldestLine() {\r\n let lineNum = this.findOldestLine()\r\n let line = this.cacheLines[lineNum]\r\n this.setState(lineNum, States.INVALID)\r\n return lineNum\r\n }", "get lineNumber() {...
[ "0.6205543", "0.61743677", "0.61476016", "0.61470574", "0.60536826", "0.6030459", "0.59852123", "0.59842396", "0.5979981", "0.59798187", "0.59798187", "0.59798187", "0.59798187", "0.59798187", "0.59798187", "0.59798187", "0.59798187", "0.59798187", "0.59798187", "0.59798187", ...
0.7119459
0
gets the last token location
get lastTokenLocation() { return this.state.lastTokenLocation; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get lastTokenKind() {\n\t\treturn this.state.lastTokenKind;\n\t}", "function lastToken() {\n let tokens = currentInput.returnInputString().split(\"\");\n let lastOpPos = 0;\n\n // Find last operator\n for (let i = 0; i < tokens.length; i++) {\n if (tokens[i] == '+' || tokens[i] == '-' || token...
[ "0.73372906", "0.7192669", "0.71253425", "0.6778825", "0.6778825", "0.6748933", "0.67426366", "0.6703748", "0.6703445", "0.6703344", "0.6692748", "0.66917574", "0.6636246", "0.6622704", "0.6545323", "0.6545323", "0.65264183", "0.6448517", "0.6439864", "0.6434464", "0.6396048"...
0.83526975
0
gets the last token kind
get lastTokenKind() { return this.state.lastTokenKind; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTokenKindDesc(kind) {\n\t return tokenDescription[kind];\n\t}", "function getTokenKindDesc(kind) {\n return tokenDescription[kind];\n}", "function getTokenDesc(token) {\n\t var value = token.value;\n\t return value ? token.kind + ' \"' + value + '\"' : token.kind;\n\t}", "function getTokenDes...
[ "0.7269946", "0.71493167", "0.67956424", "0.67956424", "0.6693954", "0.6684279", "0.66434735", "0.6631184", "0.6606307", "0.6606307", "0.6606307", "0.6606307", "0.6606307", "0.6606307", "0.6606307", "0.6606307", "0.6606307", "0.6606307", "0.6606307", "0.65539354", "0.65539354...
0.84478736
0
gets the last generated error
get error() { return this.state.error; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getLastError () {\n\t\tlet lastAttempt = this.attempts[this.attempts.length - 1];\n\n\t\treturn lastAttempt.error;\n\t}", "function getLastErrors() {\n return $errors;\n }", "function getError() {\n return _error;\n }", "function getError() {\n return _error;\n }", "function getError() {\n ...
[ "0.76170236", "0.75021094", "0.70345616", "0.70345616", "0.70345616", "0.70345616", "0.69638723", "0.67809546", "0.6564784", "0.6529553", "0.64804095", "0.6338912", "0.6338912", "0.63235354", "0.63092524", "0.620863", "0.617505", "0.6164409", "0.6114088", "0.61103183", "0.607...
0.57752776
36
gets whether or not there is a current line terminator
get hasLineTerminator() { return this.state.hasLineTerminator; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "eol() { return this.pos >= this.string.length; }", "function peekLineTerminator() {\n var pos, line, start, found;\n \n pos = index;\n line = lineNumber;\n start = lineStart;\n skipComment();\n found = lineNumber !== line;\n index = ...
[ "0.75604576", "0.7555088", "0.74789685", "0.744874", "0.744874", "0.744874", "0.744874", "0.744874", "0.744874", "0.744874", "0.744874", "0.744874", "0.744874", "0.744874", "0.744874", "0.744874", "0.744874", "0.744874", "0.744874", "0.744874", "0.744874", "0.744874", "0....
0.7909986
0
gets whether or not we've reached the end
get isEnd() { return (this.state.sourcePosition >= this.state.sourceEnd); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get eof() { return this._pointer >= this._length; }", "isEOF() {\n return this._cursor === this._string.length;\n }", "eof(): boolean {\n return this.position >= this.input.length;\n }", "function eof() {\n return peek() == null;\n }", "function eof() {\n return peek() == \"\";\n ...
[ "0.75489604", "0.752334", "0.7433251", "0.73416644", "0.7334177", "0.72711855", "0.7184892", "0.7172197", "0.71698666", "0.71144027", "0.7026212", "0.70246345", "0.70246345", "0.687789", "0.6804597", "0.67381704", "0.6736259", "0.6673552", "0.658095", "0.6577391", "0.6521777"...
0.6970718
13
gets whether or not the next token is a colon
get isNextTokenColon() { while(!this.isEnd) { var nextChar = this.peekChar(0); if(jsc.TextUtils.isWhitespace(nextChar) || jsc.TextUtils.isLineTerminator(nextChar)) { this.position++; continue; } break; } return (this.getChar() === ':'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isTokenSeparated(stream) {\n return stream.sol() ||\n stream.string.charAt(stream.start - 1) == \" \" ||\n stream.string.charAt(stream.start - 1) == \"\\t\";\n }", "function needsSpaceAfter(token, lastToken) {\n if (lastToken) {\n if (lastToken.type.isLoop) {\n ...
[ "0.6739908", "0.6718738", "0.64266515", "0.64266515", "0.6416057", "0.62820834", "0.6277017", "0.62445706", "0.61209303", "0.6119514", "0.6074126", "0.5974652", "0.5974652", "0.5974652", "0.5974652", "0.5974652", "0.5974652", "0.5974652", "0.5974652", "0.5974652", "0.5974652"...
0.81287384
0
gets whether or not the last known token is a completion keyword
get isLastTokenCompletionKeyword() { return (this.state.lastTokenKind === jsc.Token.Kind.CONTINUE || this.state.lastTokenKind === jsc.Token.Kind.BREAK || this.state.lastTokenKind === jsc.Token.Kind.RETURN || this.state.lastTokenKind === jsc.Token.Kind.THROW); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function expectContextualKeyword(keyword){return expectKeyword(keyword,true);} // Return true if the next token matches the specified punctuator.", "firstToken({token, counter}) {\n\t\tif (['letter', 'especial'].includes(token.name)) {\n\t\t\tthis.listener.candidates = this.listener.candidates.filter(c=> c.name ...
[ "0.62604344", "0.6242728", "0.6118266", "0.6106542", "0.60599047", "0.6020958", "0.5904167", "0.5874977", "0.58706844", "0.5849836", "0.58325243", "0.58169526", "0.5748478", "0.5736845", "0.56865734", "0.5685552", "0.5678667", "0.567008", "0.5669117", "0.5667635", "0.5662497"...
0.8219692
0
Helper method for defining associations. This method is not a part of Sequelize lifecycle. The `models/index` file will call this method automatically.
static associate(models) { // The same subcategory can belong to many categories this.belongsTo(models.category, { onDelete: "CASCADE", onUpdate: "CASCADE", }); // The same subcategory can belong to many products this.belongsToMany(models.product, { through: "produ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static associate(models) {\n // define association here\n // This is how Sequelize knows to create \"magic methods\"\n // These are functions that can automatically pull\n // related data.\n // For example: If I have a User object\n // I can call `await user.getContacts()` to get an\n...
[ "0.76423585", "0.75082916", "0.7312812", "0.7307368", "0.7307368", "0.7307368", "0.7294376", "0.7284563", "0.72789294", "0.725985", "0.725985", "0.725985", "0.725985", "0.725985", "0.725985", "0.725985", "0.725985", "0.725985", "0.725985", "0.725985", "0.725985", "0.725985"...
0.0
-1
Initialize visualization (static content, e.g. SVG area or axes)
initVis(){ var vis = this; // SVG drawing area vis.svg = d3.select("#" + vis.parentElement).append("svg") .attr("width", vis.width + vis.margin.left + vis.margin.right) .attr("height", vis.height + vis.margin.top + vis.margin.bottom) vis.g = vis.svg.append("g") ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initialize() {\n\t\t\n\t\tsvg = scope.selection.append(\"svg\").attr(\"id\", scope.id).style(\"overflow\", \"visible\").attr(\"class\", \"vizuly\");\n\t\tbackground = svg.append(\"rect\").attr(\"class\", \"vz-background\");\n\t\tdefs = vizuly2.util.getDefs(viz);\n\t\tplot = svg.append('g');\n\t\t\n\t\tsco...
[ "0.7641312", "0.7542249", "0.7237688", "0.72324556", "0.70952517", "0.69963396", "0.6953897", "0.69417226", "0.6807744", "0.6788094", "0.674666", "0.6708852", "0.66413724", "0.66304123", "0.6593033", "0.6518457", "0.650021", "0.64990413", "0.6490314", "0.64448506", "0.6400012...
0.6282947
29
Gets index of largest value in an array
function getLargestValueInIndex(arr) { var largestIndex = -1; var largestValue = -Infinity; for (var i = 0; i < arr.length; i++) { if (arr[i] > largestValue) { largestValue = arr[i]; largestIndex = i; } } return largestIndex; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function indexHighestNumber(arr) {\n var big = -Infinity\n arr.forEach(function(ele){\n if(ele > big) {\n big = ele\n }\n })\n return a.lastIndexOf(\"big\")\n}", "function maxIndex(array) {\n let maxIndex = 0;\n for (let i = 1; i < array.length; i++) {\n if (array[i] > array[maxIndex]...
[ "0.8349244", "0.8142139", "0.8046111", "0.80445457", "0.8004059", "0.7955044", "0.7944675", "0.79206884", "0.79160166", "0.79091513", "0.78409725", "0.78229237", "0.78071535", "0.7781214", "0.77785665", "0.7773124", "0.77715415", "0.77122164", "0.7699763", "0.7685437", "0.767...
0.83353907
1
Gets random mnist digit
function getRandomColorDigit() { return Math.floor(Math.random() * window.colors.length); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rand() {\r\n if(!gnt--) {\r\n prng(); gnt = 255;\r\n }\r\n return r[gnt];\r\n }", "function r(){return Math.random().toString().slice(2,7)}", "function randomNBit(n) {\n return Math.floor(Math.random() * 2 ** n);\n}", "function randomizer(mn, mx){\n //Generate our random number...
[ "0.6314377", "0.617904", "0.6160162", "0.6147155", "0.61377203", "0.61341655", "0.6125418", "0.60827416", "0.60691077", "0.6064815", "0.6061933", "0.60502726", "0.6036088", "0.6020638", "0.6017905", "0.60038906", "0.60031134", "0.59735173", "0.5969524", "0.596854", "0.5960784...
0.5712739
66
renders an mnist digit on the dom
function renderMnistDigit(mnistDigit) { var mnistGrid = $('.mnist-grid'); mnistGrid.empty(); for (var i = 0; i < 28; i++) { var row = $('<div>', { 'class': 'mnist-row', }); for (var j = 0; j < 28; j++) { var cell = $('<div>', { class: 'mnist-cell', css: { 'opacity': mnistDigit[28 * i + j]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderNumber(number) {\n numberView.innerText = number\n}", "function renderNbColors() {\n const state = store.getState();\n // on lit le state\n const { nbColors } = state;\n\n // on le transpose vers une représentation le DOM\n document.getElementById('nbColors').innerHTML = `\n ${nbColors} c...
[ "0.5826919", "0.5784013", "0.57634145", "0.57199883", "0.55855954", "0.5511754", "0.55040187", "0.5433385", "0.54129845", "0.5388233", "0.53711164", "0.53231835", "0.5319564", "0.5292144", "0.52317554", "0.52187", "0.5210331", "0.5198824", "0.51902574", "0.5167616", "0.516534...
0.79120797
0
CONTROLLERS / Gets a new mnist digit and predicts on it
function getNewAiColor() { var digit = getRandomColorDigit(); var oneHotVector = net.run(digit).map(function (score) { return score.toFixed(4); // cull to 4 decimal places }); $('.guess-ai').text(getLargestValueInIndex(oneHotVector)); $('.mnist-one-hot-vector').text('[ ' + oneHotVector.join(' , ') + ' ]'); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function predictDigit() {\n // Copy the digit canvas into a 28 by 28 image\n let inputs = [];\n const smaller = createImage(28, 28, RGB);\n const img = DIGIT_UI.get();\n DIGIT_UI.width;\n smaller.copy(\n img,\n 0,\n 0,\n DIGIT_UI.width,\n DIGIT_UI.height,\...
[ "0.73178387", "0.63620317", "0.627866", "0.62588227", "0.62400526", "0.6213243", "0.61959124", "0.61671656", "0.6147146", "0.61428547", "0.6141915", "0.6140921", "0.6081252", "0.6021086", "0.6017137", "0.6011057", "0.5961515", "0.59610975", "0.5936403", "0.59293854", "0.59241...
0.53224176
89
This is ugly, but doing it for now
function setTopHeaderPosAndWith_chartType(chartType, newTabId) { switch (chartType) { case CANDLE_TYPE: $('#' + newTabId + ' .chartOptions .chartTypeOverlay > .chartoptions-horizontal-line:first-child').css({ width: '60px', left: '34px' }); break; case OHLC_TYPE: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "protected internal function m252() {}", "private public function m246() {}", "static private internal function m121() {}", "transient private protected internal function m182() {}", "static final private internal function m106() {}", "transient protected internal ...
[ "0.6231661", "0.6017679", "0.59108156", "0.5584916", "0.552196", "0.5511651", "0.53909814", "0.5298258", "0.52978534", "0.52132815", "0.52037174", "0.5174959", "0.51132506", "0.4982747", "0.4976825", "0.4957806", "0.49570757", "0.4921378", "0.49019435", "0.4874022", "0.486586...
0.0
-1
This is ugly, but doing it for now
function setTopHeaderPosAndWidth_timePeriodOvl(timePeriod) { switch (timePeriod) { case '1t': $('.chartOptions .timePeriodOverlay > .chartoptions-horizontal-line:first-child').css({ width : '85%', left : '40px'}); break; case '1m': case '2m': case '3m': ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "protected internal function m252() {}", "private public function m246() {}", "static private internal function m121() {}", "transient private protected internal function m182() {}", "static final private internal function m106() {}", "transient protected internal ...
[ "0.6231661", "0.6017679", "0.59108156", "0.5584916", "0.552196", "0.5511651", "0.53909814", "0.5298258", "0.52978534", "0.52132815", "0.52037174", "0.5174959", "0.51132506", "0.4982747", "0.4976825", "0.4957806", "0.49570757", "0.4921378", "0.49019435", "0.4874022", "0.486586...
0.0
-1
===== Subir Imagen ======
function CierraPopup() { $("#exampleModal").modal('hide');//ocultamos el modal $('body').removeClass('modal-open');//eliminamos la clase del body para poder hacer scroll $('.modal-backdrop').remove();//eliminamos el backdrop del modal }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static get tag(){return\"full-width-image\"}", "function PhotoArticleCover() {\n\n\n\n\t}", "function getMicromedia(mm){var div=document.createElement('sfandiv');div.insertAdjacentHTML('afterbegin','<a href=\"'+mm.url+'\" target=\"_blank\"><img src=\"'+mm.x1+'\"></a>');div.classList.add('micromedia');return di...
[ "0.6080151", "0.5896887", "0.5858176", "0.5813727", "0.58095616", "0.5807605", "0.5776887", "0.56875277", "0.5678835", "0.5660524", "0.56563544", "0.56544423", "0.56378776", "0.56368464", "0.563163", "0.5620076", "0.55871284", "0.55684423", "0.55587244", "0.55548906", "0.5544...
0.0
-1
Returns minutesWatched, minutesLeft Untested :D
function minutes_watched_minutes_left(startSeason, startEpisode, endSeason, endEpisode, showEpisodes) { startSeason = parseInt(startSeason); startEpisode= parseInt(startEpisode); endSeason = parseInt(endSeason); endEpisode= parseInt(endEpisode); startEpisode = startEpisode - 1; endEpisode = endE...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clockMinutes() {\n return this.state.work === true ? this.state.roundMinutes : this.state.breakMinutes;\n }", "function minutesLeft(scheduledTime) {\r\n var ms_left = scheduledTime - Date.now();\r\n var min = ms_left / 1000 / 60 << 0;\r\n var sec = ms_left / 1000 % 60 << 0;\r\n var separato...
[ "0.7003648", "0.696363", "0.6832282", "0.6804259", "0.66892195", "0.64642376", "0.6399139", "0.6372508", "0.63294715", "0.632402", "0.62195647", "0.6205043", "0.6157405", "0.61526394", "0.6132646", "0.60787773", "0.60772204", "0.6062111", "0.6026845", "0.60213023", "0.5933929...
0.6740882
4
! Vue.js v2.5.3 (c) 20142017 Evan You Released under the MIT License.
function r(t){return void 0===t||null===t}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "mounted() {\n }", "mounted() {\n\n }", "mounted() {\n\n }", "constructor() {\n this.vue = new Vue();\n }", "mounted() {\n /* eslint-disable no-console */\n console.log('Mounted!');\n /* eslint-enable no-console */\n }", "created () {\n\n }", "created () {...
[ "0.6957408", "0.6913287", "0.6889057", "0.6555996", "0.65002364", "0.6373458", "0.6373458", "0.63344127", "0.6330941", "0.6319449", "0.6305348", "0.6304008", "0.6235681", "0.6223058", "0.62219125", "0.6186615", "0.6184996", "0.61694735", "0.6164115", "0.6164115", "0.61602294"...
0.0
-1