Search is not available for this dataset
query
stringlengths
7
355k
document
stringlengths
9
341k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
This function gives sales details in the conversion rate drill down
function drillWon() { var hasWon = false; list = web.get_lists().getByTitle('Prospects'); var camlQuery = SP.CamlQuery.createAllItemsQuery(); var listItems = list.getItems(camlQuery); // Get the type of prospect and its percentage var type = "Won"; var getDiv = document.getElementById("wonOpp"); var getWidth = parseFloat((getDiv.clientWidth / 800) * 100); getWidth = getWidth.toFixed(2); context.load(listItems); context.executeQueryAsync( function () { // Success returned from executeQueryAsync var wonTable = document.getElementById("drillTable"); // Remove all nodes from the drillTable <DIV> so we have a clean space to write to while (wonTable.hasChildNodes()) { wonTable.removeChild(wonTable.lastChild); } // Iterate through the Prospects list var listItemEnumerator = listItems.getEnumerator(); var listItem = listItemEnumerator.get_current(); while (listItemEnumerator.moveNext()) { var listItem = listItemEnumerator.get_current(); if (listItem.get_fieldValues()["_Status"] == "Sale") { // Get information for each Sale var saleTitle = document.createTextNode(listItem.get_fieldValues()["Title"]); var salePerson = document.createTextNode(listItem.get_fieldValues()["ContactPerson"]); var saleNumber = document.createTextNode(listItem.get_fieldValues()["ContactNumber"]); var saleEmail = document.createTextNode(listItem.get_fieldValues()["Email"]); var saleAmt = document.createTextNode(listItem.get_fieldValues()["DealAmount"]); drillConvert(saleTitle.textContent, salePerson.textContent, saleNumber.textContent, saleEmail.textContent, saleAmt.textContent, getWidth, type); } hasWon = true; } if (!hasWon) { // Text to display if there are no won Sales var noWon = document.createElement("div"); noWon.appendChild(document.createTextNode("There are no Sales.")); wonTable.appendChild(noWon); } $('#drillDown').fadeIn(500, null); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async getSales(){\n\t\t\ttry {\n\t\t\t\tlet response = await axios.get(\"/api/sales\");\n\t\t\t\tthis.sales = response.data;\n\t\t\t} catch (error){\n\t\t\t\tconsole.log(error);\n\t\t\t}\n\t\t\tthis.calcTotal();\n\t\t\tthis.filteredSales();\n\t\t}", "function viewSales() {\n var URL=\"select d.department_id,d...
[ "0.6266873", "0.6152493", "0.5924026", "0.5839852", "0.5773854", "0.57635874", "0.57345164", "0.5725255", "0.57188183", "0.5713131", "0.57048434", "0.5686387", "0.5653437", "0.5648504", "0.562714", "0.5624804", "0.5589511", "0.55893356", "0.55653435", "0.5538491", "0.55338717...
0.0
-1
This function gives lost sales details in the conversion rate drill down
function drillLost() { var hasLost = false; list = web.get_lists().getByTitle('Prospects'); var camlQuery = SP.CamlQuery.createAllItemsQuery(); var listItems = list.getItems(camlQuery); // Get the type of prospect and its percentage var type = "Lost Sale"; var getDiv = document.getElementById("lostOpp"); var getWidth = parseFloat((getDiv.clientWidth / 800) * 100); getWidth = getWidth.toFixed(2); context.load(listItems); context.executeQueryAsync( function () { // Success returned from executeQueryAsync var lostSaleTable = document.getElementById("drillTable"); // Remove all nodes from the drillTable <DIV> so we have a clean space to write to while (lostSaleTable.hasChildNodes()) { lostSaleTable.removeChild(lostSaleTable.lastChild); } // Iterate through the Prospects list var listItemEnumerator = listItems.getEnumerator(); var listItem = listItemEnumerator.get_current(); while (listItemEnumerator.moveNext()) { var listItem = listItemEnumerator.get_current(); if (listItem.get_fieldValues()["_Status"] == "Lost Sale") { // Get information for each Lost Sale var lostSaleTitle = document.createTextNode(listItem.get_fieldValues()["Title"]); var lostSalePerson = document.createTextNode(listItem.get_fieldValues()["ContactPerson"]); var lostSaleNumber = document.createTextNode(listItem.get_fieldValues()["ContactNumber"]); var lostSaleEmail = document.createTextNode(listItem.get_fieldValues()["Email"]); var lostSaleAmt = document.createTextNode(listItem.get_fieldValues()["DealAmount"]); drillConvert(lostSaleTitle.textContent, lostSalePerson.textContent, lostSaleNumber.textContent, lostSaleEmail.textContent, lostSaleAmt.textContent, getWidth.toString(), type.toString()); } hasLost = true; } if (!hasLost) { // Text to display if there are no Lost Sales var noLostSales = document.createElement("div"); noLostSales.appendChild(document.createTextNode("There are no Lost Sales.")); lostSaleTable.appendChild(noLostSales); } $('#drillDown').fadeIn(500, null); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getExistingServerPricingLevelWiseInfo(parent,yearlyDto,year){\r\n\t\t\tif(yearlyDto.serviceDeskUnitPriceInfoDtoList != null){\r\n\t\t\t\tif(yearlyDto.serviceDeskUnitPriceInfoDtoList.length > 0){\r\n\t\t\t\t\t if($scope.viewBy.type == 'unit'){\r\n\t\t\t\t\t\t $scope.serviceDeskInfo.contact.children[0].di...
[ "0.5661073", "0.5652263", "0.56436145", "0.54976356", "0.54850596", "0.5449733", "0.5447894", "0.5382265", "0.5374766", "0.5349679", "0.5342189", "0.5333074", "0.5314974", "0.5304303", "0.5301246", "0.5249902", "0.5202027", "0.5198028", "0.51972413", "0.5176192", "0.5158295",...
0.47844967
83
This function creates summary table for the pipeline drill down
function drillTable(orgName, contactPerson, contactNumber, email, amount, type, total) { // Check if some of the non required fields are blank if (contactPerson == "null") { contactPerson = "-"; } if (contactNumber == "null") { contactNumber = "-"; } if (email == "null") { email = "-"; } $("#wonLostDrillDown").hide(); $("#pipeSummary").hide(); // Shows the pipeline summary $("#pipeDrillDown").fadeIn(500, function () { var getDiv = document.getElementById("pipeSummary"); getDiv.innerText = "Total " + type + " amount is : $" + total.toLocaleString(); $("#pipeSummary").show(); }); $("#drillTable").show(); $("#drillTable").append("<div class='clear'>&nbsp;</div> <div class='reportLabel'>" + orgName + "</div> <div class='reportLabel'> " + contactPerson + "</div> <div class='reportLabel'> " + contactNumber + "</div> <div class='reportLabel'> " + email + "</div> <div class='amountLabel' > $" + amount.toLocaleString() + "</div>"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createMeasuresSummaryTable(view, index){\n\n // get fields\n var fields = view.tableGroups[index].fields;\n \n // get HTML table\n var summaryTable = $('measuresSummary');\n tBody = summaryTable.tBodies[0];\n \n // if fields were defined\n if (fields != undefined) {\n \n ...
[ "0.6186357", "0.61032957", "0.5896312", "0.5781611", "0.5769194", "0.57669616", "0.56066823", "0.5588824", "0.55748445", "0.5554954", "0.55383366", "0.5517297", "0.5515465", "0.550151", "0.54564625", "0.5453576", "0.544716", "0.54385066", "0.54342586", "0.538205", "0.536233",...
0.57661706
6
This function creates summary table for the Won/Lost drill down
function drillConvert(orgName, contactPerson, contactNumber, email, amount, rate, type) { // Check if some of the non required fields are blank if (contactPerson == "null") { contactPerson = "-"; } if (contactNumber == "null") { contactNumber = "-"; } if (email == "null") { email = "-"; } $("#pipeDrillDown").hide(); $("#conversionSummary").hide(); // Shows the won lost summary $("#wonLostDrillDown").fadeIn(500, function () { var getDiv = document.getElementById("conversionSummary"); getDiv.innerText = type + " Percentage is : " + rate + "%"; $("#conversionSummary").show(); }); $("#drillTable").show(); $("#drillTable").append("<div class='clear'>&nbsp;</div> <div class='reportLabel'>" + orgName + "</div> <div class='reportLabel'> " + contactPerson + "</div> <div class='reportLabel'> " + contactNumber + "</div> <div class='reportLabel'> " + email + "</div> <div class='amountLabel' id='drillamount'> $" + amount.toLocaleString() + "</div>"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createWindRoseTable(freqTable, windSP) {\n //Populate ranges using step\n var range = calcRange(windSP);\n var rangeRow = document.getElementById(\"ranges\").children;\n\n // for (var i = 5; i > 0; i--) {\n // rangeRow[i].innerHTML = (6-i)*range.step + \" - \" + (7-i)*range.step + \" m/s\";...
[ "0.5979947", "0.5758177", "0.562934", "0.55986804", "0.55954695", "0.55866826", "0.5570252", "0.5543691", "0.5505364", "0.54956925", "0.5480872", "0.5455479", "0.5443802", "0.5408282", "0.5396708", "0.5392002", "0.538199", "0.5380964", "0.5372916", "0.5369089", "0.5355571", ...
0.520586
44
function add salecards in our html code if we dont have miore card to show we hide bitton "show more"
function appendCards(arr, number = 20) { let childs = pdl.children().length; let len; if (childs >= arr.length) { len = arr.length; } else { len = childs + number; } for (let i = childs; i < len; i++) { const e = arr[i]; let html = createCard(e); pdl.append(html); } if (localStorage['courseUSD']) { changeCourse(pdl.children().not(`[data-uah=1]`)); } if (childs == arr.length) { $(`#showCardsBtn`).hide(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showCardHistory() {\n var showMore = document.getElementById('#show-more-btn');\n var showLess = document.getElementById('#show-less-btn');\n if (ideaCardTemplate.children.length >= 10) {\n showMore.style.display = 'block';\n showLess.style.display = 'none';\n }\n}", "function hideExtraItems()...
[ "0.712301", "0.70646507", "0.6962018", "0.66815114", "0.6555846", "0.65272725", "0.6506308", "0.6466659", "0.64387554", "0.6430885", "0.6386044", "0.62994576", "0.6290983", "0.6284047", "0.6252439", "0.6246421", "0.6239875", "0.62263066", "0.6195622", "0.6190326", "0.61780745...
0.5770444
81
Provides a convenient interface for setting various properties of the response. var res = new Response(body, headers, status); res.addHeader("ContentLength", "123"); res.setCookie("cookieName", "cookieValue"); res.send(callback);
function Response(body, headers, status) { if (!(this instanceof Response)) { return new Response(body, headers, status); } this.body = body || ""; this.headers = headers || {}; this.status = status || 200; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function WrappedResponse(msg, hdr, err, res) {\n this._msg = msg;\n this.headers = hdr;\n this.error = err;\n this.response = res;\n}", "function Response(data, status, message, headers) {\n this.data = data;\n this.status = status;\n this.message = message;\n this.headers = heade...
[ "0.6615167", "0.6127869", "0.60756445", "0.5953511", "0.59493005", "0.59493005", "0.59493005", "0.59493005", "0.59493005", "0.59493005", "0.59493005", "0.59493005", "0.59493005", "0.59493005", "0.59493005", "0.592608", "0.5924264", "0.5869885", "0.5849092", "0.5849092", "0.58...
0.6342254
1
Renders the entire app on the DOM
render() { return ( <MuiThemeProvider theme={ourTheme}> <div className="App"> <Header /> <Router> <Route path="/" exact component={MovieList} /> <Route path="/details/:id" exact component={Detail} /> <Route path="/edit" component={Edit} /> <Route path="/admin" component={Admin} /> <Route path="/omdbsearch" component={OmdbSearch} /> </Router> <Footer /> </div> </MuiThemeProvider> ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderToDOM() {\n const root = document.getElementById('app');\n if (root !== null) {\n ReactDOM.render(<App />, root)\n }\n}", "function startMethod() {\n render(createElement(App), document.getElementById('root'))\n}", "render() {\n\t\t// preserve context\n\t\tconst _this = this;\n\n\n\t\tr...
[ "0.71802855", "0.7128229", "0.68628216", "0.6848821", "0.6806952", "0.6783223", "0.67499226", "0.6745235", "0.6717924", "0.6717924", "0.67092276", "0.66819483", "0.6679668", "0.66561586", "0.6649234", "0.6612169", "0.6522735", "0.6522735", "0.6522735", "0.6517058", "0.6511817...
0.0
-1
makeTeamCsv("2017cc", tba); Quick example:
async function printAMatchResult(teamNumber, eventKey) { const teamKey = "frc" + teamNumber; const matches = await tba.get("/team/" + teamKey + "/event/" + eventKey + "/matches"); const match = matches[0]; const redTeams = match.alliances.red.team_keys; const redScore = match.score_breakdown.red.totalPoints; const blueTeams = match.alliances.blue.team_keys; const blueScore = match.score_breakdown.blue.totalPoints; if (redTeams.includes(teamKey)) { console.log("Team " + teamNumber + " was on the red alliance and scored " + redScore + " vs the blue alliance who scored " + blueScore); } else if (blueTeams.includes(teamKey)) { console.log("Team " + teamNumber + " was on the blue alliance and scored " + blueScore + " vs the red alliance who scored " + redScore); } else { console.log("Unexpected state. Team " + teamNumber + "'s first match listed doesn't contain the team on either alliance"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SBImportCsvTest() {\n\n}", "function createExprotCsv (arraytoMakeFinalCsv){\n let headerRow = {\"Order Reference Id\" :\"\" ,\n \"Venue Group\" :\"\",//customer name \n \"Venue\" : \"\",\n \"Venue Department\" : \"\",\n \"Venue Department Customer Code\":'', //customer cod...
[ "0.5901936", "0.577681", "0.57611316", "0.5735761", "0.5692298", "0.56770355", "0.5523977", "0.55100244", "0.5495598", "0.5462487", "0.54387945", "0.54364955", "0.5407191", "0.5397472", "0.5394632", "0.538173", "0.5375985", "0.5359365", "0.5338283", "0.5328318", "0.53202164",...
0.0
-1
Converts the name of a state to dot notation, of the form `grandfather.father.state`.
function fixStateName(state){ if(state.parent){ state.name = state.parent.name + '.' + state.name; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fixStateName(state){\n if(state.parent){\n state.name = (angular.isObject(state.parent) ? state.parent.name : state.parent) + '.' + state.name;\n }\n }", "function getFullStateName(state) {\n return stateList[state];\n}", "updateName(state, name) {\r\n ...
[ "0.70765984", "0.6855546", "0.5746515", "0.56585073", "0.5525749", "0.5481702", "0.5444082", "0.54076886", "0.5375729", "0.5345656", "0.53373456", "0.532961", "0.53277326", "0.5324446", "0.5323014", "0.5311441", "0.5307792", "0.5288286", "0.528703", "0.528703", "0.528703", ...
0.7088336
0
accepts optional number or uses the default for number of lines
tail (numLines) { let numLines = numLines || this.tailLines; return this.trimLog(this.getLog(), numLines); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function countLine(count) {\n\n if(count>10){\n return;\n }else {\n print('Line'+count++);\n countLine(count);\n }\n\n\n\n}", "function lineNum (int) {\n for (let i = 0; i < int; i++) {\n line()\n }\n}", "getLineLimit(n_item) {\n const view = this.app.workspace.activeLeaf.vi...
[ "0.61173105", "0.6059474", "0.60386604", "0.58232206", "0.5732653", "0.5674424", "0.56097513", "0.55579525", "0.5546049", "0.55207217", "0.5484668", "0.5484668", "0.54580665", "0.54278386", "0.52666074", "0.52561605", "0.5243148", "0.5243148", "0.5243148", "0.5243148", "0.524...
0.0
-1
accepts a string to search for
search (string) { let lines = this.output.split('\n'); let rgx = new RegExp(string); let matched = []; // can't use a simple Array.prototype.filter() here // because we need to add the line number for (let i = 0; i < lines.length; i++) { let addr = `[${i}] `; if (lines[i].match(rgx)) { matched.push(addr + lines[i]); } } let result = matched.join('\n'); if (result.length == 0) result = `Nothing found for "${string}".`; return result }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function search(str) {\n\t\t\tif (str.length == 0) {\n\t\t\t\tbuild_list(items);\n\t\t\t} else {\n\t\t\t\tstr = str.split('\\\\').join('\\\\\\\\');\n\t\t\t\tmatches.length = 0;\n\t\t\t\tpattern = \"^\" + str;\n\t\t\t\tregex = new RegExp(pattern, 'i');\n\t\t\t\tvar len = items.length;\n\t\t\t\tfor (var x = 0; x < l...
[ "0.7116485", "0.68333226", "0.68119013", "0.6784608", "0.6784608", "0.67659014", "0.6753058", "0.6708368", "0.66405565", "0.6606877", "0.64624006", "0.64611703", "0.6453285", "0.6448121", "0.63787526", "0.63709337", "0.6358582", "0.6333569", "0.6310718", "0.6284536", "0.62303...
0.65053445
10
accepts the starting line and how many lines after the starting line you want
getSlice (lineNumber, numLines) { let lines = this.output.split('\n'); let segment = lines.slice(lineNumber, lineNumber + numLines); return segment.join('\n'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function find_start_line() {\n // TODO:\n return 0\n}", "calculateLineIndex(startPosition){\n\t\tthis.lineIndex = startPosition + this.top;\n\t\tthis.lineCount = Math.ceil((this.title.length +this.value.length + this.titleSpacing) / process.stdout.columns);\n\t\treturn this.lineIndex + this.lineCount+ this.bot...
[ "0.69802463", "0.6836935", "0.6836935", "0.6704853", "0.66740835", "0.65712905", "0.6481633", "0.6481633", "0.6481633", "0.6443209", "0.63847536", "0.6383588", "0.6349394", "0.6339376", "0.6319919", "0.62735313", "0.62735313", "0.62735313", "0.62666476", "0.624962", "0.624708...
0.0
-1
immediately downloads the log for desktop browser use
downloadLog () { let logFile = this.getLog(); let blob = new Blob([logFile], { type: 'data:text/plain;charset=utf-8' }); let a = document.createElement('a'); a.href = window.URL.createObjectURL(blob); a.target = '_blank'; a.download = this.logFilename; document.body.appendChild(a); a.click(); document.body.removeChild(a); window.URL.revokeObjectURL(a.href); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function adbpAppDownload() {\n\ttry { \n\t\ttrackMetrics({ \n\t\t\ttype: \"app-download\", \n\t\t\tdata: {}\n\t\t}); \n\t} catch(e){}\n}", "function trace_download(){\n var tmp_date = new Date();\n trace_data[row_event] = {\"event\": \"Downloadfile\", \"time\" : tmp_date , 'status' : 0, \"row\" :row_event...
[ "0.6257486", "0.604706", "0.59352016", "0.5913081", "0.5906313", "0.5832505", "0.5745984", "0.5723918", "0.5710887", "0.5694815", "0.5693706", "0.56931716", "0.56757545", "0.5644202", "0.5625792", "0.5624406", "0.56177807", "0.5617651", "0.5604897", "0.5597823", "0.5560689", ...
0.688398
0
METHODS FOR CONSTRUCTING THE LOG like typeof but classifies objects of type 'object' kept separate from formatType() so you can use at your convenience!
determineType (object) { if (object != null) { let typeResult; let type = typeof object; if (type == 'object') { let len = object.length; if (len == null) { if (typeof object.getTime == 'function') { typeResult = 'Date'; } else if (typeof object.test == 'function') { typeResult = 'RegExp'; } else { typeResult = 'Object'; } } else { typeResult = 'Array'; } } else { typeResult = type; } return typeResult; } else { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function format_typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { format_typeof = function _typeof(obj) { return typeof obj; }; } else { format_typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.pr...
[ "0.7041698", "0.63915646", "0.6356364", "0.6282244", "0.62804294", "0.6233232", "0.6212022", "0.62041306", "0.6159912", "0.61242163", "0.60985684", "0.6098422", "0.59634596", "0.5874204", "0.58020276", "0.58020276", "0.58020276", "0.57866067", "0.57866067", "0.57663363", "0.5...
0.5964924
12
format type accordingly, recursively if necessary
formatType (type, obj) { if (this.maxDepth && this.depth >= this.maxDepth) { return '... (max-depth reached)'; } switch (type) { case 'Object': this.currentResult += '{\n'; this.depth++; this.parentSizes.push(this.objectSize(obj)); let i = 0; for (let prop in obj) { this.currentResult += this.indentsForDepth(this.depth); this.currentResult += prop + ': '; let subtype = this.determineType(obj[prop]); let subresult = this.formatType(subtype, obj[prop]); if (subresult) { this.currentResult += subresult; if (i != this.parentSizes[this.depth] - 1) this.currentResult += ','; this.currentResult += '\n'; } else { if (i != this.parentSizes[this.depth] - 1) this.currentResult += ','; this.currentResult += '\n'; } i++; } this.depth--; this.parentSizes.pop(); this.currentResult += this.indentsForDepth(this.depth); this.currentResult += '}'; if (this.depth == 0) return this.currentResult; break; case 'Array': this.currentResult += '['; this.depth++; this.parentSizes.push(obj.length); for (let i = 0; i < obj.length; i++) { let subtype = this.determineType(obj[i]); if (subtype == 'Object' || subtype == 'Array') this.currentResult += '\n' + this.indentsForDepth(this.depth); let subresult = this.formatType(subtype, obj[i]); if (subresult) { this.currentResult += subresult; if (i != this.parentSizes[this.depth] - 1) this.currentResult += ', '; if (subtype == 'Array') this.currentResult += '\n'; } else { if (i != this.parentSizes[this.depth] - 1) this.currentResult += ', '; if (subtype != 'Object') this.currentResult += '\n'; else if (i == this.parentSizes[this.depth] - 1) this.currentResult += '\n'; } } this.depth--; this.parentSizes.pop(); this.currentResult += ']'; if (this.depth == 0) return this.currentResult; break; case 'function': obj += ''; let lines = obj.split('\n'); for (let i = 0; i < lines.length; i++) { if (lines[i].match(/\}/)) this.depth--; this.currentResult += this.indentsForDepth(this.depth); if (lines[i].match(/\{/)) this.depth++; this.currentResult += lines[i] + '\n'; } return this.currentResult; case 'RegExp': return '/' + obj.source + '/'; case 'Date': case 'string': if (this.depth > 0 || obj.length == 0) { return '"' + obj + '"'; } else { return obj; } case 'boolean': if (obj) return 'true'; else return 'false'; case 'number': return obj + ''; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TypeRecursion() {}", "function formatAST(node)\n\t\t{\n\t\t\tif(!Array.isArray(node))\n\t\t\t{\n\t\t\t\t// Flatten enum values (object singletons with capital first letter key)\n\t\t\t\tif(node && typeof node === 'object')\n\t\t\t\t{\n\t\t\t\t\tlet keys = Object.keys(node);\n\t\t\t\t\tfor(let key of key...
[ "0.6658474", "0.61896676", "0.61093944", "0.6031969", "0.58314586", "0.58290327", "0.57272047", "0.5693663", "0.5693663", "0.568391", "0.56613797", "0.56515086", "0.5578369", "0.5564591", "0.5551576", "0.55390054", "0.5527136", "0.55130357", "0.54699343", "0.53992844", "0.536...
0.7071818
0
Just some dummy functions
onPaperMouseDown(event) { if (this.originalEvents.onMouseDown) this.originalEvents.onMouseDown(event); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dummy(){}", "function dummy(){}", "function dummy(){}", "function dummy() {}", "function dummy() {}", "function dummy() {}", "function Dummy() {}", "function Dummy() {}", "function emptyFunction() { // ...
[ "0.85926974", "0.85926974", "0.85926974", "0.8446823", "0.8446823", "0.8446823", "0.7732159", "0.7732159", "0.7099792", "0.69502294", "0.69502294", "0.69502294", "0.69502294", "0.69502294", "0.69502294", "0.69502294", "0.6932878", "0.6932878", "0.6932878", "0.6932878", "0.693...
0.0
-1
Getter function to pass the entire config object
getConfig() { if (config) { return config; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getConfig () {}", "get config() {\n return this.use().config;\n }", "getConfig() {\n return this.config;\n }", "function ReturnConfig() {\n return config;\n}", "get config() { return this._config; }", "getConfig() {\n return this.config;\n }", "getConfig() {\n retu...
[ "0.76301646", "0.7473494", "0.73050785", "0.7301468", "0.720296", "0.7189261", "0.7189261", "0.71274227", "0.70953065", "0.70526785", "0.7046455", "0.7008808", "0.70021236", "0.6940218", "0.68787205", "0.68787205", "0.6868785", "0.68328625", "0.67567086", "0.67458826", "0.674...
0.65957636
27
Setter function for when we would like to set the value of the entire config
setConfig(newConfig) { if (newConfig !== undefined) { config = newConfig; return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setConfig(name, value) {\n return this.call('config.set', name, JSON.stringify(value));\n }", "set() {\n\n let kv = this.getKeyValue();\n let config = this.readSteamerConfig({ isGlobal: this.isGlobal });\n\n config[kv.key] = kv.value;\n\n this.createSteamerConfig(config, {\n ...
[ "0.7279476", "0.71826315", "0.71334505", "0.6808685", "0.66134053", "0.6598507", "0.64250445", "0.6423309", "0.6383369", "0.62535053", "0.6245076", "0.6221906", "0.61767113", "0.61767113", "0.61767113", "0.61767113", "0.61767113", "0.61767113", "0.6138388", "0.61336327", "0.6...
0.0
-1
Setter function for when we would like to set the value of a specific config property
setConfigProperty(property, value) { if (property !== undefined && value !== undefined) { config[property] = value; return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set property(){}", "setConfig(name, value) {\n return this.call('config.set', name, JSON.stringify(value));\n }", "setValue(k, v) {\n this._config[k] = v;\n }", "set propertyPath(value) {}", "static set property(){}", "function setConfigProperty(appId, k, v, cb) { \n fhreq.POST(fhreq.getFeedHen...
[ "0.71205205", "0.6764993", "0.6707643", "0.67037374", "0.66782933", "0.6672942", "0.66272545", "0.6554702", "0.6492997", "0.6492997", "0.6492997", "0.6486302", "0.6472467", "0.6449136", "0.6274807", "0.62181973", "0.6196954", "0.61845964", "0.618257", "0.61564445", "0.6138137...
0.7280463
0
DOESN'T WORK: console.log(myFuncName); Closure bonus: factory pattern
function outerFunction() { const basti = { name: 'basti', count: 0, }; // return function() { // basti.count++; // console.log(basti.count); // return basti.name; // }; return { getName() { basti.count++; return basti.name; }, setName(name) { basti.name = name; }, }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeFunc() {\n var name = \"Mozilla\";\n function displayName() {\n console.log(name);\n }\n return displayName;\n}", "function makeFunc() {\r\n var name = \"Mozilla\";\r\n function displayName() {\r\n alert(name);\r\n console.log(name)\r\n }\r\n return displayName;\r\n }",...
[ "0.74108154", "0.740432", "0.7324829", "0.72522575", "0.72234285", "0.7195068", "0.7119213", "0.71105564", "0.70910645", "0.70285624", "0.69869655", "0.6975395", "0.6973354", "0.6871465", "0.6860202", "0.6755621", "0.6702156", "0.66750693", "0.6670888", "0.6668194", "0.666449...
0.0
-1
Parse url to get the commit info
function parseURL(url) { /** URL pattern in GitHub * new: <SERVER>/<user>/<repo>/new/<branch>/<fpath> * edit: <SERVER>/<user>/<repo>/edit/<branch>/<fpath> * delete: <SERVER>/<user>/<repo>/delete/<branch>/<fpath> * upload: <SERVER>/<user>/<repo>/upload/<branch>/<fpath> * merge: <SERVER>/<user>/<repo>/pull/<pr#> **/ /** URL pattern in GitLab * new: <SERVER>/<user>/<repo>/-/new/<branch>/<fpath> * edit: <SERVER>/<user>/<repo>/-/edit/<branch>/<fpath> * delete: <SERVER>/<user>/<repo>/-/blob/<branch>/<fpath> * upload: <SERVER>/<user>/<repo>/-/tree/<branch>/<fpath> * merge: <SERVER>/<user>/<repo>/-/merge_requests/<pr#> **/ let info = url.replace(`${SERVER}`, "").split("/"); // The extension does not work on the main page of repo if (info.length < 4) { deactivate({ rule: UNKNOWN_REQUEST }); return UNKNOWN_REQUEST; } // Remove an extra element (i.e. "-") from the GitLab url if (SERVER == SERVER_GL) info.splice(3,1); let commitType = info[3]; let baseBranch = null; let oldPath = null; let prId = null; let request = REQ_MERGE; if ((commitType == MERGE_GH) || (commitType == MERGE_GL)) { commitType = REQ_MERGE; prId = info[4]; } else { // RULE: requests on non-commit pages are ignored request = checkRequest(commitType, url); if (request == UNKNOWN_REQUEST) { return request; } baseBranch = info[4]; oldPath = getFilePath(url, commitType, baseBranch); // Unify D/U requests for GiHub and GitLab if (commitType == TYPE_BLOB) commitType = REQ_DELETE; if (commitType == TYPE_TREE) commitType = REQ_UPLOAD; } return { user: info[1], repo: info[2], baseBranch, commitType, request, oldPath, prId, url } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseRepoUrl(url) {\n if (typeof url !== \"string\" || url.length === 0)\n throw new Error(\"type error\");\n var parsedUrl = new URL(url, \"https://github.com\");\n var pathParts = parsedUrl.pathname.split(\"/\");\n if (pathParts.length < 2) {\n throw new Error(\"invalid url for...
[ "0.64453197", "0.62801296", "0.62801296", "0.62520015", "0.62301695", "0.614121", "0.6030471", "0.587388", "0.57519704", "0.57380277", "0.56607854", "0.56296074", "0.56183076", "0.5568466", "0.5568053", "0.5559336", "0.5557547", "0.5552939", "0.55429757", "0.55378956", "0.553...
0.700642
0
Check if the request is unknown
function checkRequest(commitType, url) { switch (commitType) { case REQ_NEW: case REQ_EDIT: case REQ_DELETE: //GITHUB delete case REQ_UPLOAD: //GITHUB upload return REQ_REGULAR; case TYPE_BLOB: //GITLAB delete case TYPE_TREE: //GITLAB upload // TODO: Add more checks to make it more reliable if (SERVER == SERVER_GL) { return REQ_REGULAR; } else { deactivate({ rule: UNKNOWN_REQUEST }); return UNKNOWN_REQUEST; } default: deactivate({ rule: UNKNOWN_REQUEST }); return UNKNOWN_REQUEST; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "isRequestIncorrect(request) {\n return !request || !request.endpoint || (\n (!request.body || (\n typeof request.body.length !== 'undefined' && request.body.length === 0\n )) \n && \n (\n request.method === 'POST'\n )\n ...
[ "0.67372715", "0.6577253", "0.6497145", "0.64886105", "0.63846004", "0.63789874", "0.61284405", "0.6075146", "0.60728186", "0.60728186", "0.60728186", "0.60728186", "0.60728186", "0.60728186", "0.60728186", "0.60728186", "0.60728186", "0.60728186", "0.60728186", "0.60728186", ...
0.5309789
86
Parse url to get the file path
function getFilePath(url, commitType, baseBranch) { let fpath = url.split(commitType)[1]; fpath = fpath.replace(`/${baseBranch}`, ''); return fpath; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getFilename(url) {\n return url.split('/').pop();\n }", "function fromFileUrl(url) {\n url = url instanceof URL ? url : new URL(url);\n if (url.protocol != \"file:\") {\n throw new TypeError(\"Must be a file URL.\");\n }\n var path = decodeURIComponent(url.pa...
[ "0.74008274", "0.7358109", "0.7296817", "0.7224904", "0.7135032", "0.7114485", "0.7114485", "0.7104845", "0.7104845", "0.7017387", "0.6910778", "0.68583035", "0.6857201", "0.6830213", "0.67903054", "0.6756874", "0.661175", "0.6559422", "0.65358764", "0.6516738", "0.6513681", ...
0.62737155
30
Aggregate all file info
function getPathInfo(requestInfo) { let { commitType, oldPath, newPath } = requestInfo; // TODO: Validate the file path // Find out the file path validation function on GiHub and GitLab /*/ Validate the file path if (!validatePattern(REGEX_PATH, fpath)) { return errorHandler({ msg: "Invalid file path!", err: true }); }*/ // trim path before comparision oldPath = trimSlash(oldPath); newPath = trimSlash(newPath); // get proper fpath and check for rename let rename = false; let fpath, oldParentDir; switch (commitType) { case REQ_DELETE: oldParentDir = getParentPath(oldPath); fpath = oldPath; break; case REQ_EDIT: oldParentDir = getParentPath(oldPath); fpath = newPath; if (oldPath != newPath) rename = true; break; case REQ_NEW: oldParentDir = oldPath; fpath = newPath; // GitLab does not display oldPath in the UI if (SERVER == SERVER_GL) fpath = `${oldPath}/${newPath}`; break; case REQ_UPLOAD: // TODO: Support multiple uploaded files on GitHub oldParentDir = oldPath; fpath = `${oldPath}/${newPath}`; break; } // trim path again fpath = trimSlash(fpath); // Extract proper fileName and parent directory let fname = removeParentPath(fpath); let newParentDir = getParentPath(fpath); // Prepare a list of dirs that should be fetched from repo let { dirs, newdirs, moved } = compareParentDirs(commitType, oldParentDir, newParentDir); return { dname: newParentDir, fname, dirs, newdirs, newPath: fpath, oldPath, rename }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async normalizeFilesInfo() {\n let size = 0;\n let count = 0;\n await this.iterateFiles((fp, stat) => (count++, size += stat.size));\n await this.db.setData('filesTotalSize', size);\n await this.db.setData('filesCount', count);\n }", "parseFileMetadata(allFiles) {\n let SUMMARY...
[ "0.67566943", "0.60958487", "0.5850683", "0.5792237", "0.5770553", "0.5677294", "0.5662651", "0.5650829", "0.5648926", "0.56313944", "0.55946344", "0.557828", "0.5571775", "0.5556915", "0.5532236", "0.5520809", "0.54838425", "0.5448299", "0.5433808", "0.5429571", "0.5415283",...
0.0
-1
Compare old/new parent dirs
function compareParentDirs(commitType, oldParentDir, newParentDir) { var newdirs = []; var moved= false; let strcomp = findFirstDiffPos(oldParentDir, newParentDir); if (strcomp > -1) { // 1) Find new dirs newdirs = findNewDirs({ commitType, newParentDir, oldParentDir }); // 2) Find moved file //TODO: remove the following assumption to find a moved file // Assumption: the file is not moved to a different path //moved = newParentDir != oldParentDir ? true: false; } var dirs = getIntermediatePaths(`${oldParentDir}/`); //TODO: ignore newdirs as we do not fetch them from repo return {dirs, newdirs, moved}; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findNewDirs({\n commitType,\n newParentDir,\n oldParentDir\n}) {\n // No newdir is created through delete/upload operation\n if ((commitType == REQ_DELETE) || (commitType == REQ_UPLOAD))\n return [];\n\n // newdirs are differences between old and new parent dirs\n let diff = tr...
[ "0.6994195", "0.5847482", "0.5769421", "0.5769421", "0.56387126", "0.55443853", "0.55443853", "0.544481", "0.5370552", "0.5370552", "0.5370552", "0.53078747", "0.528978", "0.5285065", "0.5248552", "0.52026755", "0.51826566", "0.50803614", "0.5061674", "0.5061674", "0.50591147...
0.7508493
0
Check for new dirs
function findNewDirs({ commitType, newParentDir, oldParentDir }) { // No newdir is created through delete/upload operation if ((commitType == REQ_DELETE) || (commitType == REQ_UPLOAD)) return []; // newdirs are differences between old and new parent dirs let diff = trimSlash(newParentDir.replace(oldParentDir, "")); return diff.split("/"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DirExists() {\r\n}", "function checkFolders() {\n const courseDataPath = './courseData';\n const htmlFilesPath = './htmlFiles';\n\n if (!fs.existsSync(courseDataPath))\n fs.mkdirSync(courseDataPath);\n\n if (!fs.existsSync(htmlFilesPath))\n fs.mkdirSync(htmlFilesPath);\n}", "...
[ "0.6638074", "0.6446226", "0.634031", "0.6287058", "0.6284702", "0.61129266", "0.60786414", "0.6048487", "0.60336006", "0.59690225", "0.59520257", "0.5942961", "0.593846", "0.5936863", "0.5901121", "0.587664", "0.5827537", "0.58186716", "0.57468176", "0.57468176", "0.57468176...
0.6508572
1
Mostra modal com gif animado de loading
function showLoading() { $('#modalLoading').show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showloading(){ // waiting/working gif-animation\n $(\"#loading\").showv();\n}", "function mostrarLoader(){\n $(\"#loader_gif\").fadeIn(\"slow\");\n }", "loading() {\n this.modal.jQueryModalFade.addClass('modal_fade_trick');\n this.modal.jQueryModalAwait.css('display', 'blo...
[ "0.77065486", "0.76277375", "0.76018876", "0.753274", "0.74888474", "0.7476853", "0.74650115", "0.74511826", "0.7450254", "0.7437795", "0.74228907", "0.74153656", "0.74114245", "0.73400146", "0.72449327", "0.71448314", "0.7127791", "0.7022794", "0.69827443", "0.6887912", "0.6...
0.70869005
17
Esconde modal com git animado de loading
function hideLoading() { $('#modalLoading').hide(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "loading() {\n this.modal.jQueryModalFade.addClass('modal_fade_trick');\n this.modal.jQueryModalAwait.css('display', 'block');\n this.modal.jQueryModalWindow.css('display', 'none');\n }", "function loadingModal(){\n var $modal = $('.js-loading-bar'),\n $progress = $modal.find('.progress-bar');\n ...
[ "0.68916714", "0.65434045", "0.63060486", "0.6295109", "0.6264017", "0.6234945", "0.6060562", "0.60568786", "0.6028527", "0.60092235", "0.59950197", "0.5968555", "0.5967706", "0.5936151", "0.593191", "0.58931696", "0.5892369", "0.58872503", "0.58835644", "0.5862168", "0.58340...
0.0
-1
Calculate the ScaleData array of arrays
function ScaleCalc(ScaleLines) { if ((ScaleLinesLast == ScaleLines) && (ScaleSampleRate == (CurrentSamplerate / SET_SampleDecimation))) { return; } if ((CurrentSamplerate == 0) || (SET_SampleDecimation == 0)) { ScaleLinesLast = 0; return; } ScaleLinesLast = ScaleLines; ScaleSampleRate = (CurrentSamplerate / SET_SampleDecimation); ScaleData = []; ScaleDataL = []; for (var I = 0; I < ScaleLines; I++) { ScaleData[I] = []; } if (SET_ScaleSetLog && (DISP_VU__ == 0)) { // Creating logarithmic scale var LogB = Math.log(SET_ScaleSetLogBase / 1000); var ScaleSetLogFactor_ = (SET_ScaleSetLogFactor * ScaleLines) / 1000; var ScaleSetLogOffset_ = (SET_ScaleSetLogOffset * ScaleLines) / 1000; if (LogB > 0) { for (var I = 1; I < ScaleLines; I++) { var Val = ((Math.log(I / ScaleLines) / LogB) * ScaleSetLogFactor_) + ScaleSetLogOffset_; Val = Math.round(Val); if (Val < 0) { Val = 0; } if (Val >= ScaleLines) { Val = ScaleLines - 1; } ScaleData[Val].push(I); } } // Eliminating unnecessary values at the ends if (ScaleData[0].length > 1) { var Temp = ScaleData[0][ScaleData[0].length - 1]; ScaleData[0] = [Temp]; } if (ScaleData[ScaleLines - 1].length > 1) { var Temp = ScaleData[ScaleLines - 1][0]; ScaleData[ScaleLines - 1] = [Temp]; } // Searching bounds var BoundMin = 0; while ((ScaleData[BoundMin].length == 0) && (BoundMin < (ScaleLines - 1))) { BoundMin++; } var BoundMax = ScaleLines - 1; while ((ScaleData[BoundMax].length == 0) && (BoundMax > 0)) { BoundMax--; } // Eliminating unnecessary values for low quality if (SET_ScaleSetLogQuality == 0) { for (var I = (BoundMin + 1); I < (BoundMax); I++) { if (ScaleData[I].length > 1) { if ((ScaleData[I].length % 2) == 0) { var T = (ScaleData[I].length) / 2; ScaleData[I].splice(T + 1, T - 1); ScaleData[I].splice(0, T - 1); } else { var T = (ScaleData[I].length - 1) / 2; ScaleData[I].splice(T + 1, T); ScaleData[I].splice(0, T); } } } } // Filling gaps for (var I = (BoundMin + 1); I < (BoundMax); I++) { if (ScaleData[I].length == 0) { var BoundMin_ = I - 1; var BoundMax_ = I + 1; while (ScaleData[BoundMax_].length == 0) { BoundMax_++; } var Val1 = ScaleData[BoundMin_][ScaleData[BoundMin_].length - 1]; var Val2 = ScaleData[BoundMax_][0]; var ValDist = BoundMax_ - BoundMin_; for (var II = (BoundMin_ + 1); II < BoundMax_; II++) { if (SET_ScaleSetLogQuality == 2) { var Val1_Count = BoundMax_ - II; var Val2_Count = II - BoundMin_; var Val__ = GCD(Val1_Count, Val2_Count); Val1_Count = Val1_Count / Val__; Val2_Count = Val2_Count / Val__; for (var III = 0; III < Val1_Count; III++) { ScaleData[II].push(Val1); } for (var III = 0; III < Val2_Count; III++) { ScaleData[II].push(Val2); } } else { if ((II - BoundMin_) <= (BoundMax_ - II)) { ScaleData[II].push(Val1); } if ((II - BoundMin_) >= (BoundMax_ - II)) { ScaleData[II].push(Val2); } } } } } } else { for (var I = 0; I < ScaleLines; I++) { ScaleData[I].push(I); } } for (var I = 0; I < ScaleLines; I++) { ScaleDataL[I] = ScaleData[I].length; } ScaleCalcStripReset(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "scaleData(data, in_min, in_max, out_min, out_max) {\n let scaledData = new Array()\n for (let i = 0; i < data.length; i++) {\n scaledData[i] = new Array();\n for (let j = 0; j < data[i].length; j++) {\n scaledData[i][j] = this.mapDataPoint(data[i][j], in_min, in_max, out_min, out_max)\n ...
[ "0.74056643", "0.6714064", "0.67061245", "0.6418824", "0.61649185", "0.6094318", "0.60089266", "0.58719933", "0.5841861", "0.5837198", "0.5818883", "0.5794523", "0.57804996", "0.57532364", "0.57354015", "0.5734468", "0.5717609", "0.57163405", "0.569526", "0.5684712", "0.56831...
0.6043285
6
change of class according to the slides array retrieved previously
function updateSlidePosition() { for (let slide of slides) { slide.classList.remove('carousel_item-visible'); slide.classList.add('carousel_item-visible-hidden'); } slides[slidePosition].classList.add('carousel_item-visible'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "changeActiveClass(){\n this.slideArray.forEach((item) => item.element.classList.remove(this.activeClass))\n this.slideArray[this.index.active].element.classList.add(this.activeClass);\n }", "function setActiveSlide() {\n\n // remove the active class on every slide.\n slides.forEach(slide => {\n ...
[ "0.7812348", "0.7379996", "0.7092852", "0.69677526", "0.6931081", "0.6931081", "0.69274443", "0.6836575", "0.67675084", "0.6740358", "0.6676347", "0.6635207", "0.6599923", "0.6599923", "0.65555215", "0.6535399", "0.652125", "0.6495437", "0.6487315", "0.64662796", "0.6452297",...
0.651026
17
logic of slide position change/
function moveToNextSlide() { updateSlidePosition(); if(slidePosition == totalSlides - 1) { slidePosition = 0; } else { slidePosition++; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updatePosition(x) {\n var slidePercent;\n var pagePercent;\n \n slidePercent = -(x / control.slideWidth);\n pagePercent = -(x / (control.slideWidth * control.visibleSlides));\n\n\n if(slidePercent === 0) { slidePercent = 0; }\n if(pagePercent === 0) { page...
[ "0.70824003", "0.7047703", "0.6944929", "0.69430727", "0.6934493", "0.69331074", "0.69028896", "0.69028896", "0.69028896", "0.6900515", "0.6900515", "0.6900515", "0.6900515", "0.6881988", "0.68489724", "0.68235236", "0.6820406", "0.6775719", "0.66778725", "0.6673475", "0.6669...
0.64565367
39
FUNCTIONS ////////////////////////////////// Clears existing stream elements from the stream container element.
function ClearStream(ignoreList = []){ let safeElements = 0; let currentStream = StreamContainer.childNodes[0]; while (currentStream){ if (ignoreList.find(x => {return x == currentStream.id;})){ safeElements++; } else { ActiveStreamIds.splice(ActiveStreamIds.indexOf(currentStream.id),1); StreamContainer.removeChild(currentStream); } currentStream = StreamContainer.childNodes[safeElements]; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearIt() {\n var node = document.getElementById(\"stream-search-container\")\n while (node.hasChildNodes()) {\n node.removeChild(node.lastChild);\n}\n}", "clear() {\n\t\twhile (this.getElement().firstChild) {\n\t\t\tthis.getElement().removeChild(this.getElement().firstChild)\n\t\t}\n\t}", "clear...
[ "0.7065309", "0.66154206", "0.6377074", "0.63348114", "0.6326498", "0.62691", "0.6255951", "0.6235731", "0.6151689", "0.61502403", "0.61462283", "0.6144613", "0.6144613", "0.614211", "0.6140091", "0.6137852", "0.61274064", "0.6124047", "0.6112751", "0.608857", "0.6081578", ...
0.69378096
1
Finds the ids in the list that do not match the existing stream info on display. Useful for refresh where only one or two elements on a page might change.
function IdendifyNewStreams(idList){ let result = []; for (let id of idList){ if (!ActiveStreamIds.find(x => {return x == id;})){ result.push(id); } } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function IdendifyExistingStreams(idList){\n\tlet result = [];\n\tfor (let id of idList){\n\t\tif (ActiveStreamIds.find(x => {return x == id;})){\n\t\t\tresult.push(id);\n\t\t} \n\t}\n\treturn result;\n}", "async visibleListingIds(root, args) {\n // Load all the action tags by listing ids.\n // A listin...
[ "0.6963669", "0.6013948", "0.5416812", "0.5414892", "0.5351551", "0.5323136", "0.5312701", "0.5293633", "0.52676874", "0.52622294", "0.5177941", "0.5177828", "0.51615673", "0.51540774", "0.5127412", "0.51161474", "0.5107851", "0.5081128", "0.50799143", "0.5053775", "0.5047566...
0.69087523
1
Finds the ids in the list that match the existing stream info on display. Useful for refresh where only one or two elements on a page might change.
function IdendifyExistingStreams(idList){ let result = []; for (let id of idList){ if (ActiveStreamIds.find(x => {return x == id;})){ result.push(id); } } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function IdendifyNewStreams(idList){\n\tlet result = [];\n\tfor (let id of idList){\n\t\tif (!ActiveStreamIds.find(x => {return x == id;})){\n\t\t\tresult.push(id);\n\t\t}\n\t}\n\treturn result;\n}", "async getFileStreams () {\n\t\tconst fileStreamIds = this.markers.reduce((streamIds, marker) => {\n\t\t\tif (mar...
[ "0.69908404", "0.58725196", "0.5681251", "0.567016", "0.56504774", "0.5545049", "0.5400865", "0.5358774", "0.53583074", "0.5334763", "0.5319349", "0.53045785", "0.52090186", "0.51754457", "0.5139477", "0.51363707", "0.5125255", "0.5111685", "0.51019835", "0.5093042", "0.50782...
0.7339553
0
Handler for when new streams may have been detected
function OnStreams(e = null){ if (HasValidResponse()){ BuildStreamUI(RawResponse['streams']); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "watchStreamStatus() {\n const tracks = this.stream.getTracks();\n for (let track of tracks) {\n track.onended = this.handleStreamEnd;\n }\n }", "function handleAddStreamEvent(event) {\n log(\"*** Stream added\");\n console.log('///////////////////////////////// Stream added');\n // document.get...
[ "0.68096834", "0.6361491", "0.62951523", "0.62523866", "0.6201302", "0.6145435", "0.61407644", "0.61318576", "0.6130908", "0.60507196", "0.6039505", "0.6033619", "0.60202914", "0.60143375", "0.5980244", "0.5924505", "0.5920418", "0.5917791", "0.5900056", "0.5883394", "0.58814...
0.61104757
9
Takes in the array of stream objects and builds out the UI, altering the document.
function BuildStreamUI(streamArray){ /** * Builds a stream element based on the given stream element and adds it to the container. * * @param streamInfo The twitch api representation of a user stream * @param id The identifier for the document element */ function AddStreamElement(streamInfo, id){ ActiveStreamIds.push(GetStreamId(streamInfo)); var newStreamDisplay = GetConfiguredElement(STREAM_TEMPLATE).cloneNode(true); newStreamDisplay.id = id; newStreamDisplay.hidden = false; //Set the elements up to display the stream info newStreamDisplay.getElementsByClassName('stream-preview')[0].innerHTML = "<img src=\""+GetImage(streamInfo)+"\" />"; newStreamDisplay.getElementsByClassName('stream-title')[0].innerHTML = GetChannelName(streamInfo); newStreamDisplay.getElementsByClassName('stream-game')[0].innerHTML = GetStreamGame(streamInfo); newStreamDisplay.getElementsByClassName('stream-viewers')[0].innerHTML = GetStreamViewerCount(streamInfo)+" viewers"; newStreamDisplay.getElementsByClassName('stream-desc')[0].innerHTML = "(Language: "+GetChannelLanguage(streamInfo)+") "+ GetChannelStatus(streamInfo); StreamContainer.insertBefore(newStreamDisplay,StreamContainer.firstChild); } //create a list of identifiers for teh streamArray let incomingIds = []; for (let streamObj of streamArray){ incomingIds.push(streamObj['_id']); } //clear stream of all elements not in our new array. ClearStream(IdendifyExistingStreams(incomingIds)); //loop over streamArray for identifiers returned by IdendifyNewStreams let newIdentifiers = IdendifyNewStreams(incomingIds); for (let streamObj of streamArray){ //if the stream is new, build the stream element let id = GetStreamId(streamObj); if (newIdentifiers.find(x => {return x == id;})){ AddStreamElement(streamObj, id); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showStreams(streamsArr) {\n console.log(streamsArr);\n \n $streamArea\n .empty();\n\n for (var i = 0; i < streamsArr.length; i++) {\n // build a row with columns of iframes inside\n\n var $stream = $(\"<div>\")\n .addClass(\"col\");\n\n var $title = $(\"<...
[ "0.641517", "0.5967672", "0.5833425", "0.57478637", "0.55464536", "0.55242515", "0.55198145", "0.54871464", "0.5466205", "0.5425338", "0.54210365", "0.5396105", "0.53218806", "0.52911425", "0.52859855", "0.5240859", "0.52260315", "0.5225036", "0.519313", "0.51902854", "0.5179...
0.744683
0
Builds a stream element based on the given stream element and adds it to the container.
function AddStreamElement(streamInfo, id){ ActiveStreamIds.push(GetStreamId(streamInfo)); var newStreamDisplay = GetConfiguredElement(STREAM_TEMPLATE).cloneNode(true); newStreamDisplay.id = id; newStreamDisplay.hidden = false; //Set the elements up to display the stream info newStreamDisplay.getElementsByClassName('stream-preview')[0].innerHTML = "<img src=\""+GetImage(streamInfo)+"\" />"; newStreamDisplay.getElementsByClassName('stream-title')[0].innerHTML = GetChannelName(streamInfo); newStreamDisplay.getElementsByClassName('stream-game')[0].innerHTML = GetStreamGame(streamInfo); newStreamDisplay.getElementsByClassName('stream-viewers')[0].innerHTML = GetStreamViewerCount(streamInfo)+" viewers"; newStreamDisplay.getElementsByClassName('stream-desc')[0].innerHTML = "(Language: "+GetChannelLanguage(streamInfo)+") "+ GetChannelStatus(streamInfo); StreamContainer.insertBefore(newStreamDisplay,StreamContainer.firstChild); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createStreamElement(stream, htmlContent) {\n if (stream.channel) {\n htmlContent += '<div class=\"stream\">'\n + '<i class=\"fa fa-star fa-lg\" data-stream-name=' \n + stream.channel.display_name + '></i><a class=\"stream-title\" target=\"_blank\" href=\"' +...
[ "0.6152173", "0.58572894", "0.5553464", "0.55514413", "0.5529727", "0.55225736", "0.55225736", "0.55225736", "0.55134606", "0.5470374", "0.54153126", "0.5388604", "0.5388604", "0.5388604", "0.5388389", "0.5388389", "0.5388389", "0.53632313", "0.5203372", "0.5170768", "0.51617...
0.5767108
2
Function from Django documentation to acquire the token
function getCookie(name) { let cookieValue = null; if (document.cookie && document.cookie !== '') { const cookies = document.cookie.split(';'); for (let i = 0; i < cookies.length; i++) { const cookie = cookies[i].trim(); // Does this cookie string begin with the name we want? if (cookie.substring(0, name.length + 1) === (name + '=')) { cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); break; } } } return cookieValue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getRequestToken() {\n return apiClient.get(\n '/authentication/token/new?api_key=6c1e80dae659cb7d1abdf16afd8bb0e3'\n )\n }", "function getToken() {\n return token;\n }", "function getToken() {\n\treturn wAccessToken;\n}", "static getToken() {\n return localStorage.getItem('token');\n }", ...
[ "0.77756983", "0.7500571", "0.7324175", "0.73045236", "0.73045236", "0.7242793", "0.7212075", "0.71881425", "0.71849525", "0.7174606", "0.7128484", "0.7113621", "0.7096266", "0.70721626", "0.7015707", "0.6981626", "0.6953274", "0.69516456", "0.6933758", "0.6922899", "0.692024...
0.0
-1
Function to follow user
function follow_user() { username = document.querySelector('#username').textContent; const request = new Request( `/follow/${username}/`, {headers: {'X-CSRFToken': csrftoken}} ); fetch(request, { method: 'POST', mode: 'same-origin' }) .then(response => response.json()) .then(result => { // Print error message console.log(result); }); // Change the button text buttonText = document.querySelector('#followButton'); if (buttonText.innerHTML === 'Follow') buttonText.innerHTML = 'Unfollow'; else buttonText.innerHTML = 'Follow'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function follow() {\n UserService.follow(vm.currentUser, vm.user)\n .then(res => {\n vm.user.followers.push(vm.currentUser._id);\n vm.isFollowed = true;\n\n // send notification to the server that user is followed\n socket.emit('notifica...
[ "0.8155532", "0.79040426", "0.77162135", "0.76166123", "0.7469401", "0.7434689", "0.74089825", "0.73576117", "0.7248631", "0.7202356", "0.71616757", "0.7157747", "0.70747495", "0.70300496", "0.70181143", "0.6964698", "0.6926259", "0.6915431", "0.6911087", "0.6862033", "0.6854...
0.67276746
30
Check if the currente profile user is being followed
function is_following() { username = document.querySelector('#username').textContent; const request = new Request( `/follow/${username}`, {headers: {'X-CSRFToken': csrftoken}} ); fetch(request, { method: 'GET', mode: 'same-origin' }) .then(response => response.json()) .then(result => { // Print error message console.log(result); if (result['is being followed']) { document.querySelector('#followButton').innerHTML = 'Unfollow' } else { document.querySelector('#followButton').innerHTML = 'Follow' } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function followUser() {\n if (LoginService.isLoggedIn()) {\n UserProfileService\n .followUser(vm.userInfo.id)\n .then(function () {\n vm.isFollowing = true;\n\n //reload details for the current user who has been followed/unfollowed\n getUserInfoForOthe...
[ "0.7270124", "0.7037906", "0.69238424", "0.6841563", "0.6798353", "0.67212784", "0.6683841", "0.660533", "0.6597247", "0.6567552", "0.64808726", "0.6479216", "0.6453143", "0.64486223", "0.64139736", "0.6411565", "0.6303281", "0.62972236", "0.6294975", "0.6198751", "0.6169152"...
0.67007774
6
ctrlFactory is a function that has two arguments. one is named "route" and will be passed the child route the other can be named anything, and will be passed the first match of the path component regex
function itemRoute(ctrlFactory) { return function(setCurrent, section, itemId) { var route = this; if (!itemId) { throw new Error("No itemId - did you forget to create a regex group for it? " + section); } var routeChild = route.child(section); // curry up the route argument by name // resulting in a factory with a single positional argument for the id var createCtrl = ctrlFactory.curry({route: routeChild}); setCurrent(createCtrl(itemId)); return routeChild; }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor($route, $routeParams, $location, codenvyAPI, cheNotification) {\n 'ngInject';\n\n let factoryId = $route.current.params.id;\n\n this.factory = codenvyAPI.getFactory().getFactoryById(factoryId);\n\n let promise = codenvyAPI.getFactory().fetchFactory(factoryId);\n\n promise.then((factory) ...
[ "0.55588454", "0.551359", "0.55075616", "0.5432776", "0.51672363", "0.51647323", "0.51647323", "0.5161971", "0.51438063", "0.5127902", "0.5115674", "0.50965196", "0.50965196", "0.50965196", "0.50965196", "0.50965196", "0.50965196", "0.5090916", "0.50398344", "0.4969988", "0.4...
0.715299
0
Suitelet used by Client script to get list of contacts attached to customer record.
function getFilteredBuyerList(req, res) { var customerId = req.getParameter('customerid'); var retjson = { "status":false, "err":"", "list":new Array() }; try { //only execute if clientId is set if (customerId) { //search for ALL contacts for client var cflt = [new nlobjSearchFilter('internalid', null, 'anyof', customerId), new nlobjSearchFilter('isinactive','contact','is','F')]; var ccol = [new nlobjSearchColumn('internalid', 'contact',null), new nlobjSearchColumn('company', 'contact',null), new nlobjSearchColumn('firstname', 'contact',null).setSort(), new nlobjSearchColumn('lastname', 'contact',null)]; var crs = nlapiSearchRecord('customer', null, cflt, ccol); if (crs && crs.length > 0) { for (var c=0; c < crs.length; c++) { var ctid = crs[c].getValue('internalid', 'contact', null); var ctdisplay = crs[c].getText('company', 'contact', null)+' : '+ (crs[c].getValue('firstname', 'contact', null)?crs[c].getValue('firstname', 'contact', null):'')+' '+ (crs[c].getValue('lastname', 'contact', null)?crs[c].getValue('lastname', 'contact', null):''); retjson['list'].push({ 'id':ctid, 'text':ctdisplay }); } retjson['status'] = true; } else { retjson['err'] = 'No Results found'; } } } catch (buyerlisterr) { log('error','Error getting buyer list',customerId+' customer failed searching for all buyers: '+getErrText(buyerlisterr)); retjson['err'] = 'Error occured: '+getErrText(buyerlisterr); } log('debug','json',JSON.stringify(retjson)); res.write(JSON.stringify(retjson)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getContacts() {\n return contacts;\n}", "function getContacts() {\n return contacts;\n }", "contactList() {\n\t if (Session.get(\"searchName\") != \"\") {\n\t\tvar searchString = Session.get(\"searchName\");\n\t\treturn Template.contacts.__helpers[\" findContact\"](sear...
[ "0.76625156", "0.76024836", "0.7587479", "0.7125127", "0.6870338", "0.68261176", "0.67650175", "0.6752856", "0.67253923", "0.67253923", "0.6709678", "0.66978914", "0.66571796", "0.66345936", "0.66080326", "0.65905505", "0.6586217", "0.6540159", "0.65268743", "0.6496449", "0.6...
0.6436592
22
On window initial Get schedule by vehicle
function getSchedule() { $.ajax({ type : "POST", async : false, dataType : 'json', data : { 'vo.vehID' : select_vehicle.getSelectedValue() }, url : basePath + "monitor/display!getSchedule", success : function(d) { if("empty" != d.result) { $("#sel_schedule option").remove(); $("#sel_schedule").append("<option value='-1'>Please choose schedule...</option>"); for ( var int = 0; int < d.length; int++) { $("#sel_schedule").append("<option value='" + d[int].key + "'>" + d[int].value + "</option>"); } } }, error : function(d) { alert("Exception occurs!"); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "activate(params) {\n return this.getSchedule(params.id);\n }", "getSchedule() {\n this.setRelativeTime();\n return this.schedule;\n }", "get schedule() {\n\t\treturn this.__schedule;\n\t}", "static select(direction, schedule) {\n if (schedule === \"Modified\") {\n return direction === \"No...
[ "0.64787364", "0.6260717", "0.6260608", "0.6189257", "0.6084678", "0.60342926", "0.60287493", "0.59941506", "0.59046125", "0.58724123", "0.58375823", "0.5835237", "0.580924", "0.57994556", "0.5751321", "0.5695915", "0.5683218", "0.56717336", "0.56697214", "0.56631637", "0.566...
0.6538697
0
Process the date time before submit search
function setTimes() { var schTime = $("#sel_schedule").val(); if(schTime != -1) { var schStr = $("#sel_schedule").find('option:selected').text(); var beginDat = $.trim(schStr.split(',')[0]); var endDat = $.trim(schStr.split(',')[1]); $("#startDate").val(beginDat.split(' ')[0]); $("#startTime").val(beginDat.split(' ')[1]); $("#endDate").val(endDat.split(' ')[0]); $("#endTime").val(endDat.split(' ')[1]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleSearchButtonClickDate() {\n // Format the user's search by removing leading and trailing whitespace\n var filterDate = $dateInput.value.trim().toLowerCase();\n\n // Set ufoSightings to an array of all dataSet whose \"date\" matches the filter\n ufoSightings = dataSet.filter(function(sightings) {...
[ "0.67431283", "0.63917", "0.63895345", "0.63751405", "0.6223982", "0.62211955", "0.6191406", "0.6145775", "0.6136867", "0.6133582", "0.6112586", "0.603508", "0.59624773", "0.591682", "0.59089774", "0.5901814", "0.5869121", "0.58676416", "0.58639103", "0.58534473", "0.5844374"...
0.0
-1
Initial the route time slider
function initSlider() { $( "#slider" ).slider({ //ui slider min: 0, //min value max: nop, //max value value:nop, //init value step: 1, range: "min", animate:true, slide: function(event, ui) { //slide event doStop(); //stop the timer $('#play').button('option', { //change the buttom to pause label: "pause", icons: { primary: "ui-icon-play" } }); clearRoute(); //delete the route addRoute($("#slider").slider("option", "value")); //redraw the route } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startAutoSwitchView(dspTime,i){\n if(getState(pfad0 + 'Auto_Switch_View').val === true){\n if(dspTime !== ''){\n setState(pfad0 + 'Timer_View_Switch',parseInt(dspTime, 10));\n }\n else{\n setState(pfad0 + 'Timer_View_Switch',15);\n }\n autoSwitch...
[ "0.63333815", "0.62027454", "0.6153874", "0.6126762", "0.6107432", "0.60427654", "0.6042353", "0.6041803", "0.6019451", "0.60017794", "0.5888636", "0.5887877", "0.5879176", "0.5855965", "0.5843383", "0.5830825", "0.5829191", "0.5818997", "0.5811173", "0.57950276", "0.57943386...
0.64647955
0
Move the slider and draw the route
function moveSlider() { var newValue = $("#slider").slider("option", "value") + 1; if(newValue > nop + 1) { window.clearInterval(timer); return; } $("#slider").slider("option", "value", newValue); clearRoute(); //delete the route addRoute(newValue); //redraw the route }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawSlider() {\n fill(270, 10, 100);\n\n rect(sliderX, sliderY, 30, height);\n //move one slider vertically\n moveSliderX();\n\n rect(sliderX2, sliderY2, width, 30);\n //move one slider horizontally\n moveSliderY();\n}", "function Navigate() {\n source_vector_draw_rdc.clear();\n ...
[ "0.6958709", "0.6480695", "0.6475359", "0.633633", "0.62785655", "0.61035067", "0.60452896", "0.598944", "0.5963123", "0.5945575", "0.5936033", "0.59287965", "0.5922912", "0.59081143", "0.590696", "0.59037393", "0.58168656", "0.57599014", "0.5749802", "0.5717727", "0.57065856...
0.67325264
1
Initial the complete route
function addRouteAll() { totalCount = dataList.length; //count of total data perData = 10; //add 10 data per slider's changging nop = Math.ceil(totalCount/perData); //slider's max value var endPoint = new OpenLayers.LonLat(parseFloat(dataList[totalCount-1].longitude/60).toFixed(6), parseFloat(dataList[totalCount-1].latitude/60).toFixed(6)).transform(fromProjection, OSM_toProjection); points = []; // clearMess(); var sinobj; for(var i = 0; i < totalCount; i++) { //add all data point to the array sinobj = dataList[i]; point = new OpenLayers.Geometry.Point(parseFloat(sinobj.longitude/60).toFixed(6), parseFloat(sinobj.latitude/60).toFixed(6)).transform(fromProjection, OSM_toProjection); //根据坐标取点,并计算投影偏移量 points.push(point); // addMess(i, 'Time: ' + sinobj.gpsDateTime + // '; Longitude: ' + parseFloat(sinobj.longitude/60).toFixed(6) + // '; Latitude: ' + parseFloat(sinobj.latitude/60).toFixed(6) + // '; Speed: ' + sinobj.speed + // '; Direction: ' + sinobj.direction // ); } clearRoute(); //delete old route lineFeature = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.LineString(points), null, style_green); //build the route vectorLayer.addFeatures(lineFeature); //add the route to the layer var startPoint = new OpenLayers.LonLat(parseFloat(dataList[0].longitude/60).toFixed(6), parseFloat(dataList[0].latitude/60).toFixed(6)).transform(fromProjection, OSM_toProjection); var endPoint = new OpenLayers.LonLat(parseFloat(dataList[totalCount-1].longitude/60).toFixed(6), parseFloat(dataList[totalCount-1].latitude/60).toFixed(6)).transform(fromProjection, OSM_toProjection); delMarkers(markLayer[0]); //remove old starting location's marker delMarkers(markLayer[1]); //remove old ending location's marker //add new starting\ending location's marker addMarkers('startP', startPoint, 0, 'Starting location: time: ' +dataList[0].gpsDateTime + '</br>Longitude:' + parseFloat(dataList[0].longitude/60).toFixed(6) + '</br>Latitude:' + parseFloat(dataList[0].latitude/60).toFixed(6)); addMarkers('endP', endPoint, 1, 'Ending location: Time: ' + dataList[totalCount-1].gpsDateTime + '</br>Longitude:' + parseFloat(dataList[totalCount-1].longitude/60).toFixed(6) + '</br>Latitude:' + parseFloat(dataList[totalCount-1].latitude/60).toFixed(6)); map.setCenter(endPoint, 9); //move the center to ending location $('#operDiv').css('visibility', 'visible'); //the div which the slider on it initSlider(); //initial the slider //remove all old event markers for ( var int = 2; int < 11; int++) { delMarkers(markLayer[int]); } //add new event markers addEventMarkers(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function prepRoute() {\n transitionRoute(this.path);\n }", "_loadInitialRoute(){\n\n /*con esta constante y el window.location.pathname.split() estamos \n separar en un arreglo de dos elementos la ruta por ejemplo quedaría \n [/,contacto ] entonces podriamos acceder a cualquiera de...
[ "0.7014215", "0.68943614", "0.6562648", "0.6420479", "0.63975763", "0.63258016", "0.62485194", "0.612996", "0.6100219", "0.5988359", "0.59847546", "0.5942555", "0.59243876", "0.591655", "0.59143233", "0.5848521", "0.58379054", "0.5820153", "0.5801231", "0.5785634", "0.5730569...
0.0
-1
Change route by slider
function addRoute(pointIndex) { points = []; var i = 0; var max = (pointIndex*perData >= dataList.length ? dataList.length : pointIndex*perData); max = (max == 0 ? 1 : max); var endPoint = new OpenLayers.LonLat(parseFloat(dataList[max-1].longitude/60).toFixed(6), parseFloat(dataList[max-1].latitude/60).toFixed(6)).transform(fromProjection, OSM_toProjection); //根据坐标取点,并计算投影偏移量 // clearMess(); var sinobj; for(; i < max; i++) { sinobj = dataList[i]; point = new OpenLayers.Geometry.Point(parseFloat(sinobj.longitude/60).toFixed(6), parseFloat(sinobj.latitude/60).toFixed(6)).transform(fromProjection, OSM_toProjection); //根据坐标取点,并计算投影偏移量 points.push(point); // addMess(i, 'Time: ' + sinobj.gpsDateTime + // '; Longitude: ' + parseFloat(sinobj.longitude/60).toFixed(6) + // '; Latitude: ' + parseFloat(sinobj.latitude/60).toFixed(6) + // '; Speed: ' + sinobj.speed + // '; Direction: ' + sinobj.direction // ); } lineFeature = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.LineString(points), null, style_green); //build the route $('#sTime').text('Time:' + dataList[max-1].gpsDateTime/* + '-' + parseFloat(dataList[max-1].longitude/60).toFixed(6) + '-' + parseFloat(dataList[max-1].latitude/60).toFixed(6)*/); vectorLayer.addFeatures(lineFeature); //add the route to the layer delMarkers(markLayer[1]); addMarkers('endP', endPoint, 1, 'Ending location: Time: ' +dataList[max-1].gpsDateTime + '</br>Longitude:' + parseFloat(dataList[max-1].longitude/60).toFixed(6) + '</br>Latitude:' + parseFloat(dataList[max-1].latitude/60).toFixed(6)); //change the center of the map when the ending lication outsides the current view if(endPoint.lon <= map.getExtent().left || endPoint.lon >= map.getExtent().right || endPoint.lat <= map.getExtent().bottom || endPoint.lat >= map.getExtent().top) { map.setCenter(endPoint); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function moveSlider() {\n\tvar newValue = $(\"#slider\").slider(\"option\", \"value\") + 1;\n\tif(newValue > nop + 1) {\n\t\twindow.clearInterval(timer);\n\t\treturn;\n\t}\n\t$(\"#slider\").slider(\"option\", \"value\", newValue);\n\tclearRoute();\t//delete the route\n\taddRoute(newValue);\t//redraw the route\n}",...
[ "0.66858536", "0.6680634", "0.64972895", "0.6280928", "0.61700267", "0.5976587", "0.5927236", "0.5904781", "0.5889404", "0.58393496", "0.58389753", "0.5799347", "0.5777523", "0.57676786", "0.57502705", "0.5730218", "0.5707191", "0.5698619", "0.5682499", "0.5665494", "0.558858...
0.0
-1
Get POI data, and draw the markers
function getPOI() { $.ajax({ type : "POST", async : false, dataType : 'json', url : basePath + "monitor/display!getPOI", success : function(d) { if("empty" != d.result) { for ( var int = 0; int < d.length; int++) { addPoiMarkers(d[int].longitude, d[int].latitude, d[int].icon, d[int].caption); } } }, error : function(d) { alert("Exception occurs!"); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawPoi(zoom)\n{\n\tvar canvas = $(\"#map-canvas\")[0];\n\tvar c = canvas.getContext(\"2d\");\n\tvar pos = $(\"#map-content\").position();\n\n\tc.clearRect(0, 0, canvas.clientWidth, canvas.clientHeight);\n\tc.lineWidth = 1.5;\n\n\tfor(var poi of pointsOfInterest)\n\t{\n\t\tif(!$(\"#display-\" + poi.type)....
[ "0.6208215", "0.6206298", "0.6181899", "0.61798495", "0.61643785", "0.6062256", "0.60360014", "0.58622116", "0.5859758", "0.5807414", "0.5806679", "0.58036345", "0.57966304", "0.5785282", "0.57462186", "0.57185924", "0.57006264", "0.5671354", "0.56471103", "0.5638283", "0.562...
0.659934
0
Add POI markers to map
function addPoiMarkers(x, y, ico, content) { var point=new OpenLayers.LonLat(x,y).transform(fromProjection, OSM_toProjection); var size = new OpenLayers.Size(30, 30); var offset = new OpenLayers.Pixel(-(size.w/2), -size.h); var icon; var markerPOI = null; icon = new OpenLayers.Icon(basePath + 'images/'+ico+'_.gif', size, offset); markerPOI = new OpenLayers.Marker(point, icon); markerPOI.events.register('click', markerPOI, function(evt) { //click marker show pop message if(null != content && "" != content) { var popup = new OpenLayers.Popup.FramedCloud('click', point, null, content, null, true); map.addPopup(popup); } }); map.events.register('zoomend', markerPOI, function(evt) { //zooming map //show markers when map'zoom more than 12 if(map.getZoom() > 10 && !markerPOI.isDrawn()){ markLayer[11].addMarker(markerPOI); //hide markers when map'zoom less than or equal 12 } else if(map.getZoom() <= 10 && markerPOI.isDrawn()) { markLayer[11].removeMarker(markerPOI); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addMapMarkers(poisToAdd) {\n _.each(poisToAdd, function(poi) {\n // We use a base64 encoded id as the marker id, since Angular Leaflet does not accept '-' in marker's id.\n bigMap.config.markers[btoa(poi.properties.id)] = {\n layer: 'markers',\n lat : poi.geometry.coo...
[ "0.69528043", "0.66595936", "0.65220714", "0.6357894", "0.62011564", "0.6189033", "0.6189033", "0.6185431", "0.6183239", "0.61791325", "0.6158879", "0.6133869", "0.6124853", "0.6121335", "0.61107", "0.6103673", "0.60829943", "0.60799736", "0.60651416", "0.60630554", "0.605367...
0.70631695
0
Get data of route
function getRouteDate() { $.ajax({ type : "POST", async : false, dataType : 'json', data : { 'vo.plateNumber' : sel_lisencePlate, 'vo.beginDate' : sel_startDate, 'vo.beginTime' : sel_startTime, 'vo.endDate' : sel_endDate, 'vo.endTime' : sel_endTime }, url : basePath + "monitor/display!getGeo", success : function(d) { if("empty" != d.result){ dataList = d; addRouteAll(); } else { alert('no data!'); } }, error : function(d) { alert("Exception occurs!"); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getRouteInformation() {\n const route = this.props.route;\n const data = {\n startingStop: this.getStartingStop(route),\n endingStop: this.getEndingStop(route),\n departTime: this.calculateDepartArive(route),\n arrivalTime: this.calculateArrivalTime(route),...
[ "0.73542273", "0.72976506", "0.7013012", "0.6695446", "0.65396327", "0.6488592", "0.6401776", "0.6392442", "0.63644016", "0.6359641", "0.6319399", "0.6315399", "0.62780863", "0.6234348", "0.6234348", "0.6234348", "0.6234348", "0.6234348", "0.6219636", "0.61808425", "0.6163994...
0.0
-1
Click the video button
function clickVideo(time) { if(!checkVehIsOnLine(time)) { alert('You can not view the video because the vehicle is offline!'); return; } else { openTimeWin(time); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function videoButtonPress(event)\n{\n changeVideo();\n}", "function videoClick(){\n\tif(video.paused){\n\t\tplayVideo();\n\t}else{\n\t\tpauseVideo();\n\t}\n}", "function handle_button_download_video(){\n console.log(\"download video button clicked\");\n\n}", "clickNewsVideoTab(){\n this.newsVideoTa...
[ "0.7823003", "0.74839926", "0.7355895", "0.72984403", "0.69858694", "0.6936659", "0.6864373", "0.68579584", "0.67405987", "0.6703765", "0.6686816", "0.6628274", "0.66205335", "0.66027683", "0.6587507", "0.6544469", "0.65401214", "0.6518867", "0.6511585", "0.6511585", "0.64749...
0.7012319
4
Open the select time window
function openTimeWin(time) { $("body").append("<div id='divBackGround' class='divBackGround' ></div>"); $("body").append("<div id='openTimeDiv' class='openTimeDiv' ></div>"); $("#openTimeDiv").css("left", ($(window).width()-300)/2).css("top",($(window).height()-110)/2).show("fast"); $("body").append("<div id='closeTimeDiv' class='closeDiv' ><img src='" + basePath + "images/button_xx.gif'onmousemove=\"this.src='" + basePath + "images/button_xx2.gif'\" onmouseout=\"this.src='" + basePath + "images/button_xx.gif'\" style='cursor: pointer;' onclick='closeTimeWin();'/></div>"); $("#closeTimeDiv").css("left", (($(window).width()-300)/2) + 304).css("top",(($(window).height()-110)/2)-10).show("fast"); $("#openTimeDiv").append("<div class='pop_main' style='height: 100%;'>" + "<table height='100%' cellspacing='0' cellpadding='0' style='border-left:1px solid rgb(192, 201, 207);'>" + "<tr>" + "<td class='text_bg'>Event time:</td>" + "<td style='text-align: left;'>" + time + "</td>" + "</tr>" + "<tr>" + "<td class='text_bg'>Starting time:</td>" + "<td style='text-align: left;'>" + "<label class='input_date'><input id='open_startTime' type='text' style='width: 127px;' onfocus=\"WdatePicker({dateFmt:'HH:mm:ss', maxDate:&quot;#F{$dp.$D('open_endTime')}&quot;, readOnly:true});this.blur();\"></input></label>" + "</td>" + "</tr>" + "<tr>" + "<td class='text_bg'>Ending time:</td>" + "<td style='text-align: left;'>" + "<label class='input_date'><input id='open_endTime' type='text' style='width: 127px;' onfocus=\"WdatePicker({dateFmt:'HH:mm:ss', minDate:&quot;#F{$dp.$D('open_startTime')}&quot;, readOnly:true});this.blur();\"></input></label>" + "</td>" + "</tr>" + "<tr>" + "<td style='text-align: center;'><input id='clearTimeWin' type='button' value='Clear' onclick='clearTimeWin();' /></td>" + "<td style='text-align: center;'><input id='subTimeWin' type='button' value='Submit' onclick='submitTimeWin(\"" + time + "\");' /></td>" + "</tr>" + "</table>" + "</div>"); $('#open_startTime').val(getTenMin(time)[0]); $('#open_endTime').val(getTenMin(time)[1]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function OpenTimeOff_Period()\n{\n\tTimeOffWindow = window.open(LeaveBalances,\"TimeOff\",\"toolbar=no,status=no,resizable=yes,height=650,width=800\");\n}", "function OpenTimeOff_Period()\n{\n\tTimeOffWindow = window.open(LeaveBalances,\"TimeOff\",\"toolbar=no,status=no,resizable=yes,height=650,width=800\");\n}"...
[ "0.6596839", "0.6596839", "0.65911424", "0.6530912", "0.6282078", "0.62782615", "0.62229055", "0.6142387", "0.60708994", "0.5994605", "0.5961394", "0.5959235", "0.58906704", "0.58560765", "0.5832958", "0.5824966", "0.58077115", "0.5804275", "0.57583183", "0.5740418", "0.57387...
0.60956967
8
Close the select time window
function closeTimeWin() { $("#divBackGround").remove(); $("#openTimeDiv").remove(); $("#closeTimeDiv").remove(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function releaseTimeWindow() {\n selStart = timefilter.attr(\"x\");\n timefilter.on(\"mouseup\", null);\n timefilter.on(\"mousemove\", null);\n timefilter.on(\"mouseout\", null);\n context.on(\"mousedown\", startTimeSelect);\n context.on(\"mouseup\", stopTimeSelect);\n //console.log(CURRENT);\n}", "functi...
[ "0.67044115", "0.6627594", "0.66074646", "0.64680433", "0.6449232", "0.63759255", "0.6322384", "0.627558", "0.6266693", "0.6227876", "0.61983055", "0.6160587", "0.6158528", "0.6141839", "0.6141839", "0.6141839", "0.6082155", "0.6082155", "0.60701025", "0.60378283", "0.6028991...
0.67288244
0
Create the TypeScript language service
function makeServicesHost(scriptRegex, log, loader, instance) { const { compiler, compilerOptions, files, loaderOptions: { appendTsSuffixTo, appendTsxSuffixTo } } = instance; const newLine = compilerOptions.newLine === constants.CarriageReturnLineFeedCode ? constants.CarriageReturnLineFeed : compilerOptions.newLine === constants.LineFeedCode ? constants.LineFeed : constants.EOL; // make a (sync) resolver that follows webpack's rules const resolveSync = resolver_1.makeResolver(loader._compiler.options); const readFileWithFallback = (path, encoding) => compiler.sys.readFile(path, encoding) || utils_1.readFile(path, encoding); const fileExists = (path) => compiler.sys.fileExists(path) || utils_1.readFile(path) !== undefined; const moduleResolutionHost = { fileExists, readFile: readFileWithFallback, realpath: compiler.sys.realpath }; // loader.context seems to work fine on Linux / Mac regardless causes problems for @types resolution on Windows for TypeScript < 2.3 const getCurrentDirectory = () => loader.context; const servicesHost = { getProjectVersion: () => `${instance.version}`, getScriptFileNames: () => [...files.keys()].filter(filePath => filePath.match(scriptRegex)), getScriptVersion: (fileName) => { fileName = path.normalize(fileName); const file = files.get(fileName); return file === undefined ? '' : file.version.toString(); }, getScriptSnapshot: (fileName) => { // This is called any time TypeScript needs a file's text // We either load from memory or from disk fileName = path.normalize(fileName); let file = files.get(fileName); if (file === undefined) { const text = utils_1.readFile(fileName); if (text === undefined) { return undefined; } file = { version: 0, text }; files.set(fileName, file); } return compiler.ScriptSnapshot.fromString(file.text); }, /** * getDirectories is also required for full import and type reference completions. * Without it defined, certain completions will not be provided */ getDirectories: compiler.sys.getDirectories, /** * For @types expansion, these two functions are needed. */ directoryExists: compiler.sys.directoryExists, useCaseSensitiveFileNames: () => compiler.sys.useCaseSensitiveFileNames, // The following three methods are necessary for @types resolution from TS 2.4.1 onwards see: https://github.com/Microsoft/TypeScript/issues/16772 fileExists: compiler.sys.fileExists, readFile: compiler.sys.readFile, readDirectory: compiler.sys.readDirectory, getCurrentDirectory, getCompilationSettings: () => compilerOptions, getDefaultLibFileName: (options) => compiler.getDefaultLibFilePath(options), getNewLine: () => newLine, trace: log.log, log: log.log, /* Unclear if this is useful resolveTypeReferenceDirectives: (typeDirectiveNames: string[], containingFile: string) => typeDirectiveNames.map(directive => compiler.resolveTypeReferenceDirective(directive, containingFile, compilerOptions, moduleResolutionHost).resolvedTypeReferenceDirective), */ resolveModuleNames: (moduleNames, containingFile) => resolveModuleNames(resolveSync, moduleResolutionHost, appendTsSuffixTo, appendTsxSuffixTo, scriptRegex, instance, moduleNames, containingFile, resolutionStrategy), getCustomTransformers: () => instance.transformers }; return servicesHost; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createLanguageService(host) {\n return new LanguageServiceImpl(host);\n }", "function init() {\n return {\n create: function (info) {\n var oldService = info.languageService;\n var program = oldService.getProgram();\n // Signature ...
[ "0.7046159", "0.6168019", "0.6133034", "0.6048605", "0.5833485", "0.5621169", "0.5483759", "0.5458616", "0.5369328", "0.5363591", "0.53150135", "0.5313891", "0.52863693", "0.5272236", "0.52492213", "0.5226368", "0.52082366", "0.5203122", "0.5167186", "0.5145314", "0.5130886",...
0.52219224
16
Create the TypeScript Watch host
function makeWatchHost(scriptRegex, log, loader, instance, appendTsSuffixTo, appendTsxSuffixTo) { const { compiler, compilerOptions, files, otherFiles } = instance; const newLine = compilerOptions.newLine === constants.CarriageReturnLineFeedCode ? constants.CarriageReturnLineFeed : compilerOptions.newLine === constants.LineFeedCode ? constants.LineFeed : constants.EOL; // make a (sync) resolver that follows webpack's rules const resolveSync = resolver_1.makeResolver(loader._compiler.options); const readFileWithFallback = (path, encoding) => compiler.sys.readFile(path, encoding) || utils_1.readFile(path, encoding); const moduleResolutionHost = { fileExists, readFile: readFileWithFallback, realpath: compiler.sys.realpath }; // loader.context seems to work fine on Linux / Mac regardless causes problems for @types resolution on Windows for TypeScript < 2.3 const getCurrentDirectory = () => loader.context; const watchedFiles = {}; const watchedDirectories = {}; const watchedDirectoriesRecursive = {}; const watchHost = { rootFiles: getRootFileNames(), options: compilerOptions, useCaseSensitiveFileNames: () => compiler.sys.useCaseSensitiveFileNames, getNewLine: () => newLine, getCurrentDirectory, getDefaultLibFileName: options => compiler.getDefaultLibFilePath(options), fileExists, readFile: readFileWithCachingText, directoryExists: dirPath => compiler.sys.directoryExists(path.normalize(dirPath)), getDirectories: dirPath => compiler.sys.getDirectories(path.normalize(dirPath)), readDirectory: (dirPath, extensions, exclude, include, depth) => compiler.sys.readDirectory(path.normalize(dirPath), extensions, exclude, include, depth), realpath: dirPath => compiler.sys.resolvePath(path.normalize(dirPath)), trace: logData => log.log(logData), watchFile, watchDirectory, resolveModuleNames: (moduleNames, containingFile) => resolveModuleNames(resolveSync, moduleResolutionHost, appendTsSuffixTo, appendTsxSuffixTo, scriptRegex, instance, moduleNames, containingFile, resolutionStrategy), invokeFileWatcher, invokeDirectoryWatcher, updateRootFileNames: () => { instance.changedFilesList = false; if (instance.watchOfFilesAndCompilerOptions) { instance.watchOfFilesAndCompilerOptions.updateRootFileNames(getRootFileNames()); } }, createProgram: compiler.createAbstractBuilder }; return watchHost; function getRootFileNames() { return [...files.keys()].filter(filePath => filePath.match(scriptRegex)); } function readFileWithCachingText(fileName, encoding) { fileName = path.normalize(fileName); const file = files.get(fileName) || otherFiles.get(fileName); if (file !== undefined) { return file.text; } const text = readFileWithFallback(fileName, encoding); if (text === undefined) { return undefined; } otherFiles.set(fileName, { version: 0, text }); return text; } function fileExists(fileName) { const filePath = path.normalize(fileName); return files.has(filePath) || compiler.sys.fileExists(filePath); } function invokeWatcherCallbacks(callbacks, fileName, eventKind) { if (callbacks) { // The array copy is made to ensure that even if one of the callback removes the callbacks, // we dont miss any callbacks following it const cbs = callbacks.slice(); for (const cb of cbs) { cb(fileName, eventKind); } } } function invokeFileWatcher(fileName, eventKind) { fileName = path.normalize(fileName); invokeWatcherCallbacks(watchedFiles[fileName], fileName, eventKind); } function invokeDirectoryWatcher(directory, fileAddedOrRemoved) { directory = path.normalize(directory); invokeWatcherCallbacks(watchedDirectories[directory], fileAddedOrRemoved); invokeRecursiveDirectoryWatcher(directory, fileAddedOrRemoved); } function invokeRecursiveDirectoryWatcher(directory, fileAddedOrRemoved) { directory = path.normalize(directory); invokeWatcherCallbacks(watchedDirectoriesRecursive[directory], fileAddedOrRemoved); const basePath = path.dirname(directory); if (directory !== basePath) { invokeRecursiveDirectoryWatcher(basePath, fileAddedOrRemoved); } } function createWatcher(file, callbacks, callback) { file = path.normalize(file); const existing = callbacks[file]; if (existing) { existing.push(callback); } else { callbacks[file] = [callback]; } return { close: () => { const existing = callbacks[file]; if (existing) { utils_1.unorderedRemoveItem(existing, callback); } } }; } function watchFile(fileName, callback, _pollingInterval) { return createWatcher(fileName, watchedFiles, callback); } function watchDirectory(fileName, callback, recursive) { return createWatcher(fileName, recursive ? watchedDirectoriesRecursive : watchedDirectories, callback); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createWebWatchServer() {\n\tconst server = createServer({\n\t\tmode,\n\t\tcustomLogger: createLogger(\"info\", { prefix: `[web]` }),\n\t\tconfigFile: \"src/renderer/vite.config.js\",\n\t});\n\n\treturn server;\n}", "set_watcher()\n {\n this.watcher = new Watcher( {\n port : ...
[ "0.611315", "0.56539637", "0.5362381", "0.53332156", "0.52582526", "0.5238887", "0.5194953", "0.51865613", "0.51791906", "0.5152957", "0.5122921", "0.5064624", "0.5058542", "0.50522006", "0.5043726", "0.5012016", "0.49764222", "0.49298167", "0.4925355", "0.48953176", "0.48916...
0.65393704
0
Takes new prop and pass into state by converting to minutes
componentWillReceiveProps(nextProps, props) { var [hourTime, minuteTime] = nextProps.selectedTime.split(':') this.setState({ selectedTime: (hourTime * 3600) + Number(minuteTime * 60), selectedTimeCP: (hourTime * 3600) + Number(minuteTime * 60) }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleNewMinutesChange (event) {\n const goal = { ...this.state.newGoal, minutes: event.target.value };\n this.setState({ newGoal: goal });\n }", "setMinutes(e) {\n this.setState({ minutes: e.target.value });\n let m = moment(this.props.date._d)\n m.hour(this.state.hours)\n m.m...
[ "0.7293208", "0.6858946", "0.6723497", "0.6697611", "0.66161674", "0.6555452", "0.65361345", "0.6504286", "0.63604414", "0.6316108", "0.6302747", "0.6291003", "0.62495685", "0.62327975", "0.6202027", "0.61288273", "0.61167425", "0.606399", "0.60500056", "0.60387284", "0.60180...
0.6905593
1
Create CSV titles for an object, using recursion if it contains child objects
function recursiveTitle(header, obj) { let s = '' for(const i in obj) { if (typeof obj[i] == 'object') { //console.log('s') s += recursiveTitle(header + '.' + i, obj[i]) + ',' } else { s += header + '.' + i + ',' } } return s.substring(0, s.length-1) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_createTitle(obj) {\n let res = \"\";\n for (let p in obj) {\n res += `${p}=${obj[p]},`;\n }\n return res.substr(0, res.length - 1);\n }", "readGroupedTitleRow(itemObj) {\n let groupName = sanitizeHtmlToText(itemObj.title);\n const exportQuoteWrapper = this...
[ "0.6428182", "0.57921475", "0.5730361", "0.56393474", "0.55483544", "0.5436517", "0.53751284", "0.5368893", "0.53466403", "0.53369915", "0.5289455", "0.5274943", "0.52728474", "0.5250559", "0.5225183", "0.5160835", "0.5151258", "0.51421887", "0.5137935", "0.51200455", "0.5119...
0.7311583
0
Create an object that only contains "value" within layers of simple objects defined by a list of "layers"
function empty(layers, value) { if (layers.length == 0) return value let topLayer = layers.shift() //Remove the top layer from the list let temp = {} //simple object to hold our layer temp[topLayer] = empty(layers, value) return temp }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLayerByUid(layers, value) {\n return layers.array_.filter(layer => layer.ol_uid === value);\n}", "function layerSet(layers){\r\n //TODO Take layer of groups and sort into ind. items so that tooltips and colors can be adjusted\r\n //Each object in layer is always the same i.e....
[ "0.5948935", "0.5094834", "0.50378245", "0.50263834", "0.50187397", "0.50113535", "0.4984556", "0.4940943", "0.48935637", "0.48909795", "0.48185268", "0.4790529", "0.4787063", "0.47669777", "0.47631475", "0.47631475", "0.475835", "0.47578746", "0.47518763", "0.47323695", "0.4...
0.69806576
0
var output = document.getElementById('typesoutput')
function convertType(text, start, end) { var s = '' if (start == end) { s = 'Cannot start and end with the same type! (' + start + ' -> ' + end + ')' } else if (start == 'CSV' && end == 'JSON') { //CSV to JSON //The names of each variable is defined in the first line var lines = text.split('\n') var names = lines[0].split(',') var data = [] for(var line in lines) { if (line == 0) continue var dataline = lines[line].split(',') var entry = {} for(var i in names) { if (names[i].includes('.')) { //Nested objects, use recursion to fix it! entry = recursiveObject(entry, names[i].split('.'), dataline[i]) } else { entry[names[i]] = dataline[i] } } data.push(entry) } s = JSON.stringify(data, null, 2) // lines.forEach((line, index) => { // if (index != 1) { // continue // } // console.log(i+": "+v) // var entry = {} // for(var i in names) { // console.log(i) // } // }) } else if (start == 'JSON' && end == 'CSV') { //JSON to CSV var data = JSON.parse(text) if(Array.isArray(data)) { //Each table is given in each object const first = data[0] //Get the names of each in first for(const i in first) { // s += recursiveTitle(i, first[i]) + ',' if (typeof first[i] == 'object') { //Instead of having nested objects, make each variable from within its own entry (in the form parent.child.nextChild.keepGoing.more.maybeMore.name) s += recursiveTitle(i, first[i]) + ',' } else { s += i + ',' } } s = s.substring(0, s.length-1) + '\n' //Go through each data point now for(const x in data) { // console.log(x) var currentPoint = data[x] for(const i in currentPoint) { if (typeof currentPoint[i] == 'object') { s += recursiveValue(i, currentPoint[i]) + ',' } else { s += currentPoint[i] + ',' } } s = s.substring(0, s.length-1) + '\n' } } else { s = 'JSON was not an array!' } } else { s = 'Unkown types: ' + start + ' -> ' + end + '.' } usedText = s document.getElementById('types-output').innerHTML = s }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function output()\n{\n var type_box = $('#type_box').val();\n var result = array_sentence(type_box);\n $('#conversion').val(result);\n}", "setOutput(output){\r\n this.output = document.getElementById(output);\r\n }", "function getOutput(){\r\n\treturn document.getElementById(\"output_value\").innerText;...
[ "0.70502377", "0.6615157", "0.65949506", "0.6555574", "0.64811885", "0.6465559", "0.6465559", "0.643316", "0.6430809", "0.64196837", "0.6305542", "0.6297574", "0.629505", "0.6290573", "0.6198811", "0.61689514", "0.6154359", "0.6148838", "0.61268264", "0.608247", "0.6079983", ...
0.0
-1
End Set the video width (in pixels) below Update a particular HTML element with a new value;
function updateHTML(elmId, value) { document.getElementById(elmId).innerHTML = value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cms_auto_video_width() {\r\n\t\t$('.entry-video iframe').each(function(){\r\n\t\t\tvar v_width = $(this).width();\r\n\t\t\t\r\n\t\t\tv_width = v_width / (16/9);\r\n\t\t\t$(this).attr('height',v_width + 35);\r\n\t\t})\r\n\t}", "function cms_auto_video_width() {\r\n\t\t$('.post-header-media iframe').each(...
[ "0.68642926", "0.67980736", "0.65588", "0.64718324", "0.64358", "0.6424053", "0.62876135", "0.6278934", "0.6272552", "0.6272552", "0.6265237", "0.6257713", "0.6228079", "0.6223358", "0.6213886", "0.6213708", "0.6208583", "0.62053627", "0.6153428", "0.6137807", "0.6101164", ...
0.0
-1
This function is called when an error is thrown by the player
function onPlayerError(errorCode) { alert("An error occured of type:" + errorCode); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onPlayerError(errorCode) {\n\talert(\"An error occured of type:\" + errorCode);\n}", "function onPlayerError(e){\n console.log('ERROR YouTube API \"onPlayerError\"');\n console.log(e);\n}", "function handle_error(error) {\r\n\r\n //reset the player.\r\n reset_player();\r\n\r\n //Log the...
[ "0.76452965", "0.7434355", "0.7420182", "0.7226333", "0.7178963", "0.7049473", "0.6899344", "0.6863852", "0.68490535", "0.6816568", "0.67878497", "0.6757715", "0.67200774", "0.6703043", "0.6688412", "0.66025394", "0.6591083", "0.65903", "0.6565238", "0.6549746", "0.6543179", ...
0.750594
2
This function is called when the player changes state
function onPlayerStateChange(newState) { updateHTML("playerState", newState); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "playerStateChanged(playerCurrentState) {\n // console.log('player current update state', playerCurrentState)\n }", "function PendingPlayerState() { }", "function onPlayerStateChange(event) {\n if (player.getPlayerState() == 5) {\n changeStatus(\"Pause\");\n }\n i...
[ "0.8407053", "0.77541614", "0.75539345", "0.748043", "0.74539334", "0.7210724", "0.7208987", "0.71699077", "0.71418846", "0.71092856", "0.7046344", "0.7043114", "0.6959883", "0.692209", "0.687744", "0.6871405", "0.68690836", "0.68604714", "0.6836721", "0.6829699", "0.68008226...
0.7479152
4
Display information about the current state of the player
function updatePlayerInfo() { // Also check that at least one function exists since when IE unloads the // page, it will destroy the SWF before clearing the interval. if(ytplayer && ytplayer.getDuration) { updateHTML("videoDuration", ytplayer.getDuration()); updateHTML("videoCurrentTime", ytplayer.getCurrentTime()); updateHTML("bytesTotal", ytplayer.getVideoBytesTotal()); updateHTML("startBytes", ytplayer.getVideoStartBytes()); updateHTML("bytesLoaded", ytplayer.getVideoBytesLoaded()); updateHTML("volume", ytplayer.getVolume()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function status() {\n console.log(`Active : ${game.active}`)\n console.log(`Points : ${game.points}`)\n console.log(`Strikes : ${game.strikes} out of ${game.maxStrikes}`)\n console.log(`Passes : ${game.passes} out of ${game.maxPasses}`)\n console.log(`Words : ${game.words}`)\n cons...
[ "0.73799115", "0.7272877", "0.71801424", "0.715006", "0.7052472", "0.68821794", "0.6733271", "0.67148167", "0.67025876", "0.6695599", "0.666516", "0.6652713", "0.6637486", "0.66158295", "0.6594421", "0.6594421", "0.6576856", "0.6563261", "0.65463287", "0.6541425", "0.6529721"...
0.0
-1
Allow the user to set the volume from 0100
function setVideoVolume() { var volume = parseInt(document.getElementById("volumeSetting").value); if(isNaN(volume) || volume < 0 || volume > 100) { alert("Please enter a valid volume between 0 and 100."); } else if(ytplayer){ ytplayer.setVolume(volume); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set volume(vol)\n {\n this._control.value = Math.max(0,Math.min(100,vol));\n this.volumeUpdated();\n }", "function MV_SetVolume(volume) {\n volume = Math.max(0, volume);\n volume = Math.min(volume, MV_MaxTotalVolume);\n\n MV_TotalVolume = volume;\n}", "function set_volume(){\n\t\taudio.volume ...
[ "0.8045161", "0.7968654", "0.77924365", "0.7774771", "0.7688468", "0.76730925", "0.758396", "0.7576103", "0.75664204", "0.75433385", "0.75232774", "0.75227857", "0.7501685", "0.74503475", "0.74474466", "0.73935944", "0.7346353", "0.7297528", "0.72841173", "0.72066015", "0.716...
0.711964
25
This function is automatically called by the player once it loads
function onYouTubePlayerReady(playerId) { ytplayer = document.getElementById("ytPlayer"); // Instantly starts loading the video window.setTimeout(function() { ytplayer.playVideo(); ytplayer.pauseVideo(); }, 0); // This causes the updatePlayerInfo function to be called every 250ms to // get fresh data from the player setInterval(updateTime, 1000); setInterval(updateProgressBar, 1000); setInterval(updatePlayerInfo, 250); updatePlayerInfo(); ytplayer.addEventListener("onStateChange", "onPlayerStateChange"); ytplayer.addEventListener("onError", "onPlayerError"); //Load an initial video into the player ytplayer.cueVideoById("gAYL5H46QnQ"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onPlayerLoaded() {\n\t\tvideo.fp_play(0);\n\t\t//installControlbar();\n\t}", "function onPlayerReady() {\n // Yes it is intentionally left empty. DO NOT remove this function!\n}", "function onPlayerReady(e) {\n}", "function onPlayerReady(event) {\n \n}", "function onPlayerReady(){\n\t\tg_isPla...
[ "0.77203494", "0.75722057", "0.74850583", "0.73753405", "0.7280546", "0.72160083", "0.7079702", "0.7055114", "0.70215905", "0.6946471", "0.69405437", "0.6933006", "0.69133145", "0.6912996", "0.6881709", "0.6880795", "0.68424827", "0.68184793", "0.6793696", "0.6728636", "0.672...
0.0
-1
The "main method" of this sample. Called when someone clicks "Run".
function loadPlayer() { // Lets Flash from another domain call JavaScript var params = { allowScriptAccess: "always" }; // The element id of the Flash embed var atts = { id: "ytPlayer" }; // All of the magic handled by SWFObject (http://code.google.com/p/swfobject/) swfobject.embedSWF("http://www.youtube.com/apiplayer?" + "version=3&enablejsapi=1&playerapiid=player1", "videoDiv", String(videoWidth), String(videoHeight), "9", null, null, params, atts); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Main()\n {\n \n }", "Run() {\n\n }", "function Main() {\n console.log(`%c Main Function`, \"color: grey; font-size: 14px; font-weight: bold;\");\n buildInterface();\n interfaceLogic();\n }", "function main(){\n userInterface();\n bindings();\n console....
[ "0.7424687", "0.7353416", "0.7243516", "0.72215265", "0.7064025", "0.7036816", "0.7003795", "0.6973021", "0.6917031", "0.6831571", "0.67903626", "0.676579", "0.67387754", "0.6731676", "0.66963965", "0.6693052", "0.6689796", "0.6683734", "0.6648149", "0.6636635", "0.6632362", ...
0.0
-1
End Enlarging Tick Bar
function secondsToXLoc(seconds){ var ratio = seconds/ytplayer.getDuration(); var xLoc = $(".progressbar_container").width()*ratio; return xLoc; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "update(){\n\t\tif(this.tick){\n\t\t\tthis.depleteBar(.00005);\n\t\t}\n\t}", "function tick() {\n if (width >= 100 ) {\n clearInterval(id);\n i = 0;\n checkEndGame();\n } else {\n adjustWidth();\n }\n\n // adjust width of progress bar and % dis...
[ "0.6496893", "0.6339741", "0.61591095", "0.61325556", "0.6119264", "0.60425824", "0.6024054", "0.59788275", "0.59765095", "0.5944267", "0.5905626", "0.5901808", "0.5896896", "0.5862072", "0.58153856", "0.578864", "0.5763364", "0.57460487", "0.5735808", "0.5717317", "0.5684548...
0.0
-1
Ejecuta la consulta que trae todos los productos
async function excuteSelectTotal() { try { const rows = await query('SELECT * FROM products'); return rows; } catch (error) { console.log(error) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dibujarProductos() {\r\n stockProductos.forEach(producto => {\r\n insertarProducto(producto)\r\n })\r\n}", "async function getProductos() {\r\n //se realiza una consulta de todos los productos de la tabla\r\n try {\r\n let rows = await query(\"SELECT * from productos\");\r\n ...
[ "0.6846539", "0.6679652", "0.6567823", "0.65295297", "0.651443", "0.64895964", "0.64800066", "0.64545935", "0.64539814", "0.6447147", "0.6437347", "0.642262", "0.641954", "0.64108485", "0.63796115", "0.6350127", "0.6350082", "0.6342686", "0.6339652", "0.6321948", "0.6321032",...
0.0
-1
Normalize itertion counter Arrow Up Check if the focussedIndex reached a negative number If so, assign it to (elements.length 1) Else, decrement the counter
function normalizeNegativeCounter(elements, focussedIndex) { if (focussedIndex <= 0) { return elements.length - 1; } else { return focussedIndex - 1; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "up() {\r\n this.upAndDown = false;\r\n this.firstRowHighlight = false;\r\n if (this.selectedIndex === null) {\r\n this.selectedIndex = this.results.length - 1;\r\n return;\r\n }\r\n if (this.includeInputInList === false) {\r\n this.selectedIndex =\r\n this.sel...
[ "0.6385986", "0.6169602", "0.6133054", "0.606827", "0.606827", "0.60637057", "0.59533656", "0.5949069", "0.5928403", "0.58831584", "0.58646786", "0.5853408", "0.5843514", "0.5820273", "0.5820273", "0.5820273", "0.57986075", "0.57815754", "0.57494485", "0.57422185", "0.5690831...
0.7362624
1
Toggle aria atrributes based on the dropdown state
function toggleAriaAtrributes(dropdown, open) { var trigger = dropdown.querySelectorAll('[x-spread="trigger"]'); if (trigger.length) { trigger = trigger[0]; if (open) { trigger.setAttribute("aria-expanded", true); var dropdownList = dropdown.querySelectorAll('[x-spread="dropdown"]'); if (dropdownList.length) { dropdownList = dropdownList[0]; dropdownList.setAttribute("aria-hidden", false); } } else { trigger.setAttribute("aria-expanded", false); var dropdownList = dropdown.querySelectorAll('[x-spread="dropdown"]'); if (dropdownList.length) { dropdownList = dropdownList[0]; dropdownList.setAttribute("aria-hidden", true); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dropdown() {\n glumacNameContainer.classList.toggle(\"show\");\n\n if (arrow.classList.contains('fa-arrow-down')) {\n arrow.classList.remove('fa-arrow-down');\n arrow.classList.add('fa-arrow-up');\n } else {\n arrow.classList.add('fa-arrow-down');\n }\n}", "function handleAriaExpanded(evt) ...
[ "0.6441378", "0.6344109", "0.63240695", "0.6232912", "0.6232912", "0.6157176", "0.6135148", "0.61046386", "0.6099504", "0.60408044", "0.6016018", "0.6016011", "0.6016011", "0.5948682", "0.5896538", "0.5896538", "0.5872202", "0.5841703", "0.5835541", "0.58325267", "0.5830824",...
0.75209516
1
Set attributes when the component is initialized
function init(dropdown) { var trigger = dropdown.querySelectorAll('[x-spread="trigger"]'); if (trigger.length) { trigger = trigger[0]; trigger.setAttribute("aria-haspopup", true); trigger.setAttribute("aria-expanded", false); var dropdown = dropdown.querySelectorAll('[x-spread="dropdown"]'); if (dropdown.length) { dropdown = dropdown[0]; trigger.setAttribute("aria-controls", dropdown.id); dropdown.setAttribute("role", "menu"); dropdown.setAttribute("aria-labelledby", trigger.id); dropdown.setAttribute("aria-hidden", true); var dropdownItems = dropdown.querySelectorAll(".dropdown-item"); if (dropdownItems.length) { [...dropdownItems].forEach(function (dropdownItem) { dropdownItem.setAttribute("role", "menuitem"); dropdownItem.setAttribute("tabindex", -1); }); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "initializeState() {\n const attrs = this.state.attributes;\n attrs.x = 0;\n attrs.y = 0;\n }", "didReceiveAttrs() {\n this._super(...arguments);\n this._setupValue();\n }", "initializeState() {\n super.initializeState();\n const defaultWidth = 30;\n const def...
[ "0.6619572", "0.66147965", "0.65683365", "0.6406264", "0.6392092", "0.6351737", "0.62716734", "0.6247277", "0.62186044", "0.6181781", "0.61798805", "0.61548305", "0.61548305", "0.61548305", "0.61477107", "0.60004246", "0.59990084", "0.5984902", "0.5982227", "0.5973572", "0.59...
0.0
-1
Make a request for the user's battles
function getBattles() { $.ajax({ type : 'GET', url : '/api/my_battles', success : displayBattles, error : myBattlesReqFail, }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function userGrab(weapon, user, weaponName, cb) {\n //console.log('\\n'+weapon+', '+user+'\\n');\n request(`https://stats.quake.com/api/v2/Player/Stats?name=${user}`, function(error, response, body) {\n if (!error && response.statusCode == 200) {\n var json = JSON.parse(body);\n ...
[ "0.6350811", "0.61352754", "0.60989827", "0.6043721", "0.5954292", "0.5748397", "0.57174623", "0.57174623", "0.5661356", "0.56571466", "0.564985", "0.564985", "0.56318617", "0.5574105", "0.55069035", "0.54951966", "0.5486601", "0.5481048", "0.5467274", "0.545145", "0.54496187...
0.67662716
0
Add the basic UI items to the page
function initPage() { var mainContent = document.getElementById('mainContent'); mainContent.innerHTML = "<h1>My Battles</h1>"; var createBattleButton = document.createElement('p'); createBattleButton.innerHTML = 'Begin a New Battle'; createBattleButton.setAttribute('id', 'createBattle'); var battleForm = document.createElement('section'); battleForm.setAttribute('id', 'createBattleForm'); mainContent.appendChild(createBattleButton); mainContent.appendChild(battleForm); document.getElementById('createBattle').style.cursor="pointer"; document.getElementById('createBattle').addEventListener("click", showCreateBattleForm, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setUpPage(){\r\n displayHeader();\r\n displayFooter();\r\n displaySideBar();\r\n\r\n createEventListeners();\r\n}", "function setUpPage(){\r\n displayHeader();\r\n displayFooter();\r\n displaySideBar();\r\n createEventListeners();\r\n}", "function main() {\n MenuItem.init();...
[ "0.6518313", "0.65135753", "0.6491356", "0.6457898", "0.63301885", "0.62799686", "0.62713253", "0.62214947", "0.61967283", "0.6168617", "0.616338", "0.6161387", "0.61273205", "0.61148095", "0.6109864", "0.6096831", "0.609239", "0.60531974", "0.60477746", "0.6046666", "0.60332...
0.0
-1
Add each battle to the My Battles table
function displayBattles(response) { if (response == 'not logged in') { document.getElementById('mainContent').innerHTML = "You are not logged in!"; } mybattles = response; response = eval('(' + response + ')'); var mainContent = document.getElementById('mainContent'); var newTable = document.createElement("table"); newTable.setAttribute('id', 'battleTable'); newTable.innerHTML = "<thead><tr><th>Opponent</th><th>Start Date</th><th>Status</th></tr></thead>"; var i; for (i=0; i<response.length; i++) { var newRow = document.createElement("tr"); newRow.innerHTML = "<td>" + response[i].playerid + "</td><td>" + convertDateTime(response[i]) + "</td><td>" + response[i].status + "</td>"; if (newBattle && (i==0)) { newRow.setAttribute('class', 'newBattle'); } newTable.appendChild(newRow); newRow.addEventListener("click", onClickBattleRow, false); newRow.setAttribute("battleid", response[i].battleid); newRow.style.cursor="pointer"; } mainContent.appendChild(newTable); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function doBattlesList() {\r\n\tvar allElements;\r\n\tallElements = document.getElementById('contentRow').children[1];\r\n\t\r\n\tvar tmp;\r\n\ttmp = allElements.children[0];\r\n\ttmp.innerHTML=tmp.innerHTML.replace(/(Battles)/,\"Sava\\u015flar\");\r\n\t\r\n\ttmp = allElements.children[1];\r\n\ttmp.innerHTML=tmp.i...
[ "0.6337339", "0.6292367", "0.583185", "0.5796017", "0.57498634", "0.56784785", "0.5678324", "0.55477905", "0.5494823", "0.5435239", "0.5390642", "0.537942", "0.5378558", "0.53710276", "0.5369362", "0.5299077", "0.5291195", "0.52862805", "0.527633", "0.52660334", "0.52485436",...
0.62792593
2
Cause the CreateBattleForm to appear when the user clicks "Begin a new Battle"
function showCreateBattleForm(event) { var battleForm = document.getElementById('createBattleForm'); battleForm.innerHTML = "<p>Battle with: <input type='text' id='oppName' /><input type='button' value='Start battle' id='startBattle' /></p>"; battleForm.innerHTML += "<p><input type='button' value='Find an online player' name='findOnline' id='findOnline'/></p>"; document.getElementById('createBattle').setAttribute('hidden', 'true'); document.getElementById('startBattle').addEventListener('click', createBattle, false); document.getElementById('findOnline').addEventListener('click', findPlayer, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static showCreateGameForm() {\n const newGameFormDiv = document.getElementById('new-game-form-div');\n newGameFormDiv.style.display = \"\";\n }", "function initPage() {\n\tvar mainContent = document.getElementById('mainContent');\n\tmainContent.innerHTML = \"<h1>My Battles</h1>\";\n\tvar createB...
[ "0.6364899", "0.6277623", "0.6252796", "0.62082624", "0.6098251", "0.6071484", "0.59839493", "0.5928263", "0.5926532", "0.5871503", "0.58516216", "0.5800969", "0.5794415", "0.57679", "0.57360524", "0.57223433", "0.57184047", "0.56964046", "0.5684791", "0.56723124", "0.5659157...
0.72978806
0
Request a match be found for the player
function findPlayer() { $.ajax({ type : 'POST', url : '/api/find_battle', }); initPage(); displayBattles(mybattles); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function searchForPlayers() {\n searchingForGame = true;\n views.setSeachingPlayers();\n socket.emit('lookingForGame', authId);\n console.log(\"waiting for game \" + authId)\n socket.on('startMatch', (otherId) => {\n startMultiPlayer(otherId);\n });\n}", "async match(parent, args) {\n ...
[ "0.6858958", "0.6748196", "0.6447351", "0.64189994", "0.6322196", "0.6321285", "0.62864006", "0.61898816", "0.6175492", "0.61492896", "0.61133623", "0.6099932", "0.60755616", "0.6072684", "0.603443", "0.60244787", "0.602172", "0.601605", "0.6002979", "0.5982747", "0.59726125"...
0.6084191
12
Poll for any new battles the player is invited to
function waitForOpponent() { $.ajax({ type : 'GET', url : '/api/update_matches', success: checkForBattles }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkForBattles(response) {\n\tresponse = eval('(' + response + ')');\n\tvar battleTable = document.getElementById('battleTable');\n\tif (response.length > 0) {\n\t\tfor (var i = 0; i < response.length; i++) {\n\t\t\tif (response[i].invite == 't') {\n\t\t\t\twindow.newAlert('You have been invited to a bat...
[ "0.62723327", "0.6110835", "0.59837806", "0.58235866", "0.5819292", "0.57812864", "0.57321167", "0.57268876", "0.5666997", "0.564082", "0.5630841", "0.56000274", "0.5598127", "0.55744314", "0.5544616", "0.55313843", "0.55313355", "0.55278075", "0.55199224", "0.5484856", "0.54...
0.6347161
0
React to responses from the server that may or may not indicate a new battle has been created
function checkForBattles(response) { response = eval('(' + response + ')'); var battleTable = document.getElementById('battleTable'); if (response.length > 0) { for (var i = 0; i < response.length; i++) { if (response[i].invite == 't') { window.newAlert('You have been invited to a battle!'); } else { window.newAlert('We found you a match!'); } newBattle = true; } initPage(); getBattles(); } setTimeout(waitForOpponent, 5000); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createBattle(event) {\n\tvar opponentName = document.getElementById('oppName').value;\n\t$.ajax({\n\t\t\ttype : 'POST',\n\t\t\turl : '/api/create_battle',\n\t\t\tdata : opponentName,\n\t\t\tsuccess : showBattle,\n\t\t\terror : myBattlesReqFail,\n\t});\n}", "_escape(){\n // checks if there is no e...
[ "0.58684194", "0.5721234", "0.5602408", "0.55651814", "0.55529433", "0.5532843", "0.5529873", "0.55221295", "0.5499384", "0.5455424", "0.5433961", "0.54138315", "0.5396661", "0.5380868", "0.5373518", "0.534225", "0.53362304", "0.53238326", "0.5305718", "0.5295885", "0.5287957...
0.0
-1
Creates a new battle with the player id input by the user
function createBattle(event) { var opponentName = document.getElementById('oppName').value; $.ajax({ type : 'POST', url : '/api/create_battle', data : opponentName, success : showBattle, error : myBattlesReqFail, }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createPlayer(playerData){\n Player.create(playerData, function(err, newlyCreated){\n if(err){\n console.log(err);\n } else {\n console.log(\"Player \" +playerData.bnetID+ \" was added to the DB\");\n }\n });\n}", "function addNewPlayer(id, name) {\n va...
[ "0.6197144", "0.6144651", "0.6125729", "0.5962516", "0.5959314", "0.5922987", "0.59007454", "0.5883927", "0.58124053", "0.580855", "0.5767464", "0.57479644", "0.57276595", "0.5726807", "0.5722246", "0.5707294", "0.5701605", "0.56740093", "0.5670324", "0.5663672", "0.5652644",...
0.6325234
0
Moves to the battle page when the user clicks on a battle
function onClickBattleRow(event) { sessionStorage['battleid'] = event.currentTarget.getAttribute('battleid'); sessionStorage['opponentName'] = event.currentTarget.children[0].innerHTML; window.location.href = '/battle.html'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function goToGame() {\n $state.transitionTo('game');\n }", "function goToGame() {\n window.location = 'game.html';\n}", "function startBattle() {\n sortByInitiative();\n $(\"#unsortedTable\").slideUp(500);\n $(\".newChar\").slideUp(500);\n // todo: Implement stuff here\n // St...
[ "0.6511244", "0.6487151", "0.63011163", "0.62836456", "0.6238747", "0.61862713", "0.615496", "0.6130768", "0.61274385", "0.6111317", "0.6064976", "0.6047179", "0.6034992", "0.6022648", "0.6013229", "0.5959621", "0.59593546", "0.5949164", "0.5942826", "0.5936587", "0.5931666",...
0.6748982
0
Create the map path. Projection is null (other than for scaling) b/c we projected this already in Mapshaper Scaling help via:
function scale(scaleFactor) { return d3.geo.transform({ point: function(x, y) { this.stream.point(x * scaleFactor, y * scaleFactor); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "mapToPath() {\n Path.mapMin1 = this.params.mapMin1;\n Path.mapMax1 = this.params.mapMax1;\n Path.mapMin2 = this.params.mapMin2;\n Path.mapMax2 = this.params.mapMax2;\n }", "function WoWMapProjection(){}", "function PathMap() {\n /**\n * Contains a map of path elements\n *\n * <h1>Pa...
[ "0.6628658", "0.65537596", "0.6397451", "0.63365275", "0.63365275", "0.6292275", "0.6292275", "0.6198371", "0.6168987", "0.5926465", "0.5926465", "0.58534724", "0.57552904", "0.57552904", "0.57552904", "0.57552904", "0.57552904", "0.57552904", "0.57552904", "0.57552904", "0.5...
0.0
-1
2. Scrieti o functie care verifica daca un string este gol sau nu.
function is_Blank(input){ if (input.length === 0) return true; else return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function InString() {\r\n}", "function str_val(str) {\n\n \n}", "function exOh(str)\n{\n // Function code goes here\n // Don't forget to return something!\n}", "function checkSpam() {\n return function (str) {\n // Check if str parameter is string type.\n if (typeof str === ...
[ "0.71948135", "0.65362847", "0.6489955", "0.64615536", "0.63474107", "0.6317933", "0.6235865", "0.62159944", "0.6197106", "0.61948144", "0.6180318", "0.6125292", "0.60994405", "0.60769737", "0.605785", "0.602598", "0.60190445", "0.60183233", "0.6004922", "0.59994745", "0.5997...
0.0
-1
3. Scrieti o functie care accepta ca input un string si il transforma intrun array de cuvinte:
function string_to_array (str) { var arr = []; var res = str.split(' '); arr.push(res); return arr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function test (input) {\n for (var i = 0; i < input.length; i++) {\n\n if (Array.isArray(input[i])) {\n\n stringifier (input[i]);\n\n }\n \n else {\n \n converter (input[i]);\n \n ...
[ "0.6733728", "0.6526981", "0.62816983", "0.6280636", "0.6279156", "0.6203638", "0.6082808", "0.6069228", "0.5957478", "0.59354234", "0.5850582", "0.5848989", "0.58099335", "0.57630634", "0.57425606", "0.571746", "0.57158405", "0.57094914", "0.5689952", "0.56816185", "0.567962...
0.0
-1
4. Scrieti o functie care transforma un string in forma abreviata:
function abbrev_name(str) { if( typeof str == "string" && str.length >= 0) return str.slice(0,7); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function converting(string){\n f = eval(string);\n return f;\n}", "function convert(str){\n return str;\n}", "function Transform(str) {\r\n\t\tif (typeof str === 'string') {\r\n\t\t\tthis.parse(str);\r\n\t\t}\r\n\t}", "function translate(str){\n\treturn str;\n}", "function processName(string){\n ...
[ "0.63537574", "0.6173439", "0.61221385", "0.6108401", "0.6089834", "0.5970551", "0.5952564", "0.5942613", "0.59376514", "0.5897204", "0.5896141", "0.58933055", "0.58756685", "0.5814732", "0.5803391", "0.57949466", "0.5787721", "0.5779514", "0.5766144", "0.57504696", "0.574804...
0.0
-1
5. Scrieti o functie care face prima litera a unui string sa fie de tip Capital:
function capitalize(string){ return string[0].toUpperCase() + string.slice(1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function minusculamayuscula(texto){\n return texto.toUpperCase()\n}", "function cambiaSecreta(){\n secreta=normalize(secreta);\n secreta=secreta.toUpperCase();\n secreta=secreta.replace(/ /g, \"\");\n}", "function MaysPrimera(string) {\n return string.charAt(0).toUpperCase() + string.slice(1);\n ...
[ "0.7012587", "0.68254364", "0.6801091", "0.67995703", "0.6732384", "0.67138916", "0.67057437", "0.66644424", "0.66429365", "0.65766734", "0.65647", "0.65072536", "0.65030986", "0.6484304", "0.6484189", "0.6478327", "0.6475285", "0.6451566", "0.6420013", "0.6398781", "0.63949"...
0.0
-1
6. Scrieti o functie care elimina un numar specificat de caractere pronind de la inceputul stringului
function truncate_string(string){ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function eliminarTextosNumeros(item){\r\n\t\titem = String(item);\r\n\t\titem = item.replace(\"tachados-\", \"\");\r\n\t\titem = item.replace(\"tornillo-\", \"\");\r\n\t\treturn item; \r\n\t}", "function comprobacion(e) {\n\t var numeros=\"0123456789\";\n\nfunction tiene_numeros(texto){\n for(i=0; i<texto.leng...
[ "0.6745151", "0.65122527", "0.6329758", "0.6319708", "0.6314823", "0.6255204", "0.62150854", "0.6192961", "0.6161442", "0.61408603", "0.61104894", "0.60815626", "0.60719085", "0.6058999", "0.60445607", "0.60082847", "0.5997746", "0.59835505", "0.5983135", "0.5975678", "0.5957...
0.0
-1
7. Scrieti o functie care specifica daca caracterul de la o anumita pozitie specificata dintrun string este litera mare sau nu:
function isUpperCaseAt(str, n){ if(str.charAt(n) === str.charAt(n).toUpperCase()) return true; else return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function subFunc(obj, strng, r) {\n // loop through the string and parse each character\n for (i in strng) {\n if ('f+-'.includes(strng[i])) {\n vectorAdd(obj, strng[i], r);\n }\n else {\n console.log(`No function for character ${strng[i]}`);\n }\n }\n}", "function specificCharacter2(val...
[ "0.6532761", "0.6248133", "0.6218946", "0.62099046", "0.6144769", "0.6009953", "0.5947282", "0.588828", "0.58836544", "0.58603173", "0.5857714", "0.5836192", "0.57975215", "0.5789348", "0.57888997", "0.57888997", "0.5772787", "0.5769207", "0.57518387", "0.5747549", "0.5747549...
0.0
-1
8. Scrieti o functie care insereaza un string la o anumita pozitie intrun alt string:
function insert(str, text, pos){ if ( str ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function insert(main_string, ins_string, pos) {\n if(typeof(pos) == \"undefined\") {\n pos = 0;\n }\n if(typeof(ins_string) == \"undefined\") {\n ins_string = '';\n }\n return main_string.slice(0, pos) + ins_string + main_string.slice(pos);\n}", "function INSERT_STRING() {\n\t\tins_h...
[ "0.6676433", "0.6615067", "0.6203907", "0.618995", "0.6162845", "0.6049191", "0.5934547", "0.5888338", "0.5829761", "0.5776657", "0.57524264", "0.575161", "0.5745309", "0.56897604", "0.56600595", "0.5650756", "0.56336164", "0.55977404", "0.55968314", "0.55706096", "0.55562145...
0.58520955
8
9. Scrieti o functie care elimna prima aparitie a unui string dintrun alt string:
function remove_first_occurrence(string1, string2){ return string1.replace(string2, ''); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function f(str) {\n\n}", "function str_val(str) {\n\n \n}", "function subFunc(obj, strng, r) {\n // loop through the string and parse each character\n for (i in strng) {\n if ('f+-'.includes(strng[i])) {\n vectorAdd(obj, strng[i], r);\n }\n else {\n console.log(`No function for characte...
[ "0.6623753", "0.6429629", "0.63668364", "0.63436455", "0.6338984", "0.63339746", "0.63339746", "0.63170004", "0.6252783", "0.6181095", "0.61799544", "0.6168282", "0.61431485", "0.6073128", "0.6066719", "0.6054902", "0.6015297", "0.6000639", "0.59976256", "0.59677", "0.5964192...
0.0
-1
10. Scrieti o functie care compara doua stringuri caseinsensitive:
function compare_strings (string1, string2) { var res = string1.toUpperCase() === string2.toUpperCase(); return res; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function caseInsensitiveCompare(str1, str2) {\n // code here\n}", "function caseInsensitiveStringCompare(str1, str2) {\r\n // your code here\r\n if (str1.toLowerCase() == str2.toLowerCase()) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "static caselessStringMatch(a, b...
[ "0.7701758", "0.7231157", "0.7107395", "0.7084906", "0.70561415", "0.70290095", "0.6935823", "0.6921115", "0.68972826", "0.6860226", "0.6793748", "0.6733824", "0.6730638", "0.6694456", "0.66875094", "0.66764784", "0.66675717", "0.665126", "0.658842", "0.65833235", "0.65749514...
0.6420496
26
11. Scrieti o functie care face ca primul caracter a unui string sa fie de tip uncapital:
function Uncapitalize(string){ return string[0].toLowerCase() + string.slice(1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function minusculamayuscula(texto){\n return texto.toUpperCase()\n}", "function cambiaSecreta(){\n secreta=normalize(secreta);\n secreta=secreta.toUpperCase();\n secreta=secreta.replace(/ /g, \"\");\n}", "function MaysPrimera(string) {\n return string.charAt(0).toUpperCase() + string.slice(1);\n ...
[ "0.6910961", "0.69041675", "0.68597454", "0.67875016", "0.66870034", "0.6676445", "0.66480535", "0.6607438", "0.6513169", "0.64577055", "0.644198", "0.6434368", "0.64069754", "0.64009917", "0.6387057", "0.6385168", "0.6366953", "0.63443446", "0.6340676", "0.631093", "0.629416...
0.0
-1
CREATE FUNCTIONS TO TAKE IN DATA FROM WEATHERMAP.JS Function will take Location Name data from geocode and reverseGeocode
function addLocationNameDiv(dataFromMapbox) { let locationNameContainer = $('#location-container'); locationNameContainer.html(''); locationNameContainer .addClass('p-2') .append( `<div class="text-center col-12">${dataFromMapbox.location}</div>` ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function geocode(data) {\n const templateStr = `https://nominatim.openstreetmap.org/search?q=${query.location}&format=json`;\n\n return axios.get()\n}", "function createToCode(geodata) {\n const to3 = [];\n\n\n geodata.features.forEach(\n (feature) => {\n to3.push([feature.properties.AD...
[ "0.6379997", "0.63048786", "0.6300897", "0.6291744", "0.6269128", "0.6215752", "0.61779034", "0.61427104", "0.6133312", "0.61247617", "0.6124275", "0.61151576", "0.6111869", "0.6107951", "0.6081472", "0.60779667", "0.6053202", "0.6046365", "0.6030694", "0.60264575", "0.602294...
0.0
-1
NewBoxForm: Form component for adding a new Box to BoxList.
function NewBoxForm({ addBox }) { const INITIAL_STATE = { width: "", height: "", backgroundColor: "" } const [ formData, setFormData ] = useState(INITIAL_STATE); /** handleSubmit: sends form data to prop function addBox to update state */ function handleSubmit(evt) { evt.preventDefault(); addBox(formData); setFormData(INITIAL_STATE); } /** handleChange: updates form data state for each input change */ function handleChange(evt) { const { name, value } = evt.target; setFormData(data => ({ ...data, [name]: value })); } return ( <form onSubmit={handleSubmit}> <label htmlFor="width">Width: </label> <input id="width" name="width" value={ formData.width } onChange={handleChange} /> <label htmlFor="height">Height: </label> <input id="height" name="height" value={ formData.height } onChange={handleChange} /> <label htmlFor="backgroundColor">Background Color: </label> <input id="backgroundColor" name="backgroundColor" value={ formData.backgroundColor } onChange={handleChange} /> <button>Add Box</button> </form> ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addNewForm() {\n var prototype = $collectionHolder.data('prototype')\n var index = $collectionHolder.data('index')\n var newForm = prototype\n newForm = newForm.replace(/__name__/g, index)\n $collectionHolder.data('index', index+1)\n // création panel\n var $panel = $(\n '<div class=\"panel pane...
[ "0.6481493", "0.6449419", "0.62189573", "0.6214706", "0.61440986", "0.60787576", "0.6043959", "0.6037509", "0.5973538", "0.59109217", "0.5892633", "0.58872247", "0.5885682", "0.58738965", "0.5872927", "0.5862231", "0.5853045", "0.5779034", "0.5777778", "0.5764361", "0.5733170...
0.6671051
0
handleSubmit: sends form data to prop function addBox to update state
function handleSubmit(evt) { evt.preventDefault(); addBox(formData); setFormData(INITIAL_STATE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function NewBoxForm({ addBox }) {\n const INITIAL_STATE = {\n width: \"\",\n height: \"\",\n backgroundColor: \"\"\n }\n\n const [ formData, setFormData ] = useState(INITIAL_STATE);\n \n /** handleSubmit: sends form data to prop function addBox to update state */\n function handleSubmit(evt) {\n ...
[ "0.7305805", "0.7015835", "0.70149696", "0.6910103", "0.6884676", "0.6865001", "0.6851146", "0.68129325", "0.6792269", "0.67521465", "0.6745897", "0.672538", "0.67162794", "0.67054176", "0.6692881", "0.6679992", "0.66597694", "0.66549426", "0.66532093", "0.6649373", "0.664346...
0.77485704
0
handleChange: updates form data state for each input change
function handleChange(evt) { const { name, value } = evt.target; setFormData(data => ({ ...data, [name]: value })); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleOnChange(event) {\n //event.target.name hold the name of the input that changed\n //event.target.value hold the new value of the input field that changed\n\n //we update the user state with the new value\n setState({\n ...state,\n [event.target.name]: event.target.value,\n }...
[ "0.77606744", "0.76798934", "0.76686674", "0.76624537", "0.7516744", "0.74928075", "0.74474925", "0.74367625", "0.7435057", "0.74274254", "0.74268955", "0.7381979", "0.7363832", "0.7349805", "0.7344949", "0.7322572", "0.73208356", "0.7304665", "0.7289032", "0.7287468", "0.727...
0.7146068
50
gets the service object from proto descriptor
getProtoServices() { const namespaces = this.descriptor.namespaces; const definition = Object.values(namespaces)[0]; return Object.values(definition.services); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get serviceOrCreateInstance()\r\n {\r\n if (!this.obj)\r\n {\r\n try\r\n {\r\n // These were needed because some Component access crash FF window.dump(\"get service \"+this.nsIJSCID.name+\"...
[ "0.63859206", "0.631857", "0.6167281", "0.6167281", "0.6050913", "0.59982836", "0.59237885", "0.5876515", "0.5857891", "0.5795734", "0.5792207", "0.5726299", "0.5726299", "0.57191783", "0.5699482", "0.5685072", "0.5646444", "0.5602959", "0.5601996", "0.5590584", "0.5548895", ...
0.63090074
2
Write a function which gets a day and returns: If the day is Sunday/Monday return 'Have a good week' If the day is Tuesday/Wednesday return 'Ohhh...' If the day is Thursday return 'Yalla habayta' If the day is Friday/Saturday return 'Yammi Jachnun' Print the result
function whatDay(day) { var result = ""; day = day.toLowerCase() if (day === 'sunday' || day === 'monday') { result = 'Have a good week'; } else if (day === 'tuesday' || day === 'wednesday') { result = 'Ohhh ... '; } else if (day === 'thursday') { result = 'Yalla habaita'; } else if (day === 'friday' || day === 'saturday') { result = 'Yammi Jachnun' } else { result = 'not a day'; } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function whatDayToday(day) {\n var result;\n day = day.toLowerCase();\n switch (day) {\n case \"sunday\":\n case \"monday\":\n result = \"Have a good week\"\n break\n case \"tuesday\":\n case \"wednesday\":\n result = \"Ohhh....\"\n break\n case \"thrus...
[ "0.81754977", "0.8115367", "0.7769851", "0.7606776", "0.7477312", "0.7456574", "0.74541956", "0.7359399", "0.7316418", "0.72834754", "0.725454", "0.7213271", "0.720595", "0.7065167", "0.7047023", "0.704682", "0.7044477", "0.70431197", "0.70387775", "0.7027099", "0.7026773", ...
0.86565953
0
Ex (functions 3): Convert the previous function by using switch statement
function whatDayToday(day) { var result; day = day.toLowerCase(); switch (day) { case "sunday": case "monday": result = "Have a good week" break case "tuesday": case "wednesday": result = "Ohhh...." break case "thrusday": result = "Yalla habayta" break case "friday": case "saturday": result = "Yammi jachnun" break default: result = "Not a valid day" break } return result }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function caseInSwitch(val) {\n var answer = \"\";\n // Only change code below this line\n \n switch (val){ //you are switching the value in the first \"case\" or exapample so it will display Alpha\n case 1: \n return (\"alpha\");\n case 2: \n return(\"beta\");\n ...
[ "0.6780309", "0.6598442", "0.65374476", "0.64267313", "0.6408134", "0.63770545", "0.6375278", "0.6362187", "0.6314739", "0.6293992", "0.6273451", "0.62577194", "0.62339115", "0.6179246", "0.6159959", "0.6142769", "0.61369723", "0.61117494", "0.6102856", "0.60709006", "0.60573...
0.0
-1
Make sure the client is loaded before calling this method.
async getFederalAndStateReps() { const { gapi, address } = this.state; try { const response = await gapi.client.civicinfo.representatives.representativeInfoByAddress({ address: address, includeOffices: true}); await this.setState({ federalAndState: response.result["officials"], normalizedInput: response.result["normalizedInput"], divisions: response.result["divisions"] }); return this.state.federalAndState; } catch (err) { console.error('error fetching representative info', err); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleClientLoad() {\n gapi.load('client', initClient);\n}", "function handleClientLoad() {\n gapi.load(\"client\", initClient);\n}", "function handleClientLoad() {\n gapi.load('client:auth2', initClient);\n }", "function handleClientLoad() {\n gapi.load('client:auth2', init...
[ "0.784449", "0.78224707", "0.73172957", "0.73172957", "0.73172957", "0.7316013", "0.72974056", "0.7268579", "0.72657394", "0.72657394", "0.72446775", "0.7239029", "0.7239029", "0.7239029", "0.71951574", "0.7175817", "0.7175662", "0.7175662", "0.7175662", "0.7175662", "0.71756...
0.0
-1