query
stringlengths
9
14.6k
document
stringlengths
8
5.39M
metadata
dict
negatives
listlengths
0
30
negative_scores
listlengths
0
30
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
load action in the provided modules
loadModules(modules={}) { for(let [name, module={}] of Object.entries(modules)) { const {actions={}} = module this.actions[name] = {...actions} } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "load (context, actions) {\n console.log(`Loading module ${this.name} finished`)\n }", "function load(modules) {\n\tmodules.keys().forEach(function(path){\n\t\tmodules(path);\n\t});\n}", "function loadmodules(modules){\n\t\tfor(i in modules){\n\t\t\tload(\"fx:\"+modules[i]+\".js\");\n\t\t}\n\t}", "[LOAD_M...
[ "0.76693594", "0.72287273", "0.7163434", "0.70601505", "0.6383217", "0.6376515", "0.627699", "0.6239418", "0.62375003", "0.6218935", "0.6187359", "0.6174294", "0.6157916", "0.61413693", "0.6114271", "0.6103294", "0.6025056", "0.60007244", "0.59804296", "0.59795594", "0.596222...
0.7835629
0
This method is necessary to retrieve an access token from the Yelp API so that you can authenticate your requests and retrieve data.
getAccessToken() { //This will allow us to know whether or not we need to request a new access token. if(accessToken) { //We already have an access token and just need to return a promise that //will instantly resolve to that access token (if we don't return a promise, //other methods that c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getAccessToken() {}", "function callYelp() {\r\n 'use strict';\r\n\r\n //Nonce generator to generate a random number.\r\n function nonce_generate() {\r\n return (Math.floor(Math.random() * 1e12).toString());\r\n }\r\n\r\n var yelp_url = 'https://api.yelp.com/v2/search';\r\n\r\n //Yelp pa...
[ "0.6718474", "0.6462456", "0.6391004", "0.6309257", "0.6182204", "0.61556965", "0.608879", "0.60863787", "0.6052096", "0.6037831", "0.60256624", "0.6010709", "0.5995601", "0.5967785", "0.58825994", "0.5862332", "0.58621603", "0.5819301", "0.58093715", "0.5799913", "0.5783461"...
0.74408144
0
This is the method we'll use to retrieve search results from the Yelp API.
search(term, location, sortBy) { //Return a promise that will ultimately resolve to our list of businesses. return Yelp.getAccessToken().then( () => { return fetch(`https://cors-anywhere.herokuapp.com/https://api.yelp.com/v3/businesses/search?term=${term}&location=${location}&sort_by=${sortBy}`, { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function yelpSearch() {\n var queryURL = 'https://api.yelp.com/v2/search';\n //authentication object containing necessary headers for server authentication\n var auth= {\n consumerKey: 'auktxeLEVeqlzAMSmT6CzQ',\n consumerSecret: 'kGoz9Jmvzxwuu3FiTvyhgbkRkaI',\n accessToken: 'JCT1veuw5aGAVPpGKeHyEqY-m4b...
[ "0.73065364", "0.7213868", "0.7161388", "0.7149519", "0.7025742", "0.70044863", "0.69897723", "0.6981942", "0.6973662", "0.68600005", "0.6769646", "0.6713707", "0.66579497", "0.6646285", "0.65727174", "0.6554526", "0.6549317", "0.6541295", "0.64666826", "0.6451005", "0.639085...
0.7341142
0
podemos passar parte dos argumentos spread arguments coloque todos os outros parametros dentro do array other
function cadastroSimples(nome, ...other){ console.log(nome); console.log(other); console.log(other.length); console.log(arguments); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function concetraArgumentosEmUmArray(...list) {\n console.log(list);\n}", "function newConcat(val1, ...restParam) {\n\t// this returns a new array\n\tlet newArray = [...val1];\n\tconsole.log(restParam);\n\tfor (let i = 0; i < restParam.length; i++) {\n\t\tif (Array.isArray(restParam[i])) {\n\t\t\tnewArray = [.....
[ "0.67375636", "0.6694418", "0.6650781", "0.656276", "0.65430677", "0.65409726", "0.64797926", "0.64709604", "0.6468867", "0.64591753", "0.6458259", "0.64259315", "0.6425428", "0.6405145", "0.6382717", "0.63775885", "0.63695276", "0.6354148", "0.63534456", "0.6338687", "0.6329...
0.7037678
0
pigIt('Pig latin is cool'); // igPay atinlay siay oolcay pigIt('Hello world !'); // elloHay orldway !
function pigIt(str) { const matchObj = str.match(/(\w+)/) if (matchObj === null) {return str} const word = matchObj[0] const pigWord = word.slice(1) + word[0] + 'ay' const beforeWord = str.slice(0, matchObj.index) const afterWord = str.slice(matchObj.index+word.length) return beforeWord + pigWord + pigIt(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function replacePig() {\n return piglatin(arguments[1]) + '<' + arguments[2] + '>';\n}", "function translatePigLatin(str) {\n // My code\n // We write a regex to search for the occurence of a consonant word or cluster at the start of str.\n let consonantRgx = /^[^aeiou]+/;\n // We check if a conson...
[ "0.7021938", "0.6730278", "0.67187977", "0.66258234", "0.6589171", "0.6576764", "0.65579414", "0.65569454", "0.65473056", "0.6543534", "0.6528268", "0.64799774", "0.64540887", "0.64489263", "0.6439181", "0.6437694", "0.6424158", "0.64178395", "0.6397592", "0.63864106", "0.636...
0.67841226
1
FUNCTION CALLS node func selector switchcase
function nodefuncSelector() { switch (nodefunc) { case "movie-this": omdbGET(); break; case "my-tweets": tweetGET(); break; case "spotify-this-song": songGET(); break; case "do-what-it-says": rando...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SwitchCase(node, print) {\n if (node.test) {\n this.push(\"case \");\n print.plain(node.test);\n this.push(\":\");\n } else {\n this.push(\"default:\");\n }\n\n if (node.consequent.length) {\n this.newline();\n print.sequence(node.consequent, { indent: true });\n }\n}", "function ...
[ "0.59693944", "0.590654", "0.5885622", "0.5885622", "0.58803535", "0.58623236", "0.5800433", "0.57807225", "0.57421947", "0.5742154", "0.5742154", "0.5737459", "0.5714672", "0.5659511", "0.5659511", "0.5659511", "0.5659511", "0.5659511", "0.5659511", "0.56452787", "0.5636103"...
0.59189063
1
Function ONLY called on load of the my whois tab
function loadMyWhoisContent() { var $loader = jQuery("<div class='float-row ajax-loader'>Loading, please wait...</div>"); $loader.appendTo('#myWhoisContainer'); jQuery.getJSON('/?ajax=mWhois&call=getMyWhoisSections',function(data) { var rowIndex = 0; jQuery.each(data, function(rowID,rowTitle){ if(jQuery('#'+r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function display_whois(id, content) {\n try {\n json = JSON.parse(content)\n var whois = \"Country: <br><div class='lead'>\" + json.regrinfo.network.country + \"</div><br>\\n\";\n whois += \"IP Range: <br><div class='lead'>\" + json.regrinfo.network.inetnum + \"<...
[ "0.6263918", "0.59195554", "0.5898255", "0.5801998", "0.57348776", "0.57297444", "0.57191396", "0.5707717", "0.5682936", "0.5679372", "0.56656706", "0.56384265", "0.563303", "0.5627053", "0.5595399", "0.5581237", "0.55624235", "0.55577695", "0.5543851", "0.5542917", "0.553374...
0.61275506
1
Function to add rows of content to the My Whois tab
function addMyWhoisContent(IDToShow,rowTitle) { jQuery('#'+IDToShow+' .add-to-my-whois').addClass('adding-to-my-whois'); jQuery.get('/?ajax=mWhois&call=addMyWhoisSection&args[0]='+IDToShow+'&args[1]='+rowTitle,function(data) { if(data) { jQuery('#'+IDToShow+' .add-to-my-whois') .removeClass('adding-to-my-who...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addContent() {\n\tvar newText = \n\t\t\"<div class='addedContent'><span class='addedName'>\" \n\t\t+ firstName + \" \" \n\t\t+ lastName \n\t\t+ \"</span> &ndash; \" \n\t\t+ city + \" &ndash; \" \n\t\t+ school + \" \" \n\t\t+ \" &ndash; <a href='\"\n\t\t+ \"#\"\n\t\t// + \"'\" + website + \"' target='new'\...
[ "0.61889756", "0.59363234", "0.58677864", "0.58061284", "0.5788925", "0.5784564", "0.57541424", "0.5744926", "0.5738295", "0.57150245", "0.571401", "0.57024497", "0.56818706", "0.5669319", "0.55561537", "0.5524906", "0.5513812", "0.54844517", "0.54638493", "0.5456428", "0.544...
0.65253174
0
Function to remove rows of content from the My Whois tab
function removeMyWhoisContent(IDToHide,title) { jQuery.get('/?ajax=mWhois&call=removeMyWhoisSection&args[0]='+IDToHide,function(data) { if(data) { jQuery('#'+IDToHide+'-copy').remove(); jQuery('#'+IDToHide+' .add-to-my-whois') .removeClass('included-on-my-whois') .attr({"title":"Add to My Whois"}) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function remove_from_cookie_list(row){\n id_remove = row.cells[0].innerText;\n delete cookie_data[id_remove];\n cookie_edit();\n calculate_total()\n}", "function remove_columns(){\r\n\t//hide details header\r\n\tdetails_td = header_tr.getElementsByTagName(\"td\")[0]; \r\n\tdetails_td.style.display =...
[ "0.610515", "0.5953137", "0.5927875", "0.59149", "0.58987474", "0.58754873", "0.5864491", "0.58619857", "0.58421123", "0.5830947", "0.5822941", "0.58118296", "0.578403", "0.57781386", "0.57748574", "0.5774228", "0.5759275", "0.57470727", "0.5707992", "0.5704656", "0.568949", ...
0.6302486
0
Function to move rows of content within the My Whois tab
function moveMyWhoisContent(ID,rowTitle,direction) { jQuery.getJSON('/?ajax=mWhois&call=moveMyWhoisSection&args[0]='+rowTitle+'&args[1]='+direction,function(data) { if(data && !data['no_move']) { jQuery('.ajax-loader').dtSpinnerToggle(true); jQuery('#' + data['element2ID'] + '-copy').fadeOut(function() { j...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function changePosition(from, to, rowToUpdate) {\n\n var $tiles = $(\".tile\");\n var insert = from > to ? \"insertBefore\" : \"insertAfter\";\n\n // Change DOM positions\n $tiles.eq(from)[insert]($tiles.eq(to));\n\n layoutInvalidated(rowToUpdate);\n}", "function loadMyWhoisJS(item,title,rowIndex) {\n\n\tva...
[ "0.6023814", "0.59567076", "0.5883116", "0.5682245", "0.5647448", "0.56045526", "0.56045526", "0.55964094", "0.5595244", "0.55752695", "0.5538003", "0.54892784", "0.54679763", "0.5465737", "0.54254985", "0.5398883", "0.5363916", "0.53628474", "0.535974", "0.5329257", "0.52983...
0.6634337
0
Show/hide help link/content due to user preferences
function helpLink() { if(jQuery('#mwTab-intro:visible').length > 0) { jQuery('#mwTab-intro').hide(); jQuery('.help_link_show').show(); jQuery('.help_link_hide').hide(); //set pref to hidden jQuery.get('/?ajax=mWhois&call=setMyWhoisInfoVisible&args[0]=0'); } else { jQuery('#mwTab-intro').show(); jQuery(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toggleHelp() {\n\ttoggleAnalyserPanel('help');\n}", "function showHelp(state)\n{\n\tif(state==0)\n\t\tdocument.getElementById(\"window_help\").style.display = \"block\";\n\telse\n\t\tdocument.getElementById(\"window_help\").style.display = \"none\";\t\n}", "function showNeedHelpUrl() {\n\tremoveMessag...
[ "0.7396984", "0.7294802", "0.72646457", "0.7210214", "0.6990498", "0.6910815", "0.6910815", "0.68156123", "0.67870283", "0.67476416", "0.6716748", "0.6708988", "0.6698447", "0.66898984", "0.6666112", "0.66593176", "0.663052", "0.66210127", "0.6609302", "0.6550999", "0.6521702...
0.8249935
0
Get some datas about plants in garden, for saving
prepareSave(data) { let plants = []; for (const id in this.imagesMapping) { plants.push(this.imagesMapping[id].toJSON()); } // Call save process by dispatching save event with plants data this.actionDispatcher.dispatch({type: actions.SAVE, data: { id: data.id, garden: { pla...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadPlants() {\n API.getPlants()\n .then(res => { console.log(res); setPlants(res.data) }\n )\n .catch(err => console.log(err));\n }", "function loadExistingDesign() {\n // capture the number of gardens created\n let gardens = localStorage.aas_myGardenVs_grdns;\n if (gardens) {\n...
[ "0.6119398", "0.6087", "0.60427505", "0.58063453", "0.57487154", "0.56600934", "0.55640614", "0.55164635", "0.54969376", "0.54581416", "0.5444708", "0.5438019", "0.54341495", "0.54280454", "0.54259086", "0.54114914", "0.5387449", "0.5383715", "0.5358846", "0.5351847", "0.5346...
0.61633176
0
Get some datas about plants in garden, to run scoring
prepareScoring() { let plants = [], plantModels = {}; for (const id in this.imagesMapping) { const plantView = this.imagesMapping[id]; const plant = plantView.getPlant(); plants.push(plantView.toJSON()); if (!(plant.id in plantModels)) { plantModels[plant.id] = plant; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function netPromoterScore(sede, generation) {\n var ratings = data[sede][generation]['ratings'];\n var array = [];\n for (var i = 0 ; i < ratings.length;i++) {\n var promoters = ratings[i]['nps']['promoters'];\n var detractors = ratings[i]['nps']['detractors'];\n var passive = ratings[i]['nps']['passiv...
[ "0.5883353", "0.58542407", "0.5754762", "0.5679143", "0.5652242", "0.5506734", "0.5447473", "0.5425275", "0.53508943", "0.5344125", "0.5272009", "0.52641934", "0.52601594", "0.5254675", "0.52327204", "0.520698", "0.5204909", "0.51940334", "0.51925266", "0.5187167", "0.5155434...
0.6046107
0
Add a plant on grid, by putting image in a fabricjs group and instanciating a plantView object
addPlantOnGrid(img, idPlant, width, height, position) { img.set({ width: width, height: height, left: position.x, top: position.y, hasRotatingPoint: false, lockRotation: true, lockScalingFlip : true, lockScalingX: true, lockScalingY: true }); const plant...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "putPlant(img, idPlant, position) {\n const idImage = this.idGardenCounter;\n this.idGardenCounter = this.idGardenCounter + 1;\n img = new fabric.Image(img, {\n id: idImage\n });\n this.addPlantOnGrid(img, idPlant, img.width, img.height, position);\n this.showMonthlyTask(this.monthSelected);\...
[ "0.72505295", "0.63472927", "0.63422894", "0.5973458", "0.5910953", "0.5714025", "0.56708187", "0.5635709", "0.5565467", "0.5510017", "0.5495139", "0.5449945", "0.5435223", "0.54126537", "0.5390078", "0.5388181", "0.53587145", "0.53385264", "0.5337285", "0.5322403", "0.531069...
0.7944569
0
Populate garden with plants from imported data
load(data) { // By default, if no user dimensions saved, we generate a 6mx4m garden const {width, length} = (typeof(data.garden.userDimensions) !== 'undefined') ? data.garden.userDimensions : {width: DEFAULT_USER_WIDTH, length: DEFAULT_USER_LENGTH}; this.generate(width, length); data.garden...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadExistingDesign() {\n // capture the number of gardens created\n let gardens = localStorage.aas_myGardenVs_grdns;\n if (gardens) {\n gardens = gardens.split(\",\");\n for (var i = 0, l = gardens.length; i < l; i++){\n //pull gardens counter from local storage\n let garden = localSt...
[ "0.67617667", "0.6365201", "0.59903026", "0.5836594", "0.571845", "0.56596196", "0.55607027", "0.5535836", "0.5534185", "0.5432988", "0.542366", "0.54220057", "0.5383546", "0.53308296", "0.52901167", "0.5207409", "0.52021265", "0.5197994", "0.51925904", "0.5153516", "0.514870...
0.6939148
0
Put a plant into the garden, from dragged image
putPlant(img, idPlant, position) { const idImage = this.idGardenCounter; this.idGardenCounter = this.idGardenCounter + 1; img = new fabric.Image(img, { id: idImage }); this.addPlantOnGrid(img, idPlant, img.width, img.height, position); this.showMonthlyTask(this.monthSelected); this.act...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function placePlant() {\n\t\t\tvar plantRow = Math.floor((stage.mouseY - 80) / 75);\n\t\t\tvar plantCol = Math.floor((stage.mouseX - 25) / 65);\n\t\t\t// let's see if the tile is inside the game field and it's free\n\t\t\tif (plantRow >= 0 && plantCol >= 0 && plantRow < 5 && plantCol < 9 && plantsArray[plantRow][p...
[ "0.6956359", "0.6778862", "0.6416403", "0.61453146", "0.6115287", "0.6042195", "0.60259837", "0.6022718", "0.600893", "0.59930205", "0.59633154", "0.59008956", "0.5884102", "0.58673966", "0.5796542", "0.57878894", "0.5783184", "0.57761914", "0.57734144", "0.5756908", "0.57523...
0.69605976
0
Unselect plant, and hide some informations about it
unselectPlant() { if (this.idImageSelected === null) { return; } const plantView = this.imagesMapping[this.idImageSelected]; this.canvas.selection = false; this.idImageSelected = null; this.actionDispatcher.dispatch({type: actions.HIDE_CARD}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "deselectMisc( miscSelected ){\n \n this.get('miscPanels').forEach(panelName=>{\n if(panelName !== miscSelected){\n this.set(panelName+'PanelIsShowing',false);\n }\n });\n \n }", "deselectBuyBuilding() {\n let gameScene = this.gameScene;\n let gameEngine = gameScene.gam...
[ "0.65590733", "0.6222677", "0.62062913", "0.61519665", "0.61208266", "0.6089441", "0.6083698", "0.6082077", "0.60573095", "0.6045366", "0.6041445", "0.6016839", "0.6014558", "0.6005631", "0.59377867", "0.5921936", "0.58609223", "0.58460027", "0.58182114", "0.5811809", "0.5800...
0.78235304
0
Show for each plant in garden which task is associated to selected month, if any
showMonthlyTask(month) { this.monthSelected = month; if (this.monthSelected === 0) { this.hideMonthlyTasks(); return; } for (let idImage in this.imagesMapping) { // Because of asynchronous image loading, the render if executed in a callback this.imagesMapping[idImage].showMonthly...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function filterActivitiesPerMonth(todaysMonth){\n\t\t\t/* mark the selected month in the date navigator */\n\t\t\t$(\"ul.selectMonth li a\").removeClass();\n\t\t\t$('ul.selectMonth li a#'+todaysMonth).addClass('selectedPage');\n\t\t\t\n\t\t\tif (!todaysMonth) {\n\t\t\t\t$(\"div#voorstellingen ul li\").show();\n\t\...
[ "0.61176074", "0.59705687", "0.570294", "0.5531055", "0.55272204", "0.551552", "0.53130746", "0.53003466", "0.5292466", "0.52868855", "0.5269043", "0.5267096", "0.52530956", "0.5252313", "0.52344847", "0.5211649", "0.5188468", "0.51811993", "0.5167674", "0.5153785", "0.514770...
0.6623844
0
Refresh garden grid by redrawing lines, depending of the size in pixels of a meter
refreshGrid() { const canvasWidth = this.canvas.getWidth(); const canvasHeight = this.canvas.getHeight(); this.grid.horizontalLines.map(line => this.canvas.remove(line)); this.grid.verticalLines.map(line => this.canvas.remove(line)); this.grid.horizontalLines = []; this.grid.verticalLines = []; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "grow() {\n this.drawPoint();\n this.growCell();\n \n// if( this.cellSize > this.MAXSIZE ) {\n// this.drawPoint(); // draw center point one lat time\n// this.growState = false;\n// }\n// else {\n// this.drawPoint(); // re-draw the center point each time\n// this.growCell();\n//...
[ "0.6723088", "0.67172647", "0.67119485", "0.6658037", "0.63813806", "0.63200635", "0.6300789", "0.6259169", "0.62444884", "0.62173784", "0.616949", "0.61694765", "0.61630327", "0.6150522", "0.6147821", "0.6143547", "0.609934", "0.6087104", "0.60667384", "0.6061624", "0.604273...
0.6894798
0
Update a user's name and email based on its id
async updateUser(id, name, email){ let res = await db.query('UPDATE users SET name = ? email = ? WHERE id = ?', [name, email, id]); return res; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async updateUser(_, { id, firstName, lastName, email, password }, { authUser }) {\n // Make sure user is logged in\n if (!authUser) {\n throw new Error('You must log in to continue!')\n }\n // fetch the user by it ID\n //...
[ "0.77238864", "0.76038754", "0.758119", "0.7556382", "0.75344735", "0.7528607", "0.74393463", "0.74244535", "0.73949325", "0.733327", "0.7330817", "0.7326338", "0.7299696", "0.729793", "0.7288732", "0.7288091", "0.7141762", "0.71354175", "0.7099209", "0.70833975", "0.70771754...
0.80111444
0
is valid activity xml file name
function isValidActivityXmlFileName(filename) { var guid = filename.split('.')[0], ext = filename.split('.')[1]; return ( !!ext && ext.toLowerCase()==='xml' && guid.length===32); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "validateIntentName(name){\n var regex = /[a-zA-Z\\-0-9]+([_]|[-]|[a-zA-Z\\-0-9])*$/;\n return regex.test(name);\n }", "function isFilenameValid(name) {\n return /^[A-Za-z0-9][A-Za-z0-9\\._\\-]*$/.test(name)\n}", "function isActivityBuilder() {\n\t\treturn /https:\\/\\/.*\\.desmos\\.com\\/activitybuil...
[ "0.5689232", "0.53627044", "0.5319574", "0.5084392", "0.50742453", "0.50092864", "0.49628446", "0.49615183", "0.49557137", "0.49318713", "0.49318713", "0.49318713", "0.49318713", "0.49318713", "0.489903", "0.4856054", "0.4845121", "0.48141283", "0.48103786", "0.4792183", "0.4...
0.75527644
0
refresh pretty message timestamps
function updateTimestamps() { timeago.cancel(); const timestamps = document.querySelectorAll('.date'); time.render(timestamps); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "reformatTimestamps() {\n if (!cd.g.areTimestampsAltered) return;\n\n this.items.forEach((comment) => {\n comment.reformatTimestamp();\n });\n }", "function parseTimestamp(message) {\n var date = new Date(message.timestamp);\n var minutes = date.getMinutes();\n var hours = date...
[ "0.7256079", "0.6092054", "0.60607386", "0.5995029", "0.59254354", "0.58631337", "0.58543366", "0.58543366", "0.5813941", "0.57797664", "0.577636", "0.57593864", "0.57593864", "0.57404464", "0.573965", "0.57385683", "0.5737709", "0.57253647", "0.5700809", "0.57004446", "0.568...
0.61982274
1
Post build looks through all of the output HTML and rewrites any src attributes to use a cloudinary URL This only solves onpage references until any JS refreshes the DOM
async onPostBuild({ constants, inputs, utils }) { console.log('Replacing on-page images with Cloudinary URLs...'); const host = process.env.DEPLOY_PRIME_URL || process.env.NETLIFY_HOST; if ( !host ) { console.warn(ERROR_NETLIFY_HOST_UNKNOWN); console.log(EEROR_NETLIFY_HOST_CLI_SUPPORT); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function changeFooterImageBack() {\n document.images['footerImage'].src ='./assets/images/white-duck-sad.png'\n }", "async function returnStaticPage() {\n const url = 'https://static-links-page.signalnerve.workers.dev'\n const response = await fetch(url)\n \n const updatedResponse = new HTMLRewrite...
[ "0.5690241", "0.5463711", "0.5405942", "0.5393863", "0.5386942", "0.5300895", "0.53001165", "0.52612114", "0.52563983", "0.52546614", "0.5211815", "0.5197669", "0.5187866", "0.51798993", "0.51553637", "0.51502544", "0.5148739", "0.51405203", "0.5140019", "0.51383275", "0.5136...
0.7174671
0
Keeps the progress state/ref value equal
function updateProgress(newProgress) { progressRef.current = newProgress; setRgbProgress(newProgress); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateProgress (){\n\tprogress.value += 30;\n}", "updateProgress() {\n var state = this.state;\n\n state.runningTime += state.deltaT;\n\n if (this.duration) {\n state.progress = Math.max(0, Math.min(1, state.runningTime / this.duration));\n }\n }", "function f...
[ "0.62682426", "0.6121751", "0.6088615", "0.6076876", "0.60165894", "0.60013074", "0.5987611", "0.5934105", "0.59274065", "0.59123635", "0.5881368", "0.5787192", "0.57819927", "0.57809544", "0.5742099", "0.5734687", "0.5698828", "0.56966114", "0.5675079", "0.567226", "0.566476...
0.6247566
1
Dispatch an special event when clicking on files
dispatchFileClickEvent(caller, data) { caller.dispatchEvent( new CustomEvent('fileClicked', {detail: data ,bubbles: true ,cancelable: true ,composed: false}) ) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_onFileHeaderClicked(e) {\n e.preventDefault();\n e.stopPropagation();\n\n this.trigger('fileClicked');\n }", "openFile() {\n if (this.loadView.loadFileInput.files.length > 0) {\n var file = this.loadView.loadFileInput.files.item(0);\n var event = new CustomEv...
[ "0.78506595", "0.7385421", "0.72161895", "0.71608967", "0.70747334", "0.7073828", "0.70019877", "0.69998974", "0.69567585", "0.6928107", "0.68772215", "0.6868962", "0.68585646", "0.6850087", "0.6844144", "0.6826926", "0.68124616", "0.68107194", "0.6807433", "0.6799958", "0.67...
0.8377885
0
Asynchronous read one directory
AsyncReadDir(directory, done) { let folders = []; let files = []; fs.readdir(directory, function (err, list) { if (err) return done(err); let i = 0; (function next() { let file = list[i++]; if (!file) return done(null, folders, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static async readDirectory(path) {\n return await Util.promisify(Fs.readdir)(path);\n }", "readNextDirectory() {\n let { facade } = this.options;\n let dir = this.queue.shift();\n this.pending++;\n // Read the directory listing\n call_1.safeCall(facade.fs.readdir, dir...
[ "0.7212615", "0.70336586", "0.6494021", "0.6444481", "0.63719016", "0.6362546", "0.6321393", "0.6303048", "0.6303048", "0.62041754", "0.61948353", "0.6174831", "0.6155739", "0.6154778", "0.6114571", "0.6076872", "0.606225", "0.60566604", "0.6049294", "0.6044754", "0.6036011",...
0.71928215
1
Handles the click on the folders
openFolderCallback(event, directory, folder, li, span) { if(!event.ctrlKey && !event.shiftKey) { if (!span.parentElement.querySelector(".nested")) { this.readDirectory(path.join(directory, path.basename(folder)), li); } span.parentElement.querySelector(".neste...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "openFolder(wid, folderName, e) {\n\n var x = $(\"#wc\" + wid).position();\n var tempCurrentPath = this.props.currPath.currentPath\n tempCurrentPath.push(folderName)\n var currPath = this.props.currPath.currentPath.toString().replace(/,/g, '/');\n this.props.dataExchange({\n waction: 'openFolder...
[ "0.66463584", "0.6453939", "0.63799214", "0.63762575", "0.6374807", "0.63622653", "0.6357369", "0.6343478", "0.6338639", "0.6317721", "0.63168454", "0.6289366", "0.6249778", "0.62258667", "0.6208932", "0.61855495", "0.6183922", "0.61782235", "0.6173278", "0.61492753", "0.6148...
0.66194344
1
Handles the ctrl selection
ctrlSelection(event) { if(document.getElementsByClassName('selected')[0] !== undefined && !event.ctrlKey && !event.shiftKey) { while(this.selectionList.length > 0) { document.getElementById(this.selectionList.pop()).classList.remove('selected'); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "controlsHandler(ev) {\n let selected = this.state.selectedIndex;\n\n switch (ev.which) {\n case keys.UP:\n if ( selected > 0 ) {\n this.setState({selectedIndex: selected - 1});\n }\n break;\n case keys.DOWN:\n if ( selected < 8 ) {\n this.setState({sele...
[ "0.6730093", "0.6677504", "0.6517252", "0.64148337", "0.64061844", "0.64061844", "0.6382562", "0.6382562", "0.6382562", "0.6382562", "0.63358957", "0.63010186", "0.628726", "0.6245283", "0.6238359", "0.62331533", "0.62309396", "0.6189059", "0.61491144", "0.61433613", "0.61004...
0.7345133
0
Handles the shift selection
shiftSelection(event, span) { if(this.selectionList[0] !== undefined && event.shiftKey) { let filesInSelectionRange = document.getElementsByTagName("SPAN"); let firstSelectionIndex = undefined; let secondSelectionIndex = undefined; for(let i = 0; i < filesInSelect...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleShiftRightKey() {\n this.extendForward();\n this.checkForCursorVisibility();\n }", "function toggleSelected(lineNo, shift) {\n if (selected[0] === lineNo && selected[1] === -1) {\n setSelected([-1, -1]);\n } else if (selected[0] === -1 || !shift) {\n setSelected([lineNo, -1...
[ "0.6908793", "0.6859214", "0.6818851", "0.6564788", "0.6451301", "0.6448193", "0.644361", "0.64344305", "0.6385216", "0.6371627", "0.6339477", "0.62869334", "0.62558216", "0.6233658", "0.62316877", "0.6230865", "0.6217568", "0.62048495", "0.62048495", "0.6198848", "0.61968833...
0.6981546
0
Read the directory and create the elements in the sidebar (folders and files)
readDirectory(directory, node, upper = false) { // Create a new UL if node !== 'fatherNode' (node === Sub-directory) let nestedUL = undefined; let newFatherNode = undefined; let currentFolderPath = this.processCWD; if(!upper) { if (node.id !== 'fatherNode') { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static set()\n {\n let rootDOM = document.getElementById(\"file-system\");\n //clear dom\n while (rootDOM.firstChild) {\n rootDOM.removeChild(rootDOM.firstChild);\n }\n\n let dir = States.projectPath + Explorer.resFolder + Explorer.currentDir;\n \n Explorer.items = [];\n\n var list = [];...
[ "0.6942643", "0.6694852", "0.66905934", "0.65404797", "0.6469854", "0.63814867", "0.62958986", "0.62388873", "0.6225431", "0.6212715", "0.6102775", "0.60655457", "0.6040972", "0.60386413", "0.5995358", "0.5966466", "0.5932701", "0.5914597", "0.5910936", "0.590999", "0.5884208...
0.6848466
1
TODO Mandar essa formula pro context bridge e adaptar isso no renderer tambem (formula do sliceMainFolderName) Calculates the sliceMainFolderName slice index
sliceIndexFunc(px) { return Math.floor((px-40)/14)-3; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "sliceMainFolderName(sliceIndex, currentFolderName) {\n if(path.basename(this.processCWD).length <= 10 || path.basename(this.processCWD).length <= sliceIndex) {\n currentFolderName.innerText = path.basename(this.processCWD).toUpperCase();\n }\n else {\n if(sliceIndex < 8) ...
[ "0.715738", "0.5006163", "0.491811", "0.48520836", "0.47783592", "0.46874776", "0.46868894", "0.46829656", "0.46800202", "0.4677494", "0.46520403", "0.465068", "0.46483088", "0.46339935", "0.46162918", "0.46038368", "0.4597065", "0.45924821", "0.45823482", "0.45821258", "0.45...
0.52786416
1
Slice the main folder name in the sidebarHeaderDiv
sliceMainFolderName(sliceIndex, currentFolderName) { if(path.basename(this.processCWD).length <= 10 || path.basename(this.processCWD).length <= sliceIndex) { currentFolderName.innerText = path.basename(this.processCWD).toUpperCase(); } else { if(sliceIndex < 8) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getNormalizedSidebarName(_a) {\n var versionName = _a.versionName, sidebarName = _a.sidebarName;\n if (versionName === constants_1.CURRENT_VERSION_NAME || !sidebarName.includes('/')) {\n return sidebarName;\n }\n var _b = sidebarName.split('/'), rest = _b.slice(1);\n return rest.join...
[ "0.57221454", "0.5493758", "0.54058945", "0.53975105", "0.5378048", "0.53743273", "0.53734225", "0.5371191", "0.53152686", "0.5307718", "0.5303675", "0.5274435", "0.52007115", "0.5167682", "0.51446944", "0.5141595", "0.5133543", "0.5126749", "0.5079792", "0.5073988", "0.50629...
0.69564456
0
Return an array where each element is a list beginning with the ingredient name, followed by the names of all the dishes that contain this ingredient. The dishes inside each list should be sorted lexicographically, and the result array should be sorted lexicographically by the names of the ingredients. Example For dish...
function groupingDishes(dishes) { const dishTable = {} const ingredientTable = {} const dishNames = dishes.reduce((a, e) => { return [...a, e[0]] }, []) const ingredients = dishes.filter(e => e.shift()) dishNames.forEach(e => dishTable[`${e}`] = null) for (let key in dishTable) { dishTable[`$...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildIngredientArrays() {\n for (var i = 0; i < recipeBook.length; i++) {\n for (var j = 0; j < recipeBook[i].ingredients.length; j++) {\n if (!allIngredients.includes(recipeBook[i].ingredients[j])) {\n allIngredients.push(recipeBook[i].ingredients[j]);\n }\n }\n }\n sortIngredie...
[ "0.68036336", "0.65983504", "0.6512433", "0.63115174", "0.6285002", "0.6203259", "0.6168613", "0.61131746", "0.6023894", "0.5708335", "0.56980884", "0.55542797", "0.5534814", "0.5422478", "0.54218274", "0.5350019", "0.5264561", "0.52265817", "0.5183419", "0.51709825", "0.5161...
0.777955
0
place n_nodes[i] rings around the ith concentric ring of radius radii[i]
function placeNodes(n_nodes, radii, centerX, centerY){ // Add the center node nodes.push(new Node(centerX, centerY, 50/baseScreenWidth)); for (var i = 0; i < radii.length; ++i){ var nodes_in_ring = n_nodes[i]; var bigRadius = radii[i]; var littleRadius = bigRadius*Math.sin(Math.PI/nodes_in_ring); placeNNodes...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawNewRings(){\n for(var i = 0; i < numRingsConversion.length; i++){\n for(var j = 0; j < numRingsConversion[i]; j++){\n var ring = document.createElementNS(xmlns,'circle')\n ring.setAttribute('cx','50%')\n ring.setAttribute('cy','50%')\n ring.setAttribute('r', (i+1)*hedgeWid...
[ "0.6846289", "0.5969269", "0.587144", "0.5813031", "0.58101493", "0.5781572", "0.57220083", "0.5711157", "0.56855965", "0.5680721", "0.5641841", "0.5632156", "0.5605955", "0.5593676", "0.55725753", "0.5557482", "0.5511878", "0.5500918", "0.54957485", "0.5491871", "0.546807", ...
0.7642351
0
Get the type of pending session store, if any.
get sessionType() { return this._sessionType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getType(sessions) {\n return sessions.length && sessions[0].type.toLowerCase();\n}", "function getPendingBackingStore(instance) {\n var proto = Object.getPrototypeOf(instance);\n var pendingStores = proto._pendingBackingStores;\n var pending = core.arrayFirst(pendingStores, function (pending) ...
[ "0.6221875", "0.5984502", "0.57236934", "0.56447047", "0.542591", "0.54216", "0.5414838", "0.53715914", "0.5308486", "0.525748", "0.52410567", "0.5238477", "0.52344006", "0.52055", "0.51629394", "0.5113389", "0.5094995", "0.50942636", "0.50868005", "0.50846726", "0.50721794",...
0.6022721
1
The backend will check the validity of the JWT, this saves from unneeded calls This function should be in auth
validateJWT () { let jwToken = localStorage.getItem(JWT_KEY); if (jwToken === null) { return false; } let decoded = jwt.decode(jwToken); // TODO: Find a more robust way to do this if (decoded !== null && decoded.exp > Math.floor(Date.now() / 1000)) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validateJWT(req, res, next) {\n try {\n logger.info('validating JWT');\n\n //Extract the JWT token\n var encodedJwt = req.query['signed_request'] || req.headers['authorization'].substring(4) || req.headers['Authorization'].substring(4);\n\n // Decode the base64-encoded token...
[ "0.6978624", "0.6933439", "0.6849086", "0.6794272", "0.6709077", "0.6700115", "0.6694625", "0.66875684", "0.66707146", "0.66454816", "0.6641912", "0.66401684", "0.66321516", "0.6629395", "0.656577", "0.65591985", "0.65458363", "0.65435517", "0.65338343", "0.6531993", "0.65036...
0.7659914
0
grab district and bioguide_id of rep, senators
function findCongress(api, lat, lon, callback) { api.legislatorsLocate().filter("latitude", lat).filter("longitude", lon).call(function (data) { var mocList = Array(); mocList.push(data.results[0].district); for (var i = 0; i < data.results.length; i++) { mocList.push(data.result...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getLegislator(bioguide_id) {\n /* Potential performance improvement by fetching all legislator info at once,\n then storing in AsyncStorage:\n */\n /*\n const members = KeyValueStore.get('congress_members');\n if (members == null) {\n fetch(url, this.header)\n .then((response) => respon...
[ "0.5027071", "0.4991035", "0.49602827", "0.4893475", "0.48553133", "0.48295873", "0.48110205", "0.48100632", "0.48081136", "0.46690208", "0.46649826", "0.4662195", "0.46578196", "0.46575025", "0.46446776", "0.46446335", "0.46339253", "0.46332958", "0.46316928", "0.4630614", "...
0.516917
0
This function remove (hide) all the marker from the map.
function removeMarker() { for (var i = 0; i < self.markerArray().length; i++) { self.markerArray()[i][1].setVisible(false); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hideMarkers() {\r\n setMapOnAll(null);\r\n}", "function hideMarkers() {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(null);\n }\n}", "function hideMarkers() {\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(null);\n }\n}", "function hideMarkers() {\r\n...
[ "0.87461734", "0.8398785", "0.8398785", "0.8385581", "0.8351644", "0.8345333", "0.82960445", "0.82917047", "0.82915187", "0.82405925", "0.82221496", "0.82127", "0.82075477", "0.81082994", "0.8098136", "0.80677694", "0.80677694", "0.8056787", "0.80500716", "0.8043792", "0.8029...
0.8549426
1
This function stop the animation of all the markers.
function stopAnimation() { for (var i = 0; i < self.markerArray().length; i++) { self.markerArray()[i][1].setAnimation(null); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stopAnimation(){\r\n for(var i=0; i<self.markerArray().length; i++){\r\n self.markerArray()[i][1].setAnimation(null);\r\n\tself.markerArray()[i][1].setIcon(defaultIcon);\r\n }\r\n}", "function stopMarkerAnimation() {\n\tfor(var i = 0; i < markers.length; i++) {\n\t\tif(markers[i].getAnimation) {\n\...
[ "0.87736243", "0.8758593", "0.77406806", "0.77044684", "0.7698776", "0.7610861", "0.7398505", "0.737616", "0.73652554", "0.72807837", "0.726047", "0.7257251", "0.7250219", "0.7239353", "0.7239353", "0.7182105", "0.717255", "0.7123786", "0.71142924", "0.7092431", "0.70513904",...
0.8909436
0
compares current and best and sets new bestRoute And bestDistance
compareCurrentRoute(){ // get total distance of currentRoute which is also the last shuffled route let totalDistance = this.getTotalDistance(this.currentRoute); // if our best is bigger than our current total then replace if(this.bestDistance > totalDistance){ this.bestDistan...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateValues(bestMatch, bestMatchValue) {\n\t\t\tfriendSuggestion = bestMatch;\n\t\t\tcompareValue = bestMatchValue;\n\t\t}", "function calculateRoute(){\r\n\r\n if (infowindow) {\r\n infowindow.close();\r\n }\r\n\r\n var start = initialUserLocation;\r\n var end = ...
[ "0.58471864", "0.57582825", "0.562993", "0.56082094", "0.5560193", "0.5518639", "0.5492474", "0.5460953", "0.53738785", "0.536333", "0.53529537", "0.5318197", "0.5318197", "0.5290625", "0.52834296", "0.52825433", "0.52588546", "0.5256638", "0.5252938", "0.52458805", "0.524556...
0.8109272
0
Creates the controller for the production support page.
function productionSupportController(batchApi) { var self = this; /** * The list of available jobs. */ var jobList = null; /** * The most recent error from the backend. */ var error = null; /** * The batch job the user has selected to run. */ var selectedJob = null; /** * The st...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deliverWebPage(req, res){\n p_renderPage(req, res, 'Create a Service Object...');\n }", "function PurchaseController() {\n this.controllerAsName = \"purchaseCntrl\";\n this.printSomething = function () {\n console.log(\"Purchase works\");\n };\n ...
[ "0.5491763", "0.5328288", "0.5272852", "0.5227187", "0.51663274", "0.5157522", "0.5072182", "0.5071712", "0.50262064", "0.501563", "0.50033486", "0.5002213", "0.49748266", "0.49704298", "0.4911662", "0.48645717", "0.48618814", "0.4855199", "0.48450908", "0.4838937", "0.482963...
0.536618
1
This component renders a header used globallly for all pages. Will display Sign In and Sign out links as appropriate. It will display user's name, if that user has been authenticated.
function Header () { const context = useContext(Context); const authUser = context.authenticatedUser; return ( <header> <div className="wrap header--flex"> <h1 className="header--logo"><NavLink className="signup" activeStyle={{color: "white"}} to="/">School Courses</NavLink></h1> <n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Header() {\n const authApi = useContext(AuthContext);\n\n return authApi.user ? <AuthHeader /> : <NonAuthHeader />;\n}", "viewHeader() {\n\t\tif (this.state.page === \"Info\") {\n\t\t\tif (this.state.page === \"Info\") {\n\t\t\t\treturn (\n\t\t\t\t\t<div>Getting Started</div>\n\t\t\t\t);\n\t\t\t} else...
[ "0.749777", "0.7089432", "0.68305546", "0.6800084", "0.67886174", "0.67370254", "0.6640352", "0.63783985", "0.6370497", "0.63583046", "0.6355613", "0.6354702", "0.6341834", "0.6330923", "0.6260154", "0.62454826", "0.6225597", "0.61935025", "0.6184643", "0.6182037", "0.6163985...
0.7409559
1
Builds the initial view state selectedDate is a special case and causes changes to hilightedDate hilightedDate is set on open, so remains undefined initially view is the current view (day, month, year)
function initialState() { return { get selectedDate() { return selectedDate; }, set selectedDate(dt) { if (dt && !opts.inRange(dt)) { return; } if (dt) { selectedDate = new Date(dt); dp.state.hilightedDate = selectedDate; } els...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_applySelectionMode(initial) {\n const that = this;\n let newDate = [],\n preventEvent = initial ? true : false;\n\n switch (that.selectionMode) {\n case 'none':\n that._clearSelection(preventEvent);\n return;\n case 'many':\n ...
[ "0.64236456", "0.6295554", "0.6295554", "0.6264234", "0.6247203", "0.6152995", "0.6089069", "0.6060372", "0.6060372", "0.60406786", "0.6026354", "0.5924011", "0.5820652", "0.5809643", "0.5795952", "0.57680255", "0.5747427", "0.5741745", "0.5703465", "0.5703465", "0.5691371", ...
0.74674565
0
Creates a new task element and adds it to the DOM
function addTaskElement(task) { // Create elements var listEl = document.getElementById("active-list"); var taskEl = document.createElement("li"); var textEl = document.createTextNode(task.name); // Set ID attribute taskEl.setAttribute("id", task.id); // Add text to task element taskEl.appendChild(textEl); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addTask() {\r\n\r\n var taskId = \"task_\" + taskCount++;\r\n\r\n var task = createTask(taskId, \"\", \"\");\r\n taskList[taskId] = task;\r\n\r\n var domElement = createNewTaskDOMElement(task);\r\n taskListDOMElements[taskId] = domElement;\r\n\r\n showTaskDetail(task);\r\n}", "function...
[ "0.7833904", "0.7688916", "0.7687195", "0.7685924", "0.76684767", "0.7642143", "0.76006144", "0.75912666", "0.7574133", "0.756666", "0.7474046", "0.7446448", "0.7396906", "0.7344042", "0.7335366", "0.73263067", "0.72566646", "0.72446597", "0.72295564", "0.7223409", "0.7183901...
0.77751034
1
Keypress handler to automatically click the add task button
function clickAddTaskButton(e) { var addButtonEl = document.getElementById("add-task"); if (e.keyCode == 13) { // Don't do whatever you were gonna do! e.preventDefault(); // Click on the button addButtonEl.click(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addTask(event) {\n if (event.which === 13) {\n addTaskToToDoList();\n }\n}", "addTask() {\n const input = qs('#addTask');\n saveTask(input.value, this.key);\n this.showList();\n }", "function addTaskOnEnterKey(event) {\n if (event.keyCode === 13) {\n inse...
[ "0.7788252", "0.75977474", "0.744965", "0.7360363", "0.7280721", "0.727984", "0.7118613", "0.7098108", "0.70028657", "0.6999069", "0.698732", "0.69521064", "0.6945032", "0.69435567", "0.69107133", "0.6815484", "0.67642635", "0.67477393", "0.6747074", "0.6726349", "0.6723799",...
0.77668774
1
Function to prompt the user for delete certificate confirmation
function deleteCertificate(certID, certName) { alertify.confirm(`Confirm to delete certificate "${certName}"?`, function (e) { if (e) { $('#delete' + certID).submit(); } }).setting({ 'transition': 'zoom', 'movable': false, 'modal': true, 'labels': { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteVerify(){\n var choice = dialog.showMessageBoxSync(\n {\n type: 'question',\n buttons: ['delete project', 'maybe not', 'cancel'],\n title: 'Confirm',\n message: 'Are you sure you want to delete the project \"'+currentProjectTitle+'\"?'\n });\n i...
[ "0.6715605", "0.6700994", "0.6493515", "0.6475405", "0.64555275", "0.64363253", "0.64219064", "0.6383713", "0.63373995", "0.63373756", "0.63228387", "0.62700325", "0.61992246", "0.6196548", "0.61752284", "0.6162021", "0.6153519", "0.6151847", "0.6147908", "0.6136413", "0.6135...
0.7912856
0
Function to prompt the user for delete course confirmation
function deleteCourse(courseID, courseName) { const delForm = document.querySelector('.del_form'); alertify.confirm(`Confirm to delete course "${courseID}-${courseName}?`, function (e) { if (e) { delForm.action = `/faculty_staff/courses/${courseID}/delete`; delForm.submit(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onDeleteCourse() {\n 'use strict';\n if (lastCheckedCourse === -1) {\n\n window.alert(\"Warning: No course selected !\");\n return;\n }\n\n var course = FirebaseCoursesModule.getCourse(lastCheckedCourse);\n txtCourseToDelete.value = course.name;\n ...
[ "0.76941985", "0.72526073", "0.7210976", "0.7145732", "0.704052", "0.7036223", "0.69499", "0.69105697", "0.6905994", "0.68663937", "0.6854638", "0.6808869", "0.6803845", "0.676803", "0.6700988", "0.6681336", "0.66527766", "0.6621596", "0.6611927", "0.6606115", "0.6593353", ...
0.78382677
0
Pulls in new random numbers from random.org if we are enabled and not waiting for a response currently.
UpdateRandomNumbers() { // Debug.Group(`UpdateRandomNumbers`); if (!this.Enabled) { Debug.WriteLine(`Module Disabled...Returning early`); return; } // don't do multiple api calls at once if (this.AwaitingResponse) { Debug.WriteLine(`Already awa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getRandomNumber () {}", "function SeededRandom(){}", "async function random() {\n //new rounds of randomness only occur every ~30 seconds, so we can cache this response\n let response = await fetch(\n new Request('https://drand.cloudflare.com/public/latest'),\n {\n cache...
[ "0.62722206", "0.6249832", "0.61867166", "0.6072354", "0.60539216", "0.60495794", "0.59644234", "0.5929225", "0.5929225", "0.5922304", "0.5905057", "0.5905057", "0.5882713", "0.58768636", "0.586095", "0.585611", "0.585611", "0.5852909", "0.5852909", "0.58499134", "0.5802029",...
0.73261243
0
Numerator: 10+ medications medications are active
function checkNumerator() { var medMin = 10; // List of medications var medList = patient.medications(); // Filters var medActive = filter_activeMeds(medList); return isMatch(medActive) && ( medMin <= medActive.length ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function RestaMedic() { \n if (medic1 >= 1) {\n medic1 -= 1;\n } \n\n}", "function amelioration(){\n return nbMultiplicateurAmelioAutoclick +9;\n}", "function arretNumber() {\n if (this.enCours) {\n this.sonMatricule.stop();\n this.sonAmbiance.fade(0.8 , 1) //Volume son ...
[ "0.5838067", "0.57969296", "0.57624394", "0.5650687", "0.5597351", "0.5565827", "0.5515442", "0.5454824", "0.54532576", "0.54508674", "0.542861", "0.5411013", "0.5393906", "0.53701305", "0.5369291", "0.536874", "0.5355833", "0.53488904", "0.53447497", "0.53401756", "0.5336965...
0.6883932
0
Patch favourite journal entry
function handleFavorite(postId, favorite) { console.log(favorite); async function patchFave() { const res = await fetch(`${BACKEND_URL}/posts/${postId}`, { method: 'PATCH', headers: { 'content-type': 'application/JSON', Authorization: `Bearer ${accessToken}`, },...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "patch_note_content(route, nbid, update) { //#ADJUST TO NOTEBOOKS\n const url = this.baseUrl + route + \"/\" + nbid\n return client.fetch(url, {\n method: \"PATCH\",\n body: json(update)\n })\n .then(response => response.json())\n }", "update({ bookmark, body }, res) {\n let attrib...
[ "0.60551196", "0.57672846", "0.57514644", "0.5687568", "0.5678073", "0.5496644", "0.5496303", "0.5480397", "0.54766446", "0.5460015", "0.54517823", "0.5446747", "0.5405169", "0.53830767", "0.5378128", "0.53598106", "0.5349178", "0.5343838", "0.53409076", "0.5336518", "0.53336...
0.6226018
0
Creates Attribute object from template properties or type `template`: template object or type object, properties for the attribute object `name`: string, if this is set, use this as the name instead of the one in the template (optional) If the argument is a type object, an attribute for this type will be created with d...
constructor (template, name) { if (template instanceof DataType) { this.type = template; this.name = null; this.modelName = null; this.model = null; this.notNull = false; this.primary = false; this.unique = false; this.check = null; this.foreign = null; this.env = null; } else { a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(type, nameOrConfig = type.definition) {\n if (typeof nameOrConfig === \"string\") {\n nameOrConfig = {\n name: nameOrConfig\n };\n }\n\n this.type = type;\n this.name = nameOrConfig.name;\n this.template = nameOrConfig.template;\n const attributes = AttributeDefinitio...
[ "0.5117787", "0.5011321", "0.4997288", "0.46444958", "0.46134654", "0.45698777", "0.4479066", "0.44487712", "0.4400213", "0.43989676", "0.43697837", "0.4320834", "0.4302942", "0.4219814", "0.41918713", "0.4185855", "0.41831923", "0.41816372", "0.4177715", "0.41769803", "0.414...
0.63789576
0
Set the environment object for this Attribute `env`: ModelOne environment, reference to environment object
setEnv (env) { this.env = env; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setEnvironment(env) {\n const INPUT_SETTINGS = global.settings.input;\n if(['*', 'gui'].indexOf(env) === -1 && this.environments.indexOf(env) !== -1) \n {\n INPUT_SETTINGS.I_ENVIRONMENT = this.environment = env;\n }\n }", "function lisp_env_set(env, name, value) {\n lisp_assert(lisp_is_insta...
[ "0.72206616", "0.58471453", "0.5828954", "0.581497", "0.5784207", "0.57738155", "0.5664807", "0.5498109", "0.5495788", "0.542362", "0.5414641", "0.53889805", "0.5364533", "0.53606516", "0.5270269", "0.52554077", "0.52522194", "0.5157554", "0.5123204", "0.51070714", "0.5097838...
0.7367533
0
Get the model name for this Attribute Return: string, the model name or null if no model name has been set
getModelName () { return this.modelName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getModelName(model){\n return typeof model === \"string\" ? model : model.modelName;\n}", "_modelName() {\n if (Ember.isNone(this.constructor.typeKey)) {\n return this.constructor.modelName;\n } else {\n return this.constructor.typeKey;\n }\n }", "static getModelName(m)\n\t{\n\t\t...
[ "0.71769476", "0.66261184", "0.65913063", "0.6464625", "0.64397377", "0.6271666", "0.62025887", "0.62009925", "0.6159815", "0.6127828", "0.6036364", "0.59836197", "0.5854035", "0.5854035", "0.5854035", "0.5854035", "0.5854035", "0.5786829", "0.5777341", "0.5776847", "0.577684...
0.7787625
0
Check wether this Attribute has the `not null` constraint or not
hasNotNullConstraint () { return this.notNull; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "notNull(val) {\n return val !== null;\n }", "hasRequiredAttrs() {\n for (let n in this.attrs)\n if (this.attrs[n].isRequired)\n return true;\n return false;\n }", "isValid() {\n\t\treturn this.ref_id !== 'null' && this.ref_id !== undefined;\n\t}", "function isNotNull(element) {\n ...
[ "0.6723863", "0.65020144", "0.63174033", "0.6220129", "0.6078149", "0.60444176", "0.60444176", "0.60417026", "0.60403717", "0.6034044", "0.6020443", "0.60184467", "0.6008149", "0.59981734", "0.5981471", "0.5952955", "0.5936703", "0.59331197", "0.59331197", "0.59331197", "0.59...
0.7494228
0
Check wether this Attribute has the `primary` constraint or not
hasPrimaryConstraint () { return this.primary; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isPrimary() {\n return undefined == this.referenceId;\n }", "get isPrimary(){\n return ( 0 != ( ( this.kind ) & 1 ) );\n }", "hasUniqueConstraint () {\n\t\treturn this.unique;\n\t}", "get primaryId() {\n return this.table.primary || DEFAULT_PRIMARY_ID;\n }", "get pkey() {\n\t\treturn Obje...
[ "0.6738493", "0.6270109", "0.6086886", "0.56024206", "0.5519162", "0.5407976", "0.53997964", "0.5285", "0.51416224", "0.5124295", "0.5092742", "0.5090733", "0.50769484", "0.5075892", "0.5056713", "0.5053115", "0.5049651", "0.50462073", "0.5034786", "0.50324595", "0.4979537", ...
0.8254431
0
Check wether this Attribute has the `unique` constraint or not
hasUniqueConstraint () { return this.unique; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isUniqueConstraintViolation(error) {\n return /duplicate key value violates unique constraint/.test(String(error));\n }", "get isUnique() {\n return this.unique;\n }", "function validKeyUniqueness(thisKey, configurationObj){\n\t\t var isUnique = true;\n\t\t //each lines\n\t\t for (var i = conf...
[ "0.6312167", "0.616385", "0.58715296", "0.585491", "0.58210075", "0.57723653", "0.57533896", "0.57427186", "0.55890554", "0.5567069", "0.5485632", "0.547727", "0.5434224", "0.5424146", "0.5389956", "0.5389651", "0.5350763", "0.5338679", "0.5317403", "0.53001064", "0.5288342",...
0.8013118
0
Get the `check` onstraint for this Attribute Return: string, the `check` constraint or `null` if none is set
getCheckConstraint () { return this.check; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get check() {\n\t\treturn this.__check;\n\t}", "constraintOf(name) {\n\t\tfor (const c of this._cons) {\n\t\t\tif (c.name() === name) return c;\n\t\t}\n\t\treturn null;\n\t}", "getForeignKeyConstraint () {\n\t\treturn this.foreign;\n\t}", "getExpression() {\n if (!this._fullConstraint) {\n ...
[ "0.52616525", "0.49717516", "0.46892884", "0.45354933", "0.4525172", "0.4376908", "0.43665662", "0.4308429", "0.4265104", "0.42073533", "0.41964898", "0.41964898", "0.41823795", "0.41666004", "0.4160941", "0.4145923", "0.41039857", "0.40856984", "0.40856984", "0.40856984", "0...
0.76811224
0
Get the `foreign key` constraint for this Attribute Return: string, the `foreign key` constraint or `null` if none is set
getForeignKeyConstraint () { return this.foreign; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _getForeignKeyInfo(property, modelName, foreignKeyName) {\n // The convention is that all foreign key names end in ID !!!\n var isScalar = !Array.isArray(property),\n foreignKeyModelName = foreignKeyName.split(FOREIGN_KEY_SUFFIX)[0],\n normalizedForeignKeyModelName = isScalar\n ...
[ "0.54438275", "0.53561515", "0.50786346", "0.5020405", "0.4993073", "0.49695507", "0.49665198", "0.49422538", "0.47780925", "0.4549921", "0.4441232", "0.43616837", "0.4350453", "0.43355936", "0.4328528", "0.4328528", "0.4299784", "0.4287187", "0.42104572", "0.41914445", "0.41...
0.77664554
0
Check that the type of this Attribute is enumerable
hasEnumerableType () { return this.type.isEnumerable(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isIterable(input) {\n\t return input && typeof input[iterator] === 'function';\n\t}", "function isIterable(input) {\n return input && typeof input[iterator] === 'function';\n }", "function isIterable(input) {\n return input && typeof input[iterator_iterator] === 'function';\n}", "fun...
[ "0.6190354", "0.6184207", "0.6107322", "0.5966978", "0.5860807", "0.57725376", "0.57715553", "0.57413495", "0.5727046", "0.5720147", "0.56501085", "0.5619714", "0.5598082", "0.5598082", "0.55660415", "0.555223", "0.54970586", "0.54970586", "0.54970586", "0.5465929", "0.546240...
0.722566
0
Check that the type of this Attribute is searchable
hasSearchableType () { return this.type.isSearchable(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function modelHasAttributeOrRelationshipNamedType(modelClass) {\n return get$8(modelClass, 'attributes').has('type') || get$8(modelClass, 'relationshipsByName').has('type');\n}", "isSearching() {\n const entriesType = this.getEntriesType();\n\n return this.props.state.entries[entriesType].isSearch...
[ "0.55045587", "0.545095", "0.53974295", "0.5390579", "0.5305479", "0.5279242", "0.5234798", "0.5234798", "0.5234798", "0.5234798", "0.5234798", "0.5234798", "0.5234798", "0.5234798", "0.5178368", "0.5177874", "0.5169947", "0.5164775", "0.5157693", "0.5111533", "0.5081187", ...
0.6937983
0
Check that the type of this Attribute is comparable
hasComparableType () { return this.type.isComparable(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mustBeComparable(val) {\n mustBeSameStructure(val, val, 'not comparable');\n}", "function isTypeComparableTo(source, target) {\n return isTypeRelatedTo(source, target, comparableRelation);\n }", "static isComparable(prop, root) {\n const virtual = prop.persist === false;\n ...
[ "0.63202566", "0.60433394", "0.5692343", "0.5493547", "0.5462075", "0.54561055", "0.5432549", "0.54204285", "0.53859687", "0.5382385", "0.5382385", "0.5382385", "0.5382385", "0.5382385", "0.5382385", "0.5382385", "0.5382385", "0.53794366", "0.53794366", "0.53794366", "0.53794...
0.6361482
0
Check that the type of this Attribute is fragmentable
hasFragmentableType () { return this.type.isFragmentable(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isFragmented() {\n return (this.fragment_offset !== 0) || (this.total_length > this.fragment.length);\n }", "get isFragment() {\n return this.i.cs;\n }", "function doesFragmentConditionMatch(exeContext, fragment, type) {\n var typeConditionNode = fragment.typeCondition;\n\n if (!typeCondi...
[ "0.640815", "0.58362955", "0.5553949", "0.5553949", "0.5498097", "0.5429854", "0.5407271", "0.5293422", "0.5282664", "0.5282664", "0.5273366", "0.5112298", "0.4943031", "0.49230492", "0.49045622", "0.49045622", "0.49045622", "0.49045622", "0.48970312", "0.48762047", "0.487601...
0.7211005
0
Get the `absent value` for this Attribute type Return: any type, the absent value set for this type or null if none
getTypeAbsentValue () { // TODO: replace with getter when implemented in library return this.type.properties.absentValue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isAbsent() {\n return \"undefined\" == typeof this.value || null == this.value;\n }", "getAttrValue(attr) {\n this._ensureUnpacked();\n const value = this.unpackedAttrs.get(attr.name);\n if (value === undefined)\n return null;\n return value;\n }", "function getAttributeValue(attr) ...
[ "0.6212979", "0.5993607", "0.59249526", "0.55563235", "0.5495103", "0.5375507", "0.53375405", "0.53279144", "0.5259622", "0.5259622", "0.5258881", "0.5212027", "0.5212027", "0.5192839", "0.5170898", "0.5138269", "0.51354206", "0.5029496", "0.49478257", "0.49410382", "0.493523...
0.81869084
0
Export this attribute object as a template object with as little fields as possible `format`: string, format to use for libraryspecific values, such as data type `explicit`: use string format, such as `STRING()` `internal`: use internal representation, usually a number or serialized string `object`: use object represen...
toMinimalTemplate (format) { let ret = {}; if (this.name) ret.name = this.name; if (this.modelName) ret.model = this.modelName; ret.type = Attribute.formatType(this.type, format); if (this.notNull) ret.notNull = true; if (this.primary) ret.primary = true; if (this.unique) ret.unique = tru...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "toCompleteTemplate (format) {\n\t\tlet ret = {};\n\n\t\tif (this.name)\n\t\t\tret.name = this.name;\n\t\tif (this.modelName)\n\t\t\tret.model = this.modelName;\n\n\t\tret.type = Attribute.formatType(this.type, format);\n\n\t\tret.notNull = this.notNull;\n\t\tret.primary = this.primary;\n\t\tret.unique = this.uniqu...
[ "0.72462976", "0.52505046", "0.52467835", "0.51514757", "0.514838", "0.5105526", "0.50949395", "0.50828785", "0.50732183", "0.5071703", "0.49811673", "0.49728522", "0.49710116", "0.49555975", "0.49555975", "0.4940379", "0.4937881", "0.4936128", "0.49293426", "0.4928048", "0.4...
0.7128401
1
Export this Attribute object as a template object with all redundant fields specified `format`: string, format to use for libraryspecific values, such as Attribute type `explicit`: use string format, such as `STRING(100)` `internal`: use internal representation, usually a serialized string `object`: use object represen...
toCompleteTemplate (format) { let ret = {}; if (this.name) ret.name = this.name; if (this.modelName) ret.model = this.modelName; ret.type = Attribute.formatType(this.type, format); ret.notNull = this.notNull; ret.primary = this.primary; ret.unique = this.unique; ret.check = this.check; ret.fo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "toMinimalTemplate (format) {\n\t\tlet ret = {};\n\n\t\tif (this.name)\n\t\t\tret.name = this.name;\n\t\tif (this.modelName)\n\t\t\tret.model = this.modelName;\n\n\t\tret.type = Attribute.formatType(this.type, format);\n\t\tif (this.notNull)\n\t\t\tret.notNull = true;\n\t\tif (this.primary)\n\t\t\tret.primary = tru...
[ "0.72027606", "0.5323161", "0.5323161", "0.5323161", "0.51588416", "0.49228105", "0.49183053", "0.48921117", "0.48921117", "0.48625877", "0.48091012", "0.4717709", "0.4713119", "0.46411642", "0.46398196", "0.46388966", "0.46330377", "0.46298522", "0.4629196", "0.461707", "0.4...
0.7407693
0
Export this attribute object as a template string (for file output) `complete`: boolean, if `true` also export redundant fields `newLine`: boolean, if `true` format object data using new line (default: `true`) `indentation`: number, for `newLine` formatting, indentation length for output string (default: 4) `depth`: nu...
toTemplateString (options) { if (options === undefined) options = {}; let com = options.complete === undefined ? false : options.complete; let nln = options.newLine === false ? " " : "\n"; let ind = options.indentation === undefined ? 4 : options.indentation; let dpt = options.depth === undefined ? 0 : opt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "toCompleteTemplate (format) {\n\t\tlet ret = {};\n\n\t\tif (this.name)\n\t\t\tret.name = this.name;\n\t\tif (this.modelName)\n\t\t\tret.model = this.modelName;\n\n\t\tret.type = Attribute.formatType(this.type, format);\n\n\t\tret.notNull = this.notNull;\n\t\tret.primary = this.primary;\n\t\tret.unique = this.uniqu...
[ "0.5937345", "0.54710156", "0.53855175", "0.53452754", "0.5340381", "0.5285669", "0.527065", "0.52278906", "0.5202253", "0.5182939", "0.51703435", "0.51487607", "0.5136147", "0.51129305", "0.5108227", "0.51022214", "0.50918585", "0.5042173", "0.5026109", "0.4994303", "0.49908...
0.60488623
0
Metric_Clicks Recording the button clicks on findView searches
function metric_clicks() { // var rec_apn = dojo.connect(dojo.byId('apnButton'), 'onclick', null, function() { // var apn = apn_search.value; // postMetric(productCode,sessionNumber + ':FindView APN Search - (Click) ~ ' + apn); // }); // var rec_address = dojo.connect(dojo.byId('addressBut...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function logClick (e) {\n clickCnt++; \n showClicks();\n}", "function handleViewResultsButtonClicked() {\n $('.page').on('click', '.view-results', function (event) {\n event.preventDefault();\n STORE.view = 'results';\n STORE.button = { class: 'start-over', label: 'Start Over' };\n STORE.curre...
[ "0.64515555", "0.6311864", "0.6057257", "0.60185164", "0.5921282", "0.5896705", "0.5881406", "0.58290434", "0.581103", "0.57447267", "0.5730772", "0.5688876", "0.5672313", "0.56463456", "0.56359655", "0.56327444", "0.56318927", "0.56306416", "0.562264", "0.561561", "0.5613283...
0.76764387
0
A special merge that also does a merge on the objects under the $ keys. This is so that the user can supply some replacement functions under the $ key and still have the default ones inserted.
function mergeOptions() { var $s = []; for (var i = 0; i < arguments.length; i++) { var arg = arguments[i]; if (arg) { $s.push(arguments[i].$); } } /* Correct the first element, as if it is null or undefined the merge will throw an exception */ if (!$s[0]) { $s[0] = {}; } var result = me...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function merge() {\n\t\t/* Support cycles */\n\t\tvar seen = [];\n\t\tvar merged = [];\n\n\t\tfunction _merge() {\n\t\t\tvar objectsStart = 0;\n\t\t\tvar deep = false;\n\t\t\tif (typeof arguments[0] === \"boolean\") {\n\t\t\t\tdeep = arguments[0];\n\t\t\t\tobjectsStart++;\n\t\t\t}\n\t\t\tvar target = arguments[obj...
[ "0.6650871", "0.66487306", "0.66487306", "0.6572504", "0.65404963", "0.65404963", "0.65404963", "0.65404963", "0.65404963", "0.65404963", "0.65404963", "0.65404963", "0.65404963", "0.65404963", "0.65404963", "0.65404963", "0.65404963", "0.65404963", "0.65404963", "0.65404963", ...
0.6809644
0
Scope Remove event handler functions and evaluate value functions. Recursive to handle nested objects in the scope.
function processSnapshot(snapshot, dontRemoveEventHandlers, scope, seen) { if (seen === undefined) { seen = []; } if (arrayIndexOf(seen, snapshot) !== -1) { return; } seen.push(snapshot); var options = scope.$.options(); var eventHandlerPrefix = options.eventHandlerPrefix; var valueFunctionPrefix...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function C(){F.forEach(function(e){var t=e.eventType,n=e.handler;Q.reference.removeEventListener(t,n)})}", "unset() {\n if (is.string(this.target)) {\n // remove delegated events\n for (const type in this._scopeEvents.delegatedEvents) {\n const delegated = this._scopeEvents.delegatedEvents[ty...
[ "0.56417775", "0.55664366", "0.55664366", "0.55408704", "0.55297726", "0.55297726", "0.5522516", "0.5482092", "0.54438645", "0.54438645", "0.5404897", "0.5404897", "0.5404897", "0.5404897", "0.5390831", "0.5387246", "0.5362478", "0.52868336", "0.5277168", "0.5138058", "0.5129...
0.56564575
0
Some property names require a prefix, and these get added to the final part of the property name where the parts are separated by dots. If the prefix ends with a letter then the name will be initialcapped to provide a camelcasing.
function mungePropertyName(name, prefix) { if (!prefix) { return name; } var parts = name.split("."); var result = ""; for (var i = 0; i < parts.length - 1; i++) { result += parts[i] + "."; } var lastPart = parts[parts.length - 1]; if (prefixRequiresNextInitialCap(prefix)) { result += prefix +...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function prefixPropertyName(prefix, propertyName)\n {\n\n if (prefix !== '')\n {\n return prefix + propertyName.charAt(0).toUpperCase() + propertyName.slice(1);\n }\n\n return propertyName;\n }", "function vendorPropName(name) {\n\n\t\t// shortcut for names that are n...
[ "0.77908313", "0.68434405", "0.68229157", "0.679194", "0.67683274", "0.67542267", "0.67462975", "0.6737692", "0.6737692", "0.6733671", "0.6733671", "0.6733671", "0.6733671", "0.6729141", "0.6729141", "0.6729141", "0.6729141", "0.6729141", "0.6729141", "0.6729141", "0.6729141"...
0.8153305
0
Reports the status to firebase, used to display messages in the CMS
function ReportStatus (firebase) { return async function reportStatus (site, message, status, code, callback) { if ( typeof code === 'function' ) { callback = code code = undefined } if ( ! code ) code = 'BUILT' // project::firebase::ref::done var messagesRef = firebase.ref('/man...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "sendStatusChanges() {\n this.fieldSlaveChannel.postMessage(\n new Message(\n FIELD_STATUS_WATCHER,\n {\n data: {\n fieldStatusPatch: this.fieldModel.status,\n },\n },\n ),\n );\n }", "function sendStatusUpdate() {\n var queryParamString = ...
[ "0.6196047", "0.5982678", "0.5967601", "0.5966681", "0.59603924", "0.5929421", "0.5914072", "0.5856352", "0.58501357", "0.5844015", "0.5814423", "0.5803495", "0.5803187", "0.5779989", "0.57503104", "0.5744367", "0.5722856", "0.57042867", "0.5692385", "0.5684865", "0.5657392",...
0.7593657
0
sign up form inserting data into db
SignUpForm(data, files, pw) { return this.knex("users").insert({ buyer: data.buyer, seller: data.seller, businessname: data.businessName, district: data.district, address: data.address, name: data.name, phone_no: data.phone, email: data.email, password: pw, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function register(){\n\tusername = document.getElementById('usernameRegister').value;\n\temail = document.getElementById('emailRegister').value;\n\tpassword = document.getElementById('passwordRegister').value;\n\n\tvar registrationData = {\n \t\tdisplayName: username,\n \t\temail : email,\n \t\tpassword: passwo...
[ "0.7053283", "0.7048038", "0.7047394", "0.69663554", "0.69273376", "0.69061023", "0.6902973", "0.6842944", "0.6836966", "0.6836966", "0.6835496", "0.6802586", "0.6761819", "0.67372346", "0.672983", "0.67229116", "0.66686577", "0.6664912", "0.6648488", "0.6626244", "0.6626244"...
0.72135115
0
hide the catalog when losing focus
function focusout() { $timeout(function () { entryCtrl.showCatalog = false; }, 150); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onBlur()\n {\n this.hide();\n }", "function blur () {\n hasFocus = false;\n if (!noBlur) {\n ctrl.hidden = shouldHide();\n }\n }", "function onFocus(){\n abortControlsAutoHide( this );\n}", "function blur () {\n if (!noBlur) {\n hasFocus = false;\n ctrl.hidden = sh...
[ "0.6657572", "0.6466182", "0.64563096", "0.6449767", "0.6410471", "0.63915277", "0.6376441", "0.63761866", "0.63657236", "0.62760985", "0.6246053", "0.6234154", "0.6226661", "0.6191607", "0.6156177", "0.61529386", "0.61222565", "0.6110562", "0.6110562", "0.6109889", "0.609638...
0.7773734
0
detect whether the pressed key modifies the input field
function isModifyingInput(e) { return ( // tab key e.which != 9 && // cursor keys !(e.which >= 37 && e.which <= 40) && // Ctrl + A !(e.ctrlKey && e.which == 65 ) && ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "checkKeyPressed(){\n if(this.gui.isKeyPressed(\"KeyM\") && this.KeyMPressed == false){\n this.KeyMPressed = true;\n }\n\n if(this.gui.isKeyReleased(\"KeyM\") && this.KeyMPressed == true){\n this.graph.materialCounter++;\n this.KeyMPressed = false;\n }\n ...
[ "0.71829844", "0.6740555", "0.67035216", "0.66188794", "0.6614644", "0.65714157", "0.65441734", "0.65057325", "0.64971364", "0.6483664", "0.6431886", "0.6431006", "0.6428271", "0.64028317", "0.6394034", "0.6379858", "0.63714457", "0.63568574", "0.6328561", "0.63248545", "0.63...
0.7109953
1
Test long polling functionality of the HttpFramework. This function: starts long polling sends the numbers 1..10,000 to the server receives longpolling response from server application, which will be an echo of the message sent in updates a text area of the web page with the response displays the total time taken for a...
function PerformLongPollTest(aTotal, aInterval) { var count = 1; var startTime = 0; var LongPollStarted = function() { startTime = performance.now(); WebUi.SendUpdateToServer(count+'\r\n', DummyUpdateCallbackResponse, DummyUpdateCallbackError); count++; } var RoundToTwo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function webclient_receive(){\n // This starts an asynchronous long-polling request. It will either timeout\n // or receive data from the 'webclientdata' url. In both cases a new request will\n // immediately be started.\n\n $.ajax({\n type: \"POST\",\n url: \"/webclientdata\",\n a...
[ "0.62566715", "0.60311854", "0.5996147", "0.5940417", "0.5940417", "0.5940417", "0.5935905", "0.5864962", "0.5831511", "0.5822908", "0.580664", "0.57994914", "0.5772433", "0.5760903", "0.57513964", "0.5742135", "0.573469", "0.570005", "0.570005", "0.5663914", "0.5647945", "...
0.7456637
0
sorts a sheet by in a particular column order For the Master Schedule, it sorts End min>end hour>start min>start hour>date
function sorted(sheet){ sheet.sort(masterCols.end_time+1).sort(masterCols.start_time+1).sort(masterCols.date+1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sortData(sheet) {\n var lastRow = sheet.getLastRow();\n var lastColumn = sheet.getLastColumn();\n var range = sheet.getRange(2,1,lastRow,lastColumn);\n range.sort({column: 1, ascending: true});\n}", "function sortColumn1_step4() {\n var ss = SpreadsheetApp.getActiveSpreadsheet();\n var sheet = ss....
[ "0.7134375", "0.70693374", "0.68706787", "0.6833073", "0.68191147", "0.6719231", "0.6681346", "0.6666141", "0.6601434", "0.6193968", "0.6023494", "0.5898378", "0.5892478", "0.58870834", "0.5882558", "0.58812374", "0.58571005", "0.5846992", "0.5828435", "0.5774248", "0.5768547...
0.8525102
0
Changes all font colors on the Master Schedule back to black to indicate that changes have been added to the Run of Show
function revertToBlack() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var master = ss.getSheetByName(masterScheduleName); var lastRow = master.getLastRow(); var lastCol = master.getLastColumn(); var range = master.getRange(2, 1, lastRow, lastCol); range.setFontColor("Black");...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetColours(){\r\nfor (var x = 0;x < reminders.length; x++)\r\n\t{\r\n\thighlightDate(reminders[x]);\r\n\t}\r\n}", "function updateColors() {\n var today = new Date();\n var timeNow = today.getHours();\n //${i} for assigning to the style.css and added classes\n for (var i = 9; i < 18; i++) ...
[ "0.6446013", "0.6299222", "0.60644186", "0.5982421", "0.59763056", "0.59708416", "0.5947445", "0.5943043", "0.5943043", "0.59328216", "0.59208983", "0.59166914", "0.59077907", "0.58789724", "0.58769166", "0.5853219", "0.58418804", "0.5814117", "0.5779569", "0.57567394", "0.57...
0.66983086
0
remove event listeners using a clone node and then adding them back again for the time when cards are checked
function removeEvListener() { const cardsContainerTwo = document.querySelector('ul.deck'); const clone = cardsContainerTwo.cloneNode(true); cardsContainerTwo.parentNode.replaceChild(clone, cardsContainerTwo); setTimeout(function () { clone.parentNode.replaceChild(cardsContainerTwo, clone); }, 1500); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeListeners() {\n debug(\"removeListeners\");\n cards().forEach(function(card) {\n card.removeEventListener('click', cardMagic)\n })\n }", "function cardsEventListener() {\n // remove EventListener\n $('li').off();\n\n //add EventListener\n\n $('.card').not('.o...
[ "0.718965", "0.7141799", "0.7010539", "0.6848504", "0.6807256", "0.6790752", "0.67123276", "0.6603125", "0.6581591", "0.65516514", "0.650245", "0.64994025", "0.64621264", "0.64397943", "0.64151055", "0.6404138", "0.63966125", "0.6391419", "0.6374943", "0.637017", "0.6312898",...
0.7709361
0
timer function displays elapsed time since first click in seconds, if all cards are matched then the timer stops, congrats window appears
function increaseTime() { let seconds = 0; let addSec = setInterval(increaseSeconds, 1000); function increaseSeconds() { seconds += 1; let matchedCards = document.querySelectorAll('li.card.open.show.match'); if (matchedCards.length === 16) { clearInterval(addSec); congrats(); } timer.inne...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setTimer() {\r\n timer = setInterval(function() {\r\n time++;\r\n gameTimerDOM.innerHTML = `Timer: ${time} seconds`;\r\n\r\n // Have all cards been matched?\r\n if(matchedCards == 8) {\r\n congrats();\r\n clearInterval(timer);\r\n }\r\n }, 1000);\r\n}", "function Timer(event) ...
[ "0.74591315", "0.7371158", "0.7327038", "0.7325463", "0.7316127", "0.7218346", "0.71952057", "0.7157947", "0.71130127", "0.7106557", "0.7100588", "0.7086812", "0.7063477", "0.70031756", "0.690618", "0.6881615", "0.68808657", "0.6877595", "0.68720007", "0.68569565", "0.6840547...
0.74518514
1
Get the parent state
function $$parentState(state) { // Check if state has explicit parent OR we try guess parent from its name var name = state.parent || (/^(.+)\.[^.]+$/.exec(state.name) || [])[1]; // If we were able to figure out parent name then get this state return name && $state.get(name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get parent() {\n return this._routerState.parent(this);\n }", "get parent() {\n return this._routerState.parent(this);\n }", "get parent() {\n return this._routerState.parent(this);\n }", "get parent() {\n return this._routerState.parent(this);\n }", "get parent() {\...
[ "0.769258", "0.769258", "0.769258", "0.769258", "0.769258", "0.769258", "0.769258", "0.769258", "0.769258", "0.769258", "0.76342463", "0.76342463", "0.7265675", "0.7184995", "0.6960211", "0.6917767", "0.68902284", "0.6858204", "0.6858204", "0.6858204", "0.6821085", "0.67927...
0.83045506
0
When you click a pizza button, kick off all these fun checks and open the modal window to pick toppings
function processPizzaButton(event) { event.preventDefault(); pizzaType = this.innerHTML.split("<br>")[0]; pizzaId = this.value; switch(pizzaType) { case "1 topping": maxToppings = 1; break; case "2 toppings": maxToppings = 2; break; case "3 toppings": maxToppings = 3; break; case "Special...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function processSteakCheeseButton(event) {\n\tevent.preventDefault();\n\tsubId = this.value;\n\n\t// Bring up the modal window to pick toppings\n\t$('#steakCheeseToppingsModal').modal({\n\t\tfocus: true\n\t});\n\n\t// Add listener for \"Add to Cart\" button\n\tdocument.querySelector('#sub-modal-add-to-cart-btn').o...
[ "0.64062804", "0.6368247", "0.63295376", "0.6302199", "0.6162859", "0.61554724", "0.6104178", "0.6102259", "0.6014328", "0.59853065", "0.592201", "0.58863026", "0.5852527", "0.5820318", "0.5816718", "0.5802375", "0.5801914", "0.5793735", "0.5785637", "0.5774071", "0.57729334"...
0.74023473
0
Check how many toppings are checked. If it's greater or less than the number required, disable Add to Cart button.
function enableDisableCartButton(maxToppings) { var checkboxList = document.getElementsByName("topping"); checkedCount = 0; for (var i = 0; i < checkboxList.length; i++) { if (checkboxList[i].checked) { checkedCount++; } } if (maxToppings == checkedCount) { document.querySelector('#modal-add-to-cart-btn...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function check_additionals(form_elem){\n const additionals = form_elem.querySelectorAll('input[name=\"additionals\"]');\n var chooses = form_elem.querySelectorAll('input[name=\"additionals\"]:checked');\n let product = form_elem['product'].value;\n let max_add = parseInt(getData('products')[product]['additiona...
[ "0.6583344", "0.6555532", "0.6552236", "0.6532552", "0.6503324", "0.6489659", "0.6414527", "0.6215044", "0.61790746", "0.6090918", "0.60091394", "0.60032314", "0.6000043", "0.59767663", "0.5967308", "0.5926625", "0.5893868", "0.5851331", "0.5817927", "0.58086544", "0.5806788"...
0.78090525
0
When the add to cart button in the modal window is pressed, submit a POST request with the pizza info and reload the page This also works for Steak and Cheese subs
function processModalSubmitButton(pizzaId, checkedToppings) { const request = new XMLHttpRequest(); request.open('POST', '/add-pizza-to-cart/'); request.setRequestHeader("X-CSRFToken", csrf_token) request.onload = () => { window.location = "/menu"; } const data = new FormData(); data.append('pizzaId', pizzaI...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function place(e){\n\t\t\t\te.preventDefault();\n\t\t\t\tdocument.getElementById('submitButton').style.opacity=0.3;\n\t\t\t\tcheckoutID=document.getElementById('checkoutID').value;\n\t\t\t\tid=sessionStorage.shopID;\n\t\t\t\tverifyCheckoutID(id,checkoutID)\n\t\t\t\t.then(function(){\n\t\t\t\t\tupdate(id,checkoutID...
[ "0.6881338", "0.6828199", "0.67339796", "0.665162", "0.6550091", "0.6550091", "0.6550091", "0.6511761", "0.650338", "0.64883626", "0.64335907", "0.6428354", "0.64191073", "0.6410447", "0.6390798", "0.6349379", "0.63455826", "0.63423043", "0.6340933", "0.6334096", "0.6320835",...
0.74058145
0
ACTION: mpv_convertprojectslist: converts the result from the database into a list of projects
convert(result) { var projects_list = '' projects_list = mpv_convertprojectslist(result) this.setState({projects: projects_list}) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getProjectList(projects){\r\n let list = [];\r\n for (let i = 0; i < projects.length; i++) {\r\n list[i] = {name: projects[i].projectName.toLowerCase()};\r\n }\r\n return list;\r\n}", "function getProjectsList(projects){\r\n let list = [];\r\n for (le...
[ "0.67049533", "0.6671319", "0.64322597", "0.62653244", "0.6113438", "0.6041691", "0.59619576", "0.59154475", "0.58799183", "0.5868858", "0.5820515", "0.5796281", "0.5791974", "0.57835376", "0.57454544", "0.57259214", "0.57225025", "0.56862855", "0.567883", "0.5676203", "0.563...
0.6847403
0
ACTION: Create a new project in the db pcv_createproject: create a new project on the db pcv_createunit: create a new unit in the new project pcv_createeditfield: create a new field in the new unit
createNewProject(project_val, unit_val, field_val){ pcv_createproject(project_val) pcv_createunit(project_val, unit_val) pcv_createeditfield(project_val, unit_val, field_val) this.setState({newProjectId: project_val}) this.setState({newUnitId: unit_val}) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function newProject () {\n ADX.getTemplateList('adc', function (err, adcTemplates) {\n if (err) throw err;\n ADX.getTemplateList('adp', function (err, adpTemplates) {\n if (err) throw err;\n showModalDialog({\n type : 'newADXProject',\n buttonText : {\n ok : 'Create project'...
[ "0.72136474", "0.7210585", "0.69639564", "0.64785796", "0.64421505", "0.6429249", "0.632635", "0.6324475", "0.6306349", "0.6290147", "0.6289411", "0.6264102", "0.6258215", "0.6248725", "0.6239794", "0.61927503", "0.61921954", "0.6188967", "0.6185543", "0.61729914", "0.6170854...
0.7939658
0
ACTION: Render: Back button (Left Top) Render: Project List (Middle Top) Render: New Project (Middle Bottom)
render() { return ( <div className="Page"> <BackButton /> <div className="ProjectList" > <MainProjectViewList projects={this.state.projects}/> <div onClick={this.handleClick}> <MainProjectViewNew projectI...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function projectView(key) {\n // Transition\n $(\"#content\").fadeOut(500, function() {\n // Change view state\n var project = projects[key];\n var title = '<span class=\"title text-xlarge\">' + project.title + '</span>';\n var description = '<p class=\"text-medium\">' + project.description + '</p>';...
[ "0.6347717", "0.6290476", "0.623771", "0.62099004", "0.618196", "0.6174761", "0.61283326", "0.6110727", "0.606343", "0.6043047", "0.59689295", "0.59352833", "0.59117895", "0.5910213", "0.5902942", "0.5882919", "0.5873269", "0.5864563", "0.58635706", "0.5835148", "0.5822189", ...
0.69251376
0
round to 5 function
function round5(x) { return Math.round(x/5)*5; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function round5(x)\n{\n return Math.ceil(x/5)*5;\n}", "function round5(percent) {\n return (percent % 5) >= 2.5 ? parseInt(percent / 5) * 5 + 5 : parseInt(percent / 5) * 5;\n}", "function round5(num, strokeWidth) {\r\n var ret;\r\n strokeWidth = numb(strokeWidth);\r\n if (strokeWidth%2) {\r\...
[ "0.86016196", "0.8197995", "0.7932698", "0.7860824", "0.78535354", "0.7772916", "0.7186398", "0.6991658", "0.6902027", "0.6853897", "0.68505186", "0.6733976", "0.67142767", "0.66944396", "0.66673666", "0.6649502", "0.6636514", "0.6620484", "0.66064906", "0.6589232", "0.657790...
0.89491886
0
ANIMATIONS AND INTERACTIONS animate lines
function transition() { if(animFlag){ d3.selectAll(".line").transition().duration(1000).ease("linear") .style("stroke-dashoffset", "12") .each("end", function() { d3.selectAll(".line").style("stroke-dashoffset", "0"); tr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "initLine(line) {\n line.text = this.add.sprite(320, 336, `line-B-${line.id}`);\n this.anims.create({\n key: `line-B-${line.id}-sheet`,\n frames: this.anims.generateFrameNumbers(`line-B-${line.id}`, {\n start: 0,\n end: line.numFrames\n }),\n frameRate: 5,\n repeat: 0\n ...
[ "0.7156023", "0.7010814", "0.69713074", "0.6930894", "0.68376446", "0.67812216", "0.67590284", "0.67373246", "0.6625706", "0.660191", "0.6593573", "0.65840787", "0.6484054", "0.6445459", "0.63957953", "0.6386773", "0.6352598", "0.63482994", "0.6321228", "0.63015383", "0.62956...
0.70319146
1
Function for paint and hide some menus according the kind of user (Admin,user, visitor)
function paintMenus(currentUser){ if(currentUser.Visitor){ document.getElementById('infoUser').style.visibility='hidden'; var hideBtns=document.querySelectorAll(".editButton") for (var i = hideBtns.length - 1; i >= 0; i--) { hideBtns[i].style.visibility='hidden'; }; var hideBtns=document.querySelectorAll...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function display_admin() {\r\n show(admin);\r\n hide(user);\r\n}", "function showMenu() {\n menu.style.display = \"block\";\n let calButton = document.getElementById(\"calButton\");\n calButton.onclick = showCalendar;\n\n let user = JSON.parse(localStorage.getItem(\"user\"));\n if(user.role === 'admin...
[ "0.7047274", "0.6908454", "0.68533224", "0.68081754", "0.6674442", "0.63740057", "0.6347144", "0.6290783", "0.62665266", "0.62664557", "0.61675817", "0.6145123", "0.6143249", "0.61312914", "0.6119175", "0.61092913", "0.61025405", "0.60999995", "0.6090954", "0.60615826", "0.60...
0.75016123
0
Function for get an array of random titles of comics
function getRandomComicTitles(top){ var comics=JSON.parse(localStorage.getItem('Comics')); var tempNames=[]; top=(top<comics.length?top:comics.length); var random; for (var i = 0; i < top; i++) { console.log(comics); random=Math.abs(Math.floor(Math.random() * comics.length-1-i)); tempNames[i]=comics[random]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateTitle() {\n const titles = [\n 'Fashion', 'Sports', 'Weather', 'Politics', 'Travel'];\n return titles[Math.floor(Math.random() * titles.length)];\n}", "function generateTitle() {\n const title = [\n 'Title1', 'Title2', 'Title3', 'Title4', 'Title5'];\n return title[Math....
[ "0.712555", "0.69031453", "0.65447414", "0.63999224", "0.6380029", "0.63455474", "0.6297377", "0.6279295", "0.6277246", "0.6240972", "0.6224806", "0.6151979", "0.6139272", "0.6059019", "0.6044454", "0.6030648", "0.5973126", "0.5970648", "0.5968338", "0.5959497", "0.59554124",...
0.7555296
0
Function for edit comics from the Comic's widget
function editComics(){ var comics=JSON.parse(localStorage.getItem('Comics')); var comic=comics[document.getElementById('editComic').getAttribute("number")]; comic.Name=document.getElementById('comicName').value; comic.Description=document.getElementById('comicDescription').value; comic.Rate=document.getElementById...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function editContact(){\n\n}", "edit() {\n this.saveInterfaceParams();\n var event = new CustomEvent(\"codeeditevent\");\n document.dispatchEvent(event);\n this.deleteFaustInterface();\n this.moduleView.textArea.style.display = \"block\";\n this.moduleView.textArea.value...
[ "0.6208771", "0.6099594", "0.6034258", "0.60260034", "0.5992189", "0.5872339", "0.5818444", "0.5813141", "0.58053136", "0.5784111", "0.57649684", "0.5755585", "0.57526296", "0.57440096", "0.57253385", "0.5686013", "0.5652502", "0.56499165", "0.5645155", "0.56428456", "0.56370...
0.68127364
0
custom message to enable reader extensions for impinj reader
static enableExtensions() { const enableExtensionsParams = Buffer.allocUnsafe(9); const subType = 0x15; // 21 - Enable Extensions const reserved = 0; enableExtensionsParams.writeUInt32BE(vendorId, 0); enableExtensionsParams.writeUInt8(subType, 4); enableExtensionsParams.w...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function msg_int(speaker_config) {\n\t\n}", "_read() {\n }", "function CustomInfosetExtensionHandler() {\n\n\t$.level = 1; // Debugging level\n\t/**\n\t The context in which this sample can run.\n\t @type String\n\t*/\n\tthis.requiredContext = \"\\tNeed to be running in context of Bridge\\n\";\n\n\t/**\n\t ...
[ "0.48416564", "0.484131", "0.48290777", "0.48281816", "0.47520423", "0.4741301", "0.46969157", "0.46339595", "0.4632679", "0.46234378", "0.4611301", "0.459745", "0.45673853", "0.45595485", "0.4524989", "0.45132902", "0.44921222", "0.44911477", "0.44909006", "0.44909006", "0.4...
0.513043
0
Renders 5day forecast on page by dynamically updating HTML
function renderFiveDayForecast(response) { // First, empty the five-day-display div of any existing elements (used for when a user inputs another city so that elements don't become stacked) $("#five-day-display").empty(); // Dynamically create header and bootstrap 'card-deck' div for the loop to...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderForecast() {\n // url for 5 day forecast api\n var queryURLForecast = \"https://api.openweathermap.org/data/2.5/forecast?q=\" + inputCity + apiKey;\n // calling api (5 day forecast)\n $.ajax({\n url: queryURLForecast,\n method...
[ "0.72718716", "0.7219504", "0.7177106", "0.7153169", "0.70889467", "0.70681214", "0.7024687", "0.6982207", "0.69684803", "0.6957777", "0.6897932", "0.68888235", "0.68775016", "0.68288904", "0.6810953", "0.6808396", "0.6791229", "0.6772575", "0.67427653", "0.67312145", "0.6726...
0.75396824
0
Renders past searched cities in the sidebar
function renderCitySidebar() { // Empty the list-group div to prevent duplication of city searches in the display $(".list-group").empty(); var storedCitySearches = JSON.parse(localStorage.getItem("citySearches")); if(storedCitySearches !== null) { citySearches = storedCitySe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onDisplayContentForTagcitiesmenutag(tag) {\n\trefreshCities();\n}", "function handleSearchButtonClickCity() {\n // Format the user's search by removing leading and trailing whitespace\n var filterCity = $cityInput.value.trim().toLowerCase();\n\n // Set ufoSightings to an array of all dataSet whose \"...
[ "0.6869603", "0.6684018", "0.64729685", "0.6390224", "0.63784426", "0.6296636", "0.62644994", "0.6237761", "0.6211252", "0.6181536", "0.615388", "0.61465687", "0.61455977", "0.6131984", "0.6123565", "0.6122863", "0.6112789", "0.61127263", "0.6050915", "0.6036889", "0.60179293...
0.72037446
0
Nucleus `Nucleus(obj)` Creates a new instance of Nucleus with the following options:
function Nucleus(obj) { if (!(this instanceof Nucleus)) { return new Nucleus(obj) } obj = obj || {} shuttle.RequestHandler.call(this, obj) this.type = obj.type this.url = null this.on('ping', function (data, callback) { callback(null, Date.now()) }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(options) {\n options = options || {};\n options.objectMode = true;\n super(options);\n }", "static initialize(obj, username, password, domain) { \n obj['username'] = username;\n obj['password'] = password;\n obj['domain'] = domain;\n }", "static initi...
[ "0.52464694", "0.5210679", "0.51308215", "0.51232153", "0.51188976", "0.5099469", "0.5077783", "0.5059135", "0.50464505", "0.50156504", "0.5014212", "0.5013754", "0.50102055", "0.50074625", "0.5005058", "0.50003606", "0.4991709", "0.49820247", "0.4974402", "0.49556", "0.49545...
0.71085596
0
stops got theme song
function stopThemeSOng() { var audio = document.getElementById("audio"); audio.pause(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pauseThemeSong() {\n themeSong.pause();\n}", "stop() {\n if (this.uiData.isPlaying) {\n this.uiData.isPlaying = false;\n this.current16thNote = 0;\n this.timerWorker.postMessage('STOP');\n this.uiData.toggleLabel = 'START';\n this.songChartSkippedFirstNote = false;\n ...
[ "0.75592995", "0.70592725", "0.70254344", "0.6992032", "0.69793975", "0.6936682", "0.6902085", "0.6886864", "0.68260175", "0.6818083", "0.67783433", "0.6763394", "0.67446816", "0.67379457", "0.66953945", "0.6686501", "0.6645668", "0.6639594", "0.6598782", "0.65978825", "0.659...
0.7540952
1
Get all games in season
async function getGames(season) { try { const response = await fetch(`https://hasses-sega-gubbar.herokuapp.com/games/${season}`, {}); const data = await response.json(); setSeasonGames(data) } catch { console.log("Error"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async seasons() {\r\n return this.axiosClient\r\n .get(\"/seasons\")\r\n .then(function(response) {\r\n const innerObject = response.data;\r\n // https://documentation.pubg.com/en/seasons-endpoint.html#/Seasons/get_seasons\r\n // data: holds the array\r\n return innerObject...
[ "0.6676437", "0.66738176", "0.6655102", "0.6541976", "0.6517724", "0.6386212", "0.633917", "0.63378173", "0.63346", "0.62951374", "0.6255645", "0.6229034", "0.61825466", "0.6176136", "0.6171848", "0.6157358", "0.61524296", "0.6145927", "0.6138557", "0.61205703", "0.611051", ...
0.73546433
0
function to create a new object which checks the time between two calls in ms
function deltaTimeCreate(){ this.fullTime = new Date().getTime(); this.time = 0; this.new = function(){ this.time = new Date().getTime() - this.fullTime; this.fullTime += this.time; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Time() {}", "function createTimer() {\n\t\tvar start = new Date().getTime(),\n\t\t\tsplit = start;\n\n\t\t/*\n\t\t\tFunction: getTime\n\t\t\tReturns the total elapsed time since this timer was created, and the\n\t\t\tsplit time since this getTime was last called.\n\n\t\t\tReturns:\n\t\t\tObject containi...
[ "0.6457863", "0.6129206", "0.61170834", "0.6101723", "0.6087131", "0.59773576", "0.5961405", "0.59134686", "0.58418334", "0.5822123", "0.5809165", "0.5789097", "0.5728695", "0.5700316", "0.568712", "0.5681377", "0.56557256", "0.564082", "0.56299245", "0.5629342", "0.56254876"...
0.65438735
0
create an child pointing to the given object
function makePointer( obj, pointerObj, childName){ pointerObj[childName] = obj; return obj; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeChild(objectName, parentName) {\n\teval(objectName + \".prototype = Object.create(\" + parentName + \".prototype);\" + \n\t\t\tobjectName + \".prototype.constructor = \" + objectName + \";\");\n}", "function addChild(obj, child) {\n obj.appendChild(child);\n}", "static add(parent, child) {\n ...
[ "0.65804106", "0.6446015", "0.6414927", "0.6346457", "0.632912", "0.632912", "0.632912", "0.61176014", "0.60931456", "0.6014785", "0.5899805", "0.5893514", "0.5845822", "0.5796625", "0.5776835", "0.56863767", "0.5685707", "0.5656819", "0.5652506", "0.5651505", "0.5646638", ...
0.69522417
0
evaluates the derivative of our YTM function at the given i using automatic differentiation pv can be bond price or an esimation of market price based on market interest rates (check this)
function ytm(i,pv,c,n,m,auto_differ) { // m and c and pv do not necessarily need to be Duals var AD = auto_differ; i = Dual(i,1); var func = AD.div(Dual(m),AD.pow(AD.add(Dual(1),i),Dual(n))); for (var k = 1 ; k <= n ; k++) { AD.addAssign(func,AD.div(Dual(c),AD.pow(AD.add(Dual(1),i),Dual(k)))); } AD.subAs...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeDecline(dqi, dbfac, ddec, dmindec, dgor, timeinc, startdate, ngshrink, ngyield, Rwor, intWRI, intNRI, taxOilSev, taxGasSev, taxConSev, taxAdVal, drillCompleteCost, disposalCost, discountRate) {\n cols = [];\n\n\n //for (var i = 0; i < timeinc; i++) {\n for (var i = 0; i < 10*365; i++) {\n\n\n //...
[ "0.5855942", "0.56958306", "0.554162", "0.5536487", "0.5432101", "0.5387743", "0.5376399", "0.5341794", "0.5314151", "0.5289494", "0.52657515", "0.5245956", "0.5238844", "0.52228993", "0.51934516", "0.5180033", "0.51773137", "0.5146655", "0.51284444", "0.5106068", "0.5101743"...
0.63786167
0