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
function to render Axis transition
function renderXAxis(newScale, xAxis){ var BottomAxis = d3.axisBottom(newScale); xAxis.transition().duration(1000).call(BottomAxis); return xAxis; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderYAxes(newYScale, yAxis) {\nvar leftAxis = d3.axisLeft(newYScale);\n\nyAxis.transition()\n .duration(1000)\n .call(leftAxis);\n\nreturn yAxis;\n}", "update_axis(){\n this.x.domain([this.parent.year0, this.parent.year0 - this.parent.window])\n this.axis_x.transition()\n ....
[ "0.6667468", "0.6512437", "0.6442717", "0.6414248", "0.6413895", "0.6351763", "0.6346102", "0.6333681", "0.6269165", "0.61839646", "0.6147071", "0.6141346", "0.61363566", "0.6132827", "0.61315465", "0.6120034", "0.6098865", "0.60879594", "0.60879594", "0.60694015", "0.6065832...
0.59361666
31
functino to render the circles
function renderCircles(circles, texts, XScale, ChosenX, YScale, ChosenY){ circles.transition() .duration(1000) .attr("cx", d => XScale(d[ChosenX])) .attr("cy", d => YScale(d[ChosenY])) texts.transition() .duration(1000) .attr("transform", d => `translate(${XSc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static render(context, structure){\n Geonym.drawCircle(context,[0,0],0.8,'#F7F7F7','black');\n }", "render () {\n\t\tfor ( let i = 0; i < this.numberOfCircles; i++ ) {\n\t\t\tthis\n\t\t\t\t\t\t\t\t.circles[i]\n\t\t\t\t\t\t\t\t.render( this.context );\n\t\t}\n\t}", "show(){\n fill(255);\n circ...
[ "0.8033412", "0.7973228", "0.7281259", "0.72803724", "0.7256209", "0.72278494", "0.7130457", "0.7121714", "0.71103793", "0.7106382", "0.70669353", "0.7060829", "0.7042339", "0.7039305", "0.70355535", "0.70211124", "0.7011706", "0.6987379", "0.6986583", "0.6981632", "0.6960421...
0.0
-1
End of your code
function animate() { requestAnimationFrame( animate ); renderer.render( scene, camera ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_onEnd() {}", "end() { }", "end() {\n }", "end() {\n }", "mateEnd() {}", "private internal function m248() {}", "async end() {\n return;\n }", "private public function m246() {}", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n ...
[ "0.6402083", "0.6343801", "0.62951106", "0.62951106", "0.6194038", "0.61026645", "0.6031792", "0.6023074", "0.6002504", "0.6002504", "0.6002504", "0.6002504", "0.6002504", "0.6002504", "0.6002504", "0.6002504", "0.6002504", "0.6002504", "0.6002504", "0.6002504", "0.6002504", ...
0.0
-1
color (which should be a string) width (which will be a number) inkAmount (another number) When instantiating a Sharpie, we need to specify the color and the width Every sharpie is created with a default 100 as inkAmount We can use() the sharpie objects which decreases inkAmount by the width Write a loop that consumes ...
function Sharpie(color, width){ this.color = color; this.width = width; this.inkAmount = 100; this.use = function(){ this.inkAmount -= this.width; return this.inkAmount; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Shap(color){\n this.color = color;\n }", "constructor(color='black',width='5') {\n this.color=color;\n this.width=width;\n }", "function chair(){\n this.color=\"#FF0000\";\n this.weight=40;\n this.numLegs=3;\n this.bodyColor=\"#000000\";\n this.isAdjustable=false;\n}", ...
[ "0.60344505", "0.5756832", "0.5692928", "0.5582794", "0.5564615", "0.55506575", "0.55238456", "0.55169135", "0.5462777", "0.5462777", "0.54428756", "0.54284817", "0.5417772", "0.540481", "0.5390346", "0.53893054", "0.5361715", "0.5355538", "0.53482455", "0.53465813", "0.53461...
0.7837235
0
Checks whether the camera is in the air. If so, then reset the timer
function checkCamInAir() { if (mp.game.invoke(Natives.IS_PLAYER_SWITCH_IN_PROGRESS)) { setTimeout(() => { checkCamInAir(); }, 400); } else { mp.gui.chat.show(true); gui = 'true'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkTimer() {\r\n if (timeLeft === 0) stopClock();\r\n}", "function checkTimer() {\r\n if (timeLeft === 0) stopClock();\r\n}", "function Update () \n\t{\n\t\t\t\n\t\t/*\n\t\t * Basic cameraA control forward, back, left right\t\t\n\t\t*/\n\t\t\n\t\tvar alpha = 0.1;\n\t\tvar beta = alpha * 20;\n\...
[ "0.63285893", "0.63285893", "0.59476095", "0.5886532", "0.5742852", "0.57185274", "0.5692565", "0.56483245", "0.56378984", "0.55857396", "0.5559033", "0.55550146", "0.55515945", "0.55213344", "0.5515623", "0.5434106", "0.54327697", "0.5429498", "0.54272217", "0.5419572", "0.5...
0.7057528
0
THIS IS THE CODE FOR ACTION mouseClicked()
function mouseClicked() { //Tests for X and Y //createDiv('Mouse X :' + mouseX + 'Mouse Y :' + mouseY); //Code for xy coordinate multiple choice if (md >= 210) { //Wrong ans 1 if(mouseX >= 70 && mouseY >= 350 && mouseX <= 115 && mouseY <= 405) greeting.html('Correct!'); //Right ans 2 if(mous...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mouseClicked() {\n if (start.start === false) {\n start.mouseClicked();\n } else {\n handler.mouseClicked();\n }\n if (handler.active === handler.warning && trigger.warning === false) {\n trigger.mouseClicked();\n }\n if (\n handler.active === handler.nameplate &&\n doorbell.ok === fa...
[ "0.7951074", "0.78893685", "0.77566266", "0.7705885", "0.76297003", "0.7608122", "0.7544139", "0.74736553", "0.74717355", "0.74625677", "0.7440555", "0.7419612", "0.74108565", "0.74107105", "0.74093217", "0.7405533", "0.734406", "0.730457", "0.7278413", "0.7251996", "0.724323...
0.6927831
41
ADICIONA UM ALUNO EM UMA TURMA
function addAlunoCurso(id, turma) { // Get the checkbox var checkBox = document.getElementById("checkbox"+id); // If the checkbox is checked, display the output text if (checkBox.checked == true){ var opcao = 1; } else { var opcao = 2; } $.ajax({ type:"GET",//or POS...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function municoesAndam(){\n\tif(jogoEmAndamento==true){\n\t\tmunicoes.forEach(andarMunicao);\n\t}\n}", "function IndicadorRangoEdad () {}", "function _AtualizaAtaque() {\n ImprimeSinalizado(gPersonagem.bba, DomsPorClasse('bba'));\n ImprimeNaoSinalizado(gPersonagem.numero_ataques,\n Doms...
[ "0.6052382", "0.60393643", "0.60225004", "0.59431356", "0.59040666", "0.58923364", "0.5881846", "0.5777855", "0.5775408", "0.57427084", "0.57416576", "0.5732962", "0.5713282", "0.5683145", "0.5658459", "0.56238115", "0.5596561", "0.55819625", "0.55648893", "0.5537274", "0.553...
0.0
-1
ADICIONA UMA DISCIPLINA EM UMA TURMA
function addDiscTurma(id, turma) { // Get the checkbox var checkBox = document.getElementById("checkbox"+id); // If the checkbox is checked, display the output text if (checkBox.checked == true){ var opcao = 1; } else { var opcao = 2; } $.ajax({ type:"GET"...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function aplicarDescuento(){\n if (numeroDeClases >= 12) {\n console.log(\"El total a abonar con su descuento es de \" + (totalClase - montoDescontar));\n } else if (numeroDeClases <= 11) {\n console.log(\"Aún NO aplica el descuento, el valor total a abonar es de \" + totalClase...
[ "0.6526573", "0.6184127", "0.616849", "0.6160179", "0.615132", "0.61481184", "0.6147848", "0.61390793", "0.613244", "0.6049695", "0.60473514", "0.59791696", "0.59333956", "0.59321254", "0.5920626", "0.59106636", "0.58997184", "0.5896579", "0.5890802", "0.58878803", "0.5883929...
0.0
-1
ADICIONA UMA TURMA EM UM CURSO
function addTurmaCurso(id, curso) { // Get the checkbox var checkBox = document.getElementById("checkbox"+id); // If the checkbox is checked, display the output text if (checkBox.checked == true){ var opcao = 1; } else { var opcao = 2; } console.log(id+'+'+curso); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function agregarCursoHorario(curso){\n\t\thorarioActual.cursos[horarioActual.num_Cursos]=curso;\n\t\thorarioActual.num_Cursos++;\n\t\thorarioActual.creditos_Totales = parseInt(horarioActual.creditos_Totales)+ parseInt(curso.creditos);\n\t}", "function anularCurso(codigoAsig){\n //alert(\"JARM\");\n ...
[ "0.6055732", "0.5853482", "0.5819839", "0.5720506", "0.5692446", "0.56876546", "0.56807905", "0.56180936", "0.5609866", "0.559806", "0.55695903", "0.5567629", "0.5551745", "0.55440205", "0.554107", "0.5532839", "0.5487611", "0.54866534", "0.5481028", "0.547149", "0.54649264",...
0.51766217
80
Handle timer pad timer with zeros
function lpad(value, padding) { var zeroes = "0", i; for( i = 0; i < padding; i++) { zeroes += "0"; } return (zeroes + value).slice(padding * -1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function padTimer(num) {\n\t\tlet numString = num.toString();\n\t\twhile (numString.length < 2) {\n\t\t\tnumString = \"0\" + numString;\n\t\t}\n\t\treturn numString;\n\t}", "function timerCycle() {\n\n /*HERE CONVERT THE VALUE OF TIMER TO integar FOR CONDITION PUT ZERO BEFOR TIMER(hr,mint,sec) WORK */\n mi...
[ "0.7188498", "0.66574603", "0.65546733", "0.63987285", "0.6398666", "0.6363344", "0.6347622", "0.632766", "0.6308022", "0.629899", "0.6286508", "0.6216898", "0.6127324", "0.611727", "0.6098787", "0.6091582", "0.607985", "0.6072933", "0.60493386", "0.6045993", "0.60452867", ...
0.0
-1
TODO ends with newline could be its own small module
function endsWithNewLines (text) { return /\n\n$/.test(text) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static get LF () {\r\n\t\treturn '\\n';\r\n\t}", "function splitnewline() {\n return;\n}", "optionalNewline() {\n return '\\n';\n }", "static tag_lines(raw)\r\n {\r\n let lines = [];\r\n let next_is_def = false;\r\n let in_code_block = false;\r\n let in_quote_block =...
[ "0.60386246", "0.571206", "0.55773467", "0.5566377", "0.54123867", "0.5389803", "0.5385255", "0.5338698", "0.5301071", "0.5301071", "0.5301071", "0.5301071", "0.52817386", "0.52665097", "0.5252663", "0.5247736", "0.52460283", "0.5243325", "0.52357066", "0.5214478", "0.5207222...
0.0
-1
Provides data from remote sources, that can be sortet, filtered an paged.
function Source(settings) { var self = this; settings = _.extend( { dataProperty: 'data', totalProperty: 'total', autoload: false }, settings); // save filter from set...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTableDataFromRemote() {\n\n var remote_url = base.options.dataSource;\n if(remote_url == null) {\n return false;\n }\n remote_url += '?';\n remote_url = remote_url + base.options.remoteParamsIn.pageNumber + '=' + curPageNumber + '&';...
[ "0.67074233", "0.63031256", "0.6094816", "0.6071431", "0.6066225", "0.59618706", "0.5818597", "0.5815572", "0.5793408", "0.57805234", "0.57785314", "0.5759701", "0.5720508", "0.570594", "0.5692994", "0.5668655", "0.56553036", "0.56511205", "0.56483144", "0.5637171", "0.562572...
0.53631973
52
init: associate's a callback with the form's submit event
init(submitCallback) { this.$form.submit((event) => { event.preventDefault(); let val = this.$input.val(); submitCallback(val); this.$input.val(""); }); //finds the button and calls the submit when clicked this.$form.find("button").on("click", () => this.$form.submit()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setupSubmitCallback () {\n\n let submitCallbackName = this.productsForm.dataset['submit_callback'];\n\n if (submitCallbackName) {\n let submitCallback = eval(submitCallbackName);\n\n if (typeof submitCallback == 'function') {\n this.submitCallback = submitCallback...
[ "0.7377673", "0.69372344", "0.6836762", "0.660208", "0.6579833", "0.6553568", "0.6464531", "0.64595425", "0.636592", "0.6358247", "0.62979174", "0.628834", "0.6275291", "0.6252611", "0.622603", "0.62097406", "0.620391", "0.61849153", "0.61720824", "0.6148903", "0.6144954", ...
0.76108754
0
used to draw the messages
drawMessage({ user: u, timestamp: t, message: m }) { let $messageRow = $("<li>", { "class": "message-row" }); //extra styling for messages sent from self if (this.username === u) { $messageRow.addClass("me"); } //generates the message let $message = $("<p>"); $...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawMessage() {\n ctx.fillStyle = questionBarColor;\n ctx.fillRect(canvas.width / 2 - 250, canvas.height - 325, 500, 150);\n ctx.fillStyle = \"white\";\n ctx.font = \" 32px cymraeg\";\n ctx.fillText(\"Dewiswch avatar,\", canvas.width / 2 - 5, canvas.height - 310);\n ctx.fillText(\"yna, r...
[ "0.7475957", "0.71326303", "0.68397814", "0.6751283", "0.6728251", "0.66958624", "0.6677687", "0.66740346", "0.66587514", "0.6631036", "0.6603123", "0.6603123", "0.65240943", "0.65020734", "0.64941347", "0.6492415", "0.6488054", "0.6476064", "0.6466493", "0.64387655", "0.6437...
0.6777455
3
time stamp formatting using moment
init() { this.timer = setInterval(() => { $("[data-time]").each((idx, element) => { let $element = $(element); let timestamp = new Date().setTime($element.attr("data-time")); let ago = moment(timestamp).fromNow(); $element.html(ago); }); }, 1000); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTimeStamp(){\n var t = moment().format('Do MMM YYYY [|] HH:mm [|] ');\n return t;\n}", "static formatTimestamp(timestamp, format) {\r\n format = format ? format : \"M/D/YYYY h:mm A\";\r\n let formattedTimestamp = \"\";\r\n if (timestamp) {\r\n let messageMoment =...
[ "0.76023835", "0.7262569", "0.7261754", "0.7207496", "0.7187884", "0.707144", "0.6995816", "0.6926894", "0.6896992", "0.6874389", "0.6794645", "0.67824763", "0.6763234", "0.66887987", "0.6673072", "0.6639314", "0.66322917", "0.6625475", "0.6579756", "0.65593326", "0.6548282",...
0.0
-1
Receive message from client joining
function join(call, callback) { users.push(call); notifyChat({ user: "Server", text: "new user joined ..." }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function recv_join(message) {\n print_msg(\"[12][Push] add listener...\");\n Subscribe(['push', 'publish']);\n Subscribe(hickey.subscribe);\n //self.syncChange(hickey.subscribe);\n\n\n //right now, push connect is successful, then display devices on main panel.\n _connecte...
[ "0.722925", "0.7211517", "0.6801478", "0.6578956", "0.6552878", "0.6552478", "0.64425147", "0.643746", "0.64153", "0.6381879", "0.6378012", "0.63493687", "0.63308686", "0.631058", "0.6277604", "0.6261521", "0.62607175", "0.62335366", "0.62198645", "0.6177413", "0.61722153", ...
0.0
-1
Receive message from client
function send(call, callback) { notifyChat(call.request); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function receive (message) {\n input.send(Message(id, requestUrl, message.toString()));\n }", "_onRecieveMessage() {\n this.client.on(\"data\", data => {\n console.log(data.toString());\n });\n }", "function receiveData(command){\n \n // get data\n client.on('message',function(message,remote...
[ "0.75022584", "0.74582386", "0.709237", "0.69892853", "0.6940946", "0.689477", "0.68859607", "0.6812987", "0.67303085", "0.67160285", "0.66556937", "0.6623833", "0.66034013", "0.65932333", "0.6577734", "0.6568064", "0.65592587", "0.65187526", "0.6505743", "0.6502168", "0.6493...
0.0
-1
Send message to all connected clients
function notifyChat(message) { users.forEach(user => { user.write(message); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sendToAllClients(msg){\n wss.clients.forEach(d => d.send(JSON.stringify(msg)))\n}", "function sendAll(content){\n //show what is happening\n console.log(\"Send All!\");\n\n //loop through every client in the array\n for(var i=0; i<CLIENTS.length; i++){\n CLIENTS[i].emit('server',content);\n }\n...
[ "0.8177465", "0.78983676", "0.766847", "0.7607188", "0.74416965", "0.74304825", "0.72945595", "0.72632474", "0.7263171", "0.7204507", "0.7172809", "0.71290874", "0.70952225", "0.7026051", "0.6986003", "0.6917435", "0.69015044", "0.68664247", "0.6863401", "0.68457633", "0.6840...
0.6223029
69
Trim string of whitespaces
function trim(stringToTrim) { return stringToTrim.replace(/^\s+|\s+$/g,""); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function trim(string) { return string.replace(/^\\s+|\\s+$/g , ''); }", "function trim(s) { return s.replace(/^\\s+|\\s+$/g, ''); }", "function trim(str){\treturn str.replace(/^\\s\\s*/, '').replace(/\\s\\s*$/, '');}", "function xTrim(s) {\r\n return s.replace(/^\\s+|\\s+$/g, '');\r\n}", "function trim(s)...
[ "0.8600208", "0.8587856", "0.83954674", "0.8252911", "0.825177", "0.825177", "0.825177", "0.825177", "0.825177", "0.825177", "0.8241077", "0.82381785", "0.8231866", "0.8231866", "0.82299817", "0.822004", "0.82189804", "0.82173836", "0.8214388", "0.8205745", "0.8197786", "0....
0.0
-1
Check if the given timestamp is not expired
function isPersistentCookieExpired(timestamp) { var currentdate = new Date(); var currentdateL = currentdate.getTime(); var cookiedateL = getDateFromTimestamp(timestamp); var cookieexpireL = cookiedateL+persistentCookieExpireL; if (cookieexpireL > cookiedateL) return false; else return true; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isExpired() {\n return this.expirationTime < msalCommon.TimeUtils.nowSeconds();\n }", "expired() {\n return isAfter(new Date(), this.token.expires_at);\n }", "get expired() {\n if (this.expiresAt) {\n const now = Math.floor(Date.now() / 1000);\n const expiresIn = this.e...
[ "0.7451481", "0.7342897", "0.71321595", "0.7048392", "0.70128185", "0.6983718", "0.695408", "0.6873062", "0.6865288", "0.6857621", "0.67859095", "0.6784141", "0.6754044", "0.67510384", "0.6661969", "0.66594714", "0.66219956", "0.66047853", "0.65933704", "0.6586326", "0.656638...
0.6607943
17
Return the long value of a given timestamp in a specific format (eg. 20110602+16:53:53.698)
function getDateFromTimestamp(timestamp) { var timestamp = trim(timestamp).replace("+"," "); var tokens1 = timestamp.split(" "); var tokens2 = tokens1[0].split("-"); var tokens3 = tokens1[1].split("."); // change to format MM/dd/yyyy hh:mm:ss var newStr = tokens2[1]+'/'+tokens2[2]+'/'+tokens2[0]+' '+t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toTimestamp(rpepoch) {\n return (rpepoch + 0x386D4380) * 1000;\n}", "function toTimestamp(rpepoch) {\n return (rpepoch + 0x386D4380) * 1000;\n}", "function getUnixTimestamp() {\n\treturn Number(moment().format(\"X\"));\n}", "function fromTimestamp(rpepoch) {\n if (rpepoch instanceof Date) {\n ...
[ "0.6675551", "0.6675551", "0.6609203", "0.6504899", "0.6504899", "0.6468374", "0.63021326", "0.62878054", "0.6098329", "0.6094864", "0.6063875", "0.60495573", "0.60382426", "0.603521", "0.6024804", "0.59857094", "0.5965198", "0.5961334", "0.59549856", "0.59304875", "0.5921709...
0.57040405
46
COPIAR LINK A PORTAPAPELES
function obtenerLink() { let link = document.createElement("input"); link.setAttribute("value", copy_url_gif); document.body.appendChild(link); link.select(); document.execCommand("copy"); document.body.removeChild(link); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function obtenerLink(pokemones){\n pokemones.forEach( async pokemon => {\n informacionPokemones(await busquedaAPI(pokemon));\n });\n\n spinner();\n setTimeout(() => {\n iterarPokemones(pokemonesData);\n }, 1000);\n}", "link() {\n this._locations = this._sbolDocument.lookupURIs...
[ "0.61116457", "0.5775884", "0.57263225", "0.5709405", "0.56930065", "0.5676604", "0.557799", "0.5563006", "0.55627376", "0.5549181", "0.5545485", "0.5536457", "0.5515078", "0.54765296", "0.54403645", "0.5431112", "0.5375547", "0.5374164", "0.536178", "0.5337602", "0.533592", ...
0.0
-1
i don't have a usb gdm card so i use the free mobile facility to test
function sendFreeSMS(message) { var url = 'https://smsapi.free-mobile.fr/sendmsg?user=' + userFreeSMS + '&pass=' + passwordFreeSMS + '&msg=' + encodeURIComponent(message); https.get(url, function(res) { if(res.statusCode != 200){ console.log('Send SMS Error' + res.statusCode); } else { con...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function check() {\n \n var production = \"75f2d410-0a3a-44d0-8240-08637eb5d2f8\";\n //getSnapshot(snapshot);\n postDeviceDetails(\"\", production);\n //getChannels();\n}", "isRealDevice () {\n return false;\n }", "function DetectBlackBerry()\n{\n if (uagent.search(deviceBB) > -1)\n r...
[ "0.66040033", "0.6382952", "0.6316513", "0.6314779", "0.6196367", "0.61119443", "0.6088727", "0.6086935", "0.60421485", "0.60105073", "0.59882474", "0.59845054", "0.5983585", "0.5959072", "0.59002507", "0.58817834", "0.587341", "0.587341", "0.587341", "0.587341", "0.58489335"...
0.0
-1
set initial states for form data to save in
constructor(props) { super(props); this.state = { accounts: [], name: '', bank: '', branch: '', accType: '', accNr: '', ref: '', purName: '', phoneNr: '', networkOperator: '', }; //bind the listener of the funtions to the current class this...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveInitialValues() {\n\t//Iterate through all inputs, selects and textareas\n\t$$('#'+standardPrefix+'FormContents input,#'+standardPrefix+'FormContents select,#'+standardPrefix+'FormContents textarea').each(function(el) {\n\t\t//Check that change tracking is not disabled for this element\n\t\tif(!el.has...
[ "0.72531265", "0.72296107", "0.65939426", "0.65623784", "0.65336573", "0.648731", "0.643417", "0.6384902", "0.631383", "0.6194613", "0.6171839", "0.61576545", "0.6057332", "0.6054423", "0.6039878", "0.60196483", "0.60014415", "0.5996814", "0.5950706", "0.59371465", "0.5933854...
0.0
-1
Render the forms and controll values entered into forms
render() { return ( <Fragment> <div style = {divStyle}> {/*call navigation component & parse clients info*/} <Navigation clients={this.props.clients}/> <h1>Add Beneficiary</h1> <div class="container"> <div class="row"> {...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderForm() {\n\taction_string = action.value\n\tif (action_string == 'CREATE') {\n\t\tidInput.hidden = true;\n\t\tnameInput.hidden = false;\n\t\ttypeInput.hidden = false;\n\t\tsizeInput.hidden = false;\n\t\ttoppingsInput.hidden = false;\n\t} else if (action_string == 'GET') {\n\t\tidInput.hidden = false...
[ "0.70609564", "0.66884744", "0.64241266", "0.64159703", "0.6399469", "0.6264643", "0.6226843", "0.61920637", "0.6175071", "0.6174277", "0.61425626", "0.613298", "0.6109294", "0.61066556", "0.6098447", "0.6089302", "0.605748", "0.60361934", "0.603564", "0.603496", "0.60042167"...
0.0
-1
Create the next generation
function nextGeneration() { resetGame(); // Normalize the fitness values 0-1 normalizeFitness(allBoards); // Generate a new set of birds activeBoards = generate(allBoards); addTiles(activeBoards); // Copy those birds to another array allBoards = activeBoards.slice(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function newGeneration(){\n firstTime = 1;\n newGen === true ? step() : null\n}", "createNextGeneration( generation ) {\n\t\tvar mu = generation.length;\n\t\t\n\t\t// if plus-strategy: take over parent generation, else start with empty population\n\t\tvar children = this.isPlus ? generation.slice() : [];\...
[ "0.7013255", "0.6920056", "0.690759", "0.684556", "0.68091136", "0.6771395", "0.6754194", "0.6521398", "0.64646375", "0.64303356", "0.6429357", "0.6403063", "0.6399281", "0.63862956", "0.63838315", "0.63730055", "0.634088", "0.62988377", "0.62849957", "0.6268718", "0.6268718"...
0.66289485
7
Generate a new population of birds
function generate(oldBoards) { let newBoards = []; for (let i = 0; i < oldBoards.length; i++) { // Select a bird based on fitness let board = poolSelection(oldBoards); newBoards[i] = board; } return newBoards; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "generateNewPop() {\n this.generationNumber++;\n var newPopulation = [];\n\n for (var i = 0; i < this.populationSize; i++) {\n let newChild = this.giveBirth();\n newPopulation.push(newChild);\n }\n\n this.population = newPopulation;\n this.sumFitness();\n this.sortPopulationByDescendi...
[ "0.7007515", "0.68680036", "0.6826456", "0.67423445", "0.66873", "0.6615619", "0.6546753", "0.6520203", "0.65115607", "0.645191", "0.6392012", "0.6358106", "0.62759066", "0.6246276", "0.62414575", "0.62130815", "0.6198242", "0.6178", "0.6018806", "0.60011244", "0.59928745", ...
0.60751987
18
Normalize the fitness of all birds
function normalizeFitness(boards) { // Make score exponentially better? for (let i = 0; i < boards.length; i++) { boards[i].score = pow(boards[i].score, 2); } // Add up all the scores let sum = 0; for (let i = 0; i < boards.length; i++) { sum += boards[i].score; } // Divide by the su...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function normalizarFitness() {\n var sum = fitness.reduce((acc, curr) => acc + curr);\n fitness = fitness.map(val => val / sum);\n}", "function normalizamosElFitness() {\n let sum = 0;\n for (let i = 0; i < fitness.length; i++) {\n sum += fitness[i];\n }\n for (let i = 0; i < fitness.length; i++) {\...
[ "0.7932986", "0.7924066", "0.7088044", "0.6613265", "0.6504578", "0.63526165", "0.6129695", "0.6114833", "0.6088366", "0.59911305", "0.593054", "0.58841944", "0.58791155", "0.58760583", "0.58529246", "0.57219887", "0.5709844", "0.56553674", "0.5631397", "0.55865544", "0.55744...
0.63175094
6
An algorithm for picking one bird from an array based on fitness
function poolSelection(boards) { // Start at 0 let index = 0; // Pick a random number between 0 and 1 let r = random(1); // Keep subtracting probabilities until you get less than zero // Higher probabilities will be more likely to be fixed since they will // subtract a larger number towards zer...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pickOne() {\n let index = 0;\n let r = random(1);\n while (r > 0) {\n r = r - birds[index].fitness;\n index++;\n }\n index--;\n let bird = birds[index];\n return bird.brain;\n}", "function calculateFitness() {\n let sum = 0;\n for (let bird of birds) {\n sum += bird.score;\n }\n ...
[ "0.69126004", "0.68951815", "0.6514389", "0.6427685", "0.62675893", "0.6250911", "0.6238323", "0.6153943", "0.61402714", "0.6125993", "0.60895634", "0.6059438", "0.6046077", "0.60194516", "0.60170376", "0.6009727", "0.59504294", "0.59363335", "0.58976424", "0.58600295", "0.58...
0.0
-1
inject forecasted weather into dom
function forecastWeather(ForecastArray,domforecast){ for(var iterator=0;iterator<ForecastArray.length;iterator++){ var fdate=ForecastArray[iterator].date.split("-"); domforecast[iterator].children[0].textContent=fdate[2]+"/"+fdate[1]; domForecast[iterator].children[1].children[0].src=Forecas...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createWeatherHTML(weather) {\n var forecast = data.daily[i];\n \n}", "function renderForecast(data) {\n // Add city and timestamp to elements\n document.querySelector('#city')\n .textContent = `Weather forecast for ${data.location.name}, ${data.location.country} on ${getDay()}`;\n ...
[ "0.7243593", "0.7222409", "0.7115063", "0.70778936", "0.70389616", "0.69611377", "0.69373214", "0.69303304", "0.6920203", "0.687734", "0.68663305", "0.68660444", "0.6861715", "0.68478197", "0.68458796", "0.6833581", "0.6824421", "0.68238527", "0.6823248", "0.682018", "0.68040...
0.67093766
39
geolocate using ip address
function geolocate(){ if('geolocation' in navigator){ navigator.geolocation.getCurrentPosition(async (UserLocation)=>{ latitude=UserLocation.coords.latitude longitude=UserLocation.coords.longitude const resp=await fetch(`/weather/${latitude},${longitude}`) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function geolocateByIP() {\n\tif (google.loader.ClientLocation) {\n\t\tvar location = google.loader.ClientLocation;\n\t\tcurrentAddress = location.address.city + ', ' + location.address.region;\n\t\tstoreMyLocation(location.latitude, location.longitude);\n\t} else {\n\t\tcurrentAddress = 'San Fransisco, CA';\n\t\t...
[ "0.7923807", "0.7539736", "0.741216", "0.71863425", "0.7009169", "0.69693154", "0.6887137", "0.6805835", "0.66279817", "0.6596818", "0.6573582", "0.6383093", "0.63711345", "0.6359535", "0.6354844", "0.63297576", "0.63238114", "0.62601763", "0.62373775", "0.6233331", "0.622275...
0.0
-1
locates the specified target
function findTarget() { if (!active) { return; } var targetType = componentType.duck; target = grid.getActorsInRadius(duckling.position, callRadius, targetType)[0]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "goto(target) {\r\n this._nextTarget = target;\r\n this.uiDispatcher.debug(`Goto : ${target}`);\r\n }", "function target() {}", "findTarget() {\n\t\tthis.targetElement = this.container.querySelector(this.target);\n\t}", "setNEOTarget(target) {\n App.pathFinder.data.target.coordinates = t...
[ "0.6737213", "0.6702264", "0.65747947", "0.65372276", "0.63868594", "0.6361502", "0.6172388", "0.61549073", "0.6149141", "0.614372", "0.61131835", "0.60073733", "0.59424865", "0.59104913", "0.58917826", "0.5870188", "0.58291733", "0.58232564", "0.582116", "0.58104134", "0.579...
0.585805
16
returns true if specified move to target is legal
function isLegalMove(target) { if (!active) { return false; } var squareType = grid.getEnvOnlyInfo(target.z, target.x); var validSquares = [ componentType.land, componentType.grass, componentType.water, co...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "checkPassant(board, target_pos, pos, last_move){\n\t\treturn false;\n\t}", "function canMove (x,y,dir) {}", "function isValid(start, direction)\r\n {\r\n var target = {};\r\n switch (direction)\r\n {\r\n case 'up':\r\n target.z = start.z;\r\n tar...
[ "0.7198325", "0.7110994", "0.70759046", "0.7022576", "0.7022576", "0.69063944", "0.6869265", "0.67825216", "0.6766376", "0.67246", "0.67045164", "0.66933554", "0.66562164", "0.6654446", "0.6653709", "0.66401845", "0.65920275", "0.6573531", "0.6556495", "0.6518108", "0.6497688...
0.73413455
0
returns true if move in specified direction from start poiint is legal
function isValid(start, direction) { var target = {}; switch (direction) { case 'up': target.z = start.z; target.x = start.x - 10; break; case 'left': target.z = start.z + 10; t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function legalMove(globals, ui, start, end) {\n return (!(end == start) && end >= globals.leftBound && start >= globals.leftBound && end <= globals.rightBound && start <= globals.rightBound);\n}", "function canMove (x,y,dir) {}", "can_move(start, end) {\n\t\tvar start_row = 8 - Math.floor(start / 8);\n\t\tv...
[ "0.72818017", "0.7172999", "0.7087283", "0.707954", "0.695387", "0.68498194", "0.6732091", "0.6718776", "0.67171836", "0.67150235", "0.67088246", "0.67088246", "0.66489893", "0.6549905", "0.6537901", "0.6533927", "0.6532988", "0.6518854", "0.6517606", "0.6503238", "0.6482497"...
0.76021576
0
I would be using this to show the marker of the clicked contact (and it works when you set the coorindates manually but like I said the JSON seems to be messing with my commputer
function newMarkerOverloaded(Lat, Long){ setTimeout(function(Lat, Long){ var LatLong = new google.maps.LatLng(Lat,Long); var marker = new google.maps.Marker({ position: LatLong }); marker.setMap(NewMap); }, 300)}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function detailedAnnotationSelected(event)\r\n{\r\n let latitude = parseFloat(this.geo.latitude);\r\n let longitude = parseFloat(this.geo.longitude);\r\n\r\n let coordinate = new mapkit.Coordinate(latitude, longitude);\r\n\r\n map.setCenterAnimated(coordinate, true);\r\n\r\n element(\"information\")...
[ "0.6285628", "0.62798715", "0.62783456", "0.6240176", "0.6212548", "0.6145426", "0.61424816", "0.61210376", "0.6117075", "0.6079898", "0.6054478", "0.6047373", "0.6043882", "0.6041336", "0.60366917", "0.60366404", "0.6032281", "0.60187507", "0.6006097", "0.6003889", "0.600287...
0.0
-1
Touch check function curtesy of Steve G
function detectTouchSupport() { msGesture = navigator && navigator.msPointerEnabled && navigator.msMaxTouchPoints > 0 && MSGesture; touchSupport = (("ontouchstart" in window) || msGesture || (window.DocumentTouch && document instanceof DocumentTouch)); return touchSupport; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isTouch() { return !!(\"ontouchstart\" in window) || window.navigator.msMaxTouchPoints > 0; }", "function onTouchStarted(eventData)\n{\n isTouching = true;\n}", "function is_touch()\n{\n var device = get_device();\n return device == 'touch';\n}", "function isTouchDevice() { return false; }"...
[ "0.7441258", "0.7370608", "0.7350637", "0.7290684", "0.7290684", "0.7281778", "0.71415454", "0.7124625", "0.71100277", "0.7109255", "0.71085495", "0.7098595", "0.7079137", "0.70769954", "0.70747197", "0.70625514", "0.705874", "0.7020987", "0.70179343", "0.7013676", "0.7002573...
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 ( jQuery.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...
{ "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.7415146", "0.7415146", "0.7191622", "0.68619126", "0.6764108", "0.6653425", "0.64589405", "0.64589405", "0.64589405", "0.64589405", "0.62959176", "0.62924516", "0.6257063", "0.6247666", "0.62060434", "0.6198569", "0.6193526", "0.6191517", "0.61854416", "0.6166229", "0.6150...
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.6646955", "0.66000414", "0.66000414", "0.66000414", "0.64938337", "0.63180584", "0.629721", "0.62963825", "0.62956905", "0.6249933", "0.6246228", "0.619096", "0.6157682", "0.6146068", "0.6104702", "0.609357", "0.60900825", "0.60056263", "0.5976361", "0.5964541", "0.5947289...
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.72463065", "0.7211212", "0.7172562", "0.7149137", "0.70596856", "0.70596856", "0.70596856", "0.70596856", "0.70596856", "0.70596856", "0.70596856", "0.70596856", "0.70596856", "0.70596856", "0.70596856", "0.70596856", "0.7042607", "0.7042607", "0.7042607", "0.7042607", "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.5987435", "0.5798831", "0.5772783", "0.57142234", "0.5673525", "0.56659687", "0.5592892", "0.5492997", "0.5467838", "0.53731847", "0.5336245", "0.5309647", "0.5303123", "0.52803385", "0.52720535", "0.52717704", "0.52695596", "0.52677536", "0.52672625", "0.52672625", "0.525...
0.0
-1
Support: IE <=9 only See 13393 for more info
function safeActiveElement() { try { return document.activeElement; } catch ( err ) { } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isLowIE9() {\r\n var e = window.navigator.userAgent.toString().toUpperCase();\r\n var flag = false;\r\n if (e.indexOf(\"MSIE\") >= 0) {\r\n\r\n if (e.indexOf(\"MSIE 6.0\") > 0) flag = true;\r\n if (e.indexOf(\"MSIE 7.0\") > 0) flag = true;\r\n if (e.in...
[ "0.6900376", "0.6633452", "0.66071683", "0.66071683", "0.64633244", "0.6390743", "0.63462067", "0.62993", "0.62993", "0.6290558", "0.62500703", "0.62281424", "0.6220974", "0.6161883", "0.6143487", "0.61399645", "0.6124924", "0.6112588", "0.6086288", "0.6084851", "0.6060481", ...
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( ">tbody", elem )[ 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.71087074", "0.7011311", "0.69534355", "0.67286456", "0.6454603", "0.6437053", "0.64070845", "0.64049566", "0.6384461", "0.636923", "0.636923", "0.63289297", "0.63282233", "0.63282233", "0.6293037", "0.62876475", "0.62876475", "0.6276959", "0.62196934", "0.6215846", "0.6212...
0.0
-1
Replace/restore the type attribute of script elements for safe DOM manipulation
function disableScript( elem ) { elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type; return elem; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function disableScript( elem ) {\r\n\tvar attr = elem.getAttributeNode(\"type\");\r\n\telem.type = ( attr && attr.specified ) + \"/\" + elem.type;\r\n\treturn elem;\r\n}", "function disableScript( elem ) {\n\tvar attr = elem.getAttributeNode(\"type\");\n\telem.type = ( attr && attr.specified ) + \"/\" + elem.typ...
[ "0.7015204", "0.6983948", "0.6983948", "0.6983948", "0.6983948", "0.6983948", "0.6983948", "0.6983948", "0.6983948", "0.6983948", "0.6983948", "0.6941072", "0.69362515", "0.69002753", "0.68869877", "0.68869877", "0.68869877", "0.6885398", "0.6884041", "0.68813604", "0.6873264...
0.0
-1
Fix IE bugs, see support tests
function fixInput( src, dest ) { var nodeName = dest.nodeName.toLowerCase(); // Fails to persist the checked state of a cloned checkbox or radio button. if ( nodeName === "input" && rcheckableType.test( src.type ) ) { dest.checked = src.checked; // Fails to return the selected option to the default selected sta...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function IEcompatibility() {\n\t// Only do anything if this is IE\n\tif(Browser.ie){\n\t\tvar __fix = $$(\"#kbbcode-size-options\", \"#kbbcode-size-options span\", \n\t\t\t\t\t\t\"#kbbcode-colortable\", \"#kbbcode-colortable td\");\n\t\tif (__fix) {\n\t\t\t__fix.setProperty('unselectable', 'on');\n\t\t}\n\t}\n}", ...
[ "0.7220337", "0.70940924", "0.699044", "0.68625945", "0.66801953", "0.6574329", "0.6557123", "0.65142417", "0.65142417", "0.64660573", "0.64034224", "0.6379892", "0.6297539", "0.6296395", "0.62622595", "0.6166529", "0.6163856", "0.61358476", "0.61114734", "0.6054131", "0.6026...
0.0
-1
Executing both pixelPosition & boxSizingReliable tests require only one layout so they're executed at the same time to save the second computation.
function computeStyleTests() { // This is a singleton, we need to execute it only once if ( !div ) { return; } div.style.cssText = "box-sizing:border-box;" + "position:relative;display:block;" + "margin:auto;border:1px;padding:1px;" + "top:1%;width:50%"; div.innerHTML = ""; documentElement....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function computePixelPositionAndBoxSizingReliable() {\n\t\t\t// Support: Firefox, Android 2.3 (Prefixed box-sizing versions).\n\t\t\tdiv.style.cssText = \"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\t\"box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;\" +...
[ "0.7214772", "0.7209597", "0.7209597", "0.7208634", "0.7208634", "0.71526146", "0.71526146", "0.71505505", "0.71340466", "0.71340466", "0.71340466", "0.71340466", "0.71340466", "0.71340466", "0.71340466", "0.71340466", "0.71340466", "0.71340466", "0.71340466", "0.71340466", "...
0.0
-1
Return a css property mapped to a potentially vendor prefixed property
function vendorPropName( name ) { // Shortcut for names that are not vendor prefixed if ( name in emptyStyle ) { return name; } // Check for vendor prefixed names var capName = name[ 0 ].toUpperCase() + name.slice( 1 ), i = cssPrefixes.length; while ( i-- ) { name = cssPrefixes[ i ] + capName; if ( nam...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function vendorPropName(name){// Shortcut for names that are not vendor prefixed\nif(name in emptyStyle){return name;}// Check for vendor prefixed names\nvar capName=name[0].toUpperCase()+name.slice(1),i=cssPrefixes.length;while(i--){name=cssPrefixes[i]+capName;if(name in emptyStyle){return name;}}}// Return a pro...
[ "0.8100779", "0.8100779", "0.7800996", "0.7800996", "0.7800996", "0.7800996", "0.7800996", "0.7800996", "0.7800996", "0.7800996", "0.7733553", "0.772006", "0.76414984", "0.76074743", "0.76000714", "0.752947", "0.7464742", "0.7459494", "0.74438816", "0.7416237", "0.7388285", ...
0.0
-1
Return a property mapped along what jQuery.cssProps suggests or to a vendor prefixed property.
function finalPropName( name ) { var ret = jQuery.cssProps[ name ]; if ( !ret ) { ret = jQuery.cssProps[ name ] = vendorPropName( name ) || name; } return ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function vendorPropName(name){// Shortcut for names that are not vendor prefixed\nif(name in emptyStyle){return name;}// Check for vendor prefixed names\nvar capName=name[0].toUpperCase()+name.slice(1),i=cssPrefixes.length;while(i--){name=cssPrefixes[i]+capName;if(name in emptyStyle){return name;}}}// Return a pro...
[ "0.8123", "0.8123", "0.7478544", "0.7478544", "0.7478544", "0.7478544", "0.7478544", "0.7478544", "0.7478544", "0.7478544", "0.7335403", "0.7335403", "0.7179844", "0.7176214", "0.7074504" ]
0.0
-1
Animations created synchronously will run synchronously
function createFxNow() { window.setTimeout( function() { fxNow = undefined; } ); return ( fxNow = jQuery.now() ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_playAnimation() {\n if (this._animationLast === undefined && this._animationQueue.length > 0) {\n this._animationLast = this._animationCurrent;\n this._animationCurrent = this._animationQueue.shift();\n console.log(\"New: \" + this._animationCurrent.name);\n this...
[ "0.72297084", "0.7172655", "0.6751781", "0.6701827", "0.66490537", "0.6644208", "0.66413045", "0.65767395", "0.6515558", "0.64943016", "0.64906734", "0.6407048", "0.6392758", "0.6383256", "0.63779354", "0.6373179", "0.63684577", "0.6353303", "0.63494754", "0.6331653", "0.6321...
0.0
-1
Generate parameters to create a standard animation
function genFx( type, includeWidth ) { var which, i = 0, attrs = { height: type }; // If we include width, step value is 1 to do all cssExpand values, // otherwise step value is 2 to skip over Left and Right includeWidth = includeWidth ? 1 : 0; for ( ; i < 4; i += 2 - includeWidth ) { which = cssExpand[ i ]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setParameters() {\n params.viscosity = 0.02;\n params.u0 = -amplitude;\n params.one36th = 1 / 36;\n params.one9th = 1 / 9;\n params.four9ths = 4 / 9;\n params.gridSize = 5;\n params.m = int(height / params.gridSize);\n params.n = int(width / params.gridSize);\n}", "function generateAnimationPara...
[ "0.6481141", "0.64496386", "0.62369376", "0.6207431", "0.61991704", "0.6018779", "0.59923285", "0.59438133", "0.5937462", "0.5937462", "0.5906791", "0.5871309", "0.58321375", "0.5829441", "0.5827063", "0.58168155", "0.58163905", "0.5803369", "0.578572", "0.57812077", "0.57792...
0.0
-1
Strip and collapse whitespace according to HTML spec
function stripAndCollapse( value ) { var tokens = value.match( rnothtmlwhite ) || []; return tokens.join( " " ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stripAndCollapse(value){var tokens=value.match(rnothtmlwhite)||[];return tokens.join(\" \");}", "function stripAndCollapse(value){var tokens=value.match(rnothtmlwhite)||[];return tokens.join(\" \");}", "function stripAndCollapse(value){var tokens=value.match(rnothtmlwhite)||[];return tokens.join(\" \"...
[ "0.7923246", "0.7923246", "0.7923246", "0.7679495", "0.7598504", "0.7587948", "0.75838023", "0.7560898", "0.7555255", "0.7555255", "0.7555255", "0.7555255", "0.7555255", "0.7555255", "0.7555255", "0.7555255", "0.7555255", "0.7555255", "0.7555255", "0.7555255", "0.7555255", ...
0.0
-1
Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
function addToPrefiltersOrTransports( structure ) { // dataTypeExpression is optional and defaults to "*" return function( dataTypeExpression, func ) { if ( typeof dataTypeExpression !== "string" ) { func = dataTypeExpression; dataTypeExpression = "*"; } var dataType, i = 0, dataTypes = dataTypeE...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor() {\n this.config = Config.ajax;\n this.xhr;\n this.Serialize;\n }", "function AjaxPipelineConstructor() {\r\n BaseObject.call(this,arguments);\r\n }", "function Ajax(__constructor) {\r\n if (Params.env.isFirefox) return GM_xmlhttpRequest(__constructor);\r\n ...
[ "0.6993283", "0.6822893", "0.6371214", "0.6163058", "0.59267855", "0.58393145", "0.5837328", "0.5837328", "0.5829274", "0.5829274", "0.5829274", "0.5829274", "0.5829274", "0.5829274", "0.5797885", "0.5787472", "0.5787472", "0.5744089", "0.573186", "0.5730097", "0.5662906", ...
0.0
-1
Base inspection function for prefilters and transports
function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { var inspected = {}, seekingTransport = ( structure === transports ); function inspect( dataType ) { var selected; inspected[ dataType ] = true; jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function inspectPrefiltersOrTransports(structure, options, originalOptions, jqXHR) {\n\n var inspected = {},\n seekin...
[ "0.6271232", "0.62278324", "0.6089844", "0.6089844", "0.6089844", "0.6089844", "0.6089844", "0.6089844", "0.6089844", "0.6089844", "0.6089844", "0.6089844", "0.607385", "0.60586876", "0.60586876", "0.6036968", "0.601241", "0.601241", "0.601241", "0.601241", "0.601241", "0.6...
0.0
-1
A special extend for ajax options that takes "flat" options (not to be deep extended) Fixes 9887
function ajaxExtend( target, src ) { var key, deep, flatOptions = jQuery.ajaxSettings.flatOptions || {}; for ( key in src ) { if ( src[ key ] !== undefined ) { ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; } } if ( deep ) { jQuery.extend( true, target, deep ); } ret...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key];}}if(deep){jQuery.extend(true,target,deep);}}", "function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettin...
[ "0.76662034", "0.7609433", "0.756507", "0.756507", "0.756507", "0.756507", "0.756507", "0.756507", "0.75459105", "0.75459105", "0.7526188", "0.74560183", "0.7317463", "0.7312093", "0.729116", "0.729054", "0.725549", "0.7241156", "0.7239971", "0.7239971", "0.722541", "0.7218...
0.0
-1
Handles responses to an ajax request: finds the right dataType (mediates between contenttype and expected dataType) returns the corresponding response
function ajaxHandleResponses( s, jqXHR, responses ) { var ct, type, finalDataType, firstDataType, contents = s.contents, dataTypes = s.dataTypes; // Remove auto dataType and get content-type in the process while ( dataTypes[ 0 ] === "*" ) { dataTypes.shift(); if ( ct === undefined ) { ct = s.mimeType ||...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ajaxHandleResponses(s,jqXHR,responses){var firstDataType,ct,finalDataType,type,contents=s.contents,dataTypes=s.dataTypes;// Remove auto dataType and get content-type in the process\nwhile(dataTypes[0]===\"*\"){dataTypes.shift();if(ct===undefined){ct=s.mimeType||jqXHR.getResponseHeader(\"Content-Type\");}}...
[ "0.7849357", "0.7837166", "0.7837166", "0.7776112", "0.7761579", "0.77569586", "0.771852", "0.77152854", "0.76725644", "0.7629769", "0.7614073", "0.7604247", "0.76000726", "0.759926", "0.7596993", "0.7596993", "0.7596993", "0.7596993", "0.7596993", "0.7596993", "0.7596993", ...
0.0
-1
Chain conversions given the request and the original response Also sets the responseXXX fields on the jqXHR instance
function ajaxConvert( s, response, jqXHR, isSuccess ) { var conv2, current, conv, tmp, prev, converters = {}, // Work with a copy of dataTypes in case we need to modify it for conversion dataTypes = s.dataTypes.slice(); // Create converters map with lowercased keys if ( dataTypes[ 1 ] ) { for ( conv in s.c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ajaxConvert(s,response,jqXHR,isSuccess){var conv2,current,conv,tmp,prev,converters={}, // Work with a copy of dataTypes in case we need to modify it for conversion\ndataTypes=s.dataTypes.slice(); // Create converters map with lowercased keys\nif(dataTypes[1]){for(conv in s.converters){converters[conv.toLo...
[ "0.62716246", "0.62648493", "0.62052524", "0.6195548", "0.619494", "0.61795634", "0.61795634", "0.61767954", "0.61534816", "0.6096223", "0.60912085", "0.60880023", "0.60880023", "0.60880023", "0.60880023", "0.60880023", "0.6075834", "0.6075834", "0.6075834", "0.6050951", "0.6...
0.0
-1
Callback for when everything is done
function done( status, nativeStatusText, responses, headers ) { var isSuccess, success, error, response, modified, statusText = nativeStatusText; // Ignore repeat invocations if ( completed ) { return; } completed = true; // Clear timeout if it exists if ( timeoutTimer ) { window.cle...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function done() {}", "function finished(err){\n }", "onFinish() {}", "function AllDone(){\n \n}", "async onFinished() {}", "done() {}", "_onEnd() {}", "done () {}", "complete() {}", "function onFinish() {\n console.log('finished!');\n}", "function complete(){\r\n ...
[ "0.7607877", "0.73473793", "0.73289984", "0.7317956", "0.7304225", "0.72417575", "0.7235767", "0.69856775", "0.68565404", "0.6855536", "0.6845145", "0.6817738", "0.6773241", "0.6773241", "0.6773241", "0.6773241", "0.677228", "0.67654777", "0.67654777", "0.6763289", "0.6711056...
0.0
-1
Some old versions of Android don't have Function.prototype.bind
function bind(method, context) { return function () { return method.apply(context, arguments); }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bind(method,context){return function(){return method.apply(context,arguments);};}", "function bind(method,context){return function(){return method.apply(context,arguments);};}", "function simpleBind(context, fn) { // 147...
[ "0.7345753", "0.7345753", "0.7238034", "0.71897316", "0.70932114", "0.6996977", "0.6978958", "0.69521034", "0.69356155", "0.6934661", "0.69337004", "0.69337004", "0.69337004", "0.69337004", "0.69337004", "0.69337004", "0.69337004", "0.69149053", "0.6911008", "0.69029975", "0....
0.0
-1
Should be converted to popover
function isPopover() { var toPopover = false; if (!p.params.convertToPopover && !p.params.onlyInPopover) return toPopover; if (!p.inline && p.params.input) { if (p.params.onlyInPopover) toPopover = true; else { if ($.device.ios) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static get tag() {\n return \"simple-popover\";\n }", "static get tag() {\n return \"simple-popover\";\n }", "_setPopOver() {\n const $content = this._getContent();\n if (!$content) {\n return;\n }\n const options = {\n content: $content,\n h...
[ "0.7341704", "0.7341704", "0.7127132", "0.7029504", "0.70178044", "0.6658822", "0.6653636", "0.6581153", "0.65638804", "0.6466537", "0.6456724", "0.64392364", "0.643844", "0.643844", "0.6400419", "0.6387293", "0.6387293", "0.637979", "0.63748163", "0.6350531", "0.63237", "0...
0.6327184
22
Should be converted to popover
function isPopover() { var toPopover = false; if (!p.params.convertToPopover && !p.params.onlyInPopover) return toPopover; if (!p.inline && p.params.input) { if (p.params.onlyInPopover) toPopover = true; else { if ($.device.ios) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static get tag() {\n return \"simple-popover\";\n }", "static get tag() {\n return \"simple-popover\";\n }", "_setPopOver() {\n const $content = this._getContent();\n if (!$content) {\n return;\n }\n const options = {\n content: $content,\n h...
[ "0.7341704", "0.7341704", "0.7127132", "0.7029504", "0.70178044", "0.6658822", "0.6653636", "0.6581153", "0.65638804", "0.6466537", "0.6456724", "0.64392364", "0.643844", "0.643844", "0.6400419", "0.6387293", "0.6387293", "0.637979", "0.63748163", "0.6350531", "0.63237", "0...
0.6327184
21
========================= Round helper ===========================
function round(a) { return Math.floor(a); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function roundme(val) {\n return val;\n }", "function roundNum(num){\n return Math.round(num * 10) / 10;\n }", "function round(num){\n return Math.round(num*10) / 10;\n }", "function round(a) {\n\t return Math.floor(a);\n\...
[ "0.757519", "0.74830145", "0.729143", "0.71625787", "0.71165067", "0.71001494", "0.70923835", "0.70872706", "0.7011867", "0.70070124", "0.69994724", "0.69556653", "0.6952694", "0.6952694", "0.6952694", "0.6952669", "0.6933957", "0.6933334", "0.69186956", "0.69130063", "0.6901...
0.6857814
42
========================= Handle Touches ===========================
function findElementInEvent(e, selector) { var el = $(e.target); if (!el.is(selector)) { if (typeof selector === 'string') { el = el.parents(selector); } else if (selector.nodeType) { var found; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleEvent(owner, event, events) {\n if (event.type == \"damage\" && [\"MH Swing\", \"OH Swing\", \"Heroic Strike\"].includes(event.ability)) {\n if (this.stacks > 0) {\n events.push({\n \"type\": \"buff lost\",\n \"timesta...
[ "0.5540817", "0.5410303", "0.5410303", "0.53239125", "0.52806777", "0.5274644", "0.52016973", "0.52001166", "0.5191883", "0.5191883", "0.51709723", "0.5167479", "0.51572496", "0.5103397", "0.5022957", "0.49752405", "0.49740508", "0.49690527", "0.49533254", "0.49507308", "0.49...
0.0
-1
========================= Keyboard Control ===========================
function handleKeyboard(e) { if (e.originalEvent) e = e.originalEvent; //jquery fix var kc = e.keyCode || e.charCode; // Directions locks if (!s.params.allowSwipeToNext && (s.isHorizontal() && kc === 39 || !s.isHorizontal() && kc === 40)) { return false; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set Keyboard(value) {}", "get Keyboard() {}", "function keyDown(event) {\r\n keyboard[event.keyCode] = true;\r\n}", "function onKeyDown(event) {\n}", "function keyDown(event){\n\tkeyboard[event.keyCode] = true;\n}", "HandleKeyDown(event) {}", "keyDown(_keycode) {}", "handleKeyDown (event) {\n }",...
[ "0.78171587", "0.77563196", "0.76239395", "0.7593138", "0.75066835", "0.75010246", "0.74541974", "0.738666", "0.7315922", "0.7244487", "0.7210788", "0.7210788", "0.72105896", "0.7201775", "0.71952677", "0.71702725", "0.7146852", "0.71437836", "0.7141601", "0.71413743", "0.713...
0.0
-1
========================= Events/Callbacks/Plugins Emitter ===========================
function normalizeEventName(eventName) { if (eventName.indexOf('on') !== 0) { if (eventName[0] !== eventName[0].toUpperCase()) { eventName = 'on' + eventName[0].toUpperCase() + eventName.substring(1); } else { eventName ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function EventEmitter(){}// Shortcuts to improve speed and size", "onOutput () {}", "ConnectEvents() {\n\n }", "static publish() {\r\n ViewportService.subscribers.forEach(el => {el.callback();});\r\n }", "function Emitter() {\r\n\t\tthis.callbacks = {};\r\n\t}", "static get pluginConfig() {\n r...
[ "0.680364", "0.6661302", "0.6524459", "0.6452328", "0.6423053", "0.6401252", "0.6355932", "0.6318865", "0.6318865", "0.6318865", "0.6318865", "0.62949425", "0.6291783", "0.62738633", "0.6242526", "0.61998063", "0.61791426", "0.6176451", "0.6171238", "0.6171238", "0.6105566", ...
0.0
-1
Swap bits across the left and right words
function exchangeLR(offset, mask) { var t = ((this._lBlock >>> offset) ^ this._rBlock) & mask; this._rBlock ^= t; this._lBlock ^= t << offset; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "SWAP_R(r1){\n let half_1 = r1 & HALF_ADDRESS_MASK;\n let half_2 = r1 >> HALF_ADDRESS;\n let result = (half_1 << (HALF_ADDRESS - 1)) | half_2;\n this.zero_flag = result === 0;\n this.subtraction_flag = false;\n this.half_carry_flag = false;\n this.carry_flag = false;\n return re...
[ "0.6248704", "0.61159575", "0.60639185", "0.60094845", "0.6003809", "0.59736496", "0.59504825", "0.5877991", "0.5829886", "0.5790974", "0.5762415", "0.57583886", "0.5756521", "0.5756521", "0.57440466", "0.5734799", "0.5713059", "0.5699257", "0.56949544", "0.56942195", "0.5686...
0.0
-1
v8 likes predictible objects
function Item(fun, array) { this.fun = fun; this.array = array; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compareLike(a,b){\n var al = a.idLikesProp.length;\n var bl = b.idLikesProp.length;\n if(al > bl) return -1;\n if(bl > al) return 1;\n return 0;\n}", "function lookAround() {\n var objectDescription = \"\"\n tj.see().then(function(objects) {\n objects.forEach(function(each) {\n ...
[ "0.52719957", "0.5258603", "0.5189542", "0.5181587", "0.51222587", "0.50485057", "0.4895682", "0.48634082", "0.48405623", "0.4833185", "0.48265588", "0.48152655", "0.48029664", "0.47881085", "0.47855937", "0.4759736", "0.47531617", "0.47402334", "0.4730283", "0.47066608", "0....
0.0
-1
matches mm/dd/yyyy (requires leading 0's (which may be a bit silly, what do you think?)
function date(val) { return (/^(?:0[1-9]|1[0-2])\/(?:0[1-9]|[12][0-9]|3[01])\/(?:\d{4})/.test(val) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function debtCheckFormatDate(dataCheck){\n var re = /^\\d{1,2}\\/\\d{1,2}\\/\\d{4}$/;\n if(dataCheck == '' || dataCheck == 'dd/mm/yyyy'){\n return true;\n }else{\n if(!dataCheck.match(re)){\n return false;\n }else{\n return true;\n }\n }\n}", "function check_Date(str){\n\n \n //inp...
[ "0.7199109", "0.7120788", "0.67913973", "0.67887694", "0.67865837", "0.67766356", "0.67576283", "0.6734354", "0.6715454", "0.6672329", "0.6639307", "0.6623987", "0.66183984", "0.6600263", "0.655292", "0.65261936", "0.65105057", "0.6489031", "0.6478177", "0.64609843", "0.64348...
0.7423318
0
returns [] METHOD 2
function bouncer(arr) { // use filter function to extract all values other than false return arr.filter(Boolean); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getResult() {}", "private public function m246() {}", "static private internal function m121() {}", "function accessesingData2() {\n\n}", "function accessesingData2() {\n\n}", "private internal function m248() {}", "transient protected internal function m189() {}", "function miFuncion (){}", "obtai...
[ "0.642734", "0.6405015", "0.60061306", "0.5939476", "0.5939476", "0.59320664", "0.5910838", "0.5893379", "0.58665454", "0.583425", "0.5824446", "0.5824446", "0.5824446", "0.5751374", "0.5751374", "0.5751374", "0.5696038", "0.5666088", "0.5655539", "0.5645661", "0.5637781", ...
0.0
-1
select or move disk in depending of isDiskAvtive
function selectDisk(sender) { if (isSolutionActive) return; var elst = document.getElementById("report"); var iter = 0; var sid = sender.id; if (sid == "myC0") iter = 0; else if (sid == "myC1") iter = 1; else if (sid == "myC2") iter = 2; // move disk if (isDiskActive) { if (iter != isDiskActi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setCurrentDisk() {\n\tcurrentDisk = event.target;\n}", "function SelectDisk(canv)\r\n{\r\n\tvar diskNum = DiskSum(canv);\r\n\tif (diskNum == 0) return false;\r\n\tvar topD = Dpos.findIndex(function(element) { \r\n\t\treturn element == canv; \r\n\t});\r\n\r\n\tvar opac = isDiskActive ? 64 : 0;\r\n\tvar t...
[ "0.63148177", "0.62991387", "0.61930555", "0.6043022", "0.59406567", "0.58782655", "0.5847014", "0.5779689", "0.5563338", "0.5386588", "0.5347116", "0.5338349", "0.5331946", "0.53316087", "0.52505744", "0.51966953", "0.5115141", "0.5069243", "0.5047271", "0.5039642", "0.50259...
0.5630815
8
remove disk from top of canv0 and place it to canv1
function MoveDisk(canv0, canv1) { var topD0 = Dpos.findIndex(function(element) { return element == canv0; }); var topD1 = Dpos.findIndex(function(element) { return element == canv1; }); if (DiskSum(canv0) == 0) return false; if (topD0 > topD1 && DiskSum(canv1) != 0) return false; Dpos[topD0] = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function delete_storage(){\n\tsimact.Algebrite.run(\"clearall\");\n\tfilloutputarea();\n}", "function seekAndDestroy() {}", "removeCanvas() {\n const lastEntry = this.canvases.pop();\n lastEntry.wave.parentElement.removeChild(lastEntry.wave);\n lastEntry.patientWave.parentElement.removeChi...
[ "0.56693304", "0.55412924", "0.5540679", "0.5534605", "0.5519842", "0.5497402", "0.5484228", "0.54592776", "0.5440905", "0.5401871", "0.5375303", "0.5364426", "0.5323818", "0.53103876", "0.524722", "0.524308", "0.522602", "0.52090144", "0.5208602", "0.5206574", "0.5201703", ...
0.6003415
0
select/unselect disk (make active/inactive) on top of canv
function SelectDisk(canv) { var diskNum = DiskSum(canv); if (diskNum == 0) return false; var topD = Dpos.findIndex(function(element) { return element == canv; }); var opac = isDiskActive ? 64 : 0; var tlX = cW/2 - D0_width*(1 - (N-1-topD)*delta)/2; var tlY = zeroH - diskNum*D0_height; var diW = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toggleSmall() {\n\tsmallDisk.classList.toggle('selected');\n}", "onMountDisk(){\n this.setState({\n disks : this.state.disks,\n current : this.state.current,\n mode : 1,//Modify this variable to changes in modes\n selected : this.state.selected\n ...
[ "0.62812716", "0.6280163", "0.60002077", "0.5795957", "0.56664264", "0.5662233", "0.5632111", "0.5582518", "0.55522084", "0.5478642", "0.54727703", "0.5390592", "0.5378717", "0.53760755", "0.53723043", "0.535446", "0.5338136", "0.5325704", "0.5302971", "0.5291686", "0.5286658...
0.6958715
0
tipos de celulas editaveis
function gridFormata(celula,formato, grid, coluna){ celula.val = celula.getValue(); celula.obj = document.createElement("input"); celula.obj.id = "celulaEditada"; celula.obj.style.width = "100%"; celula.obj.style.height = (celula.cell.offsetHeight-4)+"px"; celula.obj.style.border = "0px"; celula.obj.style.margi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateTips(t) {\n\t\ttips.text(t)\n\t}", "getTipIntrebare(){\n return INTREBARE_RASPUNS_SIMPLU\n }", "function showEditFunc(i) {\r\n //esconde o nome original no span\r\n $(\"#nome_func\" + i).hide();\r\n //mostra o input de edicao\r\n $(\"#input_nome_func\" + i).show();\r\n /...
[ "0.6112957", "0.60134125", "0.58878094", "0.5866563", "0.58586776", "0.5857769", "0.57920164", "0.57701856", "0.5761652", "0.5737218", "0.5715164", "0.5705326", "0.57018125", "0.56512666", "0.5647639", "0.5623347", "0.5620156", "0.56133187", "0.5608992", "0.56007683", "0.5584...
0.0
-1
to aqui de baixo para cima
function eXcell_metodo(cell){ this.valor = ""; try{ this.cell = cell; this.grid = this.cell.parentNode.grid; }catch(er){} this.edit = function(){;} this.getValue = function(){ return this.valor; } this.getContent = function(){ return this.cell.getAttribute("valor"); } this.setValue ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function comportement (){\n\t }", "function principal() {\n choquecuerpo();\n choquepared();\n dibujar();\n movimiento();\n \n if(cabeza.choque (comida)){\n comida.colocar();\n cabeza.meter();\n } \n}", "function prepararejercicio(){\n resetearimagenejercicio();\n bril...
[ "0.6248902", "0.61250275", "0.5871609", "0.57972896", "0.57643133", "0.57417756", "0.57306737", "0.57043606", "0.5654452", "0.5634521", "0.56341857", "0.56250215", "0.5619805", "0.5616313", "0.5614308", "0.5607389", "0.56032246", "0.5594783", "0.5585275", "0.5577702", "0.5567...
0.0
-1
a new page is activated and ready
function handleNewPage(e, obj){ if (e.type == bid.e.NEW_PAGE_START) { // sertificates switch(obj.page){ case bps.PWD: case bps.CHG_INFO: case bps.CHG_PWD: case bps.CHG_CONFIRMATION: case bps.SGN_RECEIPT: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "pageReady() {}", "sendPageReady() {}", "function pageReady() {\n\tupdateUUID();\n\tadaptButtons();\n}", "function newPageLoaded()\r\n{\r\n\ttry {\r\n\t\tscriptLog(\"new page loaded: \" + window.location );\r\n\t\t\r\n\t\tif(isVideoPage()) {\r\n\t\t\tscriptLog(\"video page\");\r\n\t\t\t\r\n\t\t\tif(settings_i...
[ "0.7262339", "0.72261965", "0.7164238", "0.7151614", "0.7077223", "0.69485706", "0.6883332", "0.68262273", "0.6803685", "0.68025494", "0.6761104", "0.6713671", "0.6709133", "0.6639164", "0.6617938", "0.6572732", "0.64638275", "0.64621145", "0.6448918", "0.64306694", "0.637413...
0.0
-1
Called when the subscription is ready for use on the server
connected() { console.log("Connected to player notifications", this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async onSubConnected() {\n if (process.env.NODE_ENV === \"development\")\n console.log(\"[Subscription] connected\");\n\n this.dispatch(appOperations.setSubscribed({ isSubscribed: true }));\n }", "async initSubscriptions() {\n\n }", "function subscribe(){\n performance.mark('subscribing');\n c...
[ "0.722448", "0.71371496", "0.7080637", "0.69785446", "0.6859562", "0.6806605", "0.67873996", "0.67060757", "0.6693452", "0.6683422", "0.6668491", "0.6644243", "0.6635981", "0.6614461", "0.6602639", "0.6602053", "0.65725917", "0.6560232", "0.65541726", "0.65490925", "0.6510125...
0.0
-1
Called when there's incoming data on the websocket for this channel
received({ state, type }) { console.log("data", type); switch (type) { case "render": { console.log("state", state); appState.currentPlayer = state.current_player_idx; Game(state); break; } default: { console.log("default"); break; } } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleWebsocketOpened() {\n this.sendHeaders();\n this.flushFrameBuffer();\n }", "received(message) {\n // Called when there's incoming data on the websocket for this channel\n return store.dispatch(addMessage(message));\n\n }", "connectedCallback() {\n this.subscribeToMessageChannel();\n ...
[ "0.69606805", "0.6846706", "0.6779629", "0.67396367", "0.6724", "0.6648874", "0.6592719", "0.6556705", "0.65171564", "0.6516501", "0.6514407", "0.64332294", "0.64126706", "0.640418", "0.6400238", "0.6399553", "0.63473475", "0.6330861", "0.63265616", "0.62966794", "0.622155", ...
0.0
-1
Kyle what is implicit binding? example for explicit binding when using the "this" keyword the .call() method is used to determine which context to use for the "this" keyword
function ask(question) { console.log(this.teacher, question); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function explicityBinding() {\n function ask(question) {\n console.log(this.teacher, question)\n }\n \n const context1 = {\n teacher: 'Kyle',\n ask,\n }\n \n const context2 = {\n teacher: 'Bruno',\n ask,\n }\n ask.call(context1, 'Why?')\n ask.call(context2, 'Why?')\n}", "function hardBou...
[ "0.68851525", "0.63839144", "0.62514156", "0.6245112", "0.62204254", "0.62186384", "0.6210417", "0.6191354", "0.60387003", "0.60387003", "0.59215516", "0.5919135", "0.59125304", "0.59027946", "0.58947074", "0.58766866", "0.5858927", "0.58372396", "0.58248156", "0.58134645", "...
0.0
-1
Prototypes example of prototypes as classes
function Workshop(teacher) { this.teacher = teacher; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function PrototypeBasedClass () {\n}", "function Prototype() {\n }", "get prototype() {}", "function FunctionWithPrototypeTest() {}", "function prototypeCheck()\n{\n let car = new protoCar(567);\n\n protoCar.prototype.startCar = function()\n {\n console.log('starting proto '+ this.ca...
[ "0.7376663", "0.71692467", "0.68304396", "0.67152596", "0.65891457", "0.65695596", "0.65553045", "0.6514359", "0.64993954", "0.6408456", "0.6400394", "0.63158464", "0.62592316", "0.6255047", "0.6229587", "0.6212599", "0.61776996", "0.6040378", "0.6040378", "0.6040378", "0.602...
0.0
-1
if there's a list that wasn't present previously, setFormDataForEdit ????
componentDidUpdate(previousProps) { this.props.list && !previousProps.list && setEditFormData(this.props.list) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function modifyList(){\n\t//TODO: submit formData to server\n}", "componentDidUpdate(prevProps){\n this.props.list && !prevProps.list &&\n this.props.setFormDataForEdit(this.props.list)\n }", "function editList() {\n e.preventDefault()\n const listName = newListInput.value;\n if (selectedListId...
[ "0.6984994", "0.63870203", "0.63410485", "0.625359", "0.61594605", "0.6117368", "0.6059059", "0.60530126", "0.60179484", "0.5980117", "0.59554476", "0.59229136", "0.5881074", "0.5847174", "0.58339185", "0.5800312", "0.5799569", "0.5773238", "0.5770522", "0.576337", "0.576011"...
0.6711553
1
if user navigates away from edit page, remove data from form
componentWillUnmount() { this.props.resetNewListForm() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onGoBack() {\n setFormDataEdit(null);\n setStep('Menu');\n }", "function cancelEdit(e){\n e.preventDefault();\n \n Session.set('editingPost', null);\n}", "removeForm() {\n if (this.$formContainer === null) {\n return;\n }\n\n delete this.formSaveAjax;\n /...
[ "0.662161", "0.65149564", "0.650704", "0.6458183", "0.6422515", "0.64041203", "0.63986456", "0.6398327", "0.6326598", "0.62452114", "0.6229905", "0.62007827", "0.619926", "0.6174361", "0.6151739", "0.6142215", "0.61294293", "0.61186063", "0.60818243", "0.60608566", "0.605654"...
0.0
-1
This code tracks the user's clicks, logging as GA events. Links in nongeneric regions can be tracked by adding '.trackwithanalyticsevents' to a parent div. Careful with the scoping.
function invokeCustomEventTracking() { $('body').addClass('google-analytics-loaded'); // Utility method if (!Array.prototype.last){ Array.prototype.last = function(){ return this[this.length - 1]; }; }; function analyticsTrackInteraction(actedOnItem, parentContainer) { var linkName = $(act...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function trackClicks(e) {\n _gaq.push(['_trackEvent', e.target.id, 'clicked']);\n }", "function vfGaLinkTrackingInit() {\n vfGaLogMessage('vfGaLinkTrackingInit');\n document.body.addEventListener(\"mousedown\", function (evt) {\n // Debug event type clicked\n vfGaLogMessage(evt.target.t...
[ "0.7467269", "0.70021075", "0.69047797", "0.6655822", "0.6554223", "0.6497512", "0.6493409", "0.6397166", "0.6397166", "0.6367669", "0.63541806", "0.6345584", "0.62908965", "0.6214874", "0.62132835", "0.6206382", "0.62046003", "0.61866695", "0.61684006", "0.6151187", "0.61204...
0.7498453
0
Reload all lab server objects from the database.
function flushServers() { root.error_list = {}; root.lab_list = {}; root.lab_configurations = {}; var i; for (i = 0; i < database.getKeys("servers").length; i++) { root._loadServer(i); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static reload() {\n for(let connection of LiveReload._connections) {\n connection.write(\"data: reload\\n\\n\");\n LiveReload._connections.slice(LiveReload._connections.indexOf(connection), 1);\n }\n }", "saveAll() {\n for (var server_id in this.servers) {\n ...
[ "0.6547813", "0.6440546", "0.6205749", "0.59773856", "0.5781241", "0.57637185", "0.5757198", "0.57567245", "0.5723395", "0.5673949", "0.56699514", "0.56371635", "0.56234926", "0.5610851", "0.55365515", "0.55100244", "0.55072576", "0.54773116", "0.5449439", "0.5444795", "0.544...
0.75509214
0
Measure the time difference between two calls of this function.
function _timeProfile(message) { if (config.show_performance) elapsed_time(message); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function howLongDidItTake() {\n\tvar end, start;\n\t\n\tstart = new Date();\n\t\n\t for(var i = 0; i < 10000; i++) {\n\t console.log(Math.sqrt(i));\n\t }\n\t\n\tend = new Date();\n \n var totalTime = end.getTime() - start.getTime();\n return 'This function took ' + totalTime + ' mseconds';\n\...
[ "0.68542135", "0.66572726", "0.6600888", "0.65763783", "0.6518659", "0.6518659", "0.6518659", "0.65010774", "0.64860773", "0.6324463", "0.6271145", "0.62600917", "0.61954504", "0.61891973", "0.6158204", "0.61517715", "0.61512464", "0.6056637", "0.6045796", "0.6039696", "0.602...
0.0
-1
Starts the service broker
function start() { _timeProfile("Creating log file hook"); //Logging and debug information var log_file = 'database/debug.log'; fs.unlink(log_file, function (err) { //Delete the old log /** * Create a hook into stdout to reroute the console output into a file. */ if (...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async started(broker) {}", "started(broker) {\n broker.createService(require(\"@steedos/service-enterprise\"));\n\t}", "async start(brokerPath) {\n this._broker = await amqp.connect(brokerPath);\n this._channel = await this._broker.createChannel();\n console.log('Connected to %s', brokerPath);\...
[ "0.7727527", "0.762198", "0.76009", "0.75013626", "0.68571764", "0.6587917", "0.65518904", "0.65512514", "0.65493464", "0.6378781", "0.6248874", "0.62269014", "0.62018615", "0.617225", "0.6083672", "0.6037285", "0.60127056", "0.5958194", "0.59463197", "0.59452116", "0.5869484...
0.5798589
26
Wrapper communication (consider moving this to the wrapper plugin?)
function wrapperForGUID(guid) //Should have used the GUID for the dictionary key... { var wraps = database.getKeys("wrappers"); var found_id = null; for (var i = 0; i < wraps.length; i++) { if (database.valueForKey("wrappers", wraps[i], undefined)['guid'] == g...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Adaptor() {}", "createWrapper() {\n return false;\n }", "function PluginWrapper(options, comArgs) {\n if (this.length === 1 && !options && !comArgs) {\n return $(findPluginElement(this)).data(pluginDataName);\n }\n else {\n return this.each(function () {\n // if element a...
[ "0.59170157", "0.5766199", "0.57315934", "0.571032", "0.5603473", "0.55653113", "0.5551859", "0.5548851", "0.5546877", "0.55237824", "0.5520101", "0.5514845", "0.547449", "0.5436683", "0.53920066", "0.5385951", "0.53609866", "0.5360953", "0.53412503", "0.5271569", "0.52649474...
0.0
-1
Unescape Twitter embed code
function HTMLDecode(encodedStr){ return $("<div/>").html(encodedStr).text(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function twitterEmbed() {\n //following converts html from Twitter embed into jquery to build on the fly so not hardcoded into html\n $(\"<a class=twitter-timeline href=https://twitter.com/jessimagallon?ref_src=twsrc%5Etfw>\").append(\"Tweets by jessimagallon\").append(\n $(\"<script async src=https://platform....
[ "0.61470383", "0.6024346", "0.57327783", "0.5702977", "0.5585047", "0.54994535", "0.5484713", "0.5418038", "0.5410668", "0.5405875", "0.5364085", "0.53596246", "0.5334093", "0.53098434", "0.5265673", "0.52624154", "0.5249593", "0.52465296", "0.51531476", "0.5123164", "0.50638...
0.5018563
25
Global Document Slider TO DO: Add Slider Script
function createDocumentSlider(source, target){ var resourceSource = ''; var resourcesTarget = ''; var resourceHtml = ''; var resourceName = ''; var resourceNameIsUrl = false; var resourceIndex = ''; var resourceFileTxt = ''; var resourceDocType = 'default'; var resourceAcceptableType = [ 'doc','doc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addSlider(id){\r\n\tslider = new Slider(id, {\r\n\t\tcallback: function(value) {\r\n\t\t},\r\n\t\tanimation_callback: function(value) {\r\n\t\t\tif(value>0){\r\n\t\t\t getDocViewer('documentViewer').setZoom(5*value);\r\n\t\t\t setZoomText(5*value);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n}", "function qodeOnD...
[ "0.70421296", "0.67817485", "0.67792296", "0.6737428", "0.6679713", "0.66454136", "0.6630043", "0.66264975", "0.657302", "0.6568038", "0.65589005", "0.6529954", "0.6519949", "0.64997077", "0.6492824", "0.648525", "0.6470188", "0.64528126", "0.6447752", "0.6420616", "0.64119",...
0.0
-1
constructor takes an object with properties that hold custom functions. the priority property takes in an element in object form, and returns the property on the element that it wants to prioritize
function MinPriorityQueue1(callbackObject) { //const queue = new MinMinPriorityQueue({ priority: x => x.val }) this.custom = callbackObject; this.heap = []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(value, priority) {\n this.value = value;\n this.priority = priority; // smaller value = higher priority\n }", "getPriority() {\n return 10;\n }", "function createComparisonFunction(propertyName){\n\n return function(obj1, obj2){\n var value1 = obj1[propertyName]; //act...
[ "0.6662182", "0.551556", "0.5467187", "0.5414961", "0.5414961", "0.53835124", "0.53804874", "0.53793484", "0.53612626", "0.53612626", "0.53612626", "0.53415096", "0.52947855", "0.526362", "0.523093", "0.52300775", "0.5175726", "0.5172263", "0.51274264", "0.51259786", "0.50575...
0.55015457
2
internal functions / exports
function init(x, y, width, height, data) { return COG.extend({ x: x, y: y, width: width, height: height }, data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _____SHARED_functions_____(){}", "transient protected internal function m189() {}", "private public function m246() {}", "transient private protected internal function m182() {}", "private internal function m248() {}", "static private internal function m121() {}", "transient private internal f...
[ "0.72803044", "0.7118931", "0.71076673", "0.6989487", "0.6982464", "0.685659", "0.67851526", "0.67029095", "0.66911304", "0.66690207", "0.6637113", "0.6637113", "0.6586037", "0.65706384", "0.65580297", "0.65335906", "0.64966965", "0.64299583", "0.6408045", "0.6398598", "0.639...
0.0
-1
For AES, this is always 16
function encrypt(value){ const iv = crypto.randomBytes(IV_LENGTH); const cipher = crypto.createCipheriv(algorithm, key, iv); let crypted = cipher.update(value,'utf8','hex'); crypted += cipher.final('hex'); return `${iv.toString('hex')}:${crypted.toString()}`; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_getSharedSecret() {\n // Once every ~256 attempts, we will get a key that starts with a `00` byte, which\n // can lead to problems initializing AES if we don't force a 32 byte BE buffer.\n return Buffer.from(this.key.derive(this.ephemeralPub.getPublic()).toArray('be', 32));\n }", "function aes(length)...
[ "0.64432895", "0.61592823", "0.6098682", "0.6096003", "0.60572577", "0.6049964", "0.6049964", "0.6049964", "0.6040046", "0.60291195", "0.60171133", "0.6016863", "0.5992071", "0.590226", "0.58931863", "0.58597344", "0.58597344", "0.58574593", "0.5842905", "0.5827831", "0.58019...
0.57485396
27
used as a reference. author: ?, year: 2014, title: Slider, time accessed: 4/25 13:40,
function createFilter(jsonD) { var max_cost = Math.ceil(d3.entries(jsonD) .sort(function(a, b) { return d3.descending(a.value.cost, b.value.cost); })[0].value.cost/5000)*5000; var max_enrollment = Math.ceil(d3.entries(jsonD) .sort(function(a, b) { return d3.descending(a.value.size, b.value.size); })[0].valu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update(slide) {\n title(slide);\n axes(slide,defaultYear);\n legend(slide);\n lines(slide);\n cars(slide,defaultYear);\n annotation(slide);\n text(slide);\n}", "function filterByYearAndSlider() {\n if (running) {\n\n displayYear = displayYear + 1;\n if (displayYear ...
[ "0.6023759", "0.59663785", "0.59257936", "0.59131503", "0.589148", "0.5860435", "0.574881", "0.57328063", "0.5723203", "0.5662079", "0.5581048", "0.55730283", "0.55545515", "0.5545367", "0.551545", "0.5511275", "0.54735094", "0.5465235", "0.5448348", "0.5440831", "0.5434639",...
0.0
-1
helper function that returns alternating colored rows
function zebraRows(d, i) { if (i % 2 == 0) { return "lightgray"; } else { return "white"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function alternatingTableCellColor() {\n\t\t$('.containerX.display-item:odd').css('background-color','rgb(100, 200, 255, 0.25)');\n\t\t$('.containerX.display-item:even').css('background-color','rgb(150, 250, 200, 0.25)');\n\t\t$('.container.categoryX:odd').css('background-color','rgb(100, 200, 255, 0.25)');\n\t\t$...
[ "0.7157842", "0.6854634", "0.6556407", "0.65157586", "0.63981444", "0.6356186", "0.6325014", "0.6207395", "0.61239094", "0.6072044", "0.60229385", "0.59999186", "0.59413433", "0.591199", "0.5856687", "0.58533406", "0.579994", "0.57766956", "0.5763184", "0.5748165", "0.5743871...
0.7376263
0
Clear the previouslyactive brush, if any.
function brushstart(p) { if (brushCell !== this) { d3.select(brushCell).call(brush.clear()); brushCell = this; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clear() {\n this.initExtent_ = null;\n var cl = '.' + this.brushClass_ + ' .brush-' + this.getId();\n d3.select(cl).call(this.brush_.clear());\n }", "ClearGraphicHighlight() {\n this.highlight.remove();\n this.highlight = null;\n }", "function clearSelection() {\n\t\t\tif(prevSelecti...
[ "0.81754714", "0.6953698", "0.6856424", "0.6697358", "0.6692712", "0.6691703", "0.6670372", "0.6670372", "0.66272247", "0.65942454", "0.65037674", "0.64868087", "0.643409", "0.6426298", "0.6373783", "0.6372395", "0.63553053", "0.633219", "0.6297087", "0.6296526", "0.6247603",...
0.65225613
10
clears all vis and creates vis with new dataset
function reset() { d3.selectAll("#tableVis table tr").style("font-weight", "normal"); destroyVis(); colleges = Object.keys(current_json); autocomp(); createVis(current_json, current_csv); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function populateVis(){\n\t$(\"#pie\").html(\"\");\n\t$(\"#bar\").html(\"\");\n\t$(\"#radial\").html(\"\");\n\t$(\"#lab3\").trigger(\"reset\");\n\tgeneratePie();\n\tgenerateBar();\n\tgenerateRadial();\n}", "reset() {\n this.dataset = [];\n this.svg.selectAll(\"circle\").remove();\n this.svg.select...
[ "0.6722552", "0.65367526", "0.64584", "0.62706476", "0.62664926", "0.62565756", "0.6239464", "0.6212387", "0.6148603", "0.61355746", "0.6129531", "0.6121859", "0.6112612", "0.6090714", "0.60868365", "0.6074491", "0.60587317", "0.6039017", "0.5977339", "0.5972294", "0.592693",...
0.6389887
3
var Q = require("q");
function PromiseHelperV3() { var self = this; var p = PromiseHelperV3.prototype; self.starter = "--\t\t" self.debugName = self.starter + 'PromH' self.data = {} self.start = function start(arg1) { //var deferred = Q.defer(); console.log('starting...') console.log('starting...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "q() {}", "q() {}", "q() {}", "function queueSetup() {\n console.log(\"q setup done\");\n}", "function Qe(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{c(r.next(t))}catch(t){o(t)}}function s(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.val...
[ "0.7307916", "0.7307916", "0.7307916", "0.6280964", "0.6183644", "0.608834", "0.59373575", "0.5932476", "0.58307534", "0.5827064", "0.57492584", "0.57238734", "0.5618894", "0.5592295", "0.5592295", "0.55647725", "0.55500174", "0.5520297", "0.55064917", "0.5466201", "0.546218"...
0.0
-1
Core highlighting function. Accepts a language name, or an alias, and a string with the code to highlight. Returns an object with the following properties: relevance (int) value (an HTML string with highlighting markup)
function highlight(name, value, ignore_illegals, continuation) { function subMode(lexeme, mode) { var i, length; for (i = 0, length = mode.contains.length; i < length; i++) { if (testRe(mode.contains[i].beginRe, lexeme)) { return mode.contains[i]; } } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _highlight(languageName, code, ignore_illegals, continuation) {\n var codeToHighlight = code;\n\n function endOfMode(mode, lexeme) {\n if (startsWith(mode.endRe, lexeme)) {\n while (mode.endsParent && mode.parent) {\n mode = mode.parent;\n }\n return mode;\n }...
[ "0.7377836", "0.72873086", "0.69761014", "0.67955214", "0.671655", "0.67056555", "0.66826814", "0.6654753", "0.6654753", "0.6654753", "0.6654753", "0.6654753", "0.6654753", "0.6654753", "0.66529477", "0.66529477", "0.66525805", "0.66525805", "0.66525805", "0.66525805", "0.665...
0.6683119
6
Highlighting with language detection. Accepts a string with the code to highlight. Returns an object with the following properties: language (detected language) relevance (int) value (an HTML string with highlighting markup) second_best (object with the same structure for secondbest heuristically detected language, may...
function highlightAuto(text, languageSubset) { languageSubset = languageSubset || options.languages || objectKeys(languages); var result = { relevance: 0, value: escape(text) }; var second_best = result; languageSubset.filter(getLanguage).forEach(function (name) { var current...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function highlightAuto(text, languageSubset) {\n languageSubset = languageSubset || options.languages || Object.keys(languages);\n var result = {\n relevance: 0,\n value: escape(text)\n };\n var second_best = result;\n languageSubset.forEach(function(name) {\n if (!getLanguage(name)) ...
[ "0.70024794", "0.70024794", "0.70024794", "0.70024794", "0.70024794", "0.70024794", "0.70024794", "0.6996157", "0.6996157", "0.6996157", "0.6996157", "0.6996157", "0.6996157", "0.6996157", "0.6996157", "0.6980785", "0.69761235", "0.69761235", "0.69761235", "0.69761235", "0.69...
0.6983048
15
Updates highlight.js global options with values passed in the form of an object.
function configure(user_options) { options = inherit(options, user_options); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function UpdateConfiguration() {\n var config = vscode.workspace.getConfiguration('hl7tools');\n highlightFieldBackgroundColor = config['highlightBackgroundColor'];\n}", "static define(specs, options) {\n return new HighlightStyle(specs, options || {});\n }", "function populate_highlights() {\n...
[ "0.6090472", "0.58452064", "0.5755613", "0.54841745", "0.5399247", "0.52384245", "0.5233792", "0.52202296", "0.51931155", "0.51917785", "0.51749957", "0.5163311", "0.5163189", "0.5136538", "0.5136538", "0.51351887", "0.51351887", "0.5131659", "0.5119688", "0.51052284", "0.509...
0.0
-1
Virtual DOM patching algorithm based on Snabbdom by
function createRendererPatch(plt, domApi) { // createRenderer() is only created once per app // the patch() function which createRenderer() returned is the function // which gets called numerous times by each component function createElm(vnode, parentElm, childIndex) { var i = 0; if (vno...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateDOM() {\n\tvar newTree = render(data);\n\tvar patches = diff(tree, newTree);\n\trootNode = patch(rootNode, patches);\n\ttree = newTree;\n}", "function DOMImplementation() {}", "function DOMImplementation() {}", "function DOMImplementation() {}", "function DOMImplementation() {}", "function...
[ "0.661534", "0.63180214", "0.63180214", "0.63180214", "0.63180214", "0.6172389", "0.6172389", "0.6153784", "0.60723156", "0.58822995", "0.5882228", "0.58135533", "0.57744604", "0.5773713", "0.5709002", "0.5693531", "0.56575966", "0.56575966", "0.56575966", "0.56575966", "0.56...
0.0
-1
createRenderer() is only created once per app the patch() function which createRenderer() returned is the function which gets called numerous times by each component
function createElm(vnode, parentElm, childIndex) { var i = 0; if (vnode.vtag === SLOT_TAG) { if (hostContentNodes) { // special case for manually relocating host content nodes // to their new home in either a named slot or the default slot var ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getRenderer () {}", "function createRendererPatch(plt, domApi) {\n // createRenderer() is only created once per app\n // the patch() function which createRenderer() returned is the function\n // which gets called numerous times by each component\n function createElm(vnode, parentElm, childIndex) {\n ...
[ "0.7360355", "0.71916205", "0.70129657", "0.6970786", "0.68136126", "0.6755889", "0.66557944", "0.6650475", "0.664111", "0.664111", "0.66377944", "0.66377944", "0.6602249", "0.6601449", "0.6503783", "0.64996994", "0.6494446", "0.64519155", "0.64421755", "0.643811", "0.637139"...
0.0
-1