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
get modal element from paper reference
function getModal(paperReference) { return document.querySelector("." + paperReference + " div.modal"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getModalFromChild(object) {\n let paperReference = object.closest(\".paper-entry\").classList[1];\n return getModal(paperReference);\n}", "get modal() {\n\t\treturn this.nativeElement ? this.nativeElement.modal : undefined;\n\t}", "function getTheModal(){\n\tvar opened_modal = $(this).parent().c...
[ "0.7285821", "0.65862083", "0.646401", "0.6370188", "0.6358823", "0.6358823", "0.6358823", "0.63361967", "0.61017084", "0.60788536", "0.59703785", "0.5947432", "0.5931418", "0.59108675", "0.5884135", "0.5864098", "0.58427775", "0.5833992", "0.5827947", "0.581324", "0.5790146"...
0.85199314
0
get modal element from child object
function getModalFromChild(object) { let paperReference = object.closest(".paper-entry").classList[1]; return getModal(paperReference); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showModalFromChild(object) {\n let modal = getModalFromChild(object);\n modal.style.display = \"block\"; \n}", "function getModal(paperReference) {\n return document.querySelector(\".\" + paperReference + \" div.modal\");\n}", "function getTheModal(){\n\tvar opened_modal = $(this).parent()...
[ "0.7340285", "0.68848133", "0.68777215", "0.6785697", "0.666921", "0.6492391", "0.61838704", "0.6171611", "0.6110998", "0.6054862", "0.6054862", "0.6054862", "0.6028333", "0.59240407", "0.59132475", "0.5845037", "0.5823473", "0.57686096", "0.5762775", "0.5722409", "0.5706877"...
0.8069023
0
MODAL SHOW AND HIDE FUNCTIONS show selected modal
function showModal(reference) { let modal = getModal(reference); modal.style.display = "block"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showModal()\n{\n\tdocument.getElementById('modal-backdrop').classList.toggle('hidden');\n\tif(document.getElementById('leave-comment-modal')) {\n\t\tdocument.getElementById('leave-comment-modal').classList.toggle('hidden');\n\t}\n\tif(document.getElementById('create-location-modal')) {\n\t\tdocument.getEl...
[ "0.7324453", "0.7302274", "0.7231999", "0.7223394", "0.72060215", "0.7044064", "0.70323753", "0.70310503", "0.7006359", "0.6982633", "0.6967182", "0.6943693", "0.6900948", "0.68778354", "0.68627506", "0.68541515", "0.68539286", "0.6853538", "0.6849911", "0.68479556", "0.68442...
0.0
-1
show modal from child object
function showModalFromChild(object) { let modal = getModalFromChild(object); modal.style.display = "block"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hideModalFromChild(object) {\n let modal = getModalFromChild(object);\n modal.style.display = \"none\"; \n}", "show(){\n\t\tthis.modalShadow.show();\n\t\tthis.modalBody.show();\n\t}", "function modalShown(o){\n\t\t/*\n\t\tif(o.template){\n\t\t\t//show spinner dialogue\n\t\t\t//render o.templa...
[ "0.723301", "0.6776144", "0.67386186", "0.66572094", "0.6645827", "0.6643823", "0.66213304", "0.66123766", "0.6561453", "0.6549659", "0.65103936", "0.6474351", "0.6456413", "0.64412975", "0.6399767", "0.6390583", "0.6360367", "0.633449", "0.6332986", "0.63272977", "0.63224727...
0.84058785
0
hide modal from child object
function hideModalFromChild(object) { let modal = getModalFromChild(object); modal.style.display = "none"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "modify () {\n\n // Hide modal\n this.modal.hide();\n }", "hide(){\n\t\tthis.modalShadow.hide();\n\t\tthis.modalBody.hide();\n\t}", "function showModalFromChild(object) {\n let modal = getModalFromChild(object);\n modal.style.display = \"block\"; \n}", "function hideModal() {\n ...
[ "0.7401275", "0.72952724", "0.71897745", "0.71350884", "0.71350884", "0.7108357", "0.7031957", "0.7018402", "0.6935231", "0.6924533", "0.68758047", "0.6832175", "0.6788268", "0.6759292", "0.67446154", "0.67419106", "0.67193115", "0.67163116", "0.66717947", "0.6665066", "0.665...
0.84676975
0
TAB SHOW AND HIDE FUNCTIONS toggle active tab
function toggleTabFromChild(object, tab) { // get modal let modal = getModalFromChild(object); // get modal-container let modalContainer = modal.querySelector(".modal-container"); // get active buttons from .modal-tab-picker let activeButtons = modalContainer.querySelectorAll(".modal-tab-pi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toggle(){\n if (active_tab){\n if (active_tab.active) \n active_tab.hide();\n else\n active_tab.show();\n } \n }", "static toggleTab(activeBtn) {\n const menu = [\"tabMenuPolygons\", \"tabMenuNetwork\"];\n const tab = [\"tabSidebarMap\", \...
[ "0.8604011", "0.74240446", "0.7363057", "0.73540616", "0.72909534", "0.7255974", "0.72202027", "0.7190948", "0.71270955", "0.70949244", "0.70791185", "0.70777375", "0.7070739", "0.7020719", "0.70183605", "0.70151114", "0.7008078", "0.6992362", "0.6992088", "0.6980617", "0.698...
0.0
-1
TAB BUTTON ACTION FUNCTIONS copy tabcontent body contents
function copyContents(object) { // get tab contents let modalTabContent = object.closest('.modal-tab-content').querySelector('.modal-tab-content-body'); // obtain inner html from element let content = modalTabContent.innerHTML; // copy to clipboard navigator.clipboard.writeText(content); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function copyTabSources() {\n text = \"\";\n sourceBuffer.forEach((elem) => {\n text += \n elem.repoId + \"\\t\" +\n elem.sourceId + \"\\t\" +\n elem.linesInFile + \"\\t\" +\n elem.sourceUrl + \"\\n\"\n });\n textArea = document.getElementById(\"copyTe...
[ "0.6641212", "0.63850695", "0.63536465", "0.6349923", "0.62365526", "0.6190674", "0.6169435", "0.6164172", "0.6149079", "0.61148226", "0.61105037", "0.60998124", "0.6094765", "0.60712063", "0.6041946", "0.600591", "0.5998548", "0.59697443", "0.5944087", "0.5937542", "0.592682...
0.73084825
0
INITIALIZATION FUNCTONS initialize modals
function initializeModals() { // get paper references let paperReferences = getPaperReferences(); // for each paper reference: for (let i = 0; i < paperReferences.length; i++) { // populate modal with information relative to paper reference // populateModal(paperReferences[i]); // add event listener ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initModalDialog () {\n initSubmitButton();\n initClickToClose();\n initKeyboardInput();\n}", "function initModal(){\n setModalControllerData('languages', $scope.languages);\n setModalControllerData('services', $scope.services);\n setModalControllerData('softwares', $scope.s...
[ "0.78274524", "0.7472206", "0.7404506", "0.7211822", "0.70115703", "0.69277924", "0.6926204", "0.6914322", "0.6903587", "0.6876188", "0.68644154", "0.67468715", "0.67164814", "0.66546583", "0.6653051", "0.65951884", "0.65360725", "0.648052", "0.646022", "0.64573133", "0.64506...
0.71644163
4
NOT USED fill modal with information
function populateModal(paperReference) { // get selected modal let modal = getModal(paperReference); // get modal text element let modalText = modal.querySelector("div.modal-content div.modal-content-body"); // get bib file contents let content = paperReference; // write contents modalTe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showModal() {\n\n $('#myModal').modal(\"show\");\n $(\".modal-title\") .text(data.name)\n $(\".modal-li-1\") .text(\"Accuracy: \" + data.accuracy)\n $(\".modal-li-2\").text(\"PP: \" + data.pp)\n $(\".modal-li-3\").text(\"Power: \" + data.power)\n $(\".modal-li-4\"...
[ "0.7490001", "0.7382923", "0.7249928", "0.7167227", "0.7120543", "0.711737", "0.70710695", "0.70396835", "0.6985353", "0.69828653", "0.6959527", "0.6937576", "0.6931766", "0.6917938", "0.6902853", "0.6898952", "0.6877195", "0.68628657", "0.68612844", "0.68601066", "0.6840224"...
0.0
-1
Obtiene el tipo de objeto.
function $type(obj) { if (obj.nodeType) { switch(obj.nodeType) { case 1: return "element"; break; case 3: return "textnode"; break; case 9: return "document"; break; } } if (obj.item && obj.length) return "collection"; if (obj.nodeName) return obj.nodeName; if (obj.sort) return "ar...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function type(obj){\n\treturn Object.prototype.toString.call(obj).match(/^\\[object (.*)\\]$/)[1]\n }", "getType(){return this.__type}", "getType() {}", "get type() {}", "function gettype(obj) {\n var type = typeof obj;\n\n if (type !== 'object') {\n return type;\n }\n\n // inspect [[Class]] for ...
[ "0.69986796", "0.69879144", "0.68447495", "0.67933726", "0.67760754", "0.67760754", "0.67760754", "0.67760754", "0.67760754", "0.67760754", "0.67760754", "0.67760754", "0.67760754", "0.67760754", "0.67760754", "0.67760754", "0.67760754", "0.67760754", "0.67760754", "0.67760754"...
0.6593377
20
Obtiene el primer elemento Ok.
function $pick() { for (var i=0,l=arguments.length; i<l; i++) { if ($chk(arguments[i])) return arguments[i]; } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ok() {\n controlHasSuccess(element, 1000);\n }", "isOk() {\n return false;\n }", "function ok() {\n return true\n }", "isOk() {\n return true;\n }", "function ok() {\n return true\n }", "isOk() {\n return this.value !== void 0\n }", "function handl...
[ "0.6387607", "0.63462096", "0.6276821", "0.6206274", "0.61114085", "0.59409744", "0.58039016", "0.57841057", "0.57841057", "0.57841057", "0.57841057", "0.57841057", "0.57841057", "0.57841057", "0.57841057", "0.57841057", "0.57841057", "0.57841057", "0.57164985", "0.56789714", ...
0.0
-1
Copia las propiedades del elemento origen al destino.
function $extend(destiny, source) { if (!$defined(destiny) || !$defined(source)) return destiny; for (var prop in source) { if (destiny.prototype) destiny.prototype[prop] = source[prop]; else destiny[prop] = source[prop]; } return destiny; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function copyProps(src, dst) {\n for (var key in src) {\n dst[key] = src[key];\n }\n }", "function copyProps(src, dst) {\n for (var key in src) {\n dst[key] = src[key];\n }\n }", "function copyProps(src, dst) {\n for...
[ "0.56176805", "0.56140465", "0.55858344", "0.55665576", "0.54939175", "0.53753895", "0.5367381", "0.5364178", "0.5363499", "0.5363499", "0.5363499", "0.53494877", "0.53494877", "0.53494877", "0.53494877", "0.53494877", "0.5337819", "0.5337819", "0.5337819", "0.5337819", "0.53...
0.0
-1
Obtiene una copia del elemento.
function $copy(obj) { switch($type(obj)) { case "object": var copyObj = new Object(); for (var prop in obj) copyObj[prop] = $copy(obj[prop]); break; case "array": var copyObj = new Array(); for (var i=0,l=obj.length; i<l; i++) copyObj[i] = $copy(obj[i]); break; default: var co...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function copyElement(){\r\n\tUtil.hideMenu();\r\n\tglobalCopyObj = currentObject;\r\n\t//$(\"div_paste_option\").show();\r\n}", "function copyelement(copyButton) {\n\n var elementToCopy = copyButton.closest(\".el-e\");\n var copiedElement = elementToCopy.clone();\n\n copiedElement.find('.copybutton').cl...
[ "0.7009429", "0.67085457", "0.6355443", "0.62978333", "0.624315", "0.62202847", "0.6083374", "0.6083374", "0.6047751", "0.60464084", "0.60442996", "0.5985104", "0.5959171", "0.5939087", "0.5874076", "0.58641523", "0.5859047", "0.5845709", "0.5814744", "0.5793557", "0.5784393"...
0.0
-1
Obtiene un numero entre min y max aleatorio.
function $random(min, max) { return Math.floor(Math.random() * (max - min + 1) + min); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function numeroAleatorio(min, max) {\n var numero = Math.random() * (max - min) + min;\n var entero = Math.round(numero);\n return entero;\n }", "function obterNumeroAleatorioEntre(min, max) {\n const valor = Math.random() * (max - min) + min\n return Math.floor(valor)\n}", "function Num...
[ "0.7417673", "0.7390686", "0.7266114", "0.72104144", "0.70882046", "0.7035636", "0.700753", "0.6969196", "0.6958549", "0.6898063", "0.68869644", "0.68523693", "0.6818988", "0.68177044", "0.68009377", "0.6768626", "0.6761813", "0.67613065", "0.6711742", "0.6711536", "0.6703374...
0.0
-1
Obtiene el TimeStamp del sistema.
function $timeStamp() { return new Date().getTime(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTimeStamp() {\n\treturn Date.now();\n}", "function getTimeStamp() {\n var now = new Date();\n return now.getTime();\n }", "function getTimeStamp() {\n var now = new Date();\n return now.getTime();\n }", "function getTimeStamp() {\n\t\t\tvar now = new Date...
[ "0.7743084", "0.7668575", "0.76454294", "0.7641178", "0.7641178", "0.7641178", "0.76278925", "0.75114197", "0.73923254", "0.73446226", "0.73334926", "0.73232144", "0.73232144", "0.72697115", "0.7221687", "0.7210347", "0.7149158", "0.71326125", "0.706534", "0.70586187", "0.704...
0.678272
32
Obtiene la fecha actual del sistema. Se puede especificar un offset opcional.
function $time(days) { days = days || 0; var date = new Date(); date.setTime(date.getTime() + (days*24*3600*1000)); return date; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getFechaActual(){\r\n\t\tvar fecha= new Date();//obtengo la fecha del dispositivo\r\n\t\t\r\n\t\tvar mes=parseInt(fecha.getMonth())+1;\r\n\t\tvar cadenaFecha= fecha.getDate()+'/'+mes+'/'+ fecha.getFullYear();\r\n\t\treturn cadenaFecha;\r\n\t}", "function fechaActual(){\n var fecha = new Date();\n var...
[ "0.64686716", "0.6179699", "0.5918127", "0.5905451", "0.5809391", "0.5788766", "0.57233185", "0.5716562", "0.570837", "0.56087875", "0.559695", "0.5530483", "0.5420173", "0.53411216", "0.53204304", "0.53204304", "0.5299797", "0.52781785", "0.52779675", "0.5255901", "0.5242179...
0.0
-1
Obtiene el/los elementos con ids especificados.
function $(obj) { if (arguments.length > 1) { for (var i=0, r=[], l=arguments.length; i<l; i++) { r[i] = ($type(arguments[i]=="string"))? document.getElementById(arguments[i]) : arguments[i]; if (r[i] && !r[i].$proFunObj) r[i] = $extend(r[i], $elementMethods); } return r; } var extObj = (...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function carregarIdElementosPagina() {\n\tarrayIdsElementsPage = new Array;\n\tfor (form = 0; form <= document.forms.length; form++) {\n\t\tvar formAtual = document.forms[form];\n\t\tif (formAtual != undefined) {\n\t\t\tfor (i = 0; i < document.forms[form].elements.length; i++) {\n\t\t\t\tif (document.forms[form]....
[ "0.6598909", "0.6579004", "0.6370837", "0.62596565", "0.6248112", "0.62261397", "0.61123836", "0.6080163", "0.6052281", "0.6036001", "0.60179085", "0.5991103", "0.59794396", "0.5915938", "0.5898969", "0.589556", "0.5827686", "0.5821387", "0.5817657", "0.5803076", "0.57928157"...
0.0
-1
Obtiene el/los valores de los elementos con names especificados.
function $V(obj) { if (arguments.length > 1) { for (var i=0, r=[], l=arguments.length; i<l; i++) { r[i] = ($type(arguments[i])=="string")? document.getElementById(arguments[i]).value : arguments[i].value; } return result; } return ($type(obj)=="string")? document.getElementById(obj).value : ob...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getNames() {\n return this.getAttribute(\"name\")\n }", "nameElements() {\n for (const propName in this) {\n const propValue = this[propName];\n if (propValue instanceof UiElement) {\n propValue.setName(propName);\n }\n }\n }", "static getAllElementValues()\n\t{\n\t\tlet ...
[ "0.6427294", "0.6397829", "0.59081787", "0.58305204", "0.5803617", "0.57976407", "0.5789381", "0.5684964", "0.56142354", "0.5613511", "0.55968475", "0.5563503", "0.5557352", "0.5551763", "0.5520626", "0.5507071", "0.5506818", "0.5506818", "0.54866177", "0.5470904", "0.5432167...
0.0
-1
Obtiene el primer elemento con ese nombre.
function $N(name) { return document.getElementsByName(name)[0]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getElement(name, index = 0) {\n return (this._elements[name] || this._makeElements(name))[index];\n }", "function nombre_alumno(num){\n\t\treturn alumnos[num].nombre;\n\t}", "function getName(elem){return elem.name;}", "get nombre(){\n\t\treturn this._nombre\n\t}", "function getName(element){\n ...
[ "0.5839519", "0.5788697", "0.5761321", "0.57509375", "0.5702241", "0.5661852", "0.56195676", "0.55824435", "0.5559725", "0.547937", "0.54570246", "0.54570246", "0.54570246", "0.54570246", "0.54570246", "0.54570246", "0.54570246", "0.54429215", "0.5441819", "0.5439116", "0.543...
0.5957684
0
Crea un elemento del tipo indicado.
function $createElement(objType) { return $(document.createElement(objType)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeElement(type) {\n\t\treturn document.createElement(type);\n\t}", "function createSimpleElement(p_type,p_id,p_class) {\n\telement = document.createElement(p_type);\n\tif (p_id!=undefined)\n\t\telement.id = p_id;\n\tif (p_class!=undefined)\n\t\telement.className = p_class;\n\treturn element;\n}", "f...
[ "0.66321415", "0.6427808", "0.6297965", "0.6254858", "0.62086874", "0.6204054", "0.6176344", "0.61543286", "0.61543286", "0.6149943", "0.61289495", "0.6048925", "0.6020985", "0.6001186", "0.5975584", "0.5952862", "0.59380263", "0.5889118", "0.5885813", "0.58735067", "0.585330...
0.588012
19
Asigna el evento DOMLoaded con la funcion.
function $observeDOM(fHandle) { if (document.addEventListener) { document.addEventListener("DOMContentLoaded", fHandle, false); } else { document.onreadystatechange = function() { if (document.readyState == "complete") fHandle(); }; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function constroiEventos(){}", "function setUpOnEventoElemento (idElemento, evento, funcao) {\r\n\tsetUpEventos (\"\", idElemento, evento, funcao,\"\");\r\n}", "onEvent() {\n \n }", "function fireDOMOperation() {\n\t\t\t\t\t\t\t\tif (!fireDOMOperation.hasBeenRun) {\n\t\t\t\t\t\t\t\t\tfireDOMOperation.hasBee...
[ "0.67349225", "0.60974497", "0.60635644", "0.60408956", "0.60338545", "0.5967508", "0.59431785", "0.59043586", "0.5891176", "0.5891176", "0.5891176", "0.5888445", "0.58792573", "0.58792573", "0.58792573", "0.5857031", "0.58440083", "0.58004403", "0.578362", "0.5672174", "0.56...
0.0
-1
Detiene el evento. Disponible solo dentro de la funcion que lanza el evento.
function $stopEvent(e) { if (e.preventDefault) e.preventDefault(); else e.returnValue = false; if (e.stopPropagation) e.stopPropagation; else e.cancelBubble = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function constroiEventos(){}", "function holaMundo() {\n // esta funcion se convertira en una manejadora de eventos es deir que es una fcuncion que se ejecuta en un evento\n alert(\"Hola Mundo\");\n console.log(event);\n }", "oqnEvent () {\n this.skipInfect = 1\n }", "function conocerEvento(e)\...
[ "0.6864123", "0.6553639", "0.6102898", "0.60587054", "0.60480493", "0.6027152", "0.60238224", "0.60238224", "0.60238224", "0.60238224", "0.60238224", "0.60189164", "0.59749144", "0.59066", "0.5889244", "0.5853265", "0.5850712", "0.5850712", "0.582466", "0.5776192", "0.5775667...
0.0
-1
Detiene la propagacion del evento. Disponible soloo dentro de la funcion que lanza el evento.
function $stopEventPropagation(e) { if (e.stopPropagation) e.stopPropagation; else e.cancelBubble = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function evitarPropagacionEventos() {\n if (event.stopPropagation) {\n event.stopPropagation();\n } else {\n event.cancelBubble = true;\n }\n}", "oqnEvent () {\n this.skipInfect = 1\n }", "function Event () {\n this.propagationStopped = false;\n this.stopPropagation = stopPropa...
[ "0.68738985", "0.60722136", "0.57877296", "0.57877296", "0.57593656", "0.57593656", "0.57593656", "0.57593656", "0.5707539", "0.5707539", "0.5707539", "0.5707539", "0.566367", "0.55750173", "0.55319965", "0.55239016", "0.55239016", "0.5518479", "0.5518479", "0.55107296", "0.5...
0.0
-1
Obtiene el tipo de evento. Disponible solo dentro de la funcion que lanza el evento.
function $getEventType(e) { return e.type; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get eventType() {\n return this._eventData.event_type;\n }", "get eventType() {\n return this._eventData.event_type;\n }", "getEventType() {\n return this.eventType;\n }", "function Event(type) {\n \n /**\n * Tipo de evento\n */\n this.type =...
[ "0.74001276", "0.74001276", "0.71188873", "0.7055984", "0.6843013", "0.67513686", "0.65995544", "0.6479561", "0.64509004", "0.64096326", "0.6395026", "0.63813275", "0.6286759", "0.62825835", "0.62669414", "0.6173561", "0.6013163", "0.59314936", "0.5924574", "0.59194136", "0.5...
0.7481317
0
Obtiene la tecla que se ha pulsado. Disponible solo dentro de la funcion que lanza el evento.
function $getEventKey(e) { return e.which || e.keyCode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function principal() {\n choquecuerpo();\n choquepared();\n dibujar();\n movimiento();\n \n if(cabeza.choque (comida)){\n comida.colocar();\n cabeza.meter();\n } \n}", "function constroiEventos(){}", "function PlcEvento (){\r\n\t\r\n}", "function pulsaTecla(e){\n\tif(getOp...
[ "0.6477782", "0.6420899", "0.6219925", "0.6157598", "0.6093721", "0.60013866", "0.5686926", "0.5646583", "0.5644795", "0.56418365", "0.56307745", "0.56282103", "0.56060535", "0.5595022", "0.5581985", "0.5565418", "0.5533891", "0.55128324", "0.55108434", "0.5499139", "0.548837...
0.0
-1
Obtiene el elemento que tiene asociado el evento. Disponible solo dentro de la funcion que lanza el evento.
function $getEventSource(e) { return e.srcElement || e.target; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function constroiEventos(){}", "function conocerEvento(e)\n{\n\n\tvar evento = e || window.event;\n\n\t\t//document.getElementById(\"evento\").value = e.type;\n\n // console.log(\"evento\");\n // console.log(e);\n\n if(evento.type == \"click\")\n {\n\n //console.log(\"nombre del click\");\n ...
[ "0.6128408", "0.60527927", "0.5946733", "0.58005774", "0.5781355", "0.57063174", "0.5678112", "0.5659303", "0.5659303", "0.5659303", "0.5655138", "0.5650681", "0.56246096", "0.5616114", "0.56100106", "0.5573762", "0.5572038", "0.55606407", "0.554045", "0.55361223", "0.5535376...
0.0
-1
Obtiene el elemento desde donde viene el raton (mouseover). Disponible solo dentro de la funcion que lanza el evento.
function $getEventFromTarget(e) { return e.relatedTarget || e.fromElement; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async elementMouseOver(e) {\n this.cancelEvent(e);\n const el = e.target;\n if (el) {\n this.selectedInstance = await this.ctx.api.getElementComponent(el);\n }\n highlighter_1.unHighlight();\n if (this.selectedInstance) {\n highlighter_1.highlight(thi...
[ "0.71672684", "0.71274275", "0.70226055", "0.70047647", "0.6974097", "0.6962224", "0.6752773", "0.67384285", "0.6724617", "0.66352093", "0.66244507", "0.66228634", "0.657399", "0.6570365", "0.6564544", "0.6564544", "0.6558328", "0.65182954", "0.6483359", "0.6453433", "0.64359...
0.0
-1
Obtiene el elemento al que fue el raton (mouseout). Disponible solo dentro de la funcion que lanza el evento.
function $getEventToTarget(e) { return e.relatedTarget || e.toElement; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onElementMouseOut(event) {\n super.onElementMouseOut(event);\n\n const me = this;\n\n // We must be over the event bar\n if (\n event.target.closest(me.eventInnerSelector) &&\n me.resolveTimeSpanRecord(event.target) &&\n me.hoveredEventNode\n ) {\n // out to chi...
[ "0.7230798", "0.7185692", "0.6952326", "0.6877799", "0.67698485", "0.67348886", "0.67136884", "0.65976065", "0.6566461", "0.65502757", "0.6548155", "0.65099275", "0.64921063", "0.64765364", "0.64489615", "0.6448635", "0.64209634", "0.64179426", "0.641577", "0.6376963", "0.634...
0.0
-1
Obtiene la direccion de la rueda. Disponible solo dentro de la funcion que lanza el evento.
function $getEventWheel(e) { if (e.wheelDelta) return e.wheelDelta; if (e.detail) return e.detail; return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bindCurrentFolderPath() {\n\tconst load = (event) => {\n\t\tconst folderPath = event.target.getAttribute('data-path');\n\t\tloadDirectory(folderPath)();\n\t};\n\n\t// all folders and their paths\n\tconst paths = document.getElementsByClassName('path');\n\t// attach click event to each folder\n\tfor(let i ...
[ "0.59973454", "0.5633067", "0.55407536", "0.5453419", "0.5379219", "0.53571504", "0.53481233", "0.53479457", "0.5347781", "0.52931255", "0.52411044", "0.5232484", "0.52079153", "0.52005714", "0.514721", "0.51469016", "0.51409566", "0.51106536", "0.5101728", "0.509278", "0.508...
0.0
-1
Obtiene la coord. X del raton en las que se produjo el evento. Disponible solo dentro de la funcion que lanza el evento.
function $getMouseX(e) { var scrollX = $getScrollX(); if (e.pageX) return e.pageX + scrollX; if (e.clientX) return e.clientX + scrollX; return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "move(event){\n this.xyE = this.getXY(event);\n }", "function locationX(x) {\n rect = rect || getBoundingClientRect(responderEvent.currentTarget);\n if (rect) {\n return x - rect.left;\n }\n }", "function getPos_x(){\n return x;\n}", "getCoords(e){\n const {svgWidth,data} = th...
[ "0.6737103", "0.6691352", "0.6678932", "0.66423994", "0.6591236", "0.65675455", "0.65453184", "0.6528301", "0.6504965", "0.64953554", "0.6408539", "0.6406863", "0.6388932", "0.6322568", "0.6310093", "0.6304982", "0.6277895", "0.6263727", "0.6259821", "0.62409943", "0.6211083"...
0.0
-1
Obtiene la coord. Y del raton en las que se produjo el evento. Disponible solo dentro de la funcion que lanza el evento.
function $getMouseY(e) { var scrollY = $getScrollY(); if (e.pageY) return e.pageY; if (e.clientY) return e.clientY + scrollY; return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getYPos(event) {\n\tmouseYPos = event.clientY;\n}", "move(event){\n this.xyE = this.getXY(event);\n }", "getY() { return this.y; }", "movY() {\n\n this._deletPosition();\n this.pivote.row++;\n this.setBoardPosition();\n }", "getY() {\n return this.getLocati...
[ "0.65358025", "0.6309786", "0.61686087", "0.61263216", "0.6085234", "0.6072622", "0.5984945", "0.5958606", "0.59471476", "0.5940318", "0.59269816", "0.59054756", "0.5863773", "0.5829028", "0.5822838", "0.5797004", "0.57831454", "0.578067", "0.57454747", "0.5745324", "0.574435...
0.52697366
91
Obtiene el scroll en X del navegador.
function $getScrollX() { if (window.pageXOffset) return window.pageXOffset; if (document.body && document.body.scrollLeft) return document.body.scrollLeft; if (document.documentElement && document.documentElement.scrollLeft) return document.documentElement.scrollLeft; return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _scrollToX() {\r\n return scrollToObjX(this);\r\n}", "function xScroll(n){\nvar temp = n ? parseFloat(document.getElementById(\"xa\").value) + pan : parseFloat(document.getElementById(\"xa\").value) - pan;\ndocument.getElementById(\"xa\").value = temp;\npanX = temp;\nshow();\nabortRun();\nstartRun();\n...
[ "0.71295416", "0.66417605", "0.6631726", "0.6600752", "0.655655", "0.653094", "0.6500226", "0.6458488", "0.64329135", "0.63678765", "0.6343849", "0.62748396", "0.62282765", "0.62115", "0.62073517", "0.62073517", "0.62067133", "0.619818", "0.61566097", "0.614098", "0.6139489",...
0.65088016
6
Obtiene el scroll en Y del navegador.
function $getScrollY() { if (window.pageYOffset) return window.pageYOffset; if (document.body && document.body.scrollTop) return document.body.scrollTop; if (document.documentElement && document.documentElement.scrollTop) return document.documentElement.scrollTop; return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPageY(){\n var yScroll;\n if(self.pageYOffset){\n yScroll = self.pageYOffset;\n }\n else if (document.documentElement && document.documentElement.scrollTop) {\n yScroll = document.documentElement.scrollTop;\n } else if (document.body) {// all other Explorers\n yScroll = document.body.scro...
[ "0.7231262", "0.7079387", "0.7070775", "0.70474696", "0.7035684", "0.69604814", "0.68516886", "0.68437606", "0.6796242", "0.6789772", "0.67690164", "0.67595404", "0.6718391", "0.6666093", "0.66379863", "0.6632889", "0.65933096", "0.6569467", "0.6561366", "0.6539", "0.6431194"...
0.6880859
6
Constructor del objeto AJAX.
function $Ajax(uri, fHandler, method) { this.uri = uri || ""; this.fHandler = fHandler || null; this.method = method || "GET"; this.xmlHttp = false; try { this.xmlHttp = new XMLHttpRequest(); } catch(e) {} if (!this.xmlHttp) try { this.xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) {} if...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor() {\n this.config = Config.ajax;\n this.xhr;\n this.Serialize;\n }", "constructor () {\n this.xhr = new XMLHttpRequest(); //(AJAX ISLEMINI BASLATMAK ICIN XHR xhr objemizi olusturduk\n }", "function Ajax(title1, title2, text1, text2, id, url) {\n\tthis.title1 = tit...
[ "0.78008014", "0.7509623", "0.6980067", "0.6831721", "0.6824502", "0.6723281", "0.66789883", "0.6624757", "0.6599981", "0.65936655", "0.65674764", "0.65580344", "0.65580344", "0.6485691", "0.64761627", "0.6474121", "0.6418305", "0.6386771", "0.63572025", "0.6346371", "0.62995...
0.648776
13
Obtiene el arbol xml respecto del texto.
function $xmlParser(txt) { xmlObj = false; if (ActiveXObject("Microsoft.XMLDOM")) { xmlObj = new ActiveXObject("Microsoft.XMLDOM"); xmlObj.async = false; xmlObj.loadXML(txt); } if (DOMParser) { xmlParser = new DOMParser(); xmlObj = xmlParser.parserFromString(txt,"text/xml"); } retu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generarXml(datos) {\n var texto = [];\n texto.push('<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\\n');\n texto.push('<datos>\\n');\n texto.push('\\t<nombre>');\n texto.push(escaparXML(datos.nombre));\n ...
[ "0.6556618", "0.64471745", "0.6238961", "0.61984545", "0.6180584", "0.59880394", "0.59397584", "0.59395516", "0.5929001", "0.5884818", "0.5884818", "0.5870296", "0.5854674", "0.5854674", "0.5854674", "0.5854674", "0.58501196", "0.58501196", "0.58501196", "0.5840054", "0.58140...
0.0
-1
A function for handling what happens when the form to create a new comment is submitted
function handleFormSubmit(event) { event.preventDefault(); // Wont submit the post if we are missing a comment if (!comInput.val().trim()) { return; } // Constructing a newCom object to hand to the database let newCom = { comment: comInput.val().trim(), QuoteId: comInput.attr("...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function formHandler(event) {\n\t// prevent page refresh\n\tevent.preventDefault();\n\t// construct a new comment and POST to backend\n\tconst name = event.target.name.value;\n\tconst content = event.target.content.value;\n\tif (name !== \"\" && content !== \"\") {\n\t\tpostComment(event, {\n\t\t\tname: name,\n\t\...
[ "0.77604115", "0.73755264", "0.73521626", "0.7166669", "0.7045574", "0.70328647", "0.7015521", "0.70011514", "0.6978641", "0.6974951", "0.69460124", "0.68795925", "0.68221945", "0.6808464", "0.67995965", "0.6772456", "0.67579955", "0.67553025", "0.67520046", "0.67385656", "0....
0.7350331
3
part one move the ship
function moveShip(commands) { //ship starting position and direction let x = 0; let y = 0; let currentDirection = 90; commands.forEach(({ action, value }) => { switch (action) { case 'F': //move the ship in the direction it's heading x += value * ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onShipMove() {\n if (!hasStarted) {\n ball.setStartLeft(ship);\n tail.start(ball);\n }\n }", "move() {\n const skier = Players.getInstance(\"skier\").getPlayer(\"skier\");\n this.direction = skier.direction;\n if (!this.eating) {\n if (skier.checkIfSk...
[ "0.7251984", "0.7233214", "0.7208628", "0.7206158", "0.71691644", "0.71540534", "0.711445", "0.7106572", "0.7063861", "0.7055659", "0.7043016", "0.7011878", "0.6974924", "0.6947841", "0.69328433", "0.69246906", "0.69125605", "0.69125605", "0.69107646", "0.6886712", "0.6864117...
0.65983385
49
part two move the ship and waypoint
function moveWaypoint(commands) { //ship and waypoint starting position const ship = { x: 0, y: 0 }; let waypoint = { x: 10, y: -1 }; commands.forEach((command) => { switch (command.action) { //move the ship to the waypoint case 'F': ship.x += waypoint.x ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function move_forward () {\n\t\tvar ship = $('#ship');\n\t\t$(ship).stop();\n\t\tclearTimeout(t);\n\n\t\tif (t) {\n\t\t\tgravity_stop();\n\t\t}\n\n\t\tif (agent.webkit) {\n\t\t\tvar deg = $(ship).css(transformation_html);\n\t\t}\n\t\tif (agent.mozilla) {\n\t\t\tvar deg = $(ship).attr('style');\n\t\t}\n\t\tdeg = pa...
[ "0.68329036", "0.6733203", "0.6695058", "0.65266114", "0.65016115", "0.6468756", "0.6417456", "0.64124537", "0.6409208", "0.6406316", "0.6385028", "0.6366699", "0.63468343", "0.6330467", "0.6302257", "0.6264516", "0.6250737", "0.62413305", "0.6227876", "0.6226372", "0.6221813...
0.7309026
0
///// Update Grade ///////////////////////////////////
function updateGrade(){ var user_points = initPointObjectCategories(); var max_points = initPointObjectCategories(); $(ASSIGNMENT_TABLE_CSS_PATH +' > tr').each(function(){ var assignment = getAssignmentInfo($(this)); user_points[assignment['category']] += assignment['user_score']; max_points[assignm...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateGrade(newGrade){\n this.averageGrade = newGrade;\n }", "function grader (classId, assignmentId, studentId){\n let data = {grade: grade.value};\n if (isNaN(Number(data.grade)) || data.grade.length > 3) {\n return;\n }\n $.ajax({\n type: 'PUT',\n url: `/class/${clas...
[ "0.79334766", "0.7119826", "0.70313174", "0.69654876", "0.6828107", "0.6622859", "0.65840924", "0.6571651", "0.65660655", "0.6562062", "0.65440744", "0.645359", "0.64214873", "0.64140785", "0.62998104", "0.6210068", "0.6188737", "0.6184266", "0.6182181", "0.61671716", "0.6165...
0.7775243
1
Encode the properties of an object as if they were name/value pairs from an HTML form, using application/xwwwformurlencoded format
encodeFormData(data) { if (!data) return ""; const pairs = []; for (let name in data) { if (!data.hasOwnProperty(name)) continue; if (typeof data[name] === "function") continue; let value = data[name].toString(); name = encodeURIComponent(name.replace(/\s/g, "+")); value = enco...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "formEncode(obj) {\n var str = []\n for (var p in obj) {\n str.push(encodeURIComponent(p) + \"=\" + encodeURIComponent(obj[p]))\n }\n return str.join(\"&\")\n }", "function _formEncode(obj) {\n var jsonString = '';\n for (var key in obj) {\n if (jsonString.length !== 0) {\...
[ "0.77408546", "0.75681907", "0.67774844", "0.67395794", "0.6643516", "0.6633948", "0.6590666", "0.6572545", "0.656039", "0.656039", "0.6559387", "0.65588665", "0.65374887", "0.65374887", "0.64889663", "0.6463473", "0.64436483", "0.6433228", "0.64179575", "0.6414493", "0.63908...
0.6683192
4
Generated a randam characters, using 'Math.random()' method. $length: number of characters to be generated. added [ /+.,!$%&()~|_ ] to makeRandStr.
makeRandPassword(length) { const chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJLKMNOPQRSTUVWXYZ0123456789/*-+.,!#$%&()~|_'; let str = ''; for (let i = 0; i < length; ++i) { str += chars[Math.floor(Math.random() * 78)]; } return str; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generate(length) {\n\t\tvar result = '';\n\t\tvar characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';// 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n\t\tvar charactersLength = characters.length;\n\t\tfor ( var i = 0; i < length; i++ ) {\n\t\t result += characters.c...
[ "0.86776584", "0.86776584", "0.8377246", "0.8376866", "0.83691305", "0.83278465", "0.8319315", "0.8318894", "0.83134323", "0.8296819", "0.82791305", "0.8269011", "0.8263706", "0.82525456", "0.82499504", "0.823902", "0.81983733", "0.8190908", "0.8174026", "0.81643146", "0.8159...
0.83197457
6
Generated a randam characters, using 'Math.random()' method. $length: number of characters to be generated.
makeRandStr(length) { const chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJLKMNOPQRSTUVWXYZ0123456789'; let str = ''; for (let i = 0; i < length; ++i) { str += chars[Math.floor(Math.random() * 62)]; } return str; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generate(length) {\n\t\tvar result = '';\n\t\tvar characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';// 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n\t\tvar charactersLength = characters.length;\n\t\tfor ( var i = 0; i < length; i++ ) {\n\t\t result += characters.c...
[ "0.8495806", "0.8495806", "0.82785296", "0.8271105", "0.8270405", "0.82037926", "0.8151986", "0.8111113", "0.80838054", "0.80293727", "0.80269164", "0.8013102", "0.8005739", "0.80026245", "0.8002142", "0.7992341", "0.79876316", "0.7978066", "0.7968226", "0.79628825", "0.79023...
0.7826703
29
Generated a randam characters, using 'Math.random()' method. $length: number of characters to be generated.
makeRandInt(length) { const chars = '123456789'; let str = ''; for (let i = 0; i < length; ++i) { str += chars[Math.floor(Math.random() * 9)]; } return parseInt(str, 10); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generate(length) {\n\t\tvar result = '';\n\t\tvar characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';// 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n\t\tvar charactersLength = characters.length;\n\t\tfor ( var i = 0; i < length; i++ ) {\n\t\t result += characters.c...
[ "0.8496158", "0.8496158", "0.8279082", "0.82713145", "0.8269826", "0.82047486", "0.8152623", "0.811035", "0.80840605", "0.8029444", "0.8026714", "0.8012118", "0.80063736", "0.80022347", "0.80021447", "0.79928917", "0.7986059", "0.7978203", "0.79674345", "0.7963061", "0.790246...
0.7487663
86
once this equals beatHoldFrames, beatCutoff starts to decay. / ================ / CUSTOM FUNCTIONS / ================ / ================ / INPUT / ================
function createMic(){ //create new p5 audioIn object //remember to put this function in set up mic = new p5.AudioIn(); mic.start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function detectBeat(level)\n {\n if (level > beatCutoff && level > beatThreshold)\n {\n onBeat();\n beatCutoff = level * 1.2;\n framesSinceLastBeat = 0;\n } else\n {\n if (framesSinceLastBeat <= beatHoldFrames)\n {\n framesSinceLastBeat ++ ;\n ...
[ "0.58664197", "0.5737983", "0.5533135", "0.55049217", "0.5464054", "0.5380696", "0.51694715", "0.5153533", "0.50603074", "0.5050918", "0.50425905", "0.5028225", "0.50202304", "0.49979654", "0.4930461", "0.4906565", "0.49013695", "0.49013096", "0.48683617", "0.48557794", "0.48...
0.0
-1
========= / AMPLITUDE / =========
function createAmplitude() { // creates p5 amplitude constructor // remember to call this function in setup amplitude = new p5.Amplitude(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "capLatitudeInPlace() {\n const limit = 0.5 * Math.PI;\n this._radians0 = Geometry_1.Geometry.clampToStartEnd(this._radians0, -limit, limit);\n this._radians1 = Geometry_1.Geometry.clampToStartEnd(this._radians1, -limit, limit);\n }", "function precal_loc() {\n buffer_loc.forEach((obj)=...
[ "0.6396396", "0.63137645", "0.62771153", "0.61539924", "0.60698926", "0.593068", "0.5918016", "0.5897748", "0.58178407", "0.57951653", "0.57951653", "0.57951653", "0.57951653", "0.57951653", "0.57951653", "0.57951653", "0.57951653", "0.57951653", "0.5775148", "0.57692575", "0...
0.0
-1
========== / FFT / =========
function createFFT(smoothing,bins){ // remember to call this function in setup // creates new p5 FFT constructor fft = new p5.FFT(smoothing,bins); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function FFTM(x,y){this.x=x;this.y=y;}", "function FFTM(x,y){this.x=x;this.y=y;}", "function doFFT(values) {\n\tvar data = new complex_array.ComplexArray(values.length);\n\tdata.real = new Float32Array(values);\n\tvar frequencies = data.FFT();\n\n\treturn frequencies;\n}", "function FFT(){var _n=0,// order\n...
[ "0.7595073", "0.7595073", "0.7545465", "0.7507345", "0.74505204", "0.74097437", "0.7407541", "0.7206805", "0.719921", "0.6919126", "0.6829392", "0.681063", "0.6798424", "0.6798424", "0.6798424", "0.6798424", "0.6798424", "0.6798424", "0.6798424", "0.6798424", "0.6798424", "...
0.0
-1
Get : offline activities list
function get_offline_data() { var data = store.get("app_activities", []); return data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getOfflineActivities(nsp, callback) {\n storeGet(null, \"activities\", function(results) {\n\n if (results) {\n if (nsp) {\n nsp.emit('api', {activities: results});\n }\n\n if (callback) {\n callback(null, results);\n }\n ...
[ "0.78732246", "0.67558813", "0.6726444", "0.6612791", "0.65682197", "0.65270084", "0.64873725", "0.6353411", "0.6343048", "0.6238106", "0.6126688", "0.6121279", "0.60558563", "0.5970244", "0.59648466", "0.5956885", "0.5950729", "0.59474653", "0.5941771", "0.59340215", "0.5883...
0.76381135
1
Refresh SSR server session by reporting the tokens and get the current user info into Redux
async refreshSession() { try { let user = null; if (process.env.STATIC_SITE) { // in static export mode we don't have an SSR server // so we get the current user info by ourself user = await getCurrentUser( process.env.API_SERVER, await this.getAccessToken() ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "refresh() {\n const token = JSON.parse(this.getToken())\n Http.setHeader(token)\n this.whoami()\n store.commit('LoggedUser/loggedIn') \n }", "function refreshToken() {\n const currentUser = authenticationService.currentUserValue;\n const refresh_token = currentUser.refresh_to...
[ "0.7101091", "0.65007913", "0.6422341", "0.62859285", "0.6278336", "0.62675136", "0.6204147", "0.609793", "0.60763425", "0.6076006", "0.60425234", "0.6027078", "0.60206753", "0.6019674", "0.60026973", "0.5991893", "0.5989232", "0.59590304", "0.59505224", "0.5944348", "0.59098...
0.8289851
0
Subscription socket has connected
async onSubConnected() { if (process.env.NODE_ENV === "development") console.log("[Subscription] connected"); this.dispatch(appOperations.setSubscribed({ isSubscribed: true })); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onConnect() {\n // Once a connection has been made, make a subscription and send a message.\n console.log(\"onConnect\");\n client.subscribe(SUBSCRIBER);\n }", "function onConnect() {\n // Once a connection has been made, make a subscription and send a message.\n co...
[ "0.7298249", "0.7257592", "0.7244452", "0.7175296", "0.7147092", "0.71354735", "0.7106966", "0.70942396", "0.7043358", "0.701596", "0.6990847", "0.6986982", "0.6981646", "0.6980501", "0.6961234", "0.69439936", "0.6920884", "0.6905829", "0.69049114", "0.6891797", "0.6887077", ...
0.7361683
0
Subscription socket has reconnected
async onSubReconnected() { if (process.env.NODE_ENV === "development") console.log("[Subscription] reconnected"); this.dispatch(appOperations.setSubscribed({ isSubscribed: true })); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "reconnected() {\n this.subscribe(this.replica, this.path);\n }", "SOCKET_RECONNECT(state, count) {\n // console.log('ws重新连接')\n // console.info(state, count)\n if (state.socket.isConnected) {\n Message.success({\n content: 'websocket 重新连接成功',\n duration: 4\n ...
[ "0.73790294", "0.7197115", "0.7139408", "0.711594", "0.7111203", "0.7049942", "0.70465434", "0.6927033", "0.6879101", "0.67771316", "0.6764094", "0.6764094", "0.67426956", "0.6733414", "0.67230195", "0.67230195", "0.66881496", "0.6685268", "0.6685268", "0.66824365", "0.667457...
0.7525476
0
Subscription socket has disconnected
async onSubDisconnected() { if (process.env.NODE_ENV === "development") console.log("[Subscription] disconnected"); this.dispatch(appOperations.setSubscribed({ isSubscribed: false })); // there is no way with this transport to see why we are disconnected // so let's refresh tokens in case the re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "disconnectedCallback() {\n unsubscribe(this.subscription);\n this.subscription = null;\n }", "onDisconnected() {\n if (!this.connected) return\n this.multiplexer.stop()\n // We need to unset the id in order to receive an immediate response with new\n // client id when reconnecting.\n...
[ "0.73722255", "0.7264663", "0.7234247", "0.71719295", "0.7138196", "0.7113331", "0.7083911", "0.7074694", "0.7052405", "0.7005138", "0.69767445", "0.69767445", "0.69767445", "0.69767445", "0.69712514", "0.69649565", "0.6940461", "0.69105494", "0.69105494", "0.69105494", "0.69...
0.749791
0
An error in subsction socket
onSubError(error) { if (process.env.NODE_ENV === "development") { console.error( `[Subscription] error: ${ error.message ? error.message : JSON.stringify(error) }` ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function give_error_status(msg){\n global_socket.emit(\"error\",msg);\n}", "function error(err, socket) {\n socket.emit(\"err\", err);\n console.log(new Error(err));\n}", "_onSocketError(variable, evt) {\n variable._socketConnected = false;\n this.freeSocket(variable);\n // EVENT: ON_ER...
[ "0.7158265", "0.6929369", "0.69154847", "0.688691", "0.68604016", "0.68604016", "0.6858701", "0.6858701", "0.6858701", "0.6842986", "0.6801426", "0.67835957", "0.663276", "0.663276", "0.6615083", "0.6585306", "0.65801775", "0.6565783", "0.65149045", "0.6466355", "0.6417931", ...
0.0
-1
Function that is used for closing User Settings Menu visually and verbally with notifyScreenreader function. (Layout changed later in development, did not yet change variable names to account for it)
function closeLeftSideBar(){ notifyScreenreader("closed user settings"); removeSideBar("#leftSidebar", "#leftSidebarCollapse"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function closeSettingsPane() {\n // hide the settings screen\n $('#settingsPane').css('display', 'none');\n\n // Are we currently registered with the infrastructure?\n if (regState === 'Success') {\n // Yes! Show the main screen so the user can continue their session.\n $('#mainScreen')....
[ "0.6794439", "0.67066", "0.66663074", "0.6610101", "0.65560186", "0.65536535", "0.6539612", "0.6513684", "0.6510724", "0.6457353", "0.6451669", "0.6345361", "0.6326278", "0.6313933", "0.6289805", "0.62848157", "0.6275183", "0.6252586", "0.62138635", "0.61988163", "0.61976606"...
0.62545186
17
Function that is used for closing Accesibility Setting Menu visually and verbally with notifyScreenreader function. (Layout changed later in development, did not yet change variable names to account for it)
function closeCenterSideBar(){ notifyScreenreader("closed accessibility settings"); removeSideBar("#centerSidebar", "#centerSidebarCollapse"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handle_closing() {\n if (!this.app || !this.element) {\n return;\n }\n /* The AttentionToaster will take care of that for AttentionWindows */\n /* InputWindow & InputWindowManager will take care of visibility of IM */\n if (!this.app.isAttentionWindow && !this.app.isCallscreenWindow &&\n ...
[ "0.65707606", "0.6527861", "0.65205705", "0.65075433", "0.64329684", "0.6360008", "0.63558435", "0.6354019", "0.6343788", "0.63115174", "0.63100564", "0.62922704", "0.62921005", "0.6262286", "0.62437433", "0.6228807", "0.6223169", "0.6220887", "0.62121934", "0.6180027", "0.61...
0.6466631
4
Function that is used for closing My Schduler Menu visually and verbally with notifyScreenreader function. (Layout changed later in development, did not yet change variable names to account for it)
function closeRightSideBar(){ notifyScreenreader("closed my scheduler"); removeSideBar("#rightSidebar", "#rightSidebarCollapse"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function closeMenu() {\n g_IsMenuOpen = false;\n}", "function handleMenuClose() {\n setMenuOpen(null);\n }", "function closeMenuEvent() {\n // Vars\n var firstLevelMenuItem = '#tablet-mobile-menu ul.menu li a';\n var page = jQuery(\"body, html\");\n\n jQuery('#menu-btn-toggle').removeClass('open...
[ "0.7016332", "0.69045204", "0.67339116", "0.671548", "0.6679488", "0.6664256", "0.6592494", "0.6580661", "0.6578823", "0.6575171", "0.6552374", "0.6507874", "0.6497133", "0.647757", "0.64753765", "0.64683187", "0.6457001", "0.64473474", "0.6414734", "0.6399739", "0.6397421", ...
0.6110963
59
Function is used to hide using aria the current page when transitioning to a respective side menu.
function hideContentPage(){ $("#user-menu").attr("aria-hidden", "true"); $("#footer").attr("aria-hidden", "true"); $("#content").attr("aria-hidden", "true"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hideNav() {\r\n if (isNavVisible === true) {\r\n noNav();\r\n\r\n } else {\r\n yesNav();\r\n }\r\n}", "function hideNav() {\n if(isNavVisible === true) {\n noNav();\n\n } else {\n yesNav();\n }\n}", "function hide_navi(){\n document.querySelecto...
[ "0.69547975", "0.6930161", "0.6829797", "0.6794773", "0.67333025", "0.6616989", "0.6594613", "0.65839964", "0.6571012", "0.6559379", "0.63885415", "0.63172853", "0.6299876", "0.6297079", "0.6215084", "0.61911136", "0.6186089", "0.6163768", "0.6159702", "0.6157071", "0.6129416...
0.72318834
0
Function is used to show by disabling ariahidden of the current page when transitioning back to current page from sidebar.
function showContentPage(){ $("#user-menu").attr("aria-hidden", "false"); $("#footer").attr("aria-hidden", "false"); $("#content").attr("aria-hidden", "false"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hideContentPage(){\n $(\"#user-menu\").attr(\"aria-hidden\", \"true\");\n $(\"#footer\").attr(\"aria-hidden\", \"true\");\n $(\"#content\").attr(\"aria-hidden\", \"true\");\n}", "showToScreenReader() {\n this.adapter_.removeAttr(strings$f.ARIA_HIDDEN);\n }", "showToScreenReader() {\n t...
[ "0.7235411", "0.70955455", "0.70200634", "0.6995458", "0.69849724", "0.68869513", "0.6850281", "0.6535772", "0.6353729", "0.6327765", "0.63060725", "0.62587816", "0.62422866", "0.62357754", "0.62212414", "0.6195283", "0.61877453", "0.61804837", "0.6161833", "0.616085", "0.613...
0.7238688
0
Function is used to toggle side bar of body of page.
function toggleBodySidebar(){ $("body").toggleClass("no-scroll"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toggleSideBar() {\n document.getElementById('sidebar').classList.toggle('active');\n}", "toggleSidebar() {\n let sidebar = Ember.$('.ui.sidebar.main.menu');\n sidebar.sidebar('toggle');\n\n if (Ember.$('.inverted.vertical.main.menu').hasClass('visible')) {\n Ember.$('.sidebar.ic...
[ "0.78063536", "0.7702415", "0.7700599", "0.7643452", "0.76033425", "0.75960743", "0.75232065", "0.75066704", "0.75060767", "0.7466487", "0.7433229", "0.7423922", "0.7359382", "0.7357902", "0.7302357", "0.72941095", "0.72728604", "0.7268145", "0.7240566", "0.72155184", "0.7201...
0.80174685
0
Function is used to close any sidemenu that may currently be open. It will check each sidemenu and close them accordinly by calling their respective close method.
function closeMenus(){ if($('#rightSidebar').hasClass('active')){ closeRightSideBar(); } else if($('#leftSidebar').hasClass('active')){ closeLeftSideBar(); } else if($('#centerSidebar').hasClass('active')){ closeCenterSideBar(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function closeAll() {\n\t\t\t$.each( menuItems, function( index ) {\n\t\t\t\tmenuItems[index].close();\n\t\t\t});\n\t\t}", "function closeAllMenus() {\r\n hideOverlay();\r\n closeMobileCart();\r\n closeMobileCustomerMenu();\r\n closeMobileMainMenu();\r\n closeFilterMenu();\r\n}", "function close...
[ "0.7683905", "0.7433945", "0.7352252", "0.732467", "0.7066912", "0.70035595", "0.69598556", "0.68453157", "0.6843279", "0.68408036", "0.6775075", "0.67547315", "0.6742419", "0.673747", "0.67284656", "0.6713614", "0.67130953", "0.66812575", "0.6652089", "0.663915", "0.6635741"...
0.730443
4
Function is used to reinitilize the heading of the accesibility sidebar specifying what the current font size is visually. If the screen size has not yet been intilized it is defaulted to zero.
function setCurrentFontDisplay(){ if(zoomedIn == ""){ zoomedIn = 0; } $('#current-font-size')[0].innerHTML = "Current Font Size: " +currentFontSizeArr[zoomedIn]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setupMainMenu() {\n mainMenuFontHeight = height;\n mainMenuFontAlpha = 0;\n}", "function adjustTextSize(){\n /* var size = 0;\n console.log(\"screen \" + screen.width());\n console.log(\"expre \" + screenExpression.width());\n if(screenExpression.width() > screen.width()){\n size = (screen.widt...
[ "0.6183005", "0.61546504", "0.6145995", "0.60710555", "0.60282695", "0.60278356", "0.58924955", "0.5883538", "0.5795472", "0.5780446", "0.5702817", "0.57018983", "0.5700628", "0.5693327", "0.56562096", "0.5591462", "0.55879706", "0.55687976", "0.5552228", "0.55472785", "0.554...
0.60766405
3
Function is used to toggle CSS class that is used to overlay Gray filter over page.
function toggleGraystyle(){ $(document.documentElement).toggleClass("gray-style-filter"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toggleInvertColor(){\n $(document.documentElement).toggleClass(\"inverse-style-filter\");\n}", "function ToggleFilter(){\n canvas.classList.toggle(\"filter\");\n}", "function clickFilter() {\n document.getElementById(\"myFilter\").classList.toggle(\"show\");\n}", "function showBlack(){\n\tdoc...
[ "0.7337384", "0.7152026", "0.6455387", "0.6437388", "0.6381199", "0.63552433", "0.63409984", "0.6309568", "0.62871534", "0.62717783", "0.6215687", "0.6190555", "0.61774844", "0.6161372", "0.61366457", "0.6115814", "0.61148673", "0.6102267", "0.61013484", "0.609616", "0.605520...
0.78541005
0
Function is used to toggle CSS class that is used to overlay Inverse filter over page.
function toggleInvertColor(){ $(document.documentElement).toggleClass("inverse-style-filter"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ToggleFilter(){\n canvas.classList.toggle(\"filter\");\n}", "function toggleGraystyle(){\n $(document.documentElement).toggleClass(\"gray-style-filter\");\n}", "function clickFilter() {\n document.getElementById(\"myFilter\").classList.toggle(\"show\");\n}", "function filter() { //Maakt de fu...
[ "0.7191173", "0.70816153", "0.68510246", "0.66976184", "0.6398555", "0.6394361", "0.6372487", "0.63531005", "0.62881446", "0.62798905", "0.6265326", "0.6226383", "0.6180527", "0.6150607", "0.61260587", "0.6097026", "0.6093038", "0.60852265", "0.604665", "0.6038132", "0.602744...
0.7597866
0
Function is used to turn switch current filter to GrayStyle if it is not already on. It does so by removing the current filter that is on while toggling the toggleGrayStyle() function and announcing the change using the toggleAriaButtonPress() function.
function turnOnGrayStyle(){ if(currentColorSetting != "GrayStyle") { removeCurrentColorSetting(); toggleGraystyle(); currentColorSetting = "GrayStyle"; toggleAriaButtonPress('#color-scheme-b-o-w'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function filterChange() {\n // console.log('filterChange');\n\n SvgModule.Data.Tag.style.filter = Common.getFiltersCss(\n PageData.Controls.Brightness.value,\n PageData.Controls.Contrast.value,\n PageData.Controls.Hue.value,\n PageData.Controls.Saturation.value);\n}", "function toggleGraystyle(){\n...
[ "0.6504973", "0.6495759", "0.62715226", "0.62067133", "0.6100658", "0.5937852", "0.5900007", "0.58909625", "0.58883584", "0.5888183", "0.5884352", "0.5848525", "0.5832143", "0.5791065", "0.57861096", "0.57679087", "0.57561654", "0.5749016", "0.57365036", "0.57164377", "0.5704...
0.697979
0
Function is used to turn switch current filter to none if a filter is already placed. It does so by removing the current filter that is on while using the removeCurrentColorSetting() function that removes any filter currenlty on. It then uses the toggleAriaButtonPress() function to announce the change for screen reader...
function turnOnColorDefault(){ if(currentColorSetting != "Default") { removeCurrentColorSetting(); currentColorSetting = "Default"; toggleAriaButtonPress('#color-scheme-default'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function filterResetClick() {\n // console.log('filterResetClick');\n\n PageData.Controls.Brightness.value =\n PageData.Controls.Brightness.defaultValue;\n PageData.Controls.Contrast.value =\n PageData.Controls.Contrast.defaultValue;\n PageData.Controls.Hue.value =\n PageData.Controls.Hue.defaultValue...
[ "0.6160704", "0.6094861", "0.60778713", "0.6023177", "0.59941924", "0.5860589", "0.58251023", "0.5823512", "0.58176833", "0.57659024", "0.5757625", "0.5739471", "0.57318956", "0.57120097", "0.5709089", "0.5708264", "0.56941015", "0.56906897", "0.56487405", "0.56381196", "0.56...
0.0
-1
Function is used to turn switch current filter to Inverse if it is not already on. It does so by removing the current filter that is on while toggling the toggleInvertColor() function and announcing the change using the toggleAriaButtonPress() function.
function turnOnInverseStyle(){ if(currentColorSetting != "Inverse") { removeCurrentColorSetting(); toggleInvertColor(); currentColorSetting = "Inverse"; toggleAriaButtonPress('#color-scheme-inverse'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "invert() {\n this.addEffect(new Effects.Invert());\n }", "function updateAllFilters({ invert = false }) {\n\t\t$$(\".gff-filter .btn\").forEach(el => {\n\t\t\tconst ext = el.dataset.ext;\n\t\t\tif (ext !== \":toggle\") {\n\t\t\t\tconst modeBool = invert ? !settings[ext] : settings[ext];\n\t\t\t\tsettin...
[ "0.69251937", "0.67794037", "0.66675854", "0.6525848", "0.642723", "0.6186046", "0.6153665", "0.6085019", "0.6074593", "0.6073049", "0.59446573", "0.59436846", "0.5933421", "0.5923649", "0.5871653", "0.582187", "0.5814337", "0.58068204", "0.5772552", "0.5770757", "0.573319", ...
0.7101686
0
Functin is used to remove any filters that are currently on. It does so by checking which of the filters is currently on. Once it finds that filter, it calls the respective toggle function to turn it off and announcing so using the toggleAriaButtonPress function.
function removeCurrentColorSetting(){ if(currentColorSetting == "Inverse"){ toggleInvertColor(); toggleAriaButtonPress('#color-scheme-inverse'); } else if(currentColorSetting == "GrayStyle"){ toggleGraystyle(); toggleAriaButtonPress('#color-scheme-b-o-w'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toggleFilters(){\n // show filter area by adding open class\n filterArea.style.display = \"block\";\n filterBar.classList.toggle('open');\n // changes burger menu to close image\n burgerMenu.src = \"img/close-button.svg\";\n burgerMenu.alt = \"Hide Filters\";\n // add new eventListener to close fil...
[ "0.68680227", "0.6676929", "0.64972126", "0.64671236", "0.64394933", "0.64305556", "0.64157075", "0.6412376", "0.6384496", "0.6373031", "0.63548344", "0.63548344", "0.63499296", "0.6299777", "0.62920535", "0.6268765", "0.6242639", "0.6224565", "0.62134415", "0.62082267", "0.6...
0.0
-1
Function is used to change the size of multiple tags to increase size of layout on the main screen.
function changeFontScreen(){ changeSize("#content", fontSizeStyle, fontSizeArr[zoomedIn]); changeSize("form", fontSizeStyle, fontSizeArr[zoomedIn]); changeSize("h2", fontSizeStyle, h2FontSizeArr[zoomedIn]); changeSize("#innerContent h3", fontSizeStyle, h3FontSizeArr[zoomedIn]); changeSize(":checkbo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resizeIt(magnification)\r\n\r\n{var new_layout_width=(original_size.w*magnification)+layout_width_offset;\r\n layout.style.width=new_layout_width.toString()+\"px\";\r\n embed_tag.setAttribute(\"width\",original_size.w*magnification);\r\n\r\n embed_tag.setAttribute(\"height\",original_size.h*magnification)...
[ "0.6573783", "0.6555658", "0.653157", "0.653157", "0.64953774", "0.6446406", "0.6440377", "0.64117336", "0.6383271", "0.6378052", "0.6358455", "0.6342375", "0.63423014", "0.6333623", "0.6315476", "0.6289482", "0.62734526", "0.6255671", "0.62532747", "0.624552", "0.6228541", ...
0.6226075
21
Function is used when user accesses application. If a cookie is not already in session, it creates one for user with default 'zoom in' and filter settings. Else the cookie exists and the method extracts the information from it to attach the proper 'zoom in' and color filter the user previously used.
function onloadCook(){ if(getCookie("zoomedIn") != undefined){ zoomedIn = getCookie("zoomedIn"); console.log(zoomedIn) currentColorSetting = getCookie("currentColorSetting"); if(currentColorSetting == "GrayStyle"){ toggleGraystyle(); } else if(currentColo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadCookies()\n{\n var cookies = document.cookie.split(';');\n for (var i = 0; i < cookies.length; i++)\n {\n var c = cookies[i];\n while (c.charAt(0) == ' ')\n c = c.substring(1);\n\n var val = parseInt(c.substring(5, c.length));\n if (val == NaN)\n ...
[ "0.7184066", "0.69123155", "0.5943327", "0.590031", "0.58934796", "0.5579136", "0.5530923", "0.5516137", "0.54697686", "0.5437272", "0.54239446", "0.5406872", "0.53595966", "0.5344054", "0.5288743", "0.52531105", "0.52277786", "0.519871", "0.51639897", "0.51476145", "0.513012...
0.70682174
1
Function is used when the one of the following ids ['increasefont', 'decreasefont', 'increasefont'] are clicked, the respective clickEvent will change the global variable that contains the current size setting. onFontChange will adjust the new currentSizing by calling the respective methods that adjusts sizes.
function onFontChange(){ changeFontScreen(); setCurrentFontDisplay(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onIncreaseFontSize() {\n increaseFontSize()\n let elFont = document.querySelector('.font-size-display')\n elFont.innerHTML = gMeme.currText.size\n draw()\n}", "function onDecreaseFontSize() {\n decreaseFontSize()\n let elFont = document.querySelector('.font-size-display')\n elFont.i...
[ "0.7306604", "0.70560783", "0.70259374", "0.69037294", "0.69031626", "0.683902", "0.67690134", "0.6727295", "0.6723044", "0.67208105", "0.6713253", "0.6632053", "0.66168684", "0.65953976", "0.65952516", "0.65903586", "0.65644014", "0.6465415", "0.6460145", "0.6446493", "0.644...
0.66853356
11
removes "range" and "loc"
function scrub(obj) { if (Array.isArray(obj)) { return obj.map(function (item) { return scrub(item); }); } else if (typeof obj === 'object') { for (var key in obj) { if (!obj.hasOwnProperty(key)) continue; if (key === 'range' || key === 'loc') { delete obj[key]; } else { ob...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function $qQQH$var$mapWithoutIndex(range) {\n return {\n start: range.start,\n end: range.end\n };\n}", "RemoveRange() {\n\n }", "function mapWithoutIndex(range){return{start:range.start,end:range.end};}", "function mapWithoutIndex (range) {\n return {\n start: range.start,\n end: range.end...
[ "0.6922759", "0.6749963", "0.6652663", "0.65778315", "0.65778315", "0.65778315", "0.65778315", "0.65778315", "0.65778315", "0.65778315", "0.65778315", "0.65778315", "0.65778315", "0.65778315", "0.65778315", "0.65778315", "0.65778315", "0.65778315", "0.6564807", "0.6554565", "...
0.6259374
22
Creates api based upon the provided profile, which can be "dev", "production" or "test". If profile is not provided, then the mode property in serverconfig is used instead
static createClientApi(profile) { if (! profile) { profile = serverconfig.mode.value; } const factoryApiSettings = serverconfig.factory[profile].client; return new factoryApiSettings.typeClass(factoryApiSettings.opts); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function modeToEndpoint (mode) {\n return mode==\"startup\"?\"/api/startup\":\"/api/signup\";\n }", "function getApiMap(client, profiles) {\n return Object.keys(profiles).reduce((acc, name) => {\n const profile = profiles[name];\n return Object.assign(Object.assign({}, acc), { [name]: cr...
[ "0.57894176", "0.5583012", "0.53443664", "0.5263777", "0.5117751", "0.49570364", "0.4884323", "0.47558266", "0.4735105", "0.4729252", "0.47286537", "0.472793", "0.4721127", "0.46931213", "0.4665612", "0.4665612", "0.46403587", "0.46201733", "0.46093005", "0.4607678", "0.46068...
0.7005449
0
This is a script for deploying your contracts. You can adapt it to deploy yours, or create new ones.
async function main() { // This is just a convenience check if (network.name === "hardhat") { console.warn( "You are trying to deploy a contract to the Hardhat Network, which" + "gets automatically created and destroyed every time. Use the Hardhat" + " option '--network localhost'" ); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function deployContract(){\n\n let abiPath = path.join(__dirname + '/bin/DataStorageEvent.abi');\n let binPath = path.join(__dirname + '/bin/DataStorageEvent.bin');\n\n console.log(chalk.green(abiPath));\n console.log(chalk.green(binPath));\n\n let abi = fs.readFileSync(abiPath);\n // let bin = '0x' + ...
[ "0.7763834", "0.70017505", "0.69955814", "0.69906175", "0.6944909", "0.6927014", "0.6876992", "0.6792079", "0.67523277", "0.6717969", "0.6707057", "0.6698672", "0.6695671", "0.6681433", "0.65582734", "0.65463966", "0.6539404", "0.65283895", "0.6514069", "0.64830023", "0.64619...
0.60390806
37
route middleware to make sure a user is logged in
function isLoggedIn(req, res, next) { // if user is authenticated in the session, carry on if (req.isAuthenticated()) return next(); // if they aren't redirect them to the home page res.redirect('/'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isLoggedIn(req, res, next) {\n\tconsole.log('isLoggedIn middleware');\n if (req.isAuthenticated()) {\n \treturn next();\n } else {\n \tres.redirect('/users');\n }\n}", "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated()) return next();\n else res.redirect('/signin');\n }", "...
[ "0.7876135", "0.78393435", "0.782234", "0.78160053", "0.77990955", "0.77802575", "0.77721983", "0.77554494", "0.7753247", "0.7751969", "0.77507997", "0.77501255", "0.7749381", "0.77369666", "0.77294576", "0.77259034", "0.77181846", "0.77163094", "0.77160543", "0.7715493", "0....
0.0
-1
! Vue.js v2.3.4 (c) 20142017 Evan You Released under the MIT License.
function r(e) { return void 0 === e || null === e }
{ "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.6970873", "0.69271237", "0.690041", "0.6572427", "0.65075076", "0.63697493", "0.63697493", "0.6356566", "0.6339318", "0.632177", "0.63209337", "0.6311293", "0.62548375", "0.6251153", "0.6250896", "0.62310493", "0.6219428", "0.61895925", "0.6168643", "0.6168643", "0.6152552...
0.0
-1
Provides item metadata for group (Slick.Group) and totals (Slick.Totals) rows produced by the DataView. This metadata overrides the default behavior and formatting of those rows so that they appear and function correctly when processed by the grid. This class also acts as a grid plugin providing event handlers to expan...
function GroupItemMetadataProvider(options) { var _grid; var _defaults = { checkboxSelect: false, checkboxSelectCssClass: "slick-group-select-checkbox", checkboxSelectPlugin: null, groupCssClass: "slick-group", groupTitleCssClass: "slick-group-title", totalsCssClass: "slick-g...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get groupItemMetadataProvider() {\n return this._groupItemMetadataProvider;\n }", "setRowGrouping() {\n const groupSettings = this.settings.groupable;\n if (!groupSettings) {\n return;\n }\n\n if (!this.originalDataset) {\n this.originalDataset = this.settings.dataset.slice();\n ...
[ "0.6173623", "0.589255", "0.5747633", "0.5655697", "0.564474", "0.55958986", "0.5557985", "0.5557093", "0.55293095", "0.5492911", "0.5492911", "0.5467958", "0.5442137", "0.54298174", "0.5416062", "0.53888303", "0.5377622", "0.5374914", "0.5374914", "0.5371621", "0.5364722", ...
0.7868312
0
TODO: add /+ handling
function handleGridKeyDown(e, args) { if (options.enableExpandCollapse && (e.which == $.ui.keyCode.SPACE)) { var activeCell = this.getActiveCell(); if (activeCell) { var item = this.getDataItem(activeCell.row); if (item && item instanceof Slick.Group) { var range = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function urlStr(str) {\n return str.replace(/ /g,\"+\");\n}", "function validatereciter() {\n\tvar old = querySt(\"reciter\");\n\tvar cool = old.replace(\"%2F\", \"\\/\");\n\tcool = cool.replace(\"+\", ' ');\n\tcool = cool.replace(/[^0-9A-Za-z_.\\/-]/g, ' ');\n\treturn cool;\n}", "function appendMethods(lis...
[ "0.53244257", "0.52922225", "0.52907187", "0.52870446", "0.5254312", "0.5108562", "0.50849175", "0.50551707", "0.5017203", "0.5017203", "0.50087714", "0.49567583", "0.49357417", "0.4930369", "0.4927144", "0.4918429", "0.49035567", "0.4892405", "0.48883766", "0.4874104", "0.48...
0.0
-1
Load the save view
function loadSaveView() { // Set the status bar setStatusBar('save'); // Fill the title document.getElementById('title').innerHTML = localization['Save']['Title']; // Fill the content area document.getElementById('content').innerHTML = ` <p>${localization['Save']['Description']}</p> ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadDataUploadView() {\n}", "function loadSavedViews(currentState){\n fillElements(currentState);\n }", "function saveNewView(type) {\n var view = {\"class\":type}\n var editUI = document.getElementById(\"edit\" + type)\n // Handle View\n switch (type) {\n\n case \"DepictionHead...
[ "0.66388804", "0.64524204", "0.630228", "0.62770486", "0.6073208", "0.6015422", "0.60059386", "0.5892509", "0.58724135", "0.5836816", "0.5836816", "0.5804552", "0.5801759", "0.5801605", "0.5793336", "0.57834643", "0.57809573", "0.57749236", "0.5745196", "0.57423323", "0.57102...
0.6715584
0
Deck of cards, unshuffled
function deck(){ const names = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K']; const suits = ['H','D','S','C']; return suits.reduce((deck, suit) => { deck.push(...names.map((name) => { return {"suit": suit, "name": name}})); return deck; }, []); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "reshuffle() {\n this._deck = [];\n for(var i = 0; i < 52; i++) {\n\t\t\tthis._deck.push(i);\n\t\t}\n \n this.shuffle();\n }", "shuffleDeck() {\n\t\t// Loop through the deck and shuffle cards\n \t\tfor (let i = this.mCardDeck.length - 1; i > 0; i--) {\n \tconst j = Math.floor(Math.random() * (...
[ "0.8103157", "0.8016381", "0.79353577", "0.7873463", "0.78028417", "0.7788897", "0.775903", "0.7751893", "0.772568", "0.76220787", "0.76215327", "0.7621123", "0.7604867", "0.75840217", "0.75839084", "0.7568573", "0.75653166", "0.7565023", "0.75552535", "0.7550892", "0.7540372...
0.0
-1
Seeded random number generator
function rnd(min, max) { max = max || 1; min = min || 0; seed = (seed * 9301 + 49297) % 233280; return Math.floor(min + seed / 233280 * (max - min)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rng() {\n return random();\n } // updates generator with a new instance of a seeded pseudo random number generator", "function SeededRandom(){}", "function rnd() \n{\n\t\t\n rnd.seed = (rnd.seed*9301+49297) % 233280;\n return rnd.seed/(233280.0);\n}", "function random() {\n\t\tseed = Math....
[ "0.85508406", "0.8294704", "0.7948793", "0.77355987", "0.77172816", "0.7715217", "0.7715217", "0.7713035", "0.7713035", "0.76967484", "0.7598331", "0.7573674", "0.75333214", "0.75251305", "0.74852467", "0.7443369", "0.74413365", "0.7423178", "0.739684", "0.73594874", "0.73445...
0.0
-1
Loads initial state and wires on dom events
load () { if (!this.initialized) { // wire dom events to service handlers $('#gh-new-personal-access-token-button').click(this.onOpenNewGhPersonalAccessTokenClick) $('#gh-sync-enabled').change(this.onGhSyncEnabledToggle) $('#gh-personal-access-token').change(this.onGhPersonalAccessTokenChang...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init() {\n\t\tcacheDOM();\n\t\tbindEvents();\n\t}", "function init() {\n setDomEvents();\n }", "function initDomReadyState() {\r\n function fire() {\r\n if (!_mm.blackout) {\r\n if (!_boot[0]++) { // [0]fired\r\n var ary = _boot[1].concat(_boot[2]); // copy\r\n\r\n if ...
[ "0.7598036", "0.7294987", "0.68904525", "0.6738211", "0.67192733", "0.6700904", "0.6653439", "0.6643092", "0.6625806", "0.6619941", "0.6602813", "0.6571833", "0.65693086", "0.65576273", "0.6549229", "0.65344656", "0.6530628", "0.65305007", "0.6530319", "0.6527994", "0.6526073...
0.0
-1
"on" DOM Events: event handlers need to reference this by this scoped service variable
onOpenNewGhPersonalAccessTokenClick () { shell.openExternal('https://github.com/settings/tokens/new') }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "registerDomEvents() {/*To be overridden in sub class as needed*/}", "on(handler) {\n this.addEventListener(handler);\n }", "registerDomEvents() {\n\t\tgetComponentElementById(this,\"DataListSearchInput\").on(\"keyup\", function() {\n\t\t\tlet search_text = getComponentElementById(this,\"DataListSearchInput...
[ "0.6642961", "0.6578555", "0.64732563", "0.6437732", "0.63092524", "0.6300332", "0.6264278", "0.6261992", "0.6261992", "0.6261992", "0.6261992", "0.6261992", "0.6261992", "0.6261992", "0.6261992", "0.6261992", "0.6261992", "0.6261992", "0.6261992", "0.6261992", "0.6261992", ...
0.0
-1
Get the policy for the user.
function getPolicy(user, context, cb) { request.post({ url: EXTENSION_URL + "/api/users/" + user.user_id + "/policy/" + context.clientID, headers: { "x-api-key": "0bce7e8cf6a89bdc2b913d51b39324dbb72fbcbcca1e800c82b30da137faf3b9" }, json: { connectionName: context.connection |...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPolicy(user, context, cb) {\n request.post({\n url: EXTENSION_URL + \"/api/users/\" + user.user_id + \"/policy/\" + context.clientID,\n headers: {\n \"x-api-key\": API_KEY\n },\n json: {\n connectionName: context.connection || user.identities[0].connection,\n ...
[ "0.7665648", "0.68136936", "0.67078906", "0.6658122", "0.6658122", "0.6658122", "0.6658122", "0.6658122", "0.6431653", "0.64212483", "0.6343506", "0.631851", "0.6222978", "0.6222978", "0.6193212", "0.60935783", "0.59347326", "0.59347326", "0.59347326", "0.59347326", "0.580206...
0.7728219
0
Store authorization data in the user profile so we can query it later.
function saveToMetadata(user, groups, roles, permissions, cb) { user.app_metadata = user.app_metadata || {}; user.app_metadata.authorization = { groups: groups, roles: roles, permissions: permissions }; auth0.users.updateAppMetadata(user.user_id, user.app_metadata) .then(function(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fillAuthData() {\n var authData = localStorageService.get('authorizationData');\n if (authData) {\n authentication.isAuth = true;\n authentication.userName = authData.userName;\n authentication.roleId = authData.roleId;\n }\n ...
[ "0.6954312", "0.6801607", "0.6715217", "0.6649668", "0.65741765", "0.64560556", "0.62909126", "0.6290072", "0.62864596", "0.6284934", "0.61512035", "0.61313814", "0.61045915", "0.6086356", "0.60728735", "0.6002182", "0.59963936", "0.5992557", "0.59733856", "0.59695077", "0.59...
0.0
-1
============ Create Product ========================
function createProduct() { let idSmallCategory = ''; $('#small-category-value').change(function () { idSmallCategory = $(this).val(); }); let productStatus = ''; $('#product-status').change(function () { productStatus = $(this).val(); }); var formData; $("#change-produ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createProduct() {\n //... your code goes here\n}", "createProducts(req, res) {\n ProductModel.create(req.body)\n .then((product) => res.send(product))\n .catch((err) => res.send(err));\n }", "function createProduct(that,cb){\n var post_data = that.data;\n if (post_data.images.leng...
[ "0.7742445", "0.7561926", "0.7529011", "0.74705297", "0.7415443", "0.73653316", "0.72916085", "0.720295", "0.7174479", "0.7128696", "0.70127493", "0.6979742", "0.6942063", "0.69417745", "0.6917647", "0.68652433", "0.6862936", "0.68615746", "0.68491584", "0.68340576", "0.67968...
0.6481434
43
============ Find Product By Id ===================
function findProductById(id) { $.ajax({ type: "GET", contentType: "application/json", headers: { "adminbksoftwarevn": value_token_public, }, url: "api/v1/public/product/find-by-id?id=" + id, timeout: 30000, success: function (result) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function searchProduct(id) {\n for (let k = 0; k < shoppingProducts.length; k++) {\n if (shoppingProducts[k].idproduct === id) {\n return shoppingProducts[k];\n }\n }\n return null;\n}", "findById(id) {\n let product = shoppingCart.products.find((p) => {\n retu...
[ "0.8089489", "0.8022285", "0.78680116", "0.7758579", "0.7758495", "0.7730825", "0.77226716", "0.7694201", "0.76814884", "0.75904864", "0.7555777", "0.7485768", "0.7403639", "0.7368143", "0.7354786", "0.7339743", "0.7300396", "0.7278758", "0.72335494", "0.72335494", "0.7220037...
0.7532022
11
============ update Product ========================
function updateProduct(data) { var listTag = ''; console.log(data); data.tags.map(function (tag) { listTag += '@' + tag.name; }); $('#list-tag').text(listTag); $("#name-product").val(data.name); $("#code-product").val(data.productCode); $("#origin-cost-Retail").val(data.originCo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async update ({ params, request, response }) {\n const product = await Product.find(params.id)\n const data = request.only([\n \"name\", \n \"description\", \n \"price\"\n ])\n product.merge(data)\n if (product) {\n response.status(200).json({\n success: 'Product Upd...
[ "0.8023154", "0.8004687", "0.769033", "0.7686039", "0.76397026", "0.75824785", "0.75447744", "0.7464828", "0.73895293", "0.7377211", "0.736224", "0.72697854", "0.7263582", "0.7260229", "0.7259716", "0.7208861", "0.7148747", "0.71322984", "0.7129324", "0.70980126", "0.7089148"...
0.0
-1
extract the object id from the url
function getObjectidFromUrl(url) { var urlObject = urlUtils.urlToObject(url); if (urlObject.query && urlObject.query.OBJECTID) { return urlObject.query.OBJECTID; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function extractIdFromUrl( url ) {\n if ( !url ) {\n return;\n }\n\n var matches = url.match( rWebUrl );\n return matches ? matches[0].substr(10) : \"\";\n }", "function extractIdFromUrl( url ) {\n if ( !url ) {\n return;\n }\n\n var matches = urlRegex.exec( url );\n\n...
[ "0.75564206", "0.72296065", "0.7220558", "0.7205863", "0.7147343", "0.7122531", "0.70786345", "0.7078077", "0.70435894", "0.7002813", "0.69203377", "0.691142", "0.6851388", "0.68017256", "0.6799427", "0.67899376", "0.67735946", "0.6754052", "0.6703702", "0.66696453", "0.65873...
0.813725
0
waitfor test rate [msec]
function isMapLoaded() { if (!mapReceived) { currentNode.trigger('onMapRequested', eventName); } return mapReceived; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sleep(delay_in_ms) {var start_time = new Date().getTime();\nfor (var sleep_count = 0; sleep_count < 1e7; sleep_count++)\n{if ((new Date().getTime() - start_time) > delay_in_ms) break;}}", "function waitfor(test, expectedValue, msec, count, source, callback) {\n //console.log('waitfor, count='+count);...
[ "0.65485793", "0.65448046", "0.6452501", "0.64065033", "0.63385046", "0.63171786", "0.630893", "0.630659", "0.6236668", "0.6216397", "0.6192496", "0.61920714", "0.6182574", "0.6174677", "0.61545944", "0.6147972", "0.6134831", "0.6134831", "0.6130579", "0.61257446", "0.6122263...
0.0
-1
TODO: add error handlers update calendar events
function renderCal() { $('#calendar').fullCalendar('rerenderEvents'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateCalendar() {\n /*\n get the correct month\n number the calendar\n get future events\n * show the events\n highlight current date\n */\n\n this.updateMonth();\n this.updateYear();\n this.numberCalendar();\n this.h...
[ "0.72957265", "0.7136179", "0.70467323", "0.6899938", "0.6872571", "0.6860182", "0.68011904", "0.67209816", "0.6631521", "0.6631053", "0.657638", "0.6572328", "0.65591764", "0.65283465", "0.6507056", "0.64964145", "0.6484886", "0.6473318", "0.6465507", "0.64541465", "0.644071...
0.6371035
29
change event color for days user is on duty
function colorOnDutyDays(events) { var _iteratorNormalCompletion = true; var _didIteratorError = false; var _iteratorError = undefined; try { for (var _iterator = events[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_set_day_colors() {\n document.getElementById('signup_heading').innerText = LANG.signup_heading;\n var back = document.getElementById('back_button');\n back.innerText = LANG.back_button;\n var refresh = document.getElementById('refresh_button');\n refresh.innerText = LANG.refresh...
[ "0.6698043", "0.6617612", "0.64691484", "0.6460615", "0.6300168", "0.6294417", "0.62936246", "0.62665427", "0.62653434", "0.62361604", "0.6232121", "0.61902285", "0.6133829", "0.61330515", "0.6130581", "0.61233455", "0.61176044", "0.61098975", "0.6103318", "0.60927224", "0.60...
0.78360796
0
list on duty days in sidebar
function listOnDutyDays(events) { $scope.onDutyDays = []; var _iteratorNormalCompletion2 = true; var _didIteratorError2 = false; var _iteratorError2 = undefined; try { for (var _iterator2 = events[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function display_day_selector(){\n\t$(\"#days_container\").html(\"\");\n\tfor(const item in MY_CURRENT_PLAN){\n\t\tday = parseInt(item)+1;\n\t\t$(\"#days_container\").append('<a id=\"day_selector_' + item + '\" onclick=\"select_day(' + item + ')\" class=\"day_selector waves-effect waves-light little-container-item...
[ "0.6439144", "0.6271907", "0.62507194", "0.61022556", "0.6084488", "0.6056007", "0.60105854", "0.6006669", "0.59807694", "0.5955345", "0.5950206", "0.59174746", "0.58937293", "0.5877313", "0.5863316", "0.58448124", "0.58361393", "0.5807182", "0.57701504", "0.5723455", "0.5716...
0.60520685
6
Cannot use => syntax here as `this` must be preserved
name (first_character, additional_characters) { return this.interval.contents; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function self($this) {\n\treturn $this;\n}", "function foo(){\n var a = \"Hello\";\n this.a = 22;\n this.greet =()=>{\n return this.a;\n }\n}", "fmap (_) {\n return this\n }", "function Person(name){\n this.name = name;\n this.greeting =()=>{\n console.log(this.name);\n ...
[ "0.63229287", "0.6269256", "0.6264707", "0.62609684", "0.6170765", "0.6159778", "0.6159277", "0.6116489", "0.6098143", "0.6074579", "0.60162795", "0.60162795", "0.5961835", "0.5961835", "0.59321326", "0.5926215", "0.59049296", "0.5869371", "0.5869371", "0.5852117", "0.5852117...
0.0
-1
JavaScript Wow Slider is a free software that helps you easily generate delicious slideshows with gorgeous transition effects, in a few clicks without writing a single line of code. Generated by WOW Slider 2.7.1 Obfuscated by Javascript Obfuscator
function ws_kenburns(c, j, k) { var d = jQuery; var e = document.createElement("canvas").getContext; var m = c.paths || [{ from: [0, 0, 1], to: [0, 0, 1.2] }, { from: [0, 0, 1.2], to: [0, 0, 1] }, { from: [1, 0, 1], to: [1, 0, 1.2] }, { fro...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function WowSlider(options){var $=jQuery;options=options||{};var $Elements=$(\"#wowslider-images A\");$Elements.each(function(index){var inner=$(this).html()||\"\";var pos=inner.indexOf(\">\",inner);if(pos>=0){$(this).data(\"descr\",inner.substr(pos+1));if(pos<inner.length-1){$(this).html(inner.substr(0,pos+1));}}...
[ "0.741977", "0.6776685", "0.6557557", "0.6554298", "0.6369644", "0.6364734", "0.6312042", "0.6312042", "0.6308401", "0.6297389", "0.6246421", "0.6238705", "0.6183429", "0.6183429", "0.615808", "0.6138197", "0.60845065", "0.6047641", "0.60316086", "0.6003541", "0.5973211", "...
0.0
-1
A utility function to check if the current color assignment is safe for vertex v
isSafe(v, graph, color, c) { for (let i = 0; i < this.v; i++) { if (graph[v][i] == 1 && c == color[i]) return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isSafe(v, color, c) {\n for (var i = 0; i < this.V; i++) {\n if ((this.graph[v][i] === 1) && (color[i] === c)) {\n return false;\n }\n }\n return true;\n }", "function isSafe(v, graph, color, c) {\n for (let i = 0; i < V; i++) {\n if (graph[v][i] =...
[ "0.77562106", "0.77117383", "0.74613607", "0.7178296", "0.71146333", "0.6942622", "0.6542624", "0.65190905", "0.63394916", "0.6308729", "0.63068277", "0.62763214", "0.6219919", "0.6203167", "0.6160557", "0.6120871", "0.61001045", "0.61000156", "0.61000156", "0.60939246", "0.6...
0.7549872
2
A recursive utility function to solve m coloring problem
graphColoringUtil(graph, m, color, v) { /* base case: If all vertices are assigned a color then return true */ if (v == this.v) { return true; } /* Consider this vertex v and try different colors */ for (let c = 1; c <= m; c++) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function color() {\n var map = {\n \"black\" : [ 0/255,0/255,0/255 ],\n \"silver\": [ 192/255,192/255,192/255 ],\n \"gray\" : [ 128/255,128/255,128/255 ],\n \"white\" : [ 255/255,255/255,255/255 ],\n \"maroon\": [ 128/255,0/255,0/255 ],\n \"red\" : [ 255/255,0/255,0/255 ],\n \"purple\": [ 128/25...
[ "0.6588193", "0.6573023", "0.6548703", "0.65486825", "0.6538466", "0.647689", "0.6341125", "0.62963116", "0.6294142", "0.61327904", "0.6125883", "0.61113924", "0.6099676", "0.6085471", "0.6059207", "0.6058579", "0.6052094", "0.60219866", "0.6020752", "0.6016345", "0.59832275"...
0.6511507
5
This function solves the m Coloring problem using Backtracking. It mainly uses graphColoringUtil() to solve the problem. It returns false if the m colors cannot be assigned, otherwise return true and prints assignments of colors to all vertices. Please note that there may be more than one solutions, this function print...
graphColoring(graph, m) { // Initialize all color values as 0. This // initialization is needed correct functioning // of isSafe() this.color = new Array(this.v); for (let i = 0; i < this.v; i++) this.color[i] = 0; // Call graphColoringUtil() for vertex 0...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function graphColoring(graph, m) {\n // Initialize all color values as 0. This\n // initialization is needed correct functioning\n // of isSafe()\n color = Array(V);\n for (let i = 0; i < V; i++) color[i] = 0;\n\n // Call graphColoringUtil() for vertex 0\n if (!graphColoringUtil(graph, m, color, 0)) {\n ...
[ "0.7923868", "0.783505", "0.7737076", "0.75746024", "0.74635285", "0.7368741", "0.68041044", "0.66368407", "0.65440965", "0.6264764", "0.6212825", "0.6133502", "0.6051359", "0.6010901", "0.5777114", "0.57420945", "0.5737468", "0.57295257", "0.57257974", "0.5704041", "0.569637...
0.78466684
1
A utility function to print solution
printSolution( color ) { console.log("Solution Exists: Following are the assigned colors"); let str = ""; for (let i = 0; i < this.v; i++) { str += color[i] + " "; } console.log(str); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "solutionToString () {}", "function displaySolution(solution) {\n\n}", "function showSolution(){\n\tvar solution = \"\";\n\tfor(move in lastMove){\n\t\tsolution += \">>> \" + lastMove[move][1] + \" \";\n\t}\n\tdocument.getElementById(\"solution\").innerText = solution;\n}", "function print() {\n var output...
[ "0.6929348", "0.6902128", "0.656048", "0.6464658", "0.6461196", "0.6447768", "0.644258", "0.63859946", "0.6370168", "0.630784", "0.62541425", "0.62467325", "0.6245544", "0.62421465", "0.6239506", "0.61955076", "0.6183742", "0.61825526", "0.61758846", "0.61707693", "0.61484885...
0.6247343
11
driver program to test above function
test () { let coloring = new Coloring(4); /* Create following graph and test whether it is 3 colorable (3)---(2) | / | | / | | / | (0)---(1) */ let graph = [[0, 1, 1, 1], [1, 0, 1, 0], [1...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function testRun()\r\n{\r\n}", "function exampleFunctionToRun(){\n\n }", "function run () {\n\n // //Test Case 1\n address = \"809 Thomas Ave, San Diego, CA 92109\"\n var frmtAddr = addressSearch(address);\n var frmtName = formatInput(\"The Local\");\n ...
[ "0.68800735", "0.64613575", "0.62146646", "0.6123396", "0.6082879", "0.6040128", "0.60176444", "0.60176444", "0.59810275", "0.59469557", "0.59408957", "0.5909824", "0.5904051", "0.58489555", "0.58305", "0.58204204", "0.579526", "0.5781186", "0.5764205", "0.5746908", "0.574188...
0.0
-1
start with the first
function get(address) { if (address[0] !== nodata) { var url = api + address[0] + '.json?country=' + address[1] + '&access_token=' + token; request(url, function (error, response, body) { if (error) throw error; var json = JSON.parse(body); if (response.statusCo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "first() {\n this.reset();\n return this.next();\n }", "First() {\n if (this.CanFirst()) {\n this.Position = 0;\n }\n }", "function first() {\n index = 0;\n c = dot.charAt(0);\n }", "function first() {\n index = 0;\n c = dot.charAt(0);\n }", "function first()...
[ "0.7199399", "0.69922096", "0.68949366", "0.68949366", "0.68949366", "0.66858584", "0.6621415", "0.6607094", "0.6599", "0.6510231", "0.6485983", "0.6430212", "0.6356645", "0.6356645", "0.6356645", "0.6356645", "0.6350089", "0.6324841", "0.63195413", "0.62902755", "0.62847227"...
0.0
-1
Adds a query to the manager and populates with any entities that match
_addQuery(query) { this._queries[buildTypeKey(query.types)] = query; for (const entity of this._world.entityManager.entities) { query.addEntity(entity); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addEntity(entity) {\n for (const queryType in this._queries) {\n if (this._queries[queryType]) {\n this._queries[queryType].addEntity(entity);\n }\n }\n }", "resolveQuery() {\n\t\tthis.resultData = this.query.run(this.collection, this.dataProvider.data());\n\...
[ "0.62093806", "0.5926394", "0.56033343", "0.5566683", "0.53909683", "0.5362115", "0.5261496", "0.5248851", "0.522944", "0.5204208", "0.5204208", "0.5203148", "0.51406944", "0.5130097", "0.51243293", "0.51094633", "0.5085886", "0.5083075", "0.5080033", "0.5063468", "0.50506234...
0.66432595
0