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
This function on click of the List of Teams button in the application clears everything out, adds an unordered list to the main app, then runs the getTeamListApi call
function listOfWorldCupTeams() { $('.list-button').click(function(){ emptyApp(); getTeamListApi(listTeams); $('.main-list').removeClass('hidden'); $('main').removeClass('hidden'); $('.scroll-to-top-2').removeClass('hidden'); document.querySelector('.scroll-to-top-2').scrollIntoView({ behavior...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listTeams(data){\n const listOfTeams = data.sort(groupSort).map(item => renderTeamList(item));\n $('.list-of-teams-container').append(listOfTeams);\n}", "function viewAllTeams(){\n console.log( \"inside viewAllTeams\");\n $('#pastOutputDiv').empty();\n getTeams();\n }//ends viewAllTeam...
[ "0.67830807", "0.66903734", "0.6676898", "0.6526889", "0.64986277", "0.642225", "0.64088553", "0.6325961", "0.619615", "0.61391443", "0.61185724", "0.610692", "0.60429335", "0.60170686", "0.59945714", "0.5977704", "0.5924509", "0.58828914", "0.58786327", "0.5842939", "0.58420...
0.7385966
0
This function sorts teams based on their group then renders the long list in the DOM
function listTeams(data){ const listOfTeams = data.sort(groupSort).map(item => renderTeamList(item)); $('.list-of-teams-container').append(listOfTeams); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderSorted(sortedData){\n table.innerHTML = \"\"\n sortedData.forEach((group) => {\n const newGroup = new aCappellaGroup(group)\n table.innerHTML += newGroup.render()\n })\n console.log('sorted the table');\n }", "function listTeams() {\n teamList.sort(function(obj1, obj2) {\n...
[ "0.6886062", "0.6791828", "0.6706063", "0.6672569", "0.63431597", "0.6211198", "0.61904365", "0.61768717", "0.61485684", "0.60992116", "0.60924506", "0.6066045", "0.605404", "0.60369104", "0.60233873", "0.6019828", "0.6015524", "0.6006496", "0.60027313", "0.5988759", "0.59699...
0.80409557
0
This function is the callback function used by getSoccerApi to structure and render the most current match data. It searches through the match data received as a paramater and finds the most recent game, then makes calls to both the youtube api as well as the flag api to find the appropriate information to display the ...
function showCurrentMatch(data){ let dataApi = data; const currentMatch = data.find(findMostRecentGame); const homeFlagId = currentMatch.home_team_country; const awayFlagId = currentMatch.away_team_country; const searchMatch = `${homeFlagId} vs ${awayFlagId} fifa world cup 2018 highlights`; getYoutubeApi(searchMa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function chooseSelectedMatch(data) {\n const userAnswer = $('.selectedAnswer').text();\n emptyApp();\n $('main').removeClass('hidden');\n $('.current-game').removeClass('hidden');\n let cleanedString = userAnswer.replace(/vs|0|1|2|3|4|5|6|7|8|9|-/gi, \"\");\n let arrayOfTeams = cleanedString.trim().split(\" ...
[ "0.67589134", "0.6506693", "0.63516444", "0.6238534", "0.60257447", "0.5985177", "0.59534615", "0.5949241", "0.5897798", "0.5889103", "0.58785653", "0.58605844", "0.58544993", "0.585121", "0.5840023", "0.5831395", "0.582381", "0.58066547", "0.57901967", "0.5785488", "0.578413...
0.7516282
0
function used to find the most recent game by finding the last played game
function findMostRecentGame(game) { return game.status !== "future" }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static getLastId(){\n let lastId =0\n if (games.length > 0) {\n lastId = games[games.length-1].id\n }\n return lastId\n }", "async function getPastGamesByTeam(team_id){\n const currentDate = new Date();\n const timestamp = currentDate.getTime(); \n const past_games ...
[ "0.6633546", "0.6595213", "0.64625996", "0.63710934", "0.6280668", "0.6192543", "0.61918455", "0.61868083", "0.61830616", "0.61745644", "0.61238414", "0.6114212", "0.6113107", "0.61063987", "0.60954416", "0.60948175", "0.6060515", "0.6059061", "0.60172147", "0.60132957", "0.6...
0.79004365
0
Basically an ajax to the Youtube API for information, takes a query string as the search term and a callback function upon success
function getYoutubeApi(searchTerm, callback) { const params = {url: youtubeEndpoint, data: {part: "snippet", q: searchTerm, key: keyCode}, success: callback}; $.ajax(params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getYoutubeDataFromApi(searchTerm, callback) {\r\n if($('.js-query').val()){\r\n const query = {\r\n part: 'snippet',\r\n key: 'AIzaSyCo3Hc6JwT7iXeFvOUuVJOyoQPHOlWeUd4',\r\n q: `${searchTerm} in NYT`, \r\n maxResults: \"2\" \r\n } ...
[ "0.8042039", "0.79225695", "0.78726745", "0.7824013", "0.78107494", "0.77920276", "0.7706384", "0.7547228", "0.7468727", "0.74266285", "0.73608476", "0.7329111", "0.73128486", "0.72768617", "0.7271014", "0.72627056", "0.7242758", "0.72265005", "0.71821666", "0.7174688", "0.71...
0.8119944
0
function that handles the home team statistics. It uses the isEventGoal and renderPlayerGoal method to generate statistics and place it in the DOM
function renderHomeStats(item) { let homeTeamEvents = item.home_team_events; homeTeamEvents = homeTeamEvents.filter(isEventGoal); homeTeamEvents = homeTeamEvents.map(renderPlayerGoal); return `<div class="centered-text"> <h2>${item.home_team_country}</h2> <h3>Goals scored by:</h3> ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderAwayStats(item) {\n let awayTeamEvents = item.away_team_events;\n awayTeamEvents = awayTeamEvents.filter(isEventGoal);\n awayTeamEvents = awayTeamEvents.map(renderPlayerGoal);\n\n return `<div class=\"centered-text\">\n <h2>${item.away_team_country}</h2>\n <h3>Goals scored ...
[ "0.6269374", "0.6093433", "0.6082774", "0.605706", "0.60299647", "0.6025977", "0.60100013", "0.5974335", "0.59643525", "0.59582675", "0.5944927", "0.5934505", "0.59216034", "0.58809984", "0.58725655", "0.5870677", "0.5867814", "0.58627266", "0.58275276", "0.5819906", "0.57923...
0.7294548
0
function that handles the away team statistics in the exact same way as the renderAwayStats method above.
function renderAwayStats(item) { let awayTeamEvents = item.away_team_events; awayTeamEvents = awayTeamEvents.filter(isEventGoal); awayTeamEvents = awayTeamEvents.map(renderPlayerGoal); return `<div class="centered-text"> <h2>${item.away_team_country}</h2> <h3>Goals scored by:</h3> ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderHomeStats(item) {\n let homeTeamEvents = item.home_team_events;\n homeTeamEvents = homeTeamEvents.filter(isEventGoal);\n homeTeamEvents = homeTeamEvents.map(renderPlayerGoal);\n\n return `<div class=\"centered-text\">\n <h2>${item.home_team_country}</h2>\n <h3>Goals scored ...
[ "0.6672162", "0.66573703", "0.61479115", "0.6086263", "0.60659397", "0.6049821", "0.60103065", "0.5989655", "0.59807706", "0.59729964", "0.5971897", "0.59555894", "0.5913917", "0.58679605", "0.5853015", "0.58527607", "0.58275205", "0.5815683", "0.57553405", "0.57273436", "0.5...
0.7659913
0
This function essentially handles the methods used to search for a specific game by country. It waits for a button submit event and clears the Dom of some information
function searchCountryMatches() { $('#js-form').submit(function(event){ event.preventDefault(); emptyApp(); $('main').removeClass('hidden'); $('.game-chooser').removeClass('hidden'); $('.scroll-to-top').removeClass('hidden'); getSoccerApi(filterForSearch); document.querySelector('.game-cho...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function countryMatch(searchTerm) {\n var allCountries = \"https://api.covid19api.com/countries\";\n var currentCountry = \"\";\n $.ajax({\n url: allCountries,\n method: \"GET\",\n }).then(function (response) {\n for (var i = 0; i < response.length; i++) {\n if (response[i].Country === searchTerm...
[ "0.64691865", "0.63922715", "0.6317861", "0.62869537", "0.62021464", "0.61784923", "0.6117368", "0.6038611", "0.603343", "0.5963082", "0.596247", "0.5935668", "0.5928958", "0.5928408", "0.591184", "0.5878854", "0.5839965", "0.5827837", "0.5810798", "0.5804735", "0.580301", ...
0.7517927
0
callback function for the getSoccerApi function, this takes match data and cleans the user selection into a string array containing both the home team string and away string team. It then finds a match between the two teams and runs the methods used to generate a match
function chooseSelectedMatch(data) { const userAnswer = $('.selectedAnswer').text(); emptyApp(); $('main').removeClass('hidden'); $('.current-game').removeClass('hidden'); let cleanedString = userAnswer.replace(/vs|0|1|2|3|4|5|6|7|8|9|-/gi, ""); let arrayOfTeams = cleanedString.trim().split(" "); if(array...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMatches(){\n //Third ajax call to get the master list of strains\n $.ajax({\n url: \"http://strainapi.evanbusse.com/\" + apiKey + \"/strains/search/all\",\n method: 'GET'\n }).then(function(response){\n //Flavor will always be the smaller length of ...
[ "0.6422029", "0.62772536", "0.6257145", "0.62238544", "0.6130076", "0.60816604", "0.60547733", "0.6036107", "0.6013795", "0.5992841", "0.594087", "0.59184027", "0.5893957", "0.58888984", "0.585527", "0.5838625", "0.5821671", "0.58173895", "0.58087105", "0.57816285", "0.577547...
0.7212852
0
This functions purpose is to generate a ajax call to the flag server to retrieve information on the flags of the two countries in the match
function getFlagApi(homeFlag, awayFlag, homeCallBack, awayCallBack){ if(homeFlag === "England") { homeFlag = "United Kingdom"; } if(awayFlag === "England") { awayFlag = "United Kingdom"; } if(homeFlag === "Korea Republic") { homeFlag = "Korea"; } if(awayFlag === "Korea Republic") { away...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getData(selectFilter1, selectFilter2) {\n const url = `https://restcountries.eu/rest/v2/${selectFilter1}/${selectFilter2}`;;\n if (selectFilter1 != '' || selectFilter2 != '') {\n const divPai = document.querySelector('#countriesResult')\n let contentHTML1 = ''\n divPai.innerHTML = contentHTML1;...
[ "0.65056753", "0.6329773", "0.6240021", "0.61887425", "0.6183655", "0.6146571", "0.61358345", "0.6114458", "0.6097529", "0.6074477", "0.60496736", "0.6049518", "0.601387", "0.6004946", "0.59434736", "0.59422415", "0.59378165", "0.5919585", "0.59165484", "0.59147966", "0.59011...
0.6754228
0
This function simply renders the header portion of the match info page, and makes a different response if the teams were tied
function renderMatchInfo(item) { if(item.home_team.penalties !== 0 && item.away_team.penalties !== 0) { return `<div class="centered-text"> <h2>${item.home_team_country} vs ${item.away_team_country}</h2> <h3>${item.home_team.goals}(${item.home_team.penalties}) : ${item.away_team.goals}...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderLeague(res, data, requestedItem, requestedYear, requestedRoundOrGroup) {\r\n var resultsData = getData(config.paths.resultsData, requestedItem, requestedYear);\r\n var tableData = getData(config.paths.tableData, requestedItem, requestedYear);\r\n var requestedRound = requestedRoundOrGroup |...
[ "0.6760464", "0.64065284", "0.6285436", "0.6234802", "0.62118953", "0.6106512", "0.6096301", "0.6084112", "0.6016016", "0.60074335", "0.6006687", "0.59508115", "0.59454167", "0.5877535", "0.58593905", "0.5846357", "0.58429676", "0.58056474", "0.57781315", "0.5776299", "0.5735...
0.6575441
1
renders the home flag of the match
function renderHomeFlag(homeFlag) { $('.flag-1').append(getFlagPicture(homeFlag)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderMatchInfo(item) {\n \n if(item.home_team.penalties !== 0 && item.away_team.penalties !== 0) {\n return `<div class=\"centered-text\">\n <h2>${item.home_team_country} vs ${item.away_team_country}</h2>\n <h3>${item.home_team.goals}(${item.home_team.penalties}) : ${item.away...
[ "0.6325596", "0.58173656", "0.5750248", "0.5729906", "0.57028687", "0.5689417", "0.56640166", "0.5593202", "0.5575044", "0.5566093", "0.55371964", "0.55338633", "0.5498579", "0.5472772", "0.5455129", "0.54473823", "0.5427758", "0.5398111", "0.5396931", "0.53661996", "0.535436...
0.65657073
0
renders the away flag of the match
function renderAwayFlag(awayFlag) { $('.flag-2').append(getFlagPicture(awayFlag)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderFlagpole() {\n\n\tvar flagY = floorPos_y - 30;\n\tstroke(255);\n\tstrokeWeight(5);\n\tline(flagpole.x_pos, floorPos_y, flagpole.x_pos, floorPos_y - 200);\n\tfill(255, 0, 255);\n\tnoStroke();\n\tif (!flagpole.isReached) {\n\t\trect(flagpole.x_pos, flagY, 40, 30);\n\t} else {\n\t\trect(flagpole.x_pos,...
[ "0.5784776", "0.56864923", "0.5644204", "0.5588999", "0.5523703", "0.5477817", "0.54737395", "0.5256291", "0.5246899", "0.5240888", "0.52286065", "0.5215485", "0.5117023", "0.5108331", "0.509317", "0.5065453", "0.5023312", "0.50160104", "0.501114", "0.49949425", "0.4962827", ...
0.6310592
0
emptys the main portion of the app
function emptyApp() { $('.flag-1').empty(); $('.left-main').empty(); $('.leading-content').empty(); $('.flag-2').empty(); $('.right-main').empty(); $('.list-of-teams-container').empty(); $('.game-chooser').empty(); $('.main').addClass('hidden'); $('.game-chooser').addClass('hidden'); $('.main-list')...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearMain(){ //Used to empty the main-container pre-rendering in several cases.\n let main = document.querySelector(\"#app-box__main\"); //Selects the main-container\n main.innerHTML=\" \"; //Then clears the innerHTML\n}", "function clearView() {\n\tconst mainArea = document.getElementById('main-a...
[ "0.72856766", "0.6971996", "0.6947243", "0.67897874", "0.67196476", "0.6638593", "0.66010404", "0.65622526", "0.6550299", "0.65372056", "0.6471188", "0.64634776", "0.645263", "0.64410985", "0.63906676", "0.63836485", "0.632189", "0.6307089", "0.6275594", "0.6253604", "0.62391...
0.7694844
0
"z" appears within three letters after an "a". You may assume that the string contains only lowercase letters. Difficulty: medium.
function nearby_az( string ){ for(i=0;i<=string.length;i++){ if(string[i] === 'a'){ var posA= i; } if(string[i] === 'z'){ var posZ = i } } var totalPosition = posZ - posA; if(totalPosition === 3 || totalPosition === 2 || totalPosition === 1 ){ return true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fearNotLetter(str) {\n let strArr = [...str];\n let uniCode = strArr.map(x => str.charCodeAt(strArr.indexOf(x)));\n\n for(let i = 0; i < uniCode.length; i++){\n if(uniCode[i+1] - uniCode[i] >= 2){\n return String.fromCharCode(uniCode[i] + 1);\n }\n }\n}", "function nearby_az( string ){\n\t...
[ "0.71556777", "0.70407313", "0.7019583", "0.6952378", "0.68684655", "0.68637383", "0.6746866", "0.6731616", "0.6707567", "0.6701204", "0.66841334", "0.66358906", "0.66289943", "0.66167146", "0.65931976", "0.6577376", "0.6563255", "0.6560363", "0.6560363", "0.6548122", "0.6542...
0.70447385
1
Class to animate vertices using vertex delta sets. The delta sets describe the change in vertice structure at a specific point in time. Note that vertex sets are stored flat, and deltas are interpreted the same way. So deltas take the form of [deltaX1, deltaY1, deltaX2, deltaY2, ....] Vertices need to be passed in as d...
function AREVertAnimation(actor, options) { this.actor = actor; this.options = options; param.required(this.actor); param.required(this.options); param.required(this.options.delays); param.required(this.options.deltas); if (this.options.delays.length !== this.options.deltas.length) { A...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function augment1(endVertex) {\r\n\r\n // w is the end vertex of the path\r\n var w = endVertex;\r\n var v = w.predecessor;\r\n var temp;\r\n\r\n // Create frame and push to frames array (for animation)\r\n longTrace.push(\"<li><span class='lime-text'>Vertex \" + w.node.id + \"</span> is the end ...
[ "0.5654254", "0.5289315", "0.52349913", "0.49935958", "0.49865282", "0.4944961", "0.49164408", "0.49116153", "0.4835833", "0.4761965", "0.4676726", "0.4675453", "0.4649064", "0.46414956", "0.46298543", "0.46103212", "0.4593587", "0.4592405", "0.45779693", "0.4564769", "0.4557...
0.55339694
1
Decide what the button will look like based on its type (primary or secondary) and on its background (light or dark).
function getButtonAppearance(type, background) { if (type === "primary") { if (background === "light") { // Dark primary button on a light background return "dark"; } // Fully white primary button on a dark background return "white"; } else if (type === "secondary") { if (background ==...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ButtonType(props) {\n let ButtonVariant\n let variant\n if (props.cta) {\n const buttonTypes = {\n button: Button,\n fab: Fab,\n }\n ButtonVariant = buttonTypes[props.type]\n const variantType = {\n button: 'contained',\n fab...
[ "0.66160256", "0.6389059", "0.6324127", "0.6010293", "0.5932394", "0.5882578", "0.5827813", "0.5818251", "0.5792756", "0.5769764", "0.5712128", "0.5678622", "0.565095", "0.5643586", "0.56140167", "0.5609942", "0.5593412", "0.55825967", "0.5580318", "0.55726516", "0.5558937", ...
0.7661907
0
Classify whether a character is unicode whitespace, unicode punctuation, or anything else. Used for attention (emphasis, strong), whose sequences can open or close based on the class of surrounding characters.
function classifyCharacter(code) { if ( code === null || markdownLineEndingOrSpace(code) || unicodeWhitespace(code) ) { return 1 } if (unicodePunctuation(code)) { return 2 } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function classifyCharacter$2(code) {\n if (\n code === null ||\n markdownLineEndingOrSpace$8(code) ||\n unicodeWhitespace$1(code)\n ) {\n return 1\n }\n\n if (unicodePunctuation$1(code)) {\n return 2\n }\n}", "function isPunctChar(ch) {\n return UNICODE_PUNCT_RE.test(ch);\n} // Markdown ASCI...
[ "0.6487056", "0.60381186", "0.593088", "0.5846335", "0.579059", "0.5786106", "0.57703775", "0.5756904", "0.5756904", "0.5756904", "0.5756904", "0.5756904", "0.5756904", "0.5756904", "0.5756904", "0.56886697", "0.5646377", "0.5585497", "0.5545998", "0.5543753", "0.5542588", ...
0.6548199
1
State management. Main loop (note that `_index` and `_bufferIndex` in `point` are modified by `consume`). Here is where we walk through the chunks, which either include strings of several characters, or numerical character codes. The reason to do this in a loop instead of a call is so the stack can drain.
function main() { var chunkIndex var chunk while (point._index < chunks.length) { chunk = chunks[point._index] // If we’re in a buffer chunk, loop through it. if (typeof chunk === 'string') { chunkIndex = point._index if (point._bufferIndex < 0) { point._bufferIndex ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function main() {\n var chunkIndex;\n var chunk;\n\n while (point._index < chunks.length) {\n chunk = chunks[point._index]; // If we’re in a buffer chunk, loop through it.\n\n if (typeof chunk === 'string') {\n chunkIndex = point._index;\n\n if (point._bufferIndex < 0) {\n ...
[ "0.79409146", "0.6109258", "0.601259", "0.58850634", "0.5703607", "0.5692923", "0.5620757", "0.5550758", "0.5550186", "0.5535781", "0.54351825", "0.5426451", "0.53664184", "0.5339138", "0.5324246", "0.5312294", "0.5296741", "0.5280788", "0.5250413", "0.524629", "0.5245506", ...
0.7974705
1
Run transforms on a unist node representation of a file (in string or vfile representation), async.
function run(node, file, cb) { assertNode(node) freeze() if (!cb && typeof file === 'function') { cb = file file = null } if (!cb) { return new Promise(executor) } executor(null, cb) function executor(resolve, reject) { transformers.run(node, vfile(file), done...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function run(node, file, cb) {\n assertNode(node);\n freeze();\n\n if (!cb && typeof file === 'function') {\n cb = file;\n file = null;\n }\n\n if (!cb) {\n return new Promise(executor)\n }\n\n executor(null, cb);\n\n function executor(resolve, reject) {\n transformers.r...
[ "0.6477063", "0.6464948", "0.6464948", "0.6464948", "0.6464948", "0.6464948", "0.6464948", "0.62928784", "0.58333176", "0.58004534", "0.57792604", "0.57467216", "0.55732363", "0.55732363", "0.5517639", "0.54683506", "0.5385836", "0.53830403", "0.5370721", "0.5361406", "0.5283...
0.648452
1
GET all announcements from announcements table in DynamoDB. Returns sorted (high > low) list. Throws error from DynamoDB if one occurs.
async function getAnnouncements() { function sortTable(data) { const topfive = []; data.Items.forEach((element) => { topfive.push(element); }); topfive.sort((a, b) => b.createdAt - a.createdAt); return topfive; } const docClient = new AWS.DynamoDB.DocumentClient(); var...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAnnouncements(req, res, next) {\n req.announce = {};\n dataModel.readTable(\"announce\", function(data) {\n req.announce = data;\n next();\n });\n}", "async list(event) {\n const data = event.queryStringParameters;\n const params = {\n TableName: authorsTable\n };\n\n if (da...
[ "0.64615107", "0.53052235", "0.52651715", "0.5185921", "0.5165277", "0.5139372", "0.5113637", "0.5054429", "0.502544", "0.5011875", "0.50002414", "0.49706772", "0.49406356", "0.4872643", "0.4840282", "0.47552934", "0.47507474", "0.474888", "0.47320962", "0.47311646", "0.46598...
0.7345082
0
decideTeams() returns an array of teams being arrays of players indexes e.g. [[3, 2], [1, 5], [0, 4]] representing 3 teams with team one consisting of players [3 and 2] team two of [1 and 5] and three of [0 and 4]
decideTeams() { let teams; // 1. create team arrays let numberOfTeams = this.options.numOfTeams; if(numberOfTeams === undefined) { // if private let teams = new Set(); for(let [c, data] of this.playersMap) teams.add(data[2] === 0 ? c : data[2]); numberOfTeams = teams.size; // number ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getTeamsByFixtures () {}", "function determineTeams() {\n let matches = Object.keys(schedule);\n // loops through each match\n for (let match_id in matches) {\n let match = schedule[match_id];\n for (let team_id in match) {\n // checks to see if team is already in array\n if (teams.indexOf(mat...
[ "0.64646316", "0.63411814", "0.6259529", "0.6092621", "0.60465145", "0.603819", "0.60179526", "0.6010158", "0.59665406", "0.5964148", "0.5780606", "0.5768981", "0.5684173", "0.56766784", "0.5634983", "0.56162024", "0.5607891", "0.55916154", "0.55777705", "0.5559034", "0.55564...
0.7646889
0
decideColors() returns team colors and light shading information e.g. [[2, 4, 5, 3], [45(deg), (color), (color)]]
decideColors() { return ([ // team colors DeepSpaceGame.colorCombinations.get(this.gameVars.setupData.teams.length).sample().shuffle(), // light shading LIGHT.randomDraw() ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTeamColors(team){\n //Set default color palette\n var returnColors = ['#013369','#D50A0A','#008000','#FFA500','#FFFF00'];\n var teamColors,nflColors;\n\n //Had to replace #FFFFFF with #DCDCDC to make white visible\n if(team) {\n teamColors = {\n 'ARI': ['#97233F', '#FFB...
[ "0.7289919", "0.68566513", "0.6638634", "0.646561", "0.6368826", "0.63243824", "0.6322288", "0.6293487", "0.6293487", "0.62821215", "0.6275345", "0.6226708", "0.618339", "0.61813647", "0.61713254", "0.61654174", "0.61606205", "0.61549973", "0.61504394", "0.61437064", "0.61433...
0.83116245
0
Public Methods: walk in document in the right direction until condition is met public moveRightUntil( condition: ( item: FragmentItem, index?: number ) => boolean, triggerChangeEvent: boolean = true ): boolean walk in document in the left direction until condition is met public moveLeftUntil( condition: ( item: Fragmen...
function TRange_Target(target, pos) { if (pos === void 0) { pos = 0; } _super.call(this); this.target = null; this.fragPos = 0; if (!target) { throw "ERR_BAD_TARGET"; } else { this.target = target; this.fragPos = ~~pos; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set targetPosition(value) {}", "lift(range, target) {\n lift$2(this, range, target);\n return this;\n }", "moveToTargetLogic(Engine) {\n if (this.item.target.x + (this.item.target.width / 2) < this.item.x + (this.item.width / 2)) {\n this.item.moveLeft = true;\n } else if (this....
[ "0.573694", "0.56202245", "0.5393304", "0.5381603", "0.5308399", "0.52355003", "0.5192366", "0.5182889", "0.51327807", "0.5118699", "0.50927746", "0.5082577", "0.50703007", "0.50591135", "0.49713013", "0.4968092", "0.49547592", "0.49223268", "0.48961595", "0.48692748", "0.486...
0.58194995
0
4) negativeIndex var arr = ['a', 'b', 'c', 'd']
function negativeIndex(arr,index){ return arr[arr.length+index] }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function negativeindex(array, num){\n array=array[array.length+num]\n return array\n}", "function negativeIndex (arr, i) {\n var dog = arr.length + i;\n console.log(arr[dog]);\n}", "function ZeroOutArrayNegativeVals(arr){\n}", "function decreaseArr(arr) {\n let index;\n for(let i = 0; i < ...
[ "0.81385636", "0.7646443", "0.66876614", "0.66244125", "0.65780514", "0.65537757", "0.64893377", "0.6484626", "0.6457395", "0.6445047", "0.6426473", "0.6426473", "0.64166373", "0.64011467", "0.6400076", "0.63914335", "0.6382584", "0.6372239", "0.63715506", "0.63665825", "0.63...
0.8313985
0
Changement du personnage en cours
swapPerso() { if (this.grille.personnages[0].nbtour === 0) { this.grille.personnages[0].nbtour = 3; let temp = this.grille.personnages[0]; this.grille.personnages[0] = this.grille.personnages[1]; this.grille.personnages[1] = temp; if (!this.attack){ $("#action...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "alterRenteninfo (person) {\n const geburtsjahr = person.geburtstag.getFullYear()\n return person.jahrRenteninfo - 1 - geburtsjahr\n }", "function gereTourCombat() {\r\n // SI tourJoueur1 = 0 au départ TOUR JOUEUR 1\r\n if(tourJoueur1 < 1) { // tourJoueur1 vaut 0 au début\r\n joueur2.passeSonTo...
[ "0.6948104", "0.61888444", "0.6105503", "0.6076871", "0.6039386", "0.5895639", "0.586229", "0.5853912", "0.5760999", "0.57247114", "0.5686553", "0.56596404", "0.5628472", "0.5627108", "0.559488", "0.55694956", "0.55642766", "0.55481195", "0.5538683", "0.5520571", "0.5515122",...
0.6359669
1
Reload the map and alert the parent that a new game has been created
reload() { if (this.onNewGame != undefined) { this.onNewGame(); } this.retrieveNearbyGames(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "newGame() {\n location.reload();\n }", "function newGame() {\n location.reload();\n}", "function newGame() {\n location.reload();\n}", "function newGame() {\n location.reload();\n}", "function newGame(){\r\n location.reload();\r\n}", "function newGame()\r\n{\r\n location.reload();\r\n}", "...
[ "0.7132644", "0.7082004", "0.7033768", "0.7033768", "0.70167524", "0.70111394", "0.6719635", "0.67142916", "0.66456354", "0.65942943", "0.65789735", "0.6560348", "0.6536099", "0.651395", "0.6506516", "0.6497099", "0.64936984", "0.6463811", "0.64620024", "0.6461185", "0.643693...
0.72910124
0
infinite loop to find a random number which if is not already used goes through and assigns the object to variables and pushes the random number to the usedquotes array and loggs in console and breaks the loop. If the random number is already in the usedquotes itll run again. If the usedquotes has every quote > reset.
function getRandomQuote () { while (true) { var randomNum = Math.floor(Math.random() * numOfQuotes); if (usedQuotes.indexOf(randomNum) === -1) { quote = quotes[randomNum].quote; source = quotes[randomNum].source; citation = quotes[randomNum].citation; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getRandomQuote() {\n\n var same = true;\n var randomNum = Math.floor(Math.random() * quotes.length);\n \n //checks if the quote have been used before or not\n do {\n var count = 0;\n //goes through all the usedQuotes and if they are the same\n //it generates a new numbe...
[ "0.8049178", "0.7718391", "0.76900965", "0.76088077", "0.743577", "0.7338328", "0.7318728", "0.7310012", "0.7266861", "0.71970236", "0.71482575", "0.7113918", "0.71025956", "0.70929", "0.7074055", "0.70404774", "0.7037597", "0.7018345", "0.6953012", "0.6855072", "0.6801296", ...
0.7962169
1
string > (string, string) Returns a tuple of [directory, filename]
static getDirAndFilenameFromURI(uri) { let directory = ""; let filename = ""; // const regexMatch = this.uri.match(/(.*\/)([^\/]*)$/); const regexMatch = uri.match(/(.*\/)?([^\/]*)$/); if (regexMatch !== null) { // files on root directoy will lead to first match to be...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function exampleDir(str) {\n return str;\n}", "function splitPath(path)\n{\n var parts = path.split(\"/\");\n var idx = -1;\n for (var i = parts.length - 2; i >= 0; --i)\n {\n var lcpath = parts[i].toLowerCase();\n if (lcpath.endsWith(\".zip\") ||\n lcpath.endsWith(\".tgz\")...
[ "0.5616839", "0.55961585", "0.54837966", "0.53817815", "0.5308519", "0.5308147", "0.5279617", "0.5255185", "0.5233201", "0.5209629", "0.5207849", "0.5190188", "0.5168914", "0.51671046", "0.5088563", "0.50728977", "0.50363296", "0.5026908", "0.5025265", "0.5018175", "0.5017586...
0.64181054
0
[string, string] > string Returns the write out path for a given (dir, filename) tuple
static getWriteOutPath(dirAndFilename) { const writeOutPath = Page_1.default.writeOutDir + `/` + dirAndFilename[0] + dirAndFilename[1]; return writeOutPath; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pathJoin( dirname, filename ) { return dirname + '/' + filename }", "function getOutPath(path, info) {\n let outPath = info.mapInOutPaths.get(path);\n if (!outPath) {\n // get file name without extensions\n const fileName = Path.basename(path).replace(FSHARP_EXT, \"\").replace(JAVASC...
[ "0.60416985", "0.5928824", "0.59110534", "0.5876371", "0.5767048", "0.57579356", "0.5747962", "0.56874454", "0.56431985", "0.56122494", "0.5609663", "0.55562913", "0.5520325", "0.5492121", "0.5441839", "0.54352355", "0.5408744", "0.53787726", "0.53419244", "0.53233844", "0.52...
0.7587178
0
Toggle visibility of questions of a certain entry id
function toggle_questions(entry_id,expand_icon,collapse_icon) { var element = document.getElementById(entry_id); var rows = document.getElementsByTagName("tr"); var expr = new RegExp(element.id +"question-entry:([0-9]*):$"); for (i=0;i<rows.length;i++) { if (!(rows[i].id == "")) { if(rows[i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TOGGLE_ANSWER_VISIBILITY(state, id) {\n const question = state.questions.find(q => q.id === id);\n question.isAnswerVisible = !question.isAnswerVisible;\n }", "function toggle_faq(id) \n\t{\n\t\tvar faqAnswer = document.getElementById(id);\n\t\tif(faqAnswer.style.display == 'none')\n\t\t\t{\n\t\t\t ...
[ "0.76756096", "0.7012355", "0.69496214", "0.6671684", "0.6614541", "0.64441437", "0.64384013", "0.641154", "0.64028805", "0.62678796", "0.6263273", "0.62543166", "0.6252853", "0.62120485", "0.6207845", "0.61927056", "0.6179991", "0.6168601", "0.61510396", "0.6145517", "0.6141...
0.75289094
1
Makes a button call a link
function make_button_call_link(button_id, link_id) { var button = document.getElementById(button_id); var link = document.getElementById(link_id); button.onclick = function() { window.location.href = link.href;}; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_onClickUrl(urlLink) {\n //Alert.alert(\"clicked\");\n Linking.openURL(\"http://\"+urlLink);\n \n }", "function onClick(link){\n \n}", "click(e){\r\n if ( this.url ){\r\n bbn.fn.link(this.url);\r\n }\r\n else{\r\n this.$emit('click', e);\r\n }\r\n }...
[ "0.7086985", "0.7040877", "0.6759865", "0.6702379", "0.6567712", "0.6489685", "0.6407117", "0.6382163", "0.6370436", "0.6347903", "0.6334213", "0.6320811", "0.62831485", "0.6263445", "0.6238558", "0.62365675", "0.62359464", "0.61993325", "0.6175331", "0.61703527", "0.6139853"...
0.77181065
0
livelinks compatiblity JQUERY calls the function on each messagecontainer in a document, including ones added by livelinks
function livelinks(func,extraParams){ if(extraParams==undefined) extraParams=null; //run the function on the message-containers currently on the page $('#u0_1 .message-container').each(function(i,container){ func(container,extraParams); }); //run it on any message-containers added in the future $('#u0...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function livelinks(func){\r\n\tdocument.addEventListener(\r\n\t\t'DOMNodeInserted',\r\n\t\tfunction(e){if(e.target.firstChild&&e.target.firstChild.className=='message-container')func(e.target);},\r\n\t\tfalse\r\n\t);\r\n\tfunc(document);\r\n}", "function initMessages(){\n\t\"use strict\";\n\t\n\tif($j('.q_messag...
[ "0.74260706", "0.64363676", "0.63605845", "0.6212219", "0.6201294", "0.61194146", "0.60820764", "0.60800433", "0.5968736", "0.59354866", "0.5931685", "0.5928494", "0.5926699", "0.59079194", "0.59042245", "0.58842814", "0.58517724", "0.5848667", "0.58486116", "0.5848515", "0.5...
0.78743064
0
adds a style to a document and returns the style object JQUERY css is a string, id is an optional string that determines the object's id
function addStyle(css,id){ //create a style var style=$('<style type="text/css">'); //add the css data to it style.html(css); if(id){ //remove any style that has our id $('#'+id).remove(); //give our style the id after removing the other stuff. idk if it matters, but i'm too lazy to find out style...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function add_style(argument, idName) {\n\n if (document.querySelector('#'+idName) != null) {\n document.querySelector('#'+idName).remove();\n }\n let css = argument,\n head = document.head || document.getElementsByTagName('head')[0],\n style = document.createElement('s...
[ "0.7532026", "0.7489603", "0.7256783", "0.7022528", "0.6922433", "0.6894556", "0.6865485", "0.68048275", "0.6743579", "0.6742593", "0.6715223", "0.6697876", "0.6623739", "0.66225255", "0.66184217", "0.6562199", "0.6502089", "0.6496466", "0.6495162", "0.64945257", "0.64945257"...
0.8085426
0
puts the message body of any quotedmessage in its own message div like normal messages for easier styling(hiding) livelinks ready JQUERY
function rearrangeQuotes(container){ //this is a for loop or something $(container).find('.quoted-message').each(function(i,quote){ var quote=$(quote); //create message div for quote var quoteBody=$('<div class="message">'); //add everything but the message-top to the message div quote.contents().eac...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function prepareMessage(message) {\n var html = '';\n html += '<div class=\"mssgIn\">';\n html += '<p class=\"from\">'+jid+'</p>';\n html += '<p class=\"body\">'+message+'</div>';\n html += '</div>'; \n }", "function update_message(m, clear)\n{\n if (clear) {\n $('#message'...
[ "0.6713728", "0.6445159", "0.64174575", "0.6410447", "0.6397891", "0.6392381", "0.63091433", "0.6305069", "0.62842935", "0.6201261", "0.61919546", "0.61652344", "0.61645424", "0.6156682", "0.6150129", "0.6133974", "0.6128403", "0.6113777", "0.6113437", "0.6099461", "0.609369"...
0.65871084
1
Conditional rendering of the cell based on the cell's state
renderCell() { if (this.props.cellState === 0) { return ( <PlayerCell /> ) } else if (this.props.cellState === 1) { return ( <CompCell /> ) } else { return ( <div className="box" onClick={this.playMove}> </div> ) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "renderCompStatus() {\r\n const { Cell } = Table;\r\n const { companies } = this.props;\r\n if (companies.status === \"2\" || companies.status === 2) {\r\n return (\r\n <Cell textAlign=\"center\" singleLine style={{ color: 'red' }}>In Active</Cell>\r\n );\r\...
[ "0.69516987", "0.63299084", "0.62199324", "0.6198492", "0.6187435", "0.6124072", "0.61214405", "0.61078566", "0.6078052", "0.60768276", "0.6054346", "0.60220575", "0.60170954", "0.5980882", "0.59519446", "0.5949281", "0.59042567", "0.58851594", "0.58829045", "0.58644146", "0....
0.6619662
1
generate a checkbox list from a list of products it makes each product name as the label for the checkbos
function populateListProductChoices(slct1, slct2) { var s1 = document.getElementById(slct1); var s2 = document.getElementById(slct2); // s2 represents the <div> in the Products tab, which shows the product list, so we first set it empty // check if s2 is empty or not // s2 represents the <div> in the ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function populateListProductChoices(slct1, slct2) {\n var s1 = document.getElementById(slct1);\n\n var s2 = document.getElementById(slct2);\n\t\n\t// s2 represents the <div> in the Products tab, which shows the product list, so we first set it empty\n s2.innerHTML = \"\";\n\t\t\n\t// obtain a reduced list...
[ "0.71246225", "0.6874474", "0.6842789", "0.6840604", "0.6720325", "0.6618387", "0.6571415", "0.65393275", "0.6503009", "0.6397317", "0.63825434", "0.6339238", "0.633716", "0.6296806", "0.62786996", "0.62265736", "0.6225296", "0.6194306", "0.61915064", "0.6171871", "0.61375266...
0.70033556
1
what this method function does is grab from ADDFORM component and takes the method, event, data thats given by user, and takes in ID. we want to fetch the url then method will be replaced with POST and the information that the user inputs will be stringified and repacked into a JSON.stringified and lastley the new info...
landmarkSubmit(method, event, data, id) { event.preventDefault(); fetch(`/api/landmarks/${id || ''}`, { method, headers: { 'Content-Type': 'application/json', }, body: JSON.stringify(data), }) .then(res => res.json()) .then((res) => { this.getLandmarksFrom...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleSubmit(event) {\n var obj = {\n creatorName: this.state.host,\n eventName: this.state.event,\n cost: this.state.cost,\n des: this.state.description,\n url: this.state.photo,\n availableSeats: this.state.sets,\n date: this.state.date,\n eventLocation: [this.state.loc...
[ "0.58578384", "0.5703946", "0.5701993", "0.57017815", "0.56754065", "0.5664717", "0.5664183", "0.5659144", "0.5642709", "0.56346405", "0.56287426", "0.5606566", "0.55676115", "0.5520646", "0.5512278", "0.5489109", "0.5485601", "0.5477349", "0.5470067", "0.5460866", "0.5443791...
0.68165106
0
This section is for gathering existing trade data / Main function that scans for trades on the page, then looks up and saves all cards involved in the trades
async function findTradeCards() { // Indicate to the user that the extension is saving document.body.style.cursor = "wait"; inCards = []; outCards = []; totalRequests = 0; // Selects all links associated with trades to extract the trade ids var tradesList = document.querySelectorAll("ul.user-status--list li.nm-...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function build_trades(papers, panelDesc) {\n\n if (papers && papers.length > 0) {\n\n // Break the papers down into entries\n console.log('breaking papers into individual entries');\n var entries = [];\n for (var paper in papers) {\n var broken_up = paper_to_entries(papers...
[ "0.646829", "0.6069407", "0.60420847", "0.59870356", "0.5958898", "0.57329905", "0.57131094", "0.5703832", "0.56871426", "0.56670195", "0.56535685", "0.56398743", "0.56382525", "0.56328714", "0.56256694", "0.5589725", "0.55876464", "0.5578448", "0.5569662", "0.55670154", "0.5...
0.7318642
0
Uses the mutation library to wait for a specific selector to be added under rootNode
function waitForElement(rootNode, selector) { const element = rootNode.querySelector(selector); if(element) return Promise.resolve(element); return new Promise((resolve) => { const observer = new MutationSummary({ rootNode, queries: [{element: selector}], callback: (summaries) => { observer.disconnec...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function forAllElements(rootNode, selector, callback) {\n\trootNode.querySelectorAll(selector).forEach(callback);\n\tnew MutationSummary({\n\t\trootNode,\n\t\tqueries: [{element: selector}],\n\t\tcallback: (summaries) => summaries[0].added.forEach((elem) => callback(elem)),\n\t});\n}", "function elementReady(sel...
[ "0.59880036", "0.58252716", "0.5633069", "0.54813623", "0.54803956", "0.5432244", "0.53989816", "0.539236", "0.5366009", "0.5310565", "0.5281461", "0.52807075", "0.5273832", "0.52671903", "0.5236332", "0.5222774", "0.5157151", "0.5157151", "0.5149063", "0.51227915", "0.512075...
0.71734023
0
Waits for a card container to be added to the page, then calls for icons to be added to the container
async function waitToAddIcons(window) { var itemContainerSelector; var itemSelector; // TODO: Add cases here // Decide what to look for on the page given the global container (window) passed in if(window.className.includes("nm-set-window")) { itemContainerSelector = "div.columns.loaded"; itemSelector = ".print...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function addIcons(window, result, itemSelector) {\n\t// Parses saved data back into inbound and outbound card sets\n\tvar savedInCards = result[\"cards\"][\"inCards\"];\n\tvar savedOutCards = result[\"cards\"][\"outCards\"];\n\t// Attempt to add an icon to every \"card\" on the page\n\tforAllElements(window,...
[ "0.6521831", "0.6241635", "0.61992043", "0.6159541", "0.6130004", "0.61138844", "0.60448545", "0.6043436", "0.60308015", "0.5966249", "0.5963802", "0.59287304", "0.5888893", "0.58799195", "0.5871561", "0.5844916", "0.58388424", "0.58345723", "0.5834294", "0.58285844", "0.5828...
0.7217188
0
pure function that returns true or false if two segments overlap
_isOverlap (segA, segB) { var _isBefore = (segA.end >= segB.start && segA.start <= segB.end + 1); var _isAfter = (segA.start <= segB.end + 1 && segA.end >= segB.start); var _isSame = (segA === segB); return ((_isBefore || _isAfter) && (!_isSame)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function overlap(a, b) {\n if (a.start <= b.start && a.end > b.start) {\n return true;\n } else if (a.start >= b.start && a.start < b.end) {\n return true;\n } else {\n return false;\n }\n }", "function segmentsOverlap(segment1, segment2) {\n return (\n (\n se...
[ "0.80662113", "0.7990633", "0.7636323", "0.7483671", "0.74678844", "0.74678844", "0.7467572", "0.74339706", "0.7420032", "0.7400611", "0.7397597", "0.71979684", "0.7189475", "0.7088217", "0.7069992", "0.6994911", "0.6973008", "0.6948697", "0.69230247", "0.69230247", "0.690000...
0.8123759
0
from start and end of aligned sequence, return reference coordinates (currently always S288C)
getReferenceCoordinatesFromAlignedCoordinates (alignedStart, alignedEnd, isProtein) { var _attr = this.attributes; var _seqs = isProtein ? _attr.alignedProteinSequences : _attr.alignedDnaSequences; var referenceSequence = _.findWhere(_seqs, { name: _attr.referenceName }).sequence; var refDomain = referenceSeque...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function alignCoordinates(xss,alignTo){var alignToVals=_.values(alignTo),alignToMin=_.min(alignToVals),alignToMax=_.max(alignToVals);_.forEach([\"u\",\"d\"],function(vert){_.forEach([\"l\",\"r\"],function(horiz){var alignment=vert+horiz,xs=xss[alignment],delta;if(xs===alignTo)return;var xsVals=_.values(xs);delta=h...
[ "0.5937736", "0.5890219", "0.5787893", "0.57340616", "0.55674094", "0.55109346", "0.5503222", "0.5489265", "0.54662913", "0.54354", "0.5434452", "0.5409278", "0.53897554", "0.5378828", "0.5361867", "0.5330416", "0.53289104", "0.52833337", "0.5261894", "0.52590615", "0.5255644...
0.7364795
0
from raw variant data, produce segments as expected by multi_alignment_viewer
formatSegments (isProtein) { var variants = isProtein ? this.attributes.variantDataProtein : this.attributes.variantDataDna; var sequences = isProtein ? this.attributes.alignedProteinSequences : this.attributes.alignedDnaSequences; // make sure they're sorted by start variants = _.sortBy(variants, d => { ret...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sam2sv(samfile) {\n var sam = new SR(fs.createReadStream(samfile));\n\n sam.on('alignment', function(aln) {\n /**\n * get the original breakpoint which generated this clipped sequence\n **/\n var bp = BPInfo.parse(aln.name);\n\n var rev = aln.flags.reversed;\n var unmapped = aln...
[ "0.5987203", "0.5788677", "0.5491443", "0.53030837", "0.5205476", "0.5188011", "0.5137837", "0.513732", "0.5128321", "0.51190627", "0.506107", "0.5061051", "0.50336665", "0.50140744", "0.4959664", "0.49200237", "0.4914757", "0.4856907", "0.4856907", "0.48145384", "0.4783391",...
0.6967459
0
Function generates an object for rgb parameters
function RGBConstructor(rgb) { this.rgb = rgb; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeColor(r, g, b) {\n\tconst color = {}; //This function creates an object which takes keys from function arguments\n\tcolor.r = r;\n\tcolor.g = g;\n\tcolor.b = b;\n\tcolor.rgb = function() { //Then we add function to THIS object\n\t\tconst { r, g, b } = this;\n\t\treturn `rg...
[ "0.69373655", "0.6887223", "0.6887223", "0.68749285", "0.6842997", "0.6842997", "0.6842997", "0.6842997", "0.68419635", "0.68419635", "0.68419635", "0.68180066", "0.6773979", "0.6691854", "0.6618957", "0.66113675", "0.65827954", "0.65577596", "0.6557354", "0.6538944", "0.6468...
0.6953037
0
============================================== scaling bomb size based on client width/height ==============================================
function bombScale() { if (isMobileViewport) { return; } const bomb = document.querySelector(".bomb"); let docHeight = document.querySelector("*").clientHeight; let docWidth = document.querySelector("*").clientWidth; let wrapperHeight = document.querySelector("#wrapper").clientHeight * ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setScale() {\n document.body.style.width = `${this.w}px`;\n document.body.style.height = `${this.h}px`;\n // style used on html els and not for canvas, since canvas css doesn't determine actual available coords -- actual obj size defaults to 300x150 n if only css is changed it just scales from that ...
[ "0.6842961", "0.6826168", "0.6759841", "0.6728491", "0.66878694", "0.66182774", "0.66021323", "0.65808153", "0.6567436", "0.65549296", "0.6550597", "0.65030754", "0.6493792", "0.6481689", "0.64362293", "0.6426497", "0.6392458", "0.6391679", "0.6368091", "0.63652205", "0.63630...
0.78353524
0
get escaped value for an exerciseretrieving URL from: 1.) field 2.) cookie (if it exists) 3.) default If the source is a field, remember that value in a cookie.
function __retrieve1_for_url(field_name) { var val var fld = get_fld(field_name) if (fld) { val = forms_get_fld_val(fld) __set_cookie(field_name, val) } else { val = __retrieve_from_cookie(field_name) } if (val) { return field_name + "=" + escape(v...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function __retrieve_from_cookie(field_name)\n{\n var cookie_val = __get_cookie(field_name)\n var val = null\n if (cookie_val)\n {\n val = cookie_val\n }\n else\n {\n var default_val = __get_cookie(field_name + DEFAULT_SUFFIX)\n if (default_val)\n {\n val ...
[ "0.6240799", "0.562057", "0.5543041", "0.5493699", "0.5383121", "0.5372914", "0.534565", "0.53027076", "0.52908975", "0.52600956", "0.5255581", "0.52336663", "0.5212541", "0.5191439", "0.5190787", "0.518039", "0.51797175", "0.51725805", "0.51619923", "0.5157572", "0.5148359",...
0.6870378
0
Returns the number of points a player has scored
function numPointsScored(playerInput) { for (const playerName in players()) { if (playerName === playerInput) { let points = players()[playerName].points; return `${playerInput} scored ${points} points.`; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "points() {\n var total = 0\n // NOTE a for..in loop does not guarantee property ordering. This is fine for points()\n for(var name in this.games) {\n total += this.games[name].points()\n }\n return total\n }", "getNumberOfVotedCards() {\n var total = 0\n ...
[ "0.7144184", "0.7003646", "0.699993", "0.69876564", "0.6981984", "0.6965923", "0.6906569", "0.67992926", "0.6783016", "0.6687833", "0.66497916", "0.6645326", "0.66393876", "0.6610605", "0.6562722", "0.65565634", "0.6550393", "0.65279007", "0.65233475", "0.6510832", "0.6486932...
0.79632455
0
Returns a string stating the player's shoe size
function shoeSize(playerInput) { const shoe = players()[playerInput].shoe; return `${playerInput} has size ${shoe} shoes.` }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "shelfSize()\n {\n return this.values.size * this.values.quantity;\n }", "static get PLAYER_SIZE() {\n return 10;\n }", "getDrawSize () {\r\n return Math.ceil(this.calories / this.gestation * 10)\r\n }", "function sizeCost(){\n if(this.size=s){\n return \"7.99\";\n }\n if(this.size=...
[ "0.6741626", "0.6631362", "0.6314216", "0.6310961", "0.62722", "0.6206745", "0.6192933", "0.6184269", "0.60899436", "0.60379916", "0.60345817", "0.6025872", "0.59556496", "0.5943416", "0.59293544", "0.5911216", "0.5892356", "0.5859451", "0.58330756", "0.58298117", "0.57988733...
0.8721674
0
Returns a team's colors
function teamColors(team) { if (team === homeTeam().teamName) { return homeTeam().colors; } else if (team === awayTeam().teamName) { return awayTeam().colors; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTeamColors(team){\n //Set default color palette\n var returnColors = ['#013369','#D50A0A','#008000','#FFA500','#FFFF00'];\n var teamColors,nflColors;\n\n //Had to replace #FFFFFF with #DCDCDC to make white visible\n if(team) {\n teamColors = {\n 'ARI': ['#97233F', '#FFB...
[ "0.8368425", "0.78921735", "0.7821611", "0.7708702", "0.6998364", "0.69117904", "0.65215933", "0.6450126", "0.64260733", "0.64182734", "0.6402767", "0.6369281", "0.63602424", "0.63569385", "0.633857", "0.63079655", "0.6288124", "0.62877405", "0.62077165", "0.6205735", "0.6199...
0.8476377
0
Returns a list of team names
function teamNames() { return [homeTeam().teamName, awayTeam().teamName]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTeamList() {\n return Team.find({}, \"team_name\").exec();\n}", "getTeams () {\n let result = `TEAMS ${View.NEWLINE()}`\n result += `Premiership Division ${View.NEWLINE()}`\n\n for (let aTeam of this.allPDTeams) {\n result += aTeam + `${View.NEWLINE()}`\n }\n result += `Champions...
[ "0.82568204", "0.7384594", "0.7294814", "0.70426226", "0.688136", "0.683964", "0.6776307", "0.6677421", "0.66732824", "0.65669423", "0.6564693", "0.6443753", "0.64214283", "0.63775384", "0.63585854", "0.63285977", "0.63034236", "0.6286994", "0.624469", "0.62021536", "0.618098...
0.8550278
0
Returns an array of player numbers depending on which team is inputted
function playerNumbers(teamName) { let arrayOfNumbers = []; if (teamName === homeTeam().teamName) { let teamPlayers = homeTeam().players; let teamValues = Object.values(teamPlayers); for (let player of teamValues) { arrayOfNumbers.push(player.number); } } else if (teamName === awayTeam().tea...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPlayers(player, team) {\n console.log(player + \": \" + team);\n}", "function getTeamPlayers(match, teamId) {\n // since the participantIdentities portion doesn't track teamId\n // we determine it by looking at participants to find out the teamId\n // NOTE: it looks like participants is always ...
[ "0.69608676", "0.6762298", "0.67574656", "0.6505717", "0.650196", "0.6500435", "0.6500435", "0.6465336", "0.6298418", "0.62699115", "0.62552553", "0.62461245", "0.62461245", "0.6224262", "0.61670554", "0.6162367", "0.60942507", "0.60909003", "0.6047112", "0.604082", "0.603128...
0.80949354
0
Returns an object with the inputted player's stats
function playerStats(playerInput) { for (const playerName in players()) { if (playerName === playerInput) { return players()[playerName]; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPlayerStats(pobj) {\n var stats = {kills : pobj['stats']['kills'],\n deaths : pobj['stats']['deaths'],\n assists : pobj['stats']['assists'],\n minions : pobj['stats']['totalMinionsKilled'] + pobj['stats']['neutralMinionsKilled']}; \n stats['kda'] = (stats['de...
[ "0.72927684", "0.7165658", "0.6958433", "0.69053894", "0.68771285", "0.6772758", "0.6687818", "0.665749", "0.65954524", "0.65820694", "0.6578913", "0.6549825", "0.65158534", "0.6496207", "0.6491558", "0.64836776", "0.64787793", "0.64165026", "0.6387239", "0.6374117", "0.63716...
0.74524224
0
Returns the number of rebounds associated with the player that has the largest shoe size
function bigShoeRebounds() { let arr = Object.values(players()); let shoeBox = [] for (let val of arr) { let shoe = val.shoe; shoeBox.push(shoe); } let biggestShoe = Math.max(...shoeBox); for (let val of arr) { let shoe = val.shoe; if (shoe === biggestShoe) { return val.rebounds; }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function shoeSize(playerInput) {\n const shoe = players()[playerInput].shoe;\n return `${playerInput} has size ${shoe} shoes.`\n}", "function getMaxScore()\r\n{\r\n\tmaxScore = 0;\r\n\tfor(var i = 0; i < worms.length; i++)\r\n\t{\r\n\t\tif(players[i] && worms[i].score > maxScore)\r\n\t\t{\r\n\t\t\tmaxScore = w...
[ "0.6331264", "0.6133299", "0.60174876", "0.6011141", "0.5864384", "0.5863355", "0.5810833", "0.57772857", "0.57098705", "0.56539786", "0.56117076", "0.55762315", "0.55522496", "0.55393684", "0.5498117", "0.548547", "0.544859", "0.54471004", "0.5443521", "0.5438094", "0.543570...
0.81472224
0
Which player has the most points?
function mostPointsScored() { let arr = Object.values(players()); let pointsArr = []; for (let val of arr) { let points = val.points; pointsArr.push(points); } let mostPoints = Math.max(...pointsArr); for (let players of playersArray()) { console.log(players[0]) if (players[1].points === mos...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function WhoDrankMost() {\n\t\tvar players = Session.get(\"players\");\n\t\tvar mostDrinks = 0;\n\n\t\t$.each(players, function(i, player){\n\t\t\tif (player.numDrinks > mostDrinks) {\n\t\t\t\tmostDrinks = player.numDrinks;\n\t\t\t\tSession.set(\"playerMostDrinks\", player.playerName);\n\t\t\t\tSession.set(\"playe...
[ "0.67672276", "0.66209215", "0.6515005", "0.65126544", "0.6475943", "0.6406427", "0.63727725", "0.6281341", "0.6275112", "0.6269298", "0.62640387", "0.6262158", "0.623915", "0.617556", "0.617406", "0.6166632", "0.61509585", "0.61495215", "0.6140836", "0.612687", "0.60954773",...
0.82574964
0
Chess Piece Pawn Constructor
function ChessPiecePawn(config) { ChessPiecePawn.superclass.constructor.apply(this, arguments); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Chessboard(cols, rows) {\n\tthis.board = new Array(rows);\n\tthis.blackPieces = new Array(16);\n\tthis.whitePieces = new Array(16);\n\t\n\tthis.pieceSelected = null;\t\n\tthis.turn = WHITE;\n\t\t\n\tvar color = BLACK_SQUARE_COLOR;\n\t\n\t// Initialize the board:\n\tfor(var i = 0; i < rows; i++) {\n\t\tthi...
[ "0.7463455", "0.7190993", "0.7168555", "0.7149941", "0.7101587", "0.69761515", "0.6967322", "0.69408476", "0.6889527", "0.6775162", "0.6764588", "0.67181176", "0.6679019", "0.65846276", "0.6575821", "0.65531176", "0.65461534", "0.6493158", "0.6490003", "0.6478949", "0.6476276...
0.80059993
0
Chess Piece Bishop Constructor
function ChessPieceBishop(config) { ChessPieceBishop.superclass.constructor.apply(this, arguments); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Chessboard(cols, rows) {\n\tthis.board = new Array(rows);\n\tthis.blackPieces = new Array(16);\n\tthis.whitePieces = new Array(16);\n\t\n\tthis.pieceSelected = null;\t\n\tthis.turn = WHITE;\n\t\t\n\tvar color = BLACK_SQUARE_COLOR;\n\t\n\t// Initialize the board:\n\tfor(var i = 0; i < rows; i++) {\n\t\tthi...
[ "0.72279197", "0.6807871", "0.6710372", "0.6670424", "0.659498", "0.6586022", "0.6416403", "0.6250996", "0.62291014", "0.6222614", "0.62094605", "0.61876774", "0.6151661", "0.6055125", "0.60393053", "0.5997894", "0.59670883", "0.5964026", "0.5928126", "0.5909601", "0.5896055"...
0.74085176
0
Chess Piece knight Constructor
function ChessPieceKnight(config) { ChessPieceKnight.superclass.constructor.apply(this, arguments); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Chessboard(cols, rows) {\n\tthis.board = new Array(rows);\n\tthis.blackPieces = new Array(16);\n\tthis.whitePieces = new Array(16);\n\t\n\tthis.pieceSelected = null;\t\n\tthis.turn = WHITE;\n\t\t\n\tvar color = BLACK_SQUARE_COLOR;\n\t\n\t// Initialize the board:\n\tfor(var i = 0; i < rows; i++) {\n\t\tthi...
[ "0.71107715", "0.6843481", "0.67790294", "0.6635031", "0.65068567", "0.6434941", "0.6392565", "0.6383698", "0.6280219", "0.62348145", "0.6155136", "0.61283445", "0.6106915", "0.60850805", "0.6049079", "0.60348696", "0.6003426", "0.599326", "0.58788186", "0.58329165", "0.58297...
0.80069655
0
Chess Piece Queen Constructor
function ChessPieceQueen(config) { ChessPieceQueen.superclass.constructor.apply(this, arguments); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Chessboard(cols, rows) {\n\tthis.board = new Array(rows);\n\tthis.blackPieces = new Array(16);\n\tthis.whitePieces = new Array(16);\n\t\n\tthis.pieceSelected = null;\t\n\tthis.turn = WHITE;\n\t\t\n\tvar color = BLACK_SQUARE_COLOR;\n\t\n\t// Initialize the board:\n\tfor(var i = 0; i < rows; i++) {\n\t\tthi...
[ "0.72353756", "0.68626064", "0.67478156", "0.6639533", "0.66333014", "0.6609827", "0.65512836", "0.6522546", "0.64598495", "0.6323834", "0.6299455", "0.6292059", "0.62710243", "0.62176937", "0.6213573", "0.6201781", "0.6140631", "0.6084584", "0.60122335", "0.60071707", "0.599...
0.7238489
0
blockWebsite: Change inner HTML of HTML tags to tell the user they can not go to this site
function blockWebsite() { var d = new Date(); var n = d.getFullYear(); document.getElementsByTagName("html")[0].innerHTML = "<body><center><h1>STOP PROCRASTINATION " + n + "</h1><img src='http://www.mememaker.net/static/images/memes/4467057.jpg' /></center></body>"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function unblockSiteOverlay(tab) {\n chrome.tabs.executeScript(tab.id, {\n code: `document.body.className = document.body.className.replace( \"blockedSite\", '' );\n var blockElementExists = document.getElementById(\"SitekeeperOverlay\");\n if(blockElementExists){\n d...
[ "0.5818013", "0.5784788", "0.57381606", "0.5703037", "0.5663379", "0.5656305", "0.5625273", "0.5541166", "0.5539511", "0.55323315", "0.55247647", "0.55130124", "0.545024", "0.5435694", "0.5383877", "0.5329142", "0.5324254", "0.53219455", "0.5303193", "0.52847874", "0.52847874...
0.65671414
0
Adds a new notification and sends it to server as a string
addNewNotification(note) { const notification = { type: "postNotification", content: note }; this.socket.send(JSON.stringify(notification)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function newNotification(str) {\n notifier.notify({\n title: 'Bitmark Node App',\n message: `${str}`,\n icon: path.join(__dirname, 'assets/icons/app_icon.png'),\n sound: true,\n wait: false\n });\n}", "function newNotification(str){\n\tnotifier.notify(\n\t\t{\n\t\t\ttitle: \"Bitmark Node\",\n\t\...
[ "0.7301505", "0.7070482", "0.68764937", "0.6754684", "0.6661712", "0.66009605", "0.6486318", "0.64638174", "0.6451079", "0.6423146", "0.6418135", "0.6415865", "0.6412938", "0.64013493", "0.63962203", "0.63821805", "0.63776", "0.63742", "0.6374036", "0.6356075", "0.6354082", ...
0.7818868
0
If the old user name doesn't match the new user name then adds a new notification; user name gets set to newUserName
addNewUserName(newUserName) { if (this.state.username !== newUserName) { this.addNewNotification( `${this.state.username || "anonymous"} changed their name to ${newUserName}` ); this.setState({ username: newUserName }); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "makeNotification(newUsername) {\n const oldName = this.state.currentUser.name;\n return {\n type: 'postNotification',\n content: `User ${oldName} changed their name to ${newUsername}`\n }\n }", "function usernameChange(oldUser, newUser) {\n // Get guild and member\n const guild = newUse...
[ "0.7457272", "0.703678", "0.6994179", "0.6783607", "0.663874", "0.66239125", "0.65361524", "0.6366355", "0.6266057", "0.6213294", "0.6205141", "0.61369485", "0.61338323", "0.610179", "0.6071387", "0.60643315", "0.6049414", "0.60468996", "0.6023078", "0.6012766", "0.59691703",...
0.74141306
1
Merges an item in a submenu aware way such that new items are always appended to the bottom of existing menus where possible.
merge (menu, item) { return MenuHelpers.merge(menu, item) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addSubMenus(parentItem, isSubTree) { var submenuHtml = \"\"; if (parentItem.items != undefined && parentItem.items.length > 0) { if (parentItem.type == \"link-list-image\") { submenuHtml += \"<ul class=\\\"mm-product-list\\\">\"; jQueryBuddha.each(parentItem.items, function (pos, subitem) { var href = (su...
[ "0.6293506", "0.61012626", "0.599644", "0.5926493", "0.5878006", "0.58278346", "0.5821187", "0.58050275", "0.5757325", "0.5689248", "0.5512793", "0.5512485", "0.54895085", "0.54848254", "0.547527", "0.5429309", "0.54283786", "0.5425892", "0.54123694", "0.53890514", "0.538182"...
0.7729412
0
Adds the Material Design fonts to the index HTML file.
function addFontsToIndex(options) { return async (host) => { const workspace = await (0, workspace_1.getWorkspace)(host); const project = (0, schematics_2.getProjectFromWorkspace)(workspace, options.project); const projectIndexFiles = (0, schematics_2.getProjectIndexFiles)(project); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderNewFont () {\n \n var item = chooseNumber();\n\n currentFontFamily = fontData.items[item].family;\n currentFontLink = fontData.items[item].files.regular;\n\n //append new stylesheet to head\n $(\"head\").append(\"<link href='https://fonts.googleapis.com/css...
[ "0.59510213", "0.58644587", "0.5751063", "0.5747544", "0.56748146", "0.562479", "0.54296654", "0.53791016", "0.537725", "0.53378755", "0.5331092", "0.52857244", "0.52696604", "0.5245076", "0.52426773", "0.52283096", "0.5225488", "0.5202283", "0.5198996", "0.51769745", "0.5166...
0.6750377
0
Rank the card with given value and suit.
function rank_card_new(/*char */value, /*char */suit) { let v = values['c'+value]; let s = suits['c'+suit]; if(v === undefined || v === null || s === undefined || s === null){ console.log("Warning: bad input value=%d, suit=%d",value.charCodeAt(0),suit.charCodeAt(0)); } else{ return (v*NSUITS) + s; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rankCard(card) {\n switch (card.value) {\n case \"jack\":\n return 11;\n break;\n case \"queen\":\n return 12;\n break;\n case \"king\":\n return 13;\n break;\n case \"ace\":\n return 14;\n break;\n default:\n return card.value;\n }\n}", "fun...
[ "0.78201926", "0.70177233", "0.6787049", "0.6654584", "0.6618599", "0.6591788", "0.6582285", "0.6527453", "0.6375971", "0.6304342", "0.62678516", "0.61555547", "0.613398", "0.61151457", "0.6114382", "0.610657", "0.5996412", "0.5983265", "0.59807163", "0.5954256", "0.59506273"...
0.7232595
1
Return the suit and value of the given card.
function /*char*/ suit(/*int*/ card) { //return( suits['c'+(card % NSUITS)] ); return( suits[card % NSUITS] ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayCardFromDeck(card){\n return card.value + \" of \" + card.suit;\n}", "function getSuit() {\n\tvar s = document.querySelectorAll(\"input[name= 'suit']:checked\")[0].getAttribute('value');\n\treturn cards[s][0];\n}", "get_value(card){\n var val = card.slice(0, card.length-1);\n i...
[ "0.7291341", "0.72881705", "0.7269432", "0.7256156", "0.72324353", "0.72082716", "0.71800494", "0.71770626", "0.7149146", "0.7120367", "0.7044528", "0.70110697", "0.6991935", "0.69706243", "0.69108814", "0.6825148", "0.6823255", "0.6822216", "0.6806575", "0.678586", "0.677405...
0.7658984
0
sets new characters to use in the alphabet returns the shuffled alphabet
function characters(newCharacters) { if (newCharacters !== undefined) { alphabet.characters(newCharacters); } return alphabet.shuffled(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function characters(newCharacters) {\r\n if (newCharacters !== undefined) {\r\n alphabet_1.characters(newCharacters);\r\n }\r\n\r\n return alphabet_1.shuffled();\r\n}", "function characters(newCharacters) {\n if (newCharacters !== undefined) {\n alphabet.characters(newCharacters);\n ...
[ "0.77530134", "0.760784", "0.760784", "0.760784", "0.760784", "0.760784", "0.760784", "0.760784", "0.760784", "0.760784", "0.760784", "0.757705", "0.75674534", "0.756135", "0.7457495", "0.73275924", "0.7134231", "0.7065652", "0.70391905", "0.6936314", "0.68379194", "0.68299...
0.7667996
1
Decode the id to get the version and worker Mainly for debugging and testing.
function decode(id) { var characters = alphabet.shuffled(); return { version: characters.indexOf(id.substr(0, 1)) & 0x0f, worker: characters.indexOf(id.substr(1, 1)) & 0x0f }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function decode(id) {\n var alphabet = characters();\n return {\n version: alphabet.indexOf(id.substr(0, 1)) & 0x0f,\n worker: alphabet.indexOf(id.substr(1, 1)) & 0x0f\n };\n}", "function decode(id) {\n\t var characters = alphabet_1.shuffled();\n\t return {\n\t version: charac...
[ "0.7147793", "0.70586675", "0.7037711", "0.69703203", "0.69703203", "0.6828822", "0.5719722", "0.57194364", "0.56802547", "0.55071783", "0.548436", "0.54818076", "0.5446712", "0.54279286", "0.5417461", "0.54107285", "0.54072225", "0.5359697", "0.5320781", "0.5320781", "0.5320...
0.724312
0
The backend method that is called during the patternlabpatternwriteend event. Responsible for looking for a companion filetype file alongside a pattern file and outputting it if found.
function findTab(patternlab, pattern) { //exit if either of these two parameters are missing if (!patternlab) { console.error('plugin-node-json-tab: patternlab object not provided to findTab'); process.exit(1); } if (!pattern) { console.error('plugin-node-json-tab: pattern object not provided to f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function registerEvents( patternlab ) {\n\n //register our handler at the appropriate time of execution\n patternlab.events.on('patternlab-pattern-write-end', onPatternIterate);\n\n}", "function watch(pattern, out) {\n gulp.watch(pattern).on('change', () => gulp.src(pattern).pipe(gulp.dest(path.resolve(...
[ "0.5549837", "0.50393206", "0.4948548", "0.48001748", "0.47997704", "0.47476667", "0.47300515", "0.4699835", "0.4619846", "0.46174526", "0.4558335", "0.4471761", "0.44655895", "0.44604814", "0.4431158", "0.442613", "0.44186053", "0.4409526", "0.43955216", "0.43869948", "0.438...
0.56875515
0
A `class` to create `joke` instances
function Joke(jokeText, container) { this.jokeText = jokeText; this.container = container; this.render = function render() { // make an `li` element this.element = document.createElement('li'); // put the joke in it this.element.innerText = this.jokeText; // put the item in the list this.c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Kitten(name, age) {\n this.name = name;\n this.age = age;\n\n //we can eliminate this redundancy by using the constructor's prototype\n // this.meow = function () {\n // console.log(this.name + ' says \"MEOW!\"');\n // };\n}", "function TruckFactory() {}", "function TruckFactory(...
[ "0.61266416", "0.5805586", "0.5805586", "0.5772815", "0.5741858", "0.5733324", "0.5719478", "0.5718734", "0.57108307", "0.56575155", "0.5587848", "0.55724955", "0.557221", "0.5515261", "0.551389", "0.5506969", "0.5471312", "0.5468085", "0.54509264", "0.5436425", "0.5428117", ...
0.64808184
0
function to generate the bomb board of a specified size and number of bombs
static generateBombBoard(numberOfRows, numberOfColumns, numberOfBombs){ let board = []; for (let rowIndex = 0; rowIndex < numberOfRows; rowIndex++){ let row = []; for (let colIndex = 0; colIndex < numberOfColumns; colIndex++){ row.push(null); } board.push(row); } //plac...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static generateBombBoard(numberofRows, numberofColumns, numberOfBombs) {\n const board = [];\n for (let i = 0; i < numberofRows; i++) {\n let row = [];\n for (let c = 0; c < numberofColumns; c++) {\n row.push(null);\n };\n board.push(row);\n };\n\n let numberOfBombsPlaced = 0...
[ "0.7921204", "0.78132004", "0.7798697", "0.7765802", "0.7718295", "0.75817645", "0.7574194", "0.75506717", "0.736853", "0.7214207", "0.7113467", "0.7098071", "0.70676786", "0.7049365", "0.70009106", "0.6944547", "0.69370633", "0.68925315", "0.68765503", "0.6815889", "0.677305...
0.78417945
1
Filters stories a given label
function filterStories(id, label) { return new Promise((resolve, reject) => { tracker .project(id) .stories .all({ with_label: label }, (err, stories) => { if(err || !stories) { reject('No such project') } resolve(stories) }) }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function filterMovies(titlename) {\r\n const filteredMovies = movies.filter(word => word.Title.includes(titlename));\r\n addMoviesToDom(filteredMovies);\r\n}", "function filterProjectsBy(evt) {\n var category = evt.target.value;\n $('.project-filterable').hide();\n if (category) {\n $('.' + category)...
[ "0.64155805", "0.6041689", "0.60317796", "0.59633106", "0.59505", "0.57994974", "0.57449245", "0.5644761", "0.5624597", "0.56155336", "0.56133515", "0.560322", "0.55854625", "0.5560939", "0.5559936", "0.55541974", "0.55215317", "0.55214775", "0.5518188", "0.5517338", "0.54951...
0.70958525
0
Instantiates the given variables in the query.
_substituteVariables(query, variables, definedParameters) { const keys = Object.keys(variables); if (keys.length > 0) { let newQuery = query; keys.forEach(key => { let val = variables[key]; if (definedParameters[key].type === 'integer') { const intVal = parseInt(val); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function constructStatement(){\n\n }", "constructor(result, vars = []) {\n this.result = result;\n this.vars = vars;\n // this.result = result;\n // this.vars = vars;\n }", "_setupQueries(queries = {}) {\n this.queries = new FunctionsDict(queries);\...
[ "0.54456186", "0.5359265", "0.5164038", "0.5158165", "0.5133072", "0.50948584", "0.5088229", "0.5074704", "0.5061307", "0.5044552", "0.49910808", "0.49880427", "0.49548692", "0.49436283", "0.49300277", "0.4898283", "0.48839533", "0.48304042", "0.48254147", "0.48186997", "0.47...
0.56139666
0
Sorts the array by the chosen selectors and given order (no order given === asc).
_sortBy(array, selectors) { return array.concat().sort((a, b) => { for (let selector of selectors) { let reverse = selector.order ? -1 : 1; a = selector.value ? JP.query(a, selector.value)[0] : JP.query(a,selector)[0]; b = selector.value ? JP.query(b, selector.value)[0] : JP.query(b,s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sort(list, orderType, selectTag) {\n if (orderType === \"descending\") {\n return list.sort((a, b) => {\n const sideA = a[selectTag].toString().toLowerCase();\n const sideB = b[selectTag].toString().toLowerCase();\n\n if (sideA > sideB) {\n return 1;\n } else i...
[ "0.6759098", "0.6616251", "0.65981835", "0.63515097", "0.63502574", "0.63502574", "0.6347205", "0.6335887", "0.62904817", "0.6265325", "0.62579286", "0.62492096", "0.6221137", "0.6216024", "0.6192673", "0.61715966", "0.6158582", "0.6154995", "0.61534125", "0.61506766", "0.610...
0.82716525
0
This function is used to test the position of the containers We can use it then to troubleshoot when to set a container as active
function displayContainerInfo() { const containers = document.querySelectorAll('.banner,.section') console.clear(); for(let cont of containers) { const props = cont.getBoundingClientRect(); console.log(props); if (isOnTop(props.y)) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setPosition() {\r\n\t\t if (container) {\r\n\t\t if (x < container.left) {\r\n\t\t x = container.left;\r\n\t\t } else if (x > container.right - width) {\r\n\t\t x = container.right - width;\r\n\t\t }\r\n\t\t if (y < container.top) {\r\n\t\t ...
[ "0.6761594", "0.6460882", "0.64291", "0.63743603", "0.6113375", "0.60893255", "0.6060552", "0.60258126", "0.600974", "0.6008159", "0.5912384", "0.58871496", "0.5870867", "0.5832835", "0.5827619", "0.5816876", "0.5804594", "0.5793318", "0.5768176", "0.5765108", "0.5738018", ...
0.68886393
0
Adds a window to be managed and shows it on the map.
static addWindow(window) { window.setPosition(32 * (this._windows.length + 1), 32 * (this._windows.length + 1)); window.setIndex(this.startIndex + this._windows.length); this._windows.push(window); window.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayAddRoomWindow(){\r\n if(!AddRoomWindow.isVisible()){\r\n resetAddRoomForm();\r\n AddRoomWindow.show();\r\n } else {\r\n AddRoomWindow.toFront();\r\n }\r\n \r\n \r\n }", "function createCreateAddWindow (){\n addWindow = new BrowserWindow({\n width : 500,\n height: 3...
[ "0.6544208", "0.6477168", "0.6452329", "0.64507246", "0.64490926", "0.6447672", "0.6433286", "0.64317113", "0.64227664", "0.6422216", "0.64173687", "0.6411626", "0.6390221", "0.63813734", "0.63644785", "0.6344863", "0.634403", "0.63382196", "0.6277841", "0.627162", "0.6181731...
0.71520084
0
Removes a window from the map.
static removeWindow(window) { let index = this._windows.indexOf(window); this._windows.splice(index, 1)[0].dispose(); while (index < this._windows.length) { this._windows[index].setIndex(this.startIndex + index); index++; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeWindow() {\n var __windowArray = JSON.parse(localStorage.getItem(_LOCALSTORAGE_KEY));\n for (var i = 0, length = __windowArray.length; i < length; i++) {\n if (__windowArray[i].id === _windowId.id) {\n __windowArray.splice(i, 1);\n ...
[ "0.68309593", "0.67736554", "0.6685779", "0.64720654", "0.6441206", "0.62410325", "0.62347114", "0.6133009", "0.6122087", "0.6048686", "0.60123837", "0.5988479", "0.5915151", "0.59078294", "0.58807904", "0.5873903", "0.5843473", "0.5838591", "0.5808943", "0.5806795", "0.57832...
0.7395392
0
Moves a window to the top, drawing it over the others.
static moveToTop(window) { let index = this._windows.indexOf(window); this._windows.push(this._windows.splice(index, 1)[0]); while (index < this._windows.length) { this._windows[index].setIndex(this.startIndex + index); index++; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_makeTop(){\n\t\tvar render_group = DOS.group;\n\t\tvar min_pos = DOS.min,\n\t\t\tmax_pos = DOS.max;\n\n\t\t// Share y position with aligment.js\n\t\tHaploWindow.min_node_placement_y = min_pos.y;\n\t\tHaploWindow._minpos = min_pos;\n\t\tHaploWindow._maxpos = max_pos;\n\n\t\t// White Rect\n\t\tHaploWindow._top.setP...
[ "0.68871546", "0.6872244", "0.656452", "0.63560086", "0.6219841", "0.6058414", "0.594219", "0.5909479", "0.5905571", "0.5904647", "0.5882748", "0.5833127", "0.58260703", "0.5825761", "0.581658", "0.5811974", "0.5810106", "0.5800029", "0.57785267", "0.5760207", "0.5743011", ...
0.75933254
0
Create mappings from abbreviations to page links, from the page HTML. Also create the abbreviation tags used for autocomplete.
function mapAbbrToLinks() { $('li>a').each(function () { var link = $(this); // match department_name (abbr) var abbrMatch = link.text().match(/\(([^()]*)\)$/); if (abbrMatch) { var abbr = abbrMatch[1].trim().toLowerCase().replace(/\s/, ' '); if (abbr.split(" ").length <= 2 && !abbrExists(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tweaklinks(doc)\n{\n // Do not touch these link titles\n let ignoreTitles=[\"Lägg till\",\"Ta Bort\"];\n let mapfixedlinks = [\n { href: 'https://www.avanza.se/hall-koll/min-borsskarm.html', name: 'borsskarm' },\n { href: 'https://www.avanza.se/min-ekonomi/oversikt.html', name: 'oversikt' }...
[ "0.56510526", "0.5474405", "0.52396744", "0.5193602", "0.51810086", "0.5138617", "0.513046", "0.5120208", "0.5109167", "0.5105308", "0.51049167", "0.5057963", "0.5042103", "0.49770886", "0.4930402", "0.4917474", "0.4904322", "0.4873664", "0.4872006", "0.4868185", "0.48646602"...
0.69368005
0
Parse the input string and return an object with department and courseNumber properties filled in.
function parseInput(str) { var input = {}; var tokens = str.trim().toLowerCase().split(/\s/); var halves = mergeTokens(tokens); if (!validateInput(halves)) return null; input['department'] = halves[0]; input['courseNumber'] = halves[1]; return input; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseCourse(courseStr) {\n // Get title\n let title = null;\n let index = courseStr.indexOf('-');\n if (index !== -1) {\n title = courseStr.slice(index + 1).trim();\n courseStr = courseStr.slice(0, index).trim();\n }\n\n // Remove unnecessary whitespace\n courseStr = courseStr.replace(/\\s/g,...
[ "0.68188524", "0.6317038", "0.53290147", "0.5279146", "0.52781963", "0.52521604", "0.524952", "0.51320475", "0.5060528", "0.5036848", "0.5036374", "0.50052494", "0.49979362", "0.49943665", "0.49936002", "0.49884254", "0.49780256", "0.496395", "0.49525017", "0.4933593", "0.491...
0.75148505
0
Return a copy of the string with the whitespace removed.
function removeWhitespace(str) { return str.replace(/\s/, ''); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeWhitespace(str) {\n\tstr = str.replace(/\\s/gi, '');\n\treturn str;\n}", "function removeSpaces(string) {\n return string.replace(/\\s+/g, \"\"); \n}", "function unspace(string) {\n return string.replace(/\\r\\n|\\n| /g, '')\n}", "function strip(s) {\n\t\treturn s.replace(/^\\s+|\\s+$/g,'');...
[ "0.73795134", "0.72628045", "0.72428554", "0.7201596", "0.720033", "0.717956", "0.71445495", "0.7070238", "0.7056389", "0.7054835", "0.7018751", "0.7018751", "0.7008218", "0.6994768", "0.69888103", "0.6961282", "0.69284946", "0.6924799", "0.6894414", "0.68743914", "0.68288326...
0.7403938
0
Toggle the error state of the search box.
function toggleError(state) { state ? $('#classInput').addClass('error') : $('#classInput').removeClass('error'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displaySearchError() {\n $(\"#search-error\").show();\n hideLoader();\n}", "function stateChangeError() {\n ctrl.isSplashShowed.value = false;\n }", "function searchFailed() {\n $('#status').html(\"Query not found\");\n $('#status').css('color', 'red');\n queryPosition = q...
[ "0.65486497", "0.64633363", "0.6417926", "0.6328249", "0.6291324", "0.6253191", "0.62389576", "0.605131", "0.60022277", "0.6001097", "0.59921354", "0.5973743", "0.5972735", "0.59696764", "0.5944694", "0.59306425", "0.5887205", "0.5876354", "0.58626837", "0.58532053", "0.57896...
0.697862
0
taken from following Utility function that converts a URL object into an ordinary options object as expected by the http.request and https.request APIs.
function urlToOptions(url) { const options = { protocol : url.protocol, hostname : typeof url.hostname === 'string' && url.hostname.startsWith('[') ? url.hostname.slice(1, -1) : url.hostname, hash : url.hash, search : url.search, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function urlToOptions(url) {\n var options = {\n protocol: url.protocol,\n hostname: typeof url.hostname === 'string' && url.hostname.startsWith('[') ? url.hostname.slice(1, -1) : url.hostname,\n hash: url.hash,\n search: url.search,\n pathname: url.pathname,\n path: \"...
[ "0.7846003", "0.7829318", "0.7704806", "0.7236717", "0.7016924", "0.6682879", "0.6614923", "0.6545917", "0.65033495", "0.6424481", "0.6390846", "0.6360205", "0.63055944", "0.62789303", "0.6216364", "0.6153993", "0.6152814", "0.6152814", "0.6152814", "0.6152814", "0.6152814", ...
0.7855813
0
Respond to options changes on the Tracer. Note that `modified` is the options that have changed in this call, along with their previous and new values. `current` is the full set of current options including the newly modified values.
_handleOptions(modified, current) { // Automatically add the service host itself to the list of exclusions // to avoid reporting on the reports themselves let serviceHost = modified.collector_host; if (serviceHost) { this._addServiceHostToExclusions(current); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "optionsUpdateHook() { }", "slottedOptionsChanged(prev, next) {\n super.slottedOptionsChanged(prev, next);\n this.setProxyOptions();\n this.updateValue();\n }", "function optionChanged(changed){\n charts(changed);\n metadata(changed);\n}", "function extendOptions(newOptions, currentOptions) {\...
[ "0.6312302", "0.56634426", "0.55563754", "0.55473274", "0.5541916", "0.5455082", "0.5455082", "0.5450873", "0.5433212", "0.5423887", "0.54237294", "0.54090065", "0.54090065", "0.540834", "0.5351373", "0.532674", "0.532674", "0.532674", "0.532674", "0.532674", "0.532674", "0...
0.6464702
0
Search for global bloggers in single search
function searchForGlobalBloggers(bloggerID, mobile) { if ( mobile == undefined ) { mobile = 0; } //Send request var requestType; if (window.XMLHttpRequest) { requestType = new XMLHttpRequest(); } else { requestType = new ActiveXObject("Microsoft.XMLHTTP"); } if ( mobile == 0 ) { requestType.open("POST", "...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function searchBlogger() {\n //hide all blogger tiles\n var table = document.querySelector('#blogger');\n var rows = Array.prototype.slice.call(table.querySelectorAll('tbody tr.catShow'));\n rows.forEach(function(row) {\n row.classList.add('searchGoneR');\n }...
[ "0.64058244", "0.59874785", "0.57932115", "0.5702458", "0.5586812", "0.548557", "0.54476327", "0.53400147", "0.53153974", "0.5301488", "0.5299623", "0.52839464", "0.52087784", "0.5203919", "0.52001303", "0.51834184", "0.5170201", "0.5164982", "0.51639456", "0.5148627", "0.513...
0.7084261
0
Search for global clubs in single search
function searchForGlobalClubs(clubID, mobile) { if ( mobile == undefined ) { mobile = 0; } //Send request var requestType; if (window.XMLHttpRequest) { requestType = new XMLHttpRequest(); } else { requestType = new ActiveXObject("Microsoft.XMLHTTP"); } if ( mobile == 0 ) { requestType.open("POST", "Univer...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function searchTeam(term) {\n return search(term, 'soccer club', true);\n}", "function search(country) {\n \n searchFunnyVideos(country);\n searchAboutVideos(country);\n \n}", "function search() {\r\n\t\tlet query = $(\"#searchText\").val();\r\n\t\tquery = query.toLowerCase().trim();\r\n\r\n\t\tlet matc...
[ "0.65053076", "0.6092705", "0.56878924", "0.5639777", "0.5625414", "0.56126124", "0.5530803", "0.55040985", "0.5487249", "0.5478795", "0.5462516", "0.542779", "0.5412913", "0.5385655", "0.5368709", "0.5364558", "0.5354282", "0.5341349", "0.5324505", "0.5292252", "0.5289835", ...
0.7158241
0
Search for global plugins in single search
function searchForGlobalPlugins(pluginID, mobile) { if ( mobile == undefined ) { mobile = 0; } //Send request var requestType; if (window.XMLHttpRequest) { requestType = new XMLHttpRequest(); } else { requestType = new ActiveXObject("Microsoft.XMLHTTP"); } if ( mobile == 0 ) { requestType.open("POST", "Un...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static register() {\n __WEBPACK_IMPORTED_MODULE_2__common_plugin__[\"a\" /* PLUGINS */][\"FullTextSearch\"] = FullTextSearch;\n }", "registerPlugins() {\r\n _(this.plugins)\r\n .pickBy(plugin => {\r\n return plugin.register;\r\n })\r\n .forEach(plugin => {\r\n this.slick...
[ "0.61741847", "0.597546", "0.59291637", "0.58370805", "0.5800862", "0.5800862", "0.5779484", "0.56671834", "0.56546164", "0.565204", "0.55224407", "0.54975814", "0.54831755", "0.5477892", "0.5465969", "0.5397664", "0.5379363", "0.5377544", "0.5355461", "0.5345987", "0.5326084...
0.72548777
0
Notifications Show notification date
function showNotificationDate(date) { $("#notifications").children("#title").children("h2").html(date); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function show() {\n var time = /(..)(:..)/.exec(new Date()); // The prettyprinted time.\n var hour = time[1] % 12 || 12; // The prettyprinted hour.\n var period = time[1] < 12 ? 'a.m.' : 'p.m.'; // The period of the day.\n new Notification(hour + time[2] + ' ' + period, {\n icon: '48.png',...
[ "0.73672426", "0.6609888", "0.65887725", "0.65202844", "0.6419667", "0.6398147", "0.63048714", "0.6284929", "0.62696147", "0.62188846", "0.6186301", "0.6172515", "0.6156184", "0.6144499", "0.61385435", "0.61215895", "0.61191654", "0.6111707", "0.6108506", "0.60952437", "0.605...
0.77432024
0
Notifications Clear date container
function clearDateContainer() { $(".pushNotification").children("#title").children("h2").html(""); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clear() {\n setNotification(\"\");\n }", "clearDate() {\n this.set('date', null);\n }", "function datepickerClear() {\n vm.thing.findings[0].date = null;\n }", "clearNotifications() {\n if (!this._isEmpty) {\n this._notifContainerElem.empty();\n ...
[ "0.71251017", "0.7036932", "0.6868731", "0.67744064", "0.672402", "0.6681282", "0.66369843", "0.65720993", "0.6431075", "0.64170873", "0.63594955", "0.6339521", "0.63126683", "0.6302779", "0.62551796", "0.62186754", "0.61409044", "0.6112256", "0.610705", "0.6074106", "0.60739...
0.7837265
0
Remove Report user Container
function removeReportContainer() { $("#report-container").fadeOut("fast"); setTimeout(function() { $("#report-container").remove(); }, 250); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeUserSite() {\n\t$(this).parent().remove();\n}", "removeReport(report) {\n while (_reports.findIndex((r) => r.id == report.id) != -1) {\n let index = _reports.findIndex((r) => r.id == report.id);\n _reports.splice(index, 1);\n this.setReports(_reports);\n }\n }", "function r...
[ "0.61286914", "0.59271765", "0.59141916", "0.58771086", "0.5844158", "0.58370787", "0.5820868", "0.5819738", "0.57945764", "0.5774457", "0.56587493", "0.56564826", "0.56350505", "0.56350505", "0.5555499", "0.5550695", "0.5531014", "0.5528424", "0.5518487", "0.55064714", "0.55...
0.68795514
0
Load my membershiped clubs
function loadMyMembershipedClubs(mobile, clubId) { if (mobile == 0) { src = "../images/loadSign_white.gif"; } else if (mobile == 1) { src = "../../images/loadSign_white.gif"; } load_sign = "\ <div id='loader-1' class='loading-buffer-small'>\ <img src='"+src+"'/>\ </div>\ "; if (mobile == 0) { $("#members...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ClubManager(){}", "function loadMyRegisteredClubs(mobile, clubId) {\n\tif (mobile == 0) { src = \"../images/loadSign_white.gif\"; }\n\telse\n\tif (mobile == 1) { src = \"../../images/loadSign_white.gif\"; }\n\n\tload_sign = \"\\\n\t\t<div id='loadingSign'>\\\n\t\t\t<img src='\"+src+\"'/>\\\n\t\t</div>\\...
[ "0.64364386", "0.636639", "0.6324807", "0.6235585", "0.6117931", "0.6116251", "0.60775554", "0.606367", "0.60432386", "0.6029767", "0.59673977", "0.59640294", "0.59533715", "0.59283406", "0.58716226", "0.5841916", "0.5833124", "0.583299", "0.58062124", "0.5770192", "0.5749272...
0.65922594
0
Load Add Club Editor
function loadAddClubEditor(mobile) { build = "\ <div id='editorContainer'>\ <div id='editor-fields'>\ <input type='text' id='club-name' placeholder='Name of your Club..' />\ <div id='color-picker-container'>\ <label>Color of your Club</label>\ <span id='blue' class='color-box checked' onclick='c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "load()\n {\n this.replaceTextArea();\n this.createCustomButtons();\n if (this.config.CKEditor.editorData !== undefined) {\n this.oEditor.setData(this.config.CKEditor.editorData);\n }\n if (this.config.RichFilemanager !== undefined) {\n this.editor.on('dia...
[ "0.6363903", "0.6205312", "0.61191636", "0.61191636", "0.6029142", "0.60057235", "0.59793574", "0.5978226", "0.59356916", "0.5845181", "0.58161366", "0.5808433", "0.58084023", "0.57697463", "0.57429004", "0.57429004", "0.57429004", "0.5706704", "0.5673796", "0.5639966", "0.56...
0.72309214
0
Unload Add Club Editor
function unloadAddClubEditor() { $("#editorContainer").fadeOut("fast"); setTimeout(function(){ $("#editorContainer").remove(); }, 150); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "uninstall() {\n this._destroyEditor()\n }", "function unloadEditorContainer() {\n\t$(\"#editorContainer\").fadeOut(\"fast\");\n\tsetTimeout(function(){ $(\"#editorContainer\").remove(); }, 150);\n}", "function EditorCleanup() {\n SwitchInsertCharToAnotherEditorOrClose();\n}", "Unload() {}", "removeEdi...
[ "0.65496635", "0.6535523", "0.6451514", "0.6410989", "0.62732875", "0.6202728", "0.6188498", "0.6167965", "0.61503947", "0.61374736", "0.61374736", "0.61374736", "0.61374736", "0.61374736", "0.60806847", "0.6072457", "0.5997124", "0.59897625", "0.5911558", "0.5906331", "0.590...
0.76914287
0
Load color picker clubs
function loadColorPickerClubs(mobile) { build = "\ <div id='editorContainer'>\ <div id='editor-fields' class='min-height-115'>\ <h1>Choose color for your club</h1>\ <div id='color-picker-container' class='no-border'>\ <span id='blue' class='color-box' onclick='changeClubColorCore(\"blue\", "+mobile+"...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initColorPicker() {\n\n\t\t\tif ($.fn.mColorPicker.init.replace == '[type=color]') {\n\n\t\t\t\t$('input').filter(function(index) {\n\t\t\t\t\treturn this.getAttribute(\"type\") == 'color';\n\t\t\t\t\t}).mColorPicker();\n\n\t\t\t\t\t$(document).bind('ajaxSuccess', function () {\n\n\t\t\t\t\t\t$('input').f...
[ "0.6681128", "0.6642189", "0.654555", "0.6538396", "0.63805616", "0.63494164", "0.6334132", "0.62946475", "0.62507373", "0.62116456", "0.6177863", "0.6102619", "0.6099396", "0.60524774", "0.6050318", "0.6043248", "0.6036503", "0.6030211", "0.6017387", "0.59997797", "0.5990907...
0.76284194
0
Load search and invite engine
function loadSearchAndInviteEngine(mobile) { closeButton = ""; if ( mobile == 0 ) { closeButton = "<button type='button' class='hideButton' onclick='unloadSearchAndInviteEngine();'></button>" } else if ( mobile == 1 ) { closeButton = "<button class='hide-button' onclick='unloadSearchEngine(1);'><span>&#xf104</span>...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addSearchEngine() {\n window.external.AddSearchProvider(URL_BASE + \"/api/websearch.lua?\" + gxdomain)\n}", "async loadSearch() {\n let fs = this;\n return fetchJSONFile(fs.index, function(data) {\n //data = data.filter(function(page) {\n // return page.lang == ...
[ "0.6645946", "0.56898904", "0.56359303", "0.5531058", "0.5477299", "0.5459689", "0.53998893", "0.53998893", "0.5319513", "0.53153443", "0.5313433", "0.5307761", "0.5268568", "0.52660567", "0.52644825", "0.5256058", "0.5235169", "0.52098393", "0.52083117", "0.51215166", "0.512...
0.63383764
1
Unload search and invite engine
function unloadSearchAndInviteEngine() { $("#full-search-container").fadeOut("fast"); setTimeout(function(){ $("#full-search-container").remove(); }, 150); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "closeSearchSession() {\n\t\tthis.#reset_working_dataset()\n\t}", "unload(){\n zoteroRoam.interface.icon.setAttribute(\"status\", \"off\");\n zoteroRoam.data.items = [];\n zoteroRoam.data.collections = [];\n zoteroRoam.data.semantic.clear();\n zoteroRoam.data...
[ "0.6276123", "0.6165279", "0.61312824", "0.6085058", "0.60624766", "0.60268146", "0.6010551", "0.60004956", "0.5995804", "0.5991971", "0.5888434", "0.58768123", "0.5780179", "0.5751521", "0.574598", "0.5727553", "0.5718482", "0.57139724", "0.5697364", "0.56910145", "0.5689868...
0.7990198
0
Cancel join club request
function cancelJoinClubRequest(location, mobile) { getClubTable = window.location.href.split("?")[1].split("=")[0]; getClubId = window.location.href.split("?")[1].split("=")[1]; //Send request var requestType; if (window.XMLHttpRequest) { requestType = new XMLHttpRequest(); } else { requestType = new ActiveX...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cancel() {\n transition(DELETE, true);\n\n props.cancelInterview(props.id)\n .then(response => {\n transition(EMPTY);\n })\n .catch(error => {\n transition(ERROR, true);\n })\n }", "function cancelBids () {\n}", "cancel() {\n\n if (this.requestRunning === false) return;...
[ "0.65685755", "0.61162156", "0.60904694", "0.60809946", "0.6034019", "0.60319316", "0.60242283", "0.6016133", "0.6008191", "0.59783876", "0.5880083", "0.5854978", "0.58276975", "0.5811606", "0.5804516", "0.5784369", "0.57841384", "0.5768418", "0.57592255", "0.5753985", "0.572...
0.6503585
1
Unload full page container
function unloadFullPageContainer() { $("#full-page-container").fadeOut("fast"); setTimeout(function(){ $("#full-page-container").remove(); }, 150); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function destroyMoviePage() {\n $(\"#mainContainer\").empty();\n }", "function pageUnload()\n{\n\tparent.booContentLoaded = false; // This is to tell the program that this page is being unloaded from the browser.\n}", "function pageUnload()\n{\n\tparent.booContentLoaded = false; // This is to tell t...
[ "0.7300214", "0.7140007", "0.71393496", "0.7036579", "0.69829714", "0.69735247", "0.68888617", "0.682492", "0.67446357", "0.6681006", "0.66597813", "0.661846", "0.6606566", "0.6606566", "0.6606566", "0.6606566", "0.65693414", "0.65264416", "0.6506266", "0.65025884", "0.650098...
0.8297733
0
Prompt delete club confirmation
function promptDeleteClubConfirmation(mobile) { build = "\ <div id='full-page-container' class='hide-me'>\ <div id='inline-fields'>\ <button class='hideButton' onclick='unloadFullPageContainer();'></button>\ <h1>You are about to delete your club.</h1>\ <h2 class='border-b-e5e5e5'>Are you sure about th...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function confirmDeleteSchdTitle(){\n if(schdTitleListingEditorGrid.selModel.getCount() == 1) { //Userが1人しか登録されていな場合の処理\n Ext.MessageBox.confirm('[ 確認!]','削除します、よろしいですか?', deleteSchdTitle);\n } else if(schdTitleListingEditorGrid.selModel.getCount() > 1) { \n Ext.MessageBox.confi...
[ "0.7013001", "0.6904669", "0.68551946", "0.6818286", "0.6814587", "0.674369", "0.6619867", "0.65571815", "0.65571815", "0.6546949", "0.6518575", "0.64398706", "0.64338154", "0.64295673", "0.64259994", "0.6398921", "0.63804376", "0.6359562", "0.6325125", "0.6323762", "0.631900...
0.69404864
1
PLUGINS Open create plugin dialog
function openCreatePluginDialog(mobile) { build = "\ <div id='full-page-container'>\ <div id='inline-fields'>\ <button class='hideButton' onclick='unloadFullPageContainer();'></button>\ <h1>Give name to your plugin</h1>\ <input id='plugin-name' class='wide-fat mt-10' type='text' placeholder='Plugin na...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_addPlugins() {\n return cordova.cordova.raw.plugin('add', this.answers.plugins, { save: true })\n .then(() => {\n console.log(`add plugins ${this.answers.plugins}`);\n return true;\n })\n .catch((err) => {\n console.log(err.message);\n // process.exit();\n return err;\n });...
[ "0.6293246", "0.61520475", "0.6065397", "0.6056328", "0.6025064", "0.59928256", "0.59655625", "0.59581006", "0.5913763", "0.5819797", "0.5796159", "0.5765515", "0.57584774", "0.5750533", "0.5732373", "0.5725954", "0.57158554", "0.56893075", "0.56617266", "0.56607085", "0.5648...
0.71748567
0