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
The method to get books from folio backend and then call getRenderItems
findInstances(token) { // load preference and make url for fetching books let url = hostUrl.url + '/instance-storage/instances?limit=10&query='; var len = this.state.resources.length; for (i = 0; i < len; i++) { if (this.state.resources[i].checked) { url = url...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getBooks () {\n fetch(bookUrl)\n .then(resp => resp.json())\n .then(books => {\n renderBooks(books);\n window.allBooks = books\n }) //aspirational code to renderBooks(books)\n }", "async function getAllBooks () {\n console.log('book')\n const bo...
[ "0.7621194", "0.74260765", "0.71727484", "0.7171112", "0.70661473", "0.705041", "0.7026529", "0.70263046", "0.6961969", "0.6945645", "0.69358027", "0.6931849", "0.6873062", "0.68509036", "0.6805397", "0.6779863", "0.6779578", "0.67167157", "0.6702709", "0.6701072", "0.6680734...
0.0
-1
The method to get covers from Google book API based on ISBN and title of the books
async getCover(isbn, title) { try { let response = await axios.get( 'https://www.googleapis.com/books/v1/volumes?q=title=' +encodeURIComponent(title) +isbn + "&key=AIzaSyClcFkzl_nDwrnCcwAruIz99WInWc0oRg8" ); return response.data.items[0].volumeInfo.imageLinks.sm...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static fetchBooksFromGoogle(searchInput){ //searchInput from Content.js\n return fetch(`https://www.googleapis.com/books/v1/volumes?q=${searchInput}`)\n .then(response => response.json())\n .then(json => {\n return json.items.map(item => this.createBook(item)) //returns an array of objects created fr...
[ "0.67026985", "0.6645842", "0.6580502", "0.6496905", "0.64402133", "0.63113433", "0.62750965", "0.6272987", "0.62532353", "0.620866", "0.6171927", "0.61680335", "0.6154817", "0.60867167", "0.60772777", "0.6073042", "0.60596097", "0.6036178", "0.60256964", "0.5970491", "0.5926...
0.73480374
0
The method to add covers info into each books
async getRenderItems(token) { let books = []; var isbnid; var coverUrl; for (i = 0; i < this.state.idTypes.length; i++) { if (this.state.idTypes[i].name == "ISBN") { isbnid = this.state.idTypes[i].id; break; } } var ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addCategoryBooks(category, index){\n createCategory(category)\n fetch(`https://www.googleapis.com/books/v1/volumes?q=subject:${category}`)\n .then(response => {return response.json()})\n .then(data => {\n data.items.forEach(element => { \n if (element.volumeInfo.hasOwnProper...
[ "0.6399229", "0.6202844", "0.61540407", "0.6067933", "0.60023546", "0.59399813", "0.59162563", "0.5916238", "0.58444685", "0.5840512", "0.58328", "0.5832684", "0.5829834", "0.58284855", "0.5822957", "0.57991415", "0.5790416", "0.5788652", "0.57770354", "0.57595783", "0.575444...
0.58888483
8
Bias the autocomplete object to the user's geographical location, as supplied by the browser's 'navigator.geolocation' object.
function geolocate() { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(function(position) { var geolocation = { lat: position.coords.latitude, lng: position.coords.longitude }; var circle = new google.m...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "biasAutocompleteLocation () {\n if (this.enableGeolocation) {\n this.updateGeolocation((geolocation, position) => {\n let circle = new google.maps.Circle({\n center: geolocation,\n radius: position.coords...
[ "0.757561", "0.71489835", "0.7033695", "0.6981168", "0.6907958", "0.687647", "0.687647", "0.6859294", "0.68380755", "0.68195796", "0.67971236", "0.67971236", "0.67971236", "0.67962784", "0.67962784", "0.6796255", "0.67828804", "0.67651147", "0.67490447", "0.67490447", "0.6749...
0.66657287
30
Grabs the users input and stores them in userStore.js
function handleReg() { 'use strict'; var userName = document.getElementById("inputEmail").Value; var password = document.getElementById("inputPassword").Value; var confirmPassword = document.getElementById("confirmInputPassword").Value; var userStore = new App.UserStore(); userStore.save(userNam...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get userInput() {\n return this._user;\n }", "function getInputValues() {\n let usernameInput = document.querySelector(\".signup_form-username input\")\n .value;\n let emailInput = document.querySelector(\".signup_form-email input\").value;\n let passwordInput = document.querySelector(\".signup_f...
[ "0.6901361", "0.6828137", "0.66438776", "0.65862954", "0.64832234", "0.6346777", "0.62587905", "0.62224555", "0.6214027", "0.61725223", "0.6165362", "0.6116718", "0.6089272", "0.60808474", "0.6073208", "0.6072496", "0.6057121", "0.6043244", "0.6036908", "0.60289484", "0.60264...
0.0
-1
Replies back to the user with information about where the attachment is stored on the bot's server, and what the name of the saved file is.
async function replyForReceivedAttachments(localAttachmentData) { if (localAttachmentData) { // Because the TurnContext was bound to this function, the bot can call // `TurnContext.sendActivity` via `this.sendActivity`; await this.sendActivity(`Attachment "${ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleAttachmentMessage() {\n let response;\n\n // Get the attachment\n let attachment = this.webhookEvent.message.attachments[0];\n //console.log(\"Received attachment:\", `${attachment} for ${this.user.psid}`);\n\n response = Response.genQuickReply(i18n.__(\"fallback.attachment\"), [\n {\n ...
[ "0.6406462", "0.6172073", "0.6062147", "0.6062147", "0.6020556", "0.5929268", "0.5841937", "0.5737819", "0.5737073", "0.5737073", "0.5734843", "0.56917673", "0.56610465", "0.5645517", "0.5584695", "0.5542011", "0.55292356", "0.54726654", "0.54699534", "0.5462597", "0.5378199"...
0.64615303
0
Returns an inline attachment.
getInlineAttachment() { const imageData = fs.readFileSync(path.join(__dirname, '../resources/architecture-resize.png')); const base64Image = Buffer.from(imageData).toString('base64'); return { name: 'architecture-resize.png', contentType: 'image/png', content...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getInlineImg(message){\n var attachments = message.getAttachments({\n includeInlineImages: true,\n includeAttachments: false\n });\n \n return attachments;\n}", "get inlineContent() {\n return this.type.inlineContent;\n }", "get attachment () {\n\t\treturn this._attachment;\n\t}", "get...
[ "0.6851515", "0.6266762", "0.6195806", "0.6073926", "0.603093", "0.6015178", "0.6015178", "0.58593965", "0.5832146", "0.5763233", "0.5739862", "0.5718545", "0.5606278", "0.55855846", "0.5533645", "0.5493206", "0.5454444", "0.5404289", "0.5361439", "0.53519976", "0.5322941", ...
0.71616316
0
Returns an attachment to be sent to the user from a HTTPS URL.
getInternetAttachment() { // NOTE: The contentUrl must be HTTPS. return { name: 'architecture-resize.png', contentType: 'image/png', contentUrl: 'https://docs.microsoft.com/en-us/bot-framework/media/how-it-works/architecture-resize.png' }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async getFileURLSigned(url) {\n const path = await this.getPathFromUrl(url);\n const result = await this.doRequest({\n path,\n method: \"GET\",\n params: {\n noRedirect: true,\n },\n });\n return result;\n }", "function get...
[ "0.5525053", "0.5393399", "0.52978003", "0.52469337", "0.5226839", "0.5204368", "0.5202747", "0.5202747", "0.5176209", "0.51752496", "0.51749665", "0.5170118", "0.5170118", "0.5165892", "0.51444054", "0.5136136", "0.51212376", "0.51186424", "0.50992525", "0.5085678", "0.50807...
0.59386057
0
private function defined inside of another function
function hide(ele) { ele.classList.remove(showClass); ele.classList.add(hideClass); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _privateFn(){}", "_privateFunction() {}", "function privateFunction(){\n\t// That will be used only on this file\n}", "function _____SHARED_functions_____(){}", "function privateFunction() {\n\n}", "transient protected internal function m189() {}", "transient private protected internal functio...
[ "0.7571467", "0.73252374", "0.7186675", "0.7097648", "0.69567215", "0.68375", "0.677175", "0.676269", "0.6695914", "0.6695914", "0.6695914", "0.66492236", "0.6640564", "0.6586807", "0.6585637", "0.65433586", "0.65216255", "0.65185213", "0.649684", "0.6475942", "0.64243406", ...
0.0
-1
private function defined inside of another function
function show(ele) { ele.classList.remove(hideClass); ele.classList.add(showClass); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _privateFn(){}", "_privateFunction() {}", "function privateFunction(){\n\t// That will be used only on this file\n}", "function _____SHARED_functions_____(){}", "function privateFunction() {\n\n}", "transient protected internal function m189() {}", "transient private protected internal functio...
[ "0.7569897", "0.7323845", "0.7184587", "0.7097763", "0.69543916", "0.68383545", "0.67730814", "0.6763524", "0.66957223", "0.66957223", "0.66957223", "0.66489774", "0.6640806", "0.6584797", "0.6584436", "0.65443206", "0.65216", "0.6518762", "0.6496795", "0.6476739", "0.6424182...
0.0
-1
create an object contructor for the about page
function About(obj) { this.name = obj.name; this.giturl = obj.giturl; this.porturl = obj.porturl; this.description = obj.description; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function AboutViewModel() {\n \n\t \n\t \n return AboutViewModel();\n }", "function load_about() {\n\t\tvar about_card = new UI.Card({\n\t\t\tbody: 'WMATA With You\\n' +\n\t\t\t\t'version 2.5\\n' +\n\t\t\t\t'by Alex Lindeman\\n\\n' +\n\t\t\t\t'Built with Pebble.js and the WMATA API.',\n\t\t\tscrollable: ...
[ "0.65293044", "0.65177935", "0.63212216", "0.61964065", "0.61757743", "0.61757743", "0.611987", "0.609772", "0.6075698", "0.60373044", "0.601762", "0.59945744", "0.59507304", "0.59452647", "0.5937162", "0.5936154", "0.5930287", "0.5927293", "0.59219724", "0.59016234", "0.5901...
0.75398135
0
You can extend webpack config here
extend (config, ctx) { config.node = { fs: 'empty' } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "extend (config, { isDev, isClient }) {\n // if (isDev && isClient) {\n // config.module.rules.push({\n // enforce: 'pre',\n // test: /\\.(js|vue)$/,\n // loader: 'eslint-loader',\n // exclude: /(node_modules)/\n // })\n // }\n if (process.server && p...
[ "0.75780183", "0.7486256", "0.74535376", "0.7388344", "0.73616195", "0.72877634", "0.7282417", "0.7211369", "0.71547335", "0.7107632", "0.70970905", "0.7090317", "0.7045734", "0.7035934", "0.70036227", "0.699704", "0.69930667", "0.6985959", "0.69833404", "0.6973784", "0.69592...
0.0
-1
ejecuto la funcion cada 5 segundos de manera asincrona mando a ejutar un codigo php donde revisa los tados de la variable de sesion el nombre de usuario y el Id_de la sesion correspondan, si no es asi entonces significa que alguien mas ya inicio sesion y es necesario cerrar la sesion
function sesiondoble(){ $.ajax({ url : 'src/doblesesion.php', type : 'GET', dataType : 'text', success:function(data){ if(data=='false'){ alert('¡La sesión ha caducado!'); location.href ="src/proces-unlgn.php"; } } }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function iniciar_Sesion()\n{\n\t// obtiene el nombre del usuario\n\tvar nombre_usuario = document.getElementById(\"user\").value;\n\t// obtiene la contraseña del usuario\n\tvar contrasenna = document.getElementById(\"password\").value;\n\t// pregunta si el nombre es admin y la contraseña es $uperadmin para saber s...
[ "0.6525565", "0.63537925", "0.61922014", "0.6178559", "0.6134287", "0.6097374", "0.60960543", "0.6025432", "0.5994556", "0.5975013", "0.5925412", "0.59084034", "0.59013116", "0.5900532", "0.58966297", "0.5896281", "0.5889829", "0.5860884", "0.5848753", "0.5840015", "0.5837493...
0.0
-1
prikazi na ekranu random boju
function displayColorsOnScren() { boxContainer.innerHTML = ''; for (let i = 0; i < 5; i++) { let color = generateColors(); let div = document.createElement('div'); div.classList.add('card'); div.innerHTML = ` <div class='inner-color' style="background-color:${color}"></div> <p>${ge...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rand(){\n return Math.random()-0.5;\n }", "function random() {\n\t\tseed = Math.sin(seed) * 10000;\n\t\treturn seed - Math.floor(seed);\n\t}", "function r(){return Math.random().toString().slice(2,7)}", "function random () {\n\t\n\tseed = 312541332155 * (4365216455 + seed) % 765475425324...
[ "0.76581866", "0.7561327", "0.7476238", "0.7422026", "0.741523", "0.741523", "0.7407506", "0.73963237", "0.7395402", "0.7393059", "0.73906994", "0.7389383", "0.7380398", "0.7360194", "0.731661", "0.7281502", "0.72800887", "0.72769994", "0.72769994", "0.72538954", "0.7252942",...
0.0
-1
Map.addLayer(zones,vizParams,'zones'); throw('stop') create bounds for training samples inside area of interest
function buffer(geometry) { return geometry.buffer(60).bounds(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addPlaceMarks() {\n // first init layer\n if (gazetteerLayer == null) {\n gazetteerLayer = new WorldWind.RenderableLayer(\"GazetteerLayer\"); \n\n for (var i = 0; i < availableRegionsCSV.length; i++) { \n // create a marker for each p...
[ "0.6935572", "0.6467375", "0.62006646", "0.61611086", "0.61373556", "0.6132955", "0.61213917", "0.6110908", "0.6102509", "0.60612994", "0.6055654", "0.6024656", "0.5932326", "0.5907664", "0.5904399", "0.5863835", "0.5847823", "0.5835571", "0.5830434", "0.5807221", "0.5798253"...
0.0
-1
buffer function of 1km
function buffer1(geometry) { return geometry.buffer(10000); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buffer1(geometry) {\n return geometry.buffer(60).bounds();\n}", "function computeBuffer() {\r\n this._buffer = map.layerPointToLatLng(new L.Point(0,0)).lat -\r\n map.layerPointToLatLng(new L.Point(this.options.snapDistance, 0)).lat;\r\n }", "function buffer...
[ "0.67347836", "0.66657174", "0.6660325", "0.6660325", "0.6186504", "0.59790933", "0.5664077", "0.5661304", "0.5626181", "0.5460146", "0.5447599", "0.543933", "0.53866404", "0.5386023", "0.53715533", "0.5347923", "0.53474945", "0.5319464", "0.531812", "0.5299512", "0.5299512",...
0.6917525
2
var die na lekhle eta global variabe hoe jabe; return result; // window.result dielo global variable hoe jabe;
function double(num) { return num * 2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function retorno1(){\n var numero = 10;\n return numero;\n}", "function exercicio01() {\n var variavel = \"valor\";\n return variavel;\n}", "getResult() {}", "function suma(){\n resultado= 10 + 5;\n}", "function inicio(){\n return b;\n}", "function test(){\n return a;\n}", "function s...
[ "0.7032477", "0.6846523", "0.6434666", "0.6228347", "0.61696726", "0.61138123", "0.60999286", "0.60820925", "0.607103", "0.60559213", "0.5981996", "0.59591234", "0.59565854", "0.5953085", "0.59427196", "0.59360707", "0.5933767", "0.59320545", "0.59239024", "0.5914561", "0.588...
0.0
-1
rect(enemiesX, enemiesY, 30, 40); fill(color2); } }
function keyPressed() { if(keyCode === 32){ bulletSpeed = 25; } console.log("here", bulletX, bulletY) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function food() {\n fill(255, 0, 0, alpha);\n rect(foodX, foodY, 15, 15);\n noFill();\n\n}", "function paintEnemies(enemies) {\n enemies.forEach(function (enemy) {\n enemy.y += 5;\n enemy.x += getRandomInt(-15, 15);\n\n // Paint only if not dead\n if (!enemy.isDead) {\n paintTriangle(enemy.x...
[ "0.747072", "0.720835", "0.7198266", "0.7083588", "0.704784", "0.69502765", "0.69106334", "0.69009435", "0.68677914", "0.67689973", "0.6768303", "0.6758516", "0.6740612", "0.6720367", "0.6702982", "0.6675754", "0.6654712", "0.6651877", "0.6647239", "0.6612079", "0.6611717", ...
0.0
-1
function to initialize our game
function init() { scores = [0, 0]; activePlayer = 0; roundScore = 0; gamePlaying = true; //hiding the dice image when the page first loads using css display property to none document.querySelector('.dice').style.display = 'none'; document.querySelector('.dice1').style.display = 'none'; //set...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init() {\n\t\t// reset will display start game screen when screen is designed\n\t\treset();\n\n\t\t// lastTime required for game loop\n\t\tlastTime = Date.now();\n\n\t\tmain();\n\t}", "function initGame() {\r\n initPelota();\r\n initNavecilla();\r\n initLadrillos();\r\n}", "function init() {\n /...
[ "0.82882", "0.81579024", "0.8085838", "0.80758095", "0.803133", "0.8004256", "0.79349345", "0.7932349", "0.79317266", "0.7929272", "0.7920643", "0.78910893", "0.7882733", "0.78514594", "0.7845285", "0.7774829", "0.7763958", "0.77402776", "0.7721561", "0.77022564", "0.76888716...
0.0
-1
! Chart.js v4.2.0 (c) 2023 Chart.js Contributors Released under the MIT License
function Oo(){}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "renderChart() {\n const labels = Object.keys(this.props.data).sort();\n const values = labels.map(label => this.props.data[label]);\n const node = document.getElementById('chart');\n this.chart = new Chart(node, {\n type: 'line',\n data: {\n labels: labels,\n datasets: [\n ...
[ "0.70855707", "0.700121", "0.69221365", "0.6788588", "0.67832", "0.67777795", "0.676865", "0.6755704", "0.6742473", "0.67413217", "0.67340744", "0.6711278", "0.670268", "0.67015827", "0.669669", "0.66966295", "0.6685293", "0.66786045", "0.6661944", "0.6650581", "0.66422", "...
0.0
-1
End of button assignment Start of numbers logic
function calcNumbers (num) { if (calcState.numFlag) { output.innerHTML = num; calcState.numFlag = false; return; } if (output.innerHTML === '0' && num === '.') { output.innerHTML = output.innerHTML + num; return; } if (...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function button1Clicked()\n{\n if (powerState == 1)\n {\n batteryCheck()\n console.log(\"number button 1 pressed\")\n \n if (operatorClicked == false && number1.length <= 8)\n {\n number1 += 1; \n document.getElementById(\"screenTextBottom\").te...
[ "0.65758437", "0.6554112", "0.6450468", "0.63544744", "0.6280753", "0.62525535", "0.6251711", "0.62029934", "0.6183051", "0.6173324", "0.6140532", "0.6119348", "0.6111421", "0.61008346", "0.6096863", "0.60785323", "0.60282135", "0.59929127", "0.5972412", "0.5968983", "0.59622...
0.0
-1
End of numbers logic Start of operator logic
function calcFunctions (func) { switch(func) { case 'backspace': case 'DEL': output.innerHTML = output.innerHTML.substring(0, output.innerHTML.length - 1); if (output.innerHTML === '') { output.innerHTML = '0'; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getOperator()\n\t{\n\t\t// handle 2 consecutive operators\n\t\t\n\t\tif(acc == \"\" && this.value == \"-\")\n\t\t{\n\t\t\t// Here - is the sign of the number and not op\n\t\t\tacc = acc + this.value;\n\t\t\tdocument.getElementById(\"output\").value = acc;\n\t\t\treturn;\n\t\t}\n\t\telse if(acc == \"-\")\n...
[ "0.6438895", "0.642005", "0.6313619", "0.62660766", "0.6227004", "0.6225525", "0.6188781", "0.6183561", "0.6156366", "0.6130344", "0.61180115", "0.61111593", "0.6096394", "0.60957605", "0.6085068", "0.60707194", "0.60658646", "0.6021382", "0.601934", "0.601841", "0.60129464",...
0.0
-1
End of operator logic Start of equals function
function equalsFn (arithmetic) { output.innerHTML = arithmetic(Number(firstNum), Number(output.innerHTML)) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "equals() {\n return false;\n }", "equals() {\n return false;\n }", "Equals() {\n\n }", "Equals() {\n\n }", "function eq(a, b) {\n return a === b;\n }", "function equals(){\n switch(savedOperation) {\n case '/':\n value = divide(savedValue, value);\n break;\n case '*':\n...
[ "0.70117974", "0.70117974", "0.6799219", "0.6799219", "0.67574215", "0.6714422", "0.6670991", "0.6650868", "0.6635945", "0.6469188", "0.6423914", "0.6328103", "0.6318331", "0.6314965", "0.63020474", "0.6276517", "0.6268106", "0.62232924", "0.6181875", "0.61738473", "0.6164787...
0.0
-1
Creating useState and useEffect
function FetchData() { const [items, setItems] = useState([]); useEffect(() => { fetchItems(); }, []); //fetch items from api/json file "http://jsonplaceholder.typicode.com/photos" //send error if bad http status //usin ?albumId=1 to get data only from album 1 from http://jsonplacehold...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function YourBooking() {\n const [Allbooking, setAllBooking] = useState([]);\n const history = useHistory();\n const Auth = localStorage.getItem(\"current\") === \"true\";\n useEffect(function () {\n // when anything changes this is what you should use to update?? but y do i need this when usestate also rer...
[ "0.67669904", "0.6462928", "0.642774", "0.62593836", "0.6222612", "0.61465394", "0.6135801", "0.60916144", "0.6068124", "0.59664667", "0.5961886", "0.5926755", "0.58576447", "0.58495355", "0.58310616", "0.58195156", "0.5814152", "0.58067816", "0.5803149", "0.58014494", "0.579...
0.0
-1
IEEE 80 bit extended float
readFloat80 (littleEndian) { this.read(10, littleEndian) return float80() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function writeFloat( buf, v, offset, dirn ) {\n var norm, word, sign = 0;\n if (v < 0) { sign = 0x80000000; v = -v; }\n\n if (! (v && v < Infinity)) {\n if (v === 0) { // -0, +0\n word = (1/v < 0) ? 0x80000000 : 0x00000000;\n }\n else if (v === Infinity) { ...
[ "0.6808168", "0.6808168", "0.64386445", "0.6378993", "0.63424796", "0.63230914", "0.622323", "0.61889064", "0.61809254", "0.6088265", "0.60630894", "0.60406524", "0.60131747", "0.6010828", "0.60093445", "0.59962416", "0.5969833", "0.5946727", "0.59460145", "0.5944585", "0.593...
0.7223796
0
End of public functions
function _DoRender(timeStamp) { var doRender = true; try { thingload.DoRender(timeStamp); } catch (err) { console.log("Javascript caught exception "+ err); doRender = false; } if (doRender) requestAnimationFrame(_DoR...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private public function m246() {}", "transient protected internal function m189() {}", "transient private protected internal function m182() {}", "private internal function m248() {}", "protected internal function m252() {}", "transient private internal function m185() {}", "transient final protected i...
[ "0.7327302", "0.7083428", "0.7075803", "0.7044941", "0.6938982", "0.6893427", "0.6765804", "0.658856", "0.65667045", "0.6405944", "0.6346305", "0.63282895", "0.6294781", "0.6285552", "0.6281922", "0.6281631", "0.6279803", "0.6203529", "0.6193417", "0.61609524", "0.61343634", ...
0.0
-1
three.ex.js + sparks approach
function create_sparks_particles(){ var sparks = new THREEx.Sparks({ maxParticles : 50, counter : new SPARKS.SteadyCounter(20), //texture : THREE.ImageUtils.loadTexture("./images/tremulous/damage/blood.jpg"), //texture : THREE.ImageUtils.loadTexture("./images/tremulous/lcannon/primary_4.jpg"), ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init_scene() {\n spheres = new Array();\n spheres[0] = {\n center: {\n x: -2.0,\n y: 0.0,\n z: -3.5\n },\n radius: 0.5\n };\n spheres[1] = {\n center: {\n x: -0.5,\n y: 0.0,\n z: -3.0\n },\n radius: 0.5\n };\n sphere...
[ "0.6465934", "0.64145064", "0.64121383", "0.63814074", "0.6365729", "0.63539296", "0.63539296", "0.6348783", "0.6347253", "0.63336706", "0.6276807", "0.62740856", "0.62642395", "0.6253181", "0.623196", "0.6220718", "0.6206399", "0.6155851", "0.6155828", "0.6151604", "0.614883...
0.6379459
4
! vuerouter v3.1.3 (c) 2019 Evan You
function r(t,e){0}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function jj(t,e,n,r,i,o,a,s){var l=(\"function\"===typeof n?n.options:n)||{};return l.__file=\"source.vue\",l.render||(l.render=t.render,l.staticRenderFns=t.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=r,l}", "private public function m246() {}", "function TM(t,e,n,i,r,o,a,s){var u=(\"functio...
[ "0.5924966", "0.58903253", "0.5834089", "0.5810637", "0.5764255", "0.5731859", "0.56664914", "0.5651077", "0.5648576", "0.56271744", "0.56117946", "0.56101716", "0.56060225", "0.55370706", "0.5529062", "0.5494708", "0.5491031", "0.54674906", "0.5427357", "0.5420879", "0.54150...
0.0
-1
Export the Canvas as SVG. It will descend to whole graph of objects and ask each one to convert to SVG (and use the proper indentation) Note: Placed out of editor.php so we can safelly add '<?...' string
function toSVG() { return ''; /* Note: Support for SVG is suspended * var canvas = getCanvas(); //@see http://www.w3schools.com/svg/svg_example.asp var v2 = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'; v2 += "\n" + '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="htt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function exportCanvas() {\n //export canvas as SVG\n var v = '<svg width=\"300\" height=\"200\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\">\\\n <rect x=\"0\" y=\"0\" height=\"200\" width=\"300\" style=\"stroke:#000000; fill: #FFFFFF\"/>\\\n <path d=\"M100,100 C200,200 ...
[ "0.7432512", "0.71305656", "0.70254827", "0.6961973", "0.68934137", "0.6879022", "0.68140775", "0.67515266", "0.66660565", "0.66637975", "0.648514", "0.6440352", "0.643961", "0.63898677", "0.63580865", "0.6290826", "0.62840086", "0.6235493", "0.6172359", "0.6164024", "0.61112...
0.7124628
2
Supposelly stop any selection from happening
function stopselection(ev) { /*If we are selecting text within anything with the className text, we allow it * This gives us the option of using textareas, inputs and any other item we * want to allow text selection in. **/ if (ev.target.className == "text") { return true; } retu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function unblockTextSelection() {\n document.onselectstart = function () {\n return true;\n };\n }", "function unblockTextSelection() {\n document.onselectstart = function () {\n return true;\n };\n}", "function unblockTextSelection() {\n _document2['default'].onselectstart = function () {\n ...
[ "0.77113354", "0.77019185", "0.76112133", "0.76112133", "0.75669646", "0.75624", "0.75624", "0.74814135", "0.7242531", "0.71324104", "0.71240115", "0.7076964", "0.7068476", "0.7055007", "0.7053542", "0.70193714", "0.70193714", "0.6969966", "0.69650686", "0.6951705", "0.695026...
0.7350849
8
Return the 2D context of current canvas
function getContext() { var canvas = getCanvas(); if (canvas.getContext) { return canvas.getContext("2d"); } else { alert('You need a HTML5 web browser. Any Safari,Firefox, Chrome or Explorer supports this.'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getContext() {\n return this.canvas.getContext('2d')\n }", "context() {\n return this._canvas.getContext('2d');\n }", "function prepareContext(canvas) {\n return canvas.getContext(\"2d\");\n}", "getCanvasContext() {\n return this.context;\n }", "get context () {\n\t\treturn {\n\t\t...
[ "0.81116736", "0.81082594", "0.75677204", "0.7149171", "0.7088059", "0.70335317", "0.70081115", "0.69081634", "0.6897757", "0.6784827", "0.66006917", "0.6575543", "0.64601415", "0.64438176", "0.6422603", "0.6354508", "0.6305635", "0.6290805", "0.629079", "0.6238226", "0.61921...
0.69390506
7
Setup the editor panel for a special shape.
function setUpEditPanel(shape) { //var propertiesPanel = canvas.edit; //access the edit div var propertiesPanel = document.getElementById("edit"); propertiesPanel.innerHTML = ""; if (shape == null) { //do nothing } else { switch (shape.oType) { case 'Group': ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addEditor() {\n // Create new editor\n this.editor = $(`\n <div id=\"${this.id}-Editor\" class=\"editCell\">\n <div class=\"editHeader\">\n <p class=\"editHeaderTitle\">${this.id} Editor</p>\n </div>\n <div class=\"editOptionTable\">\n </div>\n </div>\n `);\n...
[ "0.70467025", "0.63430184", "0.6309362", "0.6300952", "0.62441707", "0.62281024", "0.6204311", "0.5986968", "0.59697926", "0.58973294", "0.58360356", "0.58198124", "0.5749198", "0.57448304", "0.5737035", "0.5714603", "0.56999", "0.5699018", "0.56742215", "0.5621828", "0.55888...
0.7721231
0
Resets any state to STATE_NONE
function resetToNoneState() { // clear text editing mode if (state == STATE_TEXT_EDITING) { currentTextEditor.destroy(); currentTextEditor = null; } // deselect everything selectedFigureId = -1; selectedConnectionPointId = -1; selectedConnectorId = -1; selectedContainerI...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reset() {\n\t setState(null);\n\t} // in case of reload", "reset() {\r\n this.state = this.initial;\r\n }", "reset() {\r\n this.state=this.initial;\r\n this.statesStack.clear();\r\n\r\n }", "resetState() {\n if(this.state) this.state = Node.UNVISITED;\n else...
[ "0.7936449", "0.7825173", "0.7752531", "0.77017516", "0.75434554", "0.7539825", "0.7533742", "0.7522667", "0.7518189", "0.7487151", "0.7470921", "0.7444708", "0.7441125", "0.74256325", "0.7417033", "0.74135065", "0.73819554", "0.73625124", "0.7346728", "0.7235018", "0.7212460...
0.7793816
2
Show "Insert image" dialog Insert image dialog can be triggered in 1 case: 1 from quick toolbar Description: Call popup to get image from url or upload target image from local
function showInsertImageDialog() { resetToNoneState(); draw(); setUploadedImagesList(); var dialogContent = document.getElementById('insert-image-dialog'); $.modal(dialogContent, {minWidth: '450px', containerId: 'upload-image-dialog', overlayClose: true}); // update dialog's position $.mo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function openOldImageDialog(title,onInsert){\r\n\t\tvar params = \"type=image&post_id=0&TB_iframe=true\";\r\n\t\t\r\n\t\tparams = encodeURI(params);\r\n\t\t\r\n\t\ttb_show(title,'media-upload.php?'+params);\r\n\t\t\r\n\t\twindow.send_to_editor = function(html) {\r\n\t\t\t tb_remove();\r\n\t\t\t var urlImage = jQue...
[ "0.7541309", "0.7215126", "0.7118943", "0.6926356", "0.6894035", "0.67635053", "0.6601723", "0.65470695", "0.6531377", "0.6474292", "0.6439846", "0.64021355", "0.63644123", "0.6291139", "0.6266591", "0.62444633", "0.62285763", "0.62196326", "0.62155485", "0.621167", "0.618530...
0.70658576
3
Show filenames of uploaded images in "Insert image" dialog Get filenames from server and insert them into dialog
function setUploadedImagesList() { //see: http://api.jquery.com/jQuery.get/ $.post("./common/controller.php", {action: 'getUploadedImageFileNames'}, function(data) { var list = document.getElementById('insert-image-reuse'); var reuseGroup = document.getElementById('insert-image-r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showInsertImageDialog() {\n resetToNoneState();\n\n draw();\n\n setUploadedImagesList();\n\n var dialogContent = document.getElementById('insert-image-dialog');\n $.modal(dialogContent, {minWidth: '450px', containerId: 'upload-image-dialog', overlayClose: true});\n // update dialog's pos...
[ "0.65618056", "0.6453599", "0.6396575", "0.638491", "0.6306462", "0.62864834", "0.6283511", "0.62643534", "0.62244606", "0.62209976", "0.62126684", "0.61309355", "0.6106297", "0.60958284", "0.60577846", "0.60371876", "0.5998121", "0.59846145", "0.5984415", "0.59318274", "0.59...
0.6388024
3
Makes grid visible or invisible, depedinding of previous value If the "snap to" was active and grid made invisible the "snap to" will be disabled
function showGrid() { /**If grid was visible and snap to was check we need to take measures*/ if (gridVisible) { if (snapTo) { snapTo = false; document.getElementById("snapCheckbox").checked = false; } } gridVisible = !gridVisible; backgroundImage = null; //...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function snap() {\r\n\t\tvar snap = document.getElementById(\"snap\");\r\n\t\tif (snap.checked === true) {\r\n\t\t myDiagram.toolManager.draggingTool.isGridSnapEnabled = true;\r\n\t\t myDiagram.toolManager.resizingTool.isGridSnapEnabled = true;\r\n\t\t} else {\r\n\t\t myDiagram.toolManager.draggingTool.isGridSn...
[ "0.7160396", "0.6910818", "0.6657223", "0.66179657", "0.66085166", "0.65047735", "0.63629955", "0.63577014", "0.6345158", "0.6317878", "0.63112783", "0.6302816", "0.62902975", "0.6274988", "0.6164239", "0.6106401", "0.60991347", "0.60934", "0.6076557", "0.60635424", "0.604880...
0.7035048
1
Click is disabled because we need to handle mouse down and mouse up....etc etc etc
function onClick(ev) { var coords = getCanvasXY(ev); var x = coords[0]; var y = coords[1]; //here is the problem....how do we know we clicked on canvas /*var fig=STACK.figures[STACK.figureGetMouseOver(x,y,null)]; if(CNTRL_PRESSED && fig!=null){ TEMPORARY_GROUP.addPrimitive(); STACK.figur...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_click(event) {\n if (this.disabled) {\n event.preventDefault();\n }\n else {\n this._handleInteraction(event);\n event.stopPropagation();\n }\n }", "function enableMouseClick() {\n // Add event listener for mouse click events to the canv...
[ "0.7456236", "0.7253409", "0.71875346", "0.7174194", "0.7163691", "0.715022", "0.71209514", "0.7078039", "0.7036769", "0.70297337", "0.7007449", "0.6999466", "0.6961894", "0.69208467", "0.69149566", "0.68985206", "0.6877706", "0.6852906", "0.6852628", "0.68507403", "0.6849924...
0.0
-1
Draws all the stuff on the canvas
function draw() { var ctx = getContext(); // Log.group("A draw started"); //alert('Paint 1') reset(getCanvas()); //if grid visible paint it // if(gridVisible){ //paint grid addBackground(getCanvas()); // } //alert('Paint 2') STACK.paint(ctx); minimap.updateMinimap(); // Lo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawCanvas() {\n\t\tdraw(context, drawer, colours, solver);\n\t\tsolver.callStateForItem(spanState);\n\t}", "Draw()\n\t{\n\t\t// Clear the canvas, optimize later if enough brain\n\t\tthis.ctx.clearRect(0, 0, this.canvasWidth, this.canvasHeight);\n\n\t\t// Draw everything\n\t\tfor(var i = 0; i < this.Can...
[ "0.79625636", "0.7953237", "0.7858081", "0.7777354", "0.7763634", "0.7740923", "0.77013445", "0.7684438", "0.76764005", "0.76613915", "0.76338327", "0.7620704", "0.7605712", "0.7533357", "0.75102735", "0.74997985", "0.74620855", "0.7457429", "0.7434739", "0.74090564", "0.7403...
0.7299192
36
Returns a text containing all the URL in a diagram
function linkMap() { var csvBounds = ''; var first = true; for (f in STACK.figures) { var figure = STACK.figures[f]; if (figure.url != '') { var bounds = figure.getBounds(); if (first) { first = false; } else { c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "generateLink() {\n return `\n <a href='https://en.wikipedia.org/wiki/${encodeURI(this.options[0])}' property='rdf:seeAlso'>\n ${this.options[0]}\n </a>&nbsp;\n `;\n }", "function render_url(text) {\n if (text.includes(\"http\")) {\n return \"<a href=\\\"\" + text + \"\\\" target=\...
[ "0.6158752", "0.61071175", "0.60826486", "0.60786897", "0.6025609", "0.5869289", "0.5729157", "0.5686321", "0.56816036", "0.568082", "0.568082", "0.56807977", "0.56807977", "0.56796306", "0.56644607", "0.56644607", "0.56207585", "0.555842", "0.5549773", "0.5537478", "0.552922...
0.0
-1
Save current diagram Save can be triggered in 3 cases: 1 from menu 2 from quick toolbar 3 from shortcut CtrlS (onKeyDown) See:
function save() { //alert("save triggered! diagramId = " + diagramId ); Log.info('Save pressed'); if (state == STATE_TEXT_EDITING) { currentTextEditor.destroy(); currentTextEditor = null; state = STATE_NONE; } var dataURL = null; try { dataURL = renderedCanvas...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function menuSaveClick(event) {\n // console.log('menuSaveClick');\n\n event.preventDefault();\n\n let diagramTitle = PageData.SavedImageTitle;\n let storageKey = Date.now().toString();\n\n let overwrite = Common.customConfirm('Overwrite existing diagram?');\n if (overwrite) {\n storageKey = PageData.File...
[ "0.7099783", "0.6916381", "0.69039446", "0.6789661", "0.67653114", "0.6692602", "0.65565056", "0.64719975", "0.64695704", "0.64639384", "0.6453733", "0.64110696", "0.639087", "0.6349562", "0.62926996", "0.62871623", "0.62530655", "0.6214551", "0.6206543", "0.6194648", "0.6171...
0.63150704
14
Print current diagram Print can be triggered in 3 cases only after diagram was saved: 1 from menu 2 from quick toolbar 3 from Ctrl + P shortcut Copy link to saved diagram's png file to src of image, add it to iframe and call print of last.
function print_diagram() { var printFrameId = "printFrame"; var iframe = document.getElementById(printFrameId); // if iframe isn't created if (iframe == null) { iframe = document.createElement("IFRAME"); iframe.id = printFrameId; document.body.appendChild(iframe); } /...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function printDiagram() {\n var svgWindow = window.open();\n if (!svgWindow) return; // failure to open a new Window\n var printSize = new go.Size(1700, 2960);\n var bnds = myDiagram.documentBounds;\n var svg = myDiagram.makeSvg({ scale: 1.0, position: new go.Point(0, 0), size: bnds });\n svgWindow.document...
[ "0.63316315", "0.62739676", "0.6170226", "0.60262626", "0.60187477", "0.59463614", "0.59202445", "0.5874236", "0.5873068", "0.5872673", "0.58568233", "0.58197814", "0.5805974", "0.57907474", "0.5730226", "0.5699699", "0.5699699", "0.5694505", "0.5691409", "0.5687984", "0.5684...
0.7598626
0
Exports current canvas as SVG
function exportCanvas() { //export canvas as SVG var v = '<svg width="300" height="200" xmlns="http://www.w3.org/2000/svg" version="1.1">\ <rect x="0" y="0" height="200" width="300" style="stroke:#000000; fill: #FFFFFF"/>\ <path d="M100,100 C200,200 100,50 300,100" style="stroke:...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_saveContextSVG(){\n this.getGraphicsContext().saveSVG();\n }", "function saveSVG(){\n\t\t\tvar blob = new Blob([canvas.toSVG()], {type: \"text/plain;charset=utf-8\"});\n\t\t\tsaveAs(blob, \"download.svg\");\n\n\t\t}", "function canvasToSVG() {\n if (chart.boost &&\n chart.boost.wgl...
[ "0.7611495", "0.760116", "0.7534128", "0.7454485", "0.74182296", "0.72102493", "0.71317697", "0.7026638", "0.69958067", "0.686196", "0.68500465", "0.67527467", "0.6705932", "0.669488", "0.6677252", "0.6640134", "0.66087085", "0.6607238", "0.65885", "0.658524", "0.6525618", ...
0.77538526
0
Saves a diagram. Actually send the serialized version of diagram for saving
function saveAs() { var dataURL = renderedCanvas(); // var $diagram = {c:canvas.save(), s:STACK, m:CONNECTOR_MANAGER}; var $diagram = {c: canvasProps, s: STACK, m: CONNECTOR_MANAGER, p: CONTAINER_MANAGER, v: DIAGRAMO.fileVersion}; var $serializedDiagram = JSON.stringify($diagram); // $seri...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function save() {\n\n //alert(\"save triggered! diagramId = \" + diagramId );\n Log.info('Save pressed');\n\n if (state == STATE_TEXT_EDITING) {\n currentTextEditor.destroy();\n currentTextEditor = null;\n state = STATE_NONE;\n }\n\n var dataURL = null;\n try {\n data...
[ "0.76054215", "0.75719994", "0.74055564", "0.73952335", "0.73097754", "0.7122141", "0.70828223", "0.69763", "0.6846896", "0.63646907", "0.62558776", "0.6166972", "0.60879004", "0.6026668", "0.5977074", "0.591396", "0.5821651", "0.5797262", "0.56753016", "0.566378", "0.5663197...
0.74915594
2
Add listeners to elements on the page TODO: set dblclick handler for mobile (touches)
function addListeners() { var canvas = getCanvas(); //add event handlers for Document document.addEventListener("keypress", onKeyPress, false); document.addEventListener("keydown", onKeyDown, false); document.addEventListener("keyup", onKeyUp, false); document.addEventListener("selectstart", st...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addHandlers() {\n this.onDoubleClick = this.onDoubleClick.bind(this);\n document.addEventListener(\"dblclick\", this.onDoubleClick);\n }", "function attachEvents() {\n // Add custom events to the window\n window.addEventListener(\"touch\", handleInteruption, false);\n window.addEventLis...
[ "0.71597743", "0.6721561", "0.6620845", "0.65840065", "0.65599203", "0.65308076", "0.6507334", "0.64538497", "0.6447369", "0.638994", "0.6366394", "0.6336338", "0.6318422", "0.6318422", "0.63073736", "0.62941426", "0.6277823", "0.6256468", "0.62488306", "0.623616", "0.6215588...
0.64970464
7
Returns a text containing all the URL in a diagram
function linkMap() { var csvBounds = ''; var first = true; for (var f in STACK.figures) { var figure = STACK.figures[f]; if (figure.url != '') { var bounds = figure.getBounds(); if (first) { first = false; } else { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "generateLink() {\n return `\n <a href='https://en.wikipedia.org/wiki/${encodeURI(this.options[0])}' property='rdf:seeAlso'>\n ${this.options[0]}\n </a>&nbsp;\n `;\n }", "function render_url(text) {\n if (text.includes(\"http\")) {\n return \"<a href=\\\"\" + text + \"\\\" target=\...
[ "0.6156959", "0.61050373", "0.60797405", "0.60788804", "0.6025713", "0.5868673", "0.5726307", "0.56856424", "0.56799144", "0.56799144", "0.56794894", "0.5679213", "0.5679213", "0.56786865", "0.56637883", "0.56637883", "0.56197673", "0.55572665", "0.5548418", "0.5536193", "0.5...
0.0
-1
Genera la primera linea del diagrama
function lineaPrincipal() { if (!primer) { figureBuild(window.figure_LineInit, coor[0] - tamFig, coor[1]); coor[1] += 70; lineas[0]++;//Numero de lineas de entrada lineas[1]++;//Linea de entrada actual y principal = 1 primer = true; resetToNoneState(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Line() {}", "function Line() {}", "function Line() {}", "function Line() {}", "function Line() {}", "function Line(){}", "function pointLineaire() {\n\tpoint1 = board.create('point', [1, (ordonnee + pente)], {\n\t\tstyle : 6,\n\t\tname : 'p1'\n\t});\n\tpoint1.setAttribute({\n\t\tstrokeColor : ...
[ "0.6938589", "0.6938589", "0.6938589", "0.6938589", "0.6938589", "0.6933891", "0.6909618", "0.6823741", "0.6751427", "0.6751427", "0.6687149", "0.66588855", "0.6650898", "0.66465145", "0.6600003", "0.65716404", "0.6552641", "0.647582", "0.63751143", "0.63714963", "0.63619417"...
0.6413608
18
Cierra el textarea presente en el lienzo
function closeText() { if (state == STATE_TEXT_EDITING) { currentTextEditor.destroy(); currentTextEditor = null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addTextarea()\n {\n var element = $('<textarea/>',{\n 'style': 'display:none;',\n 'name': settings.name\n });\n component.append(element);\n textarea = component.find('textarea');\n }", "function fillTextarea(){\n\n Storage.get('text', f...
[ "0.7129017", "0.7024952", "0.7012515", "0.68993825", "0.6883092", "0.6699164", "0.66545093", "0.66404516", "0.66322494", "0.6594109", "0.658965", "0.65861285", "0.6565012", "0.6509018", "0.64856935", "0.64623934", "0.6448295", "0.6441324", "0.64378947", "0.64338857", "0.64324...
0.0
-1
Limpia figura que esta siendo arrastrada si no se coloca en el lienzo
function dropFigure() { createFigureFunction = null; selectedFigureThumb = null; state = STATE_NONE; if (document.getElementById('draggingThumb') != null) { document.getElementById('draggingThumb').style.display = 'none'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dibujarFigura1(){\n //Limpiamos las areas para volver a dibujar\n figura1.clearRect(0,0,200,200);\n idFig1 = numeroAleatoreoFigura();\n console.log(\"id de la figura 1:\"+figura[idFig1]);\n if(idFig1 === 0){\n crearCuadroAleatoreo1();\n }\n if(idFig1 === 1){\n crearCirc...
[ "0.6208168", "0.60805744", "0.60698456", "0.57871723", "0.55384135", "0.5441895", "0.54364634", "0.5318159", "0.52919024", "0.52850217", "0.5283082", "0.5281477", "0.51958317", "0.5180829", "0.5158558", "0.51471287", "0.512842", "0.512842", "0.5123518", "0.50895613", "0.50739...
0.0
-1
Gestion la innabilidad del selector de especiales
function especialSelect(bool) { var select = document.getElementById('espSelect'); bool ? select.disabled = (disEspSel = true) : select.disabled = (disEspSel = false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get selector() {\n if(!this.exists)\n if(this.publication.pmetadata.title)\n return m(\"span#br-chapter\", this.publication.pmetadata.title);\n else\n return null;\n\n return m(\"select#br-chapter\", {\n title: __(\"Chapter selection\"),\...
[ "0.59749305", "0.5941935", "0.58718026", "0.58161175", "0.57846206", "0.57777786", "0.5777662", "0.5720195", "0.56921345", "0.5686847", "0.5662255", "0.56360984", "0.5609886", "0.55947244", "0.5592715", "0.5587383", "0.5587178", "0.557877", "0.557322", "0.5543146", "0.5531236...
0.0
-1
Gestiona el div de error
function errorDiv(textError) { var div = document.getElementById('error'); if (textError != '') { div.innerHTML = textError; div.style.display = 'block'; } else if (div.style.display != 'none') { div.style.display = 'none'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function writeToErrorDiv(message){\n document.getElementById('errorDiv').innerHTML = message;\n}", "error() {\n $(\".content\").html(\"Failed to load content!\");\n }", "error() {\n $(\".content\").html(\"Failed to load content!\");\n }", "error() {\n $(\".content\").html(\"Fail...
[ "0.7008638", "0.69961274", "0.69961274", "0.69961274", "0.6962554", "0.6962554", "0.69369745", "0.6925622", "0.6873783", "0.68043685", "0.6803586", "0.67778665", "0.67504525", "0.6746877", "0.6696671", "0.66926026", "0.6682551", "0.6634087", "0.66321623", "0.6630037", "0.6618...
0.6918795
8
Refresca los datos de la cabecera conforme a diagrama actual
function refCabecera() { if (currentSetId == 'analitico') { resumAnali(); } else if (currentSetId == 'sinoptico') { resumSinop(); } else if (currentSetId == 'recorrido') { resumRecorr(); } else if (currentSetId == 'bimanual') { resumBim(); } else if (currentSetId == '...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cargarDatosCabecera() {\n $(\".nombre\").text(nombre)\n $(\".titulo\").text(titulo)\n $(\"#resumen\").text(resumen)\n $(\"#email\").text(contacto.mail)\n $(\"#telefono\").text(contacto.telefono)\n $(\"#direccion\").text(`${contacto.calle} ${contacto.altura}, ${contacto.localidad}`)\n}", ...
[ "0.620861", "0.61527145", "0.60866874", "0.59810466", "0.596609", "0.58920014", "0.58885497", "0.5867257", "0.5858546", "0.5843594", "0.5837693", "0.5755298", "0.5740153", "0.56945264", "0.56882226", "0.56734955", "0.5656469", "0.56556016", "0.56403524", "0.5639397", "0.56383...
0.0
-1
Elimina la figura que se encuentre seleccionada.
function deleteFigure() { var figDel = STACK.figureGetById(selectedFigureId); if (figDel.name == "LineInit") { errorDiv("No se puede eliminar un inicio de linea"); return; } else if (figDel.name == "MultiPoint") { errorDiv("No se puede eliminar un punto de union"); return; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static DeleteSelected(){\n ElmentToDelete.parentElement.remove();\n UI.ShowMessage('Elemento eliminado satisfactoriamente','info');\n }", "function eliminarSeleccion()\n{\n\t$(\".active\").remove()\n}", "function removerSelecionado() {\n const botao = document.querySelector('#remover-selecion...
[ "0.70309466", "0.6962904", "0.6878292", "0.68118155", "0.67688084", "0.66514903", "0.66120136", "0.65980184", "0.6591854", "0.6591258", "0.6555584", "0.6524971", "0.6522166", "0.6491191", "0.6487029", "0.64858973", "0.6447065", "0.64295524", "0.6418031", "0.6402658", "0.63809...
0.64647335
16
Gestor de orden, reinicializa todas la variables de orden
function resetValOrden() { entra = false; sale = false; tray = false; trayLin = false; initIn = false; initMul = false; idLineTray = -1; idTray = -1; valTLF = false; valMovTF = false; elimEF = false; elimSI = false; elimSF = false; elimTR = false; elimTLF = fa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(nombre,urgencia){\n this.nombre = nombre //Se agrega this. para saber a que instancia pertenece\n this.urgencia = urgencia\n }", "constructor() {\n this.inicializar();\n this.generarSecuencia();\n this.siguienteNivel(); \n }", "initRegistro() {\n this.registro = new _model...
[ "0.621942", "0.6082999", "0.6008036", "0.5878133", "0.5874657", "0.5838005", "0.57965785", "0.5784554", "0.5780538", "0.5779431", "0.5744671", "0.57341367", "0.56929195", "0.5676274", "0.5659722", "0.5630644", "0.5622715", "0.5559884", "0.55510926", "0.5547678", "0.55454", ...
0.0
-1
Translates the list format produced by cssloader into something easier to manipulate.
function listToStyles (parentId, list) { var styles = [] var newStyles = {} for (var i = 0; i < list.length; i++) { var item = list[i] var id = item[0] var css = item[1] var media = item[2] var sourceMap = item[3] var part = { id: parentId + ':' + i, css: css, media: medi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listToStyles(parentId, list) {\n var styles = [];\n var newStyles = {};\n\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = item[0];\n var css = item[1];\n var media = item[2];\n var sourceMap = item[3];\n ...
[ "0.63083893", "0.630304" ]
0.0
-1
globals __VUE_SSR_CONTEXT__ IMPORTANT: Do NOT use ES2015 features in this file (except for modules). This module is a runtime utility for cleaner component module output and will be included in the final webpack user bundle.
function normalizeComponent ( scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, /* server only */ shadowMode, /* vue-cli only */ components, // fixed by xxxxxx auto components renderjs // fixed by xxxxxx renderjs ) { // Vue.extend constructor expo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Es(t,e,n,i,r,o,a,s){var u=(\"function\"===typeof n?n.options:n)||{};return u.__file=\"source.vue\",u.render||(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0,r&&(u.functional=!0)),u._scopeId=i,u}", "extend(config, ctx) {\n // if (process.server && process.browser) {\n if (...
[ "0.58474934", "0.57268775" ]
0.0
-1
['Elie', 'Tim', 'Matt', 'Colt'] vowelCount
function vowelCount(str){ var vowels ="aeuio"; return str.toLowerCase().split('').reduce(function(acc, nVal){ if(vowels.indexOf(nVal) !== -1){ if(acc[nVal]){ acc[nVal]++; } else { acc[nVal] = 1; } } return acc; }, {}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function vowelCount(str) {\n\tvar vowels = 'aeiou';\n\treturn str.toLowerCase().split(\"\").reduce(function(acc, next){\n\t\tif(vowels.indexOf(next) !== -1) {\n\t\t\tif(acc[next]) {\n\t\t\t\tacc[next]++;\n\t\t\t} else {\n\t\t\t\tacc[next] = 1;\n\t\t\t}\n\t\t}\n\t\treturn acc;\n\t}, {});\n}", "function countvowel...
[ "0.81807715", "0.79066265", "0.78577167", "0.7847525", "0.7834786", "0.77947104", "0.77783763", "0.76659334", "0.76409614", "0.7620593", "0.7597341", "0.75891644", "0.7570892", "0.7554376", "0.75438464", "0.75330657", "0.75097483", "0.74998695", "0.749715", "0.7488472", "0.74...
0.81547403
1
Old way to join javascript vaiables with a string
function getMessage() { const year = new Date().getFullYear(); console.log(year); // 2017 return "The year is: " + year; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function concat_string() {\n return Array.prototype.slice.call(arguments).join('');\n} // end concat_string", "function strcat() { // takes as many strings as you want to give it.\n $strcatr = \"\";\n $isjs = js();\n $args = $isjs ? arguments : func_get_args();\n for ($strcati=count($args)-1; $strcati>=0; $st...
[ "0.6990018", "0.696693", "0.6904301", "0.68921524", "0.6866057", "0.68396217", "0.6803885", "0.6702852", "0.66888016", "0.6623015", "0.6585783", "0.6428011", "0.6403396", "0.6362277", "0.6299635", "0.6285769", "0.62816155", "0.6258727", "0.6236923", "0.6233475", "0.6222584", ...
0.0
-1
The year is: 2017 refactored code we no longer use double or single quotes, we now use back ticks to write a string Wrap the variable in a dollar sign and opening and closing curly brackets and put it inside the back ticks Gives it a more legible look
function getMessage2() { const year = new Date().getFullYear(); console.log(year); // 2017 return `The year is ${year}`; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dogOld(years) {\n let YearsCalululation = years * 7;\n console.log(`Your doggo is ${YearsCalululation} years old in human years!`);\n}", "getYearNumerals(year) { return `${year}`; }", "function $currentYear() {\n\tvar d = new Date();\n\tvar n = d.getFullYear();\n\tdocument.getElementById(\"copyr...
[ "0.65587765", "0.62336016", "0.6166508", "0.6123924", "0.61114025", "0.60027987", "0.6000426", "0.5983199", "0.59783226", "0.5949656", "0.592314", "0.5915272", "0.5914158", "0.590703", "0.58961946", "0.58823246", "0.5879619", "0.5869922", "0.5865624", "0.5841665", "0.58121157...
0.62125856
2
Your number doubled is 10 Ex. 3 Name Helpers Refactor the function to use template strings
function fullName(firstName, lastName) { return `${firstName} ${lastName}`; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getNumberName(numberString) {\r\n let digitName10 = \"\";\r\n let digitName1 = \"\";\r\n\r\n if (numberString[0] === \"1\") {\r\n //Define tenth digit place if tenth digit place is \"1\"\r\n switch (numberString[1]) {\r\n case \"0\":\r\n digitName10 = \"TEN...
[ "0.6734674", "0.6685167", "0.664702", "0.65803826", "0.6502638", "0.6425919", "0.63972515", "0.6390857", "0.63722116", "0.63610184", "0.6358902", "0.6337197", "0.63318914", "0.63318914", "0.63318914", "0.63178265", "0.63178265", "0.63178265", "0.63061714", "0.6250846", "0.622...
0.0
-1
Adds permissions from mapping
function addPermissions(app, perms) { var host = 'http://' + app + '.gaiamobile.org:8080'; var perm = Cc["@mozilla.org/permissionmanager;1"] .createInstance(Ci.nsIPermissionManager) var ios = Cc["@mozilla.org/network/io-service;1"] .getService(Ci.nsIIOService) uri = ios.newURI(host, null, null) fo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mapPermissions() {\n\t\t\tvar nav = {}, permissionList = [];\n\t\t\tfor(var permission in service.access.permissions) {\n\t\t\t\tif(inRole(service.access.permissions[permission])) {\n\t\t\t\t\tpermissionList.push(permission);\n\t\t\t\t}\n\t\t\t}\n\t\t\tservice.permissionList = permissionList;\n\t\t\tservi...
[ "0.7538389", "0.6012295", "0.57734036", "0.56393194", "0.5588697", "0.5573623", "0.5569579", "0.5504963", "0.5437489", "0.54142624", "0.5366259", "0.53365684", "0.5328366", "0.53130364", "0.52692145", "0.52516556", "0.5237621", "0.51472634", "0.51453215", "0.5116701", "0.5114...
0.54594237
8
We need to disable caching By default firefox will cache iframes, and we don't want that Disabling this for now, the real fix should be in httpd.js
function injectContent() { var data = require("sdk/self").data; require('sdk/page-mod').PageMod({ include: ["*.gaiamobile.org"], contentScriptFile: [ data.url("ffos_runtime.js"), data.url("hardware.js"), data.url("lib/activity.js"), data.url("lib/apps.js"), data.url("lib/bluetooth.js"), ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function noCache(url){\n\tvar qs = new Array();\n\tvar arr = url.split('?');\n\tvar scr = arr[0];\n\tif(arr[1]) qs = arr[1].split('&');\n\tqs[qs.length]='nocache='+new Date().getTime();\nreturn scr+'?'+qs.join('&');\n}", "function cacheControl(response) {\n response.set({\n 'Cache-Control': 'no-cache, ...
[ "0.65717083", "0.6526207", "0.63966906", "0.6377045", "0.6195906", "0.6112069", "0.60893005", "0.6080239", "0.60007465", "0.5958534", "0.5958534", "0.5934509", "0.59142774", "0.5891236", "0.5866132", "0.57909364", "0.57820886", "0.5737907", "0.56891406", "0.5645261", "0.56436...
0.0
-1
Muestra todos los cursos de actualizacion activados en una tabla
function mostrarCarreras() { let sBuscar = document.querySelector('#txtBuscarCarreras').value; let listaCarreras = getListaCarrera(); let cuerpoTabla = document.querySelector('#tblCarreras tbody'); cuerpoTabla.innerHTML = ''; for (let i = 0; i < listaCarreras.length; i++) { if (listaCarr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function inicializarActividades() {\n\t//Creamos actividades por defecto\n\tactividad1 = new Actividad(\"Yoga\", 60, 1);\n\tactividad2 = new Actividad(\"Cross-Fit\", 45, 2);\n\tactividad3 = new Actividad(\"Zumba\", 30, 1);\n\n\tvectorActividades.push(actividad1);\n\tvectorActividades.push(actividad2);\n\tvectorAct...
[ "0.60757035", "0.5925722", "0.59054965", "0.58916247", "0.5874251", "0.58151865", "0.5761008", "0.57493025", "0.5747138", "0.5725846", "0.56563157", "0.5639805", "0.5608928", "0.5605054", "0.55886406", "0.5570171", "0.55697393", "0.5569697", "0.55443937", "0.553147", "0.54837...
0.0
-1
Muestra todos los profesores activados en una tabla
function mostrarCursos() { let sBuscar = document.querySelector('#txtBuscarCursos').value; let listaCursos = getListaCursos(); let cuerpoTabla = document.querySelector('#tblCursos tbody'); cuerpoTabla.innerHTML = ''; for (let i = 0; i < listaCursos.length; i++) { if (listaCursos[i][0].toL...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function inicializarActividades() {\n\t//Creamos actividades por defecto\n\tactividad1 = new Actividad(\"Yoga\", 60, 1);\n\tactividad2 = new Actividad(\"Cross-Fit\", 45, 2);\n\tactividad3 = new Actividad(\"Zumba\", 30, 1);\n\n\tvectorActividades.push(actividad1);\n\tvectorActividades.push(actividad2);\n\tvectorAct...
[ "0.59145796", "0.56666297", "0.56666297", "0.5654033", "0.55522376", "0.5484885", "0.5477175", "0.54707", "0.54546374", "0.53671783", "0.5339979", "0.53270227", "0.52824354", "0.5233508", "0.5233092", "0.52303493", "0.5221472", "0.5215338", "0.52122384", "0.5196835", "0.51826...
0.0
-1
Verifica que solo un curso sea seleccionado o que al menos uno sea seleccionado antes de asociar profesores
function verificarCheckCarreras() { let checkboxes = document.querySelectorAll('#tblCarreras tbody input[type=checkbox]'); let checkeado = false; for (let i = 0; i < checkboxes.length; i++) { if (checkboxes[i].checked) { checkeado = true; } } if (checkeado == true) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sexoSeleccionado(){\n console.trace('sexoSeleccionado');\n let sexo = document.getElementById(\"selector\").value;\n console.debug(sexo);\n if(sexo == 't'){\n pintarLista( personas );\n }else{\n const personasFiltradas = personas.filter( el => el.sexo == sexo) ;\n pint...
[ "0.62426996", "0.6105681", "0.60525477", "0.6016378", "0.59974015", "0.59609133", "0.595925", "0.5938594", "0.59063834", "0.5868851", "0.5820017", "0.57953286", "0.5793986", "0.5785449", "0.5780483", "0.57760084", "0.57559717", "0.5746923", "0.5744183", "0.56886333", "0.56712...
0.0
-1
Deshabilita checkboxes de cursos actii
function disableCarreras() { let checkboxes = document.querySelectorAll('#tblCarreras tbody input[type=checkbox]'); for (let i = 0; i < checkboxes.length; i++) { if (!(checkboxes[i].checked)) { checkboxes[i].disabled = true; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function excluyentes(seleccionado) {\n programador_web.checked = false; \n logistica.checked = false;\n peon.checked = false;\n \n seleccionado.checked = true; \n}", "function deselectCBs() {\n d3.selectAll('.type-checkbox')\n .property('checked', false)\n update();\n d3...
[ "0.75456697", "0.71342975", "0.71083796", "0.7026309", "0.68487376", "0.68395567", "0.6780356", "0.676236", "0.6725522", "0.6724679", "0.6710759", "0.6705947", "0.6653474", "0.6609601", "0.6604462", "0.6588969", "0.6575738", "0.6575453", "0.6574359", "0.65312696", "0.6528622"...
0.6080675
84
Habilita checkboxes de cursos actii
function enableCarreras() { let checkboxes = document.querySelectorAll('#tblCarreras tbody input[type=checkbox]'); for (let i = 0; i < checkboxes.length; i++) { if (!(checkboxes[i].checked)) { checkboxes[i].disabled = false; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function selChkTodos(form, chkNombre, boo) {\r\n\tfor(i=0; n=form.elements[i]; i++) \r\n\t\tif (n.type == \"checkbox\" && n.name == chkNombre) n.checked = boo;\r\n}", "function activarcheckbox(bigdata){\n $.each(bigdata, function(key, item) {\n //if(key==\"productos\"){\n let inicial=key.sub...
[ "0.7221631", "0.7090771", "0.70881206", "0.69570714", "0.69528186", "0.69250095", "0.6831477", "0.6817839", "0.67872065", "0.6698867", "0.6672699", "0.6627253", "0.6601612", "0.6552599", "0.65427727", "0.65071553", "0.65069383", "0.64954245", "0.64941454", "0.648912", "0.6485...
0.0
-1
Desahibilita los checkboxes de los profesores
function disableCursos() { let checkboxes = document.querySelectorAll('#tblCursos tbody input[type=checkbox]'); for (let i = 0; i < checkboxes.length; i++) { checkboxes[i].checked = false; checkboxes[i].disabled = true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function excluyentes(seleccionado) {\n programador_web.checked = false; \n logistica.checked = false;\n peon.checked = false;\n \n seleccionado.checked = true; \n}", "function deselectCBs() {\n d3.selectAll('.type-checkbox')\n .property('checked', false)\n update();\n d3...
[ "0.7512081", "0.6724315", "0.6658563", "0.660186", "0.6548312", "0.65242004", "0.651267", "0.6511075", "0.6458063", "0.6451911", "0.6448067", "0.64476585", "0.6446657", "0.6413711", "0.64111525", "0.6397724", "0.6364209", "0.6347687", "0.6336978", "0.6325958", "0.63232154", ...
0.6199957
39
Habilita los checkboxes de los profesores
function enableCursos() { let checkboxes = document.querySelectorAll('#tblCursos tbody input[type=checkbox]'); for (let i = 0; i < checkboxes.length; i++) { if (!(checkboxes[i].checked)) { checkboxes[i].disabled = false; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function excluyentes(seleccionado) {\n programador_web.checked = false; \n logistica.checked = false;\n peon.checked = false;\n \n seleccionado.checked = true; \n}", "function selChkTodos(form, chkNombre, boo) {\r\n\tfor(i=0; n=form.elements[i]; i++) \r\n\t\tif (n.type == \"checkbox\" &...
[ "0.7017461", "0.6600853", "0.6576097", "0.6511295", "0.642198", "0.6406354", "0.6393531", "0.6386989", "0.6346587", "0.6267492", "0.6262079", "0.6259343", "0.62470096", "0.6213213", "0.61997056", "0.61962587", "0.61944395", "0.61899686", "0.6172514", "0.6171546", "0.6168736",...
0.0
-1
Devuelve codigo de curso actii seleccionado
function guardarCarreraAsociar() { let listaCheckboxCarreras = document.querySelectorAll('#tblCarreras tbody input[type=checkbox]:checked'); let carreraSeleccionada = []; let codigoCarrera; for (let i = 0; i < listaCheckboxCarreras.length; i++) { codigoCarrera = listaCheckboxCarreras[i].dataset...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function leerCurso(curso) {\n const infoCurso = {\n imagen: curso.querySelector(\"img\").src,\n titulo: curso.querySelector(\"h4\").textContent,\n precio: curso.querySelector(\".precio span\").textContent,\n id: curso.querySelector(\"a\").getAttribute(\"data-id\"),\n };\n //Muestra el curso seleccio...
[ "0.669607", "0.62107855", "0.6102101", "0.6071516", "0.606263", "0.59576225", "0.59354407", "0.5918056", "0.59075737", "0.58786607", "0.5874236", "0.5869105", "0.5857011", "0.58474225", "0.5821351", "0.57960355", "0.57367146", "0.5686316", "0.56829244", "0.56817746", "0.56798...
0.0
-1
Devuelve las identificaciones de los profesores seleccionados
function guardarCursosAsociar() { let listaCheckboxCursos = document.querySelectorAll('#tblCursos tbody input[type=checkbox]:checked'); let cursosSeleccionados = []; let codigoCurso; //Este ciclo for debe empezar en 1, ya que en el cero "0" se encuentra el id unico del elemento al que se le desea agre...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fLlenarProfesoresRegistro(){\n //hacemos un for que recorra el array profesores (que guarda los objetos de cada profesor) y liste sus nombres en <option></option> que se añadirán al html\n let opciones = `<option hidden value=\"elegir\">Elegir profesor</option>`; //string que guardará todas las opci...
[ "0.6064636", "0.60621566", "0.59223", "0.5720054", "0.56902635", "0.56639564", "0.5613323", "0.5545179", "0.54886925", "0.5431871", "0.541561", "0.53976136", "0.53420305", "0.53412485", "0.5293167", "0.52687836", "0.52687603", "0.52671254", "0.52492315", "0.5180147", "0.51745...
0.0
-1
muestra chequeados los profesores ya asignados
function mostrarSedesCarrera() { let carreraSelect = this.dataset.codigo; let carrera = buscarCarreraPorCodigo(carreraSelect); let listaCursos = getListaCursos(); let listaCheckboxCursos = document.querySelectorAll('#tblCursos tbody input[type=checkbox]'); let codigosCursos = []; for (let i = 0...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function imprimirProfesiones(persona) {\n console.log(`${persona.nombre} es:`)\n if(persona.ingeniero) {\n console.log(`Ingeniero`);\n }\n else{\n console.log('No es ingeniero');\n }\n if(persona.cantante){\n console.log('Cantante');\n }\n else{\n console.log('No...
[ "0.5971584", "0.579964", "0.5789031", "0.5754656", "0.56802267", "0.5660236", "0.56170434", "0.56107265", "0.56086534", "0.55339235", "0.54476315", "0.54098386", "0.53677297", "0.5334666", "0.53098845", "0.52748275", "0.52430165", "0.52428716", "0.52428293", "0.5238945", "0.5...
0.0
-1
Asociar profesores a curso actii
function asociarCursosCarrera() { let codigoCarrera = guardarCarreraAsociar(); let carrera = buscarCarreraPorCodigo(codigoCarrera); let cursosSeleccionados = guardarCursosAsociar(); let listaCarrera = []; let sCodigo = carrera[0]; let sNombreCarrera = carrera[1]; let sGradoAcademico = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function activarHerramientaPerfil() {\n console.log(\"Activar herramienta perfil\");\n\n crearYCargarCapaLineaPerfil();\n activarControlDibujo();\n\n\n}", "function principal() {\n choquecuerpo();\n choquepared();\n dibujar();\n movimiento();\n \n if(cabeza.choque (comida)){\n c...
[ "0.5963708", "0.58822644", "0.56693804", "0.5634325", "0.5582588", "0.557755", "0.55533856", "0.5459065", "0.54418147", "0.5434953", "0.5421094", "0.54125375", "0.54060173", "0.5399411", "0.5376673", "0.53719276", "0.53463143", "0.5340437", "0.53368", "0.5305828", "0.5291392"...
0.0
-1
helper function: store token in local storage and redirect to the home view
function authSuccessful(res) { $auth.setToken(res.token); $location.path('/'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "SAVE_TOKEN(state, token) {\n localStorage.setItem(\"auth-token\", token);\n }", "token(value){ window.localStorage.setItem('token', value)}", "function security() {\n if(!localStorage.getItem('token')){\n console.log(\"El usuari intentava entrar a la pàgina sense prèviament haver-se registrar...
[ "0.73591375", "0.7233373", "0.71618503", "0.7160674", "0.7115291", "0.7115291", "0.706719", "0.703535", "0.70125324", "0.692627", "0.6872878", "0.6740792", "0.6732468", "0.6690629", "0.66424763", "0.66030806", "0.66015", "0.65718013", "0.6570272", "0.6561352", "0.6550605", ...
0.60219425
97
helper function: error function callback
function handleError(err) { $log.warn('warning: Something went wrong', err.message); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function error (err) {\n if(error.err) return;\n callback(error.err = err);\n }", "function error(err) {\n if (error.err) return;\n callback((error.err = err));\n }", "function error(err) {\n if (error.err) return;\n callback((error.err = err));\n }", "function error(err) {\n if (erro...
[ "0.80505323", "0.7849296", "0.7849296", "0.7849296", "0.7737044", "0.7559522", "0.74196345", "0.74135435", "0.7331549", "0.73024285", "0.727497", "0.7246456", "0.7195072", "0.7169237", "0.7169237", "0.7169237", "0.7169237", "0.7169237", "0.7169237", "0.7169237", "0.7169237", ...
0.0
-1
What is the Greatest Common Divisor? The Greatest Common Divisor of two or more integers is the largest positive integer that divides each of the integers. For example, take two numbers 42 and 56. 42 can be completely divided by 1, 2, 3, 6, 7, 14, 21 and 42. 56 can be completely divided by 1, 2, 4, 7, 8, 14, 28 and 56....
function gcd(testVariable1, testVariable2) { let value=0; for(let i = 0; i< testVariable1; i++){ for(let j= 0; j < testVariable2;j++){ if((testVariable1%i==0)&&(testVariable2%j==0)){ value=i; } } } return value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function greatestCommonDivisor (a, b) {\n var gcd = 1;\n var low = a <= b ? a : b;\n for (var i = 2; i < low; i++) {\n if (a % i == 0 && b % i == 0 ) {\n gcd *= i;\n a /= i; \n b /= i;\n low /= i;\n }\n }\n return gcd;\n}", "function greate...
[ "0.80981576", "0.8086585", "0.80565685", "0.79981685", "0.7986235", "0.7951319", "0.79159164", "0.7913732", "0.7889797", "0.7804996", "0.7763214", "0.77033854", "0.7538353", "0.7504908", "0.7486855", "0.7456617", "0.74553585", "0.74071985", "0.72647154", "0.7192292", "0.71802...
0.78704405
9
input string of char will contain only ATCG will only give once case Test cases set length, not required though output arry of DNA pair DNA pair = 2 char arry A T && C G same length as input
function pairElement(str) { var charArray = str.split(""); console.log(charArray); // var firstChar = charArray[1]; // console.log(charArray[1]); var pairArray = []; console.log(pairArray); for (var i = 0; i < charArray.length; i++) { if (charArray[i] === "G") { pairArray.push(["G...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pairDNA(str) {\r\n var pairs = {\r\n A: \"T\",\r\n T: \"A\",\r\n C: \"G\",\r\n G: \"C\"\r\n };\r\n return str.split(\"\").map(x => [x, pairs[x]]);\r\n}", "function stringCreation(str) {\n var pair = \"\";\n for(var i = 0; i <= str.length; i++){\n if(str[i] === \...
[ "0.70177794", "0.66724616", "0.65201974", "0.6498764", "0.64794505", "0.64699566", "0.644128", "0.6438721", "0.6433018", "0.6395357", "0.6370845", "0.62991196", "0.6210938", "0.6185349", "0.61805886", "0.61717916", "0.6162583", "0.61354834", "0.6131014", "0.60920846", "0.6078...
0.5971561
30
SELECT: Devuelve todas las fincas por productor
obtenerProductor(id) { return axios.get(`${API_URL}/v1/productorpersonaReporte/${id}`); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function seleccionarOrden(productos){\n \n\n let rowProductos = document.querySelector(\".buzos__row\");\n\n rowProductos.innerHTML=\"\";\n\n let select = document.querySelector(\".selectOrdenProductos\");\n \n switch(select.value){\n\n case 'date':\n getPaginacion(ordenarProduc...
[ "0.68286014", "0.64546", "0.6318173", "0.6291525", "0.62708765", "0.6236279", "0.60995024", "0.6082517", "0.60818684", "0.60779124", "0.6076814", "0.6075047", "0.6060158", "0.6043463", "0.6034586", "0.60303754", "0.59963346", "0.5985551", "0.59731966", "0.59699976", "0.596410...
0.0
-1
SELECT: Devuelve todos los registros
obtenerTodosProductorPersona() { return axios.get(`${API_URL}/v1/productorpersonaReporte/`); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTypesComplains(req, res) {\n var connection = dbConnection();\n connection.query(\"SELECT * FROM tipo_queja\", function(err, result, fields) {\n if (err) return res.status(500).send({ message: `Error al realizar la consulta : ${err}` });\n if (result == \"\") return res.status(404)...
[ "0.62919205", "0.6157102", "0.6133443", "0.613185", "0.6087473", "0.6078431", "0.607074", "0.5997127", "0.59788364", "0.59719163", "0.5947582", "0.59245485", "0.5897373", "0.58938044", "0.58775395", "0.5802812", "0.5802678", "0.5802365", "0.57918733", "0.5773877", "0.5763097"...
0.0
-1
SELECT: Devuelve todos los registros
obtenerProductoresMasculino() { return axios.get(`${API_URL}/v1/productorpersonaReporteM/`); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTypesComplains(req, res) {\n var connection = dbConnection();\n connection.query(\"SELECT * FROM tipo_queja\", function(err, result, fields) {\n if (err) return res.status(500).send({ message: `Error al realizar la consulta : ${err}` });\n if (result == \"\") return res.status(404)...
[ "0.62919205", "0.6157102", "0.6133443", "0.613185", "0.6087473", "0.6078431", "0.607074", "0.5997127", "0.59788364", "0.59719163", "0.5947582", "0.59245485", "0.5897373", "0.58938044", "0.58775395", "0.5802812", "0.5802678", "0.5802365", "0.57918733", "0.5773877", "0.5763097"...
0.0
-1
SELECT: Devuelve todos los registros
obtenerProductoresFemenino() { return axios.get(`${API_URL}/v1/productorpersonaReporteF/`); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTypesComplains(req, res) {\n var connection = dbConnection();\n connection.query(\"SELECT * FROM tipo_queja\", function(err, result, fields) {\n if (err) return res.status(500).send({ message: `Error al realizar la consulta : ${err}` });\n if (result == \"\") return res.status(404)...
[ "0.62919205", "0.6157102", "0.6133443", "0.613185", "0.6087473", "0.6078431", "0.607074", "0.5997127", "0.59788364", "0.59719163", "0.5947582", "0.59245485", "0.5897373", "0.58938044", "0.58775395", "0.5802812", "0.5802678", "0.5802365", "0.57918733", "0.5773877", "0.5763097"...
0.0
-1
Enable async hooks Hooks are enabled by default.
enable () { this.hook.enable() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "registerHooks() {\n\n S.addHook(this._hookPre.bind(this), {\n action: 'functionRun',\n event: 'pre'\n });\n\n S.addHook(this._hookPost.bind(this), {\n action: 'functionRun',\n event: 'post'\n });\n\n return BbPromise.resolve();\n }", "async setup() {\n ...
[ "0.6162924", "0.6069756", "0.60573655", "0.6001707", "0.591311", "0.58630574", "0.57786167", "0.5667597", "0.56569", "0.5647904", "0.5635138", "0.56149524", "0.55609155", "0.55569375", "0.55372244", "0.55340433", "0.55156875", "0.5512929", "0.5512929", "0.5512929", "0.5512929...
0.6836857
0
Disable async hooks Context will not be maintained in future event loop iterations.
disable () { this.hook.disable() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function __onContextDisable() {\n return false;\n }", "disableAsyncRequest() {\n this._asyncRequest = false;\n }", "function disable() {\n ['complete', 'addNewTags', 'removeTags']\n .forEach(m => api[m] = () => Promise.resolve([]));\n }", "function disable...
[ "0.71950406", "0.6153484", "0.6112214", "0.6021565", "0.60205686", "0.591711", "0.5854089", "0.5690456", "0.56767505", "0.5668639", "0.562131", "0.5610665", "0.55469155", "0.55469155", "0.5541081", "0.553704", "0.5526142", "0.55109835", "0.54716474", "0.5409741", "0.5400517",...
0.6993661
1
converts the first letter of each word of the string in upper case.
function cap(str){ var arr=str.split(" "); var arr2=[]; // console.log(arr[0].charAt(0)); for(var i=0;i<arr.length;i++) { arr2.push(arr[i].charAt(0).toUpperCase()+arr[i].slice(1)); } // console.log(arr); x = arr2.join(" "); console.log(x); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function upperFirst(str) {\n let splitStr = str.toLowerCase().split(' ');\n for (let i = 0; i < splitStr.length; i++) {\n splitStr[i] = splitStr[i].charAt(0).toUpperCase() + splitStr[i].substring(1); \n }\n return splitStr.join(' '); \n }", "function upperCaseFirst(str) {\n return str.spl...
[ "0.81128424", "0.7981668", "0.78997785", "0.78485256", "0.7814646", "0.7794532", "0.77765065", "0.776686", "0.7753133", "0.77279264", "0.77165186", "0.7686409", "0.7655411", "0.76429474", "0.76278174", "0.7620459", "0.7596566", "0.75921804", "0.7589396", "0.7587866", "0.75817...
0.0
-1
! \fn parseUrl \see const result = parseUrl(" result.protocol; // => "http:" result.host; // => "example.com:3000" result.hostname; // => "example.com" result.port; // => "3000" result.pathname; // => "/pathname/" result.hash; // => "hash" result.search; // => "?search=test" result.origin; // => "
function parseUrl(url) { const a = document.createElement('a'); a.href = url; return a; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseUrl(url){if(typeof url!=='string')return{};var match=url.match(/^(([^:\\/?#]+):)?(\\/\\/([^\\/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);// coerce to undefined values to empty string so we don't get 'undefined'\nvar query=match[6]||'';var fragment=match[8]||'';return{protocol:match[2],host:match[4],path...
[ "0.74793124", "0.71562207", "0.71445256", "0.713249", "0.7127991", "0.7104554", "0.7090583", "0.70892334", "0.7068689", "0.70530134", "0.7051278", "0.7045394", "0.7027864", "0.7027864", "0.70218605", "0.701811", "0.701811", "0.69899344", "0.691187", "0.6857873", "0.6824891", ...
0.648221
72
Modal dynamic centering ===================================================
function modalCentering() { $('.modal').each(function(){ if($(this).hasClass('in') === false){ $(this).show(); } var contentHeight = $(window.parent, window.parent.document).height() - 60; var headerHeight = $(this).find('.modal-header').outerHeight() || 2; var footerHeight = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function centerModals(){\r\n $('.modal').each(function(i){\r\n var $clone = $(this).clone().css('display', 'block').appendTo('body');\r\n var top = Math.round(($clone.height() - $clone.find('.modal-content').height()) / 2);\r\n top = top > 0 ? top : 0;\r\n $clone.remove();\r\n ...
[ "0.7634573", "0.75718945", "0.75614905", "0.7467109", "0.72934854", "0.7237434", "0.72195196", "0.71343297", "0.6906135", "0.6774058", "0.6645346", "0.6619515", "0.6583715", "0.6579641", "0.65769255", "0.65513873", "0.6471437", "0.64542484", "0.6451589", "0.6449236", "0.64283...
0.80270875
0
Draw a transition between lastText and thisText. 'n' is the amount 0..1
function drawTime() { buf.clear(); buf.setColor(1); var d = new Date(); var da = d.toString().split(" "); var time = da[4]; buf.setFont("Vector",50); buf.setFontAlign(0,-1); buf.drawString(time,buf.getWidth()/2,0); buf.setFont("Vector",18); buf.setFontAlign(0,-1); var date = d.toString().substr(0,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function menuTextAnimation(number) {\n const tl = gsap.timeline();\n tl.to(\".the-food\", { opacity: 0, y: -15, duration: .3 })\n .to(\".the-food\", { y: 20 })\n .to(\".the-food\", { opacity: 1, y: 0, duration: .7 });\n\n setTimeout(() => generateMenuTxt(number), 500);\n\n return tl;\n}", "function Sta...
[ "0.6230856", "0.61950415", "0.6169872", "0.6046981", "0.5994182", "0.5994182", "0.5964189", "0.59541124", "0.59541124", "0.5947511", "0.5933266", "0.5924589", "0.5892589", "0.5891912", "0.5876727", "0.58725095", "0.58426225", "0.5838413", "0.58214813", "0.5814726", "0.5813893...
0.0
-1
Clean up internal state so that the ModelGraftManipulator can be properly garbage collected.
dispose() { this[$port].removeEventListener('message', this[$messageEventHandler]); this[$port].close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_cleanUp() {\n this.removeChildren();\n\n // Remove references to the old shapes to ensure that they're rerendered\n this._q2Box = null;\n this._q3Box = null;\n this._medianLine = null;\n this._outerBorderShape = null;\n this._innerBorderShape = null;\n }", "finalizeState() ...
[ "0.7618479", "0.72212046", "0.7067358", "0.70518506", "0.6909618", "0.6836918", "0.6806037", "0.67846394", "0.6692608", "0.66730094", "0.6573591", "0.6553594", "0.65451866", "0.6543136", "0.65250385", "0.6522061", "0.65094006", "0.6503723", "0.6464137", "0.6464137", "0.646344...
0.0
-1
Evaluate an arbitrary chunk of script in the scene graph execution context. The script is guaranteed to be evaluated after the scene graph execution context is fully initialized. It is not guaranteed to be evaluated before or after a Model is made available in the scene graph execution context. Note that web browsers d...
async eval(scriptSource) { const port = await this[$workerInitializes]; const url = URL.createObjectURL(new Blob([scriptSource], { type: 'text/javascript' })); port.postMessage({ type: ThreeDOMMessageType.IMPORT_SCRIPT, url }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_eval() {\n if (this._alreadyStarted) {\n return;\n }\n\n // TODO: this text check doesn't seem completely the same as the spec, which e.g. will try to execute scripts with\n // child element nodes. Spec bug? https://github.com/whatwg/html/issues/3419\n if (!this.hasAttributeNS(null, \"src\") &...
[ "0.61933666", "0.59797895", "0.5734536", "0.5630442", "0.5562425", "0.5440175", "0.5411526", "0.53185433", "0.5271838", "0.52667075", "0.52625674", "0.52625674", "0.5241362", "0.5230076", "0.5201438", "0.51871127", "0.517867", "0.516801", "0.5165879", "0.51389235", "0.5137787...
0.6708901
0
Terminates the scene graph execution context, closes the designated messaging port and generally cleans up the ThreeDOMExecutionContext so that it can be properly garbage collected.
async terminate() { this[$worker].terminate(); const modelGraftManipulator = this[$modelGraftManipulator]; if (modelGraftManipulator != null) { modelGraftManipulator.dispose(); this[$modelGraftManipulator] = null; } const port = await this[$workerInitializ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "end() {\n this.medals();\n this.endMessage();\n this.cleanUp();\n this.gc();\n }", "exitFrame() {\n if (this.contexts && this.contexts.length > 1) {\n this.contexts = this.contexts.slice();\n this.contexts.splice(-1);\n this.currentContextIds.shift()...
[ "0.61951625", "0.6139838", "0.6139838", "0.60261166", "0.6016587", "0.60042286", "0.5998117", "0.5997658", "0.5953353", "0.594772", "0.5934514", "0.5889676", "0.5885655", "0.5883969", "0.58755493", "0.5869661", "0.5844082", "0.58144414", "0.58104604", "0.5806847", "0.5805008"...
0.6300904
0
query search for treatments [autocomplete]
function treatmentQuerySearch() { var tracker = $q.defer(); var results = (editMsVm.treatment.details ? editMsVm.treatments.filter(createFilterForTreatments(editMsVm.treatment.details)) : editMsVm.treatments); return results; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _search()\n {\n var allCategoryNames = [];\n // Incorporate all terms into\n var oepterms = $scope.selectedOepTerms ? $scope.selectedOepTerms : [];\n var situations = $scope.selectedSituations ? $scope.selectedSituations : [];\n var allCategories = oepterms.concat(situations);\n allCate...
[ "0.6473379", "0.6268314", "0.61744547", "0.6118348", "0.6066907", "0.6066789", "0.60286826", "0.5998705", "0.597417", "0.5948177", "0.59417623", "0.59346545", "0.5902784", "0.5893795", "0.58632654", "0.5860122", "0.5858314", "0.5842589", "0.58420855", "0.5838895", "0.5833866"...
0.7134493
0
create filter for users' query list
function createFilterForTreatments(query) { var lcQuery = angular.lowercase(query); return function filterFn(item) { return (angular.lowercase(item.name).indexOf(lcQuery) === 0); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createFilterForADUsers(query) {\n var lowercaseQuery = angular.lowercase(query);\n return function filterFn(item) {\n var index = item.value.indexOf(lowercaseQuery)\n if (index >= 0)\n return true;\n // return (item.valu...
[ "0.7044038", "0.6887411", "0.6870493", "0.6801758", "0.6764492", "0.67115617", "0.6669595", "0.66500115", "0.6626996", "0.65408206", "0.651918", "0.64960456", "0.64897066", "0.64788693", "0.6456786", "0.64268714", "0.6424848", "0.64139855", "0.6363141", "0.6321525", "0.630375...
0.0
-1
responsable for the html displayed in the browser it is the view Component are just javascript Functional Component are just javascript functions They can optionally receive an object of properties props and return HTML (know as JSX) which describes the UI
function App() { return ( <div className="App"> <Greet /> </div> ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "render(){return html``}", "render(){\n //Every render method always return HTML\n return <h1>Welcome to Myclass</h1>;\n }", "render() { // it is a function ==> render: function() {}\n return (<h1>Hello World!!!!!!!</h1>);\n }", "render(){\n\n //retorna el template usando el html ...
[ "0.7532792", "0.7192444", "0.7124302", "0.7074442", "0.70150864", "0.70011836", "0.6924521", "0.68841183", "0.68841183", "0.6861373", "0.6804007", "0.6787508", "0.6774082", "0.6747525", "0.6747525", "0.6747525", "0.6735545", "0.6698004", "0.6694672", "0.6625695", "0.6621987",...
0.0
-1
repeats the given string string exactly n times.
function repeatStr (n, s) { //input is a string // output string n times let repeat = s.repeat(n) return repeat; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function repeatStringNTimes(string, repCount) {\n let result = string.repeat(repCount);\n console.log(result);\n}", "function repeatStr(n, s) {\n let newString = \"\";\n for (i = 0; i < n; i++) {\n newString += s;\n }\n return newString;\n}", "function repeatedString(string, n) {\n const numberOf...
[ "0.85007757", "0.8225302", "0.8168625", "0.8129868", "0.81127983", "0.81127983", "0.81127983", "0.810197", "0.80864567", "0.8082709", "0.8057919", "0.80425656", "0.7984281", "0.7947498", "0.7947498", "0.79459924", "0.79293984", "0.791726", "0.79057306", "0.7879492", "0.786288...
0.8264229
1
Display data sex distribution per category
function sex_per_category(data) { console.log(data); const indexes = []; const categories = []; const males = []; const females = []; data.forEach(item => { indexes.push(parseInt(item.index)); categories.push(item.category); males.push(parseInt(item.sum_male)); females.push(parseInt(item.sum...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function viewSexTrade() {\n var color = d3.scale.linear()\n .range([\"#fee5d9\", \"#fcbba1\", \"#fc9272\", \"#fb6a4a\", \"#de2d26\", \"#99000d\"]);\n\n var val1 = d3.entries(data)\n // sort by value descending\n .sort(function(a, b) { return d3.ascending(a.value.sexTotal, b.value.sexTotal); })\n // tak...
[ "0.5959805", "0.59451514", "0.59236306", "0.59132034", "0.5898405", "0.5814487", "0.57751083", "0.57670313", "0.57618374", "0.57575333", "0.5697842", "0.55218154", "0.550682", "0.5409061", "0.5408525", "0.5245627", "0.5193849", "0.5162972", "0.5139002", "0.513693", "0.5131126...
0.6391051
0
RECURSIVE FUNCTION 4 (HELPER METHOD) IN HELPER METHOD, WE USE A VARIABLE IN OUTER SCOPE AND DECALRE ANOTHER FUNCTION INSIDE FUNCTION. THE INNER FUNCTION IS RECURSIVELY CALLED. THE OUTER VARIBLE VARIABLE VALUE IS NOT AFFECTED DURING THE RECURSION
function collectOddValues(arr) { oddArr = [] function oddValues(numarr) { if(numarr.length == 0){ return } if(numarr[0]%2 != 0) { oddArr.push(numarr[0]) } oddValues(numarr.slice(1)) } oddValues(arr) return oddArr }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function outer (input ) {\n var outerScopedVariable = []\n\n function helper (helperInput) {\n //modify the outerScopedVariable\n helper(helperInput --)\n }\n helper(input)\n return outerScopedVariable\n}", "function outer(input) {\n const outerScopedVariable = []\n\n function help...
[ "0.6297085", "0.6172421", "0.585512", "0.58011854", "0.5790836", "0.57587135", "0.5732692", "0.5731859", "0.5727762", "0.57265776", "0.57254916", "0.568277", "0.568035", "0.56721884", "0.56441516", "0.5633229", "0.5621746", "0.5604635", "0.5580238", "0.55555457", "0.5541005",...
0.0
-1
(PURE RECURSION) IN PURE RECURSION, WE USAULLY DONT USE A DATA STRUCTURE TO STORE THE RESULTS, WE PERFORM THE CALCULATION AND CALL THE FUNCTION AGAIN IN THE RETURN STATEMENT ITSELF
function collectOddValues(arr) { if(arr.length == 0){ return [] } let oddArr = []; if(arr[0]%2 != 0){ oddArr.push(arr[0]) } return oddArr.concat(collectOddValues(arr.splice(1))) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calculateResults() {\n return;\n}", "computeResult(result) {\n }", "function performCalculation(arr, symbol1 = '*',symbol2 = '/'){\n var found = false;\n var i = 0; \n\n while(found === false && i < arr.length - 1){ //using < than, since the last symbol will always be a number bec...
[ "0.6300613", "0.6035255", "0.58923197", "0.58891886", "0.5757814", "0.56782854", "0.56354636", "0.56230783", "0.56163865", "0.55804276", "0.5542391", "0.55254304", "0.54675186", "0.5454702", "0.5398135", "0.5398135", "0.53931785", "0.53738964", "0.53692526", "0.53636414", "0....
0.0
-1
1 is used because the length is always 1 greater than the greatest index
function printReverse(arr){ for(var i = arr.length - 1; i >= 0 ; i--){ // now we will console.log arr with the index of i // it should print out 5 in this case console.log(arr[i]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "size() { return 1; }", "function length1(a) {\n var len = 0;\n while (a[len] !== undefined)\n len++;\n\n}", "get _length () {\n return 1\n }", "get _length () {\n return 1\n }", "get length () {\n return 1\n }", "function uniqueSkipHelper(index, length) {\n return Math.floor(index...
[ "0.67777175", "0.67533755", "0.62122124", "0.62122124", "0.61302584", "0.59990984", "0.59589976", "0.5951627", "0.59500414", "0.5934609", "0.5929344", "0.5911807", "0.59104544", "0.5903936", "0.5890701", "0.5885549", "0.58737946", "0.5865932", "0.5865827", "0.585605", "0.5846...
0.0
-1
isUiniform write a function which takes and array as an arguement and returns true if all elements in the array are identicle we use a for loop here becuase a forEach will only run the intial function and next function and not iterate through the same way?
function isUniform(arr) { var first = arr[0]; for (var i = 1; i < arr.length; i++) { if(arr[i] !== first) { return false; } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function every(array, test) {\n // Interesting this did not work below because the return does not break out of the entire function when returning false, therfore will always return true if done this way.\n // array.forEach(function(element) {\n // if (test(element) != true) {\n // return false;\n // ...
[ "0.6763052", "0.6682481", "0.6554121", "0.6545657", "0.6519714", "0.6447185", "0.64454", "0.6443193", "0.638791", "0.63709885", "0.63571316", "0.6331026", "0.632854", "0.62873733", "0.62701064", "0.6269117", "0.6261136", "0.62598795", "0.6182335", "0.61697644", "0.6161084", ...
0.0
-1
handles mouse events over the lines
function handleMouseOverLines(lambdaList) { canvas.addEventListener("mousemove", e => showLineNumberInBox(e, lambdaList)); canvas.addEventListener("mouseleave", unshowLineNumberInBox); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function interMouseMove() {\n var m = d3.mouse(this);\n line.attr(\"x2\", m[0]-3)\n .attr(\"y2\", m[1]-3);\n}", "function interMouseMove() {\n var m = d3.mouse(this);\n line.attr(\"x2\", m[0]-3)\n .attr(\"y2\", m[1]-3);\n}", "function updateMouseHoverLine() {\r\n for (var i=0; i<li...
[ "0.7554375", "0.7554375", "0.74858207", "0.7247059", "0.7206811", "0.71695733", "0.71290773", "0.7072641", "0.7054814", "0.70529497", "0.69415504", "0.68399286", "0.67913026", "0.674144", "0.67294276", "0.67154515", "0.6698092", "0.667147", "0.6644009", "0.662962", "0.6622562...
0.78415483
1
addes legend to the given map
function createLegend(mymap) { var legend = L.control({ position: 'bottomleft' }); legend.onAdd = function (map) { var div = L.DomUtil.create("div", "legend"); div.style.backgroundColor = 'WHITE'; div.innerHTML += '<p>Number of Links<b>: XX</b></p>'; div.innerHTML += '<p>xxxx x...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createMapLegend() {\n\n}", "function mapLegend() {\n let legend = L.control({position: 'bottomright'});\n\n legend.onAdd = function(map) {\n\n var div = L.DomUtil.create('div', 'info legend');\n var mags = [0, 1, 2, 3, 4, 5];\n\n // loop through our density intervals and generate a labe...
[ "0.8194461", "0.73534685", "0.73008513", "0.71193564", "0.70771456", "0.7072417", "0.70456195", "0.7044891", "0.69986147", "0.68637806", "0.6860625", "0.6810632", "0.67819047", "0.6752372", "0.6745674", "0.6726528", "0.66957486", "0.6654741", "0.66539806", "0.6603126", "0.660...
0.68788475
10