query
stringlengths
9
34k
document
stringlengths
8
5.39M
negatives
listlengths
19
20
metadata
dict
time basemap (facet: 0, time window: start, end)
function TimeMap(div, view, start, end) { var R = Raphael(div); this.regions = {}; this.labels = {}; this.width = $("#"+div).width(); this.beyond = 0; // set variables.. this.init = function() { // time lengths SECOND = 1000; TENSEC = 10 * SECOND; MINUTE = 60 * SECOND; TENMIN = 10 * MINUTE; H...
[ "function TimeBand (image) {\n return image.addBands(image.metadata('system:time_start'));\n}", "function startTime(map) {\n var today = new Date();\n var h = today.getHours();\n var m = today.getMinutes();\n var s = today.getSeconds();\n\n var month = today.getMonth();\n if (month == 0) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
hides question 2 and displays question 3
function question3() { document.getElementById("question2").style.display = "none"; document.getElementById("question3").style.display = "block"; }
[ "function hideQuestion() {\n $(\"#question0\").hide();\n $(\"#question1\").hide();\n $(\"#question2\").hide();\n }", "function question2() {\n document.getElementById(\"question1\").style.display = \"none\";\n document.getElementById(\"question2\").style.display = \"block\";\n}", "function q...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Turn an array of statement `nodes` into a `SequenceExpression`. Variable declarations are turned into simple assignments and their declarations hoisted to the top of the current scope. Expression statements are just resolved to their expression.
function toSequenceExpression(nodes, scope) { if (!nodes || !nodes.length) return; var declars = []; var bailed = false; var result = convert(nodes); if (bailed) return; for (var i = 0; i < declars.length; i++) { scope.push(declars[i]); } return result; function convert(nodes) { ...
[ "function toSequenceExpression(nodes, scope) {\n\t var declars = [];\n\t var bailed = false;\n\n\t var result = convert(nodes);\n\t if (bailed) return;\n\n\t for (var i = 0; i < declars.length; i++) {\n\t scope.push(declars[i]);\n\t }\n\n\t return result;\n\n\t function convert(nodes) {\n\t var ensure...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Computes the derivative of the input of a 3D convolution.
function conv3dDerInput_(xShape, dy, filter, strides, pad) { util.assert(xShape.length === dy.rank, function () { return "Length of inShape " + ("(" + xShape.length + ") and rank of dy (" + dy.rank + ") must match"); }); var xShape5D = xShape; var dy5D = dy; var reshapedTo5D = false; if (dy....
[ "function conv3dDerInput_(xShape, dy, filter, strides, pad) {\n util.assert(xShape.length === dy.rank, function () { return \"Length of inShape \" +\n (\"(\" + xShape.length + \") and rank of dy (\" + dy.rank + \") must match\"); });\n var xShape5D = xShape;\n var dy5D = dy;\n var reshapedTo5D = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
update the learner profile's knowledge of the current problem
function updateProfileProblemStatus(data){ console.log("update learner profile problem"); ajax(APP.LEARNER_PROFILE_STATUS_UPDATE + "?problem=" + escape(JSON.stringify(APP.currentProblem))); }
[ "function learn() {\n mind.learn(trainingData);\n }", "function updateLearnerProfile(data){\n\tif(data.type == \"correctness feedback\"){\n\t\tconsole.log(\"update learner profiles here\");\n\t\tif(data.parameter == \"correct\"){\n\t\t\tconsole.log(\"correct solution, updating profile\");\n\t\t\tajax(APP....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new insert / replace edit
function create(newText, insert, replace) { return { newText: newText, insert: insert, replace: replace }; }
[ "function create(newText, insert, replace) {\n return { newText: newText, insert: insert, replace: replace };\n }", "function create(newText, insert, replace) {\n return { newText: newText, insert: insert, replace: replace };\n }", "function Edit() {}", "addEdit(offsetBegin, offset...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sort the routes by specificity
function $$route$recognizer$$sortSolutions(states) { return states.sort(function(a, b) { return b.specificity.val - a.specificity.val; }); }
[ "optimizeRouteOrder() {\n\t\t\tthis.routes.sort((a, b) => {\n\t\t\t\tlet c = addSlashes(b.path).split(\"/\").length - addSlashes(a.path).split(\"/\").length;\n\t\t\t\tif (c == 0) {\n\t\t\t\t\t// Second level ordering (considering URL params)\n\t\t\t\t\tc = a.path.split(\":\").length - b.path.split(\":\").length;\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Cancels the pollerInterval if it is initialized.
function cancelPoll() { if (pollerInterval != null) { clearInterval(pollerInterval); } }
[ "stopPollCount() {\n if (this.pollInterval) {\n clearInterval(this.pollInterval);\n this.pollInterval = null;\n }\n }", "_disablePoll() {\n debug('disabling poll...');\n\n if (this._poll) {\n clearInterval(this._poll);\n this._poll = null;\n }\n }", "stop() {\n this.canPo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a resolved promise if logged in
function isLoggedInPromise() { if (loadPromise) { var deferred = $q.defer(); loadPromise .then(function(res) { deferred.resolve({code: 'AUTHORIZED'}); log.info(res); }) ...
[ "function isLoggedInPromise() {\n if (loadPromise) {\n var deferred = $q.defer();\n loadPromise\n .then(function(res) {\n deferred.resolve({code: 'AUTHORIZED'});\n log.info(res);\n })\n .catch(function(err) {\n deferred...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Arguments$prototype$equals :: Arguments ~> Arguments > Boolean
function Arguments$prototype$equals(other) { return Array$prototype$equals.call (this, other); }
[ "function Arguments$prototype$equals(other) {\n return Array$prototype$equals.call(this, other);\n }", "function sameNotSame(arguments1,arguments2){\n if(arguments1 === arguments2){\n console.log('true');\n }\n }", "function Function$prototype$equals(other) {\n return other === this;\n }", "funct...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Parses a StreamMap, pulls out the right url, takes 720p MP4 first, then 360p otherwise, then installs the player
function parseStreamMap(streamMapHTML) { var streamMap = {}; streamMapHTML.split(",").forEach(function (stream) { // gets url, tags, and signature try { var str = decodeURIComponent(stream); var tag = str.match(/itag=(\d{0,3})/)[1]; var url = str.match(/url=(.*?)(\\u00...
[ "function parseStreamMapUrls(streamMap) {\n let urls = {};\n\n const streams = streamMap.split(',');\n for (const encodedStream of streams) {\n const stream = decodeUrlEncodedString(encodedStream);\n if (stream.type.includes('video/mp4')) {\n urls[stream.quality] = stream.url;\n }\n }\n\n return ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Applies a list of defaults to an object. Prefers the key from params if available
function applyParamsAndDefaults(obj, params, defaults){ // Handle missing params if(typeof params === 'undefined') params = {}; // Loop through all defaults for(var key in defaults){ if(defaults.hasOwnProperty(key)){ // Use the default value if there isn't one set in params if(typeof params[key] !== '...
[ "function apply_defaults(obj) {\n var key;\n for (key in defaults) {\n obj[key] = obj[key] || defaults[key];\n }\n}", "function applyDefaults(params, defaults) {\n var settings = params || {};\n\n for(var setting in defaults) {\n if(defaults.hasOwnProperty(setting) && !settings[setting]...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Run heavy tests immedidately and every hour afterwards
function startHeavyTests(finish){ (new cronJob("0 * * * *", heavyTests)).start(); heavyTests(finish); }
[ "function startLightTests(finish){\n\t(new cronJob(\"*/5 * * * *\", lightTests)).start();\n\tlightTests(finish);\n}", "function runTests() {\n var old_error = set_error_handler(throw_on_error);\n \n var total_start = new Date().getTime();\n for (var test_name in __tests) {\n var tests = __tests...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find attached sheet with an index higher than the passed one.
function findHigherSheet(registry, options) { for (var i = 0; i < registry.length; i++) { var sheet = registry[i]; if (sheet.attached && sheet.options.index > options.index && sheet.options.insertionPoint === options.insertionPoint) { return sheet; } } return null; }
[ "function findHigherSheet(registry, index) {\n\t for (var i = 0; i < registry.length; i++) {\n\t var sheet = registry[i];\n\t if (sheet.attached && sheet.options.index > index) {\n\t return sheet;\n\t }\n\t }\n\t return null;\n\t}", "function findHigherSheet(registry, options) {\n for (let i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the scrolling settings depending on the plugin autoScrolling option
function getScrollSettings(top) { var scroll = {}; //top property animation if (options.autoScrolling && !options.scrollBar) { scroll.options = -top; scroll.element = $(WRAPPER_SEL)[0]; } //window real scrolling else { scroll.options = top; scroll.element = w...
[ "function getScrollSettings(top) {\n var options = getOptions();\n var position;\n var element; //top property animation\n\n if (options.autoScrolling && !options.scrollBar) {\n position = -top;\n element = $(WRAPPER_SEL)[0];\n } //window real scrolling\n else {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
validation for vehicletype register & update
async function validateVehicleType(vehicleType, isUpdate = false, id = null) { let query = vehicleTypeModel .find() .where("type") .equals(vehicleType.type.toLowerCase()); //extend the query if the request is update if (isUpdate) query.where("_id").ne(id); const validation = await query .exec(...
[ "function updateTypeOfVehicle(type){\r\n if ( type == tCar)\r\n isCar = true;\r\n else if ( type == tTruck )\r\n isTruck = true;\r\n else if ( type == tTw )\r\n isTw = true;\r\n }", "function registerVehicle()\n{\n var vehicleName = document.getElementBy...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Helper function which returns a promise which resolves once the service worker registration is past the "installing" state.
function waitUntilInstalled(registration) { return new Promise(function(resolve, reject) { if (registration.installing) { // If the current registration represents the "installing" service worker, then wait // until the installation step (during which the resources are pre-fetc...
[ "afterReady() {\n return new Promise( resolve => {\n setTimeout(\n resolve( navigator.serviceWorker.ready )\n );\n });\n }", "_installServiceWorker() {\n this.serviceWorkerPromise = navigator.serviceWorker\n .register(this.serviceWorkerUrl)\n .catch(error => {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
initializing sliders in detail modal
function initDetailSliders() { if ( detailSlidersInitialized ) return false; detailSlidersInitialized = !detailSlidersInitialized; $detailBottomSlider.slick({ slidesToShow: 3, slidesToScroll: 1, infinite: true, arrows: false, asNavFor: $detailTopSlider, focusOnSelect: true, mobileFirst: ...
[ "function initializeSliders() {\n\tupdateSilderLabel(minBPMRange, maxBPMRange, MinBPMValue, MaxBPMValue);\n\tupdateSilderLabel(minYearRange, maxYearRange, currentMinYear, currentMaxYear);\n\n\n}", "static setupSliders() {\n if (FilterView.sliderSupport !== null) {\n FilterView.sliderSupport.remo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
DEXT5 UPLOAD FUNCTION uploadHolder : call Position new Dext5Upload : call upload module
function dext5uploadEvnt(){ DEXT5UPLOAD.config.UploadHolder = uploadHoler; DEXT5UPLOAD.config.Mode = 'view'; // edit, view new Dext5Upload(uploadId); var ansFileGrpSeq = $('#ansFileGrpSeq').val(); if(ansFileGrpSeq != ""){ $.ajax({ type: 'post', url: contextPath + "/common/selectDext5upload.do", dataTy...
[ "function dext5uploadEvnt(){\n\tDEXT5UPLOAD.config.UploadHolder = uploadHoler;\n\tDEXT5UPLOAD.config.Mode = 'edit'; // edit, view\n new Dext5Upload(uploadId);\n \n var fileGrpSeq = $('#fileGrpSeq').val();\n\n\tif(fileGrpSeq != \"\"){\n\t\t$.ajax({\n\t\t\ttype: 'post',\n\t\t\turl: contextPath + \"/common/se...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
map user permissions and navigation menus
function mapPermissions() { var nav = {}, permissionList = []; for(var permission in service.access.permissions) { if(inRole(service.access.permissions[permission])) { permissionList.push(permission); } } service.permissionList = permissionList; service.nav = nav; }
[ "function changeMenu() {\n\t\tIBMCore.common.module.masthead.editProfileMenu({\n\t\t\taction: \"replace\",\n\t\t\tlinks: userLinks\n\t\t});\n\t\t\n\t\t// Replace menu from API; hack for now until implemented in API\n\t\tif (signedIn) {\n\t\t\tdocument.getElementById(\"ibm-signin-minimenu-container\").innerHTML = pr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find the cursor or leaf node selection closest to the end of the given document.
static atEnd(doc2) { return findSelectionIn(doc2, doc2, doc2.content.size, doc2.childCount, -1) || new AllSelection(doc2); }
[ "function closestMatchingAncestor(node) {\n let cursor = node;\n while (cursor) {\n if (cursor.mozMatchesSelector(selector))\n return cursor;\n if (cursor instanceof Ci.nsIDOMHTMLHtmlElement)\n break;\n cursor = cursor.parentNode;\n }\n return null;\n }", "function findSe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
If you want to Stop Watch doFilterStopWatching(filterWatch)
function stopWatchFilterEvents(filterWatch){ if(filterWatch){ filterWatch.stopWatching(); filterWatch = undefined; } }
[ "function doFilterWatchStart() {\n //1. Stop the wtach if its already ON\n doFilterStopWatching();\n //2. Reset the UI\n setData('watch_event_count','0',false);\n\n //3. Create the filter option\n var options = generateFilterOptions();\n console.log('FILTER Watch Options:', JSON.stringify(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
store vertex string keyed to pair vertex with height rank for polygon area
function buildVertexObj(vertexObj, pt, polyrank){ let ptstrng = pt[0].toString()+","+pt[1].toString(); if (ptstrng in vertexObj){ vertexObj[ptstrng]+= polyrank; } else{ vertexObj[ptstrng] = polyrank; } }
[ "createOrUpdateGeometry() {\n const startPixel = this.startPixel_;\n const endPixel = this.endPixel_;\n const pixels = [\n startPixel,\n [startPixel[0], endPixel[1]],\n endPixel,\n [endPixel[0], startPixel[1]],\n ];\n const coordinates = pixels.map(\n this.map_.getCoordinateF...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Open a document without a corresponding view
function openViewlessDocument( pathname ) { var desc = new ActionDescriptor(); desc.putBoolean( kpreferXMPFromACRStr, true ); desc.putPath( app.charIDToTypeID('File'), new File( pathname ) ); var result = executeAction( kopenViewlessDocumentStr, desc, DialogModes.NO ); var psViewPtr = result.getData( kdocumentStr ...
[ "function doOpenDocument() {\n var presenter = new mindmaps.OpenDocumentPresenter(eventBus,\n mindmapModel, new mindmaps.OpenDocumentView(), filePicker);\n presenter.go();\n }", "function openDocument(id)\n{\n deletePages();\n showGrStatusBar();\n\n xajax_load_model(id);\n}", "function op...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Toggle pagination on/off resets current gif data Only works if there are no pending requests
_togglePagination() { const { actions, query, gifsLoading, gifsLoaded, perPage } = this.props; if(!gifsLoading && gifsLoaded) { // toggle actions.togglePagination(); // reset current gif data actions.resetGifs(); // fetch new gif data from current query (quer...
[ "function togglePagination() {\n if (App.CurrentPage) {\n //reset pagination\n $('.pagination li').removeClass(\"active\").removeClass(\"disabled\");\n $('.pagination').find(\".page\" + App.CurrentPage).addClass(\"active\");\n if (App.CurrentPage === 1) {\n $('.prev').addCl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
load alias model export
loadAliasModel(alias) { THINK.loadCache(THINK.CACHES.MODEL, alias, 1); }
[ "loadAliasModel(alias) {\n THINK.cache(THINK.CACHES.MODEL, alias, 1);\n }", "loadAliasExport(alias) {\n let exp = arguments.length <= 1 || arguments[1] === undefined ? THINK.CACHES.ALIAS_EXPORT : arguments[1];\n\n alias = alias || THINK.cache(THINK.CACHES.ALIAS);\n for (let key in a...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Performs a chow from the previously discarded tile
function executeChow(roomId) { const room = rooms[roomId]; const chowArray = room.playerDiscardData[room.rnd.turn]; let tile = room.rnd.removeLastDiscard(); room.rnd.players[room.rnd.turn].currentHand.addTile(tile); room.rnd.players[room.rnd.turn].currentHand.meld(MeldTypes.chow, chowArray); roo...
[ "eat(tile) {\n this.tiles = this.tiles.splice(this.tiles.indexOf(tile), 1);\n this.split(this.width - tile.width, this.height);\n }", "canChow(tile, type) {\n tile = (tile.dataset ? tile.getTileFace() : tile);\n if (tile > 26) return false;\n let face = tile % 9;\n let t1, t2;\n if...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Properties: imageStrLines string, full image: color table and pixel data, split by \n into an array charToColor map from string (ASCII character) to string (hex color code) firstPixelLineIndex integer, index into imageStrLines for the first line of pixel characters width integer, width of image in pixels height integer...
constructor(imageStr) { this.imageStrLines = imageStr.split("\n") // Parse the color table this.charToColor = {} let colorTableLineCount = 0 for (let line of this.imageStrLines) { colorTableLineCount++ if (line == "") { break } if (line.startsWith("//")) { ...
[ "constructor(imageStr) {\n super(imageStr)\n\n this.maxTicks = 4\n this.tickCount = 0\n\n this.charToCount = {}\n this.clumps = []\n this.computeClumps()\n }", "function findTagsOnImage (canvas, drawLine) {\n var ctx = canvas.getContext('2d');\n var inputBuf = Module._malloc(canvas.width*...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Write a function called getLessThanZero that expects an array of numbers to be passed to it and returns a new array containing only those numbers from the array that was passed in that are less than zero.
function getLessThanZero(bunchOfNumbers) { var onlyLow = []; // bunchOfNumbers.slice(0, bunchOfNumbers.length); for (var i = 0; i < bunchOfNumbers.length; i++) { if (bunchOfNumbers[i] <= 0) { onlyLow.push(bunchOfNumbers[i]); } } return onlyLow; }
[ "function getLessThanZero(array) {\n return array.filter(function (a) {\n return a < 0;\n });\n}", "function getLessThanZero(arr) {\n if (!Array.isArray(arr)) {\n return console.log(\"Not an Array\");\n }\n\n var filtered = arr.filter(function(num) {\n return num < 0;\n });\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A sequencer has several SequencerTrack objects
function Sequencer(){ this.audio = new webkitAudioContext(); this.mixer = new Mixer(this.audio); this.songPos = 0; this.songLength = 0; this.tracks = new Array(); this.playing = false; this.playStartTime = 0; this.view = null; this.eventListeners = new Array(); this.selectedTrack = 0; }
[ "function Sequencer(track, cb_play, cb_stop, param)\n{\n\tif(param === undefined)\tparam = {};\n\t// Default sequencer prameters\n\tif(param.auto_scroll === undefined) param.auto_scroll = false; // Auto scroll On/Off\n\n\tthis.param = param;\n\n\tthis.sequence = [];\n\tthis.hasValidStructure = false;\n\n\tthis.cb_p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Remove some substring from the end of the template, if it ends in the substring. This also returns whether the given substring was a valid ending substring.
clipEnd(substr) { if (this.content.endsWith(substr)) { this.content = clipStringEnd(this.content, substr); return true; } return false; }
[ "static includesEnd(string, subString) {\r\n\t\tlet subStringLength = subString.length;\r\n\t\tlet stringLength = string.length;\r\n\r\n\t\tif (subStringLength > stringLength || typeof string != \"string\") {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (string.substring(stringLength - subStringLength, stringLengt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
getIsMasterCatalogSelected(tblName,masterCatalogId) determine if one of the selected box is the master catalog
function getIsMasterCatalogSelected(tblName,masterCatalogId) { for (var i=1; i<tblName.rows.length; i++) { if (tblName.rows(i).cells(0).firstChild.checked && tblName.rows(i).cells(0).firstChild.name == masterCatalogId) return true; } return false; }
[ "isMaster() {\n\t\tlet courses = Educations.findOne(Meteor.user().master).courses;\n\t\tfor(let i = 0; i < courses.length; i++) {\n\t\t\tif(courses[i] === this.props.course._id) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}", "function isMasterOpp(oppId){\r\n\tvar mastRec=nlapiLoadRecord('opportunity', oppId);\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO must find all the coursesIDs from the registration table TODO add the courseID's to an array in javascript TODO then search in the courses table by doing a double for loop TODO outer for loop will iterate based of the courseID in the array TODO innerloop will fetch the course from the course table
function renderCourses(purpose, id) { var pregList = getRegistrationList(); var pcourses = getCourses(); var regList = JSON.parse(pregList); var courses = JSON.parse(pcourses); var studentCourses = []; var regIds = []; // find all the courses id from the registration list by matching the st...
[ "function loadCourses() {\n var aCourseIDs = localStorage.getItem(\"aCourseIDs\") != null ? JSON.parse(localStorage.getItem(\"aCourseIDs\")) : [];\n for(var i = 0; i < aCourseIDs.length; i++) requestAddCourseToList(aCourseIDs[i]);\n }", "function _getCourseData() {\n var courses = [];\n\n $...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Private methods / Calculates the Julian Day Count given a Gregorian date.
function calcJulianDayCnt(inpYearNbr, inpMonthNbr, inpDateNbr) { var validatedDate = SolarCalculator.ValidateDate(inpYearNbr, inpMonthNbr, inpDateNbr); inpDateNbr = validatedDate.date; if (inpMonthNbr <= 2) { inpYearNbr -= 1; inpMonthNbr += 12; } var A = Math.floor(inpYearNb...
[ "function calcJulianDay(){\n\tvar j = (document.daycounter.julianday.value); // extract Julian Day, numeric value (not necessarily integer) expected.\n\tj = j.replace(/\\s/gi, \"\"); j = j.replace(/,/gi, \".\"); j = Number (j);\n\tif (isNaN (j)) alert (\"Non numeric value\" + ' \"' + document.daycounter.julianday.v...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
grab the actual SA reply page we need a form key and a form cookie
function startPostTextGrab(getFormKeyOnly, postid) { pageGetter = new XMLHttpRequest(); // If a postid is specified, fetch it as a quote. // Otherwise, check the params. var getType = "quote"; if (!postid) { postid = quickParams.postid; getType = quickParams.quicktype; } var targeturl; swit...
[ "function gmail_get_IK(){\r\n\tvar formEntries, thisIK;\r\n\tvar ik='';\r\n\tformEntries = xpath('//form[@name=\"af\"]');\r\n\t\t\r\n\tfor (var i=0; i<formEntries.snapshotLength; i++){\r\n\t\tthisIK = formEntries.snapshotItem(i).action;\r\n\r\n\t\tif(thisIK.indexOf('ik=') && ik==''){\r\n\t\t\tvar start = thisIK.las...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function that pulls a random value from the spinValues array
function spinAmount() { return spinValues[Math.floor((Math.random()*spinValues.length))]; }
[ "function randVal(array) {\n return array[Math.floor(Math.random() * array.length)];\n }", "function randomVal (array){\n\treturn array[ Math.floor(Math.random() * array.length) ]\n}", "static Value(array) {\n return array[Random.Int(0, array.length)];\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
; public static const ELEMENT_CELL:BEMElement =
function ELEMENT_CELL$static_(){LayoutPreviewRenderer.ELEMENT_CELL=( LayoutPreviewRenderer.BLOCK.createElement("cell"));}
[ "function getCell(elCell) {\n\n}", "function Cell() {}", "static get CELL_COUNT() {\n\t\treturn 81;\n\t}", "function ELEMENT_CELL_READ_ONLY$static_(){LayoutPreviewRenderer.ELEMENT_CELL_READ_ONLY=( LayoutPreviewRenderer.BLOCK.createElement(\"cell-read-only\"));}", "function ELEMENT_CELL_HIGHLIGHTED$static_()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
create [label] [privateKey] Creates a new KeyPair with the optional label or returns a KeyPair representing the given private key. Parameters: label : optional label for this key privateKey : wif or private key (hex64)
function create( label, privateKey ){ return new KeyPair(label, privateKey); }
[ "function createKeyPair() {\n reporter.log('...Creating new Key Pair...');\n saveKey(ursa.generatePrivateKey());\n}", "function createPrivateKey(key_label, key_pwd, ipcEvent){\n if (!tryDbAndRetryIfFail(createPrivateKey, [key_label, key_pwd, ipcEvent])) {\n return\n }\n\n lockDB()\n let child...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This converts decimal hours to hours and minutes.
function decimalHourConverter(time) { const hour = Math.floor(time); let minute = (time-hour)*60; if(minute === 0) { minute = "00"; } return hour+":"+minute; }
[ "function calculateHours(hours){\n var minutesFromHours = hours.split(\"h\")\n return minutesFromHours[0]*60\n }", "function timeConvert(minutes) {\n hours = Math.floor(minutes / 60);\n min = minutes % 60;\n return hours;\n }", "timeConvert(numOfMins){\n // Divide the enter...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
readonly attribute boolean imapShared; // this is an imap shared folder
get imapShared() { return true; }
[ "function isPersonalSharedFolder(qStr)\n{\tvar folderList;\n\tif(personalFoldersList==\"\")\n\t{\n\t\tfolderList = ReadPersonalFoldersSettings(msSettingsPersonalFolder);\n\t}\n\telse\n\t{\n\t\tfolderList = personalFoldersList;\n\t}\n\tvar ret = false;\n\tvar i=0;\n\tfor(i=0;i<folderList.length;i++)\n\t{\n\t\tif(fol...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
move element to navbar
function moveItem2Navbar(pItem) { var element = $('#P0_SEARCH_' + pItem).detach(); $('.navbar-' + pItem).append(element); }
[ "function navbar() {\n\t\tstickyNavbar();\n\t}", "function moveIntoPlace(){\n\t\t$globalNavCont.append( $megaMenu );\n\t\t//$global-nav.after( $megaMenu );\n\t\tfirstClick = false;\n\t}", "function addNavbar() {\n let navHome = `nav > a[href='/home'],\n nav > a[href='/notifications'],\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Loading for Popup Viewer Visualizations
function startLoadingPopupViewerScreen() { $("#popupViewerTabs").block({ message: '<h1>Loading Visualizations...</h1>', border: 'none', padding: '15px', backgroundColor: '#000', '-webkit-border-radius': '10px', '-moz-border-radius': '10px', opacity: .5, color: '#fff' }); }
[ "function loadPopupBox() {\n\tsppro_loader();\n}", "function LibraryPopupView() {\n\n}", "function viewerLoaded(){\n iv.addEvent(\"centerchanged\",centerChanged);\n iv.addEvent(\"zoomchanged\",zoomChanged);\n iv.addEvent(\"layerchanged\",layerChanged);\n iv.addEvent(\"layeradded\",layerAdded);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Just print the error and jump to next error middleware.
logErrors(err, req, res, next) { console.error(err.stack); next(err); }
[ "function logErrors(err, req, res, next) {\n\tconsole.log(err.stack);\n\tnext(err); \t// Llama al próximo middleware de error, en caso de que no exista llama al nativo de express\n}", "errorPageHandler(err, req, res, next) {\n res.status(500);\n res.render('error', {error: err.stack});\n }", "function er...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
We don't do the purest simplest recursion, because we can avoid reading Blob objects entirely since the Tree objects tell us which oids are Blobs and which are Trees.
async function walk (oid) { visited.add(oid); let { type, object } = await GitObjectManager.read({ fs, gitdir, oid }); if (type === 'commit') { let commit = GitCommit.from(object); let tree = commit.headers().tree; await walk(tree); } else if (type === 'tree') { let tree = GitTre...
[ "function blobRecurse(blobs, nest, blobId) {\n const memo = Array.from(blobs)\n function r(blobs, nest, blobId) {\n\n // if(memo[0] == 1) {continue};\n\n if (blobs[0].toString() === nest) {\n // memo[0] = 1;\n if (blobs[1]) {\n blobs[1].push([blobId]);\n }\n else {\n blobs....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Move all the cells to the top of the grid. Returns true if cells were moved.
function moveAllToTop() { var moved = false; for (var c = 0; c < 4 ; c++ ) { var s = 0; for (var r = 0; r < 4 ; r++ ) { if (!isCellEmpty(r, c)) { if (r != s) { moved = true; setGridNumRC(s, c, grid[r][c]); setEmptyCell(r, c); } s++; } } } return moved; }
[ "function moveAllToLeft() {\n\tvar moved = false;\n\tfor (var r = 0; r < 4 ; r++ ) {\n\t\tvar s = 0;\n\t\tfor (var c = 0; c < 4 ; c++ ) {\n\t\t\tif (!isCellEmpty(r, c)) {\n\t\t\t\tif (c != s) {\n\t\t\t\t\tmoved = true;\n\t\t\t\t\tsetGridNumRC(r, s, grid[r][c]);\n\t\t\t\t\tsetEmptyCell(r, c);\n\t\t\t\t}\n\t\t\t\ts++...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
initially show only 6 pubs, then populate list with more
loadMorePubs() { if (this.pubList.length < this.pubs.length ) { this.pubList = this.pubs.slice(0, this.pubList.length + 1); } }
[ "function loadplaylistentries() {\n\tvar limit_vids = 6,\n\tload_more_vids = 3;\n\t//reset the limit_vids\n\t$('.chn-vidhub-button').click(function() {\n\t\tlimit_vids = 6;\t\n\t});\t\n\t$('#loadMore').bind('click', function(){\n\t\tlimit_vids += load_more_vids;\n\t\t$('#vjs-playlist li:lt('+(limit_vids)+')').show(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
startText Description: Displays intro sequence speech Parameters: event Programmer: Ofir Mashiach Date: 13.8.2020
function startText() { event.stopImmediatePropagation(); nPage++; // If we're not done with intro sequence speech, keep updating it if (nPage <= COMMANDER_SPEECH_LENGTH) { $('#commanderSpeechCounter').text(" לחץ על המסך כדי להמשיך " + COMMANDER_SPEECH_LENGTH + " / " + nPage); $('#c...
[ "function intro(first) {\n // Disable click event handler\n outlines.interactive = false;\n\n console.log('intro');\n let options = {\n rate: 1.5,\n onstart: ()=>{introCounter++},\n onend: wait\n }\n // Initial instructions when game is first started\n // calls wait() while Simon finishes speaking, ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add the given annotation to a range of source code lines.
addAnnotation(annotation_text_id, content, range, annotation_id, is_remark) { super.addAnnotation(annotation_text_id, content, range, annotation_id, is_remark); let lineStart = range.start; let lineEnd = range.end; if (lineStart < 0 || lineEnd < 0) return; let columnStart = range.column_start; ...
[ "function highlightAnnotation(range, role){\n var s = range.start;\n var e = range.end;\n var r = new Range(s.row, s.column, e.row, e.column);\n currentHighlight = editor.getSession().addMarker(r,\"line-style-\" + role, \"text\");\n}", "annotateLine(annotationId, lineNum, columnStart, columnEnd) {\n let li...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets toilets on map
function setToilets(data, long, lat){ if(isLive == true){ map.removeLayer(markerHere); } map.setView(new L.LatLng(lat,long), 17); var MyIcon = L.Icon.extend({ iconUrl : 'images/marker.png', iconSize : new L.Point(25, 41), shadowSize : null, iconAnchor : new L.Point(16, 35)}) ...
[ "function setTeachingBuildingsMap(map) {\n for (var i = 0; i < teachingBuildingsMarkers.length; i++) {\n teachingBuildingsMarkers[i].setMap(map);\n }\n}", "function setMarkersTUR() {\n markers =[\n ['Istambul', 41.0055005,28.7319924],\n ['Ankara', 39.9035557...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determine whether the given properties match those of a `KafkaClusterEncryptionInTransitProperty`
function CfnConnector_KafkaClusterEncryptionInTransitPropertyValidator(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 ...
[ "function cfnConnectorKafkaClusterEncryptionInTransitPropertyToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n CfnConnector_KafkaClusterEncryptionInTransitPropertyValidator(properties).assertSuccess();\n return {\n EncryptionType: cdk.stringToCl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes all the elements from the Singly Linked List
clear(){ let current = this.head; while(current !== null){ let next = current.next; current = null; current = next; } this.head = null,this.tail = null; this.size = 0; }
[ "removeFirst() {\n\t\tthis.head = this.head.next;\n\t}", "removeBack() {\n\n let runner = this.head;\n\n while (runner.next) {\n\n if (runner.next.next === null) {\n runner.next = null;\n return sList;\n }\n runner = runner.next;\n }\n\n this.head = null;\n }", "removeF...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Flatten multidimensional arrays to 1 unified level / Should have made recursive: acc.concat(flattenALL(val))
function flattenALL(arr1) { return arr1.reduce((acc, val) => Array.isArray(val) ? acc.concat(val.reduce((acc2, val2) => acc2.concat(val2),[])); : acc.concat(val),[]); }
[ "flatten(arr) {\n return arr.reduce((flat, toFlatten) => {\n return flat.concat(\n Array.isArray(toFlatten) ? this.flatten(toFlatten) : toFlatten\n );\n }, []);\n }", "function flatten(arr){\n var finalArray = [];\n\n function helper(arr) {\n for (let i = 0; i < arr.length; i++) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this function takes ypub and turns into xpub
function ypubToXpub(ypub) { var data = b58.decode(ypub) data = data.slice(4) data = Buffer.concat([Buffer.from('0488b21e','hex'), data]) return b58.encode(data) }
[ "function convertXpub(original, network) {\n if (network.bip32.public === 0x0488b21e) {\n // it's bitcoin-like => return xpub\n return original;\n } else {\n var node = bitcoin.HDNode.fromBase58(original); // use bitcoin magic\n\n // \"hard-fix\" the new network into the HDNode key...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
if user use cyrillic, search at ru Wiki
function isCyrillic (text) { if(/[а-я]/i.test(text)) { return 'ru' } else { return 'en' } }
[ "function findLang (){\n\n\t\t\t\t\t\t\t\t\t\tvar parsed = __.urlObject().searchObject;\n\n\t\t\t\t\t\t\t\t\t\t$M.lang = supportsLang(parsed.lang) || $M.defaultLang;\n\t\t\t\t\t\t\t\t}", "function message_is_cyrillic(message){\n //Some people use cyrillic characters to write spam that gets past the filter.\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get all ancestor implications for a tag
allrelations(tag) { var tmp = []; let itemdict = this.tag_implications; if (tag in this.tag_implications) { for(let i=0;i<itemdict[tag].length;i++) { tmp.push(itemdict[tag][i]); let tmp2 = this.allrelations(itemdict[tag][i]); tmp = tmp....
[ "getTagsDerivedFrom(tagName) {\n return Object.entries(this.elements)\n .filter(([key, entry]) => key === tagName || entry.inherit === tagName)\n .map(([tagName]) => tagName);\n }", "function getHtmlElementAncestors(elem) {\r\n var elems = [];\r\n while (elem && elem instance...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
end of Vitals / printVitals returns a string with summary of current vitals
function printVitals(v){ var vital_string = "BP:" + v.bp + ", " + "PR:" + v.pr + ", " + "RR:" + v.rr; return vital_string; }
[ "printInfo() {\n // console.log('EXCHANGE: investor list:');\n // Object.values(this.investors).forEach(investor => void console.log(investor));\n // console.log(`EXCHANGE: chain length: ${this.chain.lastBlock().index}, total BTC: ${this.totalBtc}`);\n }", "results () {\n let output = '...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
1 Using map, Write a function called uppercaseValues that, given an object as a parameter, returns a new object with all of its string values converted to uppercase. Also, ensure that you only attempt to convert strings to uppercase.
function uppercaseValues(obj) { return map(obj, function (value, key) { if (typeof (value) === "string") { return value.toUpperCase() } return value }) }
[ "function upperCaseValues(obj){\n //loop through obj with map\n return map(obj, function(value, key){\n //if value is string\n if(typeof value === 'string'){\n //change string to upperCase\n return value.toUpperCase();\n }else\n // return unchanged value\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add album in playlist.
function addAlbum(albumID) { var query = " SELECT concat('file://','/', u.rpath)"; query += " FROM tracks t, urls u"; query += " where t.album="+albumID; query += " and t.url=u.id"; query += " order by t.discnumber, t.tracknumber"; var result = sql(query); for (var i=0; i < result.length; i...
[ "function add_album_to_playlist(album)\n {\n make_command_request (\"add_album_to_playlist \" + album , response_callback_gen_status);\n }", "function addAlbum() {\n\tvar ul = document.getElementById(\"playlist\");\n\t\tvar items = ul.getElementsByTagName(\"li\");\n\t\tfor (var i = 0; i < items.length; ++i) {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Uploads the pic to Firebase Storage and add a new post into the Firebase Database.
uploadPic(e){e.preventDefault();this.disableUploadUi(true);var imageCaption=this.imageCaptionInput.val();this.generateImages().then(pics=>{// Upload the File upload to Firebase Storage and create new post. friendlyPix.firebase.uploadNewPic(pics.full,pics.thumb,this.currentFile.name,imageCaption).then(postId=>{page(`/us...
[ "uploadNewPic(pic, thumb, fileName, text) {\n // Get a reference to where the post will be created.\n const newPostKey = this.database.ref('/posts').push().key;\n\n // Start the pic file upload to Cloud Storage.\n const picRef = this.storage.ref(`${this.auth.currentUser.uid}/full/${newPostKey}/${fileNam...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets all transaction data for the specified trader and formats it as an array highcharts flags series data
function getFlagsData() { var filtered = transactions.filter(function(t) { return isTransactionForSelectedTrader(t); }); return filtered.map(function(t) { return formatFlagsData(t); }); }
[ "function initFlagsSeries(trader) {\n flagsSeries = chartSeries.filter(function(series) {\n return series.id == flagsSeriesId;\n })[0];\n\n if (!flagsSeries) {\n flagsSeries = {\n type : 'flags',\n id : flagsSerie...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
selChanged is called by clicked items to indicate new selection. Send it back to appNav in prop
function selChanged(selId) { data.selId = selId; appNav.setProps({mdata: data}); }
[ "selectedItemChanged() {\n if (super.selectedItemChanged) { super.selectedItemChanged(); }\n this.dispatchEvent(new CustomEvent('selected-item-changed'));\n }", "selectItem(newSelection, event) {\n this.selectionChanging.emit({\n newSelection,\n oldSelection: null,\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Attach a transform function to math.std Adds a property transform containing the transform function. This transform changed the `dim` parameter of function std from onebased to zero based
function factory (type, config, load, typed) { const std = load(require('../../function/statistics/std')) return typed('std', { '...any': function (args) { // change last argument dim from one-based to zero-based if (args.length >= 2 && isCollection(args[0])) { const dim = args[1] i...
[ "set transform(f) { this._transform = f || (x => x); }", "std() {\r\n const dim = this.dimensions();\r\n const mMean = this.mean();\r\n const r = [];\r\n for (let i = 1; i <= dim.cols; i++) {\r\n let meanDiff = this.col(i).subtract(mMean.e(i));\r\n meanDiff = meanDiff.multiply(meanDiff);\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reads custom feature XML from folder specified by config. This function looks for all `.rels` files in the `/_rels` folder, assumes that a Feature.xml file of the same name exists in the root folder. It returns an object with a list of IXml files to include in the package, as well as the paths to all the feature.xml fi...
function readCustomFeatures(options) { return getCustomFeatureXmlFilenames(options.paths.featureXmlDir) .then(function (filenames) { return getCustomFiles(options.paths.featureXmlDir) .then(function (files) { return { files: files, customFeatur...
[ "function getCustomFeatureXmlFilenames(featureXmlDir) {\n return getFiles_1.getRelativeFilePaths(path.join(featureXmlDir, constants_1.default.RelsFolder), \"*\" + constants_1.default.RelsXml, 'Found custom feature file: ')\n .then(function (filenames) {\n return filenames.map(function (filename) { ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes the NewSession window from the screen, removes the blurred background, and clears the buddiesClickedOn array
function closeNewSession() { var newSessionPopUp = document.getElementById('newStudySession'); newSessionPopUp.style.display = 'none'; var newSessionPopUp = document.getElementById('blur'); newSessionPopUp.style.display = 'none'; buddiesClickedOn = new Array(); }
[ "function clearScreens() {\r\n $('#mainContent').children().not('#Hub').hide();\r\n $('#mainFooter').removeClass('showScreen showLav showSave showDelete showNew showSparkles showDisabledSparkles');\r\n $(showingScreen).triggerHandler('hiding');\r\n showingScreen = null;\r\n $('#ma...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
takes a string returns TableMeta object
static parse(s) { const SPLIT_TOKEN = '--TableMeta--'; const ELEMENT_TOKEN = '--TMElement--'; if (!s) { return null; } var sAry = s.split(SPLIT_TOKEN, 7); let retval = new TableMeta(); if (sAry.length === 7) { try { var idx...
[ "parseTableString(tableString) {\n // split by line breaks. skip empty lines\n let lines = tableString\n .split(/\\n/)\n .filter(value => (value.match(/\\|/g) || []).length > 1)\n .map(value => value.trim().replace(/^\\|/, \"\").replace(/\\|$/, \"\").trim());\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This function checks to see if the extrapolated snake2 is >= the newly received snake2
function checkExtrapolatedSnake2(newSnake) { //Variables for finding distance var a = newSnake[0].x - snake2[0].x; var b = newSnake[0].y - snake2[0].y; var c = Math.sqrt(a * a + b * b); //Checks to see if snake goes into itself //If snake is going to bite itself then extrapolated pos...
[ "function checkExtrapolatedSnake1(newSnake)\r\n\t{\r\n //Variables for finding distance\r\n\t var a = newSnake[0].x - snake1[0].x;\r\n\t var b = newSnake[0].y - snake1[0].y;\r\n\t var c = Math.sqrt(a * a + b * b);\r\n\t //Checks to see if snake goes into itself\r\n\t //If snake is going to bit...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Step 2: Pull Zip Codes automatically Here we use the User's input to pull all ZipCodes close to the User's ZipCode based on a given distance
function pullZipCodes() { //Initialize DIVs on index.html to show webpage is doing work setMapCenter($('#zipCodeInput').val()); outputDivString += "&nbsp&nbspWorking...<br />"; $('#outputDiv').html(outputDivString); $('#pullZipCodeButton').prop('disabled', true); //CODE REDACTED DUE TO PROPRIETARY USAGE ...
[ "function zipcodeFinder (){\n\t\n\tlet zipcodeQueryUrl = 'https://crossorigin.me/https://www.zipcodeapi.com/rest/';\n\tlet zipcodeCity = '/city-zips.json/' + city;\n\tlet zipcodeState = '/'+ state;\n\n\t\n\tlet zipcodeFullQueryUrl = zipcodeQueryUrl + zipcodeKey + zipcodeCity + zipcodeState;\n\t\n\t$.ajax({\n\t\turl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
removes bad characters from attachment file names
function getCleanAttachmentName(name) { return name.replace(/[\\\\/:*?\"<>|]/g, '_'); }
[ "function stripInvalidFileNameChars(fileName) {\n return fileName.replace(/[\\/\\\\:\\?\"*<>|\\.]/g, '');\n}", "function normalizeFileName(fileName) {\n return fileName.replace(/[\\<\\>\\:\"\\/\\\\\\|\\?*]/g, \"\");\n }", "function sanitize_filename(name) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sends the `searchbarquerynext` event to the main script so the window search handler can mark next search result.
highlightNext() { ipc.send('search-bar-query-next'); }
[ "function nextSearch() {\n if (trjs.data.searchCount && trjs.data.searchCount > 0) {\n if (trjs.data.searchPos < trjs.data.searchCount - 1) {\n trjs.data.searchPos++;\n $('#search-posx').text(trjs.data.searchPos + 1);\n trjs.events.goToLine(trjs.data.se...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A notimplemented function for atomicopers that are expected but not implemented.
function notImplementedOper(ctx) { ctx.complain(this.name, 'not implemented'); }
[ "function AtomicInvoke() {\r\n}", "function noOp() {\n\t}", "function testPerformAtomic() {\n var mc = _memcache();\n mc.put(\"k\", \"a\");\n assertEqual(\"a\", mc.get(\"k\"));\n\n function twice(x) { return x+x; }\n\n mc.performAtomic(\"k\", twice);\n assertEqual(\"aa\", mc.get(\"k\"));\n\n mc.performAt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get an `IconDefinition` object from abbreviation type, like `accountbookfill`.
function getIconDefinitionFromAbbr(str) { const arr = str.split('-'); const theme = mapAbbrToTheme(arr.splice(arr.length - 1, 1)[0]); const name = arr.join('-'); return { name, theme, icon: '' }; }
[ "function getIcon(type) {\n\tswitch(type) {\n\t\tcase \"food\": return greenMarker;\n\t\tcase \"attraction\": return redMarker;\n case \"museum\": return blueMarker;\n case \"bar\": return orangeMarker;\n\t\t//default: return \"icons/footprint.png\";\n\t}\n}", "function typeToIcon(type) {\n var c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
update detail content by index of current display employee array
function updateProfileDetail(index){ const selectEmployee = currentEmployeeArray[index]; const birthDayRaw = new Date(selectEmployee.dob.date); const birthDate = birthDayRaw.getDate().toString().length === 1? "0"+birthDayRaw.getDate() : birthDayRaw.getDate(); const birthMonth = (birthDayRaw.getMonth() +...
[ "function setEmployee(employee) {\n let employeeDiv = '<div class=\"employee\" data-index=\"'+employee.index+'\">';\n\n employeeDiv += '<img class=\"avatar\" data-index=\"' + employee.index + '\" src=\"' + employee.img + ' \" alt=\" ' + employee.name + ' ' + employee.userName + ' \">';\n employeeDiv += '<d...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the multiplication of v1 and v2. Target is the object receiving the values (v1 by default)
static mult(v1, v2, target) { if (!target) target = v1.copy(); else target.set(v1); target.mult(v2); return target; }
[ "static product(v1, v2) {\n\t\treturn Vector.componentWiseOperation(v1, v2, (x, y) => x * y);\n\t}", "static mul() {\n\t\tvar a = arguments[0];\n\t\tvar b = arguments[1];\n\t\tvar x, y, z;\n\t\tif(a instanceof Vect3) {\n\t\t\tx = a.x * b;\n\t\t\ty = a.y * b;\n\t\t\tz = a.z * b;\n\t\t} else if(b instanceof Vect3) ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
draws 1 arc of the parlament, given the dimensions ov the parent svg, seats array and pariament row (k)
function drawArc(dimensions, row, k) { // total number of drawing elements var n = 0; // if we are in the last row and it's not full if(oddLastRow && k == totalRows) n = row.length; else { for(var i = 0; i < row.length; i++) { if (row[i] != 0) n++; ...
[ "function drawArc(e1,e2,a,k,num_arc, coordonnees, first, p){\n\n var x = 155+(a-1)*230,\n y= 140+(4-e1)*50-(e2-e1)*25,\n h = 2+(e2-e1)*50, x1, x2, x3, x4,y1, y2, y3, y4;\n\n if (first){\n first = false;\n\n if (k%2==0){\n\n if (e2<e1){\n coordonnees[num_arc][0] = x-30+50*((k+1)/2)+(e1-...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
html code for remote controller
function remoteControllerHtml() { var htmlCode = '<div id="redDiv"><a href="#" id="red1" class="cButton">R</a><a href="#" id="red2" class="cButton"></a><a href="#" id="red3" class="cButton"></a><a href="#" id="red4" class="cButton"></a><a href="#" id="red5" class="cButton"></a></div>'; htmlCode += '<div id="gre...
[ "render(controller, view) {}", "function displayRemote(html) {\n html = '<div class=\"fright\"><a href=\"#\" onclick=\"hideRemote(); return false;\">X</a></div>' + html + '<div class=\"break\"><!-- i --></div>';\n $(\"#remote\").html(html);\n}", "function BrowserController()\n{\n\t\n}", "function ViewContro...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the data from db.json
function read() { var data = JSON.parse(fs.readFileSync('db/db.json', 'utf-8')); return data; }
[ "readFromDB() {\n return readFile(\"db/db.json\", \"utf8\");\n }", "read() {\n return fs.readFile('db.json', 'utf8');\n }", "function getRawDataDB () {\n return rawData\n}", "function getData(){\r\n\treturn db.Execute('SELECT * FROM sampleTable');\r\n}", "function getLevelDBData(key){\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
simple password checks. raise alert if password or username is empty or if passwords don't match
function PswCheck() { if ($('#usernameFld').val().length > 0 && $('#passwordFld').val().length > 0 && $('#passwordFld').val() === $('#verifyPasswordFld').val()) { $('#alert').hide(); return true; } else { $('#alert').fadeIn(); return false; } }
[ "function verifyInputs(username, password) {\n\n}", "function checkPassword(user, password){\n\n}", "function checkPasswordMatch() {\n var password = \"\";\n var confirmPassword = \"\";\n\n if ($(\"#newPass\").length) {\n password = $(\"#newPass\")\n .val()\n .trim();\n }\n\n i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add label to layer
addLabel(layer, text) { const prop = layer.feature.properties; const geometry = layer.feature.geometry; const labelStyle = L.extend(prop.labelStyle || {}, this.options.labelStyle); const latlng = this._getLabelLatlng(geometry); if (prop.style && prop.style.color) { l...
[ "function updateLabelLayer() {\n\n labelLayer.getSource().clear();\n if (scope.message) {\n var features = MessageService.featuresForMessage(scope.message);\n if (features.length > 0) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Declare a function name userIdGenerator. When this function is called it generates seven character id. The function return the id.
function userIdGenerator() { let id = ''; let charList = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; for (let i = 0; i < 8; i++) { id += charList.charAt(Math.floor(Math.random() * charList.length)); } return id; }
[ "function generateUserId() {\n const timeSuffix = (Date.now()) % 1e8; // 8 digits from end of timestamp\n const alphabet = \"abcdefghijklmnopqrstuvwxyz0123456789\";\n const result = [];\n for (let i = 0; i < 8; i++) {\n const choice = Math.floor(Math.random() * alphabet.length...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
;; camDebugOnce(string...) ;; ;; Same as ```camDebug()```, but prints each message only once ;; during script lifetime. ;;
function camDebugOnce() { var str = arguments.callee.caller.name + ": " + Array.prototype.join.call(arguments, " "); if (camDef(__camDebuggedOnce[str])) { return; } __camDebuggedOnce[str] = true; __camGenericDebug("DEBUG", arguments.callee.caller.name, arguments, ...
[ "function camTraceOnce()\n{\n\tif (!__camCheatMode)\n\t{\n\t\treturn;\n\t}\n\tvar str = arguments.callee.caller.name + \": \" + Array.prototype.join.call(arguments, \" \");\n\tif (camDef(__camTracedOnce[str]))\n\t{\n\t\treturn;\n\t}\n\t__camTracedOnce[str] = true;\n\t__camGenericDebug(\"TRACE\",\n\t ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
console.log("From Time Series with patameters: " + field + " " + slope + " " + intercept + " " + fieldName)
function logArrayElements(element, index, array) { dateFromPython = new Date(element['Date']) if(field == "CO2 (PPM)"){ data.push([dateFromPython.getTime(), ( parseFloat(slope) * parseFloat(element[fieldName]) ) + parseFloat(intercept)] ) } else if (field == "CO (PPM)"){ ...
[ "function getTimeSeriesGraphWithExtraParameters(content, field, slope, intercept) {\n \"use strict\",\n data = []\n updateFieldName(field)\n\n // console.log(\"From Time Series with patameters: \" + field + \" \" + slope + \" \" + intercept + \" \" + fieldName)\n function logArrayElements(element, in...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Writes form data to the Google Sheet
function writeForm(form) { var input = formDataToInputData(form); if (validateFormData(input)) { var ss = SpreadsheetApp.openById('fill-this-in'); writeHunt(ss, input); writeHunters(ss, input); if (input.birdsList) { writeBirds(ss, input); } var returnString = Utilities.f...
[ "function insertDataToGoogleSheet() {\n 'use strict';\n\n const scriptURL = 'https://script.google.com/macros/s/AKfycbxrgyG_pG6uqFUSu-ov5yUw_F-seSm6SsVaumfZz7jYLaWgkbI/exec';\n const form = document.forms['submit-to-google-sheet'];\n\n\n fetch(scriptURL, {\n method: 'POST',\n body:...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a regular expression to match a function call.
function regexpForFunctionCall(fnName, args) { const optionalWhitespace = '\\s*'; const argumentParts = args.map( arg => optionalWhitespace + arg + optionalWhitespace ); let parts = [fnName, '\\(', argumentParts.join(','), '\\)']; return new RegExp(parts.join(''), 'g'); }
[ "function RegularExpression(){}", "function Regexp() {}", "function regexMatchFunc(...args) {\n const [arg0, arg1] = args;\n const name1 = (arg0 || '').toString();\n const name2 = (arg1 || '').toString();\n return regexMatch(name1, name2);\n}", "function fromRegex (r) {\n return function (o) { re...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
(experimental) Add a service to the dockercompose file.
addService(serviceName, description) { const service = new DockerComposeService(serviceName, description); this.services[serviceName] = service; return service; }
[ "function addService() {\n return __awaiter(this, void 0, void 0, function* () {\n const chartYaml = yield util_1.loadChartValues();\n const serviceResult = yield kubectl.invokeAsync('get svc -o json');\n if (serviceResult.code === -1) {\n return;\n }\n const service...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get type name, even for mangled objects
function get_type_name(obj) { if (obj == undefined) return "undefined" if (obj.constructor != undefined && obj.constructor.name != undefined && obj.constructor.name != "") return obj.constructor.name; var c; try { var c = obj.toSource() } catch (Error) { c = "" ...
[ "getTypeName() {\r\n return this._getNodeFromCompilerNode(this.compilerNode.typeName);\r\n }", "_parseTypeName(type: Object): string {\n switch (type.type) {\n case 'Identifier':\n return type.name;\n case 'QualifiedTypeIdentifier':\n invariant(type.id.type === 'Identifier');\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds a marker to the map for a specific incident and adds nearby hospital markers
function createIncidentMarker(location, id) { // Add markers for hospitals within a 20km radius of this location if the id doesn't exist in hospitalMarkers already if (!hospitalMarkers[id]) { service.nearbySearch({ location: location, radius: 20000, type: ['hospital']...
[ "function registerMarker(incident){\n var marker = {\n lat: incident.l[0],\n lng: incident.l[1],\n draggable: false\n };\n\n var center = {\n lat: marker.lat,\n lng: marker.lng,\n zoom: 16\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
After writing the function, I noticed that when I test a function with large numbers, it works very slowly so in the next solution I made the optimization by changing the condition. If in the first option we increase the number of gifts, then now we do the same but using weight Now the condition is as follows: (yCount ...
function totalOptions(x, y, z, w) { let result = 0; const start = Date.now(); let xCount, yCount, zCount; for(xCount = 0; xCount <= w; xCount += x) { // console.log("for 1: xCount=" + xCount); for(yCount = 0; yCount <= w - xCount; yCount += y) { // console.log("----for 2: yCount=...
[ "function cellularAutomation(cavernWidth, cavernHeight, cavernArray, cavernSkeleton, iterations){\n if (iterations <= 0){\n return cavernArray;\n } else {\n var weightedArray = new Array();\n var otherWeightedArray = new Array();\n weightedArray = new Array();\n for (var i = 0; i < cavernHeight; i+...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handles removing the Sort Input Fields and [] Button for Exporting, Sets the placeholder Excel file name
function initializeExportModal() { if (numberOfSorts === 0) { for (var t = 1; t < 8; t++) { $("#thenBy" + t).hide(); $("#thenBy" + t).val(""); } } checkSorts(); $("#dateRangePanelBody").hide(); $("#exportFilenameInput").val(""); var date = new Date(); ...
[ "function resetExportModal(){\n $(\"#exportModal\").modal(\"hide\");\n while (numberOfSorts > 0) {\n $(\"#thenBy\" + numberOfSorts).hide();\n numberOfSorts--;\n }\n $(\"removeSortButton\").hide();\n \n if ($(\"#exportFilenameInput\").val() == \"\") {\n $(\"#exportFilenameInput...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generate random tile number/type
function generateTileType() { var x = gameTiles.length; gameTiles[x] = new gameTile(); gameTiles[x].type = Math.floor((Math.random() * 4) + 0); //Tile type rng }
[ "function randTile() {\n return Math.floor(Math.random() * tileLength);\n}", "function generateTile() {\r\n\t\tvar emptyTiles = getEmptyTiles();\r\n\t\tvar randomTile = getRandomTile( emptyTiles );\r\n\t\tvar randomNumber = generateNumber();\r\n\t\tvar coorArr = emptyTiles[randomTile].split( '' );\r\n\t\ttable...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Helper function to save the incident report
function saveIncidentData (trafficReportData, res){ var newTrafficReport = new TrafficIncidentReport(trafficReportData); newTrafficReport.save(function (errorSaving){ if(errorSaving){ res.send({'success':false, 'message':'An error occured while saving Traffic Incident Report. [Technical Details] Error is '+errorS...
[ "function saveReport(){\n var newReport = {\n build: model.config.Version,\n reportData:model.jsonReport,\n overallFR: 1.40,\n stableFR: 1.98,\n unstableFR: model.unstableFailureRate,\n config: model.config,\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Read response packet. packet can be : an ERR_Packet a OK_Packet
readResetResponsePacket(packet, out, opts, info) { if (packet.peek() !== 0x00) { return this.throwNewError( 'unexpected packet', false, info, '42000', Errors.ER_RESET_BAD_PACKET ); } packet.skip(1); //skip header packet.skipLengthCodedNumber(); //affe...
[ "readResponsePacket(packet, out, opts, info) {\n switch (packet.peek()) {\n //*********************************************************************************************************\n //* OK response\n //********************************************************************************************...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Compresses data with DEFLATE without any wrapper
function deflateSync(data, opts) { return dopt(data, opts || {}, 0, 0); }
[ "function unbgzf(data, lim) {\n\n const oBlockList = [];\n let ptr = 0;\n let totalSize = 0;\n\n lim = lim || data.byteLength - 18;\n\n while (ptr < lim) {\n try {\n const ba = ArrayBuffer.isView(data) ? data : new Uint8Array(data, ptr, 18);\n const xlen = (ba[11] << 8) |...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Renders the AWS CloudFormation properties of an `AWS::Signer::SigningProfile` resource
function cfnSigningProfilePropsToCloudFormation(properties) { if (!cdk.canInspect(properties)) { return properties; } CfnSigningProfilePropsValidator(properties).assertSuccess(); return { PlatformId: cdk.stringToCloudFormation(properties.platformId), SignatureValidityPeriod: cfnS...
[ "function instanceProfileResourcePropsToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n InstanceProfileResourcePropsValidator(properties).assertSuccess();\n return {\n Roles: cdk.listMapper(cdk.stringToCloudFormation)(pro...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
writetable write the tableArray[] to db.json
function writeTable(tblArr) { try { const jsonString = JSON.stringify(tblArr) fs.writeFileSync(dbpath, jsonString) console.log("writeFileSync successful, db.json updated") } catch (e) { console.error("writeFileSync or JSON.stringify failed ", e) } }
[ "function write() {\n for(var tableName in tables) {\n fs.writeFileSync('./new/' + tableName + '.json', JSON.stringify(tables[tableName].data))\n }\n}", "function stringifyAndWrite(array){\n let dbString = JSON.stringify(array);\n fs.writeFileSync(\"db/db.json\", dbString, \"utf-8\");\n}", "function...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Encodes the range of a selection on the page as a string. The string is a URLsafe Base64 encoded hexad stream. While we could have used a byte stream, using hexads removes the need to convert Base64's hexads to bytes. A range is encoded as three lists of unsigned ints. The first list is the tree traversal path to the c...
function encodeRange(range) { var encoded = ""; var startPath = encodeNodePath(range.startContainer); var endPath = encodeNodePath(range.endContainer); var commonPath = getCommonPath(startPath, endPath); writeList(commonPath); writeList(startPath.slice(commonPath.length).concat(range.startOffset)); writeL...
[ "function encodeRange(range) {\n var encoded = \"\";\n var startPath = encodeRangePoint(range.startContainer, range.startOffset);\n var endPath = encodeRangePoint(range.endContainer, range.endOffset);\n var commonPath = getCommonPath(startPath, endPath);\n writeList(commonPath);\n writeList(startPath.slice(co...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
If page is accessed from a specific city, it will get the info from the city automatically, if not, it will get it from the dropdown menu. Below we check if props have been updated (so the function is only called when the props have been received) and if there is a city ID it sets the state with that info
componentDidUpdate(prevProps) { if (prevProps.cities.cities !== this.props.cities.cities) { if (this.props.match.params.cityId) { const cities = this.props.cities.cities const city = cities.find(city => city.name === this.props.match.params.cityId) //...
[ "componentDidUpdate(prevProps) {\n if (prevProps.cities.cities !== this.props.cities.cities) {\n if (this.props.match.params.cityId) {\n const cities = this.props.cities.cities;\n const city = cities.find(\n city => city.name === this.props.match.params.cityId\n );\n\n /...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TERMINA LA SECCION DE LAS FUNCIONES PARA EL USUARIO Funcion Ajax para modificar Libros
function modificarDatosLibro(){ //donde se mostrará lo resultados divResultado = document.getElementById('resultado'); //valores de los inputs //cedula=document.cambio_libro.cedula.value; id=document.cambio_libro.id.value; co=document.cambio_libro.Codigo.value; tit=document.cambio_libro.Titulo.value; au...
[ "function ActualizarProveedores()\n{\n var ProveedoresId=$('#ProveedoresId').val(); \n var NuevoProveedoresNit=$('#NuevoProveedoresNit').val();\n var NuevoProveedoresNombre=$('#NuevoProveedoresNombre').val();\n var NuevoProveedoresTelefono=$('#NuevoProveedoresTelefono').val();\n v...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Operation: getQueryParamArray summary: Test query parameters req.query: type: object properties: arr: type: array items: type: integer valid responses: '200': description: ok
async getQueryParamArray(req) { if ( typeof req.query.arr[0] !== "number" || typeof req.query.arr[1] !== "number" ) { throw new Error("req.params[0] or req.params[1] is not a number"); } return ""; }
[ "updateArrayQueryParam(url, key, value = null) {\n const paramValues = Array.isArray(value)\n ? value.join(this.arraySeparator)\n : value;\n\n return this.updateUrlQueryParam(url, key, paramValues);\n }", "addArrayValueQueryParam(url, key, value) {\n const currentParamQuery = this.getQueryStri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
method for opend dialog to rename group
function openDialogRename(val){ var renGroup = document.getElementById('renGroup'); var text = document.getElementById('newnametext'); text.value = val; renGroup.innerHTML = ""; renGroup.appendChild(document.createTextNode(val)); renGroup.setAttribute("title",va...
[ "function renameGroup(group, name)\n {\n console.debug(\"renameGroup:\", group, name);\n // DI02 – Rename a group\n track('Sugar', 'Rename a group', name, group.tabs().length);\n // 1. The user renames a group in the dashboard (already done)\n //&2. The dashboard sends a reques...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
set the team settings to enable the autojoin feature
setTeamSettings(callback) { this.doApiRequest( { method: 'put', path: `/team-settings/${this.team.id}`, token: this.users[0].accessToken, data: { autoJoinRepos: [this.repo.id] } }, callback ); }
[ "function setTournament(subdomain) {\n config.currentTournament = subdomain;\n}", "setTeamSettings (callback) {\n\t\tcallback();\n\t}", "updateTeamSettings (teamId, teamSettings) {\n let option = this,\n userSettings = option.getUserSettings();\n \n // Update the team settings\n userSe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }