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
! moment.js locale configuration
function t(e,t,n){var r={ss:"secunde",mm:"minute",hh:"ore",dd:"zile",ww:"săptămâni",MM:"luni",yy:"ani"},i=" ";return(e%100>=20||e>=100&&e%100===0)&&(i=" de "),e+i+r[n]}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cl(e,t,n){return\"m\"===n?t?\"минута\":\"минуту\":e+\" \"+\n//! moment.js locale configuration\n//! locale : Russian [ru]\n//! author : Viktorminator : https://github.com/Viktorminator\n//! Author : Menelion Elensúle : https://github.com/Oire\n//! author : Коренберг Марк : https://github.com/socketpair\nf...
[ "0.8263063", "0.8035005", "0.7877146", "0.75484014", "0.7204236", "0.7198218", "0.7173406", "0.7170998", "0.7132494", "0.71289635", "0.7045183", "0.6671976", "0.6671976", "0.6335302", "0.6293571", "0.62770087", "0.62770087", "0.62770087", "0.62770087", "0.6210929", "0.6094717...
0.0
-1
! moment.js locale configuration
function t(e,t,n,r){var i={s:["थोडया सॅकंडांनी","थोडे सॅकंड"],ss:[e+" सॅकंडांनी",e+" सॅकंड"],m:["एका मिणटान","एक मिनूट"],mm:[e+" मिणटांनी",e+" मिणटां"],h:["एका वरान","एक वर"],hh:[e+" वरांनी",e+" वरां"],d:["एका दिसान","एक दीस"],dd:[e+" दिसांनी",e+" दीस"],M:["एका म्हयन्यान","एक म्हयनो"],MM:[e+" म्हयन्यानी",e+" म्हयने"],y...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cl(e,t,n){return\"m\"===n?t?\"минута\":\"минуту\":e+\" \"+\n//! moment.js locale configuration\n//! locale : Russian [ru]\n//! author : Viktorminator : https://github.com/Viktorminator\n//! Author : Menelion Elensúle : https://github.com/Oire\n//! author : Коренберг Марк : https://github.com/socketpair\nf...
[ "0.82635474", "0.803583", "0.7878269", "0.7548106", "0.72040725", "0.71984273", "0.7174624", "0.71708643", "0.7132608", "0.7130732", "0.7045036", "0.66717654", "0.66717654", "0.6335232", "0.62935024", "0.62765163", "0.62765163", "0.62765163", "0.62765163", "0.6211631", "0.609...
0.0
-1
! moment.js locale configuration
function t(e,t){var n=e.split("_");return t%10===1&&t%100!==11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cl(e,t,n){return\"m\"===n?t?\"минута\":\"минуту\":e+\" \"+\n//! moment.js locale configuration\n//! locale : Russian [ru]\n//! author : Viktorminator : https://github.com/Viktorminator\n//! Author : Menelion Elensúle : https://github.com/Oire\n//! author : Коренберг Марк : https://github.com/socketpair\nf...
[ "0.82635474", "0.803583", "0.7878269", "0.7548106", "0.72040725", "0.71984273", "0.7174624", "0.71708643", "0.7132608", "0.7130732", "0.7045036", "0.66717654", "0.66717654", "0.6335232", "0.62935024", "0.62765163", "0.62765163", "0.62765163", "0.62765163", "0.6211631", "0.609...
0.0
-1
! moment.js locale configuration
function t(e,t,n,r){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?i[n][0]:i[n][1]}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cl(e,t,n){return\"m\"===n?t?\"минута\":\"минуту\":e+\" \"+\n//! moment.js locale configuration\n//! locale : Russian [ru]\n//! author : Viktorminator : https://github.com/Viktorminator\n//! Author : Menelion Elensúle : https://github.com/Oire\n//! author : Коренберг Марк : https://github.com/socketpair\nf...
[ "0.82635474", "0.803583", "0.7878269", "0.7548106", "0.72040725", "0.71984273", "0.7174624", "0.71708643", "0.7132608", "0.7130732", "0.7045036", "0.66717654", "0.66717654", "0.6335232", "0.62935024", "0.62765163", "0.62765163", "0.62765163", "0.62765163", "0.6211631", "0.609...
0.0
-1
! moment.js locale configuration
function t(e,t,n,r){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?i[n][0]:i[n][1]}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cl(e,t,n){return\"m\"===n?t?\"минута\":\"минуту\":e+\" \"+\n//! moment.js locale configuration\n//! locale : Russian [ru]\n//! author : Viktorminator : https://github.com/Viktorminator\n//! Author : Menelion Elensúle : https://github.com/Oire\n//! author : Коренберг Марк : https://github.com/socketpair\nf...
[ "0.8263063", "0.8035005", "0.7877146", "0.75484014", "0.7204236", "0.7198218", "0.7173406", "0.7170998", "0.7132494", "0.71289635", "0.7045183", "0.6671976", "0.6671976", "0.6335302", "0.6293571", "0.62770087", "0.62770087", "0.62770087", "0.62770087", "0.6210929", "0.6094717...
0.0
-1
! moment.js locale configuration
function t(e,t,n,r){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?i[n][0]:i[n][1]}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cl(e,t,n){return\"m\"===n?t?\"минута\":\"минуту\":e+\" \"+\n//! moment.js locale configuration\n//! locale : Russian [ru]\n//! author : Viktorminator : https://github.com/Viktorminator\n//! Author : Menelion Elensúle : https://github.com/Oire\n//! author : Коренберг Марк : https://github.com/socketpair\nf...
[ "0.82635474", "0.803583", "0.7878269", "0.7548106", "0.72040725", "0.71984273", "0.7174624", "0.71708643", "0.7132608", "0.7130732", "0.7045036", "0.66717654", "0.66717654", "0.6335232", "0.62935024", "0.62765163", "0.62765163", "0.62765163", "0.62765163", "0.6211631", "0.609...
0.0
-1
! moment.js locale configuration
function t(e,t,n,r){var i={s:["mõne sekundi","mõni sekund","paar sekundit"],ss:[e+"sekundi",e+"sekundit"],m:["ühe minuti","üks minut"],mm:[e+" minuti",e+" minutit"],h:["ühe tunni","tund aega","üks tund"],hh:[e+" tunni",e+" tundi"],d:["ühe päeva","üks päev"],M:["kuu aja","kuu aega","üks kuu"],MM:[e+" kuu",e+" kuud"],y:[...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cl(e,t,n){return\"m\"===n?t?\"минута\":\"минуту\":e+\" \"+\n//! moment.js locale configuration\n//! locale : Russian [ru]\n//! author : Viktorminator : https://github.com/Viktorminator\n//! Author : Menelion Elensúle : https://github.com/Oire\n//! author : Коренберг Марк : https://github.com/socketpair\nf...
[ "0.82635474", "0.803583", "0.7878269", "0.7548106", "0.72040725", "0.71984273", "0.7174624", "0.71708643", "0.7132608", "0.7130732", "0.7045036", "0.66717654", "0.66717654", "0.6335232", "0.62935024", "0.62765163", "0.62765163", "0.62765163", "0.62765163", "0.6211631", "0.609...
0.0
-1
has only odd numbers
function hasOnlyOddNumbers(array) { return array.every((el) => { if (el % 2 == 0) { return false; } return true; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isNumberOdd(number) {\r\n return number % 2 !== 0\r\n\r\n}", "function oddChecker(num){\n\treturn num % 2 !== 0\n}", "function odd(n) {\n return n % 2 !== 0;\n }", "function isOdd(numOdd){\n return numOdd % 2 != 0;\n }", "function isOdd(num) {\n return num % 2 !== 0;\n}", "function i...
[ "0.80448794", "0.79415965", "0.79010224", "0.78811336", "0.7880286", "0.78757006", "0.7874551", "0.78550756", "0.78343767", "0.7826631", "0.780952", "0.779623", "0.77870625", "0.7765112", "0.7765112", "0.7765112", "0.775877", "0.77481645", "0.77481645", "0.7747806", "0.774425...
0.75527036
43
esta es la funcion que se encarga de pintar el canvas
function draw(){ //reseteamos el lienzo ctx.clearRect(0, 0, canvas.width, canvas.height); //pintamos la bola pintarBola(); pintarBarra1(); pintarBarra2(); pintarPuntos(); //actualizamos la posicion, si coincide con los bordes invertimos la direccion if(x + dx > canvas.width-radioBola...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "drawCanvas() {\n\n\t}", "dibujar(canvas, ctx) {\n // const x = map(this.posX() - 10, 0, this.tablero.ancho, 0, canvas.width);\n // const y = map(this.posY() - 10, 0, this.tablero.alto, 0, canvas.height);\n const x = (this.tablero.vista.ancho * this.posX() / this.tablero.ancho) | 0;\n const y = (this....
[ "0.74241924", "0.7343098", "0.7175084", "0.7054334", "0.6996765", "0.69427687", "0.6907144", "0.6877569", "0.68457174", "0.68232095", "0.6800658", "0.6796598", "0.6792822", "0.67499876", "0.6700858", "0.6678214", "0.6641596", "0.66196996", "0.6618451", "0.6601784", "0.6583490...
0.0
-1
Esta funcion se encarga de pintar la bola en su posicion
function pintarBola(){ //pintamos la bola ctx.beginPath(); //ctx.arc(x, y, radioBola, 0, Math.PI*2); //ctx.fillStyle = color; var bola=document.createElement("img"); bola.src="../../img/pelota.png"; ctx.drawImage(bola, x, y,radioBola*2,radioBola*2); //ctx.fill(); ctx.closePath(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Barreiras(altura, largura, abertura, espaco, notificarPonto) {\n this.pares = [\n new ParDeBarreiras(altura, abertura, largura),\n new ParDeBarreiras(altura, abertura, largura + espaco),\n new ParDeBarreiras(altura, abertura, largura + espaco * 2),\n new ParDeBarreiras(altur...
[ "0.6799182", "0.67623824", "0.6527427", "0.6473783", "0.6422169", "0.64167756", "0.6382159", "0.6365941", "0.635541", "0.63210493", "0.62418735", "0.6224056", "0.62071383", "0.61845315", "0.61406416", "0.61368746", "0.61180437", "0.610234", "0.61022484", "0.60913116", "0.6088...
0.0
-1
Si se ha pulsado una tecla y es la arriba o la abajo el booleano correspondiente se pone a true
function keyDownHandler(e) { if(e.keyCode == 38) { upPressed = true; } else if(e.keyCode == 40) { downPressed = true; } if(e.keyCode == 87) { wPressed = true; } else if(e.keyCode == 83) { sPressed = true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function valorTriangulo(){\n if(trianguloAparienciaInteraccion == true && trianguloAparienciaTono == true && trianguloAparienciaMirada == true && trianguloAparienciaLlanto == true){\n trianguloApariencia = true;\n }else{\n trianguloApariencia = false;\n }\n}", "isInAir(obj){\n let r...
[ "0.63958395", "0.6171451", "0.5975243", "0.59371376", "0.5894235", "0.5881818", "0.58678144", "0.5827168", "0.582167", "0.58194935", "0.58173937", "0.581145", "0.5763861", "0.5759584", "0.5733735", "0.5707911", "0.56965494", "0.567471", "0.5674418", "0.5673226", "0.5672037", ...
0.0
-1
Si se ha levantado una tecla y es la arriba o la abajo el booleano correspondiente se pone a false
function keyUpHandler(e) { if(e.keyCode == 38) { upPressed = false; } else if(e.keyCode == 40) { downPressed = false; } if(e.keyCode == 87) { wPressed = false; } else if(e.keyCode == 83) { sPressed = false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "expandidoTotalmente(){\n for (let hijo of this.hijos.values()){\n if(hijo.nodo === null) return false\n }\n\n return true\n }", "isInAir(obj){\n let result = true;\n for (let i=obj.xPos;i<obj.xPos+obj.width && i<this.boardWidth;i++){\n if (this.board[i]...
[ "0.6035166", "0.6031666", "0.59717625", "0.5877043", "0.58650154", "0.58472425", "0.58042365", "0.5766131", "0.5722819", "0.57125443", "0.5711555", "0.5703637", "0.5701937", "0.56938225", "0.56853163", "0.5676029", "0.5658372", "0.5654838", "0.56435096", "0.5631654", "0.56157...
0.0
-1
Daca interarea contine numar par va afisa index + " este numar par" Daca nu va afisa index + " este numar impar"
function evenornot() { for (i = 0; i <= 20; i++) { if (i === 0 || i % 2 === 0) { console.log(i + " este numapr par") } else { console.log(i + " este numar impar") } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function numero(xx) { //recoge el n&uacute;mero pulsado en el argumento.\r\n if (x==\"0\" || xi==1 ) { // inicializar un n&uacute;mero, \r\n pantalla.innerHTML=xx; //mostrar en pantalla\r\n x=xx; //guardar n&uacute;mero\r\n if (xx==\".\") { //si escribimo...
[ "0.6295263", "0.62941647", "0.62894243", "0.6265098", "0.6197306", "0.614476", "0.6094336", "0.6076483", "0.60140204", "0.5949709", "0.5943853", "0.59407085", "0.59331876", "0.5926575", "0.5915112", "0.5907834", "0.58783054", "0.5864201", "0.58492273", "0.5813328", "0.5802126...
0.0
-1
Declar o functie multiply care va itera de la 010 Pentru ficare iteratie multiplica cu 9 Afiseaza resultatul pentru fiecare.
function multiply() { for (i = 0; i <= 10; i++) { var mul = i * 9; console.log(mul); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "multiply(times) {\n\n }", "multiply() {\n this.result = arguments[0];\n\n for (let i = 0; i < arguments.length; i++) {\n this.result *= arguments[i];\n }\n return this.result;\n }", "function multiplicar (){\n return numeroUno * numeroDos\n}", "multiply() {\n return this.number...
[ "0.75214785", "0.7331149", "0.72466236", "0.72424203", "0.72200996", "0.7189429", "0.7157188", "0.7124935", "0.705254", "0.7047071", "0.7035023", "0.6984208", "0.6983029", "0.69776875", "0.69406843", "0.6938719", "0.69180197", "0.691126", "0.6887886", "0.68566054", "0.6848839...
0.7342185
1
Declar o functie mathematics care va itera de la 010 Pentru ficare iteratie multiplica cu 1 Afiseaza resultatul pentru fiecare inetratia aratand toata operatia.
function mathematics() { for (i = 0; i <= 10; i++) { var mul = i * 1; var res = "1*" + i + "=" + mul console.log(res) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "calcularIMC() {\n const peso = this.peso;\n const altura = this.altura;\n return (peso / altura * altura)\n }", "function calcAll() {\n // Iteration 1.2\n\n}", "function calcular() {\r\n console.log(\"SUMA: \" + (6 + 6));\r\n console.log(\"RESTA: \" + (6 - 6));\r\n console.log(\"MULTIPLICAC...
[ "0.64353734", "0.6422533", "0.6308661", "0.6297704", "0.6270872", "0.626987", "0.6240646", "0.6184506", "0.6178447", "0.61782825", "0.6131435", "0.6119348", "0.61080384", "0.60986596", "0.6070745", "0.60702145", "0.60611784", "0.6055958", "0.6027692", "0.6013678", "0.59983796...
0.61383086
10
Declar o functie test care va itera de la 010 Pentru iteratia cuprinsa intre 13 afiseaza Calificativul E Pentru iteratia cuprinsa intre 46 afiseaza Calificativul D Pentru iteratia cuprinsa intre 78 afiseaza Calificativul B Pentru iteratia 9 afiseaza Calificativul A Pentru iteratia 10 afiseaza Calificativul A+
function test() { for (i = 0; i <= 10; i++) { if (i >= 1 && i <= 3) { var grade = 'E'; console.log('Calificatul corespunzator punctajului ' + i + ' este ' + grade + " ."); } else if (i >= 4 && i <= 6) { var grade = 'D'; console.log('Calificatul corespunzator punctajului '...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function testaSegundo(a){\n if(sc < 10){\n var a = \"0\";\n return a + sc;\n }else{\n return sc;\n }\n }", "function sumaIgFunc(niz, ajdi)\n{\n\tvar tmp = 0;\n\tfor (var i=8; i<12; ++i)\n\t{\n\t\tif(niz[i] >= 0)\n\t\t\ttmp += niz[i];\n\t\n\t}\n\n\tdocument.getElementById(...
[ "0.61371124", "0.61092854", "0.6056134", "0.6014733", "0.6013012", "0.59916604", "0.5964572", "0.5951712", "0.594553", "0.5936714", "0.59299153", "0.5922462", "0.5911998", "0.59097934", "0.588239", "0.5867988", "0.5859336", "0.5839067", "0.5830549", "0.5828537", "0.5815147", ...
0.6133102
1
Fake production implementations to simplify example test of subject
function get (url, cb) { if (url.indexOf('https') !== 0) { cb(new Error('SSL only!')) } else { cb(null, 'some data!') } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function shareSubjectFactory() {\n return new Subject/* Subject */.xQ();\n}", "function mockThingFrom(url) {\n const iri = internal_toIriString(url);\n const thing = {\n type: \"Subject\",\n predicates: {},\n url: iri\n };\n return thing;\n}", "function fakeUsage() {\n var fakeObj = fake('ex...
[ "0.6006108", "0.5743157", "0.56721383", "0.5611278", "0.5503084", "0.5472984", "0.5472984", "0.54060936", "0.5347873", "0.533629", "0.5278851", "0.52468145", "0.5173378", "0.5173378", "0.5173378", "0.5160805", "0.51532125", "0.51532125", "0.51367533", "0.51283336", "0.5099880...
0.0
-1
CODE FOR HOVER event CODE FOR CLICK EVENT
function showSubmenu() { if (window.matchMedia("(max-width: 600px)").matches) { let submenu = document.querySelector(".navigationBar__item.dropdown > .navigationBar__submenu"); let dropdowns = document.querySelectorAll(".navigationBar__directory__menu .navigationBar__item.dropdown > a"); let navBa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "e_mouseOver(e)\n\t{\n\n\t}", "function handleMouseOverDist(e) {\n\t\t\t\te.currentTarget.addClassName('active');\n\t\t\t\tvar parent = $(e.currentTarget).parent().get(0);\n\n\t\t\t\ttheInterface.emit('ui:emphElement', {\n\t\t\t\t\tid : e.currentTarget.getAttribute('id'),\n\t\t\t\t\tlayer : parent.getAttribute('d...
[ "0.6838215", "0.6757489", "0.6696629", "0.6565092", "0.64952123", "0.6331075", "0.6314772", "0.6299043", "0.6295824", "0.623843", "0.6234433", "0.6222736", "0.6197696", "0.6186538", "0.61756366", "0.616212", "0.616129", "0.61544216", "0.6148808", "0.61424935", "0.61016726", ...
0.0
-1
WARNING : each hook number of one player has to be different and have to correspond with its index in his hooks array
constructor(player, number) { this.x = 0; this.player = player; this.size = this.player.totalHeight; this.color = this.player.hookColor; this.width = 10; this.speed = 8; this.isShot = false; this.number = number; this.damage = 1; this.thro...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "findAvailableHook() {\n let i = 0;\n let availableHook = 0;\n\n this.hooks.forEach(hook => {\n if (!hook.isShot) {\n availableHook = i;\n }\n i++;\n });\n\n return availableHook;\n }", "function hooks(){return hookCallback.appl...
[ "0.650785", "0.6287524", "0.6287524", "0.61769915", "0.5731861", "0.56998765", "0.5672969", "0.5671421", "0.5626342", "0.5596098", "0.55217254", "0.5518891", "0.5513114", "0.5513114", "0.54272443", "0.53770727", "0.53569174", "0.53436494", "0.53203976", "0.5298868", "0.526301...
0.5293769
20
Initializing parameters so the shot goes from the middle of the player
shoot(x) { this.x = x; this.isShot = true; playSound(this.throwSound); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setupPlayer() {\n playerX = 4 * width / 5;\n playerY = height / 2;\n playerHealth = playerMaxHealth;\n playerStamina = playerMaxStamina;\n}", "function init() \r\n\t{\r\n\t\tplayer1.x = player1.width;\r\n\t\tplayer1.y = (HEIGHT - player1.height)/2;\r\n\t\tplayer2.x = WIDTH - (player1.width + player2...
[ "0.6635837", "0.6617786", "0.63766176", "0.63766176", "0.63766176", "0.63712966", "0.6328821", "0.6132897", "0.61001164", "0.6097896", "0.60466415", "0.6042383", "0.6029054", "0.6028026", "0.59873664", "0.5959928", "0.5919564", "0.5892963", "0.5886432", "0.5883142", "0.588135...
0.0
-1
Function to call when the hook has to be removed, so when it touches the sky, a ball, or the player dies
remove() { stopSound(this.throwSound); this.isShot = false; this.player.hookNumber ++; this.size = this.player.totalHeight; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeCandy(){\n removeGameObject(candy);\n\n}", "gotKilledHeroTank() {\n\n //Move completely to another scene.\n\n engine.stopRenderLoop();\n\n var scene = Game.scenes[Game.activeScene];\n\n Game.activeScene = END_MENU_SCENE_VALUE;\n //Stop playing the game music\n...
[ "0.65839845", "0.65717065", "0.63856405", "0.63815796", "0.6377587", "0.63692456", "0.6348541", "0.6347833", "0.63268614", "0.63118905", "0.6290332", "0.6290332", "0.62626565", "0.6218722", "0.62146777", "0.6174521", "0.6172064", "0.61373883", "0.61120605", "0.6110657", "0.61...
0.6521076
2
Creates a div for each fusion
function fusesToHTML(fuselist) { return fuselist .map(function (fusion) { var res = "<div class='result-div'>Input: " + fusion.card1.Name + "<br>Input: " + fusion.card2.Name; if (fusion.result) { // Equip...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createShips(){\n ships.forEach(function(element){\n let divContainer = document.createElement(\"div\");\n divContainer.id = element.name;\n divContainer.classList.add(\"ship\");\n shipContainer.appendChild(divContainer)\n for (let i=0; i<element.size; i++){\n ...
[ "0.6406622", "0.63210946", "0.62921333", "0.6268737", "0.6249647", "0.6228616", "0.6201158", "0.62006235", "0.61608386", "0.6136232", "0.6110349", "0.60520536", "0.60177547", "0.6010004", "0.6010004", "0.6007515", "0.59692925", "0.5964353", "0.59637696", "0.5956664", "0.59502...
0.5957998
19
Returns the card with a given ID
function getCardById(id) { var card = card_db({ Id: id }).first(); if (!card) { return null; } return card; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCardById(cardId) {\n return cards[`${Number(cardId)}`];\n}", "function getCardById(id) {\n return new Promise((resolve, reject) => {\n mustBeInArray(cards, id)\n .then(card => resolve(card))\n .catch(err => reject(err))\n })\n}", "function getCardById(id) {\n var tm...
[ "0.7906458", "0.78781515", "0.7795369", "0.76626766", "0.75218314", "0.74411505", "0.7204775", "0.7113096", "0.7038251", "0.7034567", "0.6925665", "0.68365026", "0.67304856", "0.6695781", "0.6666077", "0.65953654", "0.6587919", "0.656956", "0.6520371", "0.643336", "0.64222157...
0.8393664
0
Returns true if the given card is a monster, false if it is magic, ritual, trap or equip
function isMonster(card) { return card.Type < 20; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "canAttach(player, card) {\n if(!card) {\n return false;\n }\n\n if((this.getType() !== 'goods') && (this.getType() !== 'spell')) {\n return false;\n }\n if(card.getType() !== 'dude' && card.getType() !== 'outfit' && card.getType() !== 'deed') {\n ...
[ "0.6465585", "0.63562024", "0.6255288", "0.6145663", "0.6131721", "0.5982029", "0.5837564", "0.5711879", "0.57008857", "0.5641282", "0.5552217", "0.553922", "0.55229783", "0.5516892", "0.54760605", "0.5431641", "0.54316294", "0.54015934", "0.53773", "0.535739", "0.5351039", ...
0.7578848
0
Checks if the given card is in the list of fusions Assumes the given card is an Object with an "Id" field TODO: Generalize to take Object, Name (string) or Id (int)
function hasFusion(fusionList, card) { return fusionList.some((c) => c.Id === card.Id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPlayableCards(obj) {\n if(obj.type == \"pCard\" || obj.type == \"vCard\" || obj.type == \"uCard\"){\n return true\n }\n}", "function objectInList(object, objectList) {\n for(var i = 0; i < objectList.length; i ++)\n if(object.id == objectList[i].id)\n return true;\n \n ...
[ "0.6396545", "0.62371796", "0.622987", "0.6127181", "0.6119517", "0.6004702", "0.59953463", "0.59848994", "0.5963523", "0.5933663", "0.5919466", "0.5919442", "0.5891476", "0.58860666", "0.58657265", "0.5807003", "0.5777341", "0.5753491", "0.5742167", "0.5736561", "0.5643127",...
0.8005038
0
Identify if the current route is a match.
computeMatch(pathname) { if (!pathname) { const location = this.activeRouter.get('location'); pathname = location.pathname; } const match = matchPath(pathname, { path: this.urlMatch || this.url, exact: this.exact, strict: this.strict ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static match(route, req) {\n return (req.url == route);\n }", "hasRoute(route) {\r\n return this.router.url === route;\r\n }", "function activeRoute(routeName) {\n return location.pathname === routeName;\n }", "activeRoute(routeName) {\n\t\treturn this.props.location.pathname.indexOf(...
[ "0.7351833", "0.6830338", "0.6773697", "0.67072654", "0.6612972", "0.65883565", "0.656572", "0.6541631", "0.6541631", "0.6541186", "0.65117604", "0.65117604", "0.65117604", "0.65117604", "0.65117604", "0.64940953", "0.6484271", "0.6466492", "0.63912606", "0.6382596", "0.63797...
0.0
-1
Get the URL for this route link without the root from the router
getUrl(url) { const root = this.activeRouter.get('root') || '/'; // Don't allow double slashes if (url.charAt(0) == '/' && root.charAt(root.length - 1) == '/') { return root.slice(0, root.length - 1) + url; } return root + url; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getUrl() {\n var _a;\n const routerLink = (_a = this.routerLink) !== null && _a !== void 0 ? _a : this.routerLinkWithHref;\n return routerLink\n ? this.router.serializeUrl(routerLink.urlTree)\n : undefined;\n }", "toLinkUrl() {\r\n return this.urlPath + this._...
[ "0.7720534", "0.66872084", "0.6509898", "0.6246291", "0.6076153", "0.60651183", "0.5996488", "0.5985963", "0.59791726", "0.5964139", "0.5918045", "0.5910929", "0.58841294", "0.5825847", "0.5819324", "0.58013636", "0.579031", "0.5784698", "0.56981397", "0.5688379", "0.56878066...
0.5757532
18
Komponentti, jolla muokataan nimikkeen tietoja. Koostuu Content ja ItemFormkomponenteista.
function EditItem(props) { // Tuodaan propsien kautta muokattavan nimikkeen id ja etsitään sen indeksi props.datasta const index = props.data.findIndex(item => item.id === props.match.params.id); // Käytetään datana vain kyseisen nimikkeen dataa let itemData = props.data[index]; return ( <...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ciniki_info_artists() {\n this.content_type = 20;\n this.init = function() {\n //\n // The panel to display the add form\n //\n this.edit = new M.panel('Artists',\n 'ciniki_info_artists', 'edit',\n 'mc', 'medium mediumaside', 'sectioned', 'ciniki.inf...
[ "0.63443285", "0.5916416", "0.5785845", "0.57830524", "0.57527524", "0.5749684", "0.57410806", "0.5728815", "0.5720835", "0.5659998", "0.5650368", "0.5641169", "0.5625461", "0.5611085", "0.56041825", "0.5570006", "0.5565287", "0.5550837", "0.5539174", "0.54860866", "0.5479985...
0.58214533
2
Postprocess for colors, fonts and expressions
function postProcess(prg) { for (var i = 0; i < prg.length; i++) { var operation = prg[i], proto = Primitives[operation.command].defaults; for (var propertyName in operation) { if (!(propertyName in proto)) continue; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function colorize (text) {\n var segment = {text: '', idx: 0};\n var segments = [segment];\n var classes = [];\n var obj = {segments, classes};\n var unmatchedTick;\n var unmatchedTickIdx;\n\n var cur = {initial: true};\n colorcode_to_json(text).lines.forEach(l => {\n l.forEach(c => {\n if (cur.new...
[ "0.5667938", "0.5553609", "0.552746", "0.54945296", "0.544335", "0.5325289", "0.5325289", "0.5325289", "0.5325289", "0.5323127", "0.52888536", "0.5272433", "0.5272433", "0.5272433", "0.5272433", "0.5272433", "0.5272433", "0.5272433", "0.5272433", "0.5272433", "0.5272433", "...
0.55668634
1
Determine if the array or object contains a given item (using `===`).
function contains(obj, item, fromIndex, guard) { if (!_isArrayLike(obj)) obj = values(obj); if (typeof fromIndex != 'number' || guard) fromIndex = 0; return indexOf(obj, item, fromIndex) >= 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _has(item, arr) {\n var i = 0;\n var l = arr.length;\n for (i = 0; i < l; i++) {\n if (arr[i] === item) {\n return true;\n }\n }\n\n return false;\n }", "function contains(array, item) {\n ...
[ "0.7470954", "0.74432", "0.732745", "0.732745", "0.7323853", "0.7254758", "0.7252696", "0.7252696", "0.7252696", "0.7252696", "0.7252696", "0.7252696", "0.7252696", "0.7252696", "0.7252696", "0.72202945", "0.72176135", "0.7194775", "0.71704113", "0.71704113", "0.71704113", ...
0.7208598
17
let array = [[10,2], [1,52], [6,8], [2,1] ]; / lastarrayList =[[10,9], [10,52] ]
function habashtakalat(){ array.forEach((row,i) =>{ lastarrayList[i] = ( row.map( function(element, j) { if(element > arrThis[i][j]){ return element; }; return arrThis[i][j]; }, arrThis[i])); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function finalArray(array){\n let rep=null;\n if(Array.isArray(array)){\n rep=array[array.length-1];\n }\n return rep;\n}", "function lastOfArray(array){\n return array[array.length-1];\n}", "function gettingLast(array){\n\t\tfor (var i = 0; i < array.length; i++){\n\t\t\tvar lastArray = a...
[ "0.6989639", "0.6812785", "0.6795885", "0.67142844", "0.6587775", "0.6566779", "0.65614325", "0.6543297", "0.64508283", "0.6414383", "0.6411724", "0.64080185", "0.63232684", "0.6321539", "0.6321539", "0.6321539", "0.62978387", "0.62886304", "0.6286123", "0.6285019", "0.628466...
0.6063656
40
this only updates component/local state
handleChange(e) { e.persist(); let myObj = Object.assign({}, this.state.notebook); myObj[e.target.name] = e.target.value; this.setState({notebook:myObj}); this.trueChange(e.target.name, e.target.value) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update() {\n // ... no implementation required\n }", "update() {\n // Subclasses should override\n }", "function _update() {\r\n this.component[this.prop] = this.control[this.prop];\r\n }", "_update() {\n // Call subclass lifecycle method\n const stateNeedsUpdate ...
[ "0.7082996", "0.6937161", "0.6926518", "0.6922637", "0.68373156", "0.6774749", "0.6771298", "0.67486423", "0.6730258", "0.66974074", "0.66922086", "0.66922086", "0.6649825", "0.6649232", "0.6647232", "0.6647232", "0.6640729", "0.6618063", "0.66017866", "0.66002506", "0.659659...
0.0
-1
FUNCION PARA QUITAR ESPACIOS
function quitaEspacios(mensaje){ mensaje = mensaje.toUpperCase();//hacemos que nuestra frase solo este en mayusculas let mensajeSinESpacio = ""; for (letra of mensaje){//recorremos todo nuestro string if (letra !== " ") {//si el caracter en esa iteracion no es un espacio en blanco mensa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function quitarMensaje() {\n document.getElementsByTagName('span')[0].textContent = \"\";\n clearInterval(cuentaAtras);\n }", "function escreveConteudo(){}", "function eliminarlme() {\n var eliminarlme = document.getElementById(\"eliminarlme\");\n\n var texto =\n \"Para 'folio mal consumi...
[ "0.6133508", "0.6120737", "0.5716791", "0.56282276", "0.55992854", "0.5499636", "0.5478656", "0.54491687", "0.5439627", "0.5434873", "0.542998", "0.54241073", "0.5391459", "0.5373052", "0.5355297", "0.53001976", "0.52897245", "0.52801025", "0.5278892", "0.52641714", "0.526319...
0.58998996
2
FUNCION PARA RELLENAR LAS PALABRAS QUE NO TENGAN LA LONGUITUD DE LA LLAVE
function completaCadena(cadena) { //const lon_cadena = cadena.length; console.log("--------------------completa cadena----------------------"); let cse = cadena; let contador = cadena.length; console.log(`valor de la cadena: ${cse}, longuitud de cadena: ${contador}`); while (contador != llave) {...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function verRepeticion(cadena) {\n cargarCadenaMovimientos(cadena);\n // Muestro el primer movimiento de la partida\n crearEventosMovRepeticion();\n cargarTablero(1);\n estilosMovActualRep(0);\n}", "function listarAvionetasDespegadasDuranteElDia() {\n var contador = 0;\n\n console.log('-----...
[ "0.60953355", "0.6070765", "0.60020673", "0.59794056", "0.58810455", "0.5878426", "0.5780674", "0.5780146", "0.57774013", "0.5759959", "0.5732702", "0.5685874", "0.56791407", "0.56762344", "0.5673918", "0.5658431", "0.56421494", "0.56394875", "0.5637914", "0.5634792", "0.5629...
0.5324549
92
FUNCION PARA AGREGAR LAS FILAS AL ARREGLO
function creaFilas(mensaje) { const lon_cadena = mensaje.length;//constante que guarda el valor de la longuitud del mensaje actual let conteo_cadena = 0;//varaible que nos ayudara a llevar el conteo de las letras que van let contador = 0;//variable que nos ayudara a llevar el conteo de las cadenas de cada f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function insertarDatosTablaPuntosRuta(aux){\r\n var features = new Array();\r\n \r\n var pt = new OpenLayers.Geometry.Point(aux.x,aux.y);\r\n pt.transform( new OpenLayers.Projection( \"EPSG:4326\" ),\r\n new OpenLayers.Projection( \"EPSG:900913\" ) );\r\n \r\n var idPt = new OpenLayers.Fea...
[ "0.6054657", "0.60478085", "0.5958289", "0.5915341", "0.5904856", "0.5891071", "0.58836997", "0.58826125", "0.588017", "0.58790517", "0.58699775", "0.58655983", "0.5847705", "0.58465403", "0.58436614", "0.58431584", "0.58115655", "0.58087873", "0.5806592", "0.5796198", "0.579...
0.5509455
53
FUNCION QUE CREA LOS MENSAJES DE CADA COLUMNA
function creaColumnas() { for (let i = 0; i < llave; i++) { arrColumnas.push(""); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function municoesAndam(){\n\tif(jogoEmAndamento==true){\n\t\tmunicoes.forEach(andarMunicao);\n\t}\n}", "function mossa(pos)\n{\n//reset in casella statistiche e messaggi a sinistra dello schermo\n\tdocument.getElementById(\"faccia\").innerHTML=\"(• ‿ •)\";\n\tif(colturno=='n')\n\t\tdocument.getElementById(\"mess...
[ "0.6695701", "0.6647984", "0.65585685", "0.63328063", "0.6303137", "0.6219235", "0.6213135", "0.61959386", "0.61944926", "0.61926717", "0.6187321", "0.6140759", "0.6114268", "0.6081196", "0.6075821", "0.6073087", "0.60651034", "0.60630774", "0.6026903", "0.60093886", "0.59840...
0.0
-1
parses the circular JSON geocoding returns
function formatLongLat(lat, long) { console.log('inside formatLonLat, will return ' + lat + ',' + long); return lat + ',' + long; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getGeolocation() {\n // console.log(this.responseText);\n var data = JSON.parse(this.responseText);\n var results = data.results;\n results.forEach(function (element) {\n console.log(element.geometry.location);\n var ubication = {\n lat: element.geometry.location.lat,\n ...
[ "0.6495812", "0.6301549", "0.6273383", "0.6242383", "0.61158013", "0.6068177", "0.6059817", "0.60579836", "0.6051345", "0.601794", "0.60173637", "0.60165864", "0.5993494", "0.59806097", "0.5974748", "0.5895491", "0.58525723", "0.5849817", "0.5838932", "0.58259135", "0.5825423...
0.0
-1
cuando se elimina la politica de acl para el resoruce de rol
function destroy(req, res){ var aclId = req.query.aclId; if(!aclId) return res.status(404).send('Parametro invalido!'); db.sequelize.transaction(function (t) { var deferred = when.defer(); db.acl.find({ where: {id: aclId}, include: [{model: db...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "RemoveThisACL(block, serviceName) {\n let url = `/cluster/hadoop/${serviceName}/networkAcl/${block}`;\n return this.client.request('DELETE', url);\n }", "function removerUnidadeCurricular(aluno)\r\n{\r\n\tvar id_uc = validaRadioSeleccionado(\"rb_uc\");\r\n\tvar nome;\r\n\t\r\n\t// se o id da uni...
[ "0.6332095", "0.6256157", "0.61131483", "0.6062445", "0.59780747", "0.59433115", "0.5814339", "0.57899433", "0.5757568", "0.57500076", "0.5717506", "0.5699571", "0.5691151", "0.56869864", "0.56815696", "0.5672152", "0.56667393", "0.5627199", "0.56264085", "0.56235546", "0.561...
0.6245394
2
commander passes the Command object itself as options, extract only actual options into a fresh object.
function cleanArgs(cmd) { const args = {}; cmd.options.forEach(o => { const key = camelize(o.long.replace(/^--/, '')); // if an option is not present and Command has a method with the same name // it should not be copied if (typeof cmd[key] !== 'function' && typeof cmd[key] !== '...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cleanArgs(cmd) {\n const args = {};\n cmd.options.forEach(o => {\n const key = o.long.replace(/^--/, '');\n // if an option is not present and Command has a method with the same name\n // it should not be copied\n if (typeof cmd[key] !== 'function') {\n args[key] = cmd[key];\n }\n }...
[ "0.6838443", "0.68117976", "0.68117976", "0.67967933", "0.6155805", "0.602971", "0.5892108", "0.57659096", "0.5665315", "0.5632833", "0.5621401", "0.5595659", "0.55938566", "0.55938566", "0.5550799", "0.5550419", "0.5531922", "0.55205685", "0.5480293", "0.5420454", "0.541094"...
0.6723477
4
end map info box width is a function of height since most displays are longer than they are wide
function showInfoBox(new_cases, total_cases, new_deaths, total_deaths) { /*return '<div class="container-fluid flex-wrap" style="width: 25vh; font-size: 15px">' + '' + '<div class="row"> ' + '<div class="col-6 d-flex justify-content-end" style="color: #000000">New Cas...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findSize() {\n\t// pobiera wysokosc szerokosc okna\n\tvar height = $(window).height();\n\tvar width = $(window).width();\n\n\t// wysokosc i szerokosc 2panelow: na gorze i po prawej\n\tvar heightTopPanel = $(\".topPanelContainer\").height() + 70;\n\tvar widthInfoPanel = $(\".infoPanelContainer\").width() +...
[ "0.73841584", "0.73279864", "0.7085783", "0.69612235", "0.6722817", "0.67215234", "0.66316503", "0.6573447", "0.65732783", "0.65698457", "0.6563934", "0.65564233", "0.6531021", "0.64327294", "0.6426476", "0.6411298", "0.63688105", "0.63688105", "0.6361996", "0.63616693", "0.6...
0.0
-1
Return falcor paths as specified by: FalcorPath can depend on props only (to get server side rendering working) Also you cannot as of now make the first keySet in a pathSet an array as being able to pass an array of pathSets properly depends on that. And hopefully it shouldn't be necessary either
static getFalcorPathSets(params) { throw new TypeError( "You must implement the getFalcorPathSets method " + "in children of FalcorController" ) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set RenderPaths(value) {}", "getPathNames() {\n return Object.keys(paths)\n }", "get RenderPaths() {}", "build_paths() {\n return {\n items: {\n list: { // Returns a list of items\n method: \"GET\",\n path: \"[pat...
[ "0.64826095", "0.61243594", "0.61136085", "0.6079266", "0.6018653", "0.59312296", "0.5839411", "0.5836442", "0.57923055", "0.57797587", "0.57797587", "0.57544744", "0.57121754", "0.5711973", "0.5664483", "0.56609243", "0.56609243", "0.56579155", "0.5605592", "0.5598605", "0.5...
0.64163375
1
Retrieves all the data for this component from the Falcor cache and store on state. Used for server side render and first client side render this should always contain all the data the component needs
loadFalcorCache(falcorPathSets) { falcorPathSets = validateFalcorPathSets(falcorPathSets); if (falcorPathSets === undefined) { this.safeSetState({ ready: true, data: null }); return; } const data = expandCache(this.props.model.getCache(...falcorPathSets)); if (data...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "fetchData() {\n this.initLoading();\n let qs = this.setAndGetQuerySetFromSandBox(this.view, this.qs_url);\n this.data.instance = qs.cache = qs.model.getInstance({}, qs);\n this.setLoadingSuccessful();\n this.getParentInstancesForPath();\n ...
[ "0.7135021", "0.7135021", "0.71006095", "0.6513383", "0.64994204", "0.6422371", "0.6358964", "0.632742", "0.63007206", "0.62995076", "0.6299238", "0.62131685", "0.62128294", "0.6175727", "0.61726433", "0.615882", "0.615882", "0.6157794", "0.6140941", "0.6140436", "0.6133953",...
0.5791121
54
Makes falcor fetch its paths
falcorFetch(falcorPathSets) { falcorPathSets = validateFalcorPathSets(falcorPathSets); if (falcorPathSets === undefined) { this.safeSetState({ ready: true, data: null, }); return; } this.safeSetState({fetching: true, error: null}); setLoading(this.uuid, true); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async prepare(paths) {\n\t\t\tawait ___R$project$rome$$internal$async$promiseAllFrom_ts$default(\n\t\t\t\tpaths,\n\t\t\t\tasync (path) => {\n\t\t\t\t\treturn ___R$project$rome$$internal$fs$FileNotFound_ts$default.allowMissing(\n\t\t\t\t\t\tpath,\n\t\t\t\t\t\t() => this.server.fileAllocator.getOrAssignOwner(path),\...
[ "0.59706104", "0.5873521", "0.55166656", "0.5501286", "0.5417195", "0.5366912", "0.5278914", "0.5271597", "0.5249409", "0.52183", "0.52152276", "0.51583004", "0.51350904", "0.5114752", "0.51090074", "0.5085057", "0.49808434", "0.4977528", "0.49714983", "0.4964003", "0.4904897...
0.62759715
0
If the new props requires a new falcor call this will pick it up and refresh the falcor state
componentWillReceiveProps(nextProps) { const newPathSets = this.constructor.getFalcorPathSets(nextProps.params) const oldPathSets = this.constructor.getFalcorPathSets(this.props.params) if (!_.isEqual(oldPathSets, newPathSets)) { this.safeSetState({ready: false}); if (pathSetsInCache(this.props....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "componentDidUpdate(prevProps) {\n if (this.props.refresh!== prevProps.refresh) {\n this.fetchRecipes(this.props.url);\n }\n }", "componentWillReceiveProps(newProps) {\n if(newProps !== this.props.artists) {\n this.updateDataSource(newProps.artists)\n }\n }", "componentDi...
[ "0.61385995", "0.587706", "0.58364975", "0.5821564", "0.58179224", "0.5817089", "0.5806401", "0.5797162", "0.5756466", "0.5722474", "0.5719388", "0.5717036", "0.5688834", "0.5687246", "0.5685487", "0.5684646", "0.5679448", "0.56733215", "0.56729865", "0.5671107", "0.56698614"...
0.6281649
0
isAppReady() is always false on server, and false for first render on client only. This is to avoid an immediate falcorFetch on the first clientside render
componentWillMount() { const falcorPathSets = this.constructor.getFalcorPathSets(this.props.params); if (!isAppReady() || pathSetsInCache(this.props.model.getCache(), falcorPathSets)) { this.loadFalcorCache(falcorPathSets) } else { this.falcorFetch(falcorPathSets) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isAppReady() {\n return tslib_1.__awaiter(this, void 0, void 0, function* () {\n return (electron_1.app.isReady() ||\n // tslint:disable-next-line: no-promise-as-boolean\n new Promise(resolve => {\n electron_1.app.once('ready', resolve);\n }));\n ...
[ "0.73426664", "0.6967246", "0.6829407", "0.67312366", "0.6518179", "0.64347714", "0.6425142", "0.6338377", "0.6326005", "0.6302589", "0.6301819", "0.6293488", "0.6278209", "0.6276828", "0.6276828", "0.62626666", "0.6257962", "0.6242257", "0.6242257", "0.6175558", "0.61656857"...
0.0
-1
listed below. Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path. It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the compiled fil...
function getusers() { var column_name_value = $('#column_name option:selected').text(); jQuery.ajax({ data: {column_name_value: column_name_value}, type: 'get', url: "/users/get_users/:column_name", success: function (data, status, xhr) { var users_string = "<table...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function js(cb){\n src([jquery,bootstrap_js]).pipe(dest(jsDest));\n cb();\n}", "function js() {\n return gulp.src( 'src/assets/js/*' )\n .pipe( gulp.dest( './build/assets/js/' ) );\n}", "function javascript() {\n return gulp.src('src/assets/js/*.js')\n //.pipe($.sourcemaps.ini...
[ "0.61135674", "0.6107097", "0.60019207", "0.5684003", "0.5665043", "0.55027854", "0.5494648", "0.54915476", "0.54551905", "0.54466754", "0.5438872", "0.54200464", "0.540226", "0.5367806", "0.5354886", "0.53437304", "0.5312203", "0.5301405", "0.5283978", "0.52693474", "0.52610...
0.0
-1
end insertAdjacent code :::::::::::::::: :::: Styles ::: ::::::::::::::::
function setSTYLES() { mainTABLEElement=document.getElementById("mainTable"); TDCol=mainTABLEElement.getElementsByTagName("TD"); for (s=0; s<TDCol.length; s++) {TDCol.item(s).style.verticalAlign='top';} // Set Transparency level if(navigator.appName == 'Microsoft Internet Explorer') {document.getElementByI...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "insertCss() { }", "function insertStyles() {\n let head = document.getElementsByTagName('head')[0];\n let lastHeadElement = head.lastChild;\n let style = document.createElement('style');\n const styleArray = [];\n style.type = 'text/css';\n // Prism css\n styleArr...
[ "0.7625018", "0.7204694", "0.67867017", "0.6731379", "0.6722029", "0.6697033", "0.6685152", "0.66542405", "0.66435915", "0.66398114", "0.66315", "0.6593532", "0.6589939", "0.6581588", "0.65743417", "0.6561809", "0.6534026", "0.6521659", "0.6505601", "0.6489181", "0.6482985", ...
0.0
-1
Attach event handlers to all images within container
function attachEventhandlers() { mainTABLEElement=document.getElementById("mainTable"); TABLECol=mainTABLEElement.getElementsByTagName("TABLE"); if (TABLECol!=null){ for (l=0; l<TABLECol.length; l++) { THCol=TABLECol.item(l).getElementsByTagName("TH"); if (THCol.item(0)!=null || THCol.length>0){ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addClickEvents()\n{\n\tvar allImg = document.getElementsByTagName(\"img\");\n\t\n\tfor (var i = 0; i < allImg.length; i++)\n\t{\n\t\tallImg[i].addEventListener('click', imgClicked);\n\t}\t\n}", "function addListeners() {\n //get the elements to add listener and change image\n let cardConta...
[ "0.69883716", "0.68722", "0.6858977", "0.678566", "0.67639506", "0.6662714", "0.6638437", "0.6638437", "0.65555334", "0.6553622", "0.6461543", "0.64371693", "0.6403988", "0.6367308", "0.632641", "0.6303331", "0.627316", "0.62610555", "0.6257459", "0.6249383", "0.6214595", "...
0.0
-1
Script for side navigation
function w3_open() { var x = document.getElementById("mySidebar"); x.style.width = "300px"; x.style.paddingTop = "10%"; x.style.display = "block"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ActivateSideNav() {\n $('.button-collapse').sideNav();\n }", "function openNav() {\n $('#nav-list li').removeClass('treelisthidden');\n storage.setItem(treesettings, '1');\n $('#sideNavigation').css('display', 'block');\n\n $('#sideNavigation').css('width', '300px')...
[ "0.7191839", "0.68285304", "0.67455703", "0.67226994", "0.6669456", "0.66675055", "0.66130173", "0.65637517", "0.6550916", "0.65393615", "0.65360147", "0.652394", "0.650184", "0.64994746", "0.64974093", "0.64838094", "0.64599097", "0.6435298", "0.64262635", "0.6422248", "0.63...
0.0
-1
Used to toggle the menu on smaller screens when clicking on the menu button
function openNav() { var x = document.getElementById("navDemo"); if (x.className.indexOf("w3-show") === -1) { x.className += " w3-show"; } else { x.className = x.className.replace(" w3-show", ""); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function menuForSmallScreen() {\n navMenuList.hide();\n\n hideMenuBtn.addClass(ClassName.NONE);\n showMenuBtn.removeClass(ClassName.NONE);\n\n function toggleSmallMenu() {\n navMenuList.fadeToggle();\n toggleButtons();\n }\n\n function toggleMenuEvent...
[ "0.82376534", "0.7934679", "0.7712171", "0.7656171", "0.76337546", "0.7595096", "0.7595096", "0.75531495", "0.7503869", "0.7491289", "0.7491289", "0.74881387", "0.745432", "0.7432293", "0.7425227", "0.7412943", "0.7408285", "0.732453", "0.7315867", "0.7310945", "0.72825056", ...
0.0
-1
Take trimmester to to int: "Fall 2015" => 3
function parseTermNum(termStr){ if (termStr.includes('Fall')) { return 2; } else if (termStr.includes('Winter')) { return 0; } else { return 1; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function years(num){\n let years0,\n str1=num.toString(), \nsL=str1.length;\nif (sL==1) {s1=\"0\"; s2=str1} else { s2=str1.charAt(sL-2); s2=str1.charAt(sL-1)} \nif (s2==\"1\" && s1!=\"1\") {years0=' год '} else if \n((s2==\"2\"||s2==\"3\"||s2==\"4\" )&&s1!=\"1\") {years0=' года '} else {years0=' лет '};\nretur...
[ "0.59292203", "0.5723357", "0.56896824", "0.5634127", "0.5532463", "0.55248505", "0.5520275", "0.54773057", "0.5465696", "0.5376899", "0.53659713", "0.5347414", "0.5343928", "0.5324482", "0.5319156", "0.52885133", "0.5279394", "0.5277562", "0.5261666", "0.5255656", "0.5232878...
0.5487487
7
resize the canvas when the browswer window is resized
function windowResized() { resizeCanvas(windowWidth, windowHeight); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resizeCanvas() {\n\t\tcanvas.width = (window.innerWidth) - 150;\n\t\tcanvas.height = (window.innerHeight) - 100;\n\t\tredraw();\n\t}", "function resizeCanvas() {\n\t\tcanvas.width = (window.innerWidth) * .67;\n\t\tcanvas.height = (window.innerHeight) * .69;\n\t\tredraw();\n\t}", "function windowResize...
[ "0.8733377", "0.8707664", "0.8683047", "0.86543536", "0.8627434", "0.8625096", "0.86095", "0.8520772", "0.85148364", "0.8510904", "0.85073894", "0.85073894", "0.84835833", "0.84760356", "0.84738994", "0.8463918", "0.8463918", "0.845054", "0.845054", "0.845054", "0.845054", ...
0.84384495
51
Add or remove dropdowns to existing .opt_class div elements according to the attribute checkbox selected
function manage_existing_dropdowns(selected_attributes){ jQuery.each($(".opts_class:visible"), function() { var total_dropdowns = $(this).children('select:visible').length; var opts_id = $(this).attr('id'); if (total_dropdowns != 0) { //Check if ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update_classes_list(){\r\n\t// clean first\r\n\t$('select#div-class').empty();\r\n\t$('select#config-class-selected').empty();\r\n\t\r\n\t// add from css_classes object\r\n\tfor(let key in css_classes){\r\n\t\tlet tmp = $('<option></option').attr('value',key).text(key);// create node\r\n\t\t$('select#div-...
[ "0.6323819", "0.61943567", "0.6180685", "0.61268854", "0.6023743", "0.5938277", "0.5904146", "0.5886427", "0.5871046", "0.58637667", "0.5844931", "0.58014977", "0.5796576", "0.57548064", "0.5751975", "0.57455367", "0.5740506", "0.57397455", "0.57234424", "0.5709168", "0.57018...
0.7097049
0
Re calcula y asigna los indices en orden incremental para los dropdown que contienen las opciones. (Para que puedan ser captados sin problemas por el controlador)
function rename_dropdown_elements(cont) { var new_count = 0; //For each div .opts_class jQuery.each($(".opts_class:visible"), function() { $(this).attr("id", new_count); var visible_select = $(this).children('select:visible'); //For each select inside...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "UpdateIndex()\n {\n // Esvazia os indices.\n this.index = {};\n this.specialIndex = {};\n \n for(var i = 0; i < this.gameObjects.length; i++)\n {\n // Verifica se ja existe um objeto do mesmo tipo nos indices e o adiciona.\n if(this.index[this.game...
[ "0.6006367", "0.58652323", "0.5864661", "0.5864021", "0.5836204", "0.579515", "0.57092047", "0.56603396", "0.56593025", "0.56396985", "0.56396985", "0.56396985", "0.56396985", "0.559466", "0.5571403", "0.5523713", "0.5515839", "0.55085975", "0.5390258", "0.53886193", "0.53801...
0.50227016
59
Comparar cada id seleccionado con el correspondiente en los id para comparar y retornar true si la combinacion de esas opciones existe.
function is_similar(selectedIDS, comparisonIDS) { for (var i in comparisonIDS) { if(selectedIDS[i] != "none") { //si no coinciden if(comparisonIDS[i] !== selectedIDS[i]) { return false; } } } return true...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isOnChosenIdList(duplicate){\n for (chosenIngredientPos in $scope.chosenIngredientsId) {\n if ($scope.chosenIngredientsId[chosenIngredientPos] === duplicate){\n return true;\n }\n }\n return false;\n }", "contienePreguntas(id)\n {\n for (let i = 0; i < this.s...
[ "0.58130586", "0.57241046", "0.56180274", "0.54226464", "0.53882015", "0.5369464", "0.5344176", "0.5266185", "0.5253074", "0.52354", "0.5204005", "0.5173061", "0.5173011", "0.51727617", "0.516998", "0.51695126", "0.51695126", "0.5167317", "0.5160622", "0.51433235", "0.5142298...
0.6103881
0
Decrement/Increment number input in product show page
function decrement(e) { const btn = e.target.parentNode.parentElement.querySelector( 'button[data-action="decrement"]' ); const target = btn.nextElementSibling; let value = Number(target.value); value--; target.value = value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function qNumber() {\r\n\r\n\t// This button will increment the value\r\n\t$('.qtyplus').click(function(e){\r\n\t\t// Stop acting like a button\r\n\t\te.preventDefault();\r\n\t\t// Get the field name\r\n\t\tvar fieldName = $(this).attr('data-field');\r\n\t\t// Get its current value\r\n\t\tvar currentVal = parseInt...
[ "0.7038103", "0.6949599", "0.68768525", "0.6713246", "0.6680108", "0.6599639", "0.65967566", "0.6577134", "0.6549541", "0.65303594", "0.652976", "0.6519749", "0.6517767", "0.6511216", "0.649876", "0.6450163", "0.63560283", "0.63240224", "0.630256", "0.6299564", "0.62964344", ...
0.67586756
3
Starts the actual hashing process
_start() { if (!this.ready) { return this.emit('error', new Error('Cannot start before being ready')); } this.hashing = true; this.stopped = false; // Create piece objects. const pieces = []; for (let i = 0; i < this.pieces; i++) { pieces[i] = { buffer: null, len...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "start() {\n if (this._started) return;\n\n this.started = true;\n this._onHashChange({newURL: global.location.hash});\n }", "function calculate_full_hash(domain, username, pwd, pwd_strength) {\n var hw_key = domain + \"_\" + username;\n if (hw_key in hashing_workers)...
[ "0.5994297", "0.5793129", "0.5737152", "0.5725687", "0.5725687", "0.5668399", "0.56470245", "0.556718", "0.55508345", "0.5491844", "0.53841245", "0.5326193", "0.52804875", "0.5257124", "0.5228096", "0.5192965", "0.5175566", "0.51678365", "0.51555717", "0.5129547", "0.50918126...
0.0
-1
Allows pausing of the hashing process by storing functions from the file and read queues that will not get called back until resume() is called.
pause() { if (this.paused || !this.hashing) return false; this.paused = true; this.streamGroup.getStreams().forEach((rs) => { rs.pause(); }); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "resume() {\n this.paused = false;\n this.flush();\n }", "preloadSteam() {\n this.preloadComplete = false;\n const dt = 1 / EFACConstants.FRAMES_PER_SECOND;\n\n while ( !this.preloadComplete ) {\n this.step( dt );\n }\n }", "_start() {\n if (!this.ready) {\n return this.emit('er...
[ "0.5151241", "0.5094588", "0.50748706", "0.49865496", "0.49506614", "0.49184552", "0.4916528", "0.4914111", "0.48832178", "0.48824286", "0.48712006", "0.48324966", "0.48324966", "0.48324966", "0.48324966", "0.47580934", "0.4742632", "0.47298604", "0.47242188", "0.46819377", "...
0.0
-1
Continues hashing if paused or pauses if not.
toggle() { return this.paused ? this.resume() : this.pause(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "pause() {\n if (this.paused || !this.hashing) return false;\n this.paused = true;\n\n this.streamGroup.getStreams().forEach((rs) => {\n rs.pause();\n });\n\n return true;\n }", "resume() {\n this.paused = false;\n this.flush();\n }", "function step() {\n paused = true;\n e...
[ "0.57011974", "0.56473017", "0.56175846", "0.5588654", "0.5510592", "0.5408298", "0.5357536", "0.5326581", "0.5202823", "0.5202823", "0.5202823", "0.5202823", "0.5202823", "0.5197005", "0.5153579", "0.508631", "0.50436187", "0.5028235", "0.5002626", "0.49799854", "0.49799854"...
0.0
-1
Stops hashing completely. Closes file descriptors and does not emit any more events.
destroy() { if (!this.hashing) return false; this.stopped = true; this.paused = false; this.streamGroup.getStreams().forEach((rs) => { rs.destroy(); }); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "close() {\n if (this.exclusive) {\n // release device\n eviocgrab(this.fd, 0);\n }\n fs.close(this.fd, () => {\n this.emit('close', this);\n });\n this.fd = undefined;\n }", "shutdown () {\r\n for (let ix = 0; ix < this._sockets.length; ix++) {\r\n this.close(this._sockets[...
[ "0.6066782", "0.5820121", "0.5744431", "0.5742354", "0.56483686", "0.56483686", "0.56483686", "0.5640959", "0.5639327", "0.5639327", "0.5639327", "0.5639327", "0.5639327", "0.5639327", "0.5639327", "0.5639327", "0.5639327", "0.5639327", "0.5639327", "0.5639327", "0.5639327", ...
0.0
-1
Sends a list of usernames to all clients
function broadcastList() { var userList = userHandler.getUsers(); io.emit("user list", userList); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateUsernames() {\n io.sockets.emit('get users', Object.keys(users));\n }", "function updateUsernames() {\n io.sockets.emit('get users', users);\n }", "function updateUsernames(){\r\n io.sockets.emit('get users', users);\r\n}", "function updateUserNames(){ \n io.emit('get use...
[ "0.7868651", "0.78493756", "0.7786266", "0.76851577", "0.7644328", "0.7477964", "0.7476726", "0.7410205", "0.7382259", "0.72765017", "0.72292006", "0.70935816", "0.7011156", "0.6962806", "0.6947577", "0.6918327", "0.69153726", "0.6807091", "0.680073", "0.6707711", "0.66994953...
0.72636116
10
body > Only One Orion Context Entity (NGSI v1) > An element of contextResponses Array return > Only One Orion Context Entity (NGSILD)
function fromNGSIv1toNGSILD(body,ldContext){ /* var bodyContextResponses = body.contextResponses var bodyContextResponsesLength = bodyContextResponses.length var contextElement var entities={}; var attributes */ var contextElement = body.contextElement var entities={}; var attributes={}; va...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function message(context, text, sessionId) {\n var payload = {\n context,\n assistantId,\n sessionId,\n input: {\n text,\n message_type: 'text',\n options: {\n return_context: true\n }\n }\n }\n return new ...
[ "0.6117693", "0.54891145", "0.54084414", "0.53652203", "0.53605825", "0.51384807", "0.5130247", "0.51048785", "0.5037138", "0.5018232", "0.50168264", "0.5000873", "0.49974474", "0.4971629", "0.49335706", "0.49226934", "0.4880431", "0.48756775", "0.48655906", "0.48478034", "0....
0.65163094
0
Pega o id da disciplina e coloca em um input hiden
function editarDisciplina(id) { $("#id_disciplina").val(id) getOneDisciplina() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showAprendizagens(DiscisplinasID, AprendizagensID) {\n let disciplina = document.getElementById(DiscisplinasID).value;\n let aprendizagem = document.getElementById(AprendizagensID);\n if (disciplina == 0){\n aprendizagem.style.display = \"none\";\n }\n else {\n aprendizagem.style.display = ...
[ "0.59667015", "0.5880242", "0.57607645", "0.5719258", "0.5718296", "0.567267", "0.56276804", "0.55986214", "0.5592696", "0.55473393", "0.5471911", "0.5379671", "0.5379671", "0.5379671", "0.53698546", "0.53377324", "0.5332269", "0.5324715", "0.5294419", "0.5291013", "0.5284102...
0.6901324
0
seleciona a disciplina pelo id
function getOneDisciplina() { axios.post('../../api/controller.php', { action: "get-one-disciplina", values: [ $("#id_disciplina").val() ] }).then(function (response) { $("#editar_disciplina").val(response.data[0].nome) }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function editarDisciplina(id) {\n $(\"#id_disciplina\").val(id)\n getOneDisciplina()\n}", "function id(id){return d.getElementById(id)}", "function dibujarPuntoLienzoRutas(lon,lat,id){\r\n limpiarCapaNuevaRuta();\r\n var marca = new Array();\r\n var punto = new OpenLayers.Geometry.Point(lon,lat)...
[ "0.6483771", "0.5830922", "0.56333613", "0.5572803", "0.54402703", "0.53985554", "0.5392773", "0.53671855", "0.5348501", "0.53261554", "0.53210014", "0.53118885", "0.52960294", "0.5247859", "0.52458143", "0.52381885", "0.52217793", "0.520663", "0.52014637", "0.519672", "0.519...
0.5251972
13
faz o update de fato
function update() { axios.post('../../api/controller.php', { action: "update-disciplina", values: [ $("#editar_disciplina").val(), $("#id_disciplina").val() ] }).then(function (response) { if (response.data) { $('#modal_update_disciplinas').mod...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "update(){}", "update(){}", "update(){}", "static update_fuente(cadenaDeConexion, idIngreso) {\n var flag = (-1);\n //1 - ingreso, 0-egreso\n ///verificar si es ingreso o egreso para sumar o restar el valor a la caja fuente\n sqlNegocio(\n cadenaDeConexion,\n ...
[ "0.7574152", "0.7574152", "0.7574152", "0.7266577", "0.7170654", "0.7152149", "0.7102416", "0.69517493", "0.68196386", "0.6778158", "0.6662249", "0.6596777", "0.6588059", "0.65345806", "0.6532397", "0.65266645", "0.6525549", "0.6507948", "0.6506226", "0.65035474", "0.6493054"...
0.0
-1
const babel = require('gulpbabel')
function defaultTask(cb) { // place code for your default task here cb() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function registerBabel() {\n require(\"@babel/register\")(await getBabelConfig());\n}", "function getBabel() {\n if (!babel) {\n babel = require('babel-core');\n }\n return babel;\n}", "babelConfig() {\n return {\n presets: ['@babel/preset-react']\n };\n }", ...
[ "0.6840658", "0.6728945", "0.65988266", "0.6542404", "0.6472984", "0.6407565", "0.62018836", "0.61157984", "0.60735315", "0.6072666", "0.6072666", "0.5952625", "0.59233403", "0.590192", "0.58206165", "0.5810584", "0.5793921", "0.56698674", "0.56596357", "0.5656026", "0.561406...
0.0
-1
Semigroup returning the leftmost non`Left` value. If both operands are `Right`s then the inner values are concatenated using the provided `Semigroup`
function getSemigroup(S) { return R.getSemigroup(TE.getSemigroup(S)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getApplySemigroup(S) {\n return T.getSemigroup(E.getApplySemigroup(S));\n}", "function getSemigroup(S) {\n return T.getSemigroup(E.getSemigroup(S));\n}", "function getApplySemigroup(S) {\n return R.getSemigroup(TE.getApplySemigroup(S));\n}", "function power_semigroup(a, n, op) {\n // pre...
[ "0.5927411", "0.5883035", "0.5741073", "0.56180984", "0.5309569", "0.5160698", "0.5030243", "0.50232506", "0.5013948", "0.48638716", "0.4848481", "0.47917235", "0.4787006", "0.47670165", "0.47511894", "0.47274554", "0.47151026", "0.47129646", "0.4696786", "0.4677004", "0.4673...
0.56295615
3
Semigroup returning the leftmost `Left` value. If both operands are `Right`s then the inner values are concatenated using the provided `Semigroup`
function getApplySemigroup(S) { return R.getSemigroup(TE.getApplySemigroup(S)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getApplySemigroup(S) {\n return T.getSemigroup(E.getApplySemigroup(S));\n}", "function getSemigroup(S) {\n return T.getSemigroup(E.getSemigroup(S));\n}", "function getSemigroup(S) {\n return R.getSemigroup(TE.getSemigroup(S));\n}", "* tryCombineWithLeft (op) {\n if (\n op != nul...
[ "0.59576255", "0.59351635", "0.5692712", "0.5449872", "0.53811556", "0.5232806", "0.517961", "0.51430535", "0.5100808", "0.5070732", "0.50682545", "0.5066387", "0.50253445", "0.49491966", "0.48657826", "0.48657826", "0.48618573", "0.4854332", "0.4854332", "0.48205292", "0.482...
0.57835984
2
TODO: remove in v3
function getReaderTaskValidation(SE) { var applicativeReaderTaskValidation = getApplicativeReaderTaskValidation(T.ApplicativePar, SE); var altReaderTaskValidation = getAltReaderTaskValidation(SE); return { URI: exports.URI, _E: undefined, map: map_, of: exports.of, ch...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private public function m246() {}", "private internal function m248() {}", "protected internal function m252() {}", "transient private protected internal function m182() {}", "transient private internal function m185() {}", "transient protected internal function m189() {}", "transient final protected i...
[ "0.6882636", "0.6537075", "0.63597065", "0.62721866", "0.610804", "0.6055182", "0.6015834", "0.58537626", "0.57188576", "0.5709518", "0.5707053", "0.5690715", "0.5675818", "0.55939513", "0.5586981", "0.55824447", "0.5569292", "0.54658854", "0.5451804", "0.5398436", "0.5363708...
0.0
-1
utils TODO: remove in v3
function run(ma, r) { return ma(r)(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private public function m246() {}", "private internal function m248() {}", "protected internal function m252() {}", "function Utils() {}", "function Utils() {}", "transient private protected internal function m182() {}", "transient protected internal function m189() {}", "function DWRUtil() { }", "...
[ "0.6809394", "0.67285776", "0.6423989", "0.6241912", "0.6241912", "0.61755544", "0.6097117", "0.60756534", "0.6062465", "0.6053869", "0.6051724", "0.6009401", "0.59739757", "0.5968595", "0.5916832", "0.5880648", "0.58625215", "0.58300394", "0.57764685", "0.5742404", "0.573515...
0.0
-1
Make sure that a resource is cleaned up in the event of an exception (\). The release action is called regardless of whether the body action throws (\) or returns. (\) i.e. returns a `Left` Derivable from `MonadThrow`.
function bracket(aquire, use, release) { return function (r) { return TE.bracket(aquire(r), function (a) { return use(a)(r); }, function (a, e) { return release(a, e)(r); }); }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Release() {}", "release() {}", "release() {}", "release() {}", "release() {\n }", "async release () {\n if (!this.opened)\n throw new Error(\"still not opened\")\n if (!this.locked)\n throw new Error(\"still not acquired\")\n return this.lock.release()\n ...
[ "0.6499773", "0.63039094", "0.63039094", "0.63039094", "0.6090592", "0.5948504", "0.5691839", "0.55690694", "0.5533564", "0.55248094", "0.5467969", "0.5429039", "0.54035157", "0.53499466", "0.5316239", "0.5316239", "0.5315997", "0.53057253", "0.5245921", "0.5245921", "0.52459...
0.0
-1
NOTE: Don't need to change the signature to solve these problems product: calculate the product of an array of numbers.
function product(nums) { // O(n ^ 2) // if (nums.length === 0) return 1; // return nums[0] * product(nums.slice(1)); // O(n) with pop since order does not matter with multiplication if (nums.length === 0) return 1; let last = nums.pop(); return last * product(nums); // O(n) using the index of i = 0 ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function productOfArray(arr) {\n \n}", "function productOfArray(arr) {\n if (arr.length < 1) return 0;\n let product = 1;\n function helper(arr) {\n if (arr.length < 1) return product;\n product *= arr[0];\n helper(arr.slice(1));\n }\n helper(arr);\n return product;\n}", "function product(arr) ...
[ "0.8531614", "0.8120093", "0.8073663", "0.80684716", "0.794103", "0.78970826", "0.7894169", "0.7890651", "0.7889679", "0.7864273", "0.78381664", "0.781786", "0.7815325", "0.78135484", "0.78135484", "0.78116155", "0.78085625", "0.7801279", "0.77997047", "0.77905095", "0.777665...
0.0
-1
longest: return the length of the longest word in an array of words.
function longest(words) { // O(n) Solved with simple for loop // let maxLength = 0; // for (let word of words){ // if (word.length > maxLength){ // maxLength = word.length; // } // } // O(n) Solved with recursion, using an accumulator of out = 0 // if (i === words.length) return out; // if...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function longestWord(array) {\n var longest = array[0];\n for(var i = 0; i < array.length;i++) {\n var arrayWords = array[i];\n if (arrayWords.length >= longest.length) {\n longest = arrayWords;\n }\n };\n return longest;\n}", "function longest(arr){\n\tvar longestWord = \"\";\n\tfor(var i = 0;...
[ "0.8421742", "0.8358357", "0.83130324", "0.826884", "0.8186627", "0.8173381", "0.8155825", "0.81212187", "0.8077323", "0.8074427", "0.80691254", "0.80616903", "0.80573523", "0.8012368", "0.801066", "0.7996639", "0.7981138", "0.7943729", "0.7939631", "0.78933394", "0.78787655"...
0.73468745
66
everyOther: return a string with every other letter.
function everyOther(str) { // With accumulator of out = "" // if (i === str.length) return out; // if (i % 2 === 0) out = out + str[i]; // return everyOther(str, out, i + 1); let out = ""; function _everyOther(str, i) { if (str.length === i) return; if (i % 2 === 0) out = out + str[i]; return ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function everyOther(str) {\n\n}", "function everyOther(str) {\n if(str.length === 0) return \"\";\n return str[0]+everyOther(str.slice(2));\n}", "function everyOther(str) {\n if (str.length===0) return \"\";\n if (str.length===1) return str.charAt(0);\n\n return str.charAt(0)+everyOther(str.slice(2));\n}"...
[ "0.8108749", "0.79491603", "0.78950524", "0.7847108", "0.77643037", "0.75002927", "0.7426101", "0.64489526", "0.61231786", "0.60047084", "0.59712607", "0.5929579", "0.58741105", "0.5747683", "0.57268846", "0.5704617", "0.56983316", "0.5681678", "0.5642945", "0.5592712", "0.55...
0.76734936
5
isPalindrome: checks whether a string is a palindrome or not.
function isPalindrome(str) { // Strategy: reverse the string and then check if equal // With accumulator of out = "" // if (i === str.length) return str === out; // out = str[i] + out; // return isPalindrome(str, out, i + 1); let reversed = ""; function _reverseStr(str, i) { if (i === str.length) r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isPalindrome(str) {\n\n}", "function palindrome(str) {\n return true;\n}", "function palindrome(str) {\r\n // Good luck!\r\n return true;\r\n}", "function isPalindrome(s) {\n var pal = s.split('').reverse().join('');\n return s == pal;\n}", "function isPalindrome(str) {\r\n if (str === r...
[ "0.8670044", "0.8604287", "0.85475254", "0.8531655", "0.85269177", "0.8517436", "0.84898907", "0.84655166", "0.84567606", "0.84512866", "0.84333134", "0.8422023", "0.84105426", "0.8403004", "0.839629", "0.8389805", "0.8374667", "0.8374633", "0.8372658", "0.8363794", "0.835153...
0.8079075
48
findIndex: return the index of val in arr (or 1 if val is not present).
function findIndex(arr, val) { // With index O(n) // if (i === arr.length) return -1; // if (arr[i] === val) { // return i; // } else { // return findIndex(arr, val, i + 1); // } let idx = -1; function _findIndex(arr, val, i) { if (i === arr.length) return; if (arr[i] === val) { re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findIndex(arr, val) {\n\n}", "function findIndex(arr, val, idx=0) {\n if (arr.length===0) return -1;\n\n if (arr[0] === val){\n return idx;\n }\n\n return findIndex(arr.slice(1), val, idx+1);\n}", "function findIndex(arr, val, idx = 0) {\n\tif (arr.length === idx) return -1;\n\tif (arr[idx] ===...
[ "0.8759881", "0.83984053", "0.8320032", "0.82083935", "0.8207263", "0.8200077", "0.8184615", "0.81751066", "0.8169659", "0.81441176", "0.81142884", "0.8096914", "0.8034532", "0.797589", "0.7953128", "0.7918461", "0.7914852", "0.7905918", "0.79011387", "0.7899991", "0.7899991"...
0.8065762
12
revString: return a copy of a string, but in reverse.
function revString(str) { // With accumulator of out = "" // if (i === str.length) return out; // out = str[i] + out; // return revString(str, out, i + 1); let reversed = ""; function _reverseStr(str, i) { if (i === str.length) return; reversed = str[i] + reversed; return _reverseStr(str, i +...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function revString( str ) {\n return str.split(\"\").reverse().join(\"\");\n}", "function reverseString(stringToReverse) {}", "function reverseString(str) {\n var split = str.split(\"\");\n var revSplit = split.reverse()\n var returnStr = revSplit.join(\"\")\n \n return returnStr;\n }", "f...
[ "0.81667924", "0.79568774", "0.78552264", "0.7852346", "0.776955", "0.77624613", "0.775986", "0.7759095", "0.77311605", "0.7730441", "0.7718402", "0.7711433", "0.7711433", "0.7699099", "0.7698046", "0.7682196", "0.76699287", "0.76699287", "0.7667318", "0.7667318", "0.7657952"...
0.7455403
45
gatherStrings: given an object, return an array of all of the string values.
function gatherStrings(obj) { // hidden base case: when you are done looping let out = []; function _gatherStrings(obj) { for (let value of Object.values(obj)) { if (typeof value === 'object' && typeof value !== null) { _gatherStrings(value); } if (typeof value === 'string') { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function gatherStrings(obj) {\n let stringArr = [];\n for (let key in obj) {\n if (typeof obj[key] === \"string\") stringArr.push(obj[key]);\n if (typeof obj[key] === \"object\") stringArr.push(...gatherStrings(obj[key]));\n }\n return stringArr;\n}", "function gatherStrings(obj) {\n const strArr=[];\...
[ "0.814841", "0.8073554", "0.8048511", "0.79931563", "0.7972532", "0.7970621", "0.79085535", "0.7765561", "0.75823975", "0.7572598", "0.75312865", "0.75264484", "0.7363125", "0.7348803", "0.72761774", "0.6873108", "0.6535943", "0.62277526", "0.6186309", "0.6154922", "0.6042982...
0.76610786
8
binarySearch: given a sorted array of numbers, and a value, return the index of that value (or 1 if val is not present). O(log(n))
function binarySearch(arr, val) { let idx = -1; function _binarySearch(high, low) { if (low > high) return -1; let mid = Math.floor((high + low) / 2); if (val === arr[mid]) { return idx = mid; } else if (val > arr[mid]) { return _binarySearch(high, mid + 1); } else if (val < arr[m...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function binarySearch(arr, value) {\n\n}", "function binarySearch(arr, value) {\n var left = 0;\n var right = arr.length - 1;\n var middle = Math.floor((left + right) / 2);\n\n while (arr[middle] !== value && left <= right) {\n if (value < arr[middle]) right = middle - 1;\n else left = middle + 1;\n ...
[ "0.8497175", "0.839469", "0.83103675", "0.82753056", "0.82359576", "0.82356614", "0.81927335", "0.81916636", "0.8183336", "0.81241053", "0.81136847", "0.81078094", "0.8028111", "0.79511636", "0.79492295", "0.7866201", "0.784607", "0.7836815", "0.78283894", "0.7810086", "0.780...
0.8415048
1
Clean up after a close events
handleClose(evt) { if (evt) { evt.preventDefault(); evt.stopPropagation(); } this.props.toggleIsVisible(false); this.props.resetForm(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cleanup() {\n res.removeListener('finish', makePoint);\n res.removeListener('error', cleanup);\n res.removeListener('close', cleanup);\n }", "close() {\n events.removeListener('failure', this._listeners.failure);\n events.removeListener('success', this._listeners.success);\n e...
[ "0.7529429", "0.7362456", "0.73213136", "0.7283148", "0.7258943", "0.7203839", "0.715424", "0.715424", "0.71433496", "0.71355975", "0.7132927", "0.7121508", "0.7118704", "0.7118704", "0.7118704", "0.7118704", "0.7118704", "0.7110677", "0.7110677", "0.7104438", "0.7098722", ...
0.0
-1
============================================================================= /The componentWillReceiveProps function will be automatically invoked after mapStateToProps with an argument of nextProps. This argument represents the new props that will be passed to our component. /If you need to update the state in respon...
componentWillReceiveProps(nextProps) { console.log("CatPage.js", "CatPage.componentWillReceiveProps()"); if (this.props.cat.id != nextProps.cat.id) { this.setState({ cat: nextProps.cat }); } if (this.props.checkBoxHobbies.length < nextProps.checkBoxHobbies.length) { this.setSta...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "componentWillReceiveProps(nextProps) {\n\t\t\t\tthis.updateState(nextProps);\n }", "componentWillReceiveProps (nextProps) {\n // This method gets called after when props change (after 1st time)\n // this.applyProps()\n }", "componentWillReceiveProps(nextProps){\n console.log('componentW...
[ "0.84150696", "0.82096875", "0.8200001", "0.8189782", "0.8182734", "0.81537414", "0.81537414", "0.81440616", "0.8116579", "0.8018591", "0.7983311", "0.7959248", "0.7951643", "0.7915589", "0.7900111", "0.789658", "0.7888106", "0.7888106", "0.78865755", "0.78670573", "0.7850807...
0.0
-1
============================================================================= /The mapStateToProps function has a very important job: receive application state from the store whenever state has changed and make data from that data available to the component as props. /If your mapStateToProps function is declared as tak...
function mapStateToProps(state, ownProps) { console.log("CatPage.js", "CatPage.mapStateToProps"); const stateHobbies = Object.assign([], state.hobbies); let checkBoxHobbies = []; let catHobbies = []; let cat = { name: "", breed: "", weight: "", temperament: "", hobby_ids: [] }; const c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mapStateToProps(state, ownProps) { //ownProps lets us access props that are attached to this component, reference\n //to the components' own props.\n return {\n courses: state.courses//this property is determined by the choice made in the reducer(rootReducer)\n };\n}", "function mapState...
[ "0.806364", "0.8038498", "0.7988563", "0.79764426", "0.7974531", "0.7959154", "0.79534596", "0.7907835", "0.78968114", "0.7885198", "0.78767", "0.78660715", "0.7861395", "0.785277", "0.785277", "0.785277", "0.785277", "0.78417397", "0.7841189", "0.78282565", "0.78282565", "...
0.0
-1
Converts an absolute filepath to a relative path from the given `base` path.
function relative(filepath, base) { const abs = path.isAbsolute(filepath) ? filepath : path.resolve(filepath); if (base) { assert(path.isAbsolute(base), 'expected base to be an absolute path'); return path.relative(base, abs); } if (abs[0] === '/') { return abs.slice(1); } return abs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function relativeURI(uri, base) {\n \n // reduce base and uri strings to just their difference string\n var baseParts = base.split('/');\n baseParts.pop();\n base = baseParts.join('/') + '/';\n i = 0;\n while (base.substr(i, 1) == uri.substr(i, 1))\n i++;\n while (base.substr(i, 1) != ...
[ "0.7417565", "0.7417565", "0.7417565", "0.7417565", "0.7417565", "0.7129509", "0.71167624", "0.69386405", "0.6922641", "0.6922641", "0.6673112", "0.6618387", "0.6591588", "0.63786876", "0.6361602", "0.63588554", "0.63588554", "0.63588554", "0.63588554", "0.6326547", "0.625402...
0.826821
0
Adds a listener for this field
addListener(listener) { if (IDataListener_1.isDataListener(listener) && this.listeners.indexOf(listener) === -1) { this.listeners.push(listener); listener.registerRemover(() => { const index = this.listeners.indexOf(listener); if (index !== -1) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addListener(listener) {\n this.listeners.push(listener);\n }", "addListener(listener) {\n this.listeners.push(listener);\n }", "addListener(event, listener) {\n this.ee.addListener(event, listener);\n }", "addListener(listener) {\n listeners.push(listener);\n }", "static addListen...
[ "0.69954497", "0.69954497", "0.69239146", "0.6748132", "0.6723652", "0.66878474", "0.661311", "0.6527047", "0.6374341", "0.6361492", "0.6361093", "0.6357536", "0.6332177", "0.6314303", "0.63092124", "0.6278369", "0.62592787", "0.6245721", "0.6228806", "0.6220451", "0.62123173...
0.6056718
32
Signals all listeners that data has been altered
callListeners() { const listenersCopy = [...this.listeners]; listenersCopy.forEach(listener => { try { listener.call(); } catch (e) { hookErrorHandler_1.handleHookError(e, this, listener, "onCall"); } }); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "notifyDataChanged() {\n this.hasDataChangesProperty = true;\n this.dataChanged.raiseEvent();\n }", "updateListeners() {\n\t\tthis.listeners.forEach(l => l());\n\t}", "onChangeListener()\n {\n const state = this.getState();\n const listen = this.props.listen || Object.keys(state);\n c...
[ "0.6809062", "0.63597274", "0.62228656", "0.6213075", "0.620618", "0.61977375", "0.612233", "0.61201197", "0.6087789", "0.6087474", "0.6064551", "0.6057276", "0.5935984", "0.59281415", "0.5893637", "0.5868612", "0.58520514", "0.58520514", "0.58520514", "0.5850352", "0.5837525...
0.0
-1
fills in the input box w/the first match (assumed to be the best match) q: the term entered sValue: the first matching result
function autoFill(q, sValue) { //alert(1); ticketLKE.cacheData.push(sValue); // autofill in the complete box w/the first match as long as the user hasn't entered in more data // if the last user key pressed was backspace, don't autofill if (options.autoFill &...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function autoFill(q, sValue){\n\t\t// autofill in the complete box w/the first match as long as the user hasn't entered in more data\n\t\t// if the last user key pressed was backspace, don't autofill\n\t\tif( options.autoFill && (lastWord($input.val()).toLowerCase() == q.toLowerCase()) && lastkeyupCode != KEY.BACK...
[ "0.70441324", "0.7028025", "0.7028025", "0.7028025", "0.6935045", "0.64978594", "0.63656414", "0.6210581", "0.60326415", "0.59879214", "0.59652394", "0.59427744", "0.5936533", "0.5918157", "0.59148544", "0.5840426", "0.5824518", "0.57897097", "0.5780503", "0.5765967", "0.5764...
0.6829493
5
Abstarct Window Aimlementation, used for automatic reloding of window when language change
function AbstractWindow(TiWindow, arg) { if (arg !== undefined) { this.parameters = arg; } if (!(this instanceof AbstractWindow)) { if (arg !== undefined) return new AbstractWindow(TiWindow, arg); else return new AbstractWindow(TiWindow); } this.nam...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function postWindowInit() {\n \n // Hide disabled books on chooser\n useFirstAvailableBookIf();\n ViewPort.disableMissingBooks(getPrefOrCreate(\"HideDisabledBooks\", \"Bool\", false));\n \n // Open language menu if a new locale was just installed\n if ((!document.getElementById(\"sub-lang\").disabled && XS_...
[ "0.65105015", "0.62551796", "0.61460465", "0.6120779", "0.601292", "0.5977027", "0.594413", "0.5927893", "0.58371013", "0.58353776", "0.58296704", "0.5828105", "0.57861716", "0.57837397", "0.5758449", "0.5758229", "0.57550967", "0.5741224", "0.5740744", "0.5733967", "0.572501...
0.0
-1
Throws a `Cancel` if cancellation has been requested.
function throwIfCancellationRequested(config) { if (config.cancelToken) { config.cancelToken.throwIfRequested(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async cancel() {\n throw new Error(this.cancelMessage);\n }", "cancel() {\n throw new Error(\"Not implemented.\")\n }", "isCanceled(cancelled) {\n if (cancelled) {\n throw new Error(\"Cancelled request\");\n }\n }", "function throwIfCancellationRequested(config) {\n ...
[ "0.7949418", "0.7738451", "0.7534214", "0.7446488", "0.7423758", "0.73859656", "0.73859656", "0.73859656", "0.73859656", "0.73859656", "0.720596", "0.71675974", "0.7163708", "0.71617335", "0.7142328", "0.71385175", "0.71385175", "0.71385175", "0.71385175", "0.71385175", "0.71...
0.0
-1
Determine if we're running in a standard browser environment This allows axios to run in a web worker, and reactnative. Both environments support XMLHttpRequest, but not fully standard globals. web workers: typeof window > undefined typeof document > undefined reactnative: navigator.product > 'ReactNative' nativescript...
function isStandardBrowserEnv() { if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' || navigator.product === 'NativeScript' || navigator.product === 'NS')) { return false; } return ( typeof win...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')) {\n return false;\n ...
[ "0.8075751", "0.8071727", "0.8061265", "0.8040566", "0.8033029", "0.8033029", "0.80309623", "0.8019938" ]
0.0
-1
Easy API for creating new setFilters
function setFilters() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setFilters(){}", "function setFilters(){}", "function setFilters(){}", "function setFilters(){}", "function setFilters(){}", "function setFilters(){}", "function setFilters(){}", "function setFilters(){}", "function setFilters(){}" ]
[ "0.8424095", "0.8424095", "0.8424095", "0.8424095", "0.8424095", "0.8424095", "0.8424095", "0.8424095", "0.8424095" ]
0.0
-1
Implement the identical functionality for filter and not
function winnow( elements, qualifier, not ) { if ( isFunction( qualifier ) ) { return jQuery.grep( elements, function( elem, i ) { return !!qualifier.call( elem, i, elem ) !== not; } ); } // Single element if ( qualifier.nodeType ) { return jQuery.grep( elements, function( elem ) { return ( elem === qu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "filter() {\n\t}", "filter() {\n\t}", "function filter() {\n \n}", "function filterFunction() {\n \n}", "function Nothing$prototype$filter(pred) {\n return this;\n }", "removeAllFilters() {}", "function noFilter(filterObj) {\n return Object.\n keys(filterObj).\n ...
[ "0.7415891", "0.7415891", "0.71924883", "0.68619496", "0.67648804", "0.6652573", "0.64584637", "0.64584637", "0.64584637", "0.64584637", "0.6294628", "0.62928224", "0.6256001", "0.62469697", "0.6207571", "0.61991894", "0.61926854", "0.6190803", "0.6184332", "0.61646616", "0.6...
0.0
-1
Convert Stringformatted options into Objectformatted ones
function createOptions( options ) { var object = {}; jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) { object[ flag ] = true; } ); return object; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function normalizeOption(option){if(isString(option)){return normalizeStringOption(option);}else if(isGroup(option)){var title=option.title,options=option.options;return{title:title,options:options.map(function(option){return isString(option)?normalizeStringOption(option):option;})};}return option;}", "function ...
[ "0.6646979", "0.660059", "0.660059", "0.660059", "0.64947766", "0.63181883", "0.62975234", "0.62972945", "0.6293664", "0.6249014", "0.62466335", "0.61907977", "0.61590064", "0.61468446", "0.61046374", "0.6093352", "0.60900694", "0.60061413", "0.5976978", "0.5964013", "0.59468...
0.0
-1
The ready event handler and self cleanup method
function completed() { document.removeEventListener( "DOMContentLoaded", completed ); window.removeEventListener( "load", completed ); jQuery.ready(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function readyCallBack() {\n}", "static ready() { }", "onReady() {}", "ready() {\r\n\t\tsuper.ready();\r\n\t}", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\n super.ready();\n }", "ready() {\...
[ "0.7247566", "0.72123104", "0.7174342", "0.7150074", "0.7060503", "0.7060503", "0.7060503", "0.7060503", "0.7060503", "0.7060503", "0.7060503", "0.7060503", "0.7060503", "0.7060503", "0.7060503", "0.7060503", "0.7043742", "0.7043742", "0.7043742", "0.7043742", "0.6912354", ...
0.0
-1
Used by camelCase as callback to replace()
function fcamelCase( _all, letter ) { return letter.toUpperCase(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function camelCase(name) { return name.replace(/-([a-z])/g,camelCase_replace); }", "function camelize() {\n return function (str) {\n var i;\n // Split string into substring's without \"-\".\n str = str.split(\"-\");\n for (i = 0; i < str.length; i += 1) {\n ...
[ "0.71807325", "0.7025946", "0.69724524", "0.6946594", "0.691589", "0.69047016", "0.6889518", "0.6856401", "0.67825854", "0.6759434", "0.6723883", "0.6723883", "0.6720404", "0.6720404", "0.668707", "0.663834", "0.6632068", "0.66314816", "0.66314816", "0.6629163", "0.6625131", ...
0.0
-1
Convert dashed to camelCase; used by the css and data modules Support: IE <=9 11, Edge 12 15 Microsoft forgot to hump their vendor prefix (9572)
function camelCase( string ) { return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fcamelCase(all,letter){return letter.toUpperCase();}// Convert dashed to camelCase; used by the css and data modules", "function fcamelCase(all, letter) {\n return letter.toUpperCase();\n } // Convert dashed to camelCase; used by the css and data modules", "function fcamelCase(all, letter) {\n ...
[ "0.87723434", "0.8272103", "0.8272103", "0.82191974", "0.82191974", "0.82191974", "0.82191974", "0.82191974", "0.82191974", "0.77898365", "0.742323", "0.72837996", "0.7279163", "0.7279163", "0.72431517", "0.72320795", "0.72320795", "0.72320795", "0.72320795", "0.72320795", "0...
0.0
-1
Mark scripts as having already been evaluated
function setGlobalEval( elems, refElements ) { var i = 0, l = elems.length; for ( ; i < l; i++ ) { dataPriv.set( elems[ i ], "globalEval", !refElements || dataPriv.get( refElements[ i ], "globalEval" ) ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "globalEval() {\n // phase one, if we have head inserts, we build up those before going into the script eval phase\n let insertHeadElems = new ExtDomQuery_1.ExtDomQuery(...this.internalContext.getIf(Const_1.DEFERRED_HEAD_INSERTS).value);\n insertHeadElems.runHeadInserts(true);\n // phas...
[ "0.598603", "0.5798789", "0.57727164", "0.571547", "0.5673433", "0.5667317", "0.5592784", "0.54941976", "0.54660755", "0.537354", "0.5335374", "0.5308348", "0.53040314", "0.5279219", "0.52730364", "0.5270827", "0.52683926", "0.5268382", "0.52661616", "0.52661616", "0.5251832"...
0.0
-1
Support: IE <=9 11+ focus() and blur() are asynchronous, except when they are noop. So expect focus to be synchronous when the element is already active, and blur to be synchronous when the element is not already active. (focus and blur are always synchronous in other supported browsers, this just defines when we can c...
function expectSync( elem, type ) { return ( elem === safeActiveElement() ) === ( type === "focus" ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function focusAsync(element) {\r\n if (element) {\r\n // An element was already queued to be focused, so replace that one with the new element\r\n if (targetToFocusOnNextRepaint) {\r\n targetToFocusOnNextRepaint = element;\r\n return;\r\n }\r\n targetToFocusOnNe...
[ "0.66774035", "0.66774035", "0.65978724", "0.65438944", "0.65420055", "0.6531564", "0.6531564", "0.63587", "0.63587", "0.63587", "0.63587", "0.63587", "0.63587", "0.63587", "0.63587", "0.6164871", "0.61585736", "0.61408687", "0.6100396", "0.60957414", "0.60455686", "0.60381...
0.5958168
93
Support: IE <=9 only Accessing document.activeElement can throw unexpectedly
function safeActiveElement() { try { return document.activeElement; } catch ( err ) { } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function safeActiveElement(){try{return document.activeElement;}catch(err){}}", "function safeActiveElement(){try{return document.activeElement;}catch(err){}}", "function safeActiveElement(){try{return document.activeElement;}catch(err){}}", "function safeActiveElement(){try{return document.activeElement;}ca...
[ "0.877296", "0.877296", "0.877296", "0.877296", "0.877296", "0.877296", "0.877296", "0.8555537", "0.84866536", "0.84145314", "0.83721894", "0.83460915", "0.83449954", "0.8336473", "0.8319321", "0.8313553", "0.8287411", "0.82829833", "0.82829833", "0.82829833", "0.82829833", ...
0.0
-1
Ensure the presence of an event listener that handles manuallytriggered synthetic events by interrupting progress until reinvoked in response to native events that it fires directly, ensuring that state changes have already occurred before other listeners are invoked.
function leverageNative( el, type, expectSync ) { // Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add if ( !expectSync ) { if ( dataPriv.get( el, type ) === undefined ) { jQuery.event.add( el, type, returnTrue ); } return; } // Register the controller as a spec...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dumbListener2(event) {}", "function dumbListener2(event) {}", "async function handleListenerStartedEvent() {\n logger.verbose( `handleListenerStartedEvent` );\n\n try {\n await switchListener( true );\n }\n catch ( e ) {\n /**\n * @todo\n */\n }\n}", "#setupTriggerEventListener() ...
[ "0.58933556", "0.58933556", "0.57998234", "0.5723734", "0.56597304", "0.5603313", "0.55951184", "0.55951184", "0.55951184", "0.55951184", "0.55951184", "0.55951184", "0.55951184", "0.55951184", "0.55951184", "0.55951184", "0.55951184", "0.55951184", "0.55951184", "0.55951184", ...
0.0
-1
Prefer a tbody over its parent table for containing new rows
function manipulationTarget( elem, content ) { if ( nodeName( elem, "table" ) && nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) { return jQuery( elem ).children( "tbody" )[ 0 ] || elem; } return elem; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function r(a,b){return fa.nodeName(a,\"table\")&&fa.nodeName(11!==b.nodeType?b:b.firstChild,\"tr\")?a.getElementsByTagName(\"tbody\")[0]||a.appendChild(a.ownerDocument.createElement(\"tbody\")):a}", "_createDataRows(tbody) {\r\n const that = this,\r\n rowDetailTemplate = that.rowDetailTemplate,...
[ "0.71086895", "0.70120865", "0.6953689", "0.67291456", "0.64544696", "0.64372164", "0.6407543", "0.64046025", "0.6384061", "0.6368811", "0.6368811", "0.6328491", "0.6327805", "0.6327805", "0.629262", "0.62871957", "0.62871957", "0.6276661", "0.62192667", "0.6215433", "0.62118...
0.0
-1