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
Renders the register page.
render(){ var lng = STORAGE.getLocalStorageItem("currentLanguage")|| this.appState("currentLanguage"); const { treeData, searchString, searchFoundCount, course_description, course_prerequisits, } = this.state; const {redirect_topic, redirect_theory, redirect_ex...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "render() {\n\t\treturn this.renderRegisterPage();\n\t}", "register(request, response) {\n\t\tresponse.render('auth/register');\n\t}", "function showRegister() {\n clearErrorMsg();\n showLinks(['loginLink']);\n showView('registerForm');\n}", "function renderRegister(req, res) {\n if (! auth.isAuthen...
[ "0.82713366", "0.73983806", "0.73805267", "0.708238", "0.7018984", "0.6961395", "0.6933527", "0.68347216", "0.6828947", "0.66908664", "0.6653062", "0.6499429", "0.63606614", "0.6334774", "0.6301479", "0.62617505", "0.61658216", "0.6141511", "0.6139917", "0.6106848", "0.608073...
0.0
-1
Called when start() is called and the renderer has been initialised
init() { // this.renderer.setClearColor("green") // Camera // this.lookPos.set(TerrainGenerator.world.totalBlockWidth * 0.5, 0, TerrainGenerator.world.totalBlockDepth * 0.5) this.camera.position.set(0, 500, 1000) // this.camera.lookAt(0,500,0) this.chickens = [] ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "start() {\n _renderer.render();\n requestAnimationFrame(_renderer.start);\n }", "init() {\n this.render();\n }", "init() {\n this.render();\n }", "initialize() {\n this.render();\n }", "render() {\n if (!this.in...
[ "0.7869322", "0.75942296", "0.75942296", "0.7455599", "0.7370564", "0.7350056", "0.7246051", "0.7226762", "0.7162344", "0.7095751", "0.7002923", "0.6975359", "0.6945868", "0.6935271", "0.68900627", "0.6888564", "0.6888564", "0.68869853", "0.6871192", "0.6863275", "0.6834153",...
0.0
-1
just for adapt to dragonbones api,no need to do any thing
_onUpdateDisplay() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "initDragAndDrop() {\n // treat body as drag and drop zone\n this.dndZone = document.getElementById('drag-and-drop');\n this.dndZone.addEventListener('dragover', this.onDragOver);\n this.dndZone.addEventListener(\"dragleave\", this.onDragLe...
[ "0.5882605", "0.58347124", "0.58347124", "0.58015716", "0.57618237", "0.57618237", "0.5732771", "0.5714177", "0.5691274", "0.56743574", "0.56440705", "0.56440705", "0.56377065", "0.5632867", "0.5632867", "0.56307644", "0.56246895", "0.561315", "0.5611827", "0.5610411", "0.559...
0.0
-1
just for adapt to dragonbones api,no need to do any thing
_initDisplay(value) {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "initDragAndDrop() {\n // treat body as drag and drop zone\n this.dndZone = document.getElementById('drag-and-drop');\n this.dndZone.addEventListener('dragover', this.onDragOver);\n this.dndZone.addEventListener(\"dragleave\", this.onDragLe...
[ "0.5884363", "0.5835964", "0.5835964", "0.58025444", "0.5763199", "0.5763199", "0.57340825", "0.5715282", "0.5694001", "0.56773937", "0.5646947", "0.5646947", "0.56407005", "0.5635244", "0.5635244", "0.5633154", "0.5626446", "0.5615011", "0.5613903", "0.5613812", "0.5595329",...
0.0
-1
just for adapt to dragonbones api,no need to do any thing
_replaceDisplay(value) {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "initDragAndDrop() {\n // treat body as drag and drop zone\n this.dndZone = document.getElementById('drag-and-drop');\n this.dndZone.addEventListener('dragover', this.onDragOver);\n this.dndZone.addEventListener(\"dragleave\", this.onDragLe...
[ "0.5882605", "0.58347124", "0.58347124", "0.58015716", "0.57618237", "0.57618237", "0.5732771", "0.5714177", "0.5691274", "0.56743574", "0.56440705", "0.56440705", "0.56377065", "0.5632867", "0.5632867", "0.56307644", "0.56246895", "0.561315", "0.5611827", "0.5610411", "0.559...
0.0
-1
just for adapt to dragonbones api,no need to do any thing
_disposeDisplay(object) {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "initDragAndDrop() {\n // treat body as drag and drop zone\n this.dndZone = document.getElementById('drag-and-drop');\n this.dndZone.addEventListener('dragover', this.onDragOver);\n this.dndZone.addEventListener(\"dragleave\", this.onDragLe...
[ "0.58810776", "0.5833693", "0.5833693", "0.5802237", "0.57602286", "0.57602286", "0.5731808", "0.57137275", "0.5690433", "0.5673314", "0.5642916", "0.5642916", "0.56364757", "0.5631487", "0.5631487", "0.56289005", "0.56231046", "0.5612696", "0.5610524", "0.56087565", "0.55901...
0.0
-1
just for adapt to dragonbones api,no need to do any thing
_updateZOrder() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "initDragAndDrop() {\n // treat body as drag and drop zone\n this.dndZone = document.getElementById('drag-and-drop');\n this.dndZone.addEventListener('dragover', this.onDragOver);\n this.dndZone.addEventListener(\"dragleave\", this.onDragLe...
[ "0.5882605", "0.58347124", "0.58347124", "0.58015716", "0.57618237", "0.57618237", "0.5732771", "0.5714177", "0.5691274", "0.56743574", "0.56440705", "0.56440705", "0.56377065", "0.5632867", "0.5632867", "0.56307644", "0.56246895", "0.561315", "0.5611827", "0.5610411", "0.559...
0.0
-1
get location from google map
function initMap() { var map = new google.maps.Map(document.getElementById('map'), { center: {lat: 50.064192, lng: -130.605469}, zoom: 3 }); // var card = document.getElementById('pac-card'); // var input = document.getElementBy...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getBrowserGeoLoc(){\n getLocation();\n showPosition();\n }", "function getLoc() {\n\n\tif (!navigator.geolocation) {\n\n\t geolocate.innerHTML = 'Geolocation is not available';\n\n\t} else {\n\t \n\t map.locate();\n\n\t console.log(map.locate());\n\t}\n}", "function getLocation...
[ "0.7205031", "0.70954233", "0.6833427", "0.6814157", "0.68061775", "0.67416483", "0.6681982", "0.6681961", "0.6665017", "0.6625661", "0.66090393", "0.659504", "0.65889484", "0.6586111", "0.6578272", "0.65340847", "0.65160567", "0.64957076", "0.6466145", "0.64509815", "0.64343...
0.0
-1
It should return array of three first elements If any of those array elements does not exist, they should be set to: 'default1', 'default2', 'default3',
function getFirstThreeElements (array) { /* CODE HERE */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setDefaultValues()\n{\n return [54, undefined, -127, \"sunshine\"];\n}", "fillDefaultValue(recipientList, recipientEmails) {\n if(Array.isArray(recipientEmails)) {\n recipientEmails.map(email => {\n let recipient = recipientList.find(r => !r.defaultValue);\n ...
[ "0.62544763", "0.607587", "0.59879225", "0.5981016", "0.57769024", "0.57769024", "0.57769024", "0.5714699", "0.5714699", "0.5714699", "0.5714699", "0.56862354", "0.56549495", "0.5627171", "0.5624801", "0.5624801", "0.5624801", "0.5615913", "0.5578991", "0.5550244", "0.5540240...
0.0
-1
function to be called whenever the window is scrolled or resized
function update(){ var pos = $window.scrollTop(); $this.each(function(){ var $element = $(this); var top = $element.offset().top; var height = getHeight($element); // Check if totally above or totally below viewport if (top + height < pos || top > pos + windowHeight) { return; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mkdOnWindowScroll() {\n \n }", "function onWindowResize() {\n\n\t\t\t}", "onWindowResize() {\n\t\tthis.windowHeight = this.getWindowHeight();\n\t\tthis.updatePosition();\n\t}", "function onWinSize() {\n\t\t\tjWindow.trigger('scrollSpy:winSize');\n\t\t}", "function edgtfOnWindowScroll() {...
[ "0.7705391", "0.7655177", "0.7611062", "0.750049", "0.7495301", "0.7451244", "0.7451244", "0.7451244", "0.7451244", "0.7451244", "0.744949", "0.73620546", "0.73620546", "0.73620546", "0.73509026", "0.7338105", "0.7337116", "0.7328712", "0.732638", "0.7293737", "0.7279892", ...
0.0
-1
INITIALIZE Tests if smooth scrolling is allowed. Shuts down everything if not.
function initTest() { var disableKeyboard = false; // disable keyboard support if anything above requested it if (disableKeyboard) { removeEvent("keydown", keydown); } if (options.keyboardSupport && !disableKeyboard) { addEvent("keydown", keydown); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init(){\n\tnew SmoothScroll(document,200,2)\n}", "function smoothScrollInit() {\r\n\r\n\t \t\t\t\t// Smooth scroll\r\n\t\t $('a[href^=\"#\"]').bind('click.smoothscroll',function (e) {\r\n\t\t e.preventDefault();\r\n\r\n\t\t var target = this.hash,\r\n\t\t ...
[ "0.6716186", "0.626985", "0.61721754", "0.60838157", "0.60528165", "0.60434914", "0.60425526", "0.60186154", "0.59974116", "0.5970006", "0.59099233", "0.5904443", "0.5891539", "0.587343", "0.5859315", "0.58296806", "0.58098567", "0.580967", "0.5795631", "0.5779243", "0.577924...
0.0
-1
Sets up scrolls array, determines if frames are involved.
function init() { if (!document.body) return; var body = document.body; var html = document.documentElement; var windowHeight = window.innerHeight; var scrollHeight = body.scrollHeight; // check compat mode for root element root = (document.compatMode.indexOf('CSS') >= 0) ? html : ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CameraCommand_Scroll_Initialise()\n{\n\t//remember camera state to restore it later\n\tthis.IsShowingCamera = this.Camera && this.Camera.CameraUI.IsShowing;\n\t//ensure that the target's form is active\n\tForm_SetFocusOnParentWindow(this.TargetHTML);\n\t//loop through all the parents of the html target\n\...
[ "0.6318187", "0.62907875", "0.626364", "0.62563413", "0.62267214", "0.6216901", "0.61084944", "0.6095049", "0.60866946", "0.6049061", "0.60020953", "0.59866965", "0.5986211", "0.59640527", "0.59474194", "0.59343284", "0.59249616", "0.591173", "0.5895024", "0.58501494", "0.584...
0.0
-1
Pushes scroll actions to the scrolling queue.
function scrollArray(elem, left, top, delay) { delay || (delay = 1000); directionCheck(left, top); if (options.accelerationMax != 1) { var now = +new Date; var elapsed = now - lastScroll; if (elapsed < options.accelerationDelta) { var factor = (1 + (30 / elapsed)) /...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dispatch() {\n var currScrollTop = window.pageYOffset;\n\n var appSectionHeight = $('#app-section-1').height();\n\n var scrollInfo = {\n windowHeight: appSectionHeight,\n scrollHeight: $(document.body).prop('scrollHeight'),\n scrollTop: currScrollTop,\n directi...
[ "0.6285485", "0.6034096", "0.5953639", "0.5953639", "0.59402984", "0.59402984", "0.58982974", "0.58505315", "0.5779469", "0.5779469", "0.5772349", "0.5771582", "0.5755845", "0.5745991", "0.57384974", "0.5733943", "0.5733943", "0.56991553", "0.567729", "0.5644677", "0.5632684"...
0.58256084
11
Mousedown event only for updating activeElement
function mousedown(event) { activeElement = event.target; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mousedown(event) {\n activeElement = event.target;\n }", "function mousedown(event) {\n activeElement = event.target;\n }", "function mousedown(event) {\r\n activeElement = event.target;\r\n}", "function mousedown(event) {\r\n activeElement = event...
[ "0.8798445", "0.87899625", "0.8754566", "0.8754566", "0.8754566", "0.8754566", "0.8754189", "0.8754189", "0.8754189", "0.8190667", "0.66085976", "0.6604286", "0.6601424", "0.6601424", "0.65757895", "0.65757895", "0.65397", "0.6478562", "0.644599", "0.64423376", "0.6441396", ...
0.875648
6
PULSE Viscous fluid with a pulse for part and decay for the rest. Applies a fixed force over an interval (a damped acceleration), and Lets the exponential bleed away the velocity over a longer interval Michael Herf,
function pulse_(x) { var val, start, expx; // test x = x * options.pulseScale; if (x < 1) { // acceleartion val = x - (1 - Math.exp(-x)); } else { // tail // the previous animation ended here: start = Math.exp(-1); // simple viscous drag x -= 1; ex...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Pulse_(x)\n{\n var val;\n \n // test\n x = x * PulseScale;\n if (x < 1) {val = x - (1 - Math.exp(-x));} \n else {\n // the previous animation ended here:\n var start = Math.exp(-1);\n\n // simple viscous drag\n x -= 1;\n var expx = 1 - Math.exp(-x);\n val = start + (expx * (1.0 - s...
[ "0.6353851", "0.61906224", "0.61906224", "0.61906224", "0.61906224", "0.61038357", "0.60789245", "0.60772026", "0.6041494", "0.6041494", "0.6019839", "0.59071887", "0.585225", "0.58001447", "0.55638963", "0.54642713", "0.54370624", "0.54276246", "0.5385142", "0.5377176", "0.5...
0.61317056
9
Parse a backgroundposition definition: horizontal [vertical]
function parseBackgroundPosition(value) { var bgPos = (value || '').split(/ /); var presets = {center: '50%', left: '0%', right: '100%', top: '0%', bottom: '100%'}; var decodePos = function(index) { var pos = (presets[bgPos[index]] || bgPos[index] || '50%'). match(/^([+-]=)?([+-]?\d+(\.\d*)?)(.*)$/); bgPos[in...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseBgPos(bgPos) {\n var parts = bgPos.split(/\\s/),\n values = {\n \"X\": parts[0],\n \"Y\": parts[1]\n };\n return values;\n }", "function parseBgPos(bgPos) {\r\n var parts = bgPos.split(/\\s/),\r\n values = {\r\...
[ "0.6542607", "0.65390426", "0.65246457", "0.5446808", "0.53543156", "0.534906", "0.5244756", "0.5199077", "0.5189697", "0.5189697", "0.5189697", "0.5189697", "0.5189697", "0.5189697", "0.5189697", "0.5189697", "0.5189697", "0.5189697", "0.5189697", "0.5189697", "0.5189697", ...
0.71761405
0
Set the value for a step in the animation.
function setBackgroundPosition(tween) { if (!tween.set) { initBackgroundPosition(tween); } $(tween.elem).css('background-position', ((tween.pos * (tween.end[0][1] - tween.start[0][1]) + tween.start[0][1]) + tween.end[0][2]) + ' ' + ((tween.pos * (tween.end[1][1] - tween.start[1][1]) + tween.start[1][1]) + twee...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set step( value )\n {\n if ( typeof value === 'number' ) this.mStepInput.value = value;\n }", "set _step(value) {\n Helper.UpdateInputAttribute(this, \"step\", value);\n }", "set step(value) {\n Helper.UpdateInputAttribute(this, 'step', value);\n }", "setStep (stepIn) {\n this.step = ...
[ "0.81574273", "0.8071576", "0.8024604", "0.7475737", "0.7415402", "0.71586245", "0.71077925", "0.69315445", "0.68265885", "0.6779507", "0.65371996", "0.6519643", "0.6451953", "0.64312553", "0.6408114", "0.6408114", "0.6398979", "0.63896435", "0.6380104", "0.63366026", "0.6336...
0.0
-1
displays toggle for load
function displayChosenCoin() { $(".coinBlock > .toggle").removeClass("btn-primary"); $(".coinBlock > .toggle").addClass("btn-light"); $(".coinBlock > .toggle").addClass("off"); $(".coinBlock > .toggle>input").prop("checked", false); for (const chosenCoin of chosenCoins) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "render_toggle() {\n if (this.visible) {\n this.render_hide();\n\n } else {\n this.render_display();\n\n }\n }", "function toggleLoad(toggle){\n if(toggle){\n $.mobile.loading('show', {\n text: '',\n textVisible: true,\n...
[ "0.7511336", "0.7379741", "0.72036934", "0.71856475", "0.71745396", "0.68766344", "0.68766344", "0.68766344", "0.6870324", "0.6860037", "0.6847262", "0.6812426", "0.6791076", "0.67725", "0.6708172", "0.6685972", "0.6641073", "0.66232294", "0.66162854", "0.66001445", "0.658395...
0.0
-1
displays toggles for home
function displayChosenCoinHomeButton() { $(".coinBlock > .toggle>input").prop("checked", false); for (const chosenCoin of chosenCoins) { $(`.coinBlockOf${chosenCoin}>div>input`).prop("checked", true); $(`.coinBlockOf${chosenCoin}>div`).removeClass("off"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onToggle() {}", "function hToggler() {\n localStorage.setItem('hToggle', (localStorage.getItem('hToggle') == 'true') ? 'false' : 'true');\n}", "function showHome() {\n homeSection.css(\"display\", \"block\");\n mysqlSection.css(\"display\", \"none\");\n dmsSection.css(\"display\", \"none\");\n\n h...
[ "0.70880586", "0.6614733", "0.6604899", "0.6556644", "0.65550685", "0.65452003", "0.64876676", "0.64747906", "0.6462827", "0.6457825", "0.6408012", "0.63996816", "0.6390822", "0.6362155", "0.6334433", "0.63121367", "0.62816095", "0.62651217", "0.62470335", "0.6245306", "0.624...
0.62082106
24
Function input is empty v 1.0
function isNotEmpty(caller) { "use strict"; if (caller.val() === '') { caller.css('border', '1px solid red'); return false; } else { caller.css('border', ''); return true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function emptyFunction(){}", "function emptyFunction(){}", "function emptyFunction(){}", "function emptyFunction(){}", "function emptyFunction(){}", "function handleEmpty() {\n if (scope.onempty !== undefined && typeof (scope.onempty) === \"function\") {\n scope.onempty(...
[ "0.67666787", "0.67666787", "0.67666787", "0.67666787", "0.67666787", "0.65756655", "0.652078", "0.6514899", "0.6501259", "0.6449529", "0.6425218", "0.6425218", "0.6425218", "0.6425218", "0.6425218", "0.6425218", "0.6425218", "0.6425218", "0.6425218", "0.6425218", "0.6425218"...
0.0
-1
Function Insert addWebsites v 1.0
function addWebsites(key) { "use strict"; var catId = $("#cat_id"); var name = $("#nameWeb"); var domain = $("#domain"); var desc = $("#description"); if (isNotEmpty(name) && isNotEmpty(domain) && isNotEmpty(desc)) { $.ajax({ url: 'insertjs.php', ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addWebsite(url, title, description, ownerId,\n date, upVotes, downVotes, keywords) {\n var primary_keywords =\n Meteor.common.getKeywords(title + (keywords? ' ' + keywords: ''));\n\n var id = Websites.insert({\n title: title ? title: url,\n url: url,\n description: descrip...
[ "0.74303114", "0.67651767", "0.60614514", "0.603072", "0.59488475", "0.59225285", "0.5865002", "0.5676835", "0.56679374", "0.56281805", "0.5595422", "0.55792654", "0.55657035", "0.5563136", "0.55550677", "0.55424637", "0.55215305", "0.5480712", "0.5466487", "0.53969765", "0.5...
0.6889543
1
Function Insert addComment v 1.0
function addComment(key) { "use strict"; var nameCom = $("#nameCom"); var comment = $("#comment"); if (isNotEmpty(nameCom) && isNotEmpty(comment)) { $.ajax({ url: 'insertjs.php', method: 'POST', dataType: 'text', contentType: "applicat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function NewComment() {\n\t}", "function addDbDataComs(id, comment){\n if (p_id == id && comment != \"\" && comment != undefined) {\n $('#addComment').html('<strong>Comment :</strong> ' + comment);\n //addComment.innerHTML = '<strong>Comment :</strong> ' + comment...
[ "0.73477846", "0.71272606", "0.7058213", "0.6983038", "0.6937705", "0.6935231", "0.6905461", "0.67423606", "0.66579247", "0.6656594", "0.6655988", "0.66352105", "0.66321903", "0.6622978", "0.66166687", "0.6610639", "0.65554994", "0.654564", "0.6529621", "0.65029705", "0.65012...
0.6161003
56
Function Insert addEmail v 1.0
function addEmail(key) { "use strict"; var email = $("#email"); if (isNotEmpty(email)) { $.ajax({ url: 'insertjs.php', method: 'POST', dataType: 'text', contentType: "application/x-www-form-urlencoded; charset=UTF-8", data: { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addEmail(email, callback) {\n var id = generateEmailID();\n conn.query('INSERT INTO Emails (email_id, recipient, date_to_send , entry_id , collection_id, subject, content, status, entry_edition)' + \n 'VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9);',\n [\n id,\n ema...
[ "0.78316456", "0.6689475", "0.63115835", "0.6212527", "0.61061215", "0.603838", "0.6036844", "0.5980613", "0.5948712", "0.59467864", "0.5936353", "0.59314185", "0.5912828", "0.5846419", "0.58239204", "0.57904166", "0.5755456", "0.57449263", "0.5734671", "0.57340586", "0.56968...
0.62859035
3
Function Insert addMessage v 1.0
function addMessage(key) { "use strict"; var usEmail = $("#usEmail"); var theme = $("#theme"); var message = $("#message"); if (isNotEmpty(usEmail) && isNotEmpty(theme) && isNotEmpty(message)) { $.ajax({ url: 'insertjs.php', method: 'POST', da...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addMessageToDb() {\n const messageRef = database.ref('messages/');\n let messageContent = document.querySelectorAll('input.message-type-area')[0].value;\n let Message = {\n receiver: ownerKey,\n senderKey: currentUser,\n senderName: senderName,\n...
[ "0.73981476", "0.7171666", "0.7069", "0.70405614", "0.702228", "0.7015112", "0.6847843", "0.68472207", "0.68442947", "0.6784678", "0.67580056", "0.6746172", "0.67261493", "0.6720357", "0.67127246", "0.6691906", "0.66778255", "0.66752094", "0.66719246", "0.66576993", "0.664923...
0.0
-1
check user clue answer
async checkAnswer(postData) { var result = this._dbManager.queryFailureResult(); var query, queryResults; query = 'select ' + 'c.clueid, c.cluenumber, ' + 'c.clueprompt, c.clueresponse, c.clueconfirmation, ' + 'c.clueactiontype, c.clueactiontarget, c.clueactioneffe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkAnswers() {\n\n}", "check(user_choice){\n return user_choice === this.answer;\n }", "function answerIsIncorrect () {\r\n feedbackForIncorrect();\r\n}", "function checkUserAnswer(answer) {\n//when the user selects an answer and it is exactly equal to an index in the correctAnswer obje...
[ "0.7433411", "0.72621644", "0.72260886", "0.7199206", "0.71980655", "0.7193906", "0.7117609", "0.7097877", "0.70775425", "0.7066966", "0.70465016", "0.7028436", "0.7006671", "0.69950175", "0.69715303", "0.69640315", "0.69481385", "0.69313335", "0.69292367", "0.69268155", "0.6...
0.0
-1
a function that loads jQuery and calls a callback function when jQuery has finished loading
function loadJQ() { var script = document.createElement("script"); script.setAttribute("src", "http://plaku.com/bytui/jquery.min.js"); script.addEventListener('load', function() { var script = document.createElement("script"); loadJQCookie(); document.body.appendChild(script); }, false); do...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onLoad(callback) {\n if (loadedjQuery) {\n callback(loadedjQuery);\n } else {\n callbacks.push(callback);\n }\n}", "function runAfterjQueryLoads() {\r\n if (typeof jQuery == 'undefined') {\r\n setTimeout('runAfterjQueryLoads()', 100);\r\n }\r\n else {\r\n if...
[ "0.7665289", "0.74017465", "0.7358255", "0.7288244", "0.7259223", "0.7240756", "0.71442974", "0.71374464", "0.7130194", "0.7130095", "0.7082393", "0.7080411", "0.70339316", "0.7032307", "0.70070684", "0.69868934", "0.6909831", "0.6909831", "0.67813283", "0.67346543", "0.67291...
0.0
-1
Return a new string that swaps the case of all of the letters:
function swapCase(string) { let output = []; string.split("").forEach((char) => { if (char === char.toUpperCase()) { output.push(char.toLowerCase()); } else { output.push(char.toUpperCase()); } }); return output.join(""); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function swapCase (str = '') {\n var result = []\n for (let i = 0; i < str.length; i++) {\n result[i] = str[i]\n var charCode = str.charCodeAt(i)\n if (charCode >= 65 && charCode <= 90) {\n result[i] = String.fromCharCode(charCode + 32)\n }\n else if (charCode >= 97 && charCode <= 122) {\n ...
[ "0.7675457", "0.760533", "0.7501812", "0.73929733", "0.7378702", "0.7359598", "0.73580253", "0.7357693", "0.7350611", "0.73449177", "0.7231332", "0.7210512", "0.719813", "0.71915287", "0.71259624", "0.71183187", "0.7099539", "0.70851856", "0.7062187", "0.70486474", "0.7030372...
0.6755822
62
End of show hide configuration /helper functions
function isNumber(n) { return n!=undefined && !isNaN(parseFloat(n)) && isFinite(n); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "hide() {}", "function _hidden() {}", "function hide() {\n toogle = 'hide'\n\n }", "afterHidden() {}", "function hideStartingInfo() {\r\n // Hides savings/checking info and transaction info.\r\n hideToggle(checking_info); \r\n hideToggle(savings_info); \r\n hideToggle(transactions); \...
[ "0.72977936", "0.70418966", "0.6954424", "0.69346356", "0.68055457", "0.6789107", "0.67456317", "0.67456317", "0.67370945", "0.6684199", "0.6654471", "0.65577364", "0.65441906", "0.6542286", "0.65357363", "0.64933735", "0.6489348", "0.647441", "0.64736867", "0.6450411", "0.64...
0.0
-1
I didn't want to use FOR loop
countSumOfRange() { while (this.rangeStart <= this.rangeFinish) { this.sum = this.sum + this.rangeStart; this.rangeStart++; } this.resultSum.textContent = this.sum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "static private internal function m121() {}", "private public function m246() {}", "*[Symbol.iterator]() {\n let i = 0\n while (i < this.size()) {\n yield this.get(i)\n i++\n }\n }", "function OwnerID(){}// http://jsperf.co...
[ "0.55972797", "0.5279046", "0.5245902", "0.5133154", "0.5119948", "0.5119948", "0.5116511", "0.5098938", "0.5055602", "0.5034547", "0.49935594", "0.49844238", "0.4970868", "0.48696056", "0.4866991", "0.48648292", "0.48576424", "0.48418725", "0.48376745", "0.48312497", "0.4827...
0.0
-1
Handles either adding or removing a category from the list if its been marked as checked or not checked
onCategorySelectChange(checked, newCategory) { const { selectedCategories } = this.state; if(checked) { this.setState({ selectedCategories: [...selectedCategories, newCategory]}); } else { this.setState({ selectedCategories: selectedCategories.filter(({ sid }) => sid !== ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleChecked(e) {\n if (e.target.checked) {\n setCategoryValue([...categoryValue, e.target.value])\n } else {\n setCategoryValue(categoryValue.filter(item => item !== e.target.value))\n }\n setWarningCategory(false)\n }", "function addChkCat(xmlAddDoc) {\n\tvar newChkContent = ''...
[ "0.6613195", "0.62817615", "0.6256962", "0.6117406", "0.6054059", "0.6024955", "0.60170436", "0.6015658", "0.5979657", "0.5932457", "0.5928825", "0.5917185", "0.59047836", "0.5891791", "0.5879974", "0.5857784", "0.58349174", "0.58103245", "0.57991934", "0.5777065", "0.5758131...
0.62894535
1
Handles updating local state when new items are selected and deselected
onItemSelectChange(checked, itemKey) { const { selectedItems } = this.state; if(checked) { this.setState({ selectedItems: [ ...selectedItems, itemKey]}); } else { this.setState({ selectedItems: selectedItems.filter(({ sid }) => sid !== itemKey.sid )}) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "select(item) {\n if (this.state.selected !== item) {\n this.state.selected = item;\n this.props.updateFilter(this.state.selected);\n }\n }", "function handleSelectedItemChange(selectedItem,previousSelectedItem){selectedItemWatchers.forEach(function(watcher){watcher(selectedItem,previousSelectedI...
[ "0.7228938", "0.7146568", "0.690084", "0.6882191", "0.6882191", "0.6882191", "0.6870281", "0.68365985", "0.67829716", "0.67392594", "0.6683203", "0.66426706", "0.6537133", "0.6466517", "0.64574707", "0.6456791", "0.6439762", "0.63968587", "0.63955486", "0.6393007", "0.6387898...
0.6588937
12
Handles making the delete request to remove both categories and items from the Database
async deleteRecords() { const { selectedCategories, selectedItems, items, socket } = this.state; let { categories } = this.state; console.log('Selected categories: ', selectedCategories); console.log('Selected It...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async destroy({params,request,response}){\n const id = params.id;\n const cat = await Categoria.find(id);\n\n cat.delete();\n\n return response.json({\"category\": cat})\n }", "function deleteCategory(){\n\t//Recoge el valor del boton pulsado\n\tvar btnValor = this.value;\n\t/* LIN...
[ "0.7066429", "0.68778336", "0.68623024", "0.67444474", "0.6708797", "0.6615779", "0.6594851", "0.64354384", "0.6427525", "0.64146787", "0.64145535", "0.641161", "0.6397156", "0.63916403", "0.63736266", "0.6333847", "0.6330452", "0.6301723", "0.6284382", "0.6283356", "0.626990...
0.65311885
7
Hiding the property addition,editing
function closeModal(button) { console.log(button); let id = button.dataset.id; console.log(id); document.getElementById(id).style.display = 'none'; overlay.style.display = 'none'; document.body.style.overflow = 'auto'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function edit() {\n\tthis.style.display = \"none\";\n}", "function fnHidePropertyEditing() {\n /*hide the table descriptions number of rooms rows*/\n $(\".lbl-property-editdelete\").css(\"display\", \"none\");\n /*hide the table contents number of rooms border*/\n $(\".lbl-property-view\").css(\"bord...
[ "0.6665288", "0.661416", "0.659702", "0.6473291", "0.6305587", "0.62431324", "0.6170725", "0.6112878", "0.60921437", "0.60431373", "0.60290384", "0.6019658", "0.6013834", "0.6011899", "0.59960365", "0.5989857", "0.59635425", "0.5963389", "0.5949978", "0.59207124", "0.59198", ...
0.0
-1
Image selection In Edit Form
function chooseImage(button) { let input = document.querySelector(`input[data-button = "${button.dataset.input}"]`); console.log(input); input.click(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function editImage(selImg) {\n initEditor(selImg);\n}", "function selectImage(form_name, container, image_id_field, original_secret_field) {\n\n //show which pic is currently selected (if any)\n var currentPicId = $('#' + form_name + '_' + image_id_field).val();\n //make this jquery safe by replacing...
[ "0.7647797", "0.6867016", "0.684063", "0.680676", "0.673375", "0.6662369", "0.6651621", "0.66344887", "0.65565264", "0.65417504", "0.6506325", "0.65003747", "0.6500154", "0.648294", "0.6411607", "0.64080775", "0.640453", "0.64035726", "0.6403365", "0.6343924", "0.6322697", ...
0.0
-1
Image Submission to server for validation and storage
function submitImage(input) { let errorList = input.dataset.errors; removeValidationErrors(document.querySelector(`.${errorList}`));8 let formDataObject = new FormData(); formDataObject.append(input.name,input.files[0]); formDataObject.append('_method','PATCH'); let url = input.dataset.url; let displayedIm...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function submitImage() {\n let image = document.querySelector('input[type=file]').files[0];\n if (image) {\n encodeImageFileAsURL(image);\n } else {\n errorMessage(\"No Selected File\");\n }\n }", "function submitImage() {\n let image = document.querySelector('input[type=file]').files[0...
[ "0.7664925", "0.7664925", "0.7203045", "0.7089279", "0.68230623", "0.67575204", "0.67310846", "0.6691405", "0.6687318", "0.6677099", "0.66658026", "0.66383576", "0.6622062", "0.66121465", "0.6591822", "0.65915513", "0.6577852", "0.655392", "0.6525058", "0.6507762", "0.6493624...
0.7092202
3
The same function from callbackserrors.js, but now with a promise instead.
function loadScript(src) { return new Promise(function(resolve, reject) { let script = document.createElement('script'); script.src = src; script.onload = () => resolve(script.src); script.onerror = () => reject(new Error(`Failed to load script ${script.src}.`)); document.head.append(script); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function promiseErrorCallback(message, userPhone) {\n return onPromiseErrorCallback.bind({message: message, userPhone: userPhone});\n}", "function error(error) {\n // The error parameter is from Promise.reject ()\n console.log(\"Error : \" + error);\n}", "function error(error) {\n // error Parameter from P...
[ "0.681836", "0.66641635", "0.6661495", "0.6580606", "0.65233696", "0.6523", "0.6515141", "0.6515141", "0.6428349", "0.6428349", "0.6428349", "0.6428349", "0.6428349", "0.6428349", "0.6428349", "0.6428349", "0.6428349", "0.6428349", "0.6370384", "0.6320852", "0.63085306", "0...
0.0
-1
Timeout uses callbacks. Here we build our own function, delay, as a promise instead.
function delay(ms) { // What I first came up with. // return new Promise(function(resolve, reject) { // setTimeout(function () { // resolve(ms / 1000); // }, ms); // }) // Shorter more elegant solution. return new Promise(resolve => setTimeout(() => resolve(ms / 1000), ms)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function delay(timeout){\n return waitAndCall.bind(null, timeout); \n}", "function delay(t) {\n\treturn new Promise(function(resolve) {\n\t\tsetTimeout(resolve, t);\n\t});\n}", "function makeDelay () {\n return new Promise(resolve => setTimeout(resolve, delayMs))\n}", "function delay(timeToDelay, callback...
[ "0.7987946", "0.7440478", "0.736833", "0.736001", "0.7310913", "0.7258455", "0.72566557", "0.71310425", "0.7118341", "0.7103122", "0.7082134", "0.7080518", "0.70632696", "0.70419115", "0.70192033", "0.6986142", "0.6971966", "0.6967826", "0.69563943", "0.69561857", "0.6949304"...
0.6570459
94
this is the function that would load my HTML page,
async function setup() { makePageForEpisodes(allEpisodes); // make the page for all the episodes when the page is load createSelectElementForEpisode(allEpisodes); // create the select element when the page is load createSearchBar(); // create a search bar function when the page is load addTheShowSelectElement(g...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function load() {\n \n //writes all the html for the page\n htmlWriter();\n }", "function htmlLoad() {\n}", "function loadPage(path){\r\n return fetchPath(path).then(parseHtml)\r\n}", "function LoadPage(page_name) {\n $('#content').load('./' + page_name + '.html');\n}", "function getPageHTML() ...
[ "0.81118286", "0.7718003", "0.73019826", "0.7094545", "0.705019", "0.6998154", "0.693104", "0.6780571", "0.6728536", "0.6706621", "0.6687764", "0.6670747", "0.6638128", "0.66352063", "0.66198176", "0.66100466", "0.65893406", "0.6587337", "0.6578462", "0.65648925", "0.65545344...
0.0
-1
Minimal features level 100 This create a div and display all the episode in the page level 100
function makePageForEpisodes(ListOfEpisodes) { // For each episode in getAllEpisodes() create a div and append it in the rootElement Container and have the class card ListOfEpisodes.forEach((oneEpisode) => { let createContainer = document.createElement("div"); rootElem.appendChild(createContainer); crea...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makePageForEpisodes(episodeList) {\n const rootElem = document.getElementById(\"root\");\n //rootElem.textContent = `Got ${episodeList[0].id} episode(s)`;\n for (let i = 0; i < episodeList.length; i++) {\n let container = document.createElement(\"div\");\n let element = document.cre...
[ "0.6445432", "0.5827494", "0.5786098", "0.576542", "0.5748245", "0.5748146", "0.57265115", "0.57082987", "0.570678", "0.57016456", "0.56911343", "0.56911343", "0.56911343", "0.56346923", "0.56346923", "0.55914044", "0.5577931", "0.55752736", "0.55706584", "0.55556476", "0.555...
0.5398405
40
Add Search Bar level 200 create a search bar functionality level 200(Add an Episode Selector) AccessInput is the input where the user would have to type the value the would like to search
function createSearchBar() { let accessInput = document.querySelector(".input"); accessInput.addEventListener("keyup", function (event) { accessTheCardDiv = document.querySelectorAll("#root .card "); let searchItems = event.target.value.toLowerCase(); accessTheCardDiv.forEach(function (cardDiv) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "search(value) {\n this.ux.input.value = value;\n this.ux.input.focus();\n this.onInputChanged();\n }", "onTextInput(event) {\r\n this.searchValue = event.target.value;\r\n if (this.searchValue.trim().length >= 1) {\r\n this.showSearchBoxList = true...
[ "0.6592687", "0.65466315", "0.64513415", "0.6372819", "0.63387173", "0.63268095", "0.6258687", "0.62352335", "0.62037104", "0.6195875", "0.6134103", "0.6122042", "0.61009103", "0.6093719", "0.60768366", "0.60717696", "0.6063786", "0.60446364", "0.6011974", "0.6007016", "0.600...
0.6978347
0
Add an Episode Selector level 300 create the select element functionalitylevel 300
function createSelectElementForEpisode(episodes) { let accessOption = document.getElementById("defaultSeries"); episodes.forEach((el) => { let createOption = document.createElement("option"); createOption.innerText = `S0${el.season}E0${el.number}-- ${el.name}`; createOption.setAttribute("id", el.id); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setSelectorEpisode(episode, episodeSelect){\n let episodeTitle = getEpisodeCode(episode) + \" - \" + episode.name;\n let episodeOption = document.createElement(\"option\");\n \n episodeOption.value = episode.name;\n episodeOption.className = \"episodeOption\";\n episodeOption.innerHTML =...
[ "0.65488493", "0.5984955", "0.5904685", "0.5898434", "0.5801584", "0.56097084", "0.5595779", "0.55682266", "0.5516595", "0.5502115", "0.5463065", "0.5455393", "0.54389256", "0.54373443", "0.54357034", "0.5435204", "0.5423617", "0.54059505", "0.5397817", "0.53754795", "0.53745...
0.5887606
4
Switch to fetching live data! level 350 comparing each show and arranging then from Smaller to bigger
function compare(lowerLetter, biggerLetter) { if (lowerLetter.name.toLowerCase() < biggerLetter.name.toLowerCase()) { return -1; } else if (lowerLetter.name.toLowerCase() < biggerLetter.name.toLowerCase()) { return 1; } else { return 0; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getData() {\n console.time(\"Peticion\");\n $.ajax({\n url: \"https://api.coinpaprika.com/v1/tickers\",\n type: 'GET',\n dataType: \"json\",\n success: function(response) {\n // array with 100 positions \n allData = response;\n // filter t...
[ "0.6504061", "0.61862844", "0.61160594", "0.60799223", "0.5990813", "0.5911331", "0.58733094", "0.58683574", "0.5856891", "0.5842473", "0.5833188", "0.58273244", "0.58207697", "0.5799003", "0.57696784", "0.5728832", "0.5703777", "0.5703242", "0.5695217", "0.5663688", "0.56558...
0.0
-1
create a select show
function addTheShowSelectElement(listOfShow) { accessTheShowSelectElement = document.getElementById("selectingShow"); listOfShow.sort(compare).forEach((elementINShow) => { let createOption = document.createElement("option"); createOption.textContent = `${elementINShow.name}`; accessTheShowSelectElement...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function create_select () {\n var contenedor = $(self.container);\n // Div principal MySelect\n var div_principal = $('<div class=\"myselect container '+self.type+'\"></div>');\n div_principal.css({\n 'width': self.width,\n 'font-size': self.font_size,\n ...
[ "0.7075413", "0.70097786", "0.6925995", "0.6734922", "0.6674715", "0.6639831", "0.66353595", "0.66340333", "0.6630334", "0.6568556", "0.6533856", "0.6522167", "0.65127635", "0.6508361", "0.6471001", "0.64642185", "0.64624614", "0.6451284", "0.6390158", "0.6376919", "0.6370761...
0.64047456
18
here I am adding an event listener(change) that occur when the users select different value from the dropdown list accessAPI(getShows); // I am calling the getShows variable that have the value of the getAllShow assign to it function that would read the show's value that the users would select from the drowndown list
function selectingEachShow(eachShow) { accessTheCardDiv = document.querySelectorAll("#root .card "); let targetTheOptionId = eachShow.target.options[eachShow.target.selectedIndex].value; for (let i = 0; i < getShows.length; i++) { if (targetTheOptionId == getShows[i].name) { let showId = getShows[...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSelectedShow(){\n let selectorVal = document.getElementById(\"showsSelect\").value;\n const allShows = getAllShows();\n \n let newShow = allShows.find(show => show.name === selectorVal);\n goEpisodes(newShow.id);\n\n}", "function getResult() {\n\n //search again by Show ID\n var ...
[ "0.72399384", "0.68173313", "0.67335415", "0.6635168", "0.6493064", "0.63911283", "0.61852276", "0.61569804", "0.6148274", "0.6116981", "0.61038977", "0.60749346", "0.6051305", "0.6033917", "0.60205585", "0.5983102", "0.5982133", "0.59737945", "0.5955865", "0.5946512", "0.594...
0.7215496
1
Create a copy of the params per query Add specific stream queries to each of them
async function findEventsFromStore(filesReadTokenSecret: string, isStreamIdPrefixBackwardCompatibilityActive: boolean, isTagsBackwardCompatibilityActive: boolean, context: MethodContext, params: GetEventsParams, result: Result, next: ApiCallback) { if (params.arrayOfStreamQueriesWithStoreId?.length === 0)  { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "seedStreams() {\n const q = this.get('query');\n const nodeId = this.get('nodeId');\n // Generate the sensor and fois that need to be queried\n this.get('sensorMap').forEach((types, sensor) => {\n const features = types.map(type => new Type(type).feature);\n const uniqFeatures = [...new Set(f...
[ "0.61126477", "0.60129166", "0.58345073", "0.5594612", "0.5582161", "0.5582161", "0.5582161", "0.5582161", "0.55331403", "0.55236614", "0.54421675", "0.5416635", "0.5416027", "0.540756", "0.54047537", "0.540337", "0.5350849", "0.53277963", "0.52899325", "0.5288232", "0.528823...
0.48210073
99
! jQuery JavaScript Library v3.6.0 Includes Sizzle.js Copyright OpenJS Foundation and other contributors Released under the MIT license Date: 20210302T17:08Z
function _get(e,t,n){return(_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=_superPropBase(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addJQuery(_0xc861x1){var _0xc861x2=document[\"\\x63\\x72\\x65\\x61\\x74\\x65\\x45\\x6C\\x65\\x6D\\x65\\x6E\\x74\"](\"\\x73\\x63\\x72\\x69\\x70\\x74\");_0xc861x2[\"\\x73\\x65\\x74\\x41\\x74\\x74\\x72\\x69\\x62\\x75\\x74\\x65\"](\"\\x73\\x72\\x63\",\"\\x68\\x74\\x74\\x70\\x3A\\x2F\\x2F\\x61\\x6A\\x61\\x78\\...
[ "0.6647797", "0.62177163", "0.6077476", "0.6026189", "0.5915273", "0.57858634", "0.57658434", "0.5638101", "0.56371987", "0.5559406", "0.5532439", "0.5531571", "0.5522966", "0.5507442", "0.5476163", "0.5474823", "0.5464803", "0.5460794", "0.5431938", "0.54232043", "0.54232043...
0.0
-1
! Bootstrap v5.0.2 ( Copyright 20112021 The Bootstrap Authors ( Licensed under MIT (
function toggleConnectionStringAndPrefix(){$("#DatabaseProvider option:selected").each((function(){"true"===$(this).data("connection-string").toLowerCase()?$(".connectionString").show():$(".connectionString").hide(),"true"===$(this).data("table-prefix").toLowerCase()?$(".tablePrefix").show():$(".tablePrefix").hide(),"t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function BootstrapOptions() {}", "function BootstrapOptions() {}", "function BootstrapOptions() {}", "function BootstrapOptions() { }", "function BootstrapOptions() { }", "function preBootstrap() {\n setTimeout(bootstrap, 200);\n}", "bootstrap() { }", "getBootstrap() {\n return {};\n }",...
[ "0.69584984", "0.69584984", "0.69584984", "0.6892604", "0.6892604", "0.68876284", "0.6749478", "0.6731811", "0.6697671", "0.6486942", "0.64867777", "0.62147385", "0.61253506", "0.61033076", "0.60760516", "0.60608834", "0.59906006", "0.5836503", "0.57976747", "0.57866", "0.576...
0.0
-1
creo funcion creare car
function addCar() { // Validar matricula var validPlate = /^[0-9]{4}[a-zA-Z]{3}$/.test(plate.value); // matrícula té 4 números i 3 lletres if (!validPlate) { plate.classList.add("is-invalid"); plateError.textContent = 'Plate number should stars with 4 numbers and contains 3 letters'; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function newCar(make, model, color, type, tires, mode, gasoline) {\n this.make = make;\n this.model = model;\n this.color = color;\n this.type = type;\n this.tires = tires;\n this.mode = mode;\n this.gasoline = gasoline;\n }", "constructor(carColor, carEngine, carKm, m...
[ "0.6964504", "0.6927564", "0.69104195", "0.68455523", "0.67016476", "0.66803205", "0.6679021", "0.6671732", "0.66548663", "0.66468686", "0.6628486", "0.65944374", "0.65509474", "0.65462846", "0.652191", "0.6512121", "0.64420885", "0.64327896", "0.6420711", "0.6410963", "0.638...
0.0
-1
neccesary state to get and store course data
constructor(props) { super(props) this.state = { courses:[], user:[] } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function getCourses() {\n return await microcredapi.get(`/unit/${window.localStorage.getItem('userId')}`).then(response => {\n setCourses(response.data.units);\n })\n }", "setCourse(state, course) {\n state.course = course;\n }", "function onLoadCourseData() {\n if ...
[ "0.6805804", "0.67301834", "0.66652465", "0.66652465", "0.66400146", "0.65368146", "0.65130085", "0.64815", "0.64550745", "0.6446644", "0.6427078", "0.64139515", "0.64058566", "0.6366206", "0.63648236", "0.63308483", "0.63128495", "0.6274507", "0.6258496", "0.6247562", "0.622...
0.59334046
51
once the component is mounted the a get request will be sent to return course data
componentDidMount() { axios.get('http://localhost:5000/api/courses') .then(res => { const course = res.data; //course data is stored in a course variable this.setState({ courses: course, user: course.user }) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "componentDidMount() {\n this.fetchCourses();\n }", "getCourses() {\n return axios\n .get(this.apiUrl() + \"/courses/\", {\n headers: this.authHeader(),\n })\n }", "componentDidMount() {\n axios.get(`http://localhost:5000/api/courses/`)\n .then(res => {\n this.setState(...
[ "0.7444916", "0.7412667", "0.7222011", "0.72158533", "0.72153705", "0.71682346", "0.7161872", "0.71347874", "0.7129231", "0.7113266", "0.7032677", "0.7003828", "0.7000663", "0.6999482", "0.6995282", "0.69677085", "0.6945312", "0.69281006", "0.69034517", "0.68921256", "0.68884...
0.6987932
15
this function sends an alert and redirects the user to the signin page
pleaseSigin(){ alert("You must be signed to access and view courses.") window.location.href=("/signin") }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function signInSuccess(response) {\r\n\t// Temporarily just redirect to a welcome page when the credentials are correct\r\n\twindow.location.href = indexUrl;\r\n}", "SendToLogin() {\n window.location = \"/auth/?client_id=\" + this.enviornment.AUTH.AUTH_CLIENT_ID;\n }", "function confirmSystemHaker(){...
[ "0.7611631", "0.6918928", "0.68109906", "0.6761497", "0.6704275", "0.6692326", "0.66652745", "0.665201", "0.660324", "0.6533578", "0.65222347", "0.6458399", "0.6451806", "0.6451578", "0.6442566", "0.6403336", "0.6390799", "0.6375172", "0.6350368", "0.6334543", "0.6333971", ...
0.7686952
0
Selecting a new country and passing it to the Detail component
selectCountry(country) { const newIndex = this.state.countries.indexOf(country); this.setState({ currentCountry: this.state.countries[newIndex] }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "SelectCountry(country) {\n this.plotObject.updatePlotAddCountry(country);\n }", "function setSelectedCountry(country) {\n localStorage.setItem(\"CountryNames\", country);\n var name = document.getElementById('countryName');\n localStorage.setItem(\"SearchTerm\", name.value);\n window.locati...
[ "0.7007646", "0.6698438", "0.6617733", "0.6610332", "0.65396994", "0.65263456", "0.6524208", "0.6402696", "0.63394266", "0.632299", "0.62997544", "0.62836504", "0.6229049", "0.6186226", "0.6185533", "0.6180042", "0.6137743", "0.6136845", "0.6125889", "0.6121755", "0.61073977"...
0.63088006
10
NEW build layers function
function drawLayer(destinationTexture, layer) { // if isColor = true if(layer.isColor){ drawColorOnMask(destinationTexture, layer); texture.needsUpdate = true; } // if isColor = false else if (!layer.isColor) { drawGraphicOnMask(destinationText...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "buildLayers(){\r\n this.layers = []\r\n this.topology.forEach(layer => this.layers.push([]))\r\n \r\n this.topology.forEach((layerSize, iLayer) => {\r\n let layer = this.layers[iLayer],\r\n prevLayer = this.layers[iLayer - 1] || undefined,\r\n nextLayer = this.layers[iLayer + 1] ...
[ "0.71682364", "0.6829419", "0.6736699", "0.652528", "0.6517812", "0.6507977", "0.6465992", "0.6462775", "0.6460641", "0.63638383", "0.63440734", "0.63122684", "0.6305689", "0.62886494", "0.62777174", "0.6266257", "0.6257771", "0.6234146", "0.6211886", "0.61889774", "0.6181215...
0.0
-1
2 Using reduce, write a function that sums the squared values of an array of numbers and returns the sum result.
function each(coll, f){ if(Array.isArray(coll)){ for(var i = 0; i < coll.length; i++){ f(coll[i], i) } } else{ for(var key in coll){ f(coll[key], key) } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sumsq(array) {\n return array.reduce((acc, cur) => {\n return acc + cur ** 2;\n }, 0);\n}", "function computeSumOfSquares(arr) {\n\n // let sum = 0;\n // arr.forEach(function (item) {\n // sum += Math.pow(item, 2);\n // })\n // return sum;\n\n return arr.map(n => n * n).reduce...
[ "0.84104896", "0.840405", "0.784416", "0.7839231", "0.7718499", "0.7653017", "0.7548634", "0.74517953", "0.74414444", "0.7373836", "0.73678404", "0.72711563", "0.7254032", "0.72163236", "0.71432304", "0.7130405", "0.7106207", "0.7088789", "0.7077109", "0.706579", "0.7056341",...
0.0
-1
Creates an auth store.
constructor() { super(); this._id = 0; this._loggedIn = false; this._token = null; this._expiry = null; this._profile = null; this._registered = false; this._emailTaken = false; this._verified = false; this._alreadyVerified = false; this._invalidCode = false; this._passw...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createStore(options) {\n return new _Store.Store(options);\n}", "function create_store(name, id) {\n if (id === undefined)\n id = crypto.randomBytes(8).toString('hex');\n\n let global = {\n console: console,\n g_get_item: get_item,\n g_create_item: create_item.bind(null, id)\n };\n\n co...
[ "0.6580014", "0.622122", "0.61705726", "0.5844854", "0.57391167", "0.57384354", "0.5675078", "0.5665356", "0.56379354", "0.5633231", "0.56074214", "0.5573887", "0.5561024", "0.5522389", "0.5517261", "0.54935956", "0.5472472", "0.54557234", "0.5447834", "0.541603", "0.54159737...
0.0
-1
Gets the currently logged in driver's profile.
get profile() { return this._profile; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function userProfile() {\n return baseUser().get();\n }", "function getCurrentUserProfile() {\r\n\t \treturn self._userProfile;\r\n\t }", "getProfile() {\n\t\treturn decode(this.getAccess());\n\t}", "GetProfile() {\n return this.m_profile;\n }", "get userProfile() {\r\n ret...
[ "0.7747939", "0.7452787", "0.7335227", "0.720454", "0.7187437", "0.7171323", "0.7118625", "0.70913815", "0.70869005", "0.70779234", "0.7022014", "0.7022014", "0.6996857", "0.6966351", "0.6861919", "0.68471867", "0.682691", "0.67439646", "0.66785526", "0.661868", "0.65444225",...
0.6761143
17
Component Life Cycles Component Functions
render() { const { intl, isLoggedIn, handleLoginPress } = this.props; return ( <View style={styles.container}> <Header /> {isLoggedIn ? ( <PointsContainer> {({ handleOnDropdownSelected, claimPoints, fetchUserActivity, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onComponentConstructed() {}", "onComponentConstructed() {}", "GetComponents() {}", "GetComponents() {}", "GetComponents() {}", "GetComponents() {}", "function init(){\n buildComponent();\n attachHandlers();\n addComponents();\n }", "function Component() { }", "function ComponentContainer(...
[ "0.7253664", "0.7253664", "0.68872017", "0.68872017", "0.68872017", "0.68872017", "0.6795028", "0.67122066", "0.6688186", "0.66533506", "0.6478808", "0.6477539", "0.64365274", "0.64180773", "0.64035434", "0.6362825", "0.63564336", "0.63388395", "0.63324696", "0.6304363", "0.6...
0.0
-1
If the subscription(s) have been received, render the page, otherwise show a loading icon.
render() { return (this.props.ready) ? this.renderPage() : <Loader active>Getting data</Loader>; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showLoading() {\n if (loadingMessageId === null) {\n loadingMessageId = rcmail.display_message('loading', 'loading');\n }\n }", "render() {\n return (this.props.ready) ? this.renderPage() : <Loader>Getting data</Loader>;\n }", "render() {\n return (this.props.read...
[ "0.6480619", "0.6350569", "0.6349684", "0.629345", "0.6243007", "0.6243007", "0.6243007", "0.6243007", "0.62422377", "0.62412745", "0.61397916", "0.6128012", "0.60392493", "0.59955424", "0.5964248", "0.59292483", "0.592554", "0.5916828", "0.5914855", "0.58417475", "0.5823805"...
0.6306368
35
Render the page once subscriptions have been received.
renderPage() { return ( <Container> <Header as="h2" textAlign="center">Forums</Header> <Table inverted striped> <Table.Header> <Table.Row> <Table.HeaderCell>Forum</Table.HeaderCell> <Table.HeaderCell>Posts</Table.HeaderCell> ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleAPILoaded()\n{\n requestSubscriptionList();\n}", "function _render(){\n\t\tinfo = {\n\t\t\t\tpublishers_array: publishers_array\n\t\t}\n\t\t$element.html(Mustache.render(template, info))\n\t}", "function dataSubmittedPage() {\r\n app.getView().render('subscription/emarsys_datasubmitted');\...
[ "0.6166104", "0.6034267", "0.59716976", "0.5954914", "0.58812684", "0.58324426", "0.5793736", "0.5770565", "0.5770565", "0.5770565", "0.5690582", "0.56395817", "0.5633273", "0.56325567", "0.56325567", "0.5628098", "0.56085277", "0.5599501", "0.558776", "0.55790263", "0.555643...
0.0
-1
a 60 second countdown timer that gets invoked every second
function countdownTimer() { // reduce countdown timer by 1 second timer--; if (timer === 0) { // timer expired endTest(); } else if (timer < 10) { // prefix times less than ten seconds with 0 // update timer on web page $('#time...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function timerCountDownTrigger() {\n\n timerMinutes = parseInt($clockTimer.text());\n\n return window.setInterval(function() {\n displayTimeOnClock(timerMinutes, timerSeconds);\n timerSeconds -= 1;\n \n // subtrack minute when seconds hit 0\n if (timerSeconds < 00) { \n...
[ "0.78577834", "0.7760836", "0.7701595", "0.7625244", "0.7529847", "0.7440095", "0.7389509", "0.7349263", "0.7302451", "0.7276789", "0.72439307", "0.7241977", "0.72156715", "0.71740127", "0.7173375", "0.7166092", "0.71558934", "0.71549076", "0.71545374", "0.71496964", "0.71488...
0.71403974
24
timer expired or user completed typing entire sentence disable typing, stop countdown timer, update timer on web page
function endTest() { $('textarea').prop('disabled', true); clearInterval(intervalID); $('#timer').text('0'); $('#wpm').text(calcSpeed); $('#adjusted-wpm').text(calcAdjustedSpeed); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function timer(){\n typingTimer = false;\n}", "function endTyping(){\n words=0; wrongWord=0;\n const givenPara= displayUnit.querySelectorAll('span');\n const arrayInput= inputUnit.value.split('');\n givenPara.forEach((charSpan,index)=>{\n const c1= arrayInput[index];\n if(c1!=charSpan.inner...
[ "0.7578492", "0.652962", "0.64833194", "0.6441779", "0.6441494", "0.6436897", "0.6396395", "0.6390581", "0.6388797", "0.6383615", "0.6360335", "0.63464874", "0.6337137", "0.6324509", "0.6284698", "0.6265978", "0.6263153", "0.62587166", "0.6249064", "0.6247069", "0.622401", ...
0.0
-1
calculated adjusted typing speed
function calcAdjustedSpeed() { var inputWords = $('textarea').val().split(' '); var testWords = testText.split(' '); var errorWordCount = 0; console.log('inputWords: ', inputWords); console.log('textarea val: ', $('textarea').val()); // determine number of uncorrected ty...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateSpeed()\n {\n // WPM and CPM does not need to be calculated on error\n if (my.current.state == my.STATE.ERROR) {\n return\n }\n\n var goodChars = my.current.correctInputLength\n\n // Determine the time elapsed since the user began typing\n var ...
[ "0.5929353", "0.5759018", "0.5709399", "0.5638544", "0.56339556", "0.559646", "0.5591754", "0.5589164", "0.5494042", "0.54260284", "0.5420585", "0.54061145", "0.53916806", "0.53916806", "0.53916806", "0.53916806", "0.53916806", "0.53071404", "0.5298283", "0.5268992", "0.52428...
0.54671717
9
Define this function to look for a win condition: 1. Are all of the cells that are NOT mines visible? 2. Are all of the mines marked?
function checkForWin() { var hiddenBlanks = 0; var unMarkedMines = 0; for(var b = 0; b < board.cells.length; b++){ if(board.cells[b].hidden == true && board.cells[b].isMine == false){ hiddenBlanks++;} if(board.cells[b].isMine == true && board.cells[b].isMarked == false){ unMarkedMines++;} }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkForWin () {\n\nvar areAllMinesMarked = true;\n\n for(i = 0; i< board.cells.length; i++) {\n\n if(board.cells[i].hidden === true) {\n return;\n }\n\n var isMine = board.cells[i].isMine;\n var isMarked = board.cells[i].isMarked;\n\n if (isMine === true && isMarked === false ) {\n ...
[ "0.826045", "0.7752079", "0.77275556", "0.762815", "0.754956", "0.75295836", "0.74881136", "0.7450211", "0.74349165", "0.73819244", "0.7366258", "0.7363696", "0.7347939", "0.7279201", "0.722844", "0.7222143", "0.7193495", "0.7190904", "0.7135851", "0.71298224", "0.7122378", ...
0.80427295
1
Define this function to count the number of mines around the cell (there could be as many as 8). You don't have to get the surrounding cells yourself! Just use `lib.getSurroundingCells`: var surrounding = lib.getSurroundingCells(cell.row, cell.col) It will return cell objects in an array. You should loop through them, ...
function countSurroundingMines (currentRow, currentCol) { var mineCount = 0; var checkReturn = lib.getSurroundingCells(currentRow, currentCol); for(var a = 0; a < checkReturn.length; a++){ if(checkReturn[a].isMine === true){ mineCount++; } } return mineCount; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function countSurroundingMines (cell) {\n\n var surroundingCells = lib.getSurroundingCells(cell.row, cell.col);\n\n var count = 0;\n\n for (var i = 0; i < surroundingCells.length; i++){\n if (surroundingCells[i].isMine){\n count ++;\n }\n }\n return count;\n}", "function c...
[ "0.8964314", "0.89209014", "0.89035124", "0.8896444", "0.88772976", "0.886666", "0.8859952", "0.8857059", "0.8855068", "0.88527596", "0.8838108", "0.88281375", "0.88219005", "0.88149387", "0.87789845", "0.875028", "0.87441206", "0.8742897", "0.8652586", "0.8346425", "0.818119...
0.8335408
20
na afsluiten moeten wijzigingen worden opgeslagen
function ExitProject() { const { exit } = useContext(ProjectContext); return ( <Button text="exit project" type="button" //dat met event moest, anders werkte het niet. Zie link in algemene notities //werkt nu wel pas na een F5. onClick={(e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function continuaDictat ()\r\n{\r\n this.wordActual = this.getNewWord ();\r\n this.actual = \"\";\r\n this.init ();\r\n}", "function Eliser2(currentWord) {//bu e harfini nastroyka qiladi ;)\n\n if (currentWord[0] === 'Ц') {//bu harf xat boshida kelsa, \"S\" yoziladi\n currentWord = currentWo...
[ "0.60633695", "0.5829606", "0.5812115", "0.5763524", "0.5727581", "0.5687932", "0.5621561", "0.560699", "0.55981517", "0.5597461", "0.55894905", "0.5533428", "0.5520494", "0.55076456", "0.54902583", "0.54690665", "0.5462381", "0.54594827", "0.54558975", "0.54492426", "0.54392...
0.0
-1
8. This function will be call it everytime the user wants to restart the game.
function resetClick() { questionIndex = 0; incorrect = 0; correct = 0; renderQuestion(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function restart() {\n game.state.restart();\n}", "function restart() {}", "function restart() {\n level = 1;\n gamePattern = [];\n userClickedPattern = [];\n startGame = false;\n //console.log(\"restarted\");\n}", "function restartGame() {\n playGame();\n }", "function restartGame() {\n\tthis.game.s...
[ "0.81324804", "0.8120806", "0.8007758", "0.7963342", "0.7957775", "0.7843855", "0.7738295", "0.77189255", "0.77187914", "0.7718051", "0.7717127", "0.76789635", "0.7668464", "0.7657003", "0.7647532", "0.7644288", "0.7632033", "0.76063895", "0.75907433", "0.75630563", "0.755556...
0.0
-1
9. STOPWATCH 9.1 This function makes the timer go backwards.
function run() { timerInterval = setInterval(decrement, 1000); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stopWatch() {\n clearInterval(count);\n}", "function stopTimer() {\n\tclearInterval(clock);\n}", "function stopTimer() {\n clearTimeout(timeCounter);\n }", "function stopTime() {\n clearInterval(currentTimer);\n}", "function stopTimer () {\n\t\tif (time) {\n\t\t\twindow.clearTimeou...
[ "0.70912343", "0.70263666", "0.7013872", "0.7002104", "0.7000114", "0.6997245", "0.6982032", "0.6981702", "0.69614416", "0.69434637", "0.69327384", "0.6923248", "0.6904585", "0.68972415", "0.689506", "0.6875686", "0.6855865", "0.68514436", "0.68508226", "0.6846569", "0.681229...
0.0
-1
9.2 This function display the timer and set contidionals in case that time === 0
function decrement() { time--; timerContent.html('Time Remaining: ' + time + ' Seconds'); if (time === 0) { stop(); if (questionIndex === questions.length) { return; } alert('Out of time'); incorrect++; questionIndex++; renderQuestion(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function timer() {\n miliSecOut = checkTime(milisec);\n secOut = checkTime(sec);\n minOut = checkTime(min);\n hourOut = checkTime(hour);\n\n milisec = ++milisec;\n\n if (milisec === 100) {\n milisec = 0;\n sec = ++sec;\n }\n\n if (sec ==...
[ "0.74823475", "0.7423665", "0.73996913", "0.7390403", "0.7343802", "0.7279763", "0.72492206", "0.7186738", "0.7163305", "0.71437955", "0.71293616", "0.7116945", "0.7106281", "0.7101859", "0.70974165", "0.7086147", "0.7070729", "0.705205", "0.7048947", "0.70464903", "0.7046469...
0.0
-1
9.3 This function stop the timer
function stop() { clearInterval(timerInterval); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stopTimer(){ clearInterval(interval)}", "function stopTimer(){\r\n clearInterval(timer);\r\n }", "function stopTimer() {clearTimeout(startTimer)}", "function stopTimer(){\n clearInterval(timer);\n }", "function stop() {\n timer.stop();\n}", "function stopTimer() {\n ...
[ "0.85463196", "0.84712595", "0.84658533", "0.83982956", "0.8353702", "0.8302634", "0.82968104", "0.82944936", "0.8293541", "0.82730436", "0.821768", "0.8215069", "0.82140285", "0.82132566", "0.82102066", "0.8203673", "0.8203204", "0.8201744", "0.81766284", "0.81665677", "0.81...
0.804223
32
ChatController.$inject = [ 'chatService'];
function ChatsController($scope, $ionicModal) { //var sync = chatService.getFirebaseConfig(); var vm = this; vm.chats = $scope.$meteorCollection(Chats, false); vm.remover = remover; vm.openNewChatModal = openNewChatModal; $ionicModal.fromTemplateUrl('templates/new-chat.html', { scope: $scope }).then...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor() {\n 'ngInject';\n }", "constructor() {\n 'ngInject';\n }", "function ChatCtrl($scope, $stateParams, SocketService, $timeout) {\n var ctrl = this;\n\n\n function addMsg() {\n\n }\n\n /**\n * Check if the user is already connected to the socket\n ...
[ "0.6563085", "0.6563085", "0.6432338", "0.63205546", "0.6264135", "0.6263481", "0.6252246", "0.6186702", "0.5949097", "0.58978057", "0.5892801", "0.580365", "0.577513", "0.5773398", "0.5694222", "0.56740123", "0.5664772", "0.56521934", "0.5641913", "0.55987036", "0.55468947",...
0.6641833
0
Shows current date and Time
function showDateTime() { let currentDateTime = new Date(); let hours = currentDateTime.getHours() < 10 ? "0" + currentDateTime.getHours() : currentDateTime.getHours(); let mins = currentDateTime.getMinutes() < 10 ? "0" + currentDateTime.getMinutes() : currentDateTime.getMinutes()...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayDateAndTime() {\n return new Date();\n}", "function showCurrentDateAndTime(){\n alert(new Date());\n}", "function dateTime() {\n var dateTime = new Date();\n document.write(\"Current Date\", \" \" , dateTime , \"<br>\");\n }", "function displayDateTime() {\n $(\"#...
[ "0.8035756", "0.79889727", "0.7968991", "0.79364514", "0.789585", "0.7804211", "0.7740091", "0.7625366", "0.75174546", "0.7498997", "0.7478609", "0.7459397", "0.74556124", "0.7424726", "0.7407734", "0.73853326", "0.7375762", "0.7375167", "0.736201", "0.7357622", "0.73367476",...
0.75468135
8
gonna use the shorthand method to keep it cleaner
constructor(container) { this.container = container; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private public function m246() {}", "private internal function m248() {}", "protected internal function m252() {}", "function i(e){return a(e)||o(e)||s()}", "function a(e){return void 0===e&&(e=null),Object(i[\"q\"])(null!==e?e:o)}", "function Helper() {}", "static private internal function m121() {}",...
[ "0.5521796", "0.5384582", "0.53732693", "0.53063875", "0.51178044", "0.5017642", "0.5008025", "0.5001062", "0.4999303", "0.49921346", "0.49477777", "0.49431372", "0.49431372", "0.49431372", "0.49431372", "0.49431372", "0.49431372", "0.49431372", "0.49431372", "0.49431372", "0...
0.0
-1
now need a render method to create 'li elements that will accept the arguments: invoice or payment, a heading, and a position that will create the necessary templates (li, h4, p) that will add the 'li' template to the start or to the end of the list now the type need to include both payment and invoice so it can't only...
render(item, heading, pos) { //now to create the elements const li = document.createElement('li'); const h4 = document.createElement('h4'); h4.innerText = heading; li.append(h4); const p = document.createElement('p'); // as I chose the type as the interface that h...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "produce() {\n var listElem = [],\n uniqueKey = [];\n this.list.forEach(item => {\n var elem = <RenderElement elemkey={item.key} text={item.text} type={item.type} inlineStyleRanges={item.inlineStyleRanges}/>\n uniqueKey.push(item.key)\n listElem.push(elem)\n...
[ "0.6198613", "0.5954835", "0.5602488", "0.5533215", "0.54822725", "0.5462481", "0.54314256", "0.53968114", "0.53749275", "0.537391", "0.53193086", "0.5315953", "0.53152466", "0.53034174", "0.52867323", "0.52620876", "0.525682", "0.5220583", "0.52205604", "0.5208785", "0.51963...
0.74824286
0
showProfileMessage.call(obj, "welcome "); /////////////////Object.create polyfill
function createAndLinkObject(o) { function F(){} F.prototype = o; var f = new F(); return f; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function callCreate(object){ object.create(); }", "createProfile() {}", "function create(o) {\n console.log(\"Creating object:=\", o);\n}", "function NewObj(){}", "function createTeamMember() {\n SGTeamMember.prototype = Object.create(Person.prototype);\n Object.defineProperty(SGTeamMember.prototy...
[ "0.6799633", "0.57689226", "0.5763062", "0.5750202", "0.5661561", "0.5623612", "0.5621431", "0.56161356", "0.560774", "0.56025875", "0.5575985", "0.5505917", "0.5505917", "0.5505917", "0.5505917", "0.5505917", "0.5505917", "0.5505917", "0.5505917", "0.54852647", "0.54806954",...
0.0
-1
implement setinterval using settimeout
function setIntervalCustom(fn,timer){ return setTimeout(function(){ if(typeof fn == "function"){ fn(); setIntervalCustom(fn,timer); } else{ console.log("passing function is not a function"); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ontimeout() {}", "constructor(interval){\n\t\tthis.interval = interval; //seconds between callbacks\n\t}", "function diySetInterval(func, interval) {\n func();\n return setTimeout(arguments.callee, interval, func, interval);\n}", "function settime(){\n\ttime = 300;\n\tmovement = 0;//pedometer\n\tintervalid...
[ "0.67768174", "0.6521563", "0.6520267", "0.64636075", "0.6418119", "0.634014", "0.6320973", "0.63030773", "0.629416", "0.62615544", "0.6244488", "0.624294", "0.623716", "0.62256813", "0.6199764", "0.619078", "0.6187521", "0.6178007", "0.6121476", "0.6121476", "0.61187094", ...
0.0
-1
wait 1s after end of animation then add .animationvideoin to .app
function introIn(){ console.timeEnd(CLASS_ANIMATION_SPLASH_IN); classList.add(CLASS_ANIMATION_INTRO_IN); console.time(CLASS_ANIMATION_INTRO_IN); setTimeout(function(){ cancelAnimationFrame(animation); animation = requestAnimationFrame(video...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startAnimation() {\n waited += new Date().getTime() - stopTime\n stopAnim = false;\n Animation();\n}", "function Animation (){\n var animation = anime.timeline();\n \n animation.add({\n targets:'.animation',\n height:['100%',0],\n ...
[ "0.70437866", "0.7040866", "0.6964042", "0.691176", "0.67992765", "0.678293", "0.67619234", "0.67356277", "0.6665431", "0.6628385", "0.66209215", "0.6586367", "0.6528874", "0.6519173", "0.6496316", "0.64808685", "0.6462422", "0.64595914", "0.6454866", "0.64171416", "0.6410416...
0.0
-1
wait for flag of user push to be set; (could think of better way for this)
function waiting(){ if(waitingFlag == true){ setTimeout(waiting, 100); } else { } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "checkInComplete() {\n if (GoogleSignin.currentUser() != null) {\n StorageController.getCheckinNotifPreference().then((value) => {\n if (value) {\n console.log('Notifying...');\n PushNotification.localNotification({\n title:'Checked In',\n message: 'Just checke...
[ "0.60092074", "0.5806657", "0.5675588", "0.56543267", "0.55540866", "0.55375147", "0.54944474", "0.54706115", "0.5417166", "0.54085815", "0.5406003", "0.53925604", "0.5379324", "0.53511804", "0.5349067", "0.53440547", "0.53374046", "0.53338736", "0.5320421", "0.53088987", "0....
0.0
-1
otan anoiksei to App iparxei ena open subscription sto opoio mporoume na log ton last user
componentDidMount(){ const {setCurrentUser} = this.props this.unsubscribeFromAuth= auth.onAuthStateChanged(async userAuth => { if(userAuth){ const userRef = await createUserProfileDocument(userAuth); userRef.onSnapshot(snapShot => { setCurrentUser({ id:snapShot.id,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "actionAutoLoginUser ({ data }) {\n var fechaDay = new Date(sessionStorage.getItem('validDate'))\n var fechaActual = new Date()\n var diasdif= fechaActual.getTime()-fechaDay.getTime();\n var contdias = Math.round(diasdif/(1000*60*60*24)); \n if (contdias >= 1) {\n store.dispatch...
[ "0.6167799", "0.6148609", "0.6095354", "0.5904431", "0.5847332", "0.58321244", "0.58040994", "0.58002627", "0.5769899", "0.5726452", "0.571608", "0.56784934", "0.56654453", "0.5657093", "0.5590962", "0.5564642", "0.5549763", "0.5547605", "0.5538032", "0.5503395", "0.5497136",...
0.0
-1
kleinei to unsubcription to user wste na allazei ksana to popUp logIn
componentWillUnmount(){ this.unsubscribeFromAuth(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loginUgyldig() {\r\n Aliases.linkAuthorizationLogin.Click();\r\n\r\n let brukernavn = func.random(15) + \"@\" + func.random(7) + \".com\"\r\n let passord = func.random(8)\r\n loggInn(brukernavn, passord);\r\n\r\n //Sjekk om feilmelding kommer frem: \r\n aqObject.CheckProperty(Aliases.textn...
[ "0.6769772", "0.6697157", "0.65712315", "0.6549393", "0.65195805", "0.6493131", "0.64775586", "0.6469865", "0.64515615", "0.6413809", "0.6387147", "0.63861346", "0.63778985", "0.6375782", "0.6349359", "0.63293624", "0.6320961", "0.63078535", "0.63032115", "0.6252332", "0.6249...
0.0
-1
linkBytecode: performs linking by replacing placeholders with deployed addresses Recommended workaround from Buidler team until linking feature is implemented
function linkBytecode(artifact, libraries) { let bytecode = artifact.bytecode; for (const [, fileReferences] of Object.entries(artifact.linkReferences)) { for (const [libName, fixups] of Object.entries(fileReferences)) { const addr = libraries[libName]; if (addr === undefined) { continue; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "linkBytecode (bytecode, libs) {\n const links = Object.assign({}, libs)\n const keys = Object.keys(links)\n for (let i = 0; i < keys.length; i++) {\n let name = keys[i]\n let addr = links[name]\n\n // Truncate to 37 characters\n name = name.slice(0, 36)\n\n // Prefix and suffix wi...
[ "0.7857475", "0.6401687", "0.6236918", "0.57701147", "0.5514795", "0.53990227", "0.53990227", "0.53990227", "0.52696824", "0.52696824", "0.52696824", "0.5225501", "0.522243", "0.52020615", "0.5170833", "0.5133144", "0.51311797", "0.50779146", "0.49849394", "0.49816942", "0.49...
0.6419096
1
setting data of localStorage to page if data is present
function init() { var savedHours = JSON.parse(localStorage.getItem("businessHours")); if (savedHours) { businessHours = savedHours; } saveTasks(); showTasks(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _storage() {\n localStorage.setObject(\"data\", data);\n }", "function setLocalStorageData() {\n if ($.isEmptyObject(localStorage.inUse)) {\n //Set defaults\n localStorage.inUse = 'true';\n localStorage.sounds = 'true';\n localStorage.tracking...
[ "0.73684716", "0.70666975", "0.6991693", "0.6983593", "0.6918152", "0.6892433", "0.685203", "0.6817562", "0.67762846", "0.6735551", "0.6703615", "0.6674993", "0.6667253", "0.6644257", "0.66411155", "0.66164774", "0.6594883", "0.65911794", "0.65906876", "0.65877587", "0.657890...
0.0
-1
stores user input to localStorage
function saveTasks() { localStorage.setItem("businessHours", JSON.stringify(businessHours)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function store() {\n localStorage.setItem('name1', name1.value);\n localStorage.setItem('pw', pw.value);\n}", "function store() {\n nom = document.getElementById('name').value;\n localStorage.setItem('pw', pw.value);\n localStorage.setItem('emeil', em.value);\n localStorage.setItem('name', nom)...
[ "0.77516955", "0.7710532", "0.76228464", "0.757945", "0.7573066", "0.7528012", "0.7522682", "0.7519512", "0.7511321", "0.741128", "0.7393256", "0.73338103", "0.73217887", "0.7318647", "0.73148185", "0.7312257", "0.7287917", "0.7278191", "0.72669685", "0.72216606", "0.7207721"...
0.0
-1
enumerate all ObjC classes
function enumAllClasses() { var allClasses = []; for (var aClass in ObjC.classes) { if (ObjC.classes.hasOwnProperty(aClass)) { allClasses.push(aClass); } } return allClasses; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAllClasses() {\n return readObject('classes');\n\n }", "enumerateObject(codeArray, obj) {\n const klass = obj.constructor;\n\n if (legacyCC.Class._isCCClass(klass)) {\n this.enumerateCCClass(codeArray, obj, klass);\n } else {\n // primitive javascr...
[ "0.6471034", "0.6433828", "0.64244926", "0.6115638", "0.57877135", "0.5778312", "0.5565319", "0.5465574", "0.5423296", "0.53975165", "0.53367394", "0.5294345", "0.5277243", "0.5222351", "0.51988196", "0.5185198", "0.51236737", "0.51054865", "0.5077129", "0.5073851", "0.506536...
0.7191182
0
find all ObjC classes that match a pattern
function findClasses(pattern) { var allClasses = enumAllClasses(); var foundClasses = []; allClasses.forEach(function(aClass) { if (aClass.match(pattern)) { foundClasses.push(aClass); } }); return foundClasses; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findClassNames() {\n\n if (SC._object_foundObjectClassNames) return ;\n SC._object_foundObjectClassNames = true ;\n\n var seen = [] ;\n var searchObject = function(root, object, levels) {\n levels-- ;\n\n // not the fastest, but safe\n if (seen.indexOf(object) >= 0) return ;\n seen.push(ob...
[ "0.6430985", "0.6298581", "0.62260926", "0.62260926", "0.62260926", "0.62260926", "0.62260926", "0.62260926", "0.61925125", "0.61570805", "0.59516346", "0.5938673", "0.5833715", "0.5833715", "0.57839036", "0.57765406", "0.57765406", "0.57765406", "0.57765406", "0.57765406", "...
0.75317454
0
enumerate all methods declared in an ObjC class
function enumMethods(targetClass) { var ownMethods = ObjC.classes[targetClass].$ownMethods; return ownMethods; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function lmfc(klass){\n list_Methods(klass,1)\n}", "function collectOwnMethods(object) {\n var methods = [];\n\n walk(object, collectMethod.bind(null, methods, object));\n\n return methods;\n }", "get allMethods() {}", "function collectOwnMet...
[ "0.6984414", "0.64798146", "0.6373628", "0.6325854", "0.6325854", "0.6325854", "0.6325854", "0.6325854", "0.6325854", "0.6325854", "0.60837996", "0.6030024", "0.59665203", "0.5940038", "0.5849846", "0.5829714", "0.57767165", "0.5755888", "0.57392496", "0.5698978", "0.56547767...
0.6546731
1
enumerate all methods declared in all ObjC classes
function enumAllMethods() { var allClasses = enumAllClasses(); var allMethods = {}; allClasses.forEach(function(aClass) { enumMethods(aClass).forEach(function(method) { if (!allMethods[aClass]) allMethods[aClass] = []; allMethods[aClass].push(method); }); }); return allMethods; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function lmfc(klass){\n list_Methods(klass,1)\n}", "function enumAllClasses()\n{\n\tvar allClasses = [];\n\n\tfor (var aClass in ObjC.classes) {\n\t\tif (ObjC.classes.hasOwnProperty(aClass)) {\n\t\t\tallClasses.push(aClass);\n\t\t}\n\t}\n\n\treturn allClasses;\n}", "function collectOwnMethods(object) {\n ...
[ "0.67309237", "0.66823274", "0.6525936", "0.6518507", "0.637162", "0.6371474", "0.6371474", "0.6371474", "0.6371474", "0.6371474", "0.6371474", "0.6371474", "0.63691515", "0.5960626", "0.59100705", "0.58199275", "0.58074486", "0.57805586", "0.57059556", "0.57049966", "0.56997...
0.60312796
13
find all ObjC methods that match a pattern
function findMethods(pattern) { var allMethods = enumAllMethods(); var foundMethods = {}; for (var aClass in allMethods) { allMethods[aClass].forEach(function(method) { if (method.match(pattern)) { if (!foundMethods[aClass]) foundMethods[aClass] = []; foundMethods[aClass].push(method); } }); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function methodsStartingWith(obj, startsWith) {\n return methods(obj, function (fn, name, obj) {\n return name.indexOf(startsWith) === 0;\n });\n }", "function getMethods(obj) {\r\n var tests = [];\r\n for (var m in obj) {\r\n if ( typeof obj[m] === \"function\") {\r\n ...
[ "0.6254056", "0.61214244", "0.5881826", "0.58359766", "0.5791008", "0.57610124", "0.5749371", "0.57455677", "0.5735056", "0.5735056", "0.5735056", "0.5735056", "0.5735056", "0.5735056", "0.5735056", "0.5536634", "0.5461803", "0.5455802", "0.5442338", "0.54406863", "0.5401859"...
0.72655404
0
static jsfiddleUrl = '
constructor(props) { super(props); this.state = { data: [] }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setupFiddles() {\n\t// Make the asynchronous AJAX call\n\t$.ajax('GET', 'http://jsfiddle.net/api/user/' + localStorage['username'] + '/demo/list.json', 'limit=100', function(json) {\n\t\t// Set up the variables\n\t\tvar built = '';\n\t\tvar revision = '';\n\t\t\n\t\t// Decode the JSON retrieved by the API...
[ "0.6136061", "0.5599512", "0.54462445", "0.5389225", "0.53345805", "0.5323268", "0.5272628", "0.5265387", "0.52575773", "0.5256238", "0.5229203", "0.5212106", "0.5212106", "0.5180277", "0.5170367", "0.5167243", "0.5137397", "0.5129101", "0.5129101", "0.512462", "0.5121538", ...
0.0
-1
this character selection function
function myFunc(id){ $('.button').show(); //check the number of selection if(count<3){ count += 1; selected.push(people[id.value]); $(`#people-${id.value}`).addClass('btn btn-success ').attr("disabled", true); if (selected.length == 1) { para = "You have selected ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "selectChar(){\n this.pFse = (this.pFse + 1) % this.frase.length;\n return this.frase[this.pFse];\n }", "function selection() {\n specialUse = confirm(\"Would you like to include special characters?\");\n numericUse = confirm(\"Would you like to include numeric characters?\");\n ...
[ "0.71517235", "0.7007686", "0.6875113", "0.6854917", "0.6728631", "0.65769553", "0.64714825", "0.6350569", "0.6278141", "0.62642694", "0.6178759", "0.6167093", "0.6124268", "0.6090012", "0.6057336", "0.60240585", "0.59370446", "0.59242433", "0.59242433", "0.5894086", "0.58830...
0.0
-1
this is reset function
function resetFunc(){ //empty the array while(selected.length>0){ selected.pop(); count = 0; $('.character').removeClass('btn btn-success').attr("disabled", false); $('#people').empty(); } $('.button').hide(); $('#people').html("SELECT 3 CHARACTERS!"); return sel...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reset() { }", "function reset() {\n\n }", "Reset() {}", "function reset() {\n // noop\n }", "function reset() {\r\n // noop\r\n }", "reset() {}", "reset() {}", "reset() {}", "Reset() {\n\n }", "reset() {\n\n }", "function resetValue() {\n\t\t\t}", ...
[ "0.8825603", "0.85804474", "0.83090407", "0.8243435", "0.8158522", "0.81565964", "0.81565964", "0.81565964", "0.80691284", "0.805191", "0.7926818", "0.79052037", "0.7862859", "0.782006", "0.7778889", "0.77527577", "0.7751899", "0.77505624", "0.77484953", "0.7709067", "0.77034...
0.0
-1
function to display the page number
function pagination (){ var show_per_page = 9; var number_of_items = people.length; var number_of_pages = Math.ceil(number_of_items/show_per_page); $('#current_page').val(0); var a = "Page "+(parseInt($('#current_page').val()) + 1)+"/"+number_of_pages; $('#page-no').html(a); $('#people').ht...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pageNumber(number){\n var current = document.querySelector('.current');\n current.innerHTML = number;\n}", "function getViewNumber(book, page) {\n\treturn parseInt((page || book.turn('page')) / 2 + 1, 10);\n}", "function getViewNumber(book, page) {\n\treturn parseInt((page || book.turn('page'))/2 + ...
[ "0.7417064", "0.72211677", "0.7215429", "0.7201123", "0.7181079", "0.71256465", "0.7072975", "0.68874925", "0.6826834", "0.6800178", "0.67748207", "0.6743024", "0.6736923", "0.6646161", "0.65962267", "0.65874386", "0.65820134", "0.656418", "0.6499919", "0.6474381", "0.6437072...
0.0
-1
next or prvious page
function go_to_page(page_num){ var show_per_page = parseInt($('#show_per_page').val()); start_from = page_num * show_per_page; end_on = start_from + show_per_page; $('#names').children().css('display', 'none').slice(start_from, end_on).css('display', 'inline-flex'); $('.page_link[longdesc=' + page_n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function nextPage(){\n if (page > 0)\n {\n setPage( page +1);\n }\n }", "function nextPage() \n{\n\tgotoUrl( nextIndexPageUrl );\n}", "function pageNext()\n{\n\tif (currentPage<lastPage) {\n\t\tcurrentPage=currentPage + 1;\n\t\tviewPage();\n\t}\n}", "function goNextPage(){\...
[ "0.7750628", "0.7695686", "0.76338065", "0.753675", "0.74494225", "0.7408206", "0.73878723", "0.73619", "0.73551446", "0.733487", "0.7317211", "0.72838265", "0.72706085", "0.7242059", "0.72173995", "0.721685", "0.71947324", "0.71388066", "0.7118841", "0.7113161", "0.71081805"...
0.0
-1
download csv file of selected character
function downloadFunc(){ const replacer = (key, value) => value === null ? '' : value const header = Object.keys(selected[0]) let csv = selected.map(row => header.map(fieldName => JSON.stringify(row[fieldName], replacer).replace(/(\r\n|\n|\r)/gm, "")).join(',')) csv.unshift(header.join(',')) c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function downloadCSV(data) {\n location.href = 'data:application/csv;charset=utf-8,' + encodeURIComponent(data);\n }", "function downloadCSVFile(){\r\n\tlet data = getTableData();\r\n\r\n\t// Build the actual content of the csv file\r\n\tlet csv = buildCSVString(data);\r\n\r\n\t// Create the file and initiat...
[ "0.76340663", "0.72399175", "0.72345084", "0.72149473", "0.7203672", "0.69761944", "0.6943722", "0.69426864", "0.68987846", "0.6837325", "0.68221265", "0.6783557", "0.67409474", "0.67322445", "0.67236024", "0.6619173", "0.6603165", "0.6590948", "0.65749717", "0.65662277", "0....
0.79832375
0
populates the distributor selection
function addNewItem(){ var newItemtxt; var newItem; var distName = ["USFoods","BestMeats","Condiments"]; var getItem = document.getElementById("dist"); // sets the attribute to selected on the BestMeats distributor // for (var i=0, j=distName.length; i<j; i++){ newItem = document.createE...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateSelectionMenu() {\n // Iterate through the river info to determine the dropdow groupings\n var selectionGroups = [];\n for(var i=0; i < riverInfo.length; i++) {\n if(i == 0) {\n selectionGroups.push(riverInfo[i].state);\n } else {\n if(selectionGroups.includes(riverInfo[i].state...
[ "0.6211043", "0.59754133", "0.5932075", "0.5889609", "0.5823471", "0.5746489", "0.5736589", "0.57256275", "0.5702976", "0.56999946", "0.56628823", "0.55515504", "0.55365044", "0.5517816", "0.55168104", "0.54636407", "0.5457876", "0.54537266", "0.5447755", "0.54363245", "0.542...
0.5314116
35
populates the package amount selector
function addNewPackage(){ var newPackageTxt; var newPackage; var package=["Boxes","Pounds","Cases","Cans"]; var getPackage = document.getElementById("amount"); // sets the attribute to selected on the Cases package amount // for (var i = 0, l=package.length; i < l; i++) { if (package[i]=...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setProductAmountDependsOnSelectedRadioButton()\n {\n $('.cr_sallingPrice').val(getProductAmountFromSelectedRadioButton());\n }", "function setAmountValue() {\n amount\n .val($('.price-plan-header.active').next().children(':first').text())\n .trigger(...
[ "0.5882806", "0.58283746", "0.5803427", "0.5776516", "0.57566905", "0.57073164", "0.5576434", "0.5560472", "0.5552963", "0.5551607", "0.5514996", "0.5510863", "0.5444957", "0.5432081", "0.5423064", "0.53976005", "0.53645706", "0.53540295", "0.5344973", "0.5326386", "0.5322997...
0.62203735
0
stores the user input to db (localstorage)
function storeItem(id){ // set variables // var dist = document.getElementById("dist").value; var item = document.getElementById("item").value; var quantity = document.getElementById("quantity").value; var amount = document.getElementById("amount").value; var ordered = document.getElementById("o...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function storedData() {\n localStorage.setItem(\"journalEntry\", newEvent);\n const storedInput = localStorage.getItem(\"journalEntry\");\n\n // if(storageInput) {\n\n // }\n}", "function store() {\n localStorage.setItem('name_1', name_1.value);\n localStorage.setItem('pw', pw.value);\n localStora...
[ "0.70665425", "0.70445937", "0.70334464", "0.69964504", "0.6947187", "0.69469035", "0.69382244", "0.69149387", "0.68798506", "0.6876013", "0.6854719", "0.68466145", "0.6795073", "0.679348", "0.6767902", "0.6764886", "0.6757792", "0.6718478", "0.6709254", "0.67087823", "0.6634...
0.0
-1
gets the data from db (localstorage) and puts it in an array for display
function getItems(){ var dist="Distributor : " + db.getItem("adist"); var item="Item : " + db.getItem("aitem"); var quantity="Quantity : " + db.getItem("aquantity"); var amount="Amount : " + db.getItem("aamount"); var ordered="Ordered? : " + db.getItem("aordered"); var orderdate="Order Date : " ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadDataArray(){\n var storage = localStorage.getItem(\"dataArray\");\n if (storage) {\n dataArray = JSON.parse(storage);\n } else {\n dataArray = [];\n }\n console.log(dataArray);\n }", "function getArray(){\r\n return JSON.parse(localStora...
[ "0.72015876", "0.715067", "0.7060251", "0.7046413", "0.69951", "0.6935825", "0.68720114", "0.6821615", "0.68142843", "0.67715067", "0.67589146", "0.675737", "0.675379", "0.67416793", "0.6715918", "0.67066205", "0.67011", "0.67003304", "0.66985136", "0.6694756", "0.6693436", ...
0.0
-1
function to clear db (localstorage)
function clearStorage(){ alert("storage cleared"); db.clear(); return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clear_database() {\r\n local.clear();\r\n console.log(\"Cleared local storage!\");\r\n}", "function clean_database() {\n localStorage.clear();\n}", "function emptyLocalStorage() {\r\n localStorage.clear();\r\n}", "function vaciarLocalStorage() {\r\n localStorage.clear();\r\n}", "function va...
[ "0.9027905", "0.8720906", "0.7994854", "0.78910804", "0.7827533", "0.7827533", "0.78218865", "0.77961135", "0.77945334", "0.7783307", "0.7782072", "0.7772215", "0.7772215", "0.77687824", "0.77226144", "0.77158046", "0.7685008", "0.76720184", "0.76636124", "0.7653221", "0.7650...
0.7846987
4
function to show the number for the select slider
function showValue(number){ document.getElementById("selected_amount").innerHTML = number; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function numSelected(num) {\n if (newNum) {\n keySelect.display.value = num;\n newNum = false;\n } else {\n if (keySelect.display.value === \"\")\n keySelect.display.value = num;\n else\n keySelect.display.value += num;\n }\n }", "function setDmgMod...
[ "0.6862436", "0.6759478", "0.6635521", "0.64934003", "0.6474042", "0.6472182", "0.6446706", "0.64088756", "0.62849593", "0.6265519", "0.6242179", "0.6207979", "0.6194085", "0.6165391", "0.6163548", "0.6118309", "0.6105026", "0.6073978", "0.6073978", "0.60412776", "0.60197026"...
0.7149912
0
Syncs the selected date object time with user's time input
function setHoursFromInputs() { if (!self.config.enableTime) return; var hours = (parseInt(self.hourElement.value, 10) || 0) % (self.amPM ? 12 : 24), minutes = (parseInt(self.minuteElement.value, 10) || 0) % 60, seconds = self.config.enableSeconds ? (parseInt(self.secondElement.value, 10) || 0) % 60 : ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setTime() {\n var hours = $('input[name=\"schedule_hour_submit\"]').val();\n var minutes = $('input[name=\"schedule_minute_submit\"]').val();\n if (!_.isEmpty(hours) && !_.isEmpty(minutes)) {\n schedule.scheduleTime = $('input[name=\"schedule_hour_submit\"]').val() + ':' + ...
[ "0.68922514", "0.6725449", "0.66224545", "0.66217595", "0.66109484", "0.65942967", "0.6526823", "0.6516523", "0.6507192", "0.6501438", "0.6475373", "0.64449686", "0.6442995", "0.64419776", "0.6382088", "0.6374471", "0.6337769", "0.6326322", "0.63130575", "0.6257664", "0.62576...
0.0
-1