query
stringlengths
9
34k
document
stringlengths
8
5.39M
negatives
listlengths
19
20
metadata
dict
This function returns true or false if the quantity input is correct or not. Also, changes the validation message and the border color.
function validateQty(){ var itemQty = document.getElementById("addItemQty"); var itemQtyMsg = document.getElementById("addQtyValidationMessage"); if (itemQty.value.length > 0) { if (itemQty.value > 0) { ...
[ "function validation(){\r\n \r\n if (validateItem() && validateQty()) {\r\n return true; \r\n }\r\n \r\n return false;\r\n \r\n }", "function renderQuantityErrorMessage() {\n\tdocument.getEleme...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return a clone of the manifest items list
getManifestItems(cloneIt = true) { if (cloneIt) { return toJS(this.manifest.items); } return this.manifest.items; }
[ "cloneListing() {\n const clone = this.clone();\n clone.unset('slug');\n clone.unset('hash');\n clone.guid = this.guid;\n clone.lastSyncedAttrs = {};\n return clone;\n }", "getManifest(cloneIt = true) {\n if (cloneIt) {\n return toJS(this.manifest);\n }\n return this.manifest;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Display next button tooltip if next is disabled
showNextButtonTooltip() { const component = this.state.displayedComponent const display = (this.nextDisabled() && component) ? 'inline' : 'none' return ({ display: `${display}` }) }
[ "function nextEnable() {\r\n\t// Make sure the button is displayed first.\r\n\t$('#btnNextStep').show();\r\n\t// If enabling of the Next button has not been blocked, enabled the Next button.\r\n\tif ( window.j2w.blockNextEnable === false ) {\r\n\t\t$('#btnNextStep').removeAttr('disabled');\r\n\t}\r\n}", "enableNe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create the ontop header if the Furniture ontop aray is not empty.
function onTopHeader(furnitureOnTop, itemName, idOnTop) { if (furnitureOnTop.length === 0) { return '' } else { return ("<h3>and on top of the " + itemName + " is: </h3><ul class='item-on-top' id='" + idOnTop + "'></ul>") } }
[ "function drawEpisodesHeader() {\n let $header = $(\"<h2>\").text(episodes[0].Show_name + \" - Season \" + episodes[0].Season_num);\n let div = $(\"<div class='header'>\").append($header);\n $(\"#adminEpisodePH\").prepend(div);\n}", "function constructHeaderTbl() {\t\n\tprintHeadInnerTable = '<div class=...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Activating the website main menu elements according to the given slide name.
function activateMenuElement(name){$(options.menu).forEach(function(menu){if(options.menu&&menu!=null){removeClass($(ACTIVE_SEL,menu),ACTIVE);addClass($('[data-menuanchor="'+name+'"]',menu),ACTIVE);}});}
[ "AsidePanelPages(){\n\t\t// All positions in navbar\n\t\tconst navs = document.querySelectorAll(\".pages-nav li\");\n\t\t// All pages\n\t\tconst pages = document.querySelectorAll(\".pages li\");\n\t\t// For each position add onclick function\n\t\tnavs.forEach((nav) => {\n\t\t\tnav.addEventListener(\"click\", () => ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Wraps AudioContext's decodeAudio into a Promise
function getAudioDecoder (ac) { return function decode (buffer) { return new Promise(function (resolve, reject) { ac.decodeAudioData(buffer, function (data) { resolve(data) }, function (err) { reject(err) }) }) } }
[ "function loadSample(audioContext, url){\n console.log('done');\n return new Promise(function(resolve, reject){\n fetch(url)\n .then((response) => {\n return response.arrayBuffer();\n })\n .then((buffer) =>{\n audioContext.decodeAudioData(buffer, (decode...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
For detecting whether easyb.HALT has been passed to prevent moving to the next step.
function isHaltDirective(v) { return (v && (typeof(v) === 'object') && v.__IS_EASYB_HALT === true); }
[ "function maybeHalt() {\n taskEnding();\n maybeExit();\n return null;\n}", "isActionAborted() {}", "function endPhaseConditions(){\r\n\r\n if (killerCountSetup == 0 || userKilled || totalFuel == userScore + computerScore || fuel == 0){\r\n return false;\r\n }\r\n else{\r\n return true;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if potato collides with any object in game
isCollide(potato) { // Helper Function to see if objects overlap const overLap = (objectOne, objectTwo) => { // Check X-axis if they dont overlap if (objectOne.left > objectTwo.right || objectOne.right < objectTwo.left) { return false; } // Check y-axis if they dont overlap ...
[ "collide(other) {\n // Don't collide if inactive\n if (!this.active || !other.active) {\n return false;\n }\n\n // Standard rectangular overlap check\n if (this.x + this.width > other.x && this.x < other.x + other.width) {\n if (this.y + this.height > other.y && this.y < other.y + other.hei...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add a new candy to the board. Requires candy added to not be on the board and (row, col) must be a valid empty square. The optional spawnRow and spawnCol indicate where the candy was "spawned" the moment before it moved to row,col. This location which may be off the board, is added to the "add" event and can be used to...
add(candy, row, col, spawnRow, spawnCol) { //Your code here let vm = this; let state = vm.getState(); if(state == 'FINAL'){ let candy = candy; if(vm.isValidLocation(row, col)){ let found= vm.getAllCandies().find(function (onSiteCandy){ ...
[ "function addCellToBoard(element){\n var newCell = {};\n newCell.row = getRow(element);\n newCell.col = getCol(element);\n if (element.classList.contains (\"mine\")) {\n newCell.isMine = true;\n }\n else {\n newCell.isMine = false;\n }\n board.cells.push(newCell);\n}", "function addTurnToArch(player...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
set the MVar to empty unless there are writers
function h$notifyMVarEmpty(mv) { var w = mv.writers.dequeue(); if(w !== null) { var thread = w[0]; var val = w[1]; ; mv.val = val; // thread is null if some JavaScript outside Haskell wrote to the MVar ...
[ "clear(){\n this.buffer.length = 0;\n this.count = 0;\n }", "reset() {\n this.#length = 0;\n }", "clear() {\n if (this.props.vars) {\n clearCustomVars(this, this.props.vars);\n }\n this.props.vars = {};\n }", "function clearMemory(){ memory...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Public function `equal`. Returns true if `lhs` and `rhs` are strictly equal, without coercion. Returns false otherwise.
function equal (lhs, rhs) { return lhs === rhs; }
[ "function ExprEqualExact(lhs, rhs, allowDoubleNegatives=false) {\r\n\t// getBoundVar, given a list of {lhs:'a', rhs:'a'} objects\r\n\t// and a variable, finds it on the lhs, and returns the\r\n\t// rhs if available.\r\n\tfunction getBoundVar(boundVars, lhs) {\r\n\t\tfor (var i = 0; i < boundVars.length; i++)\r\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the full sha of the ref provided. example: 1bc0c1a6c01ede7168f22fa9b3508ba51f1f464e
function getShaFromRef(ref) { return exec(`git rev-parse ${ref}`); }
[ "function git_commit_hash () {\n if (!_HASH) {\n var start = process.cwd(); // get current working directory\n process.chdir(get_base_path()); // change to project root\n var cmd = 'git rev-parse HEAD'; // create name.zip from cwd\n var hash = exec_sync(cmd); /...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Closes the split view
function closeSplitView(editorIndex) { // TODO: hacking animation states - these should hopefully be easier to do when we upgrade angular var editor = vm.editors[editorIndex]; editor.loading = true; editor.collapsed = true; $timeout(function () { ...
[ "close() {\n return spPost(WebPartDefinition(this, \"CloseWebPart\"));\n }", "function _handleSplitViewVertical() {\n MainViewManager.setLayoutScheme(1, 2);\n }", "function closeEditingWindow() {\n document.getElementById(\"fileEditing\").style.display = \"none\";\n document.getElementById...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
only for update locations.json
async function locationsUpdate() { try { const _locationsUpdate = await axios({ method: 'get', url: schoolfreeURL + 'locations/', responseType: 'json' }); adapter.log.debug(`schoolfree request locations done`); if (_locationsUpdate && _locationsU...
[ "function updatePlacesLocationInformation() {\n\tupdatePlacesLocationInformationFromCategory(\"\", \"All Categories\");\n}", "async modifyLocations(caregiver, data, trx) {\n await caregiver.locations().sync(data, null, trx);\n }", "initializeLocations() {\n for (const filename of glob(kLocationDirect...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A helper function for button groups. Add the class 'btnactive' to buttonElt, while ensuring that class is absent from the other elements in groupElts.
function activateOneInGroup(buttonElt, groupElts) { for (let elt of groupElts) { elt.classList.remove('btn-active'); } buttonElt.classList.add('btn-active'); }
[ "function makeButtonActive(zb) {\n\t// While making the buttons we can also set everything to hidden.\n\tvar div_for_button = document.getElementById(\n\tzb.getAttribute('aria-controls'));\n\t\n\tdiv_for_button.setAttribute('hidden', '');\n\n\t/* The event listener to attach to zoomContents. */\n\tfunction zb_event...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return: void Performs a HTTP GET request on a URL, calling a success callback if the operation was successfull; otherwise, it calls the error callback webpagePath: string = Page URL requestParameters: Object = Request parameters successCallback: function(string) = Success callback, having a string parameter, representi...
static Get(webpagePath, requestParameters, successCallback, errorCallback) { try { const http = require("http"); webpagePath = webpagePath.replace("https://", "http://"); if (!webpagePath.startsWith("http://")) webpagePath = "http://" + webpagePath; var webpagePathWithPara...
[ "get(aUrl, aCallback)\n {\n let anHttpRequest = new XMLHttpRequest();\n anHttpRequest.onreadystatechange = function()\n {\n if (anHttpRequest.readyState === 4 && anHttpRequest.status === 200)\n aCallback(anHttpRequest.responseText);\n }\n \n anH...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
find another key that uses the chord, that isn't the current key
changeKeyFromChord(chord=this.lastChord) { // common key modulation let keys = this.chordToKeys[chord.toString()] if (!keys) { // chord doesn't have key, eg. A#m return } keys = keys.filter(key => key.name() != this.keySignature.name()) if (!keys.length) { // some chords are ...
[ "function advanceToKey(key) {\n let seek = currentMorph;\n\n while (seek.key !== key) {\n candidates[seek.key] = seek;\n seek = seek.nextMorph;\n }\n\n currentMorph = seek.nextMorph;\n return seek;\n }", "function getChord() {\n //get all playing keys\n var keys = document.querySelecto...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Used to reinitialize this module 1. Clears the interval set for internet check 2. Clears any scheduled retries if they were set 3. Deletes the configurations stored in SDK defined file path
function cleanup() { clearInterval(interval); clearTimeout(retryScheduled); if (_persistentCacheDirectory) { FileManager.deleteFileData(path.join(_persistentCacheDirectory, 'appconfiguration.json')); } _onSocketRetry = false; }
[ "function resetConfig(){\n clearConfig();\n setConfigDefaults();\n setConfigValues();\n}", "function clearConfigCache() {\n config = {};\n}", "reloadConfiguration() {\n logger.info(t('bootstrap.reloadConfig'));\n\n MrNodeBot._clearCache('./config.js');\n this.Config = require('./confi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
workingDir where to check out and work with the repo diffs repoPath path to repo (ssh) zipPath path for zip/diff commitHashFrom a hash for what to change from commitHashTo a hash for what to change to (leave blank for HEAD) _exec array of commands to execute in both folders (defaults to npm install production) removeWo...
static repoDiff ( workingDir, repoPath, zipPath, commitHashFrom, commitHashTo = 'head', _exec = ['npm install --production'], removeWorkingDirWhenDone = true, debug = false ) { this.lastLogTime = 0 let l = debug ? this.log : () => 1 return new Promise((resolve, reject) => {...
[ "static apply (zip, folder, folderCopy, debug = false) {\n this.lastLogTime = 0\n let l = debug ? this.log : () => 1\n return new Promise((resolve, reject) => {\n zip += zip.includes('.zip') ? '' : '.zip'\n\n // if folderCopy is provided do not apply on original folder\n if (folderCopy) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns `true` if the hits are identically equal. `false` otherwise. Must be from the same component. Two null values will be considered equal, as two "out of the component" states are the same.
function isHitsEqual(hit0, hit1) { if (!hit0 && !hit1) { return true; } if (hit0 && hit1) { return hit0.component === hit1.component && isHitPropsWithin(hit0, hit1) && isHitPropsWithin(hit1, hit0); // ensures all props are identical } return false; }
[ "equals(grid) {\n if (this.height !== grid.height) { return false; }\n if (this.width !== grid.width) { return false; }\n\n let ans = true;\n for (let r = 0; r < this.height; r++) {\n for (let c = 0; c < this.width; c++) {\n if (this.get(r,c) !== grid.get(r,c)) { ans = false; }\n }\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
ISERR returns true when the value is an error (except `NA!`) or when then value is a number which is NaN or []Infinity.
function ISERR(value) { return value !== error$2.na && value.constructor.name === 'Error' || typeof value === 'number' && (Number.isNaN(value) || !Number.isFinite(value)); }
[ "function ISERROR(value) {\n return ISERR(value) || value === error$2.na;\n}", "function ISNA(value) {\n return value === error$2.na;\n}", "function checkIfFinite(arg){\n return Number.isFinite(arg)\n}", "function isNaN(x)\n\t {\n\t \treturn x !== x;\n\t }", "get isError() {\n return (this.flags...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
var pos_flag=false; / Sets the state (checked/unchecked) of a checkdiv. Sets state to check, or flips state if check is undefined.
function setCheckdiv(clicked,check) { var checkbox =$(clicked).find(".checkdiv-checkbox"); // Flip state if set_state is unspecified: if (check===undefined) { check = !(checkbox.data("state")); } //console.log("check: " + check); //console.log(checkbox.data("state")); checkbox.data("...
[ "function changeStateCheckBox() {\n checkedElements = [];\n // add items which are checked\n for (id of CHECKBOX_NAMES) {\n if (isChecked(id)) {\n checkedElements.push(id);\n }\n }\n updateBoard();\n}", "function alert_state() {\n var cb = document.getElementById('add_ma...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A function for generalizing simple api calls. Params: apiLink: The link to the api being used keywords: A list of keywords that will be used to call said function attributes: A list of strings, that are used to access more parts of data ex. res.data.joke => ['data', 'joke']
function callJokesAPI(apiLink, keywords, message, attributes) { if (messageContainsKeyword(message, keywords)) { (async () => { try { const baseUrl = apiLink; const res = axios.get(`${baseUrl}`); for (var i = 0; i < attributes.length; i++) { ...
[ "function addPaginationLinks(request, prettyJson, resList, successFunctionName) {\n // adding \"...\" link for pagination :\n // NB. everything is already encoded\n if (!successFunctionName) {\n successFunctionName = 'null';\n }\n var start = 0;\n var limit = dcConf.queryDefaultLimit; // from conf...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adjust Data Field Names
function adjustDataFieldNames(data) { var adjustedData = []; _.each(data, function(rowItem) { var adjustedRowItem = adjustFieldNames(rowItem); adjustedData.push(adjustedRowItem); }); return adjustedData; }
[ "function _fixQuotes(data) {\n var aaIndex=[],msIndex=[];\n var mapping = data.mapping;\n var fields = data.fields;\n var table = data.table;\n var distinguish = function(dataName){\n var indexName=[];\n dataName.forEach(function(ds){\n mapping...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
define a function "wibble" that takes a string as an argument, console logs the argument, prepends "wibbly " to the argument, and returns the result
function wibble(text) { console.log(text); var newText = "wibbly" + text; return newText; }
[ "function printCool(name) {\n return `${name} is cool.`\n}", "function makeSandwich(meat, cheese, bread) {\r\n //pleace to define the work\r\n var sandwich = 'Here is a ' + meat + \" and \" + cheese + \" sandwich on\" + bread + \" bread. It is delicious! Enjoy!\"\r\n // a pleace to say what the input should...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
getCenter getSize(dimensions) Get the size for the diagonal for the `dimensions`
function getSize(dimensions) { return Math.sqrt(Math.pow(dimensions.width, 2) + Math.pow(dimensions.height, 2)); }
[ "getDimensions() {\n return {\n length: this.topLeft.lat - this.bottomLeft.lat,\n width: Math.abs(this.topLeft.long) - Math.abs(this.topRight.long)\n }\n }", "calculatePixelSize () {\n let diagonal = new gdal.LineString();\n diagonal.points.add(this.westernExtreme, thi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create an identifier for an Endpoint
function makeEpIdentifier(ep) { return crypto .createHash('sha256') .update(ep.ep, 'ascii') .update(ep.d, 'ascii') .digest('hex') .slice(0, 16); }
[ "_registerOrUpdate(ep) {\n\tif (ep.id && this._endpoints[ep.id]) {\n\t Object.assign(this._endpoints[ep.id], ep);\n\t this.emit('update', ep);\n\t console.log('CoAP RD: Updated endpoint ' + ep.ep);\n\t} else {\n\t ep.id = makeEpIdentifier(ep);\n\t this._endpoints[ep.id] = ep;\n\t this.emit('regist...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Remove a speific recent term //triggered by the recent term X button
function removeRecentSearchTerm( term ){ recent.remove( term, function(){ populateRecentSeachTerms(); }); }
[ "function removeWord () {\n firstWord.remove();\n}", "function removeCorpusButton()\n{\n d3.select(\".corpus-link\").remove();\n d3.select(\".back-button\").remove();\n d3.select(\".aggregate-button\").remove();\n}", "function deleteGenreYouAdded() {\n // Add code here\n}", "function destructivel...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
in `_check_acl_role`, no matter how arg `_act_role` is, it finally led to one explicit arg with type 'ArgAclRoleValueTypeWhenCheck(ACLPermissionBooleanOrArrayType)', then, return the the result `_check_acl_act(arg)`
function _check_acl_role(_acl_role) { if (_acl_role === undefined) return; /* now, _acl_role is(should be) ArgAclRoleValueTypeWhenCheck */ if (extend === undefined) return _check_acl_act(_acl_role); /* now, _acl_role is(should be) ACLRoleVarHostType */ var...
[ "function checkRole (role, allowed, options) {\n // Check if the value type passed to view is create or edit \n var temp = allowed.split(',');\n if (temp[role]) { \n return options.fn(this);\n } else {\n return;\n } \n}", "async function permissionCheck(user, group, targetUser, act...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Register new page partial
newPartial(partial) { if (!partial.name) { throw new Error(`The passed partial component to layout must contain the name property for that page name`); } this.partials.set(partial.name, partial); this[partial.name] = partial; return this; }
[ "function addPage(page) {\r\n document.querySelector(\"#pages\").innerHTML += `\r\n <section id=\"${page.slug}\" class=\"page\">\r\n <header class=\"topbar\">\r\n <h2>${page.title.rendered}</h2>\r\n </header>\r\n ${page.content.rendered}\r\n </section>\r\n `;\r\n}", "function addPage(page) {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get an array of students, and give each of them a bonus
function giveBonus(studs) { var res = studs.map(function(stud){ var newStud = {name: stud.name, grade: stud.grade+10}; return newStud; }); return res; }
[ "function getStudentGrade(){\n\t// Input Object\n var studentDetails = [\n {name:'David',marks:80},\n {name:'Vinoth',marks:77},\n {name:'Divya',marks:88},\n {name:'Ishitha',marks:95},\n {name:'Thomas',marks:68}\n ];\n // Array of students with Grade & Rating.\n const studentsGradeRatingArr = [];\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Drop elements from an array until the predicate function returns true on the current
dropWhile(array, predicate) { for (let i = 0; i < array.length; i++) { if (!(predicate(array[i], array.indexOf(array[i]), array))) { // if predicate-function returns false... return this.drop(array, i); // ... drop the current element from the array } } re...
[ "function dropElements(arr, func) {\n var startArray = arr;\n var finalArray = startArray;\n for (var i=0; i<startArray.length; i++) {\n if (!(func(arr[i]))) {\n finalArray = startArray.slice(i+1, startArray.length);\n } else {\n return finalArray;\n }\n }\n return [];\n}", "function filte...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor de una pestana elemento : Representa la nueva pestana incidePanel : Indice de la pestana en el array del panel de pestanas
function Pestana( elemento,indicePanel ) { // Inicializa los valores de la pestana this.element = elemento; this.element.tabPage = this; this.index = indicePanel; // Busca el elemento tab en los hijos de la pestana var hijos = elemento.childNodes; for (var i = 0; i < hijos.length; i++) { if (hijos[...
[ "function PanelPestanas( elemento) {\n\tvar hijos=null;\n\ttry {\n\tthis.element = elemento;\n\tthis.element.tabPane = this;\n\tthis.element.className = this.classNameTag + \" \" + this.element.className;\n\tthis.pages = [];\n\tthis.selectedIndex = null;\n\t// Crea el tab-row para anadirlo al panel\n\tthis.tabRow =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the vertices in the shader for the given mesh
function setVertices(mesh) { gl.bindBuffer(gl.ARRAY_BUFFER, buffers.position); gl.vertexAttribPointer(shader.position, 3, gl.FLOAT, false, 0, 0); gl.enableVertexAttribArray(shader.position); gl.bufferData(gl.ARRAY_BUFFER, MV.flatten(mesh.vertices), gl.STATIC_DRAW); ...
[ "set Mesh(value) {}", "function setNormals(mesh) {\n gl.bindBuffer(gl.ARRAY_BUFFER, buffers.normal);\n\n gl.vertexAttribPointer(shader.faceNormal, 3, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(shader.faceNormal);\n\n gl.bufferData(gl.ARRAY_BUFFER,\n MV.flatten(mesh.normals),...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
intent para buscar equipos dada una ciudad
function handleIntroduccionPersonalizadaCiudadEquipos(agent) { const nickname = agent.parameters.nickname; var ciudad = agent.parameters.ciudad; const competicion = agent.parameters.competicion; const pais = agent.parameters.pais; let idiomas = {"España": "es","Inglaterra": "en","Alemania": "de","Fr...
[ "function handleBuscarAlineacionesJornadaEquipo(agent) {\n const nickname = agent.parameters.nickname;\n const idEquipo = agent.parameters.idEquipo;\n const idJornada = agent.parameters.idJornada;\n return refJornadas.child(idJornada).once('value').then((snapshot) => {\n if (!snapshot.exists()) {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
end of function sp_ToolTip / Name: lan_ToolTip / Description: Change the audio tool tip to the next language
function lan_ToolTip() { try { nDomain = DVD.CurrentDomain; if (nDomain != 4) return; nLangs = DVD.AudioStreamsAvailable; // return if there are no audio tracks available at this time if (nLangs == 0) { Audio.ToolTip = L_NoAudioTracks_TEXT; AudioFull.ToolTip = L_NoAudioTracks_TEXT; return; } ...
[ "function sp_ToolTip()\n{\n\ntry {\n\tnDomain = DVD.CurrentDomain;\n\tif (nDomain != 4) return;\n\n nSubpics = DVD.SubpictureStreamsAvailable;\n if (nSubpics == 0) {\n\t\tAudio.ToolTip = L_NoSubtitles_TEXT;\n\t\tAudioFull.ToolTip = L_NoSubtitles_TEXT;\n\t\treturn;\n\t}\n \n nCurrentSP = DVD.CurrentSubpi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
call this one if you want to know if a FIELD element is focusable %>
function isFocusable( fld ) { if ( fld == null || (typeof fld.type == "undefined" && !isNLDropDownSpan(fld)) || fld.type == "hidden" || fld.disabled || fld.type == "button") return false; return elementIsFocusable(fld); }
[ "function elementIsFocusable(elem)\n{\n while ( elem != null )\n {\n var visibility = getCascadedStyle(elem, \"visibility\", \"visibility\");\n var display = getCascadedStyle(elem, \"display\", \"display\");\n if ( display == 'none' || visibility == 'hidden' || visibility == 'hide' )\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
toggles bootstrap toolbar buttons
function toggleToolbar() { var options = [ '#circleDrawType', '#triangleDrawType', '#rectDrawType', '#lineDrawType', '#freeDrawType', '#eraserDrawType', ]; options.map(function(option){ if($(option)[0].className.includes('active')){ $(option).button('toggl...
[ "static set toolbarButton(value) {}", "onClickToolbarButton() {\n this.show();\n }", "toggleButtons() {\n document.getElementById(\"newPinboard\").style.visibility = \"hidden\";\n document.getElementById(\"newPostIt\").style.visibility = \"visible\";\n }", "addToolBarItems() {\n // Ignore if the...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the next dictionary key in the stream.
function nextKey() { var c = decode(1 << numBits); if (c < 2) { // A key of 0 or 1 prefixes a new character for the dictionary. remember(charFor(decode(1 << (c*8+8)))); c = dictSize-1; } return c; }
[ "function find_next_autogen_key(resourceName,offset) {\n var nextId = 'id_'+(Object.keys(DATA[resourceName]).length + offset);\n if (DATA[resourceName][nextId]) {\n nextId = find_next_autogen_key(resourceName,offset + 1);\n }\n return nextId;\n }", "next() {\n const idx = this.getIdx();\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
detects if there are any sandwiches branching off the current piece and then deletes the centers
removeSandwich(x,y){ if(this.hasSandwichNorth(x,y)){ this.delete(x,y-1); this.delete(x,y-2); if(this.getColor(x,y) === 1){ this.blackCapture += 1; } else{ this.whiteCapture += 1; } } ...
[ "function removeDeadEnds(){\n map.sectors.getAll().forEach(sector=>{\n if(!sector.isFloorSpecial()) return; //short-circuit\n let neighbors = getNeighbors({\n map,\n sector,orthogonal:false,\n onTest:sector=> sector.isFloorSpecial()||sector.isDoor()\n });\n\n if(neighbors...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
moves/resizes, if needed, the canvas to contain the given chunk without moving the already shown chunks updates renderChunks.shown accordingly
function fitCanvasForChunk(chunkCoords) { let [chunkX, chunkY] = chunkCoords; const relChunkCoords = [ (chunkX - renderChunks.shown.x), (chunkY - renderChunks.shown.y) ]; let chunkSize = [chunkWidth * cellWidth, chunkHeight * cellHeight]; ...
[ "function updateVisible() {\n var \n u, v, w, chunk, hash;\n \n var pos = Forge.Player.getRegion();\n var new_visible_hash = {};\n var old_visible_array;\n var chunks_to_queue = {};\n var update = false;\n\n // Only update visible if the regions have changed\n if ( lastRegion !== undef...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
buildPdfIconListInMenu Read !!!URLpdf: reference records and create icons for each one at the top right of the VHV window. If there are no embedded URLs, then display the one from index.hmd if there is a PDF available from kernScores.
function buildPdfIconListInMenu() { var container = document.querySelector("#pdf-urls"); if (!container) { return; } var urllist = getPdfUrlList(); var output = ""; if (urllist.length > 0) { for (var i=0; i<urllist.length; i++) { output += makePdfIcon(urllist[i].url, urllist[i].title); } } else { if...
[ "function showLinks() {\n var app = UiApp.createApplication();\n var mainPanel = app.createVerticalPanel(); \n var scrollPanel = app.createScrollPanel().setPixelSize(500, 300);\n var links = PropertiesService.getDocumentProperties().getProperty('LINKS');\n if(links != null) {\n links = JSON.parse(Propertie...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
creates Note objects from integer representations (i.e. 1,3,5...) takes any starting integer and makes that 1
function intToNote(k) { var l1 = []; if (k.length === 0) { return l1; } else { var x = k[0]; for (var i = 0; i < k.length; i++) { var r = new Note(k[i] - x + 1, false); l1.push(r); } return l1; } }
[ "function Note(o) {\n if (!(this instanceof Note)) {\n throw Error(\"Use new Note()\");\n }\n var pos = o.pos;\n if (pos === undefined) {\n var octave = validateRange(o.octave, 0, 8);\n var note = validateRange(o.note, 0, 7);\n pos = octave * 7 + note;\n }\n this._pos = validateRange(pos, 0, 56); ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Refreshes the data array and calls Plotly.react to make changes appear on graph.
function refreshGraph() { data = [ trace0, trace1, upperBound, lowerBound, leftBound, rightBound ]; Plotly.react(graph, data, layout); }
[ "function updateTillNow() {\r\n\tfor(var j = 0; j < activeGraphs.length; j++) {\r\n\t\tif(activeGraphs[j].keepUpdated) {\r\n\t\t\tactiveGraphs[j].canvas.data.datasets = [];\r\n\t\t\tactiveGraphs[j].canvas.update();\r\n\r\n\t\t\tfor(var i = 0; i < activeGraphs[j].graphs.length; i++) {\r\n\t\t\t\tpushGraphData(active...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
show itinerary's route, show all if day = 0
function showRoute(itiStructure, day) { hideSightDetail(); var stopsArr = []; var stops = itiStructure.stops; clearSight(); setMarkers(itiStructure,day); if (day == 0) { for (var i in stops) { for (var p in stops[i]) stopsArr.push(stops[i][p]); } } else { for (var p in stops[day-1...
[ "function displayRoute() {\r\n clearOverlays();\r\n var start\r\n var end\r\n if (inputLocation == \"\") { start = currentLocation; end = currentCafeLocation; }\r\n else { start = inputLocation; end = currentCafeLocation; }\r\n\r\n var directionsDisplay = new google.maps.DirectionsRenderer();// al...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
============================================================================================= Builds a new TourImg obj, instantiated in ImgDisplay.setNewImg() Note: All of the properties of a TourImg obj are based off of the accompanying Slide obj's properties passed in on init =========================================...
function TourImg(slide) { this.el = $('<div class="clickable">'); this.slide = slide; this.img = $('<img src="' + slide.src + '" alt="' + slide.alt + '">'); this.el.html(this.img); // Add event listeners for the TourImg obj if(Param.isTouchCapable) { this.img.on('touchstart', functio...
[ "function IaPic()\n\t\t{\n\t\t\tthis.el = new Image();\n\t\t\tthis.height = 0;\n\t\t\tthis.width = 0;\n\t\t\tthis.loaded = false;\n\t\t}", "function ImageFlow ()\r\n{\r\n\t/* Setting option defaults */\r\n\tthis.defaults =\r\n\t{\r\n\t\tanimationSpeed: 50, /* Animation speed in ms */\r\n\t\taspect...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
to input two strings and return a string which represents the bit by bit XOR value
function xor_strings(a, b) { //xor is only carried out if the two strings have the same length if(a.length != b.length) { alert("Error calculating XOR"); return; } var output = ""; for (var i=0; i<a.length; i ++) { output+=XOR(a[i],...
[ "function xor(a, b) {\n assert.equal(a.length, b.length);\n\n var length = a.length,\n result = new Buffer(length);\n\n for (var i = 0; i < length; i++) {\n result[i] = a[i] ^ b[i];\n }\n\n return result;\n}", "function hex_xor(hex1, hex2) {\n if (!hex1 ||\n !hex2 ||\n hex1.length !=...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
adds another column description to this data provider
pushDesc(column) { const d = column; d.accessor = d.accessor || rowGetter; d.label = column.label || d.column; this.columns.push(column); this.fire(__WEBPACK_IMPORTED_MODULE_2__ADataProvider__["a" /* default */].EVENT_ADD_DESC, d); }
[ "function createDescriptionCol(item) {\n\treturn '<td align=\"left\" class=\"description\">' + item.name + '</td>';\n}", "updateDescription(newDesc) {\n this.description = newDesc;\n }", "SetColumn() {}", "description(newDescription) {\n this.programMetadata.description = newDescription;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if the given object is an instance of Attachment. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === Attachment.__pulumiType; }
[ "function isAttachment(session) { \n var msg = session.message.text;\n if ((session.message.attachments && session.message.attachments.length > 0) || msg.includes(\"http\")) {\n //call custom vision\n customVision.retreiveMessage(session);\n\n return true;\n }\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Provides basic logging functionality (prints to console). DEVELOPER: All the messages (instances of class `LogMessage`) are saved in an array and can be accessed via `TheFragebogen.logger.logMessages` as long as this logger is used.
function LogConsole() { this.logMessages = new Array(); this.debug("LogConsole.constructor()", "Start"); }
[ "getLogs() {\n this.logs.map((log)=>{\n console[log.type].call(null, log.msg);\n })\n }", "log (msg) {\n if (msg === undefined) return this._log.join('\\n')\n if (this._keepLog) this._log.push(msg)\n }", "_log() {\n let args = Array.prototype.slice.call(arguments, 0);\n\n if (!a...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Style for white mini label.
static set whiteMiniLabel(value) {}
[ "static set whiteLabel(value) {}", "static get centeredGreyMiniLabel() {}", "static set whiteBoldLabel(value) {}", "static set miniBoldLabel(value) {}", "static set wordWrappedMiniLabel(value) {}", "static get wordWrappedMiniLabel() {}", "static set largeLabel(value) {}", "static set boldLabel(value) ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
5. Write a function 'recursiveMultiplier' that takes two arguments, 'arr and num', and multiplies each arr value into by num and returns an array of the values.
function recursiveMultiplier(arr, num){ let result = []; function helper(index){ if(index === arr.length){ return; } else { result[index] = arr[index] * 2; helper(index + 1); } } helper(0); return result; }
[ "function mulRecurse(...num) {\n const array = [...num];\n const array2 = [...array[0]];\n let prod = 1;\n if (array2.length > 0) {\n let n = array2.shift();\n prod = n * mulRecurse(array2);\n }\n return prod;\n}", "function productOfArray(arr) {\n //initialize tracker variable\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Whenever a buffer changes track the change unless we are within a redraw. Within a redraw we flag the texteditor as disabled in this.disableBufferTracking. This stops us recording change events triggered by the changes made in redraw. This is intended to track changes made to the text that did not come from neovim.
onDidBufferChange(editor:TextEditor, event) { if (this.disableBufferTracking.get(editor)) { return; } if (editor[$$textEditorInitialContents] && editor[$$textEditorInitialContents] === event.newText) { // When an editor first loads we set it's contents - we need to ...
[ "function setBufferChecker() {\n bufferChecker = window.setInterval(function() {\n var allBuffered = true;\n\n var currTime = getCurrentTime(masterVideoId);\n\n for (var i = 0; i < videoIds.length; ++i) {\n var bufferedTimeRange = getBufferTimeRange(videoIds[i]...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function to calculate total dislikes
findTotalDisLikes() { //Calculate totalLikes and totalDislikes const totalLikesandDisLikes = this.state.quotes.map(quote => ({ ...quote, likes: this.state.likes[quote.id], dislikes: this.state.dislikes[quote.id] })); const totalDisLikes = totalLikesandDisLikes.reduce((sum, quote) => { return sum + q...
[ "findTotalLikes() {\n\t\t//Calculate totalLikes and totalDislikes\n\t\tconst totalLikesandDisLikes = this.state.quotes.map(quote => ({\n\t\t\t...quote,\n\t\t\tlikes: this.state.likes[quote.id],\n\t\t\tdislikes: this.state.dislikes[quote.id]\n\t\t}));\n\t\tconst totalLikes = totalLikesandDisLikes.reduce((sum, quote)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
I worked on this challenge with: Nicolette Chambers Pseudocode /def seperate comma function which will take a integer as a argument transform to a string count from last number use a for loop to insert comma at every three numbers should only include corrent number of commas Initial Solution
function seperateComma(number) { var stringNumber = number.toString().split(""); var indexOfLastNumber = stringNumber.length; for (var counter = 3; counter <= indexOfLastNumber ; counter += 3 ) { var slices = indexOfLastNumber - counter; var numWithCommas = stringNumber.splice(slices, 0 ,","); var re...
[ "function listOfNumbers(countTo, countBy) {\n\n var list = \"\";\n\n for (var number = countBy; number <= countTo; number += countBy) {\n list += number;\n if (number + countBy <= countTo) {\n list += \", \";\n }\n }\n return list;\n}", "function numberJoinerFancy(startNum, endNum, separator) {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
given a formId, gets a list of all submissions matching that formId.
static listByFormId(form_id) { return this.queryByFormId(form_id).then((rows) => rows.map((row) => new this(row, false))); }
[ "static queryByFormId(form_id) {\n return db.select('*').from(this._entityName()).where({ form_id }).orderBy('id', 'desc');\n }", "function getFormByFormId(id) {\n var formId;\n var formName;\n var formParent;\n var availableTabs;\n var docSelectorForWebForms;\n\n if (id === \"F16\") {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
WARNING!!! In the rare case that there are name collisions, this script will overwrite (delete perminently) files in the same folder in which the selected iTunesArtwork file is located. Therefore, to be safe, before running the script, it's best to make sure the selected iTuensArtwork file is the only file in its conta...
function DoIcons(iTunesArtwork, iconsInfo) { try { if (iTunesArtwork !== null) { var doc = open(iTunesArtwork, OpenDocumentType.PNG); if (doc == null) { throw "Something is wrong with the file. Make sure it's a valid PNG file."; } var startState = doc.activeH...
[ "function init(){\n\n // Check to see if sourceFolder has any folders in it\n if(sourceFolder != null){\n \n // Create new array for files to be stored;\n files = new Array();\n \n // Only use file types that are illustrator files\n fileType = \"*.ai\";\n \n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
=============================================================================================================== =============================================== Graph Area =======================================================
function GraphArea(graphManager){ this.svgManager = graphManager.svgManager; this.graphManager = graphManager; // this.padding = 0.1; // this.paddingLeft=0.1; // this.paddingRight = 0.02; this.paddingRightPx = 25; // this.paddingBottom = 0.15; // this.paddingTop = 0.01; this.graphPadding = 0.1; }
[ "function Area(theX0, theY0, theX1, theY1, theColor, theBase, theTooltipText, theOnClickAction, theOnMouseoverAction, theOnMouseoutAction)\n{ this.ID=\"Area\"+_N_Area; _N_Area++; _zIndex++;\n this.X0=theX0;\n this.Y0=theY0;\n this.X1=theX1;\n this.Y1=theY1;\n this.Color=theColor;\n this.Base=theBase;\n this....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Display helptext about bad usage.
function badUsage(message) { console.log(`${message} Use -h to get an overview of the command.`); }
[ "function showRiskCharacteristicsWarningDialogue() {\n showDialog({\n title: 'WARNING: Inconsistent data',\n text: 'Elements on this page need correcting: \\nColumns of risk weights must TOTAL 100\\nProblem groups highlighted in red'.split('\\n').join('<br>'),\n negative: {\n titl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the current limit, in mA.
get_currentLimit() { return this.liveFunc._currentLimit; }
[ "get PressureMb() {\n return this.pressureMb;\n }", "get percent() {\n return Math.max(0, (SongManager.player.currentTime - this.startPoint) / (this.endPoint - this.startPoint));\n }", "get KM_PER_AU() {\n return (this.CM_PER_AU / this.CM_PER_KM);\n }", "set_currentLimit(newval)\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the metrics estimated for the text and style. Note: getTextMetrics does not require the PIXI representation of the stimulus to be instantiated, unlike getSize().
getTextMetrics() { if (typeof this._textMetrics === "undefined") { this._textMetrics = PIXI.TextMetrics.measureText(this._text, this._getTextStyle()); } return this._textMetrics; }
[ "_getTextMetrics(text) {\n var textSpan = document.createElement('span');\n textSpan.id = 'content-span';\n textSpan.innerHTML = text;\n\n var block = document.createElement(\"div\");\n block.id = 'content-block';\n block.style.display = 'inline-block';\n block.style...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Keypad designed for entering telephone numbers.
set PhonePad(value) {}
[ "set NamePhonePad(value) {}", "get NamePhonePad() {}", "function input(event_type) {\r\n\tinput_keyboard_options_with_one_state(0, event_type, \"lowercase_alphabet\"); //virtual_keyboard option 0; alphabet\r\n\tinput_keyboard_options_with_two_states(1, event_type, \"lowercase_accent_characters_one\", 8, 9); //v...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Filter migrator file version based on from version.
function filterFromVersion(file) { if (fromVersion) { if (direction == 'down') { return fromVersion; } else { return semver.gt(file.version, fromVersion); } } else { return true; } }
[ "function filterToVersion(file) {\n if (toVersion) {\n if (direction !== null && direction =='down') {\n return semver.gte(file.version, toVersion);\n } else {\n return semver.lte(file.version, toVersion);\n }\n }\n else {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
NAVBAR FOR USE ON SUBSIDIARY PAGES (specify path to parent page + string for current page)
function navbarsub(path, loc){ navbarhead(); navbarhome(); navbariter(path); navbarend(loc); }
[ "function navbar(path){\r\r\n\tnavbarhead();\r\r\n\tnavbarhome();\r\r\n\tvar ctr = 0;\r\r\n\twhile (ctr < (path.length - 1)) {\r\r\n\t\tnavbarnav(path[ctr].uri, path[ctr].str);\r\r\n\t\tctr++;\r\r\n\t}\r\r\n\tnavbarend(path[(path.length - 1)].str);\r\r\n\r\r\n}", "function navbarinfo(path, loc){\r\r\n\tnavbarhead...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find all source images within the resources directory
async function getSourceImages(projectDir, buildPlatforms, resourceTypes) { const resourceDir = path.resolve(projectDir, 'resources'); // TODO: hard-coded const srcDirList = buildPlatforms .map(platform => ({ platform, path: path.resolve(resourceDir, platform) })) .concat({ platform: 'global', p...
[ "function getAllImages() {\n return Images().select();\n}", "async loadImages() {\n const resources = Array.from(this._resources.entries());\n\n console.info(`[ImageManager] Loading ${resources.length} image assets.`);\n\n await Promise.all(resources.map(([iKey, iValue]) => {\n co...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
reenables buttons that are disabled inbetween games (or before a the first game has been started enables them for the first time.) no params or returns sets up action listeners for the guess button, the hint button and the enter key, when user is inside the letter input box (CSS letterHolder ID)
function enableButtons() { //event listener for the guess button $("#guess").click(function () { //calls the guesser function and passes the value of the input box to the function guesser($("#letterHolder").val()); //and clears the letter input box after guess button is clicked $("#letterHolder").val(""); ...
[ "function addAbcListeners() {\n document.getElementById('abc-btns').addEventListener('click', function (event) {\n if (!event.target.className.includes('btn')) return; // makes sure the element that was clicked is a button\n let button = event.target; //sets button to the element that f...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets up the input validation on the pledge slide page
function setupPledgeValidation(root) { // find all of the form fields allFields = root.find('input, textarea'); allLabels = root.find('label'); // prevent form submissions root.find('form').bind('submit', function (e) { e.preventDefault(); allLabels.trigger('click'); allFields.tri...
[ "function validateSlideThree() {\n\tvar motto = document.forms[\"register\"][\"businessmotto\"].value;\n\tvar mottoError = document.getElementById(\"error-businessmotto\");\n\tvar state = document.forms[\"register\"][\"state\"].value;\n\tvar area = document.forms[\"register\"][\"area\"].value;\n\tvar stateError = d...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Linear scale maps continuous domain to continuous range
function linearScale(domain, range, value) { return ((value - domain[0]) / (domain[1] - domain[0])) * (range[1] - range[0]) + range[0]; }
[ "function min(){return colorScale.domain()[0];}", "function linearAxis(min, max, n) {\n let labels = [];\n\n let nums = linspace(min, max, n);\n\n for (let num of nums) {\n labels.push({\n value: num,\n label: formatNumber(num)\n });\n }\n\n return labels;\n}", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
checks movement's energy level and movement cost level to see if it can move untit is an index of what to move (units[index][unit])
function hasMoveEnergy(unit) { var index = serverUtility.getUnitIndex(boardgameserver.userID); var actualUnit = units[index][unit]; console.log("Player: " + boardgameserver.userID); console.log("Get unit index: " + serverUtility.getUnitIndex(boardgameserver.userID)); console.log("Test Position: " + act...
[ "canMove(tile) {\r\n if (abs(tile.mapX - this.mapX) <= this.info.movement &&\r\n abs(tile.mapY - this.mapY) <= this.info.movement) {\r\n if (tile.unit) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n return false;\r\n }", "function processMovement(data)\n\t\t{\n\t\t\tif...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This is a function for getV3ProjectsIdRepositoryCommitsShaDiff
getV3ProjectsIdRepositoryCommitsShaDiff(incomingOptions, cb) { const Gitlab = require('./dist'); let defaultClient = Gitlab.ApiClient.instance; // Configure API key authorization: private_token_header let private_token_header = defaultClient.authentications['private_token_header']; private_token_header.apiK...
[ "getV3ProjectsIdRepositoryCommitsSha(incomingOptions, cb) {\n const Gitlab = require('./dist');\nlet defaultClient = Gitlab.ApiClient.instance;\n// Configure API key authorization: private_token_header\nlet private_token_header = defaultClient.authentications['private_token_header'];\nprivate_token_heade...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Uninstalls a handler for change detection batching status changes for a specific fixture.
function uninstallAutoChangeDetectionStatusHandler(fixture) { activeFixtures.delete(fixture); if (!activeFixtures.size) { stopHandlingAutoChangeDetectionStatus(); } }
[ "unregisterForecastUpdates (probe) {\n const refreshCallbackName = this.getRefreshCallbackName(probe)\n // Retrieve target elements\n const services = this.getElementServicesForProbe(probe)\n services.forEach(service => {\n // Unregister for forecast data update\n debug('Removing existing refr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
find the position of the pin of a node.
function _pinPos(node, pin) { var panelPos = panelObj.getBoundingClientRect(); var obj = node.obj.querySelector('[pin="' + pin + '"]'); if (!obj) obj = node.obj; var b2 = obj.getBoundingClientRect(); var pos = { x: Math.round(b2.left + b2.width / 2 - panelPos.left), y: Math.round(b2.top + b2.he...
[ "findNodePos(number) {\n for (let layer = 0; layer < this.nodes.length; layer++) {\n for (let node = 0; node < this.nodes[layer].length; node++) {\n if (this.nodes[layer][node].number === number) return [layer, node];\n }\n }\n return false;\n }", "get tileOffset() {}", "function icon...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
KalmanFilter estimates the firing rate arguments: spike_time: spike train beta: hyperparameter beta returns outdata: estimated firing rate outdata[0]: estimated value outdata[1]: its variance outdata[2]: its covariance
function KalmanFilter(spike_time,beta){ for(var i=0;i<N-1;i++){ EL[1][i]=EL[0][i]; VL[1][i]=VL[0][i]+(spike_time[i+1]-spike_time[i])/(2*beta); A=EL[1][i]-(spike_time[i+2]-spike_time[i+1])*VL[1][i]; EL[0][i+1]=(A+Math.sqrt(A*A+4*VL[1][i]))/2; VL[0][i+1]=1/(1/VL[1][i]+1/(EL[0][i+1]*EL[0][i+1])); } EL_N[N-1] ...
[ "function SecondStage(spike_time){\n var mu = spike_time.length / (spike_time[spike_time.length - 1] - spike_time[0]); // mean firing rate\n var beta0 = Math.pow(mu,-3);\n var beta = EMmethod(spike_time,beta0);\n var kalman_data = KalmanFilter(spike_time,beta);\n \n return kalman_data;\n}", "function KFinitialize...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
moveleg() sets appropriate direction for leg motion
function moveleg(){ // if move1 is active if(leg.move1){ // move leg up leg.vy-=leg.speed; // once leg has reached maximum extension, // turn this trigger off and turn next one on. if(leg.vy<=-leg.extend){ leg.move1=false; leg.move2=true; } } // if...
[ "function moveLegTop(){\n if(leg.moveDone){\n // reset motion\n leg.vy=0;\n leg.move1=false;\n leg.move3=false;\n\n // paw facing down\n // invert shapes\n leg.paw=-abs(leg.paw);\n leg.h=-abs(leg.h);\n leg.extend=-abs(leg.extend);\n // set position\n legStartPos=-200;\n // start...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the names of all streams that belongs to the system>account stream should be used only for internal usage because contains fields that should not be returned to the user
static getAllAccountStreams () { if (!SystemStreamsSerializer.allAccountStreams) { SystemStreamsSerializer.allAccountStreams = getStreamsNames(SystemStreamsSerializer.getAccountStreamsConfig(), allAccountStreams); } return SystemStreamsSerializer.allAccountStreams; }
[ "static getReadableAccountStreams () {\n if (!SystemStreamsSerializer.readableAccountStreams){\n SystemStreamsSerializer.readableAccountStreams = getStreamsNames(\n SystemStreamsSerializer.getAccountStreamsConfig(),\n readable\n );\n }\n return SystemStreamsSerializer.readableAccoun...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Request display of history by program_id, for repeats.
function update_history_program(prog_id) { $('#search_prompt').html("You may have seen this programme already in the past. Searching for activities with the same title and synopsis."); if (typeof snapshot_time == "undefined") { var url = '/tvdiary/history_json.jim?program_id=' + prog_id; } else { ...
[ "function bind_program_history(el) {\n $('a.history_link', el).click(function(e) {\n e.preventDefault();\n\n var title_id = $(this).attr('title_id');\n var channel_id = $(this).attr('channel_id');\n update_history_title_channel(title_id, channel_id);\n $(\"#tvd_tabs\").tabs( \"option\", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Renders all routes available to the application as JSON
get_all_routes_action(req, res, next) { res.send(this.get('RouteRegistry').getAll().map(this._publishRoute)); }
[ "get routes() {\n return JSON.parse(JSON.stringify(this._routes));\n }", "methodsAction(req, res) {\n const routes = [];\n const scenes = Object.keys(config.tradfri.scenes);\n\n for(let route = 0; route < scenes.length; route++) {\n routes.push(`/api/scene/${scenes[route]...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Read the end of central directory.
readEndOfCentral() { var offset = this.reader.lastIndexOfSignature(CENTRAL_DIRECTORY_END); if (offset < 0) { // Check if the content is a truncated zip or complete garbage. // A "LOCAL_FILE_HEADER" is not required at the beginning (auto // extractible zip for example)...
[ "readCentralDir() {\n var file;\n\n this.reader.setIndex(this.centralDirOffset);\n while (this.reader.readAndCheckSignature(CENTRAL_FILE_HEADER)) {\n file = new ZipEntry({\n zip64: this.zip64\n }, this.loadOptions);\n file.readCentralPart(this.rea...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finds the previous item based on the currently saved search.
function findPrev(ctx, query) { doSearch(ctx, true, query); }
[ "function findPrev(item) {\n var currNode = this.head;\n while (currNode.next.element != item && currNode.next.element != \"head\") {\n currNode = currNode.next;\n }\n if (currNode.next.element == item) {\n return currNode;\n }\n return -1;\n }", "function previousClicked() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determine whether the given properties match those of a `SseKmsEncryptedObjectsProperty`
function CfnBucket_SseKmsEncryptedObjectsPropertyValidator(properties) { if (!cdk.canInspect(properties)) { return cdk.VALIDATION_SUCCESS; } const errors = new cdk.ValidationResults(); if (typeof properties !== 'object') { errors.collect(new cdk.ValidationResult('Expected an object, but ...
[ "function CfnStorageLens_EncryptionPropertyValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Expected an object, ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Go through each tab and assign settings to them.
function assignSettingsToTabs(tabs, callback){ assignBaseSettings(tabs, function(){ assignAdvancedSettings(tabs, function(){ callback(); }); }); }
[ "function assignBaseSettings(tabs, callback) {\n\tfor(var i = 0;i<tabs.length;i++){\n\t\ttabs[i].reload = (tabs[i].reload || settings.reload);\n\t\ttabs[i].seconds = (tabs[i].seconds || settings.seconds);\t\n\t};\n\tcallback(tabs);\n}", "function assignAdvancedSettings(tabs, callback) {\n\tfor(var y=0;y<tabs.leng...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initiates the cursor flash
flashCursor() { if ( this.cursorTimer ) return; var toggle = function() { return setTimeout( function() { this.cursorElement.classList.toggle( 'hidden' ); this.cursorTimer = toggle(); }.bind( this ), 350 ); }.bind( this ); this.cu...
[ "function flashCursor() {\n cursor.style.background = \"#e0556170\";\n setTimeout(() => {\n cursor.style.background = \"#5dbeff\";\n }, 100);\n }", "function showCursor(cur) {\n if (cur != undefined) selectCursor(cur);\n slides.style.cursor = currentCursor;\n }", "showSystemCursor() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
///// [[[ q_kendoGridData (Search Result) Kendo Grid Data ]]]
function q_kendoGridData(url, fields, gridColumns, searchText, searchData) { /* ------------------ Parameters (eg.) ------------------ gridColumns = [ { command: { text: "view", click: showDetails }, title: " ", width: "87px" }, { ...
[ "function q_gridDataSource(url, fields, searchText, searchData) {\n /* \n ------------------\n Parameters (eg.)\n ------------------\n url = \"crm/people/searchPeople\" \n fields = {\n PID: { type: \"number\" },\n FNAME: { type: \"string\" },\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Uniform buffer objects. Handles blocks of uniform on the GPU. If WebGL 2 is not available, this class falls back on traditionnal setUniformXXX calls. For more information, please refer to :
function UniformBuffer(engine, data, dynamic) { this._engine = engine; this._noUBO = engine.webGLVersion === 1; this._dynamic = dynamic; this._data = data || []; this._uniformLocations = {}; this._uniformSizes = {}; this._uniformLocatio...
[ "uploadUniforms() {\n const gl = EngineToolbox.getGLContext();\n if (!this.shaderProgram) {\n return;\n }\n\n // pass uniforms to shader only if defined\n gl.useProgram(this.shaderProgram);\n this.uniforms.modelViewMatrix.value &&\n uniformMatrix4fv(this.uniforms.modelViewMatrix);\n t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
the way this works is you start at this.root, you will then run helper function traverse push that value into data, then check to see if left, will then call travers on node.left wil lthen check to see if if left and repat all the way down to the endof left side it will then go back up to one level and see if there is ...
function traverse(node) { data.push(node.value); if (node.left) { traverse(node.left); } if (node.right) { traverse(node.right); } }
[ "traverseLevelOrder() {\n const root = this._root;\n const queue = [];\n\n if (!root) {\n return;\n }\n queue.push(root);\n\n while (queue.length) {\n const temp = queue.shift();\n console.log(temp.value);\n if (temp.left) {\n queue.push(temp.left);\n }\n if (t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Enables sorting buttons used in conjunction with disable
function enableSortingBtn(){ document.querySelector(".bubsort").disabled = false; document.querySelector(".insertionsort").disabled = false; document.querySelector(".mergesort").disabled = false; document.querySelector(".quicksort").disabled = false; document.querySelector(".selectionsort").dis...
[ "function enableReordering() {\n $(ACHIEVEMENTS_SELECTOR).sortable({\n update() {\n const ordering = serializedOrdering();\n submitReordering(ordering);\n },\n disabled: false,\n });\n $(BUTTON_SELECTOR).removeClass('btn-default').addClass('btn-danger');\n $(REORDER_ICON_SELECTOR).removeClass...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The AWS::SES::ReceiptRuleSet resource specifies an empty rule set for Amazon SES. For more information, see CreateReceiptRuleSet in the Amazon Simple Email Service API Reference. Documentation:
function ReceiptRuleSet(props) { return __assign({ Type: 'AWS::SES::ReceiptRuleSet' }, props); }
[ "function ReceiptRule(props) {\n return __assign({ Type: 'AWS::SES::ReceiptRule' }, props);\n }", "function ReceiptFilter(props) {\n return __assign({ Type: 'AWS::SES::ReceiptFilter' }, props);\n }", "clearRules()\n {\n this._rules.length = 0;\n }", "function d...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
populate each HTML table with the data that it receives based on the "house" property
function populateHouses(characters) { characters.forEach(character => { data.push(character); // store all API data in an array of objects for use by search if(character.patronus === "" && character.house !== "") character.patronus = "-"; if(character.house === "") character...
[ "function showHouse(house) {\n\n // create new HTML elements that will be needed\n let section = document.createElement('section');\n let heading = document.createElement('p');\n let image = document.createElement('img');\n let area = document.createElement('p');\n let capacity = docum...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is called while user click the PO tab
function poTabClicked() { $( "#rfq_tab" ).removeClass( 'tab_orange' ); $( "#rfq_tab" ).addClass( 'tab_gray' ); $( "#quote_tab" ).removeClass( 'tab_orange' ); $( "#quote_tab" ).addClass( 'tab_gray' ); $( "#po_tab" ).removeClass( 'tab_gray' ); $( "#po_tab" ).addClass( 'tab_orange' ); $( "#invoice_tab" ).remo...
[ "editPointViewClick() {\n this.deselectAllTabs();\n\n this.editPointViewTab.className = \"WallEditor_EditPointViewTab selected\";\n this.viewController = this.editPointView;\n\n this.selectCurrentTab();\n }", "click_expertTipsTab(){\n this.expertTipsTab.waitForExist();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function to save the canvas as example for training the model The pose label and the number of examples to save is given by the user
async function saveExamples(pose, numOfExamples){ messageP.html('Adding Examples...'); let poseCount = 1; for(let i=1 ; i<=numOfExamples ; i++){ messageP.html(`Example ${i}`); save(`${pose}(${poseCount}).jpg`) for(let i=0 ; i<10 ; i++) await tf.nextFrame(); poseCount++; } messageP.html('Done adding Exam...
[ "function downloadCanvas() {\n saveCanvas('ohwow', 'png');\n}", "function saveImage() {\n var data = canvas.toDataURL();\n $(\"#url\").val(data);\n }", "function savetosaveCard () {\n step++\n if (step < saveCard.length) { \n saveCard.length = step;\n console.log(`reset S...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Disposes popup background, if any.
function disposePopupBackground(systemPopup) { var settings = systemPopup.data("popup-settings"); var extra = systemPopup.data("popup-extra"); // Check if fade should be used if (settings.withFade) { // Fade background out and then remove it $(".popupOverlay", ext...
[ "function disposePopupHandler(systemPopup) {\n systemPopup.trigger(\"dispose\");\n }", "function hidePopup () {\n $('#popup').css('z-index', -20000);\n $('#popup').hide();\n $('#popup .popup-title').text('');\n $('#popup .popup-content').text('');\n $('.hide-container'...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates the PaymentDetails dictionary inside the PaymentRequest. This can change as the user selects shipping options.
buildPaymentDetails(cart, shippingOptions, shippingOptionId) { // Start with the cart items let displayItems = cart.cart.map(item => { return { label: `${item.quantity}x ${item.title}`, amount: {currency: 'USD', value: String(item.total)}, selected: false }; }); let t...
[ "buildPaymentRequest(cart) {\n // Supported payment instruments\n const supportedInstruments = [{\n supportedMethods: (PAYMENT_METHODS)\n }];\n\n // Payment options\n const paymentOptions = {\n requestShipping: true,\n requestPayerEmail: true,\n requestPayerPhone: true\n };\n\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This is a function for getV3ProjectsIdMergeRequestsMergeRequestIdComments
getV3ProjectsIdMergeRequestsMergeRequestIdComments(incomingOptions, cb) { const Gitlab = require('./dist'); let defaultClient = Gitlab.ApiClient.instance; // Configure API key authorization: private_token_header let private_token_header = defaultClient.authentications['private_token_header']; private_token_...
[ "async getCommentReplies({ commit }, commentId) {\n try {\n commit('getCommentRepliesRequest');\n let res = await axios.get(`/reply/comment-id/${commentId}`);\n const replies = res.data.replies;\n commit('getCommentRepliesInfo', replies);\n return res;\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the height of the wrapper
function getWrapperHeight(){ // if displaying multiple slides, multiple wrapper width by number of slides to display var wrapperHeight = $firstChild.outerHeight() * options.displaySlideQty; return wrapperHeight; }
[ "get height() {\n if ( !this.el ) return;\n\n return ~~this.parent.style.height.replace( 'px', '' );\n }", "_calculateHeight() {\n\t\tif (this.options.height) {\n\t\t\treturn this.jumper.evaluate(this.options.height, { '%': this.jumper.getAvailableHeight() });\n\t\t}\n\n\t\treturn this.naturalHei...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check if box collides with one of the other boxes on the bed
function collides(bed, box) { if (isEmpty(bed)) { return false; } for (var i = 0; i < bed.boxes.length; i++) { //Check if boxes are the same (then outsideHull will return) if (equalBoxes(box, bed.boxes[i])) { return true; } if (!outsideHull(box, getHull(bed.boxes[i]))) { return true; } } return ...
[ "isColliding() {\n this.getCorners();\n return Line.isColliding(this.hitboxLines, sceneHitboxLines.filter(line => this.hitboxLines.indexOf(line) === -1));\n }", "collide(rect) {\n return (this.left < rect.right && this.right > rect.left &&\n this.top < rect.bottom && this.bottom > r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Load course and append to req object
async function load (req, res, next, id) { try { req.course = await User.get({ '_id': id }) return next() } catch (e) { next(e) } }
[ "readCourseData(){\r\n let url=\"https://maeyler.github.io/JS/data/Courses.txt\";\r\n fetch(url)\r\n .then(res => res.text())\r\n .then(res => this.addCoursesToMap(res,this.courses));\r\n }", "function load(req, res, next, id) {\n Cate.get(id)\n .then((cate) => {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
ADD ID: CALENDAR AND LIST
function addId(){ //Add ID to events, calendar and list var cal = document.getElementsByClassName("JScal"); var eventList = document.getElementsByClassName("JSeventList"); for (i = 0, length = eventList.length; i < length; i++) { //eventList or cal.lenght cal[i].href= "#JSeventID_" ...
[ "function igcal_getCalendarById(id, e)\r\n{\r\n\tvar o,i1=-2;\r\n\tif(e!=null)\r\n\t{\r\n\t\twhile(true)\r\n\t\t{\r\n\t\t\tif(e==null) return null;\r\n\t\t\ttry{if(e.getAttribute!=null)id=e.getAttribute(\"calID\");}catch(ex){}\r\n\t\t\tif(!ig_csom.isEmpty(id)) break;\r\n\t\t\tif(++i1>1)return null;\r\n\t\t\te=e.par...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The start function. Calls the table and user input functions.
function start() { console.log("Below is a list of our inventory.") table(); }
[ "function evalEntry()\n{\n//call input box evaluation in current stratum\nif (typeof (myTable) != null)\n {\n myTable.evalEntry();\n myTable.moveInputNext();\n }\n}", "function start() {\n connection.connect(function (err) {\n if (err) throw err;\n // greeting the user \n console....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add an alert message above the grid.
function alertMessageAdd() { alert.css('display', 'block'); }
[ "function AddAlert(){\n\t\t\t\talert(\"You already added a score of \" + boxCtrl.value + \" to this box.\");\n\t\t\t}", "alert( message )\n {\n this.$root.alert( message );\n }", "function displayNotification(type, messages, selector, insertBefore) {\n\tvar html = '<div class=\"alert al...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Unbind a keyboard shortcut.
removeShortcut(keys) { Mousetrap.unbind(keys) }
[ "function unbind_keys() {\n\t$(document).unbind(\"keyup\");\n\t$(document).unbind(\"keydown\");\n}", "stopKeyboardControl() {\n this.state.keyboardEnabled = false;\n }", "function disablehotKey() {\n\tnew Richfaces.hotKey('form_recherche:mykey', 'return', '', {\n\t\ttiming : 'immediate'\n\t}, function(e...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }