query
stringlengths
9
14.6k
document
stringlengths
8
5.39M
metadata
dict
negatives
listlengths
0
30
negative_scores
listlengths
0
30
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
HPAGINATION PLUGIN DEFINITION =============================
function Plugin(option) { return this.each(function() { var $this = $(this) var options = $.extend({}, HPagination.DEFAULT, $this.data(), typeof option == 'object' && option) var data = $this.data('bs.hpagination') if (!data) $this.data('bs.hpagination', (data = new HPagination(this, option...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async onPrepared() {\n try {\n if (PLUGIN.good_to_go(plugin_options, context)) {\n await new head_1.default(PLUGIN.options, context).add_links();\n }\n }\n catch (err) {\n log_1.default.error(err.message);\n }\n }", "function Paginato...
[ "0.58404374", "0.5772728", "0.568627", "0.56506044", "0.56350386", "0.55940324", "0.55908585", "0.5402458", "0.5397351", "0.53932965", "0.5369499", "0.53482246", "0.53383183", "0.5290812", "0.52796507", "0.52796507", "0.5256465", "0.52528226", "0.5252446", "0.5251646", "0.523...
0.6045433
0
values are price of one share of Apple stock at that time If $500 at 10:30 AM, then stockPrices[60] = 500 Take stockPrices and return the best profit you could make from one purchase and one sale of one share of Apple stock the day before const stockPrices = [10, 7, 5, 8, 11, 9]; getMaxProfit(stockPrices); Returns 6 (b...
function getMaxProfit(stockPrices) { const stocksLength = stockPrices.length; if (stocksLength <= 1) { throw new Error("Must have more than 1 stock"); } const bestProfitsHash = {}; for (let i = 0; i < stocksLength - 1; i++) { const currStock = stockPrices[i]; for (let j = i + 1; j < stocksLength...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stockProfit(pricesArray) {\n let lowestPrice = pricesArray[0];\n let indexOfLowestPrice = 0;\n for (let i = 0; i < pricesArray.length; i++) {\n const currentPrice = pricesArray[i];\n if (currentPrice < lowestPrice) {\n lowestPrice = currentPrice;\n indexOfLowestPrice = i;\...
[ "0.78603524", "0.78581816", "0.7853478", "0.7756531", "0.76850164", "0.75238806", "0.7500931", "0.73306483", "0.73213387", "0.73025256", "0.7297484", "0.72667634", "0.72562987", "0.7219642", "0.72009605", "0.7087965", "0.7076194", "0.68773395", "0.6735444", "0.6635342", "0.66...
0.8200164
0
The upload function takes 3 parameters: files files to upload to the server, showUploadProgress a callback function that takes two parameters (file id and download percentage), setLink a callback function that returns id of file and link to this file on the server after uploading file. You can write your own server log...
function onUpload(files, showUploadProgress, setLink) { files.forEach((file, idx) => { const ref = storage.ref(`images/${file.name}`) const task = ref.put(file); task.on('state_changed', snapshot => { const percentage = Math.round((snapshot.bytesTransferred / snap...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "uploadFile(file, cb) {\n\n function transferComplete(e) {\n if(e.currentTarget.status === 200) {\n var data = JSON.parse(e.currentTarget.response)\n var path = '/media/' + data.name\n cb(null, path)\n } else {\n cb(new Error(e.currentTarget.response))\n }\n }\n\n ...
[ "0.6655004", "0.64941764", "0.64721644", "0.64240044", "0.63896805", "0.6378965", "0.63249385", "0.63208354", "0.6308316", "0.62827826", "0.6281606", "0.6259439", "0.62509364", "0.62455785", "0.6237237", "0.61908674", "0.6189996", "0.6161808", "0.6157908", "0.6138265", "0.612...
0.6779097
0
The NSGetModule function is the magic entry point that XPCOM uses to find what XPCOM objects this component provides
function NSGetModule(comMgr, fileSpec) { return myAppHandlerModule; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function NSGetModule(aCompMgr, aFileSpec) \r\n{\r\n\treturn FoxMeterServiceModule;\r\n}", "function NSGetModule(compMgr, fileSpec) {\n return module;\n}", "function NSGetModule(compMgr, fileSpec) {\n return XPCOMUtils.generateModule(components);\n}", "function NSGetModule(compMgr, fileSpec) {\n return M...
[ "0.760435", "0.734543", "0.73182845", "0.72861856", "0.6531359", "0.61837065", "0.604732", "0.5773965", "0.5655792", "0.5606481", "0.5558794", "0.55190325", "0.55077726", "0.547789", "0.5258477", "0.5190298", "0.51602983", "0.5119016", "0.5119016", "0.5119016", "0.5119016", ...
0.7560277
1
To initialize sliding puzzle.
function initSlidingPuzzle() { setTilePosition(); // Attach click event to Tiles. $('.SlidingPuzzle').children('li').click(function() { slideTile(this); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init() {\n \n\tTweenLite.set($slides, {\n\t\tleft: \"-100%\"\n });\n\tgotoSlide(0, 0);\n}", "function init() {\n for (let i = 0; i < columns; i++) {\n for (let j = 0; j < rows; j++) {\n currentBoard[i][j] = 0;\n nextBoard[i][j] = 0;\n }\n }\n \n\n}", "ini...
[ "0.64691633", "0.59827846", "0.5938998", "0.5931506", "0.5929022", "0.59100986", "0.5874262", "0.5847625", "0.57320553", "0.570784", "0.5698653", "0.56893253", "0.5684352", "0.5680309", "0.5676886", "0.5631187", "0.56169194", "0.5612671", "0.56125367", "0.5606441", "0.5602240...
0.7399933
0
updates camera aspect ratio
function updateAspectRatio(){ this.camera.aspect = stage3d.aspectRatio; this.camera.updateProjectionMatrix(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateRatio(w, h){\n\n if(this._isPerspective){\n this._camera.aspect = w / h ;\n this._camera.updateProjectionMatrix();\n }else{\n var wRatio = this._windowSize.width / window.innerWidth;\n var hRatio = this._windowSize.height / window.innerHeight;\n\n this._camera.left /= wRatio;\n...
[ "0.7789343", "0.74937874", "0.71144545", "0.7050337", "0.7047554", "0.7025989", "0.7025989", "0.6985668", "0.6985668", "0.6937887", "0.6937887", "0.6937887", "0.6937887", "0.6875271", "0.6812766", "0.6782051", "0.6776604", "0.6776604", "0.67686665", "0.676825", "0.6739776", ...
0.85392815
0
The default calipso table object, with default configuration values. Constructor
function CalipsoTable() { //TODO Allow over-ride }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor() {\n\n this.table = {};\n\n this.tableSize = 0;\n }", "function table() {\n this.table = null;\n this.opts = {};\n this.table_id = \"\";\n}", "function build_table(){\n S.table = new Tabulator(\"#config-table\", {\n data: S.config.json.table || [],\n columns: C.column....
[ "0.69866204", "0.6816777", "0.6607733", "0.65758073", "0.6470409", "0.64574236", "0.6377806", "0.6368557", "0.6358643", "0.63563246", "0.6316944", "0.62338793", "0.62076783", "0.6204112", "0.61705744", "0.6154628", "0.61499935", "0.61441886", "0.61290985", "0.61135155", "0.60...
0.7835317
0
Helper function to determine column header sort class
function getHeaderClass(table, column) { // Default class var cls = column.cls || ''; // Sortable cls += column.sortable === false ? '' : 'sortable'; if (table.view && table.view.sort && (table.view.sort[column.name] || table.view.sort[column.sort])) { cls += ' sorted-' + (table.view.sort[column.sort] |...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function MatSortHeaderColumnDef() {}", "cellClass(){\n var cls = {\n 'sortable': this.column.sortable,\n 'resizable': this.column.resizable\n };\n\n if(this.column.heaerClassName){\n cls[this.column.headerClassName] = true;\n }\n\n return cls;\n }", "function class_sortTableCol( ...
[ "0.6964442", "0.68596613", "0.678151", "0.66952926", "0.65116346", "0.6365602", "0.6082133", "0.6076349", "0.6075651", "0.6003061", "0.6002763", "0.5988466", "0.5972837", "0.5971752", "0.59645534", "0.5964203", "0.5963371", "0.5953192", "0.59489065", "0.5946335", "0.5931596",...
0.77589
0
existing functionality is that to select a folder is to only select that folder's firstlevel leaf nodes. To recurse into folders (so selection of a nonroot folder selects that folder's subtree) alter the code so the 3rd parameter of _doSelect is set to true.
function zipSelect(elementId) { var nodeInfo = zipTree[elementId]; if (nodeInfo) { var children = nodeInfo.children; var select = $('#' + elementId).attr('checked'); for (var i=0; i < children.length; i++) { // to recurse into folders (so a non-root folder selects that folder's sub-tree) // set the 3rd...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function traverseTreeV2(tree, level, option, searchId, onlyShowFolders){ \r\n log(searchId);\r\n var space = '';\r\n if(level > -1) {\r\n for(var x = 0; x < level; x++){\r\n space += '.';\r\n }\r\n }\r\n for(var i = 0; i < tree.length; i++){\r\n if(tree[i].title != '') {\r\n ...
[ "0.65423256", "0.6318578", "0.6310883", "0.62798077", "0.61476195", "0.6146979", "0.61179054", "0.60938734", "0.6004293", "0.5977618", "0.5975243", "0.59295756", "0.5855397", "0.5830582", "0.58291996", "0.5761659", "0.57557815", "0.57198083", "0.57167786", "0.5707556", "0.568...
0.6405697
1
Define the filterAll function to compare search criteria with data Returns true if everything matches up well.
function filterAll(item) { //Store the first 5 values of a data entry in dataTrue. var dataTrue = Object.values(item); dataTrue = dataTrue.slice(0,5); //Loop through dataInput and dataTrue, compare value at the same index. //Return false if there is an input but does not match the dataset....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function filterAll() {\n return filterIndex((refilter = crossfilter_filterAll)(values));\n }", "_filterByAll(query) {\r\n const that = this;\r\n\r\n that._filterInfo.query = query;\r\n\r\n if (query === '') {\r\n that.clearFilters();\r\n return;\r\n }\r\n...
[ "0.71772975", "0.7110514", "0.68042743", "0.6743858", "0.66655767", "0.6599078", "0.65916306", "0.65734977", "0.6552297", "0.65391886", "0.64974", "0.64912844", "0.6485072", "0.6448864", "0.6429434", "0.6360419", "0.63196987", "0.63174194", "0.6298179", "0.6297119", "0.628123...
0.7270206
0
get subraces of proper races
getSubracesofRace(raceId) { return axios.get(OTHER_API_BASE_URL + "/character_subraces/race", { params: { raceId: `${raceId}` } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function GetAllNextToGoRaces() {\n $.ajax({\n type: 'GET',\n url : nextToGoUrl,\n async : true,\n dataType: \"json\",\n success : function(response) {\n //Order all races start time order\n var sortedRaces = response.races.sort(function(a,b){\n return moment(a.raceStartTime) - mome...
[ "0.5704414", "0.5640391", "0.5620918", "0.55666155", "0.5547881", "0.54293984", "0.51370245", "0.50479424", "0.5044179", "0.5013161", "0.49989113", "0.49896154", "0.49871665", "0.49853694", "0.49844316", "0.49801296", "0.4972248", "0.49485847", "0.49428585", "0.49369386", "0....
0.6540429
0
Determine if user can unlock the current category
canUnlock() { return !this.categoryIsUnlocked(this.category) && this.user.gold >= this.category.cost && Object.get(this.user, 'total.academy.answers.approved') >= this.category.requiredAnswers; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "categoryIsUnlocked() {\n return this.user.einsteinChamber.categoriesIds.includes(this.category.id);\n }", "function setCategoryRights(){\n var catRights = allEnabled();\n //set the Admin rights\n setRight(catRights,'Admin','New Meeting',false);\n setRight(catRights,'Admin','...
[ "0.74455935", "0.5914294", "0.5693631", "0.5693631", "0.56751335", "0.5669435", "0.5669435", "0.5601392", "0.55710566", "0.54403025", "0.5395001", "0.53631586", "0.53581667", "0.5331577", "0.5323952", "0.5269777", "0.5248589", "0.5225658", "0.52167565", "0.52047235", "0.51686...
0.83490235
0
Check if the current category is unlocked by user
categoryIsUnlocked() { return this.user.einsteinChamber.categoriesIds.includes(this.category.id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "canUnlock() {\n return !this.categoryIsUnlocked(this.category) && this.user.gold >= this.category.cost && Object.get(this.user, 'total.academy.answers.approved') >= this.category.requiredAnswers;\n }", "isAuthorized(state, getters, rootState) {\n const playSpace = state.current\n if (!playSpa...
[ "0.79152167", "0.58690107", "0.57390046", "0.56629544", "0.5659183", "0.5543103", "0.5543103", "0.54704094", "0.54704094", "0.5427578", "0.54070866", "0.5397697", "0.5343272", "0.5315664", "0.53047866", "0.52974004", "0.52458614", "0.52458614", "0.5243417", "0.5238673", "0.52...
0.77524436
1
Logic to Start and Stop Moving Robot:
function driveLogic() { //We're in user-control (FULL mode) and can control the robot. (Your main program would be here!) if(robot.data.lightBumper || robot.data.bumpLeft || robot.data.bumpRight) robot.driveSpeed(0,0); //Disable motors. else robot.driveSpeed(robot.data.dropLeft?0:0,robot.data.dropRight?0:0); //En...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function moveOn() {\r\n stop = true;\r\n}", "function driveLogic() {\n\t\t//We're in user-control (FULL mode) and can control the robot. (Your main program would be here!)\n\t\tif(robot.data.lightBumper || robot.data.bumpLeft || robot.data.bumpRight) robot.driveSpeed(0,0); //Disable motors.\n\t\telse robot.dr...
[ "0.64674014", "0.6438748", "0.6231977", "0.62093294", "0.6192101", "0.6134682", "0.59946144", "0.59887666", "0.5984871", "0.5971606", "0.5957597", "0.5955925", "0.59371525", "0.592112", "0.58820313", "0.58729005", "0.5857793", "0.584292", "0.5836222", "0.58351773", "0.5830564...
0.65638465
0
creates buttons on event cards
function createButtons(){ if(currentEvent.type === 'no-action'){ var confirm = document.createElement('button'); confirm.id = 'confirm'; confirm.textContent = 'Proceed'; btnContainer.appendChild(confirm); } else { var acceptRisk = document.createElement('button'); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderButtons() {\n\n // Deleting the cartoons prior to adding new cartoon shows\n // (this is necessary otherwise we will have repeat buttons)\n $(\"#buttons-view\").empty();\n\n // Looping through the array of cartoon titles\n for (var i = 0; i < topics.length; i++) {\...
[ "0.7028292", "0.69541746", "0.6928702", "0.6920843", "0.69070697", "0.688277", "0.6865788", "0.6852533", "0.68493783", "0.6825308", "0.68089277", "0.6804423", "0.67863643", "0.6775248", "0.67738974", "0.6768537", "0.6765256", "0.675941", "0.67571306", "0.6746283", "0.67438763...
0.7043922
0
renders success card and event message
function successCard(){ blankCard(); cardImage.classList.remove('vanish'); var cardDisplay = document.getElementById('event-card'); cardDisplay.classList.add('success'); var successTitle = document.createElement('h3'); successTitle.textContent = 'SUCCESS!!!'; cardImage.src = 'img/success-gri...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "success() {\n if (this.props.success && this.props.successIndex === this.props.dish.id - 1) {\n return (\n <div id=\"message\" className=\"order-center alert alert-success\"><strong>SUCCESS!</strong></div>\n );\n }\n }", "function displaySuccess() {\n let bo...
[ "0.7007547", "0.68429375", "0.6777321", "0.66762173", "0.6529156", "0.65285635", "0.6500806", "0.6442668", "0.63597363", "0.6245291", "0.6213685", "0.6207337", "0.61244994", "0.61085874", "0.6076406", "0.60622495", "0.6048255", "0.60445476", "0.60396224", "0.6035766", "0.6033...
0.74633014
0
renders failure card and event message
function failureCard(){ blankCard(); cardImage.classList.remove('vanish'); var cardDisplay = document.getElementById('event-card'); cardDisplay.classList.add('failure'); var failureTitle = document.createElement('h3'); failureTitle.textContent = 'FAILURE!!!'; cardImage.src = 'img/failure-rad...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CardError(props) {\n return /*#__PURE__*/react_default.a.createElement(src[\"i\" /* Card */], _extends({\n color: \"text.onLight\",\n bg: \"light\",\n width: \"540px\",\n mx: \"auto\",\n my: 6,\n p: 5\n }, props));\n}", "function randomActivityFailure(err) {\n console.log(err);\n ...
[ "0.6666912", "0.6582883", "0.65445226", "0.6543688", "0.64928496", "0.6432047", "0.642509", "0.6412305", "0.6344755", "0.6341675", "0.6329695", "0.6240327", "0.6189317", "0.6185027", "0.61671466", "0.6160367", "0.6148287", "0.61033595", "0.6091563", "0.60653746", "0.60404474"...
0.727822
0
Constructor for ByteArray objects, after flash.utils.ByteArray.
function ByteArray (buffer) { if (buffer) { this.size = buffer.byteLength; } else { buffer = new ArrayBuffer(8); this.size = 0; } this.view = new Int8Array(buffer); this.position = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ByteArray(length){/**\n * Current stream `position`.\n * @default 0\n * @private\n */this.mPosition=0;this.buffer=new Uint8Array(length);this.dataView=new DataView(this.buffer.buffer);}", "constructor() {\n let size;\n if(typeof arguments[0] === 'number') {\n t...
[ "0.7227779", "0.65630674", "0.6398848", "0.6145862", "0.6145862", "0.6008495", "0.5860443", "0.58445644", "0.580676", "0.580676", "0.5801036", "0.5688483", "0.56622547", "0.5611428", "0.55971324", "0.55844754", "0.55833656", "0.55412847", "0.55412847", "0.55412847", "0.554128...
0.69161093
1
DETERMINING TEAMS finds which teams are at the event using schedule.json
function determineTeams() { let matches = Object.keys(schedule); // loops through each match for (let match_id in matches) { let match = schedule[match_id]; for (let team_id in match) { // checks to see if team is already in array if (teams.indexOf(match[team_id]) < 0) { // adds it to ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setup() {\n\n // create some dummy teams data\n let teams = [\n \n {\n school: \"Southern Illinois University Edwardsville\",\n team: \"SIUE Men's Basketball\",\n sport: \"basketball\",\n schedule: [\n ...
[ "0.7023361", "0.6217215", "0.6103917", "0.6088954", "0.60331726", "0.6014275", "0.5952825", "0.5919428", "0.5906134", "0.5874475", "0.5806809", "0.5776055", "0.57434314", "0.5735573", "0.5678525", "0.5674289", "0.5657883", "0.565495", "0.56510496", "0.5611965", "0.5600465", ...
0.6971435
1
actually inserts team into html, called by insertTeams()
function insertTeam(team) { // adds it to the team page with NUMBER, NAME, and ENTER BTN $(".teams-body").append(` <tr> <td>` + team + `</td> <td>` + team_id_to_name[team] + `</td> <td><button name="` + team + `" class="btn btn-success team-btn team` + team + `">Enter &#8594</button></td> ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function populateScreenTeam (teamObj){\n let team = \"<p>\" + teamObj.name + \"</p>\";\n let wins = \"<p style='color: #2b9642'>\";\n wins += teamObj.wins;\n wins += \" wins</p>\";\n let losses = \"<p style='color: #7a212c'>\";\n losses += teamObj.losses;\n losses += \" losses</p...
[ "0.6780954", "0.6569913", "0.65679014", "0.65642256", "0.640422", "0.63947445", "0.63577044", "0.633428", "0.62478584", "0.6231328", "0.6211586", "0.620473", "0.61871", "0.6174062", "0.6120223", "0.6113467", "0.6069231", "0.6057316", "0.60510033", "0.6045916", "0.6044994", ...
0.7355939
0
inserts teams into Teams page
function insertTeams() { // first, check to see if team_id_to_name matches teams if (fs.existsSync("./resources/teams.json")) { // if there is a teams file, use that to determine team names at the event let file = JSON.parse(fs.readFileSync("./resources/teams.json")); // if the list of teams we know equ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function insertTeamsWithTBA() {\n for (let team_id in teams) { // for each team\n let team = teams[team_id];\n // gets team name via TBA call\n team_api.getTeam(\"frc\" + team, {}, function(error, data, response) {\n if (error) {\n console.error(error);\n } else {\n team_id_to_nam...
[ "0.774611", "0.7450123", "0.6570721", "0.65289384", "0.65131074", "0.6485441", "0.64199144", "0.6406053", "0.6388138", "0.63811356", "0.62471616", "0.62217796", "0.62147063", "0.6206912", "0.6191159", "0.6171945", "0.6159385", "0.6156506", "0.61464816", "0.6139414", "0.611719...
0.7833264
0
loads local stand, pit, notes, and image data
function loadData() { // STAND loadStandData(); // PIT loadPitData(); // IMAGES loadImageData(); // NOTES loadNotesData(); // PRESCOUTING loadPrescouting("./resources/prescout.csv"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function preload() {\n data = loadStrings('https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_month.csv');\n mapimg = loadImage('https://api.mapbox.com/styles/v1/mapbox/dark-v9/static/'+clon+','+clat+','+zoom+'/'+w+'x'+h+'?access_token=pk.eyJ1IjoiY29kaW5ndHJhaW4iLCJhIjoiY2l6MGl4bXhsMDRpNzJxcDh0a2N...
[ "0.6979065", "0.67312163", "0.67202854", "0.6707538", "0.6693809", "0.6677129", "0.665736", "0.65877026", "0.6580583", "0.6542958", "0.65355873", "0.65252113", "0.6493404", "0.6473945", "0.6467772", "0.64448327", "0.64367193", "0.6426462", "0.6397169", "0.63725305", "0.634987...
0.6849028
1
loads data from data/stand/manifest.json
function loadStandData() { // loads through each file in manifest for (let data_id in manifest_stand) { let file_name = manifest_stand[data_id]; // e.g. m1-r1-1540.json if (fs.existsSync("./data/stand/" + file_name)) { let data_point = fs.readFileSync("./data/stand/" + file_name); // Parses the ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function load() {\n m_data.load(APP_ASSETS_PATH + \"ded_moroz_06.json\", load_cb, preloader_cb);\n}", "function loadManifest(manifest) {\n let data = utils.readFile(manifest);\n let json = data.join(' '); \n return JSON.parse(json);\n}", "function loadData() {\n loadJson('am');\n loadJson('pm');\n}", ...
[ "0.70259523", "0.685552", "0.6558895", "0.6473996", "0.6242917", "0.61770344", "0.605166", "0.6031995", "0.5957571", "0.59351397", "0.59187657", "0.589547", "0.5840447", "0.58116084", "0.5780871", "0.5780871", "0.5780871", "0.5767375", "0.57629097", "0.575128", "0.5743529", ...
0.7203882
0
loads data from data/pit/manifest.json
function loadPitData() { // loads through each file in manifest for (let data_id in manifest_pit) { let file_name = manifest_pit[data_id]; // e.g. 1540.json if (fs.existsSync("./data/pit/" + file_name)) { let data_point = JSON.parse(fs.readFileSync("./data/pit/" + file_name)); let team_name = da...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadManifest(manifest) {\n let data = utils.readFile(manifest);\n let json = data.join(' '); \n return JSON.parse(json);\n}", "function load() {\n m_data.load(APP_ASSETS_PATH + \"ded_moroz_06.json\", load_cb, preloader_cb);\n}", "function loadData() {\n loadJson('am');\n loadJson('pm');\n}", ...
[ "0.69752264", "0.64285123", "0.62542933", "0.61649036", "0.6110194", "0.5980004", "0.5935763", "0.5917483", "0.5901444", "0.5882107", "0.5853556", "0.57682484", "0.57620263", "0.5758396", "0.5756385", "0.5745214", "0.57116044", "0.5683908", "0.56437284", "0.5637865", "0.56054...
0.77757686
0
loads data from data/images/manifest.json
function loadImageData() { // loads through each link/file in manifest for (let data_id in manifest_images) { let file_name = manifest_images[data_id]; // e.g. "1540-2.json" or "1540@https://i.imgur.com/2p3NEQB.png" // if there is an "@" in the name (i.e. if from the world wide web) if (file_name.split(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function load() {\n m_data.load(APP_ASSETS_PATH + \"ded_moroz_06.json\", load_cb, preloader_cb);\n}", "function loadManifest(manifest) {\n let data = utils.readFile(manifest);\n let json = data.join(' '); \n return JSON.parse(json);\n}", "function loadPitData() {\n // loads through each file in manifest...
[ "0.6486975", "0.62714344", "0.6177911", "0.60736996", "0.59669036", "0.59345037", "0.5898899", "0.5821098", "0.58107364", "0.5791228", "0.5756666", "0.57214427", "0.5710405", "0.5673587", "0.5655583", "0.5635486", "0.5634706", "0.5619994", "0.5606321", "0.5593223", "0.5584566...
0.74237466
0
loads data from data/notes/manifest.json
function loadNotesData() { // loads through each file in manifest for (let data_id in manifest_notes) { let file_name = manifest_notes[data_id]; // 5-135935359979.json (the second # is just for getting rid of duplicates) if (fs.existsSync("./data/notes/" + file_name)) { let data_point = JSON.parse(fs....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadManifest(manifest) {\n let data = utils.readFile(manifest);\n let json = data.join(' '); \n return JSON.parse(json);\n}", "function loadNotesFromJSON(data) {\n\t\ttuneJSON = data;\n\t\tloadCanvas();\n\t}", "function getNotes() {\n chrome.storage.local.get(['notes-keeper'], function(result) {...
[ "0.64827514", "0.61826855", "0.61307544", "0.6094586", "0.6056578", "0.6041838", "0.60301805", "0.58615685", "0.58524156", "0.5804718", "0.5770841", "0.5763182", "0.56674284", "0.5643398", "0.5587426", "0.5562604", "0.5542126", "0.5523559", "0.54958546", "0.5494586", "0.54597...
0.73085624
0
sets default values for a stand data file
function setDefaultsForStand(data_point, file_name) { ///////////////////////////////////////////////////////////////////////////////////// // REMOVE THIS PART ONCE WE ACTUALLY COLLECT NEW DATA // It adds match, role, and team to stand app files, which the new stand app automatically does //////////////////////...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setDefaults() {\n dimension.value = 20;\n sim.value = 0.35;\n vacant.value = 0.1;\n split.value = 0.6;\n aColor.value = \"#006EFF\";\n bColor.value = \"#FF7B00\";\n}", "function defaultValues(){\n\tbluValue=0;\n\thueRValue=0;\n\tinvtValue=0;\n\tbrightnValue=1;\n\tsepiValue=0;\n\tgraysaValue=0;\n\t...
[ "0.62634254", "0.62249696", "0.62133324", "0.6129554", "0.6088564", "0.6088564", "0.6088564", "0.60632527", "0.60632527", "0.60632527", "0.5938599", "0.59378463", "0.59287584", "0.59228826", "0.5911741", "0.58971053", "0.5885193", "0.5880254", "0.5850783", "0.5848382", "0.582...
0.72830343
0
sets default values for a pit data file
function setDefaultsForPit(data_point) { // sets default values to unfilled JSON requirements traverseScoutKitJSON(defaultPitJSON, function(json, page, page_index, question, question_index) { // if the question is not in the JSON if (data_point[page][question] === undefined) { // it adds the default r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setDefaultsForStand(data_point, file_name) {\n /////////////////////////////////////////////////////////////////////////////////////\n // REMOVE THIS PART ONCE WE ACTUALLY COLLECT NEW DATA\n // It adds match, role, and team to stand app files, which the new stand app automatically does\n /////////////...
[ "0.670721", "0.6167029", "0.6149649", "0.60510355", "0.5987065", "0.5928214", "0.5909016", "0.5863254", "0.58340985", "0.58062065", "0.5742343", "0.56762123", "0.56546545", "0.5561483", "0.5530755", "0.54979956", "0.54924417", "0.5489975", "0.5475748", "0.54213417", "0.541339...
0.67128897
0
function that loads the important files (above)
function loadImportantFiles() { // Schedule if (fs.existsSync("./resources/schedule.json")) { schedule = JSON.parse(fs.readFileSync("./resources/schedule.json")); } else { alert("Please load a valid schedule."); return; } // Scouts if (fs.existsSync("./resources/scouts.json")) { scouts = JSON.pa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadFiles() {\n loadConfig();\n loadDictionary();\n loadBlacklist();\n loadBonusPhrases();\n\n console.log('All files loaded');\n}", "function loadMainProcessFiles () {\n const files = glob.sync(path.join(__dirname, '_side-back/js/**/*.js'))\n files.forEach((file) => { require(file) })\...
[ "0.71959466", "0.6602459", "0.64895713", "0.6452929", "0.63809365", "0.6256331", "0.6168898", "0.6127941", "0.6119422", "0.6101978", "0.60822064", "0.60822064", "0.6072073", "0.6048347", "0.5982194", "0.59563816", "0.59376657", "0.59359777", "0.5917769", "0.59081966", "0.5885...
0.7223262
0
loads a schedule or scouts file from a path
function loadFileFromPath(path) { if (searching == "scouts") { // copies the scouts file over let file = fs.readFileSync(path).toString(); if (isJsonString(file) && file[0] == "{") { fs.writeFileSync("./resources/scouts.json", file); } // copies the schedule file over } else if (searching ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "loadFile(path) {\r\n path = this.getAbsoluteDataPath(path);\r\n // Check if a file exists at this path\r\n if (FS_1.FS.existsSync(path)) {\r\n try {\r\n // If it exists, read the contents\r\n const contents = FS_1.FS.readFileSync(path, \"utf8\");\r\n ...
[ "0.6451614", "0.63566804", "0.60039234", "0.5886118", "0.5879703", "0.5794615", "0.5740832", "0.57328165", "0.5699024", "0.56739086", "0.55980784", "0.5559223", "0.5532387", "0.54975575", "0.5497387", "0.5471166", "0.5470788", "0.5442971", "0.5439633", "0.5415608", "0.5392288...
0.7818204
0
loads data from a path and moves it to the "data" folder
function loadDataFromPath(path) { // if we are looking for data if (searching == "data") { // loading stand and pit data const types = ["stand", "pit", "notes"]; // runs the following code for "stand", "pit", and "notes" for (let type_id in types) { let type = types[type_id]; // if the m...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function move(newPath) {\n fetchData(false);\n }", "function loadData(path){\n setLoader();\n fetch(path)\n .then(function(response) {return response.json()})\n .then(function(json){\n createMainContainer(json);\n getCharPhoto(json)\n getCharInfo(json);\n getSuplData(json);\n removeLoader(...
[ "0.6455789", "0.6314849", "0.6260807", "0.6251649", "0.622865", "0.61554533", "0.61443305", "0.6029196", "0.5792736", "0.5787642", "0.5776179", "0.5765085", "0.5750442", "0.56760895", "0.5675334", "0.56695646", "0.5653815", "0.56485146", "0.5621099", "0.5587585", "0.5569516",...
0.68665564
0
loads photos from TBA for a given team, inspired by 2521's Robot Scouter
function loadMediaFromTBA(team) { if (image_data[team] === undefined) { image_data[team] = []; } // gets images for a team for a given year team_api.getTeamMediaByYear("frc" + team, year, {}, function(error, data, response) { if (error) { loaded_images_from_tba += 1; console.error(error); } el...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getImages() {\n alert(\"Page will reload once images are finished loading\");\n // runs 1540photo.py, which collects images from Gmail\n exec(\"python 1540photo.py\");\n loaded_images_from_tba = 0;\n // for each team, loads media\n for (let team_id in teams) {\n loadMediaFromTBA(teams[team_id]);\...
[ "0.6382371", "0.5997222", "0.5848781", "0.5834236", "0.58119774", "0.5589585", "0.5545334", "0.55162495", "0.5505681", "0.55034167", "0.5463387", "0.54457206", "0.5443674", "0.5418612", "0.5413483", "0.53887266", "0.53789526", "0.534887", "0.53470063", "0.5334668", "0.5323474...
0.82927436
0
saves a manifest.json after loading images
function saveImageManifest() { // checks to see if data from all teams have been collected if (loaded_images_from_tba == teams.length) { fs.writeFileSync("data/images/manifest.json", JSON.stringify(manifest_images)); // reloads the page afterwards window.location.reload(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function writeManifestToFile() {\n var jsonContent = JSON.stringify(this.manifest, null, \" \");\n var strFileName = io.appendPath(conf.manifestPath, this.strManifestFileName);\n io.writeFile(strFileName, jsonContent);\n}", "function saveSprite() {\n // TODO: See if it's possible to kick back .json do...
[ "0.6850557", "0.6218921", "0.6146653", "0.6014892", "0.5968961", "0.5899629", "0.585521", "0.5846093", "0.5828195", "0.5786338", "0.5761604", "0.5709413", "0.56973946", "0.5642642", "0.5641221", "0.56376034", "0.56360173", "0.5634777", "0.5621736", "0.5601547", "0.55980843", ...
0.8182582
0
this function changes the page when a button is selected team is the selected_team of that page direction is positive if we are going forward through history
function switchPages(new_page, team, match, direction) { window.scrollTo(0, 0); // sets the page scroll to its initial state $(".page").hide(); // hides all pages, but will show them again later in function $("#" + new_page).show(); // shows new page if (direction > 0) { history.push([current_page, selected_tea...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function prevBtnFun() {\r\n let doneStage = document.querySelectorAll('section.header.stages .stage.done');\r\n for (let i = 0; i < doneStage.length; i++) {\r\n if ((i + 1) === doneStage.length) {\r\n let prevPage = doneStage[i].getAttribute('data-stage');\r\n window.location.hr...
[ "0.65313834", "0.6380529", "0.63325125", "0.6313781", "0.6184582", "0.61721146", "0.6148096", "0.60757303", "0.60377514", "0.5993222", "0.5986732", "0.59809124", "0.5977464", "0.5960538", "0.5918447", "0.5906628", "0.59063286", "0.5905246", "0.588478", "0.58707774", "0.586897...
0.7125286
0
CALCULATING SCORES FOR MATCHES / GAME SPECIFIC match is an object calculates a score for a match
function calculateScore(match) { let score = 0; // cross line if (match["Start"]["Cross Line"] == "1") { score += 3; } else if (match["Start"]["Cross Line"] == "2") { score += 6; } let climb_score = 0; // platform if (match["Endgame"]["Platform"] == "level 1") { climb_score += 3; } else if...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calculateScores(team) {\n let team_matches = stand_data[team];\n let overall_scores = []; // an array of each score for each match\n let num_hatches = []; // num of hatch for a match\n let num_cargo = []; // num of cargo for a match\n for (let match_index in team_matches) {\n let match = team_matc...
[ "0.7094464", "0.7008242", "0.69853306", "0.6926551", "0.6663813", "0.6660912", "0.6648343", "0.6536359", "0.652353", "0.65158343", "0.6515488", "0.64807063", "0.642539", "0.6376305", "0.6361992", "0.6359711", "0.6344067", "0.63424665", "0.634156", "0.6330993", "0.6315438", ...
0.7412626
0
returns the number of game pieces of a certain type placed in a given match type is either Hatch or Cargo
function calculateNumGamePieces(match, type) { // game_piece_vals is all the questions we check from the data point let game_piece_vals = [type + " Ship", type + " Low", type + " Mid", type + " High"]; let num_pieces = 0; for (let i in game_piece_vals) { num_pieces += parseInt(match["Teleop"][game_piece_val...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function counttype(thistype,thisstate)\n{var typecounter=0;\nfor (var k=0;k<wholeworld.length;k++)\n{if(wholeworld[k].type == thistype && wholeworld[k].state == thisstate){typecounter++}}\nreturn typecounter;}", "function countGames(games, type) {\n games = system_linq_Enumerable.Where(games, function (a) {\n...
[ "0.6104079", "0.6038574", "0.6035391", "0.57539713", "0.5738584", "0.54510456", "0.5417122", "0.5412542", "0.5402651", "0.5384199", "0.5370584", "0.5283933", "0.5232684", "0.52098906", "0.5183195", "0.51785564", "0.51443416", "0.5134988", "0.51198906", "0.5107201", "0.5083725...
0.80200833
0
calculates all the scores for a team, for each match returns an array of thre arrays, [overallScores, numHatchesPerMatch, and numCargoPerMatch]
function calculateScores(team) { let team_matches = stand_data[team]; let overall_scores = []; // an array of each score for each match let num_hatches = []; // num of hatch for a match let num_cargo = []; // num of cargo for a match for (let match_index in team_matches) { let match = team_matches[match_i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "computePlayerScores(players) {\n const participants = [ ...this.#teamAlpha_.keys(), ...this.#teamBravo_.keys(), ...players ];\n const statistics = new Map();\n\n // (1) Store all dimensions for the |player| in the |statistics| map. A separate routine\n // will sort each of the individua...
[ "0.7064265", "0.7044628", "0.6931445", "0.68144673", "0.6780757", "0.6654702", "0.66457033", "0.6639587", "0.6575642", "0.65604883", "0.6500204", "0.64944816", "0.6482436", "0.6481418", "0.63333386", "0.6292575", "0.626798", "0.62581813", "0.6196371", "0.61864954", "0.6167715...
0.8965511
0
resets the data in the team page
function resetTeamPage() { // erases all previous table data $("#indv-team-body").html(""); // erases all images $("#team-image-div").html(""); $(".carousel-inner").html(""); $(".carousel-indicators").html(""); // erases all previous modal data let button_values_keys = Object.keys(button_values); for ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearTeamForm (){\n vm.Team = {};\n defaultPlayers();\n }//end of function clearTeamForm", "function resetData() {\n\t\t\tconsole.log(\"resetData()\");\n\n\t\t\tvm.results = [];\n\t\t\tvm.selectedIndex = -1;\n\t\t\tvm.total_count = 0;\n\n\t\t\t// rebuild empty apiDomain submission object, e...
[ "0.7347778", "0.7184254", "0.70548755", "0.70468086", "0.702732", "0.6948788", "0.68957835", "0.68781066", "0.68548405", "0.683992", "0.68036515", "0.6799998", "0.6780393", "0.67409474", "0.6732034", "0.6725449", "0.67096764", "0.6690016", "0.66894746", "0.6651666", "0.664739...
0.7973706
0
adds stand data to team page game specific
function addStandDataToPage() { // loops through each match for (let match_id in stand_data[selected_team]) { let match = stand_data[selected_team][match_id]; // the HTML which will be appended to the <tbody> let append_html = `<tr><td>` + match["info"]["match"] + `</td>`; if (match["Stand"]["Login"...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function populateScreenTeam (teamObj){\n let team = \"<p>\" + teamObj.name + \"</p>\";\n let wins = \"<p style='color: #2b9642'>\";\n wins += teamObj.wins;\n wins += \" wins</p>\";\n let losses = \"<p style='color: #7a212c'>\";\n losses += teamObj.losses;\n losses += \" losses</p...
[ "0.64736485", "0.6279052", "0.6238716", "0.6218151", "0.6135643", "0.611237", "0.60565454", "0.5999017", "0.59940153", "0.59616363", "0.59538704", "0.5950949", "0.59351903", "0.59261405", "0.59189177", "0.59077024", "0.589803", "0.5885604", "0.5874892", "0.58613664", "0.58569...
0.7094511
0
adds pit data to the team page
function addPitDataToPage() { // pit scouting data let pit_data_point = pit_data[selected_team]; // checks to see if pit data point actually exists if (pit_data_point !== undefined) { // traverses the pit JSON and runs addButtonData() for each question traverseScoutKitJSON(pit_data_point, function(json,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addPrescoutDataToPage() {\n // prescouting data\n let prescout_data_point = prescout_data[selected_team];\n // checks to see if prescout data point actually exists\n if (prescout_data_point !== undefined) {\n let questions = Object.keys(prescout_data_point);\n for (let question_index in question...
[ "0.6902146", "0.6632439", "0.63430095", "0.61638093", "0.60349184", "0.6006242", "0.5989616", "0.59802645", "0.59617364", "0.5951905", "0.58942294", "0.58718145", "0.5857362", "0.5800591", "0.574433", "0.5713413", "0.5698767", "0.5686781", "0.5667584", "0.5665937", "0.5653292...
0.8159034
0
adds prescout data to the team page
function addPrescoutDataToPage() { // prescouting data let prescout_data_point = prescout_data[selected_team]; // checks to see if prescout data point actually exists if (prescout_data_point !== undefined) { let questions = Object.keys(prescout_data_point); for (let question_index in questions) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addPitDataToPage() {\n // pit scouting data\n let pit_data_point = pit_data[selected_team];\n // checks to see if pit data point actually exists\n if (pit_data_point !== undefined) {\n // traverses the pit JSON and runs addButtonData() for each question\n traverseScoutKitJSON(pit_data_point, fun...
[ "0.7022327", "0.6972166", "0.63548064", "0.62838334", "0.6246765", "0.62103724", "0.60612166", "0.60094476", "0.58650005", "0.5816114", "0.5802264", "0.5797515", "0.5746952", "0.5715393", "0.5688049", "0.56756985", "0.5650213", "0.56217736", "0.55903125", "0.5584099", "0.5576...
0.7825261
0
adds overall statistics to buttons game specific
function addOverallStatsToPage() { // e.g. ["Hatch", "Cargo", "Climb"] let button_values_keys = Object.keys(button_values); for (let btn in button_values_keys) { let btn_title = button_values_keys[btn]; // calculates scores for all matches // [[list of scores], [list of # hatches], [list of # cargo]] ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function gameButtonsLogic() {\n $(\"#bluegem\").click(function () {\n totalScore += bluegem;\n $(\"#butt1\").text(totalScore);\n gameLogic();\n \n });\n\n $(\"#glovegem\").on(\"click\", function () {\n totalScore += glovegem;\n ...
[ "0.70697814", "0.6690207", "0.6583044", "0.6519794", "0.6487338", "0.64803994", "0.6432299", "0.639006", "0.6366739", "0.63492113", "0.6325378", "0.6318074", "0.6294415", "0.6281628", "0.6266815", "0.62593967", "0.62435585", "0.62426883", "0.6241766", "0.62116474", "0.620598"...
0.7563239
0
adds notes to team page
function addNotesToPage() { // for each data_point in this team's notes_data for (let data_point_index in notes_data[selected_team]) { // data_point is new notes to add let data_point = notes_data[selected_team][data_point_index]; // adds a new line $("#notes-" + selected_team + "-" + data_point[1])...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handler () {\n notes.addNote(title, body);\n }", "function addNote()\n{\n\tcreatePop(\"Add Note\", submitNote,{})\n}", "function addNote(){\n var noteText = document.getElementById(\"note_text\").value;\n noteList.addNote(noteText);\n displayNotes();\n }", "function newNote() {\n v...
[ "0.6874442", "0.6589135", "0.65162945", "0.65159607", "0.65010303", "0.6329122", "0.6320535", "0.63174385", "0.62470806", "0.62393653", "0.62250465", "0.6223344", "0.62159103", "0.61957616", "0.6189904", "0.61775315", "0.6150757", "0.6100672", "0.6099464", "0.6081652", "0.606...
0.7954587
0
adds to data to view data button
function addDataToViewDataButton() { // loops through each match selected_team was in for (let match_id in stand_data[selected_team]) { // match is an object let match = stand_data[selected_team][match_id]; // traverses through each question in match and adds result to View Data Button traverseScout...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addButton(data){\n\t\tif (data.length>0){\n\t\t\t\tnewbutton=\"<button class='stream' id=\"+data[0]+\">\"+data[0]+\" \"+data[1]+\"</button>\";\n\t\t\t\t$(newbutton).insertBefore($(\"#NEW\")).click(function(){actionButton(this);});\n\t\t\t};\n\t}", "setDataViewData() {\r\n if (!this.dataView) return;\...
[ "0.6561368", "0.65341604", "0.65213424", "0.64305407", "0.64305407", "0.6370524", "0.6356438", "0.6278667", "0.62449193", "0.62449193", "0.62449193", "0.62146527", "0.62092835", "0.61823493", "0.6149553", "0.61436445", "0.61347234", "0.6080577", "0.6062545", "0.6036775", "0.5...
0.7200126
0
adds teamspecific data to button code is the unique id for the button match is the match number (or a unique code for the row) obtainValues is a list of functions which obtain values
function addButtonData(code, match, obtainValues) { $(".tbody-" + code).append(`<tr class="tr-` + code + `-` + match + `"></tr>`); // extra classes the tds will have let added_classes = ""; // gives notes a notes-td class if (obtainValues[0]() == "Notes") { added_classes = "notes-td"; } // loops throu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addDataToViewDataButton() {\n // loops through each match selected_team was in\n for (let match_id in stand_data[selected_team]) {\n // match is an object\n let match = stand_data[selected_team][match_id];\n // traverses through each question in match and adds result to View Data Button\n tr...
[ "0.66431487", "0.6506585", "0.61998576", "0.60120887", "0.5705586", "0.56325954", "0.5441208", "0.5431192", "0.54119843", "0.5371724", "0.5363528", "0.535909", "0.5352098", "0.53302735", "0.5287511", "0.52528775", "0.521293", "0.5207989", "0.5195142", "0.51825964", "0.5172299...
0.7012858
0
adds an overall stat (e.g. median, maximum) "stat_value" to a div with code "code"
function addButtonOverallStat(code, stat_name, stat_value) { // rounds to hundredths stat_value = roundto100th(stat_value); // if there is not a div for holding the stats yet if ($(".tbody-btn-div-" + code).length == 0) { // creates a div to hold all overall stats $(".tbody-" + code).append(`<div class=...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addStat (type, message){\n var tpl = '<div class=\"stat '+type+'\">'+message+'</div>';\n document.querySelector('.stats').innerHTML+=tpl;\n}", "function MemberReview(){\n $('.progress-rv').each(function (index,value){\n var datavalue=$(this).attr('data-value'),\n p...
[ "0.5719017", "0.56414145", "0.54578435", "0.53183687", "0.5205177", "0.51616216", "0.513743", "0.51328605", "0.5113753", "0.5111536", "0.51096076", "0.51089394", "0.51086885", "0.50744444", "0.50453514", "0.5041181", "0.503879", "0.5010722", "0.50089985", "0.49733934", "0.495...
0.67767316
0
sortTable() function sorts the teams page table after all teams are loaded sorts them by team number
function sortTable() { if (loaded_teams < teams.length) { window.setTimeout(sortTable, 200); return; } fs.writeFileSync("./resources/teams.json", JSON.stringify(team_id_to_name)); var table, rows, switching, i, x, y, shouldSwitch; table = document.getElementById("teams-table"); switching = true; /...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sortTeams(tableName) {\n var teams = Object.keys(data.scores);\n\n sortedTeams = teams.sort(function(teamA, teamB) {\n achievement_diff = Number(data.scores[teamA][tableName]['achievements']) - Number(data.scores[teamB][tableName]['achievements']);\n //console.log(data.scores[teamA][tableName]['Ac...
[ "0.7115365", "0.69382405", "0.6856945", "0.68034285", "0.6713055", "0.6672052", "0.6651349", "0.66116714", "0.6570063", "0.6549793", "0.6533717", "0.65154445", "0.65072936", "0.64937973", "0.64599395", "0.6434694", "0.6432817", "0.6411518", "0.63951135", "0.6374527", "0.63477...
0.79891235
0
SCOUTS PAGE adds scout to table if it isn't there yet
function addScoutToTable(scout_name, scout_id) { $(".scout-list-table").append(` <tr> <td>` + scout_name + `</td> <td class=matches-` + scout_id + `>1</td> </tr> `); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function populateScouts() {\n let stand_keys = Object.keys(stand_data);\n for (let team_id in stand_keys) {\n let team = stand_keys[team_id];\n for (let data_id in stand_data[team]) {\n let data_point = stand_data[team][data_id];\n let scout_id = data_point[\"Stand\"][\"Login\"];\n // is the...
[ "0.63115776", "0.5600815", "0.55440706", "0.55419827", "0.5393448", "0.5374216", "0.53287894", "0.528024", "0.5276434", "0.52688", "0.5254044", "0.5230549", "0.5227274", "0.5227022", "0.51774895", "0.51774895", "0.5163267", "0.51415557", "0.5140967", "0.51381207", "0.51381207...
0.6190873
1
RANKINGS PAGE / GAME SPECIFIC adds a specific team to a table on the ranking page
function addTeamToRankingTable(team_num, score, rank) { $("#ranking-row-" + rank).append(` <td class="ranking-team-` + team_num + `"><strong>` + team_num + `</strong> (` + score + `)</td> `); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addRankingsToPage() {\n // creates a row for each team\n for (let team_id in teams) { addRankingRow(team_id); }\n addCategoryToRankings(hatchTest);\n addCategoryToRankings(cargoTest);\n addCategoryToRankings(cargoHatchTest);\n addCategoryToRankings(defenseTest);\n // makes each team clickable to se...
[ "0.772653", "0.71350867", "0.6911798", "0.67470104", "0.6271392", "0.6250172", "0.6114711", "0.61001855", "0.6062341", "0.603153", "0.6030516", "0.5980667", "0.5961112", "0.59470946", "0.5931996", "0.5927615", "0.59035796", "0.5898068", "0.5892998", "0.5881399", "0.5880426", ...
0.7813888
0
creates a ranking row for the table
function addRankingRow(rank) { $(".team-rankings-table").append(` <tr id="ranking-row-` + rank + `"> <td>` + (parseInt(rank) + 1) + `</td> </tr> `); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addTeamToRankingTable(team_num, score, rank) {\n $(\"#ranking-row-\" + rank).append(`\n <td class=\"ranking-team-` + team_num + `\"><strong>` + team_num + `</strong> (` + score + `)</td>\n `);\n}", "function createRanksTable(arrs) {\n // Check if input params is valid\n if (!Array.isArray(arr...
[ "0.64339644", "0.6229286", "0.6041089", "0.5997191", "0.5910396", "0.5850676", "0.5808687", "0.5767692", "0.57664144", "0.5691231", "0.56356835", "0.5635588", "0.5599015", "0.55904776", "0.55864364", "0.5565752", "0.5530429", "0.5527638", "0.5520652", "0.5512168", "0.55077493...
0.77293754
0
adds a category to the rankingTable
function addCategoryToRankings(categoryTest) { // an array of arrays of team numbers and scores let teamsAndScores = sortTeamsByCategory(categoryTest); for (let team_id in teamsAndScores) { let data = teamsAndScores[team_id]; // adds a team to the table given their team name, score, and rank addTeamTo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addCategory(category) {\n query.categories.push(category);\n}", "function addCategory(category) {\n// var db = ScriptDb.getMyDb(); \n var db = ParseDb.getMyDb(applicationId, restApiKey, \"list\");\n \n if (category == null) {\n return 0; \n }\n \n // if (db.query({type: \"list#categories\...
[ "0.63792765", "0.6167036", "0.60942954", "0.5950839", "0.58420527", "0.5826995", "0.5824969", "0.58104044", "0.5712668", "0.5674654", "0.5655722", "0.5628053", "0.56223303", "0.5565039", "0.5536861", "0.5536861", "0.55232936", "0.548428", "0.543127", "0.53970474", "0.5386161"...
0.7324057
0
sorts all teams by a category
function sortTeamsByCategory(categoryTest) { let teamsAndScores = [] for (let team_id in teams) { let team_num = teams[team_id]; // gets rid of teams without data if (Object.keys(stand_data).indexOf(team_num) < 0) { continue; } teamsAndScores.push([parseInt(team_num), categoryTest(team_num)]); } ...
{ "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.69927007", "0.6507955", "0.61457616", "0.60803473", "0.5914927", "0.5890459", "0.5887153", "0.58827347", "0.58667684", "0.5831631", "0.579127", "0.5727561", "0.570001", "0.56499535", "0.56284994", "0.5623323", "0.561749", "0.5567488", "0.5535781", "0.55314946", "0.5525734"...
0.7718904
0
calculates the median number of hatches for a team
function hatchTest(team) { // data about the team's scores let team_scores = calculateScores(team); // median number of hatches per match let hatch_avg = roundto100th(jStat.median(team_scores[1])); return hatch_avg; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cargoHatchTest(team) {\n // data about the team's scores\n let team_scores = calculateScores(team);\n // median number of hatches per match\n let hatch_avg = roundto100th(jStat.median(team_scores[1]));\n // median number of cargo per match\n let cargo_avg = roundto100th(jStat.median(team_scores[2]))...
[ "0.6967143", "0.6541172", "0.636583", "0.6359183", "0.63303006", "0.6270459", "0.62356657", "0.6201811", "0.61826956", "0.61265135", "0.6125254", "0.6125163", "0.6118561", "0.6097701", "0.6023424", "0.6016948", "0.6010191", "0.59747285", "0.59552085", "0.59197193", "0.5916382...
0.75304615
0
calculates the median number of cargo for a team
function cargoTest(team) { // data about the team's scores let team_scores = calculateScores(team); // median number of cargo per match let cargo_avg = roundto100th(jStat.median(team_scores[2])); return cargo_avg; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findMedian(nums) {\n nums.sort((a,b) => a-b);\n let middleIndex = Math.floor(nums.length / 2);\n let median;\n if (nums.length % 2 === 0) {\n median = (nums[middleIndex] + nums[middleIndex - 1]) /2;\n } else {\n median = nums[middleIndex];\n }\n return median;\n }", "function median(arr) {...
[ "0.66468275", "0.6596689", "0.65270376", "0.6488969", "0.63604987", "0.6356793", "0.6313109", "0.6302209", "0.6297882", "0.6277584", "0.62765825", "0.6257372", "0.6243389", "0.6175009", "0.616667", "0.6161264", "0.613606", "0.60850126", "0.6081513", "0.6075496", "0.6075455", ...
0.7224344
0
calculates the median number of cargo and hatches for a team
function cargoHatchTest(team) { // data about the team's scores let team_scores = calculateScores(team); // median number of hatches per match let hatch_avg = roundto100th(jStat.median(team_scores[1])); // median number of cargo per match let cargo_avg = roundto100th(jStat.median(team_scores[2])); return ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hatchTest(team) {\n // data about the team's scores\n let team_scores = calculateScores(team);\n // median number of hatches per match\n let hatch_avg = roundto100th(jStat.median(team_scores[1]));\n return hatch_avg;\n}", "function cargoTest(team) {\n // data about the team's scores\n let team_sc...
[ "0.70404905", "0.69769114", "0.5902052", "0.58797604", "0.5819501", "0.5807562", "0.5741629", "0.5719535", "0.56767184", "0.56709266", "0.5660067", "0.5570719", "0.5548928", "0.55335534", "0.5522973", "0.55174786", "0.5511213", "0.55023676", "0.5462966", "0.54326934", "0.5431...
0.7414641
0
calculates the percentage of matches them boios play defense
function defenseTest(team) { let num_defense = 0; let team_matches = stand_data[team]; for (let match_id in team_matches) { let data_point = team_matches[match_id]; let played_defense = data_point["Teleop"]["Played Defense"]; if (played_defense == "true" || played_defense == "yes") { num_defense...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CalGoalsPerMatch(playerInstance)\r\n{\r\n \r\n// Object with goals per match formula\r\n\r\nformulaObj = {\r\n\r\n// goals / (losses + wins + draws);\r\n formula:playerInstance.stats[0].value / (playerInstance.stats[1].value + playerInstance.stats[2].value + playerInstance.stats[3].value)\r\n\r\n}\r\n\r...
[ "0.685479", "0.67491466", "0.66309965", "0.66177547", "0.6609126", "0.6577833", "0.65554154", "0.651785", "0.6422669", "0.6388843", "0.63871944", "0.636644", "0.6365145", "0.6363005", "0.6358975", "0.6354118", "0.63404727", "0.63137543", "0.6256399", "0.62397856", "0.6239541"...
0.7093887
0
MATCH PAGE loc is the location to add the match to team is the selected_team
function createMatch(loc, match_number, team) { // html to append to loc let append_html = ` <div style="text-align:center"> <h3>` + match_number + `</h3> <div>`; // for each team in the match for (let team_index in schedule[match_number.toString()]) { // e.g. "1540" let displayed_team =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function putMatchInAppropriateTeam(teams, match) {\n let t1idx = -1;\n for (let i = 0; i < teams.length; i++) {\n if (teams[i].name == match.t1) {\n t1idx = i;\n break;\n }\n }\n let team1 = teams[t1idx];\n team1.matches.push({\n vs: match.t2,\n self...
[ "0.6273068", "0.60134774", "0.5984653", "0.5969165", "0.57229215", "0.5641762", "0.564043", "0.5625227", "0.549985", "0.54781103", "0.5377977", "0.53700227", "0.5336745", "0.53330874", "0.5321863", "0.52889484", "0.5269471", "0.5263064", "0.5254374", "0.5240074", "0.509644", ...
0.63668156
0
display matches for a team if "team" is undefined, all teams will be displayed
function displayMatchesForTeam(team) { let matches_to_display = []; let schedule_keys = Object.keys(schedule); // if team is undefined, go through each match if (team === undefined) { for (let x in schedule_keys) { matches_to_display.push(parseInt(x)+1); } } else { // go through each match ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function putTeamInTeamsArrayIfMissing(teams, match) {\n let t1idx = -1;\n for (let i = 0; i < teams.length; i++) {\n if (teams[i].name == match.t1) {\n t1idx = i;\n break;\n }\n }\n\n if (t1idx == -1) {\n teams.push({\n name: match.t1,\n ...
[ "0.66069734", "0.64136726", "0.63968503", "0.63827497", "0.6380645", "0.63734144", "0.6357699", "0.63155556", "0.6285154", "0.6256725", "0.6218936", "0.61822957", "0.61306316", "0.60491747", "0.6048255", "0.60393214", "0.60110164", "0.601064", "0.5998623", "0.59948206", "0.59...
0.81236094
0
updates the stats table once a new team is inputted
function updateStatsTable(team_number, alignment) { // team previously inputted let prev_team = $(".stats-name-" + alignment).text(); // the name of team_number let next_team = team_id_to_name[team_number]; // checks to confirm that the input is a number, is a number of a team at the event, and is not the pre...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateTeam(team) {\n console.log(\"update team: \", team);\n if (team === \"Trail Blazers\") {\n teamSelected = \"blazers\";\n } else {\n teamSelected = team.toLowerCase();\n }\n updateShotChart();\n}", "function updateInfo(game, team) {\n // Update team tiles left\n f...
[ "0.6723254", "0.6551116", "0.64669335", "0.6390618", "0.6311447", "0.6266365", "0.6228579", "0.62204605", "0.6185454", "0.60774255", "0.60737383", "0.60322034", "0.6028416", "0.6016057", "0.6008156", "0.60064423", "0.59940135", "0.5993573", "0.59610826", "0.59585476", "0.5937...
0.74650466
0
obtains the pvalues for the data in stats_data, then diplays in on the "Statistics" page
function displayPValue() { // these are p-values from a bunch of two sample t-tests let overallResult = getPValue(stats_data["1"]["scores"], stats_data["2"]["scores"]); let hatchResult = getPValue(stats_data["1"]["hscores"], stats_data["2"]["hscores"]); let cargoResult = getPValue(stats_data["1"]["cscores"], st...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ajaxPiwikStats()\n{\n\t$(\"span[data-piwik-stats]\").each(function(index)\n\t{\n\t\tvar $dataGrabber = $(this);\n\t\t$dataGrabber.html('<i class=\"fa fa-refresh fa-spin\"></i>');\n\n\t\tvar $dataUrl = $(this).data('url');\n\t\tvar $dataSegment = $(this).data('segment');\n\t\tvar $piwikDayRange = $('#piwik...
[ "0.6616259", "0.64264196", "0.63650066", "0.63192797", "0.6270278", "0.6252687", "0.61218137", "0.6104755", "0.610191", "0.60906523", "0.605963", "0.6007311", "0.6000901", "0.5997875", "0.5997525", "0.59814024", "0.5974269", "0.5962793", "0.592894", "0.5902254", "0.59001386",...
0.6590013
1
does a two sample t test, then uses tcdf() to find the tvalue takes Honors Statistics with Kenny first to understand this magic
function getPValue(array1, array2) { // degrees of freedom let df = jStat.min([array1.length - 1, array2.length - 1]); // TwoSampleTTest let t_val = -Math.abs(simpleStats.tTestTwoSample(array1, array2)); // tcdf let pValue = roundto100th(jStat.studentt.cdf(t_val, df) * 2); return pValue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ttest_ind(v1, v2, sides=2, tail=1, alpha=0.05, eq_var=true, diff=0) { \n // Sample means\n let mean1 = jStat.mean(v1);\n let mean2 = jStat.mean(v2);\n // Sample sizes\n let n1 = v1.length;\n let n2 = v2.length;\n // Standard deviations for the samples\n let std1 = jStat.stdev(v1,...
[ "0.6362245", "0.63212615", "0.63153946", "0.62700224", "0.62445444", "0.62310624", "0.6170877", "0.6170877", "0.5843737", "0.57645243", "0.56558967", "0.5479226", "0.5479226", "0.54671466", "0.54671466", "0.54076964", "0.532507", "0.5287056", "0.52836233", "0.525399", "0.5236...
0.6382252
0
creates a picklist on the picklist page
function createPicklist() { // gets an available picklist index let index = findAvailablePicklistID().toString(); // index will be undefined ONLY IF the maximum picklist limit has been reached (30) if (index === undefined) { alert("The maximum picklist limit of 30 has been reached!"); return undefined; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Picker( ){}", "createPicker(pickerConfig) {\n const me = this,\n { multiSelect, pickerWidth } = me,\n picker = new List(\n ObjectHelper.merge(\n {\n owner: me,\n floating: true,\n scrollAction: 'realign',\n itemsFocusable: false,\n...
[ "0.6443771", "0.63504624", "0.60770667", "0.603638", "0.60227484", "0.60195255", "0.5988041", "0.59245145", "0.5916498", "0.5913043", "0.58226407", "0.580547", "0.5797193", "0.57899845", "0.5785146", "0.5777328", "0.5774923", "0.57691723", "0.5768867", "0.57649624", "0.576290...
0.6741529
0
creates the table of teams in order for the picklist index is the picklist index. NOTE: this function clears HTML of picklist w/ index
function createPicklistTable(index) { // loc is the location (<tbody>) you want to add the table rows to let loc = ".picklist-table-" + index; // clears html before adding more $(loc).html(""); // gets picklist let picklist = picklists[index]; // goes through each team in order for (let team_index in pi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateTable(pick) {\n var teamArray = [];\n teamArray.length = 0;\n\n queryTeams.once(\"value\")\n .then(function(snapshot) {\n snapshot.forEach(function(childSnapshot) {\n var teamKey = childSnapshot.val().selTeam;\n teamArray.push(teamKey);\n });\n\n\n for (var i = 1; i < pi...
[ "0.64955103", "0.6191533", "0.6180961", "0.60555065", "0.6001689", "0.59837943", "0.59741366", "0.59571517", "0.59352094", "0.59272724", "0.59216803", "0.58863235", "0.5855569", "0.58240473", "0.58016485", "0.57816225", "0.5730549", "0.5697221", "0.5678276", "0.5670711", "0.5...
0.7456092
0
adds a team to a picklist
function addTeamToPicklist(picklist_index, team_number) { // first condition checks that the team is a team at the event // second condition checks that the team is not already in the picklist if (teams.indexOf(team_number) >= 0 && picklists[picklist_index].indexOf(team_number) < 0) { picklists[picklist_index...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fillListTeams(teams) {\r\n $(\"#selectTeam\").html(\"<option value='0'>\" + t(\"tab_view_select_team\"));\r\n for (var curTeamID in teams) {\r\n var team = teams[curTeamID];\r\n var teamName = \"\";\r\n for (var iContestant in team.contestants) {\r\n var contestant = team.contes...
[ "0.6416924", "0.63686985", "0.63595325", "0.63460195", "0.6312871", "0.63010967", "0.6278125", "0.6272201", "0.61621803", "0.61192286", "0.6104569", "0.61029845", "0.61017114", "0.6054044", "0.60221094", "0.60161954", "0.5996239", "0.5980099", "0.5958161", "0.5956587", "0.594...
0.73582107
0
saves a picklist to data/picklists as a CSV
function savePicklist(picklist_index) { let list_name = $("#picklist-title-" + picklist_index).text(); // uses regex to remove all characters but letters and numbers list_name = list_name.replace(/[^A-Za-z0-9]+/g, ''); // uses regex to replace commas with newlines, then removes brackets let save_file = list_n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function downloadChoicesCsv(fileName) {\n var allChoiceData = [];\n choices.forEach(function(c) {\n var dataString = c.name+','+c.side+','+c.choice+','+c.correct;\n allChoiceData.push(dataString);\n console.log(\"Pushing selection: \"+dataString);\n });\n writeData(fileName, allChoiceData);\n}", "fu...
[ "0.61746985", "0.5913012", "0.5854526", "0.57988065", "0.57813853", "0.5727201", "0.5687119", "0.56347376", "0.5613315", "0.5601324", "0.5565491", "0.5549145", "0.5535895", "0.55152947", "0.5514462", "0.5478586", "0.5472429", "0.5471334", "0.54333514", "0.54216635", "0.541336...
0.7856242
0
loads a picklist onto the picklist page path is the path to the picklist csv
function loadPicklist(picklist_index, path) { let csv_file = fs.readFileSync(path).toString(); // splits file be "\n", the new line character let picklist_teams = csv_file.split("\n"); // gets the picklist title from teams // splice automatically removes the title from the list of things let picklist_title ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleFileSelect(e) {\r\n var file = e.target.files[0];\r\n\r\n Papa.parse(file, {\r\n header: true,\r\n dynamictyping: true,\r\n complete: function (results) {\r\n var parsedCsv = results.data[0];\r\n //console.log(parsedCsv);\r\n\r\n $.each(parsedCsv, function (...
[ "0.59789926", "0.5821317", "0.5715383", "0.56690794", "0.56679195", "0.56304675", "0.56232053", "0.5572805", "0.5538298", "0.5529941", "0.552812", "0.54961526", "0.5451339", "0.54351735", "0.5426739", "0.54124576", "0.5384205", "0.53771526", "0.5344168", "0.5337344", "0.53243...
0.73140293
0
deletes a picklist with index picklist_index
function deletePicklist(picklist_index) { // deletes picklist from object delete picklists[picklist_index]; // deletes the div, modals, and <br> $(".from-picklist-" + picklist_index).remove(); // closes the modal $(".modal").css("display", "none"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _cleanSelectedList() {\n let i = _selectedList.length;\n while (i--) {\n if (_selectedList[i].value === 'index') {\n _selectedList.splice(i, 1);\n }\n }\n }", "function DeleteSecondListItem(){\n var sl = document.getElementById('perifericos[]');\n\n for (i=0; i<sl.option...
[ "0.7301808", "0.6740507", "0.66904515", "0.6663758", "0.6494379", "0.6486216", "0.646155", "0.64487773", "0.639267", "0.637579", "0.6363275", "0.63500375", "0.63418293", "0.6297145", "0.6285968", "0.6237285", "0.61579597", "0.61253077", "0.6106478", "0.6089665", "0.6075426", ...
0.72430277
1
deletes a team from the picklist with index "picklist_index"
function deleteTeamFromPicklist(picklist_index, team_number) { let picklist = picklists[picklist_index]; // removes the team from the picklist object picklist.splice(picklist.indexOf(team_number), 1); // recreates the table createPicklistTable(picklist_index); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deletePicklist(picklist_index) {\n // deletes picklist from object\n delete picklists[picklist_index];\n // deletes the div, modals, and <br>\n $(\".from-picklist-\" + picklist_index).remove();\n // closes the modal\n $(\".modal\").css(\"display\", \"none\");\n}", "removeItem(index) {\n\t\tthis.co...
[ "0.6995478", "0.6120792", "0.6117354", "0.6101086", "0.600037", "0.58826774", "0.5865411", "0.58601063", "0.5835431", "0.5810433", "0.5782579", "0.57784104", "0.57510793", "0.57354534", "0.571723", "0.57129604", "0.5702914", "0.57003486", "0.56963617", "0.5691434", "0.5670309...
0.83583033
0
moves team to a new_location in a picklist
function moveTeamInPicklist(picklist_index, team_number, new_location) { let picklist = picklists[picklist_index]; if (Number.isInteger(new_location)) { // removes val from picklist picklist.splice(picklist.indexOf(team_number), 1); // re-adds to picklist, in new location picklist.splice(new_locatio...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "moveTeamUp (teamId) {\n let option = this,\n teamSettings = option.getTeamSettings(teamId);\n \n option.updateTeamOrder(teamId, teamSettings.order - 1)\n }", "function addTeamToPicklist(picklist_index, team_number) {\n // first condition checks that the team is a team at the event\n // s...
[ "0.6209349", "0.5915067", "0.5783844", "0.57311374", "0.55978084", "0.55969495", "0.5576106", "0.54972416", "0.54890233", "0.54414016", "0.5418353", "0.5410823", "0.5410554", "0.5382799", "0.5371234", "0.53251743", "0.5316911", "0.5304281", "0.529965", "0.52905375", "0.528966...
0.79212826
0
finds a free unused ID for a new picklist div maximum of 30 picklists
function findAvailablePicklistID() { let index = 0; while (index < 30) { // checks to see if ID is taken if (picklists[index] === undefined) { return index; } index++; } alert("Maximum picklist capacity reached."); return undefined; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createPicklist() {\n // gets an available picklist index\n let index = findAvailablePicklistID().toString();\n // index will be undefined ONLY IF the maximum picklist limit has been reached (30)\n if (index === undefined) {\n alert(\"The maximum picklist limit of 30 has been reached!\");\n retur...
[ "0.6154365", "0.60968804", "0.5740198", "0.56750023", "0.56639147", "0.55864847", "0.5568886", "0.55516016", "0.5541248", "0.55250204", "0.54938793", "0.5486415", "0.5464269", "0.5448436", "0.53901076", "0.5389731", "0.53754604", "0.5373504", "0.53391427", "0.5333277", "0.533...
0.7218219
0
MISC. FUNCTIONS compares two match objects to see which match came first
function compareByMatch(a,b) { return parseInt(a["info"]["match"]) - parseInt(b["info"]["match"]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Matching(object1, object2) {\r\n\tthis.object1 = object1;\r\n\tthis.object2 = object2;\r\n\tthis.match = match;\r\n\tmatch = false;\r\n// go through each key in obj1\r\n\tfor (var key in object1) {\r\n\t\t// go through each key in object1\r\n\t\tfor (var key2 in object2){\r\n\t\t\t// get matching keys, th...
[ "0.66750395", "0.65248007", "0.6517619", "0.6509135", "0.6490294", "0.6435699", "0.6410005", "0.63757706", "0.63695115", "0.6349789", "0.63159955", "0.63159955", "0.6286933", "0.6273602", "0.6214709", "0.61993134", "0.61993134", "0.61507654", "0.61034304", "0.6026821", "0.602...
0.67671996
0
Execute the game of life rules
execute() { const width = this.board.getWidth(); const heigth = this.board.getHeigth(); for (let i = 0; i < heigth; i++) { for (let j = 0; j < width; j++) { this.rule1(i, j); this.rule2(i, j); } } this.applyChanges(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "run(){\n\t\tthis.maybeEnemy();\n\t\tthis.move();\n\t\tthis.update();\n\t\tthis.checkEdges();\n\t\tthis.checkIfDead();\n\t\tthis.display();\n\t}", "runGame(){\n\t\t\tthis.scene.runGame();\n\t\t}", "runTournament() {\n\n }", "Execute(gameTime, parent) {\n this.HandleInput(gameTime, parent);\n this.Apply...
[ "0.64562255", "0.6000861", "0.59037614", "0.57672286", "0.5763248", "0.5743213", "0.57421046", "0.5741692", "0.57320344", "0.572448", "0.57243085", "0.56902003", "0.5661604", "0.5627316", "0.5589101", "0.5559943", "0.55468976", "0.5544628", "0.55432934", "0.554087", "0.552558...
0.63324827
1
printAllPairs O(n2) nested for loop
function printAllPairs(n) { for (let i = 0; i < n; i++) { for (let j = 0; j < n; j++) { console.log(i, j); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function printAllPairs(n) {\n for (let i = 0; i < n; i++) {\n for (let j = 0; j < n; j++) {\n console.log(i, j);\n }\n }\n}", "function printAllPairs(n) {\n for (var i = 0; i < n; i++) {\n for (var j = 0; j < n; j++) {\n console.log(i, j);\n }\n }\n}", "function printAllPairs(n) {\n ...
[ "0.8330694", "0.83139545", "0.82709587", "0.7448827", "0.73549986", "0.73295856", "0.73295856", "0.72804415", "0.72804415", "0.72419757", "0.715806", "0.7140502", "0.70951384", "0.70543265", "0.7042988", "0.6944221", "0.681349", "0.65725285", "0.65725285", "0.6483261", "0.641...
0.8331781
1
Shorthand for `this.route('get', ...arguments)`
get(...args) { this.route('get', ...args); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get(uri, action) {\n\n this.route('GET', uri, action);\n }", "addGetRoute(route, ...handlers) {\n this.addRoute('get', route, ...handlers);\n }", "function get(path, context, fun) {\n routes.GET.push({\n rePath: toRegex(path),\n path: path,\n context: context,\n ...
[ "0.7220792", "0.6788403", "0.66287935", "0.6540977", "0.6524892", "0.6340882", "0.6309213", "0.6143747", "0.6112469", "0.6046868", "0.60465163", "0.6011551", "0.59842116", "0.5934034", "0.58963186", "0.58788586", "0.5878522", "0.5846113", "0.5796873", "0.5772706", "0.57392406...
0.9010608
0
Shorthand for `this.route('post', ...arguments)`
post(...args) { this.route('post', ...args); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addPostRoute(route, ...handlers) {\n this.addRoute('post', route, ...handlers);\n }", "post(uri, action) {\n\n this.route('POST', uri, action);\n }", "get(...args) {\n this.route('get', ...args);\n }", "delete(...args) {\n this.route('delete', ...args);\n }", "patch(...arg...
[ "0.7105004", "0.70734537", "0.6721187", "0.6382369", "0.6158325", "0.5979694", "0.59634167", "0.5936582", "0.58640385", "0.5756953", "0.5665954", "0.5560882", "0.5520092", "0.54246265", "0.537498", "0.5365957", "0.5302069", "0.52642465", "0.52628875", "0.524467", "0.5225846",...
0.8939768
0
Shorthand for `this.route('put', ...arguments)`
put(...args) { this.route('put', ...args); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "put(uri, action) {\n\n this.route('PUT', uri, action);\n }", "addPutRoute(route, ...handlers) {\n this.addRoute('put', route, ...handlers);\n }", "static put( route, params, opts = { } ) {\n const options = { ...opts, method: \"put\" };\n return iNaturalistAPI.post( route, param...
[ "0.76175666", "0.7187749", "0.70615834", "0.7032818", "0.6473768", "0.6348428", "0.62587017", "0.62297535", "0.61179847", "0.60839444", "0.60839444", "0.60839444", "0.60839444", "0.60839444", "0.6059388", "0.59937066", "0.5968754", "0.5876803", "0.5849781", "0.57875323", "0.5...
0.8878512
0
Shorthand for `this.route('patch', ...arguments)`
patch(...args) { this.route('patch', ...args); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "patch(uri, action) {\n\n this.route('PATCH', uri, action);\n }", "addPatchRoute(route, ...handlers) {\n this.addRoute('patch', route, ...handlers);\n }", "put(...args) {\n this.route('put', ...args);\n }", "get(...args) {\n this.route('get', ...args);\n }", "patch(url, opt...
[ "0.7683369", "0.743037", "0.6910093", "0.65689504", "0.63307846", "0.633006", "0.6320731", "0.62987524", "0.62556773", "0.6200198", "0.61630446", "0.61630446", "0.61630446", "0.61630446", "0.61630446", "0.60785973", "0.59980756", "0.59317905", "0.5924757", "0.59030825", "0.58...
0.89914864
0
Shorthand for `this.route('delete', ...arguments)`
delete(...args) { this.route('delete', ...args); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "delete(uri, action) {\n\n this.route('DELETE', uri, action);\n }", "static delete( route, params, opts = { } ) {\n const options = { ...opts, method: \"delete\" };\n return iNaturalistAPI.post( route, params, options );\n }", "addDeleteRoute(route, ...handlers) {\n this.addRoute('...
[ "0.76069355", "0.7233546", "0.72287405", "0.6895432", "0.67731845", "0.65206736", "0.64121956", "0.6292348", "0.6259883", "0.6259883", "0.6259883", "0.6259883", "0.6259883", "0.6233112", "0.6204328", "0.6194123", "0.61456954", "0.60760117", "0.6074687", "0.6069671", "0.604597...
0.90498424
0
disable portlet in case no connection to server
function disablePortlet() { portletDisabled = true; // disable the search combo - not necessary anymore because combo box is not in the contact list tab contactListTab.getComponent(4).disable; // set contact list tab as active tabs.setActiveTab(contactListTab); // disable all other tabs for (var i=0; i<ta...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "disableHTTP() {\n this.enableHTTP = false;\n }", "function disableautoserveraddress() {\n $(\"#fulladdress\").removeAttr(\"disabled\");\n $(\"#serverport\").removeAttr(\"disabled\");\n $(\"#altfulladdress\").removeAttr(\"disabled\");\n\n configdata[\"Connection\"][\"UseURLAddress\"] = false;\...
[ "0.6631142", "0.6478763", "0.58284795", "0.5717796", "0.5670407", "0.5642114", "0.56351846", "0.56170875", "0.5613818", "0.549397", "0.54562294", "0.54508346", "0.5416591", "0.5357195", "0.53437555", "0.53374755", "0.53323096", "0.5325115", "0.53248805", "0.53248805", "0.5324...
0.70421576
0
listener called when the input was activated
function onInputActivated(e) { //upon activation try to cancel flashing cancelFlashingTab(); //register the events for this input (taken from a forunm in extjs) var editor = this.container.dom.childNodes[1].lastChild.contentWindow.document; //Used addEvent instead of attachEvent for firefox support. a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onInput(e) {\n this.updateFilledState();\n }", "function onInput(e) {\r\n /* console.log(e.detail);\r\n console.log(\"onInput: \", e.detail);*/\r\n }", "function onInput(e){\n console.log(e.detail);\n console.log(\"onInput: \", e.detail);\n }", "conn...
[ "0.71346945", "0.6961569", "0.68733937", "0.6854569", "0.66261905", "0.65530485", "0.64771515", "0.64771515", "0.6459234", "0.6434944", "0.6410992", "0.63983786", "0.6383025", "0.63559514", "0.63488156", "0.6348218", "0.63422656", "0.6333648", "0.6330089", "0.6249455", "0.623...
0.71399724
0
function called to cancel a flashing tab only if it is the current tab
function cancelFlashingTab() { var tab = tabs.getActiveTab(); if ((tab == null) || (tabs.getTabEl(tab) == null)){ return; } //check if the current tab is flashing if (Ext.fly(tabs.getTabEl(tab)).child('.x-tab-strip-text').hasClass("flashingTab")){ Ext.fly(tabs.getTabEl(tab)).child('.x-tab-strip-t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_makeInactive (tab) {\n tab.classList.remove('active');\n let pfTab = this.tabMap.get(tab);\n pfTab.style.display = 'none';\n pfTab.removeAttribute('active');\n }", "_makeInactive(tab) {\n tab.classList.remove('active');\n const pfTab = this.tabMap.get(tab);\n pfTab.style.display = 'none';\...
[ "0.6546579", "0.6504129", "0.63767225", "0.6294057", "0.6135918", "0.60790837", "0.6077804", "0.6069134", "0.6061306", "0.6017336", "0.6017336", "0.6017336", "0.6017085", "0.5995001", "0.5989453", "0.59857905", "0.5984134", "0.5984134", "0.598395", "0.5968557", "0.59567", "...
0.8601212
0
push handler for start conversation messages from a contact
function startConversationReceived(param) { var sender = param.userName; var extension = param.extension; var msg = getLocalizationValue('application.javascript.messagingWindow.agent') + " " + sender; if ((extension != undefined) && (extension != "")) { msg = msg + ", " + getLocalizationValue('application.ja...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onShowContactChat() {\n App.bus.trigger(OPEN_CONTACT_CHAT);\n }", "onMessageStart() { }", "function startConversation() {\n var sync = true;\n var data = null;\n\n var params = {\n TableName: BLOCKBOT_PROJECT_ID,\n Item: {\n 'sender' : {S: getMessag...
[ "0.6396151", "0.6266288", "0.6075339", "0.60453373", "0.6002045", "0.58589613", "0.58365804", "0.5825101", "0.58201617", "0.57981896", "0.57787", "0.5737198", "0.5693983", "0.5646511", "0.56435674", "0.5608478", "0.55881554", "0.5582008", "0.55412436", "0.5534351", "0.5534351...
0.65504813
0
check if need to switch to new tab return true if only one active chat
function shouldSwitchToTab() { // only one chat tab exist if (tabsMap.length < 2) { return true; } // more then one tab - check how many are enabled var enabledCount = 0; for(var id in enabledTabsMap) { if(enabledTabsMap[id] == true) { enabledCount = enabledCount + 1; }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function active_chat(chatid) {\n\tvar li = $('#chat-tab-'+chatid);\n\tvar chat_tab_id = '#chat-tab-'+chatid+' a';\n\tvar chat_content_id = 'chat-'+chatid;\n\t\n\tif(li.length > 0) {\n\t\t$(chat_tab_id).click();\n\t}\n\telse {\n\t\t// insert new tab\n\t\tvar chat = app.chats[chatid];\n\t\tvar chat_tab = $('#chat-ta...
[ "0.6854069", "0.6430018", "0.62337357", "0.6130052", "0.61287564", "0.60879785", "0.60778075", "0.6048203", "0.6042214", "0.60094976", "0.5970794", "0.59572136", "0.5939151", "0.58813095", "0.58621496", "0.5849992", "0.5811831", "0.5785384", "0.5771813", "0.5768096", "0.57637...
0.7427432
0
check in cache if new tab required for given username
function isNewTabRequired(username) { if(tabsMap.length == 0) { return true; } var result = true; for (var i=0; i<tabsMap.length; i++) { if(tabsMap[i].title == username) { result = false; break; } } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkNew() {\n\tif(localStorage.getItem(\"newUser\") === null) {\n\t\twindow.newUserModal();\n\t}\n}", "function checkUserName(){\n if(localStorage.username)\n loadUserInfo();\n else\n loadModal();\n}", "async function check(data, item) {\n console.log(\"checking tabs......
[ "0.595569", "0.5922331", "0.5795831", "0.57942915", "0.5766757", "0.5759668", "0.5736352", "0.5722698", "0.5679517", "0.56390965", "0.5612476", "0.56091017", "0.55675054", "0.5555906", "0.55431277", "0.5463031", "0.5459236", "0.54505306", "0.5440124", "0.53689", "0.53672504",...
0.71516323
0
add message to conversation tab
function addMessage(sender, message, tabName) { var date = new Date(); var newRecord = new HistoryRecord({ username: sender, time: date.format(CHAT_DATE_FORMAT + " " + CHAT_TIME_FORMAT), message: message }); var historyPanel = findTab(tabName).getComponent(tabName + 'historyPane...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "addChat(message) {\n\t\tthis.chat_backlog.addChat(message);\n\t}", "sendMessage () {\n\t\tlet messageText= this.messageText.trim();\n\n\t\tif (messageText.length == 0) return;\n\t\tlet msg = {\n\t\t\ttext: messageText,\n\t\t\tchat: this.ChatService.getCurrentDialog().id,\n\t\t\tloading: true,\n\t\t\tsender: this...
[ "0.7215285", "0.7037516", "0.69906354", "0.69854176", "0.694408", "0.692695", "0.6876876", "0.68661755", "0.6853267", "0.6839226", "0.67639023", "0.6762813", "0.6729475", "0.67283726", "0.6726989", "0.6703566", "0.6689595", "0.6686216", "0.66671723", "0.6649401", "0.66391826"...
0.72614086
0
using methods to retrieve the stopflashing color so that it can be overriden if needed
function getBgColorUponFlashingStopped() { return "transparent"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function flashColor() {\n $(\"#bluepad\").addClass(\"light\");\n $(\"#redpad\").addClass(\"light\");\n $(\"#greenpad\").addClass(\"light\");\n $(\"#yellowpad\").addClass(\"light\");\n}", "function flashUpdate(element, startColor, endColor) {\n $(element).animate({\n \"background-color\": startColor\n },...
[ "0.6722749", "0.6540644", "0.64591956", "0.63532346", "0.6289357", "0.62788475", "0.62678707", "0.6250788", "0.6234946", "0.62260234", "0.6199145", "0.61825275", "0.617992", "0.61547947", "0.6129655", "0.6125696", "0.6099141", "0.60474926", "0.6045988", "0.6045062", "0.603066...
0.8169964
0
using methods to retreive the flashing number of times so that it can be overriden if needed
function getFlashNumOfTimesUponNewMessage() { return 10; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function flashCount(count) {\r\n if (count < 1) {\r\n clearFlash();\r\n }\r\n\r\n var newTitle = \"[ \" + count + \" ] \" + original;\r\n\r\n timeout = setInterval(function() {\r\n document.title = (document.title == original) ? newTitle : original;\r\n }, 1000);\r\n}", "flashCount()...
[ "0.6812836", "0.67716646", "0.6331371", "0.62575185", "0.6242092", "0.61941284", "0.611897", "0.6096617", "0.60643774", "0.6048702", "0.60129404", "0.5951209", "0.5949793", "0.59455734", "0.59424466", "0.59028846", "0.58827615", "0.58656144", "0.583749", "0.58276045", "0.5822...
0.70455235
0
returns the number of currently active chat session
function getActiveChatCount() { var count = 0; for(var id in enabledTabsMap) { if (enabledTabsMap[id] == true) { count++; } } return count; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function privateChatCount() {\n privateChat = 0;\n}", "getChatIndex(id){\n console.log(\"setting active chat!\");\n let index = 0;\n for(let i=0;i<this.state.joinedChats.length;i++){\n if(this.state.joinedChats[i] !== null && this.state.joinedChats[i]._id === id...
[ "0.6649449", "0.64026546", "0.63209325", "0.6040012", "0.5999051", "0.5993787", "0.5988992", "0.5979662", "0.5933086", "0.58817214", "0.58788586", "0.58497137", "0.5808894", "0.5799387", "0.5785445", "0.57555884", "0.569836", "0.56964064", "0.56677383", "0.5651409", "0.563672...
0.75053054
0
calc time of contact in current presence and set this time in the tooltip of the presence image. (relevant only for in call and after call work)
function setPresenceTime(contactId, presenceMsg) { var msg = presenceMsg; var currTime = new Date(); var startTime = contactPresenceTime[contactId]; if (startTime != null) { var diff = currTime.getTime() - startTime.getTime(); var milliseconds=Math.floor(diff % 1000); diff=diff/1000; var seconds=Ma...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function enableToolTipForContactTime(){\r\n\t$('[id^=\"contactFrom\"]').tooltip({title: \"Please follow military time format from 0800 to 1800.\", animation: true,placement: \"auto\"});\r\n\t$('[id^=\"contactTo\"]').tooltip({title: \"Please follow military time format from 0800 to 1800.\", animation: true,placemen...
[ "0.6003139", "0.5903902", "0.58991814", "0.5892983", "0.58360183", "0.58266467", "0.57721096", "0.57670265", "0.57469195", "0.5734448", "0.5733272", "0.5705465", "0.56964546", "0.56912196", "0.5684201", "0.5683406", "0.5683004", "0.5670158", "0.56581134", "0.5654098", "0.5650...
0.729472
0
invoked by clicking on 'delete' button for user in favorites
function onDeleteFavoriteClick(id) { if (portletDisabled) { return; } agentsStore.load( {params: { method: "removeFromFavorites", delId:id} } ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteFavourite(id){\n\tvar day = $.parseJSON(getSessionValue('date'));\n\tvar favorites = getFavourites(day);\n\tfindAndRemove(favorites, \"id\", id, day, afterTimelineDelete);\n}", "deleteFavorite(id) {\n const index = this.favorites.findIndex(cur => cur.id === id);\n this.favorites.splice(index...
[ "0.7501573", "0.7225632", "0.718091", "0.71635586", "0.709141", "0.70439863", "0.6994839", "0.6993859", "0.69741833", "0.69252", "0.6891977", "0.68818456", "0.68293047", "0.68183774", "0.68138117", "0.6807236", "0.6797443", "0.67882663", "0.6775231", "0.6763766", "0.6760495",...
0.75175864
0
called by the toolbar wrapper when the portlet is shown same functionality as for onPortletExpand
function onPortletShow(reloadContentOnNextOpen) { onPortletExpand(); resizeContent(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onPortletExpand(){\r\n //if the chat ended while the portlet is minimized,\r\n \t//the editor is still active see WS-1042 \r\n \tfor (var i=0; i < tabsMap.length; i++) {\r\n var currentTab = findTab(tabsMap[i].title);\r\n\t \tvar currentTabId = currentTab.id;\r\n\t \tif ((currentTabId !=...
[ "0.68095076", "0.6431715", "0.62141263", "0.61689633", "0.6117145", "0.6085375", "0.6056747", "0.6042873", "0.60369754", "0.6019956", "0.59430254", "0.59389883", "0.5927296", "0.59157956", "0.59157956", "0.5891288", "0.5860433", "0.5857425", "0.57650775", "0.5763637", "0.5751...
0.7298081
0
called by the toolbar wrapper when the portlet is expanded
function onPortletExpand(){ //if the chat ended while the portlet is minimized, //the editor is still active see WS-1042 for (var i=0; i < tabsMap.length; i++) { var currentTab = findTab(tabsMap[i].title); var currentTabId = currentTab.id; if ((currentTabId != "ContactList")&&(curre...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onPortletShow(reloadContentOnNextOpen) {\r\n\tonPortletExpand();\r\n\tresizeContent();\r\n}", "function onPreExpandStarted(){}", "function expandPanel() {\n phone.mode = DisplayMode.Docked;\n document.documentElement.style.setProperty(\"--widgetAreaWidth\", expandedWidgetWidth);\n $(\".expand...
[ "0.6946756", "0.663293", "0.6622454", "0.6572223", "0.6456897", "0.63700545", "0.63629043", "0.6350091", "0.62379426", "0.6237716", "0.6237716", "0.6228359", "0.62099576", "0.617239", "0.6103593", "0.6079736", "0.6076302", "0.6073758", "0.6056286", "0.60207385", "0.5985124", ...
0.7128641
0
Hide all offline messages at a specified node.
function _hideOfflineMessage() { var nodes = document.querySelectorAll('.offline-message'); for (var i = 0, l = nodes.length; i < l; i += 1) { nodes[i].parentNode.removeChild(nodes[i]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hideAllMessage() {\n [].forEach.call(messages, function(message) {\n if (!message.classList.contains('msgInvisible')) {\n message.classList.add('msgInvisible');\n }\n })\n}", "hideAllMessages() {\n let msg = document.querySelector(\"#message_wrapper\");\n if (msg) {\n msg.remove(...
[ "0.6647279", "0.6206347", "0.59671795", "0.59604305", "0.59085834", "0.5857057", "0.57277364", "0.5671169", "0.56608695", "0.5629967", "0.5597531", "0.5597239", "0.5596198", "0.55449945", "0.55377644", "0.5504742", "0.549625", "0.54871315", "0.5481878", "0.54722464", "0.54545...
0.7498256
0
Reload the friends list.
function _reloadFriendsList() { var users = $favorites.getFavoriteUsers(); var friends = []; for (var i = 0, len = users.length; i < len; i++) { friends.push(new $friendsList.Friend(users[i])); } _friendsList.updateList(friends); if (!_friendsList.node.parentNode) { _friendSection.appendChild(_fr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _onFavoritesLoaded(e) {\n _reloadFriendsList();\n}", "function loadFriends()\n{\n\t// remove the game button\n\t$('.start-game').val(\"Loading...\").attr(\"disabled\", \"disabled\");\n\n\tFB.api('/me', function(response) {\n\t\t// console.log(response);\n\t\t$('#greeting').html(\"Good Luck \" + respons...
[ "0.6505152", "0.6288108", "0.62103695", "0.6197483", "0.6183427", "0.6139813", "0.6091882", "0.601067", "0.59457743", "0.58877975", "0.5875488", "0.58634925", "0.5828221", "0.5815622", "0.57973003", "0.5755538", "0.5743243", "0.56678975", "0.5648918", "0.5648807", "0.5604305"...
0.8557623
0
Called when social relations are updated.
function _onRelationsUpdated(e) { _reloadFeed(); _reloadFriendsList(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateRelationships(){\n\t\tconsole.log('gonna updateRelationships')\n\t\t//post per aggiornare relazione tra past e current.\n\t\tdate = new Date(Date.now());\n\t\t$.post(\"/relation\",{\n\t\t\tprevious: pastPlayerVideoId,\n\t\t\tclicked: getCurrentPlayerId(),\n\t\t\trecommender: currentPlayerRecommender...
[ "0.6887377", "0.5446411", "0.5386871", "0.5386871", "0.53521115", "0.53005", "0.5251083", "0.52474046", "0.5246809", "0.5228627", "0.52139014", "0.5182067", "0.51573855", "0.5134411", "0.5127015", "0.51186574", "0.51185536", "0.50944245", "0.50944245", "0.50944245", "0.507083...
0.82421154
0
Called when favorites are loaded.
function _onFavoritesLoaded(e) { _reloadFriendsList(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadFavoritesPage() {\n loadNavBar();\n updateNavBar();\n loadFavoritesFromLocalStorage();\n addFavoriteToFavoritesList();\n}", "function init() {\n getCurrentFavs();\n }", "function loadFavoritesFromLocalStorage() {\n favorites = getFromLocalStorage(\"favorites\");\n}...
[ "0.75938106", "0.73336107", "0.7328089", "0.7225805", "0.69685006", "0.694354", "0.68108577", "0.6712093", "0.670438", "0.6699805", "0.66514575", "0.6635933", "0.66318667", "0.65990996", "0.65950066", "0.65789884", "0.6529167", "0.6458635", "0.645796", "0.63984287", "0.636785...
0.8067037
0
Called when favorites are changed.
function _onFavoritesChanged(e) { var numFriendsOld = document.getElementById('friends') .getElementsByClassName('friends')[0] .childNodes.length; var numFriendsNew = $favorites.getFavoriteUsers().length; if (numFriendsOld < numFriendsNew) { $loggingHelper.logClientEvent('favorite changed', 'friend a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _onFavoritesLoaded(e) {\n _reloadFriendsList();\n}", "function _getFavorites() {\n if (!_isReady()) {\n return;\n }\n try {\n _sonosSystem.getFavorites().then((favs) => {\n if (diff(_favorites, favs)) {\n log.verbose(LOG_PREFIX, 'Favorites changed.', favs);\n ...
[ "0.7374625", "0.725405", "0.71927375", "0.7017947", "0.69397354", "0.6924799", "0.6859117", "0.66695315", "0.66352725", "0.656686", "0.6565259", "0.65026987", "0.64380544", "0.64035016", "0.63222456", "0.631479", "0.63035715", "0.62688833", "0.62522817", "0.6248991", "0.62239...
0.76719695
0
functions that need to be available to all .js scripts these functions enable the interactivity between graphs updates the level shown in the stacked bar chart when passed a level number that corresponds to the clade depth
function updateLevel(levelNum) { console.log('updateLevel was called with level: ', levelNum); // barChart.drawChart(levelNum); barChart.updateChart(levelNum); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setLevel() {\n level = 1;\n}", "function up(d,i) {\r\n\t\t\t\r\n\t\t\td3.select(\"#nameInfo\").text(\"Level \" + (d.parent.depth+1) + \" of \" + maxDepth);\t\t\t\r\n\t\t\r\n\t\t\tvar newHeight = (d.parent.children.length*barHeight*1.2)+margin.top+15;\r\n\t\t\t\r\n\t\t\tif ( newHeight < minHeight ) { ...
[ "0.64590114", "0.62451583", "0.61469537", "0.6138608", "0.61383283", "0.6126158", "0.60488576", "0.59959525", "0.5963597", "0.595358", "0.59509104", "0.58921844", "0.5882752", "0.5869619", "0.58593374", "0.5845555", "0.5826666", "0.5826252", "0.5776236", "0.57658476", "0.5745...
0.687997
0
updates the violin chart with data from a specific gene
function updateViolinChart(gene) { console.log('updateViolinChart was called with gene: ', gene); violinPlot.updateViolinPlot(gene); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function optionChanged(newData){\n sample_metadata(newData);\n plotData(newData);\n}", "function optionChanged(newID) {\n buildtable(newID);\n plotbar(newID);\n plotbubble(newID);\n buildGauge(newID);\n \n}", "function updateDemoInfo(id) {\n d3.json(\"samples.json\").then((data) => {\n\n ...
[ "0.58373106", "0.5750058", "0.5664461", "0.5544846", "0.5542194", "0.5512557", "0.54949284", "0.54515284", "0.5449353", "0.544182", "0.54054284", "0.5404634", "0.54044586", "0.5398507", "0.53977734", "0.5390435", "0.5387622", "0.53814244", "0.53748095", "0.5358862", "0.534855...
0.8603579
0
updates the sunburst chart based on data from one sample
function updateSunburstChart(sample) { console.log('updateSunburstChart was called with gene: ', sample); sunburst.drawSunburst(sample); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateSunburst(dataX, food) {\n\n // Get new data\n var data = sunburstData(dataX, food)[0]\n\n // Partition new data\n var root = partition(data)\n root.each(d => d.current = d);\n\n // Remove old elements\n label.remove()\n parent.remove()\n d3.selectAll(\"#sunburstsvg\").selectAll(\".path, #su...
[ "0.72809845", "0.7125878", "0.70597583", "0.66646194", "0.6561706", "0.6542137", "0.6445969", "0.6420704", "0.63527507", "0.6344977", "0.63412803", "0.6337212", "0.63274837", "0.6325245", "0.6324086", "0.6290156", "0.62710154", "0.62497246", "0.6211404", "0.6205234", "0.61839...
0.84904194
0