query
stringlengths
9
34k
document
stringlengths
8
5.39M
negatives
listlengths
19
20
metadata
dict
Click on the news & video tab
clickNewsVideoTab(){ this.newsVideoTab.waitForExist(); this.newsVideoTab.click(); }
[ "open_newsHub_NewsVideoTab(){\n this.newsHub_NewsVideoTab.waitForExist();\n this.newsHub_NewsVideoTab.click();\n }", "click_newsVideoTab_1stVideo(){\n this.newsVideoTab_1stVideo.waitForExist();\n this.newsVideoTab_1stVideo.click();\n }", "open_newsHub_FeatureVideosTab(){\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Converts the given Uint8Array into a Buffer. Attempts to be zerocopy.
function uint8Array2Buffer(u8) { if (u8 instanceof Buffer) { return u8; } else if (u8.byteOffset === 0 && u8.byteLength === u8.buffer.byteLength) { return arrayBuffer2Buffer(u8.buffer); } else { return Buffer.from(u8.buffer, u8.byteOffset, u8.byteLength); } }
[ "function uint8Array2Buffer(u8) {\n if (u8 instanceof Buffer) {\n return u8;\n }\n else if (u8.byteOffset === 0 && u8.byteLength === u8.buffer.byteLength) {\n return arrayBuffer2Buffer(u8.buffer);\n }\n else {\n return Buffer.from(u8.buffer, u8.byt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Detect attached gamepads, or wait for some to show up
function detectOrWait() { var gamepads = navigator.getGamepads(); var detected = false; for (var i = 0; i < gamepads.length; i++) { if (gamepads[i]) { createPad(gamepads[i]); detected = true; } } if (detected) { eid('gamepads').className = ''; runAnim(true); } else { eid('no-gamepa...
[ "function pollGamepads() {\n var gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads : []);\n for (var i = 0; i < gamepads.length; i++) {\n var gp = gamepads[i];\n if (gp) {\n manageGamepadInput();\n clearI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
sortPopularity function same as above but sorted by .... popularity
sortPopularity() { const { contacts } = this.state; const sortedPopularity = [...contacts]; sortedPopularity.sort((a, b) => (a.popularity < b.popularity ? 1 : -1)); this.setState({ contacts: sortedPopularity }); }
[ "function sortByPopularity () {\r\n mediasForId.sort( function(a,b) {\r\n \r\n if (a.likes < b.likes) {\r\n return 1; // a after b\r\n \r\n } else if (a.likes > b.likes) {\r\n return -1; // b after a\r\n\r\n } else {\r\n\r\n // when same likes: ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Write a fdstat structure.
setFdstat(byteOffset, value, littleEndian = false) { /* * typedef struct __wasi_fdstat_t { * __wasi_filetype_t fs_filetype; u8 * <pad> u8 * __wasi_fdflags_t fs_flags; u16 * <pad> u32 * __was...
[ "fstat(fd, cb = nopCb) {\n const newCb = wrapCb(cb, 2);\n try {\n const file = this.fd2file(fd);\n file.stat(newCb);\n }\n catch (e) {\n newCb(e);\n }\n }", "function write(fd, buf) {\n return libsys.sysc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Charge the batterylvl if the charge is connected!
charging(){ if(this.charge === true){ if(this.intervaldisCharging !== 0) { window.clearInterval(this.intervaldisCharging); } this.intervalCharging = window.setInterval(()=>{ this.batteryLvl = this.batteryLvl + 1; }, 1000); } }
[ "function onBatteryStatus(info) {\n \n if (info.isPlugged) {\n msgPlugged = 'en charge';\n }\n else {\n msgPlugged = 'sur batterie';\n };\n \n niveauCharge = info.level;\n }", "function onBatteryLevelChange() {\n if (!enabled || !...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Transfers data from the getJSON methods and assigns them to a streamer object and subsequently pushes each streamer object to the streamInfoArr array. This function also calls the createDiv method.
function transferData(display_name, bio, logo, link, isStreaming) { var streamer = { display_name: "", bio: "", logo: "", links: { self: "" }, isStreaming: "" }; streamer.display_name = display_name; streamer.bio = bio; streamer.logo = logo...
[ "function getData(){\n var dataArr = [];\n for(i=0;i<streamArr.length;i++){\n var urlId = \"https://wind-bow.gomix.me/twitch-api/streams/\"+streamArr[i]+'?callback=?';\n dataArr.push(urlId);\n console.log(dataArr+i);\n $.getJSON(dataArr[i], function(data){\n console.log(data);\n var streamer...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a texture from an ndarray
function createTextureArray(gl, array) { var dtype = array.dtype || ndarray.dtype(array) var shape = array.shape var packed = isPacked(array) var type = 0 if(dtype === "float32") { type = gl.FLOAT } else if(dtype === "float64") { type = gl.FLOAT packed = false dtype = "float32" } else if(d...
[ "function createTextureArray(gl, array) {\n var dtype = array.dtype\n var shape = array.shape.slice()\n var maxSize = gl.getParameter(gl.MAX_TEXTURE_SIZE)\n if(shape[0] < 0 || shape[0] > maxSize || shape[1] < 0 || shape[1] > maxSize) {\n throw new Error(\"gl-texture2d: Invalid texture size\")\n }\n\n var p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Recursive function used to populate a list of tweets in batches, using the Twitter REST API. Necessary because of 100 tweet limit for every API call.
function getTweetBatch(c, procQuery, tweets, sendBack) { //get the lowest ID in the last batch const lowestId = lowestID(tweets); //Infinity if empty //generate search parameters const params = { q: procQuery, lang: 'en', count: 100, max_id: lowestId }; //ask the Twitter API for a list of tweets ...
[ "loopTweets() {\n this.tweets = [];\n\n // Loop through all the tweet elements\n let count = this.getTweetCountToReturn(this.alltweets);\n for (let i = 0; i < count; i++) {\n let el = this.alltweets[i];\n\n // Generate the tweet object\n let tweetobject = {\n id: this.getTweetID(el...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Fetches weather reports between 2 dates.
function getWeatherReports({ startDate = new Date(), endDate = new Date() } = {}) { return fetch(`/api/weather?${qs.stringify({ startDate, endDate })}`) .then(res => res.json()); }
[ "static getData() {\r\n return getWeatherReports({\r\n startDate: new Date(new Date().setDate(new Date().getDate() - 7)),\r\n endDate: new Date()\r\n });\r\n }", "function getDataBetweenTwoDates(startDate, endDate, callback) {\n mongoClient.connect(url, { useNewUrlParser: true }, function(\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
7) Find the number of different no pay hours
function noPayHoursCounter() { var uniqueHours = ["Generic Name"]; for (var i = 0; i < dataArray.length; i++) { for (var j = 0; j < uniqueHours.length; j++) { if (uniqueHours[j] == dataArray[i].properties.PARK_NO_PAY) { break; } if (j == uniqueHours....
[ "function payHoursCounter() {\n\n var uniqueHours = [\"Generic Name\"];\n\n for (var i = 0; i < dataArray.length; i++) {\n for (var j = 0; j < uniqueHours.length; j++) {\n if (uniqueHours[j] == dataArray[i].properties.PAY_POLICY) {\n break;\n }\n if (j ==...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
||||||||||||||||||||||||| |||| DOM Manipulation ||||| ||||||||||||||||||||||||| given a query selector string, it checks to see if the selector is an id and if so it uses a different method to selcet that element The Good: Apparently using a getElementById is faster than just querySelectorAll The Bad : The output of th...
function vanillaQuerySelection(selector) { var selectorType = 'querySelectorAll'; //will return a nodelist //check to see if we are checking an id if (selector.indexOf('#') === 0) { selectorType = 'getElementById';//will return an element selector = selector.substr(1, selector.length); }...
[ "function selectHtmlElementById(id) {\n return document.querySelector(`#${id}`);\n}", "function cssQuery(selectorString, contextElement) {\n\n var selector = selectorString.trim();\n var context = contextElement || document;\n\n var simpleQuery;\n if ((simpleQuery = rSimpleQuery.exec(selector)) !==...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
sequence(m, a) Sequences an array, `a`, of values belonging to the `m` monad: bilby.sequence(Array, [ [1, 2], [3], [4, 5] ]) == [ [1, 3, 4], [1, 3, 5], [2, 3, 4], [2, 3, 5] ]
function sequence(m, a) { var env = this; if(!a.length) return env.pure(m, []); return env.flatMap(a[0], function(x) { return env.flatMap(env.sequence(m, a.slice(1)), function(y) { return env.pure(m, [x].concat(y)); }); }); ...
[ "function sequence(m, a) {\n var env = this;\n\n if(!a.length)\n return env.pure(m, []);\n\n return env.flatMap(a[0], function(x) {\n return env.flatMap(env.sequence(m, a.slice(1)), function(y) {\n return env.pure(m, [x].concat(y));\n });\n });\n}", "function additionSe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get a list of coauthors and their associated articles or publications. parameter: gsid Author's Google Scholar ID return: Nested object with coauthor gsid as key and a list of publication ids as the
function getCoAuthors(gsid) { var publist = getPubList(gsid); var pubid_authors = d3.nest() .key(function (d) { return d.pubid; }) .rollup(function (d) { var authidlist = []; d.forEach(element => { authidlist.push(element.gsid); }); return authidlist; }) .entries(gAuth_pub_uni...
[ "function getPubList(gsid) {\n\t\tvar authors_pubid = d3.nest()\n\t\t\t.key(function (d) { return d.gsid; })\n\t\t\t.rollup(function (d) {\n\t\t\t\tvar pubidlist = [];\n\t\t\t\td.forEach(element => {\n\t\t\t\t\tpubidlist.push(element.pubid);\n\t\t\t\t});\n\t\t\t\treturn pubidlist;\n\t\t\t})\n\t\t\t.entries(gAuth_pu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Assigning labelNames for the types of car for each scenario we have (using a switch statement)
function labelNames(units) { switch (units) { case 'Car/ Light Van': return {Type: "Car/ Light Van" ,distance: "Miles", mileage: "CO2 used", cost: "Cost", evcost: "Cost"}; case 'Medium Van': return {Type: "Medium Van", distance: "Miles", mileage: "CO2 used", cost: "Cost", evcost: "Cost"}; ...
[ "function getLabelTypeDescription(labelTypeId) {\n let description = \"\";\n switch(labelTypeId) {\n //if curb ramp\n case 1:\n description = \"A curb ramp is a short ramp that cuts through or builds up to a curb.\" +\n \" An accessible curb ramp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
SET ADDRESS FIELDS READ ONLY ATTRIBUTE
function setAddressFieldsReadOnlyStates(isReadOnly) { //$('#name').attr("readonly", isReadOnly); -- This object is not in the page $('#MailingAddress_PostalCode').attr("readonly", isReadOnly); $('#AddressField').attr("readonly", isReadOnly); $('#AddressField1').attr("readonly", isReadOnly); $('#...
[ "function setAddressRelatedFieldValues(record){\r\n record.setFieldValue('billaddresslist', record.getFieldValue('billaddresslist') || '');\r\n record.setFieldValue('billaddress', record.getFieldValue('billaddress') || '');\r\n record.setFieldValue('shipaddresslist', record.getFieldValue('shipaddresslist')...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
fetches the list of companies from the API
function fetchCompanies() { fetch(companiesAPI) .then(response => response.json()) .then(data => { storeDataIntoList(data); outputCompanyList(data); }) .catch((error) => { console.log(error); }); }
[ "getCompanyList() {\n const url = `${this.companyAPIUrl}`;\n return this.httpClient.get(url);\n }", "static async getCompanies() {\n let res = await this.request('companies');\n return res.companies\n }", "static getCompanies() {\n return fetch(`${baseUrl}/api/companies`, {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
We can connection two Neurons
connect(a, b) { let c = new Connection(a, b, random(1)); a.addConnection(c); }
[ "makeConnections() {\n for (let i = 0; i < this.inputNodes.length; i++) {\n this.localScope.Input[i]?.output1.connectWireLess(\n this.inputNodes[i]\n );\n this.localScope.Input[i].output1.subcircuitOverride = true;\n }\n\n for (let i = 0; i < this...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds childtree as the first child of subtree.
function addChildTree(subtree, childtree){ subtree.children.push(childtree); childtree.parent = subtree; }
[ "addChild(child) {\n if (this.children == null)\n this.children = [];\n let childIndex = this.children.findIndex((value, index, object) => {\n return (value.id == child.id);\n });\n if (childIndex == -1)\n this.children.push(child);\n else\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Switch to result mode.
function switchResult() { switchResultRender(); renderScore(scoreGame()); current_mode = "result"; }
[ "set result(value) {\n this._result = value;\n }", "function setResult(res) {\n if (res) {\n result = res;\n } else\n {\n result = null;\n }\n }", "goResults() {\n this.state = Game.GAME_STATES.result;\n this.mainScreen.hide();\n }", "function switchRecall() {\n switchRecall...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns [instruction, comment, error, label], where: instruction is a PuzzleCodeInstruction and comment is a string instruction is set to null if there was an error compiling the instruction, or if the line is a noop label is a string or null comment is a DOM node, or null error is true iff there was an error compiling...
function compileLine(line, lineIndex, labels) { tokens = tokenize(line) tokens = removeComment(tokens) tokensLabel = removeLabel(tokens) tokens = tokensLabel[0] label = tokensLabel[1] if (label != null) { if (!isValidLabel(label)) { var abbrevLabel = label.substr(0, 20) comment = newErro...
[ "function parseInstructionLine() {\n parseLabels();\n if (!isEndOfLine()) {\n return parseInstruction();\n } else {\n return undefined;\n }\n }", "parseInstructions() {\n this.inst = [];\n for (var i = 0; i < this.rawInst.length; i++) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Submits a gateway_balances request to the rippled WebSocket API.
async getGatewayBalances(account, addressesToExclude) { const gatewayBalancesRequest = { id: `${rippled_web_socket_schema_1.RippledMethod.gatewayBalances}_${account}_${this.idNumber}`, command: rippled_web_socket_schema_1.RippledMethod.gatewayBalances, account, st...
[ "balance() {\n this.log('balance')\n\n if (this.balanceId != null) {\n clearTimeout(this.balanceId)\n this.balanceId = null\n }\n\n const max = this.maxConnectionsRdy()\n const perConnectionMax = Math.floor(max / this.connections.length)\n\n // Low RDY and try conditions\n if (perConn...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
checkUSPhone (TEXTFIELD theField [, BOOLEAN emptyOK==false]) Check that string theField.value is a valid US Phone. For explanation of optional argument emptyOK, see comments of function isInteger.
function checkUSPhone (theField, emptyOK) { if (checkUSPhone.arguments.length == 1) emptyOK = defaultEmptyOK; if ((emptyOK == true) && (isEmpty(theField.value))) return true; else { var normalizedPhone = stripCharsInBag(theField.value, phoneNumberDelimiters) if (!isUSPhoneNumber(normalizedPho...
[ "function checkInternationalPhone (theField, emptyOK)\r\n{ if (checkInternationalPhone.arguments.length == 1) emptyOK = defaultEmptyOK;\r\n if ((emptyOK == true) && (isEmpty(theField.value))) return true;\r\n else\r\n { if (!isInternationalPhoneNumber(theField.value, false))\r\n return warnInva...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
AJAX GET request function for recieving the project/style information to be displayed:
function getProjectInfo(){ let projectRequest = new XMLHttpRequest(); projectRequest.open('GET', './data.json'); projectRequest.onload = function() { let projectData = JSON.parse(projectRequest.responseText); //Gets and uses project information from JSON array: document.querySelector('#proje...
[ "function getProjects() {\n $.get(\"/api/projects\", function(data) {\n projects = data;\n displayProj(projects);\n });\n }", "function load_project_ajax(){\r\n var resourceName = get_resource_name();\r\n var urlParts = resourceName.split(\"/\");\r\n\r\n $(\"#all-projects #loading-projec...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds a tab group container.
_addGroupContainer(label, labelSize) { const that = this, groupContainer = document.createElement('div'), labelTextWrapper = document.createElement('div'), labelTextContainer = document.createElement('div'), arrow = document.createElement('div'), dropD...
[ "_addGroupContainer(label, labelSize) {\n const that = this,\n groupContainer = document.createElement('div'),\n labelTextWrapper = document.createElement('div'),\n labelTextContainer = document.createElement('div'),\n arrow = document.createElement('div'),\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Remove bill info elements from screen
function cleanBillInfo() { billTextDiv.select(".billText").remove(); billInfoDiv.selectAll(".BillInfo").remove(); assignment.style("display", "none"); assignment.select("#submit") .on("click", null); }
[ "function RemoveDetailsFromProductInfoPage() {\n $('#infoName').empty();\n $('#lblCategory').empty();\n $('#lblproductID').empty();\n $('#lblProductDescription').empty();\n $('#productInfoTB > tbody').empty();\n $('#qrcodePrint').empty();\n}", "function removeElements() {\n $j('#canvas_panel>*,...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Parsing glyph map data
function glyphMapping() { return new CSV(fsj.read("./data/charMapping.csv"), { header: true }).parse(); }
[ "function mapGlyphs(glyph) {\n return {\n name: glyph.name,\n codepoint: glyph.unicode[0].charCodeAt(0)\n };\n}", "function mapGlyphs(glyph) {\n return {\n name: glyph.name,\n codepoint: glyph.unicode[0].charCodeAt(0)\n }\n}", "function mapGlyphs (glyph) {\n return { name: glyph.nam...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the 5 most recently published posts, sorted by date published. Returns: Array of Post objects.
function recent_posts() { return app.getObjects('Post', {published:true}, {sort:{'date':'desc'}, maxlength:5}); }
[ "function getPosts() {\n return Posts.find({},{sort: {timestamp : -1}}).fetch();\n}", "async getRecentPosts () {\n\t\tif (this.teamData.posts) {\n\t\t\treturn;\n\t\t}\n\t\tthis.teamData.posts = await this.data.posts.getByQuery(\n\t\t\t{\n\t\t\t\tteamId: this.teamData.team.id,\n\t\t\t\tdeactivated: false\n\t\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Recreate the array of identities for a given account.
function recreateIdentities(universe, accountId, oldIdentities) { var identities = []; for (var iter in Iterator(oldIdentities)) { var oldIdentity = iter[1]; identities.push({ id: accountId + '/' + $a64.encodeInt(universe.config.nextIdentityNum++), name: oldIdentity.name, address: oldIdent...
[ "function recreateIdentities(universe, accountId, oldIdentities) {\n let identities = [];\n for (let [,oldIdentity] in Iterator(oldIdentities)) {\n identities.push({\n id: accountId + '/' + $a64.encodeInt(universe.config.nextIdentityNum++),\n name: oldIdentity.name,\n address: oldIdentity.addres...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test Existing ExtJS GUI (when logged in)
function existing_extjs_gui(err, res, body) { frisby.create('Existing ExtJS GUI') .addHeader('Cookie', session_cookie) // Pass session cookie with each request .get(url + '/api/build?catalogName=dbo.Empleado&ouput=extjs') .expectStatus(200) .expectHeaderContains('content-type', 'application/json') .expec...
[ "function test() {\n loadURL(marketplace + \"/en-US/login\", function() {\n BrowserID.getAssertionWithLogin(gotassertion, {}, gBrowser.contentWindow);\n // Wait a couple of seconds for the BrowserID popup to appear.\n setTimeout(signin, 2000);\n });\n waitForExplicitFinish();\n}", "function loginContr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
info: makes vendor object
function makeVendorObject ( object ) { var vendorObject = { address: shorter( object[config.keys.address] ), city: shorter( object[config.keys.city] ), dateStatusChanged: shorter( object[config.keys.dateStatusChanged] ), department: shorter( object[config.keys.department] ), email: shorter( obje...
[ "vendorForKey(vendorKey) {\n const vendor = this.allVendors[vendorKey];\n return vendor || { key: vendorKey, name: 'Unknown', short: '???' };\n }", "insertVendor(vendor) {\n return this.vendors.create(vendor);\n }", "makeDevice(vendorId, productId) {\n let guidValue = ++this.nextGuidValue_;\n l...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Actualizar el fragmento en el calendario
function realizarCambioHora() { var startTime = horaInicioTP.value(); var endTime = horaFinTP.value(); if (startTime && endTime) { startTime = new Date(startTime); endTime = new Date(endTime); topInicial = parseInt($(fragmentoActual).css("top")); var alto = parseInt($(fragmen...
[ "function agregarFragmento(fragmento) {\n fragmento.Desde = new Date(parseInt(fragmento.Desde.replace(\"/Date(\", \"\").replace(\")/\", \"\"), 10));\n fragmento.Hasta = new Date(parseInt(fragmento.Hasta.replace(\"/Date(\", \"\").replace(\")/\", \"\"), 10));\n var startTime = fragmento.Desde;\n var endTi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Format a message for making him less than 140 characters and add the mention
function formatMessage(username, message) { message = "@" + username + " " + message; return (message.length <= 140) ? message : (message.substring(0,137) + "..."); }
[ "function formatMessageMentions(text) {\n if (text === null || typeof text === 'undefined') {\n return '';\n }\n\n let formattedText = text;\n // find user mentions\n const userMentions = text.match(/<@U[a-zA-Z0-9]+>/g);\n if (userMentions !== null) {\n userMentions\n .map(match => match.substr(2, ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the position of the touch event and converts it to the direction, which than gets passed to player.handleInput for processing
function handleTouch(e) { var touch = { x: e.touches[0].pageX - ctx.canvas.offsetParent.offsetLeft - ctx.canvas.offsetLeft, y: e.touches[0].pageY - ctx.canvas.offsetParent.offsetTop - ctx.canvas.offsetTop - 70 }; var move; if (touch.x < game.player.x && touch.y > game.player.y &...
[ "getTouchPos(e) {\n if(e.touches) {\n if (e.touches.length == 1) { // Only deal with one finger\n var touch = e.touches[0] // Get the information for finger #1\n const offsets = this.canvasRef.current.getBoundingClientRect()\n // this.touchX = touch.pageX - touch...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
expected output: Array [10, 9, 8, 7, 6, 5, 4, 3, 2, 1] 2. Write a map function to print the Job: Name: your code
function jobName(shipMates) { let jobNameArr = shipMates.map(val => `${val[1]}: ${val[0]}`); return jobNameArr; }
[ "function goodJob(array) {\nconst greeting = people.map(people => `Good job, ${people}!`);\n return greeting;\n}", "function collectInformationOnJobs(names, jobArrays){\n var name;\n var job;\n var people = [];\n\n // function that takes a name and returns the index of the corresponding person in a...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
delete item by its pid. return updated item array
function deleteObjByPid(id) { var lisObj = getAllData(); for(var i = 0; i < lisObj.length; i++) { if(lisObj[i].pid == id) { lisObj.splice(i, 1); break; } } updateData(lisObj); return lisObj; }
[ "removeItem(gid) {\n let index = this.itemArray.findIndex(function (elt) { return elt[\"gid\"] == gid });\n console.log(\"index \", index);\n this.itemArray.splice(index, 1);\n }", "function deleteItem(){\r\n// todo\r\n var id = readNonEmptyString('please type the id of the item you ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Putting speakWisdom OUTSIDE the constructor allows the super.drinkSake to work. If I put it INSIDE the constructor it gave me an error about super being unexected.
speakWisdom(){ console.log("Inside speakWisdom: Calling drinkSake (from parent)"); super.drinkSake(); console.log('What one programmer can do in one month, two programmers can do in two months.') }
[ "drinkSake(){\n console.log(\"Sensei sake\");\n super.drinkSake();\n }", "speakWisdom () {\n let message = super.drinkSake()\n console.log(message)\n console.log('What one programmer can do in one month, \\ntwo programmers can do in two months')\n }", "makeSound() {\n\t\t// explicitly...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
difference between two images
function diff(img1, img2) { return blend(img1, img2, function(a, b){ var c = new Color(); c.r = Math.abs(a.r - b.r); c.g = Math.abs(a.g - b.g); c.b = Math.abs(a.b - b.b); c.a = 255; return c; }); }
[ "diff (imgA, imgB) {\n debug('diff...')\n // all 3 images must be the same size, so take the smallest size\n // (though they should be the same)\n const w = Math.min(imgA.width, imgB.width)\n const h = Math.min(imgA.height, imgB.height)\n // create the png for putting the diff image\n const dif...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Provisions one or more users' personal sites. (My Site administrator on SharePoint Online only) Doesn't support batching
createPersonalSiteEnqueueBulk(emails) { return this.clone(ProfileLoader_1, "createpersonalsiteenqueuebulk", false).postCore({ body: jsS({ "emailIDs": emails }), }); }
[ "SET_USER_SITES (state, sites) {\n state.userSites = [ ...sites ]\n }", "async getUserSites ({ commit }) {\n const sites = await getAllSites()\n commit('SET_USER_SITES', sites)\n commit('SET_CURRENT_SITE', sites[0])\n }", "function publishIncrementalWithApproval(siteName, serverName, r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
inversion transposes the parts of the triad up an octave. 1st inversion treats root, 2nd treats the third, 3rd treats the fifth.
function inversion(v){ var v = limiter(v,0,3); for (var i=0;i<invs.length;i++){ if(i<v){ invs[i] = aoctave; }else{ invs[i] = 0; } } if(DBUG) note(root); }
[ "function invertNotes(notes, inversion) {\n if (notes.length <= 1) {\n // not returning here would result in an endless loop\n return;\n }\n // simple and effective....\n if (inversion > 0) {\n var highestNote = notes[notes.length - 1];\n for (var i = 0; i < inversion; ++i) {\n var note = note...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A [[TransitionHookFn]] that skips a transition if it should be ignored This hook is invoked at the end of the onBefore phase. If the transition should be ignored (because no parameter or states changed) then the transition is ignored and not processed.
function ignoredHook(trans) { var ignoredReason = trans._ignoredReason(); if (!ignoredReason) return; trace_1.trace.traceTransitionIgnored(trans); var pending = trans.router.globals.transition; // The user clicked a link going back to the *current state* ('A') // However, there is also a...
[ "function skip(transition) {\n us = function() {\n return transition();\n };\n }", "function ignoredHook(trans) {\n var ignoredReason = trans._ignoredReason();\n if (!ignoredReason)\n return;\n _common_trace__WEBPACK_IMPORTED_MODULE_0__.trace.traceTransitionIgnored(trans);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
sort the queue with priority if priority is the same ensure that the earlier function is executed before the later one
_sortQueue() { this._queue.sort((a, b) => { if (a.priority === b.priority) { return b.timestamp - a.timestamp; } else { return a.priority - b.priority; } }); // console.log(JSON.stringify(this._queue)); }
[ "sort() {\r\n this.queue.sort((a, b) => a.priority - b.priority);\r\n }", "_sort () {\n this._queue.sort((a, b) => a.priority - b.priority)\n }", "_sort () {\n this._queue.sort(function (a, b) {\n return a.priority - b.priority\n })\n }", "sort() {\n this.queue.sort((a, b) => a.priority...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
updatees an company in the system
function editCompany(companyId, company) { var path = "/api/company/" + companyId; return fetch(path, { method: "put", headers: new Headers({ "Content-Type": "application/json", }), body: JSON.stringify(company), credentials: "include", }) .then((response) => { return response....
[ "update(companyId) {\n return Resource.get(this).resource('Admin:updateCompany', {\n company: {\n ...this.displayData.company,\n margin: this.displayData.company.settings.margin,\n useAlternateGCMGR: this.displayData.company.settings.useAlternateGCMGR,\n serviceFee: this.displayD...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
User constructor to bind renderScatterplot
constructor(props) { super(props); this.renderScatterplot(); }
[ "function componentScatterPlot () {\n\n /* Default Properties */\n var width = 400;\n var height = 400;\n var transition = { ease: d3.easeLinear, duration: 0 };\n var colors = palette.categorical(3);\n var colorScale = void 0;\n var xScale = void 0;\n var ySca...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
PxLoader plugin to load images
function PxLoaderImage(url, tags, priority) { var self = this, loader = null; this.img = new Image(); this.tags = tags; this.priority = priority; var onReadyStateChange = function() { if (self.img.readyState == 'complete') { removeEventHandlers(); loader.onL...
[ "function ImageLoader(){\n\t\t// Images \n\t\tthis._images = [];\n\n\t\t// image loading queue [key, path]\n\t\tthis._pathQueue = [];\n\t}", "function ImageLevelLoader() {}", "function on_images_loaded()\n{\n block_img = loader.getImageByName(\"blocks\");\n cursor_img = loader.getImageByName(\"cursor\");\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
for displaying DOM for planets
function displayPlanets({ results: data }) { rowDiv.innerHTML = ""; data.forEach((el) => { rowDiv.innerHTML += ` <div class="col-3 m-2 d-flex"> <div class="card border-success mb-3 bg-success" style="max-width: 18rem;"> <div class="card-header text-white text-center">PLANET</div> ...
[ "function displayPlanets() {\n starwars.getPlanets().then(planets => {\n planets.forEach(planet => {\n ui.showPlanets(planet);\n });\n if (planets.length !== 0) {\n ui.clearLoading();\n }\n });\n\n}", "function populateSolarSystem(planet){\n var el = docume...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
null > Number Returns the number of tiles wide the level is given: a level 5 tiles wide, expected: 5
getLevelWidth() { return this.level.tilesWide; }
[ "numLevels() {\n let maxDimension = Math.max(this.width, this.height);\n let boundary = this.type === 'dzi' ? 1 : this.tileSize;\n let numLevels = 0;\n while (maxDimension >= boundary) {\n maxDimension /= 2;\n numLevels++;\n }\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
defining fName function which will be validate textfield that it is empty or not. if error find returning an object with defined error and boolen value.
fName(name){ if(name === ""){ obj.error = " Please enter first name", obj.boolval = true }else{ obj.error = "", obj.boolval = false } return obj }
[ "lName(name){\n\n if(name === \"\"){\n \n obj.error = \" Please enter last name\",\n obj.boolval = true\n }else{\n obj.error = \"\",\n obj.boolval = false\n }\n return obj\n }", "function validateForename(field) {\r\n\treturn (field==\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handle asynchronous sensor diagnostics command with response payload.
function diagnostics(request, response) { console.log('Starting asynchronous diagnostics run...'); response.send(202, (err) => { if (err) { console.error('Unable to send method response: ' + err.toString()); } else { var repetitions = 3; ...
[ "function handleData(data) {\n console.log(\"RX: \", data);\n\n\t/** Parse Packet **/\n\t/** Packet format: \"mac_addr:seq_num:msg_id:payload\" **/\n\tvar components = data.split(':');\n\tif (components.length !== 4) {\n\t\tconsole.trace(\"Invalid minimum packet length\");\n\t\treturn;\n\t}\n\tvar macAddress = com...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates the file preview section
createPreview(architect) { if (this.showPreview && this.hasPreview) { let root = architect.createDiv(this.getPreviewClasses); let h2 = architect.createH(2, "is-size-6"); h2.innerHTML(`Uploaded ${this.files.length} file(s) successfully.`); // Creating the reset button let ...
[ "function writePreviewToFile() {\n\n file.write(\n\n \"// MARK: - Preview\" + newLine +\n \"#if DEBUG\" + newLine +\n \"struct ShapeView_Previews: PreviewProvider {\" + newLine +\n tab + \"static var previews: some View {\" + newLine +\n tab2 + \"ShapeView()\" + newLine +\n tab + \"}\" + newLine ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
User defined field 1
function setUserDefined1( userVal ) { this.user_defined_fld1 = userVal; }
[ "getFirstInvalidField() {\n\n }", "static Field(name, type, def, array) { return ModelFormat.from([name, type, def, array]); }", "field(v) {\n if (typeof v === 'string') {\n this.fieldName = v;\n }\n return this;\n }", "toString(){ return `Field('${this.name}': ${this.type}) = ${st...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
generate categories vertical tab html
function getTabCategoriesHtml( Categories ) { var CatStr = ""; var className = ""; CatStr += '<div class="row">'; $.each(Categories, function(i, CatVal){ if( i%2 == 0 ) className = "bg-info margin-1"; else className = "text-danger"; CatStr += '<div class="col...
[ "function CreateVerticalTabs( VerticalObj ) {\n var tabStr = \"\"; var j = 0;\n tabStr += '<div class=\"col-xs-3\">';\n tabStr += '<ul class=\"nav nav-tabs tabs-left\">';\n \n $.each(VerticalObj, function(i, TabVal){\n if(j == 0 ) tabStr += '<li class=\"active\"><a href=\"#'+i+'\" da...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
renders a form for submitting a file for the desiredcheckin
function renderSubmitFile(checkin) { if (document.querySelector(`#uploadFileDiv div.check-in-${checkin}`) != null) { document.querySelector(`#uploadFileDiv div.check-in-${checkin}`).remove(); } else { let divClass = `check-in-${checkin}`; let newDiv = $("<div></div>"); newDiv.addClass(di...
[ "async upload_file(evt) {\r\n //\r\n //Test if all inputs are available, i.e., the file and its server path\r\n //\r\n //Get the file to post from the edit window\r\n //Get the only selected file\r\n const file = this.file_selector.files[0];\r\n //\r\n //Ensur...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clicking in SVG content selects the corresponding tag in the code
function handleSVGClick(event) { // Figure out what was clicked var clickedNode = event.target; if (clickedNode.correspondingUseElement) { // If it's an instantiation of a <defs> item, let's target the <use> (aka the instance) // (TODO: option to target the node inside <d...
[ "function onSvgClick(el){\r\n // permet de tout mettre tous les texts COnvs (ou pluto les rects correspondant) à inactif et white !!\r\n convTexts.forEach(convText => {\r\n let layerId = parseInt(convText.dataset.layerId);\r\n // choppe le rectangle correspondant\r\n $(`*[data-layer-id = ${layerI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
If Param property is empty, set a value.
_setParamIfEmpty(param){ if(param == null) param = {}; if(param['ja_flg'] == null) param['ja_flg'] = 1; if(param['datetimepicker_f'] == null) param['datetimepicker_f'] = 0; return param; }
[ "_setParamIfEmpty(param){\r\n\t\t\r\n\t\tif(param == null) param = {};\r\n\t\tif(param['div_xid'] == null) param['div_xid'] = 'bulk_latlng_bat';\r\n\t\tif(param['paramY'] == null) throw new Error(\"'paramY' is empty!\");\r\n\t\tif(param['paramG'] == null) throw new Error(\"'paramY' is emptG!\");\r\n\t\t\r\n\t\t\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get the rotation that will turn `q` so that its local `fwd` vector points in the same direction as `dir`
function quat_rotation_to(out, q, dir, fwd=[0,0,-1]) { let v = vec3.create() let axis = vec3.create() // viewer's look direction in world space vec3.transformQuat(v, fwd, q); // axis of rotation (not normalized) vec3.cross(axis, v, dir); let la = vec3.length(axis); let ld = vec3.length(dir); // skips rotatio...
[ "function quatToRot(q) {\n let norm = math.norm(q, 'fro');\n q = math.multiply(q, 1/norm);\n q = math.flatten(q.toArray());\n\n let data = [[0,0,0],[0,0,0],[0,0,0]];\n data[0][1] = -q[3];\n data[0][2] = q[2];\n data[1][2] = -q[1];\n data[1][0] = q[3];\n data[2][0] = -q[2];\n data[2][1] = q[1];\n\n let...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Refresh the show/hide state of tabs and scroll buttons as appropriate.
function showHideTabs() { $.each(tabArray, function (index, value) { if (((index < firstVisibleTabIndex) || (index > lastVisibleTabIndex)) && index != partialShowTabIndex) { value.hide(); } else { value.show(); } }); // If the ...
[ "updateScrollButtons(useTabmixButtons) {\r\n let tabstrip = this.tabBar.mTabstrip;\r\n tabstrip._scrollButtonDown = useTabmixButtons ?\r\n tabstrip._scrollButtonDownRight :\r\n tabstrip._scrollButtonDownLeft || // fall back to original\r\n document.getAnonymousElementByAttribute(tabstrip, \"ano...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
getCostData takes in two parameters, year and month. Depending on its value and its availibility through the search method used on inventoryCost, the resulting data will be pushed to costData array and setting state to that array.
getCostData(yearValue, monthValue) { const costData = []; this.state.inventory_costs.map((inventoryCost) => { const inventoryCostDate = yearValue + '-' + monthValue; if (inventoryCost.inventory_date.search(inventoryCostDate) !== -1) { costData.push(inventoryCost) } ...
[ "getInventoryCostData(name, value) {\n if (name === 'currentMonth') {\n this.getCostData(this.state.currentYear, value);\n } else {\n this.getCostData(value, this.state.currentMonth);\n }\n }", "_calcMonthlyData()\n {\n for (let monthIdx=0; monthIdx<MONTHS_IN_YEAR.length; monthIdx++)\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Functions api fourSquare / parameter: mar=Marked c=Coordenade t=title info=infoWindows
function apiFourSquare(mar,c,t,info) { var url= apiUrl(clientID,clientSecret,c,t).toString(); $.getJSON(url).done(function(mar) { var response = mar.response.venues[0]; self.msgFourSquare = '<h4>' + response.name + '</h4>' + '<div>' + '<p><h6>Address:</h6> ' + response.location.formattedAddress[0...
[ "function showCoord(mode) {\n var param = parameters();\n if(param.mode == 'Draw'){\n alert(\"In Draw mode,cannot showCoord!\");\n return;\n } \n // Declare local variables\n var i;\n var space;\n var molecule = Mol();\n var bonds = BondMatrix();\n\n // If no coordinates available, return\n if ( mol...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Shows slides. We're using jQuery here the $ is the jQuery selector function, which takes as input either a DOM element or a CSS selector string.
function showSlide(id) { // Hide all slides $(".slide").hide(); // Show just the slide we want to show $("#"+id).show(); }
[ "function showSlide(id) {\n // Hide all slides\n $(\".slide\").hide();\n // Show just the slide we want to show\n $(\"#\"+id).show();\n}", "function showSlides() { // pravi se funkcija \r\n var i; // pravi novu varijablu i\r\n var slides = document.getElementsByClassName(\"mySlides\"); ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
copy and transfer the tempData paragraph element to localStorage paragraph element
function writeToLocalStorage() { //clear data array data = []; //push tempData string into the array data.push(`${tempData.innerHTML}`); //update the local storage updateLocalStorage(); }
[ "function copyText() {\n\tlocalStorage.setItem(\"text\", document.getElementById(\"textArea\").value);\n\tlocalStorage.setItem(\"size\", document.getElementById(\"fontSize\").value);\n\tlocalStorage.setItem(\"color\", document.getElementById(\"fontColor\").value);\n\tlocalStorage.setItem(\"font\", document.getEleme...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
make the data to use for the post that triggers the email
makePostData (callback) { // make the default post data super.makePostData(() => { // store the original text and code so we can construct the proper escaped text and code we // want to see in the email output ... then put some html into each of these fields let marker = this.data.markers[0]; this.origi...
[ "makePostData (callback) {\n\t\tconst stream = this.useStream || this.teamStream;\n\t\tconst toEmail = `${stream.id}.${this.team.id}@${this.apiConfig.email.replyToDomain}`;\n\t\tthis.data = {\n\t\t\tto: [{ address: toEmail }],\n\t\t\tfrom: { address: this.users[1].user.email },\n\t\t\ttext: this.postFactory.randomT...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if the given token should cause us to pop the stack.
function shouldStackPop(token, stack) { var ttl = token.type.label; var ttk = token.type.keyword; var top = stack[stack.length - 1]; return ttl == "]" || ttl == ")" || ttl == "}" || (ttl == ":" && (top == "case" || top == "default" || top == "?")) || (ttk == "while" && top == "do...
[ "#maybePopStack(token) {\n const ttl = token.type.label;\n const ttk = token.type.keyword;\n const top = this.#stack.at(-1);\n\n if (\n ttl == \"]\" ||\n ttl == \")\" ||\n ttl == \"}\" ||\n (ttl == \":\" && (top == \"case\" || top == \"default\" || top == \"?\")) ||\n (ttk == \"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the value of the opacity slider for the region overlay.
function getLayerOpacity() { var opacity = $('#layerOpacity').slider("value"); return isNaN(opacity) ? map.defaultLayerOpacity : opacity / 100; }
[ "function getRegionOpacity() {\n var opacity = $('#regionOpacity').slider(\"value\");\n return isNaN(opacity) ? map.defaultRegionOpacity : opacity / 100;\n }", "get opacity() {\n return this._opacity * 100;\n }", "get opacity() { return this.alpha * 255; }", "getOpacity() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
decrypt data using crypto
function decryptData(data) { logger.info("Inside decryptData.."); var decipher = crypto.createDecipher(encryptionType, cipherPwd); logger.info("decipher is " + decipher); try { var decrypted = decipher.update(data, config.HEX, config.UTF8); logger.info("decrypted1 is " + decrypted); decrypted += decipher.fina...
[ "function decrypt(key, data) {\n var decipher = crypto.createDecipher('aes-256-cbc', key);\n var decrypted = decipher.update(data, 'hex', 'utf-8');\n decrypted += decipher.final('utf-8');\n return decrypted;\n}", "static decrypt(data, encryptionKey, _iv) {\n if (typeof data !== 'string' || !data ||...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
delet item from array, array,key is type of int index
function deleteItemFromArray(array, key){ for(var i = 0; i < array.length; ++ i){ if(array[i].coumnName == key){ delete array[i]; array.length -= 1; } } }
[ "Uncollected(key){\n\n // Copy the elements except the index\n // from original array to the other array\n anotherArray=[this.state.UncollectedParcelArray.length-1]\n for (var i = 0, k = 0; i < this.state.UncollectedParcelArray.length; i++) {\n \n // if the index is\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a new type that mixes members from base and all mixins. Each mixin applies in sequence, with further to the right ones overriding previous entries. For each mixin, we only take its own properties, not anything from its superclass (prototype).
function mixin(base/*, ...mixins*/) { // Create an initializer for the mixin, so when derived constructor calls // super, we can correctly initialize base and mixins. let mixins = Array.prototype.slice.call(arguments, 1); // Create a class that will hold all of the mixin methods. class Mixin extend...
[ "function _compose(base, mixin) {\n\n // See if the *mixin* has a base class/prototype of its own.\n var mixinIsClass = isClass(mixin);\n var mixinBase = mixinIsClass ? Object.getPrototypeOf(mixin.prototype).constructor : Object.getPrototypeOf(mixin);\n if (mixinBase && mixinBase !== Function && mixinBase !== O...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Render the compass bearing.
render() { let bearing; // If we're below the horizon. if (this.state.bearing) { let degrees = Math.round(this.state.bearing); let direction = bearingToDir(degrees); bearing = ( <div id="bearing"> <span className="direction">{direction}</span>{' '} <span cla...
[ "bearing(p) {\n const ref = Point.create(p);\n const lat1 = Angle.toRad(this.y);\n const lat2 = Angle.toRad(ref.y);\n const lon1 = this.x;\n const lon2 = ref.x;\n const dLon = Angle.toRad(lon2 - lon1);\n const y = Math.sin(dLon) * Math.cos(lat2);\n const x = M...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Parse TLV triplet for the metadata and content buffer
function tlv(buffer, firstByte) { const byte = firstByte; debug.deserializeBinary('deserializing TLV triplet from byte %d', byte); const tagOctet = buffer[byte]; if (!tagOctet) { throw new IllegalContentError(`no type byte at pos ${byte}, only ${buffer.length} bytes avaliable`); } const tagClass = tagOc...
[ "function parseTlv (path, buf) {\n path = path == null ? '' : path + '.'\n const result = {}\n for (let i = 0; i < buf.length;) {\n let type = buf[i++]\n let length = buf[i++]\n let value = buf.slice(i, i + length)\n i += length\n while (length === 255 && i < buf.length) {\n if (buf[i] === ty...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
RAW SQL /SELECT users_perks.user_id,SUM(perks.amount), users_perks.perk_id, perks.amount,perks.title, perks.campaign_id from users_perks JOIN perks ON users_perks.perk_id=perks.id group by perks.campaign_id
function total_Perks_Per_Campaign(id) { return db("perk_id", "perks.amount", "perks.title", "perks.campaign_id") .sum("perks.amount as total_Perks_amount") .select() .from("users_perks") .join("perks", "users_perks.perk_id", "=", "perks.id") .groupBy("perks.campaign_id") .where({ campaign_id: ...
[ "function total_Donations_Per_Campaigns(id) {\n return db(\"donations.campaign_id\", \"donations.donation_amount\")\n .sum(\"donations.donation_amount as total_Donation_amount\")\n .select()\n .from(\"donations\")\n .groupBy(\"donations.campaign_id\")\n .where({ campaign_id: id })\n .first();\n}"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Description: toObject function, part of the BaseResponse class
toObject() { return{ 'httpCode': this.httpCode, 'message': this.message, 'data': this.data, 'timestamp': this.timestamp } }
[ "toJSON() {\n const { message, code, response } = this;\n return { message, code, response };\n }", "function responseToJSON () {\n var self = this;\n return {\n statusCode: self.statusCode,\n body: self.body,\n headers: self.headers,\n request: requestToJSON.call(self.request)\n }\n}", "g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
objDetails argument will store additional details about the game terminal conditions if the function returns true and will be unchanged by the call otherwise want to know what condition the game ended with 1) was it a win or a draw? which side won? 2) if it was a draw, which of the following was it: fiftymove rule, thr...
function terminalGameConditionTest(board) { var gameOver = false; var legalMoves = []; var colourToCheck = (isWhiteTurn) ? WHITE : BLACK; var returnObj = { isTerminalState : false, isDraw : undefined, details : undefined // contains additional information about the match e.g. if it ended in a draw, w...
[ "function checkWinConditions() {\r\n // X 0,1,2 condition\r\n if (arrayIncludes('0X', '1X', '2X')) { drawWinLine(50, 100, 558, 100);}\r\n // X 3,4,5 condition\r\n else if (arrayIncludes('3X', '4X', '5X')) { drawWinLine(50, 304, 558, 304);}\r\n // X 6,7,8 condition\r\n else if (arrayIncludes('...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Discard all blocks from the workspace.
function discard() { var count = Blockly.mainWorkspace.getAllBlocks().length; if (count < 2 || window.confirm("Remove all blocks?")) { Blockly.mainWorkspace.clear(); window.location.hash = ''; } }
[ "function discard() {\n var count = Blockly.mainWorkspace.getAllBlocks().length;\n if (count < 2 || window.confirm('Delete all ' + count + ' blocks?')) {\n Blockly.mainWorkspace.clear();\n renderContent();\n }\n}", "function discard() {\n var count = Blockly.mainWorkspace.getAllBlocks().length;\n if (c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Zooms to selected track and shows properties in the table
function chooseTrack() { var id = this.value; // entities have the same id as the track in the db. zooms to the corresponding entity viewer.zoomTo(viewer.entities.getById(id)); // iterates over tracklist to find the element with the correct id and saves to elem var elem; ...
[ "function chooseTrack() {\n var id = this.value;\n // entities have the same id as the track in the db. zooms to the corresponding entity\n viewer.zoomTo(viewer.entities.getById(id));\n }", "function ZoomableView() { }", "function showMeasurementDetails() {\n\n var updatedList = $(\"<...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
searches for a minimum when applying the given accessor to each item within the supplied array. The returned array has the following form: [minumum accessor value, datum, index]
function minimum$1(data, accessor) { return data.map(function (dataPoint, index) { return [accessor(dataPoint, index), dataPoint, index]; }).reduce(function (accumulator, dataPoint) { return accumulator[0] > dataPoint[0] ? dataPoint : accumulator; }, [Number.MAX_VALUE, null, -1]); ...
[ "function minBy(arr, iteratee) {\n const { length } = arr;\n\n if (!length) {\n return arr;\n }\n\n if (typeof iteratee === `string`) {\n const str = iteratee;\n iteratee = (o) => o[str];\n }\n\n if (length === 1) {\n return iteratee(arr[0]);\n }\n\n let minObj = arr[0];\n let minVal = iteratee...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
send the paintbrush coords via OSC
function paintBrush(coords) { behaviourOscClient.send("/serverMessage/paintbrush", coords.x, coords.y, coords.d); }
[ "function mouseClicked() {\n // Send Data to the server to draw it in all other canvases\n dataServer.publish(\n {\n channel: channelName,\n message: \n { //set the message objects property name and value combos \n x: mouseX,\n y: mouseY,\n r: brushR,\n g: br...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get track(s) from soundcloud link
function _getTracksFromExternalSource(linkUrl) { if(RegExp('http(s?)://soundcloud').test(linkUrl)) { //replace likes with favorites linkUrl = linkUrl.replace("/likes", "/favorites"); //load soundcloud data from tracks SC.get('/resolve', {url: linkUrl}, function(data, error){ ...
[ "function getTracks(url, callback){\n\t\tconsole.log('getTracks');\n\t\tvar url = url + '/tracks';\n\n\t\t$.ajax(url,{\n\t\t\tdataType: 'json',\n\t\t\theaders: {\n\t\t\t\t'Authorization': 'Bearer ' + g_access_token\n\t\t\t},\n\t\t\tsuccess:function(r) {\n\t\t\t\tconsole.log('got playlist tracks', r);\n\t\t\t\tcallb...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Loads a tourstring and fills the interface with these elements
loadTour(tourString) { console.log("Load tour"); let tourCommands = tourString.split("\n"); for (let i = 0; i < tourCommands.length; i++) { console.log(tourCommands[i]) let c = tourCommands[i].split("~"); let delay = parseFloat(c[0]); let action = ...
[ "function _initializeTour(tour) {\n\t var rawTour = $.extend(true, {}, tour);\n\t // Fill in information for each tour in case any important information is missing\n\t rawTour = $.extend({}, Constants.TOUR_DEFAULT_SETTINGS, rawTour);\n\n\t // Fill in information for each step in case anything important ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Evaluate directories under project and initiate watcher process.
function initWatcher(projectPath) { fs.readdir(projectPath, function (err, files) { if (err) { console.error(err); watcher_notification.dismiss(); messenger.error( ModuleMessage.WATCHER_ERROR, true, err ); ...
[ "watchProject() {\n let watcher = chokidar.watch(this.head);\n watcher.on('change', (eventType, filename) => {\n this.runProjectProcess('change', filename);\n });\n }", "watchProjectPaths () {\n return this.disposables.add(this.project.onDidChangePaths(() => {\n retu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Runs over all pages and tries to summarize the information about the trimbox in a short text
function getTrimSizeSummary() { // Get information about the width and height of all pages from the XML report var theTrimboxes = xmlGetPageboxDimensionsForAllPages( xmlEnumPageboxes.trimbox ); // Classify the pages that are the same var theTrimboxesFound = []; for (var theIndex = 0; theIndex < theTrimboxes.leng...
[ "function measuresPage(doc, wheelchair) {\n doc.addPage({\n size: [612, 792],\n margin: 0\n });\n doc.font('Medium').text('Measurements', 72, 72);\n doc.lineWidth(1).moveTo(54, 90).lineTo(558, 90).stroke();\n doc.lineGap(9);\n\n for (var i = 0; i < wheelchair.mDetails.length; i++) {\n if (i === 0)\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
getButton :: _ > HTMLButtonElement
getButton() { const impure = compose(R.nth(0), R.prop('childNodes'), R.prop('shadowRoot')); return impure(this); }
[ "_getButton (button) {\n if (this._buttons.hasOwnProperty(button)) {\n return this._buttons[button]\n }\n return undefined\n }", "button() {\n return this.native.button();\n }", "getButton(index){\n if(this.gamepad && this.gamepad.buttons && index>=0 && index<this.gamepad.buttons.len...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
determine if given king is in check bColour boolean indicating which colour (white or black) should be tested
function inCheck(board, bColour) { var inCheck = false; var kingsTile = (bColour === WHITE) ? board.whiteKingTile : board.blackKingTile; var checkingTile = null; // if I need to get all the possibly enemy moves if (arguments.length == 2) { var possibleEnemyActions = []; for (let i = 0; i < board.occupiedTile...
[ "checkForCheck(color) {\n if (this.board.pieces(color).filter(piece => piece instanceof King).length > 1) {\n return false;\n }\n const pieces = this.board.pieces(this.opposite(color));\n for (let piece of pieces) {\n if (piece.legalMoves().some(move => move.capture...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
returns a array of visible appointments each entry is an object with the following properties appointment: the appointment object begin: begin position in % end: end position in % level: level of the appointment to not overlap
function _determineVisibleAppointments() { // only use appointments in visible time frame for rendering var aOldVisibleAppointments = this._aVisibleAppointments || []; var aAppointments = _getAppointmentsSorted.call(this); var oAppointment; var oGroupAppointment; var oGroupAppointment2; var iIntervals = ...
[ "function _determineVisibleAppointments() {\n\n\t\tvar aAppointments = this._getAppointmentsSorted();\n\t\tvar oAppointment;\n\t\tvar oGroupAppointment;\n\t\tvar oGroupAppointment2;\n\t\tvar iIntervals = this.getIntervals();\n\t\tvar sIntervalType = this.getIntervalType();\n\t\tvar oStartDate = this._getStartDate()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this function gets all tasks in a specified project and sets the list in a google sheet: recommend to use the to generate the link to fetch the needed data fields
function getTasks() { var response = UrlFetchApp.fetch("https://app.asana.com/api/1.0/projects/xxxxxxxxxxxxxxxxx/tasks?opt_fields=assignee,completed,completed_at,name,created_at", getAsanaAuth()), dataAll = JSON.parse(response.getContentText()), data, tasks = [], dataSet = dataAll.data; ...
[ "function _displayTasksByProject() {\n console.log(`_displayTasksByProject ${selectedProjectId}`);\n\n let projectEntries = document.querySelectorAll(\"tr [projid]\");\n projectEntries.forEach(p => p.classList.remove('table-primary'));\n\n if (selectedProjectId === -1) {\n return;\n }\n\n l...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This function writes a cookie with a name, data, and a unix expire timestamp
function writeCookieUnix(name, data, unixExpire) { document.cookie = name + "=" + data + ";" + "expires=" + new Date(unixExpire).toGMTString() + ";"; }
[ "function writeCookie(name, data, hoursTilExpire) {\n var date = new Date();\n var exp = date.setTime(+ date + (hoursTilExpire * 3600000));\n document.cookie = name + \"=\" + data + \";\" + \"expires=\" + date.toGMTString() + \";\";\n}", "function writeCookie(name, value) {\n var date, expires;\n// if (d...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
getEventPoint(event) function Given an event, getEventPoint(evt) returns an SVGPoint for that event's mouse (X,Y) position.
function getEventPoint(evt) { var pt = svgDoc.createSVGPoint(); pt.x = evt.clientX; pt.y = evt.clientY; return pt; }
[ "function getEventPoint(evt) {\n\t\t\tvar p = root.createSVGPoint();\n\n\t\t\tp.x = evt.clientX;\n\t\t\tp.y = evt.clientY;\n\n\t\t\treturn p;\n\t\t}", "function getEventPoint(evt)\n{\n var p = root.createSVGPoint();\n p.x = evt.clientX;\n p.y = evt.clientY;\n return p;\n}", "function getEventPoint(evt) {\r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
workloadEntry takes in an entry metadata and workload attestor info for specified agents returns entry metadata info for dashboard table
workloadEntry(entry, WorkLoadAttestorInfo) { var thisSpiffeId = this.getEntrySpiffeid(entry) var thisParentId = this.getEntryParentid(entry) // get tornjak metadata var metadata_entry = this.getAgentMetadata(thisParentId, WorkLoadAttestorInfo); var plugin = "None" var cluster = "None" if (me...
[ "workloadEntry(entry, workLoadAttestorInfo) {\n var thisSpiffeId = this.SpiffeHelper.getEntrySpiffeid(entry)\n var thisParentId = this.SpiffeHelper.getEntryParentid(entry)\n // get tornjak metadata\n var metadata_entry = this.SpiffeHelper.getAgentMetadata(thisParentId, workLoadAttestorInfo);\n var pl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
create an AngleSweep from start and end angles given in degrees.
static createStartEndDegrees(startDegrees = 0, endDegrees = 360, result) { return AngleSweep.createStartEndRadians(Angle_1.Angle.degreesToRadians(startDegrees), Angle_1.Angle.degreesToRadians(endDegrees), result); }
[ "static createStartEnd(startAngle, endAngle, result) {\n result = result ? result : new AngleSweep();\n result.setStartEndRadians(startAngle.radians, endAngle.radians);\n return result;\n }", "static createStartEndRadians(startRadians = 0, endRadians = 2.0 * Math.PI, result) {\n res...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This function returns the ith Fibonacci number in the Fiboncacci Sequence, and makes use of the biginteger datatype.
function fibonacciBigInt(index) { if(index < 1 || isNaN(index)) { return "Improper input to function fibonacci. Please input a positive integer."; } var fib = bigInt(index); if(index > 2) { return bigInt((fibonacciBigInt(index - 1))).add(fibonacciBigInt(index - 2)).toString(); } else { return fib.toString();...
[ "function getFibonacciNumber(index){\n\n if(index === null || index === undefined || index < 0)\n return null;\n\n var previous_first = 0, previous_second = 1, next = 1;\n\n for(var i = 2; i <= index; i++) {\n next = previous_first + previous_second;\n previous_first = previous_second;\n previo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the message to apply to progress notifications (spinners etc).
getProgressMessage(label){ return this.config[label].progressMessage; }
[ "function getImportProgressMessage(actionLabel, path, index, total, type) {\n type = type ? \" (\" + type + \")\" : \"\";\n return \"<div><b>\" + actionLabel + \": </b>\" + path + type\n + \"<br/><b>Completed: </b>\" + index\n + \"<br/><b>Remaining: </b>\" + (total - index)\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Fake response but find and manipulate matching requests within res which is important for tests with more than one request (e.g. poll and long poll)
respondSubsequent(response, reqIdx, shouldStubResp) { var response = response || "", validReqIdx = reqIdx !== undefined; // this.res.__requests isn't available after 'privates' optimization // so find it by some kind of feature detection - this isn't beautiful, // but adding a protected...
[ "function mock_resp(path, handler)\n{ this.__api_map[path] = handler;\n}", "function mockResponseBody(req, res, next) {\n if (res.swagger) {\n if (res.swagger.isEmpty) {\n // There is no response schema, so send an empty response\n util.debug('%s %s does not have a response schema. Sending an empt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Merender node ke todolistcontainer
function renderTodoHtmlNode(node) { const todoListContainer = document.getElementById("todo-list-container") todoListContainer.appendChild(node) }
[ "function createTodoListItem(todo) {\n\n /* TONI - Checkbox:\n var checkbox = document.createElement('input');\n checkbox.className = 'toggle';\n checkbox.type = 'checkbox';\n checkbox.addEventListener('change', checkboxChanged.bind(this, todo));\n */\n\n /* TONI: La...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
look for data.snackbar in response
function processResponse(response) { try { store.commit("setSnackBar", { text: response.data.snackbar.text, type: response.data.snackbar.type, }); } catch (err) { return; } return; }
[ "function showResponseToasts(data) {\n // * Message handling\n if (data['success'].length > 0) {\n data['success'].forEach(element => {\n console.log(element);\n M.toast({ html: element, classes: 'green' });\n });\n }\n if (data['error'].length > 0) {\n console...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handle down arrow key navigation by moving focus to the contents of the currently active tab
onDownArrowKeypress() { var e; this.activeTabId && ((e = document.getElementById(this.activeTabId)) == null || e.focus()); }
[ "triggerNavigation(key){switch(key){case\"Enter\":this.selectFocused();break;case\"ArrowLeft\":this.focusPrevious();break;case\"End\":this.focusLast();break;case\"Home\":this.focusFirst();break;case\"ArrowRight\":this.focusNext();break;// close the focused tab\ncase\"Escape\":this.closeFocused();break;}}", "keyDo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Only producing 15 RAP
function printRAP(){ let n = 1, RAPFound = 0; while (RAPFound<NUM_PAIRS){ if (isRAP(n)){ RAPFound++ console.log(RAPFound+". "+n+", "+(n+1)); } n++ } }
[ "function ra_trial(ga_w) {\n\tvar fio2 = 'FiO2';\n\n\tif(ga_w < 32) {\n\t\treturn 'When >32 weeks and CPAP 5 ' + fio2 + ' 21% for 5 days';\n\t}\n\treturn 'If CPAP 5 ' + fio2 + ' 21% for 5 days';\n}", "calculateResonanceFunction() {\n let resonanceMap = [85, 15, 0].map((v) => v ** ( (this.resonance-5) / 2 )...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
all matches messages to search
function mapMatches(messages){ return messages.matches.map(item => { let message = {} message['user name']=item.username, message['text'] =item.text, message['perma link']=item.permalink, message['time stamp']=item.ts return message }); }
[ "results (wordToMatch) {\n const data = this.props.allDisplay;\n return data.filter(name => {\n const regex = new RegExp(wordToMatch, 'gi');\n return name.sender.match(regex)\n });\n }", "async searchMessages(txt, inJid, count, page) {\n const json = [\n 'query',\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
hide or show results formember section
function hdShow(action) { if(action == 'show'){ resultsUser.classList.add('show'); } else if (action == 'hide'){ resultsUser.classList.remove('show'); } }// end hide or show results for member section
[ "function showResults() {}", "function displayMembers() {\n // Get members to display\n let sortByName = document.getElementById(\"sortByName\").value;\n let filterMajor = document.getElementById(\"filterMajor\").value;\n let filterRole = document.getElementById(\"filterRole\").value;\n let search = document...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
countNumbersInRow Input: 1 <= i,n <= 9 Results: number of candidates in row i Side Effects: None:
countNumbersInRow(i){ let count = 0; for(let j=1; j<=9; j++){ if(this.getNumber(i, j)>0){ count ++; } } return count; }
[ "countNumbersInColumn(j){\r\n let count = 0;\r\n for(let i=1; i<=9; i++){\r\n if(this.getNumber(i, j)>0){\r\n count ++;\r\n }\r\n }\r\n return count;\r\n }", "adjustRowNumbersAndGetCount() {\n let unadjustedCount = this.adjustRowNumber...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
function to read transaction recs from db
function ReadDB () { const transactions = Budgetdb.transaction(["pending"], "readwrite") const stores = transactions.objectStore("pending") // getAll() method for matching specified parameter OR // all objects in store if no parameters specified const getAll = stores.getAll() // get all ...
[ "getAll() {\n return db.select().from('transactions')\n .catch(err => console.error(`Error getting all transactions ${err}`));\n }", "function queryDB(tx) {\n tx.executeSql('SELECT * FROM recordes', [], querySuccess, errorCB);\n }", "function dbReadStockAll()\n{\n var db = dbGetHandle()\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
loads the next slide
function loadNextSlide(value) { slidePointer = slidePointer + parseInt(value); if (slidePointer < minSlides) { slidePointer++; } else if (slidePointer > maxSlides) { slidePointer--; } else { slide = data.slides[slidePointer - 1].location; $(".listContainer").load(slide).appendTo($(...
[ "function loadNext() {\n if (nextIndex < images.length) {\n var image = images[nextIndex];\n load(image.img, image.Slide);\n }\n\n nextIndex++;\n }", "function loadNext() {\n if (nextIndex < images.length) {\n var image = images[nex...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }