Search is not available for this dataset
query
stringlengths
7
355k
document
stringlengths
9
341k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Handles status triggers and data updates kibana flows down to this viz
render(_visData, _status) { this.chart.resize(); updateData(); return new Promise(resolve => { resolve('when done rendering'); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleStageStatus() {\n\tconst status = document.getElementById(\"StageStatus\").value;\n\tvar node = canvas.getPrimarySelection();\n\tif (node instanceof WorkflowStage) {\n\t\tnode.updateUserData({published: status});\n\t}\n}", "function update()\n\t{\n\t setNavBarState({buttonDisabled: true});\n\t\...
[ "0.5802084", "0.56235576", "0.558492", "0.5559053", "0.5511516", "0.549883", "0.5489028", "0.54809356", "0.54726833", "0.54674494", "0.54649293", "0.54334855", "0.54070085", "0.5403539", "0.53783715", "0.53733385", "0.53695196", "0.53565824", "0.5298429", "0.5294558", "0.5275...
0.0
-1
Handles when the viz is disposed
destroy() { clearInterval(this.poll); this.chart.destroy(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "dispose() {\n this._disposed = true;\n }", "dispose() {\n if (this.ol_draw_) {\n this.regions_.viewer_.viewer_.removeInteraction(this.ol_draw_);\n this.ol_draw_ = null;\n this.previous_modes_ = null;\n }\n this.regions_ = null;\n }", "dispose()...
[ "0.69979656", "0.653055", "0.64905673", "0.6488291", "0.64432305", "0.6423512", "0.6359723", "0.63497144", "0.63497144", "0.63497144", "0.63497144", "0.63497144", "0.6304815", "0.62864774", "0.6271162", "0.62638664", "0.62610143", "0.6250274", "0.62498325", "0.6246303", "0.62...
0.5851579
65
DEMO ONLY: This provides a demo data update for the chart so we can see some visuals
updateData() { const parameters = { rows: 17, columns: 17, dataRows: 17, dataColumns: 17, labelOffsetY: 130 }; mobx.transaction(() => { while (this.chart.state.rows.length < parameters.rows) { this.chart.state.rows.push({ label: `Row ${this.chart.state.rows.lengt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateChart () {\n \n }", "updateDemographicChart() {\n const population = this.model.getAllPopulation();\n this.demographicsChart.receiveUpdate(population);\n }", "updateChart() {\n let xLabel = this.getChartX();\n let yLabel = this.getChartY();\n let t = this.getChartTargetArray();\n t...
[ "0.7582966", "0.74795234", "0.7441615", "0.7383912", "0.72699034", "0.72231185", "0.7075654", "0.7006306", "0.6965076", "0.69546425", "0.6937542", "0.69221014", "0.6907407", "0.6849099", "0.6804239", "0.6803048", "0.6803048", "0.6792329", "0.6776986", "0.6769328", "0.67557067...
0.0
-1
Use nodes instead of x,y for location?
constructor(x, y, map) { this.location = map[y][x]; // Grab node with given x,y from however we're storing them // this.char = char; // To be used to determine allegiance? or just set side based on char without storing char this.hp = 200; this.ap = 3; this.isAlive = true; this.location.occupant ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "mapCoordsToNode(x, y) {\n\n\t}", "function realCoordinates(nodeIndex) {\n return { x: x[nodeIndex] + 20 - rect.left, y: y[nodeIndex] + 20 - rect.top };\n}", "function setPositions(nodes) {\n // determine positions\n for (i in nodes) {\n if (nodes[i].category === \"Math\") {\n nodes[i].x ...
[ "0.76065224", "0.7170157", "0.6869929", "0.6656088", "0.65927064", "0.6522646", "0.64296377", "0.64089835", "0.63496643", "0.6347601", "0.63316303", "0.63128877", "0.6300718", "0.6267052", "0.622594", "0.62191963", "0.62162185", "0.61977696", "0.61651355", "0.61294585", "0.61...
0.58005947
65
use this in acquireTarget instead?
getSurroundingDistances(target) { return this.location.directions.map(direction => (target.location[direction].isTraversable && !target.location[direction].occupant ? { direction: this.location.getDistance(target.location[direction]) } : null)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get target(){ return this.__target; }", "acquireTarget() \n {\n this.target = this.findClosestEnemy();\n return this.target;\n }", "function target() {}", "get target() {}", "target() {\n return internal(this).target;\n }", "get target () {\n\t\treturn this._target;\n\t}",...
[ "0.69369537", "0.67056334", "0.66271865", "0.65508777", "0.6507639", "0.64605224", "0.64605224", "0.64605224", "0.6388408", "0.6388408", "0.6375857", "0.62563044", "0.6147157", "0.6118466", "0.6103502", "0.5990982", "0.5969707", "0.5892418", "0.589158", "0.5879779", "0.586794...
0.0
-1
Fetches a page of photos for a particular user's query. Relies on the custom API middleware defined in ../middleware/api.js. not clear why Schemas are defined in 'middleware/api'
function fetchPhotos(query, nextPageUrl) { // console.log("fetchPhotos building a CALL_API action for url: ", nextPageUrl) return { query, [CALL_API]: { types: [ PHOTOS_REQUEST, PHOTOS_SUCCESS, PHOTOS_FAILURE ], endpoint: nextPageUrl, schema: Schemas.PHOTO_ARRAY } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findPhotos(req, res, next) {\n connection.query('SELECT * from photos where idusers=?',[session.id], function(err, rows) {\n if (!err){\n console.log('The solution is: ', rows);\n req.photos = rows;\n return next();\n }else\n console.log('Error ...
[ "0.6432104", "0.6290977", "0.6273533", "0.61979437", "0.61917657", "0.6159542", "0.61585784", "0.6004086", "0.5960827", "0.5936415", "0.5929759", "0.5905788", "0.58932054", "0.58534384", "0.58527875", "0.5843889", "0.58227444", "0.5822569", "0.5798154", "0.5779211", "0.576872...
0.6621908
0
Fetches a page of photos for a particular user's query. Relies on the custom API middleware defined in ../middleware/api.js. not clear why Schemas are defined in 'middleware/api'
function fetchCounts(query, nextPageUrl) { // console.log("fetchCounts building a CALL_API action for url: ", nextPageUrl) return { query, [CALL_API]: { types: [ COUNTS_REQUEST, COUNTS_SUCCESS, COUNTS_FAILURE ], endpoint: nextPageUrl, schema: Schemas.COUNTS_ARRAY } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fetchPhotos(query, nextPageUrl) {\n // console.log(\"fetchPhotos building a CALL_API action for url: \", nextPageUrl)\n return {\n query,\n [CALL_API]: {\n types: [ PHOTOS_REQUEST, PHOTOS_SUCCESS, PHOTOS_FAILURE ],\n endpoint: nextPageUrl,\n schema: Schemas.PHOTO_ARRAY\n }\n }\n...
[ "0.66213363", "0.64317924", "0.62895197", "0.6271555", "0.61980295", "0.61905414", "0.615928", "0.6158647", "0.6003207", "0.5962594", "0.5935413", "0.5929738", "0.59064275", "0.5892367", "0.58537936", "0.5850153", "0.5842807", "0.58249986", "0.582206", "0.57988745", "0.578068...
0.0
-1
Fetches a page of starred repos by a particular user. Relies on the custom API middleware defined in ../middleware/api.js.
function fetchStarred(login, nextPageUrl) { return { login, [CALL_API]: { types: [ STARRED_REQUEST, STARRED_SUCCESS, STARRED_FAILURE ], endpoint: nextPageUrl, schema: Schemas.REPO_ARRAY } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getUser(user) {\n const endpoint = `https://api.github.com/users/${user}/repos`;\n fetch(endpoint)\n .then(response => response.json())\n .then(responseJson => displayRepos(responseJson))\n .catch(error => console.log(error));\n}", "function fetchUsersRepos(user){\n repoList....
[ "0.71872234", "0.67385", "0.6695263", "0.66863966", "0.6574396", "0.6551499", "0.6529382", "0.6514879", "0.6451272", "0.64509594", "0.6379372", "0.6340586", "0.6328958", "0.627867", "0.6226451", "0.6218114", "0.6189861", "0.61444217", "0.6123414", "0.60999024", "0.60887146", ...
0.6124819
18
Fetches a page of stargazers for a particular repo. Relies on the custom API middleware defined in ../middleware/api.js.
function fetchStargazers(fullName, nextPageUrl) { return { fullName, [CALL_API]: { types: [ STARGAZERS_REQUEST, STARGAZERS_SUCCESS, STARGAZERS_FAILURE ], endpoint: nextPageUrl, schema: Schemas.USER_ARRAY } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMostStargazers() {\n getAjaxData(\"https://api.github.com/orgs/HackYourFuture/repos\", allRepos => {\n clearAllTags(); \n const maxStar = findMaxStar(allRepos); \n renderRepositories_Stars(allRepos, maxStar); \n \n \n }); \n \n}", "function getPage(nav) {\n...
[ "0.6694817", "0.5543736", "0.5439158", "0.5415624", "0.5384675", "0.5340934", "0.5331442", "0.52793014", "0.526933", "0.52684265", "0.52332354", "0.5212743", "0.52126795", "0.5165361", "0.51233315", "0.50997305", "0.5095537", "0.50710607", "0.50528586", "0.50408965", "0.50220...
0.63646656
1
Helper method for defining associations. This method is not a part of Sequelize lifecycle. The `models/index` file will call this method automatically.
static associate(models) { // User.hasMany(models.Rating) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static associate(models) {\n // define association here\n // This is how Sequelize knows to create \"magic methods\"\n // These are functions that can automatically pull\n // related data.\n // For example: If I have a User object\n // I can call `await user.getContacts()` to get an\n...
[ "0.7641476", "0.7507344", "0.7312871", "0.7306175", "0.7306175", "0.7306175", "0.72937477", "0.7284903", "0.7277787", "0.72586936", "0.72586936", "0.72586936", "0.72586936", "0.72586936", "0.72586936", "0.72586936", "0.72586936", "0.72586936", "0.72586936", "0.72586936", "0.7...
0.0
-1
this function handle what happens after from is being submitted
function handleSubmit(event) { event.preventDefault(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_submitForm() {\n\t\tconst { inputName, inputBio, inputLocation, inputImage } = this.state;\n\t\tconst { updateAbout, userId, getAbout, routeId } = this.props;\n\t\tupdateAbout(userId, inputName, inputBio, inputLocation, inputImage, (success) => {\n\t\t\tif (success) {\n\t\t\t\tthis._closeEdit();\n\t\t\t\tgetAbout...
[ "0.65491", "0.64670193", "0.6464382", "0.6449578", "0.63898605", "0.63724476", "0.6336538", "0.63309985", "0.63030106", "0.6289768", "0.6283058", "0.6237021", "0.6212137", "0.6188408", "0.6187053", "0.617167", "0.6157267", "0.6148702", "0.6117087", "0.6102925", "0.61009556", ...
0.0
-1
having a hard time with this one
function addUpTo(array, index) { if (index) { return array[index] + addUpTo(array, --index) } else { return array[index] } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "private public function m246() {}", "protected internal function m252() {}", "transient private protected internal function m182() {}", "transient protected internal function m189() {}", "static private internal function m121() {}", "transient private internal fun...
[ "0.6512064", "0.6301345", "0.6219091", "0.58358526", "0.58333004", "0.5749064", "0.57160574", "0.5577158", "0.555597", "0.547051", "0.53840715", "0.53474677", "0.53236425", "0.5289866", "0.52850807", "0.527184", "0.5269449", "0.51564837", "0.51458687", "0.5119981", "0.5064179...
0.0
-1
Examine the board and see if we can get one move closer to winning TODO:
getBestMove(sym) { let length = 0; let regexp = new RegExp(sym, 'g'); let bestMove = { squareNum: -1, movesLeft: 2 // moves left after this to win }; // '' empty and all three available // 'x' two available // 'x o' one empty but o bl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _checkMoves() {\n\t\t\n\t\t// iterate through the rows\n\t\tfor(row = 0; row < _rows; row++) {\n\t\t\t\n\t\t\t// iterate through the cols\n\t\t\tfor (col = 0; col < _cols; col++) {\n\t\t\t\t\n\t\t\t\t// check top and bottom\n\t\t\t\tif(row - 1 >= 0 && typeof _board[row - 1][col] !== \"undefined\"\n\t\t\t\...
[ "0.8320983", "0.7776513", "0.77352256", "0.7656801", "0.76466876", "0.7643769", "0.7627953", "0.7599571", "0.7565191", "0.75335836", "0.75248516", "0.7512336", "0.75033224", "0.7492347", "0.7491987", "0.7487115", "0.74844193", "0.7473934", "0.7470752", "0.74610496", "0.745662...
0.0
-1
Computer chooses its next move
takeTurn() { let myBestMove = this.getBestMove(this.sym); let theirSym = this.sym === 'x' ? 'o' : 'x'; let theirBestMove = this.getBestMove(theirSym); let squareNum; if (theirBestMove.movesLeft === 0 && myBestMove.movesLeft > 0) { squareNum = theirBestMove.sq...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function chooseMove() {\n if (state.turnCount === 20) {\n alert('You win!');\n return reset();\n }\n var choice = getRandomInt(0, buttons.options.length - 1);\n state.moves.push(buttons.options[choice]);\n playBack(state.moves);\n state.turnCount++;\n if (state.turnCount >= 10) state...
[ "0.74017686", "0.7372633", "0.7314113", "0.7056389", "0.6822021", "0.68135214", "0.6801277", "0.67872906", "0.6782155", "0.67754555", "0.6767805", "0.6740159", "0.6733193", "0.67289424", "0.6708041", "0.6707377", "0.6701847", "0.66696554", "0.6657236", "0.6645153", "0.6618002...
0.0
-1
Return true if current player just won the game
currentPlayerWon() { let winStr = this.currentPlayer.sym.repeat(3); let winMove = winningMoves.findIndex((_,j) => getWinningMoveStrings(j) === winStr); if (winMove !== -1) { highlightWinningMove(winMove); return true; } else { return false; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isGameWon () {\n console.log('checking if you won the game')\n return gameState.enemiesLeft === 0\n}", "isGameover() {\n if (this.player1Pieces === 0 || this.player2Pieces === 0) {\n let message = this.player2Pieces === 0 ? 'Player 1 won!' : 'Player 2 won!';\n this.current...
[ "0.7626091", "0.7613378", "0.76003593", "0.7517559", "0.7463202", "0.745841", "0.7454968", "0.73883796", "0.736941", "0.73524773", "0.7342888", "0.73266435", "0.7288426", "0.72235185", "0.72070646", "0.71947163", "0.7175407", "0.71420383", "0.7139417", "0.7126391", "0.7125198...
0.7558606
3
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 is basically an ajax call to the endpoint defined at teamListApi that then runs the function listTeams on success as defined by listOfWorldCupTeams
function getTeamListApi(callback) { const params = {url: teamListApi, data: {by_date: "desc"}, success: callback }; $.ajax(params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTeams(){\n console.log( \"inside getTeams\");\n $.ajax({\n type: 'GET',\n url: '/teams',\n success: function (response) {\n console.log(\"Reponse from GET /teams\", response);\n newTeams = false;\n for (var i = 0; i < response.length; i++) {\n displayT...
[ "0.7850986", "0.7774147", "0.7290429", "0.7243833", "0.72116977", "0.71808046", "0.6994866", "0.68816566", "0.6799114", "0.67859983", "0.67695105", "0.66985947", "0.66747415", "0.6621274", "0.6613289", "0.6607867", "0.6606207", "0.65866035", "0.658461", "0.65438145", "0.65375...
0.7289119
3
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
Sorts teams by group
function groupSort(country1, country2) { return country1.id - country2.id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sortTeams() {\n \tvar sortedTeams = $('.team').sort(function (a, b) {\n \t\tvar $teamA = $(a);\n \t\tvar $teamB = $(b);\n\n \t\tvar favoriteOrder = $teamB.data('is-favorite') - $teamA.data('is-favorite');\n \t\tvar nameOrder = $teamA.data('team-name') > $teamB.data('team-name') ? 1 : -1;\n\n \t\tif ...
[ "0.70014066", "0.64710695", "0.64268285", "0.63032395", "0.62628347", "0.6258803", "0.61559016", "0.6149155", "0.61170655", "0.6068587", "0.59672743", "0.5965463", "0.59630454", "0.58013153", "0.57912606", "0.57487476", "0.57192034", "0.5687487", "0.5619119", "0.559847", "0.5...
0.5901267
13
Creates every list item of a team after it has been sorted. Each list item is an anchor that links to that countries wikipedia article.
function renderTeamList(data){ return `<div class= 'new-list-item'><a class= 'centered-text'href='https://en.wikipedia.org/wiki/${data.country}'><p>${data.country}</p></a></div>`; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateTeamsHtml(numTeams){\n var shuffledTeams = createList(numTeams);\n var $div = $('<div>');\n\n\n//place team name on dom\n for(var i = 0; i < shuffledTeams.length; i++){\n var $ul =$('<ul>').text('Posse ' + shuffledTeams[i].name + ':');\n $div.append($ul);\n console.log(shuffledTeams);\n for(v...
[ "0.6213938", "0.5991414", "0.5901692", "0.5850333", "0.5762835", "0.56692445", "0.564944", "0.5640566", "0.5637436", "0.5610083", "0.5608844", "0.560705", "0.5595375", "0.55695707", "0.55217224", "0.5505863", "0.5488796", "0.5487952", "0.54746664", "0.5466491", "0.54588443", ...
0.58739656
3
On clicking recent game, this function then runs methods that send an ajax request to the API that handles match data, and runs a callback function that shows information of the most recent game
function showCurrentGames(){ $('.current-game-button').click(function(){ emptyApp(); $('main').removeClass('hidden'); $('.current-game').removeClass('hidden'); $('.scroll-to-top').removeClass('hidden'); getSoccerApi(showCurrentMatch); document.querySelector('.leading-content').scrollIntoView({...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function printStuff(name) {\n //var API_KEY = \"\";\n //API_KEY = $(\"#API-Key\").val();\n console.log(\"calling summoner lookup\");\n var Account_ID = summonerLookUp(name);\n if (Account_ID !== \"\") {\n //console.log(\"hi\");\n $.ajax({\n url: 'https://nodejslolmc1.herokua...
[ "0.674341", "0.6611647", "0.65992326", "0.65765387", "0.65339816", "0.64417446", "0.6418065", "0.6383088", "0.6367279", "0.63611734", "0.63469255", "0.6343567", "0.62487525", "0.62271535", "0.62109625", "0.62087685", "0.614272", "0.61010504", "0.6098208", "0.60738856", "0.607...
0.63286674
12
This is an ajax call that gets match info for matches played in the tournament
function getSoccerApi(callback) { const params = {url: todayMatchApi, data: {by_date: "desc"}, success: callback } $.ajax(params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMatches (gameArray) {\n\tlet num = 0;\n\tgameArray.forEach(function (id) {\n\t\t$.ajax({\n\t\t\turl: RIOT_ENDPOINT + `/lol/match/v3/matches/${id}?api_key=${apiKey}`,\n\t\t\ttype: 'GET',\n\t\t\tdataType: 'json',\n\t\t\tsuccess: function (e) {\n\t\t\t\tnum++\n\t\t\t\trenderScreen(e, num)\n\t\t\t}\n\t\t})...
[ "0.70199424", "0.6923246", "0.69128436", "0.68460685", "0.6766052", "0.6749277", "0.6749246", "0.67387056", "0.6681751", "0.66243577", "0.6447725", "0.6398942", "0.63926077", "0.63774997", "0.6301659", "0.6299259", "0.6297791", "0.6296079", "0.6288478", "0.62754357", "0.62646...
0.0
-1
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
callback function used by showCurrentMatch that handles the rendering of the Youtube video for a match
function updateVideos(data) { $('.leading-content').append(renderYoutubeVideos(data)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showCurrentMatch(data){\n let dataApi = data;\n const currentMatch = data.find(findMostRecentGame);\n const homeFlagId = currentMatch.home_team_country;\n const awayFlagId = currentMatch.away_team_country;\n const searchMatch = `${homeFlagId} vs ${awayFlagId} fifa world cup 2018 highlights`;\n getYoutubeA...
[ "0.65003854", "0.642052", "0.6358083", "0.6355394", "0.62825656", "0.6180152", "0.61348057", "0.6085001", "0.6083522", "0.60597306", "0.6050666", "0.60136735", "0.6004951", "0.6004951", "0.6004951", "0.6004951", "0.6000016", "0.59895927", "0.598143", "0.5979827", "0.5945179",...
0.6080376
9
This function handles the functions that place stats in the different sectors of the application
function renderAllStats(item) { $('.left-main').append(renderHomeStats(item)); $('.right-main').append(renderAwayStats(item)); $('.leading-content').append(renderMatchInfo(item)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initStats () {\n\t\n\t// Percentage circle //\n\t$('#stats-percentage-circle').append(\"<div id='percentage-container'></div><div id='percentage_text'></div>\");\n\tSMT.circle = new ProgressBar.Circle('#percentage-container', {\n\t\tcolor: 'gray',\n\t\tstrokeWidth: 8,\n\t\ttrailWidth: 8,\n\t\tduration: 15...
[ "0.6021799", "0.595989", "0.5933283", "0.5790143", "0.57571614", "0.5723227", "0.5722695", "0.56976706", "0.5685742", "0.56516296", "0.5648951", "0.56167144", "0.561127", "0.55958945", "0.55893433", "0.5571139", "0.55706877", "0.55700374", "0.556227", "0.55236113", "0.5522796...
0.5417257
37
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 is used by both renderHomeStats and renderAwayStats to sort through all events in the game to find only events that resulted in a goal
function isEventGoal(item) { return (item.type_of_event === 'goal' || item.type_of_event === 'goal-penalty' || item.type_of_event === 'goal-own'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "log() {\n // FIRST/SECOND GAME\n if (\n (this.props.timeline1 &&\n this.props.champImg1 &&\n this.props.playerInfo1 &&\n this.props.gamesToSee === 1) ||\n (this.props.timeline2 &&\n this.props.champImg2 &&\n this.props.playerInfo2 &&\n this.props.gamesToSee...
[ "0.6196739", "0.60921496", "0.57072836", "0.57041633", "0.56223834", "0.5549531", "0.55196637", "0.54926497", "0.5446855", "0.54366213", "0.54271567", "0.53894746", "0.53515035", "0.5350925", "0.5280841", "0.5257344", "0.5238979", "0.5225076", "0.5207166", "0.51985556", "0.51...
0.5278149
15
This function simply chooses between three different kinds of events and generates information about the match to put into the Dom based on the information received.
function renderPlayerGoal(item) { if(item.type_of_event === 'goal'){ return `<p>${item.player} at "${item.time}"</p> <img src='http://clipart-library.com/images/pT58x9r7c.png' class='soccer-ball' alt='image of a soccer ball'>` } if(item.type_of_event === 'goal-penalty'){ return `<p>${item.play...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function eventData() {\n if (eventA[0]==\"Concert\") {\n console.log(eventA[0]);\n var genreParameters= \"segmentId=KZFzniwnSyZfZ7v7nJ\";\n $(\"#option5H\").append(\"Go to a Concert\");\n } else if (eventA[0]==\"Sports\") {\n var genreParameters= \"segmentId=KZFzniwnSyZfZ7v7nE\";\...
[ "0.57099754", "0.5698181", "0.54858005", "0.54099596", "0.53947175", "0.53868717", "0.5381955", "0.537534", "0.53413683", "0.5302005", "0.5233883", "0.52078795", "0.5206389", "0.5204353", "0.51781416", "0.5141962", "0.51207286", "0.51194215", "0.51005864", "0.50772876", "0.50...
0.0
-1
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
This method on selection of the match to view, runs the functions required to generate and render the match, while also accounting for the user not selecting a match to watch
function selectSearchedTeam() { $('.game-chooser').on('click', 'button', function(event) { const userAnswer = $('input:checked').val(); if(userAnswer === undefined) { return; } else { event.preventDefault(); $('input:checked').siblings().addClass('selectedAnswer'); getSoccerApi(choose...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function matchingEngine() {\n updateScoreBoard();\n if (selectedElements[0][0].firstChild.className == selectedElements[1][0].firstChild.className) {\n $(selectedElements[1]).addClass('open show match');\n $(selectedElements[0]).addClass('match');\n $(selectedElements[1]).off('click');\n...
[ "0.6265486", "0.61656845", "0.60911924", "0.60526055", "0.58649576", "0.5832051", "0.5825536", "0.58054405", "0.56281894", "0.56092626", "0.5593134", "0.55870634", "0.5473786", "0.5461587", "0.54603356", "0.5456347", "0.5440744", "0.5437828", "0.54362595", "0.5434815", "0.542...
0.50082916
80
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
used by both renderHomeFlag and renderAway flag to render the actual picture of the flag
function getFlagPicture(data) { return `<img src=${data[0].flag} alt= 'picture of ${data[0].name}'s' flag'>` }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderAwayFlag(awayFlag) {\n $('.flag-2').append(getFlagPicture(awayFlag));\n}", "function renderHomeFlag(homeFlag) {\n $('.flag-1').append(getFlagPicture(homeFlag));\n}", "function renderFlagpole() {\n\n\tvar flagY = floorPos_y - 30;\n\tstroke(255);\n\tstrokeWeight(5);\n\tline(flagpole.x_pos, floor...
[ "0.77789956", "0.77465475", "0.6387828", "0.62030476", "0.6037383", "0.6037144", "0.6018616", "0.598182", "0.5981155", "0.5964743", "0.5945857", "0.59355116", "0.5925941", "0.59014916", "0.5826263", "0.57848847", "0.57621354", "0.5719771", "0.5710272", "0.57015", "0.56934756"...
0.6385014
3
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
renders the highlight video used in the main portion of the app
function renderYoutubeVideos(data) { return ` <div class="row centered-text" label='Youtube soccer video'> <iframe src=${youtubeEmbedder}${data.items[0].id.videoId} title= 'Soccer video' aria-live= "assertive"></iframe> </div> <div class= 'guide row'> <div class= 'item centered-text'> <img class=...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createHighlights() {\n var DATA_INDEX_NAME = 'highlight-index';\n var seekBarHeight = $seekBar.height();\n console.log('h = ' + seekBarHeight)\n for (var i = 0; i < videoData.highlights.length; i++) {\n // object to hold everything about the highlight\n var highlight = {};\n highlight.index =...
[ "0.6227745", "0.60526985", "0.5866534", "0.5850187", "0.5799755", "0.57889515", "0.5774332", "0.5763256", "0.5742725", "0.57307607", "0.57169795", "0.57164973", "0.5715595", "0.57053024", "0.56802505", "0.5667539", "0.565015", "0.5605566", "0.557381", "0.55410826", "0.5540116...
0.0
-1
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
a callback method for the soccerapi, it receives the api list of all match data and goes through a couple steps to modify the userinput from the search bar to match information in the API, and finds all matches by the country entered by the user
function filterForSearch(data) { let userInput = $('#textfield').val(); userInput = userInput.toLowerCase(); let tempString = userInput.slice(1); userInput = userInput.charAt(0).toUpperCase(); userInput += tempString; if(userInput === 'Saudi arabia' || userInput === 'Korea republic' || userInput === 'Costa ...
{ "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.70615685", "0.68404764", "0.6773443", "0.67517096", "0.6739197", "0.6701558", "0.6621231", "0.6604267", "0.65730655", "0.649961", "0.6497751", "0.64780957", "0.6446564", "0.6382011", "0.6369087", "0.6347765", "0.63166404", "0.6299356", "0.6276921", "0.6245067", "0.6238994"...
0.67468566
4
renders the search results options for the user search
function renderSearchMatches(item) { return `<div class="answerOption"> <input id= 'answer${item.fifa_id}' type="radio" role="radio" name="answerOption" required> <label class= 'choice-options' for= 'answer${item.fifa_id}'>${item.home_team_country} vs ${item.away_team_country} ${item.home_team.g...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showResults () {\n const value = this.value\n const results = index.search(value, 8)\n // console.log('results: \\n')\n // console.log(results)\n let suggestion\n let childs = suggestions.childNodes\n let i = 0\n const len = results.length\n\n ...
[ "0.6730145", "0.6662468", "0.66559696", "0.6632712", "0.6560737", "0.65587395", "0.6490389", "0.6399316", "0.6392304", "0.63727355", "0.63631797", "0.6337216", "0.6336691", "0.6323279", "0.63193434", "0.63012713", "0.62979", "0.62744164", "0.62419647", "0.6216688", "0.6211899...
0.5913246
69
This function is responsible for running all of the callback functions that the entire app utilizes
function runApp() { showCurrentGames(); searchCountryMatches(); selectSearchedTeam(); listOfWorldCupTeams(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function runCallbacks() {\n\n\t\tcallbacks.forEach(function (callback) {\n\t\t\tcallback();\n\t\t});\n\n\t\trunning = false;\n\t}", "function runCallbacks() {\n callbacks.forEach((callback) => {\n callback();\n });\n\n running = false;\n }", "function runCallbacks() {\n callbacks.forEach(fu...
[ "0.7076419", "0.70237434", "0.69449484", "0.68623364", "0.68600607", "0.6795625", "0.67373437", "0.6721669", "0.65984523", "0.6446296", "0.6446296", "0.6446296", "0.6446296", "0.6446296", "0.6406686", "0.63725245", "0.6357306", "0.63399696", "0.6335292", "0.6331824", "0.62545...
0.0
-1
O(v + e) time | O(v) space
breadthFirstSearch(array) { let queue = [this]; while (queue.length > 0) { const node = queue.pop(); array.push(node.name); for (const child of node.children) { queue.unshift(child); } } return array; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static constrain(v){\r\n while(v<0){v+=1;}\r\n while(v>1){v-=1;}\r\n return v;\r\n }", "function ps(t) {\n var e = O(t);\n return O(O(e.bh).persistence).Uo();\n}", "function O(t, e, n) {\n return t.length === e.length && t.every((function(t, r) {\n return n(t, e[r]);\n ...
[ "0.6169672", "0.58015925", "0.57723266", "0.56646836", "0.5652695", "0.5652695", "0.5640861", "0.5634935", "0.56285864", "0.56059617", "0.5604602", "0.5604602", "0.5604602", "0.5604602", "0.5586264", "0.5543506", "0.5508466", "0.550382", "0.5500429", "0.5489924", "0.54830587"...
0.0
-1
Takes data from fetch request and appends to gallery
function generateProfile(data) { /* create new array populated by calling provided function */ data.map(profile => { profile = `<div class="card"> <div class="card-img-container"> <img class="card-img" src="${profile.picture.large}" alt="profile picture"> </div> ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderGalleryItem(){\n fetch(`https://source.unsplash.com/collection/${collectionID}/${imageWidth}x${imageHeight}/`).then((response)=> { \n let galleryItem = document.createElement('div');\n galleryItem.classList.add('gallery-item');\n galleryItem.innerHTML = `\n <img class=\"gallery-ima...
[ "0.7094786", "0.6771593", "0.6695156", "0.6661408", "0.66613466", "0.65975416", "0.65621364", "0.6530702", "0.65149707", "0.6511526", "0.6498918", "0.6486099", "0.64206463", "0.64040023", "0.6384844", "0.6371094", "0.6369262", "0.63676906", "0.636273", "0.6362644", "0.6336248...
0.0
-1
Create a modal for selected employee
function modalDisplay(individualData) { const modal = ` <div class="modal-container"> <div class="modal"> <button type="button" id="modal-close-btn" class="modal-close-btn"><strong>X</strong></button> <div class="modal-info-container" style="background: rgba(143, 119, 191, .8); height:...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createEmployeeModal(index) {\n const employeeIndex = employeeData[index];\n const date = new Date(employeeIndex.dob.date);\n\n const modalHTML = `\n <div class=\"modal-container\">\n <div class=\"modal\">\n <button type=\"button\" id=\"modal-close-btn\" cl...
[ "0.70444137", "0.6863817", "0.6742569", "0.6667443", "0.66490036", "0.6645995", "0.6638312", "0.6561621", "0.65603036", "0.6550945", "0.6477287", "0.6429001", "0.6423266", "0.63234615", "0.625536", "0.62371415", "0.6209557", "0.61767375", "0.6165323", "0.6153432", "0.6144927"...
0.0
-1
"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
loads the customized font
componentWillMount() { (async() => { await Font.loadAsync({ 'Peaches-and-Cream': require('../assets/fonts/Peaches-and-Cream-Regular.otf') }); this.setState({ isReady: true}); })(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadFont() {\r\n\r\n var loader = new THREE.FontLoader();\r\n loader.load('../fonts/work_sans_regular.json', function (response) {\r\n\r\n font = response;\r\n\r\n refreshText();\r\n });\r\n}", "function loadFont() {\n var loader = new THREE.FontLoader();\n loader.load( 'assets/...
[ "0.7744937", "0.7742279", "0.72126424", "0.70786846", "0.6955933", "0.6947101", "0.69209933", "0.68770814", "0.6839738", "0.68157446", "0.680741", "0.67904395", "0.6752603", "0.66911095", "0.6671825", "0.66546303", "0.6654079", "0.6604371", "0.66005963", "0.65996045", "0.6578...
0.6066738
62
model, score, view reset
handleClick({ target }) { this.gameover.classList.add("hidden"); this.model = this.tetrisModel.resetModel(); this.tetrisModel.resetScore(); this.scoreLevelView.updateScore(); if (target.innerHTML === "RESET") { this.resetBlock(); this.playBtn.disabled = false; document.removeEventL...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "reset(){\r\n \tconsole.log(\"reset\");\r\n \tthis.score=0;\r\n }", "reset(){\n this.live = 3;\n this.score = 0;\n this.init();\n }", "function reset(){\n\t\trandomScore();\n\t\trandomVal();\n\t\tmainScore = 0;\n\t\t$('.score').text('Score: ' + mainScore);\n\n\t}", "resetBo...
[ "0.70028937", "0.69416064", "0.67953914", "0.6717437", "0.67069983", "0.6675862", "0.66050804", "0.6604433", "0.6559072", "0.65129465", "0.6477853", "0.64383006", "0.64020747", "0.6339599", "0.63313985", "0.6329025", "0.6328047", "0.6326395", "0.632199", "0.63103855", "0.6284...
0.0
-1
PROPS text = text for the question buttonValues = objects for the button (with key : int, text : str, correct : bool)
constructor(props) { super(props); this.state = { answerHidden: true, mediaMounted: false }; this.checkMediaMounted = this.checkMediaMounted.bind(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showQuestion(question) {\n questionElement.innerText = question.question\n question.answers.forEach(answer => {\n const button = document.createElement('button')\n button.innerText = answer.text\n button.classList.add('btn')\n if(answer.correct) {\n button.data...
[ "0.65607285", "0.6548608", "0.64555067", "0.6449426", "0.64406806", "0.6436025", "0.6432132", "0.6414671", "0.64047885", "0.6385025", "0.63846546", "0.63798136", "0.6378811", "0.636314", "0.6346621", "0.63344127", "0.6329945", "0.6300317", "0.6276797", "0.6263643", "0.6251955...
0.0
-1
append all sections onto the content div
function HomePage() { // create title div and content const titleDiv = document.createElement("DIV"); titleDiv.setAttribute("id", "title"); const title = document.createElement("H1"); title.textContent = "Home" const aboutP = document.createElement("P"); aboutP.textContent = "We are known...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderSections(){\n \n\n store.sections.forEach((section,index) => {\n \n \n $(\"body\").append(`<section class=${section}> \n </section>`);\n renderParts(section,index);\n \n });\n\n}", "function addSections() {\n return this.each(function () {\n var bo...
[ "0.7082612", "0.6807009", "0.65270394", "0.6436197", "0.6342734", "0.6255569", "0.6229637", "0.6154786", "0.6133622", "0.61293095", "0.6109216", "0.6079428", "0.59678346", "0.5922224", "0.5884197", "0.5868677", "0.58648", "0.5856451", "0.5834253", "0.58183724", "0.5797802", ...
0.0
-1
Deeply get a value from an object via its path.
function getIn(obj, key, def, p) { if (p === void 0) { p = 0; } var path = (0,lodash_es_toPath__WEBPACK_IMPORTED_MODULE_4__.default)(key); while (obj && p < path.length) { obj = obj[path[p++]]; } return obj === undefined ? def : obj; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deepGet(obj, path) {\n var length = path.length;\n for (var i = 0; i < length; i++) {\n if (obj == null) return void 0;\n obj = obj[path[i]];\n }\n return length ? obj : void 0;\n }", "function deepGet(obj, path) {\n var length = path.length;\n for (var i = 0; i < length; i+...
[ "0.8193551", "0.8193551", "0.8193551", "0.8193551", "0.8193551", "0.8193551", "0.8193551", "0.8193551", "0.8193551", "0.7947024", "0.7807266", "0.77647674", "0.7747176", "0.7579353", "0.75734", "0.7538337", "0.7516273", "0.7497333", "0.74887854", "0.74285764", "0.73955286", ...
0.0
-1
Deeply set a value from in object via it's path. If the value at `path` has changed, return a shallow copy of obj with `value` set at `path`. If `value` has not changed, return the original `obj`. Existing objects / arrays along `path` are also shallow copied. Sibling objects along path retain the same internal js refe...
function setIn(obj, path, value) { var res = (0,lodash_es_clone__WEBPACK_IMPORTED_MODULE_5__.default)(obj); // this keeps inheritance when obj is a class var resVal = res; var i = 0; var pathArray = (0,lodash_es_toPath__WEBPACK_IMPORTED_MODULE_4__.default)(path); for (; i < pathArray.length - 1; i++) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setIn(obj, path, value) {\n var res = clone(obj); // this keeps inheritance when obj is a class\n\n var resVal = res;\n var i = 0;\n var pathArray = toPath(path);\n\n for (; i < pathArray.length - 1; i++) {\n var currentPath = pathArray[i];\n var currentObj = getIn(obj, pathArray.slice(0, i + 1...
[ "0.752508", "0.75212735", "0.73122436", "0.72669405", "0.71816957", "0.67933303", "0.6757298", "0.6725399", "0.6725399", "0.6697357", "0.6697357", "0.64115447", "0.6364967", "0.63280714", "0.63231623", "0.63194084", "0.6268637", "0.6060732", "0.6013066", "0.6012769", "0.59803...
0.7400647
3
Recursively a set the same value for all keys and arrays nested object, cloning
function setNestedObjectValues(object, value, visited, response) { if (visited === void 0) { visited = new WeakMap(); } if (response === void 0) { response = {}; } for (var _i = 0, _Object$keys = Object.keys(object); _i < _Object$keys.length; _i++) { var k = _Object$keys[_i]; var val = objec...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setObjectWithNestedKey(obj, key, value) {\n\n if(key.indexOf(\".\")) {\n // Need to deal with arrays\n var keys = key.split(\".\");\n var lastHash = keys.pop();\n for(var i = 0; i < keys.length; i++) {\n let keyPointer = keys[i];\n\n ...
[ "0.6357933", "0.6219581", "0.61878437", "0.6172944", "0.60820466", "0.60804003", "0.6076352", "0.60643053", "0.6053813", "0.60532075", "0.59918797", "0.5988388", "0.5969247", "0.5952816", "0.5940789", "0.58936095", "0.58336", "0.57994175", "0.5789697", "0.5778719", "0.5758050...
0.5966582
17
Validate a yup schema.
function validateYupSchema(values, schema, sync, context) { if (sync === void 0) { sync = false; } if (context === void 0) { context = {}; } var validateData = prepareDataForValidation(values); return schema[sync ? 'validateSync' : 'validate'](validateData, { abortEarly: false, context: co...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validateYupSchema(values,schema,sync,context){if(sync===void 0){sync=false;}if(context===void 0){context={};}var validateData=prepareDataForValidation(values);return schema[sync?'validateSync':'validate'](validateData,{abortEarly:false,context:context});}", "function validationSchema() {\n return {\n ...
[ "0.71660507", "0.70812213", "0.6036411", "0.5988745", "0.5871979", "0.57322985", "0.57269436", "0.56667036", "0.56613374", "0.5602523", "0.5533103", "0.5488767", "0.547762", "0.5464266", "0.54164815", "0.5414308", "0.53809655", "0.5376764", "0.53716093", "0.5341135", "0.53240...
0.6425877
6
deepmerge array merging algorithm
function arrayMerge(target, source, options) { var destination = target.slice(); source.forEach(function merge(e, i) { if (typeof destination[i] === 'undefined') { var cloneRequested = options.clone !== false; var shouldClone = cloneRequested && options.isMergeableObject(e); destination[i] = s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function arrayMerge(target,source,options){var destination=target.slice();source.forEach(function merge(e,i){if(typeof destination[i]==='undefined'){var cloneRequested=options.clone!==false;var shouldClone=cloneRequested&&options.isMergeableObject(e);destination[i]=shouldClone?deepmerge_1(Array.isArray(e)?[]:{},e,...
[ "0.6866639", "0.6493913", "0.64938843", "0.64637727", "0.6422636", "0.63669133", "0.6352357", "0.633785", "0.63314736", "0.6298962", "0.62649876", "0.622593", "0.622237", "0.6176762", "0.6166889", "0.614755", "0.6132026", "0.61226326", "0.6093744", "0.60794747", "0.60794747",...
0.60814524
20
Return multi select values based on an array of options
function getSelectedValues(options) { return Array.from(options).filter(function (el) { return el.selected; }).map(function (el) { return el.value; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSelectedValues(options){return Array.from(options).filter(function(el){return el.selected;}).map(function(el){return el.value;});}", "function getSelectValues (select, selectedOptions) {\r\n var value = [],\r\n options = selectedOptions || select.selectedOptions,\r\n opt;\r\n\r\n ...
[ "0.74947596", "0.68803394", "0.68803394", "0.6841206", "0.6841206", "0.68313736", "0.6831298", "0.6740812", "0.6693263", "0.6675698", "0.6675698", "0.6637643", "0.6543749", "0.6434997", "0.6428841", "0.6402719", "0.6297022", "0.6269824", "0.6247129", "0.62345713", "0.620696",...
0.71581584
5
Return the next value for a checkbox
function getValueForCheckbox(currentValue, checked, valueProp) { // If the current value was a boolean, return a boolean if (typeof currentValue === 'boolean') { return Boolean(checked); } // If the currentValue was not a boolean we want to return an array var currentArrayOfValues = []; var isValueInArr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "nextValue() {\n let value = this.getContext().changeValue(NEXT_VALUE);\n\n if (value === null) return value;\n this.value = value;\n\n return true;\n }", "function next() {\n setValue(()=>{\n return checkValue(value+1)\n })\n }", "next() {\n ...
[ "0.6634855", "0.6428506", "0.6161331", "0.61391884", "0.6068486", "0.6049469", "0.59563506", "0.59155494", "0.5883656", "0.58645093", "0.58365446", "0.58230555", "0.5806156", "0.57977664", "0.57887524", "0.57865506", "0.5783123", "0.57738143", "0.575726", "0.57565355", "0.574...
0.0
-1
A public higherorder component to access the imperative API
function withFormik(_ref) { var _ref$mapPropsToValues = _ref.mapPropsToValues, mapPropsToValues = _ref$mapPropsToValues === void 0 ? function (vanillaProps) { var val = {}; for (var k in vanillaProps) { if (vanillaProps.hasOwnProperty(k) && typeof vanillaProps[k] !== 'function') { // @tod...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function FunctionalComponent() {}", "function higherOrder(a) {\n a(); \n}", "function purchaseItem(...fns) => fns.reduce(compose)\n\n{} // so I have to make sure that I have returned in here this property", "_isolatedComputeForWrapper(component) {\n const computations = ReactInterpreter.computations(...
[ "0.60706174", "0.57833546", "0.5772459", "0.5677925", "0.5602396", "0.5340734", "0.5338885", "0.5237135", "0.51695037", "0.51695037", "0.51695037", "0.51695037", "0.5150147", "0.5085626", "0.50569224", "0.50552714", "0.5034587", "0.5030543", "0.502804", "0.5022086", "0.502166...
0.0
-1
Connect any component to Formik context, and inject as a prop called `formik`;
function connect(Comp) { var C = function C(props) { return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(FormikConsumer, null, function (formik) { !!!formik ? true ? (0,tiny_warning__WEBPACK_IMPORTED_MODULE_6__.default)(false, "Formik context is undefined, please verify you are rendering <Form>, <F...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function withFormik(_ref) {\n var _ref$mapPropsToValues = _ref.mapPropsToValues,\n mapPropsToValues = _ref$mapPropsToValues === void 0 ? function (vanillaProps) {\n var val = {};\n\n for (var k in vanillaProps) {\n if (vanillaProps.hasOwnProperty(k) && typeof vanillaProps[k] !== 'function') {\n ...
[ "0.7132485", "0.71128273", "0.7103854", "0.70818603", "0.7058728", "0.7058728", "0.61977977", "0.61806417", "0.5981517", "0.5801755", "0.57599753", "0.5641517", "0.55345964", "0.53619426", "0.5301351", "0.52800024", "0.5279033", "0.5221826", "0.521693", "0.5212561", "0.520439...
0.61063546
10
TODO check all uses of this and whether they use undefined for page resources not exist
loadPage(rawPath) { const pagePath = (0,_find_path__WEBPACK_IMPORTED_MODULE_2__.findPath)(rawPath); if (this.pageDb.has(pagePath)) { const page = this.pageDb.get(pagePath); if (true) { return Promise.resolve(page.payload); } } if (this.inFlightDb.has(pagePath)) { retur...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "loadPages() {\n this._pages = utility.getJSONFromFile(this._absoluteFile);\n }", "init() {\n this._super(...arguments);\n this._createPages();\n }", "function Page() {}", "function _page1_page() {\n}", "function init()\n{\n if(!externalLinksAreReferences(this)) return\n\n if(this.out...
[ "0.63204694", "0.62864995", "0.62272507", "0.6211308", "0.6016521", "0.5805953", "0.5802629", "0.5758377", "0.574076", "0.5665499", "0.56531733", "0.5623411", "0.5619419", "0.5539614", "0.55248183", "0.5522351", "0.55221015", "0.55215216", "0.55181164", "0.5516874", "0.550796...
0.0
-1
returns undefined if loading page ran into errors
loadPageSync(rawPath) { const pagePath = (0,_find_path__WEBPACK_IMPORTED_MODULE_2__.findPath)(rawPath); if (this.pageDb.has(pagePath)) { const pageData = this.pageDb.get(pagePath).payload; return pageData; } return undefined; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function errorLoading(err) {\r\n console.error('Dynamic page loading failed', err);\r\n}", "function checkIfLoadFailed() {\n\tsetupWebKitGlobals();\n\t\n\ttry {\n\t\tif (globals.browser && globals.browser.getHttpStatus() != 200) {\n\t\t\t\tshowCallFailed();\n\t\t\t\treturn true;\n\t\t\t}\n\t} catch (e) {\n\n\t}...
[ "0.681561", "0.6761732", "0.6713387", "0.6447909", "0.63900536", "0.6324838", "0.6324838", "0.6279764", "0.62344253", "0.6165308", "0.607875", "0.60642755", "0.60241634", "0.6019393", "0.60043156", "0.59904885", "0.5975041", "0.5945141", "0.5945141", "0.58933574", "0.5883302"...
0.5440791
95
Remove a prefix from a string. Return the input string if the given prefix isn't found.
function stripPrefix(str, prefix = ``) { if (!prefix) { return str; } if (str === prefix) { return `/`; } if (str.startsWith(`${prefix}/`)) { return str.slice(prefix.length); } return str; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removePrefixIfExists(str, prefix) {\n if (!str || (str.length < prefix.length)) {\n return str;\n }\n var strPrefix = str.substr(0, prefix.length).toLowerCase();\n if (strPrefix == prefix.toLowerCase()) {\n return str.substr(prefix.length);\n } else {\n return str;\n ...
[ "0.8407205", "0.8399148", "0.777556", "0.777556", "0.7353041", "0.6894615", "0.6612659", "0.6276374", "0.62669575", "0.62576514", "0.61588806", "0.6059035", "0.59905607", "0.5937004", "0.590701", "0.58582145", "0.5838091", "0.58246315", "0.5821725", "0.5774148", "0.577165", ...
0.76833355
9
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
Removes all keyvalue entries from the hash.
function hashClear() { this.__data__ = _nativeCreate_js__WEBPACK_IMPORTED_MODULE_0__.default ? (0,_nativeCreate_js__WEBPACK_IMPORTED_MODULE_0__.default)(null) : {}; this.size = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clear() {\n var map = this._map;\n var keys = Object.keys(map);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n map[key].clear();\n }\n }", "function clear() {\n this.keys.forEach((key) => {\n this._store[key] = undefined;\n delete this._store[key];\n });\n}", ...
[ "0.67325383", "0.66216296", "0.6511944", "0.6454195", "0.6214277", "0.6200593", "0.61385626", "0.61101323", "0.6029097", "0.5966128", "0.5934792", "0.5905935", "0.5905935", "0.5905935", "0.5903774", "0.5899288", "0.5899288", "0.5899288", "0.58634514", "0.58634514", "0.5863451...
0.0
-1
Removes all keyvalue entries from the list cache.
function listCacheClear() { this.__data__ = []; this.size = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listCacheClear(){this.__data__=[];}", "function listCacheClear(){this.__data__=[];}", "function listCacheClear(){this.__data__=[];}", "function listCacheClear(){this.__data__=[];}", "function listCacheClear() {\n\t\t this.__data__ = [];\n\t\t this.size = 0;\n\t\t}", "function listCacheClear() ...
[ "0.73589677", "0.73589677", "0.73589677", "0.73589677", "0.7318741", "0.7265799", "0.7265799", "0.7264395", "0.7258203", "0.7258203", "0.72377306", "0.72377306", "0.72377306", "0.72377306", "0.72377306", "0.72377306", "0.72377306", "0.72377306", "0.72377306", "0.72377306", "0...
0.0
-1
Removes all keyvalue entries from the map.
function mapCacheClear() { this.size = 0; this.__data__ = { 'hash': new _Hash_js__WEBPACK_IMPORTED_MODULE_0__.default, 'map': new (_Map_js__WEBPACK_IMPORTED_MODULE_1__.default || _ListCache_js__WEBPACK_IMPORTED_MODULE_2__.default), 'string': new _Hash_js__WEBPACK_IMPORTED_MODULE_0__.default }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clear() {\n var map = this._map;\n var keys = Object.keys(map);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n map[key].clear();\n }\n }", "clear() {\n log.map(\"Clearing the map of all the entries\");\n this._map.clear();\n }", "function multiMapRemo...
[ "0.75903755", "0.70695037", "0.6735827", "0.6653031", "0.653072", "0.62686956", "0.62589216", "0.62589216", "0.62589216", "0.6171725", "0.6171725", "0.6171725", "0.61668706", "0.61542076", "0.61483264", "0.61483264", "0.61483264", "0.61483264", "0.61483264", "0.61483264", "0....
0.0
-1
Removes all keyvalue entries from the stack.
function stackClear() { this.__data__ = new _ListCache_js__WEBPACK_IMPORTED_MODULE_0__.default; this.size = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clear () {\n this._dict = {}\n this._stack = [this._dict]\n }", "function stackClear(){this.__data__={'array':[],'map':null};}", "function stackClear(){this.__data__={'array':[],'map':null};}", "function stackClear(){this.__data__={'array':[],'map':null};}", "function stackClear() {\n\t this.__...
[ "0.63577217", "0.63291264", "0.63291264", "0.63291264", "0.62734073", "0.62274295", "0.62274295", "0.62274295", "0.62274295", "0.62274295", "0.62274295", "0.62274295", "0.62171006", "0.62171006", "0.62171006", "0.62171006", "0.62171006", "0.62171006", "0.62171006", "0.62171006"...
0.0
-1
Removes all keyvalue entries from the hash.
function hashClear() { this.__data__ = nativeCreate ? nativeCreate(null) : {}; this.size = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clear() {\n var map = this._map;\n var keys = Object.keys(map);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n map[key].clear();\n }\n }", "function clear() {\n this.keys.forEach((key) => {\n this._store[key] = undefined;\n delete this._store[key];\n });\n}", ...
[ "0.67325383", "0.66216296", "0.6511944", "0.6454195", "0.6214277", "0.6200593", "0.61385626", "0.61101323", "0.6029097", "0.5966128", "0.5934792", "0.5905935", "0.5905935", "0.5905935", "0.5903774", "0.5899288", "0.5899288", "0.5899288", "0.58634514", "0.58634514", "0.5863451...
0.0
-1
Removes all keyvalue entries from the list cache.
function listCacheClear() { this.__data__ = []; this.size = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listCacheClear(){this.__data__=[];}", "function listCacheClear(){this.__data__=[];}", "function listCacheClear(){this.__data__=[];}", "function listCacheClear(){this.__data__=[];}", "function listCacheClear() {\n\t\t this.__data__ = [];\n\t\t this.size = 0;\n\t\t}", "function listCacheClear() ...
[ "0.73589677", "0.73589677", "0.73589677", "0.73589677", "0.7318741", "0.7265799", "0.7265799", "0.7264395", "0.7258203", "0.7258203", "0.72377306", "0.72377306", "0.72377306", "0.72377306", "0.72377306", "0.72377306", "0.72377306", "0.72377306", "0.72377306", "0.72377306", "0...
0.0
-1
Removes all keyvalue entries from the map.
function mapCacheClear() { this.size = 0; this.__data__ = { 'hash': new Hash, 'map': new (Map || ListCache), 'string': new Hash }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clear() {\n var map = this._map;\n var keys = Object.keys(map);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n map[key].clear();\n }\n }", "clear() {\n log.map(\"Clearing the map of all the entries\");\n this._map.clear();\n }", "function multiMapRemo...
[ "0.75903755", "0.70695037", "0.6735827", "0.6653031", "0.653072", "0.62686956", "0.62589216", "0.62589216", "0.62589216", "0.6171725", "0.6171725", "0.6171725", "0.61668706", "0.61542076", "0.61483264", "0.61483264", "0.61483264", "0.61483264", "0.61483264", "0.61483264", "0....
0.0
-1
Removes all keyvalue entries from the stack.
function stackClear() { this.__data__ = new ListCache; this.size = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clear () {\n this._dict = {}\n this._stack = [this._dict]\n }", "function stackClear(){this.__data__={'array':[],'map':null};}", "function stackClear(){this.__data__={'array':[],'map':null};}", "function stackClear(){this.__data__={'array':[],'map':null};}", "function stackClear() {\n\t this.__...
[ "0.63577217", "0.63291264", "0.63291264", "0.63291264", "0.62734073", "0.62274295", "0.62274295", "0.62274295", "0.62274295", "0.62274295", "0.62274295", "0.62274295", "0.62171006", "0.62171006", "0.62171006", "0.62171006", "0.62171006", "0.62171006", "0.62171006", "0.62171006"...
0.0
-1
This method returns `undefined`.
function noop() { // No operation performed. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function returnUndefined() {}", "value() { return undefined; }", "function _undefined() {\n return exports.PREFIX.undefined;\n}", "function f () {\n return undefined;\n }", "_get(key) { return undefined; }", "get None() {}", "get None() {}", "get None() {}", "get None() {}", "_get_value() ...
[ "0.7351907", "0.67814267", "0.64990556", "0.6471846", "0.6265842", "0.6195419", "0.6195419", "0.6195419", "0.6195419", "0.59573215", "0.5942058", "0.5942058", "0.59362245", "0.59197164", "0.58265406", "0.5790372", "0.57813364", "0.57693726", "0.57346", "0.5724901", "0.5708006...
0.0
-1
Visit a single node.
function one(node) { var result if (!type || node.type === type) { result = visitor(node, stack.concat()) } if (node.children && result !== false) { return all(node.children, node) } return result }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "visitNode(node) { }", "visit() {\n if(this.state) this.state = Node.VISITED;\n }", "function node(){}", "function one(node, index, parent) {\n var result;\n\n index = index || (parent ? 0 : null);\n\n if (!type || node.type === type) {\n result = visitor(node, index, parent || null);\...
[ "0.7660978", "0.64456815", "0.6444978", "0.6280553", "0.6108867", "0.60755324", "0.60506946", "0.60506946", "0.60448086", "0.59708697", "0.59514207", "0.5924221", "0.59024817", "0.59024817", "0.59024817", "0.59024817", "0.56386995", "0.5636397", "0.5624829", "0.5620238", "0.5...
0.5810606
19
Visit children in `parent`.
function all(children, parent) { var length = children.length var index = -1 var child stack.push(parent) while (++index < length) { child = children[index] if (child && one(child) === false) { return false } } stack.pop() return true }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function visit(parent, visitFn, childrenFn) {\n if (!parent) return;\n\n visitFn(parent);\n\n var children = childrenFn(parent);\n if (children) {\n var count = children.length;\n for (var i = 0; i < count; i++) {\n visit(children[i], visitFn, childrenFn);\n ...
[ "0.7961384", "0.79312205", "0.7884723", "0.78684103", "0.78684103", "0.78684103", "0.77845716", "0.7271602", "0.676529", "0.6586661", "0.65283436", "0.6210523", "0.6132636", "0.6132636", "0.6119895", "0.60864514", "0.60864514", "0.60303557", "0.60248023", "0.601196", "0.60119...
0.57666224
28
Note this compiler only understand complete buffering, not streaming.
function compiler(options) { var settings = options || {} var config = configure( { transforms: [], canContainEols: [ 'emphasis', 'fragment', 'heading', 'paragraph', 'strong' ], enter: { autolink: opener(link), autolinkProtocol: on...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "buffer() {\n\t\treturn consumeBody.call(this);\n\t}", "buffer() {\n\t\treturn consumeBody.call(this);\n\t}", "buffer() {\n\t\treturn consumeBody.call(this);\n\t}", "buffer() {\n\t\treturn consumeBody.call(this);\n\t}", "buffer() {\n\t\treturn consumeBody.call(this);\n\t}", "buffer() {\n\t\treturn consume...
[ "0.6505909", "0.6505909", "0.6505909", "0.6505909", "0.6505909", "0.6505909", "0.6505909", "0.6505909", "0.6505909", "0.6505909", "0.6505909", "0.6505909", "0.6505909", "0.6505909", "0.6505909", "0.6505909", "0.6505909", "0.6505909", "0.6505909", "0.6505909", "0.6505909", "...
0.0
-1
Note: EOF is seen as ASCII control here, because `null < 32 == true`.
function asciiControl(code) { return ( // Special whitespace codes (which have negative values), C0 and Control // character DEL code < 32 || code === 127 ) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isEOF() {\n return this._cursor === this._string.length;\n }", "function eof() {\n return peek() == \"\";\n }", "function eof() {\n return peek() === \"\";\n }", "function eof() {\n return peek() == null;\n }", "eof(): boolean {\n return this.position >= this.input.leng...
[ "0.66167885", "0.6600991", "0.65610737", "0.6357962", "0.6351647", "0.6343481", "0.6343075", "0.62894267", "0.6052497", "0.60010016", "0.5926063", "0.57431364", "0.57396233", "0.56600183", "0.56168324", "0.55061024", "0.54653525", "0.53979945", "0.53932935", "0.53730303", "0....
0.0
-1
parsed right now: before text in paragraphs (specifically, media) are parsed.
function resolveContent(events) { subtokenize(events) return events }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "processInline(paragraph) {\n let obj = linepar.toObject(paragraph);\n let url = String(obj[\"url\"]);\n // get type ( html or txt );\n let lastIndex = url.lastIndexOf(\".\");\n let ext = url.substring(lastIndex + 1, url.length);\n var stringData = $...
[ "0.60558414", "0.5918725", "0.5809708", "0.57573193", "0.55812955", "0.5477738", "0.5467315", "0.54593307", "0.5438284", "0.5431499", "0.5366496", "0.5343769", "0.5342609", "0.5322724", "0.52924716", "0.5287001", "0.52790284", "0.52787054", "0.52781713", "0.52745926", "0.5274...
0.0
-1
causes a stack overflow in V8 when trying to insert 100k items for instance.
function chunkedSplice(list, start, remove, items) { var end = list.length var chunkStart = 0 var parameters // Make start between zero and `end` (included). if (start < 0) { start = -start > end ? 0 : end + start } else { start = start > end ? end : start } remove = remove > 0 ? remove : 0 // N...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "insert(key, value) {\n const index = getIndexBelowMax(key, this.limit);\n // let bucket = this.storage[index];\n if (!this.storage.hasOwnProperty(index)) {\n this.storage.storage[index] = [];\n }\n if(!this.storage.storage[index].hasOwnProperty(key)){\n this.limit++;\n this.storage.li...
[ "0.60719913", "0.603348", "0.59858173", "0.5920355", "0.58846194", "0.5817027", "0.57835364", "0.57379586", "0.56882703", "0.56794757", "0.56041336", "0.56041336", "0.55667037", "0.554941", "0.55192", "0.551095", "0.5494024", "0.5490178", "0.54615", "0.54507375", "0.54420215"...
0.0
-1
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
constructs, or a single construct.
function hook(constructs, returnState, bogusState) { var listOfConstructs var constructIndex var currentConstruct var info return constructs.tokenize || 'length' in constructs ? handleListOfConstructs(miniflat(constructs)) : handleMapOfConstructs function handleMapOf...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function construct() { }", "function construct(ctor, args) {\n ctor = asCtor(ctor);\n // This works around problems with (new Array()) and (new Date()) where\n // the returned object is not really a Date or Array on SpiderMonkey and\n // other interpreters.\n switch (args.length) {\n case 0: ...
[ "0.73686564", "0.67758584", "0.6650996", "0.65304345", "0.6387292", "0.6384549", "0.6353943", "0.6326881", "0.6326881", "0.61897033", "0.6162704", "0.60584104", "0.6055613", "0.60126454", "0.5930555", "0.5878164", "0.5878164", "0.5878164", "0.5878164", "0.58490235", "0.584082...
0.0
-1
chunks (replacement characters, tabs, or line endings).
function movePoint(point, offset) { point.column += offset point.offset += offset point._bufferIndex += offset return point }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Chunks() { }", "function chunks(chunks) {\n let prefix = '\\t ';\n chunks.forEach((chunk, i) => {\n let groupLn = colors.underline(`Group ${i + 1}:`)\n console.log('\\n\\t' + groupLn);\n console.log(`${prefix}${chunk.join('\\n' + prefix)}`);\n });\n console.log();\n}", "function genera...
[ "0.72153854", "0.6086055", "0.5990913", "0.59722275", "0.591655", "0.583604", "0.58193505", "0.5736487", "0.56117463", "0.55898255", "0.55898255", "0.55898255", "0.5540343", "0.54717636", "0.54573977", "0.539794", "0.5358646", "0.5332654", "0.53255874", "0.5310786", "0.525408...
0.0
-1
Counts tabs based on their expanded size, and CR+LF as one character.
function sizeChunks(chunks) { var index = -1 var size = 0 while (++index < chunks.length) { size += typeof chunks[index] === 'string' ? chunks[index].length : 1 } return size }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function howManyTabs(input)\n{\n\treturn (input.match(/\\t/g) || []).length;\n}", "function countColumn(string, end, tabSize) {\n if (end == null) {\n end = string.search(/[^\\s\\u00a0]/);\n if (end == -1) end = string.length;\n }\n for (var i = 0, n = 0; i < end; ++i) {\n if (string.char...
[ "0.70296204", "0.66319656", "0.66319656", "0.66319656", "0.66319656", "0.66319656", "0.66319656", "0.6323051", "0.6293488", "0.6293488", "0.6293488", "0.6293488", "0.6258029", "0.6212877", "0.6184729", "0.6184729", "0.6184729", "0.61723894", "0.61553025", "0.61107343", "0.607...
0.0
-1
inlined Object.is polyfill to avoid requiring consumers ship their own /eslintdisable noselfcompare
function is(x, y) { // SameValue algorithm if (x === y) { // Steps 1-5, 7-10 // Steps 6.b-6.e: +0 != -0 return x !== 0 || 1 / x === 1 / y; } else { // Step 6.a: NaN == NaN return x !== x && y !== y; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isObject$1(obj) {\n // incase of arrow function and array\n return Object(obj) === obj && String(obj) === '[object Object]' && !isFunction(obj) && !isArray(obj);\n }", "function isObject$1(obj) {\n ...
[ "0.67307776", "0.6633116", "0.6609801", "0.65994185", "0.65991455", "0.65645915", "0.65056276", "0.6466668", "0.64615506", "0.6410588", "0.63689065", "0.63643163", "0.63643163", "0.63643163", "0.63643163", "0.6356162", "0.63265204", "0.6321958", "0.632186", "0.6294811", "0.62...
0.0
-1
Equivalent of `typeof` but with special handling for array and regexp.
function getPropType(propValue) { var propType = typeof propValue; if (Array.isArray(propValue)) { return 'array'; } if (propValue instanceof RegExp) { // Old webkits (at least until Android 4.0) return 'function' rather than // 'object' for typeof a RegExp. We'll normalize this here s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sc_typeof( x ) {\n return typeof x;\n}", "static type(arg)\n {\n const types = [\n 'array', 'boolean', 'function', 'number',\n 'null', 'object', 'regexp', 'symbol', 'string',\n 'undefined'\n ]\n\n var type = Object.prototype.toString.call(arg),\...
[ "0.6909167", "0.67750335", "0.66079795", "0.6537892", "0.64935464", "0.6488478", "0.6488478", "0.6450447", "0.6450447", "0.64288545", "0.6427948", "0.6404547", "0.6404547", "0.63955957", "0.63955957", "0.63955957", "0.63955957", "0.63955957", "0.63955957", "0.63955957", "0.63...
0.0
-1
This handles more types than `getPropType`. Only used for error messages. See `createPrimitiveTypeChecker`.
function getPreciseType(propValue) { if (typeof propValue === 'undefined' || propValue === null) { return '' + propValue; } var propType = getPropType(propValue); if (propType === 'object') { if (propValue instanceof Date) { return 'date'; } else if (propValue instanceof RegExp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPropType(propValue) {\n\t\t var propType = typeof propValue;\n\t\t if (Array.isArray(propValue)) {\n\t\t return 'array';\n\t\t }\n\t\t if (propValue instanceof RegExp) {\n\t\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t\t // 'object' for type...
[ "0.6876632", "0.68532825", "0.68532825", "0.68532825", "0.68532825", "0.68521523", "0.6846517", "0.6846517", "0.6846517", "0.6846517", "0.6846517", "0.6846517", "0.6846517", "0.6846517", "0.6846517", "0.6846517", "0.6846517", "0.6846517", "0.6846517", "0.6846517", "0.6846517"...
0.0
-1
Returns a string that is postfixed to a warning about an invalid type. For example, "undefined" or "of type array"
function getPostfixForTypeWarning(value) { var type = getPreciseType(value); switch (type) { case 'array': case 'object': return 'an ' + type; case 'boolean': case 'date': case 'regexp': return 'a ' + type; default: return type; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _undefinedCoerce() {\n return '';\n}", "function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case \"array\":\n case \"object\":\n return \"an \" + type;\n case \"boolean\":\n ...
[ "0.65988296", "0.6565237", "0.6559532", "0.6559532", "0.6559532", "0.6559532", "0.6522337", "0.65215486", "0.65060395", "0.65060395", "0.65060395", "0.65060395", "0.65060395", "0.65013695", "0.6489755", "0.6477735", "0.6477735", "0.6477735", "0.6477735", "0.6477735", "0.64777...
0.0
-1
Returns class name of the object, if any.
function getClassName(propValue) { if (!propValue.constructor || !propValue.constructor.name) { return ANONYMOUS; } return propValue.constructor.name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getClassName(obj) {\n var funcNameRegex = /function\\s+(.+?)\\s*\\(/;\n var results = funcNameRegex.exec(obj['constructor'].toString());\n return (results && results.length > 1) ? results[1] : '';\n }", "getClassName() {\n return this.constructor\n .className;\n...
[ "0.7729453", "0.7467235", "0.7467235", "0.74239284", "0.7165505", "0.71431816", "0.70840144", "0.7080456", "0.69956654", "0.6969364", "0.6898247", "0.6879638", "0.6712778", "0.66559386", "0.663537", "0.6608779", "0.6608779", "0.6608779", "0.6608779", "0.6598088", "0.65969384"...
0.0
-1
Based on Kendo UI Core expression code <
function Cache(maxSize) { this._maxSize = maxSize this.clear() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get expression () {\n\t\treturn this._expression;\n\t}", "get expression() {\n\t\treturn this.__expression;\n\t}", "get expression() {\n\t\treturn this.__expression;\n\t}", "function getExpression(_, ctx) {\n var k = 'e:' + _.$expr;\n return ctx.fn[k]\n || (ctx.fn[k] = (0,vega_util__WEBPACK_IMPORTED_MOD...
[ "0.5704015", "0.5586445", "0.5586445", "0.5491245", "0.5435282", "0.54299283", "0.5273981", "0.5273981", "0.51981884", "0.51638615", "0.5140054", "0.513929", "0.510305", "0.5089617", "0.50571597", "0.5051754", "0.50412524", "0.50369006", "0.50190085", "0.50151277", "0.5005721...
0.0
-1
Note: We don't need `envHasBigInt64Array` in fde es6/index.js
function equal(a, b) { // START: fast-deep-equal es6/index.js 3.1.1 if (a === b) return true; if (a && b && typeof a == 'object' && typeof b == 'object') { if (a.constructor !== b.constructor) return false; var length, i, keys; if (Array.isArray(a)) { length = a.length; if (length != b.l...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function v64(v65,v66,v67,v68,v69) {\n const v70 = ArrayBuffer(split);\n // v70 = .unknown\n}", "function h(){return r.TYPED_ARRAY_SUPPORT?2147483647:1073741823}", "function makeEnv(env) {\n env.getTotalMemory = function () { return mdle['TOTAL_MEMORY']; };\n env.abort = function () { process.exit(-...
[ "0.5926668", "0.54577166", "0.5348917", "0.53414905", "0.5333911", "0.53013945", "0.5278512", "0.5271847", "0.51689506", "0.51341903", "0.51208663", "0.5029727", "0.50274456", "0.5001805", "0.4996951", "0.49701235", "0.4941608", "0.4926944", "0.49042773", "0.49027246", "0.489...
0.0
-1
THIS FILE IS AUTO GENERATED
function Md3DRotation (props) { return (0,_lib__WEBPACK_IMPORTED_MODULE_0__.GenIcon)({"tag":"svg","attr":{"viewBox":"0 0 24 24"},"child":[{"tag":"path","attr":{"d":"M7.52 21.48C4.25 19.94 1.91 16.76 1.55 13H.05C.56 19.16 5.71 24 12 24l.66-.03-3.81-3.81-1.33 1.32zm.89-6.52c-.19 0-.37-.03-.52-.08-.16-.06-.29-.13-.4-.24...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private public function m246() {}", "private internal function m248() {}", "protected internal function m252() {}", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n ...
[ "0.6664626", "0.6453394", "0.6318056", "0.6249845", "0.6249845", "0.6249845", "0.6249845", "0.6249845", "0.6249845", "0.6249845", "0.6249845", "0.6249845", "0.6249845", "0.6249845", "0.6249845", "0.6249845", "0.6249845", "0.6249845", "0.6249845", "0.6249845", "0.6249845", "...
0.0
-1
AsyncMode should be deprecated
function isAsyncMode(object) { { if (!hasWarnedAboutDeprecatedIsAsyncMode) { hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setAsync(){\n this.async = true;\n }", "function isAsyncMode(object){{if(!hasWarnedAboutDeprecatedIsAsyncMode){hasWarnedAboutDeprecatedIsAsyncMode=true;lowPriorityWarning$1(false,'The ReactIs.isAsyncMode() alias has been deprecated, '+'and will be removed in React 17+. Update your code to use '+'ReactI...
[ "0.71772814", "0.71477455", "0.71477455", "0.71477455", "0.7074615", "0.69017977", "0.6824216", "0.68094903", "0.68094903", "0.6793626", "0.678579", "0.6784744", "0.67578226", "0.6750992", "0.6745078", "0.6745078", "0.67303616", "0.6727707", "0.6727707", "0.6727707", "0.67277...
0.0
-1
Run `fns`. Last argument must be a completion handler.
function run() { var index = -1 var input = slice.call(arguments, 0, -1) var done = arguments[arguments.length - 1] if (typeof done !== 'function') { throw new Error('Expected function as last argument, not ' + done) } next.apply(null, [null].concat(input)) // Run the next `fn`, if ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function runAll(whenFn, fns, resolveIdx) {\n //var deferred = when.defer();\n return whenFn(fns)\n .then(\n function(results) {\n return results[resolveIdx];\n },\n function(err) {\n return when.reject(err);\n }\n );\n}", "function run() {\n var index = -1;\n var inp...
[ "0.6847896", "0.66505706", "0.65297323", "0.65297323", "0.6375136", "0.6178015", "0.59882987", "0.5942804", "0.5925223", "0.58919996", "0.57837147", "0.5779912", "0.56861556", "0.56780887", "0.5614525", "0.55852646", "0.5570382", "0.5516854", "0.55152124", "0.5453633", "0.543...
0.6507727
8
Run the next `fn`, if any.
function next(err) { var fn = fns[++index] var params = slice.call(arguments, 0) var values = params.slice(1) var length = input.length var pos = -1 if (err) { done(err) return } // Copy non-nully input into values. while (++pos < length) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function run(fn) {\n if (fn)\n fn(next);\n else\n callback(null, results);\n }", "function next(err, result) {\n if (err)\n return callback(err, results);\n results.push(result);\n if (fns.length)\n run(fns.shift());\n else\n callback(null, results);\n }", "function...
[ "0.7895341", "0.7258331", "0.6687143", "0.6568592", "0.6472725", "0.6472725", "0.6464374", "0.6464374", "0.6464374", "0.6464374", "0.6464374", "0.6464374", "0.6400427", "0.63742316", "0.6338885", "0.62767184", "0.6203823", "0.61728907", "0.61713886", "0.61713886", "0.610243",...
0.6133581
24
Add `fn` to the list.
function use(fn) { if (typeof fn !== 'function') { throw new Error('Expected `fn` to be a function, not ' + fn) } fns.push(fn) return middleware }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addWithFunction(list, item, hashFunction) {\n if (findWithFunction(list, hashFunction) === -1) {\n list.push(item);\n }\n }", "custom(fn) {\r\n\t\treturn this.push('fn', [...arguments]);\r\n\t}", "function addToQueue(fn) {\n if (working) {\n queue.push(fn);\n }...
[ "0.693731", "0.6698551", "0.6223054", "0.62042034", "0.6063726", "0.60538137", "0.5975371", "0.59122247", "0.580994", "0.580994", "0.580994", "0.580994", "0.580994", "0.580994", "0.580994", "0.57784986", "0.5764324", "0.5737839", "0.5720626", "0.5719391", "0.5672539", "0.56...
0.57352865
25
Wrap `fn`. Can be sync or async; return a promise, receive a completion handler, return new values and errors.
function wrap(fn, callback) { var invoked return wrapped function wrapped() { var params = slice.call(arguments, 0) var callback = fn.length > params.length var result if (callback) { params.push(done) } try { result = fn.apply(null, params) } catch (error) { // W...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wrap_sync (fn) {\n return function (params) {\n var val = fn(params)\n if (val && !isPromise(val)) throw val\n return val\n }\n}", "async function thenify(fn) {\n return await new Promise(function(resolve, reject) {\n function callback(err, res) {\n if (err) return reject(err);\n ...
[ "0.75725514", "0.69479746", "0.6858928", "0.6830772", "0.6648563", "0.6574583", "0.65611124", "0.6463919", "0.6463919", "0.6435289", "0.63665336", "0.6268416", "0.6259378", "0.62556964", "0.62556964", "0.62530184", "0.6249934", "0.6212102", "0.6200447", "0.6200375", "0.618733...
0.6304468
15
Invoke `next`, only once.
function done() { if (!invoked) { invoked = true callback.apply(null, arguments) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "next () {}", "next() {}", "next() {\n this._next();\n }", "Next() {}", "function next() {\n subject = context.stack.tail.head;\n index = 0;\n test( subject );\n }", "async next() {\n this._executing = false;\n await this._execute();\n }", "function _next() {\n...
[ "0.78338253", "0.77667636", "0.7421749", "0.73650426", "0.68990076", "0.6801062", "0.66300976", "0.6603405", "0.6582594", "0.6529114", "0.6470337", "0.643539", "0.643539", "0.6421019", "0.63748807", "0.63748807", "0.6350465", "0.63222027", "0.63120425", "0.6306472", "0.630023...
0.0
-1