query
stringlengths
9
34k
document
stringlengths
8
5.39M
negatives
listlengths
19
20
metadata
dict
Loads a certificate from the key with this ID, and then executes the "doneFn(cert)" function with argument being the resulting certificate.
function loadCertFile(keyid, doneFn) { "use strict"; fs.readFile(path.join(getKeyPath(keyid), config.getCertTextPrefix()), "utf8", function (error, data) { if (error !== null && error !== undefined) { console.log("Could not read cert file " + path.join(getKeyPath(keyid), config.getCertTextPr...
[ "function downloadCertificate() {\n var cert = certificate;\n downloadFile(cert.pem, 'UniVoteCertificate.pem');\n}", "processSSL() {\n if (this.hasTask('ssl')) {\n this.ui.message({\n normal: 'Loading SSL Certificate',\n verbose: 'Loading SSL Certificate'\n });\n return new P...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
! \brief copies the appropriates source and counter from the adjacent identifiers at the insertion position. \param d the digit part of the new identifier \param p the previous identifier \param q the next identifier \param level the size of the new identifier \param s the local site identifier \param c the local monot...
function getSC(d, p, q, level, s, c){ var sources = [], counters = [], i = 0, sumBit = Base.getSumBit(level), tempDigit, value; while (i<=level){ tempDigit = BI.dup(d); BI.rightShift_(tempDigit, sumBit - Base.getSumBit(i)); value = BI.modInt(tempDigit,Math.po...
[ "function fillD(l,sc) {\n\tif(!PROOF.length) {throw \"[ERROR]: cannot begin a proof using \"+gRul(l.rul)+\".\";}\n\tif(sc==l.cnt-1) {\n\t\tl.sig = PROOF[sc-1].sig.slice(0,PROOF[sc-1].sig.length-1);\n\t} else {l.sig = PROOF[l.cnt-2].sig.slice(0);}\n\tl.dth = l.sig.length;\n\tl.avl = gtAvl(l);\n\tl.frv = freeVars(l.t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns element for Daily Task. Throws exception if it is not found
function getDailyTaskGauge() { var elements = document.getElementsByClassName('daily-task'); if (!elements.length) throw 'Элемент не найден.'; var progressBadge = elements[0]; return progressBadge; }
[ "function getTask(taskID)\r\n{\r\n\tlet task;\r\n\tfor (let i=0; i<tododata.tasks.length; i++)\r\n\t{\r\n\t\tif (tododata.tasks[i].id === Number(taskID))\r\n\t\t{\r\n\t\t\ttask = tododata.tasks[i];\r\n\t\t}\r\n\t}\r\n\r\n\treturn task;\r\n}", "function FindTask(taskName) {\n for(var i=0; i<TASK.data.length; i+...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clone and return a new ReactElement using element as the starting point. See
function cloneElement(element,config,children){if(!!(element===null||element===undefined)){{throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+element+".");}}var propName;// Original props are copied var props=_assign({},element.props);// Reserved names are extracted var key=el...
[ "function CloneElement(_a) {\n\t var { children, element, childRef } = _a, rest = __rest$1(_a, [\"children\", \"element\", \"childRef\"]);\n\t const getProjectedProps = react.useMemo(() => (props) => {\n\t const childProps = element.props;\n\t return Object.keys(props).reduce((acc, key) => {\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets a boolean preference, returning false if the preference is not set
function betterdouban_getBooleanPreference(preference, userPreference) { // If the preference is set if(preference) { // If not a user preference or a user preference is set if(!userPreference || betterdouban_isPreferenceSet(preference)) { try { return betterdouban_ge...
[ "function rosterprocessor_getBooleanPreference(preference, userPreference)\n{\n // If the preference is set\n if(preference)\n {\n // If not a user preference or a user preference is set\n if(!userPreference || rosterprocessor_isPreferenceSet(preference))\n {\n try\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removed incomplete project from the local storage and resets the state. Also, moves wizard to the first step.
removeIncompleteProject() { const { onStepChange } = this.props // remove incomplete project from local storage window.localStorage.removeItem(LS_INCOMPLETE_PROJECT) window.localStorage.removeItem(LS_INCOMPLETE_WIZARD) // following code assumes that componentDidMount has already updated state with c...
[ "function clear_wizard() {\n //todo: need to decide what to save here before quitting the wizard\n\n //decommission wizard\n $('#dataFileWizard').wizard('removeSteps', 1, currentIndx + 1);\n $('#dataFileWizard').hide();\n\n descriptionBundle = []; //clear bundle\n descripti...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Using the function you just built, create a function called renderGithubLinks that takes an array of students and adds their github links to the page. Extra points if you use builtin Array methods like forEach, map, and join and only insert into the DOM once.
function renderGithubLinks(students) { students.forEach(function (student) { var anchors = buildGithubLink(student); $('body').append(anchors); }); }
[ "function displayUserRepos(repos) {\n repos.map(repo => {\n console.log(repo);\n let html = `<div class='col-md-12 border py-2 px-2 mr-2'><a href=${repo.html_url}><h3>${repo.name}</h3></a></div><br>`;\n $('.repos').append(html);\n });\n}", "function renderUsers(users) {\n users.forEac...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the LoadBalancing strategy that should be used based on what the user provided.
_getLoadBalancingStrategy() { var _a; if (!this._userChoseCheckpointStore) { // The default behavior when a checkpointstore isn't provided // is to always grab all the partitions. return new UnbalancedLoadBalancingStrategy(); } const partitionOwnership...
[ "getLoadStrategy() {\r\n var _a, _b, _c;\r\n return (_c = (_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.routing) === null || _b === void 0 ? void 0 : _b.loadStrategy) !== null && _c !== void 0 ? _c : \"always\" /* ALWAYS */;\r\n }", "get strategyType() {\n return this.sett...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the creation date range query for the given dates.
function getCreationDateRangeQuery(prefix, prop, fromDate, toDate) { var luceneQuery = " +@"+prefix+"\\:"+prop+":["; if (fromDate !== null && ! isNaN(fromDate.getTime())) { luceneQuery += getLuceneDateString(fromDate); } else { luceneQuery += "1970\\-01\\-01T00:00:00"; } l...
[ "function _dateRange (minYYYYMMDD, maxYYYYMMDD) {\n assert(minYYYYMMDD <= maxYYYYMMDD, `start ${minYYYYMMDD} <= end ${maxYYYYMMDD}`)\n\n const result = []\n\n // Have to muck around here b/c js dates are weird ...\n // simply saying 'getDate() + 1' didn't work due to timezones etc.\n const toYYYYMMDD = i => i....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The path to an manifest file describing all of the asset bundles used in the build (optional).
set assetBundleManifestPath(value) {}
[ "get assetBundleManifestPath() {}", "assetPath(name) {\n const manifest = this.manifest();\n if (!manifest[name]) {\n throw new Error(`Cannot find path for \"${name}\" asset. Make sure you are compiling assets`);\n }\n return manifest[name];\n }", "function getManifest(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Array$prototype$equals :: Array a ~> Array a > Boolean
function Array$prototype$equals(other) { if (other.length !== this.length) return false; for (var idx = 0; idx < this.length; idx += 1) { if (!(equals (this[idx], other[idx]))) return false; } return true; }
[ "function Array$prototype$equals(other) {\n if (other.length !== this.length) return false;\n for (var idx = 0; idx < this.length; idx += 1) {\n if (!equals(this[idx], other[idx])) return false;\n }\n return true;\n }", "function eqArrays (array1,array2) {\n let result = false;\n\n if (array1....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
function to find last digit of a^b
function lasttDigitt(firstNum, secondNum) { const a = firstNum.toString(); const b = secondNum.toString(); let len_a = a.length; let len_b = b.length; console.log('***', a.length); // if a and b both are 0 if (len_a == 1 && len_b == 1 && b[0] == '0' && a[0] == '0') return...
[ "function lastDigit(a, b) {\n a = Number(a);\n b = Number(b);\n\n let result = Math.pow(a, b).toString();\n console.log(result);\n return Number(result[result.length - 1]);\n}", "function lastDigitAtoB(a,b){\n var x = a\n for(i = 1; i < b; i++){\n if (a > 9){\n a = a%10\n }\n a*=x\n }\n ret...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
behavior: default text for input fields
function defaultBehavior(id, text) { var K_DEFAULT = 'K_DEFAULT'; var C_DEFAULT = 'input-default'; var el = $(id).on('setdefault', function(e, isDefault) { if (isDefault) el.data(K_DEFAULT,true).val(text).addClass(C_DEFAULT); else el.data(K_DEFAULT,false).val('').removeCl...
[ "function setDefaultTxt()\r\n{\r\n\tvar idField = \"#zha\";\r\n\tvar defaultText = \"Enter ZHA or zha 123456.\";\r\n\t$(idField).val(defaultText);\r\n\t$(idField)\r\n\t\t.focus(function() \r\n\t\t{\r\n\t \t\tif ($(this).val() === defaultText) \r\n\t \t\t{\r\n\t \t\t\tthis.value = \"\";\r\n\t \t\t$(idField).ad...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
ZOQL string escaping. The ZOQL parser can be quite persnickety about quotes, spaces, uppercase, and the < symbol. For example: < must become &lt; Nodesoap will convert special characters like `'` into their escaped versions like `&apos;`. This assumes that quotes are already escaped like '...name = "Linda\\\'s"' Suppos...
function escapeZOQL (querystring) { if (querystring && querystring.length === 0) return querystring; querystring = keywordsToLowercase(querystring); // Find node-soap additional escapes here: github://vpulim/node_soap/lib/wsdl.js/xmlEscape() // For example, that is why <![cdata[ becomes &lt;[cdata // List ...
[ "static function quote (value : string) : string {\n var result = '\"', index = 0, symbol;\n for (; symbol = value.charAt(index); index++) {\n // Escape the reverse solidus, double quote, backspace, form feed, line\n // feed, carriage return, and tab characters.\n resu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deserialize individual areas within the main area. Notes Because this data comes from a potentially unreliable foreign source, it is typed as a `JSONObject`; but the actual expected type is: `ITabArea | ISplitArea`. For fault tolerance, types are manually checked in deserialization.
function deserializeArea(area, names) { if (!area) { return null; } // Because this data is saved to a foreign data source, its type safety is // not guaranteed when it is retrieved, so exhaustive checks are necessary. var type = area.type || 'unknown'; if (ty...
[ "function deserializeArea(area, names) {\n if (!area) {\n return null;\n }\n // Because this data is saved to a foreign data source, its type safety is\n // not guaranteed when it is retrieved, so exhaustive checks are necessary.\n var type = area.type || 'unknown';\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Verifies that toggling the UMA setting causes the user's analytics ID to be reset.
function testResetAnalyticsOnUMAToggle(callback) { var id0 = null; var id1 = null; // Simulate UMA enabled, and send a hit. chrome.fileManagerPrivate.umaEnabled = true; reportPromise( tracker.sendAppView('Test0') .then( function() { // Log the analytics ID that g...
[ "function testUMADisabled(callback) {\n // Simulate UMA disabled, and verify that hits aren't sent.\n chrome.fileManagerPrivate.umaEnabled = false;\n reportPromise(\n tracker.sendAppView('Test').addCallback(\n function() {\n assertTrue(lastHit === null);\n }),\n callback);\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
toggleMainlineLock() Inverts the mainlineLocked global variable and updates all SVG objects according to that new status
function toggleMainlineLock() { // Create new empty array var panelChangeRequests = new Array(); // Add inverted mainline lock to array panelChangeRequests.push(new ServerObject(SERVER_NAME_MAINLINELOCKED, SERVER_TYPE_DISPATCH, mainlineLocked ? 'false' : 'true')); // Perform update exe...
[ "function updateMainlineStatus()\n{\n\tvar mainlineLockGroup = svgDocument.getElementById(\"mainlineLockedGroup\");\n\tvar mainlineTrackLayer = svgDocument.getElementById(\"mainlineTrackLayer\");\n\t\n\tif(mainlineLocked)\n\t{\n\t\tmainlineTrackLayer.setAttribute(\"style\", \"opacity:0.5\");\n\t\tmainlineTrackLayer...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Move the selected options from the source select list to the target select list. The moved options will be removed from the source list
function ui_moveSelectedOptions(id_sourceList, id_targetList){ var _selectedOptions = ui_copySelectedOptions(id_sourceList); //Get the selected options in the source list for (var i=0; i<_selectedOptions.length; i++){ //move the selected options to the target list ui_addNewOption(_selectedOptions[i].value, _selec...
[ "function moveAll( fromList, targetList )\r\n{\r\n for ( var i = fromList.options.length - 1; i >= 0; i-- )\r\n {\r\n option = fromList.options[i];\r\n fromList.remove( i );\r\n targetList.add(option, null);\r\n option.selected = true;\r\n }\r\n}", "function moveSelected( from...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
method to contain the portal zone setup
buildPortal() { this.physics.world.enable(this.portal); this.portal.body.setAllowGravity(false); this.portal.setOrigin(0,0); }
[ "function PortalOutlet() {}", "function PortalOutlet() { }", "function test_log_collect_current_zone_multiple_servers_server_setup() {}", "constructor () {\r\n\tthis.a_zone = [];\r\n\tthis.zoneLen = 0; \r\n }", "function zoneCreator () {\n var zone = this;\n console.info(\"ZoneCreator online, human.\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the JSON table from PSC with ALL the rows if no filter is used a variant of getSITablePost as it takes httpclient as input.
function getSITablePostwithClient(httpsClient,PSCIP,PSCPort,PSCProtocol,PSCUser,PSCPassword,SITableName,filter){ if(SITableName.indexOf("Si")!=0){ SITableName = "Si" + SITableName; } var tableURL = "/RequestCenter/nsapi/serviceitem/" + SITableName; var httpMethod = new PostMethod(tableURL); var filterJson = ...
[ "function fetchAll(base, table) {\n return new Promise((resolve, reject) => {\n let all = [];\n\n base(table)\n .select({})\n .eachPage(\n (records, next) => {\n all = all.concat(\n _.map(records, r => {\n // Attach Airtable row ID to fields\n r....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Type guard for Definition.
function isDefinition(node) { return node.type === 'definition'; }
[ "isDefinition() {\r\n return this.compilerObject.isDefinition;\r\n }", "function isDefinition(token) {\n return token == HABILIS.FUNCTIONS['define'];\n}", "function TypeDef() {\n}", "function assertDefinition(node) {\n if (!isDefinition(node)) {\n throw new Error('Node is not a Definiti...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This combines lots of functions and draws all of the hexes inside of the bottom canvas
drawHexes() { const { width, height } = this.state.canvasSize const { hexWidth, hexHeight, vertDist, horizDist } = this.state.hexParams const hexOrigin = this.state.hexOrigin let qLeftSide = Math.round( hexOrigin.x / horizDist ) let qRightSide = Math.round( ( width - hexOrigin.x...
[ "function drawHexes() {\n const { canvasWidth, canvasHeight } = canvasSize\n const { hexWidth, hexHeight, vertDist, horizDist} = getHexParametres()\n let qLeftSide = Math.round(hexOrigin.x/horizDist);\n let qRightSide = Math.round((canvasWidth - hexOrigin.x)/horizDist);\n let rTop...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Updates all the journeys. It serves to visualize the latest condition of the journey's sessions
updateJourney() { for (let j of this.mapJourneys) { j.update(); } }
[ "plotJourneys() {\n for (let j of this.mapJourneys) {\n //plot ghost Session\n j.plotSessions(this);\n }\n }", "function updateLobbySpots() {\n customers.forEach(function(customer) {\n if (customer.status === `isStandingInLine`) {\n reserveAndDefineAvail...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Incorporates the specified new records into this dimension. This function is responsible for updating filters, values, and index.
function preAdd(newData, n0, n1) { // Permute new values into natural order using a sorted index. newValues = newData.map(value); newIndex = sort(crossfilter_range(n1), 0, n1); newValues = permute(newValues, newIndex); // Bisect newValues to determine which new records are selected....
[ "updateRecords() {\n this.records(this.dataSevice.getDataByYear()); \n }", "function preAdd(newData, n0, n1) {\n\n // Permute new values into natural order using a sorted index.\n newValues = newData.map(value);\n newIndex = sort(crossfilter_range(n1), 0, n1);\n newV...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return a JSONP of all mice.
function getMice(jsonpFnName) { var jsonpMice=[]; for(var i in mice) jsonpMice.push('"'+i+'": {"x": '+mice[i].x+',"y": '+mice[i].y+',"idle": '+mice[i].idle+'}'); return jsonpFnName+"({"+jsonpMice+"});"; }
[ "function getPersons() {\n return response.serveJson(store.getPersons());\n}", "function getPresenters() {\n var handler = \"/presenterHandler/query\";\n var xhr = new XMLHttpRequest();\n\n xhr.onreadystatechange = function () {\n if (this.readyState == 4 && this.status == 200) {\n result = JSON.par...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add a new animator object to the list of animators managed by this module. If the animator list was empty before calling this function, then the animation loop is started.
function addAnimator(animator) { animatorList.push(animator); if (animatorList.length === 1) { start(); } }
[ "addAnimation(anim){\n\t\tthis.anims.push(anim);\n\t}", "function addAnimation(animation) {\n\tanimations[animations.length] = animation;\n}", "configureAnimator(animator: Animator): void {\n this._container.unregister(Animator);\n this._container.registerInstance(Animator, Animator.instance = animator);\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find closes bigger level, aka level we want to use.
getClosestBiggerLevel(width) { let me = this, levels = Object.keys(me.responsiveLevels), useLevel = null, minDelta = 99995, biggestLevel = null; levels.forEach((level) => { let levelSize = me.responsiveLevels[level]; // responsiveLevels can contains config o...
[ "getClosestBiggerLevel(width) {\n let me = this,\n levels = Object.keys(me.responsiveLevels),\n useLevel = null,\n minDelta = 99995,\n biggestLevel = null;\n levels.forEach(level => {\n let levelSize = me.responsiveLevels[level]; // responsiveLevels can contains config objects...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Draws the column heads, then returns the created elements
_drawColumnHeads() { // Get headers from data (keys of first array item) const headers = this._data[0].antibiotics.map((col) => col.antibiotic); console.log('ResistencyMatrix / _drawColumnHeads: Headers are %o', headers); // <g> and transform const colHeads = this._elements.svg .selectAll('.column'...
[ "function drawColHdrs(){\n\tconsole.log(`draw col headers`);\n\t\n\tvar obj = gridSize();\n\tvar canvas = document.getElementById('col_hdrs');\n\t\n\t\n\t//Adjust the workspace so that both canvases can fit into it\n\tvar body = document.getElementById('body');\n\tvar workSpace = document.getElementById('work_space...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns whether the |password| is secure enough to be used ingame. We don't set a lot of requirements, except that it needs to be at least eight characters in length and contain at least one character of different casing OR a number mixed with characters.
isSufficientlySecurePassword(password) { const length = password.length; if (length < 8) return false; // too short let strength = 0; if (/[a-z]/.test(password)) ++strength; // lower-case character if (/[A-Z]/.test(password)) ++strength; ...
[ "function isStrongPwd(password) {\n\n var uppercase = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n\n var lowercase = \"abcdefghijklmnopqrstuvwxyz\";\n\n var digits = \"0123456789\";\n\n var splChars = \"!@#$%&*()\";\n\n var ucaseFlag = contains(passwor...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sends an AJAX request to update the information of a ticket. Makes use of the HTTP PUT method. ONSUCCESS => 1) Show an alert to the user to inform him that update was successful 2) Reloads the list of all users ONERROR => Displays a message to the user to inform him that ticket data could not be updated
function edit_ticket(api_url, updated_ticket_data) { $.ajax({ url: api_url, type: "PUT", data: JSON.stringify(updated_ticket_data), processData:false, contentType: PLAINJSON }).done(function (data, textStatus, jqXHR){ if (DEBUG) { console.log ("RECEIVED RESPONSE: data:",data,"; textSta...
[ "function updateTicket(){\n\t//getting the values given in the field\n \tvar x= document.getElementById(\"status\");\n var y = parseInt(x.options[x.selectedIndex].value);\n var a= document.getElementById(\"priority\");\n var b = parseInt(a.options[a.selectedIndex].value);\n var c= document.getElementByI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Fn for Load and Render Team details Template/Partial
function showTeamDetails(context) { context.loggedIn = sessionStorage.getItem('authtoken') !== null; context.username = sessionStorage.getItem('username'); context.teamId = context.params._id.substring(1); context.isOnTeam = sessionStorage.getItem('teamId') !== "undefined" &&...
[ "function displayTeam(team){\n const teamField = document.querySelector('#team-container')\n let teamTasks = createTaskField(team.tasks)\n teamField.innerHTML += `<div class=\"team-display\" data-id=\"${team.id}\">\n <h2>${team.name}</h2>\n <h2>Our Tasks</h2>\n <ul class=\"team-tasks-$...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Highlights arrow orange (with hatched pattern if no explicit time was extracted)
function highlightArrow(id, idStr){ let pathIdStr = '#path'+idStr; d3.select(pathIdStr) .style("fill", function(d){ if (d.time === null){ return "url(#orange-stripe)"; } return '#64CECA'; //formerly #ffa64d }); }
[ "function getHighlightedWords() {\n // get current Time\n const date = new Date();\n var hour = date.getHours();\n var minute = date.getMinutes();\n \n // get fixed time if set in config/params\n if (widget_config.fixedTime != \"\"){\n console.log(\"actual time: \" + hour + \":\" + minute)\n hour = Num...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
show factory's main data
function showFactoryMainData(jsonObj) { factory_data.innerHTML = ""; var factory_name = '廠區名稱:' + jsonObj.廠區 + '<br>'; var factory_address = '廠區地址:' + jsonObj.地址 + '<br>'; var impact_chose = '危害選擇:'; factory_data.innerHTML = factory_name + factory_address + impact_chose; }
[ "function demoInfo() {\n d3.select(\"#sample-metadata\").html(\"\");\n d3.select(\"#sample-metadata\").append(\"ul\");\n d3.select(\"ul\").append(\"li\").text(\"id: \" + data.metadata[getId()].id);\n d3.select(\"ul\").append(\"li\").text(\"ethnicity: \" + data.metadata[getId()].ethnicity...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Builds a "snapshot" of the form, so we can use it to see if someone has changed it.
function snapshotForm(theForm) { var snapshotTxt = ''; var elemList = theForm.elements; var elem; var elemType; for( var i = 0; i < elemList.length ; i++ ) { elem = elemList[i]; if ( typeof(elem.type) == 'undefined' ) { continue; } elemType = elem.type.t...
[ "function snapshotForm(props) {\n const tree = renderer.create(<LoginForm {...props} />).toJSON()\n expect(tree).toMatchSnapshot()\n }", "@action\n saveForm() {\n this.validateForm();\n if (this.isError) {\n return null;\n }\n let saveSnapshot = this.createSnapshot();\n\n const request...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Runs the `cellClassNameGenerator` for the visible cells. If the generator depends on varying conditions, you need to call this function manually in order to update the styles when the conditions change.
generateCellClassNames(){Array.from(this.$.items.children).filter(row=>!row.hidden).forEach(row=>this._generateCellClassNames(row,this.__getRowModel(row)))}
[ "generateCellClassNames() {\n Array.from(this.$.items.children).filter(row => !row.hidden).forEach(row => this._generateCellClassNames(row, this.__getRowModel(row)));\n }", "generateCellClassNames() {\n Array.from(this.$.items.children).filter(row => !row.hidden).forEach(\n row => this._generateCe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
linked objects get updated when this object gets updated
addLinkedObjects(...objects){ this.linkedObjects = this.linkedObjects.concat(objects); }
[ "updateLinkData() {\n var thisGraph = this;\n var node_names_set = [];\n for (var i = 0; i < thisGraph.nodes.length; i++) {\n node_names_set.push(thisGraph.nodes[i].id)\n }\n var retData = thisGraph.dataSource.getFlowBetwe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
the sentiment scores for each user/bot interaction are inserted into the database
function insertIntoSentimentTable(sentimentScore, interactionID){ request = new Request( "INSERT INTO Sentiment (InteractionID, SentimentScore) VALUES (" + mysql.escape(interactionID) + "," + mysql.escape(sentimentScore) + ")", function(err, rowCount, rows){ if(!err){ console.log("Sentiment score suc...
[ "async function sentimentAnalysis(client,userText){\n console.log(\"Running sentiment analysis on: \" + userText);\n // Make userText into an array\n const sentimentInput = [ userText ];\n // call analyzeSentiment and get results\n const sen...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
wide Columns means all the fields we want to show when using get with o wide option (return more information then the defualt)
toWide() { return this.extractValues(this.wideColumns); }
[ "function getGridColumns() {\n var items = InquiryGeneralViewModel.Fields;\n var length = items.length;\n var cols = [];\n var numbers = [\"int32\", \"int64\", \"int16\", \"integer\", \"long\", \"byte\", \"real\", \"decimal\"];\n var groupable = InquiryGeneralViewModel.IsAdhocQuer...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets if the provided structure is a ImportDeclarationStructure.
static isImportDeclaration(structure) { return structure.kind === StructureKind_1.StructureKind.ImportDeclaration; }
[ "static isImportSpecifier(structure) {\r\n return structure.kind === StructureKind_1.StructureKind.ImportSpecifier;\r\n }", "static isImportDeclaration(node) {\r\n return node.getKind() === typescript_1.SyntaxKind.ImportDeclaration;\r\n }", "static isExportDeclaration(structure) {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
const crypto = require("crypto"); =============================== general methods for blockchain parameters ================================ function will provide blockchainm parameters.
function getBlockchainParams() { return new Promise((resolve, reject) => { var response; multichain.getBlockchainParams({ "display-names": true, "with-upgrades": true }, (err, res) => { console.log(res) if (err == null) { return resolve({ message: "y...
[ "function getBlockchainParams() {\n return new Promise((resolve, reject) => {\n var response;\n multichain.getBlockchainParams({\n \"display-names\": true,\n \"with-upgrades\": true\n },\n (err, res) => {\n\n if (err == null) {\n return resolve({\n message: \"your...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function: salva Aplica as altera&ccedil;&otilde;es feitas em uma vari&aacute;vel
function salva(variavel) { if(variavel == "$postgis_mapa") {alert("erro");} else { var original = $i(variavel).value; $i(variavel).value = $trad("grava",i3GEOadmin.ogcws.dicionario); core_pegaDados($trad("grava",i3GEOadmin.ogcws.dicionario),"../php/ogcws.php?funcao=salvaConfigura&variavel="+variavel+"&valor="...
[ "function cambiarValor(a){\n a = 20;\n }", "function saludo (nombre) {\n\t\n}", "function nuevaVariante(){\n \n var seguirVariante=libresMovientoPendientes(); \n \n \n \n // realiza acccion si paso la validacion para crear otra variante ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find local time of moonrise and moonset JD is the Julian Date of 0h local time (midnight) Accurate to about 5 minutes or better recursive: 1 calculate rise/set in UTC recursive: 0 find rise/set on the current local day (set could also be first) returns '' for moonrise/set does not occur on selected day
function MoonRise(JD, deltaT, lon, lat, zone, recursive) { var timeinterval = 0.5; var jd0UT = Math.floor(JD - 0.5) + 0.5; // JD at 0 hours UT var suncoor1 = SunPosition(jd0UT + deltaT / 24. / 3600.); var coor1 = MoonPosition(suncoor1, jd0UT + deltaT / 24. / 3600.); var suncoor2 = SunPosition(jd...
[ "function MoonRise(JD, deltaT, lon, lat, zone, recursive)\n {\n var timeinterval = 0.5;\n\n var jd0UT = Math.floor(JD-0.5)+0.5; // JD at 0 hours UT\n var suncoor1 = SunPosition(jd0UT+ deltaT/24./3600.);\n var coor1 = MoonPosition(suncoor1, jd0UT+ deltaT/24./3600.);\n\n var suncoor2 = SunPosition(j...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
isNonnegativeInteger (STRING s [, BOOLEAN emptyOK]) Returns true if string s is an integer >= 0. For explanation of optional argument emptyOK, see comments of function isInteger.
function isNonnegativeInteger (s) { var secondArg = defaultEmptyOK; if (isNonnegativeInteger.arguments.length > 1) secondArg = isNonnegativeInteger.arguments[1]; // The next line is a bit byzantine. What it means is: // a) s must be a signed integer, AND // b) one of the following m...
[ "function isNonnegativeInteger (s)\n{ var secondArg = defaultEmptyOK;\n\n if (isNonnegativeInteger.arguments.length > 1)\n secondArg = isNonnegativeInteger.arguments[1];\n\n // The next line is a bit byzantine. What it means is:\n // a) s must be a signed integer, AND\n // b) one of the follow...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if qasCopy is empty and adds qas array into the qasCopy array. Takes a random object from the qasCopy array and returns the variables. Does not return a duplicate qa until all qas are exhauster.
function getRandomQA() { if (qasCopy.length === 0) { qasCopy = [].concat(qas); } var qa = qasCopy.splice( Math.floor(Math.random() * qasCopy.length), 1 )[0]; console.log(qasCopy); return qa; }
[ "function setAvailableQuistions(){\n const totalQuestion = quiz.length;\n for(let i = 0; i < totalQuestion; i++){\n availableQuistions.push(quiz[i])\n }\n}", "function randomizeQuestions() {\n\t//make a copy of questionBank, so that qbank is unaltered\n\t// var possibleQs = questionBank.slice(0);\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Bezier implementation from MIT License KeySpline use bezier curve for transition easing function
function KeySpline (bezier) { var mX1 = bezier[0]; var mY1 = bezier[1]; var mX2 = bezier[2]; var mY2 = bezier[3]; this.get = function(aX) { if (mX1 == mY1 && mX2 == mY2) return aX; // linear return CalcBezier(GetTForX(aX), mY1, mY2); } function A(aA1, aA2) { return 1.0 - 3....
[ "function _cubicBezierCurve(t,p0,p1,p2,p3){return(1-t)*(1-t)*(1-t)*p0+3*(1-t)*(1-t)*t*p1+3*(1-t)*t*t*p2+t*t*t*p3;}", "function KeySpline (mX1, mY1, mX2, mY2) {\n\n this.get = function(aX) {\n if (mX1 == mY1 && mX2 == mY2) return aX; // linear\n return CalcBezier(GetTForX(aX), mY1, mY2);\n }\n\n function ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Santa moving with arrow keys
function santaMoving(e) { if (e.code==="ArrowLeft") {state.santa.x-=5; } else if(e.code==="ArrowRight") {state.santa.x+=5; } drawSanta(ctx,image); }
[ "function keyPressed(){\n if(keyCode == UP_ARROW){ // move up with up arrow\n let dir = 0;\n agent.moved(dir)\n }\n if(keyCode == RIGHT_ARROW){ // move right with right arrow\n let dir = 1;\n agent.moved(dir)\n }\n if(keyCode == DOWN_ARROW){ // move down with down arrow\n let dir = 2;\n ag...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
resolve() treats relative paths as relative to process.cwd(), so to return a relative path we use relative()
function resolveRelative(path) { return relative(process.cwd(), resolve(path)); }
[ "function resolveSelf(relativePath) {\n return path.resolve(__dirname, '../', relativePath)\n}", "function resolveRelativeToFile(absPath, relPath) {\n return path.resolve(path.dirname(absPath), relPath);\n}", "function resolve(file) {\n return path.resolve(__dirname, file)\n}", "resolve(root, path) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Log data from `drone.stderr` to haibu
function onStderr (data) { data = data.toString(); haibu.emit('drone:stderr', 'error', data, meta); if (!responded) { stderr = stderr.concat(data.split('\n').filter(function (line) { return line.length > 0 })); } }
[ "function onStderr (data) {\n data = data.toString()\n haibu.emit('drone:stderr', 'error', data, meta);\n \n if (!responded) {\n stderr = stderr.concat(data.split('\\n').filter(function (line) { return line.length > 0 }));\n }\n }", "function childHandleStderr(data)\n{\n\tconsol...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
fetch request for marker datas
function getMarkerData() { const url = "http://192.168.8.149:8080/UAVFusionPOC/rest/fusion/detection/all"; //url of service fetch(url) .then(res => res.json()) .then(data => { makeMarkerandLineSvg(data); makeSidebarData(data); makeTooltip(data); }) ...
[ "function fetchMarkers(){\n fetch('/markers').then((response) => {\n return response.json();\n }).then((markers) => {\n markers.forEach((marker) => {\n createMarkerForDisplay(marker.lat, marker.lng, marker.content)\n });\n });\n}", "function fetchMarkers(){\n fetch('/markers').then((response) => ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check if provided object is a LazyIterator object by checking it's .next element.
function isLazyIteratorObject(iterator) { return (typeof iterator.next === 'function'); }
[ "function isLazyIteratorObject(iterator) {\n return typeof iterator.next === 'function';\n}", "function isIter(obj) {\n return ( (\"object\" == typeof obj)\n && (\"next\" in obj)\n && (\"function\" == typeof obj.next) );\n}", "function isIterableIterator(x) {\n // eslint-disable-n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
crea los tablones a partir de los array A y B
function crearTablones(inicio, fin) { var tablones = []; for (var k in inicio) { tablones.push([inicio[k], fin[k]]); } return tablones; }
[ "function generarTablero( horizontal, vertical ) {\n\n var tablero = new Array();\n for ( var i = 0; i < horizontal; i++ ) {\n\n tablero[ i ] = new Array();\n for ( var j = 0; j < vertical; j++ ) {\n tablero[ i ][ j ] = aleatorio( 0, 1 ); //: Genera aleatoriamente las bombas y las ins...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
switch statement function to choose what to update
updateSelectionSwitch(updateSelection) { switch (updateSelection.updateSelection) { case ("Departments"): this.updateDepartments(); break; case ("Roles"): this.updateRoles(); break; case ("Employees"): ...
[ "switch (update._) {\n case 'updateOption':\n debug('Option:', update)\n this.emit('update', update)\n return\n\n case 'updateConnectionState':\n debug('New connection state:', update.state)\n this._connectionState = update.state\n this.emit('update', update)\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
unique key for model field types
function _model_key(field, attribute) { var pick = false; var type = field.model_type; var id = field.model_id; for (var index in field.picks) { if (field.picks[index] === attribute) { pick = index; break; } } return pick ? type + '-' + id + '-' + pick : false; }
[ "function typeIdName(type){\n types = {user: User, org: Organization, msg: Message};\n let dbFields = new types[type].db_blueprint()\n for (let prop in dbFields){\n let meta = dbFields[prop].meta;\n if (meta.includes('unique')){\n return prop\n }\n }\n throw \"Could not find objects unique field\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This must be called before the OpenLayers map is initialized Changes the base layer
function mapBaseLayerChanged(e) { // console.log(e.type + " " + e.layer.name); if (e.layer.backgroundColor) map.div.style.backgroundColor = e.layer.backgroundColor; if (e.layer && document.getElementById('baseOption' + e.layer.name)) document.getElementById('baseOption' + e....
[ "function initBaseLayer() {\n // set basemap tilelayer URL if it does not already exist\n if (!self.basemapUrl) {\n self.basemapUrl = self.getScopeDefaults().basemapUrl;\n }\n\n self._baseLayer = L.tileLayer(self.basemapUrl).addTo(self._map);\n }", "function applyBaseMap(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called on the initial render, this uses the rendered iframe as a base for creating a new `_internalWidget`.
_createWidget() { try { createWidget(this.iframeEl, (widget) => { if (widget) { this._setupWidget(widget); this._reloadWidget(); } }); } catch (err) { console.log(err) } }
[ "buildIframe_() {\n const iframe = this.iframe_;\n const iframeBody = iframe.getBody();\n const iframeDoc = /** @type {!HTMLDocument} */this.iframe_.getDocument();\n\n // Inject Google fonts in <HEAD> section of the iframe.\n (0, _dom.injectStyleSheet)((0, _doc.resolveDoc)(iframeDoc), _ui.CSS);\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Enter a parse tree produced by LUFileParsererrorQuestionString.
enterErrorQuestionString(ctx) { }
[ "visitErrorQuestionString(ctx) {\n\t return this.visitChildren(ctx);\n\t}", "function parseError(text, token)\n{\n error('parse error: ' + text + ' ' + token.pos);\n}", "function parseInput() {\n\n const text = editor.getValue();\n\n try {\n\n const parsed = esprima.parse(text);\n return...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Will filter out elements from merged that are equivalent to compare parameter returns array with unique elements
function filterNotUnique(compare) { return merged.filter(function(element){ return element !== compare; }) }
[ "function uniteUnique(arr) {\nlet args = Array.protoype.slice.call(arguments);\nreturn args.reduce(function(a,b) {\n\nreturn a.concat(b.filter(function(subArray) {\n\nreturn a.indexOf(subArray) <0;\n\n}));\n});\n}", "function remove_uniques(a1, a2){\n\treturn a1.filter(function(item) {\n\t\treturn a2.indexOf(item...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Displays the players money
function Update () { moneyText.text = "$" + PlayerStats.Money.ToString(); }
[ "function showPlayerStats() {\n jackpotLabel.text = \"Jackpot: $\" + jackpot;\n playerLabel.text = \"Player Money: $\" + playerMoney;\n }", "function updateMoneyDisplay(){\n moneyDisplay.html('$' + userMoney);\n}", "function show_money() {\r\n\t$(\"#money\").html(\"Balance: \" + money + \" €\"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check if fullscreen is enabled
get ifFullScreenEnabled() { return ( document.fullscreenEnabled || document.webkitFullscreenEnabled || document.mozFullScreenEnabled || document.msFullscreenEnabled ); }
[ "function fullscreenEnabled(){ return document.fullscreenEnabled || document.mozFullScreenEnabled || document.webkitFullscreenEnabled;}", "function checkFullscreenOn(){\n\tcheckFullscreenOnRequest = requestAnimFrame(checkFullscreenOn);\n\tif(window.innerHeight != screen.height){\n\t\t$(document).unbind(); // unbi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
execute a command and return the output as a string
function execute(command_line) { var e = WshShell.Exec(command_line); var ret = ""; ret = e.StdOut.ReadAll(); //STDOUT.WriteLine("command " + command_line); //STDOUT.WriteLine(ret); return ret; }
[ "function getCommandOutput(commandText) {\n return new Promise((resolve, reject) => {\n exec(commandText, null, (err, stdout, stderr) => {\n if (err) {\n console.warn(stderr.toString());\n reject(err);\n return;\n }\n resolve(stdout.toString());\n });\n });\n}", "functi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the id (primary key) selector function for an entity type
getIdSelector(entityName) { let idSelector = this.idSelectors[entityName]; if (!idSelector) { idSelector = this.entityDefinitionService.getDefinition(entityName).selectId; this.idSelectors[entityName] = idSelector; } return idSelector; }
[ "function getId(entity) {\n return entity.id;\n}", "getModelIdAttribute(type) {\n return this.model(type).prototype.idAttribute();\n }", "id() {\n const model = internal(this).model;\n return internal(model).entities.id(this);\n }", "function getId(entity) {\n return entity.id;\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a new Souvenir.
constructor() { Souvenir.initialize(this); }
[ "static create() {\n\n\t\treturn new QSParser();\n\t}", "function Virus(player){\n\tthis.player = player;\n\tthis.life = 5;\n}", "function createNewVirus() {\n let xCordinate = (player.x < 400) ? Phaser.Math.Between(400, 800) : Phaser.Math.Between(0, 400);\n let newVirus = viruses.create(xCordinate, 16, \...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
///CLASS ROOM////// /////////////////// class Room. Defines room shape on a given width and height (number of tiles)
function Room(width, height, tileWidth, tileHeight){ //number of tile in width this.width = width; //number of tiles in height this.height = height; //tile width in pixels (default = 80px) this.tileWidth = tileWidth || 80; //tile width in pixels (default = 80px) this.tileHeight = tileHeight || 80; //o...
[ "function Room(width, height) {\n\t\t/*!\n\t\t * \\property const int Room::width\n\t\t * \\public\n\t\t * \\brief The width of this room in cells.\n\t\t */\n\t\tthis.width = width;\n\t\t/*!\n\t\t * \\property const int Room::height\n\t\t * \\public\n\t\t * \\brief The height of this room in cells.\n\t\t */\n\t\tth...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return whether or not an image is marked as deleted.
async deleted(id) { const row = await this._withDb(async (db) => await db.get( 'SELECT deleted FROM images WHERE id = ?', id )); if (row === null) { throw Error(`image ${id} does not exist`); } return row['deleted'] === 1; }
[ "isDeleted() {\n const data = this.getData(false);\n return data ? XObject.IsDeleted(data) : false;\n }", "isDeleted() {\n const dam = this.flags & Flags.DAM_MASK;\n if (this.isDoubleDensity()) {\n return dam === Flags.DAM_DD_F8;\n }\n else {\n return dam !...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Validates that an argument is a valid persistence value. If an invalid type is specified, an error is thrown synchronously.
function _validatePersistenceArgument(auth, persistence) { _assert$3(Object.values(Persistence).includes(persistence), auth, "invalid-persistence-type" /* INVALID_PERSISTENCE */); // Validate if the specified type is supported in the current environment. if ((0,_firebase_util__WEBPACK_IMPORTED_MODULE_3__...
[ "function _validatePersistenceArgument(auth, persistence) {\n _assert$3(Object.values(Persistence).includes(persistence), auth, \"invalid-persistence-type\"\n /* INVALID_PERSISTENCE */\n ); // Validate if the specified type is supported in the current environment.\n\n\n if ((0, _util.isReactNative)()) {\n //...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Prepare params for upload shipment
function prepare_params() { var data = { token: token, lat: latitude, lon: longitude, damage: $('#damage_info').val() }; if(action != undefined && action != '') data.driver_action = action; if( $('#shipment-details-form .damage #checbox').is(':checked') ) { data.damaged = 0; } else { data.damaged = 1;...
[ "function useUpoadParams(params) {\n var $form = $('#pictures-upload');\n \n for (var name in params.policyValues) {\n var value = params.policyValues[name];\n $form.find('[name=\"' + name + '\"]').val(value);\n }\n\n $form.find('[name=\"key\"]').val(params.policyValues.key + '${filenam...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Entry point. data: (Object) Preferrably S3Storage instance. callback: (Function) function(err, signedRequest)
function sign(data, callback) { if (!data.path || !data.method) { return callback(new Error("path and method must be provided for signing.")) } async.waterfall([ prepareData(data), calculateSignature ], function (err, data) { if (err) { callback(err) } else { if (data.header) { ...
[ "function S3(){}", "function storeToS3(env, data, callback){\n callback(new Error(\"Not implemented\"));\n}", "function getSignS3(req, res) {\n const s3 = new aws.S3();\n\n\n\n //Note: fileName uploads the file into the sample folder in te s3 Bucket\n //Consider replacing sample/ with object ID or some ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
FUNCTION: dwscripts.getRecordsetBaseName DESCRIPTION: Get base name for generating unique recordset names. Same as getRecordsetDisplayName(), except the translation (if there is one) doesn't use highascii or doublebyte. ARGUMENTS: none RETURNS: string base name
function dwscripts_getRecordsetBaseName() { // default to Recordset for non-dynamic document types var retVal = MM.LABEL_RecordsetBaseName; var dom = dw.getDocumentDOM(); if (dom) { var baseName = dom.serverModel.getRecordsetBaseName(); if (baseName) { retVal = baseName; } } re...
[ "function dwscripts_getRecordsetDisplayName()\n{\n // default to Recordset for non-dynamic document types\n var retVal = MM.LABEL_TitleRecordset;\n \n var dom = dw.getDocumentDOM();\n if (dom)\n {\n var displayName = dom.serverModel.getRecordsetDisplayName();\n if (displayName)\n {\n retVal = di...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if left button is pressed.
_isLeftButtonPressed(event) { const buttons = event.buttons === 0 || event.which === 1; return event.detail.buttons === 1 || buttons; }
[ "isLeftPressed() {\n return this.currentKeys.get(LEFT);\n }", "isLeftButtonPressed(event) {\n this.isTouchInput = false;\n let button = event.which || event.button;\n return button === 1;\n }", "function isLeftClick(e) {\r\n if (e.touches !== undefined) {\r\n return e.touch...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this simply checks for the lenght of the stack. if it reaches 4 in lengthe then you are a winner.
function checkForWin() { if (stacks["b"].length === 4 || stacks["c"].length === 4) { console.log("You won!"); return true; } else { return false; } }
[ "function checkForWin() {\n if ((stacks.b.length === 4) || (stacks.c.length === 4)) {\n console.log(\"Congratulations! You Won!!!\");\n stacks = {\n a: [4, 3, 2, 1],\n b: [],\n c: []\n };\n return true;\n } else {\n return false;\n };\n}", "function check(stack){\n\n for(let i ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Select a worker, send a message to it
sendToWorker(data) { const worker = this.workers[this.jobNumber % this.workers.length]; this.logger.trace(`sending a message to worker ${worker.id}, jobs in progress - ${this.jobs[worker.id]}`); this.jobNumber += 1; this.jobs[worker.id] += 1; worker.send({ data }); }
[ "send(msg) {\n this.worker.send(msg)\n }", "function sendToWorker(msg) {\n var myWorker = msg[0];\n // Send the message.\n backend.send(msg);\n // Initialise busyWorkers slot object.\n busyWorkers[myWorker] = {};\n // Recall that such message has been sent.\n busyWorkers[myWorker].msg = m...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
end function Utility function to populate an object for local storage containing relevant fields from a CritiqueIt assignment object.
function createCritiqueItCacheObject(critiqueItAssignment) { return { stages: (critiqueItAssignment.stages || null), handRaised: (critiqueItAssignment.handRaised === undefined ? false : critiqueItAssignment.handRaised), isObservationOpen: (critiqueItAssignment.isObservationOpen === undefined ? true : crit...
[ "function ParseJsonToAssignment() {\n if (courseAssignmentData != undefined) {\n courseAssignmentData.forEach((item) => {\n Assignments[item.id] = new Assignment(\n item.id,\n item.name,\n item.description,\n item.points_possible,\n item.html_url\n );\n });\n }\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a JSON object of a droplist input to insert into createForm function.
function droplistInput(labelInput,idInput,options,defaultValInput){ // Exceptions if (typeof labelInput!='string' || typeof idInput!='string'){ throw "droplistInput: labelInput and idInput must both be strings. Received " + (typeof labelInput) + " and " + (typeof idInput) + "."; ...
[ "function createDroplistInputDiv(droplistInputObj){\n // Exceptions\n if (typeof droplistInputObj!='object' || droplistInputObj['objClass']!='Input'){\n throw \"createDroplistInputDiv: droplistInputObj must be an Input object.\";\n }\n if (droplistInputObj['typ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Remove a request and its timeout.
removeRequest(requestObject) { delete this.mempool[requestObject.walletAddress]; clearTimeout(this.timeoutRequests[requestObject.walletAddress]); delete this.timeoutRequests[requestObject.walletAddress]; }
[ "_removeRequest(req) {\n _core__WEBPACK_IMPORTED_MODULE_1__[/* Strophe */ \"e\"].debug(\"removing request\");\n\n for (let i = this._requests.length - 1; i >= 0; i--) {\n if (req === this._requests[i]) {\n this._requests.splice(i, 1);\n }\n } // IE6 fails on setting to null, so set to empt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Watches for changes in media, invalidating layout as necessary.
function watchMedia() { for (var mediaName in $mdConstant.MEDIA) { $mdMedia(mediaName); // initialize $mdMedia.getQuery($mdConstant.MEDIA[mediaName]) .addListener(invalidateLayout); } return $mdMedia.watchResponsiveAttributes( ['md-cols', 'md-row-height', 'md-gutt...
[ "function watchMedia() { // 5503\n for (var mediaName in $mdConstant.MEDIA) { // 5504\n $mdMedia(mediaName); // initialize ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get status state according to the availability Status used by the check availability api.
function getStateByTpAvailabilityStatus(availabilityStatus) { if (availabilityStatus === 'OK') { return 'Available'; } else if (availabilityStatus === 'RQ') { return 'On Request'; } else if (availabilityStatus === 'NO') { return 'Unavailable'; } else { return null; } }
[ "async getAllAvailableStatus() {\n let response = await this.client.get(`${this.baseResource}available-status/`)\n return response.data\n }", "async getAvailableStatus(idCurrentStatus) {\n let response = await this.client.get(`${this.baseResource}available-status?idCurrentStatus=${idCurrentStatus}`)\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
initializes a component initializer with `path` as its initialization arguments assumes component takes a fn, and has an update() method calls cb(null, componentStream) where stream is a stream of components over time
function initializeAndWatch (ComponentInitializer, path) { // make a component on the fn var c; // make a stream of component errors var componentErrorStream = Kefir.stream((emitter) => { c = new ComponentInitializer((err) => { emitter.error(err) }) }) // make a stream of components over t...
[ "openInit(path) {\n\t\treturn initInit(path);\n\t}", "_init_component(config) {\n if (config === undefined) {\n throw `Trying to initialize component from undefined in ${this.get_id()}`;\n }\n\n if (config.id) {\n let dfd = $.Deferred();\n\n if (config instanc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
ParserQuery: An object that wraps a request to the parser for suggestions based on a given query string. Multiple ParserQueries may be in action at a single time; each is independent. A ParserQuery can execute asynchronously, producing a suggestion list that changes over time as the results of network calls come in.
function ParserQuery(parser, queryString, context, maxSuggestions) { this._init.apply(this, arguments); }
[ "parseQuery(query) {\r\n let finalQuery;\r\n if (typeof query === \"string\") {\r\n finalQuery = { Querytext: query };\r\n }\r\n else if (query.toSearchQuery) {\r\n finalQuery = query.toSearchQuery();\r\n }\r\n else {\r\n finalQuery = query;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This function fixes the orders formulas after the adding or deleting of a vendor
function fix_orders_formulas() { var formulas , formula var key, j formulas = [] for (key in orders) { formulas.push("") formulas.push("=" + get_col_lett(vendors_orig[key]) + master_row + "*" + get_col_lett(orders[key]) + master_row ) formula = "" formula += "=IFERROR(($" + get_col_lett(...
[ "updateTotals(){\r\n\t\tvar rows = document.getElementById('orderDetailsBody')['rows'], subTotal=0, freight, x, grandTotal;\r\n\t\t//console.log(rows[0]['cells'][4].innerText);\r\n\t\t//console.log(rows[0]['cells'][1]['children'][0]['value']);\t\t//Unit Price\r\n\t\t//console.log(rows[0]['cells'][2]['children'][0][...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The inputs of this function component allow you to send all the necessary information from higher levels of the code. This allows the reuse of this component, without repeating code. Name: CardCmp This function render a card the blog post
function CardCmp({ alt_comment, image, title, content2, img_author, name, date, }) { const classes = useStyles(); return ( <Grid item xs={12} sm={6} md={4}> <Card className={classes.card}> <CardActionArea> <CardMedia className={classes.media} component="img" ...
[ "function cardComp (headline, authorPhoto, authorName) {\n const card= document.createElement('div')\n card.classList.add('card')\n\n card.appendChild(headlineComp(headline))\n card.appendChild(authorComp(authorPhoto, authorName))\n \n return card\n}", "function getCard(Card,functions,Data){\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets an iterator for the Stack
[Symbol.iterator]() { return stack[Symbol.iterator](); }
[ "function iterator (stack) {\n return function () {\n var results\n var len = stack.length\n var i = 0\n\n while (len--) {\n var fn = stack[i++]\n var args = i === 1 ? arguments : [results]\n results = fn.apply(this, args)\n }\n return results\n }\n}", "function iterator() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new input plug for this node and attaches it. Returns the newly created plug. name The name of the new plug. Defaults to an empty string. type The type of the plug. Defaults to null. See NodeGraph.Plug for for information.
addInput(name = '', type = null) { let plug = new NodeGraph.Plug(this, true, name, type); this.inputPlugs.push(plug); this.tree.repaint = true; return plug; }
[ "addOutput(name = '', type = null)\n\t{\n\t\tlet plug = new NodeGraph.Plug(this, false, name, type);\n\t\tthis.outputPlugs.push(plug);\n\n\t\tthis.tree.repaint = true;\n\n\t\treturn plug;\n\t}", "addUi(type, element) {\n let plugin = {\n el: element,\n id: nextPluginId++,\n };\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
builds batch grid item that is placed with grid cell
function buildGridBatchItem ( batch ) { console.debug("building grid item for batch: %O", batch); var tmp = BATCH_GRID_TEMPLATE.replace("__batchname__", batch.coursename); var cont = $(tmp); /* attach batch id */ cont.attr('data-target', batch.id); /* attach style class */ cont.addClass('gr...
[ "function buildGrid(grid) {\n\tvar $ret = $('<div>');\n\tvar parts = [ 'source', 'input', 'implant', 'output', 'target'];\n\tfor (var y = 0; y < grid.length; y++) {\n\t\tvar item = grid[y];\n\t\tvar $row = $('<div>').addClass('row');\t\t\n\t\tfor (var x = 0; x < parts.length; x++) {\n\t\t\tvar part = parts[x];\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes "undefined" and null entries in the array
function cleanArray(arr) { var len = arr.length, i; for (i = 0; i < len; i++) { if (arr[i] && typeof arr[i] != "undefined") { arr.push(arr[i]); // copy non-empty values to the end of the array } } arr.splice(0, len); // cut the array and leave only the non-empty values r...
[ "function array_remove_undefined(arr) {\n var undef;\n arr=arr.concat([]);\n\n for(var i=0; i<arr.length; i++) {\n if((arr[i]===undef)||(arr[i]===null)) {\n arr=array_remove(arr, i);\n i--;\n }\n }\n\n return arr;\n}", "function clean(arr) {\n return arr.filter(value => value !== null && val...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The untyped version of [[this.allows]] and support references a policy.action via string. Added mainly to be used inside the templates. For example: ``` bouncer.can('PostPolicy.update', post) ```
async can(policyOrAction, ...args) { if (!policyOrAction) { throw new utils_1.Exception('The "can" method expects action name as the first argument'); } const { action, policy, authorizer, args: parsedArgs, } = this.parseAbilityArguments(policyOrAction, args); return policy ...
[ "function allow(action) {\n return policyService.allow('action', action, context);\n }", "function allow(action) {\n return policyService.allow('action', action, context);\n }", "async cannot(policyOrAction, ...args) {\n if (!policyOrAct...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Parse webmentions for individual category
function parseMentions(webmentions, mentionType) { let filteredMentions = [] webmentions.forEach(function(mention){ if (mention["wm-property"] == mentionType) { filteredMentions.push(mention) } }); return filteredMentions; }
[ "function getCategory(category_name) {\n\tlet start_tag = `#${category_name}:\\n`;\n\tlet end_tag = '\\n#end';\n\treturn getTextBetweenTags(data, start_tag, end_tag).split('\\n');\n}", "extractCategories() {\r\n return Array.from(\r\n this._page.getElementById(\"catlinks\").getElementsByTagName(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function:pushRegister() Description: function is used to register device to receive push Notifications. Author: Kony
function pushRegister() { var devName = kony.os.deviceInfo().name; if (devName == "android") { callbackAndroidSetCallbacks(); callbackAndroidRegister(); } else if (devName == "iPhone") { remoteNotCallbacks(); callbackiPhoneRegister(); } else if (devName == "blackberry") {...
[ "function registerPush(){\n var config = null;\n if (ionic.Platform.isAndroid()) {\n config = {\n \"senderID\": \"481621065886\" //GCM Project Number\n };\n }\n else if (ionic.Platform.isIOS()) {\n config = {\n \"badge\": \"true\",\n \"sound\": \"true\",\n \"al...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
fetchAll creates a channel for ipcMain to listen to the fetch all invoices event and replies with all the rendered html of the fetched invoices
initFetchAll() { const listenChannel = 'fetch-all-invoices-channel'; const replyChannel = 'fetch-all-invoices-reply-channel'; this.ipcMain.on(listenChannel, (event, _) => { try { this.invoiceService.fetchAllInvoices() .then(invoiceDTOs => { ...
[ "fetchAll(args){\n NotificationService.setIsLoading(true);\n return new Promise((resolve, reject) => {\n SuperAgentService.fetchPage('/products', args).then(response => {\n if (response.body.success) {\n NotificationService.setIsLoading(false);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Element Processing / Element processing consists of three parts data processing that cannot go stale and data processing that can go stale (i.e. thirdparty style modifications): 1) PreQueueing: Elementwide variables, including the element's data storage, are instantiated. Call options are prepared. If triggered, the St...
function processElement(element, elementArrayIndex) { /************************* Part I: Pre-Queueing *************************/ /*************************** Element-Wide Variables ***************************/ var /* The runtime opts object is the extension of the current ca...
[ "function processElement(element, elementArrayIndex) {\r\n\r\n\t\t\t\t\t/*************************\r\n\t\t\t\t\t Part I: Pre-Queueing\r\n\t\t\t\t\t *************************/\r\n\r\n\t\t\t\t\t/***************************\r\n\t\t\t\t\t Element-Wide Variables\r\n\t\t\t\t\t ***************************/\r\n\r\n\t\t\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets language "no" if no other language specified in AsyncStorage
async setAppLanguage() { this.props.actions.getLanguage().then((lang) => { if (lang !== undefined && typeof lang.value === 'string') { this.props.actions.setContentStrings(lang.value); this.props.actions.setLanguage(lang.value); } else { this.props.actions.setContentStrings("no")...
[ "setLanguageToStorage() {\n let language = this.decideWhatLanguageWillUse();\n this.set(this.storageKey, language.lang);\n this.set(this.langObjectKey , language.langObject , true)\n }", "_setSavedLanguage(lang) {\n if (!lang) return;\n window.localStorage.setItem(this._localStorageKey, lang);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a child element containing a text node with value textValue. The child element is appended to elem.
function appendTextElement(doc, elem, childElemName, textValue) { var child = doc.createElement(childElemName); child.appendChild(doc.createTextNode(textValue)); elem.appendChild(child); }
[ "function createTextElement(elementType, elementValue, parent, className) {\n element = document.createElement(elementType);\n value = document.createTextNode(elementValue);\n if (className != undefined) {\n element.className = className;\n }\n\n element.appendChild(value);\n parent.appendC...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Once the user is created do a separate post to the zebedee API to set the password.
function setPassword() { postPassword( success = function () { console.log('Password set'); setPermissions(); }, error = null, email, password); }
[ "function setPassword (user, cb) {\n \n}", "function set_user_password(env, password) {\n env.auth.user.password = { plaintext: password };\n}", "function set_new_user_password(env, password) {\n init_new_user_storage(env);\n env.auth.new_user.password = { plaintext: password };\n}", "updateUserPassword...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Bulk domain, reset ui counters
function resetUiCounters(event) { //var send = event.sender.send; debug("Resetting bulk whois UI counters"); var startingValue = 0; var defaultValue = '-'; event.sender.send('bulkwhois:status.update', 'start'); // Domains event.sender.send('bulkwhois:status.update', 'domains.total', startingValue); e...
[ "function resetAllCounters() {\n offsetCounter = 0;\n resetPageCounter();\n }", "resetDomains() {\n this.$rootScope.$broadcast(this.events.tabDomainsRefresh);\n }", "_resetStyleDomains() {}", "function resetUI() {\n\tshow(ui_icon);\n\tshow(ui_domain);\n\tshow(ui_state);\n\n\thide(ui_subdoma...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
crew availability visualization filter function
function filterCrewAvail(){ // get current selected parameters from DOM <select> elements let baseSelection = $("#baseSelect option:selected").text(); let crewSelection = $("#crewTypeSelect option:selected").text(); // case: all bases and all crew types ...
[ "function filterAccommodation() {\r\n let guests = noOfGuestsEl.text();\r\n let nights = noOfNightsEl.val();\r\n let filteredAccommodation = filterByGuests(accomData.accommodation, guests);\r\n filteredAccommodation = filterByNights(filteredAccommodation, nights);\r\n displayAccom(filteredAccommodati...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
FUNCION QUE MUESTRA TODOS LOS MENSAJES ENVIADOS
function verTodosMensajes() { borrarMarca(); borrarMarcaCalendario(); let contenedor = document.createElement("div"); contenedor.setAttribute('class', 'container-fluid'); contenedor.setAttribute('id', 'prueba'); let titulo = document.createElement("h1"); titulo.setAttribute('class', 'h3 mb...
[ "function marcar_Filme_Visto(nome_e_Titulo) {\n\n // Encontra id do espectador e do filme\n const id_Do_Espectador = db('espectadores')\n .select('id')\n .where({ 'nome': nome_e_Titulo['nome'] });\n\n const id_Do_Filme = db('filmes')\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sends grid contents to server to be opened in Excel as CSV.
function sendGridToServerAsExcelCsv(grid, url, dispType) { ourl = url; odispType = dispType; formatGridAsCsvOrHtml(grid, 0, "CSV"); }
[ "function sendGridToServerAsExcelHtml(grid, url, dispType) {\r\n ourl = url;\r\n odispType = dispType;\r\n formatGridAsCsvOrHtml(grid, 0, \"HTML\");\r\n}", "function saveGridAsExcelCsv(gridId, dispType, fullExport) {\r\n showProcessingImgIndicator();\r\n if (fullExport) {\r\n isFullyExport =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
looks up the friend documents from a list of friend id's
function getFriendDocs(db){ return function(req, res, next){ // get our people collection var people = db.collection('people'); var stream = people.find({'_id': {'$in': req.friends}}).stream(); // build up our response req.response = new Array(); stream.on('data', function(doc){ var...
[ "findFriends(userId,name,callback){\n /*Search all 3 user types*/\n this.Model.User.findOne({'_id' : userId} , function(err,user){\n\n /*If there is any error, throw it */\n if (err){\n throw err;\n }\n\n /*Info to send back to client*/\n var foundUsers = [];\n\n /*Check i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Parses comma separated list of numbers and returns them an array. Used internally by the TextParser
function parseNumberArray(value) { var array = value.split(',').map(function (val) { return parseFloat(val); }); return array; }
[ "function parseNumberArray(value) {\n\n\t\tvar array = value.split(',').map(function (val) {\n\n\t\t\treturn parseFloat(val);\n\t\t});\n\n\t\treturn array;\n\t}", "function parseNumberArray(value) {\n\n\tvar array = value.split(',').map(function (val) {\n\n\t\treturn parseFloat(val);\n\n\t});\n\n\treturn array;\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
clear the cached book after editing
function flushBook() { book = null; }
[ "function closeEdit () {\n vm.cache = {};\n saveEdit();\n }", "function clearBooks() {\n books = [];\n}", "function clearEdits(){\n\n}", "function clearCache () {\n\n var cachedObject = $cacheFactory.get('$http');\n\n cachedObject.remove('api/books');\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add and remove tags, according to selected/unselected options. Update the menu page
function updateTags(){ // Add a tag to the selected restaurants options $( "select option:selected.restos" ).each(function() { let restaurant = $(this).text(); let restaurantID = $(this).val(); if(!$("#tag-"+restaurantID).length){ $(".filterTags").append('<a href="javascri...
[ "function refreshLinkAndTagCategories() {\n // [Categories for top Links]\n // We will populate the select menu and add a change handler\n const $optionTopLinks = $(\"#tag-option-top-links\")\n .empty()\n .append($(\"<option value='none'>None</option>\"));\n\n const currentTopLinks = uiTag.get...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }