query
stringlengths
9
14.6k
document
stringlengths
8
5.39M
metadata
dict
negatives
listlengths
0
30
negative_scores
listlengths
0
30
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
Display a message and gif to give the user feed back that the program is doing something Empties the cloudDesc element, puts it there and uses clouds.gif
function displayLoad() { var load = $("<img>"); load.addClass("img-center img-responsive"); load.attr("src", "assets/images/clouds.gif"); load.attr("id", "cloud-gif"); $("#cloudDesc").empty(); $("#cloudDesc").attr("hidden", false); $("#cloudDesc").append("<h3 style='text-align: center;'>Sear...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DisplayEmptyCloud(cloud) {\n }", "function displayMessage () {\n msgBtn.innerHTML = 'Gimme more blues!'\n const quoteDisplay = document.getElementById('song');\n const bgImage = document.getElementById('contentHolder');\n bgImage.style.backgroundImage=\"url('./images/white_rect.jpg')\";\n...
[ "0.6674637", "0.6278566", "0.6174042", "0.60564643", "0.6010814", "0.59980536", "0.59955746", "0.5983422", "0.59832525", "0.5913073", "0.5832978", "0.5826261", "0.5812176", "0.58017254", "0.57959646", "0.5779354", "0.57602334", "0.57559615", "0.57537425", "0.5751647", "0.5739...
0.63914376
1
Display a message to the user, meant to be for errors Empties the cloudDesc element and puts the message there
function displayError(message, id = "cloudDesc") { $("#" + id).empty(); setTimeout(function() { $("#" + id).attr("hidden", false); $("#" + id).append("<h3 style='text-align:center;'>" + message + "</h3>"); }, 48); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DisplayEmptyCloud(cloud) {\n }", "function showSearchErrorMessage() {\n // clear out previous course information (if any)\n courseInformation.innerHTML = \"\";\n\n createElement(courseInformation, \"h3\", {\n text: \"An error occured\"\n });\n\n createElement(courseInformation, ...
[ "0.69558597", "0.6422907", "0.6287616", "0.6270141", "0.62009645", "0.6188574", "0.6184676", "0.6150851", "0.6137596", "0.6100792", "0.6057046", "0.6051926", "0.60476327", "0.6017959", "0.60111266", "0.6003562", "0.5998492", "0.5979127", "0.5963142", "0.5962693", "0.5957563",...
0.6771787
1
Restore the navigation animation states (idle, walk, run)
function restoreAnimation() { MyAvatar.restoreAnimation(); // Make sure the input is disconnected after animations are restored so it doesn't affect any emotes other than sit Controller.keyPressEvent.disconnect(restoreAnimation); Controller.disableMapping(eventMappingName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reset_animations(){\n if(active != \"idee\"){tl_idee.restart();\n tl_idee.pause();}\n if(active != \"reunion\"){tl_reunion.restart();\n tl_reunion.pause();}\n if(active != \"travail\"){tl_travail.restart();\n tl_travail.pause();...
[ "0.6961542", "0.6780888", "0.65228474", "0.63152695", "0.6302012", "0.6291178", "0.6276249", "0.6241444", "0.61748534", "0.61688316", "0.6158364", "0.6158364", "0.6158364", "0.6158364", "0.6144057", "0.6131308", "0.61246103", "0.6070249", "0.60690314", "0.6055099", "0.5994751...
0.7009933
0
Send ajax request if a bookmark was clicked
function bookmark ( data ) { var url = 'index.php?eID=tx_spsocialbookmarks_pi1&data=' + data; new Ajax.Request(url, {method : 'post'}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bookmark(itemID, pageLoad)\n{\n socket.emit('bookmark', itemID, pageLoad); \n socket.once('bookmarkResult', function(success)\n {\n if (success == 1)\n {\n if (!pageLoad) //user clicks bookmark; show confirmation \n {\n $('.bookmark-popup').fadeIn(500);\n $('.bookmark-popu...
[ "0.67170286", "0.64462304", "0.63570684", "0.6321045", "0.63131875", "0.6282598", "0.62696266", "0.6225412", "0.6131781", "0.61278117", "0.6102928", "0.6065894", "0.59865963", "0.5982651", "0.5976081", "0.5970457", "0.5943057", "0.59343755", "0.5886864", "0.5874958", "0.58683...
0.77279973
0
Extends the attribute names object with new names.
function extendAttributeNames(existingNames, newNames) { for (var key in newNames) { if (!existingNames[key]) { existingNames[key] = newNames[key] } else if (existingNames[key] != newNames[key]) { throw new Error('Attribute name conflict ' + key) } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static get observedAttributes() {return ['name']; }", "static get observedAttributes() {return ['name']; }", "set name(x) { this._name = x; }", "addName() {\n if (this.newName === '')\n return;\n this.names.push(this.newName);\n this.newName = \"\";\n }", "static get observedAttrib...
[ "0.6157559", "0.6157559", "0.6030156", "0.5999894", "0.5953171", "0.5950526", "0.5935198", "0.5898174", "0.5834793", "0.58274734", "0.5791793", "0.57614136", "0.57015", "0.5684676", "0.56767786", "0.5626914", "0.5613374", "0.5608151", "0.5602833", "0.5602288", "0.5595351", ...
0.78972393
0
Extends the attribute values object with new values.
function extendAttributeValues(existingValues, newValues) { for (var key in newValues) { if (!existingValues[key]) { existingValues[key] = newValues[key] } else{ throw new Error('Attribute value conflict ' + key) } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "changedAttributes() {\n let changes = this._super();\n Object.assign(changes, {type: [undefined, this.get('type')]});\n switch (this.get('type')) {\n case 'posix':\n Object.assign(changes, {posixValue: [undefined, this.get('posixValue')]});\n break;\n case 'acl':\n Object.as...
[ "0.60767245", "0.60084134", "0.5917039", "0.5881167", "0.58586836", "0.57683676", "0.5762376", "0.5697364", "0.5671306", "0.5638445", "0.5628931", "0.56163365", "0.56127894", "0.56014365", "0.55987245", "0.5545063", "0.5527526", "0.55024266", "0.5481669", "0.5478041", "0.5476...
0.75876033
0
The function tripIdCollector retrieves the contents of a table row Inputs: None Outputs: None
function tripIdCollector() { let table = document.getElementById("historyDisplay"); // Retrieving the trips table let rows = table.getElementsByTagName("tr"); // Retrieving table rows for (let i = 0; i < rows.length; i++) // For the number of rows { let currentRow = table.rows[i]; // Setting t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getRowsTable(row)\n{\n return row.parent().attr(\"id\");\n}", "getRowFromTile(id){\n let row;\n if(id.split('_')[1][1] != undefined){\n row = id.split('_')[1][0] + id.split('_')[1][1];\n }else\n {\n row = id.split('_')[1][0];\n }\n return row;\n }", "fun...
[ "0.5966006", "0.5667721", "0.5603764", "0.5513347", "0.54543465", "0.5358767", "0.5296182", "0.52647007", "0.5231726", "0.51378655", "0.5108658", "0.50935245", "0.50806856", "0.5039442", "0.4986454", "0.49637514", "0.49348098", "0.49246398", "0.49245507", "0.4915824", "0.4910...
0.6638154
0
The function afterID saves the trip index to Local Storage Inputs: Table Row Outputs: None (but it returns itself)
function afterID(row) { return function() { let cell = row.getElementsByTagName("td")[0]; // Getting the first cell of the row let tripNumber = cell.innerHTML; // Getting the value in that cell (the trip number) let theTripIndex = Number(tripNumber) - 1; // Getting the trip index (rat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setCurrentID() {\r\n dayMapsDB.transaction(function (transaction) {\r\n transaction.executeSql('SELECT * FROM dayMapsDB', [], function (tx, results) {\r\n var lastID = results.rows.length;\r\n storage.setItem(\"currentID\", lastID.toString());\r\n console.log(\"s...
[ "0.6026165", "0.5941128", "0.57324123", "0.571599", "0.5712064", "0.5706997", "0.56072944", "0.54863304", "0.5474381", "0.5460627", "0.5372038", "0.53502315", "0.5329496", "0.52970237", "0.5284723", "0.5274068", "0.5268009", "0.52610594", "0.5253365", "0.52527976", "0.525214"...
0.7892278
0
The function displayHistoricTrips displays the list of past trips stored under the user in a table Inputs: None Outputs: None
function displayHistoricTrips() { let scheduleIndex = localStorage.getItem(CURRENT_USER_KEY); // Getting the user index let output = ""; // Setting output as a blank string let tripNumber = 0; // For every trip stored under the current user, the following code will run for (let j = 0; j < listOfUse...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fillHistoryReport(visits) {\n\t$('#history-pane tbody').empty();\n\t$('#table-history').trigger('destroy.pager');\n\t$(\"#table-history\").trigger(\"update\"); //trigger an update after emptying\n\t//pad(number) function adds zeros in front of number, used to get consistent date / time display. \n\tfuncti...
[ "0.59347314", "0.58678925", "0.5806851", "0.57786787", "0.57675976", "0.5686399", "0.5658728", "0.5651386", "0.56242675", "0.55793047", "0.5565556", "0.55169797", "0.5470563", "0.54407614", "0.5424655", "0.5410117", "0.54077977", "0.5399935", "0.53975224", "0.5379123", "0.537...
0.7692246
0
Sets the specified .NET call dispatcher as the current instance so that it will be used for future invocations.
function attachDispatcher(dispatcher) { dotNetDispatcher = dispatcher; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init(p_Dispatcher) {\n\t\t_myDispatcher = p_Dispatcher;\t\n\t\treturn this;\n\t}", "initialize(dispatcher) {\n this.dispatcher = dispatcher;\n }", "setNavDispatcher( dispatcher )\n\t{\n\t\tthis.dispatcher = dispatcher;\n\t\treturn this;\n\t}", "dispatcher(){ return this.dispatch.bind(this); }", ...
[ "0.6183558", "0.6125706", "0.5863349", "0.5776761", "0.57681745", "0.56929404", "0.56917083", "0.55763197", "0.54644114", "0.54644114", "0.5461389", "0.5444821", "0.5444821", "0.5439523", "0.5427934", "0.5406396", "0.5406396", "0.54007953", "0.53637403", "0.5344039", "0.52285...
0.6887211
1
Adds a JSON reviver callback that will be used when parsing arguments received from .NET.
function attachReviver(reviver) { jsonRevivers.push(reviver); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function JSON() {}", "function jsonListener() {\n\tantlr4.tree.ParseTreeListener.call(this);\n\treturn this;\n}", "toJSON(jsonArg, onAnchor) {\n return this.toJS({ json: true, jsonArg, mapAsMap: false, onAnchor });\n }", "function JsonExtension() {}", "function JSON() {\r\n}", "toJSON(jsonA...
[ "0.5503699", "0.5499951", "0.5260348", "0.52374977", "0.5224121", "0.519156", "0.5172156", "0.51394427", "0.51145655", "0.5098124", "0.50653255", "0.5063679", "0.5019421", "0.5000536", "0.49495548", "0.49390644", "0.4924036", "0.4924036", "0.49036688", "0.48967588", "0.489431...
0.5573631
1
Invokes the specified .NET public method asynchronously.
function invokeMethodAsync(assemblyName, methodIdentifier) { var args = []; for (var _i = 2; _i < arguments.length; _i++) { args[_i - 2] = arguments[_i]; } return invokePossibleInstanceMethodAsync(assemblyName, methodIdentifier, null, args); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async method(){}", "static async method(){}", "function runTestOrAsync()/* : void*/\n {\n if ( this.methodName == null || this.methodName == \"\" )\n {\n flexunit.framework.Assert.fail( \"No test method to run\" );\n }\n\n if ( this.asyncTestHelper$oH...
[ "0.6426819", "0.60532194", "0.59986156", "0.5962921", "0.5938491", "0.5922699", "0.5828025", "0.5822592", "0.5822592", "0.58037674", "0.58001643", "0.57474804", "0.57474804", "0.5717216", "0.5571693", "0.55478966", "0.55437386", "0.55437386", "0.55269516", "0.55209", "0.54848...
0.6699002
1
Returns the final node (in depthfirst evaluation order) that is a descendant of the logical element. As such, the entire subtree is between 'element' and 'findLastDomNodeInRange(element)' inclusive.
function findLastDomNodeInRange(element) { if (element instanceof Element) { return element; } var nextSibling = getLogicalNextSibling(element); if (nextSibling) { // Simple case: not the last logical sibling, so take the node before the next sibling return nextSibling.previousSi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findLastFocusableElement(element) {\n var children = element.children;\n var length = children.length;\n var child;\n var focusableDescendant;\n\n for (var i = length - 1; i >= 0; i -= 1) {\n child = children[i];\n\n focusableDescendant = findLastFocusableElement(child);\n\n ...
[ "0.6303905", "0.627256", "0.62246585", "0.6155274", "0.6062503", "0.5922092", "0.58810043", "0.5867662", "0.5864467", "0.58219016", "0.5821523", "0.58188695", "0.58188695", "0.58188695", "0.58188695", "0.58188695", "0.58165723", "0.581062", "0.57611465", "0.57366276", "0.5695...
0.77867645
1
Allows the caster to hide a user from his list only
function casterBlockUser(user) { user.visible = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hideUserlists() {\n if (readify('beta-userlist', false)) {\n debu(\"Hiding userlists!\")\n var s = document.createElement(\"style\")\n s.id = \"beta-style-userlist\"\n\n s.textContent = \".c_view-list { display: none !important } \"\n\n document.body.appendChild(s)\n ...
[ "0.7330942", "0.72757554", "0.7015625", "0.68315697", "0.64489", "0.6431386", "0.62137866", "0.6194052", "0.61931604", "0.6142441", "0.609465", "0.6089196", "0.608633", "0.6075792", "0.6063069", "0.6019944", "0.6017522", "0.59867555", "0.5986304", "0.59671164", "0.5961422", ...
0.7375911
0
Allows the caster to show all users he hidden
function casterUnblockAllUser() { $scope.users().each( function(item) { item.visible = true; }); return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get userVisible(){ return this.filter(_elementIsUserVisible); }", "function casterBlockUser(user) {\n user.visible = false;\n }", "function hideList() {\n var userList = document.getElementById(\"userList\");\n userList.style.display = userList.style.display == \"none\" ? \"block\" ...
[ "0.68854123", "0.68612206", "0.6627024", "0.6603017", "0.65994346", "0.65331566", "0.6510457", "0.64905053", "0.6436094", "0.6390163", "0.63689864", "0.63317764", "0.6322187", "0.6303507", "0.6303507", "0.62932265", "0.62687016", "0.62644744", "0.62638426", "0.6240272", "0.62...
0.7360998
0
Function to validate each catalog type based on default settings
function validateCatalog(id, type) { array[id].validation = []; var categories = [...new Set(array[id].data.map(x => x.category))]; var settings = validationSettings["interaction studio"][type]; // check schema matches if(JSON.stringify(sort(array[id].meta.fields)) == JSON.stringify(sort(settings.schema))){ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validateCatalog() {\n array[\"file\"].validation = [];\n var settings = validationSettings[\"interaction studio\"][\"events\"];\n var schema = settings.schema;\n // check schema matches\n $.each(array[\"file\"].meta.fields, function(index, value ) {\n schema.erase(value);\n });\n if(schema.lengt...
[ "0.6353599", "0.631603", "0.60892093", "0.55970305", "0.5475465", "0.5469481", "0.5418046", "0.5349356", "0.5292123", "0.51810485", "0.51053745", "0.5077982", "0.5072626", "0.5072494", "0.50718796", "0.50576603", "0.5053347", "0.5039918", "0.50371885", "0.5033972", "0.5027504...
0.6525789
0
update the board position after the piece snap for castling, en passant, pawn promotion
function onSnapEnd() { board.position(game.fen()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onSnapEnd () {\n board.position(game.fen())\n}", "function onSnapEnd () {\n board.position(game.fen())\n}", "function onSnapEnd () {\n board.position(game.fen())\n}", "function onSnapEnd () {\n board.position(game.fen())\n}", "function onSnapEnd() {\n board.position(game.fen());\n}", "funct...
[ "0.7364586", "0.7364586", "0.7364586", "0.7364586", "0.73590577", "0.73381394", "0.732576", "0.6958904", "0.6700797", "0.6700797", "0.6652193", "0.66436654", "0.65944433", "0.65307796", "0.6512663", "0.6452984", "0.6443257", "0.6435951", "0.64048564", "0.640303", "0.6385102",...
0.7381901
0
Adjust the window scroll based on the user's mouse position. Returns True or False depending on whether or not the window scroll was changed.
function adjustWindowScroll(insta) { // Get the current scroll position of the document. var currentScrollX = window.pageXOffset; var currentScrollY = window.pageYOffset; // Determine if the window can be scrolled in any particular direction. var canScrollUp = currentScrollY > 0;...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateScroll(){\n var treshold = 5;\n ux.scroll.offsetPrevious = ux.scroll.offset;\n ux.scroll.offset = $(window).scrollTop();\n \n // We compare distance traveled with a defined treshold and report scroll direction\n if( ux.scroll.offset - ux.scroll.offsetPrevious > treshold ){\n ux.scroll.direc...
[ "0.64299095", "0.61292386", "0.6029931", "0.6026117", "0.5954876", "0.5947609", "0.59191215", "0.5883502", "0.5871996", "0.5762888", "0.5753273", "0.573505", "0.56811064", "0.5663514", "0.56242746", "0.5608032", "0.56054115", "0.55781496", "0.5563868", "0.55627996", "0.556162...
0.6336351
1
Checks if each ancestor in the ancestors array has a parent who is not also included in the ancestors array and returns an array of those ancestors who are missing a parent
function createAncestorsMissingParents(ancestors){ const ancestorsMissingParents = []; ancestors.forEach((ancestor) => { if (missingParent(ancestor, ancestors)) { ancestorsMissingParents.push(ancestor['Name']); } }) return ancestorsMissingParents; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function missingParent(ancestor, ancestors){\n let missingFather = true;\n let missingMother = true;\n if (ancestor['Father']<=0){\n missingFather = false;\n } else {\n for(let i=0; i < ancestors.length; i++) {\n if (ancestor['Father']===ancestors[i]['Id']){\n mi...
[ "0.7188352", "0.6484218", "0.6092265", "0.57981336", "0.57147837", "0.57147837", "0.56670195", "0.55117273", "0.5508566", "0.54900885", "0.54437363", "0.5400112", "0.53733313", "0.53425926", "0.5315649", "0.5311785", "0.53052026", "0.5293188", "0.52921706", "0.52642244", "0.5...
0.75462925
0
Checks to see if both of an ancestor's parents are unknown or are in the list of ancestors; returns true if a parent exists that is not in the list of ancestors. Used in createAncestorsMissingParents
function missingParent(ancestor, ancestors){ let missingFather = true; let missingMother = true; if (ancestor['Father']<=0){ missingFather = false; } else { for(let i=0; i < ancestors.length; i++) { if (ancestor['Father']===ancestors[i]['Id']){ missingFather =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "hasParent() {\n return this._ancestors.size() !== 0;\n }", "function hasAncestor(path, ancestor) {\n if (path === ancestor) {\n return true;\n } else if (path.parentPath) {\n return hasAncestor(path.parentPath, ancestor);\n } else {\n return false;\n }\n }", "function createAnce...
[ "0.6601782", "0.6133137", "0.60071176", "0.59700483", "0.5803374", "0.5803374", "0.57708067", "0.57708067", "0.57708067", "0.5762803", "0.5762803", "0.5762803", "0.5762803", "0.5762803", "0.5762803", "0.5762803", "0.5762803", "0.5762803", "0.5760678", "0.5760678", "0.5760678"...
0.75355023
0
Fetches additionalGens of each ancestor in ancestorsMissingParents; returns additionalAncestors array that contains the additional ancestors
async function getAdditionalAncestors(ancestorsMissingParents, additionalGens) { let ancestorCallUrls = []; ancestorsMissingParents.forEach((ancestorName) => { const url = `https://api.wikitree.com/api.php?action=getAncestors&key=${ancestorName}&depth=${additionalGens}`; ancestorCallUrls.push(ur...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createAncestorsMissingParents(ancestors){\n const ancestorsMissingParents = [];\n ancestors.forEach((ancestor) => {\n if (missingParent(ancestor, ancestors)) {\n ancestorsMissingParents.push(ancestor['Name']);\n }\n })\n return ancestorsMissingParents;\n}", "get ance...
[ "0.6766455", "0.6053956", "0.59423375", "0.5871721", "0.570273", "0.570273", "0.5668735", "0.56320333", "0.5586232", "0.55629563", "0.55629563", "0.55629563", "0.5561374", "0.5528858", "0.5528858", "0.5528858", "0.550406", "0.5474137", "0.5462157", "0.53834397", "0.5318858", ...
0.8112228
0
add this digit to the currentString and display
function storeDigit(e){ currentString = currentString + e.target.value; getDisplay(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function AddDigit(dig) \n\t{\n\t\tif (Current.length > MAXLENGTH)\n\t\t{\n \t\t \tCurrent = \"Aargh! Too long\"; //limit length\n \t} else\n \t{ \n \t\tif ( (eval(Current) == 0) && (Current.indexOf(\".\") == -1) ) \n \t\t{ \n \t\t\tCurrent = dig;\n \t} else\n ...
[ "0.71608275", "0.69668776", "0.6847025", "0.6821637", "0.6727058", "0.65898705", "0.6561114", "0.6471477", "0.64467037", "0.6380672", "0.6372073", "0.63113326", "0.62909216", "0.6275947", "0.6264596", "0.62576765", "0.6254365", "0.6232741", "0.6227521", "0.62091994", "0.61867...
0.7077837
1
Given an optional cursor and a default offset, returns the offset to use; if the cursor contains a valid offset, that will be used, otherwise it will be the default.
function getOffset(cursor, defaultOffset) { if (typeof cursor === 'undefined' || cursor === null) { return defaultOffset; } let offset = cursorToOffset(cursor); if (isNaN(offset)) { return defaultOffset; } return offset; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getCursorPosition (offset = true) {\n return this.api.getCursorPosition(offset)\n }", "prepareOffsetQuery(offset) {\n if (Number.isInteger(offset)) {\n return offset;\n }\n return 0;\n }", "function getAbsoluteOffset(selectionNode, selectionOffset, rootClass) {\n var n...
[ "0.60368544", "0.5794333", "0.54016834", "0.5209625", "0.51974076", "0.51664895", "0.5146687", "0.5142269", "0.512817", "0.510526", "0.49475127", "0.49433938", "0.49384472", "0.49361628", "0.49361628", "0.49361628", "0.49361628", "0.49361628", "0.48868135", "0.48791793", "0.4...
0.857097
0
Prompts user to select one or more mail drivers they are planning to use.
function getMailDrivers(sink) { return sink .getPrompt() .multiple('Select the mail drivers you are planning to use', DRIVER_PROMPTS, { validate(choices) { return choices && choices.length ? true : 'Select atleast one mail driver. You can always ch...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function responseToSelectForm(selected_items)\n{\n var prompt = 'You selected: ' + selected_items.join(', ');\n Browser.msgBox(prompt);\n}", "function dropDownOptions(){\n inquire.prompt([{\n type:'list',\n choices:['View Products','View Low Inventory','Update Inventory','Add Product'],\n ...
[ "0.6178296", "0.5768742", "0.5597837", "0.5589551", "0.5520016", "0.54906726", "0.54719114", "0.54639983", "0.5435832", "0.5415047", "0.5374703", "0.5372484", "0.5355147", "0.5353761", "0.5345957", "0.5325199", "0.5322914", "0.53091633", "0.5286419", "0.52576625", "0.525341",...
0.6714313
0
Returns the environment variables for the select drivers
function getEnvValues(drivers) { return drivers.reduce((values, driver) => { Object.assign(values, DRIVER_ENV_VALUES[driver]); return values; }, {}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getEnvironmentParameterValues(){}", "getENVs() {\n let args = [];\n for (let instruction of this.instructions) {\n if (instruction instanceof env_1.Env) {\n args.push(instruction);\n }\n }\n return args;\n }", "function gatherEnv() {\n addSet...
[ "0.62290794", "0.59507316", "0.58977616", "0.58294505", "0.56474704", "0.5635837", "0.5520025", "0.5516462", "0.5502805", "0.5491395", "0.54864377", "0.54516697", "0.54413337", "0.5415302", "0.53844184", "0.5380464", "0.53706115", "0.53452426", "0.5334815", "0.5315923", "0.52...
0.69886714
0
Returns absolute path to the stub relative from the templates directory
function getStub(...relativePaths) { return path_1.join(__dirname, 'templates', ...relativePaths); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getStub() {\n return path_1.join(__dirname, '..', '..', 'templates', 'provider.txt');\n }", "get templateFullPath() {\n return path.join(this.assembly.directory, this.templateFile);\n }", "function getDocTemplatePath() {\n return _path2.default.resolve(__dirname, '..', '..', 'tpl', 'doc.md...
[ "0.752764", "0.72253203", "0.6384632", "0.60355675", "0.5923981", "0.5818429", "0.5778601", "0.5777305", "0.577085", "0.5687504", "0.565859", "0.56131405", "0.56131405", "0.5556621", "0.5517554", "0.5451792", "0.54432917", "0.54269356", "0.5393257", "0.5358309", "0.5352482", ...
0.7544436
0
handleIssueComment handles an issue_comment event, parsing the comment text. If the comment text is "/brig run", the passed handler is executed
static handleIssueComment(e, p, handle) { console.log("handling issue comment...."); const payload = JSON.parse(e.payload); // Extract the comment body and trim whitespace const comment = payload.body.comment.body.trim(); // Here we determine if a comment should provoke an action...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleIssueComment(e, p) {\n console.log(\"handling issue comment....\")\n payload = JSON.parse(e.payload);\n\n // Extract the comment body and trim whitespace\n comment = payload.body.comment.body.trim();\n\n // Here we determine if a comment should provoke an action\n switch(comment) {\n // Cur...
[ "0.7674282", "0.6566031", "0.60127914", "0.577955", "0.5721528", "0.57003045", "0.5588638", "0.5588638", "0.5544201", "0.5542427", "0.55292225", "0.54732955", "0.54413867", "0.51964617", "0.51887107", "0.513924", "0.5129006", "0.5101129", "0.5097272", "0.5090572", "0.5085011"...
0.76325715
1
play from search list
playFromSearchList ({commit}, payload) { commit('playFromSearchList', payload) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function search(){\n\t$(\".list\").empty();\n\t//console.log(\"Entra en Search\");\n\t//Vamos a capturar el autor.\n\tvar busqueda = $('#campoBusqueda').val();\n\tSC.initialize({\n\t\tclient_id: 'aa06b0630e34d6055f9c6f8beb8e02eb'\n\t\t//Inicializamos el sonundcloud\n\t});\n\t//console.log(busqueda);\n\t\n\tSC.get(...
[ "0.6752779", "0.65052193", "0.6442653", "0.64157164", "0.633792", "0.63187677", "0.63171846", "0.62989753", "0.6218278", "0.62113285", "0.61918175", "0.6186847", "0.6168978", "0.6161733", "0.61539286", "0.61513615", "0.6137704", "0.61363965", "0.6123491", "0.6118946", "0.6098...
0.6549752
1
Hides the flash message
function errorTimer() { flashmessage.hidden = true }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hideMessage() {\r\n \tViewManager.getView(\"#userIdentityMessageContainer\").clearAlert();\r\n }", "function hideMessage()\r\n {\r\n $('.warning-screen-cover').fadeOut(500);\r\n $('.warning-confirm-container').fadeOut(500);\r\n }", "function hideMessage()\r\n {\r\n ...
[ "0.7498079", "0.73958594", "0.73958594", "0.7350811", "0.7319728", "0.7277545", "0.7148822", "0.7059347", "0.70174026", "0.6982966", "0.6969291", "0.6967482", "0.694967", "0.69422656", "0.69173354", "0.6911027", "0.6881496", "0.68639296", "0.6863094", "0.685986", "0.68357575"...
0.76772255
0
Creates a passwordvalidator schema
function PasswordValidator() { // Initialize a schema with no properties defined this.properties = []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function create(password, schema) {\n return new Crypter(password, schema);\n}", "schema() { }", "createSchema() {\n this.schema = this.extensionManager.schema;\n }", "defineSchema() {\n\n }", "_createSchemaValidators(schema) {\n if (typeof schema === 'string') {\n schema = { type: schema...
[ "0.6536183", "0.64227396", "0.61110777", "0.6109322", "0.5988382", "0.58253324", "0.5824944", "0.58139974", "0.58139974", "0.58139974", "0.57767504", "0.5755064", "0.5710452", "0.5674553", "0.5629766", "0.56080985", "0.56080985", "0.56080985", "0.56080985", "0.56080985", "0.5...
0.7424931
0
A plugin for a conditional
function ConditionalPlugin() { const name = 'conditional'; /** * Augment the base schema with the conditional type * @param {*} schema */ const augmentSchema = ((schema) => { const additions = { inlines: { conditional: { nodes: [{ match: { object: 'text' } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function defaultConditional() {\n return true;\n}", "function IF(){}", "function if_function(condition, true_res, false_res) {\n\n\n}", "function $if() { \n var args = $A(arguments)\n var condition = args.shift()\n var fn = args.shift() || Prototype.K\n if (condition) return fn.apply(condition, args) \n...
[ "0.65363264", "0.6187593", "0.594044", "0.58176047", "0.57263196", "0.5698753", "0.5569095", "0.5542887", "0.5542887", "0.5542887", "0.5542887", "0.5542887", "0.5542887", "0.5542887", "0.5542887", "0.5542887", "0.5542887", "0.5542887", "0.5542887", "0.5542887", "0.54841334", ...
0.6411351
1
Opens the table by clicking on the first layer in the legend.
open() { this.legendLayer.click(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tableClick(e) {\n\n\tconsole.log(\"clicked\");\n\tvar dataId = e.rowData.dataId;\n\n\tvar w = Alloy.createController('lecture_detail_teacher', {\n\t\tdataId : dataId\n\t});\n\tw.openWindow();\n\t$.list.close();\n}", "openTable() {\n this._stackItem = new TableStackItem(this._stackItem);\n ...
[ "0.5993993", "0.5963304", "0.5810101", "0.57935035", "0.57636064", "0.57028735", "0.56779426", "0.55594695", "0.55527574", "0.55172044", "0.55075413", "0.5499228", "0.5478139", "0.5471752", "0.54450315", "0.54358387", "0.53981763", "0.5382664", "0.53817123", "0.5381239", "0.5...
0.76084334
0
Returns the panel element the table is in.
get panel() { return browser.element('#enhancedTable'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _findParentDomNode(panel) {\n return panel._panelDomContent.parentElement;\n }", "_getPanelId() {\n return this.panel.id;\n }", "get panel() {\n return this._panel;\n }", "function GetPanel(panel){\n var result;\n //Is necessary to crea...
[ "0.64262044", "0.64094204", "0.63430697", "0.6125306", "0.60998404", "0.59571946", "0.5851349", "0.58105963", "0.57364523", "0.5734634", "0.5657097", "0.56376356", "0.56316954", "0.5631685", "0.5631685", "0.5631685", "0.55699086", "0.5567565", "0.5563893", "0.5555141", "0.554...
0.7466088
0
Request all markerlocations from firebase
function requestMarkerLocations(pointRef) { var fireData; pointRef.on("value", function (snapshot) { //All points from firebase fireData = snapshot.val(); //Delete old markers for (var ii = 0; ii < markers.length; ii++) { markers[ii].setMap(null); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function firebaseToMap(){\n maps.loadMarkers(); //takes in a single location and it's information\n fb.read();\n}", "function retrieveMarkerLocations()\n {\n const latlng = [];\n $(function() {\n $.get(\"/tenants/vacantresidences\", function(data) {\n }).done(function(data) {\n $.ea...
[ "0.7041868", "0.6893018", "0.6746203", "0.671124", "0.66648006", "0.6662162", "0.665428", "0.65049684", "0.648878", "0.64721006", "0.6421783", "0.6337919", "0.6259058", "0.6255267", "0.624671", "0.620415", "0.6171223", "0.6121618", "0.6120233", "0.6097231", "0.6071529", "0....
0.74949044
0
This method should be used after the iid is retrieved by getIidPromise method.
function getIid() { return iid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getIid() {\n return iid;\n}", "function grabEBI(id){ return tf_Id(id); }", "getId() {\n return this._executeAfterInitialWait(() => this.currently.getAttribute('id'));\n }", "getID() {}", "get id() { return this._id; }", "get id() { return this._id; }", "get id() { return this._id;...
[ "0.7101073", "0.56505406", "0.5624825", "0.5603536", "0.5594196", "0.5594196", "0.5594196", "0.5537308", "0.5466431", "0.546587", "0.54583746", "0.5447413", "0.5446416", "0.5408333", "0.5408333", "0.5408333", "0.54070556", "0.5367608", "0.5365787", "0.53508306", "0.5332805", ...
0.71064925
1
Returns a promise which resolves whenever the document readystate is complete or immediately if it is called after page load complete.
function getDocumentReadyComplete() { var document = Api.getInstance().document; return new Promise(function (resolve) { if (document && document.readyState !== 'complete') { var handler_1 = function () { if (document.readyState === 'complete') { doc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDocumentReadyComplete() {\n var document = Api.getInstance().document;\n return new Promise(function (resolve) {\n if (document && document.readyState !== 'complete') {\n var handler_1 = function () {\n if (document.readyState === 'complete') {\n document.removeEventListener('...
[ "0.75553674", "0.7547491", "0.68700826", "0.6774707", "0.6681676", "0.6411012", "0.6344323", "0.6153917", "0.60823524", "0.60808647", "0.6008801", "0.59373283", "0.59157723", "0.5900292", "0.586257", "0.58600974", "0.5846107", "0.5828191", "0.58255714", "0.58243954", "0.57948...
0.7609783
1
Set the focusable element of the browser to one of the editors
function switchFocus() { var focusedEditor = editors.find(function(editor) { return editor.editableElement === editorConfigs.find(function(editorConfig) { return editorConfig.initialFocus; }).element; }); if (focusedEditor) { focusedEditor.setFocus(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function focusEditor(isFocused) {\n isFocused ? editor.focus() : editor.blur();\n}", "function focusEditor() {\n if (_currentEditor) {\n _currentEditor.focus();\n }\n }", "function setFocused(){\n\tif(focused && !focused.parentElement){\n\t\tif(idFocused){\n\t\t\tfocused = X._(idFo...
[ "0.7182898", "0.7072717", "0.6651845", "0.6622554", "0.65911764", "0.6527139", "0.6410954", "0.6391172", "0.63615125", "0.634031", "0.63348335", "0.631026", "0.631026", "0.62729377", "0.6271626", "0.62597376", "0.6246269", "0.62234265", "0.6219917", "0.620574", "0.62003857", ...
0.75938547
0
[END buttoncallback] initApp handles setting up UI event listeners and registering Firebase auth listeners: firebase.auth().onAuthStateChanged: This listener is called when the user is signed in or out, and that is where we update the UI. firebase.auth().getRedirectResult(): This promise completes when the user gets ba...
function initApp() { // Result from Redirect auth flow. // [START getidptoken] firebase.auth().getRedirectResult().then(function(result) { if (result.credential) { // This gives you a GitHub Access Token. You can use it to access the GitHub API. var token = result.credential.accessToken; // [START_EXCLUDE...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initApp() {\n // Result from Redirect auth flow.\n // [START getidptoken]\n firebase.auth().getRedirectResult().then(function(result) {\n if (result.credential) {\n // This gives you a GitHub Access Token. You can use it to access the GitHub API.\n var token = result....
[ "0.81056505", "0.80456865", "0.7680374", "0.754704", "0.7520544", "0.7397903", "0.73887885", "0.72698605", "0.7226817", "0.720553", "0.71533406", "0.71461284", "0.7012276", "0.69114333", "0.69024146", "0.6883601", "0.66864604", "0.6650325", "0.6632521", "0.6611619", "0.648095...
0.82914245
0
Creates a new instance of the Mainboat class
function generateMainBoat() { const mainBoat = new Mainboat({ nbRefugees: 0, gridRow: 12, gridColumn: 20, }); // Creates main boat object const newMainBoat = mainBoat.boatShape(); mutawasea.appendChild(newMainBoat); let isFirstclick = "true"; /** * Detects position o...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static start() {\n this.buttonCreate();\n this.buttonHideModal();\n\n // Animal.createAnimal('Zebras', 36, 'black-white', false);\n // Animal.createAnimal('Zirafa', 30, 'brown-white', true);\n // Animal.createAnimal('Liutas', 35, 'brown', false);\n // Animal.createAnimal('...
[ "0.5976062", "0.59695596", "0.59686863", "0.5947942", "0.5879219", "0.5874421", "0.58262515", "0.5812581", "0.57972544", "0.5781625", "0.5780804", "0.57779425", "0.57401866", "0.5687984", "0.56847405", "0.56847405", "0.56847405", "0.56847405", "0.56847405", "0.56847405", "0.5...
0.7041954
0
Generates instances of Refugees class, with a random number of refugees and random positions
function generateRefugees() { let randomRefugeesNb = getRndInteger(10, 100); let randomColumn = getRndInteger(7, 33); const refugee = new Refugees({ nbRefugees: randomRefugeesNb, gridRow: 30, gridColumn: randomColumn, }); displayRefugees(refugee); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "generate() {\n for (let i = 0; i < this.population.length; i++) {\n let pa = random(this.matingPool);\n let pb = random(this.matingPool);\n let child = pa.crossover(pb);\n child.mutate(this.mutationRate);\n this.population[i] = child;\n }\n this.generations++;\n }", "generate()...
[ "0.6178375", "0.6176768", "0.61452967", "0.6111657", "0.609201", "0.6048914", "0.6032587", "0.6022475", "0.60022694", "0.6000103", "0.5990446", "0.5983976", "0.59306985", "0.5921285", "0.5891499", "0.5872685", "0.5833008", "0.57583255", "0.5731605", "0.5725424", "0.57195216",...
0.82740635
0
Invokes function that generates main boat, generates boats of refugees every three seconds, up to 750 deaths
function startsGame() { generateMainBoat(); const intervalRefugees = setInterval(() => { if (deathAll >= 750) { clearInterval(intervalRefugees); endSimulation(); } else { generateRefugees(); } }, 3000); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function randomPeril(boat) {\n let randomNb = Math.random();\n\n if (randomNb < 0.02) {\n // if (randomNb < 0.6) {\n boat.newBoat.style.transition = \"all 50s\";\n boat.newBoat.style.transform = `translate(${0}px, ${0}px)`;\n boat.newBoat.classList.add(\"flicker-1\");\n\n // Invokes ...
[ "0.6985876", "0.65211403", "0.64606994", "0.63813055", "0.63372207", "0.63158476", "0.63018596", "0.62808514", "0.6276329", "0.62625724", "0.62622535", "0.62602127", "0.6252201", "0.62363183", "0.6231186", "0.62242514", "0.6220876", "0.6209774", "0.6166707", "0.6157727", "0.6...
0.7390979
0
Function to detect collisions between main boat and one of the ports. Invokes disembarkRefugees function in case of collision, if port is open
function detectBoatToPort() { let getBoat = document.querySelector(".main-boat"); for (let i = 0; i < ports.length; i++) { getBoatW = getBoat.getBoundingClientRect().width; getBoatH = getBoat.getBoundingClientRect().height; getBoatX = getBoat.getBoundingClientRect().left; getBoatY = get...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function detectRefugeesToPort() {\n for (let i = 0; i < refugeesArray.length; i++) {\n for (let j = 0; j < ports.length; j++) {\n refugeesBoatsW = refugeesArray[i].newBoat.getBoundingClientRect().width;\n refugeesBoatsH = refugeesArray[i].newBoat.getBoundingClientRect()\n .height;\n ...
[ "0.69783485", "0.6207871", "0.6188791", "0.6144159", "0.6128163", "0.61137176", "0.61113435", "0.60748756", "0.60174936", "0.5904507", "0.5902705", "0.5896094", "0.58874196", "0.58773434", "0.5864007", "0.58604705", "0.5857667", "0.58335674", "0.5827185", "0.5821349", "0.5811...
0.71667796
0
Function to detect collisions between main boat and a refugee boat. Invokes the boat capaciy function in case of collision
function detectBoatToRefugees() { let getBoat = document.querySelector(".main-boat"); for (let i = 0; i < refugeesArray.length; i++) { getBoatW = getBoat.getBoundingClientRect().width; getBoatH = getBoat.getBoundingClientRect().height; getBoatX = getBoat.getBoundingClientRect().left; ge...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function collision(top_x, bottom_x, top_y, bottom_y) {\n\t\tfor (var i = 0; i < rows; i++) {\n\t\t\tfor (var j = 0; j < cols; j++) {\n\t\t\t\tvar b = bricks[j][i];\n\t\t\t\tif (b.exists == 1) {\n\t\t\t\t\tif (top_y < (b.y + block_height) && bottom_y > b.y && top_x < (b.x + block_width) && bottom_x > b.x) {\n\t\t\t...
[ "0.6715292", "0.66063267", "0.66036797", "0.6438875", "0.64184195", "0.6382179", "0.6371159", "0.6342916", "0.631455", "0.6310832", "0.6310783", "0.62859184", "0.6280469", "0.62757075", "0.62472576", "0.6234698", "0.62339437", "0.6216453", "0.621223", "0.6210524", "0.6201366"...
0.71451145
0
Invokes saveRefugees function if number of refugees on board in main boat is less than 350. Displays alert messages to warn user when boat exceeds its initial capacity and when it can no longer take new people
function boatCapacity(getBoat, refugeesBoat) { //console.log(refugeesBoat.refugee.nbRefugees); // console.log(refugeesBoat); //let boatArr = [...refugeesBoat.refugee.nbRefugees]; //console.log(boatArr); // Creates a div that contains alert messages about capacity of main boat const alertCapacit...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function disembarkRefugees(mainBoat, port) {\n \n\n validateSave();\n saveAll = 0;\n let savingNumber = document.getElementById(\"saving-number\");\n savingNumber.innerHTML = `${saveAll} on board`;\n }", "function saveRefugees(mainBoat, boat) {\n countSave(boat.refugee.nbRefugees);\n\n mainB...
[ "0.60949403", "0.60394484", "0.6039433", "0.5765864", "0.5606187", "0.5526157", "0.5503329", "0.5352112", "0.5344568", "0.53441656", "0.5308573", "0.52852017", "0.5275971", "0.52629155", "0.522546", "0.52132237", "0.51996446", "0.5184527", "0.51790833", "0.51708025", "0.51612...
0.71415144
0
Invokes countSave function and delete refugee boat that has come into contact with main boat
function saveRefugees(mainBoat, boat) { countSave(boat.refugee.nbRefugees); mainBoat.style.transition = "all 100s"; mainBoat.style.transform = `translate(${0}px, ${0}px)`; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function countSave(count) {\n saveAll += count;\n countAllSavings();\n }", "function commit_battle_count(){\n\tbattle_count=battle_count+1;\n\tvar battle_count_log=database.ref(\"global-variables/\");\n\tbattle_count_log.update({\n\t\t\"battle_count\" : battle_count\n\t});\n}", "function save () {\n\n\t...
[ "0.68519294", "0.61187774", "0.5838705", "0.58098614", "0.5768902", "0.57582724", "0.57381207", "0.5610272", "0.55607164", "0.5551465", "0.552303", "0.55011904", "0.5485052", "0.5472764", "0.54151505", "0.5391099", "0.5380425", "0.5367071", "0.5336146", "0.53224105", "0.52958...
0.6345444
1
Function to detect collisions between between refugee boats and ports. Invokes landRefugees function in case of collision
function detectRefugeesToPort() { for (let i = 0; i < refugeesArray.length; i++) { for (let j = 0; j < ports.length; j++) { refugeesBoatsW = refugeesArray[i].newBoat.getBoundingClientRect().width; refugeesBoatsH = refugeesArray[i].newBoat.getBoundingClientRect() .height; refu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleCollisions(){\n\t const newX = this.head.x + (this.direction.x * this.speed);\n\t const xExplorer = new Coord(newX, this.head.y);\n\t const xCollision = this.map.collidingWithWall(xExplorer);\n\t\n\t const newY = this.head.y + (this.direction.y * this.speed);\n\t const yExplorer = new Coord(th...
[ "0.6597025", "0.64799625", "0.6330995", "0.62979543", "0.62848395", "0.62646186", "0.6225087", "0.6221022", "0.61827075", "0.6181605", "0.6166308", "0.61026716", "0.6079498", "0.6077928", "0.60411614", "0.60172236", "0.5999994", "0.5997256", "0.5996223", "0.59956974", "0.5993...
0.77529734
0
Generates random perils for refugee boats
function randomPeril(boat) { let randomNb = Math.random(); if (randomNb < 0.02) { // if (randomNb < 0.6) { boat.newBoat.style.transition = "all 50s"; boat.newBoat.style.transform = `translate(${0}px, ${0}px)`; boat.newBoat.classList.add("flicker-1"); // Invokes function that will...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function crystall() {\n return Math.floor(Math.random() * 20 + 5)\n }", "function rando(limitation) {\n return Math.floor((Math.random() * limitation));\n}", "function gerarProbabilidade() {\r\n return Math.random();\r\n}", "function prob() {\n\t\treturn Math.ceil(Math.random()*100)\n\t}"...
[ "0.7157617", "0.70514435", "0.7014819", "0.67243487", "0.67137575", "0.6650101", "0.66171944", "0.6581723", "0.6580582", "0.6567537", "0.65422785", "0.65422785", "0.6532999", "0.6481023", "0.64741284", "0.6473", "0.6457539", "0.6452072", "0.6448853", "0.64293444", "0.64200985...
0.73013395
0
Increments total number of deaths with number of deaths just recorded
function countDeath(count) { deathAll += count; countAllDeath(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "incrementDead(num){\n this.dead += num;\n this.infected -= num;\n this.population -= num;\n }", "function countAllDeath() {\n let deathNumber = document.getElementById(\"death-number\");\n deathNumber.innerHTML = `${deathAll} drowned`;\n }", "function Aging() {\n for (let i = al...
[ "0.65542597", "0.6358565", "0.6346759", "0.6093876", "0.60496736", "0.6027047", "0.602357", "0.5981283", "0.59631056", "0.59019715", "0.5882088", "0.5835318", "0.5822241", "0.5797971", "0.5782429", "0.5773764", "0.5736538", "0.5734874", "0.570344", "0.5691855", "0.5680081", ...
0.7293256
0
Display the total number of deaths in HTML
function countAllDeath() { let deathNumber = document.getElementById("death-number"); deathNumber.innerHTML = `${deathAll} drowned`; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "stats() {\n let timeLeft = parseInt(document.getElementById(\"time-remaining\").innerHTML);\n let totalTime = 100 - timeLeft;\n let flipCount = parseInt(document.getElementById(\"flips\").innerHTML);\n document.getElementById(\"victory-p\").innerHTML = `You took ${totalTime} seconds and ${flipCount} fl...
[ "0.64576995", "0.6379004", "0.61404604", "0.6080143", "0.60550636", "0.6035224", "0.5989215", "0.5967081", "0.5956208", "0.59407973", "0.59265816", "0.59134847", "0.59035575", "0.5886699", "0.5884032", "0.58641416", "0.5849786", "0.58386815", "0.583725", "0.5832771", "0.58203...
0.77542746
0
Embeds a Google Calendar at the either the current month, or the month and year of the date given. Expects a string with format "yyyyMM....."
function showCalendar(date) { var calendar = document.createElement('IFRAME'); var src = cal.src + cal.id + '&ctz=' + cal.timeZone; if (date != null) { // create a month long range for calendar view based off event date date = date.split('-'); var dateRange = '' + date[0] + date[1];...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderCalendar(currentDate, currentMonth, currentYear) {\n let finishedHTML = getNavigation(currentMonth, currentYear);\n $('#pc-head').html(finishedHTML);\n markEventDates(currentDate);\n renderDateContent();\n}", "function setDate(date) {\n \n var monthNames = [\n \"January\",...
[ "0.6104841", "0.59824455", "0.5911937", "0.5906916", "0.5880761", "0.58756495", "0.586449", "0.5844092", "0.58063895", "0.5805919", "0.578609", "0.57468307", "0.57345", "0.57244015", "0.57194054", "0.56863075", "0.5650377", "0.56489086", "0.5640019", "0.5635719", "0.56203085"...
0.6157183
0
Check if calendar event exists for morgue entry
function checkEventExists() { gapi.client.load('calendar', 'v3', function() { var request = gapi.client.calendar.events.get({ 'calendarId': cal.id, 'eventId': cal.eventId }); request.execute(function(event) { if (event.hasOwnProper...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkExists(){\n var query = $( \"#query\" ).val();\n console.log(query);\n $('#content').empty();\n\tgapi.client.load('calendar', 'v3', function() { \n var request = gapi.client.calendar.events.list({\n\t \t 'calendarId': 'primary',\n 'q': query //set the query string variab...
[ "0.67905635", "0.67839944", "0.6707737", "0.63508755", "0.63106203", "0.60700876", "0.5914889", "0.5907584", "0.57836926", "0.57323563", "0.57315296", "0.56594735", "0.56433576", "0.56073874", "0.55569714", "0.554729", "0.55422205", "0.54789895", "0.54710925", "0.546286", "0....
0.77487606
0
sumNums adds two numbers (x, y) and passes the result to the callback.
function sumNums(x, y, cb) { return cb(x, y); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sumNumbers(x, y) {\n return x + y;\n}", "function sumNums(x,y,cb = '') {\n\treturn cb === '' ? x+y : cb(x+y);\n}", "function sumNums(a, b, c) {\n return c(a, b)\n }", "function multiplyNums(x, y, cb) {\n return cb(x, y);\n}", "function addAndCallback(num1, num2, cb){\n var sum = num1 + nu...
[ "0.7107484", "0.6930916", "0.6738162", "0.67203057", "0.6689652", "0.667478", "0.66706043", "0.66396093", "0.6561358", "0.64359576", "0.63607424", "0.62676394", "0.62439156", "0.623506", "0.62126815", "0.6193547", "0.6174129", "0.6169589", "0.6155822", "0.61432254", "0.613631...
0.8551603
0
multiplyNums multiplies two numbers and passes the result to the callback.
function multiplyNums(x, y, cb) { return cb(x, y); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function multiplyNums(x, y, cb) { // new function with array of x, y, and callback/cb\n // multiplyNums multiplies two numbers and passes the result to the callback.\n return cb(x, y); \n}", "function multiplyNums(a, b, c) {\n return c(a, b)\n }", "function multiply(nums1, nums2, cb){\n return cb(nums1...
[ "0.77204216", "0.7577429", "0.75571287", "0.7309872", "0.72533596", "0.7124699", "0.71118104", "0.68824065", "0.68817365", "0.6544661", "0.6485976", "0.6449053", "0.6436143", "0.6345489", "0.6311052", "0.6269517", "0.6247276", "0.6199787", "0.61914074", "0.615602", "0.6130698...
0.7797904
0
contains checks if an item is present inside of the given array/list. Pass true to the callback if it is, otherwise pass false.
function contains(item, list, cb) { return cb(item, list); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function contains(arr, item){\r\n\tfor(var i = 0; i < arr.length; i++){\r\n\t\tif(arr[i] == item)\r\n\t\t\treturn true;\r\n\t}\r\n\r\n\treturn false;\r\n}", "function contains(array, item) {\n if (array && array.length && item) {\n return array.indexOf(item) !== -1;\n }\n return false;\n ...
[ "0.752935", "0.74826837", "0.7469486", "0.72762376", "0.72762376", "0.7246426", "0.72303694", "0.71692485", "0.70927685", "0.7092747", "0.7079498", "0.70392644", "0.70368356", "0.69984883", "0.6985446", "0.6936194", "0.69278413", "0.69221497", "0.6918738", "0.6916388", "0.690...
0.7865017
0
write a function to calculate the percentage of the sentiments use parameter dValue and later return this value as .map to construct a new map first, return the format % for the sentiments devided by d3.sum this specifies that you want the value (0 to 20 or something) make a new map (array) with .map and return use par...
function getLegend(d,dValue){ return d3.format(".0%")(d.sentiment/d3.sum(dValue.map(function(v) { return v.sentiment; }))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeCharts(id, myData){\n function sentimentColor(c){ \n return {negative:\"#F97C7C\",\n neutral:\"#CCCCCC\",\n positive:\"#58E8A9\"}[c];\n }\n \n// use a forEach loop on myData to add the index of the sentiments\n// use d.total to add these numbers\n/...
[ "0.6756578", "0.6474518", "0.6213984", "0.5963466", "0.59335816", "0.57591313", "0.57405317", "0.5614593", "0.557028", "0.5561174", "0.55479634", "0.5541375", "0.5506778", "0.5394208", "0.53880215", "0.5383551", "0.53790927", "0.53751427", "0.53558356", "0.5346421", "0.534002...
0.80098283
0
function to make bar chart use parameter bcData to refer later to bar chart data start with an empty array called bC in variable bcSizes, store the measurements in bcSizes width and height, put their height and width (length radius)
function barChart(bcData){ var bC={}, bcSizes = {t: 60, r: 0, b: 30, l: 0}; bcSizes.w = 500 - bcSizes.l - bcSizes.r, bcSizes.h = 300 - bcSizes.t - bcSizes.b; // create the svg for barChart inside the div // for the width, put .width + length + radius // for height. put ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function barChartSettings(skillArr) {\n\t\t//console.log(\"setting the barchart....\");\n\t\t//svgcMargin = 40;\n\t\t//svgcSpace = 100;\n\t\tsvgcMargin = 60;\n\t\tsvgcSpace = 40;\t\t\n\t\t//svgcHeight = svg.height.baseVal.value - 2 * svgcMargin - svgcSpace;\n\t\tsvgcHeight = svg.height.baseVal.value - 2 * svgcMarg...
[ "0.68673134", "0.683269", "0.67625767", "0.676154", "0.67342645", "0.66622484", "0.66511065", "0.66357064", "0.6590788", "0.65844005", "0.65572184", "0.6507001", "0.65057296", "0.64733833", "0.64726657", "0.6454856", "0.64504373", "0.64481443", "0.6447353", "0.6435573", "0.64...
0.7381542
0
another mouseover function, this time on the bar chart store the selected year in a variable with a function first, filter the year out of the data with a comparison the mouseover year has to be true, all the others are false return the comparison between s.year (selected year) and d[0] (the years) after this function,...
function mouseover(d){ var selectedYear = myData.filter(function(s){ return s.year == d[0] ;})[0]; var yearSentiment = d3 .keys(selectedYear.sentiment) .map(function(s){ return {type:s, sentiment:selectedYear....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mouseover(d){\n// call another function to update the bar chart with new data, selected by the bar chart slice\n// use a variable and return to give back the right color of the selected bar chart slice to the bar chart rects\n bC.update(myData.map(function(v){ \n return [v.year,v...
[ "0.7854226", "0.7579281", "0.693015", "0.6769674", "0.6762987", "0.6744174", "0.67203885", "0.6566715", "0.6388663", "0.6369069", "0.635154", "0.63301647", "0.62989426", "0.62585485", "0.6250386", "0.62500685", "0.6243454", "0.62389845", "0.6236968", "0.6227119", "0.61749446"...
0.83304936
0
Use Kmeans++ to choose the initial centers.
function chooseInitialCenters(points) { // Convert to list for indexed access. Make it unmodifiable, since removal of items // would screw up the logic of this method. var pointList = points; // The number of points in the list. var numPoints = pointList.length; // Set the corresponding elemen...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function KMeans() {\n\t\tthis.points = [];\n\t\tthis.clusters = [];\n\t}", "async function kMeans(){\r\n let centroids = [];\r\n let indexes_togo = [];\r\n for(var i=0;i<num_points;i++){\r\n indexes_togo[i] = 1;\r\n }\r\n for(var i=0;i<num_clusters;i++){\r\n let index;\r\n do{...
[ "0.68373847", "0.6793173", "0.67266136", "0.6478944", "0.64285845", "0.6297661", "0.6280706", "0.6260732", "0.6234055", "0.62231517", "0.6169154", "0.61526245", "0.610733", "0.5989874", "0.59303796", "0.5900348", "0.58470434", "0.5786812", "0.5739779", "0.5692903", "0.5685599...
0.737228
0
Computes the centroid for a set of points.
function centroidOf(points, dimension) { var centroid = new Float32Array(dimension); for (var i = 0; i < centroid.length; i++) { var sum = 0; var count = 0; for (var pointIndex = 0; pointIndex < points.length; pointIndex++) { var p = points[pointIndex]; var point = p.getPoint()...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function centroid(points){\n\tvar center = new Point(0,0);\n\tfor(var i = 0; i < points.length; i++){\n\t\tcenter.x += points[i].x;\n\t\tcenter.y += points[i].y;\n\t}\n\tcenter.x /= points.length;\n\tcenter.y /= points.length;\n\treturn center;\n}", "function get_centroid(points){\n var cx = 0 ;\n var cy = 0 ;...
[ "0.85095066", "0.75729084", "0.7385692", "0.7385327", "0.6919966", "0.6914944", "0.688189", "0.68572795", "0.68341374", "0.67959136", "0.6792716", "0.6792716", "0.67688113", "0.6702305", "0.6611331", "0.65061885", "0.6503395", "0.64505273", "0.643872", "0.6435488", "0.6396751...
0.7799674
1
Creates a new Place
function newPlace(req, res) { process.nextTick(() => { let newPlace = new Place(req.body); newPlace.save((err,place) => { if(err) return res.status(400).json({ status: 400, message: "Missing some required fields.", error: err}); res.json({ status: 200, message: 'Place successfully created!', place...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function create(req, res) {\n\tvar newPlace = new db.Place({\n\t\tuserIMG: req.body.userIMG,\n\t\tuser: req.body.user,\n\t\tplaceName: req.body.placeName,\n\t\ttype: req.body.type,\n\t\tneighborhood: req.body.neighborhood,\n\t\tdescription: req.body.description,\n\t\tpriority: req.body.priority,\n\t\trating: req.b...
[ "0.6806542", "0.68005586", "0.641196", "0.63787425", "0.63787097", "0.6339978", "0.62657344", "0.61744225", "0.615466", "0.6138665", "0.6105079", "0.6101282", "0.6031294", "0.6009893", "0.5949342", "0.59491384", "0.5943268", "0.59402025", "0.5907182", "0.5892613", "0.58893466...
0.7298582
0
Create options for construction of the table... The only variable at this point is the column definitions
function getTableCreateOptions(columns) { return { jQueryUI: true, dom: "<'row'>t<'row'>", language: { "emptyTable": 'No records available' }, columnDefs: columns, retrieve: true, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeCreateTable() {\n\n var keyStr = '';\n var keyCol = '';\n\n var ddl = 'DROP TABLE IF EXISTS ' + gTblName + ';'\n\n ddl += newLine;\n\n // var ddl = 'CREATE TABLE ' + gTblNameUpper + ' (' + newLine;\n ddl += 'CREATE TABLE ' + gTblName + ' (' + newLine;\n\n for (var i = 1; i < gV...
[ "0.6392848", "0.6377155", "0.6308116", "0.6297167", "0.6245342", "0.61613476", "0.60800624", "0.6056079", "0.6025645", "0.5996121", "0.5973764", "0.5961301", "0.59056133", "0.58874846", "0.5868715", "0.586851", "0.58417475", "0.5814585", "0.58103544", "0.58096975", "0.5808635...
0.72012746
0
Take an object whose properties are meant to match properties in our rows and convert that to a representation of an array of indexes.
function convertSelectorToIndexArray(selector) { if ( typeof selector === "object" ) { //Make it an array of indexes that match the object return element.DataTable().rows().flatten().filter( function (rowIdx) { var match = selector || {}; var rowObject = element.DataTable().row(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getRow(obj, index) {\n const res = [];\n Object.keys(obj).forEach((k) => {\n res.push(obj[k][index]);\n });\n return res;\n}", "function toItemIndexes(a) {\n return a.map(function (item, index) { return ({ item: item, index: index }); });\n}", "function toItemIndexes(a) {\n return a.map(f...
[ "0.6194349", "0.6008894", "0.6008894", "0.6008894", "0.5970638", "0.5899272", "0.5882764", "0.578443", "0.5717666", "0.5715737", "0.56464565", "0.5632961", "0.5588637", "0.55291355", "0.5489621", "0.5480971", "0.5475717", "0.5461113", "0.5433518", "0.53793544", "0.53773504", ...
0.65197
0
Function makeDNODE t url string rowcount row number to callback div reference to div node return false when done;
function makeDNODE(t, rowcount, div, shoutid ) { var ret = true; GM_xmlhttpRequest({ method:"GET", url:t, headers:{ "User-Agent":navigator.userAgent }, onload:f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function openNode(wt, nodeid)\n {\n var childrenConId = nodeid + \"Children\";\n var imgId = nodeid + \"Img\";\n var n = document.getElementById(childrenConId);\n var imgNode = document.getElementById(imgId);\n\n if (!imgNode) //its ok for n to be null, but not imgNode\n ...
[ "0.5598642", "0.549243", "0.53393036", "0.5336619", "0.5296632", "0.525622", "0.5220369", "0.5219482", "0.51466626", "0.51207787", "0.51191425", "0.50946856", "0.5065468", "0.50626975", "0.5051438", "0.5039411", "0.5020926", "0.4993294", "0.49829754", "0.49817076", "0.4976878...
0.6158669
0
Add and find video lecture item into List of All lectures
function addLectureToList(id, { name, url, link }) { let item = courseLinks.find((item) => item.id === id); item.url = url; item.link = link; item.name = name; countVideoParsed++; //console.log(countVideoParsed, item); if (countVideoParsed === countVideos) { console.log("Parsing completed. Total vide...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addMovieToProgram() {\n var valueOfSelectedMovie = document.querySelector('#select-movie').value;\n var selectedMovie = listOfMovies[valueOfSelectedMovie];\n var valueOfSelectedProgram = document.querySelector('#select-program').value;\n var selectedProgram = listOfPrograms[valueOfSelectedProg...
[ "0.6078065", "0.5890589", "0.55687135", "0.5560586", "0.5431177", "0.5427751", "0.53630984", "0.53513086", "0.53080434", "0.530708", "0.529428", "0.5251911", "0.5206577", "0.5193695", "0.5183956", "0.51748186", "0.51734096", "0.51697415", "0.51598656", "0.5154361", "0.5126334...
0.6777476
0
Getting the estimated price of an uber request / Parameters: start_lat: The starting latitude of a request. start_lon: The Starting Longitude of a request. end_lat: The ending latitude of a request. end_lon: The ending Longitude of a request. Returns: Hopefully a large body of text with each request type maybe json
function getUberEstimatesPrice(start_lat, start_lon, end_lat, end_lon){ var request = require("request"); var options = { method: 'GET', url: 'http://%27https:/api.uber.com/v1.2/estimates/price', qs: { start_latitude: start_lat, start_longitude: start_lon, end_latitude: end_lat, end_l...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getUberEstimatesTime(start_lat, start_lon){\n var request = require(\"request\");\n\n var options = { method: 'GET',\n url: 'http://%27https:/api.uber.com/v1.2/estimates/time',\n qs:\n { start_latitude: '37.7752315',\n start_longitude: '-122.418075%27' },\n headers:\n { 'Postman-...
[ "0.7311239", "0.61198515", "0.565", "0.5579854", "0.5479795", "0.5401255", "0.5399847", "0.5369077", "0.5367576", "0.53653336", "0.53566426", "0.5300623", "0.5219641", "0.51993215", "0.5191049", "0.51759803", "0.5165537", "0.51231104", "0.5117041", "0.50885874", "0.5088233", ...
0.8516866
0
Getting the estimate time of an uber requests / Parameters: start_lat: The starting latitude of a request. start_lon: The Starting Longitude of a request. Returns: Hopefully a large body of text with each request type maybe json
function getUberEstimatesTime(start_lat, start_lon){ var request = require("request"); var options = { method: 'GET', url: 'http://%27https:/api.uber.com/v1.2/estimates/time', qs: { start_latitude: '37.7752315', start_longitude: '-122.418075%27' }, headers: { 'Postman-Token': 'ebae44c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getUberEstimatesPrice(start_lat, start_lon, end_lat, end_lon){\n var request = require(\"request\");\n\n var options = { method: 'GET',\n url: 'http://%27https:/api.uber.com/v1.2/estimates/price',\n qs:\n { start_latitude: start_lat,\n start_longitude: start_lon,\n end_latitude: end_l...
[ "0.6360334", "0.5693901", "0.5576725", "0.545558", "0.53817827", "0.5360702", "0.53519315", "0.5345782", "0.5304899", "0.5275644", "0.52551454", "0.5234422", "0.5211728", "0.5175466", "0.517457", "0.51727104", "0.5166238", "0.5136209", "0.51349455", "0.51047635", "0.508924", ...
0.8169236
0
(r massB(velB velA + velB) + massAvelA) (r massB velB r massB velA + massAvelA + massB velB)/(massA + massB), (r massB velB r massB velA + massAvelA + massB velB)/(massA + massB), (r massB velB + velA ( r massB + massA) + massB velB)/(massA + massB), (massB velB (r + 1) + velA ( r massB + massA))/(massA + massB),
function resolveVelocities(r, velA, massA, velB, massB){ return [ (r * massB(velB - velA) + massA*velA + massB * velB)/(massA + massB), (r * massA(velA - velB) + massA*velA + massB * velB)/(massA + massB), ] }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function M(t,n,r){return c$7(O,n,t),c$7(V,r,t),s$5(_$1(O,O,V))/2}", "function calculateM() {\n return d['T'] * (d['L'] / d['v'] + d['B']) / d['H']\n}", "r(u, v) { return (u[0] * v[0] + u[1] * v[1]) / (this.m(u) * this.m(v)); }", "static gravityFormula(circle1,circle2){\n let m1 = circle1.physics.mass\n...
[ "0.6110236", "0.57043004", "0.56747925", "0.55106324", "0.54984665", "0.54920226", "0.5486114", "0.5481971", "0.5476249", "0.5419792", "0.5379749", "0.5376333", "0.53611785", "0.5313552", "0.5301447", "0.52859914", "0.52817935", "0.5244691", "0.5221983", "0.52213293", "0.5217...
0.70240414
0
lists all Klassen in dropdown
function showKlassen(klassen) { $.each(klassen, function (classID, klasse) { $('#klasseSelect').append($('<option>', { value: klasse.classID, text: klasse.name })); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setClassList(){\n\t\tlet cldd=$(\"<select />\").attr('id','cl-hdr').append($(\"<option />\").text('Class List').val('null'))\n\t\tlet classInfo=JSON.parse(localStorage.getItem('__Class-Info'))||{}\n\t\t\n\t\tfor (let [code, name] of Object.entries(classInfo)) {\n\t\t\tcldd.append($(\"<option />\").text(na...
[ "0.6500123", "0.63967896", "0.6383867", "0.6304956", "0.62889546", "0.60555035", "0.60555035", "0.60451734", "0.60451734", "0.6042309", "0.6037977", "0.60188985", "0.5953307", "0.5939728", "0.5939728", "0.5939728", "0.5939728", "0.5939728", "0.5939728", "0.5939728", "0.593972...
0.71170664
0
FUNCTIONS make a list of indices for a matrix
function matrix_indices (msize){ var inds=[]; for (i=1; i<= msize; i++){ for (j=1; j<= msize; j++){ inds.push(i+","+j); } } return inds; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "calAllIndex() {\n for (let i = 0; i < this.length; i++) {\n for (let j = 0; j < this.breath; j++) {\n let index = i + \"-\" + j;\n this.indexes.push(index);\n }\n }\n return this.indexes;\n }", "function getStarIndexList() {\n var indic...
[ "0.6443753", "0.6388602", "0.629001", "0.6186579", "0.59353316", "0.5863578", "0.5834867", "0.5819506", "0.58079135", "0.5792353", "0.576398", "0.57392585", "0.573175", "0.57250714", "0.5722946", "0.57184637", "0.57140434", "0.56936723", "0.56936723", "0.56936723", "0.5679521...
0.79418176
0
reside land squares to match width of the land
function land_squares(){ var land_width = $('#land_wrapper').width(); var box_width = Math.floor((land_width - 4*gridN)/gridN); var plant_width = box_width; $('.land-box').height(box_width); $('.land-box').width(box_width); $('.plant-img').height(plant_width); $('.plant-img').width(plant_width)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAreas() {\n\tlet scalingFactor = Math.min(clientWidth / 1200, clientHeight / 1000);\n\t// Change the blocks' size according to the input surface area\n\tlet size1 = Math.min(48, 5 + Math.sqrt(area1) * scalingFactor * 8) + \"px\";\n\tlet size2 = Math.min(48, 5 + Math.sqrt(area2) * scalingFactor * 8) + \...
[ "0.6094898", "0.6017394", "0.6007686", "0.59838617", "0.59085476", "0.5877813", "0.58681136", "0.5864819", "0.5859045", "0.5854368", "0.5822197", "0.57911074", "0.57763463", "0.57507175", "0.57382023", "0.57319355", "0.5729374", "0.5727248", "0.5725963", "0.5711973", "0.57114...
0.8399599
0
create an m x n matrix filled with default value d
function Matrix(m, n, d){ var matrix = []; for(var i=0; i<m; i++) { matrix[i] = []; for(var j=0; j<n; j++) { matrix[i][j] = d; } } return matrix; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_createDefaultTable(r, c, d) {\n let res_table = [];\n for (let i = 0; i < r; i++) {\n let tmp = [];\n for (let j = 0; j < c; j++) {\n tmp.push(d);\n }\n res_table.push(tmp);\n }\n return res_table;\n }", "function RandMatr...
[ "0.6808377", "0.65685225", "0.6518778", "0.63300157", "0.62154764", "0.60946333", "0.6055009", "0.59896785", "0.59716916", "0.59681654", "0.595401", "0.5951626", "0.5946225", "0.59226555", "0.59207267", "0.5914693", "0.59117734", "0.59002495", "0.58936846", "0.5892032", "0.58...
0.7345218
0
"starts" the phase. Emits a signal to the engine and loops through arrangements that need to be executed.
begin() { //for (let [, arr] of this.arrangements.filter(a => a.at === this.iterations && a.when === "start")) arr.exe(); this.engine.phases.current = this; this.engine.events.emit(this.name, this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function step() {\n paused = true;\n executeNext(true);\n }", "function start() {\n // Tell the main thread that we are ready to start stepping.\n postMessage({ type: \"ready\", value: null });\n\n // Redefine onmessage to wait for the main thread to give us the start signal.\n onmessage = funct...
[ "0.64743924", "0.6079651", "0.5941861", "0.59178364", "0.59061366", "0.58718354", "0.58669496", "0.58399343", "0.5833215", "0.582857", "0.5820104", "0.57701224", "0.57606125", "0.5745071", "0.5727127", "0.57249016", "0.5713198", "0.5699166", "0.5689547", "0.5663695", "0.56636...
0.81380475
0
"ends" the phase. Emits a signal to the engine, loops through all the arrangments, switches to the next phase and resets the timer.
end() { //for (let [, arr] of this.arrangements.filter(a => a.at === this.iterations && a.when === "end")) arr.exe(); this.iterations++; this.engine.events.emit(`${this.name}-End`, this); if (this.engine.jumpingTo) return; this.engine.phases.current = this.engine.phases.get(this....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function EndBuffer (duration : int, timerDuration : int) {\n\tfor(var i : int = 0; i < duration+1; i++) {\n\t\tif(i == duration) {\t\t\t\n\t\t\tStartCoroutine(\"EndTimer\", timerDuration);\n\t\t\tStartCoroutine(\"EndEarly\");\t\n\t\t}\n\t\telse {\n\t\t\tyield WaitForSeconds(1);\n\t\t}\n\t}\n}", "function end() {...
[ "0.59555024", "0.59252536", "0.58860683", "0.5882407", "0.58319604", "0.5758984", "0.57261425", "0.56105506", "0.5596328", "0.55873895", "0.5576537", "0.5554628", "0.5552871", "0.55199337", "0.55184984", "0.5495516", "0.5489329", "0.542318", "0.5417204", "0.5415313", "0.53921...
0.7269771
0
Constructs a new TrendedDataReport.
constructor() { TrendedDataReport.initialize(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ReportsData(data) {\n this.id = data.id;\n this.candidateId = data.candidateId;\n this.candidateName = data.candidateName;\n this.companyId = data.companyId;\n this.companyName = data.companyName;\n this.interviewDate = convertDate(data.interviewDate);\n th...
[ "0.59539974", "0.5803722", "0.5644454", "0.54169613", "0.5410829", "0.5398544", "0.5376388", "0.5290942", "0.52510434", "0.5215563", "0.51817864", "0.51744145", "0.51546943", "0.51288694", "0.5070679", "0.5042065", "0.4961699", "0.49592745", "0.49396056", "0.49272746", "0.488...
0.72203445
0
SyncedCollectionMTime is the time of the last successful sync run. Subsequent sync runs will not check any records from the Kinto collection that have not been modified since then. This value is stored separately for each user (userid uniquely defines the FxSync account we're syncing with).
function setSyncedCollectionMtime(mtime, userid) { return new Promise(resolve => { asyncStorage.setItem(userid + TABS_COLLECTION_MTIME, mtime, resolve); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onTimeSyncComplete(e) {\n\n if (isClientServerTimeSyncCompleted) return;\n\n if (e.offset !== undefined) {\n\n setClientTimeOffset(e.offset / 1000);\n isClientServerTimeSyncCompleted = true;\n }\n }", "function get_last_sync_time(func)\n{\n\t//console.log('r...
[ "0.4916645", "0.4899724", "0.48745903", "0.48148042", "0.46528128", "0.4637183", "0.45882684", "0.45847365", "0.4528317", "0.44972518", "0.44963565", "0.4488113", "0.4478325", "0.44749597", "0.44629708", "0.44246382", "0.44006836", "0.43900526", "0.43892825", "0.4364352", "0....
0.693738
0
handleClear trigger reimport if DataStore was cleared In the future, the bookmarks and history DataAdapters will support twoway sync, so they will not only import data from the kinto.js collection into the DataStore, but also check what changes have been made recently in the DataStore, and reflect these in the kinto.js...
function handleClear(userid) { var newRevisionId; return getLastRevisionId(userid).then(lastRevisionId => { return checkIfClearedSince(lastRevisionId, userid); }).then(result => { newRevisionId = result.newRevisionId; if(result.wasCleared) { // Removing this from asyncStorage will ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleClear(callback) {\n this.set('handleClear', callback);\n }", "function clear() {\n\t\t\t// summary:\n\t\t\t//\t\tThis method is called when the store associated with this Observer\n\t\t\t//\t\tis cleared.\n\t\t\t// tag:\n\t\t\t//\t\tPrivate\n\n\t\t\t// TODO:\n\t\t\t//\t\tShould we just de...
[ "0.60289675", "0.5474681", "0.5404206", "0.5313798", "0.5266304", "0.5200501", "0.5186487", "0.5175972", "0.5146119", "0.5145755", "0.5108527", "0.5105778", "0.50888234", "0.5036321", "0.50203305", "0.5011971", "0.49960923", "0.4973028", "0.4971256", "0.49567628", "0.4944395"...
0.6589884
0
Toggles the map side bar
function mapSideToggle() { var buttonDiv = document.getElementById("map-side-interface-button"); var sideMenu = document.getElementById("map-side-menu"); if (mapSide) { sideMenu.style.width = "0"; buttonDiv.innerHTML = "<i class=\"arrow right-arrow\"></i>"; buttonDiv.style.left = "0"; } else { s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toggleSideBar(action) {\r\n if (action == \"open\") {\r\n sideBar.classList.add(\"visible\");\r\n mapContainer.classList.add(\"shorten\");\r\n\r\n return;\r\n }\r\n\r\n sideBar.classList.toggle(\"visible\");\r\n mapContainer.classList.toggle(\"shorten\");\r\n}", "toggleMenu() {\n var men...
[ "0.8235489", "0.7494765", "0.73256123", "0.72998685", "0.72850007", "0.72710294", "0.7145507", "0.7084976", "0.70317984", "0.7028892", "0.70236045", "0.69806504", "0.68005204", "0.6788245", "0.67844594", "0.6769425", "0.67625266", "0.6750446", "0.67341727", "0.6712469", "0.67...
0.8077004
1
Will display the footer modal with a message the boolean will determine to higlight it red for an error or not red for a regular message
function displayFooterMessage(text, error) { messageModal.style.display = "block"; if (!errorFlag) { if (error) { errorFlag = true; document.getElementById("modal-footer").innerHTML = "<div class=\"error\">" + text + "</div>"; } else { document.getElementById("modal-footer").innerHTML = "<...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function MessageBox(msg, bool) {\n $('#modal h4 span').remove();\n if (bool)\n $('#modal h4').append(\"<span>\" + msg + \"</span>\");\n else\n $('#modal h4').append(\"<span class=\\\"red\\\">\" + msg + \"</span>\");\n\n $(\".box-Error\").show();\n $(\".box-Confirm\").hide();\n retur...
[ "0.69827074", "0.6705597", "0.66192055", "0.66026545", "0.64116234", "0.6389211", "0.6361952", "0.6320983", "0.62465787", "0.6220754", "0.61828357", "0.61672074", "0.6146038", "0.61312944", "0.6129439", "0.61289406", "0.6122813", "0.6121567", "0.60873985", "0.6084251", "0.608...
0.79777503
0
====================== set the service that was clicked in order to send to edit service ======================
editService(service){ this.setState({ serviceToEdit: service }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "selectService(service){\n this.currentService = service;\n this.view.currentService = this.currentService;\n this.view.selectedTab = this.currentService.selectedTab ? this.currentService.selectedTab : this.serviceTabs[0];\n StackView.scrollLogsToBottom();\n }", "function goService(...
[ "0.6859016", "0.67061794", "0.66815794", "0.6339116", "0.6202025", "0.61562514", "0.610973", "0.603502", "0.5932478", "0.58927125", "0.58678263", "0.58498025", "0.5795487", "0.57783467", "0.5760984", "0.575787", "0.5592061", "0.5583625", "0.5569368", "0.5565507", "0.55584997"...
0.7094819
0
====================== set user with the login information coming from Login.js check if the user is an employee ======================
setUser(username, password){ event.preventDefault() console.log(username, password); fetch('users/' + username, { method: 'GET', headers: { 'Accept': 'application/json, text/plain, */*', 'Content-Type': 'application/json' } }) .then(response => { return respon...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ensureUser(loginName) {\r\n const postBody = jsS({\r\n logonName: loginName,\r\n });\r\n return this.clone(Web_1, \"ensureuser\").postCore({ body: postBody }).then((data) => {\r\n return {\r\n data: data,\r\n user: new SiteUser(odataUrlFrom(d...
[ "0.67167133", "0.6550865", "0.63198924", "0.6222435", "0.62136877", "0.61887944", "0.6115665", "0.6026247", "0.601553", "0.5986744", "0.59681576", "0.59572315", "0.5953806", "0.59367156", "0.59367156", "0.59292674", "0.59088403", "0.59088403", "0.58970577", "0.58935326", "0.5...
0.6664094
1
====================== delete a Job ======================
deleteJob(){ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static async deleteJob(id) {\n const res = await this.request(`jobs/${id}`, {}, 'delete');\n return res.job;\n }", "deleteJob(req, res) {\n const pid = req.params.pid;\n job\n .deleteOne({ _id: pid })\n .then(function (result) {\n res.status(200).json({ message: \"Job has been delet...
[ "0.79956293", "0.76317763", "0.7575403", "0.7513938", "0.73308784", "0.7103033", "0.7002094", "0.69877636", "0.67596143", "0.67319703", "0.6727812", "0.6610907", "0.66031605", "0.6409549", "0.6371588", "0.6356005", "0.62799615", "0.62666273", "0.62426186", "0.62061536", "0.61...
0.8229062
0
Unlock the screen by removing the div element on the top.
function unlockScreen() { var del = function () { $("#lockScreen").remove(); }; $("#lockScreen").fadeOut(del); del = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "unlock() {\n document.getElementById('blocker').style.display = 'block';\n document.getElementById('instructions').style.display = '';\n }", "function unlock(el) {\n\tel.off('click.locked');\n}", "function unlock() {\n screen.orientation.unlock();\n}", "unlockUI() {\n this.$el.removeClas...
[ "0.66899276", "0.65823203", "0.63845915", "0.63844174", "0.6345464", "0.6345464", "0.6274292", "0.6263835", "0.62432194", "0.6173269", "0.6169244", "0.61368823", "0.61196995", "0.61196995", "0.6109474", "0.6104561", "0.61033154", "0.6091684", "0.6089619", "0.6074458", "0.6042...
0.7870235
0
Delete the self defining page on the top.
function deleteSelfDefinePage() { $("#selfDefine").remove(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteHomePage() {\n var homepage = document.getElementById(\"homepage\");\n homepage.remove();\n }", "function deletePage() {\n var $wp = $('.write-pages li'); // the list of book pages\n var $page = $($wp.get(editIndex)); // the current page\n $page.remove(); //...
[ "0.70120674", "0.6786511", "0.66566986", "0.6633854", "0.6632366", "0.6572207", "0.6555678", "0.65269715", "0.6478349", "0.64231336", "0.6372435", "0.63617915", "0.6326178", "0.63204056", "0.62752193", "0.6255981", "0.6233848", "0.61139554", "0.6066672", "0.60656065", "0.6063...
0.75463843
0
Llena un deposito hasta un nivel usando un sensor de nivel y una valvula que abre el flujo
function llenar(sensor, valvula, nivel, callback) { console.log(" - Llenar depósito.", sensor, "->", nivel); electro.on(sensor, function comprobarNivel(nivelActual) { // monitorizar el sensor if (nivelActual >= nivel) { // se ha alzanzado el nivel electro.off(sensor, comprobarNivel); // dej...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Descuento40(){\n //recuperamos el valor descuento40 anterior\n var descuento40=document.getElementById(\"sal_pyt40\").value;\n //recuperamos el sueldo neto del input\n var SueldoNeto=document.getElementById('sueldoNeto').value;\n //si anteriormen...
[ "0.54206985", "0.5318771", "0.53033346", "0.52987707", "0.52702475", "0.52547663", "0.5220411", "0.51612836", "0.5154372", "0.5133636", "0.5093539", "0.5088456", "0.50823325", "0.50544333", "0.5052462", "0.50453234", "0.5032982", "0.5008918", "0.4998713", "0.49950048", "0.498...
0.59232336
0
This function essentially checks for "pending migrations" to our localforage schema, and runs them if necessary. You should add to it whenever a localforage data change/update would result in any negative impact on users. Your migration's goal is to make the schema update as painless as possible for our users.
function performMigrations () { /* Each migration has a 'key,' and we must first check to see * if that key has already been saved for the current user. * If it exists, the user has already run the migration. */ localforage.getItem('schema-11-7-2016_longname_and_stopname_cutoff_fix', function (er...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function runAll() {\n glob.sync( './easy/migrations/*.js' ).forEach( function( file ) {\n if (!file.endsWith('migrations.js')) {\n var migration = require(path.resolve(file));\n migration.run()\n }\n });\n}", "async up() {\n\n this.check()\n const migrations = this...
[ "0.6329994", "0.615997", "0.6124201", "0.6124201", "0.6124201", "0.6124201", "0.6124201", "0.6077271", "0.60550326", "0.6053994", "0.6053994", "0.6053994", "0.6053994", "0.6053994", "0.59725815", "0.58759373", "0.5764562", "0.5666664", "0.56648976", "0.56069076", "0.55442595"...
0.7478363
0
Begin component functions setup config handler usage: shell.js setup [action] [category] [...args]
function setupConfigHandler(action, category, argArray) { if ('undefined' === typeof category || '-h' === category || '--help' === category || 'help' === category || -1 === configCats.indexOf(category)) { var helpArgs; switch(action) { case 'list': helpArgs = [ 'setup list', 'List all curren...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setup(args, ctx) {\n}", "setup(config) {\r\n setup(config);\r\n }", "function setup() {}", "setup() {\n return { args };\n }", "setup() {}", "setup() {}", "setup() {}", "function doSetup() {\n\tconst path = (...paths) => require('path').join(__dirname, ...paths);\n\tconst TLog ...
[ "0.6921325", "0.6563417", "0.65216523", "0.6424462", "0.63966745", "0.63966745", "0.63966745", "0.6222844", "0.62054473", "0.6014507", "0.597309", "0.5941849", "0.5941849", "0.5940711", "0.5940711", "0.59384465", "0.59264874", "0.5921001", "0.5887097", "0.5886277", "0.5825213...
0.75256175
0
setup db tables usage: shell.js db setup tablename
function setupDb(tableName) { var dbPath, tableCount; if ('undefined' !== typeof tableName && ('-h' === tableName || '--help' === tableName || 'help' === tableName)) { actionHelp("db setup", 'Setup a table or all tables. Drops (if exists) and creates table.', 'tablename', 'Omitting the tablename will rebuild and...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dbSetup(){\n Entry.sync() // {force: true}) // using 'force' drops the table if it already exists, and creates a new one\n .then(function(){\n console.log('======= db synced =======');\n });\n }", "function createTables(db) {\n db.run('CREATE TABLE IF NOT EXISTS movies(link varch...
[ "0.7375042", "0.68012774", "0.6727762", "0.6716085", "0.64968055", "0.64562017", "0.6445099", "0.6421458", "0.64135873", "0.6380895", "0.63461614", "0.62728685", "0.6271963", "0.6247287", "0.62316656", "0.6148777", "0.6133646", "0.61047167", "0.61031836", "0.6089159", "0.6083...
0.75536686
0
add admin user usage: shell.js adminUser add username password canSudo fname lname
function addAdminUser(uname, password, canSudo, fname, lname) { if ('undefined' === typeof uname || 'string' !== typeof uname || !uname || '' === uname) { return console.log('Cannot add user; username is invalid.'); } if ('-h' === uname || '--help' === uname || 'help' === uname) { actionHelp('adminUser ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addUser() {\n var user = {\n primaryEmail: 'liz@example.com',\n name: {\n givenName: 'Elizabeth',\n familyName: 'Smith'\n },\n // Generate a random password string.\n password: Math.random().toString(36)\n };\n user = AdminDirectory.Users.insert(user);\n Logger.log('User %s cr...
[ "0.7627169", "0.7255536", "0.7150712", "0.70490485", "0.69922656", "0.66812617", "0.6672067", "0.6657857", "0.6571606", "0.65607107", "0.65511787", "0.6525829", "0.6497459", "0.6471612", "0.64469635", "0.6432463", "0.6429957", "0.637121", "0.6367309", "0.6336348", "0.63287383...
0.8287033
0
delete admin user usage: shell.js adminUser delete id
function deleteAdminUser(id) { if ('undefined' !== typeof id && ('-h' === id || '--help' === id || 'help' === id)) { actionHelp("adminUser delete", 'Remove an admin user.', '[id]'); return process.exit(); } if ('string' !== typeof id || '' === id) { console.log('Cannot delete user; user id invalid.'); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteUser(req, res) {\n var id = req.params['id'];\n typeModel.deleteAdmin(id)\n .then(res.sendStatus(200))\n }", "function delAdmin(N) {\n TempAdmin = N;\n id = obj.admins[TempAdmin]._id;\n llamada(true, \"DELETE\", \"https://lanbide-node.herokuapp.com/admins/\" + ...
[ "0.8171375", "0.7599248", "0.7428784", "0.73849654", "0.73804873", "0.72116405", "0.72024536", "0.71808726", "0.7144424", "0.7144424", "0.70946074", "0.70544887", "0.7022147", "0.7006926", "0.6977989", "0.69663906", "0.69618446", "0.69489676", "0.693173", "0.6892192", "0.6889...
0.84530586
0
change admin user password usage: shell.js adminUser changePw id oldpassword newpassword
function changeAdminUserPassword(id, oldpw, newpw) { if ('undefined' !== typeof id && ('-h' === id || '--help' === id || 'help' === id)) { actionHelp("adminUser changePw", 'Change password for an admin user.', '[id] [oldpassword] [newpassword]'); return process.exit(); } if ('string' !== typeof id || '' ===...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ChangePassword() {\n\t}", "function set_user_password(env, password) {\n env.auth.user.password = { plaintext: password };\n}", "async ChangePasswordUser(username,password){\n User.update({username:username},{password:password},function(err){\n if(err) return console.error(err);\n ...
[ "0.7205431", "0.71312267", "0.71157366", "0.70830846", "0.70534194", "0.7049591", "0.70265573", "0.6997736", "0.6937547", "0.6932534", "0.6927477", "0.68769664", "0.6869157", "0.6864615", "0.68070334", "0.67951554", "0.6790586", "0.6688302", "0.66758615", "0.66281676", "0.660...
0.8558339
0
change admin user first and last name usage: shell.js adminUser changeName id firstname lastname
function changeAdminUserName(id, fname, lname) { if ('undefined' !== typeof id && ('-h' === id || '--help' === id || 'help' === id)) { actionHelp("adminUser changeName", 'Change first and last name for an admin user.', '[id] [firstname] [lastname]'); return process.exit(); } if ('string' !== typeof id || ''...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function set_user_name(env, title, first, initial, last) {\n env.auth.user.name = [title, first, initial, last];\n}", "function set_user_name(new_name){\n //TODO Validate User String\n current_user_name = new_name\n nameSpace.innerHTML=(\"User: \" + current_user_name)\n \n}", "'user.changeUsername...
[ "0.71219516", "0.69069433", "0.6890154", "0.6816529", "0.67240274", "0.6704865", "0.6630218", "0.65378934", "0.6528521", "0.6506264", "0.64601105", "0.6440339", "0.6438749", "0.64238906", "0.6401512", "0.64004564", "0.6397136", "0.6381475", "0.6345641", "0.62943214", "0.62849...
0.86693877
0
list admin users usage: shell.js adminUser list
function listAdminUsers(arg) { if ('undefined' !== typeof arg && ('-h' === arg || '--help' === arg || 'help' === arg)) { actionHelp("adminUser list", 'View a list of all admin users.', ''); return process.exit(); } else if ('undefined' !== typeof arg) { console.log('"adminUser list" does not accept any ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "listUsers(aud) {\n return this.user._request('/admin/users', {\n method: 'GET',\n audience: aud,\n });\n }", "getAllUsers() {\n return Api.get(\"/admin/user-list\");\n }", "function listUsers() {\n const optionalArgs = {\n customer: 'my_customer',\n maxResults: 10,\n orderB...
[ "0.75347483", "0.75060207", "0.71301097", "0.7119579", "0.70217574", "0.69946456", "0.6876498", "0.6865923", "0.6858531", "0.6843809", "0.6836825", "0.68221694", "0.675258", "0.6717139", "0.6661136", "0.6622917", "0.66034305", "0.6560859", "0.6517572", "0.6495836", "0.6494443...
0.83848965
0
enable sudo for admin user usage: shell.js adminUser allowSudo id
function allowAdminUserSudo(id) { if ('undefined' !== typeof id && ('-h' === id || '--help' === id || 'help' === id)) { actionHelp("adminUser allowSudo", 'Add sudo privilege for an admin user.', '[id]'); return process.exit(); } if ('string' !== typeof id || '' === id) { console.log('Cannot allow sudo f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function disallowAdminUserSudo(id) {\n\n\tif ('undefined' !== typeof id && ('-h' === id || '--help' === id || 'help' === id)) {\n\t\n\t\tactionHelp(\"adminUser disallowSudo\", 'Remove sudo privilege for an admin user.', '[id]');\n\t\treturn process.exit();\n\t\n\t}\n\tif ('string' !== typeof id || '' === id) {\n\t...
[ "0.804951", "0.58852714", "0.5758397", "0.56731254", "0.5630243", "0.5620425", "0.56193525", "0.56144583", "0.5598375", "0.5593444", "0.5589056", "0.5573705", "0.55692476", "0.55692476", "0.5537794", "0.5513621", "0.5509708", "0.54846984", "0.54749024", "0.54571503", "0.54398...
0.8437227
0
disable sudo for admin user usage: shell.js adminUser disallowSudo id
function disallowAdminUserSudo(id) { if ('undefined' !== typeof id && ('-h' === id || '--help' === id || 'help' === id)) { actionHelp("adminUser disallowSudo", 'Remove sudo privilege for an admin user.', '[id]'); return process.exit(); } if ('string' !== typeof id || '' === id) { console.log('Cannot dis...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function allowAdminUserSudo(id) {\n\n\tif ('undefined' !== typeof id && ('-h' === id || '--help' === id || 'help' === id)) {\n\t\n\t\tactionHelp(\"adminUser allowSudo\", 'Add sudo privilege for an admin user.', '[id]');\n\t\treturn process.exit();\n\t\n\t}\n\tif ('string' !== typeof id || '' === id) {\n\t\n\t\tcon...
[ "0.80820584", "0.6362342", "0.59966105", "0.59966105", "0.58051896", "0.5756277", "0.56804204", "0.5677381", "0.56303066", "0.5613529", "0.55870813", "0.5545712", "0.54994243", "0.54845744", "0.54627895", "0.545934", "0.5419773", "0.5406349", "0.5379598", "0.53750736", "0.536...
0.86215013
0
list scss stylesheets usage: shell.js styles list
function listStyles(arg) { if ('undefined' !== typeof arg && ('-h' === arg || '--help' === arg || 'help' === arg)) { actionHelp("styles list", 'View a list of all compilable scss stylesheets with type.', ''); return process.exit(); } else if ('undefined' !== typeof arg) { console.log('"styles list" does...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function styles() {\r\n\treturn gulp.series( compileSass, prefixStyles, generateRTLCSS );\r\n}", "listStylesTemplates(api) {\n // Style Sheets / CSS\n console.log(color(\"Style Sheets:\", this.colors.divider));\n api.listCommands(api.tasks.styles);\n }", "static get styles() { return []...
[ "0.69184166", "0.67757154", "0.6709333", "0.67013115", "0.6696494", "0.6685347", "0.6594684", "0.6475814", "0.6404005", "0.6329818", "0.63138413", "0.630411", "0.6269764", "0.62636477", "0.6244371", "0.6237707", "0.622864", "0.6221018", "0.6220919", "0.6216312", "0.6213132", ...
0.79812884
0
start capturing screen shots in a loop
function startScreencapture() { console.log("starting screencap loop"); screencap(); tid = setInterval(screencap, interval); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function shoot(){\n\t var video = document.getElementById(videoId);\n\t var output = document.getElementById('output');\n\t var canvas = capture(video, scaleFactor);\n\t canvas.onclick = function(){\n\t window.open(this.toDataURL());\n\t };\n\t snapshots.unshift(canvas);\n\t ...
[ "0.72158754", "0.72010636", "0.7096962", "0.7018928", "0.6732743", "0.6675093", "0.66032714", "0.64121306", "0.62635297", "0.6252028", "0.62455714", "0.6222726", "0.62192494", "0.621367", "0.6183325", "0.60774374", "0.60689956", "0.6044637", "0.6041541", "0.60414404", "0.5976...
0.77558553
0
stop capturing screenshots in a loop
function endScreencapture() { console.log("ending screencap loop"); clearInterval(tid); tid = false; // reset the tid (timerId) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stopWebcam() {\n var vid = document.querySelector('video');\n vid.srcObject.getTracks().forEach((track) => {\n track.stop();\n });\n // disable snapshot button\n document.querySelector('#takeSnap').disabled = true;\n}", "function stopFunction() {\n if (interval) clearInterva...
[ "0.66080046", "0.65843624", "0.6313315", "0.62881434", "0.6252296", "0.6186674", "0.613867", "0.6107562", "0.6063703", "0.603224", "0.6029806", "0.6010618", "0.6010618", "0.59854585", "0.5928745", "0.5901869", "0.59006643", "0.5886607", "0.58848405", "0.5881362", "0.58471656"...
0.74506617
0
take an actual screencapture
function screencap() { console.log("capturing screenshot - current time: " + new Date()); exec("screencapture -x ./img/screencap_" + Date.now() + ".png", puts); // screencap on interval timer }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function takeASnapShot(){\n\t\twindow.webcam.capture(3);\n\t}", "function startScreencapture() {\n console.log(\"starting screencap loop\");\n screencap();\n tid = setInterval(screencap, interval);\n}", "function shoot(){\n\t var video = document.getElementById(videoId);\n\t var output = docume...
[ "0.7450977", "0.744713", "0.71377486", "0.70608914", "0.69526756", "0.6894147", "0.6818649", "0.66684085", "0.6658211", "0.6353661", "0.63087445", "0.62855154", "0.62763995", "0.62231123", "0.6219518", "0.61465555", "0.611414", "0.60633916", "0.6044533", "0.6037434", "0.60281...
0.77081865
0
cargamos de entrada los iconos que vamos a usar en la vista
function cargarIconos(){ // iconos para mostrar puntos estilosMarcadores["carga"] = styles.marcadorCarga(); estilosMarcadores["traslado"] = styles.marcadorTraslado(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cargarIconos(){\n // iconos para mostrar puntos\n estilosActuales[\"carga\"] = styles.marcadorCarga();\n //corregir esto\n estilosActuales[\"Taxi/Remis\"] = styles.marcadorTraslado();\n // default\n estilosActuales[\"default\"] = styles.mar...
[ "0.7917916", "0.7115688", "0.70725495", "0.7027693", "0.69690317", "0.6959336", "0.6909535", "0.6909535", "0.6760097", "0.6706131", "0.66911256", "0.6649473", "0.6646993", "0.6614608", "0.6612794", "0.6597011", "0.6576015", "0.6522163", "0.6521468", "0.64845836", "0.64808965"...
0.8150979
0
handleInput Checks if an arrow key is pressed and sets the Buster's velocity appropriately.
handleInput() { // Horizontal movement if (keyIsDown(this.leftKey)) { this.vx = -this.speed; } else if (keyIsDown(this.rightKey)) { this.vx = this.speed; } else { this.vx = 0; } // Vertical movement if (keyIsDown(this.upKey)) { this.vy = -this.speed; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleInput() {\n //If pressing left...\n if (keyIsDown(LEFT_ARROW)) {\n this.vx += -0.5;\n //if pressing right...\n } else if (keyIsDown(RIGHT_ARROW)) {\n this.vx += 0.5;\n //the following two neutralize the velocity\n } else if (this.vx < 0) {\n this.vx += 0.3;\n } else if...
[ "0.7861318", "0.7692037", "0.7542266", "0.7395717", "0.73578227", "0.7336021", "0.720135", "0.69968504", "0.6994075", "0.69346935", "0.68018794", "0.67810386", "0.67506284", "0.67330503", "0.67200756", "0.66982967", "0.66754717", "0.667329", "0.66636103", "0.66469616", "0.664...
0.77848685
1