query
stringlengths
9
34k
document
stringlengths
8
5.39M
negatives
listlengths
19
20
metadata
dict
POST API function. This function assigns a new Nodes obj with the server req for db insertion. Currently, Nodes recieves req.body from API call. Once vetted it saves the new entry into the db and returns res with json inputed into the db.
function addnewNode(req, res) { let newNode = new Nodes(req.body) newNode.save((err, data) => { if (err) { res.send(err) } res.json(data) console.log('Entry successfully created') update.emit('update') }) }
[ "async postNodesInfo(options) {\n const values = [];\n // contract_address, chain_id, api_ip, api_domain, rpc_ip, rpc_domain, token_name, owner, status\n const keys = [];\n // eslint-disable-next-line no-unused-vars\n for (const each in options) {\n values.push(options[each]);\n keys.push(e...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
record start time of conversation with wizard
function userInfoStartWizardConversation(id) { userInfoMap[id].conversationTiming.push({start: +new Date(), end: undefined}); }
[ "function recordStartTime () {\n\t this._startAt = process.hrtime()\n\t this._startTime = new Date()\n\t}", "function recordStartTime() {\n\tthis._startAt = process.hrtime()\n\tthis._startTime = new Date()\n}", "function recordStartTime() {\n\t this._startAt = process.hrtime()\n\t this._startTime = new Date...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Saves one or more items to the indicated table. Items argument can be a single object or an array of objects. Object properties will be mapped to table columns. Object properties must be a storable type: number, string, date, boolean, or array of storable types (such as an array of strings). Numbers will be mapped to d...
function save(table, items, callback, error_callback) { retrieveSchema(table, items, function(schema) { if ($.isArray(items)) { if (items.length == 0) { // nothing to save callback(); } else { db.transaction(function(tx) { // Iteratively save all items...
[ "function putItem(items_array) {\n var tableName = process.env.TABLE_NAME; // [ProjectName]-Books\n var params = {\n RequestItems: { \n [tableName]: items_array\n }\n };\n var batchWritePromise = documentClient.batchWrite(params).promise();\n batchWritePromise.then(function(data) {\n console.log(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function to disable/enable a button given its ID btnId : ID of the button isDisable : (boolean) true > disable, false > enable
function disableButton(btnId, isDisable) { if (btnId && isDisable !== null) { btnId.disabled = isDisable; } }
[ "function disableButton(btnId, isDisable) {\n console.debug(btnId + 'element disable = ' + isDisable);\n if (btnId && isDisable !== null) {\n btnId.disabled = isDisable;\n }\n}", "function btnEnabled(btn) {\n console.log(\"btnEnabled() --> \" + btn.id);\n if (btn.id == \"Btn_Start\") {\n btn.st...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Configure the data that will be printed in the centroid and the text of the bar (Label only)
async setConfigCentroid(titulo, tituloGrau, textoBarra) { this._cfgIndexAttr.titleCentroid = titulo; this._cfgIndexAttr.titleDegree = tituloGrau; this._cfgIndexAttr.textBar = textoBarra; }
[ "drawLabels() {\n this.base.append('text')\n .text((d, i) => { return this.pfBar.chart.data.labels[i]; })\n .attr('height', this.pfBar.barThickness)\n .attr('transform', 'translate(60,0)')\n .attr('x', (d, i) => { return this.barX(i) + '%'; })\n .attr('y', this.pfBar.chartHeigh...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Remove a service instance from the cache, so we will create a new instance for this service when people try to get it again. NOTE: currently only firestore uses this functionality to support firestore shutdown.
_removeServiceInstance(name, instanceIdentifier = _firebase_app__WEBPACK_IMPORTED_MODULE_2__._DEFAULT_ENTRY_NAME) { this._delegate.container // eslint-disable-next-line @typescript-eslint/no-explicit-any .getProvider(name) .clearInstance(instanceIdentifier); }
[ "removeService(sid) {\n this.props.firebase.services().child(sid).remove();\n }", "_removeServiceInstance(name, instanceIdentifier = _firebase_app__WEBPACK_IMPORTED_MODULE_2__[\"_DEFAULT_ENTRY_NAME\"]) {\n this._delegate.container\n // eslint-disable-next-line @typescript-eslint/no-explicit-...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Disable the chips in the dialog based on whether they have the remaining space available Must be called in a mutate context.
toggleDeviceChipsWithSpaceAvailable_() { const allChips = this.currentDialog_.querySelectorAll( '.i-amphtml-story-dev-tools-device-chip' ); const currentDeviceSpaces = this.getCurrentSpacesSum_(); allChips.forEach((chipEl) => { const spaces = parseInt(chipEl.getAttribute('data-spaces'), 10);...
[ "disableEmbargoAndLease() {\n this.disableVisibilityOptions([\"embargo\",\"lease\"])\n }", "_syncChipsState() {\n if (this._chips) {\n this._chips.forEach(chip => {\n chip.disabled = this._disabled;\n chip._changeDetectorRef.markForCheck();\n });\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This file contains functions for determining if a ray has intersected an object in the scene. sources: sources: My changes: Modified, to account for the use of kdTree Encapsulates original function, but gives the function a list of objects instead Search for collsion with kd tree first intersectObjectList is given a sh...
function intersectObjectList(ray, list, full_list, length){ // The base case is that it hits nothing, and travels for `Infinity` var closest = [Infinity, null]; // But for each object, we check whether it has any intersection, // and compare that intersection - is it closer than `Infinity` at first, ...
[ "RayIntersects(ray) { // returns boolean\n let edge1 = this.vertex2.sub(this.vertex1)\n let edge2 = this.vertex3.sub(this.vertex1)\n let h = ray.direction.cross(edge2)\n let a = edge1.dot(h)\n if (a > -0.00001 && a < 0.00001) {\n return false\n }\n let f =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the new shape of the input Tensor after it's been reshaped to: [blockShape[0], ..., blockShape[M1], batch / prod(blockShape), inputShape[1], ..., inputShape[N1]] See step 1:
function getReshaped(inputShape, blockShape, prod, batchToSpace) { if (batchToSpace === void 0) { batchToSpace = true; } var reshaped = []; if (batchToSpace) { reshaped = reshaped.concat(blockShape.slice(0)); reshaped.push(inputShape[0] / prod); reshaped = reshaped.concat(inputShape....
[ "computeOutputShape(inputShape) {\n const inputShapes = _utils_types_utils__WEBPACK_IMPORTED_MODULE_6__[\"normalizeShapeList\"](inputShape);\n if (inputShapes.length !== this.inputLayers.length) {\n throw new _errors__WEBPACK_IMPORTED_MODULE_2__[\"ValueError\"](`Invalid inputShape argument ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setting Default Values for Functions
function setDefaults(fn) { var defaults = slice(arguments, 1); return function() { var args = slice(arguments), i = args.length; for (args = args.concat(slice(defaults, i)); i--;) { if (args[i] === undefined) { args[i] = defaults[i]; } } return fn.apply...
[ "function defaultValues(){\n\tbluValue=0;\n\thueRValue=0;\n\tinvtValue=0;\n\tbrightnValue=1;\n\tsepiValue=0;\n\tgraysaValue=0;\n\topaciValue=1;\n\tsatuvalue=1;\n\tcontrstValue=1;\n}", "function setDefaults() {\n numValue = null;\n numValue2 = null;\n operatorValue = null;\n displayValue = '';\n}", "...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
drawing geochart (awaits for the fetch that occurs in getAnimal())
async function drawRegionsMap() { const animal_data = await getAnimal(); const range = animal_data[4]; //changes the state of the antarctica if (range[0] == "Antarctica") { ipc.send("antarctica_changed", true); } data = google.visualization.arrayToDataTable(default_map_data); //adds 1 to a...
[ "function drawAchaMap() {\n ncCongressReps.results.forEach(function(rep){\n conReps[rep.district] = {\n \"party\": rep.party,\n \"fullName\": rep.first_name + \" \" + rep.last_name,\n \"gender\": rep.gender,\n \"title\": rep.gender == \"M\" ? \"Congressman\":\"C...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add 'px' value in case it is needed for that css prop
function maybeAddPx (name, value) { return (typeof value === 'number' && !cssNumber[$.hyphenate(name)]) ? value + 'px' : value; }
[ "function addPx(cssValue){\n // Remove any existing 'px' so that you can sanitize any value without worrying\n var strippedPx = cssValue.toString().split('px')[0];\n return strippedPx + \"px\";\n}", "function csspx(elem, prop) {\n return 1 * $(elem).css(prop).replace(/px$/, '');\n}", "function noPxSty...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get Lesson By VideoId
function GetLessonByVideoId(vid) { return $resource(_URLS.BASE_API + 'lesson/by_video/' + vid + _URLS.TOKEN_API + $localStorage.token).get().$promise; }
[ "function GetLessonByVideoId(vid) {\n //console.log(vid);\n return $resource(_URLS.BASE_API + 'lesson/by_video/' + vid + _URLS.TOKEN_API + $localStorage.token).get().$promise;\n }", "async function getVideo({videoId}) {\n return await videos.findOne({_id: ObjectID(videoId)})\n }",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Necessary javascript for math_editor
function math_editor() { generateMathPanel('math-equation-menu', 1, 5, 5, 48, 20, -46, 0, 0, 0); generateMathPanel('math-equation-1', 6, 7, 40, 20, 20, -18, 0, 0, -30); generateMathPanel('math-equation-2', 5, 7, 33, 20, 20, -18, 0, 0, -50); generateMathPanel('math-equation-3', 3, 7, 21, 20, 20, -18, 0, ...
[ "function customJavaScript() {}", "function addEquation() {\n\n //Focus on editor, insert line\n document.getElementById('editor').focus();\n var tag = document.getElementById('editor');\n\n //Create new math block element\n const mathBlock = new MathfieldElement();\n\n /...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Explodes data pixel array to larger resolution.
function explodeImage(data, w, h, targetw, targeth) { var wfac = Math.floor(targetw / w); var vfac = Math.floor(targeth / h); var imgdata = new ImageData(targetw, Math.floor(targeth)); for (var i = 0; i < data.length; i+=4) { var R = data[i + 0]; var G = data[i + 1]; var B = data[i + 2]; var A =...
[ "function emboss() {\n var canvas = this.parms[1].getCanvas();\n var ctx = canvas.getContext('2d');\n var imgData = ctx.getImageData(0, 0, canvas.width, canvas.height);\n var pixels = imgData.data;\n var width = imgData.width;\n\n for (var i=0; i < pixels.length; i ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This is called when the user clicks the "remove paragraph" button.
function removeParagraph() { // Get the div with the paragraphs const div = document.querySelector(".paragraphContainer"); // Get the last paragraph in there // NOTE See how we can use querySelector on nodes to only search those nodes' children! const p = div.querySelector("p:last-child"); //...
[ "function removeAPara(){\n $ ('#randPara p:last').remove();\n}", "function remove_paragraph(class_name) {\n $('p').removeClass(class_name)\n $('p').remove()\n }", "function removeAPara(){\n $('#randPara p:last').remove();\n}", "function remParagraph(){\r\n\tvar lastP = paraDiv.lastEleme...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Randomly assign players to the roles
function randomlyAssign() { var roles = _.cloneDeep(gameState.roles); _.each(gameState.playerNames, function(playerName) { var role = roles.splice(_.random(roles.length - 1), 1)[0]; var player = { alive: true, name: playerName, role: role, inCult: rol...
[ "assignRoles() {\n const available = roles[this.players.length];\n\n shuffle(available);\n\n this.players.forEach((player, i) => {\n player.role = available[i];\n });\n }", "assignRoles() {\n\t\tthis.PLAYER_1 = (Math.random() > 0.5 ? this.players[0] : this.players[1]);\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
draws a directed piece of the pie with an arrowhead, starts at 0 angle, only draws in one direction (use transforms to move it around the )
function drawDirectedPiePiece(_ref) { var _ref$tailThickness = _ref.tailThickness, tailThickness = _ref$tailThickness === undefined ? 0.6 : _ref$tailThickness, _ref$arrowheadLength = _ref.arrowheadLength, arrowheadLength = _ref$arrowheadLength === undefined ? 1 : _ref$arrowheadLength, radius =...
[ "function drawArrow(x, y, angle, legLength = 10) {\n push();\n translate(x, y);\n rotate(radians(90));\n rotate(radians(angle));\n push();\n rotate(radians(45));\n line(0, 0, legLength, 0);\n pop();\n push();\n rotate(radians(135));\n line(0, 0, legLength, 0);\n pop();\n pop()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
input: none! output: outputs a UUID string value UUID: type of identifier often used to uniquely identify items, even when created on diff. server or by diff. app w/out synchonization, two or more comp. systems can create new items and label them w/ a UUID no significant risk of stepping on each other's toes done thru ...
function generateUUID() { let chars = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, "a", "b", "c", "d", "e", "f"]; // represents the num of chars in each section let sections = [8, 4, 4, 4, 12]; let uuid = ""; sections.forEach((section, sectionIdx) => { for (let i = 0; i < section; i++) { let randomIdx = Math.flo...
[ "function getUUID() {\n let randomNumbers = [];\n while (randomNumbers.length < 32) {\n let hexaNum = Math.floor(Math.random() * 16);\n randomNumbers.push(hexaNum);\n }\n let hexaArray = randomNumbers.map((num) => {\n if (num >= 0 && num <= 9) {\n return num;\n } else {\n return num.toStri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Format a subPath, return its plain form if it is a literal string or number. Otherwise prepend the dynamic indicator ().
function formatSubPath(path) { var trimmed = path.trim(); // invalid leading 0 if (path.charAt(0) === '0' && isNaN(path)) {return false;} return isLiteral(trimmed) ? stripQuotes(trimmed) : '*' + trimmed; }
[ "function formatSubPath(path){var trimmed=path.trim();// invalid leading 0\nif(path.charAt(0)==='0'&&isNaN(path)){return false;}return isLiteral(trimmed)?stripQuotes(trimmed):'*'+trimmed;}", "function formatSubPath (path) {\n var trimmed = path.trim();\n // invalid leading 0\n if (path.charAt(0) === '0' ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the one and two dimensional distance on the point object
function setDistance(p1, p2) { var x = (defined(p1[kdX]) && defined(p2[kdX])) ? Math.pow(p1[kdX] - p2[kdX], 2) : null, y = (defined(p1[kdY]) && defined(p2[kdY])) ? Math.pow(p1[kdY] - p2[kdY], 2) : null, r = (x || 0) + (y || 0); p2.dist = defined(r) ? Math.sqrt(r) : Number.MAX_VALUE; p2.distX = de...
[ "function setDistance(p1, p2) {\n\t\t\tvar x = (defined(p1[kdX]) && defined(p2[kdX])) ? Math.pow(p1[kdX] - p2[kdX], 2) : null,\n\t\t\t\ty = (defined(p1[kdY]) && defined(p2[kdY])) ? Math.pow(p1[kdY] - p2[kdY], 2) : null,\n\t\t\t\tr = (x || 0) + (y || 0);\n\n\t\t\tp2.dist = defined(r) ? Math.sqrt(r) : Number.MAX_VALU...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Override to iterate docked Toolbars in the correct order around contained widgets.
eachWidget(fn, deep = true) { const me = this, widgets = me.items ? me.items.slice() : []; if (me.tools) { widgets.unshift(...Object.values(me.tools)); } if (me.tbar) { widgets.unshift(me.tbar); } if (me.bbar) { widgets.push(me.bbar); } for (let i = 0; i < widge...
[ "closeAll() {\n // Make a copy of all the widget in the dock panel (using `toArray()`)\n // before removing them because removing them while iterating through them\n // modifies the underlying data of the iterator.\n algorithm_1.toArray(this._dockPanel.widgets()).forEach(widget => widget...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a new range as the relative complement of r. All parts that overlap with r are removed ( not cut ).
exclude(r) { r = cobalt.range(r); // make sure r has only nonconsecutive, nonoverlapping singlerange subranges, ordered var ri = 0; var si = 0; var result = this.ranges.slice().filter(function(CobaltSingleRange) { return CobaltSingleRange.start!=CobaltSingleRange.end; ...
[ "subtractRanges(ranges) {\r\n let idx1 = 0;\r\n const newRanges = this.ranges.filter((r) => {\r\n let idx = ranges.ranges.indexOf(r, idx1);\r\n if (idx != -1) {\r\n idx1 = idx; // take advantage of the fact the ranges are sorted\r\n return false; // ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
returns an array of N empty arrays
arrays(count) { let arr = []; for (let i=0; i<count; i++) { arr.push([]); } return arr; }
[ "function createEmptyArr(n) {\n for (let i = 0; i < n; i++) {\n let arrTmp = [];\n arrTmp.length = n;\n arr.push(arrTmp);\n }\n}", "function createResult (n) {\n let arr = [];\n for (let i=0; i<n; i++) {\n arr.push([]);\n }\n return arr;\n}", "function createEmptyArray() {\n}",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This function takes ProductType as an argument and accordingly enable/disable, hide/show fields on the LineItem screen
function toggleLineItemType(type){ resetonnClickofReservable(); if(type == 'R'){ $("#sosSalesTargetId","#lineItemfieldsContainer").multiselect().multiselectfilter("destroy"); $("#sosSalesTargetId","#lineItemfieldsContainer").multiselect("destroy"); $("#sosSalesTargetId","#lineItemfieldsContainer").removeAt...
[ "function productTypeChanged(selectType) {\n var selectedProductType = productBaseTypeMap[selectType];\n var label = \"\";\n if (selectedProductType == TEMPLATE_BASED) {\n label = i18n.label.products.Templates;\n } else if (selectedProductType == ISO_BASED) {\n label = i18n.label.products.ISOs;\n }\n $(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Links the columns if DB table creation isn't to be called.
linkColumns() { for (const name in this.columns) { if (this.columns.hasOwnProperty(name)) { const element = this.columns[name]; if(typeof element === "object") dbIndependentColumnOpts(this, element.type, name, element); else if(elem...
[ "static get columnsUrl() { return \"http://www.justanotherpi.com/SQLWrapper/columns.php\"; }", "function ColumnMeta() {}", "onLink() {\n\t\tconst model = this.root.model;\n\t\tconst data = model.data;\n\t\tconst generation = this.columnListGeneration;\n\t\tif (generation) {\n\t\t\tmodel.dataChanged.watch(e => {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
spaghetti against the wall func to stop event propagation/ default behavior.
static stopEvent(evt) { evt.preventDefault(); evt.stopPropagation(); }
[ "function stopPropagation(e){e.stopPropagation();}", "function stop_default(ev) {\n ev.preventDefault();\n ev.stopPropagation();\n }", "removePropagation() {\n // Leave this to the scope of the subcircuit. Do nothing.\n }", "function xStopPropagation(evt)\r\n{\r\n if (evt && evt.st...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a boolean indicating if another entity has takes on higher preference compared to the current partner.
changePartnerFor(entity) { if (this.partner == null) return true; let partnerIndex = this.parent.getIndexByName(this.partner.name); let otherIndex = this.parent.getIndexByName(entity.name); if (this.preferences.indexOf(partnerIndex) > this.preferences.indexOf(otherIndex)) { r...
[ "greater(otherHand) {\n if (this.value > otherHand.value) {\n return true;\n } else if (this.value === otherHand.value) {\n return this.suit > otherHand.suit;\n }\n return false;\n }", "function isHigherPriorityState() {\n var options = ISessionScript.getOptions();\n var value = options.g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get CSS classNames for Result example
getResultClassesNames() { var classNames = 'article__resultContainer'; if (!this.state.showResult) { classNames += ' article__resultContainer--hidden'; } return classNames; }
[ "getCSSClassesNames() {\n var classNames = 'article__textarea article__textarea--style';\n switch (this.state.cssCheck) {\n case 'OK':\n classNames += ' article__textarea--correct';\n break;\n case 'KO':\n classNames += ' article__textarea--wrong';\n break;\n default...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Inlines the contents of the stylesheet returned by the link tag's href URL into a style tag and removes the link tag.
_inlineStylesheet(cssLink) { return __awaiter(this, void 0, void 0, function* () { const stylesheetHref = dom5.getAttribute(cssLink, 'href'); const resolvedImportUrl = this.bundler.analyzer.urlResolver.resolve(this.assignedBundle.url, stylesheetHref); if (resolvedImportUrl ==...
[ "function remove_stylesheet_tags() {\n // We can remove the style tag with impunity, it is always inlining.\n html = html.replace(/<style.+?<\\/style>/g, \"\");\n\n // External style resources use the link tag, check again for externals.\n if (options.clean_stylesheets) {\n html = html.re...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Does a key with the given ID exist?
function keyExists(keyid) { "use strict"; return nPathV.existsSync(config.getAikDir()) && nPathV.existsSync(getKeyPath(keyid)); }
[ "exists(id) {\n return this.entries.hasOwnProperty(id);\n }", "hasKey(key) {\n return this.id2Value[key.id] != null;\n }", "function hasIdentifier(key, id) {\n // Remove unique ID\n key = key.split(\".\")[0];\n var identifiers = key.split(\"#\");\n\n for(var i = 1; i < identifier...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Muestra el objeto con la propiedad del display param: theObject (objeto): Elemento a mostrar.
function showObject(theObject){ if (theObject != null){ if (theObject.style != null && theObject.style.display != null){ theObject.style.display = "block"; } } }
[ "function show(obj) {\n\tvar theObj = getObject(obj)\n\ttheObj.visibility = \"visible\"\n}", "function func (){\n var element = document.getElementById('display_pane');\n element.innerHTML = printObj(object);\n }", "function showObject(obj) {\r\n\trunHook(\"showObject\", FBEFORE);\r\n\r\n\tvar theObj=(olNs4 ?...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
FUNCTION: displayHelp DESCRIPTION: Displays the builtin Dreamweaver help. ARGUMENTS: none RETURNS: nothing
function displayHelp() { // Replace the following call if you are modifying this file for your own use. dwscripts.displayDWHelp(HELP_DOC); }
[ "function displayHelp() {\n\tdwscripts.displayDWHelp(HELP_DOC);\n}", "function displayHelp() {\n dwscripts.displayDWHelp(HELP_DOC);\n}", "function displayHelp() {\n dwscripts.displayDWHelp(MM.HELP_bcPanel);\n}", "function displayHelp() {\n ICEUtils.displayHelp(helpID);\n}", "function cmd_Help() {\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check and see if query is a standard query. If so, retrieve its columns.
findColumns(query=this.props.query) { const queryObj = this.findMatchingHalinQuery(query); const columns = queryObj ? queryObj.columns : null; // If columns cannot be found, just use the display property. return columns ? columns : [ { Header: this.state.displayProperty, acc...
[ "function prepareQueryForMetadata() {\n\tvar select = 'SELECT \\\"COLUMN_NAME\\\"';\n\tvar from = ' FROM \\\"SYS\\\".\\\"CONSTRAINTS\\\"';\n\tvar where = ' WHERE \\\"SCHEMA_NAME\\\" = ? AND \\\"TABLE_NAME\\\" = ?';\n\tvar orderby = ' ORDER BY \\\"COLUMN_NAME\\\"';\n\tvar query = select + from + where + orderby;\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Copies a dotdelimited name from source to destination
static copyField(source, destination, name) { const parentNames = name.split("."); const fieldName = parentNames.pop(); let sourceParent = source; let destinationParent = destination; for (let parentName of parentNames) { if (!sourceParent.hasOwnProperty(parentName)) { return; } ...
[ "function copyName(src, dst) {\n type_util_1.setFunctionName(dst, query_1.getNameOrEmptyString(src));\n return dst;\n}", "function removeLeadingDot(dotName)\r\n{\r\n var index = dotName.indexOf(\".\");\r\n if (0 != index)\r\n return dotName;\r\n \r\n var resName = dotName.substr(1);\r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the first and last value in a sequential class (bucket) Returns null if bucket is empty i: an index into the array of sorted numbers, at or before the first number in the bucket
function getClassRange(ascending, geBound, ltBound, i) { var n = ascending.length; var rangeStart = -1, rangeEnd = -1; var val; while (i < n) { val = ascending[i]; if (val >= ltBound) break; if (rangeStart == -1 && val >= geBound) { rangeStart = i; } rangeEnd = i; ...
[ "function _getLastBucket() {\n return this.buckets[this.buckets.length - 1];\n }", "function FirstOrLast_ByHits(ByHits_value, array) {\n\n\treturn(FirstOrLast(ByHits_value, 'largest number', 'smallest number', array)); \n\n\n}", "function bucketLane() {\r\n\t\r\n\tvar bucketArray = document.qu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get maximum of max two series, only process selected interval
function result_max() { result_a = flotr_data[0].data.filter(isBigEnough(area.x1)).filter(isSmallEnough(area.x2)).reduce( function(max, arr) { return max >= arr[1] ? max : arr[1]; }, -Infinity); if (typeof flotr_data[1] !== "undefined") { ...
[ "static max (i1, i2) {\n if (!(i1 instanceof Interval)) throw new Error(`Interval.max must be called with two Interval (got ${typeof i1})`)\n if (!(i2 instanceof Interval)) throw new Error(`Interval.max must be called with two Interval (got ${typeof i2})`)\n return i1.compare(i2) > 0 ? i1 : i2\n }", "fu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Change title if turn
function change_title(){ var isOldTitle = true; var oldTitle = "Draft"; var newTitle = "Your turn!"; var interval = null; clearInterval(interval); function changeTitle() { if (is_turn){ document.title = isOldTitle ? oldTitle : newTitle; isOldTitle = !isOldTitle; } else{ document.title = 'Draft' }}...
[ "changeTitle() {\n one.title = 'Title Changed';\n }", "updateTitle() {\n if (this.style == 'full') {\n if (this.tileable.title.includes(this.app.get_name())) {\n this.title.text = this.tileable.title;\n } else {\n con...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns whether this question is from a "Simple" table
function isSimpleFormTableQuestion(qId){ var formTableType = getFormTableType( qId ); return ( formTableType == 'SIMPLE' ); }
[ "_hasTable () {\n return 0 < this._tables.length;\n }", "_hasTable () {\n return 0 < this.tables.length;\n }", "get isSingleTableChild() {\n return this.tableType === TableTypes.SINGLE_TABLE_CHILD;\n }", "function isSimpleRecordset(sbObj) {\r\n var retVal = false;\r\n var sqlObj = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Locate the insertion point for x in a to maintain sorted order. The arguments lo and hi may be used to specify a subset of the array which should be considered; by default the entire array is used. If x is already present in a, the insertion point will be before (to the left of) any existing entries. The return value i...
function bisectLeft(a, x, lo, hi) { while (lo < hi) { var mid = lo + hi >>> 1, y = f(a[mid]); if (x <= y || !(y <= y)) hi = mid; else lo = mid + 1; } return lo; }
[ "function bisectLeft(a, x, lo, hi) {\n while (lo < hi) {\n var mid = lo + hi >>> 1;\n if (f(a[mid]) < x) lo = mid + 1;else hi = mid;\n }\n return lo;\n }", "function bisectLeft(a, x, lo, hi) {\n while (lo < hi) {\n var mid = lo + hi >>> 1;\n if ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
create OAuth2 client instance using implicit grant
function createAuthInstance(options) { return new implicitGrantClient_1.ImplicitGrantClient(options); }
[ "_getSecureOAuthClient() {\n _checkParam(this.config.clientSecret, \"clientSecret\");\n _checkParam(this.config.clientId, \"clientId\");\n _checkParam(this.config.redirectUri, \"redirectUri\");\n _checkParam(this.config.scope, \"scope\");\n\n return OAuth2.create({\n client: {\n id: this....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
method to hide billing fields
function tiendaHideBillingFields() { $('billingToggle_show').set('class', 'hidden'); $('field-toggle').addEvent('change', function() { $$('#billingDefaultAddress', '#billingToggle_show', '#billingToggle_hide').toggleClass('hidden'); }); }
[ "function SetCreditCardFieldsVisibility()\n\t{\n\tvar nPaymentMethod = GetPaymentMethod();\n\n\tvar sDisplay = \"none\";\n\tif (nPaymentMethod == \"10005\")\n\t\t{\n\t\tsDisplay = \"\";\n\t\t}\n\tSetTableRowsDisplay(\"idPaymentMethodTable\", \"CreditCardField\", sDisplay);\n\t}", "function displayNone() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get unique values from the JSON for given variable
function getUniqueValues(variable_name){ var uniqueValues = []; for(i = 0; i< data.length; i++){ if(uniqueValues.indexOf(data[i][variable_name]) === -1){ uniqueValues.push(data[i][variable_name]); } } return uniqueValues; }
[ "function json_unique(x, field) {\n var newArray=new Array();\n label:for(var i=0; i<x.length;i++ ){\n for(var j=0; j<newArray.length;j++ ){ \n if(newArray[j][field]==x[i][field]) \n continue label;\n }\n newArray[newArray.length] = x[i];\n }\n return newArray;\n }...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
perf.js 2020 H. Dahle Create color array for charts 'color' is base color, 'num' is how many colors to create Resulting colors have hues evenly spaced in HSL color space
function mkColorArray(num, color) { // Color array for #222c3c: Use #db7f67 (coolors red in the palette) // Alternatively a little bit darker c8745e let c = d3.hsl(color === undefined ? '#c8745e' : color); let r = []; for (i = 0; i < num; i++) { r.push(c + ""); c.h += (360 / num); } return r; }
[ "function generateColors(numColors){\r\n arr = [];\r\n for(var i = 0; i < numColors; i++){\r\n arr.push(singleColor());\r\n }\r\n return arr;\r\n}", "function generatedColor(num) {\r\n var coloring = []\r\n // fill the array with colors\r\n for (var i = 0; i < num; i++) {\r\n coloring.push(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function for Left Arrow Checks if Current Employee is greater or Equal to Zero Then Checks if Current Employee is Zero to remove arrow
function left() { if (currentEmployee >= 0) { displayModal((currentEmployee -= 1)); rightArrow.style.display = "block"; if (currentEmployee === 0) { leftArrow.style.display = "none"; } } }
[ "function right() {\n if (currentEmployee <= 11) {\n displayModal((currentEmployee += 1));\n leftArrow.style.display = \"block\";\n if (currentEmployee === 11) {\n rightArrow.style.display = \"none\";\n }\n }\n}", "function arrowVisibility () {\n if (thisEmployee.parent().next().leng...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Renders the multisearch control
function renderMultiSearch(multiSearch){ // Draw hidden value var multiSearchHiddenInput = $('<input type="hidden">'). appendTo(multiSearch); // Draw multi-search control var multiSearchInput = $('<input class="ui-analysis-multisear...
[ "function displaySearchResults(){\n\t'use strict';\n\t//get the selected checkboxes\n\tvar selectedIngredients = $(\"#frmsearch\").find(\":checked\");\n\t\n\t//hide everything\n\t$(\".head\").addClass(\"hidden\");\n\t\n\t//show the menu items that contain selected ingredients\n\tfor ( var i = 0; i < selectedIngredi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get all the saved location IDs from user info
async function getLocationIDs(){ const userResult = await axios( { method: 'get', url: 'http://localhost:3003/user', withCredentials: true }); // alert(userResult.data.location); userResult.data.location.forEach(function(id){ addLocations(id); }); }
[ "function getLocationIds() {\n var queryString = 'SELECT \"id\" FROM \"locations\"';\n return getArrayFromQuery(queryString);\n}", "function get_loc() {\n var tmp_loc = JSON.parse(localStorage.getItem(\"locations\"));\n\n all_locations = _.pairs(tmp_loc);\n\n //console.info(\"All Locations: \" + all_lo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO: See? This is easy. Create a preprocessing filter method to remove data for the letter B from the data set
function filterLetter(selection) { return selection.filter(function(d) { return d.letter !== 'B'; }) }
[ "function removeFilter() {\n\n}", "function filter() {}", "function addDataProcess() {\r\n\r\n\t\tbrunel.dataPreProcess(function (data) {\r\n\t\t\treturn data.filter(filterHandler.makeFilterStatement(data))\r\n\t\t});\r\n\t}", "function filterDataKeyUpListener(e) { filterData(); }", "function unfilter() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIE...
async function main( projectId, dataProjectId, datasetId, tableId, topicId, subscriptionId, minLikelihood, maxFindings, infoTypes, customInfoTypes ) { [infoTypes, customInfoTypes] = transformCLI(infoTypes, customInfoTypes); // [START dlp_inspect_bigquery] // Import the Google Cloud client lib...
[ "async function main(\n projectId,\n dataProjectId,\n datasetId,\n tableId,\n topicId,\n subscriptionId\n) {\n // [START dlp_inspect_bigquery_with_sampling]\n // Import the Google Cloud client libraries\n const DLP = require('@google-cloud/dlp');\n const {PubSub} = require('@google-cloud/pubsub');\n\n //...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
set up mapPane for birds
function setupBirdsPane(map){ map.createPane('birds') //create custom pane for birds map.getPane('birds').style.zIndex = 650; //put pane on top of sightings-map map.getPane('birds').style.pointerEvents = 'none'; return L.svg({pane: 'birds'}).addTo(map); }
[ "function init() {\n let myMap;\n\n document.querySelectorAll('[data-js=open-branches-map-btn]').forEach(btn => {\n\n btn.addEventListener('click', e => {\n if (myMap) {\n myMap.destroy();// Destructor of the map\n myMap = null;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
climb(3) > 3. 111 12 21 climb(4) > 5. 1111 121 121 22 211 climb(6) > 13
function climb(n){ if(n==1){ return 1 } else if (n==2){ return 2 } else { return climb(n-1) + climb(n-2) } }
[ "function breakChocolate(n,m) {\n let b = (n * m) - 1\n if(m * n < 1){\n b = 0\n }\n return b;\n}", "function chocolateFeast(n, c, m) {\n var numberOfWrappers, numberOfChoclates;\n\n numberOfWrappers = numberOfChoclates = Math.floor(n / c);\n\n while (numberOfWrappers >= m) {\n var freeBars = Math.fl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
only works for plantsJson populates all plants into .scrollable
function populateScrollable() { $(".plantsClickable").remove(); $.each(plantsJson, function(i, field) { $('.scrollable').append("<li class='plantsClickable'>" + field.Name + "</li>"); }); }
[ "function getPlants() {\n $.get(\"/api/plants\", function(data) {\n var rowsToAdd = [];\n for (var i = 0; i < data.length; i++) {\n rowsToAdd.push(createPlantRow(data[i]));\n }\n renderPlantList(rowsToAdd);\n nameInput.val(\"\");\n });\n }", "function getAttachedPlants() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
User pressed Tab in an editor. Tab > Increase item depth if inside a list item Shift+Tab > Decrease item depth if inside a list item
function onTab(event, change, editor, opts) { var value = change.value; var isCollapsed = value.isCollapsed; if (!isCollapsed || !(0, _utils.getCurrentItem)(opts, value)) { return undefined; } // Shift+tab reduce depth if (event.shiftKey) { event.preventDefault(); ret...
[ "function onTab(event, change, editor, opts) {\n var value = change.value;\n var isCollapsed = value.isCollapsed;\n\n\n if (!isCollapsed || !getCurrentItem(opts, value)) {\n return;\n }\n\n // Shift+tab reduce depth\n if (event.shiftKey) {\n event.preventDefault();\n\n return ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Das ist eine Hilfsfunktion, um das image mit Company name zu plazieren
function insertCompanyName(xSize,ySize) { var src; if (locParams.insWSC) { src = "/servlet/CMGetDyn/company_name"; } else { src = locParams.stdImgDir + "company_name.gif"; } document.write("<IMG src='" + src + "' width='"+xSize+"' height='"+ySize+"'>"); }
[ "function Company( name, image ) {\n this.name = name;\n this.image = image;\n}", "renderCompanyLogo() {\n if (this.props.journal.Job.has_company_logo) {\n return <img className=\"jc-company-logo-thumb\" src={this.props.journal.Job.company_logo} />;\n } else {\n return;\n }\n }", "function...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Remove COMPLETED transactions at or below this node in the transactionQueueTree_.
function repoPruneCompletedTransactionsBelowNode(repo, node) { var queue = treeGetValue(node); if (queue) { var to = 0; for (var from = 0; from < queue.length; from++) { if (queue[from].status !== 2 /* COMPLETED */) { queue[to] = queue[from]; to++; ...
[ "function repoPruneCompletedTransactionsBelowNode(repo, node) {\n var queue = treeGetValue(node);\n if (queue) {\n var to = 0;\n for (var from = 0; from < queue.length; from++) {\n if (queue[from].status !== 2) /*COMPLETED*/\n {\n queue[to] = queue[from];\n to++;\n }\n }\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets minheight and minwidth for image to avoid transition bug
function calculateMinSize($image) { var minHeight, minWidth, height = $image.height(), width = $image.width(), parentHeight = $image.parent().height(), parentWidth = $image.parent().width(); if (width > parentWidth...
[ "formatImage() {\n\t\tthis.image.style.width = 'auto';\n\t\tthis.image.style.height = '100%';\n\t\t\n\t\tif (this.image.clientWidth <= this.conatiner.clientWidth) {\n\t\t\tthis.image.style.width = '100%';\n\t\t\tthis.image.style.height = 'auto';\n\t\t}\n\t}", "function forceImageDimensionsIfEnabled() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
validar clave de seguridad
function chequearClave(codigo){ if(codigo===clave){ console.log("validation passed"); return true }else{ console.log("validation failed"); return false } }
[ "function validaClave( form )\n\t{\n\t\tvar regreso;\n\t\t\tregreso = true;\n\t\t\tregreso = vtxtVacio( form.txt_clave, \"Clave\" );\n\t\t\tif ( regreso )\n\t\t\t\tregreso = vtxtLongitudExacta( form.txt_clave, 4 );\t\t\t\n\t\t\tif ( regreso )\n\t\t\t\tregreso = vtxtEspacios( form.txt_clave );\n\t\t\tif( regreso )\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
function to restart game following several steps a> reset stars b>hide cards c>restart timer d>reset no of moves
function restartGame() { console.log('trying to restart game'); /*Set no of stars back to 5*/ resetStars(); /*Reshuffle cards and close all cards*/ hideCard(myOpenedCards); deleteFromMyOpenedCards(); deleteFromMyLastTwoCards(); setTimeout(shuffle, 500); /*Reset no of moves back to zero*/ document.qu...
[ "function restart() {\n moves = 0;\n mo = 0;\n seconds = 0;\n stopCounter();\n timeInit = 0;\n star3.classList.remove(\"rating\");\n star2.classList.remove(\"rating\");\n document.getElementById('s').textContent = \"0s\";\n document.getElementById('m').textContent = \"0m\";\n document.getElementById('h')....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
toggleControlButtons(state) will enable and disable the control buttons depending on the boolean value of the state variable.
function toggleControlButtons(state){ $("#algorithmSpeed").prop("disabled",state); $("#generateBars").prop("disabled",state); $("#arraySize").prop("disabled",state); $("#selectAlgorithm").prop("disabled",state); if (state){ $("#algorithmSpeedDiv").addClass("disabled-div"); $("#arrayS...
[ "function toggleState(state)\n{\n if(typeof state != \"boolean\")\n return;\n\n f.querySelector('button[type=\"submit\"]').disabled = state;\n let buttons = button_group.querySelectorAll('button'); //clr and read\n for(let b of buttons) b.disabled = !state;\n voices.disabled = !state;\n}", "...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generates a timeout configuration and adds it to the newFunction object
function updateTimeout(newFunction, functionObject) { newFunction.Properties.Timeout = _.merge( {}, functionObject.batch.Timeout ); if (! newFunction.Properties.Timeout.hasOwnProperty('AttemptDurationSeconds')) { const timeout = getTimeout(functionObject); newFunction.Properties.Timeout.Attem...
[ "function timeout(time) {\n return function (target, propertyKey) {\n if (arguments.length === 1) {\n target[timeoutSymbol] = time;\n }\n else {\n target[propertyKey][timeoutSymbol] = time;\n }\n };\n}", "function Timeouts() {}", "function FakeTimeout() {}...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Position the instructions next to the newly created Canvas element that will show the rendered scene
function positionInstructions(renderer) { let instructions = document.getElementById("instructions"); document.body.insertBefore(renderer.domElement, document.body.firstChild); }
[ "function drawLayoutOne(){\n ctx.font = \"20px myFont\";\n ctx.fillStyle = \"red\";\n ctx.textAlign = \"center\";\n ctx.fillText(\"Stage \" + stageCount, canvas.width / 2, 25);\n ctx.fillStyle = \"black\";\n ctx.font = \"18px Arial\";\n ctx.fillText(question, canvas.width / 2, 65);\n ctx.fil...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
selectRota Selects the rota and changes state to view the rota
function selectRota(rota) { $state.go('app.view.logs', {rotaId: rota.getKey()}); }
[ "changeRotor(rotorselect){\n\t\tthis.rotorselect=rotorselect;\n\t\tthis.rotorperms=RotorPerms[rotorselect];\n\t}", "rotar(){\n if (this.isMouseDown && this.modo == \"orbital\"){\n var deltaX=0;\n var deltaY=0;\n \n \n if (this.previousClientX) deltaX = this.mouse.x - ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clears the reCAPTCHA widget from the page and destroys the instance.
clear() { this.assertNotDestroyed(); this.destroyed = true; this._recaptchaLoader.clearedOneInstance(); if (!this.isInvisible) { this.container.childNodes.forEach(node => { this.container.removeChild(node); }); } }
[ "clear() {\n this.assertNotDestroyed();\n this.destroyed = true;\n\n this._recaptchaLoader.clearedOneInstance();\n\n if (!this.isInvisible) {\n this.container.childNodes.forEach(node => {\n this.container.removeChild(node);\n });\n }\n }", "async reset (widgetId) {\n const grec...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Categorical crossentropy with integer targets.
function sparseCategoricalCrossentropy(target, output) { return tfjs_core_1.tidy(function () { var flatTarget = tfc.floor(K.flatten(target)).toInt(); output = tfc.clipByValue(output, common_1.epsilon(), 1 - common_1.epsilon()); var outputShape = output.shape; var oneHotTarget = tfc.o...
[ "function sparseCategoricalCrossentropy(target, output, fromLogits = false) {\n return (0,_tensorflow_tfjs_core__WEBPACK_IMPORTED_MODULE_0__.tidy)(() => {\n const flatTarget = _tensorflow_tfjs_core__WEBPACK_IMPORTED_MODULE_0__.floor(_backend_tfjs_backend__WEBPACK_IMPORTED_MODULE_2__.flatten(target)).toInt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Given a final list of delegates, create a vote assets list to be sent return null if could not make it
function createDiffVote(address, newdelegates){ function arrayObjectIndexOf(myArray, searchTerm, property) { for(var i = 0, len = myArray.length; i < len; i++) { if (myArray[i][property] === searchTerm) return i; } return -1; } var assets = []; var votedDelega...
[ "async function addBigDelegators(delegators){\r\n \r\n // delete main accounts dublicates and get accounts delegated > 500SP\r\n let match_delegators = delegators.filter(function(data){\r\n return (ACCOUNTS.find(function(acc){return data.name == acc.name;}) === undefined) && (data.value*1 >= start_d...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the sum of all of the dice
function sumDiceArray() { var sum = 0; for (var i = 0; i < diceArray.length; i++) { sum += diceArray[i]; } return sum; }
[ "getDiceSum(){\n\n return (this.firstDieValue + this.secondDieValue);\n }", "function sumDice(dice) {\n var total = 0;\n for (var i = 0; i < dice.length; i++) {\n total += dice[i];\n }\n return total;\n}", "sum() {\n return this.dice.reduce((sum,d) => sum + d.value, 0)\n }", "functi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
creates an array of length l filled with x
function filler(l,x){ var arr = []; while(--l >= 0){ arr.push(x); } return arr; }
[ "function newList(length) { return Array(length).fill() }", "function buildList(len, f) { return new Array(len).fill(0).map(f); }", "function createZeroArray(l) {\n let cza_toreturn = [];\n let czactr = 0;\n for (czactr = 0; czactr < l; czactr += 1) {\n cza_toreturn.push(0);\n }\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
update styling with rainbow
updateStyle(elem) { console.info("Updating style: applying rainbow."); const shadowRoot = elem.shadowRoot; shadowRoot.querySelector('style').textContent += rainbow; }
[ "function colorFillRainbow() {\n colorMode= \"random\";\n}", "function drawRainbow(offset){\n for (var i = 0; i < stripLength; i++) {\n var p = strip.pixel(i);\n p.color(colorWheel(Math.floor((255/stripLength) * ((i+offset) % stripLength))));\n }\n }", "function rainbow...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
close tab content event
onCloseTabContent(e) { this.closeTabContent(e); }
[ "closeContent() {\n\t\tthis.ensureContentTabOpen(undefined);\n\t}", "function closeTab() {\n\n}", "function registerCloseEvent() {\n\n $(\".closeTab\").click(function() {\n //there are multiple elements which has .closeTab icon so close the tab whose close icon is clicked\n var tabContentId = $(this).par...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
These functions determine how much life a person has left on Earth based on their current age, gender and what continet they live on. If 'male' is true use avg age on left If 'male' is false, use age on right
earthLifeExpectancy() { switch(this.continent) { case "North America": return this.gender === "male" ? 77 : 81; case "South America": return this.gender === "male" ? 73 : 79; case "Europe": return this.gender === "male" ? 75 ...
[ "function getAvgAges(ages, young, old) {\n\n}", "ageGradeFactor() {\n // If gender=other, use average of male and female age grades\n const profile = profileService.getProfile()\n\n if (profile.gender === 'female') {\n return ageGrade.getFemaleAgeGradeFactor(this.age, this.distance)\n }\n else...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A function to remove a layer using its name/title
function removeLayerByName(this_map, name) { if (!this_map) return; var layersToRemove = []; this_map.getLayers().forEach(function (layer) { if (layer.get('title') !== undefined && layer.get('title') === name) { layersToRemove.push(layer); } }); var len = layersToRemove....
[ "function removeLayerByName(name) {\n var layersToRemove = [];\n map.getLayers().forEach(function (layer) {\n if (layer.get('title') !== undefined && layer.get('title') === name) {\n layersToRemove.push(layer);\n }\n });\n\n var len = layersToRemove.length;\n for(var i = 0; i < len; i++) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Animation: Each menu object you create by default shows and hides its menus instantaneously. However you can override this behaviour with custom show/hide animation routines, as we have done in the "Menu Effects" section. Feel free to edit this, or delete this entire function if you're not using it. Basically, make fun...
function menuAnim(menuObj, menuName, dir) { // The array index of the named menu (e.g. 'mFile') in the menu object (e.g. 'pMenu'). var mD = menuObj.menu[menuName][0]; // Add timer and counter variables to the menu data structure, we'll need them. if (!mD.timer) mD.timer = 0; if (!mD.counter) mD.counter = 0; with...
[ "function menu_animation() {\n\n var transform = '50% 50%';\n\n if (!Modernizr.excludedplatforms) {\n transform = '25px 25px';\n }\n\n tl.add([\n TweenMax.to('.menu-bkg', .5, {height: win_height}), //Need to come up with a dynamic way to control this\n Tw...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
check data source has exists
hasDataSource(dataSourceName) { return this.dataSource.has(dataSourceName); }
[ "isDataSourcesLoaded() {\n let loaded = true;\n this.props.dataSource.forEach(ds => {\n if (ds.loaded === false) {\n loaded = false;\n }\n });\n return loaded;\n }", "static areAllDataSourcesLoaded(dataSources) {\n let loaded = true;\n dataSources.forEach(ds => {\n if (ds....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
pointTab(id, location): This function changes where a tab by an id is pointing. This is called, for example, when a link is pressed and the tab is now somewhere else. This function must be used as opposed to simply reassigning tab.node, because that will cause the behaviour of browserNavigation: sticky, even if the use...
function pointTab(id, location) { // 'tracked' means to keep the browser current with where the user has navigated, // while sticky means that the browser will just continue showing the user where they // last navigated. tabs[id].node = location; if(config.browserNavigation === 'tracked') { tabs[id].watching = ...
[ "gotoPositionInTab({ tabId, scrollX, scrollY }) {\n chrome.tabs.update(tabId, { active: true }, (tab) => {\n chrome.windows.update(tab.windowId, { focused: true });\n chrome.tabs.sendMessage(tabId, {name: \"setScrollPosition\", scrollX, scrollY});\n });\n }", "async gotoPositionInTab({ tabId, scr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
multiFight() stolen from Aenimus: Thanks! Licensed under MIT license.
function multiFight() { while ((0,kolmafia__WEBPACK_IMPORTED_MODULE_0__.inMultiFight)()) { (0,kolmafia__WEBPACK_IMPORTED_MODULE_0__.runCombat)(); } if ((0,kolmafia__WEBPACK_IMPORTED_MODULE_0__.choiceFollowsFight)()) (0,kolmafia__WEBPACK_IMPORTED_MODULE_0__.visitUrl)('choice.php'); }
[ "function C010_Revenge_AmandaSarah_StartFight() {\n\t\t\n\t// Sets the fight difficulty\n\tvar AmandaDifficulty = \"Normal\";\n\tvar SarahDifficulty = \"Easy\";\n\tif (ActorSpecificGetValue(\"Amanda\", ActorSubmission) < 0) AmandaDifficulty = \"Hard\";\n\tif (ActorSpecificGetValue(\"Sarah\", ActorSubmission) < 0) S...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Split path in [head, tail]
function splitIfPath(tail): Array { if (tail.type !== 'path') { return [tail, null] } const nodes = tail.nodes if (nodes.length === 0) { return [null, null] } else if (nodes.length === 1) { return [nodes[0], null] } return [nodes[0], {type: 'path', nodes: nodes.slice(1)}] }
[ "splitPath(path) {\n return path.substr(1).split('/')\n }", "static splitPath(path) {\n\t\treturn path.slice(1).split('/')\n\t}", "static splitPath(path) {\n // special case for account path\n if (path === \"/\") return [undefined, \"/\"];\n\n const split = path.split(\"/\");\n const id = split....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
return estimations saved on database
async getEstimations() { return this.db.queries.getEstimations(); }
[ "async dirtyEsts() {\n this.calculatedAt = 0\n return await this._persistEsts()\n }", "function addObservation() {\n isSaving(true)\n saveToDB({\n type: 'observations',\n method: 'new',\n })\n}", "save() {\n this.Dbinterface.saveMeasurements();\n }", "function createExerecisesMod...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
PASSENGERS Function will build Passport Issue Date and return value to passportissue text box if all values are available
function buildPassIssueDate(strid, strPaxNum) { // Set the optional parameter if needed if (strPaxNum === undefined ) { strPaxNum = ''; } //Expects form elements: selPassIssueMonth, selPassIssueDay, txtPassIssueYear to be present if( document.getElementById('selPassIssueMonth' + ...
[ "function fomoHasIssues() {\n var investmentAmount = $('#fomo-amount-invested').val(); // Numeric investment amount\n var userDate = new Date($('#fomo-date').val()); // Used to check if date field is empty\n\n // Check for various issues that could arise\n if(isNaN(investmentAmount)) {\n return \...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Uses for strike laco pointer move event in external hover mode
_strikePointerMove() { for (let i = 0; i < this._pointerMoveCallbacks.length; i++) { let currentCallback = this._pointerMoveCallbacks[i][0]; currentCallback(this, event); } for (let i = 0; i < this._pointerMoveCallbacks.length; i++) { ...
[ "_strikeMouseMove() {\n for (let i = 0; i < this._mouseMoveCallbacks.length; i++) {\n let currentCallback = this._mouseMoveCallbacks[i][0];\n\n currentCallback(this, event);\n }\n\n for (let i = 0; i < this._mouseMoveCallbacks.length; i++) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Stops the progress information interval
function stopProgressInfo() { if (progressIntervalObj) { clearInterval(progressIntervalObj); } }
[ "stop(){\n clearInterval(this.progress_obj.timer);\n this.progress_obj.bar.stop();\n }", "stopTrackingProgress() {\n this.clearInterval(this.progressInterval);\n }", "stopMonitoring() {\n if (this.interval) {\n clearInterval(this.interval);\n }\n }", "function ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
apply linear fit to other two channels
function linearFit(executionState, synthetic) { // linear fit using reference channel let lf = new LinearFit; lf.rejectLow = 0; lf.rejectHigh = 0.92; executionState.updateProgress('Executing LinearFit...'); lf.referenceViewId = executionState.channels[executionState.tgtId][1]; if (synthetic ===...
[ "function linearfit(x, y) {\n if (Array.isArray(x) && Array.isArray(y) && x.length === y.length) {\n let n = x.length;\n let sumX = 0;\n let sumX2 = 0;\n let sumY = 0;\n let sumXY = 0;\n for (let i = 0; i < x.length; i++) {\n sumX += x[i];\n sumX2 +...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Validates the given `source`, which must be a streamlike event emitter. This checks to make sure that the source is defined and has at least the trappings of being an emitter. If not, this throws an error. In addition, if the source either derives from `stream.Stream` or has an explicitlydefined `readable` property, th...
function validateSource(source) { assert.ok(!typ.isNullish(source), "Missing source."); if (!typ.isFunction(source.on)) { throw new Error("Source not an EventEmitter."); } if (readerIsEnded(source)) { throw new Error("Source already ended."); } }
[ "getValidatedEventStream(source$, eventType) {\r\n return source$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__[\"tap\"])((event) => {\r\n if (!(event instanceof eventType)) {\r\n console.warn(`EventService: The stream`, source$, `emitted the event`, event, `that is not an...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Draw the interval on the svg node with given slotwidth (an hour) and height. intervals :: [(moment, moment)] today :: moment classes :: string
function drawIntervals(svg, slotWidth, slotHeight, today, intervals, _class) { function toX(d) { var x = d * (slotWidth * 24) / (24 * 60 * 60 * 1000); if(x < 0) return 0; else return x; } function findX(dtime) { var d = dtime.diff(today.startOf('day')); return toX(d); } return ...
[ "drawCells() {\n for (let row = 0; row < this.n_tasks; row++) {\n for (let col = 0; col < this.n_days; col++) {\n let cell = document.createElementNS(this.svg_spec, \"rect\");\n cell.col = col;\n cell.row = row;\n cell.setAttribute(\"width\", `${this.CELL_WIDTH}`);\n cell....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
removes the element passed into the function
function removeMe(element) { $(element).remove();//remove the entire element }
[ "function removeElement(elem){ if (elem) elem.parentNode.removeChild(elem) }", "function removeElement(elem){ elem.parentNode.removeChild(elem) }", "function removeEl(element) {\n element.parentNode.removeChild(element);\n}", "remove(){\n\t\tthis.element.remove()\n\t}", "function removeFlowelement(){\n\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Basically vm.downloadProjectId except it actually returns the promise
function downloadProjectId (vm, storage, id) { return storage.load(storage.AssetType.Project, id) .then(projectAsset => vm.loadProject(projectAsset.data)); }
[ "download (fileId, taskId) {\n const time = new Date().getTime()\n const urlAppend = 'time=' + time + '&token=' + this.token\n\n function downloadURI (uri, name) {\n var link = document.createElement('a')\n link.download = name\n link.href = uri\n link.click()\n }\n\n var url = th...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
...................................................................... ..I'm TCP socket client.. ..del msg_1, servicio motor de DB 'gcc_db_nidoo0.cpp'.
function ConnectDbServer(data) { var client = net.connect(8888, 'localhost', function() { //console.log('\n}1}Connected to db driver, envío .. ' + data); client.write(data+'\n'); client.end(); }); client.on('error', function(ex) { console.log("handled error"); console.log(ex); }); client.on('da...
[ "function TCP(json,ip,port_tcp){\n serverTCP = net.createServer(function(socket) {\n\n console.log('client connected');\n socket.name = socket.remoteAddress;\n clients.push(socket);\n socket.on('error', (e) => {\n /*Llamar aqui la funcion que quita el cliente de los vectores\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Builds Huffman lookup table assuming code lengths are in symbol order. / Returns false in case of error (invalid tree or memory error).
function BuildHuffmanTable(root_table,root_table_off, root_bits, code_lengths,code_lengths_off, code_lengths_size, count,count_off) { var code=new HuffmanCode(); /* current table entry */ var table=new Array(new HuffmanCode()...
[ "constructor(codeLengths) {\n // This dictionary maps Huffman codes to symbol values. Each key is the\n // Huffman code padded with a 1 bit at the beginning to disambiguate codes\n // of different lengths (e.g. otherwise we can't distinguish 0b01 from\n // 0b0001). For th...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Resets the API route chain flag, so 'advanced' chains can't be created Should only be used by configurators that have an APIConfigurator
_outOfRouteChain(){ // *Changing the route chain state: this._isInRouteChain = false; }
[ "reset() {\n if (this._routerMicrolib) {\n this._routerMicrolib.reset();\n }\n }", "reset() {\n if (this._routerMicrolib) {\n this._routerMicrolib.reset();\n }\n }", "static _reset () {\n offChainDataOptions.adapters = {};\n }", "function sof...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns an updated InstallationEntry with an InProgressAuthToken.
function makeAuthTokenRequestInProgressEntry(oldEntry) { const inProgressAuthToken = { requestStatus: 1 /* IN_PROGRESS */, requestTime: Date.now() }; return Object.assign(Object.assign({}, oldEntry), { authToken: inProgressAuthToken }); }
[ "function makeAuthTokenRequestInProgressEntry(oldEntry) {\n var inProgressAuthToken = {\n requestStatus: 1\n /* IN_PROGRESS */\n ,\n requestTime: Date.now()\n };\n return __assign({}, oldEntry, {\n authToken: inProgressAuthToken\n });\n}", "function makeAuthTokenRequestInProgressEntry(oldEntry)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add a new unit the the product unit list
unitAdd() { this.modelUnits.push(this.__unitInstance()); }
[ "addProduct(product) {\n const productList = document.getElementById(\"product-list\");\n const element = document.createElement(\"div\");\n product.addProduct(element);\n productList.appendChild(element);\n }", "addUnit() {\n\n //validate form\n if(this.unit_name=='') {\n this.form_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Given a "rectangle set" ( [ [0,0,20,20], [20,20,50,50] ] ), path it onto the given canvas context.
function rectSetPath(ctx, rectSet) { rectSet.forEach(function(r) { ctx.rect(r[0], r[1], r[2], r[3]); }); }
[ "function draw_path() {\n BOUNDING_BOXES.forEach(([xMin, xMax, yMin, yMax]) => {\n ctx.beginPath();\n ctx.rect(xMin, yMin, xMax - xMin, yMax - yMin);\n ctx.stroke();\n });\n TELEPORT_BOXES.forEach(([xl, xh, yl, yh]) => {\n ctx.beginPath();\n ctx.rect(xl, yl, xh - xl, yh - yl);\n ctx.stroke();\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
when a user searches for a specific house name, that house is returned
function getHouseByName (name, db = connection) { const query = 'SELECT *, rooms.id ' + 'FROM houses JOIN rooms on houses.id = rooms.house_id ' + 'JOIN regions on houses.region_id = regions.id ' + `WHERE name = "${name}"` return db.raw(query) }
[ "function SearchName(addressbook)\n{\n if(addressbook.firstName==\"Amit\") return addressbook;\n}", "function SearchName(addressBookDetail)\n{\n /// Check for the first name and then return the instance of the contact detail\n if(addressBookDetail.firstName==\"Shubham\") \n return addressBookDetail;\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this function loads a font, and create an array of polygons a polygon being itself an array of vectors with x/y coordinates
function getPoints(){ drawing = false; // create new font : we use rune console.log(params.font); f = new Rune.Font(params.font) // load the font f.load(function(err){ path = f.toPath(params.message, 0, 0, params.size) // this is a rune function polys = path.toPolygons({ sp...
[ "polygon(str, size) {\n console.groupCollapsed(\"Font Polygon\");\n const { root, polygons } = this.builder.polygon(str, size);\n console.groupEnd(\"Font Polygon\");\n return polygons;\n }", "polygonsFromPhysics(key, object) {\n var data = this.game.cache.getPhysicsData(key, obje...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
validate unregistered audience email field
function validateUAEmail() { var invalidCount = 0 var uaEmail = $('textarea[field="audienceEmail"]').val(); var uaEmailArray = uaEmail.replace(/ /g, '').split(','); if (uaEmail != '') { for (var i = 0; i < uaEmailArray.length; i++) { if (/(.+)@(.+){2,}\.(.+){2,}/.test(uaEmailArray[i]...
[ "function verifyEmailOnSubmit(){\n var email = clayConfig.getItemByMessageKey(\"userinfo_email\");\n if (!emailIsValid(email.get()))\n {\n email.set(\"invalid@email.com\");\n } \n }", "emailIsValid(email) {\n return /\\S+@\\S+\\.\\S+/.test(email);\n }", "function validateEmailFi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function to sort the scores highest to lowest
function sortScores(a,b){ if ( a.score < b.score ){ return 1; } if ( a.score > b.score ){ return -1; } return 0; }
[ "function sortScores() {\n Highscore.allHighScores.sort(function (a, b) {\n return b.score - a.score;\n });\n}", "function sortScores(scores) {\n scores.sort(compareScore);\n}", "function sortHighScores() {\n // Return number greater than 0 if the second element is larger than the first element so it...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return true if any response body overrides are in place
function testHasResponseBodyOverrides() { return Object.entries(responseBodyOverride).length > 0; }
[ "get hasResponseBody() {\n return this.statusCode !== NO_CONTENT && !!this.output;\n }", "get hasRequestBody() {\n return this.input && !['DELETE', 'GET', 'HEAD'].includes(this.method);\n }", "get hasBody() {\n return (this.headers.get(\"transfer-encoding\") !== null ||\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
load image function with good and bad checking
function loadImg(cSym){ this.good = function(){ imgChecker.good(cSym); } this.bad = function(){ imgChecker.bad(cSym); } var limg = new Image(); limg.onload=this.good; limg.onerror=this.bad; limg.src = imgSrc(cSym); }
[ "function loadImage() {\n\n // image file not loaded yet? => load image file\n if ( !resource ) jQuery( '<img src=\"' + url + '\">' );\n\n // immediate perform success callback\n success();\n\n }", "function loadImg(name){\r\n\tvar img = new Image(WIDTH, HEIGHT);\r\n\tim...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
1.5 Function From Table Delete Post Access To Show Pop Up And Pass UPID(ID identity) of User
function SUPDeletePostAccess(ID) { $("#SUP-PUUserID").text(ID); $("#SUP-DeleteConfirmation").modal("show"); }
[ "function deleteUser(id) {\n\t\t$('#delete_user').data('user',id);\t\n\t\t$('#delete').popup();\t\n\t\t$('#delete').popup('open');\t\n\t}", "function del_cancl() {\n\treturn swal(\"Oops!\",\"Can't delete! User has invested.\",\"warning\");\n}", "function deleteUserPermission(user) {\n $('#userIdDelete').val(us...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
run callback on every element matched by selector
function qsaEach(selector, callback) { [].slice.call(d.querySelectorAll(selector)).forEach(callback); }
[ "each (callback) {\n if (this.selectorLength > 0) {\n return this.selector.forEach(element => {\n (callback)(element)\n });\n }\n }", "_registerHandlerTo(elements, f) {\n selectAll(elements).each(function () {\n const element = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
tunnel1_bgp_holdtime computed: true, optional: false, required: false
get tunnel1BgpHoldtime() { return this.getNumberAttribute('tunnel1_bgp_holdtime'); }
[ "get tunnel2BgpHoldtime() {\n return this.getNumberAttribute('tunnel2_bgp_holdtime');\n }", "timeLeft(sender_id) {\n let user = this.getUser(sender_id);\n let currTime = new Date().getTime();\n let retVal = {\n type: (user) ? user.status : undefined, \n time: (...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }