query
stringlengths
9
34k
document
stringlengths
8
5.39M
negatives
listlengths
19
20
metadata
dict
odb inline edit convert link to edit field
function mie_link_to_edit(p, odb_path, bracket, cur_val) { var size = cur_val.length + 10; var index; p.ODBsent = false; var str = mhttpd_escape(cur_val); var width = p.offsetWidth - 10; if (odb_path.indexOf('[') > 0) { index = odb_path.substr(odb_path.indexOf('[')); if (bracket == 0) {...
[ "function ODBInlineEdit(p, odb_path, bracket) {\n if (p.inEdit)\n return;\n p.inEdit = true;\n mjsonrpc_db_get_values([odb_path]).then(function (rpc) {\n var value = rpc.result.data[0];\n var tid = rpc.result.tid[0];\n var mvalue = mie_to_string(tid, value);\n mie_link_to_edit(p, odb_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
join an existing game param gameId Firebase GameId of game we want to join
function joinGame(gameId) { if(!gameId) { console.log('error, game id is null'); //todo handle error return; } firebaseGame = new Firebase(FIREBASE_URL + '/games/' + gameId); firebaseGame.once('value', function(dataSnapshot) { var game = dataSnapshot.val(); if(game) { ...
[ "function joinGame(key) {\n\t\tconsole.log(\"Attempting to join game: \", key);\n\t\tvar user = firebase.auth().currentUser;\n\t\tref.child(key).transaction(function (game) {\n\t\t\t//only join if someone else hasn't\n\t\t\tif (!game.joiner) {\n\t\t\t\tgame.state = STATE.JOINED;\n\t\t\t\tgame.joiner = {\n\t\t\t\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Using dev tools and game info renders projectiles(bullets)
function renderBullets(aDev,aGame) { ////this makes a temp object of the image we want to use //this is so the image holder does not have to keep finding image tempImage = aDev.images.getImage("bullet") for (var i = 0; i < aGame.projectiles.getSize(); i++) { ////this is to make a...
[ "function addBullet(){\n\n game.projectiles.push({\n\n x: game.player.x,\n y: game.player.y,\n size: 20,\n image: 2\n\n });\n }", "function drawMissiles() {\n let content = \"\";\n player...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
end get choices function Function checks the stock for the item the user wants to purchase and ensures sufficient quantities are available
function checkStock(response, answers) { var chosenItem = { item_id: 'invalid item' }; //match user choice with the correct item for (var i = 0; i < response.length; i++) { if (answers.itemChoice == response[i].item_id) { chosenItem = response[i]; } } //ensur...
[ "function buyChoices() {\n var stockToPurchase = $(this).attr(\"buy-id\");\n\n console.log(\"in buyChoices(), buy-id: \" + stockToPurchase);\n // Shares you want to purchase:\n // <input type=\"number\" required=\"required\" name=\"nshares\" min=\"0\" value=\"0\"max=\"<shares * price < cashAvailbl>\" />...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use DCM API to get a list of all Activity Group Name / IDs from the specified floodlight configuration, print it out on the sheet
function getFloodlightConfig() { const profile_id = _fetchProfileId(); const config_id = _fetchFloodlightConfigId(); var activityList = DoubleClickCampaigns.FloodlightConfigurations.list(profile_id, { 'ids' : config_id, })...
[ "function bulkCreateActivityGroups() {\r\n var ss = SpreadsheetApp.getActiveSpreadsheet();\r\n var sheet = ss.getSheetByName(CREATE_ACTIVITY_GROUPS);\r\n\r\n // This represents ALL the data\r\n var range = sheet.getDataRange();\r\n var values = range.getValues();\r\n\r\n const profile_id = _fetchProfileId();\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
addCritBonus (tengu) at bonuses to the tengu's Critical Hits when the tengu is at levels 8 (+2), 9 (+4_) and 10 (+6). The bonuses are combined with the LuckyModifier value that is added to the Crit Die.
function addCritBonus (tengu) { var critBonus = 0; if (tengu.level === 8) { critBonus = 2; } else if (tengu.level === 9) { critBonus = 4; } else if (tengu.level === 10) { critBonus = 6; } return critBonus; }
[ "function adjustCrit (luckySign, luckModifier) {\n var adjust = luckModifier * 1;\n if (luckySign.luckySign != undefined && luckySign.luckySign === \"Warrior's arm\"){\n adjust = luckModifier * 2;\n }\n\treturn adjust;\n}", "function addLuckToSpeed (luckySign, luckModifier) {\n\tvar addSpeed = 0;\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function for toggling the show seconds boolean
function toggleSeconds(){ if (secondsOn) { secondsOn = false; } else { secondsOn = true; roundUp = false; } }
[ "function durationsToggle () {\n svg.selectAll(\"line[class^='touch-']\")\n .style(\"visibility\", d3.select(\"#checkbox-duration\").node().checked ? \"visible\" : \"hidden\")\n }", "function toggleRound() {\n\tif (roundUp) {\n\t\troundUp = false;\n\t} else {\n\t\troundUp = true;\n\t\tseconds...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Send a "lock" message to the content script in the active tab.
function scrollLock(tabs) { browser.tabs.sendMessage(tabs[0].id, { command: 'lock', }); }
[ "setLocked () {\n this.platform.sendMessage({ action: 'metamask-set-locked' })\n }", "function lockDiagram() {\n diagramLockedByCurrentUser = true;\n\n $.post('/diagram/' + diagram.diagramId + '/lock', { lockedById: diagram.lockedById });\n socket.emit('diagramLocked', { diagramId: diagram.diagramId ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Using fetch with Headers
function fetchWithHeader() { fetch('https://api.github.com/users?since=135').then(function(response) { console.log(response.headers.get('Content-Type')); console.log(response.headers.get('Date')); console.log(response.status); console.log(response.statusText); console.log(response.type); co...
[ "function fetchBooks(){\n\n return fetch(books_url).then(res => res.json())\n\n // Good practice to write out headers even for get fetch, sometimes it can be html coming back. \n // function fetchBooks(){\n // // Returns a promise \n // return fetch(books_url, {\n // ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Private function: Rotates all mahjong tiles randomly
function rotateTiles() { for(var i = 0; i < tiles.length; i++){ var rotation = Math.random() * 360; tiles[i].setRotation(rotation); } }
[ "function resetTiles() {\n\t\tvar positions = createPositionArray(xCount, yCount, diameter);\n\t\t\n\t\tfor(var i = 0; i < tiles.length; i++){\n\t\t\ttiles[i].setPosition(positions.pop());\n\t\t}\n\t\trotateTiles();\n\t\tgroupTiles();\n\t}", "function setPattern() {\n //zeroArray();\n\n if(difficulty < 12) ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Update the UI display apart from the thread tree because the folder being displayed has changed. This can be the result of changing the folder in this FolderDisplayWidget, or because this FolderDisplayWidget is being made active. _updateThreadDisplay handles the parts of the thread tree that need updating.
_updateContextDisplay() { if (this.active) { UpdateMailToolbar("FolderDisplayWidget updating context"); UpdateStatusQuota(this.displayedFolder); UpdateStatusMessageCounts(this.displayedFolder); // - mail view combo-box. this.onMailViewChanged(); } }
[ "function updateUI() {\n showFolderOrFileContentById(navigationHistory.getCurrentId(), true);\n var treeState = getExplorerState();\n showFoldersTree(treeState);\n }", "onDisplayingFolder() {\n let displayedFolder = this.view.displayedFolder;\n let msgDatabase = displayedFolder && di...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Starts the button progress at the specified percent.
start(percent) { this.isPaused = false; this.startProgress(percent ? percent : this.percent, this.progressTime); }
[ "set percent(percent) {\n if (isNaN(percent) || percent < 0 || percent > 1) {\n throw new RangeError('The percentage must be between 0 and 1.');\n }\n if (this._needle) {\n this._needle.update(percent);\n }\n this._percent = percent;\n this._update();\n }", "function ProgressBar(fract...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a new Asynchronous Function Queue. This is a list of functions that run asynchronous code, such as animating elements on the page or making ajax requests. Each function should accept the callback parameter as its final parameter, and call this callback to signal the completion of the function.
function AsyncFunctionQueue() { this.functionList = []; // the array of functions. this.position = 0; // the current function to be executed. this.sleep = 100; // the time to wait between executing functions after `exec` is called. this.states = []; // this._o...
[ "function threeCallbackQueues() {\n console.log('\\n***Begin three parallel queues, callback-based test\\n')\n\n start = new Date()\n lr.init(3)\n .push('http://www.google.com', function(err, res, body) {\n console.log('Google')\n })\n .push('http://www.android.com', function(err, res...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
calculate the average wait times per hour for a given day. Input should be an object, with hours mapping to arrays of objects. Those objects are minutes mapped to wait time.
function calculateAverageWait(input, previousTime) { if (input[0].length < 1) { var temp = {}; temp[0] = previousTime; input[0].push(temp); } for (var i = 1; i < 24; i++) { if (input[i].length < 1) { var temp = {}; var hourLastMinute = Object.keys(input[i-1][input[i-1].length-1])[0]; ...
[ "function calcSplitsAverage(splits) {\n let totalSeconds = 0;\n for(let i = 0; i < splits.length; i++) { \n const mins = splits[i].split(':')[0];\n const secs = splits[i].split(':')[1];\n totalSeconds += ((parseFloat(mins) * 60) + parseFloat(secs)); \n } \n const avgTot...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The month view header week day labels
monthViewColumnHeader({ date, locale }) { return new Intl.DateTimeFormat(locale, { weekday: 'long' }).format(date); }
[ "function addDayColumns() {\r\n for (var i = 0; i < weekIndex.length; i++) {\r\n var $day = $('<div/>', {\r\n 'class' : 'day',\r\n }).appendTo($content);\r\n columns[i] = $day;\r\n\r\n var $label = $('<div/>', {\r\n 'class' : 'dayLabel...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Pause execution of the Worker.
pauseExecution() { this.worker_.postMessage({'command': JobCommand.PAUSE}); }
[ "function pause() {\r\n\t\t\tpauseFunction(countDown, \"pause\");\r\n\t\t}", "stopExecution() {\n this.worker_.postMessage({'command': JobCommand.STOP});\n }", "function pause() {\n try {\n\t pl[(arguments[0]-1)].message(\"pause\");\n\t }\n catch(err) {\n post(\"bw.playlister: pause() requir...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
When a community is pressed, make sure that the modal window's information correlates to the community. Updates the app as to what community was pressed on. Opens the Modal Window after updating
updateModal(community, houses){ this.currentCommunity = community this.currentHouses = houses this.handleOpenModal(); }
[ "function openCommentModal() {\n $( '#discussion-modal' ).foundation('reveal', 'open');\n }", "function win() {\n modal.style.display = \"block\";\n}", "function openModalNewResponsableMedicion() {\n\tabrirCerrarModal(\"modalAsignaPersonas\");\n\tsetFirstInput();\n}", "function openAssessmentPlanMo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Prepare Signup Form It is used to retrieve form details from an iframe Mail Chimp or Campaign Monitor form.
function prepareSignup(iFrame){ var form = jQuery('<form />'), div = jQuery('<div />'), action; jQuery(div).html(iFrame.attr('srcdoc')); action = jQuery(div).find('form').attr('action'); // Alter action for a Mail Chimp-compatible ajax request url. if(/list-manage\.com/.test(a...
[ "function registrationForm() {\n app.getForm('profile').handleAction({\n confirm: function () {\n var email, profileValidation, password, passwordConfirmation, existingCustomer, Customer, target, customerExist;\n\n Customer = app.getModel('Customer');\n email = app.getForm...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Write new message in modal
function writeNewMessage(){ $( 'body' ).on( 'click', 'button.write-new-message', function () { $( 'div#sm-send-new-message' ).show(1); $( 'div#sm-send-new-message' ).addClass( 'sidemodal-showing' ); $( 'body' ).addClass( 'bsm-active' ); }); $( 'body' ).on( 'click', 'div#sm-send...
[ "function _notify(msg) {\n let html=document.getElementById('notify-container');\n html.innerHTML=msg;\n $('#modalnotify').modal('show');\n setTimeout(function() {$('#modalnotify').modal('hide')}, 3000);\n}", "displayMessages() {\n\t\tfor(var i = 0; i < this.messages.length; i++) {\n\t\t\t$(\"#newRecordModalD...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A count down method for a input button getting validation mobile code
function btnCountDown(target, seconds){ if (typeof seconds !== "number"){ return; } var btnObj = $("input#" + target); // count down to make sure that client won't send sms so frequently var countdown = setInterval(function(){ if (seconds > -1){ btnObj.val(secon...
[ "function validate() {\n var _a, _b;\n var count = 0;\n var code = (_a = document.getElementById('rocket-code')) === null || _a === void 0 ? void 0 : _a.value;\n var numBoosters = document.getElementById('boosters').value;\n //Validate all inputs have value\n var inputs = document.querySelectorAll...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
set stepper step, start from 0.
setStepperStep(state, step){ Vue.set(state, 'stepper_current_step', step); }
[ "function nextSlide(step) {\n pos = Math.min(pos + step, 0);\n setTransform();\n }", "function increaseStepCount() {\n lx.stepCount++;\n }", "function previousSlide(step) {\n pos = Math.max(pos - step, -(slideCount - 1));\n setTransform();\n }", "function animationStep() {\n\t\tif (_cu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
method is used to decrease totalPeople
decrementTotalPeople() { let totalPerson = document.getElementById('totalPerson').value; if(totalPerson > 1) { // decrease totalPerson one by one totalPerson = totalPerson - 1; document.getElementById('totalPerson').value = totalPerson; } }
[ "incrementTotalPeople() {\n\t\tlet totalPerson = document.getElementById('totalPerson').value;\n\t\t// increase totalPerson one by one\n\t\ttotalPerson = Number(totalPerson) + Number(1);\n\t\tdocument.getElementById('totalPerson').value = totalPerson;\n\t}", "function decrementCount(key) {\n if (co...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This function obtains the successor of the caller BSTNode, if it has such a successor
getSuccessor() { let curNode = this; let lagNode = this; if (curNode.right !== null) { curNode = curNode.right; while (curNode.left !== null) { curNode = curNode.left; } return curNode; } ...
[ "getInorderSuccessor(node) {\n if(node == null || node.left == null)\n return node;\n return this.getInorderSuccessor(node.left);\n }", "function lensForSuccessorElement(tree) {\n\tif (isEmpty(tree)) {\n\t\treturn null;\n\t} if (isEmpty(tree.right)) {\n\t\treturn null;\n\t} else {\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Print integers from 0 to 255, and with each integer print the sum so far
function printIntsAndSum() { var sum = 0; for(var i = 0; i <= 255; i++) { sum += i; console.log("i = " + i); console.log("Current Sum = " + sum); } }
[ "function PrintandCount() {\n\tvar count = 0;\n\tfor (var i = 512; i < 4096; i++) {\n\t\tif(i % 5 == 0){\n\t\t\tconsole.log(i)\n\t\t\tcount = count + 1\n\t\t}\n\t}\n\tconsole.log(\"number of integers multiple of 5:\", count)\n}", "function printNumber(start, finish) {\n var count = start;\n while (count <= ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Q1: print students on console
function list() { console.log(students); }
[ "function printStudents(students) {\n //your code here...\n for (let i = 0; i < students.length; i++) {\n console.log(students[i][\"name\"]+ \" is student #\" + students[i][\"id\"]);\n // console.log(students[i].name);\n }\n}", "function SBR_display_student() {\n //console.log(\"====...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Group mentions by speaker, collapse overlapping excerpts.
function groupMentionsBySpeaker(mentions) { return d3.nest() .key(function(d) { return d.section.speaker; }) .rollup(collapseMentions) .entries(mentions); }
[ "participantsForReplyAll() {\n const excludedFroms = this.from.map((c) =>\n Utils.toEquivalentEmailForm(c.email)\n );\n\n const excludeMeAndFroms = (cc) =>\n _.reject(cc, (p) =>\n p.isMe() || _.contains(excludedFroms, Utils.toEquivalentEmailForm(p.email))\n );\n\n let to = null\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get the suburb field
get suburb() { return 'input#BillingAddress_Suburb' }
[ "function cleanSuburbDataVIC(fireDistrictData, fireDistrict, suburb) {\n return { [suburb]: fireDistrictData[fireDistrict] };\n}", "function cleanSuburbDataSA(fireDistrictData, fireDistrict, suburb) {\n return {\n Suburb: suburb,\n ...fireDistrictData,\n };\n}", "function cleanSuburbDataNSW(fireDistric...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
update data theo id _task truyen vao la task da duoc chinh sua noi dung
update(_task) { const { id, task, date, process } = _task let sql = `UPDATE tasks SET task = ?, date = ?, process = ? WHERE id = ?`; return this.dao.run(sql, [task, date, process, id]) }
[ "function task_update_todoist(task_name, project_id, todoist_api_token) {\n todoist_api_token = todoist_api_token || 'a14f98a6b546b044dbb84bcd8eee47fbe3788671'\n return todoist_add_tasks_ajax(todoist_api_token, {\n \"content\": task_name,\n \"project_id\": project_id\n }, 'item_update')\n}", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\ addEventToMainStateSelect() \\ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\
function addEventToMainStateSelect(){ if($('first_section_select_state').value === ""){ } else { // Save the selectedState selectedState = $('first_section_select_state').value; //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\ ...
[ "add_select(func) {\n this.add_event(\"select\", func);\n }", "function onSelectStart(event){\n\n if (event instanceof MouseEvent && !renderer.xr.isPresenting()){\n\t// Handle mouse click outside of VR.\n\t// Determine screen coordinates of click.\n\tvar mouse = new THREE.Vector2();\n\tmouse.x = (eve...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Recompute this every time it's needed, because we don't know if the underlying IronValidatableBehaviorMeta has changed.
get _validator() { return Polymer.IronValidatableBehaviorMeta && Polymer.IronValidatableBehaviorMeta.byKey(this.validator); }
[ "get validity() {\n return this.elementInternals\n ? this.elementInternals.validity\n : this.proxy.validity;\n }", "_checkIfDirty(){\n if (this._isDirty === true){\n this._isDirty = false;\n this._refresh();\n }\n }", "functi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
9. Finish the function below that will REPLACE the first item in our brunchFoods array with whatever you pass into the function. Make sure to return the brunchFoods array to test that your code works as expected.
function replaceFirstBrunchFood(food) { brunchFoods[0] = food; console.log(brunchFoods) }
[ "function removeFirstKitten(){\n var newArray = kittens.slice(1);\n return newArray;\n}", "function removeFruits(fruits, fruitsToRemove) {\n // FILL THIS IN\n for(var i = 0; i <= fruits.length; i++){\n if(fruits[i] == fruitsToRemove){\n fruits.splice(fruitsToRem...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Extend the Game class to also include a canvas based interface. In init, must pass in promote callback and a 'canvas' element that the game will run on piece_size will scale the size of the board. default is 64 perspective decides what color starts on bottom.. init.moveCallBack is called when the user clicks and makes ...
function CanvasGameBoard(init){ /* * Anything that shouldn't be deep copied goes here (IE anything that doesn't matter) */ this.sc = new SingletonContainer({ canvas : init.canvas, ctx : init.canvas.getContext('2d'), images : {} }); this.moveCallBack = in...
[ "resize() {\n this.createCanvas();\n }", "setupCanvas(width, height, rectMargin, rulerSize) {\n\t\tthis.canvas.width = width\n\t\tthis.canvas.height = height\n\t\tthis.rectMargin = rectMargin\n\t\tthis.rulerSize = rulerSize\n\t\tthis.rectArea = {\n\t\t\t'width':this.canvas.width - rulerSize - rectMargin,\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Normalized view of child views (and containers) attached at this location.
get childViews() { const childViews = []; let child = this.childHead; while (child) { childViews.push(child); child = child.next; } return childViews; }
[ "createView(){\n super.createView();\n if(this.getView()) {\n for (let h of this.getView().handles) {\n this.addInteractionsToElement(h);\n }\n // this.detach();\n }\n }", "get viewRange() {\n return this._viewDrawWidth / this.pixelsWi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Load ComponentBegin type resource into model.
function loadComponentBegin(model, resource, jsonld) { var component = getComponent(model, jsonld.getReference(resource, 'http://linkedpipes.com/ontology/component')); component.start = jsonld.getString(resource, 'http://linkedpipes.com/ontology/events/created'); }
[ "function loadComponent(model, resource, jsonld) {\n var component = getComponent(model, resource['@id']);\n component.status = jsonld.getReference(resource,\n 'http://etl.linkedpipes.com/ontology/status');\n component.order = jsonld.getInteger(resource,\n 'http://...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a _Pool2D layer
constructor(attrs = {}) { super(attrs); this.name = '_Pool2D'; const { kernel_size = [2, 2], strides = [2, 2], padding = 'VALID', data_format = 'NHWC', activation = 'NONE' } = attrs; if (Array.isArray(kernel_size)) { this.kernelShape = kernel_size; } else...
[ "constructor (attrs = {}) {\n super(attrs)\n this.layerClass = 'GlobalMaxPooling1D'\n }", "constructor (attrs = {}) {\n super(attrs)\n this.layerClass = 'MaxPooling3D'\n\n this.poolingFunc = 'max'\n }", "constructor(attrs = {}) {\n super(attrs)\n this.layerClass = 'GlobalAveragePooling1D'...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
resolves shiftreduce and reducereduce conflicts
function resolveConflict (production, op, reduce, shift) { var sln = {production: production, operator: op, r: reduce, s: shift}, s = 1, // shift r = 2, // reduce a = 3; // accept if (shift[0] === r) { sln.msg = "Resolve R/R conflict (use first production declared in gram...
[ "findForcedReduction() {\n let { parser } = this.p,\n seen = []\n let explore = (state, depth) => {\n if (seen.includes(state)) return\n seen.push(state)\n return parser.allActions(state, (action) => {\n if (\n action &\n (262144...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
List all the environments
async _listEnvironments(token) { return requestPromise({ ...this.requestSettings.environments(token), ...this.proxySettings }) }
[ "async _getVirtualHostsPerEnv(token) {\n\t\tthis.log('Loading virtual hosts')\n\t\tconst virtualHostsPerEnvironment = new Map();\n\t\t//get a list of all environments and virtual hosts\n\t\tconst environments = JSON.parse(await this._listEnvironments(token));\n\t\tfor (let env of environments) {\n\t\t\tthis.log(`Pr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Parses an HL7 name (prefix / given [] / family)
function parseName(nameEl) { var prefix = nameEl.tag('prefix').val(); var els = nameEl.elsByTag('given'); var given = []; for (var i = 0; i < els.length; i++) { var val = els[i].val(); if (val) { given.push(val); } } var family = nameEl.tag('family').val(); return { prefix: prefix...
[ "parseName() {\n return ionMarkDown_1.Imd.MarkDownToHTML(this.details.artist) + \" - \" + ionMarkDown_1.Imd.MarkDownToHTML(this.details.title);\n }", "function translateParserNames(name) {\n var translated;\n switch (name) {\n case '\\'ALL\\'':\n case '\\'ANY\\'':\n case '\\'I...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this function will calculate the surcharge if a driver is under age 25
function getSurcharge(totalCar) { let surcharge = 0; if (document.getElementById("age25").checked) { surcharge = totalCar * 1.3 } return surcharge; }
[ "function insurance(age, size, numofdays){\n let sum = 0;\n if (age < 25) {\n sum += (numofdays * 10) //There is a daily charge of $10 if the driver is under 25\n };\n if (numofdays < 0) {\n return 0 //Negative rental days should return 0 cost.\n };\n if (size === \"economy\") { //car size surcharge \"e...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initializes weights from all nodes of previous layer to all nodes in this layer, assuming full conenction. Initialization is random values between 0.1 and 0.1
initializeWeights() { // Create weights for each node for (let n = 0; n < this.numNodes; n++) { let nodeWeights = []; // Each input gets a random weight for (let i = 0; i < this.numInputs; i++) { // Add a random weight between -1 and 1 nodeWeights.push(Math.random()*2 - 1); } this.weights.pus...
[ "resetNodes() {\n for (let layer = 0; layer < this.nodes.length; layer++) {\n for (let node = 0; node < this.nodes[layer].length; node++) {\n this.nodes[layer][node].input = 0;\n this.nodes[layer][node].weight = 0;\n }\n }\n this.biasNode.weight = 1;\n }", "updateWeights() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
1. this defines the api of our avatar directive. This means we are expecting a user property whose value should be interpreted as an object. 2. This simply means we want this directive to be used as an element. 3. You can see here we've moved the html that was in our template before and give it as the template for this...
function avatarDirective () { return { scope: { user: '=' /* [1] */ }, restrict: 'E', /* [2] */ replace: 'true', template: ( '<div class="Avatar">' + '<img ng-src="{{user.avatarUrl}}" />' + '<h4>{{user.name}}</h4>' + '<h5>{{user.email}}</h5>' + '</div>' ...
[ "function NavAvatar(props) {\n const { authedUser, users } = props;\n const authedUserName = users[authedUser].name;\n const authedUserAvatarURL = users[authedUser].avatarURL;\n return (\n <span>\n {authedUserName}\n <img src={authedUserAvatarURL} alt='User Avatar' width='50' height='50' />\n </...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Build a tile: load from tile source if building for first time, otherwise rebuild with existing data
buildTile ({ tile }) { // Tile cached? if (this.getTile(tile.key) != null) { // Already loading? if (this.getTile(tile.key).loading === true) { return; } } // Update tile cache tile = this.tiles[tile.key] = Object.assign(this.g...
[ "function generateByTiledFile(newTile, leftSeedTile, rightSeedTile, fileName) {\n // console.log('generateByTiledFile' + [newTile, leftSeedTile, rightSeedTile, fileName].join(', '));\n var goRight;\n if (leftSeedTile) {\n goRight = true;\n\n newTile.leftEdge = leftSeedTile.rightEdge;\n ne...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calculates price for every hour of the day using the dynamic settings and returns those values in an array.
calculateHourlyRateArray(){ let hourlyRates = []; let tempArr = this.occupancy_percent; for(let i=0; i<24; i++){ hourlyRates.push((this.priceFormula(tempArr[i])).toFixed(2)); } return hourlyRates; }
[ "function createHourArr() {\n for (var i = 0; i < 9; i++) {\n var hour = moment().hour(i + 9).format(\"h a\");\n hourArr.push(hour);\n };\n}", "function getprices() {\n\trequest(c.URL, function(error, res, body) {\n\t\tif (!error && res.statusCode == 200) {\n\n\t\t\tvar prices = {};\n\t\t\tvar...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
pubSub is a curried interface for listening to and emitting events. If we get a bus: var bus = pubSub(); We can listen to event 'foo' like: bus('foo').on(myCallback) And emit event foo like: bus('foo').emit() or, with a parameter: bus('foo').emit('bar') All functions can be cached and don't need to be bound. Ie: var fo...
function pubSub(){ var singles = {}, newListener = newSingle('newListener'), removeListener = newSingle('removeListener'); function newSingle(eventName) { return singles[eventName] = singleEventPubSub( eventName, newListener, removeListener ); } /** pu...
[ "subscribe (emit, ...args) {\n if (typeof emit === 'function') {\n emit = {next: emit, error: args[0], complete: args[1]}\n } else if (typeof emit !== 'object') {\n emit = {}\n }\n\n const next = value => {\n for (let s of this._subscriptions) {\n if (typeof s.emit.next === 'functi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
"Pathify"s filename with given path.
function pathify(path, filename) { return path + '\\' + filename; }
[ "function normalizePath(path) {\n if (!path.endsWith(\"/\") && !path.endsWith(\"\\\\\")) {\n return path + \"/\";\n }\n return path;\n}", "function fileURLToPath(path) {\n Check.defined('path', path);\n\n if (typeof path === 'string') {\n path = new URL(path);\n }\n\n if (path.protocol !=...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
var segter = new Segmenter(document.querySelector('.segmenter'), segments(ctrl));
function segmenterInit (elem, optParm) { function segments(opt) { var conf = { home: { pieces: 4, animation: { duration: 1500, easing: 'easeInOutExpo', delay: 100, translateZ: 100 }, parallax: true, positions: [ {to...
[ "addSegment(segment) {\n this.segments.push(segment)\n segment.points.forEach(function (point) {\n point.paths.push(this)\n }, this)\n }", "function SegmentInfo(SegmentId, routeName, segmentName, oneWay, Color, tracks, dash, routeType, trackUsage )\n{\n this.type = \"SegmentInfo\";\n this.lin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if the given video element is currently playing.
static isVideoPlaying(video){return video.currentTime>0&&!video.paused&&video.readyState>2;}
[ "function isPlaying() {\n return (videoEl.currentTime > 0 && !videoEl.paused && !videoEl.ended && videoEl.readyState > 2);\n }", "isPlaying() {\n if (this.audio !== null && (typeof (this.audio) !== null) && this.audio !== undefined) {\n if ((this.audio.currentTime === this.audio.duration && this.a...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
probably can remove function saveUpdate end function saveUpdate second try saveVariables
function saveVariables () { //alert("Beginning function saveVariables ….tableID = "+ tableID + ". Because of resetFromContacts function, makeContactsTable = " + makeContactsTable + " … loadFromTableOptions = " + loadFromTableOptions + ". loadTableIndex = " + loadTableIndex + ". newTableSpecificVariables[loadTable...
[ "function MDUO_Save(){\n console.log(\"=== MDUO_Save =====\") ;\n // save subject that have exam_id or ntb_id\n // - when exam_id has value and ntb_id = null: this means that ntb is removed\n // - when exam_id is null and ntb_id has value: this means that there is no exam record yet\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
FUNCTION SectRect (srcl,src2: Rect; VAR dstRect: Rect) : BOOLEAN; SectRect calculates the rectangle that's the intersection of the two given rectangles, and returns TRUE if they indeed intersect or FALSE if they don't. Rectangles that "touch" at a line or a point are not considered intersecting, because their intersect...
sectRect(otherRect, destRect) { let x5 = max(this.left, otherRect.left); let y5 = max(this.top, otherRect.top); let x6 = min(this.right, otherRect.right); let y6 = min(this.bottom, otherRect.bottom); if(x5 >= x6 || y5 >= y6) { destRect.left = 0 destRect.to...
[ "function overlap_rect(o1, o2, buf) {\n\t if (!o1 || !o2) return true;\n\t if (o1.x + o1.w < o2.x - buf || o1.y + o1.h < o2.y - buf || o1.x - buf > o2.x + o2.w || o1.y - buf > o2.y + o2.h) return false;\n\t return true;\n\t }", "function isRectTouching(pt1,sz1,pt2,sz2){\n\t//check if all 4...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Used to add points to grid points array to keep track of all the grid vertices(points) on artboard
function addPointsArrayToGridPointsArray(pointsArray){ for (var i = 0; i < pointsArray.length; i++) { gridPointsArray.push(pointsArray[i]); }; }
[ "addPoint() {\r\n var point;\r\n if(this.points.length < this.numpoints) {\r\n point = {};\r\n this.initPoint(point);\r\n this.points.push(point);\r\n }\r\n }", "function getGridPoints(number_of_rows, number_of_columns){\n var pointArray = [];\n var i = 0...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
return the number of prefix parts (separated by '/') matching the name eg prefixMatchLength('jquery/some/thing', 'jquery') > 1
function prefixMatchLength(name, prefix) { var prefixParts = prefix.split('/'); var nameParts = name.split('/'); if (prefixParts.length > nameParts.length) return 0; for (var i = 0; i < prefixParts.length; i++) if (nameParts[i] != prefixParts[i]) return 0; return prefixParts.leng...
[ "countPrefix(strPrefix) {\n const prefixes = this.getPrefix(strPrefix);\n\n return prefixes.length;\n }", "function isPrefix(sub,str) {\n return str.lastIndexOf(sub,0)===0;\n}", "function commonPathPrefix(paths) {\n /* prefixCommonness is a mapping whose keys are prefixes in the paths,\n * an...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Moves the current block to the left. If collision is detected restore it's old position.
moveCurrentBlockLeft(){ this.blocks.currentBlock.x--; if(this.checkCollision(this.blocks.currentBlock)){ this.blocks.currentBlock.x++; } this.updateGhostBlock(); }
[ "moveCurrentBlockRight(){\n this.blocks.currentBlock.x++;\n\n if(this.checkCollision(this.blocks.currentBlock)){\n this.blocks.currentBlock.x--;\n }\n\n this.updateGhostBlock();\n }", "function moveLeft() {\n //remove current shape, slide it over, if it collides t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Do not modify any statements in detailPaymentCalculation function //
function detailPaymentCalculation(mortAmount,mortDownPayment,mortRate,mortAmortization) { //********************************************************************************// //* This function calculates the monthly payment based on the following: *// //* ...
[ "calcNettoPayment() {\n if (elements.ageInputWork.checked) {\n this.calcTax();\n this.netAmount = this.payment - this.PIT;\n } else {\n this.netAmountUnderAge = this.payment;\n }\n }", "function update_payment() {\n var date = new Date();\n var now = date.getTime()/1000.0;\n var del...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Takes in 2 points + plunge and calculate the strike and dip from them
function calcStrikeDip(hmAz, hlAz, hmPl, hlPl) { //Set up the variables for calculation var l1Alpha, l1Beta, l1Gamma, l2Alpha, l2Beta, l2Gamma, theta; var dAlpha, dBeta, dGamma, hAlpha, hBeta, hGamma; var poleAzimuth, polePlunge; var strike, dip, quad, dipaz; //x,y,z linear 1 l1Alpha = (Math.sin(hmAz.toRadians(...
[ "function build2points() {\n points += (4 * b2multi);\n totalpoints += (4 * b2multi);\n }", "breshnamDrawLine (point0, point1) {\n let x0 = point0.x >> 0;\n let y0 = point0.y >> 0;\n let x1 = point1.x >> 0;\n let y1 = point1.y >> 0;\n let dx = Math.abs(x1 - x0);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add command lines args to the CurFuncObj PRE: CurFuncObj must be the Main (entry point) function
function addCommandLineArgs() { var fO = CurFuncObj; // Create and add a command line argument vector (similar to argv in C) // This is a reference to a grid (1D array of strings) // NOTE: No IndexObj is necessary for a grid in a header step // var newGId = fO.allGrids.length; var...
[ "function makeArgChanges() {\n //Only do the alterations if the arguments indicate a real or preview\n //run of the program will be executed.\n validateArgs();\n if (-1 !== aargsGiven.indexOf('-repo')) {\n oresult.srepo = PATH.normalize(oresult.srepo);\n if ('' === ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use the AWS::StepFunctions::StateMachine resource to create an AWS Step Functions state machine. Documentation:
function StateMachine(props) { return __assign({ Type: 'AWS::StepFunctions::StateMachine' }, props); }
[ "function stateMachineOreo_2() {\n //getting the second oreo dive element from the html document\n var Div_oreo_2 = document.getElementById(\"oreo2\");\n //setting the state table for the oreo description of states, input and\n //endstate\n var sampleDescription_oreo2 = {\n states: [\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This function aligns the puzzle pieces from left to right, top to bottom, in the correct order
function alignPieces () { var xValue = '0px'; //initialises the x coordinate to 0 px; used with setting the left value of each puzzle piece var yValue = '0px'; //initialises the y coordinate to 0 px; used with setting the top value of each puzzle piece for (var i = 0; i < puzzlePieces.length; i++) //itera...
[ "function movePieceLeft(playingArea, element, puzzlePieces){\n\n //Retrives the offset value of piece from the left margin\n var leftVal = parseInt(puzzlePieces[element - 1].style.left, 10);\n \n //Increases the distance from the margin by 100px\n puzzlePieces[element - 1].style.left = (leftVal - 100) + \"px\"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Downsamples the texture to a quarter resolution.
function DownSample4x (source : RenderTexture, dest : RenderTexture){ var off : float = 1.0f; Graphics.BlitMultiTap (source, dest, material, new Vector2(-off, -off), new Vector2(-off, off), new Vector2( off, off), ...
[ "renderbufferStorageMultisample(ctx, funcName, args) {\n const [target, samples, internalFormat, width, height] = args;\n updateRenderbuffer(target, samples, internalFormat, width, height);\n }", "setTextureUScale(u) {\n //TODO\n }", "reallocate(newSize){\n const gl = this.gl;\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
remove due by return
async function removeDueByReturn(req, res) { var returnId = req.body.id; var amountReceived = Number(req.body.amount); try { var dataAuth = await user.checkAsync(req, 1); if (!dataAuth) { res.send({ msg: 'not permitted', err: true }); return; } var upD...
[ "desencolar()\r\n {\r\n if(this.primero === this.final)\r\n {\r\n return null;\r\n } \r\n const info = this.elemento[this.primero];\r\n delete this.elemento[this.primero];\r\n this.primero++;\r\n return info;\r\n }", "function desaparecerRepetidos(){\n sustituirCero(obtenerRepeti...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Depending on if we are in the home path or not, setups up the Banner!
function setupBanLink() { var a = $(".banner a"); var link = a.attr("href"); a.removeAttr("href"); if (isPath(homePath)) { a.click(toggleBanner); } else { a.click(function() { animateLink(link, true); }); } }
[ "function initBanner() {\n\tif (!isPath(homePath) && !isPath(\"/\")) {\n\t\tsaveBanner();\n\n\t\t$banTit.css({top: $barTit.position().top, left: $barTit.position().left, \"font-size\": $barTit.css(\"font-size\")});\n\t\t$banSub.css({top: $barSub.position().top, left: $barSub.position().left, \"font-size\": $barSub....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check the maximun file than can be uploaded
function maxFilesLimit() { if (opt.uploadedFiles >= opt.maxfiles) { return true; } else { return false; } }
[ "function cs_check_file_size(files, max_upload_size){\r\n\t\r\n\tvar uploaded_files = files;\r\n\t\r\n\tvar invalid_file_sizes = 0;\r\n\t\r\n\tfor(var i = 0; i < uploaded_files.length; i++){\r\n\t\tif(uploaded_files[i].size > max_upload_size)\r\n\t\t\tinvalid_file_sizes++;\r\n\t}\r\n\t\r\n\treturn (invalid_file_siz...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
adds a new Snowboard to db.
async addNewSnowboard(req, res) { console.log("addNewSnowboard()") const newSnowboard = new Snowboard(req.body) var g_snowboardsCount = 100 const dbCount = await Snowboard.find({}).countDocuments() // returns the amount of snowboards in the collection g_snowboardsCount += ...
[ "function addBoard(board){\n const db = connection\n return connection('boards')\n .insert({board: board.newBoard})\n}", "Save()\n {\n\n // Check if the board is not alrady in the array of boards\n if(AppState.GetBoards().find(x => x.id == this.id) == undefined)\n {\n AppState.GetBoards().push...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
call get items on mount
componentDidMount(){ this.getItems() }
[ "componentDidMount() {\n this._isMounted = true;\n this.loadRecommendedItems();\n }", "componentDidMount() {\r\n ApplicationUtil.MyWorkListView = this;\r\n this.getList();\r\n this.getHomeBeanData();\r\n }", "componentWillMount() {\n this.fetchImages('cat');\n }", "function getA...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
ld XX, (nn) The contents of address (nn) are loaded to the loworder portion of register pair XX, and the contents of the next highest memory address (nn + 1) are loaded to the highorder portion of XX. XX can be dd(BC, DE, HL, SP), IX, or IY.
function ld_XX_ptrnn(xxIndex, nn, tCycles) { CPU.tCycles += tCycles; const dHigh = mem[nn + 1]; const dLow = mem[nn]; const ddValue = (dHigh << 8) | dLow; r16.set(xxIndex, ddValue); }
[ "ldReg(registerTo, registerFrom) {\n registerTo[0] = registerFrom[0];\n return 4;\n }", "function ld_SP_XX(xxIndex, tCycles) {\n CPU.tCycles += tCycles;\n r16.set(i16.SP, r16.get(xxIndex));\n}", "LDI(register, integerValue) {\n this.reg[register] = integerValue;\n }", "function DoubleLL() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function to delete a price alert
function deletePriceAlert(product) { //Search for the alert button try{ let alertBtn = Array.from(popover.querySelectorAll('.setAlert')).filter(alert => alert.getAttribute('id') === product.id)[0]; changeState(alertBtn); }catch{ //nothing } //Set price alert to false product.pr...
[ "function deleteExpense(id) {\n console.log(\"DELETE BUTTON WORKS\");\n }", "function deleteAlert() {\n swal({\n title: 'Are you sure?',\n text: 'Once deleted, you will not be able to recover this Task!',\n icon: 'warning',\n buttons: true,\n dangerMode: true,\n }).then((willDelete) => {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return a generator of all the element nodes inside a root node. Each iteration will return an `ElementEntry` tuple consisting of `[Element, Path]`. If the root node is an element it will be included in the iteration as well.
*elements(root) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; for (var [node, path] of Node$1.nodes(root, options)) { if (Element$1.isElement(node)) { yield [node, path]; } } }
[ "*ancestors(root, path) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n for (var p of Path.ancestors(path, options)) {\n var n = Node$1.ancestor(root, p);\n var entry = [n, p];\n yield entry;\n }\n }", "function flattenIterNodes(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
function for adding a trash can next to users stories, so that they can be deleted
function addTrashCan(story){ if(currentUser && currentUser.isUserStory(story)) return '<span><i class="fas fa-trash-alt"></i></span>'; else return '' }
[ "async function removeStoryfromOwnStoryPage(evt){\n const $storyId = $(evt.target).closest('li').attr('id');\n await storyList.removeStory(currentUser, $storyId);\n putOwnStoriesOnPage(currentUser);\n}", "function addTrashcanButton(el) {\n\tconst radius = 70;\n const left = el.position()['left'] + el.width(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Used to reset the state of each cursor value being used to iterate over mapbased styling bindings.
function resetSyncCursors() { for (var i = 0; i < MAP_CURSORS.length; i++) { MAP_CURSORS[i] = 1 /* ValuesStartPosition */; } }
[ "__refreshCursor() {\n var currentCursor = this.getStyle(\"cursor\");\n this.setStyle(\"cursor\", null, true);\n this.setStyle(\"cursor\", currentCursor, true);\n }", "function resetCursorPos(element) {\n element.selectionStart = 0;\n element.selectionEnd = 0;\n }", "function ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
FUNCTION NAME : createTitan AUTHOR : Mark Anthony Elbambo DATE : January 10, 2013 MODIFIED BY : REVISION DATE : REVISION : DESCRIPTION : sends xml file to create titan file PARAMETERS :
function createTitan(){ var fname = $("#saveConfFileName").val(); if(globalDeviceType=="Mobile"){ loading("show"); } var qry = '{"QUERY": [{"filename": "'+fname+'", "data": "'+getStringJSON(globalMAINCONFIG[pageCanvas])+'"}]}'; $.ajax({ url: getURL("ConfigEditorTopo", "JSON"), data : { "action": "convertx...
[ "function saveTitanToHome(fname,type){\n//\tvar titanSplt = titanVar.split(\"\\n\").join(\"^\");\n\tvar qry = '{\"QUERY\": [{\"filename\": \"'+fname+'\", \"user\": \"'+globalUserName+'\", \"titan\": \"'+titanVar+'\"}]}';\n\t$.ajax({\n\t\turl: getURL(\"RM\", \"JSON\"),\n\t\tdata : {\n\t\t\t\"action\": \"loadtitan\",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get All Data Types
getAllDataTypes (params) { return fetch.get('/dataType/getAllDataTypes', params) }
[ "getDataTypes(moduleType) {\n return this._resources.modules[moduleType];\n }", "function dataTypeSeer(array) {\n\tfor (var i = 0; i < array.length; i++) {\n\t\tconsole.log(typeof array[i]);\n\t};\n}", "function getDeviceTypes() {\n \n}", "getBaseTypes() {\r\n return this.getType().getBaseTypes(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reset the upload button
function reset_upload_button() { $('#modal-upload-file').modal('hide'); $('#modal-upload-file-button').button('reset'); }
[ "function resetImgForm() {\n $('#local-opt, #library-opt, #link-opt').removeClass('selected');\n $('#local-upload, #library-upload, #link-upload').addClass('hidden');\n}", "function cancelUploadedImg() {\n // Close Upload Box\n $(\"#uploadImgContainer\").removeClass('open-upload');\n\n $(\"#uploadI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
iterate through the iterable and add the value for that property name to the set
addToFromProp(prop, iterable) { for (let item of iterable) { this.add(item[prop]); } }
[ "add(...elements) {\n for (const element of elements) {\n if (this.set.indexOf(element) !== -1) {\n console.log(\"Element \" + element + \" already in set, skipping...\");\n } else {\n this.set.push(element);\n }\n }\n }", "eachSet(co...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Labels the blank nodes in the given value using the given UniqueNamer.
function _labelBlankNodes(namer, element) { if(_isArray(element)) { for(var i = 0; i < element.length; ++i) { element[i] = _labelBlankNodes(namer, element[i]); } } else if(_isList(element)) { element['@list'] = _labelBlankNodes(namer, element['@list']); } else if(_isObject(element)) { // ren...
[ "function buildLabels() {\n var shown = [];\n for (var n = 0; n < graphPath.nodes.length; n++) {\n // if type not placeholder, add to shown\n if (graphPath.nodes[n].type != \"placeholder\") {\n shown.push(graphPath.nodes[n].group);\n }\n }\n return shown;\n}", "static s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Update the cell value on the Datatables data and redraw
function refreshDatatableCellRedraw(input) { input = jQuery(input); var cell = input.closest("table.dataTable tr td"); var fieldDiv = input.closest("div[data-role='InputField']"); var table = input.closest('table.dataTable'); var dataTable = jQuery(table).dataTable(); var pos = dataTable.fnGetPo...
[ "function updateChartValue(){\r\n myChart.data.datasets[0].data[0] = sumNo;\r\n myChart.data.datasets[0].data[1] = sumYes;\r\n myChart.update()\r\n}", "onCellValueChanged(newValue) {\n if (this.state.data[newValue.key].expression !== newValue.expression) {\n let data = Object.assign({}, this.stat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
const isChecked=document.getElementById("switchValue").checked == true ? (document.querySelector("body").style.backgroundColor = "black") (document.querySelector(".secondbg").style.backgroundColor = "black") : (document.querySelector("body").style.backgroundColor = "white"); }
function changeBodyBg(){ const isChecked=document.getElementById("switchValue"); if (isChecked.checked) { (document.querySelector("body").style.backgroundColor = "black"); // (document.querySelector(".second-bg").style.backgroundColor = "black"); } else{ ...
[ "function ChangeColorYes() {\n document.getElementById(\"YesButton\").style.backgroundColor = \"green\"; \n document.getElementById(\"NoButton\").style.backgroundColor = \"white\"; \n}", "function validateSwitch() {\n const radioChecked = document.querySelector('input[name=\"amount\"]:checked');\n con...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
we do this to avoid relying on an ajax call to give us the new markup for the votes after the user votes, because it would be slower, so instead whenever the user votes, just pass the .singlePost object and the option index of the user's vote to this function and it will handle everything.
function showNewPostVotes(singlePostElement,userOptionIndex) { singlePostElement.find(".votesContainer").show(); var oldVotesNewNum = parseFloat(singlePostElement.find(".vote_holder .totalVotesNumber[data-user-vote='true']").attr("data-votes-number")) - 1; var newVotesNewNum = parseFloat(singlePostElement.find(".vo...
[ "function handleUserVote(id, is_up, update_element) {\n var button_id = (is_up ? \"upvote\" : \"downvote\") + id;\n if ($(\"#\" + button_id).hasClass(\"disabled\")) {\n return;\n }\n var cur_vote = parseInt($(\"#\"+update_element).html());\n database_update(vote_table, \"id = \" + id, is_up ? {upvotes: \"up...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Basic CRUD functions for notes / Wrapper method for chrome.storage.set(library) Updates the 'library' key value in chrome storage with the param value
function saveLib(){ chrome.storage.local.set({'library': raw_notes}, function(){ console.log("Library successfully saved."); }); }
[ "function setLibrary() {\n\tmyLibrary = JSON.parse(localStorage.getItem('library'));\n}", "function loadNotes(hash){\n\n console.log(\"Retrieving the current library...\");\n chrome.storage.local.get({'library': []}, function(lib){\n raw_notes = lib.library;\n\n /* If the user has no notes, cr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check that param is valid for productType.
function isOfValidProductType(key, type){ if (key === "productType"){ return true; } return params_schema[key][type]; }
[ "isValidType() {\n return Menu.getPizzaTypesSet().has(this.type.toLowerCase());\n }", "static checkParamsValidity (channel) {\n const { clientId, clientSecret, serviceId } = channel\n channel.phoneNumber = channel.phoneNumber.split(' ').join('')\n\n if (!clientId) { throw new BadRequestError('P...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Builds a json string representing the Digimon object
saveToJSON () { let digimonJSON = JSON.stringify(this); return digimonJSON; }
[ "function createJSON(){\t\n\tvar itemString = '';\n\tvar racersString = '';\n\tvar dateTime = document.getElementById(\"date\").value + \" \" + document.getElementById(\"time\").value;\n\t\n\tfor(var i=0; i<im.getSize(); i++){\n\t\tvar x = im.getElementAt(i);\n\t\tif(x.type == 1){\n\t\t\titemString+='{\"location\":...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
end function cev() Cholesky decomposition
function cdc() { let i = undefined ; let j = undefined ; let k = undefined ; let s = undefined ; let vi = undefined ; for( i = 0 ; i < this.nr ; i++ ) for( j = 0 ; j <= i ; ++j ) { for( s = k = 0 ; k < j ; s += (this.v[ this.idx( i , k ) ] * this.v[ this.idx( j , k++ ) ]) ) ; ...
[ "function LUDecomp(k) {\n\t\t// Assuming k is square matrix in Yale format\n\t\t// k = [A,IA,JA]\n\t\t// U =k;\n\t\tvar N = k[1].length-1;\n\t\t/**var U_A = k[0];\n\t\tvar U_IA = k[1];\n\t\tvar U_JA = k[2];**/\n\t\tvar upper = k;\n\t\t//alert(\"N = \"+N);\n\t\t//set first 1 in place\n\t\tvar L_A = new Array();\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Internal Methods Calculate totals for each record from a record response and categorize them by scope
function initializeRecords(responseRecords) { for(var i in responseRecords) { var record = responseRecords[i]; recordUtils.calculateDailyTotals(record); record.totals = recordUtils.getRecordTotals(record); if (record.scope === "E") { $scope.recor...
[ "function addToAnnualTotals(record) {\n for(var field in record.totals) {\n if (record.totals.hasOwnProperty(field)) {\n if (!$scope.annualTotals.hasOwnProperty(field)) {\n $scope.annualTotals[field] = 0;\n }\n $scope.annualTotals[fie...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Notifies all drain listeners which are at a priority > highWaterMark. Returns whether or not any drain listeners were notified. This function sets pumpingPriority and reads highWaterMark. Note that it may call into user code which may call back into the scheduler.
function notifyDrainListeners() { var notifiedSomebody = false; if (!!drainQueue.length) { // As we exhaust priority levels, notify the appropriate drain listeners. // var drainPriority = currentDrainPriority(); while (+drainPriority === drainPriority && d...
[ "function forEachPriorityBoundaryLimited(callback) {\n if (S._usingWwaScheduler) {\n return callback(S.Priority.aboveNormal + 1, MSApp.HIGH);\n } else {\n return forEachPriorityBoundary(callback);\n }\n }", "writeReady() {\n return !this.highWater;\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get New Mail When Offline Prompts the user about going online in order to download new messages. Based on the response, will move us back to online mode.
getNewMail() { let goOnline = Services.prompt.confirm( window, this.offlineBundle.GetStringFromName("getMessagesOfflineWindowTitle1"), this.offlineBundle.GetStringFromName("getMessagesOfflineLabel1") ); if (goOnline) { this.offlineManager.goOnline( this.shouldSendUnsentMessa...
[ "toggleOfflineStatus() {\n // the offline manager(goOnline and synchronizeForOffline) actually does the dirty work of\n // changing the offline state with the networking service.\n if (!this.isOnline()) {\n // We do the go online stuff in our listener for the online state change.\n Services.io.of...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create the QR according to invoice data
updateInvoiceQR() { // Clean input address this.invoiceData.data.addr = this.invoiceData.data.addr.toUpperCase().replace(/-/g, ''); this.invoiceString = JSON.stringify(this.invoiceData); // Generate the QR this.generateQRCode(this.invoiceString); }
[ "function changeQRCode(objNo){\n\tvar qrText = allDishes[objNo].categoryName + \"#\" + \n\t\tallDishes[objNo].dishName + \"#\" + allDishes[objNo].price;\n\tfor(var i = 0 ; i < allDishes[objNo].ingredients.length ; i++){\n\t\tif(i ==0){\n\t\t\tqrText += \"->\";\n\t\t}\n\t\tqrText += allDishes[objNo].ingredients[i];\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the minimum value in a Series
min() { const values = this.$checkAndCleanValues(this.values, "min"); let smallestValue = values[0]; for (let i = 0; i < values.length; i++) { smallestValue = smallestValue < values[i] ? smallestValue : values[i]; } return smallestValue; }
[ "minimum(other) {\n if (this.dtypes[0] == \"string\") ErrorThrower.throwStringDtypeOperationError(\"maximum\");\n\n const newData = _genericMathOp({ ndFrame: this, other, operation: \"minimum\" });\n return new Series(newData, {\n columns: this.columns,\n index: this.index\n });\n }", "func...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Helper method to add new templates
function addTemplate(name, fn) { templates[name] = fn; }
[ "function templateAddCb(e) {\n e.preventDefault();\n var $template = $(this).closest('.template');\n var $parent = $(this).parent();\n var parentId = $template.attr('id');\n createTemplateRecordFromForm($parent, parentId);\n }", "function loadTemplates(){\n for(let name of...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
END click new oil /rowprotect dvs
function ClickProtectDVS(celector) { $(".protect-label").removeClass("label-txt-selected"); $(".row-protectDVS").removeClass("disable-item"); $(".row-protectDVS").addClass("disable-item"); celector.removeClass("disable-item"); celector.find("label").addClass("label-txt-selected"); celector.find(...
[ "function C006_Isolation_Yuki_Click() {\t\n\tClickInteraction(C006_Isolation_Yuki_CurrentStage);\n}", "function cmdUpdateReceived_ClickCase100() {\n console.log(\"cmdUpdateReceived_ClickCase100\");\n //fetch WO summary\n GenerateWOSummary();\n //fetch WO summary - scrap...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Invoked when the underlying inner collection changes.
handleInnerCollectionChanges(collection, changes) { // guard against source expressions that have observable side-effects that could // cause an infinite loop- eg a value converter that mutates the source array. if (this.ignoreMutation) { return; } this.ignoreMutation = true; let newItems ...
[ "itemsChanged() {\n this._processItems();\n }", "_observeEntries() {\n this.items.forEach((item) => {\n item.elementsList.forEach((element) => {\n this.observer.observe(element);\n });\n });\n }", "function notifyObservers() {\n _.each(views, function (aView) {\n aView.u...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Start both the http and https services. Requests can only come from localhost, for security. (This can be changed to a specific computer, but shouldn't be removed, otherwise the site becomes public.)
function start() { test(); var httpService = http.createServer(serve); httpService.listen(ports[0], '0.0.0.0'); var options = { key: key, cert: cert }; var httpsService = https.createServer(options, serve); httpsService.listen(ports[1], '0.0.0.0'); var clients = clientS...
[ "function start()\n{\n if(!checkSite()) return;\n types = defineTypes();\n banned = [];\n banUpperCase(\"./public/\", \"\");\n var service = https.createServer(options, authenticate);\n\n/*\nservice.listen(PORT, () => {\n console.log(\"Our app is running on port \"+PORT);\n});\n*/\n\n service.listen(PORT);...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use the JSON parse to clone the data.
function cloneData(data) { // Convert the data into a string first var jsonString = JSON.stringify(data); // Parse the string to create a new instance of the data return JSON.parse(jsonString); }
[ "cloneListing() {\n const clone = this.clone();\n clone.unset('slug');\n clone.unset('hash');\n clone.guid = this.guid;\n clone.lastSyncedAttrs = {};\n return clone;\n }", "function deepClone(array) {\n return JSON.parse(JSON.stringify(array));\n}", "function clean_clone(obj) {\n const ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets city info. The response includes top restaurants. Was thinking we can loop through that array and return anything with a price rating of 2 or lower to display in our results
function getRestaurantInfo(cityID){ var zomatoURL = "https://developers.zomato.com/api/v2.1/location_details?entity_id=" + cityID + "&entity_type=city" var settingsZomatoLocationDetails = { async: true, crossDomain: true, url: zomatoURL, beforeSend: function(xhr) { ...
[ "async getCities(country) {\n // get yesterday's date\n const offset = new Date().getTimezoneOffset() * 60000;\n const yesterday = new Date(Date.now() - 86400000 - offset)\n .toISOString()\n .slice(0, -5);\n\n // complete request\n const query = `?country=${country}&parameter=pm25&date_from...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
draw function helper endPosition stops drawing
function endPosition(){ painting = false; c.beginPath(); }
[ "function LetterB_drawEndPoint() {\n\talert(\"letterB: draw end point\");\n\n\tdrawEndPoint(this, 0, 0);\n}", "function draw_s() {\n ctx.beginPath()\n canvas_arrow(ctx, passthroughCoords.x - 2, passthroughCoords.y - 2, refractedCoords.x + 2, refractedCoords.y + 2)\n ctx.stroke()\n }", "f...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Opens user config window.
function showConfigUser() { document.getElementById('sel_editor_font_size').value = v_editor_font_size; document.getElementById('sel_editor_theme').value = v_theme_id; document.getElementById('txt_confirm_new_pwd').value = ''; document.getElementById('txt_new_pwd').value = ''; $('#div_config_user').show(); }
[ "function userPreferences(){\r\n var user_id = $(\"#user_id\").val(); \r\n preferences = getDefaultWindow(\"user_preferences\",500,350);\r\n preferences.setText(\"Gurski [User Preferences]\");\r\n preferences.progressOn();\r\n preferences.center();\r\n preferences.attachURL(\"../src/Linker.class....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Resume the socket stream
resume () { if (this.readyState !== WebSocket.OPEN) throw new Error('not opened'); this._socket.resume(); }
[ "function receivePlayerRestart() {\n\tsocket.on('player restart', function(_) {\n\t console.log('player restart');\n\t restore();\n\t});\n }", "resume() {\n this.paused_ = false;\n this.resetAutoAdvance_();\n }", "function FreshResume() {\n\n }", "resend() {\n this.streamStatus = 'initiali...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
callback will be call for each issues
function get_issues(issue_callback, end_callback) { _get_issues(0, 0, issue_callback, end_callback); }
[ "function process_issue(issue, cb) {\n const dbKey = feed.id + ':created:' + issue.id;\n\n db.get(dbKey, (err, created) => {\n if (err && err.notFound) created = cutoff;\n else if (err) return cb(err);\n\n // Process issue histories and comments\n function process_contents() {\n pro...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TWEET PROCESSING // ///////////////////////////////////////////////////////// converts a list of tweets into usable source text
function createSourceText(tweets) { if (!tweets) return ''; return _.pluck(tweets, 'text') .map(tweet => { if (tweet.charAt(0) == '"') return ''; return tweet .replace('&amp;', '&') .replace('.@', '@') .replace(/https?:\/\/t.co\/\w+/g, '') .replace(/[\s]+/g, '...
[ "function parseTweets(runkeeper_tweets) {\n\t//Do not proceed if no tweets loaded\n\tif(runkeeper_tweets === undefined) {\n\t\twindow.alert('No tweets returned');\n\t\treturn;\n\t}\n\n\ttweet_array = runkeeper_tweets.map(function(tweet) {\n\t\treturn new Tweet(tweet.text, tweet.created_at);\n\t});\n\t\n\twritten_tw...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieve the current `DirectiveDef` which is active when `hostBindings` style instruction is being executed (or `null` if we are in `template`.)
function getHostDirectiveDef(tData) { var currentDirectiveIndex = getCurrentDirectiveIndex(); return currentDirectiveIndex === -1 ? null : tData[currentDirectiveIndex]; }
[ "function getTemplateDirective(){\r\n\t\tconsole.log(\"getTemplateDirective fired!\")\r\n\t\tvar ddo = {\r\n\t\t\ttemplateURL: \"views/static/listItem.html\"\r\n\t\t};\r\n\t\treturn ddo;\r\n\t}", "getTemplateClassDeclFromNode(currentToken) {\n // Verify we are in a 'template' property assignment, in an obj...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
OBS development Charge the discrepancy to customer
function chargeCustomer(priceList, discrepancyRecord){ return new promise(function(fulfill,reject) { //trace.info('chargeCustomer >>>>>'+priceList.length); var vpaParams = {}; var reconObj = {} vpaParams.type = 'reconcile'; for(var h=0; h<priceList.length; h++ ){ if ( priceList[h].pricereferenc...
[ "function calculateDistributorCommission()\n{\n\n\ttry\n\t{\n\t\t// work out the distributor commission\n\t\tdistComm = lookupDistributorCommissionRate();\n\n\t\t// version 1.0.2 , version 1.0.3\n\t\tif(voucherTypeName != 'Physical Voucher')\n\t\t{\n\t\t\tdistribCommission = parseFloat(distComm)/100;\n\t\t\tcomTota...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Write a function called listSongDetails which takes in an array of songs and console.logs details about each one. The details should be in the following example format: "Smooth, by Santana featuring Rob Thomas (4:00)".
function listSongDetails(songs) { songs.forEach(song => console.log(`${song.name}, by ${song.artist} (${song.duration})`)); }
[ "function listSongDetails(arr){\n\tarr.forEach(function(val){\n\t\tconsole.log(val.name + \", \" + val.artist + \" (\" + val.duration + \")\" )\t\n\t});\n}", "function getSongInfo(songTitle) {\n\n // Calls Spotify API to retrieve a track.\n spotify.search({ type: 'track', query: songTitle }, function (err, ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Swap given tile with an exposed joker Input hand tile (contained in hand, known to match an exposed pong/kong/quint with joker) Output replace tile with joker in hand exposed pong/kong/quint replace joker with tile
exchangeJoker(currPlayer, hand, swapTile) { outerLoop: for (let i = 0; i < 4; i++) { for (const tileset of this.players[i].hand.exposedTileSetArray) { // Find unique tile in pong/kong/quint (i.e. non-joker) let uniqueTile = null; for (const ti...
[ "exchangeUserSelectedTileForExposedJoker() {\n\n // Get user's selected tile (also reset's selection of any tiles in hiddenTileArray)\n const selectedTile = this.players[PLAYER.BOTTOM].hand.removeDiscard();\n const text = selectedTile.getText();\n printMessage(\"Player 0 exchanged \" + t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }