query
stringlengths
9
34k
document
stringlengths
8
5.39M
negatives
listlengths
19
20
metadata
dict
Remove single file from remote FTP.
function removeFile(file, cb) { ftp.raw.dele(file, function(err, data) { if (err) { console.log("Remove==>>Error", err); cb(); } else { console.log("Removed " + file); cb(); } }); }
[ "function removeAttachmentFile(attachment, remove_url) {\n\tvar id = attachment.find(\".AttachmentFiles\");\n\t$.post(remove_url, {'id': id.val()});\n\n\tattachment.remove();\n}", "remove () {\n removeFile(this._filePath)\n }", "function doRemove(theurl, response) {\n response.setHeader(\"Content-Type\", \...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check if we are on a profile or the search Check our own tags (popups) to avoid more dependences with LinkedIn
function linkedinPageType() { if ($("#eh_popup").length) { return "profile"; } else if ($("#eh_search_selection_popup").length) { return "search"; } else { return "other"; } }
[ "function checkTags(){\n var keep = false,\n tags = tweet.entities && tweet.entities.hashtags;\n if( tags && tags.length && conf.hashTags && conf.hashTags.length ){\n var terms = [];\n tags.forEach( function( tag ){\n tag.text && terms.push( tag.text );\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
In the following, we assume that the inputs are in the proper range. Is this correct? Helper functions for 1, 2, and 4byte integers. Convert an integer value into an array of bytes. The result is appended to the serialized object ("so").
function append_byte_array(so, val, bytes) { if ("number" !== typeof val) { throw new Error("Integer is not a number"); } if (val < 0 || val >= (Math.pow(256, bytes))) { throw new Error("Integer out of bounds"); } var newBytes = []; for (var i=0; i<bytes; i++) { newBytes.unshift(val >>> (i*8) & ...
[ "static bytes11(v) { return b(v, 11); }", "static bytes1(v) { return b(v, 1); }", "static bytes9(v) { return b(v, 9); }", "static bytes10(v) { return b(v, 10); }", "static bytes8(v) { return b(v, 8); }", "static bytes21(v) { return b(v, 21); }", "static bytes22(v) { return b(v, 22); }", "static bytes2...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the dataset fetch URL for a given range of rows. This method it is called on the set of URL's returned for a dataset descriptor
getDatasetUrl(offset, limit, profile=false) { let url = this.get(HATEOAS_SELF); url += '?offset=' + offset + '&limit=' + limit; if(profile){ url += '&profile=' + profile; } return url; }
[ "getAnnotations(columnId, rowId) {\n let url = this.get(HATEOAS_DATASET_GET_ANNOTATIONS);\n url += '?column=' + columnId + '&row=' + rowId;\n return url;\n }", "function board_getDataRangesFromSheet(spreadsheetId,ranges,respfn) {\n\tgapi.client.sheets.spreadsheets.values.batchGet({\n\t\tsp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
4D Table formatting injection script: custom field pages lack some basic styling, this fixes them: Remove when we fix 4D
function fourDTableFix(){ $j('.fourDTable').prepend('<tr class="hide"><td></td><td></td></tr>'); $j('.fourDTable tr:odd').addClass('alt'); $j('.fourDTable td:first-child').wrapInner('<strong />'); }
[ "formatAll(options) {\n this._textEditor.transact(() => {\n const re = exports._createIsTableRowRegex(options.leftMarginChars);\n let pos = this._textEditor.getCursorPosition();\n let lines = [];\n let startRow = undefined;\n let lastRow = this._textEdit...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
REPLACE returns a new string after replacing with `new_text`.
function REPLACE(text, position, length, new_text) { if (ISERROR(position) || ISERROR(length) || typeof text !== 'string' || typeof new_text !== 'string') { return error$2.value; } return text.substr(0, position - 1) + new_text + text.substr(position - 1 + length); }
[ "function SUBSTITUTE(text, old_text, new_text, occurrence) {\n if (!text || !old_text || !new_text) {\n return text;\n } else if (occurrence === undefined) {\n return text.replace(new RegExp(old_text, 'g'), new_text);\n } else {\n var index = 0;\n var i = 0;\n while (text.indexOf(old_text, index) ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this function takes in 1 line of text this function will print 2 lines of text: line 1: chords extracted from input line 2: lyrics extracted from input
function printChords(inp){ var result = ["",""]; //output lines var str = inp; //local copy of input for modifying var offset = 0; //offset caused by pasting the last chord (e.g. Esus2 shifts the following E 5 characters over) while(str.indexOf("[") != -1){ //all chords are of the format [chord], find it b...
[ "function parse(lrc)\n{\n str=lrc.split(\"[\");\n //str[0]=\"\"\n //str[1]=\"xx:xx.xx]lyrics1\"\n //str[2]=\"yy:yy.yy]lyrics2\"\n //Skip str[0]\n for(var i=1;i<str.length;i++)\n {\n //str[i] format is 00:11.22]x\n //time format is 00:11.22\n var time=str[i].split(']')[0];\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This are files that are present locally but not on Smartling repository of files.
function missingLocalFiles() { return [ { absolutePath: '/Users/hyeomans/dev/my-opentable/Web/Resources/Errors.resx', relativePath: 'Web/Resources/Errors.resx', fileUri: 'https://api.smartling.com/v1/file/get?apiKey=mockApiKey&fileUri=./Web/Resources/Errors.resx&projectId...
[ "function getLocalFiles(local) {\n return fs.readdirSync(local);\n}", "getOwnFiles() {\n return this.cache.getOrAdd('getOwnFiles', () => {\n let result = [\n this.xmlFile\n ];\n let scriptPkgPaths = this.xmlFile.getOwnDependencies();\n for (let sc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the query property of the parsed request object.
get query() { return this._parsed.query || {}; }
[ "static get QUERY_PARAMS_PROPS() {\n return Constants.QUERY_PARAMS_PROPS;\n }", "getCurrentQuery() {\n const e = window.location.search;\n if (!e)\n return {};\n let t = {};\n return e.substring(1).split(\"&\").forEach((r) => {\n const n = decodeURIComponent(r).split(\"=\");\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
binaryL ::= subExpr | binaryL op subExpr so a op b op c becomes ((a op b) op c)
function binaryL(subExpr, stream, a, ops) { var lhs = subExpr(stream, a); if (lhs == null) return null; var op; while (op = stream.trypop(ops)) { var rhs = subExpr(stream, a); if (rhs == null) throw new XPathException(XPathException.INVALID_EXPRESSION_ERR, ...
[ "function binaryL(subExpr, stream, a, ops) {\n var lhs = subExpr(stream, a);\n if (lhs == null) return null;\n var op;\n while (op = stream.trypop(ops)) {\n var rhs = subExpr(stream, a);\n if (rhs == null) throw new XPathException(XPathException.INVALID_EXPRESSION_ERR, 'Position ' + stream.pos...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Assign employee to schedule after user clicks okay for warning modal
function _assignEmployeeAfterWarning(event) { var empPk = $(this).data("employee-pk"); var schPk = $(this).data("schedule-pk"); var strCalDate = calDate.format(DATE_FORMAT); $.post("add_employee_to_schedule", {employee_pk: empPk, schedule_pk: schPk, cal_date: strCalDate}, upd...
[ "function _editConflict(schedule, availability) {\r\n $editConflictManifest = $(\"#edit-conflict-manifest\");\r\n $editConflictManifest.empty();\r\n\r\n // Display conflicts between schedule and employee in modal body\r\n var warningStr = _compileConflictWarnings(availability);\r\n $editConflictManif...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Converts the `Provider` into `ResolvedProvider`. `Injector` internally only uses `ResolvedProvider`, `Provider` contains convenience provider syntax.
function resolveReflectiveProvider(provider) { return new ResolvedReflectiveProvider_(ReflectiveKey.get(provider.provide), [resolveReflectiveFactory(provider)], provider.multi || false); }
[ "function createProvider() {\n return (new LocalProvider());\n }", "function convertToProviderExpression(obj, property) {\n if (obj.hasOwnProperty(property)) {\n return injectable_compiler_2_1.createR3ProviderExpression(new output_ast_1.WrappedNodeExpr(obj[property]), /* isForwardRef *...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Click handler that marks a video as watched.
function onclick_watched(e, video_id) { flixstack_api.mark_as_watched(video_id, function(data, textStatus) { update_link(video_id, false); }); e.preventDefault(); e.stopPropagation(); return false; }
[ "function video_click(e) {\n\t//console.log(e);\n\t//console.log(this);\n\tif (this.paused == true) {\n\t\tthis.play();\n\t} else {\n\t\tthis.pause();\n\t}\n}", "function updatevideostatus(){\n \n \n if(video.paused)\n {\n \n video.play();\n }\n else{\n video.pause();\n }\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determine whether the given properties match those of a `ReplicationRuleAndOperatorProperty`
function CfnBucket_ReplicationRuleAndOperatorPropertyValidator(properties) { if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } const errors = new cdk.ValidationResults(); if (typeof properties !== 'object') { errors.collect(new cdk.ValidationResult('Expected an object, ...
[ "function CfnBucket_ReplicationRuleFilterPropertyValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Expected an ob...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds the given views to the collection
addViews(views) { for (let i = 0; i < views.length; i++) this.addView(views[i]); }
[ "addEntryView(entryView) {\n const entry = entryView.model;\n\n this._entryViews.push(entryView);\n this._entryViewsByID[entry.id] = entryView;\n this.model.addEntry(entry);\n\n if (this._rendered) {\n entryView.render();\n }\n }", "_attachViewButtonHandlers...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Transforms the coordinates in the array to their scaled coordinates
toPixels(arr){ let scaled = []; arr.forEach(index => scaled.push({ origin: {x: index.origin.x/this.state.scale, y: index.origin.y/this.state.scale}, dest: {x: index.destination.x/this.state.scale, y: index.destination.y/this.state.scale}, dist:...
[ "createTransformedPolygon() {\r\n this.transformedPolygon = [];\r\n\r\n for(let i=0; i<this.polygon.length; i++) {\r\n this.transformedPolygon.push(\r\n [\r\n this.polygon[i][0] * this.scale + this.origin.x,\r\n this.polygon[i][1] * this.scale + this.origin.y\r\n ]\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
show the CodeLink normalization values for the normalize.jsp page
function show_codeLink_normalization_parameters() { var normalize_method = $("select[name='normalize_method']").val(); // No method selected if (normalize_method == 'none') { $("div#loess_div").hide(); $("div#limma_div").hide(); // loess } else if (norm...
[ "function FormulaPage() {}", "function renderValues() {\n renderInitialValues(initialPhysicValues);\n renderInitialValues(resultPhysicValues);\n}", "getDisplayValue() {}", "function afficheFmtOrigin() {\n var geocoder= viewer.getVariable('geocoder');\n geocoder.resultsElement.value= geocoder.outputRes...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
3. get Mentor by name Returns Mentor if found, undefined otherwise
getMentorByName(mentorName) { const allMentors = this.getMentorList(); return allMentors.find(mentor => mentor.name.toLowerCase() === mentorName.toLowerCase()); }
[ "function getAuthorByName(authorName, authors) {\n // Your code goes here\n let x = authors.find(\n author => author.name.toLowerCase() === authorName.toLowerCase()\n );\n\n return x;\n}", "function getMember() {\n var matchMin = getMin();\n var getMemb...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
= BIND TOGGLE SHORTCUTS BUTTON CLICK EVENT =
function bindShortcutsBtnClick() { $('#keyboard_shortcuts_link').click(function(){ $(this).toggleClass('active'); if($('#keyboard_shortcuts_cont').is(':visible')){ $('#keyboard_shortcuts_cont').hide('fade', 0); } else { $('#keyboard_shortcuts_cont').show('fade', 0); ...
[ "_addToggleAction(options) {\n const $action = this.addFooterAction({\n id: options.id,\n html: `<a href=\"#\">${options.text}</a>`,\n });\n\n $action.click(ev => {\n ev.preventDefault();\n ev.stopPropagation();\n\n const show = this.model....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Make sure ending JSON file is valid
function validateDataFile(){ var data, tmpObj; fs.readFile(path+dataFile, 'utf-8',function (err, data) { if (err) throw err; try{ tmpObj=JSON.parse(data); logMsg(dataFile + ' has been verified as a valid JSON object.') } catch(e){ console.log('An error has occurred: '+e.mes...
[ "function update_json_path_validity(newPath) {\n if (FileSystem.existsSync(newPath)) {\n try {\n if (path.extname(newPath) === \".json\") { \n return \"valid path\";\n } else {\n return \"input path not json\"; \n }\n } catch (error) {\n return error;\n }\n } else {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks each type of element (point, line, etc) and removes the oldest member(s) if more than the maximum exist
trimLists() { let quota = {}; for (let type of Object.keys(this.max)) { quota[type] = this.max[type]; } for (let i = this.finished.length-1; i >= 0; i--) { let obj = this.finished[i]; if (obj.answer) { if (obj instanceof Point) { ...
[ "limitArray(arr, limitTimeframeInSeconds){\n if(typeof limitTimeframeInSeconds && !limitTimeframeInSeconds){\n return arr;\n }\n limitTimeframeInSeconds = limitTimeframeInSeconds || 120;\n let timeInMS = limitTimeframeInSeconds * 1000;\n try{\n if(arr && arr.hasOwnProperty('earliestTime')){...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates the object for a new comment based on text fields, then calls the POST function
function createNewComment(){ var newComment = document.getElementById( 'comment-input' ).value; if( newComment.trim() !== '' ){ var newCommentTime = getTimestamp(); var onPostID = getPostIDforComment(); if( onPostID !== '' ){ var newCommentObject = { postid: onPostID, timestamp...
[ "function postComment () {\n let postContent = document.getElementById('comment').value;\n let postTitle = document.getElementById('title').value;\n // Body of the comment post to send to the server\n let post = {\n\t\ttitle : postTitle,\n\t\tcontent : postContent\n\t}\n // send the post\n makeRequest('posts'...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the value for the node that a cursor currently points to.
cursorSet(cursor, value) { if (cursor.buffer) this.setBuffer(cursor.buffer.buffer, cursor.index, value) else this.map.set(cursor.tree, value) }
[ "setCurrentNode(node) {\n this.currentNode = node;\n }", "redrawValue () {\n this._domControl.value = this.get( 'value' );\n }", "set(value, nth){\n if (this.get(nth)) {\n let oldNode = this.get(nth);\n oldNode.value = value;\n return this;\n }\n }", "set value(val) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a Color4 value containing a white color
static White() { return new Color4(1, 1, 1, 1); }
[ "static Black() {\n return new Color4(0, 0, 0, 1);\n }", "static Clear() {\n return new Color4(0, 0, 0, 0);\n }", "static Green() {\n return new Color4(0, 1.0, 0, 1.0);\n }", "static White() {\n return new Color3(1, 1, 1);\n }", "static Red() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This Ajax action submits the form with all shifts to the controller for saving
function saveScheduleShifts() { // serialize the form into object var form = $('#scheduleform').serializeObject(); // Parse WorkPeriod fields into correct format for model form["WorkPeriods"] = parseWorkPeriodFields(); // Send form to controller with Ajax and return the partial view to display ...
[ "function submitForm() {\n jsRoutes.controllers.ManagementController.saveInformation().ajax({\n data: $('#management-form').serialize(),\n success: function (data) {\n sessionStorage.setItem(\"reloading\", \"true\");\n location.reload();\n },\n error: function (e...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Enable server node by id.
static enable(serverNodeId){ let kparams = {}; kparams.serverNodeId = serverNodeId; return new kaltura.RequestBuilder('servernode', 'enable', kparams); }
[ "setActiveNodeId(id, addToHistory = true) {\n let node = this.state.graph.getNode(id);\n\n if (!node) {\n id = \"\";\n }\n\n // upgate graph\n this.state.graph.setActiveNode(node, addToHistory);\n\n // update state\n this.setState({\n activeNodeId: id\n });\n\n // send event to ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks for Blood Pressure value matching conditions Systolic and diastolic records do not need to be sequential to return true
function hasBloodPressureMatchingIndicators() { var bpSystolic = Number.MAX_VALUE; var bpDiastolic = Number.MAX_VALUE; for (var i = 0; i < vitalSignList.length; i++) { if (vitalSignList[i].includesCodeFrom(targetBloodPressureSystolicCodes) && vitalSignList[i].timeStam...
[ "function endPhaseConditions(){\r\n\r\n if (killerCountSetup == 0 || userKilled || totalFuel == userScore + computerScore || fuel == 0){\r\n return false;\r\n }\r\n else{\r\n return true;\r\n }\r\n}", "function filterBlood (blood){\n return blood.bloodType == inputValue\n }", "isSc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Posts this item to chat. postItem() prepares this item's chat data to post it to chat, setting up the image if it exists, as well as setting flags so drag+drop works.
postItem() { let chatData = duplicate(this.data); // Don't post any image for the item (which would leave a large gap) if the default image is used if (chatData.img.includes("/blank.png")) chatData.img = null; renderTemplate('systems/solaires/templates/chat/post-item.html', chatData).then(html...
[ "async _onDropItem(event, data) {\n if ( !this.actor.owner ) return false;\n const item = await Item.fromDropData(data);\n /*-----------Beginning of added code--------------*/\n // Check if droped item is a Focus and then confirm if Actor already has a Focus with the same name\n /...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
================== Segmentation & Experiment Section =================== / Return color basic on different joint Input: typeOfJoit(String) Output: color(rgb Array)
function jointColor(typeOfJoint) { var color; switch (typeOfJoint) { case 'boundary': color = [255, 255, 0]; break; } return color; }
[ "function getColor(i, j) {\n let pix = img.get(i,j).toString();\n pix = pix.substring(0, pix.length - 4);\n pix = \"rgb(\" + pix + \")\";\n return pix;\n}", "function ColorType()\n{\t\t\t\t\n}", "function passTheColor () {\n//\tDebug.Log(\"Got in passTheColor\");\n//\tDebug.Log(inputUnit);\n\t// If ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
FUNC FOR CHECKING BASKET FOR AVAILABILITY LEFT BESTOFFERS GOODS
function checkBsktForLeft() { for (let good in bestOffer.left) { if (basket.hasOwnProperty(bestOffer.left[good])) { return true; } } }
[ "function CheckExpenseItems(itemCount)\n{\n if (itemCount > 0)\n {\n return true;\n }\n else\n {\n return false;\n }\n}", "function checkValidGoods( goods )\n{\n DEBUG_MODE && console.log( \"Calling checkValidGoods in ShipBO, goods:\" , goods );\n return inventoryMod.checkVal...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
fetch api and and use local storage
async storeMainAPILocally() { let storedItemList = JSON.parse(localStorage.getItem(LOCAL_STORAGE_KEY)); if (storedItemList) { this.intialSortBytitle(storedItemList); this.setState( {isLoading : false } ) } else { try { const url = "htt...
[ "async fetchText(key, element, type) {\n console.log(\"Fetching Text[JSON]\");\n try {\n const path = 'data/'+type+'/gallery_'+element.state.currentTab+'/'+element.state.currentText+type+\".json\";\n const response = await fetch(path);\n const data = await response.jso...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clean Coordinates From Current Line
clearCoordinatesFromCurrentLine() { this._currentLineCoordinates = [] }
[ "function removeBallInLine(new_x, new_y)\n{\n\tselectField(new_x, new_y);\n\tremoveBall(new_y + '_' + new_x);\n\tdeselectField(new_x, new_y);\n\taddScore();\n}", "function RemoveLines() {\n\tplot.selectAll(\"path.line\").remove()\n}", "function removePoint(){\n \t if(currentPt != null){\n \t\t map.remov...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
gaSpy The gaSpy is the listener for commands passed to the UA library. It accepts a single argument: the custom callback (which will be passed the GA command arguments when it is called).
function gaSpy( callback ){ var // The name of the global ga object. gaObjName = window.GoogleAnalyticsObject || 'ga', // The global ga object. ga = window[gaObjName], // Temp vars for processing GA command queue. k, q, i; /** * processArgs * Processes each set of arguments passed to `ga()` and ...
[ "trackCustomEvent($data, $event) {\n ga('send', 'event', $data, $event);\n }", "trackSocialInteraction($data) {\n ga('send', $data);\n }", "addGoogleAnalytics () {\n (function (i, s, o, g, r, a, m) {\n i['GoogleAnalyticsObject'] = r;\n i[r] = i[r] || function () ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes user attribute if exists.
removeUserAttribute(key) { if (!key || typeof key !== 'string') throw new TypeError('Invalid param, Expected String'); Instabug.removeUserAttribute(key); }
[ "clearAllUserAttributes() {\n Instabug.clearAllUserAttributes();\n }", "function removeCustomAttribute(customAttribute) {\n if (!(customAttribute in customQualificationData)) {\n return;\n }\n delete customQualificationData[customAttribute];\n displayCustomAttributes();\n}", "deleteAttributes(usernam...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a HemisphericLight object in the scene according to the passed direction (Vector3). The HemisphericLight simulates the ambient environment light, so the passed direction is the light reflection direction, not the incoming direction. The HemisphericLight can't cast shadows. Documentation :
function HemisphericLight(name, direction, scene) { var _this = _super.call(this, name, scene) || this; _this.groundColor = new BABYLON.Color3(0.0, 0.0, 0.0); _this.direction = direction || BABYLON.Vector3.Up(); return _this; }
[ "function HemisphericLight(name,direction,scene){var _this=_super.call(this,name,scene)||this;/**\n * The groundColor is the light in the opposite direction to the one specified during creation.\n * You can think of the diffuse and specular light as coming from the centre of the object in th...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
ebs_encryption_support computed: true, optional: false, required: false
get ebsEncryptionSupport() { return this.getStringAttribute('ebs_encryption_support'); }
[ "get userVolumeEncryptionEnabled() {\n return this.getBooleanAttribute('user_volume_encryption_enabled');\n }", "function encryption() {\n var DES_key = document.getElementById(\"payment_password\").value;\n if (DES_key.length != 0) {\n var encrypted_des_key = RSA_encryption(DES...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clears any data stored when calling isUnique()
function resetIsUnique() { // Clear what we have urlsOnPage = {}; titlesOnPage = {}; }
[ "function clear() {\n resetStore();\n }", "destroyDuplicateEntries() {\n const seen = new Set()\n for (const entry of this.entries.filter(isValidEntry)) {\n const stringOfEntry = entry.toString()\n if (seen.has(stringOfEntry)) entry.destroy()\n else seen.add(stringOfEntry)\n }\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Boolean function returns true if given function has given ancestor, and false otherwise. Checks 6 parents deep.
function hasAncestor(l, ance) { var tick, ancestor, ancestors = [1, 2, 3, 4, 5]; if (typeof ance === 'string') { ancestor = queryDOM(ance); } else { ancestor = ance; } ancestors[0] = l.parentNode; ancestors[1] = ancestors[0].parentNode; if (!!ancestors[1].parentNode) { ancestors[2] = ancest...
[ "function is_ancestor(node, target)\r\n{\r\n while (target.parentNode) {\r\n target = target.parentNode;\r\n if (node == target)\r\n return true;\r\n }\r\n return false;\r\n}", "isAncestor(descendentHash, ancestorHash) {\n return Objects.ancestors(descendentHash).indexOf(ances...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Asks prolog if the current player has available moves
checkAvailableMoves() { this.prolog.checkAvailableMoves(this.gameboard.toString(), this.currentPlayer) }
[ "static needPlayers() {\n\t\talert('There\\'s not enough players in the room');\n\t}", "hasReachedDestination() {\r\n\t\tvar destinationTiles = this.levelGrid.getDestination();\r\n\t\tfor (var i = 0; i < destinationTiles.length; i++) {\r\n\t\t\tvar destinationRow = destinationTiles[i].row;\r\n\t\t\tvar destinatio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks is the route between points is clear in a way that it does not have any walls => Drawing rectangle between dots, should not contain walls.
function isClearRoute(x1, y1, x2, y2) { var smallX = (x1 <= x2) ? x1 : x2, bigX = (x1 > x2) ? x1 : x2, smallY = (y1 <= y2) ? y1 : y2, bigY = (y1 > y2) ? y1 : y2; var coordinates = []; for (var y = smallY; y < bigY + 1; ++y) { for (var x = smallX;...
[ "function drawRoad(x1, y1, x2, y2, color) {\n ctx.beginPath();\n if (Math.abs(x1 - x2) > EPS) {\n ctx.moveTo(x1, y1 + 5);\n ctx.lineTo(x2, y2 + 5);\n ctx.lineTo(x2, y2 - 5);\n ctx.lineTo(x1, y1 - 5);\n } else if (y1 > y2) {\n ctx.moveTo(x1 - 4.5, y1 - 5);\n ctx.lineTo(x2 - 4.5...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
send sync command to clients
sendSyncCommand(client, property = null) { if (!client.online) { return; } let values = {}; if (property) { values[property] = this.rawData.data[property]; } else { values = this.rawData.data; } let command = { ...
[ "function sendDriveCommand (cmd) {\n return sendJson(createDriveCommand(cmd))\n}", "function sendCmd(cmd) {\n return sendJson(ip+\"/cmd/{'c':\"+cmd+\"}\");\n}", "syncChains() {\n this.sockets.forEach(socket => this.sendChain(socket));\n }", "sync_nearby ()\n {\n loot.CallRemoteCell('loot...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Fetches a new quote every 60 seconds
function getQuotes(){ setInterval(getQuote, 60000); getQuote(); }
[ "function getQuote() {\n fetch(url)\n .then(function (response) {\n if (response.ok) {\n return response.json();\n } else {\n return Promise.reject(response)\n }\n }).then(function (data) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Code Example 8.12 Create a new folder and two files: a sheet and a document. Add them to the new folder and remove them from the root folder.
function newFilesToShareInNewFolder() { var ss = SpreadsheetApp.getActiveSpreadsheet(), rootFolder = DriveApp.getRootFolder(), newFolder = DriveApp.createFolder('ToShareWithMick'), sh = SpreadsheetApp.create('mysheet'), shId = sh.getId(), shFile = DriveApp.getFileById(sh...
[ "function createTestFolder() {\n DriveApp.createFolder('test1');\n DriveApp.createFolder('test2');\n}", "function makeDuplicateFilesAndFolders() {\n SpreadsheetApp.create('duplicate spreadsheet');\n SpreadsheetApp.create('duplicate spreadsheet');\n DriveApp.createFolder('duplicate folder');\n DriveApp.creat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
given a Tree, this returns a Tree with the root having traveled right n places from the beginning
goRight(n, tree) { for (let i = 0; i < n; i++){ if (!tree.root.right) throw new Error(`Cannot go further right than ${i + 1} moves.`) tree.root = tree.root.right; } return tree; }
[ "goLeft(n, tree) {\n\t\tfor (let i = 0; i < n; i++){\n\t\t\tif (!tree.root.left)\n\t\t\t\tthrow new Error(`Cannot go further left than ${i + 1} moves.`)\n\t\t\ttree.root = tree.root.left;\n\t\t}\n\t\treturn tree;\n\t}", "function buildBalancedTree(array) {\n if (array.length == 0) { return null; }\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
DragDropRegister Function This function is responsible for activating the element with the drag and drop event handlers and refrence variables. The function takes the following parameters: objElementHandle: This is the element that needs to be clicked to be drug. objElement: If the handle is seperate from the element y...
function DragDropRegisterDrag(objElementHandle, objElement, minX, maxX, minY, maxY) { var dragDropHandler = this; // Refrence the registry // objElementHandle.registry = dragDropHandler; // Register the event // if (document.all) { objElementHandle.ondragstart = drag...
[ "function addDragHandlers(elem)\n{\n elem.addEventListener('dragstart', handleDragStart, false);\n elem.addEventListener('dragover', handleDragOver, false);\n elem.addEventListener('drop', handleDrop, false);\n elem.addEventListener('dragleave', handleDragLeave, false);\n\n}", "registerEventHandlers()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
different rule for i/we/they/you + infinitive that is, 'i walk' > 'i don\'t walk', not 'I not walk'
function isPronounAndInfinitive() { if (s.terms[i - 1]) { let p = s.terms[i - 1].text; return (p === 'i' || p === 'we' || p === 'they' || p === 'you') && (t.pos['Infinitive']); } return false; }
[ "function owofied(sentence) {\n\tconst a = sentence.replace(/i/g, \"wi\");\n\tconst b = a.replace(/e/g, \"we\");\n\treturn b + \" owo\";\n}", "function rule4(taggedSentence, index) {\r\n if (endsWith(taggedSentence[index][0], \"ly\")) {\r\n taggedSentence[index][1] = \"RB\";\r\n }\r\n }", "function ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a new Visibility. The group or role to which this item is visible.
function Visibility() { _classCallCheck(this, Visibility); Visibility.initialize(this); }
[ "constructor(visible) {\n if (visible == false) {\n this.hide();\n } else {\n this.show();\n }\n }", "get VisibilityMi() {\n return this.visibilityMi;\n }", "setVisibility() {\n errors.throwNotImplemented(\"setting visibility (dequeue options)\");\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
chordmaker.makeChord("seventh", [1,3,5,6,8,10,12]); /// Get all possible chords for a given input scale, given the chord types defined above
function getAllChords(inputScale){ var allChords = []; var chordSeeds = chordmaker.chords; // TODO -- this.chordmaker? // for each pitch in input scale, get array of possible chords for (var i = 0; i < inputScale.length; i++) { var thisMode = getMode(inputScale, i); // for each type of chord defined above, ...
[ "function chordScales(name) {\n const s = get(name);\n const isChordIncluded = (0, _pcset.isSupersetOf)(s.chroma);\n return (0, _scaleType.all)().filter(scale => isChordIncluded(scale.chroma)).map(scale => scale.name);\n}", "function getChord() {\n //get all playing keys\n var keys = document.querySelectorAl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
function : refreshMainPage parameter : what does this function do : Call ajax to update asynchronized the content of processlist partial page in main page. This function is used for automatic updating
function refreshMainPage() { MainPageAjaxUpdate(main_page_accumulate_page, main_page_current_sort, document.getElementById("main_page_search_input").value); }
[ "function MainPageAjaxUpdate(page, sort_input, process_name) {\n //alert(\"Input : \" + page);\n //alert(\"Input : \" + sort_input);\n //alert(\"Input : \" + process_name);\n $.ajax({\n type: \"POST\",\n url: '/Home/MainPageAjaxUpdate',\n data: { \"page\": page, \"sort_input\": sort...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this will find first blocked cell in path
function getBlockIndex() { log.debug("CALL: getBlockIndex()"); for (var index = 0; index < path.length; index++) { if (grid[path[index].x][path[index].y] == null || ( grid[path[index].x][path[index].y].type == 'ex' && avoidExit)) { log.debug("RESULT: getBlockI...
[ "function getNeighbors(cell) {\n let neighbors = [];\n\n // A cells neighbors is all vertically, horizontally, and\n // diagonally adjacent cells. To find all neighbors we need to\n // iterate the 3x3 area surrounding the target cell. We can\n // accomplish this by starting our iteration one cell les...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a TaskResult object from Twitter Data
function parseTwitterResult(data){ var result = { worker: data.direct_message.sender.id_str, data: data.direct_message.text, tag: null, valid: false }; function isTaskTag(tag) { return /^[a-zA-Z]{4}$/i.test(tag)} var taskTag = ""; var hasTag = false; for (var i = 0; i < data.direct_message.entities.hash...
[ "function processTweet(data) {\n\t\treturn [[ \"receiving transmission\" ], [\n\t\t\"type : tweet\",\n\t\t\"handle : \"+data.user.screen_name,\n\t\t\"name : \"+data.user.name,\n\t\t\"location : \"+data.user.location,\n\t\t\"message : \"+data.text,\n\t\t/* \"profile : \"+data.user.description, */\n\t\t\"date : \"+da...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Wraps jQuery's AJAX, adds XDomain support for IE
function xDomainAJAX (url, settings) { jQueryRequired(); $.support.cors = true; // enable x-domain if ($.browser.msie && parseInt($.browser.version, 10) >= 8 && XDomainRequest) { // use ms xdr var xdr = new XDomainRequest(); xdr.open(settings.type, url + '?' + $.param(settings.data)); ...
[ "function createXMLHttpRequestHandler() {\r\n if (window.XMLHttpRequest) {\r\n // code for IE7+, Firefox, Chrome, Opera, Safari\r\n xmlhttp = new XMLHttpRequest();\r\n } \r\n else {\r\n // code for IE6, IE5\r\n xmlhttp = new ActiveXObject(\"Microsoft.XMLHTTP\");\r\n }\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Allows you to add a new KalturaDropFolder object.
static add(dropFolder){ let kparams = {}; kparams.dropFolder = dropFolder; return new kaltura.RequestBuilder('dropfolder_dropfolder', 'add', kparams); }
[ "static add(dropFolderFile){\n\t\tlet kparams = {};\n\t\tkparams.dropFolderFile = dropFolderFile;\n\t\treturn new kaltura.RequestBuilder('dropfolder_dropfolderfile', 'add', kparams);\n\t}", "static get(dropFolderId){\n\t\tlet kparams = {};\n\t\tkparams.dropFolderId = dropFolderId;\n\t\treturn new kaltura.RequestB...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Class iglooHist object handles the retrieval and display of the history of a page
function iglooHist (pageTitle) { // timer var this.timer = null; this.pageTitle = pageTitle; }
[ "function History(){}", "function iglooPast () {\n\t//Temporary- overwritten on a new diff load\n\tthis.pageTitle = '';\n\tthis.hist = null;\n\n\t//Receives info for new diff\n\tvar me = this;\n\tigloo.hookEvent('history', 'new-diff', function (data) {\n\t\tme.pageTitle = data.pageTitle;\n\t\tme.hist = new iglooH...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Remove a key from the store.
remove(key) { delete this.store[key]; }
[ "remove(key) {\n var item = this.map[key];\n if (!item) return;\n this._removeItem(item);\n }", "remove(key) {\n if (this._data[key]) {\n this._busyMemory -= this._lifeTime[key].size;\n delete this._data[key];\n }\n }", "remove(key) {\n let index = Hash.hash(key, this.sizeLimit);\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Cast Series to specified data type
astype(dtype, options) { const { inplace } = { inplace: false, ...options }; if (!dtype) { throw Error("Param Error: Please specify dtype to cast to"); } if (!(DATA_TYPES.includes(dtype))) { throw Error(`dtype ${dtype} not supported. dtype must be one of ${DATA_TYPES}`); } const o...
[ "function _type(data){\n for (i = 0; i < settings.xColumn.length; i++) {\n if (settings.hasTimeX) {\n console.log(data[settings.xColumn[i]]);\n data[settings.xColumn[i]] = (new Date(data[settings.xColumn[i]]).getTime()) / 1000;\n console.log(data[settin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
copies the content of welcome view and puts it in the content tag.
function showWelcomeView() { console.log("loading welcome view..."); document.getElementById('content').innerHTML=(document.getElementById('welcomeview').innerHTML); }
[ "function createWelcomePage(name) {\n var parent = document.querySelector('.content');\n var newSection = document.createElement('section');\n newSection.classList.add('game-explanation');\n newSection.innerHTML = getWelcomePageStructure(name);\n parent.appendChild(newSection);\n}", "function welcomePage(req...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Express middleware to check if given param name is same as the user name who is currently logged in. If the name is same, then set res.locals.isMe to true.
function isMe() { return function(req, res, next) { res.locals.isMe = false; var me = res.locals.loginUser; if (me && me.name === req.params.name) { res.locals.isMe = true; } next(); }; }
[ "function passLoggedInUser(req, res, next){\n //Whatever is put in res.locals, is available in all the routes\n res.locals.loggedInUser = req.user;\n //Move on to next Middleware\n next();\n}", "function isRouteOwner(req, res, next) {\n if (!req.params.user) {\n next(new Error('Invalid route: miss...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
process line with fund manager name
function processMgr(line) { currMgr = line; //next few funds will be of this fund manager, so set it as current value if (!managerHash[currMgr]) { //making sure fund managers are not duplicated managers.push(currMgr); managerHash[currMgr] = currMgr; } }
[ "function processFund(line) {\n\tfundVals = line.split(';');\n\tlet fund = {};\n\n\tfor (i = 0; i < fundVals.length; i++)\n\t\tfund[headers[i]] = fundVals[i];\n\n\tif (fund['ISIN Div Payout/ ISIN Growth'] != '-') {\n\t\tfunds.push(processFundSplit(fund, 1));\n\t}\n\n\tif (fund['ISIN Div Reinvestment'] != '-') {\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Automatic setup of standard drag ports subscriptions.
function setup(elmApp) { elmApp.ports.dragstart.subscribe(processDragStart); elmApp.ports.dragover.subscribe(processDragOver); }
[ "function setPortForDragandDrop(device,action){\n\tsetSlotForDragandDrop(device);\n\tvar cnt = 0;\n\tvar prtArr = [];\n\tif(globalInfoType == \"JSON\"){\n\t\tprtArr = getDeviceChildPort(device,prtArr);\n }else{\n prtArr = device.PortArr;\n }\n\tvar flag = false;\n\tfor(var t=0 ; t<prtArr.length; t++){\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
' Name : handle_bp_cart_receipt_reprint ' Return type : None ' Input Parameter(s) : req, startTime, apiName ' Purpose : Creating a class to handle the BP_CART_RECEIPT_REPRINT API error with following members ' History Header : Version Date Developer Name ' Added By : 1.0 28th Apr,2012 Ravi Raj '
function handle_bp_cart_receipt_reprint(req, startTime, apiName) { this.req = req; this.startTime = startTime; this.apiName = apiName; }
[ "function handle_bp_cart_receipt(req, startTime, apiName) {\n this.req = req; this.startTime = startTime; this.apiName = apiName;\n}", "function handle_bp_cart_hist(req, startTime, apiName) {\n this.req = req; this.startTime = startTime; this.apiName = apiName;\n}", "function handle_bp_add_ver...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Move facet nodes down to the next fork or output node. Also pull the main output with the facet node. After moving down the facet node, make a copy of the subtree and make it a child of the main output.
function moveFacetDown(node) { if (node instanceof facet_1.FacetNode) { if (node.numChildren() === 1 && !(node.children[0] instanceof dataflow_1.OutputNode)) { // move down until we hit a fork or output node var child = node.children[0]; if (child instanceof aggregate_1.A...
[ "replaceWith (node) {\n node.path = this.path\n node.name = this.name\n if (!node.isLink)\n node.realpath = this.path\n node.root = this.isRoot ? node : this.root\n // pretend to be in the tree, so top/etc refs are not changing for kids.\n node.parent = null\n node[_parent] = this[_parent]...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Renvoie une chaine de caracteres representant le mot motComplet: Renvoie le complet si true ou si pas de parametres sinon renvoie le mot incomplet
toString(motComplet) { if (typeof motComplet != "boolean" || motComplet === true) { return this.motComplet; } else { return this.motIncomplet; } }
[ "afficherMotIncomplet() {\n var mot = this.mot.toString(false).split('');\n window.conteneurMot.innerHTML = \"Mot : \" + mot.join(' ');\n }", "afficherMotComplet() {\n var mot = this.mot.toString(true).split('');\n window.conteneurMot.innerHTML = \"Mot : \" + mot.join(' ');\n }",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The keys for constructing the join query
getRelationKeys() { return [`${this.relation.relatedModel().table}.${this.relation.relatedKeyColumnName}`]; }
[ "parseLeftJoin(sql) {\n const localCounter = 0;\n for (let i = 0; i < this.records.length; i++) {\n const record = this.records[i];\n if (record instanceof records_1.DLeftJoin) {\n const rec = record;\n sql += \" LEFT JOIN \"\n + r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Validates that the provided named option equals one of the expected values.
function validateNamedPropertyEquals(functionName, inputName, optionName, input, expected) { var expectedDescription = []; for (var _i = 0, expected_1 = expected; _i < expected_1.length; _i++) { var val = expected_1[_i]; if (val === input) { return; } expectedDescript...
[ "static vsamValidateOptions(options) {\n imperative_1.ImperativeExpect.toNotBeNullOrUndefined(options, ZosFiles_messages_1.ZosFilesMessages.missingFilesCreateOptions.message);\n /* If our caller does not supply these options, we supply default values for them,\n * so they should exist at this ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generates a Serial Number, based on a certain mask
function GenerateSerialNumber(mask){ var serialNumber = ""; if(mask != null){ for(var i=0; i < mask.length; i++){ var maskChar = mask[i]; serialNumber += maskChar == "0" ? GenerateRandomChar() : maskChar; } ...
[ "function generateUID() {\n return String(~~(Math.random()*Math.pow(10,8)))\n}", "gen_id(type){\n\n var str_prefix = \"\";\n var num_id = null;\n var arr_elems = null;\n switch (type) {\n case 'tool': str_prefix = \"t-\"; arr_elems= this.get_nodes('tool'); break;\n cas...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
HOC creator function that wrapps the user component. `injectSheet(styles, [options])(Component)`
function injectSheet(stylesOrSheet) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; if (options.index === undefined) { options.index = indexCounter++; } return function () { var InnerComponent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ...
[ "create(options) {\r\n return createOverlay('ion-action-sheet', options);\r\n }", "createStyleSheet(rules, options) {\n const sheet = new StyleSheet(rules, {...options, jss: this})\n this.sheets.add(sheet)\n return sheet\n }", "_initStyles() {\n const styles = this.constructor.styles ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
look into seats and render the guest if there is someone sitting on the seat
renderGuests () { this.bus.seats.forEach(seat => { if (!seat.isFree) { this.renderGuest(seat) /** * seat numbers are indices for the guests array. * during the rendering process this method is * called multiple times, so we do not push guests */ thi...
[ "renderSeats () {\n this.bus.seats.forEach((seat) => {\n this.renderSeat(seat)\n })\n }", "checkForAddedSeats(seats) {\n const userId = authService.getAuthenticatedUser().id;\n\n seats.forEach((row, rowNumber) => {\n row.forEach((seat, number) => {\n const isSeatNotListed =\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the Currency lable
currencylabel() { return this.props.to ? this.props.availableCoins[this.props.to].name : null; }
[ "callback(value) { return ynabToolKit.shared.formatCurrency(value); }", "static getCurrencyName(code) {\n let currencyName = this.getPhrase(code, \"CurrencyCode\");\n if (currencyName != \"\" && currencyName.length > 0)\n return currencyName;\n else\n return code;\n }...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Split a string path into an array of content op descriptors.
function splitPath( path, scheme, first ) { return path.split('/') .slice( first||0 ) .map(function splitOp( op ) { return new ContentOp( scheme, op.split(';').map( decodeURIComponent ) ); }); }
[ "function getResourcePathSplits(path) {\n\t\tvar\n\t\t\tparts = path.split('/'),\n\t\t\ti = parts.length,\n\t\t\tsplits = [[path, '']]\n\t\t;\n\t\twhile (--i >= 0) {\n\t\t\tsplits.push([\n\t\t\t\tparts.slice(0, i).join('/'),\n\t\t\t\tparts.slice(i).join('/')\n\t\t\t]);\n\t\t}\n\t\treturn splits;\n\t}", "function ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Try to recover from an error by 'deleting' (ignoring) one token.
recoverByDelete(next, nextEnd) { let isNode = next <= this.p.parser.maxNode if (isNode) this.storeNode(next, this.pos, nextEnd, 4) this.storeNode(0 /* Term.Err */, this.pos, nextEnd, isNode ? 8 : 4) this.pos = this.reducePos = nextEnd this.score -= 190 /* Recover.Delete */ ...
[ "function parserRecover() {\n var i, action;\n\n switch(errorFlag) {\n case 0: // 1st error\n if(parserError(state, lexicalToken, stackTop, getErrorMessage()) == 0) {\n return 0;\n }\n errorCount++;\n // continue...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called by the "Show all" button to select the button and show all files
function showAllFiles(tag) { indicateSelectedTag(tag); files.forEach(file => {file.style.display = 'inline-grid'}); }
[ "function showAll() {\r\n getData().then( (eps) => { \r\n getDisplayHTML(eps); \r\n });\r\n clearAll();\r\n showDisplay(); \r\n}", "function displayFile() {\n if (changed) {\n let fileName = $(this).val().split(\"\\\\\").pop();\n $(this).siblings(\".c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This function removes the given code from the codebook and reloads the button container.
codeRemovedEventHandler () { return (event) => { const code = event.detail.code code.theme.removeCode(code) // Reload button container this.reloadButtonContainer() // Dispatch codebook updated event LanguageUtils.dispatchCustomEvent(Events.codebookUpdated, { codebook: this.codebo...
[ "function removeCodeblock() {\r\n\r\n // Disable the codeblock buttons so they can't be hit multiple times.\r\n changeCodeblockButtons(false);\r\n jQuery('#codeblock_remove').button('option', 'label', 'Removing...');\r\n\r\n // Request the server removes the codeblock. This will also remove any\r\n /...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
todo: see how much this overlaps with DecodeAtom_FragmentSampleTable
async DecodeAtom_SampleTable(Atom,TrackId,MediaHeader,MovieHeader) { if ( !Atom ) return null; await Atom.DecodeChildAtoms(); Atom.ChildAtoms.forEach( a => this.NewAtomQueue.Push(a) ); // get all the atoms we're expecting // http://mirror.informatimago.com/next/developer.apple.com/documentation/QuickTi...
[ "parseChunks(chunk, byteStart) {\r\n if (!this._onError || !this._onMediaInfo || !this._onTrackMetadata || !this._onDataAvailable) {\r\n throw new IllegalStateException('Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified');\r\n }\r\n\r\n let off...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates tutorial divs based on style values from helpTutorial
function createTutorialDiv (parent, id, templateId){ // Create div element const tutorialDiv = document.createElement('div'); // Assign id and class to div tutorialDiv.id = id; tutorialDiv.classList.add("help"); // Style div based on template const jqTemplate = $("#" + templateId); const...
[ "function buildTopicsList() {\n var topicsList = $('<div id=\"tutorial-topic\" class=\"topicsList hideFloating\"></div>');\n\n var topicsHeader = $('<div class=\"topicsHeader\"></div>');\n topicsHeader.append($('<h2 class=\"tutorialTitle\">' + titleText + '</h2>'));\n var topicsCloser = $('<div ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handle a double tap by zooming in a single zoom level to a round zoom.
function onDoubleTap(tap) { var z = map.getZoom(), // current zoom tz = Math.round(z) + 1, // target zoom dz = tz - z; // desired delate // zoom in to a round number var p = new MM.Point(tap.x, tap.y); map.zoomByAbout(dz, p); ...
[ "function touch_click2zoom()\r\n{\r\n clear_screensaver();\r\n\r\n clearTimeout(t);\r\n flying = false;\r\n flying_2 = false;\r\n\r\n if (touch_XS&&touch_YS)\r\n {\r\n ws = ws/sensitivity3;\r\n xp = touch_XS + (xp-touch_XS)/sensitivity3;\r\n yp = touch_YS + (yp-touch_YS)/sensitivity3;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/////////////////////////// Multiple line chart /////////////////////////
function multipleLineChart(data) { var width = 200 var g = sidebar_svg.append("g") .attr("class","lineChart") .attr("transform", "translate(30, 0)") g.append('g') .attr('class', 'lines') g.append("g") .attr("class", "x_axis") g.app...
[ "function addPlotLines(chart){\n var d = new Date();\n d.setHours(0,0,0,0);\n\n for (i = 0; i < 6; i++){\n chart.xAxis[0].addPlotLine({\n value: d.getTime(),\n color: 'white',\n width: 3\n });\n d.setDate(d.getDate() - 1);\n } \...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TagDisplay a single tag list item props selected: Boolean is this item selected? onClick: a function accepting no arguments (curry it before passing it in!) text: text to display href: link destination
function TagDisplay(props) { return( <Link to={props.href} className={"item" + (props.selected ? " active" : "")} onClick={props.onClick()} > {/*<div className={"ui checkbox" + (props.selected ? " set checked" : "")}> <input type="checkbox" /> </div>*/} {props.tex...
[ "function indicateSelectedTag(tag) {\n clearSelectedTags();\n tag.classList.add(\"tags-btn__selected\");\n}", "function onClickTag(e)\n{\n\tif (!e) var e = window.event;\n\tvar theTarget = resolveTarget(e);\n\tvar popup = createTiddlerPopup(this);\n\tvar tag = this.getAttribute(\"tag\");\n\tvar title = this...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
When the component is attached to the document (or upgraded), we will generally render the component for the first time. That operation will include rendering of the default state and any state changes that happened between constructor time and this connectedCallback.
connectedCallback() { if (super.connectedCallback) { super.connectedCallback(); } // Render the component. // // If the component was forced to render before this point, and the state // hasn't changed, this call will be a no-op. this[renderChanges](); }
[ "_render() {\n if (this._connected && !!this._template) {\n render(this._template(this), this, {eventContext: this});\n }\n }", "renderedCallback() {\n if (this.initialRender) {\n if (!this.disableAutoScroll) {\n this.setAutoScroll();\n }\n }\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
should be called when user is able to make first input sets tm_startTime and starts interval
function tm_start() { tm_startTime = Date.now(); tm_intervalId = setInterval(tm_calculate, tm_intervalTime); // avg key presses per minute get updated on every keystroke or every 2.5 seconds }
[ "function startClock() {\n let textEnteredLength = input.value.length;\n if (textEnteredLength === 0 && !isRunning) {\n isRunning = true;\n runningClock = setInterval(runClock, 10);\n }\n}", "function scanprev() {\n setTime(startdateinmilliseconds - diffmilliseconds, enddateinmilliseconds - diffmillis...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Funcion llamada desde el listado de websites para mostrar los usuarios vinculados a una web en una datatable
function listadoUsuariosWeb(idWebSite) { jQuery.post( "./modulos/sitiosWeb/dk-logica.php", { accion: "obtenerInfoWebsite", idWebsite: idWebSite }, function(data, textStatus) { var dataJSON = JSON.parse(data); if (dataJSON.status == "OK") { $('#idWebsiteEditando').val(idWebSite);...
[ "function getOnlineUsers(){\n\tvar url = \"https://\"+CURRENT_IP+\"/cgi-bin/NFast_3-0/CGI/RESERVATIONMANAGER/FastConsoleCgi.py?action=getuseronline\";\n//\tvar url = getURL('Console', 'JSON')+action=getuseronline;\n\n\t$.ajax({\n\t\turl: url,\n\t\tdataType:'html',\n\t\tasync: false,\n\t\tsuccess: function(data){\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Show alert when leaving a .gov domain.
function alertLeavingUsg(e, newHostname) { if (!newHostname && !newHostname.match(/\.gov$/)) { if (confirm('You are about to leave this web site for a destination ' + 'outside of the Federal Government. You may wish to ' + 'review each privacy notice since th...
[ "function _registerLeaveAlertListener() {\n window.addEventListener(\"beforeunload\", _leaveAlertEvent);\n }", "function popupPVAsWindow_onunload(event)\n{\n\ttry\n\t{\n\t\tif (!window.close())\n\t\t{\n\t\t\tdt_pvClosePopUp(false);\n\t\t}\n\t}\n\tcatch(e)\n\t{\n\t}\n}", "function _destroyLeave...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
coerce every string in the given object / array
function coerceAll(obj) { var type = Array.isArray(obj) ? 'array' : typeof obj; switch(type) { case 'string': return coerce(obj); break; case 'object': Object.keys(obj).forEach(function (key) { obj[key] = coerceAll(obj[key]); }); break; case 'array': obj....
[ "function collectStrings(obj) {\n let newArr = [];\n\n for (let key in obj) {\n let value = obj[key];\n if (typeof value === \"string\") {\n newArr.push(value);\n } else if (typeof value === \"object\" && !Array.isArray(value)) {\n // console.log(\"1️⃣\", newArr);\n newArr = newArr.concat(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Menucool Thumbnail Slider v2012.9.11. Copyright
function ThumbnailSlider(f){var F=function(a,c){var b=a.length;while(b--)if(a[b]===c)return true;return false},G=function(b,a){return F(b.className.split(" "),a)},y=function(a,b){if(!G(a,b))if(a.className=="")a.className=b;else a.className+=" "+b},w=function(a,b){var c=new RegExp("(^| )"+b+"( |$)");a.className=a.classN...
[ "function initThumbnailStrip(pos)\r\n{\r\n $(\".main .thumbnail_image_wrapper_iws2\").jCarouselLite(\r\n {\r\n \t btnNext: \".main .next\",\r\n \t btnPrev: \".main .prev\",\r\n \t speed: 10,\r\n \t circular: false,\r\n \t visible: visible_thumbnail_images,\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Go next game type if possible
function incrementGameType() { if (vm.currentGameType < vm.totalGameTypes) { vm.currentGameType += 1; switchGameType(vm.currentGameType); } }
[ "checkNextGame (){\n\n }", "function runGame(type) {\n if (type === 'general') {\n questions = questions_general;\n } else if (type === 'trivia') {\n questions = questions_trivia;\n } else if (type === 'oscars') {\n questions = questions_oscars;\n } else if (type === 'quotes') ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This function is used to write bookmarks into the database
function addBookmark(title,url,agent) { var db = getDatabase(); var res = ""; db.transaction(function(tx) { // Remove and readd if url already in bookmarks removeBookmark(url); //console.debug("Adding to bookmarks db:" + title + " " + url); var rs = tx.executeSql('INSERT OR ...
[ "function saveCB () {\n\tupdateBrain (function () {\n\t\tdoXML (\"getbookmark\", function (responseText) {\n\t\t\t// Parse the returned data\n\t\t\tvar url = responseText.split(\"\\n\")[0]\n\t\t\tvar title = responseText.split(\"\\n\")[1]\n\t\t\tvar tempfilename = responseText.split(\"\\n\")[2]\n\t\t\tvar selection...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
wrapper for [CPException raise:format:arguments:] for CPInvalidArgumentException
function objj_throw_arg(error, ...args) { objj_initialize(_CPException2.default).raise_format_arguments_(_CPException.CPInvalidArgumentException, new _CPString2.default(error), args); }
[ "function Exception(message){if(message===void 0){message=undefined;}var _this=_super.call(this,message)||this;_this.message=message;return _this;}", "function raise(exc, str) {\n if (str === undefined) {\n str = exc;\n exc = eException;\n }\n\n var exception = exc.m$new(str);\n raise_exc(exception);\n}...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
JQuery callback function to add hobbies
function callBackHobbies(data) { var hobbies = $("#hobbies > div:nth-child(2)"); data.forEach(function (d) { //add picture to hobbie var foto = $("<img class= \"col-8 icon rounded-circle\" />") .attr("alt", d.alt) .attr("src", d.img); //add title var titl...
[ "function newHobbies() {\n showHobbies();\n const q = chalk.blue(`Type in your girl friend's hobby (or enter to quit): `);\n prompt(q).then(hobby => {\n if (hobby) {\n db.get('hobbies')\n .push(hobby)\n .write();\n }\n console.log(chalk.green('Ok!'));\n });\n}", "function confirmBu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets up bindings on the pledge slide
function setupPledgeSlide(root) { if (pledgeRootElement) return; pledgeRootElement = root; setupPledgeAddressAutocomplete(root); setupPledgeValidation(root); return true; }
[ "function setupSlides() {\n const config = Reveal.getConfig;\n\n Reveal.getSlides().forEach(function (slide) {\n slide.style.height = pageHeight + \"px\";\n\n if (Reveal.getConfig().center || slide.classList.contains(\"center\")) {\n // Reveal implements centering by adjusting css:top. Remove...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
LOAD_NODE_MODULES(X, START) 1. let DIRS = NODE_MODULES_PATHS(START) 2. for each DIR in DIRS: a. LOAD_AS_FILE(DIR/X) b. LOAD_AS_DIRECTORY(DIR/X)
async loadNodeModules(x, start) { assert(typeof x === 'string'); assert(typeof start === 'string'); const dirs = this.nodeModulesPaths(start); for (const dir of dirs) { const dx = join(dir, x); const a = await this.loadAsFile(dx); if (a) return a; const b = await this...
[ "nodeModulesPaths(start) {\n assert(typeof start === 'string');\n assert(isAbsolute(start));\n\n const paths = [];\n\n let globalPaths = this.npm ? NPM_PATHS : GLOBAL_PATHS;\n\n if (this.paths.length > 0)\n globalPaths = this.paths.concat(globalPaths);\n\n let last = start.length;\n let p ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Remove the requested number of tokens. If the bucket (and any parent buckets) contains enough tokens this will happen immediately. Otherwise, the removal will happen when enough tokens become available.
async removeTokens(count) { // Is this an infinite size bucket? if (this.bucketSize === 0) { return Number.POSITIVE_INFINITY; } // Make sure the bucket can hold the requested number of tokens if (count > this.bucketSize) { throw new Error(`Requested tokens...
[ "async removeTokens(count) {\n // Make sure the request isn't for more than we can handle\n if (count > this.tokenBucket.bucketSize) {\n throw new Error(`Requested tokens ${count} exceeds maximum tokens per interval ${this.tokenBucket.bucketSize}`);\n }\n const now = (0,_clock...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
syncTabs 1.0 Comunicacion entre ventanas y pestanas de un mismo dominio Permite el envio de funciones y parametros para ser ejecutados en otras pestanas con el concepto de un master y muchos slave
function syncTabs(roleCallbacks){ //Compatibilidad con navegadores obsoletos if(typeof localStorage === 'undefined' || typeof JSON === 'undefined'){ var functions = ['add', 'registerCallback', 'getRole'], r = {}; for(var i=0; i<functions.length; i++){ r[functions[i]] = function(){}; } return r; } /...
[ "function updateMincutManager(formData, tabName, device, cb) {\n try {\n _self.emit(\"log\", \"mincut.js\", \"updateMincutManager(\" + tabName + \",\" + device + \")\", \"info\", formData);\n\n var dataToSend = {}; //dynamic attributes\n\n for (var k in formData) {\n if (formData.hasOwnProp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
CHECKLABEL:function delete_literal() CHECKNEXT:frame = [] CHECKNEXT: %BB0: CHECKNEXT: %0 = ReturnInst true : boolean CHECKNEXT: %BB1: CHECKNEXT: %1 = ReturnInst undefined : undefined CHECKNEXT:function_end
function delete_literal() { return (delete 4); }
[ "exitFunctionLiteral(ctx) {\n\t}", "function delete_expr() {\n return (delete sink());\n}", "exitLiteralConstant(ctx) {\n\t}", "function foo(a,b) {\n \n // Now, deleting 'a' directly should fail\n // because 'a' is direct reference to a function argument;\n var d = delete a;\n return (d === fals...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Draw a perspectivecorrected textured triangle, subdividing as necessary for clipping and texture mapping. Unconventional clipping recursively subdivide, and drop whole tris on the wrong side of z clip plane.
function drawPerspectiveTri(c3d, v0, v1, v2, depth_count) { var clip = ((v0.z < MIN_Z) ? 1 : 0) + ((v1.z < MIN_Z) ? 2 : 0) + ((v2.z < MIN_Z) ? 4 : 0); if (clip == 0) { // No verts need clipping. drawPerspectiveTriUnclipped(c3d, v0, v1, v2, de...
[ "mapTriangle(ctx,p0, p1, p2, p_0, p_1, p_2) {\n\n // break out the individual triangles x's & y's\n var x0=p_0.x, y0=p_0.y;\n var x1=p_1.x, y1=p_1.y;\n var x2=p_2.x, y2=p_2.y;\n var u0=p0.x, v0=p0.y;\n var u1=p1.x, v1=p1.y;\n var u2=p2.x, v2=p2.y;\n\n // save the unclipped & untransformed...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
ListDBRandomTeam despliega a los jugadores en equipos y parejas
function ListDBRandomTeam() { $('#dbRandTeam').html(''); db.transaction(function(transaction) { transaction.executeSql('SELECT * FROM jugadores, equipos WHERE jugadores.UserId = equipos.jugadorId ORDER BY equipos.numEquipo ASC, equipos.numPareja ASC', [], function(transaction, result) { ...
[ "function ListDBHandicapTeam() {\r\n $('#dbHandTeam').html('');\r\n db.transaction(function(transaction) {\r\n transaction.executeSql('SELECT * FROM jugadores, equipos WHERE jugadores.UserId = equipos.jugadorId ORDER BY equipos.numEquipo ASC, equipos.numPareja ASC, jugadores.Handicap ASC', [],\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
converts latitude and longitude to default projections on map
toDefaultProjection(lat, long) { return ol.proj.transform([long, lat], 'EPSG:4326', 'EPSG:3857'); }
[ "function hackMapProjection(lat, lon, originLat, originLon) {\n var lonCorrection = 1.5;\n var rMajor = 6378137.0;\n\n function lonToX(lon) {\n return rMajor * (lon * Math.PI / 180);\n }\n\n function latToY(lat) {\n if (lat === 0) {\n return 0;\n } else {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
merge two sorted array x and y
function merge(x, y, len_x) { // cnt is number of out of order triples // res is the new sorted array(each element is tri) // x and y are going to be combined // len_x is number of elements that have not been added to the new array // used_y is number of elements that have been a...
[ "function mergeSortedArray(a, b){\r\n var merged = [],\r\n aElm = a[0],\r\n bElm = b[0],\r\n i = 1,\r\n j = 1;\r\n\r\n if(a.length ==0)\r\n return b;\r\n if(b.length ==0)\r\n return a;\r\n\r\n while(aElm || bElm){\r\n if((aElm && !bElm) || aElm < bElm){\r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new class. Used to support different versions of classes based on the NDR version.
static create(ndrVersion, ...args) { }
[ "function Class(){\n var constructor = function(){};\n constructor.prototype = Object.create(Class.prototype);\n return new ClassFactory(constructor);\n }", "function myNew(constructor, ...args) {\n // skip this part...\n // it explains how 'new' is written in ES5\n}", "function instantiate(modu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a GlobalAveragePooling1D layer
constructor(attrs = {}) { super(attrs) this.layerClass = 'GlobalAveragePooling1D' this.poolingFunc = 'average' }
[ "constructor (attrs = {}) {\n super(attrs)\n this.layerClass = 'GlobalMaxPooling1D'\n }", "constructor (attrs = {}) {\n super(attrs)\n this.layerClass = 'MaxPooling3D'\n\n this.poolingFunc = 'max'\n }", "function GlowLayer(name,scene,options){var _this=_super.call(this,name,scene)||this;_this._...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reset the state of the change objects to show no changes. This means set previousKey to currentKey, and clear all of the queues (additions, moves, removals). Set the previousIndexes of moved and added items to their currentIndexes Reset the list of additions, moves and removals
_reset() { if (this.isDirty) { let record; for (record = this._previousItHead = this._itHead; record !== null; record = record._next) { record._nextPrevious = record._next; } for (record = this._additionsHead; record !== null; record = record._next...
[ "resetIndexes()\n {\n const self = this;\n self[_reducedIndexes] = null;\n self[_optimizedIndexes] = null;\n self[_naiveIndex] = null;\n self[_keyStatistics] = null;\n }", "reset() {\r\n\t\tthis.changeState(this.initial);\r\n\t}", "resetIndex() {\n this._offset = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }