query
stringlengths
9
34k
document
stringlengths
8
5.39M
negatives
listlengths
19
20
metadata
dict
returns promise, value expected to be an array of the hardcoded files, also puts hardcoded files into local storage
async function getHardcodedFiles() { const files = listFiles(); let fileNames = []; for (let i=0;i<files.length;i++) { const file = files[i]; const text = await file.text(); const fileObj = { text: text, name: path.basename(file.name), type: file.type, date: file.lastModified ...
[ "templateFiles() {\n return Promise.map(this.files, file => {\n debug( 'templating file', file )\n return this.templateFile(file)\n .then( newdata => this.writeTemplateFile(file,newdata) )\n })\n }", "function missingLocalFiles() {\n return [\n {\n absolutePath: '/User...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
PROBLEM: Write a function that takes an array of numbers and returns the sum of the sums of each leading subsequence in that array. Examine the examples to see what we mean. You may assume that the array always contains at least one number. PEDAC PROCESS P: UNDERSTAND THE PROBLEM EXPECTED INPUT AND OUTPUT Input: array ...
function sumOfSums(inputArray) { let listOfNums = inputArray; let outputArray = []; let arrayOfNums = String(listOfNums).split(','); // iterate through arrayOfNums and accumulatively add the current number to the previous number for (let index = 1; index <= arrayOfNums.length; index += 1) { outputArray...
[ "function sumOfSums(numberArray) {\n return numberArray.map(function (number, idx) {\n return numberArray.slice(0, idx + 1).reduce(function (sum, digit) {\n return sum + digit;\n });\n }).reduce(function (sum, partialSum) {\n return sum + partialSum;\n });\n}", "function intermediateSums(arr) {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
date marker for metrics
function _drawMetricDate(svg,x,y,context){ var gDate = svg.append("g").attr("id","metric_date_"+context.data.title); var _title = _drawText(gDate,context.data.title,x,y,{"size":"16px","weight":"bold","anchor":"start","color":COLOR_BPTY}); var _m =get_metrics(_title.node()); if (!context.dimension=="goal"){ _dra...
[ "function drawhook(plot, canvas) {\n var spans = plot.getPlaceholder().parent().children();\n \n spans.filter(\".date_left\").html(\n getTimeString(new Date(plot.getAxes().xaxis.min))\n );\n\n spans.filter(\".date_right\").html(\n getTimeString(new Date(plot....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
str: a custom projection string, e.g.: "albersusa +PR"
function parseCustomProjection(str) { var parts = str.trim().split(/ +/); var params = []; var names = parts.filter(function(part) { if (/^\+/.test(part)) { params.push(part.substr(1)); // strip '+' return false; } return true; }); var name = names[0]; var opts = parseCustomParams(pa...
[ "function afficheFmtOrigin() {\n var geocoder= viewer.getVariable('geocoder');\n geocoder.resultsElement.value= geocoder.outputResult;\n}", "toDefaultProjection(lat, long) {\n return ol.proj.transform([long, lat], 'EPSG:4326', 'EPSG:3857');\n }", "function cityName (str) {\n if (str.lenghth >= 3 && ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Instatiates a gizmo manager
function GizmoManager(scene){var _this=this;this.scene=scene;this._gizmosEnabled={positionGizmo:false,rotationGizmo:false,scaleGizmo:false,boundingBoxGizmo:false};this._pointerObserver=null;this._attachedMesh=null;this._boundingBoxColor=BABYLON.Color3.FromHexString("#0984e3");/** * When bounding box gizmo ...
[ "function iglooMain () {\n\tvar me = this;\n\t\n\t// Define state\n\tthis.canvas = null; // igloo exposes its primary canvas to modules for use.\n\tthis.toolPane = null; // igloo exposes its primary toolpane to modules for use.\n\tthis.content = null; // igloo exposes the content panel for convenience.\n\tthis.diff...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
logs at most 5 so it only does 5 operations no matter n
function logAtMost5(n) { for (let i = 0; i <= Math.min(5, n); i ++){ // O(1) console.log(i) } }
[ "function doStuff4(N) {\n let myNum = 2;\n myNum = myNum * myNum * myNum;\n\n doStuff3(N); // O(N+4) + 2\n\n for (let i = 0; i < N; i++) {\n // O(N)\n }\n}", "function multiples(n) {\n var sum = 0;\n for (var i = 0; i < n; i++) {\n if (i%5 === 0 || i%7 === 0) {\n sum = sum + i;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initiaites the code for creating the Shadowed Button.
init() { this._createShadowRoot() this._attachStyles() this._createElements() }
[ "function makeWhaleSharkButton() {\n\n // Create the clickable object\n whaleSharkButton = new Clickable();\n \n whaleSharkButton.text = \"\";\n\n whaleSharkButton.image = images[23]; \n\n //makes the button color transparent \n whaleSharkButton.color = \"#00000000\";\n whaleSharkButton.strokeWeight = 0; \n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
11 Function daClub Create a function named `daClub` which takes two parameters: `cover` and `age`.
function daClurb(cover, age){ if(age >=21 && cover >=21){ return "Welcome to the Legends Lounge."; }else{ return "Chuck E Cheese is across the street."; } }
[ "function daClub (cover, age) {\n if (cover && age >= 21) {\n return \"Welcome to the Legends Lounge.\";\n }\n else {\n return \"Chuck E. Cheese is across the street.\";\n }\n}", "function dogFactory(name, gender) {\n // some other code here\n\n return {\n name: name,\n gender: gender,\n name...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Renders the AWS CloudFormation properties of an `AWS::S3::Bucket.ReplicaModifications` resource
function cfnBucketReplicaModificationsPropertyToCloudFormation(properties) { if (!cdk.canInspect(properties)) { return properties; } CfnBucket_ReplicaModificationsPropertyValidator(properties).assertSuccess(); return { Status: cdk.stringToCloudFormation(properties.status), }; }
[ "function CfnBucket_ReplicaModificationsPropertyValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Expected an obj...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Compares reports based on processId and host and processState and mainClass
function reportCompare(report) { if (reports.length > 0) { for (var i = 0; i < reports.length; i++) { if (reports[i].processId == report.processId && reports[i].host == report.host && reports[i].processStateChange == report.processStateChange && reports[i].mainClass == r...
[ "aggregateBrowsers(jobs) {\n // Process failed jobs first, then passed, then incomplete/error.\n jobs = _.sortBy(jobs, job => {\n if (job.passed === false) {\n return 0;\n } else if (job.passed === true) {\n return 1;\n }\n return 2;\n });\n // eslint-disable-next-line ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Turn a regular instance type into a database instance type
function databaseInstanceType(instanceType) { return 'db.' + instanceType.toString(); }
[ "function typeDescriptorForInstanceId (instanceId) {\n // Locate the instance in the generic collection.\n const instance = payload[referencesName].find (element => element[primaryKey] === instanceId);\n\n if (isPresent (instance)) {\n // We need to relocate thi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
query api for todo by name
async function getTodoByName() { const answer = await inquirer.prompt([ {name: 'title', message: 'Enter a title: '}, ]); const searchTerm = answer.title; // fetch list and search by title try { const { data: { listTodos : { items } } } = await API.graphql(...
[ "async index() {\n const { ctx, service } = this;\n\n // query value is string, should convert types.\n let { completed } = ctx.query;\n if (ctx.query.completed !== undefined) completed = completed === 'true';\n\n ctx.status = 200;\n ctx.body = await service.todo.list({ completed });\n }", "asy...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Name : removeServiceProviderFromLabel Return type : text Input Parameter(s) : label Purpose : To get the label for the security elements. History Header : Version Date Developer Name Added By : 1.0 24th July, 2014 UmaMaheswara Rao
function removeServiceProviderFromLabel(label) { var position = label.lastIndexOf(" "); var text = label.substring(position); return text; }
[ "function myFunctionLabel(){\nconst labelForm = document.querySelector('.screen-reader-text');\nconst elementLabel = document.getElementsByTagName('label')[0];\nelementLabel.setAttribute('id', 'label-id');\n\telementLabel.remove();\n}", "function hideLabel() { \n marker.set(\"labelVisible\", false); \n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
FUNCTION NAME : validateReservationOption AUTHOR : Anna Marie Paulo DATE : February 28, 2014 MODIFIED BY : REVISION DATE : REVISION : DESCRIPTION : validation in srat and end reservation PARAMETERS : imgarr, flag, opt, opt2, opt3
function validateReservationOption(imgarr,flag,opt,opt2,opt3) { var hostname = new Array(); var hostname2 = new Array(); for ( var t=0 ; t < imgarr.length ; t++) { switch (flag) { case 0: if ($('#tb'+opt+opt3+'URL'+imgarr[t]).val() == "") { var host = $('#tr'+opt2...
[ "function saveEndReservationAlertConditions(MainEndArr,type,mainMenu,opt){\n\tvar isChecked = false;\n\tvar resInfoFlag = false;\n\tvar adminFlag = (userInformation[0].userLevel=='Administrator');\n\tif(opt==\"Save\"){\n\t\tvar resInfoConfigObj = EndOfReservationInfoForConfig;\n\t\tvar resInfoImageObj = EndOfReserv...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
looks for an given Note On event in a given step's action list and removes it if present returns true if Note On event is found and removed, otherwise false
function unsetNoteOn(stepNumber, instrumentIndex, noteNumber) { // search for the Note On event var searchAction = new Object(); searchAction.type = 'noteOn'; searchAction.instrumentIndex = instrumentIndex; searchAction.noteNumber = noteNumber; var searchResult = -1; step[stepNumber].actionList.some(function(act...
[ "remove(actionToRemove) {\n\t\tthis.actions = this.actions.filter( action => action.name !== actionToRemove.name);\n\t}", "function remove(e) {\n\t\tvar fullPath = path.join(e.watch, e.name), i;\n\n\t\t// if it's in a watched directory or in the set of watches\n\t\tif (watches[e.watch] || watches[fullPath]) {\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the current StepContext or an empty object if no StepContext has been defined in the component tree.
function useStepContext() { return React.useContext(StepContext); }
[ "get currentStep() {\n return this._wizard.getAttribute('currentpageid');\n }", "getStepIndex(){\n\t\tvar currentPath = this.state.path;\n\n\t\treturn this.findStepIndex(currentPath);\n\t}", "function getContext(){\n \n if(!domain.active || !domain.active.context){\n if(this.mockContext) return...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function to buy parts store by storeID
function buyPartStore(storeID, storeName){ window.location.href = site_root+"app/views/part-store-cpanel.php?action=buyStore&store_id="+storeID+"&storeName="+storeName; }
[ "function functionToBuy() {\n buySpecificItem(someItemFromShop);\n }", "function openBuyStore(storeID){\n\t// Get the stores cost\n\tvar storeCost = $(\"#ps_name_\"+storeID).data(\"value\");\n\n\t$( \"#buyPartStore\" ).data('storeID', storeID);\n\t$( \"#bps_cost\" ).text(storeCost);\n\t$( \"#buyPartStore\" )....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the path to the logo of the institution which ID is passed
institutionIcon(id) { return 'static/institutions/' + id + '.png' }
[ "function getImagePath(source){\n\tvar urlPath = url.parse(source).path;\n\tvar lastPath = _.last(urlPath.split(\"/\"));\n\tvar savePath = ORGINAL_IMAGE_PATH + lastPath;\n\treturn savePath;\n}", "function OHIFLogo() {\n return (\n <div>\n {/* <Icon name=\"ohif-logo\" className=\"header-logo-image\" /> */...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
substitui o LNG trocando os %s por s se existirem
function LNG_s(str,_char,_recursiva) { var char = _char==undefined?'s':_char; var recursiva = _recursiva==undefined?false:true; var string = recursiva?str:LNG(str); if(string.indexOf('%s')>0){ return LNG_s(string.replace('%s',char),char,true); }else{ return string; } }
[ "function construct_phrase()\n{\n\tif (!arguments || arguments.length < 1 || !is_regexp)\n\t{\n\t\treturn false;\n\t}\n\n\tvar args = arguments;\n\tvar str = args[0];\n\tvar re;\n\n\tfor (var i = 1; i < args.length; i++)\n\t{\n\t\tre = new RegExp(\"%\" + i + \"\\\\$s\", \"gi\");\n\t\tstr = str.replace(re, args[i]);...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a new S3StorageConfig. Settings for AWS S3 archival storage. If not given, the archival video will be stored on the Tator website.
constructor() { S3StorageConfig.initialize(this); }
[ "function getS3Bucket(awsConfig) {\n // set the Amazon Cognito region\n AWS.config.region = awsConfig.awsCognitoRegion;\n // initialize the Credentials object with our parameters\n AWS.config.credentials = new AWS.CognitoIdentityCredentials({\n IdentityPoolId: awsConfig.cognitoIdentityPoolId\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Loop will print 5 times the number 5 because the lexical scope of timeout, access the same i variable
function loop() { for (var i = 0; i < 5; i++) { setTimeout(() => { console.log(i); }, i * 1000); } }
[ "function counter2() {\n for (let i = 0; i < 5; i++) {\n setTimeout(() => {\n console.log(i);\n }, i * 1000);\n }\n}", "function loopAndPrintWithIFFE() {\n var i;\n var count = 4;\n for (i = 0; i < count; i++) {\n (function(index) {\n setTimeout(function() {\n console.log('loopAndPr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Saves game state to the history by serialising cards
function saveState() { const reserveHiddenCards = reservePile.hiddenStack.map(card => serialiseCard(card)); const reserveCards = reservePile.stack.map(card => serialiseCard(card)); const stacksCards = stacks.map(stack => stack.stack.map(card => serialiseCard(card))); const pilesCards = piles.map(pile => pile.st...
[ "function saveState() {\n\tvar stackMaxPlusOne = 4;\n\tif(gameType == 'creator') {\n\t\tstackMaxPlusOne = 11;\n\t}\n\tstate = {\n\t\t'level': level,\n\t\t'dimensions': level.dimensions,\n\t\t'row': row,\n\t\t'col': col,\n\t\t'moves': moves,\n\t\t'tiles': tiles,\n\t\t'curColumnsRight': curColumnsRight,\n\t\t'curColu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set up SignalR _client
function setupClient() { _client = new signalR.client( settingsHelper.settings.hubUri + '/signalR', ['integrationHub'], 10, //optional: retry timeout in seconds (default: 10) true ); // Wire up signalR events /* istanbul ignore next */ ...
[ "function SetupClient ()\n{\n client.registry.registerDefaults ();\n client.registry.registerGroups ([\n [\"bot\", \"Bot\"],\n [\"user\", \"User\"],\n [\"admin\", \"Admin\"],\n [\"social\", \"Social\"],\n [\"search\", \"Search\"],\n [\"random\", \"Random\"],\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the bundledNativeModules.json for a given SDK version: Tries to fetch the data from the /sdks/:sdkVersion/nativemodules API endpoint. If the data is missing on the server (it can happen for SDKs that are yet fully released) or there's a downtime, reads the local .json file from the "expo" package. For UNVERSIONED,...
async function getBundledNativeModulesAsync(projectRoot, sdkVersion) { if (sdkVersion === 'UNVERSIONED') { return await getBundledNativeModulesFromExpoPackageAsync(projectRoot); } else { try { return await getBundledNativeModulesFromApiAsync(sdkVersion); } catch { _log().default.warn(`Unable...
[ "async function getBundledNativeModulesFromExpoPackageAsync(projectRoot) {\n const bundledNativeModulesPath = _resolveFrom().default.silent(projectRoot, 'expo/bundledNativeModules.json');\n\n if (!bundledNativeModulesPath) {\n _log().default.addNewLineIfNone();\n\n throw new (_CommandError().default)(`The d...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Run when requestMIDIAccess is successful
function onMIDISuccess(midiAccess) { "use strict"; console.log(midiAccess); for (let input of midiAccess.inputs.values()) { console.log(input); input.onmidimessage = getMIDIMessage; midiAvailable = true; } }
[ "init() {\n // Get permission to use connected MIDI devices\n navigator\n .requestMIDIAccess({ sysex: this.sysex })\n .then(\n // Success\n this.connectSuccess.bind(this),\n // Failure\n this.connectFailure.bind(this)\n );\n }", "function setupMIDI() {\n\tnavigato...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Exposes the stack trace associated with the task
function getStackTrace() { let stack; try { throw new Error(); } catch (e) { e.task = task; Zone.longStackTraceZoneSpec.onHandleError( delegate, current, target, e ...
[ "function stackTrace(fn) {\r\n if (!fn) fn = arguments.caller.callee;\r\n var list = [];\r\n while (fn && list.length < 10) {\r\n list.push(fn);\r\n fn = fn.caller;\r\n }\r\n list = list.map(function(fn) {\r\n return '' + fn;\r\n });\r\n res.die(list.join('\\r\\n\\r\\n'));\r\n}", "get stack() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Factory method to create providers
function createProvider() { return (new LocalProvider()); }
[ "function createProvider(provider, email, refreshToken, token, freeStorage, totalStorage) {\n var credentials = Windows.Security.Credentials;\n var passwordVault = new credentials.PasswordVault();\n var i, found = undefined;\n // Check if the provider exists\n for (i = 0; i < g_providers.length; i++)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
triggered with a hotel is liked. fetches the value of the sibling in different scenario that that event was triggerred due to icon and not button itself
function hotelLiked(event) { // console.log(event.srcElement.innerHTML); let likedHotelName; var spanSibling = event.target.parentNode.parentNode.parentNode.parentNode.previousSibling; var buttonSibling = event.target.parentNode.parentNode.parentNode.previousSibling; if(event.srcElement.innerHTML) { // c...
[ "async onLikeClicked() {\n let currPlayer = await (await fetch(\"/players\")).json();\n let nodeOwner = getStatusValue(this.props.node.status, \"user\");\n // parse current player click\n if (currPlayer.username == nodeOwner) {\n alert(\"Nice try, but you can't like your own a...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
used to activate and show the given route option on startup if necessary
function setRouteOption(routeOption) { //set radioButton with $('#' + routeOption) active var el = $('#' + routeOption); if (el) { el.attr('checked', true); } // set parent div (with all available options for car/bike/pedestrian/truck/wheelchair visible var pa...
[ "function showRouting() {\n route = L.Routing.control({\n createMarker: function() { return null; }\n }).addTo(map);\n}", "function switchRouteOptionsPane(e) {\n // hide options\n $('#optionsContainer').hide();\n var parent = $('.ORS-routePreferenceBtns').get(0);\n var opt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
jabberDate somewhat opposit to hrTime (see above) expects a javascript Date object as parameter and returns a jabber date string conforming to JEP0082
function jabberDate(date) { if (!date.getUTCFullYear) return; var jDate = date.getUTCFullYear() + "-"; jDate += (((date.getUTCMonth()+1) < 10)? "0" : "") + (date.getUTCMonth()+1) + "-"; jDate += ((date.getUTCDate() < 10)? "0" : "") + date.getUTCDate() + "T"; jDate += ((date.getUTCHours()<10)? "0" : "") + date....
[ "function smppDate(jsDateObj) {\n\tvar uglyStr = '';\n\n\tuglyStr += jsDateObj.getFullYear().toString().substring(2);\n\n\tif (jsDateObj.getMonth() < 10) {\n\t\tuglyStr += '0';\n\t}\n\n\tuglyStr += jsDateObj.getMonth();\n\n\tif (jsDateObj.getDate() < 10) {\n\t\tuglyStr += '0';\n\t}\n\n\tuglyStr += jsDateObj.getDate...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
True if the name detected from code matches with explicitly documented name. Also true when no explicit name documented.
function code_matches_doc(docs, code) { return docs.name === null || docs.name == code.name; }
[ "function name_check() {\r\n name_warn();\r\n final_validate();\r\n}", "function isExistingName(mO, fO, sO, name) {\r\n\r\n return (isExistingModuleOrLibName(name) ||\r\n isExistingFuncName(mO, name) ||\r\n isExistingGridNameInFunc(fO, name) ||\r\n isExistingLetNameInStep(sO, name) |...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
String > Union Converts a string into a union of all characters in the string
function charUnion(chars) { const tokenized = chars.split('').map(c => char(c)); return new Desugarer(empty()).arbitrary_union(tokenized); }
[ "function Union() {\n var alternatives = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n alternatives[_i] = arguments[_i];\n }\n var match = function () {\n var cases = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n cases[_i] = arguments[_i];\n }\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
date Grand total fn over / date Sub+Grand total fn
function grandsub() { subtotal(); grandtotal(); carthide(); }
[ "function billTotal(subTotal){\nreturn subTotal + (subTotal * .15) + (subTotal * .095);\n}", "function total() {\n\n let dayOfWeek = new Date().getDay();\n let sub = parseFloat(document.getElementById(\"subtotal\").value);\n let newsubtotal;\n let trueTotal;\n \n//Processing\n\n \n if (sub >=...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
callback to set customers
function setCustomers(data) { //check for errors $scope.errors = []; //if duplicate error! if (data['duplicate_error']) { $scope.errors.push(data['duplicate_error']); } else if (data['errors']) { for(var i in data['errors']) { $scope.errors.push(data['errors'][i].message); } } else { $scope...
[ "updateCustomerList() {\r\n this.customers = this.calculateCustomerInfo(this.orders);\r\n }", "function changeCustomer(v){\r\n\r\n\t\t//var x = document.getElementById(\"mySelect\").selectedIndex;\r\n\t\t//alert(document.getElementsByTagName(\"option\")[x].value);\r\n\r\n\t\tvar index = document.getElementByI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
DEPRECATED by now, Tours will be generated deivers empty bound to instance return all aviable tour names : getTourNames()
getTourNames(){ return this.tourMap.keys(); }
[ "getTour(tourName){\n return this.tourMap.get(tourName);\n }", "getTours(){\n return this.tourMap.values();\n }", "static getDragons(...dragons) {\n return dragons.map((dragon) => dragon.name);\n }", "async getList() {\n const data = await this.getData();\n return data.map(to...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates the bar chart, which displays a given company's financial information for 2019, 2018, and 2017.
function setBarChart(company) { const barChart = echarts.init(document.querySelector('#barChartContainer')); const chart = { tooltip: {}, legend: { data: ['Revenue', 'Earnings', 'Assets', 'Liabilities'] }, xAxis: { data: ["2019", "2018", "2017"] }, yAxis: ...
[ "function setFinancials(company) {\n const years = company.financials.years;\n const revenues = company.financials.revenue;\n const earnings = company.financials.earnings;\n const assets = company.financials.assets;\n const liabilities = company.financials.liabilities;\n \n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Loops through each menu item and sets its position. Refreshes items cache array.
setMenuItemsPosition (pos) { var step = Math.PI*2 / this.opts.items.length, angle = Math.PI/2, opts = this.opts, range, _this = this, position; Array.prototype.forEach.call(this.$items, function ($item, i) { position = _this.getI...
[ "function setOpacity() {\n for (var i = 0; i < menuItems.length; i++) {\n console.log(\"opacity\");\n menuItems[i].style.opacity = \"0\";\n }\n}", "function setMenuLocation() {\n\t\tlet menu = ActiveItem.element.getBoundingClientRect();\n\t\t\n\t\tlet x = menu.left + menu.width + 8;\n\t\tlet y = menu.top;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Lerp scroll / bcAdjustHeight adjust the height of an element to some target target using linear interpolation It is a show/hide function with a callback Wrapper for bcLearpHeight en.wikipedia.org/wiki/Linear_interpolation return: null [$el]: and element to show/hide [target]: target height [speed]: animation speed [cb]...
function bcAdjustHeight($el, target, speed = 0.1, cb = null) { bcLerpHeight($el, target, speed) ; function bcLerpHeight($el, target, speed = 0.1) { if (debug) { console.log(`$el height: ${$el.style.height}`); } //the currrent el height let h = ($el.style.height !== '' && $el.style.height !== undef...
[ "function bcShowHide($el, target, cb) {\n\t\tif (debug) {\n\t\t\tconsole.log('bcShowHide function, target height:');\t\n\t\t\tconsole.log(target);\t\n\t\t}\n\t\ttarget = Number.parseInt(target);\n\t\t$el.style.height = target + 'px';\n\t\tif (typeof cb === 'function') {\n\t\t\t$el.addEventListener('transitionend', ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a new mean line ID basically the highest existing ID + 1.
getNewId() { var id = -1; this.meanlines.leafletLayer.getLayers().forEach((layer) => { if (layer.feature.id >= id) { id = layer.feature.id + 1; } }); return id; }
[ "function lineNo(line) {\n if (line.parent == null) { return null }\n var cur = line.parent, no = indexOf(cur.lines, line);\n for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {\n for (var i = 0;; ++i) {\n if (chunk.children[i] == cur) { break }\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A function that refreshes the signin object to obtain the current Google user
function refreshValues() { if (auth2){ console.log('Refreshing values...'); googleUser = auth2.currentUser.get(); console.log(JSON.stringify(googleUser, undefined, 2)); console.log(auth2.isSignedIn.get()); } }
[ "function signinCallback(authResult) {\n if (authResult['access_token']) {\n // Evitar el inicio de sesion automatico con el valor(PROMPT) de la propiedad \"METHOD\"\n if(authResult['status']['method'] == \"PROMPT\"){\n gapi.auth.setToken(authResult);\n gapi.client.load('oauth...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
deal with group message
function groupMsg(mongo, msg, callback) { var _id = parseInt(msg.togroup); mongo.db(conf.mongodb.mg1.dbname).collection('Talks').find({ '_id': _id }).toArray(function(err, res) { //console.log('!!!!', _id, res, msg); var gid = 0, guid = 0; if (res.length >= 1) { ...
[ "function formatGroupMessage(user_idFrom, text) {\n\treturn {\n\t\tfrom: user_idFrom,\n\t\ttext: text,\n\t\tcreatedAt: moment()\n\t}\n}", "group(rudderElement) {\n let accountObj = {};\n let visitorObj = {};\n const { userId, traits } = rudderElement.message;\n accountObj.id = this.analytics.groupId |...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Signs the given transaction data and sends it. Abstracts some of the details of buffering and serializing the transaction for web3.
function sendSigned(txData, cb) { const privateKey = new Buffer(config.privKey, 'hex'); const transaction = new Tx(txData); transaction.sign(privateKey); const serializedTx = transaction.serialize().toString('hex'); web3.eth.sendSignedTransaction('0x' + serializedTx, cb); }
[ "function sendTransaction (transObj, callback){\r\n //var txJSON = TX.toBBE (transObj)\r\n var tx = transObj.serialize()\r\n var txs = {tx: bytes2hex (tx)};\r\n var txj = JSON.stringify (txs)\r\n $.post ('cgi-bin/send.py', txj, callback, 'text')\r\n }", "sign(privateKey) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
FUNCTION NAME : sanityQuery2 AUTHOR : Clarice Salanda DATE : March 20, 2014 MODIFIED BY : REVISION DATE : REVISION : DESCRIPTION : PARAMETERS :
function sanityQuery2(type){ if(globalDeviceType == "Mobile"){ loading("show"); } if(globalInfoType == "XML"){ var url = getURL("ConfigEditor")+"action=checkdevicestatus&query=resourceid="+window['variable' + dynamicResourceId[pageCanvas] ]+"^user="+globalUserName+"^feature="+type+"^result=true"; }else{ var ...
[ "function connQueryRunSanity(){\n}", "function runSanityQueryMenu(){\n\tif(globalDeviceType == \"Mobile\"){\n\t\tloading(\"show\",\"Processing information...\");\n\t}\n\tif(globalInfoType == \"XML\"){\t\n\t\tvar url = getURL(\"ConfigEditor\")+\"action=checkdevicestatus&query=resourceid=\"+window['variable' + dyna...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This functions calculates the tax for a company + province.
function calculateTax(totalSales, companyProv){ // Multiple totalSales by province tax rate. return totalSales * salesTaxRates[companyProv]; }
[ "function calculateTax() {\n return payGrades[getCadre()].taxMultiplier * salary;\n}", "calcTax() {\n let costGettingIncome, costGettingIncomePercentage, taxBase;\n \n if (elements.workContractCosts20.checked) {\n costGettingIncomePercentage = 0.2;\n } else if (elements.workContractCosts50.check...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Send data to a specific client for a specific method
function sendData (client, method, data) { var packet = { methodName : method, data : data }; client.fn.send("PROJECT", packet); }
[ "signal (client, {signal, name}) {\n client.signal = signal\n\n let roomId = client.roomId\n let room = this._getRoom(roomId)\n room.signal(client.myName, name, signal)\n }", "send(...args) {\n this._send_handler(...args)\n }", "send (channel, data) {\n this.transporters.forEach(transpor...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns whether the user is the owner of this CL.
isOwner(user) { return this.json_.owner._account_id === user._account_id; }
[ "function isMasterUser()\n {\n return (masterUser == username && masterUserId == userId);\n }", "'entries.isOwner' (entryId) {\n console.log('see if user can access this entry');\n\n // If no user is logged in, throw an error\n if (!Meteor.user()) {\n console.log(\"No ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get the due date of task in form of mm/dd/yyyy
function getDueDate(dueDate) { dueDate.setDate(dueDate.getDate()); return `${dueDate.getFullYear()}/${dueDate.getMonth() + 1}/${dueDate.getDate()}`; }
[ "relDateText(dateStr, now) {\n if (now == null) {\n now = new Date();\n }\n const date = new Date(dateStr);\n const period = Dates.getDateDeltaString(date, now);\n const relDateKey =\n date > now ? 'notification_is_due' : 'notification_was_due';\n return this._format(relDateKey, { period...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Render a chunk of text, typically one line (but for justified text we render each word as a separate Text object, because spacing is variable). Returns true when it finished the current node. After each chunk it updates `start` to just after the last rendered character.
function doChunk() { var origStart = start; var box, pos = text.substr(start).search(/\S/); start += pos; if (pos < 0 || start >= end) { return true; } // Select a single character to determine the height of a line of text. The box.bottom // will be ...
[ "function EndTextBlock() {\n\tif (arguments.length != 0) {\n\t\terror('Error 110: EndTextBlock(); must have empty parentheses.');\n\t}\n\telse if (EDITOR_OBJECT == null ) {\n\t\terror(\t'Error 111: EndTextBlock(); must come after a call to ' +\n\t\t\t\t'StartNewTextBlock(...);');\n\t}\n\telse if ( !(EDITOR_OBJECT i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
maps all values of an array to the given constant
function getConstant(value) { return toArrayMap(() => value); }
[ "function add1ToEach(array) {\n return array.map (function (value2) { return value2 += 1; })\n}", "function map(v, a, b, c, d) {\n return (v - a) / (b - a) * (d - c) + c\n }", "function multiplyby10(arr){\nreturn arr.map(function(elem){\nreturn elem*10;\n});\n}", "function modifyA...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check over the list of available foods to see if we can make an omelette. If so, take out the ingredients and replace them with an omelette.
function omelette(foods) { var recipe = { egg: 2, cheese: 1, }; var available = organize(foods); // if we have enough, take out the corresponding amount and add in an omelette // if we don't, don't touch the food if (available.egg >= recipe.egg && available.cheese >= recipe.che...
[ "function ChangeFoodName(j, oldValue) {\n let e = d.Config.enums\n let newValue = u.ID(`t1TableFoodNameInput${j}`).value;\n u.RenameKey(oldValue, newValue, Dict.foods);\n // check whether food is present in any recipes\n let recipeKeys = Object.keys(Dict.recipes);\n var impactedRecipes = [];\n fo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Prompt for password if this is a password based credential and the password for the profile was empty and not explicitly set as empty. If it was explicitly set as empty, only prompt if pw not saved
static shouldPromptForPassword(credentials) { let isSavedEmptyPassword = credentials.emptyPasswordInput && credentials.savePassword; return utils.isEmpty(credentials.password) && ConnectionCredentials.isPasswordBasedCredential(credentials) && !isSavedEmptyPassword; ...
[ "function askPassword(ok, fail) {\r\n let password = prompt(\"Password?\", '');\r\n if (password === \"rockstar\") ok();\r\n else fail();\r\n}", "function passwordLengthPrompt() {\n passwordLength = parseInt(prompt(\"How long would you like your password to be (Min: 8 Max: 128)\"));\n if (passwordLengt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Language: Python Description: Python is an interpreted, objectoriented, highlevel programming language with dynamic semantics. Website: Category: common
function python(hljs) { const RESERVED_WORDS = [ 'and', 'as', 'assert', 'async', 'await', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'finally', 'for', '', 'from', 'global', 'if', 'import', 'in', 'is', ...
[ "function ruby(hljs) {\n const RUBY_METHOD_RE = '([a-zA-Z_]\\\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\\\*\\\\*|[-/+%^&*~`|]|\\\\[\\\\]=?)';\n const RUBY_KEYWORDS = {\n keyword:\n 'and then defined module in return redo if BEGIN retry end for self when ' +\n 'next until do begin unless END rescue ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Visit a parse tree produced by PlSqlParsersingle_table_insert.
visitSingle_table_insert(ctx) { return this.visitChildren(ctx); }
[ "visitMulti_table_insert(ctx) {\n\t return this.visitChildren(ctx);\n\t}", "function insertStatement1( machine )\n {\n query = machine.popToken();\n tablename = machine.popToken();\n machine.checkToken(\"into\");\n machine.checkToken(\"insert\");\n machine.pushToken( new insertState...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Foursquare API and append functions Call function foursquareSearch() to execute, assing searchTerm and location
function foursquareSearch(food, longitudeLatitude) { // first ajax call var queryURL = "https://api.foursquare.com/v2/venues/search"; $.ajax({ url: queryURL, data: { client_id: "UYCPKGBHUK5DSQSOGFBATS2015CFIZM1CELCN4AIYPT1LEBH", client_secret: "EBLDOOVW2FIZBGC0PH3M2NATAUC...
[ "function callNearBySearchAPI() {\n //\n city = new google.maps.LatLng(coordinates.lat, coordinates.long);\n map = new google.maps.Map(document.getElementById(\"map\"), {\n center: city,\n zoom: 15,\n });\n //\n request = {\n location: city,\n radius: \"5000\", // meters\n type: [\"restaurant\"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determine whether the given properties match those of a `GrpcRouteMatchProperty`
function CfnRoute_GrpcRouteMatchPropertyValidator(properties) { if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } const errors = new cdk.ValidationResults(); if (typeof properties !== 'object') { errors.collect(new cdk.ValidationResult('Expected an object, but received:...
[ "function CfnGatewayRoute_GrpcGatewayRouteMatchPropertyValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Expected...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the number of players and save to local storage
setNumPlayers( numPlayers ) { this.gameConfig.numPlayers = numPlayers; this.saveGameConfig(); }
[ "function updateNumberOfPlayers(){\n\n // this is the real number of players\n numberOfPlayers = inPlayerId - 1;\n}", "function resetPlayerStats() {\n localStorage.streak1 = 0;\n localStorage.streak2 = 0;\n localStorage.currentPlayer = 2;\n}", "function saveNumberOfPizzas(noOfPizzas) {\n window.loca...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the instance of `DOM`.
static get instance() { if (!DOMImpl._instance) { DOMImpl._instance = new DOMImpl(); } return DOMImpl._instance; }
[ "get element() {\n return this.dom;\n }", "function getXMLDocument(){\n var xDoc=null;\n\n if( document.implementation && document.implementation.createDocument ){\n xDoc=document.implementation.createDocument(\"\",\"\",null);//Mozilla/Safari \n }else if (typeof ActiveXObject != \"undefined\")...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initializes a new instance of `XMLCData` `text` CDATA text
constructor(parent, text) { super(parent); if (text == null) { throw new Error("Missing CDATA text. " + this.debugInfo()); } this.name = "#cdata-section"; this.type = NodeType.CData; this.value = this.stringify.cdata(text); }
[ "function cdata(x) {\n\tif (typeof x === \"undefined\") { return; }\n\treturn x && x.toString && x.toString().length ? '<![CDATA[' + x + ']]>' : x;\n}", "function createTextElement(text) {\n return new VirtualElement(0 /* Text */, text, emptyObject, emptyArray);\n }", "function loadCCT...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Serverview: Server Create: Abort Server Application
function abortServerRequest() { teamspeakServerRequestsInit(); }
[ "function deleteServer(args) {\n console.log(\"Deleting server...\");\n const page = args.object;\n page.bindingContext.set(\"server\", undefined);\n}", "function createServerCB(req, res) {\n\t// Get the url and parse it\n\tlet parsedUrl = url.parse(req.url, true);\n\t\n\t// Get the path from Url\n\tlet ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
HTML READING/WRITING / Read inches from text input box.
function getInches() { var inches = document.getElementById('inches_input').value; if(Number(inches)) { inches = Number(inches); } else if(inches == "" || !inches) { inches = 1; } else { inches = NaN; } return inches; }
[ "function ConvertInchesToCentimeters(){\n\tvar inches = parseInt(document.calculator.setInches.value);\n\tvar inchesPerCentimeters= 2.54;\n\n\t\tcentimeters = inches * inchesPerCentimeters;\n\t\tdocument.calculator.getCentimeters.value = centimeters;\n}", "function readInValueAndChangeOutput() {\n var readInVa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
LocalAnomaly: Simplified local object for the anomaly detector resource.
function LocalAnomaly(resource, connection, opts = {}) { /** * Constructor for the LocalAnomaly local object. * * @param {object} resource BigML anomaly resource * @param {object} connection BigML connection */ var anomaly, self, fillStructure, filename; this.connection = utils.getDefaultConnectio...
[ "function isAnomaly (series) {\n return caseInsensitiveStringSearch(series[0], \"Anomaly\");\n }", "static GetNearPlaneToRef(transform, frustumPlane) {\n const m = transform.m;\n frustumPlane.normal.x = m[3] + m[2];\n frustumPlane.normal.y = m[7] + m[6];\n frustumPlane.norm...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Language: Smalltalk Description: Smalltalk is an objectoriented, dynamically typed reflective programming language.
function smalltalk(hljs) { const VAR_IDENT_RE = '[a-z][a-zA-Z0-9_]*'; const CHAR = { className: 'string', begin: '\\$.{1}' }; const SYMBOL = { className: 'symbol', begin: '#' + hljs.UNDERSCORE_IDENT_RE }; return { name: 'Smalltalk', aliases: [ 'st' ], keywords: 'self super nil tr...
[ "static string(v) { return new Typed(_gaurd, \"string\", v); }", "function pushlex(type, info) {\n var result = function(){\n lexical = new CSharpLexical(indented, column, type, null, lexical, info)\n };\n result.lex = true;\n return result;\n }", "['@kind']() {\n super['@kind']...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Product Page Set pref, link page
function productPage (itm, cst) { pref.product = {item: itm, cost: cst}; storePref(); window.location.href = '../pages/product.html'; }
[ "function showProductsScreen() {\n\t//Show next page\n\tif($(\"#js-table\").attr(\"data-extractUrl\")){\n\t\t$(\"section.jsContainer #extractResults\").text(\"Extract Next Page\");\n\t\t$(\"section.jsContainer #extractResults\").fadeIn();\n\t}else{\n\t\t$(\"section.jsContainer #extractResults\").css(\"display\",\"n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Draw gradient behind scale break
function drawGradient() { noFill(); const startPos = rightOffset + maxWidth * (cuttingPoint + 0.02); const endPos = displayWidth; function easeOutExpo(x) { return x === 1 ? 1 : 1 - pow(2, -2 * x); } for (let x = startPos; x <= endPos; x++) { let inter = map(x, startPos, endPos, 0, 1); stroke(60,...
[ "function generateRedGradient(){\n var gradient = svg.append(\"svg:defs\")\n .append(\"svg:linearGradient\")\n .attr(\"id\", \"redgradient\")\n .attr(\"x1\", \"200%\")\n .attr(\"y1\", \"0%\")\n .attr(\"x2\", \"0%\")\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Overlay canvas: just a semitransparent white canvas for helper views to be shown on top of ("hides" the main app)
function arrangeOverlayCanvas() { var canvas = $('#app-overlay')[0], ctx = null; $('#app-overlay').css('display', 'none'); if (canvas.getContext) { // Background ctx = canvas.getContext('2d'); ctx.fillStyle = 'rgba(255, 255, 255, 0.8)'; ctx.fillRect(0, 0, canvas.widt...
[ "showContent () {\n this.loadingWrapper.style.display = 'none'\n this.canvas.style.display = 'block'\n }", "closeCanvas() {\n // empty\n }", "function drawHidden(url) {\n\n \n\n var can = document.getElementById('can_hidden'),\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return a worker for the decompressed content.
_decompressWorker() { if (this._data instanceof CompressedObject) { return this._data.getContentWorker(); } else if (this._data instanceof GenericWorker) { return this._data; } else { return new DataWorker(this._data); } }
[ "get _worker() {\n delete this._worker;\n this._worker = new ChromeWorker(\"resource://gre/modules/PageThumbsWorker.js\");\n this._worker.addEventListener(\"message\", this);\n return this._worker;\n }", "function workerBody() {\n var that = this, lambda, evalInContext, handleErr;\n\n /*\n * Eval...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function to Hide Deck Popup
function div_hide_deck(){ document.getElementById('def').style.display = "none"; }
[ "function hide_popup()\n{\n\t$('.overlay').hide();\n\t$(\"#tooltip\").toggle();\n}", "function hidePopup () {\n $('#popup').css('z-index', -20000);\n $('#popup').hide();\n $('#popup .popup-title').text('');\n $('#popup .popup-content').text('');\n $('.hide-container').hide();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns number format for a fieldDef
function numberFormat(fieldDef, specifiedFormat, config) { if (fieldDef.type === type_1.QUANTITATIVE) { // add number format for quantitative type only // Specified format in axis/legend has higher precedence than fieldDef.format if (specifiedFormat) { return specifiedFormat; ...
[ "function flowFmt(num){\n // --- set number of decimal places for reporting flow values\n if ( FlowUnits == MGD || FlowUnits == CMS ) {\n return num.toFixed(3).padStart(9);\n }\n else {\n return num.toFixed(2).padStart(9);\n }\n}", "function formatValore(field)\n{\n\tformatDecimal(fie...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Truncates, at the end, the text content of a node using binary search
function truncateTextEnd($element, $rootNode, $clipNode, options) { var element = $element[0]; var original = $element.text(); var maxChunk = ''; var mid, chunk; var low = 0; var high = original.length; // Binary Search while (low <= high) { mid = low + ((high - low) >> 1); // In...
[ "function docClear (node)\n{\n\twhile (node.firstChild)\n\t\tnode.removeChild(node.firstChild);\n\tnode.innerHTML = \"\";\n}", "function findMatch(node, params) {\n\n var nodeValue = node.nodeValue.trim();\n var nodeIndex = params.nodeIndex;\n var searchTerm = params.searchTerm;\n var searchElements = params....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A somewhat cheesy demo that adds instructions to the task list every 1.5 seconds. Disabled by setting demoMode = false in the TodoListStore.
cheesyDemo() { function setTimeouts(arrayOfFunctions, period) { let counter = 0; // queues up functions every `period` milliseconds for (const f of arrayOfFunctions) { setTimeout(f, counter); counter += period; } } const { addTodo } = this.props.store; setTimeou...
[ "function createNewTask(task) {\n storeTaskLocalStorage(task);\n appendToList(task);\n}", "function runAddReminder() {\n var reminderString = getReminderInput();\n var reminderItem = createReminderItem(reminderString);\n addReminderItemToList(reminderItem);\n clearReminderInput();\n}", "function addTa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
purpose of function is to get item details of all ids listed in item.upgrades then replace upgrades with an array of those item upgrades
function fillUpgradeDetails(items) { //first get a list of ids to query let upgradeIDs = [] items.forEach((item) => { if (item.upgrades) { item.upgrades = item.upgrades.split() upgradeIDs.push(item.upgrades) } }) if (upgradeIDs.length > 0){ upgradeIDs = upgradeIDs.flat() return gw2...
[ "updateExistingItems(){\n this.items.forEach((item, index) => {\n Array.from(document.getElementsByClassName(`budgie-${this.budgieId}-${index}`)).forEach((element) => {\n // If the element has changed then update, otherwise do nothing\n\n let newElement = BudgieDom.createBudgieElement(this, it...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
drawGrid (main Grid Drawing Method) Draw a Grid (main function for drawing a Grid) ASSUMPTIONS: Side effects: gridObj.htmlId is set to htmlId. This is done to register htmlId with gridObj within the current step as a temporary measure.
function drawGrid(gridObj, indObj, htmlId, edit) { // Create some shortcut names for commonly used members in gridObj // var pO = CurProgObj; var gO = gridObj; // shortcut reference to gridObj var iO = indObj; var caption = gO.caption; //var hasRowTitles = gO...
[ "function drawInner2DGrid(gO, iO, htmlId, edit, showData) {\r\n\r\n\r\n // Create some shortcut names for commonly used members in gridObj\r\n // \r\n var pO = CurProgObj;\r\n\r\n var hasRowTitles = gO.dimHasTitles[RowDimId];\r\n var hasColTitles = gO.dimHasTitles[ColDimId];\r\n var hasRowIndic...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
L1 norm of x pi (where pi is the uniform distribution)
function normL1(x) { return x.reduce(function (acc, curr) { return acc + Math.abs(curr - uniform); }, 0); }
[ "get norm () { return Math.sqrt(this.normSquared); }", "function L2normalization(array){\r\n var normalizedArray = new Array();\r\n var powArray = new Array();\r\n for(let i = 0; i < array.length; i++){\r\n powArray.push(Math.pow(array[i],2));\r\n }\r\n var sum = powArray.reduce((x, y) => x + y);\r\n var...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Saves a copy of this page as a template in this library's Templates folder
async saveAsTemplate(publish = true) { const data = await spPost(ClientsidePage(this, `_api/sitepages/pages(${this.json.Id})/SavePageAsTemplate`)); const page = ClientsidePage(this, null, data); page.title = this.title; await page.save(publish); return page; }
[ "function createPage() {\n\t\t// check to see if the directory exists\n\t\tif (!fs.existsSync(OUTPUT_DIR)) {\n\t\t\t// if it does not, then make it\n\t\t\tfs.mkdirSync(OUTPUT_DIR);\n\t\t}\n\t\t// write the html file using the render(coworkers) data\n\t\tfs.writeFileSync(outputPath, render(coworkers), \"utf-8\");\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This is a function for postV3ProjectsIdBuildsBuildIdCancel
postV3ProjectsIdBuildsBuildIdCancel(incomingOptions, cb) { const Gitlab = require('./dist'); let defaultClient = Gitlab.ApiClient.instance; // Configure API key authorization: private_token_header let private_token_header = defaultClient.authentications['private_token_header']; private_token_header.apiKey =...
[ "postV3ProjectsIdMergeRequestsMergeRequestIdCancelMergeWhenBuildSucceeds(incomingOptions, cb) {\n const Gitlab = require('./dist');\nlet defaultClient = Gitlab.ApiClient.instance;\n// Configure API key authorization: private_token_header\nlet private_token_header = defaultClient.authentications['private_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Perform pow on the message and return the nonce of at least targetScore.
pow(message, targetScore) { return __awaiter(this, void 0, void 0, function* () { const powRelevantData = message.slice(0, -8); const powDigest = iota_js_1$1.Blake2b.sum256(powRelevantData); const targetZeros = iota_js_1$1.PowHelper.calculateTargetZeros(message, targetScore);...
[ "async getNumberOfCoinsPicked() {\n return Math.random() < 0.5 ? 1 : 2;\n }", "function other_function(n, m){\n var result = Math.pow( n, m );\n return result;\n}", "getNonce() {\n return this.web3.eth.getTransactionCount(this.coinbase);\n }", "proofOfWork(difficulty,pendingTransactions) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
sanitizeCmd sanitizes and formats the raw string command from the user _________________________________________________________________
function sanitizeCmd(input) { input = input.split(' ') //sanitize the array for (var i in input) { input[i] = input[i].toLowerCase().replace(/[^\w\s]/gi, '') } return { 'command': input[0], 'args': input.slice(1) //array slice the command off the args list } }
[ "function formatInput(command){\n\n if(command === undefined || command.length < 3){\n return \"default\";\n }\n\n else{\n return command.toLowerCase().trim();\n }\n}", "submitCmd(){\n this.cmdText += `> ${this.cmd}\\n`\n let parsed = this.cmd.replace(/^\\s+/, '').split(/\\s+/)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
set a mood config
function setConfigForPattern(patternName, configName, configVal, cb) { ion.setMoodConfig(patternName, configName, configVal, function(err) { if (!err) { if (typeof configVal !== 'undefined') console.log('set ' + configName + ' to ' + configVal + ' for mood ' + patternName); else consol...
[ "function setCurrentMood(newMood)\n{\n currentMood = newMood;\n // change the picture representing the user's current mood\n document.getElementById(\"mood-image-main\").href = moodNameToFilename(moodEnumToName(currentMood));\n // send the mood, heart rate, and steps to the server\n sendMoodUpdate(ne...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
concatinate the items and there products into JSONobject
toJSON() { let items = _items.get(this); let JSONItems = []; for( let i = 0; i < items.length ; i++ ) { console.log(items[i].getCount()); JSONItems.push({ count: items[i].getCount(), name: items[i].getProduct().g...
[ "function getProducts() {\n $.ajax({\n url: \"files/productlist.json\",\n dataType: 'json',\n success: function(data) {\n var product =\"\";\n\n $.each(data, function(key, value) { // Execute for each set of data\n product ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Show the user the form to create a practice event when the practice tab is selected
function showPracticeFields() { if(document.getElementById('nav_create_game').classList.contains('active')) { document.getElementById('nav_create_practice').classList.add('active'); document.getElementById('nav_create_game').classList.remove('active'); document.getElementById('practice-other-form').style....
[ "function loadCreateSchedule() {\n document.getElementById('practice-other-form').style.display = 'none';\n}", "function handleShowNewIdeaForm() {\n $('body').on(\"click\", \".js-show-new-idea-form-btn\", () => {\n displayNewIdeaForm($('.js-content'));\n });\n}", "function changeLecturerContent(ev...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
========== ATTRIBUTES ========== auto_recovery_supported computed: true, optional: false, required: false
get autoRecoverySupported() { return this.getBooleanAttribute('auto_recovery_supported'); }
[ "get hibernationSupported() {\n return this.getBooleanAttribute('hibernation_supported');\n }", "get instanceStorageSupported() {\n return this.getBooleanAttribute('instance_storage_supported');\n }", "visitManaged_standby_recovery(ctx) {\n\t return this.visitChildren(ctx);\n\t}", "get ef...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
On Signup Button is Clicked Validate all the required Fields Show validation errors if inValid If valid: Hit Signup API
function onSignUpClicked (event) { let isValid = true; let userType = 'student'; $(getClassName(userType, 'signUpFirstNameError')).hide() $(getClassName(userType, 'signUpLastNameError')).hide() $(getClassName(userType, 'signUpCountryCodeError')).hide() $(getClassName(userType, 'SignUpPhoneNumbe...
[ "static sign_up(callback = null) {\n // Hide the inputs\n window.UI.hide(\"authenticate-inputs\");\n // Change the output message\n this.output(\"Hold on - Signing you up...\");\n // Send the API call\n window.API.send(\"authenticate\", \"signup\", {\n name: wind...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
take the code and make tokens rules: spaces split tokens names stay complete symbol stuff gets chopped in single chars convert indentation (with spaces) to indent tokens
function lex(code) { // create a 'lines' array var lines = (function() { var row = 0 return code.split('\n').map(function(code) { return {code: code, row: ++row} }).filter(function(line) { line = line.code.trim() if (line.length === 0) return false; if (line.slice(0, 2) === '//')...
[ "codeToScopes(code){\n if (typeof code !== 'string') return null;\n var bodys = [];\n var body = '';\n var open = 0;\n var inScope = false;\n for (var i = 0; i < code.length; i++){\n var char = code[i];\n open += char == '{' ? 1 : 0;\n open -= char == '}' ? 1 : 0;\n\n if (!inSc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Draw the timeline at the bottom of the screen
function draw_timeline() { var size = canvas.width/dpi * 0.75; var start = x_center - size/2; var finish = x_center - size/2 + size; ctx.fillRect(0, canvas.height/dpi - 30, canvas.width/dpi, 6); ctx.globalAlpha = 1; // Calculate where the position marker should be on the screen var position = start + (((s...
[ "redrawTimeline() {\n this._canvas.clearRect(0, 0, this._canvasWidth, this._canvasHeight);\n this.drawBackground();\n this.drawLayerLabels();\n // Recompute objects positions\n this._timelineState = this.getTimelineDrawState(this._resolvedStates);\n // Draw the current stat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a geo chart of China and adds it to the page
function drawChinaMap() { const data = google.visualization.arrayToDataTable(CHINA_MAP_TABLE); const options = { region: CHINA_REGION, width: 500, height: 310, colorAxis: {colors: ['#4374e0', '#4374e0']} }; const chart = new google.visualization.GeoChart(document.getEle...
[ "function addVolunteersCountryMap(number_of_users_per_country) {\n var number_of_users_per_country_data = []\n var MIN = 1000000;\n var MAX = -1;\n \n for(var i=0;i<number_of_users_per_country.rows.length;i++){\n var c = number_of_users_per_country.rows[i]\n var data_point = {}\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add fuel to player
function collectFuel(){ powerUpSound.play(); playerFuel += 20; if(playerFuel > 100){ playerFuel = 100; } updateFuel(); }
[ "fuelUp(gallons) {\n this.fuelLevel = this.fuelLevel + gallons\n\n //ensures no matter how much gas you add it can be more than the tank's capacity\n if(this.fuelLevel > this.gasTankCapacity) {\n this.fuelLevel = this.gasTankCapacity\n } else if(this.fuelLevel < 0) { // siphon off gas limit\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set default stairs model for empty stairs
defaultStairsModel() { return { stair: { label: this.$translate.instant( 'telecom_pack_migration_building_details_none', ), value: STAIR_FLOOR.unknown, }, floors: [ { label: this.$translate.instant( 'telecom_pack_migration_building_de...
[ "handleSetStatesToDefault() {\n this.setState({\n gridData: {},\n gridLoadToggle: false,\n noError: true,\n currentStudent: {},\n currentProject: {},\n errorMessage: \"\",\n showStudent: false,\n showProject: false,\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A CpuSlice represents a slice of time on a CPU.
function CpuSlice(cat, title, colorId, start, args, opt_duration) { Slice.apply(this, arguments); this.threadThatWasRunning = undefined; this.cpu = undefined; }
[ "function ThreadTimeSlice(thread, schedulingState, cat,\n start, args, opt_duration) {\n Slice.call(this, cat, schedulingState,\n this.getColorForState_(schedulingState),\n start, args, opt_duration);\n this.thread = thread;\n this.schedulingState = scheduling...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
WAYPOINTS the user typed input for the waypoint search. forward the input to start a query
function handleSearchWaypointInput(e) { var waypointElement = $(e.currentTarget).parent().parent(); //index of the waypoint (0st, 1st 2nd,...) var index = waypointElement.attr('id'); clearTimeout(typingTimerWaypoints[index]); if (e.keyIdentifier != 'Shift' && e.currentTarget.valu...
[ "function handleSearchAgainWaypointClick(e) {\n var wpElement = $(e.currentTarget).parent();\n // make input field selectable\n //var selectedDiv = $(e.currentTarget).parent()[0];\n //var thisDiv = selectedDiv.className\n //var myDiv = thisDiv.replace(/ /g,\".\");\n //$('.'...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determine if the given comment is a tripleslash
function isRecognizedTripleSlashComment( text, commentPos, commentEnd ) { // Verify this is /// comment, but do the regexp match only when we first can find /// in the comment text // so that we don't end up computing comment string and doing match for all // comments if ( text.charCodeAt( c...
[ "function isComment(token) {\n return token.type === 'LineComment' || token.type === 'BlockComment';\n}", "function isUNC(path) {\n if (!__WEBPACK_IMPORTED_MODULE_0__platform_js__[\"g\" /* isWindows */]) {\n // UNC is a windows concept\n return false;\n }\n if (!path || path.length < 5) {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Visit a parse tree produced by PlSqlParserupdate_set_clause.
visitUpdate_set_clause(ctx) { return this.visitChildren(ctx); }
[ "visitUpdate_statement(ctx) {\n\t return this.visitChildren(ctx);\n\t}", "visitFor_update_clause(ctx) {\n\t return this.visitChildren(ctx);\n\t}", "visitColumn_based_update_set_clause(ctx) {\n\t return this.visitChildren(ctx);\n\t}", "visitMerge_update_clause(ctx) {\n\t return this.visitChildren(ctx);\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get and create pois
function getPois(map) { jQuery.ajax({ url: poi_url + "?apiKey=" + api_key, dataType: "json", async: true, type: "GET", success: function(data, status, jqXHR) { $.each(data, function(i, obj) { //console.log(obj); createPois(obj, map)...
[ "function createPokemon(_id, name, classification, type1, type2, hp, attack, defense, speed, sp_attack, sp_defense){\n return {\n \"_id\": _id,\n \"name\": name,\n \"classification\": classification,\n \"type1\": type1,\n \"type2\": type2,\n \"stats\": {\n \"hp\": hp,\n \"attack\": atta...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This sample demonstrates how to Creates or updates an availability group listener.
async function createsOrUpdatesAnAvailabilityGroupListenerThisIsUsedForVMSPresentInMultiSubnet() { const subscriptionId = process.env["SQLVIRTUALMACHINE_SUBSCRIPTION_ID"] || "00000000-1111-2222-3333-444444444444"; const resourceGroupName = process.env["SQLVIRTUALMACHINE_RESOURCE_GROUP"] || "testrg"; const sql...
[ "async function createsOrUpdatesAnAvailabilityGroupListenerUsingLoadBalancerThisIsUsedForVMSPresentInSingleSubnet() {\n const subscriptionId =\n process.env[\"SQLVIRTUALMACHINE_SUBSCRIPTION_ID\"] || \"00000000-1111-2222-3333-444444444444\";\n const resourceGroupName = process.env[\"SQLVIRTUALMACHINE_RESOURCE_G...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Promotes the given constant string to a TrustedScriptURL.
function ɵɵtrustConstantResourceUrl(url) { return trustedScriptURLFromString(url); }
[ "function sendTransferenciaToPageScript() {\n loadTransferenciaFromStorage()\n .then( transferencia => { \n window.postMessage({ // send message to page script\n from: \"autopac\", // from autopac extension\n transferencia: transferencia\n }, \"*\"); // to any targetOrigi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add image resource references for the provided platforms to the project's config.xml file.
async function addResourcesToConfigXml(conf, platformList, resourceJson) { for (const platform of platformList) { conf.ensurePlatformImages(platform, resourceJson[platform]); } conf.ensureSplashScreenPreferences(); }
[ "function updatePlatformConfig(platform) {\n var configData = parseConfigXml(platform),\n platformPath = path.join(rootdir, 'platforms', platform);\n\n _.each(configData, function (configItems, targetFileName) {\n var targetFilePath;\n if (platform === 'ios') {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Export layer to image
function ExportLayer(layer, file){ var docDup = docRef.duplicate(); // docDup.artLayers.add(); app.activeDocument = docRef; // for following layer duplicate var lyCopy = layer.duplicate(docDup, ElementPlacement.INSIDE); app.activeDocument = docDup; // for save document SaveJPEG(docDup, fil...
[ "function SaveCurLayerset(){\n var lySetCur = docRef.activeLayer;\n var isLayer = lySetCur.typename == \"ArtLayer\"? true: false;\n var diagName = \"输出目录:当前选择的是 \" + (isLayer? \"层\": \"组\"); //FIXME: not displayed on windows\n var DirSaved = Folder.selectDialog(diagName); // using \"var path\" get ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Exercise One Choosing a color for a light. Given a number, decide which color should be returned. Complete the following ternary statement. If the number is > 10, return "blue" otherwise return "red";
function getColor(number) { return number > 10 ? "blue" : "red"; }
[ "getColor() {\n if (this.temperature <= 15) {\n return \"blue\";\n } else if (this.temperature <= 30) {\n return \"orange\";\n } else {\n return \"red\";\n }\n }", "function tempColorSelector(temp) {\n var tempColor = \"\";\n\n var t = parseFlo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Author: HK Name: _getSelectedTilesKeys Description: collects selected tiles Keys Params: none Return: tilesKeys = array of selected tiles keys
function _getSelectedTilesKeys() { var tilesKeys = []; var nbSelectedtiles = lv_cockpits.winControl.selection.count(); for (var tileIterator = 0; tileIterator < nbSelectedtiles; tileIterator++) { var currentItem = lv_cockpits.winControl.selection.getItems()._value[tileIterator]; ...
[ "function _getSelectedTilesIds() {\n var tilesIds = [];\n var nbSelectedtiles = lv_cockpits.winControl.selection.count();\n for (var tileIterator = 0; tileIterator < nbSelectedtiles; tileIterator++) {\n var currentItemData = lv_cockpits.winControl.selection.getItems()._value[tileIter...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function:generateBaseStyleHeaderHTML (styleSrc, retPage) Purpose:generates HTML output with a sample header, the name of the style in italics, and two buttons.
function generateBaseStyleHeaderHTML (styleSrc, retPage) { // this code would normally go directly into the theme pages since its page // specific, but it's used on 2 seperate pages relating to themes, and I didn't // want to maintain this in 2 areas var out = generateStyleHTML (styleSrc); var myStyle = styleSrc...
[ "function generateStyleHTML (styleSrc)\n{\n\treHeader = /\\.text-header\\s*\\{([^}]*)/\n\treBody = /\\.text-body\\s*\\{([^}]*)/\n\t\t\n\tif (styleSrc.indexOf(\"SS_\") == 0)\n\t\tvar style = doActionEx\t('DATA_READFILE',styleSrc, 'FileName', styleSrc,'ObjectName',\n\t\t\t\t\t\t\t\tgSTYLE_OBJ, 'FileType', 'txt');\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
find multiple radar problems that match a query
function find(query, callBack) { // use a custom radar fieldset appropriate for a grid view (avoid any ws performance hit) var fields = 'id,title,component,assignee,lastModifiedAt,state,substate,classification,priority,'+ 'resolution,reproducible,milestone'; post('/problems/find', { query: query,...
[ "function getProblemsByPermalinks(permalinsArray){\n var problemsObj=[];\n lab1:for (var i=0; i<permalinsArray.length; i++) {\n for (var j=0;j<problems.length; j++) {\n if (problems[j].permalink == permalinsArray[i]) {\n problemsObj.push(problems[j]);\n continue...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }