Search is not available for this dataset
query
stringlengths
7
355k
document
stringlengths
9
341k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
create the our internal event listener callback we'll be firing off within it is the user's event listener callback and some other goodies
function eventListener(ev) { if (testKeyCode > 0 && ev.keyCode !== testKeyCode) { // we're looking for a specific keycode // but the one we were given wasn't the right keycode return; } // fire the user's component event listener callback // if the ins...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initEventListener() {\n \n }", "function Listener(callback) {\n var listener = callback;\n listener.onArr = function (arr,eventName) {\n if (arr.length < 2 ) {throw \"Invalid argument: At least two elements in the Array are expected!\"}\n if(!e...
[ "0.68712413", "0.6733724", "0.67122203", "0.6589102", "0.65186256", "0.6419451", "0.641151", "0.6410904", "0.6410904", "0.6363765", "0.63421005", "0.6336362", "0.63322014", "0.631315", "0.62870646", "0.62797576", "0.6279201", "0.62757003", "0.62757003", "0.6275395", "0.626178...
0.0
-1
Create a mutation observer for the elm.
function createMutationObserver(plt, elm) { if (plt.isClient) { var elementReset_1 = createElementReset(plt, elm); elm._observer = new MutationObserver(function (mutations) { mutations.forEach(elementReset_1); }); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_addMutationObserver() {\n this._observer = new MutationObserver(this._onMutateBound);\n this._observer.observe(this.containerEl, {childList: true, attributes: true, characterData: true, subtree: true});\n }", "observe() {\n if (this.observer === null) {\n this.observer = new MutationObserver(this...
[ "0.7284138", "0.70851004", "0.69939315", "0.6782731", "0.6332631", "0.6311989", "0.6311989", "0.62588465", "0.62063444", "0.61132205", "0.60174125", "0.5971557", "0.5916953", "0.5915528", "0.5895927", "0.5894292", "0.58220583", "0.5811697", "0.5799994", "0.578363", "0.5783068...
0.69341034
3
Start the observer that each element has
function startObserving(plt, elm) { if (plt.isClient && elm._observer) { return elm._observer.observe(elm, { 'childList': true }); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "begin() {\n\t\tthis.items.forEach((item) => {\n\t\t\tthis.setAttributes(item);\n\t\t\tthis.createObserver(item);\n\t\t});\n\t}", "observer(){\n this.sections.forEach(list => {\n list._ini()\n })\n }", "notify() {\n this.observers.forEach(observer => observer());\n }", "observe...
[ "0.7354384", "0.650227", "0.6301492", "0.62532276", "0.62234205", "0.62219167", "0.6203204", "0.6102904", "0.6030049", "0.6030049", "0.6030049", "0.60088533", "0.5998798", "0.595469", "0.58970344", "0.5816466", "0.5790576", "0.57504594", "0.5725903", "0.5720558", "0.5693091",...
0.6032176
8
Update lineno and column based on `str`.
function updatePosition(str) { var lines = str.match(/\n/g); if (lines) lineno += lines.length; var i = str.lastIndexOf('\n'); column = ~i ? str.length - i : column + str.length; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updatePosition(str) {\n const lines = str.match(/\\n/g);\n\n if (lines) {\n lineno += lines.length;\n }\n\n const i = str.lastIndexOf('\\n'); // eslint-disable-next-line no-bitwise\n\n column = ~i ? str.length - i : column + str.length;\n }", "function updatePosition(str) {\n\t v...
[ "0.83989674", "0.8369735", "0.8337376", "0.8337376", "0.8337376", "0.8337376", "0.8337376", "0.8337376", "0.833551", "0.60850054", "0.5638499", "0.5624847", "0.5624847", "0.5624847", "0.5624847", "0.5624847", "0.5621054", "0.55528665", "0.55331707", "0.5442858", "0.53755826",...
0.8385467
1
Mark position and patch `node.position`.
function position() { var start = { line: lineno, column: column }; return function (node) { node.position = new ParsePosition(start); whitespace(); return node; }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function patch(node) {\n if (!node.position) {\n node.position = {}\n }\n}", "setNodePosition(Pos, node) {\n let currrentNode = this.nodes.find(n => n === node);\n currrentNode.x = Pos.x;\n currrentNode.y = Pos.y;\n }", "assignPosition(node, position) {\n // update the posit...
[ "0.78643674", "0.67877644", "0.66812366", "0.6609615", "0.61726326", "0.6160763", "0.6159338", "0.6128518", "0.6128518", "0.6128518", "0.6128518", "0.6128518", "0.600111", "0.5998194", "0.59889054", "0.59882045", "0.5905528", "0.58909917", "0.5888504", "0.5858421", "0.5847996...
0.0
-1
Match `re` and return captures.
function match(re) { var m = re.exec(css); if (!m) return; var str = m[0]; updatePosition(str); css = css.slice(str.length); return m; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function regexAllMatches(re, str){\n const matches = [];\n let match;\n while((match = re.exec(str)) !== null){\n matches.push(match);\n }\n return matches;\n}", "function reMatches$$1(string, re) {\n // Different to the native `match` function this method returns an object\n // with `sta...
[ "0.653645", "0.6518576", "0.6435857", "0.6172701", "0.6172701", "0.6145361", "0.6085597", "0.60477644", "0.59481406", "0.59177643", "0.58568674", "0.56327456", "0.5490321", "0.54052585", "0.53875726", "0.5332298", "0.513566", "0.5121775", "0.51190484", "0.5058343", "0.4963344...
0.48335293
37
Adds nonenumerable parent node reference to each node.
function addParent(obj, parent) { var isNode = obj && typeof obj.type === 'string'; var childParent = isNode ? obj : parent; for (var k in obj) { var value = obj[k]; if (Array.isArray(value)) { value.forEach(function (v) { addParent(v, childParent); }); } else if ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function add_parent_links(node) {\n\tfor(var c = 0; c < node.children.length; c++) {\n\t\tnode.children[c].parent = node;\n\t\tadd_parent_links(node.children[c]);\n\t}\n}", "function populate_parent(astroot) {\n\n function visit(node, parent) {\n if (!node || typeof node.type !== \"string\") {\n retur...
[ "0.71569186", "0.6822904", "0.67842895", "0.67029613", "0.6561568", "0.6482678", "0.641357", "0.6398496", "0.6313774", "0.6066278", "0.60330665", "0.5956634", "0.5952569", "0.5908243", "0.5853859", "0.584878", "0.584878", "0.584878", "0.584878", "0.584878", "0.584878", "0.5...
0.58912295
14
overload with two options for hydrateToString one that returns a promise, and one that takes a callback as the last arg
function hydrateToString(hydrateOpts) { // validate the hydrate options and add any missing info normalizeHydrateOptions(config, hydrateOpts); // kick off hydrated, which is an async opertion return hydrateHtml(config, ctx, registry, hydrateOpts).catch(function (err) { var hy...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function callRpcWithCoercedStringArguments(callRpc) {\n var _this = this;\n\n // Order important - see below\n var coercers = [new NumericTypeCoercer(), new BooleanTypeCoercer(), new JsonObjectTypeCoercer()];\n\n return function () {\n var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_re...
[ "0.5002028", "0.48666647", "0.48409596", "0.4725391", "0.47244844", "0.4665549", "0.46441394", "0.46387196", "0.46119678", "0.45998305", "0.45664924", "0.4559484", "0.4551389", "0.45335844", "0.45240584", "0.45008478", "0.4493117", "0.44913766", "0.4473385", "0.44590235", "0....
0.56157005
0
Grundsaetzliches einrichten von Scroll Magic. Erstellen des controllers und einrichten der Szene fuer den dauerpin.
function setupScrollMagic() { // Erstellen des Scroll Magic Controllers und horizontales Scrollen konfigurieren. controller = new ScrollMagic({ vertical: false, loglevel: DEBUG ? 2 : 0, globalSceneOptions: { loglevel: DEBUG ? 2 : 0 } } ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Controller(){} //Extends Class (at bottom of page).", "function ViewController(){}//Extends Controller (at bottom of page).", "function addScrollMagic(){\n\n var $slides = $pages.find('.sc-slides');\n\n _scrollValues = [];\n \n _controller = null;\n\n _controller = new ScrollM...
[ "0.6213457", "0.6076472", "0.5902883", "0.5833282", "0.5750994", "0.5701513", "0.5665196", "0.55301076", "0.5525157", "0.55232936", "0.55230564", "0.5485959", "0.54825824", "0.5481029", "0.5479841", "0.5469345", "0.54690295", "0.5468913", "0.5468751", "0.54422367", "0.5440081...
0.6750262
0
EventHandler fuer das window.resize Ereignis. Passt Elemente in ihrer Ausrichtung neu an die mittels CSS nur unzureichend Konfiguriert werden koennen.
function window_resize() { // Die Schrift der gesamten Seite soll relativ zur hoehe des Scenecontainers sein. var newFontSize = $("#sceneContainer").height() * 0.03; $("body").css("font-size", newFontSize + "px"); /* Browser Fix: Manche Browser (z.B. Firefox) scheinen Unterelemente nicht immer richtig A...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onWindowResize() {\n updateSizes();\n }", "function onWindowResize() {\n\n\t\t\t}", "resizeListener() {\n this.windowWidth = global.innerWidth;\n this._checkFixedNeeded();\n }", "function edgtfOnWindowResize() {\n }", "$_initResizeEvent() {\n window.addEventListener('r...
[ "0.74865675", "0.73229694", "0.7099331", "0.69470435", "0.6836462", "0.6825221", "0.6805761", "0.680108", "0.677498", "0.6770765", "0.6758446", "0.6754619", "0.67531073", "0.6739565", "0.6732443", "0.6715249", "0.66987926", "0.6684131", "0.66749924", "0.66726315", "0.66716844...
0.7029894
3
Haengt die gegebene Szene im Scrollverlauf hinten an die zuletzt hinzugefuegte Szene an.
function addScene(sceneName, scrollScene) { // Die neue Szenen einreihen indem ihr eine Start-Scrollposition zugeweisen wird. scrollScene.offset(totalDuration); // Die Scrollaenge erhoeht sich um die Dauer der hinzuzufuegenden Szene. totalDuration += scrollScene.duration(); updateScrollLength(); /*...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "loadHints() {\n this.hints = []\n for (var x=0; x<this.width; x++) {\n for (var y=0; y<this.height; y++) {\n if (x%2 + y%2 === 1 && this.getLine(x, y) > window.LINE_NONE) {\n this.hints.push({'x':x, 'y':y})\n }\n }\n }\n }", "get hintLabel() { return this._hintLabel; }"...
[ "0.62430316", "0.61384183", "0.60377955", "0.5967524", "0.595261", "0.59234285", "0.58987796", "0.5836368", "0.5814272", "0.57919556", "0.57226795", "0.56945163", "0.56240076", "0.56029737", "0.5521344", "0.5514034", "0.5506363", "0.5488506", "0.5482948", "0.548183", "0.54782...
0.0
-1
Manche Browser (z.B. Safari 5.1.7) richten ein Element falsch aus wenn folgende Bedingungen gegeben sind: Ein imgKindelement mit Hoehenangabe, aber keiner Breitenangabe ist in dem Element enthalten. Das imgKindelement ist aufgrund der Bildgroesse breiter als das Element. Das Element hat keine Breitenangabe und ist, auf...
function bf_SizeContainerToInnerImg(imgElement, add) { /* Erst muss das Bild vollstaendig geladen sein, sonst kann seine Breite nicht bestimmt werden - daher einen Event-Handler an das load-Ereignis binden. */ imgElement.load(function() { // Die Breite des Elternelements dauerhaft an die Breite des Bildes ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "zoomInImg(element) {\n this.swapClasses(element, FIT_IMG_CLASS, FULL_IMG_CLASS);\n }", "deserialize(el, next) {\n if (el.tagName.toLowerCase() === 'img') {\n return {\n object: 'block',\n type: 'image',\n nodes: next(el.childNodes),\n data: {\n ...
[ "0.56239647", "0.54133433", "0.54133403", "0.5379641", "0.53470486", "0.5326762", "0.53015536", "0.52322626", "0.5218359", "0.5202983", "0.5200692", "0.52000517", "0.5146752", "0.5128632", "0.50991416", "0.5094911", "0.50828564", "0.5072148", "0.50694466", "0.5064289", "0.505...
0.57724875
0
Bindet die Breite eines oder mehrere Elemente an die Breite eines anderen Elements.
function bindElementWidth(targetElement, sourceElement, add) { // Wenn optionaler Parameter nicht gegeben, dann explizit festlegen. if (typeof add === "undefined") add = 0; // Einen Event-Handler an das Resize-Ereignis vom Quellelement binden. element_resize = function() { targetElement.width(sourceEle...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function binb(x, len) {\n\t var j, i, l,\n\t W = new Array(80),\n\t hash = new Array(16),\n\t //Initial hash values\n\t H = [\n\t new int64(0x6a09e667, -205731576),\n\t new int64(-1150833019, -2067093701),\n\t new int64(0x3c6ef372, -237915...
[ "0.5486276", "0.5420946", "0.5335824", "0.52206194", "0.51927525", "0.51910955", "0.518862", "0.518862", "0.518862", "0.518862", "0.5187242", "0.51803225", "0.51613027", "0.5142369", "0.5127458", "0.5120003", "0.51129276", "0.5108207", "0.5098238", "0.50691056", "0.50658244",...
0.0
-1
Legt die moegliche Scrollaenge des Browserfensters fest.
function updateScrollLength() { // Spacer ueber die gesamte Scrolllaenge strecken um die Scrollbar zu erzeugen. $("#scrollSpacer").width(totalDuration + $("#sceneContainer").width()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onPageLoad() {\n // winResize();\n // winScroll();\n }", "function ssc_init(){if(document.body){var e=document.body,s=document.documentElement,c=window.innerHeight,t=e.scrollHeight;if(ssc_root=document.compatMode.indexOf(\"CSS\")>=0?s:e,ssc_activeElement=e,ssc_initdone=!0,top!=self)ssc_frame=!0;e...
[ "0.5985078", "0.57444847", "0.56647617", "0.5627456", "0.5613243", "0.55114955", "0.5499842", "0.54089326", "0.53694254", "0.5364075", "0.53554976", "0.5345109", "0.5340154", "0.5291341", "0.5257013", "0.5254679", "0.5253858", "0.52529275", "0.5247449", "0.52333766", "0.52101...
0.0
-1
function to update new user nicknames
function updateNicknames() { io.sockets.emit('usernames', Object.keys(users)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateNicknames(){\n\t\t//io.emit('usernames', Object.keys(users)); //An array of users object keys\n\t\tio.emit('usernames', users); //An array of users object keys\n\t}", "function updateNicknames(){\r\n\t\tio.sockets.emit('usernames', Object.keys(users));\r\n\t}", "function changeNickname() {\n ...
[ "0.7862523", "0.77938116", "0.7628479", "0.7504218", "0.74356526", "0.7398885", "0.7219812", "0.7195323", "0.7148264", "0.7132904", "0.7082703", "0.70731026", "0.7047784", "0.69936514", "0.6940416", "0.69228166", "0.68274784", "0.6818688", "0.67377734", "0.67202264", "0.66820...
0.8025778
0
Function Name: blank_specialfunc Purpose:Purpose of this function is to validate the form control (For single control only).
function blankfunc1(id1, check1) { $(check1+'_err1').removeClassName('showElement'); $(check1+'_err1').addClassName('hideElement'); if($F(id1) == '') { //alert('id1'); $(id1+'_err1').removeClassName('hideElement'); $(id1+'_err1').addClassName('showElement'); //$(id1+'1_err').setStyle({display:"bloc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function emptyValidation(control, msgBox) {\n\n var control_len = control.value.length;\n if (control_len === 0) {\n document.getElementById(msgBox).innerHTML = '<font style=\"color: red;\">Field should not be empty.</font><br>';\n control.focus();\n return false;\n }\n document.ge...
[ "0.7293068", "0.7040822", "0.6986506", "0.68831664", "0.6881518", "0.68368524", "0.66620415", "0.6594304", "0.6594304", "0.6594304", "0.6594304", "0.6594304", "0.6586753", "0.65766996", "0.6547158", "0.6534494", "0.65291643", "0.6526618", "0.64970255", "0.6494464", "0.6494464...
0.6414347
26
Function Name: blank_specialfunc Purpose:Purpose of this function is to validate the form control (For single control only).
function blank_specialfunc(id1, check1) { $(check1+'_err1').removeClassName('showElement'); $(check1+'_err1').addClassName('hideElement'); //var illegalChars = /\s/; // allow letters, numbers, and underscores var iChars = "!@#$%^&*()+=-[]\';,./{}|\":<>?"; if($F(id1) == '') { $(id1+'_err1').removeClassName('h...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function emptyValidation(control, msgBox) {\n\n var control_len = control.value.length;\n if (control_len === 0) {\n document.getElementById(msgBox).innerHTML = '<font style=\"color: red;\">Field should not be empty.</font><br>';\n control.focus();\n return false;\n }\n document.ge...
[ "0.7293068", "0.7040822", "0.6986506", "0.68831664", "0.68368524", "0.66620415", "0.6594304", "0.6594304", "0.6594304", "0.6594304", "0.6594304", "0.6586753", "0.65766996", "0.6547158", "0.6534494", "0.65291643", "0.6526618", "0.64970255", "0.6494464", "0.6494464", "0.6493177...
0.6881518
4
Function Name: blankfunc2 Purpose:Purpose of this function is to validate the form control (For two controls only).
function blankfunc2(id1,id2,check2,id3) { $(check2+'_err1').removeClassName('showElement'); $(check2+'_err1').addClassName('hideElement'); var msg = ""; if($F(id1) == '') { msg += "enter value in field one\n"; $(id1+'_err1').removeClassName('hideElement'); $(id1+'_err1').addClassName('showElement'); //a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function blankfunc1(id1, check1)\n{\n\t\n\t\t$(check1+'_err1').removeClassName('showElement');\n\t\t$(check1+'_err1').addClassName('hideElement');\n\n\tif($F(id1) == '')\n\t{\n\t\t\t//alert('id1');\n\t\t\t$(id1+'_err1').removeClassName('hideElement');\n\t\t\t$(id1+'_err1').addClassName('showElement');\n\t\t\t//$(i...
[ "0.6791974", "0.6702112", "0.6660959", "0.65288615", "0.65270627", "0.64787674", "0.64783514", "0.64783514", "0.63890463", "0.62780994", "0.6275132", "0.62595314", "0.6252253", "0.62370974", "0.6235325", "0.62254965", "0.6217855", "0.6195712", "0.61891997", "0.61794376", "0.6...
0.6829534
0
Function Name: blankfunc3 Purpose:Purpose of this function is to validate the form controls (For three controls only).
function blankfunc3(id1,id2,id3,check3) { /*$(id1+'_err1').removeClassName('showElement'); $(id1+'_err2').removeClassName('showElement'); $(id2+'_err1').removeClassName('showElement'); $(id2+'_err2').removeClassName('showElement'); $(id3+'_err1').removeClassName('showElement'); $(id3+'_err2').removeClassName('sho...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function blankfunc2(id1,id2,check2,id3)\n{\n\t$(check2+'_err1').removeClassName('showElement');\n\t$(check2+'_err1').addClassName('hideElement');\n\tvar msg = \"\";\n\tif($F(id1) == '')\n\t{\n\t\tmsg += \"enter value in field one\\n\";\n\t\t\t$(id1+'_err1').removeClassName('hideElement');\n\t\t\t$(id1+'_err1').add...
[ "0.67742807", "0.6584122", "0.6516139", "0.64892447", "0.64488316", "0.6395533", "0.6391266", "0.63402814", "0.63345265", "0.6301957", "0.62497157", "0.6196582", "0.61803085", "0.61780214", "0.6164731", "0.6146206", "0.61278695", "0.612606", "0.6121156", "0.6112014", "0.61014...
0.6782608
0
Function Name: userAddNewformValidate Purpose:Purpose of this function is to validate the form control.
function userAddNewformValidate(id1, id2, id3, id4, id5, id6, check2) { $(check2+'_err1').removeClassName('showElement'); $(check2+'_err1').addClassName('hideElement'); var illegalChars = /\s/; // allow letters, numbers, and underscores var emailRegEx = /^[A-Z0-9'._%&+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validateFormAddNewUser()\n{\n\tvalidatorAddUser = $(\"form#addRegions\")\n\t.validate(\n\t\t\t{\n\t\t\t\terrorClass : 'error',\n\t\t\t\tvalidClass : 'success',\n\t\t\t\terrorElement : 'span',\n\t\t\t\tafterReset : resetBorders,\n\t\t\t\terrorPlacement : function(error,\n\t\t\t\t\t\telement) {\n\n\t\t\t\...
[ "0.71965647", "0.69320464", "0.6717075", "0.6601784", "0.65424997", "0.65330476", "0.6464428", "0.6445828", "0.64417636", "0.64417636", "0.64292276", "0.64167774", "0.6381805", "0.6277638", "0.6257202", "0.62504476", "0.6234602", "0.62236637", "0.6203057", "0.6182419", "0.618...
0.62508446
15
Show password boxes on add edit user
function changeShowPass(obj, action) { //$('showPassBoxLink')); if(obj.value == 'A') { if(action != 'edit'){ $('PilotgroupPassword').enable(); $('ConfirmPilotgroupPassword').enable(); }else{ if($('showPassBoxLink') != null) $('showPassBoxLink').addClassName('showElement'); else{ $('PilotgroupP...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onChangePasswordUserClick() {\n gCustomerId = $(this).data('id');\n $('#modal-update-password').modal('show');\n }", "showPassword(e) {\n\t\tif(e){\n\t\t\tvar x = document.getElementById(\"exampleInputPassword1\");\n\t\t if (x.type === \"password\") {\n\t\t x.type = \"text\";\n\t\t } else {\...
[ "0.70030034", "0.68919563", "0.67428344", "0.67202073", "0.6657687", "0.66169286", "0.65922344", "0.6567007", "0.6535185", "0.65170956", "0.65031016", "0.6467186", "0.646413", "0.64294636", "0.64194345", "0.6397801", "0.6383559", "0.6345786", "0.634001", "0.62391025", "0.6237...
0.6199613
23
Function Name: setOwnershipForInsight Purpose:Purpose of this function is to set the Ownership values if ownership of any issue has been taken by any SME.
function setOwnershipForInsight() { var delegated_user_length = document.getElementById("ProductDeligatedTo").length; var insight_status_length = document.getElementById("ProductInsightStatus").length; document.getElementById("HdnDelegatedTo").value=current_user_id; document.getElementById("HdnOwnershipTaken").valu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function configureOwnership() {\n\tfor (var objectType in metaData) {\n\n\t\t//It not iterable, skip\n\t\tif (!Array.isArray(metaData[objectType])) continue;\n\n\t\t//For each object of objectType\n\t\tfor (var obj of metaData[objectType]) {\n\n\t\t\t//Set ownersip, if applicable\n\t\t\tif (currentExport.hasOwnPro...
[ "0.6110821", "0.53153527", "0.5195936", "0.5053329", "0.5052062", "0.50443345", "0.49140024", "0.48919028", "0.48888934", "0.48728266", "0.48335996", "0.47287488", "0.468384", "0.46004793", "0.45887345", "0.45703325", "0.45646483", "0.45641738", "0.4351652", "0.42840618", "0....
0.6880257
0
Function Name: openPopupWindow Purpose:Purpose of this function is to open a child popup window. Additionally it will check that wheather the child window already opened or not.
function openPopupWindow(poplink, insight_id, loginUserId){ if (objWin3 && !objWin3.closed) { alert('Child window already open. Attempting focus...'); try { objWin3.focus(); } catch(e) {} return false; } var replyURL = poplink+"addreply/"+insight_id+"/"+loginUserId+"/0"; window.o...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function openChildWindow( appurl, windowname ) {\r\n global_openCdcPopup({address:appurl,width:798,height:547,top:25,left:0,windowName:windowname});\r\n}", "function popup(strUrl, strWindowName, strComplement, strJsExecOnClose)\n{\n if ((empty(strUrl)) || (empty(strWindowName)))\n return false;\n i...
[ "0.70616734", "0.6914119", "0.6858604", "0.68328196", "0.6801361", "0.67217547", "0.67110175", "0.6686515", "0.66576356", "0.65781265", "0.6569866", "0.6566596", "0.6557649", "0.6538512", "0.64569247", "0.6443638", "0.64324063", "0.64149964", "0.64043146", "0.6399617", "0.638...
0.79075253
0
Timeline takes a y value as a percentage which determinces it's horizontal position on the screen.
constructor(y){ // super() this.y = y; this.width = 1.0; this.height = 0.03; this.startX = 0.05; this.startY = this.y; this.endX = 0.95; this.endY = this.startY + this.height; this.length = this.endX - this.startX; this.timelineMarker = new TimelineMarker(); this.hotspots = []; this.stories = []...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pctFromYVal(yValue) {\n return yValue * 100 / canvas.height;\n}", "function yPosition(d,i){\n return Math.floor(i/100)*11+60\n }", "function yValFromPct(percent) {\n return percent * canvas.height / 100;\n}", "function posit() {\n posy = window.pageYOffset * 0.30;\n hr.style.back...
[ "0.6070087", "0.60230565", "0.597049", "0.5817833", "0.5735164", "0.56389505", "0.5630815", "0.56208724", "0.55496943", "0.55363405", "0.5527019", "0.5519308", "0.5462714", "0.54557467", "0.5439338", "0.5434088", "0.5427916", "0.5421549", "0.5390135", "0.5377061", "0.53705174...
0.58733237
3
To be called by child elements when element is changed
dispatchChange() { this.toggleAttribute("empty", !this.value); this.dispatchEvent(new CustomEvent("change", { bubbles: true })); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "elementUpdated() {\n this.model.trigger('el:change');\n }", "_propagateChange() {\n if (!this._isSelect) {\n // If original element is an input element\n this.element.value = this.value;\n } else {\n // If original element is a select element\n Array....
[ "0.72271496", "0.66496474", "0.64592105", "0.63976574", "0.6376943", "0.6353597", "0.63449645", "0.6331643", "0.6331643", "0.6276066", "0.6268988", "0.6268988", "0.62323403", "0.6179799", "0.6178653", "0.6173552", "0.61481196", "0.6136774", "0.6128706", "0.60934013", "0.60856...
0.5832051
47
TweenLite.delayedCall(1, introAnimation); add the loaded gis object (in geojson format) to the map
function addGeoObject() { // Show the loader at the beginning of this function $("#container").addClass("grayscaleAndLighten"); TweenLite.to($('#overlay'), .5, {autoAlpha: .75, delay: 0}); TweenLite.to($('#loader_gif'), 0, {autoAlpha: 1, delay: 0}); // calculate the max and min of all the prop...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawIcons() {\n map.data.addGeoJson(geoJSON);\n }", "function reloadData() {\r\n \r\n animiere();\r\n\r\n var vector = new ol.layer.Vector({\r\n source: new ol.source.GeoJSON({\r\n projection: 'EPSG:3857',\r\n url: '/data'\r\n }),\r\n ...
[ "0.65690565", "0.6530317", "0.6444224", "0.6350477", "0.63306624", "0.629555", "0.6253769", "0.62226444", "0.6184309", "0.6149573", "0.6103327", "0.60806334", "0.60798883", "0.6028154", "0.6022197", "0.59771156", "0.5975139", "0.5967398", "0.59673864", "0.595956", "0.5955142"...
0.5703684
48
creamos una nueva ventana
function crearVentana(){ var nuevaVentana=window.open(); var ventanaIES = window.open("http://www.iesgrancapitan.org/portal/", "IESGranCapitán", "width=800,height=600"); //Escribimos en el documento nuevaVentana.document.write("<!doctype html>") nuevaVentana.document.write('<html lang="es">'); nuevaVentana....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function nuevo_producto(){\t\t\n\t\tllama_formulario('NUEVA CIUDAD','nuevo');\t \n\t\tVentana_modal.show();\t\t\t\n\t}", "function nuevo(p,color,a,cap,cilin,num,zona,val,fecha,email,tel,direc){\r\n\r\n\tvar nuevo_vehiculo = {placa: p, color:color, Anyo:a,capacidad:cap,\r\n\tcilindraje:cilin,chasis:num,zona:zo...
[ "0.65660596", "0.63925487", "0.611816", "0.60763973", "0.60584366", "0.60436535", "0.6038257", "0.59892756", "0.59885764", "0.59414715", "0.5938069", "0.59099466", "0.5905298", "0.5879015", "0.58673596", "0.5866241", "0.58658063", "0.5863764", "0.58611846", "0.5860366", "0.58...
0.5697515
41
The function will take an unspecifiednumber of integer inputs and a reducer method Constraints: 1.The memozie function should be written from scratch. 2.3rd party libraries such as loaddash or underscore should not have been used. 3.The function should carry a name which should denote the functionality of it. 4.The fun...
function add(a, b) { return a + b }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function myReduceFunc() {\n \n\n\n}", "function reducer(){\n\n}", "function reducer(a,b) {\n return a + b;\n}", "function myReduce(arr, callFunction , accumulator = arr[0] ){\n\n\n\n // use let instead of var\n\n // if statement to check what we are doing\n\n\n // better way to inilize?\n // how to i...
[ "0.7266518", "0.704938", "0.7006103", "0.67300206", "0.64737284", "0.6380204", "0.63445914", "0.62775093", "0.61249614", "0.6109988", "0.6087364", "0.6057748", "0.5982097", "0.59797376", "0.5979732", "0.5976184", "0.5963337", "0.5957187", "0.59558517", "0.5953156", "0.5929765...
0.0
-1
Load image that is
onChangeImage(event) { const reader = new FileReader(); this.setState({ image: event.target.files[0] }, () => reader.readAsDataURL(this.state.image)); reader.onload = () => { this.setState({ imageSrc: reader.result }); }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadImage() {\n var baseUrl = 'https://source.unsplash.com/category';\n var category = 'nature';\n var size = '1920x1080';\n\n var source = baseUrl + '/' + category + '/' + size;\n\n buildElement(source)\n .then(render);\n }", "function loadImage(firstLoa...
[ "0.742362", "0.7381426", "0.72023726", "0.7200189", "0.71122193", "0.69964194", "0.6977286", "0.69534", "0.6929072", "0.68872535", "0.68828213", "0.687307", "0.68161577", "0.6814131", "0.6781857", "0.6761417", "0.6736317", "0.6722183", "0.66965127", "0.6674939", "0.66502863",...
0.0
-1
The validator for the next step
validate(step) { switch (step) { case 0: if (this.state.title.length > 2) { return true; } break; case 1: if (this.state.image) { return true; } break; default: return false; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function step1Validator() {\n // return a boolean\n }", "function next(){\n\tvalidate();\n}", "function next(){\n\tvalidate();\n}", "function next(){\n validate();\n}", "function next(){\n validate();\n}", "onNext() {\n\t\tconst validationRes = this.validate();\n\n\t\tif (validationRes ==...
[ "0.7404689", "0.73082024", "0.73082024", "0.71081674", "0.71081674", "0.68819207", "0.6850386", "0.66963494", "0.65889156", "0.6554403", "0.6425526", "0.641039", "0.6375375", "0.6321337", "0.6269146", "0.62627566", "0.6208845", "0.6204075", "0.6203969", "0.6194418", "0.614777...
0.56279945
64
action: scaleX, scaleY, moveX, moveY, rotate, mirrorX, flipV, mirrorY, flipH, skewX, skewY
function glyphMatrix(d,action,rate) { switch(action) { case 'scaleX': return svgpath(d).scale(parseFloat(rate),1).rel().round(3).toString(); case 'scaleY': return svgpath(d).scale(1,parseFloat(rate)).rel().round(3).toString(); case 'moveX': return svgpath(d).translate(parseFloat(rate),0).rel().round(3)....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function flip(obj){\n if(player.motion == motionType.LEFT && direction == motionType.RIGHT){\n obj.setAttribute(\"transform\", \"translate(\"+PLAYER_SIZE.w+\",0) scale(-1, 1)\");\n obj.setAttribute(\"transform\", \"scale(1, 1)\");\n direction = motionType.LEFT;\n }\n else if(player.mo...
[ "0.66463834", "0.64664096", "0.6328391", "0.6261898", "0.61560804", "0.6099379", "0.6048171", "0.6030013", "0.6019378", "0.6011222", "0.5981123", "0.59761316", "0.59621936", "0.59496444", "0.59386766", "0.5920508", "0.59107053", "0.5899686", "0.5892767", "0.58268976", "0.5803...
0.0
-1
Define a function that we want to run once for each feature in the features array. Give each feature a popup that describes the place and time of the earthquake.
function onEachFeature(feature, layer) { layer.bindPopup(`<h3>${feature.properties.place}</h3><p>Magnitude: ${(feature.properties.mag)}</p>`); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onEachFeature(feature, layer) {\n // Give each feature a popup describing the place and time of the earthquake\n layer.bindPopup(`<h3> ${feature.properties.place} </h3> <hr> <p> ${Date(feature.properties.time)} </p>`);\n }", "function onEachFeature(feature, layer) {\n // does this feat...
[ "0.7813414", "0.76292604", "0.7324306", "0.73141116", "0.72939235", "0.72894", "0.7288077", "0.7286736", "0.7285312", "0.7279523", "0.72676307", "0.7263318", "0.7263318", "0.7263318", "0.7259828", "0.72578317", "0.7250382", "0.72433054", "0.72295797", "0.7208496", "0.72075236...
0.67413664
50
RUN: ( ! %hermesc funsafeintrinsics dumplir Werror %s 2>&1 ) | %FileCheck %s matchfulllines REQUIRES: run_wasm
function wrongNumArgs(func) { return __uasm.add32(1, 2, 3); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkFile(filename) {\n // Load the script from the file, parse it to get an AST, then\n // stringify it again. The result should be a program that's identical\n // in behavior, except for line numbers.\n var program = read(filename);\n var after;\n try {\n ...
[ "0.52229536", "0.5052893", "0.49413615", "0.48997673", "0.4842652", "0.48334146", "0.481985", "0.47635695", "0.47401184", "0.47346097", "0.4729148", "0.46967888", "0.46912637", "0.46875823", "0.46762645", "0.46745676", "0.46730667", "0.46554798", "0.4625281", "0.4604734", "0....
0.429676
69
\ AUTOPOPULATE REVIEWS \ Create the function
function autoPopulate(next) { this.populate('reviews'); next(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getReviewFn() {\n let obj = {\n page : vm.reviewPage,\n limit : 10,\n userId: vm.userId\n };\n CommonCrudService\n .paginate(\"review\", obj)\n .then(\n (res) => {\n ...
[ "0.59126097", "0.5789946", "0.5789946", "0.5789946", "0.5729232", "0.5729232", "0.56427747", "0.56396794", "0.56396794", "0.56242275", "0.56242275", "0.56242275", "0.5592878", "0.5542024", "0.5533793", "0.55158156", "0.5461802", "0.54351455", "0.5432847", "0.54265034", "0.541...
0.0
-1
create studentList ( the list which combines all shown pupils either absent or excuse missing not search display, though
function createStudentList(jsonData) { //console.log(jsonData); //for IE 11 - other sultion needed array push not working studentList = []; for(x=0;x<jsonData.length;x++) { studentList.push(jsonData[x]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function apendlist(NoExpelledStuds) {\n document.querySelector(\".listhere\").innerHTML = \"\";\n NoExpelledStuds.forEach(e => {\n const template = document.querySelector(\".studentlist-template\").content;\n const clone = template.cloneNode(true);\n const sname = clone.querySelector(\".studentdetails\"...
[ "0.7282562", "0.7232946", "0.6760322", "0.67295885", "0.6566051", "0.6556105", "0.6532419", "0.65290153", "0.65148616", "0.64596176", "0.64253825", "0.64210206", "0.63896954", "0.6389661", "0.6374501", "0.6372499", "0.6366791", "0.63577324", "0.63519925", "0.6349673", "0.6348...
0.0
-1
create list of today's absentees old
function createAbsenteeList_old() { //delete list elements this.row = document.getElementById("row_blueprint"); this.pupil = document.getElementById("pupil_blueprint"); absentees = studentList.filter(data => data.type == "absent"); x=0; absentees.forEach(function(element) { modeIcon = null; iconEnabled = true; //chec...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function upcomingevent(){\n\tvar today = getRightNow();\n\tclearElements(\"upcoming\");\n\tfor(var i = 0; i < holiday.length;i++){\n\t\tif(today.getFullYear() == holiday[i].year && today.getMonth() + 1 == holiday[i].month && holiday[i].day-today.getDate() <=7 && holiday[i].day-today.getDate() > 0){\n\t\t\tvar para...
[ "0.59000933", "0.58787346", "0.58324915", "0.58104515", "0.5810047", "0.5761175", "0.57447416", "0.5691174", "0.56723535", "0.5646039", "0.56341445", "0.56316185", "0.56021434", "0.5580689", "0.55649817", "0.55346876", "0.55336624", "0.5468461", "0.545134", "0.54296607", "0.5...
0.0
-1
create absentee list admin view
function createAbsenteeList() { //delete list elements document.getElementById("absenteelist").innerHTML = ""; this.row = document.getElementById("row_blueprint"); rowcolor = "black-text"; x=0; absentees = studentList.filter(data => data.type == "absent"); //console.log(absentees); absentees.forEach(function(element) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createAbsenteeList() {\n//delete list elements\ndocument.getElementById(\"missingpupils\").innerHTML = \"\";\nvar noAbsentees = true;\nthis.row = document.getElementById(\"row_blueprint\");\nrowcolor = \"black-text\";\nx=0;\nstudentList.forEach(function(element) {\nmodeIcon = null;\niconEnabled = true;\t\...
[ "0.5683454", "0.5620457", "0.54198146", "0.537889", "0.5321407", "0.5306082", "0.52583843", "0.5230839", "0.5224998", "0.5201055", "0.5197348", "0.5179616", "0.5158819", "0.5150672", "0.51254374", "0.5112143", "0.5099149", "0.5095689", "0.50927323", "0.5087564", "0.5076156", ...
0.51991385
10
create leave of absence list admin view
function createLoaList() { //delete list elements document.getElementById("loalist").innerHTML = ""; this.row = document.getElementById("row_blueprint"); rowcolor = "black-text"; x=0; loas = studentList.filter(data => data.beurlaubt == 1); if (loas.length == 0) { document.getElementById('loalist').innerHTML = "keine ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAllLeaves(){\r\n\t\t $(noLeavesDiv_id).hide();\r\n\t\t $(selectMonthDivision_id).hide();\r\n\t\t var url=applicationName + viewAllLeavesRequest;\r\n\t\t makeAjaxCallForEmployeeLeaveDetails(url);\r\n\t\t setHeadingAndMarquee(allLeavesHeading_msg,allLeavesMarquee_msg);\r\n\t\t \r\n\t }", ...
[ "0.56659335", "0.5462456", "0.5445343", "0.54271114", "0.5413774", "0.52665895", "0.5208103", "0.5179034", "0.5172061", "0.5120429", "0.5120429", "0.51190084", "0.5111443", "0.51107883", "0.51100814", "0.50881547", "0.5070835", "0.5025956", "0.5014616", "0.4994114", "0.497625...
0.47442895
45
prepare file as basis for PDF creation
function printAbsence() { xhttp.open("POST", "?type=printabsence", true); xhttp.send(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function RenderPdf() {\n console.log(\"Writing file....\");\n conversion({\n html: dataContent,\n pdf: {\n pageSize: 'Letter',\n printBackground: true\n }\n }, (error, result) => {\n if(error) {\n \n throw error;\n }\n re...
[ "0.617201", "0.6092377", "0.60660225", "0.6034437", "0.5916895", "0.59069103", "0.58990663", "0.5847639", "0.580216", "0.5782144", "0.5748264", "0.56613505", "0.56605256", "0.5641115", "0.5638772", "0.5631603", "0.5616723", "0.56011146", "0.56002194", "0.556616", "0.5561672",...
0.0
-1
create list of missing excuses // NOT READY needs seperate blueprint!
function createMissingExcuseList() { //delete list elements this.row = document.getElementById("row_blueprint"); this.pupil = document.getElementById("pupil_blueprint"); missingExcuses = studentList.filter(data => data.type == "missingExcuse"); x=0; missingExcuses.forEach(function(element) { modeIcon = null; //check fo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fieldsListPending() { throw \"baby\" }", "function makeExciting(list) {\n let output = [];\n for (let i = 0, l = list.length; i < l; i += 1) {\n let exciting = list[i] + '!';\n output.push(exciting);\n }\n return output;\n}", "function onGetListFail() {\n\n createlist();\n}", "function ...
[ "0.5472562", "0.5346776", "0.5309283", "0.5232234", "0.5225022", "0.5114221", "0.5034275", "0.5020568", "0.50203687", "0.5010919", "0.49735367", "0.49410692", "0.49338302", "0.49217114", "0.48891687", "0.48525846", "0.48256043", "0.48110414", "0.48003125", "0.47921255", "0.47...
0.52251244
4
show list of matches after search
function createResultList(dta){ x = 0; content = ""; dta.forEach(function(element) { content += '<div id="p'+element['id']+'" > '; if (null != leaveOfAbsence) { content += '<a href="#" onClick="leaveOfAbsenceNotice('+element['id']+')" class="navigation waves-effect waves-light teal-text">'; } else { cont...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayMatches() {\n hide(textDiv);\n show(matchesList);\n matchesList.textContent = '';\n const filteredMatches = getFilteredMatches();\n if (filteredMatches.length > 0) {\n //\n // const exactPhrase = new RegExp(`\\b${query}\\b`, 'i');\n // keep exact matches only\n // matches = matches...
[ "0.80241376", "0.76221126", "0.745201", "0.7241033", "0.7198978", "0.71174765", "0.71072125", "0.70373803", "0.6993363", "0.6974964", "0.68126416", "0.6775381", "0.6736351", "0.6718543", "0.66014177", "0.65817904", "0.6534224", "0.6495364", "0.64817107", "0.64401567", "0.6435...
0.0
-1
trigger showing of the modal Window to mark absence
function absentNotice(elementNr) { activeElement = elementNr; $('#markabsent').modal(); $('#markabsent').modal('open'); $('#absenceName').html('<h4>' + searchList.find(result => result.id == activeElement )['name'] + ', ' + searchList.find(result => result.id == activeElement )['vorname'] + '</h4>'); //get absences one...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function show() {\n $$invalidate('modalIsVisible', modalIsVisible = true);\n }", "function modalShown(o){\n\t\t/*\n\t\tif(o.template){\n\t\t\t//show spinner dialogue\n\t\t\t//render o.template into o.target here\n\t\t}\n\t\t*/\n\t\tsaveTabindex();\n\t\ttdc.Grd.Modal.isVisible=true;\n\t}", "function att...
[ "0.76295227", "0.7526949", "0.7502556", "0.72328115", "0.722926", "0.7107433", "0.70049", "0.69174856", "0.68751055", "0.686915", "0.683838", "0.6819303", "0.67852205", "0.6728556", "0.6720786", "0.67173606", "0.6693314", "0.66931045", "0.66794753", "0.6667353", "0.66636235",...
0.6554929
29
trigger showing of the modal Window to enter a leaveOfAbsence
function leaveOfAbsenceNotice(elementNr) { activeElement = elementNr; $('#leaveofabsence').modal(); $('#leaveofabsence').modal('open'); $('#loaName').html('<h4>' + searchList.find(result => result.id == activeElement )['name'] + ', ' + searchList.find(result => result.id == activeElement )['vorname'] + '</h4>'); initDa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "toggleModalLeaveAMessage(){\n this.showModalLeaveMsg = !this.showModalLeaveMsg;\n }", "function winMessage() {\n \tMODAL.style.display = 'block';\n }", "function openAlertleaveLSWithChanges() {\n\tvar dialogChanges = {\n\t\ttype: \"confirmation\",\n\t\tcancelText: \"ABANDON CHANGES\",...
[ "0.66016215", "0.6586916", "0.65654343", "0.6543406", "0.64898425", "0.64371836", "0.63617855", "0.6323964", "0.631106", "0.6264913", "0.62506676", "0.6150341", "0.6123066", "0.6117197", "0.61050355", "0.6101215", "0.6090847", "0.60830164", "0.60815895", "0.6081449", "0.60758...
0.6789786
0
trigger showing of the modal Window to enter excuse reception
function excuseNotice(elementNr) { activeElement = elementNr; activeDataSet = studentList.find( arr => arr.absenceId == activeElement ); this.id = elementNr; $('#markexcuse').modal(); $('#markexcuse').modal('open'); $('#excuseName').html('<h4>' + activeDataSet['name'] + ' (' + activeDataSet['klasse'] +')</h4>'); $('#...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showEventWindow() {\r\n\r\n\t// check input\r\n\t// $('#modal-body').html(getEventStatus('buildEvent'));\r\n\t// $('#showModal').modal();\r\n\t// TODO show window\r\n\talert('Diese Funktion steht in der Demo leider nicht zur Verfügung.');\r\n}", "function modalShown(o){\n\t\t/*\n\t\tif(o.template){\n\t\...
[ "0.7056342", "0.68967664", "0.6705027", "0.6700397", "0.66328484", "0.66140705", "0.659486", "0.6561509", "0.65585494", "0.6548087", "0.653149", "0.6525151", "0.65027016", "0.64580506", "0.6424129", "0.6419278", "0.6404025", "0.6402384", "0.6392231", "0.63887066", "0.63747495...
0.0
-1
sending the data of a noted absence
function saveAbsence(id){ activeElementDiv = 'p' + activeElement; sickend = formatDateDash(document.getElementById("sickend").value); sickstart = formatDateDash(document.getElementById("sickstart").value); comment = document.getElementById("comment").value; type = document.querySelector('input[name="via"]:checked').val...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sendData(type, data) {\n\n var dest = {\n targetRoom: room\n };\n\n //sends data to server\n easyrtc.sendDataWS(dest, type, JSON.stringify(data));\n\n\n}", "_sendData() {\n\n }", "function sendData(status){\n if(teacherId != null){\n // Send the selected status to teacher\n ...
[ "0.60600966", "0.6054216", "0.589646", "0.58912987", "0.5837285", "0.5831645", "0.57708484", "0.576389", "0.5741274", "0.57259625", "0.5712423", "0.5710349", "0.57011557", "0.56998944", "0.568433", "0.5666025", "0.56065756", "0.5599273", "0.5595921", "0.5595921", "0.5595921",...
0.5507382
34
sending the data of a noted absence
function saveloa(){ activeElementDiv = 'p' + activeElement; sickend = formatDateDash(document.getElementById("loaend").value); sickstart = formatDateDash(document.getElementById("loastart").value); comment = document.getElementById("loacomment").value; //console.log("send to ?type=leaveofabsence&console&id="+activeElem...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sendData(type, data) {\n\n var dest = {\n targetRoom: room\n };\n\n //sends data to server\n easyrtc.sendDataWS(dest, type, JSON.stringify(data));\n\n\n}", "_sendData() {\n\n }", "function sendData(status){\n if(teacherId != null){\n // Send the selected status to teacher\n ...
[ "0.6058503", "0.6051906", "0.5895512", "0.588962", "0.5835198", "0.58298105", "0.5769606", "0.57640123", "0.57399464", "0.5724459", "0.57104725", "0.5708467", "0.5699416", "0.5698351", "0.5682771", "0.5663914", "0.5603864", "0.5596556", "0.55940354", "0.55940354", "0.55940354...
0.0
-1
sending data of noted excuse
function saveAbsenceExcuse() { activeDataSet = studentList.find( arr => arr.absenceId == activeElement ); excusein = document.getElementById("excusein").value; comment = document.getElementById("excusecomment").value; date = excusein.split('.'); excuseindate = date[2] + '-' + date[1] + '-' +date [0]; //console.log("...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_sendData() {\n\n }", "_actionDrive(data) { this.socket.emit('/action', `d ${data.posture.charAt(0)} ${data.x} ${data.y}`) }", "send() {}", "send() {}", "send() {}", "send() {}", "send() {}", "send() {}", "function errorHand(data) {\n console.log(data.toString());\n this.emit('end');\n}", "s...
[ "0.60498714", "0.5942955", "0.5867492", "0.5867492", "0.5867492", "0.5867492", "0.5867492", "0.5867492", "0.5809291", "0.574477", "0.5744357", "0.57295614", "0.5725868", "0.570816", "0.5704832", "0.56606233", "0.5644955", "0.56345063", "0.55928254", "0.55598575", "0.555155", ...
0.5300128
45
create the absence details view
function showAbsenceDetails_old() { content = "Abwesenheit"; activeDataSet = studentList.find(dataset => dataset.absenceId == activeElement); if (activeDataSet['ende'] != activeDataSet['beginn']) { content += " vom <b>" + formatDateDot(activeDataSet['beginn']) + "</b> bis <b>" +formatDateDot(activeDataSet['ende']); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function OrganizationAlipayDetailView() {\n BaseView.apply(this, arguments);\n }", "function showAbsenceDetails(nr) {\nif (nr != undefined) {\nelementToCheck = nr;\t\n} else {\nelementToCheck = activeElement;\n}\ncontent = \"Abwesenheit\";\nactiveDataSet = studentList.find(dataset => dataset.absenceId ...
[ "0.59359914", "0.5924286", "0.58638656", "0.5744638", "0.57061684", "0.5637783", "0.56281346", "0.5614791", "0.5565454", "0.5558134", "0.55324656", "0.55074877", "0.5490047", "0.5442973", "0.5438913", "0.5417481", "0.5415186", "0.53826326", "0.5371179", "0.536145", "0.5360557...
0.5621322
7
create the absence details view
function showAbsenceDetails(nr) { if (nr != undefined) { elementToCheck = nr; } else { elementToCheck = activeElement; } content = "Abwesenheit"; activeDataSet = studentList.find(dataset => dataset.absenceId == elementToCheck); if (activeDataSet['ende'] != activeDataSet['beginn']) { content += " vom <b>" + formatDate...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function OrganizationAlipayDetailView() {\n BaseView.apply(this, arguments);\n }", "function showAbsenceDetails(nr) {\nif (nr != undefined) {\nelementToCheck = nr;\t\n} else {\nelementToCheck = activeElement;\n}\ncontent = \"Abwesenheit\";\nactiveDataSet = studentList.find(dataset => dataset.absenceId ...
[ "0.59359914", "0.58638656", "0.5744638", "0.57061684", "0.5637783", "0.56281346", "0.5621322", "0.5614791", "0.5565454", "0.5558134", "0.55324656", "0.55074877", "0.5490047", "0.5442973", "0.5438913", "0.5417481", "0.5415186", "0.53826326", "0.5371179", "0.536145", "0.5360557...
0.5924286
1
turn date format into dd.mm.yyyy
function formatDateDot(datum) { timepart = datum.split(" "); if (timepart.length == 1 ){ dateparts = datum.split('-'); newDate = dateparts[2] + '.' + dateparts[1] + '.' + dateparts[0]; } else { dateparts = timepart[0].split('-'); newDate = dateparts[2] + '.' + dateparts[1] + '.' + dateparts[0] + ' um '+ timepa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function formatDateDot(datum) {\n\ttimepart = datum.split(\" \");\n\t\n\tif (timepart.length == 1 ){\n\tdateparts = datum.split('-');\n\tnewDate = dateparts[2] + '.' + dateparts[1] + '.' + dateparts[0];\n\t} else {\n\tdateparts = timepart[0].split('-');\n\tnewDate = dateparts[2] + '.' + dateparts[1] + '.' + datepa...
[ "0.7281058", "0.72049445", "0.71316254", "0.71282035", "0.7127847", "0.71116257", "0.7092071", "0.70816064", "0.7056", "0.7045013", "0.6983978", "0.6926782", "0.6921262", "0.6904445", "0.68972695", "0.6895772", "0.6868823", "0.6861794", "0.68528485", "0.681184", "0.68042433",...
0.732785
0
turn date format into dd.mm.yyyy
function formatDateDash(datum) { dateparts = datum.split('.'); newDate = dateparts[2] + '-' + dateparts[1] + '-' + dateparts[0]; return newDate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function formatDateDot(datum) {\n\ttimepart = datum.split(\" \");\n\t\n\tif (timepart.length == 1 ){\n\tdateparts = datum.split('-');\n\tnewDate = dateparts[2] + '.' + dateparts[1] + '.' + dateparts[0];\n\t} else {\n\tdateparts = timepart[0].split('-');\n\tnewDate = dateparts[2] + '.' + dateparts[1] + '.' + datepa...
[ "0.7327936", "0.72813034", "0.72053754", "0.7131591", "0.71289104", "0.7127592", "0.71113735", "0.7092143", "0.70811695", "0.7055433", "0.70454985", "0.69828117", "0.69266266", "0.6920825", "0.6902987", "0.6896179", "0.6895376", "0.6866345", "0.6861831", "0.68523586", "0.6811...
0.0
-1
const NAME_URL = '
function App() { const [names, setNames] = useState([]); const [isLoading, setIsLoading] = useState(false); async function getAllObjects(url, apiObjects = []) { // recursuve call to fetch page after page if (url === null) { return apiObjects; } // customize timeout to prevent eventual timeout on re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static name(url) {\n return url.toString().replace(/.*\\//,\"\")\n }", "getUrl(name) { return \"\"; }", "function makeURI(name, type){\n\tif (name.indexOf(\"http://\") != 0){\n\t\tvar fragment = name.replace(/\\s+/g, '_'); // replace whitespaces\n\t\tname = \"http://hxl.carsten.io/\"+type.toLowerCase()+\"/...
[ "0.7551054", "0.7458562", "0.6404033", "0.6334057", "0.6287305", "0.6172555", "0.6165675", "0.6137288", "0.6121984", "0.61094856", "0.6083474", "0.6075341", "0.5989484", "0.5980677", "0.59702134", "0.5912314", "0.5909531", "0.58591104", "0.5842741", "0.58358765", "0.58257544"...
0.0
-1
This class is heavily inspired by reactsearchfield from
function _null_function() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "searchByText(event) {\n this.state[event.target.query] = event.target.value;\n //this.props.SearchItems(this.state);\n }", "function SearchLight(props) { return <SearchInput initText={ props.initText } appTheme={ props.appTheme } onSubmit={ props.onSubmit } onDismiss={ props.onDismiss }/> }", "render(){...
[ "0.70880306", "0.6870387", "0.68015265", "0.66993237", "0.6635543", "0.6613102", "0.6579553", "0.6550412", "0.6548872", "0.65285563", "0.6522342", "0.6511518", "0.65036476", "0.64887613", "0.6434952", "0.6424806", "0.64232254", "0.64230794", "0.6418285", "0.64169204", "0.6411...
0.0
-1
webpackBootstrap install a JSONP callback for chunk loading
function webpackJsonpCallback(data) { /******/var chunkIds = data[0]; /******/var moreModules = data[1]; /******/var executeModules = data[2]; /******/ /******/ // add "moreModules" to the modules object, /******/ // then flag all "chunkIds" as loaded and fire callback /******/var moduleId,c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function webpackJsonpCallback(data) {\n/******/ \t\tvar chunkIds = data[0];\n/******/ \t\tvar moreModules = data[1];\n/******/\n/******/ \t\tvar prefetchChunks = data[3] || [];\n/******/ \t\t// add \"moreModules\" to the modules object,\n/******/ \t\t// then flag all \"chunkIds\" as loaded and fire callback\n/****...
[ "0.77751905", "0.7584979", "0.7549618", "0.7549618", "0.7549618", "0.7549618", "0.7549618", "0.7549618", "0.7549618", "0.7549618", "0.7549618", "0.7549618", "0.7549618", "0.7549618", "0.7549618", "0.7549618", "0.7549618", "0.7549618", "0.7537969", "0.7537969", "0.7522708", ...
0.0
-1
start the video stream
async function start() { console.log('Requesting local stream'); startButton.disabled = true; stopButton.disabled = false; try { const stream = await navigator.mediaDevices.getUserMedia({audio: true, video: true}); weblog('Received local stream'); localVideo.srcObject = stream; localStream = str...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startVideo() {\n console.log(\"Inside Start Video\");\n stream.getVideoTracks()[0].enabled = true;\n }", "function startStream() {\r\n\r\n if (navigator.platform == \"iPhone\" || navigator.platform == \"Linux armv8l\") {\r\n vid = createCapture(VIDEO, constraints)\r\n } else {\r\n\r\n ...
[ "0.77191436", "0.7685005", "0.76112413", "0.7500586", "0.74309766", "0.74048245", "0.7360212", "0.7287837", "0.7223786", "0.71894073", "0.71268123", "0.7063134", "0.7052509", "0.70198613", "0.70173264", "0.6992777", "0.6968388", "0.6959293", "0.6907463", "0.6851781", "0.68357...
0.72386044
8
call the remote peer
async function call() { callButton.disabled = true; hangupButton.disabled = false; weblog('Starting call'); startTime = window.performance.now(); const videoTracks = localStream.getVideoTracks(); const audioTracks = localStream.getAudioTracks(); if (videoTracks.length > 0) { weblog(`Us...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function doCall() {\n\tconsole.log('Sending offer to peer');\n\tpc.createOffer(setLocalAndSendMessage, handleCreateOfferError);\n}", "function call() {\n\t// just disable the Call button on the page...\n\tcallButton.disabled = true;\n\n\t// ...and enable the Hangup button\n\thangupButton.disabled = false;\n\tlog...
[ "0.6515111", "0.6378515", "0.6143641", "0.61375105", "0.612429", "0.5991394", "0.59774846", "0.59486544", "0.5939386", "0.58397603", "0.56498903", "0.56371665", "0.55995667", "0.5568835", "0.5530788", "0.55123925", "0.55123925", "0.5489718", "0.5466836", "0.5448729", "0.54371...
0.5883157
9
metodos de funciones controladoras
async findTopRated() { let res = await axios.get( "https://api.themoviedb.org/3/movie/top_rated?api_key=210d6a5dd3f16419ce349c9f1b200d6d&language=en-US&page=1" ); return res.data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function miFuncion(){}", "function miFuncion(){}", "function miFuncion(){}", "function Go_Funciones()\n {\n if( g_listar == 1 )\n {\n Get_Marca_Producto();\n }\n \n }", "function iniciar() {\n \n }", "function miFuncion (){}", "function funci...
[ "0.6839948", "0.6839948", "0.6839948", "0.6791712", "0.6770618", "0.6682627", "0.66318595", "0.6627067", "0.6607427", "0.6558298", "0.64666325", "0.63887566", "0.6381741", "0.6376605", "0.63018435", "0.63018435", "0.6171254", "0.614608", "0.6141935", "0.61343396", "0.6080902"...
0.0
-1
Cancel or submit form in dialog
function cancel(form) { $mdDialog.cancel(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "cancelForm() {\n this.sendAction(\"onCancel\", null);\n }", "function cancel(event) {\n let dialog = document.getElementById(\"dialog\");\n document.getElementById(\"title\").value = \"\";\n document.getElementById(\"post\").value = \"\";\n document.getElementById(\"submit-btn\").innerHTML = \"Submit\";\...
[ "0.78259325", "0.77510804", "0.73259157", "0.72398907", "0.71989244", "0.7170867", "0.7148726", "0.71430695", "0.70988405", "0.70659035", "0.6996204", "0.69817567", "0.6961648", "0.6950829", "0.6949851", "0.69447416", "0.6887469", "0.68532526", "0.68532526", "0.68402696", "0....
0.7337152
2
handle the scrolling to update the 3d background
function controlscene(){ const t=document.body.getBoundingClientRect().top*0.0012; camera.position.x = 150* Math.cos(t); camera.position.z = 150* Math.sin(t); camera.position.y = t*140+600; //camera.target.position.copy( gltf.scene ) var position = new THREE.Vector3(0,25,0); camera.lookAt( position ); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update(){var pos=jQuerywindow.scrollTop();jQuerythis.each(function(){var jQueryelement=jQuery(this);var top=jQueryelement.offset().top;var height=getHeight(jQueryelement);// Check if totally above or totally below viewport\nif(top+height<pos||top>pos+windowHeight){return;}jQuerythis.css('backgroundPositio...
[ "0.7069894", "0.6945471", "0.6945471", "0.6916968", "0.6916968", "0.6916968", "0.6916968", "0.6916968", "0.6916968", "0.6916968", "0.6916968", "0.6916968", "0.69052064", "0.6902641", "0.68878573", "0.6852516", "0.6852516", "0.67867506", "0.6735706", "0.67286247", "0.6624496",...
0.0
-1
the cinema box office standing in a huge line. Each of them has a single 100, 50 or 25 dollars bill. A "Avengers" ticket costs 25 dollars. Vasya is currently working as a clerk. He wants to sell a ticket to every single person in this line. Can Vasya sell a ticket to each person and give the change if he initially has ...
function tickets(peopleInLine) { console.log(peopleInLine) if (peopleInLine[0] !== 25) return 'NO' if (peopleInLine[1] > peopleInLine[0]) return 'NO' let register = peopleInLine[0]; for (let i = 1; i < peopleInLine.length; i += 1) { if (register < peopleInLine[i]) return 'NO' register += peopleInLine[...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tickets(peopleInLine) {\n var cashRegister = 0;\n var ticketPrice = 25;\n for (var i=0; i<peopleInLine.length; i++) {\n var isChangeNeeded = peopleInLine[i] - ticketPrice > 0;\n var changeToGive = peopleInLine[i] - ticketPrice;\n cashRegister = cashRegister + ticketPrice;\n if (isChangeNeed...
[ "0.7792732", "0.74589264", "0.7147711", "0.6982062", "0.69577503", "0.6926794", "0.69129485", "0.6869244", "0.67736423", "0.67253786", "0.6478453", "0.6404239", "0.6365439", "0.58578926", "0.58442724", "0.57122517", "0.5611156", "0.5610666", "0.55886775", "0.5547551", "0.5545...
0.6168144
13
Creates the event listeners for the `Settings` page buttons and options
function eventListeners() { document .getElementById("settings-view-radio0") .addEventListener("click", () => { chrome.runtime.sendMessage({ ENABLED: true, DOMAINLIST_ENABLED: false }); chrome.storage.local.set({ ENABLED: true, DOMAINLIST_ENABLED: false }); }); document .getElementById("...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setupPage() {\n clearAlerts();\n loadOptions();\n document.getElementById('save').addEventListener('click', saveOptions);\n document.getElementById('defaults').addEventListener('click', saveDefaultOptions);\n}", "function bindUIactions() {\n $('body').on('click', '.project-overview__s...
[ "0.7072055", "0.70508146", "0.69738644", "0.6792405", "0.6709781", "0.6672395", "0.6618066", "0.65861166", "0.6539561", "0.6472213", "0.64612156", "0.6367638", "0.6341731", "0.62961656", "0.62735265", "0.6236144", "0.6222108", "0.6193608", "0.6188986", "0.61851937", "0.618519...
0.66011655
7
Gives user a walkthrough of install page on first install
function walkthrough() { let modal = UIkit.modal("#welcome-modal"); modal.show(); document.getElementById("modal-button-1").onclick = function () { modal.hide(); } document.getElementById("modal-button-2").onclick = function () { modal.hide(); tippy(".tutorial-tooltip1", { content: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onInstall() {\n onOpen();\n}", "function onInstall() {\n onOpen();\n}", "function onInstall() {\n onOpen();\n}", "function onInstall() {\n onOpen();\n}", "function onInstall(e) {\n onOpen(e);\n}", "function onInstall(e) {\n onOpen(e);\n}", "function onInstall(e) {\n onOpen(e);\n}", ...
[ "0.6392026", "0.6392026", "0.6392026", "0.6347399", "0.6293353", "0.6293353", "0.6293353", "0.6293353", "0.62739456", "0.6245785", "0.6245785", "0.6245785", "0.6245785", "0.6242862", "0.6196166", "0.6196166", "0.6143457", "0.609082", "0.5985253", "0.59200144", "0.58682555", ...
0.0
-1
This is a row in a container onSubmit goes in the form not button
render() { return ( <div className="card mx-3 my-3 my-login"> <form className="d-flex flex-row justify-content-between"> <input type="text" className="mx-3 my-3 flex-grow-1" > </input> <button type="submit" className="btn b...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function moveSubmitButton() {\n const submitDiv = w.document.querySelectorAll(\"#submitDiv, #submitDiv + .text-center\");\n\n if (screen.availWidth > 768) {\n let newSubmitDiv = w.document.createElement(\"div\");\n const classificationRow = w.document.querySelector(\".classifica...
[ "0.65555173", "0.64800227", "0.6451061", "0.63583386", "0.63568115", "0.63207304", "0.63151824", "0.631491", "0.62939435", "0.62807", "0.62141347", "0.62040174", "0.6185202", "0.6141895", "0.6139194", "0.61168975", "0.6111682", "0.61115074", "0.6087336", "0.6086737", "0.60867...
0.0
-1
issuing a JSON webtoken below iat (issued at) use basic js date method to get time with timestamp variable to pass in as the vaule for iat prop sub (subject) makes user.id a principle this way if the user changes their email down the road they still get stored info becasue we issue the token at the creation based on us...
function createUserToken(user){ var timestamp = new Date().getTime(); return jwt.encode({sub: user.id, iat: timestamp}, config.secret) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "tokenForUser(user) {\n const timeStamp = new Date().getTime();\n return jwt.encode({ sub: user.id, iat: timeStamp }, config.secret);\n }", "function tokenForUser(user) {\n\tconsole.log('tokenForUser fired');\n\tconsole.log('user id in tokenForUser is : ',user.id);\n\tvar timestamp = new Date().getTime();\...
[ "0.75303864", "0.7379177", "0.73547715", "0.73180324", "0.724386", "0.72345597", "0.718492", "0.71556646", "0.71333754", "0.7105262", "0.7060361", "0.7060258", "0.70555377", "0.7042429", "0.70371324", "0.69845814", "0.69779575", "0.69736856", "0.6962817", "0.6822389", "0.6821...
0.7181802
7
Function: Create a list of Cost Groups
function getCostElemetList () { CostElemetsList=GetSettingCostElements(); CostElementDetailList=getCostElementDetailList(); for(var i=0;i<CostElemetsList.length;i++) { //Ti.API.info('Cost Group : '+CostElemetsList[i].Name); var headerRow=createHeaderRow(i); scrollView.add(headerRow); for(var j=0;j<CostE...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeGroups() {\n\tvar x = 400, y = 0\n\tfor (var i = 0, len = genres.length; i < len; i++) {\n\t\tcategoriesXY[genres[i]] = [ y , x ]\n\t\ty += 125\n\t\tif( i + 1 == Math.ceil(len/2) ) {\n\t\t\ty = 0\n\t\t\tx += 400\n\t\t}\n\t}\n}", "function group_comms() {\n // Create an array of all committees\n ...
[ "0.6156888", "0.6128186", "0.57380414", "0.5689483", "0.5625696", "0.5619478", "0.5585026", "0.5554646", "0.5541658", "0.55333894", "0.55276877", "0.5513432", "0.54673755", "0.53839576", "0.53777796", "0.53641224", "0.5357942", "0.5337896", "0.5317156", "0.5313386", "0.528257...
0.55829054
7
FUNCTIONS DECLARATIONS //////////////// signup function
function sUp() { var email = document.getElementById('email').value var password = document.getElementById('password').value firebase .auth() .createUserWithEmailAndPassword(email, password) .then(() => { $('#msg').html('You account was created. Please Sign In') }) .catch(function (error...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function signup(username, password) {\n // TODO: create new user\n}", "function signup() {\n // do something\n}", "function signup({ email, password, city, dateOfBirth, username }) {\n // create new user\n}", "function signUp(){\r\n var email = document.getElementById(\"email\");\r\n var password = do...
[ "0.79481065", "0.78922117", "0.77009654", "0.7700476", "0.7698942", "0.7698942", "0.7681171", "0.7555134", "0.75367475", "0.7505928", "0.7505278", "0.74914336", "0.74375236", "0.743229", "0.7403971", "0.73799026", "0.7313209", "0.72915995", "0.728893", "0.7288122", "0.7282637...
0.0
-1
get details from user
function getDetails() { var user = firebase.auth().currentUser if (user) { // User is signed in. if (user != null) { name = user.displayName email = user.email photoUrl = user.photoURL emailVerified = user.emailVerified uid = user.uid // The user's ID, unique to the Fireb...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getUserDetails() {\n return this.api.send('GET', 'user');\n }", "async getInfo() {\n let userResult = await this.request(\"user\");\n return userResult.user;\n }", "function getUser () {return user;}", "async retriveUserDetails(req, res, next) {\n try {\n let userId = r...
[ "0.78158313", "0.7609916", "0.7355104", "0.7314534", "0.72932684", "0.72031003", "0.72008616", "0.71668786", "0.71534324", "0.71141064", "0.7078193", "0.7072098", "0.70703423", "0.7035769", "0.70316553", "0.7028665", "0.7006503", "0.6990545", "0.6971277", "0.6956421", "0.6955...
0.73193276
3
Constructs a new CustomProfileField. Dictionary containing the details of a custom profile field configured for this organization.
constructor() { CustomProfileField.initialize(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Profile() {\r\n\tthis.fields = [\r\n\t\t\"LOGIN\", \"EMAIL\", \"NAME\", \"GENDER\", \"BIRTHDAY\", \"CITY\", \r\n \"ICQ\", \"URL\", \"PHOTO\", \"AVATAR\", \"ABOUT\", \"REGISTERED\", \"LAST_VISIT\",\r\n \"TELEGRAM_ID\"\r\n\t];\r\n\tthis.ServicePath = servicesPath + \"profile.service.php\";\r\n\tthis.T...
[ "0.5483721", "0.5372735", "0.523452", "0.5167814", "0.5102171", "0.5074683", "0.5057529", "0.50170827", "0.4994771", "0.49426877", "0.4914141", "0.4911571", "0.48564893", "0.47721606", "0.47704756", "0.47363147", "0.4724693", "0.4714299", "0.4687879", "0.4685539", "0.46854347...
0.68888867
0
Initializes the fields of this object. This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mixins). Only for internal use.
static initialize(obj) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor() {\n super();\n this._init();\n }", "init() {\n this._super(...arguments);\n this._applyDefaults();\n }", "_init() {\n\t\tthis.life.init();\n\t\tthis.render.init();\n\n\t\tthis.emission.init();\n\t\tthis.trail.init(this.node);\n\n\t\tthis.color.init();\n\t}", "function Co...
[ "0.7132527", "0.69649905", "0.68144095", "0.67468536", "0.67168033", "0.6644054", "0.6634022", "0.66023695", "0.6581312", "0.6565271", "0.6411091", "0.64048046", "0.6335285", "0.63051367", "0.6296763", "0.62831414", "0.62693095", "0.62406176", "0.6240038", "0.62344605", "0.62...
0.0
-1
end function onload() / Define a function to advance the model by swapping in each tree's next state for the current state
function Advance() { // Loop over all tree columns, excluding the borders for (var x = 1; x < TREE_COUNT_X - 1; x++) { // Loop over all tree rows, excluding the borders for (var y = 1; y < TREE_COUNT_Y - 1; y++) { // Create a variable to store the current tree var tree = document.getElementBy...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Step() {\n\n // Set the states of trees in the next time step\n SetNextStates();\n\n // Advance the model by swapping in each tree's next state for the current\n // state\n Advance();\n\n} // end function Step()", "function ResetTrees() {\n\n // Loop over the trees in the x direction\n for (var x...
[ "0.7670579", "0.6211811", "0.6122842", "0.609903", "0.6083098", "0.60582125", "0.6033796", "0.59991217", "0.5877309", "0.58573914", "0.5802396", "0.5671646", "0.5654265", "0.56533706", "0.5570352", "0.5569441", "0.556006", "0.5553336", "0.5541308", "0.55366945", "0.5515063", ...
0.6303814
1
Define a function that returns whether the burn chance happens
function BurnChanceHappens() { return RandIntInRange(0, 100) < BURN_CHANCE; } // end function BurnChanceHappens()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCollectible() {\n var chance = Math.random();\n if (chance < 0.4) {\n return true;\n }\n return false;\n}", "function weightedBoolean(chance = 0.5) {\n return Math.random() >= 1 - chance;\n}", "bonusAttack(bonusDamage){\r\n let chance = Math.floor(Math.random() * 3);\r\...
[ "0.7217565", "0.70209086", "0.6730733", "0.65195495", "0.6499506", "0.6490974", "0.64522064", "0.6367329", "0.6324505", "0.62728465", "0.62187934", "0.62149096", "0.6213458", "0.61949325", "0.6167019", "0.61286885", "0.61233383", "0.61186075", "0.61034197", "0.60884756", "0.6...
0.7688197
0
Define a function to create the tree DOM div objects
function CreateTrees() { var treeArea = document.getElementById("tree-area"); // Loop over all tree rows, excluding the borders for (var y = 0; y < TREE_COUNT_Y; y++) { // Create a DOM div object for the row var row = document.createElement("div"); treeArea.appendChild(row); // Loop over all t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DIV(){\n this.createDiv=function(id){\n this.item=document.createElement('div');\n this.item.setAttribute('id', id);\n }\n this.addtodiv=function(id){\n document.getElementById(id).appendChild(this.item);\n }\n this.addtoDocument =function(){\n document.body.appe...
[ "0.67622095", "0.6735506", "0.6674954", "0.66646606", "0.66206187", "0.65933573", "0.6543652", "0.6526747", "0.64724106", "0.6465419", "0.6431741", "0.64196265", "0.6412327", "0.6412327", "0.63807184", "0.63135964", "0.63135964", "0.6311219", "0.627747", "0.6250117", "0.62431...
0.0
-1
end function CreateTrees() / Define a function that returns whether a tree is in the bottom border row of the forest
function IsInBottomBorderRow(tree) { return +tree.getAttribute("data-y") === TREE_COUNT_Y - 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function IsOnBorder(tree) {\n\n return IsInLeftBorderColumn(tree) ||\n IsInTopBorderRow(tree) ||\n IsInRightBorderColumn(tree) ||\n IsInBottomBorderRow(tree);\n\n} // end function IsOnBorder(tree)", "function drawTree() {\n noStroke();\n fill(TRUNK_COLOR);\n rect(xTrunkCorner, y...
[ "0.6938293", "0.66464734", "0.66464734", "0.65668696", "0.65137976", "0.64069563", "0.6322424", "0.6305556", "0.62892056", "0.62415767", "0.6231633", "0.618262", "0.6155149", "0.61169046", "0.6096776", "0.6069753", "0.6013953", "0.59829295", "0.5956482", "0.5935462", "0.59169...
0.6903586
1
end function IsInBottomBorderRow(tree) / Define a function that returns whether a tree is in the left border column of the forest
function IsInLeftBorderColumn(tree) { return +tree.getAttribute("data-x") === 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function IsOnBorder(tree) {\n\n return IsInLeftBorderColumn(tree) ||\n IsInTopBorderRow(tree) ||\n IsInRightBorderColumn(tree) ||\n IsInBottomBorderRow(tree);\n\n} // end function IsOnBorder(tree)", "function IsInBottomBorderRow(tree) {\n\n return +tree.getAttribute(\"data-y\") === TREE...
[ "0.84028494", "0.8206366", "0.73988545", "0.7012487", "0.64692634", "0.6398456", "0.63269967", "0.62955594", "0.6283799", "0.6145195", "0.61342853", "0.6124506", "0.611723", "0.6081573", "0.6058513", "0.6005741", "0.5981635", "0.59553117", "0.5926019", "0.5877867", "0.5876666...
0.7245169
3
end function IsInLeftBorderColumn(tree) / Define a function that returns whether a tree is in the right border column of the forest
function IsInRightBorderColumn(tree) { return +tree.getAttribute("data-x") === TREE_COUNT_X - 1; } // end function IsInRightBorderColumn(tree)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function IsInLeftBorderColumn(tree) {\n\n return +tree.getAttribute(\"data-x\") === 0;\n\n}", "function IsOnBorder(tree) {\n\n return IsInLeftBorderColumn(tree) ||\n IsInTopBorderRow(tree) ||\n IsInRightBorderColumn(tree) ||\n IsInBottomBorderRow(tree);\n\n} // end function IsOnBorder(t...
[ "0.82707745", "0.8262914", "0.65455955", "0.64326954", "0.64250803", "0.64244324", "0.6379929", "0.6378589", "0.61118084", "0.61033833", "0.6014013", "0.592594", "0.5911344", "0.58962744", "0.5879141", "0.586905", "0.58283436", "0.58156955", "0.5813149", "0.5806327", "0.58042...
0.8238904
2
Define a function that returns whether a tree is in the top border row of the forest
function IsInTopBorderRow(tree) { return +tree.getAttribute("data-y") === 0; } // end function IsInTopBorderRow(tree)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function IsOnBorder(tree) {\n\n return IsInLeftBorderColumn(tree) ||\n IsInTopBorderRow(tree) ||\n IsInRightBorderColumn(tree) ||\n IsInBottomBorderRow(tree);\n\n} // end function IsOnBorder(tree)", "function IsInBottomBorderRow(tree) {\n\n return +tree.getAttribute(\"data-y\") === TREE...
[ "0.75619966", "0.7046568", "0.65028894", "0.62598073", "0.61379886", "0.6102708", "0.60500544", "0.60341114", "0.60016525", "0.5991097", "0.59411407", "0.59150344", "0.5903628", "0.58957744", "0.58700526", "0.5855318", "0.58516634", "0.58359545", "0.5826668", "0.58238935", "0...
0.7924468
0
Define a function that returns whether a tree is on the border of the forest
function IsOnBorder(tree) { return IsInLeftBorderColumn(tree) || IsInTopBorderRow(tree) || IsInRightBorderColumn(tree) || IsInBottomBorderRow(tree); } // end function IsOnBorder(tree)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get isLeaf() {\n return !this.left && !this.right;\n }", "isLeaf() {\n return this.#leftChild == null && this.#rightChild == null;\n }", "function isBalanced(tree) {\n if (tree === null) {\n return true;\n }\n\n if (getHeight(tree) === -1) {\n return false;\n } else {\n return isBalanced(t...
[ "0.69118375", "0.6908986", "0.6555974", "0.65418655", "0.6428819", "0.6365429", "0.62987876", "0.6290583", "0.62625325", "0.624927", "0.6234012", "0.6184283", "0.6170158", "0.60978097", "0.60762", "0.6041806", "0.6022463", "0.6001791", "0.59919703", "0.598784", "0.5956791", ...
0.80831814
0
Define a function that returns whether a given tree has a neighbor on fire
function NeighborIsOnFire(tree) { return TopNeighborIsOnFire(tree) || LeftNeighborIsOnFire(tree) || RightNeighborIsOnFire(tree) || BottomNeighborIsOnFire(tree); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "hasNeighbor(tile) {\n return Boolean(this.getAdjacentDirection(tile));\n }", "hasNeighbor(tile) {\n // tslint:disable-next-line:no-unsafe-any\n return tiled_1.BaseTile.prototype.hasNeighbor.call(this, tile);\n }", "checkNeighbors(cb) {\n for (let i = 1; i < this.pieces.length - 1;...
[ "0.69242936", "0.6606503", "0.65161145", "0.6397238", "0.6369669", "0.63181645", "0.62966806", "0.6296366", "0.6242103", "0.6229841", "0.621786", "0.618358", "0.61777246", "0.6177163", "0.6129966", "0.60055655", "0.60016835", "0.59897345", "0.5988795", "0.5970397", "0.5967165...
0.81818455
0
end function NeighborIsOnFire(tree) / Define a function that returns a random integer between min (inclusive) and max (inclusive)
function RandIntInRange(min, max) { return min + Math.floor(Math.random() * (max - min)); } // end function GetRandInt(min, max)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function NeighborIsOnFire(tree) {\n\n return TopNeighborIsOnFire(tree) ||\n LeftNeighborIsOnFire(tree) ||\n RightNeighborIsOnFire(tree) ||\n BottomNeighborIsOnFire(tree);\n\n}", "function getRanNumber (min,max) { return Math.floor(Math.random()*((max+1)-min)+min); }", "function randTre...
[ "0.6711323", "0.6162762", "0.6005289", "0.58932805", "0.58599275", "0.58551896", "0.58548814", "0.5817307", "0.5796983", "0.57777536", "0.5776588", "0.5743342", "0.5737998", "0.5735335", "0.5728346", "0.57080775", "0.56882566", "0.5680371", "0.56781703", "0.5678002", "0.56780...
0.5640458
25
Define a function that resets the simulation
function Reset() { // Stop the repeating interval clearInterval(IntervalID); IsRunning = false; // Define tree positions and states ResetTrees(); } // end function Reset()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reset() {\n resetFunc();\n }", "function reset() {\n\n }", "function reset() { }", "Reset() {\n\n }", "function reset() {\n\nstart();\n\n}", "Reset() {}", "function reset(x){\n x=0;\n}", "function reset() {\n //RESET EVERYTHING\n console.log(\"RESETTING\")\n entering = ...
[ "0.7843961", "0.7541735", "0.74567324", "0.73243374", "0.7318691", "0.7292567", "0.7292173", "0.72683", "0.7135791", "0.7096261", "0.704172", "0.70325303", "0.7016786", "0.69773763", "0.69736165", "0.6968997", "0.6968566", "0.69553584", "0.69419366", "0.6931673", "0.6920342",...
0.0
-1
Define a function to define tree positions and states
function ResetTrees() { // Loop over the trees in the x direction for (var x = 0; x < TREE_COUNT_X; x++) { // Loop over the trees in the y direction for (var y = 0; y < TREE_COUNT_Y; y++) { // Set the state of the tree SetTreeState(document.getElementById(x + "-" + y)); } // end for (var...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "buildTree() {\n\t\tthis.assignLevel(this.nodesList[0], 0);\n\t\tthis.positionMap = new Map();\n\t\tthis.assignPosition(this.nodesList[0], 0);\n\t}", "function avlTree() {\n \n}", "buildTree() {\n // note: in this function you will assign positions and levels by making calls to assignPosition() and as...
[ "0.682886", "0.65758836", "0.6542065", "0.63464886", "0.6172183", "0.6145884", "0.6078676", "0.60615087", "0.6046319", "0.59946024", "0.5974109", "0.5926204", "0.59246695", "0.5914773", "0.5888779", "0.5888779", "0.58853084", "0.58584297", "0.58584297", "0.58512956", "0.57957...
0.60848534
6
Define a function to set the states of trees in the next time step
function SetNextStates() { // Loop over all tree columns, excluding the borders for (var x = 1; x < TREE_COUNT_X - 1; x++) { // Loop over all tree rows, excluding the borders for (var y = 1; y < TREE_COUNT_Y - 1; y++) { // Create a variable to store the current tree var tree = document.getEle...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SetTreeState(tree) {\n\n // If the tree is on the border,\n if (IsOnBorder(tree)) {\n\n // Set the tree's state to burnt\n tree.style.backgroundColor = \"black\";\n\n } // end if\n\n // Otherwise, if the tree is not on the border\n else {\n\n // Indicate the current tree is non-burning\n ...
[ "0.6913378", "0.6853453", "0.6520972", "0.6370402", "0.62852", "0.61621255", "0.6034784", "0.5948729", "0.5942112", "0.5921759", "0.5856318", "0.58371043", "0.57696545", "0.57498336", "0.573694", "0.5718223", "0.5715679", "0.5703782", "0.5680136", "0.5635917", "0.56253797", ...
0.66186345
2
Define a function to set the state of a tree
function SetTreeState(tree) { // If the tree is on the border, if (IsOnBorder(tree)) { // Set the tree's state to burnt tree.style.backgroundColor = "black"; } // end if // Otherwise, if the tree is not on the border else { // Indicate the current tree is non-burning tree.style.background...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "stateful(node,path,getNodeKey) {\n if (!('isStateful' in node)) {\n this.setState(state => ({\n treeData: changeNodeAtPath({\n treeData: state.treeData,\n path,\n getNodeKey,\n newNode: { ...node, isStateful:false }\n })\n }))\n }\n }", "setTree(tr...
[ "0.7181733", "0.6970752", "0.6837099", "0.6795979", "0.6398273", "0.6224716", "0.60394543", "0.60319036", "0.6013876", "0.59899473", "0.5917166", "0.58790606", "0.58635914", "0.58633846", "0.5827285", "0.5801035", "0.5798852", "0.57949185", "0.5789361", "0.57862866", "0.57757...
0.7153626
1
Define a function to see if fire spreads from the tree at the given x,y position
function Spread(x, y) { return TreeIsOnFire(document.getElementById(x + "-" + y)) && BurnChanceHappens(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function NeighborIsOnFire(tree) {\n\n return TopNeighborIsOnFire(tree) ||\n LeftNeighborIsOnFire(tree) ||\n RightNeighborIsOnFire(tree) ||\n BottomNeighborIsOnFire(tree);\n\n}", "testHit(x, y) {\n for (const i in this.position) {\n // console.log('x ' + x + ' otherx ' +...
[ "0.6896648", "0.6452128", "0.626795", "0.61163265", "0.6036988", "0.5985839", "0.5980795", "0.59774214", "0.59593165", "0.59402674", "0.59355575", "0.5922788", "0.59139705", "0.59099114", "0.5855823", "0.58488405", "0.58417195", "0.5800116", "0.57948834", "0.5791413", "0.5769...
0.61711866
3
end function SpreadFromBottom(tree) / Define a function that returns whether fire spreads from the bottom neighbor of the given tree
function SpreadFromBottom(tree) { return Spread(+tree.getAttribute("data-x"), +tree.getAttribute("data-y") + 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TrySpread(tree) {\n\n // If the tree's neighbor is on fire and the burn chance happens,\n if (SpreadFromTop(tree) ||\n SpreadFromLeft(tree) ||\n SpreadFromRight(tree) ||\n SpreadFromBottom(tree)) {\n\n // Light the tree on fire in the next time step\n tree.setAttribute(\"data-nextBa...
[ "0.66622245", "0.62773067", "0.57692325", "0.56842816", "0.56614536", "0.54756737", "0.5474037", "0.54548347", "0.5398309", "0.53694105", "0.5343086", "0.5340814", "0.52697396", "0.52415514", "0.52152157", "0.52152073", "0.5177989", "0.51761246", "0.5171324", "0.51653945", "0...
0.6468208
1
end function SpreadFromBottom(tree) / Define a function that returns whether fire spreads from the left neighbor of the given tree
function SpreadFromLeft(tree) { return Spread(+tree.getAttribute("data-x") - 1, +tree.getAttribute("data-y")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TrySpread(tree) {\n\n // If the tree's neighbor is on fire and the burn chance happens,\n if (SpreadFromTop(tree) ||\n SpreadFromLeft(tree) ||\n SpreadFromRight(tree) ||\n SpreadFromBottom(tree)) {\n\n // Light the tree on fire in the next time step\n tree.setAttribute(\"data-nextBa...
[ "0.69072264", "0.64633137", "0.61567163", "0.55489415", "0.5437016", "0.54275113", "0.5418143", "0.54033846", "0.53803617", "0.5376075", "0.53545", "0.53536755", "0.53345007", "0.5308486", "0.52861804", "0.5285106", "0.5285106", "0.52478874", "0.5243348", "0.52284735", "0.520...
0.5199877
22
end function SpreadFromLeft(tree) / Define a function that returns whether fire spreads from the right neighbor of the given tree
function SpreadFromRight(tree) { return Spread(+tree.getAttribute("data-x") + 1, +tree.getAttribute("data-y")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TrySpread(tree) {\n\n // If the tree's neighbor is on fire and the burn chance happens,\n if (SpreadFromTop(tree) ||\n SpreadFromLeft(tree) ||\n SpreadFromRight(tree) ||\n SpreadFromBottom(tree)) {\n\n // Light the tree on fire in the next time step\n tree.setAttribute(\"data-nextBa...
[ "0.68527323", "0.6387183", "0.6004864", "0.58860403", "0.5788671", "0.5788671", "0.56228256", "0.5490242", "0.54431903", "0.5403189", "0.5369368", "0.53606534", "0.5330079", "0.5310193", "0.52752423", "0.52315474", "0.52290213", "0.52057093", "0.5188732", "0.5174912", "0.5141...
0.5383886
10
end function SpreadFromRight(tree) / Define a function that returns whether fire spreads from the top neighbor of the given tree
function SpreadFromTop(tree) { return Spread(+tree.getAttribute("data-x"), +tree.getAttribute("data-y") - 1); } // end function SpreadFromTop(tree)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TrySpread(tree) {\n\n // If the tree's neighbor is on fire and the burn chance happens,\n if (SpreadFromTop(tree) ||\n SpreadFromLeft(tree) ||\n SpreadFromRight(tree) ||\n SpreadFromBottom(tree)) {\n\n // Light the tree on fire in the next time step\n tree.setAttribute(\"data-nextBa...
[ "0.67209363", "0.6475421", "0.5644895", "0.5482088", "0.5404542", "0.53760165", "0.5327369", "0.5310843", "0.5233454", "0.5233454", "0.522716", "0.52215433", "0.52118754", "0.5167964", "0.5140087", "0.513516", "0.5129459", "0.51141715", "0.510843", "0.509455", "0.5050281", ...
0.5841772
2
Define a function that is called to advance the model by one time step
function Step() { // Set the states of trees in the next time step SetNextStates(); // Advance the model by swapping in each tree's next state for the current // state Advance(); } // end function Step()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "step() { }", "step() {\n }", "runOneStepForwards() {\n this.stateHistory.nextState();\n }", "update(timeStep) {\n\n }", "nextstep(step) {}", "gotoNextStep() {\n this.gotoStep(this.currentStep + 1);\n }", "step(t) {\n }", "function step() {\n redraw.stepAnimation();\n }", ...
[ "0.6907784", "0.6815584", "0.67532104", "0.67196053", "0.6680532", "0.6610627", "0.65842587", "0.65725833", "0.65725833", "0.65067387", "0.6426513", "0.635358", "0.6352919", "0.62039346", "0.6185831", "0.6161612", "0.61437947", "0.6106753", "0.6094143", "0.60762894", "0.60486...
0.6467005
10
Define a function that returns whether a given tree is on fire
function TreeIsOnFire(tree) { return tree.style.backgroundColor === "red"; } // end function TreeIsOnFire(tree)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function NeighborIsOnFire(tree) {\n\n return TopNeighborIsOnFire(tree) ||\n LeftNeighborIsOnFire(tree) ||\n RightNeighborIsOnFire(tree) ||\n BottomNeighborIsOnFire(tree);\n\n}", "function walkTree(tree) {\n if(tree.value === target) {\n result = true;\n }\n for(var i = 0; i...
[ "0.79100996", "0.62722296", "0.5699935", "0.56023806", "0.54850227", "0.54630816", "0.5460089", "0.5406771", "0.53803414", "0.5379582", "0.53672135", "0.53571844", "0.53445625", "0.53092855", "0.52968115", "0.52492774", "0.5231649", "0.5188558", "0.51788723", "0.51777947", "0...
0.7306542
1
Define a function for trying to spread the fire to a tree from each of its 4 neighbors
function TrySpread(tree) { // If the tree's neighbor is on fire and the burn chance happens, if (SpreadFromTop(tree) || SpreadFromLeft(tree) || SpreadFromRight(tree) || SpreadFromBottom(tree)) { // Light the tree on fire in the next time step tree.setAttribute("data-nextBackground", "red...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SetNextStates() {\n\n // Loop over all tree columns, excluding the borders\n for (var x = 1; x < TREE_COUNT_X - 1; x++) {\n\n // Loop over all tree rows, excluding the borders\n for (var y = 1; y < TREE_COUNT_Y - 1; y++) {\n\n // Create a variable to store the current tree\n var tree = d...
[ "0.60820735", "0.58250135", "0.5659509", "0.564416", "0.5600634", "0.55815256", "0.55581087", "0.5531226", "0.552177", "0.5484616", "0.543548", "0.54297954", "0.542762", "0.5396647", "0.53801364", "0.5357631", "0.534317", "0.53390074", "0.5311907", "0.5279669", "0.5278309", ...
0.63322663
0
when a parameter changes, kill active note and send the new one
function ParameterChanged(param, value) { // which voice is it? var voiceIndex = (param % 2 == 0) ? param / 2 : (param - 1) / 2; for(var i in activeNotes){ var voiceToChange = activeNotes[i].events[voiceIndex+1]; // send note off var noteOff = new NoteOff(voiceToChange); noteOff.send(); // modify acco...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cancelNote(){\r\n\twindow.arguments[0].saveNote = false;\r\n\treturn true;\r\n}", "handler(argv) {\n notes.removeNote(argv.title)\n // console.log('Removing the note')\n }", "function noteOff(noteNumber) { }", "function stopNote(audioID, pnoKeyID) {\n\tvar vol = 65;\n\n\t//do short f...
[ "0.60370827", "0.5780991", "0.571173", "0.56912184", "0.563083", "0.55441564", "0.5537927", "0.55196077", "0.5459178", "0.54515743", "0.5445203", "0.5437725", "0.53644407", "0.53567976", "0.5345059", "0.5330551", "0.5327427", "0.53032595", "0.5289331", "0.52694416", "0.526666...
0.66099656
0
get All Rooms from DB
async function getAllRoom (token,msg) { const config = { headers:{ "Authorization":`Bearer ${token}` } } try{ const response = await axios.get(`${SERVER}/api/room`,config,msg); dispatch({ type:'GET_ROOMS'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAllRooms(){\r\n roomsService.getAllRooms(\"now\").then(rooms => {\r\n vm.rooms = rooms;\r\n });\r\n }", "retrieveAll() {\n return this._rooms.allRooms;\n }", "getRooms() {\n return new Promise((resolve, reject) => {\n this.collection...
[ "0.76933813", "0.75985605", "0.75083554", "0.74403834", "0.7356167", "0.735464", "0.7299937", "0.7267569", "0.7174144", "0.71103424", "0.684704", "0.663029", "0.6615764", "0.66054887", "0.6594108", "0.65723914", "0.6564403", "0.6557435", "0.65145206", "0.6485666", "0.64696527...
0.0
-1
get Chats by room
async function getChatByRoom(token,room){ const config = { headers:{ "Authorization": `Bearer ${token}` } } try{ const response = await axios.get(`${SERVER}/api/chat/room/${room}`,config); dispatch({ type:"GET_CHAT...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getChats() {\n\t\tvar ref = new Firebase(\"https://rami-ttt.firebaseio.com/mariottt/chats/\" + $scope.matchID);\n\t\treturn $firebase(ref).$asArray();\n\t}", "function getRoomUsers(room) {\n return users.filter(user => user.room === room);\n}", "function getUsersInRoom(room){\n users.filter((use...
[ "0.7095365", "0.69779587", "0.6906738", "0.67268074", "0.66090757", "0.6452786", "0.6426764", "0.6380014", "0.6372918", "0.63701063", "0.6361761", "0.6311447", "0.6297266", "0.62805265", "0.6277719", "0.626801", "0.62619627", "0.6201561", "0.6192576", "0.6168535", "0.6149833"...
0.66671014
4
Write a function called sayHello that displays an alert that says Hello World!
function sayHello () { return "Hello World!"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sayHello() {\n alert(\"Hello World!\");\n }", "function sayHello() {\n\talert('Hello World!');\n}", "function sayHello() {\n \talert(\"Hello\")\n\t// ... more statements can go here ...\n }", "function sayHello() {\n alert('Hello World')\n}", "function sayHello(){\n alert(\"Hello World...
[ "0.8570684", "0.8524084", "0.85024273", "0.84211445", "0.8406644", "0.8406626", "0.83916444", "0.83846134", "0.8342671", "0.8342671", "0.8342671", "0.83312356", "0.8293434", "0.81663865", "0.81586194", "0.81464404", "0.8146328", "0.8115176", "0.8027074", "0.793722", "0.786602...
0.7773521
28
Write a function called checkAge that takes two arguments: one for a name and one for an age. If the age is less than 21, display an alert that says, "Sorry " + name + ", you aren't old enough to view this page!"
function checkAge (name, age) { if (age < 21) { return "Sorry " + name + ", you aren't old enough to view this page!"; } else { return "Welcome to the page, " + name + "."; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkAge(name, age) {\n if (age < 21) {\n alert(\"Sorry \" + name + \", you aren't old enough to view this page!\");\n }\n}", "function checkAge(name, age){\n if(age < 21){\n alert(\"Sorry \" + name + \", you aren't old enough to view this page!\");\n }\n}", "function checkAg...
[ "0.916151", "0.9161316", "0.91346586", "0.91342616", "0.91337144", "0.9088141", "0.90776294", "0.9069839", "0.8805365", "0.87874424", "0.8671781", "0.86583877", "0.8656158", "0.75503206", "0.7520253", "0.74666953", "0.7454423", "0.7417439", "0.7391171", "0.73844635", "0.73764...
0.8551017
13
Create a function called getLength that takes any word as an argument. The function should return the number of characters in the string.
function getLength(string) { return string.length; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLength(word) {\n return word.length;\n}", "function getlength(word) {return word.length }", "function getlength(word) {\r\n return word.length;\r\n\r\n}", "function getLength(anyWord){\n return anyWord.length;\n}", "function getLength(word) {\n console.log(word.length);\n}", "functi...
[ "0.83465844", "0.8318967", "0.83080494", "0.8290307", "0.81501514", "0.8105542", "0.8013172", "0.7896019", "0.7879733", "0.78580624", "0.78580624", "0.78433025", "0.7756688", "0.769697", "0.76796246", "0.76796246", "0.76796246", "0.76677376", "0.7653516", "0.7567596", "0.7557...
0.76431865
20
conects the button to the action
function action () { userInput = document.getElementById('input').value userInput = parseInt(userInput) // when input is given, the input is stored if (userInput < 0) { document.getElementById('answer').innerHTML = 'negative' // this will display the message negative if the number is negative } else {...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function button_click(e) {\n e.preventDefault();\n var $this = e.target,\n name = $this.ancestor('.plugin.well').getAttribute('data-key'), // Get addon name.\n action = $this.getAttribute('data-action');\n if ($this.hasClass('disabl...
[ "0.67474407", "0.64066774", "0.63622946", "0.63485277", "0.6336935", "0.6221469", "0.6184197", "0.61821884", "0.61709964", "0.6156059", "0.6117483", "0.6115068", "0.6100027", "0.60853934", "0.6085337", "0.6072686", "0.60428137", "0.6039228", "0.6023968", "0.5996027", "0.59805...
0.0
-1
Pull in data from CSV file build scatter plot
function buildScatterChart() { // set the dimensions and margins of the graph var margin = { top: 10, right: 30, bottom: 60, left: 175 }, width = 1200 - margin.left - margin.right, height = 600 - margin.top - margin.bottom; // append the svg object to the body of the page var svg = d3....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function plotFromCSV(){\r\n\t\td3.csv(csv, function(err, rows){\r\n\t\t\t//we are making a function inside a function\r\n\t\r\n\t\t\tconsole.log(rows)\r\n\t\t\tprocessData(rows);\r\n\t\t}\r\n\t\t\t);\r\n\t}//end of plotfromCSV()", "function makeScatterPlot(csvData) {\n data = csvData.filter(function(d){return...
[ "0.7490563", "0.72717947", "0.7259226", "0.7064381", "0.7057356", "0.6895841", "0.67199033", "0.66694456", "0.6657541", "0.6415603", "0.630831", "0.63080084", "0.62738484", "0.626806", "0.62037295", "0.62037045", "0.618836", "0.608468", "0.6079944", "0.60608184", "0.6011017",...
0.6567791
9
wow, even mentioning, uh, Voldemort_log here in the comments causes yui compressor to remove part of this func so what does yui compressor do with the hour it just stole from my life?
function xLog(m) { if (typeof Y === 'undefined') { console.log(m); } else { Y.log(m); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "function lgCompress(o){this.lzw=new lzw();this.setOptions=function(o){for(i in o){var n=\"set\"+i.charAt(0).toUpperCase()+i.substr(1);if(this[n]){this[n](o[i])}else{this[i]=o[i]}}};this.setOptions({});this.compress=function(o,a){switch(a){default:case\"lzw\":return this.lzw...
[ "0.6048854", "0.5943962", "0.5640617", "0.56279427", "0.5494377", "0.54521936", "0.5447571", "0.5413657", "0.54099643", "0.53625226", "0.534437", "0.5326423", "0.53144425", "0.5306027", "0.5301982", "0.5295654", "0.52874744", "0.5246905", "0.5230423", "0.52170956", "0.5210367...
0.0
-1