query
stringlengths
9
34k
document
stringlengths
8
5.39M
negatives
listlengths
19
20
metadata
dict
Helper function to get the given `normalizedLocale` from `LOCALE_DATA` or from the global `ng.common.locale`.
function getLocaleData(normalizedLocale) { if (!(normalizedLocale in LOCALE_DATA)) { LOCALE_DATA[normalizedLocale] = _global.ng && _global.ng.common && _global.ng.common.locales && _global.ng.common.locales[normalizedLocale]; } return LOCALE_DATA[normalizedLocale]; }
[ "function getLocale () {\n return locale\n}", "function getLocale() {\n try {\n if (Services.prefs.getBoolPref(PREF_MATCH_OS_LOCALE))\n return Services.locale.getLocaleComponentForUserAgent();\n }\n catch (e) { }\n\n try {\n let locale = Services.prefs.getComplexValue(PREF_SELECTED_LOCALE,\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Update file asset by id.
static update(id, fileAsset){ let kparams = {}; kparams.id = id; kparams.fileAsset = fileAsset; return new kaltura.RequestBuilder('fileasset', 'update', kparams); }
[ "static get(id){\n\t\tlet kparams = {};\n\t\tkparams.id = id;\n\t\treturn new kaltura.RequestBuilder('fileasset', 'get', kparams);\n\t}", "function update(id, name, imageId) {\n return models.Theme\n .update(\n {\n name,\n imageId\n },\n {\n where: { id }\n }\n );\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Inner function retrieves the (default) font size for the given object.
function get_font_size(obj) { // Standard way: if(window.getComputedStyle) return window.getComputedStyle(obj, "").getPropertyValue("font-size"); // MS IE way: if(obj.currentStyle) return obj.currentStyle.fontSize; return "16px"; }
[ "getFontSize() {\n return (this.props.cellSizeInPx / 2.77) + 'px';\n }", "function fontSize(d) {\n d.fontsize = Math.floor(d.radius/3);\n return d.fontsize + \"px\";\n }", "__getSize(node) {\n const sizeClass = this.__getClassStartingWith(node, 'fs');\n const fontS...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
load and parse a jsonfile
function loadJSON(file) { return JSON.parse(FS.readFileSync(file, "utf8")); }
[ "function jsonObjFromFile(fn) {\n var jsonObj = [];\n try {\n var data = fs.readFileSync(fn, 'utf-8');\n if (data) {\n jsonObj = JSON.parse(data);\n } else {\n console.log(basicFile + \": no data\");\n }\n } catch (err) {\n if (err.code === 'ENOENT')...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get closest dndcontainer component from vue component
getContainer(component){ if (!this.dataObject){ return null } while (component && component.$parent){ if (component.isNestable && component.dndModel && component.dndZone == this && !this.isSubset(component.dndModel,this.dataObject)){ return component ...
[ "getItem(component){\n while (component && component.$parent){\n if (component.isDraggable && component.dndModel){\n return component\n }else{\n component = component.$parent\n }\n }\n return null\n }", "static getParentI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
draw the buttons for canceling abilities, for going to the fight mode
drawExtraUI() { // draw the button for canceling ability if an ability is being used if it has not been used partly if (this.situation === "ability") { if (currentAbility.currentStep === 1) { push(); rectMode(CENTER); noStroke(); // if moused over, it is highlighted ...
[ "drawPlayerMenu() {\n if (currentChar != \"none\") {\n push();\n // 2 supporting skills\n for (let i = 0; i < currentChar.abilities[0].length; i++) {\n strokeWeight(3);\n stroke(0);\n // if moused over, it is highlighted\n if (mouseOver.name === currentChar.abilities[0]...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes the checklist item from the Crackle Checklist
function removeChecklistItem() { removeFromChecklistArry(this); options.removeChild(this.parentNode); }
[ "function callUncheckListItem(checkbox, checkListItemIndex) {\n $.ajax({\n url: '/publisher/api/lifecycle/checklistitem/' + checkListItemIndex + '/' + asset + '/' + id,\n type: 'DELETE',\n success: function (response) {\n alert('Item unchecked successfully');\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calculates a min projection point based on a pointer, pointer progress within the drag target, and constraints. For instance if an element was 100px width, we were dragging from 0.25 along this axis, the pointer is at 200px, and there were no constraints, we would calculate a min projection point of 175px.
function calcConstrainedMinPoint(point, length, progress, constraints, elastic) { // Calculate a min point for this axis and apply it to the current pointer var min = point - length * progress; return constraints ? applyConstraints(min, constraints, elastic) : min; }
[ "function calculateConstraintsFromDom(constraintsElement, draggableElement, point, transformPagePoint) {\n invariant$2(constraintsElement !== null && draggableElement !== null, \"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.\");\n var parentBoundingBox ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The AWS::CloudFormation::Macro resource is an AWS CloudFormation resource type that creates an AWS CloudFormation macro to perform custom processing on AWS CloudFormation templates. For more information, see Using AWS CloudFormation Macros to Perform Custom Processing on Templates. Documentation:
function Macro(props) { return __assign({ Type: 'AWS::CloudFormation::Macro' }, props); }
[ "setMacro(name, inst) {\n this.frame().setMacro(name, inst);\n }", "function WriteMacro(objMacroFile, strDepotName, strDepotPath)\r\n{\r\n if (!g_hMacrosWritten[strDepotName])\r\n {\r\n g_hMacrosWritten[strDepotName] = true;\r\n\r\n objMacroFile.WriteLine('macro '\r\n + strD...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
volume_size computed: true, optional: false, required: false
get volumeSize() { return this.getNumberAttribute('volume_size'); }
[ "get userVolumeSizeGib() {\n return this.getNumberAttribute('user_volume_size_gib');\n }", "get rootVolumeSizeGib() {\n return this.getNumberAttribute('root_volume_size_gib');\n }", "getVolume() {\r\n return this._muted ? 0 : this._volume;\r\n }", "set ConeVolume(value) {}", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A function that adds 1 to wins and uses the restartGame function to reset the remaining guesses and wrong guesses.
function correct() { wins++; restartGame(); }
[ "function wrong() {\n losses++;\n restartGame();\n }", "function restartGame() {\n initAll();\n resetPlayer();\n toggleDice(false);\n}", "function winOrLose() {\n if (playerScore === randomNum) {\n winsCounter++;\n $(\"#wins\").html(\" \" + winsCounter);\n startGame();\n } else if...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Judgement 2 Sort players that are older than _____ years in alphabetical order
function SortByNamexOlderThan(age) { let choosenPlayers = [] for (const player of players) { if (player.age >= age) { let sortedAwards = player.awards sortedAwards.sort((award1, award2) => { if (award1.year > award2.year) { return -1 } else { return 1 } ...
[ "function SortByAge() {\n player = players.sort(function (a, b) {\n return b.age - a.age\n });\n}", "function FilterByTeamxSortByNoOfAwards() {\n let arr=[]; let noofawards=[];\n for(var i=0;i<=players.length;i++)\n {\n noofawards[i]=players[i].awards.length;\n players[i].push({\"noOfAwards\":noof...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if the ethereum users address is part of the given bloom. note: false positives are possible.
function isUserEthereumAddressInBloom(bloom, ethereumAddress) { if (!isBloom(bloom)) { throw new Error('Invalid bloom given'); } if (!isAddress(ethereumAddress)) { throw new Error(`Invalid ethereum address given: "${ethereumAddress}"`); } // you have to pad the ethereum addres...
[ "walletIsValid(address) {\n return DigiByte.Address.isValid(address);\n }", "function isAddress(string) {\n try {\n bitcoin.Address.fromBase58Check(string)\n } catch (e) {\n return false\n }\n\n return true\n}", "inDiscoveryAddresses(peer) {\n let str = JSON.stringify(peer);\n for(let ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
create event nav bar
function createEventNavBar() { $("#nav-bar").html(""); for (let i = 0; i < events.length; i++) { let navBar = $('<button class = "event-nav-bar nav-btn"> </button>'); // navBar.attr("href", "#" + events[i]); navBar.attr("id", "ev-" + parseInt(i)); navBar.text(events[i]); ...
[ "function setUpNavBar() {\n\tnavBar.left = document.getElementById(\"left_btn\");\n\tnavBar.right = document.getElementById(\"right_btn\");\n\tnavBar.up = document.getElementById(\"up_btn\");\n\tnavBar.down = document.getElementById(\"down_btn\");\n\n\tnavBar.left.addEventListener(\"mousedown\", onMouseDown, false)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Link layerMenu items and the mapLayer
function link(menuItem){ if (menuItem.options.mapLayerId){ menuItem.mapLayer = nsMap.getMapLayer(menuItem.options.mapLayerId); menuItem.mapLayer.menuItem = menuItem; } var subItem = menuItem.first; while (subItem){ link(subI...
[ "function createLayerLinks(){\n var output = \"\", \n links = \"\";\n\n $.each( mapType[visibleMap], function(index, value) {\n var checked =\"\";\n // Only get layers that are not the background\n if( index != \"bg\" && index != \"Commanders\"){\n // Find OpenLayer Object\n\n allLayers[valu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Se agrega la busqueda de via dado que cuando intenta cargar el combo con muchos registros el sistema se paraliza mdolce 18/10/2006
function buscarVia(){ var tipoVia = get("frmInsertarCliente.comboTipoVia") ; if(tipoVia != ''){ var datos= new Object(); var arr = new Array(); arr[arr.length] = ["codigoVia", tipoVia[0]]; datos.dto = "es.indra.sicc.cmn.negocio.comun.DTOComunes.DTOGenBusquedaVias"; datos.conector = "Conec...
[ "function cargarAbogado(campoAbogado) {\n\t$.ajax({\n\t\t dataType: \"json\",\n\t\t url: contexto + \"/maestro/obtenerAbogados\",\n\t\t data: null,\n\t\t success: function (response) {\n\t\t\t var select = document.getElementById(campoAbogado);\n\t\t\t var option = document.createElement(\"option\");\n\t\t\t ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
//////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////// / Total Engagements //////////////////////////////////////////////////////////////////////////////////...
function TotalEngagements() { var self = this; this.loading = true; var count1 =[],date1 =[]; this.loadData = function() { self.loading = true; Restangular .one('campaign_reports', ctrl.campaignId) .customGET('cumulative_engagement_time_se...
[ "getMedalsTotal(country, medals){\n var x = 0;\n medals.forEach(medal => { \n x += country[medal.type + \"MedalCount\"]\n })\n return x;\n }", "function obtenTotalInvitados(){\r\n\t\tvar tablaLength = obtenTablaLength(\"invitado_table\");\r\n\t\tasignaText(\"span_totalInv...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
change volume icon status
function change_volume_icon() { if(cp_mediaPlayer.muted) $(".chalk_player .media_controls .volume_icon").find(".media_icon").removeClass("glyphicon-volume-up glyphicon-volume-down").addClass("glyphicon-volume-off"); else $(".chalk_player .media_controls .volume_icon").find(".media_icon").removeClass("glyphicon-vo...
[ "function updateVolumeIcon() {\n volumeIcons.forEach(icon => {\n icon.classList.add('hidden');\n });\n\n volumeButton.setAttribute('data-title', 'Mute (m)')\n\n if (video.muted || video.volume === 0) {\n volumeMute.classList.remove('hidden');\n volumeButt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Same as useSyncExternalStore, but supports selector and isEqual arguments.
function useSyncExternalStoreWithSelector(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) { // Use this to track the rendered snapshot. var instRef = useRef(null); var inst; if (instRef.current === null) { inst = { hasValue: false, value: null }; instRef.current = inst; ...
[ "function currentRendererSupportsUseSyncExternalStore() {\n var _ReactCurrentDispatch;\n\n // $FlowFixMe[incompatible-use]\n const {\n ReactCurrentDispatcher,\n ReactCurrentOwner\n } =\n /* $FlowFixMe[prop-missing] This workaround was approved as a safer mechanism\n * to detect if the current renderer ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
I am separator line Method to get id level
function idLevel(id) { var len = ('' + id).length; var padding = new Array(parseInt(13) - parseInt(len)).join('0'); id = padding + id; var step = 0; var level = []; while (step < 12) { level.push(id.substr(step, 4)); step += 4; } return level.join('/'); }
[ "function getLvlID() {\n return `${gridSize}x${gridSize}_nr${lvlNumber}`;\n}", "getNewId() {\n var id = -1;\n\n this.meanlines.leafletLayer.getLayers().forEach((layer) => {\n if (layer.feature.id >= id) {\n id = layer.feature.id + 1;\n }\n });\n\n return id;\n }", "function extrac...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a second version of the drawStar function that draws a star with the specific radius.
function drawStar2(origin, radius) { drawLine(radius, origin, 0); drawLine(radius, origin, Math.PI / 4); drawLine(radius, origin, Math.PI / 2); drawLine(radius, origin, 3 * Math.PI / 4); drawLine(radius, origin, Math.PI); drawLine(radius, origin, 5 * Math.PI / 4); drawLine(radius, origin, 3 ...
[ "function star(x, y, radius1, radius2, npoints) {\n let angle = TWO_PI / npoints;\n let halfAngle = angle / 2.0;\n beginShape();\n for (let a = 0; a < TWO_PI; a += angle) {\n let sx = x + cos(a) * radius2;\n let sy = y + sin(a) * radius2;\n vertex(sx, sy);\n sx = x + cos(a + h...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function for printing the results in the console and writing them to 'log.txt'
function report(results) { // Add footer to results string. results += "\n" + "_".repeat(45) + "\n"; // Print the results to the console. console.log(results); // Write the results to 'log.txt'. (Append to file. Don't erase the current contents.) // If 'log.txt' does not exist in this directory...
[ "function logFileOutput(dataToLog) {\n\n file.appendFile(\"./log.txt\", dataToLog, function (err) {\n\n if (err) {\n console.log(err);\n }\n\n });\n\n}", "function sendToTextFile(data) {\n fs.appendFile('results.txt', data, function(err) {\n if (err) {\n console.error(err);...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handles the success and error callbacks of HTTPClient
function _handleHttpClientComplete(httpClient, deferred){ Ti.API.info("[rewards-lib] Response (" + httpClient.status + "): " + httpClient.responseText); var resObj = null; //Attempt to parse the JSON try{ resObj = buildResponse(httpClient); } catch( exp ) { Ti.API.warn("[rewards-li...
[ "ensureSuccessStatusCode() { \n if (!this.isSuccessStatusCode) {\n throw new Error(`Request didn't finished with success. Status code: ${this.statusCode}. Reason phrase: ${this.reasonPhrase}`);\n } \n }", "function HTTPDONE(self) {\n if (self._type !== 'http') {\n thr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get scope.hours in 24H mode if valid
function getHoursFromTemplate(){var hours=parseInt(scope.hours,10);var valid=scope.showMeridian?hours>0&&hours<13:hours>=0&&hours<24;if(!valid){return undefined;}if(scope.showMeridian){if(hours===12){hours=0;}if(scope.meridian===meridians[1]){hours=hours+12;}}return hours;}
[ "function getHoursFromTemplate() {\n var hours = parseInt(scope.hours, 10);\n var valid = ( scope.showMeridian ) ? (hours > 0 && hours < 13) : (hours >= 0 && hours < 24);\n if (!valid) {\n return undefined;\n }\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function to get last action data for main account
function GetLastActionData(req, callback) { contractInfo.getContractInfo(req.params.contractAddress,(err,doc)=>{ var json = []; if(err){ callback(null,json); } else if (doc !== null) { trycatch(function() { var abiJson = JSON.parse(doc.abi); var Multiply7 = web3.et...
[ "function GetLastActionDataHandler(req, res) {\n var lastActionData = wait.for(GetLastActionData, req);\n for (var i = 0; i < lastActionData.length; i++) {\n var abc = wait.for(common.getusername, lastActionData[i].owner);\n\t\tvar role = wait.for(common.getRole,lastActionData[i].owner);\n lastA...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
trains add themselves to the station when they arrive
addTrainToStation(train) { if(this._getIndexOfTrain(train) === -1) { this.trainsAtStation.push(train); } }
[ "join(traveler){\n if (this.getAvailableSeatCount() > 0) {\n this.passengers.push(traveler)\n } else {\n console.log(\"NO SPACE\")\n }\n }", "add (station) {\n let position\n\n // update existing\n if (this.first && this.first.id === station.id || this.second...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
frame element. typically used as container for control elements such as buttons, text box, list box, and drop downs can be drag around via mouse within the bounds of its parent, typically root element to draw, attach a draw event handler
function frame(parent, name, x, y, w, h, sx, sy, hide) { if (typeof parent !== 'undefined' && parent){if (parent.addChild){ parent.addChild(this); }} /*-------------------------------------------------------------------------------------- holds child objects. bottom child is at start of array, and top child is...
[ "function frame(){\n\t//FRAME DEBUG\n\t\t// noFill();\n\t\t// stroke(0)\n\t\t// strokeWeight(1);\n\t\n\t//Frame Appearance\n\tnoStroke();\n\tfill(0);\n\t\n\t//Frame Render\n\trect(0, 0, canvasWidth, frameThickness);\n\trect(0, canvasWidth-frameThickness, canvasWidth, frameThickness);\n\trect(0, 0, frameThickness, c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a string db query to query for all the scheduled ships with their destination docks
getDockScheduledShipsQuery() { return `SELECT DISTINCT(ship_id), eta, i.dock_id ` + `FROM Intervals i JOIN Timelines tl ON i.timeline_id = tl.id ` + `WHERE ship_id is not null ` + `AND i.timeline_id = "${this.timeline_id}" ` + `AND tl.simulation_id = "${this.simul...
[ "getDockDataQuery() {\n return 'SELECT d.id, d.loaders_count, ' +\n '(SELECT COUNT(*) FROM Containers WHERE container_hold = d.id) as container_count, ' +\n ' (SELECT container_hold as ship_id FROM Ships WHERE dock_id = d.id) as connected_ship_id ' +\n ' FROM ContainerHold ch...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
displayEnding() Shows the ending screens by calling the index numbers in the array
function displayEnding() { image(endingImages[endingIndex], 0, 0, windowWidth, windowHeight); }
[ "function end() {\n\t// set GAMEOVER to true\n\tGAME_OVER = true;\n\t// call clear methods\n\tUFO.clear();\n\tBULLET.clear();\n\tBOOM.clear();\n\t// fill the score\n\tscore.textContent = GAME_SCORE;\n\t// show score board\n\tgame.classList.remove('active');\n}", "function revealEnd() {\n this.index = this.item...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Chart server call back
function serverCallBack_Chart(data){ myChart.data = { labels: data[1], datasets: [{ label: 'Cases', backgroundColor: '#00526b', borderColor: '#00526b', data: data[0], fill: false, }] } myChart...
[ "function initCharts() {\n xmlHttpReq('GET', '/storages_data', '', function(responseText) {\n var response = JSON.parse(responseText);\n if (response.success) {\n drawCharts(response.data);\n } else {\n snackbar(response.message);\n }\n });\n}", "function sy...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
SETTING NAV DATA (HEADER AND FOOTER)
function setNavData() { //Calling the appropriate function to load header and footer based on the title of the page if (document.title == "BIOPAGE" || document.title == "CONTACT" || document.title == "PROJECTS") { loadHeader(); loadFooter(); } }
[ "function assignNavAndSidebarHeaders() {\n\t\t\t$(\"#area-blank1 h3\").text(sgeonames[0]);\n\t\t\t$(\"#left-sidebar h3\").text(sgeonames[0]+\" Projects by :\");\n\n\t\t $(\".area-blank\").css(\"display\", \"inline-block\");\n\t\t if (sgeonames[1]) {\n\t\t \t$(\"#area-blank2 h3\").text(sgeonames[1]);\n\t\t\t\t$(\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks to see if any of the chests needs to be unlocked yet.
function checkChests(){ for(var i = 0; i < chests.length; i ++){ if(kills > chests[i].seal){ //console.log(" Unlock noise!"); chests[i].sprite.tint = 0xFFFFFF; chests[i].sprite.interactive = true; } if(chests[i].gold != 0){ addGold(chests[i].gold); chests[i...
[ "checkGemCollisions() {\n for (const gem of this.gems) {\n if (Math.abs(this.player.pos.x - gem.pos.x) > this.level.tileWidth * 0.5) continue;\n if (Math.abs(this.player.pos.y - gem.pos.y) > this.level.tileWidth * 0.5) continue;\n const gemIndex = this.gems.indexOf(gem);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The combination of roles matches all of the roles queried
isAll(...roles) { return Roles.coerceRoleArray(roles).every(role => this.is(role)); }
[ "function checkRoles(roles){\n var possibleRoles = [\"service provider\", \"device owner\", \"infrastructure operator\", \"administrator\", \"system integrator\", \"devOps\", \"user\", \"superUser\"];\n for(var i = 0, l = roles.length; i < l; i++){\n if(possibleRoles.indexOf(roles[i]) === -1){\n return {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Exit a parse tree produced by Java9ParseradditiveExpression.
exitAdditiveExpression(ctx) { }
[ "exitAdditiveOperator(ctx) {\n\t}", "visitExit_statement(ctx) {\n\t return this.visitChildren(ctx);\n\t}", "function Return() {\n \t\t\tdebugMsg(\"ProgramParser : Return\");\n \t\t\tvar line=lexer.current.line;\n \t\t\t\n \t\t\tlexer.next();\n \t\t\t\n \t\t\tvar expr=Expr();\n \t\t\tvar ast=new ASTUnaryNode(\"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handle Checkboxes ////////////////////////////////////////////////////////////////////// Function to add/delete checkbox ID to imageSelected Array
function handlecheckBox() { // This will give us the selected Box (parent node, to delete the whole canvasBox) ("count-xx") var selectedBox = this.parentNode.id; // Now see if you need to add/or remove selectedBox to imageSelected array if (this.checked === true) { // If it's checked, then add ...
[ "cleanCheckboxSelection() {\n this.context.state.ingredients.forEach((igd) => {\n if(document.getElementById('igdID_' + igd.id) != null) {\n const checkbox = document.getElementById('igdID_' + igd.id);\n if(checkbox.checked) {\n checkbox.checked = false;\n }\n }\n });\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
getRowString Returns String of this row of the board, human readable
__getRowString (row) { var string = "-" + row + "-|"; var i; this.board[row].forEach(function (space) { string += " " + space + " |"; }); return string; }
[ "__getRowHeader () {\n\n var string = \" |\";\n var i;\n\n console.log(this.board);\n\n this.board.forEach(function (column, index) {\n string += \"-\" + index + \"-|\";\n });\n\n return string;\n }", "function getRowText(row,col) {\r\n\treturn installRows...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
transform ScheduleXML into a jsonObject
static transformSchedule(xml, group) { let events = xml.querySelectorAll("Event"); let i = 0; let schedule = {}; Array.from(events).forEach(event => { let eventTitle = event.querySelector("Title").innerHTML; let eventLecturer = event.querySelector("Lecturer").innerHTML; let eventLocati...
[ "function convertXml2json (xml) {\n var parser = require(\"xml2json\");\n return parser.toJson(xml, {object: true});\n }", "static convertXMLToSRT(xml) {\n let subs = [];\n let index = 1;\n let reg = /(?:<text start=\"(.+?)\" dur=\"(.+?)\">(.+?)<\\/text>)/gs;\n xml.replace...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Media queries processing getCurrentDisplayMode needed to initialize this.currentDisplayMode
getCurrentDisplayMode() { let width = window.innerWidth; if (width < 970) { if (width >= 750) { return 'tablet' } else { return 'mobile' } } else if (width < 1170) { return 'deskto...
[ "function displayModePatch() {\n\tif (PLAYER.type!=PLAYERTYPE) {\n\t\tPLAYERTYPE=PLAYER.type;\n\t\tif ($_modesel.val()==\"chMode\" || $_modesel.val()==\"rMode\") {\n\t\t\t$videowidth.removeClass().addClass('span1');\n\t\t\t$(\"#ytapiplayer\").attr(\"width\", '1').attr(\"height\", '1');\n\t\t}\n\n\t}\n}", "functio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Row height in css pixels
get rowHeight() { return this._rowHeight; }
[ "rowhSize() {\n return this.nodes.rowHolder.childElementCount - (this.displayedInfo.renderedEndRow !== null ? 1 : 0);\n }", "function GetRowHeight() {\n var styleSheetName = SiebelApp.S_App.GetStyleSheetName();\n var rowHeight = utils.GetstyleSheetPropVal(styleSheetName...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Convert a hex string to a binary string.
function hexToBinary( hex ) { let result = ""; // Split by each hex character hex.split( "" ).forEach( str => { // Parse the character into an integer. // Convert the integer into a binary string representation. // Pad with leading zeros for four bits (each hex character is a nibble). result += ( parseInt(...
[ "function completeBinary(str) {\n\tlet a = str;\n\twhile (a.length % 8 !== 0) {\n\t\ta = \"0\" + a;\n\t}\n\treturn a;\n}", "function hex_to_bin(uuid) {\n var hex = uuid.replace(/[\\-{}]/g, '');\n var buff_len = hex.length/2;\n var bb = new ByteBuffer(buff_len);\n for (var i = 0; i < hex.length; i += 2...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
funcion para hacer aparecer el div del turno
function aparecerDesaparecerDivTurno(texto) { //removemos el evento del click y del teclado removerEventos(); removerEventoTeclado(); let intervalo = 0; let tiempo = setInterval(function () { if (intervalo < 2) { divTurno.innerHTML = `<h3>Turno del jug...
[ "function calcular_si_mueve(element, partes) {\n switch (puzzleElegido){\ncase \"south_park\": comprovarGanado(partes, array_south_park); break;\ncase \"peter\": comprovarGanado(partes, array_peter_partido); break;\ncase \"homer\": comprovarGanado(partes, array_homer_partido); break;\ncase \"stan \": comprov...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
recursive function that searches a script and any subscripts (those within loops)
function iterateBlocks(script, func) { function recursive(scripts, func, level) { if (!is(scripts) || scripts === [[]]) return; for (var script of scripts) { for(var block of script.blocks) { func(block, level); recursive(block.subScripts(), func, level + ...
[ "function solution_1 (nums, target, start, end) {\r\n if (start === undefined) start = 0; // arguments.callee won't work if the function uses default parameters\r\n if (end === undefined) end = nums.length - 1; // arguments.callee won't work if the function uses default p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the resources associated with an Item
getResources (itemId, portalOpts) { const args = this.addOptions({}, portalOpts); return getItemResources(itemId, args) .catch(handleError); }
[ "function getResources() {\n\t\t\treturn $q.when(resources);\n\t\t}", "function getAllItems(){\n\n}", "async getItem(...selects) {\n const q = this.listItemAllFields;\n const d = await q.select(...selects)();\n if (d[\"odata.null\"]) {\n throw Error(\"No associated item was found...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adhoc lineage stats based on hardcoded values in family tree.
function stats(winner) { var mutations = 0 var ancestors = 0 lineage(winner, function(familyTreeNode) { if (familyTreeNode === 'mutate') { mutations += 1 } else if (familyTreeNode === 'genesis') { // no-op } else if (familyTreeNode !== 'genesis') { ...
[ "function renderStats() {\n let stimulant = 0;\n let sedative = 0;\n let hallucinogic = 0;\n let delirant = 0;\n let dissociative = 0;\n let depressant = 0;\n for(substance in selectedSubstances) {\n let substanceAmount = selectedSubstances[substance];\n let substanceConfig = SUBS...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
applies all values of patch passed into the argument to the inputs of the synth triggers change at the end of function to initiate patch
function applyPatch(patch) { let params = Object.keys(patch); params.forEach(i => { if (i === "osc") { $(`#synthWrap :input:radio[name=${i}][id=${patch[i]}]`).prop('checked', true); } else if (i === "detune") { $(`#synthWrap :input:radio[name=${i}][value=${patch[i]}]`).pr...
[ "function modifyState (patch) {\n autoUpdate(patch); //apply changes to UIs\n appState = _.merge(appState, patch); //destructively update appState\n Object.freeze(appState); //freeze!\n }", "didUpdateArguments () {\n\n }", "mutateInputs(inputs) {\n inputs.forE...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calculate output length with padding and bit length
function getOutputLength(inputLength8) { return (inputLength8 + 64 >>> 9 << 4) + 14 + 1; }
[ "function calcVariableByteIntLength(length) {\n if (length >= 0 && length < 128) return 1;else if (length >= 128 && length < 16384) return 2;else if (length >= 16384 && length < 2097152) return 3;else if (length >= 2097152 && length < 268435456) return 4;else return 0;\n}", "function calcCmdLength(obj, callback)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Event fired on layer highlight. Returns the id of the layer that is being highlighted.
onLayerHighlight() {}
[ "function highlightFeature(e) {\n\tvar layer = e.target;\n\n\t// style to use on mouse over\n\tlayer.setStyle({\n\t\tweight: 2,\n\t\tcolor: '#666',\n\t\tfillOpacity: 0.7\n\t});\n\n\t\n\t\n\tinfo_panel.update(layer.feature.properties)\n\t\n\n\t\n\n\t\n\n}", "function highlightFeature(e) {\n\tvar layer = e.target;\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The type for pages. [label] is the page's number (must en a string, can be null). [ppcm_x] and [ppcm_y] are the pixel per centimeters in each direction. [image_uri] is the uri of the image. [ocr_uri] is OCR data for the image. [ocr_index] is integer that indicates the page number number in the OCR data coresponding to ...
function page (label, ppcm_x, ppcm_y, image_uri, ocr_uri, ocr_index) { return { label : label, ppcm_x : ppcm_x, ppcm_y : ppcm_y, image_uri : image_uri, ocr_uri : ocr_uri, ocr_index : ocr_index }; }
[ "function pageType(){\n types = ['section_id','page_id','group_id'];\n var match= false, pT = false;\n _.each(types, function(qv,qk){\n match = $.qs[qv] !== undefined ? $.qs[qv] : undefined;\n if(match) pT = {\"type\":qv,\"id\":match}\n });\n if(pT){ return pT; } else { return...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Android only: Set Display option of the notifications. displayOption is of type OSInFocusDisplayOption 0 > None, 1 > InAppAlert, 2 > Notification
static inFocusDisplaying(displayOption) { if (Platform.OS == 'android') { RNOneSignal.inFocusDisplaying(displayOption); } }
[ "function toggleNotificationMenu() {\n setYTAppsDisplay(false)\n setAddVideoDisplay(false)\n setNotificationsDisplay(!notificationsDisplay)\n }", "function show_notification() {\n Log.info('show_notification');\n chrome.storage.sync.get('notifications', function(data) {\n if (data.notifications && ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This script is intended primarily for developers who need to create a test copy of a board or all of the boards in an account. For each board, it copies the board itself, all of the pins on the board, all of the board sections, and all of the pins on each section. There are three intended use cases, each with its own c...
async function main(argv) { const parser = new ArgumentParser({ description: 'Copy one Board or all Boards' }); parser.add_argument('-b', '--board-id', { help: 'destination board identifier' }); parser.add_argument('-n', '--name', { help: 'target board name' }); parser.add_argument('-s', '--source-access-...
[ "function cloneBoard(){\n\t\ttestBoard = [\n\t\t\t\t[\"\",\"\",\"\"],\n\t\t\t\t[\"\",\"\",\"\"],\n\t\t\t\t[\"\",\"\",\"\"]\n\t\t\t];\n\t\tfor(cbi=0; cbi<3; cbi++){\n\t\t\tfor(cbj=0; cbj<3; cbj++){\n\t\t\t\ttestBoard[cbi][cbj] = board[cbi][cbj];\n\t\t\t}\n\t\t}\n\t}", "function copy_file_api_unix_tests() {\n QUni...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
run birthday function once mouse is pressed at end of game
function mousePressed() { birthday(); mouseWasPressed += 1; }
[ "function birthday() {\n if (ending === true) {\n candleLit = true;\n image(imgLitCandles, trayX + 3, trayHit - 35); // draw lit candles\n\n // mauve rounded rectangle\n fill(\"#B97296\"); // mauve\n rectMode(CENTER, CENTER);\n rect(width / 2, height / 2, 400, 80, 20);\n\n textAlign(CENTER, CE...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
checks if squares in traversedSquares array have class blocked
function checkTraversedSquares(traversedSquares) { let isBlocked = true for (let i = 0; i < traversedSquares.length; i++) { if ($(`[data-row= "${traversedSquares[i].thisRow}"][data-column="${traversedSquares[i].thisColumn}"]`).hasClass('blocked')) { isBlocked = false return isBlocked } } ret...
[ "function checkIfPathFree(square) {\n let row = square.row\n let col = square.column\n\n let north = row - 1\n let south = row + 1\n let east = col + 1\n let west = col - 1\n\n function isNorth(obj) {\n return obj.row === north && obj.column === col\n }\n function isSouth(obj) {\n return obj.row === ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
disabling/enabling marker draggability when the map pans since the marker is dragged as well when the map is "touchdragged" on Android 2.3.2 & 2.2.1 this is likley to happen because both map & marker react to "touchdragging" events. I would propose to disable marker dragability every time the map is dragged automatical...
function dragstart(e) { marker.dragging.disable(); }
[ "function disablePanning() {\n panningDisabled = true;\n }", "function enablePanning() {\n panningDisabled = false;\n }", "function placeBadMarkers() {\n\tBAD_listener = google.maps.event.addListener(map, 'click', function(event) {\n\t\tplaceBadMarker(event.latLng);\n\t});\n}", "function p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
pushed to next Screen bvased on condition
pushTo(value) { if (value == 'Customer') { this.props.navigator.push({ screen: 'LoginScreen' }); } else { this.props.appActions.moveToScreen('showAllComonents'); } }
[ "function screenPushed(screenObj) {\n allowUserInteraction();\n isShowing = true;\n screenObj.pushing = false;\n screenObj.domElement.style.webkitTransition = '';\n setTimeout(function () {\n screenObj.domElement.style.webkitTransition = SCREEN_TRANSITION_STYLE;\n }, 0);\n}", "moveToSignU...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
circlePos determines the position a circle will be placed in with respect to the dominant RGB color
function circlePos() { var color; switch (toggle) { case 0: color = blue; break; case 1: color = red; break; case 2: color = green; break; } var xCoord = map(color, 0, 255, 0, windowWidth); var yCoord = random(0, windowHeight); ellipse(xCoord, yCoord, circleSi...
[ "updateCircle() {\n const obj = this.newPos(); // Returns the random values as an object\n // Updates the circles css styling\n this.div.style.left = `${obj.posX}px`;\n this.div.style.bottom = `${obj.posY}px`;\n this.div.style.width = `${obj.radius}rem`;\n this.div.style.he...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Kills the streaming being sent to tokbox
function stopTokBoxPublisher() { publisher.destroy(); }
[ "async function stopStreamPayment( )\n {\n if(superfluidUser.current)\n {\n //Stop Token Flow\n await superfluidUser.current.flow({\n recipient: eventData.get(\"owner\").get(\"ethAddress\"),\n flowRate: '0' \n }); \n\n setHasTicket(false);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Modsub takes input BIGs a, b, m and returns ab modulo m
function Modsub(a, b, m ) { return Modadd(a, FP256BN.BIG.modneg(b, m), m) }
[ "function pow_mod( a, b, m)\n{\n let r, aa;\n\n r = 1;\n aa = a;\n while (1) \n {\n if (b & 1)\n {\n r = mul_mod(r, aa, m);\n }\n b = b >> 1;\n if (b == 0)\n {\n break;\n }\n aa = mul_mod(aa, aa, m);\n }\n return r;\n}", "function pow_mod(a, b,...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sync the given player's PlayerDecks instance with the cards on the blockchain, updating the `bCardIds` and `deckByName` fields on the PlayerDecks instance. Returns whether a change has happened to the `deckByName` field as a result of the blockchain sync.
function syncPlayerDecksByPlayer(player) { const API = Spark.getGameDataService(); const playerId = player.getPlayerId(); const decksDataItem = API.getItem("PlayerDecks", playerId).document(); const decksData = decksDataItem.getData(); const cCardIds = Object.keys(decksData.cardByCardI...
[ "async updatePlayerPunchcard(numNewPlayers) {\n // get date, utc hour, and utc day\n const now = new Date();\n const time = now.getTime();\n const hour = now.getUTCHours();\n const day = now.getUTCDay();\n const month = now.getUTCMonth();\n const year = now.getUTCFullYear();\n\n // find the ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This function gets and returns a "dictionary" of the latitude and longitude of each insula given its id(as index). Used to find where to place the labels of each insula on the map, upon iteration through this list.
function makeInsulaCentersDict(){ var currentInsulaNumber; // Manually set as the first insula id for pompeii var oldInsulaNumber=-1; var xSoFar=0; var ySoFar=0; var latLngList; var currentCoordinatesList; var propertiesSoFar=0; insulaCentersDict[oldInsulaNumber]=[xSoFar,ySoFar]; pompeiiInsulaLaye...
[ "function displayInsulaLabels(){\n\t\tvar i;\n\t\tvar insulaId;\n\t\tvar insulaCenterCoordinates;\n\t\tvar shortInsulaName;\n\t\tfor(i=0;i<insulaGroupIdsList.length;i++){\n\t\t\tinsulaId=insulaGroupIdsList[i];\n\t\t\tinsulaCenterCoordinates=insulaCentersDict[insulaId];\n\t\t\tshortInsulaName=insulaShortNamesDict[in...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
constructor with properties with default empty index where block sits on the chain timestamp tell us when block was created data any type of data like details of transfer previoushash string contain hash of block before current block
constructor(index, timestamp, data, previoushash = ''){ this.index = index; this.timestamp = timestamp; this.data = data; this.previoushash = previoushash; //create hash for current block so need way to calculate it this.hash = this.calculateHash(); }
[ "constructor(_data, _blockhash, _prevhash){\n this.timestamp = Date.now()\n this.data = _data\n this.prevHash = _prevhash\n this.nonce = nonce ++\n this.blockHash = _blockhash\n }", "function createBlock(timestamp, prevHash, data, number) {\n let returnBl = {\n timestamp:...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add restaurant name to the breadcrumb navigation menu
function fillBreadcrumb(restaurant = self.restaurant) { const breadcrumb = document.getElementById('breadcrumb'); const li = document.createElement('li'); li.innerHTML = restaurant.name; breadcrumb.appendChild(li); }
[ "static ariaLabelForRestaurantButton(restaurant) {\r\n return (`View Details of ${restaurant.name} restaurant`)\r\n }", "function addCrumb(dir) {\n var crumb = '<span><a class=\"breadcrumbs-item change\" href=\"\" data-path=\"' + dir + '\">' + getDirName(dir) + '</a> / </span>';\n crumbarray.push(crumb);\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this function is used to move west from your current location
function West() { props.setMoveLocation(true); props.setLocation((longMove -= 0.002), latMove); }
[ "function moveWest() {\n currentLonPoint -= 0.00050\n console.log(currentLonPoint)\n map.setView([currentLatPoint, currentLonPoint], 18)\n\n }", "function North() {\n props.setMoveLocation(true);\n props.setLocation((latMove += 0.002), longMove);\n }", "function South() {\n pro...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Takes the ID of an HTML element and returns the object's style reference.
function getStyleRef(id) { // Checks for DOM strategy. if (document.getElementById) { // W3C return document.getElementById(id).style; } else if (document.all) { // IE return document.all[id].style; } else if (document.layers) { // NS return document.layers[id]; } }
[ "getStyleByID(styleID){\n\t\treturn this.styles[this.findIndexByID(styleID)];\n\t}", "function css(ele,style_obj){\n if(ele === null || style_obj === null){\n return \"\";\n }\n\n if(typeof style_obj === \"string\"){\n return ele.style.style_obj;\n }\n}", "function setStyle(objId, style, value) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
creates a legend for the BrokerDHT visualization
function createLegendBrokerDHT() { const broker_point = createGeoJsonPoint([10,10]); const path = d3.geoPath(); const legend_table = d3.select("#legend-table"); // -- broker -- const broker_row = legend_table.append("tr"); const broker_svg = broker_row.append("td").append("svg"); broker_sv...
[ "function createLegendBrokerDisGB() {\n const path = d3.geoPath();\n const legend_table = d3.select(\"#legend-table\");\n\n // -- broker --\n const broker_row = legend_table.append(\"tr\");\n const broker_svg = broker_row.append(\"td\").append(\"svg\");\n broker_svg\n .attr(\"height\", 20)\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Example: Ad hoc rich query QueryAssets uses a query string to perform a query for assets. Query string matching state database syntax is passed in and executed as is. Supports ad hoc queries that can be defined at runtime by the client. If this is not desired, follow the QueryAssetsForOwner example for parameterized qu...
async QueryAssets(ctx, queryString) { return await this.GetQueryResultForQueryString(ctx, queryString); }
[ "async QueryAssetsByOwner(ctx, owner) {\n let queryString = {};\n queryString.selector = {};\n queryString.selector.docType = 'asset';\n queryString.selector.owner = owner;\n return await this.GetQueryResultForQueryString(ctx, JSON.stringify(queryString)); //shim.success(queryResu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Description armyLetters consists of letters from 'a' to 'z' and armyNumbers consists of digits from '1' to '9'. The power of a letter is its position in the Latin alphabet, so the letter 'a' has power 1, 'b' has 2, .. 'z' has 26. The power of a digit is its value, so '1' has power 1, '2' has 2, .. '9' has 9. armyLetter...
function battleCodes(armyLetters, armyNumbers) { if (!(armyLetters && armyNumbers).length) return 'Peace'; let letters = armyLetters.split('').map((x) => x.charCodeAt() - 96); let numbers = armyNumbers.split('').map((x) => +x); while (letters.length && numbers.length) { const last = letters.slice(-2).map((x...
[ "function battle(x, y) {\n var alphabeth = {\"A\":1, \"B\":2, \"C\":3, \"D\":4, \"E\":5, \"F\":6, \"G\":7, \"H\":8, \"I\": 9, \"J\": 10, \"K\":11, \"L\":12, \"M\":13, \"N\":14, \"O\":15, \"P\":16, \"Q\":17, \"R\":18, \"S\":19, \"T\": 20, \"U\":21, \"V\":22, \"W\":23, \"X\":24, \"Y\":25, \"Z\":26} \n xSplit = x.s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
polyFromMsg converts a 32byte message to a polynomial.
function polyFromMsg(msg) { var r = new Array(384).fill(0); // each element is int16 (0-65535) var mask; // int16 for (var i = 0; i < paramsN / 8; i++) { for (var j = 0; j < 8; j++) { mask = -1 * int16((msg[i] >> j) & 1); r[8 * i + j] = mask & int16((paramsQ + 1) / 2); ...
[ "function polyToMsg(a) {\r\n var msg = new Array(32);\r\n var t;\r\n var a2 = polyCSubQ(a);\r\n for (var i = 0; i < paramsN / 8; i++) {\r\n msg[i] = 0;\r\n for (var j = 0; j < 8; j++) {\r\n t = (((uint16(a2[8 * i + j]) << 1) + uint16(paramsQ / 2)) / uint16(paramsQ)) & 1;\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Subscribes to notifications for actions within a schema. Callback will be invoked every time a table was created or a record was created, updated or deleted
subscribe(callback, done, schema = this.options.schema) { if (!done) { return new Promise((resolve) => this.schemaListener.getNotificationsForSchema(schema, callback, resolve)); } this.schemaListener.getNotificationsForSchema(schema, callback, done); }
[ "function addRecordsChangedListeners(datastore) {\n\n var rcTargetCb = rcCbBuilder(targetTable, templateTable, renderTarget, renderTemplate);\n var rcPingCb = rcCbBuilder(pingTable, targetTable, renderPing, renderTarget);\n var rcTemplateCb = rcCbBuilder(templateTable, templateTable, renderTemp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get the favorite Team Reference Action
function favouriteTeamReferenceAction() { const action = { type: ApiConstants.API_FAVOURITE_TEAM_REFERENCE_LOAD, }; return action; }
[ "function firebirdPlayerReferenceAction() {\n const action = {\n type: ApiConstants.API_FIREBIRD_PLAYER_REFERENCE_LOAD,\n };\n return action;\n}", "function getAction() {\r\n\r\n return( action );\r\n\r\n }", "function registrationOtherInfoReferenceAction() {\n const action = {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Controller function to test the content name for availability.
function testContentName(objModel) { objModel = objModel || vm.modelContentNew; if (!objModel || !objModel.name) { return; } vm.formContent.$setValidity('contentName', true); vm.state.nameAvailability = 'pending'; return CioContentService.testContentName(objM...
[ "function checkContents() {\n\n var content = document.getElementById(\"content\");\n\n if (typeof(content) !== 'undefined' && content !== null) {\n return checkContent = true;\n }\n else {\n return checkContent = false;\n }\n}", "function checkContentType (name) {\n var val = cont...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sends data packets to one or multiple inports and disconnects them. It accepts either a single hashmap argument mapping port names to data, or a pair of arguments with port name and data to sent to that single port.
send(hashmap, singleData) { let portmap = hashmap; if (typeof (portmap) === 'string') { const port = portmap; portmap = {}; portmap[port] = singleData; } (() => { const result = []; Object.keys(portmap).forEach((port) => { const value = portmap[port]; if (Ob...
[ "receive(port, callback) {\n const getTask = (portName, done) => {\n if (Object.keys(this.outs).indexOf(portName) === -1) {\n throw new Error(`No such outport: ${portName}`);\n }\n return (resolve) => {\n let data = [];\n let dataCount = 0;\n const groups = [];\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
clears all displayed transaction divs
function clearTranDivs(){ var transactionDivs = document.getElementsByClassName('transaction') while(transactionDivs.length != 0){ transactionDivs[0].remove() } }
[ "function clearDivs() {\n $(\"#questions\").html(\"\");\n $(\".answerChoices\").html(\"\");\n $(\"#img\").html(\"\");\n\n }", "clear() {\n // Wipe out the DOM content.\n for (let [, containerElem] of this._containerHtmlElems) {\n $(containerElem).empty();\n }\n /...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The database SQL request parameters for the request GET /categories/:id
function getDatabaseParameterGetCategory (params, query, body){ var parameters = { where: { category_id: params.id }, attributes: { exclude: []}, include: [] }; return parameters; }
[ "function getDatabaseParameterPostCategory (params, query, body){\r\n\treturn body.category;\r\n}", "function getDatabaseParameterPutCategory (params, query, body){\r\n\treturn body.category;\r\n}", "function getDatabaseParameterDeleteCategory (params, query, body){\r\n\tvar parameters = {\r\n\t\twhere: { categ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes each of the insula labels from the map. Meant to be used for when the user zooms past the zoom threshold. Stopped being used due to recommendations at the demo.
function removeInsulaLabels(){ var i=0; for(i;i<insulaMarkersList.length;i++){ pompeiiMap.removeLayer(insulaMarkersList[i]); } }
[ "function dealWithLabelsAndSelection(){\n\t\tif(interactive){\n\t\t\tcurrentZoomLevel=pompeiiMap.getZoom();\n\t\t\tif(currentZoomLevel< INSULA_VIEW_ZOOM){\n\t\t\t\tremoveInsulaLabels();\n\t\t\t\tdisplayInsulaLabels();\n\t\t\t}\n\t\t\telse if(currentZoomLevel>=INSULA_VIEW_ZOOM) {\n\t\t\t\tremoveInsulaLabels();\n\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
set options of column by index
setColumnValues(index, options) { const column = this.children[index]; if (column && JSON.stringify(column.data.options) !== JSON.stringify(options)) { column.set({ options }, () => { column.setIndex(0); }); } }
[ "SetColumn() {}", "function setColumns() {\n\n }", "function setIndex(idColumna){ \n if(casillero[5][idColumna] !=\"ROJO\" && casillero[5][idColumna] !=\"AMARILLO\"){\n indexFila = 5\n indexColumna = idColumna\n } else if(casillero[4][idColumna] !=\"ROJO\" && casillero[4][idColumna] !=\"A...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A ThreadSlice represents an interval of time on a thread resource with associated nesting slice information. ThreadSlices are typically associated with a specific trace event pair on a specific thread. For example, TRACE_EVENT_BEGIN1("x","myArg", 7) at time=0.1ms TRACE_EVENT_END0() at time=0.3ms This results in a singl...
function ThreadSlice(cat, title, colorId, start, args, opt_duration, opt_cpuStart, opt_cpuDuration, opt_argsStripped, opt_bind_id) { Slice.call(this, cat, title, colorId, start, args, opt_duration, opt_cpuStart, opt_cpuDuration, opt_argsStripped, opt_bind...
[ "function ThreadTimeSlice(thread, schedulingState, cat,\n start, args, opt_duration) {\n Slice.call(this, cat, schedulingState,\n this.getColorForState_(schedulingState),\n start, args, opt_duration);\n this.thread = thread;\n this.schedulingState = scheduling...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Run the live updater. The live updater is periodically run to check if its monitored target selectors require reapplying of the ellipsis.
function doLiveUpdater() { // If the live updater is already running, skip this time. We only want one instance running at a time. if (!liveUpdaterRunning) { liveUpdaterRunning = true; // Loop through target selectors. for (var targetSelector in liveUpdatingTargetSel...
[ "updateUIWhenStagingComplete() {\n let observer = (aSubject, aTopic, aData) => {\n // Update the UI when the background updater is finished\n let status = aData;\n if (\n status == \"applied\" ||\n status == \"applied-service\" ||\n status == \"pending\" ||\n status == ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Aggiorna lo schermo del keypad, scrivendo tanti asterischi quante le cifre del pin inserito.
function updateKeypadScreen() { var l = pin.length; if (l <= 0) { // Stringa vuota keypadScreen.textContent = "PIN"; } else { var i, s = ""; for (i = 0; i < l; i++) { s += "*"; } keypadScreen.textContent = s; } }
[ "function generatePin() {\n document.getElementById('show-pin').value = getPin();\n}", "function silencios_insert()\n{\n var silencio_nota = document.getElementById('silencio_notas');\n silencio_nota = silencio_nota.value;\n var textarea = document.getElementById('textarea');\n var text = textarea.value;\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Display a single establishment. GET establishments/:id
async show ({ params }) { const establishment = await Establishment.findOrFail(params.id) await establishment.load('images') await establishment.load('evaluations') return establishment }
[ "function getEstablishment(id) {\n\n return instance.get(`/Establishments/${id}`)\n .then(function (response) {\n return (response);\n })\n .catch(function (error) {\n return (error);\n });\n\n }", "show(req, res) {\n Scenario.findById(req.params.id)\n .then...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
creates every instance of possible monitoring windows takes array of tuples with btw null values returns arr of tuples all possible window combos
function getMonitorWindows(arrOfTuples) { let tuples = [] let storageArr = [] let j = 0 let copy arrOfTuples.forEach(arr => { // console.log(arr) // loop over each item in arr - reset counter to zero at each while(arr.length) { let current = arr[j] ...
[ "rearrangeDivs() {\n const margin = 10;\n let twidth = window.innerWidth - this.parent_.offsetLeft;\n // TODO remove this hack\n // If the config is present\n let config = document.getElementById(\"config\");\n if (config !== null) twidth -= config.offsetWidth + 10 + margin;\n\n // Group window...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Rule for validating whitespace.
function whitespace(rule, value, source, errors, options) { if (/^\s+$/.test(value) || value === '') { errors.push(util.format(options.messages.whitespace, rule.fullField)); } }
[ "isWhitespace(char) {\n return ' \\f\\n\\r\\t\\v\\u00A0\\u2028\\u2029'.indexOf(char) !== -1\n }", "function validateStringWithSpacesInput(value){\n\t\n\tvar stringWithSpaceRegExp = /(^[\\w-,\\(\\)]+)((\\s+)(\\w-,\\(\\)))*$/;\n\t//alert(stringWithSpaceRegExp);\n\t\n\tif(stringWithSpaceRegExp.test(value)=...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
can attack if in an acting state, or if the current move has connected and the gatling combination is allowed.
function canAttack(frame, state, newMove) { return canAct(state) || // regular gatling condition (state.type === PlayerState.ATTACKING && state.connected && !isStartupFrames(getAttackFrameType(state.move, frame - state.startFrame + 1)) && Characters.attackCancelAllowed(state....
[ "attemptAttack() {\n if (!this.target)\n return;\n if (!this.wasInRange) {\n this.timeToNextAttack = this.meleeAttackRate.getTicks(this.bot);\n return;\n }\n const queue = new mineflayer_utils_1.TaskQueue();\n const target = this.target;\n c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Updates the `width` of all columns which have `autoWidth` set to `true`.
recalculateColumnWidths() { if (!this._columnTree) { return; // No columns } if (this._cache.isLoading()) { this._recalculateColumnWidthOnceLoadingFinished = true; } else { const cols = this._getColumns().filter((col) => !col.hidden && col.autoWidth); this._recalculateColumnWidth...
[ "updateWidth() {\n if (this.setupComplete) {\n let width = this.headerData.getWidth();\n this.width = '' + width;\n this.widthVal = width;\n $(`#rbro_el_table${this.id}`).css('width', (this.widthVal + 1) + 'px');\n }\n }", "updateWidth() {\n if (!thi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
compare user input with computer array, if they match we continue, if not its game over
function compareArrays() { console.log("compare arrays") for (let i = 0; i < user_input.length; i++) { if (computer_gives[i] != user_input[i]) { gameOver(); return; } } if (user_input.length == computer_gives.length) { computer_action(); } }
[ "function compare (userSelection , computerSelection)\n {\n if (userSelection === undefined)\n {\n return \"Please, select an option before play.\";\n }\n if (userSelection === computerSelection)\n {\n return \"It is a draw !\";\n }\n if (use...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
MINDEX[] Move the INDEXed element to the top of the stack 0x26
function MINDEX(state) { var stack = state.stack; var k = stack.pop(); if (exports.DEBUG) { console.log(state.step, 'MINDEX[]', k); } stack.push(stack.splice(stack.length - k, 1)[0]); }
[ "replaceMin(root)\n {\n this.harr[0] = root;\n this.MinHeapify(0);\n }", "recoverByInsert(next) {\n if (this.stack.length >= 300 /* Recover.MaxInsertStackDepth */)\n return []\n let nextStates = this.p.parser.nextStates(this.state)\n if (\n nextStates.len...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
random sample from bernoulli(p)
function bernoulli(p) { return Math.random() < p; }
[ "function probabilityGenerator(n, probabilities){\n //plan\n // generate a random int between 0 and 100\n // if int is probability[i] + all previous proababilies times 10\n // return n[i]\n\n}", "function true_or_false(probability) {\n if(Math.random() < 0.25) {\n return true;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a new bone
function Bone(/** * defines the bone name */name,skeleton,parentBone,localMatrix,restPose,baseMatrix,index){if(parentBone===void 0){parentBone=null;}if(localMatrix===void 0){localMatrix=null;}if(restPose===void 0){restPose=null;}if(baseMatrix===void 0){baseMatrix=null;}if(index===void 0){index=null;}v...
[ "_initBoneAabbs(morphTargets) {\r\n\r\n this.boneAabb = [];\r\n this.boneUsed = [];\r\n var numVerts = this.vertexBuffer.numVertices;\r\n var i, j, k, l;\r\n var x, y, z;\r\n var bMax, bMin;\r\n var boneMin = [];\r\n var boneMax = [];\r\n var boneUsed =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Will serve a requested report.
static serveReport(id){ let kparams = {}; kparams.id = id; return new kaltura.RequestBuilder('livereports', 'serveReport', kparams); }
[ "report() {\n return fetch('/report')\n .then((response) => {\n return response.json();;\n })\n }", "function reply_downreport(req, res, info) {\n res.setHeader('Content-Type', 'application/json');\n res.write(JSON.stringify(info));\n res.end();\n}", "function ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Promises entries from the last durationMs
function getLatestEntries(durationMs) { return Promise.all([ getLatestUploaderEntries(durationMs), getLatestParakeetEntries(durationMs) ]) .then(([uploaderEntries, parakeetEntries]) => { let combinedEntries = _.sortBy(_.unionBy(uploaderEntries, parakeetEntries...
[ "function getLatestUploaderEntries(durationMs) {\n return app.pouchDB.allDocs({\n include_docs: true,\n startkey: 'sensor-entries/' + helpers.isoTimestamp(app.currentTime() - durationMs),\n endkey: 'sensor-entries/' + helpers.isoTimestamp(app.currentTime())\n })\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Helper for adding transform: translate(x0, y0)
function translate(selection, x0, y0) { // If it is already placed on the screen, make it a transition. if (selection.attr('transform') != null) { selection = selection.transition('position'); } selection.attr('transform', 'translate(' ...
[ "function translate(x, y, painter){\n return function(vp, frame){\n painter(vp, process_frame(\"translate\", frame)(x, y));\n }\n}", "function updateTransform() {\n scope.style.transform = 'translate(0,' + current + 'px)';\n }", "function gTranslate(x,y,z) {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the time between two dates in minutes ds1, ds2: Format yyyymmdd hh:mm:ss
function getTimeBetweenDates(ds1,ds2){ date1 = ds1.split(' '); date2 = ds2.split(' '); fecha1 = date1[0].split('-'); fecha2 = date2[0].split('-'); month1 = getMonthName(fecha1[1]); month2 = getMonthName(fecha2[1]); var d1 = month1+", "+fecha1[2]+" "+fecha1[0]+" "+date1[1]; var d2 = month2+", "+fecha2[2]+" "+fecha2...
[ "function minutesDifference(a, b) {\n // JS Date objects are cast into milisecond-precision values for subtraction, I guess? ¯\\_(ツ)_/¯\n return Math.round((((a - b) % 86400000) % 3600000) / 60000);\n}", "static subtractToMinutes(time1, time2, keepPositiveIfCrossingMidnight = false){\n let mins1 = this.toMin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get info about the specific Survey Block:
getSurveyBlock(block_number_,survey_list_) { // console.log('Block Number Get Survey Block:',block_number_+1) const surveytag_block = survey_list_[block_number_] // console.log('SurveyTag Block:',surveytag_block) this.setState({ loading: true , questions: quizData[survey_list_[block_number_]].default...
[ "function GetSurveySection(surveyId, language, respondentValue, transId) {\n\n\t\t\t\tvar firstSectionObj = {\n\t\t\t\t\t\"SurveyId\": surveyId,\n\t\t\t\t\t\"Language\": language,\n\t\t\t\t\t\"MemberId\": respondentValue,\n\t\t\t\t\t\"RespondentTransId\": transId,\n\t\t\t\t\t\"RespondentTypeId\": 1\n\t\t\t\t}\n\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return an error message if n is not a valid comic number.
function valid_num(n) { var msg = ''; switch (true) { //The empty string is valid - it's the current comic. case (n == ''): break; case (parseInt(n, 10) != n || n < 1): msg = "'" + n + "' is not a positive integer"; setnum(1); break; ...
[ "function checkFactorialArg(arg) {\n var error = 1;\n if (arg < 0) {\n error = \"ERR: FACTORIAL DOMAIN (NEGATIVE)\";\n } else if (!Number.isInteger(arg)) {\n error = \"ERR: FACTORIAL DOMAIN (NOT INTEGER)\";\n }\n return error;\n}", "function validate(n) {\n\tvar x = parseFloat(n);\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
When component mounts, the timer starts and the state word will be shuffled
componentDidMount() { this.interval = setInterval(this.decrementTimer.bind(this), 1000); this.setState({shuffled: this.shuffle(this.state.word)}); }
[ "startWriting() {\n this.setState({\n writing: true,\n genre: Genres.array[Math.floor(Math.random() * (Genres.array.length))],\n keyword: Keywords.array[Math.floor(Math.random() * (Keywords.array.length))],\n img: Imgs.array[Math.floor(Math.random() * (Imgs.array.length - 1))],\n imgActi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the signed area for the polygon ring. Postive areas are exterior rings and have a clockwise winding. Negative areas are interior rings and have a counter clockwise ordering.
function calculateSignedArea(ring) { var sum = 0; for (var i = 0, len = ring.length, j = len - 1, p1 = void 0, p2 = void 0; i < len; j = i++) { p1 = ring[i]; p2 = ring[j]; sum += (p2.x - p1.x) * (p1.y + p2.y); } return sum; }
[ "function sumPolygon(n) {\n\treturn (n-2) * 180;\n}", "get area() {\n\n // Check if the face is bound to a mesh and if not throw an error\n if (!this.mesh) throw new Error(`Cannot compute the face area - the face is not bound to a Mesh`);\n \n // Calculate the area of a triangle = norm(cross product(a-b...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A module graph class.
function ModuleGraph(moduleData) { var self = this; var modules = {}; var moduleNameList = []; moduleData.forEach(function(info) { var m = new Module(info); modules[info.name] = m; moduleNameList.push(info.name); }); /** * Get a list of all module names. * @return {Array.<string>} List of...
[ "constructor() {\n // map module.id -> [outgoing connections]\n this.outEdges = {};\n\n // map module.id -> [incoming connections]\n this.inEdges = {};\n\n // map module.id -> module\n this.modules = {};\n\n this.allEdges = [];\n }", "constructor() {\n this.graph = {};\n }", "fun...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Let the state know that a guild has been selected
selectGuild(id){ this.setState((state, props) => ({ selectedGuild: this.state.guilds[id] }), ()=>this.createChannelListForGuild(this.state.selectedGuild)); }
[ "function unselectGuild() {\n if (scheduledCmds[selectedGuild]) {\n for (let i = 0; i < scheduledCmds[selectedGuild].length; i++) {\n clearTimeout(scheduledCmds[selectedGuild][i].timeout);\n }\n }\n selectedGuild = null;\n mainBody.children[0].classList.remove('hidden');\n if (mainBo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Assert a parser is available.
function assertParser(name, Parser) { if (typeof Parser !== 'function') { throw new Error('Cannot `' + name + '` without `Parser`') } }
[ "static canParse( testName ) {\n const benchmarkParserKey = Utils.getBenchmarkParserKey(testName);\n if(benchmarkParserKey) {\n return true;\n }\n return false;\n }", "static getParser (name) {\n return require(`./parsers/${name}.js`);\n }", "function check (xml, pa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes a theme from "active themes" list, so it won't get applied to any charts created subsequently.
function unuseTheme(value) { _Array__WEBPACK_IMPORTED_MODULE_13__["remove"](_Registry__WEBPACK_IMPORTED_MODULE_1__["registry"].themes, value); }
[ "function applyTheme(themeName) {\n document.body.classList = '';\n document.body.classList.add(themeName);\n document.cookie = 'theme=' + themeName;\n }", "function destroy(id) {\n return models.Theme\n .destroy({\n where: { id }\n });\n}", "resetCustomColors() {\n this.themeSwitch...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
function delete login Tokens
function deleteTokens(){ localStorage.removeItem("cookie"); localStorage.removeItem("sessionId"); localStorage.removeItem("emailAddress"); }
[ "function logout(){\n tokenFactory.deleteToken();\n $window.location.reload();\n }", "function logout() {\n // clear the token\n AuthToken.setToken();\n }", "function logOut() {\n localStorage.removeItem('token');\n newView();\n}", "function logO...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }