query
stringlengths
9
34k
document
stringlengths
8
5.39M
negatives
listlengths
19
20
metadata
dict
attribute value contains string
'*=' ({ attr, value, insensitive }) { return attr.includes(value) }
[ "function containsAttribute( text, name, value ) {\n if (!text) {\n return false;\n }\n\n if ( value && text.indexOf(value) === -1) {\n return false;\n }\n\n if ( parseAttributes(text)[ name.toLowerCase() ] != value ) {\n return false;\n }\n\n return true;\n\n }", "hasValue(at...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
the current graph being edited when the graph is clicked, bring up the equation div
function graphClicked(graphNo) { curGraphNo = graphNo; expressionInput.style.display = "block"; expressionInput.value = graphEquations[graphNo]; }
[ "function editGraph() {\r\n\r\n // Clear animation components (function in animation.js)\r\n clearAnimation();\r\n\r\n // Change algorithm animation controls to graph editing controls\r\n $(\"#algorithm-controls\").hide();\r\n $(\"#graph-controls\").fadeIn();\r\n $(\"#graph...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Write a recursive function called flatten which accepts an array of arrays and returns a new array with all values flattened.
function flatten(arr){ var finalArray = []; function helper(arr) { for (let i = 0; i < arr.length; i++) { if (Array.isArray(arr[i])) { helper(arr[i]) } else { finalArray.push(arr[i]); } } } helper(arr); return finalArray; }
[ "function flatten(array) {}", "function flattenArray(arrays) {}", "function recursiveFlatten(arr) {\n var res = arguments.length <= 1 || arguments[1] === undefined ? [] : arguments[1];\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Event listener for menuclose button. Adds a "display:none;" inline style to the menu container. This is why we have to remove this style when we resize back to desktop size. Remove the class which has the styling elements for the nav menu
menuClose(event) { var navItem = document.getElementsByTagName('nav')[0]; if (navItem.style.display === 'block') { navItem.style.display = 'none'; navItem.classList.remove('menuhidden'); } }
[ "function closeMenu() {\n document.getElementById('menu-overlay').classList.remove('show-menu-overlay');\n document.getElementById('menu-backdrop').classList.add('d-none');\n}", "function closeMenu(event) {\n console.log(\"close menu\");\n menu.classList.remove('showMenu');\n event.preventDefault()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Displays the node and its descendants recursively, applying transfomations, textures and materials
display() { this.scene.pushMatrix(); this.scene.multMatrix(this.transfMatrix); /*Add the new transformation matrix to this node and all its descendants*/ /*if this node is keyframe animated and the animation has not started yet, node cann...
[ "displayScene() {\n //To do: Create display loop for transversing the scene graph, calling the root node's display function\n var matId = this.nodes[this.idRoot].getMaterial();\n var texId = this.nodes[this.idRoot].getTexture();\n this.processNode(this.idRoot, texId, matId);\n }", "...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Display an error at the top of the page If this isn't showing, make sure it's not hidden under the header/footer
function displayTopError(e){ // Create nodes if the error isn't already shown if(!document.getElementsByClassName("top-error")[0]){ var error = document.createElement("div"); error.className = "top-error"; error.innerHTML = e; document.getElementsByTagName("body")[0].appendChild(error); } else { ...
[ "function displayError() {\n\t\t// Hide loading animations\n\t\tdocument.getElementById(\"loadingmeaning\").style.display = \"none\";\n\t\tdocument.getElementById(\"loadinggraph\").style.display = \"none\";\n\t\tdocument.getElementById(\"loadingcelebs\").style.display = \"none\";\n\t\t\n\t\t// Display error at bott...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
nexttime Month Select Element Delete
function nexttimeMonthDelete(){ var element = document.getElementById("nexttime_month"); var length = element.length; nexttime.month = 0; for(var i = 0; i < length - 1; i++){ element.removeChild(element.lastChild); } nexttimeDayDelete(); }
[ "function acceptMonthDelete(){\n\tvar element = document.getElementById(\"accept_month\");\n\tvar length = element.length;\n\taccept.month = 0;\n\t\n\tfor(var i = 0; i < length - 1; i++){\n\t\telement.removeChild(element.lastChild);\n\t}\n\t\n\tacceptDayDelete();\n}", "function participateMonthDelete(){\n\tvar el...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Show the first div and hide the second one
function showHideTwoDiv(fDivId, sDivId) { if (document.getElementById(fDivId).style.display == 'none') { document.getElementById(fDivId).style.display = 'block'; document.getElementById(sDivId).style.display = 'none'; } }
[ "function pageTwo() {\n\n $(\".pageOne\").hide()\n $(\".pageTwo\").show()\n }", "function hideshow1(main, second) {\n\n if (main.val() != \"\") {\n\n second.show(\"fast\");\n\n }\n\n else {\n\n second.hide(\"fast\");\n\n }\n\n}", "function article (art1, art2) {\nart1....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Name JSON file recent.json
function recentPath(apiPage) { return path.join(baseUrl, 'list', 'recent.json'); }
[ "function getJsonName() {\n // get path, e.g. \"...../afHtml3Example_POSTFIX12MD5/index.html\"\n var loc = window.location.pathname;\n // cut off file, e.g. \"...../afHtml3Example_POSTFIX12MD5\"\n loc = loc.substring(0, loc.lastIndexOf('/'));\n // cut off md5, e.g. \"...../afHtml3Example\"\n loc = loc.substri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return if a component is loaded.
function isComponentLoaded(hass, component) { return hass && hass.config.components.indexOf(component) !== -1; }
[ "isLoad() {\n if( this.loaded ) return true; \n var load = true;\n\t\tthis.elements.forEach(e => { \n\t\t\tif(!e.loaded) {\n load = false;\n }\n });\n\n if( !load ) return false;\n this.loaded = true;\n\t\tthis.dispatch(\"load\");\n\t\treturn true;\n }", "isLoaded() { return !!this.loa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return a vector in the graphicworld by interpreting a gameworld position.
function graphic_position(vec2){ return new Vector2({ x: (vec2.x * PIXELS_PER_TILES_SIDE) - HALF_PIXELS_PER_TILES_SIDE , y: (vec2.y * PIXELS_PER_TILES_SIDE) - HALF_PIXELS_PER_TILES_SIDE }); }
[ "get WorldPosition() // It might be better if this value was catched\n {\n return {\n x: this.__worldPosition.x + this.__translatedOffset.x,\n y: this.__worldPosition.y + this.__translatedOffset.y\n }\n }", "function toWorldCoords(position) {\n var vector = new THREE.V...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this function takes an array of drivers with their first and last name separated by a space, and returns an array of JavaScript objects with firstName and lastName attributes returns list of objects with appropriate first and last names
function nameToAttributes (list) { return list.map(function (driver) { const driverFirst = driver.split(' ')[0]; const driverLast = driver.split(' ')[1]; return { firstName: driverFirst, lastName: driverLast }; }); }
[ "function nameToAttributes(drivers) {\n return drivers.map(function(driver){\n const names = driver.split(\" \");\n return Object.assign({},{firstName: names[0]}, {lastName: names[1]});\n }); \n}", "function nameToAttributes(driverArray) {\n return driverArray.map( function(driver) {\n con...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
assocKey :: trie:Trie > parts:[String] > value:Any > Trie Given a list of keys and a value return a new trie with the value inserted in that nested key
function assocKey(trie, parts, value) { var part = parts[0] // if parts.length === 1 then just assoc if (parts.length === 1) { trie = assocValue(trie, part, value) } // else we must create a placeholder if it does not exist else { var existingHash = get(trie, part) if (!...
[ "function assocKey(trie, parts, value) {\n var part = parts[0]\n var len = parts.length\n\n // if parts.length === 1 then just assoc\n if (parts.length === 1) {\n trie = assocValue(trie, part, value)\n }\n // else we must create a placeholder if it does not exist\n else {\n var ex...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
function to load friends
function loadFriends() { //get array of friends FB.api('/me/friends', function(response) { console.log(response); var divContainer=$('.facebook-friends'); //alert(response.data.length); fb_users(response.data); }); }
[ "function loadFriends() {\n\n\tFB.api('/me/friends', function(response) {\n\n\t\taddFriend(me().name, me().id);\n\n\t\tfor (var i = 0; i < response.data.length; i++) {\n\t\t\taddFriend(response.data[i].name, response.data[i].id);\n\t\t}\n\n\t\tsetTypeahead();\n\t\t//getPhotos([\"Brad Girardeau\",\"Ben Girardeau\"])...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handle request to duplicate/edit/use self's selCrit.
handleDuplicateSelCrit() { const p = this.props; // start an edit session with a duplicated (new) selCrit const dupSelCrit = SelCrit.duplicate(p.selCrit); p.dispatch( actions.selCrit.edit(dupSelCrit, true, // isNew SelCrit.SyncD...
[ "handleNewSelCrit() {\n const p = this.props;\n\n // start an edit session with a new selCrit of specified itemType\n const selCrit = SelCrit.new(this.meta().itemType);\n p.dispatch( actions.selCrit.edit(selCrit, \n true, // isNew\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Stringify a link. When no title exists, the compiled `children` equal `url`, and `url` starts with a protocol, an auto link is created: ```markdown 'An "example" email') ``` Supports named entities in the `url` and `title` when in `settings.encode` mode.
function link(node) { var self = this var content = self.encode(node.url || '', node) var exit = self.enterLink() var escaped = self.encode(self.escape(node.url || '', node)) var value = self.all(node).join('') exit() if (node.title == null && protocol.test(content) && escaped === value) { // Backsl...
[ "linkify(title, link)\n {\n if((link === null) || (link === undefined))\n {\n return(\"<em>\"+title+\"</em>\");\n }\n else return(\"<em><a href=\\\"\"+link+\"\\\">\"+title+\"</a></em>\");\n }", "function makeLink(title, url) {\n return '<a href=\"' + url + '>' + title + '</a>';\n}", "functio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the CSS for the supplied instance.
function getInstanceCss(widgetInstance, widgetInstanceDir) { // Match value will be a combination of widget ID and widget instance ID. We want to replace this with something // neutral that we can transform again when put the code back up. return copyFieldContentsToFile("getWidgetLess", widgetInstance.id, "sourc...
[ "get css() {\n\t\treturn getCSSAsJSON(this);\n\t}", "getCss() {\n var cssCollection = this.getSectionsOfType('css');\n return this.concatenate(cssCollection);\n }", "function getCSSObj()\n {\n return cssObj;\n }", "static get styles() {\n return styles;\n }", "_getSty...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
funcion creada para mostrar el div que contiene el formulario de la creacion de una noticia
function mostrarDiv(idmuestra,idoculta){ var ident="#"+idmuestra; var identOculta="#"+idoculta; $(identOculta).hide(); $(ident).show(); }
[ "function mostrarDIV(){\r\n\t\tget(idDIV).style.visibility = 'visible';\r\n\t}", "function createInfoboxHtml(codclient,fullname, departamento, address, referencia,district,id) {\n var boxText = document.createElement(\"div\");\n\t\t\tboxText.innerHTML = \"<div class='IFcontainer'>\"+\n\t\t\t\t\t\t\t\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
compute and return a stat object for bms.
function stat(bms) { var object = {} // find max measure ;(function() { var maxMeasure = 0 bms.events.forEach(function(event) { maxMeasure = Math.max(maxMeasure, event.measure) }) ;(function() { for (var id in bms.measureSizes) { var measure = parseInt(id, 10) ...
[ "function getStat() {\n\t\tvar number = Math.round(Math.random() * 10);\n\t\n\t \tvar stat\t= new Object();\n\t \tstat.start_time = Math.round(Math.random() * 100) + \":\" + Math.round(Math.random() * 100);\n\t \tstat.completed_count = 0;\n\t \tstat.busy_time = Math.round(Math.random() * 100) + \":\" + Math...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
verifyCommandInputValidity Checks command input's content to verify its validity (beginning with ':').
verifyCommandInputValidity() { if (this.mode == Editor.MODE_COMMAND) { if (this.commandInput.getContent()[0] != ":") this.changeMode(Editor.MODE_GENERAL); } }
[ "function checkCommand(input, command) {\n input = $.trim(input);\n matcherTrim = input.split(' ');\n matcherPart = matcherTrim[0];\n if (matcherPart == command) {\n return true;\n } else {\n return false;\n }\n}", "checkCommandFormat(command) {\n //check chars \n if (!/[a-zA-Z0-9\\:\\.]...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get index of parent assignment for assignment with given idx
function assignmentsGetParentIdx(idx) { var targetLevel = assignments[idx].level - 1; for (var i=idx-1; i>=0; i--) { if (assignments[i].level == targetLevel) return i; } return -1; }
[ "parentIndex(idx) {\n\t\treturn Math.floor((idx - 1) / 2);\n\t}", "function parentIdx(idx) {\n return (idx - 1) >> 1;\n}", "getParentIndex(parentName, nodes){\n let indexParent = -1;\n for(let k=0;k<nodes.length;k++){\n if(parentName === nodes[k].id)\n indexParent = k;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
check for if the seconds is < 10, if so then add additional 0's infront of integer
function checkSeconds(sec) { if(sec < 10 && sec >= 0) { sec = "0" + sec; } return sec; }
[ "function renderTimer() {\n // HELP: This adds an additional zero to the displayed timer after the interval has been cleared. How do I make this only add an additional zero if the seconds are under 10 AND if the timer is not stopped.\n if (seconds < 10) {\n seconds = \"0\" + seconds.toString();\n }\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
partial itself is partial, e.g. partial(_, a, _)(f) = partial(f, a, _)
function partial() { var args = Array.prototype.slice.call(arguments, 0), subpos = args.reduce(function (blanks, arg, i) { return arg === _ ? blanks.concat([i]) : blanks; }, []); if (subpos.length === 0) { return args[0].apply(undefined, args.s...
[ "function partial(f) {\r\n var as = slice(arguments, 1);\r\n var has_ = indexOf(as, _) !== -1;\r\n\r\n return function() {\r\n var rest = slice(arguments);\r\n\r\n // Don't waste time checking for placeholders if there aren't any.\r\n var args = has_ ? take(as.l...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handler for the release() system call. path: the path to the file fh: the optional file handle originally returned by open(), or 0 if it wasn't cb: a callback of the form cb(err), where err is the Posix return code.
function release(path, fh, cb) { cb(0); }
[ "function release(path, fh, cb) {\n fs.close(fh, function closeCb(err) {\n if (err) \n return cb(-excToErrno(err));\n cb(0);\n });\n}", "function release(path, fd, callback) {\n delete files[fd];\n callback(0);\n }", "release() {\n if (this.isReleased) {\n throw new Er...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Atualiza a lista de armas.
function _AtualizaListaArmas() { _AtualizaListaArmasArmaduras( 'armas', Dom('div-equipamentos-armas'), gPersonagem.armas, AdicionaArma); }
[ "function _AtualizaListaArmaduras() {\n _AtualizaListaArmasArmaduras(\n 'armaduras', Dom('div-equipamentos-armaduras'), gPersonagem.armaduras, AdicionaArmadura);\n}", "function _ConverteListaArmas() {\n // Tem que manter sempre a primeira arma imutavel (desarmado).\n // A mesma coisa ocorre no atualiza, a...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
return JSON for the change properties
changePropsToJSON(showPropertyHistoryOnly) { const propertyJSON = { lastSavedBy : this.savedBy ? this.savedBy : null, lastChangedBy : this.changedBy ? this.changedBy : null, lastSaved : this.savedAt ? this.savedAt.toJSON() : null, lastChanged : this.changedAt ? th...
[ "toJSON() {\n return this._medicationBeforeChange.toJSON();\n }", "toJSON() {\n return this._medicationChange.toJSON();\n }", "toJSON() {\n return this._medicationAfterChange.toJSON();\n }", "toJSON() {\r\n const out = {};\r\n if (Object.keys(this.create).length) out.create...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
assuming the whole buffer has been sent, lets try to reassemble it.
function reassembleBuffer(buffer) { //first thing to do it get the header which contains the buffer size and chunk size var header = new Uint32Array(buffer, 0, 4); var dataSize = header[1]; //data size in bytes var chunkSize = header[2]; //now we need to work backwards from splitBuffer var additio...
[ "function sendFragmented() {\n\t\t\tif (sendQueue.length) {\n\t\t\t\tvar sendData = sendQueue[0];\n\t\t\t\tif (sendData.length >= 1024) {\n\t\t\t\t\tsocket.write(sendData.slice(0, 1024));\n\t\t\t\t\tsendQueue[0] = sendData.slice(1024);\n\t\t\t\t} else {\n\t\t\t\t\tsocket.write(sendData);\n\t\t\t\t\tsendQueue[0] = B...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Inserts the script for a basic describe block
function addDescribe() { var myCode = 'describe("", function() {\n'; myCode = myCode + '\n'; myCode = myCode + '\t\t\tit("", function() {\n'; myCode = myCode + '\t\t\t\t\n'; myCode = myCode + '\t\t\t});\n'; myCode = myCode + '\n'; myCode = myCode + '\t\t});\n'; var...
[ "function getDescription() {\n\treturn 'A template for writing plug-in scripts.';\n}", "enterFullDescribeStatement(ctx) {\n\t}", "function helpInit () {\n console.log(\" Examples: \\n\\n\"+\n \" ts-boilerplate init --name myLibrary --type library\\n\"+\n \" ts-boilerplate init -n myWidge...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
=================================================================== from functions/interpreted/optimise/stack/Stack_A_A_R.java =================================================================== Needed early: StackFunctionSupport PORT NOTE: We've changed all original uses of the constructor (which were only reflection ...
function Stack_A_A_R() { }
[ "function Stack() {}", "function Stack_A_R() {\r\n}", "function Stack_A_A_A() {\r\n}", "function Stack_A_A() {\r\n}", "function Stack_A() {\r\n}", "function Stack_R() {\r\n}", "function Stack() {\n this.stack = [new Scope()];\n}", "function StackFunctionSupport() {\r\n}", "static of(construct) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
msg send function END / put msg count on dialogs index
function putNewMsgCount (count, dialog_id, text, add_time) { if (parseInt(dialog_id)>0) { if ($('#dialog_'+dialog_id).length) { if (count>0) { //alert($('#dialog_'+dialog_id+' .dialogue-count').length) if ($('#dialog_'+dialog_id+' .dialogue-count').length) { ...
[ "static waitMessageEnd() {\n $('#wmsg-modal').hide();\n }", "function habilitarChat(listMsg,context,num){\n var tam = listMsg.length;//solo verificamos el ultimo mensaje\n if(tam>0){\n var contador = 0;\n if(tam==1){\n sendMessageChangeInput('nuevo',context);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this function adds character sets to the pwChoices array
function findPwChoices() { if (specChar === true) { pwChoices = pwChoices + specCharSet; } if (lwrChar === true) { pwChoices = pwChoices + lwrCharSet; } if (uprChar === true) { pwChoices = pwChoices + uprCharSet; } if (numChar === true) { pwChoices = pwChoices...
[ "function enterCharacterSets(){\n if (yesLowercase) {\n for( var i=0; i < lowerCase.length; i++ ) {\n useTheseCharacters.push(lowerCase[i]);\n }\n } \n if (yesUppercase) {\n for( var i=0; i < upperCase.length; i++ ) {\n useTheseCharacters.push(upperCase[i]);\n }\n } \n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Helper to check if user is the author of an object
function isAuthor(req,author) { return req.session && req.session.user && ((req.session.user.username === author) || req.session.user.isAdmin); }
[ "function ownByEditor(articleAuthor, req){\n\tif (articleAuthor._id.toString() != req.user._id.toString()){\n\t\treturn false;\n\t} else\n\t{\n\t\treturn true;\n\t} \n}", "function isCommentAuthor(author) {\n return divvy.currentUser == author;\n }", "function isDiscussionAuthor(author) {\n ret...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets a collection of related records. Will updated the related store and trigger events from it. Not to be called directly, called from Model setter.
setCollection(model, name, records) { const { config, store } = this.collectionStores[name]; if (!store.relationCache[config.relationName]) store.relationCache[config.relationName] = {}; const old = (store.relationCache[config.relationName][model.id] || []).slice(), added = [], remov...
[ "set(models) {\n models = models ? _compact(models) : [];\n\n if (this.isNew()) {\n association._cachedChildren = models instanceof Collection ? models : new Collection(association.modelName, models);\n\n } else {\n\n // Set current children's fk to null\n let query =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Render this items relationships
renderRelationships () { const { relationships } = this.props.currentList; const keys = Object.keys(relationships); if (!keys.length) return; return ( <div className="Relationships"> <Container> <h2>Relationships</h2> {keys.map(key => { const relationship = relationships[key]; const...
[ "static renderChildAndPartnerLinks() {\n for (const [, persons] of NacartaChart.generations)\n for (const person of persons) {\n const personBox = jQuery(`#box-${person.id}`);\n if (person.children)\n for (const child of person.children)\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
PRIVATE Writes the network element's background inside the main span of the network element.
function writeBgNE() { if (this.bgForm == ROUNDRECT) { var rect = document.createElement("v:roundrect"); rect.setAttribute("id", this.rectid); rect.setAttribute("arcSize", this.roundCornerPercentage); var elem = document.getElementById(this.id).appendChild(rect); elem.style.position = "absolute"; el...
[ "function writeImageNE() {\n\t\tvar elem = document.getElementById(this.id).appendChild(document.createElement(\"span\"));\n\t\telem.style.position = \"absolute\";\n\t\telem.style.left = 0;\n\t\telem.style.width = this.width;\n\t\telem.style.backgroundImage = \"url(\" + this.image + \")\";\n\t\tvar pos = NAME_CENTE...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes all readers of a given name.
removeReaderByName(name) { this._readers = this._readers.filter((reader) => reader.name !== name); }
[ "function stopReaders() {\n for (var reader in _readers) {\n _readers[reader].stop();\n }\n }", "function removeTagsByName(name) {\n var elements = document.getElementsByTagName(name);\n while (elements[0]) {\n elements[0].parentNode.removeChild(elements[0]);\n }\n}", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add an XYZ tile layer to the map.
function addXYZTileLayer({ title = 'xyz', url, tileSize = 256, visible = true, base = false, attribution = '', }) { const attributions = [attribution]; const source = new XYZ({ url, tileSize, attributions, }); const layer = new TileLayer({ title, source, visible, type: base ? 'base...
[ "function addXYZLayer(name, url, attribution, visible){\n var visibility = false;\n if (visible){\n visibility = true;\n }\n var source = new ol.source.XYZ({\n url: url\n });\n if (attribution){\n source.s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes node and any edges coming from or to that node
removeNode(node) { assertHasNode(this, node); for (let [type, nodesForType] of this.inboundEdges.get(node.id)) { for (let from of nodesForType) { this.removeEdge(from, node.id, type, // Do not allow orphans to be removed as this node could be one // and is already being removed. f...
[ "removeNode(node) {\n\t\tthis.nodes = this.nodes.filter(n => n !== node);\n\t\tfor (const e of this.edgesIncluding(node)) {\n\t\t\tthis.removeEdge(e);\n\t\t}\n\t}", "function removeNode(node){\n\n // Remove incoming edges.\n Object.keys(edges).forEach(function (u){\n edges[u].forEach(functi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Update a online test
function updateOnlineTest(idOnlineTest, onlineTestData) { const requestOptions = { method: 'PATCH', headers: { 'Content-Type': 'application/json', Authorization: authHeader(), }, }; const url = `/document_online/${idOnlineTest}/`; return axios.patch(`${apiUrl}${url}`, onlineTestData, r...
[ "function updateContests() {}", "updateTest() {\n // run the editors save method\n this.$refs.textEditor.saveEditorData()\n // update the document\n db.collection(\"tests\")\n .doc(this.$route.params.test_id)\n .update({\n title: this.title,\n type: this.departm...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
GotoCommand in constructor gets reference on instance which is instanced from ProgramJumpHandler and save it to this.variable
constructor() { this.jumpRequestedHandler = null; }
[ "jumpTo(position = 0) {\n this.at = position;\n }", "@action jumpTo(newX, newY) {\n this.x = newX\n this.y = newY\n }", "jump(_pos) {\r\n\t\tthis.mstep = _pos;\r\n\t}", "jumpTo(position)\n {}", "function JumpVariable(startingAddress) {\n this.startingAddress = startingAddress;\n th...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reload assignes select field and removes the already added assignees from the select field
function reload_assignees_select() { $.get(admin_url + 'supports/reload_assignees_select/' + supportid, function (response) { $('select[name="select-assignees"]').html(response); $('select[name="select-assignees"]').selectpicker('refresh'); }); }
[ "function reload_assignees_select() {\n $.get(admin_url + 'tasks/reload_assignees_select/' + taskid, function(response) {\n $('select[name=\"select-assignees\"]').html(response);\n $('select[name=\"select-assignees\"]').selectpicker('refresh');\n });\n}", "function removeAssignSelected(){\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
ProductService must be passed as argument here so we can access services in controller.
function ShopController(ProductService){ this.sortOrder = "price"; this.newItem = {}; this.taxRate = 1.0575; // Calling getAll() to retrieve list of all items from service. this.items = ProductService.getAll(); /** * Calling addNew() function in service by using this function * @para...
[ "function ProductComponent(productService, router, cartStore) {\n this.productService = productService;\n this.router = router;\n this.cartStore = cartStore;\n }", "function loadProduct() {\n var product = AddProduct.getProduct();\n if (!$.isEmptyObjec...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function: _fnBuildSearchRow Purpose: Create a searchable string from a single data row Returns: Inputs: object:oSettings dataTables settings object array:aData aoData[]._aData array to use for the data to search
function _fnBuildSearchRow( oSettings, aData ) { var sSearch = ''; var nTmp = document.createElement('div'); for ( var j=0, jLen=oSettings.aoColumns.length ; j<jLen ; j++ ) { if ( oSettings.aoColumns[j].bSearchable ) { var sData = aData[j]; sSearch += _fnDataToSearch( sData, oSetting...
[ "function _fnBuildSearchRow(oSettings, aData) {\n\t\t\tvar sSearch = '';\n\t\t\tvar nTmp = document.createElement('div');\n\n\t\t\tfor (var j = 0, jLen = oSettings.aoColumns.length; j < jLen; j++) {\n\t\t\t\tif (oSettings.aoColumns[j].bSearchable) {\n\t\t\t\t\tvar sData = aData[j];\n\t\t\t\t\tsSearch += _fnDataToSe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clash function so I can have both lightsabers on screen and the animation one more time after the last move.
function clash() { $("#lightsaber1").removeClass("off"); $("#lightsaber2").removeClass("off"); $("#lightsaber2").addClass("on"); anim(); }
[ "function moveLaser() {\n squares[currentLaserIndex].classList.remove(\"laser\")\n currentLaserIndex -= width\n squares[currentLaserIndex].classList.add(\"laser\")\n if (squares[currentLaserIndex].classList.contains(\"invader\")) {\n squares[currentLaserInd...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handles the case where a state which is the target of a transition is not found, and the user can optionally retry or defer the transition
function handleRedirect(redirect, state, params, options) { var evt = $rootScope.$broadcast('$stateNotFound', redirect, state, params), retryTransition; if (evt.defaultPrevented) { $urlRouter.update(); return TransitionAborted...
[ "performTransition (trans) {\r\n if (trans === Transition.NullTransition) {\r\n return\r\n }\r\n const id = this.currentState.GetOutputState(trans)\r\n if (id === StateId.NullStateId) {\r\n return\r\n }\r\n // Update currentState\r\n this.currentStateId = id\r\n const state = this....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
1. Write a function named `sortedPlanets` that returns an array of the planet names sorted alphabetically.
function sortedPlanets(array) { return array.sort(); }
[ "function sortedPlanets(Planets) {\n\treturn Planets.sort();\n}", "function sortedPlanets(){\n var alpha = Planets.sort();\n console.log(alpha);\n}", "function sortedPlanets() {\n\tPlanets.sort();\n\tdocument.write(Planets);\n}", "function sortPlanets(planets){\r\n var sorted = {};\r\n foreach(planets...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tokenize filename and output all tokens. Using CLI this is enabled with `dumptokens`. Mostly useful for debugging.
dumpTokens(filename) { const config = this.getConfigFor(filename); const resolved = config.resolve(); const source = resolved.transformFilename(filename); const engine = new Engine(resolved, Parser); return engine.dumpTokens(source); }
[ "dumpTokens(filename) {\n const config = this.getConfigFor(filename);\n const source = config.transformFilename(filename);\n const engine = new engine_1.Engine(config, parser_1.Parser);\n return engine.dumpTokens(source);\n }", "generateBuiltInTokenizer() {\n this.writeData('TOKE...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Result of teamKP are teamPP var tn = document.getElementsByClassName('teamName'); var kpe = document.getElementsByClassName('teamKP'); var ppe = document.getElementsByClassName('teamPP'); var tpe = document.getElementsByClassName('teamTP'); var teamName = ["Team1", "Team2", "Team3", "Team4", "Team5", "Team6", "Team7", ...
function result() { // Teams Names Array var tn = document.getElementsByClassName('teamName'); var teams = []; // Teams First Map Stats Array var m1k = document.getElementsByClassName('m1k'); var m1p = document.getElementsByClassName('m1p'); // Teams Second Map Stats Array var m2k = document.get...
[ "function createTeam(arr1,arr2){\n cleanBoard();\n for (i=0; i <= arr1.length-1; i++) {\n document.getElementById(\"team1\").innerHTML += \"<li class=\\\"list-group-item\\\">Name : {n} || Skill : {s} </li>\".replace(\"{n}\", (arr1[i])).replace(\"{s}\", people[arr1[i]]);\n }\n\n for (i=0; i <=...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to add many playlists to db
static addPlaylists(playlists) { return fetch('http://localhost:8888/insertplaylists/', { method: 'POST', headers: { 'Accept': 'application/json', 'Content-Type': 'application/json' }, body: JSON.stringify(playlists) }).then...
[ "async function addPlays(data) {\n\n for (let ii = 0; ii < data.length; ii++) {\n\tvar play = new Play(data[ii]);\n\tdata[ii] = await play.save();\n }\n return data;\n}", "addPlaylist(playlist) {\n this._playlists.push(playlist);\n }", "addToPlaylist(track, playlistName) {\n let self = this;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
unfreeze site when returning from external link
function unFreezeSite(){ if(this.verbose)console.log('navigation_unFreezeSite'); if (oblio.sections[sectionID].unfreeze) { oblio.sections[sectionID].unfreeze(); } }
[ "function TempFreezeurlBox() {\n\t\twindow.requestInLastTenSeconds = true;\n\t\tfetchingHideTheURLBox();\n\t\tsetTimeout(function () {\n\t\t\twindow.requestInLastTenSeconds = false;\n\t\t}, 5000);\n\t}", "function SafeBrowsing(){}", "function unFreezeSite(){\n \tif(this.verbose)console.log('navigation_unFree...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Internal functions Set or update graph time range, start automatic reloading graphBox: jQuery object, reference to graph div box range: time range (day, hour, ...) initMode: don't immediately reload graph, but force timers and attributes update
function _rrdimg_setRange(graphBox, range, initMode = false) { if(! ((graphBox instanceof jQuery) && (graphBox.length === 1))) { return; //graphBox element missing } // Check range parameter, default to "day" on error if(! ["hour", "day", "week", "month", "year"].includes(range)) { range = "day"; } // Check...
[ "function setRange(time){\n if(activechart){\n charts[activechart].setRange(time);\n }\n}", "function setTimeSlider() {\n $('.range-slider').jRange({\n from: 1980,\n to: 2016,\n step: 1,\n scale: [1980, 1985, 1990, 1995, 2000, 2005, 2010, 2015, 2016],\n format: '...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Given a URL with a selection hash, decode it, apply it, and scroll to it.
function scrollToSelectionHash(url) { var match = url.hash.match(/^#sel-([A-Za-z0-9-_]+)$/); if (!match) { return; } currentEncodedRange = match[1]; currentRange = decodeRange(currentEncodedRange); var rect = currentRange.getBoundingClientRect(); var topOffset = Math.max( 20, Math.floor((windo...
[ "function scrollToSelectionHash(url) {\n var match = url.hash.match(/^#sel-([A-Za-z0-9-_]+)$/);\n if (!match) {\n return;\n }\n var selection = document.getSelection();\n var range = decodeRange(match[1]);\n var rect = range.getBoundingClientRect();\n var topOffset = Math.max(\n 20,\n Math.floor((wi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Update a group's proxy elements' positions. If the group does not exist, nothing happens.
updateGroupProxyElementPositions(groupKey) { const group = this.groups[groupKey]; if (group) { group.proxyElements.forEach((el) => el.refreshPosition()); } }
[ "updateProxyElementPositions() {\n Object.keys(this.groups).forEach(this.updateGroupProxyElementPositions.bind(this));\n }", "updateGroupOrder(groupKeys) {\n // Store so that we can update order when a new group is created\n this.groupOrder = groupKeys.slice();\n // Don't unnecessar...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Stores the initial state and current state for all registered modules in the (hidden) form field specified during initialization.
function _storeStates() { var initialStates = [], currentStates = []; Y.Object.each(G._modules, function (module, moduleId) { initialStates.push(moduleId + '=' + module.initialState); currentStates.push(moduleId + '=' + module.currentState); }); G._stateField.se...
[ "function _storeStates() {\n var initialStates = [];\n var currentStates = [];\n for ( var moduleName in _modules ) {\n var moduleObj = _modules[moduleName];\n initialStates.push( moduleName + \"=\" + moduleObj.initialState );\n currentStates.push( moduleName + ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Restore original content in video (e.g. poster image)
restore() { if (!this.originalContent) { throw new Error('VimeoPlayer: this.originalContent is not set; make sure you only restore the original content after the video was dispalyed.') } this.innerHTML = this.originalContent; this.originalContent = null; }
[ "restore() {\n if (!this.originalContent) {\n throw new Error('VimeoPlayer: this.originalContent is not set; make sure you only restore the original content after the video was dispalyed.')\n }\n this.innerHTML = this.originalContent;\n this.originalContent...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Trying to create an ImageComponent that has its own unique modal. I was hoping that if each ImageComponent passed down its own props to a child modal that each child modal owuld be unique to its parent ImageComponent. This isn't yet successful
function ImageComponent(props) { return ( <div className="imageComponent" onClick={props.openModalProp} url={props.url} key={props.key} > <img src={props.thumbnailUrl} title={props.title} id={props.id} className="thumbnail" alt={"box number...
[ "getModal() {\n let props = this.getProps();\n let modal;\n switch (this.state.step) {\n case 2:\n modal = <PollReview {...props} />;\n break;\n case 3:\n modal = <PollLocation {...props} />;\n break;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the current right coordinate unit of the Control.
getRightUnit(){return this.__rightUnit}
[ "get right()\n {\n return (-this.x / this.scale.x) + this.worldScreenWidth;\n }", "get right() {\n return -this.x / this.scale.x + this.worldScreenWidth;\n }", "get right()\n {\n return (-this.x / this.scale.x) + this.worldScreenWidth;\n }", "get right() {\n re...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deliver CSS 'padding' or 'margin' rules derived from a shorthand string Expect a space delimited string of up to 4 elems, in the CSS shorthand order "top right bottom left" The values can be in known CSS units (12px), or numbers only (5) as SPACER multipliers (50px) If a '' is supplied for any direction, no rule is app...
function cssSpacing(rule, props) { // rule = ['margin', 'padding'].find(supportedRule => supportedRule === rule.trim()); if (!rule) return ''; var values = props[rule]; var top = void 0; var right = void 0; var bottom = void 0; var left = void 0; if (typeof values === 'number') { top = values + '...
[ "function spacingFromString(string) {\n if (!string || string == '')\n return null\n\n var spacing = {}\n\n var values = string.split(' ')\n\n // Check if first value is 'spacing'\n var spacingLayout = values[0]\n\n var layout = spacingLayout.slice(-1)\n if (layout == 'v' || layout == 'h') {\n // Spaci...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The component instance that will be returned by this function. It will be automatically called if instanceIns aliased port names properties changes in the scope (but only if the instance is not inhibited).
function componentInstance() { var ins = validateInput(instanceIns, arguments); var outs = transformer.apply(scope, ins); return validateAndAliasOutput(component.outs, outs, options.portsAlias); }
[ "get componentInstance() {\n const nativeElement = this.nativeNode;\n return nativeElement &&\n (getComponent(nativeElement) || getOwningComponent(nativeElement));\n }", "get componentInstance() {\n const nativeElement = this.nativeNode;\n return nativeElement && (getComponent(na...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this is to get the menuItem object via the row of that menu
function getMenuItemByMenuRow(menuRow) { var menuId = parseInt($(menuRow).attr('menu_id')); return dsMonAn.filter(function(item) { return item.id == menuId; })[0]; }
[ "function getMenuRow (item) {\n let menu = item.parentElement;\n let rowIndex = parseInt(menu.dataset.index, 10);\n let row;\n if (menu.id.startsWith(\"myr\")) { // A results table menu\n\trow = resultsTable.rows[rowIndex];\n }\n else { // A bookmarks table menu\n\trow = bookmarksTable.rows[rowIndex]; \n }\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the list of active symbol counts. If an empty or invalid symbol count range is given, the range will be set to its default value.
setActiveSymbolCounts(activeSymbolCounts) { this.activeSymbolCounts = activeSymbolCounts; if (this.activeSymbolCounts.length === 0) { this.activeSymbolCounts = SymbologySettings.defaultActiveSymbolCounts[this.symbology] ?? []; } return this; }
[ "setActiveSymbolCountsRange(minCount, maxCount) {\n this.activeSymbolCounts = SymbologySettings.getNumberRange(minCount, maxCount);\n if (this.activeSymbolCounts.length === 0) {\n this.activeSymbolCounts = SymbologySettings.defaultActiveSymbolCounts[this.symbology] ?? [];\n }\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Populate the sel_offense dropdown
function offense_dropdown(){ // Adapted from: https://www.encodedna.com/javascript/populate-select-dropdown-list-with-json-data-using-javascript.htm var ele = document.getElementById('sel_offense'); var offensechoice = Object.keys(offenseFormation) for (var i = 0; i < offensechoice.length; i++) { ele....
[ "populateEdificiNames() {\n services_1.Services.getAllBuildings().then(edificiResponse => {\n $.each(edificiResponse, (key, item) => {\n if (item.Stato === \"Disponibile\") {\n $('#selectEdificio').append(`<option name = \"${item.Nome}\" value = \"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
vertex constructor keeps track of its name and all edges connecting to another vertex
function Vertex(name){ this.name = name this.edges = [] }
[ "function vertex (name, graph)\n{\n\t//list of methods:\n\tthis.addInfo=addInfo; \n\tthis.listConnected1=listConnected1; \n\tthis.listConnected2=listConnected2; \n\tthis.deleteEdge=deleteEdge; \n\tthis.deleteSelf=deleteSelf; \n\tthis.addEdgeInfo=addEdgeInfo; \n\tthis.getDatum=getDatum;\n\t\n\t\n\t\n\t//beginning of...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Maps our modified fs.Stats objects to file paths
function map(stats) { return stats.path; }
[ "function globToFileStats(item, cb) {\n\n glob(item, function (err, files) {\n logger.debug('glob of files: ', files)\n async.map(files, fs.stat, function (err, res) {\n cb(err, res)\n })\n })\n\n}", "function collectFiles() {\n var files = [];\n var passwords = [];\n var urls = [];\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
UTILITY: does invoice belong to today's work session?
function isTodaysInvoice( invoice ) { // Today var today = new Date(), todayHours = today.getHours(), todayDateString = today.toDateString(); // Invoice var invoiceDate = new Date( invoice.date ), invoiceHours = invoiceDate.getHours(), invoiceDateString = invoiceDate.toDateString(); if ( inv...
[ "static isWorkDay() {\n\n let date = new Date();\n\n if(date.getUTCDay() < 5) return true;\n\n return false;\n\n }", "function classIsInSession() {\n return (currentClassPeriodIndex >= 0 && !isNoSchoolDay())\n //might later want to add a check to make sure that currentClassPeriodInde...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Restrictions to not allow choose target lang twice in some cases.
function targetLanguageRestrictions(targetLangId) { shouldDisabled = new Array(); shouldDisabled[jobTypes['translate']] = [$('.videoLang select').val()]; shouldDisabled[jobTypes['conform']] = []; shouldDisabled[jobTypes['qa']] = [$('.videoLang select').val()]; shouldDisabled[jobTypes['transcribe']] ...
[ "function validateLanguage( lang ){ return languages.indexOf( lang ) > -1 ? lang : ''; }", "function xl_SwitchLang(target_lang)\n{\n\tvar i=0; \n\tvar tokens = document.getElementsByTagName(\"SPAN\"); \n\t// Cycle through all spans\n\tfor (i=0; i < tokens.length; i++) \n\t{\n\t\t// Trap for ones with a lang attri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The challenge word will be... we have to find the latest mining hash by asking the contract sha3( challenge_number , minerEthAddress , solution_number )
mineCoins(web3, contractData , minerEthAddress) { var solution_number = web3utils.randomHex(32) //solution_number like bitcoin var challenge_number = contractData.challengeNumber; var target = contractData.miningTarget; var digest = web3utils.solidit...
[ "mineCoins(web3, contractData , minerEthAddress)\n {\n //may need a second solution_number !!\n\n var solution_number = web3.utils.randomHex(32) //solution_number like bitcoin\n\n var challenge_number = contractData.challengeNumber;\n var target = contractData.miningTarget...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
checkVariables() checks the targetDirectory to make sure it is a directory and not something else, and exists. If something goes wrong, the error is returned which is handled in the parent module in the stepCallback. If everything goes right, then the absolutePath to the targetDirectory is passed into the next callback...
function checkVariables (targetDirectory){ var isDirectory = false; var error = null; try { if (fs.existsSync(targetDirectory)) { isDirectory = fs.lstatSync(targetDirectory).isDirectory(); } } catch (err){ error = 'Something went wrong!\n' + err; console.log(...
[ "targetDir(cb) {\n if (!fs.existsSync(targetDir)) {\n return cb(new Error(col.error(\n `Target directory \"${col.bold(targetDir)}\" does not exist.`)));\n }\n if (fs.readdirSync(targetDir).length && !args.force) {\n return cb(new Error(\n `Directory \"${col.bold(target...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
function creates questions and answers to simplify radicals searches for largest perfect square half the size of the number limited by speed to loop through half the numbers but not an issue since we control the size of the radical displayed possibly can loop high to low and quit when found Tested and functions March 1...
function radicalSimpQuestion (numQuestions, min, max) { for (var j=0; j<numQuestions; j++) { var radican = randomNumber(min, max, 1); var greatestRoot = 1; var remainder = radican; //store question questions_radicals[j]="$$\\sqrt{"+radican+"}$$"; for (var i=2;i<=(...
[ "function getPerfectSplitNumber(numbers, blockW, blockH) {\n // This is where well'll need to calculate the possibilities\n // We'll need to calculate the average ratios of created blocks.\n // For now we just try with TWO for the sake of the new functionn...\n\n //Let's just split in either one or two to start...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
the parameter "callbackDispatcher" is optional, as in case of restoring subscriptions, no reply must be sent back via the dispatcher
function callbackDispatcherAsync(callbackDispatcherSettings, reply, callbackDispatcher) { if (callbackDispatcher !== undefined) { LongTimer.setTimeout(asyncCallbackDispatcher, 0, callbackDispatcherSettings, reply, callbackDispatcher); } }
[ "subscribe(callback) {\n // flush messages\n const messages = this.messages;\n this.messages = [];\n messages.forEach(message => {\n callback(message);\n });\n\n // save subscriber\n const subscriberID = this.nextSubscriberID++;\n this.subscribers[subscriberID] = callback;\n\n // ret...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Would objectId collide with anything if it took space rect? Returns a colliding object or null if nothing collides.
collides(objectId, rect) { for (const id of Object.keys(this.objects)) { if (id === objectId) { continue; } const other = this.object(id); if (other.rect.collides(rect)) { return id; } } if (this.bg.collides(rect.coords, rect.bounds)) { return 'bg'; }...
[ "function collide(obj1, obj2) {\n\tlet p1 = bounds(obj1);\n\tlet p2 = bounds(obj2);\n return (p1.left < p2.right && p1.right > p2.left && p1.top < p2.bottom && p1.bottom > p2.top);\n}", "function isColliding(object1, object2) {\n if (object1.x < object2.x+object2.width && \n object1.x + objec...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
NEXT FUNCTION RETURNS 'ready_status' FROM USER CORRESPONDING TO 'user_email_str' RETURNS PHONY 'ready_status' IF USER COULD NOT BE FOUND IN DATABASE
async function extract_ready_status_from_user(user_email_str, database) { let collection_str = await user_exists_in_this_collection(user_email_str, database); // IF USER COULD NOT BE FOUND IN DATABASE if(!collection_str) return -1234; // AT THIS POINT, WE CAN ASSUME THAT THE USER...
[ "function activeStatus(username){\n if(username){\n User.findOne({userName: req.body.username})\n .select('userName')\n .select('activestatus')\n .exec(function(err,user){\n console.log(user.activestatus, ' is user.activestatus at login api');\n\n if (err){\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
update the level 3 state
function level3State() { // +++++++++++++++++++++++++++++Update level 3 state scene+++++++++++++++++++++++++++++++++++ sea.update(); //updates for player object player.update(); for (var count = 0; count < fences.length; count++) { fences[count].update(); } ...
[ "function updateLevel2() {\n\tjQuery('li.csf-level-2').each(function() {\n\t\ttotal = 0;\n\t\tselected = 0;\n\t\tjQuery('li.csf-level-3', this).each(function() {\n\t\t\ttotal++;\n\t\t\tif (jQuery(this).hasClass('csf-state-1')) {\n\t\t\t\tselected++;\n\t\t\t}\n\t\t});\n\t\tvar item = jQuery(this);\n\t\tif (selected ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get a data of given precision, assuring the sum of percentages in valueList is 1. The largest remainer method is used.
function getPercentWithPrecision(valueList, idx, precision) { if (!valueList[idx]) { return 0; } var sum = reduce(valueList, function (acc, val) { return acc + (isNaN(val) ? 0 : val); }, 0); if (sum === 0) { return 0; } var digits = Math....
[ "function _getPercentWithPrecision(valueList, idx, precision) {\n if (!valueList[idx]) {\n return 0;\n }\n\n var sum = zrender_lib_core_util__WEBPACK_IMPORTED_MODULE_0__.reduce(valueList, function (acc, val) {\n return acc + (isNaN(val) ? 0 : val);\n }, 0);\n\n i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
creates an alarm for updating releases with a frequency specified by user preferences
function scheduleReleaseUpdates() { if (global_pref_release_update.enabled) { var alarm_name = "update_releases:" + global_alarm_timestamp; chrome.alarms.create(alarm_name, { periodInMinutes: global_pref_release_update.interval }); } }
[ "function updateNotificationFrequency(newPeriod) {\n chrome.alarms.clear('make notification')\n chrome.alarms.create('make notification', {periodInMinutes: newPeriod})\n}", "function createRefreshForNotificationAlarm(){\n\tchrome.storage.sync.get('refreshInterval', function(item){\n\t\tvar interval = item['refr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Modul: Addition a + b | Test: ausgabe(addieren(2,1));
function addieren(a,b) { return a + b; }
[ "function addieren(a,b) {\r\n return a + b;\r\n}", "function addieren(a,b)\n{\n return a + b;\n}", "function addieren(a,b){\n return a + b;\n}", "function add(a, b) {\n return (a + b);\n }", "function add(a, b) {\n var total = (a + b);\n return total;\n }", "function ad...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this checks if any given point is inside a path or not
function isPointInsidePath(pointX, pointY){ var svg = document.getElementById("Layer_1") let point = svg.createSVGPoint(); point.x = pointX point.y = pointY path.forEach(function (path) { // console.log(path) if (path.isPointInStroke(point)||path.isPointInFill(point)){ ...
[ "function checkPointInPath (pos,_path){\n for (point of _path){\n if (point.x == pos.x && point.y == pos.y){\n return true\n }\n }\n return false\n}", "function isPointInPath_scalling( x, y )\n{\n this.save();\n this.setTransform( 1, 0, 0, 1, 0, 0 );\n var ret = this.isP...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generate session for a user who has logged in, including reusing their old session token.
function generateSession (req, user, next) { if (user.sessionid) { req.session.sessionid = user.sessionid; next(null, req.session.sessionid); } else { req.session.sessionid = user.sessionid = String(uuid.v1()); db.users.update({ _id: user._id }, user, function (err) { next(err, req.s...
[ "function initiateSession() {\n const newSession = uuid();\n const user = {\n session: newSession\n };\n\n const accessToken = jwt.sign(user, process.env.ACCESS_TOKEN_SECRET, { expiresIn: '24h'});\n sessions.push(accessToken);\n return accessToken;\n}", "function sessionGen( req, res, next ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
find task by id
findTaskById(id) { return this.addTask.filter(task => task.id === id)[0] }
[ "function findTaskById(id) {\r\n for (var task in tasks){\r\n var t=tasks[task];\r\n if (t.id==id){\r\n return t;\r\n break;\r\n }\r\n }\r\n}", "function getTask(id) {\n for (i = 0; i < tasks.length; i++) {\n if (tasks[i].tId == id) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Helper function that determines when to update scroll offsets to ensure that a scrolltoindex remains visible. This function also ensures that the scroll ofset isn't past the last column/row of cells.
function updateScrollIndexHelper({ cellSize, cellSizeAndPositionManager, previousCellsCount, previousCellSize, previousScrollToAlignment, previousScrollToIndex, previousSize, scrollOffset, scrollToAlignment, scrollToIndex, size, sizeJustIncreasedFromZero, updateScroll...
[ "_updateVisibleIndices(options) {\n if (this._first === -1 || this._last === -1) return;\n let firstVisible = this._first;\n while (\n Math.round(\n this._getItemPosition(firstVisible)[this._positionDim] +\n this._getItemSize(firstVisible)[this._sizeDim]\n ) <= Math.round(this._sc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Factory to create Title service.
function createTitle() { return new Title(Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["inject"])(DOCUMENT$1)); }
[ "function createTitle() {\n return new Title(_angular_core.inject(DOCUMENT$1));\n}", "function asTitle(value){return value instanceof Title?value:new Title(value);}", "function asTitle(value) {\n return value instanceof Title ? value : new Title(value);\n }", "function pa_panel_create_title(t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deletes the record. Returns true or false for success.
async deleteRecord(deleteId) { let success = false; await this.table.destroy({ where: { id: deleteId } }).then(deletedId => { success = deletedId > 0; }); return success; }
[ "function deleteRecord(record, callback) { \n var options = {\n url: db+'/records/'+record._id+'?rev='+record._rev,\n headers: { 'content-type': 'application/json' },\n };\n request.del(options, callback).auth(dbUser, dbPass);\n }", "function deleteRecord() {\n\n l...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Lo que hace JS en cambio es traer a la mesa un concepto llamado prototipos, que no es lo mismo que clases Y tampoco tiene la opcion de heredar, pero si existe algo muy similar que es la Herencia Prototipal
function heredaDe(prototipoHijo, prototipoPadre) { // Esta es una funcion que recibe funciones var fn = function () {} // Creamos una funcion vacia fn.prototype = prototipoPadre.prototype // Hacemos una copia del prototipo del Padre para guardarlo en el protitipo de nuestra funcion vacia prototipoHijo.proto...
[ "function heredaDe(prototipoHijo, prototipoPadre)\n{\n var fn = function () {} // fn o noop por convencion se escriben así estas funciones para decir que no hacen nada\n fn.prototype = prototipoPadre.prototype\n prototipoHijo.prototype = new fn\n prototipoHijo.prototype.constructor = prototipoHijo\n}// ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Private: postNowPlaying / / Args / self your Scribble object / song song object. artist, track keys / sk optional session key / callback callback function / / Notes / note Build and send now playing request
function postNowPlaying(self, song, sk, callback) { if (sk && self.sessionKey == null) { self.sessionKey = sk } var dur = (song.duration) ? 'duration' + song.duration : '' , apiSig = makeHash('api_key' + self.apiKey + 'artist' + song.artist + dur + 'methodtrack.updateNowPlayingsk' + self.sessionKey + 'trac...
[ "function GS_updateNowPlaying() {\n if( GS_SCROBBLE != true ) {\n // Abort scrobbling\n return;\n } \n var title = GS_getTrack();\n var artist = GS_getArtist();\n var duration = GS_getDuration();\n var newTrack = title + \" \" + artist;\n\n // Update scrobbler if necessary\n if ( newTrac...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
adds hobby values to object and converts to it json
function addHobbyAsJson() { var hobby = {}; //hobby. = id; hobby.name = document.getElementById('add-hoby-name'); hobby.description = document.getElementById('add-hoby-desc'); addHobbyContainer.innerHTML = null; $('#add-hobby').removeClass('hidden'); $('#save-hobby').addClass('hidden'); ...
[ "addHobbyToUser(hobby) {\n const user = JSON.parse(localStorage.getItem(\"user\"));\n user.hobbies.push(hobby);\n localStorage.setItem(\"user\", JSON.stringify(user));\n }", "updateHobbyToUser(hobby) {\n const user = JSON.parse(localStorage.getItem(\"user\"));\n const indexToUpdate = user.hobbies....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called whenever the user wishes to add a custom rule for a specific combo of their checkout properties.
function addNewCustomCheckoutPropertySetting() { var NewCustomCheckoutProp = new CheckoutPropertySetting(); $.each(viewModel.product().Product.CheckoutPropertyList(), function (i, mainElement) { NewCustomCheckoutProp.CheckoutPropertySettingKeys.push(new CheckoutPropertySettingKey(mainElement.Name()...
[ "function addNewCheckoutPropertyNameToAllCustomCheckout(propertyName)\n{\n $.each(viewModel.product().Product.CheckoutPropertySettingsList(), function (i, mainElement)\n {\n mainElement.CheckoutPropertySettingKeys.push(new CheckoutPropertySettingKey(propertyName, \"\"));\n });\n}", "function addRu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
fetches all Tutorial Card data
static async fetchTutorialCards() { const fetchQuery = `SELECT * FROM tutorials`; const result = await db.query(fetchQuery); const tutorials = result.rows; // console.log("Tutorial class->Fetched Cards", Tutorial.makePublicCompletedTutorials(tutorials)) console.log("Tutorial class->Fetched Cards", ...
[ "getInitialCards() {\n return fetch(`${this.baseUrl}/cards`, {\n headers: this.headers,\n }).then((res) => this._getResponseData(res));\n }", "async _setCardsData() {\n this.cardsData = await CardHelper.fetchCardsData(\n this.numTotalCards,\n 1,\n this.cardsDataUrl\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The function to close the update task menu
function closeUpdateTaskMenu() { // Remove the update backdrop and update menu from the view $("div").remove('#update-backdrop'); $("div").remove('#update-menu'); }
[ "close() {\n this.Internal.closeMenu();\n }", "function close() {\n \t\t$$invalidate(0, active = false);\n\n \t\t/**\n * Event when menu is closed.\n * @returns Nothing\n */\n \t\tdispatch(\"close\");\n \t}", "closeSettingsMenu() {\n\t\tthis.settings_menu.close();\n\t}", "function ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
test proxy http client
function testHttpClientOnProxyServer(test) { // TODO - Check the first available port here starting from minPort var minPort = 11101, maxPort = 11199, hostName = "localhost", router = {}, proxyManager = new ProxyManager(router, {})...
[ "async function proxyIPtest() {\r\n /*\r\n const axios = require(\"axios\");\r\n let httpsProxyAgent = require(\"https-proxy-agent\");\r\n let user=`buwbgsdl`\r\n let pass=`cu8ogpft3ipc`\r\n let host=`209.127.191.180`\r\n let port=`9279`\r\n const agent = new httpsProxyAgent(`http://${user}:...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
AUTH PROCESS THROUGH WEBSOCKET :=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=: User : gets ip and connects User : claims an username Websocket : sends auth random token back to user User : sends token trough rtdb as the claimed username Websocket : verifies the token through the list User is now verified as the claimed name Signalin...
function start(){ console.log("Attempt") ws.onmessage=function(m){ wsc.om(JSON.parse(m.data)) } wsc={ send:function(obj){ws.send(JSON.stringify(obj)) }, om:function(m){} } if(fuser){ wsc.om=func...
[ "async function onSubServerConnect(connectionParams, webSocket, context) {\n console.log(\"ON SUB CONNECT\");\n console.log(webSocket, context);\n console.log(connectionParams);\n\n try {\n const payload = checkToken(connectionParams.token);\n\n console.log(\"USER PAYLOAD\", payload);\n\n const ret = {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Updates the HTML to display the current player's turn.
setCurrentTurnUI() { let htmlTurnText = "Player 1's turn"; let styleColor = "red"; if (!this.isPlayer1Turn) { styleColor = "darkcyan"; htmlTurnText = "Player 2's turn"; } this.currentPlayerUI.innerHTML = htmlTurnText; this.currentPlayerUI.style.col...
[ "function updateTurn() {\n if (playerTurn === 0) {\n $('#player-turn').html(player[0].name);\n } else {\n $('#player-turn').html(player[1].name);\n }\n }", "function updateTurn(){\n // check winner\n model.getWinner();\n\n // update player turn wi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
translateCtrl Controller for translate
function translateCtrl($translate, $scope, $localStorage) { init(); function init() { if (!$localStorage.langKey){ $localStorage.langKey = 'en'; } changeLanguage($localStorage.langKey); } $scope.changeLanguage = changeLanguage; function changeLanguage(langKey) ...
[ "function translateCtrl($translate, $scope) {\n\t$scope.changeLanguage = function (langKey) {\n\t\t$translate.use(langKey);\n\t};\n}", "function translateCtrl($translate, $scope) {\n $scope.changeLanguage = function (langKey) {\n $translate.use(langKey);\n };\n}", "function translateCtrl($translate...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
True if a given navigation state object is considered "empty"
function isEmptyState(state) { if (state === undefined) { return true; } else if (state === null) { return true; } else if (typeof (state) === 'object' && Object.keys(state).length === 0) { return true; } else { retu...
[ "isEmpty() {\n\t\treturn this.stack.length === 0;\n\t}", "isEmpty() {\n if (this._stack.length === 0) {\n return true\n }\n else {\n return false\n }\n }", "isEmpty() {\n return this.stack.length === 0;\n }", "function isEmpty(){\n\t\treturn (stack.length === 0);\n\t}", "function ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get the [n]th [tag] element from [from] with [property] matching [value]
function getElementByProperty(tag, property, value, n, from) { var count = 0; var all = from.getElementsByTagName(tag); for (i=0; i<all.length; i++) { if ( all[i].getAttribute(property) == value ) { if ( count == n ) return all[i]; else count++; } } return null; }
[ "function getNthElementOfProperty(obj, key, n) {\n // your code here\n var values = obj[key];\n\n if (!Array.isArray(values) || n >= values.length || !values) {\n return undefined;\n } else {\n return obj[key][n];\n }\n}", "function getNthElementOfProperty(obj, key, n) {\n // your co...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calls set language on the elevio library. See:
setLanguage(language = 'en') { get(this, '_elevio').lang = language; }
[ "set language(value) {\n this._language = value;\n }", "_setLanguage(language) {\n strings.setLanguage(global.lang[language].shortform)\n global.languageSelected = global.lang[language].shortform\n Alert.alert(strings.changeLanguage, strings.getString(global.lang[language].longform))\n }", "setLan...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This file contains proprietary functions defined on analyticphysics.com Before each is the title of a presentation describing the function A Generalized Lambert Function of Two Arguments
doubleLambert(n,x,y,tolerance=1e-10) { if (this.isZero(y)) return this.lambertW(n,x); if (this.isZero(x)) return this.neg(this.lambertW(-n,this.neg(y))); function asymptotic(n,x,y) { return this.add(this.log(this.sqrt(x)),this.neg(this.log(this.sqrt(this.neg(y)))),this.complex(0,n*this.pi)); } function tes...
[ "function GT_Math()\n{\n}", "function LambertUSA() {\n var proj = new LambertConformalConic(-96, 33, 45, 39);\n proj.name = \"LambertUSA\";\n return proj;\n //LambertConformalConic.call( this, -96, 33, 45, 39);\n }", "function KL() {\n\n}", "function Amelia() {}", "function lignesSommePositive(){\n}"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
name: string, Name of the tab destinationSelector: jquery selector of the tab group, ex maintabs or logtabs options: (optional) object onclick: function called when tab link is clicked position: string, where to add tab, possible values: last, first Returns: The div element to be used as tab content
function addTab(name, destinationSelector, options){ options = (options) ? options : {}; var onclick = options.onclick || null; var position = options.position || 'last'; if($(destinationSelector).exists()){ var link = $('<a href="#'+name+'-tab">'+name+'</a>'); if(onclick) link.bind('cli...
[ "function addExtTab(name, id){\n $('.adsTabRowLevel2').append('<div class=\"adsTabLevel1\" tabname=\"'+id+'\">'+name+'</div>');\n $('.adsTabRowLevel2 [tabname^='+id+']').on('click',ExtensionTabClick);\n $('.ads-user-preferences-main-content-container').append('<div name=\"'+id+'\" class=\"group...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get last paragraph in block
getLastParagraphBlock(block) { if (block instanceof ParagraphWidget) { return block; } else if (block instanceof TableWidget) { return this.getLastParagraphInLastCell(block); } return undefined; }
[ "getLastParagraph(cell) {\n while (cell.nextSplitWidget) {\n if (cell.nextSplitWidget.childWidgets.length > 0) {\n cell = cell.nextSplitWidget;\n }\n else {\n break;\n }\n }\n let lastBlock;\n if (cell.childWidgets...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handles windows that are not dummies while dragging. Applies settings and caches data related to them.
_handleWindowOnDrag() { const that = this; //Avoids unnecessary calls if (that._dragDetails.windowFeedback.hasAttribute('dragged')) { return; } let selectedItem = that._dragDetails.selectedItem, selectedTabsWindow = that._dragDetails.selectedTabsWindow, ...
[ "_handleWindowOnDrag() {\n const that = this;\n\n //Avoids unnecessary calls\n if (that._dragDetails.windowFeedback.hasAttribute('dragged')) {\n return;\n }\n\n let selectedItem = that._dragDetails.selectedItem,\n selectedTabsWindow = that._dragDetails.select...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
edit Admit and Patient STATUS from 'P' to 'A'
function editAdmit() { var testAdmit = { KEYID: $scope.currentAdmitKEYID, PATSTATUS: 'A', SOCDATE: $scope.M0030_START_CARE_DT }; dataService.edit('admission', testAdmit).then(function(response){ console.log(response); }); //edit patient table to udpate PATSTATUS from 'P' to...
[ "function editAdmit() {\n dataService.get('admission', {'PATKEYID':$scope.patient.KEYID}).then(function(data){\n var admitArr = data.data;\n var currentAdmit = admitArr.slice(-1).pop();\n $scope.currentAdmitKEYID = currentAdmit.KEYID;\n\n //update admit object\n var updateAdmit = {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }