query
stringlengths
9
34k
document
stringlengths
8
5.39M
negatives
listlengths
19
20
metadata
dict
reference link... Create a Hero constructor that takes in name, quote, imgURL
function Hero(name, quote, imgURL){ this.hero = name; this.quote = quote; this.imgURL = imgURL; }
[ "function hero(name,quote,imgURL){\n // Create a new Hero object that stores the values of each input field (name, quote, imgURL)\n this.name = name,\n this.quote = quote,\n this.imgURL = imgURL\n }", "function Hero(name) {\n this.name = name;\n}", "function Hero(name,occupation){\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sect 6.2 Language Tags ====================== The IsStructurallyValidLanguageTag abstract operation verifies that the locale argument (which must be a String value) represents a wellformed BCP 47 language tag as specified in RFC 5646 section 2.1, or successor, does not include duplicate variant subtags, and does not in...
function /* 6.2.2 */IsStructurallyValidLanguageTag(locale) { // represents a well-formed BCP 47 language tag as specified in RFC 5646 if (!expBCP47Syntax.test(locale)) return false; // does not include duplicate variant subtags, and if (expVariantDupes.test(locale)) return false; /...
[ "function /* 6.2.2 */IsStructurallyValidLanguageTag(locale) {\n // represents a well-formed BCP 47 language tag as specified in RFC 5646\n if (!src$exp$$.expBCP47Syntax.test(locale))\n return false;\n\n // does not include duplicate variant subtags, and\n if (src$exp$$.expVariantDupes.test(locale...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set grid color for all possible moves
setMovesColor(color, newGrid) { for (let i = 0; i < this.moves.length; i++) { this.baseboard[this.moves[i].x][this.moves[i].y] = color; } this.baseboard[newGrid.x][newGrid.y] = color; this.updateGame(); }
[ "function setAllGrey() {\n for (let i = 0; i < squares.length; i++) {\n squares[i].style.background = \"grey\";\n }\n rotateGrid();\n setTimeout(() => toggleGridClickable(), 500);\n \n}", "function drawGridColor(){\n //Iterate through every element in the two-dimensional array\n for (var i = 0; i < 41; ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Realizando la Limpieza de cada input con su Id Generado txt
function limpiar(){ for(let i=1;i<=5;i++){ let txt = 'txt'+i; //Támbien: document.getElementById(txt).value = ''; recuadro = document.getElementById(txt); recuadro.value=''; } }
[ "function addInput () {\n //eliminar todos los elementos hijos del padre;\n var elemento = document.getElementById(\"addInputs\");\n while (elemento.firstChild) {\n elemento.removeChild(elemento.firstChild);\n };\n //colocar los imput\n let valorNumeroDatos = numeroDatos();\n\n for(let i =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Show the information for a submission in a popup
function showSubmissionPopup(submission) { hideUnlockedGraphPopups(); // Check if this submission is a solution if(submission.type == 'solutionsubmission') { // Create the HTML for the node popup $("#nodePopupContent").html("<div><span class='closeButton' style='float:right;'></span><br/>...
[ "showNewSubmission() {\n Store.modals.newSubmission.show = true;\n }", "function submissionDetails() {\r\n _submissionWindow = _submissionWindow || $(\"#crc-submission-window\").getKendoWindow();\r\n return _submissionWindow;\r\n }", "function add_complain() {\n\n $(\"#new_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
PREPARE LOADING OF IMAGES
function loadAllPrepared(img,opt) { if (img.data('preloading')==1) return false; var ar = opt.aspectratio, aratio=parseInt(ar[0],0) / parseInt(ar[1],0), limg = new Image(); if (img.data('lazysrc')!=img.attr('src') && img.data('lazysrc')!=undefined && img.data('lazysrc')!='undefined') { if (im...
[ "function preLoadImages() {\n var args_len = arguments.length;\n for (var i = args_len; i--;) {\n var cacheImage = document.createElement('img');\n cacheImage.src = arguments[i];\n __cache.push(cacheImage);\n }\n }", "loadImages(label) {\n this.loaders.m...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
fullName combination of role and name
fullName() { if (this.role != null) { return '**' + this.role + ' ' + this.name + '**'; } else { return '**' + this.name + '**'; } }
[ "fullName() {\n if (this.role != null) {\n return '**' + this.role + \" \" + this.name + '**';\n } else {\n return '**' + this.name + '**';\n }\n }", "function getFullName() {\n return `Israel ${lastName}`;\n}", "function roleName(id) {\n return Object.getOwnP...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Dispatch action that will update game in reduxtree.
function _update(data) { const { game } = data; store.dispatch(updateGame(game)); }
[ "function dispatch() {\n state = update(state, this)\n console.log(state)\n refreshDOM()\n}", "function dispatch(action){\n state = reducer(state, action)\n render()\n }", "async onAction(state, action) {\n await this.master.onUpdate(\n action,\n state._stateID,\n this.gameID,\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
GETTERS AND SETTERS// ///////////////////// One or more functions that fetch the data and post it to Home Assistant sensor(s) This particular consumer was built because the existing Grocy component you can get through Hacs doesn't include a sensor for the Tasks entered in Grocy. For now I've chosen to just map the Groc...
function getTasks() { // Define sensor object // If the sensor name you enter here doesn't exist yet, Home Assistant will automagically create it let sensorName = "grocy_tasks"; let sensorData; // 1. Get the data from the api we're consuming // If you're new to creating http requests, check out this tutori...
[ "getData(azure, gaze, stress, log) {\r\n console.log(\"Receiving Data...\"); // for notification in the browser's console log ( use \"ctrl + shift + j\" to display in browser )\r\n\r\n // the following sets the respective state data sets, which can then be accessed at a wider scope for the rest of the class\r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Maps a module id to a source.
map(id, source) {}
[ "addSource(map, id, source) {\n try {\n map.addSource(id, source);\n this.sources[id] = source;\n } catch (e) {\n throw e;\n }\n }", "map(id, source) { }", "getSource(id) { return this.sources.find(s => s.id == id); }", "function createSourceMap(modules) {\n const generator = create(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function that shows the tools that belong to a certain filter in the tool area above the image area
function showTools(){ if (actFilterNum<0){ return; } //Delete all non-permanent childs of filtertools $('#filter_tools').find('.tool_element').remove(); $('#filter_tools').find('#toolH3').remove(); // Add the Toolname var h3 = document.createElement('H3'); var t = document.createTextNode(fil...
[ "function showToolsFromButton(){\r\n\tactFilterNum = this.filterId;\r\n\t\r\n\t// this is still a hack:\r\n\t// unbind mouse from draw modus\r\n\t$('#image_canvas').unbind('mousedown');\r\n\t// reset draw filter radio button\r\n\tfor (var i = 0; i < filter.length; i++){\r\n\t\tif (filter[i].name == 'Draw'){\r\n\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Populate the currently selected pane with content generated from the blocks.
function renderContent() { var content = document.getElementById('content_' + selected); // Initialize the pane. if (content.id == 'content_blocks') { // If the workspace was changed by the XML tab, Firefox will have performed // an incomplete rendering due to Blockly being invisible. Rerender. Block...
[ "function renderContent() {\n var content = document.getElementById('content_' + selected);\n // Initialize the pane.\n if (content.id == 'content_blocks') {\n Blockly.mainWorkspace.render();\n } else if (content.id == 'content_xml') {\n// var xmlTextarea = document.getElementById('textare...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This function initizlies the 9 CellTypeDev objects that serve as a lookup table for when we are running the simulation so that we know which neighboring cells have to be examined for determining the next frame's state for a given cell.
function initCellLookupDev() { // WE'LL PUT ALL THE VALUES IN HERE cellLookupDev = new Array(); // TOP_DEV LEFT_DEV var topLeftArray = new Array( 1, 0, 1, 1, 0, 1); cellLookupDev[TOP_LEFT_DEV] = new CellTypeDev(3, topLeftArray); // TOP_DEV RIGHT_DEV var topRightArray = ...
[ "function initCellLookup()\n{\n // WE'LL PUT ALL THE VALUES IN HERE\n cellLookup = new Array();\n\n // TOP LEFT\n var topLeftArray = new Array( 1, 0, 1, 1, 0, 1);\n cellLookup[TOP_LEFT] = new CellTypeDev(3, topLeftArray);\n\n // TOP RIGHT\n var topRightArray = new Array(-1, ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Detecting targetted row based on mouseY position
trackRow(e) { let newRow = 0 this.state.rowMap.forEach((row, index) => { let value = e.clientY let min = row[0] let max = row[1] let isInRange = (value - min) * (value - max) <= 0 if (isInRange) { newRow = index } }) return newRow }
[ "function getMouseRow() {\n return Math.floor(mouseY / cellHeight) + 1;\n}", "function mouseIsOnTarget() {\n if (grid[mouseIndex(mouseX, mouseY)] == targetCell) {\n return true;\n }\n return false;\n}", "getrow(mouse) {\r\n return Math.floor(mouse.y / this.piecesize);\r\n }", "mouse...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calls .next()/.throw()/.return() on the task's generator function iterator, essentially taking a single step of execution on the task function.
_resumeGenerator(nextValue, iteratorMethod) { (true && !(!this._isGeneratorDone()) && Ember.assert("The task generator function has already run to completion. This is probably an ember-concurrency bug.", !this._isGeneratorDone())); try { TASK_INSTANCE_STACK.push(this); let iterator = this...
[ "function next(arg, isErr) {\n // Preventive measure. If we end up here, then there is really something wrong\n if (!mainTask.isRunning) {\n throw new Error('Trying to resume an already finished generator');\n }\n \n try {\n var result = void 0;\n if (isErr) {\n re...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Destroy sidebar custom scroll
function destroySideScroll() { $('.sidebar-inner').mCustomScrollbar("destroy"); }
[ "function destroySideScroll() {\n $('.sidebar-inner').mCustomScrollbar(\"destroy\");\n }", "function destroySideScroll() {\n $('.sidebar-inner').mCustomScrollbar('destroy');\n }", "destroy(){\r\n window.removeEventListener('resize', this, {caption: false});\r\n window.r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this function calculates the currentGravityCalculationArea
function calculateCurrentGravityCalculationArea() { let x; let y; // clear currentGravityCalculationArea const numberOfRows = currentGravityCalculationArea.length; const numberOfColumns = currentGravityCalculationArea[0].length; for (y = 0; y < numberOfRows; y++) { ...
[ "area() {\n return 4 * (3.14) * (this.radius**2)\n }", "calcolaArea() {\n\n return (this.base * this.altezza) / 2; \n }", "calculateArea(){\r\n return this.length * this.breadth;\r\n }", "getArea() {\n // On overriding, if we don't call super's method, we might skip some imp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Change ExtentionIcon based on status
function updateIcon(status) { let iconPath = "app/images/icons/healthy_19.png"; switch (status) { case 'CHECKING': iconPath = "app/images/icons/checking_19.png"; break; case 'OK': iconPath = "app/images/icons/healthy_19.png"; break; case 'M...
[ "function updateIcon(status) {\r\n\r\n\t// If status is true (add-on is enabled), icon variable will be enableIcon variable (Original icon - on)\r\n\t// If status is false (add-on is disabled), icon variable will be disableIcon variable (Gray icon - off)\r\n\tvar icon = (status === true) ? enableIcon : disableIcon;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates the energy module instance.
function EnergyModule() { _classCallCheck(this, EnergyModule); _get(Object.getPrototypeOf(EnergyModule.prototype), 'constructor', this).call(this, 'energy'); /** * Event containing the value of the energy, sent by the energy module. * * @this EnergyModule * @type {number} * @defau...
[ "static createInstance(seller, energyNumber, sellDateTime, expiredDateTime, capacity) {\n return new Energy({ seller, energyNumber, sellDateTime, expiredDateTime, capacity });\n }", "function createEnergy() {\n energyPellet = {\n x: Math.round(Math.random() * (w - cw) / cw),\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This does the dirty work of generating the matrix! All streets mentioned in data for starting and ending points must be passed through in the streets parameter. Streets must be unique, no duplicates!
function formMatrix(data, streets) { var resultMatrix = makeSquareMatrix(streets.length, 0); for (var i = 0; i < data.length; ++i) { var d = data[i]; resultMatrix[streets.indexOf(startingStreet(d))][streets.indexOf(endingStreet(d))]++; } return resultMatrix; }
[ "function convertToMatrix(routes){\n var matrix =[];\n var uniqueStreets = getUniqueRoads(routes);\n //init matrix\n for (let i = 0; i < uniqueStreets.length; i++) {\n matrix[i] = new Array(uniqueStreets.length);\n matrix[i].fill(0);\n }\n //forming the matrix\n for (let i = 0; i < routes.length; i++) ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
attemptQuestionCreation attempts to create a question in the question bank
function attemptQuestionCreation() { let errorLabel = document.getElementById("error-label"); let prompt = document.getElementById("prompt"); let difficulty = document.getElementById("difficulty"); let functionName = document.getElementById("function-name"); let constraintName = document.getElementB...
[ "static async create({category, question, correct_answer, answer_one, answer_two, answer_three, question_user_id}){\n try {\n let response = await database.insert('questions', {category, question, correct_answer, answer_one, answer_two, answer_three, question_user_id});\n const id = response.inse...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get and return the alertdivtext out of the htmlString the divtext contains the spam / ham probability
function parseHTML(htmlString) { let parser = new DOMParser(); let htmlDoc = parser.parseFromString(htmlString, 'text/html'); let alertBox = htmlDoc.getElementsByClassName("alert"); return alertBox[0].innerText.trim(); }
[ "helpTrySay(html) {\n var exp1 = /(<span class=\"assistant_response\" id=\"suggestion_header\">[\\s\\S]*?<\\/span>)/gi\n var exp2= /(>[\\s\\S]*?<)/gi\n if (!html.match(exp1)) return null\n // search exp1 (try say section)\n html = html.match(exp1).toString()\n // extract \"try to say\" translation...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Filters contacts by input data and selections, and redraws the table
function filterContacts(){ matchedWords=[]; filterActive=true; var value = $('#city-selector').val(); var valueChecked = true; if( $('#show-active:checked').length == 0 ){ valueChecked = false; }; var searchWord = $('#name-search').val().trim(); var pattern = new RegExp(searchWord...
[ "function filterContacts() {\n\t\tupdateEmployeesHtml(makeEmployeesHTML(employeesData));\n\t}", "function showSearchedContacts() {\n\tlet row;\n\tlet cellName;\n\tlet cellSurname;\n\tlet cellPhone;\n\tlet criteria = document.getElementById('searchCriteria').value;\n\t\n\tswitch(criteria) {\t\n\t\n\tcase 'Name': f...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new instance of the ChecklistManager class.
function ChecklistManager() { this.expandAll = __bind(this.expandAll, this); }
[ "function Checklist (clid) {\n this.assetid = clid || \"\";\n this.appcode = ChecklistConfig.appcode;\n this.datadomain = ChecklistConfig.datadomain;\n this.category = ChecklistConfig.catetory;\n this.userid = \"\";\n this.chklistname = \"\";\n this.chklistnameplus = \"\";\n this.status = \"not ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clean a value from the object If the value is a `String` we perform a number of actions before returning it. sanitize the value to remove anything potentially dangerous trim any extraneous whitespace if sanitizing the value escaped any characters, for example `>` as `>`, we want to revert that change back Else we just ...
static _cleanValue (value) { if (typeof value === 'string') { let cleanedValue = Sanitizer.sanitize(value) cleanedValue = cleanedValue.trim() cleanedValue = Sanitizer.unescapeEntities(cleanedValue) return cleanedValue } return value }
[ "_sanitize(value) {\n if (value === undefined) return null;\n value = value.toString().trim();\n return (value === \"\" ? null : value);\n }", "static _sanitiseValue (value) {\n if (typeof value === 'string') {\n let sanitisedValue = Sanitizer.sanitize(value)\n sanitisedValue ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
potUI; selectedCards = []; deck;
constructor(gameRound) { this.gameRound = gameRound; this.potUI = new Pot_UI(this); this.potUI.buildPot(); this.selectedCards = []; }
[ "selectDeck(deck) {\n if(deck){\n deck.sort();\n }\n self.selectedDeck = deck;\n }", "function removeCards() {\n cardsSelected = [];\n indexArray = [];\n}", "reset(){\n this.cards = this.initialCards\n this.drawnCards = []\n this....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
process results of volume
function processVolume (data) { controls.setVolume(data) }
[ "function processVolume (data) {\n setVolume(data)\n}", "function onVolume(response){\n if(response.status == VolumeLoader.DONE){\n console.log(\"Volume loaded.\");\n\n for(var v of response.volumes){\n volumes.push(v);\n }\n\n volume = response.volume;\n \n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[END bigquery_create_table] [START bigquery_delete_table]
function deleteTable (datasetId, tableId, projectId) { // Instantiates a client const bigquery = BigQuery({ projectId: projectId }); // References an existing dataset, e.g. "my_dataset" const dataset = bigquery.dataset(datasetId); // References an existing table, e.g. "my_table" const table = dataset...
[ "function deleteTable(table_name){\n connectToDatabase();\n \n stringDropTable = \"DROP TABLE \" + table_name;\n var stmt = conn.prepareStatement(String(stringDropTable));\n stmt.addBatch();\n var rs = stmt.executeBatch();\n \n closeConnection();\n \n return \"Table \" + table_name + \" Dro...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function to clear all submission logs (to prepare for a new contest).
function clearAllSubmissions() { return new Promise(function(resolve, reject) { UserSubLog.remove({}, { multi: true }, function(err, numRemoved) { if (err) { reject(Error("Unable to clear all submissions")); } else { UserSubLog.loadDatabase(function(err) { // reload database to "really" clear a...
[ "async function clearSubmissions () {\n await queryInformix('DELETE FROM informixoltp:long_comp_result')\n await queryInformix('DELETE FROM informixoltp:long_submission')\n await queryInformix('DELETE FROM informixoltp:long_component_state')\n await queryInformix('DELETE FROM informixoltp:round_registration')\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
RECOLORIR LINHAS DO ESQUEMA
function reColor() { //_ console.log('reColor()') for (let index = 1; index <= nGavs; index++) { switch (mESQ[index][0][1]) { case 'A': cLinPR = cLinPRa cLinRX = cLinRXa cLinPN = cLinPNa patPn = patPna break; case 'B': cLinPR = cLinPRb cLinRX = cLinRXb cLinPN = cLinPNb patPn = pa...
[ "function ResetLineSegmentsColor()\r\n{\r\n lineSegments.material.color = ConvertHexColorToRGBFloat(lineColor);\r\n}", "function recolor(e) {\n\trecolors++;\n\tlet [u,v] = [g.left(e),g.right(e)];\n\tlet cu = avail[u].first(); let cv = avail[v].first();\n\tlet f = e; let w = v; let c = cu;\n\tif (trace) traceSt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Prepopulate output with relative timestamp and measure of the first sample for each series.
function prePopulateOutput(out, buffer, argList, flag, tagsz) { var currentTimestamp = 0 var index_of_the_first_sample = 0 for (var i = 0; i < flag.nb_of_type_measure; i++) { var tag = { size: tagsz, lbl: buffer.getNextSample(ST_U8, tagsz) } var sampleIndex = findIndexFromArgList(argList, ...
[ "function generateTimeLineData(series){\n var events=[];\n var bouts=[];\n var frame_start=-1;\n var frame_phrase_start=-1;\n var frame_last=-1;\n var time_base=new Date(2017,1,1,0,0,0,0);\n var scale=40;\n var index=1;\n var scores=[0,0];\n var ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Helper function for loadNewMapArea that adds NPCs and other objects to the map.
function loadNPCsAndObjects(location) { $(".npc").remove(); $(".claimableObject").remove(); if (allNPCs[location]) { var currentNPCs = allNPCs[location]; currentNPCs.forEach(function(item) { $("#screen").append("<div class='npc' id='" + item.name + "'></div>"); $("#" ...
[ "prepareLevelData() {\n let newareas = {};\n let areanames = Object.keys(this.def.areas);\n let tilemap = {};\n for (let a = 0, name; name = areanames[a]; a++) {\n /* Insert the border from the surrounding areas */\n newareas[name] = this.loadAreaData(name);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
copy image small1 size 990x654
function image_small1() { return gulp .src(small1.src, { nodir: true }) .pipe(newer(small1.dist + "small")) .pipe(imageresize({ width: small1.params.width, height: small1.params.height, crop: small1.params.crop, upscale: false })) .pipe(imagemin({ progressive: true, svgo...
[ "function image_small2() {\r\n return gulp\r\n .src(small2.src, { nodir: true })\r\n .pipe(newer(small2.dist + \"small\"))\r\n .pipe(imageresize({\r\n width: small2.params.width,\r\n height: small2.params.height,\r\n crop: small2.params.crop,\r\n upscale: false\r\n }))\r\n .pipe(imagemin({\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
((((((((((((((((((((((((((())))))))))))))))))))))))))) Add data to levelDB with key/value pair
function addLevelDBData(key,value){ db.put(key, value, function(err) { if (err) { return ('Block ' + key + ' submission failed', err); // reject('error in addLevelDBData') }else{ // getLevelDBData(key); } }) }
[ "function addLevelDBData(key,value){\n db.put(key, value, function(err) {\n if (err) return console.log('Block ' + key + ' submission failed', err);\n // getLevelDBData(key);\n \n })\n \n \n}", "function addLevelDBdata(key,value){\n db.put(key, JSON.stringify(value), function(err) {\n if (err) re...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This function gets the current mode that MH is in and also gets a list of the availble modes MH uses. Currently this should be Home, Work and Vacation modes. If calling to load the system mode page we will use the available modes to build a table with the mode icons in a row with the icon for the current active mode hi...
function GetMhMode(ph) { var url = './sub?json(objects=mode_occupied)'; //Get the current MH mode using a JSON call $.get(url, function (data) { var mode = data.objects.mode_occupied.state; var modes = data.objects.mode_occupied.states; var count = Object.keys(modes).length; if (ph == "page") { ...
[ "modes() {\n\t\tlet _self = this;\n\n\t\tthis.api.call(\n\t\t\t'list_game_modes',\n\t\t\tfunction (data) {\n\t\t\t\tdata.forEach(function (mode, idx) {\n\t\t\t\t\t_self.app.sendMessage((idx + 1) + '. ' + mode.name);\n\t\t\t\t});\n\t\t\t}\n\t\t);\n\t}", "function init_mode() {\r\n fetch('/get_mode', {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add the environment variables needed to correctly build ruby and later run ruby tests. this function is invoked even if ruby is cached and compile step is skipped.
async function setupRubyEnvironment(rubyVersion) { // LANG environment must be set or Ruby will default external_encoding to US-ASCII i // instead of UTF-8 and this will fail many tests. core.exportVariable('LANG', 'C.UTF-8') // https://github.com/actions/virtual-environments/issues/267 core.exportVariable(...
[ "async function setupRubyEnvironment(rubyVersion) {\n\n // LANG environment must be set or Ruby will default external_encoding to US-ASCII i\n // instead of UTF-8 and this will fail many tests.\n core.exportVariable('LANG', 'C.UTF-8')\n\n // https://github.com/actions/virtual-environments/issues/267\n core.exp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
CONCATENATED MODULE: ./node_modules/rcmenu/es/hooks/useMemoCallback.js Cache callback function that always return same ref instead. This is used for context optimization.
function useMemoCallback(func) { var funRef = react.useRef(func); funRef.current = func; var callback = react.useCallback(function () { var _funRef$current; for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return (_fun...
[ "function useCallback(callback, dependencies) {\n return useMemo(() => callback, dependencies);\n}", "function useMemoized(factory) {\n var valueRef = React.useRef();\n\n if (!valueRef.current) {\n valueRef.current = factory();\n }\n\n return valueRef.current;\n }", "function memo(callback)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Executes a MySQL query to insert a new post into the database. Returns a Promise that resolves to the ID of the newlycreated post entry.
async function insertNewPost(post) { post = extractValidFields(post, PostSchema); const [ result ] = await mysqlPool.query( 'INSERT INTO posts SET ?', post ); return result.insertId; }
[ "createPost(post) {\n if (!post.subredditId) {\n return Promise.reject(new Error(\"There is no subreddit id\"));\n }\n\n return this.conn.query(\n `\n INSERT INTO posts (userId, title, url, createdAt, updatedAt, subredditId)\n VALUES (?, ?, ?,...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Figures out current title and toggles it/replaces it with time for 1s of animation
function toggleTitle(elem) { data = { "name":document.getElementById('event').value, "title":elem.childNodes[1].value, "date": d.getMonth().toString() + "/" + d.getDate().toString() + "/" + d.getFullYear().toString() } dataString = JSON.stringify(data).replace(/\"/g,"\\\"") var t...
[ "function switchToTitle(){\nstate = `title`;\n// Stop \"Heartbeat\" SFX\nif (intervalHeartbeat !== undefined) {\n clearInterval(intervalHeartbeat);\n intervalHeartbeat = undefined;\n}\n}", "function animateTitle(gameTitle) {\n return $.when($(\"#gameTitle\").delay(200).velocity({width: '100%'})).done(functio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Runtime helper for checking keyCodes from config. exposed as Vue.prototype._k passing in eventKeyName as last argument separately for backwards compat
function checkKeyCodes(eventKeyCode,key,builtInAlias,eventKeyName){var keyCodes=config.keyCodes[key]||builtInAlias;if(keyCodes){if(Array.isArray(keyCodes)){return keyCodes.indexOf(eventKeyCode)===-1;}else{return keyCodes!==eventKeyCode;}}else if(eventKeyName){return hyphenate(eventKeyName)!==key;}}
[ "function checkKeyCodes(eventKeyCode,key,builtInAlias,eventKeyName){var keyCodes=config.keyCodes[key] || builtInAlias;if(keyCodes){if(Array.isArray(keyCodes)){return keyCodes.indexOf(eventKeyCode) === -1;}else {return keyCodes !== eventKeyCode;}}else if(eventKeyName){return hyphenate(eventKeyName) !== key;}}", "f...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
function that converts arrays to visualization tables
function arrayToTable(data){ var table = new google.visualization.DataTable(); switch(getType(data[0])){ case "object": for (var name in data[0]){ table.addColumn( getRowType(data[0][name]) , name); } for(var i= 0;i < data.length;i++){ var row = []; for(var name in data[i]){ row.p...
[ "function viewArrayAsTable(myArray) {\n var result;\n //var result = \"<table border=1>\";\n\n // make head row with titles\n// result += \"<tr>\";\n// if (myArray.length>0){\n// \tvar x = myArray[0];\n// \tvar y = Object.keys(x);\n// \tfor(var j=0; j<y.length; j++){\n// \tresult...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
getting the results in a new scene; current scene gets paused
createResult() { this.scene.launch("End", [count, t]); this.scene.pause(); console.log("pausiert"); }
[ "function sceneManager () {\n switch (scene) {\n case \"titleScreen\":\n // scene = \"introScene\";\n // touchToContinue();\n break;\n \n\n case \"intro\":\n displayText = grammar.flatten(\"#opening#\");\n // touchToContinue();\n backgr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
calculate difference between two markers
function getDifference(lat1, lng1, lat2, lng2){ // calculating distance using Google api var p1 = new google.maps.LatLng(lat1,lng1); var p2 = new google.maps.LatLng(lat2,lng2); var googleDistance = (google.maps.geometry.spherical.computeDistanceBetween(p1, p2)).toFixed(9); console.log...
[ "function diff(marks1,marks2) \n{\n \n var diff=marks2-marks1;\n return diff; \n}", "function diffPoints(point1,point2){return{left:point1.left-point2.left,top:point1.top-point2.top};}", "function markerSortWE(a, b) {\n return Number(a.vessel.lon) - Number(b.vessel.lon);\n}", "funct...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
DISPLAY THE GAME PARTS: ANIMAL TYPE AND DASHES
function displayGame() { getAnimal(); animalType.innerHTML = gameAnimalType; animalToGuess.innerHTML = handleGameWord(gameAnimalExample); document.getElementById("guess").focus(); document.getElementById("guess").select(); wordWrapper.classList.remove("vis-hidden"); }
[ "function mainAmmoDisplay() {\n if (ammoTypes === 0) {return ``}\n else if (ammoTypes === 1 && randomMain.Type === \"Melee Main\") {return `---`}\n else if (ammoTypes === 1 && randomMainAmmoTwo !== undefined) {return `- ${randomMainAmmo.Name} Ammo and ${randomMainAmmoTwo.Name} Ammo`}\n else if (ammoType...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets if the provided structure is a ExtendsClauseableNodeStructure.
static isExtendsClauseable(structure) { return structure.kind === StructureKind_1.StructureKind.Interface; }
[ "static isImplementsClauseable(structure) {\r\n return structure.kind === StructureKind_1.StructureKind.Class;\r\n }", "static isExtendsClauseableNode(node) {\r\n return node.getKind() === typescript_1.SyntaxKind.InterfaceDeclaration;\r\n }", "static isImplementsClauseableNode(node) {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
`executeActionOnContainer` performs an operation on the container and its views as specified by `action` (insert, detach, destroy) Inserting a Container is complicated by the fact that the container may have Views which themselves have containers or projections.
function executeActionOnContainer(renderer, action, lContainer, renderParent, beforeNode) { ngDevMode && assertLContainer(lContainer); var anchor = lContainer[NATIVE]; // LContainer has its own before node. var native = unwrapRNode(lContainer); // An LContainer can be created dynamically on any node by ...
[ "function executeActionOnElementContainer(renderer, action, lView, tElementContainerNode, renderParent, beforeNode) {\n var node = lView[tElementContainerNode.index];\n executeActionOnElementOrContainer(action, renderer, renderParent, node, beforeNode);\n var childTNode = tElementContainerNode.child;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Build out the devices table
function buildDeviceTable(filteredJson){ //we have a list of devices now. // - Help displaying in a table http://www.encodedna.com/javascript/populate-json-data-to-html-table-using-javascript.htm //16 - Platform - so can use this to display Icons // EXTRACT VALUE FOR HTML HEADER. var col = []; ...
[ "function _drawDevicesList() {\n\t\tif ( $( \"#edisiogateway-known-devices\" ).length === 0 ) {\n\t\t\treturn;\n\t\t}\n\t\tfunction _getAssociationHtml( associationType, association, level ) {\n\t\t\tif ( association && ( association[ level ].length > 0 ) ) {\n\t\t\t\tvar pressType = \"short\";\n\t\t\t\tif ( level ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new default loading screen
function DefaultLoadingScreen(_renderingCanvas, _loadingText, _loadingDivBackgroundColor) { var _this = this; if (_loadingText === void 0) { _loadingText = ""; } if (_loadingDivBackgroundColor === void 0) { _loadingDivBackgroundColor = "black"; } this._renderingCanvas = _renderingCanvas;...
[ "function createLoader(){\n $.mobile.loading(\"show\", {\n text: \"loading connections\",\n textVisible: true,\n theme: \"b\",\n html: \"\"\n });\n}", "function loading() {\n var spinner = document.createElement('div');\n spinner.setAttribute('class', 'spinner');\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get RoleDefinitionId for 'Read'
function GetRoleDefinitionId() { var url = _spPageContextInfo.siteAbsoluteUrl + "/_api/web/roledefinitions/getByName('Read')/Id"; jQuery.ajax({ url: url, type: "GET", headers: { "accept": "application/json;odata=verbose", ...
[ "function GetRoleDefinitionId()\n {\n var url = _spPageContextInfo.siteAbsoluteUrl + \"/_api/web/roledefinitions/getByName('Read')/Id\";\n jQuery.ajax({\n url: url,\n type: \"GET\",\n headers: {\n \"accept\": \"application/json;odata=ver...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
generateYoutubeModal This function creates a modal and the video contained within when clicking the button with the ID of HowToPlay. It also adds an event listener to the close button to destroy the video to prevent it playing when unseen. Returns nothing.
function generateYoutubeModal() { let trigger = $("#HowToPlay"); trigger.click(function() { let targetModal = $(this).data("target"); videoSource = $(this).attr("data-video"); $(`${targetModal} iframe`).attr('src', videoSource); $(`${targetModal} button.close`).click(function() {...
[ "function workoutBtnEvent() {\n $(\".workout-btn\").on(\"click\", function () {\n\n var buttonTxt = $(this).text()\n\n var youtubeAPI = \"https://www.googleapis.com/youtube/v3/search\"\n var apiKey = \"AIzaSyAFvkpiXzwbO7dR0Nu3SG6_RcNQQT4fvJQ\"\n\n function getYoutube() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this adds anime user selected into array which will be used to display more anime info to the user
viewAnime(anime) { this.setState({ animeIn: [anime], }); }
[ "function update() {\n // Usuario seleccionado\n let val = select.value;\n // Mapear listado de anime vistos por el usuario como enteros truncados\n let f = x[val].map(n => Math.floor(n));\n\n // Recorrer los anime\n for (let i = 0; i < l.length; i++) {\n let pos...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns list of path grouping fields for the given encoding
function pathGroupingFields(mark, encoding) { return keys(encoding).reduce(function (details, channel) { switch (channel) { // x, y, x2, y2, lat, long, lat1, long2, order, tooltip, href, aria label, cursor should not cause lines to group case X: case Y: case HREF: case ...
[ "function pathGroupingFields(mark, encoding) {\n return keys(encoding).reduce((details, channel) => {\n switch (channel) {\n case X:\n case Y:\n case HREF:\n case DESCRIPTION:\n case URL:\n case X2:\n case Y2:\n case THETA:\n case THETA2:\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The date of birth for the practitioner.
get birthDate () { return this._birthDate; }
[ "get birthdate() {\n return new Date();\n }", "SetBirthday()\n {\n let year = this.date.getUTCFullYear();\n let month = this.date.getUTCMonth();\n let day = this.date.getUTCDate();\n let birthday = new Date((year + 1), month, day);\n return birthday.toISOString().slice(0, 10);\n }", "get bi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
E ::= T | E + T | E T
parseE() { let value = this.parseT(); while (this.tid === Parser.OP_ADD || this.tid === Parser.OP_SUB) { if (this.tid === Parser.OP_ADD) { this.lex(); value += this.parseT(); } else { this.lex(); value -= this.parseT(); } } return value; }
[ "function E2() {\n return T() && term('+') && E();\n}", "function E1() {\n return T();\n}", "function ev(n, s, e) {\n if (s === '+') return +n + f(e)\n else {\n let [n1, s1, e1] = tillSymbol(e)\n if(s1 === undefined) return +n1 * +n\n if (n1 === '(') {\n let [n2, s2, e2] = tillClose(e1)\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Combines another select query or raw expression to this query using `intersect`. The output row type of the combined query must match `this` query. Examples ```ts db.selectFrom('person') .select(['id', 'first_name as name']) .intersect(db.selectFrom('pet').select(['id', 'name'])) .orderBy('name') ```
intersect(expression) { return new SelectQueryBuilder({ ...this.#props, queryNode: SelectQueryNode.cloneWithSetOperation(this.#props.queryNode, parseSetOperation('intersect', expression, false)), }); }
[ "intersectAll(expression) {\n return new SelectQueryBuilder({\n ...this.#props,\n queryNode: SelectQueryNode.cloneWithSetOperation(this.#props.queryNode, parseSetOperation('intersect', expression, true)),\n });\n }", "intersect(callbacks, wrap) {\n if (arguments.length ==...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Users can shadow this file to wrap live previews. This is useful for applying global styles.
function LivePreviewWrapper({children}) { return ( <BaseStyles> <link rel="stylesheet" href="http://127.0.0.1:8081/css/arezzo.css"/> <Box p={3}>{children}</Box> </BaseStyles> ) }
[ "_injectResourcesInsidePreview() {\n const stl = this._iframeRefs.document.createElement('style');\n\n stl.innerHTML = `\n\t\t\tbody {\n\t\t\t\tmargin:0;\n\t\t\t\tpadding:0;\n\t\t\t}\n\t\t\t#wrapper {\n\t\t\t\tpadding: 20px;\n\t\t\t}\n\t\t`;\n\n this._iframeRefs.body.appendChild(stl);\n\n if (this.props...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check the orientation of the screen and get the height and width of the screen according to its orientation .
static getDimension(callBack){ Dimensions.addEventListener('change', () => { width = Dimensions.get("screen").width height = Dimensions.get("screen").height }) // store the orientation, height and width in an object ...
[ "_screenSize() {\n let r = this._screen.getBoundingClientRect();\n return { w: r.width, h: r.height };\n }", "function detectOrientation() {\n // if $(window).width() is greater than $(window).height() the window is landscape otherwise it is portrait\n orientation = $(window).width() > $(window...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
curGalReg is the element where scanRegion takes it's region from while moving around in the map, this element will take the currently selected galaxy/region TODO: get off the halfsecond timer for an update
function updateGalaxyRegion () { var curGalReg = document.getElementById('curGalReg'); if (curGalReg == null) { console.log('curGalReg is null!'); return; } var region = unsafeWindow.mapCurrentRegion; var galaxy = unsafeWindow.starsGalaxy; if (region == null) { if (document.URL.match(/([A-Za-z][...
[ "function setLocation() {\nif (Latitude > -90 && Longitude > -180) {\n setLong(Longitude);\n setLat(Latitude);\n resetRegion(); // Since user clicks the starmap, reset region, country, city.\n }\n} // setLocation", "function zoomguichange() {\n inputs.zoomgui = W.zoomgui.value; // just in case auto is to l...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reinicia eventos a elementos para votacion
function template_eventosVotacion() { $(".template_contenedorReputacion ._contenedorEstrellas.active a").each(function(index){ padre = $(this).parent().parent(); elemento = $(this); calificacion = parseInt(padre.attr("data-calificacion")); $(this).on({ mouseover: function() { padre.find("a").removeCl...
[ "function constroiEventos(){}", "function activadorEventosVendedores()\n{\n // Se declara las variables del menu vertical */\n \n var VisualizarV, ubicacionV,actividadesV, viaticosV, comisionesV;\n \n /* Se le asigna eventos a las anteriores variables */\n \n VisualizarV=$(\"#listadoVentas\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
game pause function display "PAUSE"
function pauseGame() { if(pause == true) { context.font = "26px Indie Flower"; context.fillStyle = "red"; context.fillText("PAUSE", 290, 230); } }
[ "pauseScene() {\n fill(255, 105, 180);\n text(\"Game Paused\", width/2-50, height/2);\n }", "function pauseGame(){\n\n\t// Update Achievement\n\tincrementAchievementProgress(7, 1);\n\n\t// Open Start Menu\n\t$('#StartMenu').modal({backdrop: 'static'});\n\n\t// Print a new Worm Fact\n printWorm...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
! ITEM HOVER ANIMATION
function itemHoverAnim(item,art,opt,direction) { if (item.data('simplevideo') != 1) checkMediaListeners(item); var videoon = false; var emp = item.find('.esg-media-poster'); if (emp.length>0) { if (emp.css("opacity")==0) videoon = true; } if (item.find('.isplaying, .isinpause').l...
[ "function mouseOverMenuButton(e) {\n e.target.children[0].style.animationName = \"underlineVisible\";\n e.target.children[0].style.animationDuration = \"0.2s\";\n e.target.children[0].style.height = \"5px\";\n e.target.style.animationName = \"changeColor\";\n e.target.style.animationDuration = \"0.2s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Swap the selected Pokemon between the left and right Pokemon selectors
function swapSelectedPokemon(e){ e.preventDefault(); if(self.battleMode == "single"){ // Swap individual Pokemon var pokemonA = pokeSelectors[0].getPokemon(); var pokemonB = pokeSelectors[1].getPokemon(); if(pokemonA && pokemonB){ pokeSelectors[0].setSelectedPokemon(pokemonB); ...
[ "function swapPiece(){\n var playerClass = getPlayerClass();\n if(targetSelection.hasClass('valid')){\n //targetSelection.addClass('valid');\n targetSelection.addClass(playerClass);\n targetSelection.addClass('current occupied');\n initialSelection.removeClass(playerClass);\n initialS...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Draw the UtilizationBar of time
drawUtilizationBar() { const scope = this; $("#time-of-day-bar").empty(); const svg_height = 400, margin = {top: 40, right: 10, bottom: 60, left: 40}, width = $("#time-of-day-bar").innerWidth() - margin.left - margin.right, height = svg_height - margin.top - margin.bottom, ...
[ "function timebar() {\n if (time >= 0) {\n var grad = context.createLinearGradient(350, 110, 100, 330); //(x0,y0) to (x1,y1)\n grad.addColorStop(0, '#614385');\n grad.addColorStop(1, '#513375');\n context.fillStyle = grad;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This runs recursively to keep exchanging chips until all bots with 2 chips have exchanged theirs.
function exchangeChips() { // find the bots with 2 microchips & that haven't exchanged them yet const botsToRun = bots.filter(hasEligibleBots); if (botsToRun.length > 0) { for (const bot of botsToRun) { // update the high destination chips if (bot.highDestination.type === 'bot') { const h...
[ "function simplifyChips(e) {\n // if i have 5 chips of 1, then is equivalent of having 1 chip of 5;\n let chips = Array.prototype.slice.call(dom.chipNpdes.getElementsByClassName(\"chip-1\"));\n if (chips.length === 5) {\n chips.forEach((chip) => {\n chip.remove();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Show nav function If the nav button is clicked, add the responsivestyle class If the button is clicked again, remove the class
function showNav() { if (this.wasClicked == false) { menuStyle.setAttribute("class", "responsive-style"); this.wasClicked = true; } else if (this.wasClicked == true) { menuStyle.removeAttribute("class", "responsive-style"); this.wasClicked = false; } }
[ "function buttonclick() {\n let x = document.getElementById(\"navbar__list\");\n if (x.className === \"topnav\") {\n x.className += \" responsive\";\n } else {\n x.className = \"topnav\";\n }\n}", "function setNav() {\n\n\t\t\t\tvar $nav = _$parent.find('nav');\n\t\t\t\tvar $contents = _$parent.fin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finds all files in the specified package dir where version placeholders are included.
function findFilesWithPlaceholders(packageDir) { const findCommand = buildPlaceholderFindCommand(packageDir); return spawnSync(findCommand.binary, findCommand.args) .stdout.toString() .split(/[\n\r]/) .filter(String); }
[ "function buildPlaceholderFindCommand(packageDir) {\n if (platform() === 'win32') {\n return {\n binary: 'findstr',\n args: [\n '/msi',\n `${translateVersionPlaceholderText} ${materialVersionPlaceholderText} ${ngVersionPlaceholderText} ${versionPlaceholderText} ${covalentVersionPlacehold...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Running a generic query which does not expect any return value For example delete or insert queries
function runGenericQuery(query) { return new Promise((resolve, reject) => { var connection = new Connection(config); connection.on('connect', function(err) { if (err) { console.log(err); reject(err); } else { request = new Reque...
[ "function TQueries() {}", "function Query () {}", "function QueryExecuter()\n{\n}", "function execGenericSQLQuery(sqlQuery, res) {\n\tconst connection = mysql.createConnection(dbConection);\n\n\tconnection.query(sqlQuery, function(error, results, fields) {\n\t\tif (error)\n\t\t\tres.json(error);\n\t\telse\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
checks if there are any sets left on the board if not, sets done as true and returns done
function checkDone(){ var done=true; var currentCards=[]; for (var j=1;j<7;j++){ for (var i=1;i<4;i++){ if (cardsOnBoard[j][i]!=null){ currentCards.push(cardsOnBoard[j][i]); } } } var numCardsOnBoard=currentCards.length; //brute force all possible sets for (var i=0; i<numCardsOnBo...
[ "function checkCompleted() {\n var flag = true;\n for (var i = 0; i < tileCount; ++i) {\n for (var j = 0; j < tileCount; ++j) {\n\n if ((boardArr[i][j].tile.x / tileSize) != i || (boardArr[i][j].tile.y / tileSize) != j) {\n flag = false;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the width of the suggestion box
function setSuggestionBoxWidth() { var searchBoxWidth = getSearchBoxWidth() + options.widthAdjustment; if (options.menuWidth == 'auto') { $suggestionBox.css({ 'min-width': searchBoxWidth }); } else if (options.menuWidth == 'constrai...
[ "function updateWidth() {\n scope.inputStyle.width = scope.containerSize.width - scope.tagsSize.width - 30;\n if( scope.inputStyle.width < 150 )\n scope.inputStyle.width = scope.containerSize.width - 30;\n }", "setWidth () {\n var newW...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieve XML string of preferences
function GetSamplePreferences() { var xmlstring = Radiology.GetPreference(SAMPLE_PREFS_NAME, SAMPLE_PREFS_TYPE); if (xmlstring != "") { var doc = xmldso.XMLDocument; doc.loadXML(xmlstring); var root = doc.documentElement; var nodeList = doc.getElementsByTagName(SAMPLE_ROOT); var elem = n...
[ "function GetSamplePreferences()\n{\n var xmlstring = Radiology.GetPreference(SAMPLE_PREFS_NAME, SAMPLE_PREFS_TYPE);\n\n if (xmlstring != \"\")\n {\n var doc = xmldso.XMLDocument;\n doc.loadXML(xmlstring);\n\n var root = doc.documentElement;\n\n var nodeList = doc.getElementsByTagName(SAMPLE_ROOT);\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
sort contacts in alpha order;
function sortContacts(arr){ arr.sort(function(a,b){ if (a < b) return -1; else if (a > b) return 1; return 0; }); return arr; }
[ "function sortContactsByFirstName()\n{\n\tcontactArray.sort(sortContactsFName);\n\tfunction sortContactsFName(a, b)\n\t{\n\t\tvar contactFirstNameA = a.firstName.toLowerCase();\n\t\tvar contactFirstNameB = b.firstName.toLowerCase();\n\n\t\tif(contactFirstNameA > contactFirstNameB)\n\t\t{\n\t\t\treturn 1\n\t\t}\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
CLOSE ALL INFINITE BOX //
function closeOtherInfinite(current) { jQuery('.infinitebox').each(function() { var ibox=jQuery(this); if (ibox.attr('id')!=current && jQuery(window).width()<980) { ibox.find('.ib-draw').each(function() { var draw=jQuery(this); var ibicon=draw.find('.ib-icon'); ibox.removeCl...
[ "function closeOpenBoxes() {\n var boxes = document.querySelectorAll('.' + OPEN_CLASS)\n // This allows for true toggling. We wait on animation frame for the new box\n // to open and then, if there are other open boxes, we remove them:\n if (boxes.length > 0) {\n raf(function () { // We use raf (re...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Switching Settings Icon to back Icon
function switchSettings2Back() { /* Reset Focus */ Draw.resetFocus(); }
[ "function toggleIcon() {\n if (iconState === 0) {\n console.log('invert')\n chrome.browserAction.setIcon({path:\"icons/icon_invert_16.png\"});\n iconState = 1;\n } else if (iconState === 1) {\n console.log('uninvert')\n chrome.browserAction.setIcon({path:\"icons/icon_16.png\"});\n iconState = 0;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Marks home on the map.
function markHome() { // Clear old home marker if (homeMarker) { homeMarker.setMap(null); } _home = new google.maps.LatLng(readCookie('latitude'), readCookie('longitude')); map.setCenter(_home); var image = new google.maps.MarkerImage( 'images/home.png', new google.maps.Size(48, 48), new google.maps.Po...
[ "function setHomeMarker() {\n\t\tif (typeof homeMarker !== 'undefined') homeMarker.setMap(null);\n\t\tlet position = new google.maps.LatLng({lat: parseFloat(lat), lng: parseFloat(lng)});\n\t\thomeMarker = new google.maps.Marker({\n\t\t\tmap: map,\n\t\t\tposition: position,\n\t\t\tvisible: false\n\t\t});\n\t\thomeMa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
common to pathArc, pathSector and pathAnnulus
function _path(r0, r1, a0, a1, cx, cy, isClosed) { cx = cx || 0; cy = cy || 0; var isCircle = isFullCircle([a0, a1]); var aStart, aMid, aEnd; var rStart, rEnd; if (isCircle) { aStart = 0; aMid = PI; aEnd = twoPI; } else { if (a0 < a1) { aStart = a0; aEnd = a1; } else { ...
[ "function subpath(p, x_1, y_1, x_2, y_2, c_x, c_y, r, a_1, a_2, as){\n this.pathtype = p;\n this.distance = 0;\n this.direction = 0;\n this.anglespeed = as; // for the mergeline\n this.x1 = x_1;\n this.y1 = y_1;\n this.x2 = x_2;\n this.y2 = y_2;\n this.cx = c_x;\n this.cy = c_y;\n this.ra...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This class creates and handles a simple text editor window. Example: var w=new VNTextEditorWindow(wm);
function VNTextEditorWindow(wm,options) { var opt=options||{}; VNWindow.call(this,wm,opt); this.editor=null; var self=this; vn.import('vn.text-editor').then(function() { self.editor=new VNTextEditor(); self.getContentDiv().appendChild(self.editor.getDiv()); }); }
[ "function createEditorWindow() {\n\twindow.createWindow('EditorWindow', {\n\t\tbackgroundColor: '#303030',\n\t\tparent: 'ConfigWindow',\n\t\tshow: false,\n\t\tdarkTheme: true,\n\t\twidth: 1920,\n\t\theight: 1080,\n\t\ttitle: \"Editor\",\n\t\ticon: path.join(__dirname, '/images/polylogix.jpg'),\n\t\twebPreferences: ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A Cross Hatch effect filter.
function CrossHatchFilter() { core.AbstractFilter.call(this, // vertex shader null, // fragment shader fs.readFileSync(__dirname + '/crosshatch.frag', 'utf8') ); }
[ "function CrossHatchFilter() {\n AbstractFilter.call(this,\n // vertex shader\n null,\n // fragment shader\n require('./crosshatch.frag')\n );\n}", "function CrossHatchFilter()\n\t{\n\t core.AbstractFilter.call(this,\n\t // vertex shader\n\t null,\n\t // fra...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Wrapper around buildLineContent which will reuse the structure in display.externalMeasured when possible.
function getLineContent(cm, lineView) { var ext = cm.display.externalMeasured; if (ext && ext.line == lineView.line) { cm.display.externalMeasured = null; lineView.measure = ext.measure; return ext.built } return buildLineContent(cm, lineView) }
[ "function getLineContent(cm, lineView) { // 927\n var ext = cm.display.externalMeasured; // 928\n if (ext && ext.line == lineView.line) { ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function to draw chest
function drawChest() { ctx.drawImage(treasureChest, treasurex-13, treasurey-13); }
[ "function chestFound(){\n ctx.drawImage(imgChest, chestX - 25, chestY - 25, 75, 75);\n}", "function initChests() {\n chests = document.getElementById('chests');\n\n chest1 = document.createElement('img');\n chest1.src = 'images/chest-closed.png';\n chests.appendChild(chest1);\n chest1.style.margin = '10px...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function that wraps everything to allow dynamically setting/changing grunt options and config later by grunt task. This init function is called once immediately (for using the default grunt options, config, and setup) and then may be called again AFTER updating grunt (command line) options.
function init() { /** Project configuration. @toc 5. */ grunt.initConfig({ concat: { devCss: { src: [], dest: [] } }, jshint: { options: { //force: true, globalstrict: true, //sub: true, node: true, loopfunc: ...
[ "function init(grunt) {\n\n // https://www.npmjs.com/package/grunt-dev-update\n grunt.loadNpmTasks('grunt-dev-update');\n\n grunt.registerTask('npm-outdated', ['devUpdate:outdated']);\n grunt.registerTask('npm-update', ['devUpdate:update']);\n grunt.registerTask('npm-prompt', ['devUpdate:prompt']);\n}", "fun...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return selectedKeys according with multiple prop
function calcSelectedKeys(selectedKeys, props) { if (!selectedKeys) return undefined; var multiple = props.multiple; if (multiple) { return selectedKeys.slice(); } if (selectedKeys.length) { return [selectedKeys[0]]; } return selectedKeys; }
[ "function calcSelectedKeys(selectedKeys, props) {\n if (!selectedKeys) {\n return undefined;\n }\n const { multiple } = props;\n if (multiple) {\n return selectedKeys.slice();\n }\n if (selectedKeys.length) {\n return [selectedKeys[0]];\n }\n return selectedKeys;\n}", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
For the base to be extensible, both objects must be pure JavaScript objects. The function assumes that base is undefined, or null or a pure object.
function extend (base, extension) { if (isUndefined(base)) { return copy(extension); } if (isUndefined(extension)) { return copy(base); } if (isPureObject(base) && isPureObject(extension)) { return utils.extend...
[ "function extend (base, extension) {\n if (isUndefined(base)) {\n return copy(extension);\n }\n if (isUndefined(extension)) {\n return copy(base);\n }\n if (isPureObject(base) && isPureObject(extension)) {\n return utils.e...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
VIDEO PLAYLIST SECTION redirect from the playlist option
function redirect_to_play_option(site_url, playlist_id) { window.location.href = site_url+'video/play_option/'+playlist_id+'/playlist/'; }
[ "function redirect_from_play_option(site_url, video_id, play_option)\n{\n\tif (play_option!='WF'){\n\t\twindow.location = site_url+'video/play/'+video_id+'/'+play_option+'/';\n\t}else{\n\t\tdisplay_buddy_list(site_url, video_id);\t\n\t}\n}", "function redirectsToFirstVideo() {\n\n chrome.tabs.updat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
unproject convert screen coordinate to WebGL Coordinates winx, winy point on the screen winz winz=0 corresponds to newPoint and winzFar corresponds to farPoint mat modelviewprojection matrix viewport array describing the canvas [x,y,width,height]
unproject(winx, winy, winz, mat, viewport) { winz = 2 * winz - 1; var invMat = gl_matrix_1.mat4.create(); gl_matrix_1.mat4.invert(invMat, mat); var n = gl_matrix_1.vec4.fromValues(winx, winy, winz, 1); gl_matrix_1.vec4.transformMat4(n, n, invMat); var n2 = gl_matrix...
[ "function unproject(winx,winy,winz,mat,viewport){ \n winx = 2 * (winx - viewport[0])/viewport[2] - 1; \n winy = 2 * (winy - viewport[1])/viewport[3] - 1; \n winz = 2 * winz - 1; \n \n var invMat = mat4.create(); \n mat4.invert(invMat, mat); \n var n = [winx,winy,winz,1] \n mat4.multiplyVec4(invMat,n,...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a FilePatch object by generating diffs between given oldStr and newStr using the diff module
function getEdits(fileName, oldStr, newStr) { if (process.platform === 'win32') { oldStr = oldStr.split('\r\n').join('\n'); newStr = newStr.split('\r\n').join('\n'); } const unifiedDiffs = jsDiff.structuredPatch(fileName, fileName, oldStr, newStr, '', ''); const filePatches = parseUniDif...
[ "function applyPatch (oldStr, uniDiff) {\n var diffstr = uniDiff.split('\\n');\n var diff = [];\n var remEOFNL = false,\n addEOFNL = false;\n\n // i = 4 in order to skip diff headers.\n for (var i = 4; i < diffstr.length; i++) {\n if(diffstr[i][0] === '@') {\n var meh = diffstr[i].split(/@@ -(\\d+...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
function to make the grid for the art maker CREATES THE TABLE WITH NESTED LOOP
function makeGrid() { for(let col = 0; col < gridHeight; col++){ const cellRow = $('<tr></tr>'); //CREATES TABLE ROWS canvas.append(cellRow); for (let row = 0; row < gridWidth; row++){ const cell = $('<td></td>'); cellRow.append(cell); }; }; }
[ "function grid() {\n\n for (let j = 0; j < obj.numRows; j++) {\n for (let i = 0; i < obj.numCols; i++) {\n stroke(obj.gridLineColor, 50);\n strokeWeight(1);\n line(0, (rowHeight) * j, (height - 300), (rowHeight) * j); // draws the rows\n line((colWidth) * i, 0, (colWidth) * i, (w...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
helper for deep mapping of objects
function deepMap(obj) { console.log(obj, Object.keys(obj.properties)); return Object.keys(obj.properties) .map(prop => { if (obj.properties[prop].type === 'object') { const newV = {}; newV[prop] = deepMap(obj.properties[prop]); return newV; } else { ...
[ "function deepMap(obj, fn) {\n // If the transform function transforms the value, regardless of type, return\n // the transformed value.\n const mapped = fn(obj)\n if (mapped !== obj) {\n return mapped\n }\n\n // Recursively deep map arrays and plain objects, otherwise return the value.\n if (Array.isArra...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
generate Meal Plan table
function drawMealPlanTable() { $(` <h3 class="title text-center">WEEKLY MEAL PLAN</h3> <div class="row justify-content-center mt-4"> <div class="col-12 table-responsive"> <table id="mealPlanTable" class="table table-hover table-bordered table-sm table-fixe...
[ "function generateMealPlan() {\n // here we will let them decide, based on their diet type, we can take a quick survey of the current diet type\n // when they click generate a meal plan because this can change very regularly\n\n if (dietType == 'maintain' /* check if the diet type == maintainWeight*/) {\n // ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieve the first `n` results for this query. If `n=1`, a scalar value is returned, otherwise a list is. Shares the behaviour of `all()`.
async first(count=1) { const result = await this.limit(count).all(); return count == 1 ? result[0] || null : result; }
[ "first(n = 1) {\n if (n < 1) {\n throw `You must query with a positive nonzero integer. Please use a\n different value for n.`;\n }\n if (this.trials.length === 0)\n return new DataCollection();\n if (n > this.trials.length)\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Click action on checkbox, checking for true or false and setting the localStorage pref accordingly
function preferenceCheckboxInteraction() { var checkBox = jQuery('#scannerCheckBox'); setPreference = checkBox.is(":checked"); if (setPreference === true) { window.localStorage.setItem('scanPref', 'true'); } else { window.localStorage.setItem('scanPref', 'false'); } }
[ "function save(){\n var checkbox1 = document.getElementById('onoffswitch1');\n localStorage.setItem('onoffswitch1', checkbox1.checked);\n\n var checkbox2 = document.getElementById('onoffswitch2');\n localStorage.setItem('onoffswitch2', checkbox2.checked);\n}", "function ebSaveCheckbox(checkbox) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get a profile from storage using its name then add its data to the input fields
function getProfile(profileId) { let store = browser.storage.local.get({ profiles: [] }); store.then(function(results) { var profiles = results.profiles; for (var i = 0; i < profiles.length; i++) { if (profileId == profiles[i].id) { regexInput.value = profiles[i].regex; ...
[ "function setupProfile(){\n defaultProfile = {};\n chrome.storage.sync.get({profile:defaultProfile}, function(result) {\n let profile = result.profile;\n //profile exists, go to mainMenu\n if (profile.first!==undefined){\n console.log(profile);\n updateWelcome(profile);\n gotoMainMenu();\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initialize the Cesium viewer and configure it to look like Mars
function initCesium( timeframe ) { var viewer = vm.cesium.makeViewer( timeframe.start, timeframe.end, function( config ) { return angular.extend( {}, config, { mapProjection: n...
[ "function createViewer() {\n viewer = new Cesium.Viewer('cesiumContainer', {skyAtmosphere: false, baseLayerPicker: false});\n viewer.scene.mode = Cesium.SceneMode.SCENE2D;\n viewer.clock.currentTime = Cesium.JulianDate.fromIso8601(\"2019-03-04T00:00:00.000Z\");\n viewer.timeline.zoomTo(Cesium.JulianDate...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Draw image on canvas
function drawImg(img) { gCtx.drawImage(img, 0, 0, gCanvas.width, gCanvas.height) }
[ "function drawImageCanvas() {\n\t\t\t\t// Emulate background-size: cover\n\t\t\t\tlet width = imageCanvas.width;\n\t\t\t\tlet height = imageCanvas.width / image.naturalWidth * image.naturalHeight;\n\n\t\t\t\tif (height < imageCanvas.height) {\n\t\t\t\t\twidth = imageCanvas.height / image.naturalHeight * image.natur...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called whenever a user clicks on a property value to edit it
function selectPropertyValueToEdit(event, propValueObj) { viewModel.selectedProperty(propValueObj); viewModel.selectedPropertyOldValue(ko.utils.unwrapObservable(propValueObj.Value())); $(event.target).next().children().first().focus(); $(event.target).next().children().first().select(); }
[ "function handlePropertyChange(e){\"value\"===e.propertyName&&getInstIfValueChanged(il)&&manualDispatchChangeEvent(e)}", "_beforePropertyChange(name, value) { }", "function fnToggleProperty(value){\r\n\t\t\t\t\t\t\t\tvar strProperty = this.property.substring(0, this.property.indexOf(\"_\"));\r\n\t\t\t\t\t\t\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This functions parses the query parameters from the url the format incoming format should be as follows q=[Search value]&format=[Search type]
function parseQuery() { var searchUnparsed = document.location.search; if (searchUnparsed.includes("&")) { searchParamsArr = searchUnparsed.split("&"); let query = searchParamsArr[0].split("="); let type = searchParamsArr[1].split("="); if (type[1] === "name") { searchByName(query[1]); } e...
[ "function processQueryString() {\n console.log(\"processQueryString\");\n\n var query_string = {};\n var query = window.location.search.substring(1);\n var vars = query.split(\"&\");\n for (var i = 0; i < vars.length; i++) {\n var pair = vars[i].split(\"=\");\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Shortcut to remove this member
remove () { this.guild.remove('member', this.data.id) }
[ "remove(member) {\r\n this.members.splice(this.members.indexOf(member), 1);\r\n }", "remove() {\n return this.channel.removeMember(this);\n }", "onMemberRemoved(member) {\n const memberIndex = this.members.indexOf(member);\n\n this.members.splice(memberIndex, 1);\n }", "delete(member)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
causalGraph node index to feature name map
getNodeIndexToFeatureMap(graph){ var indexToFeatureMap = {}; Object.keys(graph).map((featureName) => indexToFeatureMap[graph[featureName].nodeIndex] = featureName ); return indexToFeatureMap; }
[ "function labelNodes(nfa, nodeNum) {\n var keys;\n nodeNum = processNode(nfa[0], nodeNum);\n nodeNum = processNode(nfa[1], nodeNum);\n return nodeNum;\n}", "function mapNodes(mapData) {\n let nodes = [];\n for(let i=0; i<mapData.features.length; i++) {\n let f = mapData.features[i];\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function that removes the used props
removeUsedProps(aProps) { //METODO: change this to actual source cleanup delete aProps["text"]; delete aProps["maxLength"]; }
[ "removeUsedProps(aProps) {\n\t\t//METODO: change this to actual source cleanup\n\t\tdelete aProps[\"input\"];\n\t\tdelete aProps[\"values\"];\n\t}", "removeUsedProps(aProps) {\n\t\t//METODO: change this to actual source cleanup\n\t\tdelete aProps[\"input\"];\n\t\tdelete aProps[\"markup\"];\n\t\tdelete aProps[\"sp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create the size buffer that will be linked to the "size" attribute declared in the HTML shader element, moving forward, to update the size of any point we will access this buffer after we set the pointcloud_geometries attribute
function createSizeBuffer() { let sizebuff = new Float32Array( pointcloud_data.length ); let pcl_len = pointcloud_data.length; for(let i = 0; i < pcl_len; i++) { sizebuff[i] = DEFAULT_POINT_SIZE; } return sizebuff; }
[ "updatePointSize() {\n let pointSize = this.rawPointSize * this.opts.pointScale;\n\n if (pointSize > this.opts.maxPointSize) {\n this.pointSize = this.opts.maxPointSize;\n } else {\n this.pointSize = pointSize;\n }\n\n this.geometry.shader.uniforms.size.value = this.pointSize;\n }", "set...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
mail the verified member list must be on the "staff" list to get the user ids. perhaps this is overkill, but hey...
async function verifiedMemberList(emailto, msg){ console.log("verifiedMemberList"); //get the verified role verifyRole = await getVerifyRole(msg.guild); if (!verifyRole){ console.log("Oops - no verify role..."); } //fetch all guild members m = await msg.guild.members.fetch(); str= `Verified members of...
[ "function getListMembers(callback) {\n var memberIDs = [];\n\n tu.listMembers(\n {\n owner_screen_name: config.me,\n slug: config.myList\n },\n\n function(error, data){\n if (!error) {\n for (var i = 0; i < data.users.length; i++) {\n memberIDs.push(data.users[i].id_str);\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }