query
stringlengths
9
34k
document
stringlengths
8
5.39M
negatives
listlengths
19
20
metadata
dict
livesuggest (search results page: live feed of matches)
livesuggest () { // check if calls for live suggest are allowed let allowCall = true // grab element const $input = $('input[data-role=fork-search-field][data-live-suggest=enabled]') // change in input = do the dance: live search results completion $input.on('keyup', (e) => { const $sear...
[ "function autoSuggestSearch (searchbox){ \n showSuggestSearchList(searchbox); \n}", "function findMatches() {\n if (!this.value) { \n suggestions.innerHTML = \"\";\n return; \n }\n const wordToMatch = this.value;\n const finalEndpoint = `${endpoint}&per_page=${...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Destroy marker by index
destroyMarker(n) { this._destroyMarker(n); }
[ "function deleteMarker(index) {\n map.markers[index].setMap(null);\n deleteObjectsInputs('#marker_' + index);\n deleteObjectsInputs('#marker_coords_' + index);\n deleteObjectsInputs('#marker_' + index + '_cnr');\n deleteObjectsInputs('#marker_' + index + '_rmv');\n deleteOb...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Compare result and grid.
isGridValid () { return this.grid === this.results }
[ "function matchGrid(grid, answer) {\n if (grid.length != answer.length || grid[0].length != answer[0].length) {\n return false;\n }\n var i;\n var j;\n for (i = 0; i < grid.length; i++) {\n for (j = 0; j < grid[i].length; j++) {\n if (grid[i][j] != answer[i][j]) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Triggers the clusterclick event and zoom's if the option is set.
triggerClusterClick() { const markerClusterer = this.cluster_.getMarkerClusterer(); // Trigger the clusterclick event. google.maps.event.trigger(markerClusterer, 'clusterclick', this.cluster_); if (markerClusterer.isZoomOnClick()) { // Zoom into the cluster. this.map_.fitBounds(this.cluste...
[ "function zoomToFeature() {\n self.triggerZoom();\n }", "function onClusterClick() {\n animateLayout()\n}", "function zoomButtonClicked(which_button) {\n\t\t\tswitch(which_button) {\n\t\t\t\tcase \"zoom_in\":\n\t\t\t\t\tzoomInByClick(); break;\n\t\t\t\tcase \"zoom_out\":\n\t\t\t\t\tzoomOutB...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Load all of the possible US ZipCodes from file into an array to be used later
function loadMarkerZipCodes() { $.ajax({ url: "us-zip-codes.txt", success: function (result) { markerZipCodeString = "" + result; markerZipCodeArray = $.csv.toArrays(markerZipCodeString); } }); }
[ "function loadCountries() {\n return loadFileAsArray('allCountries.txt');\n}", "function parseCountryCodes() {\n Papa.parse(\"assets/data/country-codes.csv\", {\n download: true,\n complete: function (results) {\n createCountryOptions(results.data);\n }\n });\n}", "functio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Arguments$prototype$lte :: Arguments ~> Arguments > Boolean
function Arguments$prototype$lte(other) { return Array$prototype$lte.call (this, other); }
[ "function Arguments$prototype$lte(other) {\n return Array$prototype$lte.call(this, other);\n }", "static lte(...args) { return this.__query().lte(...args); }", "lte(other) { return this.cmp(other) <= 0; }", "function Boolean$prototype$lte(other) {\n return typeof this === 'object' ?\n lte (this.va...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The function makeRow calls the parameter of text, sets the variable of li which is used to create a JQuery looking for the html element li. The addClass appends the next 2 items, listgroupitem and listgroupitemaction to the li text and displays the text of the li element. The listgroupitemaction sets the focus for this...
function makeRow(text) { let li = $("<li>").addClass("list-group-item list-group-item-action").text(text); $(".history").append(li); }
[ "function makeRow(text) {\n //uses jQuery to make a new list item element with several classes and sets the text equal to the text parameter passed into the function\n var li = $(\"<li>\").addClass(\"list-group-item list-group-item-action\").text(text);\n //appends new list item to the history unor...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
create a cell containing actions for a book : update, see details, delete
function createActionsColumn(book, tableRow) { const actionsColumn = document.createElement('td'); actionsColumn.setAttribute('class', 'text-center'); const editButton = document.createElement('a'); editButton.setAttribute('type', 'button'); editButton.setAttribute('data-toggle', 'modal'); ...
[ "function editBook() {\n var yybkcat = SpreadsheetApp.getActiveSpreadsheet();\n var booklist = yybkcat.getActiveSheet();\n \n /* books are edited in the book list */\n if(booklist.getName()!=\"booklist\") {\n Browser.msgBox(\"switch to booklist\");\n return;\n }\n \n /* the first row is the column nam...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
player list to html parser
function playerListToHTML(list) { let htmlString = ""; for (let i=0;i<list.length;i++) htmlString += list[i].playerName + "<br>"; return htmlString; }
[ "getList(){\n var html = \"\"\n playList.forEach(song => {\n const id = song.id\n const extraClass = id === selectedVideo ? \"selected\" : \"\"\n html += `<div class=\"playlist-song ${extraClass}\">\n <div id=\"${id}\">${s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Now for the DogAdderService
function DogAdderService() { return through.obj(function (msg, enc, cb) { if (msg.type !== types.ADD_DOG) return cb(); // VALIDATION SHOULD COME HERE setTimeout(function () { dogs.push(msg.dog); // And now, we have a change in our domain, we should notify about it. this.push(messages....
[ "function Dog (name, status, color, hungry, owner, cool) {\n this.name = name;\n this.status = status;\n this.color = color;\n this.hungry = hungry;\n this.owner = owner;\n this.cool = cool;\n}", "function Dog(name, breed, mood, hungry) {\n this.name = name;\n this.breed = breed;\n this.mood = mood;\n t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
checking if qr code is valid
function validate(){ qrCode=getInputVal('qrCode'); let deviceStrlt=qrCode.indexOf('STRLT'); let deviceWthr=qrCode.indexOf('WEATHER'); let deviceGarbage=qrCode.indexOf('GARBAGE'); let deviceParking=qrCode.indexOf('PARKING'); if(qrCode==""){ document.getElementById('alert').style.color = 'blue'; ...
[ "static validateQR(data) {\n\t\t// if (data.startsWith('dande.li/ics')) {\n\t\tif (data.startsWith('dande')) {\n\t\t\treturn true\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}", "function isValidRawCode(code) {\r\n var temp = parseInt(code.value, 16);\r\n \r\n if (isNaN(temp)) {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a function that divides one number by another and returns the remainder plus 10
function div2 (n1,n2) { return(n1%n2+10) }
[ "function divide(n1,n2) {\n return n1 % n2 + 10\n}", "function remainder(numerator, denominator) {\n // YOUR CODE HERE\n}", "function divisionRemainder(num1, num2){\n let calculation3 = num1/num2\n return `${num1} divided by ${num2} is ${Math.floor(calculation3)} with a remainder of ${num1 % num2}`\n}...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Efface les div contenant l'image et les boutons de l'activite Utilise les fonctions formatTitle, formatScore, et formatFeedback pour creer le contenu du feedback de l'activite Affiche le feedback de l'activite
function afficherLesResultats(){ document.getElementById("divImage").style.display = 'none'; mvButtons.display="none"; mvResultats.title=formatTitle(DIFFICULTE); mvResultats.score=formatScore(score, MAX_IMAGES); mvResultats.feedback=formatFeedback(); mvResultats.display="block"; }
[ "function createDivs() {\r\n const dateNow = Date.now();\r\n var title, phpNo, cctvNo, NN;\r\n for ( var index = 0; index < camDef.length; index++ ) {\r\n [ title, phpNo, cctvNo ] = camDef[ index ];\r\n NN = `00${index}`.slice( -2 );\r\n\r\n newDiv = doc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This function clears out the textarea and resets the character counter after a new tweet.
function resetTweetForm(){ $('.new-tweet textarea').val(''); $('.new-tweet .counter').text('140'); }
[ "function clearNumOfChars() {\n var numOfCharsEl = document.getElementById(\"numofchars-textarea\");\n numOfCharsEl.value = \"\";\n }", "function wtUpdateTweetCount() {\n\tvar innerText;\n\tvar theTextArea = jQuery( 'textarea#wt-tweet-textarea' );\n\tif ( theTextArea.length ) {\n\t\tinnerText = t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This only takes care of changing the style of the attach button to show an indicator that something is attached (green)
function somethingAttached(e) { e.preventDefault(); const isThereFile = document.querySelector("[name=attachment]").files.length > 0; this.parentNode.querySelector("label").classList.toggle("file-loaded", isThereFile); }
[ "function setRecordButtonUi() {\n if (videolifyTheme == \"ghost\") {\n recordStreamBtn.style.setProperty(\"background-color\", \"transparent\");\n } else {\n recordStreamBtn.style.setProperty(\"background-color\", \"white\");\n }\n}", "function setActivatedEffect(button){\r\n button.setAttribute('colo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
.............................................................................. / === History backup old crawler pageFunction(), synch version === pre2018 version: Supermaster_FIN_season_172_calendar
function pageFunction_ForSeason172_oldCrawler(context) { // called on every page the crawler visits, use it to extract data from it var $ = context.jQuery; var result = []; var curr_year = ''; var curr_month = ''; $('table.calendario tr').each( function() { if ( $(this).find('th').first...
[ "function pageFunction_Pre2018_currentMeetings_oldCrawler(context) {\n // called on every page the crawler visits, use it to extract data from it\n var $ = context.jQuery;\n var result = [];\n var curr_year = '';\n var curr_month = '';\n\n $('table.calendario tr').each( function() {\n if ( ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Transform constraints objects into the new format (unless Chromium) TODO: This can be removed when Chromium supports the new format
static transformConstraints (constraints) { if (Object.keys(constraints).length === 0) { return constraints } if ((constraints.mandatory || constraints.optional) && !CHROMIUM) { // convert to new format // Merge mandatory and optional objects, prioritizing mandatory var newConstrai...
[ "function setConstraints(primitive, constraints) {\n\tmap(primitive, function(primitive) {\n\t\tsetAttributeUndoable(primitive, \"MinConstraint\", constraints[0]);\n\t\tsetAttributeUndoable(primitive, \"MinConstraintUsed\", constraints[1]);\n\t\tsetAttributeUndoable(primitive, \"MaxConstraint\", constraints[2]);\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Evaluate the BSplineCurve at given parameter value If `tess` parameter is provided then the evaluated value is placed in the `tess` array at index `tessidx`. Otherwise the single euclidean point is returned.
evaluate(t, tess, tessidx) { let p = this.degree; let span = this.findSpan(t); let dim = this.dimension; let N = this.evaluateBasis(span, t); let denominator = this.getTermDenominator(span, N); if (tess) { tessidx = tessidx || 0; for (let i...
[ "evaluate(u, tess, tessidx) {\r\n let B = helper_1.bernstein(this.degree, u);\r\n let dim = this.dimension;\r\n let denominator;\r\n if (this.weights) {\r\n denominator = 0;\r\n for (let i = 0; i < this.degree + 1; i++) {\r\n denominator += B[i] * thi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
ModelToolbar is part of $3Dmol.UI to edit or change the model loaded into the viewer
function ModelToolbar() { var boundingBox = this.ui = $('<div></div>'); boundingBox.css({ 'position': 'relative', 'min-width': '150px' }); var modelButton = new button(icons.molecule, 20, { tooltip: 'Toggle Model Selection Bar' }); boundingBox.append(modelButton.ui); ...
[ "function initToolbar() {\n // Create and listen for polygon Draw events\n tb = new Draw(map);\n tb.on(\"draw-end\", addGraphicOnSelect);\n\n on(dom.byId(\"info\"), \"click\", function (evt) {\n if (evt.target.id === \"info\") {\n return;\n }\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the game directory
setGameDir(dir) { }
[ "gameDir() {\n return __dirname;\n }", "gameDir() { }", "get outputDirInServer() {\n return path_1.default.resolve(this.outputDir, './server');\n }", "function getCacheDir() {\n var cacheDir = [Config.cache, 'screenshots'].join('/');\n return fs.realpathSync(cacheDir);\n}", "getDir...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to reset parameters and close List displaying records
closeSearchList() { this.searchList = []; this.showSearchList = false; this.searchText = ''; this.recordFound = false; }
[ "function closeListFn() {\n // reset filters\n $scope.letters = $scope.onlyActive ? playersActiveGrouped.slice(0) : playersAllGrouped.slice(0);\n $scope.search.player = \"\";\n $scope.search.team = \"\";\n $scope.selectedLetter = \"\";\n // hide list...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Eitherfantasyland/traverse :: Applicative f => Either a b ~> (TypeRep f, b > f c) > f (Either a c) . . `traverse (A) (f) (Left (x))` is equivalent to `of (A) (Left (x))` . `traverse (A) (f) (Right (x))` is equivalent to `map (Right) (f (x))` . . ```javascript . > S.traverse (Array) (S.words) (Left ('sqrt undefined for ...
function Left$prototype$traverse(typeRep, f) { return Z.of (typeRep, this); }
[ "function Array$prototype$traverse(typeRep, f) {\n var xs = this;\n function go(idx, n) {\n switch (n) {\n case 0: return of (typeRep, []);\n case 2: return lift2 (pair, f (xs[idx]), f (xs[idx + 1]));\n default:\n var m = Math.floor (n / 4) * 2;\n return lift2 (conc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Zero all the values and set the first byte to 1.
one() { this.data.fill(0); this.data[0] = 1; }
[ "one() {\r\n this.data.fill(0);\r\n this.data[0] = 1;\r\n }", "clear() {\n const max = this.bits.length;\n const bits = this.bits;\n for (let i = 0; i < max; i++) {\n bits[i] = 0;\n }\n }", "clear() {\n let max =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
OUTPUT FUNCTIONS Outputs data stored in "content" to HTML element with id matching "target."
function outputReplace (target, content) { //Replaces existing target content with new content document.getElementById(target).innerHTML = content; }
[ "function writeToOutput(outputId,content){\n document.getElementById(outputId).innerHTML=content;\n\n }", "function outputTargetText(input) {\n outputTarget.innerHTML = input;\n}", "function display($target) {\n\n $target.html(render());\n\n }", "function WriteControl(target)\n{\n\n do...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use the Office dialog API to open a popup and display the signin page for the identity provider.
function showLoginPopup(url) { // var fullUrl = location.protocol + '//' + location.hostname + (location.port ? ':' + location.port : '') + url; // height and width are percentages of the size of the parent Office application, e.g., PowerPoint, Excel, Word, etc. Office.context.ui.displayDialogA...
[ "signInWithPopup() {\n window.open(getWidgetUrl(), 'Sign In', 'width=985,height=735');\n }", "function showLoginPopup(url) {\n var fullUrl = location.protocol + '//' + location.hostname + (location.port ? ':' + location.port : '') + url;\n\n // height and width are percentages of the size of the parent ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Household Request (LEAVE) render request Household Leave
function hhReqLeave_render(req,res){ if(req.valid==0) res.render('admin/views/transaction_hhRequest_leave', { usertab: req.user, leaveReq: req.displayLeaveReq }); else if(req.valid==1) res.render('admin/views/invalidpages/normalonly'); else res.render('login/views/invalid')...
[ "sendLeavePortalRequest() {\n log.debug('Sending request to leave portal.');\n const msgHeader = new MessageBuilder().\n setType(LEAVE_PORTAL_REQUEST).\n setPortalHostPeerId(this.portalHostPeerId).\n setTargetPeerId(this.portalHostPeerId).\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the selected number of wristbands from the drop down list; get the wristbands label and price
function wband_total() { var wband_no = document.getElementById("wistb").value; wbNumber = parseInt(wband_no); //alert("in wband_total - wbNumber " + wbNumber); var wb_text = document.getElementById("wb_label").textContent; //alert("wb_text " + wb_text); updateWbBasket(wbNumber,wb_text); setCo...
[ "_getBandContainerHTML() {\n const ppmOpts = this._bandColorDict['ppm'];\n const multOpts = this._bandColorDict['multiplier'];\n const tolOpts = this._bandColorDict['tolerance'];\n\n let html = '<div class=\"band-container\">';\n for (let i = 1; i <= 3; i++) {\n html += `\n <div class=\"b...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the public url of an openstack API, determined by the service's name. It gives precedence to urls stored in the app.conf file over the ones exposed through the serviceCatalog.
function getServiceUrl(serviceName) { var urlType = arguments.length <= 1 || arguments[1] === undefined ? 'publicURL' : arguments[1]; var appConfig = arguments.length <= 2 || arguments[2] === undefined ? getAppConfig() : arguments[2]; var serviceUrl = appConfig[serviceName] || getFromServiceCatalog(serviceNa...
[ "function get_api_url() {\n if (location.hostname === \"localhost\" || location.hostname === \"127.0.0.1\" || location.hostname === \"\") {\n return \"http://localhost:3000/\";\n } else {\n return \"https://s5bezpvqp6.execute-api.us-east-1.amazonaws.com/dev/\";\n }\n}", "oauthApiUrl(context...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implements a filter a set of rows
filter(f) { this.rows() }
[ "function Filter_TableRows() {\n //console.log( \"===== Filter_TableRows ========= \");\n\n\n //for (let i = 0, tblRow, show_row; tblRow = tblBody_datatable.rows[i]; i++) {\n // tblRow = tblBody_datatable.rows[i]\n // show_row = t_Filter_TableRow_Extended(filter_dict, tblRow);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
take data from new review and id of review being changed, find that review by its id and update it
function update(newReview) { return knex("reviews") .select("*") .where({ review_id: newReview.review_id }) .update(newReview); }
[ "function updateReview(reviewId, review) {\n\n var url = \"/api/project/review/\" + reviewId;\n\n return $http.put(url, review);\n\n // for(var p in reviews) {\n // if(reviews[p]._id === id) {\n // reviews[p] = review;\n // }\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
getIgnoreKeywords_allWords_N_Words() Get the common words to ignore that start with: N.
function getIgnoreKeywords_allWords_N_Words() { return [ 'name', 'namely', 'naturally', 'naught', 'nay', 'ne', 'ne\'er', 'near', 'nearest', 'nearly', 'necessarily', 'needs', 'neither', 'never', 'nevertheless', 'new', 'next', 'nil', 'no', 'nobody', 'non'...
[ "function getIgnoreKeywords_allWords_X_Words() {\n\t\treturn [\n\t\t];\n\t}", "function getIgnoreKeywords_allWords_O_Words() {\n\t\treturn [\n\t\t\t'obstinately',\n\t\t\t'obviously',\n\t\t\t'occasion',\n\t\t\t'occasionally',\n\t\t\t'occassion',\n\t\t\t'occassionally',\n\t\t\t'occur',\n\t\t\t'occuring',\n\t\t\t'oc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
5. Create a function names totalValue(). The function should accept 1 parameter the array of products. It should return the total value of all of the products in the array. You calculate the value of one product by multiplying the inventory value by the unit_price value
function totalValue(prods) { let inventoryValue = 0; for (i = 0; i < prods.length; i += 1 ) { inventoryValue += prods[i].inventory * prods[i].unit_price; } return inventoryValue; }
[ "function totalValue(productArray) {\n var totalValue = 0;\n for (var i = 0; i < productArray.length; i++) {\n totalValue += productArray[i].unit_price * productArray[i].inventory;\n }\n return totalValue;\n}", "function totalValue(items) { \n let total_value = 0;\n for (i = 0; i < items.length;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Update video Id in FireStore.
function updateVideo(youtubeId) { ignoreChange = true roomRef.update({ videoId: youtubeId, // Reset playback info currentTime: Date.now(), elapsedTime: 0, state: YT.PlayerState.PLAYING, updateTime: true }) .then(function()...
[ "function changeVideoId(newUrl) {\n setVideoId(newUrl)\n }", "function updateVideo(){ ctrl.collection.video = Data.video.get() }", "_updateVideoDeviceId() {\n const localVideo = getLocalJitsiVideoTrack(APP.store.getState());\n\n if (localVideo && localVideo.videoType === 'camera') {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
function for counting the number of nodes from a triples set
function countNodes(triples) { var nodes = []; var cnt_triples = 0; var cnt_nodes = 0; nodes.push(triples[0].subject); while(cnt_triples < triples.length) { while(cnt_nodes < nodes.length) { if(triples[cnt_triples].subject == nodes[cnt_nodes]){break;} cnt_nodes++; } if(cnt_nodes == nodes.le...
[ "function number_neighbour_different_nodes(node, matrix, nodes_set) {\n\n let neighbours = matrix[node.id];\n let count = 0;\n\n neighbours.forEach(function (neighbour, index) {\n\n if(neighbour === 1 && node.group !== find(neighbours[index], nodes_set)) count++;\n\n });\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor for the Iframe object.
function Iframe() { this.doc = document.createElement('iframe'); // Checks will store all the tests done on the animations in the iframe. // Developers can add to it using the addCheck function. this.checks = []; // Time stores the defualt animation time. It controls how long the hidden // animation runs an...
[ "function IFrame() {\n var _this = _super.call(this, { node: Private.createNode() }) || this;\n _this.addClass('jp-IFrame');\n return _this;\n }", "function Iframe() {\n var self = this;\n\n // Initialize event inheritance.\n EventDispatcher.call(self);\n\n var ready = false;\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
function to take all current Notebooks and save to local storage
function saveNoteBooksToLocalStorage() { if (existingNoteBooks.length > 1) { let arrayToHoldAllCurrentNotebooks = []; existingNoteBooks.forEach((element) => { if (element.titleOfObject != "Dashboard") { arrayToHoldAllCurrentNotebooks.push(element.titleOfObject); } }); //need to clea...
[ "save() {\n localStorage.setItem('notebooks', JSON.stringify(this.notebooks))\n localStorage.setItem('notebookId', this.currentNotebookId)\n }", "function saveNotebookToLocal() {\n if (typeof autosaveEnabled !== 'undefined' && autosaveEnabled) {\n localStorage.setItem(notebookAutosaveKe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks whether a passed character is valid as inner character of an identifier.
function isValidIdentifierChar(ch) { // Allow ':' because of c++ namespace qualifiers, e.g. UI::DialogPadding::None. return isAnsiLetter(ch) || isNumeral(ch) || ch === '_' || ch == ':'; }
[ "_isIdentifierPart (char) {\n return this._isIdentifierStart(char) || this._isDigit(char);\n }", "function isDotID(regChar) {\r\n return (regChar >= 'a' && regChar <= 'z') || //char\r\n (regChar >= 'A' && regChar <= 'Z') || //char\r\n (regChar >= '\\200' && regChar <= '\\377') || ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Standard function to run a function when document is loaded
function run_when_document_ready(fn) { if (document.readyState !== "loading"){ fn(); } else { document.addEventListener("DOMContentLoaded", fn); } }
[ "function whenDocumentLoaded(fn) {\n\tif (document.readyState != 'loading'){\n\t\tfn();\n\t} else {\n\t\tdocument.addEventListener('DOMContentLoaded', fn);\n\t}\n}", "function fire_on_page_load(f) {\n if(DEBUG) console.log(`AVP: fire_on_page_load(): document is \"${document.readyState}\"`);\n switch (docume...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the record with the value as a string.
function getStringRecord(key, modify) { if (!self.contains(key)) { return false; } var record = records[key]; if (typeof record.value != 'string') { record.value = JSON.stringify(record.value); } modify(record); return true; }
[ "get stringValue() {}", "getString() {\n return _getStringOrArray(false, this);\n }", "function getRecordValue(record, key) {\n\tvar result = \"\";\n\tstLocale = getLocale();\n\t// if (key == \"descr\" || key == \"nom\") {\n\tvar enKey = key + \"_en\"\n\tif (stLocale == 'en' && (typeof record[...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get the first day of the year
function getFirstDayOfYear(value) { var date = new Date(value); date = new Date(date.getFullYear(), 0, 1); return date; }
[ "function getYearStart(date) {\n return new Date(date.getFullYear(), 0, 1, 0, 0, 0, 0);\n}", "yearDay() {\n var results = this._date(false);\n return results[3] + 1;\n }", "function getDayofYear() {\n\tvar now = new Date();\n\tvar start = new Date(now.getFullYear(), 0, 0);\n\tvar diff = (now - start) ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
In the Unity editor on macOS.
get OSXEditor() {}
[ "set OSXEditor(value) {}", "_displayEditor() {\n this.editor.display();\n this.terminal.hide();\n }", "async openEditor() {\n atom.workspace.open((await new _editor2.default()));\n }", "function createTerminal() {\n vscode.window.createTerminal({ name: 'ROS', env: extension.env }).show...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Example of a render implementation that draws tile boundaries
render(renderParameters) { var tileSize = this.layer.tileInfo.size[0]; var state = renderParameters.state; var pixelRatio = state.pixelRatio; var width = state.size[0]; var height = state.size[1]; var context = renderParameters.context; var coords = [0, 0]; context.fill...
[ "function renderTile( x, y, tile ) {\n ctx.fillStyle = getColor( tile.type )\n ctx.fillRect( ( x * BLOCK_SIZE ), ( y * BLOCK_SIZE ), BLOCK_SIZE, BLOCK_SIZE )\n\n // render each wall segment\n // ctx.strokeStyle = getColor( 4 )\n\n // N\n ctx.strokeStyle = getColor( tile.walls.N ? 4 : 0 )\n ctx.beginPath()\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Register function to be used by the contained MatSortables. Adds the MatSortable to the collection of MatSortables.
register(sortable) { if (typeof ngDevMode === 'undefined' || ngDevMode) { if (!sortable.id) { throw getSortHeaderMissingIdError(); } if (this.sortables.has(sortable.id)) { throw getSortDuplicateSortableIdError(sortable.id); } ...
[ "function registerSortableActions(){\n\t\tangular.element('.editor #hico-action-triggers ul.action-list > li > ul.lui-list')\n\t\t\t.sortable({axis: 'y', handle: ' .sortable-handle', placeholder: 'action-item-placeholder', forcePlaceholderSize: true, stop: reorderActions});\n\t}", "function _addListeners() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the integral of (ysetpoint) ^2
function integrate(y,setpoint,dx){ var sum = Math.pow(y[0]-setpoint,2) + Math.pow(y[y.length - 1]-setpoint,2); for (var i = 1; i <= y.length - 2; i++) { sum = sum + 2* Math.pow(y[i]-setpoint,2); } sum = sum*dx/2; return sum; }
[ "function getY(x) { return Math.sqrt(1 - x*x); }", "function y0(x) {\n var w = void 0,\n z = void 0,\n p = void 0,\n q = void 0,\n xn = void 0;\n\n if (x <= 5.0) {\n if (x === 0.0) {\n // mtherr('y0', SING);\n return -Infinity;\n } else if (x < 0.0) {\n // mtherr('y0', DOMAIN);\n return NaN;\n }\n\n z = x * x;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Changes the scaling of the graph to logarithmic scale
function applyLogScale() { let last = graph.scale.vertical.value graph.scale = scaler.log applyScale(data.tree, last) applyScaleText() update(data.tree) if (graph.style.barChart) { graph.element.selectAll('.leafLabelIsolates').remove() graph.eleme...
[ "function toggleLinearLogScale(egu) {\n\tvar shortAxis = viewerVars.egu2axis[egu];\n\tvar longAxis = viewerVars.y_short_2_long[shortAxis];\n\tvar currentType = myDiv.layout[longAxis]['type'];\n\tvar newType = (currentType == \"linear\") ? \"log\" : \"linear\";\n\tvar newTitle = (newType == \"linear\") ? egu : (\"lo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
ValidatorCommission queries accumulated commission for a validator.
queryValidatorCommission(validator_address) { if (!validator_address) { throw new Error("validator_address can not be empty"); } const request = new types.distribution_query_pb.QueryValidatorCommissionRequest(); request.setValidatorAddress(validator_address); return t...
[ "function commissioner(instance) {\n\t\t\t\treturn it.commission.call(it, instance, model);\n\t\t\t}", "function calculCommission () {\n for (var i = 0; i < deliveries.length; i++) {\n var commission = deliveries[i].price * 0.3;\n deliveries[i].commission.insurance = commission / 2;\n deliveries[i].comm...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Loads the previously stored data at the given path
loadFile(path) { path = this.getAbsoluteDataPath(path); // Check if a file exists at this path if (FS_1.FS.existsSync(path)) { try { // If it exists, read the contents const contents = FS_1.FS.readFileSync(path, "utf8"); // Retur...
[ "function load(path) {\n return Q.denodeify(function(callback) {\n return SMI.readDescriptor(path, {\n basePath: PATH.join(path, \"..\"),\n resolve: false\n }, function(err, config) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initializes the AssetLoader service with a generated assetmanifest.
function initialize(instance) { var service = instance.lookup('service:asset-loader'); service.pushManifest(_assetManifest.default); }
[ "function initialize(instance) {\n const service = instance.lookup('service:asset-loader');\n service.pushManifest(_assetManifest.default);\n }", "function initialize(instance) {\n var service = instance.lookup('service:asset-loader');\n service.pushManifest(_engineTestingConfigAssetManifest['default...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This function updates the plane position based on its CSS positions and transformations values. Useful if the HTML element has been moved while the container size has not changed.
updatePosition() { // set the new plane sizes and positions relative to document by triggering getBoundingClientRect() this._setDocumentSizes(); // apply them this._applyWorldPositions(); }
[ "function changePosition(){\n let X1 = Math.random()*190;\n let Y1 = Math.random()*61;\n let size1 = Math.random();\n if (size1 >.7){\n plane1.style.transform = \"scale(\" + size1+ \")\";\n }\n plane1.style.left = X1 +\"vw\";\n plane1.style.top = Y1 +\"vw\"; // use vw so that planes stay...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Resolve is the most important function of our root query, where we have to actually fetch the data
resolve(parentValue, args) { //purpose: go into the db and find the actual data // when an id will be passed, it will be available on the args object // RESOLVE can handle a promise!! return axios.get(`http://localhost:3000/users/${args.id}`) .then(resp => resp.data); }
[ "resolveQuery() {\n\t\tthis.resultData = this.query.run(this.collection, this.dataProvider.data());\n\t\tthis.resultValid = true;\n\t}", "resolve() {\n if (this.resolver) {\n this.resolver(this.aggregateResponse(this.results));\n }\n if (this.timeoutTimer) {\n clearTimeo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
createSingleTTPJson used here, and for processing inline TTPs found as children of other objs
function processTTPObjs(ttpObjs, etBottomUpInfo) { var ttpNodes = []; var ttpJson = null; $(ttpObjs).each(function (index, ttp) { ttpJson = createSingleTTPJson(ttp, etBottomUpInfo); ttpNodes.push(ttpJson); }); return ttpNodes; }
[ "function createSingleTTPJson(ttp, etBottomUpInfo, relationship) {\r\n\tvar ttpId = getObjIdStr(ttp);\r\n\tvar ttpJson = null;\r\n\tif (relationship == 'ttp:Related_TTP') {\r\n\t\tttpJson = createSiblingNode(ttpId, STIXType.ttp, getBestTTPName(ttp), relationship);\r\n\t}\r\n\telse {\r\n\t\tttpJson = createTopDownNo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setting to switch between Farenheit & Celcius degree
function farenheitToCelcius(){ if (tempUnits == "celsius"){ tempUnits = "farenheit"; document.getElementById("buttonFC").innerHTML = "Temperature in Celcius"; } else if (tempUnits == "farenheit"){ tempUnits = "celsius"; document.getElementById("but...
[ "function setFahrenheit() {\n if(temperature.type != \"f\") {\n temperature.value = Math.round(temperature.value * 1.8 + 32);\n temperature.type = \"f\";\n }\n $(\"temp\").innerHTML = temperature.value + \"&deg;\";\n}", "set temperature(celsius) {\n // F = C * 9.0 / 5 + 32;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
gets a specific spartan
function getSpartan(id){ var token = localStorage.getItem("token") || ""; var url = "/api/spartan/" + id; axios.request({ method: "GET", url: url, headers: {'token' : token} }).then(function(res){ _spartan = res.data; ProfileStore.emit(MainConstant.PROFILE.UPDATE); console.log(res); })...
[ "function obtainStation(mySt){\n for (var i = 0; i < stations.length; i++) {\n st = stations[i];\n if(mySt == st.getTitle()){\n return st;\n }\n }\n return undefined;\n}", "function getRandomSlogan() {\n return sloganList[Math.floor( Math.random() * sloganList.length )];\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
see if sql includes a limit clause, make sure it's less than maxRows. if not, add one but preserve any 'offset' clause after the limit
function imposeLimit(SQLString) { var limitRE = /\s+limit\s+(\d+)(\s+offset\s+\d+)?\s*$/i var newSQL = SQLString, limitMatch = SQLString.match(limitRE) if (limitMatch) { if (limitMatch[1] > maxRows) { // the number after 'limit' var offsetClause = limitMatch[2] || '' // the optional full offset clau...
[ "limit(limit) {\n // Respect the one-limit-per-query lock.\n if (this.hasLimit) throw new QueryError('Query already has limit');\n this.hasLimit = true;\n\n // Assert the provided limit is valid.\n if (typeof limit != 'number' || limit < 0) throw new QueryError(\n `In...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Convert RGBA into XYZ color space. rgba: Red Green Blue Alpha.
function rgb2xyz(rgba, w, h) { var xyz = new Float32Array(3*w*h), gamma = 2.2; for (var i = 0; i<w*h; i++) { // 1.0 / 255.9 = 0.00392156862. var r = rgba[4*i+0] * 0.00392156862, g = rgba[4*i+1] * 0.00392156862, b = rgba[4*i+2] * 0.00392156862; r = Math.pow(r, gamma)...
[ "function rgb2xyz(rgba, w, h) {\n\t var xyz = new Float32Array(3*w*h),\n\t gamma = 2.2;\n\t for (var i = 0; i<w*h; i++) {\n\t // 1.0 / 255.9 = 0.00392156862.\n\t var r = rgba[4*i+0] * 0.00392156862,\n\t g = rgba[4*i+1] * 0.00392156862,\n\t b = rgba[4*i+2] * 0.00392156862;\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Rimuove un solo valore dalla query string, non come delete(key) che elimina tutti i valori della key.
function removeValueQuery(key, value) { array = urlParams.getAll(key).filter((el) => el != value); urlParams.delete(key); array.forEach((el) => { urlParams.append(key, el.replaceAll(' ', '-')); }); }
[ "deleteURLQueryString(key) {\n const searchParams = new URL.URLSearchParams(this.urlObj.search);\n searchParams.delete(key);\n this.urlObj.search = searchParams.toString();\n }", "function deleteURL(urlSearch, key)\n{ \n //Process Query string\n var queryString = urlSearch.split('&');\n\n for...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds the sample commands. These are not included by default.
addSampleCommands() { this.addCommand(new sampleCommands.MagicEightBallCommand()); this.addCommand(new sampleCommands.RollCommand()); }
[ "addBasicCommands() {\n this.addCommand(new commands.HelpCommand());\n }", "function renderSampleCommands(elem, commands) {\n\n commands.length = Math.min(commands.length, 4);\n\n commands = commands.map(function (c) {\n\n return '<div class=\"exampleCommand\"><span class=\"exampleCom...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The 1based number used by the UI to identify the buttons
get buttonNumber() { return this.button + 1; }
[ "function getButtonIndex(){\n\tif(getObjectType() === OBJECT_TYPE_PAGE){\n\t\treturn 2;\n\t}else if(getObjectType() === OBJECT_TYPE_SCRIPT){\n\t\treturn 0;\n\t}\n}", "function getDramaButtonName(num)\n{\n\treturn \"#dramaButton\" + num;\n}", "function button(number)\n{\n\tvar button = buttons[number];\n\tbutton...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
checks if an item is present and if it has property 'label'
function isNotNull(item){ return (item && item.label); }
[ "_getItemLabel(item, itemLabelPath) {\n return item && Object.prototype.hasOwnProperty.call(item, itemLabelPath) ? item[itemLabelPath] : item;\n }", "function checkSingleItem()/*:void*/ {\n if (this.itemCollection.getCount() > 0) {\n var c1/*:Component*/ =AS3.as( this.itemCollection.getAt(0), Ext...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Renders the AWS CloudFormation properties of an `AWS::WAFv2::RuleGroup.IPSetReferenceStatement` resource
function cfnRuleGroupIPSetReferenceStatementPropertyToCloudFormation(properties) { if (!cdk.canInspect(properties)) { return properties; } CfnRuleGroup_IPSetReferenceStatementPropertyValidator(properties).assertSuccess(); return { Arn: cdk.stringToCloudFormation(properties.arn), ...
[ "function cfnWebACLIPSetReferenceStatementPropertyToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n CfnWebACL_IPSetReferenceStatementPropertyValidator(properties).assertSuccess();\n return {\n Arn: cdk.stringToCloudFormation(properties.arn),\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Load the config that contains the project and API keys
function loadConfig() { configFile = 'apiConfigs.json'; config = JSON.parse( fs.readFileSync(configFile) ); }
[ "function loadConfig() {\n fs.readFile(basePath + '/projects/config.json', (err, data) => {\n if (err) {\n saveConfig();\n return;\n }\n \n projectConfig = JSON.parse(data);\n });\n}", "function loadConfig() {\n var config = JSON.parse(fs.readFileSync(__dirname + configJson, 'utf-8'...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
selects and focuses on the text
selectText(i) { const input = document.getElementById("titleBox-" + this.props.category + i); input.focus(); input.select(); }
[ "selectText(){\r\n this.getRef('input').selectText();\r\n }", "function selected() {\r\n var text = document.getElementById('textfield');\r\n text.select();\r\n}", "selectText(){\n this.getRef('input').selectText();\n }", "function selectText( containerid ) {var node = docume...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Select a hieroglyph to play this loads a new question
function selectHieroglyph(sourceElement) { if (activeHieroglyph === null && (activeRoundNumber == 1 || activeRoundNumber == 2) && !sourceElement.classList.contains("disabled-hieroglyph-button")) { //Activate the current button sourceElement.classList.add("active-hieroglyph-button"); glyph = sourceElement....
[ "function showQuestion(){\n\t\tprintInput\t\t(baseGame.getGame());\n\t\tselectQuestion\t(baseGame.getGame(), baseGame.getFolder());\n\t}", "function gamePlay() {\n questionSelection();\n }", "function walkQuestion() {\n\tif (readlineSync.keyInYN(`${name}, Would you like to start walking!?`)) {\n\t\tconsole....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Converts a grade to its equivalent gpa value by looking at the grade conversion data
function convertGradeToGPA(grade, selectedGradeConversion, selectedGradeConversionKey) { //third parameter is optional if (typeof selectedGradeConversionKey !== 'undefined' && selectedGradeConversionKey && selectedGradeConversionKey === 'gpa') { //if input is gpa return the type return grade...
[ "function convertGPAToGrade(gpa, selectedGradeConversion, selectedGradeConversionKey) {\n if (typeof selectedGradeConversionKey !== 'undefined' && selectedGradeConversionKey && selectedGradeConversionKey === 'gpa') { //if input is gpa return the type\n \n return gpa;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
mySiteAction(action, handle) showAll action for search function
function mySiteAction(action, handle) { if (action == "go") { document.mySiteSearchForm.action.value = 'search'; var searchKeywords = trim(document.mySiteSearchForm.searchKeywords.value); if (searchKeywords == null || searchKeywords.length == 0) { aler...
[ "function handleSearchPages(action) {\n\t\n\tif (action == \"next\" ) {\n\t\tmySearch.searchCurrentPage++;\n\t} else if (action == \"previous\") {\n\t\tmySearch.searchCurrentPage--;\n\t}\n\n\tvar startIndex = mySearch.searchCurrentPage * mySearch.maxResultsDisplay;\n\tvar endIndex = ((startIndex+mySearch.maxResults...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
_getCenter A utility that finds the center point of the sprite. If it's anchor point is the sprite's top left corner, then the center is calculated from that point. If the anchor point has been shifted, then the anchor x/y point is used as the sprite's center
_getCenter(o, dimension, axis) { if (o.anchor !== undefined) { if (o.anchor[axis] !== 0) { return 0; } else { return dimension / 2; } } else { return dimension; } }
[ "function getCenter( ) {\n let bounds = { lx: Infinity, ly: Infinity, hx: -Infinity, hy: -Infinity }\n for ( let i = 0; i < cAnchors.length; i++ ) {\n let pos = cAnchors[ i ].pos\n if ( pos.x < bounds.lx ) bounds.lx = pos.x\n if ( pos.y < bounds.ly ) bounds.ly = pos.y\n if ( po...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get a stack trace N levels deep.
function getStackTrace (depth) { var origTrace = Error.prepareStackTrace , origLimit = Error.stackTraceLimit , err , trace; Error.stackTraceLimit = depth; Error.prepareStackTrace = function(_, stack){ return stack; }; err = new Error(); Error.captureStackTrace(err, arguments.callee); trace = e...
[ "function CallStack( depth )\n{\n\t/**\n\t * The array with the stack. \n\t * @type Array<String>\n\t */\n\tthis.mStack = new Array();\n\n\t// set stack depth to default\n\tif( depth == null )\n\t\tdepth = 10;\n\n\tvar fn = this.getCaller( CallStack );\n\tif( fn === undefined )\n\t{\n\t\tthis.mStack.push( \"[CallSt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Number > [[Object]] Returns the entire maze with the marker and the tile type as a multidimensional array of objects describing each tile Optionally takes a radius to set how many tiles are to be returned around the player's position given: a maze with a row of 25 tiles and a column of 25 tiles expected: [[...25 tiles ...
getMaze(radius = -1) { // Return the entire maze if no radius if (radius < 0) { let mazeArr = [], mazeRow = []; for (let i = 0; i < this.tilesHigh; i++) { for (let j = 0; j < this.tilesWide; j++) { mazeRow.push({ ...
[ "getTilesWithinRadius(radius) {\n let output = [this];\n\n while (radius > 0) {\n let temp = this.getMultipleSurrounds(output);\n temp.forEach(tile => {\n if (!output.includes(tile)) {\n output.push(tile);\n }\n });\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Used to append FileAttachment annotations to the sidebar.
_appendAttachment({ id, filename, content }) { const renderedPromise = this._renderedCapability.promise; renderedPromise.then(() => { if (renderedPromise !== this._renderedCapability.promise) { return; // The FileAttachment annotation belongs to a previous document. } let ...
[ "function addAttachmentIcon() {\r\n\tvar attachImage = jQuery( '.attach-image' );\r\n\r\n\tif ( attachImage && attachImage.length ) {\r\n\t\tattachImage.each( function() {\r\n\t\t\tjQuery( this ).prepend( '<span class=\"image-open\" onclick=\"viewableArea(this);\"><i class=\"icon icon-xl fa-search-plus fa-fw\" aria...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Filter label data and return accessUrl matched to given label and store scheme (http/https)
function getAccessURL(label_data, label) { var protocolPrefix = location.protocol + "//" if (label) { for (var i = 0; i < label_data.length; i++) { if (label == label_data[i].name) { var accessUrls = label_data[i].accessUrls; for (var j = 0; j < accessUrls.length; j++) { if (accessUrls[j].indexOf(lo...
[ "function optValueToURL(label) {\n return '/data/' + label.replace(/ /g, '/');\n}", "_matchLabelURLs(qrcode, labels) {\n if (typeof qrcode !== 'string') return qrcode;\n\n for (let i = 0; i < labels.length; i++) {\n let prefix = labels[i].prefix;\n const style = labels[i].style;\n\n /* QR co...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the associated owner group for this web
get associatedOwnerGroup() { return new SiteGroup(this, "associatedownergroup"); }
[ "function getOwners() {\n\t\t\treturn getGroupsSetup('owners');\n\t\t}", "get owner() {\n return getFieldValue(this.accountData.data, OWNER_NAME_FIELD);\n }", "owner() {\n if (this.id == 0) return null;\n if (typeof this.props.owner !== \"undefined\") return this.props.owner;\n re...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
function to init all the multitokens with the appropriate alias, basically their label, and also set the single tokens which composed the current multi word
initTokenWithSynonymAlias(index) { var tokens = [...this.props.multiTokens]; var token = { ...this.props.multiTokens[index] }; if (token.synonyms.length < 1) { // var synonyms = this.computeSynonyms(token.label); // token.synonyms = synonyms; tokens[index] = token; } if (!token.al...
[ "initTokenWithSynonymAlias(index) {\n var tokens = [...this.props.singleTokens];\n var token = { ...this.props.singleTokens[index] };\n // if the token doesn't have synonyms and it doesn't have any selected synonyms\n if (token.synonyms.length < 1 && token.selectedSynonyms.length === 0) {\n var syn...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
delete all feedback of user with id
async deleteActivityFeedback() { const activityFeedback = await ActivityFeedback.query().where( 'user_id', this.id, ); if (activityFeedback) { await ActivityFeedback.query() .delete() .where('user_id', this.id); } return activityFeedback; }
[ "function deleteFeedback() {\n const $element = $(this);\n const id = $element.data('id');\n\n server.deleteFeedback(id)\n .then(() => mediator.publish('onFeedbackDelete', $element));\n }", "deleteFeedbackEntry(id) {\n axios({\n method: 'DELETE',\n url: `/admin/${id}`\n }).then(() =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns `true` when the user has accepted the disclaimer, `false` if not.
ensureDisclaimerAccepted() { return __awaiter(this, void 0, void 0, function* () { const notAccepted = () => { this.viewport.renderHTML(''); this.browserBar.urlBar.setURL('about://welcome'); }; // disclaimer was already accepted if ...
[ "function checkDisclaimer() {\n\n\tvar reponse = getCookie('acceptedDisclaimer');\n\n\tif (reponse == 'yes') {\n\t\treturn 'yes';\n\t\t// return '';\n\t} else {\n\t\treturn '';\n\t}\n}", "function getUserConsent() {\n if (confirm('Are you sure?')) {\n return true;\n }\n else {\n return fals...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Accpets a binary cookieset such as ['0', '1', '0', '0', '1'] Accepts which is the bit_val that should be shifted: "1" or "0". Returns the next in the sequence ['0', '1', '0', '1', '0']
function generate_next_binary_cookieset_X(curr_bin_cs, bit_val) { // This is Big endian. // Most significant digit is stored at array index '0'. var negate_bit_val = (bit_val + 1) % 2; var tot_bit_val_so_far = 0; if (curr_bin_cs.length == 1) { if (curr_bin_cs[0] != bit_val) { curr_bin_cs[0] =...
[ "function generate_previous_binary_cookieset_X(curr_bin_cs, bit_val) {\n var negate_bit_val = (bit_val + 1) % 2;\n var tot_bit_val_so_far = 0;\n\n if (curr_bin_cs.length == 1) {\n\tif (curr_bin_cs[0] != negate_bit_val) {\n\t curr_bin_cs[0] = negate_bit_val;\n\t return curr_bin_cs;\n\t}\n }\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns element of specified type which is ancestor to child element
function getAncestorElementOfType(child, type) { if (!child) return null var parent = child.parentNode if (!parent) return null if (parent.nodeName.toUpperCase() == type.toUpperCase()) { return parent } else { return getAncestorElementOfType(parent, type) } }
[ "function getAncestorOfTagType(elem, type) {\n\n while (elem.parentNode && elem.tagName !== type) {\n elem = elem.parentNode;\n }\n\n return ( type === elem.tagName ) ? elem : undefined;\n\n }", "function getAncestorOfTagType( elem, type ) {\n\n\twhile ( elem.parentNode && elem.tagName !== type ) {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Slider change stores the slider data in the associated step
function stepSliderControl(event) { switch(event.target.tag) { case SliderEnum.SYNTH_VELOCITY: step[stepSelected].synthVelocity = event.target.value; sliderDisplay[0].innerHTML = event.target.value; console.log("Here"); break; case SliderEnum.SYNTH...
[ "function updateSlider(e) {\n\t\t\tthis.set('value', e.newVal);\n\t\t\tsliderValue = xSlider.getValue();\n\t\t\tnumberOfBalls = sliderValue * 3;\n\t\t\tballCounter.setContent('Balls: ' + numberOfBalls);\n\t\t}", "function update_slider() {\r $slider.slider('values', 0, current_input_from());\r $slider.slide...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set header `field` to `val`. Examples: this.set('Foo', ['bar', 'baz']) this.set('Accept', 'application/json')
set(field, val) { if (Array.isArray(val)) { val = val.map((v) => (typeof v === 'string' ? v : String(v))); } else if (typeof val !== 'string') { val = String(val); } this.res.setHeader(field, val); }
[ "set(key, value) {\n this.headers[key] = value;\n return (this);\n }", "header(field,value) {\n this._headers[field] = value\n return this\n }", "set headers(val) {\n this.req.headers = val;\n }", "set(headerName, headerValue) {\n this._headersMap[getHeaderKey(headerName)] = {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
linear normalization for recordedPattern
function normalizeLinear() { var normalizedPattern = new Array(); newHeight = 256; newWidth = 256; xMin = 256; xMax = 0; yMin = 256; yMax = 0; // first determine drawn character width / length for(var i = 0;i<recordedPattern.length;i++) { var stroke_i = recordedPattern[i]; ...
[ "function momentNormalize() {\n\t\t\t\n\t\tnewHeight = 256;\n\t\tnewWidth = 256;\n\t\txMin = 256;\n\t\txMax = 0;\n\t\tyMin = 256;\n\t\tyMax = 0;\n\t\t// first determine drawn character width / length\n\t\tfor(var i = 0;i<recordedPattern.length;i++) {\n\t\t var stroke_i = recordedPattern[i];\n\t\t for(var j = 0; j...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
(experimental) Add an environment variable.
addEnvironment(name, value) { this.environment[name] = value; }
[ "addEnvironment(name, value) {\n this.environmentVariables[name] = value;\n return this;\n }", "function setEnvironmentVariable(envName, envValue)\n {\n _environmentVariables.push({name:envName,value:envValue});\n }", "function addEnvironment(name, value) {\n allure_reporter_1.defau...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes all disabled menu items
function deleteDisabledMenuItems(part) { if (_.isPlainObject(part) && part.type === 'Menu' && part.fields) { _.each(part.fields, (val, key) => { if (val === false) { delete part.fields[key]; } }); } }
[ "function deleteDisabledMenuItems(part) {\n if (part.type === 'Menu' && part.fields) {\n _.each(part.fields, (val, key) => {\n if (val === false) {\n delete part.fields[key];\n }\n });\n }\n }", "disableMenuButtons() {\n var elements = this.__menuElemen...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
By reducing over each decorator function, and passing it to the [Promisethen] method, we end up with something like this: Promise.resolve(response) .then(decorator1) .then(decorator2) ... .then(decoratorN)
function decorateResponse (response, decorators, middleware) { const name = nameMiddleware(middleware) const promise = Promise.resolve(response) const reducer = (promise, decorator) => promise.then(decorator) return decorators .map((decorator) => (response) => decorator(response, name)) .reduceRight(red...
[ "static async promiseChainThen(promiseParameters) {\n const promiseArray = [];\n promiseParameters.forEach((promiseParameter) => {\n promiseArray.push(\n async () => {\n return PromiseHelpers.makePromise(\n promiseParameter.instance,\n promiseParameter.endCondition,\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Hide any dynamically created "(copied)" notes that may have been inserted after .clipboardicon elements.
function resetCopyNotes() { const $notes = $copy_icons.siblings(COPY_NOTE_SELECTOR); toggleHidden($notes, true).text(''); }
[ "function hideShowRibbonPasteItem() {\n var activeSheet = designer.wrapper.spread.getActiveSheet()\n var sheet = activeSheet\n // TODO : isPasteFloatingObject\n if (sheet.isPasteFloatingObject()) {\n $('#clipboardgroup li:gt(0)').hide()\n } else {\n $('#clipboardgroup li:gt(0)').show()\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
the lastRequestedMs scheme allow to run the expensive Top command every delay only if it is being requested.
function touchLastRequested(){ lastRequestedMs = new Date().getTime(); // if it was not running, we run it if (!on){ on = true; console.log("os-usage.js - starting top.fetch every " + (delay/1000) + "s"); topFetch(); } }
[ "function requestLastCommand() {\n // Async request of page 71 (command status)\n setTimeout(function () {\n antlib.sendRequestDataPage(fecChannelId, COMMAND_STATUS_PAGE, transmitBuffer);\n }, 1000);\n }", "timeTillNextCommand(client) {\n if (this.throttled[client...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes focus from any image that is active
function removeFocus(){ for(var id in markerHandler){ if(markerHandler[id]['active']== true){ document.getElementById("image_" + id).setAttribute("class","normal"); markerHandler[id]['activeMarker'].hide(); markerHandler[id]['marker'].show(); markerHandler[id]['active'] = false; } } }
[ "unselectCurrent() {\n if (this.activeControl) {\n this.getActiveControl().background = this.activeBackground;\n if ( this.getActiveControl().getClassName() == \"InputText\") {\n this.inputFocused(this.activeControl,false);\n }\n }\n }", "clearCurrentFocus(blurActiveElement = false) {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The user clicked on the button to move down the waypoint in the list of waypoints for the route calculation. The waypoint element is moved downwards; internal attributes are adapted.
function handleMoveDownWaypointClick(e) { //index of waypoint var waypointElement = $(e.currentTarget).parent(); var index = parseInt(waypointElement.attr('id')); var succElement = $('#' + (index + 1)); var succIndex = index + 1; waypointElement.insertAfter(succElement); //adapt IDs... of waypoi...
[ "function handleMoveUpWaypointClick(e) {\n\t\t\t//index of waypoint\n\t\t\tvar waypointElement = $(e.currentTarget).parent();\n\t\t\tvar index = parseInt(waypointElement.attr('id'));\n\n\t\t\tvar prevIndex = index - 1;\n\t\t\tvar previousElement = $('#' + prevIndex);\n\n\t\t\twaypointElement.insertBefore(previousEl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
active button style: dot toggle
function activeDot(index) { var activeElement = $('#on'); if (activeElement) { $('#on').removeAttribute('id'); } document.getElementsByClassName('btn')[index - 1].setAttribute('id', 'on'); return; }
[ "function dotClick() {\n\t\t// Remove the active from the active dot\n\t\t// FIXME: Keep track of active dot to simplify iteration and save processor time\n\t\tfor(var i=0; i < imageCount; i++) { $dots[i].removeClass('active'); }\n\t\t$container.find(this).addClass('active');\n\t}", "setDotActive(dotElement) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Updates state of existing json event
function update_event_json(day, month, year, state) { for(var i=0; i<event_data["events"].length; i++) { var event = event_data["events"][i]; if(event["day"]===day && event["month"]===month && event["year"]===year) { event_data["events"][i]["state"]=state; ...
[ "update(data={}) {\n this.state = Object.assign(this.state, data);\n\n // notify all the Listeners of updated state\n this.notifyObervers(this.state);\n }", "updateJsonButtonHandler() {\n if (this.jsonChanged) {\n this.props.updateJson(JSON.parse(this.json));\n this.jsonChange...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
bench05 (Integer 32 bit) (n choose n/2) mod 65536 (Central Binomial Coefficient mod 65536) Using dynamic programming and Pascal's triangle, storing only one line Instead of nCk mod 65536 with k=n/2, we compute the product of (n/2)Ck mod 65536 with k=0..n/4 (Vandermonde folding) Example: (2000 choose 1000) mod 65536 = 2...
function bench05(n, state) { var x, k, i, j, min1, line, num, prev; // Instead of nCk with k=n/2, we compute the product of (n/2)Ck with k=0..n/4 n = (n / 2) | 0; // div 2 k = (n / 2) | 0; // div 2 if ((n - k) < k) { k = n - k; // keep k minimal with n over k = n over n-k } if (!state.bench05Line || stat...
[ "e78() {\n let answer = 0;\n let n = 3;\n // memoized partition list MEM[i] = p(i)\n const MEM = [1, 1, 2];\n while (!answer) {\n let i = 1;\n let term = penta(i);\n let currentPartition = 0;\n // sum all terms p(n-1), p(n-2), p(n-5), etc.\n while (term <= n) {\n const...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function to scale an object so that the child with the largest boundingsphere radius will end up with a bounding sphere radius equal to the supplied targetRadius
function resizeThreeJsObject(object, targetRadius) { // --------------------------------------------------------------------------->>> var biggestSphereRadius = Math.pow(10, -10); object.traverse(function (child) { if (child instanceof THREE.Mesh) { child.geometry.computeBoundingSphere(); // Need to run...
[ "function resizeThreeJsObject(object, targetRadius) {\n // --------------------------------------------------------------------------->>>\n var biggestSphereRadius = Math.pow(10, -10);\n object.traverse(function (child) {\n if (child instanceof THREE.Mesh) {\n child.geometry.computeBoundingSphe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
ARGUMENTS: a javascript object communicates with the server, adds translated text to jsonObject CALLBACK: replacePhrases
function getTranslation() { $.ajax({ type: 'POST', url: 'https://cousteau.corbinmuraro.com:8888', data: JSON.stringify(jsonObject), contentType: 'application/json', dataType: "json", success: replacePhrases, error: function (xhr, status, error) { console.log('Error: ' + error.message); } }); }
[ "function translate(wordToTranslate, origin, destination) {\r\n $.getJSON(\"http://glosbe.com/gapi/translate?from=\" + origin + \"&dest=\" + destination + \"&format=json&phrase=\" + wordToTranslate.text() + \"&pretty=true&callback=?\", function (json) {\r\n if (json !== \"Nothing found.\") {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO(v5): Remove again Necessary because of renaming in Does a string replace by searching for beginning of "siteMetadata" Then it adds the name + value as the next key of that object
function addField(src, { name, value }) { const FIND = ` siteMetadata: {\n`; const REPLACE = ` siteMetadata: {\n ${name}: \`${value}\`,\n`; const modifiedConfig = src.replace(FIND, REPLACE); return modifiedConfig; }
[ "function addUserNewMetadataPair() {\n\n // Attempts to find the next empty \"Key #\" string\n function findNextFreeKey(meta) {\n let i = 1;\n let key = \"Key \" + i;\n\n while(typeof meta[key] !== 'undefined') {\n i++;\n key = \"Key \" + i;\n }\n return key;\n }\n\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
buildEmail() Description: Writes all of the HTML for the email as a string array Arguments: ann(boolean) comic(boolean) groupTables([Google Sheet rows] string array) ann_doc_id([GoogleDocId] string) com_doc_id([GoogleDocId] string) Returns: ([HTML] string) Notes: uses the [A?B:C] conditional to enable or disable the ta...
function buildEmail(ann, comic, groupTables, ann_doc_id, com_doc_id) { return [ buildEmailHead(), '<body>', '<h2 style="font-family:arial;">'+ labName + ' Newsletter Week ' + getWeek() + '</h2>', ann ? buildEmailAnn(ann_doc_id) : ' ', groupTables.join('\n'), comic ? buildEmailComic(...
[ "function buildEmail(ann, comic, groupTables, ann_doc_id, com_doc_id) {\n return [\n buildEmailHead(),\n '<body>',\n '<h2 style=\"font-family:arial;\">CoolGroup Newsletter Week ' + getWeek() + '</h2>',\n ann ? buildEmailAnn(ann_doc_id) : ' ',\n groupTables.join('\\n'), \n comic ? buildEmailCom...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
gets the exact value from the span with given id
function getValue(id) { return parseFloat(ui.id(id).getAttribute('exact-value')) }
[ "function getSpanValue(elemName,val){\n var elem = document.getElementById(elemName);\n return elem.innerHTML;\n}", "function getElementValue(id) { return getElement(id).value; }", "function getValue(id) {\n var val = document.getElementById(id.toString()).childNodes;\n val = val[0].innerHTML;\n return...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
improvise markinactive with update
function markInactive() { try { console.log('in markInactive '); model.$where('( ISODate() - this.updatedAt ) > 10 * 60000 && this.status == "login" ') .exec(function (err, users) { if (err) console.log('error at markInactive()' + err); if (users === 'undefined') { ...
[ "setInactive(){\n\t\t\tthis.get( 'model' ).set( 'isActive', false );\n\t\t\tthis.get( 'model' ).save();\n\t\t}", "function update( is_inactive ){\n var old = water.current.current;\n if( old === is_inactive )return _;\n // Change\n if( !is_inactive ){\n // Activate\n de&&bug( \"Activate memb...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets a route's layout OR its group's layout OR its group's parent's layout OR default layout in that order
function getRouteLayout(route) { return route.options.layout || route.group && route.group.options.layout || route.group && route.group.parent && route.group.parent.options.layout || FlowRouter.defaultLayout; }
[ "getLayout() {\n return this.props.routes.filter((route) => route.layout).pop().layout;\n }", "static defaultLayout(layoutDescription = {}) {\n if (!_.isArray(layoutDescription.layouts)) return null;\n if (layoutDescription.layouts.length === 1) {\n return layoutDescription.layouts[0]\n }\n c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets whether the current series shows an area or line shape.
get isAreaOrLine() { return this.i.ck; }
[ "get isLine() {\n return this.shape instanceof hamonengine.geometry.lineSegment;\n }", "function isAreaChart(type) {\n return (type === 'Area');\n }", "function isAnAreaSelected(){\n return $scope.selectedArea != undefined;\n }", "function inPlotArea(node)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
ItemDepthInTree(itemNameString): IN: itemNameString a string that represents the location of the clicked element in DOM and JSON Example: id = root(ELMNT_ID_SPACE_CHAR)parent(ELMNT_ID_SPACE_CHAR)child(ELMNT_ID_SPACE_CHAR)item (ELMNT_ID_SPACE_CHAR) is a GLOBAL VAR PURPOSE: Determine where the clicked element and it's as...
function ItemDepthInTree(itemNameString) { var indexes = [], i; for(i = 0; i < itemNameString.length; i++) if (itemNameString[i] === ELMNT_ID_SPACE_CHAR) indexes.push(i); return indexes; }
[ "function lib_data_html_get_tree_nodes(iparams) // iparams = {elem_id, explorer_path}\r\n{\r\n // copy input params to save source on splice command\r\n var iparams_cp = jQuery.extend(true, {}, iparams); \r\n\r\n var level_ct = 0;\r\n var retval_ct = 0;\r\n var tree_nodes = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Detects if the current browser is a Windows Mobile device.
function DetectWindowsMobile() { //Most devices use 'Windows CE', but some report 'iemobile' // and some older ones report as 'PIE' for Pocket IE. if (uagent.search(deviceWinMob) > -1 || uagent.search(deviceIeMob) > -1 || uagent.search(enginePie) > -1) return true; //Test for Wi...
[ "function DetectWindowsMobile()\n{\n var uagent = navigator.userAgent.toLowerCase();\n if (uagent.search(deviceWinMob) > -1)\n return true;\n else\n return false;\n}", "function DetectWindowsMobile()\t{\n if (uagent.search(\"windows ce\") > -1)\n return true;\n else\n return f...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Walzengalde change the type of rotor in this slot.
changeRotor(rotorselect){ this.rotorselect=rotorselect; this.rotorperms=RotorPerms[rotorselect]; }
[ "setRotations() {\n }", "rotate(rot){\n this.currentRot += rot;\n this.updateRotation();\n }", "set rot(value) {\n if (this._allowRotation === false)\n return;\n if (this._rot !== value) {\n const tmp = this.width;\n this.width = this.height;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }